Skip to content

ott-vis-panel: lots of jittering when refreshing data, even if the data doesn't change #1424

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

Closed
3 tasks
dyc3 opened this issue Feb 29, 2024 · 2 comments
Closed
3 tasks
Assignees
Labels
bug Something isn't working

Comments

@dyc3
Copy link
Owner

dyc3 commented Feb 29, 2024

Current Behavior

No response

Expected Behavior

resizing the panel nor refreshing the dashboard should cause the visualization to jitter

Steps To Reproduce

  1. open grafana
  2. see our 2 custom panels
  3. resize them
  4. see that the visualization constantly gets rerendered.

Environment

  • This happens on the official site, opentogethertube.com
  • This happens using a self-hosted version.
  • I'm using the docker image.

Anything else?

This is caused by react rerendering, causing the useEffect to run, which resets the entire d3 state

@dyc3 dyc3 added the bug Something isn't working label Feb 29, 2024
@dyc3
Copy link
Owner Author

dyc3 commented Feb 29, 2024

I've figured out exactly why this effect occurs.

  • When the component rerenders, its fed new values for nodes and links
  • When this happens, all the nodes are reset to coordinates (0, 0)
  • The forceManyBodies() causes all nodes to accelerate away from each other at high velocities
  • The nodes settle back to equilibrium.

@dyc3 dyc3 self-assigned this Mar 13, 2024
@dyc3 dyc3 moved this from Todo to In Progress in OTT Horizontal Scaling Mar 14, 2024
@dyc3
Copy link
Owner Author

dyc3 commented Mar 23, 2024

This is fully fixed with TreeDisplay

@dyc3 dyc3 closed this as completed Mar 23, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in OTT Horizontal Scaling Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

1 participant