From 11f905cf325dd9a077d64fd555383652ba8ffb10 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 15 Sep 2022 17:33:58 +0200 Subject: [PATCH] Client - hide speed chart when checkbox is unchecked - fix #232 --- .../src/components/Workout/WorkoutDetail/WorkoutChart/legend.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fittrackee_client/src/components/Workout/WorkoutDetail/WorkoutChart/legend.ts b/fittrackee_client/src/components/Workout/WorkoutDetail/WorkoutChart/legend.ts index c5b3b868..a886f223 100644 --- a/fittrackee_client/src/components/Workout/WorkoutDetail/WorkoutChart/legend.ts +++ b/fittrackee_client/src/components/Workout/WorkoutDetail/WorkoutChart/legend.ts @@ -32,7 +32,7 @@ export const htmlLegendPlugin = { legendItems.forEach((item: LegendItem) => { const li = document.createElement('li') li.onclick = () => { - if (item.datasetIndex) { + if (item.datasetIndex !== undefined) { chart.setDatasetVisibility( item.datasetIndex, !chart.isDatasetVisible(item.datasetIndex)