RomRider / apexcharts-card

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

`stacked: true` not working anymore #746

Open mathieucarbou opened 1 month ago

mathieucarbou commented 1 month ago

Checklist

Describe the bug

Stacking bar charts is not working anymore

Version of the card Version: v2.1.2 (i've switched to it yesterday through HACS)

To Reproduce This is the configuration I used:

type: custom:apexcharts-card
graph_span: 12months
span:
  end: month
cache: true
update_interval: 24h
stacked: true
header:
  show: true
  title: Suivi énergétique H&T (kWh/month)
  standard_format: true
apex_config:
  chart:
    height: 400px
yaxis:
  - decimals: 0
    min: -900
    max: 400
    apex_config:
      tickAmount: 13
      forceNiceScale: true
      axisTicks:
        show: false
all_series_config:
  type: column
  unit: kWh
  float_precision: 2
  show:
    legend_value: false
  statistics:
    type: sum
    period: month
    align: middle
  group_by:
    func: diff
    duration: 1month
    start_with_last: true
    fill: last
series:
  - entity: sensor.circuit_climatisation_energy
    name: PAC
  - entity: sensor.chauffage_energy
    name: Chauffage
  - entity: sensor.deshumidificateur_salon_energy
    name: Déshumidificateur Salon
  - entity: sensor.deshumidificateur_chambre_energy
    name: Déshumidificateur Chambre
  - entity: sensor.deshumidificateur_etage_energy
    name: Déshumidificateur Étage
  - entity: sensor.home_consumed_energy
    name: Consommation totale
    color: lightgrey
    invert: true

Screenshots

image image

Expected behavior These bars were stacked before

mathieucarbou commented 1 month ago

v2.0.4 works:

image

mathieucarbou commented 1 month ago

Duplicate of #730 .

The workaround:

apex_config:
  chart:
    stackOnlyBar: false

is not working

Zaphod360 commented 4 weeks ago

Has there been any update on this issue? I also have dashed lines showing as solid.

michalk-k commented 3 weeks ago

I noticed that sometimes it works and some times it doesn't. I created a graph a week ago seeing it looks ok. But today I noticed it broken

BTW I've seen it's fixed in original Apex charts but we are lagging behind its development

michalk-k commented 3 weeks ago

BTW as mentioned in another issue, removing the yaxis fixes the staked feature, but must not be applicable for everyone.

mathieucarbou commented 2 weeks ago

I am sticking to v2.0.4 until this is solved...

typxxi commented 2 weeks ago

Does anyone know if and how stacking "lines" in a line chart should work?

Or is it not working due the bug too ?

I have tried it the past few days and nothing worked out. I want to stack these lines:

image

deltamelter commented 2 weeks ago

Aw damn... I only just updated hoping the severe javascript lag would be fixed/improved but instead I lost my stacks Was successfully mixing stacked and unstacked bars, areas and lines image Now nothing stacks... image

typxxi commented 2 weeks ago

Sad, but thanks for the reply that it is not working anymore but I bet they looked beautiful when stacked properly. At least I know now that it is not working and it is not my fault.

deltamelter commented 2 weeks ago

The now unstacked bars are also no longer offsetting position, I had adjusted the bars so that they started on the labelled (half-)hour. the intentionally unstacked bars are still offset.

phoniclynx commented 3 days ago

I'm having the same issue: image turns into this which is not expected: image