Skip to content
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 the point coordinates in custom tooltip function #2944

Closed
julienfouilhe opened this issue Jul 8, 2016 · 4 comments
Closed

Get the point coordinates in custom tooltip function #2944

julienfouilhe opened this issue Jul 8, 2016 · 4 comments

Comments

@julienfouilhe
Copy link

julienfouilhe commented Jul 8, 2016

When we use the custom tooltip function, we get x and y coordinates calculated given the the height and the width of the built-in tooltip system. Would it be possible to get the points x/y coordinates in the graph in order to be able to display easily a really custom tooltip?

For instance, I want mine to display always at the top of the point. Having coordinates calculated for the tooltip to be on the left is annoying and makes it pretty much impossible to calc the point position.

Thanks

@etimberg
Copy link
Member

etimberg commented Jul 8, 2016

I don't think this is too hard to add. I'd be happy to look at a PR for it.

@alexchizhovcom
Copy link

👍 Yes, it would be really great to have such an option, because its a pain to position custom tooltips :)

@capgunmedia
Copy link

Relative is better. I think that's what you are asking. You also have to consider where the chart is, to populate the tool tip at one point. I always try to get tooltips to be relative to the viewport. If you restrict it to show up at the top, you may run into issues when that chart is aligned to the top of the viewport. Then relative to eachother, so they don't bump into eachother, when mousing over data that is side-by-side. Lots of math. :)

@etimberg
Copy link
Member

Fixed in #3472 see the new caretX and caretY properties

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

4 participants