Repository: bokeh/bokeh

Issue:
Add WheelPanTool support to BokehJS
Would it be possible to make WheelPanTool (xwheel_pan and ywheel_pan) available in BokehJS?
This is mostly a nice to have feature, but still quite useful for some applications (and a distinctive advantage of BokehJS over other js plotting libraries).
Thanks in advance.

```
<html>
<head>
	<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-0.12.10.css" type="text/css" />
	<script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-0.12.10.js"></script>
	<script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-api-0.12.10.js"></script>
	<!-- The order of CSS and JS imports above is important. -->
	
</head>
<body>
	<div id="myPlot">
	</div>
	<script type="text/javascript">
	// data to plot
	var source = new Bokeh.ColumnDataSource({
		data: { x: [0,1,2,3,4,5,6,7,8,9], y: [0,1,4,-2,2,5,0,2,1,1] }
	});

	// make the plot and add some tools
	var tools = "pan,crosshair,wheel_zoom,xwheel_pan,ywheel_pan,box_zoom,reset,save";

	var plot = Bokeh.Plotting.figure({
		title:"demo plot",
		tools: tools,
		toolbar_location:"above",
		sizing_mode:"stretch_both"
	});
	
	var scatterData = plot.line({ field: "x" }, { field: "y" }, {
		source: source,
		line_width: 2
	});
	
	// Show the plot, appending it to the end of the current
	// section of the document we are in.
	Bokeh.Plotting.show(plot,document.getElementById("myPlot"));
	</script>
</body>
</html>
```


Discussion:
@mattpap this is a simple add, no? 

@Astrum42 `WheelPanTool` should already be available:

https://github.com/bokeh/bokeh/blob/master/bokehjs/src/coffee/api/typings/models/tools.d.ts#L24

you could explicitly create a `WheelPanTool` configured with whatever `dimension` you want, and add it to `plot.tool` now AFAIK
> this is a simple add, no?

It's trivial. In fact it should have been added in efce54b.
Got it, following code works. I guess the only missing bit is to get shortcuts xwheel_pan and ywheel_pan to work as well.
Thanks!
```
<!DOCTYPE html>
<html style="width:97%; height:97%;">
<head>
	<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-0.12.10.css" type="text/css" />
	<script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-0.12.10.js"></script>
	<script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-api-0.12.10.js"></script>
	<!-- The order of CSS and JS imports above is important. -->
	
</head>
<body style="width:100%; height:100%;">
	<div id="myPlot">
	</div>
	<script type="text/javascript">
	// data to plot
	var source = new Bokeh.ColumnDataSource({
		data: { x: [0,1,2,3,4,5,6,7,8,9], y: [0,1,4,-2,2,5,0,2,1,1] }
	});

	// make the plot and add some tools
	var tools = "pan,crosshair,wheel_zoom,box_zoom,reset,save";

	var plot = Bokeh.Plotting.figure({
		title:"demo plot",
		tools: tools,
		toolbar_location:"above",
		sizing_mode:"stretch_both"
	});
	//sizing_mode:"stretch_both"
	
	var scatterData = plot.line({ field: "x" }, { field: "y" }, {
		source: source,
		line_width: 2
	});
	
	plot.add_tools(new Bokeh.WheelPanTool({dimension:'width'}));
	
	// Show the plot, appending it to the end of the current
	// section of the document we are in.
	Bokeh.Plotting.show(plot,document.getElementById("myPlot"));
	</script>
</body>
</html>
```


Resolving patch:
diff --git a/bokeh/plotting/helpers.py b/bokeh/plotting/helpers.py
--- a/bokeh/plotting/helpers.py
+++ b/bokeh/plotting/helpers.py
@@ -406,6 +406,8 @@ def _get_num_minor_ticks(axis_class, num_minor_ticks):
     "pan": lambda: PanTool(dimensions='both'),
     "xpan": lambda: PanTool(dimensions='width'),
     "ypan": lambda: PanTool(dimensions='height'),
+    "xwheel_pan": lambda: WheelPanTool(dimension="width"),
+    "ywheel_pan": lambda: WheelPanTool(dimension="height"),
     "wheel_zoom": lambda: WheelZoomTool(dimensions='both'),
     "xwheel_zoom": lambda: WheelZoomTool(dimensions='width'),
     "ywheel_zoom": lambda: WheelZoomTool(dimensions='height'),
@@ -415,8 +417,6 @@ def _get_num_minor_ticks(axis_class, num_minor_ticks):
     "zoom_out": lambda: ZoomOutTool(dimensions='both'),
     "xzoom_out": lambda: ZoomOutTool(dimensions='width'),
     "yzoom_out": lambda: ZoomOutTool(dimensions='height'),
-    "xwheel_pan": lambda: WheelPanTool(dimension="width"),
-    "ywheel_pan": lambda: WheelPanTool(dimension="height"),
     "click": lambda: TapTool(behavior="inspect"),
     "tap": lambda: TapTool(),
     "crosshair": lambda: CrosshairTool(),


Test patch: