AreaLineChart.fromDateTimeMaps constructor

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

Implementation

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

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