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),
          ),
        ],
      ),
    );
  }
}
