onAttach method
Handles any setup of the renderer that needs to be deferred until it is attached to a chart.
Implementation
@override
void onAttach(BaseChart<D> chart) {
  super.onAttach(chart);
  // We only need the chart.context.isRtl setting, but context is not yet
  // available when the default renderer is attached to the chart on chart
  // creation time, since chart onInit is called after the chart is created.
  _chart = chart;
}