diff --git a/Result.html b/Result.html
new file mode 100644
index 0000000..131a8be
--- /dev/null
+++ b/Result.html
@@ -0,0 +1,119 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ BVote
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/js/canvasjs.min.js b/js/canvasjs.min.js
new file mode 100644
index 0000000..5b42854
--- /dev/null
+++ b/js/canvasjs.min.js
@@ -0,0 +1,6830 @@
+/*
+ CanvasJS HTML5 & JavaScript Charts - v1.9.10 GA - https://canvasjs.com/
+ Copyright 2017 fenopix
+
+ --------------------- License Information --------------------
+ CanvasJS is a commercial product which requires purchase of license. Without a commercial license you can use it for evaluation purposes for upto 30 days. Please refer to the following link for further details.
+ https://canvasjs.com/license-canvasjs/
+
+
+*/
+(function() {
+ function S(a, c) {
+ a.prototype = Pa(c.prototype);
+ a.prototype.constructor = a;
+ a.base = c.prototype
+ }
+
+ function Pa(a) {
+ function c() {}
+ c.prototype = a;
+ return new c
+ }
+
+ function Ha(a, c, b) {
+ "millisecond" === b ? a.setMilliseconds(a.getMilliseconds() + 1 * c) : "second" === b ? a.setSeconds(a.getSeconds() + 1 * c) : "minute" === b ? a.setMinutes(a.getMinutes() + 1 * c) : "hour" === b ? a.setHours(a.getHours() + 1 * c) : "day" === b ? a.setDate(a.getDate() + 1 * c) : "week" === b ? a.setDate(a.getDate() + 7 * c) : "month" === b ? a.setMonth(a.getMonth() + 1 * c) : "year" === b && a.setFullYear(a.getFullYear() +
+ 1 * c);
+ return a
+ }
+
+ function O(a, c) {
+ var b = !1;
+ 0 > a && (b = !0, a *= -1);
+ a = "" + a;
+ for (c = c ? c : 1; a.length < c;) a = "0" + a;
+ return b ? "-" + a : a
+ }
+
+ function ka(a) {
+ if (!a) return a;
+ a = a.replace(/^\s\s*/, "");
+ for (var c = /\s/, b = a.length; c.test(a.charAt(--b)););
+ return a.slice(0, b + 1)
+ }
+
+ function Ia(a) {
+ a.roundRect = function(a, b, d, f, g, l, k, h) {
+ k && (this.fillStyle = k);
+ h && (this.strokeStyle = h);
+ "undefined" === typeof g && (g = 5);
+ this.lineWidth = l;
+ this.beginPath();
+ this.moveTo(a + g, b);
+ this.lineTo(a + d - g, b);
+ this.quadraticCurveTo(a + d, b, a + d, b + g);
+ this.lineTo(a + d, b + f - g);
+ this.quadraticCurveTo(a + d, b + f, a + d - g, b + f);
+ this.lineTo(a + g, b + f);
+ this.quadraticCurveTo(a, b + f, a, b + f - g);
+ this.lineTo(a, b + g);
+ this.quadraticCurveTo(a, b, a + g, b);
+ this.closePath();
+ k && this.fill();
+ h && 0 < l && this.stroke()
+ }
+ }
+
+ function ya(a, c) { return a - c }
+
+ function Ja(a, c) { return a.x - c.x }
+
+ function F(a) {
+ var c = ((a & 16711680) >> 16).toString(16),
+ b = ((a & 65280) >> 8).toString(16);
+ a = ((a & 255) >> 0).toString(16);
+ c = 2 > c.length ? "0" + c : c;
+ b = 2 > b.length ? "0" + b : b;
+ a = 2 > a.length ? "0" + a : a;
+ return "#" + c + b + a
+ }
+
+ function Qa(a, c) {
+ var b = this.length >>> 0,
+ d = Number(c) ||
+ 0,
+ d = 0 > d ? Math.ceil(d) : Math.floor(d);
+ for (0 > d && (d += b); d < b; d++)
+ if (d in this && this[d] === a) return d;
+ return -1
+ }
+
+ function z(a) { return null === a || "undefined" === typeof a }
+
+ function qa(a) { a.indexOf || (a.indexOf = Qa); return a }
+
+ function Ka(a, c, b) {
+ b = b || "normal";
+ var d = a + "_" + c + "_" + b,
+ f = La[d];
+ if (isNaN(f)) {
+ try {
+ a = "position:absolute; left:0px; top:-20000px; padding:0px;margin:0px;border:none;white-space:pre;line-height:normal;font-family:" + a + "; font-size:" + c + "px; font-weight:" + b + ";";
+ if (!aa) {
+ var g = document.body;
+ aa = document.createElement("span");
+ aa.innerHTML = "";
+ var l = document.createTextNode("Mpgyi");
+ aa.appendChild(l);
+ g.appendChild(aa)
+ }
+ aa.style.display = "";
+ aa.setAttribute("style", a);
+ f = Math.round(aa.offsetHeight);
+ aa.style.display = "none"
+ } catch (k) { f = Math.ceil(1.1 * c) }
+ f = Math.max(f, c);
+ La[d] = f
+ }
+ return f
+ }
+
+ function G(a, c) {
+ var b = [];
+ if (b = { solid: [], shortDash: [3, 1], shortDot: [1, 1], shortDashDot: [3, 1, 1, 1], shortDashDotDot: [3, 1, 1, 1, 1, 1], dot: [1, 2], dash: [4, 2], dashDot: [4, 2, 1, 2], longDash: [8, 2], longDashDot: [8, 2, 1, 2], longDashDotDot: [8, 2, 1, 2, 1, 2] }[a || "solid"])
+ for (var d =
+ 0; d < b.length; d++) b[d] *= c;
+ else b = [];
+ return b
+ }
+
+ function J(a, c, b, d) {
+ return a.addEventListener ? (a.addEventListener(c, b, d || !1), b) : a.attachEvent ? (d = function(d) {
+ d = d || window.event;
+ d.preventDefault = d.preventDefault || function() { d.returnValue = !1 };
+ d.stopPropagation = d.stopPropagation || function() { d.cancelBubble = !0 };
+ b.call(a, d)
+ }, a.attachEvent("on" + c, d), d) : !1
+ }
+
+ function Ma(a, c, b) {
+ a *= P;
+ c *= P;
+ a = b.getImageData(a, c, 2, 2).data;
+ c = !0;
+ for (b = 0; 4 > b; b++)
+ if (a[b] !== a[b + 4] | a[b] !== a[b + 8] | a[b] !== a[b + 12]) { c = !1; break }
+ return c ? a[0] << 16 |
+ a[1] << 8 | a[2] : 0
+ }
+
+ function K(a, c, b) { return a in c ? c[a] : b[a] }
+
+ function ra(a, c, b) {
+ if (t && Na) {
+ var d = a.getContext("2d");
+ sa = d.webkitBackingStorePixelRatio || d.mozBackingStorePixelRatio || d.msBackingStorePixelRatio || d.oBackingStorePixelRatio || d.backingStorePixelRatio || 1;
+ P = za / sa;
+ a.width = c * P;
+ a.height = b * P;
+ za !== sa && (a.style.width = c + "px", a.style.height = b + "px", d.scale(P, P))
+ } else a.width = c, a.height = b
+ }
+
+ function Ra(a) {
+ if (!Aa) {
+ var c = !1,
+ b = !1;
+ "undefined" === typeof ba.Chart.creditHref ? (a.creditHref = "https://canvasjs.com/", a.creditText =
+ "") : (c = a.updateOption("creditText"), b = a.updateOption("creditHref"));
+ if (a.creditHref && a.creditText) {
+ a._creditLink || (a._creditLink = document.createElement("a"), a._creditLink.setAttribute("class", "canvasjs-chart-credit"), a._creditLink.setAttribute("style", "outline:none;margin:0px;position:absolute;right:2px;top:" + (a.height - 14) + "px;color:dimgrey;text-decoration:none;font-size:11px;font-family: Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"), a._creditLink.setAttribute("tabIndex", -1), a._creditLink.setAttribute("target", "_blank"));
+ if (0 === a.renderCount || c || b) a._creditLink.setAttribute("href", a.creditHref), a._creditLink.innerHTML = a.creditText;
+ a._creditLink && a.creditHref && a.creditText ? (a._creditLink.parentElement || a._canvasJSContainer.appendChild(a._creditLink), a._creditLink.style.top = a.height - 14 + "px") : a._creditLink.parentElement && a._canvasJSContainer.removeChild(a._creditLink)
+ }
+ }
+ }
+
+ function fa(a, c) {
+ var b = document.createElement("canvas");
+ b.setAttribute("class", "canvasjs-chart-canvas");
+ ra(b, a, c);
+ t || "undefined" === typeof G_vmlCanvasManager || G_vmlCanvasManager.initElement(b);
+ return b
+ }
+
+ function Ba(a, c, b) {
+ if (a && c && b) {
+ b = b + "." + c;
+ var d = "image/" + c;
+ a = a.toDataURL(d);
+ var f = !1,
+ g = document.createElement("a");
+ g.download = b;
+ g.href = a;
+ g.target = "_blank";
+ if ("undefined" !== typeof Blob && new Blob) {
+ for (var l = a.replace(/^data:[a-z\/]*;base64,/, ""), l = atob(l), k = new ArrayBuffer(l.length), k = new Uint8Array(k), h = 0; h < l.length; h++) k[h] = l.charCodeAt(h);
+ c = new Blob([k.buffer], { type: "image/" + c });
+ try {
+ window.navigator.msSaveBlob(c,
+ b), f = !0
+ } catch (m) { g.dataset.downloadurl = [d, g.download, g.href].join(":"), g.href = window.URL.createObjectURL(c) }
+ }
+ if (!f) try { event = document.createEvent("MouseEvents"), event.initMouseEvent("click", !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), g.dispatchEvent ? g.dispatchEvent(event) : g.fireEvent && g.fireEvent("onclick") } catch (p) { c = window.open(), c.document.write("
Please right click on the image and save it to your device
"), c.document.close() }
+ }
+ }
+
+ function R(a, c, b) {
+ c.getAttribute("state") !==
+ b && (c.setAttribute("state", b), c.setAttribute("type", "button"), c.style.position = "relative", c.style.margin = "0px 0px 0px 0px", c.style.padding = "3px 4px 0px 4px", c.style.cssFloat = "left", c.setAttribute("title", a._cultureInfo[b + "Text"]), c.innerHTML = "
")
+ }
+
+ function ta() { for (var a = null, c = 0; c < arguments.length; c++) a = arguments[c], a.style && (a.style.display = "inline") }
+
+ function Z() {
+ for (var a = null, c = 0; c < arguments.length; c++)(a = arguments[c]) &&
+ a.style && (a.style.display = "none")
+ }
+
+ function L(a, c, b, d) {
+ this._defaultsKey = a;
+ this.parent = d;
+ this._eventListeners = [];
+ d = {};
+ b && (ha[b] && ha[b][a]) && (d = ha[b][a]);
+ this.options = c ? c : { _isPlaceholder: !0 };
+ this.setOptions(this.options, d)
+ }
+
+ function B(a, c) {
+ c = c || {};
+ B.base.constructor.call(this, "Chart", c, c.theme ? c.theme : "theme1");
+ var b = this;
+ this._containerId = a;
+ this._objectsInitialized = !1;
+ this.overlaidCanvasCtx = this.ctx = null;
+ this._indexLabels = [];
+ this._panTimerId = 0;
+ this._lastTouchEventType = "";
+ this._lastTouchData = null;
+ this.isAnimating = !1;
+ this.renderCount = 0;
+ this.panEnabled = this.disableToolTip = this.animatedRender = !1;
+ this._defaultCursor = "default";
+ this.plotArea = { canvas: null, ctx: null, x1: 0, y1: 0, x2: 0, y2: 0, width: 0, height: 0 };
+ this._dataInRenderedOrder = [];
+ if (this.container = "string" === typeof this._containerId ? document.getElementById(this._containerId) : this._containerId) {
+ this.container.innerHTML = "";
+ var d = 0,
+ f = 0,
+ d = this.options.width ? this.width : 0 < this.container.clientWidth ? this.container.clientWidth : this.width,
+ f = this.options.height ? this.height :
+ 0 < this.container.clientHeight ? this.container.clientHeight : this.height;
+ this.width = d;
+ this.height = f;
+ this.x1 = this.y1 = 0;
+ this.x2 = this.width;
+ this.y2 = this.height;
+ this._selectedColorSet = "undefined" !== typeof ga[this.colorSet] ? ga[this.colorSet] : ga.colorSet1;
+ this._canvasJSContainer = document.createElement("div");
+ this._canvasJSContainer.setAttribute("class", "canvasjs-chart-container");
+ this._canvasJSContainer.style.position = "relative";
+ this._canvasJSContainer.style.textAlign = "left";
+ this._canvasJSContainer.style.cursor =
+ "auto";
+ t || (this._canvasJSContainer.style.height = "0px");
+ this.container.appendChild(this._canvasJSContainer);
+ this.canvas = fa(d, f);
+ this.canvas.style.position = "absolute";
+ this.canvas.getContext && (this._canvasJSContainer.appendChild(this.canvas), this.ctx = this.canvas.getContext("2d"), this.ctx.textBaseline = "top", Ia(this.ctx), t ? this.plotArea.ctx = this.ctx : (this.plotArea.canvas = fa(d, f), this.plotArea.canvas.style.position = "absolute", this.plotArea.canvas.setAttribute("class", "plotAreaCanvas"), this._canvasJSContainer.appendChild(this.plotArea.canvas),
+ this.plotArea.ctx = this.plotArea.canvas.getContext("2d")), this.overlaidCanvas = fa(d, f), this.overlaidCanvas.style.position = "absolute", this._canvasJSContainer.appendChild(this.overlaidCanvas), this.overlaidCanvasCtx = this.overlaidCanvas.getContext("2d"), this.overlaidCanvasCtx.textBaseline = "top", this._eventManager = new la(this), this.windowResizeHandler = J(window, "resize", function() { b._updateSize() && b.render() }), this._toolBar = document.createElement("div"), this._toolBar.setAttribute("class", "canvasjs-chart-toolbar"),
+ this._toolBar.style.cssText = "position: absolute; right: 1px; top: 1px;", this._canvasJSContainer.appendChild(this._toolBar), this.bounds = { x1: 0, y1: 0, x2: this.width, y2: this.height }, J(this.overlaidCanvas, "click", function(a) { b._mouseEventHandler(a) }), J(this.overlaidCanvas, "mousemove", function(a) { b._mouseEventHandler(a) }), J(this.overlaidCanvas, "mouseup", function(a) { b._mouseEventHandler(a) }), J(this.overlaidCanvas, "mousedown", function(a) {
+ b._mouseEventHandler(a);
+ Z(b._dropdownMenu)
+ }), J(this.overlaidCanvas, "mouseout",
+ function(a) { b._mouseEventHandler(a) }), J(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerDown" : "touchstart", function(a) { b._touchEventHandler(a) }), J(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerMove" : "touchmove", function(a) { b._touchEventHandler(a) }), J(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerUp" : "touchend", function(a) { b._touchEventHandler(a) }), J(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerCancel" : "touchcancel", function(a) { b._touchEventHandler(a) }),
+ this.toolTip = new Q(this, this.options.toolTip), this.data = null, this.axisX = [], this.axisX2 = [], this.axisY = [], this.axisY2 = [], this.sessionVariables = { axisX: [], axisX2: [], axisY: [], axisY2: [] })
+ } else window.console && window.console.log('CanvasJS Error: Chart Container with id "' + this._containerId + '" was not found')
+ }
+
+ function ua(a, c) {
+ for (var b = [], d, f = 0; f < a.length; f++)
+ if (0 == f) b.push(a[0]);
+ else {
+ var g, l, k;
+ k = f - 1;
+ g = 0 === k ? 0 : k - 1;
+ l = k === a.length - 1 ? k : k + 1;
+ d = Math.abs((a[l].x - a[g].x) / (0 === a[l].x - a[k].x ? 0.01 : a[l].x - a[k].x)) * (c -
+ 1) / 2 + 1;
+ var h = (a[l].x - a[g].x) / d;
+ d = (a[l].y - a[g].y) / d;
+ b[b.length] = a[k].x > a[g].x && 0 < h || a[k].x < a[g].x && 0 > h ? { x: a[k].x + h / 3, y: a[k].y + d / 3 } : { x: a[k].x, y: a[k].y + d / 9 };
+ k = f;
+ g = 0 === k ? 0 : k - 1;
+ l = k === a.length - 1 ? k : k + 1;
+ d = Math.abs((a[l].x - a[g].x) / (0 === a[k].x - a[g].x ? 0.01 : a[k].x - a[g].x)) * (c - 1) / 2 + 1;
+ h = (a[l].x - a[g].x) / d;
+ d = (a[l].y - a[g].y) / d;
+ b[b.length] = a[k].x > a[g].x && 0 < h || a[k].x < a[g].x && 0 > h ? { x: a[k].x - h / 3, y: a[k].y - d / 3 } : { x: a[k].x, y: a[k].y - d / 9 };
+ b[b.length] = a[f]
+ }
+ return b
+ }
+
+ function Oa(a, c) {
+ if (null === a || "undefined" === typeof a) return c;
+ var b = parseFloat(a.toString()) * (0 <= a.toString().indexOf("%") ? c / 100 : 1);
+ return !isNaN(b) && b <= c && 0 <= b ? b : c
+ }
+
+ function ia(a, c, b, d, f) {
+ "undefined" === typeof f && (f = 0);
+ this._padding = f;
+ this._x1 = a;
+ this._y1 = c;
+ this._x2 = b;
+ this._y2 = d;
+ this._rightOccupied = this._leftOccupied = this._bottomOccupied = this._topOccupied = this._padding
+ }
+
+ function U(a, c) {
+ U.base.constructor.call(this, "TextBlock", c);
+ this.ctx = a;
+ this._isDirty = !0;
+ this._wrappedText = null
+ }
+
+ function ma(a, c) {
+ ma.base.constructor.call(this, "Title", c, a.theme, a);
+ this.chart = a;
+ this.canvas =
+ a.canvas;
+ this.ctx = this.chart.ctx;
+ this.optionsName = "title";
+ if (z(this.options.margin) && a.options.subtitles)
+ for (var b = a.options.subtitles, d = 0; d < b.length; d++)
+ if ((z(b[d].horizontalAlign) && "center" === this.horizontalAlign || b[d].horizontalAlign === this.horizontalAlign) && (z(b[d].verticalAlign) && "top" === this.verticalAlign || b[d].verticalAlign === this.verticalAlign) && !b[d].dockInsidePlotArea === !this.dockInsidePlotArea) { this.margin = 0; break }
+ "undefined" === typeof this.options.fontSize && (this.fontSize = this.chart.getAutoFontSize(this.fontSize));
+ this.height = this.width = null;
+ this.bounds = { x1: null, y1: null, x2: null, y2: null }
+ }
+
+ function va(a, c) {
+ va.base.constructor.call(this, "Subtitle", c, a.theme, a);
+ this.chart = a;
+ this.canvas = a.canvas;
+ this.ctx = this.chart.ctx;
+ this.optionsName = "subtitles";
+ this.isOptionsInArray = !0;
+ "undefined" === typeof this.options.fontSize && (this.fontSize = this.chart.getAutoFontSize(this.fontSize));
+ this.height = this.width = null;
+ this.bounds = { x1: null, y1: null, x2: null, y2: null }
+ }
+
+ function wa(a, c) {
+ wa.base.constructor.call(this, "Legend", c, a.theme, a);
+ this.chart = a;
+ this.canvas = a.canvas;
+ this.ctx = this.chart.ctx;
+ this.ghostCtx = this.chart._eventManager.ghostCtx;
+ this.items = [];
+ this.optionsName = "legend";
+ this.height = this.width = 0;
+ this.orientation = null;
+ this.dataSeries = [];
+ this.bounds = { x1: null, y1: null, x2: null, y2: null };
+ "undefined" === typeof this.options.fontSize && (this.fontSize = this.chart.getAutoFontSize(this.fontSize));
+ this.lineHeight = Ka(this.fontFamily, this.fontSize, this.fontWeight);
+ this.horizontalSpacing = this.fontSize
+ }
+
+ function Ca(a, c) {
+ Ca.base.constructor.call(this,
+ c);
+ this.chart = a;
+ this.canvas = a.canvas;
+ this.ctx = this.chart.ctx
+ }
+
+ function $(a, c, b, d) {
+ $.base.constructor.call(this, "DataSeries", c, a.theme, a);
+ this.chart = a;
+ this.canvas = a.canvas;
+ this._ctx = a.canvas.ctx;
+ this.index = b;
+ this.noDataPointsInPlotArea = 0;
+ this.id = d;
+ this.chart._eventManager.objectMap[d] = { id: d, objectType: "dataSeries", dataSeriesIndex: b };
+ this.dataPointIds = [];
+ this.plotUnit = [];
+ this.axisY = this.axisX = null;
+ this.optionsName = "data";
+ this.isOptionsInArray = !0;
+ null === this.fillOpacity && (this.type.match(/area/i) ? this.fillOpacity =
+ 0.7 : this.fillOpacity = 1);
+ this.axisPlacement = this.getDefaultAxisPlacement();
+ "undefined" === typeof this.options.indexLabelFontSize && (this.indexLabelFontSize = this.chart.getAutoFontSize(this.indexLabelFontSize))
+ }
+
+ function C(a, c, b, d, f) {
+ C.base.constructor.call(this, "Axis", c, a.theme, a);
+ this.chart = a;
+ this.canvas = a.canvas;
+ this.ctx = a.ctx;
+ this.intervalStartPosition = this.maxHeight = this.maxWidth = 0;
+ this.labels = [];
+ this.dataSeries = [];
+ this._stripLineLabels = this._ticks = this._labels = null;
+ this.dataInfo = {
+ min: Infinity,
+ max: -Infinity,
+ viewPortMin: Infinity,
+ viewPortMax: -Infinity,
+ minDiff: Infinity
+ };
+ this.isOptionsInArray = !0;
+ "axisX" === b ? ("left" === d || "bottom" === d ? (this.optionsName = "axisX", z(this.chart.sessionVariables.axisX[f]) && (this.chart.sessionVariables.axisX[f] = {}), this.sessionVariables = this.chart.sessionVariables.axisX[f]) : (this.optionsName = "axisX2", z(this.chart.sessionVariables.axisX2[f]) && (this.chart.sessionVariables.axisX2[f] = {}), this.sessionVariables = this.chart.sessionVariables.axisX2[f]), this.options.interval || (this.intervalType =
+ null), "theme2" === this.chart.theme && z(this.options.lineThickness) && (this.lineThickness = 2)) : "left" === d || "top" === d ? (this.optionsName = "axisY", z(this.chart.sessionVariables.axisY[f]) && (this.chart.sessionVariables.axisY[f] = {}), this.sessionVariables = this.chart.sessionVariables.axisY[f]) : (this.optionsName = "axisY2", z(this.chart.sessionVariables.axisY2[f]) && (this.chart.sessionVariables.axisY2[f] = {}), this.sessionVariables = this.chart.sessionVariables.axisY2[f]);
+ "undefined" === typeof this.options.titleFontSize &&
+ (this.titleFontSize = this.chart.getAutoFontSize(this.titleFontSize));
+ "undefined" === typeof this.options.labelFontSize && (this.labelFontSize = this.chart.getAutoFontSize(this.labelFontSize));
+ this.type = b;
+ "axisX" !== b || c && "undefined" !== typeof c.gridThickness || (this.gridThickness = 0);
+ this._position = d;
+ this.lineCoordinates = { x1: null, y1: null, x2: null, y2: null, width: null };
+ this.labelAngle = (this.labelAngle % 360 + 360) % 360;
+ 90 < this.labelAngle && 270 > this.labelAngle ? this.labelAngle -= 180 : 270 <= this.labelAngle && 360 >= this.labelAngle &&
+ (this.labelAngle -= 360);
+ if (this.options.stripLines && 0 < this.options.stripLines.length)
+ for (this.stripLines = [], c = 0; c < this.options.stripLines.length; c++) this.stripLines.push(new na(this.chart, this.options.stripLines[c], a.theme, ++this.chart._eventManager.lastObjectId, this));
+ this._titleTextBlock = null;
+ this.hasOptionChanged("viewportMinimum") && null === this.viewportMinimum && (this.options.viewportMinimum = void 0, this.sessionVariables.viewportMinimum = null);
+ this.hasOptionChanged("viewportMinimum") || isNaN(this.sessionVariables.newViewportMinimum) ||
+ null === this.sessionVariables.newViewportMinimum ? this.sessionVariables.newViewportMinimum = null : this.viewportMinimum = this.sessionVariables.newViewportMinimum;
+ this.hasOptionChanged("viewportMaximum") && null === this.viewportMaximum && (this.options.viewportMaximum = void 0, this.sessionVariables.viewportMaximum = null);
+ this.hasOptionChanged("viewportMaximum") || isNaN(this.sessionVariables.newViewportMaximum) || null === this.sessionVariables.newViewportMaximum ? this.sessionVariables.newViewportMaximum = null : this.viewportMaximum =
+ this.sessionVariables.newViewportMaximum;
+ null !== this.minimum && null !== this.viewportMinimum && (this.viewportMinimum = Math.max(this.viewportMinimum, this.minimum));
+ null !== this.maximum && null !== this.viewportMaximum && (this.viewportMaximum = Math.min(this.viewportMaximum, this.maximum));
+ this.trackChanges("viewportMinimum");
+ this.trackChanges("viewportMaximum")
+ }
+
+ function na(a, c, b, d, f) {
+ na.base.constructor.call(this, "StripLine", c, b, f);
+ this.id = d;
+ this.chart = a;
+ this.ctx = this.chart.ctx;
+ this.label = this.label;
+ this.axis = f;
+ this.optionsName = "stripLines";
+ this.isOptionsInArray = !0;
+ this._thicknessType = "pixel";
+ null !== this.startValue && null !== this.endValue && (this.value = f.logarithmic ? Math.sqrt((this.startValue.getTime ? this.startValue.getTime() : this.startValue) * (this.endValue.getTime ? this.endValue.getTime() : this.endValue)) : ((this.startValue.getTime ? this.startValue.getTime() : this.startValue) + (this.endValue.getTime ? this.endValue.getTime() : this.endValue)) / 2, this.thickness = f.logarithmic ? Math.log(this.endValue / this.startValue) / Math.log(f.logarithmBase) :
+ Math.max(this.endValue - this.startValue), this._thicknessType = "value")
+ }
+
+ function Q(a, c) {
+ Q.base.constructor.call(this, "ToolTip", c, a.theme, a);
+ this.chart = a;
+ this.canvas = a.canvas;
+ this.ctx = this.chart.ctx;
+ this.currentDataPointIndex = this.currentSeriesIndex = -1;
+ this._timerId = 0;
+ this._prevY = this._prevX = NaN;
+ this.optionsName = "toolTip";
+ this._initialize()
+ }
+
+ function la(a) {
+ this.chart = a;
+ this.lastObjectId = 0;
+ this.objectMap = [];
+ this.rectangularRegionEventSubscriptions = [];
+ this.previousDataPointEventObject = null;
+ this.ghostCanvas =
+ fa(this.chart.width, this.chart.height);
+ this.ghostCtx = this.ghostCanvas.getContext("2d");
+ this.mouseoveredObjectMaps = []
+ }
+
+ function oa(a) {
+ var c;
+ a && pa[a] && (c = pa[a]);
+ oa.base.constructor.call(this, "CultureInfo", c)
+ }
+
+ function Da(a) {
+ this.chart = a;
+ this.ctx = this.chart.plotArea.ctx;
+ this.animations = [];
+ this.animationRequestId = null
+ }
+ var A = {},
+ t = !!document.createElement("canvas").getContext,
+ ba = {
+ Chart: {
+ width: 500,
+ height: 400,
+ zoomEnabled: !1,
+ zoomType: "x",
+ backgroundColor: "black",
+ fontColor: "white",
+ theme: "theme1",
+ animationEnabled: !1,
+ animationDuration: 1200,
+ dataPointWidth: null,
+ dataPointMinWidth: null,
+ dataPointMaxWidth: null,
+ colorSet: "colorSet1",
+ culture: "en",
+ creditHref: "",
+ creditText: "CanvasJS",
+ interactivityEnabled: !0,
+ exportEnabled: !1,
+ exportFileName: "Chart",
+ rangeChanging: null,
+ rangeChanged: null,
+ publicProperties: { title: "readWrite", subtitles: "readWrite", toolTip: "readWrite", legend: "readWrite", axisX: "readWrite", axisY: "readWrite", axisX2: "readWrite", axisY2: "readWrite", data: "readWrite", options: "readWrite", bounds: "readOnly", container: "readOnly" }
+ },
+ Title: {
+ padding: 0,
+ text: null,
+ verticalAlign: "top",
+ horizontalAlign: "center",
+ fontSize: 20,
+ fontFamily: "Calibri",
+ fontWeight: "normal",
+ fontColor: "black",
+ fontStyle: "normal",
+ borderThickness: 0,
+ borderColor: "black",
+ cornerRadius: 0,
+ backgroundColor: t ? "transparent" : null,
+ margin: 5,
+ wrap: !0,
+ maxWidth: null,
+ dockInsidePlotArea: !1,
+ publicProperties: { options: "readWrite", bounds: "readOnly", chart: "readOnly" }
+ },
+ Subtitle: {
+ padding: 0,
+ text: null,
+ verticalAlign: "top",
+ horizontalAlign: "center",
+ fontSize: 14,
+ fontFamily: "Calibri",
+ fontWeight: "normal",
+ fontColor: "black",
+ fontStyle: "normal",
+ borderThickness: 0,
+ borderColor: "black",
+ cornerRadius: 0,
+ backgroundColor: null,
+ margin: 2,
+ wrap: !0,
+ maxWidth: null,
+ dockInsidePlotArea: !1,
+ publicProperties: { options: "readWrite", bounds: "readOnly", chart: "readOnly" }
+ },
+ Legend: {
+ name: null,
+ verticalAlign: "center",
+ horizontalAlign: "right",
+ fontSize: 14,
+ fontFamily: "calibri",
+ fontWeight: "normal",
+ fontColor: "black",
+ fontStyle: "normal",
+ cursor: null,
+ itemmouseover: null,
+ itemmouseout: null,
+ itemmousemove: null,
+ itemclick: null,
+ dockInsidePlotArea: !1,
+ reversed: !1,
+ backgroundColor: t ?
+ "transparent" : null,
+ borderColor: t ? "transparent" : null,
+ borderThickness: 0,
+ cornerRadius: 0,
+ maxWidth: null,
+ maxHeight: null,
+ markerMargin: null,
+ itemMaxWidth: null,
+ itemWidth: null,
+ itemWrap: !0,
+ itemTextFormatter: null,
+ publicProperties: { options: "readWrite", bounds: "readOnly", chart: "readOnly" }
+ },
+ ToolTip: {
+ enabled: !0,
+ shared: !1,
+ animationEnabled: !0,
+ content: null,
+ contentFormatter: null,
+ reversed: !1,
+ backgroundColor: t ? "rgba(255,255,255,.9)" : "rgb(255,255,255)",
+ borderColor: null,
+ borderThickness: 2,
+ cornerRadius: 5,
+ fontSize: 14,
+ fontColor: "black",
+ fontFamily: "Calibri, Arial, Georgia, serif;",
+ fontWeight: "normal",
+ fontStyle: "italic",
+ publicProperties: { options: "readWrite", chart: "readOnly" }
+ },
+ Axis: {
+ minimum: null,
+ maximum: null,
+ viewportMinimum: null,
+ viewportMaximum: null,
+ interval: null,
+ intervalType: null,
+ reversed: !1,
+ logarithmic: !1,
+ logarithmBase: 10,
+ title: null,
+ titleFontColor: "black",
+ titleFontSize: 20,
+ titleFontFamily: "arial",
+ titleFontWeight: "normal",
+ titleFontStyle: "normal",
+ titleWrap: !0,
+ titleMaxWidth: null,
+ titleBackgroundColor: t ? "transparent" : null,
+ titleBorderColor: t ?
+ "transparent" : null,
+ titleBorderThickness: 0,
+ titleCornerRadius: 0,
+ labelAngle: 0,
+ labelFontFamily: "arial",
+ labelFontColor: "black",
+ labelFontSize: 12,
+ labelFontWeight: "normal",
+ labelFontStyle: "normal",
+ labelAutoFit: !0,
+ labelWrap: !0,
+ labelMaxWidth: null,
+ labelFormatter: null,
+ labelBackgroundColor: t ? "transparent" : null,
+ labelBorderColor: t ? "transparent" : null,
+ labelBorderThickness: 0,
+ labelCornerRadius: 0,
+ prefix: "",
+ suffix: "",
+ includeZero: !0,
+ tickLength: 5,
+ tickColor: "black",
+ tickThickness: 1,
+ lineColor: "black",
+ lineThickness: 1,
+ lineDashType: "solid",
+ gridColor: "A0A0A0",
+ gridThickness: 0,
+ gridDashType: "solid",
+ interlacedColor: t ? "transparent" : null,
+ valueFormatString: null,
+ margin: 2,
+ stripLines: [],
+ publicProperties: { options: "readWrite", bounds: "readOnly", chart: "readOnly" }
+ },
+ StripLine: {
+ value: null,
+ startValue: null,
+ endValue: null,
+ color: "orange",
+ opacity: null,
+ thickness: 2,
+ lineDashType: "solid",
+ label: "",
+ labelPlacement: "inside",
+ labelAlign: "far",
+ labelWrap: !0,
+ labelMaxWidth: null,
+ labelBackgroundColor: t ? "transparent" : null,
+ labelBorderColor: t ? "transparent" : null,
+ labelBorderThickness: 0,
+ labelCornerRadius: 0,
+ labelFontFamily: "arial",
+ labelFontColor: "orange",
+ labelFontSize: 12,
+ labelFontWeight: "normal",
+ labelFontStyle: "normal",
+ labelFormatter: null,
+ showOnTop: !1,
+ publicProperties: { options: "readWrite", axis: "readOnly", bounds: "readOnly", chart: "readOnly" }
+ },
+ DataSeries: {
+ name: null,
+ dataPoints: null,
+ label: "",
+ bevelEnabled: !1,
+ highlightEnabled: !0,
+ cursor: "default",
+ indexLabel: "",
+ indexLabelPlacement: "auto",
+ indexLabelOrientation: "horizontal",
+ indexLabelFontColor: "black",
+ indexLabelFontSize: 12,
+ indexLabelFontStyle: "normal",
+ indexLabelFontFamily: "Arial",
+ indexLabelFontWeight: "normal",
+ indexLabelBackgroundColor: null,
+ indexLabelLineColor: "gray",
+ indexLabelLineThickness: 1,
+ indexLabelLineDashType: "solid",
+ indexLabelMaxWidth: null,
+ indexLabelWrap: !0,
+ indexLabelFormatter: null,
+ lineThickness: 2,
+ lineDashType: "solid",
+ connectNullData: !1,
+ nullDataLineDashType: "dash",
+ color: null,
+ lineColor: null,
+ risingColor: "white",
+ fillOpacity: null,
+ startAngle: 0,
+ radius: null,
+ innerRadius: null,
+ type: "column",
+ xValueType: "number",
+ axisXType: "primary",
+ axisYType: "primary",
+ axisXIndex: 0,
+ axisYIndex: 0,
+ xValueFormatString: null,
+ yValueFormatString: null,
+ zValueFormatString: null,
+ percentFormatString: null,
+ showInLegend: null,
+ legendMarkerType: null,
+ legendMarkerColor: null,
+ legendText: null,
+ legendMarkerBorderColor: t ? "transparent" : null,
+ legendMarkerBorderThickness: 0,
+ markerType: "circle",
+ markerColor: null,
+ markerSize: null,
+ markerBorderColor: t ? "transparent" : null,
+ markerBorderThickness: 0,
+ mouseover: null,
+ mouseout: null,
+ mousemove: null,
+ click: null,
+ toolTipContent: null,
+ visible: !0,
+ publicProperties: {
+ options: "readWrite",
+ axisX: "readWrite",
+ axisY: "readWrite",
+ chart: "readOnly"
+ }
+ },
+ TextBlock: { x: 0, y: 0, width: null, height: null, maxWidth: null, maxHeight: null, padding: 0, angle: 0, text: "", horizontalAlign: "center", fontSize: 12, fontFamily: "calibri", fontWeight: "normal", fontColor: "black", fontStyle: "normal", borderThickness: 0, borderColor: "black", cornerRadius: 0, backgroundColor: null, textBaseline: "top" },
+ CultureInfo: {
+ decimalSeparator: ".",
+ digitGroupSeparator: ",",
+ zoomText: "Zoom",
+ panText: "Pan",
+ resetText: "Reset",
+ menuText: "More Options",
+ saveJPGText: "Save as JPEG",
+ savePNGText: "Save as PNG",
+ printText: "Print",
+ days: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
+ shortDays: "Sun Mon Tue Wed Thu Fri Sat".split(" "),
+ months: "January February March April May June July August September October November December".split(" "),
+ shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")
+ }
+ },
+ pa = { en: {} },
+ ga = {
+ colorSet1: "#369EAD #C24642 #7F6084 #86B402 #A2D1CF #C8B631 #6DBCEB #52514E #4F81BC #A064A1 #F79647".split(" "),
+ colorSet2: "#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #33558B".split(" "),
+ colorSet3: "#8CA1BC #36845C #017E82 #8CB9D0 #708C98 #94838D #F08891 #0366A7 #008276 #EE7757 #E5BA3A #F2990B #03557B #782970".split(" ")
+ },
+ ha = {
+ theme1: {
+ Chart: { colorSet: "colorSet1" },
+ Title: { fontFamily: t ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri", fontSize: 33, fontColor: "#3A3A3A", fontWeight: "bold", verticalAlign: "top", margin: 5 },
+ Subtitle: {
+ fontFamily: t ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri",
+ fontSize: 16,
+ fontColor: "#3A3A3A",
+ fontWeight: "bold",
+ verticalAlign: "top",
+ margin: 5
+ },
+ Axis: { titleFontSize: 26, titleFontColor: "#666666", titleFontFamily: t ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri", labelFontFamily: t ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri", labelFontSize: 18, labelFontColor: "grey", tickColor: "#BBBBBB", tickThickness: 2, gridThickness: 2, gridColor: "#BBBBBB", lineThickness: 2, lineColor: "#BBBBBB" },
+ Legend: { verticalAlign: "bottom", horizontalAlign: "center", fontFamily: t ? "monospace, sans-serif,arial black" : "calibri" },
+ DataSeries: {
+ indexLabelFontColor: "grey",
+ indexLabelFontFamily: t ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri",
+ indexLabelFontSize: 18,
+ indexLabelLineThickness: 1
+ }
+ },
+ theme2: {
+ Chart: { colorSet: "colorSet2" },
+ Title: { fontFamily: "impact, charcoal, arial black, sans-serif", fontSize: 32, fontColor: "#333333", verticalAlign: "top", margin: 5 },
+ Subtitle: { fontFamily: "impact, charcoal, arial black, sans-serif", fontSize: 14, fontColor: "#333333", verticalAlign: "top", margin: 5 },
+ Axis: {
+ titleFontSize: 22,
+ titleFontColor: "rgb(98,98,98)",
+ titleFontFamily: t ? "monospace, sans-serif,arial black" : "arial",
+ titleFontWeight: "bold",
+ labelFontFamily: t ? "monospace, Courier New, Courier" : "arial",
+ labelFontSize: 16,
+ labelFontColor: "grey",
+ labelFontWeight: "bold",
+ tickColor: "grey",
+ tickThickness: 2,
+ gridThickness: 2,
+ gridColor: "grey",
+ lineColor: "grey",
+ lineThickness: 0
+ },
+ Legend: { verticalAlign: "bottom", horizontalAlign: "center", fontFamily: t ? "monospace, sans-serif,arial black" : "arial" },
+ DataSeries: {
+ indexLabelFontColor: "grey",
+ indexLabelFontFamily: t ? "Courier New, Courier, monospace" : "arial",
+ indexLabelFontWeight: "bold",
+ indexLabelFontSize: 18,
+ indexLabelLineThickness: 1
+ }
+ },
+ theme3: {
+ Chart: { colorSet: "colorSet1" },
+ Title: { fontFamily: t ? "Candara, Optima, Trebuchet MS, Helvetica Neue, Helvetica, Trebuchet MS, serif" : "calibri", fontSize: 32, fontColor: "#3A3A3A", fontWeight: "bold", verticalAlign: "top", margin: 5 },
+ Subtitle: { fontFamily: t ? "Candara, Optima, Trebuchet MS, Helvetica Neue, Helvetica, Trebuchet MS, serif" : "calibri", fontSize: 16, fontColor: "#3A3A3A", fontWeight: "bold", verticalAlign: "top", margin: 5 },
+ Axis: {
+ titleFontSize: 22,
+ titleFontColor: "rgb(98,98,98)",
+ titleFontFamily: t ? "Verdana, Geneva, Calibri, sans-serif" : "calibri",
+ labelFontFamily: t ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri",
+ labelFontSize: 18,
+ labelFontColor: "grey",
+ tickColor: "grey",
+ tickThickness: 2,
+ gridThickness: 2,
+ gridColor: "grey",
+ lineThickness: 2,
+ lineColor: "grey"
+ },
+ Legend: { verticalAlign: "bottom", horizontalAlign: "center", fontFamily: t ? "monospace, sans-serif,arial black" : "calibri" },
+ DataSeries: {
+ bevelEnabled: !0,
+ indexLabelFontColor: "grey",
+ indexLabelFontFamily: t ? "Candara, Optima, Calibri, Verdana, Geneva, sans-serif" : "calibri",
+ indexLabelFontSize: 18,
+ indexLabelLineColor: "lightgrey",
+ indexLabelLineThickness: 2
+ }
+ }
+ },
+ H = { numberDuration: 1, yearDuration: 314496E5, monthDuration: 2592E6, weekDuration: 6048E5, dayDuration: 864E5, hourDuration: 36E5, minuteDuration: 6E4, secondDuration: 1E3, millisecondDuration: 1, dayOfWeekFromInt: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ") },
+ La = {},
+ aa = null,
+ Ea = function() {
+ var a = /D{1,4}|M{1,4}|Y{1,4}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|f{1,3}|t{1,2}|T{1,2}|K|z{1,3}|"[^"]*"|'[^']*'/g,
+ c = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
+ b = "Sun Mon Tue Wed Thu Fri Sat".split(" "),
+ d = "January February March April May June July August September October November December".split(" "),
+ f = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
+ g = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,
+ l = /[^-+\dA-Z]/g;
+ return function(k, h, m) {
+ var p = m ? m.days : c,
+ n = m ? m.months : d,
+ e = m ? m.shortDays : b,
+ q = m ? m.shortMonths : f;
+ m = "";
+ var r = !1;
+ k = k && k.getTime ? k : k ? new Date(k) : new Date;
+ if (isNaN(k)) throw SyntaxError("invalid date");
+ "UTC:" === h.slice(0, 4) && (h = h.slice(4), r = !0);
+ m = r ? "getUTC" : "get";
+ var s = k[m + "Date"](),
+ w = k[m + "Day"](),
+ u = k[m + "Month"](),
+ y = k[m + "FullYear"](),
+ x = k[m + "Hours"](),
+ v = k[m + "Minutes"](),
+ t = k[m + "Seconds"](),
+ z = k[m + "Milliseconds"](),
+ A = r ? 0 : k.getTimezoneOffset();
+ return m = h.replace(a, function(a) {
+ switch (a) {
+ case "D":
+ return s;
+ case "DD":
+ return O(s, 2);
+ case "DDD":
+ return e[w];
+ case "DDDD":
+ return p[w];
+ case "M":
+ return u + 1;
+ case "MM":
+ return O(u + 1, 2);
+ case "MMM":
+ return q[u];
+ case "MMMM":
+ return n[u];
+ case "Y":
+ return parseInt(String(y).slice(-2));
+ case "YY":
+ return O(String(y).slice(-2), 2);
+ case "YYY":
+ return O(String(y).slice(-3), 3);
+ case "YYYY":
+ return O(y, 4);
+ case "h":
+ return x % 12 || 12;
+ case "hh":
+ return O(x % 12 || 12, 2);
+ case "H":
+ return x;
+ case "HH":
+ return O(x, 2);
+ case "m":
+ return v;
+ case "mm":
+ return O(v, 2);
+ case "s":
+ return t;
+ case "ss":
+ return O(t, 2);
+ case "f":
+ return String(z).slice(0, 1);
+ case "ff":
+ return O(String(z).slice(0, 2), 2);
+ case "fff":
+ return O(String(z).slice(0, 3), 3);
+ case "t":
+ return 12 > x ? "a" : "p";
+ case "tt":
+ return 12 >
+ x ? "am" : "pm";
+ case "T":
+ return 12 > x ? "A" : "P";
+ case "TT":
+ return 12 > x ? "AM" : "PM";
+ case "K":
+ return r ? "UTC" : (String(k).match(g) || [""]).pop().replace(l, "");
+ case "z":
+ return (0 < A ? "-" : "+") + Math.floor(Math.abs(A) / 60);
+ case "zz":
+ return (0 < A ? "-" : "+") + O(Math.floor(Math.abs(A) / 60), 2);
+ case "zzz":
+ return (0 < A ? "-" : "+") + O(Math.floor(Math.abs(A) / 60), 2) + O(Math.abs(A) % 60, 2);
+ default:
+ return a.slice(1, a.length - 1)
+ }
+ })
+ }
+ }(),
+ ca = function(a, c, b) {
+ if (null === a) return "";
+ a = Number(a);
+ var d = 0 > a ? !0 : !1;
+ d && (a *= -1);
+ var f = b ? b.decimalSeparator : ".",
+ g =
+ b ? b.digitGroupSeparator : ",",
+ l = "";
+ c = String(c);
+ var l = 1,
+ k = b = "",
+ h = -1,
+ m = [],
+ p = [],
+ n = 0,
+ e = 0,
+ q = 0,
+ r = !1,
+ s = 0,
+ k = c.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);
+ c = null;
+ for (var w = 0; k && w < k.length; w++)
+ if (c = k[w], "." === c && 0 > h) h = w;
+ else {
+ if ("%" === c) l *= 100;
+ else if ("\u2030" === c) { l *= 1E3; continue } else if ("," === c[0] && "." === c[c.length - 1]) {
+ l /= Math.pow(1E3, c.length - 1);
+ h = w + c.length - 1;
+ continue
+ } else "E" !== c[0] && "e" !== c[0] || "0" !== c[c.length - 1] || (r = !0);
+ 0 > h ? (m.push(c), "#" === c || "0" === c ? n++ : "," === c && q++) : (p.push(c), "#" !== c &&
+ "0" !== c || e++)
+ }
+ r && (c = Math.floor(a), k = -Math.floor(Math.log(a) / Math.LN10 + 1), s = 0 === a ? 0 : 0 === c ? -(n + k) : String(c).length - n, l /= Math.pow(10, s));
+ 0 > h && (h = w);
+ l = (a * l).toFixed(e);
+ c = l.split(".");
+ l = (c[0] + "").split("");
+ a = (c[1] + "").split("");
+ l && "0" === l[0] && l.shift();
+ for (r = k = w = e = h = 0; 0 < m.length;)
+ if (c = m.pop(), "#" === c || "0" === c)
+ if (h++, h === n) {
+ var u = l,
+ l = [];
+ if ("0" === c)
+ for (c = n - e - (u ? u.length : 0); 0 < c;) u.unshift("0"), c--;
+ for (; 0 < u.length;) b = u.pop() + b, r++, 0 === r % k && (w === q && 0 < u.length) && (b = g + b)
+ } else 0 < l.length ? (b = l.pop() + b, e++, r++) :
+ "0" === c && (b = "0" + b, e++, r++), 0 === r % k && (w === q && 0 < l.length) && (b = g + b);
+ else "E" !== c[0] && "e" !== c[0] || "0" !== c[c.length - 1] || !/[eE][+-]*[0]+/.test(c) ? "," === c ? (w++, k = r, r = 0, 0 < l.length && (b = g + b)) : b = 1 < c.length && ('"' === c[0] && '"' === c[c.length - 1] || "'" === c[0] && "'" === c[c.length - 1]) ? c.slice(1, c.length - 1) + b : c + b : (c = 0 > s ? c.replace("+", "").replace("-", "") : c.replace("-", ""), b += c.replace(/[0]+/, function(a) { return O(s, a.length) }));
+ g = "";
+ for (m = !1; 0 < p.length;) c = p.shift(), "#" === c || "0" === c ? 0 < a.length && 0 !== Number(a.join("")) ? (g += a.shift(),
+ m = !0) : "0" === c && (g += "0", m = !0) : 1 < c.length && ('"' === c[0] && '"' === c[c.length - 1] || "'" === c[0] && "'" === c[c.length - 1]) ? g += c.slice(1, c.length - 1) : "E" !== c[0] && "e" !== c[0] || "0" !== c[c.length - 1] || !/[eE][+-]*[0]+/.test(c) ? g += c : (c = 0 > s ? c.replace("+", "").replace("-", "") : c.replace("-", ""), g += c.replace(/[0]+/, function(a) { return O(s, a.length) }));
+ b += (m ? f : "") + g;
+ return d ? "-" + b : b
+ },
+ xa = function(a) {
+ var c = 0,
+ b = 0;
+ a = a || window.event;
+ a.offsetX || 0 === a.offsetX ? (c = a.offsetX, b = a.offsetY) : a.layerX || 0 == a.layerX ? (c = a.layerX, b = a.layerY) : (c = a.pageX -
+ a.target.offsetLeft, b = a.pageY - a.target.offsetTop);
+ return { x: c, y: b }
+ },
+ Na = !0,
+ za = window.devicePixelRatio || 1,
+ sa = 1,
+ P = Na ? za / sa : 1,
+ Aa = window && window.location && window.location.href && window.location.href.indexOf && (-1 !== window.location.href.indexOf("canvasjs.com") || -1 !== window.location.href.indexOf("fenopix.com") || -1 !== window.location.href.indexOf("fiddle")),
+ Sa = {
+ reset: { image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAcCAYAAAAAwr0iAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAKRSURBVEiJrdY/iF1FFMfxzwnZrGISUSR/JLGIhoh/QiRNBLWxMLIWEkwbgiAoFgoW2mhlY6dgpY2IlRBRxBSKhSAKIklWJRYuMZKAhiyopAiaTY7FvRtmZ+/ed9/zHRjezLw5v/O9d86cuZGZpmURAfdn5o9DfdZNLXpjz+LziPgyIl6MiG0jPTJzZBuyDrP4BVm0P/AKbljTb4ToY/gGewYA7KyCl+1b3DUYANvwbiHw0gCAGRzBOzjTAXEOu0cC4Ch+r5x/HrpdrcZmvIDFSucMtnYCYC++6HmNDw8FKDT34ETrf639/azOr5vwRk/g5fbeuABtgC04XWk9VQLciMP4EH/3AFzErRNC7MXlQmsesSoHsGPE23hmEoBW+61K66HMXFmIMvN8myilXS36R01ub+KfYvw43ZXwYDX+AHP4BAci4pFJomfmr/ihmNofESsBImJGk7mlncrM45n5JPbhz0kAWpsv+juxaX21YIPmVJS2uNzJMS6ZNexC0d+I7fUWXLFyz2kSZlpWPvASlmqAf/FXNXf3FAF2F/1LuFifAlionB6dRuSI2IwHi6lzmXmp6xR8XY0fiIh7psAwh+3FuDkRHQVjl+a8lkXjo0kLUKH7XaV5oO86PmZ1FTzyP4K/XGl9v/zwfbW7BriiuETGCP5ch9bc9f97HF/vcFzCa5gdEPgWq+t/4v0V63oE1uF4h0DiFJ7HnSWMppDdh1dxtsPvJ2wcBNAKbsJXa0Ck5opdaBPsRNu/usba09i1KsaAVzmLt3sghrRjuK1Tf4xkegInxwy8gKf7dKMVH2QRsV5zXR/Cftyu+aKaKbbkQrsdH+PTzLzcqzkOQAVzM+7FHdiqqe2/YT4zF/t8S/sPmawyvC974vcAAAAASUVORK5CYII=" },
+ pan: { image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAJVSURBVFiFvZe7a1RBGMV/x2hWI4JpfKCIiSBKOoOCkID/wP4BFqIIFkE02ChIiC8QDKlSiI3YqRBsBVGwUNAUdiIEUgjiAzQIIsuKJsfizsXr5t7d+8jmwLDfzHz3nLOzc7+ZxTZlGyDgZiWOCuJ9wH2gCUyuqQFgF/AGcKJNrYkBYBj40CIet+muGQi/96kM4WS7C/Tm5VUg7whJg8BkEGkCR4BDYfodsADUgP6wErO5iCtswsuJb32hdbXy8qzL5TIdmzJinHdZoZIBZcSFkGlAKs1Z3YCketZcBtouuaQNkrblMiBpBrhme7mAgU4wMCvpcFsDkq4C54DFVRTH9h+i6vlE0r5UA5ImgCuh28jB28iIs7BIVCOeStoZD64P4uPAjUTygKSx2FsK2TIwkugfk9Qkfd/E+yMWHQCeSRqx/R3gOp3LazfaS2C4B5gHDgD7U9x3E3uAH7KNpC3AHHAwTL4FHgM9GQ8vAaPA0dB/Abxqk2/gBLA9MXba9r1k/d4LfA3JtwueBeM58ucS+edXnAW23wP10N3advEi9CXizTnyN4bPS7Zn4sH/dq3t18AY4e1YLYSy3g/csj2VnFshZPuOpOeSKHCodUINuGj7YetE6je1PV9QoNPJ9StNHKodx7nRbiWrGHBGXAi5DUiqtQwtpcWK0Jubt8CltA5MEV1IfwO7+VffPwGfia5m34CT4bXujIIX0Qna1/cGMNqV/wUJE2czxD8CQ4X5Sl7Jz7SILwCDpbjKPBRMHAd+EtX4HWV5Spdc2w8kDQGPbH8py/MXMygM69/FKz4AAAAASUVORK5CYII=" },
+ zoom: { image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAMqSURBVFiFvdfbj91TFMDxz57U6GUEMS1aYzyMtCSSDhWjCZMInpAI3khE/QHtgzdRkXgSCS8SES9epKLi0oRKNETjRahREq2KS1stdRujtDPtbA97n5zdn9+5zJxTK9k5v3POXmt991p7r71+IcaoGwkhTOIebMRqzOBTvIG3Y4zTXRmqSoyx5cAKbMJOHMFJnMZ8/jyFaXyMR7G6nb1aH22cP4BvcBxziG3GKfyTIR9D6BYg1KUghPBCDveFlb/24Av8iuUYw41YVsz5G7uxKcZ4aMEpwGt5NY3V/YbHsQ6rcAHOw/kYxigewr5CZw4fYGxBKcCLOFEYehXrMdRhr5yLETxVScsOLOkKAPfn1TYMPIvLFrShUlS2FDZm8XRHACzFAWl3R2xbqPMCYhmeLCAOYEMngAczbcTvuHYxzguIy/FesR9e6gSwU/OoPYHBHgHgviIKX2Flq7k34KhmcVnbi/PC8JX4MgMcxb118wZwdz5aISscqx7VRcox7MrPQ7i+btIAJrAkf9+bI9EPmZY2IAxiTSuAldLq4Y9+AcSUh78KP0tbAcwU35cXMD1JCIFUoGiehlqAz6TNB1f1C0DK+0h+nsNPrQC2a4bqGmlD9kOGcWt+Po6pVgDvSxfJaSkFd4UQBvoAsBYbCoB3a2flM7slA0R8iyt6rAFDeDPbm8eOTpVwGD9qVq7nLbIaZnmksPU1JtsCZMXNmpdRxFasWITzh6Xj3LCzra1OxcD2QjHiGVzdpfORnMqZio2PcF23ABdJF1Np4BPptlyPi6WzPYBzpJZtHe7A6xW9cnyP8TqA//SEIYRL8Bxul7rihvwgtVn78WcGGZXa9HGd5TDujDHuOePXNiHdKjWgZX/YbsxLx/ktqbjVzTlcjUSnvI5JrdlUVp6WesZZ6R1hRrpq9+EVTGS9jTjYAuKIouGpbcurEkIYxC051KNSamazsc+xK8b4S0VnEi/j0hqTP+M27O258egQwZuzs7pI7Mf4WQXIEDc5s9sux+5+1Py2EmP8UOq6GvWhIScxfdYjUERiAt9Jd84J6a16zf8JEKT3yCm8g1UxRv8CC4pyRhzR1uUAAAAASUVORK5CYII=" },
+ menu: { image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgCAYAAAAbifjMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDcvMTUvMTTPsvU0AAAAP0lEQVRIie2SMQoAIBDDUvH/X667g8sJJ9KOhYYOkW0qGaU1MPdC0vGSbV19EACo3YMPAFH5BUBUjsqfAPpVXtNgGDfxEDCtAAAAAElFTkSuQmCC" }
+ };
+ (function() {
+ function a(a) {
+ var b = RegExp(A.ckDec(A.obj.ckn) + "=.*", "gi"),
+ d = new Date,
+ f = document.cookie.match(b),
+ b = localStorage && localStorage.getItem("lclStg") &&
+ JSON.parse(localStorage.getItem("lclStg")).name.match(A.ckDec(A.obj.ckn)) ? JSON.parse(localStorage.getItem("lclStg")) : null;
+ if (f && 0 < f.length || b) {
+ var g;
+ g = [];
+ var l = [],
+ k = null;
+ if (f)
+ for (var f = f[0].split("; "), h = 0; h < f.length; h++) g.push(f[h].split("=")[0]), l.push(f[h].split("=")[1]);
+ b && (k = b);
+ g = { ckVal: Number(l[0]), lSVal: k ? Number(k.val) : null };
+ b = null;
+ g && g.ckVal && g.lSVal ? b = Math.min(g.ckVal, g.lSVal) : g && g.ckVal ? b = g.ckVal : g && g.lSVal && (b = g.lSVal);
+ d = Math.round(Math.abs(b - d.getTime()));
+ if (!z(ja[A.ckDec(A.obj.sk)]) &&
+ "string" === typeof ja[A.ckDec(A.obj.sk)] && ja[A.ckDec(A.obj.sk)]) {
+ g = ja[A.ckDec(A.obj.sk)];
+ for (var l = [], k = [], f = 0, m = h = "", p = g.substr(g.length - 3, g.length), n = 0; n < g.length - 3; n++) l.push(parseInt(g.charCodeAt(n)) - 59), h += String.fromCharCode(l[n]), f += parseInt(parseInt(h.charCodeAt(n)) + 59, 10);
+ f %= 256;
+ f = 99 < f ? "" + f : 9 < f ? "0" + f : "00" + f;
+ for (n = 0; n < p.length; n++) k.push(parseInt(p.charCodeAt(n)) - 59), m += String.fromCharCode(k[n]);
+ g = f === m ? h : 0
+ } else g = 0;
+ a = g ? (new Date(Number(g))).getTime() - b : 864E5 * a;
+ if (isNaN(a) || d > a) return !0
+ } else a =
+ new Date, b = a.getTime(), a.setTime(b + 31536E6), b = { name: A.ckDec(A.obj.ckn), val: (new Date).getTime() }, document.cookie = A.ckDec(A.obj.ckn) + "=" + (new Date).getTime() + "; " + A.ckDec(A.obj.ckve) + a.toUTCString() + "; path=/;", localStorage.setItem("lclStg", JSON.stringify(b));
+ return !1
+ }
+ A.fSDec = function(a) { for (var b = "", d = 0; d < a.length; d++) b += String.fromCharCode(Math.ceil(a.length / 57 / 5) ^ a.charCodeAt(d)); return b };
+ A.obj = {
+ trVs: "Ush`m!Wdsrhno",
+ fntStr: "qy!B`mhcsh-!Mtbhe`!Fs`oed-!Mtbhe`!R`or!Tohbned-!@sh`m-!r`or,rdshg",
+ txtBl: "udyuC`rdmhod",
+ fnt: "gnou",
+ fSy: "ghmmRuxmd",
+ fTx: "ghmmUdyu",
+ grClr: "fsdx",
+ cntx: "buy",
+ tp: "unq"
+ };
+ delete ba[A.fSDec("Bi`su")][A.fSDec("bsdehuIsdg")];
+ A.pro = { sCH: ba[A.fSDec("Bi`su")][A.fSDec("bsdehuIsdg")] };
+ A.fSWm = function(c) {
+ if ("undefined" === typeof A.pro.sCH && !Aa) try {
+ if (a(2)) {
+ var b = c[A.fSDec(A.obj.cntx)];
+ b[A.fSDec(A.obj.txtBl)] = A.fSDec(A.obj.tp);
+ b[A.fSDec(A.obj.fnt)] = 11 + A.fSDec(A.obj.fntStr);
+ b[A.fSDec(A.obj.fSy)] = A.fSDec(A.obj.grClr);
+ b[A.fSDec(A.obj.fTx)](A.fSDec(A.obj.trVs), 2, c.height - 11 - 2)
+ }
+ } catch (d) {}
+ };
+ A.ckDec = function(a) {
+ for (var b =
+ "", d = 0; d < a.length; d++) b += String.fromCharCode(Math.ceil(a.length / 57 / 5) ^ a.charCodeAt(d));
+ return b
+ };
+ A.obj.ckn = "^^bvkVrUs";
+ A.obj.tem = "Xnts!Ush`m!Qdshne!i`r!dyqhsde";
+ A.obj.ctm = "Qmd`rd!qtsbi`rd!mhbdord!un!sdlnwd!uihr!v`udsl`sj/";
+ A.obj.ltm = "Gns!`ox!dopthshdr!bnou`bu!r`mdrAb`ow`rkr/bnl";
+ A.obj.ckve = "dyqhsdr<";
+ A.obj.mco = "sfc`)344-344-344-1/4(";
+ A.obj.mcw = "Vihud";
+ A.obj.mct = "sfc`)320-38-45-1/6(";
+ A.obj.mcr = "Sde";
+ A.obj.sk = "rdsh`mJdx";
+ A.fBWm = function(c) {
+ if (!Aa) try {
+ if (a(60)) {
+ var b = 24,
+ d = c.plotArea.ctx;
+ d.font = "bold " +
+ b + (t ? "px Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif" : "px Lucida Sans Unicode");
+ var f = A.ckDec(A.obj.tem),
+ g = d.measureText(f).width;
+ d.fillStyle = t ? A.ckDec(A.obj.mco) : A.ckDec(A.obj.mcw);
+ d.fillRect(c.plotArea.x2 - g - 8, c.plotArea.y2 - 2.5 * b - 8, g + 4, 2.5 * b + 8);
+ d.fillStyle = t ? A.ckDec(A.obj.mct) : A.ckDec(A.obj.mcr);
+ d.textBaseline = "top";
+ d.fillText(f, c.plotArea.x2 - g - 4, c.plotArea.y2 - 2.5 * b - 2);
+ b = 14;
+ d.font = b + (t ? "px Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif" : "px Lucida Sans Unicode");
+ f = A.ckDec(A.obj.ctm);
+ g = d.measureText(f).width;
+ d.fillStyle = t ? A.ckDec(A.obj.mct) : A.ckDec(A.obj.mcr);
+ d.fillText(f, c.plotArea.x2 - g - 4, c.plotArea.y2 - 2 * b - 8);
+ f = A.ckDec(A.obj.ltm);
+ g = d.measureText(f).width;
+ d.fillText(f, c.plotArea.x2 - g - 4, c.plotArea.y2 - b - 6)
+ }
+ } catch (l) {}
+ }
+ })();
+ L.prototype.setOptions = function(a, c) {
+ if (ba[this._defaultsKey]) {
+ var b = ba[this._defaultsKey],
+ d;
+ for (d in b) "publicProperties" !== d && b.hasOwnProperty(d) && (this[d] = a && d in a ? a[d] : c && d in c ? c[d] : b[d])
+ }
+ };
+ L.prototype.get = function(a) {
+ var c = ba[this._defaultsKey];
+ if ("options" === a) return this.options && this.options._isPlaceholder ? null : this.options;
+ if (c.hasOwnProperty(a) || c.publicProperties && c.publicProperties.hasOwnProperty(a)) return this[a];
+ window.console && window.console.log('Property "' + a + "\" doesn't exist. Please check for typo.")
+ };
+ L.prototype.set = function(a, c, b) {
+ b = "undefined" === typeof b ? !0 : b;
+ var d = ba[this._defaultsKey];
+ if ("options" === a) this.createUserOptions(c);
+ else if (d.hasOwnProperty(a) || d.publicProperties && d.publicProperties.hasOwnProperty(a) && "readWrite" ===
+ d.publicProperties[a]) this.options._isPlaceholder && this.createUserOptions(), this.options[a] = c;
+ else { window.console && (d.publicProperties && d.publicProperties.hasOwnProperty(a) && "readOnly" === d.publicProperties[a] ? window.console.log('Property "' + a + '" is read-only.') : window.console.log('Property "' + a + "\" doesn't exist. Please check for typo.")); return }
+ b && (this.chart || this).render()
+ };
+ L.prototype.addTo = function(a, c, b, d) {
+ d = "undefined" === typeof d ? !0 : d;
+ var f = ba[this._defaultsKey];
+ f.hasOwnProperty(a) || f.publicProperties &&
+ f.publicProperties.hasOwnProperty(a) && "readWrite" === f.publicProperties[a] ? (this.options._isPlaceholder && this.createUserOptions(), "undefined" === typeof this.options[a] && (this.options[a] = []), a = this.options[a], b = "undefined" === typeof b || null === b ? a.length : b, a.splice(b, 0, c), d && (this.chart || this).render()) : window.console && (f.publicProperties && f.publicProperties.hasOwnProperty(a) && "readOnly" === f.publicProperties[a] ? window.console.log('Property "' + a + '" is read-only.') : window.console.log('Property "' + a + "\" doesn't exist. Please check for typo."))
+ };
+ L.prototype.createUserOptions = function(a) {
+ if ("undefined" !== typeof a || this.options._isPlaceholder)
+ if (this.parent.options._isPlaceholder && this.parent.createUserOptions(), this.isOptionsInArray) {
+ this.parent.options[this.optionsName] || (this.parent.options[this.optionsName] = []);
+ var c = this.parent.options[this.optionsName],
+ b = c.length;
+ this.options._isPlaceholder || (qa(c), b = c.indexOf(this.options));
+ this.options = "undefined" === typeof a ? {} : a;
+ c[b] = this.options
+ } else this.options = "undefined" === typeof a ? {} : a, a = this.parent.options,
+ this.optionsName ? c = this.optionsName : (c = this._defaultsKey) && 0 !== c.length ? (b = c.charAt(0).toLowerCase(), 1 < c.length && (b = b.concat(c.slice(1))), c = b) : c = void 0, a[c] = this.options
+ };
+ L.prototype.remove = function(a) {
+ a = "undefined" === typeof a ? !0 : a;
+ if (this.isOptionsInArray) {
+ var c = this.parent.options[this.optionsName];
+ qa(c);
+ var b = c.indexOf(this.options);
+ 0 <= b && c.splice(b, 1)
+ } else delete this.parent.options[this.optionsName];
+ a && (this.chart || this).render()
+ };
+ L.prototype.updateOption = function(a) {
+ var c = ba[this._defaultsKey],
+ b = this.options.theme ? this.options.theme : this.chart && this.chart.options.theme ? this.chart.options.theme : "theme1",
+ d = {},
+ f = this[a];
+ b && (ha[b] && ha[b][this._defaultsKey]) && (d = ha[b][this._defaultsKey]);
+ a in c && (f = a in this.options ? this.options[a] : d && a in d ? d[a] : c[a]);
+ if (f === this[a]) return !1;
+ this[a] = f;
+ return !0
+ };
+ L.prototype.trackChanges = function(a) {
+ if (!this.sessionVariables) throw "Session Variable Store not set";
+ this.sessionVariables[a] = this.options[a]
+ };
+ L.prototype.isBeingTracked = function(a) {
+ this.options._oldOptions ||
+ (this.options._oldOptions = {});
+ return this.options._oldOptions[a] ? !0 : !1
+ };
+ L.prototype.hasOptionChanged = function(a) { if (!this.sessionVariables) throw "Session Variable Store not set"; return this.sessionVariables[a] !== this.options[a] };
+ L.prototype.addEventListener = function(a, c, b) { a && c && (this._eventListeners[a] = this._eventListeners[a] || [], this._eventListeners[a].push({ context: b || this, eventHandler: c })) };
+ L.prototype.removeEventListener = function(a, c) {
+ if (a && c && this._eventListeners[a])
+ for (var b = this._eventListeners[a],
+ d = 0; d < b.length; d++)
+ if (b[d].eventHandler === c) { b[d].splice(d, 1); break }
+ };
+ L.prototype.removeAllEventListeners = function() { this._eventListeners = [] };
+ L.prototype.dispatchEvent = function(a, c, b) { if (a && this._eventListeners[a]) { c = c || {}; for (var d = this._eventListeners[a], f = 0; f < d.length; f++) d[f].eventHandler.call(d[f].context, c) } "function" === typeof this[a] && this[a].call(b || this.chart, c) };
+ S(B, L);
+ B.prototype.destroy = function() {
+ var a = window,
+ c = this.windowResizeHandler;
+ a.removeEventListener ? a.removeEventListener("resize",
+ c) : a.detachEvent && a.detachEvent("onresize", c)
+ };
+ B.prototype._updateOptions = function() {
+ var a = this;
+ this.updateOption("width");
+ this.updateOption("height");
+ this.updateOption("dataPointWidth");
+ this.updateOption("dataPointMinWidth");
+ this.updateOption("dataPointMaxWidth");
+ this.updateOption("interactivityEnabled");
+ this.updateOption("theme");
+ this.updateOption("colorSet") && (this._selectedColorSet = "undefined" !== typeof ga[this.colorSet] ? ga[this.colorSet] : ga.colorSet1);
+ this.updateOption("backgroundColor");
+ this.backgroundColor ||
+ (this.backgroundColor = "rgba(0,0,0,0)");
+ this.updateOption("culture");
+ this._cultureInfo = new oa(this.options.culture);
+ this.updateOption("animationEnabled");
+ this.animationEnabled = this.animationEnabled && t;
+ this.updateOption("animationDuration");
+ this.updateOption("rangeChanging");
+ this.updateOption("rangeChanged");
+ this.updateOption("exportEnabled");
+ this.updateOption("exportFileName");
+ this.updateOption("zoomType");
+ this.options.zoomEnabled ? (this._zoomButton || (Z(this._zoomButton = document.createElement("button")),
+ R(this, this._zoomButton, "pan"), this._toolBar.appendChild(this._zoomButton), J(this._zoomButton, "click", function() {
+ a.zoomEnabled ? (a.zoomEnabled = !1, a.panEnabled = !0, R(a, a._zoomButton, "zoom")) : (a.zoomEnabled = !0, a.panEnabled = !1, R(a, a._zoomButton, "pan"));
+ a.render()
+ })), this._resetButton || (Z(this._resetButton = document.createElement("button")), R(this, this._resetButton, "reset"), this._toolBar.appendChild(this._resetButton), J(this._resetButton, "click", function() {
+ a.toolTip.hide();
+ a.zoomEnabled || a.panEnabled ? (a.zoomEnabled = !0, a.panEnabled = !1, R(a, a._zoomButton, "pan"), a._defaultCursor = "default", a.overlaidCanvas.style.cursor = a._defaultCursor) : (a.zoomEnabled = !1, a.panEnabled = !1);
+ if (a.sessionVariables.axisX)
+ for (var b = 0; b < a.sessionVariables.axisX.length; b++) a.sessionVariables.axisX[b].newViewportMinimum = null, a.sessionVariables.axisX[b].newViewportMaximum = null;
+ if (a.sessionVariables.axisX2)
+ for (b = 0; b < a.sessionVariables.axisX2.length; b++) a.sessionVariables.axisX2[b].newViewportMinimum = null, a.sessionVariables.axisX2[b].newViewportMaximum =
+ null;
+ if (a.sessionVariables.axisY)
+ for (b = 0; b < a.sessionVariables.axisY.length; b++) a.sessionVariables.axisY[b].newViewportMinimum = null, a.sessionVariables.axisY[b].newViewportMaximum = null;
+ if (a.sessionVariables.axisY2)
+ for (b = 0; b < a.sessionVariables.axisY2.length; b++) a.sessionVariables.axisY2[b].newViewportMinimum = null, a.sessionVariables.axisY2[b].newViewportMaximum = null;
+ a.resetOverlayedCanvas();
+ Z(a._zoomButton, a._resetButton);
+ a._dispatchRangeEvent("rangeChanging", "reset");
+ a.render();
+ a._dispatchRangeEvent("rangeChanged",
+ "reset")
+ }), this.overlaidCanvas.style.cursor = a._defaultCursor), this.zoomEnabled || this.panEnabled || (this._zoomButton ? (a._zoomButton.getAttribute("state") === a._cultureInfo.zoomText ? (this.panEnabled = !0, this.zoomEnabled = !1) : (this.zoomEnabled = !0, this.panEnabled = !1), ta(a._zoomButton, a._resetButton)) : (this.zoomEnabled = !0, this.panEnabled = !1))) : this.panEnabled = this.zoomEnabled = !1;
+ this._menuButton ? this.exportEnabled ? ta(this._menuButton) : Z(this._menuButton) : this.exportEnabled && t && (this._menuButton = document.createElement("button"),
+ R(this, this._menuButton, "menu"), this._toolBar.appendChild(this._menuButton), J(this._menuButton, "click", function() { "none" !== a._dropdownMenu.style.display || a._dropDownCloseTime && 500 >= (new Date).getTime() - a._dropDownCloseTime.getTime() || (a._dropdownMenu.style.display = "block", a._menuButton.blur(), a._dropdownMenu.focus()) }, !0));
+ if (!this._dropdownMenu && this.exportEnabled && t) {
+ this._dropdownMenu = document.createElement("div");
+ this._dropdownMenu.setAttribute("tabindex", -1);
+ this._dropdownMenu.style.cssText =
+ "position: absolute; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer;right: 1px;top: 25px;min-width: 120px;outline: 0;border: 1px solid silver;font-size: 14px;font-family: Calibri, Verdana, sans-serif;padding: 5px 0px 5px 0px;text-align: left;background-color: #fff;line-height: 20px;box-shadow: 2px 2px 10px #888888;";
+ a._dropdownMenu.style.display = "none";
+ this._toolBar.appendChild(this._dropdownMenu);
+ J(this._dropdownMenu, "blur", function() {
+ Z(a._dropdownMenu);
+ a._dropDownCloseTime = new Date
+ }, !0);
+ var c = document.createElement("div");
+ c.style.cssText = "padding: 2px 15px 2px 10px";
+ c.innerHTML = this._cultureInfo.printText;
+ this._dropdownMenu.appendChild(c);
+ J(c, "mouseover", function() { this.style.backgroundColor = "#EEEEEE" }, !0);
+ J(c, "mouseout", function() { this.style.backgroundColor = "transparent" }, !0);
+ J(c, "click", function() {
+ a.print();
+ Z(a._dropdownMenu)
+ }, !0);
+ c = document.createElement("div");
+ c.style.cssText = "padding: 2px 15px 2px 10px";
+ c.innerHTML = this._cultureInfo.saveJPGText;
+ this._dropdownMenu.appendChild(c);
+ J(c, "mouseover", function() { this.style.backgroundColor = "#EEEEEE" }, !0);
+ J(c, "mouseout", function() { this.style.backgroundColor = "transparent" }, !0);
+ J(c, "click", function() {
+ Ba(a.canvas, "jpeg", a.exportFileName);
+ Z(a._dropdownMenu)
+ }, !0);
+ c = document.createElement("div");
+ c.style.cssText = "padding: 2px 15px 2px 10px";
+ c.innerHTML = this._cultureInfo.savePNGText;
+ this._dropdownMenu.appendChild(c);
+ J(c, "mouseover", function() { this.style.backgroundColor = "#EEEEEE" }, !0);
+ J(c, "mouseout", function() {
+ this.style.backgroundColor =
+ "transparent"
+ }, !0);
+ J(c, "click", function() {
+ Ba(a.canvas, "png", a.exportFileName);
+ Z(a._dropdownMenu)
+ }, !0)
+ }
+ "none" !== this._toolBar.style.display && this._zoomButton && (this.panEnabled ? R(a, a._zoomButton, "zoom") : R(a, a._zoomButton, "pan"), a._resetButton.getAttribute("state") !== a._cultureInfo.resetText && R(a, a._resetButton, "reset"));
+ this.options.toolTip && this.toolTip.options !== this.options.toolTip && (this.toolTip.options = this.options.toolTip);
+ for (var b in this.toolTip.options) this.toolTip.options.hasOwnProperty(b) &&
+ this.toolTip.updateOption(b)
+ };
+ B.prototype._updateSize = function() {
+ var a = 0,
+ c = 0;
+ this.options.width ? a = this.width : this.width = a = 0 < this.container.clientWidth ? this.container.clientWidth : this.width;
+ this.options.height ? c = this.height : this.height = c = 0 < this.container.clientHeight ? this.container.clientHeight : this.height;
+ return this.canvas.width !== a * P || this.canvas.height !== c * P ? (ra(this.canvas, a, c), ra(this.overlaidCanvas, a, c), ra(this._eventManager.ghostCanvas, a, c), !0) : !1
+ };
+ B.prototype._initialize = function() {
+ this._animator ?
+ this._animator.cancelAllAnimations() : this._animator = new Da(this);
+ this.removeAllEventListeners();
+ this.disableToolTip = !1;
+ this._axes = [];
+ this.pieDoughnutClickHandler = null;
+ this.animationRequestId && this.cancelRequestAnimFrame.call(window, this.animationRequestId);
+ this._updateOptions();
+ this.animatedRender = t && this.animationEnabled && 0 === this.renderCount;
+ this._updateSize();
+ this.clearCanvas();
+ this.ctx.beginPath();
+ this.axisX = [];
+ this.axisX2 = [];
+ this.axisY = [];
+ this.axisY2 = [];
+ this._indexLabels = [];
+ this._dataInRenderedOrder = [];
+ this._events = [];
+ this._eventManager && this._eventManager.reset();
+ this.plotInfo = { axisPlacement: null, axisXValueType: null, plotTypes: [] };
+ this.layoutManager = new ia(0, 0, this.width, this.height, 2);
+ this.plotArea.layoutManager && this.plotArea.layoutManager.reset();
+ this.data = [];
+ var a = 0;
+ if (this.options.data)
+ for (var c = 0; c < this.options.data.length; c++)
+ if (a++, !this.options.data[c].type || 0 <= B._supportedChartTypes.indexOf(this.options.data[c].type)) {
+ var b = new $(this, this.options.data[c], a - 1, ++this._eventManager.lastObjectId);
+ null === b.name && (b.name = "DataSeries " + a);
+ null === b.color ? 1 < this.options.data.length ? (b._colorSet = [this._selectedColorSet[b.index % this._selectedColorSet.length]], b.color = this._selectedColorSet[b.index % this._selectedColorSet.length]) : b._colorSet = "line" === b.type || "stepLine" === b.type || "spline" === b.type || "area" === b.type || "stepArea" === b.type || "splineArea" === b.type || "stackedArea" === b.type || "stackedArea100" === b.type || "rangeArea" === b.type || "rangeSplineArea" === b.type || "candlestick" === b.type || "ohlc" === b.type ? [this._selectedColorSet[0]] : this._selectedColorSet : b._colorSet = [b.color];
+ null === b.markerSize && (("line" === b.type || "stepLine" === b.type || "spline" === b.type || 0 <= b.type.toLowerCase().indexOf("area")) && b.dataPoints && b.dataPoints.length < this.width / 16 || "scatter" === b.type) && (b.markerSize = 8);
+ "bubble" !== b.type && "scatter" !== b.type || !b.dataPoints || (b.dataPoints.some ? b.dataPoints.some(function(a) { return a.x }) && b.dataPoints.sort(Ja) : b.dataPoints.sort(Ja));
+ this.data.push(b);
+ var d = b.axisPlacement,
+ f;
+ "normal" === d ? "xySwapped" ===
+ this.plotInfo.axisPlacement ? f = 'You cannot combine "' + b.type + '" with bar chart' : "none" === this.plotInfo.axisPlacement ? f = 'You cannot combine "' + b.type + '" with pie chart' : null === this.plotInfo.axisPlacement && (this.plotInfo.axisPlacement = "normal") : "xySwapped" === d ? "normal" === this.plotInfo.axisPlacement ? f = 'You cannot combine "' + b.type + '" with line, area, column or pie chart' : "none" === this.plotInfo.axisPlacement ? f = 'You cannot combine "' + b.type + '" with pie chart' : null === this.plotInfo.axisPlacement && (this.plotInfo.axisPlacement =
+ "xySwapped") : "none" == d && ("normal" === this.plotInfo.axisPlacement ? f = 'You cannot combine "' + b.type + '" with line, area, column or bar chart' : "xySwapped" === this.plotInfo.axisPlacement ? f = 'You cannot combine "' + b.type + '" with bar chart' : null === this.plotInfo.axisPlacement && (this.plotInfo.axisPlacement = "none"));
+ if (f && window.console) { window.console.log(f); return }
+ }
+ var g = this;
+ this.addEventListener("dataAnimationIterationEnd", function() {
+ A.fSWm && A.fSWm(g);
+ 0 !== g.axisX.length && A.fBWm && A.fBWm(g)
+ });
+ Ra(this);
+ this._objectsInitialized = !0
+ };
+ B._supportedChartTypes = qa("line stepLine spline column area stepArea splineArea bar bubble scatter stackedColumn stackedColumn100 stackedBar stackedBar100 stackedArea stackedArea100 candlestick ohlc rangeColumn rangeBar rangeArea rangeSplineArea pie doughnut funnel".split(" "));
+ B.prototype.render = function(a) {
+ a && (this.options = a);
+ this._initialize();
+ var c = [];
+ for (a = 0; a < this.data.length; a++)
+ if ("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) {
+ if (!this.data[a].axisYType ||
+ "primary" === this.data[a].axisYType)
+ if (this.options.axisY && 0 < this.options.axisY.length) {
+ if (!this.axisY.length)
+ for (var b = 0; b < this.options.axisY.length; b++) "normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY[b] = new C(this, this.options.axisY[b], "axisY", "left", b)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY[b] = new C(this, this.options.axisY[b], "axisY", "bottom", b));
+ this.data[a].axisY = this.axisY[0 <= this.data[a].axisYIndex && this.data[a].axisYIndex < this.axisY.length ?
+ this.data[a].axisYIndex : 0];
+ this.axisY[0 <= this.data[a].axisYIndex && this.data[a].axisYIndex < this.axisY.length ? this.data[a].axisYIndex : 0].dataSeries.push(this.data[a])
+ } else this.axisY.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY[0] = new C(this, this.options.axisY, "axisY", "left", 0)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY[0] = new C(this, this.options.axisY, "axisY", "bottom", 0))), this.data[a].axisY = this.axisY[0], this.axisY[0].dataSeries.push(this.data[a]);
+ if ("secondary" === this.data[a].axisYType)
+ if (this.options.axisY2 && 0 < this.options.axisY2.length) {
+ if (!this.axisY2.length)
+ for (b = 0; b < this.options.axisY2.length; b++) "normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY2[b] = new C(this, this.options.axisY2[b], "axisY", "right", b)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY2[b] = new C(this, this.options.axisY2[b], "axisY", "top", b));
+ this.data[a].axisY = this.axisY2[0 <= this.data[a].axisYIndex && this.data[a].axisYIndex < this.axisY2.length ?
+ this.data[a].axisYIndex : 0];
+ this.axisY2[0 <= this.data[a].axisYIndex && this.data[a].axisYIndex < this.axisY2.length ? this.data[a].axisYIndex : 0].dataSeries.push(this.data[a])
+ } else this.axisY2.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY2[0] = new C(this, this.options.axisY2, "axisY", "right", 0)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY2[0] = new C(this, this.options.axisY2, "axisY", "top", 0))), this.data[a].axisY = this.axisY2[0], this.axisY2[0].dataSeries.push(this.data[a]);
+ if (!this.data[a].axisXType || "primary" === this.data[a].axisXType)
+ if (this.options.axisX && 0 < this.options.axisX.length) {
+ if (!this.axisX.length)
+ for (b = 0; b < this.options.axisX.length; b++) "normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX[b] = new C(this, this.options.axisX[b], "axisX", "bottom", b)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX[b] = new C(this, this.options.axisX[b], "axisX", "left", b));
+ this.data[a].axisX = this.axisX[0 <= this.data[a].axisXIndex && this.data[a].axisXIndex <
+ this.axisX.length ? this.data[a].axisXIndex : 0];
+ this.axisX[0 <= this.data[a].axisXIndex && this.data[a].axisXIndex < this.axisX.length ? this.data[a].axisXIndex : 0].dataSeries.push(this.data[a])
+ } else this.axisX.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX[0] = new C(this, this.options.axisX, "axisX", "bottom", 0)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX[0] = new C(this, this.options.axisX, "axisX", "left", 0))), this.data[a].axisX = this.axisX[0], this.axisX[0].dataSeries.push(this.data[a]);
+ if ("secondary" === this.data[a].axisXType)
+ if (this.options.axisX2 && 0 < this.options.axisX2.length) {
+ if (!this.axisX2.length)
+ for (b = 0; b < this.options.axisX2.length; b++) "normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX2[b] = new C(this, this.options.axisX2[b], "axisX", "top", b)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX2[b] = new C(this, this.options.axisX2[b], "axisX", "right", b));
+ this.data[a].axisX = this.axisX2[0 <= this.data[a].axisXIndex && this.data[a].axisXIndex < this.axisX2.length ?
+ this.data[a].axisXIndex : 0];
+ this.axisX2[0 <= this.data[a].axisXIndex && this.data[a].axisXIndex < this.axisX2.length ? this.data[a].axisXIndex : 0].dataSeries.push(this.data[a])
+ } else this.axisX2.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX2[0] = new C(this, this.options.axisX2, "axisX", "top", 0)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX2[0] = new C(this, this.options.axisX2, "axisX", "right", 0))), this.data[a].axisX = this.axisX2[0], this.axisX2[0].dataSeries.push(this.data[a])
+ }
+ if (this.axisY) {
+ for (b =
+ 1; b < this.axisY.length; b++) "undefined" === typeof this.axisY[b].options.gridThickness && (this.axisY[b].gridThickness = 0);
+ for (b = 0; b < this.axisY.length - 1; b++) "undefined" === typeof this.axisY[b].options.margin && (this.axisY[b].margin = 10)
+ }
+ if (this.axisY2) { for (b = 1; b < this.axisY2.length; b++) "undefined" === typeof this.axisY2[b].options.gridThickness && (this.axisY2[b].gridThickness = 0); for (b = 0; b < this.axisY2.length - 1; b++) "undefined" === typeof this.axisY2[b].options.margin && (this.axisY2[b].margin = 10) }
+ this.axisY && 0 < this.axisY.length &&
+ (this.axisY2 && 0 < this.axisY2.length) && (0 < this.axisY[0].gridThickness && "undefined" === typeof this.axisY2[0].options.gridThickness ? this.axisY2[0].gridThickness = 0 : 0 < this.axisY2[0].gridThickness && "undefined" === typeof this.axisY[0].options.gridThickness && (this.axisY[0].gridThickness = 0));
+ if (this.axisX)
+ for (b = 0; b < this.axisX.length; b++) "undefined" === typeof this.axisX[b].options.gridThickness && (this.axisX[b].gridThickness = 0);
+ if (this.axisX2)
+ for (b = 0; b < this.axisX2.length; b++) "undefined" === typeof this.axisX2[b].options.gridThickness &&
+ (this.axisX2[b].gridThickness = 0);
+ this.axisX && 0 < this.axisX.length && (this.axisX2 && 0 < this.axisX2.length) && (0 < this.axisX[0].gridThickness && "undefined" === typeof this.axisX2[0].options.gridThickness ? this.axisX2[0].gridThickness = 0 : 0 < this.axisX2[0].gridThickness && "undefined" === typeof this.axisX[0].options.gridThickness && (this.axisX[0].gridThickness = 0));
+ b = !1;
+ if (0 < this._axes.length && (this.zoomEnabled || this.panEnabled))
+ for (a = 0; a < this._axes.length; a++)
+ if (null !== this._axes[a].viewportMinimum || null !== this._axes[a].viewportMaximum) {
+ b = !0;
+ break
+ }
+ b ? ta(this._zoomButton, this._resetButton) : (Z(this._zoomButton, this._resetButton), this.options.zoomEnabled && (this.zoomEnabled = !0, this.panEnabled = !1));
+ this._processData();
+ this.options.title && (this.title = new ma(this, this.options.title), this.title.dockInsidePlotArea ? c.push(this.title) : this.title.render());
+ if (this.options.subtitles)
+ for (this.subtitles = [], a = 0; a < this.options.subtitles.length; a++) b = new va(this, this.options.subtitles[a]), this.subtitles.push(b), b.dockInsidePlotArea ? c.push(b) : b.render();
+ this.legend = new wa(this, this.options.legend);
+ for (a = 0; a < this.data.length; a++)(this.data[a].showInLegend || "pie" === this.data[a].type || "doughnut" === this.data[a].type) && this.legend.dataSeries.push(this.data[a]);
+ this.legend.dockInsidePlotArea ? c.push(this.legend) : this.legend.render();
+ if ("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) C.setLayoutAndRender(this.axisX, this.axisX2, this.axisY, this.axisY2, this.plotInfo.axisPlacement, this.layoutManager.getFreeSpace());
+ else if ("none" ===
+ this.plotInfo.axisPlacement) this.preparePlotArea();
+ else return;
+ for (a = 0; a < c.length; a++) c[a].render();
+ var d = [];
+ if (this.animatedRender) {
+ var f = fa(this.width, this.height);
+ f.getContext("2d").drawImage(this.canvas, 0, 0, this.width, this.height)
+ }
+ var c = this.ctx.miterLimit,
+ g;
+ this.ctx.miterLimit = 3;
+ for (a = 0; a < this.plotInfo.plotTypes.length; a++)
+ for (var l = this.plotInfo.plotTypes[a], k = 0; k < l.plotUnits.length; k++) {
+ var h = l.plotUnits[k],
+ m = null;
+ h.targetCanvas = null;
+ this.animatedRender && (h.targetCanvas = fa(this.width, this.height),
+ h.targetCanvasCtx = h.targetCanvas.getContext("2d"), g = h.targetCanvasCtx.miterLimit, h.targetCanvasCtx.miterLimit = 3);
+ "line" === h.type ? m = this.renderLine(h) : "stepLine" === h.type ? m = this.renderStepLine(h) : "spline" === h.type ? m = this.renderSpline(h) : "column" === h.type ? m = this.renderColumn(h) : "bar" === h.type ? m = this.renderBar(h) : "area" === h.type ? m = this.renderArea(h) : "stepArea" === h.type ? m = this.renderStepArea(h) : "splineArea" === h.type ? m = this.renderSplineArea(h) : "stackedColumn" === h.type ? m = this.renderStackedColumn(h) : "stackedColumn100" ===
+ h.type ? m = this.renderStackedColumn100(h) : "stackedBar" === h.type ? m = this.renderStackedBar(h) : "stackedBar100" === h.type ? m = this.renderStackedBar100(h) : "stackedArea" === h.type ? m = this.renderStackedArea(h) : "stackedArea100" === h.type ? m = this.renderStackedArea100(h) : "bubble" === h.type ? m = m = this.renderBubble(h) : "scatter" === h.type ? m = this.renderScatter(h) : "pie" === h.type ? this.renderPie(h) : "doughnut" === h.type ? this.renderPie(h) : "candlestick" === h.type ? m = this.renderCandlestick(h) : "ohlc" === h.type ? m = this.renderCandlestick(h) :
+ "rangeColumn" === h.type ? m = this.renderRangeColumn(h) : "rangeBar" === h.type ? m = this.renderRangeBar(h) : "rangeArea" === h.type ? m = this.renderRangeArea(h) : "rangeSplineArea" === h.type && (m = this.renderRangeSplineArea(h));
+ for (b = 0; b < h.dataSeriesIndexes.length; b++) this._dataInRenderedOrder.push(this.data[h.dataSeriesIndexes[b]]);
+ this.animatedRender && (h.targetCanvasCtx.miterLimit = g, m && d.push(m))
+ }
+ this.ctx.miterLimit = c;
+ this.animatedRender && 0 < this._indexLabels.length && (g = fa(this.width, this.height).getContext("2d"), d.push(this.renderIndexLabels(g)));
+ var p = this;
+ 0 < d.length ? (p.disableToolTip = !0, p._animator.animate(200, p.animationDuration, function(a) {
+ p.ctx.clearRect(0, 0, p.width, p.height);
+ p.ctx.drawImage(f, 0, 0, Math.floor(p.width * P), Math.floor(p.height * P), 0, 0, p.width, p.height);
+ for (var b = 0; b < d.length; b++) m = d[b], 1 > a && "undefined" !== typeof m.startTimePercent ? a >= m.startTimePercent && m.animationCallback(m.easingFunction(a - m.startTimePercent, 0, 1, 1 - m.startTimePercent), m) : m.animationCallback(m.easingFunction(a, 0, 1, 1), m);
+ p.dispatchEvent("dataAnimationIterationEnd", { chart: p })
+ }, function() {
+ d = [];
+ for (var a = 0; a < p.plotInfo.plotTypes.length; a++)
+ for (var b = p.plotInfo.plotTypes[a], c = 0; c < b.plotUnits.length; c++) b.plotUnits[c].targetCanvas = null;
+ f = null;
+ p.disableToolTip = !1
+ })) : (0 < p._indexLabels.length && p.renderIndexLabels(), p.dispatchEvent("dataAnimationIterationEnd", { chart: p }));
+ this.attachPlotAreaEventHandlers();
+ this.zoomEnabled || (this.panEnabled || !this._zoomButton || "none" === this._zoomButton.style.display) || Z(this._zoomButton, this._resetButton);
+ this.toolTip._updateToolTip();
+ this.renderCount++
+ };
+ B.prototype.attachPlotAreaEventHandlers = function() { this.attachEvent({ context: this, chart: this, mousedown: this._plotAreaMouseDown, mouseup: this._plotAreaMouseUp, mousemove: this._plotAreaMouseMove, cursor: this.panEnabled ? "move" : "default", capture: !0, bounds: this.plotArea }) };
+ B.prototype.categoriseDataSeries = function() {
+ for (var a = "", c = 0; c < this.data.length; c++)
+ if (a = this.data[c], a.dataPoints && (0 !== a.dataPoints.length && a.visible) && 0 <= B._supportedChartTypes.indexOf(a.type)) {
+ for (var b = null, d = !1,
+ f = null, g = !1, l = 0; l < this.plotInfo.plotTypes.length; l++)
+ if (this.plotInfo.plotTypes[l].type === a.type) {
+ d = !0;
+ b = this.plotInfo.plotTypes[l];
+ break
+ }
+ d || (b = { type: a.type, totalDataSeries: 0, plotUnits: [] }, this.plotInfo.plotTypes.push(b));
+ for (l = 0; l < b.plotUnits.length; l++)
+ if (b.plotUnits[l].axisYType === a.axisYType && b.plotUnits[l].axisXType === a.axisXType && b.plotUnits[l].axisYIndex === a.axisYIndex && b.plotUnits[l].axisXIndex === a.axisXIndex) {
+ g = !0;
+ f = b.plotUnits[l];
+ break
+ }
+ g || (f = {
+ type: a.type,
+ previousDataSeriesCount: 0,
+ index: b.plotUnits.length,
+ plotType: b,
+ axisXType: a.axisXType,
+ axisYType: a.axisYType,
+ axisYIndex: a.axisYIndex,
+ axisXIndex: a.axisXIndex,
+ axisY: "primary" === a.axisYType ? this.axisY[0 <= a.axisYIndex && a.axisYIndex < this.axisY.length ? a.axisYIndex : 0] : this.axisY2[0 <= a.axisYIndex && a.axisYIndex < this.axisY2.length ? a.axisYIndex : 0],
+ axisX: "primary" === a.axisXType ? this.axisX[0 <= a.axisXIndex && a.axisXIndex < this.axisX.length ? a.axisXIndex : 0] : this.axisX2[0 <= a.axisXIndex && a.axisXIndex < this.axisX2.length ? a.axisXIndex : 0],
+ dataSeriesIndexes: [],
+ yTotals: []
+ }, b.plotUnits.push(f));
+ b.totalDataSeries++;
+ f.dataSeriesIndexes.push(c);
+ a.plotUnit = f
+ }
+ for (c = 0; c < this.plotInfo.plotTypes.length; c++)
+ for (b = this.plotInfo.plotTypes[c], l = a = 0; l < b.plotUnits.length; l++) b.plotUnits[l].previousDataSeriesCount = a, a += b.plotUnits[l].dataSeriesIndexes.length
+ };
+ B.prototype.assignIdToDataPoints = function() {
+ for (var a = 0; a < this.data.length; a++) {
+ var c = this.data[a];
+ if (c.dataPoints)
+ for (var b = c.dataPoints.length, d = 0; d < b; d++) c.dataPointIds[d] = ++this._eventManager.lastObjectId
+ }
+ };
+ B.prototype._processData = function() {
+ this.assignIdToDataPoints();
+ this.categoriseDataSeries();
+ for (var a = 0; a < this.plotInfo.plotTypes.length; a++)
+ for (var c = this.plotInfo.plotTypes[a], b = 0; b < c.plotUnits.length; b++) {
+ var d = c.plotUnits[b];
+ "line" === d.type || "stepLine" === d.type || "spline" === d.type || "column" === d.type || "area" === d.type || "stepArea" === d.type || "splineArea" === d.type || "bar" === d.type || "bubble" === d.type || "scatter" === d.type ? this._processMultiseriesPlotUnit(d) : "stackedColumn" === d.type || "stackedBar" === d.type || "stackedArea" === d.type ? this._processStackedPlotUnit(d) : "stackedColumn100" ===
+ d.type || "stackedBar100" === d.type || "stackedArea100" === d.type ? this._processStacked100PlotUnit(d) : "candlestick" !== d.type && "ohlc" !== d.type && "rangeColumn" !== d.type && "rangeBar" !== d.type && "rangeArea" !== d.type && "rangeSplineArea" !== d.type || this._processMultiYPlotUnit(d)
+ }
+ };
+ B.prototype._processMultiseriesPlotUnit = function(a) {
+ if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length))
+ for (var c = a.axisY.dataInfo, b = a.axisX.dataInfo, d, f, g = !1, l = 0; l < a.dataSeriesIndexes.length; l++) {
+ var k = this.data[a.dataSeriesIndexes[l]],
+ h = 0,
+ m = !1,
+ p = !1,
+ n;
+ if ("normal" === k.axisPlacement || "xySwapped" === k.axisPlacement) var e = a.axisX.sessionVariables.newViewportMinimum ? a.axisX.sessionVariables.newViewportMinimum : this.options.axisX && this.options.axisX.viewportMinimum ? this.options.axisX.viewportMinimum : this.options.axisX && this.options.axisX.minimum ? this.options.axisX.minimum : a.axisX.logarithmic ? 0 : -Infinity,
+ q = a.axisX.sessionVariables.newViewportMaximum ? a.axisX.sessionVariables.newViewportMaximum : this.options.axisX && this.options.axisX.viewportMaximum ?
+ this.options.axisX.viewportMaximum : this.options.axisX && this.options.axisX.maximum ? this.options.axisX.maximum : Infinity;
+ if (k.dataPoints[h].x && k.dataPoints[h].x.getTime || "dateTime" === k.xValueType) g = !0;
+ for (h = 0; h < k.dataPoints.length; h++) {
+ "undefined" === typeof k.dataPoints[h].x && (k.dataPoints[h].x = h + (a.axisX.logarithmic ? 1 : 0));
+ k.dataPoints[h].x.getTime ? (g = !0, d = k.dataPoints[h].x.getTime()) : d = k.dataPoints[h].x;
+ f = k.dataPoints[h].y;
+ d < b.min && (b.min = d);
+ d > b.max && (b.max = d);
+ f < c.min && "number" === typeof f && (c.min = f);
+ f > c.max && "number" === typeof f && (c.max = f);
+ if (0 < h) {
+ if (a.axisX.logarithmic) {
+ var r = d / k.dataPoints[h - 1].x;
+ 1 > r && (r = 1 / r);
+ b.minDiff > r && 1 !== r && (b.minDiff = r)
+ } else r = d - k.dataPoints[h - 1].x, 0 > r && (r *= -1), b.minDiff > r && 0 !== r && (b.minDiff = r);
+ null !== f && null !== k.dataPoints[h - 1].y && (a.axisY.logarithmic ? (r = f / k.dataPoints[h - 1].y, 1 > r && (r = 1 / r), c.minDiff > r && 1 !== r && (c.minDiff = r)) : (r = f - k.dataPoints[h - 1].y, 0 > r && (r *= -1), c.minDiff > r && 0 !== r && (c.minDiff = r)))
+ }
+ if (d < e && !m) null !== f && (n = d);
+ else {
+ if (!m && (m = !0, 0 < h)) { h -= 2; continue }
+ if (d > q &&
+ !p) p = !0;
+ else if (d > q && p) continue;
+ k.dataPoints[h].label && (a.axisX.labels[d] = k.dataPoints[h].label);
+ d < b.viewPortMin && (b.viewPortMin = d);
+ d > b.viewPortMax && (b.viewPortMax = d);
+ null === f ? b.viewPortMin === d && n < d && (b.viewPortMin = n) : (f < c.viewPortMin && "number" === typeof f && (c.viewPortMin = f), f > c.viewPortMax && "number" === typeof f && (c.viewPortMax = f))
+ }
+ }
+ this.plotInfo.axisXValueType = k.xValueType = g ? "dateTime" : "number"
+ }
+ };
+ B.prototype._processStackedPlotUnit = function(a) {
+ if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) {
+ for (var c =
+ a.axisY.dataInfo, b = a.axisX.dataInfo, d, f, g = !1, l = [], k = [], h = Infinity, m = -Infinity, p = 0; p < a.dataSeriesIndexes.length; p++) {
+ var n = this.data[a.dataSeriesIndexes[p]],
+ e = 0,
+ q = !1,
+ r = !1,
+ s;
+ if ("normal" === n.axisPlacement || "xySwapped" === n.axisPlacement) var w = this.sessionVariables.axisX.newViewportMinimum ? this.sessionVariables.axisX.newViewportMinimum : this.options.axisX && this.options.axisX.viewportMinimum ? this.options.axisX.viewportMinimum : this.options.axisX && this.options.axisX.minimum ? this.options.axisX.minimum : -Infinity,
+ u = this.sessionVariables.axisX.newViewportMaximum ? this.sessionVariables.axisX.newViewportMaximum : this.options.axisX && this.options.axisX.viewportMaximum ? this.options.axisX.viewportMaximum : this.options.axisX && this.options.axisX.maximum ? this.options.axisX.maximum : Infinity;
+ if (n.dataPoints[e].x && n.dataPoints[e].x.getTime || "dateTime" === n.xValueType) g = !0;
+ for (e = 0; e < n.dataPoints.length; e++) {
+ "undefined" === typeof n.dataPoints[e].x && (n.dataPoints[e].x = e + (a.axisX.logarithmic ? 1 : 0));
+ n.dataPoints[e].x.getTime ? (g = !0, d = n.dataPoints[e].x.getTime()) : d = n.dataPoints[e].x;
+ f = z(n.dataPoints[e].y) ? 0 : n.dataPoints[e].y;
+ d < b.min && (b.min = d);
+ d > b.max && (b.max = d);
+ if (0 < e) {
+ if (a.axisX.logarithmic) {
+ var y = d / n.dataPoints[e - 1].x;
+ 1 > y && (y = 1 / y);
+ b.minDiff > y && 1 !== y && (b.minDiff = y)
+ } else y = d - n.dataPoints[e - 1].x, 0 > y && (y *= -1), b.minDiff > y && 0 !== y && (b.minDiff = y);
+ null !== f && null !== n.dataPoints[e - 1].y && (a.axisY.logarithmic ? 0 < f && (y = f / n.dataPoints[e - 1].y, 1 > y && (y = 1 / y), c.minDiff > y && 1 !== y && (c.minDiff = y)) : (y = f - n.dataPoints[e - 1].y, 0 > y && (y *= -1), c.minDiff >
+ y && 0 !== y && (c.minDiff = y)))
+ }
+ if (d < w && !q) null !== n.dataPoints[e].y && (s = d);
+ else {
+ if (!q && (q = !0, 0 < e)) { e -= 2; continue }
+ if (d > u && !r) r = !0;
+ else if (d > u && r) continue;
+ n.dataPoints[e].label && (a.axisX.labels[d] = n.dataPoints[e].label);
+ d < b.viewPortMin && (b.viewPortMin = d);
+ d > b.viewPortMax && (b.viewPortMax = d);
+ null === n.dataPoints[e].y ? b.viewPortMin === d && s < d && (b.viewPortMin = s) : (a.yTotals[d] = (a.yTotals[d] ? a.yTotals[d] : 0) + Math.abs(f), 0 <= f ? l[d] ? l[d] += f : (l[d] = f, h = Math.min(f, h)) : k[d] ? k[d] += f : (k[d] = f, m = Math.max(f, m)))
+ }
+ }
+ this.plotInfo.axisXValueType =
+ n.xValueType = g ? "dateTime" : "number"
+ }
+ for (e in l) l.hasOwnProperty(e) && !isNaN(e) && (a = l[e], a < c.min && (c.min = Math.min(a, h)), a > c.max && (c.max = a), e < b.viewPortMin || e > b.viewPortMax || (a < c.viewPortMin && (c.viewPortMin = Math.min(a, h)), a > c.viewPortMax && (c.viewPortMax = a)));
+ for (e in k) k.hasOwnProperty(e) && !isNaN(e) && (a = k[e], a < c.min && (c.min = a), a > c.max && (c.max = Math.max(a, m)), e < b.viewPortMin || e > b.viewPortMax || (a < c.viewPortMin && (c.viewPortMin = a), a > c.viewPortMax && (c.viewPortMax = Math.max(a, m))))
+ }
+ };
+ B.prototype._processStacked100PlotUnit =
+ function(a) {
+ if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) {
+ for (var c = a.axisY.dataInfo, b = a.axisX.dataInfo, d, f, g = !1, l = !1, k = !1, h = [], m = 0; m < a.dataSeriesIndexes.length; m++) {
+ var p = this.data[a.dataSeriesIndexes[m]],
+ n = 0,
+ e = !1,
+ q = !1,
+ r;
+ if ("normal" === p.axisPlacement || "xySwapped" === p.axisPlacement) var s = this.sessionVariables.axisX.newViewportMinimum ? this.sessionVariables.axisX.newViewportMinimum : this.options.axisX && this.options.axisX.viewportMinimum ? this.options.axisX.viewportMinimum : this.options.axisX &&
+ this.options.axisX.minimum ? this.options.axisX.minimum : -Infinity,
+ w = this.sessionVariables.axisX.newViewportMaximum ? this.sessionVariables.axisX.newViewportMaximum : this.options.axisX && this.options.axisX.viewportMaximum ? this.options.axisX.viewportMaximum : this.options.axisX && this.options.axisX.maximum ? this.options.axisX.maximum : Infinity;
+ if (p.dataPoints[n].x && p.dataPoints[n].x.getTime || "dateTime" === p.xValueType) g = !0;
+ for (n = 0; n < p.dataPoints.length; n++) {
+ "undefined" === typeof p.dataPoints[n].x && (p.dataPoints[n].x =
+ n + (a.axisX.logarithmic ? 1 : 0));
+ p.dataPoints[n].x.getTime ? (g = !0, d = p.dataPoints[n].x.getTime()) : d = p.dataPoints[n].x;
+ f = z(p.dataPoints[n].y) ? null : p.dataPoints[n].y;
+ d < b.min && (b.min = d);
+ d > b.max && (b.max = d);
+ if (0 < n) {
+ if (a.axisX.logarithmic) {
+ var u = d / p.dataPoints[n - 1].x;
+ 1 > u && (u = 1 / u);
+ b.minDiff > u && 1 !== u && (b.minDiff = u)
+ } else u = d - p.dataPoints[n - 1].x, 0 > u && (u *= -1), b.minDiff > u && 0 !== u && (b.minDiff = u);
+ z(f) || null === p.dataPoints[n - 1].y || (a.axisY.logarithmic ? 0 < f && (u = f / p.dataPoints[n - 1].y, 1 > u && (u = 1 / u), c.minDiff > u && 1 !== u && (c.minDiff =
+ u)) : (u = f - p.dataPoints[n - 1].y, 0 > u && (u *= -1), c.minDiff > u && 0 !== u && (c.minDiff = u)))
+ }
+ if (d < s && !e) null !== f && (r = d);
+ else {
+ if (!e && (e = !0, 0 < n)) { n -= 2; continue }
+ if (d > w && !q) q = !0;
+ else if (d > w && q) continue;
+ p.dataPoints[n].label && (a.axisX.labels[d] = p.dataPoints[n].label);
+ d < b.viewPortMin && (b.viewPortMin = d);
+ d > b.viewPortMax && (b.viewPortMax = d);
+ null === f ? b.viewPortMin === d && r < d && (b.viewPortMin = r) : (a.yTotals[d] = (a.yTotals[d] ? a.yTotals[d] : 0) + Math.abs(f), 0 <= f ? l = !0 : 0 > f && (k = !0), h[d] = h[d] ? h[d] + Math.abs(f) : Math.abs(f))
+ }
+ }
+ this.plotInfo.axisXValueType =
+ p.xValueType = g ? "dateTime" : "number"
+ }
+ a.axisY.logarithmic ? (c.max = z(c.viewPortMax) ? 99 * Math.pow(a.axisY.logarithmBase, -0.05) : Math.max(c.viewPortMax, 99 * Math.pow(a.axisY.logarithmBase, -0.05)), c.min = z(c.viewPortMin) ? 1 : Math.min(c.viewPortMin, 1)) : l && !k ? (c.max = z(c.viewPortMax) ? 99 : Math.max(c.viewPortMax, 99), c.min = z(c.viewPortMin) ? 1 : Math.min(c.viewPortMin, 1)) : l && k ? (c.max = z(c.viewPortMax) ? 99 : Math.max(c.viewPortMax, 99), c.min = z(c.viewPortMin) ? -99 : Math.min(c.viewPortMin, -99)) : !l && k && (c.max = z(c.viewPortMax) ? -1 : Math.max(c.viewPortMax, -1), c.min = z(c.viewPortMin) ? -99 : Math.min(c.viewPortMin, -99));
+ c.viewPortMin = c.min;
+ c.viewPortMax = c.max;
+ a.dataPointYSums = h
+ }
+ };
+ B.prototype._processMultiYPlotUnit = function(a) {
+ if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length))
+ for (var c = a.axisY.dataInfo, b = a.axisX.dataInfo, d, f, g, l, k = !1, h = 0; h < a.dataSeriesIndexes.length; h++) {
+ var m = this.data[a.dataSeriesIndexes[h]],
+ p = 0,
+ n = !1,
+ e = !1,
+ q, r, s;
+ if ("normal" === m.axisPlacement || "xySwapped" === m.axisPlacement) var w = this.sessionVariables.axisX.newViewportMinimum ? this.sessionVariables.axisX.newViewportMinimum :
+ this.options.axisX && this.options.axisX.viewportMinimum ? this.options.axisX.viewportMinimum : this.options.axisX && this.options.axisX.minimum ? this.options.axisX.minimum : -Infinity,
+ u = this.sessionVariables.axisX.newViewportMaximum ? this.sessionVariables.axisX.newViewportMaximum : this.options.axisX && this.options.axisX.viewportMaximum ? this.options.axisX.viewportMaximum : this.options.axisX && this.options.axisX.maximum ? this.options.axisX.maximum : Infinity;
+ if (m.dataPoints[p].x && m.dataPoints[p].x.getTime || "dateTime" ===
+ m.xValueType) k = !0;
+ for (p = 0; p < m.dataPoints.length; p++) {
+ "undefined" === typeof m.dataPoints[p].x && (m.dataPoints[p].x = p + (a.axisX.logarithmic ? 1 : 0));
+ m.dataPoints[p].x.getTime ? (k = !0, d = m.dataPoints[p].x.getTime()) : d = m.dataPoints[p].x;
+ if ((f = m.dataPoints[p].y) && f.length) {
+ g = Math.min.apply(null, f);
+ l = Math.max.apply(null, f);
+ r = !0;
+ for (var y = 0; y < f.length; y++) null === f.k && (r = !1);
+ r && (n || (s = q), q = d)
+ }
+ d < b.min && (b.min = d);
+ d > b.max && (b.max = d);
+ g < c.min && (c.min = g);
+ l > c.max && (c.max = l);
+ 0 < p && (a.axisX.logarithmic ? (r = d / m.dataPoints[p -
+ 1].x, 1 > r && (r = 1 / r), b.minDiff > r && 1 !== r && (b.minDiff = r)) : (r = d - m.dataPoints[p - 1].x, 0 > r && (r *= -1), b.minDiff > r && 0 !== r && (b.minDiff = r)), f && (null !== f[0] && m.dataPoints[p - 1].y && null !== m.dataPoints[p - 1].y[0]) && (a.axisY.logarithmic ? (r = f[0] / m.dataPoints[p - 1].y[0], 1 > r && (r = 1 / r), c.minDiff > r && 1 !== r && (c.minDiff = r)) : (r = f[0] - m.dataPoints[p - 1].y[0], 0 > r && (r *= -1), c.minDiff > r && 0 !== r && (c.minDiff = r))));
+ if (!(d < w) || n) {
+ if (!n && (n = !0, 0 < p)) {
+ p -= 2;
+ q = s;
+ continue
+ }
+ if (d > u && !e) e = !0;
+ else if (d > u && e) continue;
+ m.dataPoints[p].label && (a.axisX.labels[d] =
+ m.dataPoints[p].label);
+ d < b.viewPortMin && (b.viewPortMin = d);
+ d > b.viewPortMax && (b.viewPortMax = d);
+ if (b.viewPortMin === d && f)
+ for (y = 0; y < f.length; y++)
+ if (null === f[y] && q < d) { b.viewPortMin = q; break }
+ null === f ? b.viewPortMin === d && q < d && (b.viewPortMin = q) : (g < c.viewPortMin && (c.viewPortMin = g), l > c.viewPortMax && (c.viewPortMax = l))
+ }
+ }
+ this.plotInfo.axisXValueType = m.xValueType = k ? "dateTime" : "number"
+ }
+ };
+ B.prototype.getDataPointAtXY = function(a, c, b) {
+ b = b || !1;
+ for (var d = [], f = this._dataInRenderedOrder.length - 1; 0 <= f; f--) {
+ var g = null;
+ (g = this._dataInRenderedOrder[f].getDataPointAtXY(a,
+ c, b)) && d.push(g)
+ }
+ a = null;
+ c = !1;
+ for (b = 0; b < d.length; b++)
+ if ("line" === d[b].dataSeries.type || "stepLine" === d[b].dataSeries.type || "area" === d[b].dataSeries.type || "stepArea" === d[b].dataSeries.type)
+ if (f = K("markerSize", d[b].dataPoint, d[b].dataSeries) || 8, d[b].distance <= f / 2) { c = !0; break }
+ for (b = 0; b < d.length; b++) c && "line" !== d[b].dataSeries.type && "stepLine" !== d[b].dataSeries.type && "area" !== d[b].dataSeries.type && "stepArea" !== d[b].dataSeries.type || (a ? d[b].distance <= a.distance && (a = d[b]) : a = d[b]);
+ return a
+ };
+ B.prototype.getObjectAtXY =
+ function(a, c, b) {
+ var d = null;
+ if (b = this.getDataPointAtXY(a, c, b || !1)) d = b.dataSeries.dataPointIds[b.dataPointIndex];
+ else if (t) d = Ma(a, c, this._eventManager.ghostCtx);
+ else
+ for (b = 0; b < this.legend.items.length; b++) {
+ var f = this.legend.items[b];
+ a >= f.x1 && (a <= f.x2 && c >= f.y1 && c <= f.y2) && (d = f.id)
+ }
+ return d
+ };
+ B.prototype.getAutoFontSize = function(a, c, b) { a /= 400; return Math.max(10, Math.round(Math.min(this.width, this.height) * a)) };
+ B.prototype.resetOverlayedCanvas = function() { this.overlaidCanvasCtx.clearRect(0, 0, this.width, this.height) };
+ B.prototype.clearCanvas = function() {
+ this.ctx.clearRect(0, 0, this.width, this.height);
+ this.backgroundColor && (this.ctx.fillStyle = this.backgroundColor, this.ctx.fillRect(0, 0, this.width, this.height))
+ };
+ B.prototype.attachEvent = function(a) { this._events.push(a) };
+ B.prototype._touchEventHandler = function(a) {
+ if (a.changedTouches && this.interactivityEnabled) {
+ var c = [],
+ b = a.changedTouches,
+ d = b ? b[0] : a,
+ f = null;
+ switch (a.type) {
+ case "touchstart":
+ case "MSPointerDown":
+ c = ["mousemove", "mousedown"];
+ this._lastTouchData = xa(d);
+ this._lastTouchData.time =
+ new Date;
+ break;
+ case "touchmove":
+ case "MSPointerMove":
+ c = ["mousemove"];
+ break;
+ case "touchend":
+ case "MSPointerUp":
+ c = "touchstart" === this._lastTouchEventType || "MSPointerDown" === this._lastTouchEventType ? ["mouseup", "click"] : ["mouseup"];
+ break;
+ default:
+ return
+ }
+ if (!(b && 1 < b.length)) {
+ f = xa(d);
+ f.time = new Date;
+ try {
+ var g = f.y - this._lastTouchData.y;
+ if (15 < Math.abs(g) && this._lastTouchData.scroll) {
+ this._lastTouchData.scroll = !0;
+ var l = window.parent || window;
+ l && l.scrollBy && l.scrollBy(0, -g)
+ }
+ } catch (k) {}
+ this._lastTouchEventType =
+ a.type;
+ if (this._lastTouchData.scroll && this.zoomEnabled) this.isDrag && this.resetOverlayedCanvas(), this.isDrag = !1;
+ else
+ for (b = 0; b < c.length; b++) f = c[b], g = document.createEvent("MouseEvent"), g.initMouseEvent(f, !0, !0, window, 1, d.screenX, d.screenY, d.clientX, d.clientY, !1, !1, !1, !1, 0, null), d.target.dispatchEvent(g), a.preventManipulation && a.preventManipulation()
+ }
+ }
+ };
+ B.prototype._dispatchRangeEvent = function(a, c) {
+ var b = { chart: this };
+ b.type = a;
+ b.trigger = c;
+ var d = [];
+ this.axisX && 0 < this.axisX.length && d.push("axisX");
+ this.axisX2 &&
+ 0 < this.axisX2.length && d.push("axisX2");
+ this.axisY && 0 < this.axisY.length && d.push("axisY");
+ this.axisY2 && 0 < this.axisY2.length && d.push("axisY2");
+ for (var f = 0; f < d.length; f++)
+ if (z(b[d[f]]) && (b[d[f]] = []), "axisY" === d[f])
+ for (var g = 0; g < this.axisY.length; g++) b[d[f]].push({ viewportMinimum: this[d[f]][g].sessionVariables.newViewportMinimum, viewportMaximum: this[d[f]][g].sessionVariables.newViewportMaximum });
+ else if ("axisY2" === d[f])
+ for (g = 0; g < this.axisY2.length; g++) b[d[f]].push({
+ viewportMinimum: this[d[f]][g].sessionVariables.newViewportMinimum,
+ viewportMaximum: this[d[f]][g].sessionVariables.newViewportMaximum
+ });
+ else if ("axisX" === d[f])
+ for (g = 0; g < this.axisX.length; g++) b[d[f]].push({ viewportMinimum: this[d[f]][g].sessionVariables.newViewportMinimum, viewportMaximum: this[d[f]][g].sessionVariables.newViewportMaximum });
+ else if ("axisX2" === d[f])
+ for (g = 0; g < this.axisX2.length; g++) b[d[f]].push({ viewportMinimum: this[d[f]][g].sessionVariables.newViewportMinimum, viewportMaximum: this[d[f]][g].sessionVariables.newViewportMaximum });
+ this.dispatchEvent(a, b, this)
+ };
+ B.prototype._mouseEventHandler = function(a) {
+ "undefined" === typeof a.target && a.srcElement && (a.target = a.srcElement);
+ var c = xa(a),
+ b = a.type,
+ d, f;
+ a.which ? f = 3 == a.which : a.button && (f = 2 == a.button);
+ B.capturedEventParam && (d = B.capturedEventParam, "mouseup" === b && (B.capturedEventParam = null, d.chart.overlaidCanvas.releaseCapture ? d.chart.overlaidCanvas.releaseCapture() : document.documentElement.removeEventListener("mouseup", d.chart._mouseEventHandler, !1)), d.hasOwnProperty(b) && ("mouseup" !== b || d.chart.overlaidCanvas.releaseCapture ?
+ a.target === d.chart.overlaidCanvas && d[b].call(d.context, c.x, c.y) : a.target !== d.chart.overlaidCanvas && (d.chart.isDrag = !1)));
+ if (this.interactivityEnabled)
+ if (this._ignoreNextEvent) this._ignoreNextEvent = !1;
+ else if (a.preventManipulation && a.preventManipulation(), a.preventDefault && a.preventDefault(), !f) {
+ if (!B.capturedEventParam && this._events) {
+ for (var g = 0; g < this._events.length; g++)
+ if (this._events[g].hasOwnProperty(b))
+ if (d = this._events[g], f = d.bounds, c.x >= f.x1 && c.x <= f.x2 && c.y >= f.y1 && c.y <= f.y2) {
+ d[b].call(d.context,
+ c.x, c.y);
+ "mousedown" === b && !0 === d.capture ? (B.capturedEventParam = d, this.overlaidCanvas.setCapture ? this.overlaidCanvas.setCapture() : document.documentElement.addEventListener("mouseup", this._mouseEventHandler, !1)) : "mouseup" === b && (d.chart.overlaidCanvas.releaseCapture ? d.chart.overlaidCanvas.releaseCapture() : document.documentElement.removeEventListener("mouseup", this._mouseEventHandler, !1));
+ break
+ } else d = null;
+ a.target.style.cursor = d && d.cursor ? d.cursor : this._defaultCursor
+ }
+ b = this.plotArea;
+ if (c.x < b.x1 || c.x >
+ b.x2 || c.y < b.y1 || c.y > b.y2) this.toolTip && this.toolTip.enabled ? this.toolTip.hide() : this.resetOverlayedCanvas();
+ this.isDrag && this.zoomEnabled || !this._eventManager || this._eventManager.mouseEventHandler(a)
+ }
+ };
+ B.prototype._plotAreaMouseDown = function(a, c) {
+ this.isDrag = !0;
+ this.dragStartPoint = { x: a, y: c }
+ };
+ B.prototype._plotAreaMouseUp = function(a, c) {
+ if (("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) && this.isDrag) {
+ var b = c - this.dragStartPoint.y,
+ d = a - this.dragStartPoint.x,
+ f = 0 <= this.zoomType.indexOf("x"),
+ g = 0 <= this.zoomType.indexOf("y"),
+ l = !1;
+ this.resetOverlayedCanvas();
+ if ("xySwapped" === this.plotInfo.axisPlacement) var k = g,
+ g = f,
+ f = k;
+ if (this.panEnabled || this.zoomEnabled) {
+ if (this.panEnabled)
+ for (f = g = 0; f < this._axes.length; f++) b = this._axes[f], b.logarithmic ? b.viewportMinimum < b.minimum ? (g = b.minimum / b.viewportMinimum, b.sessionVariables.newViewportMinimum = b.viewportMinimum * g, b.sessionVariables.newViewportMaximum = b.viewportMaximum * g, l = !0) : b.viewportMaximum > b.maximum && (g = b.viewportMaximum / b.maximum, b.sessionVariables.newViewportMinimum =
+ b.viewportMinimum / g, b.sessionVariables.newViewportMaximum = b.viewportMaximum / g, l = !0) : b.viewportMinimum < b.minimum ? (g = b.minimum - b.viewportMinimum, b.sessionVariables.newViewportMinimum = b.viewportMinimum + g, b.sessionVariables.newViewportMaximum = b.viewportMaximum + g, l = !0) : b.viewportMaximum > b.maximum && (g = b.viewportMaximum - b.maximum, b.sessionVariables.newViewportMinimum = b.viewportMinimum - g, b.sessionVariables.newViewportMaximum = b.viewportMaximum - g, l = !0);
+ else if ((!f || 2 < Math.abs(d)) && (!g || 2 < Math.abs(b)) && this.zoomEnabled) {
+ if (!this.dragStartPoint) return;
+ b = f ? this.dragStartPoint.x : this.plotArea.x1;
+ d = g ? this.dragStartPoint.y : this.plotArea.y1;
+ f = f ? a : this.plotArea.x2;
+ g = g ? c : this.plotArea.y2;
+ 2 < Math.abs(b - f) && 2 < Math.abs(d - g) && this._zoomPanToSelectedRegion(b, d, f, g) && (l = !0)
+ }
+ l && (this._ignoreNextEvent = !0, this._dispatchRangeEvent("rangeChanging", "zoom"), this.render(), this._dispatchRangeEvent("rangeChanged", "zoom"), l && (this.zoomEnabled && "none" === this._zoomButton.style.display) && (ta(this._zoomButton, this._resetButton), R(this, this._zoomButton, "pan"), R(this, this._resetButton,
+ "reset")))
+ }
+ }
+ this.isDrag = !1
+ };
+ B.prototype._plotAreaMouseMove = function(a, c) {
+ if (this.isDrag && "none" !== this.plotInfo.axisPlacement) {
+ var b = 0,
+ d = 0,
+ f = b = null,
+ f = 0 <= this.zoomType.indexOf("x"),
+ g = 0 <= this.zoomType.indexOf("y"),
+ l = this;
+ "xySwapped" === this.plotInfo.axisPlacement && (b = g, g = f, f = b);
+ b = this.dragStartPoint.x - a;
+ d = this.dragStartPoint.y - c;
+ 2 < Math.abs(b) && 8 > Math.abs(b) && (this.panEnabled || this.zoomEnabled) ? this.toolTip.hide() : this.panEnabled || this.zoomEnabled || this.toolTip.mouseMoveHandler(a, c);
+ if ((!f || 2 < Math.abs(b) ||
+ !g || 2 < Math.abs(d)) && (this.panEnabled || this.zoomEnabled))
+ if (this.panEnabled) f = { x1: f ? this.plotArea.x1 + b : this.plotArea.x1, y1: g ? this.plotArea.y1 + d : this.plotArea.y1, x2: f ? this.plotArea.x2 + b : this.plotArea.x2, y2: g ? this.plotArea.y2 + d : this.plotArea.y2 }, clearTimeout(l._panTimerId), l._panTimerId = setTimeout(function(b, d, e, f) {
+ return function() {
+ l._zoomPanToSelectedRegion(b, d, e, f, !0) && (l._dispatchRangeEvent("rangeChanging", "pan"), l.render(), l._dispatchRangeEvent("rangeChanged", "pan"), l.dragStartPoint.x = a, l.dragStartPoint.y =
+ c)
+ }
+ }(f.x1, f.y1, f.x2, f.y2), 0);
+ else if (this.zoomEnabled) {
+ this.resetOverlayedCanvas();
+ b = this.overlaidCanvasCtx.globalAlpha;
+ this.overlaidCanvasCtx.fillStyle = "#A89896";
+ var d = f ? this.dragStartPoint.x : this.plotArea.x1,
+ k = g ? this.dragStartPoint.y : this.plotArea.y1,
+ h = f ? a - this.dragStartPoint.x : this.plotArea.x2 - this.plotArea.x1,
+ m = g ? c - this.dragStartPoint.y : this.plotArea.y2 - this.plotArea.y1;
+ this.validateRegion(d, k, f ? a : this.plotArea.x2 - this.plotArea.x1, g ? c : this.plotArea.y2 - this.plotArea.y1, "xy" !== this.zoomType).isValid &&
+ (this.resetOverlayedCanvas(), this.overlaidCanvasCtx.fillStyle = "#99B2B5");
+ this.overlaidCanvasCtx.globalAlpha = 0.7;
+ this.overlaidCanvasCtx.fillRect(d, k, h, m);
+ this.overlaidCanvasCtx.globalAlpha = b
+ }
+ } else this.toolTip.mouseMoveHandler(a, c)
+ };
+ B.prototype._zoomPanToSelectedRegion = function(a, c, b, d, f) {
+ a = this.validateRegion(a, c, b, d, f);
+ c = a.axesWithValidRange;
+ b = a.axesRanges;
+ if (a.isValid)
+ for (d = 0; d < c.length; d++) f = b[d], c[d].setViewPortRange(f.val1, f.val2);
+ return a.isValid
+ };
+ B.prototype.validateRegion = function(a, c, b, d,
+ f) {
+ f = f || !1;
+ for (var g = 0 <= this.zoomType.indexOf("x"), l = 0 <= this.zoomType.indexOf("y"), k = !1, h = [], m = [], p = [], n = 0; n < this.axisX.length; n++) this.axisX[n] && g && m.push(this.axisX[n]);
+ for (n = 0; n < this.axisX2.length; n++) this.axisX2[n] && g && m.push(this.axisX2[n]);
+ for (n = 0; n < this.axisY.length; n++) this.axisY[n] && l && m.push(this.axisY[n]);
+ for (n = 0; n < this.axisY2.length; n++) this.axisY2[n] && l && m.push(this.axisY2[n]);
+ for (g = 0; g < m.length; g++) {
+ var l = m[g],
+ n = l.convertPixelToValue({ x: a, y: c }),
+ e = l.convertPixelToValue({ x: b, y: d });
+ if (n >
+ e) var q = e,
+ e = n,
+ n = q;
+ if (isFinite(l.dataInfo.minDiff))
+ if (!(l.logarithmic && e / n < Math.pow(l.dataInfo.minDiff, 3) || !l.logarithmic && Math.abs(e - n) < 3 * Math.abs(l.dataInfo.minDiff) || n < l.minimum || e > l.maximum)) h.push(l), p.push({ val1: n, val2: e }), k = !0;
+ else if (!f) { k = !1; break }
+ }
+ return { isValid: k, axesWithValidRange: h, axesRanges: p }
+ };
+ B.prototype.preparePlotArea = function() {
+ var a = this.plotArea;
+ !t && (0 < a.x1 || 0 < a.y1) && a.ctx.translate(a.x1, a.y1);
+ if ((this.axisX[0] || this.axisX2[0]) && (this.axisY[0] || this.axisY2[0])) {
+ var c = this.axisX[0] ?
+ this.axisX[0].lineCoordinates : this.axisX2[0].lineCoordinates;
+ if (this.axisY && 0 < this.axisY.length && this.axisY[0]) {
+ var b = this.axisY[0];
+ a.x1 = c.x1 < c.x2 ? c.x1 : b.lineCoordinates.x1;
+ a.y1 = c.y1 < b.lineCoordinates.y1 ? c.y1 : b.lineCoordinates.y1;
+ a.x2 = c.x2 > b.lineCoordinates.x2 ? c.x2 : b.lineCoordinates.x2;
+ a.y2 = c.y2 > c.y1 ? c.y2 : b.lineCoordinates.y2;
+ a.width = a.x2 - a.x1;
+ a.height = a.y2 - a.y1
+ }
+ this.axisY2 && 0 < this.axisY2.length && this.axisY2[0] && (b = this.axisY2[0], a.x1 = c.x1 < c.x2 ? c.x1 : b.lineCoordinates.x1, a.y1 = c.y1 < b.lineCoordinates.y1 ?
+ c.y1 : b.lineCoordinates.y1, a.x2 = c.x2 > b.lineCoordinates.x2 ? c.x2 : b.lineCoordinates.x2, a.y2 = c.y2 > c.y1 ? c.y2 : b.lineCoordinates.y2, a.width = a.x2 - a.x1, a.height = a.y2 - a.y1)
+ } else c = this.layoutManager.getFreeSpace(), a.x1 = c.x1, a.x2 = c.x2, a.y1 = c.y1, a.y2 = c.y2, a.width = c.width, a.height = c.height;
+ t || (a.canvas.width = a.width, a.canvas.height = a.height, a.canvas.style.left = a.x1 + "px", a.canvas.style.top = a.y1 + "px", (0 < a.x1 || 0 < a.y1) && a.ctx.translate(-a.x1, -a.y1));
+ a.layoutManager = new ia(a.x1, a.y1, a.x2, a.y2, 2)
+ };
+ B.prototype.renderIndexLabels =
+ function(a) {
+ var c = a || this.plotArea.ctx,
+ b = this.plotArea,
+ d = 0,
+ f = 0,
+ g = 0,
+ l = 0,
+ k = d = l = f = g = 0,
+ h = 0;
+ for (a = 0; a < this._indexLabels.length; a++) {
+ var m = this._indexLabels[a],
+ p = m.chartType.toLowerCase(),
+ n, e, k = K("indexLabelFontColor", m.dataPoint, m.dataSeries),
+ h = K("indexLabelFontSize", m.dataPoint, m.dataSeries);
+ n = K("indexLabelFontFamily", m.dataPoint, m.dataSeries);
+ e = K("indexLabelFontStyle", m.dataPoint, m.dataSeries);
+ var l = K("indexLabelFontWeight", m.dataPoint, m.dataSeries),
+ q = K("indexLabelBackgroundColor", m.dataPoint, m.dataSeries),
+ f = K("indexLabelMaxWidth", m.dataPoint, m.dataSeries),
+ g = K("indexLabelWrap", m.dataPoint, m.dataSeries),
+ r = K("indexLabelLineDashType", m.dataPoint, m.dataSeries),
+ s = K("indexLabelLineColor", m.dataPoint, m.dataSeries),
+ w = z(m.dataPoint.indexLabelLineThickness) ? z(m.dataSeries.options.indexLabelLineThickness) ? 0 : m.dataSeries.options.indexLabelLineThickness : m.dataPoint.indexLabelLineThickness,
+ d = 0 < w ? Math.min(10, ("normal" === this.plotInfo.axisPlacement ? this.plotArea.height : this.plotArea.width) << 0) : 0,
+ u = { percent: null, total: null },
+ y = null;
+ if (0 <= m.dataSeries.type.indexOf("stacked") || "pie" === m.dataSeries.type || "doughnut" === m.dataSeries.type) u = this.getPercentAndTotal(m.dataSeries, m.dataPoint);
+ if (m.dataSeries.indexLabelFormatter || m.dataPoint.indexLabelFormatter) y = { chart: this, dataSeries: m.dataSeries, dataPoint: m.dataPoint, index: m.indexKeyword, total: u.total, percent: u.percent };
+ var x = m.dataPoint.indexLabelFormatter ? m.dataPoint.indexLabelFormatter(y) : m.dataPoint.indexLabel ? this.replaceKeywordsWithValue(m.dataPoint.indexLabel, m.dataPoint,
+ m.dataSeries, null, m.indexKeyword) : m.dataSeries.indexLabelFormatter ? m.dataSeries.indexLabelFormatter(y) : m.dataSeries.indexLabel ? this.replaceKeywordsWithValue(m.dataSeries.indexLabel, m.dataPoint, m.dataSeries, null, m.indexKeyword) : null;
+ if (null !== x && "" !== x) {
+ var u = K("indexLabelPlacement", m.dataPoint, m.dataSeries),
+ y = K("indexLabelOrientation", m.dataPoint, m.dataSeries),
+ v = m.direction,
+ Y = m.dataSeries.axisX,
+ A = m.dataSeries.axisY,
+ B = !1,
+ q = new U(c, {
+ x: 0,
+ y: 0,
+ maxWidth: f ? f : 0.5 * this.width,
+ maxHeight: g ? 5 * h : 1.5 * h,
+ angle: "horizontal" ===
+ y ? 0 : -90,
+ text: x,
+ padding: 0,
+ backgroundColor: q,
+ horizontalAlign: "left",
+ fontSize: h,
+ fontFamily: n,
+ fontWeight: l,
+ fontColor: k,
+ fontStyle: e,
+ textBaseline: "top"
+ });
+ q.measureText();
+ m.dataSeries.indexLabelMaxWidth = q.maxWidth;
+ if ("stackedarea100" === p) { if (m.point.x < b.x1 || m.point.x > b.x2 || m.point.y < b.y1 - 1 || m.point.y > b.y2 + 1) continue } else if ("rangearea" === p || "rangesplinearea" === p) {
+ if (m.dataPoint.x < Y.viewportMinimum || m.dataPoint.x > Y.viewportMaximum || Math.max.apply(null, m.dataPoint.y) < A.viewportMinimum || Math.min.apply(null,
+ m.dataPoint.y) > A.viewportMaximum) continue
+ } else if (0 <= p.indexOf("line") || 0 <= p.indexOf("area") || 0 <= p.indexOf("bubble") || 0 <= p.indexOf("scatter")) { if (m.dataPoint.x < Y.viewportMinimum || m.dataPoint.x > Y.viewportMaximum || m.dataPoint.y < A.viewportMinimum || m.dataPoint.y > A.viewportMaximum) continue } else if (0 <= p.indexOf("column")) { if (m.dataPoint.x < Y.viewportMinimum || m.dataPoint.x > Y.viewportMaximum || m.bounds.y1 > b.y2 || m.bounds.y2 < b.y1) continue } else if (0 <= p.indexOf("bar")) {
+ if (m.dataPoint.x < Y.viewportMinimum || m.dataPoint.x >
+ Y.viewportMaximum || m.bounds.x1 > b.x2 || m.bounds.x2 < b.x1) continue
+ } else if ("candlestick" === p || "ohlc" === p) { if (m.dataPoint.x < Y.viewportMinimum || m.dataPoint.x > Y.viewportMaximum || Math.max.apply(null, m.dataPoint.y) < A.viewportMinimum || Math.min.apply(null, m.dataPoint.y) > A.viewportMaximum) continue } else if (m.dataPoint.x < Y.viewportMinimum || m.dataPoint.x > Y.viewportMaximum) continue;
+ f = l = 2;
+ "horizontal" === y ? (k = q.width, h = q.height) : (h = q.width, k = q.height);
+ if ("normal" === this.plotInfo.axisPlacement) {
+ if (0 <= p.indexOf("line") ||
+ 0 <= p.indexOf("area")) u = "auto", l = 4;
+ else if (0 <= p.indexOf("stacked")) "auto" === u && (u = "inside");
+ else if ("bubble" === p || "scatter" === p) u = "inside";
+ n = m.point.x - k / 2;
+ "inside" !== u ? (f = b.y1, g = b.y2, 0 < v ? (e = m.point.y - h - l - d, e < f && (e = "auto" === u ? Math.max(m.point.y, f) + l + d : f + l + d, B = e + h > m.point.y)) : (e = m.point.y + l + d, e > g - h - l - d && (e = "auto" === u ? Math.min(m.point.y, g) - h - l - d : g - h - l - d, B = e < m.point.y))) : (f = Math.max(m.bounds.y1, b.y1), g = Math.min(m.bounds.y2, b.y2), d = 0 <= p.indexOf("range") ? 0 < v ? Math.max(m.bounds.y1, b.y1) + h / 2 + l : Math.min(m.bounds.y2,
+ b.y2) - h / 2 - l : (Math.max(m.bounds.y1, b.y1) + Math.min(m.bounds.y2, b.y2)) / 2, 0 < v ? (e = Math.max(m.point.y, d) - h / 2, e < f && ("bubble" === p || "scatter" === p) && (e = Math.max(m.point.y - h - l, b.y1 + l))) : (e = Math.min(m.point.y, d) - h / 2, e > g - h - l && ("bubble" === p || "scatter" === p) && (e = Math.min(m.point.y + l, b.y2 - h - l))), e = Math.min(e, g - h))
+ } else 0 <= p.indexOf("line") || 0 <= p.indexOf("area") || 0 <= p.indexOf("scatter") ? (u = "auto", f = 4) : 0 <= p.indexOf("stacked") ? "auto" === u && (u = "inside") : "bubble" === p && (u = "inside"), e = m.point.y - h / 2, "inside" !== u ? (l = b.x1, g =
+ b.x2, 0 > v ? (n = m.point.x - k - f - d, n < l && (n = "auto" === u ? Math.max(m.point.x, l) + f + d : l + f + d, B = n + k > m.point.x)) : (n = m.point.x + f + d, n > g - k - f - d && (n = "auto" === u ? Math.min(m.point.x, g) - k - f - d : g - k - f - d, B = n < m.point.x))) : (l = Math.max(m.bounds.x1, b.x1), Math.min(m.bounds.x2, b.x2), d = 0 <= p.indexOf("range") ? 0 > v ? Math.max(m.bounds.x1, b.x1) + k / 2 + f : Math.min(m.bounds.x2, b.x2) - k / 2 - f : (Math.max(m.bounds.x1, b.x1) + Math.min(m.bounds.x2, b.x2)) / 2, n = 0 > v ? Math.max(m.point.x, d) - k / 2 : Math.min(m.point.x, d) - k / 2, n = Math.max(n, l));
+ "vertical" === y && (e += h);
+ q.x =
+ n;
+ q.y = e;
+ q.render(!0);
+ w && ("inside" !== u && (0 > p.indexOf("bar") && m.point.x > b.x1 && m.point.x < b.x2 || !B) && (0 > p.indexOf("column") && m.point.y > b.y1 && m.point.y < b.y2 || !B)) && (c.lineWidth = w, c.strokeStyle = s ? s : "gray", c.setLineDash && c.setLineDash(G(r, w)), c.beginPath(), c.moveTo(m.point.x, m.point.y), 0 <= p.indexOf("bar") ? c.lineTo(n + (0 < m.direction ? 0 : k), e + ("horizontal" === y ? h : -h) / 2) : 0 <= p.indexOf("column") ? c.lineTo(n + k / 2, e + ((0 < m.direction ? h : -h) + ("horizontal" === y ? h : -h)) / 2) : c.lineTo(n + k / 2, e + ((e < m.point.y ? h : -h) + ("horizontal" ===
+ y ? h : -h)) / 2), c.stroke())
+ }
+ }
+ c = { source: c, dest: this.plotArea.ctx, animationCallback: E.fadeInAnimation, easingFunction: E.easing.easeInQuad, animationBase: 0, startTimePercent: 0.7 };
+ for (a = 0; a < this._indexLabels.length; a++) m = this._indexLabels[a], q = K("indexLabelBackgroundColor", m.dataPoint, m.dataSeries), m.dataSeries.indexLabelBackgroundColor = z(q) ? t ? "transparent" : null : q;
+ return c
+ };
+ B.prototype.renderLine = function(a) {
+ var c = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var b = this._eventManager.ghostCtx;
+ c.save();
+ var d = this.plotArea;
+ c.beginPath();
+ c.rect(d.x1, d.y1, d.width, d.height);
+ c.clip();
+ for (var d = [], f, g = 0; g < a.dataSeriesIndexes.length; g++) {
+ var l = a.dataSeriesIndexes[g],
+ k = this.data[l];
+ c.lineWidth = k.lineThickness;
+ var h = k.dataPoints,
+ m = "solid";
+ if (c.setLineDash) {
+ var p = G(k.nullDataLineDashType, k.lineThickness),
+ m = k.lineDashType,
+ n = G(m, k.lineThickness);
+ c.setLineDash(n)
+ }
+ var e = k.id;
+ this._eventManager.objectMap[e] = { objectType: "dataSeries", dataSeriesIndex: l };
+ e = F(e);
+ b.strokeStyle = e;
+ b.lineWidth = 0 < k.lineThickness ?
+ Math.max(k.lineThickness, 4) : 0;
+ var e = k._colorSet,
+ q = e = k.lineColor = k.options.lineColor ? k.options.lineColor : e[0];
+ c.strokeStyle = e;
+ var r = !0,
+ s = 0,
+ w, u;
+ c.beginPath();
+ if (0 < h.length) {
+ for (var y = !1, s = 0; s < h.length; s++)
+ if (w = h[s].x.getTime ? h[s].x.getTime() : h[s].x, !(w < a.axisX.dataInfo.viewPortMin || w > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !y)))
+ if ("number" !== typeof h[s].y) 0 < s && !(k.connectNullData || y || r) && (c.stroke(), t && b.stroke()), y = !0;
+ else {
+ w = a.axisX.convertValueToPixel(w);
+ u = a.axisY.convertValueToPixel(h[s].y);
+ var x = k.dataPointIds[s];
+ this._eventManager.objectMap[x] = { id: x, objectType: "dataPoint", dataSeriesIndex: l, dataPointIndex: s, x1: w, y1: u };
+ r || y ? (!r && k.connectNullData ? (c.setLineDash && (k.options.nullDataLineDashType || m === k.lineDashType && k.lineDashType !== k.nullDataLineDashType) && (c.stroke(), c.beginPath(), c.moveTo(f.x, f.y), m = k.nullDataLineDashType, c.setLineDash(p)), c.lineTo(w, u), t && b.lineTo(w, u)) : (c.beginPath(), c.moveTo(w, u), t && (b.beginPath(), b.moveTo(w, u))), y = r = !1) : (c.lineTo(w, u), t && b.lineTo(w, u), 0 == s % 500 &&
+ (c.stroke(), c.beginPath(), c.moveTo(w, u), t && (b.stroke(), b.beginPath(), b.moveTo(w, u))));
+ f = { x: w, y: u };
+ s < h.length - 1 && (q !== (h[s].lineColor || e) || m !== (h[s].lineDashType || k.lineDashType)) && (c.stroke(), c.beginPath(), c.moveTo(w, u), q = h[s].lineColor || e, c.strokeStyle = q, c.setLineDash && (h[s].lineDashType ? (m = h[s].lineDashType, c.setLineDash(G(m, k.lineThickness))) : (m = k.lineDashType, c.setLineDash(n))));
+ if (0 < h[s].markerSize || 0 < k.markerSize) {
+ var v = k.getMarkerProperties(s, w, u, c);
+ d.push(v);
+ x = F(x);
+ t && d.push({
+ x: w,
+ y: u,
+ ctx: b,
+ type: v.type,
+ size: v.size,
+ color: x,
+ borderColor: x,
+ borderThickness: v.borderThickness
+ })
+ }(h[s].indexLabel || k.indexLabel || h[s].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({ chartType: "line", dataPoint: h[s], dataSeries: k, point: { x: w, y: u }, direction: 0 > h[s].y === a.axisY.reversed ? 1 : -1, color: e })
+ }
+ c.stroke();
+ t && b.stroke()
+ }
+ }
+ N.drawMarkers(d);
+ c.restore();
+ c.beginPath();
+ t && b.beginPath();
+ return { source: c, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 }
+ }
+ };
+ B.prototype.renderStepLine = function(a) {
+ var c = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var b = this._eventManager.ghostCtx;
+ c.save();
+ var d = this.plotArea;
+ c.beginPath();
+ c.rect(d.x1, d.y1, d.width, d.height);
+ c.clip();
+ for (var d = [], f, g = 0; g < a.dataSeriesIndexes.length; g++) {
+ var l = a.dataSeriesIndexes[g],
+ k = this.data[l];
+ c.lineWidth = k.lineThickness;
+ var h = k.dataPoints,
+ m = "solid";
+ if (c.setLineDash) {
+ var p = G(k.nullDataLineDashType, k.lineThickness),
+ m = k.lineDashType,
+ n = G(m, k.lineThickness);
+ c.setLineDash(n)
+ }
+ var e =
+ k.id;
+ this._eventManager.objectMap[e] = { objectType: "dataSeries", dataSeriesIndex: l };
+ e = F(e);
+ b.strokeStyle = e;
+ b.lineWidth = 0 < k.lineThickness ? Math.max(k.lineThickness, 4) : 0;
+ var e = k._colorSet,
+ q = e = k.lineColor = k.options.lineColor ? k.options.lineColor : e[0];
+ c.strokeStyle = e;
+ var r = !0,
+ s = 0,
+ w, u;
+ c.beginPath();
+ if (0 < h.length) {
+ for (var y = !1, s = 0; s < h.length; s++)
+ if (w = h[s].getTime ? h[s].x.getTime() : h[s].x, !(w < a.axisX.dataInfo.viewPortMin || w > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !y)))
+ if ("number" !== typeof h[s].y) 0 <
+ s && !(k.connectNullData || y || r) && (c.stroke(), t && b.stroke()), y = !0;
+ else {
+ var x = u;
+ w = a.axisX.convertValueToPixel(w);
+ u = a.axisY.convertValueToPixel(h[s].y);
+ var v = k.dataPointIds[s];
+ this._eventManager.objectMap[v] = { id: v, objectType: "dataPoint", dataSeriesIndex: l, dataPointIndex: s, x1: w, y1: u };
+ r || y ? (!r && k.connectNullData ? (c.setLineDash && (k.options.nullDataLineDashType || m === k.lineDashType && k.lineDashType !== k.nullDataLineDashType) && (c.stroke(), c.beginPath(), c.moveTo(f.x, f.y), m = k.nullDataLineDashType, c.setLineDash(p)),
+ c.lineTo(w, x), c.lineTo(w, u), t && (b.lineTo(w, x), b.lineTo(w, u))) : (c.beginPath(), c.moveTo(w, u), t && (b.beginPath(), b.moveTo(w, u))), y = r = !1) : (c.lineTo(w, x), t && b.lineTo(w, x), c.lineTo(w, u), t && b.lineTo(w, u), 0 == s % 500 && (c.stroke(), c.beginPath(), c.moveTo(w, u), t && (b.stroke(), b.beginPath(), b.moveTo(w, u))));
+ f = { x: w, y: u };
+ s < h.length - 1 && (q !== (h[s].lineColor || e) || m !== (h[s].lineDashType || k.lineDashType)) && (c.stroke(), c.beginPath(), c.moveTo(w, u), q = h[s].lineColor || e, c.strokeStyle = q, c.setLineDash && (h[s].lineDashType ? (m = h[s].lineDashType,
+ c.setLineDash(G(m, k.lineThickness))) : (m = k.lineDashType, c.setLineDash(n))));
+ if (0 < h[s].markerSize || 0 < k.markerSize) x = k.getMarkerProperties(s, w, u, c), d.push(x), v = F(v), t && d.push({ x: w, y: u, ctx: b, type: x.type, size: x.size, color: v, borderColor: v, borderThickness: x.borderThickness });
+ (h[s].indexLabel || k.indexLabel || h[s].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({ chartType: "stepLine", dataPoint: h[s], dataSeries: k, point: { x: w, y: u }, direction: 0 > h[s].y === a.axisY.reversed ? 1 : -1, color: e })
+ }
+ c.stroke();
+ t && b.stroke()
+ }
+ }
+ N.drawMarkers(d);
+ c.restore();
+ c.beginPath();
+ t && b.beginPath();
+ return { source: c, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 }
+ }
+ };
+ B.prototype.renderSpline = function(a) {
+ function c(a) {
+ a = ua(a, 2);
+ if (0 < a.length) {
+ b.beginPath();
+ t && d.beginPath();
+ b.moveTo(a[0].x, a[0].y);
+ a[0].newStrokeStyle && (b.strokeStyle = a[0].newStrokeStyle);
+ a[0].newLineDashArray && b.setLineDash(a[0].newLineDashArray);
+ t && d.moveTo(a[0].x, a[0].y);
+ for (var c = 0; c < a.length - 3; c +=
+ 3)
+ if (b.bezierCurveTo(a[c + 1].x, a[c + 1].y, a[c + 2].x, a[c + 2].y, a[c + 3].x, a[c + 3].y), t && d.bezierCurveTo(a[c + 1].x, a[c + 1].y, a[c + 2].x, a[c + 2].y, a[c + 3].x, a[c + 3].y), 0 < c && 0 === c % 3E3 || a[c + 3].newStrokeStyle || a[c + 3].newLineDashArray) b.stroke(), b.beginPath(), b.moveTo(a[c + 3].x, a[c + 3].y), a[c + 3].newStrokeStyle && (b.strokeStyle = a[c + 3].newStrokeStyle), a[c + 3].newLineDashArray && b.setLineDash(a[c + 3].newLineDashArray), t && (d.stroke(), d.beginPath(), d.moveTo(a[c + 3].x, a[c + 3].y));
+ b.stroke();
+ t && d.stroke()
+ }
+ }
+ var b = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var d = this._eventManager.ghostCtx;
+ b.save();
+ var f = this.plotArea;
+ b.beginPath();
+ b.rect(f.x1, f.y1, f.width, f.height);
+ b.clip();
+ for (var f = [], g = 0; g < a.dataSeriesIndexes.length; g++) {
+ var l = a.dataSeriesIndexes[g],
+ k = this.data[l];
+ b.lineWidth = k.lineThickness;
+ var h = k.dataPoints,
+ m = "solid";
+ if (b.setLineDash) {
+ var p = G(k.nullDataLineDashType, k.lineThickness),
+ m = k.lineDashType,
+ n = G(m, k.lineThickness);
+ b.setLineDash(n)
+ }
+ var e = k.id;
+ this._eventManager.objectMap[e] = {
+ objectType: "dataSeries",
+ dataSeriesIndex: l
+ };
+ e = F(e);
+ d.strokeStyle = e;
+ d.lineWidth = 0 < k.lineThickness ? Math.max(k.lineThickness, 4) : 0;
+ var e = k._colorSet,
+ q = e = k.lineColor = k.options.lineColor ? k.options.lineColor : e[0];
+ b.strokeStyle = e;
+ var r = 0,
+ s, w, u = [];
+ b.beginPath();
+ if (0 < h.length)
+ for (w = !1, r = 0; r < h.length; r++)
+ if (s = h[r].getTime ? h[r].x.getTime() : h[r].x, !(s < a.axisX.dataInfo.viewPortMin || s > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !w)))
+ if ("number" !== typeof h[r].y) 0 < r && !w && (k.connectNullData ? b.setLineDash && (0 < u.length && (k.options.nullDataLineDashType ||
+ !h[r - 1].lineDashType)) && (u[u.length - 1].newLineDashArray = p, m = k.nullDataLineDashType) : (c(u), u = [])), w = !0;
+ else {
+ s = a.axisX.convertValueToPixel(s);
+ w = a.axisY.convertValueToPixel(h[r].y);
+ var y = k.dataPointIds[r];
+ this._eventManager.objectMap[y] = { id: y, objectType: "dataPoint", dataSeriesIndex: l, dataPointIndex: r, x1: s, y1: w };
+ u[u.length] = { x: s, y: w };
+ r < h.length - 1 && (q !== (h[r].lineColor || e) || m !== (h[r].lineDashType || k.lineDashType)) && (q = h[r].lineColor || e, u[u.length - 1].newStrokeStyle = q, b.setLineDash && (h[r].lineDashType ? (m =
+ h[r].lineDashType, u[u.length - 1].newLineDashArray = G(m, k.lineThickness)) : (m = k.lineDashType, u[u.length - 1].newLineDashArray = n)));
+ if (0 < h[r].markerSize || 0 < k.markerSize) {
+ var x = k.getMarkerProperties(r, s, w, b);
+ f.push(x);
+ y = F(y);
+ t && f.push({ x: s, y: w, ctx: d, type: x.type, size: x.size, color: y, borderColor: y, borderThickness: x.borderThickness })
+ }(h[r].indexLabel || k.indexLabel || h[r].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({
+ chartType: "spline",
+ dataPoint: h[r],
+ dataSeries: k,
+ point: { x: s, y: w },
+ direction: 0 >
+ h[r].y === a.axisY.reversed ? 1 : -1,
+ color: e
+ });
+ w = !1
+ }
+ c(u)
+ }
+ N.drawMarkers(f);
+ b.restore();
+ b.beginPath();
+ t && d.beginPath();
+ return { source: b, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 }
+ }
+ };
+ var M = function(a, c, b, d, f, g, l, k, h, m, p, n, e) {
+ "undefined" === typeof e && (e = 1);
+ l = l || 0;
+ k = k || "black";
+ var q = 15 < d - c && 15 < f - b ? 8 : 0.35 * Math.min(d - c, f - b);
+ a.beginPath();
+ a.moveTo(c, b);
+ a.save();
+ a.fillStyle = g;
+ a.globalAlpha = e;
+ a.fillRect(c, b, d - c, f - b);
+ a.globalAlpha = 1;
+ 0 < l && (e = 0 === l % 2 ? 0 : 0.5,
+ a.beginPath(), a.lineWidth = l, a.strokeStyle = k, a.moveTo(c, b), a.rect(c - e, b - e, d - c + 2 * e, f - b + 2 * e), a.stroke());
+ a.restore();
+ !0 === h && (a.save(), a.beginPath(), a.moveTo(c, b), a.lineTo(c + q, b + q), a.lineTo(d - q, b + q), a.lineTo(d, b), a.closePath(), l = a.createLinearGradient((d + c) / 2, b + q, (d + c) / 2, b), l.addColorStop(0, g), l.addColorStop(1, "rgba(255, 255, 255, .4)"), a.fillStyle = l, a.fill(), a.restore());
+ !0 === m && (a.save(), a.beginPath(), a.moveTo(c, f), a.lineTo(c + q, f - q), a.lineTo(d - q, f - q), a.lineTo(d, f), a.closePath(), l = a.createLinearGradient((d +
+ c) / 2, f - q, (d + c) / 2, f), l.addColorStop(0, g), l.addColorStop(1, "rgba(255, 255, 255, .4)"), a.fillStyle = l, a.fill(), a.restore());
+ !0 === p && (a.save(), a.beginPath(), a.moveTo(c, b), a.lineTo(c + q, b + q), a.lineTo(c + q, f - q), a.lineTo(c, f), a.closePath(), l = a.createLinearGradient(c + q, (f + b) / 2, c, (f + b) / 2), l.addColorStop(0, g), l.addColorStop(1, "rgba(255, 255, 255, 0.1)"), a.fillStyle = l, a.fill(), a.restore());
+ !0 === n && (a.save(), a.beginPath(), a.moveTo(d, b), a.lineTo(d - q, b + q), a.lineTo(d - q, f - q), a.lineTo(d, f), l = a.createLinearGradient(d -
+ q, (f + b) / 2, d, (f + b) / 2), l.addColorStop(0, g), l.addColorStop(1, "rgba(255, 255, 255, 0.1)"), a.fillStyle = l, l.addColorStop(0, g), l.addColorStop(1, "rgba(255, 255, 255, 0.1)"), a.fillStyle = l, a.fill(), a.closePath(), a.restore())
+ };
+ B.prototype.renderColumn = function(a) {
+ var c = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var b = null,
+ d = this.plotArea,
+ f = 0,
+ g, l, k, h = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
+ f = this.dataPointMinWidth = this.dataPointMinWidth ? this.dataPointMinWidth :
+ this.dataPointWidth ? this.dataPointWidth : 1,
+ m = this.dataPointMaxWidth = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : Math.min(0.15 * this.width, 0.9 * (this.plotArea.width / a.plotType.totalDataSeries)) << 0,
+ p = a.axisX.dataInfo.minDiff;
+ isFinite(p) || (p = 0.3 * Math.abs(a.axisX.range));
+ p = this.dataPointWidth = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.width * (a.axisX.logarithmic ? Math.log(p) / Math.log(a.axisX.range) : Math.abs(p) / Math.abs(a.axisX.range)) / a.plotType.totalDataSeries) <<
+ 0;
+ this.dataPointMaxWidth && f > m && (f = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, m));
+ !this.dataPointMaxWidth && (this.dataPointMinWidth && m < f) && (m = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, f));
+ p < f && (p = f);
+ p > m && (p = m);
+ c.save();
+ t && this._eventManager.ghostCtx.save();
+ c.beginPath();
+ c.rect(d.x1, d.y1, d.width, d.height);
+ c.clip();
+ t && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip());
+ for (d = 0; d < a.dataSeriesIndexes.length; d++) {
+ var m =
+ a.dataSeriesIndexes[d],
+ n = this.data[m],
+ e = n.dataPoints;
+ if (0 < e.length)
+ for (var q = 5 < p && n.bevelEnabled ? !0 : !1, f = 0; f < e.length; f++)
+ if (e[f].getTime ? k = e[f].x.getTime() : k = e[f].x, !(k < a.axisX.dataInfo.viewPortMin || k > a.axisX.dataInfo.viewPortMax) && "number" === typeof e[f].y) {
+ g = a.axisX.convertValueToPixel(k);
+ l = a.axisY.convertValueToPixel(e[f].y);
+ g = a.axisX.reversed ? g + a.plotType.totalDataSeries * p / 2 - (a.previousDataSeriesCount + d) * p << 0 : g - a.plotType.totalDataSeries * p / 2 + (a.previousDataSeriesCount + d) * p << 0;
+ var r = a.axisX.reversed ?
+ g - p << 0 : g + p << 0,
+ s;
+ 0 <= e[f].y ? s = h : (s = l, l = h);
+ l > s && (b = l, l = s, s = b);
+ b = e[f].color ? e[f].color : n._colorSet[f % n._colorSet.length];
+ M(c, g, l, r, s, b, 0, null, q && 0 <= e[f].y, 0 > e[f].y && q, !1, !1, n.fillOpacity);
+ b = n.dataPointIds[f];
+ this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: m, dataPointIndex: f, x1: g, y1: l, x2: r, y2: s };
+ b = F(b);
+ t && M(this._eventManager.ghostCtx, g, l, r, s, b, 0, null, !1, !1, !1, !1);
+ (e[f].indexLabel || n.indexLabel || e[f].indexLabelFormatter || n.indexLabelFormatter) && this._indexLabels.push({
+ chartType: "column",
+ dataPoint: e[f],
+ dataSeries: n,
+ point: { x: g + (r - g) / 2, y: 0 > e[f].y === a.axisY.reversed ? l : s },
+ direction: 0 > e[f].y === a.axisY.reversed ? 1 : -1,
+ bounds: { x1: g, y1: Math.min(l, s), x2: r, y2: Math.max(l, s) },
+ color: b
+ })
+ }
+ }
+ c.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return { source: c, dest: this.plotArea.ctx, animationCallback: E.yScaleAnimation, easingFunction: E.easing.easeOutQuart, animationBase: h < a.axisY.bounds.y1 ? a.axisY.bounds.y1 : h > a.axisY.bounds.y2 ? a.axisY.bounds.y2 : h }
+ }
+ };
+ B.prototype.renderStackedColumn = function(a) {
+ var c = a.targetCanvasCtx ||
+ this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var b = null,
+ d = this.plotArea,
+ f = [],
+ g = [],
+ l = [],
+ k = 0,
+ h, m = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
+ k = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1,
+ p = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.15 * this.width << 0,
+ n = a.axisX.dataInfo.minDiff;
+ isFinite(n) || (n = 0.3 * Math.abs(a.axisX.range));
+ n = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.width *
+ (a.axisX.logarithmic ? Math.log(n) / Math.log(a.axisX.range) : Math.abs(n) / Math.abs(a.axisX.range)) / a.plotType.plotUnits.length) << 0;
+ this.dataPointMaxWidth && k > p && (k = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, p));
+ !this.dataPointMaxWidth && (this.dataPointMinWidth && p < k) && (p = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, k));
+ n < k && (n = k);
+ n > p && (n = p);
+ c.save();
+ t && this._eventManager.ghostCtx.save();
+ c.beginPath();
+ c.rect(d.x1, d.y1, d.width, d.height);
+ c.clip();
+ t && (this._eventManager.ghostCtx.beginPath(),
+ this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip());
+ for (p = 0; p < a.dataSeriesIndexes.length; p++) {
+ var e = a.dataSeriesIndexes[p],
+ q = this.data[e],
+ r = q.dataPoints;
+ if (0 < r.length) {
+ var s = 5 < n && q.bevelEnabled ? !0 : !1;
+ c.strokeStyle = "#4572A7 ";
+ for (k = 0; k < r.length; k++)
+ if (b = r[k].x.getTime ? r[k].x.getTime() : r[k].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof r[k].y) {
+ var d = a.axisX.convertValueToPixel(b),
+ w = d - a.plotType.plotUnits.length * n /
+ 2 + a.index * n << 0,
+ u = w + n << 0,
+ y;
+ if (a.axisY.logarithmic) l[b] = r[k].y + (l[b] ? l[b] : 0), 0 < l[b] && (h = a.axisY.convertValueToPixel(l[b]), y = f[b] ? f[b] : m, f[b] = h);
+ else if (h = a.axisY.convertValueToPixel(r[k].y), 0 <= r[k].y) {
+ var x = f[b] ? f[b] : 0;
+ h -= x;
+ y = m - x;
+ f[b] = x + (y - h)
+ } else x = g[b] ? g[b] : 0, y = h + x, h = m + x, g[b] = x + (y - h);
+ b = r[k].color ? r[k].color : q._colorSet[k % q._colorSet.length];
+ M(c, w, h, u, y, b, 0, null, s && 0 <= r[k].y, 0 > r[k].y && s, !1, !1, q.fillOpacity);
+ b = q.dataPointIds[k];
+ this._eventManager.objectMap[b] = {
+ id: b,
+ objectType: "dataPoint",
+ dataSeriesIndex: e,
+ dataPointIndex: k,
+ x1: w,
+ y1: h,
+ x2: u,
+ y2: y
+ };
+ b = F(b);
+ t && M(this._eventManager.ghostCtx, w, h, u, y, b, 0, null, !1, !1, !1, !1);
+ (r[k].indexLabel || q.indexLabel || r[k].indexLabelFormatter || q.indexLabelFormatter) && this._indexLabels.push({ chartType: "stackedColumn", dataPoint: r[k], dataSeries: q, point: { x: d, y: 0 <= r[k].y ? h : y }, direction: 0 > r[k].y === a.axisY.reversed ? 1 : -1, bounds: { x1: w, y1: Math.min(h, y), x2: u, y2: Math.max(h, y) }, color: b })
+ }
+ }
+ }
+ c.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return {
+ source: c,
+ dest: this.plotArea.ctx,
+ animationCallback: E.yScaleAnimation,
+ easingFunction: E.easing.easeOutQuart,
+ animationBase: m < a.axisY.bounds.y1 ? a.axisY.bounds.y1 : m > a.axisY.bounds.y2 ? a.axisY.bounds.y2 : m
+ }
+ }
+ };
+ B.prototype.renderStackedColumn100 = function(a) {
+ var c = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var b = null,
+ d = this.plotArea,
+ f = [],
+ g = [],
+ l = [],
+ k = 0,
+ h, m = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
+ k = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1,
+ p = this.dataPointMaxWidth ? this.dataPointMaxWidth :
+ this.dataPointWidth ? this.dataPointWidth : 0.15 * this.width << 0,
+ n = a.axisX.dataInfo.minDiff;
+ isFinite(n) || (n = 0.3 * Math.abs(a.axisX.range));
+ n = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.width * (a.axisX.logarithmic ? Math.log(n) / Math.log(a.axisX.range) : Math.abs(n) / Math.abs(a.axisX.range)) / a.plotType.plotUnits.length) << 0;
+ this.dataPointMaxWidth && k > p && (k = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, p));
+ !this.dataPointMaxWidth && (this.dataPointMinWidth && p < k) && (p = Math.max(this.dataPointWidth ? this.dataPointWidth :
+ -Infinity, k));
+ n < k && (n = k);
+ n > p && (n = p);
+ c.save();
+ t && this._eventManager.ghostCtx.save();
+ c.beginPath();
+ c.rect(d.x1, d.y1, d.width, d.height);
+ c.clip();
+ t && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip());
+ for (p = 0; p < a.dataSeriesIndexes.length; p++) {
+ var e = a.dataSeriesIndexes[p],
+ q = this.data[e],
+ r = q.dataPoints;
+ if (0 < r.length)
+ for (var s = 5 < n && q.bevelEnabled ? !0 : !1, k = 0; k < r.length; k++)
+ if (b = r[k].x.getTime ? r[k].x.getTime() : r[k].x, !(b < a.axisX.dataInfo.viewPortMin ||
+ b > a.axisX.dataInfo.viewPortMax) && "number" === typeof r[k].y) {
+ d = a.axisX.convertValueToPixel(b);
+ h = 0 !== a.dataPointYSums[b] ? 100 * (r[k].y / a.dataPointYSums[b]) : 0;
+ var w = d - a.plotType.plotUnits.length * n / 2 + a.index * n << 0,
+ u = w + n << 0,
+ y;
+ if (a.axisY.logarithmic) {
+ l[b] = h + (l[b] ? l[b] : 0);
+ if (0 >= l[b]) continue;
+ h = a.axisY.convertValueToPixel(l[b]);
+ y = f[b] ? f[b] : m;
+ f[b] = h
+ } else if (h = a.axisY.convertValueToPixel(h), 0 <= r[k].y) {
+ var x = f[b] ? f[b] : 0;
+ h -= x;
+ y = m - x;
+ f[b] = x + (y - h)
+ } else x = g[b] ? g[b] : 0, y = h + x, h = m + x, g[b] = x + (y - h);
+ b = r[k].color ? r[k].color :
+ q._colorSet[k % q._colorSet.length];
+ M(c, w, h, u, y, b, 0, null, s && 0 <= r[k].y, 0 > r[k].y && s, !1, !1, q.fillOpacity);
+ b = q.dataPointIds[k];
+ this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: e, dataPointIndex: k, x1: w, y1: h, x2: u, y2: y };
+ b = F(b);
+ t && M(this._eventManager.ghostCtx, w, h, u, y, b, 0, null, !1, !1, !1, !1);
+ (r[k].indexLabel || q.indexLabel || r[k].indexLabelFormatter || q.indexLabelFormatter) && this._indexLabels.push({
+ chartType: "stackedColumn100",
+ dataPoint: r[k],
+ dataSeries: q,
+ point: { x: d, y: 0 <= r[k].y ? h : y },
+ direction: 0 >
+ r[k].y === a.axisY.reversed ? 1 : -1,
+ bounds: { x1: w, y1: Math.min(h, y), x2: u, y2: Math.max(h, y) },
+ color: b
+ })
+ }
+ }
+ c.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return { source: c, dest: this.plotArea.ctx, animationCallback: E.yScaleAnimation, easingFunction: E.easing.easeOutQuart, animationBase: m < a.axisY.bounds.y1 ? a.axisY.bounds.y1 : m > a.axisY.bounds.y2 ? a.axisY.bounds.y2 : m }
+ }
+ };
+ B.prototype.renderBar = function(a) {
+ var c = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var b = null,
+ d = this.plotArea,
+ f = 0,
+ g,
+ l, k, h = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
+ f = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1,
+ m = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : Math.min(0.15 * this.height, 0.9 * (this.plotArea.height / a.plotType.totalDataSeries)) << 0,
+ p = a.axisX.dataInfo.minDiff;
+ isFinite(p) || (p = 0.3 * Math.abs(a.axisX.range));
+ p = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.height * (a.axisX.logarithmic ? Math.log(p) /
+ Math.log(a.axisX.range) : Math.abs(p) / Math.abs(a.axisX.range)) / a.plotType.totalDataSeries) << 0;
+ this.dataPointMaxWidth && f > m && (f = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, m));
+ !this.dataPointMaxWidth && (this.dataPointMinWidth && m < f) && (m = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, f));
+ p < f && (p = f);
+ p > m && (p = m);
+ c.save();
+ t && this._eventManager.ghostCtx.save();
+ c.beginPath();
+ c.rect(d.x1, d.y1, d.width, d.height);
+ c.clip();
+ t && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(d.x1,
+ d.y1, d.width, d.height), this._eventManager.ghostCtx.clip());
+ for (d = 0; d < a.dataSeriesIndexes.length; d++) {
+ var m = a.dataSeriesIndexes[d],
+ n = this.data[m],
+ e = n.dataPoints;
+ if (0 < e.length) {
+ var q = 5 < p && n.bevelEnabled ? !0 : !1;
+ c.strokeStyle = "#4572A7 ";
+ for (f = 0; f < e.length; f++)
+ if (e[f].getTime ? k = e[f].x.getTime() : k = e[f].x, !(k < a.axisX.dataInfo.viewPortMin || k > a.axisX.dataInfo.viewPortMax) && "number" === typeof e[f].y) {
+ l = a.axisX.convertValueToPixel(k);
+ g = a.axisY.convertValueToPixel(e[f].y);
+ l = a.axisX.reversed ? l + a.plotType.totalDataSeries *
+ p / 2 - (a.previousDataSeriesCount + d) * p << 0 : l - a.plotType.totalDataSeries * p / 2 + (a.previousDataSeriesCount + d) * p << 0;
+ var r = a.axisX.reversed ? l - p << 0 : l + p << 0,
+ s;
+ 0 <= e[f].y ? s = h : (s = g, g = h);
+ b = e[f].color ? e[f].color : n._colorSet[f % n._colorSet.length];
+ M(c, s, l, g, r, b, 0, null, q, !1, !1, !1, n.fillOpacity);
+ b = n.dataPointIds[f];
+ this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: m, dataPointIndex: f, x1: s, y1: l, x2: g, y2: r };
+ b = F(b);
+ t && M(this._eventManager.ghostCtx, s, l, g, r, b, 0, null, !1, !1, !1, !1);
+ (e[f].indexLabel || n.indexLabel ||
+ e[f].indexLabelFormatter || n.indexLabelFormatter) && this._indexLabels.push({ chartType: "bar", dataPoint: e[f], dataSeries: n, point: { x: 0 <= e[f].y ? g : s, y: l + (r - l) / 2 }, direction: 0 > e[f].y === a.axisY.reversed ? 1 : -1, bounds: { x1: Math.min(s, g), y1: l, x2: Math.max(s, g), y2: r }, color: b })
+ }
+ }
+ }
+ c.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return {
+ source: c,
+ dest: this.plotArea.ctx,
+ animationCallback: E.xScaleAnimation,
+ easingFunction: E.easing.easeOutQuart,
+ animationBase: h < a.axisY.bounds.x1 ? a.axisY.bounds.x1 : h > a.axisY.bounds.x2 ? a.axisY.bounds.x2 : h
+ }
+ }
+ };
+ B.prototype.renderStackedBar = function(a) {
+ var c = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var b = null,
+ d = this.plotArea,
+ f = [],
+ g = [],
+ l = [],
+ k = 0,
+ h, m = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
+ k = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1,
+ p = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.15 * this.height << 0,
+ n = a.axisX.dataInfo.minDiff;
+ isFinite(n) || (n = 0.3 * Math.abs(a.axisX.range));
+ n = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.height * (a.axisX.logarithmic ? Math.log(n) / Math.log(a.axisX.range) : Math.abs(n) / Math.abs(a.axisX.range)) / a.plotType.plotUnits.length) << 0;
+ this.dataPointMaxWidth && k > p && (k = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, p));
+ !this.dataPointMaxWidth && (this.dataPointMinWidth && p < k) && (p = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, k));
+ n < k && (n = k);
+ n > p && (n = p);
+ c.save();
+ t && this._eventManager.ghostCtx.save();
+ c.beginPath();
+ c.rect(d.x1, d.y1, d.width,
+ d.height);
+ c.clip();
+ t && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip());
+ for (p = 0; p < a.dataSeriesIndexes.length; p++) {
+ var e = a.dataSeriesIndexes[p],
+ q = this.data[e],
+ r = q.dataPoints;
+ if (0 < r.length) {
+ var s = 5 < n && q.bevelEnabled ? !0 : !1;
+ c.strokeStyle = "#4572A7 ";
+ for (k = 0; k < r.length; k++)
+ if (b = r[k].x.getTime ? r[k].x.getTime() : r[k].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof r[k].y) {
+ var d = a.axisX.convertValueToPixel(b),
+ w = d - a.plotType.plotUnits.length * n / 2 + a.index * n << 0,
+ u = w + n << 0,
+ y;
+ if (a.axisY.logarithmic) l[b] = r[k].y + (l[b] ? l[b] : 0), 0 < l[b] && (y = f[b] ? f[b] : m, f[b] = h = a.axisY.convertValueToPixel(l[b]));
+ else if (h = a.axisY.convertValueToPixel(r[k].y), 0 <= r[k].y) {
+ var x = f[b] ? f[b] : 0;
+ y = m + x;
+ h += x;
+ f[b] = x + (h - y)
+ } else x = g[b] ? g[b] : 0, y = h - x, h = m - x, g[b] = x + (h - y);
+ b = r[k].color ? r[k].color : q._colorSet[k % q._colorSet.length];
+ M(c, y, w, h, u, b, 0, null, s, !1, !1, !1, q.fillOpacity);
+ b = q.dataPointIds[k];
+ this._eventManager.objectMap[b] = {
+ id: b,
+ objectType: "dataPoint",
+ dataSeriesIndex: e,
+ dataPointIndex: k,
+ x1: y,
+ y1: w,
+ x2: h,
+ y2: u
+ };
+ b = F(b);
+ t && M(this._eventManager.ghostCtx, y, w, h, u, b, 0, null, !1, !1, !1, !1);
+ (r[k].indexLabel || q.indexLabel || r[k].indexLabelFormatter || q.indexLabelFormatter) && this._indexLabels.push({ chartType: "stackedBar", dataPoint: r[k], dataSeries: q, point: { x: 0 <= r[k].y ? h : y, y: d }, direction: 0 > r[k].y === a.axisY.reversed ? 1 : -1, bounds: { x1: Math.min(y, h), y1: w, x2: Math.max(y, h), y2: u }, color: b })
+ }
+ }
+ }
+ c.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return {
+ source: c,
+ dest: this.plotArea.ctx,
+ animationCallback: E.xScaleAnimation,
+ easingFunction: E.easing.easeOutQuart,
+ animationBase: m < a.axisY.bounds.x1 ? a.axisY.bounds.x1 : m > a.axisY.bounds.x2 ? a.axisY.bounds.x2 : m
+ }
+ }
+ };
+ B.prototype.renderStackedBar100 = function(a) {
+ var c = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var b = null,
+ d = this.plotArea,
+ f = [],
+ g = [],
+ l = [],
+ k = 0,
+ h, m = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
+ k = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth :
+ 1,
+ p = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.15 * this.height << 0,
+ n = a.axisX.dataInfo.minDiff;
+ isFinite(n) || (n = 0.3 * Math.abs(a.axisX.range));
+ n = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.height * (a.axisX.logarithmic ? Math.log(n) / Math.log(a.axisX.range) : Math.abs(n) / Math.abs(a.axisX.range)) / a.plotType.plotUnits.length) << 0;
+ this.dataPointMaxWidth && k > p && (k = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, p));
+ !this.dataPointMaxWidth && (this.dataPointMinWidth &&
+ p < k) && (p = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, k));
+ n < k && (n = k);
+ n > p && (n = p);
+ c.save();
+ t && this._eventManager.ghostCtx.save();
+ c.beginPath();
+ c.rect(d.x1, d.y1, d.width, d.height);
+ c.clip();
+ t && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip());
+ for (p = 0; p < a.dataSeriesIndexes.length; p++) {
+ var e = a.dataSeriesIndexes[p],
+ q = this.data[e],
+ r = q.dataPoints;
+ if (0 < r.length) {
+ var s = 5 < n && q.bevelEnabled ? !0 : !1;
+ c.strokeStyle =
+ "#4572A7 ";
+ for (k = 0; k < r.length; k++)
+ if (b = r[k].x.getTime ? r[k].x.getTime() : r[k].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof r[k].y) {
+ var d = a.axisX.convertValueToPixel(b),
+ w;
+ w = 0 !== a.dataPointYSums[b] ? 100 * (r[k].y / a.dataPointYSums[b]) : 0;
+ var u = d - a.plotType.plotUnits.length * n / 2 + a.index * n << 0,
+ y = u + n << 0;
+ if (a.axisY.logarithmic) {
+ l[b] = w + (l[b] ? l[b] : 0);
+ if (0 >= l[b]) continue;
+ w = f[b] ? f[b] : m;
+ f[b] = h = a.axisY.convertValueToPixel(l[b])
+ } else if (h = a.axisY.convertValueToPixel(w), 0 <= r[k].y) {
+ var x =
+ f[b] ? f[b] : 0;
+ w = m + x;
+ h += x;
+ f[b] = x + (h - w)
+ } else x = g[b] ? g[b] : 0, w = h - x, h = m - x, g[b] = x + (h - w);
+ b = r[k].color ? r[k].color : q._colorSet[k % q._colorSet.length];
+ M(c, w, u, h, y, b, 0, null, s, !1, !1, !1, q.fillOpacity);
+ b = q.dataPointIds[k];
+ this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: e, dataPointIndex: k, x1: w, y1: u, x2: h, y2: y };
+ b = F(b);
+ t && M(this._eventManager.ghostCtx, w, u, h, y, b, 0, null, !1, !1, !1, !1);
+ (r[k].indexLabel || q.indexLabel || r[k].indexLabelFormatter || q.indexLabelFormatter) && this._indexLabels.push({
+ chartType: "stackedBar100",
+ dataPoint: r[k],
+ dataSeries: q,
+ point: { x: 0 <= r[k].y ? h : w, y: d },
+ direction: 0 > r[k].y === a.axisY.reversed ? 1 : -1,
+ bounds: { x1: Math.min(w, h), y1: u, x2: Math.max(w, h), y2: y },
+ color: b
+ })
+ }
+ }
+ }
+ c.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return { source: c, dest: this.plotArea.ctx, animationCallback: E.xScaleAnimation, easingFunction: E.easing.easeOutQuart, animationBase: m < a.axisY.bounds.x1 ? a.axisY.bounds.x1 : m > a.axisY.bounds.x2 ? a.axisY.bounds.x2 : m }
+ }
+ };
+ B.prototype.renderArea = function(a) {
+ var c, b;
+
+ function d() {
+ v && (0 < e.lineThickness &&
+ f.stroke(), a.axisY.logarithmic || 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? x = y : 0 > a.axisY.viewportMaximum ? x = k.y1 : 0 < a.axisY.viewportMinimum && (x = l.y2), f.lineTo(s, x), f.lineTo(v.x, x), f.closePath(), f.globalAlpha = e.fillOpacity, f.fill(), f.globalAlpha = 1, t && (g.lineTo(s, x), g.lineTo(v.x, x), g.closePath(), g.fill()), f.beginPath(), f.moveTo(s, w), g.beginPath(), g.moveTo(s, w), v = { x: s, y: w })
+ }
+ var f = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var g = this._eventManager.ghostCtx,
+ l = a.axisX.lineCoordinates,
+ k = a.axisY.lineCoordinates,
+ h = [],
+ m = this.plotArea,
+ p;
+ f.save();
+ t && g.save();
+ f.beginPath();
+ f.rect(m.x1, m.y1, m.width, m.height);
+ f.clip();
+ t && (g.beginPath(), g.rect(m.x1, m.y1, m.width, m.height), g.clip());
+ for (m = 0; m < a.dataSeriesIndexes.length; m++) {
+ var n = a.dataSeriesIndexes[m],
+ e = this.data[n],
+ q = e.dataPoints,
+ h = e.id;
+ this._eventManager.objectMap[h] = { objectType: "dataSeries", dataSeriesIndex: n };
+ h = F(h);
+ g.fillStyle = h;
+ h = [];
+ c = !0;
+ var r = 0,
+ s, w, u, y = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
+ x, v =
+ null;
+ if (0 < q.length) {
+ var z = e._colorSet[r % e._colorSet.length],
+ A = e.lineColor = e.options.lineColor || z,
+ B = A;
+ f.fillStyle = z;
+ f.strokeStyle = A;
+ f.lineWidth = e.lineThickness;
+ b = "solid";
+ if (f.setLineDash) {
+ var C = G(e.nullDataLineDashType, e.lineThickness);
+ b = e.lineDashType;
+ var V = G(b, e.lineThickness);
+ f.setLineDash(V)
+ }
+ for (var W = !0; r < q.length; r++)
+ if (u = q[r].x.getTime ? q[r].x.getTime() : q[r].x, !(u < a.axisX.dataInfo.viewPortMin || u > a.axisX.dataInfo.viewPortMax && (!e.connectNullData || !W)))
+ if ("number" !== typeof q[r].y) e.connectNullData ||
+ (W || c) || d(), W = !0;
+ else {
+ s = a.axisX.convertValueToPixel(u);
+ w = a.axisY.convertValueToPixel(q[r].y);
+ c || W ? (!c && e.connectNullData ? (f.setLineDash && (e.options.nullDataLineDashType || b === e.lineDashType && e.lineDashType !== e.nullDataLineDashType) && (c = s, b = w, s = p.x, w = p.y, d(), f.moveTo(p.x, p.y), s = c, w = b, v = p, b = e.nullDataLineDashType, f.setLineDash(C)), f.lineTo(s, w), t && g.lineTo(s, w)) : (f.beginPath(), f.moveTo(s, w), t && (g.beginPath(), g.moveTo(s, w)), v = { x: s, y: w }), W = c = !1) : (f.lineTo(s, w), t && g.lineTo(s, w), 0 == r % 250 && d());
+ p = { x: s, y: w };
+ r < q.length - 1 && (B !== (q[r].lineColor || A) || b !== (q[r].lineDashType || e.lineDashType)) && (d(), B = q[r].lineColor || A, f.strokeStyle = B, f.setLineDash && (q[r].lineDashType ? (b = q[r].lineDashType, f.setLineDash(G(b, e.lineThickness))) : (b = e.lineDashType, f.setLineDash(V))));
+ var I = e.dataPointIds[r];
+ this._eventManager.objectMap[I] = { id: I, objectType: "dataPoint", dataSeriesIndex: n, dataPointIndex: r, x1: s, y1: w };
+ 0 !== q[r].markerSize && (0 < q[r].markerSize || 0 < e.markerSize) && (u = e.getMarkerProperties(r, s, w, f), h.push(u), I = F(I), t && h.push({
+ x: s,
+ y: w,
+ ctx: g,
+ type: u.type,
+ size: u.size,
+ color: I,
+ borderColor: I,
+ borderThickness: u.borderThickness
+ }));
+ (q[r].indexLabel || e.indexLabel || q[r].indexLabelFormatter || e.indexLabelFormatter) && this._indexLabels.push({ chartType: "area", dataPoint: q[r], dataSeries: e, point: { x: s, y: w }, direction: 0 > q[r].y === a.axisY.reversed ? 1 : -1, color: z })
+ }
+ d();
+ N.drawMarkers(h)
+ }
+ }
+ f.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return { source: f, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 }
+ }
+ };
+ B.prototype.renderSplineArea = function(a) {
+ function c() {
+ var c = ua(u, 2);
+ if (0 < c.length) {
+ if (0 < m.lineThickness) {
+ b.beginPath();
+ b.moveTo(c[0].x, c[0].y);
+ c[0].newStrokeStyle && (b.strokeStyle = c[0].newStrokeStyle);
+ c[0].newLineDashArray && b.setLineDash(c[0].newLineDashArray);
+ for (var e = 0; e < c.length - 3; e += 3)
+ if (b.bezierCurveTo(c[e + 1].x, c[e + 1].y, c[e + 2].x, c[e + 2].y, c[e + 3].x, c[e + 3].y), t && d.bezierCurveTo(c[e + 1].x, c[e + 1].y, c[e + 2].x, c[e + 2].y, c[e + 3].x, c[e + 3].y), c[e + 3].newStrokeStyle || c[e + 3].newLineDashArray) b.stroke(), b.beginPath(),
+ b.moveTo(c[e + 3].x, c[e + 3].y), c[e + 3].newStrokeStyle && (b.strokeStyle = c[e + 3].newStrokeStyle), c[e + 3].newLineDashArray && b.setLineDash(c[e + 3].newLineDashArray);
+ b.stroke()
+ }
+ b.beginPath();
+ b.moveTo(c[0].x, c[0].y);
+ t && (d.beginPath(), d.moveTo(c[0].x, c[0].y));
+ for (e = 0; e < c.length - 3; e += 3) b.bezierCurveTo(c[e + 1].x, c[e + 1].y, c[e + 2].x, c[e + 2].y, c[e + 3].x, c[e + 3].y), t && d.bezierCurveTo(c[e + 1].x, c[e + 1].y, c[e + 2].x, c[e + 2].y, c[e + 3].x, c[e + 3].y);
+ a.axisY.logarithmic || 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? s = r : 0 > a.axisY.viewportMaximum ?
+ s = g.y1 : 0 < a.axisY.viewportMinimum && (s = f.y2);
+ w = { x: c[0].x, y: c[0].y };
+ b.lineTo(c[c.length - 1].x, s);
+ b.lineTo(w.x, s);
+ b.closePath();
+ b.globalAlpha = m.fillOpacity;
+ b.fill();
+ b.globalAlpha = 1;
+ t && (d.lineTo(c[c.length - 1].x, s), d.lineTo(w.x, s), d.closePath(), d.fill())
+ }
+ }
+ var b = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var d = this._eventManager.ghostCtx,
+ f = a.axisX.lineCoordinates,
+ g = a.axisY.lineCoordinates,
+ l = [],
+ k = this.plotArea;
+ b.save();
+ t && d.save();
+ b.beginPath();
+ b.rect(k.x1, k.y1, k.width, k.height);
+ b.clip();
+ t && (d.beginPath(), d.rect(k.x1, k.y1, k.width, k.height), d.clip());
+ for (k = 0; k < a.dataSeriesIndexes.length; k++) {
+ var h = a.dataSeriesIndexes[k],
+ m = this.data[h],
+ p = m.dataPoints,
+ l = m.id;
+ this._eventManager.objectMap[l] = { objectType: "dataSeries", dataSeriesIndex: h };
+ l = F(l);
+ d.fillStyle = l;
+ var l = [],
+ n = 0,
+ e, q, r = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
+ s, w = null,
+ u = [];
+ if (0 < p.length) {
+ var y = m._colorSet[n % m._colorSet.length],
+ x = m.lineColor = m.options.lineColor || y,
+ v = x;
+ b.fillStyle = y;
+ b.strokeStyle =
+ x;
+ b.lineWidth = m.lineThickness;
+ var z = "solid";
+ if (b.setLineDash) {
+ var A = G(m.nullDataLineDashType, m.lineThickness),
+ z = m.lineDashType,
+ B = G(z, m.lineThickness);
+ b.setLineDash(B)
+ }
+ for (q = !1; n < p.length; n++)
+ if (e = p[n].x.getTime ? p[n].x.getTime() : p[n].x, !(e < a.axisX.dataInfo.viewPortMin || e > a.axisX.dataInfo.viewPortMax && (!m.connectNullData || !q)))
+ if ("number" !== typeof p[n].y) 0 < n && !q && (m.connectNullData ? b.setLineDash && (0 < u.length && (m.options.nullDataLineDashType || !p[n - 1].lineDashType)) && (u[u.length - 1].newLineDashArray = A,
+ z = m.nullDataLineDashType) : (c(), u = [])), q = !0;
+ else {
+ e = a.axisX.convertValueToPixel(e);
+ q = a.axisY.convertValueToPixel(p[n].y);
+ var C = m.dataPointIds[n];
+ this._eventManager.objectMap[C] = { id: C, objectType: "dataPoint", dataSeriesIndex: h, dataPointIndex: n, x1: e, y1: q };
+ u[u.length] = { x: e, y: q };
+ n < p.length - 1 && (v !== (p[n].lineColor || x) || z !== (p[n].lineDashType || m.lineDashType)) && (v = p[n].lineColor || x, u[u.length - 1].newStrokeStyle = v, b.setLineDash && (p[n].lineDashType ? (z = p[n].lineDashType, u[u.length - 1].newLineDashArray = G(z, m.lineThickness)) :
+ (z = m.lineDashType, u[u.length - 1].newLineDashArray = B)));
+ if (0 !== p[n].markerSize && (0 < p[n].markerSize || 0 < m.markerSize)) {
+ var V = m.getMarkerProperties(n, e, q, b);
+ l.push(V);
+ C = F(C);
+ t && l.push({ x: e, y: q, ctx: d, type: V.type, size: V.size, color: C, borderColor: C, borderThickness: V.borderThickness })
+ }(p[n].indexLabel || m.indexLabel || p[n].indexLabelFormatter || m.indexLabelFormatter) && this._indexLabels.push({ chartType: "splineArea", dataPoint: p[n], dataSeries: m, point: { x: e, y: q }, direction: 0 > p[n].y === a.axisY.reversed ? 1 : -1, color: y });
+ q = !1
+ }
+ c();
+ N.drawMarkers(l)
+ }
+ }
+ b.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return { source: b, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 }
+ }
+ };
+ B.prototype.renderStepArea = function(a) {
+ var c, b;
+
+ function d() {
+ v && (0 < e.lineThickness && f.stroke(), a.axisY.logarithmic || 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? x = y : 0 > a.axisY.viewportMaximum ? x = k.y1 : 0 < a.axisY.viewportMinimum && (x = l.y2), f.lineTo(s, x), f.lineTo(v.x, x), f.closePath(), f.globalAlpha =
+ e.fillOpacity, f.fill(), f.globalAlpha = 1, t && (g.lineTo(s, x), g.lineTo(v.x, x), g.closePath(), g.fill()), f.beginPath(), f.moveTo(s, w), g.beginPath(), g.moveTo(s, w), v = { x: s, y: w })
+ }
+ var f = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var g = this._eventManager.ghostCtx,
+ l = a.axisX.lineCoordinates,
+ k = a.axisY.lineCoordinates,
+ h = [],
+ m = this.plotArea,
+ p;
+ f.save();
+ t && g.save();
+ f.beginPath();
+ f.rect(m.x1, m.y1, m.width, m.height);
+ f.clip();
+ t && (g.beginPath(), g.rect(m.x1, m.y1, m.width, m.height), g.clip());
+ for (m =
+ 0; m < a.dataSeriesIndexes.length; m++) {
+ var n = a.dataSeriesIndexes[m],
+ e = this.data[n],
+ q = e.dataPoints,
+ h = e.id;
+ this._eventManager.objectMap[h] = { objectType: "dataSeries", dataSeriesIndex: n };
+ h = F(h);
+ g.fillStyle = h;
+ h = [];
+ c = !0;
+ var r = 0,
+ s, w, u, y = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
+ x, v = null;
+ b = !1;
+ if (0 < q.length) {
+ var z = e._colorSet[r % e._colorSet.length],
+ A = e.lineColor = e.options.lineColor || z,
+ B = A;
+ f.fillStyle = z;
+ f.strokeStyle = A;
+ f.lineWidth = e.lineThickness;
+ var C = "solid";
+ if (f.setLineDash) {
+ var V =
+ G(e.nullDataLineDashType, e.lineThickness),
+ C = e.lineDashType,
+ W = G(C, e.lineThickness);
+ f.setLineDash(W)
+ }
+ for (; r < q.length; r++)
+ if (u = q[r].x.getTime ? q[r].x.getTime() : q[r].x, !(u < a.axisX.dataInfo.viewPortMin || u > a.axisX.dataInfo.viewPortMax && (!e.connectNullData || !b))) {
+ var I = w;
+ "number" !== typeof q[r].y ? (e.connectNullData || (b || c) || d(), b = !0) : (s = a.axisX.convertValueToPixel(u), w = a.axisY.convertValueToPixel(q[r].y), c || b ? (!c && e.connectNullData ? (f.setLineDash && (e.options.nullDataLineDashType || C === e.lineDashType && e.lineDashType !==
+ e.nullDataLineDashType) && (c = s, b = w, s = p.x, w = p.y, d(), f.moveTo(p.x, p.y), s = c, w = b, v = p, C = e.nullDataLineDashType, f.setLineDash(V)), f.lineTo(s, I), f.lineTo(s, w), t && (g.lineTo(s, I), g.lineTo(s, w))) : (f.beginPath(), f.moveTo(s, w), t && (g.beginPath(), g.moveTo(s, w)), v = { x: s, y: w }), b = c = !1) : (f.lineTo(s, I), t && g.lineTo(s, I), f.lineTo(s, w), t && g.lineTo(s, w), 0 == r % 250 && d()), p = { x: s, y: w }, r < q.length - 1 && (B !== (q[r].lineColor || A) || C !== (q[r].lineDashType || e.lineDashType)) && (d(), B = q[r].lineColor || A, f.strokeStyle = B, f.setLineDash && (q[r].lineDashType ?
+ (C = q[r].lineDashType, f.setLineDash(G(C, e.lineThickness))) : (C = e.lineDashType, f.setLineDash(W)))), u = e.dataPointIds[r], this._eventManager.objectMap[u] = { id: u, objectType: "dataPoint", dataSeriesIndex: n, dataPointIndex: r, x1: s, y1: w }, 0 !== q[r].markerSize && (0 < q[r].markerSize || 0 < e.markerSize) && (I = e.getMarkerProperties(r, s, w, f), h.push(I), u = F(u), t && h.push({ x: s, y: w, ctx: g, type: I.type, size: I.size, color: u, borderColor: u, borderThickness: I.borderThickness })), (q[r].indexLabel || e.indexLabel || q[r].indexLabelFormatter || e.indexLabelFormatter) &&
+ this._indexLabels.push({ chartType: "stepArea", dataPoint: q[r], dataSeries: e, point: { x: s, y: w }, direction: 0 > q[r].y === a.axisY.reversed ? 1 : -1, color: z }))
+ }
+ d();
+ N.drawMarkers(h)
+ }
+ }
+ f.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return { source: f, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 }
+ }
+ };
+ B.prototype.renderStackedArea = function(a) {
+ function c() {
+ if (!(1 > k.length)) {
+ for (0 < v.lineThickness && b.stroke(); 0 < k.length;) {
+ var a = k.pop();
+ b.lineTo(a.x, a.y);
+ t && s.lineTo(a.x,
+ a.y)
+ }
+ b.closePath();
+ b.globalAlpha = v.fillOpacity;
+ b.fill();
+ b.globalAlpha = 1;
+ b.beginPath();
+ t && (s.closePath(), s.fill(), s.beginPath());
+ k = []
+ }
+ }
+ var b = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var d = null,
+ f = [],
+ g = this.plotArea,
+ l = [],
+ k = [],
+ h = [],
+ m = [],
+ p = 0,
+ n, e, q, r = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
+ s = this._eventManager.ghostCtx,
+ w, u, y;
+ t && s.beginPath();
+ b.save();
+ t && s.save();
+ b.beginPath();
+ b.rect(g.x1, g.y1, g.width, g.height);
+ b.clip();
+ t && (s.beginPath(),
+ s.rect(g.x1, g.y1, g.width, g.height), s.clip());
+ d = [];
+ for (g = 0; g < a.dataSeriesIndexes.length; g++) {
+ var x = a.dataSeriesIndexes[g],
+ v = this.data[x],
+ z = v.dataPoints;
+ v.dataPointIndexes = [];
+ for (p = 0; p < z.length; p++) x = z[p].x.getTime ? z[p].x.getTime() : z[p].x, v.dataPointIndexes[x] = p, d[x] || (h.push(x), d[x] = !0);
+ h.sort(ya)
+ }
+ for (g = 0; g < a.dataSeriesIndexes.length; g++) {
+ x = a.dataSeriesIndexes[g];
+ v = this.data[x];
+ z = v.dataPoints;
+ u = !0;
+ k = [];
+ p = v.id;
+ this._eventManager.objectMap[p] = { objectType: "dataSeries", dataSeriesIndex: x };
+ p = F(p);
+ s.fillStyle =
+ p;
+ if (0 < h.length) {
+ var d = v._colorSet[0],
+ A = v.lineColor = v.options.lineColor || d,
+ B = A;
+ b.fillStyle = d;
+ b.strokeStyle = A;
+ b.lineWidth = v.lineThickness;
+ y = "solid";
+ if (b.setLineDash) {
+ var C = G(v.nullDataLineDashType, v.lineThickness);
+ y = v.lineDashType;
+ var V = G(y, v.lineThickness);
+ b.setLineDash(V)
+ }
+ for (var W = !0, p = 0; p < h.length; p++) {
+ q = h[p];
+ var I = null,
+ I = 0 <= v.dataPointIndexes[q] ? z[v.dataPointIndexes[q]] : { x: q, y: null };
+ if (!(q < a.axisX.dataInfo.viewPortMin || q > a.axisX.dataInfo.viewPortMax && (!v.connectNullData || !W)))
+ if ("number" !== typeof I.y) v.connectNullData ||
+ (W || u) || c(), W = !0;
+ else {
+ n = a.axisX.convertValueToPixel(q);
+ var da = l[q] ? l[q] : 0;
+ if (a.axisY.logarithmic) {
+ m[q] = I.y + (m[q] ? m[q] : 0);
+ if (0 >= m[q]) continue;
+ e = a.axisY.convertValueToPixel(m[q])
+ } else e = a.axisY.convertValueToPixel(I.y), e -= da;
+ k.push({ x: n, y: r - da });
+ l[q] = r - e;
+ u || W ? (!u && v.connectNullData ? (b.setLineDash && (v.options.nullDataLineDashType || y === v.lineDashType && v.lineDashType !== v.nullDataLineDashType) && (u = k.pop(), y = k[k.length - 1], c(), b.moveTo(w.x, w.y), k.push(y), k.push(u), y = v.nullDataLineDashType, b.setLineDash(C)),
+ b.lineTo(n, e), t && s.lineTo(n, e)) : (b.beginPath(), b.moveTo(n, e), t && (s.beginPath(), s.moveTo(n, e))), W = u = !1) : (b.lineTo(n, e), t && s.lineTo(n, e), 0 == p % 250 && (c(), b.moveTo(n, e), t && s.moveTo(n, e), k.push({ x: n, y: r - da })));
+ w = { x: n, y: e };
+ p < z.length - 1 && (B !== (z[p].lineColor || A) || y !== (z[p].lineDashType || v.lineDashType)) && (c(), b.beginPath(), b.moveTo(n, e), k.push({ x: n, y: r - da }), B = z[p].lineColor || A, b.strokeStyle = B, b.setLineDash && (z[p].lineDashType ? (y = z[p].lineDashType, b.setLineDash(G(y, v.lineThickness))) : (y = v.lineDashType, b.setLineDash(V))));
+ if (0 <= v.dataPointIndexes[q]) {
+ var ea = v.dataPointIds[v.dataPointIndexes[q]];
+ this._eventManager.objectMap[ea] = { id: ea, objectType: "dataPoint", dataSeriesIndex: x, dataPointIndex: v.dataPointIndexes[q], x1: n, y1: e }
+ }
+ 0 <= v.dataPointIndexes[q] && 0 !== I.markerSize && (0 < I.markerSize || 0 < v.markerSize) && (q = v.getMarkerProperties(v.dataPointIndexes[q], n, e, b), f.push(q), markerColor = F(ea), t && f.push({ x: n, y: e, ctx: s, type: q.type, size: q.size, color: markerColor, borderColor: markerColor, borderThickness: q.borderThickness }));
+ (I.indexLabel ||
+ v.indexLabel || I.indexLabelFormatter || v.indexLabelFormatter) && this._indexLabels.push({ chartType: "stackedArea", dataPoint: I, dataSeries: v, point: { x: n, y: e }, direction: 0 > z[p].y === a.axisY.reversed ? 1 : -1, color: d })
+ }
+ }
+ c();
+ b.moveTo(n, e);
+ t && s.moveTo(n, e)
+ }
+ delete v.dataPointIndexes
+ }
+ N.drawMarkers(f);
+ b.restore();
+ t && s.restore();
+ return { source: b, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 }
+ }
+ };
+ B.prototype.renderStackedArea100 = function(a) {
+ function c() {
+ for (0 < v.lineThickness &&
+ b.stroke(); 0 < k.length;) {
+ var a = k.pop();
+ b.lineTo(a.x, a.y);
+ t && y.lineTo(a.x, a.y)
+ }
+ b.closePath();
+ b.globalAlpha = v.fillOpacity;
+ b.fill();
+ b.globalAlpha = 1;
+ b.beginPath();
+ t && (y.closePath(), y.fill(), y.beginPath());
+ k = []
+ }
+ var b = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var d = null,
+ f = this.plotArea,
+ g = [],
+ l = [],
+ k = [],
+ h = [],
+ m = [],
+ p = 0,
+ n, e, q, r, s, w, u = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0),
+ y = this._eventManager.ghostCtx;
+ b.save();
+ t && y.save();
+ b.beginPath();
+ b.rect(f.x1,
+ f.y1, f.width, f.height);
+ b.clip();
+ t && (y.beginPath(), y.rect(f.x1, f.y1, f.width, f.height), y.clip());
+ d = [];
+ for (f = 0; f < a.dataSeriesIndexes.length; f++) {
+ var x = a.dataSeriesIndexes[f],
+ v = this.data[x],
+ z = v.dataPoints;
+ v.dataPointIndexes = [];
+ for (p = 0; p < z.length; p++) x = z[p].x.getTime ? z[p].x.getTime() : z[p].x, v.dataPointIndexes[x] = p, d[x] || (h.push(x), d[x] = !0);
+ h.sort(ya)
+ }
+ for (f = 0; f < a.dataSeriesIndexes.length; f++) {
+ x = a.dataSeriesIndexes[f];
+ v = this.data[x];
+ z = v.dataPoints;
+ s = !0;
+ d = v.id;
+ this._eventManager.objectMap[d] = {
+ objectType: "dataSeries",
+ dataSeriesIndex: x
+ };
+ d = F(d);
+ y.fillStyle = d;
+ k = [];
+ if (0 < h.length) {
+ var d = v._colorSet[p % v._colorSet.length],
+ A = v.lineColor = v.options.lineColor || d,
+ B = A;
+ b.fillStyle = d;
+ b.strokeStyle = A;
+ b.lineWidth = v.lineThickness;
+ w = "solid";
+ if (b.setLineDash) {
+ var C = G(v.nullDataLineDashType, v.lineThickness);
+ w = v.lineDashType;
+ var V = G(w, v.lineThickness);
+ b.setLineDash(V)
+ }
+ for (var W = !0, p = 0; p < h.length; p++) {
+ q = h[p];
+ var I = null,
+ I = 0 <= v.dataPointIndexes[q] ? z[v.dataPointIndexes[q]] : { x: q, y: null };
+ if (!(q < a.axisX.dataInfo.viewPortMin || q > a.axisX.dataInfo.viewPortMax &&
+ (!v.connectNullData || !W)))
+ if ("number" !== typeof I.y) v.connectNullData || (W || s) || c(), W = !0;
+ else {
+ var da;
+ da = 0 !== a.dataPointYSums[q] ? 100 * (I.y / a.dataPointYSums[q]) : 0;
+ n = a.axisX.convertValueToPixel(q);
+ var ea = l[q] ? l[q] : 0;
+ if (a.axisY.logarithmic) {
+ m[q] = da + (m[q] ? m[q] : 0);
+ if (0 >= m[q]) continue;
+ e = a.axisY.convertValueToPixel(m[q])
+ } else e = a.axisY.convertValueToPixel(da), e -= ea;
+ k.push({ x: n, y: u - ea });
+ l[q] = u - e;
+ s || W ? (!s && v.connectNullData ? (b.setLineDash && (v.options.nullDataLineDashType || w === v.lineDashType && v.lineDashType !==
+ v.nullDataLineDashType) && (s = k.pop(), w = k[k.length - 1], c(), b.moveTo(r.x, r.y), k.push(w), k.push(s), w = v.nullDataLineDashType, b.setLineDash(C)), b.lineTo(n, e), t && y.lineTo(n, e)) : (b.beginPath(), b.moveTo(n, e), t && (y.beginPath(), y.moveTo(n, e))), W = s = !1) : (b.lineTo(n, e), t && y.lineTo(n, e), 0 == p % 250 && (c(), b.moveTo(n, e), t && y.moveTo(n, e), k.push({ x: n, y: u - ea })));
+ r = { x: n, y: e };
+ p < z.length - 1 && (B !== (z[p].lineColor || A) || w !== (z[p].lineDashType || v.lineDashType)) && (c(), b.beginPath(), b.moveTo(n, e), k.push({ x: n, y: u - ea }), B = z[p].lineColor ||
+ A, b.strokeStyle = B, b.setLineDash && (z[p].lineDashType ? (w = z[p].lineDashType, b.setLineDash(G(w, v.lineThickness))) : (w = v.lineDashType, b.setLineDash(V))));
+ if (0 <= v.dataPointIndexes[q]) {
+ var Fa = v.dataPointIds[v.dataPointIndexes[q]];
+ this._eventManager.objectMap[Fa] = { id: Fa, objectType: "dataPoint", dataSeriesIndex: x, dataPointIndex: v.dataPointIndexes[q], x1: n, y1: e }
+ }
+ 0 <= v.dataPointIndexes[q] && 0 !== I.markerSize && (0 < I.markerSize || 0 < v.markerSize) && (q = v.getMarkerProperties(p, n, e, b), g.push(q), markerColor = F(Fa), t && g.push({
+ x: n,
+ y: e,
+ ctx: y,
+ type: q.type,
+ size: q.size,
+ color: markerColor,
+ borderColor: markerColor,
+ borderThickness: q.borderThickness
+ }));
+ (I.indexLabel || v.indexLabel || I.indexLabelFormatter || v.indexLabelFormatter) && this._indexLabels.push({ chartType: "stackedArea100", dataPoint: I, dataSeries: v, point: { x: n, y: e }, direction: 0 > z[p].y === a.axisY.reversed ? 1 : -1, color: d })
+ }
+ }
+ c();
+ b.moveTo(n, e);
+ t && y.moveTo(n, e)
+ }
+ delete v.dataPointIndexes
+ }
+ N.drawMarkers(g);
+ b.restore();
+ t && y.restore();
+ return {
+ source: b,
+ dest: this.plotArea.ctx,
+ animationCallback: E.xClipAnimation,
+ easingFunction: E.easing.linear,
+ animationBase: 0
+ }
+ }
+ };
+ B.prototype.renderBubble = function(a) {
+ var c = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var b = this.plotArea,
+ d = 0,
+ f, g;
+ c.save();
+ t && this._eventManager.ghostCtx.save();
+ c.beginPath();
+ c.rect(b.x1, b.y1, b.width, b.height);
+ c.clip();
+ t && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(b.x1, b.y1, b.width, b.height), this._eventManager.ghostCtx.clip());
+ for (var l = -Infinity, k = Infinity, h = 0; h < a.dataSeriesIndexes.length; h++)
+ for (var m =
+ a.dataSeriesIndexes[h], p = this.data[m], n = p.dataPoints, e = 0, d = 0; d < n.length; d++) f = n[d].getTime ? f = n[d].x.getTime() : f = n[d].x, f < a.axisX.dataInfo.viewPortMin || f > a.axisX.dataInfo.viewPortMax || "undefined" === typeof n[d].z || (e = n[d].z, e > l && (l = e), e < k && (k = e));
+ for (var q = 25 * Math.PI, b = Math.max(Math.pow(0.25 * Math.min(b.height, b.width) / 2, 2) * Math.PI, q), h = 0; h < a.dataSeriesIndexes.length; h++)
+ if (m = a.dataSeriesIndexes[h], p = this.data[m], n = p.dataPoints, 0 < n.length)
+ for (c.strokeStyle = "#4572A7 ", d = 0; d < n.length; d++)
+ if (f = n[d].getTime ?
+ f = n[d].x.getTime() : f = n[d].x, !(f < a.axisX.dataInfo.viewPortMin || f > a.axisX.dataInfo.viewPortMax) && "number" === typeof n[d].y) {
+ f = a.axisX.convertValueToPixel(f);
+ g = a.axisY.convertValueToPixel(n[d].y);
+ var e = n[d].z,
+ r = 2 * Math.max(Math.sqrt((l === k ? b / 2 : q + (b - q) / (l - k) * (e - k)) / Math.PI) << 0, 1),
+ e = p.getMarkerProperties(d, c);
+ e.size = r;
+ c.globalAlpha = p.fillOpacity;
+ N.drawMarker(f, g, c, e.type, e.size, e.color, e.borderColor, e.borderThickness);
+ c.globalAlpha = 1;
+ var s = p.dataPointIds[d];
+ this._eventManager.objectMap[s] = {
+ id: s,
+ objectType: "dataPoint",
+ dataSeriesIndex: m,
+ dataPointIndex: d,
+ x1: f,
+ y1: g,
+ size: r
+ };
+ r = F(s);
+ t && N.drawMarker(f, g, this._eventManager.ghostCtx, e.type, e.size, r, r, e.borderThickness);
+ (n[d].indexLabel || p.indexLabel || n[d].indexLabelFormatter || p.indexLabelFormatter) && this._indexLabels.push({ chartType: "bubble", dataPoint: n[d], dataSeries: p, point: { x: f, y: g }, direction: 1, bounds: { x1: f - e.size / 2, y1: g - e.size / 2, x2: f + e.size / 2, y2: g + e.size / 2 }, color: null })
+ }
+ c.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return {
+ source: c,
+ dest: this.plotArea.ctx,
+ animationCallback: E.fadeInAnimation,
+ easingFunction: E.easing.easeInQuad,
+ animationBase: 0
+ }
+ }
+ };
+ B.prototype.renderScatter = function(a) {
+ var c = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var b = this.plotArea,
+ d = 0,
+ f, g;
+ c.save();
+ t && this._eventManager.ghostCtx.save();
+ c.beginPath();
+ c.rect(b.x1, b.y1, b.width, b.height);
+ c.clip();
+ t && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(b.x1, b.y1, b.width, b.height), this._eventManager.ghostCtx.clip());
+ for (var l = 0; l < a.dataSeriesIndexes.length; l++) {
+ var k = a.dataSeriesIndexes[l],
+ h = this.data[k],
+ m = h.dataPoints;
+ if (0 < m.length) {
+ c.strokeStyle = "#4572A7 ";
+ Math.pow(0.3 * Math.min(b.height, b.width) / 2, 2);
+ for (var p = 0, n = 0, d = 0; d < m.length; d++)
+ if (f = m[d].getTime ? f = m[d].x.getTime() : f = m[d].x, !(f < a.axisX.dataInfo.viewPortMin || f > a.axisX.dataInfo.viewPortMax) && "number" === typeof m[d].y) {
+ f = a.axisX.convertValueToPixel(f);
+ g = a.axisY.convertValueToPixel(m[d].y);
+ var e = h.getMarkerProperties(d, f, g, c);
+ c.globalAlpha = h.fillOpacity;
+ N.drawMarker(e.x, e.y, e.ctx, e.type, e.size, e.color, e.borderColor, e.borderThickness);
+ c.globalAlpha = 1;
+ Math.sqrt((p - f) * (p - f) + (n - g) * (n - g)) < Math.min(e.size, 5) && m.length > Math.min(this.plotArea.width, this.plotArea.height) || (p = h.dataPointIds[d], this._eventManager.objectMap[p] = { id: p, objectType: "dataPoint", dataSeriesIndex: k, dataPointIndex: d, x1: f, y1: g }, p = F(p), t && N.drawMarker(e.x, e.y, this._eventManager.ghostCtx, e.type, e.size, p, p, e.borderThickness), (m[d].indexLabel || h.indexLabel || m[d].indexLabelFormatter || h.indexLabelFormatter) && this._indexLabels.push({
+ chartType: "scatter",
+ dataPoint: m[d],
+ dataSeries: h,
+ point: { x: f, y: g },
+ direction: 1,
+ bounds: { x1: f - e.size / 2, y1: g - e.size / 2, x2: f + e.size / 2, y2: g + e.size / 2 },
+ color: null
+ }), p = f, n = g)
+ }
+ }
+ }
+ c.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return { source: c, dest: this.plotArea.ctx, animationCallback: E.fadeInAnimation, easingFunction: E.easing.easeInQuad, animationBase: 0 }
+ }
+ };
+ B.prototype.renderCandlestick = function(a) {
+ var c = a.targetCanvasCtx || this.plotArea.ctx,
+ b = this._eventManager.ghostCtx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var d = null,
+ d = this.plotArea,
+ f = 0,
+ g, l, k, h, m, p, f = this.dataPointMinWidth ?
+ this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1;
+ g = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.015 * this.width;
+ var n = a.axisX.dataInfo.minDiff;
+ isFinite(n) || (n = 0.3 * Math.abs(a.axisX.range));
+ n = this.dataPointWidth ? this.dataPointWidth : 0.7 * d.width * (a.axisX.logarithmic ? Math.log(n) / Math.log(a.axisX.range) : Math.abs(n) / Math.abs(a.axisX.range)) << 0;
+ this.dataPointMaxWidth && f > g && (f = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, g));
+ !this.dataPointMaxWidth &&
+ (this.dataPointMinWidth && g < f) && (g = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, f));
+ n < f && (n = f);
+ n > g && (n = g);
+ c.save();
+ t && b.save();
+ c.beginPath();
+ c.rect(d.x1, d.y1, d.width, d.height);
+ c.clip();
+ t && (b.beginPath(), b.rect(d.x1, d.y1, d.width, d.height), b.clip());
+ for (var e = 0; e < a.dataSeriesIndexes.length; e++) {
+ var q = a.dataSeriesIndexes[e],
+ r = this.data[q],
+ s = r.dataPoints;
+ if (0 < s.length)
+ for (var w = 5 < n && r.bevelEnabled ? !0 : !1, f = 0; f < s.length; f++)
+ if (s[f].getTime ? p = s[f].x.getTime() : p = s[f].x, !(p < a.axisX.dataInfo.viewPortMin ||
+ p > a.axisX.dataInfo.viewPortMax) && null !== s[f].y && s[f].y.length && "number" === typeof s[f].y[0] && "number" === typeof s[f].y[1] && "number" === typeof s[f].y[2] && "number" === typeof s[f].y[3]) {
+ g = a.axisX.convertValueToPixel(p);
+ l = a.axisY.convertValueToPixel(s[f].y[0]);
+ k = a.axisY.convertValueToPixel(s[f].y[1]);
+ h = a.axisY.convertValueToPixel(s[f].y[2]);
+ m = a.axisY.convertValueToPixel(s[f].y[3]);
+ var u = g - n / 2 << 0,
+ y = u + n << 0,
+ d = s[f].color ? s[f].color : r._colorSet[0],
+ x = Math.round(Math.max(1, 0.15 * n)),
+ v = 0 === x % 2 ? 0 : 0.5,
+ z = r.dataPointIds[f];
+ this._eventManager.objectMap[z] = { id: z, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: f, x1: u, y1: l, x2: y, y2: k, x3: g, y3: h, x4: g, y4: m, borderThickness: x, color: d };
+ c.strokeStyle = d;
+ c.beginPath();
+ c.lineWidth = x;
+ b.lineWidth = Math.max(x, 4);
+ "candlestick" === r.type ? (c.moveTo(g - v, k), c.lineTo(g - v, Math.min(l, m)), c.stroke(), c.moveTo(g - v, Math.max(l, m)), c.lineTo(g - v, h), c.stroke(), M(c, u, Math.min(l, m), y, Math.max(l, m), s[f].y[0] <= s[f].y[3] ? r.risingColor : d, x, d, w, w, !1, !1, r.fillOpacity), t && (d = F(z), b.strokeStyle = d, b.moveTo(g -
+ v, k), b.lineTo(g - v, Math.min(l, m)), b.stroke(), b.moveTo(g - v, Math.max(l, m)), b.lineTo(g - v, h), b.stroke(), M(b, u, Math.min(l, m), y, Math.max(l, m), d, 0, null, !1, !1, !1, !1))) : "ohlc" === r.type && (c.moveTo(g - v, k), c.lineTo(g - v, h), c.stroke(), c.beginPath(), c.moveTo(g, l), c.lineTo(u, l), c.stroke(), c.beginPath(), c.moveTo(g, m), c.lineTo(y, m), c.stroke(), t && (d = F(z), b.strokeStyle = d, b.moveTo(g - v, k), b.lineTo(g - v, h), b.stroke(), b.beginPath(), b.moveTo(g, l), b.lineTo(u, l), b.stroke(), b.beginPath(), b.moveTo(g, m), b.lineTo(y, m), b.stroke()));
+ (s[f].indexLabel || r.indexLabel || s[f].indexLabelFormatter || r.indexLabelFormatter) && this._indexLabels.push({ chartType: r.type, dataPoint: s[f], dataSeries: r, point: { x: u + (y - u) / 2, y: a.axisY.reversed ? h : k }, direction: 1, bounds: { x1: u, y1: Math.min(k, h), x2: y, y2: Math.max(k, h) }, color: d })
+ }
+ }
+ c.restore();
+ t && b.restore();
+ return { source: c, dest: this.plotArea.ctx, animationCallback: E.fadeInAnimation, easingFunction: E.easing.easeInQuad, animationBase: 0 }
+ }
+ };
+ B.prototype.renderRangeColumn = function(a) {
+ var c = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var b = null,
+ d = this.plotArea,
+ f = 0,
+ g, l, f = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1;
+ g = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth : 0.03 * this.width;
+ var k = a.axisX.dataInfo.minDiff;
+ isFinite(k) || (k = 0.3 * Math.abs(a.axisX.range));
+ k = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.width * (a.axisX.logarithmic ? Math.log(k) / Math.log(a.axisX.range) : Math.abs(k) / Math.abs(a.axisX.range)) / a.plotType.totalDataSeries) <<
+ 0;
+ this.dataPointMaxWidth && f > g && (f = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, g));
+ !this.dataPointMaxWidth && (this.dataPointMinWidth && g < f) && (g = Math.max(this.dataPointWidth ? this.dataPointWidth : -Infinity, f));
+ k < f && (k = f);
+ k > g && (k = g);
+ c.save();
+ t && this._eventManager.ghostCtx.save();
+ c.beginPath();
+ c.rect(d.x1, d.y1, d.width, d.height);
+ c.clip();
+ t && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip());
+ for (var h = 0; h < a.dataSeriesIndexes.length; h++) {
+ var m =
+ a.dataSeriesIndexes[h],
+ p = this.data[m],
+ n = p.dataPoints;
+ if (0 < n.length)
+ for (var e = 5 < k && p.bevelEnabled ? !0 : !1, f = 0; f < n.length; f++)
+ if (n[f].getTime ? l = n[f].x.getTime() : l = n[f].x, !(l < a.axisX.dataInfo.viewPortMin || l > a.axisX.dataInfo.viewPortMax) && null !== n[f].y && n[f].y.length && "number" === typeof n[f].y[0] && "number" === typeof n[f].y[1]) {
+ b = a.axisX.convertValueToPixel(l);
+ d = a.axisY.convertValueToPixel(n[f].y[0]);
+ g = a.axisY.convertValueToPixel(n[f].y[1]);
+ var q = a.axisX.reversed ? b + a.plotType.totalDataSeries * k / 2 - (a.previousDataSeriesCount +
+ h) * k << 0 : b - a.plotType.totalDataSeries * k / 2 + (a.previousDataSeriesCount + h) * k << 0,
+ r = a.axisX.reversed ? q - k << 0 : q + k << 0,
+ b = n[f].color ? n[f].color : p._colorSet[f % p._colorSet.length];
+ if (d > g) {
+ var s = d,
+ d = g;
+ g = s
+ }
+ s = p.dataPointIds[f];
+ this._eventManager.objectMap[s] = { id: s, objectType: "dataPoint", dataSeriesIndex: m, dataPointIndex: f, x1: q, y1: d, x2: r, y2: g };
+ M(c, q, d, r, g, b, 0, b, e, e, !1, !1, p.fillOpacity);
+ b = F(s);
+ t && M(this._eventManager.ghostCtx, q, d, r, g, b, 0, null, !1, !1, !1, !1);
+ if (n[f].indexLabel || p.indexLabel || n[f].indexLabelFormatter ||
+ p.indexLabelFormatter) this._indexLabels.push({ chartType: "rangeColumn", dataPoint: n[f], dataSeries: p, indexKeyword: 0, point: { x: q + (r - q) / 2, y: n[f].y[1] >= n[f].y[0] ? g : d }, direction: n[f].y[1] >= n[f].y[0] ? -1 : 1, bounds: { x1: q, y1: Math.min(d, g), x2: r, y2: Math.max(d, g) }, color: b }), this._indexLabels.push({ chartType: "rangeColumn", dataPoint: n[f], dataSeries: p, indexKeyword: 1, point: { x: q + (r - q) / 2, y: n[f].y[1] >= n[f].y[0] ? d : g }, direction: n[f].y[1] >= n[f].y[0] ? 1 : -1, bounds: { x1: q, y1: Math.min(d, g), x2: r, y2: Math.max(d, g) }, color: b })
+ }
+ }
+ c.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return { source: c, dest: this.plotArea.ctx, animationCallback: E.fadeInAnimation, easingFunction: E.easing.easeInQuad, animationBase: 0 }
+ }
+ };
+ B.prototype.renderRangeBar = function(a) {
+ var c = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var b = null,
+ d = this.plotArea,
+ f = 0,
+ g, l, k, f = this.dataPointMinWidth ? this.dataPointMinWidth : this.dataPointWidth ? this.dataPointWidth : 1;
+ g = this.dataPointMaxWidth ? this.dataPointMaxWidth : this.dataPointWidth ? this.dataPointWidth :
+ Math.min(0.15 * this.height, 0.9 * (this.plotArea.height / a.plotType.totalDataSeries)) << 0;
+ var h = a.axisX.dataInfo.minDiff;
+ isFinite(h) || (h = 0.3 * Math.abs(a.axisX.range));
+ h = this.dataPointWidth ? this.dataPointWidth : 0.9 * (d.height * (a.axisX.logarithmic ? Math.log(h) / Math.log(a.axisX.range) : Math.abs(h) / Math.abs(a.axisX.range)) / a.plotType.totalDataSeries) << 0;
+ this.dataPointMaxWidth && f > g && (f = Math.min(this.dataPointWidth ? this.dataPointWidth : Infinity, g));
+ !this.dataPointMaxWidth && (this.dataPointMinWidth && g < f) && (g = Math.max(this.dataPointWidth ?
+ this.dataPointWidth : -Infinity, f));
+ h < f && (h = f);
+ h > g && (h = g);
+ c.save();
+ t && this._eventManager.ghostCtx.save();
+ c.beginPath();
+ c.rect(d.x1, d.y1, d.width, d.height);
+ c.clip();
+ t && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip());
+ for (var m = 0; m < a.dataSeriesIndexes.length; m++) {
+ var p = a.dataSeriesIndexes[m],
+ n = this.data[p],
+ e = n.dataPoints;
+ if (0 < e.length) {
+ var q = 5 < h && n.bevelEnabled ? !0 : !1;
+ c.strokeStyle = "#4572A7 ";
+ for (f = 0; f < e.length; f++)
+ if (e[f].getTime ?
+ k = e[f].x.getTime() : k = e[f].x, !(k < a.axisX.dataInfo.viewPortMin || k > a.axisX.dataInfo.viewPortMax) && null !== e[f].y && e[f].y.length && "number" === typeof e[f].y[0] && "number" === typeof e[f].y[1]) {
+ d = a.axisY.convertValueToPixel(e[f].y[0]);
+ g = a.axisY.convertValueToPixel(e[f].y[1]);
+ l = a.axisX.convertValueToPixel(k);
+ l = a.axisX.reversed ? l + a.plotType.totalDataSeries * h / 2 - (a.previousDataSeriesCount + m) * h << 0 : l - a.plotType.totalDataSeries * h / 2 + (a.previousDataSeriesCount + m) * h << 0;
+ var r = a.axisX.reversed ? l - h << 0 : l + h << 0;
+ d > g && (b = d, d =
+ g, g = b);
+ b = e[f].color ? e[f].color : n._colorSet[f % n._colorSet.length];
+ M(c, d, l, g, r, b, 0, null, q, !1, !1, !1, n.fillOpacity);
+ b = n.dataPointIds[f];
+ this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: p, dataPointIndex: f, x1: d, y1: l, x2: g, y2: r };
+ b = F(b);
+ t && M(this._eventManager.ghostCtx, d, l, g, r, b, 0, null, !1, !1, !1, !1);
+ if (e[f].indexLabel || n.indexLabel || e[f].indexLabelFormatter || n.indexLabelFormatter) this._indexLabels.push({
+ chartType: "rangeBar",
+ dataPoint: e[f],
+ dataSeries: n,
+ indexKeyword: 0,
+ point: {
+ x: e[f].y[1] >=
+ e[f].y[0] ? d : g,
+ y: l + (r - l) / 2
+ },
+ direction: e[f].y[1] >= e[f].y[0] ? -1 : 1,
+ bounds: { x1: Math.min(d, g), y1: l, x2: Math.max(d, g), y2: r },
+ color: b
+ }), this._indexLabels.push({ chartType: "rangeBar", dataPoint: e[f], dataSeries: n, indexKeyword: 1, point: { x: e[f].y[1] >= e[f].y[0] ? g : d, y: l + (r - l) / 2 }, direction: e[f].y[1] >= e[f].y[0] ? 1 : -1, bounds: { x1: Math.min(d, g), y1: l, x2: Math.max(d, g), y2: r }, color: b })
+ }
+ }
+ }
+ c.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return {
+ source: c,
+ dest: this.plotArea.ctx,
+ animationCallback: E.fadeInAnimation,
+ easingFunction: E.easing.easeInQuad,
+ animationBase: 0
+ }
+ }
+ };
+ B.prototype.renderRangeArea = function(a) {
+ function c() {
+ if (w) {
+ var a = null;
+ 0 < h.lineThickness && b.stroke();
+ for (var c = l.length - 1; 0 <= c; c--) a = l[c], b.lineTo(a.x, a.y), d.lineTo(a.x, a.y);
+ b.closePath();
+ b.globalAlpha = h.fillOpacity;
+ b.fill();
+ b.globalAlpha = 1;
+ d.fill();
+ if (0 < h.lineThickness) {
+ b.beginPath();
+ b.moveTo(a.x, a.y);
+ for (c = 0; c < l.length; c++) a = l[c], b.lineTo(a.x, a.y);
+ b.stroke()
+ }
+ b.beginPath();
+ b.moveTo(e, q);
+ d.beginPath();
+ d.moveTo(e, q);
+ w = { x: e, y: q };
+ l = [];
+ l.push({ x: e, y: r })
+ }
+ }
+ var b = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var d = this._eventManager.ghostCtx,
+ f = [],
+ g = this.plotArea;
+ b.save();
+ t && d.save();
+ b.beginPath();
+ b.rect(g.x1, g.y1, g.width, g.height);
+ b.clip();
+ t && (d.beginPath(), d.rect(g.x1, g.y1, g.width, g.height), d.clip());
+ for (g = 0; g < a.dataSeriesIndexes.length; g++) {
+ var l = [],
+ k = a.dataSeriesIndexes[g],
+ h = this.data[k],
+ m = h.dataPoints,
+ f = h.id;
+ this._eventManager.objectMap[f] = { objectType: "dataSeries", dataSeriesIndex: k };
+ f = F(f);
+ d.fillStyle = f;
+ var f = [],
+ p = !0,
+ n = 0,
+ e, q, r, s, w = null;
+ if (0 < m.length) {
+ var u = h._colorSet[n %
+ h._colorSet.length],
+ y = h.lineColor = h.options.lineColor || u,
+ x = y;
+ b.fillStyle = u;
+ b.strokeStyle = y;
+ b.lineWidth = h.lineThickness;
+ var v = "solid";
+ if (b.setLineDash) {
+ var z = G(h.nullDataLineDashType, h.lineThickness),
+ v = h.lineDashType,
+ A = G(v, h.lineThickness);
+ b.setLineDash(A)
+ }
+ for (var B = !0; n < m.length; n++)
+ if (s = m[n].x.getTime ? m[n].x.getTime() : m[n].x, !(s < a.axisX.dataInfo.viewPortMin || s > a.axisX.dataInfo.viewPortMax && (!h.connectNullData || !B)))
+ if (null !== m[n].y && m[n].y.length && "number" === typeof m[n].y[0] && "number" === typeof m[n].y[1]) {
+ e =
+ a.axisX.convertValueToPixel(s);
+ q = a.axisY.convertValueToPixel(m[n].y[0]);
+ r = a.axisY.convertValueToPixel(m[n].y[1]);
+ p || B ? (h.connectNullData && !p ? (b.setLineDash && (h.options.nullDataLineDashType || v === h.lineDashType && h.lineDashType !== h.nullDataLineDashType) && (l[l.length - 1].newLineDashArray = A, v = h.nullDataLineDashType, b.setLineDash(z)), b.lineTo(e, q), t && d.lineTo(e, q), l.push({ x: e, y: r })) : (b.beginPath(), b.moveTo(e, q), w = { x: e, y: q }, l = [], l.push({ x: e, y: r }), t && (d.beginPath(), d.moveTo(e, q))), B = p = !1) : (b.lineTo(e, q), l.push({
+ x: e,
+ y: r
+ }), t && d.lineTo(e, q), 0 == n % 250 && c());
+ s = h.dataPointIds[n];
+ this._eventManager.objectMap[s] = { id: s, objectType: "dataPoint", dataSeriesIndex: k, dataPointIndex: n, x1: e, y1: q, y2: r };
+ n < m.length - 1 && (x !== (m[n].lineColor || y) || v !== (m[n].lineDashType || h.lineDashType)) && (c(), x = m[n].lineColor || y, l[l.length - 1].newStrokeStyle = x, b.strokeStyle = x, b.setLineDash && (m[n].lineDashType ? (v = m[n].lineDashType, l[l.length - 1].newLineDashArray = G(v, h.lineThickness), b.setLineDash(l[l.length - 1].newLineDashArray)) : (v = h.lineDashType, l[l.length -
+ 1].newLineDashArray = A, b.setLineDash(A))));
+ if (0 !== m[n].markerSize && (0 < m[n].markerSize || 0 < h.markerSize)) {
+ var C = h.getMarkerProperties(n, e, r, b);
+ f.push(C);
+ var V = F(s);
+ t && f.push({ x: e, y: r, ctx: d, type: C.type, size: C.size, color: V, borderColor: V, borderThickness: C.borderThickness });
+ C = h.getMarkerProperties(n, e, q, b);
+ f.push(C);
+ V = F(s);
+ t && f.push({ x: e, y: q, ctx: d, type: C.type, size: C.size, color: V, borderColor: V, borderThickness: C.borderThickness })
+ }
+ if (m[n].indexLabel || h.indexLabel || m[n].indexLabelFormatter || h.indexLabelFormatter) this._indexLabels.push({
+ chartType: "rangeArea",
+ dataPoint: m[n],
+ dataSeries: h,
+ indexKeyword: 0,
+ point: { x: e, y: q },
+ direction: m[n].y[0] > m[n].y[1] === a.axisY.reversed ? -1 : 1,
+ color: u
+ }), this._indexLabels.push({ chartType: "rangeArea", dataPoint: m[n], dataSeries: h, indexKeyword: 1, point: { x: e, y: r }, direction: m[n].y[0] > m[n].y[1] === a.axisY.reversed ? 1 : -1, color: u })
+ } else B || p || c(), B = !0;
+ c();
+ N.drawMarkers(f)
+ }
+ }
+ b.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return { source: b, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 }
+ }
+ };
+ B.prototype.renderRangeSplineArea = function(a) {
+ function c(a, c) {
+ var e = ua(q, 2);
+ if (0 < e.length) {
+ if (0 < k.lineThickness) {
+ b.strokeStyle = c;
+ b.setLineDash && b.setLineDash(a);
+ b.beginPath();
+ b.moveTo(e[0].x, e[0].y);
+ for (var f = 0; f < e.length - 3; f += 3) {
+ if (e[f].newStrokeStyle || e[f].newLineDashArray) b.stroke(), b.beginPath(), b.moveTo(e[f].x, e[f].y), e[f].newStrokeStyle && (b.strokeStyle = e[f].newStrokeStyle), e[f].newLineDashArray && b.setLineDash(e[f].newLineDashArray);
+ b.bezierCurveTo(e[f + 1].x, e[f + 1].y, e[f + 2].x, e[f + 2].y, e[f + 3].x,
+ e[f + 3].y)
+ }
+ b.stroke()
+ }
+ b.beginPath();
+ b.moveTo(e[0].x, e[0].y);
+ t && (d.beginPath(), d.moveTo(e[0].x, e[0].y));
+ for (f = 0; f < e.length - 3; f += 3) b.bezierCurveTo(e[f + 1].x, e[f + 1].y, e[f + 2].x, e[f + 2].y, e[f + 3].x, e[f + 3].y), t && d.bezierCurveTo(e[f + 1].x, e[f + 1].y, e[f + 2].x, e[f + 2].y, e[f + 3].x, e[f + 3].y);
+ e = ua(r, 2);
+ b.lineTo(r[r.length - 1].x, r[r.length - 1].y);
+ for (f = e.length - 1; 2 < f; f -= 3) b.bezierCurveTo(e[f - 1].x, e[f - 1].y, e[f - 2].x, e[f - 2].y, e[f - 3].x, e[f - 3].y), t && d.bezierCurveTo(e[f - 1].x, e[f - 1].y, e[f - 2].x, e[f - 2].y, e[f - 3].x, e[f - 3].y);
+ b.closePath();
+ b.globalAlpha = k.fillOpacity;
+ b.fill();
+ t && (d.closePath(), d.fill());
+ b.globalAlpha = 1;
+ if (0 < k.lineThickness) {
+ b.strokeStyle = c;
+ b.setLineDash && b.setLineDash(a);
+ b.beginPath();
+ b.moveTo(e[0].x, e[0].y);
+ for (var g = f = 0; f < e.length - 3; f += 3, g++) {
+ if (q[g].newStrokeStyle || q[g].newLineDashArray) b.stroke(), b.beginPath(), b.moveTo(e[f].x, e[f].y), q[g].newStrokeStyle && (b.strokeStyle = q[g].newStrokeStyle), q[g].newLineDashArray && b.setLineDash(q[g].newLineDashArray);
+ b.bezierCurveTo(e[f + 1].x, e[f + 1].y, e[f + 2].x, e[f + 2].y, e[f + 3].x, e[f +
+ 3].y)
+ }
+ b.stroke()
+ }
+ b.beginPath()
+ }
+ }
+ var b = a.targetCanvasCtx || this.plotArea.ctx;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var d = this._eventManager.ghostCtx,
+ f = [],
+ g = this.plotArea;
+ b.save();
+ t && d.save();
+ b.beginPath();
+ b.rect(g.x1, g.y1, g.width, g.height);
+ b.clip();
+ t && (d.beginPath(), d.rect(g.x1, g.y1, g.width, g.height), d.clip());
+ for (g = 0; g < a.dataSeriesIndexes.length; g++) {
+ var l = a.dataSeriesIndexes[g],
+ k = this.data[l],
+ h = k.dataPoints,
+ f = k.id;
+ this._eventManager.objectMap[f] = { objectType: "dataSeries", dataSeriesIndex: l };
+ f = F(f);
+ d.fillStyle =
+ f;
+ var f = [],
+ m = 0,
+ p, n, e, q = [],
+ r = [];
+ if (0 < h.length) {
+ var s = k._colorSet[m % k._colorSet.length],
+ w = k.lineColor = k.options.lineColor || s,
+ u = w;
+ b.fillStyle = s;
+ b.lineWidth = k.lineThickness;
+ var y = "solid",
+ x;
+ if (b.setLineDash) {
+ var v = G(k.nullDataLineDashType, k.lineThickness),
+ y = k.lineDashType;
+ x = G(y, k.lineThickness)
+ }
+ for (n = !1; m < h.length; m++)
+ if (p = h[m].x.getTime ? h[m].x.getTime() : h[m].x, !(p < a.axisX.dataInfo.viewPortMin || p > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !n)))
+ if (null !== h[m].y && h[m].y.length && "number" === typeof h[m].y[0] &&
+ "number" === typeof h[m].y[1]) {
+ p = a.axisX.convertValueToPixel(p);
+ n = a.axisY.convertValueToPixel(h[m].y[0]);
+ e = a.axisY.convertValueToPixel(h[m].y[1]);
+ var z = k.dataPointIds[m];
+ this._eventManager.objectMap[z] = { id: z, objectType: "dataPoint", dataSeriesIndex: l, dataPointIndex: m, x1: p, y1: n, y2: e };
+ q[q.length] = { x: p, y: n };
+ r[r.length] = { x: p, y: e };
+ m < h.length - 1 && (u !== (h[m].lineColor || w) || y !== (h[m].lineDashType || k.lineDashType)) && (u = h[m].lineColor || w, q[q.length - 1].newStrokeStyle = u, b.setLineDash && (h[m].lineDashType ? (y = h[m].lineDashType,
+ q[q.length - 1].newLineDashArray = G(y, k.lineThickness)) : (y = k.lineDashType, q[q.length - 1].newLineDashArray = x)));
+ if (0 !== h[m].markerSize && (0 < h[m].markerSize || 0 < k.markerSize)) {
+ var A = k.getMarkerProperties(m, p, n, b);
+ f.push(A);
+ var B = F(z);
+ t && f.push({ x: p, y: n, ctx: d, type: A.type, size: A.size, color: B, borderColor: B, borderThickness: A.borderThickness });
+ A = k.getMarkerProperties(m, p, e, b);
+ f.push(A);
+ B = F(z);
+ t && f.push({ x: p, y: e, ctx: d, type: A.type, size: A.size, color: B, borderColor: B, borderThickness: A.borderThickness })
+ }
+ if (h[m].indexLabel ||
+ k.indexLabel || h[m].indexLabelFormatter || k.indexLabelFormatter) this._indexLabels.push({ chartType: "rangeSplineArea", dataPoint: h[m], dataSeries: k, indexKeyword: 0, point: { x: p, y: n }, direction: h[m].y[0] <= h[m].y[1] ? -1 : 1, color: s }), this._indexLabels.push({ chartType: "rangeSplineArea", dataPoint: h[m], dataSeries: k, indexKeyword: 1, point: { x: p, y: e }, direction: h[m].y[0] <= h[m].y[1] ? 1 : -1, color: s });
+ n = !1
+ } else 0 < m && !n && (k.connectNullData ? b.setLineDash && (0 < q.length && (k.options.nullDataLineDashType || !h[m - 1].lineDashType)) && (q[q.length -
+ 1].newLineDashArray = v, y = k.nullDataLineDashType) : (c(x, w), q = [], r = [])), n = !0;
+ c(x, w);
+ N.drawMarkers(f)
+ }
+ }
+ b.restore();
+ t && this._eventManager.ghostCtx.restore();
+ return { source: b, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 }
+ }
+ };
+ var Ga = function(a, c, b, d, f, g, l, k, h) {
+ if (!(0 > b)) {
+ "undefined" === typeof k && (k = 1);
+ if (!t) {
+ var m = Number((l % (2 * Math.PI)).toFixed(8));
+ Number((g % (2 * Math.PI)).toFixed(8)) === m && (l -= 1E-4)
+ }
+ a.save();
+ a.globalAlpha = k;
+ "pie" === f ? (a.beginPath(), a.moveTo(c.x,
+ c.y), a.arc(c.x, c.y, b, g, l, !1), a.fillStyle = d, a.strokeStyle = "white", a.lineWidth = 2, a.closePath(), a.fill()) : "doughnut" === f && (a.beginPath(), a.arc(c.x, c.y, b, g, l, !1), 0 <= h && a.arc(c.x, c.y, h * b, l, g, !0), a.closePath(), a.fillStyle = d, a.strokeStyle = "white", a.lineWidth = 2, a.fill());
+ a.globalAlpha = 1;
+ a.restore()
+ }
+ };
+ B.prototype.renderPie = function(a) {
+ function c() {
+ if (m && p) {
+ for (var a = 0, b = 0, c = 0, d = 0, f = 0; f < p.length; f++) {
+ var g = p[f],
+ k = m.dataPointIds[f],
+ l = { id: k, objectType: "dataPoint", dataPointIndex: f, dataSeriesIndex: 0 };
+ q.push(l);
+ var n = { percent: null, total: null },
+ r = null,
+ n = h.getPercentAndTotal(m, g);
+ if (m.indexLabelFormatter || g.indexLabelFormatter) r = { chart: h.options, dataSeries: m, dataPoint: g, total: n.total, percent: n.percent };
+ n = g.indexLabelFormatter ? g.indexLabelFormatter(r) : g.indexLabel ? h.replaceKeywordsWithValue(g.indexLabel, g, m, f) : m.indexLabelFormatter ? m.indexLabelFormatter(r) : m.indexLabel ? h.replaceKeywordsWithValue(m.indexLabel, g, m, f) : g.label ? g.label : "";
+ h._eventManager.objectMap[k] = l;
+ l.center = { x: x.x, y: x.y };
+ l.y = g.y;
+ l.radius = C;
+ l.percentInnerRadius =
+ F;
+ l.indexLabelText = n;
+ l.indexLabelPlacement = m.indexLabelPlacement;
+ l.indexLabelLineColor = g.indexLabelLineColor ? g.indexLabelLineColor : m.options.indexLabelLineColor ? m.options.indexLabelLineColor : g.color ? g.color : m._colorSet[f % m._colorSet.length];
+ l.indexLabelLineThickness = z(g.indexLabelLineThickness) ? m.indexLabelLineThickness : g.indexLabelLineThickness;
+ l.indexLabelLineDashType = g.indexLabelLineDashType ? g.indexLabelLineDashType : m.indexLabelLineDashType;
+ l.indexLabelFontColor = g.indexLabelFontColor ? g.indexLabelFontColor :
+ m.indexLabelFontColor;
+ l.indexLabelFontStyle = g.indexLabelFontStyle ? g.indexLabelFontStyle : m.indexLabelFontStyle;
+ l.indexLabelFontWeight = g.indexLabelFontWeight ? g.indexLabelFontWeight : m.indexLabelFontWeight;
+ l.indexLabelFontSize = z(g.indexLabelFontSize) ? m.indexLabelFontSize : g.indexLabelFontSize;
+ l.indexLabelFontFamily = g.indexLabelFontFamily ? g.indexLabelFontFamily : m.indexLabelFontFamily;
+ l.indexLabelBackgroundColor = g.indexLabelBackgroundColor ? g.indexLabelBackgroundColor : m.options.indexLabelBackgroundColor ?
+ m.options.indexLabelBackgroundColor : m.indexLabelBackgroundColor;
+ l.indexLabelMaxWidth = g.indexLabelMaxWidth ? g.indexLabelMaxWidth : m.indexLabelMaxWidth ? m.indexLabelMaxWidth : 0.33 * e.width;
+ l.indexLabelWrap = "undefined" !== typeof g.indexLabelWrap ? g.indexLabelWrap : m.indexLabelWrap;
+ l.startAngle = 0 === f ? m.startAngle ? m.startAngle / 180 * Math.PI : 0 : q[f - 1].endAngle;
+ l.startAngle = (l.startAngle + 2 * Math.PI) % (2 * Math.PI);
+ l.endAngle = l.startAngle + 2 * Math.PI / t * Math.abs(g.y);
+ g = (l.endAngle + l.startAngle) / 2;
+ g = (g + 2 * Math.PI) % (2 * Math.PI);
+ l.midAngle = g;
+ if (l.midAngle > Math.PI / 2 - u && l.midAngle < Math.PI / 2 + u) {
+ if (0 === a || q[c].midAngle > l.midAngle) c = f;
+ a++
+ } else if (l.midAngle > 3 * Math.PI / 2 - u && l.midAngle < 3 * Math.PI / 2 + u) {
+ if (0 === b || q[d].midAngle > l.midAngle) d = f;
+ b++
+ }
+ l.hemisphere = g > Math.PI / 2 && g <= 3 * Math.PI / 2 ? "left" : "right";
+ l.indexLabelTextBlock = new U(h.plotArea.ctx, {
+ fontSize: l.indexLabelFontSize,
+ fontFamily: l.indexLabelFontFamily,
+ fontColor: l.indexLabelFontColor,
+ fontStyle: l.indexLabelFontStyle,
+ fontWeight: l.indexLabelFontWeight,
+ horizontalAlign: "left",
+ backgroundColor: l.indexLabelBackgroundColor,
+ maxWidth: l.indexLabelMaxWidth,
+ maxHeight: l.indexLabelWrap ? 5 * l.indexLabelFontSize : 1.5 * l.indexLabelFontSize,
+ text: l.indexLabelText,
+ padding: 0,
+ textBaseline: "top"
+ });
+ l.indexLabelTextBlock.measureText()
+ }
+ k = g = 0;
+ n = !1;
+ for (f = 0; f < p.length; f++) l = q[(c + f) % p.length], 1 < a && (l.midAngle > Math.PI / 2 - u && l.midAngle < Math.PI / 2 + u) && (g <= a / 2 && !n ? (l.hemisphere = "right", g++) : (l.hemisphere = "left", n = !0));
+ n = !1;
+ for (f = 0; f < p.length; f++) l = q[(d + f) % p.length], 1 < b && (l.midAngle > 3 * Math.PI / 2 - u && l.midAngle < 3 * Math.PI / 2 + u) && (k <= b / 2 && !n ? (l.hemisphere =
+ "left", k++) : (l.hemisphere = "right", n = !0))
+ }
+ }
+
+ function b(a) {
+ var b = h.plotArea.ctx;
+ b.clearRect(e.x1, e.y1, e.width, e.height);
+ b.fillStyle = h.backgroundColor;
+ b.fillRect(e.x1, e.y1, e.width, e.height);
+ for (b = 0; b < p.length; b++) {
+ var c = q[b].startAngle,
+ d = q[b].endAngle;
+ if (d > c) {
+ var f = 0.07 * C * Math.cos(q[b].midAngle),
+ g = 0.07 * C * Math.sin(q[b].midAngle),
+ k = !1;
+ if (p[b].exploded) { if (1E-9 < Math.abs(q[b].center.x - (x.x + f)) || 1E-9 < Math.abs(q[b].center.y - (x.y + g))) q[b].center.x = x.x + f * a, q[b].center.y = x.y + g * a, k = !0 } else if (0 < Math.abs(q[b].center.x -
+ x.x) || 0 < Math.abs(q[b].center.y - x.y)) q[b].center.x = x.x + f * (1 - a), q[b].center.y = x.y + g * (1 - a), k = !0;
+ k && (f = {}, f.dataSeries = m, f.dataPoint = m.dataPoints[b], f.index = b, h.toolTip.highlightObjects([f]));
+ Ga(h.plotArea.ctx, q[b].center, q[b].radius, p[b].color ? p[b].color : m._colorSet[b % m._colorSet.length], m.type, c, d, m.fillOpacity, q[b].percentInnerRadius)
+ }
+ }
+ a = h.plotArea.ctx;
+ a.save();
+ a.fillStyle = "black";
+ a.strokeStyle = "grey";
+ a.textBaseline = "middle";
+ a.lineJoin = "round";
+ for (b = b = 0; b < p.length; b++) c = q[b], c.indexLabelText && (c.indexLabelTextBlock.y -=
+ c.indexLabelTextBlock.height / 2, d = 0, d = "left" === c.hemisphere ? "inside" !== m.indexLabelPlacement ? -(c.indexLabelTextBlock.width + n) : -c.indexLabelTextBlock.width / 2 : "inside" !== m.indexLabelPlacement ? n : -c.indexLabelTextBlock.width / 2, c.indexLabelTextBlock.x += d, c.indexLabelTextBlock.render(!0), c.indexLabelTextBlock.x -= d, c.indexLabelTextBlock.y += c.indexLabelTextBlock.height / 2, "inside" !== c.indexLabelPlacement && 0 < c.indexLabelLineThickness && (d = c.center.x + C * Math.cos(c.midAngle), f = c.center.y + C * Math.sin(c.midAngle),
+ a.strokeStyle = c.indexLabelLineColor, a.lineWidth = c.indexLabelLineThickness, a.setLineDash && a.setLineDash(G(c.indexLabelLineDashType, c.indexLabelLineThickness)), a.beginPath(), a.moveTo(d, f), a.lineTo(c.indexLabelTextBlock.x, c.indexLabelTextBlock.y), a.lineTo(c.indexLabelTextBlock.x + ("left" === c.hemisphere ? -n : n), c.indexLabelTextBlock.y), a.stroke()), a.lineJoin = "miter");
+ a.save()
+ }
+
+ function d(a, b) {
+ var c = 0,
+ c = a.indexLabelTextBlock.y - a.indexLabelTextBlock.height / 2,
+ d = a.indexLabelTextBlock.y + a.indexLabelTextBlock.height /
+ 2,
+ e = b.indexLabelTextBlock.y - b.indexLabelTextBlock.height / 2,
+ f = b.indexLabelTextBlock.y + b.indexLabelTextBlock.height / 2;
+ return c = b.indexLabelTextBlock.y > a.indexLabelTextBlock.y ? e - d : c - f
+ }
+
+ function f(a) {
+ for (var b = null, c = 1; c < p.length; c++)
+ if (b = (a + c + q.length) % q.length, q[b].hemisphere !== q[a].hemisphere) { b = null; break } else if (q[b].indexLabelText && b !== a && (0 > d(q[b], q[a]) || ("right" === q[a].hemisphere ? q[b].indexLabelTextBlock.y >= q[a].indexLabelTextBlock.y : q[b].indexLabelTextBlock.y <= q[a].indexLabelTextBlock.y))) break;
+ else b = null;
+ return b
+ }
+
+ function g(a, b, c) {
+ c = (c || 0) + 1;
+ if (1E3 < c) return 0;
+ b = b || 0;
+ var e = 0,
+ h = x.y - 1 * s,
+ m = x.y + 1 * s;
+ if (0 <= a && a < p.length) {
+ var k = q[a];
+ if (0 > b && k.indexLabelTextBlock.y < h || 0 < b && k.indexLabelTextBlock.y > m) return 0;
+ var l = 0,
+ n = 0,
+ n = l = l = 0;
+ 0 > b ? k.indexLabelTextBlock.y - k.indexLabelTextBlock.height / 2 > h && k.indexLabelTextBlock.y - k.indexLabelTextBlock.height / 2 + b < h && (b = -(h - (k.indexLabelTextBlock.y - k.indexLabelTextBlock.height / 2 + b))) : k.indexLabelTextBlock.y + k.indexLabelTextBlock.height / 2 < h && k.indexLabelTextBlock.y +
+ k.indexLabelTextBlock.height / 2 + b > m && (b = k.indexLabelTextBlock.y + k.indexLabelTextBlock.height / 2 + b - m);
+ b = k.indexLabelTextBlock.y + b;
+ h = 0;
+ h = "right" === k.hemisphere ? x.x + Math.sqrt(Math.pow(s, 2) - Math.pow(b - x.y, 2)) : x.x - Math.sqrt(Math.pow(s, 2) - Math.pow(b - x.y, 2));
+ n = x.x + C * Math.cos(k.midAngle);
+ l = x.y + C * Math.sin(k.midAngle);
+ l = Math.sqrt(Math.pow(h - n, 2) + Math.pow(b - l, 2));
+ n = Math.acos(C / s);
+ l = Math.acos((s * s + C * C - l * l) / (2 * C * s));
+ b = l < n ? b - k.indexLabelTextBlock.y : 0;
+ h = null;
+ for (m = 1; m < p.length; m++)
+ if (h = (a - m + q.length) % q.length, q[h].hemisphere !==
+ q[a].hemisphere) { h = null; break } else if (q[h].indexLabelText && q[h].hemisphere === q[a].hemisphere && h !== a && (0 > d(q[h], q[a]) || ("right" === q[a].hemisphere ? q[h].indexLabelTextBlock.y <= q[a].indexLabelTextBlock.y : q[h].indexLabelTextBlock.y >= q[a].indexLabelTextBlock.y))) break;
+ else h = null;
+ n = h;
+ l = f(a);
+ m = h = 0;
+ 0 > b ? (m = "right" === k.hemisphere ? n : l, e = b, null !== m && (n = -b, b = k.indexLabelTextBlock.y - k.indexLabelTextBlock.height / 2 - (q[m].indexLabelTextBlock.y + q[m].indexLabelTextBlock.height / 2), b - n < r && (h = -n, m = g(m, h, c + 1), +m.toFixed(y) >
+ +h.toFixed(y) && (e = b > r ? -(b - r) : -(n - (m - h)))))) : 0 < b && (m = "right" === k.hemisphere ? l : n, e = b, null !== m && (n = b, b = q[m].indexLabelTextBlock.y - q[m].indexLabelTextBlock.height / 2 - (k.indexLabelTextBlock.y + k.indexLabelTextBlock.height / 2), b - n < r && (h = n, m = g(m, h, c + 1), +m.toFixed(y) < +h.toFixed(y) && (e = b > r ? b - r : n - (h - m)))));
+ e && (c = k.indexLabelTextBlock.y + e, b = 0, b = "right" === k.hemisphere ? x.x + Math.sqrt(Math.pow(s, 2) - Math.pow(c - x.y, 2)) : x.x - Math.sqrt(Math.pow(s, 2) - Math.pow(c - x.y, 2)), k.midAngle > Math.PI / 2 - u && k.midAngle < Math.PI / 2 + u ? (h = (a -
+ 1 + q.length) % q.length, h = q[h], a = q[(a + 1 + q.length) % q.length], "left" === k.hemisphere && "right" === h.hemisphere && b > h.indexLabelTextBlock.x ? b = h.indexLabelTextBlock.x - 15 : "right" === k.hemisphere && ("left" === a.hemisphere && b < a.indexLabelTextBlock.x) && (b = a.indexLabelTextBlock.x + 15)) : k.midAngle > 3 * Math.PI / 2 - u && k.midAngle < 3 * Math.PI / 2 + u && (h = (a - 1 + q.length) % q.length, h = q[h], a = q[(a + 1 + q.length) % q.length], "right" === k.hemisphere && "left" === h.hemisphere && b < h.indexLabelTextBlock.x ? b = h.indexLabelTextBlock.x + 15 : "left" === k.hemisphere &&
+ ("right" === a.hemisphere && b > a.indexLabelTextBlock.x) && (b = a.indexLabelTextBlock.x - 15)), k.indexLabelTextBlock.y = c, k.indexLabelTextBlock.x = b, k.indexLabelAngle = Math.atan2(k.indexLabelTextBlock.y - x.y, k.indexLabelTextBlock.x - x.x))
+ }
+ return e
+ }
+
+ function l() {
+ var a = h.plotArea.ctx;
+ a.fillStyle = "grey";
+ a.strokeStyle = "grey";
+ a.font = "16px Arial";
+ a.textBaseline = "middle";
+ for (var b = a = 0, c = 0, k = !0, b = 0; 10 > b && (1 > b || 0 < c); b++) {
+ if (m.radius || !m.radius && "undefined" !== typeof m.innerRadius && null !== m.innerRadius && C - c <= E) k = !1;
+ k && (C -=
+ c);
+ c = 0;
+ if ("inside" !== m.indexLabelPlacement) {
+ s = C * w;
+ for (a = 0; a < p.length; a++) {
+ var l = q[a];
+ l.indexLabelTextBlock.x = x.x + s * Math.cos(l.midAngle);
+ l.indexLabelTextBlock.y = x.y + s * Math.sin(l.midAngle);
+ l.indexLabelAngle = l.midAngle;
+ l.radius = C;
+ l.percentInnerRadius = F
+ }
+ for (var u, t, a = 0; a < p.length; a++) {
+ var l = q[a],
+ v = f(a);
+ if (null !== v) {
+ u = q[a];
+ t = q[v];
+ var z = 0,
+ z = d(u, t) - r;
+ if (0 > z) {
+ for (var A = t = 0, B = 0; B < p.length; B++) B !== a && q[B].hemisphere === l.hemisphere && (q[B].indexLabelTextBlock.y < l.indexLabelTextBlock.y ? t++ : A++);
+ t = z / (t + A || 1) * A;
+ var A = -1 * (z - t),
+ D = B = 0;
+ "right" === l.hemisphere ? (B = g(a, t), A = -1 * (z - B), D = g(v, A), +D.toFixed(y) < +A.toFixed(y) && +B.toFixed(y) <= +t.toFixed(y) && g(a, -(A - D))) : (B = g(v, t), A = -1 * (z - B), D = g(a, A), +D.toFixed(y) < +A.toFixed(y) && +B.toFixed(y) <= +t.toFixed(y) && g(v, -(A - D)))
+ }
+ }
+ }
+ } else
+ for (a = 0; a < p.length; a++) l = q[a], s = "pie" === m.type ? 0.7 * C : 0.8 * C, v = x.x + s * Math.cos(l.midAngle), t = x.y + s * Math.sin(l.midAngle), l.indexLabelTextBlock.x = v, l.indexLabelTextBlock.y = t;
+ for (a = 0; a < p.length; a++)
+ if (l = q[a], v = l.indexLabelTextBlock.measureText(), 0 !== v.height &&
+ 0 !== v.width) v = v = 0, "right" === l.hemisphere ? (v = e.x2 - (l.indexLabelTextBlock.x + l.indexLabelTextBlock.width + n), v *= -1) : v = e.x1 - (l.indexLabelTextBlock.x - l.indexLabelTextBlock.width - n), 0 < v && (!k && l.indexLabelText && (t = "right" === l.hemisphere ? e.x2 - l.indexLabelTextBlock.x : l.indexLabelTextBlock.x - e.x1, 0.3 * l.indexLabelTextBlock.maxWidth > t ? l.indexLabelText = "" : l.indexLabelTextBlock.maxWidth = 0.85 * t, 0.3 * l.indexLabelTextBlock.maxWidth < t && (l.indexLabelTextBlock.x -= "right" === l.hemisphere ? 2 : -2)), Math.abs(l.indexLabelTextBlock.y -
+ l.indexLabelTextBlock.height / 2 - x.y) < C || Math.abs(l.indexLabelTextBlock.y + l.indexLabelTextBlock.height / 2 - x.y) < C) && (v /= Math.abs(Math.cos(l.indexLabelAngle)), 9 < v && (v *= 0.3), v > c && (c = v)), v = v = 0, 0 < l.indexLabelAngle && l.indexLabelAngle < Math.PI ? (v = e.y2 - (l.indexLabelTextBlock.y + l.indexLabelTextBlock.height / 2 + 5), v *= -1) : v = e.y1 - (l.indexLabelTextBlock.y - l.indexLabelTextBlock.height / 2 - 5), 0 < v && (!k && l.indexLabelText && (t = 0 < l.indexLabelAngle && l.indexLabelAngle < Math.PI ? -1 : 1, 0 === g(a, v * t) && g(a, 2 * t)), Math.abs(l.indexLabelTextBlock.x -
+ x.x) < C && (v /= Math.abs(Math.sin(l.indexLabelAngle)), 9 < v && (v *= 0.3), v > c && (c = v)));
+ var G = function(a, b, c) {
+ for (var d = [], e = 0; d.push(q[b]), b !== c; b = (b + 1 + p.length) % p.length);
+ d.sort(function(a, b) { return a.y - b.y });
+ for (b = 0; b < d.length; b++)
+ if (c = d[b], e < 0.7 * a) e += c.indexLabelTextBlock.height, c.indexLabelTextBlock.text = "", c.indexLabelText = "", c.indexLabelTextBlock.measureText();
+ else break
+ };
+ (function() {
+ for (var a = -1, b = -1, c = 0, e = !1, g = 0; g < p.length; g++)
+ if (e = !1, u = q[g], u.indexLabelText) {
+ var h = f(g);
+ if (null !== h) {
+ var k = q[h];
+ z = 0;
+ z = d(u, k);
+ var l;
+ if (l = 0 > z) {
+ l = u.indexLabelTextBlock.x;
+ var m = u.indexLabelTextBlock.y - u.indexLabelTextBlock.height / 2,
+ r = u.indexLabelTextBlock.y + u.indexLabelTextBlock.height / 2,
+ s = k.indexLabelTextBlock.y - k.indexLabelTextBlock.height / 2,
+ w = k.indexLabelTextBlock.x + k.indexLabelTextBlock.width,
+ t = k.indexLabelTextBlock.y + k.indexLabelTextBlock.height / 2;
+ l = u.indexLabelTextBlock.x + u.indexLabelTextBlock.width < k.indexLabelTextBlock.x - n || l > w + n || m > t + n || r < s - n ? !1 : !0
+ }
+ l ? (0 > a && (a = g), h !== a && (b = h, c += -z), 0 === g % Math.max(p.length /
+ 10, 3) && (e = !0)) : e = !0;
+ e && (0 < c && 0 <= a && 0 <= b) && (G(c, a, b), b = a = -1, c = 0)
+ }
+ }
+ 0 < c && G(c, a, b)
+ })()
+ }
+ }
+
+ function k() {
+ h.plotArea.layoutManager.reset();
+ h.title && (h.title.dockInsidePlotArea || "center" === h.title.horizontalAlign && "center" === h.title.verticalAlign) && h.title.render();
+ if (h.subtitles)
+ for (var a = 0; a < h.subtitles.length; a++) {
+ var b = h.subtitles[a];
+ (b.dockInsidePlotArea || "center" === b.horizontalAlign && "center" === b.verticalAlign) && b.render()
+ }
+ h.legend && (h.legend.dockInsidePlotArea || "center" === h.legend.horizontalAlign && "center" ===
+ h.legend.verticalAlign) && h.legend.render();
+ A.fBWm && A.fBWm(h)
+ }
+ var h = this;
+ if (!(0 >= a.dataSeriesIndexes.length)) {
+ var m = this.data[a.dataSeriesIndexes[0]],
+ p = m.dataPoints,
+ n = 10,
+ e = this.plotArea,
+ q = [],
+ r = 2,
+ s, w = 1.3,
+ u = 20 / 180 * Math.PI,
+ y = 6,
+ x = { x: (e.x2 + e.x1) / 2, y: (e.y2 + e.y1) / 2 },
+ t = 0;
+ a = !1;
+ for (var B = 0; B < p.length; B++) t += Math.abs(p[B].y), !a && ("undefined" !== typeof p[B].indexLabel && null !== p[B].indexLabel && 0 < p[B].indexLabel.toString().length) && (a = !0), !a && ("undefined" !== typeof p[B].label && null !== p[B].label && 0 < p[B].label.toString().length) &&
+ (a = !0);
+ if (0 !== t) {
+ a = a || "undefined" !== typeof m.indexLabel && null !== m.indexLabel && 0 < m.indexLabel.toString().length;
+ var C = "inside" !== m.indexLabelPlacement && a ? 0.75 * Math.min(e.width, e.height) / 2 : 0.92 * Math.min(e.width, e.height) / 2;
+ m.radius && (C = Oa(m.radius, C));
+ var E = "undefined" !== typeof m.innerRadius && null !== m.innerRadius ? Oa(m.innerRadius, C) : 0.7 * C;
+ m.radius = C;
+ "doughnut" === m.type && (m.innerRadius = E);
+ var F = Math.min(E / C, (C - 1) / C);
+ this.pieDoughnutClickHandler = function(a) {
+ h.isAnimating || !z(a.dataSeries.explodeOnClick) &&
+ !a.dataSeries.explodeOnClick || (a = a.dataPoint, a.exploded = a.exploded ? !1 : !0, 1 < this.dataPoints.length && h._animator.animate(0, 500, function(a) {
+ b(a);
+ k()
+ }))
+ };
+ c();
+ l();
+ l();
+ l();
+ l();
+ this.disableToolTip = !0;
+ this._animator.animate(0, this.animatedRender ? this.animationDuration : 0, function(a) {
+ var b = h.plotArea.ctx;
+ b.clearRect(e.x1, e.y1, e.width, e.height);
+ b.fillStyle = h.backgroundColor;
+ b.fillRect(e.x1, e.y1, e.width, e.height);
+ a = q[0].startAngle + 2 * Math.PI * a;
+ for (b = 0; b < p.length; b++) {
+ var c = 0 === b ? q[b].startAngle : d,
+ d = c + (q[b].endAngle -
+ q[b].startAngle),
+ f = !1;
+ d > a && (d = a, f = !0);
+ var g = p[b].color ? p[b].color : m._colorSet[b % m._colorSet.length];
+ d > c && Ga(h.plotArea.ctx, q[b].center, q[b].radius, g, m.type, c, d, m.fillOpacity, q[b].percentInnerRadius);
+ if (f) break
+ }
+ k()
+ }, function() {
+ h.disableToolTip = !1;
+ h._animator.animate(0, h.animatedRender ? 500 : 0, function(a) {
+ b(a);
+ k()
+ })
+ })
+ }
+ }
+ };
+ B.prototype.animationRequestId = null;
+ B.prototype.requestAnimFrame = function() {
+ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame ||
+ window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(a) { window.setTimeout(a, 1E3 / 60) }
+ }();
+ B.prototype.cancelRequestAnimFrame = window.cancelAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout;
+ B.prototype.set = function(a, c, b) { b = "undefined" === typeof b ? !0 : b; "options" === a ? (this.options = c, b && this.render()) : B.base.set.call(this, a, c, b) };
+ B.prototype.exportChart =
+ function(a) {
+ a = "undefined" === typeof a ? {} : a;
+ var c = a.format ? a.format : "png",
+ b = a.fileName ? a.fileName : this.exportFileName;
+ if (a.toDataURL) return this.canvas.toDataURL("image/" + c);
+ Ba(this.canvas, c, b)
+ };
+ B.prototype.print = function() {
+ var a = this.exportChart({ toDataURL: !0 }),
+ c = document.createElement("iframe");
+ c.setAttribute("class", "canvasjs-chart-print-frame");
+ c.setAttribute("style", "position:absolute; width:100%; border: 0px; margin: 0px 0px 0px 0px; padding 0px 0px 0px 0px;");
+ c.style.height = this.height + "px";
+ this._canvasJSContainer.appendChild(c);
+ var b = this,
+ d = c.contentWindow || c.contentDocument.document || c.contentDocument;
+ d.document.open();
+ d.document.write('\n
