Is there a way to update the yaxis range on button click? I am using buttons to toggle source data on a 2y axis chart, and need to manually define the axis ranges for each data series (due to the tick alignment issue that emerges in the default axis range when using 2y axis charts).
For a single 2y chart (i.e., no buttons) Iāve employed the code below, which works fine. Curious if there is a way to update these fields on click. Iāve tried flowing them into buttons.args, but I do not believe (based on external documentation) that these specific attributes are supported.
#Y-axis1 format
fig.update_yaxes(title_text='First yaxis title', tickformat=y1_label_format, range=[y1_min,y1_max], tickvals=y1_tickvals, secondary_y=False)
#Y-axis2 format
fig.update_yaxes(title_text='Second yaxis Title', tickformat=y2_label_format, range=[y2_min,y2_max], tickvals=y2_tickvals, secondary_y=True)
Iāve also considered making multiple superimposed, independent charts with buttons to show only the selected chart (and hide the others), although I have not seen any reference on successfully hiding entire charts with buttons (rather than single traces / elements).
Any guidance would be much appreciatedā¦