1/* 2 CanvasJS HTML5 & JavaScript Charts - v1.9.10 GA - https://canvasjs.com/ 3 Copyright 2017 fenopix 4 5 --------------------- License Information -------------------- 6 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. 7 https://canvasjs.com/license-canvasjs/ 8 9HELLO 10*/ 11(function () { 12 function S(a, c) { a.prototype = Ra(c.prototype); a.prototype.constructor = a; a.base = c.prototype } function Ra(a) { function c() { } c.prototype = a; return new c } function Ia(a, c, b) { 13 "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() + 14 1 * c); return a 15 } function P(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 ma(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 Ja(a) { 16 a.roundRect = function (a, b, d, f, g, l, k, h) { 17 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); 18 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() 19 } 20 } function Aa(a, c) { return a - c } function Ka(a, c) { return a.x - c.x } function D(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 Sa(a, c) { 21 var b = this.length >>> 0, d = Number(c) || 22 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 23 } function y(a) { return null === a || "undefined" === typeof a } function sa(a) { a.indexOf || (a.indexOf = Sa); return a } function La(a, c, b) { 24 b = b || "normal"; var d = a + "_" + c + "_" + b, f = Ma[d]; if (isNaN(f)) { 25 try { 26 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 (!ca) { 27 var g = document.body; ca = document.createElement("span"); 28 ca.innerHTML = ""; var l = document.createTextNode("Mpgyi"); ca.appendChild(l); g.appendChild(ca) 29 } ca.style.display = ""; ca.setAttribute("style", a); f = Math.round(ca.offsetHeight); ca.style.display = "none" 30 } catch (k) { f = Math.ceil(1.1 * c) } f = Math.max(f, c); Ma[d] = f 31 } return f 32 } function F(a, c) { 33 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 = 34 0; d < b.length; d++) b[d] *= c; else b = []; return b 35 } function K(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 Na(a, c, b) { 36 a *= L; c *= L; 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 | 37 a[1] << 8 | a[2] : 0 38 } function M(a, c, b) { return a in c ? c[a] : b[a] } function ta(a, c, b) { if (t && Oa) { var d = a.getContext("2d"); ua = d.webkitBackingStorePixelRatio || d.mozBackingStorePixelRatio || d.msBackingStorePixelRatio || d.oBackingStorePixelRatio || d.backingStorePixelRatio || 1; L = Ba / ua; a.width = c * L; a.height = b * L; Ba !== ua && (a.style.width = c + "px", a.style.height = b + "px", d.scale(L, L)) } else a.width = c, a.height = b } function Ta(a) { 39 if (!Ua) { 40 var c = !1, b = !1; "undefined" === typeof ga.Chart.creditHref ? (a.creditHref = "https://canvasjs.com/", a.creditText = 41 "CanvasJS.com") : (c = a.updateOption("creditText"), b = a.updateOption("creditHref")); if (a.creditHref && a.creditText) { 42 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", 43 -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) 44 } 45 } 46 } function ha(a, c) { 47 var b = document.createElement("canvas"); b.setAttribute("class", "canvasjs-chart-canvas"); 48 ta(b, a, c); t || "undefined" === typeof G_vmlCanvasManager || G_vmlCanvasManager.initElement(b); return b 49 } function Ca(a, c, b) { 50 if (a && c && b) { 51 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) { 52 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 { 53 window.navigator.msSaveBlob(c, 54 b), f = !0 55 } catch (m) { g.dataset.downloadurl = [d, g.download, g.href].join(":"), g.href = window.URL.createObjectURL(c) } 56 } 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("<img src='" + a + "'></img><div>Please right click on the image and save it to your device</div>"), c.document.close() } 57 } 58 } function R(a, c, b) { 59 c.getAttribute("state") !== 60 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 = "<img style='height:16px;' src='" + Va[b].image + "' alt='" + a._cultureInfo[b + "Text"] + "' />") 61 } function va() { for (var a = null, c = 0; c < arguments.length; c++) a = arguments[c], a.style && (a.style.display = "inline") } function $() { 62 for (var a = null, c = 0; c < arguments.length; c++) (a = arguments[c]) && 63 a.style && (a.style.display = "none") 64 } function I(a, c, b, d) { this._defaultsKey = a; this.parent = d; this._eventListeners = []; d = {}; b && (ja[b] && ja[b][a]) && (d = ja[b][a]); this.options = c ? c : { _isPlaceholder: !0 }; this.setOptions(this.options, d) } function A(a, c) { 65 c = c || {}; A.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 = 66 !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) { 67 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 : 68 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 ia[this.colorSet] ? ia[this.colorSet] : ia.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 = 69 "auto"; t || (this._canvasJSContainer.style.height = "0px"); this.container.appendChild(this._canvasJSContainer); this.canvas = ha(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", Ja(this.ctx), t ? this.plotArea.ctx = this.ctx : (this.plotArea.canvas = ha(d, f), this.plotArea.canvas.style.position = "absolute", this.plotArea.canvas.setAttribute("class", "plotAreaCanvas"), this._canvasJSContainer.appendChild(this.plotArea.canvas), 70 this.plotArea.ctx = this.plotArea.canvas.getContext("2d")), this.overlaidCanvas = ha(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 na(this), this.windowResizeHandler = K(window, "resize", function () { b._updateSize() && b.render() }), this._toolBar = document.createElement("div"), this._toolBar.setAttribute("class", "canvasjs-chart-toolbar"), 71 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 }, K(this.overlaidCanvas, "click", function (a) { b._mouseEventHandler(a) }), K(this.overlaidCanvas, "mousemove", function (a) { b._mouseEventHandler(a) }), K(this.overlaidCanvas, "mouseup", function (a) { b._mouseEventHandler(a) }), K(this.overlaidCanvas, "mousedown", function (a) { b._mouseEventHandler(a); $(b._dropdownMenu) }), K(this.overlaidCanvas, "mouseout", 72 function (a) { b._mouseEventHandler(a) }), K(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerDown" : "touchstart", function (a) { b._touchEventHandler(a) }), K(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerMove" : "touchmove", function (a) { b._touchEventHandler(a) }), K(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerUp" : "touchend", function (a) { b._touchEventHandler(a) }), K(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerCancel" : "touchcancel", function (a) { b._touchEventHandler(a) }), 73 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: [] }) 74 } else window.console && window.console.log('CanvasJS Error: Chart Container with i
74d "' + this._containerId + '" was not found') 75 } function wa(a, c) { 76 for (var b = [], d, f = 0; f < a.length; f++) if (0 == f) b.push(a[0]); else { 77 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 - 78 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] 79 } return b 80 } function Pa(a, c) { 81 if (null === a || "undefined" === typeof a) return c; 82 var b = parseFloat(a.toString()) * (0 <= a.toString().indexOf("%") ? c / 100 : 1); return !isNaN(b) && b <= c && 0 <= b ? b : c 83 } function ka(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 oa(a, c) { 84 oa.base.constructor.call(this, "Title", c, a.theme, a); this.chart = a; this.canvas = 85 a.canvas; this.ctx = this.chart.ctx; this.optionsName = "title"; if (y(this.options.margin) && a.options.subtitles) for (var b = a.options.subtitles, d = 0; d < b.length; d++) if ((y(b[d].horizontalAlign) && "center" === this.horizontalAlign || b[d].horizontalAlign === this.horizontalAlign) && (y(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)); 86 this.height = this.width = null; this.bounds = { x1: null, y1: null, x2: null, y2: null } 87 } function xa(a, c) { xa.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 ya(a, c) { 88 ya.base.constructor.call(this, "Legend", c, a.theme, a); 89 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 = La(this.fontFamily, this.fontSize, this.fontWeight); this.horizontalSpacing = this.fontSize 90 } function Da(a, c) { 91 Da.base.constructor.call(this, 92 c); this.chart = a; this.canvas = a.canvas; this.ctx = this.chart.ctx 93 } function ba(a, c, b, d) { 94 ba.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 = 95 0.7 : this.fillOpacity = 1); this.axisPlacement = this.getDefaultAxisPlacement(); "undefined" === typeof this.options.indexLabelFontSize && (this.indexLabelFontSize = this.chart.getAutoFontSize(this.indexLabelFontSize)) 96 } function B(a, c, b, d, f) { 97 B.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 = { 98 min: Infinity, max: -Infinity, 99 viewPortMin: Infinity, viewPortMax: -Infinity, minDiff: Infinity 100 }; this.isOptionsInArray = !0; "axisX" === b ? ("left" === d || "bottom" === d ? (this.optionsName = "axisX", y(this.chart.sessionVariables.axisX[f]) && (this.chart.sessionVariables.axisX[f] = {}), this.sessionVariables = this.chart.sessionVariables.axisX[f]) : (this.optionsName = "axisX2", y(this.chart.sessionVariables.axisX2[f]) && (this.chart.sessionVariables.axisX2[f] = {}), this.sessionVariables = this.chart.sessionVariables.axisX2[f]), this.options.interval || (this.intervalType = 101 null), "theme2" === this.chart.theme && y(this.options.lineThickness) && (this.lineThickness = 2)) : "left" === d || "top" === d ? (this.optionsName = "axisY", y(this.chart.sessionVariables.axisY[f]) && (this.chart.sessionVariables.axisY[f] = {}), this.sessionVariables = this.chart.sessionVariables.axisY[f]) : (this.optionsName = "axisY2", y(this.chart.sessionVariables.axisY2[f]) && (this.chart.sessionVariables.axisY2[f] = {}), this.sessionVariables = this.chart.sessionVariables.axisY2[f]); "undefined" === typeof this.options.titleFontSize && 102 (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 && 103 (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 pa(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) || 104 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 = 105 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") 106 } function pa(a, c, b, d, f) { 107 pa.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; 108 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) : 109 Math.max(this.endValue - this.startValue), this._thicknessType = "value") 110 } 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 na(a) { 111 this.chart = a; this.lastObjectId = 0; this.objectMap = []; this.rectangularRegionEventSubscriptions = []; this.previousDataPointEventObject = null; this.ghostCanvas = 112 ha(this.chart.width, this.chart.height); this.ghostCtx = this.ghostCanvas.getContext("2d"); this.mouseoveredObjectMaps = [] 113 } function qa(a) { var c; a && ra[a] && (c = ra[a]); qa.base.constructor.call(this, "CultureInfo", c) } function Ea(a) { this.chart = a; this.ctx = this.chart.plotArea.ctx; this.animations = []; this.animationRequestId = null } var la = {}, t = !!document.createElement("canvas").getContext, ga = { 114 Chart: { 115 width: 500, height: 400, zoomEnabled: !1, zoomType: "x", backgroundColor: "white", theme: "theme1", animationEnabled: !1, animationDuration: 1200, 116 dataPointWidth: null, dataPointMinWidth: null, dataPointMaxWidth: null, colorSet
116: "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" } 117 }, Title: { 118 padding: 0, 119 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" } 120 }, Subtitle: { 121 padding: 0, text: null, verticalAlign: "top", horizontalAlign: "center", fontSize: 14, fontFamily: "Calibri", fontWeight: "normal", fontColor: "black", 122 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" } 123 }, Legend: { 124 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 ? 125 "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" } 126 }, ToolTip: { 127 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", 128 fontFamily: "Calibri, Arial, Georgia, serif;", fontWeight: "normal", fontStyle: "italic", publicProperties: { options: "readWrite", chart: "readOnly" } 129 }, Axis: { 130 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 ? 131 "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", 132 gridColor: "A0A0A0", gridThickness: 0, gridDashType: "solid", interlacedColor: t ? "transparent" : null, valueFormatString: null, margin: 2, stripLines: [], publicProperties: { options: "readWrite", bounds: "readOnly", chart: "readOnly" } 133 }, StripLine: { 134 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, 135 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" } 136 }, DataSeries: { 137 name: null, dataPoints: null, label: "", bevelEnabled: !1, highlightEnabled: !0, cursor: "default", indexLabel: "", indexLabelPlacement: "auto", indexLabelOrientation: "horizontal", indexLabelFontColor: "black", indexLabelFontSize: 12, indexLabelFontStyle: "normal", 138 indexLabelFontFamily: "Arial", indexLabelFontWeight: "normal", indexLabelBackgroun
138dColor: 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", 139 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: { 140 options: "readWrite", 141 axisX: "readWrite", axisY: "readWrite", chart: "readOnly" 142 } 143 }, 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: { 144 decimalSeparator: ".", digitGroupSeparator: ",", zoomText: "Zoom", panText: "Pan", resetText: "Reset", menuText: "More Options", saveJPGText: "Save as JPEG", 145 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(" ") 146 } 147 }, ra = { en: {} }, ia = { 148 colorSet1: "#369EAD #C24642 #7F6084 #86B402 #A2D1CF #C8B631 #6DBCEB #52514E #4F81BC #A064A1 #F79647".split(" "), colorSet2: "#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #33558B".split(" "), 149 colorSet3: "#8CA1BC #36845C #017E82 #8CB9D0 #708C98 #94838D #F08891 #0366A7 #008276 #EE7757 #E5BA3A #F2990B #03557B #782970".split(" ") 150 }, ja = { 151 theme1: { 152 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: { 153 fontFamily: t ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri", fontSize: 16, fontColor: "#3A3A3A", fontWeight: "bold", verticalAlign: "top", 154 margin: 5 155 }, 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: { 156 indexLabelFontColor: "grey", 157 indexLabelFontFamily: t ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri", indexLabelFontSize: 18, indexLabelLineThickness: 1 158 } 159 }, theme2: { 160 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: { 161 titleFontSize: 22, titleFontColor: "rgb(98,98,98)", titleFontFamily: t ? "monospace, sans-serif,arial black" : 162 "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 163 }, Legend: { verticalAlign: "bottom", horizontalAlign: "center", fontFamily: t ? "monospace, sans-serif,arial black" : "arial" }, DataSeries: { 164 indexLabelFontColor: "grey", indexLabelFontFamily: t ? "Courier New, Courier, monospace" : "arial", indexLabelFontWeight: "bold", indexLabelFontSize: 18, 165 indexLabelLineThickness: 1 166 } 167 }, theme3: {
168 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: { 169 titleFontSize: 22, titleFontColor: "rgb(98,98,98)", 170 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" 171 }, Legend: { verticalAlign: "bottom", horizontalAlign: "center", fontFamily: t ? "monospace, sans-serif,arial black" : "calibri" }, DataSeries: { 172 bevelEnabled: !0, indexLabelFontColor: "grey", indexLabelFontFamily: t ? "Candara, Optima, Calibri, Verdana, Geneva, sans-serif" : 173 "calibri", indexLabelFontSize: 18, indexLabelLineColor: "lightgrey", indexLabelLineThickness: 2 174 } 175 } 176 }, G = { 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(" ") }, Ma = {}, ca = null, Fa = function () { 177 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(" "), 178 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) { 179 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; 180 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"](), x = k[m + "Day"](), u = k[m + "Month"](), v = k[m + "FullYear"](), z = k[m + "Hours"](), w = k[m + "Minutes"](), t = k[m + "Seconds"](), y = k[m + "Milliseconds"](), A = r ? 0 : k.getTimezoneOffset(); return m = h.replace(a, function (a) { 181 switch (a) { 182 case "D": return s; case "DD": return P(s, 2); case "DDD": return e[x]; case "DDDD": return p[x]; case "M": return u + 1; case "MM": return P(u + 1, 2); case "MMM": return q[u]; case "MMMM": return n[u]; 183 case "Y": return parseInt(String(v).slice(-2)); case "YY": return P(String(v).slice(-2), 2); case "YYY": return P(String(v).slice(-3), 3); case "YYYY": return P(v, 4); case "h": return z % 12 || 12; case "hh": return P(z % 12 || 12, 2); case "H": return z; case "HH": return P(z, 2); case "m": return w; case "mm": return P(w, 2); case "s": return t; case "ss": return P(t, 2); case "f": return String(y).slice(0, 1); case "ff": return P(String(y).slice(0, 2), 2); case "fff": return P(String(y).slice(0, 3), 3); case "t": return 12 > z ? "a" : "p"; case "tt": return 12 > 184 z ? "am" : "pm"; case "T": return 12 > z ? "A" : "P"; case "TT": return 12 > z ? "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 ? "-" : "+") + P(Math.floor(Math.abs(A) / 60), 2); case "zzz": return (0 < A ? "-" : "+") + P(Math.floor(Math.abs(A) / 60), 2) + P(Math.abs(A) % 60, 2); default: return a.slice(1, a.length - 1) 185 } 186 }) 187 } 188 }(), da = function (a, c, b) { 189 if (null === a) return ""; a = Number(a); var d = 0 > a ? !0 : !1; d && (a *= -1); var f = b ? b.decimalSeparator : ".", g = 190 b ? b.digitGroupSeparator : ",", l = ""; c = String(c);
190 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 x = 0; k && x < k.length; x++) if (c = k[x], "." === c && 0 > h) h = x; else { 191 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 = x + 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 && 192 "0" !== c || e++) 193 } 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 = x); 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 = x = 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 && (x === q && 0 < u.length) && (b = g + b) } else 0 < l.length ? (b = l.pop() + b, e++, r++) : 194 "0" === c && (b = "0" + b, e++, r++), 0 === r % k && (x === q && 0 < l.length) && (b = g + b); else "E" !== c[0] && "e" !== c[0] || "0" !== c[c.length - 1] || !/[eE][+-]*[0]+/.test(c) ? "," === c ? (x++, 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 P(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(), 195 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 P(s, a.length) })); b += (m ? f : "") + g; return d ? "-" + b : b 196 }, za = function (a) { 197 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 - 198 a.target.offsetLeft, b = a.pageY - a.target.offsetTop); return { x: c, y: b } 199 }, Oa = !0, Ba = window.devicePixelRatio || 1, ua = 1, L = Oa ? Ba / ua : 1, Ua = 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")), Va = { 200 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=" }, 201 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=" }, 202 zoom: { image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAMqSURBVFiFvdfbj91TFMDxz57U6GUEMS1aYzyMtCSSDhWjCZMInpAI3khE/QHtgzdRkXgSCS8SES9epKLi0oRKNETjRahREq2KS1stdRujtDPtbA97n5zdn9+5zJxTK9k5v3POXmt991p7r71+IcaoGwkhTOIebMRqzOBTvIG3Y4zTXRmqSoyx5cAKbMJOHMFJnMZ8/jyFaXyMR7G6nb1aH22cP4BvcBxziG3GKfyTIR9D6BYg1KUghPBCDveFlb/24Av8iuUYw41YVsz5G7uxKcZ4aMEpwGt5NY3V/YbHsQ6rcAHOw/kYxigewr5CZw4fYGxBKcCLOFEYehXrMdRhr5yLETxVScsOLOkKAPfn1TYMPIvLFrShUlS2FDZm8XRHACzFAWl3R2xbqPMCYhmeLCAOYEMngAczbcTvuHYxzguIy/FesR9e
2026gSwU/OoPYHBHgHgviIKX2Flq7k34KhmcVnbi/PC8JX4MgMcxb118wZwdz5aISscqx7VRcox7MrPQ7i+btIAJrAkf9+bI9EPmZY2IAxiTSuAldLq4Y9+AcSUh78KP0tbAcwU35cXMD1JCIFUoGiehlqAz6TNB1f1C0DK+0h+nsNPrQC2a4bqGmlD9kOGcWt+Po6pVgDvSxfJaSkFd4UQBvoAsBYbCoB3a2flM7slA0R8iyt6rAFDeDPbm8eOTpVwGD9qVq7nLbIaZnmksPU1JtsCZMXNmpdRxFasWITzh6Xj3LCzra1OxcD2QjHiGVzdpfORnMqZio2PcF23ABdJF1Np4BPptlyPi6WzPYBzpJZtHe7A6xW9cnyP8TqA//SEIYRL8Bxul7rihvwgtVn78WcGGZXa9HGd5TDujDHuOePXNiHdKjWgZX/YbsxLx/ktqbjVzTlcjUSnvI5JrdlUVp6WesZZ6R1hRrpq9+EVTGS9jTjYAuKIouGpbcurEkIYxC051KNSamazsc+xK8b4S0VnEi/j0hqTP+M27O258egQwZuzs7pI7Mf4WQXIEDc5s9sux+5+1Py2EmP8UOq6GvWhIScxfdYjUERiAt9Jd84J6a16zf8JEKT3yCm8g1UxRv8CC4pyRhzR1uUAAAAASUVORK5CYII=" }, 203 menu: { image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAgCAYAAAAbifjMAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAAWdEVYdENyZWF0aW9uIFRpbWUAMDcvMTUvMTTPsvU0AAAAP0lEQVRIie2SMQoAIBDDUvH/X667g8sJJ9KOhYYOkW0qGaU1MPdC0vGSbV19EACo3YMPAFH5BUBUjsqfAPpVXtNgGDfxEDCtAAAAAElFTkSuQmCC" } 204 }; I.prototype.setOptions = function (a, c) { 205 if (ga[this._defaultsKey]) { 206 var b = ga[this._defaultsKey], d; for (d in b) "publicProperties" !== d && b.hasOwnProperty(d) && (this[d] = 207 a && d in a ? a[d] : c && d in c ? c[d] : b[d]) 208 } 209 }; I.prototype.get = function (a) { var c = ga[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.") }; I.prototype.set = function (a, c, b) { 210 b = "undefined" === typeof b ? !0 : b; var d = ga[this._defaultsKey]; if ("options" === a) this.createUserOptions(c); 211 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 && (chart = this.chart || this, chart.render()) 212 }; I.prototype.addTo = 213 function (a, c, b, d) { 214 d = "undefined" === typeof d ? !0 : d; var f = ga[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 && (chart = this.chart || this, chart.render())) : window.console && (f.publicProperties && f.publicProperties.hasOwnProperty(a) && 215 "readOnly" === f.publicProperties[a] ? window.console.log('Property "' + a + '" is read-only.') : window.console.log('Property "' + a + "\" doesn't exist. Please check for typo.")) 216 }; I.prototype.createUserOptions = function (a) { 217 if ("undefined" !== typeof a || this.options._isPlaceholder) if (this.parent.options._isPlaceholder && this.parent.createUserOptions(), this.isOptionsInArray) { 218 this.parent.options[this.optionsName] || (this.parent.options[this.optionsName] = []); var c = this.parent.options[this.optionsName], b = c.length; this.options._isPlaceholder || 219 (sa(c), b = c.indexOf(this.options)); this.options = "undefined" === typeof a ? {} : a; c[b] = this.options 220 } 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 221 }; I.prototype.remove = function (a) { 222 a = "undefined" === typeof a ? !0 : a; if (this.isOptionsInArray) { 223 var c = this.parent.options[this.optionsName]; sa(c); var b = c.indexOf(this.options);
223 0 <= 224 b && c.splice(b, 1) 225 } else delete this.parent.options[this.optionsName]; a && (chart = this.chart || this, chart.render()) 226 }; I.prototype.updateOption = function (a) { var c = ga[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 && (ja[b] && ja[b][this._defaultsKey]) && (d = ja[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 }; I.prototype.trackChanges = 227 function (a) { if (!this.sessionVariables) throw "Session Variable Store not set"; this.sessionVariables[a] = this.options[a] }; I.prototype.isBeingTracked = function (a) { this.options._oldOptions || (this.options._oldOptions = {}); return this.options._oldOptions[a] ? !0 : !1 }; I.prototype.hasOptionChanged = function (a) { if (!this.sessionVariables) throw "Session Variable Store not set"; return this.sessionVariables[a] !== this.options[a] }; I.prototype.addEventListener = function (a, c, b) { 228 a && c && (this._eventListeners[a] = this._eventListeners[a] || 229 [], this._eventListeners[a].push({ context: b || this, eventHandler: c })) 230 }; I.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 } }; I.prototype.removeAllEventListeners = function () { this._eventListeners = [] }; I.prototype.dispatchEvent = function (a, c, b) { 231 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" === 232 typeof this[a] && this[a].call(b || this.chart, c) 233 }; S(A, I); A.prototype.destroy = function () { var a = window, c = this.windowResizeHandler; a.removeEventListener ? a.removeEventListener("resize", c) : a.detachEvent && a.detachEvent("onresize", c) }; A.prototype._updateOptions = function () { 234 var a = this; this.updateOption("width"); this.updateOption("height"); this.updateOption("dataPointWidth"); this.updateOption("dataPointMinWidth"); this.updateOption("dataPointMaxWidth"); this.updateOption("interactivityEnabled"); this.updateOption("theme"); 235 this.updateOption("colorSet") && (this._selectedColorSet = "undefined" !== typeof ia[this.colorSet] ? ia[this.colorSet] : ia.colorSet1); this.updateOption("backgroundColor"); this.backgroundColor || (this.backgroundColor = "rgba(0,0,0,0)"); this.updateOption("culture"); this._cultureInfo = new qa(this.options.culture); this.updateOption("animationEnabled"); this.animationEnabled = this.animationEnabled && t; this.updateOption("animationDuration"); this.updateOption("rangeChanging"); this.updateOption("rangeChanged"); this.updateOption("exportEnabled"); 236 this.updateOption("exportFileName"); this.updateOption("zoomType"); this.options.zoomEnabled ? (this._zoomButton || ($(this._zoomButton = document.createElement("button")), R(this, this._zoomButton, "pan"), this._toolBar.appendChild(this._zoomButton), K(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 || ($(this._resetButton = document.createElement("button")), R(this, 237 this._resetButton, "reset"), this._toolBar.appendChild(this._resetButton), K(this._resetButton, "click", function () { 238 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 = 239 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 = 240 null; a.resetOverlayedCanvas(); $(a._zoomButton, a._resetButton); a._dispatchRangeEvent("rangeChanging", "reset"); a.render(); a._dispatchRangeEvent("rangeChanged", "reset") 241 }), 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), va(a._zoomButton, a._resetButton)) : (this.zoomEnabled = !0, this.panEnabled = !1))) : this.panEnabled = 242 this.zoomEnabled = !1; this._menuButton ? this.exportEnabled ? va(this._menuButton) : $(this._menuButton) : this.exportEnabled && t && (this._menuButton = document.createElement("button"), R(this, this._menuButton, "menu"), this._toolBar.appendChild(this._menuButton), K(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.focu
242s()) }, !0)); if (!this._dropdownMenu && 243 this.exportEnabled && t) { 244 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;"; 245 a._dropdownMenu.style.display = "none"; this._toolBar.appendChild(this._dropdownMenu); K(this._dropdownMenu, "blur", function () { $(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); K(c, "mouseover", function () { this.style.backgroundColor = "#EEEEEE" }, !0); K(c, "mouseout", function () { this.style.backgroundColor = "transparent" }, !0); K(c, "click", function () { 246 a.print(); 247 $(a._dropdownMenu) 248 }, !0); c = document.createElement("div"); c.style.cssText = "padding: 2px 15px 2px 10px"; c.innerHTML = this._cultureInfo.saveJPGText; this._dropdownMenu.appendChild(c); K(c, "mouseover", function () { this.style.backgroundColor = "#EEEEEE" }, !0); K(c, "mouseout", function () { this.style.backgroundColor = "transparent" }, !0); K(c, "click", function () { Ca(a.canvas, "jpeg", a.exportFileName); $(a._dropdownMenu) }, !0); c = document.createElement("div"); c.style.cssText = "padding: 2px 15px 2px 10px"; c.innerHTML = this._cultureInfo.savePNGText; 249 this._dropdownMenu.appendChild(c); K(c, "mouseover", function () { this.style.backgroundColor = "#EEEEEE" }, !0); K(c, "mouseout", function () { this.style.backgroundColor = "transparent" }, !0); K(c, "click", function () { Ca(a.canvas, "png", a.exportFileName); $(a._dropdownMenu) }, !0) 250 } "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 !== 251 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) 252 }; A.prototype._updateSize = function () { 253 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 * L || this.canvas.height !== c * 254 L ? (ta(this.canvas, a, c), ta(this.overlaidCanvas, a, c), ta(this._eventManager.ghostCanvas, a, c), !0) : !1 255 }; A.prototype._initialize = function () { 256 this._animator ? this._animator.cancelAllAnimations() : this._animator = new Ea(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(); 257 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 ka(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 || 258 0 <= A._supportedChartTypes.indexOf(this.options.data[c].type)) { 259 var b = new ba(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" === 260 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 }) && 261 b.dataPoints.sort(Ka) : b.dataPoints.sort(Ka)); 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 ? 262 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 } 263 } var g = this; this.addEventListener("dataAnimationIterationEnd", 264 function () { la.fAWm && la.fAWm(g); 0 !== g.axisX.length && la.fNg && la.fNg(g) }); Ta(this); this._objectsInitialized = !0 265 }; A._supportedChartTypes = sa("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(" ")); A.prototype.render = function (a) { 266 a && (this.options = a); this._initialize(); var c = []; for (a = 0; a < this.data.length; a++) if ("normal" === 267 this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) { 268 if (!this.data[a].axisYType || "primary" === this.data[a].axisYType) if (this.options.axisY && 0 < this.options.axisY.length) { 269 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 B(this, this.options.axisY[b], "axisY", "left", b)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY[b] = new B(this, this.options.axisY[b], "axisY", "bottom", b));
270 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]) 271 } else this.axisY.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY[0] = new B(this, this.options.axisY, "axisY", "left", 0)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY[0] = new B(this, this.options.axisY, 272 "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) { 273 if (!this.axisY2.length) for (b = 0; b < this.options.axisY2.length; b++) "normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY2[b] = new B(this, this.options.axisY2[b], "axisY", "right", b)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY2[b] = new B(this, this.options.axisY2[b], "axisY", "top", 274 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]) 275 } else this.axisY2.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY2[0] = new B(this, this.options.axisY2, "axisY", "right", 0)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY2[0] = new B(this, 276 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) { 277 if (!this.axisX.length) for (b = 0; b < this.options.axisX.length; b++) "normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX[b] = new B(this, this.options.axisX[b], "axisX", "bottom", b)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX[b] = new B(this, 278 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]) 279 } else this.axisX.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX[0] = new B(this, this.options.axisX, "axisX", "bottom", 0)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX[0] = 280 new B(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) { 281 if (!this.axisX2.length) for (b = 0; b < this.options.axisX2.length; b++) "normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX2[b] = new B(this, this.options.axisX2[b], "axisX", "top", b)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX2[b] = new B(this, this.options.axisX2[b], 282 "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]) 283 } else this.axisX2.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX2[0] = new B(this, this.options.axisX2, "axisX", "top", 0)) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX2[0] = 284 new B(this, this.options.axisX2, "axisX", "right", 0))), this.data[a].axisX = this.axisX2[0], this.axisX2[0].dataSeries.push(this.data[a]) 285 } 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) { 286 for (b = 1; b < this.axisY2.length; b++) "undefined" === typeof this.axisY2[b].options.gridThickness && (this.axisY2[b].gridThickness = 287 0); for (b = 0; b < this.axisY2.length - 1; b++) "undefined" === typeof this.axisY2[b].options.margin && (this.axisY2[b].margin = 10) 288 } 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 && 289 (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 && 290 (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 ? va(this._zoomButton, this._resetButton) : ($(this._zoomButton, this._resetButton), this.options.zoomEnabled && (this.zoomEnabled = !0, this.panEnabled = !1)); this._processData(); this.options.title && (this.title = new oa(this, this.options.title), this.title.dockInsidePlotArea ? c.push(this.title) : this.title.render()); if (this.options.subtitles) for (this.subtitles = 291 [], a = 0; a < this.options.subtitles.length; a++) b = new xa(this, this.options.subtitles[a]), this.subtitles.push(b), b.dockInsidePlotArea ? c.push(b) : b.render(); this.legend = new ya(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) B.setLayoutAndRender(this.axisX, 292 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 = ha(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++) { 293 var h = 294 l.plotUnits[k], m = null; h.targetCanvas = null; this.animatedRender && (h.targetCanvas = ha(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" ===
295 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 ? 296 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)) 297 } this.ctx.miterLimit = 298 c; this.animatedRender && 0 < this._indexLabels.length && (g = ha(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) { 299 p.ctx.clearRect(0, 0, p.width, p.height); p.ctx.drawImage(f, 0, 0, Math.floor(p.width * L), Math.floor(p.height * L), 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, 300 0, 1, 1 - m.startTimePercent), m) : m.animationCallback(m.easingFunction(a, 0, 1, 1), m); p.dispatchEvent("dataAnimationIterationEnd", { chart: p }) 301 }, 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 || 302 "none" === this._zoomButton.style.display) || $(this._zoomButton, this._resetButton); this.toolTip._updateToolTip(); this.renderCount++ 303 }; A.prototype.attachPlotAreaEventHandlers = function () { this.attachEvent({ context: this, chart: this, mousedown: this._plotAreaMouseDown, mouseup: this._plotAreaMouseUp, mousemove: this._plotAreaMouseMove, cursor: this.zoomEnabled ? "col-resize" : "move", cursor: this.panEnabled ? "move" : "default", capture: !0, bounds: this.plotArea }) }; A.prototype.categoriseDataSeries = function () { 304 for (var a = "", c = 0; c < 305 this.data.length; c++) if (a = this.data[c], a.dataPoints && (0 !== a.dataPoints.length && a.visible) && 0 <= A._supportedChartTypes.indexOf(a.type)) { 306 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 === 307 a.axisYIndex && b.plotUnits[l].axisXIndex === a.axisXIndex) { g = !0; f = b.plotUnits[l]; break } g || (f = { 308 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 < 309 this.axisX.length ? a.axisXIndex : 0] : this.axisX2[0 <= a.axisXIndex && a.axisXIndex < this.axisX2.length ? a.axisXIndex : 0], dataSeriesIndexes: [], yTotals: [] 310 }, b.plotUnits.push(f)); b.totalDataSeries++; f.dataSeriesIndexes.push(c); a.plotUnit = f 311 } 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 312 }; A.prototype.assignIdToDataPoints = function () { 313 for (var a = 0; a < this.data.length; a++) { 314 var c = 315 this.data[a]; if (c.dataPoints) for (var b = c.dataPoints.length, d = 0; d < b; d++) c.dataPointIds[d] = ++this._eventManager.lastObjectId 316 } 317 }; A.prototype._processData = function () { 318 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++) { 319 var d = c.plotUnits[b];
319 "line" === d.type || "stepLine" === d.type || "spline" === d.type || "column" === d.type || "area" === d.type || "stepArea" === d.type || "splineArea" === d.type || "bar" === d.type || 320 "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) 321 } 322 }; A.prototype._processMultiseriesPlotUnit = 323 function (a) { 324 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++) { 325 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 ? 326 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++) { 327 "undefined" === typeof k.dataPoints[h].x && (k.dataPoints[h].x = h + (a.axisX.logarithmic ? 328 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) { 329 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 = 330 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))) 331 } if (d < e && !m) null !== f && (n = d); else { 332 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 = 333 f)) 334 } 335 } this.plotInfo.axisXValueType = k.xValueType = g ? "dateTime" : "number" 336 } 337 }; A.prototype._processStackedPlotUnit = function (a) { 338 if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) { 339 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++) { 340 var n = this.data[a.dataSeriesIndexes[p]], e = 0, q = !1, r = !1, s; if ("normal" === n.axisPlacement || "xySwapped" === n.axisPlacement) var x = this.sessionVariables.axisX.newViewportMinimum ? this.sessionVariables.axisX.newViewportMinimum : 341 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" === 342 n.xValueType) g = !0; for (e = 0; e < n.dataPoints.length; e++) { 343 "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 = y(n.dataPoints[e].y) ? 0 : n.dataPoints[e].y; d < b.min && (b.min = d); d > b.max && (b.max = d); if (0 < e) {
344 if (a.axisX.logarithmic) { var v = d / n.dataPoints[e - 1].x; 1 > v && (v = 1 / v); b.minDiff > v && 1 !== v && (b.minDiff = v) } else v = d - n.dataPoints[e - 1].x, 0 > v && (v *= -1), b.minDiff > v && 0 !== v && (b.minDiff = v); null !== f && null !== 345 n.dataPoints[e - 1].y && (a.axisY.logarithmic ? 0 < f && (v = f / n.dataPoints[e - 1].y, 1 > v && (v = 1 / v), c.minDiff > v && 1 !== v && (c.minDiff = v)) : (v = f - n.dataPoints[e - 1].y, 0 > v && (v *= -1), c.minDiff > v && 0 !== v && (c.minDiff = v))) 346 } if (d < x && !q) null !== n.dataPoints[e].y && (s = d); else { 347 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 = 348 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))) 349 } 350 } this.plotInfo.axisXValueType = n.xValueType = g ? "dateTime" : "number" 351 } 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 && 352 (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)))) 353 } 354 }; A.prototype._processStacked100PlotUnit = function (a) { 355 if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) { 356 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++) { 357 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 ? 358 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, x = 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 && 359 p.dataPoints[n].x.getTime || "dateTime" === p.xValueType) g = !0; for (n = 0; n < p.dataPoints.length; n++) { 360 "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 = y(p.dataPoints[n].y) ? null : p.dataPoints[n].y; d < b.min && (b.min = d); d > b.max && (b.max = d); if (0 < n) { 361 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 > 362 u && 0 !== u && (b.minDiff = u); y(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))) 363 } if (d < s && !e) null !== f && (r = d); else { 364 if (!e && (e = !0, 0 < n)) { n -= 2; continue } if (d > x && !q) q = !0; else if (d > x && 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 < 365 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)) 366 } 367 } this.plotInfo.axisXValueType = p.xValueType = g ? "dateTime" : "number" 368 } a.axisY.logarithmic ? (c.max = y(c.viewPortMax) ? 99 * Math.pow(a.axisY.logarithmBase, -0.05) : Math.max(c.viewPortMax, 99 * Math.pow(a.axisY.logarithmBase, -0.05)), c.min = y(c.viewPortMin) ? 1 : Math.min(c.viewPortMin, 1)) : l && !k ? (c.max = y(c.viewPortMax) ? 99 : Math.max(c.viewPortMax, 99), c.min = y(c.viewPortMin) ? 1 : Math.min(c.viewPortMin, 369 1)) : l && k ? (c.max = y(c.viewPortMax) ? 99 : Math.max(c.viewPortMax, 99), c.min = y(c.viewPortMin) ? -99 : Math.min(c.viewPortMin, -99)) : !l && k && (c.max = y(c.viewPortMax) ? -1 : Math.max(c.viewPortMax, -1), c.min = y(c.viewPortMin) ? -99 : Math.min(c.viewPortMin, -99)); c.viewPortMin = c.min; c.viewPortMax = c.max; a.dataPointYSums = h 370 } 371 }; A.prototype._processMultiYPlotUnit = function (a) { 372 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++) { 373 var m =
374 this.data[a.dataSeriesIndexes[h]], p = 0, n = !1, e = !1, q, r, s; if ("normal" === m.axisPlacement || "xySwapped" === m.axisPlacement) var x = 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 && 375 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++) { 376 "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) { 377 g = Math.min.apply(null, f); l = 378 Math.max.apply(null, f); r = !0; for (var v = 0; v < f.length; v++) null === f.k && (r = !1); r && (n || (s = q), q = d) 379 } 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 = 380 r)) : (r = f[0] - m.dataPoints[p - 1].y[0], 0 > r && (r *= -1), c.minDiff > r && 0 !== r && (c.minDiff = r)))); if (!(d < x) || n) { 381 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 (v = 0; v < f.length; v++) if (null === f[v] && 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 && 382 (c.viewPortMax = l)) 383 } 384 } this.plotInfo.axisXValueType = m.xValueType = k ? "dateTime" : "number" 385 } 386 }; A.prototype.getDataPointAtXY = function (a, c, b) { 387 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 = M("markerSize", d[b].dataPoint, d[b].dataSeries) || 8, 388 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 389 }; A.prototype.getObjectAtXY = function (a, c, b) { 390 var d = null; if (b = this.getDataPointAtXY(a, c, b || !1)) d = b.dataSeries.dataPointIds[b.dataPointIndex]; else if (t) d = Na(a, c, this._eventManager.ghostCtx); else for (b = 0; b < this.legend.items.length; b++) { 391 var f = this.legend.items[b]; 392 a >= f.x1 && (a <= f.x2 && c >= f.y1 && c <= f.y2) && (d = f.id) 393 } return d 394 }; A.prototype.getAutoFontSize = function (a, c, b) { a /= 400; return Math.max(10, Math.round(Math.min(this.width, this.height) * a)) }; A.prototype.resetOverlayedCanvas = function () { this.overlaidCanvasCtx.clearRect(0, 0, this.width, this.height) }; A.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)) }; A.prototype.attachEvent = function (a) { this._events.push(a) }; 395 A.prototype._touchEventHandler = function (a) { 396 if (a.changedTouches && this.interactivityEnabled) { 397 var c = [], b = a.changedTouches, d = b ? b[0] : a, f = null; switch (a.type) { 398 case "touchstart": case "MSPointerDown": c = ["mousemove", "mousedown"]; this._lastTouchData = za(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; 399 default: return 400 } if (!(b && 1 < b.length)) { 401 f = za(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, 402 d.clientX, d.clientY, !1, !1, !1, !1, 0, null), d.target.dispatchEvent(g), a.preventManipulation && a.preventManipulation() 403 } 404 } 405 }; A.prototype._dispatchRangeEvent = function (a, c) { 406 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 (y(b[d[f]]) && (b[d[f]] = []), "axisY" === d[f]) for (var g = 0; g < this.axisY.length; g++) b[d[f]].push({ 407 viewportMinimum: this[d[f]][g].sessionVariables.newViewportMinimum, 408 viewportMaximum: this[d[f]][g].sessionVariables.newViewportMaximum 409 }); 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 = 410 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) 411 }; A.prototype._mouseEventHandler = function (a) { 412 "undefined" === typeof a.target && a.srcElement && (a.target = a.srcElement); var c = za(a), b = a.type, d, f; a.which ? f = 3 == a.which : a.button && (f = 2 == a.button); A.capturedEventParam && (d = A.capturedEventParam, "mouseup" === b && (A.capturedEventParam = null, d.chart.overlaidCanvas.releaseCapture ? 413 d.chart.overlaidCanvas.releaseCapture() : document.documentElement.removeEventListener("mouseup", d.chart._mou
413seEventHandler, !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) { 414 if (!A.capturedEventParam && 415 this._events) { 416 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) { 417 d[b].call(d.context, c.x, c.y); "mousedown" === b && !0 === d.capture ? (A.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", 418 this._mouseEventHandler, !1)); break 419 } else d = null; a.target.style.cursor = d && d.cursor ? d.cursor : this._defaultCursor 420 } 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) 421 } 422 }; A.prototype._plotAreaMouseDown = function (a, c) { this.isDrag = !0; this.dragStartPoint = { x: a, y: c } }; A.prototype._plotAreaMouseUp = function (a, c) { 423 if (("normal" === this.plotInfo.axisPlacement || 424 "xySwapped" === this.plotInfo.axisPlacement) && this.isDrag) { 425 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) { 426 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 * 427 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 = 428 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", 429 "zoom"), l && (this.zoomEnabled && "none" === this._zoomButton.style.display) && (va(this._zoomButton, this._resetButton), R(this, this._zoomButton, "pan"), R(this, this._resetButton, "reset"))) 430 } 431 } this.isDrag = !1 432 }; A.prototype._plotAreaMouseMove = function (a, c) { 433 if (this.isDrag && "none" !== this.plotInfo.axisPlacement) { 434 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) && 435 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) { 436 return function () { 437 l._zoomPanToSelectedRegion(b, 438 d, e, f, !0) && (l._dispatchRangeEvent("rangeChanging", "pan"), l.render(), l._dispatchRangeEvent("rangeChanged", "pan"), l.dragStartPoint.x = a, l.dragStartPoint.y = c) 439 } 440 }(f.x1, f.y1, f.x2, f.y2), 0); else if (this.zoomEnabled) { 441 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 - 442 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 443 } 444 } else this.toolTip.mouseMoveHandler(a, c) 445 }; A.prototype._zoomPanToSelectedRegion = function (a, c, b, d, f) { 446 a = this.validateRegion(a, c, b, d, f); c = a.axesWithValidRange; b = a.axesRanges; 447 if (a.isValid) for (d = 0; d < c.length;
447 d++) f = b[d], c[d].setViewPortRange(f.val1, f.val2); return a.isValid 448 }; A.prototype.validateRegion = function (a, c, b, d, f) { 449 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] && 450 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 } 451 }; A.prototype.preparePlotArea = function () { 452 var a = this.plotArea; 453 !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])) { 454 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 && 455 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) 456 } 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 = 457 a.y1 + "px", (0 < a.x1 || 0 < a.y1) && a.ctx.translate(-a.x1, -a.y1)); a.layoutManager = new ka(a.x1, a.y1, a.x2, a.y2, 2) 458 }; A.prototype.renderIndexLabels = function (a) { 459 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++) { 460 var m = this._indexLabels[a], p = m.chartType.toLowerCase(), n, e, k = M("indexLabelFontColor", m.dataPoint, m.dataSeries), h = M("indexLabelFontSize", m.dataPoint, m.dataSeries); n = M("indexLabelFontFamily", m.dataPoint, m.dataSeries); e = M("indexLabelFontStyle", 461 m.dataPoint, m.dataSeries); var l = M("indexLabelFontWeight", m.dataPoint, m.dataSeries), q = M("indexLabelBackgroundColor", m.dataPoint, m.dataSeries), f = M("indexLabelMaxWidth", m.dataPoint, m.dataSeries), g = M("indexLabelWrap", m.dataPoint, m.dataSeries), r = M("indexLabelLineDashType", m.dataPoint, m.dataSeries), s = M("indexLabelLineColor", m.dataPoint, m.dataSeries), x = y(m.dataPoint.indexLabelLineThickness) ? y(m.dataSeries.options.indexLabelLineThickness) ? 0 : m.dataSeries.options.indexLabelLineThickness : m.dataPoint.indexLabelLineThickness, 462 d = 0 < x ? Math.min(10, ("normal" === this.plotInfo.axisPlacement ? this.plotArea.height : this.plotArea.width) << 0) : 0, u = { percent: null, total: null }, v = 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) v = { chart: this, dataSeries: m.dataSeries, dataPoint: m.dataPoint, index: m.indexKeyword, total: u.total, percent: u.percent }; var z = m.dataPoint.indexLabelFormatter ? 463 m.dataPoint.indexLabelFormatter(v) : m.dataPoint.indexLabel ? this.replaceKeywordsWithValue(m.dataPoint.indexLabel, m.dataPoint, m.dataSeries, null, m.indexKeyword) : m.dataSeries.indexLabelFormatter ? m.dataSeries.indexLabelFormatter(v) : m.dataSeries.indexLabel ? this.replaceKeywordsWithValue(m.dataSeries.indexLabel, m.dataPoint, m.dataSeries, null, m.indexKeyword) : null; if (null !== z && "" !== z) { 464 var u = M("indexLabelPlacement", m.dataPoint, m.dataSeries
464), v = M("indexLabelOrientation", m.dataPoint, m.dataSeries), w = m.direction, Z = 465 m.dataSeries.axisX, aa = m.dataSeries.axisY, A = !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" === v ? 0 : -90, text: z, 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) { 466 if (m.dataPoint.x < 467 Z.viewportMinimum || m.dataPoint.x > Z.viewportMaximum || Math.max.apply(null, m.dataPoint.y) < aa.viewportMinimum || Math.min.apply(null, m.dataPoint.y) > aa.viewportMaximum) continue 468 } else if (0 <= p.indexOf("line") || 0 <= p.indexOf("area") || 0 <= p.indexOf("bubble") || 0 <= p.indexOf("scatter")) { if (m.dataPoint.x < Z.viewportMinimum || m.dataPoint.x > Z.viewportMaximum || m.dataPoint.y < aa.viewportMinimum || m.dataPoint.y > aa.viewportMaximum) continue } else if (0 <= p.indexOf("column")) { 469 if (m.dataPoint.x < Z.viewportMinimum || m.dataPoint.x > Z.viewportMaximum || 470 m.bounds.y1 > b.y2 || m.bounds.y2 < b.y1) continue 471 } else if (0 <= p.indexOf("bar")) { if (m.dataPoint.x < Z.viewportMinimum || m.dataPoint.x > Z.viewportMaximum || m.bounds.x1 > b.x2 || m.bounds.x2 < b.x1) continue } else if ("candlestick" === p || "ohlc" === p) { if (m.dataPoint.x < Z.viewportMinimum || m.dataPoint.x > Z.viewportMaximum || Math.max.apply(null, m.dataPoint.y) < aa.viewportMinimum || Math.min.apply(null, m.dataPoint.y) > aa.viewportMaximum) continue } else if (m.dataPoint.x < Z.viewportMinimum || m.dataPoint.x > Z.viewportMaximum) continue; f = l = 2; "horizontal" === 472 v ? (k = q.width, h = q.height) : (h = q.width, k = q.height); if ("normal" === this.plotInfo.axisPlacement) { 473 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 < w ? (e = m.point.y - h - l - d, e < f && (e = "auto" === u ? Math.max(m.point.y, f) + l + d : f + l + d, A = 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, A = e < m.point.y))) : (f = Math.max(m.bounds.y1, 474 b.y1), g = Math.min(m.bounds.y2, b.y2), d = 0 <= p.indexOf("range") ? 0 < w ? 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 < w ? (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)) 475 } else 0 <= p.indexOf("line") || 0 <= p.indexOf("area") || 0 <= p.indexOf("scatter") ? (u = "auto", f = 476 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 > w ? (n = m.point.x - k - f - d, n < l && (n = "auto" === u ? Math.max(m.point.x, l) + f + d : l + f + d, A = 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, A = 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 > w ? 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, 477 b.x2)) / 2, n = 0 > w ? Math.max(m.point.x, d) - k / 2 : Math.min(m.point.x, d) - k / 2, n = Math.max(n, l)); "vertical" === v && (e += h); q.x = n; q.y = e; q.render(!0); x && ("inside" !== u && (0 > p.indexOf("bar") && m.point.x > b.x1 && m.point.x < b.x2 || !A) && (0 > p.indexOf("column") && m.point.y > b.y1 && m.point.y < b.y2 || !A)) && (c.lineWidth = x, c.strokeStyle = s ? s : "gray", c.setLineDash && c.setLineDash(F(r, x)), c.beginPath(), c.moveTo(m.point.x, m.point.y), 0 <= p.indexOf("bar") ? c.lineTo(n + (0 < m.direction ? 0 : k), e + ("horizontal" === v ? h : -h) / 2) : 0 <= p.indexOf("column") ? c.lineTo(n +
478 k / 2, e + ((0 < m.direction ? h : -h) + ("horizontal" === v ? h : -h)) / 2) : c.lineTo(n + k / 2, e + ((e < m.point.y ? h : -h) + ("horizontal" === v ? h : -h)) / 2), c.stroke()) 479 } 480 } 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 = M("indexLabelBackgroundColor", m.dataPoint, m.dataSeries), m.dataSeries.indexLabelBackgroundColor = y(q) ? t ? "transparent" : null : q; return c 481 }; A.prototype.renderLine = function (a) { 482 var c = 483 a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 484 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++) { 485 var l = a.dataSeriesIndexes[g], k = this.data[l]; c.lineWidth = k.lineThickness; var h = k.dataPoints, m = "solid"; if (c.setLineDash) { var p = F(k.nullDataLineDashType, k.lineThickness), m = k.lineDashType, n = F(m, k.lineThickness); c.setLineDash(n) } var e = k.id; this._eventManager.objectMap[e] = 486 { objectType: "dataSeries", dataSeriesIndex: l }; e = D(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, x, u; c.beginPath(); if (0 < h.length) { 487 for (var v = !1, s = 0; s < h.length; s++) if (x = h[s].x.getTime ? h[s].x.getTime() : h[s].x, !(x < a.axisX.dataInfo.viewPortMin || x > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !v))) if ("number" !== typeof h[s].y) 0 < s && !(k.connectNullData || v || r) && (c.stroke(), 488 t && b.stroke()), v = !0; else { 489 x = a.axisX.convertValueToPixel(x); u = a.axisY.convertValueToPixel(h[s].y); var z = k.dataPointIds[s]; this._eventManager.objectMap[z] = { id: z, objectType: "dataPoint", dataSeriesIndex: l, dataPointIndex: s, x1: x, y1: u }; r || v ? (!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(x, u), t && b.lineTo(x, u)) : (c.beginPath(), c.moveTo(x, 490 u), t && (b.beginPath(), b.moveTo(x, u))), v = r = !1) : (c.lineTo(x, u), t && b.lineTo(x, u), 0 == s % 500 && (c.stroke(), c.beginPath(), c.moveTo(x, u), t && (b.stroke(), b.beginPath(), b.moveTo(x, u)))); f = { x: x, y: u }; s < h.length - 1 && (q !== (h[s].lineColor || e) || m !== (h[s].lineDashType || k.lineDashType)) && (c.stroke(), c.beginPath(), c.moveTo(x, u), q = h[s].lineColor || e, c.strokeStyle = q, c.setLineDash && (h[s].lineDashType ? (m = h[s].lineDashType, c.setLineDash(F(m, k.lineThickness))) : (m = k.lineDashType, c.setLineDash(n)))); if (0 < h[s].markerSize || 0 < k.markerSize) { 491 var w = 492 k.getMarkerProperties(s, x, u, c); d.push(w); z = D(z); t && d.push({ x: x, y: u, ctx: b, type: w.type, size: w.size, color: z, borderColor: z, borderThickness: w.borderThickness }) 493 } (h[s].indexLabel || k.indexLabel || h[s].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({ chartType: "line", dataPoint: h[s], dataSeries: k, point: { x: x, y: u }, direction: 0 > h[s].y === a.axisY.reversed ? 1 : -1, color: e }) 494 } c.stroke(); t && b.stroke() 495 } 496 } O.drawMarkers(d); c.restore(); c.beginPath(); t && b.beginPath(); return { 497 source: c, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, 498 easingFunction: E.easing.linear, animationBase: 0 499 } 500 } 501 }; A.prototype.renderStepLine = function (a) { 502 var c = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 503 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++) { 504 var l = a.dataSeriesIndexes[g], k = this.data[l]; c.lineWidth = k.lineThickness;
504 var h = k.dataPoints, m = "solid"; if (c.setLineDash) { 505 var p = F(k.nullDataLineDashType, k.lineThickness), 506 m = k.lineDashType, n = F(m, k.lineThickness); c.setLineDash(n) 507 } var e = k.id; this._eventManager.objectMap[e] = { objectType: "dataSeries", dataSeriesIndex: l }; e = D(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, x, u; c.beginPath(); if (0 < h.length) { 508 for (var v = !1, s = 0; s < h.length; s++) if (x = h[s].getTime ? h[s].x.getTime() : h[s].x, !(x < a.axisX.dataInfo.viewPortMin || x > a.axisX.dataInfo.viewPortMax && 509 (!k.connectNullData || !v))) if ("number" !== typeof h[s].y) 0 < s && !(k.connectNullData || v || r) && (c.stroke(), t && b.stroke()), v = !0; else { 510 var z = u; x = a.axisX.convertValueToPixel(x); u = a.axisY.convertValueToPixel(h[s].y); var w = k.dataPointIds[s]; this._eventManager.objectMap[w] = { id: w, objectType: "dataPoint", dataSeriesIndex: l, dataPointIndex: s, x1: x, y1: u }; r || v ? (!r && k.connectNullData ? (c.setLineDash && (k.options.nullDataLineDashType || m === k.lineDashType && k.lineDashType !== k.nullDataLineDashType) && (c.stroke(), c.beginPath(), c.moveTo(f.x, 511 f.y), m = k.nullDataLineDashType, c.setLineDash(p)), c.lineTo(x, z), c.lineTo(x, u), t && (b.lineTo(x, z), b.lineTo(x, u))) : (c.beginPath(), c.moveTo(x, u), t && (b.beginPath(), b.moveTo(x, u))), v = r = !1) : (c.lineTo(x, z), t && b.lineTo(x, z), c.lineTo(x, u), t && b.lineTo(x, u), 0 == s % 500 && (c.stroke(), c.beginPath(), c.moveTo(x, u), t && (b.stroke(), b.beginPath(), b.moveTo(x, u)))); f = { x: x, y: u }; s < h.length - 1 && (q !== (h[s].lineColor || e) || m !== (h[s].lineDashType || k.lineDashType)) && (c.stroke(), c.beginPath(), c.moveTo(x, u), q = h[s].lineColor || e, c.strokeStyle = 512 q, c.setLineDash && (h[s].lineDashType ? (m = h[s].lineDashType, c.setLineDash(F(m, k.lineThickness))) : (m = k.lineDashType, c.setLineDash(n)))); if (0 < h[s].markerSize || 0 < k.markerSize) z = k.getMarkerProperties(s, x, u, c), d.push(z), w = D(w), t && d.push({ x: x, y: u, ctx: b, type: z.type, size: z.size, color: w, borderColor: w, borderThickness: z.borderThickness }); (h[s].indexLabel || k.indexLabel || h[s].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({ 513 chartType: "stepLine", dataPoint: h[s], dataSeries: k, point: { x: x, y: u }, direction: 0 > 514 h[s].y === a.axisY.reversed ? 1 : -1, color: e 515 }) 516 } c.stroke(); t && b.stroke() 517 } 518 } O.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 } 519 } 520 }; A.prototype.renderSpline = function (a) { 521 function c(a) { 522 a = wa(a, 2); if (0 < a.length) { 523 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 && 524 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)); 525 b.stroke(); t && d.stroke() 526 } 527 } var b = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 528 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++) { 529 var l = a.dataSeriesIndexes[g], k = this.data[l]; b.lineWidth = k.lineThickness;
529 var h = k.dataPoints, m = "solid"; if (b.setLineDash) { var p = F(k.nullDataLineDashType, k.lineThickness), m = k.lineDashType, n = F(m, k.lineThickness); b.setLineDash(n) } var e = 530 k.id; this._eventManager.objectMap[e] = { objectType: "dataSeries", dataSeriesIndex: l }; e = D(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, x, u = []; b.beginPath(); if (0 < h.length) for (x = !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 || !x))) if ("number" !== typeof h[r].y) 0 < r && !x && 531 (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 = [])), x = !0; else { 532 s = a.axisX.convertValueToPixel(s); x = a.axisY.convertValueToPixel(h[r].y); var v = k.dataPointIds[r]; this._eventManager.objectMap[v] = { id: v, objectType: "dataPoint", dataSeriesIndex: l, dataPointIndex: r, x1: s, y1: x }; u[u.length] = { x: s, y: x }; r < h.length - 1 && (q !== (h[r].lineColor || e) || m !== (h[r].lineDashType || k.lineDashType)) && (q = h[r].lineColor || 533 e, u[u.length - 1].newStrokeStyle = q, b.setLineDash && (h[r].lineDashType ? (m = h[r].lineDashType, u[u.length - 1].newLineDashArray = F(m, k.lineThickness)) : (m = k.lineDashType, u[u.length - 1].newLineDashArray = n))); if (0 < h[r].markerSize || 0 < k.markerSize) { var z = k.getMarkerProperties(r, s, x, b); f.push(z); v = D(v); t && f.push({ x: s, y: x, ctx: d, type: z.type, size: z.size, color: v, borderColor: v, borderThickness: z.borderThickness }) } (h[r].indexLabel || k.indexLabel || h[r].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({ 534 chartType: "spline", 535 dataPoint: h[r], dataSeries: k, point: { x: s, y: x }, direction: 0 > h[r].y === a.axisY.reversed ? 1 : -1, color: e 536 }); x = !1 537 } c(u) 538 } O.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 } 539 } 540 }; var N = function (a, c, b, d, f, g, l, k, h, m, p, n, e) { 541 "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, 542 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), 543 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 - 544 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(
544)) 545 }; A.prototype.renderColumn = function (a) { 546 var c = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 547 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 = 548 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)) / 549 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()); 550 for (d = 0; d < a.dataSeriesIndexes.length; d++) { 551 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) { 552 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 + 553 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]; N(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 = D(b); t && N(this._eventManager.ghostCtx, g, l, r, s, b, 0, null, !1, !1, !1, !1); (e[f].indexLabel || n.indexLabel || e[f].indexLabelFormatter || n.indexLabelFormatter) && 554 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 }) 555 } 556 } 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 } 557 } 558 }; A.prototype.renderStackedColumn = 559 function (a) { 560 var c = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 561 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 ? 562 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(); 563 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++) { 564 var e = a.dataSeriesIndexes[p], q = this.data[e], r = q.dataPoints; if (0 < r.length) { 565 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) { 566 var d = a.axisX.convertValueToPixel(b), 567 x = d - a.plotType.plotUnits.length * n / 2 + a.index * n << 0, u = x + n << 0, v; if (a.axisY.logarithmic) l[b] = r[k].y + (l[b] ? l[b] : 0), 0 < l[b] && (h = a.axisY.convertValueToPixel(l[b]), v = f[b] ? f[b] : m, f[b] = h); else if (h = a.axisY.convertValueToPixel(r[k].y), 0 <= r[k].y) { var z = f[b] ? f[b] : 0; h -= z; v = m - z; f[b] = z + (v - h) } else z = g[b] ? g[b] : 0, v = h + z, h = m + z, g[b] = z + (v - h); b = r[k].color ? r[k].color : q._colorSet[k % q._colorSet.length]; N(c, x, h, u, v, b, 0, null, s && 0 <= r[k].y, 0 > r[k].y && s, !1, !1, q.fillOpacity);
567 b = q.dataPointIds[k]; this._eventManager.objectMap[b] = { 568 id: b, 569 objectType: "dataPoint", dataSeriesIndex: e, dataPointIndex: k, x1: x, y1: h, x2: u, y2: v 570 }; b = D(b); t && N(this._eventManager.ghostCtx, x, h, u, v, 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 : v }, direction: 0 > r[k].y === a.axisY.reversed ? 1 : -1, bounds: { x1: x, y1: Math.min(h, v), x2: u, y2: Math.max(h, v) }, color: b }) 571 } 572 } 573 } c.restore(); t && this._eventManager.ghostCtx.restore(); return { 574 source: c, 575 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 576 } 577 } 578 }; A.prototype.renderStackedColumn100 = function (a) { 579 var c = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 580 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 ? 581 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 && 582 (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++) { 583 var e = a.dataSeriesIndexes[p], q = this.data[e], r = q.dataPoints; if (0 < r.length) for (var s = 5 < n && q.bevelEnabled ? 584 !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) { 585 d = a.axisX.convertValueToPixel(b); h = 0 !== a.dataPointYSums[b] ? 100 * (r[k].y / a.dataPointYSums[b]) : 0; var x = d - a.plotType.plotUnits.length * n / 2 + a.index * n << 0, u = x + n << 0, v; if (a.axisY.logarithmic) { l[b] = h + (l[b] ? l[b] : 0); if (0 >= l[b]) continue; h = a.axisY.convertValueToPixel(l[b]); v = f[b] ? f[b] : m; f[b] = h } else if (h = a.axisY.convertValueToPixel(h), 0 <= r[k].y) { 586 var z = f[b] ? 587 f[b] : 0; h -= z; v = m - z; f[b] = z + (v - h) 588 } else z = g[b] ? g[b] : 0, v = h + z, h = m + z, g[b] = z + (v - h); b = r[k].color ? r[k].color : q._colorSet[k % q._colorSet.length]; N(c, x, h, u, v, 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: x, y1: h, x2: u, y2: v }; b = D(b); t && N(this._eventManager.ghostCtx, x, h, u, v, b, 0, null, !1, !1, !1, !1); (r[k].indexLabel || q.indexLabel || r[k].indexLabelFormatter || q.indexLabelFormatter) && this._indexLabels.push({ 589 chartType: "stackedColumn100", 590 dataPoint: r[k], dataSeries: q, point: { x: d, y: 0 <= r[k].y ? h : v }, direction: 0 > r[k].y === a.axisY.reversed ? 1 : -1, bounds: { x1: x, y1: Math.min(h, v), x2: u, y2: Math.max(h, v) }, color: b 591 }) 592 } 593 }
593 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 } 594 } 595 }; A.prototype.renderBar = function (a) { 596 var c = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= 597 a.dataSeriesIndexes.length)) { 598 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 : 599 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(), 600 this._eventManager.ghostCtx.rect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.clip()); for (d = 0; d < a.dataSeriesIndexes.length; d++) { 601 var m = a.dataSeriesIndexes[d], n = this.data[m], e = n.dataPoints; if (0 < e.length) { 602 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) { 603 l = a.axisX.convertValueToPixel(k); g = a.axisY.convertValueToPixel(e[f].y); 604 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]; N(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 = D(b); t && N(this._eventManager.ghostCtx, s, 605 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 }) 606 } 607 } 608 } c.restore(); t && this._eventManager.ghostCtx.restore(); return { 609 source: c, dest: this.plotArea.ctx, animationCallback: E.xScaleAnimation, easingFunction: E.easing.easeOutQuart, animationBase: h < 610 a.axisY.bounds.x1 ? a.axisY.bounds.x1 : h > a.axisY.bounds.x2 ? a.axisY.bounds.x2 : h 611 } 612 } 613 }; A.prototype.renderStackedBar = function (a) { 614 var c = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 615 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 : 616 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); 617 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++) { 618 var e = a.dataSeriesIndexes[p], q = this.data[e], r = q.dataPoints; if (0 < r.length) { 619 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 < 620 a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof r[k].y) { 621 var d = a.axisX.convertValueToPixel(b), x = d - a.plotType.plotUnits.length * n / 2 + a.index * n << 0, u = x + n << 0, v; if (a.axisY.logarithmic) l[b] = r[k].y + (l[b] ? l[b] : 0), 0 < l[b] && (v = 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 z = f[b] ? f[b] : 0; v = m + z; h += z; f[b] = z + (h - v) } else z = g[b] ? g[b] : 0, v = h - z, h = m - z, g[b] = z + (h - v); b = r[k].color ? r[k].color : q._colorSet[k % q._colorSet.length]; 622 N(c, v, x, h, u, b, 0, null, s, !1, !1, !1, q.fillOpacity);
622 b = q.dataPointIds[k]; this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: e, dataPointIndex: k, x1: v, y1: x, x2: h, y2: u }; b = D(b); t && N(this._eventManager.ghostCtx, v, x, h, u, b, 0, null, !1, !1, !1, !1); (r[k].indexLabel || q.indexLabel || r[k].indexLabelFormatter || q.indexLabelFormatter) && this._indexLabels.push({ 623 chartType: "stackedBar", dataPoint: r[k], dataSeries: q, point: { x: 0 <= r[k].y ? h : v, y: d }, direction: 0 > r[k].y === a.axisY.reversed ? 1 : -1, bounds: { 624 x1: Math.min(v, 625 h), y1: x, x2: Math.max(v, h), y2: u 626 }, color: b 627 }) 628 } 629 } 630 } 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 } 631 } 632 }; A.prototype.renderStackedBar100 = function (a) { 633 var c = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 634 var b = null, d = this.plotArea, f = [], g = [], l = [], k = 0, h, m = a.axisY.convertValueToPixel(a.axisY.logarithmic ? 635 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 && 636 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++) { 637 var e = 638 a.dataSeriesIndexes[p], q = this.data[e], r = q.dataPoints; if (0 < r.length) { 639 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) { 640 var d = a.axisX.convertValueToPixel(b), x; x = 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, v = u + n << 0; if (a.axisY.logarithmic) { 641 l[b] = x + (l[b] ? l[b] : 0); if (0 >= l[b]) continue; 642 x = f[b] ? f[b] : m; f[b] = h = a.axisY.convertValueToPixel(l[b]) 643 } else if (h = a.axisY.convertValueToPixel(x), 0 <= r[k].y) { var z = f[b] ? f[b] : 0; x = m + z; h += z; f[b] = z + (h - x) } else z = g[b] ? g[b] : 0, x = h - z, h = m - z, g[b] = z + (h - x); b = r[k].color ? r[k].color : q._colorSet[k % q._colorSet.length]; N(c, x, u, h, v, 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: x, y1: u, x2: h, y2: v }; b = D(b); t && N(this._eventManager.ghostCtx, x, u, h, v, b, 0, null, !1, !1, !1, 644 !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 : x, y: d }, direction: 0 > r[k].y === a.axisY.reversed ? 1 : -1, bounds: { x1: Math.min(x, h), y1: u, x2: Math.max(x, h), y2: v }, color: b }) 645 } 646 } 647 }
647 c.restore(); t && this._eventManager.ghostCtx.restore(); return { 648 source: c, dest: this.plotArea.ctx, animationCallback: E.xScaleAnimation, easingFunction: E.easing.easeOutQuart, animationBase: m < a.axisY.bounds.x1 ? a.axisY.bounds.x1 : 649 m > a.axisY.bounds.x2 ? a.axisY.bounds.x2 : m 650 } 651 } 652 }; A.prototype.renderArea = function (a) { 653 var c, b; function d() { w && (0 < e.lineThickness && f.stroke(), a.axisY.logarithmic || 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? z = v : 0 > a.axisY.viewportMaximum ? z = k.y1 : 0 < a.axisY.viewportMinimum && (z = l.y2), f.lineTo(s, z), f.lineTo(w.x, z), f.closePath(), f.globalAlpha = e.fillOpacity, f.fill(), f.globalAlpha = 1, t && (g.lineTo(s, z), g.lineTo(w.x, z), g.closePath(), g.fill()), f.beginPath(), f.moveTo(s, x), g.beginPath(), g.moveTo(s, x), w = { x: s, y: x }) } 654 var f = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 655 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++) { 656 var n = a.dataSeriesIndexes[m], e = this.data[n], q = e.dataPoints, h = e.id; this._eventManager.objectMap[h] = { objectType: "dataSeries", dataSeriesIndex: n }; 657 h = D(h); g.fillStyle = h; h = []; c = !0; var r = 0, s, x, u, v = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), z, w = null; if (0 < q.length) { 658 var y = e._colorSet[r % e._colorSet.length], aa = e.lineColor = e.options.lineColor || y, A = aa; f.fillStyle = y; f.strokeStyle = aa; f.lineWidth = e.lineThickness; b = "solid"; if (f.setLineDash) { var B = F(e.nullDataLineDashType, e.lineThickness); b = e.lineDashType; var V = F(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 < 659 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 { 660 s = a.axisX.convertValueToPixel(u); x = 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 = x, s = p.x, x = p.y, d(), f.moveTo(p.x, p.y), s = c, x = b, w = p, b = e.nullDataLineDashType, f.setLineDash(B)), f.lineTo(s, x), t && g.lineTo(s, x)) : (f.beginPath(), 661 f.moveTo(s, x), t && (g.beginPath(), g.moveTo(s, x)), w = { x: s, y: x }), W = c = !1) : (f.lineTo(s, x), t && g.lineTo(s, x), 0 == r % 250 && d()); p = { x: s, y: x }; r < q.length - 1 && (A !== (q[r].lineColor || aa) || b !== (q[r].lineDashType || e.lineDashType)) && (d(), A = q[r].lineColor || aa, f.strokeStyle = A, f.setLineDash && (q[r].lineDashType ? (b = q[r].lineDashType, f.setLineDash(F(b, e.lineThickness))) : (b = e.lineDashType, f.setLineDash(V)))); var H = e.dataPointIds[r]; this._eventManager.objectMap[H] = { 662 id: H, objectType: "dataPoint", dataSeriesIndex: n, dataPointIndex: r, 663 x1: s, y1: x 664 }; 0 !== q[r].markerSize && (0 < q[r].markerSize || 0 < e.markerSize) && (u = e.getMarkerProperties(r, s, x, f), h.push(u), H = D(H), t && h.push({ x: s, y: x, ctx: g, type: u.type, size: u.size, color: H, borderColor: H, 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: x }, direction: 0 > q[r].y === a.axisY.reversed ? 1 : -1, color: y }) 665 } d(); O.drawMarkers(h) 666 } 667 } f.restore();
667 t && this._eventManager.ghostCtx.restore(); 668 return { source: f, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 } 669 } 670 }; A.prototype.renderSplineArea = function (a) { 671 function c() { 672 var c = wa(u, 2); if (0 < c.length) { 673 if (0 < m.lineThickness) { 674 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 + 675 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() 676 } 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, 677 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); x = { x: c[0].x, y: c[0].y }; b.lineTo(c[c.length - 1].x, s); b.lineTo(x.x, s); b.closePath(); b.globalAlpha = m.fillOpacity; b.fill(); b.globalAlpha = 1; t && (d.lineTo(c[c.length - 1].x, s), d.lineTo(x.x, s), d.closePath(), d.fill()) 678 } 679 } var b = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 680 var d = this._eventManager.ghostCtx, 681 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++) { 682 var h = a.dataSeriesIndexes[k], m = this.data[h], p = m.dataPoints, l = m.id; this._eventManager.objectMap[l] = { objectType: "dataSeries", dataSeriesIndex: h }; l = D(l); d.fillStyle = l; var l = [], n = 0, e, q, r = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 683 0), s, x = null, u = []; if (0 < p.length) { 684 var v = m._colorSet[n % m._colorSet.length], z = m.lineColor = m.options.lineColor || v, w = z; b.fillStyle = v; b.strokeStyle = z; b.lineWidth = m.lineThickness; var y = "solid"; if (b.setLineDash) { var A = F(m.nullDataLineDashType, m.lineThickness), y = m.lineDashType, B = F(y, 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 && 685 !q && (m.connectNullData ? b.setLineDash && (0 < u.length && (m.options.nullDataLineDashType || !p[n - 1].lineDashType)) && (u[u.length - 1].newLineDashArray = A, y = m.nullDataLineDashType) : (c(), u = [])), q = !0; else { 686 e = a.axisX.convertValueToPixel(e); q = a.axisY.convertValueToPixel(p[n].y); var J = m.dataPointIds[n]; this._eventManager.objectMap[J] = { id: J, objectType: "dataPoint", dataSeriesIndex: h, dataPointIndex: n, x1: e, y1: q }; u[u.length] = { x: e, y: q }; n < p.length - 1 && (w !== (p[n].lineColor || z) || y !== (p[n].lineDashType || m.lineDashType)) && (w = p[n].lineColor || 687 z, u[u.length - 1].newStrokeStyle = w, b.setLineDash && (p[n].lineDashType ? (y = p[n].lineDashType, u[u.length - 1].newLineDashArray = F(y, m.lineThickness)) : (y = 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); J = D(J); t && l.push({ x: e, y: q, ctx: d, type: V.type, size: V.size, color: J, borderColor: J, borderThickness: V.borderThickness }) } (p[n].indexLabel || m.indexLabel || p[n].indexLabelFormatter || m.indexLabelFormatter) && this._indexLabels.push({ 688 chartType: "splineArea", 689 dataPoint: p[n], dataSeries: m, point: { x: e, y: q }, direction: 0 >
689 p[n].y === a.axisY.reversed ? 1 : -1, color: v 690 }); q = !1 691 } c(); O.drawMarkers(l) 692 } 693 } b.restore(); t && this._eventManager.ghostCtx.restore(); return { source: b, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 } 694 } 695 }; A.prototype.renderStepArea = function (a) { 696 var c, b; function d() { 697 w && (0 < e.lineThickness && f.stroke(), a.axisY.logarithmic || 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? z = v : 0 > a.axisY.viewportMaximum ? 698 z = k.y1 : 0 < a.axisY.viewportMinimum && (z = l.y2), f.lineTo(s, z), f.lineTo(w.x, z), f.closePath(), f.globalAlpha = e.fillOpacity, f.fill(), f.globalAlpha = 1, t && (g.lineTo(s, z), g.lineTo(w.x, z), g.closePath(), g.fill()), f.beginPath(), f.moveTo(s, x), g.beginPath(), g.moveTo(s, x), w = { x: s, y: x }) 699 } var f = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 700 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, 701 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++) { 702 var n = a.dataSeriesIndexes[m], e = this.data[n], q = e.dataPoints, h = e.id; this._eventManager.objectMap[h] = { objectType: "dataSeries", dataSeriesIndex: n }; h = D(h); g.fillStyle = h; h = []; c = !0; var r = 0, s, x, u, v = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), z, w = null; b = !1; if (0 < q.length) { 703 var y = e._colorSet[r % e._colorSet.length], A = e.lineColor = e.options.lineColor || 704 y, B = A; f.fillStyle = y; f.strokeStyle = A; f.lineWidth = e.lineThickness; var J = "solid"; if (f.setLineDash) { var V = F(e.nullDataLineDashType, e.lineThickness), J = e.lineDashType, W = F(J, 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))) { 705 var H = x; "number" !== typeof q[r].y ? (e.connectNullData || (b || c) || d(), b = !0) : (s = a.axisX.convertValueToPixel(u), x = a.axisY.convertValueToPixel(q[r].y), 706 c || b ? (!c && e.connectNullData ? (f.setLineDash && (e.options.nullDataLineDashType || J === e.lineDashType && e.lineDashType !== e.nullDataLineDashType) && (c = s, b = x, s = p.x, x = p.y, d(), f.moveTo(p.x, p.y), s = c, x = b, w = p, J = e.nullDataLineDashType, f.setLineDash(V)), f.lineTo(s, H), f.lineTo(s, x), t && (g.lineTo(s, H), g.lineTo(s, x))) : (f.beginPath(), f.moveTo(s, x), t && (g.beginPath(), g.moveTo(s, x)), w = { x: s, y: x }), b = c = !1) : (f.lineTo(s, H), t && g.lineTo(s, H), f.lineTo(s, x), t && g.lineTo(s, x), 0 == r % 250 && d()), p = { x: s, y: x }, r < q.length - 1 && (B !== (q[r].lineColor || 707 A) || J !== (q[r].lineDashType || e.lineDashType)) && (d(), B = q[r].lineColor || A, f.strokeStyle = B, f.setLineDash && (q[r].lineDashType ? (J = q[r].lineDashType, f.setLineDash(F(J, e.lineThickness))) : (J = e.lineDashType, f.setLineDash(W)))), u = e.dataPointIds[r], this._eventManager.objectMap[u] = { id: u, objectType: "dataPoint", dataSeriesIndex: n, dataPointIndex: r, x1: s, y1: x }, 0 !== q[r].markerSize && (0 < q[r].markerSize || 0 < e.markerSize) && (H = e.getMarkerProperties(r, s, x, f), h.push(H), u = D(u), t && h.push({ 708 x: s, y: x, ctx: g, type: H.type, size: H.size, 709 color: u, borderColor: u, borderThickness: H.borderThickness 710 })), (q[r].indexLabel || e.indexLabel || q[r].indexLabelFormatter || e.indexLabelFormatter) && this._indexLabels.push({ chartType: "stepArea", dataPoint: q[r], dataSeries: e, point: { x: s, y: x }, direction: 0 > q[r].y === a.axisY.reversed ? 1 : -1, color: y })) 711 } d(); O.drawMarkers(h) 712 } 713 }
713 f.restore(); t && this._eventManager.ghostCtx.restore(); return { source: f, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 } 714 } 715 }; A.prototype.renderStackedArea = 716 function (a) { 717 function c() { if (!(1 > k.length)) { for (0 < w.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 = w.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)) { 718 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, 719 x, u, v; 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 z = a.dataSeriesIndexes[g], w = this.data[z], y = w.dataPoints; w.dataPointIndexes = []; for (p = 0; p < y.length; p++) z = y[p].x.getTime ? y[p].x.getTime() : y[p].x, w.dataPointIndexes[z] = p, d[z] || (h.push(z), d[z] = !0); h.sort(Aa) } for (g = 0; g < a.dataSeriesIndexes.length; g++) { 720 z = a.dataSeriesIndexes[g]; w = this.data[z]; y = 721 w.dataPoints; u = !0; k = []; p = w.id; this._eventManager.objectMap[p] = { objectType: "dataSeries", dataSeriesIndex: z }; p = D(p); s.fillStyle = p; if (0 < h.length) { 722 var d = w._colorSet[0], A = w.lineColor = w.options.lineColor || d, B = A; b.fillStyle = d; b.strokeStyle = A; b.lineWidth = w.lineThickness; v = "solid"; if (b.setLineDash) { var J = F(w.nullDataLineDashType, w.lineThickness); v = w.lineDashType; var V = F(v, w.lineThickness); b.setLineDash(V) } for (var W = !0, p = 0; p < h.length; p++) { 723 q = h[p]; var H = null, H = 0 <= w.dataPointIndexes[q] ? y[w.dataPointIndexes[q]] : 724{ x: q, y: null }; if (!(q < a.axisX.dataInfo.viewPortMin || q > a.axisX.dataInfo.viewPortMax && (!w.connectNullData || !W))) if ("number" !== typeof H.y) w.connectNullData || (W || u) || c(), W = !0; else { 725 n = a.axisX.convertValueToPixel(q); var ea = l[q] ? l[q] : 0; if (a.axisY.logarithmic) { m[q] = H.y + (m[q] ? m[q] : 0); if (0 >= m[q]) continue; e = a.axisY.convertValueToPixel(m[q]) } else e = a.axisY.convertValueToPixel(H.y), e -= ea; k.push({ x: n, y: r - ea }); l[q] = r - e; u || W ? (!u && w.connectNullData ? (b.setLineDash && (w.options.nullDataLineDashType || v === w.lineDashType && 726 w.lineDashType !== w.nullDataLineDashType) && (u = k.pop(), v = k[k.length - 1], c(), b.moveTo(x.x, x.y), k.push(v), k.push(u), v = w.nullDataLineDashType, b.setLineDash(J)), 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 - ea }))); x = { x: n, y: e }; p < y.length - 1 && (B !== (y[p].lineColor || A) || v !== (y[p].lineDashType || w.lineDashType)) && (c(), b.beginPath(), b.moveTo(n, e), k.push({ 727 x: n, y: r - 728 ea 729 }), B = y[p].lineColor || A, b.strokeStyle = B, b.setLineDash && (y[p].lineDashType ? (v = y[p].lineDashType, b.setLineDash(F(v, w.lineThickness))) : (v = w.lineDashType, b.setLineDash(V)))); if (0 <= w.dataPointIndexes[q]) { var fa = w.dataPointIds[w.dataPointIndexes[q]]; this._eventManager.objectMap[fa] = { id: fa, objectType: "dataPoint", dataSeriesIndex: z, dataPointIndex: w.dataPointIndexes[q], x1: n, y1: e } } 0 <= w.dataPointIndexes[q] && 0 !== H.markerSize && (0 < H.markerSize || 0 < w.markerSize) && (q = w.getMarkerProperties(w.dataPointIndexes[q], n, 730 e, b), f.push(q), markerColor = D(fa), t && f.push({ x: n, y: e, ctx: s, type: q.type, size: q.size, color: markerColor, borderColor: markerColor, borderThickness: q.borderThickness })); (H.indexLabel || w.indexLabel || H.indexLabelFormatter || w.indexLabelFormatter) && this._indexLabels.push({ chartType: "stackedArea", dataPoint: H, dataSeries: w, point: { x: n, y: e }, direction: 0 >
730 y[p].y === a.axisY.reversed ? 1 : -1, color: d }) 731} 732 } c(); b.moveTo(n, e); t && s.moveTo(n, e) 733 } delete w.dataPointIndexes 734 } O.drawMarkers(f); b.restore(); t && s.restore(); return { 735 source: b, 736 dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 737 } 738 } 739 }; A.prototype.renderStackedArea100 = function (a) { 740 function c() { for (0 < w.lineThickness && b.stroke() ; 0 < k.length;) { var a = k.pop(); b.lineTo(a.x, a.y); t && v.lineTo(a.x, a.y) } b.closePath(); b.globalAlpha = w.fillOpacity; b.fill(); b.globalAlpha = 1; b.beginPath(); t && (v.closePath(), v.fill(), v.beginPath()); k = [] } var b = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 741 var d = null, f = this.plotArea, 742 g = [], l = [], k = [], h = [], m = [], p = 0, n, e, q, r, s, x, u = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), v = this._eventManager.ghostCtx; b.save(); t && v.save(); b.beginPath(); b.rect(f.x1, f.y1, f.width, f.height); b.clip(); t && (v.beginPath(), v.rect(f.x1, f.y1, f.width, f.height), v.clip()); d = []; for (f = 0; f < a.dataSeriesIndexes.length; f++) { 743 var z = a.dataSeriesIndexes[f], w = this.data[z], y = w.dataPoints; w.dataPointIndexes = []; for (p = 0; p < y.length; p++) z = y[p].x.getTime ? y[p].x.getTime() : y[p].x, w.dataPointIndexes[z] = 744 p, d[z] || (h.push(z), d[z] = !0); h.sort(Aa) 745 } for (f = 0; f < a.dataSeriesIndexes.length; f++) { 746 z = a.dataSeriesIndexes[f]; w = this.data[z]; y = w.dataPoints; s = !0; d = w.id; this._eventManager.objectMap[d] = { objectType: "dataSeries", dataSeriesIndex: z }; d = D(d); v.fillStyle = d; k = []; if (0 < h.length) { 747 var d = w._colorSet[p % w._colorSet.length], A = w.lineColor = w.options.lineColor || d, B = A; b.fillStyle = d; b.strokeStyle = A; b.lineWidth = w.lineThickness; x = "solid"; if (b.setLineDash) { 748 var J = F(w.nullDataLineDashType, w.lineThickness); x = w.lineDashType; var V = 749 F(x, w.lineThickness); b.setLineDash(V) 750 } for (var W = !0, p = 0; p < h.length; p++) { 751 q = h[p]; var H = null, H = 0 <= w.dataPointIndexes[q] ? y[w.dataPointIndexes[q]] : { x: q, y: null }; if (!(q < a.axisX.dataInfo.viewPortMin || q > a.axisX.dataInfo.viewPortMax && (!w.connectNullData || !W))) if ("number" !== typeof H.y) w.connectNullData || (W || s) || c(), W = !0; else { 752 var ea; ea = 0 !== a.dataPointYSums[q] ? 100 * (H.y / a.dataPointYSums[q]) : 0; n = a.axisX.convertValueToPixel(q); var fa = l[q] ? l[q] : 0; if (a.axisY.logarithmic) { 753 m[q] = ea + (m[q] ? m[q] : 0); if (0 >= m[q]) continue; e = 754 a.axisY.convertValueToPixel(m[q]) 755 } else e = a.axisY.convertValueToPixel(ea), e -= fa; k.push({ x: n, y: u - fa }); l[q] = u - e; s || W ? (!s && w.connectNullData ? (b.setLineDash && (w.options.nullDataLineDashType || x === w.lineDashType && w.lineDashType !== w.nullDataLineDashType) && (s = k.pop(), x = k[k.length - 1], c(), b.moveTo(r.x, r.y), k.push(x), k.push(s), x = w.nullDataLineDashType, b.setLineDash(J)), b.lineTo(n, e), t && v.lineTo(n, e)) : (b.beginPath(), b.moveTo(n, e), t && (v.beginPath(), v.moveTo(n, e))), W = s = !1) : (b.lineTo(n, e), t && v.lineTo(n, e), 0 == p % 250 && 756 (c(), b.moveTo(n, e), t && v.moveTo(n, e), k.push({ x: n, y: u - fa }))); r = { x: n, y: e }; p < y.length - 1 && (B !== (y[p].lineColor || A) || x !== (y[p].lineDashType || w.lineDashType)) && (c(), b.beginPath(), b.moveTo(n, e), k.push({ x: n, y: u - fa }), B = y[p].lineColor || A, b.strokeStyle = B, b.setLineDash && (y[p].lineDashType ? (x = y[p].lineDashType, b.setLineDash(F(x, w.lineThickness))) : (x = w.lineDashType, b.setLineDash(V)))); if (0 <= w.dataPointIndexes[q]) { 757 var Ga = w.dataPointIds[w.dataPointIndexes[q]]; this._eventManager.objectMap[Ga] = { 758 id: Ga, objectType: "dataPoint", 759 dataSeriesIndex: z, dataPointIndex: w.dataPointIndexes[q], x1: n, y1: e 760 } 761 } 0 <= w.dataPointIndexes[q] && 0 !== H.markerSize && (0 < H.markerSize || 0 < w.markerSize) && (q = w.getMarkerProperties(p, n, e, b), g.pu
761sh(q), markerColor = D(Ga), t && g.push({ x: n, y: e, ctx: v, type: q.type, size: q.size, color: markerColor, borderColor: markerColor, borderThickness: q.borderThickness })); (H.indexLabel || w.indexLabel || H.indexLabelFormatter || w.indexLabelFormatter) && this._indexLabels.push({ 762 chartType: "stackedArea100", dataPoint: H, dataSeries: w, point: { x: n, y: e }, 763 direction: 0 > y[p].y === a.axisY.reversed ? 1 : -1, color: d 764 }) 765 } 766 } c(); b.moveTo(n, e); t && v.moveTo(n, e) 767 } delete w.dataPointIndexes 768 } O.drawMarkers(g); b.restore(); t && v.restore(); return { source: b, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 } 769 } 770 }; A.prototype.renderBubble = function (a) { 771 var c = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 772 var b = this.plotArea, d = 0, f, g; c.save(); t && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(b.x1, 773 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 = 774 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) { 775 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 - 776 k) * (e - k)) / Math.PI) << 0, 1), e = p.getMarkerProperties(d, c); e.size = r; c.globalAlpha = p.fillOpacity; O.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 = D(s); t && O.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({ 777 chartType: "bubble", 778 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 779 }) 780 } c.restore(); t && this._eventManager.ghostCtx.restore(); return { source: c, dest: this.plotArea.ctx, animationCallback: E.fadeInAnimation, easingFunction: E.easing.easeInQuad, animationBase: 0 } 781 } 782 }; A.prototype.renderScatter = function (a) { 783 var c = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 784 var b = this.plotArea, d = 0, f, g; c.save(); t && this._eventManager.ghostCtx.save(); 785 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++) { 786 var k = a.dataSeriesIndexes[l], h = this.data[k], m = h.dataPoints; if (0 < m.length) { 787 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 || 788 f > a.axisX.dataInfo.viewPortMax) && "number" === typeof m[d].y) { 789 f = a.axisX.convertValueToPixel(f); g = a.axisY.convertValueToPixel(m[d].y); var e = h.getMarkerProperties(d, f, g, c);
789 c.globalAlpha = h.fillOpacity; O.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] = { 790 id: p, objectType: "dataPoint", dataSeriesIndex: k, 791 dataPointIndex: d, x1: f, y1: g 792 }, p = D(p), t && O.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) 793 } 794 } 795 } c.restore(); t && this._eventManager.ghostCtx.restore(); return { 796 source: c, dest: this.plotArea.ctx, animationCallback: E.fadeInAnimation, 797 easingFunction: E.easing.easeInQuad, animationBase: 0 798 } 799 } 800 }; A.prototype.renderCandlestick = function (a) { 801 var c = a.targetCanvasCtx || this.plotArea.ctx, b = this._eventManager.ghostCtx; if (!(0 >= a.dataSeriesIndexes.length)) { 802 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)); 803 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, 804 d.width, d.height), b.clip()); for (var e = 0; e < a.dataSeriesIndexes.length; e++) { 805 var q = a.dataSeriesIndexes[e], r = this.data[q], s = r.dataPoints; if (0 < s.length) for (var x = 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]) { 806 g = a.axisX.convertValueToPixel(p); l = a.axisY.convertValueToPixel(s[f].y[0]); 807 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, v = u + n << 0, d = s[f].color ? s[f].color : r._colorSet[0], z = Math.round(Math.max(1, 0.15 * n)), w = 0 === z % 2 ? 0 : 0.5, y = r.dataPointIds[f]; this._eventManager.objectMap[y] = { id: y, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: f, x1: u, y1: l, x2: v, y2: k, x3: g, y3: h, x4: g, y4: m, borderThickness: z, color: d }; c.strokeStyle = d; c.beginPath(); c.lineWidth = z; b.lineWidth = Math.max(z, 4); "candlestick" === 808 r.type ? (c.moveTo(g - w, k), c.lineTo(g - w, Math.min(l, m)), c.stroke(), c.moveTo(g - w, Math.max(l, m)), c.lineTo(g - w, h), c.stroke(), N(c, u, Math.min(l, m), v, Math.max(l, m), s[f].y[0] <= s[f].y[3] ? r.risingColor : d, z, d, x, x, !1, !1, r.fillOpacity), t && (d = D(y), b.strokeStyle = d, b.moveTo(g - w, k), b.lineTo(g - w, Math.min(l, m)), b.stroke(), b.moveTo(g - w, Math.max(l, m)), b.lineTo(g - w, h), b.stroke(), N(b, u, Math.min(l, m), v, Math.max(l, m), d, 0, null, !1, !1, !1, !1))) : "ohlc" === r.type && (c.moveTo(g - w, k), c.lineTo(g - w, h), c.stroke(), c.beginPath(), c.moveTo(g, 809 l), c.lineTo(u, l), c.stroke(), c.beginPath(), c.moveTo(g, m), c.lineTo(v, m), c.stroke(), t && (d = D(y), b.strokeStyle = d, b.moveTo(g - w, k), b.lineTo(g - w, h), b.stroke(), b.beginPath(), b.moveTo(g, l), b.lineTo(u, l), b.stroke(), b.beginPath(), b.moveTo(g, m), b.lineTo(v, m), b.stroke())); (s[f].indexLabel || r.indexLabel || s[f].indexLabelFormatter || r.indexLabelFormatter) && this._indexLabels.push({ 810 chartType: r.type, dataPoint: s[f], dataSeries: r, point: { x: u + (v - u) / 2, y: a.axisY.reversed ? h : k }, direction: 1, bounds: { 811 x1: u, y1: Math.min(k, h), x2: v, y2: Math.max(k, 812 h) 813 }, color: d 814 }) 815 } 816 }
816 c.restore(); t && b.restore(); return { source: c, dest: this.plotArea.ctx, animationCallback: E.fadeInAnimation, easingFunction: E.easing.easeInQuad, animationBase: 0 } 817 } 818 }; A.prototype.renderRangeColumn = function (a) { 819 var c = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 820 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 : 821 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 > 822 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++) { 823 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 || 824 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]) { 825 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) { 826 var s = d, 827 d = g; g = s 828 } s = p.dataPointIds[f]; this._eventManager.objectMap[s] = { id: s, objectType: "dataPoint", dataSeriesIndex: m, dataPointIndex: f, x1: q, y1: d, x2: r, y2: g }; N(c, q, d, r, g, b, 0, b, e, e, !1, !1, p.fillOpacity); b = D(s); t && N(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({ 829 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] ? 830 -1 : 1, bounds: { x1: q, y1: Math.min(d, g), x2: r, y2: Math.max(d, g) }, color: b 831 }), 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 }) 832 } 833 } c.restore(); t && this._eventManager.ghostCtx.restore(); return { source: c, dest: this.plotArea.ctx, animationCallback: E.fadeInAnimation, easingFunction: E.easing.easeInQuad, animationBase: 0 } 834 } 835 }; A.prototype.renderRangeBar = 836 function (a) { 837 var c = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 838 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
838)) << 0; var h = a.axisX.dataInfo.minDiff; isFinite(h) || (h = 0.3 * Math.abs(a.axisX.range)); h = this.dataPointWidth ? this.dataPointWidth : 839 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(), 840 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++) { 841 var p = a.dataSeriesIndexes[m], n = this.data[p], e = n.dataPoints; if (0 < e.length) { 842 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]) { 843 d = a.axisY.convertValueToPixel(e[f].y[0]); 844 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]; N(c, d, l, g, r, b, 0, null, q, !1, !1, !1, n.fillOpacity); b = n.dataPointIds[f]; this._eventManager.objectMap[b] = { 845 id: b, objectType: "dataPoint", dataSeriesIndex: p, dataPointIndex: f, 846 x1: d, y1: l, x2: g, y2: r 847 }; b = D(b); t && N(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({ 848 chartType: "rangeBar", dataPoint: e[f], dataSeries: n, indexKeyword: 1, point: { 849 x: e[f].y[1] >= 850 e[f].y[0] ? g : d, y: l + (r - l) / 2 851 }, 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 852 }) 853 } 854 } 855 } c.restore(); t && this._eventManager.ghostCtx.restore(); return { source: c, dest: this.plotArea.ctx, animationCallback: E.fadeInAnimation, easingFunction: E.easing.easeInQuad, animationBase: 0 } 856 } 857 }; A.prototype.renderRangeArea = function (a) { 858 function c() { 859 if (x) { 860 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 = 861 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); x = { x: e, y: q }; l = []; l.push({ x: e, y: r }) 862 } 863 } var b = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 864 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, 865 g.width, g.height), d.clip()); for (g = 0; g < a.dataSeriesIndexes.length; g++) {
866 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 = D(f); d.fillStyle = f; var f = [], p = !0, n = 0, e, q, r, s, x = null; if (0 < m.length) { 867 var u = h._colorSet[n % h._colorSet.length], v = h.lineColor = h.options.lineColor || u, z = v; b.fillStyle = u; b.strokeStyle = v; b.lineWidth = h.lineThickness; var w = "solid"; if (b.setLineDash) { 868 var y = F(h.nullDataLineDashType, h.lineThickness), 869 w = h.lineDashType, A = F(w, h.lineThickness); b.setLineDash(A) 870 } 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]) { 871 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 || 872 w === h.lineDashType && h.lineDashType !== h.nullDataLineDashType) && (l[l.length - 1].newLineDashArray = A, w = h.nullDataLineDashType, b.setLineDash(y)), b.lineTo(e, q), t && d.lineTo(e, q), l.push({ x: e, y: r })) : (b.beginPath(), b.moveTo(e, q), x = { 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 - 873 1 && (z !== (m[n].lineColor || v) || w !== (m[n].lineDashType || h.lineDashType)) && (c(), z = m[n].lineColor || v, l[l.length - 1].newStrokeStyle = z, b.strokeStyle = z, b.setLineDash && (m[n].lineDashType ? (w = m[n].lineDashType, l[l.length - 1].newLineDashArray = F(w, h.lineThickness), b.setLineDash(l[l.length - 1].newLineDashArray)) : (w = h.lineDashType, l[l.length - 1].newLineDashArray = A, b.setLineDash(A)))); if (0 !== m[n].markerSize && (0 < m[n].markerSize || 0 < h.markerSize)) { 874 var J = h.getMarkerProperties(n, e, r, b); f.push(J); var V = D(s); t && f.push({ 875 x: e, 876 y: r, ctx: d, type: J.type, size: J.size, color: V, borderColor: V, borderThickness: J.borderThickness 877 }); J = h.getMarkerProperties(n, e, q, b); f.push(J); V = D(s); t && f.push({ x: e, y: q, ctx: d, type: J.type, size: J.size, color: V, borderColor: V, borderThickness: J.borderThickness }) 878 } 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({ 879 chartType: "rangeArea", 880 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 881 }) 882 } else B || p || c(), B = !0; c(); O.drawMarkers(f) 883 } 884 } b.restore(); t && this._eventManager.ghostCtx.restore(); return { source: b, dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 } 885 } 886 }; A.prototype.renderRangeSplineArea = function (a) { 887 function c(a, c) { 888 var e = wa(q, 2); if (0 < e.length) { 889 if (0 < k.lineThickness) { 890 b.strokeStyle = c; b.setLineDash && b.setLineDash(a); 891 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() 892 } 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, 893 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 = wa(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) { 894 b.strokeStyle = c; b.setLineDash && b.setLineDash(a); b.beginPath(); 895 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() 896 } b.beginPath() 897 } 898 } var b = a.targetCanvasCtx || this.plotArea.ctx; if (!(0 >= a.dataSeriesIndexes.length)) { 899 var d = this._eventManager.ghostCtx, f = [], g = this.plotArea; 900 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++) { 901 var l = a.dataSeriesIndexes[g], k = this.data[l], h = k.dataPoints, f = k.id; this._eventManager.objectMap[f] = { objectType: "dataSeries", dataSeriesIndex: l }; f = D(f); d.fillStyle = f; var f = [], m = 0, p, n, e, q = [], r = []; if (0 < h.length) { 902 var s = k._colorSet[m % k._colorSet.length], x = k.lineColor = k.options.lineColor || s, u = x; b.fillStyle = s; b.lineWidth = k.lineThickness; 903 var v = "solid", z; if (b.setLineDash) { var w = F(k.nullDataLineDashType, k.lineThickness), v = k.lineDashType; z = F(v, 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]) { 904 p = a.axisX.convertValueToPixel(p); n = a.axisY.convertValueToPixel(h[m].y[0]); e = a.axisY.convertValueToPixel(h[m].y[1]); var y = k.dataPointIds[m]; 905 this._eventManager.objectMap[y] = { id: y, 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 || x) || v !== (h[m].lineDashType || k.lineDashType)) && (u = h[m].lineColor || x, q[q.length - 1].newStrokeStyle = u, b.setLineDash && (h[m].lineDashType ? (v = h[m].lineDashType, q[q.length - 1].newLineDashArray = F(v, k.lineThickness)) : (v = k.lineDashType, q[q.length - 1].newLineDashArray = z))); if (0 !== h[m].markerSize && (0 < h[m].markerSize || 0 < k.markerSize)) { 906 var A = 907 k.getMarkerProperties(m, p, n, b); f.push(A); var B = D(y); 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 = D(y); t && f.push({ x: p, y: e, ctx: d, type: A.type, size: A.size, color: B, borderColor: B, borderThickness: A.borderThickness }) 908 } if (h[m].indexLabel || k.indexLabel || h[m].indexLabelFormatter || k.indexLabelFormatter) this._indexLabels.push({ 909 chartType: "rangeSplineArea", dataPoint: h[m], dataSeries: k, indexKeyword: 0, point: { 910 x: p, 911 y: n 912 }, direction: h[m].y[0] <= h[m].y[1] ? -1 : 1, color: s 913 }), this._indexLabels.push({ chartType: "rangeSplineArea", dataPoint: h[m], dataSeries: k, indexKeyword: 1, point: { x: p, y: e }
913, direction: h[m].y[0] <= h[m].y[1] ? 1 : -1, color: s }); n = !1 914 } else 0 < m && !n && (k.connectNullData ? b.setLineDash && (0 < q.length && (k.options.nullDataLineDashType || !h[m - 1].lineDashType)) && (q[q.length - 1].newLineDashArray = w, v = k.nullDataLineDashType) : (c(z, x), q = [], r = [])), n = !0; c(z, x); O.drawMarkers(f) 915 } 916 } b.restore(); t && this._eventManager.ghostCtx.restore(); return { 917 source: b, 918 dest: this.plotArea.ctx, animationCallback: E.xClipAnimation, easingFunction: E.easing.linear, animationBase: 0 919 } 920 } 921 }; var Ha = function (a, c, b, d, f, g, l, k, h) { 922 if (!(0 > b)) { 923 "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), 924 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() 925 } 926 }; A.prototype.renderPie = function (a) { 927 function c() { 928 if (m && p) { 929 for (var a = 0, b = 0, c = 0, d = 0, f = 0; f < p.length; f++) { 930 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 = { 931 chart: h.options, dataSeries: m, dataPoint: g, 932 total: n.total, percent: n.percent 933 }; 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: z.x, y: z.y }; l.y = g.y; l.radius = B; l.percentInnerRadius = J; l.indexLabelText = n; l.indexLabelPlacement = m.indexLabelPlacement; l.indexLabelLineColor = g.indexLabelLineColor ? g.indexLabelLineColor : m.options.indexLabelLineColor ? 934 m.options.indexLabelLineColor : g.color ? g.color : m._colorSet[f % m._colorSet.length]; l.indexLabelLineThickness = y(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 ? 935 g.indexLabelFontWeight : m.indexLabelFontWeight; l.indexLabelFontSize = y(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 : 936 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) { 937 if (0 === 938 b || q[d].midAngle > l.midAngle) d = f; b++ 939 } l.hemisphere = g > Math.PI / 2 && g <= 3 * Math.PI / 2 ? "left" : "right"; l.indexLabelTextBlock = new U(h.plotArea.ctx, { 940 fontSize: l.indexLabelFontSize, fontFamily: l.indexLabelFontFamily, fontColor: l.indexLabelFontColor, fontStyle: l.indexLabelFontStyle, fontWeight: l.indexLabelFontWeight, horizontalAlign: "left", backgroundColor: l.indexLabelBackgroun
940dColor, maxWidth: l.indexLabelMaxWidth, maxHeight: l.indexLabelWrap ? 5 * l.indexLabelFontSize : 1.5 * l.indexLabelFontSize, text: l.indexLabelText, padding: 0, 941 textBaseline: "top" 942 }); l.indexLabelTextBlock.measureText() 943 } 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)) 944 } 945 } function b(a) { 946 var b = h.plotArea.ctx; b.clearRect(e.x1, e.y1, e.width, e.height); b.fillStyle = h.backgroundColor; 947 b.fillRect(e.x1, e.y1, e.width, e.height); for (b = 0; b < p.length; b++) { 948 var c = q[b].startAngle, d = q[b].endAngle; if (d > c) { 949 var f = 0.07 * B * Math.cos(q[b].midAngle), g = 0.07 * B * Math.sin(q[b].midAngle), k = !1; if (p[b].exploded) { if (1E-9 < Math.abs(q[b].center.x - (z.x + f)) || 1E-9 < Math.abs(q[b].center.y - (z.y + g))) q[b].center.x = z.x + f * a, q[b].center.y = z.y + g * a, k = !0 } else if (0 < Math.abs(q[b].center.x - z.x) || 0 < Math.abs(q[b].center.y - z.y)) q[b].center.x = z.x + f * (1 - a), q[b].center.y = z.y + g * (1 - a), k = !0; k && (f = {}, f.dataSeries = m, f.dataPoint = m.dataPoints[b], 950 f.index = b, h.toolTip.highlightObjects([f])); Ha(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) 951 } 952 } 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) : 953 -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 + B * Math.cos(c.midAngle), f = c.center.y + B * Math.sin(c.midAngle), a.strokeStyle = c.indexLabelLineColor, a.lineWidth = c.indexLabelLineThickness, a.setLineDash && a.setLineDash(F(c.indexLabelLineDashType, 954 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() 955 } function d(a, b) { 956 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 = 957 b.indexLabelTextBlock.y > a.indexLabelTextBlock.y ? e - d : c - f 958 } 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) { 959 c = (c || 0) + 1; if (1E3 < c) return 0; b = b || 0; var e = 0, h = z.y - 1 * s, m = z.y + 1 * s; if (0 <= a && a < p.length) { 960 var k = 961 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 = 962 0; h = "right" === k.hemisphere ? z.x + Math.sqrt(Math.pow(s, 2) - Math.pow(b - z.y, 2)) : z.x - Math.sqrt(Math.pow(s, 2) - Math.pow(b - z.y, 2)); n = z.x + B * Math.cos(k.midAngle); l = z.y + B * Math.sin(k.midAngle); l = Math.sqrt(Math.pow(h - n, 2) + Math.pow(b - l, 2)); n = Math.acos(B / s); l = Math.acos((s * s + B * B - l * l) / (2 * B * 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]) || 963 ("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(v) > +h.toFixed(v) && (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 - 964 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(v) < +h.toFixed(v) && (e = b > r ? b - r : n - (h - m))))); e && (c = k.indexLabelTextBlock.y + e, b = 0, b = "right" === k.hemisphere ? z.x + Math.sqrt(Math.pow(s, 2) - Math.pow(c - z.y, 2)) : z.x - Math.sqrt(Math.pow(s, 2) - Math.pow(c - z.y, 2)), k.midAngle >
964 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 ? 965 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 = 966 b, k.indexLabelAngle = Math.atan2(k.indexLabelTextBlock.y - z.y, k.indexLabelTextBlock.x - z.x)) 967 } return e 968 } function l() { 969 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++) { 970 if (m.radius || !m.radius && "undefined" !== typeof m.innerRadius && null !== m.innerRadius && B - c <= E) k = !1; k && (B -= c); c = 0; if ("inside" !== m.indexLabelPlacement) { 971 s = B * x; for (a = 0; a < p.length; a++) { 972 var l = q[a]; l.indexLabelTextBlock.x = z.x + s * Math.cos(l.midAngle); 973 l.indexLabelTextBlock.y = z.y + s * Math.sin(l.midAngle); l.indexLabelAngle = l.midAngle; l.radius = B; l.percentInnerRadius = J 974 } for (var u, t, a = 0; a < p.length; a++) { 975 var l = q[a], w = f(a); if (null !== w) { 976 u = q[a]; t = q[w]; var y = 0, y = d(u, t) - r; if (0 > y) { 977 for (var A = t = 0, D = 0; D < p.length; D++) D !== a && q[D].hemisphere === l.hemisphere && (q[D].indexLabelTextBlock.y < l.indexLabelTextBlock.y ? t++ : A++); t = y / (t + A || 1) * A; var A = -1 * (y - t), C = D = 0; "right" === l.hemisphere ? (D = g(a, t), A = -1 * (y - D), C = g(w, A), +C.toFixed(v) < +A.toFixed(v) && +D.toFixed(v) <= +t.toFixed(v) && g(a, 978 -(A - C))) : (D = g(w, t), A = -1 * (y - D), C = g(a, A), +C.toFixed(v) < +A.toFixed(v) && +D.toFixed(v) <= +t.toFixed(v) && g(w, -(A - C))) 979 } 980 } 981 } 982 } else for (a = 0; a < p.length; a++) l = q[a], s = "pie" === m.type ? 0.7 * B : 0.8 * B, w = z.x + s * Math.cos(l.midAngle), t = z.y + s * Math.sin(l.midAngle), l.indexLabelTextBlock.x = w, l.indexLabelTextBlock.y = t; for (a = 0; a < p.length; a++) if (l = q[a], w = l.indexLabelTextBlock.measureText(), 0 !== w.height && 0 !== w.width) w = w = 0, "right" === l.hemisphere ? (w = e.x2 - (l.indexLabelTextBlock.x + l.indexLabelTextBlock.width + n), w *= -1) : w = e.x1 - (l.indexLabelTextBlock.x - 983 l.indexLabelTextBlock.width - n), 0 < w && (!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 - z.y) < B || Math.abs(l.indexLabelTextBlock.y + l.indexLabelTextBlock.height / 2 - z.y) < B) && (w /= Math.abs(Math.cos(l.indexLabelAngle)), 984 9 < w && (w *= 0.3), w > c && (c = w)), w = w = 0, 0 < l.indexLabelAngle && l.indexLabelAngle < Math.PI ? (w = e.y2 - (l.indexLabelTextBlock.y + l.indexLabelTextBlock.height / 2 + 5), w *= -1) : w = e.y1 - (l.indexLabelTextBlock.y - l.indexLabelTextBlock.height / 2 - 5), 0 < w && (!k && l.indexLabelText && (t = 0 < l.indexLabelAngle && l.indexLabelAngle < Math.PI ? -1 : 1, 0 === g(a, w * t) && g(a, 2 * t)), Math.abs(l.indexLabelTextBlock.x - z.x) < B && (w /= Math.abs(Math.sin(l.indexLabelAngle)), 9 < w && (w *= 0.3), w > c && (c = w))); var F = function (a, b, c) { 985 for (var d = [], e = 0; d.push(q[b]), b !== c; b = (b + 1 + 986 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 987 }; (function () { 988 for (var a = -1, b = -1, c = 0, e = !1, g = 0; g < p.length; g++) if (e = !1, u = q[g], u.indexLabelText) { 989 var h = f(g); if (null !== h) { 990 var k = q[h]; y = 0; y = d(u, k); var l; if (l = 0 > y) { 991 l = u.indexLabelTextBlock.x; var m = u.indexLabelTextBlock.y - u.indexLabelTextBlock.height / 2, r = u.indexLabelTextBlock.y + u.indexLabelTextBlock.height / 992 2, s = k.indexLabelTextBlock.y - k.indexLabelTextBlock.height / 2, x = k.indexLabelTextBlock.x + k.indexLabelTextBlock.width, v = k.indexLabelTextBlock.y + k.indexLabelTextBlock.height / 2; l = u.indexLabelTextBlock.x + u.indexLabelTextBlock.width < k.indexLabelTextBlock.x - n || l > x + n || m > v + n || r < s - n ? !1 : !0 993 } l ? (0 > a && (a = g), h !== a && (b = h, c += -y), 0 === g % Math.max(p.length / 10, 3) && (e = !0)) : e = !0; e && (0 < c && 0 <= a && 0 <= b) && (F(c, a, b), b = a = -1, c = 0) 994 } 995 } 0 < c && F(c, a, b) 996 })() 997 } 998 } function k() { 999 h.plotArea.layoutManager.reset(); h.title && (h.title.dockInsidePlotArea || 1000 "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(); la.fNg && la.fNg(h) 1001 } var h = this; if (!(0 >= a.dataSeriesIndexes.length)) { 1002 var m = this.data[a.dataSeriesIndexes[0]], p = m.dataPoints, 1003 n = 10, e = this.plotArea, q = [], r = 2, s, x = 1.3, u = 20 / 180 * Math.PI, v = 6, z = { x: (e.x2 + e.x1) / 2, y: (e.y2 + e.y1) / 2 }, t = 0; a = !1; for (var A = 0; A < p.length; A++) t += Math.abs(p[A].y), !a && ("undefined" !== typeof p[A].indexLabel && null !== p[A].indexLabel && 0 < p[A].indexLabel.toString().length) && (a = !0), !a && ("undefined" !== typeof p[A].label && null !== p[A].label && 0 < p[A].label.toString().length) && (a = !0); if (0 !== t) { 1004 a = a || "undefined" !== typeof m.indexLabel && null !== m.indexLabel && 0 < m.indexLabel.toString().length; var B = "inside" !== m.indexLabelPlacement && 1005 a ? 0.75 * Math.min(e.width, e.height) / 2 : 0.92 * Math.min(e.width, e.height) / 2; m.radius && (B = Pa(m.radius, B)); var E = "undefined" !== typeof m.innerRadius && null !== m.innerRadius ? Pa(m.innerRadius, B) : 0.7 * B; m.radius = B; "doughnut" === m.type && (m.innerRadius = E);
1005 var J = Math.min(E / B, (B - 1) / B); this.pieDoughnutClickHandler = function (a) { h.isAnimating || !y(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() })) }; 1006 c(); l(); l(); l(); l(); this.disableToolTip = !0; this._animator.animate(0, this.animatedRender ? this.animationDuration : 0, function (a) { 1007 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++) { 1008 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 && Ha(h.plotArea.ctx, q[b].center, q[b].radius, 1009 g, m.type, c, d, m.fillOpacity, q[b].percentInnerRadius); if (f) break 1010 } k() 1011 }, function () { h.disableToolTip = !1; h._animator.animate(0, h.animatedRender ? 500 : 0, function (a) { b(a); k() }) }) 1012 } 1013 } 1014 }; A.prototype.animationRequestId = null; A.prototype.requestAnimFrame = function () { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (a) { window.setTimeout(a, 1E3 / 60) } }(); A.prototype.cancelRequestAnimFrame = window.cancelAnimationFrame || 1015 window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout; A.prototype.set = function (a, c, b) { b = "undefined" === typeof b ? !0 : b; "options" === a ? (this.options = c, b && this.render()) : A.base.set.call(this, a, c, b) }; A.prototype.exportChart = function (a) { 1016 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/" + 1017 c); Ca(this.canvas, c, b) 1018 }; A.prototype.print = function () { 1019 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();
1019 d.document.write('<!DOCTYPE HTML>\n<html><body style="margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;"><img src="' + 1020 a + '"/><body/></html>'); d.document.close(); setTimeout(function () { d.focus(); d.print(); setTimeout(function () { b._canvasJSContainer.removeChild(c) }, 1E3) }, 500) 1021 }; ka.prototype.registerSpace = function (a, c) { "top" === a ? this._topOccupied += c.height : "bottom" === a ? this._bottomOccupied += c.height : "left" === a ? this._leftOccupied += c.width : "right" === a && (this._rightOccupied += c.width) }; ka.prototype.unRegisterSpace = function (a, c) { 1022 "top" === a ? this._topOccupied -= c.height : "bottom" === a ? this._bottomOccupied -= c.height : "left" === a ? this._leftOccupied -= 1023 c.width : "right" === a && (this._rightOccupied -= c.width) 1024 }; ka.prototype.getFreeSpace = function () { return { x1: this._x1 + this._leftOccupied, y1: this._y1 + this._topOccupied, x2: this._x2 - this._rightOccupied, y2: this._y2 - this._bottomOccupied, width: this._x2 - this._x1 - this._rightOccupied - this._leftOccupied, height: this._y2 - this._y1 - this._bottomOccupied - this._topOccupied } }; ka.prototype.reset = function () { this._rightOccupied = this._leftOccupied = this._bottomOccupied = this._topOccupied = this._padding }; S(U, I); U.prototype.render = 1025 function (a) { 1026 if (0 !== this.fontSize) { 1027 a && this.ctx.save(); var c = this.ctx.font; this.ctx.textBaseline = this.textBaseline; var b = 0; this._isDirty && this.measureText(this.ctx); this.ctx.translate(this.x, this.y + b); "middle" === this.textBaseline && (b = -this._lineHeight / 2); this.ctx.font = this._getFontString(); this.ctx.rotate(Math.PI / 180 * this.angle); var d = 0, f = this.padding, g = null; this.ctx.roundRect || Ja(this.ctx); (0 < this.borderThickness && this.borderColor || this.backgroundColor) && this.ctx.roundRect(0, b, this.width, this.height, 1028 this.cornerRadius, this.borderThickness, this.backgroundColor, this.borderColor); this.ctx.fillStyle = this.fontColor; for (b = 0; b < this._wrappedText.lines.length; b++) g = this._wrappedText.lines[b], "right" === this.horizontalAlign ? d = this.width - g.width - this.padding : "left" === this.horizontalAlign ? d = this.padding : "center" === this.horizontalAlign && (d = (this.width - 2 * this.padding) / 2 - g.width / 2 + this.padding), this.ctx.fillText(g.text, d, f), f += g.height; this.ctx.font = c; a && this.ctx.restore() 1029 } 1030 }; U.prototype.setText = function (a) { 1031 this.text = 1032 a; this._isDirty = !0; this._wrappedText = null 1033 }; U.prototype.measureText = function () { this._lineHeight = La(this.fontFamily, this.fontSize, this.fontWeight); if (null === this.maxWidth) throw "Please set maxWidth and height for TextBlock"; this._wrapText(this.ctx); this._isDirty = !1; return { width: this.width, height: this.height } }; U.prototype._getLineWithWidth = function (a, c, b) { 1034 a = String(a); if (!a) return { text: "", width: 0 }; var d = b = 0, f = a.length - 1, g = Infinity; for (this.ctx.font = this._getFontString() ; d <= f;) { 1035 var g = Math.floor((d + f) / 2), 1036 l = a.substr(0, g + 1); b = this.ctx.measureText(l).width; if (b < c) d = g + 1; else if (b > c) f = g - 1; else break 1037 } b > c && 1 < l.length && (l = l.substr(0, l.length - 1), b = this.ctx.measureText(l).width); c = !0; if (l.length === a.length || " " === a[l.length]) c = !1; c && (a = l.split(" "), 1 < a.length && a.pop(), l = a.join(" "), b = this.ctx.measureText(l).width); return { text: l, width: b } 1038 }; U.prototype._wrapText = function () { 1039 var a = new String(ma(String(this.text))), c = [], b = this.ctx.font, d = 0, f = 0; this.ctx.font = this._getFontString(); if (0 === this.frontSize) f = d = 0; else for (; 0 < 1040 a.length;) { var g = this.maxHeight - 2 * this.padding, l = this._getLineWithWidth(a, this.maxWidth - 2 * this.padding, !1); l.height = this._lineHeight; c.push(l); var k = f, f = Math.max(f, l.width), d = d + l.height, a = ma(a.slice(l.text.length, a.length)); g && d > g && (l = c.pop(), d -= l.height, f = k) } this._wrappedText = { lines: c, width: f, height: d }; this.width = f + 2 * this.padding; this.height = d + 2 * this.padding; this.ctx.font = b 1041 }; U.prototype._getFontString = function () { 1042 var a; a = "" + (this.fontStyle ? this.fontStyle + " " : ""); a += this.fontWeight ? this.fontWeight + 1043 " " : ""; a += this.fontSize ? this.fontSize + "px " : ""; var c = this.fontFamily ? this.fontFamily + "" : ""; !t && c && (c = c.split(",")[0], "'" !== c[0] && '"' !== c[0] && (c = "'" + c + "'")); return a += c 1044 }; S(oa, I); oa.prototype.render = function () { 1045 if (this.text) { 1046 var a = this.dockInsidePlotArea ? this.chart.plotArea : this.chart, c = a.layoutManager.getFreeSpace(), b = c.x1, d = c.y1, f = 0, g = 0, l = this.chart._menuButton && this.chart.exportEnabled && "top" === this.verticalAlign ? 22 : 0, k, h; "top" === this.verticalAlign || "bottom" === this.verticalAlign ? (null === this.maxWidth && 1047 (this.maxWidth = c.width - 4 - l * ("center" === this.horizontalAlign ? 2 : 1)), g = 0.5 * c.height - this.margin - 2, f = 0) : "center" === this.verticalAlign && ("left" === this.horizontalAlign || "right" === this.horizontalAlign ? (null === this.maxWidth && (this.maxWidth = c.height - 4), g = 0.5 * c.width - this.margin - 2) : "center" === this.horizontalAlign && (null === this.maxWidth && (this.maxWidth = c.width - 4), g = 0.5 * c.height - 4)); this.wrap || (g = Math.min(g, Math.max(1.5 * this.fontSize, this.fontSize + 2.5 * this.padding))); var g = new U(this.ctx, { 1048 fontSize: this.fontSize, 1049 fontFamily: this.fontFamily, fontColor: this.fontColor, fontStyle: this.fontStyle, fontWeight: this.fontWeight, horizontalAlign: this.horizontalAlign, verticalAlign: this.verticalAlign, borderColor: this.borderColor, borderThickness: this.borderThickness, backgroundColor: this.backgroundColor, maxWidth: this.maxWidth, maxHeight: g, cornerRadius: this.cornerRadius, text: this.text, padding: this.padding, textBaseline: "top" 1050 }), m = g.measureText(); "top" === this.verticalAlign || "bottom" === this.verticalAlign ? ("top" === this.verticalAlign ?
1051 (d = c.y1 + 2, h = "top") : "bottom" === this.verticalAlign && (d = c.y2 - 2 - m.height, h = "bottom"), "left" === this.horizontalAlign ? b = c.x1 + 2 : "center" === this.horizontalAlign ? b = c.x1 + c.width / 2 - m.width / 2 : "right" === this.horizontalAlign && (b = c.x2 - 2 - m.width - l), k = this.horizontalAlign, this.width = m.width, this.height = m.height) : "center" === this.verticalAlign && ("left" === this.horizontalAlign ? (b = c.x1 + 2, d = c.y2 - 2 - (this.maxWidth / 2 - m.width / 2), f = -90, h = "left", this.width = m.height, this.height = m.width) : "right" === this.horizontalAlign ? (b = c.x2 - 2, 1052 d = c.y1 + 2 + (this.maxWidth / 2 - m.width / 2), f = 90, h = "right", this.width = m.height, this.height = m.width) : "center" === this.horizontalAlign && (d = a.y1 + (a.height / 2 - m.height / 2), b = a.x1 + (a.width / 2 - m.width / 2), h = "center", this.width = m.width, this.height = m.height), k = "center"); g.x = b; g.y = d; g.angle = f; g.horizontalAlign = k; g.render(!0); a.layoutManager.registerSpace(h, { width: this.width + ("left" === h || "right" === h ? this.margin + 2 : 0), height: this.height + ("top" === h || "bottom" === h ? this.margin + 2 : 0) }); this.bounds = { 1053 x1: b, y1: d, x2: b + this.width, y2: d + 1054 this.height 1055 }; this.ctx.textBaseline = "top" 1056 } 1057 }; S(xa, I); xa.prototype.render = oa.prototype.render; S(ya, I); ya.prototype.render = function () { 1058 var a = this.dockInsidePlotArea ? this.chart.plotArea : this.chart, c = a.layoutManager.getFreeSpace(), b = null, d = 0, f = 0, g = 0, l = 0, k = this.markerMargin = this.chart.options.legend && !y(this.chart.options.legend.markerMargin) ? this.chart.options.legend.markerMargin : 0.3 * this.fontSize; this.height = 0; var h = [], m = []; "top" === this.verticalAlign || "bottom" === this.verticalAlign ? (this.orientation = "horizontal", 1059 b = this.verticalAlign, g = this.maxWidth = null !== this.maxWidth ? this.maxWidth : c.width, l = this.maxHeight = null !== this.maxHeight ? this.maxHeight : 0.5 * c.height) : "center" === this.verticalAlign && (this.orientation = "vertical", b = this.horizontalAlign, g = this.maxWidth = null !== this.maxWidth ? this.maxWidth : 0.5 * c.width, l = this.maxHeight = null !== this.maxHeight ? this.maxHeight : c.height); for (var p = 0; p < this.dataSeries.length; p++) { 1060 var n = this.dataSeries[p]; if (n.dataPoints && n.dataPoints.length) if ("pie" !== n.type && "doughnut" !== n.type && 1061 "funnel" !== n.type) { 1062 var e = n.legendMarkerType = n.legendMarkerType ? n.legendMarkerType : "line" !== n.type && "stepLine" !== n.type && "spline" !== n.type && "scatter" !== n.type && "bubble" !== n.type || !n.markerType ? ba.getDefaultLegendMarker(n.type) : n.markerType, q = n.legendText ? n.legendText : this.itemTextFormatter ? this.itemTextFormatter({ chart: this.chart, legend: this.options, dataSeries: n, dataPoint: null }) : n.name, r = n.legendMarkerColor = n.legendMarkerColor ? n.legendMarkerColor : n.markerColor ? n.markerColor : n._colorSet[0], s = n.markerSize || 1063 "line" !== n.type && "stepLine" !== n.type && "spline" !== n.type ? 0.75 * this.lineHeight : 0, x = n.legendMarkerBorderColor ? n.legendMarkerBorderColor : n.markerBorderColor, u = n.legendMarkerBorderThickness ? n.legendMarkerBorderThickness : n.markerBorderThickness ? Math.max(1, Math.round(0.2 * s)) : 0, q = this.chart.replaceKeywordsWithValue(q, n.dataPoints[0], n, p), e = { 1064 markerType: e, markerColor: r, text: q, textBlock: null, chartType: n.type, markerSize: s, lineColor: n._colorSet[0], dataSeriesIndex: n.index, dataPointIndex: null, markerBorderColor: x, 1065 markerBorderThickness: u 1066 }; h.push(e) 1067 } else for (var v = 0; v < n.dataPoints.length; v++) { 1068 var t = n.dataPoints[v], e = t.legendMarkerType ? t.legendMarkerType : n.legendMarkerType ? n.legendMarkerType : ba.getDefaultLegendMarker(n.type), q = t.legendText ? t.legendText : n.legendText ? n.legendText : this.itemTextFormatter ? this.itemTextFormatter({ chart: this.chart, legend: this.options, dataSeries: n, dataPoint: t }) : t.name ? t.name : "DataPoint: " + (v + 1), r = t.legendMarkerColor ? t.legendMarkerColor : n.legendMarkerColor ? n.legendMarkerColor : t.color ? 1069 t.color : n.color ? n.color : n._colorSet[v % n._colorSet.length], s = 0.75 * this.lineHeight, x = t.legendMarkerBorderColor ? t.legendMarkerBorderColor : n.legendMarkerBorderColor ? n.legendMarkerBorderColor : t.markerBorderColor ? t.markerBorderColor : n.markerBorderColor, u = t.legendMarkerBorderThickness ? t.legendMarkerBorderThickness : n.legendMarkerBorderThickness ? n.legendMarkerBorderThickness : t.markerBorderThickness || n.markerBorderThickness ? Math.max(1, Math.round(0.2 * s)) : 0, q = this.chart.replaceKeywordsWithValue(q, t, n, v), e = { 1070 markerType: e, 1071 markerColor: r, text: q, textBlock: null, chartType: n.type, markerSize: s, dataSeriesIndex: p, dataPointIndex: v, markerBorderColor: x, markerBorderThickness: u 1072 };
1072 (t.showInLegend || n.showInLegend && !1 !== t.showInLegend) && h.push(e) 1073 } 1074 } !0 === this.reversed && h.reverse(); if (0 < h.length) { 1075 n = null; r = v = q = t = 0; q = null !== this.itemWidth ? null !== this.itemMaxWidth ? Math.min(this.itemWidth, this.itemMaxWidth, g) : this.itemMaxWidth = Math.min(this.itemWidth, g) : null !== this.itemMaxWidth ? Math.min(this.itemMaxWidth, g) : this.itemMaxWidth = g; s = 0 === s ? 0.75 * 1076 this.lineHeight : s; q -= s + k; for (p = 0; p < h.length; p++) { 1077 e = h[p]; if ("line" === e.chartType || "spline" === e.chartType || "stepLine" === e.chartType) q -= 2 * 0.1 * this.lineHeight; if (!(0 >= l || "undefined" === typeof l || 0 >= q || "undefined" === typeof q)) { 1078 if ("horizontal" === this.orientation) { 1079 e.textBlock = new U(this.ctx, { 1080 x: 0, y: 0, maxWidth: q, maxHeight: this.itemWrap ? l : this.lineHeight, angle: 0, text: e.text, horizontalAlign: "left", fontSize: this.fontSize, fontFamily: this.fontFamily, fontWeight: this.fontWeight, fontColor: this.fontColor, fontStyle: this.fontStyle, 1081 textBaseline: "middle" 1082 }); e.textBlock.measureText(); null !== this.itemWidth && (e.textBlock.width = this.itemWidth - (s + k + ("line" === e.chartType || "spline" === e.chartType || "stepLine" === e.chartType ? 2 * 0.1 * this.lineHeight : 0))); if (!n || n.width + Math.round(e.textBlock.width + s + k + (0 === n.width ? 0 : this.horizontalSpacing) + ("line" === e.chartType || "spline" === e.chartType || "stepLine" === e.chartType ? 2 * 0.1 * this.lineHeight : 0)) > g) n = { items: [], width: 0 }, m.push(n), this.height += v, v = 0; v = Math.max(v, e.textBlock.height) 1083 } else e.textBlock = new U(this.ctx, 1084 { x: 0, y: 0, maxWidth: q, maxHeight: !0 === this.itemWrap ? l : 1.5 * this.fontSize, angle: 0, text: e.text, horizontalAlign: "left", fontSize: this.fontSize, fontFamily: this.fontFamily, fontWeight: this.fontWeight, fontColor: this.fontColor, fontStyle: this.fontStyle, textBaseline: "middle" }), e.textBlock.measureText(), null !== this.itemWidth && (e.textBlock.width = this.itemWidth - (s + k + ("line" === e.chartType || "spline" === e.chartType || "stepLine" === e.chartType ? 2 * 0.1 * this.lineHeight : 0))), this.height < l - this.lineHeight ? (n = { items: [], width: 0 }, 1085 m.push(n)) : (n = m[t], t = (t + 1) % m.length), this.height += e.textBlock.height; e.textBlock.x = n.width; e.textBlock.y = 0; n.width += Math.round(e.textBlock.width + s + k + (0 === n.width ? 0 : this.horizontalSpacing) + ("line" === e.chartType || "spline" === e.chartType || "stepLine" === e.chartType ? 2 * 0.1 * this.lineHeight : 0)); n.items.push(e); this.width = Math.max(n.width, this.width); r = e.textBlock.width + (s + k + ("line" === e.chartType || "spline" === e.chartType || "stepLine" === e.chartType ? 2 * 0.1 * this.lineHeight : 0)) 1086 } 1087 } this.itemWidth = r; this.height = !1 === this.itemWrap ? 1088 m.length * this.lineHeight : this.height + v; this.height = Math.min(l, this.height); this.width = Math.min(g, this.width) 1089 } "top" === this.verticalAlign ? (f = "left" === this.horizontalAlign ? c.x1 : "right" === this.horizontalAlign ? c.x2 - this.width : c.x1 + c.width / 2 - this.width / 2, d = c.y1) : "center" === this.verticalAlign ? (f = "left" === this.horizontalAlign ? c.x1 : "right" === this.horizontalAlign ? c.x2 - this.width : c.x1 + c.width / 2 - this.width / 2, d = c.y1 + c.height / 2 - this.height / 2) : "bottom" === this.verticalAlign && (f = "left" === this.horizontalAlign ? c.x1 : 1090 "right" === this.horizontalAlign ? c.x2 - this.width : c.x1 + c.width / 2 - this.width / 2, d = c.y2 - this.height); this.items = h; for (p = 0; p < this.items.length; p++) e = h[p], e.id = ++this.chart._eventManager.lastObjectId, this.chart._eventManager.objectMap[e.id] = { id: e.id, objectType: "legendItem", legendItemIndex: p, dataSeriesIndex: e.dataSeriesIndex, dataPointIndex: e.dataPointIndex }; (0 < this.borderThickness && this.borderColor || this.backgroundColor) && this.ctx.roundRect(f, d, this.width, this.height, this.cornerRadius, this.borderThickness, 1091 this.backgroundColor, this.borderColor); for (p = c = 0; p < m.length; p++) { 1092 n = m[p]; for (t = v = 0; t < n.items.length; t++) { 1093 e = n.items[t]; r = e.textBlock.x + f + (0 === t ? 0.2 * s : this.horizontalSpacing); x = d + c; q = r; this.chart.data[e.dataSeriesIndex].visible || (this.ctx.globalAlpha = 0.5); this.ctx.save(); this.ctx.beginPath(); this.ctx.rect(f, d, g, Math.max(l - l % this.lineHeight, 0)); this.ctx.clip(); if ("line" === e.chartType || "stepLine" === e.chartType || "spline" === e.chartType) this.ctx.strokeStyle = e.lineColor, this.ctx.lineWidth = Math.ceil(this.lineHeight / 1094 8), this.ctx.beginPath(), this.ctx.moveTo(r - 0.1 * this.lineHeight, x + this.lineHeight / 2), this.ctx.lineTo(r + 0.85 * this.lineHeight, x + this.lineHeight / 2), this.ctx.stroke(), q -= 0.1 * this.lineHeight;
1094 O.drawMarker(r + s / 2, x + this.lineHeight / 2, this.ctx, e.markerType, e.markerSize, e.markerColor, e.markerBorderColor, e.markerBorderThickness); e.textBlock.x = r + k + s; if ("line" === e.chartType || "stepLine" === e.chartType || "spline" === e.chartType) e.textBlock.x += 0.1 * this.lineHeight; e.textBlock.y = Math.round(x + this.lineHeight / 2); e.textBlock.render(!0); 1095 this.ctx.restore(); v = 0 < t ? Math.max(v, e.textBlock.height) : e.textBlock.height; this.chart.data[e.dataSeriesIndex].visible || (this.ctx.globalAlpha = 1); r = D(e.id); this.ghostCtx.fillStyle = r; this.ghostCtx.beginPath(); this.ghostCtx.fillRect(q, e.textBlock.y - this.lineHeight / 2, e.textBlock.x + e.textBlock.width - q, e.textBlock.height); e.x1 = this.chart._eventManager.objectMap[e.id].x1 = q; e.y1 = this.chart._eventManager.objectMap[e.id].y1 = e.textBlock.y - this.lineHeight / 2; e.x2 = this.chart._eventManager.objectMap[e.id].x2 = e.textBlock.x + 1096 e.textBlock.width; e.y2 = this.chart._eventManager.objectMap[e.id].y2 = e.textBlock.y + e.textBlock.height - this.lineHeight / 2 1097 } c += v 1098 } 0 < h.length && a.layoutManager.registerSpace(b, { width: this.width + 2 + 2, height: this.height + 5 + 5 }); this.bounds = { x1: f, y1: d, x2: f + this.width, y2: d + this.height } 1099 }; S(Da, I); Da.prototype.render = function () { var a = this.chart.layoutManager.getFreeSpace(); this.ctx.fillStyle = "red"; this.ctx.fillRect(a.x1, a.y1, a.x2, a.y2) }; S(ba, I); ba.prototype.getDefaultAxisPlacement = function () { 1100 var a = this.type; if ("column" === 1101 a || "line" === a || "stepLine" === a || "spline" === a || "area" === a || "stepArea" === a || "splineArea" === a || "stackedColumn" === a || "stackedLine" === a || "bubble" === a || "scatter" === a || "stackedArea" === a || "stackedColumn100" === a || "stackedLine100" === a || "stackedArea100" === a || "candlestick" === a || "ohlc" === a || "rangeColumn" === a || "rangeArea" === a || "rangeSplineArea" === a) return "normal"; if ("bar" === a || "stackedBar" === a || "stackedBar100" === a || "rangeBar" === a) return "xySwapped"; if ("pie" === a || "doughnut" === a || "funnel" === a) return "none"; window.console.log("Unknown Chart Type: " + 1102 a); return null 1103 }; ba.getDefaultLegendMarker = function (a) { 1104 if ("column" === a || "stackedColumn" === a || "stackedLine" === a || "bar" === a || "stackedBar" === a || "stackedBar100" === a || "bubble" === a || "scatter" === a || "stackedColumn100" === a || "stackedLine100" === a || "stepArea" === a || "candlestick" === a || "ohlc" === a || "rangeColumn" === a || "rangeBar" === a || "rangeArea" === a || "rangeSplineArea" === a) return "square"; if ("line" === a || "stepLine" === a || "spline" === a || "pie" === a || "doughnut" === a || "funnel" === a) return "circle"; if ("area" === a || "splineArea" === 1105 a || "stackedArea" === a || "stackedArea100" === a) return "triangle"; window.console.log("Unknown Chart Type: " + a); return null 1106 }; ba.prototype.getDataPointAtX = function (a, c) { 1107 if (!this.dataPoints || 0 === this.dataPoints.length) return null; var b = { dataPoint: null, distance: Infinity, index: NaN }, d = null, f = 0, g = 0, l = 1, k = Infinity, h = 0, m = 0, p = 0; "none" !== this.chart.plotInfo.axisPlacement && (this.axisX.logarithmic ? (p = Math.log(this.dataPoints[this.dataPoints.length - 1].x / this.dataPoints[0].x), p = 1 < p ? Math.min(Math.max((this.dataPoints.length - 1108 1) / p * Math.log(a / this.dataPoints[0].x) >> 0, 0), this.dataPoints.length) : 0) : (p = this.dataPoints[this.dataPoints.length - 1].x - this.dataPoints[0].x, p = 0 < p ? Math.min(Math.max((this.dataPoints.length - 1) / p * (a - this.dataPoints[0].x) >> 0, 0), this.dataPoints.length) : 0)); for (; ;) { 1109 g = 0 < l ? p + f : p - f; if (0 <= g && g < this.dataPoints.length) { var d = this.dataPoints[g], n = this.axisX.logarithmic ? d.x > a ? d.x / a : a / d.x : Math.abs(d.x - a); n < b.distance && (b.dataPoint = d, b.distance = n, b.index = g); d = n; d <= k ? k = d : 0 < l ? h++ : m++; if (1E3 < h && 1E3 < m) break } else if (0 > 1110 p - f && p + f >= this.dataPoints.length) break; -1 === l ? (f++, l = 1) : l = -1 1111 } return c || b.dataPoint.x !== a ? c && null !== b.dataPoint ? b : null : b 1112 }; ba.prototype.getDataPointAtXY = function (a, c, b) { 1113 if (!this.dataPoints || 0 === this.dataPoints.length || a < this.chart.plotArea.x1 || a > this.chart.plotArea.x2 || c < this.chart.plotArea.y1 || c > this.chart.plotArea.y2) return null; b = b || !1; var d = [], f = 0, g = 0, l = 1, k = !1, h = Infinity, m = 0, p = 0, n = 0; "none" !== this.chart.plotInfo.axisPlacement && (n = (this.chart.axisX[0] ? this.chart.axisX[0] : this.chart.axisX2[0]).getXValueAt({ 1114 x: a, 1115 y: c 1116 }), this.axisX.logarithmic ? (g = Math.log(this.dataPoints[this.dataPoints.length - 1].x / this.dataPoints[0].x), n = 1 < g ? Math.min(Math.max((this.dataPoints.length - 1) / g * Math.log(n / this.dataPoints[0].x) >> 0, 0), this.dataPoints.length) : 0) : (g = this.dataPoints[this.dataPoints.length - 1].x - this.dataPoints[0].x, n = 0 < g ? Math.min(Math.max((this.dataPoints.length - 1) / g * (n - this.dataPoints[0].x) >> 0, 0), this.dataPoints.length) : 0)); for (; ;) { 1117 g = 0 < l ? n + f : n - f; if (0 <= g && g < this.dataPoints.length) { 1118 var e = this.chart._eventManager.objectMap[this.dataPointIds[g]], 1119 q = this.dataPoints[g], r = null; if (e) { 1120 switch (this.type) { 1121 case "column": case "stackedColumn": case "stackedColumn100": case "bar": case "stackedBar": case "stackedBar100": case "rangeColumn": case "rangeBar": a >= e.x1 && (a <= e.x2 && c >= e.y1 && c <= e.y2) && (d.push({ dataPoint: q, dataPointIndex: g, dataSeries: this, distance: Math.min(Math.abs(e.x1 - a), Math.abs(e.x2 - a), Math.abs(e.y1 - c), Math.abs(e.y2 - c)) }), k = !0); break; case "line": case "stepLine": case "spline": case "area": case "stepArea": case "stackedArea": case "stackedArea100": case "splineArea": case "scatter": var s = 1122 M("markerSize", q, this) || 4, t = b ? 20 : s, r = Math.sqrt(Math.pow(e.x1 - a, 2) + Math.pow(e.y1 - c, 2)); r <= t && d.push({ dataPoint: q, dataPointIndex: g, dataSeries: this, distance: r }); g = Math.abs(e.x1 - a); g <= h ? h = g : 0 < l ? m++ : p++; r <= s / 2 && (k = !0); break; case "rangeArea": case "rangeSplineArea": s = M("markerSize", q, this) || 4; t = b ? 20 : s; r = Math.min(Math.sqrt(Math.pow(e.x1 - a, 2) + Math.pow(e.y1 - c, 2)), Math.sqrt(Math.pow(e.x1 - a, 2) + Math.pow(e.y2 - c, 2))); r <= t && d.push({ dataPoint: q, dataPointIndex: g, dataSeries: this, distance: r }); g = Math.abs(e.x1 - a); g <= h ? 1123 h = g : 0 < l ? m++ : p++; r <= s / 2 && (k = !0); break; case "bubble": s = e.size; r = Math.sqrt(Math.pow(e.x1 - a, 2) + Math.pow(e.y1 - c, 2)); r <= s / 2 && (d.push({ dataPoint: q, dataPointIndex: g, dataSeries: this, distance: r }), k = !0); break; case "pie": case "doughnut": s = e.center; t = "doughnut" === this.type ? e.percentInnerRadius * e.radius : 0; r = Math.sqrt(Math.pow(s.x - a, 2) + Math.pow(s.y - c, 2)); r < e.radius && r > t && (r = Math.atan2(c - s.y, a - s.x), 0 > r && (r += 2 * Math.PI), r = Number(((180 * (r / Math.PI) % 360 + 360) % 360).toFixed(12)), s = Number(((180 * (e.startAngle / Math.PI) % 360 + 1124 360) % 360).toFixed(12)), t = Number(((180 * (e.endAngle / Math.PI) % 360 + 360) % 360).toFixed(12)), 0 === t && 1 < e.endAngle && (t = 360), s >= t && 0 !== q.y && (t += 360, r < s && (r += 360)), r > s && r < t && (d.push({ dataPoint: q, dataPointIndex: g, dataSeries: this, distance: 0 }), k = !0)); break; case "candlestick": if (a >= e.x1 - e.borderThickness / 2 && a <= e.x2 + e.borderThickness / 2 && c >= e.y2 - e.borderThickness / 2 && c <= e.y3 + e.borderThickness / 2 || Math.abs(e.x2 - a + e.x1 - a) < e.borderThickness && c >= e.y1 && c <= e.y4) d.push({ 1125 dataPoint: q, dataPointIndex: g, dataSeries: this, distance: Math.min(Math.abs(e.x1 - 1126 a), Math.abs(e.x2 - a), Math.abs(e.y2 - c), Math.abs(e.y3 - c)) 1127 }), k = !0; break; case "ohlc": if (Math.abs(e.x2 - a + e.x1 - a) < e.borderThickness && c >= e.y2 && c <= e.y3 || a >= e.x1 && a <= (e.x2 + e.x1) / 2 && c >= e.y1 - e.borderThickness / 2 && c <= e.y1 + e.borderThickness / 2 || a >= (e.x1 + e.x2) / 2 && a <= e.x2 && c >= e.y4 - e.borderThickness / 2 && c <= e.y4 + e.borderThickness / 2) d.push({ dataPoint: q, dataPointIndex: g, dataSeries: this, distance: Math.min(Math.abs(e.x1 - a), Math.abs(e.x2 - a), Math.abs(e.y2 - c), Math.abs(e.y3 - c)) }), k = !0 1128 } if (k || 1E3 < m && 1E3 < p) break 1129 } 1130 } else if (0 > n - f && 1131 n + f >= this.dataPoints.length) break; -1 === l ? (f++, l = 1) : l = -1 1132 } a = null; for (c = 0; c < d.length; c++) a ? d[c].distance <= a.distance && (a = d[c]) : a = d[c]; return a 1133 }; ba.prototype.getMarkerProperties = function (a, c, b, d) { 1134 var f = this.dataPoints; return { 1135 x: c, y: b, ctx: d, type: f[a].markerType ? f[a].markerType : this.markerType, size: f[a].markerSize ? f[a].markerSize : this.markerSize, color: f[a].markerColor ? f[a].markerColor : this.markerColor ? this.markerColor : f[a].color ? f[a].color : this.color ? this.color : this._colorSet[a % this._colorSet.length], borderColor: f[a].markerBorderColor ? 1136 f[a].markerBorderColor : this.markerBorderColor ? this.markerBorderColor : null, borderThickness: f[a].markerBorderThickness ? f[a].markerBorderThickness : this.markerBorderThickness ? this.markerBorderThickness : null 1137 } 1138 }; S(B, I); B.prototype.createExtraLabelsForLog = function (a) { 1139 a = (a || 0) + 1; if (!(5 < a)) { 1140 var c = this.logLabelValues[0] || this.intervalStartPosition; if (Math.log(this.range) / Math.log(c / this.viewportMinimum) < this.noTicks - 1) { 1141 for (var b = B.getNiceNumber((c - this.viewportMinimum) / Math.min(Math.max(2, this.noTicks - this.logLabelValues.length), 1142 3), !0), d = Math.ceil(this.viewportMinimum / b) * b; d < c; d += b) d < this.viewportMinimum || this.logLabelValues.push(d); this.logLabelValues.sort(Aa); this.createExtraLabelsForLog(a) 1143 } 1144 } 1145 }; B.prototype.createLabels = function () { 1146 var a, c, b = 0, d = 0, f, g = 0, l = 0, d = 0, k = this.interval, h = 0, m, p = 0.6 * this.chart.height, b = !1; if (this.dataSeries && 0 < this.dataSeries.length) for (d = 0; d < this.dataSeries.length; d++) "dateTime" === this.dataSeries[d].xValueType && (b = !0); if ("axisX" === this.type && b && !this.logarithmic) for (this.intervalStartPosition = this.getLabelStartPoint(new Date(this.viewportMinimum), 1147 this.intervalType, this.interval), f = Ia(new Date(this.viewportMaximum), this.interval, this.intervalType), b = this.intervalStartPosition; b < f; Ia(b, k, this.intervalType)) a = b.getTime(), a = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.options, value: b, label: this.labels[b] ? this.labels[b] : null }) : "axisX" === this.type && this.labels[a] ? this.labels[a] : Fa(b, this.valueFormatString, this.chart._cultureInfo), a = new U(this.ctx, { 1148 x: 0, y: 0, maxWidth: g, backgroundColor: this.labelBackgroun
1148dColor, borderColor: this.labelBorderColor, 1149 borderThickness: this.labelBorderThickness, cornerRadius: this.labelCornerRadius, maxHeight: l, angle: this.labelAngle, text: this.prefix + a + this.suffix, horizontalAlign: "left", fontSize: this.labelFontSize, fontFamily: this.labelFontFamily, fontWeight: this.labelFontWeight, fontColor: this.labelFontColor, fontStyle: this.labelFontStyle, textBaseline: "middle" 1150 }), this._labels.push({ position: b.getTime(), textBlock: a, effectiveHeight: null }); else { 1151 f = this.viewportMaximum; if (this.labels) { 1152 a = Math.ceil(k); for (var k = Math.ceil(this.intervalStartPosition), 1153 n = !1, b = k; b < this.viewportMaximum; b += a) if (this.labels[b]) n = !0; else { n = !1; break } n && (this.interval = a, this.intervalStartPosition = k) 1154 } if (this.logarithmic && !this.equidistantInterval) { 1155 this.logLabelValues || (this.logLabelValues = [], this.createExtraLabelsForLog()); for (var e = 0; e < this.logLabelValues.length; e++) b = this.logLabelValues[e], b < this.viewportMinimum || (a = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.options, value: b, label: this.labels[b] ? this.labels[b] : null }) : "axisX" === this.type && this.labels[b] ? 1156 this.labels[b] : da(b, this.valueFormatString, this.chart._cultureInfo), a = new U(this.ctx, { 1157 x: 0, y: 0, maxWidth: g, maxHeight: l, angle: this.labelAngle, text: this.prefix + a + this.suffix, backgroundColor: this.labelBackgroundColor, borderColor: this.labelBorderColor, borderThickness: this.labelBorderThickness, cornerRadius: this.labelCornerRadius, horizontalAlign: "left", fontSize: this.labelFontSize, fontFamily: this.labelFontFamily, fontWeight: this.labelFontWeight, fontColor: this.labelFontColor, fontStyle: this.labelFontStyle, textBaseline: "middle", 1158 borderThickness: 0 1159 }), this._labels.push({ position: b, textBlock: a, effectiveHeight: null })) 1160 } for (b = this.intervalStartPosition; b <= f; b = parseFloat((this.logarithmic && this.equidistantInterval ? b * Math.pow(this.logarithmBase, this.interval) : b + this.interval).toFixed(14))) a = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.options, value: b, label: this.labels[b] ? this.labels[b] : null }) : "axisX" === this.type && this.labels[b] ? this.labels[b] : da(b, this.valueFormatString, this.chart._cultureInfo), a = new U(this.ctx, 1161 { x: 0, y: 0, maxWidth: g, maxHeight: l, angle: this.labelAngle, text: this.prefix + a + this.suffix, horizontalAlign: "left", backgroundColor: this.labelBackgroundColor, borderColor: this.labelBorderColor, borderThickness: this.labelBorderThickness, cornerRadius: this.labelCornerRadius, fontSize: this.labelFontSize, fontFamily: this.labelFontFamily, fontWeight: this.labelFontWeight, fontColor: this.labelFontColor, fontStyle: this.labelFontStyle, textBaseline: "middle" }), this._labels.push({ position: b, textBlock: a, effectiveHeight: null }) 1162 } if ("bottom" === 1163 this._position || "top" === this._position) h = this.logarithmic && !this.equidistantInterval && 2 <= this._labels.length ? this.lineCoordinates.width * Math.log(Math.min(this._labels[this._labels.length - 1].position / this._labels[this._labels.length - 2].position, this._labels[1].position / this._labels[0].position)) / Math.log(this.range) : this.lineCoordinates.width / (this.logarithmic && this.equidistantInterval ? Math.log(this.range) / Math.log(this.logarithmBase) : Math.abs(this.range)) * G[this.intervalType + "Duration"] * this.interval, 1164 g = "undefined" === typeof this.options.labelMaxWidth ? 0.5 * this.chart.width >> 0 : this.options.labelMaxWidth, this.chart.panEnabled || (l = "undefined" === typeof this.options.labelWrap || this.labelWrap ? 0.8 * this.chart.height >> 0 : 1.5 * this.labelFontSize); else if ("left" === this._position || "right" === this._position) h = this.logarithmic && !this.equidistantInterval && 2 <= this._labels.length ? this.lineCoordinates.height * Math.log(Math.min(this._labels[this._labels.length - 1].position / this._labels[this._labels.length - 2].position, this._labels[1].position / 1165 this._labels[0].position)) / Math.log(this.range) : this.lineCoordinates.height / (this.logarithmic && this.equidistantInterval ? Math.log(this.range) / Math.log(this.logarithmBase) : Math.abs(this.range)) * G[this.intervalType + "Duration"] * this.interval, this.chart.panEnabled || (g = "undefined" === typeof this.options.labelMaxWidth ? 0.3 * this.chart.width >> 0 : this.options.labelMaxWidth), l = "undefined" === typeof this.options.labelWrap || this.labelWrap ? 0.3 * this.chart.height >> 0 : 1.5 * this.labelFontSize; for (d = 0; d < this._labels.length; d++) { 1166 a = 1167 this._labels[d].textBlock; a.maxWidth = g; a.maxHeight = l; var q = a.measureText(); m = q.height 1168 } f = []; n = k = 0; if (this.labelAutoFit || this.options.labelAutoFit) if (y(this.labelAngle) || (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)), "bottom" === this._position || "top" === this._position) if (g = 0.9 * h >> 0, n = 0, !this.chart.panEnabled && 1 <= this._labels.length) { 1169 this.sessionVariables.labelFontSize = this.labelFontSize; 1170 this.sessionVariables.labelMaxWidth = g; this.sessionVariables.labelMaxHeight = l; this.sessionVariables.labelAngle = this.labelAngle; this.sessionVariables.labelWrap = this.labelWrap; for (b = 0; b < this._labels.length; b++) { a = this._labels[b].textBlock; for (var r, s = a.text.split(" "), d = 0; d < s.length; d++) e = s[d], this.ctx.font = a.fontStyle + " " + a.fontWeight + " " + a.fontSize + "px " + a.fontFamily, e = this.ctx.measureText(e), e.width > n && (r = b, n = e.width) } b = 0; for (b = this.intervalStartPosition < this.viewportMinimum ? 1 : 0; b < this._labels.length; b++) if (a = 1171 this._labels[b].textBlock, q = a.measureText(), b < this._labels.length - 1 && (e = b + 1, c = this._labels[e].textBlock, c = c.measureText()), f.push(a.height), this.sessionVariables.labelMaxHeight = Math.max.apply(Math, f), Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), d = g * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (l - a.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), y(this.options.labelAngle) && isNaN(this.options.labelAngle) && 0 !== this.options.labelAngle)
1171if (this.sessionVariables.labelMaxHeight = 1172 0 === this.labelAngle ? l : Math.min((d - g * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), d), s = (p - (m + a.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(-25))) / Math.sin(Math.PI / 180 * Math.abs(-25)), !y(this.options.labelWrap)) this.labelWrap ? y(this.options.labelMaxWidth) ? (this.sessionVariables.labelMaxWidth = Math.min(Math.max(g, n), s), this.sessionVariables.labelWrap = this.labelWrap, q.width + c.width >> 0 > 2 * g && (this.sessionVariables.labelAngle = -25)) : (this.sessionVariables.labelWrap = 1173 this.labelWrap, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth, this.sessionVariables.labelAngle = this.sessionVariables.labelMaxWidth > g ? -25 : this.sessionVariables.labelAngle) : y(this.options.labelMaxWidth) ? (this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxHeight = l, this.sessionVariables.labelMaxWidth = g, q.width + c.width >> 0 > 2 * g && (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = s)) : (this.sessionVariables.labelAngle = this.sessionVariables.labelMaxWidth > 1174 g ? -25 : this.sessionVariables.labelAngle, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth, this.sessionVariables.labelMaxHeight = l, this.sessionVariables.labelWrap = this.labelWrap); else { 1175 if (y(this.options.labelWrap)) if (!y(this.options.labelMaxWidth)) this.options.labelMaxWidth < g ? (this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth, this.sessionVariables.labelMaxHeight = d) : (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth, this.sessionVariables.labelMaxHeight = 1176 l); else if (!y(c)) if (d = q.width + c.width >> 0, e = this.labelFontSize, n < g) d - 2 * g > k && (k = d - 2 * g, d >= 2 * g && d < 2.2 * g ? (this.sessionVariables.labelMaxWidth = g, y(this.options.labelFontSize) && 12 < e && (e = Math.floor(12 / 13 * e), a.measureText()), this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? e : this.options.labelFontSize, this.sessionVariables.labelAngle = this.labelAngle) : d >= 2.2 * g && d < 2.8 * g ? (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = s, this.sessionVariables.labelFontSize = e) : d >= 2.8 * 1177 g && d < 3.2 * g ? (this.sessionVariables.labelMaxWidth = Math.max(g, n), this.sessionVariables.labelWrap = !0, y(this.options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? e : this.options.labelFontSize, this.sessionVariables.labelAngle = this.labelAngle) : d >= 3.2 * g && d < 3.6 * g ? (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelWrap = !0, this.sessionVariables.labelMaxWidth = s, this.sessionVariables.labelFontSize = 1178 this.labelFontSize) : d > 3.6 * g && d < 5 * g ? (y(this.options.labelFontSize) && 12 < e && (e = Math.floor(12 / 13 * e), a.measureText()), this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? e : this.options.labelFontSize, this.sessionVariables.labelWrap = !0, this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = s) : d > 5 * g && (this.sessionVariables.labelWrap = !0, this.sessionVariables.labelMaxWidth = g, this.sessionVariables.labelFontSize = e, this.sessionVariables.labelMaxHeight = l, this.sessionVariables.labelAngle = 1179 this.labelAngle)); else if (r === b && (0 === r && n + this._labels[r + 1].textBlock.measureText().width - 2 * g > k || r === this._labels.length - 1 && n + this._labels[r - 1].textBlock.measureText().width - 2 * g > k || 0 < r && r < this._labels.length - 1 && n + this._labels[r + 1].textBlock.measureText().width - 2 * g > k && n + this._labels[r - 1].textBlock.measureText().width - 2 * g > k)) k = 0 === r ? n + this._labels[r + 1].textBlock.measureText().width - 2 * g : n + this._labels[r - 1].textBlock.measureText().width - 2 * g, this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? 1180 e : this.options.labelFontSize, this.sessionVariables.labelWrap = !0, this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = s; else if (0 === k) for (this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? e : this.options.labelFontSize, this.sessionVariables.labelWrap = !0, d = 0; d < this._labels.length; d++) a = this._labels[d].textBlock, a.maxWidth = this.sessionVariables.labelMaxWidth = Math.min(Math.max(g, n), s), q = a.measureText(), d < this._labels.length - 1 && (e = d + 1, c = this._labels[e].textBlock, c.maxWidth = 1181 this.sessionVariables.labelMaxWidth = Math.min(Math.max(g, n), s), c = c.measureText(), q.width + c.width >> 0 > 2 * g && (this.sessionVariables.labelAngle = -25)) 1182 } else (this.sessionVariables.labelAngle = this.labelAngle, this.sessionVariables.labelMaxHeight = 0 === this.labelAngle ? l : Math.min((d - g * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), d), s = 0 != this.labelAngle ? (p - (m + a.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) : 1183 g, this.sessionVariables.labelMaxHeight = l = this.labelWrap ? (p - s * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)) : 1.5 * this.labelFontSize, y(this.options.labelWrap)) ? y(this.options.labelWrap) && (this.labelWrap && !y(this.options.labelMaxWidth) ? (this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : s, this.sessionVariables.labelMaxHeight = l) : (this.sessionVariables.labelAngle = this.labelAngle, 1184 this.sessionVariables.labelMaxWidth = s, this.sessionVariables.labelMaxHeight = d < 0.9 * h ? 0.9 * h : d, this.sessionVariables.labelWrap = this.labelWrap)) : (this.options.labelWrap ? (this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : s) : (y(this.options.labelMaxWidth), this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : s, this.sessionVariables.labelWrap = this.labelWrap), this.sessionVariables.labelMaxHeight = 1185 l); for (d = 0; d < this._labels.length; d++) a = this._labels[d].textBlock, a.maxWidth = this.labelMaxWidth = this.sessionVariables.labelMaxWidth, a.fontSize = this.sessionVariables.labelFontSize, a.angle = this.labelAngle = this.sessionVariables.labelAngle, a.wrap = this.labelWrap = this.sessionVariables.labelWrap, a.maxHeight = this.sessionVariables.labelMaxHeight, a.measureText() 1186 } else for (b = 0; b < this._labels.length; b++) a = this._labels[b].textBlock, a.maxWidth = this.labelMaxWidth = y(this.options.labelMaxWidth) ? this.sessionVariables.labelMaxWidth : 1187 this.options.labelMaxWidth, a.fontSize = this.labelFontSize = y(this.options.labelFontSize) ? this.sessionVariables.labelFontSize : this.options.labelFontSize, a.angle = this.labelAngle = y(this.options.labelAngle) ? this.sessionVariables.labelAngle : this.labelAngle, a.wrap = this.labelWrap = y(this.options.labelWrap) ? this.sessionVariables.labelWrap : this.options.labelWrap, a.maxHeight = this.sessionVariables.labelMaxHeight, a.measureText(); else if ("left" === this._position || "right" === this._position) if (g = y(this.options.labelMaxWidth) ? 1188 0.3 * this.chart.width >> 0 : this.options.labelMaxWidth, l = "undefined" === typeof this.options.labelWrap || this.labelWrap ? 0.3 * this.chart.height >> 0 : 1.5 * this.labelFontSize, !this.chart.panEnabled && 1 <= this._labels.length) { 1189 this.sessionVariables.labelFontSize = this.labelFontSize; this.sessionVariables.labelMaxWidth = g; this.sessionVariables.labelMaxHeight = l; this.sessionVariables.labelAngle = y(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle; this.sessionVariables.labelWrap = this.labelWrap; for (b = 0; b < 1190 this._labels.length; b++) (a = this._labels[b].textBlock, q = a.measureText(), b < this._labels.length - 1 && (e = b + 1, c = this._labels[e].textBlock, c = c.measureText()), f.push(a.height), this.sessionVariables.labelMaxHeight = Math.max.apply(Math, f), d = g * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (l - a.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), y(this.options.labelAngle) && isNaN(this.options.labelAngle) && 0 !== 1191 this.options.labelAngle) ? y(this.options.labelWrap) ? y(this.options.labelWrap) && (y(this.options.labelMaxWidth) ? y(c) || (h = q.height + c.height >> 0, h - 2 * l > n && (n = h - 2 * l, h >= 2 * l && h < 2.4 * l ? (y(this.options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelMaxHeight = l, this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? this.labelFontSize : this.options.labelFontSize) : h >= 2.4 * l && h < 2.8 * l ? (this.sessionVariables.labelMaxHeight = 1192 d, this.sessionVariables.labelFontSize = this.labelFontSize, this.sessionVariables.labelWrap = !0) : h >= 2.8 * l && h < 3.2 * l ? (this.sessionVariables.labelMaxHeight = l, this.sessionVariables.labelWrap = !0, y(this.options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? this.labelFontSize : this.options.labelFontSize, this.sessionVariables.labelAngle = y(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle) : 1193 h >= 3.2 * l && h < 3.6 * l ? (this.sessionVariables.labelMaxHeight = d, this.sessionVariables.labelWrap = !0, this.sessionVariables.labelFontSize = this.labelFontSize) : h > 3.6 * l && h < 10 * l ? (y(this.options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? this.labelFontSize : this.options.labelFontSize, this.sessionVariables.labelMaxWidth = g, this.sessionVariables.labelMaxHeight = l, this.sessionVariables.labelAngle = 1194 y(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle) : h > 10 * l && h < 50 * l && (y(this.options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = y(this.options.labelFontSize) ? this.labelFontSize : this.options.labelFontSize, this.sessionVariables.labelMaxHeight = l, this.sessionVariables.labelMaxWidth = g, this.sessionVariables.labelAngle = y(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle))) : 1195 (this.sessionVariables.labelMaxHeight = l, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : this.sessionVariables.labelMaxWidth)) : (this.sessionVariables.labelMaxWidth = this.labelWrap ? this.options.labelMaxWidth ? this.options.labelMaxWidth : this.sessionVariables.labelMaxWidth : this.labelMaxWidth ? this.options.labelMaxWidth ? this.options.labelMaxWidth : this.sessionVariables.labelMaxWidth : g, this.sessionVariables.labelMaxHeight = l) : (this.sessionVariables.labelAngle = this.labelAngle, 1196 this.sessionVariables.labelMaxWidth = 0 === this.labelAngle ? g : Math.min((d - l * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), l), y(this.options.labelWrap)) ? y(this.options.labelWrap) && (this.labelWrap && !y(this.options.labelMaxWidth) ? (this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth > this.options.labelMaxWidth : this.sessionVariables.labelMaxWidth, this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxHeight = 1197 d) : (this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : g, this.sessionVariables.labelMaxHeight = 0 === this.labelAngle ? l : d, y(this.options.labelMaxWidth) && (this.sessionVariables.labelAngle = this.labelAngle))) : this.options.labelWrap ? (this.sessionVariables.labelMaxHeight = 0 === this.labelAngle ? l : d, this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxWidth = g) : (this.sessionVariables.labelMaxHeight = l, y(this.options.labelMaxWidth), this.sessionVariables.labelMaxWidth = 1198 this.options.labelMaxWidth ? this.options.labelMaxWidth : this.sessionVariables.labelMaxWidth, this.sessionVariables.labelWrap = this.labelWrap); for (d = 0; d < this._labels.length; d++) a = this._labels[d].textBlock, a.maxWidth = this.labelMaxWidth = this.sessionVariables.labelMaxWidth, a.fontSize = this.labelFontSize = this.sessionVariables.labelFontSize, a.angle = this.labelAngle = this.sessionVariables.labelAngle, a.wrap = this.labelWrap = this.sessionVariables.labelWrap, a.maxHeight = this.sessionVariables.labelMaxHeight, a.measureText() 1199 } else for (b = 1200 0; b < this._labels.length; b++) a = this._labels[b].textBlock, a.maxWidth = this.labelMaxWidth = y(this.options.labelMaxWidth) ? this.sessionVariables.labelMaxWidth : this.options.labelMaxWidth, a.fontSize = this.labelFontSize = y(this.options.labelFontSize) ? this.sessionVariables.labelFontSize : this.options.labelFontSize, a.angle = this.labelAngle = y(this.options.labelAngle) ? this.sessionVariables.labelAngle : this.labelAngle, a.wrap = this.labelWrap = y(this.options.labelWrap) ? this.sessionVariables.labelWrap : this.options.labelWrap, 1201 a.maxHeight = this.sessionVariables.labelMaxHeight, a.measureText(); for (b = 0; b < this.stripLines.length; b++) { 1202 var g = this.stripLines[b], x; if ("outside" === g.labelPlacement) { 1203 l = this.sessionVariables.labelMaxWidth; if ("bottom" === this._position || "top" === this._position) x = "undefined" === typeof g.options.labelWrap ? this.sessionVariables.labelMaxHeight : g.labelWrap ? 0.8 * this.chart.height >> 0 : 1.5 * this.labelFontSize; if ("left" === this._position || "right" === this._position) x = "undefined" === typeof g.options.labelWrap ? this.sessionVariables.labelMaxHeight : 1204 g.labelWrap ? 0.8 * this.chart.width >> 0 : 1.5 * this.labelFontSize;
1204 c = y(g.options.labelBackgroundColor) ? "#EEEEEE" : g.options.labelBackgroundColor 1205 } else l = "bottom" === this._position || "top" === this._position ? 0.9 * this.chart.width >> 0 : 0.9 * this.chart.height >> 0, x = "undefined" === typeof g.options.labelWrap || g.labelWrap ? "bottom" === this._position || "top" === this._position ? 0.8 * this.chart.width >> 0 : 0.8 * this.chart.height >> 0 : 1.5 * this.labelFontSize, c = y(g.options.labelBackgroundColor) ? y(g.startValue) && 0 !== g.startValue ? t ? "transparent" : 1206 null : "#EEEEEE" : g.options.labelBackgroundColor; a = new U(this.ctx, { 1207 x: 0, y: 0, backgroundColor: c, borderColor: g.labelBorderColor, borderThickness: g.labelBorderThickness, cornerRadius: g.labelCornerRadius, maxWidth: g.options.labelMaxWidth ? g.options.labelMaxWidth : l, maxHeight: x, angle: this.labelAngle, text: g.labelFormatter ? g.labelFormatter({ chart: this.chart, axis: this, stripLine: g }) : g.label, horizontalAlign: "left", fontSize: "outside" === g.labelPlacement ? g.options.labelFontSize ? g.options.labelFontSize : this.labelFontSize : 1208 g.labelFontSize, fontFamily: "outside" === g.labelPlacement ? g.options.labelFontFamily ? g.options.labelFontFamily : this.labelFontFamily : g.labelFontFamily, fontWeight: "outside" === g.labelPlacement ? g.options.fontWeight ? g.options.fontWeight : this.fontWeight : g.fontWeight, fontColor: g.options.labelFontColor || g.color, fontStyle: "outside" === g.labelPlacement ? g.options.fontStyle ? g.options.fontStyle : this.fontWeight : g.fontStyle, textBaseline: "middle" 1209 }); this._stripLineLabels.push({ 1210 position: g.value, textBlock: a, effectiveHeight: null, 1211 stripLine: g 1212 }) 1213 } 1214 }; B.prototype.createLabelsAndCalculateWidth = function () { 1215 var a = 0, c = 0; this._labels = []; this._stripLineLabels = []; if ("left" === this._position || "right" === this._position) { 1216 this.createLabels(); for (c = 0; c < this._labels.length; c++) { var b = this._labels[c].textBlock, d = b.measureText(), f = 0, f = 0 === this.labelAngle ? d.width : d.width * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)) + (d.height - b.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)); a < f && (a = f); this._labels[c].effectiveWidth = f } for (c = 0; c < this._stripLineLabels.length; c++) "outside" === 1217 this._stripLineLabels[c].stripLine.labelPlacement && (this._stripLineLabels[c].stripLine.value > this.viewportMinimum && this._stripLineLabels[c].stripLine.value < this.viewportMaximum) && (b = this._stripLineLabels[c].textBlock, d = b.measureText(), f = 0 === this.labelAngle ? d.width : d.width * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)) + (d.height - b.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), a < f && (a = f), this._stripLineLabels[c].effectiveWidth = f) 1218 } return (this.title ? this._titleTextBlock.measureText().height + 1219 2 : 0) + a + this.tickLength + 5 1220 }; B.prototype.createLabelsAndCalculateHeight = function () { 1221 var a = 0; this._labels = []; this._stripLineLabels = []; var c, b = 0; this.createLabels(); if ("bottom" === this._position || "top" === this._position) { 1222 for (b = 0; b < this._labels.length; b++) { 1223 c = this._labels[b].textBlock; var d = c.measureText(), f = 0, f = 0 === this.labelAngle ? d.height : d.width * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (d.height - c.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)); a < f && (a = f); this._labels[b].effectiveHeight = 1224 f 1225 } for (b = 0; b < this._stripLineLabels.length; b++) "outside" === this._stripLineLabels[b].stripLine.labelPlacement && (c = this._stripLineLabels[b].textBlock, d = c.measureText(), f = 0 === this.labelAngle ? d.height : d.width * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (d.height - c.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), a < f && (a = f), this._stripLineLabels[b].effectiveHeight = f) 1226 } return (this.title ? this._titleTextBlock.measureText().height + 2 : 0) + a + this.tickLength + 5 1227 }; B.setLayoutAndRender = function (a, c, b, d, 1228 f, g) { 1229 var l, k, h, m, p = a[0] ? a[0].chart : c[0].chart, n = p.ctx; if (a && 0 < a.length) for (var e = 0; e < a.length; e++) a[e] && a[e].calculateAxisParameters(); if (c && 0 < c.length) for (e = 0; e < c.length; e++) c[e].calculateAxisParameters(); if (b && 0 < b.length) for (e = 0; e < b.length; e++) b[e].calculateAxisParameters(); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e].calculateAxisParameters(); var q = 0, r = 0, s = 0, t = 0, u = 0, v = 0, z = 0, w, A, B = k = 0, D, E, F, G; D = E = F = G = !1; if (a && 0 < a.length) for (e = 0; e < a.length; e++) a[e] && a[e].title && (a[e]._titleTextBlock = new U(a[e].ctx, 1230 { text: a[e].title, horizontalAlign: "center", fontSize: a[e].titleFontSize, fontFamily: a[e].titleFontFamily, fontWeight: a[e].titleFontWeight, fontColor: a[e].titleFontColor, fontStyle: a[e].titleFontStyle, borderColor: a[e].titleBorderColor, borderThickness: a[e].titleBorderThickness, backgroundColor: a[e].titleBackgroun
1230dColor, cornerRadius: a[e].titleCornerRadius, textBaseline: "top" })); if (c && 0 < c.length) for (e = 0; e < c.length; e++) c[e] && c[e].title && (c[e]._titleTextBlock = new U(c[e].ctx, { 1231 text: c[e].title, horizontalAlign: "center", 1232 fontSize: c[e].titleFontSize, fontFamily: c[e].titleFontFamily, fontWeight: c[e].titleFontWeight, fontColor: c[e].titleFontColor, fontStyle: c[e].titleFontStyle, borderColor: c[e].titleBorderColor, borderThickness: c[e].titleBorderThickness, backgroundColor: c[e].titleBackgroundColor, cornerRadius: c[e].titleCornerRadius, textBaseline: "top" 1233 })); if (b && 0 < b.length) for (e = 0; e < b.length; e++) b[e] && b[e].title && (b[e]._titleTextBlock = new U(b[e].ctx, { 1234 text: b[e].title, horizontalAlign: "center", fontSize: b[e].titleFontSize, fontFamily: b[e].titleFontFamily, 1235 fontWeight: b[e].titleFontWeight, fontColor: b[e].titleFontColor, fontStyle: b[e].titleFontStyle, borderColor: b[e].titleBorderColor, borderThickness: b[e].titleBorderThickness, backgroundColor: b[e].titleBackgroundColor, cornerRadius: b[e].titleCornerRadius, textBaseline: "top" 1236 })); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e] && d[e].title && (d[e]._titleTextBlock = new U(d[e].ctx, { 1237 text: d[e].title, horizontalAlign: "center", fontSize: d[e].titleFontSize, fontFamily: d[e].titleFontFamily, fontWeight: d[e].titleFontWeight, fontColor: d[e].titleFontColor, 1238 fontStyle: d[e].titleFontStyle, borderColor: d[e].titleBorderColor, borderThickness: d[e].titleBorderThickness, backgroundColor: d[e].titleBackgroundColor, cornerRadius: d[e].titleCornerRadius, textBaseline: "top" 1239 })); if ("normal" === f) { 1240 var t = [], u = [], v = [], z = [], H = [], I = [], K = [], N = []; if (a && 0 < a.length) for (e = 0; e < a.length; e++) a[e] && a[e].title && (a[e]._titleTextBlock.maxWidth = a[e].titleMaxWidth || g.width, a[e]._titleTextBlock.maxHeight = a[e].titleWrap ? 0.8 * g.height : 1.5 * a[e].titleFontSize, a[e]._titleTextBlock.angle = 0); if (c && 1241 0 < c.length) for (e = 0; e < c[e].length; e++) c[e] && c[e].title && (c[e]._titleTextBlock.maxWidth = c[e].titleMaxWidth || g.width, c[e]._titleTextBlock.maxHeight = c[e].titleWrap ? 0.8 * g.height : 1.5 * c[e].titleFontSize, c[e]._titleTextBlock.angle = 0); if (b && 0 < b.length) for (e = 0; e < b.length; e++) b[e] && b[e].title && (b[e]._titleTextBlock.maxWidth = b[e].titleMaxWidth || g.height, b[e]._titleTextBlock.maxHeight = b[e].titleWrap ? 0.8 * g.width : 1.5 * b[e].titleFontSize, b[e]._titleTextBlock.angle = -90); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e] && 1242 d[e].title && (d[e]._titleTextBlock.maxWidth = d[e].titleMaxWidth || g.height, d[e]._titleTextBlock.maxHeight = d[e].titleWrap ? 0.8 * g.width : 1.5 * d[e].titleFontSize, d[e]._titleTextBlock.angle = 90); for (; 4 > q;) { 1243 var L = 0, O = 0, P = 0, M = 0, Y = f = 0, C = 0, Q = 0, X = 0, T = 0, S = 0, R = 0; if (b && 0 < b.length) for (v = [], e = S = 0; e < b.length; e++) v.push(Math.ceil(b[e] ? b[e].createLabelsAndCalculateWidth() : 0)), S += v[e], C += b[e] ? b[e].margin : 0; else v.push(Math.ceil(b[0] ? b[0].createLabelsAndCalculateWidth() : 0)); K.push(v); if (d && 0 < d.length) for (z = [], e = R = 0; e < d.length; e++) z.push(Math.ceil(d[e] ? 1244 d[e].createLabelsAndCalculateWidth() : 0)), R += z[e], Q += d[e] ? d[e].margin : 0; else z.push(Math.ceil(d[0] ? d[0].createLabelsAndCalculateWidth() : 0)); N.push(z); l = Math.round(g.x1 + S + C); h = Math.round(g.x2 - R - Q > p.width - 10 ? p.width - 10 : g.x2 - R - Q); if (a && 0 < a.length) for (t = [], e = X = 0; e < a.length; e++) a[e] && (a[e].lineCoordinates = {}), a[e].lineCoordinates.width = Math.abs(h - l), a[e].title && (a[e]._titleTextBlock.maxWidth = 0 < a[e].titleMaxWidth && a[e].titleMaxWidth < a[e].lineCoordinates.width ? a[e].titleMaxWidth : a[e].lineCoordinates.width), 1245 t.push(Math.ceil(a[e] ? a[e].createLabelsAndCalculateHeight() : 0)), X += t[e], f += a[e] ? a[e].margin : 0; else t.push(Math.ceil(a[0] ? a[0].createLabelsAndCalculateHeight() : 0)); H.push(t); if (c && 0 < c.length) for (u = [], e = T = 0; e < c.length; e++) c[e] && (c[e].lineCoordinates = {}), c[e].lineCoordinates.width = Math.abs(h - l), c[e].title && (c[e]._titleTextBlock.maxWidth = 0 < c[e].titleMaxWidth && c[e].titleMaxWidth < c[e].lineCoordinates.width ? c[e].titleMaxWidth : c[e].lineCoordinates.width), u.push(Math.ceil(c[e] ? c[e].createLabelsAndCalculateHeight() : 1246 0)), T += u[e], Y += c[e] ? c[e].margin : 0; else u.push(Math.ceil(c[0] ? c[0].createLabelsAndCalculateHeight() : 0)); I.push(u); if (a && 0 < a.length) for (e = 0; e < a.length; e++) a[e] && (a[e].lineCoordinates.x1 = l, h = Math.round(g.x2 - R - Q > p.width - 10 ? p.width - 10 : g.x2 - R - Q), a[e]._labels && 1 < a[e]._labels.length && (k = m = 0, m = a[e]._labels[1], k = "dateTime" === a[e].chart.plotInfo.axisXValueType ? a[e]._labels[a[e]._labels.length - 2] : a[e]._labels[a[e]._labels.length - 1], r = m.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(m.textBlock.angle)) + (m.textBlock.height - 1247 k.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(m.textBlock.angle)), s = k.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(k.textBlock.angle)) + (k.textBlock.height - k.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(k.textBlock.angle))), a[e] && (a[e].labelAutoFit && !y(w) && !y(A)) && (k = 0, 0 < a[e].labelAngle ? A + s > h && (k += 0 < a[e].labelAngle ? A + s - h - R : 0) : 0 > a[e].labelAngle ? w - r < l && w - r < a[e].viewportMinimum && (B = l - (C + a[e].tickLength + v + w - r + a[e].labelFontSize / 2)) : 0 === a[e].labelAngle && (A + s > h && (k = A + s / 2 - h - R), w - r < l && w - r < 1248 a[e].viewportMinimum && (B = l - C - a[e].tickLength - v - w + r / 2)), a[e].viewportMaximum === a[e].maximum && a[e].viewportMinimum === a[e].minimum && 0 < a[e].labelAngle && 0 < k ? h -= k : a[e].viewportMaximum === a[e].maximum && a[e].viewportMinimum === a[e].minimum && 0 > a[e].labelAngle && 0 < B ? l += B : a[e].viewportMaximum === a[e].maximum && a[e].viewportMinimum === a[e].minimum && 0 === a[e].labelAngle && (0 < B && (l += B), 0 < k && (h -= k))), p.panEnabled ? X = p.sessionVariables.axisX.height : p.sessionVariables.axisX.height = X, k = Math.round(g.y2 - X - f + L), m = Math.round(g.y2), 1249 a[e].lineCoordinates.x2 = h, a[e].lineCoordinates.width = h - l, a[e].lineCoordinates.y1 = k, a[e].lineCoordinates.y2 = k, a[e].bounds = { x1: l, y1: k, x2: h, y2: m - (X + f - t[e] - L), width: h - l, height: m - k }), L += t[e] + a[e].margin; if (c && 0 < c.length) for (e = 0; e < c.length; e++) c[e].lineCoordinates.x1 = Math.round(g.x1 + S + C), c[e].lineCoordinates.x2 = Math.round(g.x2 - R - Q > p.width - 10 ? p.width - 10 : g.x2 - R - Q), c[e].lineCoordinates.width = Math.abs(h - l), c[e]._labels && 1 < c[e]._labels.length && (m = c[e]._labels[1], k = "dateTime" === c[e].chart.plotInfo.axisXValueType ? 1250 c[e]._labels[c[e]._labels.length - 2] : c[e]._labels[c[e]._labels.length - 1], r = m.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(m.textBlock.angle)) + (m.textBlock.height - k.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(m.textBlock.angle)), s = k.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(k.textBlock.angle)) + (k.textBlock.height - k.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(k.textBlock.angle))), p.panEnabled ? T = p.sessionVariables.axisX2.height : p.sessionVariables.axisX2.height = T, k = Math.round(g.y1), 1251 m = Math.round(g.y2 + c[e].margin), c[e].lineCoordinates.y1 = k + T + Y - O, c[e].lineCoordinates.y2 = k, c[e].bounds = { x1: l, y1: k + (T + Y - u[e] - O), x2: h, y2: m, width: h - l, height: m - k }, O += u[e] + c[e].margin; if (b && 0 < b.length) for (e = 0; e < b.length; e++) C = 10, b[e] && (l = Math.round(a[0] ? a[0].lineCoordinates.x1 : c[0].lineCoordinates.x1), C = b[e]._labels && 0 < b[e]._labels.length ? b[e]._labels[b[e]._labels.length - 1].textBlock.height / 2 : 10, k = Math.round(g.y1 + T + Y < Math.max(C, 10) ? Math.max(C, 10) : g.y1 + T + Y), h = Math.round(a[0] ? a[0].lineCoordinates.x1 : c[0].lineCoordinates.x1), 1252 C = 0 < a.length ? 0 : b[e]._labels && 0 < b[e]._labels.length ? b[e]._labels[0].textBlock.height / 2 : 10, m = Math.round(g.y2 - X - f - C), b[e].lineCoordinates = { x1: h - P, y1: k, x2: h - P, y2: m, height: Math.abs(m - k) }, b[e].bounds = { x1: l - (v[e] + P), y1: k, x2: h, y2: m, width: h - l, height: m - k }, b[e].title && (b[e]._titleTextBlock.maxWidth = 0 < b[e].titleMaxWidth && b[e].titleMaxWidth < b[e].lineCoordinates.height ? b[e].titleMaxWidth : b[e].lineCoordinates.height), P += v[e] + b[e].margin); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e] && (l = Math.round(a[0] ? a[0].lineCoordinates.x2 : 1253 c[0].lineCoordinates.x2), h = Math.round(l), C = d[e]._labels && 0 < d[e]._labels.length ? d[e]._labels[d[e]._labels.length - 1].textBlock.height / 2 : 0, k = Math.round(g.y1 + T + Y < Math.max(C, 10) ? Math.max(C, 10) : g.y1 + T + Y), C = 0 < a.length ? 0 : d[e]._labels && 0 < d[e]._labels.length ? d[e]._labels[0].textBlock.height / 2 : 0, m = Math.round(g.y2 - (X + f + C)), d[e].lineCoordinates = { x1: l + M, y1: k, x2: l + M, y2: m, height: Math.abs(m - k) }, d[e].bounds = { x1: l, y1: k, x2: h + (z[e] + M), y2: m, width: h - l, height: m - k }, d[e].title && (d[e]._titleTextBlock.maxWidth = 0 < d[e].titleMaxWidth && 1254 d[e].titleMaxWidth < d[e].lineCoordinates.height ? d[e].titleMaxWidth : d[e].lineCoordinates.height), M += z[e] + d[e].margin); if (a && 0 < a.length) for (e = 0; e < a.length; e++) a[e] && (a[e].calculateValueToPixelConversionParameters(), a[e]._labels && 1 < a[e]._labels.length && (w = (a[e].logarithmic ? Math.log(a[e]._labels[1].position / a[e].viewportMinimum) / a[e].conversionParameters.lnLogarithmBase : a[e]._labels[1].position - a[e].viewportMinimum) * Math.abs(a[e].conversionParameters.pixelPerUnit) + a[e].lineCoordinates.x1, A = "dateTime" === 1255 a[e].chart.plotInfo.axisXValueType ? (a[e].logarithmic ? Math.log(a[e]._labels[a[e]._labels.length - 2].position / a[e].viewportMinimum) / a[e].conversionParameters.lnLogarithmBase : a[e]._labels[a[e]._labels.length - 2].position - a[e].viewportMinimum) * Math.abs(a[e].conversionParameters.pixelPerUnit) + a[e].lineCoordinates.x1 : (a[e].logarithmic ? Math.log(a[e]._labels[a[e]._labels.length - 1].position / a[e].viewportMinimum) / a[e].conversionParameters.lnLogarithmBase : a[e]._labels[a[e]._labels.length - 1].position - a[e].viewportMinimum) * 1256 Math.abs(a[e].conversionParameters.pixelPerUnit) + a[e].lineCoordinates.x1)); if (c && 0 < c.length) for (e = 0; e < c.length; e++) c[e].calculateValueToPixelConversionParameters(), c[e]._labels && 1 < c[e]._labels.length && (w = (c[e].logarithmic ? Math.log(c[e]._labels[1].position / c[e].viewportMinimum) / c[e].conversionParameters.lnLogarithmBase : c[e]._labels[1].position - c[e].viewportMinimum) * Math.abs(c[e].conversionParameters.pixelPerUnit) + c[e].lineCoordinates.x1, A = "dateTime" === c[e].chart.plotInfo.axisXValueType ? (c[e].logarithmic ? 1257 Math.log(c[e]._labels[c[e]._labels.length - 2].position / c[e].viewportMinimum) / c[e].conversionParameters.lnLogarithmBase : c[e]._labels[c[e]._labels.length - 2].position - c[e].viewportMinimum) * Math.abs(c[e].conversionParameters.pixelPerUnit) + c[e].lineCoordinates.x1 : (c[e].logarithmic ? Math.log(c[e]._labels[c[e]._labels.length - 1].position / c[e].viewportMinimum) / c[e].conversionParameters.lnLogarithmBase : c[e]._labels[c[e]._labels.length - 1].position - c[e].viewportMinimum) * Math.abs(c[e].conversionParameters.pixelPerUnit) + 1258 c[e].lineCoordinates.x1); if (b && 0 < b.length) for (e = 0; e < b.length; e++) b[e].calculateValueToPixelConversionParameters(); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e].calculateValueToPixelConversionParameters(); if (0 < q) { 1259 if (a && 0 < a.length) for (e = 0; e < a.length; e++) D = H[q - 1][e] === H[q][e] ? !0 : !1; else D = !0; if (c && 0 < c.length) for (e = 0; e < c.length; e++) E = I[q - 1][e] === I[q][e] ? !0 : !1; else E = !0; if (b && 0 < b.length) for (e = 0; e < b.length; e++) F = K[q - 1][e] === K[q][e] ? !0 : !1; else F = !0; if (d && 0 < d.length) for (e = 0; e < d.length; e++) G = N[q - 1][e] === N[q][e] ? 1260 !0 : !1; else G = !0 1261 } if (D && E && F && G) break; q++ 1262 } n.save(); n.beginPath(); a[0] && n.rect(5, a[0].bounds.y1, a[0].chart.width - 10, a[0].bounds.height); c[0] && n.rect(5, c[c.length - 1].bounds.y1, c[0].chart.width - 10, c[0].bounds.height); n.clip(); if (a && 0 < a.length) for (e = 0; e < a.length; e++) a[e].renderLabelsTicksAndTitle(); if (c && 0 < c.length) for (e = 0; e < c.length; e++) c[e].renderLabelsTicksAndTitle();
1262 n.restore(); if (b && 0 < b.length) for (e = 0; e < b.length; e++) b[e].renderLabelsTicksAndTitle(); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e].renderLabelsTicksAndTitle() 1263 } else { 1264 w = 1265 []; A = []; B = []; r = []; s = []; H = []; I = []; K = []; if (a && 0 < a.length) for (e = 0; e < a.length; e++) a[e] && a[e].title && (a[e]._titleTextBlock.maxWidth = a[e].titleMaxWidth || g.width, a[e]._titleTextBlock.maxHeight = a[e].titleWrap ? 0.8 * g.height : 1.5 * a[e].titleFontSize, a[e]._titleTextBlock.angle = -90); if (c && 0 < c.length) for (e = 0; e < c.length; e++) c[e] && c[e].title && (c[e]._titleTextBlock.maxWidth = c[e].titleMaxWidth || g.width, c[e]._titleTextBlock.maxHeight = c[e].titleWrap ? 0.8 * g.height : 1.5 * c[e].titleFontSize, c[e]._titleTextBlock.angle = 90); if (b && 1266 0 < b.length) for (e = 0; e < b.length; e++) b[e] && b[e].title && (b[e]._titleTextBlock.maxWidth = b[e].titleMaxWidth || g.width, b[e]._titleTextBlock.maxHeight = b[e].titleWrap ? 0.8 * g.height : 1.5 * b[e].titleFontSize, b[e]._titleTextBlock.angle = 0); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e] && d[e].title && (d[e]._titleTextBlock.maxWidth = d[e].titleMaxWidth || g.width, d[e]._titleTextBlock.maxHeight = d[e].titleWrap ? 0.8 * g.height : 1.5 * d[e].titleFontSize, d[e]._titleTextBlock.angle = 0); for (; 4 > q;) { 1267 T = X = S = M = Q = C = Y = f = P = N = O = L = 0; if (a && 0 < a.length) for (B = 1268 [], e = X = 0; e < a.length; e++) B.push(Math.ceil(a[e] ? a[e].createLabelsAndCalculateWidth() : 0)), X += B[e], f += a[e] ? a[e].margin : 0; else B.push(Math.ceil(a[0] ? a[0].createLabelsAndCalculateWidth() : 0)); I.push(B); if (c && 0 < c.length) for (r = [], e = T = 0; e < c.length; e++) r.push(Math.ceil(c[e] ? c[e].createLabelsAndCalculateWidth() : 0)), T += r[e], Y += c[e] ? c[e].margin : 0; else r.push(Math.ceil(c[0] ? c[0].createLabelsAndCalculateWidth() : 0)); K.push(r); if (b && 0 < b.length) for (e = 0; e < b.length; e++) b[e].lineCoordinates = {}, l = Math.round(g.x1 + X + f), h = 1269 Math.round(g.x2 - T - Y > p.width - 10 ? p.width - 10 : g.x2 - T - Y), b[e].labelAutoFit && !y(t) && (0 < !a.length && (l = 0 > b[e].labelAngle ? Math.max(l, t) : 0 === b[e].labelAngle ? Math.max(l, t / 2) : l), 0 < !c.length && (h = 0 < b[e].labelAngle ? h - u / 2 : 0 === b[e].labelAngle ? h - u / 2 : h)), b[e].lineCoordinates.x1 = l, b[e].lineCoordinates.x2 = h, b[e].lineCoordinates.width = Math.abs(h - l), b[e].title && (b[e]._titleTextBlock.maxWidth = 0 < b[e].titleMaxWidth && b[e].titleMaxWidth < b[e].lineCoordinates.width ? b[e].titleMaxWidth : b[e].lineCoordinates.width); if (d && 0 < d.length) for (e = 1270 0; e < d.length; e++) d[e].lineCoordinates = {}, l = Math.round(g.x1 + X + f), h = Math.round(g.x2 - T - Y > d[e].chart.width - 10 ? d[e].chart.width - 10 : g.x2 - T - Y), d[e] && d[e].labelAutoFit && !y(v) && (0 < !a.length && (l = 0 < d[e].labelAngle ? Math.max(l, v) : 0 === d[e].labelAngle ? Math.max(l, v / 2) : l), 0 < !c.length && (h -= z / 2)), d[e].lineCoordinates.x1 = l, d[e].lineCoordinates.x2 = h, d[e].lineCoordinates.width = Math.abs(h - l), d[e].title && (d[e]._titleTextBlock.maxWidth = 0 < d[e].titleMaxWidth && d[e].titleMaxWidth < d[e].lineCoordinates.width ? d[e].titleMaxWidth : 1271 d[e].lineCoordinates.width); if (b && 0 < b.length) for (w = [], e = M = 0; e < b.length; e++) w.push(Math.ceil(b[e] ? b[e].createLabelsAndCalculateHeight() : 0)), M += w[e] + b[e].margin, C += b[e].margin; else w.push(Math.ceil(b[0] ? b[0].createLabelsAndCalculateHeight() : 0)); s.push(w); if (d && 0 < d.length) for (A = [], e = S = 0; e < d.length; e++) A.push(Math.ceil(d[e] ? d[e].createLabelsAndCalculateHeight() : 0)), S += A[e], Q += d[e].margin; else A.push(Math.ceil(d[0] ? d[0].createLabelsAndCalculateHeight() : 0)); H.push(A); if (b && 0 < b.length) for (e = 0; e < b.length; e++) 0 < 1272 b[e]._labels.length && (m = b[e]._labels[0], k = b[e]._labels[b[e]._labels.length - 1], t = m.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(m.textBlock.angle)) + (m.textBlock.height - k.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(m.textBlock.angle)), u = k.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(k.textBlock.angle)) + (k.textBlock.height - k.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(k.textBlock.angle))); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e] && 0 < d[e]._labels.length && (m = d[e]._labels[0], k = d[e]._labels[d[e]._labels.length - 1273 1], v = m.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(m.textBlock.angle)) + (m.textBlock.height - k.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(m.textBlock.angle)), z = k.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(k.textBlock.angle)) + (k.textBlock.height - k.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(k.textBlock.angle))); if (p.panEnabled) for (e = 0; e < b.length; e++) w[e] = p.sessionVariables.axisY.height; else for (e = 0; e < b.length; e++) p.sessionVariables.axisY.height = w[e]; if (b && 0 < b.length) for (e = b.length - 1274 1; 0 <= e; e--) k = Math.round(g.y2), m = Math.round(g.y2 > b[e].chart.height - 10 ? b[e].chart.height - 10 : g.y2), b[e].lineCoordinates.y1 = k - (w[e] + b[e].margin + L), b[e].lineCoordinates.y2 = k - (w[e] + b[e].margin + L), b[e].bounds = { x1: l, y1: k - (w[e] + L + b[e].margin), x2: h, y2: m - (L + b[e].margin), width: h - l, height: w[e] }, b[e].title && (b[e]._titleTextBlock.maxWidth = 0 < b[e].titleMaxWidth && b[e].titleMaxWidth < b[e].lineCoordinates.width ? b[e].titleMaxWidth : b[e].lineCoordinates.width), L += w[e] + b[e].margin; if (d && 0 < d.length) for (e = d.length - 1; 0 <= e; e--) d[e] && 1275 (k = Math.round(g.y1), m = Math.round(g.y1 + (A[e] + d[e].margin + O)), d[e].lineCoordinates.y1 = m, d[e].lineCoordinates.y2 = m, d[e].bounds = { x1: l, y1: k + (d[e].margin + O), x2: h, y2: m, width: h - l, height: S }, d[e].title && (d[e]._titleTextBlock.maxWidth = 0 < d[e].titleMaxWidth && d[e].titleMaxWidth < d[e].lineCoordinates.width ? d[e].titleMaxWidth : d[e].lineCoordinates.width), O += A[e] + d[e].margin); if (a && 0 < a.length) for (e = 0; e < a.length; e++) { 1276 C = a[e]._labels && 0 < a[e]._labels.length ? a[e]._labels[0].textBlock.fontSize / 2 : 0; l = Math.round(g.x1 + f); k = 1277 d && 0 < d.length ? Math.round(d[0] ? d[0].lineCoordinates.y2 : g.y1 < Math.max(C, 10) ? Math.max(C, 10) : g.y1) : g.y1 < Math.max(C, 10) ? Math.max(C, 10) : g.y1; h = Math.round(g.x1 + X + f); m = b && 0 < b.length ? Math.round(b[0] ? b[0].lineCoordinates.y1 : g.y2 - M > p.height - Math.max(C, 10) ? p.height - Math.max(C, 10) : g.y2 - M) : g.y2 > p.height - Math.max(C, 10) ? p.height - Math.max(C, 10) : g.y2; if (b && 0 < b.length) for (C = 0; C < b.length; C++) b[C] && b[C].labelAutoFit && (h = 0 > b[C].labelAngle ? Math.max(h, t) : 0 === b[C].labelAngle ? Math.max(h, t / 2) : h, l = 0 > b[C].labelAngle || 0 === b[C].labelAngle ? 1278 h - X : l); if (d && 0 < d.length) for (C = 0; C < d.length; C++) d[C] && d[C].labelAutoFit && (h = d[C].lineCoordinates.x1, l = h - X); a[e].lineCoordinates = { x1: h - N, y1: k, x2: h - N, y2: m, height: Math.abs(m - k) }; a[e].bounds = { x1: h - (B[e] + N), y1: k, x2: h, y2: m, width: h - l, height: m - k }; a[e].title && (a[e]._titleTextBlock.maxWidth = 0 < a[e].titleMaxWidth && a[e].titleMaxWidth < a[e].lineCoordinates.height ? a[e].titleMaxWidth : a[e].lineCoordinates.height); a[e].calculateValueToPixelConversionParameters(); N += B[e] + a[e].margin 1279 } if (c && 0 < c.length) for (e = 0; e < c.length; e++) { 1280 C = 1281 c[e]._labels && 0 < c[e]._labels.length ? c[e]._labels[0].textBlock.fontSize / 2 : 0; l = Math.round(g.x1 - f); k = d && 0 < d.length ? Math.round(d[0] ? d[0].lineCoordinates.y2 : g.y1 < Math.max(C, 10) ? Math.max(C, 10) : g.y1) : g.y1 < Math.max(C, 10) ? Math.max(C, 10) : g.y1; h = Math.round(g.x2 - T - Y); m = b && 0 < b.length ? Math.round(b[0] ? b[0].lineCoordinates.y1 : g.y2 - M > p.height - Math.max(C, 10) ? p.height - Math.max(C, 10) : g.y2 - M) : g.y2 > p.height - Math.max(C, 10) ? p.height - Math.max(C, 10) : g.y2; if (b && 0 < b.length) for (C = 0; C < b.length; C++) b[C] && b[C].labelAutoFit && (h = 1282 0 > b[C].labelAngle ? Math.max(h, t) : 0 === b[C].labelAngle ? Math.max(h, t / 2) : h, l = 0 > b[C].labelAngle || 0 === b[C].labelAngle ? h - T : l); if (d && 0 < d.length) for (C = 0; C < d.length; C++) d[C] && d[C].labelAutoFit && (h = d[C].lineCoordinates.x2, l = h - T); c[e].lineCoordinates = { x1: h + P, y1: k, x2: h + P, y2: m, height: Math.abs(m - k) }; c[e].bounds = { x1: l, y1: k, x2: h + r[e] + P, y2: m, width: h - l, height: m - k }; c[e].title && (c[e]._titleTextBlock.maxWidth = 0 < c[e].titleMaxWidth && c[e].titleMaxWidth < c[e].lineCoordinates.height ? c[e].titleMaxWidth : c[e].lineCoordinates.height); 1283 c[e].calculateValueToPixelConversionParameters(); P += r[e] + c[e].margin 1284 } if (b && 0 < b.length) for (e = 0; e < b.length; e++) b[e].calculateValueToPixelConversionParameters(); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e].calculateValueToPixelConversionParameters(); if (0 < q) { 1285 if (a && 0 < a.length) for (e = 0; e < a.length; e++) D = I[q - 1][e] === I[q][e] ? !0 : !1; else D = !0; if (c && 0 < c.length) for (e = 0; e < c.length; e++) E = K[q - 1][e] === K[q][e] ? !0 : !1; else E = !0; if (b && 0 < b.length) for (e = 0; e < b.length; e++) F = s[q - 1][e] === s[q][e] ? !0 : !1; else F = !0; if (d && 0 < d.length) for (e = 1286 0; e < d.length; e++) G = H[q - 1][e] === H[q][e] ? !0 : !1; else G = !0 1287 } if (D && E && F && G) break; q++ 1288 } if (b && 0 < b.length) for (e = 0; e < b.length; e++) b[e].renderLabelsTicksAndTitle(); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e].renderLabelsTicksAndTitle(); if (a && 0 < a.length) for (e = 0; e < a.length; e++) a[e].renderLabelsTicksAndTitle(); if (c && 0 < c.length) for (e = 0; e < c.length; e++) c[e].renderLabelsTicksAndTitle() 1289 } p.preparePlotArea(); g = p.plotArea; n.save(); n.beginPath(); n.rect(g.x1, g.y1, Math.abs(g.x2 - g.x1), Math.abs(g.y2 - g.y1)); n.clip(); if (a && 0 < 1290 a.length) for (e = 0; e < a.length; e++) a[e].renderStripLinesOfThicknessType("value"); if (c && 0 < c.length) for (e = 0; e < c.length; e++) c[e].renderStripLinesOfThicknessType("value"); if (b && 0 < b.length) for (e = 0; e < b.length; e++) b[e].renderStripLinesOfThicknessType("value"); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e].renderStripLinesOfThicknessType("value"); if (a && 0 < a.length) for (e = 0; e < a.length; e++) a[e].renderInterlacedColors(); if (c && 0 < c.length) for (e = 0; e < c.length; e++) c[e].renderInterlacedColors(); if (b && 0 < b.length) for (e = 0; e < 1291 b.length; e++) b[e].renderInterlacedColors(); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e].renderInterlacedColors();
1291 n.restore(); if (a && 0 < a.length) for (e = 0; e < a.length; e++) a[e].renderGrid(); if (c && 0 < c.length) for (e = 0; e < c.length; e++) c[e].renderGrid(); if (b && 0 < b.length) for (e = 0; e < b.length; e++) b[e].renderGrid(); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e].renderGrid(); if (a && 0 < a.length) for (e = 0; e < a.length; e++) a[e].renderAxisLine(); if (c && 0 < c.length) for (e = 0; e < c.length; e++) c[e].renderAxisLine(); if (b && 0 < b.length) for (e = 1292 0; e < b.length; e++) b[e].renderAxisLine(); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e].renderAxisLine(); if (a && 0 < a.length) for (e = 0; e < a.length; e++) a[e].renderStripLinesOfThicknessType("pixel"); if (c && 0 < c.length) for (e = 0; e < c.length; e++) c[e].renderStripLinesOfThicknessType("pixel"); if (b && 0 < b.length) for (e = 0; e < b.length; e++) b[e].renderStripLinesOfThicknessType("pixel"); if (d && 0 < d.length) for (e = 0; e < d.length; e++) d[e].renderStripLinesOfThicknessType("pixel") 1293 }; B.prototype.renderLabelsTicksAndTitle = function () { 1294 var a = 1295 !1, c = 0, b = 0, d = 1, f = 0; 0 !== this.labelAngle && 360 !== this.labelAngle && (d = 1.2); if ("undefined" === typeof this.options.interval) { 1296 if ("bottom" === this._position || "top" === this._position) if (this.logarithmic && !this.equidistantInterval && this.labelAutoFit) { 1297 for (var c = [], d = 0 !== this.labelAngle && 360 !== this.labelAngle ? 1 : 1.2, g, l = this.viewportMaximum, k = this.lineCoordinates.width / Math.log(this.range), h = this._labels.length - 1; 0 <= h; h--) { 1298 p = this._labels[h]; if (p.position < this.viewportMinimum) break; p.position > this.viewportMaximum || 1299 !(h === this._labels.length - 1 || g < Math.log(l / p.position) * k / d) || (c.push(p), l = p.position, g = p.textBlock.width * Math.abs(Math.cos(Math.PI / 180 * this.labelAngle)) + p.textBlock.height * Math.abs(Math.sin(Math.PI / 180 * this.labelAngle))) 1300 } this._labels = c 1301 } else { 1302 for (h = 0; h < this._labels.length; h++) p = this._labels[h], p.position < this.viewportMinimum || (p = p.textBlock.width * Math.abs(Math.cos(Math.PI / 180 * this.labelAngle)) + p.textBlock.height * Math.abs(Math.sin(Math.PI / 180 * this.labelAngle)), c += p); c > this.lineCoordinates.width * d && this.labelAutoFit && 1303 (a = !0) 1304 } if ("left" === this._position || "right" === this._position) if (this.logarithmic && !this.equidistantInterval && this.labelAutoFit) { 1305 for (var c = [], m, l = this.viewportMaximum, k = this.lineCoordinates.height / Math.log(this.range), h = this._labels.length - 1; 0 <= h; h--) { 1306 p = this._labels[h]; if (p.position < this.viewportMinimum) break; p.position > this.viewportMaximum || !(h === this._labels.length - 1 || m < Math.log(l / p.position) * k) || (c.push(p), l = p.position, m = p.textBlock.height * Math.abs(Math.cos(Math.PI / 180 * this.labelAngle)) + p.textBlock.width * 1307 Math.abs(Math.sin(Math.PI / 180 * this.labelAngle))) 1308 } this._labels = c 1309 } else { for (h = 0; h < this._labels.length; h++) p = this._labels[h], p.position < this.viewportMinimum || (p = p.textBlock.height * Math.abs(Math.cos(Math.PI / 180 * this.labelAngle)) + p.textBlock.width * Math.abs(Math.sin(Math.PI / 180 * this.labelAngle)), b += p); b > this.lineCoordinates.height * d && this.labelAutoFit && (a = !0) } 1310 } if ("bottom" === this._position) { 1311 for (var p, h = 0; h < this._labels.length; h++) p = this._labels[h], p.position < this.viewportMinimum || p.position > this.viewportMaximum || 1312 (b = this.getPixelCoordinatesOnAxis(p.position), a && 0 !== f++ % 2 && this.labelAutoFit || (this.tickThickness && (this.ctx.lineWidth = this.tickThickness, this.ctx.strokeStyle = this.tickColor, d = 1 === this.ctx.lineWidth % 2 ? (b.x << 0) + 0.5 : b.x << 0, this.ctx.beginPath(), this.ctx.moveTo(d, b.y << 0), this.ctx.lineTo(d, b.y + this.tickLength << 0), this.ctx.stroke()), 0 === p.textBlock.angle ? (b.x -= p.textBlock.width / 2, b.y += this.tickLength + p.textBlock.fontSize / 2) : (b.x -= 0 > this.labelAngle ? p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : 1313 0, b.y += this.tickLength + Math.abs(0 > this.labelAngle ? p.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) - 5 : 5)), p.textBlock.x = b.x, p.textBlock.y = b.y, p.textBlock.render(!0))); this.title && (this._titleTextBlock.measureText(), this._titleTextBlock.x = this.lineCoordinates.x1 + this.lineCoordinates.width / 2 - this._titleTextBlock.width / 2, this._titleTextBlock.y = this.bounds.y2 - this._titleTextBlock.height - 3, this.titleMaxWidth = this._titleTextBlock.maxWidth, this._titleTextBlock.render(!0)) 1314 } else if ("top" === this._position) { 1315 for (h = 1316 0; h < this._labels.length; h++) p = this._labels[h], p.position < this.viewportMinimum || p.position > this.viewportMaximum || (b = this.getPixelCoordinatesOnAxis(p.position), a && 0 !== f++ % 2 && this.labelAutoFit || (this.tickThickness && (this.ctx.lineWidth = this.tickThickness, this.ctx.strokeStyle = this.tickColor, d = 1 === this.ctx.lineWidth % 2 ? (b.x << 0) + 0.5 : b.x << 0, this.ctx.beginPath(), this.ctx.moveTo(d, b.y << 0), this.ctx.lineTo(d, b.y - this.tickLength << 0), this.ctx.stroke()), 0 === p.textBlock.angle ? (b.x -= p.textBlock.width / 2, b.y -= this.tickLength + 1317 p.textBlock.height / 2) : (b.x += (p.textBlock.height - this.tickLength - this.labelFontSize / 2) * Math.sin(Math.PI / 180 * this.labelAngle) - (0 < this.labelAngle ? p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : 0), b.y -= this.tickLength + (p.textBlock.height / 2 * Math.cos(Math.PI / 180 * this.labelAngle) + (0 < this.labelAngle ? p.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) : 0))), p.textBlock.x = b.x, p.textBlock.y = b.y, p.textBlock.render(!0))); this.title && (this._titleTextBlock.measureText(), this._titleTextBlock.x = this.lineCoordinates.x1 + 1318 this.lineCoordinates.width / 2 - this._titleTextBlock.width / 2, this._titleTextBlock.y = this.bounds.y1 + 1, this.titleMaxWidth = this._titleTextBlock.maxWidth, this._titleTextBlock.render(!0)) 1319 } else if ("left" === this._position) { 1320 for (h = 0; h < this._labels.length; h++) p = this._labels[h], p.position < this.viewportMinimum || p.position > this.viewportMaximum || (b = this.getPixelCoordinatesOnAxis(p.position), a && 0 !== f++ % 2 && this.labelAutoFit || (this.tickThickness && (this.ctx.lineWidth = this.tickThickness, this.ctx.strokeStyle = this.tickColor, 1321 d = 1 === this.ctx.lineWidth % 2 ? (b.y << 0) + 0.5 : b.y << 0, this.ctx.beginPath(), this.ctx.moveTo(b.x << 0, d), this.ctx.lineTo(b.x - this.tickLength << 0, d), this.ctx.stroke()), 0 === this.labelAngle ? (p.textBlock.y = b.y, p.textBlock.x = b.x - p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - this.tickLength - 5) : (p.textBlock.y = b.y - p.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle), p.textBlock.x = 0 < this.labelAngle ? b.x - p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - this.tickLength - 5 : b.x - p.textBlock.width * Math.cos(Math.PI / 1322 180 * this.labelAngle) + (p.textBlock.height - p.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) - this.tickLength), p.textBlock.render(!0))); this.title && (this._titleTextBlock.measureText(), this._titleTextBlock.x = this.bounds.x1 + 1, this._titleTextBlock.y = this.lineCoordinates.height / 2 + this._titleTextBlock.width / 2 + this.lineCoordinates.y1, this.titleMaxWidth = this._titleTextBlock.maxWidth, this._titleTextBlock.render(!0)) 1323 } else if ("right" === this._position) { 1324 for (h = 0; h < this._labels.length; h++) p = this._labels[h], 1325 p.position < this.viewportMinimum || p.position > this.viewportMaximum || (b = this.getPixelCoordinatesOnAxis(p.position), a && 0 !== f++ % 2 && this.labelAutoFit || (this.tickThickness && (this.ctx.lineWidth = this.tickThickness, this.ctx.strokeStyle = this.tickColor, d = 1 === this.ctx.lineWidth % 2 ? (b.y << 0) + 0.5 : b.y << 0, this.ctx.beginPath(), this.ctx.moveTo(b.x << 0, d), this.ctx.lineTo(b.x + this.tickLength << 0, d), this.ctx.stroke()), 0 === this.labelAngle ? (p.textBlock.y = b.y, p.textBlock.x = b.x + this.tickLength + 5) : (p.textBlock.y = 0 > this.labelAngle ? 1326 b.y : b.y - (p.textBlock.height - p.textBlock.fontSize / 2 - 5) * Math.cos(Math.PI / 180 * this.labelAngle), p.textBlock.x = 0 < this.labelAngle ? b.x + (p.textBlock.height - p.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) + this.tickLength : b.x + this.tickLength + 5), p.textBlock.render(!0))); this.title && (this._titleTextBlock.measureText(), this._titleTextBlock.x = this.bounds.x2 - 1, this._titleTextBlock.y = this.lineCoordinates.height / 2 - this._titleTextBlock.width / 2 + this.lineCoordinates.y1, this.titleMaxWidth = this._titleTextBlock.maxWidth, 1327 this._titleTextBlock.render(!0)) 1328 } 1329 }; B.prototype.renderInterlacedColors = function () { 1330 var a = this.chart.plotArea.ctx, c, b, d = this.chart.plotArea, f = 0; c = !0; if (("bottom" === this._position || "top" === this._position) && this.interlacedColor) for (a.fillStyle = this.interlacedColor, f = 0; f < this._labels.length; f++) c ? (c = this.getPixelCoordinatesOnAxis(this._labels[f].position), b = f + 1 > this._labels.length - 1 ? this.getPixelCoordinatesOnAxis(this.viewportMaximum) : this.getPixelCoordinatesOnAxis(this._labels[f + 1].position), a.fillRect(Math.min(b.x, 1331 c.x), d.y1, Math.abs(b.x - c.x), Math.abs(d.y1 - d.y2)), c = !1) : c = !0; else if (("left" === this._position || "right" === this._position) && this.interlacedColor) for (a.fillStyle = this.interlacedColor, f = 0; f < this._labels.length; f++) c ? (b = this.getPixelCoordinatesOnAxis(this._labels[f].position), c = f + 1 > this._labels.length - 1 ? this.getPixelCoordinatesOnAxis(this.viewportMaximum) : this.getPixelCoordinatesOnAxis(this._labels[f + 1].position), a.fillRect(d.x1, Math.min(b.y, c.y), Math.abs(d.x1 - d.x2), Math.abs(c.y - b.y)), c = !1) : c = !0; a.beginPath() 1332 }; 1333 B.prototype.renderStripLinesOfThicknessType = function (a) { 1334 if (this.stripLines && 0 < this.stripLines.length && a) { 1335 for (var c = this, b, d = 0, f = 0, g = !1, l = !1, k = [], h = [], l = !1, d = 0; d < this.stripLines.length; d++) { var m = this.stripLines[d]; m._thicknessType === a && ("pixel" === a && (m.value < this.viewportMinimum || m.value > this.viewportMaximum || y(m.value) || isNaN(this.range)) || k.push(m)) } for (d = 0; d < this._stripLineLabels.length; d++) if (m = this.stripLines[d], b = this._stripLineLabels[d], !(b.position < this.viewportMinimum || b.position > this.viewportMaximum || 1336 isNaN(this.range))) { 1337 a = this.getPixelCoordinatesOnAxis(b.position); if ("outside" === b.stripLine.labelPlacement) if (m && (this.ctx.strokeStyle = m.color, "pixel" === m._thicknessType && (this.ctx.lineWidth = m.thickness)), "bottom" === this._position) { 1338 var p = 1 === this.ctx.lineWidth % 2 ? (a.x << 0) + 0.5 : a.x << 0; this.ctx.beginPath(); this.ctx.moveTo(p, a.y << 0); this.ctx.lineTo(p, a.y + this.tickLength << 0); this.ctx.stroke(); 0 === this.labelAngle ? (a.x -= b.textBlock.width / 2, a.y += this.tickLength + b.textBlock.fontSize / 2) : (a.x -= 0 > this.labelAngle ? 1339 b.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : 0, a.y += this.tickLength + Math.abs(0 > this.labelAngle ? b.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) - 5 : 5)) 1340 } else "top" === this._position ? (p = 1 === this.ctx.lineWidth % 2 ? (a.x << 0) + 0.5 : a.x << 0, this.ctx.beginPath(), this.ctx.moveTo(p, a.y << 0), this.ctx.lineTo(p, a.y - this.tickLength << 0), this.ctx.stroke(), 0 === this.labelAngle ? (a.x -= b.textBlock.width / 2, a.y -= this.tickLength + b.textBlock.height) : (a.x += (b.textBlock.height - this.tickLength - this.labelFontSize / 2) * 1341 Math.sin(Math.PI / 180 * this.labelAngle) - (0 < this.labelAngle ? b.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : 0), a.y -= this.tickLength + (b.textBlock.height * Math.cos(Math.PI / 180 * this.labelAngle) + (0 < this.labelAngle ? b.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) : 0)))) : "left" === this._position ? (p = 1 === this.ctx.lineWidth % 2 ? (a.y << 0) + 0.5 : a.y << 0, this.ctx.beginPath(), this.ctx.moveTo(a.x << 0, p), this.ctx.lineTo(a.x - this.tickLength << 0, p), this.ctx.stroke(), 0 === this.labelAngle ? a.x = a.x - b.textBlock.width * 1342 Math.cos(Math.PI / 180 * this.labelAngle) - this.tickLength - 5 : (a.y -= b.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle), a.x = 0 < this.labelAngle ? a.x - b.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - this.tickLength - 5 : a.x - b.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) + (b.textBlock.height - b.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) - this.tickLength)) : "right" === this._position && (p = 1 === this.ctx.lineWidth % 2 ? (a.y << 0) + 0.5 : a.y << 0, this.ctx.beginPath(), this.ctx.moveTo(a.x << 0, p), 1343 this.ctx.lineTo(a.x + this.tickLength << 0, p), this.ctx.stroke(), 0 === this.labelAngle ? a.x = a.x + this.tickLength + 5 : (a.y = 0 > this.labelAngle ? a.y : a.y - (b.textBlock.height - b.textBlock.fontSize / 2 - 5) * Math.cos(Math.PI / 180 * this.labelAngle), a.x = 0 < this.labelAngle ? a.x + (b.textBlock.height - b.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) + this.tickLength : a.x + this.tickLength + 5)); else b.textBlock.angle = -90, "bottom" === this._position ? (b.textBlock.maxWidth = this.options.stripLines[d].labelMaxWidth ? this.options.stripLines[d].labelMaxWidth : 1344 this.chart.plotArea.height - 3, b.textBlock.measureText(), a.x - b.textBlock.height > this.chart.plotArea.x1 ? y(m.startValue) ? a.x -= b.textBlock.height - b.textBlock.fontSize / 2 : a.x -= b.textBlock.height / 2 - b.textBlock.fontSize / 2 + 3 : (b.textBlock.angle = 90, y(m.startValue) ? a.x += b.textBlock.height - b.textBlock.fontSize / 2 : a.x += b.textBlock.height / 2 - b.textBlock.fontSize / 2 + 3), a.y = -90 === b.textBlock.angle ? "near" === b.stripLine.labelAlign ? this.chart.plotArea.y2 - 3 : "center" === b.stripLine.labelAlign ? (this.chart.plotArea.y2 + this.chart.plotArea.y1 + 1345 b.textBlock.width) / 2 : this.chart.plotArea.y1 + b.textBlock.width + 3 : "near" === b.stripLine.labelAlign ? this.chart.plotArea.y2 - b.textBlock.width - 3 : "center" === b.stripLine.labelAlign ? (this.chart.plotArea.y2 + this.chart.plotArea.y1 - b.textBlock.width) / 2 : this.chart.plotArea.y1 + 3) : "top" === this._position ? (b.textBlock.maxWidth = this.options.stripLines[d].labelMaxWidth ? this.options.stripLines[d].labelMaxWidth : this.chart.plotArea.height - 3, b.textBlock.measureText(), a.x - b.textBlock.height > this.chart.plotArea.x1 ? y(m.startValue) ? 1346 a.x -= b.textBlock.height - b.textBlock.fontSize / 2 : a.x -= b.textBlock.height / 2 - b.textBlock.fontSize / 2 + 3 : (b.textBlock.angle = 90, y(m.startValue) ? a.x += b.textBlock.height - b.textBlock.fontSize / 2 : a.x += b.textBlock.height / 2 - b.textBlock.fontSize / 2 + 3), a.y = -90 === b.textBlock.angle ? "near" === b.stripLine.labelAlign ? this.chart.plotArea.y1 + b.textBlock.width + 3 : "center" === b.stripLine.labelAlign ? (this.chart.plotArea.y2 + this.chart.plotArea.y1 + b.textBlock.width) / 2 : this.chart.plotArea.y2 - 3 : "near" === b.stripLine.labelAlign ? this.chart.plotArea.y1 + 1347 3 : "center" === b.stripLine.labelAlign ? (this.chart.plotArea.y2 + this.chart.plotArea.y1 - b.textBlock.width) / 2 : this.chart.plotArea.y2 - b.textBlock.width - 3) : "left" === this._position ? (b.textBlock.maxWidth = this.options.stripLines[d].labelMaxWidth ? this.options.stripLines[d].labelMaxWidth : this.chart.plotArea.width - 3, b.textBlock.angle = 0, b.textBlock.measureText(), a.y - b.textBlock.height > this.chart.plotArea.y1 ? y(m.startValue) ? a.y -= b.textBlock.height - b.textBlock.fontSize / 2 : a.y -= b.textBlock.height / 2 - b.textBlock.fontSize + 1348
1348 3 : a.y - b.textBlock.height < this.chart.plotArea.y2 ? a.y += b.textBlock.fontSize / 2 + 3 : y(m.startValue) ? a.y -= b.textBlock.height - b.textBlock.fontSize / 2 : a.y -= b.textBlock.height / 2 - b.textBlock.fontSize + 3, a.x = "near" === b.stripLine.labelAlign ? this.chart.plotArea.x1 + 3 : "center" === b.stripLine.labelAlign ? (this.chart.plotArea.x2 + this.chart.plotArea.x1) / 2 - b.textBlock.width / 2 : this.chart.plotArea.x2 - b.textBlock.width - 3) : "right" === this._position && (b.textBlock.maxWidth = this.options.stripLines[d].labelMaxWidth ? this.options.stripLines[d].labelMaxWidth : 1349 this.chart.plotArea.width - 3, b.textBlock.angle = 0, b.textBlock.measureText(), a.y - +b.textBlock.height > this.chart.plotArea.y1 ? y(m.startValue) ? a.y -= b.textBlock.height - b.textBlock.fontSize / 2 : a.y -= b.textBlock.height / 2 - b.textBlock.fontSize / 2 - 3 : a.y - b.textBlock.height < this.chart.plotArea.y2 ? a.y += b.textBlock.fontSize / 2 + 3 : y(m.startValue) ? a.y -= b.textBlock.height - b.textBlock.fontSize / 2 : a.y -= b.textBlock.height / 2 - b.textBlock.fontSize / 2 + 3, a.x = "near" === b.stripLine.labelAlign ? this.chart.plotArea.x2 - b.textBlock.width - 1350 3 : "center" === b.stripLine.labelAlign ? (this.chart.plotArea.x2 + this.chart.plotArea.x1) / 2 - b.textBlock.width / 2 : this.chart.plotArea.x1 + 3); b.textBlock.x = a.x; b.textBlock.y = a.y; h.push(b) 1351 } if (!l) { 1352 l = !1; this.ctx.save(); this.ctx.beginPath(); this.ctx.rect(this.chart.plotArea.x1, this.chart.plotArea.y1, this.chart.plotArea.width, this.chart.plotArea.height); this.ctx.clip(); for (d = 0; d < k.length; d++) m = k[d], m.showOnTop ? g || (g = !0, this.chart.addEventListener("dataAnimationIterationEnd", function () { 1353 this.ctx.save(); this.ctx.beginPath(); 1354 this.ctx.rect(this.chart.plotArea.x1, this.chart.plotArea.y1, this.chart.plotArea.width, this.chart.plotArea.height); this.ctx.clip(); for (f = 0; f < k.length; f++) m = k[f], m.showOnTop && m.render(); this.ctx.restore() 1355 }, m)) : m.render(); for (d = 0; d < h.length; d++) b = h[d], b.stripLine.showOnTop ? l || (l = !0, this.chart.addEventListener("dataAnimationIterationEnd", function () { 1356 for (f = 0; f < h.length; f++) b = h[f], "inside" === b.stripLine.labelPlacement && b.stripLine.showOnTop && (c.ctx.save(), c.ctx.beginPath(), c.ctx.rect(c.chart.plotArea.x1, 1357 c.chart.plotArea.y1, c.chart.plotArea.width, c.chart.plotArea.height), c.ctx.clip(), b.textBlock.render(!0), c.ctx.restore()) 1358 }, b.textBlock)) : "inside" === b.stripLine.labelPlacement && b.textBlock.render(!0); this.ctx.restore(); l = !0 1359 } if (l) for (l = !1, d = 0; d < h.length; d++) b = h[d], b.stripLine.showOnTop ? l || (l = !0, this.chart.addEventListener("dataAnimationIterationEnd", function () { for (f = 0; f < h.length; f++) b = h[f], "outside" === b.stripLine.labelPlacement && b.stripLine.showOnTop && b.textBlock.render(!0) }, b.textBlock)) : "outside" === 1360 b.stripLine.labelPlacement && b.textBlock.render(!0) 1361 } 1362 }; B.prototype.renderGrid = function () { 1363 if (this.gridThickness && 0 < this.gridThickness) { 1364 var a = this.chart.ctx; a.save(); var c, b = this.chart.plotArea; a.lineWidth = this.gridThickness; a.strokeStyle = this.gridColor; a.setLineDash && a.setLineDash(F(this.gridDashType, this.gridThickness)); if ("bottom" === this._position || "top" === this._position) for (d = 0; d < this._labels.length; d++) this._labels[d].position < this.viewportMinimum || this._labels[d].position > this.viewportMaximum || 1365 (a.beginPath(), c = this.getPixelCoordinatesOnAxis(this._labels[d].position), c = 1 === a.lineWidth % 2 ? (c.x << 0) + 0.5 : c.x << 0, a.moveTo(c, b.y1 << 0), a.lineTo(c, b.y2 << 0), a.stroke()); else if ("left" === this._position || "right" === this._position) for (var d = 0; d < this._labels.length; d++) this._labels[d].position < this.viewportMinimum || this._labels[d].position > this.viewportMaximum || (a.beginPath(), c = this.getPixelCoordinatesOnAxis(this._labels[d].position), c = 1 === a.lineWidth % 2 ? (c.y << 0) + 0.5 : c.y << 0, a.moveTo(b.x1 << 0, c), a.lineTo(b.x2 << 1366 0, c), a.stroke());
1366 a.restore() 1367 } 1368 }; B.prototype.renderAxisLine = function () { 1369 var a = this.chart.ctx; a.save(); if ("bottom" === this._position || "top" === this._position) { 1370 if (this.lineThickness) { 1371 a.lineWidth = this.lineThickness; a.strokeStyle = this.lineColor ? this.lineColor : "black"; a.setLineDash && a.setLineDash(F(this.lineDashType, this.lineThickness)); var c = 1 === this.lineThickness % 2 ? (this.lineCoordinates.y1 << 0) + 0.5 : this.lineCoordinates.y1 << 0; a.beginPath(); a.moveTo(this.lineCoordinates.x1, c); a.lineTo(this.lineCoordinates.x2, 1372 c); a.stroke() 1373 } 1374 } else "left" !== this._position && "right" !== this._position || !this.lineThickness || (a.lineWidth = this.lineThickness, a.strokeStyle = this.lineColor, a.setLineDash && a.setLineDash(F(this.lineDashType, this.lineThickness)), c = 1 === this.lineThickness % 2 ? (this.lineCoordinates.x1 << 0) + 0.5 : this.lineCoordinates.x1 << 0, a.beginPath(), a.moveTo(c, this.lineCoordinates.y1), a.lineTo(c, this.lineCoordinates.y2), a.stroke()); a.restore() 1375 }; B.prototype.getPixelCoordinatesOnAxis = function (a) { 1376 var c = {}; if ("bottom" === this._position || 1377 "top" === this._position) c.x = this.convertValueToPixel(a), c.y = this.lineCoordinates.y1; if ("left" === this._position || "right" === this._position) c.y = this.convertValueToPixel(a), c.x = this.lineCoordinates.x2; return c 1378 }; B.prototype.convertPixelToValue = function (a) { 1379 if ("undefined" === typeof a) return null; var c = 0, c = 0, c = "number" === typeof a ? a : "left" === this._position || "right" === this._position ? a.y : a.x; return c = this.logarithmic ? Math.pow(this.logarithmBase, (c - this.conversionParameters.reference) / this.conversionParameters.pixelPerUnit) * 1380 this.viewportMinimum : this.conversionParameters.minimum + (c - this.conversionParameters.reference) / this.conversionParameters.pixelPerUnit 1381 }; B.prototype.convertValueToPixel = function (a) { return this.logarithmic ? this.conversionParameters.reference + this.conversionParameters.pixelPerUnit * Math.log(a / this.conversionParameters.minimum) / this.conversionParameters.lnLogarithmBase + 0.5 << 0 : this.conversionParameters.reference + this.conversionParameters.pixelPerUnit * (a - this.conversionParameters.minimum) + 0.5 << 0 }; B.prototype.setViewPortRange = 1382 function (a, c) { this.sessionVariables.newViewportMinimum = this.viewportMinimum = Math.min(a, c); this.sessionVariables.newViewportMaximum = this.viewportMaximum = Math.max(a, c) }; B.prototype.getXValueAt = function (a) { if (!a) return null; var c = null; "left" === this._position ? c = this.convertPixelToValue(a.y) : "bottom" === this._position && (c = this.convertPixelToValue(a.x)); return c }; B.prototype.calculateValueToPixelConversionParameters = function (a) { 1383 a = { pixelPerUnit: null, minimum: null, reference: null }; var c = this.lineCoordinates.width, 1384 b = this.lineCoordinates.height; a.minimum = this.viewportMinimum; if ("bottom" === this._position || "top" === this._position) this.logarithmic ? (a.lnLogarithmBase = Math.log(this.logarithmBase), a.pixelPerUnit = (this.reversed ? -1 : 1) * c * a.lnLogarithmBase / Math.log(Math.abs(this.range))) : a.pixelPerUnit = (this.reversed ? -1 : 1) * c / Math.abs(this.range), a.reference = this.reversed ? this.lineCoordinates.x2 : this.lineCoordinates.x1; if ("left" === this._position || "right" === this._position) this.logarithmic ? (a.lnLogarithmBase = Math.log(this.logarithmBase), 1385 a.pixelPerUnit = (this.reversed ? 1 : -1) * b * a.lnLogarithmBase / Math.log(Math.abs(this.range))) : a.pixelPerUnit = (this.reversed ? 1 : -1) * b / Math.abs(this.range), a.reference = this.reversed ? this.lineCoordinates.y1 : this.lineCoordinates.y2; this.conversionParameters = a 1386 }; B.prototype.calculateAxisParameters = function () { 1387 if (this.logarithmic) this.calculateLogarithamicAxisParameters(); else { 1388 var a = this.chart.layoutManager.getFreeSpace(), c = !1, b = !1; "bottom" === this._position || "top" === this._position ? (this.maxWidth = a.width, this.maxHeight = 1389 a.height) : (this.maxWidth = a.height, this.maxHeight = a.width); var a = "axisX" === this.type ? "xySwapped" === this.chart.plotInfo.axisPlacement ? 62 : 70 : "xySwapped" === this.chart.plotInfo.axisPlacement ? 50 : 40, d = 4; "axisX" === this.type && (d = 600 > this.maxWidth ? 8 : 6); var a = Math.max(d, Math.floor(this.maxWidth / a)), f, g, l, d = 0; !y(this.options.viewportMinimum) && (!y(this.options.viewportMaximum) && this.options.viewportMinimum >= this.options.viewportMaximum) && (this.viewportMinimum = this.viewportMaximum = null); if (y(this.options.viewportMinimum) && 1390 !y(this.sessionVariables.newViewportMinimum) && !isNaN(this.sessionVariables.newViewportMinimum)) this.viewportMinimum = this.sessionVariables.newViewportMinimum; else if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) this.viewportMinimum = this.minimum; if (y(this.options.viewportMaximum) && !y(this.sessionVariables.newViewportMaximum) && !isNaN(this.sessionVariables.newViewportMaximum)) this.viewportMaximum = this.sessionVariables.newViewportMaximum; else if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) this.viewportMaximum = 1391 this.maximum; if ("axisX" === this.type) { 1392 if (this.dataSeries && 0 < this.dataSeries.length) for (f = 0; f < this.dataSeries.length; f++) "dateTime" === this.dataSeries[f].xValueType && (b = !0); f = null !== this.viewportMinimum ? this.viewportMinimum : this.dataInfo.viewPortMin; g = null !== this.viewportMaximum ? this.viewportMaximum : this.dataInfo.viewPortMax; 0 === g - f && (d = "undefined" === typeof this.options.interval ? 0.4 : this.options.interval, g += d, f -= d); Infinity !== this.dataInfo.minDiff ? l = this.dataInfo.minDiff : 1 < g - f ? l = 0.5 * Math.abs(g - f) : (l = 1393 1, b && (c = !0)) 1394 } else "axisY" === this.type && (f = null !== this.viewportMinimum ? this.viewportMinimum : this.dataInfo.viewPortMin, g = null !== this.viewportMaximum ? this.viewportMaximum : this.dataInfo.viewPortMax, isFinite(f) || isFinite(g) ? isFinite(f) ? isFinite(g) || (g = f) : f = g : (g = "undefined" === typeof this.options.interval ? -Infinity : this.options.interval, f = "undefined" !== typeof this.options.interval || isFinite(this.dataInfo.minDiff) ? 0 : Infinity), 0 === f && 0 === g ? (g += 9, f = 0) : 0 === g - f ? (d = Math.min(Math.abs(0.01 * Math.abs(g)), 5), g += d, f -= 1395 d) : f > g ? (d = Math.min(Math.abs(0.01 * Math.abs(g - f)), 5), 0 <= g ? f = g - d : g = isFinite(f) ? f + d : 0) : (d = Math.min(Math.abs(0.01 * Math.abs(g - f)), 0.05), 0 !== g && (g += d), 0 !== f && (f -= d)), l = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : 1 < g - f ? 0.5 * Math.abs(g - f) : 1, this.includeZero && (null === this.viewportMinimum || isNaN(this.viewportMinimum)) && 0 < f && (f = 0), this.includeZero && (null === this.viewportMaximum || isNaN(this.viewportMaximum)) && 0 > g && (g = 0)); d = (isNaN(this.viewportMaximum) || null === this.viewportMaximum ? g : this.viewportMaximum) - 1396 (isNaN(this.viewportMinimum) || null === this.viewportMinimum ? f : this.viewportMinimum); if ("axisX" === this.type && b) { 1397 this.intervalType || (d / 1 <= a ? (this.interval = 1, this.intervalType = "millisecond") : d / 2 <= a ? (this.interval = 2, this.intervalType = "millisecond") : d / 5 <= a ? (this.interval = 5, this.intervalType = "millisecond") : d / 10 <= a ? (this.interval = 10, this.intervalType = "millisecond") : d / 20 <= a ? (this.interval = 20, this.intervalType = "millisecond") : d / 50 <= a ? (this.interval = 50, this.intervalType = "millisecond") : d / 100 <= a ? (this.interval = 1398 100, this.intervalType = "millisecond") : d / 200 <= a ? (this.interval = 200, this.intervalType = "millisecond") : d / 250 <= a ? (this.interval = 250, this.intervalType = "millisecond") : d / 300 <= a ? (this.interval = 300, this.intervalType = "millisecond") : d / 400 <= a ? (this.interval = 400, this.intervalType = "millisecond") : d / 500 <= a ? (this.interval = 500, this.intervalType = "millisecond") : d / (1 * G.secondDuration) <= a ? (this.interval = 1, this.intervalType = "second") : d / (2 * G.secondDuration) <= a ? (this.interval = 2, this.intervalType = "second") : d / (5 * G.secondDuration) <= 1399 a ? (this.interval = 5, this.intervalType = "second") : d / (10 * G.secondDuration) <= a ? (this.interval = 10, this.intervalType = "second") : d / (15 * G.secondDuration) <= a ? (this.interval = 15, this.intervalType = "second") : d / (20 * G.secondDuration) <= a ? (this.interval = 20, this.intervalType = "second") : d / (30 * G.secondDuration) <= a ? (this.interval = 30, this.intervalType = "second") : d / (1 * G.minuteDuration) <= a ? (this.interval = 1, this.intervalType = "minute") : d / (2 * G.minuteDuration) <= a ? (this.interval = 2, this.intervalType = "minute") : d / (5 * G.minuteDuration) <= 1400 a ? (this.interval = 5, this.intervalType = "minute") : d / (10 * G.minuteDuration) <= a ? (this.interval = 10, this.intervalType = "minute") : d / (15 * G.minuteDuration) <= a ? (this.interval = 15, this.intervalType = "minute") : d / (20 * G.minuteDuration) <= a ? (this.interval = 20, this.intervalType = "minute") : d / (30 * G.minuteDuration) <= a ? (this.interval = 30, this.intervalType = "minute") : d / (1 * G.hourDuration) <= a ? (this.interval = 1, this.intervalType = "hour") : d / (2 * G.hourDuration) <= a ? (this.interval = 2, this.intervalType = "hour") : d / (3 * G.hourDuration) <= a ? (this.interval = 1401 3, this.intervalType = "hour") : d / (6 * G.hourDuration) <= a ? (this.interval = 6, this.intervalType = "hour") : d / (1 * G.dayDuration) <= a ? (this.interval = 1, this.intervalType = "day") : d / (2 * G.dayDuration) <= a ? (this.interval = 2, this.intervalType = "day") : d / (4 * G.dayDuration) <= a ? (this.interval = 4, this.intervalType = "day") : d / (1 * G.weekDuration) <= a ? (this.interval = 1, this.intervalType = "
1401week") : d / (2 * G.weekDuration) <= a ? (this.interval = 2, this.intervalType = "week") : d / (3 * G.weekDuration) <= a ? (this.interval = 3, this.intervalType = "week") : d / (1 * G.monthDuration) <= 1402 a ? (this.interval = 1, this.intervalType = "month") : d / (2 * G.monthDuration) <= a ? (this.interval = 2, this.intervalType = "month") : d / (3 * G.monthDuration) <= a ? (this.interval = 3, this.intervalType = "month") : d / (6 * G.monthDuration) <= a ? (this.interval = 6, this.intervalType = "month") : (this.interval = d / (1 * G.yearDuration) <= a ? 1 : d / (2 * G.yearDuration) <= a ? 2 : d / (4 * G.yearDuration) <= a ? 4 : Math.floor(B.getNiceNumber(d / (a - 1), !0) / G.yearDuration), this.intervalType = "year")); if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) this.viewportMinimum = 1403 f - l / 2; if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) this.viewportMaximum = g + l / 2; c ? this.autoValueFormatString = "MMM DD YYYY HH:mm" : "year" === this.intervalType ? this.autoValueFormatString = "YYYY" : "month" === this.intervalType ? this.autoValueFormatString = "MMM YYYY" : "week" === this.intervalType ? this.autoValueFormatString = "MMM DD YYYY" : "day" === this.intervalType ? this.autoValueFormatString = "MMM DD YYYY" : "hour" === this.intervalType ? this.autoValueFormatString = "hh:mm TT" : "minute" === this.intervalType ? this.autoValueFormatString = 1404 "hh:mm TT" : "second" === this.intervalType ? this.autoValueFormatString = "hh:mm:ss TT" : "millisecond" === this.intervalType && (this.autoValueFormatString = "fff'ms'"); this.valueFormatString || (this.valueFormatString = this.autoValueFormatString) 1405 } else { 1406 this.intervalType = "number"; d = B.getNiceNumber(d, !1); this.interval = this.options && 0 < this.options.interval ? this.options.interval : B.getNiceNumber(d / (a - 1), !0); if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) this.viewportMinimum = "axisX" === this.type ? f - l / 2 : Math.floor(f / 1407 this.interval) * this.interval; if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) this.viewportMaximum = "axisX" === this.type ? g + l / 2 : Math.ceil(g / this.interval) * this.interval; 0 === this.viewportMaximum && 0 === this.viewportMinimum && (0 === this.options.viewportMinimum ? this.viewportMaximum += 10 : 0 === this.options.viewportMaximum && (this.viewportMinimum -= 10), this.options && "undefined" === typeof this.options.interval && (this.interval = B.getNiceNumber((this.viewportMaximum - this.viewportMinimum) / (a - 1), !0))) 1408 } if (null === 1409 this.minimum || null === this.maximum) if ("axisX" === this.type ? (f = null !== this.minimum ? this.minimum : this.dataInfo.min, g = null !== this.maximum ? this.maximum : this.dataInfo.max, 0 === g - f && (d = "undefined" === typeof this.options.interval ? 0.4 : this.options.interval, g += d, f -= d), l = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : 1 < g - f ? 0.5 * Math.abs(g - f) : 1) : "axisY" === this.type && (f = null !== this.minimum ? this.minimum : this.dataInfo.min, g = null !== this.maximum ? this.maximum : this.dataInfo.max, isFinite(f) || isFinite(g) ? 0 === f && 0 === 1410 g ? (g += 9, f = 0) : 0 === g - f ? (d = Math.min(Math.abs(0.01 * Math.abs(g)), 5), g += d, f -= d) : f > g ? (d = Math.min(Math.abs(0.01 * Math.abs(g - f)), 5), 0 <= g ? f = g - d : g = isFinite(f) ? f + d : 0) : (d = Math.min(Math.abs(0.01 * Math.abs(g - f)), 0.05), 0 !== g && (g += d), 0 !== f && (f -= d)) : (g = "undefined" === typeof this.options.interval ? -Infinity : this.options.interval, f = "undefined" !== typeof this.options.interval || isFinite(this.dataInfo.minDiff) ? 0 : Infinity), l = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : 1 < g - f ? 0.5 * Math.abs(g - f) : 1, this.includeZero && (null === 1411 this.minimum || isNaN(this.minimum)) && 0 < f && (f = 0), this.includeZero && (null === this.maximum || isNaN(this.maximum)) && 0 > g && (g = 0)), "axisX" === this.type && b) { if (null === this.minimum || isNaN(this.minimum)) this.minimum = f - l / 2; if (null === this.maximum || isNaN(this.maximum)) this.maximum = g + l / 2 } else this.intervalType = "number", null === this.minimum && (this.minimum = "axisX" === this.type ? f - l / 2 : Math.floor(f / this.interval) * this.interval, this.minimum = Math.min(this.minimum, null === this.sessionVariables.viewportMinimum || isNaN(this.sessionVariables.viewportMinimum) ? 1412 Infinity : this.sessionVariables.viewportMinimum)), null === this.maximum && (this.maximum = "axisX" === this.type ? g + l / 2 : Math.
1412ceil(g / this.interval) * this.interval, this.maximum = Math.max(this.maximum, null === this.sessionVariables.viewportMaximum || isNaN(this.sessionVariables.viewportMaximum) ? -Infinity : this.sessionVariables.viewportMaximum)), 0 === this.maximum && 0 === this.minimum && (0 === this.options.minimum ? this.maximum += 10 : 0 === this.options.maximum && (this.minimum -= 10)); y(this.sessionVariables.newViewportMinimum) && (this.viewportMinimum = 1413 Math.max(this.viewportMinimum, this.minimum)); y(this.sessionVariables.newViewportMaximum) && (this.viewportMaximum = Math.min(this.viewportMaximum, this.maximum)); this.range = this.viewportMaximum - this.viewportMinimum; this.intervalStartPosition = "axisX" === this.type && b ? this.getLabelStartPoint(new Date(this.viewportMinimum), this.intervalType, this.interval) : Math.floor((this.viewportMinimum + 0.2 * this.interval) / this.interval) * this.interval; if (!this.valueFormatString && (this.valueFormatString = "#,##0.##", 1 > this.range)) { 1414 c = 1415 Math.floor(Math.abs(Math.log(this.range) / Math.LN10)) + 2; if (isNaN(c) || !isFinite(c)) c = 2; if (2 < c) for (b = 0; b < c - 2; b++) this.valueFormatString += "#" 1416 } 1417 } 1418 }; B.prototype.calculateLogarithamicAxisParameters = function () { 1419 var a = this.chart.layoutManager.getFreeSpace(), c = Math.log(this.logarithmBase), b; "bottom" === this._position || "top" === this._position ? (this.maxWidth = a.width, this.maxHeight = a.height) : (this.maxWidth = a.height, this.maxHeight = a.width); var a = "axisX" === this.type ? 500 > this.maxWidth ? 7 : Math.max(7, Math.floor(this.maxWidth / 1420 100)) : Math.max(Math.floor(this.maxWidth / 50), 3), d, f, g, l; l = 1; if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) this.viewportMinimum = this.minimum; if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) this.viewportMaximum = this.maximum; "axisX" === this.type ? (d = null !== this.viewportMinimum ? this.viewportMinimum : this.dataInfo.viewPortMin, f = null !== this.viewportMaximum ? this.viewportMaximum : this.dataInfo.viewPortMax, 1 === f / d && (l = Math.pow(this.logarithmBase, "undefined" === typeof this.options.interval ? 1421 0.4 : this.options.interval), f *= l, d /= l), g = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : f / d > this.logarithmBase ? f / d * Math.pow(this.logarithmBase, 0.5) : this.logarithmBase) : "axisY" === this.type && (d = null !== this.viewportMinimum ? this.viewportMinimum : this.dataInfo.viewPortMin, f = null !== this.viewportMaximum ? this.viewportMaximum : this.dataInfo.viewPortMax, 0 >= d && !isFinite(f) ? (f = "undefined" === typeof this.options.interval ? 0 : this.options.interval, d = 1) : 0 >= d ? d = f : isFinite(f) || (f = d), 1 === d && 1 === f ? (f *= this.logarithmBase - 1422 1 / this.logarithmBase, d = 1) : 1 === f / d ? (l = Math.min(f * Math.pow(this.logarithmBase, 0.01), Math.pow(this.logarithmBase, 5)), f *= l, d /= l) : d > f ? (l = Math.min(d / f * Math.pow(this.logarithmBase, 0.01), Math.pow(this.logarithmBase, 5)), 1 <= f ? d = f / l : f = d * l) : (l = Math.min(f / d * Math.pow(this.logarithmBase, 0.01), Math.pow(this.logarithmBase, 0.04)), 1 !== f && (f *= l), 1 !== d && (d /= l)), g = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : f / d > this.logarithmBase ? f / d * Math.pow(this.logarithmBase, 0.5) : this.logarithmBase, this.includeZero && (null === 1423 this.viewportMinimum || isNaN(this.viewportMinimum)) && 1 < d && (d = 1), this.includeZero && (null === this.viewportMaximum || isNaN(this.viewportMaximum)) && 1 > f && (f = 1)); l = (isNaN(this.viewportMaximum) || null === this.viewportMaximum ? f : this.viewportMaximum) / (isNaN(this.viewportMinimum) || null === this.viewportMinimum ? d : this.viewportMinimum); linearRange = (isNaN(this.viewportMaximum) || null === this.viewportMaximum ? f : this.viewportMaximum) - (isNaN(this.viewportMinimum) || null === this.viewportMinimum ? d : this.viewportMinimum); this.intervalType = 1424 "number"; l = Math.pow(this.logarithmBase, B.getNiceNumber(Math.abs(Math.log(l) / c), !1)); this.options && 0 < this.options.interval ? this.interval = this.options.interval : (this.interval = B.getNiceExponent(Math.log(l) / c / (a - 1), !0), b = B.getNiceNumber(linearRange / (a - 1), !0)); if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) this.viewportMinimum = "axisX" === this.type ? d / Math.sqrt(g) : Math.pow(this.logarithmBase, this.interval * Math.floor(Math.log(d) / c / this.interval)); if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) this.viewportMaximum = 1425 "axisX" === this.type ? f * Math.sqrt(g) : Math.pow(this.logarithmBase, this.interval * Math.ceil(Math.log(f) / c / this.interval)); 1 === this.viewportMaximum && 1 === this.viewportMinimum && (1 === this.options.viewportMinimum ? this.viewportMaximum *= this.logarithmBase - 1 / this.logarithmBase : 1 === this.options.viewportMaximum && (this.viewportMinimum /= this.logarithmBase - 1 / this.logarithmBase), this.options && "undefined" === typeof this.options.interval && (this.interval = B.getNiceExponent(Math.ceil(Math.log(l) / c) / (a - 1)), b = B.getNiceNumber((this.viewportMaximum - 1426 this.viewportMinimum) / (a - 1), !0))); if (null === this.minimum || null === this.maximum) "axisX" === this.type ? (d = null !== this.minimum ? this.minimum : this.dataInfo.min, f = null !== this.maximum ? this.maximum : this.dataInfo.max, 1 === f / d && (l = Math.pow(this.logarithmBase, "undefined" === typeof this.options.interval ? 0.4 : this.options.interval), f *= l, d /= l), g = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : f / d > this.logarithmBase ? f / d * Math.pow(this.logarithmBase, 0.5) : this.logarithmBase) : "axisY" === this.type && (d = null !== this.minimum ? 1427 this.minimum : this.dataInfo.min, f = null !== this.maximum ? this.maximum : this.dataInfo.max, isFinite(d) || isFinite(f) ? 1 === d && 1 === f ? (f *= this.logarithmBase, d /= this.logarithmBase) : 1 === f / d ? (l = Math.pow(this.logarithmBase, this.interval), f *= l, d /= l) : d > f ? (l = Math.min(0.01 * (d / f), 5), 1 <= f ? d = f / l : f = d * l) : (l = Math.min(f / d * Math.pow(this.logarithmBase, 0.01), Math.pow(this.logarithmBase, 0.04)), 1 !== f && (f *= l), 1 !== d && (d /= l)) : (f = "undefined" === typeof this.options.interval ? 0 : this.options.interval, d = 1), g = Infinity !== this.dataInfo.minDiff ? 1428 this.dataInfo.minDiff : f / d > this.logarithmBase ? f / d * Math.pow(this.logarithmBase, 0.5) : this.logarithmBase, this.includeZero && (null === this.minimum || isNaN(this.minimum)) && 1 < d && (d = 1), this.includeZero && (null === this.maximum || isNaN(this.maximum)) && 1 > f && (f = 1)), this.intervalType = "number", null === this.minimum && (this.minimum = "axisX" === this.type ? d / Math.sqrt(g) : Math.pow(this.logarithmBase, this.interval * Math.floor(Math.log(d) / c / this.interval)), this.minimum = Math.min(this.minimum, null === this.sessionVariables.viewportMinimum || 1429 isNaN(this.sessionVariables.viewportMinimum) ? "undefined" === typeof this.sessionVariables.newViewportMinimum ? Infinity : this.sessionVariables.newViewportMinimum : this.sessionVariables.viewportMinimum)), null === this.maximum && (this.maximum = "axisX" === this.type ? f * Math.sqrt(g) : Math.pow(this.logarithmBase, this.interval * Math.ceil(Math.log(f) / c / this.interval)), this.maximum = Math.max(this.maximum, null === this.sessionVariables.viewportMaximum || isNaN(this.sessionVariables.viewportMaximum) ? "undefined" === typeof this.sessionVariables.newViewportMaximum ? 1430 0 : this.sessionVariables.newViewportMaximum : this.sessionVariables.viewportMaximum)), 1 === this.maximum && 1 === this.minimum && (1 === this.options.minimum ? this.maximum *= this.logarithmBase - 1 / this.logarithmBase : 1 === this.options.maximum && (this.minimum /= this.logarithmBase - 1 / this.logarithmBase)); this.viewportMinimum = Math.max(this.viewportMinimum, this.minimum); this.viewportMaximum = Math.min(this.viewportMaximum, this.maximum); this.viewportMinimum > this.viewportMaximum && (!this.options.viewportMinimum && !this.options.minimum || 1431 this.options.viewportMaximum || this.options.maximum ? this.options.viewportMinimum || this.options.minimum || !this.options.viewportMaximum && !this.options.maximum || (this.viewportMinimum = this.minimum = (this.options.viewportMaximum || this.options.maximum) / Math.pow(this.logarithmBase, 2 * Math.ceil(this.interval))) : this.viewportMaximum = this.maximum = this.options.viewportMinimum || this.options.minimum); d = Math.pow(this.logarithmBase, Math.floor(Math.log(this.viewportMinimum) / (c * this.interval) + 0.2) * this.interval); this.range = 1432 this.viewportMaximum / this.viewportMinimum; this.noTicks = a; if (!this.options.interval && this.range < Math.pow(this.logarithmBase, 8 > this.viewportMaximum || 3 > a ? 2 : 3)) { for (c = Math.floor(this.viewportMinimum / b + 0.5) * b; c < this.viewportMinimum;) c += b; this.equidistantInterval = !1; this.intervalStartPosition = c; this.interval = b }
1432 else this.options.interval || (b = Math.ceil(this.interval), this.range > this.interval && (this.interval = b, d = Math.pow(this.logarithmBase, Math.floor(Math.log(this.viewportMinimum) / (c * this.interval) + 0.2) * this.interval))), 1433 this.equidistantInterval = !0, this.intervalStartPosition = d; if (!this.valueFormatString && (this.valueFormatString = "#,##0.##", 1 > this.viewportMinimum)) { c = Math.floor(Math.abs(Math.log(this.viewportMinimum) / Math.LN10)) + 2; if (isNaN(c) || !isFinite(c)) c = 2; if (2 < c) for (b = 0; b < c - 2; b++) this.valueFormatString += "#" } 1434 }; B.getNiceExponent = function (a, c) { var b = Math.floor(Math.log(a) / Math.LN10), d = a / Math.pow(10, b), d = 0 > b ? 1 >= d ? 1 : 5 >= d ? 5 : 10 : Math.max(Math.floor(d), 1); return Number((d * Math.pow(10, b)).toFixed(20)) }; B.getNiceNumber = function (a, 1435 c) { var b = Math.floor(Math.log(a) / Math.LN10), d = a / Math.pow(10, b); return Number(((c ? 1.5 > d ? 1 : 3 > d ? 2 : 7 > d ? 5 : 10 : 1 >= d ? 1 : 2 >= d ? 2 : 5 >= d ? 5 : 10) * Math.pow(10, b)).toFixed(20)) }; B.prototype.getLabelStartPoint = function () { 1436 var a = G[this.intervalType + "Duration"] * this.interval, a = new Date(Math.floor(this.viewportMinimum / a) * a); if ("millisecond" !== this.intervalType) if ("second" === this.intervalType) 0 < a.getMilliseconds() && (a.setSeconds(a.getSeconds() + 1), a.setMilliseconds(0)); else if ("minute" === this.intervalType) { 1437 if (0 < a.getSeconds() || 1438 0 < a.getMilliseconds()) a.setMinutes(a.getMinutes() + 1), a.setSeconds(0), a.setMilliseconds(0) 1439 } else if ("hour" === this.intervalType) { if (0 < a.getMinutes() || 0 < a.getSeconds() || 0 < a.getMilliseconds()) a.setHours(a.getHours() + 1), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0) } else if ("day" === this.intervalType) { if (0 < a.getHours() || 0 < a.getMinutes() || 0 < a.getSeconds() || 0 < a.getMilliseconds()) a.setDate(a.getDate() + 1), a.setHours(0), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0) } else if ("week" === this.intervalType) { 1440 if (0 < 1441 a.getDay() || 0 < a.getHours() || 0 < a.getMinutes() || 0 < a.getSeconds() || 0 < a.getMilliseconds()) a.setDate(a.getDate() + (7 - a.getDay())), a.setHours(0), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0) 1442 } else if ("month" === this.intervalType) { if (1 < a.getDate() || 0 < a.getHours() || 0 < a.getMinutes() || 0 < a.getSeconds() || 0 < a.getMilliseconds()) a.setMonth(a.getMonth() + 1), a.setDate(1), a.setHours(0), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0) } else "year" === this.intervalType && (0 < a.getMonth() || 1 < a.getDate() || 0 < a.getHours() || 1443 0 < a.getMinutes() || 0 < a.getSeconds() || 0 < a.getMilliseconds()) && (a.setFullYear(a.getFullYear() + 1), a.setMonth(0), a.setDate(1), a.setHours(0), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0)); return a 1444 }; S(pa, I); pa.prototype.createUserOptions = function (a) { 1445 if ("undefined" !== typeof a || this.options._isPlaceholder) { 1446 var c = 0; this.parent.options._isPlaceholder && this.parent.createUserOptions(); this.options._isPlaceholder || (sa(this.parent.stripLines), c = this.parent.options.stripLines.indexOf(this.options)); this.options = 1447 "undefined" === typeof a ? {} : a; this.parent.options.stripLines[c] = this.options 1448 } 1449 }; pa.prototype.render = function () { 1450 this.ctx.save(); var a = this.parent.getPixelCoordinatesOnAxis(this.value), c = Math.abs("pixel" === this._thicknessType ? this.thickness : this.parent.conversionParameters.pixelPerUnit * this.thickness); if (0 < c) { 1451 var b = null === this.opacity ? 1 : this.opacity; this.ctx.strokeStyle = this.color; this.ctx.beginPath(); var d = this.ctx.globalAlpha; this.ctx.globalAlpha = b; D(this.id); var f, g, l, k; this.ctx.lineWidth = c; this.ctx.setLineDash && 1452 this.ctx.setLineDash(F(this.lineDashType, c)); if ("bottom" === this.parent._position || "top" === this.parent._position) f = g = 1 === this.ctx.lineWidth % 2 ? (a.x << 0) + 0.5 : a.x << 0, l = this.chart.plotArea.y1, k = this.chart.plotArea.y2, this.bounds = { x1: f - c / 2, y1: l, x2: g + c / 2, y2: k }; else if ("left" === this.parent._position || "right" === this.parent._position) l = k = 1 === this.ctx.lineWidth % 2 ? (a.y << 0) + 0.5 : a.y << 0, f = this.chart.plotArea.x1, g = this.chart.plotArea.x2, this.bounds = { x1: f, y1: l - c / 2, x2: g, y2: k + c / 2 }; this.ctx.moveTo(f, l); this.ctx.lineTo(g, 1453 k); this.ctx.stroke(); this.ctx.globalAlpha = d 1454 }
1454 this.ctx.restore() 1455 }; S(Q, I); Q.prototype._initialize = function () { 1456 if (this.enabled) { 1457 this.container = document.createElement("div"); this.container.setAttribute("class", "canvasjs-chart-tooltip"); this.container.style.position = "absolute"; this.container.style.height = "auto"; this.container.style.boxShadow = "1px 1px 2px 2px rgba(0,0,0,0.1)"; this.container.style.zIndex = "1000"; this.container.style.display = "none"; var a; a = '<div style=" width: auto;height: auto;min-width: 50px;'; 1458 a += "line-height: auto;"; a += "margin: 0px 0px 0px 0px;"; a += "padding: 5px;"; a += "font-family: Calibri, Arial, Georgia, serif;"; a += "font-weight: normal;"; a += "font-style: " + (t ? "italic;" : "normal;"); a += "font-size: 14px;"; a += "color: #000000;"; a += "text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);"; a += "text-align: left;"; a += "border: 2px solid gray;"; a += t ? "background: rgba(255,255,255,.9);" : "background: rgb(255,255,255);"; a += "text-indent: 0px;"; a += "white-space: nowrap;"; a += "border-radius: 5px;"; a += "-moz-user-select:none;"; 1459 a += "-khtml-user-select: none;"; a += "-webkit-user-select: none;"; a += "-ms-user-select: none;"; a += "user-select: none;"; t || (a += "filter: alpha(opacity = 90);", a += "filter: progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#666666');"); a += '} "> Sample Tooltip</div>'; this.container.innerHTML = a; this.contentDiv = this.container.firstChild; this.container.style.borderRadius = this.contentDiv.style.borderRadius; this.chart._canvasJSContainer.appendChild(this.container) 1460 } 1461 }; Q.prototype.mouseMoveHandler = 1462 function (a, c) { this._lastUpdated && 40 > (new Date).getTime() - this._lastUpdated || (this._lastUpdated = (new Date).getTime(), this._updateToolTip(a, c)) }; Q.prototype._updateToolTip = function (a, c, b) { 1463 b = "undefined" === typeof b ? !0 : b; this.container || this._initialize(); this.enabled || this.hide(); if (!this.chart.disableToolTip) { 1464 if ("undefined" === typeof a || "undefined" === typeof c) { if (isNaN(this._prevX) || isNaN(this._prevY)) return; a = this._prevX; c = this._prevY } else this._prevX = a, this._prevY = c; var d = null, f = null, g = [], l = 0; if (this.shared && 1465 this.enabled && "none" !== this.chart.plotInfo.axisPlacement) { 1466 if ("xySwapped" === this.chart.plotInfo.axisPlacement) { 1467 f = []; if (this.chart.axisX) for (var k = 0; k < this.chart.axisX.length; k++) { for (var l = this.chart.axisX[k].convertPixelToValue({ y: c }), h = null, d = 0; d < this.chart.axisX[k].dataSeries.length; d++) (h = this.chart.axisX[k].dataSeries[d].getDataPointAtX(l, b)) && 0 <= h.index && (h.dataSeries = this.chart.axisX[k].dataSeries[d], null !== h.dataPoint.y && f.push(h)); h = null } if (this.chart.axisX2) for (k = 0; k < this.chart.axisX2.length; k++) { 1468 l = 1469 this.chart.axisX2[k].convertPixelToValue({ y: c }); h = null; for (d = 0; d < this.chart.axisX2[k].dataSeries.length; d++) (h = this.chart.axisX2[k].dataSeries[d].getDataPointAtX(l, b)) && 0 <= h.index && (h.dataSeries = this.chart.axisX2[k].dataSeries[d], null !== h.dataPoint.y && f.push(h)); h = null 1470 } 1471 } else { 1472 f = []; if (this.chart.axisX) for (k = 0; k < this.chart.axisX.length; k++) for (l = this.chart.axisX[k].convertPixelToValue({ x: a }), h = null, d = 0; d < this.chart.axisX[k].dataSeries.length; d++) (h = this.chart.axisX[k].dataSeries[d].getDataPointAtX(l, 1473 b)) && 0 <= h.index && (h.dataSeries = this.chart.axisX[k].dataSeries[d], null !== h.dataPoint.y && f.push(h)); if (this.chart.axisX2) for (k = 0; k < this.chart.axisX2.length; k++) for (l = this.chart.axisX2[k].convertPixelToValue({ x: a }), h = null, d = 0; d < this.chart.axisX2[k].dataSeries.length; d++) (h = this.chart.axisX2[k].dataSeries[d].getDataPointAtX(l, b)) && 0 <= h.index && (h.dataSeries = this.chart.axisX2[k].dataSeries[d], null !== h.dataPoint.y && f.push(h)) 1474 } if (0 === f.length) return; f.sort(function (a, b) { return a.distance - b.distance }); b = f[0]; 1475 for (d = 0; d < f.length; d++) f[d].dataPoint.x.valueOf() === b.dataPoint.x.valueOf() && g.push(f[d]); f = null 1476 } else { 1477 if (h = this.chart.getDataPointAtXY(a, c, b)) this.currentDataPointIndex = h.dataPointIndex, this.currentSeriesIndex = h.dataSeries.index; else if (t) if (h = Na(a, c, this.chart._eventManager.ghostCtx), 0 < h && "undefined" !== typeof this.chart._eventManager.objectMap[h]) { 1478 h = this.chart._eventManager.objectMap[h]; if ("legendItem" === h.objectType) return; this.currentSeriesIndex = h.dataSeriesIndex; this.currentDataPointIndex = 0 <= 1479 h.dataPointIndex ? h.dataPointIndex : -1 1480 } else this.currentDataPointIndex = -1; else this.currentDataPointIndex = -1; if (0 <= this.currentSeriesIndex) { 1481 f = this.chart.data[this.currentSeriesIndex]; h = {}; if (0 <= this.currentDataPointIndex) d = f.dataPoints[this.currentDataPointIndex], h.dataSeries = f, h.dataPoint = d, h.index = this.currentDataPointIndex, h.distance = Math.abs(d.x - l); else { 1482 if (!this.enabled || "line" !== f.type && "stepLine" !== f.type && "spline" !== f.type && "area" !== f.type && "stepArea" !== f.type && "splineArea" !== f.type && "stackedArea" !== 1483 f.type && "stackedArea100" !== f.type && "rangeArea" !== f.type && "rangeSplineArea" !== f.type && "candlestick" !== f.type && "ohlc" !== f.type) return; l = f.axisX.convertPixelToValue({ x: a }); h = f.getDataPointAtX(l, b); h.dataSeries = f; this.currentDataPointIndex = h.index; d = h.dataPoint 1484 } if (!y(h.dataPoint.y)) if (h.dataSeries.axisY) if (0 < h.dataPoint.y.length) { 1485 for (d = b = 0; d < h.dataPoint.y.length; d++) h.dataPoint.y[d] < h.dataSeries.axisY.viewportMinimum ? b-- : h.dataPoint.y[d] > h.dataSeries.axisY.viewportMaximum && b++;
1485 b < h.dataPoint.y.length && 1486 b > -h.dataPoint.y.length && g.push(h) 1487 } else "column" === f.type || "bar" === f.type ? 0 > h.dataPoint.y ? 0 > h.dataSeries.axisY.viewportMinimum && h.dataSeries.axisY.viewportMaximum >= h.dataPoint.y && g.push(h) : h.dataSeries.axisY.viewportMinimum <= h.dataPoint.y && 0 <= h.dataSeries.axisY.viewportMaximum && g.push(h) : "bubble" === f.type ? (b = this.chart._eventManager.objectMap[f.dataPointIds[h.index]].size / 2, h.dataPoint.y >= h.dataSeries.axisY.viewportMinimum - b && h.dataPoint.y <= h.dataSeries.axisY.viewportMaximum + b && g.push(h)) : (0 <= h.dataSeries.type.indexOf("100") || 1488 "stackedColumn" === f.type || "stackedBar" === f.type || h.dataPoint.y >= h.dataSeries.axisY.viewportMinimum && h.dataPoint.y <= h.dataSeries.axisY.viewportMaximum) && g.push(h); else g.push(h) 1489 } 1490 } if (0 < g.length && (this.highlightObjects(g), this.enabled)) if (b = "", b = this.getToolTipInnerHTML({ entries: g }), null !== b) { 1491 this.contentDiv.innerHTML = b; this.contentDiv.innerHTML = b; b = !1; "none" === this.container.style.display && (b = !0, this.container.style.display = "block"); try { 1492 this.contentDiv.style.background = this.backgroundColor ? this.backgroundColor : 1493 t ? "rgba(255,255,255,.9)" : "rgb(255,255,255)", this.borderColor = this.contentDiv.style.borderRightColor = this.contentDiv.style.borderLeftColor = this.contentDiv.style.borderColor = this.options.borderColor ? this.options.borderColor : g[0].dataPoint.color ? g[0].dataPoint.color : g[0].dataSeries.color ? g[0].dataSeries.color : g[0].dataSeries._colorSet[g[0].index % g[0].dataSeries._colorSet.length], this.contentDiv.style.borderWidth = this.borderThickness || 0 === this.borderThickness ? this.borderThickness + "px" : "2px", this.contentDiv.style.borderRadius = 1494 this.cornerRadius || 0 === this.cornerRadius ? this.cornerRadius + "px" : "5px", this.container.style.borderRadius = this.contentDiv.style.borderRadius, this.contentDiv.style.fontSize = this.fontSize || 0 === this.fontSize ? this.fontSize + "px" : "14px", this.contentDiv.style.color = this.fontColor ? this.fontColor : "#000000", this.contentDiv.style.fontFamily = this.fontFamily ? this.fontFamily : "Calibri, Arial, Georgia, serif;", this.contentDiv.style.fontWeight = this.fontWeight ? this.fontWeight : "normal", this.contentDiv.style.fontStyle = 1495 this.fontStyle ? this.fontStyle : t ? "italic" : "normal" 1496 } catch (m) { } "pie" === g[0].dataSeries.type || "doughnut" === g[0].dataSeries.type || "funnel" === g[0].dataSeries.type || "bar" === g[0].dataSeries.type || "rangeBar" === g[0].dataSeries.type || "stackedBar" === g[0].dataSeries.type || "stackedBar100" === g[0].dataSeries.type ? a = a - 10 - this.container.clientWidth : (a = g[0].dataSeries.axisX.convertValueToPixel(g[0].dataPoint.x) - this.container.clientWidth << 0, a -= 10); 0 > a && (a += this.container.clientWidth + 20); a + this.container.clientWidth > 1497 Math.max(this.chart.container.clientWidth, this.chart.width) && (a = Math.max(0, Math.max(this.chart.container.clientWidth, this.chart.width) - this.container.clientWidth)); a += "px"; c = 1 !== g.length || this.shared || "line" !== g[0].dataSeries.type && "stepLine" !== g[0].dataSeries.type && "spline" !== g[0].dataSeries.type && "area" !== g[0].dataSeries.type && "stepArea" !== g[0].dataSeries.type && "splineArea" !== g[0].dataSeries.type ? "bar" === g[0].dataSeries.type || "rangeBar" === g[0].dataSeries.type || "stackedBar" === g[0].dataSeries.type || 1498 "stackedBar100" === g[0].dataSeries.type ? g[0].dataSeries.axisX.convertValueToPixel(g[0].dataPoint.x) : c : g[0].dataSeries.axisY.convertValueToPixel(g[0].dataPoint.y); c = -c + 10; 0 < c + this.container.clientHeight + 5 && (c -= c + this.container.clientHeight + 5 - 0); this.container.style.left = a; this.container.style.bottom = c + "px"; !this.animationEnabled || b ? this.disableAnimation() : this.enableAnimation() 1499 } else this.hide(!1) 1500 } 1501 }; Q.prototype.highlightObjects = function (a) { 1502 var c = this.chart.overlaidCanvasCtx; this.chart.resetOverlayedCanvas(); 1503 c.clearRect(0, 0, this.chart.width, this.chart.height); c.save(); var b = this.chart.plotArea, d = 0; c.beginPath(); c.rect(b.x1, b.y1, b.x2 - b.x1, b.y2 - b.y1); c.clip(); for (b = 0; b < a.length; b++) { 1504 var f = a[b]; if ((f = this.chart._eventManager.objectMap[f.dataSeries.dataPointIds[f.index]]) && f.objectType && "dataPoint" === f.objectType) { 1505 var d = this.chart.data[f.dataSeriesIndex], g = d.dataPoints[f.dataPointIndex], l = f.dataPointIndex;
1505 !1 === g.highlightEnabled || !0 !== d.highlightEnabled && !0 !== g.highlightEnabled || ("line" === d.type || "stepLine" === 1506 d.type || "spline" === d.type || "scatter" === d.type || "area" === d.type || "stepArea" === d.type || "splineArea" === d.type || "stackedArea" === d.type || "stackedArea100" === d.type || "rangeArea" === d.type || "rangeSplineArea" === d.type ? (g = d.getMarkerProperties(l, f.x1, f.y1, this.chart.overlaidCanvasCtx), g.size = Math.max(1.5 * g.size << 0, 10), g.borderColor = g.borderColor || "#FFFFFF", g.borderThickness = g.borderThickness || Math.ceil(0.1 * g.size), O.drawMarkers([g]), "undefined" !== typeof f.y2 && (g = d.getMarkerProperties(l, f.x1, f.y2, this.chart.overlaidCanvasCtx), 1507 g.size = Math.max(1.5 * g.size << 0, 10), g.borderColor = g.borderColor || "#FFFFFF", g.borderThickness = g.borderThickness || Math.ceil(0.1 * g.size), O.drawMarkers([g]))) : "bubble" === d.type ? (g = d.getMarkerProperties(l, f.x1, f.y1, this.chart.overlaidCanvasCtx), g.size = f.size, g.color = "white", g.borderColor = "white", c.globalAlpha = 0.3, O.drawMarkers([g]), c.globalAlpha = 1) : "column" === d.type || "stackedColumn" === d.type || "stackedColumn100" === d.type || "bar" === d.type || "rangeBar" === d.type || "stackedBar" === d.type || "stackedBar100" === d.type || 1508 "rangeColumn" === d.type ? N(c, f.x1, f.y1, f.x2, f.y2, "white", 0, null, !1, !1, !1, !1, 0.3) : "pie" === d.type || "doughnut" === d.t
1508ype ? Ha(c, f.center, f.radius, "white", d.type, f.startAngle, f.endAngle, 0.3, f.percentInnerRadius) : "candlestick" === d.type ? (c.globalAlpha = 1, c.strokeStyle = f.color, c.lineWidth = 2 * f.borderThickness, d = 0 === c.lineWidth % 2 ? 0 : 0.5, c.beginPath(), c.moveTo(f.x3 - d, Math.min(f.y2, f.y3)), c.lineTo(f.x3 - d, Math.min(f.y1, f.y4)), c.stroke(), c.beginPath(), c.moveTo(f.x3 - d, Math.max(f.y1, f.y4)), c.lineTo(f.x3 - d, Math.max(f.y2, 1509 f.y3)), c.stroke(), N(c, f.x1, Math.min(f.y1, f.y4), f.x2, Math.max(f.y1, f.y4), "transparent", 2 * f.borderThickness, f.color, !1, !1, !1, !1), c.globalAlpha = 1) : "ohlc" === d.type && (c.globalAlpha = 1, c.strokeStyle = f.color, c.lineWidth = 2 * f.borderThickness, d = 0 === c.lineWidth % 2 ? 0 : 0.5, c.beginPath(), c.moveTo(f.x3 - d, f.y2), c.lineTo(f.x3 - d, f.y3), c.stroke(), c.beginPath(), c.moveTo(f.x3, f.y1), c.lineTo(f.x1, f.y1), c.stroke(), c.beginPath(), c.moveTo(f.x3, f.y4), c.lineTo(f.x2, f.y4), c.stroke(), c.globalAlpha = 1)) 1510 } 1511 } c.restore(); c.globalAlpha = 1512 1; c.beginPath() 1513 }; Q.prototype.getToolTipInnerHTML = function (a) { 1514 a = a.entries; for (var c = null, b = null, d = null, f = 0, g = "", l = !0, k = 0; k < a.length; k++) if (a[k].dataSeries.toolTipContent || a[k].dataPoint.toolTipContent) { l = !1; break } if (l && (this.content && "function" === typeof this.content || this.contentFormatter)) a = { chart: this.chart, toolTip: this.options, entries: a }, c = this.contentFormatter ? this.contentFormatter(a) : this.content(a); else if (this.shared && "none" !== this.chart.plotInfo.axisPlacement) { 1515 for (var h = null, m = "", k = 0; k < a.length; k++) if (b = 1516 a[k].dataSeries, d = a[k].dataPoint, f = a[k].index, g = "", 0 === k && (l && !this.content) && (this.chart.axisX && 0 < this.chart.axisX.length ? m += "undefined" !== typeof this.chart.axisX[0].labels[d.x] ? this.chart.axisX[0].labels[d.x] : "{x}" : this.chart.axisX2 && 0 < this.chart.axisX2.length && (m += "undefined" !== typeof this.chart.axisX2[0].labels[d.x] ? this.chart.axisX2[0].labels[d.x] : "{x}"), m += "</br>", m = this.chart.replaceKeywordsWithValue(m, d, b, f)), null !== d.toolTipContent && ("undefined" !== typeof d.toolTipContent || null !== b.options.toolTipContent)) { 1517 if ("line" === 1518 b.type || "stepLine" === b.type || "spline" === b.type || "area" === b.type || "stepArea" === b.type || "splineArea" === b.type || "column" === b.type || "bar" === b.type || "scatter" === b.type || "stackedColumn" === b.type || "stackedColumn100" === b.type || "stackedBar" === b.type || "stackedBar100" === b.type || "stackedArea" === b.type || "stackedArea100" === b.type) this.chart.axisX && 1 < this.chart.axisX.length && (g += h != b.axisXIndex ? b.axisX.title ? b.axisX.title + "<br/>" : "X:{axisXIndex}<br/>" : ""), g += d.toolTipContent ? d.toolTipContent : b.toolTipContent ? b.toolTipContent : 1519 this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>{name}:</span> {y}", h = b.axisXIndex; else if ("bubble" === b.type) this.chart.axisX && 1 < this.chart.axisX.length && (g += h != b.axisXIndex ? b.axisX.title ? b.axisX.title + "<br/>" : "X:{axisXIndex}<br/>" : ""), g += d.toolTipContent ? d.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? 1520 "" : "'color:{color};'") + "\"'>{name}:</span> {y}, {z}"; else if ("rangeColumn" === b.type || "rangeBar" === b.type || "rangeArea" === b.type || "rangeSplineArea" === b.type) this.chart.axisX && 1 < this.chart.axisX.length && (g += h != b.axisXIndex ? b.axisX.title ? b.axisX.title + "<br/>" : "X:{axisXIndex}<br/>" : ""), g += d.toolTipContent ? d.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + 1521 "\"'>{name}:</span> {y[0]}, {y[1]}"; else if ("candlestick" === b.type || "ohlc" === b.type) this.chart.axisX && 1 < this.chart.axisX.length && (g += h != b.axisXIndex ? b.axisX.title ? b.axisX.title + "<br/>" : "X:{axisXIndex}<br/>" : ""), g += d.toolTipContent ? d.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>{name}:</span><br/>Open: {y[0]}<br/>High: {y[1]}<br/>Low: {y[2]}<br/>Close: {y[3]}"; 1522 null === c && (c = ""); !0 === this.reversed ? (c = this.chart.replaceKeywordsWithValue(g, d, b, f) + c, k < a.length - 1 && (c = "</br>" + c)) : (c += this.chart.replaceKeywordsWithValue(g, d, b, f), k < a.length - 1 && (c += "</br>")) 1523 } null !== c && (c = m + c) 1524 } else { 1525 b = a[0].dataSeries; d = a[0].dataPoint; f = a[0].index; if (null === d.toolTipContent || "undefined" === typeof d.toolTipContent && null === b.options.toolTipContent) return null; if ("line" === b.type || "stepLine" === b.type || "spline" === b.type || "area" === b.type || "stepArea" === b.type || "splineArea" === b.type || "column" === 1526 b.type || "bar" === b.type || "scatter" === b.type || "stackedColumn" === b.type || "stackedColumn100" === b.type || "stackedBar" === b.type || "stackedBar100" === b.type || "stackedArea" === b.type || "stackedArea100" === b.type) g = d.toolTipContent ? d.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>" + (d.label ? "{label}" : "{x}
1526") + ":</span> {y}"; else if ("bubble" === b.type) g = d.toolTipContent ? d.toolTipContent : 1527 b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>" + (d.label ? "{label}" : "{x}") + ":</span> {y}, {z}"; else if ("pie" === b.type || "doughnut" === b.type || "funnel" === b.type) g = d.toolTipContent ? d.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>" + (d.name ? 1528 "{name}:</span> " : d.label ? "{label}:</span> " : "</span>") + "{y}"; else if ("rangeColumn" === b.type || "rangeBar" === b.type || "rangeArea" === b.type || "rangeSplineArea" === b.type) g = d.toolTipContent ? d.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>" + (d.label ? "{label}" : "{x}") + " :</span> {y[0]}, {y[1]}"; else if ("candlestick" === b.type || "ohlc" === b.type) g = 1529 d.toolTipContent ? d.toolTipContent : b.toolTipContent ? b.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span style='\"" + (this.options.fontColor ? "" : "'color:{color};'") + "\"'>" + (d.label ? "{label}" : "{x}") + "</span><br/>Open: {y[0]}<br/>High: {y[1]}<br/>Low: {y[2]}<br/>Close: {y[3]}"; null === c && (c = ""); c += this.chart.replaceKeywordsWithValue(g, d, b, f) 1530 } return c 1531 }; Q.prototype.enableAnimation = function () { 1532 this.container.style.WebkitTransition || 1533 (this.container.style.WebkitTransition = "left .2s ease-out, bottom .2s ease-out", this.container.style.MozTransition = "left .2s ease-out, bottom .2s ease-out", this.container.style.MsTransition = "left .2s ease-out, bottom .2s ease-out", this.container.style.transition = "left .2s ease-out, bottom .2s ease-out") 1534 }; Q.prototype.disableAnimation = function () { 1535 this.container.style.WebkitTransition && (this.container.style.WebkitTransition = "", this.container.style.MozTransition = "", this.container.style.MsTransition = "", 1536 this.container.style.transition = "") 1537 }; Q.prototype.hide = function (a) { this.container && (this.container.style.display = "none", this.currentSeriesIndex = -1, this._prevY = this._prevX = NaN, ("undefined" === typeof a || a) && this.chart.resetOverlayedCanvas()) }; Q.prototype.show = function (a, c, b) { this._updateToolTip(a, c, "undefined" === typeof b ? !1 : b) }; A.prototype.getPercentAndTotal = function (a, c) { 1538 var b = null, d = null, f = null; if (0 <= a.type.indexOf("stacked")) d = 0, b = c.x.getTime ? c.x.getTime() : c.x, b in a.plotUnit.yTotals && (d = a.plotUnit.yTotals[b], 1539 f = isNaN(c.y) ? 0 : 0 === d ? 0 : 100 * (c.y / d)); else if ("pie" === a.type || "doughnut" === a.type) { for (i = d = 0; i < a.dataPoints.length; i++) isNaN(a.dataPoints[i].y) || (d += a.dataPoints[i].y); f = isNaN(c.y) ? 0 : 100 * (c.y / d) } return { percent: f, total: d } 1540 }; A.prototype.replaceKeywordsWithValue = function (a, c, b, d, f) { 1541 var g = this; f = "undefined" === typeof f ? 0 : f; if ((0 <= b.type.indexOf("stacked") || "pie" === b.type || "doughnut" === b.type) && (0 <= a.indexOf("#percent") || 0 <= a.indexOf("#total"))) { 1542 var l = "#percent", k = "#total", h = this.getPercentAndTotal(b, c), k = 1543 isNaN(h.total) ? k : h.total, l = isNaN(h.percent) ? l : h.percent; do { h = ""; if (b.percentFormatString) h = b.percentFormatString; else { var h = "#,##0.", m = Math.max(Math.ceil(Math.log(1 / Math.abs(l)) / Math.LN10), 2); if (isNaN(m) || !isFinite(m)) m = 2; for (var p = 0; p < m; p++) h += "#"; b.percentFormatString = h } a = a.replace("#percent", da(l, h, g._cultureInfo)); a = a.replace("#total", da(k, b.yValueFormatString ? b.yValueFormatString : "#,##0.########", g._cultureInfo)) } while (0 <= a.indexOf("#percent") || 0 <= a.indexOf("#total")) 1544 } return a.replace(/\{.*?\}|"[^"]*"|'[^']*'/g, 1545 function (a) { 1546 if ('"' === a[0] && '"' === a[a.length - 1] || "'" === a[0] && "'" === a[a.length - 1]) return a.slice(1, a.length - 1); a = ma(a.slice(1, a.length - 1)); a = a.replace("#index", f); var e = null; try { var h = a.match(/(.*?)\s*\[\s*(.*?)\s*\]/); h && 0 < h.length && (e = ma(h[2]), a = ma(h[1])) } catch (k) { } h = null; if ("color" === a) return c.color ? c.color : b.color ? b.color : b._colorSet[d % b._colorSet.length]; if (c.hasOwnProperty(a)) h = c; else if (b.hasOwnProperty(a)) h = b; else return ""; h = h[a]; null !== e && (h = h[e]); if ("x" === a) if ("dateTime" === g.plotInfo.axisXValueType || 1547 "dateTime" === b.xValueType || c.x && c.x.getTime) { if (g.plotInfo.plotTypes[0].plotUnits[0].axisX && !g.plotInfo.plotTypes[0].plotUnits[0].axisX.logarithmic) return Fa(h, c.xValueFormatString ? c.xValueFormatString : b.xValueFormatString ? b.xValueFormatString : b.xValueFormatString = g.axisX && g.axisX.autoValueFormatString ? g.axisX.autoValueFormatString : "DD MMM YY", g._cultureInfo) } else return da(h, c.xValueFormatString ? c.xValueFormatString : b.xValueFormatString ? b.xValueFormatString : b.xValueFormatString = "#,##0.########", 1548 g._cultureInfo); else return "y" === a ? da(h, c.yValueFormatString ? c.yValueFormatString : b.yValueFormatString ? b.yValueFormatString : b.yValueFormatString = "#,##0.########", g._cultureInfo) : "z" === a ? da(h, c.zValueFormatString ? c.zValueFormatString : b.zValueFormatString ? b.zValueFormatString : b.zValueFormatString = "#,##0.########", g._cultureInfo) : h 1549 }) 1550 }; na.prototype.reset = function () { 1551 this.lastObjectId = 0; this.objectMap = []; this.rectangularRegionEventSubscriptions = []; this.previousDataPointEventObject = null; this.eventObjects = 1552 []; t && (this.ghostCtx.clearRect(0, 0, this.chart.width, this.chart.height), this.ghostCtx.beginPath()) 1553 }; na.prototype.getNewObjectTrackingId = function () { return ++this.lastObjectId }; na.prototype.mouseEventHandler = function (a) { 1554 if ("mousemove" === a.type || "click" === a.type) { 1555 var c = [], b = za(a), d = null; if ((d = this.chart.getObjectAtXY(b.x, b.y, !1)) && "undefined" !== typeof this.objectMap[d]) if (d = this.objectMap[d], "dataPoint" === d.objectType) { 1556 var f = this.chart.data[d.dataSeriesIndex], g = f.dataPoints[d.dataPointIndex], l = d.dataPointIndex; 1557 d.eventParameter = { x: b.x, y: b.y, dataPoint: g, dataSeries: f.options, dataPointIndex: l, dataSeriesIndex: f.index, chart: this.chart }; d.eventContext = { context: g, userContext: g, mouseover: "mouseover", mou
1557semove: "mousemove", mouseout: "mouseout", click: "click" }; c.push(d); d = this.objectMap[f.id]; d.eventParameter = { x: b.x, y: b.y, dataPoint: g, dataSeries: f.options, dataPointIndex: l, dataSeriesIndex: f.index, chart: this.chart }; d.eventContext = { 1558 context: f, userContext: f.options, mouseover: "mouseover", mousemove: "mousemove", mouseout: "mouseout", 1559 click: "click" 1560 }; c.push(this.objectMap[f.id]) 1561 } else "legendItem" === d.objectType && (f = this.chart.data[d.dataSeriesIndex], g = null !== d.dataPointIndex ? f.dataPoints[d.dataPointIndex] : null, d.eventParameter = { x: b.x, y: b.y, dataSeries: f.options, dataPoint: g, dataPointIndex: d.dataPointIndex, dataSeriesIndex: d.dataSeriesIndex, chart: this.chart }, d.eventContext = { context: this.chart.legend, userContext: this.chart.legend.options, mouseover: "itemmouseover", mousemove: "itemmousemove", mouseout: "itemmouseout", click: "itemclick" }, c.push(d)); 1562 f = []; for (b = 0; b < this.mouseoveredObjectMaps.length; b++) { g = !0; for (d = 0; d < c.length; d++) if (c[d].id === this.mouseoveredObjectMaps[b].id) { g = !1; break } g ? this.fireEvent(this.mouseoveredObjectMaps[b], "mouseout", a) : f.push(this.mouseoveredObjectMaps[b]) } this.mouseoveredObjectMaps = f; for (b = 0; b < c.length; b++) { 1563 f = !1; for (d = 0; d < this.mouseoveredObjectMaps.length; d++) if (c[b].id === this.mouseoveredObjectMaps[d].id) { f = !0; break } f || (this.fireEvent(c[b], "mouseover", a), this.mouseoveredObjectMaps.push(c[b])); "click" === a.type ? this.fireEvent(c[b], 1564 "click", a) : "mousemove" === a.type && this.fireEvent(c[b], "mousemove", a) 1565 } 1566 } 1567 }; na.prototype.fireEvent = function (a, c, b) { 1568 if (a && c) { 1569 var d = a.eventParameter, f = a.eventContext, g = a.eventContext.userContext; g && (f && g[f[c]]) && g[f[c]].call(g, d); "mouseout" !== c ? g.cursor && g.cursor !== b.target.style.cursor && (b.target.style.cursor = g.cursor) : (b.target.style.cursor = this.chart._defaultCursor, delete a.eventParameter, delete a.eventContext); "click" === c && ("dataPoint" === a.objectType && this.chart.pieDoughnutClickHandler) && this.chart.pieDoughnutClickHandler.call(this.chart.data[a.dataSeriesIndex], 1570 d) 1571 } 1572 }; S(qa, I); Ea.prototype.animate = function (a, c, b, d, f) { 1573 var g = this; this.chart.isAnimating = !0; f = f || E.easing.linear; b && this.animations.push({ startTime: (new Date).getTime() + (a ? a : 0), duration: c, animationCallback: b, onComplete: d }); for (a = []; 0 < this.animations.length;) if (c = this.animations.shift(), b = (new Date).getTime(), d = 0, c.startTime <= b && (d = f(Math.min(b - c.startTime, c.duration), 0, 1, c.duration), d = Math.min(d, 1), isNaN(d) || !isFinite(d)) && (d = 1), 1 > d && a.push(c), c.animationCallback(d), 1 <= d && c.onComplete) c.onComplete(); 1574 this.animations = a; 0 < this.animations.length ? this.animationRequestId = this.chart.requestAnimFrame.call(window, function () { g.animate.call(g) }) : this.chart.isAnimating = !1 1575 }; Ea.prototype.cancelAllAnimations = function () { this.animations = []; this.animationRequestId && this.chart.cancelRequestAnimFrame.call(window, this.animationRequestId); this.animationRequestId = null; this.chart.isAnimating = !1 }; var E = { 1576 yScaleAnimation: function (a, c) { 1577 if (0 !== a) { 1578 var b = c.dest, d = c.source.canvas, f = c.animationBase; b.drawImage(d, 0, 0, d.width, 1579 d.height, 0, f - f * a, b.canvas.width / L, a * b.canvas.height / L) 1580 } 1581 }, xScaleAnimation: function (a, c) { if (0 !== a) { var b = c.dest, d = c.source.canvas, f = c.animationBase; b.drawImage(d, 0, 0, d.width, d.height, f - f * a, 0, a * b.canvas.width / L, b.canvas.height / L) } }, xClipAnimation: function (a, c) { if (0 !== a) { var b = c.dest, d = c.source.canvas; b.save(); 0 < a && b.drawImage(d, 0, 0, d.width * a, d.height, 0, 0, d.width * a / L, d.height / L); b.restore() } }, fadeInAnimation: function (a, c) { 1582 if (0 !== a) { 1583 var b = c.dest, d = c.source.canvas; b.save(); b.globalAlpha = a; b.drawImage(d, 1584 0, 0, d.width, d.height, 0, 0, b.canvas.width / L, b.canvas.height / L);
1584 b.restore() 1585 } 1586 }, easing: { linear: function (a, c, b, d) { return b * a / d + c }, easeOutQuad: function (a, c, b, d) { return -b * (a /= d) * (a - 2) + c }, easeOutQuart: function (a, c, b, d) { return -b * ((a = a / d - 1) * a * a * a - 1) + c }, easeInQuad: function (a, c, b, d) { return b * (a /= d) * a + c }, easeInQuart: function (a, c, b, d) { return b * (a /= d) * a * a * a + c } } 1587 }, O = { 1588 drawMarker: function (a, c, b, d, f, g, l, k) { 1589 if (b) { 1590 var h = 1; b.fillStyle = g ? g : "#000000"; b.strokeStyle = l ? l : "#000000"; b.lineWidth = k ? k : 0; "circle" === d ? (b.moveTo(a, c), 1591 b.beginPath(), b.arc(a, c, f / 2, 0, 2 * Math.PI, !1), g && b.fill(), k && (l ? b.stroke() : (h = b.globalAlpha, b.globalAlpha = 0.15, b.strokeStyle = "black", b.stroke(), b.globalAlpha = h))) : "square" === d ? (b.beginPath(), b.rect(a - f / 2, c - f / 2, f, f), g && b.fill(), k && (l ? b.stroke() : (h = b.globalAlpha, b.globalAlpha = 0.15, b.strokeStyle = "black", b.stroke(), b.globalAlpha = h))) : "triangle" === d ? (b.beginPath(), b.moveTo(a - f / 2, c + f / 2), b.lineTo(a + f / 2, c + f / 2), b.lineTo(a, c - f / 2), b.closePath(), g && b.fill(), k && (l ? b.stroke() : (h = b.globalAlpha, b.globalAlpha = 0.15, 1592 b.strokeStyle = "black", b.stroke(), b.globalAlpha = h)), b.beginPath()) : "cross" === d && (b.strokeStyle = g, b.lineWidth = f / 4, b.beginPath(), b.moveTo(a - f / 2, c - f / 2), b.lineTo(a + f / 2, c + f / 2), b.stroke(), b.moveTo(a + f / 2, c - f / 2), b.lineTo(a - f / 2, c + f / 2), b.stroke()) 1593 } 1594 }, drawMarkers: function (a) { for (var c = 0; c < a.length; c++) { var b = a[c]; O.drawMarker(b.x, b.y, b.ctx, b.type, b.size, b.color, b.borderColor, b.borderThickness) } } 1595 }, Qa = { 1596 Chart: A, addColorSet: function (a, c) { ia[a] = c }, addCultureInfo: function (a, c) { ra[a] = c }, formatNumber: function (a, c, b) { 1597 b = 1598 b || "en"; if (ra[b]) return da(a, c || "#,##0.##", new qa(b)); throw "Unknown Culture Name"; 1599 }, formatDate: function (a, c, b) { b = b || "en"; if (ra[b]) return Fa(a, c || "DD MMM YYYY", new qa(b)); throw "Unknown Culture Name"; } 1600 }; Qa.Chart.version = "v1.9.10 GA"; window.CanvasJS = Qa 1601})(); 1602 1603/* 1604 excanvas is used to support IE678 which do not implement HTML5 Canvas Element. You can safely remove the following excanvas code if you don't need to support older browsers. 1605 1606 Copyright 2006 Google Inc. https://code.google.com/p/explorercanvas/ 1607 Licensed under the Apache License, Version 2.0 1608*/ 1609document.createElement("canvas").getContext || function () { 1610 function V() { return this.context_ || (this.context_ = new C(this)) } function W(a, b, c) { var g = M.call(arguments, 2); return function () { return a.apply(b, g.concat(M.call(arguments))) } } function N(a) { return String(a).replace(/&/g, "&").replace(/"/g, """) } function O(a) { 1611 a.namespaces.g_vml_ || a.namespaces.add("g_vml_", "urn:schemas-microsoft-com:vml", "#default#VML"); a.namespaces.g_o_ || a.namespaces.add("g_o_", "urn:schemas-microsoft-com:office:office", "#default#VML"); 1612 a.styleSheets.ex_canvas_ || (a = a.createStyleSheet(), a.owningElement.id = "ex_canvas_", a.cssText = "canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}") 1613 } function X(a) { 1614 var b = a.srcElement; switch (a.propertyName) { 1615 case "width": b.getContext().clearRect(); b.style.width = b.attributes.width.nodeValue + "px"; b.firstChild.style.width = b.clientWidth + "px"; break; case "height": b.getContext().clearRect(), b.style.height = b.attributes.height.nodeValue + "px", b.firstChild.style.height = b.clientHeight + 1616 "px" 1617 } 1618 } function Y(a) { a = a.srcElement; a.firstChild && (a.firstChild.style.width = a.clientWidth + "px", a.firstChild.style.height = a.clientHeight + "px") } function D() { return [[1, 0, 0], [0, 1, 0], [0, 0, 1]] } function t(a, b) { for (var c = D(), g = 0; 3 > g; g++) for (var e = 0; 3 > e; e++) { for (var f = 0, d = 0; 3 > d; d++) f += a[g][d] * b[d][e]; c[g][e] = f } return c } function P(a, b) { 1619 b.fillStyle = a.fillStyle; b.lineCap = a.lineCap; b.lineJoin = a.lineJoin; b.lineWidth = a.lineWidth; b.miterLimit = a.miterLimit; b.shadowBlur = a.shadowBlur; b.shadowColor = a.shadowColor; b.shadowOffsetX = 1620 a.shadowOffsetX; b.shadowOffsetY = a.shadowOffsetY; b.strokeStyle = a.strokeStyle; b.globalAlpha = a.globalAlpha; b.font = a.font; b.textAlign = a.textAlign; b.textBaseline = a.textBaseline; b.arcScaleX_ = a.arcScaleX_; b.arcScaleY_ = a.arcScaleY_; b.lineScale_ = a.lineScale_ 1621 } function Q(a) { var b = a.indexOf("(", 3), c = a.indexOf(")", b + 1), b = a.substring(b + 1, c).split(","); if (4 != b.length || "a" != a.charAt(3)) b[3] = 1; return b } function E(a, b, c) { return Math.min(c, Math.max(b, a)) } function F(a, b, c) { 1622 0 > c && c++; 1 < c && c--; return 1 > 6 * c ? a + 6 * (b - a) * c : 1623 1 > 2 * c ? b : 2 > 3 * c ? a + 6 * (b - a) * (2 / 3 - c) : a 1624 } function G(a) { 1625 if (a in H) return H[a]; var b, c = 1; a = String(a); if ("#" == a.charAt(0)) b = a; else if (/^rgb/.test(a)) { c = Q(a); b = "#"; for (var g, e = 0; 3 > e;
1625 e++) g = -1 != c[e].indexOf("%") ? Math.floor(255 * (parseFloat(c[e]) / 100)) : +c[e], b += v[E(g, 0, 255)]; c = +c[3] } else if (/^hsl/.test(a)) { 1626 e = c = Q(a); b = parseFloat(e[0]) / 360 % 360; 0 > b && b++; g = E(parseFloat(e[1]) / 100, 0, 1); e = E(parseFloat(e[2]) / 100, 0, 1); if (0 == g) g = e = b = e; else { var f = 0.5 > e ? e * (1 + g) : e + g - e * g, d = 2 * e - f; g = F(d, f, b + 1 / 3); e = F(d, f, b); b = F(d, f, b - 1 / 3) } b = "#" + 1627 v[Math.floor(255 * g)] + v[Math.floor(255 * e)] + v[Math.floor(255 * b)]; c = c[3] 1628 } else b = Z[a] || a; return H[a] = { color: b, alpha: c } 1629 } function C(a) { 1630 this.m_ = D(); this.mStack_ = []; this.aStack_ = []; this.currentPath_ = []; this.fillStyle = this.strokeStyle = "#000"; this.lineWidth = 1; this.lineJoin = "miter"; this.lineCap = "butt"; this.miterLimit = 1 * q; this.globalAlpha = 1; this.font = "10px sans-serif"; this.textAlign = "left"; this.textBaseline = "alphabetic"; this.canvas = a; var b = "width:" + a.clientWidth + "px;height:" + a.clientHeight + "px;overflow:hidden;position:absolute", 1631 c = a.ownerDocument.createElement("div"); c.style.cssText = b; a.appendChild(c); b = c.cloneNode(!1); b.style.backgroundColor = "red"; b.style.filter = "alpha(opacity=0)"; a.appendChild(b); this.element_ = c; this.lineScale_ = this.arcScaleY_ = this.arcScaleX_ = 1 1632 } function R(a, b, c, g) { a.currentPath_.push({ type: "bezierCurveTo", cp1x: b.x, cp1y: b.y, cp2x: c.x, cp2y: c.y, x: g.x, y: g.y }); a.currentX_ = g.x; a.currentY_ = g.y } function S(a, b) { 1633 var c = G(a.strokeStyle), g = c.color, c = c.alpha * a.globalAlpha, e = a.lineScale_ * a.lineWidth; 1 > e && (c *= e); b.push("<g_vml_:stroke", 1634 ' opacity="', c, '"', ' joinstyle="', a.lineJoin, '"', ' miterlimit="', a.miterLimit, '"', ' endcap="', $[a.lineCap] || "square", '"', ' weight="', e, 'px"', ' color="', g, '" />') 1635 } function T(a, b, c, g) { 1636 var e = a.fillStyle, f = a.arcScaleX_, d = a.arcScaleY_, k = g.x - c.x, n = g.y - c.y; if (e instanceof w) { 1637 var h = 0, l = g = 0, u = 0, m = 1; if ("gradient" == e.type_) { h = e.x1_ / f; c = e.y1_ / d; var p = s(a, e.x0_ / f, e.y0_ / d), h = s(a, h, c), h = 180 * Math.atan2(h.x - p.x, h.y - p.y) / Math.PI; 0 > h && (h += 360); 1E-6 > h && (h = 0) } else p = s(a, e.x0_, e.y0_), g = (p.x - c.x) / k, l = (p.y - c.y) / n, k /= f * q, 1638 n /= d * q, m = x.max(k, n), u = 2 * e.r0_ / m, m = 2 * e.r1_ / m - u; f = e.colors_; f.sort(function (a, b) { return a.offset - b.offset }); d = f.length; p = f[0].color; c = f[d - 1].color; k = f[0].alpha * a.globalAlpha; a = f[d - 1].alpha * a.globalAlpha; for (var n = [], r = 0; r < d; r++) { var t = f[r]; n.push(t.offset * m + u + " " + t.color) } b.push('<g_vml_:fill type="', e.type_, '"', ' method="none" focus="100%"', ' color="', p, '"', ' color2="', c, '"', ' colors="', n.join(","), '"', ' opacity="', a, '"', ' g_o_:opacity2="', k, '"', ' angle="', h, '"', ' focusposition="', g, ",", l, '" />') 1639 } else e instanceof 1640 I ? k && n && b.push("<g_vml_:fill", ' position="', -c.x / k * f * f, ",", -c.y / n * d * d, '"', ' type="tile"', ' src="', e.src_, '" />') : (e = G(a.fillStyle), b.push('<g_vml_:fill color="', e.color, '" opacity="', e.alpha * a.globalAlpha, '" />')) 1641 } function s(a, b, c) { a = a.m_; return { x: q * (b * a[0][0] + c * a[1][0] + a[2][0]) - r, y: q * (b * a[0][1] + c * a[1][1] + a[2][1]) - r } } function z(a, b, c) { 1642 isFinite(b[0][0]) && (isFinite(b[0][1]) && isFinite(b[1][0]) && isFinite(b[1][1]) && isFinite(b[2][0]) && isFinite(b[2][1])) && (a.m_ = b, c && (a.lineScale_ = aa(ba(b[0][0] * b[1][1] - b[0][1] * 1643 b[1][0])))) 1644 } function w(a) { this.type_ = a; this.r1_ = this.y1_ = this.x1_ = this.r0_ = this.y0_ = this.x0_ = 0; this.colors_ = [] } function I(a, b) { if (!a || 1 != a.nodeType || "IMG" != a.tagName) throw new A("TYPE_MISMATCH_ERR"); if ("complete" != a.readyState) throw new A("INVALID_STATE_ERR"); switch (b) { case "repeat": case null: case "": this.repetition_ = "repeat"; break; case "repeat-x": case "repeat-y": case "no-repeat": this.repetition_ = b; break; default: throw new A("SYNTAX_ERR"); } this.src_ = a.src; this.width_ = a.width; this.height_ = a.height } 1645 function A(a) { this.code = this[a];
1645 this.message = a + ": DOM Exception " + this.code } var x = Math, k = x.round, J = x.sin, K = x.cos, ba = x.abs, aa = x.sqrt, q = 10, r = q / 2; navigator.userAgent.match(/MSIE ([\d.]+)?/); var M = Array.prototype.slice; O(document); var U = { 1646 init: function (a) { a = a || document; a.createElement("canvas"); a.attachEvent("onreadystatechange", W(this.init_, this, a)) }, init_: function (a) { a = a.getElementsByTagName("canvas"); for (var b = 0; b < a.length; b++) this.initElement(a[b]) }, initElement: function (a) { 1647 if (!a.getContext) { 1648 a.getContext = 1649 V; O(a.ownerDocument); a.innerHTML = ""; a.attachEvent("onpropertychange", X); a.attachEvent("onresize", Y); var b = a.attributes; b.width && b.width.specified ? a.style.width = b.width.nodeValue + "px" : a.width = a.clientWidth; b.height && b.height.specified ? a.style.height = b.height.nodeValue + "px" : a.height = a.clientHeight 1650 } return a 1651 } 1652 }; U.init(); for (var v = [], d = 0; 16 > d; d++) for (var B = 0; 16 > B; B++) v[16 * d + B] = d.toString(16) + B.toString(16); var Z = { 1653 aliceblue: "#F0F8FF", antiquewhite: "#FAEBD7", aquamarine: "#7FFFD4", azure: "#F0FFFF", beige: "#F5F5DC", 1654 bisque: "#FFE4C4", black: "#000000", blanchedalmond: "#FFEBCD", blueviolet: "#8A2BE2", brown: "#A52A2A", burlywood: "#DEB887", cadetblue: "#5F9EA0", chartreuse: "#7FFF00", chocolate: "#D2691E", coral: "#FF7F50", cornflowerblue: "#6495ED", cornsilk: "#FFF8DC", crimson: "#DC143C", cyan: "#00FFFF", darkblue: "#00008B", darkcyan: "#008B8B", darkgoldenrod: "#B8860B", darkgray: "#A9A9A9", darkgreen: "#006400", darkgrey: "#A9A9A9", darkkhaki: "#BDB76B", darkmagenta: "#8B008B", darkolivegreen: "#556B2F", darkorange: "#FF8C00", darkorchid: "#9932CC", darkred: "#8B0000", 1655 darksalmon: "#E9967A", darkseagreen: "#8FBC8F", darkslateblue: "#483D8B", darkslategray: "#2F4F4F", darkslategrey: "#2F4F4F", darkturquoise: "#00CED1", darkviolet: "#9400D3", deeppink: "#FF1493", deepskyblue: "#00BFFF", dimgray: "#696969", dimgrey: "#696969", dodgerblue: "#1E90FF", firebrick: "#B22222", floralwhite: "#FFFAF0", forestgreen: "#228B22", gainsboro: "#DCDCDC", ghostwhite: "#F8F8FF", gold: "#FFD700", goldenrod: "#DAA520", grey: "#808080", greenyellow: "#ADFF2F", honeydew: "#F0FFF0", hotpink: "#FF69B4", indianred: "#CD5C5C", indigo: "#4B0082", 1656 ivory: "#FFFFF0", khaki: "#F0E68C", lavender: "#E6E6FA", lavenderblush: "#FFF0F5", lawngreen: "#7CFC00", lemonchiffon: "#FFFACD", lightblue: "#ADD8E6", lightcoral: "#F08080", lightcyan: "#E0FFFF", lightgoldenrodyellow: "#FAFAD2", lightgreen: "#90EE90", lightgrey: "#D3D3D3", lightpink: "#FFB6C1", lightsalmon: "#FFA07A", lightseagreen: "#20B2AA", lightskyblue: "#87CEFA", lightslategray: "#778899", lightslategrey: "#778899", lightsteelblue: "#B0C4DE", lightyellow: "#FFFFE0", limegreen: "#32CD32", linen: "#FAF0E6", magenta: "#FF00FF", mediumaquamarine: "#66CDAA", 1657 mediumblue: "#0000CD", mediumorchid: "#BA55D3", mediumpurple: "#9370DB", mediumseagreen: "#3CB371", mediumslateblue: "#7B68EE", mediumspringgreen: "#00FA9A", mediumturquoise: "#48D1CC", mediumvioletred: "#C71585", midnightblue: "#191970", mintcream: "#F5FFFA", mistyrose: "#FFE4E1", moccasin: "#FFE4B5", navajowhite: "#FFDEAD", oldlace: "#FDF5E6", olivedrab: "#6B8E23", orange: "#FFA500", orangered: "#FF4500", orchid: "#DA70D6", palegoldenrod: "#EEE8AA", palegreen: "#98FB98", paleturquoise: "#AFEEEE", palevioletred: "#DB7093", papayawhip: "#FFEFD5", 1658 peachpuff: "#FFDAB9", peru: "#CD853F", pink: "#FFC0CB", plum: "#DDA0DD", powderblue: "#B0E0E6", rosybrown: "#BC8F8F", royalblue: "#4169E1", saddlebrown: "#8B4513", salmon: "#FA8072", sandybrown: "#F4A460", seagreen: "#2E8B57", seashell: "#FFF5EE", sienna: "#A0522D", skyblue: "#87CEEB", slateblue: "#6A5ACD", slategray: "#708090", slategrey: "#708090", snow: "#FFFAFA", springgreen: "#00FF7F", steelblue: "#4682B4", tan: "#D2B48C", thistle: "#D8BFD8", tomato: "#FF6347", turquoise: "#40E0D0", violet: "#EE82EE", wheat: "#F5DEB3", whitesmoke: "#F5F5F5", yellowgreen: "#9ACD32" 1659 }, 1660 H = {}, L = {}, $ = { butt: "flat", round: "round" }, d = C.prototype; d.clearRect = function () { this.textMeasureEl_ && (this.textMeasureEl_.removeNode(!0), this.textMeasureEl_ = null); this.element_.innerHTML = "" }; d.beginPath = function () { this.currentPath_ = [] }; d.moveTo = function (a, b) { var c = s(this, a, b); this.currentPath_.push({ type: "moveTo", x: c.x, y: c.y }); this.currentX_ = c.x; this.currentY_ = c.y }; d.lineTo = function (a, b) { var c = s(this, a, b); this.currentPath_.push({ type: "lineTo", x: c.x, y: c.y }); this.currentX_ = c.x; this.currentY_ = c.y }; d.bezierCurveTo = 1661 function (a, b, c, g, e, f) { e = s(this, e, f); a = s(this, a, b); c = s(this, c, g); R(this, a, c, e) }; d.quadraticCurveTo = function (a, b, c, g) { a = s(this, a, b); c = s(this, c, g); g = { x: this.currentX_ + 2 / 3 * (a.x - this.currentX_), y: this.currentY_ + 2 / 3 * (a.y - this.currentY_) }; R(this, g, { x: g.x + (c.x - this.currentX_) / 3, y: g.y + (c.y - this.currentY_) / 3 }, c) }; d.arc = function (a, b, c, g, e, f) { 1662 c *= q; var d = f ? "at" : "wa", k = a + K(g) * c - r, n = b + J(g) * c - r; g = a + K(e) * c - r; e = b + J(e) * c - r; k != g || f || (k += 0.125); a = s(this, a, b); k = s(this, k, n); g = s(this, g, e); this.currentPath_.push({ 1663 type: d, 1664 x: a.x, y: a.y, radius: c, xStart: k.x, yStart: k.y, xEnd: g.x, yEnd: g.y 1665 }) 1666 }; d.rect = function (a, b, c, g) { this.moveTo(a, b); this.lineTo(a + c, b); this.lineTo(a + c, b + g); this.lineTo(a, b + g); this.closePath() }; d.strokeRect = function (a, b, c, g) { var e = this.currentPath_; this.beginPath(); this.moveTo(a, b); this.lineTo(a + c, b); this.lineTo(a + c, b + g); this.lineTo(a, b + g); this.closePath(); this.stroke(); this.currentPath_ = e }; d.fillRect = function (a, b, c, g) { 1667 var e = this.currentPath_; this.beginPath(); this.moveTo(a, b); this.lineTo(a + c, b); this.lineTo(a + 1668 c, b + g); this.lineTo(a, b + g); this.closePath(); this.fill(); this.currentPath_ = e 1669 }; d.createLinearGradient = function (a, b, c, g) { var e = new w("gradient"); e.x0_ = a; e.y0_ = b; e.x1_ = c; e.y1_ = g; return e }; d.createRadialGradient = function (a, b, c, g, e, f) { var d = new w("gradientradial"); d.x0_ = a; d.y0_ = b; d.r0_ = c; d.x1_ = g; d.y1_ = e; d.r1_ = f; return d }; d.drawImage = function (a, b) { 1670 var c, g, e, d, r, y, n, h; e = a.runtimeStyle.width; d = a.runtimeStyle.height; a.runtimeStyle.width = "auto"; a.runtimeStyle.height = "auto"; var l = a.width, u = a.height; a.runtimeStyle.width = 1671 e; a.runtimeStyle.height = d; if (3 == arguments.length) c = arguments[1], g = arguments[2], r = y = 0, n = e = l, h = d = u; else if (5 == arguments.length) c = arguments[1], g = arguments[2], e = arguments[3], d = arguments[4], r = y = 0, n = l, h = u; else if (9 == arguments.length) r = arguments[1], y = arguments[2], n = arguments[3], h = arguments[4], c = arguments[5], g = arguments[6], e = arguments[7], d = arguments[8]; else throw Error("Invalid number of arguments"); var m = s(this, c, g), p = []; p.push(" <g_vml_:group", ' coordsize="', 10 * q, ",", 10 * q, '"', ' coordorigin="0,0"', ' style="width:', 1672 10, "px;height:", 10, "px;position:absolute;"); if (1 != this.m_[0][0] || this.m_[0][1] || 1 != this.m_[1][1] || this.m_[1][0]) { var t = []; t.push("M11=", this.m_[0][0], ",", "M12=", this.m_[1][0], ",", "M21=", this.m_[0][1], ",", "M22=", this.m_[1][1], ",", "Dx=", k(m.x / q), ",", "Dy=", k(m.y / q), ""); var v = s(this, c + e, g), w = s(this, c, g + d); c = s(this, c + e, g + d); m.x = x.max(m.x, v.x, w.x, c.x); m.y = x.max(m.y, v.y, w.y, c.y); p.push("padding:0 ", k(m.x / q), "px ", k(m.y / q), "px 0;filter:progid:DXImageTransform.Microsoft.Matrix(", t.join(""), ", sizingmethod='clip');") } else p.push("top:", 1673 k(m.y / q), "px;left:", k(m.x / q), "px;"); p.push(' ">', '<g_vml_:image src="', a.src, '"', ' style="width:', q * e, "px;", " height:", q * d, 'px"', ' cropleft="', r / l, '"', ' croptop="', y / u, '"', ' cropright="', (l - r - n) / l, '"', ' cropbottom="', (u -
1673y - h) / u, '"', " />", "</g_vml_:group>"); this.element_.insertAdjacentHTML("BeforeEnd", p.join("")) 1674 }; d.stroke = function (a) { 1675 var b = []; b.push("<g_vml_:shape", ' filled="', !!a, '"', ' style="position:absolute;width:', 10, "px;height:", 10, 'px;"', ' coordorigin="0,0"', ' coordsize="', 10 * q, ",", 10 * q, '"', 1676 ' stroked="', !a, '"', ' path="'); for (var c = { x: null, y: null }, d = { x: null, y: null }, e = 0; e < this.currentPath_.length; e++) { 1677 var f = this.currentPath_[e]; switch (f.type) { 1678 case "moveTo": b.push(" m ", k(f.x), ",", k(f.y)); break; case "lineTo": b.push(" l ", k(f.x), ",", k(f.y)); break; case "close": b.push(" x "); f = null; break; case "bezierCurveTo": b.push(" c ", k(f.cp1x), ",", k(f.cp1y), ",", k(f.cp2x), ",", k(f.cp2y), ",", k(f.x), ",", k(f.y)); break; case "at": case "wa": b.push(" ", f.type, " ", k(f.x - this.arcScaleX_ * f.radius), ",", k(f.y - this.arcScaleY_ * 1679 f.radius), " ", k(f.x + this.arcScaleX_ * f.radius), ",", k(f.y + this.arcScaleY_ * f.radius), " ", k(f.xStart), ",", k(f.yStart), " ", k(f.xEnd), ",", k(f.yEnd)) 1680 } if (f) { if (null == c.x || f.x < c.x) c.x = f.x; if (null == d.x || f.x > d.x) d.x = f.x; if (null == c.y || f.y < c.y) c.y = f.y; if (null == d.y || f.y > d.y) d.y = f.y } 1681 } b.push(' ">'); a ? T(this, b, c, d) : S(this, b); b.push("</g_vml_:shape>"); this.element_.insertAdjacentHTML("beforeEnd", b.join("")) 1682 }; d.fill = function () { this.stroke(!0) }; d.closePath = function () { this.currentPath_.push({ type: "close" }) }; d.save = function () { 1683 var a = 1684 {}; P(this, a); this.aStack_.push(a); this.mStack_.push(this.m_); this.m_ = t(D(), this.m_) 1685 }; d.restore = function () { this.aStack_.length && (P(this.aStack_.pop(), this), this.m_ = this.mStack_.pop()) }; d.translate = function (a, b) { z(this, t([[1, 0, 0], [0, 1, 0], [a, b, 1]], this.m_), !1) }; d.rotate = function (a) { var b = K(a); a = J(a); z(this, t([[b, a, 0], [-a, b, 0], [0, 0, 1]], this.m_), !1) }; d.scale = function (a, b) { this.arcScaleX_ *= a; this.arcScaleY_ *= b; z(this, t([[a, 0, 0], [0, b, 0], [0, 0, 1]], this.m_), !0) }; d.transform = function (a, b, c, d, e, f) { 1686 z(this, t([[a, 1687 b, 0], [c, d, 0], [e, f, 1]], this.m_), !0) 1688 }; d.setTransform = function (a, b, c, d, e, f) { z(this, [[a, b, 0], [c, d, 0], [e, f, 1]], !0) }; d.drawText_ = function (a, b, c, d, e) { 1689 var f = this.m_; d = 0; var r = 1E3, t = 0, n = [], h; h = this.font; if (L[h]) h = L[h]; else { var l = document.createElement("div").style; try { l.font = h } catch (u) { } h = L[h] = { style: l.fontStyle || "normal", variant: l.fontVariant || "normal", weight: l.fontWeight || "normal", size: l.fontSize || 10, family: l.fontFamily || "sans-serif" } } var l = h, m = this.element_; h = {}; for (var p in l) h[p] = l[p]; p = parseFloat(m.currentStyle.fontSize); 1690 m = parseFloat(l.size); "number" == typeof l.size ? h.size = l.size : -1 != l.size.indexOf("px") ? h.size = m : -1 != l.size.indexOf("em") ? h.size = p * m : -1 != l.size.indexOf("%") ? h.size = p / 100 * m : -1 != l.size.indexOf("pt") ? h.size = m / 0.75 : h.size = p; h.size *= 0.981; p = h.style + " " + h.variant + " " + h.weight + " " + h.size + "px " + h.family; m = this.element_.currentStyle; l = this.textAlign.toLowerCase(); switch (l) { 1691 case "left": case "center": case "right": break; case "end": l = "ltr" == m.direction ? "right" : "left"; break; case "start": l = "rtl" == m.direction ? "right" : 1692 "left"; break; default: l = "left" 1693 } switch (this.textBaseline) { case "hanging": case "top": t = h.size / 1.75; break; case "middle": break; default: case null: case "alphabetic": case "ideographic": case "bottom": t = -h.size / 2.25 } switch (l) { case "right": d = 1E3; r = 0.05; break; case "center": d = r = 500 } b = s(this, b + 0, c + t); n.push('<g_vml_:line from="', -d, ' 0" to="', r, ' 0.05" ', ' coordsize="100 100" coordorigin="0 0"', ' filled="', !e, '" stroked="', !!e, '" style="position:absolute;width:1px;height:1px;">'); e ? S(this, n) : T(this, n, { x: -d, y: 0 }, 1694 { x: r, y: h.size }); e = f[0][0].toFixed(3) + "," + f[1][0].toFixed(3) + "," + f[0][1].toFixed(3) + "," + f[1][1].toFixed(3) + ",0,0"; b = k(b.x / q) + "," + k(b.y / q); n.push('<g_vml_:skew on="t" matrix="', e, '" ', ' offset="', b, '" origin="', d, ' 0" />', '<g_vml_:path textpathok="true" />', '<g_vml_:textpath on="true" string="', N(a), '" style="v-text-align:', l, ";font:", N(p), '" /></g_vml_:line>'); this.element_.insertAdjacentHTML("beforeEnd", n.join("")) 1695 }; d.fillText = function (a, b, c, d) { this.drawText_(a, b, c, d, !1) }; d.strokeText = function (a, 1696 b, c, d) { this.drawText_(a, b, c, d, !0) }; d.measureText = function (a) { this.textMeasureEl_ || (this.element_.insertAdjacentHTML("beforeEnd", '<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>'), this.textMeasureEl_ = this.element_.lastChild); var b = this.element_.ownerDocument; this.textMeasureEl_.innerHTML = ""; this.textMeasureEl_.style.font = this.font; this.textMeasureEl_.appendChild(b.createTextNode(a)); return { width: this.textMeasureEl_.offsetWidth } }; d.clip = function () { }; 1697 d.arcTo = function () { }; d.createPattern = function (a, b) { return new I(a, b) }; w.prototype.addColorStop = function (a, b) { b = G(b);
1697 this.colors_.push({ offset: a, color: b.color, alpha: b.alpha }) }; d = A.prototype = Error(); d.INDEX_SIZE_ERR = 1; d.DOMSTRING_SIZE_ERR = 2; d.HIERARCHY_REQUEST_ERR = 3; d.WRONG_DOCUMENT_ERR = 4; d.INVALID_CHARACTER_ERR = 5; d.NO_DATA_ALLOWED_ERR = 6; d.NO_MODIFICATION_ALLOWED_ERR = 7; d.NOT_FOUND_ERR = 8; d.NOT_SUPPORTED_ERR = 9; d.INUSE_ATTRIBUTE_ERR = 10; d.INVALID_STATE_ERR = 11; d.SYNTAX_ERR = 12; d.INVALID_MODIFICATION_ERR = 1698 13; d.NAMESPACE_ERR = 14; d.INVALID_ACCESS_ERR = 15; d.VALIDATION_ERR = 16; d.TYPE_MISMATCH_ERR = 17; G_vmlCanvasManager = U; CanvasRenderingContext2D = C; CanvasGradient = w; CanvasPattern = I; DOMException = A 1699}(); 1700 1701/* 1702 CanvasJS jQuery Charting Plugin - https://canvasjs.com/ 1703 Copyright 2017 fenopix 1704 1705 --------------------- License Information -------------------- 1706 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. 1707 https://canvasjs.com/license-canvasjs/ 1708 1709*/ 1710(function (b, c, d, e) { b.fn.CanvasJSChart = function (a) { if (a) { var b = this.first(); a = new CanvasJS.Chart(this[0], a); b.children(".canvasjs-chart-container").data("canvasjsChartRef", a); a.render(); return this } return this.first().children(".canvasjs-chart-container").data("canvasjsChartRef") } })(jQuery, window, document);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.