UNPKG

zingchart

Version:

Our JavaScript charting library is a commercial product. But the full branded version is free to try, forever.

8 lines (7 loc) 19.5 kB
/* All of the code within the ZingChart software is developed and copyrighted by ZingChart, Inc., and may not be copied, replicated, or used in any other software or application without prior permission from ZingChart. All usage must coincide with the ZingChart End User License Agreement which can be requested by email at support@zingchart.com. Build 2.9.16-hf1 */ ZC.WJ.push("area"),ZC.A6F=ZC.NM.CD({$i:function(i){this.b(i);var C=this;C.AF="area",C.AY=new ZC.A45(C),C.AJ["enable-guide"]=!0,C.AJ["enable-preview"]=!0,C.AJ["enable-scroll"]=!0}}),ZC.A45=ZC.LQ.CD({ACU:function(){return new ZC.R0(this)}}),ZC.R0=ZC.W8.CD({$i:function(i){this.b(i);var C=this;C.AF="area",C.Y=1,C.CW="segmented",C.SX=3,C.HS=C.C.AJ["3d"]?1:.5,C.ST="middle",C.A42=!0,C.V3=[],C.N7=!0,C.XE=!1,C.NH=!1},U3:function(){return new ZC.A31(this)},parse:function(){var i=this;i.BP=i.O6(),i.C2=i.BP[0],i.B9=i.BP[1],i.C.AJ["3d"]||"solid"===i.o["background-color-style"]?i.A0=i.AE=i.BP[1]:(i.A0=i.BP[0],i.AE=i.BP[1]),i.NS(),i.b(),i.applyRGBA(),i.assign_a([["alpha-area","HS","f",0,1],["step-start","ST"],["active-area","XE","b"],["contour-on-top","A42","b"],["smart-sampling","N7","b"]]),i.AZ=i.C.BM(i.BW("k")[0]),i.CQ=i.C.BM(i.BW("v")[0])},paint:function(){var i,C,A,e,n,_,s,Z,u,p,h,l=this;l.b(),l.V3=[];var a=l.NH;if(-1===ZC.AV(["segmented","spline","stepped"],l.CW)&&(l.CW="segmented"),l.KH=l.CS("bl",0),l.A4R=ZC.Q.EE(l.CS("bl",1),l.G.AC),l.OD=ZC.Q.EE(l.CS("bl",l.A42?2:1),l.G.AC),p=l.C.N,!l.GZ||l.C.AJ["3d"]){var t=ZC.MAX,X=-ZC.MAX;for(i=0,C=l.R.length;i<C;i++)l.R[i]&&(t=ZC.CY(t,l.R[i].CR),X=ZC.BR(X,l.R[i].CR));var r=l.CQ.AR(t),Y=l.CQ.AR(X),o=l.CQ.AR(l.CQ.HC);if(ZC.DS(o,r,Y)&&(l.CQ.AX?o<r&&(r=o):o>Y&&(Y=o)),l.E["min-y"]=Math.min(r,Y),l.E["max-y"]=Math.max(r,Y),l.CG&&l.A.F3){var L=ZC.MAX,f=-ZC.MAX;for(i=0,C=l.A.F3.length;i<C;i++)if(l.A.F3[i])for(var R=0,v=l.A.F3[i].length;R<v;R++)L=ZC.CY(L,l.A.F3[i][R][1]),f=ZC.BR(f,l.A.F3[i][R][1]);l.CQ.AX?l.E["min-y"]=L:l.E["max-y"]=f}l.E["max-y"]-l.E["min-y"]<100&&(l.E["max-y"]+=50,l.E["min-y"]-=50),l.PI(),l.D=null,l.D9=null,l.AH=null}else{l.XT(),l.C8=l.CS("bl",0);var g=!0;(null!==ZC._n_(l.A2.o.visible)&&!ZC._b_(l.A2.o.visible)||null!==ZC._n_(l.A.o.type)&&"none"===l.A2.o.type)&&(g=!1);var E=l.CG&&0===l.C.UN,D=[],G=[],c=[],B=[],S=[],d=l.CQ.HC;l.o["ref-value"]&&(d=ZC._f_(l.o["ref-value"]));var F=l.CQ.AR(d);a?"xy"===l.C.AJ.layout?(F=l.AZ.AR(d),F=ZC._l_(F,l.AZ.iX,l.AZ.iX+l.AZ.I)):F=ZC._l_(F,l.CQ.iX,l.CQ.iX+l.CQ.I):"yx"===l.C.AJ.layout?(F=l.AZ.AR(d),F=ZC._l_(F,l.AZ.iY,l.AZ.iY+l.AZ.F)):F=ZC._l_(F,l.CQ.iY,l.CQ.iY+l.CQ.F);var Q=!0,b=0,H=null;A=0;var I=-1,P=-1,w=l.A.A3[0].S9&&l.A.A3[0].S9.length,K=l.Y,m=l.CW;if(l.Y>1&&"spline"===m&&(m="segmented"),l.AZ.EI&&l.EI){for(e=l.Y,l.N7&&(e=1),i=0,C=l.R.length;i<C;i+=e)P-i<=l.Y&&(e=ZC.BR(1,P-i)),l.R[i]&&(l.AZ.IU.length>0||ZC.DS(l.R[i].BV,l.AZ.V[l.AZ.W],l.AZ.V[l.AZ.A1])||Q&&l.R[i+e]&&l.R[i+e].BV>=l.AZ.V[l.AZ.W])&&(Q&&l.R[i-e]&&(-1===I&&(I=i-e),P=i-e,Q=!1,b++),-1===I&&(I=i),P=i,b++,Q=!1,A=i);b>0&&l.R[A+e]&&(-1===I&&(I=A+e),P=A+e,l.R[A+e].J1=!0)}else I=l.AZ.W,P=l.LT||"log"===l.AZ.BS?l.R.length:l.AZ.A1;l.Y=K,E||l.A.D9&&(G=l.A.D9.reverse());var y=null,N=null,U=0,J=1;A=I,a?P-I>l.C.N.F&&(U=4/l.C.N.I*(l.CQ.BF-l.CQ.B0),J=ZC._f_((P-I)/(4*l.C.N.F))):P-I>l.C.N.I&&(U=4/l.C.N.F*(l.CQ.BF-l.CQ.B0),J=ZC._f_((P-I)/(4*l.C.N.I)));var O=!1,W=!1,V=-1;e=l.Y,l.N7&&(e=1),O=!0,!l.A.S2&&E&&(l.A.S2={},l.A.VO={});var M=null,T=null;if(l.A.S2&&!l.A.S2["s"+l.DZ]&&E){l.A.S2["s"+l.DZ]={},l.A.VO["s"+l.DZ]={};var k=l.A.WS["s"+l.DZ];for(i=0;i<=k.length;i++)null!==ZC._n_(k[i])&&(n=l.AZ.EI?ZC._i_(l.AZ.AR(k[i])):ZC._i_(l.AZ.II(k[i])),l.A.S2["s"+l.DZ][n]=F,l.A.VO["s"+l.DZ][n]=F)}for(E&&(M=l.A.S2["s"+l.DZ],T=l.A.VO["s"+l.DZ]),i=I;i<=P;i+=e){var x=!1;if(((P-I)%l.Y!=0||l.AZ.EI&&l.EI)&&P-i<=l.Y&&(e=ZC.BR(1,P-i),x=!0),l.N7&&!x&&l.R[i])if(null===ZC._n_(y))y=l.R[i].CR,A=i,N=0;else{if(Math.abs(l.R[i].CR-y)<U&&i-A<J&&(!l.EI||l.R[i].BV-N<4*l.AZ.SM))continue;y=l.R[i].CR,N=l.R[i].BV,A=i}if(H=l.FQ(i)){switch(l.R[i].J1=!0,(l.FW||l.LT)&&H.paint(!0),(W||("segmented"===m||"stepped"===m)&&i===I&&0===G.length)&&(E||(G.push(a?[F,H.iY]:[H.iX,F]),W&&c.push(a?[F,H.iY]:[H.iX,F]))),W=!1,-1===V&&(V=H.iX),m){default:E||O&&(a?H.iY>l.AZ.iY&&(c.push([F,l.AZ.iY]),c.push([F,H.iY]),G.push([F,H.iY])):H.iX>l.AZ.iX&&(c.push([l.AZ.iX,F]),c.push([H.iX,F]),G.push([H.iX,F])),O=!1),D.push([H.iX,H.iY]),E?a?T[ZC._i_(H.iY)]=H.iX:T[ZC._i_(H.iX)]=H.iY:(c.push([H.iX,H.iY]),G.push([H.iX,H.iY]));break;case"spline":a?(B.push(H.iX),S.push(H.iY),1===B.length&&(B.push(H.iX),S.push(H.iY))):(B.push(H.iY),S.push(H.iX),1===B.length&&(B.push(H.iY),S.push(H.iX)));break;case"stepped":var $=l.AZ.AX?-1:1;switch(l.ST){default:(s=l.FQ(i-e,0))&&(s.setup(),_=ZC.AQ.K1(l.R[i-e].iX,l.R[i-e].iY,H.iX,H.iY),D.push(a?[H.iX,_[1]]:[_[0],H.iY]),E?a?T[ZC._i_(_[1])-$]=H.iX:T[ZC._i_(_[0])+$]=H.iY:(c.push(a?[H.iX,_[1]]:[_[0],H.iY]),G.push(a?[H.iX,_[1]]:[_[0],H.iY]))),D.push([H.iX,H.iY]),E?a?T[ZC._i_(H.iY)]=H.iX:T[ZC._i_(H.iX)]=H.iY:(c.push([H.iX,H.iY]),G.push([H.iX,H.iY])),(Z=l.FQ(i+e,0))&&(Z.setup(),_=ZC.AQ.K1(H.iX,H.iY,l.R[i+e].iX,l.R[i+e].iY),D.push(a?[H.iX,_[1]]:[_[0],H.iY]),E?a?T[ZC._i_(_[1])+$]=H.iX:T[ZC._i_(_[0])-$]=H.iY:(c.push(a?[H.iX,_[1]]:[_[0],H.iY]),G.push(a?[H.iX,_[1]]:[_[0],H.iY])));break;case"before":(s=l.FQ(i-e,0))&&(s.setup(),D.push([l.R[i-e].iX,l.R[i-e].iY],[l.R[i-e].iX,H.iY]),E?a?(T[ZC._i_(H.iY)+$]=l.R[i-e].iX,T[ZC._i_(H.iY)]=l.R[i-e].iX):(T[ZC._i_(l.R[i-e].iX)]=l.R[i-e].iY,T[ZC._i_(l.R[i-e].iX)+$]=H.iY):(c.push([l.R[i-e].iX,l.R[i-e].iY],[l.R[i-e].iX,H.iY]),G.push([l.R[i-e].iX,l.R[i-e].iY],[l.R[i-e].iX,H.iY]))),D.push([H.iX,H.iY]),E?a?T[ZC._i_(H.iY)]=H.iX:T[ZC._i_(H.iX)]=H.iY:(c.push([H.iX,H.iY]),G.push([H.iX,H.iY]));break;case"after":D.push([H.iX,H.iY]),E?a?T[ZC._i_(H.iY)]=H.iX:T[ZC._i_(H.iX)]=H.iY:(c.push([H.iX,H.iY]),G.push([H.iX,H.iY])),(Z=l.FQ(i+e,0))&&(Z.setup(),D.push([l.R[i+e].iX,H.iY],[l.R[i+e].iX,l.R[i+e].iY]),E?a?(T[ZC._i_(H.iY)-$]=l.R[i+e].iX,T[ZC._i_(l.R[i+e].iY)]=l.R[i+e].iX):(T[ZC._i_(l.R[i+e].iX)-$]=H.iY,T[ZC._i_(l.R[i+e].iX)]=l.R[i+e].iY):(c.push([l.R[i+e].iX,H.iY],[l.R[i+e].iX,l.R[i+e].iY]),G.push([l.R[i+e].iX,H.iY],[l.R[i+e].iX,l.R[i+e].iY])))}}w&&H.NA(ZC.Q.EE(l.CS("fl",0),l.G.AC)),(l.RB&&g||l.FW||l.U)&&H.PK(),H.J1=!0}else null!==ZC._n_(l.o["connect-nulls"])&&ZC._b_(l.o["connect-nulls"])||(D.push(null),B.push(null),S.push(null),E||(G.length-1>=0&&G.push(a?[F,G[G.length-1][1]]:[G[G.length-1][0],F]),c.length-1>=0&&c.push(a?[F,G[G.length-1][1]]:[G[G.length-1][0],F]),W=!0))}if("segmented"!==m&&"stepped"!==m||E||G.length-1>=0&&(a?G.push([F,G[G.length-1][1]]):G.push([G[G.length-1][0],F])),"spline"===m){B.push(B[B.length-1]),S.push(S[S.length-1]),D=[],E||G.push(a?[F,S[0]]:[S[0],F]);for(var z=1;z<B.length-1;z++){var j=[B[z-1],B[z],B[z+1],B[z+2]],q=ZC._a_(S[z+1]-S[z]);q=Math.min(q,Math.max(l.C.I,l.C.F));var ii=ZC.AQ.YC(l.QJ,j,q);for(i=0;i<ii.length;i++)null!==ZC._n_(ii[i][0])&&null!==ZC._n_(ii[i][1])?(u=a?[ii[i][1],S[z]+(l.AZ.AX?1:-1)*ii[i][0]*q]:[S[z]+(l.AZ.AX?-1:1)*ii[i][0]*q,ii[i][1]],D.push(u),E?a?T[ZC._i_(u[1])]=u[0]:T[ZC._i_(u[0])]=u[1]:(G.push(u),c.push(u))):D.push(null)}E||G.push(a?[F,G[G.length-1][1]]:[G[G.length-1][0],F])}if(!E&&c.length>0){var Ci=c[c.length-1];a||Ci[0]<l.AZ.iX+l.AZ.I&&(c.push(a?[F,Ci[1]]:[Ci[0],F]),c.push(a?[F,l.AZ.iY]:[l.AZ.iX+l.AZ.I,F]))}if(E){var Ai=[],ei=[],ni=[],_i=[];for(h in T)ni.push([h,T[h]]);for(h in ni.sort(function(i,C){return i[0]-C[0]}),M)_i.push([h,M[h]]);for(_i.sort(function(i,C){return i[0]-C[0]}),i=0;i<ni.length;i++)a?Ai.push([ni[i][1],ni[i][0]]):Ai.push([ni[i][0],ni[i][1]]);for(i=0;i<_i.length;i++)a?ei.push([_i[i][1],_i[i][0]]):ei.push([_i[i][0],_i[i][1]]);for(h in(G=Ai.concat(ei.reverse()))[0]&&G.push(G[0]),M=l.A.S2["s"+l.DZ]={},T)M[h]=T[h]}var si=new ZC.DT(l);if(si.copy(l),si.D0=!0,si.LB=!0,si.B1=0,si.AU=0,si.EU=0,si.G3=0,si.NC=l.NH?180:90,si.parse(),si.C6=l.HS,si.Z=l.CS("bl",l.C.CG?0:1),si.D=G,si.A3Y(),si.K=l.K+"-area",si.paint(),l.D0=!1,ZC.CO.setup(l.OD,l),ZC.CO.paint(l.OD,l,D),l.C.B7&&l.C.B7.I3&&l.QV){var Zi,ui=l.C.B7,pi=l.mapPointsToPreview(G),hi=new ZC.DT(l.A);hi.copy(l),hi.D0=!0,hi.LB=!0,hi.B1=0,hi.AU=0,hi.EU=0,hi.G3=0,hi.C6=l.HS,hi.D2=[p.iX,p.iY,p.iX+p.I,p.iY+p.F],hi.K=l.K+"-area-preview",hi.DG=l.K+"-preview",hi.Z=ui.Z;var li=l.o["preview-state"];li&&(null!==ZC._n_(li["alpha-area"])?(Zi=li.alpha,li.alpha=l.o["preview-state"]["alpha-area"]):li.alpha=hi.C6,hi.append(li),hi.parse(),null!==ZC._n_(Zi)?li.alpha=Zi:delete li.alpha),hi.D=pi,hi.paint();var ai=l.mapPointsToPreview(D),ti=ZC.Q.EE(ui.Z,l.G.AC),Xi=new ZC.CZ(l);Xi.copy(l),Xi.D0=!0,Xi.LB=!0,Xi.K=l.K+"-line-preview",Xi.DG=l.K+"-preview",Xi.B1=1,li&&(Xi.append(li),Xi.parse()),ZC.CO.paint(ti,Xi,ai,null,3)}l.CG&&(l.A.D9=c)}}}),ZC.A31=ZC.LM.CD({setup:function(){this.R4()},ABE:function(){return{color:this.A.GZ?this.A.B9:this.P.B9}},Y3:function(){return{"background-color":this.P.B9,"border-color":this.P.B9,color:this.P.C2}},getTooltipPosition:function(i,C){return this.b(i,C,this.L9.AI)},paint:function(i){var C,A,e,n,_,s,Z,u,p=this;void 0===i&&(i=!1),p.b();var h=p.A.NH,l=p.A.OD,a=p.A.AZ,t=p.A.CQ,X=p.A.R;if(p.setup(),!p.A.GZ||p.C.AJ["3d"]||p.A.FW){p.P.D0=p.D0=!1,p.P.C8=p.A.CS("bl",1);var r=t.HC,Y=t.AR(r);Y=h?ZC._l_(Y,t.iX,t.iY+t.I):ZC._l_(Y,t.iY,t.iY+t.F);var o=a.DF?a.AA/2:0,L=[],f=[],R=[],v=null;null!==ZC._n_(p.A.A.F3)&&null!==ZC._n_(p.A.A.F3[p.L])&&(v=p.A.A.F3[p.L]);var g=p.A.CW;(p.C.OF||p.A.U9)&&"spline"===p.A.CW&&(g="segmented"),A=p.P.B1/2-1,e="svg"===p.G.AC&&ZC.mobile?p.P.HS/4:0,"vml"===p.G.AC&&p.A.GG&&(e=.5),p.C.AJ["3d"]&&(1===p.A.HS?e=1:(e=p.A.HS/3,"canvas"===p.G.AC&&(ZC.A4.browser.msie||ZC.A4.browser.opera)&&(e=.5)),a.AX&&(e=-e));var E,D="undefined"!=typeof p.A.GC?p.A.GC:p.A.Y,G="undefined"!=typeof p.A.HK?p.A.HK:p.A.Y,c=!0,B=!0;(!X[p.L-D]||"log"!==a.BS&&!a.EI&&p.L<=a.W)&&(c=!1);var S=p.A.LT?p.A.R.length:a.A1;switch((!X[p.L+G]||"log"!==a.BS&&!a.EI&&p.L>=S)&&(B=!1),g){default:if(c)p.A.FQ(p.L-D,0).setup(),p.A.UX?(_=ZC.AQ.K1(X[p.L-D].iX,X[p.L-D].iY,X[p.L].iX,X[p.L].iY),R.push([ZC._i_(_[0])-e,_[1]-A]),p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(_[0])-e,Y]),f.push([ZC._i_(_[0])-e,_[1]+A]),L.push([_[0],_[1]])):f.push([ZC._i_(p.iX),Y]);else if(a.EI||p.L!==a.W)p.A.CG&&null!==ZC._n_(v)?(E=p.A.A.A3[p.A.L-1])&&E.R[p.L]&&f.push([ZC._i_(p.iX),E.R[p.L].iY+A]):(f.push([ZC._i_(p.iX),Y]),R.push([ZC._i_(p.iX-a.AA/2),Y]),R.push([ZC._i_(p.iX),Y]));else if(a.AX)p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(a.iX+a.I-a.BU-o),Y]),f.push([ZC._i_(a.iX+a.I-a.BU-o),p.iY+A]);else{var d=ZC._i_(a.iX+a.A9+o);p.A.LT&&(d=a.II(p.A.RC)-a.AA/2),p.A.CG&&null!==ZC._n_(v)||f.push([d,Y]),f.push([d,p.iY+A])}R.push([ZC._i_(p.iX),p.iY-A]),f.push([ZC._i_(p.iX),p.iY+A]),L.push([p.iX,p.iY]),B?(p.A.FQ(p.L+G,2).setup(),n=p.A.UX?ZC.AQ.K1(X[p.L].iX,X[p.L].iY,X[p.L+G].iX,X[p.L+G].iY):[X[p.L+G].iX,X[p.L+G].iY],R.push([ZC._i_(n[0]),n[1]-A]),f.push([ZC._i_(n[0]),n[1]+A]),p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(n[0]),Y]),_=p.A.UX?ZC.AQ.K1(X[p.L].iX,X[p.L].iY,X[p.L+G].iX,X[p.L+G].iY,p.P.C6):[X[p.L+G].iX,X[p.L+G].iY],L.push([_[0],_[1]])):p.L===a.A1?a.AX?(f.push([a.iX+a.A9-o,p.iY+A]),p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(a.iX+a.A9-o),Y])):(f.push([a.iX+a.I-a.BU-o,p.iY+A]),p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(a.iX+a.I-a.BU-o),Y])):p.A.CG&&null!==ZC._n_(v)?(E=p.A.A.A3[p.A.L-1])&&E.R[p.L]&&f.push([ZC._i_(p.iX),E.R[p.L].iY+A]):(f.push([ZC._i_(p.iX),Y]),R.push([ZC._i_(p.iX),Y]),R.push([ZC._i_(p.iX+a.AA/2),Y]));break;case"spline":if(null!==ZC._n_(p.A.D9)&&(R=p.A.D9),null!==ZC._n_(p.A.AH)&&(f=p.A.AH),p.A.D9=[],p.A.AH=[],null!==ZC._n_(p.A.D)&&(L=p.A.D),p.A.D=[],X[p.L+1]){var F=[],Q=[];for(s=-1;s<3;s++)X[p.L+s]?(p.A.FQ(p.L+s,2).setup(),h?(F.push(X[p.L+s].iX),Q.push(X[p.L+s].iY)):(F.push(X[p.L+s].iY),Q.push(X[p.L+s].iX))):0===F.length?h?(Q.push(p.iY),F.push(p.iX)):(Q.push(p.iX),F.push(p.iY)):(F.push(F[F.length-1]),Q.push(Q[Q.length-1]));var b=ZC._a_(Q[2]-Q[1]);b=Math.min(b,Math.max(p.C.I,p.C.F));var H=ZC.AQ.YC(p.A.QJ,F,b);if(p.A.UX){for(0===f.length&&(p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(p.iX+(a.AX?-1:1)*H[0][0]*b),Y])),s=0;s<ZC._i_(H.length/2)+(1===p.P.C6?1:0);s++)H[s]&&(h?L.push([H[s][1],p.iY+(a.AX?1:-1)*H[s][0]*b]):L.push([p.iX+(a.AX?-1:1)*H[s][0]*b,H[s][1]]));for(s=0;s<ZC._i_(H.length/2)+(1===p.P.HS?1:0);s++)R.push([ZC._i_(p.iX+(a.AX?-1:1)*H[s][0]*b),H[s][1]-A]),f.push([ZC._i_(p.iX+(a.AX?-1:1)*H[s][0]*b),H[s][1]]);for(p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(f[f.length-1][0]),Y]),u=1===p.HS?ZC.CY(2,ZC._i_(H.length/2)):1,s=ZC._i_(H.length/2)-1,Z=H.length;s<Z;s++)H[s]&&(h?p.A.D.push([H[s][1],p.iY+(a.AX?1:-1)*H[s][0]*b]):p.A.D.push([p.iX+(a.AX?-1:1)*H[s][0]*b,H[s][1]]));for(s=ZC._i_(H.length/2)-u,Z=H.length;s<Z;s++)0===p.A.AH.length&&(p.A.CG&&null!==ZC._n_(v)||p.A.AH.push([ZC._i_(p.iX+(a.AX?-1:1)*H[s][0]*b),Y])),p.A.AH.push([ZC._i_(p.iX+(a.AX?-1:1)*H[s][0]*b),H[s][1]]),p.A.D9.push([ZC._i_(p.iX+(a.AX?-1:1)*H[s][0]*b),H[s][1]-A])}else{for(0===f.length&&(p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(p.iX+(a.AX?-1:1)*H[0][0]*b),Y])),s=0;s<H.length;s++)h?L.push([H[s][1],p.iY+(a.AX?1:-1)*H[s][0]*b]):L.push([p.iX+(a.AX?-1:1)*H[s][0]*b,H[s][1]]);for(s=0;s<H.length;s++)R.push([ZC._i_(p.iX+(a.AX?-1:1)*H[s][0]*b),H[s][1]-A]),f.push([ZC._i_(p.iX+(a.AX?-1:1)*H[s][0]*b),H[s][1]]);for(p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(f[f.length-1][0]),Y]),u=1===p.HS?ZC.CY(2,ZC._i_(H.length/2)):1,s=H.length,Z=H.length;s<Z;s++)h?p.A.D.push([H[s][1],p.iY+(a.AX?1:-1)*H[s][0]*b]):p.A.D.push([p.iX+(a.AX?-1:1)*H[s][0]*b,H[s][1]]);for(s=H.length-u,Z=H.length;s<Z;s++)0===p.A.AH.length&&(p.A.CG&&null!==ZC._n_(v)||p.A.AH.push([ZC._i_(p.iX+(a.AX?-1:1)*H[s][0]*b),Y])),p.A.AH.push([ZC._i_(p.iX+(a.AX?-1:1)*H[s][0]*b),H[s][1]]),p.A.D9.push([ZC._i_(p.iX+(a.AX?-1:1)*H[s][0]*b),H[s][1]-A])}}else f.length>0&&f.push([f[f.length-1][0],Y]);break;case"stepped":if(c)switch(p.A.FQ(p.L-D,0).setup(),_=ZC.AQ.K1(X[p.L-D].iX,X[p.L-D].iY,X[p.L].iX,X[p.L].iY),p.A.ST){default:R.push([ZC._i_(_[0])-e,p.iY-A]),p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(_[0])-e,Y]),f.push([ZC._i_(_[0])-e,p.iY+A]),L.push(h?[X[p.L-D].iX,_[1]]:[_[0],X[p.L-D].iY]),L.push(h?[p.iX,_[1]]:[_[0],p.iY]);break;case"before":R.push([ZC._i_(X[p.L-D].iX)-e,p.iY-A]),p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(X[p.L-D].iX)-e,Y]),f.push([ZC._i_(X[p.L-D].iX)-e,p.iY+A]),L.push([X[p.L-D].iX,X[p.L-D].iY]),L.push([X[p.L-D].iX,p.iY]);break;case"after":R.push([ZC._i_(p.iX)-e,p.iY-A]),p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(p.iX)-e,Y]),f.push([ZC._i_(p.iX)-e,p.iY+A])}else a.EI||p.L!==a.W?p.A.CG&&null!==ZC._n_(v)?(E=p.A.A.A3[p.A.L-1])&&E.R[p.L]&&f.push([ZC._i_(p.iX),E.R[p.L].iY+A]):(f.push([ZC._i_(p.iX),Y]),R.push([ZC._i_(p.iX-a.AA/2),Y]),R.push([ZC._i_(p.iX),Y])):a.AX?(p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(a.iX+a.I-a.BU-o),Y]),f.push([ZC._i_(a.iX+a.I-a.BU-o),p.iY+A])):(p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(a.iX+a.A9+o),Y]),f.push([ZC._i_(a.iX+a.A9+o),p.iY+A]));if(R.push([ZC._i_(p.iX),p.iY-A]),f.push([ZC._i_(p.iX),p.iY+A]),L.push([p.iX,p.iY]),B)switch(p.A.FQ(p.L+G,2).setup(),_=ZC.AQ.K1(X[p.L].iX,X[p.L].iY,X[p.L+G].iX,X[p.L+G].iY,p.P.C6),p.A.ST){default:R.push([ZC._i_(_[0]),p.iY-A]),f.push([ZC._i_(_[0]),p.iY+A]),p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(_[0]),Y]),L.push(h?[p.iX,_[1]]:[_[0],p.iY]);break;case"before":R.push([ZC._i_(p.iX),p.iY-A]),f.push([ZC._i_(p.iX),p.iY+A]),p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(p.iX),Y]);break;case"after":R.push([ZC._i_(X[p.L+G].iX),p.iY-A]),f.push([ZC._i_(X[p.L+G].iX),p.iY+A]),p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(X[p.L+G].iX),Y]),L.push([X[p.L+G].iX,p.iY]),L.push([X[p.L+G].iX,X[p.L+G].iY])}else p.L===a.A1?a.AX?(f.push([a.iX+a.A9-o,p.iY+A]),p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(a.iX+a.A9-o),Y])):(f.push([a.iX+a.I-a.BU-o,p.iY+A]),p.A.CG&&null!==ZC._n_(v)||f.push([ZC._i_(a.iX+a.I-a.BU-o),Y])):p.A.CG&&null!==ZC._n_(v)?(E=p.A.A.A3[p.A.L-1])&&E.R[p.L]&&f.push([ZC._i_(p.iX),E.R[p.L].iY+A]):(f.push([ZC._i_(p.iX),Y]),R.push([ZC._i_(p.iX),Y]),R.push([ZC._i_(p.iX+a.AA/2),Y]))}if(p.A.CG&&null!==ZC._n_(v))for(s=v.length-1;s>=0;s--)f.push(v[s]);if(p.setNodeData({points:L,pointsarea:f}),"ready"!==p.C.M7&&(p.A.V3=p.A.V3.concat(L)),null===ZC._n_(p.A.A.F3)&&(p.A.A.F3=[]),p.A.A.F3[p.L]=R,!i&&!p.C.AJ["3d"]){var I=p.P=p.A.IJ(p,p.P),P=p.C.K+"-node-area "+p.C.K+"-plotset-plot-"+p.A.L+"-node-area zc-node-area";I.DG=P,I.K=p.K,p.A.I0&&p.H8(I);var w,K=p.C.N;if(0!==p.A.E6.length||p.A.I0||"undefined"==typeof p.A.A9J||p.P.o.override||p.C.KL?((w=new ZC.DT(p.A)).copy(I),w.C6=p.A.HS):w=p.A.A9J,p.H8(w),w.C6=ZC._f_(w.o["alpha-area"]||"1"),w.D0=!1,w.LB=!0,w.B1=0,w.AU=0,w.EU=0,w.G3=0,w.Z=p.A.CS("bl",p.C.CG?0:1),w.D=f,w.D2=[K.iX,K.iY,K.iX+K.I,K.iY+K.F],null!==ZC._n_(C=p.A.E["min-y"])&&(w.E["bound-1"]=C,w.D2[1]=C),null!==ZC._n_(C=p.A.E["max-y"])&&(w.E["bound-3"]=C,w.D2[3]=C),w.K=p.K+"-area",p.A.GG||(w.E.areanode=!0),ZC.CO.setup(l,I),p.paintPreview(I,L,f),p.A.GG&&!p.C.HM){var m=new ZC.DT(p),y={};m.copy(I),m.K=p.K,m.Z=p.A.CS("bl",2),m.C8=p.A.CS("bl",1),m.D=L;var N=w,U={},J=[],O=[];m.D=L,y.points=L,N.D=f,U.points=f;var W=p.A.LE,V=p.C.N;m.C6=0,y.alpha=I.C6,N.C6=0,U.alpha=p.A.HS;var M,T=function(i){for(var C=i?f:L,A=i?O:J,e=0;e<C.length;e++)2===W?A[e]=[C[e][0],V.iY+p.C.N.F/2]:3===W?A[e]=[C[e][0],V.iY-5]:4===W?A[e]=[C[e][0],V.iY+V.F+5]:5===W?A[e]=[V.iX-5,C[e][1]]:6===W?A[e]=[V.iX+V.I+5,C[e][1]]:7===W?A[e]=[V.iX+V.I/2,C[e][1]]:8===W?A[e]=[C[e][0]-V.I,C[e][1]]:9===W?A[e]=[C[e][0]+V.I,C[e][1]]:10===W?A[e]=[C[e][0],C[e][1]-V.F]:11===W?A[e]=[C[e][0],C[e][1]+V.F]:12===W?A[e]=[(C[0][0]+C[C.length-1][0])/2,C[0][1]]:13===W&&(A[e]=[C[0][0],(C[0][1]+C[C.length-1][1])/2]),W>1&&(i?(N.D=O,U.points=f):(m.D=J,y.points=L))};for(M in T(),T(!0),p.A.FY)m[ZC.E8.GO[ZC.EH(M)]]=p.A.FY[M],y[ZC.EH(M)]=I[ZC.E8.GO[ZC.EH(M)]],N[ZC.E8.GO[ZC.EH(M)]]=p.A.FY[M],U[ZC.EH(M)]=I[ZC.E8.GO[ZC.EH(M)]];if(null===ZC._n_(p.C.ER)&&(p.C.ER={}),null===ZC._n_(p.C.SY)&&(p.C.SY={}),null!==ZC._n_(p.C.ER[p.A.L+"-"+p.L])){for(M in p.C.ER[p.A.L+"-"+p.L])m[ZC.E8.GO[ZC.EH(M)]]=p.C.ER[p.A.L+"-"+p.L][M];for(M in p.C.SY[p.A.L+"-"+p.L])N[ZC.E8.GO[ZC.EH(M)]]=p.C.SY[p.A.L+"-"+p.L][M]}p.C.ER[p.A.L+"-"+p.L]={},ZC._cp_(y,p.C.ER[p.A.L+"-"+p.L]),p.C.SY[p.A.L+"-"+p.L]={},ZC._cp_(U,p.C.SY[p.A.L+"-"+p.L]);var k=new ZC.E8(m,y,p.A.JG,p.A.LC,ZC.E8.RQ[p.A.LF],function(){$()});k.AW=p,k.OH=function(){p.NA(ZC.Q.EE(p.A.CS("bl",1),p.G.AC))},k.HY=l;var x=new ZC.E8(N,U,p.A.JG,p.A.LC,ZC.E8.RQ[p.A.LF],function(){});x.AW=p,p.LU(k,x)}else w.paint(),0!==p.A.E6.length||"undefined"!=typeof p.A.A9J||p.P.o.override||p.C.KL||p.C.HM||(p.A.A9J=w),ZC.CO.paint(l,I,L),$()}}function $(){!p.C.OF&&ZC.DS(p.iX,a.iX-1,a.iX+a.I+1)&&ZC.DS(p.iY,a.iY-1,a.iY+a.F+1)&&(p.PK(),p.NA(ZC.Q.EE(p.A.CS("bl",1),p.G.AC)),p.A.U&&p.A.U.AP&&p.A.E.vboxid!==p.K&&p.H1())}},paintPreview:function(i,C,A){var e=this;if(e.C.B7&&e.C.B7.I3&&e.A.QV){var n,_=e.C.N,s=e.C.B7,Z=e.A.mapPointsToPreview(A),u=new ZC.DT(e.A);u.copy(i),u.D0=!0,u.LB=!0,u.B1=0,u.AU=0,u.EU=0,u.G3=0,u.C6=e.A.HS,u.D2=[_.iX,_.iY,_.iX+_.I,_.iY+_.F],u.K=e.K+"-area-preview",u.DG=e.A.K+"-preview",u.Z=s.Z;var p,h=e.A.o["preview-state"];h&&(null!==ZC._n_(h["alpha-area"])?(n=h.alpha,h.alpha=h["alpha-area"]):h.alpha=u.C6,u.append(h),u.parse(),null!==ZC._n_(n)?h.alpha=n:delete h.alpha),u.D=Z,u.paint();var l=e.A.mapPointsToPreview(C);e.A.VY?p=e.A.VY:(p=new ZC.CZ(e),e.A.VY=p),p.copy(i),p.K=e.K+"-line-preview",p.DG=e.A.K+"-preview";var a=ZC.Q.EE(s.Z,e.G.AC);p.B1=1,h&&(p.append(h),p.parse()),ZC.CO.paint(a,p,l,null,3)}},A15:function(i){var C=this;ZC.move||(C.A.NH||C.MC({layer:i,type:"area",initcb:function(){this.A0=C.A.BP[2],this.AE=C.A.BP[2],this.D=C.getNodeData("pointsarea")||[]},setupcb:function(){this.B1=0,this.AU=0,this.C6=C.A.HS;var i=C.C.N;this.D2=[i.iX,i.iY,i.iX+i.I,i.iY+i.F]}}),C.A1W(i),C.A.RB&&C.U4(i))}});