plotly / plotly/react-plotly.js

Async updates to the plotly values make annotations disappear

Open
#231 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
138
Avg merge
3d 2h
Merged PRs (30d)
4

Description

https://codepen.io/mason142/pen/gOLmvGY

In this codepen I have a scatter chart setup with some setTimeout's to trigger react state changes which power the values in plotly. As you can see, the red line disappears after I change the value of g. if you double click the chart it comes back. If I update x,y, and g at the same time then there are no issues.

If annotations x,y values are hard coded and don't change based on state changes like in this example then the problem also goes away.

Contributor guide

No contributing guide indexed for this repository

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 linked CodePen reproduction and trace the React state changes to x, y, and g, comparing separate updates with a simultaneous update. Confirm that the annotation disappears after g changes and returns after a chart double-click; done means annotations remain visible across asynchronous updates.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.