# xyChart: How to change color of a candlestick

**URL:** <https://forum.inductiveautomation.com/t/xychart-how-to-change-color-of-a-candlestick/64319>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 21, 2022, 9:33am UTC](https://forum.inductiveautomation.com/t/xychart-how-to-change-color-of-a-candlestick/64319 "2022-09-21T09:33:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Klaus\_Reckefuss](https://avatars.discourse-cdn.com/v4/letter/k/e79b87/32.png) [@Klaus\_Reckefuss](https://forum.inductiveautomation.com/u/Klaus_Reckefuss)\
**Post date:** [September 21, 2022, 9:33am UTC](https://forum.inductiveautomation.com/t/xychart-how-to-change-color-of-a-candlestick/64319/1 "2022-09-21T09:33:45Z")

</div>

In xyChart there is Candlestick renderer. By default it is red or green depending on Open/Close difference sign. Is it possible to change these colors?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/9/b9222ab58baf23477dbf9a9f07b91393a8f8a013.png)

Changing of the fill and stroke colors takes no effekt.

---

<div class="post-metadata">

**Author:** ![djs](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@djs](https://forum.inductiveautomation.com/u/djs)\
**Post date:** [September 21, 2022, 1:05pm UTC](https://forum.inductiveautomation.com/t/xychart-how-to-change-color-of-a-candlestick/64319/2 "2022-09-21T13:05:03Z")

</div>

You should be able to use _deriveFieldsFromData_ to make this work. You’d use `deriveFieldsFromData.fill.color` and set it to whatever key has the color value in your data. The manual has an [example](https://docs.inductiveautomation.com/display/DOC81/XY+Chart+Example+-+Gantt+Chart) of it with a Gantt chart.

---

<div class="post-metadata">

**Author:** ![S\_ANIL\_KUMAR](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@S\_ANIL\_KUMAR](https://forum.inductiveautomation.com/u/S_ANIL_KUMAR)\
**Post date:** [December 1, 2025, 11:35am UTC](https://forum.inductiveautomation.com/t/xychart-how-to-change-color-of-a-candlestick/64319/3 "2025-12-01T11:35:38Z")

</div>

Hey @djs , could you reshare the manual link, as I am trying to configure a diverging graph using the candlestick xy chart. where I set the high and open with the same value and close and low with the same value. Basically, this generates the diverging graph, whereas I also need to differentiate the diverging bars with a specific color. Could you anyone share your thoughts to achieve this.

Thanks, in prior.

---

<div class="post-metadata">

**Author:** ![djs](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@djs](https://forum.inductiveautomation.com/u/djs)\
**Post date:** [December 1, 2025, 2:43pm UTC](https://forum.inductiveautomation.com/t/xychart-how-to-change-color-of-a-candlestick/64319/4 "2025-12-01T14:43:06Z")

</div>

Does the link not work for you? It still works for me. Try [this one](https://docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-chart-palette/perspective-xy-chart/xy-chart-example-gantt-chart).
