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.
Unfortunately, activation email could not send to your email. Please try again.

How to show the fixed number of data points?

SfChart provides support to maintain the chart with fixed number of datapoints from the end or start of axis and scroll to view the previous data points. By using AutoScrollingDelta property of ChartAxis, you can set the delta value to maintain the particular no of data points in chart. By adding ChartZoomPanBehavior to the chart, you can scroll to see the previous data points.

The following code illustrates how to maintain the fixed number of datapoints from end position. Use the ChartAutoScrollingMode property to maintain the fixed number of data points from start position.

XAML

 

C#

 

 Output:

F:\KBArticles\autoscroll.png

 

Similarly, in DateTimeAxis, you can apply auto scrolling delta value in years, months, days, hours, minutes, seconds and milliseconds to describe the date-time component for auto scrolling interval type in DateTimeAxis.

The following code illustrates how to apply AutoScrollingDeltaType to DateTimeAxis.

XAML

 

C#

 

 Output:

Article ID: Published Date: Last Revised Date: Platform: Control:
8621 03/23/2018 03/23/2018 Xamarin.Forms SfChart
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.