apexcharts-card: Stacked line charts broken in 2.1.2
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
option stacked: true does not work anymore in 2.1.2, it’s OK in 2.0.4
Version of the card Version: 2.1.2
To Reproduce This is the configuration I used:
type: custom:apexcharts-card
experimental:
color_threshold: true
graph_span: 10d
show:
last_updated: true
stacked: true
header:
standard_format: false
show: true
show_states: true
colorize_states: true
title: test apex graph
all_series_config:
stroke_width: 1
type: area
curve: stepline
opacity: 1
statistics:
type: mean
series:
- entity: sensor.hass_db_states
- entity: sensor.hass_db_attributes
- entity: sensor.hass_db_events
- entity: sensor.hass_db_statistics
- entity: sensor.hass_db_size
type: line
stroke_width: 2
yaxis:
- min: 0
max: 1500
Screenshots
Version 2.0.4 is OK:
Version 2.1.2 is wrong:
Expected behavior Graph should be stacked also in 2.1.2
Desktop (please complete the following information):
- Browser [e.g. chrome, safari] Any
- Version [e.g. 22] ANy
Smartphone (please complete the following information):
- Device: [e.g. iPhone6] Any
- OS: [e.g. iOS8.1] Any
- Browser [e.g. stock browser, safari] Any
- Version [e.g. 22] Any
Additional context
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 9
- Comments: 28 (1 by maintainers)
Same for
type: columnchart:Removing the yaxis block works as a workaround… but this is not a viable solution in the end
Same here!
I found that a workaround that works for me with
yaxispresent is to addstack_groups to all series that should be stacked. (With noyaxis, nostack_groups needed either.) https://github.com/RomRider/apexcharts-card/issues/827Tried this on multiple different rows with no difference unfortunately.
I do have 2.0.4 now:
As I replied in https://github.com/RomRider/apexcharts-card/issues/728#issuecomment-2222610262, it works in a newer version when you delete the y-axis block in yaml but this workaround is not possible to use every time. At least rolling back to 2.0.4 worked for me well.
Same issue here
2.0.4
2.1.0 and 2.1.2
Code
Until I fix it in the code, you can fix it with: