leeoniya / uPlot

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

Scatter plot with line #677

Open gerhat opened 2 years ago

gerhat commented 2 years ago

I am trying to implement the following chart. Is it possible with uPlot?

Thank you

scatter_example

leeoniya commented 2 years ago

with a bit of work, yes. you have to use mode: 2 and implement your own simple renderer.

the scatter demo [1] is more complex than you need for the above case, but shows the overall structure/setup. i'm quite busy currently, but will try to find some time to put together a more simple demo like above.

[1] https://leeoniya.github.io/uPlot/demos/scatter.html

haibins commented 4 months ago

can you give a demo of scatter line like above? Thank you very much~

haibins commented 4 months ago

with a bit of work, yes. you have to use mode: 2 and implement your own simple renderer.

the scatter demo [1] is more complex than you need for the above case, but shows the overall structure/setup. i'm quite busy currently, but will try to find some time to put together a more simple demo like above.

[1] https://leeoniya.github.io/uPlot/demos/scatter.html

I am trying to implement the above case with uPlot , Is it possible with uPlot? Thank you