/* YUI 3.17.2 (build 9c3c78e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add("series-fill-util",function(e,t){function r(){}var n=e.Lang;r.ATTRS={area:{getter:function(){return this._defaults||this._getAreaDefaults()},setter:function(t){var n=this._defaults||this._getAreaDefaults();this._defaults=e.merge(n,t)}}},r.prototype={_getPath:function(){var e=this._path;return e||(e=this.get("graphic").addShape({type:"path"}),this._path=e),e},_toggleVisible:function(e){this._path&&this._path.set("visible",e)},drawFill:function(e,t){if(e.length<1)return;var r=n.isNumber,i=e.length,s=e[0],o=t[0],u=s,a=o,f,l,c,h=!0,p=0,d=this.get("styles").area,v=this._getPath(),m=d.color||this._getDefaultColor(this.get("graphOrder"),"slice");v.clear(),v.set("fill",{color:m,opacity:d.alpha}),v.set("stroke",{weight:0});for(;p0){s=i[r-1].get("xcoords").concat().reverse(),o=i[r-1].get("ycoords").concat().reverse(),n=this.getCurveControlPoints(s,o),d=0,u=n.length,y.lineTo(s[0],o[0]);for(;d-1)n-=1,n>-1&&(s=e[n].get(i)[t]);return n},_getCoordsByOrderAndIndex:function(e,t,n,r){var i,s;return r==="vertical"?(i=n<0?this._leftOrigin:e[n].get("stackedXCoords")[t],s=this.get("stackedYCoords")[t]):(i=this.get("stackedXCoords")[t],s=n<0?this._bottomOrigin:e[n].get("stackedYCoords")[t]),[i,s]},_getStackedClosingPoints:function(){var e=this.get("order"),t=this.get("direction"),n=this.get("seriesTypeCollection"),r,i,s=this.get("stackedXCoords"),o=this.get("stackedYCoords"),u,a,f,l,c,h,p,d,v,m,g,y;if(e<1)return this._getClosingPoints();a=n[e-1],c=a.get("stackedXCoords").concat(),h=a.get("stackedYCoords").concat(),t==="vertical"?(r=this._getFirstValidIndex(s),i=this._getLastValidIndex(s),f=a._getFirstValidIndex(c),l=a._getLastValidIndex(c)):(r=this._getFirstValidIndex(o),i=this._getLastValidIndex(o),f=a._getFirstValidIndex(h),l=a._getLastValidIndex(h)),l>=r&&f<=i?(f=Math.max(r,f),l=Math.min(i,l),c=c.slice(f,l+1),h=h.slice(f,l+1),u=f):u=i,d=[s[r]],v=[o[r]],m=r;while((isNaN(g)||gy&&(p=this._getCoordsByOrderAndIndex(n,m,y,t),d.push(p[0]),v.push(p[1])),p=this._getCoordsByOrderAndIndex(n,m,g,t),d.push(p[0]),v.push(p[1]),m+=1;c&&c.length>0&&l>r&&fy?(p=this._getCoordsByOrderAndIndex(n,m,y,t),d.push(p[0]),v.push(p[1])):g