src/aria/widgets/form/Gauge.js
function (newValue) {
            if (!this._cfgOk) {
                return -1;
            }

            var cfg = this._cfg;
            var res = null;
            if (cfg !== null) {
                if (newValue !== null && newValue !== "" && newValue >= cfg.minValue && newValue <= cfg.maxValue) {
                    res = ((newValue - cfg.minValue) / Math.abs(this._cfg.maxValue - this._cfg.minValue)) * 100;
                } else {
                    res = -1;
                }
            }
            cfg = null;
            return res;
        }
function (newValue) {
            if (!this._cfgOk) {
                return -1;
            }

            var cfg = this._cfg;
            var res = null;
            if (cfg !== null) {
                if (newValue !== null && newValue !== "" && newValue >= cfg.minValue && newValue <= cfg.maxValue) {
                    res = ((newValue - cfg.minValue) / Math.abs(this._cfg.maxValue - this._cfg.minValue)) * 100;
                } else {
                    res = -1;
                }
            }
            cfg = null;
            return res;
        }
function ( newValue ) { if ( ! this . _cfgOk ) { return - 1 ; } var cfg = this . _cfg ; var res = null ; if ( cfg !== null ) { if ( newValue !== null && newValue !== "" && newValue >= cfg . minValue && newValue <= cfg . maxValue ) { res = ( ( newValue - cfg . minValue ) / Math . abs ( this . _cfg . maxValue - this . _cfg . minValue ) ) * 100 ; } else { res = - 1 ; } } cfg = null ; return res ; }
A private method to calculate the progress bar width
@param {Integer} newValue The new value of the gauge
@return {Integer} The new bar width in percentage. If -1 the new width could not be calculated
@private
A private method to calculate the progress bar width