/* Highcharts JS v8.0.0 (2019-12-10) 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(A){r(A);r.Highcharts=A;return r}):r("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(r){function A(b,l,z,r){b.hasOwnProperty(l)||(b[l]=r.apply(null,z))}r=r?r._modules:{};A(r,"parts-3d/Math.js",[r["parts/Globals.js"],r["parts/Utilities.js"]],function(b,l){var z=l.pick,r=b.deg2rad;b.perspective3D=function(b, l,v){l=0C&&d-C>Math.PI/2+.0001?(n=n.concat(r(a,c,f,F,C,C+Math.PI/2,m,b)),n=n.concat(r(a,c,f,F,C+Math.PI/2,d,m,b))):dMath.PI/2+.0001?(n=n.concat(r(a,c,f,F,C,C-Math.PI/2,m,b)),n=n.concat(r(a,c,f,F,C-Math.PI/2,d,m,b))):["C",a+f*Math.cos(C)-f*e*G*Math.sin(C)+m,c+F*Math.sin(C)+F*e*G*Math.cos(C)+b,a+f* Math.cos(d)+f*e*G*Math.sin(d)+m,c+F*Math.sin(d)-F*e*G*Math.cos(d)+b,a+f*Math.cos(d)+m,c+F*Math.sin(d)+b]}var u=l.animObject,q=l.defined,x=l.extend,v=l.objectEach,h=l.pick,w=Math.cos,y=Math.PI,B=Math.sin,p=b.charts,a=b.color,d=b.deg2rad,k=b.merge,g=b.perspective,c=b.SVGElement;l=b.SVGRenderer;var e=4*(Math.sqrt(2)-1)/3/(y/2);l.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};l.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};l.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&&(q(a.enabled)||q(a.vertexes)||q(a.insidePlotArea))){this.enabled=h(a.enabled,this.enabled);this.vertexes=h(a.vertexes,this.vertexes);this.insidePlotArea=h(a.insidePlotArea,this.insidePlotArea);delete a.enabled;delete a.vertexes;delete a.insidePlotArea;var f=g(this.vertexes, p[e.chartIndex],this.insidePlotArea),n=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 w=h([3,2,1,0],[7,6,5,4]);a=w[0];n=w[1];w=h([1,6,7,0],[4,5,2,3]);m=w[0];t=w[1];w=h([1,2,5,6],[0,7,4,3]);h=w[0];w=w[1];1===w?B+=1E4*(1E3-f):w||(B+=1E4*f);B+=10*(!t||0<=l&&180>=l||360>l&&357.5Math.PI&&(a=2*Math.PI-a);return a}var c=a.x,d=a.y,m=a.start,b=a.end-.00001,n=a.r,t=a.innerR||0,p=a.depth||0,g=a.alpha,k=a.beta,l=Math.cos(m),q=Math.sin(m);a=Math.cos(b);var h=Math.sin(b),v=n*Math.cos(k);n*=Math.cos(g);var x=t*Math.cos(k),u=t*Math.cos(g);t=p*Math.sin(k);var z=p*Math.sin(g);p=["M",c+v*l,d+n*q];p=p.concat(r(c,d,v,n,m,b,0,0));p=p.concat(["L",c+x*a,d+u*h]);p=p.concat(r(c,d,x,u,b,m,0,0));p=p.concat(["Z"]); var A=0-A?m:b>-A?-A:m;var D=bE&&my-k&&mm&&(f=Math.min(f,1-Math.abs((a+c)/(m+c))%1));dn&&(f=0>n?Math.min(f,(k+e)/(-n+k+e)):Math.min(f,1-(k+e)/(n+e)%1));ga?-1:0},t=m([{x:d,y:c,z:e},{x:k,y:c,z:e},{x:k,y:c,z:0},{x:d,y:c,z:0}]),n=m([{x:d,y:g,z:0},{x:k,y:g,z:0},{x:k,y:g,z:e},{x:d,y:g,z:e}]),l=m([{x:d,y:g,z:0},{x:d,y:g,z:e},{x:d,y:c,z:e},{x:d,y:c,z:0}]),f=m([{x:k,y:g,z:e}, {x:k,y:g,z:0},{x:k,y:c,z:0},{x:k,y:c,z:e}]),v=m([{x:d,y:c,z:0},{x:k,y:c,z:0},{x:k,y:g,z:0},{x:d,y:g,z:0}]);m=m([{x:d,y:g,z:e},{x:k,y:g,z:e},{x:k,y:c,z:e},{x:d,y:c,z:e}]);var r=!1,x=!1,y=!1,u=!1;[].concat(h.xAxis,h.yAxis,h.zAxis).forEach(function(a){a&&(a.horiz?a.opposite?x=!0:r=!0:a.opposite?u=!0:y=!0)});var z=function(a,c,e){for(var f=["size","color","visible"],d={},b=0;be*f[d][c]?d=b:e*f[b][c]===e*f[d][c]&&f[b].zthis.pos&&(u(this.start)||u(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)};""});A(r,"parts-3d/Axis.js",[r["parts/Globals.js"],r["parts/Utilities.js"]],function(b,l){function r(a,e,b){if(!a.chart.is3d()||"colorAxis"===a.coll)return e;var c=a.chart,m=y*c.options.chart.options3d.alpha,g=y*c.options.chart.options3d.beta,f=q(b&&a.options.title.position3d,a.options.labels.position3d);b=q(b&&a.options.title.skew3d,a.options.labels.skew3d); var h=c.frame3d,k=c.plotLeft,l=c.plotWidth+k,w=c.plotTop,v=c.plotHeight+w;c=!1;var r=0,x=0,u={x:0,y:1,z:0};e=a.swapZ({x:e.x,y:e.y,z:0});if(a.isZAxis)if(a.opposite){if(null===h.axes.z.top)return{};x=e.y-w;e.x=h.axes.z.top.x;e.y=h.axes.z.top.y;k=h.axes.z.top.xDir;c=!h.top.frontFacing}else{if(null===h.axes.z.bottom)return{};x=e.y-v;e.x=h.axes.z.bottom.x;e.y=h.axes.z.bottom.y;k=h.axes.z.bottom.xDir;c=!h.bottom.frontFacing}else if(a.horiz)if(a.opposite){if(null===h.axes.x.top)return{};x=e.y-w;e.y=h.axes.x.top.y; e.z=h.axes.x.top.z;k=h.axes.x.top.xDir;c=!h.top.frontFacing}else{if(null===h.axes.x.bottom)return{};x=e.y-v;e.y=h.axes.x.bottom.y;e.z=h.axes.x.bottom.z;k=h.axes.x.bottom.xDir;c=!h.bottom.frontFacing}else if(a.opposite){if(null===h.axes.y.right)return{};r=e.x-l;e.x=h.axes.y.right.x;e.z=h.axes.y.right.z;k=h.axes.y.right.xDir;k={x:k.z,y:k.y,z:-k.x}}else{if(null===h.axes.y.left)return{};r=e.x-k;e.x=h.axes.y.left.x;e.z=h.axes.y.left.z;k=h.axes.y.left.xDir}"chart"!==f&&("flap"===f?a.horiz?(g=Math.sin(m), m=Math.cos(m),a.opposite&&(g=-g),c&&(g=-g),u={x:k.z*g,y:m,z:-k.x*g}):k={x:Math.cos(g),y:0,z:Math.sin(g)}:"ortho"===f?a.horiz?(u=Math.cos(m),f=Math.sin(g)*u,m=-Math.sin(m),g=-u*Math.cos(g),u={x:k.y*g-k.z*m,y:k.z*f-k.x*g,z:k.x*m-k.y*f},m=1/Math.sqrt(u.x*u.x+u.y*u.y+u.z*u.z),c&&(m=-m),u={x:m*u.x,y:m*u.y,z:m*u.z}):k={x:Math.cos(g),y:0,z:Math.sin(g)}:a.horiz?u={x:Math.sin(g)*Math.sin(m),y:Math.cos(m),z:-Math.cos(g)*Math.sin(m)}:k={x:Math.cos(g),y:0,z:Math.sin(g)});e.x+=r*k.x+x*u.x;e.y+=r*k.y+x*u.y;e.z+= r*k.z+x*u.z;c=p([e],a.chart)[0];b&&(0>d(p([e,{x:e.x+k.x,y:e.y+k.y,z:e.z+k.z},{x:e.x+u.x,y:e.y+u.y,z:e.z+u.z}],a.chart))&&(k={x:-k.x,y:-k.y,z:-k.z}),a=p([{x:e.x,y:e.y,z:e.z},{x:e.x+k.x,y:e.y+k.y,z:e.z+k.z},{x:e.x+u.x,y:e.y+u.y,z:e.z+u.z}],a.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}var u=l.extend,q=l.pick,x=l.splat;l=l.wrap;var v=b.addEvent,h=b.Axis,w=b.Chart, y=b.deg2rad,B=b.merge,p=b.perspective,a=b.perspective3D,d=b.shapeArea,k=b.Tick;B(!0,h.prototype.defaultOptions,{labels:{position3d:"offset",skew3d:!1},title:{position3d:null,skew3d:null}});v(h,"afterSetOptions",function(){if(this.chart.is3d&&this.chart.is3d()&&"colorAxis"!==this.coll){var a=this.options;a.tickWidth=q(a.tickWidth,0);a.gridLineWidth=q(a.gridLineWidth,1)}});l(h.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 d=this.chart,b=d.options.chart.options3d;b=this.isZAxis?d.plotWidth:b.depth;d=d.frame3d;c=[this.swapZ({x:c[1],y:c[2],z:0}),this.swapZ({x:c[1],y:c[2],z:b}),this.swapZ({x:c[4],y:c[5],z:0}),this.swapZ({x:c[4],y:c[5],z:b})];b=[];this.horiz?(this.isZAxis?(d.left.visible&&b.push(c[0],c[2]),d.right.visible&&b.push(c[1],c[3])):(d.front.visible&&b.push(c[0],c[2]),d.back.visible&&b.push(c[1],c[3])),d.top.visible&&b.push(c[0],c[1]),d.bottom.visible&&b.push(c[2],c[3])):(d.front.visible&& b.push(c[0],c[2]),d.back.visible&&b.push(c[1],c[3]),d.left.visible&&b.push(c[0],c[1]),d.right.visible&&b.push(c[2],c[3]));b=p(b,this.chart,!1);return this.chart.renderer.toLineSegments(b)});l(h.prototype,"getLinePath",function(a){return this.chart.is3d()&&"colorAxis"!==this.coll?[]:a.apply(this,[].slice.call(arguments,1))});l(h.prototype,"getPlotBandPath",function(a){if(!this.chart.is3d()||"colorAxis"===this.coll)return a.apply(this,[].slice.call(arguments,1));var c=arguments,d=c[2],b=[];c=this.getPlotLinePath({value:c[1]}); d=this.getPlotLinePath({value:d});if(c&&d)for(var g=0;g=l.min&&y<=l.max:!1}else w.plotZ=0;w.axisXpos=w.plotX;w.axisYpos=w.plotY;w.axisZpos=w.plotZ;v.push({x:w.plotX,y:w.plotY,z:w.plotZ})}b=u(v,b,!0);for(h=0;hn&&(e[a[1]]+=e[a[0]]+ c,e[a[0]]=-c,n=0);n+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=g;e.depth=k;e.insidePlotArea=!0;l=h([{x:l[0],y:l[1],z:g}],a,!0)[0];d.tooltipPos=[l.x,l.y]}});b.z=g};l(y.column.prototype,"animate",function(b){if(this.chart.is3d()){var a=arguments[1],d=this.yAxis,k=this,g=this.yAxis.reversed;B&&(a?k.data.forEach(function(a){null!== a.y&&(a.height=a.shapeArgs.height,a.shapey=a.shapeArgs.y,a.shapeArgs.height=1,g||(a.shapeArgs.y=a.stackY?a.plotY+d.translate(a.stackY):a.plotY+(a.negative?-a.height:a.height)))}):(k.data.forEach(function(a){null!==a.y&&(a.shapeArgs.height=a.height,a.shapeArgs.y=a.shapey,a.graphic&&a.graphic.animate(a.shapeArgs,k.options.animation))}),this.drawDataLabels(),k.animate=null))}else b.apply(this,[].slice.call(arguments,1))});l(y.column.prototype,"plotGroup",function(b,a,d,k,g,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))});l(y.column.prototype,"setVisible",function(b,a){var d=this,k;d.chart.is3d()&&d.data.forEach(function(b){k=(b.visible=b.options.visible=a="undefined"=== typeof a?!x(d.visible,b.visible):a)?"visible":"hidden";d.options.data[d.data.indexOf(b)]=b.options;b.graphic&&b.graphic.attr({visibility:k})});b.apply(this,Array.prototype.slice.call(arguments,1))});y.column.prototype.handle3dGrouping=!0;v(w,"afterInit",function(){if(this.chart.is3d()&&this.handle3dGrouping){var b=this.options,a=b.grouping,d=b.stacking,k=x(this.yAxis.options.reversedStacks,!0),g=0;if("undefined"===typeof a||a){a=this.chart.retrieveStacks(d);g=b.stack||0;for(d=0;d{point.x}
y: {point.y}
z: {point.z}
"}},{pointAttribs:function(l){var q=u.scatter.prototype.pointAttribs.apply(this,arguments);this.chart.is3d()&&l&&(q.zIndex=b.pointCameraDistance(l,this.chart));return q},axisTypes:["xAxis", "yAxis","zAxis"],pointArrayMap:["x","y","z"],parallelArrays:["x","y","z"],directTouch:!0},{applyOptions:function(){l.prototype.applyOptions.apply(this,arguments);"undefined"===typeof this.z&&(this.z=0);return this}});""});A(r,"parts-3d/VMLRenderer.js",[r["parts/Globals.js"]],function(b){var l=b.addEvent,r=b.Axis,u=b.SVGRenderer,q=b.VMLRenderer;q&&(b.setOptions({animate:!1}),q.prototype.face3d=u.prototype.face3d,q.prototype.polyhedron=u.prototype.polyhedron,q.prototype.elements3d=u.prototype.elements3d, q.prototype.element3d=u.prototype.element3d,q.prototype.cuboid=u.prototype.cuboid,q.prototype.cuboidPath=u.prototype.cuboidPath,q.prototype.toLinePath=u.prototype.toLinePath,q.prototype.toLineSegments=u.prototype.toLineSegments,q.prototype.arc3d=function(b){b=u.prototype.arc3d.call(this,b);b.css({zIndex:b.zIndex});return b},b.VMLRenderer.prototype.arc3dPath=b.SVGRenderer.prototype.arc3dPath,l(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}))}))});A(r,"masters/highcharts-3d.src.js",[],function(){})}); //# sourceMappingURL=highcharts-3d.js.map