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

Axis max, min after Zoom

3 Answers 101 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Flash
Top achievements
Rank 1
Flash asked on 22 Mar 2016, 01:36 PM

Hello, Telerik

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

3 Answers, 1 is accepted

Sort by
0
Adrian
Telerik team
answered on 25 Mar 2016, 08:56 AM
Hello, 

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.

Regards,
Adrian
Telerik
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
0
Mikolaj
Top achievements
Rank 1
answered on 16 Jan 2017, 11:37 AM

Hi, 

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

0
Todor
Telerik team
answered on 19 Jan 2017, 02:23 PM
Hi,

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. 

Regards,
Todor
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.
Tags
Chart
Asked by
Flash
Top achievements
Rank 1
Answers by
Adrian
Telerik team
Mikolaj
Top achievements
Rank 1
Todor
Telerik team
Share this question
or