We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cannot control the number of category axis labels while using a Date Axis as Category Axis


I’ve been using a nested area chart and was trying to align the scale of area correspondingly same on both value and category axes. As I couldn’t find a direct provision to align the scale of the area at the Category axis for the respective values, I’ve opted to use a date axis as Category Axis. As shown in the attachment there seems no provision to control the number of category labels coming in Category Axis, when we use a date axis. Can you please let me know if aspose provides a method or a variable to control the number of category labels in the Category Axis when we are using a date axis?

Also, can you please let me know if we can achieve the same structure in Excel by any different approach.

P.s : I’ve attached two different samples, one using date axis and one without using a date axis.

Shanmukh G

SAMPLES.zip (26.7 KB)


Thanks for the template files and some details.

We are not entirely certain about your issue/requirements. But I think you may try to set major and minor units (to some higher value(s)) for category axis in the chart accordingly via Aspose.Cells APIs. If you still could not evaluate, kindly create your desired chart in MS Excel manually first and then try using respective Aspose.Cells APIs for the task. Moreover, if you could not accomplish the task in MS Excel manually for your requirements, you cannot do the same via Aspose.Cells APIs. If you could accomplish the task (for your desired chart) in MS Excel manually but could not do that via Aspose.Cells APIs, kindly provide your template file (containing your desired chart) and paste your sample code (runnable) that you are using to get it, we will check your code and issue and help you through.