apexcharts-card
apexcharts-card copied to clipboard
Not able to retrieve statistics data
Checklist
- [X] I updated the card to the latest version available
- [X] I cleared the cache of my browser
- [X] I verified that I'm really running the lastest version in my browser console
- [X] I checked if there is another issue opened with the same problem
Describe the bug
There is an entity sensor.consumo_energia_diario_kwh
. It contains long term statistics for August 11 and 12 and historic data from August 13 onwards.
For the code below, graph is generated correctly but without LTS data:
type: custom:apexcharts-card
graph_span: 15d
span:
end: day
apex_config:
chart:
height: 150px
experimental:
color_threshold: true
show:
last_updated: false
header:
show: true
show_states: true
colorize_states: true
title: Consumo Diário de Energia
yaxis:
- min: 0
max: auto
decimals: 2
apex_config:
tickAmount: 5
title:
text: kWh
series:
- entity: sensor.consumo_energia_diario_kwh
group_by:
func: max
duration: 1d
show:
header_color_threshold: true
extremas: false
datalabels: false
color: '#3170EE'
type: column
float_precision: 2
name: Consumo por mês
When I add to the code statistics
parameter, graph gets stuck in "loading" and is not generated:
series:
- entity: sensor.consumo_energia_diario_kwh
statistics:
type: max
period: day
group_by:
func: max
duration: 1d
show:
header_color_threshold: true
extremas: false
datalabels: false
color: '#3170EE'
type: column
float_precision: 2
name: Consumo por mês
Version of the card Version: v2.1.2
To Reproduce Configuration posted above.
Screenshots Screenshots posted above.
Expected behavior It was supposed to graph be generated with LTS and historical statistics.
Desktop (please complete the following information):
- Chrome
- 125.0.6422.113 - 64 bits