X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph-layout.js;h=7948686fdc52bef60f4ace2bdaf6da42c57fa6e2;hb=c0f54d4f7444bea88d6c26020c566b42b3fe45e5;hp=915d23510c75bc6815d90fa666fa60a3165016bf;hpb=ccd9d7c2bf76882f57d29161fe69b0db53124f54;p=dygraphs.git diff --git a/dygraph-layout.js b/dygraph-layout.js index 915d235..7948686 100644 --- a/dygraph-layout.js +++ b/dygraph-layout.js @@ -9,6 +9,8 @@ * dygraphs. */ +"use strict"; + /** * Creates a new DygraphLayout object. * @@ -25,12 +27,11 @@ * * @constructor */ -DygraphLayout = function(dygraph) { +var DygraphLayout = function(dygraph) { this.dygraph_ = dygraph; this.datasets = new Array(); this.annotations = new Array(); this.yAxes_ = null; - this.plotArea = this.computePlotArea_(); // TODO(danvk): it's odd that xTicks_ and yTicks_ are inputs, but xticks and // yticks are outputs. Clean this up. @@ -46,6 +47,10 @@ DygraphLayout.prototype.addDataset = function(setname, set_xy) { this.datasets[setname] = set_xy; }; +DygraphLayout.prototype.getPlotArea = function() { + return this.computePlotArea_(); +} + // Compute the box which the chart should be drawn in. This is the canvas's // box, less space needed for axis and chart labels. DygraphLayout.prototype.computePlotArea_ = function() {