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?>>? chaoticFLists,
  6. 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?>>? chaoticFLists,
  List<List<Object?>>? fLists,
]) {
  _resetDataSourceHolders();
  if (sortingOrder == SortingOrder.none) {
    super.populateDataSource(
      <ChartValueMapper<T, num>>[],
      <List<num>>[],
      <List<num>>[],
      <ChartValueMapper<T, Object>>[sizeValueMapper ?? _defaultSize],
      <List<Object?>>[_sizes],
    );
  } else {
    super.populateDataSource(
      <ChartValueMapper<T, num>>[],
      <List<num>>[],
      <List<num>>[],
      <ChartValueMapper<T, Object>>[sizeValueMapper ?? _defaultSize],
      <List<Object?>>[_chaoticSizes],
      <List<Object?>>[_sizes],
    );
  }

  _minBubbleSize = double.infinity;
  _maxBubbleSize = double.negativeInfinity;
  for (final num size in _sizes) {
    _minBubbleSize = min(_minBubbleSize, size);
    _maxBubbleSize = max(_maxBubbleSize, size);
  }
  populateChartPoints();
}