Skip to content

Commit 2cde3de

Browse files
Merge pull request #159 from Syncfusion-Content/hotfix/hotfix-v19.4.0.48
DOCINFRA-2341_merged_using_automation
2 parents 9f213ce + 4cd5a70 commit 2cde3de

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

Flutter/cartesian-charts/multiple-charts.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ You can add multiple series to the [`series`](https://pub.dev/documentation/sync
1818

1919
@override
2020
Widget build(BuildContext context) {
21+
final List<ChartData> chartData = <ChartData>[
22+
ChartData('Germany', 128, 129, 101),
23+
ChartData('Russia', 123, 92, 93),
24+
ChartData('Norway', 107, 106, 90),
25+
ChartData('USA', 87, 95, 71),
26+
];
2127
return Scaffold(
2228
body: Center(
2329
child: Container(
@@ -47,7 +53,7 @@ You can add multiple series to the [`series`](https://pub.dev/documentation/sync
4753
}
4854

4955
class ChartData {
50-
ChartData(this.x, this.y, this.y2, this.y3);
56+
ChartData(this.x, this.y, this.y1, this.y2);
5157
final String x;
5258
final double? y;
5359
final double? y1;
@@ -68,6 +74,12 @@ Also refer [multiple axes](./axis-customization#multiple-axes) for customizing t
6874

6975
@override
7076
Widget build(BuildContext context) {
77+
final List<ChartData> chartData = <ChartData>[
78+
ChartData('Germany', 129),
79+
ChartData('Russia', 90),
80+
ChartData('USA', 107),
81+
ChartData('Norway', 68),
82+
];
7183
return Scaffold(
7284
body: Center(
7385
child: Container(
@@ -84,7 +96,7 @@ Also refer [multiple axes](./axis-customization#multiple-axes) for customizing t
8496
LineSeries<ChartData, String>(
8597
dataSource: chartData,
8698
xValueMapper: (ChartData data, _) => data.x,
87-
yValueMapper: (ChartData data, _) => data.y1
99+
yValueMapper: (ChartData data, _) => data.y
88100
)
89101
]
90102
)
@@ -94,10 +106,9 @@ Also refer [multiple axes](./axis-customization#multiple-axes) for customizing t
94106
}
95107

96108
class ChartData {
97-
ChartData(this.x, this.y, this.y1);
109+
ChartData(this.x, this.y);
98110
final String x;
99111
final double? y;
100-
final double? y1;
101112
}
102113

103114
{% endhighlight %}
@@ -108,6 +119,6 @@ Also refer [multiple axes](./axis-customization#multiple-axes) for customizing t
108119

109120
* Cartesian type series cannot be combined with circular series (pie, doughnut, and radial bar).
110121

111-
>**NOTE**:`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.
112-
113-
N> You can refer to our [Flutter Combination Chart](https://www.syncfusion.com/flutter-widgets/flutter-charts/chart-types/combination-chart) feature tour page for its groundbreaking feature representations.
122+
>**Note**:
123+
* `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.
124+
* You can refer to our [Flutter Combination Chart](https://www.syncfusion.com/flutter-widgets/flutter-charts/chart-types/combination-chart) feature tour page for its groundbreaking feature representations.

0 commit comments

Comments
 (0)