RomRider / apexcharts-card

📈 A Lovelace card to display advanced graphs and charts based on ApexChartsJS for Home Assistant
MIT License
1.08k stars 75 forks source link

Yaxis max value not correct when stacking values and having multiple axis #679

Open crasyboy42 opened 4 months ago

crasyboy42 commented 4 months ago

Checklist

Describe the bug I added a average temp line on my graph that shows my heatpump power usage, I used to have heating and tank grouped on top of each other and this worked fine. I added a new line to show average temp and now the max value on the first yaxis is only the max value of one of the columns and not combined. The moment you add any configuration for a yaxis (even if its just the main one) it doesn't combine the values anymore.

Version of the card Version: 2.0.4 (as shown when it gives a error)

To Reproduce The configuration that causes the problem:

header:
  show: true
  title: Consumption daily
stacked: true
graph_span: 7d
span:
  start: day
  offset: '-6d'
apex_config:
  chart:
    height: 275px
all_series_config:
  stroke_width: 2
  type: column
  float_precision: 3
  yaxis_id: first
  group_by:
    duration: 1d
    func: diff
yaxis:
  - id: first
  - id: second
    opposite: true
series:
  - entity: sensor.thuis_heating_accumulated_consumption
  - entity: sensor.thuis_cooling_accumulated_consumption
  - entity: sensor.thuis_tank_accumulated_consumption
  - entity: sensor.thuis_outdoor_temperature
    yaxis_id: second
    type: line
    color: '#ff0000'
    group_by:
      func: avg

The configuration that worked before changes:

type: custom:apexcharts-card
header:
  show: true
  title: Consumption daily
stacked: true
graph_span: 7d
span:
  start: day
  offset: '-6d'
apex_config:
  chart:
    height: 275px
all_series_config:
  stroke_width: 1
  type: column
  float_precision: 3
  yaxis_id: first
  group_by:
    duration: 1d
    func: diff
series:
  - entity: sensor.thuis_heating_accumulated_consumption
  - entity: sensor.thuis_cooling_accumulated_consumption
  - entity: sensor.thuis_tank_accumulated_consumption

Screenshots With multiple yaxis and average temp: image

Without any yaxis configuration image

Expected behavior The left axis has a max value of the combined value like it was showing before

Desktop (please complete the following information): Google Chrome | 122.0.6261.95 (Official Build) (64-bit) (cohort: Stable)

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

web-dc commented 2 months ago

I have the same issue

github-actions[bot] commented 5 days ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.