/* Highcharts JS v7.2.1 (2019-10-31) 3D features for Highcharts JS License: www.highcharts.com/license */ (function(r){"object"===typeof module&&module.exports?(r["default"]=r,module.exports=r):"function"===typeof define&&define.amd?define("highcharts/highcharts-3d",["highcharts"],function(B){r(B);r.Highcharts=B;return r}):r("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(r){function B(b,m,z,t){b.hasOwnProperty(m)||(b[m]=t.apply(null,z))}r=r?r._modules:{};B(r,"parts-3d/Math.js",[r["parts/Globals.js"],r["parts/Utilities.js"]],function(b,m){var z=m.pick,t=b.deg2rad;b.perspective3D=function(b, g,n){g=0C&&d-C>Math.PI/2+.0001?(p=p.concat(z(a,c,f,F,C,C+Math.PI/2,b,l)),p=p.concat(z(a,c,f,F,C+Math.PI/2,d,b,l))):dMath.PI/2+.0001?(p=p.concat(z(a,c,f,F,C,C-Math.PI/2,b,l)),p=p.concat(z(a,c,f,F,C-Math.PI/2,d,b,l))):["C",a+f*Math.cos(C)-f*e*G*Math.sin(C)+b,c+F*Math.sin(C)+F*e*G*Math.cos(C)+l,a+f* Math.cos(d)+f*e*G*Math.sin(d)+b,c+F*Math.sin(d)-F*e*G*Math.cos(d)+l,a+f*Math.cos(d)+b,c+F*Math.sin(d)+l]}var t=m.defined,x=m.extend,g=m.objectEach,n=m.pick,y=Math.cos,u=Math.PI,r=Math.sin,w=b.animObject,h=b.charts,a=b.color,d=b.deg2rad,k=b.merge,q=b.perspective,c=b.SVGElement;m=b.SVGRenderer;var e=4*(Math.sqrt(2)-1)/3/(u/2);m.prototype.toLinePath=function(a,c){var f=[];a.forEach(function(a){f.push("L",a.x,a.y)});a.length&&(f[0]="M",c&&f.push("Z"));return f};m.prototype.toLineSegments=function(a){var c= [],f=!0;a.forEach(function(a){c.push(f?"M":"L",a.x,a.y);f=!f});return c};m.prototype.face3d=function(a){var e=this,f=this.createElement("path");f.vertexes=[];f.insidePlotArea=!1;f.enabled=!0;f.attr=function(a){if("object"===typeof a&&(t(a.enabled)||t(a.vertexes)||t(a.insidePlotArea))){this.enabled=n(a.enabled,this.enabled);this.vertexes=n(a.vertexes,this.vertexes);this.insidePlotArea=n(a.insidePlotArea,this.insidePlotArea);delete a.enabled;delete a.vertexes;delete a.insidePlotArea;var f=q(this.vertexes, h[e.chartIndex],this.insidePlotArea),p=e.toLinePath(f,!0);f=b.shapeArea(f);f=this.enabled&&0 a.faces.length;)f.faces.pop().destroy();for(;f.faces.lengtha.faces.length;)f.faces.pop().destroy();for(;f.faces.lengthb.shapeArea(a)?e=[a,0]:0>b.shapeArea(f)&&(e=[f,1]);return e};var m=u([3,2,1,0],[7,6,5,4]);a=m[0];p=m[1];m=u([1,6,7,0],[4,5,2,3]);l=m[0];k=m[1];m=u([1,2,5,6],[0,7,4,3]);u=m[0];m=m[1];1===m?g+=1E4*(1E3-f):m||(g+=1E4*f);g+=10*(!k||0<=w&&180>=w||360>w&&357.5Math.PI&&(a=2*Math.PI-a);return a}var c=a.x,d=a.y,b=a.start,l=a.end-.00001,k=a.r,p=a.innerR||0,v=a.depth||0,h=a.alpha,q=a.beta,w=Math.cos(b),g=Math.sin(b);a=Math.cos(l);var m=Math.sin(l),n=k*Math.cos(q);k*=Math.cos(h);var x=p*Math.cos(q),t=p*Math.cos(h);p=v*Math.sin(q);var A=v*Math.sin(h);v=["M",c+n*w,d+k*g];v=v.concat(z(c,d,n,k,b,l,0,0));v=v.concat(["L",c+x*a,d+t*m]);v=v.concat(z(c,d,x,t,l,b,0,0));v=v.concat(["Z"]); var B=0-B?b:l>-B?-B:b;var D=lE&&bu-q&&bl&&(f=Math.min(f,1-Math.abs((a+c)/(l+c))%1));dp&&(f=0>p?Math.min(f,(k+e)/(-p+k+e)):Math.min(f,1-(k+e)/(p+e)%1));qa?-1:0},v=l([{x:d,y:c,z:e},{x:k,y:c,z:e},{x:k,y:c,z:0},{x:d,y:c,z:0}]),p=l([{x:d,y:q,z:0},{x:k,y:q,z:0},{x:k,y:q,z:e},{x:d,y:q,z:e}]),n=l([{x:d,y:q,z:0},{x:d,y:q,z:e},{x:d,y:c,z:e},{x:d,y:c,z:0}]),f=l([{x:k,y:q,z:e}, {x:k,y:q,z:0},{x:k,y:c,z:0},{x:k,y:c,z:e}]),m=l([{x:d,y:c,z:0},{x:k,y:c,z:0},{x:k,y:q,z:0},{x:d,y:q,z:0}]);l=l([{x:d,y:q,z:e},{x:k,y:q,z:e},{x:k,y:c,z:e},{x:d,y:c,z:e}]);var u=!1,t=!1,r=!1,A=!1;[].concat(g.xAxis,g.yAxis,g.zAxis).forEach(function(a){a&&(a.horiz?a.opposite?t=!0:u=!0:a.opposite?A=!0:r=!0)});var z=function(a,c,e){for(var d=["size","color","visible"],f={},b=0;be*d[f][c]?f=b:e*d[b][c]===e*d[f][c]&&d[b].zthis.pos&&(t(this.start)||t(this.end))){var b=this.start|| [1,0,0,1,0,0],h=this.end||[1,0,0,1,0,0];var a=[];for(var d=0;6>d;d++)a.push(this.pos*h[d]+(1-this.pos)*b[d])}else a=this.end;this.elem.attr(this.prop,a,null,!0)};""});B(r,"parts-3d/Axis.js",[r["parts/Globals.js"],r["parts/Utilities.js"]],function(b,m){function r(c,e,d){if(!c.chart.is3d()||"colorAxis"===c.coll)return e;var b=c.chart,l=u*b.options.chart.options3d.alpha,k=u*b.options.chart.options3d.beta,f=x(d&&c.options.title.position3d,c.options.labels.position3d);d=x(d&&c.options.title.skew3d,c.options.labels.skew3d); var h=b.frame3d,g=b.plotLeft,q=b.plotWidth+g,n=b.plotTop,m=b.plotHeight+n;b=!1;var t=0,r=0,y={x:0,y:1,z:0};e=c.swapZ({x:e.x,y:e.y,z:0});if(c.isZAxis)if(c.opposite){if(null===h.axes.z.top)return{};r=e.y-n;e.x=h.axes.z.top.x;e.y=h.axes.z.top.y;g=h.axes.z.top.xDir;b=!h.top.frontFacing}else{if(null===h.axes.z.bottom)return{};r=e.y-m;e.x=h.axes.z.bottom.x;e.y=h.axes.z.bottom.y;g=h.axes.z.bottom.xDir;b=!h.bottom.frontFacing}else if(c.horiz)if(c.opposite){if(null===h.axes.x.top)return{};r=e.y-n;e.y=h.axes.x.top.y; e.z=h.axes.x.top.z;g=h.axes.x.top.xDir;b=!h.top.frontFacing}else{if(null===h.axes.x.bottom)return{};r=e.y-m;e.y=h.axes.x.bottom.y;e.z=h.axes.x.bottom.z;g=h.axes.x.bottom.xDir;b=!h.bottom.frontFacing}else if(c.opposite){if(null===h.axes.y.right)return{};t=e.x-q;e.x=h.axes.y.right.x;e.z=h.axes.y.right.z;g=h.axes.y.right.xDir;g={x:g.z,y:g.y,z:-g.x}}else{if(null===h.axes.y.left)return{};t=e.x-g;e.x=h.axes.y.left.x;e.z=h.axes.y.left.z;g=h.axes.y.left.xDir}"chart"!==f&&("flap"===f?c.horiz?(k=Math.sin(l), l=Math.cos(l),c.opposite&&(k=-k),b&&(k=-k),y={x:g.z*k,y:l,z:-g.x*k}):g={x:Math.cos(k),y:0,z:Math.sin(k)}:"ortho"===f?c.horiz?(y=Math.cos(l),f=Math.sin(k)*y,l=-Math.sin(l),k=-y*Math.cos(k),y={x:g.y*k-g.z*l,y:g.z*f-g.x*k,z:g.x*l-g.y*f},l=1/Math.sqrt(y.x*y.x+y.y*y.y+y.z*y.z),b&&(l=-l),y={x:l*y.x,y:l*y.y,z:l*y.z}):g={x:Math.cos(k),y:0,z:Math.sin(k)}:c.horiz?y={x:Math.sin(k)*Math.sin(l),y:Math.cos(l),z:-Math.cos(k)*Math.sin(l)}:g={x:Math.cos(k),y:0,z:Math.sin(k)});e.x+=t*g.x+r*y.x;e.y+=t*g.y+r*y.y;e.z+= t*g.z+r*y.z;b=w([e],c.chart)[0];d&&(0>a(w([e,{x:e.x+g.x,y:e.y+g.y,z:e.z+g.z},{x:e.x+y.x,y:e.y+y.y,z:e.z+y.z}],c.chart))&&(g={x:-g.x,y:-g.y,z:-g.z}),c=w([{x:e.x,y:e.y,z:e.z},{x:e.x+g.x,y:e.y+g.y,z:e.z+g.z},{x:e.x+y.x,y:e.y+y.y,z:e.z+y.z}],c.chart),b.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,b.x,b.y],b.matrix[4]-=b.x*b.matrix[0]+b.y*b.matrix[2],b.matrix[5]-=b.x*b.matrix[1]+b.y*b.matrix[3]);return b}var t=m.extend,x=m.pick,g=m.splat;m=b.addEvent;var n=b.Axis,y=b.Chart,u=b.deg2rad, A=b.merge,w=b.perspective,h=b.perspective3D,a=b.shapeArea,d=b.Tick,k=b.wrap;A(!0,n.prototype.defaultOptions,{labels:{position3d:"offset",skew3d:!1},title:{position3d:null,skew3d:null}});m(n,"afterSetOptions",function(){if(this.chart.is3d&&this.chart.is3d()&&"colorAxis"!==this.coll){var a=this.options;a.tickWidth=x(a.tickWidth,0);a.gridLineWidth=x(a.gridLineWidth,1)}});k(n.prototype,"getPlotLinePath",function(a){var c=a.apply(this,[].slice.call(arguments,1));if(!this.chart.is3d()||"colorAxis"===this.coll|| null===c)return c;var b=this.chart,d=b.options.chart.options3d;d=this.isZAxis?b.plotWidth:d.depth;b=b.frame3d;c=[this.swapZ({x:c[1],y:c[2],z:0}),this.swapZ({x:c[1],y:c[2],z:d}),this.swapZ({x:c[4],y:c[5],z:0}),this.swapZ({x:c[4],y:c[5],z:d})];d=[];this.horiz?(this.isZAxis?(b.left.visible&&d.push(c[0],c[2]),b.right.visible&&d.push(c[1],c[3])):(b.front.visible&&d.push(c[0],c[2]),b.back.visible&&d.push(c[1],c[3])),b.top.visible&&d.push(c[0],c[1]),b.bottom.visible&&d.push(c[2],c[3])):(b.front.visible&& d.push(c[0],c[2]),b.back.visible&&d.push(c[1],c[3]),b.left.visible&&d.push(c[0],c[1]),b.right.visible&&d.push(c[2],c[3]));d=w(d,this.chart,!1);return this.chart.renderer.toLineSegments(d)});k(n.prototype,"getLinePath",function(a){return this.chart.is3d()&&"colorAxis"!==this.coll?[]:a.apply(this,[].slice.call(arguments,1))});k(n.prototype,"getPlotBandPath",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 h=0;h=g.min&&A<=g.max:!1}else u.plotZ=0;u.axisXpos=u.plotX;u.axisYpos=u.plotY;u.axisZpos=u.plotZ;n.push({x:u.plotX,y:u.plotY,z:u.plotZ})}b=t(n,b,!0);for(m=0;mk&&(e[a[1]]+=e[a[0]]+c,e[a[0]]=-c,k=0);k+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]]<=c)){for(var f in e)e[f]=0;d.outside3dPlot=!0}});"rect"===d.shapeType&&(d.shapeType="cuboid");e.z=q;e.depth=g;e.insidePlotArea=!0;h=n([{x:h[0],y:h[1],z:q}],a,!0)[0];d.tooltipPos=[h.x,h.y]}});b.z=q};w(u.column.prototype,"animate",function(b){if(this.chart.is3d()){var a=arguments[1],d=this.yAxis,g=this,h=this.yAxis.reversed;A&&(a?g.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+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(),g.animate=null))}else b.apply(this,[].slice.call(arguments,1))});w(u.column.prototype,"plotGroup",function(b,a,d,g,q,c){"dataLabelsGroup"!==a&&this.chart.is3d()&&(this[a]&&delete this[a],c&&(this.chart.columnGroup||(this.chart.columnGroup=this.chart.renderer.g("columnGroup").add(c)), 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))});w(u.column.prototype,"setVisible",function(b,a){var d=this,h;d.chart.is3d()&&d.data.forEach(function(b){h=(b.visible=b.options.visible=a=void 0===a?!g(d.visible,b.visible):a)?"visible":"hidden";d.options.data[d.data.indexOf(b)]=b.options;b.graphic&&b.graphic.attr({visibility:h})}); b.apply(this,Array.prototype.slice.call(arguments,1))});u.column.prototype.handle3dGrouping=!0;m(y,"afterInit",function(){if(this.chart.is3d()&&this.handle3dGrouping){var b=this.options,a=b.grouping,d=b.stacking,k=g(this.yAxis.options.reversedStacks,!0),n=0;if(void 0===a||a){a=this.chart.retrieveStacks(d);n=b.stack||0;for(d=0;d{point.x}
y: {point.y}
z: {point.z}
"}},{pointAttribs:function(m){var g=t.scatter.prototype.pointAttribs.apply(this,arguments);this.chart.is3d()&&m&&(g.zIndex=b.pointCameraDistance(m,this.chart));return g},axisTypes:["xAxis","yAxis","zAxis"],pointArrayMap:["x","y","z"],parallelArrays:["x","y","z"],directTouch:!0},{applyOptions:function(){m.prototype.applyOptions.apply(this, arguments);void 0===this.z&&(this.z=0);return this}});""});B(r,"parts-3d/VMLRenderer.js",[r["parts/Globals.js"]],function(b){var m=b.addEvent,r=b.Axis,t=b.SVGRenderer,x=b.VMLRenderer;x&&(b.setOptions({animate:!1}),x.prototype.face3d=t.prototype.face3d,x.prototype.polyhedron=t.prototype.polyhedron,x.prototype.elements3d=t.prototype.elements3d,x.prototype.element3d=t.prototype.element3d,x.prototype.cuboid=t.prototype.cuboid,x.prototype.cuboidPath=t.prototype.cuboidPath,x.prototype.toLinePath=t.prototype.toLinePath, x.prototype.toLineSegments=t.prototype.toLineSegments,x.prototype.arc3d=function(b){b=t.prototype.arc3d.call(this,b);b.css({zIndex:b.zIndex});return b},b.VMLRenderer.prototype.arc3dPath=b.SVGRenderer.prototype.arc3dPath,m(r,"render",function(){this.sideFrame&&(this.sideFrame.css({zIndex:0}),this.sideFrame.front.attr({fill:this.sideFrame.color}));this.bottomFrame&&(this.bottomFrame.css({zIndex:1}),this.bottomFrame.front.attr({fill:this.bottomFrame.color}));this.backFrame&&(this.backFrame.css({zIndex:0}), this.backFrame.front.attr({fill:this.backFrame.color}))}))});B(r,"masters/highcharts-3d.src.js",[],function(){})}); //# sourceMappingURL=highcharts-3d.js.map