# Perspective XY Chart individual bar colors

**URL:** <https://forum.inductiveautomation.com/t/perspective-xy-chart-individual-bar-colors/37468>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [August 6, 2020, 5:06pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-individual-bar-colors/37468 "2020-08-06T17:06:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mason.Younger](https://avatars.discourse-cdn.com/v4/letter/m/50afbb/32.png) [@Mason.Younger](https://forum.inductiveautomation.com/u/Mason.Younger)\
**Post date:** [August 6, 2020, 5:06pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-individual-bar-colors/37468/1 "2020-08-06T17:06:31Z")

</div>

I’m trying to make an hour by hour chart that will color the Bars based on if the goal was met.

The heatRules don’t really work for me as I would just like Red or Green.

How can I set the bar fill color based on a simple logic of greater than x color = green smaller than x color = red

Here is where I’m at so far.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/0/30c28eadf8b042d6eeda60deb855c2bc1085d242.png)

---

<div class="post-metadata">

**Author:** ![jmorris](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jmorris](https://forum.inductiveautomation.com/u/jmorris)\
**Post date:** [August 19, 2020, 12:25am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-individual-bar-colors/37468/2 "2020-08-19T00:25:37Z")

</div>

I need to accomplish the same thing  
I was kind of hopping that replacing the fill color by a reference to a graph field {field} would do the trick, but it does not.  
I added a field to the graph source object, and I set this field to different color values (808080, 00FF00, FFFF00, FF0000, …), but for some reason it does’t work.  
Any ideas guys?  
Thanks!

---

<div class="post-metadata">

**Author:** ![Toobor](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@Toobor](https://forum.inductiveautomation.com/u/Toobor)\
**Post date:** [August 19, 2020, 12:51pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-individual-bar-colors/37468/3 "2020-08-19T12:51:03Z")

</div>

My colleague manage to do this. He added a column in the dataset of the dataSource with the name “Color” which each row has the value “green”, “orange” or “red”. (In our case the dataSource has a query binding so the logic that determines the color takes place in the query) Then he set the value of series/0/column/apperance/deriveFieldsFromData/fill/Color to Color. I think that is all that is required.

---

<div class="post-metadata">

**Author:** ![jmorris](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jmorris](https://forum.inductiveautomation.com/u/jmorris)\
**Post date:** [August 19, 2020, 8:07pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-individual-bar-colors/37468/4 "2020-08-19T20:07:42Z")

</div>

Could you please share a screen shot?  
Still not working for us  
Thanks!

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/e/aeb778bece5d9ea86e60a227685a4731c154c7e6.png)

---

<div class="post-metadata">

**Author:** ![Toobor](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@Toobor](https://forum.inductiveautomation.com/u/Toobor)\
**Post date:** [August 20, 2020, 11:27am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-individual-bar-colors/37468/5 "2020-08-20T11:27:38Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/d/4d22dc2c0f2655b94241505959446c0797616d76.png)

---

<div class="post-metadata">

**Author:** ![Toobor](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@Toobor](https://forum.inductiveautomation.com/u/Toobor)\
**Post date:** [August 20, 2020, 11:36am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-individual-bar-colors/37468/6 "2020-08-20T11:36:30Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/5/3591526e096a482c8b738b47543fd4fd982d7543.png)

---

<div class="post-metadata">

**Author:** ![arun1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arun1/32/79753_2.png) [@arun1](https://forum.inductiveautomation.com/u/arun1)\
**Post date:** [October 17, 2020, 4:44am UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-individual-bar-colors/37468/7 "2020-10-17T04:44:22Z")

</div>

Hi @Mason.Younger , slightly different question, how were you able to get that dashed horizontal line (just above 60)? Is there a way to label that line?

---

<div class="post-metadata">

**Author:** ![sagar.iparkar](https://avatars.discourse-cdn.com/v4/letter/s/47e85d/32.png) [@sagar.iparkar](https://forum.inductiveautomation.com/u/sagar.iparkar)\
**Post date:** [September 12, 2022, 1:48pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-individual-bar-colors/37468/8 "2022-09-12T13:48:10Z")

</div>

HI, which property or field use for to display chart value top of the y axis

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/8/48bf64108d116e66967c35f9ea179d44863e9613.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:** [September 12, 2022, 3:52pm UTC](https://forum.inductiveautomation.com/t/perspective-xy-chart-individual-bar-colors/37468/9 "2022-09-12T15:52:47Z")

</div>

@sagar.iparkar  
This could be the answer you are looking for:  
[https://forum.inductiveautomation.com/t/perspective-bar-chart-value-labels/30531](https://forum.inductiveautomation.com/t/perspective-bar-chart-value-labels/30531)
