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

Updating series of a detached chart throws #8114

Closed
tomivirkki opened this issue Nov 8, 2024 · 0 comments · Fixed by #8115
Closed

Updating series of a detached chart throws #8114

tomivirkki opened this issue Nov 8, 2024 · 0 comments · Fixed by #8115
Assignees
Labels
regression Sometimes we make things break vaadin-charts

Comments

@tomivirkki
Copy link
Member

Description

If you detach a chart and update the title (or some other property) of one of its series, an error gets thrown and the chart no longer renders.
(This also happens if you attach the chart and update a series title before waiting for the chart-load event.)

The issue can manifest in the Dashboard component if you place Charts inside the widgets and then change the widgets' order:

Kapture.2024-11-08.at.12.56.24.mp4

This seems to be a regression from #7785

Expected outcome

No exception should be thrown while updating series of a detached chart

Minimal reproducible example

The following test in reattach.test.js would fail:

it('should change the series title of an unattached chart', async () => {
  const series = chart.querySelector('vaadin-chart-series');

  await oneEvent(chart, 'chart-load');
  // Remove the chart
  wrapper.removeChild(chart);
  // Update the series title
  series.title = 'bar';
  // Reattach the chart
  wrapper.appendChild(chart);
  await oneEvent(chart, 'chart-load');
});

Steps to reproduce

Run the test case

Environment

Vaadin version(s): 24.6

Browsers

Issue is not browser related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Sometimes we make things break vaadin-charts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants