createRenderer method

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

to create a stacked line 100 series renderer.

Implementation

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