dc-js/dc.js — pull request #699 by ThomasRobertFr (2014-09-10 12:51:47+00:00)
Title: Add a mouse wheel mixin

This mixin is an helper to add mousewheel behavior handling for the charts. It allows you to set callbacks [1] on mouse wheel events (for the chart user) and add code that will be ran [2] on the same event (for the chart developper).

Example of usage:

```js
// inside a chart definition
_chart._onZoomIn = function(d) { console.log("this code will be launched on zoom on"); } // [2]
elements
.on("mousewheel", function(d) { _chart.onMouseWheel(d, true, false); })
.on("DOMMouseScroll", _chart.onMouseWheel function(d) { _chart.onMouseWheel(d, true, false); }) // older versions of Firefox
.on("wheel", function(d) { _chart.onMouseWheel(d, true, false); }); // newer versions of Firefox

// for the user [1]
myChart.callbackZoomIn(function(d) { console.log("You just zoomed on "+d) });
```

We use this because we do OLAP viz with dc.js and want drill-down / roll-up behavior on charts. If you want to see how we use this mixin, see https://github.com/loganalysis/dc.js/tree/feature/bar_chart