autoScrollingDelta property

int? autoScrollingDelta
final

The number of data points to be visible always in the chart.

For example, if there are 10 data points and autoScrollingDelta value  is 5 and autoScrollingMode is AutoScrollingMode.end, the last 5 data  points will be displayed in the chart and remaining data points can be  viewed by panning the chart from left to right direction. If the autoScrollingMode is AutoScrollingMode.start, first 5 points will be displayed and remaining data points can be viewed by panning the chart  from right to left direction.

If the data points are less than the specified autoScrollingDelta value,  all those data points will be displayed.

If the axis contains both initialVisibleMinimum or initialVisibleMaximum and autoScrollingDelta, the autoScrollingDelta will be restricted. Because both properties tends to define visible the number of data points in the chart and so initialVisibleMinimum and initialVisibleMaximum takes priority over autoScrollingDelta.

It always shows the recently added data points and scrolling will be reset to the start or end of the range, based on autoScrollingMode property's value, whenever a new point is added dynamically.

Defaults to null.

Widget build(BuildContext context) {
    return Container(
        child: SfCartesianChart(
           primaryXAxis: NumericAxis(
             autoScrollingDelta: 3,
               ),
        )
    );
}

Implementation

final int? autoScrollingDelta;