Open mboll opened 2 years ago
After playing around a little more, it seems that this is a simple error in the example code. The figure's x-axis is using a numeric (linear) type, but the annotations are using mixed x-axis types of date and linear. Altering the example code such that the x-axis types are consistent produces the expected behavior.
The
updatemenu
methodupdate
is broken. It only updates the layout attributes. If you use the same code but change the method torestyle
, it updates the data attributes as expected, but obviously this won't work if you want to update both data and layout attributes.Recreate This is present for both the custom button and custom dropdown examples on the plotly examples page. You can see the problem by interacting with the examples.
Versions I have this behavior on plotly 5.5. My friend has this problem in version 4.14. The behavior is the same in my versions of Chrome, Firefox, Edge, and VS Code's Jupyter interface.
Edit: I updated the title after getting some more info.