Skip to content

Commit e39e566

Browse files
Merge pull request syncfusion#1 from dharanidharandharmasivam/master
Added source link
2 parents f0c1cf0 + b4f2a49 commit e39e566

File tree

22 files changed

+217
-77
lines changed

22 files changed

+217
-77
lines changed

lib/model/helper.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ import 'package:flutter_examples/samples/chart/dynamic_updates/add_remove_data/a
6161
import 'package:flutter_examples/samples/chart/dynamic_updates/add_remove_data/add_remove_series.dart';
6262
import 'package:flutter_examples/samples/chart/dynamic_updates/live_update/live_update.dart';
6363
import 'package:flutter_examples/samples/chart/dynamic_updates/live_update/vertical_live_chart.dart';
64-
import 'package:flutter_examples/samples/chart/dynamic_updates/udate_data_source/update_data_source.dart';
64+
import 'package:flutter_examples/samples/chart/dynamic_updates/update_data_source/update_data_source.dart';
6565
import 'package:flutter_examples/samples/chart/home/axes_features_home.dart';
6666
import 'package:flutter_examples/samples/chart/home/axis_types.dart';
6767
import 'package:flutter_examples/samples/chart/home/cartesian_types.dart';

lib/model/model.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ import 'package:flutter_examples/samples/chart/dynamic_updates/add_remove_data/a
6161
import 'package:flutter_examples/samples/chart/dynamic_updates/add_remove_data/add_remove_series.dart';
6262
import 'package:flutter_examples/samples/chart/dynamic_updates/live_update/live_update.dart';
6363
import 'package:flutter_examples/samples/chart/dynamic_updates/live_update/vertical_live_chart.dart';
64-
import 'package:flutter_examples/samples/chart/dynamic_updates/udate_data_source/update_data_source.dart';
64+
import 'package:flutter_examples/samples/chart/dynamic_updates/update_data_source/update_data_source.dart';
6565
import 'package:flutter_examples/samples/chart/legend/chart_with_customized_legend.dart';
6666
import 'package:flutter_examples/samples/chart/legend/chart_with_legend.dart';
6767
import 'package:flutter_examples/samples/chart/legend/legend_with_various_options.dart';

lib/samples/chart/axis_features/handling_label_collision/handling_label_collision.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class _LabelActionState extends State<LabelAction> {
6363
color: Colors.white),
6464
onPressed: () {
6565
launch(
66-
'https://github.com/syncfusion/flutter-examples/blob/master/lib/samples/chart/handling_label_collision/handling_label_collision.dart');
66+
'https://github.com/syncfusion/flutter-examples/blob/master/lib/samples/chart/axis_features/handling_label_collision/handling_label_collision.dart');
6767
},
6868
),
6969
),

lib/samples/chart/axis_features/multiple_axis_chart/multiple_axis_chart.dart

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,32 @@ class _FrontPanelState extends State<FrontPanel> {
105105
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
106106
child: Container(child: getMultipleAxisLineChart(false)),
107107
),
108+
floatingActionButton: Stack(children: <Widget>[
109+
Align(
110+
alignment: Alignment.bottomLeft,
111+
child: Padding(
112+
padding: const EdgeInsets.fromLTRB(30, 50, 0, 0),
113+
child: Container(
114+
height: 50,
115+
width: 250,
116+
child: InkWell(
117+
onTap: () => launch(
118+
'https://www.accuweather.com/en/us/new-york-ny/10007/month/349727?monyr=5/01/2019'),
119+
child: Row(
120+
children: <Widget>[
121+
Text('Source: ',
122+
style: TextStyle(
123+
fontSize: 16, color: model.textColor)),
124+
Text('www.accuweather.com',
125+
style: TextStyle(
126+
fontSize: 14, color: Colors.blue)),
127+
],
128+
),
129+
),
130+
),
131+
),
132+
)
133+
])
108134
);
109135
});
110136
}

lib/samples/chart/axis_types/category_types/default_category_axis.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ List<ColumnSeries<_CategoryData, String>> getDefaultCategory(bool isTileView) {
219219
yValueMapper: (_CategoryData data, _) => data.yVal,
220220
pointColorMapper: (_CategoryData data, _) => data.color,
221221
dataLabelSettings:
222-
DataLabelSettings(isVisible: true, useSeriesColor: true),
222+
DataLabelSettings(isVisible: true),
223223
)
224224
];
225225
}

lib/samples/chart/cartesian_charts/bar_series/bar_with_rounded_corners.dart

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,30 @@ class _FrontPanelState extends State<FrontPanel> {
108108
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
109109
child: Container(child: getRoundedBarChart(false)),
110110
),
111+
floatingActionButton: Align(
112+
alignment: Alignment.bottomLeft,
113+
child: Padding(
114+
padding: const EdgeInsets.fromLTRB(30, 50, 0, 0),
115+
child: Container(
116+
height: 50,
117+
width: 250,
118+
child: InkWell(
119+
onTap: () => launch(
120+
'https://www.indexmundi.com/g/r.aspx?v=24'),
121+
child: Row(
122+
children: <Widget>[
123+
Text('Source: ',
124+
style: TextStyle(
125+
fontSize: 16, color: model.textColor)),
126+
Text('www.indexmundi.com',
127+
style: TextStyle(fontSize: 14, color: Colors.blue)),
128+
],
129+
),
130+
),
131+
),
132+
),
133+
),
134+
111135
);
112136
});
113137
}

lib/samples/chart/cartesian_charts/bar_series/customized_bar_chart.dart

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,34 @@ class _FrontPanelState extends State<FrontPanel> {
126126
rebuildOnChange: true,
127127
builder: (context, _, model) {
128128
return Scaffold(
129-
body: Padding(
130-
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
131-
child: Container(child: getCustomizedBarChart(false)),
132-
));
129+
body: Padding(
130+
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
131+
child: Container(child: getCustomizedBarChart(false)),
132+
),
133+
floatingActionButton: Align(
134+
alignment: Alignment.bottomLeft,
135+
child: Padding(
136+
padding: const EdgeInsets.fromLTRB(30, 50, 0, 0),
137+
child: Container(
138+
height: 50,
139+
width: 250,
140+
child: InkWell(
141+
onTap: () => launch(
142+
'https://www.makeuseof.com/tag/most-popular-android-apps/'),
143+
child: Row(
144+
children: <Widget>[
145+
Text('Source: ',
146+
style: TextStyle(
147+
fontSize: 16, color: model.textColor)),
148+
Text('www.makeuseof.com',
149+
style: TextStyle(fontSize: 14, color: Colors.blue)),
150+
],
151+
),
152+
),
153+
),
154+
),
155+
),
156+
);
133157
});
134158
}
135159
}

lib/samples/chart/cartesian_charts/bubble_series/default_bubble_chart.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ SfCartesianChart getDefaultBubbleChart(bool isTileView) {
207207
header: '',
208208
canShowMarker: false,
209209
format:
210-
'Literacy rate : point.x%\nGDP growth rate : point.y\nPopulation : point.sizeB'),
210+
'point.x\nLiteracy rate : point.x%\nGDP growth rate : point.y\nPopulation : point.sizeB'),
211211
series: getBubbleSeries(isTileView));
212212
}
213213

lib/samples/chart/cartesian_charts/column_series/column_with_rounded_corners.dart

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,29 @@ class _FrontPanelState extends State<FrontPanel> {
108108
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
109109
child: Container(child: getRoundedColumnChart(false)),
110110
),
111+
floatingActionButton: Align(
112+
alignment: Alignment.bottomLeft,
113+
child: Padding(
114+
padding: const EdgeInsets.fromLTRB(30, 50, 0, 0),
115+
child: Container(
116+
height: 50,
117+
width: 250,
118+
child: InkWell(
119+
onTap: () => launch(
120+
'https://www.worldatlas.com/articles/largest-cities-in-the-world-by-land-area.html'),
121+
child: Row(
122+
children: <Widget>[
123+
Text('Source: ',
124+
style: TextStyle(
125+
fontSize: 16, color: model.textColor)),
126+
Text('www.worldatlas.com',
127+
style: TextStyle(fontSize: 14, color: Colors.blue)),
128+
],
129+
),
130+
),
131+
),
132+
),
133+
),
111134
);
112135
});
113136
}
@@ -218,7 +241,7 @@ List<ColumnSeries<_ChartData, String>> getColumnSeries(bool isTileView) {
218241
_ChartData('Tokyo', 6993),
219242
_ChartData('Chicago', 5498),
220243
_ChartData('Atlanta', 5083),
221-
_ChartData('Miami', 2891),
244+
_ChartData('Boston', 4497),
222245
];
223246
return <ColumnSeries<_ChartData, String>>[
224247
ColumnSeries<_ChartData, String>(

lib/samples/chart/cartesian_charts/column_series/customized_column_chart.dart

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,34 @@ class _FrontPanelState extends State<FrontPanel> {
120120
rebuildOnChange: true,
121121
builder: (context, _, model) {
122122
return Scaffold(
123-
body: Padding(
124-
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
125-
child: Container(child: getVerticalColumnChart(false)),
126-
));
123+
body: Padding(
124+
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
125+
child: Container(child: getVerticalColumnChart(false)),
126+
),
127+
floatingActionButton: Align(
128+
alignment: Alignment.bottomLeft,
129+
child: Padding(
130+
padding: const EdgeInsets.fromLTRB(30, 50, 0, 0),
131+
child: Container(
132+
height: 50,
133+
width: 250,
134+
child: InkWell(
135+
onTap: () => launch(
136+
'https://www.statista.com/statistics/263393/global-pc-shipments-since-1st-quarter-2009-by-vendor/'),
137+
child: Row(
138+
children: <Widget>[
139+
Text('Source: ',
140+
style: TextStyle(
141+
fontSize: 16, color: model.textColor)),
142+
Text('www.statista.com',
143+
style: TextStyle(fontSize: 14, color: Colors.blue)),
144+
],
145+
),
146+
),
147+
),
148+
),
149+
),
150+
);
127151
});
128152
}
129153
}

lib/samples/chart/cartesian_charts/line_series/line_with_dashes.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class _LineDashedState extends State<LineDashed> {
6161
color: Colors.white),
6262
onPressed: () {
6363
launch(
64-
'https://github.com/syncfusion/flutter-examples/blob/master/lib/samples/chart/cartesian_charts/line_series/line_with_dashes.dart.dart');
64+
'https://github.com/syncfusion/flutter-examples/blob/master/lib/samples/chart/cartesian_charts/line_series/line_with_dashes.dart');
6565
},
6666
),
6767
),

lib/samples/chart/cartesian_charts/spline_series/spline_types.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ class _FrontPanelState extends State<FrontPanel> {
145145
width: 250,
146146
child: InkWell(
147147
onTap: () => launch(
148-
'https://en.wikipedia.org/wiki/List_of_men%27s_footballers_with_500_or_more_goals'),
148+
'https://tcdata360.worldbank.org/indicators/ex.grw?country=BRA&indicator=401&viz=line_chart&years=2010Q3,2016Q2'),
149149
child: Row(
150150
children: <Widget>[
151151
Text('Source: ',
152152
style: TextStyle(
153153
fontSize: 16, color: model.textColor)),
154-
Text('en.wikipedia.org',
154+
Text('tcdata360.worldbank.org',
155155
style: TextStyle(
156156
fontSize: 14, color: Colors.blue)),
157157
],

lib/samples/chart/circular_charts/doughnut_series/doughnut_with_color_mapping.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ SfCircularChart getDoughnutCustomizationChart(bool isTileView) {
193193
child: Container(
194194
child: const Text('90%',
195195
style: TextStyle(
196-
color: Color.fromRGBO(0, 0, 0, 0.5), fontSize: 25))))
196+
color: Colors.grey, fontSize: 25))))
197197
],
198198
title: ChartTitle(
199199
text: isTileView ? '' : 'Work progress',

lib/samples/chart/circular_charts/pie_series/semi_pie_chart.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,6 @@ List<PieSeries<_PieData, String>> getPieSeries(
425425
return <PieSeries<_PieData, String>>[
426426
PieSeries<_PieData, String>(
427427
dataSource: chartData,
428-
radius: '30%',
429428
xValueMapper: (_PieData data, _) => data.xData,
430429
yValueMapper: (_PieData data, _) => data.yData,
431430
dataLabelMapper: (_PieData data, _) => data.xData,

lib/samples/chart/circular_charts/radialbar_series/customized_radialbar_chart.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ SfCircularChart getCustomizedRadialBarChart(bool isTileView) {
316316
CircularChartAnnotation(
317317
angle: 0,
318318
radius: '0%',
319+
height: '90%',
320+
width:'90%',
319321
child: Container(
320322
child: new Image.asset(
321323
'images/person.png',

lib/samples/chart/circular_charts/radialbar_series/radialbar_with_legend.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ SfCircularChart getAngleRadialBarChart(bool isTileView) {
190190
return SfCircularChart(
191191
title: ChartTitle(text: isTileView ? '' : 'Activity tracker'),
192192
legend: Legend(
193-
isVisible: isTileView ? false : true,
193+
isVisible: true,
194194
iconHeight: 20,
195195
iconWidth: 20,
196196
overflowMode: LegendItemOverflowMode.wrap),

lib/samples/chart/home/circular_types.dart

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -157,20 +157,16 @@ class _CircularTypesState extends State<CircularTypes>
157157
]),
158158
),
159159
),
160-
InkWell(
161-
onTap: () {},
162-
splashColor: Colors.grey.withOpacity(0.4),
163-
child: Padding(
164-
padding:
165-
const EdgeInsets.fromLTRB(5, 5, 5, 5),
166-
child: SizedBox(
167-
width: double.infinity,
168-
height: 230,
169-
child: model
170-
.controlList[model.selectedIndex]
171-
.subItemList[i][position]
172-
.previewWidget,
173-
),
160+
Padding(
161+
padding:
162+
const EdgeInsets.fromLTRB(5, 5, 5, 5),
163+
child: SizedBox(
164+
width: double.infinity,
165+
height: 230,
166+
child: model
167+
.controlList[model.selectedIndex]
168+
.subItemList[i][position]
169+
.previewWidget,
174170
),
175171
),
176172
],

lib/samples/chart/series_features/annotation/chart_with_watermark.dart

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class _AnnotationDefaultState extends State<AnnotationDefault> {
4545
return ScopedModelDescendant<SampleListModel>(
4646
builder: (context, _, model) => SafeArea(
4747
child: Backdrop(
48-
frontHeaderHeight: 50,
4948
frontHeader: Container(
5049
color: Colors.transparent,
5150
child: Row(
@@ -129,7 +128,7 @@ class _FrontPanelState extends State<FrontPanel> {
129128
return Scaffold(
130129
body: Padding(
131130
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
132-
child: Container(child: getDefaultAnnotationChart(false)),
131+
child: Container(child: getDefaultAnnotationChart(false,model.theme)),
133132
));
134133
});
135134
}
@@ -212,7 +211,7 @@ class _BackPanelState extends State<BackPanel> {
212211
}
213212
}
214213

215-
SfCartesianChart getDefaultAnnotationChart(bool isTileView) {
214+
SfCartesianChart getDefaultAnnotationChart(bool isTileView,[Brightness currentTheme]) {
216215
return SfCartesianChart(
217216
plotAreaBorderColor: Colors.transparent,
218217
title: ChartTitle(
@@ -238,7 +237,7 @@ SfCartesianChart getDefaultAnnotationChart(bool isTileView) {
238237
child: Text(
239238
'€ - \$ ',
240239
style: TextStyle(
241-
color: Color.fromRGBO(0, 0, 0, 0.15),
240+
color: currentTheme == Brightness.light ? Color.fromRGBO(0, 0, 0, 0.15) : Color.fromRGBO(255, 255, 255, 0.3),
242241
fontWeight: FontWeight.bold,
243242
fontSize: 80),
244243
),
@@ -278,12 +277,7 @@ List<LineSeries<_DateTimeData, DateTime>> getAnnotationLineSeries(
278277
_DateTimeData(DateTime(2016, 9, 1), 1.12),
279278
_DateTimeData(DateTime(2016, 10, 1), 1.1),
280279
_DateTimeData(DateTime(2016, 11, 1), 1.08),
281-
_DateTimeData(
282-
DateTime(
283-
2016,
284-
12,
285-
),
286-
1.05),
280+
_DateTimeData(DateTime(2016, 12, 1), 1.05),
287281
_DateTimeData(DateTime(2017, 1, 1), 1.08),
288282
_DateTimeData(DateTime(2017, 2, 1), 1.06),
289283
_DateTimeData(DateTime(2017, 3, 1), 1.07),

lib/samples/chart/series_features/data_label/default_datalabels.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ List<SplineSeries<_LabelData, num>> getLineSeries(
234234
name: 'Singapore',
235235
dataLabelSettings: DataLabelSettings(
236236
isVisible: true,
237-
color: Color.fromRGBO(140, 198, 64, 1),
237+
useSeriesColor: true,
238238
position: CartesianLabelPosition.top)),
239239
SplineSeries<_LabelData, num>(
240240
legendIconType: LegendIconType.rectangle,
@@ -248,7 +248,7 @@ List<SplineSeries<_LabelData, num>> getLineSeries(
248248
name: 'Russia',
249249
dataLabelSettings: DataLabelSettings(
250250
isVisible: true,
251-
color: Color.fromRGBO(203, 164, 199, 1),
251+
useSeriesColor: true,
252252
position: CartesianLabelPosition.top))
253253
];
254254
}

0 commit comments

Comments
 (0)