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

Free Support Forum - aspose.com

Waterfall Chart: Failed to Set Styles for Axis Titles

Hello,

On 22.7 release was fixed ticket Failed to Set Titles for Axes of a Waterfall Chart. I tried to apply this update and found another kind of issue - I tried to apply some styles(font height and font bold) to the axis title and have no result.
Example:

var pres = new Presentation();
var chart = pres.Slides[0].Slide.Shapes.AddChart(ChartType.Waterfall, 0, 0, 700, 300);

chart.Axes.HorizontalAxis.HasTitle = true;
chart.Axes.HorizontalAxis.Title.AddTextFrameForOverriding("Horizontal Axis");
chart.Axes.HorizontalAxis.Title.TextFormat.PortionFormat.FontHeight = 8;
chart.Axes.HorizontalAxis.Title.TextFormat.PortionFormat.FontBold = NullableBool.True;

chart.Axes.VerticalAxis.HasTitle = true;
chart.Axes.VerticalAxis.Title.AddTextFrameForOverriding("Vertical Axis");
chart.Axes.VerticalAxis.Title.TextFormat.PortionFormat.FontHeight = 8;
chart.Axes.VerticalAxis.Title.TextFormat.PortionFormat.FontBold = NullableBool.True;

Result: Waterfall_test.zip (46.7 KB)

@ikyrieieva,
Thank you for contacting support. We will reply to you as soon as possible.

@ikyrieieva,
I’ve reproduced the problem with styling the axis titles and added a ticket with ID SLIDESNET-43349 to our issue tracking system. We apologize for any inconvenience. Our development team will investigate the case. You will be notified when the issue is resolved.

Please use the following way to style the titles:

var titleFormat = chart.Axes.HorizontalAxis.Title.TextFrameForOverriding.Paragraphs[0].ParagraphFormat;
titleFormat.DefaultPortionFormat.FontHeight = 8;
titleFormat.DefaultPortionFormat.FontBold = NullableBool.True;

Documents: Chart Formatting
API Reference: IParagraphFormat interface

1 Like