Please check your Excel file in Microsoft Excel Print Preview and you will see, your chart is missing there too. It is because the last sheet named Display has Print Area set to A1. Please delete it and your chart will render fine.
You can also delete it by the following code.
Java
//Remove the Print Area of this Worksheet
worksheet.getPageSetup().setPrintArea("");
Thank you @shakeel.faiz for replying.
Even after I cleared the print area, the chart is not present in the PDF. Please try it the attched file. This is the original file I am trying to convert to PDF with the same code posted by @HThagunna
Note: There are two charts in this updated file.
Issue: While converting to PDF, second chart (donut chart) goes missing.
Thanks for your posting and considering Aspose APIs.
We were able to observe this issue as shown in the following screenshot after converting your Excel file to Pdf and found, the second chart is missing.
This issue has been logged as
CELLSJAVA-42475 - Chart is missing in the output Pdf
Java
Workbook wb = new Workbook(dirPath + "Aspose_Cells_Clear_PrintArea.xlsx");
wb.save(dirPath + "out.pdf");