kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.99k stars 233 forks source link

[FR] Display curves with positive trend with "color_1", with negative trend - with "color_2" #1025

Open cataseven opened 11 months ago

cataseven commented 11 months ago

Hi,

Great work first of all. Thanks.

What I want to do is, colorize line between dots according to previous value. For example, value is changed from 2 to 2.1 then the line between these two dots will be green. Then if the value drop again for example to 1.8 then the line between 2.1 and 1.8 is red.

Best,

ildar170975 commented 11 months ago

Have you tried using a color_thresholds option?

cataseven commented 11 months ago

as far as i know, color_thresholds is used to color line according to fixed numbers, isn't it? For example above 20 or below 17 or between 10-15.

However I want to colorize between two dots by comparing their values. If the previous one ise above next one then the line between these two dots will be red, but If the previous one ise below next one then the line between these two dots will be another color

ildar170975 commented 11 months ago

In short: every positive change = color_1 negative = color_2 ? изображение

cataseven commented 11 months ago

In short: every positive change = color_1 negative = color_2 ? изображение

Yes :)

wernerhp commented 10 months ago

Yes, would be great. Great for tracking price movement.