From ac6d3f0d357941dc4a38271667f5e74dd7b03593 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Sat, 31 Aug 2013 23:54:43 -0400 Subject: [PATCH] punt on jsdoc duplication; 12 warnings and none from datahandler --- datahandler/bars.js | 27 ++++++++++++++++++++++++--- datahandler/datahandler.js | 5 ----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/datahandler/bars.js b/datahandler/bars.js index 3dd363d..a6b0cc5 100644 --- a/datahandler/bars.js +++ b/datahandler/bars.js @@ -22,17 +22,38 @@ * @extends {Dygraph.DataHandler} */ Dygraph.DataHandlers.BarsHandler = function() { + Dygraph.DataHandler.call(this); }; +Dygraph.DataHandlers.BarsHandler.prototype = new Dygraph.DataHandler(); +// alias for the rest of the implementation var BarsHandler = Dygraph.DataHandlers.BarsHandler; -BarsHandler.prototype = new Dygraph.DataHandler(); -/** @inheritDoc */ +// TODO(danvk): figure out why the jsdoc has to be copy/pasted from superclass. +// (I get closure compiler errors if this isn't here.) +/** + * @override + * @param {!Array.} rawData The raw data passed into dygraphs where + * rawData[i] = [x,ySeries1,...,ySeriesN]. + * @param {!number} seriesIndex Index of the series to extract. All other + * series should be ignored. + * @param {!DygraphOptions} options Dygraph options. + * @return {Array.<[!number,?number,?]>} The series in the unified data format + * where series[i] = [x,y,{extras}]. + */ BarsHandler.prototype.extractSeries = function(rawData, seriesIndex, options) { // Not implemented here must be extended }; -/** @inheritDoc */ +/** + * @override + * @param {!Array.<[!number,?number,?]>} series The series in the unified + * data format where series[i] = [x,y,{extras}]. + * @param {!number} rollPeriod The number of points over which to average the data + * @param {!DygraphOptions} options The dygraph options. + * TODO(danvk): be more specific than "Array" here. + * @return {!Array.<[!number,?number,?]>} the rolled series. + */ BarsHandler.prototype.rollingAverage = function(series, rollPeriod, options) { // Not implemented here, must be extended. diff --git a/datahandler/datahandler.js b/datahandler/datahandler.js index 100e7ee..b9eb67c 100644 --- a/datahandler/datahandler.js +++ b/datahandler/datahandler.js @@ -98,7 +98,6 @@ handler.EXTRAS = 2; * @param {!DygraphOptions} options Dygraph options. * @return {Array.<[!number,?number,?]>} The series in the unified data format * where series[i] = [x,y,{extras}]. - * @public */ handler.prototype.extractSeries = function(rawData, seriesIndex, options) { }; @@ -112,7 +111,6 @@ handler.prototype.extractSeries = function(rawData, seriesIndex, options) { * @param {!number} boundaryIdStart Index offset of the first point, equal to the * number of skipped points left of the date window minimum (if any). * @return {!Array.} List of points for this series. - * @public */ handler.prototype.seriesToPoints = function(series, setName, boundaryIdStart) { // TODO(bhs): these loops are a hot-spot for high-point-count charts. In @@ -165,7 +163,6 @@ handler.prototype.onPointsCreated_ = function(series, points) { * @param {!DygraphOptions} options The dygraph options. * TODO(danvk): be more specific than "Array" here. * @return {!Array.<[!number,?number,?]>} the rolled series. - * @public */ handler.prototype.rollingAverage = function(series, rollPeriod, options) { }; @@ -180,7 +177,6 @@ handler.prototype.rollingAverage = function(series, rollPeriod, options) { * @param {!DygraphOptions} options The dygraph options. * @return {Array.} The low and high extremes of the series in the * given window with the format: [low, high]. - * @public */ handler.prototype.getExtremeYValues = function(series, dateWindow, options) { }; @@ -194,7 +190,6 @@ handler.prototype.getExtremeYValues = function(series, dateWindow, options) { * the plotter. * @param {!Object} axis The axis on which the series will be plotted. * @param {!boolean} logscale Weather or not to use a logscale. - * @public */ handler.prototype.onLineEvaluated = function(points, axis, logscale) { }; -- 2.7.4