Skip to main content

ASPxClientWebChartControl.SaveToDisk(format) Method

Exports a chart to a file in the specified format, and saves it to disk, using the specified file name.

Declaration

SaveToDisk(
    format: string,
    filename?: string
): void

Parameters

Name Type Description
format string

A string value specifying the format, to which a chart should be exported.

filename string

A string value specifying the file name, to which a chart should be exported. If this parameter is missing or set to an empty string, then the created file will be named using the client-side name of a chart.

Remarks

The following export formats can be used as a format parameter passed to the SaveToDisk method:

  • “pdf”
  • “xls”
  • “xlsx”
  • “rtf”
  • “mht”
  • “png”
  • “jpeg”
  • “bmp”
  • “tiff”
  • “gif”

Note

Since exporting a chart to PDF is based upon the Pdf.Core library, don’t forget to add a reference to the DevExpress.Pdf.Core assembly into your project’s References list.

For more information, refer to How to: Export a Chart.

See Also