Skip to content

Commit

Permalink
Update apexcharts-card.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Wesley-Vos authored Dec 18, 2022
1 parent 5a6f04d commit 893746e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/apexcharts-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -757,14 +757,13 @@ class ChartsCard extends LitElement {
const graph = this.shadowRoot.querySelector('#graph');
const layout = getLayoutConfig(this._config, this._hass, this._graphs);

console.log(layout);

if (this._config.series_in_brush.length) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(layout as any).chart.id = Math.random().toString(36).substring(7);
}
this._apexChart = new ApexCharts(graph, layout);
this._apexChart.render();
console.log(this._apexChart);
if (this._config.series_in_brush.length) {
const brush = this.shadowRoot.querySelector('#brush');
this._apexBrush = new ApexCharts(
Expand Down Expand Up @@ -946,13 +945,12 @@ class ChartsCard extends LitElement {
const currentMax = (this._apexChart as any).axes?.w?.globals?.maxX;
this._headerState = [...this._headerState];

console.log(graphData)

this._apexChart?.updateOptions(
graphData,
false,
TIMESERIES_TYPES.includes(this._config.chart_type) ? false : true,
);
console.log(this._apexChart)
if (this._apexBrush) {
const newMin = start.getTime();
const newMax = this._findEndOfChart(end, false);
Expand Down

0 comments on commit 893746e

Please sign in to comment.