alignment property
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.nearplaces the chart title at the beginning of the chart -
ChartAlignment.farmoves the chart title to end of the chart -
ChartAlignment.centerplaces the title at the center position of the chart’s width.
Defaults to ChartAlignment.center.
Also refer ChartAlignment.
Widget build(BuildContext context) {
return SfCartesianChart(
title: ChartTitle(
text: 'Chart Title',
alignment: ChartAlignment.near
)
);
}
Implementation
final ChartAlignment alignment;