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

Free Support Forum - aspose.com

Data Labels are overlapping with Chart Area in Chart's PNG

Hello,

I am using Aspose.Cells v8.6.3.4 to generate PNG of chart - WEPCaps in the attached excel file. In the PNG output, the data labels are overlapping with the Chart area of the pie-chart.
When comparing actual chart with Aspose-generated PNG, there is a difference in the space between data-labels and chart-area. The space is less in case of Aspose-generated PNG due to which they overlap (Please refer to the attached screenshot - "text overlapping with chart issue.png").

Following code is used to generate the output:

Workbook workbook = new Workbook("pie chart.xlsx");
WorksheetCollection ws = workbook.getWorksheets();
String worksheetName = "Sheet1";
Chart chart = ws.get(worksheetName).getCharts().get("WEPCaps");
chart.toImage("D:\\response_8.6.3.4.png");
Can you please analyse this issue.

Thanks,
Neha

Hi,


Thanks for the template files, screenshot and sample code.

After an initial test, I observed the issue as you mentioned by using your template file with sample code. I found that data labels are overlapping with chart area when rendering chart to image or PDF file format as per your attached screenshot. When comparing actual chart with chart in the image/PDF, there is a difference in the space between data-labels and chart-area. The space is less in case of Aspose.Cells generated PNG/PDF due to which they overlap.
e.g
Sample code:

Workbook workbook = new Workbook(“pie+chart.xlsx”);
WorksheetCollection ws = workbook.getWorksheets();
String worksheetName = “Sheet1”;
Chart chart = ws.get(worksheetName).getCharts().get(“WEPCaps”);
chart.toImage(“out1response_8.6.3.4.png”);

I have logged a ticket with an id “CELLSJAVA-41691” 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.

Please try the new fix for data labels being overlapping issue. i.e CELLSJAVA-41691.

Please download and try the latest fix: Aspose.Cells for Java v8.7.0.4 and let us know your feedback.

The issues you have found earlier (filed as CELLSJAVA-41691) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.