Commits

Anonymous committed b18469e

Fixes issue #369 where titles weren't displaying in meter gauage as well as
error with gauage diameter calculation in some situations.

  • Participants
  • Parent commits f49dfb0

Comments (0)

Files changed (1)

File src/plugins/jqplot.meterGaugeRenderer.js

                     }
                     this.needleThickness = this.needleThickness || 2+Math.pow(this.ringWidth, 0.8);
                     this.innerPad = this.ringWidth/2 + this.needleThickness/2 + this.needlePad;
-                    this.diameter = w - 2*this.innerPad;
+                    this.diameter = w - 2*this.innerPad - this.ringWidth - this.padding;
                 }
                 // center taking into account legend and over draw for gauge bottom below hub.
                 // this will be center of hub.
                 this._center = [(cw-trans*offx)/2 + trans * offx, (ch-trans*offy)/2 + trans * offy];
             }
         }
+
         
         if (this._labelElem && this.labelPosition == 'bottom') {
             this._center[1] -= this._labelElem.outerHeight(true);
         options.legend = options.legend || {};
         options.seriesDefaults = options.seriesDefaults || {};
         options.grid = options.grid || {};
-        // options.gridPadding = options.gridPadding || {};
            
         // only set these if there is a gauge series
         var setopts = false;
             options.grid.drawGridlines = false;
             options.grid.borderWidth = (options.grid.borderWidth != null) ? options.grid.borderWidth : 0;
             options.grid.shadow = (options.grid.shadow != null) ? options.grid.shadow : false;
-            // options.gridPadding.top = (options.gridPadding.top != null) ? options.gridPadding.top : 0;
-            // options.gridPadding.bottom = (options.gridPadding.bottom != null) ? options.gridPadding.bottom : 0;
-            // options.gridPadding.left = (options.gridPadding.left != null) ? options.gridPadding.left : 0;
-            // options.gridPadding.right = (options.gridPadding.right != null) ? options.gridPadding.right : 0;
         }
     }