vendor/assets/javascripts/jqplot-plugins/jqplot.barRenderer.js in outfielding-jqplot-rails-1.0.5 vs vendor/assets/javascripts/jqplot-plugins/jqplot.barRenderer.js in outfielding-jqplot-rails-1.0.7

- old
+ new

@@ -1,11 +1,11 @@ /** * jqPlot * Pure JavaScript plotting plugin using jQuery * - * Version: 1.0.5 - * Revision: 1122+ + * Version: 1.0.7 + * Revision: 1224 * * Copyright (c) 2009-2013 Chris Leonello * jqPlot is currently available for use in all personal or commercial projects * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can @@ -113,11 +113,11 @@ options.highlightMouseOver = false; } ////// // This is probably wrong here. - // After going back and forth on wether renderer should be the thing + // After going back and forth on whether renderer should be the thing // or extend the thing, it seems that it it best if it is a property // on the thing. This should be something that is commonized // among series renderers in the future. ////// $.extend(true, this, options); @@ -511,19 +511,22 @@ } else { xstart = 0; } } - if ((this.fillToZero && this._plotData[i][1] < 0) || (this.waterfall && this._data[i][1] < 0)) { + if ((this.fillToZero && this._plotData[i][0] < 0) || (this.waterfall && this._data[i][0] < 0)) { if (this.varyBarColor && !this._stack) { if (this.useNegativeColors) { opts.fillStyle = negativeColors.next(); } else { opts.fillStyle = positiveColors.next(); } } + else { + opts.fillStyle = negativeColor; + } } else { if (this.varyBarColor && !this._stack) { opts.fillStyle = positiveColors.next(); } @@ -792,6 +795,6 @@ plot.target.trigger(evt, ins); } } -})(jQuery); +})(jQuery); \ No newline at end of file