createRenderer method

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

Create the error bar series renderer.

Implementation

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