SfSparkAreaChart constructor

SfSparkAreaChart({
  1. Key? key,
  2. List<num>? data,
  3. SparkChartPlotBand? plotBand,
  4. double borderWidth = 0,
  5. Color? borderColor,
  6. Color color = Colors.blue,
  7. bool isInversed = false,
  8. double axisCrossesAt = 0,
  9. Color axisLineColor = Colors.black,
  10. double axisLineWidth = 2,
  11. List<double>? axisLineDashArray,
  12. Color? highPointColor,
  13. Color? lowPointColor,
  14. Color? negativePointColor,
  15. Color? firstPointColor,
  16. Color? lastPointColor,
  17. SparkChartMarker? marker,
  18. SparkChartLabelDisplayMode? labelDisplayMode,
  19. TextStyle labelStyle = const TextStyle(fontFamily: 'Roboto', fontStyle: FontStyle.normal, fontWeight: FontWeight.normal, fontSize: 12),
  20. SparkChartTrackball? trackball,
})

Creates a spark area chart for the provided set of data with its default view.

@override
Widget build(BuildContext context) {
 return Scaffold(
   body: Center(
       child: SfSparkAreaChart(
     data: <double>[18, 24, 30, 14, 28],
      )
   ),
 );
}

Implementation

SfSparkAreaChart(
    {Key? key,
    List<num>? data,
    this.plotBand,
    this.borderWidth = 0,
    this.borderColor,
    this.color = Colors.blue,
    this.isInversed = false,
    this.axisCrossesAt = 0,
    this.axisLineColor = Colors.black,
    this.axisLineWidth = 2,
    this.axisLineDashArray,
    this.highPointColor,
    this.lowPointColor,
    this.negativePointColor,
    this.firstPointColor,
    this.lastPointColor,
    this.marker,
    this.labelDisplayMode,
    this.labelStyle = const TextStyle(
        fontFamily: 'Roboto',
        fontStyle: FontStyle.normal,
        fontWeight: FontWeight.normal,
        fontSize: 12),
    this.trackball})
    : _sparkChartDataDetails = SparkChartDataDetails(data: data),
      super(key: key);