leeoniya / uPlot

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

multi-bars valToPos #903

Open dingjunweibjkanyun opened 4 months ago

dingjunweibjkanyun commented 4 months ago

The result obtained by the valToPos API in the grouping bar chart is incorrect?

image
dingjunweibjkanyun commented 4 months ago

https://leeoniya.github.io/uPlot/demos/multi-bars.html

leeoniya commented 4 months ago

i need more information. i have no idea what your image is showing.

in grouped bars valToPos will be correct for y axis, but will probably be wrong for x axis.

since it is a plugin that customizes the x positions of the points. you have to run the same "walk" distribution function to work out the x position of each bar.

again, it's not clear what you're actually trying to do, so that's all i can tell you.

dingjunweibjkanyun commented 4 months ago

tks