Persisting legend state

I have a chart with several plots. Also I have a slider that allows users to subselect chart data.

The problem is if user turns off some traces and then uses slider to switch data period, all disabled plots are shown enabled again.

From my point of view there are two possible ways to solve it:

  1. Pass legend state alongside with slider changes.
  2. Persist graph state at the user’s browser.

But I cannot find something suitable. Any leads?


1 Like

Hi! Has anyone come up with a solution for this? Persisting legend state would be really useful.

I’d look into uirevision for this. it’s not documented yet but there are some examples in the forum.