/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.charting.plot2d.Base"],["require","dojox.charting.scaler.primitive"],["require","dojox.charting.Element"],["require","dojox.charting.plot2d.common"],["require","dojox.charting.plot2d._PlotEvents"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.charting.plot2d.Base"]){_4._hasResource["dojox.charting.plot2d.Base"]=true;_4.provide("dojox.charting.plot2d.Base");_4.require("dojox.charting.scaler.primitive");_4.require("dojox.charting.Element");_4.require("dojox.charting.plot2d.common");_4.require("dojox.charting.plot2d._PlotEvents");_4.declare("dojox.charting.plot2d.Base",[_6.charting.Element,_6.charting.plot2d._PlotEvents],{constructor:function(_7,_8){this.zoom=null,this.zoomQueue=[];this.lastWindow={vscale:1,hscale:1,xoffset:0,yoffset:0};},clear:function(){this.series=[];this._hAxis=null;this._vAxis=null;this.dirty=true;return this;},setAxis:function(_9){if(_9){this[_9.vertical?"_vAxis":"_hAxis"]=_9;}return this;},addSeries:function(_a){this.series.push(_a);return this;},getSeriesStats:function(){return _6.charting.plot2d.common.collectSimpleStats(this.series);},calculateAxes:function(_b){this.initializeScalers(_b,this.getSeriesStats());return this;},isDirty:function(){return this.dirty||this._hAxis&&this._hAxis.dirty||this._vAxis&&this._vAxis.dirty;},isDataDirty:function(){return _4.some(this.series,function(_c){return _c.dirty;});},performZoom:function(_d,_e){var vs=this._vAxis.scale||1,hs=this._hAxis.scale||1,_f=_d.height-_e.b,_10=this._hScaler.bounds,_11=(_10.from-_10.lower)*_10.scale,_12=this._vScaler.bounds,_13=(_12.from-_12.lower)*_12.scale;rVScale=vs/this.lastWindow.vscale,rHScale=hs/this.lastWindow.hscale,rXOffset=(this.lastWindow.xoffset-_11)/((this.lastWindow.hscale==1)?hs:this.lastWindow.hscale),rYOffset=(_13-this.lastWindow.yoffset)/((this.lastWindow.vscale==1)?vs:this.lastWindow.vscale),shape=this.group,anim=_6.gfx.fx.animateTransform(_4.delegate({shape:shape,duration:1200,transform:[{name:"translate",start:[0,0],end:[_e.l*(1-rHScale),_f*(1-rVScale)]},{name:"scale",start:[1,1],end:[rHScale,rVScale]},{name:"original"},{name:"translate",start:[0,0],end:[rXOffset,rYOffset]}]},this.zoom));_4.mixin(this.lastWindow,{vscale:vs,hscale:hs,xoffset:_11,yoffset:_13});this.zoomQueue.push(anim);_4.connect(anim,"onEnd",this,function(){this.zoom=null;this.zoomQueue.shift();if(this.zoomQueue.length>0){this.zoomQueue[0].play();}});if(this.zoomQueue.length==1){this.zoomQueue[0].play();}return this;},render:function(dim,_14){return this;},getRequiredColors:function(){return this.series.length;},initializeScalers:function(dim,_15){if(this._hAxis){if(!this._hAxis.initialized()){this._hAxis.calculate(_15.hmin,_15.hmax,dim.width);}this._hScaler=this._hAxis.getScaler();}else{this._hScaler=_6.charting.scaler.primitive.buildScaler(_15.hmin,_15.hmax,dim.width);}if(this._vAxis){if(!this._vAxis.initialized()){this._vAxis.calculate(_15.vmin,_15.vmax,dim.height);}this._vScaler=this._vAxis.getScaler();}else{this._vScaler=_6.charting.scaler.primitive.buildScaler(_15.vmin,_15.vmax,dim.height);}return this;}});}}};});