dateFormat property
DateFormat?
dateFormat
final
Formats the date-time category axis labels.
The axis label can be formatted with various built-in date formats.
By default, date format will be applied to the axis labels based on the interval between the data points.
Widget build(BuildContext context) {
return Container(
child: SfCartesianChart(
primaryXAxis: DateTimeCategoryAxis(dateFormat: DateFormat.y()),
));
}
Implementation
final DateFormat? dateFormat;