Tooltips should not leave (window)
See original GitHub issueWhen using a chart near the edge of your browser window, it may get cut off. I’ve tried setting confine: true
, but this does not give the desired effect, since then it will be completely isolated in the chart div. This may not be a problem for large charts, but for small sparkline charts it is a problem.
Since I think this is unintended behaviour (I can’t think of a reason why a tooltip would display outside of your window
), I think this is a bug.
I am using the latest eCharts (3.4.0) with Google Chrome (55.0.2) on Windows 10
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Prevent CSS tooltip from going out of page/window
Unfortunately, if you want to keep your tooltip good positioning, it isn't possible using only CSS. Script solutions.
Read more >Tooltips should not leave (window) · Issue #5004 - GitHub
I've tried setting confine: true , but this does not give the desired effect, since then it will be completely isolated in the...
Read more >A tooltip is stuck on the desktop and will not go away.
I stumbled across a potential solution in my daily usage. Try pressing [Windows Key] + [D]. This should minimize all the windows and...
Read more >Tooltip Guidelines - Nielsen Norman Group
Provide brief and helpful content inside the tooltip. Additionally, lengthy content is no longer a 'tip', so keep it brief. Tooltips are ...
Read more >How to identify which program has left a portion of its UI ...
Find the tab it came from and just move your mouse around. The tooltip should disappear. (Unfortuantely, there's no easy way to determine...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For anyone else struggling with this, I’ve written a function for the position callback that solves this. It first attempts to place the tool-tip to the top right of the mouse position. If it overflows to the right, it flips it to the left. If it then overflows to the left, it places it a fixed distance from the left edge of the window (since there’s no better placement on the X axis at this point). And vice versa for top and bottom placement, with the fallback here placing it a fixed distance from the top edge of the window.
Notes:
I know its an old ticket, but its high in Google results. eCharts 3 now has a new property which does the job perfectly.