I need your help.
I want to create a pie chart and configure its properties.
Getting the default pie is no problem but I haven’t found examples that explains
how to set colors, no labels etc for pie charts in Aspose Words for Python.
What I would like to do is:
Set colors, i.e. red and green.
When I use “series.format.fill.fore_color = pydraw.Color.red”
the whole pie gets red and I haven’t found how to set colors individually.
I only want the percentage values to be shown, 66% & 34%. Not “series1 - Value2 - 234” etc.
I want to set the dividing line to be thinner or remove it.
Change font size for “Title”.
Remove the line surrounding the sqaure, “chart”, so that it blends in better in the doc.
That was exactly what I was looking for but couldn’t find.
When I use
“series.data_labels.show_percentage = True”
I still get the text “series1 , Value1,” next to the slices.
Is there a way to remove that text?
@SuneVav Sure, you can use ChartDataLabelCollection properties to configure all data labels and ChartDataLabel properties to configure an individual data label. Just set the appropriate show_XXX properties to true or false value.
@SuneVav I am afraid currently there is no public API to specify data label position. This feature request is logged as WORDSNET-21965. We will keep you updated and let you know once it is implemented.
Thanks, but that seems complicated for building 1 or 2 charts embedded in a document.
I found, however, that by adjusting chart height I could make both values end up outside.
In my example I reduced height from 150 to 130 (with font size 8).
It now looks exactly like I want it.
@SuneVav It is perfect that you managed to achieve what is required. Please feel free to ask in case of any another issues we will be glad to help you.