Untitled

 avatar
unknown
plain_text
3 years ago
2.4 kB
1
Indexable
          - type: custom:apexcharts-card
            layout: minimal
            graph_span: 1h
            locale: se
            show:
              loading: false
            apex_config:
              chart:
                fontFamily: Roboto
                height: 135px
                offsetY: -20px
              grid:
                padding:
                  top: -20
              tooltip:
                style:
                  fontSize: 14px
                x:
                  show: true
                  format: dddd HH:mm
              xaxis:
                crosshairs:
                  show: false
              legend:
                fontSize: 14px
                fontWeight: 400
                itemMargin:
                  horizontal: 25
                formatter: |
                  EVAL:(seriesName, opts) => {
                    var arr = opts.w.globals.series[opts.seriesIndex],
                      value = arr[arr.length - 1],
                      convert = (value / 1024).toFixed(2);
                    if (value == null) {
                      return seriesName;
                    } else {
                      return value < 1024 ? `${Math.round(value)} kB/s` : `${convert} MB/s`;
                    }
                  }
                markers:
                  width: 26
                  height: 23
                  customHTML:
                    - 'EVAL:() => {return `<ha-icon icon="mdi:arrow-down-bold" style="--mdc-icon-size: 23px;"></ha-icon>`}'
                    - 'EVAL:() => {return `<ha-icon icon="mdi:arrow-up-bold" style="--mdc-icon-size: 23px;"></ha-icon>`}'
                  fillColors:
                    - none
                    - none
              fill:
                type: gradient
                gradient:
                  type: vertical
                  opacityFrom: 0.8
                  opacityTo: 0
                  stops:
                    - 0
                    - 99
                    - 100
              stroke:
                width: 3
            all_series_config:
              type: area
              fill_raw: last
            series:
              - entity: sensor.energy_total_next_bill_cost
                name: Bill Cost
                color: green
              - entity: sensor.energy_total_today_cost
                name: Bill Today
                color: '#385581'