Skip to content

Fix graph monotony

After having a bit more data I have noticed that the graph is not always monotone (/ can go back in time) due to the used tension.

chart.js offers a cubicInterpolationMode (monotone) that ignores the tension but seems better suited for this usecase.

I also removed bezierCurve as it seems to be depricated (only reference I could find was in a stackoverflow post related to v1 of chart.js.

For the views with more datapoints the visual difference is negligible, and the same might happen for the yearly view once enough datapoints exist. Nonetheless I have fixed it for my instance. Hence the suggested PR 😄

Before: Screenshot_20240714_233551 After: Screenshot_20240714_233652

Before: Screenshot_20240714_234425 After: Screenshot_20240714_234421

PS: thx for doing all the hard work! Really happy with the project so far 👍

Next step for me is trying to figure out how to make it default to the weekly view for personal preference reasons :P (that only took like 2 minutes)

Edited by Daniel Fr

Merge request reports

Loading