Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to properly fetch data on relayout (onRelayout)? #350

Open
vpmew opened this issue Mar 5, 2025 · 0 comments
Open

How to properly fetch data on relayout (onRelayout)? #350

vpmew opened this issue Mar 5, 2025 · 0 comments

Comments

@vpmew
Copy link

vpmew commented Mar 5, 2025

I need this functionality and request some assistance to realize it.

At the moment I use the following approach:

  1. when user zoomed plot, onRelayout handler gets fired and starts data loading.
  2. when data is loaded it is passed to the component
  3. new data leads to re-render.

it's works fine, but:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant