RomRider / apexcharts-card

📈 A Lovelace card to display advanced graphs and charts based on ApexChartsJS for Home Assistant
MIT License
1.08k stars 75 forks source link

Unable to see data from previous month #689

Closed cooltings closed 1 month ago

cooltings commented 3 months ago

Checklist

Describe the bug A clear and concise description of what the bug is.

Using the offset option within span I seem to be unable to go back over month boundaries. I can't see data from 31st of March in April.

Version of the card Version: 2.0.4

To Reproduce This is the configuration I used:

type: custom:apexcharts-card
stacked: true
span:
  end: day
  offset: '-10days'
header:
  show: true
  title: ApexCharts-Card
  show_states: true
  colorize_states: true
series:
  - entity: sensor.vue_2_0_123_1min
    type: column
    group_by:
      func: avg
      duration: 120min
    color: lightblue

Screenshots If applicable, add screenshots to help explain your problem. Can't go to 31st March despite it being viewable in history integration:

Expected behavior A clear and concise description of what you expected to happen.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

georgepauna commented 1 month ago

Take a look at "statistics" in the documentation. Entries older than few weeks are only available as statistics. https://github.com/RomRider/apexcharts-card?tab=readme-ov-file#statistics-options