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.
RSGDoctorApp/lib/widgets/shared/charts/app_line_chart.dart

42 lines
941 B
Dart

import 'package:flutter/material.dart';
import 'package:charts_flutter/flutter.dart' as charts;
/*
*@author: Elham Rababah
*@Date:03/6/2020
*@param:
*@return:
*@desc: AppLineChart
*/
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),
),
],
),
);
}
}