SfSparkLineChart constructor
SfSparkLineChart({
- Key? key,
- List<
num> ? data, - SparkChartPlotBand? plotBand,
- double width = 2,
- List<
double> ? dashArray, - Color color = Colors.blue,
- bool isInversed = false,
- double axisCrossesAt = 0,
- Color axisLineColor = Colors.black,
- double axisLineWidth = 2,
- List<
double> ? axisLineDashArray, - Color? highPointColor,
- Color? lowPointColor,
- Color? negativePointColor,
- Color? firstPointColor,
- Color? lastPointColor,
- SparkChartMarker? marker,
- SparkChartLabelDisplayMode? labelDisplayMode,
- TextStyle labelStyle = const TextStyle(fontFamily: 'Roboto', fontStyle: FontStyle.normal, fontWeight: FontWeight.normal, fontSize: 12),
- 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 = const TextStyle(
fontFamily: 'Roboto',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.normal,
fontSize: 12),
this.trackball})
: _sparkChartDataDetails = SparkChartDataDetails(data: data),
super(key: key);