Skip to content

Commit

Permalink
fix: Wrong labels in tooltip in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
RomRider committed Feb 10, 2021
1 parent 9919c10 commit 8f0aca1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apex-layouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
};
Expand All @@ -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]);
});
}
}
Expand Down

0 comments on commit 8f0aca1

Please sign in to comment.