This is a migrated thread and some comments may be shown as answers.

Export to Excel / Image option

3 Answers 159 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Naren
Top achievements
Rank 1
Naren asked on 22 Nov 2010, 03:52 PM
Hi,
I am using RadChart inside Docking control and want Export Chart to Excel and Export to Image functionality.

I am using RadChart.ExportToImage() /RadChart.ExportToExcelML()  function for this. but this gives only the chart data and did not give chart title shown in RadDocumentPane's Header .

As shown in attached image i also want to include ChartTitle (Displayed in RadDocumentPane of Docking control) in Export Image/Excel..........

How can i achieve this......
Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Naren
Top achievements
Rank 1
answered on 24 Nov 2010, 08:12 AM
Hi,
is there any workaround for this?
0
Ves
Telerik team
answered on 25 Nov 2010, 08:37 AM
Hello Naren,

You can take advantage of the Telerik.Windows.Media.Imaging.ExportExtensions static class and its ExportToImage and ExportToExcleMLImage methods to export the container of the chart along with the title. Here is an example:

private MemoryStream GetImage()
{
    MemoryStream stream = new MemoryStream();
    FrameworkElement element = // your container goes here
   
    Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(
        element, stream, new Telerik.Windows.Media.Imaging.PngBitmapEncoder());
   
    return stream;
}


Best regards,
Ves
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Naren
Top achievements
Rank 1
answered on 26 Nov 2010, 06:47 AM
Thank you Ves,
It is right what i was looking for..

can you answer my one more query in the post with following link
http://www.telerik.com/community/forums/silverlight/gridview/wrapping-and-autogenerated-numbering.aspx#1434334
Tags
Chart
Asked by
Naren
Top achievements
Rank 1
Answers by
Naren
Top achievements
Rank 1
Ves
Telerik team
Share this question
or