//>>built
define("dojox/charting/plot2d/Scatter","dojo/_base/lang,dojo/_base/array,dojo/_base/declare,./CartesianBase,./_PlotEvents,./common,dojox/lang/functional,dojox/lang/functional/reversed,dojox/lang/utils,dojox/gfx/fx,dojox/gfx/gradutils".split(","),function(o,k,w,x,y,t,z,A,l,B,C){var D=A.lambda("item.purgeGroup()");return w("dojox.charting.plot2d.Scatter",[x,y],{defaultParams:{hAxis:"x",vAxis:"y",shadows:null,animate:null},optionalParams:{markerStroke:{},markerOutline:{},markerShadow:{},markerFill:{},
markerFont:"",markerFontColor:"",styleFunc:null},constructor:function(f,d){this.opt=o.clone(this.defaultParams);l.updateWithObject(this.opt,d);l.updateWithPattern(this.opt,d,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate},render:function(f,d){if(this.zoom&&!this.isDataDirty())return this.performZoom(f,d);this.resetEvents();if(this.dirty=this.isDirty()){k.forEach(this.series,D);this._eventSeries={};this.cleanGroup();var m=this.group;
z.forEachRev(this.series,function(a){a.cleanGroup(m)})}for(var n=this.chart.theme,o=this.events(),r=this.series.length-1;0<=r;--r){var a=this.series[r];if(!this.dirty&&!a.dirty)n.skip(),this._reconnectEvents(a.name);else if(a.cleanGroup(),a.data.length){var s=n.next("marker",[this.opt,a]),m=a.group,i,l=this._hScaler.scaler.getTransformerFromModel(this._hScaler),u=this._vScaler.scaler.getTransformerFromModel(this._vScaler);i="number"==typeof a.data[0]?k.map(a.data,function(a,c){return{x:l(c+1)+d.l,
y:f.height-d.b-u(a)}},this):k.map(a.data,function(a){return{x:l(a.x)+d.l,y:f.height-d.b-u(a.y)}},this);var p=Array(i.length),h=Array(i.length),q=Array(i.length);k.forEach(i,function(j,c){var e=a.data[c],b;if(this.opt.styleFunc||"number"!=typeof e){var g="number"!=typeof e?[e]:[];this.opt.styleFunc&&g.push(this.opt.styleFunc(e));b=n.addMixin(s,"marker",g,!0)}else b=n.post(s,"marker");e="M"+j.x+" "+j.y+" "+b.symbol;b.marker.shadow&&(p[c]=m.createPath("M"+(j.x+b.marker.shadow.dx)+" "+(j.y+b.marker.shadow.dy)+
" "+b.symbol).setStroke(b.marker.shadow).setFill(b.marker.shadow.color),this.animate&&this._animateScatter(p[c],f.height-d.b));if(b.marker.outline)g=t.makeStroke(b.marker.outline),g.width=2*g.width+b.marker.stroke.width,q[c]=m.createPath(e).setStroke(g),this.animate&&this._animateScatter(q[c],f.height-d.b);g=t.makeStroke(b.marker.stroke);if((b=this._plotFill(b.marker.fill,f,d))&&("linear"===b.type||"radial"==b.type))if(b=C.getColor(b,{x:j.x,y:j.y}),g)g.color=b;h[c]=m.createPath(e).setStroke(g).setFill(b);
this.animate&&this._animateScatter(h[c],f.height-d.b)},this);if(h.length)a.dyn.marker=s.symbol,a.dyn.markerStroke=h[h.length-1].getStroke(),a.dyn.markerFill=h[h.length-1].getFill();if(o){var v=Array(h.length);k.forEach(h,function(d,c){var e={element:"marker",index:c,run:a,shape:d,outline:q&&q[c]||null,shadow:p&&p[c]||null,cx:i[c].x,cy:i[c].y};"number"==typeof a.data[0]?(e.x=c+1,e.y=a.data[c]):(e.x=a.data[c].x,e.y=a.data[c].y);this._connectEvents(e);v[c]=e},this);this._eventSeries[a.name]=v}else delete this._eventSeries[a.name];
a.dirty=!1}else a.dirty=!1,n.skip()}this.dirty=!1;return this},_animateScatter:function(f,d){B.animateTransform(o.delegate({shape:f,duration:1200,transform:[{name:"translate",start:[0,d],end:[0,0]},{name:"scale",start:[0,0],end:[1,1]},{name:"original"}]},this.animate)).play()}})});