X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-externs.js;h=ed5de4c1aa45bd1ccc029197c9975cd10896c2ea;hb=0c59a4284a1fe42d254fb07df67d6c01a9577a84;hp=71515cdd67f0fd545d5446f6f36875ab4aa2a37a;hpb=f11283de83195d2aee4bbbdc9651305bcdba478e;p=dygraphs.git diff --git a/dygraph-externs.js b/dygraph-externs.js index 71515cd..ed5de4c 100644 --- a/dygraph-externs.js +++ b/dygraph-externs.js @@ -23,12 +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.>>} + */ +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} + */ +DygraphLayout.prototype.datasets; + +// TODO: DygraphOptions should not reach inside Dygraph private data like this. +/** @type {Object} */ +Dygraph.prototype.attrs_; +/** @type {Object} */ +Dygraph.prototype.user_attrs_; + +/** + * @type {DygraphLayout} + */ +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;