attachTo method

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

Injects the behavior into a chart.

Implementation

@override
void attachTo(BaseChart<D> chart) {
  if (!(chart is SunburstChart)) {
    throw ArgumentError(
        'SunburstRingExpander can only be attached to a Sunburst chart');
  }
  _chart = chart as SunburstChart<D>;
  chart
      .getSelectionModel(selectionModelType)
      .addSelectionUpdatedListener(_selectionChanged);
}