//>>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,q,r,x,t,m,u,v,w){var n=function(){return!1};return q("dojox.charting.plot2d.CartesianBase",t,{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);w.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(),e=c.getScaler(),g=d.scaler.getTransformerFromModel(d),f=e.scaler.getTransformerFromModel(e),h=this.chart.getCoords(),k=this.chart.offsets,l=
this.chart.dim,d=function(b){var d={};d.x=g(b[a.name])+h.x+k.l;d.y=h.y+l.height-k.b-f(b[c.name]);return d};return b?d(b):d},toData:function(b){var a=this._hAxis,c=this._vAxis,d=a.getScaler(),e=c.getScaler(),g=d.scaler.getTransformerFromPlot(d),f=e.scaler.getTransformerFromPlot(e),h=this.chart.getCoords(),k=this.chart.offsets,l=this.chart.dim,d=function(b){var d={};d[a.name]=g(b.x-h.x-k.l);d[c.name]=f(h.y+l.height-b.y-k.b);return d};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 e,g=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 f=u._base._getTextBox(g,{font:d.series.font});a=c.x+c.width/2;e=c.y+c.height/2+f.h/4;if(f.w>c.width||f.h>c.height)return}else a=c.x+c.width/2,e=c.y-this.opt.labelOffset;this.renderLabel(b,a,e,g,d,"inside"==this.opt.labelStyle)}},performZoom:function(b,
a){var c=this._vAxis.scale||1,d=this._hAxis.scale||1,e=b.height-a.b,g=this._hScaler.bounds,g=(g.from-g.lower)*g.scale,f=this._vScaler.bounds,f=(f.from-f.lower)*f.scale,h=c/this.lastWindow.vscale,k=d/this.lastWindow.hscale,l=(this.lastWindow.xoffset-g)/(1==this.lastWindow.hscale?d:this.lastWindow.hscale),m=(f-this.lastWindow.yoffset)/(1==this.lastWindow.vscale?c:this.lastWindow.vscale),n=this.getGroup(),e=v.animateTransform(p.delegate({shape:n,duration:1200,transform:[{name:"translate",start:[0,0],
end:[a.l*(1-k),e*(1-h)]},{name:"scale",start:[1,1],end:[k,h]},{name:"original"},{name:"translate",start:[0,0],end:[l,m]}]},this.zoom));p.mixin(this.lastWindow,{vscale:c,hscale:d,xoffset:g,yoffset:f});this.zoomQueue.push(e);r.connect(e,"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=m.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=m.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:n,c=this._vAxis?this._vAxis.isNullValue:n;return"number"==typeof b?a(1)||c(b):a(isNaN(b.x)?1:b.x)||
null===b.y||c(b.y)}})});