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

Free Support Forum - aspose.com

Setting axis tick labels and legend items BOLD in Excel chart using C#.NET

We are using Chart functionality in our project. We are creating a chart like following through C# code and finally converting it into an Image and displaying in the word document.

We just want a simple change in it but I was not able to locate property/code related to the same. We want the format of Axis values and chart legend in BOLD format.
Attaching image for your reference.

Thanks in advance…!!


I think you may try the following sample code to accomplish your task:
Sample code:

//Set the chart’s value axis tick labels bold
chart.ValueAxis.TickLabels.Font.IsBold = true;

//Set the category axis title font bold.
chart.CategoryAxis.Title.TextFont.IsBold = true;

//Set the first legend entry to bold, similarly you may set other entries to bold accordingly.
chart.Legend.LegendEntries[0].Font.IsBold = true;

Hope, this helps a bit.

Thank you.

Thanks Amjad,

It worked as you said…!!


Good to know that your issue is figured out now. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.