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 display fixed number of data points in Chart

Platform: Xamarin.Forms |
Control: SfChart

Auto scrolling delta feature in SfChart is used to ensure that the specified range of data is always visible in the chart. You can view the remaining data points by scrolling. It always shows the recently added data points at the end, and scrolling will be reset to the end of the range whenever a new point is added. The following code examples illustrate how to specify the auto scrolling delta value for different axis types.

Category axis

The AutoScrollingDelta property of ChartAxis is used to customize the number of visible points to be displayed in chart when using the category axis.


       <chart:CategoryAxis AutoScrollingDelta="3"/>



chart.PrimaryAxis = new CategoryAxis
      AutoScrollingDelta = 3





Numerical axis

The AutoScrollingDelta property of ChartAxis is used to customize the visible range to be displayed in chart when using the numerical axis.


       <chart:NumericalAxis AutoScrollingDelta="10"/>



chart.PrimaryAxis = new NumericalAxis
      AutoScrollingDelta = 10





Date-Time axis

The AutoScrollingDelta property of ChartAxis is used to customize the visible range to be loaded in chart when using the date-time axis, and the AutoScrollingDeltaType property of DateTimeAxis is used to specify the date-time component for AutoScrollingDelta value.


       <chart:DateTimeAxis AutoScrollingDelta="3" AutoScrollingDeltaType="Months"/>



chart.PrimaryAxis = new DateTimeAxis
      AutoScrollingDelta = 3,
      AutoScrollingDeltaType = DateTimeDeltaType.Months





2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
You must log in to leave a comment
Naveen C Ramachandrappa
Jun 14, 2017
This always displays the last set of bars based on the number specified but I would want to show the first few bars and enable user to scroll further to see the rest. Is it possible? Reply
Saravana Pandian Murugan [Syncfusion]
Jul 20, 2017

You can achieve this requirement by using ZoomFactor/ZoomPosition of ChartAxis. Please find the code snippet below. 


Code Example: 



chart.PrimaryAxis = new CategoryAxis() 



                ZoomFactor = 0.5, 


                ZoomPosition = 0       







ZoomFactor defines the percentage of visible range from the total range of axis. For instance, when the Range is from 0 to 100 and ZoomFactor is 0.5, the visible range will be 0 to 50 or 50 to 100 (the start of the range will be determined by ZoomPosition).  




ZoomPosition defines the start of the range of values that need to be displayed as a result of ZoomFactor. For the above scenario, when the ZoomPosition is 0.25 then the visible range will be from 25 to 75. 


Note: The sum of ZoomFactor and ZoomPosition must also fall within the value of 0 to 1.  


Jul 14, 2017

+1 Naveen


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