ApexCharts card - A highly customizable graph card

Check the system monitor package on my github. It also uses a dockermon addon or you could use glances…

Could you add fill: 'null' to the group_by ? The default being fill: last it will fill the data for any missing value, including value from the future. I believe this should fix the issue, but I will make sure that we’re no filling data in the future with group_by.

PS: The default HA graph will never show data from the future

This is now fixed in this commit and the 1.4.0 release

:tada::tada: New Release :tada::tada:

1.4.0 (2021-02-02)

Features

  • series: Show/Hide a specific serie from the header or the graph (#36) (95c0433)
  • Support for auto-entities (060e4c0)
  • editor: Preview in the GUI card selector (d4cd7a3)
  • graph: New chart types scatter, donut, pie and radialBar (#24) (a0e4f85)
  • group_by: Add new diff function (57fd6a6)
  • series: Retrieve an attribute of your entity instead of the state (#32) (b76bf16), closes #29

Bug Fixes

  • group_by was extending values into the future (2cb79d2)
  • Graph stopped updating following ddf6ca9 (bc54729)
  • Sometimes card would stay in warning mode (ddf6ca9)
  • Tooltip should not be in a fixed position (1762049)
  • func: Filter null values in diff (cfe736c)
  • header: Hide unit when as_duration is used (5686931)
  • header: State was sometimes multi-line (4187104)

Documentation

  • Add an example to change the line thickness (fd4a495)
  • Add more example (ffaa5df)
  • Fix error data_generator example (6d1c7a0), closes #34
  • Fix some typos (3df6aed)
  • Missing title documentation in the header section (ff7f35b)
1 Like

OK some weirdness I noticed yesterday. Just installed latest beta of HA and it’s zeroed out (most) all of my graphs:
image

The entities are in recorder and I can see states graphed for the entity eg:
image
It was fully populated before the update

Interestingly all my other ones are OK and this one is a bunch of template sensors I use…

What does your card config look like for those?

          - type: custom:apexcharts-card
            graph_span: 24h
            header: 
              show: true
              title: Fuel Prices Sydney
            apex_config:
              responsive:
                - breakpoint: 765
                  options:
                    chart:
                      height: 500px
                - breakpoint: 1025
                  options:
                    chart:
                      height: 400px
                - breakpoint: 10000
                  options:
                    chart:
                      height: auto
              stroke:
                width: 3
                curve: stepline
              chart:
                zoom:
                  enabled: true
                toolbar:
                  show: true
                  tools:
                    zoom: true
                    zoomin: true
                    zoomout: true
                    pan: true
                    reset: true
              plotOptions:
                bar:
                  columnWidth: '50%'
              legend:
                showForSingleSeries: true
            series:
              - entity: sensor.syd17310
              - entity: sensor.syd18253
              - entity: sensor.syd18424
              - entity: sensor.syd2436
              - entity: sensor.syd643
              - entity: sensor.syd663

For the entities not showing up, has the price changed in the last 24h?

no changes in price for the others

Alright, I’ll fix that :+1:

1 Like

By looking closely, I can see that they are showing up but as points at the very end of the chart.

yes and they will become lines over next 24hr. (until I restart) It doesn’t seem to be reading the history

What happens with cache: false?

here?

type: 'custom:apexcharts-card'
graph_span: 24h
header:
  show: true
  title: Fuel Prices Central Coast
cache: false
apex_config:

no change.

Are you running 1.4.0 now (does it show in the console)?. I can’t seem to reproduce

Also did you restart home assistant at some point between around 4pm and 10am?

updated to latest beta today around then (10AM)
I am running 1.4.0
console:

also as I said… these are all template sensors… None of my other ones seem to be doing this

That would explain the result. While you reboot HA, it generated ‘unavailable’ states for those sensors (only the template ones as the other ones retrieve the last known state from history, not the template one). Those counts as null in the chart, and null = no line between the last state and null. The start of the line is around 10am on your graph which matches this theory.

I think HA displays the line between the last state and the last null, and then starts the line again on the next non-null value. It seems different for apexcharts which doensn’t extend the line until the null value. I don’t think there’s much I can do there appart from adding an option to fill the null with values

but the regular history shows no gap

Edited the previous response with an explanation

This is most likely correct.

maybe… can we try that?