-
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
Get Label when clicking on Bar chart #3478
Comments
@Galleria this is possible. The bars have |
It's sure if there is one segment instance as below,
But I couldn't get it if there is more than one segment because it returned all label instance as below,
Thanks, |
ah, I see what you're running into. You have a few options though this will be best fixed in the next release due to #3400 Before that happens, you could hit test the elements yourself to see which is the one you want. This snippet can get you started. // helper function that translates an event to a position in canvas coordinates
var pos = helpers.getRelativePosition(e, chart);
// inRange is the function on the chart element that is used for hit testing
var intersect = elements.filter(function(element) {
return element.inRange(pos.x, pos.y);
}); |
Thanks, :") |
Hi @etimberg Thank you |
Hi everybody.
I have a question about tooltips.
Can I get a label when clicking on bar chart ? (multiple labels on each segment but i would like to get only one that mouse on hover it )
Thanks,
:")
The text was updated successfully, but these errors were encountered: