[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Collapse]Chart Control
   [Expand]Product Information
   [Expand]Getting Started
   [Expand]Fundamentals
   [Collapse]Concepts
    [Collapse]Creating Charts
     [Expand]2D Chart Types
     [Expand]3D Chart Types
     [Expand]Providing Data
     [Expand]Data Representation
     [Expand]Appearance Customization
     [Collapse]Miscellaneous
       Storing the Chart Layout
       How to: Export a Chart
    [Expand]Chart Elements
    [Expand]End-User Interaction
     Supported Browsers
     Adding a Web Chart
     Handling Client-side Scripts
     Medium Trust Support
     Web Farm and Web Gardens Support
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Examples
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[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]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[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

The Chart Control's client-side representation contains an image that displays the chart and a JavaScript object that allows you to use the chart's client-side API. The client-side ASPxClientWebChart control provides the ASPxClientWebChartControl.SaveToDisk and ASPxClientWebChartControl.SaveToWindow methods. These methods allow you to export the chart to one of the available formats (PDF, XLS, XLSX, MHT, RTF, RTF, PNG, JPEG, BMP, TIFF and GIF).

Note that you cannot use the server-side control's WebChartControl.SaveToFile and WebChartControl.SaveToStream methods on the client-side to save the control's layout.

Note

The Chart Control requires the XtraPrinting Library to export the chart to all formats except for images. Your project should contain the DevExpress.XtraPrinting assembly reference to use the print API.

Important

The Chart Control sends a post back request to the server to generate a file that contains the export result. You should configure the chart control on the post back request the same as on the initial page load to print the chart correctly. Otherwise, the exported chart differs from the chart on the page.

Refer to the How to export a web chart on the client side topic for an example.

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