Hi there,
where I have to put color treshold in this code? I’d like to make it more dynamic.
type: custom:apexcharts-card
now:
show: true
label: Nyt
graph_span: 48h
apex_config:
annotations:
position: back
yaxis:
- 'y': 0.1987
strokeDashArray: 0
borderColor: green
borderWidth: 0
chart:
height: 300px
legend:
showForSingleSeries: true
plotOptions:
bar:
borderRadius: 2
yaxis:
decimalsInFloat: 2
tickAmount: 10
forceNiceScale: true
xaxis:
labels:
datetimeFormatter:
hour: HH
all_series_config:
show:
offset_in_name: false
header:
title: ' '
show: true
show_states: true
colorize_states: true
span:
start: day
offset: +0h
series:
- entity: sensor.nordpool_kwh_fi_eur_3_10_024
type: column
color: green
float_precision: 4
stroke_width: 2
name: Tuntihinta
show:
in_header: false
legend_value: false
extremas: true
data_generator: |
return entity.attributes.raw_today.map((start, index) => {
return [new Date(start["start"]).getTime(), entity.attributes.raw_today[index]["value"]];
});
- entity: sensor.nordpool_kwh_fi_eur_3_10_024
type: column
color: yellow
float_precision: 4
stroke_width: 2
name: Hinta huomenna
show:
in_header: false
legend_value: false
extremas: true
data_generator: |
return entity.attributes.raw_tomorrow.map((start, index) => {
return [new Date(start["start"]).getTime(), entity.attributes.raw_tomorrow[index]["value"]];
});
- entity: sensor.nordpool_kwh_fi_eur_3_10_024
name: Tuntihinta nyt
color: green
type: column
show:
in_chart: false
float_precision: 4
- entity: sensor.nordpool_kwh_fi_eur_3_10_024
attribute: average
type: column
color: pink
float_precision: 4
stroke_width: 2
name: Päivän keskihinta tänään
group_by:
duration: 2d
show:
in_chart: false
legend_value: false
- entity: sensor.nordpool_kwh_fi_eur_3_10_024
attribute: max
type: column
color: orange
float_precision: 4
stroke_width: 2
name: Korkein hinta
group_by:
duration: 2d
show:
in_chart: false
legend_value: false
- entity: sensor.nordpool_kwh_fi_eur_3_10_024
attribute: min
type: column
color: green
float_precision: 4
stroke_width: 2
name: Alin hinta tänään
group_by:
duration: 2d
show:
in_chart: false
legend_value: false