removeFrom method
Removes the behavior from a chart.
Implementation
@override
void removeFrom(BaseChart<D> chart) {
if (chart is! CartesianChart<D>) {
throw ArgumentError(
'PanBehavior can only be attached to a CartesianChart<D>');
}
_chart = chart;
chart.removeGestureListener(_listener);
// Restore the default autoViewport state.
chart.domainAxis!.autoViewport = true;
// Restore the original tick providers
chart.domainAxis!.tickProvider = _domainAxisTickProvider.tickProvider;
_chart = null;
}