echarts
echarts copied to clipboard
[Feature] tooltip.appendToBody with no scroll
What problem does this feature solve?
I'm using tooltip.appendToBody = true in order to be able to see all the tooltips properly. Everything works perfectly until I hover over a chart that's nearly outside of the screen.

As you can see it overflows the body and therefore creates s scrollbar in the html element. In this screen the charts are inside a container with inner scroll, so it kind of messes up the scroll because the user can scroll outside the view:

Maybe it would be good to create the tooltip div inside of a relative layout that doesn't exceed the body size:
<body>
.....
<div style="position: relative; width: 100%; height: 100%; overflow: hidden">
<div style="position:absolute">the tooltip as it is now</div>
</div>
</body>
What does the proposed API look like?
Add an option:
{
tooltip: {
appendToBodyConfine: boolean
}
}
which will add the overflow: hidden property to the tooltips parent container