I’ve recently been exploring dash as a tool for displaying oceanographic model data. What I’d like to do is have 2 Graph components, one a scattergl and one a scattermapbox, both of which update when daterangepicker component is changed. That part is straightforward.
The data from both graphs is from the same pandas dataframe. What I’d like to do is select a legend entry on the scattergl , which causes a trace to vanish, and have the corresponding trace on the scattermapbox to also vanish.
I’ve gotten his to work for small datasets, using the traces opacity property in a restyle callback, but I was wondering if there was a more efficient way to do this. For larger data-sets the scattermapbox takes a long time compared to the scatergl object. i.e. the scattergl updates quickly but the scattermapbox takes 20-30 seconds.
I’m returning entire figure object structure via the callback, which seems to update the entire figure. Is it possible to see the object properties of a Graph more directly in a callback? i.e just toggle visibility on and off in a scattermapbox graph?
Thanks for any guidance,