//>>built
define("dojox/gauges/BarGauge","dojo/_base/declare,dojo/_base/lang,dojo/_base/array,dojo/_base/html,dojo/_base/event,dojox/gfx,./_Gauge,./BarLineIndicator,dojo/dom-geometry".split(","),function(h,f,i,n,j,k,l,m,e){return h("dojox.gauges.BarGauge",l,{dataX:5,dataY:5,dataWidth:0,dataHeight:0,_defaultIndicator:m,startup:function(){this.getChildren&&i.forEach(this.getChildren(),function(b){b.startup()});if(!this.dataWidth)this.dataWidth=this.gaugeWidth-10;if(!this.dataHeight)this.dataHeight=this.gaugeHeight-
10;this.inherited(arguments)},_getPosition:function(b){return this.dataX+Math.floor((b-this.min)/(this.max-this.min)*this.dataWidth)},_getValueForPosition:function(b){return(b-this.dataX)*(this.max-this.min)/this.dataWidth+this.min},drawRange:function(b,a){if(a.shape)a.shape.parent.remove(a.shape),a.shape=null;var c=this._getPosition(a.low),e=this._getPosition(a.high),d=b.createRect({x:c,y:this.dataY,width:e-c,height:this.dataHeight});if(f.isArray(a.color)||f.isString(a.color))d.setStroke({color:a.color}),
d.setFill(a.color);else if(a.color.type){var g=this.dataY+this.dataHeight/2;a.color.x1=c;a.color.x2=e;a.color.y1=g;a.color.y2=g;d.setFill(a.color);d.setStroke({color:a.color.colors[0].color})}else k.svg&&(d.setStroke({color:"green"}),d.setFill("green"),d.getEventSource().setAttribute("class",a.color.style));d.connect("onmouseover",f.hitch(this,this._handleMouseOverRange,a));d.connect("onmouseout",f.hitch(this,this._handleMouseOutRange,a));a.shape=d},getRangeUnderMouse:function(b){var a=null,c=e.getContentBox(this.gaugeContent),
b=this._getValueForPosition(b.clientX-c.x);if(this._rangeData)for(c=0;c<this._rangeData.length&&!a;c++)Number(this._rangeData[c].low)<=b&&Number(this._rangeData[c].high)>=b&&(a=this._rangeData[c]);return a},_dragIndicator:function(b,a){this._dragIndicatorAt(b,a.pageX,a.pageY);j.stop(a)},_dragIndicatorAt:function(b,a){var c=e.position(b.gaugeContent,!0),c=b._getValueForPosition(a-c.x);if(c<b.min)c=b.min;if(c>b.max)c=b.max;b._drag.value=c;b._drag.onDragMove(b._drag);b._drag.draw(this._indicatorsGroup,
!0);b._drag.valueChanged()}})});