After an initial test, I observed the issue as you mentioned by using the following sample code with your template file. I found that after using Chart.calculate() method, still the value of major units of axis in the chart is returned wrong:
e.g Sample code:
Workbook workbook = new Workbook("f:\\files\\TestAxisOptions.xlsx");
Worksheet sheet = workbook.getWorksheets().get(0);
Cells cells = sheet.getCells();
Chart chart = sheet.getCharts().get(0);
chart.calculate();
System.out.println(chart.getValueAxis().getMajorUnit());//0.2 - Not Ok
System.out.println(chart.getValueAxis().getMinorUnit());//0.02 - Ok
I have logged a ticket with an id “CELLSJAVA-42377” for your issue. We will look into it soon.
Once we have an update on it, we will let you know here.
I have tested the issue using Aspose cells 17.8.7 as suggested by you. However, the problem still appears.
It still shows major axis value as 0.2 instead of 0.1. Kindly verify.
Yes, I noticed the issue as you mentioned. I guess this could be due to the fact that major axis values are set automatic (you may confirm this in MS Excel). Anyways, I have reopened your issue again. Our concerned developer from product team will evaluate it soon.
I think we have already told you that when major units are set to automatic, we cannot do well as MS Excel. In short, I’m afraid this type of issue is not easy to be fixed.
Anyways, the issue is still open and if we could make any progress to figure it out, we will let you know here.