Horizontal and vertical axes scale values are different than original scale values in PDF output of Charts

Hello,

I am using Aspose.Cells v16.10.2 to generate PDF of charts in the attached excel file. In the PDF output, the scale used for horizontal axis and vertical axis is different than scale used in actual chart. This issue is in all the charts.

For all charts, their Aspose generated PDFs, Excel generated PDFs and Comparison screenshots are attached for your reference (all PDFs and screenshots are named with their particular chart name).

Following code is used to generate the output:

Workbook workbook = new Workbook("Example analyst model.xlsm");
WorksheetCollection ws = workbook.getWorksheets();
String worksheetName = "Supplementary";
Chart chart = ws.get(worksheetName).getCharts().get("RenderTest_3");
chart.toPdf("D:\\RenderTest_3_aspose_16.10.2.pdf");

This issue has been reported to us by customer in their production environment, so it is very critical for us.

Can you please analyse this issue and provide a fix for this asap.

Thanks,
Neha

Hi,


Thanks for your posting and using Aspose.Cells.

After initial investigation, we were able to observe your mentioned issues. We will look into it further and create separate tickets for each of your issues and update you asap.

Hi,


Thanks for your posting and using Aspose.Cells.

We have tested your issues with the following sample code using the latest version: Aspose.Cells for Java v16.10.2 and found the issues as per your screenshots.

We have logged these issues in our database for investigation. We will look into them and fix these issues. Once the issue are resolved or we have some other update for you, we will let you know asap.

These issues have been logged as

  • CELLSJAVA-42026 - Vertical Axis of chart RenderTest_17 in sheet CarillionAmey is wrong
  • CELLSJAVA-42027 - Vertical Axis of chart RenderTest_10 in sheet Georgraphic.Sector is wrong
  • CELLSJAVA-42028 - Vertical Axis of chart RenderTest_11 in sheet Georgraphic.Sector is wrong
  • CELLSJAVA-42029 - Vertical Axis of chart RenderTest_20 in sheet ME market is wrong
  • CELLSJAVA-42030 - Horizontal Axis of chart RenderTest_7 in sheet Mix change is wrong
  • CELLSJAVA-42031 - Vertical Axis of chart RenderTest_24 in sheet OB vis is wrong
  • CELLSJAVA-42032 - Vertical Axis of chart RenderTest_22 in sheet OB is wrong
  • CELLSJAVA-42033 - Vertical Axis of chart RenderTest_26 in sheet pipe is wrong
  • CELLSJAVA-42034 - Vertical Axis of chart RenderTest_3 in sheet Supplementary is wrong

I have also attached the source excel file, output pdfs generated with this code and the renamed screenshots for a reference.


Java
Workbook workbook = new Workbook(dirPath + “Example analyst model.xlsm”);

for(int i=0; i<workbook.getWorksheets().getCount(); i++)
{
Worksheet sheet = workbook.getWorksheets().get(i);

System.out.println(sheet.getName());

for(int j=0; j<sheet.getCharts().getCount(); j++)
{
Chart ch = sheet.getCharts().get(j);

String sheetchart = “sheet—” + sheet.getName() + “----chart----” + ch.getName();

ch.toPdf(dirPath + sheetchart + “.pdf”);
}
}

Hii,


Is there any update on this issue?

It’s a customer reported production issue with high severity and customer is asking us for its immediate fix.

Can you please look into this on priority?

Thanks,
Neha

Hi,


Thanks for your posting and using Aspose.Cells.

We have logged your comments for all of your issues and requested the product team to provide some fix or ETA for these issues. Once, there is some update for you, we will let you know asap.

The comment was logged for all of these issues.

  • CELLSJAVA-42026 - Vertical Axis of chart RenderTest_17 in sheet CarillionAmey is wrong
  • CELLSJAVA-42027 - Vertical Axis of chart RenderTest_10 in sheet Georgraphic.Sector is wrong
  • CELLSJAVA-42028 - Vertical Axis of chart RenderTest_11 in sheet Georgraphic.Sector is wrong
  • CELLSJAVA-42029 - Vertical Axis of chart RenderTest_20 in sheet ME market is wrong
  • CELLSJAVA-42030 - Horizontal Axis of chart RenderTest_7 in sheet Mix change is wrong
  • CELLSJAVA-42031 - Vertical Axis of chart RenderTest_24 in sheet OB vis is wrong
  • CELLSJAVA-42032 - Vertical Axis of chart RenderTest_22 in sheet OB is wrong
  • CELLSJAVA-42033 - Vertical Axis of chart RenderTest_26 in sheet pipe is wrong
  • CELLSJAVA-42034 - Vertical Axis of chart RenderTest_3 in sheet Supplementary is wrong

Hi,

Thanks for considering Aspose.Cells.

We are afraid, your issues cannot be fixed because they are too complex for us. The maximum and minimum value of axis is automatic. We cannot do exactly same as Excel.

PS
Our rule is, if the labels of axis is not overlapping, we think it is ok.


Hello,


Thanks for your response.


We understand that maximum and minimum value of axis is automatic in these cases and hence the calculation may be complex. However, while trying to understand the Excel behavior in this area, we encountered certain articles about how chart axis limits are determined which we thought to share with you.


http://peltiertech.com/how-excel-calculates-automatic-chart-axis-limits/

`https://support.microsoft.com/en-gb/kb/214075`

`https://support.microsoft.com/en-gb/kb/101939`


Since these issues are reported by one of our main customers in the production environment, sensitivity of these issues is very high for us. As per our customer, the data in output should appear "as is" in the output and such kind of disparities in the output generated by Aspose makes the data less intuitive.


Thanks,

Neeraj

Hi,


Thanks for your posting and using Aspose.Cells.

We have logged your comment in our database for investigation. We will look into it and update you. Once, there is some news for you, we will let you know asap.

Hi,

Thanks for the articles. They are useful.

We have considered the rules mentioned in the articles. But excel uses more rules.

We have created 2 excel files to explain 2 rules. One is auto values that depend on size of chart. The other is auto values that depend on view scale of worksheet.

Now we cannot do well for the 2 rules. We have lots of excel files, most of them are provided by our users. By analyzing these files, we get lots of such rules.

As the view scale is too import. Every time when we modify the program, we spend lot of time to test. In most cases, we get contradictory result, some test cases that were giving good results later give error. So we need to take care of modifying the rules.

Please check the attachment. The scales of value axis depend on height of chart and view scale of worksheet.