summaryrefslogtreecommitdiff
path: root/html/includes
diff options
context:
space:
mode:
Diffstat (limited to 'html/includes')
-rwxr-xr-xhtml/includes/header.php38
-rw-r--r--html/includes/js/adapters/standalone-framework.src.js603
-rw-r--r--html/includes/js/highcharts-3d.src.js1383
-rw-r--r--html/includes/js/highcharts-more.src.js2575
-rw-r--r--html/includes/js/highcharts.src.js17737
-rw-r--r--html/includes/js/jquery.tooltip.js119
-rw-r--r--html/includes/js/jquery.tooltipster.js1327
-rw-r--r--html/includes/js/modules/canvas-tools.src.js3113
-rw-r--r--html/includes/js/modules/data.src.js1025
-rw-r--r--html/includes/js/modules/drilldown.src.js606
-rw-r--r--html/includes/js/modules/exporting.src.js719
-rw-r--r--html/includes/js/modules/funnel.src.js310
-rw-r--r--html/includes/js/modules/heatmap.src.js687
-rw-r--r--html/includes/js/modules/no-data-to-display.src.js130
-rw-r--r--html/includes/js/modules/solid-gauge.src.js234
15 files changed, 19 insertions, 30587 deletions
diff --git a/html/includes/header.php b/html/includes/header.php
index 26fdcf3..52ab2c3 100755
--- a/html/includes/header.php
+++ b/html/includes/header.php
@@ -5,7 +5,7 @@ ob_start();
// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
-// always modified
+// Always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// HTTP/1.1
@@ -27,7 +27,6 @@ if (isset($_COOKIE['uts_lastvisit'])) {
}
setcookie('uts_lastvisit', time(), time()+60*60*24*30*365);
-
echo'
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
@@ -35,28 +34,29 @@ echo'
<title>Unreal Tournament Stats - Powered by UTStats</title>
<meta http-equiv="Content-Type" content="text/html; CHARSET=iso-8859-1">
<link rel="icon" href="images/favicon.ico" type="image/ico">
- <link rel="stylesheet" href="style.css">
+
+ <link rel="stylesheet" type="text/css" href="includes/css/tooltipster.css">
+ <link rel="stylesheet" href="style.css">
+
<script type="text/javascript" src="includes/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript">
- <!--
+ <!--
var ol_fgclass="dark"; var ol_bgclass="darkbox"; var ol_textfontclass="dark"; var ol_captionfontclass="hlheading";
- -->
+ -->
</script>
<script type="text/javascript" src="includes/overlib_mini.js"><!-- overLIB (c) Erik Bosrup --></script>
-<script type="text/javascript" src="includes/js/adapters/standalone-framework.js"></script>
-<script type="text/javascript" src="includes/js/highcharts.js"></script>
-<script type="text/javascript" src="includes/js/highcharts-more.js"></script>
-<script type="text/javascript" src="includes/js/highcharts-functions.js"></script>
-<script type="text/javascript" src="includes/js/themes/dark-blue.js"></script>
-<script type="text/javascript" src="./includes/js/clickrows.js"></script>
-<link rel="stylesheet" type="text/css" href="includes/css/tooltipster.css" >
-<script type="text/javascript" src="includes/js/jquery.tooltipster.min.js"></script>
-<script type="text/javascript">
- $(document).ready(function() {
- $(".tooltip").tooltipster();
- });
- </script>
-
+ <script type="text/javascript" src="includes/js/adapters/standalone-framework.js"></script>
+ <script type="text/javascript" src="includes/js/highcharts.js"></script>
+ <script type="text/javascript" src="includes/js/highcharts-more.js"></script>
+ <script type="text/javascript" src="includes/js/highcharts-functions.js"></script>
+ <script type="text/javascript" src="includes/js/themes/dark-blue.js"></script>
+ <script type="text/javascript" src="includes/js/jquery.tooltipster.min.js"></script>
+ <script type="text/javascript" src="./includes/js/clickrows.js"></script>
+ <script type="text/javascript">
+ $(document).ready(function() {
+ $(".tooltip").tooltipster();
+ });
+ </script>
</head>
<body>
diff --git a/html/includes/js/adapters/standalone-framework.src.js b/html/includes/js/adapters/standalone-framework.src.js
deleted file mode 100644
index f403b0d..0000000
--- a/html/includes/js/adapters/standalone-framework.src.js
+++ /dev/null
@@ -1,603 +0,0 @@
-/**
- * @license Highcharts JS v4.0.4 (2014-09-02)
- *
- * Standalone Highcharts Framework
- *
- * License: MIT License
- */
-
-
-/*global Highcharts */
-var HighchartsAdapter = (function () {
-
-var UNDEFINED,
- doc = document,
- emptyArray = [],
- timers = [],
- timerId,
- animSetters = {},
- Fx;
-
-Math.easeInOutSine = function (t, b, c, d) {
- return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
-};
-
-
-
-/**
- * Extend given object with custom events
- */
-function augment(obj) {
- function removeOneEvent(el, type, fn) {
- el.removeEventListener(type, fn, false);
- }
-
- function IERemoveOneEvent(el, type, fn) {
- fn = el.HCProxiedMethods[fn.toString()];
- el.detachEvent('on' + type, fn);
- }
-
- function removeAllEvents(el, type) {
- var events = el.HCEvents,
- remove,
- types,
- len,
- n;
-
- if (el.removeEventListener) {
- remove = removeOneEvent;
- } else if (el.attachEvent) {
- remove = IERemoveOneEvent;
- } else {
- return; // break on non-DOM events
- }
-
-
- if (type) {
- types = {};
- types[type] = true;
- } else {
- types = events;
- }
-
- for (n in types) {
- if (events[n]) {
- len = events[n].length;
- while (len--) {
- remove(el, n, events[n][len]);
- }
- }
- }
- }
-
- if (!obj.HCExtended) {
- Highcharts.extend(obj, {
- HCExtended: true,
-
- HCEvents: {},
-
- bind: function (name, fn) {
- var el = this,
- events = this.HCEvents,
- wrappedFn;
-
- // handle DOM events in modern browsers
- if (el.addEventListener) {
- el.addEventListener(name, fn, false);
-
- // handle old IE implementation
- } else if (el.attachEvent) {
-
- wrappedFn = function (e) {
- e.target = e.srcElement || window; // #2820
- fn.call(el, e);
- };
-
- if (!el.HCProxiedMethods) {
- el.HCProxiedMethods = {};
- }
-
- // link wrapped fn with original fn, so we can get this in removeEvent
- el.HCProxiedMethods[fn.toString()] = wrappedFn;
-
- el.attachEvent('on' + name, wrappedFn);
- }
-
-
- if (events[name] === UNDEFINED) {
- events[name] = [];
- }
-
- events[name].push(fn);
- },
-
- unbind: function (name, fn) {
- var events,
- index;
-
- if (name) {
- events = this.HCEvents[name] || [];
- if (fn) {
- index = HighchartsAdapter.inArray(fn, events);
- if (index > -1) {
- events.splice(index, 1);
- this.HCEvents[name] = events;
- }
- if (this.removeEventListener) {
- removeOneEvent(this, name, fn);
- } else if (this.attachEvent) {
- IERemoveOneEvent(this, name, fn);
- }
- } else {
- removeAllEvents(this, name);
- this.HCEvents[name] = [];
- }
- } else {
- removeAllEvents(this);
- this.HCEvents = {};
- }
- },
-
- trigger: function (name, args) {
- var events = this.HCEvents[name] || [],
- target = this,
- len = events.length,
- i,
- preventDefault,
- fn;
-
- // Attach a simple preventDefault function to skip default handler if called
- preventDefault = function () {
- args.defaultPrevented = true;
- };
-
- for (i = 0; i < len; i++) {
- fn = events[i];
-
- // args is never null here
- if (args.stopped) {
- return;
- }
-
- args.preventDefault = preventDefault;
- args.target = target;
-
- // If the type is not set, we're running a custom event (#2297). If it is set,
- // we're running a browser event, and setting it will cause en error in
- // IE8 (#2465).
- if (!args.type) {
- args.type = name;
- }
-
-
-
- // If the event handler return false, prevent the default handler from executing
- if (fn.call(this, args) === false) {
- args.preventDefault();
- }
- }
- }
- });
- }
-
- return obj;
-}
-
-
-return {
-
- /**
- * Initialize the adapter. This is run once as Highcharts is first run.
- */
- init: function (pathAnim) {
-
- /**
- * Compatibility section to add support for legacy IE. This can be removed if old IE
- * support is not needed.
- */
- if (!doc.defaultView) {
- this._getStyle = function (el, prop) {
- var val;
- if (el.style[prop]) {
- return el.style[prop];
- } else {
- if (prop === 'opacity') {
- prop = 'filter';
- }
- /*jslint unparam: true*/
- val = el.currentStyle[prop.replace(/\-(\w)/g, function (a, b) { return b.toUpperCase(); })];
- if (prop === 'filter') {
- val = val.replace(
- /alpha\(opacity=([0-9]+)\)/,
- function (a, b) {
- return b / 100;
- }
- );
- }
- /*jslint unparam: false*/
- return val === '' ? 1 : val;
- }
- };
- this.adapterRun = function (elem, method) {
- var alias = { width: 'clientWidth', height: 'clientHeight' }[method];
-
- if (alias) {
- elem.style.zoom = 1;
- return elem[alias] - 2 * parseInt(HighchartsAdapter._getStyle(elem, 'padding'), 10);
- }
- };
- }
-
- if (!Array.prototype.forEach) {
- this.each = function (arr, fn) { // legacy
- var i = 0,
- len = arr.length;
- for (; i < len; i++) {
- if (fn.call(arr[i], arr[i], i, arr) === false) {
- return i;
- }
- }
- };
- }
-
- if (!Array.prototype.indexOf) {
- this.inArray = function (item, arr) {
- var len,
- i = 0;
-
- if (arr) {
- len = arr.length;
-
- for (; i < len; i++) {
- if (arr[i] === item) {
- return i;
- }
- }
- }
-
- return -1;
- };
- }
-
- if (!Array.prototype.filter) {
- this.grep = function (elements, callback) {
- var ret = [],
- i = 0,
- length = elements.length;
-
- for (; i < length; i++) {
- if (!!callback(elements[i], i)) {
- ret.push(elements[i]);
- }
- }
-
- return ret;
- };
- }
-
- //--- End compatibility section ---
-
-
- /**
- * Start of animation specific code
- */
- Fx = function (elem, options, prop) {
- this.options = options;
- this.elem = elem;
- this.prop = prop;
- };
- Fx.prototype = {
-
- update: function () {
- var styles,
- paths = this.paths,
- elem = this.elem,
- elemelem = elem.element; // if destroyed, it is null
-
- // Animation setter defined from outside
- if (animSetters[this.prop]) {
- animSetters[this.prop](this);
-
- // Animating a path definition on SVGElement
- } else if (paths && elemelem) {
- elem.attr('d', pathAnim.step(paths[0], paths[1], this.now, this.toD));
-
- // Other animations on SVGElement
- } else if (elem.attr) {
- if (elemelem) {
- elem.attr(this.prop, this.now);
- }
-
- // HTML styles
- } else {
- styles = {};
- styles[this.prop] = this.now + this.unit;
- Highcharts.css(elem, styles);
- }
-
- if (this.options.step) {
- this.options.step.call(this.elem, this.now, this);
- }
-
- },
- custom: function (from, to, unit) {
- var self = this,
- t = function (gotoEnd) {
- return self.step(gotoEnd);
- },
- i;
-
- this.startTime = +new Date();
- this.start = from;
- this.end = to;
- this.unit = unit;
- this.now = this.start;
- this.pos = this.state = 0;
-
- t.elem = this.elem;
-
- if (t() && timers.push(t) === 1) {
- timerId = setInterval(function () {
-
- for (i = 0; i < timers.length; i++) {
- if (!timers[i]()) {
- timers.splice(i--, 1);
- }
- }
-
- if (!timers.length) {
- clearInterval(timerId);
- }
- }, 13);
- }
- },
-
- step: function (gotoEnd) {
- var t = +new Date(),
- ret,
- done,
- options = this.options,
- elem = this.elem,
- i;
-
- if (elem.stopAnimation || (elem.attr && !elem.element)) { // #2616, element including flag is destroyed
- ret = false;
-
- } else if (gotoEnd || t >= options.duration + this.startTime) {
- this.now = this.end;
- this.pos = this.state = 1;
- this.update();
-
- this.options.curAnim[this.prop] = true;
-
- done = true;
- for (i in options.curAnim) {
- if (options.curAnim[i] !== true) {
- done = false;
- }
- }
-
- if (done) {
- if (options.complete) {
- options.complete.call(elem);
- }
- }
- ret = false;
-
- } else {
- var n = t - this.startTime;
- this.state = n / options.duration;
- this.pos = options.easing(n, 0, 1, options.duration);
- this.now = this.start + ((this.end - this.start) * this.pos);
- this.update();
- ret = true;
- }
- return ret;
- }
- };
-
- /**
- * The adapter animate method
- */
- this.animate = function (el, prop, opt) {
- var start,
- unit = '',
- end,
- fx,
- args,
- name;
-
- el.stopAnimation = false; // ready for new
-
- if (typeof opt !== 'object' || opt === null) {
- args = arguments;
- opt = {
- duration: args[2],
- easing: args[3],
- complete: args[4]
- };
- }
- if (typeof opt.duration !== 'number') {
- opt.duration = 400;
- }
- opt.easing = Math[opt.easing] || Math.easeInOutSine;
- opt.curAnim = Highcharts.extend({}, prop);
-
- for (name in prop) {
- fx = new Fx(el, opt, name);
- end = null;
-
- if (name === 'd') {
- fx.paths = pathAnim.init(
- el,
- el.d,
- prop.d
- );
- fx.toD = prop.d;
- start = 0;
- end = 1;
- } else if (el.attr) {
- start = el.attr(name);
- } else {
- start = parseFloat(HighchartsAdapter._getStyle(el, name)) || 0;
- if (name !== 'opacity') {
- unit = 'px';
- }
- }
-
- if (!end) {
- end = prop[name];
- }
- fx.custom(start, end, unit);
- }
- };
- },
-
- /**
- * Internal method to return CSS value for given element and property
- */
- _getStyle: function (el, prop) {
- return window.getComputedStyle(el, undefined).getPropertyValue(prop);
- },
-
- /**
- * Add an animation setter for a specific property
- */
- addAnimSetter: function (prop, fn) {
- animSetters[prop] = fn;
- },
-
- /**
- * Downloads a script and executes a callback when done.
- * @param {String} scriptLocation
- * @param {Function} callback
- */
- getScript: function (scriptLocation, callback) {
- // We cannot assume that Assets class from mootools-more is available so instead insert a script tag to download script.
- var head = doc.getElementsByTagName('head')[0],
- script = doc.createElement('script');
-
- script.type = 'text/javascript';
- script.src = scriptLocation;
- script.onload = callback;
-
- head.appendChild(script);
- },
-
- /**
- * Return the index of an item in an array, or -1 if not found
- */
- inArray: function (item, arr) {
- return arr.indexOf ? arr.indexOf(item) : emptyArray.indexOf.call(arr, item);
- },
-
-
- /**
- * A direct link to adapter methods
- */
- adapterRun: function (elem, method) {
- return parseInt(HighchartsAdapter._getStyle(elem, method), 10);
- },
-
- /**
- * Filter an array
- */
- grep: function (elements, callback) {
- return emptyArray.filter.call(elements, callback);
- },
-
- /**
- * Map an array
- */
- map: function (arr, fn) {
- var results = [], i = 0, len = arr.length;
-
- for (; i < len; i++) {
- results[i] = fn.call(arr[i], arr[i], i, arr);
- }
-
- return results;
- },
-
- /**
- * Get the element's offset position, corrected by overflow:auto. Loosely based on jQuery's offset method.
- */
- offset: function (el) {
- var docElem = document.documentElement,
- box = el.getBoundingClientRect();
-
- return {
- top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0),
- left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0)
- };
- },
-
- /**
- * Add an event listener
- */
- addEvent: function (el, type, fn) {
- augment(el).bind(type, fn);
- },
-
- /**
- * Remove event added with addEvent
- */
- removeEvent: function (el, type, fn) {
- augment(el).unbind(type, fn);
- },
-
- /**
- * Fire an event on a custom object
- */
- fireEvent: function (el, type, eventArguments, defaultFunction) {
- var e;
-
- if (doc.createEvent && (el.dispatchEvent || el.fireEvent)) {
- e = doc.createEvent('Events');
- e.initEvent(type, true, true);
- e.target = el;
-
- Highcharts.extend(e, eventArguments);
-
- if (el.dispatchEvent) {
- el.dispatchEvent(e);
- } else {
- el.fireEvent(type, e);
- }
-
- } else if (el.HCExtended === true) {
- eventArguments = eventArguments || {};
- el.trigger(type, eventArguments);
- }
-
- if (eventArguments && eventArguments.defaultPrevented) {
- defaultFunction = null;
- }
-
- if (defaultFunction) {
- defaultFunction(eventArguments);
- }
- },
-
- washMouseEvent: function (e) {
- return e;
- },
-
-
- /**
- * Stop running animation
- */
- stop: function (el) {
- el.stopAnimation = true;
- },
-
- /**
- * Utility for iterating over an array. Parameters are reversed compared to jQuery.
- * @param {Array} arr
- * @param {Function} fn
- */
- each: function (arr, fn) { // modern browsers
- return Array.prototype.forEach.call(arr, fn);
- }
-};
-}());
diff --git a/html/includes/js/highcharts-3d.src.js b/html/includes/js/highcharts-3d.src.js
deleted file mode 100644
index 7cee3e5..0000000
--- a/html/includes/js/highcharts-3d.src.js
+++ /dev/null
@@ -1,1383 +0,0 @@
-// ==ClosureCompiler==
-// @compilation_level SIMPLE_OPTIMIZATIONS
-
-/**
- * @license Highcharts JS v4.0.4 (2014-09-02)
- *
- * (c) 2009-2013 Torstein Hønsi
- *
- * License: www.highcharts.com/license
- */
-
-// JSLint options:
-/*global Highcharts, HighchartsAdapter, document, window, navigator, setInterval, clearInterval, clearTimeout, setTimeout, location, jQuery, $, console */
-
-(function (Highcharts) {
- /**
- Shorthands for often used function
-*/
-/**
- * Mathematical Functionility
- */
-var PI = Math.PI,
- deg2rad = (PI / 180), // degrees to radians
- sin = Math.sin,
- cos = Math.cos,
-
- round = Math.round;
-
-function perspective(points, angle2, angle1, origin) {
- angle1 *= deg2rad;
- angle2 *= deg2rad;
-
- var result = [],
- xe,
- ye,
- ze;
-
- angle1 *= -1;
-
- xe = origin.x;
- ye = origin.y;
- ze = (origin.z === 0 ? 0.0001 : origin.z) * (origin.vd || 25);
-
- // some kind of minimum?
- ze = Math.max(500, ze);
-
- var s1 = sin(angle1),
- c1 = cos(angle1),
- s2 = sin(angle2),
- c2 = cos(angle2);
-
- var x, y, z, p;
-
- Highcharts.each(points, function (point) {
- x = point.x - xe;
- y = point.y - ye;
- z = point.z || 0;
-
- p = {
- x: c1 * x - s1 * z,
- y: -s1 * s2 * x - c1 * s2 * z + c2 * y,
- z: s1 * c2 * x + c1 * c2 * z + s2 * y
- };
-
- p.x = p.x * ((ze - p.z) / ze) + xe;
- p.y = p.y * ((ze - p.z) / ze) + ye;
-
- result.push({x: round(p.x), y: round(p.y), z: round(p.z)});
- });
- return result;
-}
-/***
- EXTENSION TO THE SVG-RENDERER TO ENABLE 3D SHAPES
- ***/
-////// HELPER METHODS //////
-var dFactor = (4 * (Math.sqrt(2) - 1) / 3) / (PI / 2);
-
-function defined(obj) {
- return obj !== undefined && obj !== null;
-}
-
-
-function curveTo(cx, cy, rx, ry, start, end, dx, dy) {
- var result = [];
- if ((end > start) && (end - start > PI / 2 + 0.0001)) {
- result = result.concat(curveTo(cx, cy, rx, ry, start, start + (PI / 2), dx, dy));
- result = result.concat(curveTo(cx, cy, rx, ry, start + (PI / 2), end, dx, dy));
- return result;
- } else if ((end < start) && (start - end > PI / 2 + 0.0001)) {
- result = result.concat(curveTo(cx, cy, rx, ry, start, start - (PI / 2), dx, dy));
- result = result.concat(curveTo(cx, cy, rx, ry, start - (PI / 2), end, dx, dy));
- return result;
- } else {
- var arcAngle = end - start;
- return [
- 'C',
- cx + (rx * cos(start)) - ((rx * dFactor * arcAngle) * sin(start)) + dx,
- cy + (ry * sin(start)) + ((ry * dFactor * arcAngle) * cos(start)) + dy,
- cx + (rx * cos(end)) + ((rx * dFactor * arcAngle) * sin(end)) + dx,
- cy + (ry * sin(end)) - ((ry * dFactor * arcAngle) * cos(end)) + dy,
-
- cx + (rx * cos(end)) + dx,
- cy + (ry * sin(end)) + dy
- ];
- }
-}
-
-Highcharts.SVGRenderer.prototype.toLinePath = function (points, closed) {
- var result = [];
-
- // Put "L x y" for each point
- Highcharts.each(points, function (point) {
- result.push('L', point.x, point.y);
- });
-
- // Set the first element to M
- result[0] = 'M';
-
- // If it is a closed line, add Z
- if (closed) {
- result.push('Z');
- }
-
- return result;
-};
-
-////// CUBOIDS //////
-Highcharts.SVGRenderer.prototype.cuboid = function (shapeArgs) {
-
- var result = this.g(),
- paths = this.cuboidPath(shapeArgs);
-
- result.front = this.path(paths[0]).attr({zIndex: paths[3], 'stroke-linejoin': 'round'}).add(result);
- result.top = this.path(paths[1]).attr({zIndex: paths[4], 'stroke-linejoin': 'round'}).add(result);
- result.side = this.path(paths[2]).attr({zIndex: paths[5], 'stroke-linejoin': 'round'}).add(result);
-
- result.fillSetter = function (color) {
- var c0 = color,
- c1 = Highcharts.Color(color).brighten(0.1).get(),
- c2 = Highcharts.Color(color).brighten(-0.1).get();
-
- this.front.attr({fill: c0});
- this.top.attr({fill: c1});
- this.side.attr({fill: c2});
-
- this.color = color;
- return this;
- };
-
- result.opacitySetter = function (opacity) {
- this.front.attr({opacity: opacity});
- this.top.attr({opacity: opacity});
- this.side.attr({opacity: opacity});
- return this;
- };
-
- result.attr = function (args) {
- if (args.shapeArgs || defined(args.x)) {
- var shapeArgs = args.shapeArgs || args;
- var paths = this.renderer.cuboidPath(shapeArgs);
- this.front.attr({d: paths[0], zIndex: paths[3]});
- this.top.attr({d: paths[1], zIndex: paths[4]});
- this.side.attr({d: paths[2], zIndex: paths[5]});
- } else {
- Highcharts.SVGElement.prototype.attr.call(this, args);
- }
-
- return this;
- };
-
- result.animate = function (args, duration, complete) {
- if (defined(args.x) && defined(args.y)) {
- var paths = this.renderer.cuboidPath(args);
- this.front.attr({zIndex: paths[3]}).animate({d: paths[0]}, duration, complete);
- this.top.attr({zIndex: paths[4]}).animate({d: paths[1]}, duration, complete);
- this.side.attr({zIndex: paths[5]}).animate({d: paths[2]}, duration, complete);
- } else if (args.opacity) {
- this.front.animate(args, duration, complete);
- this.top.animate(args, duration, complete);
- this.side.animate(args, duration, complete);
- } else {
- Highcharts.SVGElement.prototype.animate.call(this, args, duration, complete);
- }
- return this;
- };
-
- result.destroy = function () {
- this.front.destroy();
- this.top.destroy();
- this.side.destroy();
-
- return null;
- };
-
- // Apply the Z index to the cuboid group
- result.attr({ zIndex: -paths[3] });
-
- return result;
-};
-
-
-Highcharts.SVGRenderer.prototype.cuboidPath = function (shapeArgs) {
- var x = shapeArgs.x,
- y = shapeArgs.y,
- z = shapeArgs.z,
- h = shapeArgs.height,
- w = shapeArgs.width,
- d = shapeArgs.depth,
- alpha = shapeArgs.alpha,
- beta = shapeArgs.beta,
- origin = shapeArgs.origin;
-
- var pArr = [
- {x: x, y: y, z: z},
- {x: x + w, y: y, z: z},
- {x: x + w, y: y + h, z: z},
- {x: x, y: y + h, z: z},
- {x: x, y: y + h, z: z + d},
- {x: x + w, y: y + h, z: z + d},
- {x: x + w, y: y, z: z + d},
- {x: x, y: y, z: z + d}
- ];
-
- pArr = perspective(pArr, alpha, beta, origin);
-
- var path1, // FRONT
- path2, // TOP OR BOTTOM
- path3; // LEFT OR RIGHT
-
- // front
- path1 = [
- 'M', pArr[0].x, pArr[0].y,
- 'L', pArr[1].x, pArr[1].y,
- 'L', pArr[2].x, pArr[2].y,
- 'L', pArr[3].x, pArr[3].y,
- 'Z'
- ];
- var z1 = (pArr[0].z + pArr[1].z + pArr[2].z + pArr[3].z) / 4;
-
- // top or bottom
- var top = [
- 'M', pArr[0].x, pArr[0].y,
- 'L', pArr[7].x, pArr[7].y,
- 'L', pArr[6].x, pArr[6].y,
- 'L', pArr[1].x, pArr[1].y,
- 'Z'
- ];
- var bottom = [
- 'M', pArr[3].x, pArr[3].y,
- 'L', pArr[2].x, pArr[2].y,
- 'L', pArr[5].x, pArr[5].y,
- 'L', pArr[4].x, pArr[4].y,
- 'Z'
- ];
- if (pArr[7].y < pArr[1].y) {
- path2 = top;
- } else if (pArr[4].y > pArr[2].y) {
- path2 = bottom;
- } else {
- path2 = [];
- }
- var z2 = (beta > 0 ? (pArr[0].z + pArr[7].z + pArr[6].z + pArr[1].z) / 4 : (pArr[3].z + pArr[2].z + pArr[5].z + pArr[4].z) / 4);
-
- // side
- var right = [
- 'M', pArr[1].x, pArr[1].y,
- 'L', pArr[2].x, pArr[2].y,
- 'L', pArr[5].x, pArr[5].y,
- 'L', pArr[6].x, pArr[6].y,
- 'Z'
- ];
- var left = [
- 'M', pArr[0].x, pArr[0].y,
- 'L', pArr[7].x, pArr[7].y,
- 'L', pArr[4].x, pArr[4].y,
- 'L', pArr[3].x, pArr[3].y,
- 'Z'
- ];
- if (pArr[6].x > pArr[1].x) {
- path3 = right;
- } else if (pArr[7].x < pArr[0].x) {
- path3 = left;
- } else {
- path3 = [];
- }
- var z3 = (alpha > 0 ? (pArr[1].z + pArr[2].z + pArr[5].z + pArr[6].z) / 4 : (pArr[0].z + pArr[7].z + pArr[4].z + pArr[3].z) / 4);
-
- return [path1, path2, path3, z1, z2, z3];
-};
-
-////// SECTORS //////
-Highcharts.SVGRenderer.prototype.arc3d = function (shapeArgs) {
-
- shapeArgs.alpha *= deg2rad;
- shapeArgs.beta *= deg2rad;
- var result = this.g(),
- paths = this.arc3dPath(shapeArgs),
- renderer = result.renderer;
-
- var zIndex = paths.zTop * 100;
-
- result.shapeArgs = shapeArgs; // Store for later use
-
- result.top = renderer.path(paths.top).attr({zIndex: paths.zTop}).add(result);
- result.side1 = renderer.path(paths.side2).attr({zIndex: paths.zSide2});
- result.side2 = renderer.path(paths.side1).attr({zIndex: paths.zSide1});
- result.inn = renderer.path(paths.inn).attr({zIndex: paths.zInn});
- result.out = renderer.path(paths.out).attr({zIndex: paths.zOut});
-
- result.fillSetter = function (color) {
- this.color = color;
-
- var c0 = color,
- c2 = Highcharts.Color(color).brighten(-0.1).get();
-
- this.side1.attr({fill: c2});
- this.side2.attr({fill: c2});
- this.inn.attr({fill: c2});
- this.out.attr({fill: c2});
- this.top.attr({fill: c0});
- return this;
- };
-
- result.translateXSetter = function (value) {
- this.out.attr({translateX: value});
- this.inn.attr({translateX: value});
- this.side1.attr({translateX: value});
- this.side2.attr({translateX: value});
- this.top.attr({translateX: value});
- };
-
- result.translateYSetter = function (value) {
- this.out.attr({translateY: value});
- this.inn.attr({translateY: value});
- this.side1.attr({translateY: value});
- this.side2.attr({translateY: value});
- this.top.attr({translateY: value});
- };
-
- result.animate = function (args, duration, complete) {
- if (defined(args.end) || defined(args.start)) {
- this._shapeArgs = this.shapeArgs;
-
- Highcharts.SVGElement.prototype.animate.call(this, {
- _args: args
- }, {
- duration: duration,
- step: function () {
- var args = arguments,
- fx = args[1],
- result = fx.elem,
- start = result._shapeArgs,
- end = fx.end,
- pos = fx.pos,
- sA = Highcharts.merge(start, {
- x: start.x + ((end.x - start.x) * pos),
- y: start.y + ((end.y - start.y) * pos),
- r: start.r + ((end.r - start.r) * pos),
- innerR: start.innerR + ((end.innerR - start.innerR) * pos),
- start: start.start + ((end.start - start.start) * pos),
- end: start.end + ((end.end - start.end) * pos)
- });
-
- var paths = result.renderer.arc3dPath(sA);
-
- result.shapeArgs = sA;
-
- result.top.attr({d: paths.top, zIndex: paths.zTop});
- result.inn.attr({d: paths.inn, zIndex: paths.zInn});
- result.out.attr({d: paths.out, zIndex: paths.zOut});
- result.side1.attr({d: paths.side1, zIndex: paths.zSide1});
- result.side2.attr({d: paths.side2, zIndex: paths.zSide2});
-
- }
- }, complete);
- } else {
- Highcharts.SVGElement.prototype.animate.call(this, args, duration, complete);
- }
- return this;
- };
-
- result.destroy = function () {
- this.top.destroy();
- this.out.destroy();
- this.inn.destroy();
- this.side1.destroy();
- this.side2.destroy();
-
- Highcharts.SVGElement.prototype.destroy.call(this);
- };
- result.hide = function () {
- this.top.hide();
- this.out.hide();
- this.inn.hide();
- this.side1.hide();
- this.side2.hide();
- };
- result.show = function () {
- this.top.show();
- this.out.show();
- this.inn.show();
- this.side1.show();
- this.side2.show();
- };
-
- result.zIndex = zIndex;
- result.attr({zIndex: zIndex});
- return result;
-};
-
-
-Highcharts.SVGRenderer.prototype.arc3dPath = function (shapeArgs) {
- var cx = shapeArgs.x,
- cy = shapeArgs.y,
- start = shapeArgs.start,
- end = shapeArgs.end - 0.00001,
- r = shapeArgs.r,
- ir = shapeArgs.innerR,
- d = shapeArgs.depth,
- alpha = shapeArgs.alpha,
- beta = shapeArgs.beta;
-
- // Some Variables
- var cs = cos(start),
- ss = sin(start),
- ce = cos(end),
- se = sin(end),
- rx = r * cos(beta),
- ry = r * cos(alpha),
- irx = ir * cos(beta),
- iry = ir * cos(alpha),
- dx = d * sin(beta),
- dy = d * sin(alpha);
-
- // TOP
- var top = ['M', cx + (rx * cs), cy + (ry * ss)];
- top = top.concat(curveTo(cx, cy, rx, ry, start, end, 0, 0));
- top = top.concat([
- 'L', cx + (irx * ce), cy + (iry * se)
- ]);
- top = top.concat(curveTo(cx, cy, irx, iry, end, start, 0, 0));
- top = top.concat(['Z']);
-
- // OUTSIDE
- var b = (beta > 0 ? PI / 2 : 0),
- a = (alpha > 0 ?