Chart.js data goes backwards when retroactively pushing datapoint from HTTP request using Angular #8339
Unanswered
DuncanTLaw
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to push these sets of bodyweight data from my HTTP request where the GET request returns the below data:
bodyweight (this is formatted as year: month : date: {logId: number, bodyweightValue: number}:
From these data, datapoints 2021: 01: 02 and 2021: 01: 04 were added retrospectively, ie. the were added later than the 2nd/4th January of 2021.
The method used to add these data to the chart is as follows:
EDIT: This is fixed by sorting the data first! @ moderators you can close this discussion
Beta Was this translation helpful? Give feedback.
All reactions