plotDatePoints method

void plotDatePoints(
  1. dynamic dataList, {
  2. String? format,
})

Implementation

void plotDatePoints(dynamic dataList, {String? format}) {
  xValues.clear();
  labels.clear();
  lineDataPoint.clear();
  for (var i = 0; i < dataList.length; i++) {
    //set the data of the series for databinding
    data = dataList[i];

    try {
      x = toDate(x, format: format ?? 'yyyy/MM/dd')?.millisecondsSinceEpoch;
      //plot the point as a point object based on the desired function based on series and chart type.
      plot(this, data);
    } catch (e) {
      Log().exception('error formatting date to plot point');
    }
  }
  dataList = null;
}