You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
847 B
Dart
35 lines
847 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:charts_flutter/flutter.dart' as charts;
|
|
|
|
class AppLineChart extends StatelessWidget {
|
|
const AppLineChart({
|
|
Key key,
|
|
@required this.seriesList,
|
|
this.chartTitle,
|
|
}) : super(key: key);
|
|
|
|
final List<charts.Series> seriesList;
|
|
|
|
final String chartTitle;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
child: Column(
|
|
children: <Widget>[
|
|
Text(
|
|
'Body Mass Index',
|
|
style: TextStyle(fontSize: 24.0, fontWeight: FontWeight.bold),
|
|
),
|
|
Expanded(
|
|
child: charts.LineChart(seriesList,
|
|
defaultRenderer: new charts.LineRendererConfig(
|
|
includeArea: false, stacked: true),
|
|
animate: true),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|