vendor/assets/javascripts/jqplot-plugins/jqplot.meterGaugeRenderer.js in outfielding-jqplot-rails-1.0.5 vs vendor/assets/javascripts/jqplot-plugins/jqplot.meterGaugeRenderer.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 @@ -92,11 +92,11 @@ this.ringColor = "#BBC6D0"; // needle color not implemented yet. this.needleColor = "#C3D3E5"; // prop: tickColor // color of the tick marks around the gauge. - this.tickColor = "989898"; + this.tickColor = "#989898"; // prop: ringWidth // width of the ring around the gauge. Auto computed by default. this.ringWidth = null; // prop: min // Minimum value on the gauge. Auto computed by default @@ -356,11 +356,11 @@ } } - // pre-draw so can get it's dimensions. + // pre-draw so can get its dimensions. if (this.label) { this._labelElem = $('<div class="jqplot-meterGauge-label" style="position:absolute;">'+this.label+'</div>'); this.canvas._elem.after(this._labelElem); } @@ -717,11 +717,11 @@ ew = elem.outerWidth(true); eh = elem.outerHeight(true); l = this._tickPoints[i][0] - ew * (this._tickPoints[i][2]-Math.PI)/Math.PI - tp * Math.cos(this._tickPoints[i][2]); t = this._tickPoints[i][1] - eh/2 + eh/2 * Math.pow(Math.abs((Math.sin(this._tickPoints[i][2]))), 0.5) + tp/3 * Math.pow(Math.abs((Math.sin(this._tickPoints[i][2]))), 0.5) ; // t = this._tickPoints[i][1] - eh/2 - eh/2 * Math.sin(this._tickPoints[i][2]) - tp/2 * Math.sin(this._tickPoints[i][2]); - elem.css({left:l, top:t}); + elem.css({left:l, top:t, color: this.tickColor}); dim = ew*Math.cos(this._tickPoints[i][2]) + eh*Math.sin(Math.PI/2+this._tickPoints[i][2]/2); maxdim = (dim > maxdim) ? dim : maxdim; } } @@ -737,11 +737,11 @@ this._labelElem.css({left:l, top:t}); } else if (this.label && this.labelPosition == 'bottom') { var l = this._center[0] + this.canvas._offsets.left - this._labelElem.outerWidth(true)/2; - var t = this._center[1] + this.canvas._offsets.top + this.innerPad + + this.ringWidth + this.padding + this.labelHeightAdjust; + var t = this._center[1] + this.canvas._offsets.top + this.innerPad + this.ringWidth + this.padding + this.labelHeightAdjust; this._labelElem.css({left:l, top:t}); } // draw the intervals @@ -1025,6 +1025,6 @@ $.jqplot.MeterGaugeTickRenderer.prototype = new $.jqplot.AxisTickRenderer(); $.jqplot.MeterGaugeTickRenderer.prototype.constructor = $.jqplot.MeterGaugeTickRenderer; })(jQuery); - \ No newline at end of file +