Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have been reviewing all usage of
.call
and.apply
. Majority of such calls are to invoke some d3 method which expect specific value ofthis
.There are some cases within dc code as well. Majority of these set
this
to a d3 element. In general I am finding code difficult to understand and maintain with .call/.apply.I have restructured a function in fb3f9db. In this now the d3-element is passed a parameter and
this
is set to the chart. This makes the function very similar to other functions.I think the same restructuring will help in cleaning up getColor in color-mixin.
This is for your review and discussion, then I will convert similar cases in other charts.