createRenderer method

StackedAreaSeriesRenderer createRenderer(
  1. ChartSeries<T, D> series
)

Create the stacked area series renderer.

Implementation

StackedAreaSeriesRenderer createRenderer(ChartSeries<T, D> series) {
  StackedAreaSeriesRenderer stackedAreaSeriesRenderer;
  if (onCreateRenderer != null) {
    stackedAreaSeriesRenderer =
        onCreateRenderer!(series) as StackedAreaSeriesRenderer;
    // ignore: unnecessary_null_comparison
    assert(stackedAreaSeriesRenderer != null,
        'This onCreateRenderer callback function should return value as extends from ChartSeriesRenderer class and should not be return value as null');
    return stackedAreaSeriesRenderer;
  }
  return StackedAreaSeriesRenderer();
}