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 fix: Make updateChart robust to missing data in dataset. #434

Merged
merged 1 commit into from
Sep 7, 2019
Merged

Bug fix: Make updateChart robust to missing data in dataset. #434

merged 1 commit into from
Sep 7, 2019

Conversation

TobbeEdgeware
Copy link

When using chartjs-plugin-streaming, the data in datasets is updated by a periodic call to onRefresh or similar function.

In that case, the recommended props to <Line> and other charts are datasets with no data property. This works fine until the Component is updated at which time there is a crash because data is not set.

This PR changed updateChart to check if data is present in the new props and only update if it is.

…r update mechanisms as in chartjs-plugin-streaming.
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.

3 participants