position property
Position of the legend.
If the chart width is greater than chart height, then the legend will be placed at the right, else it will be placed at the bottom of the chart.The available options are auto, bottom, left, right, and top.
Defaults to LegendPosition.auto
.
Also refer LegendPosition.
Widget build(BuildContext context) {
return SfCartesianChart(
legend: Legend(
isVisible: true,
position: LegendPosition.bottom
)
);
}
Implementation
final LegendPosition position;