X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-externs.js;h=e8e2c420393aa40d739896cf1ddc057fa7c67548;hb=ac422b3aa23612c220b14e938fbae79d01b40b86;hp=71515cdd67f0fd545d5446f6f36875ab4aa2a37a;hpb=f11283de83195d2aee4bbbdc9651305bcdba478e;p=dygraphs.git diff --git a/dygraph-externs.js b/dygraph-externs.js index 71515cd..e8e2c42 100644 --- a/dygraph-externs.js +++ b/dygraph-externs.js @@ -1,34 +1,158 @@ /** - * @param {Object} dict - * @return {!Array.} + * @license + * Copyright 2006 Dan Vanderkam (danvdk@gmail.com) + * MIT-licensed (http://opensource.org/licenses/MIT) */ -function printStackTrace(dict) {} - +// 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 G_vmlCanvasManager() {} +function Dygraph(div, file, attrs) {} -/** - * @param {!HTMLCanvasElement} canvas - */ -G_vmlCanvasManager.initElement = function(canvas) {}; +/** @type {string} */ +Dygraph.NAME; -// For IE -/** - * @param {string} type - * @param {Object} fn - */ -Element.prototype.detachEvent = function(type, fn) {}; +/** @type {string} */ +Dygraph.VERSION; +/** @type {function(): string} */ +Dygraph.toString; -// TODO(danvk): move the Dygraph definitions out of here once I closure-ify dygraphs.js +/** @type {function(Event, Dygraph, DygraphInteractionContext)} */ +Dygraph.startPan; -/** - * @constructor - */ -function Dygraph() {} +/** @type {function(Event, Dygraph, DygraphInteractionContext)} */ +Dygraph.movePan; + +/** @type {function(Event, Dygraph, DygraphInteractionContext)} */ +Dygraph.endPan; + +/** @type {function(?string): boolean} */ +Dygraph.prototype.isZoomed; + +/** @type {function(): string} */ +Dygraph.prototype.toString; + +/** @type {function(string, string=)} */ +Dygraph.prototype.getOption; + +/** @type {function(): number} */ +Dygraph.prototype.rollPeriod; + +/** @type {function(): ?Array.} */ +Dygraph.prototype.xAxisRange; + +/** @type {function(): Array.} */ +Dygraph.prototype.xAxisExtremes; + +/** @type {function(number): ?Array.} */ +Dygraph.prototype.yAxisRange; + +/** @type {function(): Array.>} */ +Dygraph.prototype.yAxisRanges; + +/** @type {function(?number, ?number, ?number): Array.} */ +Dygraph.prototype.toDomCoords + +/** @type {function(?number): ?number} */ +Dygraph.prototype.toDomXCoord; + +/** @type {function(?number, ?number): ?number} */ +Dygraph.prototype.toDomYCoord; + +/** @type {function(?number, ?number, ?number): Array.} */ +Dygraph.prototype.toDataCoords; + +/** @type {function(?number): ?number} */ +Dygraph.prototype.toDataXCoord; + +/** @type {function(?number, ?number): ?number} */ +Dygraph.prototype.toDataYCoord; + +/** @type {function(?number, ?number): ?number} */ +Dygraph.prototype.toPercentYCoord; + +/** @type {function(?number): ?number} */ +Dygraph.prototype.toPercentXCoord; + +/** @type {function(): number} */ +Dygraph.prototype.numColumns; + +/** @type {function(): number} */ +Dygraph.prototype.numRows; + +/** @type {function(number, number)} */ +Dygraph.prototype.getValue; + +/** @type {function()} */ +Dygraph.prototype.destroy; + +/** @type {function()} */ +Dygraph.prototype.getColors; + +/** @type {function(string)} */ +Dygraph.prototype.getPropertiesForSeries; + +/** @type {function()} */ +Dygraph.prototype.resetZoom; + +/** @type {function(): {x, y, w, h}} */ +Dygraph.prototype.getArea; + +/** @type {function(Object): Array.} */ +Dygraph.prototype.eventToDomCoords; + +/** @type {function(number, string, boolean): boolean} */ +Dygraph.prototype.setSelection; + +/** @type {function()} */ +Dygraph.prototype.clearSelection; + +/** @type {function(): number} */ +Dygraph.prototype.getSelection; + +/** @type {function(): string} */ +Dygraph.prototype.getHighlightSeries; + +/** @type {function(): boolean} */ +Dygraph.prototype.isSeriesLocked; + +/** @type {function(): number} */ +Dygraph.prototype.numAxes; + +/** @type {function(Object, boolean=)} */ +Dygraph.prototype.updateOptions; + +/** @type {function(number, number)} */ +Dygraph.prototype.resize; + +/** @type {function(number)} */ +Dygraph.prototype.adjustRoll; + +/** @type {function(): Array.} */ +Dygraph.prototype.visibility; + +/** @type {function(number, boolean)} */ +Dygraph.prototype.setVisibility; + +/** @type {function(Array., boolean=)} */ +Dygraph.prototype.setAnnotations; + +/** @type {function(): Array.} */ +Dygraph.prototype.annotations; + +/** @type {function(): ?Array.} */ +Dygraph.prototype.getLabels; + +/** @type {function(string): ?number} */ +Dygraph.prototype.indexFromSetName; -/** @type {Array.<{elem:Element,type:string,fn:function(!Event):(boolean|undefined|null)}>} */ -Dygraph.prototype.registeredEvents_; +/** @type {function(function(!Dygraph))} */ +Dygraph.prototype.ready;