ChartToImage Method (String, ImageFormat)

Creates the chart image and saves it to a file in the specified format.

Namespace:  Aspose.Cells.Charts
Assembly:  Aspose.Cells (in Aspose.Cells.dll) Version: (21.6)
public void ToImage(
	string imageFile,
	ImageFormat imageFormat


Type: SystemString
The image file name with full path.
Type: System.Drawing.ImagingImageFormat
The format in which to save the image.

The format of the image is specified by using imageFormat. The following formats are supported: ImageFormat.Bmp, ImageFormat.Gif, ImageFormat.Png, ImageFormat.Jpeg, ImageFormat.Tiff, ImageFormat.Emf.

If the width or height is zero or the chart is not supported according to Supported Charts List, this method will do nothing. Please refer to Supported Charts List for more details.
See Also