attachTo method
Injects the behavior into a chart.
Implementation
@override
void attachTo(BaseChart<D> chart) {
// Domain selection behavior only works for cartesian charts.
assert(chart is CartesianChart<D>);
_chart = chart as CartesianChart<D>;
chart.addLifecycleListener(_lifecycleListener);
super.attachTo(chart);
}