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

Free Support Forum - aspose.com

Legend shows categories until saved

Please see the chart in the attachment “Initial File.pptx”. This is the legend that displays when this chart is generated by Aspose.Slides (version 15.9.0). The labels showing are the categories and not the series.

If you save the file and reopen (“Post File.pptx”) the legend now shows the series label which is correct.

Unfortunately I have not been able to write a short sample that can reproduce this problem, but I was hoping you could take a look at the files and let me know if you see anything wrong.


Hi Shaun,

Thank you for posting.

I have observed your comments and worked with the data shared by you. I have been able to notice the specified problem but Aspose.Slides is not modifying anything. If the presentation is loaded and saved then the generated presentation is exactly as the source presentation. Its the PowerPoint which makes the change and chart legend is modified after saving it. The problem appears to be with the source file and Aspose.Slides is working as expected.

I hope this will clarify the concept. Please share if I may help you further in this regard.

Best Regards,


The first file is created by Aspose.Slides from scratch. It is doing something wrong with the series labels that is fixed when you save and reopen the file.


Hi Shaun,

I have observed your comments and like to request you to please share with us the sample code to reproduce the source file so that we may investigate it further to help you out.

Best Regards,

Finally found a way to reproduce. The cause is setting the marker type to None for each data point.

public static void main(String[] args) throws Exception {
final Presentation pres = new Presentation();
final IChart c = pres.getSlides()
0, 0, 475, 150);
final IChartData d = c.getChartData();
final IChartDataWorkbook wb =
Random r = new Random();
IChartSeries s =
wb.getCell(0, 0, 1, “Series”),
for(int i = 1; i <= 7; i++) {
wb.getCell(0, i, 0, Integer.toString(2004+i)));
wb.getCell(0, i, 1, r.nextDouble()*100.0));
pres.save(“D:/test.pptx”, SaveFormat.Pptx);
Desktop.getDesktop().open(new File(“D:/test.pptx”));
Hi Shaun,

I have observed your requirements and worked with the code shared by you. I have been able to reproduce the issue. A ticket with ID SLIDESJAVA-35107 has been logged in our issue tracking system to further investigate and resolve the issue.This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

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

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