We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the axis range based on condition

Platform: Xamarin.Forms |
Control: SfChart

In SfChart, the minimum and maximum ranges of an axis are calculated automatically based on the provided data. You can also set its range explicitly using the Minimum and Maximum properties of the respective axis.

There might be situation in which you need to have the control over the auto-calculated range. At this situation, you can subscribe the ActualRangechanged event of the respective axis and modify the auto-calculated minimum and maximum values that you got in the event arguments. This event will be fired whenever the actual range of the corresponding axis changes.

In the following code example, the maximum visible range is always kept to 80 whenever the overall range of the axis exceeds 80,












2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile