/* Highcharts JS v8.2.2 (2020-10-22) 3D features for Highcharts JS License: www.highcharts.com/license */ (function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/highcharts-3d",["highcharts"],function(G){b(G);b.Highcharts=G;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function G(b,u,w,J){b.hasOwnProperty(u)||(b[u]=J.apply(null,w))}b=b?b._modules:{};G(b,"Extensions/Math3D.js",[b["Core/Globals.js"],b["Core/Utilities.js"]],function(b,u){var w=u.pick,y=b.deg2rad,c=b.perspective3D=function(c, n,f){n=0g&&l-g>Math.PI/2+.0001?(z=z.concat(q(a, d,e,K,g,g+Math.PI/2,c,t)),z=z.concat(q(a,d,e,K,g+Math.PI/2,l,c,t))):lMath.PI/2+.0001?(z=z.concat(q(a,d,e,K,g,g-Math.PI/2,c,t)),z=z.concat(q(a,d,e,K,g-Math.PI/2,l,c,t))):[["C",a+e*Math.cos(g)-e*F*v*Math.sin(g)+c,d+K*Math.sin(g)+K*F*v*Math.cos(g)+t,a+e*Math.cos(l)+e*F*v*Math.sin(l)+c,d+K*Math.sin(l)-K*F*v*Math.cos(l)+t,a+e*Math.cos(l)+c,d+K*Math.sin(l)+t]]}var n=b.animObject,f=u.parse,r=J.perspective,m=J.shapeArea,A=h.defined,y=h.extend,k=h.merge,a=h.objectEach,g=h.pick,C=Math.cos,d=Math.PI, p=Math.sin,I=w.charts,L=w.deg2rad;var F=4*(Math.sqrt(2)-1)/3/(d/2);x.prototype.toLinePath=function(a,d){var e=[];a.forEach(function(a){e.push(["L",a.x,a.y])});a.length&&(e[0][0]="M",d&&e.push(["Z"]));return e};x.prototype.toLineSegments=function(a){var d=[],e=!0;a.forEach(function(a){d.push(e?["M",a.x,a.y]:["L",a.x,a.y]);e=!e});return d};x.prototype.face3d=function(a){var d=this,e=this.createElement("path");e.vertexes=[];e.insidePlotArea=!1;e.enabled=!0;e.attr=function(a){if("object"===typeof a&& (A(a.enabled)||A(a.vertexes)||A(a.insidePlotArea))){this.enabled=g(a.enabled,this.enabled);this.vertexes=g(a.vertexes,this.vertexes);this.insidePlotArea=g(a.insidePlotArea,this.insidePlotArea);delete a.enabled;delete a.vertexes;delete a.insidePlotArea;var e=r(this.vertexes,I[d.chartIndex],this.insidePlotArea),l=d.toLinePath(e,!0);e=m(e);e=this.enabled&&0a.faces.length;)e.faces.pop().destroy();for(;e.faces.lengtha.faces.length;)e.faces.pop().destroy();for(;e.faces.lengtha?{x:E[a].x,y:E[a].y+10,z:E[a].z}:E[0].x===E[7].x&&4<=a?{x:E[a].x+10,y:E[a].y,z:E[a].z}:0===z&&2>a||5m(l)?c=[l,0]:0>m(B)?c=[B,1]:g&&(f.push(g),c=0>m(a)?[l,0]:0>m(v)?[B,1]:[l,0]);return c};var C=D([3,2,1,0],[7,6,5,4],"front");a=C[0];var k=C[1];C=D([1,6,7,0],[4,5,2,3],"top"); t=C[0];var F=C[1];C=D([1,2,5,6],[0,7,4,3],"side");D=C[0];C=C[1];1===C?b+=1E6*(v.plotWidth-g):C||(b+=1E6*g);b+=10*(!F||0<=B&&180>=B||360>B&&357.5Math.PI&&(a=2*Math.PI-a);return a}var e=a.x,c=a.y,b=a.start,l=a.end-.00001,f=a.r,t=a.innerR||0,z=a.depth||0,v=a.alpha,B=a.beta,m=Math.cos(b), E=Math.sin(b);a=Math.cos(l);var k=Math.sin(l),D=f*Math.cos(B);f*=Math.cos(v);var F=t*Math.cos(B),r=t*Math.cos(v);t=z*Math.sin(B);var h=z*Math.sin(v);z=[["M",e+D*m,c+f*E]];z=z.concat(q(e,c,D,f,b,l,0,0));z.push(["L",e+F*a,c+r*k]);z=z.concat(q(e,c,F,r,l,b,0,0));z.push(["Z"]);var n=0-n?b:l>-n?-n:b;var H=lI&&bd-B&&bq(x([a,{x:a.x+h.x,y:a.y+h.y,z:a.z+h.z},{x:a.x+l.x,y:a.y+l.y,z:a.z+l.z}],g.chart))&&(h={x:-h.x,y:-h.y,z:-h.z}),a=x([{x:a.x,y:a.y,z:a.z},{x:a.x+h.x,y:a.y+h.y,z:a.z+h.z},{x:a.x+l.x,y:a.y+l.y, z:a.z+l.z}],g.chart),d.matrix=[a[1].x-a[0].x,a[1].y-a[0].y,a[2].x-a[0].x,a[2].y-a[0].y,d.x,d.y],d.matrix[4]-=d.x*d.matrix[0]+d.y*d.matrix[2],d.matrix[5]-=d.x*d.matrix[1]+d.y*d.matrix[3]);return d};c.prototype.swapZ=function(a,g){var c=this.axis;return c.isZAxis?(g=g?0:c.chart.plotLeft,{x:g+a.z,y:a.y,z:a.x-g}):a};return c}();return function(){function c(){}c.compose=function(a){f(!0,a.defaultOptions,c.defaultOptions);a.keepProps.push("axis3D");n(a,"init",c.onInit);n(a,"afterSetOptions",c.onAfterSetOptions); n(a,"drawCrosshair",c.onDrawCrosshair);n(a,"destroy",c.onDestroy);a=a.prototype;m(a,"getLinePath",c.wrapGetLinePath);m(a,"getPlotBandPath",c.wrapGetPlotBandPath);m(a,"getPlotLinePath",c.wrapGetPlotLinePath);m(a,"getSlotWidth",c.wrapGetSlotWidth);m(a,"getTitlePosition",c.wrapGetTitlePosition);J.compose(w)};c.onAfterSetOptions=function(){var a=this.chart,c=this.options;a.is3d&&a.is3d()&&"colorAxis"!==this.coll&&(c.tickWidth=r(c.tickWidth,0),c.gridLineWidth=r(c.gridLineWidth,1))};c.onDestroy=function(){["backFrame", "bottomFrame","sideFrame"].forEach(function(a){this[a]&&(this[a]=this[a].destroy())},this)};c.onDrawCrosshair=function(a){this.chart.is3d()&&"colorAxis"!==this.coll&&a.point&&(a.point.crosshairPos=this.isXAxis?a.point.axisXpos:this.len-a.point.axisYpos)};c.onInit=function(){this.axis3D||(this.axis3D=new y(this))};c.wrapGetLinePath=function(a){return this.chart.is3d()&&"colorAxis"!==this.coll?[]:a.apply(this,[].slice.call(arguments,1))};c.wrapGetPlotBandPath=function(a){if(!this.chart.is3d()||"colorAxis"=== this.coll)return a.apply(this,[].slice.call(arguments,1));var c=arguments,b=c[2],d=[];c=this.getPlotLinePath({value:c[1]});b=this.getPlotLinePath({value:b});if(c&&b)for(var f=0;fa?-1:0},m=p([{x:e,y:k,z:l},{x:g,y:k,z:l},{x:g,y:k,z:0},{x:e,y:k,z:0}]),n=p([{x:e,y:h,z:0},{x:g,y:h,z:0},{x:g,y:h,z:l},{x:e,y:h,z:l}]),q=p([{x:e,y:h,z:0},{x:e,y:h,z:l},{x:e,y:k,z:l},{x:e,y:k,z:0}]),t=p([{x:g,y:h,z:l},{x:g,y:h, z:0},{x:g,y:k,z:0},{x:g,y:k,z:l}]),C=p([{x:e,y:k,z:0},{x:g,y:k,z:0},{x:g,y:h,z:0},{x:e,y:h,z:0}]);p=p([{x:e,y:h,z:l},{x:g,y:h,z:l},{x:g,y:k,z:l},{x:e,y:k,z:l}]);var u=!1,F=!1,w=!1,y=!1;[].concat(d.xAxis,d.yAxis,d.zAxis).forEach(function(a){a&&(a.horiz?a.opposite?F=!0:u=!0:a.opposite?y=!0:w=!0)});var x=function(d,b,c){for(var e=["size","color","visible"],f={},g=0;gc*g[e][b]?e=h:c*g[h][b]===c*g[e][b]&&g[h].zl&&(q=Math.min(q,1-Math.abs((b+h)/(l+h))%1));cm&&(q=0>m?Math.min(q,(e+k)/(-m+ e+k)):Math.min(q,1-(e+k)/(m+k)%1));gthis.pos&&(y(this.start)||y(this.end))){var a=this.start||[1,0,0,1,0,0],d=this.end||[1,0,0,1,0,0];var b=[];for(var c=0;6>c;c++)b.push(this.pos*d[c]+(1-this.pos)*a[c])}else b=this.end;this.elem.attr(this.prop,b,null,!0)};k(!0,m,b.defaultOptions);A(a,"init",e);A(a,"addSeries",d);A(a,"afterDrawChartBox",h);A(a,"afterGetContainer",n);A(a,"afterInit",q);A(a,"afterSetChartSize",C);A(a,"beforeRedraw",u);A(a,"beforeRender", w);g(c.Chart.prototype,"isInsidePlot",x);g(a,"renderSeries",J);g(a,"setClassName",l)}})(C||(C={}));C.compose(w,J);n.ZChartComposition.compose(w);u.compose(b);"";return C});G(b,"Core/Series/Series3D.js",[b["Core/Globals.js"],b["Extensions/Math3D.js"],b["Core/Utilities.js"]],function(b,u,w){var y=u.perspective;u=w.addEvent;var c=w.pick;u(b.Series,"afterTranslate",function(){this.chart.is3d()&&this.translate3dPoints()});b.Series.prototype.translate3dPoints=function(){var b=this.chart,h=c(this.zAxis, b.options.zAxis[0]),q=[],n;for(n=0;n=h.min&&r<=h.max:!1}else f.plotZ=0;f.axisXpos=f.plotX;f.axisYpos=f.plotY;f.axisZpos=f.plotZ;q.push({x:f.plotX,y:f.plotY,z:f.plotZ})}b=y(q,b,!0);for(n=0;nn&&(g[a[1]]+=g[a[0]]+p,g[a[0]]=-p,n=0);n+g[a[1]]>b[a[0]+"Axis"].len&&0!==g[a[1]]&&(g[a[1]]=b[a[0]+"Axis"].len-g[a[0]]);if(0!==g[a[1]]&&(g[a[0]]>=b[a[0]+"Axis"].len||g[a[0]]+g[a[1]]<=p)){for(var d in g)g[d]=0;c.outside3dPlot=!0}});"rect"===c.shapeType&&(c.shapeType="cuboid");g.z=d;g.depth=h;g.insidePlotArea=!0;m={x:g.x+g.width/2,y:g.y,z:d+h/2};a.inverted&&(m.x=g.height,m.y=c.clientX);c.plot3d=f([m],a,!0,!1)[0];k=f([{x:k[0], y:k[1],z:d+h/2}],a,!0,!1)[0];c.tooltipPos=[k.x,k.y]}});b.z=d};c(A,"animate",function(b){if(this.chart.is3d()){var a=arguments[1],c=this.yAxis,f=this,d=this.yAxis.reversed;y&&(a?f.data.forEach(function(a){null!==a.y&&(a.height=a.shapeArgs.height,a.shapey=a.shapeArgs.y,a.shapeArgs.height=1,d||(a.shapeArgs.y=a.stackY?a.plotY+c.translate(a.stackY):a.plotY+(a.negative?-a.height:a.height)))}):(f.data.forEach(function(a){null!==a.y&&(a.shapeArgs.height=a.height,a.shapeArgs.y=a.shapey,a.graphic&&a.graphic.animate(a.shapeArgs, f.options.animation))}),this.drawDataLabels()))}else b.apply(this,[].slice.call(arguments,1))});c(A,"plotGroup",function(b,a,c,f,d,h){"dataLabelsGroup"!==a&&this.chart.is3d()&&(this[a]&&delete this[a],h&&(this.chart.columnGroup||(this.chart.columnGroup=this.chart.renderer.g("columnGroup").add(h)),this[a]=this.chart.columnGroup,this.chart.columnGroup.attr(this.getPlotBox()),this[a].survive=!0,"group"===a||"markerGroup"===a))&&(arguments[3]="visible");return b.apply(this,Array.prototype.slice.call(arguments, 1))});c(A,"setVisible",function(b,a){var c=this,f;c.chart.is3d()&&c.data.forEach(function(b){f=(b.visible=b.options.visible=a="undefined"===typeof a?!r(c.visible,b.visible):a)?"visible":"hidden";c.options.data[c.data.indexOf(b)]=b.options;b.graphic&&b.graphic.attr({visibility:f})});b.apply(this,Array.prototype.slice.call(arguments,1))});A.handle3dGrouping=!0;w(m,"afterInit",function(){if(this.chart.is3d()&&this.handle3dGrouping){var b=this.options,a=b.grouping,c=b.stacking,f=r(this.yAxis.options.reversedStacks, !0),d=0;if("undefined"===typeof a||a){a=x(this.chart,c);d=b.stack||0;for(c=0;c=n.alpha&&(k.y+=a.shapeArgs.width));k=f([k],g,!0,!1)[0];d.x=k.x-q;d.y=a.outside3dPlot?-9E9:k.y}b.apply(this, [].slice.call(arguments,1))});c(J.prototype,"getStackBox",function(c,a,g,h,d,m,n,q){var k=c.apply(this,[].slice.call(arguments,1));if(a.is3d()&&g.base){var p=+g.base.split(",")[0],r=a.series[p];p=a.options.chart.options3d;r&&r instanceof b.seriesTypes.column&&(r={x:k.x+(a.inverted?n:m/2),y:k.y,z:r.options.depth/2},a.inverted&&(k.width=0,90<=p.alpha&&270>=p.alpha&&(r.y+=m)),r=f([r],a,!0,!1)[0],k.x=r.x-m/2,k.y=r.y)}return k})});G(b,"Series/Pie3DSeries.js",[b["Core/Series/Series.js"],b["Core/Globals.js"], b["Core/Utilities.js"]],function(b,u,w){var y=u.deg2rad,c=u.svg,x=w.pick;u=w.wrap;b=b.seriesTypes;u(b.pie.prototype,"translate",function(b){b.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var c=this,h=c.options,f=h.depth||0,r=c.chart.options.chart.options3d,m=r.alpha,u=r.beta,w=h.stacking?(h.stack||0)*f:c._i*f;w+=f/2;!1!==h.grouping&&(w=0);c.data.forEach(function(b){var a=b.shapeArgs;b.shapeType="arc3d";a.z=w;a.depth=.75*f;a.alpha=m;a.beta=u;a.center=c.center;a=(a.end+a.start)/2;b.slicedTranslation= {translateX:Math.round(Math.cos(a)*h.slicedOffset*Math.cos(m*y)),translateY:Math.round(Math.sin(a)*h.slicedOffset*Math.cos(m*y))}})}});u(b.pie.prototype.pointClass.prototype,"haloPath",function(b){var c=arguments;return this.series.chart.is3d()?[]:b.call(this,c[1])});u(b.pie.prototype,"pointAttribs",function(b,c,n){b=b.call(this,c,n);n=this.options;this.chart.is3d()&&!this.chart.styledMode&&(b.stroke=n.edgeColor||c.color||this.color,b["stroke-width"]=x(n.edgeWidth,1));return b});u(b.pie.prototype, "drawDataLabels",function(b){if(this.chart.is3d()){var c=this.chart.options.chart.options3d;this.data.forEach(function(b){var f=b.shapeArgs,h=f.r,m=(f.start+f.end)/2;b=b.labelPosition;var n=b.connectorPosition,q=-h*(1-Math.cos((f.alpha||c.alpha)*y))*Math.sin(m),k=h*(Math.cos((f.beta||c.beta)*y)-1)*Math.cos(m);[b.natural,n.breakAt,n.touchingSliceAt].forEach(function(a){a.x+=k;a.y+=q})})}b.apply(this,[].slice.call(arguments,1))});u(b.pie.prototype,"addPoint",function(b){b.apply(this,[].slice.call(arguments, 1));this.chart.is3d()&&this.update(this.userOptions,!0)});u(b.pie.prototype,"animate",function(b){if(this.chart.is3d()){var h=arguments[1],n=this.options.animation,f=this.center,r=this.group,m=this.markerGroup;c&&(!0===n&&(n={}),h?(r.oldtranslateX=x(r.oldtranslateX,r.translateX),r.oldtranslateY=x(r.oldtranslateY,r.translateY),h={translateX:f[0],translateY:f[1],scaleX:.001,scaleY:.001},r.attr(h),m&&(m.attrSetters=r.attrSetters,m.attr(h))):(h={translateX:r.oldtranslateX,translateY:r.oldtranslateY,scaleX:1, scaleY:1},r.animate(h,n),m&&m.animate(h,n)))}else b.apply(this,[].slice.call(arguments,1))})});G(b,"Series/Scatter3DSeries.js",[b["Core/Series/Series.js"],b["Extensions/Math3D.js"],b["Core/Series/Point.js"]],function(b,u,w){var y=b.seriesTypes,c=u.pointCameraDistance;b.seriesType("scatter3d","scatter",{tooltip:{pointFormat:"x: {point.x}
y: {point.y}
z: {point.z}
"}},{pointAttribs:function(b){var h=y.scatter.prototype.pointAttribs.apply(this,arguments);this.chart.is3d()&& b&&(h.zIndex=c(b,this.chart));return h},axisTypes:["xAxis","yAxis","zAxis"],pointArrayMap:["x","y","z"],parallelArrays:["x","y","z"],directTouch:!0},{applyOptions:function(){w.prototype.applyOptions.apply(this,arguments);"undefined"===typeof this.z&&(this.z=0);return this}});""});G(b,"masters/highcharts-3d.src.js",[],function(){})}); //# sourceMappingURL=highcharts-3d.js.map