Skip to content

Commit

Permalink
Merge pull request #1 from dharanidharandharmasivam/master
Browse files Browse the repository at this point in the history
Added source link
  • Loading branch information
JayavigneshwaranG committed Jul 8, 2019
2 parents f0c1cf0 + b4f2a49 commit e39e566
Show file tree
Hide file tree
Showing 22 changed files with 217 additions and 77 deletions.
2 changes: 1 addition & 1 deletion lib/model/helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import 'package:flutter_examples/samples/chart/dynamic_updates/add_remove_data/a
import 'package:flutter_examples/samples/chart/dynamic_updates/add_remove_data/add_remove_series.dart';
import 'package:flutter_examples/samples/chart/dynamic_updates/live_update/live_update.dart';
import 'package:flutter_examples/samples/chart/dynamic_updates/live_update/vertical_live_chart.dart';
import 'package:flutter_examples/samples/chart/dynamic_updates/udate_data_source/update_data_source.dart';
import 'package:flutter_examples/samples/chart/dynamic_updates/update_data_source/update_data_source.dart';
import 'package:flutter_examples/samples/chart/home/axes_features_home.dart';
import 'package:flutter_examples/samples/chart/home/axis_types.dart';
import 'package:flutter_examples/samples/chart/home/cartesian_types.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/model/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import 'package:flutter_examples/samples/chart/dynamic_updates/add_remove_data/a
import 'package:flutter_examples/samples/chart/dynamic_updates/add_remove_data/add_remove_series.dart';
import 'package:flutter_examples/samples/chart/dynamic_updates/live_update/live_update.dart';
import 'package:flutter_examples/samples/chart/dynamic_updates/live_update/vertical_live_chart.dart';
import 'package:flutter_examples/samples/chart/dynamic_updates/udate_data_source/update_data_source.dart';
import 'package:flutter_examples/samples/chart/dynamic_updates/update_data_source/update_data_source.dart';
import 'package:flutter_examples/samples/chart/legend/chart_with_customized_legend.dart';
import 'package:flutter_examples/samples/chart/legend/chart_with_legend.dart';
import 'package:flutter_examples/samples/chart/legend/legend_with_various_options.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class _LabelActionState extends State<LabelAction> {
color: Colors.white),
onPressed: () {
launch(
'https://github.com/syncfusion/flutter-examples/blob/master/lib/samples/chart/handling_label_collision/handling_label_collision.dart');
'https://github.com/syncfusion/flutter-examples/blob/master/lib/samples/chart/axis_features/handling_label_collision/handling_label_collision.dart');
},
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,32 @@ class _FrontPanelState extends State<FrontPanel> {
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
child: Container(child: getMultipleAxisLineChart(false)),
),
floatingActionButton: Stack(children: <Widget>[
Align(
alignment: Alignment.bottomLeft,
child: Padding(
padding: const EdgeInsets.fromLTRB(30, 50, 0, 0),
child: Container(
height: 50,
width: 250,
child: InkWell(
onTap: () => launch(
'https://www.accuweather.com/en/us/new-york-ny/10007/month/349727?monyr=5/01/2019'),
child: Row(
children: <Widget>[
Text('Source: ',
style: TextStyle(
fontSize: 16, color: model.textColor)),
Text('www.accuweather.com',
style: TextStyle(
fontSize: 14, color: Colors.blue)),
],
),
),
),
),
)
])
);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ List<ColumnSeries<_CategoryData, String>> getDefaultCategory(bool isTileView) {
yValueMapper: (_CategoryData data, _) => data.yVal,
pointColorMapper: (_CategoryData data, _) => data.color,
dataLabelSettings:
DataLabelSettings(isVisible: true, useSeriesColor: true),
DataLabelSettings(isVisible: true),
)
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,30 @@ class _FrontPanelState extends State<FrontPanel> {
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
child: Container(child: getRoundedBarChart(false)),
),
floatingActionButton: Align(
alignment: Alignment.bottomLeft,
child: Padding(
padding: const EdgeInsets.fromLTRB(30, 50, 0, 0),
child: Container(
height: 50,
width: 250,
child: InkWell(
onTap: () => launch(
'https://www.indexmundi.com/g/r.aspx?v=24'),
child: Row(
children: <Widget>[
Text('Source: ',
style: TextStyle(
fontSize: 16, color: model.textColor)),
Text('www.indexmundi.com',
style: TextStyle(fontSize: 14, color: Colors.blue)),
],
),
),
),
),
),

);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,34 @@ class _FrontPanelState extends State<FrontPanel> {
rebuildOnChange: true,
builder: (context, _, model) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
child: Container(child: getCustomizedBarChart(false)),
));
body: Padding(
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
child: Container(child: getCustomizedBarChart(false)),
),
floatingActionButton: Align(
alignment: Alignment.bottomLeft,
child: Padding(
padding: const EdgeInsets.fromLTRB(30, 50, 0, 0),
child: Container(
height: 50,
width: 250,
child: InkWell(
onTap: () => launch(
'https://www.makeuseof.com/tag/most-popular-android-apps/'),
child: Row(
children: <Widget>[
Text('Source: ',
style: TextStyle(
fontSize: 16, color: model.textColor)),
Text('www.makeuseof.com',
style: TextStyle(fontSize: 14, color: Colors.blue)),
],
),
),
),
),
),
);
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ SfCartesianChart getDefaultBubbleChart(bool isTileView) {
header: '',
canShowMarker: false,
format:
'Literacy rate : point.x%\nGDP growth rate : point.y\nPopulation : point.sizeB'),
'point.x\nLiteracy rate : point.x%\nGDP growth rate : point.y\nPopulation : point.sizeB'),
series: getBubbleSeries(isTileView));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,29 @@ class _FrontPanelState extends State<FrontPanel> {
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
child: Container(child: getRoundedColumnChart(false)),
),
floatingActionButton: Align(
alignment: Alignment.bottomLeft,
child: Padding(
padding: const EdgeInsets.fromLTRB(30, 50, 0, 0),
child: Container(
height: 50,
width: 250,
child: InkWell(
onTap: () => launch(
'https://www.worldatlas.com/articles/largest-cities-in-the-world-by-land-area.html'),
child: Row(
children: <Widget>[
Text('Source: ',
style: TextStyle(
fontSize: 16, color: model.textColor)),
Text('www.worldatlas.com',
style: TextStyle(fontSize: 14, color: Colors.blue)),
],
),
),
),
),
),
);
});
}
Expand Down Expand Up @@ -218,7 +241,7 @@ List<ColumnSeries<_ChartData, String>> getColumnSeries(bool isTileView) {
_ChartData('Tokyo', 6993),
_ChartData('Chicago', 5498),
_ChartData('Atlanta', 5083),
_ChartData('Miami', 2891),
_ChartData('Boston', 4497),
];
return <ColumnSeries<_ChartData, String>>[
ColumnSeries<_ChartData, String>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,34 @@ class _FrontPanelState extends State<FrontPanel> {
rebuildOnChange: true,
builder: (context, _, model) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
child: Container(child: getVerticalColumnChart(false)),
));
body: Padding(
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
child: Container(child: getVerticalColumnChart(false)),
),
floatingActionButton: Align(
alignment: Alignment.bottomLeft,
child: Padding(
padding: const EdgeInsets.fromLTRB(30, 50, 0, 0),
child: Container(
height: 50,
width: 250,
child: InkWell(
onTap: () => launch(
'https://www.statista.com/statistics/263393/global-pc-shipments-since-1st-quarter-2009-by-vendor/'),
child: Row(
children: <Widget>[
Text('Source: ',
style: TextStyle(
fontSize: 16, color: model.textColor)),
Text('www.statista.com',
style: TextStyle(fontSize: 14, color: Colors.blue)),
],
),
),
),
),
),
);
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class _LineDashedState extends State<LineDashed> {
color: Colors.white),
onPressed: () {
launch(
'https://github.com/syncfusion/flutter-examples/blob/master/lib/samples/chart/cartesian_charts/line_series/line_with_dashes.dart.dart');
'https://github.com/syncfusion/flutter-examples/blob/master/lib/samples/chart/cartesian_charts/line_series/line_with_dashes.dart');
},
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ class _FrontPanelState extends State<FrontPanel> {
width: 250,
child: InkWell(
onTap: () => launch(
'https://en.wikipedia.org/wiki/List_of_men%27s_footballers_with_500_or_more_goals'),
'https://tcdata360.worldbank.org/indicators/ex.grw?country=BRA&indicator=401&viz=line_chart&years=2010Q3,2016Q2'),
child: Row(
children: <Widget>[
Text('Source: ',
style: TextStyle(
fontSize: 16, color: model.textColor)),
Text('en.wikipedia.org',
Text('tcdata360.worldbank.org',
style: TextStyle(
fontSize: 14, color: Colors.blue)),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ SfCircularChart getDoughnutCustomizationChart(bool isTileView) {
child: Container(
child: const Text('90%',
style: TextStyle(
color: Color.fromRGBO(0, 0, 0, 0.5), fontSize: 25))))
color: Colors.grey, fontSize: 25))))
],
title: ChartTitle(
text: isTileView ? '' : 'Work progress',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ List<PieSeries<_PieData, String>> getPieSeries(
return <PieSeries<_PieData, String>>[
PieSeries<_PieData, String>(
dataSource: chartData,
radius: '30%',
xValueMapper: (_PieData data, _) => data.xData,
yValueMapper: (_PieData data, _) => data.yData,
dataLabelMapper: (_PieData data, _) => data.xData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ SfCircularChart getCustomizedRadialBarChart(bool isTileView) {
CircularChartAnnotation(
angle: 0,
radius: '0%',
height: '90%',
width:'90%',
child: Container(
child: new Image.asset(
'images/person.png',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ SfCircularChart getAngleRadialBarChart(bool isTileView) {
return SfCircularChart(
title: ChartTitle(text: isTileView ? '' : 'Activity tracker'),
legend: Legend(
isVisible: isTileView ? false : true,
isVisible: true,
iconHeight: 20,
iconWidth: 20,
overflowMode: LegendItemOverflowMode.wrap),
Expand Down
File renamed without changes.
24 changes: 10 additions & 14 deletions lib/samples/chart/home/circular_types.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,20 +157,16 @@ class _CircularTypesState extends State<CircularTypes>
]),
),
),
InkWell(
onTap: () {},
splashColor: Colors.grey.withOpacity(0.4),
child: Padding(
padding:
const EdgeInsets.fromLTRB(5, 5, 5, 5),
child: SizedBox(
width: double.infinity,
height: 230,
child: model
.controlList[model.selectedIndex]
.subItemList[i][position]
.previewWidget,
),
Padding(
padding:
const EdgeInsets.fromLTRB(5, 5, 5, 5),
child: SizedBox(
width: double.infinity,
height: 230,
child: model
.controlList[model.selectedIndex]
.subItemList[i][position]
.previewWidget,
),
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class _AnnotationDefaultState extends State<AnnotationDefault> {
return ScopedModelDescendant<SampleListModel>(
builder: (context, _, model) => SafeArea(
child: Backdrop(
frontHeaderHeight: 50,
frontHeader: Container(
color: Colors.transparent,
child: Row(
Expand Down Expand Up @@ -129,7 +128,7 @@ class _FrontPanelState extends State<FrontPanel> {
return Scaffold(
body: Padding(
padding: const EdgeInsets.fromLTRB(5, 0, 5, 50),
child: Container(child: getDefaultAnnotationChart(false)),
child: Container(child: getDefaultAnnotationChart(false,model.theme)),
));
});
}
Expand Down Expand Up @@ -212,7 +211,7 @@ class _BackPanelState extends State<BackPanel> {
}
}

SfCartesianChart getDefaultAnnotationChart(bool isTileView) {
SfCartesianChart getDefaultAnnotationChart(bool isTileView,[Brightness currentTheme]) {
return SfCartesianChart(
plotAreaBorderColor: Colors.transparent,
title: ChartTitle(
Expand All @@ -238,7 +237,7 @@ SfCartesianChart getDefaultAnnotationChart(bool isTileView) {
child: Text(
'€ - \$ ',
style: TextStyle(
color: Color.fromRGBO(0, 0, 0, 0.15),
color: currentTheme == Brightness.light ? Color.fromRGBO(0, 0, 0, 0.15) : Color.fromRGBO(255, 255, 255, 0.3),
fontWeight: FontWeight.bold,
fontSize: 80),
),
Expand Down Expand Up @@ -278,12 +277,7 @@ List<LineSeries<_DateTimeData, DateTime>> getAnnotationLineSeries(
_DateTimeData(DateTime(2016, 9, 1), 1.12),
_DateTimeData(DateTime(2016, 10, 1), 1.1),
_DateTimeData(DateTime(2016, 11, 1), 1.08),
_DateTimeData(
DateTime(
2016,
12,
),
1.05),
_DateTimeData(DateTime(2016, 12, 1), 1.05),
_DateTimeData(DateTime(2017, 1, 1), 1.08),
_DateTimeData(DateTime(2017, 2, 1), 1.06),
_DateTimeData(DateTime(2017, 3, 1), 1.07),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ List<SplineSeries<_LabelData, num>> getLineSeries(
name: 'Singapore',
dataLabelSettings: DataLabelSettings(
isVisible: true,
color: Color.fromRGBO(140, 198, 64, 1),
useSeriesColor: true,
position: CartesianLabelPosition.top)),
SplineSeries<_LabelData, num>(
legendIconType: LegendIconType.rectangle,
Expand All @@ -248,7 +248,7 @@ List<SplineSeries<_LabelData, num>> getLineSeries(
name: 'Russia',
dataLabelSettings: DataLabelSettings(
isVisible: true,
color: Color.fromRGBO(203, 164, 199, 1),
useSeriesColor: true,
position: CartesianLabelPosition.top))
];
}
Expand Down
Loading

0 comments on commit e39e566

Please sign in to comment.