Advertisement
-Miura-

Rainfall monthly

Oct 9th, 2024
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.92 KB | None | 0 0
  1. type: custom:apexcharts-card
  2. graph_span: 12month
  3. span:
  4.   offset: +31d
  5. header:
  6.   show: true
  7.   show_states: true
  8. apex_config:
  9.   chart:
  10.     height: 175px
  11.   xaxis:
  12.     tickAmount: 11
  13.     tickPlacement: between
  14.     type: category
  15.     labels:
  16.       rotateAlways: true
  17.       formatter: |
  18.        EVAL:function(value) {
  19.           month = new Date(value).toLocaleDateString("nl-NL", { month: 'long' }).substr(0,3);      
  20.           return month.charAt(0).toUpperCase() + month.slice(1);
  21.         }
  22. yaxis:
  23.   - apex_config:
  24.       forceNiceScale: true
  25.       stepSize: 25
  26.     min: 0
  27.     decimals: 0
  28. all_series_config:
  29.   type: column
  30.   statistics:
  31.     type: sum
  32.     period: month
  33.     align: end
  34.   group_by:
  35.     func: diff
  36.     duration: 31d
  37.     fill: last
  38.     start_with_last: true
  39.   show:
  40.     datalabels: true
  41.   float_precision: 0
  42. series:
  43.   - entity: sensor.rainfall_today
  44.     name: This month
  45.     color: 488fc2
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement