Remove Pie Chart border


How can I remove the border of a pie chart ?

You will need PiePlot#setOutlinePaint(), and use a RGB Java Color with an alpha value on the end. Setting the last value to 0 creates full transparency for the outline, regardless of color.

[code]from java.awt import Color

c = Color(128,128,128,0)
event.source.parent.getComponent(“Pie Chart”).getChart().getPlot().setOutlinePaint©[/code]

I’m attempting to remove the border on a pie chart that is part of a template in another template. On the pie chart itself I have a propertyChange script configured with the following (as shown above).

 if event.propertyName == "componentRunning":
 	from java.awt import Color
 	c = Color(128,128,128,0)
 	event.source.parent.getComponent("Pie Chart").getChart().getPlot().setOutlinePaint(c)

This works if the pie chart is in a template instance, however if that template is then used in another template it no longer works and the border is visible. Is there any way around this?

Why are you using parent.getComponent("Pie Chart") ? Why not just event.source.getChart() … ?

Initially I tried this

chart = event.source.getChart()
plot = chart.getPlot()


Either way the result was the same.

I am still having this problem, and the script is not working, any ideas?

I am kind of surprised that after so many years, I still have this problem.

I am working with 8.1.3