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