toChartPoints method

List<ChartPoint> toChartPoints({
  1. double startX = 0,
  2. double step = 1,
})

Implementation

List<ChartPoint> toChartPoints({double startX = 0, double step = 1}) {
  return toList()
      .asMap()
      .entries
      .map((e) => ChartPoint(x: startX + e.key * step, y: e.value.toDouble()))
      .toList();
}