|
1 | 1 | # How to Export Chart as Image in WinUI Chart
|
2 | 2 | This article provides a detailed walkthrough on how to export a [WinUI Cartesian Chart](https://www.syncfusion.com/winui-controls/cartesian-charts) as an image. You can export the chart view in your desired file format, with supported formats being **JPEG** and **PNG.**
|
3 | 3 |
|
| 4 | +The Syncfusion WinUI Chart control supports exporting rendered charts to image formats, enabling developers to preserve visual data for reporting, sharing, or archival purposes. |
| 5 | + |
| 6 | +## Overview |
| 7 | + |
| 8 | +The chart export functionality is exposed via the ExportToImage method in the SfCartesianChart and SfCircularChart classes. This method allows you to capture the current visual state of the chart and save it to a file or stream in various image formats. |
| 9 | + |
| 10 | +## Supported Image Formats |
| 11 | +You can export charts to the following formats: |
| 12 | +- PNG (lossless, widely supported) |
| 13 | +- JPEG (compressed, suitable for web) |
| 14 | + |
| 15 | +## Use Cases |
| 16 | + |
| 17 | +- Business Reporting: Export charts to image files for embedding in PDF or Word documents used in financial or operational reports. |
| 18 | +- Data Sharing: Share chart visuals with stakeholders via email, chat, or collaboration platforms without requiring access to the application. |
| 19 | +- Archival and Compliance: Save chart snapshots as part of audit trails or historical data records for regulatory compliance. |
| 20 | +- Presentation Materials: Include exported chart images in PowerPoint slides or dashboards for meetings and presentations. |
| 21 | +- Offline Access: Provide users with downloadable chart images for viewing when internet or application access is unavailable. |
| 22 | +- Documentation and Tutorials: Use chart images in technical documentation, user guides, or training materials to illustrate data insights. |
| 23 | +- Social Media and Marketing: Share chart visuals on social platforms to highlight trends, performance metrics, or product analytics. |
| 24 | + |
4 | 25 | ### Initialize SfCartesianChart:
|
5 | 26 |
|
6 | 27 | Set up the **SfCartesianChart** following the [ Syncfusion WinUI Cartesian Chart documentation.](https://help.syncfusion.com/winui/cartesian-charts/getting-started)
|
@@ -83,6 +104,10 @@ private async void Button_Click(object sender, RoutedEventArgs e)
|
83 | 104 |
|
84 | 105 | 
|
85 | 106 |
|
| 107 | +## Troubleshooting |
| 108 | + |
| 109 | +If you are facing a path too long exception when building this example project, close Visual Studio and rename the repository to short and build the project. |
| 110 | + |
86 | 111 | ### KB link
|
87 | 112 | For a more detailed, refer to the [Export Chart View as Image KB.](https://support.syncfusion.com/kb/article/18644/how-to-export-chart-as-image-in-winui-chart-sfcartesianchart)
|
88 | 113 |
|
0 commit comments