News for hackers. Stuff that matters.
Re:A Beginner’s Guide to Chart.js by leeoniya on Sunday October 06, 2019 @12:56PM (#21173209)
i'm working on a micro timeseries plotter that easily handles 150k+ datapoints. it uses canvas but accounts properly for display pixel density, so is as sharp as SVG.

here is how it performs vs Chart.js:

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

i will add Apex charts to the bench list in a day or so

i think the only practical way to get acceptable perf with SVG is to simplify the paths via something like https://mourner.github.io/simplify-js/

Re:A Beginner’s Guide to Chart.js by etimberg on Sunday October 06, 2019 @01:39PM (#21173529)
If you change the `scales.xAxes[0].ticks.source config option to `'auto'` you can drop ~1s off the render the time. It's still not great, but it is an improvement. I'll take a look through the profile I generated and see if there are any obvious improvements in Chart.js.

Thanks for creating this :)

Re:A Beginner’s Guide to Chart.js by leeoniya on Sunday October 06, 2019 @01:56PM (#21173622)
sweet, i'll add this.

is this mentioned anywhere in the docs? seems non-obvious.

Re:A Beginner’s Guide to Chart.js by etimberg on Sunday October 06, 2019 @02:07PM (#21173710)
The option is documented at https://www.chartjs.org/docs/latest/axes/cartesian/time.html... but the performance implications aren't. I'll work on adding something there.
Re:A Beginner’s Guide to Chart.js by olavgg on Monday October 07, 2019 @03:34AM (#21178354)
Very impressive work! Funny thing though, I recently implemented a zoomable line chart with D3.js, and I also use double click to reset the zoom :)
Re:A Beginner’s Guide to Chart.js by antman on Sunday October 06, 2019 @01:29PM (#21173453)
That really looks fast! Does it work in.live mode also?
Re:A Beginner’s Guide to Chart.js by leeoniya on Sunday October 06, 2019 @01:57PM (#21173633)
it will. i'm still fiddling with the final api design to make sure it can accomodate the planned features in a logical manner without hacks.