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

Fix Sunburst chart infinite loop bug #1939

Merged
merged 1 commit into from
Aug 11, 2022
Merged

Conversation

texodus
Copy link
Member

@texodus texodus commented Aug 11, 2022

Within sunburst charts, labels must be calculated (or not) depending on whether they will physically fit in their respective slices, and this can only practically be done by measuring the text after its been rendered. When a sunburst chart is drawn but not visible, e.g. in the case of a <perspective-workspace> panel that is "unselected" but still _connected" from the perspective of the Shadow DOM, this can result in an infinite loop, as most geometry calculations e.g. getBoundingClientRect() will not return the correct values when they're not "visible". This PR changes the initialization logic for charts, only rendering them fully when their offsetParent is non-null.

Fixes #1938 and adds a test case derived from the repro in this issue.

@texodus texodus added the bug Concrete, reproducible bugs label Aug 11, 2022
@texodus texodus merged commit eacac3b into master Aug 11, 2022
@texodus texodus deleted the sunburst-more-like-funburst branch August 11, 2022 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Concrete, reproducible bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using sunburst with grouping and tabs results in unresponsive application
1 participant