From: Dan Vanderkam Date: Fri, 22 Oct 2010 03:19:04 +0000 (-0400) Subject: option to fill in two-axes test X-Git-Tag: v1.0.0~622^2~1 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=44c6bc29a69461e3b25d6e45c1fd00a12266feb5;p=dygraphs.git option to fill in two-axes test --- diff --git a/dygraph-canvas.js b/dygraph-canvas.js index c12622f..c5c0ee0 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -320,6 +320,10 @@ DygraphCanvasRenderer = function(dygraph, element, layout, options) { ctx.clip(); }; +DygraphCanvasRenderer.prototype.attr_ = function(x) { + return this.dygraph_.attr_(x); +}; + DygraphCanvasRenderer.prototype.clear = function() { if (this.isIE) { // VML takes a while to start up, so we just poll every this.IEDelay @@ -675,12 +679,13 @@ DygraphCanvasRenderer.prototype._renderAnnotations = function() { * Overrides the CanvasRenderer method to draw error bars */ DygraphCanvasRenderer.prototype._renderLineChart = function() { + // TODO(danvk): use this.attr_ for many of these. var context = this.element.getContext("2d"); var colorCount = this.options.colorScheme.length; var colorScheme = this.options.colorScheme; var fillAlpha = this.options.fillAlpha; var errorBars = this.layout.options.errorBars; - var fillGraph = this.layout.options.fillGraph; + var fillGraph = this.attr_("fillGraph"); var stackedGraph = this.layout.options.stackedGraph; var stepPlot = this.layout.options.stepPlot; diff --git a/tests/steps.html b/tests/steps.html index b8d08c6..9b7aef0 100644 --- a/tests/steps.html +++ b/tests/steps.html @@ -126,7 +126,8 @@ { labels: ["Date","GapSeries1","GapSeries2"], showRoller: true, - stepPlot: true + stepPlot: true, + GapSeries2: { axis: {} } } ); diff --git a/tests/two-axes.html b/tests/two-axes.html index e6b1b6d..78c0fb2 100644 --- a/tests/two-axes.html +++ b/tests/two-axes.html @@ -61,6 +61,13 @@ labelsKMB: true } ); + + function update(el) { + g.updateOptions( { fillGraph: el.checked } ); + g2.updateOptions( { fillGraph: el.checked } ); + } + +