leeoniya / uPlot

📈 A small, fast chart for time series, lines, areas, ohlc & bars
MIT License
8.51k stars 371 forks source link

How do I stop my legends "jiggling" when mousing over the plot #869

Closed backspaces closed 8 months ago

backspaces commented 8 months ago

When I create a plot, and inspect the x/y values by mousing over the map, they "jiggle" .. i.e. move slightly to the right or left. I'd like a way to give them enough space so that the jiggling no longer occurs. CSS? Options of some sort?

Here's a video showing what I mean: https://github.com/leeoniya/uPlot/assets/124366/0f08f7a7-8b5b-4609-ab11-5112f6416dbf

Thank for the wonderful plotting!

leeoniya commented 8 months ago

yeah, CSS.

there are classes on everything, so should be easy.

(the main benchmark demo chart sets a fixed size as well)

backspaces commented 8 months ago

OK, thanks. BTW: I'm using everylayout. I'm really impressed in their "book" and I paid to get the code. And recently took most of their examples and turned them into web components using the Shadow DOM rather than their use of the standard global DOM.

My bet is that the best solution to our problem above might be using flexbox.

leeoniya commented 8 months ago

:+1: