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 Bar Chart Rendering Incorrectly #866

Open
4 tasks done
nvlldev opened this issue Feb 10, 2025 · 0 comments
Open
4 tasks done

Stacked Bar Chart Rendering Incorrectly #866

nvlldev opened this issue Feb 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@nvlldev
Copy link

nvlldev commented Feb 10, 2025

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
Not all series are stacking properly in stacked column chart. Specifically the Untracked bar is not being placed on top of the rest of the bars in the group.

Version of the card
Version: v2.1.2

To Reproduce
This is the configuration I used:

type: custom:apexcharts-card
header:
  show: true
  title: Energy Usage
  show_states: true
  colorize_states: true
apex_config:
  chart:
    height: 500px
graph_span: 7d
stacked: true
series:
  - entity: sensor.scott_s_desk_today_s_consumption
    type: column
    name: Scott's Desk
    stack_group: individual
    color: "#f9f871"
    float_precision: 2
    statistics:
      type: change
      period: day
      align: start
  - entity: sensor.colin_s_desk_today_s_consumption
    type: column
    name: Colin's Desk
    stack_group: individual
    color: "#f8c471"
    float_precision: 2
    statistics:
      type: change
      period: day
      align: start
  - entity: sensor.jacks_desk_today_s_consumption
    type: column
    name: Jack's Desk
    stack_group: individual
    color: "#f57f20"
    float_precision: 2
    statistics:
      type: change
      period: day
      align: start
  - entity: sensor.server_plug_today_s_consumption
    type: column
    name: Servers and Networking
    stack_group: individual
    color: "#d84315"
    float_precision: 2
    statistics:
      type: change
      period: day
      align: start
  - entity: sensor.music_equipment_today_s_consumption
    type: column
    name: Music Equipment
    stack_group: individual
    color: "#c2185b"
    float_precision: 2
    statistics:
      type: change
      period: day
      align: start
  - entity: sensor.mini_fridge_today_s_consumption
    type: column
    name: Mini Fridge
    stack_group: individual
    color: "#8e24aa"
    float_precision: 2
    statistics:
      type: change
      period: day
      align: start
  - entity: sensor.refrigerator_energy
    type: column
    name: Refrigerator
    stack_group: individual
    color: "#4a148c"
    float_precision: 2
    statistics:
      type: change
      period: day
      align: start
  - entity: sensor.untracked_energy_consumption
    type: column
    name: Untracked
    stack_group: individual
    color: "#757575"
    float_precision: 2
    statistics:
      type: change
      period: day
      align: start
  - entity: sensor.xcel_itron_5_current_summation_delivered_today
    type: column
    name: Total
    unit: kWh
    transform: return x / 1000
    color: var(--primary-text-color)
    opacity: 0.3
    float_precision: 2
    statistics:
      type: change
      period: day
      align: start
experimental:
  disable_config_validation: true
card_mod:
  style: |
    .type-custom-apexcharts-card {
      background: transparent;
    }

Screenshots
Image

Expected behavior
I expect the Untracked bar to be placed on top of the rest.

Desktop (please complete the following information):

  • Browser: Arc
  • Version: 1.79.1 (58230)
  • Chromium Engine Version: 132.0.6834.160

Smartphone (please complete the following information):

  • Device: iPhone14Pro
  • OS: iOS18.3
  • Browser: Home Assistant App
  • Version: 2025.1

Additional context
This issue happens to both untracked and total if the group is set to individual, all other series stack correctly.

@nvlldev nvlldev added the bug Something isn't working label Feb 10, 2025
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