ChartToImage Method (String)

Creates the chart image and saves it to a file. The extension of the file name determines the format of the image.

Namespace:  Aspose.Cells.Charts
Assembly:  Aspose.Cells (in Aspose.Cells.dll) Version: (21.5)
public void ToImage(
	string imageFile


Type: SystemString
The image file name with full path.

The format of the image is specified by using the extension of the file name. For example, if you specify "myfile.png", then the image will be saved in the PNG format. The following file extensions are recognized: .bmp, .gif, .png, .jpg, .jpeg, .tiff, .tif, .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