0π
β
I assume the issue is, that your localtime has a date offset off -1 hours, but without seeing the data (and knowing the offset), I canβt say for sure.
If this would be the case, you could/would have to convert your dataset values. Depending on your dataset and available libraries you could use functions like:
-
momentjs:
let localDate= moment.utc("2023-02-01 10:00:00") .local() .format("YYYY-MM-DD HH:mm:ss");
-
vanilajs:
let localDate = new Date(Date.UTC(2023, 1, 1, 10, 0, 0));
You would have to loop through all the x-values / dates entries, to fix this.
Source:stackexchange.com