SfSparkBarChart constructor
SfSparkBarChart({
- Key? key,
- List<
num> ? data, - SparkChartPlotBand? plotBand,
- double borderWidth = 0,
- Color? borderColor,
- 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,
- SparkChartLabelDisplayMode? labelDisplayMode,
- TextStyle labelStyle = const TextStyle(fontFamily: 'Roboto', fontStyle: FontStyle.normal, fontWeight: FontWeight.normal, fontSize: 12),
- SparkChartTrackball? trackball,
Creates a spark bar chart for the provided set of data with its default view.
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: SfSparkBarChart(
data: <double>[18, 24, 30, 14, 28],
)
),
);
}
Implementation
SfSparkBarChart(
{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.labelDisplayMode,
this.labelStyle = const TextStyle(
fontFamily: 'Roboto',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.normal,
fontSize: 12),
this.trackball})
: _sparkChartDataDetails = SparkChartDataDetails(data: data),
super(key: key);