APEX CHARTS Hourly Rain Fall Graph (24 Hours)
Some Important Settings:
# For the "Rain Now" (VISIBLE IN CHART)(Using the Rain Per Hour sensor)
graph_span: 24h # 24 hour graph span
span:
end: hour # Span ends at the end of the hour
group_by:
func: raw # Raw data
duration: 1d # 1 Day Data
fill: zero
statistics: # Grabs Long Term Statistics
type: state
period: hour # Grabs 1 hour at a time
align: end
show:
name_in_header: true # shows name in header
datalabels: true # makes data labels visible above bars
in_chart: true # makes bars visible in chart
legend_value: false # hides from legend
extremas: false # hides extremas
# For the "Rain Today" (ONLY VISIBLE IN HEADER)(Using the Rain per Hour Sensor sensor)
group_by:
func: sum # Sum
duration: 24h # 24 Hours duration
fill: zero
statistics: # Long Term Statistics
type: state
period: hour # Grabs 1 hour at a time
align: end # align at end
show:
name_in_header: true # Show only Total in Header
datalabels: false # Do not show data labels above graph
in_chart: false # Do not show bars in graph
legend_value: false # Do not show in legend
COMPLETE HOURLY RAINFALL (24 HOURS) GRAPH
- type: vertical-stack
cards:
- type: custom:apexcharts-card
graph_span: 24h
span:
end: hour
header:
show: true
show_states: true
apex_config:
fill:
type: gradient
gradient:
type: vertical
shadeIntensity: 0
opacityFrom: 1
opacityTo: 0.5
stops: 10
chart:
height: 150px
grid:
show: false
borderColor: darkslateblue
strokeDashArray: 2
dataLabels:
background:
borderWidth: 0
opacity: 0
foreColor: white
offsetY: -10
plotOptions:
bar:
borderRadius: 0
dataLabels:
position: top
series:
- entity: sensor.netatmo_devonport_tas_indoor_rain_rain_last_hour
name: Rain Last Hour
color: deepskyblue
type: column
group_by:
func: raw
duration: 1d
fill: zero
statistics:
type: state
period: hour
align: end
show:
name_in_header: true
datalabels: true
in_chart: true
legend_value: false
extremas: false
- entity: sensor.netatmo_devonport_tas_indoor_rain_rain_last_hour
name: Rain Last 24 Hours
color: deepskyblue
type: column
group_by:
func: sum
duration: 24h
fill: zero
statistics:
type: state
period: hour
align: end
show:
name_in_header: true
datalabels: false
in_chart: false
legend_value: false