[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Collapse]Chart Control
   [Expand]Getting Started
   [Expand]Charting Basics
   [Expand]Series Views
   [Expand]Chart Elements
   [Expand]Providing Data
   [Expand]Data Representation
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
    [Expand]Creating Charts
    [Expand]Chart Elements
    [Expand]End-User Interaction
    [Collapse]Producing Output
      How to: Save and Restore a Layout
      How to: Print a Chart and Show Its Print Preview
      How to: Export a Chart to PDF
      How to: Export a Chart to HTML and MHT
      How to: Export a Chart to XLS
      How to: Export a Chart to Image
   [Expand]Additional Resources
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

How to: Export a Chart to Image

The following example demonstrates how to export a chart to an image. The GetChartImage method returns the image in the specified format, while the SaveChartImageToFile writes the chart's image in the specified format to the specified path.

  • Create a ChartControl (see ChartControl) and populate it with data.


    Add references to the following assemblies to use the ChartControl in your application:

    • DevExpress.Data.v19.1.dll
    • DevExpress.Utils.v19.1.dll
    • DevExpress.XtraEditors.v19.1.dll
    • DevExpress.Charts.v19.1.Core.dll
    • DevExpress.XtraCharts.v19.1.dll
    • DevExpress.XtraCharts.v19.1.UI.dll

    See Deployment for more information.

  • Use the ChartControl.ExportToImage method to create an image from a chart.

Is this topic helpful?​​​​​​​