Merge pull request #260 from klausw-g/resize-fix-2
[dygraphs.git] / dygraph-externs.js
1 /**
2 * @param {Object} dict
3 * @return {!Array.<string>}
4 */
5 function printStackTrace(dict) {}
6
7
8 /**
9 * @constructor
10 */
11 function G_vmlCanvasManager() {}
12
13 /**
14 * @param {!HTMLCanvasElement} canvas
15 */
16 G_vmlCanvasManager.initElement = function(canvas) {};
17
18 // For IE
19 /**
20 * @param {string} type
21 * @param {Object} fn
22 */
23 Element.prototype.detachEvent = function(type, fn) {};
24
25
26 /**
27 * @typedef {function(
28 * (number|Date),
29 * number,
30 * function(string):*,
31 * (Dygraph|undefined)
32 * ):string}
33 */
34 var AxisLabelFormatter;
35
36
37 /**
38 * @typedef {function(number,function(string),Dygraph):string}
39 */
40 var ValueFormatter;
41
42
43 /**
44 * @typedef {Array.<Array.<string|number|Array.<number>>>}
45 */
46 var DygraphDataArray;
47
48 /**
49 * @constructor
50 */
51 function GVizDataTable() {}
52
53 // TODO(danvk): move the Dygraph definitions out of here once I closure-ify dygraphs.js
54 /**
55 * @param {!HTMLDivElement|string} div
56 * @param {DygraphDataArray|
57 * GVizDataTable|
58 * string|
59 * function():(DygraphDataArray|GVizDataTable|string)} file
60 * @param {Object} attrs
61 * @constructor
62 */
63 function Dygraph(div, file, attrs) {}
64
65 /**
66 * @constructor
67 */
68 function DygraphLayout() {}
69
70 /**
71 * @type {Array}
72 */
73 DygraphLayout.prototype.datasets;
74
75 // TODO: DygraphOptions should not reach inside Dygraph private data like this.
76 /** @type {Object} */
77 Dygraph.prototype.attrs_;
78 /** @type {Object} */
79 Dygraph.prototype.user_attrs_;
80
81 /**
82 * @type {DygraphLayout}
83 */
84 Dygraph.prototype.layout_;
85
86 /** @type {function(): string} */
87 Dygraph.prototype.getHighlightSeries;
88
89 /** @type {Array.<{elem:Element,type:string,fn:function(!Event):(boolean|undefined|null)}>} */
90 Dygraph.prototype.registeredEvents_;
91
92 /** @type {{axes: Object}} */
93 Dygraph.DEFAULT_ATTRS;