dateFormat property

DateFormat? dateFormat
final

Formats the date-time axis labels. The default data-time axis label can be formatted with various built-in date formats.

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
          primaryXAxis: DateTimeAxis(dateFormat: DateFormat.y()),
       )
   );
}

Implementation

final DateFormat? dateFormat;