# Pie chart label background

**URL:** <https://forum.inductiveautomation.com/t/pie-chart-label-background/70343>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [February 27, 2023, 4:41am UTC](https://forum.inductiveautomation.com/t/pie-chart-label-background/70343 "2023-02-27T04:41:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dharani\_T](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dharani\_T](https://forum.inductiveautomation.com/u/Dharani_T)\
**Post date:** [February 27, 2023, 4:41am UTC](https://forum.inductiveautomation.com/t/pie-chart-label-background/70343/1 "2023-02-27T04:41:49Z")

</div>

Hi,  
I would like to change the background of pie chart label( yellow) to a transparent one with white background and also i would like to remove the greyish circle at the bottom of the pie chart.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/7/97c739e4a62f6ad63767733fb52cf462f48ebc01.png)  
Any suggestions to modify these properties in vision?

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [February 27, 2023, 4:35pm UTC](https://forum.inductiveautomation.com/t/pie-chart-label-background/70343/2 "2023-02-27T16:35:37Z")

</div>

If you check out the [docs on the pie chart scripting functions](https://docs.inductiveautomation.com/display/DOC81/Vision+-+Pie+Chart+Scripting+Functions), you'll see a link to the [JFree Chart API](https://www.jfree.org/jfreechart/api/javadoc/index.html). You can use this API and a little scripting knowledge to configure the appearance.

I am a bit concerned about wanting the label background to be "transparent one with white background". Transparent (or semi-transparent) backgrounds on top of a dark background are often hard to read. But try playing with the alpha setting for the color and see what you think.

---

<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:** [February 27, 2023, 5:12pm UTC](https://forum.inductiveautomation.com/t/pie-chart-label-background/70343/3 "2023-02-27T17:12:05Z")

</div>

> [@KathyApplebaum](#):
>
> try playing with the alpha setting

```auto
from java.awt import Color
#Color(r, g, b, alpha)

```

---

<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:** [February 28, 2023, 4:09am UTC](https://forum.inductiveautomation.com/t/pie-chart-label-background/70343/4 "2023-02-28T04:09:57Z")

</div>

Here's an example script that will create the effects you are looking for:

```auto
#def configureChart(self, chart): #Extension Function
	from java.awt import Color
	plot = chart.plot
	plot.setShadowPaint(None) #Removes grey shadow from pie chart
	plot.setLabelShadowPaint(None) #Removes grey shadow from label
	plot.setLabelBackgroundPaint(None) #Makes label background transparent
	plot.setLabelPaint(Color.white) #Sets label font color to white
	plot.setLabelLinkPaint(Color.white) #Sets the little line from the chart to the label to white

```

**Result:**  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/f/bf1424a922ad4a1ada7a204a5217a302933aaf7b.png)
