createOrUpdateSegments method

  1. @override
void createOrUpdateSegments()
inherited

Implementation

@override
void createOrUpdateSegments() {
  if (dataCount == 0) {
    segments.clear();
    return;
  }

  final int segmentsCount = segments.length;
  if (segmentsCount == 0) {
    final ChartSegment segment = createSegment();
    setData(0, segment);
    segments.add(segment);
  } else {
    final ChartSegment segment = segments[0];
    setData(0, segment);
  }
}