RomRider/apexcharts-card

X-axis values duplicated for monthly bar chart when using format: MMM

Opened this issue · 3 comments

Checklist

  • I updated the card to the latest version available
  • I cleared the cache of my browser
  • I verified that I'm really running the lastest version in my browser console
  • I checked if there is another issue opened with the same problem

Describe the bug
The X-axis values on the chart are duplicated for a monthly bar chart when I am using the "format: MMM". If I don't use this format MMM then the ticks are not aligned with the bars so I want to use this.

Version of the card
Version: 2.1.2

To Reproduce
This is the configuration I used:

  - type: custom:apexcharts-card
    apex_config:
      chart:
        height: 205px
      tooltip:
        enabled: false
      xaxis:
        labels:
          format: MMM
    header:
      show: true
      title: Water usage monthly (m³)
    card_mod:
      style: |
        ha-card {
        margin-top: -0px;
        margin-bottom: -10px
        }
    graph_span: 6month
    span:
      start: month
      offset: '-5month'
    series:
      - entity: sensor.utility_water_monthly
        fill_raw: last
        type: column
        float_precision: 0
        unit: 
        group_by:
          func: max
          duration: 1month
        show:
          datalabels: true
    yaxis:
      - min: 0
        max: ~20
        decimals: 0
        apex_config:
          tickAmount: 4

Screenshots

Expected behavior
Using format: MMM on the x-axis the values should not be duplicated and display only once per month.

Desktop (please complete the following information):

  • Browser Firefox
  • Version 130.0

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

not stale

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.