Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
crasyboy42 opened this issue Mar 11, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@crasyboy42
Copy link

Checklist

  • [x ] I updated the card to the latest version available
  • [x ] I cleared the cache of my browser
  • [x ] I verified that I'm really running the lastest version in my browser console
  • [x ] I checked if there is another issue opened with the same problem

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)

@crasyboy42 crasyboy42 added the bug Something isn't working label Mar 11, 2024
Copy link

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.

@github-actions github-actions bot added the Stale label May 11, 2024
@web-dc
Copy link

web-dc commented May 12, 2024

I have the same issue

@github-actions github-actions bot removed the Stale label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants