Implementation
@override
set dataSource(List<T>? value) {
if (value == null || value.isEmpty) {
_dataCount = 0;
segments.clear();
markNeedsUpdate();
}
if (_dataCount != value?.length || !listEquals(_dataSource, value)) {
_dataSource = value;
canUpdateOrCreateSegments = true;
if (xAxis != null &&
yAxis != null &&
parent != null &&
parent!.enableAxisAnimation) {
populateDataSource();
xAxis!.calculateVisibleRangeAndInvokeAnimation();
yAxis!.calculateVisibleRangeAndInvokeAnimation();
markNeedsLayout();
} else {
markNeedsUpdate();
}
animationType = AnimationType.realtime;
}
}