Skip to content

Commit

Permalink
Fixes timestamps not matching in stacked graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
georgepauna committed May 15, 2024
1 parent 0ccaba9 commit c092907
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/apexcharts-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,11 @@ class ChartsCard extends LitElement {
if (this._config?.series[index].show.in_brush) brushData.series.push(result);
return;
});
if (this._config.stacked)
for (let i = 0; i < graphData.series.length-1; i++)
for (let j = 0; j < graphData.series[i].data.length; j++)
graphData.series[i].data[j][0] = graphData.series[graphData.series.length-1].data[j][0];

if (this._config.stacked_last_is_total)
for (let i = 0; i < graphData.series.length-1; i++)
for (let j = 0; j < graphData.series[i].data.length; j++)
Expand Down

0 comments on commit c092907

Please sign in to comment.