esnet / react-timeseries-charts

Declarative and modular timeseries charting components for React
http://software.es.net/react-timeseries-charts
Other
859 stars 283 forks source link

Ability to disable mouse scroll wheel event handler #433

Open bminer opened 4 years ago

bminer commented 4 years ago

🌈Feature request

What is this feature?

Ability to disable mouse scroll wheel event handler when enableDragZoom is set.

How should the feature work?

Add a prop to the ChartContainer to enable/disable mouse scroll wheel event handler. Could also pass in a function to override default behavior?

Current behavior is to ignore scroll wheel events if and only if enableDragZoom and enablePanZoom are both falsy. This is good default behavior, but it would be nice if it could be customized.

Do you have examples or an idea of how it can be implemented?

Change EventHandler and ChartContainer as described above.

Similar feature discussed here: #303, although the feature described above is a simpler change.