Plotly.js performance when data points reaching 180k


#1

Thanks for reply. I have managed to findout that the function
Plotly.newPlot() is acting extremely slow where as the 182840 entries
are calculated quite fast whereas when the function Plotly.newPlot is
called with traces the browser hangs and comes back after many
minutes… are there any other faster functions available in plotly…
the performance at least in my browser is very poor… your help is highly appreciated I have also looked at : https://jsfiddle.net/80satht7/1/ but managed to findout that its working fine… What I may be doing wrong I am not sure…


#2

182,840 entries is a lot of data for our svg scatter trace type, but should be handled without any issues by our WebGL trace type scattergl.

See https://jsfiddle.net/5ub875u2/1/


#3

@etienne
I’m testing ‘scattergl’ for best performance. It looks like the smaller the marker size, the better it performs for panning the plot.
Do you have a performance suggestions for a plotly user to consider entries to ideal marker size and plot width and height?

As you can see in this test: https://codepen.io/destrada/pen/OgrejK

If I make the markers bigger in size, it lags considerably when I pan the plot. When the markers are smaller then it performs better


#4

Don’t use big markers and fix the plot size. For best performance, use pointcloud:


#5

Hi @jack
What’s the difference between pointcloud and scattergl?
Looks like there is no selection tool in pointcloud.
Anything else fundamentally different?


#6

@destrada Yes, there is no selection tool, only circles for marker shape (no diamonds etc), and only numeric axes (no dates, etc). I don’t believe callback events are supported either (hover, click). pointcloud is the best WebGL option for speed with many (>100,000) points and only zoom/pan/hover interactivity- we don’t see it used much outside that use case.


#7

Sorry if I use this old topic but my question seems to be related.
I have a huge number of points (>>100,000) and I need to show them within some layout shapes.
If I plot some of those points with scatter chart everything works properly but if I move to scattergl or pointcloud the shapes are missing (no error). Instead, other layout options like range or axes label are working.

There is a way to use shapes on scattergl or pointcloud charts?


#8

Not right now, but soon https://github.com/plotly/plotly.js/pull/1869#issuecomment-350350160