YUI.add("series-line-util",function(t,e){var L=t.Lang;function i(){}i.prototype={_lineDefaults:null,_getGraphic:function(){var t=this.get("graphic")||this.get("graph").get("graphic");return this._lineGraphic||(this._lineGraphic=t.addShape({type:"path"})),this._lineGraphic.clear(),this._lineGraphic},_toggleVisible:function(t){this._lineGraphic&&this._lineGraphic.set("visible",t)},drawLines:function(){if(!(this.get("xcoords").length<1)){var t,e,i,o,s,n,h,a,r=L.isNumber,c=this.get("direction"),l=!0,g=this.get("styles").line,d=g.lineType,p=g.color||this._getDefaultColor(this.get("graphOrder"),"line"),u=g.alpha,f=g.dashLength,T=g.gapSpace,v=g.connectDiscontinuousPoints,y=g.discontinuousType,M=g.discontinuousDashLength,_=g.discontinuousGapSpace,w=this._getGraphic(),D=this._stacked?(t=this.get("stackedXCoords"),this.get("stackedYCoords")):(t=this.get("xcoords"),this.get("ycoords")),G=("vertical"===c?D:t).length;for(w.set("stroke",{weight:g.weight,color:p,opacity:u}),a=0;a<G;a=++a)n=t[a],h=D[a],e=(i=r(n)&&r(h))?(l?(l=!1,w.moveTo(n,h)):e?"dashed"!==d?w.lineTo(n,h):this.drawDashedLine(w,o,s,n,h,f,T):v?"solid"!==y?this.drawDashedLine(w,o,s,n,h,M,_):w.lineTo(n,h):w.moveTo(n,h),o=n,s=h,!0):i;w.end()}},drawSpline:function(){if(!(this.get("xcoords").length<1)){var t,e,i,o,s,n,h=this.get("xcoords"),a=this.get("ycoords"),r=this.getCurveControlPoints(h,a),c=r.length,l=0,g=this.get("styles").line,d=this._getGraphic(),p=g.alpha,u=g.color||this._getDefaultColor(this.get("graphOrder"),"line");for(d.set("stroke",{weight:g.weight,color:u,opacity:p}),d.moveTo(h[0],a[0]);l<c;l=++l)s=r[l].endx,n=r[l].endy,t=r[l].ctrlx1,e=r[l].ctrlx2,i=r[l].ctrly1,o=r[l].ctrly2,d.curveTo(t,i,e,o,s,n);d.end()}},drawDashedLine:function(t,e,i,o,s,n,h){for(var h=(n=n||10)+(h=h||10),a=o-e,r=s-i,c=Math.sqrt(Math.pow(a,2)+Math.pow(r,2)),l=Math.floor(Math.abs(c/h)),g=Math.atan2(r,a),d=e,p=i,a=Math.cos(g)*h,r=Math.sin(g)*h,u=0;u<l;++u)t.moveTo(d,p),t.lineTo(d+Math.cos(g)*n,p+Math.sin(g)*n),d+=a,p+=r;t.moveTo(d,p),n<(c=Math.sqrt((o-d)*(o-d)+(s-p)*(s-p)))?t.lineTo(d+Math.cos(g)*n,p+Math.sin(g)*n):0<c&&t.lineTo(d+Math.cos(g)*c,p+Math.sin(g)*c),t.moveTo(o,s)},_getLineDefaults:function(){return{alpha:1,weight:6,lineType:"solid",dashLength:10,gapSpace:10,connectDiscontinuousPoints:!0,discontinuousType:"solid",discontinuousDashLength:10,discontinuousGapSpace:10}}},t.augment(i,t.Attribute),t.Lines=i},"patched-v3.18.3");