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

[Bug] Wrong area fill color when using group_by option #684

Closed HeuristicPerson closed 1 month ago

HeuristicPerson commented 3 months ago

Checklist

Describe the bug When using the group_by option the area is not filled with the proper gradient colors.

Version of the card Version: v2.0.4

To Reproduce This is the configuration I used:

type: custom:apexcharts-card
experimental:
  color_threshold: true
header:
  show: true
  title: Temperature
  show_states: true
  colorize_states: true
graph_span: 7d
yaxis:
  - min: 15
    max: 25
series:
  - entity: sensor.ht_sensor_3_xiaomi_lywsd03mmc_temperature
    type: area
    name: 6h avg
    color_threshold:
      - value: 23
        color: '#ff4b00'
      - value: 0
        color: '#4040ff'
      - value: 18
        color: '#4040ff'
      - value: 19
        color: '#bc8bbc'
      - value: 20
        color: '#ffbf00'
      - value: 21
        color: '#ffbf00'
      - value: 22
        color: '#ff9400'
    fill_raw: last
    group_by:
      duration: 6h
      func: avg
    stroke_width: 3
  - entity: sensor.ht_sensor_3_xiaomi_lywsd03mmc_temperature
    color: '#606060'
    name: instant
    fill_raw: last
    stroke_width: 1
    show:
      extremas: max

Screenshots Wrong colors image

Good colors image

Expected behavior When group_by option is used to time average the results, the gradient colors should adjust to the ones defined.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

github-actions[bot] commented 1 month ago

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.

github-actions[bot] commented 1 month ago

This issue was closed because it has been stalled for 10 days with no activity.