/* Highcharts JS v9.0.1 (2021-02-15) 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(D){a(D);a.Highcharts=D;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function D(a,q,u,C){a.hasOwnProperty(q)||(a[q]=C.apply(null,u))}a=a?a._modules:{};D(a,"Extensions/Math3D.js",[a["Core/Globals.js"],a["Core/Utilities.js"]],function(a,q){function u(l,c,b){c=0d&&f-d>Math.PI/2+.0001?(h=h.concat(n(b,e,c,g,d,d+Math.PI/2,a,r)),h=h.concat(n(b,e,c,g,d+Math.PI/2,f,a,r))):fMath.PI/2+.0001?(h=h.concat(n(b,e,c,g,d,d-Math.PI/2,a,r)),h=h.concat(n(b,e,c,g,d-Math.PI/2,f,a,r))):[["C",b+c*Math.cos(d)-c*E*k*Math.sin(d)+a,e+g*Math.sin(d)+g*E*k*Math.cos(d)+r,b+c*Math.cos(f)+c*E*k*Math.sin(f)+a,e+g*Math.sin(f)-g*E*k*Math.cos(f)+r,b+c*Math.cos(f)+a,e+g*Math.sin(f)+r]]}var l=a.animObject,c=q.parse,b=u.charts,p=u.deg2rad,m=C.perspective,x=C.shapeArea,e= w.defined,g=w.extend,r=w.merge,f=w.pick,H=Math.cos,J=Math.sin,K=Math.PI,E=4*(Math.sqrt(2)-1)/3/(K/2);t.prototype.elements3d=v;t.prototype.toLinePath=function(b,e){var c=[];b.forEach(function(b){c.push(["L",b.x,b.y])});b.length&&(c[0][0]="M",e&&c.push(["Z"]));return c};t.prototype.toLineSegments=function(b){var e=[],c=!0;b.forEach(function(b){e.push(c?["M",b.x,b.y]:["L",b.x,b.y]);c=!c});return e};t.prototype.face3d=function(c){var g=this,h=this.createElement("path");h.vertexes=[];h.insidePlotArea= !1;h.enabled=!0;h.attr=function(c){if("object"===typeof c&&(e(c.enabled)||e(c.vertexes)||e(c.insidePlotArea))){this.enabled=f(c.enabled,this.enabled);this.vertexes=f(c.vertexes,this.vertexes);this.insidePlotArea=f(c.insidePlotArea,this.insidePlotArea);delete c.enabled;delete c.vertexes;delete c.insidePlotArea;var h=m(this.vertexes,b[g.chartIndex],this.insidePlotArea),k=g.toLinePath(h,!0);h=x(h);h=this.enabled&&0b.faces.length;)h.faces.pop().destroy();for(;h.faces.lengthb.faces.length;)h.faces.pop().destroy();for(;h.faces.lengthb?{x:I[b].x,y:I[b].y+10,z:I[b].z}:I[0].x===I[7].x&&4<=b?{x:I[b].x+10,y:I[b].y,z:I[b].z}:0===p&&2>b||5x(d)?f=[d,0]:0>x(h)?f=[h,1]:z&&(l.push(z),f=0>x(b)?[d,0]:0>x(c)?[h,1]:[d,0]);return f};var B=A([3,2,1,0],[7,6,5,4],"front");c=B[0];var H=B[1];B=A([1,6,7,0],[4,5,2,3],"top");r=B[0];var J=B[1];B=A([1,2,5,6],[0,7,4,3],"side");A=B[0];B=B[1];1===B?F+=1E6*(y.plotWidth-f):B||(F+=1E6*f);F+=10*(!J||0<=z&&180>=z||360>z&&357.5Math.PI&&(b=2*Math.PI-b);return b}var e=b.x,f=b.y,d=b.start,g=b.end-.00001,a=b.r,r=b.innerR||0,k=b.depth||0,y=b.alpha,z=b.beta,F=Math.cos(d),p=Math.sin(d);b=Math.cos(g);var l=Math.sin(g),A=a*Math.cos(z);a*=Math.cos(y);var B=r*Math.cos(z),m=r*Math.cos(y);r=k*Math.sin(z); var t=k*Math.sin(y);k=[["M",e+A*F,f+a*p]];k=k.concat(n(e,f,A,a,d,g,0,0));k.push(["L",e+B*b,f+m*l]);k=k.concat(n(e,f,B,m,g,d,0,0));k.push(["Z"]);var x=0-x?d:g>-x?-x:d;var E=gv&&dK-z&&dw(v([b,{x:b.x+k.x,y:b.y+k.y,z:b.z+k.z},{x:b.x+q.x,y:b.y+q.y,z:b.z+q.z}],e.chart))&&(k={x:-k.x,y:-k.y,z:-k.z}),b=v([{x:b.x,y:b.y,z:b.z},{x:b.x+k.x,y:b.y+k.y,z:b.z+k.z},{x:b.x+q.x,y:b.y+q.y,z:b.z+q.z}],e.chart),f.matrix=[b[1].x-b[0].x,b[1].y-b[0].y,b[2].x-b[0].x,b[2].y-b[0].y,f.x,f.y],f.matrix[4]-=f.x*f.matrix[0]+f.y*f.matrix[2],f.matrix[5]-=f.x* f.matrix[1]+f.y*f.matrix[3]);return f};b.prototype.swapZ=function(b,c){var e=this.axis;return e.isZAxis?(c=c?0:e.chart.plotLeft,{x:c+b.z,y:b.y,z:b.x-c}):b};return b}();return function(){function a(){}a.compose=function(c){l(!0,c.defaultOptions,a.defaultOptions);c.keepProps.push("axis3D");n(c,"init",a.onInit);n(c,"afterSetOptions",a.onAfterSetOptions);n(c,"drawCrosshair",a.onDrawCrosshair);n(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);C.compose(u)};a.onAfterSetOptions=function(){var b=this.chart,a=this.options;b.is3d&&b.is3d()&&"colorAxis"!==this.coll&&(a.tickWidth=c(a.tickWidth,0),a.gridLineWidth=c(a.gridLineWidth,1))};a.onDestroy=function(){["backFrame","bottomFrame","sideFrame"].forEach(function(b){this[b]&&(this[b]=this[b].destroy())},this)};a.onDrawCrosshair=function(b){this.chart.is3d()&&"colorAxis"!== this.coll&&b.point&&(b.point.crosshairPos=this.isXAxis?b.point.axisXpos:this.len-b.point.axisYpos)};a.onInit=function(){this.axis3D||(this.axis3D=new m(this))};a.wrapGetLinePath=function(b){return this.chart.is3d()&&"colorAxis"!==this.coll?[]:b.apply(this,[].slice.call(arguments,1))};a.wrapGetPlotBandPath=function(b){if(!this.chart.is3d()||"colorAxis"===this.coll)return b.apply(this,[].slice.call(arguments,1));var c=arguments,a=c[2],f=[];c=this.getPlotLinePath({value:c[1]});a=this.getPlotLinePath({value:a}); if(c&&a)for(var e=0;ea?-1:0},r=p([{x:f,y:h,z:m},{x:g,y:h,z:m},{x:g,y:h,z:0},{x:f,y:h,z:0}]),n=p([{x:f,y:k,z:0},{x:g,y:k,z:0},{x:g,y:k,z:m},{x:f,y:k,z:m}]),t=p([{x:f,y:k,z:0},{x:f,y:k,z:m},{x:f, y:h,z:m},{x:f,y:h,z:0}]),q=p([{x:g,y:k,z:m},{x:g,y:k,z:0},{x:g,y:h,z:0},{x:g,y:h,z:m}]),v=p([{x:f,y:h,z:0},{x:g,y:h,z:0},{x:g,y:k,z:0},{x:f,y:k,z:0}]);p=p([{x:f,y:k,z:m},{x:g,y:k,z:m},{x:g,y:h,z:m},{x:f,y:h,z:m}]);var u=!1,J=!1,w=!1,H=!1;[].concat(b.xAxis,b.yAxis,b.zAxis).forEach(function(b){b&&(b.horiz?b.opposite?J=!0:u=!0:b.opposite?H=!0:w=!0)});var x=function(b,a,c){for(var d=["size","color","visible"],f={},g=0;ge*f[d][c]?d= g:e*f[g][c]===e*f[d][c]&&f[g].zh&&(n=Math.min(n,1-Math.abs((c+g)/(h+g))%1)); ep&&(n=0>p?Math.min(n,(d+k)/(-p+d+k)):Math.min(n,1-(d+k)/(p+k)%1));fthis.pos&&(m(this.start)||m(this.end))){var b=this.start||[1,0,0,1,0,0],a=this.end||[1,0,0,1,0,0];var c=[];for(var e=0;6>e;e++)c.push(this.pos*a[e]+(1-this.pos)*b[e])}else c=this.end;this.elem.attr(this.prop,c,null,!0)};x(!0,b,a.defaultOptions);p(c,"init",v);p(c,"addSeries",f);p(c,"afterDrawChartBox",r);p(c,"afterGetContainer",n);p(c, "afterInit",t);p(c,"afterSetChartSize",k);p(c,"beforeRedraw",q);p(c,"beforeRender",h);g(d.Chart.prototype,"isInsidePlot",u);g(c,"renderSeries",w);g(c,"setClassName",G)}})(r||(r={}));r.compose(u,C);n.ZChartComposition.compose(u);q.compose(a);"";return r});D(a,"Core/Series/Series3D.js",[a["Extensions/Math3D.js"],a["Core/Series/Series.js"],a["Core/Utilities.js"]],function(a,q,u){var G=this&&this.__extends||function(){var a=function(c,b){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b, a){b.__proto__=a}||function(b,a){for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c])};return a(c,b)};return function(c,b){function d(){this.constructor=c}a(c,b);c.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)}}(),d=a.perspective;a=u.addEvent;var v=u.extend,t=u.merge,w=u.pick,n=u.isNumber;u=function(a){function c(){return null!==a&&a.apply(this,arguments)||this}G(c,a);c.prototype.translate=function(){a.prototype.translate.apply(this,arguments);this.chart.is3d()&&this.translate3dPoints()}; c.prototype.translate3dPoints=function(){var b=this.options,a=this.chart,c=w(this.zAxis,a.options.zAxis[0]),l=[],e,g=[];this.zPadding=(b.stacking?n(b.stack)?b.stack:0:this.index||0)*(b.depth||0+(b.groupZPadding||1));for(e=0;e=c.min&&r<=c.max:!1}else b.plotZ=this.zPadding;b.axisXpos=b.plotX;b.axisYpos=b.plotY;b.axisZpos=b.plotZ;l.push({x:b.plotX, y:b.plotY,z:b.plotZ});g.push(b.plotX||0)}this.rawPointsX=g;a=d(l,a,!0);for(e=0;eg&&(e[a[1]]+=e[a[0]]+p,e[a[0]]=-p,g=0);g+e[a[1]]>b[a[0]+"Axis"].len&&0!==e[a[1]]&&(e[a[1]]=b[a[0]+"Axis"].len-e[a[0]]);if(0!==e[a[1]]&&(e[a[0]]>=b[a[0]+"Axis"].len||e[a[0]]+e[a[1]]<=p)){for(var d in e)e[d]=0;c.outside3dPlot=!0}});"rect"===c.shapeType&&(c.shapeType="cuboid");e.z=l;e.depth=d;e.insidePlotArea=!0;n={x:e.x+e.width/2,y:e.y,z:l+d/2};a.inverted&&(n.x=e.height,n.y=c.clientX);c.plot3d=m([n],a,!0,!1)[0];f=m([{x:f[0],y:f[1],z:l+d/2}], a,!0,!1)[0];c.tooltipPos=[f.x,f.y]}});b.z=l};t(b,"animate",function(b){if(this.chart.is3d()){var a=arguments[1],c=this.yAxis,d=this,e=this.yAxis.reversed;p&&(a?d.data.forEach(function(b){null!==b.y&&(b.height=b.shapeArgs.height,b.shapey=b.shapeArgs.y,b.shapeArgs.height=1,e||(b.shapeArgs.y=b.stackY?b.plotY+c.translate(b.stackY):b.plotY+(b.negative?-b.height:b.height)))}):(d.data.forEach(function(b){null!==b.y&&(b.shapeArgs.height=b.height,b.shapeArgs.y=b.shapey,b.graphic&&b.graphic.animate(b.shapeArgs, d.options.animation))}),this.drawDataLabels()))}else b.apply(this,[].slice.call(arguments,1))});t(b,"plotGroup",function(b,a,c,d,m,l){"dataLabelsGroup"!==a&&this.chart.is3d()&&(this[a]&&delete this[a],l&&(this.chart.columnGroup||(this.chart.columnGroup=this.chart.renderer.g("columnGroup").add(l)),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))});t(b,"setVisible",function(b,a){var c=this,d;c.chart.is3d()&&c.data.forEach(function(b){d=(b.visible=b.options.visible=a="undefined"===typeof a?!x(c.visible,b.visible):a)?"visible":"hidden";c.options.data[c.data.indexOf(b)]=b.options;b.graphic&&b.graphic.attr({visibility:d})});b.apply(this,Array.prototype.slice.call(arguments,1))});q(a,"afterInit",function(){if(this.chart.is3d()){var b=this.options,a=b.grouping,c=b.stacking,d=x(this.yAxis.options.reversedStacks,!0),m=0;if("undefined"===typeof a|| a){a=w(this.chart,c);m=b.stack||0;for(c=0;c=k.alpha&&(f.y+=a.shapeArgs.width));f=m([f],e,!0,!1)[0];l.x=f.x-p;l.y=a.outside3dPlot?-9E9:f.y}b.apply(this,[].slice.call(arguments,1))});t(v.prototype, "getStackBox",function(b,a,c,f,l,p,n,t){var e=b.apply(this,[].slice.call(arguments,1));if(a.is3d()&&c.base){var g=+c.base.split(",")[0],h=a.series[g];g=a.options.chart.options3d;h&&h instanceof d.seriesTypes.column&&(h={x:e.x+(a.inverted?n:p/2),y:e.y,z:h.options.depth/2},a.inverted&&(e.width=0,90<=g.alpha&&270>=g.alpha&&(h.y+=p)),h=m([h],a,!0,!1)[0],e.x=h.x-p/2,e.y=h.y)}return e});"";return a});D(a,"Series/Pie3D/Pie3DPoint.js",[a["Core/Series/SeriesRegistry.js"]],function(a){var q=this&&this.__extends|| function(){var a=function(d,q){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,d){a.__proto__=d}||function(a,d){for(var n in d)d.hasOwnProperty(n)&&(a[n]=d[n])};return a(d,q)};return function(d,q){function t(){this.constructor=d}a(d,q);d.prototype=null===q?Object.create(q):(t.prototype=q.prototype,new t)}}();a=a.seriesTypes.pie.prototype.pointClass;var u=a.prototype.haloPath;return function(a){function d(){var d=null!==a&&a.apply(this,arguments)||this;d.series=void 0;return d} q(d,a);d.prototype.haloPath=function(){return this.series.chart.is3d()?[]:u.apply(this,arguments)};return d}(a)});D(a,"Series/Pie3D/Pie3DSeries.js",[a["Core/Globals.js"],a["Series/Pie3D/Pie3DPoint.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,q,u,C){var d=this&&this.__extends||function(){var a=function(d,c){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c])};return a(d,c)}; return function(d,c){function b(){this.constructor=d}a(d,c);d.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}}(),v=a.deg2rad,t=a.svg;a=C.extend;var w=C.pick;u=function(a){function l(){return null!==a&&a.apply(this,arguments)||this}d(l,a);l.prototype.addPoint=function(){a.prototype.addPoint.apply(this,arguments);this.chart.is3d()&&this.update(this.userOptions,!0)};l.prototype.animate=function(c){if(this.chart.is3d()){var b=this.options.animation;var d=this.center;var m=this.group, l=this.markerGroup;t&&(!0===b&&(b={}),c?(m.oldtranslateX=w(m.oldtranslateX,m.translateX),m.oldtranslateY=w(m.oldtranslateY,m.translateY),d={translateX:d[0],translateY:d[1],scaleX:.001,scaleY:.001},m.attr(d),l&&(l.attrSetters=m.attrSetters,l.attr(d))):(d={translateX:m.oldtranslateX,translateY:m.oldtranslateY,scaleX:1,scaleY:1},m.animate(d,b),l&&l.animate(d,b)))}else a.prototype.animate.apply(this,arguments)};l.prototype.drawDataLabels=function(){if(this.chart.is3d()){var c=this.chart.options.chart.options3d; this.data.forEach(function(b){var a=b.shapeArgs,d=a.r,l=(a.start+a.end)/2;b=b.labelPosition;var e=b.connectorPosition,g=-d*(1-Math.cos((a.alpha||c.alpha)*v))*Math.sin(l),n=d*(Math.cos((a.beta||c.beta)*v)-1)*Math.cos(l);[b.natural,e.breakAt,e.touchingSliceAt].forEach(function(b){b.x+=n;b.y+=g})})}a.prototype.drawDataLabels.apply(this,arguments)};l.prototype.pointAttribs=function(c){var b=a.prototype.pointAttribs.apply(this,arguments),d=this.options;this.chart.is3d()&&!this.chart.styledMode&&(b.stroke= d.edgeColor||c.color||this.color,b["stroke-width"]=w(d.edgeWidth,1));return b};l.prototype.translate=function(){a.prototype.translate.apply(this,arguments);if(this.chart.is3d()){var c=this,b=c.options,d=b.depth||0,l=c.chart.options.chart.options3d,n=l.alpha,e=l.beta,g=b.stacking?(b.stack||0)*d:c._i*d;g+=d/2;!1!==b.grouping&&(g=0);c.data.forEach(function(a){var f=a.shapeArgs;a.shapeType="arc3d";f.z=g;f.depth=.75*d;f.alpha=n;f.beta=e;f.center=c.center;f=(f.end+f.start)/2;a.slicedTranslation={translateX:Math.round(Math.cos(f)* b.slicedOffset*Math.cos(n*v)),translateY:Math.round(Math.sin(f)*b.slicedOffset*Math.cos(n*v))}})}};return l}(u.seriesTypes.pie);a(u,{pointClass:q});"";return u});D(a,"Series/Pie3D/Pie3DComposition.js",[a["Series/Pie3D/Pie3DPoint.js"],a["Series/Pie3D/Pie3DSeries.js"],a["Core/Series/SeriesRegistry.js"]],function(a,q,u){u.seriesTypes.pie.prototype.pointClass.prototype.haloPath=a.prototype.haloPath;u.seriesTypes.pie=q});D(a,"Series/Scatter3D/Scatter3DPoint.js",[a["Series/Scatter/ScatterSeries.js"],a["Core/Utilities.js"]], function(a,q){var u=this&&this.__extends||function(){var a=function(d,t){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,d){a.__proto__=d}||function(a,d){for(var l in d)d.hasOwnProperty(l)&&(a[l]=d[l])};return a(d,t)};return function(d,t){function q(){this.constructor=d}a(d,t);d.prototype=null===t?Object.create(t):(q.prototype=t.prototype,new q)}}(),G=q.defined;return function(a){function d(){var d=null!==a&&a.apply(this,arguments)||this;d.options=void 0;d.series=void 0;return d} u(d,a);d.prototype.applyOptions=function(){a.prototype.applyOptions.apply(this,arguments);G(this.z)||(this.z=0);return this};return d}(a.prototype.pointClass)});D(a,"Series/Scatter3D/Scatter3DSeries.js",[a["Extensions/Math3D.js"],a["Series/Scatter3D/Scatter3DPoint.js"],a["Series/Scatter/ScatterSeries.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,q,u,C,d){var v=this&&this.__extends||function(){var a=function(d,c){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&& function(a,c){a.__proto__=c}||function(a,c){for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b])};return a(d,c)};return function(d,c){function b(){this.constructor=d}a(d,c);d.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}}(),t=a.pointCameraDistance;a=d.extend;var w=d.merge;d=function(a){function d(){var c=null!==a&&a.apply(this,arguments)||this;c.data=void 0;c.options=void 0;c.points=void 0;return c}v(d,a);d.prototype.pointAttribs=function(c){var b=a.prototype.pointAttribs.apply(this, arguments);this.chart.is3d()&&c&&(b.zIndex=t(c,this.chart));return b};d.defaultOptions=w(u.defaultOptions,{tooltip:{pointFormat:"x: {point.x}
y: {point.y}
z: {point.z}
"}});return d}(u);a(d.prototype,{axisTypes:["xAxis","yAxis","zAxis"],directTouch:!0,parallelArrays:["x","y","z"],pointArrayMap:["x","y","z"],pointClass:q});C.registerSeriesType("scatter3d",d);"";return d});D(a,"Series/Area3DSeries.js",[a["Extensions/Math3D.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]], function(a,q,u){var C=a.perspective;a=q.seriesTypes;var d=a.line,v=u.pick;u=u.wrap;u(a.area.prototype,"getGraphPath",function(a){var q=a.apply(this,[].slice.call(arguments,1));if(!this.chart.is3d())return q;var n=d.prototype.getGraphPath,l=this.options;var c=[];var b=[],p,m=v(l.connectNulls,"percent"===l.stacking),t=Math.round(this.yAxis.getThreshold(l.threshold));if(this.rawPointsX)for(p=0;pl.beta?l.depth-Math.round(this.zPadding||0):Math.round(this.zPadding||0))})));c.reversed=!0;c=n.call(this,c,!0,!0);c[0]&&"M"===c[0][0]&&(c[0]=["L",c[0][1], c[0][2]]);this.areaPath&&(c=this.areaPath.splice(0,this.areaPath.length/2).concat(c),c.xMap=this.areaPath.xMap,this.areaPath=c,n.call(this,b,!1,m));return q})});D(a,"masters/highcharts-3d.src.js",[],function(){})}); //# sourceMappingURL=highcharts-3d.js.map