GPX speed and altitude track has incorrect units on x-axis when imperial
jat255 opened this issue · 2 comments
Noticed this today. Here's a plot of speed and elevation from a 3.766 mile walk I recorded:
The x-axis goes up to 6.06, which happens to be exactly the distance of the walk in kilometers, so it looks like it's not labeling correctly based on the user setting.
If I switch my profile to use metric units, everything looks good:
If I had to take a guess, I think this isn't working because of this line in workouts.ts
: https://github.com/SamR1/FitTrackee/blob/master/fittrackee_client/src/utils/workouts.ts#L39; It looks like that rather than data.distance
, it should be convertStatsDistance('km', data.distance, useImperialUnits)
, but this is just from inspecting the code, so I haven't tested that.
thanks for the issue and the PR.
released in v0.7.15