-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
What can I do to improve the performance? (already using scattergl) #6230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Glad you like it @stereokai! The one usage technique I've seen to sometimes help with data like this is explicitly downsampling based on the ranges given by |
Curious to know if using a partial package like plotly.js-gl2d-dist-min that includes only |
On another note, considering your use case of plotting time-series setting |
Guys thanks so much for your time.
Will definitely give it a chance and report back
I am currently using Is there anything else in my configuration that I can improve to improve the graphical performance? You can find my current plotly.js configuration here: https://github.com/stereokai/multi-charts-comparison/blob/publish/renderers/Plotly/plotly.config.js Million thanks |
Instead of blocks like this, I suggest you use |
@archmoj Also any chance you can give this question a moment?
|
I think some extra steps might be avoided using |
On another note - you could set |
@archmoj I could find only a few examples online, I understand it should go on the data object, like this? data.config = data.config || {};
data.config.plotGlPixelRatio = 1;
if (!hasInitialized) {
Plotly.newPlot(chart, data, layout, config.options);
initEvents();
} else {
Plotly.react(chart, data, layout, config.options);
} |
No. You you should add it here. export const options = {
plotGlPixelRatio: 1,
scrollZoom: true,
responsive: true,
}; |
Thanks. This example here is misleading: https://codepen.io/MojtabaSamimi/pen/rNWjBoo
I also gave |
Re: downsampling: ironically we DO downsample, in a way that should have almost zero visual impact, when drawing SVG line traces. But I don't believe we do for gl2d because in general the downsampling operation there is slower in our experience than just drawing all the points. These days I spend most of my own time in Python so I'm not sure about JS libraries to do this, but specifically for time series https://github.com/predict-idlab/plotly-resampler (not made by Plotly, but targeting Plotly charts) does a very good job and may have some good inspiration for you. Re: zoom / pan: actually my statement about rangeslider vs interactions on the plot itself may only be relevant to SVG traces. The technique we use with SVG to do a fast rescaling while the mouse is down, then redraw on mouse up, can't be done in webgl because we need to make one large canvas that covers the entire plot area (so as to not use too many webgl contexts) and in the general case there may be subplots that aren't being moved while some of them are. |
Does anybody know if there has been a development regarding a library like Plotly Resampler for Plotly.js? |
Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Alternatively, if it's a request for tech support, please post in our community forum. Thank you - @gvwilson |
Please see: http://www.stereokai.com/multi-charts-comparison/#plotly
The code can be found here: https://github.com/stereokai/multi-charts-comparison/blob/publish/renderers/Plotly/Plotly.js#L22-77
Problem: Janky and slow graphical performance
Question: What can I improve in my code to squeeze more FPS from Plotly.js?
PS. This is my first time using plotly.js, and I have to say, the API is great, and despite struggling with the documentation, this implementation took me relatively little time compared to all other charting libraries I tried!
The text was updated successfully, but these errors were encountered: