configureSeries method
Performs basic configuration for the series, before it is pre-processed.
Typically, a series renderer should assign color mapping functions to series that do not have them.
Implementation
@override
void configureSeries(List<MutableSeries<D>> seriesList) {
assignMissingColors(seriesList, emptyCategoryUsesSinglePalette: false);
for (final series in seriesList) {
// Add a default area color function which applies the configured
// areaOpacity value to the datum's current color.
series.areaColorFn ??= (index) {
final color = series.colorFn?.call(index);
if (color == null) {
return null;
}
return Color(
r: color.r,
g: color.g,
b: color.b,
a: (color.a * config.areaOpacity).round(),
);
};
}
if (config.includePoints) {
_pointRenderer.configureSeries(seriesList);
}
}