Skip to content

Commit

Permalink
fix: Chart not displayed properly or at all with layout-card
Browse files Browse the repository at this point in the history
  • Loading branch information
RomRider committed Mar 6, 2021
1 parent cff8218 commit e5840fb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/apexcharts-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,11 @@ class ChartsCard extends LitElement {
if (!this._config?.series[index].show.in_chart && !this._config?.series[index].show.in_brush) {
return;
}
if (graph.history.length === 0) return [{ data: [] }];
if (graph.history.length === 0) {
if (this._config?.series[index].show.in_chart) graphData.series.push({ data: [] });
if (this._config?.series[index].show.in_brush) brushData.series.push({ data: [] });
return;
}
let data: EntityCachePoints = [];
if (this._config?.series[index].extend_to_end && this._config?.series[index].type !== 'column') {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
Expand Down

0 comments on commit e5840fb

Please sign in to comment.