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.

Wed Dec 22, 2021 4:39 pm

Hi,

In the column chart, by default the columns bars and column labels appear between the X-axis tick marks as shown here:

default.JPG
default.JPG (23.79 KiB) Viewed 431 times


However, we would like the column bars and column labels to appear directly inline with the X-axis tick marks as shown here from the Excel mock-up:

desired.JPG
desired.JPG (33.28 KiB) Viewed 431 times


Is this possible?

Thanks,
Todd

folsomfisher
 
Posts: 3
Joined: Fri Jul 10, 2020 3:17 pm

Thu Dec 23, 2021 3:55 am

Hello,

Thank you for your inquiry.
Please use the following code to set the position of the category axis to "On tick mark".
Code: Select all
chart.PrimaryCategoryAxis.AxisBetweenCategories = false;

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Wed Jan 05, 2022 7:58 am

Hello,

Hope you are doing well!

Has the issue been solved now? Could you please give us some feedback at your convenience?

Thanks in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Wed Jan 05, 2022 5:49 pm

Hi Annika,

Sorry for the delay in my reply. I got redirected to another task and was only able to get back to this item this morning. Your solution worked perfectly. Thanks so much for the quick response!

Todd

folsomfisher
 
Posts: 3
Joined: Fri Jul 10, 2020 3:17 pm

Thu Jan 06, 2022 1:05 am

Hello,

You're welcome.

If you have other questions about using Spire.XLS in the future, please feel free to contact us.

Have a nice day!

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.XLS

cron