How To get Value when zooming in chart

Thread is closed for posting
4 posts, 0 answers
  1. JBA
    JBA avatar
    2 posts
    Member since:
    Jan 2012

    Posted 18 Apr 2012 Link to this post

    Hi,

    I'm trying to use chart Zoom event in Asp.net. How can I obtain x-y values from Chart Zoom event args ?

    First of all I  bind a data to my chart after user zooms, according to the zoom args I want to bind another data source to chart because of performance issue. How can I manage my plan ?

    tnx.

  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 23 Apr 2012 Link to this post

    Hi Javad,

    Extracting the selected x and y values is not possible with out-of-the-box means. However, I think that you will be able to manually calculate these values in the Zoom event:
    void radChart1_Zoom(object sender, ChartZoomEventArgs e)
    {
     floatxScrollOffset = this.radChart1.ClientSettings.XScrollOffset;
     floatyScrollOffset = this.radChart1.ClientSettings.YScrollOffset;
     
     floatxScale = this.radChart1.ClientSettings.XScale;
     floatyScale = this.radChart1.ClientSettings.YScale;
    }
     
    I hope that the above suggestion is of help.

    Greetings,
    Petar Marchev
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. JBA
    JBA avatar
    2 posts
    Member since:
    Jan 2012

    Posted 23 Apr 2012 Link to this post

    i need to get value of xAxis, yAxis data on chart.
    for ex: when user zoom in value (7,6), we give (2 , 1.3) in zooming event.

  5. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 26 Apr 2012 Link to this post

    Hello Javad,

    I am not sure what is your question here.

    It is not possible for me to give a general solution for this, as it depends on how you have set up the series mappings. However, I believe that extracting the selected x and y values is possible and it is SeriesMapping-specific.

    For instance, if you know that you x values range from 50 to 150 and in the zoom event handler the xScale is 2.0 and the xScrollOffset is 0.25 - then the selected x range is [75, 125].  

    Kind regards,
    Petar Marchev
    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