highcharts-3d.js 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344
  1. /*
  2. Highcharts JS v7.0.2 (2019-01-17)
  3. 3D features for Highcharts JS
  4. @license: www.highcharts.com/license
  5. */
  6. (function (z) {
  7. "object" === typeof module && module.exports ? (z["default"] = z, module.exports = z) : "function" === typeof define && define.amd ? define(function () {
  8. return z
  9. }) : z("undefined" !== typeof Highcharts ? Highcharts : void 0)
  10. })(function (z) {
  11. (function (b) {
  12. var x = b.deg2rad, y = b.pick;
  13. b.perspective3D = function (b, t, u) {
  14. t = 0 < u && u < Number.POSITIVE_INFINITY ? u / (b.z + t.z + u) : 1;
  15. return {x: b.x * t, y: b.y * t}
  16. };
  17. b.perspective = function (r, t, u) {
  18. var q = t.options.chart.options3d, h = u ? t.inverted : !1, v = {
  19. x: t.plotWidth / 2, y: t.plotHeight / 2, z: q.depth / 2, vd: y(q.depth,
  20. 1) * y(q.viewDistance, 0)
  21. }, w = t.scale3d || 1, g = x * q.beta * (h ? -1 : 1), q = x * q.alpha * (h ? -1 : 1), a = Math.cos(q),
  22. k = Math.cos(-g), n = Math.sin(q), l = Math.sin(-g);
  23. u || (v.x += t.plotLeft, v.y += t.plotTop);
  24. return r.map(function (g) {
  25. var c;
  26. c = (h ? g.y : g.x) - v.x;
  27. var e = (h ? g.x : g.y) - v.y;
  28. g = (g.z || 0) - v.z;
  29. c = {x: k * c - l * g, y: -n * l * c + a * e - k * n * g, z: a * l * c + n * e + a * k * g};
  30. e = b.perspective3D(c, v, v.vd);
  31. e.x = e.x * w + v.x;
  32. e.y = e.y * w + v.y;
  33. e.z = c.z * w + v.z;
  34. return {x: h ? e.y : e.x, y: h ? e.x : e.y, z: e.z}
  35. })
  36. };
  37. b.pointCameraDistance = function (b, t) {
  38. var u = t.options.chart.options3d, q = t.plotWidth /
  39. 2;
  40. t = t.plotHeight / 2;
  41. u = y(u.depth, 1) * y(u.viewDistance, 0) + u.depth;
  42. return Math.sqrt(Math.pow(q - b.plotX, 2) + Math.pow(t - b.plotY, 2) + Math.pow(u - b.plotZ, 2))
  43. };
  44. b.shapeArea = function (b) {
  45. var t = 0, u, q;
  46. for (u = 0; u < b.length; u++) q = (u + 1) % b.length, t += b[u].x * b[q].y - b[q].x * b[u].y;
  47. return t / 2
  48. };
  49. b.shapeArea3d = function (r, t, u) {
  50. return b.shapeArea(b.perspective(r, t, u))
  51. }
  52. })(z);
  53. (function (b) {
  54. function x(a, e, d, b, B, A, l, g) {
  55. var f = [], F = A - B;
  56. return A > B && A - B > Math.PI / 2 + .0001 ? (f = f.concat(x(a, e, d, b, B, B + Math.PI / 2, l, g)), f = f.concat(x(a, e, d, b, B + Math.PI /
  57. 2, A, l, g))) : A < B && B - A > Math.PI / 2 + .0001 ? (f = f.concat(x(a, e, d, b, B, B - Math.PI / 2, l, g)), f = f.concat(x(a, e, d, b, B - Math.PI / 2, A, l, g))) : ["C", a + d * Math.cos(B) - d * c * F * Math.sin(B) + l, e + b * Math.sin(B) + b * c * F * Math.cos(B) + g, a + d * Math.cos(A) + d * c * F * Math.sin(A) + l, e + b * Math.sin(A) - b * c * F * Math.cos(A) + g, a + d * Math.cos(A) + l, e + b * Math.sin(A) + g]
  58. }
  59. var y = Math.cos, r = Math.PI, t = Math.sin, u = b.animObject, q = b.charts, h = b.color, v = b.defined,
  60. w = b.deg2rad, g = b.extend, a = b.merge, k = b.perspective, n = b.pick, l = b.SVGElement,
  61. p = b.SVGRenderer, c, e, m;
  62. c = 4 * (Math.sqrt(2) -
  63. 1) / 3 / (r / 2);
  64. p.prototype.toLinePath = function (a, e) {
  65. var d = [];
  66. a.forEach(function (a) {
  67. d.push("L", a.x, a.y)
  68. });
  69. a.length && (d[0] = "M", e && d.push("Z"));
  70. return d
  71. };
  72. p.prototype.toLineSegments = function (a) {
  73. var f = [], d = !0;
  74. a.forEach(function (a) {
  75. f.push(d ? "M" : "L", a.x, a.y);
  76. d = !d
  77. });
  78. return f
  79. };
  80. p.prototype.face3d = function (a) {
  81. var f = this, d = this.createElement("path");
  82. d.vertexes = [];
  83. d.insidePlotArea = !1;
  84. d.enabled = !0;
  85. d.attr = function (a) {
  86. if ("object" === typeof a && (v(a.enabled) || v(a.vertexes) || v(a.insidePlotArea))) {
  87. this.enabled = n(a.enabled,
  88. this.enabled);
  89. this.vertexes = n(a.vertexes, this.vertexes);
  90. this.insidePlotArea = n(a.insidePlotArea, this.insidePlotArea);
  91. delete a.enabled;
  92. delete a.vertexes;
  93. delete a.insidePlotArea;
  94. var d = k(this.vertexes, q[f.chartIndex], this.insidePlotArea), e = f.toLinePath(d, !0),
  95. d = b.shapeArea(d), d = this.enabled && 0 < d ? "visible" : "hidden";
  96. a.d = e;
  97. a.visibility = d
  98. }
  99. return l.prototype.attr.apply(this, arguments)
  100. };
  101. d.animate = function (a) {
  102. if ("object" === typeof a && (v(a.enabled) || v(a.vertexes) || v(a.insidePlotArea))) {
  103. this.enabled = n(a.enabled,
  104. this.enabled);
  105. this.vertexes = n(a.vertexes, this.vertexes);
  106. this.insidePlotArea = n(a.insidePlotArea, this.insidePlotArea);
  107. delete a.enabled;
  108. delete a.vertexes;
  109. delete a.insidePlotArea;
  110. var d = k(this.vertexes, q[f.chartIndex], this.insidePlotArea), e = f.toLinePath(d, !0),
  111. d = b.shapeArea(d), d = this.enabled && 0 < d ? "visible" : "hidden";
  112. a.d = e;
  113. this.attr("visibility", d)
  114. }
  115. return l.prototype.animate.apply(this, arguments)
  116. };
  117. return d.attr(a)
  118. };
  119. p.prototype.polyhedron = function (a) {
  120. var f = this, d = this.g(), e = d.destroy;
  121. this.styledMode || d.attr({"stroke-linejoin": "round"});
  122. d.faces = [];
  123. d.destroy = function () {
  124. for (var a = 0; a < d.faces.length; a++) d.faces[a].destroy();
  125. return e.call(this)
  126. };
  127. d.attr = function (a, e, c, b) {
  128. if ("object" === typeof a && v(a.faces)) {
  129. for (; d.faces.length > a.faces.length;) d.faces.pop().destroy();
  130. for (; d.faces.length < a.faces.length;) d.faces.push(f.face3d().add(d));
  131. for (var A = 0; A < a.faces.length; A++) f.styledMode && delete a.faces[A].fill, d.faces[A].attr(a.faces[A], null, c, b);
  132. delete a.faces
  133. }
  134. return l.prototype.attr.apply(this, arguments)
  135. };
  136. d.animate = function (a, e, c) {
  137. if (a && a.faces) {
  138. for (; d.faces.length >
  139. a.faces.length;) d.faces.pop().destroy();
  140. for (; d.faces.length < a.faces.length;) d.faces.push(f.face3d().add(d));
  141. for (var b = 0; b < a.faces.length; b++) d.faces[b].animate(a.faces[b], e, c);
  142. delete a.faces
  143. }
  144. return l.prototype.animate.apply(this, arguments)
  145. };
  146. return d.attr(a)
  147. };
  148. e = {
  149. initArgs: function (a) {
  150. var f = this, d = f.renderer, e = d[f.pathType + "Path"](a), c = e.zIndexes;
  151. f.parts.forEach(function (a) {
  152. f[a] = d.path(e[a]).attr({"class": "highcharts-3d-" + a, zIndex: c[a] || 0}).add(f)
  153. });
  154. f.attr({"stroke-linejoin": "round", zIndex: c.group});
  155. f.originalDestroy = f.destroy;
  156. f.destroy = f.destroyParts
  157. }, singleSetterForParts: function (a, e, d, c, l, A) {
  158. var f = {};
  159. c = [null, null, c || "attr", l, A];
  160. var g = d && d.zIndexes;
  161. d ? (b.objectEach(d, function (e, c) {
  162. f[c] = {};
  163. f[c][a] = e;
  164. g && (f[c].zIndex = d.zIndexes[c] || 0)
  165. }), c[1] = f) : (f[a] = e, c[0] = f);
  166. return this.processParts.apply(this, c)
  167. }, processParts: function (a, e, d, c, l) {
  168. var f = this;
  169. f.parts.forEach(function (g) {
  170. e && (a = b.pick(e[g], !1));
  171. if (!1 !== a) f[g][d](a, c, l)
  172. });
  173. return f
  174. }, destroyParts: function () {
  175. this.processParts(null, null, "destroy");
  176. return this.originalDestroy()
  177. }
  178. };
  179. m = b.merge(e, {
  180. parts: ["front", "top", "side"], pathType: "cuboid", attr: function (a, e, d, c) {
  181. if ("string" === typeof a && "undefined" !== typeof e) {
  182. var f = a;
  183. a = {};
  184. a[f] = e
  185. }
  186. return a.shapeArgs || v(a.x) ? this.singleSetterForParts("d", null, this.renderer[this.pathType + "Path"](a.shapeArgs || a)) : l.prototype.attr.call(this, a, void 0, d, c)
  187. }, animate: function (a, e, d) {
  188. v(a.x) && v(a.y) ? (a = this.renderer[this.pathType + "Path"](a), this.singleSetterForParts("d", null, a, "animate", e, d), this.attr({zIndex: a.zIndexes.group})) : a.opacity ? this.processParts(a,
  189. null, "animate", e, d) : l.prototype.animate.call(this, a, e, d);
  190. return this
  191. }, fillSetter: function (a) {
  192. this.singleSetterForParts("fill", null, {
  193. front: a,
  194. top: h(a).brighten(.1).get(),
  195. side: h(a).brighten(-.1).get()
  196. });
  197. this.color = this.fill = a;
  198. return this
  199. }, opacitySetter: function (a) {
  200. return this.singleSetterForParts("opacity", a)
  201. }
  202. });
  203. p.prototype.elements3d = {base: e, cuboid: m};
  204. p.prototype.element3d = function (a, e) {
  205. var d = this.g();
  206. b.extend(d, this.elements3d[a]);
  207. d.initArgs(e);
  208. return d
  209. };
  210. p.prototype.cuboid = function (a) {
  211. return this.element3d("cuboid",
  212. a)
  213. };
  214. b.SVGRenderer.prototype.cuboidPath = function (a) {
  215. function e(a) {
  216. return h[a]
  217. }
  218. var d = a.x, f = a.y, c = a.z, g = a.height, l = a.width, w = a.depth, n = q[this.chartIndex], m, p,
  219. u = n.options.chart.options3d.alpha, t = 0,
  220. h = [{x: d, y: f, z: c}, {x: d + l, y: f, z: c}, {x: d + l, y: f + g, z: c}, {
  221. x: d,
  222. y: f + g,
  223. z: c
  224. }, {x: d, y: f + g, z: c + w}, {x: d + l, y: f + g, z: c + w}, {x: d + l, y: f, z: c + w}, {
  225. x: d,
  226. y: f,
  227. z: c + w
  228. }], h = k(h, n, a.insidePlotArea);
  229. p = function (a, d) {
  230. var f = [[], -1];
  231. a = a.map(e);
  232. d = d.map(e);
  233. 0 > b.shapeArea(a) ? f = [a, 0] : 0 > b.shapeArea(d) && (f = [d, 1]);
  234. return f
  235. };
  236. m = p([3, 2, 1, 0], [7, 6, 5, 4]);
  237. a =
  238. m[0];
  239. l = m[1];
  240. m = p([1, 6, 7, 0], [4, 5, 2, 3]);
  241. g = m[0];
  242. w = m[1];
  243. m = p([1, 2, 5, 6], [0, 7, 4, 3]);
  244. p = m[0];
  245. m = m[1];
  246. 1 === m ? t += 1E4 * (1E3 - d) : m || (t += 1E4 * d);
  247. t += 10 * (!w || 0 <= u && 180 >= u || 360 > u && 357.5 < u ? n.plotHeight - f : 10 + f);
  248. 1 === l ? t += 100 * c : l || (t += 100 * (1E3 - c));
  249. return {
  250. front: this.toLinePath(a, !0),
  251. top: this.toLinePath(g, !0),
  252. side: this.toLinePath(p, !0),
  253. zIndexes: {group: Math.round(t)},
  254. isFront: l,
  255. isTop: w
  256. }
  257. };
  258. b.SVGRenderer.prototype.arc3d = function (e) {
  259. function c(d) {
  260. var e = !1, f = {}, c;
  261. d = a(d);
  262. for (c in d) -1 !== k.indexOf(c) && (f[c] = d[c], delete d[c], e = !0);
  263. return e ?
  264. f : !1
  265. }
  266. var d = this.g(), f = d.renderer, k = "x y r innerR start end".split(" ");
  267. e = a(e);
  268. e.alpha = (e.alpha || 0) * w;
  269. e.beta = (e.beta || 0) * w;
  270. d.top = f.path();
  271. d.side1 = f.path();
  272. d.side2 = f.path();
  273. d.inn = f.path();
  274. d.out = f.path();
  275. d.onAdd = function () {
  276. var a = d.parentGroup, e = d.attr("class");
  277. d.top.add(d);
  278. ["out", "inn", "side1", "side2"].forEach(function (c) {
  279. d[c].attr({"class": e + " highcharts-3d-side"}).add(a)
  280. })
  281. };
  282. ["addClass", "removeClass"].forEach(function (a) {
  283. d[a] = function () {
  284. var e = arguments;
  285. ["top", "out", "inn", "side1", "side2"].forEach(function (c) {
  286. d[c][a].apply(d[c],
  287. e)
  288. })
  289. }
  290. });
  291. d.setPaths = function (a) {
  292. var e = d.renderer.arc3dPath(a), c = 100 * e.zTop;
  293. d.attribs = a;
  294. d.top.attr({d: e.top, zIndex: e.zTop});
  295. d.inn.attr({d: e.inn, zIndex: e.zInn});
  296. d.out.attr({d: e.out, zIndex: e.zOut});
  297. d.side1.attr({d: e.side1, zIndex: e.zSide1});
  298. d.side2.attr({d: e.side2, zIndex: e.zSide2});
  299. d.zIndex = c;
  300. d.attr({zIndex: c});
  301. a.center && (d.top.setRadialReference(a.center), delete a.center)
  302. };
  303. d.setPaths(e);
  304. d.fillSetter = function (a) {
  305. var d = h(a).brighten(-.1).get();
  306. this.fill = a;
  307. this.side1.attr({fill: d});
  308. this.side2.attr({fill: d});
  309. this.inn.attr({fill: d});
  310. this.out.attr({fill: d});
  311. this.top.attr({fill: a});
  312. return this
  313. };
  314. ["opacity", "translateX", "translateY", "visibility"].forEach(function (a) {
  315. d[a + "Setter"] = function (a, e) {
  316. d[e] = a;
  317. ["out", "inn", "side1", "side2", "top"].forEach(function (c) {
  318. d[c].attr(e, a)
  319. })
  320. }
  321. });
  322. d.attr = function (a) {
  323. var e;
  324. "object" === typeof a && (e = c(a)) && (g(d.attribs, e), d.setPaths(d.attribs));
  325. return l.prototype.attr.apply(d, arguments)
  326. };
  327. d.animate = function (e, f, g) {
  328. var w, k = this.attribs, m, p = "data-" + Math.random().toString(26).substring(2,
  329. 9);
  330. delete e.center;
  331. delete e.z;
  332. delete e.depth;
  333. delete e.alpha;
  334. delete e.beta;
  335. m = u(n(f, this.renderer.globalAnimation));
  336. m.duration && (w = c(e), d[p] = 0, e[p] = 1, d[p + "Setter"] = b.noop, w && (m.step = function (d, e) {
  337. function c(a) {
  338. return k[a] + (n(w[a], k[a]) - k[a]) * e.pos
  339. }
  340. e.prop === p && e.elem.setPaths(a(k, {
  341. x: c("x"),
  342. y: c("y"),
  343. r: c("r"),
  344. innerR: c("innerR"),
  345. start: c("start"),
  346. end: c("end")
  347. }))
  348. }), f = m);
  349. return l.prototype.animate.call(this, e, f, g)
  350. };
  351. d.destroy = function () {
  352. this.top.destroy();
  353. this.out.destroy();
  354. this.inn.destroy();
  355. this.side1.destroy();
  356. this.side2.destroy();
  357. l.prototype.destroy.call(this)
  358. };
  359. d.hide = function () {
  360. this.top.hide();
  361. this.out.hide();
  362. this.inn.hide();
  363. this.side1.hide();
  364. this.side2.hide()
  365. };
  366. d.show = function (a) {
  367. this.top.show(a);
  368. this.out.show(a);
  369. this.inn.show(a);
  370. this.side1.show(a);
  371. this.side2.show(a)
  372. };
  373. return d
  374. };
  375. p.prototype.arc3dPath = function (a) {
  376. function e(a) {
  377. a %= 2 * Math.PI;
  378. a > Math.PI && (a = 2 * Math.PI - a);
  379. return a
  380. }
  381. var d = a.x, c = a.y, f = a.start, b = a.end - .00001, g = a.r, l = a.innerR || 0, w = a.depth || 0,
  382. k = a.alpha, m = a.beta, n = Math.cos(f), p = Math.sin(f);
  383. a = Math.cos(b);
  384. var u = Math.sin(b), h = g * Math.cos(m), g = g * Math.cos(k), q = l * Math.cos(m), v = l * Math.cos(k),
  385. l = w * Math.sin(m), C = w * Math.sin(k), w = ["M", d + h * n, c + g * p],
  386. w = w.concat(x(d, c, h, g, f, b, 0, 0)), w = w.concat(["L", d + q * a, c + v * u]),
  387. w = w.concat(x(d, c, q, v, b, f, 0, 0)), w = w.concat(["Z"]), z = 0 < m ? Math.PI / 2 : 0,
  388. m = 0 < k ? 0 : Math.PI / 2, z = f > -z ? f : b > -z ? -z : f,
  389. D = b < r - m ? b : f < r - m ? r - m : b, E = 2 * r - m, k = ["M", d + h * y(z), c + g * t(z)],
  390. k = k.concat(x(d, c, h, g, z, D, 0, 0));
  391. b > E && f < E ? (k = k.concat(["L", d + h * y(D) + l, c + g * t(D) + C]), k = k.concat(x(d, c, h, g, D, E, l, C)), k = k.concat(["L", d + h * y(E), c + g * t(E)]),
  392. k = k.concat(x(d, c, h, g, E, b, 0, 0)), k = k.concat(["L", d + h * y(b) + l, c + g * t(b) + C]), k = k.concat(x(d, c, h, g, b, E, l, C)), k = k.concat(["L", d + h * y(E), c + g * t(E)]), k = k.concat(x(d, c, h, g, E, D, 0, 0))) : b > r - m && f < r - m && (k = k.concat(["L", d + h * Math.cos(D) + l, c + g * Math.sin(D) + C]), k = k.concat(x(d, c, h, g, D, b, l, C)), k = k.concat(["L", d + h * Math.cos(b), c + g * Math.sin(b)]), k = k.concat(x(d, c, h, g, b, D, 0, 0)));
  393. k = k.concat(["L", d + h * Math.cos(D) + l, c + g * Math.sin(D) + C]);
  394. k = k.concat(x(d, c, h, g, D, z, l, C));
  395. k = k.concat(["Z"]);
  396. m = ["M", d + q * n, c + v * p];
  397. m = m.concat(x(d, c, q, v, f, b, 0,
  398. 0));
  399. m = m.concat(["L", d + q * Math.cos(b) + l, c + v * Math.sin(b) + C]);
  400. m = m.concat(x(d, c, q, v, b, f, l, C));
  401. m = m.concat(["Z"]);
  402. n = ["M", d + h * n, c + g * p, "L", d + h * n + l, c + g * p + C, "L", d + q * n + l, c + v * p + C, "L", d + q * n, c + v * p, "Z"];
  403. d = ["M", d + h * a, c + g * u, "L", d + h * a + l, c + g * u + C, "L", d + q * a + l, c + v * u + C, "L", d + q * a, c + v * u, "Z"];
  404. u = Math.atan2(C, -l);
  405. c = Math.abs(b + u);
  406. a = Math.abs(f + u);
  407. f = Math.abs((f + b) / 2 + u);
  408. c = e(c);
  409. a = e(a);
  410. f = e(f);
  411. f *= 1E5;
  412. b = 1E5 * a;
  413. c *= 1E5;
  414. return {
  415. top: w,
  416. zTop: 1E5 * Math.PI + 1,
  417. out: k,
  418. zOut: Math.max(f, b, c),
  419. inn: m,
  420. zInn: Math.max(f, b, c),
  421. side1: n,
  422. zSide1: .99 * c,
  423. side2: d,
  424. zSide2: .99 *
  425. b
  426. }
  427. }
  428. })(z);
  429. (function (b) {
  430. function x(b, g) {
  431. var a = b.plotLeft, k = b.plotWidth + a, w = b.plotTop, l = b.plotHeight + w, p = a + b.plotWidth / 2,
  432. c = w + b.plotHeight / 2, e = Number.MAX_VALUE, m = -Number.MAX_VALUE, f = Number.MAX_VALUE,
  433. h = -Number.MAX_VALUE, d, q = 1;
  434. d = [{x: a, y: w, z: 0}, {x: a, y: w, z: g}];
  435. [0, 1].forEach(function (a) {
  436. d.push({x: k, y: d[a].y, z: d[a].z})
  437. });
  438. [0, 1, 2, 3].forEach(function (a) {
  439. d.push({x: d[a].x, y: l, z: d[a].z})
  440. });
  441. d = u(d, b, !1);
  442. d.forEach(function (a) {
  443. e = Math.min(e, a.x);
  444. m = Math.max(m, a.x);
  445. f = Math.min(f, a.y);
  446. h = Math.max(h, a.y)
  447. });
  448. a > e && (q = Math.min(q,
  449. 1 - Math.abs((a + p) / (e + p)) % 1));
  450. k < m && (q = Math.min(q, (k - p) / (m - p)));
  451. w > f && (q = 0 > f ? Math.min(q, (w + c) / (-f + w + c)) : Math.min(q, 1 - (w + c) / (f + c) % 1));
  452. l < h && (q = Math.min(q, Math.abs((l - c) / (h - c))));
  453. return q
  454. }
  455. var y = b.addEvent, r = b.Chart, t = b.merge, u = b.perspective, q = b.pick, h = b.wrap;
  456. r.prototype.is3d = function () {
  457. return this.options.chart.options3d && this.options.chart.options3d.enabled
  458. };
  459. r.prototype.propsRequireDirtyBox.push("chart.options3d");
  460. r.prototype.propsRequireUpdateSeries.push("chart.options3d");
  461. y(r, "afterInit", function () {
  462. var b =
  463. this.options;
  464. this.is3d() && (b.series || []).forEach(function (g) {
  465. "scatter" === (g.type || b.chart.type || b.chart.defaultSeriesType) && (g.type = "scatter3d")
  466. })
  467. });
  468. y(r, "addSeries", function (b) {
  469. this.is3d() && "scatter" === b.options.type && (b.options.type = "scatter3d")
  470. });
  471. b.wrap(b.Chart.prototype, "isInsidePlot", function (b) {
  472. return this.is3d() || b.apply(this, [].slice.call(arguments, 1))
  473. });
  474. var v = b.getOptions();
  475. t(!0, v, {
  476. chart: {
  477. options3d: {
  478. enabled: !1,
  479. alpha: 0,
  480. beta: 0,
  481. depth: 100,
  482. fitToPlot: !0,
  483. viewDistance: 25,
  484. axisLabelPosition: null,
  485. frame: {
  486. visible: "default",
  487. size: 1, bottom: {}, top: {}, left: {}, right: {}, back: {}, front: {}
  488. }
  489. }
  490. }
  491. });
  492. y(r, "afterGetContainer", function () {
  493. this.styledMode && (this.renderer.definition({
  494. tagName: "style",
  495. textContent: ".highcharts-3d-top{filter: url(#highcharts-brighter)}\n.highcharts-3d-side{filter: url(#highcharts-darker)}\n"
  496. }), [{name: "darker", slope: .6}, {name: "brighter", slope: 1.4}].forEach(function (b) {
  497. this.renderer.definition({
  498. tagName: "filter", id: "highcharts-" + b.name, children: [{
  499. tagName: "feComponentTransfer", children: [{
  500. tagName: "feFuncR", type: "linear",
  501. slope: b.slope
  502. }, {tagName: "feFuncG", type: "linear", slope: b.slope}, {
  503. tagName: "feFuncB",
  504. type: "linear",
  505. slope: b.slope
  506. }]
  507. }]
  508. })
  509. }, this))
  510. });
  511. h(r.prototype, "setClassName", function (b) {
  512. b.apply(this, [].slice.call(arguments, 1));
  513. this.is3d() && (this.container.className += " highcharts-3d-chart")
  514. });
  515. y(b.Chart, "afterSetChartSize", function () {
  516. var b = this.options.chart.options3d;
  517. if (this.is3d()) {
  518. var g = this.inverted, a = this.clipBox, k = this.margin;
  519. a[g ? "y" : "x"] = -(k[3] || 0);
  520. a[g ? "x" : "y"] = -(k[0] || 0);
  521. a[g ? "height" : "width"] = this.chartWidth +
  522. (k[3] || 0) + (k[1] || 0);
  523. a[g ? "width" : "height"] = this.chartHeight + (k[0] || 0) + (k[2] || 0);
  524. this.scale3d = 1;
  525. !0 === b.fitToPlot && (this.scale3d = x(this, b.depth));
  526. this.frame3d = this.get3dFrame()
  527. }
  528. });
  529. y(r, "beforeRedraw", function () {
  530. this.is3d() && (this.isDirtyBox = !0)
  531. });
  532. y(r, "beforeRender", function () {
  533. this.is3d() && (this.frame3d = this.get3dFrame())
  534. });
  535. h(r.prototype, "renderSeries", function (b) {
  536. var g = this.series.length;
  537. if (this.is3d()) for (; g--;) b = this.series[g], b.translate(), b.render(); else b.call(this)
  538. });
  539. y(r, "afterDrawChartBox", function () {
  540. if (this.is3d()) {
  541. var w =
  542. this.renderer, g = this.options.chart.options3d, a = this.get3dFrame(), k = this.plotLeft,
  543. n = this.plotLeft + this.plotWidth, l = this.plotTop, p = this.plotTop + this.plotHeight,
  544. g = g.depth, c = k - (a.left.visible ? a.left.size : 0),
  545. e = n + (a.right.visible ? a.right.size : 0), m = l - (a.top.visible ? a.top.size : 0),
  546. f = p + (a.bottom.visible ? a.bottom.size : 0), h = 0 - (a.front.visible ? a.front.size : 0),
  547. d = g + (a.back.visible ? a.back.size : 0), q = this.hasRendered ? "animate" : "attr";
  548. this.frame3d = a;
  549. this.frameShapes || (this.frameShapes = {
  550. bottom: w.polyhedron().add(),
  551. top: w.polyhedron().add(),
  552. left: w.polyhedron().add(),
  553. right: w.polyhedron().add(),
  554. back: w.polyhedron().add(),
  555. front: w.polyhedron().add()
  556. });
  557. this.frameShapes.bottom[q]({
  558. "class": "highcharts-3d-frame highcharts-3d-frame-bottom",
  559. zIndex: a.bottom.frontFacing ? -1E3 : 1E3,
  560. faces: [{
  561. fill: b.color(a.bottom.color).brighten(.1).get(),
  562. vertexes: [{x: c, y: f, z: h}, {x: e, y: f, z: h}, {x: e, y: f, z: d}, {x: c, y: f, z: d}],
  563. enabled: a.bottom.visible
  564. }, {
  565. fill: b.color(a.bottom.color).brighten(.1).get(),
  566. vertexes: [{x: k, y: p, z: g}, {x: n, y: p, z: g}, {x: n, y: p, z: 0}, {x: k, y: p, z: 0}],
  567. enabled: a.bottom.visible
  568. },
  569. {
  570. fill: b.color(a.bottom.color).brighten(-.1).get(),
  571. vertexes: [{x: c, y: f, z: h}, {x: c, y: f, z: d}, {x: k, y: p, z: g}, {x: k, y: p, z: 0}],
  572. enabled: a.bottom.visible && !a.left.visible
  573. }, {
  574. fill: b.color(a.bottom.color).brighten(-.1).get(),
  575. vertexes: [{x: e, y: f, z: d}, {x: e, y: f, z: h}, {x: n, y: p, z: 0}, {x: n, y: p, z: g}],
  576. enabled: a.bottom.visible && !a.right.visible
  577. }, {
  578. fill: b.color(a.bottom.color).get(),
  579. vertexes: [{x: e, y: f, z: h}, {x: c, y: f, z: h}, {x: k, y: p, z: 0}, {x: n, y: p, z: 0}],
  580. enabled: a.bottom.visible && !a.front.visible
  581. }, {
  582. fill: b.color(a.bottom.color).get(),
  583. vertexes: [{x: c, y: f, z: d}, {x: e, y: f, z: d}, {x: n, y: p, z: g}, {x: k, y: p, z: g}],
  584. enabled: a.bottom.visible && !a.back.visible
  585. }]
  586. });
  587. this.frameShapes.top[q]({
  588. "class": "highcharts-3d-frame highcharts-3d-frame-top",
  589. zIndex: a.top.frontFacing ? -1E3 : 1E3,
  590. faces: [{
  591. fill: b.color(a.top.color).brighten(.1).get(),
  592. vertexes: [{x: c, y: m, z: d}, {x: e, y: m, z: d}, {x: e, y: m, z: h}, {x: c, y: m, z: h}],
  593. enabled: a.top.visible
  594. }, {
  595. fill: b.color(a.top.color).brighten(.1).get(),
  596. vertexes: [{x: k, y: l, z: 0}, {x: n, y: l, z: 0}, {x: n, y: l, z: g}, {x: k, y: l, z: g}],
  597. enabled: a.top.visible
  598. },
  599. {
  600. fill: b.color(a.top.color).brighten(-.1).get(),
  601. vertexes: [{x: c, y: m, z: d}, {x: c, y: m, z: h}, {x: k, y: l, z: 0}, {x: k, y: l, z: g}],
  602. enabled: a.top.visible && !a.left.visible
  603. }, {
  604. fill: b.color(a.top.color).brighten(-.1).get(),
  605. vertexes: [{x: e, y: m, z: h}, {x: e, y: m, z: d}, {x: n, y: l, z: g}, {x: n, y: l, z: 0}],
  606. enabled: a.top.visible && !a.right.visible
  607. }, {
  608. fill: b.color(a.top.color).get(),
  609. vertexes: [{x: c, y: m, z: h}, {x: e, y: m, z: h}, {x: n, y: l, z: 0}, {x: k, y: l, z: 0}],
  610. enabled: a.top.visible && !a.front.visible
  611. }, {
  612. fill: b.color(a.top.color).get(),
  613. vertexes: [{
  614. x: e, y: m,
  615. z: d
  616. }, {x: c, y: m, z: d}, {x: k, y: l, z: g}, {x: n, y: l, z: g}],
  617. enabled: a.top.visible && !a.back.visible
  618. }]
  619. });
  620. this.frameShapes.left[q]({
  621. "class": "highcharts-3d-frame highcharts-3d-frame-left",
  622. zIndex: a.left.frontFacing ? -1E3 : 1E3,
  623. faces: [{
  624. fill: b.color(a.left.color).brighten(.1).get(),
  625. vertexes: [{x: c, y: f, z: h}, {x: k, y: p, z: 0}, {x: k, y: p, z: g}, {x: c, y: f, z: d}],
  626. enabled: a.left.visible && !a.bottom.visible
  627. }, {
  628. fill: b.color(a.left.color).brighten(.1).get(),
  629. vertexes: [{x: c, y: m, z: d}, {x: k, y: l, z: g}, {x: k, y: l, z: 0}, {x: c, y: m, z: h}],
  630. enabled: a.left.visible &&
  631. !a.top.visible
  632. }, {
  633. fill: b.color(a.left.color).brighten(-.1).get(),
  634. vertexes: [{x: c, y: f, z: d}, {x: c, y: m, z: d}, {x: c, y: m, z: h}, {x: c, y: f, z: h}],
  635. enabled: a.left.visible
  636. }, {
  637. fill: b.color(a.left.color).brighten(-.1).get(),
  638. vertexes: [{x: k, y: l, z: g}, {x: k, y: p, z: g}, {x: k, y: p, z: 0}, {x: k, y: l, z: 0}],
  639. enabled: a.left.visible
  640. }, {
  641. fill: b.color(a.left.color).get(),
  642. vertexes: [{x: c, y: f, z: h}, {x: c, y: m, z: h}, {x: k, y: l, z: 0}, {x: k, y: p, z: 0}],
  643. enabled: a.left.visible && !a.front.visible
  644. }, {
  645. fill: b.color(a.left.color).get(), vertexes: [{x: c, y: m, z: d}, {
  646. x: c, y: f,
  647. z: d
  648. }, {x: k, y: p, z: g}, {x: k, y: l, z: g}], enabled: a.left.visible && !a.back.visible
  649. }]
  650. });
  651. this.frameShapes.right[q]({
  652. "class": "highcharts-3d-frame highcharts-3d-frame-right",
  653. zIndex: a.right.frontFacing ? -1E3 : 1E3,
  654. faces: [{
  655. fill: b.color(a.right.color).brighten(.1).get(),
  656. vertexes: [{x: e, y: f, z: d}, {x: n, y: p, z: g}, {x: n, y: p, z: 0}, {x: e, y: f, z: h}],
  657. enabled: a.right.visible && !a.bottom.visible
  658. }, {
  659. fill: b.color(a.right.color).brighten(.1).get(),
  660. vertexes: [{x: e, y: m, z: h}, {x: n, y: l, z: 0}, {x: n, y: l, z: g}, {x: e, y: m, z: d}],
  661. enabled: a.right.visible &&
  662. !a.top.visible
  663. }, {
  664. fill: b.color(a.right.color).brighten(-.1).get(),
  665. vertexes: [{x: n, y: l, z: 0}, {x: n, y: p, z: 0}, {x: n, y: p, z: g}, {x: n, y: l, z: g}],
  666. enabled: a.right.visible
  667. }, {
  668. fill: b.color(a.right.color).brighten(-.1).get(),
  669. vertexes: [{x: e, y: f, z: h}, {x: e, y: m, z: h}, {x: e, y: m, z: d}, {x: e, y: f, z: d}],
  670. enabled: a.right.visible
  671. }, {
  672. fill: b.color(a.right.color).get(),
  673. vertexes: [{x: e, y: m, z: h}, {x: e, y: f, z: h}, {x: n, y: p, z: 0}, {x: n, y: l, z: 0}],
  674. enabled: a.right.visible && !a.front.visible
  675. }, {
  676. fill: b.color(a.right.color).get(),
  677. vertexes: [{x: e, y: f, z: d},
  678. {x: e, y: m, z: d}, {x: n, y: l, z: g}, {x: n, y: p, z: g}],
  679. enabled: a.right.visible && !a.back.visible
  680. }]
  681. });
  682. this.frameShapes.back[q]({
  683. "class": "highcharts-3d-frame highcharts-3d-frame-back",
  684. zIndex: a.back.frontFacing ? -1E3 : 1E3,
  685. faces: [{
  686. fill: b.color(a.back.color).brighten(.1).get(),
  687. vertexes: [{x: e, y: f, z: d}, {x: c, y: f, z: d}, {x: k, y: p, z: g}, {x: n, y: p, z: g}],
  688. enabled: a.back.visible && !a.bottom.visible
  689. }, {
  690. fill: b.color(a.back.color).brighten(.1).get(),
  691. vertexes: [{x: c, y: m, z: d}, {x: e, y: m, z: d}, {x: n, y: l, z: g}, {x: k, y: l, z: g}],
  692. enabled: a.back.visible &&
  693. !a.top.visible
  694. }, {
  695. fill: b.color(a.back.color).brighten(-.1).get(),
  696. vertexes: [{x: c, y: f, z: d}, {x: c, y: m, z: d}, {x: k, y: l, z: g}, {x: k, y: p, z: g}],
  697. enabled: a.back.visible && !a.left.visible
  698. }, {
  699. fill: b.color(a.back.color).brighten(-.1).get(),
  700. vertexes: [{x: e, y: m, z: d}, {x: e, y: f, z: d}, {x: n, y: p, z: g}, {x: n, y: l, z: g}],
  701. enabled: a.back.visible && !a.right.visible
  702. }, {
  703. fill: b.color(a.back.color).get(),
  704. vertexes: [{x: k, y: l, z: g}, {x: n, y: l, z: g}, {x: n, y: p, z: g}, {x: k, y: p, z: g}],
  705. enabled: a.back.visible
  706. }, {
  707. fill: b.color(a.back.color).get(), vertexes: [{
  708. x: c,
  709. y: f, z: d
  710. }, {x: e, y: f, z: d}, {x: e, y: m, z: d}, {x: c, y: m, z: d}], enabled: a.back.visible
  711. }]
  712. });
  713. this.frameShapes.front[q]({
  714. "class": "highcharts-3d-frame highcharts-3d-frame-front",
  715. zIndex: a.front.frontFacing ? -1E3 : 1E3,
  716. faces: [{
  717. fill: b.color(a.front.color).brighten(.1).get(),
  718. vertexes: [{x: c, y: f, z: h}, {x: e, y: f, z: h}, {x: n, y: p, z: 0}, {x: k, y: p, z: 0}],
  719. enabled: a.front.visible && !a.bottom.visible
  720. }, {
  721. fill: b.color(a.front.color).brighten(.1).get(),
  722. vertexes: [{x: e, y: m, z: h}, {x: c, y: m, z: h}, {x: k, y: l, z: 0}, {x: n, y: l, z: 0}],
  723. enabled: a.front.visible &&
  724. !a.top.visible
  725. }, {
  726. fill: b.color(a.front.color).brighten(-.1).get(),
  727. vertexes: [{x: c, y: m, z: h}, {x: c, y: f, z: h}, {x: k, y: p, z: 0}, {x: k, y: l, z: 0}],
  728. enabled: a.front.visible && !a.left.visible
  729. }, {
  730. fill: b.color(a.front.color).brighten(-.1).get(),
  731. vertexes: [{x: e, y: f, z: h}, {x: e, y: m, z: h}, {x: n, y: l, z: 0}, {x: n, y: p, z: 0}],
  732. enabled: a.front.visible && !a.right.visible
  733. }, {
  734. fill: b.color(a.front.color).get(),
  735. vertexes: [{x: n, y: l, z: 0}, {x: k, y: l, z: 0}, {x: k, y: p, z: 0}, {x: n, y: p, z: 0}],
  736. enabled: a.front.visible
  737. }, {
  738. fill: b.color(a.front.color).get(), vertexes: [{
  739. x: e,
  740. y: f, z: h
  741. }, {x: c, y: f, z: h}, {x: c, y: m, z: h}, {x: e, y: m, z: h}], enabled: a.front.visible
  742. }]
  743. })
  744. }
  745. });
  746. r.prototype.retrieveStacks = function (b) {
  747. var g = this.series, a = {}, k, h = 1;
  748. this.series.forEach(function (l) {
  749. k = q(l.options.stack, b ? 0 : g.length - 1 - l.index);
  750. a[k] ? a[k].series.push(l) : (a[k] = {series: [l], position: h}, h++)
  751. });
  752. a.totalStacks = h + 1;
  753. return a
  754. };
  755. r.prototype.get3dFrame = function () {
  756. var h = this, g = h.options.chart.options3d, a = g.frame, k = h.plotLeft, n = h.plotLeft + h.plotWidth,
  757. l = h.plotTop, p = h.plotTop + h.plotHeight, c = g.depth, e = function (a) {
  758. a =
  759. b.shapeArea3d(a, h);
  760. return .5 < a ? 1 : -.5 > a ? -1 : 0
  761. }, m = e([{x: k, y: p, z: c}, {x: n, y: p, z: c}, {x: n, y: p, z: 0}, {x: k, y: p, z: 0}]),
  762. f = e([{x: k, y: l, z: 0}, {x: n, y: l, z: 0}, {x: n, y: l, z: c}, {x: k, y: l, z: c}]),
  763. t = e([{x: k, y: l, z: 0}, {x: k, y: l, z: c}, {x: k, y: p, z: c}, {x: k, y: p, z: 0}]),
  764. d = e([{x: n, y: l, z: c}, {x: n, y: l, z: 0}, {x: n, y: p, z: 0}, {x: n, y: p, z: c}]),
  765. v = e([{x: k, y: p, z: 0}, {x: n, y: p, z: 0}, {x: n, y: l, z: 0}, {x: k, y: l, z: 0}]),
  766. e = e([{x: k, y: l, z: c}, {x: n, y: l, z: c}, {x: n, y: p, z: c}, {x: k, y: p, z: c}]), r = !1, A = !1,
  767. x = !1, y = !1;
  768. [].concat(h.xAxis, h.yAxis, h.zAxis).forEach(function (a) {
  769. a && (a.horiz ?
  770. a.opposite ? A = !0 : r = !0 : a.opposite ? y = !0 : x = !0)
  771. });
  772. var z = function (a, c, e) {
  773. for (var d = ["size", "color", "visible"], b = {}, f = 0; f < d.length; f++) for (var g = d[f], k = 0; k < a.length; k++) if ("object" === typeof a[k]) {
  774. var l = a[k][g];
  775. if (void 0 !== l && null !== l) {
  776. b[g] = l;
  777. break
  778. }
  779. }
  780. a = e;
  781. !0 === b.visible || !1 === b.visible ? a = b.visible : "auto" === b.visible && (a = 0 < c);
  782. return {size: q(b.size, 1), color: q(b.color, "none"), frontFacing: 0 < c, visible: a}
  783. }, a = {
  784. bottom: z([a.bottom, a.top, a], m, r),
  785. top: z([a.top, a.bottom, a], f, A),
  786. left: z([a.left, a.right, a.side, a], t, x),
  787. right: z([a.right,
  788. a.left, a.side, a], d, y),
  789. back: z([a.back, a.front, a], e, !0),
  790. front: z([a.front, a.back, a], v, !1)
  791. };
  792. "auto" === g.axisLabelPosition ? (d = function (a, c) {
  793. return a.visible !== c.visible || a.visible && c.visible && a.frontFacing !== c.frontFacing
  794. }, g = [], d(a.left, a.front) && g.push({
  795. y: (l + p) / 2,
  796. x: k,
  797. z: 0,
  798. xDir: {x: 1, y: 0, z: 0}
  799. }), d(a.left, a.back) && g.push({
  800. y: (l + p) / 2,
  801. x: k,
  802. z: c,
  803. xDir: {x: 0, y: 0, z: -1}
  804. }), d(a.right, a.front) && g.push({
  805. y: (l + p) / 2,
  806. x: n,
  807. z: 0,
  808. xDir: {x: 0, y: 0, z: 1}
  809. }), d(a.right, a.back) && g.push({
  810. y: (l + p) / 2,
  811. x: n,
  812. z: c,
  813. xDir: {x: -1, y: 0, z: 0}
  814. }), m = [], d(a.bottom,
  815. a.front) && m.push({
  816. x: (k + n) / 2,
  817. y: p,
  818. z: 0,
  819. xDir: {x: 1, y: 0, z: 0}
  820. }), d(a.bottom, a.back) && m.push({
  821. x: (k + n) / 2,
  822. y: p,
  823. z: c,
  824. xDir: {x: -1, y: 0, z: 0}
  825. }), f = [], d(a.top, a.front) && f.push({
  826. x: (k + n) / 2,
  827. y: l,
  828. z: 0,
  829. xDir: {x: 1, y: 0, z: 0}
  830. }), d(a.top, a.back) && f.push({
  831. x: (k + n) / 2,
  832. y: l,
  833. z: c,
  834. xDir: {x: -1, y: 0, z: 0}
  835. }), t = [], d(a.bottom, a.left) && t.push({
  836. z: (0 + c) / 2,
  837. y: p,
  838. x: k,
  839. xDir: {x: 0, y: 0, z: -1}
  840. }), d(a.bottom, a.right) && t.push({
  841. z: (0 + c) / 2,
  842. y: p,
  843. x: n,
  844. xDir: {x: 0, y: 0, z: 1}
  845. }), p = [], d(a.top, a.left) && p.push({
  846. z: (0 + c) / 2,
  847. y: l,
  848. x: k,
  849. xDir: {x: 0, y: 0, z: -1}
  850. }), d(a.top, a.right) && p.push({
  851. z: (0 +
  852. c) / 2, y: l, x: n, xDir: {x: 0, y: 0, z: 1}
  853. }), k = function (a, c, e) {
  854. if (0 === a.length) return null;
  855. if (1 === a.length) return a[0];
  856. for (var d = 0, b = u(a, h, !1), f = 1; f < b.length; f++) e * b[f][c] > e * b[d][c] ? d = f : e * b[f][c] === e * b[d][c] && b[f].z < b[d].z && (d = f);
  857. return a[d]
  858. }, a.axes = {
  859. y: {left: k(g, "x", -1), right: k(g, "x", 1)},
  860. x: {top: k(f, "y", -1), bottom: k(m, "y", 1)},
  861. z: {top: k(p, "y", -1), bottom: k(t, "y", 1)}
  862. }) : a.axes = {
  863. y: {left: {x: k, z: 0, xDir: {x: 1, y: 0, z: 0}}, right: {x: n, z: 0, xDir: {x: 0, y: 0, z: 1}}},
  864. x: {
  865. top: {y: l, z: 0, xDir: {x: 1, y: 0, z: 0}}, bottom: {
  866. y: p, z: 0, xDir: {
  867. x: 1, y: 0,
  868. z: 0
  869. }
  870. }
  871. },
  872. z: {
  873. top: {x: x ? n : k, y: l, xDir: x ? {x: 0, y: 0, z: 1} : {x: 0, y: 0, z: -1}},
  874. bottom: {x: x ? n : k, y: p, xDir: x ? {x: 0, y: 0, z: 1} : {x: 0, y: 0, z: -1}}
  875. }
  876. };
  877. return a
  878. };
  879. b.Fx.prototype.matrixSetter = function () {
  880. var h;
  881. if (1 > this.pos && (b.isArray(this.start) || b.isArray(this.end))) {
  882. var g = this.start || [1, 0, 0, 1, 0, 0], a = this.end || [1, 0, 0, 1, 0, 0];
  883. h = [];
  884. for (var k = 0; 6 > k; k++) h.push(this.pos * a[k] + (1 - this.pos) * g[k])
  885. } else h = this.end;
  886. this.elem.attr(this.prop, h, null, !0)
  887. }
  888. })(z);
  889. (function (b) {
  890. function x(c, e, b) {
  891. if (!c.chart.is3d() || "colorAxis" === c.coll) return e;
  892. var f = c.chart, g = q * f.options.chart.options3d.alpha, d = q * f.options.chart.options3d.beta,
  893. l = a(b && c.options.title.position3d, c.options.labels.position3d);
  894. b = a(b && c.options.title.skew3d, c.options.labels.skew3d);
  895. var h = f.frame3d, m = f.plotLeft, n = f.plotWidth + m, p = f.plotTop, u = f.plotHeight + p, f = !1, t = 0,
  896. v = 0, r = {x: 0, y: 1, z: 0};
  897. e = c.swapZ({x: e.x, y: e.y, z: 0});
  898. if (c.isZAxis) if (c.opposite) {
  899. if (null === h.axes.z.top) return {};
  900. v = e.y - p;
  901. e.x = h.axes.z.top.x;
  902. e.y = h.axes.z.top.y;
  903. m = h.axes.z.top.xDir;
  904. f = !h.top.frontFacing
  905. } else {
  906. if (null === h.axes.z.bottom) return {};
  907. v = e.y - u;
  908. e.x = h.axes.z.bottom.x;
  909. e.y = h.axes.z.bottom.y;
  910. m = h.axes.z.bottom.xDir;
  911. f = !h.bottom.frontFacing
  912. } else if (c.horiz) if (c.opposite) {
  913. if (null === h.axes.x.top) return {};
  914. v = e.y - p;
  915. e.y = h.axes.x.top.y;
  916. e.z = h.axes.x.top.z;
  917. m = h.axes.x.top.xDir;
  918. f = !h.top.frontFacing
  919. } else {
  920. if (null === h.axes.x.bottom) return {};
  921. v = e.y - u;
  922. e.y = h.axes.x.bottom.y;
  923. e.z = h.axes.x.bottom.z;
  924. m = h.axes.x.bottom.xDir;
  925. f = !h.bottom.frontFacing
  926. } else if (c.opposite) {
  927. if (null === h.axes.y.right) return {};
  928. t = e.x - n;
  929. e.x = h.axes.y.right.x;
  930. e.z = h.axes.y.right.z;
  931. m = h.axes.y.right.xDir;
  932. m = {x: m.z, y: m.y, z: -m.x}
  933. } else {
  934. if (null === h.axes.y.left) return {};
  935. t = e.x - m;
  936. e.x = h.axes.y.left.x;
  937. e.z = h.axes.y.left.z;
  938. m = h.axes.y.left.xDir
  939. }
  940. "chart" !== l && ("flap" === l ? c.horiz ? (d = Math.sin(g), g = Math.cos(g), c.opposite && (d = -d), f && (d = -d), r = {
  941. x: m.z * d,
  942. y: g,
  943. z: -m.x * d
  944. }) : m = {
  945. x: Math.cos(d),
  946. y: 0,
  947. z: Math.sin(d)
  948. } : "ortho" === l ? c.horiz ? (r = Math.cos(g), l = Math.sin(d) * r, g = -Math.sin(g), d = -r * Math.cos(d), r = {
  949. x: m.y * d - m.z * g,
  950. y: m.z * l - m.x * d,
  951. z: m.x * g - m.y * l
  952. }, g = 1 / Math.sqrt(r.x * r.x + r.y * r.y + r.z * r.z), f && (g = -g), r = {
  953. x: g * r.x,
  954. y: g * r.y,
  955. z: g * r.z
  956. }) : m = {
  957. x: Math.cos(d),
  958. y: 0, z: Math.sin(d)
  959. } : c.horiz ? r = {
  960. x: Math.sin(d) * Math.sin(g),
  961. y: Math.cos(g),
  962. z: -Math.cos(d) * Math.sin(g)
  963. } : m = {x: Math.cos(d), y: 0, z: Math.sin(d)});
  964. e.x += t * m.x + v * r.x;
  965. e.y += t * m.y + v * r.y;
  966. e.z += t * m.z + v * r.z;
  967. f = w([e], c.chart)[0];
  968. b && (0 > k(w([e, {x: e.x + m.x, y: e.y + m.y, z: e.z + m.z}, {
  969. x: e.x + r.x,
  970. y: e.y + r.y,
  971. z: e.z + r.z
  972. }], c.chart)) && (m = {x: -m.x, y: -m.y, z: -m.z}), c = w([{x: e.x, y: e.y, z: e.z}, {
  973. x: e.x + m.x,
  974. y: e.y + m.y,
  975. z: e.z + m.z
  976. }, {
  977. x: e.x + r.x,
  978. y: e.y + r.y,
  979. z: e.z + r.z
  980. }], c.chart), f.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, f.x, f.y], f.matrix[4] -=
  981. f.x * f.matrix[0] + f.y * f.matrix[2], f.matrix[5] -= f.x * f.matrix[1] + f.y * f.matrix[3]);
  982. return f
  983. }
  984. var y, r = b.addEvent, t = b.Axis, u = b.Chart, q = b.deg2rad, h = b.extend, v = b.merge, w = b.perspective,
  985. g = b.perspective3D, a = b.pick, k = b.shapeArea, n = b.splat, l = b.Tick, p = b.wrap;
  986. v(!0, t.prototype.defaultOptions, {
  987. labels: {position3d: "offset", skew3d: !1},
  988. title: {position3d: null, skew3d: null}
  989. });
  990. r(t, "afterSetOptions", function () {
  991. var c;
  992. this.chart.is3d && this.chart.is3d() && "colorAxis" !== this.coll && (c = this.options, c.tickWidth = a(c.tickWidth, 0), c.gridLineWidth =
  993. a(c.gridLineWidth, 1))
  994. });
  995. p(t.prototype, "getPlotLinePath", function (a) {
  996. var c = a.apply(this, [].slice.call(arguments, 1));
  997. if (!this.chart.is3d() || "colorAxis" === this.coll || null === c) return c;
  998. var b = this.chart, f = b.options.chart.options3d, f = this.isZAxis ? b.plotWidth : f.depth, b = b.frame3d,
  999. c = [this.swapZ({x: c[1], y: c[2], z: 0}), this.swapZ({x: c[1], y: c[2], z: f}), this.swapZ({
  1000. x: c[4],
  1001. y: c[5],
  1002. z: 0
  1003. }), this.swapZ({x: c[4], y: c[5], z: f})], f = [];
  1004. this.horiz ? (this.isZAxis ? (b.left.visible && f.push(c[0], c[2]), b.right.visible && f.push(c[1], c[3])) :
  1005. (b.front.visible && f.push(c[0], c[2]), b.back.visible && f.push(c[1], c[3])), b.top.visible && f.push(c[0], c[1]), b.bottom.visible && f.push(c[2], c[3])) : (b.front.visible && f.push(c[0], c[2]), b.back.visible && f.push(c[1], c[3]), b.left.visible && f.push(c[0], c[1]), b.right.visible && f.push(c[2], c[3]));
  1006. f = w(f, this.chart, !1);
  1007. return this.chart.renderer.toLineSegments(f)
  1008. });
  1009. p(t.prototype, "getLinePath", function (a) {
  1010. return this.chart.is3d() && "colorAxis" !== this.coll ? [] : a.apply(this, [].slice.call(arguments, 1))
  1011. });
  1012. p(t.prototype, "getPlotBandPath",
  1013. function (a) {
  1014. if (!this.chart.is3d() || "colorAxis" === this.coll) return a.apply(this, [].slice.call(arguments, 1));
  1015. var c = arguments, b = c[2], f = [], c = this.getPlotLinePath(c[1]), b = this.getPlotLinePath(b);
  1016. if (c && b) for (var g = 0; g < c.length; g += 6) f.push("M", c[g + 1], c[g + 2], "L", c[g + 4], c[g + 5], "L", b[g + 4], b[g + 5], "L", b[g + 1], b[g + 2], "Z");
  1017. return f
  1018. });
  1019. p(l.prototype, "getMarkPath", function (a) {
  1020. var c = a.apply(this, [].slice.call(arguments, 1)),
  1021. c = [x(this.axis, {x: c[1], y: c[2], z: 0}), x(this.axis, {x: c[4], y: c[5], z: 0})];
  1022. return this.axis.chart.renderer.toLineSegments(c)
  1023. });
  1024. r(l, "afterGetLabelPosition", function (a) {
  1025. h(a.pos, x(this.axis, a.pos))
  1026. });
  1027. p(t.prototype, "getTitlePosition", function (a) {
  1028. var c = a.apply(this, [].slice.call(arguments, 1));
  1029. return x(this, c, !0)
  1030. });
  1031. r(t, "drawCrosshair", function (a) {
  1032. this.chart.is3d() && "colorAxis" !== this.coll && a.point && (a.point.crosshairPos = this.isXAxis ? a.point.axisXpos : this.len - a.point.axisYpos)
  1033. });
  1034. r(t, "destroy", function () {
  1035. ["backFrame", "bottomFrame", "sideFrame"].forEach(function (a) {
  1036. this[a] && (this[a] = this[a].destroy())
  1037. }, this)
  1038. });
  1039. t.prototype.swapZ = function (a,
  1040. b) {
  1041. return this.isZAxis ? (b = b ? 0 : this.chart.plotLeft, {x: b + a.z, y: a.y, z: a.x - b}) : a
  1042. };
  1043. y = b.ZAxis = function () {
  1044. this.init.apply(this, arguments)
  1045. };
  1046. h(y.prototype, t.prototype);
  1047. h(y.prototype, {
  1048. isZAxis: !0, setOptions: function (a) {
  1049. a = v({offset: 0, lineWidth: 0}, a);
  1050. t.prototype.setOptions.call(this, a);
  1051. this.coll = "zAxis"
  1052. }, setAxisSize: function () {
  1053. t.prototype.setAxisSize.call(this);
  1054. this.width = this.len = this.chart.options.chart.options3d.depth;
  1055. this.right = this.chart.chartWidth - this.width - this.left
  1056. }, getSeriesExtremes: function () {
  1057. var c =
  1058. this, b = c.chart;
  1059. c.hasVisibleSeries = !1;
  1060. c.dataMin = c.dataMax = c.ignoreMinPadding = c.ignoreMaxPadding = null;
  1061. c.buildStacks && c.buildStacks();
  1062. c.series.forEach(function (e) {
  1063. if (e.visible || !b.options.chart.ignoreHiddenSeries) c.hasVisibleSeries = !0, e = e.zData, e.length && (c.dataMin = Math.min(a(c.dataMin, e[0]), Math.min.apply(null, e)), c.dataMax = Math.max(a(c.dataMax, e[0]), Math.max.apply(null, e)))
  1064. })
  1065. }
  1066. });
  1067. r(u, "afterGetAxes", function () {
  1068. var a = this, b = this.options, b = b.zAxis = n(b.zAxis || {});
  1069. a.is3d() && (this.zAxis = [], b.forEach(function (c,
  1070. b) {
  1071. c.index = b;
  1072. c.isX = !0;
  1073. (new y(a, c)).setScale()
  1074. }))
  1075. });
  1076. p(t.prototype, "getSlotWidth", function (c, b) {
  1077. if (this.chart.is3d() && b && b.label && this.categories && this.chart.frameShapes) {
  1078. var e = this.chart, f = this.ticks, l = this.gridGroup.element.childNodes[0].getBBox(),
  1079. d = e.frameShapes.left.getBBox(), h = e.options.chart.options3d, e = {
  1080. x: e.plotWidth / 2,
  1081. y: e.plotHeight / 2,
  1082. z: h.depth / 2,
  1083. vd: a(h.depth, 1) * a(h.viewDistance, 0)
  1084. }, k, n, h = b.pos, p = f[h - 1], f = f[h + 1];
  1085. 0 !== h && p && p.label.xy && (k = g({x: p.label.xy.x, y: p.label.xy.y, z: null}, e, e.vd));
  1086. f && f.label.xy &&
  1087. (n = g({x: f.label.xy.x, y: f.label.xy.y, z: null}, e, e.vd));
  1088. f = {x: b.label.xy.x, y: b.label.xy.y, z: null};
  1089. f = g(f, e, e.vd);
  1090. return Math.abs(k ? f.x - k.x : n ? n.x - f.x : l.x - d.x)
  1091. }
  1092. return c.apply(this, [].slice.call(arguments, 1))
  1093. })
  1094. })(z);
  1095. (function (b) {
  1096. var x = b.addEvent, y = b.perspective, r = b.pick;
  1097. x(b.Series, "afterTranslate", function () {
  1098. this.chart.is3d() && this.translate3dPoints()
  1099. });
  1100. b.Series.prototype.translate3dPoints = function () {
  1101. var b = this.chart, u = r(this.zAxis, b.options.zAxis[0]), q = [], h, v, w;
  1102. for (w = 0; w < this.data.length; w++) h = this.data[w],
  1103. u && u.translate ? (v = u.isLog && u.val2lin ? u.val2lin(h.z) : h.z, h.plotZ = u.translate(v), h.isInside = h.isInside ? v >= u.min && v <= u.max : !1) : h.plotZ = 0, h.axisXpos = h.plotX, h.axisYpos = h.plotY, h.axisZpos = h.plotZ, q.push({
  1104. x: h.plotX,
  1105. y: h.plotY,
  1106. z: h.plotZ
  1107. });
  1108. b = y(q, b, !0);
  1109. for (w = 0; w < this.data.length; w++) h = this.data[w], u = b[w], h.plotX = u.x, h.plotY = u.y, h.plotZ = u.z
  1110. }
  1111. })(z);
  1112. (function (b) {
  1113. function x(b) {
  1114. var g = b.apply(this, [].slice.call(arguments, 1));
  1115. this.chart.is3d && this.chart.is3d() && (g.stroke = this.options.edgeColor || g.fill, g["stroke-width"] =
  1116. t(this.options.edgeWidth, 1));
  1117. return g
  1118. }
  1119. var y = b.addEvent, r = b.perspective, t = b.pick, u = b.Series, q = b.seriesTypes, h = b.svg, v = b.wrap;
  1120. v(q.column.prototype, "translate", function (b) {
  1121. b.apply(this, [].slice.call(arguments, 1));
  1122. this.chart.is3d() && this.translate3dShapes()
  1123. });
  1124. v(b.Series.prototype, "alignDataLabel", function (b) {
  1125. arguments[3].outside3dPlot = arguments[1].outside3dPlot;
  1126. b.apply(this, [].slice.call(arguments, 1))
  1127. });
  1128. v(b.Series.prototype, "justifyDataLabel", function (b) {
  1129. return arguments[2].outside3dPlot ? !1 : b.apply(this,
  1130. [].slice.call(arguments, 1))
  1131. });
  1132. q.column.prototype.translate3dPoints = function () {
  1133. };
  1134. q.column.prototype.translate3dShapes = function () {
  1135. var b = this, g = b.chart, a = b.options, h = a.depth || 25,
  1136. n = (a.stacking ? a.stack || 0 : b.index) * (h + (a.groupZPadding || 1)),
  1137. l = b.borderWidth % 2 ? .5 : 0;
  1138. g.inverted && !b.yAxis.reversed && (l *= -1);
  1139. !1 !== a.grouping && (n = 0);
  1140. n += a.groupZPadding || 1;
  1141. b.data.forEach(function (a) {
  1142. a.outside3dPlot = null;
  1143. if (null !== a.y) {
  1144. var c = a.shapeArgs, e = a.tooltipPos, k;
  1145. [["x", "width"], ["y", "height"]].forEach(function (e) {
  1146. k = c[e[0]] - l;
  1147. 0 > k && (c[e[1]] += c[e[0]] + l, c[e[0]] = -l, k = 0);
  1148. k + c[e[1]] > b[e[0] + "Axis"].len && 0 !== c[e[1]] && (c[e[1]] = b[e[0] + "Axis"].len - c[e[0]]);
  1149. if (0 !== c[e[1]] && (c[e[0]] >= b[e[0] + "Axis"].len || c[e[0]] + c[e[1]] <= l)) {
  1150. for (var f in c) c[f] = 0;
  1151. a.outside3dPlot = !0
  1152. }
  1153. });
  1154. "rect" === a.shapeType && (a.shapeType = "cuboid");
  1155. c.z = n;
  1156. c.depth = h;
  1157. c.insidePlotArea = !0;
  1158. e = r([{x: e[0], y: e[1], z: n}], g, !0)[0];
  1159. a.tooltipPos = [e.x, e.y]
  1160. }
  1161. });
  1162. b.z = n
  1163. };
  1164. v(q.column.prototype, "animate", function (b) {
  1165. if (this.chart.is3d()) {
  1166. var g = arguments[1], a = this.yAxis, k = this, n = this.yAxis.reversed;
  1167. h && (g ? k.data.forEach(function (b) {
  1168. null !== b.y && (b.height = b.shapeArgs.height, b.shapey = b.shapeArgs.y, b.shapeArgs.height = 1, n || (b.shapeArgs.y = b.stackY ? b.plotY + a.translate(b.stackY) : b.plotY + (b.negative ? -b.height : b.height)))
  1169. }) : (k.data.forEach(function (a) {
  1170. null !== a.y && (a.shapeArgs.height = a.height, a.shapeArgs.y = a.shapey, a.graphic && a.graphic.animate(a.shapeArgs, k.options.animation))
  1171. }), this.drawDataLabels(), k.animate = null))
  1172. } else b.apply(this, [].slice.call(arguments, 1))
  1173. });
  1174. v(q.column.prototype, "plotGroup", function (b,
  1175. g, a, h, n, l) {
  1176. this.chart.is3d() && l && !this[g] && (this.chart.columnGroup || (this.chart.columnGroup = this.chart.renderer.g("columnGroup").add(l)), this[g] = this.chart.columnGroup, this.chart.columnGroup.attr(this.getPlotBox()), this[g].survive = !0);
  1177. return b.apply(this, Array.prototype.slice.call(arguments, 1))
  1178. });
  1179. v(q.column.prototype, "setVisible", function (b, g) {
  1180. var a = this, h;
  1181. a.chart.is3d() && a.data.forEach(function (b) {
  1182. h = (b.visible = b.options.visible = g = void 0 === g ? !b.visible : g) ? "visible" : "hidden";
  1183. a.options.data[a.data.indexOf(b)] =
  1184. b.options;
  1185. b.graphic && b.graphic.attr({visibility: h})
  1186. });
  1187. b.apply(this, Array.prototype.slice.call(arguments, 1))
  1188. });
  1189. q.column.prototype.handle3dGrouping = !0;
  1190. y(u, "afterInit", function () {
  1191. if (this.chart.is3d() && this.handle3dGrouping) {
  1192. var b = this.options, g = b.grouping, a = b.stacking, h = t(this.yAxis.options.reversedStacks, !0),
  1193. n = 0;
  1194. if (void 0 === g || g) {
  1195. g = this.chart.retrieveStacks(a);
  1196. n = b.stack || 0;
  1197. for (a = 0; a < g[n].series.length && g[n].series[a] !== this; a++) ;
  1198. n = 10 * (g.totalStacks - g[n].position) + (h ? a : -a);
  1199. this.xAxis.reversed || (n = 10 *
  1200. g.totalStacks - n)
  1201. }
  1202. b.zIndex = n
  1203. }
  1204. });
  1205. v(q.column.prototype, "pointAttribs", x);
  1206. q.columnrange && (v(q.columnrange.prototype, "pointAttribs", x), q.columnrange.prototype.plotGroup = q.column.prototype.plotGroup, q.columnrange.prototype.setVisible = q.column.prototype.setVisible);
  1207. v(u.prototype, "alignDataLabel", function (b) {
  1208. if (this.chart.is3d() && this instanceof q.column) {
  1209. var g = arguments, a = g[4], g = g[1], h = {x: a.x, y: a.y, z: this.z}, h = r([h], this.chart, !0)[0];
  1210. a.x = h.x;
  1211. a.y = g.outside3dPlot ? -9E9 : h.y
  1212. }
  1213. b.apply(this, [].slice.call(arguments,
  1214. 1))
  1215. });
  1216. v(b.StackItem.prototype, "getStackBox", function (h, g) {
  1217. var a = h.apply(this, [].slice.call(arguments, 1));
  1218. if (g.is3d()) {
  1219. var k = {x: a.x, y: a.y, z: 0}, k = b.perspective([k], g, !0)[0];
  1220. a.x = k.x;
  1221. a.y = k.y
  1222. }
  1223. return a
  1224. })
  1225. })(z);
  1226. (function (b) {
  1227. var x = b.deg2rad, y = b.pick, r = b.seriesTypes, t = b.svg;
  1228. b = b.wrap;
  1229. b(r.pie.prototype, "translate", function (b) {
  1230. b.apply(this, [].slice.call(arguments, 1));
  1231. if (this.chart.is3d()) {
  1232. var q = this, h = q.options, u = h.depth || 0, r = q.chart.options.chart.options3d, g = r.alpha,
  1233. a = r.beta, k = h.stacking ? (h.stack || 0) * u : q._i *
  1234. u, k = k + u / 2;
  1235. !1 !== h.grouping && (k = 0);
  1236. q.data.forEach(function (b) {
  1237. var l = b.shapeArgs;
  1238. b.shapeType = "arc3d";
  1239. l.z = k;
  1240. l.depth = .75 * u;
  1241. l.alpha = g;
  1242. l.beta = a;
  1243. l.center = q.center;
  1244. l = (l.end + l.start) / 2;
  1245. b.slicedTranslation = {
  1246. translateX: Math.round(Math.cos(l) * h.slicedOffset * Math.cos(g * x)),
  1247. translateY: Math.round(Math.sin(l) * h.slicedOffset * Math.cos(g * x))
  1248. }
  1249. })
  1250. }
  1251. });
  1252. b(r.pie.prototype.pointClass.prototype, "haloPath", function (b) {
  1253. var q = arguments;
  1254. return this.series.chart.is3d() ? [] : b.call(this, q[1])
  1255. });
  1256. b(r.pie.prototype, "pointAttribs", function (b,
  1257. q, h) {
  1258. b = b.call(this, q, h);
  1259. h = this.options;
  1260. this.chart.is3d() && !this.chart.styledMode && (b.stroke = h.edgeColor || q.color || this.color, b["stroke-width"] = y(h.edgeWidth, 1));
  1261. return b
  1262. });
  1263. b(r.pie.prototype, "drawDataLabels", function (b) {
  1264. if (this.chart.is3d()) {
  1265. var q = this.chart.options.chart.options3d;
  1266. this.data.forEach(function (b) {
  1267. var h = b.shapeArgs, r = h.r, g = (h.start + h.end) / 2;
  1268. b = b.labelPosition;
  1269. var a = b.connectorPosition, k = -r * (1 - Math.cos((h.alpha || q.alpha) * x)) * Math.sin(g),
  1270. n = r * (Math.cos((h.beta || q.beta) * x) - 1) * Math.cos(g);
  1271. [b.natural, a.breakAt, a.touchingSliceAt].forEach(function (a) {
  1272. a.x += n;
  1273. a.y += k
  1274. })
  1275. })
  1276. }
  1277. b.apply(this, [].slice.call(arguments, 1))
  1278. });
  1279. b(r.pie.prototype, "addPoint", function (b) {
  1280. b.apply(this, [].slice.call(arguments, 1));
  1281. this.chart.is3d() && this.update(this.userOptions, !0)
  1282. });
  1283. b(r.pie.prototype, "animate", function (b) {
  1284. if (this.chart.is3d()) {
  1285. var q = arguments[1], h = this.options.animation, r = this.center, u = this.group, g = this.markerGroup;
  1286. t && (!0 === h && (h = {}), q ? (u.oldtranslateX = u.translateX, u.oldtranslateY = u.translateY, q = {
  1287. translateX: r[0],
  1288. translateY: r[1], scaleX: .001, scaleY: .001
  1289. }, u.attr(q), g && (g.attrSetters = u.attrSetters, g.attr(q))) : (q = {
  1290. translateX: u.oldtranslateX,
  1291. translateY: u.oldtranslateY,
  1292. scaleX: 1,
  1293. scaleY: 1
  1294. }, u.animate(q, h), g && g.animate(q, h), this.animate = null))
  1295. } else b.apply(this, [].slice.call(arguments, 1))
  1296. })
  1297. })(z);
  1298. (function (b) {
  1299. var x = b.Point, y = b.seriesType, r = b.seriesTypes;
  1300. y("scatter3d", "scatter", {tooltip: {pointFormat: "x: \x3cb\x3e{point.x}\x3c/b\x3e\x3cbr/\x3ey: \x3cb\x3e{point.y}\x3c/b\x3e\x3cbr/\x3ez: \x3cb\x3e{point.z}\x3c/b\x3e\x3cbr/\x3e"}},
  1301. {
  1302. pointAttribs: function (t) {
  1303. var u = r.scatter.prototype.pointAttribs.apply(this, arguments);
  1304. this.chart.is3d() && t && (u.zIndex = b.pointCameraDistance(t, this.chart));
  1305. return u
  1306. },
  1307. axisTypes: ["xAxis", "yAxis", "zAxis"],
  1308. pointArrayMap: ["x", "y", "z"],
  1309. parallelArrays: ["x", "y", "z"],
  1310. directTouch: !0
  1311. }, {
  1312. applyOptions: function () {
  1313. x.prototype.applyOptions.apply(this, arguments);
  1314. void 0 === this.z && (this.z = 0);
  1315. return this
  1316. }
  1317. })
  1318. })(z);
  1319. (function (b) {
  1320. var x = b.addEvent, y = b.Axis, r = b.SVGRenderer, t = b.VMLRenderer;
  1321. t && (b.setOptions({animate: !1}), t.prototype.face3d =
  1322. r.prototype.face3d, t.prototype.polyhedron = r.prototype.polyhedron, t.prototype.elements3d = r.prototype.elements3d, t.prototype.element3d = r.prototype.element3d, t.prototype.cuboid = r.prototype.cuboid, t.prototype.cuboidPath = r.prototype.cuboidPath, t.prototype.toLinePath = r.prototype.toLinePath, t.prototype.toLineSegments = r.prototype.toLineSegments, t.prototype.arc3d = function (b) {
  1323. b = r.prototype.arc3d.call(this, b);
  1324. b.css({zIndex: b.zIndex});
  1325. return b
  1326. }, b.VMLRenderer.prototype.arc3dPath = b.SVGRenderer.prototype.arc3dPath,
  1327. x(y, "render", function () {
  1328. this.sideFrame && (this.sideFrame.css({zIndex: 0}), this.sideFrame.front.attr({fill: this.sideFrame.color}));
  1329. this.bottomFrame && (this.bottomFrame.css({zIndex: 1}), this.bottomFrame.front.attr({fill: this.bottomFrame.color}));
  1330. this.backFrame && (this.backFrame.css({zIndex: 0}), this.backFrame.front.attr({fill: this.backFrame.color}))
  1331. }))
  1332. })(z)
  1333. });
  1334. //# sourceMappingURL=highcharts-3d.js.map