legendTitleColor property
Specifies the title color of the legend.
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: SfTheme(
data: SfThemeData(
chartThemeData: SfChartThemeData(
legendTitleColor: Colors.brown
)
),
child: SfCartesianChart(
legend: Legend(isVisible: true,
title: LegendTitle(text: 'Legend Title')),
series: <ChartSeries<Sample,num>>[
LineSeries(
dataSource: chartData,
xValueMapper: (Sample data, _) => data.x,
yValueMapper: (Sample data, _) => data.y
)
],
)
),
)
);
}
Implementation
final Color legendTitleColor;