Hello,
I can’t figure out how to get ‘stack_group’ to work group my stacked columns in Apex Charts. I’m trying to show one set of stacked columns showing a stack of each circuit’s hourly energy consumption, and next to that a column showing power generation. Here’s an example of how I am hoping to format my graph:
But instead no matter what I try, I’m only getting all of the sensors stacked into the same single column, like this (ignore the units - this is dummy data):
Here’s the code for the graph above:
type: custom:apexcharts-card
apex_config:
chart:
stacked: true
all_series_config:
type: column
unit: Wh
group_by:
func: max
duration: 1h
graph_span: 12h
span:
end: day
series:
- entity: sensor.hourly_circuit1
name: circuit1
stack_group: 'consumption'
- entity: sensor.hourly_circuit2
name: circuit2
stack_group: 'consumption'
- entity: sensor.hourly_energysource1
name: energysource1
stack_group: 'generation'
- entity: sensor.hourly_energysource1
name: energysource2
stack_group: 'generation'
Thank you for any guidance!

