LineChart.fromDateTimeMaps constructor

LineChart.fromDateTimeMaps(
  1. List<Map<DateTime, double>> series,
  2. List<Color> colors,
  3. List<String> units, {
  4. FontWeight? tapTextFontWeight,
  5. bool? showMonthsName,
  6. String? yAxisName,
})

Implementation

factory LineChart.fromDateTimeMaps(
  List<Map<DateTime, double>> series,
  List<Color> colors,
  List<String> units, {
  FontWeight? tapTextFontWeight,
  bool? showMonthsName,
  String? yAxisName,
}) {
  assert(series.length == colors.length);
  assert(series.length == units.length);

  Pair<List<ChartLine>, Dates> convertFromDateMaps =
      DateTimeSeriesConverter.convertFromDateMaps(series, colors, units);
  return LineChart(convertFromDateMaps.left, convertFromDateMaps.right,
      tapTextFontWeight: tapTextFontWeight,
      showMonthsName: showMonthsName,
      yAxisName: yAxisName);
}