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

stacked: true doesn't work when using the "statistics" option. #788

Open
4 tasks done
Caleche317 opened this issue Oct 10, 2024 · 0 comments
Open
4 tasks done

stacked: true doesn't work when using the "statistics" option. #788

Caleche317 opened this issue Oct 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Caleche317
Copy link

Checklist

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

Describe the bug
stacked: true doesn't work when using the "statistics" option.
I can get the my bar stacked when I don't use the "statistics" option but I cannot get long term statistics.
If I use the "statistics" option, I I get the long term statistics data but my bars are not stacked anymore

Version of the card
Version: v2.1.2

To Reproduce
With the statistics enabled :

type: custom:apexcharts-card
graph_span: 30d
stacked: true
header:
  title: Consommation électrique des 30 derniers jours
  show: true
series:
  - entity: sensor.tywatt_chauffage_ecs
    type: column
    name: Chauffage + Eau Chaude
    color: ff6f61
    statistics:
      type: change
      period: day
      align: start
    show:
      legend_value: false
  - entity: sensor.tywatt_cuisson
    type: column
    name: Cuisson
    color: ff9932
    show:
      legend_value: false
  - entity: sensor.prise_pc_energy
    type: column
    name: PC
    color: 886fff
    statistics:
      type: change
      period: day
      align: start
    group_by:
      func: diff
      duration: 1d
      start_with_last: true
    show:
      legend_value: false
  - entity: sensor.prises_non_detaillees
    type: column
    name: Autres Prises
    color: 41d1ff
    statistics:
      type: change
      period: day
      align: start
    show:
      legend_value: false
  - entity: sensor.tywatt_autres
    type: column
    name: Non surveillé
    color: aeaeae
    statistics:
      type: change
      period: day
      align: start
    show:
      legend_value: false
show:
  last_updated: true
span:
  start: day
  offset: '-29d'
apex_config:
  xaxis:
    tooltip:
      enabled: false
    labels:
      hideOverlappingLabels: true
      showDuplicates: true
      format: dd/MM

Without the statistics enabled:

type: custom:apexcharts-card
graph_span: 30d
stacked: true
header:
  title: Consommation électrique des 30 derniers jours
  show: true
series:
  - entity: sensor.tywatt_chauffage_ecs
    type: column
    name: Chauffage + Eau Chaude
    color: ff6f61
    group_by:
      func: diff
      duration: 1d
      start_with_last: true
    show:
      legend_value: false
  - entity: sensor.tywatt_cuisson
    type: column
    name: Cuisson
    color: ff9932
    group_by:
      func: diff
      duration: 1d
      start_with_last: true
    show:
      legend_value: false
  - entity: sensor.prise_pc_energy
    type: column
    name: PC
    color: 886fff
    group_by:
      func: diff
      duration: 1d
      start_with_last: true
    show:
      legend_value: false
  - entity: sensor.prises_non_detaillees
    type: column
    name: Autres Prises
    color: 41d1ff
    group_by:
      func: diff
      duration: 1d
      start_with_last: true
    show:
      legend_value: false
  - entity: sensor.tywatt_autres
    type: column
    name: Non surveillé
    color: aeaeae
    group_by:
      func: diff
      duration: 1d
      start_with_last: true
    show:
      legend_value: false
show:
  last_updated: true
span:
  start: day
  offset: '-29d'
apex_config:
  xaxis:
    tooltip:
      enabled: false
    labels:
      hideOverlappingLabels: true
      showDuplicates: true
      format: dd/MM

Screenshots
With Statistics
image

Without Statistics
image

Expected behavior
I expect the bar to stack when using the "statistics" option. Am i missing something ?

Desktop (please complete the following information):

  • Firefox 121.0

Smartphone (please complete the following information):

  • Home Assistant app 2024.9.4-full

Additional context
Add any other context about the problem here.

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

1 participant