[Bug] The tooltip is not positioned correctly
Version
5.5.1
Link to Minimal Reproduction
https://codesandbox.io/s/compassionate-lamport-6y7yc7?file=/src/App.js
Steps to Reproduce
create a tooltip that returns long series names
Current Behavior
the tooltip has poor positioning. the tooltip could fit if it was located below/above to the right/left of the place where it is located.
Expected Behavior
the tooltip has correct positioning
Environment
- OS: windows
- Browser: Chrome 126.0.6478.185
- Framework: React 18
Any additional comments?
No response
🚩 Please follow Official posting guidelines (below). This is not a good place to ask questions about usage, "how to" or extensive debugging assistance.
The issue list is reserved exclusively for bug reports and feature requests. For usage questions, please use the following resources:
- Read the docs
- Find in examples
- Look for / ask questions on Stack Overflow
Another good resource is website makeapie.cn with many code examples.
This is not the best solution. It it still works worse than highcharts. If you have a lot of series with titles or tree view and the graph is located under the header and so on, it is shifted from the upper border of the screen - this area is not used, although it could be. https://codesandbox.io/s/compassionate-lamport-6y7yc7?file=/src/App.js
it also worsens the performance of use. Navigation to the central points is almost impossible, because the tooltip does not move to the right/left
@helgasoft, The bug is still relevant
hm, first we want to confine the tooltip, but make it as big as the chart so it becomes unusable. Then we want the giant tooltip to move to the side, i.e. to not be confined anymore... And now we are stuck so it has to be a bug. (or could it be misuse ?)
This is a production case. Our current sizes now can be: w320px x h875px (screen height: 937px), for graph, size: w500px x h100px.
If you show metrics, they may have long names, and they may also have nested threeholds. this is the reality of the prod. You don't need to refer to the confine prop, you need to fix the positioning of the configuration that I attached the first time. If you think that this is an incorrect condition or not very realistic, look at how other libraries, for example highcharts with large tooltips. Spoiler - they work better and don't consider such usage to be wrong.
Please correct the automatic positioning. The tooltip should not go off the screen if it can fit in the field of the screen.
@helgasoft, any updates?
?
I have nothing more to say, I'm not a developer/contributor to the library. These types of issues are usually resolved by DIY pull request.