intervalType property Null safety

DateTimeIntervalType intervalType

Customizes the date-time axis intervals. Intervals can be set to days, hours, milliseconds, minutes, months, seconds, years, and auto. If it is set to auto, interval type will be decided based on the data.

Defaults to

Also refer DateTimeIntervalType

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


final DateTimeIntervalType intervalType;