(Xamarin.)Android: how to keep zoom level after adding data and redrawing?


Hi all,

I know that in the iOS version, I can keep the current zoom level after adding data and redrawing when I set the AutoCalculateAxisRanges property to true.

There seems to be no corresponding property for the Android version. How can I achieve the same effect on Android as well without that property?


Hi vol714,

In the Android version of ShinobiCharts you can use the  setCurrentDisplayedRangePreservedOnUpdate  method on the Axis to control whether the displayed range is updated after a data load (true to preserve it). You can also query the Axis to find out what the current setting is by using the corresponding  isCurrentDisplayedRangePreservedOnUpdate  method.

In the Xamarin.Android version you would use the  CurrentDisplayedRangePreservedOnUpdate  property.

Hope that helps!