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