Unable to Show the Display Unit on a PowerPoint Chart

Hi, I’d like to show the display unit on a chart axis in a powerpoint slide. I have tried the sample code shown in link

But it doesn’t work, the display unit is not shown. The version of Aspose.Slides for .NET I used is 21.9.0.

@admangowilson,
Welcome to our community! Thank you for contacting support.

It seems to be the article contains unclear description. IAxis.DisplayUnit property allows to scale axis values and the result can be easy seen: scaled_values.png (18.2 KB)

API Reference: IAxis Interface

Could you please share a presentation file with desired axis’s view created by PowerPoint that you would like to generate by using Aspose.Slides?

Thanks for your response.

This is the code I used to create the powerpoint document. I inserted a chart in it and set the vertical axis to show the display unit. But the display unit is not shown in the resulting powerpoint file.

using (Presentation pres = new Presentation())
{
     IChart chart = pres.Slides[0].Shapes.AddChart(ChartType.ClusteredColumn, 50, 50, 450, 300);
     chart.Axes.VerticalAxis.DisplayUnit = DisplayUnitType.Millions;
     pres.Save("Result.pptx", Aspose.Slides.Export.SaveFormat.Pptx);
}

Here is a screenshot of the slide in the resulting powerpoint file:
Screenshot 2021-09-30 175037.png (10.7 KB)

@admangowilson,
Could you create a presentation with a chart using PowerPoint application and show the desired result, please?

I’d like to show the ‘Millions’ display unit as shown in the attached screenshot.

Screenshot 2021-09-30 183130.png (9.9 KB)

@admangowilson,
Thank you for the clarification. You can enable title display for the axis as shown below:

chart.Axes.VerticalAxis.HasTitle = true;
chart.Axes.VerticalAxis.Title.AddTextFrameForOverriding("Millions");

More examples: Create Chart, Chart Formatting
API Reference: IChartTitle Interface