Hi,
I’ve found bug in rendering picture from MS Excel chart.
Chart generated by MS Excel 2013 and image generated by Aspose 8.3.2 differs.
I attached chart located in original Excel file and picture generated by Aspose 8.3.2. I put red arrows in places where these charts differ. You can see that:
1. When values are below or equal 0, there is less space between number and a bar.
2. Value 0.0 is rendered on the left side instead of right.
3. Data labels are not rendered in one line like in Excel file. Longer data labels are broken into two lines.
Could you please verify this issue and let me know why does it happen?
Best regards,
Aleksander Gozdek
Hi Aleksander,
Thank you for contacting Aspose support.
I have checked your provided spreadsheet to evaluate your presented scenario, however, the spreadsheet contains the picture of the chart instead of the chart it self. Could you please confirm if you have attached the correct spreadsheet for investigation? Moreover, it would be appropriate if you can also provide the code snippet to extract the chart from spreadsheet.
Before you move forward to provide us the above requested, please give a try to the latest version of
Aspose.Cells for Java 8.3.2 on your end to see if it makes any difference.
Hi Babar,
Excuse me for the wrong spreadsheet. Now I attached proper excel and code that I used to generate wrong image. I am using the latest Aspose.Cells 8.3.2 for Java.
Hi,
Thanks for the template file and sample code.
After an initial test, I observed the following issues when rendering chart (in your template file) to image as you mentioned via your screen shot:
- When values are below or equal 0, there is less space between number and a bar. ------ verified
- Value 0.0 is rendered on the left side instead of right. ----- verified
- Data labels are not rendered in one line like in Excel file. Longer data labels are broken into two lines. ------ verified
I am using the following sample code with your template file.
e.g
Sample code:
Workbook workbook = new Workbook("state_highlight_charts.xls");
//Get the first worksheet.
Worksheet sheet = workbook.getWorksheets().get("Sheet");
Chart chart = sheet.getCharts().get("EmpSec");
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.setImageFormat(ImageFormat.getPng());
imgOptions.setHorizontalResolution(300);
imgOptions.setVerticalResolution(300);
imgOptions.setOnePagePerSheet(true);
imgOptions.setOnlyArea(false);
//Save the chart image file.
chart.toImage(new FileOutputStream("outchart1.png"), imgOptions);
I have logged a ticket with an id "CELLSJAVA-41184" for your issue. We will look into it soon.
Once we have any update on it, we will let you know here.
Thank you.
Hi,
Thanks for using Aspose.Cells for Java.
Please download and try this fix: Aspose.Cells for Java v8.3.2.4 and let us know your feedback.
The issues you have found earlier (filed as CELLSJAVA-41184) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.