New to Telerik UI for WPF? Download free 30-day trial


The RadChartView suite does not have a built-in functionality for exporting the chart, but there are several ways that you can utilize to achieve that.

Export RadChartView to PDF

You can export the charting components using the ExportUIElement example which implements exporting of UIElements with the RadPdfProcessing library. You can read about the example in the Export Support common article.

You can find a runnable example in our GitHub repository: Export UI Element to PDF.

Export RadChartView to Image

You can export the chart to an image using the Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage() method.

The following code snippets demonstrate how to use the ExportToImage() method.

<telerik:RadCartesianChart x:Name="chart" /> 

string filename = "ExportedChart.png";  
using (Stream fileStream = File.Open(filename, FileMode.OpenOrCreate)) 
    Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(this.chart, fileStream, new PngBitmapEncoder()); 

The ExportToImage() method expects that the UI element which will be exported is measured and arranged - otherwise, an exception will be thrown.

See Also

In this article