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.
Any suggestions to modify these properties in vision?
If you check out the docs on the pie chart scripting functions, you'll see a link to the JFree Chart API. 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.
1 Like
from java.awt import Color
#Color(r, g, b, alpha)
Here's an example script that will create the effects you are looking for:
#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:
3 Likes