intervalType property
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 DateTimeIntervalType.auto
.
Also refer DateTimeIntervalType.
Widget build(BuildContext context) {
return Container(
child: SfCartesianChart(
primaryXAxis:
DateTimeAxis(intervalType: DateTimeIntervalType.years),
)
);
}
Implementation
final DateTimeIntervalType intervalType;