RomRider / apexcharts-card

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

brush experimental selection_span does not work #764

Open argoon38 opened 3 weeks ago

argoon38 commented 3 weeks ago

Checklist

Describe the bug The selection_span does not working when the lovelace is loaded. It is impossible to select any range. Surprisingly, it works if the lovelace is loaded before the graph is shown. It is a workaround : I encapsulated the graph inside a conditional card and the graph is not shown initially. Then it is correct when he condition becomes true.

To Reproduce This is the configuration I used:

type: custom:apexcharts-card
header:
  show: true
  title: Précipitations (heure)
  show_states: false
series:
  - entity: sensor.pluviometre_precipitation
    type: column
    group_by:
      func: diff
      duration: 1h
      fill: zero
    show:
      in_brush: true
span:
  end: hour
experimental:
  brush: true
brush:
  selection_span: 1day
graph_span: 7day
apex_config:
  plotOptions:
    bar:
      columnWidth: 95%
update_interval: 5s

Screenshots If the graph is visible when page loads :

Capture d’écran 2024-08-26 à 22 09 31

Instead of:

Capture d’écran 2024-08-26 à 22 09 54

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

Desktop (please complete the following information):

wuppiwuppi commented 1 week ago

I can confirm this: windows - chrome android-app