# Bar Chart colors

**URL:** <https://forum.inductiveautomation.com/t/bar-chart-colors/18457>\
**Category:** Ignition\
**Created:** [June 13, 2018, 6:58pm UTC](https://forum.inductiveautomation.com/t/bar-chart-colors/18457 "2018-06-13T18:58:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leversole](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@leversole](https://forum.inductiveautomation.com/u/leversole)\
**Post date:** [June 13, 2018, 6:58pm UTC](https://forum.inductiveautomation.com/t/bar-chart-colors/18457/1 "2018-06-13T18:58:46Z")

</div>

I have a chart (bar chart on a report), the data set has multiple rows and three columns, lets call them date, value1, and value2…sometimes, the first row can have a null in one of the value columns, this seems to set the colors of the bars, which creates a lot of confusion, I want process A (value1) to always be red, and process B (value2) to always be Blue.

If neither of the values in the first row in the first row are null, then process A (value1) is red and process B (value2) is blue, the issue happens when the first row has a null for process A (value1) and a value for Process B…then, process B is red and and process A is blue! As the report is date based, either of these can happen just by changing the date range of the report!

Sorry to be long winded, but in a nutshell, I want value1 to red, and value2 to be blue regardless of the first row in a dataset, is there a way to do this with code?

Thanks

---

<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:** [June 13, 2018, 7:08pm UTC](https://forum.inductiveautomation.com/t/bar-chart-colors/18457/2 "2018-06-13T19:08:09Z")

</div>

Use coalesce in your SQL query to replace the nulls with zeros.

---

<div class="post-metadata">

**Author:** ![leversole](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@leversole](https://forum.inductiveautomation.com/u/leversole)\
**Post date:** [June 13, 2018, 8:14pm UTC](https://forum.inductiveautomation.com/t/bar-chart-colors/18457/3 "2018-06-13T20:14:30Z")

</div>

Brilliant! Thanks…
