TrackMyIndoorWorkout / TrackMyIndoorWorkout

Indoor fitness machine (bike, treadmill, rower, kayak / canoe / swim ergometer, elliptical) companion app to record virtual workouts with synthetic GPS track of simply circling on a track shape route
https://TrackMyIndoorWorkout.github.io
Apache License 2.0
30 stars 9 forks source link

Graphs don't show the measurements during workout #472

Closed MrCsabaToth closed 5 months ago

MrCsabaToth commented 5 months ago

This is not older than a month or so. After the workout the workout details view shows proper graphs. But during the workout it stays blue and doesn't seem to depict the measurement (even though the immediate reading seems to be okay).

Not sure if this is a result of a syncfusion flutter charts upgrade side effect, or a side effect from a feature or bugfix?

MrCsabaToth commented 5 months ago

The anomaly happened with the 2023/12/18 release of 23.2.7 -> 24.1.41 It seems that the graph now interprets the min:second graph horizontal time stamps incorrectly, and months show up: IMG_20231230_224440

MrCsabaToth commented 5 months ago

With some extra margin it's clear that Syncfusion Charts somehow translates the time stamps into UNIX epoch, 1970: IMG_20231231_000626 The real-time graph is pre initialized with the exact number of blank measurements, so later these measurements are shifted out of the queue. The blank records contain nulls, I also tried to replace them with zeros, that didn't help. I also tried to initialize with empty data arrays, that didn't help either.

I still couldn't figure out why the

MrCsabaToth commented 5 months ago

Ok, the problem was that although I initialized _graphData and optionally _graphAvgData and _graphMaxData with dummy blank data to avoid the horizontal label problems in the past, however the graphs feed now from the non underlined variables graphData, graphAvgData, and graphMaxData, because these latter ones are pure Lists whereas the former ones are ListQueues. Now I also initialize the non underlined variables, and that fixed the issue. I also do the dummy generation a little more optionally, really only when it's needed.