-
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
Fixed misplaced data points on category scale #4062
Fixed misplaced data points on category scale #4062
Conversation
src/scales/scale.category.js
Outdated
if (value !== undefined && isNaN(index)) { | ||
// If value is a data object, then index is the index in the data array, | ||
// not the index of the scale. We need to change that. | ||
var valueCategory = me.isHorizontal() ? value.x : value.y; |
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.
this will error if value
is undefined
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.
You're totally right, thank you for your feedback. Addressed this on the latest commit.
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.
It fails because value can also be null
@simonbrunel But that would be catched by line 77, right? |
|
@simonbrunel Please review |
Verifying the index before processing
getPixelForValue
See #4060