You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using plotly via python you can use plotly-resampler to get performant rendering of charts that contain a large number (100k+) data points.
Is there potential to adding/using this in plotly.rs? (Is it there already and I've missed it)? Or does the python based impl of MinMaxLLTB need copying over to rust?
Hi @alexespencer. Interesting 🤔 that you raised this. You are the second person to mention this (@gwbres also brought this up on another thread).
No, plotly-resampler does not exist in this repo. This crate is a thin wrapper around plotly.js.
The resampling is an interesting problem and we would have to port the implementation from python to rust in this repo or a sperate crate to be used as a dependency.
Thanks for the insight re wrapper vs porting. Makes sense - feel free to close or leave this open for tracking? I will dive into the implementation - but I'm unlikely to have time to contribute anytime soon
@alexespencer , I've went down the rabbit hole and implemented minmaxlttb in a separate crate.
I've made a PR where I have added an example of how it can be used with plotly-rs, #356
Given that plotly.rs 's crate purpose is to generate static html plots, one would have to generate the downsampled data and then generate the static plot with the downsampeld version. Doing something dynamic such as plotly-resampler is achievable using wasm, but not the core purpose of this crate. That "is left as an exercise" for the interested user/reader :) .
@alexespencer let me know if using minmaxlttb-rs, like I do in example/downsampling is sufficient for you to close this issue.
Activity
andrei-ng commentedon Jul 10, 2025
Hi @alexespencer. Interesting 🤔 that you raised this. You are the second person to mention this (@gwbres also brought this up on another thread).
No, plotly-resampler does not exist in this repo. This crate is a thin wrapper around plotly.js.
The resampling is an interesting problem and we would have to port the implementation from python to rust in this repo or a sperate crate to be used as a dependency.
alexespencer commentedon Jul 11, 2025
Thanks for the insight re wrapper vs porting. Makes sense - feel free to close or leave this open for tracking? I will dive into the implementation - but I'm unlikely to have time to contribute anytime soon
andrei-ng commentedon Jul 11, 2025
I will keep it open. I would like to look into it as well, but I don't know when I will have time.
andrei-ng commentedon Aug 31, 2025
@alexespencer , I've went down the rabbit hole and implemented minmaxlttb in a separate crate.
I've made a PR where I have added an example of how it can be used with plotly-rs, #356
Given that plotly.rs 's crate purpose is to generate static html plots, one would have to generate the downsampled data and then generate the static plot with the downsampeld version. Doing something dynamic such as plotly-resampler is achievable using wasm, but not the core purpose of this crate. That "is left as an exercise" for the interested user/reader :) .
@alexespencer let me know if using minmaxlttb-rs, like I do in
example/downsamplingis sufficient for you to close this issue.andrei-ng commentedon Sep 15, 2025
I am closing this. @alexespencer, feel free to reopen if the current downsampling method is not sufficient.