From 8f0aca1832f98d034990d75f8f09b195869b788c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Wiedemann?= Date: Wed, 10 Feb 2021 20:58:12 +0000 Subject: [PATCH] fix: Wrong labels in tooltip in some cases --- src/apex-layouts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apex-layouts.ts b/src/apex-layouts.ts index 851df45..225d273 100644 --- a/src/apex-layouts.ts +++ b/src/apex-layouts.ts @@ -168,7 +168,7 @@ function getSeries(config: ChartCardConfig, hass: HomeAssistant | undefined) { if (TIMESERIES_TYPES.includes(config.chart_type)) { return config?.series_in_graph.map((serie, index) => { return { - name: computeName(index, config.series, undefined, hass?.states[serie.entity]), + name: computeName(index, config.series_in_graph, undefined, hass?.states[serie.entity]), type: serie.type, data: [], }; @@ -183,7 +183,7 @@ function getLabels(config: ChartCardConfig, hass: HomeAssistant | undefined) { return []; } else { return config.series_in_graph.map((serie, index) => { - return computeName(index, config.series, undefined, hass?.states[serie.entity]); + return computeName(index, config.series_in_graph, undefined, hass?.states[serie.entity]); }); } }