plotly / plotly/plotly.py

Update Method Example Broken

Open
#3,578 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

The updatemenu method update is broken. It only updates the layout attributes. If you use the same code but change the method to restyle, 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the custom button and custom dropdown examples in the Plotly dropdowns documentation and reproduce the behavior using the update method. Compare it with restyle and verify that the completed fix updates both data and layout attributes in the examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.