-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
try to fix bar chart + Horizontal Bar chart wrong render + highlight position bug for issue #214 and #242. #248
Merged
danielgindi
merged 1 commit into
ChartsOrg:master
from
liuxuan30:BarChart+HorizontalBarFix
Jul 30, 2015
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify why this change was made?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each dataSet will have up to xValsCount entries, however, in some cases, if there is no dataSet's entryCount would be xValsCount, it goes wrong. If the specific xIndex doesn't have entry for every dataSet, the maxEntry count would less than x values count.
We cannot rely on dataSet.entryCount to get the maxEntry.
maxEntry
may not be the proper name for the new logic. But I am not sure what's the better name to have.The true meaning of "maxEntry" would always be xValsCount, based on the fact we don't insert Null/NaN entry if no data for the xIndex. If we force the entryCount must be equal to xValsCount, the issue is no longer valid I think, but we have to insert Null/NaN and handle them then.
I am using below data code to test in demo multiple bar charts. It only has data at first index and last index. If you use old logic to calculate maxEntry, then it only draws the first index bars. The last one is missing, and the xAxis is not rendered correctly as well. The
maxEntry
would be 2 in old logic, however I got 11 xIndex. Applying the change, maxEntry will be 11, and the chart looks good.Acutally, this is the first place I changed when I found the issue. But not enough to fix the bug.