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