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

Free Support Forum - aspose.com

Setting intervals in CategoryAxis of Line chart

Hi,

we want to set intervals for the category axis in line charts. Please check the attached image or more details, its self explanatory.

Hi,


I think you may refer to the following sample code and write/adjust your own code based on the data source range of your chart accordingly:
e.g
Sample code:

chart.CategoryAxis.MinorUnitScale = TimeUnit.Months;
chart.CategoryAxis.MajorUnit = 2;
chart.CategoryAxis.TickLabelSpacing = 2;

If you still find any issue, kindly attach your template file containing your desired chart, we will check it soon.

Thank you.

Hi,

thanks for your reply. I am quite close after changes suggested by you, but still there are some issues. Please check the attached image.

You can help on this. Basically we want uniform intervals on the entire chart which are not currently. Please help.

Also, please explain what MinorUnitScale and TickLabelSpacing exactly mean? I mean that can help me.


Thanks in Advance.

Hi,


Could you provide us your output Excel file (by Aspose.Cells) which contains the chart as per your attached image. Also, the output file should contain your desired chart that you may manually create in MS Excel, we will check/ compare both the charts and help you on how to accomplish your desired chart updating the chart by Aspose.Cells APIs as per your desired chart.

Thank you.