From 9a8c45ec6ec34fa586d36af854833057b3871563 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Mon, 22 Jul 2013 19:16:51 -0400 Subject: [PATCH] 228 warnings in dygraph.js --- dygraph-canvas.js | 10 +- dygraph-externs.js | 248 ++----------------------------------------- dygraph-interaction-model.js | 14 +-- dygraph-layout.js | 8 +- dygraph-tickers.js | 8 +- dygraph.js | 87 ++++++++++----- 6 files changed, 87 insertions(+), 288 deletions(-) diff --git a/dygraph-canvas.js b/dygraph-canvas.js index 496326f..d2d95c7 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -424,24 +424,24 @@ DygraphCanvasRenderer.prototype._renderLineChart = function(opt_seriesName, opt_ this.colors = this.dygraph_.colorsMap_; // Determine which series have specialized plotters. - var plotter_attr = /** @type{!Array.|!Dygraph.PlotterType}*/(this.dygraph_.getOption("plotter")); + var plotter_attr = /** @type{!Array.|!DygraphPlotterType}*/(this.dygraph_.getOption("plotter")); - /** @type{!Array.} */ + /** @type{!Array.} */ var plotters; if (!Dygraph.isArrayLike(plotters)) { plotters = [plotters]; } else { - plotters = /** @type {!Array.} */(plotter_attr); + plotters = /** @type {!Array.} */(plotter_attr); } - /** @type {Object.} */ + /** @type {Object.} */ var setPlotters = {}; // series name -> plotter fn. for (i = 0; i < setNames.length; i++) { setName = setNames[i]; var setPlotter = this.dygraph_.getOption("plotter", setName); if (setPlotter == plotter_attr) continue; // not specialized. - setPlotters[setName] = /** @type {!Dygraph.PlotterType} */(setPlotter); + setPlotters[setName] = /** @type {!DygraphPlotterType} */(setPlotter); } for (i = 0; i < plotters.length; i++) { diff --git a/dygraph-externs.js b/dygraph-externs.js index 6aba351..8282774 100644 --- a/dygraph-externs.js +++ b/dygraph-externs.js @@ -52,238 +52,6 @@ function GVizDataTable() {} /** * @typedef {{ - * idx: number, - * name: string, - * x: ?number, - * xval: ?number, - * y_bottom: ?number, - * y: ?number, - * y_stacked: ?number, - * y_top: ?number, - * yval_minus: ?number, - * yval: ?number, - * yval_plus: ?number, - * yval_stacked - * }} - */ -Dygraph.PointType; - -// /** -// * @constructor -// */ -// function DygraphLayout() {} -// -// /** -// * @type {Array.>} -// */ -// DygraphLayout.prototype.points; - -// TODO: DygraphOptions should not reach inside Dygraph private data like this. -/** @type {Object} */ -Dygraph.prototype.attrs_; -/** @type {Object} */ -Dygraph.prototype.user_attrs_; -/** @type {Array.} */ -Dygraph.prototype.selPoints_; // TODO(danvk): type actually has .canvasx, ... - -/** - * @param {string} name the name of the option. - */ -Dygraph.prototype.attr_ = function(name) {}; - -/** - * @return {{width: number, height: number}} object. - */ -Dygraph.prototype.size = function() {}; - -/** - * @return {Dygraph.Rect} - */ -Dygraph.prototype.getArea = function() {}; - -/** - * @return {!Array.} - */ -Dygraph.prototype.xAxisExtremes = function() {}; - -/** - * @param {?number} x The data x-value. - * @return {?number} The DOM coordinate, or null if the input is null. - */ -Dygraph.prototype.toDomXCoord = function(x) {}; - -/** - * @param {?number} y The data y-value. - * @param {number=} opt_axis The axis number (0=primary). - * @return {?number} The DOM coordinate, or null if the input is null. - */ -Dygraph.prototype.toDomYCoord = function(y, opt_axis) {}; - -/** - * @param {?number} x The DOM x-coordinate. - * @return {?number} The data x-coordinate, or null if the input is null. - */ -Dygraph.prototype.toDataXCoord = function(x) {}; - -/** - * @param {?number} y The DOM y-coordinate. - * @param {number=} opt_axis The axis number (0=primary). - * @return {?number} The data y-value, or null if the input is null. - */ -Dygraph.prototype.toDataYCoord = function(y, opt_axis) {}; - -/** - * @type {DygraphLayout} - */ -Dygraph.prototype.layout_; - -/** - * @type {!HTMLDivElement} - */ -Dygraph.prototype.graphDiv; - -/** - * @type {!DygraphOptions} - */ -Dygraph.prototype.attributes_; - -/** @type {function(): string} */ -Dygraph.prototype.getHighlightSeries; - -/** - * @param {string} name Event name. - * @param {Object} extra_props Event-specific properties. - * @return {boolean} Whether to perform the default action. - */ -Dygraph.prototype.cascadeEvents_ = function(name, extra_props) {}; - -/** - * @type {Array.<{ - * elem: !Element, - * type: string, - * fn: function(?Event):(boolean|undefined) - * }>} - */ -Dygraph.prototype.registeredEvents_; - -/** - * @type {CanvasRenderingContext2D} - */ -Dygraph.prototype.canvas_ctx_; - -/** - * @type {CanvasRenderingContext2D} - */ -Dygraph.prototype.hidden_ctx_; - -/** - * @type {Object.} - */ -Dygraph.prototype.colorsMap_; - -/** - * TODO(danvk): be more specific - * @type {Array.} - */ -Dygraph.prototype.axes_; - -/** - * @type {number} - */ -Dygraph.prototype.lastx_; - -/** - * @return {!Array.} two element [left, right] array. - */ -Dygraph.prototype.xAxisRange = function() {}; - -/** - * @param {number=} opt_axis Optional axis (0=primary). - * @return {Array.} A two-element array: [bottom, top]. - */ -Dygraph.prototype.yAxisRange = function(opt_axis) {}; - -/** - * @return {!Array.>} - */ -Dygraph.prototype.yAxisRanges = function() {}; - -/** - * @param {string} setName Set name. - * @return {Object} axis properties for the series. - */ -Dygraph.prototype.axisPropertiesForSeries = function(setName) {}; - -/** - * @param {number} y The data y-coordinate. - * @param {number} axis The axis number on which the data coordinate lives. - * @return {number} A fraction in [0, 1] where 0 = the top edge. - */ -Dygraph.prototype.toPercentYCoord = function(y, axis) {}; - -/** - * @param {string} name The name of the option (e.g. 'strokeWidth') - * @param {string=} opt_seriesName Series name to get per-series values. - * @return {*} The value of the option. - */ -Dygraph.prototype.getOption = function(name, opt_seriesName) {}; - -/** - * @return {?Array.} The names of each series (including the x-axis), - * or null if they haven't been defined yet. - */ -Dygraph.prototype.getLabels = function() {}; - -/** - * @return {Array.} The list of colors. - */ -Dygraph.prototype.getColors = function() {}; - -/** - */ -Dygraph.prototype.drawGraph_ = function() {}; - -/** - * @param {number} direction - * @param {number} startX - * @param {number} endX - * @param {number} startY - * @param {number} endY - * @param {number} prevDirection - * @param {number} prevEndX - * @param {number} prevEndY - * @private - */ -Dygraph.prototype.drawZoomRect_ = function(direction, startX, endX, startY, - endY, prevDirection, prevEndX, - prevEndY) {}; - - -Dygraph.prototype.clearZoomRect_ = function() {}; -Dygraph.prototype.resetZoom = function() {}; - -/** - * @param {number} lowX - * @param {number} highX - */ -Dygraph.prototype.doZoomX_ = function(lowX, highX) {}; - -/** - * @param {number} lowY - * @param {number} highY - */ -Dygraph.prototype.doZoomY_ = function(lowY, highY) {}; - -/** @type {number} */ -Dygraph.HORIZONTAL; -/** @type {number} */ -Dygraph.VERTICAL; - -/** @type {{axes: Object}} */ -Dygraph.DEFAULT_ATTRS; - -/** - * @typedef {{ * xval: (number|undefined), * x: string, * series: string, @@ -294,7 +62,7 @@ Dygraph.DEFAULT_ATTRS; * text: (string|undefined) * }} */ -Dygraph.AnnotationType; +var DygraphAnnotationType; /** * @typedef {Array.<{ @@ -303,7 +71,7 @@ Dygraph.AnnotationType; * label_v:(string|undefined) * }>} */ -Dygraph.TickList; +var DygraphTickList; /** * @typedef {(function( @@ -313,9 +81,9 @@ Dygraph.TickList; * function(string):*, * Dygraph=, * Array.= - * ): Dygraph.TickList)} + * ): DygraphTickList)} */ -Dygraph.Ticker; +var DygraphTicker; /** * @typedef {{ @@ -325,7 +93,7 @@ Dygraph.Ticker; * h: number * }} */ -Dygraph.Rect; +var DygraphRect; /** * @typedef {{ @@ -336,13 +104,13 @@ Dygraph.Rect; * computedValueRange: Array. * }} */ -Dygraph.AxisType; +var DygraphAxisType; /** * TODO(danvk): be more specific than "Object". * @typedef {function(Object)} */ -Dygraph.PlotterType; +var DygraphPlotterType; /** @@ -357,4 +125,4 @@ Dygraph.PlotterType; * function(!Event, !Dygraph, !Dygraph.InteractionContext) * }} */ -Dygraph.InteractionContext; +var DygraphsInteractionContext; diff --git a/dygraph-interaction-model.js b/dygraph-interaction-model.js index 09b82fa..6168743 100644 --- a/dygraph-interaction-model.js +++ b/dygraph-interaction-model.js @@ -31,7 +31,7 @@ Dygraph.Interaction = {}; * * @param {!Event} event the event object which led to the startPan call. * @param {!Dygraph} g The dygraph on which to act. - * @param {!Dygraph.InteractionContext} context The dragging context object + * @param {!DygraphInteractionContext} context The dragging context object * (with dragStartX/dragStartY/etc. properties). This function modifies the * context. */ @@ -112,7 +112,7 @@ Dygraph.Interaction.startPan = function(event, g, context) { * * @param {!Event} event the event object which led to the movePan call. * @param {!Dygraph} g The dygraph on which to act. - * @param {!Dygraph.InteractionContext} context The dragging context object + * @param {!DygraphInteractionContext} context The dragging context object * (with dragStartX/dragStartY/etc. properties). This function modifies the * context. */ @@ -185,7 +185,7 @@ Dygraph.Interaction.movePan = function(event, g, context) { * * @param {!Event} event the event object which led to the endPan call. * @param {!Dygraph} g The dygraph on which to act. - * @param {!Dygraph.InteractionContext} context The dragging context object + * @param {!DygraphInteractionContext} context The dragging context object * (with dragStartX/dragStartY/etc. properties). This function modifies the * context. */ @@ -223,7 +223,7 @@ Dygraph.Interaction.endPan = function(event, g, context) { * * @param {!Event} event the event object which led to the startZoom call. * @param {!Dygraph} g The dygraph on which to act. - * @param {!Dygraph.InteractionContext} context The dragging context object + * @param {!DygraphInteractionContext} context The dragging context object * (with dragStartX/dragStartY/etc. properties). This function modifies the * context. */ @@ -242,7 +242,7 @@ Dygraph.Interaction.startZoom = function(event, g, context) { * * @param {!Event} event the event object which led to the moveZoom call. * @param {!Dygraph} g The dygraph on which to act. - * @param {!Dygraph.InteractionContext} context The dragging context object + * @param {!DygraphInteractionContext} context The dragging context object * (with dragStartX/dragStartY/etc. properties). This function modifies the * context. */ @@ -275,7 +275,7 @@ Dygraph.Interaction.moveZoom = function(event, g, context) { /** * @param {!Dygraph} g * @param {!Event} event - * @param {!Dygraph.InteractionContext} context + * @param {!DygraphInteractionContext} context */ Dygraph.Interaction.treatMouseOpAsClick = function(g, event, context) { var clickCallback = g.attr_('clickCallback'); @@ -329,7 +329,7 @@ Dygraph.Interaction.treatMouseOpAsClick = function(g, event, context) { * * @param {!Event} event the event object which led to the endZoom call. * @param {!Dygraph} g The dygraph on which to end the zoom. - * @param {!Dygraph.InteractionContext} context The dragging context object + * @param {!DygraphInteractionContext} context The dragging context object * (with dragStartX/dragStartY/etc. properties). This function modifies the * context. */ diff --git a/dygraph-layout.js b/dygraph-layout.js index 76cdb5f..628e889 100644 --- a/dygraph-layout.js +++ b/dygraph-layout.js @@ -50,7 +50,7 @@ var DygraphLayout = function(dygraph) { /** @type {Array.} */ this.annotations = []; - /** @type {Array.} */ + /** @type {Array.} */ this.yAxes_ = null; // TODO(danvk): it's odd that xTicks_ and yTicks_ are inputs, but xticks and @@ -60,7 +60,7 @@ var DygraphLayout = function(dygraph) { /** @type {Dygraph.TickList} */ this.yTicks_ = null; - /** @type {?Dygraph.Rect} */ + /** @type {?DygraphRect} */ this.area_ = null; // TODO(danvk): these fields should be objects, not arrays of arrays, which @@ -101,7 +101,7 @@ DygraphLayout.prototype.addDataset = function(setname, set_xy) { * Returns the box which the chart should be drawn in. This is the canvas's * box, less space needed for the axis and chart labels. * - * @return {?Dygraph.Rect} + * @return {?DygraphRect} */ DygraphLayout.prototype.getPlotArea = function() { return this.area_; @@ -225,7 +225,7 @@ DygraphLayout.prototype.setXTicks = function(xTicks) { }; /** - * @param {Array.} yAxes The y-axes. + * @param {Array.} yAxes The y-axes. */ DygraphLayout.prototype.setYAxes = function (yAxes) { this.yAxes_ = yAxes; diff --git a/dygraph-tickers.js b/dygraph-tickers.js index 9d799b1..9340d78 100644 --- a/dygraph-tickers.js +++ b/dygraph-tickers.js @@ -64,7 +64,7 @@ /*global Dygraph:false */ "use strict"; -/** @type {Dygraph.Ticker} */ +/** @type {DygraphTicker} */ Dygraph.numericLinearTicks = function(a, b, pixels, opts, dygraph, vals) { var nonLogscaleOpts = function(opt) { if (opt === 'logscale') return false; @@ -93,7 +93,7 @@ var PREFERRED_LOG_TICK_VALUES = (function() { })(); -/** @type {Dygraph.Ticker} */ +/** @type {DygraphTicker} */ Dygraph.numericTicks = function(a, b, pixels, opts, dygraph, vals) { var pixels_per_tick = /** @type{number} */(opts('pixelsPerLabel')); var ticks = []; @@ -212,7 +212,7 @@ Dygraph.numericTicks = function(a, b, pixels, opts, dygraph, vals) { }; -/** @type {Dygraph.Ticker} */ +/** @type {DygraphTicker} */ Dygraph.dateTicker = function(a, b, pixels, opts, dygraph, vals) { var chosen = Dygraph.pickDateTickGranularity(a, b, pixels, opts); @@ -348,7 +348,7 @@ Dygraph.numDateTicks = function(start_time, end_time, granularity) { * @param {number} granularity (one of the granularities enumerated above) * @param {function(string):*} opts Function mapping from option name -> value. * @param {Dygraph=} dg - * @return {!Dygraph.TickList} + * @return {!DygraphTickList} */ Dygraph.getDateAxis = function(start_time, end_time, granularity, opts, dg) { var formatter = /** @type{AxisLabelFormatter} */( diff --git a/dygraph.js b/dygraph.js index 7a64e79..0b1724e 100644 --- a/dygraph.js +++ b/dygraph.js @@ -104,7 +104,10 @@ var Dygraph = function(div, file, opt_attrs) { this.is_initial_draw_ = true; - /** @type {!Array.} */ + /** @type {number} */ + this.lastx_ = undefined; + + /** @type {!Array.} */ this.annotations_ = []; // Zoomed indicators - These indicate when the graph has been zoomed and on what axis. @@ -166,11 +169,22 @@ var Dygraph = function(div, file, opt_attrs) { this.setIndexByName_ = {}; this.datasetIndex_ = []; + /** + * @type {Array.<{ + * elem: !Element, + * type: string, + * fn: function(?Event):(boolean|undefined) + * }>} + */ this.registeredEvents_ = []; this.eventListeners_ = {}; + /** @type {!DygraphOptions} */ this.attributes_ = new DygraphOptions(this); + /** @type {Array.} */ + this.selPoints_ = []; + // Create the containing DIV and other interactive elements this.createInterface_(); @@ -221,14 +235,14 @@ var Dygraph = function(div, file, opt_attrs) { Dygraph.NAME = "Dygraph"; Dygraph.VERSION = "1.2"; Dygraph.__repr__ = function() { - return "[" + this.NAME + " " + this.VERSION + "]"; + return "[" + Dygraph.NAME + " " + Dygraph.VERSION + "]"; }; /** * Returns information about the Dygraph class. */ Dygraph.toString = function() { - return this.__repr__(); + return Dygraph.__repr__(); }; // Various default values @@ -377,6 +391,7 @@ Dygraph.Plotters = DygraphCanvasRenderer._Plotters; // Default attribute values. +/** @type {{axes: Object}} */ Dygraph.DEFAULT_ATTRS = { highlightCircleSize: 3, highlightSeriesOpts: null, @@ -500,7 +515,9 @@ Dygraph.DEFAULT_ATTRS = { // Directions for panning and zooming. Use bit operations when combined // values are possible. +/** @const */ Dygraph.HORIZONTAL = 1; +/** @const */ Dygraph.VERTICAL = 2; // Installed plugins, in order of precedence (most-general to most-specific). @@ -515,6 +532,9 @@ var addedAnnotationCSS = false; * Triggers a cascade of events to the various plugins which are interested in them. * Returns true if the "default behavior" should be performed, i.e. if none of * the event listeners called event.preventDefault(). + * @param {string} name Event name. + * @param {Object} extra_props Event-specific properties. + * @return {boolean} Whether to perform the default action. * @private */ Dygraph.prototype.cascadeEvents_ = function(name, extra_props) { @@ -580,13 +600,13 @@ Dygraph.prototype.toString = function() { * Returns the value of an option. This may be set by the user (either in the * constructor or by calling updateOptions) or by dygraphs, and may be set to a * per-series value. - * @param { String } name The name of the option, e.g. 'rollPeriod'. - * @param { String } [seriesName] The name of the series to which the option + * @param {string} name The name of the option, e.g. 'rollPeriod'. + * @param {string} opt_seriesName The name of the series to which the option * will be applied. If no per-series value of this option is available, then * the global value is returned. This is optional. - * @return { ... } The value of the option. + * @return {*} The value of the option. */ -Dygraph.prototype.attr_ = function(name, seriesName) { +Dygraph.prototype.attr_ = function(name, opt_seriesName) { // if (typeof(Dygraph.OPTIONS_REFERENCE) === 'undefined') { Dygraph.error('Must include options reference JS for testing'); @@ -597,7 +617,7 @@ Dygraph.prototype.attr_ = function(name, seriesName) { Dygraph.OPTIONS_REFERENCE[name] = true; } // - return seriesName ? this.attributes_.getForSeries(name, seriesName) : this.attributes_.get(name); + return opt_seriesName ? this.attributes_.getForSeries(name, opt_seriesName) : this.attributes_.get(name); }; /** @@ -625,7 +645,7 @@ Dygraph.prototype.getOptionForAxis = function(name, axis) { /** * @private * @param {string} axis The name of the axis (i.e. 'x', 'y' or 'y2') - * @return { ... } A function mapping string -> option value + * @return {function(string)} A function mapping string -> option value */ Dygraph.prototype.optionsViewForAxis_ = function(axis) { var self = this; @@ -668,6 +688,7 @@ Dygraph.prototype.rollPeriod = function() { * panning or a call to updateOptions. * Returns a two-element array: [left, right]. * If the Dygraph has dates on the x-axis, these will be millis since epoch. + * @return {!Array.} two element [left, right] array. */ Dygraph.prototype.xAxisRange = function() { return this.dateWindow_ ? this.dateWindow_ : this.xAxisExtremes(); @@ -961,6 +982,7 @@ Dygraph.prototype.createInterface_ = function() { // Create the all-enclosing graph div var enclosing = this.maindiv_; + /** @type {!HTMLDivElement} */ this.graphDiv = document.createElement("div"); // TODO(danvk): any other styles that are useful to set here? @@ -976,7 +998,9 @@ Dygraph.prototype.createInterface_ = function() { this.resizeElements_(); + /** @type {CanvasRenderingContext2D} */ this.canvas_ctx_ = Dygraph.getContext(this.canvas_); + /** @type {CanvasRenderingContext2D} */ this.hidden_ctx_ = Dygraph.getContext(this.hidden_); // The interactive parts of the graph are drawn on top of the chart. @@ -984,7 +1008,7 @@ Dygraph.prototype.createInterface_ = function() { this.graphDiv.appendChild(this.canvas_); this.mouseEventElement_ = this.createMouseEventElement_(); - // Create the grapher + /** @type {DygraphLayout} */ this.layout_ = new DygraphLayout(this); var dygraph = this; @@ -1129,6 +1153,7 @@ Dygraph.prototype.setColors_ = function() { var labels = this.getLabels(); var num = labels.length - 1; this.colors_ = []; + /** @type {Object.} */ this.colorsMap_ = {}; var colors = this.attr_('colors'); var i; @@ -1625,7 +1650,7 @@ Dygraph.prototype.doAnimatedZoom = function(oldXRange, newXRange, oldYRanges, ne /** * Get the current graph's area object. * - * @return {Dygraph.Rect} An {x, y, w, h} object. + * @return {DygraphRect} An {x, y, w, h} object. */ Dygraph.prototype.getArea = function() { return this.plotter_.area; @@ -1947,13 +1972,14 @@ Dygraph.prototype.updateSelection_ = function(opt_animFraction) { * Manually set the selected points and display information about them in the * legend. The selection can be cleared using clearSelection() and queried * using getSelection(). - * @param { Integer } row number that should be highlighted (i.e. appear with - * hover dots on the chart). Set to false to clear any selection. - * @param { seriesName } optional series name to highlight that series with the - * the highlightSeriesOpts setting. - * @param { locked } optional If true, keep seriesName selected when mousing - * over the graph, disabling closest-series highlighting. Call clearSelection() - * to unlock it. + * + * @param {number} row number that should be highlighted (i.e. appear with + * hover dots on the chart). Set to false to clear any selection. + * @param {string=} opt_seriesName series name to highlight that series with + * the the highlightSeriesOpts setting. + * @param {boolean=} opt_locked If true, keep seriesName selected when mousing + * over the graph, disabling closest-series highlighting. Call + * clearSelection() to unlock it. */ Dygraph.prototype.setSelection = function(row, opt_seriesName, opt_locked) { // Extract the points we've selected @@ -2057,6 +2083,7 @@ Dygraph.prototype.getSelection = function() { /** * Returns the name of the currently-highlighted series. * Only available when the highlightSeriesOpts option is in use. + * @return {string} The name of the highlighted series. */ Dygraph.prototype.getHighlightSeries = function() { return this.highlightSet_; @@ -2241,7 +2268,7 @@ Dygraph.PointType = undefined; * Converts a series to a Point array. * * @private - * @param {Array.)>} series Array where + * @param {Array.)>>} series Array where * series[row] = [x,y] or [x, [y, err]] or [x, [y, yplus, yminus]]. * @param {boolean} bars True if error bars or custom bars are being drawn. * @param {string} setName Name of the series. @@ -2375,7 +2402,7 @@ Dygraph.stackPoints_ = function( * extreme values "speculatively", i.e. without actually setting state on the * dygraph. * - * @param {Array.)>>} rolledSeries, where + * @param {Array.)>>>} rolledSeries, where * rolledSeries[seriesIndex][row] = raw point, where * seriesIndex is the column number starting with 1, and * rawPoint is [x,y] or [x, [y, err]] or [x, [y, yminus, yplus]]. @@ -2596,6 +2623,10 @@ Dygraph.prototype.computeYAxes_ = function() { // this.axes_ doesn't match this.attributes_.axes_.options. It's used for // data computation as well as options storage. // Go through once and add all the axes. + /** + * TODO(danvk): be more specific + * @type {Array.} + */ this.axes_ = []; for (axis = 0; axis < this.attributes_.numAxes(); axis++) { @@ -2649,11 +2680,11 @@ Dygraph.prototype.numAxes = function() { }; /** - * @private * Returns axis properties for the given series. - * @param { String } setName The name of the series for which to get axis - * properties, e.g. 'Y1'. - * @return { Object } The axis properties. + * @param {string} setName The name of the series for which to get axis + * properties, e.g. 'Y1'. + * @return {Object} The axis properties. + * @private */ Dygraph.prototype.axisPropertiesForSeries = function(series) { // TODO(danvk): handle errors. @@ -2854,12 +2885,12 @@ Dygraph.prototype.computeYAxisRanges_ = function(extremes) { * TODO(danvk): the "missing values" bit above doesn't seem right. * * @private - * @param {Array.)>>} rawData Input data. Rectangular - * grid of points, where rawData[row][0] is the X value for the row, - * and rawData[row][i] is the Y data for series #i. + * @param {Array.)>>} rawData Input data. + * Rectangular grid of points, where rawData[row][0] is the X value for the + * row, and rawData[row][i] is the Y data for series #i. * @param {number} i Series index, starting from 1. * @param {boolean} logScale True if using logarithmic Y scale. - * @return {Array.)>} Series array, where + * @return {Array.)>>} Series array, where * series[row] = [x,y] or [x, [y, err]] or [x, [y, yplus, yminus]]. */ Dygraph.prototype.extractSeries_ = function(rawData, i, logScale) { -- 2.7.4