Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Thu Apr 22, 2021 8:31 pm

Hi,

I"m currently experimenting with the demo version.
In PowerPoint it is possible to align the label of the horizontal (category) axis centered on the tick (as opposed to between the ticks).

In the attached screenshot, the second chart has the correctly aligned labels (scroll to the right to see the checked PowerPoint option).

I cannot find the correct property in Spire.Presentation.
How can I set this programmaticaly in C#? Which property do I have to use?


Thanks for your reply!

Kind regards,
Laurent TIlquin

ltilquin
 
Posts: 14
Joined: Thu Apr 22, 2021 8:11 pm

Fri Apr 23, 2021 9:29 am

Hello,

Thanks for your inquiry.
Please refer to the following code to set the axis position.
Code: Select all
            ...
            chart.PrimaryValueAxis.CrossBetweenType = CrossBetweenType.MidpointOfCategory;
            ...


Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Fri Apr 23, 2021 9:44 am

Thanks a lot Brian, this works!

Grts,
Laurent

ltilquin
 
Posts: 14
Joined: Thu Apr 22, 2021 8:11 pm

Sun Apr 25, 2021 2:36 am

You are welcome.
If you encounter any issues related to our products in the future, please feel free to contact us.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.Presentation