populateDataSource method

  1. @override
void populateDataSource([
  1. List<ChartValueMapper<T, num>>? yPaths,
  2. List<List<num>>? chaoticYLists,
  3. List<List<num>>? yLists,
  4. List<ChartValueMapper<T, Object>>? fPaths,
  5. List<List<Object?>>? fLists,
])
override

Implementation

@override
void populateDataSource([
  List<ChartValueMapper<T, num>>? yPaths,
  List<List<num>>? chaoticYLists,
  List<List<num>>? yLists,
  List<ChartValueMapper<T, Object>>? fPaths,
  List<List<Object?>>? fLists,
]) {
  if (yPaths == null) {
    yPaths = <ChartValueMapper<T, num>>[];
    chaoticYLists = <List<num>>[];
    yLists = <List<num>>[];
  }
  if (fPaths == null) {
    fPaths = <ChartValueMapper<T, Object>>[];
    fLists = <List<Object?>>[];
  }

  if (yValueMapper != null) {
    yPaths.add(yValueMapper!);
    if (sortingOrder == SortingOrder.none) {
      chaoticYLists?.add(yValues);
    } else {
      chaoticYLists?.add(_chaoticYValues);
      yLists?.add(yValues);
    }
  }

  if (pointRadiusMapper != null) {
    fPaths.add(pointRadiusMapper!);
    fLists?.add(pointRadii);
  }

  if (dataLabelMapper != null) {
    fPaths.add(dataLabelMapper!);
    fLists?.add(dataLabelValues);
  }

  super.populateDataSource(yPaths, chaoticYLists, yLists, fPaths, fLists);
  _calculateGroupingValues();
  markNeedsLegendUpdate();
  populateChartPoints();
}