RomRider / apexcharts-card

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

Stacked graph incomplete + hover incorrect #584

Closed JohannCR closed 10 months ago

JohannCR commented 1 year ago

Checklist

Describe the bug Using stacked graph, one entity is missing in the graph while present in the legend + when I hover on the legend, some entities show the wrong area in the graph

Version of the card Version: 2.0.4

To Reproduce This is the configuration I used:

type: custom:apexcharts-card
header:
  show: true
  title: Conso cumulée (max) 24h (BUG sur "Autres")
graph_span: 1d
stacked: true
all_series_config:
  stroke_width: 1.2
  group_by:
    duration: 10min
    func: max
  show:
    legend_value: false
update_interval: 10min
series:
  - entity: sensor.poste_grand_bureau_power
    name: Grand Bureau
    color: yellow
    type: area
    opacity: 0.8
  - entity: sensor.star_power
    name: Etoile
    color: darkorange
    type: area
    opacity: 0.8
  - entity: sensor.poste_power
    name: Petit Bureau
    color: red
    type: area
    opacity: 0.8
  - entity: sensor.alim_chaudiere_power
    name: Chaudière
    color: green
    type: area
    opacity: 0.8
  - entity: sensor.smart_plug_power
    name: Smart plug
    color: black
    type: area
    opacity: 0.8
  - entity: sensor.victron_vebus_out_l1_power_227
    name: Domo
    color: cornflowerblue
    type: area
    opacity: 0.8
  - entity: sensor.alim_clim_power
    name: Clim
    color: violet
    type: area
    opacity: 0.8
  - entity: sensor.prise_lave_linge_power
    name: Lave-Linge
    color: darkblue
    type: area
    opacity: 0.8
  - entity: sensor.unknown_power
    name: Autres
    color: grey
    type: area
    opacity: 0.2
apex_config:
  chart:
    height: 500px
  yaxis:
    tickAmount: 6
    decimalsInFloat: 0
    labels:
      style:
        colors: grey
    title:
      text: W
      style:
        color: grey
  xaxis:
    type: datetime
    labels:
      style:
        colors: grey
  legend:
    labels:
      colors: grey

Screenshots

image On the left, non-stacked graph using custom defined cumulative sensors + grey one is total value On the right, stacked graph using original sensors + grey one ("Autres") is difference between total and all other sensors. Its area does not appear (sensor is available and has a value).

Sometimes I even get a completely wrong graph (no change in config) : image Lots of peaks are duplicated (!)

Also when I hover on some sensors in the legend (here for example "Lave-linge") I get a completely wrong overlay : image While for some sensors the overlay does look right.

Expected behavior Stacked graph values should not be missing, and the areas and overlays should be correct

Desktop (please complete the following information):

Additional context Maybe I'm using wrong parameters for the group_by ?

github-actions[bot] commented 1 year 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.

JohannCR commented 1 year ago

Am I the only one seeing this ?

github-actions[bot] commented 10 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.

github-actions[bot] commented 10 months ago

This issue was closed because it has been stalled for 10 days with no activity.