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: new apis for updating chart #881

Merged
merged 1 commit into from
May 13, 2020
Merged

fix: new apis for updating chart #881

merged 1 commit into from
May 13, 2020

Conversation

stsrki
Copy link
Collaborator

@stsrki stsrki commented May 13, 2020

#792 error with charts after redrawing

This PR adds additional APIs to handle the chart update.

  • AddDatasetsAndUpdate()
  • AddLabelsDatasetsAndUpdate()

The problem with separate calls to chart with Clear(), AddLabel(), AddDataset() and Update() is that chartjs for some reason will raise an exception sometimes before update is called. Since it is random I cannot find the true cause. So I introduce this new APIs that will merge several calls into one operation.

@stsrki stsrki linked an issue May 13, 2020 that may be closed by this pull request
@stsrki stsrki merged commit e23299f into dev091 May 13, 2020
@stsrki stsrki deleted the dev091-charts-fix branch May 13, 2020 08:46
@pmagnus2
Copy link

This fix works for one dataset. However, if we have say 5 lines displayed in one LineChart then we need multiple calls to AddDataSetsAndUpdate() and the same error occurs again. Any ideas?

@stsrki
Copy link
Collaborator Author

stsrki commented Sep 28, 2021

@pmagnus2 Can you open a new issue with the steps and code to reproduce the error?

@pmagnus2
Copy link

@stsrki Was not able to reproduce the error in a fresh project. Could be some other issue in my code. Will revert with new issue if it can be consistently reproduced.

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.

error with charts after redrawing
2 participants