YUI.add("series-line-util",function(t,e){var G=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=G.isNumber,r=this.get("direction"),c=!0,l=this.get("styles").line,g=l.lineType,d=l.color||this._getDefaultColor(this.get("graphOrder"),"line"),p=l.alpha,u=l.dashLength,f=l.gapSpace,T=l.connectDiscontinuousPoints,v=l.discontinuousType,y=l.discontinuousDashLength,M=l.discontinuousGapSpace,_=this._getGraphic(),w=this._stacked?(t=this.get("stackedXCoords"),this.get("stackedYCoords")):(t=this.get("xcoords"),this.get("ycoords")),D=("vertical"===r?w:t).length;for(_.set("stroke",{weight:l.weight,color:d,opacity:p}),h=0;h<D;h=++h)s=t[h],n=w[h],e=a(s)&&a(n)&&(c?(c=!1,_.moveTo(s,n)):e?"dashed"!==g?_.lineTo(s,n):this.drawDashedLine(_,i,o,s,n,u,f):T?"solid"!==v?this.drawDashedLine(_,i,o,s,n,y,M):_.lineTo(s,n):_.moveTo(s,n),i=s,o=n,!0);_.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.7");