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

Wrong color in header value when using header_color_threshold and radialBar #683

Closed regystro closed 1 week ago

regystro commented 3 months ago

Describe the bug The header value is using gradient when chart_type: radialBar, and should use absolute color, to match the radialBar

Version of the card Version: v2.0.4

To Reproduce

type: custom:apexcharts-card
experimental:
  color_threshold: true
header:
  show: true
  show_states: true
  colorize_states: true
chart_type: radialBar
series:
  - entity: sensor.memory_use_percent
all_series_config:
  show:
    header_color_threshold: true
  color_threshold:
    - value: 66
      color: green
    - value: 69
      color: red

Screenshots image

Expected behavior The header value 68.6% should be rendered green, with absolute threshold value color instead of the reddish coming from applying the linear gradient green -> red of the defined color_threshold

brynyneuadd commented 2 months ago

Yes, I've encountered the same bug - color thresholds don't appear to work with radialbar charts at the moment

github-actions[bot] commented 2 weeks 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.

regystro commented 2 weeks ago

Still an issue.

RomRider commented 1 week ago

If you want a "hard grandiant transition", the way to do it is by repeating the entry:

  color_threshold:
    - value: 66
      color: green
    - value: 69
      color: green
    - value: 69
      color: red
regystro commented 1 week ago

Workaround seems to work. Thanks, @RomRider