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

Right Click Export option for Guages

2 Answers 16 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
Madhav Joshi
Top achievements
Rank 2
Madhav Joshi asked on 30 Oct 2012, 12:07 PM
Hi Team,
I implemented RadCharts and Gauges into our Dashboard and "Export to PDF" option works fantastic with RadChart but when it comes to Guages doesn't seem to work , its just because guages do not have ExportToImage property which is present for RadChart.  Below is code i used for exporting.

In XAML :
<telerik:RadChart Name="chartMileStone" >
<
telerik:RadContextMenu.ContextMenu>

<telerik:RadContextMenu ItemClick="exportToPDF">

<telerik:RadMenuItem Header="Save as PDF"/>

</telerik:RadContextMenu>

</telerik:RadContextMenu.ContextMenu>
</telerik:RadChart>


In XAML.cs :

        private void exportToPDF(object sender, Telerik.Windows.RadRoutedEventArgs e)

        {

            RadChart radChart = (RadChart)((Telerik.Windows.Controls.RadContextMenu)(sender)).UIElement;

            ChartExporter.SaveAsPDF(radChart);

        }


I even Replaced RadChart in Above code with guage  type and found that Property( ExportToImage ) is missing for the guages.

Please help me to solve this issue.

2 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 02 Nov 2012, 07:40 AM
Hello Mady,

Presently, the gauge control does not have built-in feature for exporting it to PDF document. But it is possible using the PdfFormatProvider which allows to export the RadDocument to PDF. You can create the document and you can include into it the image of the gauge which you can get using the ExportExtensions.ExportToImage method.
I have attached a sample solution.
I hope it helps.

Regards,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Madhav Joshi
Top achievements
Rank 2
answered on 02 Nov 2012, 07:50 AM
Hi Andrey ,

Thanks for the reply. Helped a lot . Will try implementing your solution to overcome my difficulty :)
Tags
Gauge
Asked by
Madhav Joshi
Top achievements
Rank 2
Answers by
Andrey
Telerik team
Madhav Joshi
Top achievements
Rank 2
Share this question
or