-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Correctly handle stacked groups when not adjacent #4937
Conversation
- issue chartjs#4897: Non adjacent stacked group is not rendered correctly
src/controllers/controller.bar.js
Outdated
}, | ||
|
||
/** | ||
* Returns the stack index for the given dataset based on groups and bar visibility. | ||
* @param {Number=} [datasetIndex] - The dataset index |
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.
[nit] what the purpose of =
in {Number=}
?
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.
Indicates that it's optional: http://usejsdoc.org/tags-type.html
Though I don't think we need both the equals and square brackets. That would seem redundant to me. I would think we should just use one or the other. I was more familiar with the =
syntax
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.
Didn't take time to look around, thinking it was a typo, thanks @benmccann! I agree, it's redundant, and I think we already adopted the other form {Number} [datasetIndex] - ...
, so I would continue with that one.
Thanks @jcopperfield |
Only the dataset index was used for indexing the stack
Only the dataset index was used for indexing the stack
Fixes #4897 (stacked group is not rendered correctly when stack group is not adjacent).
Split from PR #4911
Problem
Only the dataset index was used for indexing the stack.