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

After zooming how I can zoom out given chart ?

5 Answers 131 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
ajmal
Top achievements
Rank 1
ajmal asked on 03 Dec 2008, 12:02 PM
Hello All,

Is anybody knows after zooming radchart, is there any method or alternatives are available ?
or
How I can zoom out given rad chart back into original screen ?
(I used latest rad control version 2008)


Thanks in advance.

5 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 03 Dec 2008, 02:23 PM
Hi ajmal,

You can use the zoomOut / resetZoom client-side methods. You can find more information on the client-side API here.

Hope this helps.


All the best,
Manuel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Keith
Top achievements
Rank 1
answered on 10 Feb 2009, 09:35 PM
Hello there... after looking at the API, I added this code to my ZoomOut JavaScript function...

function ZoomOut()
{
var chart = $find("<%=RadChart1.ClientID%>");
chart.zoomOut();

}

But I get the following error message when the page loads...

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Thanks for any guidance with it.

---Keith
0
Giuseppe
Telerik team
answered on 13 Feb 2009, 04:28 PM
Hello Keith,

We would suggest you to review the general troubleshooting section here.

If you receive exceptions such as "System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks" you need to move the code block (i.e. <% ... %>) outside of the head tag:

Incorrect:
 <head runat="server"
  <script type="text/javascript"
  var grid = $find('<%= RadGrid1.ClientID %>'); 
  ... 
  </script> 
</head> 
<body> 
... 
</body>  

Correct:
 <head runat="server"
<telerik:RadCodeBlock id="RadCodeBlock1" runat="server"
   <script type="text/javascript"
       var grid = $find('<%= RadGrid1.ClientID %>'); 
       ... 
   </script> 
</telerik:RadCodeBlock> 
</head> 
<body> 
... 
</body> 
or 
<head runat="server"
</head> 
<body> 
   <telerik:RadCodeBlock id="RadCodeBlock1" runat="server"
   <script type="text/javascript"
       var grid = $find('<%= RadGrid1.ClientID %>'); 
       ... 
   </script> 
   </telerik:RadCodeBlock> 
</body>    


Hope this helps.


All the best,
Manuel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Satish
Top achievements
Rank 1
answered on 22 May 2012, 02:24 PM
Hello,

1> Is this possible to do the chart Zoom out by User Mouse scrolling? I tried but it is messing up the results.
If possible please let me know, how it would be.

2> If the Mouse scrolling zoom option won't support for Radchart, I have to do it programatically, We have to provide button -Click event to Zoom out Is that correct?


Thank You,
Satish.     
0
Giuseppe
Telerik team
answered on 25 May 2012, 05:16 PM
Hello Satish,

Unfortunately zoom out action is not supported with mouse scrolling. You can use the client-side API to achieve the desired effect.


Greetings,
Giuseppe
the Telerik team
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 their blog feed now.
Tags
Chart (Obsolete)
Asked by
ajmal
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Keith
Top achievements
Rank 1
Satish
Top achievements
Rank 1
Share this question
or