textStyle property

TextStyle? textStyle
final

Customize the legend title text.

Used to change the text color, size, font family, fontStyle, and font weight for the legend title.

Widget build(BuildContext context) {
  return SfCartesianChart(
    legend: Legend(
      isVisible: true,
      title: ChartTitle(
        text: 'Legend title',
        textStyle: TextStyle(color: Colors.red)
      )
    )
  );
}

Implementation

final TextStyle? textStyle;