Skip to content

Discussion: plotly-resampler #333

Description

@alexespencer

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?

Activity

  1. andrei-ng commented on Jul 10, 2025

    @andrei-ng
    Collaborator

    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.

  2. alexespencer commented on Jul 11, 2025

    @alexespencer
    Author

    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

  3. andrei-ng commented on Jul 11, 2025

    @andrei-ng
    Collaborator

    I will keep it open. I would like to look into it as well, but I don't know when I will have time.

  4. andrei-ng commented on Aug 31, 2025

    @andrei-ng
    Collaborator

    @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.

  5. andrei-ng commented on Sep 15, 2025

    @andrei-ng
    Collaborator

    I am closing this. @alexespencer, feel free to reopen if the current downsampling method is not sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions