# \[Bug-1512\] Perspective PieChart legendLabelColor Themes

**URL:** <https://forum.inductiveautomation.com/t/bug-1512-perspective-piechart-legendlabelcolor-themes/61703>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [July 9, 2022, 6:41pm UTC](https://forum.inductiveautomation.com/t/bug-1512-perspective-piechart-legendlabelcolor-themes/61703 "2022-07-09T18:41:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [July 9, 2022, 6:41pm UTC](https://forum.inductiveautomation.com/t/bug-1512-perspective-piechart-legendlabelcolor-themes/61703/1 "2022-07-09T18:41:39Z")

</div>

Currently using 8.1.17, the `legendLabelColor` doesn’t appear to honor built in themes. Changing themes, from light to dark, for example, the color always remains black. I can change the color using a picker and that color will reflect. I tried something like `--neutral-100` but that doesn’t seem to change anything either. I did see one post, [Perspective pie labels obscured - #2 by cmallonee](https://forum.inductiveautomation.com/t/perspective-pie-labels-obscured/61572/2), that states this component relies on a 3rd party library. Does that mean we are out of luck on this?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [July 10, 2022, 1:00am UTC](https://forum.inductiveautomation.com/t/bug-1512-perspective-piechart-legendlabelcolor-themes/61703/2 "2022-07-10T01:00:06Z")

</div>

See if [XYChart backgroundColor not changing with Theme - #2 by Transistor](https://forum.inductiveautomation.com/t/xychart-backgroundcolor-not-changing-with-theme/56412/2) is of any assistance.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [July 10, 2022, 2:25am UTC](https://forum.inductiveautomation.com/t/bug-1512-perspective-piechart-legendlabelcolor-themes/61703/3 "2022-07-10T02:25:03Z")

</div>

Don’t think so. It’s not that I’m setting the wrong property, that is the property.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [July 10, 2022, 2:41pm UTC](https://forum.inductiveautomation.com/t/bug-1512-perspective-piechart-legendlabelcolor-themes/61703/4 "2022-07-10T14:41:37Z")

</div>

![Pie chart theme](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/4/04725d036fdf0c6f8e230303707185e27e6b61cf.gif)

What I’ve done when faced with supporting themes is:

1. Create an object `session.custom.AMChartsCssVars with structure shown below.

```auto
{
  "legendLabelColor_Light": "#101010",
  "legendLabelColor_Dark": "#e0e0e0"
}

```

Now wherever you need to flip the color add the following binding:

```auto
if(left({session.props.theme}, 4) = "dark",
	{session.custom.AMChartsCssVars.legendLabelColor_Dark},
	{session.custom.AMChartsCssVars.legendLabelColor_Light}
)

```

This works fine as long as the first four letters of your dark them are “dark”. Setting the colors in the session variables means that you can apply site-wide customisation in a jiffy.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 10, 2022, 9:00pm UTC](https://forum.inductiveautomation.com/t/bug-1512-perspective-piechart-legendlabelcolor-themes/61703/5 "2022-07-10T21:00:17Z")

</div>

This approach defeats the purpose of using css themes though.  
You should look at the chart in the browser dev tools when it’s running and see what colour the text is being assigned to. Then you can know why it’s not changing and resolve it properly using css
