Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Fri Feb 20, 2026 5:05 pm

Hello, I have a chart that has a great deal of data points in the X axis.
The X axis displays date values. The date values are rotated 90 degrees for readability.
However, due to the density of the number of dates displayed, I believe it would improve readability to reduce the number of dates displayed.
I want to leave the data point in place, just suppress the display of the date value in the X axis.
How could I display, say every 5th date in the axis display.

Thank you.

Too many dates
tooManyDates.png
tooManyDates.png (24.88 KiB) Viewed 11 times


Fewer dates
fewerDates.png
fewerDates.png (15.06 KiB) Viewed 11 times

mf0000001
 
Posts: 8
Joined: Tue Dec 23, 2025 3:20 pm

Tue Feb 24, 2026 3:34 am

Hello,

Thank you for your inquiry.

Please try the following settings.
Code: Select all
IChart chart = sheet.Charts[0];
chart.PrimaryCategoryAxis.MajorUnit = 5;


If the above solution does not meet your requirements, please provide your Excel document containing the chart. This will help us investigate the issue and provide you with an effective solution in a timely manner.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3047
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.XLS

cron