Pie chart leader lines are not cleaned up when layout height changes in call to Plotly.react
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
Version: plotly-1.58.4.js
CodePen: https://codepen.io/tysonliddell/pen/qBRGVzV
When calling Plotly.react to resize a pie chart, the leader lines are left on the graph leaving a mess like the following:

If I change datarevision in the layout when calling Plotly.react, the lines are then redrawn properly. Shouldn't the leader lines lines redraw if the layout changes, but the data remains constant though?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided CodePen and reproduce the resize through Plotly.react using plotly-1.58.4.js. Trace the pie-chart update path for leader-line cleanup when layout height changes, then add a regression test covering unchanged data with a changed layout and verify that no stale lines remain.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100