alignment property Null safety

ChartAlignment alignment

Aligns the chart title.

The alignment change is applicable only when the width of the chart title is less than the width of the chart.

  • ChartAlignment.near places the chart title at the beginning of the chart

  • ChartAlignment.far moves the chart title to end of the chart

  • places the title at the center position of the chart’s width.

Defaults to

Also refer ChartAlignment.

Widget build(BuildContext context) {
  return SfCartesianChart(
    title: ChartTitle(
      text: 'Chart Title',
      alignment: ChartAlignment.near


final ChartAlignment alignment;