copy datahandler changes over from full-closure branch
[dygraphs.git] / dygraph-externs.js
... / ...
CommitLineData
1/**
2 * @param {Object} dict
3 * @return {!Array.<string>}
4 */
5function printStackTrace(dict) {}
6
7
8/**
9 * @constructor
10 */
11function G_vmlCanvasManager() {}
12
13/**
14 * @param {!HTMLCanvasElement} canvas
15 */
16G_vmlCanvasManager.initElement = function(canvas) {};
17
18// For IE
19/**
20 * @param {string} type
21 * @param {Object} fn
22 */
23Element.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 */
34var AxisLabelFormatter;
35
36
37/**
38 * @typedef {function(number,function(string),Dygraph):string}
39 */
40var ValueFormatter;
41
42
43/**
44 * @typedef {Array.<Array.<string|number|Array.<number>>>}
45 */
46var DygraphDataArray;
47
48/**
49 * @constructor
50 */
51function 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 */
63function Dygraph(div, file, attrs) {}
64
65/**
66 * @constructor
67 */
68function DygraphLayout() {}
69
70/**
71 * @type {Array}
72 */
73DygraphLayout.prototype.datasets;
74
75// TODO: DygraphOptions should not reach inside Dygraph private data like this.
76/** @type {Object} */
77Dygraph.prototype.attrs_;
78/** @type {Object} */
79Dygraph.prototype.user_attrs_;
80
81/**
82 * @type {DygraphLayout}
83 */
84Dygraph.prototype.layout_;
85
86/** @type {function(): string} */
87Dygraph.prototype.getHighlightSeries;
88
89/** @type {Array.<{elem:Element,type:string,fn:function(!Event):(boolean|undefined|null)}>} */
90Dygraph.prototype.registeredEvents_;
91
92/** @type {{axes: Object}} */
93Dygraph.DEFAULT_ATTRS;