shouldUseIsolate static method

bool shouldUseIsolate(
  1. List<Series> series, {
  2. bool? useIsolate,
  3. int? startIndex,
  4. int? endIndex,
  5. int? isolatePointThreshold,
})

Implementation

static bool shouldUseIsolate(
  List<Series> series, {
  bool? useIsolate,
  int? startIndex,
  int? endIndex,
  int? isolatePointThreshold,
}) {
  if (kIsWeb) return false;
  final effectivePointCount = ChartDataProcessor.effectiveDataPointCount(
    series,
    startIndex: startIndex,
    endIndex: endIndex,
  );
  if (effectivePointCount == 0) return false;
  if (useIsolate != null) return useIsolate;
  if (!AsyncChartProcessorConfig.enabled) return false;
  final threshold = _normalizedIsolatePointThreshold(
    isolatePointThreshold ?? AsyncChartProcessorConfig.isolatePointThreshold,
  );
  return effectivePointCount >= threshold;
}