leeoniya / uPlot

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

Try uPlot.js #33

Closed leeoniya closed 4 years ago

leeoniya commented 4 years ago

i'll tag people here whose issues & use-cases in other charting libs could be good opportunities to try uPlot.

leeoniya commented 4 years ago

cc @arwenpi via https://github.com/chartjs/Chart.js/issues/6611

uPlot should be quite a bit faster for data streaming. demo: https://leeoniya.github.io/uPlot/demos/stream-data.html

leeoniya commented 4 years ago

cc @koba-1 via https://github.com/chartjs/chartjs-plugin-zoom/issues/306

https://jsfiddle.net/1eqsga6w/

leeoniya commented 4 years ago

cc @BatelAyala via https://github.com/highcharts/highcharts/issues/12602, https://github.com/highcharts/highcharts/issues/12662

here is your example using uPlot: https://jsfiddle.net/v4xuohk6/

if you need to plot 500,000 points, uPlot will easily handle this, too.

leeoniya commented 4 years ago

cc @drichardonline via https://github.com/drichardonline/chart-demo

leeoniya commented 4 years ago

cc @ptimson via https://github.com/amcharts/amcharts4/issues/1965

here is your example using uPlot: https://jsfiddle.net/mb5rpzn7/

the chart completes rendering in ~85ms on my machine.

leeoniya commented 4 years ago

cc @ceefit via https://github.com/patternfly/patternfly-react/issues/3429

uPlot should easily handle a 200 data point stream (it does quite well with thousands):

https://leeoniya.github.io/uPlot/demos/stream-data.html

leeoniya commented 4 years ago

cc @ben-spiller via https://github.com/danvk/dygraphs/issues/355

legend series toggle is the default behavior in uPlot

leeoniya commented 4 years ago

cc @lab-w dygraphs is no longer maintained, perhaps uPlot can work for you.

maybe of interest to you, as well:

https://github.com/netdata/dashboard/issues/66

leeoniya commented 4 years ago

@noobymcnoob

lol did they delete your question?

https://webcache.googleusercontent.com/search?q=cache:ChjBqL10wFQJ:https://community.plotly.com/t/how-to-improve-plotly-js-performance-to-match-or-exceed-uplot/38834+&cd=1&hl=en&ct=clnk&gl=us

noobymcnoob commented 4 years ago

No I deleted it because I figured I wouldn't get an answer.

On Wed., May 6, 2020, 1:46 p.m. Leon Sorokin, notifications@github.com wrote:

@noobymcnoob https://github.com/noobymcnoob

lol did they delete your question?

https://webcache.googleusercontent.com/search?q=cache:ChjBqL10wFQJ:https://community.plotly.com/t/how-to-improve-plotly-js-performance-to-match-or-exceed-uplot/38834+&cd=1&hl=en&ct=clnk&gl=us

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/leeoniya/uPlot/issues/33#issuecomment-624793559, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJDE4VBGPSBYFXEZ2WIRZODRQGPBBANCNFSM4JFRR4UA .

leeoniya commented 4 years ago

i think their answer is to downsample on the server. from the plotly maintainer: https://news.ycombinator.com/item?id=23045956.

i'll add plotly to the benchmark later today based on [1], since it's pretty widely used. some preliminary numbers using box plots: https://github.com/leeoniya/uPlot/issues/179

[1] https://plotly.com/javascript/line-charts/#basic-line-plot

noobymcnoob commented 4 years ago

If I wanted to downsample, I'd downsample. I don't want to. I will likely be switching to uPlot soon. Incredible performance!

Minor suggestion: uPlot is tough to search for on the web. Name is not unique enough?

On Wed., May 6, 2020, 2:19 p.m. Leon Sorokin, notifications@github.com wrote:

i think their answer is to downsample on the server. from the plotly maintainer: https://news.ycombinator.com/item?id=23045956.

i'll add plotly to the benchmark later today based on [1], since it's pretty widely used. some preliminary numbers using box plots: #179 https://github.com/leeoniya/uPlot/issues/179

[1] https://plotly.com/javascript/line-charts/#basic-line-plot

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/leeoniya/uPlot/issues/33#issuecomment-624809954, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJDE4VC2MHBIHUJIQM4CO2DRQGS23ANCNFSM4JFRR4UA .

leeoniya commented 4 years ago

Minor suggestion: uPlot is tough to search for on the web.

Googling uPlot yields the first 3 proper matches on the first page for me.

Name is not unique enough?

that ship has sailed...and i'm happy with the name :)

noobymcnoob commented 4 years ago

Indeed, looks like the search engines have caught up.

On Wed, 6 May 2020 at 14:26, Leon Sorokin notifications@github.com wrote:

Minor suggestion: uPlot is tough to search for on the web.

Googling uPlot yields the first 3 proper matches on the first page for me.

Name is not unique enough?

that ship has sailed...and i'm happy with the name :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/leeoniya/uPlot/issues/33#issuecomment-624813436, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJDE4VDCQXVXYV2OQQINZWLRQGTU5ANCNFSM4JFRR4UA .

leeoniya commented 4 years ago

Plotly.js (scattergl) bench:

https://leeoniya.github.io/uPlot/bench/Plotly.js.html

leeoniya commented 4 years ago

cc @nagabhushant (via https://github.com/amcharts/amcharts4/issues/2475)

amcharts has very poor performance. you should try something faster:

https://github.com/leeoniya/uPlot#performance

your examples should render in < 200ms with uPlot.

leeoniya commented 3 years ago

cc @runfaj (via https://github.com/amcharts/amcharts4/issues/2720).

In this 48 chart page, v3 loads on average about 13 seconds. v4 always loads about 3x that time at 35 seconds on average.

even 13s is an absurd amount of time.