X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=datahandler%2Fbars-custom.js;h=7313ca249201b5cf0b34d24342e6564edc58b54f;hb=192d58e7c9fab1ae32da4a2dac723955f1639a54;hp=37255e567cad8be36ad6b0797c3115be0e698e1e;hpb=3b3b39e7140cf45dfdc95f636978c5353e3a6c38;p=dygraphs.git diff --git a/datahandler/bars-custom.js b/datahandler/bars-custom.js index 37255e5..7313ca2 100644 --- a/datahandler/bars-custom.js +++ b/datahandler/bars-custom.js @@ -14,11 +14,17 @@ /*global Dygraph:false */ "use strict"; -Dygraph.DataHandlers.CustomBarsHandler = Dygraph.DataHandler(); +/** + * @constructor + * @extends Dygraph.DataHandlers.BarsHandler + */ +Dygraph.DataHandlers.CustomBarsHandler = function() { +}; + var CustomBarsHandler = Dygraph.DataHandlers.CustomBarsHandler; CustomBarsHandler.prototype = new Dygraph.DataHandlers.BarsHandler(); -// customBars +/** @inheritDoc */ CustomBarsHandler.prototype.extractSeries = function(rawData, i, options) { // TODO(danvk): pre-allocate series here. var series = []; @@ -49,8 +55,9 @@ CustomBarsHandler.prototype.extractSeries = function(rawData, i, options) { return series; }; -CustomBarsHandler.prototype.rollingAverage = function(originalData, rollPeriod, - options) { +/** @inheritDoc */ +CustomBarsHandler.prototype.rollingAverage = + function(originalData, rollPeriod, options) { rollPeriod = Math.min(rollPeriod, originalData.length); var rollingData = []; var y, low, high, mid,count, i, extremes;