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

Clarify docs for HoverTool #6079

Closed
5 tasks
timsnyder opened this issue Mar 28, 2017 · 6 comments · Fixed by #6183
Closed
5 tasks

Clarify docs for HoverTool #6079

timsnyder opened this issue Mar 28, 2017 · 6 comments · Fixed by #6183

Comments

@timsnyder
Copy link
Contributor

timsnyder commented Mar 28, 2017

I recently read http://bokeh.pydata.org/en/0.12.4/docs/user_guide/tools.html#hovertool looking for the hline or vline behavior. I was thrown off by the first sentence:

The hover tool pops up a tooltip div whenever the cursor is over a glyph.

Reading down the page further to http://bokeh.pydata.org/en/0.12.4/docs/user_guide/tools.html#hover-tool my confusion was reinforced by:

The hover tool displays informational tooltips whenever the cursor is directly over a glyph.

The words "cursor is directly over" led me to believe that I wasn't remembering things correctly. So, I bugged Brian in the gitter:
image

A little tweaking of the HoverTool user-guide text would have kept me reading and eventually gotten me into the refguide where I would have seen hline and vline.

The limitations of hline and vline should be documented in the refguide as well.

Items:

  • make link into refguide more prominently featured. This may be as simple as having 'Reference' included in the link text. When I saw the 'HoverTool' link, I didn't bother to click it because I thought it might just be a self reference to the user-guide.
  • allude to the possibility of hline and vline in user-guide without being a full repeat of all the detial in the refguide
  • clarify limitations of hline and vline in the refguide
  • document the use of '~' in TOOLTIPS as in hover_span.py example. It seems needed for spanning hover modes.
  • update the 'Warning' block in HoverTool Reference to accurately reflect the glifs that are supported.
@timsnyder
Copy link
Contributor Author

I'm planning to submit a PR for this before the 0.12.5 release. Feel free to assign this to me.

@bryevdv
Copy link
Member

bryevdv commented Apr 25, 2017

@timsnyder @mattpap What does "$~x" do? I can't find anything in the BokehJS code that would explain it or what it does. Is it specific to bokeh.charts somehow? FYI I am going to update the docs along with #6183 and close this issue along with it.

@matthieucan
Copy link

@bryevdv $~x, in the context of a line and with mode=hline, will return the value of x "on the line", that is where the tooltip appears, instead of the value of x in the plot (under the mouse). I don't know what it does in other contexts.

@bryevdv
Copy link
Member

bryevdv commented Feb 1, 2019

@matthieucan Interesting, tho ultimately whatever $~x does in any context, it's entirely unintentional/accidental. It's not anything we intend to support, so not relevant in terms of documentation

@matthieucan
Copy link

@bryevdv Oh? Well, that's an accidental feature then, as having the value as projected on the line instead of under the mouse is exactly what I was looking for. I hope this hack stays in place! :)

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants