Skip to content

Using Plotly-resampler for dash app with multiple users: problem with global variable #91

Answered by jonasvdd
malammar0 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @malammar0,

From plotly-resampler>=0.8.0rc5 (pypi) on, we have FigureResampler serialization support. As a result, no global variables are needed and the figure can be cached per session using for example dash-extensions. This way, no global variables are used! 🔥

When #104 is merged, this will also be highlighted in our examples folder. For sake of completeness, I will copy a working example here:

"""Minimal dash app example.

Click on a button, and see a plotly-resampler graph of a noisy sinusoid.
No dynamic graph construction / pattern matching callbacks are needed.

This example uses the dash-extensions its ServersideOutput functionality to cache
the FigureResampler per user/session…

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
5 replies
@malammar0
Comment options

@jonasvdd
Comment options

@malammar0
Comment options

@malammar0
Comment options

@jonasvdd
Comment options

Comment options

You must be logged in to vote
2 replies
@malammar0
Comment options

@GabrielReira
Comment options

Answer selected by jonasvdd
Comment options

You must be logged in to vote
2 replies
@jonasvdd
Comment options

@galdir
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working discussion open discussion about some functionality
4 participants