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

Copy and Paste Radchart

1 Answer 81 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Palaniappan
Top achievements
Rank 1
Palaniappan asked on 19 Jun 2013, 12:27 PM
Hi,

   I have already sent mail regarding Rad chart copy and paste option code. But you do not reply me.  Can you reply me for Rad chart copy and paste option client side code?

Regards
Palaniappan R

1 Answer, 1 is accepted

Sort by
0
Rosko
Telerik team
answered on 24 Jun 2013, 10:19 AM
Hello,

The following approach works only with IE:
<div>
        <asp:ScriptManager ID="ScriptManager" runat="server" />
        <telerik:RadChart ID="RadChart1" runat="server">
            <ClientSettings ScrollMode="Both" />
            <Series>
                <telerik:ChartSeries Name="Sales">
                    <items>
                        <telerik:ChartSeriesItem YValue="34">
                            <Label><TextBlock Text="Internet"></TextBlock></Label>
                        </telerik:ChartSeriesItem>
                        <telerik:ChartSeriesItem YValue="66">
                            <Label><TextBlock Text="Wholesale"></TextBlock></Label>
                        </telerik:ChartSeriesItem>
                        <telerik:ChartSeriesItem YValue="27">
                            <Label><TextBlock Text="Retail"></TextBlock></Label>
                        </telerik:ChartSeriesItem>
                    </items>
                </telerik:ChartSeries>
            </Series>
        </telerik:RadChart>
        <asp:Button runat="server" Text="Reset" ID="ResetZoom"  OnClientClick="copyImage();" />
        <script type="text/javascript">
            function copyImage() {
                var HeaderImage = document.getElementById('RadChart1');
                var controlRange;
                if (document.body.createControlRange) {
                    controlRange = document.body.createControlRange();
                    controlRange.addElement(HeaderImage);
                    controlRange.execCommand('Copy');
                }
                return false;
            }
        </script>
    </div>


After some research, it can be concluded that there is no easy way to achieve this for all browsers. You will need some third party plugin/library to achieve the desired effect. It is not specific to the control but to the web  technology that is used.

Regards,
Rosko
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Chart (Obsolete)
Asked by
Palaniappan
Top achievements
Rank 1
Answers by
Rosko
Telerik team
Share this question
or