Skip to content

Instantly share code, notes, and snippets.

@NITIN-ME

NITIN-ME/graph.dart

Created May 29, 2020
Embed
What would you like to do?
class MyChartBody extends StatelessWidget {
@override
Widget build(BuildContext context) {
final List<DataPoint> args = ModalRoute.of(context).settings.arguments;
var seriesList = [charts.Series<DataPoint, int>(
id: 'Sales',
colorFn: (_, __) => charts.MaterialPalette.blue.shadeDefault,
domainFn: (_,ind) => ind,
measureFn: (DataPoint dp, _) => dp.num,
data: args)];
return ExponentialCurve(seriesList);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment