After zooming how I can zoom out given chart ?

Thread is closed for posting
6 posts, 0 answers
  1. ajmal
    ajmal avatar
    3 posts
    Member since:
    Nov 2008

    Posted 03 Dec 2008 Link to this post

    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.
  2. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 03 Dec 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Keith
    Keith avatar
    10 posts
    Member since:
    Feb 2009

    Posted 10 Feb 2009 Link to this post

    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
  5. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 13 Feb 2009 Link to this post

    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.
  6. Satish
    Satish avatar
    10 posts
    Member since:
    Apr 2012

    Posted 22 May 2012 Link to this post

    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.     
  7. Giuseppe
    Admin
    Giuseppe avatar
    2363 posts

    Posted 25 May 2012 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017