From dfc4e20b8e9ca57340e24143539498fb82527697 Mon Sep 17 00:00:00 2001 From: randommonk Date: Thu, 4 Jan 2018 22:52:54 +0000 Subject: Bumped version to 4.3. Added jpgraph stats developed by killerEye --- html/includes/js/adapters/standalone-framework.js | 18 + .../js/adapters/standalone-framework.src.js | 603 + html/includes/js/clickrows.js | 8 + html/includes/js/clocks.js | 561 + html/includes/js/highcharts-3d.js | 45 + html/includes/js/highcharts-3d.src.js | 1383 ++ html/includes/js/highcharts-all.js | 471 + html/includes/js/highcharts-functions.js | 1 + html/includes/js/highcharts-more.js | 53 + html/includes/js/highcharts-more.src.js | 2575 +++ html/includes/js/highcharts.js | 308 + html/includes/js/highcharts.src.js | 17737 +++++++++++++++++++ html/includes/js/jquery-1.11.1.min.js | 4 + html/includes/js/jquery.tooltip.js | 119 + html/includes/js/jquery.tooltipster.js | 1327 ++ html/includes/js/jquery.tooltipster.min.js | 1 + html/includes/js/modules/canvas-tools.js | 133 + html/includes/js/modules/canvas-tools.src.js | 3113 ++++ html/includes/js/modules/data.js | 24 + html/includes/js/modules/data.src.js | 1025 ++ html/includes/js/modules/drilldown.js | 15 + html/includes/js/modules/drilldown.src.js | 606 + html/includes/js/modules/exporting.js | 23 + html/includes/js/modules/exporting.src.js | 719 + html/includes/js/modules/funnel.js | 13 + html/includes/js/modules/funnel.src.js | 310 + html/includes/js/modules/heatmap.js | 23 + html/includes/js/modules/heatmap.src.js | 687 + html/includes/js/modules/multicolor_series.js | 567 + html/includes/js/modules/no-data-to-display.js | 12 + html/includes/js/modules/no-data-to-display.src.js | 130 + html/includes/js/modules/solid-gauge.js | 13 + html/includes/js/modules/solid-gauge.src.js | 234 + html/includes/js/themes/dark-blue.js | 254 + 34 files changed, 33115 insertions(+) create mode 100644 html/includes/js/adapters/standalone-framework.js create mode 100644 html/includes/js/adapters/standalone-framework.src.js create mode 100644 html/includes/js/clickrows.js create mode 100644 html/includes/js/clocks.js create mode 100644 html/includes/js/highcharts-3d.js create mode 100644 html/includes/js/highcharts-3d.src.js create mode 100644 html/includes/js/highcharts-all.js create mode 100644 html/includes/js/highcharts-functions.js create mode 100644 html/includes/js/highcharts-more.js create mode 100644 html/includes/js/highcharts-more.src.js create mode 100644 html/includes/js/highcharts.js create mode 100644 html/includes/js/highcharts.src.js create mode 100644 html/includes/js/jquery-1.11.1.min.js create mode 100644 html/includes/js/jquery.tooltip.js create mode 100644 html/includes/js/jquery.tooltipster.js create mode 100644 html/includes/js/jquery.tooltipster.min.js create mode 100644 html/includes/js/modules/canvas-tools.js create mode 100644 html/includes/js/modules/canvas-tools.src.js create mode 100644 html/includes/js/modules/data.js create mode 100644 html/includes/js/modules/data.src.js create mode 100644 html/includes/js/modules/drilldown.js create mode 100644 html/includes/js/modules/drilldown.src.js create mode 100644 html/includes/js/modules/exporting.js create mode 100644 html/includes/js/modules/exporting.src.js create mode 100644 html/includes/js/modules/funnel.js create mode 100644 html/includes/js/modules/funnel.src.js create mode 100644 html/includes/js/modules/heatmap.js create mode 100644 html/includes/js/modules/heatmap.src.js create mode 100644 html/includes/js/modules/multicolor_series.js create mode 100644 html/includes/js/modules/no-data-to-display.js create mode 100644 html/includes/js/modules/no-data-to-display.src.js create mode 100644 html/includes/js/modules/solid-gauge.js create mode 100644 html/includes/js/modules/solid-gauge.src.js create mode 100644 html/includes/js/themes/dark-blue.js (limited to 'html/includes/js') diff --git a/html/includes/js/adapters/standalone-framework.js b/html/includes/js/adapters/standalone-framework.js new file mode 100644 index 0000000..d41dde7 --- /dev/null +++ b/html/includes/js/adapters/standalone-framework.js @@ -0,0 +1,18 @@ +/* + Highcharts JS v4.0.4 (2014-09-02) + + Standalone Highcharts Framework + + License: MIT License +*/ +var HighchartsAdapter=function(){function p(c){function b(b,a,d){b.removeEventListener(a,d,!1)}function d(b,a,d){d=b.HCProxiedMethods[d.toString()];b.detachEvent("on"+a,d)}function a(a,c){var f=a.HCEvents,i,g,k,j;if(a.removeEventListener)i=b;else if(a.attachEvent)i=d;else return;c?(g={},g[c]=!0):g=f;for(j in g)if(f[j])for(k=f[j].length;k--;)i(a,j,f[j][k])}c.HCExtended||Highcharts.extend(c,{HCExtended:!0,HCEvents:{},bind:function(b,a){var d=this,c=this.HCEvents,g;if(d.addEventListener)d.addEventListener(b, +a,!1);else if(d.attachEvent){g=function(b){b.target=b.srcElement||window;a.call(d,b)};if(!d.HCProxiedMethods)d.HCProxiedMethods={};d.HCProxiedMethods[a.toString()]=g;d.attachEvent("on"+b,g)}c[b]===s&&(c[b]=[]);c[b].push(a)},unbind:function(c,h){var f,i;c?(f=this.HCEvents[c]||[],h?(i=HighchartsAdapter.inArray(h,f),i>-1&&(f.splice(i,1),this.HCEvents[c]=f),this.removeEventListener?b(this,c,h):this.attachEvent&&d(this,c,h)):(a(this,c),this.HCEvents[c]=[])):(a(this),this.HCEvents={})},trigger:function(b, +a){var d=this.HCEvents[b]||[],c=d.length,g,k,j;k=function(){a.defaultPrevented=!0};for(g=0;g=a.duration+ +this.startTime){this.now=this.end;this.pos=this.state=1;this.update();b=this.options.curAnim[this.prop]=!0;for(h in a.curAnim)a.curAnim[h]!==!0&&(b=!1);b&&a.complete&&a.complete.call(e);a=!1}else e=c-this.startTime,this.state=e/a.duration,this.pos=a.easing(e,0,1,a.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update(),a=!0;return a}};this.animate=function(b,d,a){var e,h="",f,i,g;b.stopAnimation=!1;if(typeof a!=="object"||a===null)e=arguments,a={duration:e[2],easing:e[3],complete:e[4]}; +if(typeof a.duration!=="number")a.duration=400;a.easing=Math[a.easing]||Math.easeInOutSine;a.curAnim=Highcharts.extend({},d);for(g in d)i=new o(b,a,g),f=null,g==="d"?(i.paths=c.init(b,b.d,d.d),i.toD=d.d,e=0,f=1):b.attr?e=b.attr(g):(e=parseFloat(HighchartsAdapter._getStyle(b,g))||0,g!=="opacity"&&(h="px")),f||(f=d[g]),i.custom(e,f,h)}},_getStyle:function(c,b){return window.getComputedStyle(c,void 0).getPropertyValue(b)},addAnimSetter:function(c,b){n[c]=b},getScript:function(c,b){var d=l.getElementsByTagName("head")[0], +a=l.createElement("script");a.type="text/javascript";a.src=c;a.onload=b;d.appendChild(a)},inArray:function(c,b){return b.indexOf?b.indexOf(c):q.indexOf.call(b,c)},adapterRun:function(c,b){return parseInt(HighchartsAdapter._getStyle(c,b),10)},grep:function(c,b){return q.filter.call(c,b)},map:function(c,b){for(var d=[],a=0,e=c.length;a -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/clickrows.js b/html/includes/js/clickrows.js new file mode 100644 index 0000000..fb9fda2 --- /dev/null +++ b/html/includes/js/clickrows.js @@ -0,0 +1,8 @@ + +$(document).ready(function($) { + $(".clickableRow").click(function() { + if(event.which == 1) { + window.document.location = $(this).attr("href"); + } + }); +}); diff --git a/html/includes/js/clocks.js b/html/includes/js/clocks.js new file mode 100644 index 0000000..7f17b42 --- /dev/null +++ b/html/includes/js/clocks.js @@ -0,0 +1,561 @@ +// diff --git a/html/includes/js/highcharts-3d.js b/html/includes/js/highcharts-3d.js new file mode 100644 index 0000000..c622493 --- /dev/null +++ b/html/includes/js/highcharts-3d.js @@ -0,0 +1,45 @@ +/* + Highcharts JS v4.0.4 (2014-09-02) + + (c) 2009-2013 Torstein Hønsi + + License: www.highcharts.com/license +*/ +(function(d){function x(f,a,b,c){var e,g,j;b*=t;a*=t;var i=[],h,k,o;b*=-1;h=c.x;k=c.y;o=(c.z===0?1.0E-4:c.z)*(c.vd||25);o=Math.max(500,o);var q=l(b),n=m(b),r=l(a),s=m(a),p,v,u;d.each(f,function(a){p=a.x-h;v=a.y-k;u=a.z||0;e=n*p-q*u;g=-q*r*p-n*r*u+s*v;j=q*s*p+n*s*u+r*v;e=e*((o-j)/o)+h;g=g*((o-j)/o)+k;i.push({x:z(e),y:z(g),z:z(j)})});return i}function A(f){return f!==void 0&&f!==null}function w(f,a,b,c,e,g,d,i){var h=[];return g>e&&g-e>n/2+1.0E-4?(h=h.concat(w(f,a,b,c,e,e+n/2,d,i)),h=h.concat(w(f,a, +b,c,e+n/2,g,d,i))):gn/2+1.0E-4?(h=h.concat(w(f,a,b,c,e,e-n/2,d,i)),h=h.concat(w(f,a,b,c,e-n/2,g,d,i))):(h=g-e,["C",f+b*m(e)-b*B*h*l(e)+d,a+c*l(e)+c*B*h*m(e)+i,f+b*m(g)+b*B*h*l(g)+d,a+c*l(g)-c*B*h*m(g)+i,f+b*m(g)+d,a+c*l(g)+i])}function D(f){if(this.chart.is3d()){var a=this.chart.options.plotOptions.column.grouping;a!==void 0&&!a&&this.group.zIndex!==void 0&&this.group.attr({zIndex:this.group.zIndex*10});var b=this.options,c=this.options.states;this.borderWidth=b.borderWidth=b.edgeWidth||1; +d.each(this.data,function(a){if(a.y!==null)a=a.pointAttr,this.borderColor=d.pick(b.edgeColor,a[""].fill),a[""].stroke=this.borderColor,a.hover.stroke=d.pick(c.hover.edgeColor,this.borderColor),a.select.stroke=d.pick(c.select.edgeColor,this.borderColor)})}f.apply(this,[].slice.call(arguments,1))}var n=Math.PI,t=n/180,l=Math.sin,m=Math.cos,z=Math.round,B=4*(Math.sqrt(2)-1)/3/(n/2);d.SVGRenderer.prototype.toLinePath=function(f,a){var b=[];d.each(f,function(a){b.push("L",a.x,a.y)});b[0]="M";a&&b.push("Z"); +return b};d.SVGRenderer.prototype.cuboid=function(f){var a=this.g(),f=this.cuboidPath(f);a.front=this.path(f[0]).attr({zIndex:f[3],"stroke-linejoin":"round"}).add(a);a.top=this.path(f[1]).attr({zIndex:f[4],"stroke-linejoin":"round"}).add(a);a.side=this.path(f[2]).attr({zIndex:f[5],"stroke-linejoin":"round"}).add(a);a.fillSetter=function(a){var c=d.Color(a).brighten(0.1).get(),e=d.Color(a).brighten(-0.1).get();this.front.attr({fill:a});this.top.attr({fill:c});this.side.attr({fill:e});this.color=a; +return this};a.opacitySetter=function(a){this.front.attr({opacity:a});this.top.attr({opacity:a});this.side.attr({opacity:a});return this};a.attr=function(a){a.shapeArgs||A(a.x)?(a=this.renderer.cuboidPath(a.shapeArgs||a),this.front.attr({d:a[0],zIndex:a[3]}),this.top.attr({d:a[1],zIndex:a[4]}),this.side.attr({d:a[2],zIndex:a[5]})):d.SVGElement.prototype.attr.call(this,a);return this};a.animate=function(a,c,e){A(a.x)&&A(a.y)?(a=this.renderer.cuboidPath(a),this.front.attr({zIndex:a[3]}).animate({d:a[0]}, +c,e),this.top.attr({zIndex:a[4]}).animate({d:a[1]},c,e),this.side.attr({zIndex:a[5]}).animate({d:a[2]},c,e)):a.opacity?(this.front.animate(a,c,e),this.top.animate(a,c,e),this.side.animate(a,c,e)):d.SVGElement.prototype.animate.call(this,a,c,e);return this};a.destroy=function(){this.front.destroy();this.top.destroy();this.side.destroy();return null};a.attr({zIndex:-f[3]});return a};d.SVGRenderer.prototype.cuboidPath=function(d){var a=d.x,b=d.y,c=d.z,e=d.height,g=d.width,j=d.depth,i=d.alpha,h=d.beta, +a=[{x:a,y:b,z:c},{x:a+g,y:b,z:c},{x:a+g,y:b+e,z:c},{x:a,y:b+e,z:c},{x:a,y:b+e,z:c+j},{x:a+g,y:b+e,z:c+j},{x:a+g,y:b,z:c+j},{x:a,y:b,z:c+j}],a=x(a,i,h,d.origin),d=["M",a[0].x,a[0].y,"L",a[7].x,a[7].y,"L",a[6].x,a[6].y,"L",a[1].x,a[1].y,"Z"],b=["M",a[3].x,a[3].y,"L",a[2].x,a[2].y,"L",a[5].x,a[5].y,"L",a[4].x,a[4].y,"Z"],c=["M",a[1].x,a[1].y,"L",a[2].x,a[2].y,"L",a[5].x,a[5].y,"L",a[6].x,a[6].y,"Z"],e=["M",a[0].x,a[0].y,"L",a[7].x,a[7].y,"L",a[4].x,a[4].y,"L",a[3].x,a[3].y,"Z"];return[["M",a[0].x,a[0].y, +"L",a[1].x,a[1].y,"L",a[2].x,a[2].y,"L",a[3].x,a[3].y,"Z"],a[7].ya[2].y?b:[],a[6].x>a[1].x?c:a[7].x0?(a[0].z+a[7].z+a[6].z+a[1].z)/4:(a[3].z+a[2].z+a[5].z+a[4].z)/4,i>0?(a[1].z+a[2].z+a[5].z+a[6].z)/4:(a[0].z+a[7].z+a[4].z+a[3].z)/4]};d.SVGRenderer.prototype.arc3d=function(f){f.alpha*=t;f.beta*=t;var a=this.g(),b=this.arc3dPath(f),c=a.renderer,e=b.zTop*100;a.shapeArgs=f;a.top=c.path(b.top).attr({zIndex:b.zTop}).add(a);a.side1=c.path(b.side2).attr({zIndex:b.zSide2}); +a.side2=c.path(b.side1).attr({zIndex:b.zSide1});a.inn=c.path(b.inn).attr({zIndex:b.zInn});a.out=c.path(b.out).attr({zIndex:b.zOut});a.fillSetter=function(a){this.color=a;var b=d.Color(a).brighten(-0.1).get();this.side1.attr({fill:b});this.side2.attr({fill:b});this.inn.attr({fill:b});this.out.attr({fill:b});this.top.attr({fill:a});return this};a.translateXSetter=function(a){this.out.attr({translateX:a});this.inn.attr({translateX:a});this.side1.attr({translateX:a});this.side2.attr({translateX:a});this.top.attr({translateX:a})}; +a.translateYSetter=function(a){this.out.attr({translateY:a});this.inn.attr({translateY:a});this.side1.attr({translateY:a});this.side2.attr({translateY:a});this.top.attr({translateY:a})};a.animate=function(a,b,c){A(a.end)||A(a.start)?(this._shapeArgs=this.shapeArgs,d.SVGElement.prototype.animate.call(this,{_args:a},{duration:b,step:function(){var a=arguments[1],b=a.elem,c=b._shapeArgs,e=a.end,a=a.pos,c=d.merge(c,{x:c.x+(e.x-c.x)*a,y:c.y+(e.y-c.y)*a,r:c.r+(e.r-c.r)*a,innerR:c.innerR+(e.innerR-c.innerR)* +a,start:c.start+(e.start-c.start)*a,end:c.end+(e.end-c.end)*a}),e=b.renderer.arc3dPath(c);b.shapeArgs=c;b.top.attr({d:e.top,zIndex:e.zTop});b.inn.attr({d:e.inn,zIndex:e.zInn});b.out.attr({d:e.out,zIndex:e.zOut});b.side1.attr({d:e.side1,zIndex:e.zSide1});b.side2.attr({d:e.side2,zIndex:e.zSide2})}},c)):d.SVGElement.prototype.animate.call(this,a,b,c);return this};a.destroy=function(){this.top.destroy();this.out.destroy();this.inn.destroy();this.side1.destroy();this.side2.destroy();d.SVGElement.prototype.destroy.call(this)}; +a.hide=function(){this.top.hide();this.out.hide();this.inn.hide();this.side1.hide();this.side2.hide()};a.show=function(){this.top.show();this.out.show();this.inn.show();this.side1.show();this.side2.show()};a.zIndex=e;a.attr({zIndex:e});return a};d.SVGRenderer.prototype.arc3dPath=function(d){var a=d.x,b=d.y,c=d.start,e=d.end-1.0E-5,g=d.r,j=d.innerR,i=d.depth,h=d.alpha,k=d.beta,o=m(c),q=l(c),d=m(e),y=l(e),r=g*m(k),s=g*m(h),p=j*m(k);j*=m(h);var v=i*l(k),u=i*l(h),i=["M",a+r*o,b+s*q],i=i.concat(w(a,b, +r,s,c,e,0,0)),i=i.concat(["L",a+p*d,b+j*y]),i=i.concat(w(a,b,p,j,e,c,0,0)),i=i.concat(["Z"]),k=k>0?n/2:0,h=h>0?0:n/2,k=c>-k?c:e>-k?-k:c,t=e0?4:-1}).css({stroke:i.color}).add(); +else{var n={x:l,y:m,z:k+1,width:q,height:o+i.size,depth:h.size,alpha:e,beta:g,origin:c};this.backFrame?this.backFrame.animate(n):this.backFrame=b.cuboid(n).attr({fill:h.color,zIndex:-3}).css({stroke:h.color}).add();this.axisLine&&this.axisLine.hide();a={x:(a.yAxis[0].opposite?q:0)+l-j.size,y:m,z:0,width:j.size,height:o+i.size,depth:k+h.size,alpha:e,beta:g,origin:c};this.sideFrame?this.sideFrame.animate(a):this.sideFrame=b.cuboid(a).attr({fill:j.color,zIndex:-2}).css({stroke:j.color}).add()}}});d.wrap(d.Axis.prototype, +"getPlotLinePath",function(d){var a=d.apply(this,[].slice.call(arguments,1));if(!this.chart.is3d())return a;if(a===null)return a;var b=this.chart,c=b.options.chart.options3d,e=c.depth;c.origin={x:b.plotLeft+b.plotWidth/2,y:b.plotTop+b.plotHeight/2,z:e,vd:c.viewDistance};var a=[{x:a[1],y:a[2],z:this.horiz||this.opposite?e:0},{x:a[1],y:a[2],z:e},{x:a[4],y:a[5],z:e},{x:a[4],y:a[5],z:this.horiz||this.opposite?0:e}],e=b.options.inverted?c.beta:c.alpha,g=b.options.inverted?c.alpha:c.beta;g*=b.yAxis[0].opposite? +-1:1;a=x(a,e,g,c.origin);return a=this.chart.renderer.toLinePath(a,!1)});d.wrap(d.Axis.prototype,"getPlotBandPath",function(d){if(this.chart.is3d()){var a=arguments,b=a[1],a=this.getPlotLinePath(a[2]);(b=this.getPlotLinePath(b))&&a?b.push(a[7],a[8],a[4],a[5],a[1],a[2]):b=null;return b}else return d.apply(this,[].slice.call(arguments,1))});d.wrap(d.Tick.prototype,"getMarkPath",function(d){var a=d.apply(this,[].slice.call(arguments,1));if(!this.axis.chart.is3d())return a;var b=this.axis.chart,c=b.options.chart.options3d, +e={x:b.plotLeft+b.plotWidth/2,y:b.plotTop+b.plotHeight/2,z:c.depth,vd:c.viewDistance},a=[{x:a[1],y:a[2],z:0},{x:a[4],y:a[5],z:0}],g=b.inverted?c.beta:c.alpha,c=b.inverted?c.alpha:c.beta;c*=b.yAxis[0].opposite?-1:1;a=x(a,g,c,e);return a=["M",a[0].x,a[0].y,"L",a[1].x,a[1].y]});d.wrap(d.Tick.prototype,"getLabelPosition",function(d){var a=d.apply(this,[].slice.call(arguments,1));if(!this.axis.chart.is3d())return a;var b=this.axis.chart,c=b.options.chart.options3d,e={x:b.plotLeft+b.plotWidth/2,y:b.plotTop+ +b.plotHeight/2,z:c.depth,vd:c.viewDistance},g=b.inverted?c.beta:c.alpha,c=b.inverted?c.alpha:c.beta;c*=b.yAxis[0].opposite?-1:1;return a=x([{x:a.x,y:a.y,z:0}],g,c,e)[0]});d.wrap(d.Axis.prototype,"drawCrosshair",function(d){var a=arguments;this.chart.is3d()&&a[2]&&(a[2]={plotX:a[2].plotXold||a[2].plotX,plotY:a[2].plotYold||a[2].plotY});d.apply(this,[].slice.call(a,1))});d.wrap(d.seriesTypes.column.prototype,"translate",function(f){f.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var a= +this.chart,b=this.options,c=a.options.chart.options3d,e=b.depth||25,g={x:a.plotWidth/2,y:a.plotHeight/2,z:c.depth,vd:c.viewDistance},j=c.alpha,i=c.beta*(a.yAxis[0].opposite?-1:1),h=(b.stacking?b.stack||0:this._i)*(e+(b.groupZPadding||1));b.grouping!==!1&&(h=0);h+=b.groupZPadding||1;d.each(this.data,function(a){if(a.y!==null){var b=a.shapeArgs,c=a.tooltipPos;a.shapeType="cuboid";b.alpha=j;b.beta=i;b.z=h;b.origin=g;b.depth=e;c=x([{x:c[0],y:c[1],z:h}],j,i,g)[0];a.tooltipPos=[c.x,c.y]}})}});d.wrap(d.seriesTypes.column.prototype, +"animate",function(f){if(this.chart.is3d()){var a=arguments[1],b=this.yAxis,c=this,e=this.yAxis.reversed;if(d.svg)a?d.each(c.data,function(a){if(a.y!==null&&(a.height=a.shapeArgs.height,a.shapey=a.shapeArgs.y,a.shapeArgs.height=1,!e))a.shapeArgs.y=a.stackY?a.plotY+b.translate(a.stackY):a.plotY+(a.negative?-a.height:a.height)}):(d.each(c.data,function(a){if(a.y!==null)a.shapeArgs.height=a.height,a.shapeArgs.y=a.shapey,a.graphic&&a.graphic.animate(a.shapeArgs,c.options.animation)}),this.drawDataLabels(), +c.animate=null)}else f.apply(this,[].slice.call(arguments,1))});d.wrap(d.seriesTypes.column.prototype,"init",function(d){d.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var a=this.options,b=a.grouping,c=a.stacking,e=0;if((b===void 0||b)&&c){b=this.chart.retrieveStacks(b,c);c=a.stack||0;for(e=0;e0?l(f)*d:0);a[3]+=-c*(1-m(f))*l(b)+(l(b)>0?l(f)*d:0);a[5]+=-c*(1-m(f))*l(b)+(l(b)>0?l(f)*d:0)});f.apply(this,[].slice.call(arguments,1))});d.wrap(d.seriesTypes.pie.prototype,"addPoint",function(d){d.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&this.update()});d.wrap(d.seriesTypes.pie.prototype,"animate",function(f){if(this.chart.is3d()){var a=arguments[1],b=this.options.animation,c=this.center, +e=this.group,g=this.markerGroup;if(d.svg)if(b===!0&&(b={}),a){if(e.oldtranslateX=e.translateX,e.oldtranslateY=e.translateY,a={translateX:c[0],translateY:c[1],scaleX:0.001,scaleY:0.001},e.attr(a),g)g.attrSetters=e.attrSetters,g.attr(a)}else a={translateX:e.oldtranslateX,translateY:e.oldtranslateY,scaleX:1,scaleY:1},e.animate(a,b),g&&g.animate(a,b),this.animate=null}else f.apply(this,[].slice.call(arguments,1))});d.wrap(d.seriesTypes.scatter.prototype,"translate",function(f){f.apply(this,[].slice.call(arguments, +1));if(this.chart.is3d()){var a=this.chart,b=this.chart.options.chart.options3d,c=b.alpha,e=b.beta,g={x:a.inverted?a.plotHeight/2:a.plotWidth/2,y:a.inverted?a.plotWidth/2:a.plotHeight/2,z:b.depth,vd:b.viewDistance},b=b.depth,j=a.options.zAxis||{min:0,max:b},i=b/(j.max-j.min);d.each(this.data,function(a){var b={x:a.plotX,y:a.plotY,z:(a.z-j.min)*i},b=x([b],c,e,g)[0];a.plotXold=a.plotX;a.plotYold=a.plotY;a.plotX=b.x;a.plotY=b.y;a.plotZ=b.z})}});d.wrap(d.seriesTypes.scatter.prototype,"init",function(d){var a= +d.apply(this,[].slice.call(arguments,1));if(this.chart.is3d())this.pointArrayMap=["x","y","z"],this.tooltipOptions.pointFormat=this.userOptions.tooltip?this.userOptions.tooltip.pointFormat||"x: {point.x}
y: {point.y}
z: {point.z}
":"x: {point.x}
y: {point.y}
z: {point.z}
";return a});if(d.VMLRenderer)d.setOptions({animate:!1}),d.VMLRenderer.prototype.cuboid=d.SVGRenderer.prototype.cuboid,d.VMLRenderer.prototype.cuboidPath=d.SVGRenderer.prototype.cuboidPath, +d.VMLRenderer.prototype.toLinePath=d.SVGRenderer.prototype.toLinePath,d.VMLRenderer.prototype.createElement3D=d.SVGRenderer.prototype.createElement3D,d.VMLRenderer.prototype.arc3d=function(f){f=d.SVGRenderer.prototype.arc3d.call(this,f);f.css({zIndex:f.zIndex});return f},d.VMLRenderer.prototype.arc3dPath=d.SVGRenderer.prototype.arc3dPath,d.Chart.prototype.renderSeries=function(){for(var d,a=this.series.length;a--;)d=this.series[a],d.translate(),d.setTooltipPoints&&d.setTooltipPoints(),d.render()}, +d.wrap(d.Axis.prototype,"render",function(d){d.apply(this,[].slice.call(arguments,1));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}))})})(Highcharts); diff --git a/html/includes/js/highcharts-3d.src.js b/html/includes/js/highcharts-3d.src.js new file mode 100644 index 0000000..7cee3e5 --- /dev/null +++ b/html/includes/js/highcharts-3d.src.js @@ -0,0 +1,1383 @@ +// ==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,