mini-graph-card icon indicating copy to clipboard operation
mini-graph-card copied to clipboard

Dynamic Legend Colors

Open BlackCatPeanut opened this issue 2 years ago • 1 comments

I'm plotting the values for pollen for three preiods - today, tomorrow and today +2.

I'm using color_thresholds to colour the line but thought it would be a nice feature to make the legend colours dynamic as by using the color_thresholds negates the meaning of the legend colors.

Here is my current configuration for the graph:

` type: custom:mini-graph-card name: Pollen - Tree hours_to_show: 72 animate: true lower_bound: 0 upper_bound: 5 color_thresholds:

  • value: 0 color: '#16a624'
  • value: 2 color: '#ff7733'
  • value: 4 color: '#cc4400' entities:
  • entity: sensor.pollen_tree name: Today state_adaptive_color: true
  • entity: sensor.pollen_tree attribute: Tomorrow name: Tomorrow state_adaptive_color: true
  • entity: sensor.pollen_tree attribute: Today + 2 name: Today + 2 state_adaptive_color: true `

This is the colored graph:

image

And here is a focus on the Today +2 attribute where you can see the latest point colour is green:

image

I'm guessing this is a new feature request as the nature of a legend colour is to identify the line which it presents. However this is confused due to the Dynamic Line Color. Or it is a misunderstanding on my behalf.

BlackCatPeanut avatar Jul 18 '22 10:07 BlackCatPeanut

Hello, I'm interrested too ! Thx for ur time

Epeedelorage avatar Aug 15 '22 08:08 Epeedelorage

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this is still an active issue, please let us know!

stale[bot] avatar Oct 14 '22 11:10 stale[bot]

Yes, I think this is a good feature - to show the state using the defined colors. Maybe as option. Thanks!

michapr avatar Oct 15 '22 18:10 michapr

Still an active issue, got it! Removing stale label.

stale[bot] avatar Oct 15 '22 18:10 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this is still an active issue, please let us know!

stale[bot] avatar Dec 14 '22 20:12 stale[bot]