# How to change line chart, line color depending on input values?

**URL:** https://discourse.nodered.org/t/how-to-change-line-chart-line-color-depending-on-input-values/7639
**Category:** Dashboard
**Created:** [5 February 2019 23:21 UTC](https://discourse.nodered.org/t/how-to-change-line-chart-line-color-depending-on-input-values/7639 "2019-02-05T23:21:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ggarate](https://avatars.discourse-cdn.com/v4/letter/g/f08c70/32.png) [@ggarate](https://discourse.nodered.org/u/ggarate)
#### Post date: [5 February 2019 23:21 UTC](https://discourse.nodered.org/t/how-to-change-line-chart-line-color-depending-on-input-values/7639/1 "2019-02-05T23:21:44Z")

</div>

I'd like to be able to programatically change the line color of a line chart if it exceeded a threshold limit. See attached image. In this case I'd like the yellow line to change to green if within the limits. Please help 😥

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/5f9138595d7f4c3b94970c76584063c021f3c83e.png)

Many thanks,

Guillermo.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [6 February 2019 16:49 UTC](https://discourse.nodered.org/t/how-to-change-line-chart-line-color-depending-on-input-values/7639/2 "2019-02-06T16:49:18Z")

</div>

I'm not aware of any simple way to do this.

---

<div class="post-metadata">

### Author: ![gaofei207](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gaofei207/32/13047_2.png) [@gaofei207](https://discourse.nodered.org/u/gaofei207)
#### Post date: [16 October 2019 03:37 UTC](https://discourse.nodered.org/t/how-to-change-line-chart-line-color-depending-on-input-values/7639/3 "2019-10-16T03:37:29Z")

</div>

Hi,Have you find a solution? Has a same question with you.

---

<div class="post-metadata">

### Author: ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)
#### Post date: [16 October 2019 03:53 UTC](https://discourse.nodered.org/t/how-to-change-line-chart-line-color-depending-on-input-values/7639/4 "2019-10-16T03:53:46Z")

</div>

[https://flows.nodered.org/flow/ea40616a1042f96c3018542a44735c90](https://flows.nodered.org/flow/ea40616a1042f96c3018542a44735c90)  
[https://flows.nodered.org/flow/a78ac10821112eb07fb8be8957a9f7cb](https://flows.nodered.org/flow/a78ac10821112eb07fb8be8957a9f7cb)  
Choose the one you find more suitable for your application
