Skip to main content
A newer version of this page is available.

ChartControlExtension.ExportToImage(ChartControlSettings, Object, String, 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.v18.2.dll

Declaration

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

Parameters

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.

format ImageFormat

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

Returns

Type Description
ActionResult

An FileStreamResult object that sends the image.

See Also