Client - hide speed chart when checkbox is unchecked - fix #232

This commit is contained in:
Sam 2022-09-15 17:33:58 +02:00
parent 1d39462f79
commit 11f905cf32

View File

@ -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)