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.

Tue Jun 29, 2021 12:08 pm

Hi,

I have a chart with more than 400 datapoints.
The PrimaryValueAxis (Y-axis) represents values, The PrimaryCategoryAxis (X-axis) represents dates.
I want to see all the datapoints on the graph but only a few data labels.

By using TickLabelSpacing I can set how many labels I want to see on the X-axis (i.e. 5)

But the vertical gridline interval stays at 1. I want to have as much vertical gridlines as I have labels on the X-axis.

See the enclosed pictures.

In PowerPoint you can set the interval between the vertical gridlines but I don't find the property in the Spire.Presentation library.


PS: I also want to format the X-axis labels as a date without time.
I tried
Code: Select all
chart.PrimaryCategoryAxis.NumberFormat = "dd/MM/yyyy";
but it doesn't work.

Thanks for your help.

Kind regards,
Laurent

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

Wed Jun 30, 2021 9:42 am

Hello Laurent,

Thanks for your inquiry.
I am sorry that our Spire.Presentation does not yet support setting the interval of tick marks. But I have added it as a new feature into our upgrade list with the ticket SPIREPPT-1611. Once it is achieved, we will let you know. Apologize for the inconvenience caused.

Besides, you can refer to the following code to format the X-axis labels as a date without time. If this doesn't work for you, please provide your test PPT file for further investigation. You could upload it here or send it to us (support@e-iceblue.com) via email. Thanks in advance
Code: Select all
            chart.PrimaryCategoryAxis.NumberFormat = "dd/mm/yyyy";


Sincerely,
Brian
E-iceblue support team
Last edited by Brian.Li on Wed Jun 30, 2021 10:28 am, edited 2 times in total.
User avatar

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

Wed Jun 30, 2021 9:51 am

Hi Brian,

Thanks for your reply.
Have you any idea how long it will take to release the update?

Kind regards,
Laurent

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

Wed Jun 30, 2021 10:30 am

Hello Laurent,

Thanks for your follow up.
Regarding the new feature SPIREPPT-1611, I have confirmed with our Dev team, if all goes well, we expect to provide you a new version within two weeks.

Sincerely,
Brian
E-iceblue support team
User avatar

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

Wed Jun 30, 2021 10:31 am

Hello Brian,

That's good news!
Thanks again for your feedback.

Kind regards,
Laurent

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

Tue Jul 13, 2021 11:13 am

Hello Laurent,

Hope you are doing well.
Glad to inform you that we just released Spire.Presentation Pack Hotfix Version:6.7.2, it adds a new feature to support setting the interval of tick marks (As shown in the following code), please download it from the following links to test on your side. Looking forward to your test result.
Website link: https://www.e-iceblue.com/Download/down ... t-now.html
Nuget link: https://www.nuget.org/packages/Spire.Presentation/6.7.2

Code: Select all
Presentation ppt = new Presentation();
ppt.LoadFromFile(intputFile);
IChart chart = ppt.Slides[0].Shapes[0] as IChart;
IChartAxis chartAxis = chart.PrimaryCategoryAxis;

chartAxis.TickMarkSpacing = 30;
ppt.SaveToFile(outputFile, FileFormat.Pptx2013);


Sincerely,
Brian
E-iceblue support team
User avatar

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

Wed Jul 14, 2021 7:03 am

Hi Brian,

Thanks a lot for your support.
I will test this in the coming weeks and give you feedback asap.

Grts,
Laurent

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

Wed Jul 14, 2021 9:21 am

Okay, thanks for your quick response.
If you encounter any problems during testing, just 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

Thu Aug 05, 2021 8:39 am

Hi Brian,

It works as expected.
Thanks a lot for your support.

Grts,
Laurent

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

Fri Aug 06, 2021 1:11 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