marlar

Apexchart kort for UV Forecast DMI

Apr 27th, 2022 (edited)
710
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.57 KB | None | 0 0
  1. type: custom:apexcharts-card
  2. brush:
  3.   apex_config:
  4.     chart:
  5.       height: 150px
  6.     grid:
  7.       show: false
  8.       position: back
  9.       strokeDashArray: 0.5
  10.       xaxis:
  11.         lines:
  12.           show: true
  13.     xaxis:
  14.       type: datetime
  15.       labels:
  16.         show: true
  17.         rotate: -55
  18.         rotateAlways: true
  19. span:
  20.   start: day
  21.   offset: ''
  22. header:
  23.   title: ''
  24.   show: true
  25.   show_states: true
  26.   colorize_states: true
  27. hours_12: false
  28. stacked: false
  29. experimental:
  30.   color_threshold: true
  31. all_series_config:
  32.   show:
  33.     legend_value: false
  34.     datalabels: false
  35.     extremas: true
  36.     in_brush: true
  37.     in_header: false
  38.     header_color_threshold: true
  39.   float_precision: 1
  40.   invert: false
  41.   fill_raw: 'null'
  42.   curve: straight
  43.   extend_to_end: false  
  44. now:
  45.   show: true
  46.   label: Nu
  47.   color: olive
  48. series:
  49.   - entity: sensor.uv_dmi
  50.     name: Skyfrit
  51.     color_threshold:
  52.       - value: 0
  53.         color: green
  54.       - value: 3
  55.         color: aaff00
  56.       - value: 4
  57.         color: DAA520
  58.       - value: 5
  59.         color: FF0000
  60.     opacity: 0.9
  61.     type: line
  62.     stroke_width: 2
  63.     data_generator: |
  64.      return (entity.attributes.List.map((start, index) => {
  65.         return [new Date(start["Time"]).getTime(), entity.attributes.List[index]["UVclear"]];
  66.       }));
  67.   - entity: sensor.uv_dmi
  68.     opacity: 0.5
  69.     name: Skyet
  70.     color_threshold:
  71.       - value: 0
  72.         color: green
  73.       - value: 3
  74.         color: aaff00
  75.       - value: 4
  76.         color: DAA520
  77.       - value: 5
  78.         color: FF0000
  79.     type: line
  80.     stroke_width: 2
  81.     data_generator: |
  82.      return (entity.attributes.List.map((start, index) => {
  83.         return [new Date(start["Time"]).getTime(), entity.attributes.List[index]["UVcloud"]];
  84.       }));
  85. apex_config:
  86.   tooltip:
  87.     fixed:
  88.       enabled: true
  89.       position: topRight
  90.       offsetY: 10
  91.       offsetX: -15
  92.     followCursor: true
  93.   chart:
  94.     height: 400px
  95.   title:
  96.     text: UV indeks fra DMI
  97.     align: Center
  98.   xaxis:
  99.     type: datetime
  100.     labels:
  101.       show: true
  102.       rotate: -55
  103.       rotateAlways: true
  104.   yaxis:
  105.     opposite: false
  106.     reversed: false
  107.     logarithmic: false
  108.     decimalsInFloat: 1
  109.     labels:
  110.       show: true
  111.     tooltip:
  112.       enabled: true
  113.     crosshairs:
  114.       show: true
  115.   legend:
  116.     show: true
  117.     floating: true
  118.     offsetY: -35
  119.     offsetX: 5
  120.   grid:
  121.     show: true
  122.     xaxis:
  123.       lines:
  124.         show: true
  125.     yaxis:
  126.       lines:
  127.         show: true
  128.     position: back
  129.     strokeDashArray: 0.5
  130.   markers:
  131.     size: 0.1
  132.  
Add Comment
Please, Sign In to add comment