ApexCharts cards weekly or monthly

Hi, everybody

I’d like to made a barcharts who groups data weekly or monthly with Apexbarchart Card.
But I didn’t find how to made that

If anyone can help me

I made my first today. :slightly_smiling_face:

            - type: custom:apexcharts-card
              experimental:
                color_threshold: true
              apex_config:
                chart:
                  height: 220
              graph_span: 7d # <- One week
              span:
                end: day
              series:
                - entity: sensor.lk_wurzburg_weekincidence
                  type: column
                  group_by:
                    func: last
                    duration: 1d
                    fill: zero
                  color_threshold:
                  - value: 0
                    color: var(--my-green)
                  - value: 35
                    color: var(--my-yellow)
                  - value: 100
                    color: var(--my-red)

Auswahl_456

A lot of trial and error, but it’s all in the topic and the docs.

I’m sorry but I want to have 1 bar for one Week or one bar for one month, the graph with bar of day is good for me

Did you find a solution?

Hello,
I think I’m close to the result.

type: custom:apexcharts-card
stacked: true
apex_config:
  chart:
    height: 170px
show:
  last_updated: true
  loading: true
graph_span: 4w
span:
  end: isoWeek
header:
  show: true
  title: Temps total de chauffe par semaine
  show_states: true
  colorize_states: true
series:
  - entity: sensor.thermostat_actif
    type: column
    name: Duration
    color: cyan
    opacity: 0.7
    unit: min
    group_by:
      func: max
      duration: 1w
      fill: zero
    show:
      header_color_threshold: true
      extremas: true
      as_duration: hour
yaxis:
  - min: 0
    max: ~168
    decimals: 0
    apex_config:
      tickAmount: 5

apex