DrFriendless / ExtendedStatsServerless

Extended Stats using the Serverless framework.
8 stars 3 forks source link

tooltips off-screen #9

Open yzemaze opened 4 years ago

yzemaze commented 4 years ago

Sometimes parts of tooltips are off-screen: screenshot

DrFriendless commented 4 years ago

I am constructing the text for the tooltips, but Vega is displaying them. Do you know enough about Vega to convince it to display the tooltip on screen? It mostly gets it right.

yzemaze commented 4 years ago

I didn’t know anything about Vega until 5 days ago ;) I just read a doc to look for a solution regarding formatting axes’ data. But if you’re sure it’s a Vega problem I’ll check there. The problem seems to be taking the screen size instead of window size to calc left position of tooltips. If the browser runs on fullscreen the tooltips get displayed fine, but if you change the left border of the browser window tooltips sometimes behave like in my screenshot.

Just to be sure: Do you use https://github.com/vega/vega-tooltip/releases/tag/v0.20.1?