MultiChart X-axis scale fix#1881
Open
frozenshadow wants to merge 1 commit intonovus:masterfrom
frozenshadow:multichart_x-axis_scale_fix
Open
MultiChart X-axis scale fix#1881frozenshadow wants to merge 1 commit intonovus:masterfrom frozenshadow:multichart_x-axis_scale_fix
frozenshadow wants to merge 1 commit intonovus:masterfrom
frozenshadow:multichart_x-axis_scale_fix
Conversation
liquidpele
reviewed
Feb 10, 2017
| .range([0, availableWidth]); | ||
| var ex = d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x }); // Allow extent to be used multiple times | ||
| for(var i = 0; i < charts.length; i++){ // Loop through all charts except bars1 and bars2 (because it's ordinal) | ||
| if(!(i === 4 || i === 5)){ charts[i].xDomain(ex); } // Set xDomain for each chart individually |
Contributor
There was a problem hiding this comment.
Instead of using the index, this should be checking if the charts are ordinal... otherwise someone adding/changing that array of charts will break this in a non-obvious way.
Author
There was a problem hiding this comment.
Thanks for the response.
Sounds like you've got a good point there. I will look into it later.
Author
There was a problem hiding this comment.
@liquidpele
I'm truly sorry for this late reply.
It has been quite a long time since I have seen and touched this code. And unfortunately I don't really understand what you mean. Do you mean the for loop?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
X-axis scale fix for issue #1662