diff --git a/.devcontainer/ui-lovelace.yaml b/.devcontainer/ui-lovelace.yaml index a987c69..8379a4f 100644 --- a/.devcontainer/ui-lovelace.yaml +++ b/.devcontainer/ui-lovelace.yaml @@ -768,6 +768,9 @@ views: header: show: true title: Weather Forecast + all_series_config: + show: + extremas: time series: - entity: weather.home type: area @@ -800,7 +803,7 @@ views: stroke_width: 0 data_generator: | return entity.attributes.forecast.map((entry) => { - return [new Date(entry.datetime).getTime(), entry.snow]; + return [new Date(entry.datetime).getTime(), entry.temperature]; }); - entity: weather.home type: column @@ -811,5 +814,5 @@ views: stroke_width: 0 data_generator: | return entity.attributes.forecast.map((entry) => { - return [new Date(entry.datetime).getTime(), entry.precipitation]; + return [new Date(entry.datetime).getTime(), entry.templow]; }); diff --git a/src/apexcharts-card.ts b/src/apexcharts-card.ts index 21c13fb..bc6b5c1 100644 --- a/src/apexcharts-card.ts +++ b/src/apexcharts-card.ts @@ -655,10 +655,15 @@ class ChartsCard extends LitElement { ) { // eslint-disable-next-line @typescript-eslint/no-explicit-any const points: any = []; + const multiYAxis = + this._config?.apex_config?.yaxis && + Array.isArray(this._config.apex_config.yaxis) && + this._config.apex_config.yaxis.length > 1; points.push({ x: value[0], y: invert && value[1] ? -value[1] : value[1], seriesIndex: index, + yAxisIndex: multiYAxis ? index : 0, marker: { strokeColor: bgColor, fillColor: 'var(--card-background-color)', @@ -687,6 +692,7 @@ class ChartsCard extends LitElement { x: value[0], y: invert && value[1] ? -value[1] : value[1], seriesIndex: index, + yAxisIndex: multiYAxis ? index : 0, marker: { size: 0, },