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

Free Support Forum - aspose.com

Change the font size of X & Y Axis Titles

Hello,

I was wondering if it was possible to change the Font size of the X (Category) and Y (Value) axes' titles dynamically. I tried various things and I havent been able to make the change. The only way i can seem to do it is by opening the xlsx file and changing the font size in there.

Thanks, Sreejith


This message was posted using Page2Forum from Setting Charts Appearance - Aspose.Cells for .NET

Hi,

Please try this code to set the font of the title.

Please use the latest version:
Aspose.Cells for .NET v7.0.3.1


C#


Chart ch = worksheet.Charts[0];


ch.CategoryAxis.Title.TextFont.Name = “Arial”;

ch.CategoryAxis.Title.TextFont.Size = 30;

ch.CategoryAxis.Title.TextFont.IsItalic = true;