Convert units for distance data in WorkoutChart

This commit is contained in:
Joshua Taillon 2023-03-13 21:16:36 -06:00
parent dd40fd7154
commit 7f3cf4f4b7

View File

@ -36,7 +36,9 @@ export const getDatasets = (
const coordinates: TCoordinates[] = []
chartData.map((data) => {
distance_labels.push(data.distance)
distance_labels.push(
convertStatsDistance('km', data.distance, useImperialUnits)
)
duration_labels.push(data.duration)
datasets.speed.data.push(
convertStatsDistance('km', data.speed, useImperialUnits)