Hello, I need help.
I want to display a chart using the Apexcharts card, which works well so far. However, I would now like to have the values directly displayed as text on the bars, so I need “dataLabels,” as far as I understand. The problem is that I’ve written the code, and the values still aren’t displayed. I only see the values when I hover the mouse over the bar.
I hope someone here can help me with my code.
type: custom:apexcharts-card
card_mod:
style: |
ha-card {
background-color: #0462b0;
}
apex_config:
dataLabels:
enabled: true
chart:
height: 500px
typ: column
yaxis:
labels:
formatter: |
EVAL: (val) => `${val} kWh`
header:
show_states: true
colorize_states: true
title: PV-Ertrag Tag
show: true
graph_span: 7d
span:
start: day
offset: "-6d"
series:
- entity: sensor.hostname_scb_4bed33_energy_yield_day
name: Tagesertrag
type: column
color: "#e69807"
group_by:
duration: 1d
func: max