Whoops, bad documentation for the new color option.
[dygraphs.git] / dygraph-externs.js
index dc05172..ed5de4c 100644 (file)
@@ -23,25 +23,71 @@ G_vmlCanvasManager.initElement = function(canvas) {};
 Element.prototype.detachEvent = function(type, fn) {};
 
 
+/**
+ * @typedef {function(
+ *   (number|Date),
+ *   number,
+ *   function(string):*,
+ *   (Dygraph|undefined)
+ * ):string}
+ */
+var AxisLabelFormatter;
+
+
+/**
+ * @typedef {function(number,function(string),Dygraph):string}
+ */
+var ValueFormatter;
+
+
+/**
+ * @typedef {Array.<Array.<string|number|Array.<number>>>}
+ */
+var DygraphDataArray;
+
+/**
+ * @constructor
+ */
+function GVizDataTable() {}
+
 // TODO(danvk): move the Dygraph definitions out of here once I closure-ify dygraphs.js
+/**
+ * @param {!HTMLDivElement|string} div
+ * @param {DygraphDataArray|
+ *     GVizDataTable|
+ *     string|
+ *     function():(DygraphDataArray|GVizDataTable|string)} file
+ * @param {Object} attrs
+ * @constructor
+ */
+function Dygraph(div, file, attrs) {}
 
 /**
  * @constructor
  */
-function Dygraph() {}
+function DygraphLayout() {}
 
-/** @type {Array.<{elem:Element,type:string,fn:function(!Event):(boolean|undefined|null)}>} */
-Dygraph.prototype.registeredEvents_;
+/**
+ * @type {Array}
+ */
+DygraphLayout.prototype.datasets;
 
+// TODO: DygraphOptions should not reach inside Dygraph private data like this.
 /** @type {Object} */
-Dygraph.DEFAULT_ATTRS;
+Dygraph.prototype.attrs_;
+/** @type {Object} */
+Dygraph.prototype.user_attrs_;
 
 /**
- * @typedef {function(
- *   (number|Date),
- *   number,
- *   function(string):*,
- *   (Dygraph|undefined)
- * ):string}
+ * @type {DygraphLayout}
  */
-Dygraph.AxisLabelFormatter;
+Dygraph.prototype.layout_;
+
+/** @type {function(): string} */
+Dygraph.prototype.getHighlightSeries;
+
+/** @type {Array.<{elem:Element,type:string,fn:function(!Event):(boolean|undefined|null)}>} */
+Dygraph.prototype.registeredEvents_;
+
+/** @type {{axes: Object}} */
+Dygraph.DEFAULT_ATTRS;