You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Flutter/cartesian-charts/annotations.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -173,7 +173,7 @@ To position the annotation based on the percentage values, set the [`CoordinateU
173
173
174
174
**Positioning based on region**
175
175
176
-
Annotations can be placed with respect to either [`AnnotationRegion.plotArea`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AnnotationRegion.html)or [`AnnotationRegion.chart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AnnotationRegion.html) using [`region`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/region.html) property.
176
+
Annotations can be placed with respect to either [`AnnotationRegion.plotArea`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AnnotationRegion.html) or [`AnnotationRegion.chart`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/AnnotationRegion.html) using [`region`](https://pub.dev/documentation/syncfusion_flutter_charts/latest/charts/CartesianChartAnnotation/region.html) property.
177
177
178
178
{% highlight dart %}
179
179
@@ -212,7 +212,7 @@ The following code example demonstrates how to set the [`horizontalAlignment`](h
212
212
213
213
{% highlight dart %}
214
214
215
-
@override
215
+
@override
216
216
Widget build(BuildContext context) {
217
217
return Scaffold(
218
218
body: SafeArea(
@@ -308,6 +308,7 @@ When there are multiple axes in the chart, annotation can be added for a particu
308
308
309
309
@override
310
310
Widget build(BuildContext context) {
311
+
311
312
final List<ChartData> chartData = [
312
313
ChartData(10, 17, 132),
313
314
ChartData(20, 34, 134),
@@ -380,6 +381,15 @@ Chart supports watermark which allows you to mark the specific area of interest
380
381
381
382
@override
382
383
Widget build(BuildContext context) {
384
+
385
+
final List<ChartData> chartData = [
386
+
ChartData(10, 17, 132),
387
+
ChartData(20, 34, 134),
388
+
ChartData(30, 24, 124),
389
+
ChartData(40, 30, 130),
390
+
ChartData(50, 10, 110)
391
+
];
392
+
383
393
return Scaffold(
384
394
body: SafeArea(
385
395
child: Center(
@@ -437,4 +447,4 @@ Chart supports watermark which allows you to mark the specific area of interest
437
447
438
448

439
449
440
-
N> `chartData` in the above code snippets is a class type list and holds the data for binding to the chart series. Refer [Bind data source](https://help.syncfusion.com/flutter/cartesian-charts/getting-started#bind-data-source) topic for more details.
450
+
N> `chartData` in the above code snippets is a class type list and holds the data for binding to the chart series. Refer [Bind data source](https://help.syncfusion.com/flutter/cartesian-charts/getting-started#bind-data-source) topic for more details.
0 commit comments