-
In the current project, I'm drawing a graph using plotly-dash px.line. from plotly_resampler import register_plotly_resampler
register_plotly_resampler(mode='auto') he code above works fine. I want to use FigureResampler, but there is only go.Figure in the example, so I used the same for the px.line. fig = FigureResampler(px.line(df[col_name], x="datetime", y=y_axes, color="target", render_mode="webg1")) But the result I wanted didn't come out like register_plotly_resampler. Is there any way I can use it on px.line? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, I tested similar code to what you provided in your question and it worked as expected (the output of Hence, in this response I'll answer two questions that in my belief are relevant for this discussion; a) How does A. How does
|
Beta Was this translation helpful? Give feedback.
Hi, I tested similar code to what you provided in your question and it worked as expected (the output of
px.line
which is ago.Figure
was correctly transformed into aFigureResampler
object).Hence, in this response I'll answer two questions that in my belief are relevant for this discussion;
a) How does
register_plotly_resampler(mode='auto')
work?=> I believe this is necessary to understand how & why your results were satisfactory.
b) How to use FigureResampler?
=> This answers the second & main part of your question.
A. How does
register_plotly_resampler(mode='auto')
work?This function results in the use of plotly-resampler under the hood, meaning that plotly figures will be wrapped a…