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
HoverTool showing canvas coordinates not data coordinates #4861
Comments
Thanks for the report. I actually thought |
I can confirm this behavior on Mac -- in Chrome and Safari. |
A quick workaround: when referencing the column names using the "@" notation, the tooltips are presented correctly
|
I had noted this issue as well. Even in the documentation, the example shows the canvas coordinates, not the data coordinates. |
@Prikers the This definitely seems like a bug introduced at some point. The hover tool logic is quite convoluted to handle all the different cases, I've been meaning to try and factor and simplify it but have not had the opportunity to yet. If anyone is interested in poking around, the relevant files are here: https://github.com/bokeh/bokeh/blob/master/bokehjs/src/coffee/models/tools/inspectors/hover_tool.coffee in particular it would seem |
I actually find this line suspicious: and wonder if it should just be removed. |
ping @mattpap too |
The logic may in fact be convoluted, but the syntax is pretty straightforward. |
Anyway, the bug was trivial and boiled down to shadowing of variables. Fixed in PR #5406. |
I'm running Bokeh 0.12.5, and I still seem have this issue on line plots. Here is an example:
Here is the result. You can see that I get two different values of y, depending on where my cursor is positioned. The way I understand it, canvas should give the position of the cursor, and the other value should display the value of the indicated data point. |
@w1res there might be something specific to lines which are more complicated due to their connectivity. However, please open a new issue so this can be tracked and prioritized independently. |
I don't think this is mentioned in the other hover tool issues, but I might have missed it.
Using
$x, $y
inHoverTool
displays the canvas coordinates, not the data coordinates as I believe it is supposed to. Using$sx, $sy
displays the canvas coordinates as well.e.g.
produces
The text was updated successfully, but these errors were encountered: