We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Label text color in Doughtnut chart

Hi,

How to show series label color in doughnut chart.

Hi Anand,


Thank you for your interest in Aspose.Slides.

I have observed your comments and like to request you to please try using following sample code for your kind reference.

//Instantiate Presentation class that
represents PPTX file<o:p></o:p>

Presentation pres = new Presentation();

//Access first slide

ISlide sld = pres.Slides[0];

// Add chart with default data

IChart chart = sld.Shapes.AddChart(ChartType.Doughnut, 0, 0, 500, 500);

IChartSeries series = chart.ChartData.Series[0];

//first label will be show series name

IDataLabel lbl = series.DataPoints[0].Label;

lbl.DataLabelFormat.ShowSeriesName = true;

lbl.TextFormat.PortionFormat.FillFormat.FillType = FillType.Solid;

lbl.TextFormat.PortionFormat.FillFormat.SolidFillColor.Color = Color.Red;

lbl = series.DataPoints[1].Label;

lbl.DataLabelFormat.ShowSeriesName = true;

lbl.TextFormat.PortionFormat.FillFormat.FillType = FillType.Solid;

lbl.TextFormat.PortionFormat.FillFormat.SolidFillColor.Color = Color.Red;

//Save presentation with chart


pres.Save(@“D:/Doughnet.pptx”, Aspose.Slides.Export.SaveFormat.Pptx);


I hope this will be helpful. Please share if I may help you further in this regard.

Best Regards,

Thanks sir,

It is very helpful for me and it is working.

Thanks again

Regards,
Anand

Hi Anand,


Thank you for your valuable feedback.

We are glad to know that things have started working on your end.

Please feel free to contact us if we could be of any help to you.

Best Regards,