plotly / plotly/react-plotly.js
How to properly fetch data on relayout (onRelayout)?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 138
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 4
Description
I need this functionality and request some assistance to realize it.
At the moment I use the following approach:
- when user zoomed plot, onRelayout handler gets fired and starts data loading.
- when data is loaded it is passed to the component
- new data leads to re-render.
it's works fine, but:
- if I catch the moment when component is re-rendering because of the new data and do an aditional zoom operation at the same moment, then I get a strange jump/flickering of my plot for a moment.
It's looks like a race of states.
Inner state which is responsible for zoom transformations changes at the same time with component re-rendering.
I need advice on how to get rid of this bug. Or how to propeply realize this feature, in case if I completely wrong in my approach.
Thanks.
Contributor guide
No contributing guide indexed for this repository
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 by tracing the onRelayout handler and the React Plot component update flow described in the issue. Reproduce the sequence of zooming, loading new data, re-rendering, and zooming again; done means the plot no longer jumps or flickers during that overlapping interaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100