Skip to content

Conversation

@ryugaraj
Copy link
Contributor

Description

Charts crashing when tooltip is visible and any kind of re-renders happen (updating timerange, zooming in, resizing chart, etc).

Ideally tooltips should immediately hide onMouseLeave but sometimes they stay visible and any kind of interaction with the chart causes the chart to crash.

This issue can be reproduced easily by disabling onMouseLeave on the tooltip in core-chart.

The main cause behind the issue was series being undefined and trying to access series.chart causing the crash.

Screen.Recording.2025-12-22.at.18.27.19.mov

How has this been tested?

Tested in Core chart and CloudWatch console.

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ryugaraj ryugaraj requested a review from a team as a code owner December 22, 2025 17:29
@ryugaraj ryugaraj requested review from ClaudioGSDB and removed request for a team December 22, 2025 17:29
return;
}

const chart = group[0]?.series.chart;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking, but why not instead add a question mark here after series?

const chart = group[0]?.series?.chart;

Then adding the previous check is not necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just to be explicit here, we had similar issues in the past with core-chart and we went with similar approach of handling it explicitly.

@jperals
Copy link
Member

jperals commented Dec 22, 2025

Any change a test can be added, or the issue cannot be reproduced reliably?

@ryugaraj
Copy link
Contributor Author

Any change a test can be added, or the issue cannot be reproduced reliably?

Unfortunately, it's happening intermittently. But I can try following up with a case that helps up replicate every time and can add a test for it.

@jperals jperals added this pull request to the merge queue Dec 23, 2025
Merged via the queue into cloudscape-design:main with commit b0daa3a Dec 23, 2025
42 of 44 checks passed
@ryugaraj ryugaraj deleted the chart-crash branch December 23, 2025 15:22
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

Successfully merging this pull request may close these issues.

2 participants