# Easy chart backgroud color change dynamically

**URL:** <https://forum.inductiveautomation.com/t/easy-chart-backgroud-color-change-dynamically/74054>\
**Category:** Ignition\
**Tags:** ignition81, vision, scripting\
**Created:** [May 23, 2023, 6:43am UTC](https://forum.inductiveautomation.com/t/easy-chart-backgroud-color-change-dynamically/74054 "2023-05-23T06:43:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ARIFRAHUMAN\_A](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@ARIFRAHUMAN\_A](https://forum.inductiveautomation.com/u/ARIFRAHUMAN_A)\
**Post date:** [May 23, 2023, 6:43am UTC](https://forum.inductiveautomation.com/t/easy-chart-backgroud-color-change-dynamically/74054/1 "2023-05-23T06:43:19Z")

</div>

I have an easy chart that shows different background color for different values as plots,  
If the value is changed, the back ground color will change in plot as well  
How to check for the previous value plot compared to the current one.  
now the green color value is 10 then i have change value of green color 18 i want some curve difference in easy chart background plot.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/3/f300433c77aaa9f0264becf1086a4f78c809d9e6.png)  
 ![MicrosoftTeams-image (12)](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/0/2075ed8cb3585bd3833ad539492afe5db2498e46.png)

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [May 23, 2023, 7:04am UTC](https://forum.inductiveautomation.com/t/easy-chart-backgroud-color-change-dynamically/74054/2 "2023-05-23T07:04:20Z")

</div>

> [@ARIFRAHUMAN\_A](#):
>
> If the value is changed, the back ground color will change

How is this being accomplished? Is this from a propertyChange event script?

---

<div class="post-metadata">

**Author:** ![ARIFRAHUMAN\_A](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@ARIFRAHUMAN\_A](https://forum.inductiveautomation.com/u/ARIFRAHUMAN_A)\
**Post date:** [May 23, 2023, 8:29am UTC](https://forum.inductiveautomation.com/t/easy-chart-backgroud-color-change-dynamically/74054/3 "2023-05-23T08:29:04Z")

</div>

I written the script configure chart.  
I have use plot.addRangeMarker and IntervalMarker

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [May 23, 2023, 10:07am UTC](https://forum.inductiveautomation.com/t/easy-chart-backgroud-color-change-dynamically/74054/4 "2023-05-23T10:07:58Z")

</div>

> [@ARIFRAHUMAN\_A](#):
>
> want some curve

...so your wanting the interval markers to bend and follow the chart values like a chart pen would?

---

<div class="post-metadata">

**Author:** ![ARIFRAHUMAN\_A](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@ARIFRAHUMAN\_A](https://forum.inductiveautomation.com/u/ARIFRAHUMAN_A)\
**Post date:** [May 23, 2023, 10:21am UTC](https://forum.inductiveautomation.com/t/easy-chart-backgroud-color-change-dynamically/74054/5 "2023-05-23T10:21:04Z")

</div>

yes exactly @justinedwards.jle .

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [May 23, 2023, 10:31am UTC](https://forum.inductiveautomation.com/t/easy-chart-backgroud-color-change-dynamically/74054/6 "2023-05-23T10:31:31Z")

</div>

This sounds like an interesting problem. Perhaps this could be done with a [XYShapeAnnotation](https://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/annotations/XYShapeAnnotation.html) instead of a marker. If I were to attempt this, my first attempt would probably be with that.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [May 23, 2023, 10:38am UTC](https://forum.inductiveautomation.com/t/easy-chart-backgroud-color-change-dynamically/74054/7 "2023-05-23T10:38:06Z")

</div>

I may be confused, but would setting the [pen style](https://docs.inductiveautomation.com/display/DOC81/Easy+Chart+-+Pen+Renderer) to Area accomplish the same thing?

---

<div class="post-metadata">

**Author:** ![ARIFRAHUMAN\_A](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@ARIFRAHUMAN\_A](https://forum.inductiveautomation.com/u/ARIFRAHUMAN_A)\
**Post date:** [May 23, 2023, 11:17am UTC](https://forum.inductiveautomation.com/t/easy-chart-backgroud-color-change-dynamically/74054/8 "2023-05-23T11:17:23Z")

</div>

thank you,  
@JordanCClark  
@justinedwards.jle

I will give it try.let you know

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [May 23, 2023, 11:57am UTC](https://forum.inductiveautomation.com/t/easy-chart-backgroud-color-change-dynamically/74054/9 "2023-05-23T11:57:47Z")

</div>

You would have to construct your own renderer to draw the background, not for the faint of heart.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 23, 2023, 12:09pm UTC](https://forum.inductiveautomation.com/t/easy-chart-backgroud-color-change-dynamically/74054/10 "2023-05-23T12:09:56Z")

</div>

> [@ARIFRAHUMAN\_A](#):
>
> RangeMarker and IntervalMarker

These are intended for constants. Where you want to show changes over time, then that's just another pen. One of the area renderers should do what you are attempting.
