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.

Fri Dec 04, 2015 5:54 pm

Hi all. I'm having issues formatting the x-axis ticks on a line chart. I have the paid/licensed version of spire.
Lets say we have a linechart with values from 0 to 99 on the x axis.

Currently, powerpoint will display the xaxis values up to 99 and then stop. However, I would like a “pretty” x axis and would like to have the last tick mark be at 100.

I tried to do this by forcing the min and max value on the x axis (ie: the category axis) of the line chart.

Chart.PrimaryCategoryAxis.IsAutoMax = false
Chart.PrimaryCategoryAxis.IsAutoMin = false
Chart.PrimaryCategoryAxis.MinValue = 0
Chart.PrimaryCategoryAxis.MaxValue = 100

However, this did not work.

What is the proper way to force the xaxis tick values?

Thanks

grantnicholas
 
Posts: 2
Joined: Fri Dec 04, 2015 5:50 pm

Mon Dec 07, 2015 3:49 am

Hello,

Thanks for your inquiry. I have observed the requirement and tried it, but I failed find any option even in PowerPoint to set the xaxis tick values, this kind of chart shouldn't support the feature. And you can try use XY chart.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Thu Dec 10, 2015 5:47 pm

Thanks for the quick response, that is what I figured but it was worth an ask.

grantnicholas
 
Posts: 2
Joined: Fri Dec 04, 2015 5:50 pm

Return to Spire.Presentation