plotly / plotly/plotly.js

Pie chart leader lines are not cleaned up when layout height changes in call to Plotly.react

Open
#5,616 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
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:

image

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.