-
Notifications
You must be signed in to change notification settings - Fork 116
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
tooltip can go offscreen for rightmost and leftmost nodes #109
Comments
Just want to add, that this one is almost a blocker for me. I have large data sets with long names and tooltips always go over left edge or under the bottom edge. |
Hi, I just ran into this also (via glowroot/glowroot#457) and wanted to share my solution (not sure if it's optimal or not). Here's my patch for d3-tip: trask/d3-tip@66ad693 And here's the (minor) patch for d3-flame-graph: I started out with another option for keeping tooltips on screen (based on caged/d3-tip#198), but I thought that keeping the tooltips always south of the frame (instead of jumping to the east or west of the frame) was nicer for flame graphs. It could probably be nicer still if the "caret" were a dom element instead of using css :after, because then the caret's horizontal position could be dynamic relative to the tooltip itself, which would allow the tooltip itself to extend further right/left as needed/available, while the caret could still point at the correct frame. You can see the patched version in action at https://demo.glowroot.org/transaction/thread-flame-graph?transaction-type=Web @spiermar I'd like your thoughts before opening a PR to d3-tip in case you have other ideas/plans. Thanks. |
@trask I like the solution. Changing the direction when close to the border. Having said that, the only |
@spiermar Thanks, I've submitted the PR to |
In certain cases part of tooltip will be obscured by browser window.
The text was updated successfully, but these errors were encountered: