ChartControlExtension.ExportToImage(ChartControlSettings, Object, String, Boolean, ImageFormat) Method

Creates an image file in the specified format from the chart with the specified settings and sends it as an action result.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v21.1.dll


public static ActionResult ExportToImage(
    ChartControlSettings settings,
    object dataObject,
    string fileName,
    bool saveAsFile,
    ImageFormat format


Name Type Description
settings ChartControlSettings

An ChartControlSettings object that stores settings of an exported chart.

dataObject Object

An object specifying a chart’s data source.

fileName String

A String value that specifies the target file name.

saveAsFile Boolean

true to display the File Download dialog; false to display the file with exported data within a page.

format ImageFormat

A System.Drawing.Imaging.ImageFormat value representing the format in which the chart is exported.


Type Description

An FileStreamResult object that sends the image.

See Also