Skip to content

Commit

Permalink
fix(group_by): When group_by was used with lines, the end of the char…
Browse files Browse the repository at this point in the history
…t was showing an empty slot (display bug only)
  • Loading branch information
RomRider committed Mar 20, 2021
1 parent 8303b84 commit 0163f9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/apexcharts-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1029,10 +1029,10 @@ class ChartsCard extends LitElement {
const localEnd = new Date(end);
let offsetEnd: number | undefined = 0;
const series = brush ? this._config?.series_in_brush : this._config?.series_in_graph;
const onlyBars = series?.reduce((acc, serie) => {
return acc && serie.type === 'column' && serie.group_by.func !== 'raw';
const onlyGroupBy = series?.reduce((acc, serie) => {
return acc && serie.group_by.func !== 'raw';
}, series?.length > 0);
if (onlyBars) {
if (onlyGroupBy) {
offsetEnd = series?.reduce((acc, serie) => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const dur = parse(serie.group_by.duration)!;
Expand Down

0 comments on commit 0163f9e

Please sign in to comment.