Hi,
I don’t think it is possible to do it with css. On the other hand, when you say that it is not efficient to do it via a callback, are you recreating the figure with go.Figure
each time it is triggered or manipulating the figure dictionary instead (passing it as a State)? The latter method can speed things up considerably…
Another alternative (that should be even faster) is to use a clientside callback to change the properties that you want. If you are using plotly templates, then you might want to store them in a dcc.Store
component to be able to use these objects client-side.
Lastly, dash-extensions
now supports partial updates of props, which can be very useful when manipulating large objects in props like dcc.Chart.figure
. I haven’t tested it yet, but it sounds extremely useful!
You can find the announcement thread here: OperatorTransform - List and dict operations, and partial component property updates
Hope this helps!