I am really struggling with getting my charts to format properly. I created my energy dashboard middle of last month and have stacked columns per day and month showning production/consumption.
At the time I created them they looked perfectly fine. However, since the new month/year has started, the formatting has gone crazy. This monthly chart showing usage per day is compressed in the center of the chart, and the yearly chart showing usage per month has dome the opposite!
Screenshots and yaml code included below. Thanks for any help!
Monthly chart:
type: custom:apexcharts-card
section_mode: true
grid_options:
rows: 5
header:
show: true
title: Generation & Usage History This Month
standard_format: false
floating: false
apex_config:
chart:
foreColor: rgb(117, 117, 117)
xaxis:
type: datetime
labels:
format: d
tooltip:
shared: true
intersect: false
x:
format: dd MMM
graph_span: 31days
span:
start: month
stacked: true
series:
- entity: sensor.totalactiveproduction_2508050261
type: column
name: PV
color: var(--energy-solar-color)
opacity: 0.6
float_precision: 2
yaxis_id: kWh
unit: kWh
group_by:
func: diff
duration: 1d
show:
legend_value: false
- entity: sensor.monthly_consumption_61698689
type: column
name: Consumption
color: var(--energy-non-fossil-color)
opacity: 0.6
float_precision: 2
yaxis_id: kWh
unit: kWh
group_by:
func: diff
duration: 1d
show:
legend_value: false
transform: return x * -1
- entity: sensor.monthly_grid_export_61698689
type: column
name: Export
color: var(--energy-grid-return-color)
opacity: 0.6
float_precision: 2
yaxis_id: kWh
unit: kWh
group_by:
func: diff
duration: 1d
show:
legend_value: false
transform: return x * -1
- entity: sensor.monthly_grid_import_61698689
type: column
name: Import
color: var(--energy-grid-consumption-color)
opacity: 0.6
float_precision: 2
yaxis_id: kWh
unit: kWh
group_by:
func: diff
duration: 1d
show:
legend_value: false
- entity: sensor.monthly_battery_charge_61698689
type: column
name: Charge
color: var(--energy-battery-in-color)
opacity: 0.6
float_precision: 2
yaxis_id: kWh
unit: kWh
group_by:
func: diff
duration: 1d
show:
legend_value: false
transform: return x * -1
- entity: sensor.monthly_battery_discharge_61698689
type: column
name: Discharge
color: var(--energy-battery-out-color)
opacity: 0.6
float_precision: 2
yaxis_id: kWh
unit: kWh
group_by:
func: diff
duration: 1d
show:
legend_value: false
Yearly chart:
type: custom:apexcharts-card
section_mode: true
grid_options:
rows: 5
header:
show: true
title: Generation & Usage History This Year
standard_format: false
floating: false
apex_config:
chart:
foreColor: rgb(117, 117, 117)
xaxis:
type: datetime
labels:
format: M
tooltip:
shared: true
intersect: false
x:
format: MMMM
graph_span: 1year
span:
start: year
stacked: true
series:
- entity: sensor.totalactiveproduction_2508050261
type: column
name: PV
color: var(--energy-solar-color)
opacity: 0.6
float_precision: 2
yaxis_id: kWh
unit: kWh
group_by:
func: diff
duration: 1month
show:
legend_value: false
- entity: sensor.totalconsumption_2508050261
type: column
name: Consumption
color: var(--energy-non-fossil-color)
opacity: 0.6
float_precision: 2
yaxis_id: kWh
unit: kWh
group_by:
func: diff
duration: 1month
show:
legend_value: false
transform: return x * -1
- entity: sensor.totalenergysell_2508050261
type: column
name: Export
color: var(--energy-grid-return-color)
opacity: 0.6
float_precision: 2
yaxis_id: kWh
unit: kWh
group_by:
func: diff
duration: 1month
show:
legend_value: false
transform: return x * -1
- entity: sensor.totalenergybuy_2508050261
type: column
name: Import
color: var(--energy-grid-consumption-color)
opacity: 0.6
float_precision: 2
yaxis_id: kWh
unit: kWh
group_by:
func: diff
duration: 1month
show:
legend_value: false
- entity: sensor.totalchargeenergy_2508050261
type: column
name: Charge
color: var(--energy-battery-in-color)
opacity: 0.6
float_precision: 2
yaxis_id: kWh
unit: kWh
group_by:
func: diff
duration: 1month
show:
legend_value: false
transform: return x * -1
- entity: sensor.totaldischargeenergy_2508050261
type: column
name: Discharge
color: var(--energy-battery-out-color)
opacity: 0.6
float_precision: 2
yaxis_id: kWh
unit: kWh
group_by:
func: diff
duration: 1month
show:
legend_value: false

