X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=src%2Fdatahandler%2Fbars.js;fp=src%2Fdatahandler%2Fbars.js;h=b7975dc16b57bcd926e504ca98a796c6d11009d6;hb=ce31caf22475e3e1fd6d9fea192d61ff4fcd7fac;hp=7100148e5b91e4ba6d9750576049b676537fefa5;hpb=a4c3ece0a11e4e5c4f1f51a8bc8b7878d34ee052;p=dygraphs.git diff --git a/src/datahandler/bars.js b/src/datahandler/bars.js index 7100148..b7975dc 100644 --- a/src/datahandler/bars.js +++ b/src/datahandler/bars.js @@ -11,23 +11,21 @@ * @author David Eberlein (david.eberlein@ch.sauter-bc.com) */ -(function() { - /*global Dygraph:false */ /*global DygraphLayout:false */ "use strict"; +import DygraphDataHandler from './datahandler'; +import DygraphLayout from '../dygraph-layout'; + /** * @constructor * @extends {Dygraph.DataHandler} */ -Dygraph.DataHandlers.BarsHandler = function() { - Dygraph.DataHandler.call(this); +var BarsHandler = function() { + DygraphDataHandler.call(this); }; -Dygraph.DataHandlers.BarsHandler.prototype = new Dygraph.DataHandler(); - -// alias for the rest of the implementation -var BarsHandler = Dygraph.DataHandlers.BarsHandler; +BarsHandler.prototype = new DygraphDataHandler(); // TODO(danvk): figure out why the jsdoc has to be copy/pasted from superclass. // (I get closure compiler errors if this isn't here.) @@ -66,8 +64,8 @@ BarsHandler.prototype.onPointsCreated_ = function(series, points) { var point = points[i]; point.y_top = NaN; point.y_bottom = NaN; - point.yval_minus = Dygraph.DataHandler.parseFloat(item[2][0]); - point.yval_plus = Dygraph.DataHandler.parseFloat(item[2][1]); + point.yval_minus = DygraphDataHandler.parseFloat(item[2][0]); + point.yval_plus = DygraphDataHandler.parseFloat(item[2][1]); } }; @@ -106,4 +104,4 @@ BarsHandler.prototype.onLineEvaluated = function(points, axis, logscale) { } }; -})(); +export default BarsHandler;