SfSparkLineChart constructor

SfSparkLineChart({
  1. Key? key,
  2. List<num>? data,
  3. SparkChartPlotBand? plotBand,
  4. double width = 2,
  5. List<double>? dashArray,
  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,
  20. SparkChartTrackball? trackball,
})

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

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

Implementation

SfSparkLineChart(
    {Key? key,
    List<num>? data,
    this.plotBand,
    this.width = 2,
    this.dashArray,
    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,
    this.trackball})
    : _sparkChartDataDetails = SparkChartDataDetails(data: data),
      super(key: key);