populateChartPoints method
void
populateChartPoints(
{ - List<ChartDataPointType>? positions,
- List<List<num>>? yLists,
})
Implementation
void populateChartPoints({
List<ChartDataPointType>? positions,
List<List<num>>? yLists,
}) {
chartPoints.clear();
if (parent == null || yLists == null || yLists.isEmpty) {
return;
}
if (parent!.onDataLabelRender == null &&
parent!.onTooltipRender == null &&
parent!.legend?.legendItemBuilder == null &&
dataLabelSettings.builder == null &&
onPointLongPress == null &&
onPointTap == null &&
onPointDoubleTap == null) {
return;
}
final int yLength = yLists.length;
if (positions == null || positions.length != yLength) {
return;
}
for (int i = 0; i < dataCount; i++) {
final ChartPoint<D> point = ChartPoint<D>(x: xRawValues[i]);
for (int j = 0; j < yLength; j++) {
point[positions[j]] = yLists[j][i];
}
chartPoints.add(point);
}
}