Axis max, min after Zoom

Thread is closed for posting
4 posts, 0 answers
  1. Flash
    Flash avatar
    3 posts
    Member since:
    Jan 2016

    Posted 22 Mar 2016 Link to this post

    Hello, Telerik

    I wonder, can i get max|min axis values of visible area after zoom and pan? 

  2. Adrian
    Adrian avatar
    174 posts

    Posted 25 Mar 2016 Link to this post


    Thank you for contacting us.

    You can get the visible range of the axis using its visibleRange property. Please consider the code below:
    TKRange *visibleRange = _chart.xAxis.visibleRange;

    Should you have further questions, do not hesitate to contact us.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Mikolaj
    Mikolaj avatar
    1 posts
    Member since:
    Jan 2017

    Posted 16 Jan 2017 Link to this post


    I can't get this visibleRange property in C# code. Is is implemented in c# too? 

  4. Todor
    Todor avatar
    798 posts

    Posted 19 Jan 2017 Link to this post


    The VisibleRange property is not implemented in Xamarin.iOS. Here's how you can manually calculate it from the Range property:

    double minimum = ((NSNumber)chart.XAxis.Range.Minimum).DoubleValue;
    double maximum = ((NSNumber)chart.XAxis.Range.Maximum).DoubleValue;
    double numericRange = maximum - minimum;
    double vMin = minimum + chart.XAxis.Pan;
    double vMax = vMin + numericRange / chart.XAxis.Zoom;

    Then you can use the vMin and vMax values according to your requirements.

    I hope this information helps. 

    Telerik by Progress
    Want to build beautiful Android apps as well? Check out UI for Android which enables the same set of scenarios, allowing you to create the same great app experience on both iOS and Android.
Back to Top