leeoniya / uPlot

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

How to find position of splits? #886

Closed vinay2897 closed 6 months ago

vinay2897 commented 6 months ago

I want to draw something at a particular split (tick) of x-axis but there is no datapoint at that timestamp. When datapoint exists it is simple to do with valToPos.

Is there something like valToPos but in this case val is not available instead we pass it a split value? Or some way to get a split's position

leeoniya commented 6 months ago

i'm not sure what you mean. valToPos() accepts arbitrary values, so you can pass any timestamp, it doesnt need to come from data.

vinay2897 commented 6 months ago

i'm not sure what you mean. valToPos() accepts arbitrary values, so you can pass any timestamp, it doesnt need to come from data.

my bad, didn't realize it works for any value