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: 20.9.0.0 (20.9)
Syntax
public void ToImage(
	string imageFile,
	ImageFormat imageFormat
)

Parameters

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

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