labelDisplayMode property
Enables the data labels.
Data labels are used to provide information about the exact point location and its value.
- SparkChartLabelDisplayMode.all enables the data label for all the data points.
- SparkChartLabelDisplayMode.none disables the data labels.
- SparkChartLabelDisplayMode.high displays the data label on highest data point.
- SparkChartLabelDisplayMode.low displays the data label on lowest data point.
- SparkChartLabelDisplayMode.first displays the data label on first data point.
- SparkChartLabelDisplayMode.last displays the data label on first data point.
Also refer SparkChartLabelDisplayMode.
Defaults to SparkChartDisplayMode.none
.
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: SfSparkAreaChart(
labelDisplayMode: SparkChartLabelDisplayMode.high,
)
),
);
}
Implementation
final SparkChartLabelDisplayMode? labelDisplayMode;