Merge pull request #305 from brentwalther/master
authorDan Vanderkam <danvdk@gmail.com>
Mon, 7 Jul 2014 18:10:30 +0000 (14:10 -0400)
committerDan Vanderkam <danvdk@gmail.com>
Mon, 7 Jul 2014 18:10:30 +0000 (14:10 -0400)
Add panning functions to dygraph-externs and PointType to dygraph-types

dygraph-externs.js
dygraph-types.js

index b4b8e5d..11f8674 100644 (file)
@@ -19,6 +19,15 @@ Dygraph.VERSION;
 /** @type {function(): string} */
 Dygraph.toString;
 
+/** @type {function(Event, Dygraph, DygraphInteractionContext)} */
+Dygraph.startPan;
+
+/** @type {function(Event, Dygraph, DygraphInteractionContext)} */
+Dygraph.movePan;
+
+/** @type {function(Event, Dygraph, DygraphInteractionContext)} */
+Dygraph.endPan;
+
 /** @type {function(?string): boolean} */
 Dygraph.prototype.isZoomed;
 
index 4e90693..c8d6e04 100644 (file)
  */
 var DygraphInteractionContext;
 
+/**
+ * Point structure.
+ *
+ * xval_* and yval_* are the original unscaled data values,
+ * while x_* and y_* are scaled to the range (0.0-1.0) for plotting.
+ * yval_stacked is the cumulative Y value used for stacking graphs,
+ * and bottom/top/minus/plus are used for error bar graphs.
+ *
+ * @typedef {{
+ *     idx: number,
+ *     name: string,
+ *     x: ?number,
+ *     xval: ?number,
+ *     y_bottom: ?number,
+ *     y: ?number,
+ *     y_stacked: ?number,
+ *     y_top: ?number,
+ *     yval_minus: ?number,
+ *     yval: ?number,
+ *     yval_plus: ?number,
+ *     yval_stacked
+ * }}
+ */
+Dygraph.PointType;