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

Free Support Forum - aspose.com

Multiple font properties in a chart title

Hi,

I have to add to a chart a title with two differents font properties (first one bold, second one red and italic).
I have seen a message from an user where you said it wasn’t supported yet, but it was in 2007, is it supported now ? If so how can i do it ?

Thanks for advance

Newick.

Hi,

Yes, you can do it quite easily. Please use Title.Characters attributes for applying rich text with your desired font formattings.

e.g.., (In the code, the first line is bold only and the second title line is Italic, red colored with specific underlined and size attributes, kindly consult it hopefully it may help you)

'Set properties of chart title
chart.Title.Text = "Testing my Chart Title1 " & vbNewLine & "Sales By Region"
chart.Title.Characters(0, 24).Font.IsBold = True
chart.Title.Characters(25, 17).Font.Color = Color.Red
chart.Title.Characters(25, 17).Font.IsItalic = True
chart.Title.Characters(25, 17).Font.Size = 15
chart.Title.Characters(25, 17).Font.Underline = FontUnderlineType.Single

Thank you.

Thanks for your reactivity, it is really helpful !

Regards.