YUI.add("series-bar-stacked",function(e,t){var B=e.Lang;e.StackedBarSeries=e.Base.create("stackedBarSeries",e.BarSeries,[e.StackingUtil],{drawSeries:function(){if(!(this.get("xcoords").length<1)){var e,t,r,i,s,l,h=B.isNumber,a=this._copyObject(this.get("styles").marker),o=a.width,g=a.height,c=this.get("xcoords"),n=this.get("ycoords"),d=0,f=c.length,u=(n[0],this.get("seriesTypeCollection")),_=this.get("order"),p=this.get("graphOrder"),b=0===_,O=f*g,k={width:[],height:[]},v=[],y=[],m=this.get("groupMarkers");for(B.isArray(a.fill.color)&&(s=a.fill.color.concat()),B.isArray(a.border.color)&&(l=a.border.color.concat()),this._createMarkerCache(),O>this.get("height")&&(g*=this.get("height")/O,g=Math.max(g,1)),b?(r=[],i=[]):(r=(O=u[_-1]).get("negativeBaseValues"),i=O.get("positiveBaseValues"),r&&i||(b=!0,i=[],r=[])),this.set("negativeBaseValues",r),this.set("positiveBaseValues",i),d=0;d<f;++d)e=n[d],t=c[d],h(e)&&h(t)?(b?(o=Math.abs(t-this._leftOrigin),t>this._leftOrigin?(i[d]=t,r[d]=this._leftOrigin,t-=o):t<this._leftOrigin?(i[d]=this._leftOrigin,r[d]=t):(i[d]=t,r[d]=this._leftOrigin)):t<this._leftOrigin?(t=r[d]-(this._leftOrigin-c[d]),o=r[d]-t,r[d]=t):t>=this._leftOrigin&&(o=(t+=i[d]-this._leftOrigin)-i[d],i[d]=t,t-=o),!isNaN(o)&&0<o?(e-=g/2,m?(k.width[d]=o,k.height[d]=g,v.push(t),y.push(e)):(a.width=o,a.height=g,a.x=t,a.y=e,s&&(a.fill.color=s[d%s.length]),l&&(a.border.color=l[d%l.length]),this.getMarker(a,p,d))):m||this._markers.push(null)):(b&&(i[d]=this._leftOrigin,r[d]=this._leftOrigin),this._markers.push(null));m?this._createGroupMarker({fill:a.fill,border:a.border,dimensions:k,xvalues:v,yvalues:y,shape:a.shape}):this._clearMarkerCache()}},updateMarkerState:function(e,t){var r,i,s,l;this._markers[t]&&(e=this._getState(e),l=this.get("ycoords"),r=this._markers[t],i=(s=this.get("styles").marker).height,(e="off"!==e&&s[e]?this._copyObject(s[e]):this._copyObject(s)).y=l[t]-i/2,e.x=r.get("x"),e.width=r.get("width"),e.id=r.get("id"),s=e.fill.color,l=e.border.color,B.isArray(s)?e.fill.color=s[t%s.length]:e.fill.color=this._getItemColor(e.fill.color,t),B.isArray(l)?e.border.color=l[t%l.length]:e.border.color=this._getItemColor(e.border.color,t),r.set(e))},_getPlotDefaults:function(){var e={fill:{type:"solid",alpha:1,colors:null,alphas:null,ratios:null},border:{weight:0,alpha:1},width:24,height:24,shape:"rect",padding:{top:0,left:0,right:0,bottom:0}};return e.fill.color=this._getDefaultColor(this.get("graphOrder"),"fill"),e.border.color=this._getDefaultColor(this.get("graphOrder"),"border"),e}},{ATTRS:{type:{value:"stackedBar"},direction:{value:"vertical"},negativeBaseValues:{value:null},positiveBaseValues:{value:null}}})},"patched-v3.18.7",{requires:["series-stacked","series-bar"]});