Save high quality graphic?

2 posts, 0 answers
  1. James
    James avatar
    119 posts
    Member since:
    Mar 2009

    Posted 10 Feb 2016 Link to this post


    I'm using the RadChartView, but guess this issue relates to any control, so am posting here.

    I'm using the ExportExtensions.ExportToImage to save the chart to disk. However, it's not exactly publication quality. Is there a way of increasing the resolution on export? I'll paste below the code I'm using.

    Thanks, James.


    SaveFileDialog dialog = new SaveFileDialog();
                dialog.DefaultExt = "*.png";
                dialog.Filter = "Files(*.png)|*.png";
                if (!(bool)dialog.ShowDialog())
                Telerik.Windows.Media.Imaging.PngBitmapEncoder enc = new Telerik.Windows.Media.Imaging.PngBitmapEncoder();
                using (Stream fileStream = dialog.OpenFile())
                    if (CircularGraphCrosstabs.Visibility == System.Windows.Visibility.Visible)
                        Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(CircularGraphCrosstabs, fileStream, enc);
                        Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(GridCrosstabsChart, fileStream, enc);

  2. Yana
    Yana avatar
    4942 posts

    Posted 15 Feb 2016 Link to this post

    Hello James,

    I would suggest you export the ChartView to PDF instead using our RadPdfProcessing API - please take a look at the ChartView Exporting online example at the following link:
    It gives the option to export the ChartView to PDF as well as PNG ( check the ComboBox on the left) - you can try both and compare the results. Indeed, using RadPdfProcessing requires additional coding, but it provides higher resolution of the exported ChartView.

    Additionally, you could check the Document Processing Integration section inside the Export Support topic for more information and examples on the suggested approach.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top