I have this chart:
And the new day prints the date in the chart, is there any way I can remove this so that I only get the hours?
I already have
xaxis:
labels:
datetimeFormatter:
hour: HH
which does give me the hours in two digits instead of hh:mm but it does not seem to do the trick with the date
type: custom:config-template-card
variables:
span: states['sensor.getgraphspan'].state
tomorrowData: states['sensor.nordpool_kwh_se4_sek_3_10_025'].attributes.raw_tomorrow
offset: states['sensor.offset'].state
entities:
- sensor.nordpool_kwh_se4_sek_3_10_025
card:
header:
title: ""
show: true
show_states: true
colorize_states: true
apex_config:
yaxis:
labels:
style:
colors: black
fontSize: 20px
fontWeight: bold
xaxis:
labels:
datetimeFormatter:
hour: HH
style:
colors: black
fontSize: 16px
fontWeight: bold
type: custom:apexcharts-card
graph_span: ${span}
experimental:
color_threshold: true
span:
start: day
offset: ${offset}
now:
show: true
color: black
label: Nu
series:
- entity: sensor.nordpool_kwh_se4_sek_3_10_025
type: column
name: Prices
float_precision: 2
show:
in_header: false
color_threshold:
- value: 0
color: black
opacity: 1
- value: 0.5
color: pink
- value: 1
color: red
data_generator: |
const todayData = entity.attributes.raw_today;
const tomorrowData = entity.attributes.raw_tomorrow || [];
const combinedData = [...todayData, ...tomorrowData];
return combinedData.map((item) => {
const date = new Date(item.start.slice(0, -6));
return {
x: date.getTime(),
y: item.value,
};
});
- entity: sensor.nordpool_kwh_se4_sek_3_10_025
name: " "
yaxis_id: SEK
float_precision: 2
show:
in_header: true
in_chart: false
unit: Kr
color: black
- entity: sensor.nordpool_kwh_se4_sek_3_10_025
attribute: average
name: " "
yaxis_id: SEK
float_precision: 2
show:
in_header: true
in_chart: false
unit: Kr
color: black
- entity: sensor.nordpool_kwh_se4_sek_3_10_025
attribute: max
name: " "
yaxis_id: SEK
float_precision: 2
show:
in_header: true
in_chart: false
unit: Kr
color: black
- entity: sensor.nordpool_kwh_se4_sek_3_10_025
attribute: min
name: " "
yaxis_id: SEK
float_precision: 2
show:
in_header: true
in_chart: false
unit: Kr
color: black
style: |
ha-card {
border: 0px solid green;
box-shadow: none;
font-size: 21px;
font-weight: bold;
color: rgb(0,0,0);
height: 400px;
}
