leeoniya / uPlot

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

Initialize scales with range check #860

Closed adela-almasan closed 9 months ago

adela-almasan commented 9 months ago

On initialization the scales are always initialized to the data range even when a range function exists.

leeoniya commented 9 months ago

thanks for the PR :)

i solved it a bit differently: https://github.com/leeoniya/uPlot/commit/c749b61abe942a38d16110bf44ebf16689445280

that dataset it not really valid anyways and will have additional issues with hovering, stacking, and a bunch of other things. added a comment in https://github.com/grafana/support-escalations/issues/6671#issuecomment-1661376244