kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
3.05k stars 237 forks source link

Dynamic Legend Colors #817

Closed BlackCatPeanut closed 1 year ago

BlackCatPeanut commented 2 years ago

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:

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.

Epeedelorage commented 2 years ago

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

stale[bot] commented 2 years ago

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!

michapr commented 2 years ago

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

stale[bot] commented 2 years ago

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

stale[bot] commented 1 year ago

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!