Hi all,
I have this chart that displays the breakdown of electricity prices. The sensor.current_spot_electricity_price
shows prices even in the future. The input_number
entities are static values. The other sensors are just calculated values, such as VAT and the total price (red line). I would like the chart to display data for all sensors into the future as well. If I change the types from line
to column
, the data for the future is displayed.
Thanks
type: custom:apexcharts-card
header:
title: Cena elektřiny
show: true
show_states: true
colorize_states: true
apex_config:
chart:
width: 100%
height: 135px
stacked: true
offsetX: 0
yaxis:
tickAmount: 5
grid:
padding:
top: -20
bottom: -15
legend:
show: false
graph_span: 1d
span:
start: day
now:
show: true
label: Nyní
series:
- entity: sensor.current_spot_electricity_price
name: Spot cena
float_precision: 2
type: column
color: mediumseagreen
show:
in_header: raw
data_generator: |
return Object.entries(entity.attributes).map(([date, value], index) => {
return [new Date(date).getTime(), value];
});
- entity: input_number.distribuce
name: Distribuce
float_precision: 2
show:
in_header: false
type: column
color: red
group_by:
func: avg
duration: 1h
- entity: input_number.poze
name: POZE
float_precision: 2
show:
in_header: false
type: column
color: blue
group_by:
func: avg
duration: 1h
- entity: input_number.systemove_sluzby
name: Systémové služby
float_precision: 2
show:
in_header: false
type: column
color: black
group_by:
func: avg
duration: 1h
- entity: input_number.marze_obchodnika
name: Marže
float_precision: 2
show:
in_header: false
type: column
color: yellow
group_by:
func: avg
duration: 1h
- entity: sensor.dph
name: DPH
float_precision: 2
show:
in_header: false
type: column
color: grey
group_by:
func: avg
duration: 1h
- entity: sensor.celkova_cena_elktriny_s_dph
name: Celková cena s DPH
float_precision: 2
type: line
color: red
group_by:
func: avg
duration: 1h
show:
extremas: true