# Set color of individuals bars base on value in XY chart

**URL:** <https://forum.inductiveautomation.com/t/set-color-of-individuals-bars-base-on-value-in-xy-chart/48432>\
**Category:** Ignition Early Access\
**Created:** [July 1, 2021, 8:21pm UTC](https://forum.inductiveautomation.com/t/set-color-of-individuals-bars-base-on-value-in-xy-chart/48432 "2021-07-01T20:21:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [July 1, 2021, 8:21pm UTC](https://forum.inductiveautomation.com/t/set-color-of-individuals-bars-base-on-value-in-xy-chart/48432/1 "2021-07-01T20:21:14Z")

</div>

Hello,  
I wonder if possible to set the color of individuals bars base on their values in XY Chart?  
For example if a value lower than 0, the color change yellow and in other cases the bars are blue.

![Share](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/c/6cf9df778e90989be8c47f2676d1b61741466234.png)

---

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [July 1, 2021, 8:55pm UTC](https://forum.inductiveautomation.com/t/set-color-of-individuals-bars-base-on-value-in-xy-chart/48432/2 "2021-07-01T20:55:18Z")

</div>

Under the `column >> appearance` property category, you should see a `deriveFieldsFromData` grouping. You’ll need to add a color field to your datasource and set the value of this to the appropriate color for each data point. You then set the `deriveFieldsFromData` fill and/or stroke color value to the name of the “color” field in your dataSource.

Only other dynamic option I’m aware of are the `heatRules` but I don’t think that will give you the flexibility that you need for this particular situation.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [July 2, 2021, 2:09pm UTC](https://forum.inductiveautomation.com/t/set-color-of-individuals-bars-base-on-value-in-xy-chart/48432/3 "2021-07-02T14:09:40Z")

</div>

Thanks a lot Will. What a masterpiece and mystery are this XY Chart. They will design every things.
