alignment property Null safety

ChartAlignment alignment

Aligns the axis title.

It is applicable for both vertical and horizontal axes.

  • ChartAlignment.near, moves the axis title to the beginning of the axis

  • ChartAlignment.far, moves the axis title to the end of the axis

  •, moves the axis title to the center position of the axis.

Defaults to

Widget build(BuildContext context) {
   return Container(
       child: SfCartesianChart(
           primaryXAxis: NumericAxis(
                title: AxisTitle(
                  text: 'Axis Title',
                  alignment: ChartAlignment.far,


final ChartAlignment alignment;