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

Free Support Forum - aspose.com

Export Chart to Image

Is there a way to save a Aspose.Slides Chart object to an image file (similar to the way that the Aspose.Cells.Chart.ToImage() function works)?

Hello Dear,



Please visit the following thread link for your kind reference where by you will find information for getting chart image. Please share if I may be of any further help in this regard.

Cannot export to ppt using MS Powerpoint-only opens with Open Office



Thanks and Regards,

The thread that you referenced contains logic for doing this with Java libraries. I am looking for a .net method?

I would also like to make a feature request to add an Aspose.Slides.Chart.ToImage() method (that would work that same way that the Aspose.Cells.Chart.ToImage() method works).

Hello Dear,

Please use the code snippet shared over this documentation link for your kind reference. I also like to elaborate that when the chart is added as Ole object in PowerPoint, its actual native property does not change. The chart belongs to Excel and Aspose.Cells has to be used in order to get the chart image. Hope it clear the concept to you.

Thanks and Regards,

Thanks for the link. However, I am not interested in adding a chart as an OLE object. I want to add a ChartEx object to a SlideEx object that belongs to a PresentationEx object, using code similar to here.

//Instantiate PresentationEx class that represents PPTX file


PresentationEx pres = new PresentationEx();



//Access first slide


SlideEx sld = pres.Slides[0];



// Add chart with default data


ChartEx chart = sld.Shapes.AddChart(ChartTypeEx.ClusteredColumn, 0, 0, 300, 300);


// logic to fill in the data for the chart, etc


// Here is what I want to do:

var filePath = “c:\temp”;

Image image = chart.ToImage(filePath, new Aspose.Cells.Rendering.ImageOrPrintOptions

{ ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg,

Quality = 95 });

The last line in the code above is what I want to do, but am unable to do (either through code in the Aspose library, or through custom code). Nothing to do with an OLE object - rather, I want to take the rendering of the chart, as it would be displayed in powerpoint, and save it to an Image object.

Hello Dear,

I like to share that the desired functionality is not available in Aspose.Slide for .NET. An issue with ID 30409 has been created in our issue tracking system to provide the requested feature. We will share further information with you once the issue is resolved.

We are sorry for your inconvenience,

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