intervalType property

DateTimeIntervalType intervalType
final

Customizes the date-time category axis interval.

Intervals can be set to days, hours, minutes, months, seconds, years, and auto. If it is set to auto, the interval type will be decided based on the data.

Defaults to DateTimeIntervalType.auto.

Also refer DateTimeIntervalType.

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
          primaryXAxis:
          DateTimeCategoryAxis(intervalType: DateTimeIntervalType.years),
       )
   );
}

Implementation

final DateTimeIntervalType intervalType;