Font size of chart legends


Can you please let me know how to resize the font of series legends that are part of the chart.


Hi Thameez,

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 on your end to serve the purpose.

//Create an instance of Presentation class
Presentation pres = new Presentation();

//Get reference of the slide
ISlide slide = pres.Slides[0];

//Add a clustered column chart on the slide
IChart chart = slide.Shapes.AddChart(ChartType.ClusteredColumn, 50, 50, 400, 400);

//Set Legend Properties
chart.Legend.X = 50 / chart.Width;
chart.Legend.Y = 50 / chart.Height;

//Resize the font of series legends
chart.Legend.TextFormat.PortionFormat.FontHeight = 20;

//Write presentation to disk
pres.Save(@"D:\Legendfont.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. It worked.

Hi Thameez,

Thank you for your valuable feedback.

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

Please let us know if we could be of any help to you.

Best Regards,