attachTo method
Injects the behavior into a chart.
Implementation
@override
void attachTo(BaseChart<D> chart) {
if (chart is! CartesianChart<D>) {
throw ArgumentError(
'InitialHintBehavior can only be attached to a CartesianChart<D>');
}
_chart = chart;
chart.addGestureListener(_listener);
chart.addLifecycleListener(_lifecycleListener);
}