borderGradient property
Fills the border of the chart series with gradient color.
Default to null
final List <Color> color = <Color>[];
color.add(Colors.pink[50]);
color.add(Colors.pink[200]);
color.add(Colors.pink);
final List<double> stops = <double>[];
stops.add(0.0);
stops.add(0.5);
stops.add(1.0);
final LinearGradient gradients = LinearGradient(colors: color, stops: stops);
Widget build(BuildContext context) {
return Container(
child: SfCartesianChart(
series: <ChartSeries<SalesData, String>>[
AreaSeries<SalesData, String>(
borderGradient: gradients,
borderWidth: 2
),
],
));
}
Implementation
final LinearGradient? borderGradient;