createRenderer method

PyramidSeriesRenderer createRenderer(
  1. PyramidSeries<T, D> series
)

Create the pyramid series renderer.

Implementation

PyramidSeriesRenderer createRenderer(PyramidSeries<T, D> series) {
  PyramidSeriesRenderer seriesRenderer;
  if (onCreateRenderer != null) {
    seriesRenderer = onCreateRenderer!(series) as PyramidSeriesRenderer;
    // 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 PyramidSeriesRendererExtension();
}