//>>built
define("dojox/charting/plot2d/CartesianBase","dojo/_base/lang dojo/_base/declare dojo/_base/connect dojo/has ./Base ../scaler/primitive dojox/gfx dojox/gfx/fx dojox/lang/utils".split(" "),function(p,t,u,z,v,q,w,x,y){var r=function(){return!1};return t("dojox.charting.plot2d.CartesianBase",v,{baseParams:{hAxis:"x",vAxis:"y",labels:!1,labelOffset:10,fixed:!0,precision:1,labelStyle:"inside",htmlLabels:!0,omitLabels:!0,labelFunc:null},constructor:function(b,a){this.axes=["hAxis","vAxis"];this.zoom=null;
this.zoomQueue=[];this.lastWindow={vscale:1,hscale:1,xoffset:0,yoffset:0};this.hAxis=a&&a.hAxis||"x";this.vAxis=a&&a.vAxis||"y";this.series=[];this.opt=p.clone(this.baseParams);y.updateWithObject(this.opt,a)},clear:function(){this.inherited(arguments);this._vAxis=this._hAxis=null;return this},cleanGroup:function(b,a){this.inherited(arguments);if(!a&&this.chart._nativeClip){var c=this.chart.offsets,d=this.chart.dim;this.group.setClip({x:c.l,y:c.t,width:Math.max(0,d.width-c.l-c.r),height:Math.max(0,
d.height-c.t-c.b)});this._clippedGroup||(this._clippedGroup=this.group.createGroup())}},purgeGroup:function(){this.inherited(arguments);this._clippedGroup=null},getGroup:function(){return this._clippedGroup||this.group},setAxis:function(b){b&&(this[b.vertical?"_vAxis":"_hAxis"]=b);return this},toPage:function(b){var a=this._hAxis,c=this._vAxis,d=a.getScaler(),f=c.getScaler(),e=d.scaler.getTransformerFromModel(d),g=f.scaler.getTransformerFromModel(f),k=this.chart.getCoords(),l=this.chart.offsets,n=
this.chart.dim;d=function(m){var h={};h.x=e(m[a.name])+k.x+l.l;h.y=k.y+n.height-l.b-g(m[c.name]);return h};return b?d(b):d},toData:function(b){var a=this._hAxis,c=this._vAxis,d=a.getScaler(),f=c.getScaler(),e=d.scaler.getTransformerFromPlot(d),g=f.scaler.getTransformerFromPlot(f),k=this.chart.getCoords(),l=this.chart.offsets,n=this.chart.dim;d=function(m){var h={};h[a.name]=e(m.x-k.x-l.l);h[c.name]=g(k.y+n.height-m.y-l.b);return h};return b?d(b):d},isDirty:function(){return this.dirty||this._hAxis&&
this._hAxis.dirty||this._vAxis&&this._vAxis.dirty},createLabel:function(b,a,c,d){if(this.opt.labels){var f=this.opt.labelFunc?this.opt.labelFunc.apply(this,[a,this.opt.fixed,this.opt.precision]):this._getLabel(isNaN(a.y)?a:a.y);if("inside"==this.opt.labelStyle){var e=w._base._getTextBox(f,{font:d.series.font});a=c.x+c.width/2;var g=c.y+c.height/2+e.h/4;if(e.w>c.width||e.h>c.height)return}else a=c.x+c.width/2,g=c.y-this.opt.labelOffset;this.renderLabel(b,a,g,f,d,"inside"==this.opt.labelStyle)}},performZoom:function(b,
a){var c=this._vAxis.scale||1,d=this._hAxis.scale||1,f=b.height-a.b,e=this._hScaler.bounds;e=(e.from-e.lower)*e.scale;var g=this._vScaler.bounds;g=(g.from-g.lower)*g.scale;var k=c/this.lastWindow.vscale,l=d/this.lastWindow.hscale,n=(this.lastWindow.xoffset-e)/(1==this.lastWindow.hscale?d:this.lastWindow.hscale),m=(g-this.lastWindow.yoffset)/(1==this.lastWindow.vscale?c:this.lastWindow.vscale),h=this.getGroup();f=x.animateTransform(p.delegate({shape:h,duration:1200,transform:[{name:"translate",start:[0,
0],end:[a.l*(1-l),f*(1-k)]},{name:"scale",start:[1,1],end:[l,k]},{name:"original"},{name:"translate",start:[0,0],end:[n,m]}]},this.zoom));p.mixin(this.lastWindow,{vscale:c,hscale:d,xoffset:e,yoffset:g});this.zoomQueue.push(f);u.connect(f,"onEnd",this,function(){this.zoom=null;this.zoomQueue.shift();0<this.zoomQueue.length&&this.zoomQueue[0].play()});1==this.zoomQueue.length&&this.zoomQueue[0].play();return this},initializeScalers:function(b,a){this._hAxis?(this._hAxis.initialized()||this._hAxis.calculate(a.hmin,
a.hmax,b.width),this._hScaler=this._hAxis.getScaler()):this._hScaler=q.buildScaler(a.hmin,a.hmax,b.width);this._vAxis?(this._vAxis.initialized()||this._vAxis.calculate(a.vmin,a.vmax,b.height),this._vScaler=this._vAxis.getScaler()):this._vScaler=q.buildScaler(a.vmin,a.vmax,b.height);return this},isNullValue:function(b){if(null===b||"undefined"==typeof b)return!0;var a=this._hAxis?this._hAxis.isNullValue:r,c=this._vAxis?this._vAxis.isNullValue:r;return"number"==typeof b?a(1)||c(b):a(isNaN(b.x)?1:b.x)||
null===b.y||c(b.y)}})});