-
Right now the header just shows the values of the last bar. Is it possible to show an aggregate? I would like to show the sum of the current day: Config: type: custom:apexcharts-card
update_interval: 15min
header:
show: true
show_states: true
colorize_states: true
title: Telraam
graph_span: 3d
span:
end: day
hours_12: false
stacked: true
all_series_config:
stroke_width: 2
type: column
extend_to: now
float_precision: 2
series:
- entity: sensor.telraam_pedestrian
name: Pedestrians
yaxis_id: count
color: '#85BB65'
group_by:
func: max
duration: 30min
- entity: sensor.telraam_bike
name: Bikes
yaxis_id: count
color: '#5D7EA7'
group_by:
func: max
duration: 30min
- entity: sensor.telraam_cars
name: Cars
yaxis_id: count
color: '#f7a76a'
group_by:
func: max
duration: 30min
- entity: sensor.telraam_heavy
name: Trucks
yaxis_id: count
color: '#f76a6b'
group_by:
func: max
duration: 30min
apex_config:
yaxis:
- id: count
seriesName: ''
decimalsInFloat: 2
tooltip:
x:
format: ddd dd MMM - HH:mm
xaxis:
tooltip:
enabled: false
legend:
show: false
grid:
borderColor: rgba(123, 123, 123, 0.2)
chart:
foreColor: '#7B7B7B'
toolbar:
show: false |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Interested in the ability to view sum in header as well. Thanks. |
Beta Was this translation helpful? Give feedback.
-
+1 |
Beta Was this translation helpful? Give feedback.
-
Same problem, different values of interest. I'm having a bar chart with daily PM10 and PM2.5 values and I'd like to show also the sum of those values in my header... Haven't found any solutions... Thanks for any help! |
Beta Was this translation helpful? Give feedback.
-
Calculating a sum in the header is not possible, as far as I know. But you can can use Utility Meters in HA: https://www.home-assistant.io/integrations/utility_meter/ I use this approach for energy sensors. I have defined 3 utility meters: One which is counting the the energy on a daily basis (resets itself every day) and a second one on weekly basis (resets itself every week). Then I display the daily meter as a graph but not in the header. The weekly header I also add to the chart, but here I hide the graph and just show them in the header. Here an example:
I'm pretty sure the approach should also work for your sensors. Credit to the person who came up with the approach to display the prices as graph for the Tibber integration in HASS. Unfortunately, I don't have the original link anymore :( |
Beta Was this translation helpful? Give feedback.
Calculating a sum in the header is not possible, as far as I know. But you can can use Utility Meters in HA: https://www.home-assistant.io/integrations/utility_meter/
I use this approach for energy sensors. I have defined 3 utility meters: One which is counting the the energy on a daily basis (resets itself every day) and a second one on weekly basis (resets itself every week).
Then I display the daily meter as a graph but not in the header. The weekly header I also add to the chart, but here I hide the graph and just show them in the header.
Because both are defined as series, they will have a different color. So, I also define the same color for both.
Here an example: