I have a row of four buttons to control which traces are visible in a plotly map. This is done based on this example: https://plot.ly/javascript/custom-buttons/
Is there some way I can keep track of which button is currently active?
For example, trace C is selected as shown below.
and then when a state on the map is clicked, the map is redrawn at a county level view zoomed into the state.
How can I maintain that trace C is still selected when the map is redrawn? Currently the map resets to trace A.