vasturiano / timelines-chart

Timelines Chart
http://vasturiano.github.io/timelines-chart/example/categorical/
MIT License
563 stars 122 forks source link

Tooltip divs are created at the document root, not under the specified element #22

Open zosnap opened 6 years ago

zosnap commented 6 years ago

This isn't obvious from the example since you pass in document.body to the constructor anyway, but the divs created for the tooltips are created directly on the document body regardless of what element is passed to the constructor. This makes the chart more difficult to modify or dispose of and caused rendering problems with our view framework. It would be better if the tooltip divs were created under the passed in el, or if there was a method to dispose of them.

vasturiano commented 6 years ago

Hi @zosnap, thanks for this. You are right that the tooltip elements are always created at the document body level. This is a particularity of d3-tip.

I'm waiting for this PR to be resolved in d3-tip so that we can scope the tooltips elements to the nested element.

zosnap commented 6 years ago

That's too bad. I'll keep an eye on that pull request. Thanks for the really useful library!

wadrn commented 2 years ago

@vasturiano This issue still exists, and in that case, it can't adjust the tooltip style inner the chart element. Or should we provide some props for the tooltip style ?