SparkChartMarker constructor

const SparkChartMarker({
  1. SparkChartMarkerDisplayMode displayMode = SparkChartMarkerDisplayMode.none,
  2. Color? borderColor,
  3. double borderWidth = 2,
  4. Color? color,
  5. double size = 5,
  6. SparkChartMarkerShape shape = SparkChartMarkerShape.circle,
})

Creates an instance of spark chart marker to add and customizes the marker in spark chart widget. To make, the marker visible, set displayeMode property value as SparkChartMarkerDisplayMode.all.

@override
Widget build(BuildContext context) {
 return Scaffold(
   body: Center(
       child: SfSparkAreaChart(
     marker: SparkChartMarker(
         size: 20, displayMode: SparkChartMarkerDisplayMode.all),
     data: <double>[18, 24, 30, 14, 28],
   )),
 );
}

Implementation

const SparkChartMarker(
    {this.displayMode = SparkChartMarkerDisplayMode.none,
    this.borderColor,
    this.borderWidth = 2,
    this.color,
    this.size = 5,
    this.shape = SparkChartMarkerShape.circle});