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

[Bug]: Rendering chart takes very long for large datasets compared to update chart #830

Open
1 task
aarbakkeinnovation opened this issue Apr 27, 2022 · 1 comment

Comments

@aarbakkeinnovation
Copy link

Would you like to work on a fix?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

Current and expected behavior

I'm rendering large quantities of data (10x series of 100k+ points).

If I render a chart containing this many points it takes about 17 seconds before rendering is finished.

But, if I render the chart first containing only the series labels with empty datasets, and then perform an update of the chart with all the data, it completes rendering in about 3 seconds.

It seems the ChartRender function is performing some heavy task when instantiated with chartData containing lots of points.
I suspect it might be related to Vue adding unnecessary watchers to datapoints.

Reproduction

https://codesandbox.io/s/agitated-dust-hyr3hk

chart.js version

3.7.1

vue-chartjs version

4.0.7

Possible solution

No response

@thabarbados
Copy link
Collaborator

Hello. Thanks for the bug report. I will try to find options to optimize the performance.

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 a pull request may close this issue.

2 participants