Dear Aspose Support Team,
I hope this message finds you well. We have encountered a critical bug in the Aspose.Slides for Java library, specifically related to incorrect chart display after export. Below are the details of the issue, along with the necessary information for your review:
Reproduction Steps:
-
Example presentation with an affected chart: ChartBugReproduction.zip (48.6 KB)
-
Code triggering the bug:
public void chartBugReproduction() throws FileNotFoundException {
Presentation presentation = new Presentation(
new FileInputStream(
new File("/path/to/ChartBugExample.pptx")));
presentation.save(new FileOutputStream(new File(
"/path/to/ChartBugExample-exported.pptx")), SaveFormat.Pptx);
}
Issue Description:
-
Expected Chart Appearance: image.png (29.4 KB)
-
Aspose Exported Chart Appearance: image.png (27.0 KB)
Observations:
- The issue seems to be related to incorrect chart series entries.
- When selecting the chart and opening “Select Data,” the legend entries indicate 3 missing references (#REF!): image.png (223.4 KB)
- In the original file, the selected entries are [A1, A2, A3, A4, A5], but in the exported file, they change to [A1, A2, #REF!, A5], which is causing the chart distortion.
- We attempted to use Aspose to find the incorrect series entries, but we can only identify the working ones (A1-A5).
var slide = presentation.getSlides().get_Item(0); for (var shape : slide.getShapes()) { if (shape instanceof IChart) { var chart = (Chart) shape; for(var series: chart.getChartData().getSeries()){ System.out.println(series.getName().getAsCells().get_Item(0).getValue()); } } }
- Clearing the list surprisingly removes the incorrect entries but doesn’t help us since we cant get the correct series back in the collection.
var slide = presentation.getSlides().get_Item(0); for (var shape : slide.getShapes()) { if (shape instanceof IChart) { chart.getChartData().getSeries().clear(); } }
Questions:
- Is this behavior expected? This is critical for our use case, and we seek clarification on whether this is a bug, intended functionality and how this could be fixed so we get a exported chart like in the original file.
Environment:
- Aspose.Slides version: 23.9
- Java version: 21
- Operating Systems: macOS 14.2.1 & Windows 11
Your prompt attention to this matter is highly appreciated. Please let us know if any additional information is required to investigate and resolve this issue.
Thank you for your assistance.
Best regards,
Justin Voitel
Domino informatics GmbH