legendItemText property
Text to be displayed in legend. By default, the series name will be displayed in the legend. You can change this by setting values to this property.
Widget build(BuildContext context) {
return SfCartesianChart(
legend: Legend(isVisible:true),
series: <LineSeries<SalesData, String>>[
LineSeries<SalesData, String>(
legendItemText: 'Legend'
),
],
);
}
Implementation
final String? legendItemText;