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