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

Free Support Forum - aspose.com

Font size of chart legends

Hi,

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


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
<o:p></o:p>

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,