attachTo method

  1. @override
void attachTo(
  1. BaseChart<D> chart
)
override

Injects the behavior into a chart.

Implementation

@override
void attachTo(BaseChart<D> chart) {
  _chart = chart;

  _view = _ChartTitleLayoutView<D>(
      layoutPaintOrder: LayoutViewPaintOrder.chartTitle,
      config: _config,
      chart: _chart);

  chart.addView(_view!);
  chart.addLifecycleListener(_lifecycleListener);
}