1/* 2 CanvasJS jQuery Chart Plugin - https://canvasjs.com/ 3 Copyright 2024 fenopix 4 5*/ 6(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); 7 8/* 9 CanvasJS Chart - v3.8.8 GA - https://canvasjs.com/ 10 Copyright 2024 fenopix 11 12 --------------------- License Information -------------------- 13 CanvasJS Chart 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. 14 https://canvasjs.com/license/ 15 16 17 ---------------------Free for Non-Commercial Use-------------------- 18 19 For non-commercial purposes you can use the software for free under Creative Commons Attribution-NonCommercial 3.0 License. 20 A credit Link is added to the chart which should be preserved. Refer to the following link for further details on the same. 21 https://creativecommons.org/licenses/by-nc/3.0/deed.en_US 22 */ 23 24/*tslint:disable*/ 25/*eslint-disable*/ 26/*jshint ignore:start*/ 27(function () { 28 function qa(d, l) { d.prototype = eb(l.prototype); d.prototype.constructor = d; d.base = l.prototype } function eb(d) { function l() { } l.prototype = d; return new l } function Za(d, l, S) { 29 "millisecond" === S ? d.setMilliseconds(d.getMilliseconds() + 1 * l) : "second" === S ? d.setSeconds(d.getSeconds() + 1 * l) : "minute" === S ? d.setMinutes(d.getMinutes() + 1 * l) : "hour" === S ? d.setHours(d.getHours() + 1 * l) : "day" === S ? d.setDate(d.getDate() + 1 * l) : "week" === S ? d.setDate(d.getDate() + 7 * l) : "month" === S ? d.setMonth(d.getMonth() + 1 * l) : "year" === S && d.setFullYear(d.getFullYear() + 30 1 * l); return d 31 } function da(d, l) { var S = !1; 0 > d && (S = !0, d *= -1); d = "" + d; for (l = l ? l : 1; d.length < l;)d = "0" + d; return S ? "-" + d : d } function Ha(d) { if (!d) return d; d = d.replace(/^\s\s*/, ""); for (var l = /\s/, S = d.length; l.test(d.charAt(--S));); return d.slice(0, S + 1) } function Aa(d) { 32 d.roundRect = function (d, S, n, v, sa, D, t, A) { 33 t && (this.fillStyle = t); A && (this.strokeStyle = A); "undefined" === typeof sa && (sa = 5); this.lineWidth = D; this.beginPath(); this.moveTo(d + sa, S); this.lineTo(d + n - sa, S); this.quadraticCurveTo(d + n, S, d + n, S + sa); this.lineTo(d + 34 n, S + v - sa); this.quadraticCurveTo(d + n, S + v, d + n - sa, S + v); this.lineTo(d + sa, S + v); this.quadraticCurveTo(d, S + v, d, S + v - sa); this.lineTo(d, S + sa); this.quadraticCurveTo(d, S, d + sa, S); this.closePath(); t && this.fill(); A && 0 < D && this.stroke() 35 } 36 } function Ta(d, l) { return d - l } function O(d) { var l = ((d & 16711680) >> 16).toString(16), S = ((d & 65280) >> 8).toString(16); d = ((d & 255) >> 0).toString(16); l = 2 > l.length ? "0" + l : l; S = 2 > S.length ? "0" + S : S; d = 2 > d.length ? "0" + d : d; return "#" + l + S + d } function fb(d, l) { 37 var S = this.length >>> 0, n = Number(l) || 0, n = 0 > n ? Math.ceil(n) : 38 Math.floor(n); for (0 > n && (n += S); n < S; n++)if (n in this && this[n] === d) return n; return -1 39 } function n(d) { return null === d || "undefined" === typeof d } function Ea(d) { d.indexOf || (d.indexOf = fb); return d } function gb(d) { if (wa.fSDec) d[ja("`eeDwdouMhrudods")](ja("e`u`@ohl`uhnoHuds`uhnoDoe"), function () { wa._fTWm && wa._fTWm(d) }) } function $a(d, l, n) { 40 n = n || "normal"; var v = d + "_" + l + "_" + n, $ = ab[v]; if (isNaN($)) { 41 try { 42 if (!ya) { 43 var sa = document.body; ya = document.createElement("span"); ya.innerHTML = ""; var D = document.createTextNode("Mpgyi"); 44 ya.appendChild(D); sa.appendChild(ya) 45 } ya.style.display = ""; L(ya, { position: "absolute", left: "0px", top: "-20000px", padding: "0px", margin: "0px", border: "none", whiteSpace: "pre", lineHeight: "normal", fontFamily: d, fontSize: l + "px", fontWeight: n }); $ = Math.round(ya.offsetHeight); ya.style.display = "none" 46 }
46 catch (t) { $ = Math.ceil(1.1 * l) } $ = Math.max($, l); ab[v] = $ 47 } return $ 48 } function H(d, l) { 49 var n = []; if (n = { 50 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, 51 2, 1, 2], longDash: [8, 2], longDashDot: [8, 2, 1, 2], longDashDotDot: [8, 2, 1, 2, 1, 2] 52 }[d || "solid"]) for (var v = 0; v < n.length; v++)n[v] *= l; else n = []; return n 53 } function J(d, l, S, v, $) { 54 v = v || []; $ = n($) ? hb ? { passive: !1, capture: !1 } : !1 : $; v.push([d, l, S, $]); return d.addEventListener ? (d.addEventListener(l, S, $), S) : d.attachEvent ? (v = function (l) { l = l || window.event; l.preventDefault = l.preventDefault || function () { l.returnValue = !1 }; l.stopPropagation = l.stopPropagation || function () { l.cancelBubble = !0 }; S.call(d, l) }, d.attachEvent("on" + l, v), v) : 55 !1 56 } function ib(d) { 57 if (d._menuButton) d.exportEnabled ? (L(d._menuButton, { backgroundColor: d.toolbar.itemBackgroun
57dColor, color: d.toolbar.fontColor }), Ma(d._menuButton), ta(d, d._menuButton, "menu"), 0 >= navigator.userAgent.search("MSIE") && d._menuButton.childNodes[0] && L(d._menuButton.childNodes[0], { WebkitFilter: "invert(0%)", filter: "invert(0%)" })) : xa(d._menuButton); else if (d.exportEnabled && v) { 58 var l = !1; d._menuButton = document.createElement("button"); ta(d, d._menuButton, "menu"); d._toolBar.appendChild(d._menuButton); 59 J(d._menuButton, "touchstart", function (d) { l = !0 }, d.allDOMEventHandlers); J(d._menuButton, "click", function () { "none" !== d._dropdownMenu.style.display || d._dropDownCloseTime && 500 >= (new Date).getTime() - d._dropDownCloseTime.getTime() || (d._dropdownMenu.style.display = "block", d._menuButton.blur(), d._dropdownMenu.focus()) }, d.allDOMEventHandlers, !0); J(d._menuButton, "mousemove", function () { 60 l || (L(d._menuButton, { backgroundColor: d.toolbar.itemBackgroundColorOnHover, color: d.toolbar.fontColorOnHover }), 0 >= navigator.userAgent.search("MSIE") && 61 L(d._menuButton.childNodes[0], { WebkitFilter: "invert(100%)", filter: "invert(100%)" })) 62 }, d.allDOMEventHandlers, !0); J(d._menuButton, "mouseout", function () { l || (L(d._menuButton, { backgroundColor: d.toolbar.itemBackgroun
62dColor, color: d.toolbar.fontColor }), 0 >= navigator.userAgent.search("MSIE") && L(d._menuButton.childNodes[0], { WebkitFilter: "invert(0%)", filter: "invert(0%)" })) }, d.allDOMEventHandlers, !0) 63 } if (d.exportEnabled && d._dropdownMenu) { 64 var n = d.theme && -1 !== d.theme.indexOf("dark") ? "black" : "#888888"; L(d._dropdownMenu, 65 { backgroundColor: d.toolbar.itemBackgroundColor, color: d.toolbar.fontColor, boxShadow: "2px 2px 10px " + n }); for (var n = d._dropdownMenu.childNodes, V = [d._cultureInfo.printText, d._cultureInfo.saveJPGText, d._cultureInfo.savePNGText], $ = 0; $ < V.length; $++)L(n[$], { backgroundColor: d.toolbar.itemBackgroundColor, color: d.toolbar.fontColor }), n[$].innerHTML = V[$] 66 } else !d._dropdownMenu && (d.exportEnabled && v) && (l = !1, d._dropdownMenu = document.createElement("div"), d._dropdownMenu.setAttribute("tabindex", -1), n = d.theme && -1 !== d.theme.indexOf("dark") ? 67 "black" : "#888888", L(d._dropdownMenu, { position: "absolute", zIndex: 1, userSelect: "none", MozUserSeelct: "none", WebkitUserSelect: "none", msUserSelect: "none", cursor: "pointer", right: "0px", top: "25px", minWidth: "120px", outline: 0, fontSize: "14px", fontFamily: "Arial, Helvetica, sans-serif", padding: "5px 0px 5px 0px", textAlign: "left", lineHeight: "10px", backgroundColor: d.toolbar.itemBackgroun
67dColor, boxShadow: "2px 2px 10px " + n }), d._dropdownMenu.style.display = "none", d._toolBar.appendChild(d._dropdownMenu), J(d._dropdownMenu, 68 "blur", function () { xa(d._dropdownMenu); d._dropDownCloseTime = new Date }, d.allDOMEventHandlers, !0), n = document.createElement("div"), L(n, { padding: "12px 8px 12px 8px" }), n.innerHTML = d._cultureInfo.printText, n.style.backgroundColor = d.toolbar.itemBackgroundColor, n.style.color = d.toolbar.fontColor, d._dropdownMenu.appendChild(n), J(n, "touchstart", function (d) { l = !0 }, d.allDOMEventHandlers), J(n, "mousemove", function () { l || (this.style.backgroundColor = d.toolbar.itemBackgroundColorOnHover, this.style.color = d.toolbar.fontColorOnHover) }, 69 d.allDOMEventHandlers, !0), J(n, "mouseout", function () { l || (this.style.backgroundColor = d.toolbar.itemBackgroundColor, this.style.color = d.toolbar.fontColor) }, d.allDOMEventHandlers, !0), J(n, "click", function () { d.print(); xa(d._dropdownMenu) }, d.allDOMEventHandlers, !0), n = document.createElement("div"), L(n, { padding: "12px 8px 12px 8px" }), n.innerHTML = d._cultureInfo.saveJPGText, n.style.backgroundColor = d.toolbar.itemBackgroun
69dColor, n.style.color = d.toolbar.fontColor, d._dropdownMenu.appendChild(n), J(n, "touchstart", function (d) { 70 l = 71 !0 72 }, d.allDOMEventHandlers), J(n, "mousemove", function () { l || (this.style.backgroundColor = d.toolbar.itemBackgroundColorOnHover, this.style.color = d.toolbar.fontColorOnHover) }, d.allDOMEventHandlers, !0), J(n, "mouseout", function () { l || (this.style.backgroundColor = d.toolbar.itemBackgroundColor, this.style.color = d.toolbar.fontColor) }, d.allDOMEventHandlers, !0), J(n, "click", function () { d.exportChart({ format: "jpeg", fileName: d.exportFileName }); xa(d._dropdownMenu) }, d.allDOMEventHandlers, !0), n = document.createElement("div"), 73 L(n, { padding: "12px 8px 12px 8px" }), n.innerHTML = d._cultureInfo.savePNGText, n.style.backgroundColor = d.toolbar.itemBackgroundColor, n.style.color = d.toolbar.fontColor, d._dropdownMenu.appendChild(n), J(n, "touchstart", function (d) { l = !0 }, d.allDOMEventHandlers), J(n, "mousemove", function () { l || (this.style.backgroundColor = d.toolbar.itemBackgroun
73dColorOnHover, this.style.color = d.toolbar.fontColorOnHover) }, d.allDOMEventHandlers, !0), J(n, "mouseout", function () { 74 l || (this.style.backgroundColor = d.toolbar.itemBackgroundColor, 75 this.style.color = d.toolbar.fontColor) 76 }, d.allDOMEventHandlers, !0), J(n, "click", function () { d.exportChart({ format: "png", fileName: d.exportFileName }); xa(d._dropdownMenu) }, d.allDOMEventHandlers, !0)) 77 } function bb(d, l, n) { d *= ma; l *= ma; d = n.getImageData(d, l, 2, 2).data; l = !0; for (n = 0; 4 > n; n++)if (d[n] !== d[n + 4] | d[n] !== d[n + 8] | d[n] !== d[n + 12]) { l = !1; break } return l ? d[0] << 16 | d[1] << 8 | d[2] : 0 } function na(d, l, n) { return d in l ? l[d] : n[d] } function Na(d, l, S, V) { 78 v && cb ? (V = !n(V) && V ? d.getContext("2d", { willReadFrequently: !0 }) : d.getContext("2d"), 79 Oa = V.webkitBackingStorePixelRatio || V.mozBackingStorePixelRatio || V.msBackingStorePixelRatio || V.oBackingStorePixelRatio || V.backingStorePixelRatio || 1, ma = Ua / Oa, d.width = l * ma, d.height = S * ma, Ua !== Oa && (d.style.width = l + "px", d.style.height = S + "px", V.scale(ma, ma))) : (d.width = l, d.height = S) 80 } function jb(d) { 81 if (!kb) { 82 var l = !1, n = !1; "undefined" === typeof ra.Chart.creditHref ? (d.creditHref = ja("iuuqr;..b`ow`rkr/bnl."), d.creditText = ja("B`ow`rKR/bnl")) : (l = d.updateOption("creditText"), n = d.updateOption("creditHref")); if (d.creditHref && 83 d.creditText) { 84 d._creditLink || (d._creditLink = document.createElement("a"), d._creditLink.setAttribute("class", "canvasjs-chart-credit"), d._creditLink.setAttribute("title", "JavaScript Charts"), L(d._creditLink, { outline: "none", margin: "0px", position: "absolute", right: "2px", top: d.height - 14 + "px", color: "dimgrey", textDecoration: "none", fontSize: "11px", fontFamily: "Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif" }), d._creditLink.setAttribute("tabIndex", -1), d._creditLink.setAttribute("target", "_blank")); 85 if (0 === d.renderCount || l || n) d._creditLink.setAttribute("href", d.creditHref), d._creditLink.innerHTML = d.creditText; d._creditLink && d.creditHref && d.creditText ? (d._creditLink.parentElement || d._canvasJSContainer.appendChild(d._creditLink), d._creditLink.style.top = d.height - 14 + "px") : d._creditLink.parentElement && d._canvasJSContainer.removeChild(d._creditLink) 86 } 87 } 88 } function va(d, l, n) { 89 Ia && (this.canvasCount |= 0, window.console.log(++this.canvasCount)); var V = document.createElement("canvas"); V.setAttribute("class", "canvasjs-chart-canvas"); 90 Na(V, d, l, n); v || "undefined" === typeof G_vmlCanvasManager || G_vmlCanvasManager.initElement(V); return V 91 } function L(d, l) { for (var n in l) d.style[n] = l[n] } function ta(d, l, n) { 92 l.getAttribute("state") || (l.style.backgroundColor = d.toolbar.itemBackgroun
92dColor, l.style.color = d.toolbar.fontColor, l.style.border = "none", L(l, { WebkitUserSelect: "none", MozUserSelect: "none", msUserSelect: "none", userSelect: "none" })); l.getAttribute("state") !== n && (l.setAttribute("state", n), l.setAttribute("type", "button"), L(l, { 93 padding: "5px 12px", 94 cursor: "pointer", "float": "left", width: "40px", height: "25px", outline: "0px", verticalAlign: "baseline", lineHeight: "0" 95 }), l.innerHTML = "<img src='" + lb[n].image + "' alt='" + d._cultureInfo[n + "Text"] + "' />", L(l.childNodes[0], { height: "95%", pointerEvents: "none" })); l.setAttribute("title", d._cultureInfo[n + "Text"]) 96 } function Ma() { for (var d = null, l = 0; l < arguments.length; l++)d = arguments[l], d.style && (d.style.display = "inline") } function xa() { 97 for (var d = null, l = 0; l < arguments.length; l++)(d = arguments[l]) && d.style && (d.style.display = 98 "none") 99 } function Va(d, l, n, v, $) { if (null === d || "undefined" === typeof d) return "undefined" === typeof n ? l : n; d = parseFloat(d.toString()) * (0 <= d.toString().indexOf("%") ? l / 100 : 1); "undefined" !== typeof v && (d = Math.min(v, d), "undefined" !== typeof $ && (d = Math.max($, d))); return !isNaN(d) && d <= l && 0 <= d ? d : "undefined" === typeof n ? l : n } function Z(d, l, v, V, $) { 100 this._defaultsKey = d; this._themeOptionsKey = l; this._index = V; this.parent = $; this._eventListeners = []; d = {}; this.theme && n(this.parent) && n(l) && n(V) ? d = n(this.predefinedThemes[this.theme]) ? 101 this.predefinedThemes.light1 : this.predefinedThemes[this.theme] : this.parent && (this.parent.themeOptions && this.parent.themeOptions[l]) && (null === V ? d = this.parent.themeOptions[l] : 0 < this.parent.themeOptions[l].length && (V = Math.min(this.parent.themeOptions[l].length - 1, V), d = this.parent.themeOptions[l][V])); this.themeOptions = d; this.options = v ? v : { _isPlaceholder: !0 }; this.setOptions(this.options, d) 102 } function Fa(d, l, n, v, $) { 103 "undefined" === typeof $ && ($ = 0); this._padding = $; this._x1 = d; this._y1 = l; this._x2 = n; this._y2 = v; this._rightOccupied = 104 this._leftOccupied = this._bottomOccupied = this._topOccupied = this._padding 105 } function ka(d, l) { ka.base.constructor.call(this, "TextBlock", null, l, null, null); this.ctx = d; this._isDirty = !0; this._wrappedText = null; this._initialize() } function Wa(d, l) { Wa.base.constructor.call(this, "Toolbar", "toolbar", l, null, d); this.chart = d; this.canvas = d.canvas; this.ctx = this.chart.ctx; this.optionsName = "toolbar" } function Ba(d, l) { 106 Ba.base.constructor.call(this, "Title", "title", l, null, d); this.chart = d; this.canvas = d.canvas; this.ctx = this.chart.ctx; 107 this.optionsName = "title"; if (n(this.options.margin) && d.options.subtitles) for (var v = d.options.subtitles, V = 0; V < v.length; V++)if ((n(v[V].horizontalAlign) && "center" === this.horizontalAlign || v[V].horizontalAlign === this.horizontalAlign) && (n(v[V].verticalAlign) && "top" === this.verticalAlign || v[V].verticalAlign === this.verticalAlign) && !v[V].dockInsidePlotArea === !this.dockInsidePlotArea) { this.margin = 0; break } "undefined" === typeof this.options.fontSize && (this.fontSize = this.chart.getAutoFontSize(this.fontSize)); this.height = 108 this.width = null; this.bounds = { x1: null, y1: null, x2: null, y2: null } 109 } function Ja(d, l, n) { Ja.base.constructor.call(this, "Subtitle", "subtitles", l, n, d); this.chart = d; this.canvas = d.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 Xa() { this.pool = [] } function Ka(d) { 110 var l; d && La[d] && (l = La[d]); Ka.base.constructor.call(this, 111 "CultureInfo", null, l, null, null) 112 } var Ia = !1, wa = {}, v = !!document.createElement("canvas").getContext, ra = { 113 Chart: { 114 width: 500, height: 400, zoomEnabled: !1, zoomType: "x", backgroundColor: "white", theme: "light1", animationEnabled: !1, animationDuration: 1200, dataPointWidth: null, dataPointMinWidth: null, dataPointMaxWidth: null, colorSet
114: "colorSet1", culture: "en", creditHref: "", creditText: "CanvasJS", interactivityEnabled: !0, exportEnabled: !1, exportFileName: "Chart", rangeChanging: null, rangeChanged: null, publicProperties: { 115 title: "readWrite", 116 subtitles: "readWrite", toolbar: "readWrite", toolTip: "readWrite", legend: "readWrite", axisX: "readWrite", axisY: "readWrite", axisX2: "readWrite", axisY2: "readWrite", data: "readWrite", options: "readWrite", bounds: "readOnly", container: "readOnly", selectedColorSet: "readOnly" 117 } 118 }, Title: { 119 padding: 0, text: null, verticalAlign: "top", horizontalAlign: "center", fontSize: 20, fontFamily: "Calibri", fontWeight: "normal", fontColor: "black", fontStyle: "normal", borderThickness: 0, borderColor: "black", cornerRadius: 0, backgroundColor: v ? "transparent" : 120 null, margin: 5, wrap: !0, maxWidth: null, dockInsidePlotArea: !1, publicProperties: { options: "readWrite", bounds: "readOnly", chart: "readOnly" } 121 }, Subtitle: { padding: 0, text: null, verticalAlign: "top", horizontalAlign: "center", fontSize: 14, fontFamily: "Calibri", fontWeight: "normal", fontColor: "black", fontStyle: "normal", borderThickness: 0, borderColor: "black", cornerRadius: 0, backgroundColor: null, margin: 2, wrap: !0, maxWidth: null, dockInsidePlotArea: !1, publicProperties: { options: "readWrite", bounds: "readOnly", chart: "readOnly" } }, Toolbar: {
122 itemBackgroundColor: "white", 123 itemBackgroundColorOnHover: "#2196f3", buttonBorderColor: "#2196f3", buttonBorderThickness: 1, fontColor: "black", fontColorOnHover: "white", publicProperties: { options: "readWrite", chart: "readOnly" } 124 }, Legend: { 125 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: v ? "transparent" : null, borderColor: v ? 126 "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" } 127 }, ToolTip: { 128 enabled: !0, shared: !1, animationEnabled: !0, content: null, contentFormatter: null, reversed: !1, backgroundColor: v ? "rgba(255,255,255,.9)" : "rgb(255,255,255)", borderColor: null, borderThickness: 2, cornerRadius: 5, fontSize: 14, fontColor: "black", fontFamily: "Calibri, Arial, Georgia, serif;", 129 fontWeight: "normal", fontStyle: "italic", updated: null, hidden: null, publicProperties: { options: "readWrite", chart: "readOnly" } 130 }, Axis: { 131 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: v ? "transparent" : null, titleBorderColor: v ? "transparent" : 132 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: v ? "transparent" : null, labelBorderColor: v ? "transparent" : null, labelBorderThickness: 0, labelCornerRadius: 0, labelPlacement: "outside", labelTextAlign: "left", prefix: "", suffix: "", includeZero: !1, tickLength: 5, tickColor: "black", tickThickness: 1, tickPlacement: "outside", 133 lineColor: "black", lineThickness: 1, lineDashType: "solid", gridColor: "#A0A0A0", gridThickness: 0, gridDashType: "solid", interlacedColor: v ? "transparent" : null, valueFormatString: null, margin: 2, publicProperties: { options: "readWrite", stripLines: "readWrite", scaleBreaks: "readWrite", crosshair: "readWrite", bounds: "readOnly", chart: "readOnly" } 134 }, StripLine: { 135 value: null, startValue: null, endValue: null, color: "orange", opacity: null, thickness: 2, lineDashType: "solid", label: "", labelPlacement: "inside", labelAlign: "far", labelWrap: !0, 136 labelMaxWidth: null, labelBackgroundColor: null, labelBorderColor: v ? "transparent" : null, labelBorderThickness: 0, labelCornerRadius: 0, labelFontFamily: "arial", labelFontColor: "orange", labelFontSize: 12, labelFontWeight: "normal", labelFontStyle: "normal", labelFormatter: null, showOnTop: !1, publicProperties: { options: "readWrite", axis: "readOnly", bounds: "readOnly", chart: "readOnly" } 137 }, ScaleBreaks: { 138 autoCalculate: !1, collapsibleThreshold: "25%", maxNumberOfAutoBreaks: 2, spacing: 8, type: "straight", color: "#FFFFFF", fillOpacity: 0.9, 139 lineThickness: 2, lineColor: "#E16E6E", lineDashType: "solid", publicProperties: { options: "readWrite", customBreaks: "readWrite", axis: "readOnly", autoBreaks: "readOnly", bounds: "readOnly", chart: "readOnly" } 140 }, Break: { startValue: null, endValue: null, spacing: 8, type: "straight", color: "#FFFFFF", fillOpacity: 0.9, lineThickness: 2, lineColor: "#E16E6E", lineDashType: "solid", publicProperties: { options: "readWrite", scaleBreaks: "readOnly", bounds: "readOnly", chart: "readOnly" } }, Crosshair: { 141 enabled: !1, snapToDataPoint: !1, color: "grey", opacity: null, 142 thickness: 2, lineDashType: "solid", label: "", labelWrap: !0, labelMaxWidth: null, labelBackgroun
142dColor: v ? "grey" : null, labelBorderColor: v ? "grey" : null, labelBorderThickness: 0, labelCornerRadius: 0, labelFontFamily: v ? "Calibri, Optima, Candara, Verdana, Geneva, sans-serif" : "calibri", labelFontSize: 12, labelFontColor: "#fff", labelFontWeight: "normal", labelFontStyle: "normal", labelFormatter: null, valueFormatString: null, updated: null, hidden: null, publicProperties: { options: "readWrite", axis: "readOnly", bounds: "readOnly", chart: "readOnly" } 143 }, 144 DataSeries: { 145 name: null, dataPoints: null, label: "", bevelEnabled: !1, highlightEnabled: !0, cursor: "default", indexLabel: "", indexLabelPlacement: "auto", indexLabelOrientation: "horizontal", indexLabelTextAlign: "left", indexLabelFontColor: "black", indexLabelFontSize: 12, indexLabelFontStyle: "normal", indexLabelFontFamily: "Arial", indexLabelFontWeight: "normal", indexLabelBackgroundColor: null, indexLabelLineColor: "gray", indexLabelLineThickness: 1, indexLabelLineDashType: "solid", indexLabelMaxWidth: null, indexLabelWrap: !0, indexLabelFormatter: null, 146 lineThickness: 2, lineDashType: "solid", connectNullData: !1, nullDataLineDashType: "dash", color: null, lineColor: null, risingColor: "white", fallingColor: "red", fillOpacity: null, startAngle: 0, radius: null, innerRadius: null, explodeOnClick: !0, neckHeight: null, neckWidth: null, reversed: !1, valueRepresents: null, linkedDataSeriesIndex: null, whiskerThickness: 2, whiskerDashType: "solid", whiskerColor: null, whiskerLength: null, stemThickness: 2, stemColor: null, stemDashType: "solid", upperBoxColor: "white", lowerBoxColor: "white", type: "column", 147 xValueType: "number", axisXType: "primary", axisYType: "primary", axisXIndex: 0, axisYIndex: 0, xValueFormatString: null, yValueFormatString: null, zValueFormatString: null, percentFormatString: null, showInLegend: !1, legendMarkerType: null, legendMarkerColor: null, legendText: null, legendMarkerBorderColor: v ? "transparent" : null, legendMarkerBorderThickness: 0, markerType: "circle", markerColor: null, markerSize: null, markerBorderColor: v ? "transparent" : null, markerBorderThickness: 0, mouseover: null, mouseout: null, mousemove: null, click: null, 148 toolTipContent: null, visible: !0, publicProperties: { options: "readWrite", axisX: "readWrite", axisY: "readWrite", chart: "readOnly" } 149 }, TextBlock: { x: 0, y: 0, width: null, height: null, maxWidth: null, maxHeight: null, padding: 0, angle: 0, text: "", horizontalAlign: "center", textAlign: "left", fontSize: 12, fontFamily: "calibri", fontWeight: "normal", fontColor: "black", fontStyle: "normal", borderThickness: 0, borderColor: "black", cornerRadius: 0, backgroundColor: null, textBaseline: "top" }, CultureInfo: { 150 decimalSeparator: ".", digitGroupSeparator: ",", 151 zoomText: "Zoom", panText: "Pan", resetText: "Reset", menuText: "More Options", saveJPGText: "Save as JPEG", savePNGText: "Save as PNG", printText: "Print", days: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), shortDays: "Sun Mon Tue Wed Thu Fri Sat".split(" "), months: "January February March April May June July August September October November December".split(" "), shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ") 152 } 153 }, La = { en: {} }, t = v ? "Trebuchet MS, Helvetica, sans-serif" : 154 "Arial", Ga = v ? "Impact, Charcoal, sans-serif" : "Arial", Ca = { colorSet1: "#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #7F6084 #77A033 #33558B #E59566".split(" "), colorSet2: "#6D78AD #51CDA0 #DF7970 #4C9CA0 #AE7D99 #C9D45C #5592AD #DF874D #52BCA8 #8E7AA3 #E3CB64 #C77B85 #C39762 #8DD17E #B57952 #FCC26C".split(" "), colorSet3: "#8CA1BC #36845C #017E82 #8CB9D0 #708C98 #94838D #F08891 #0366A7 #008276 #EE7757 #E5BA3A #F2990B #03557B #782970".split(" ") }, R, ca, W, ia, X; ca = "#333333"; W = "#000000"; R = "#666666"; 155 X = ia = "#000000"; var ea = 20, A = 14, Ya = { 156 colorSet: "colorSet1", backgroundColor: "#FFFFFF", title: { fontFamily: Ga, fontSize: 32, fontColor: ca, fontWeight: "normal", verticalAlign: "top", margin: 5 }, subtitles: [{ fontFamily: Ga, fontSize: A, fontColor: ca, fontWeight: "normal", verticalAlign: "top", margin: 5 }], data: [{ indexLabelFontFamily: t, indexLabelFontSize: A, indexLabelFontColor: ca, indexLabelFontWeight: "normal", indexLabelLineThickness: 1 }], axisX: [{ 157 titleFontFamily: t, titleFontSize: ea, titleFontColor: ca, titleFontWeight: "normal", labelFontFamily: t, 158 labelFontSize: A, labelFontColor: W, labelFontWeight: "normal", lineThickness: 1, lineColor: R, tickThickness: 1, tickColor: R, gridThickness: 0, gridColor: R, stripLines: [{ labelFontFamily: t, labelFontSize: A, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroun
158dColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: t, labelFontSize: A, labelFontColor: "#EEEEEE", labelFontWeight: "normal", labelBackgroundColor: X, color: ia, thickness: 1, lineDashType: "dash" }, scaleBreaks: { 159 type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", 160 lineThickness: 1, lineDashType: "solid" 161 } 162 }], axisX2: [{ 163 titleFontFamily: t, titleFontSize: ea, titleFontColor: ca, titleFontWeight: "normal", labelFontFamily: t, labelFontSize: A, labelFontColor: W, labelFontWeight: "normal", lineThickness: 1, lineColor: R, tickThickness: 1, tickColor: R, gridThickness: 0, gridColor: R, stripLines: [{ labelFontFamily: t, labelFontSize: A, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { 164 labelFontFamily: t, labelFontSize: A, labelFontColor: "#EEEEEE", 165 labelFontWeight: "normal", labelBackgroundColor: X, color: ia, thickness: 1, lineDashType: "dash" 166 }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" } 167 }], axisY: [{ 168 titleFontFamily: t, titleFontSize: ea, titleFontColor: ca, titleFontWeight: "normal", labelFontFamily: t, labelFontSize: A, labelFontColor: W, labelFontWeight: "normal", lineThickness: 1, lineColor: R, tickThickness: 1, tickColor: R, gridThickness: 1, gridColor: R, stripLines: [{ 169 labelFontFamily: t, labelFontSize: A, labelFontColor: "#FF7300", 170 labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 171 }], crosshair: { labelFontFamily: t, labelFontSize: A, labelFontColor: "#EEEEEE", labelFontWeight: "normal", labelBackgroundColor: X, color: ia, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" } 172 }], axisY2: [{ 173 titleFontFamily: t, titleFontSize: ea, titleFontColor: ca, titleFontWeight: "normal", labelFontFamily: t, labelFontSize: A, labelFontColor: W, labelFontWeight: "normal", 174 lineThickness: 1, lineColor: R, tickThickness: 1, tickColor: R, gridThickness: 1, gridColor: R, stripLines: [{ labelFontFamily: t, labelFontSize: A, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: t, labelFontSize: A, labelFontColor: "#EEEEEE", labelFontWeight: "normal", labelBackgroundColor: X, color: ia, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" } 175 }], legend: { 176 fontFamily: t, 177 fontSize: 14, fontColor: ca, fontWeight: "bold", verticalAlign: "bottom", horizontalAlign: "center" 178 }, toolTip: { fontFamily: t, fontSize: 14, fontStyle: "normal", cornerRadius: 0, borderThickness: 1 }
178, toolbar: { itemBackgroundColor: "white", itemBackgroundColorOnHover: "#2196f3", buttonBorderColor: "#2196f3", buttonBorderThickness: 1, fontColor: "black", fontColorOnHover: "white" } 179 }; W = ca = "#F5F5F5"; R = "#FFFFFF"; ia = "#40BAF1"; X = "#F5F5F5"; var ea = 20, A = 14, db = { 180 colorSet: "colorSet2", title: { 181 fontFamily: t, fontSize: 33, fontColor: "#3A3A3A", fontWeight: "bold", 182 verticalAlign: "top", margin: 5 183 }, subtitles: [{ fontFamily: t, fontSize: A, fontColor: "#3A3A3A", fontWeight: "normal", verticalAlign: "top", margin: 5 }], data: [{ indexLabelFontFamily: t, indexLabelFontSize: A, indexLabelFontColor: "#666666", indexLabelFontWeight: "normal", indexLabelLineThickness: 1 }], axisX: [{ 184 titleFontFamily: t, titleFontSize: ea, titleFontColor: "#666666", titleFontWeight: "normal", labelFontFamily: t, labelFontSize: A, labelFontColor: "#666666", labelFontWeight: "normal", lineThickness: 1, lineColor: "#BBBBBB", tickThickness: 1, 185 tickColor: "#BBBBBB", gridThickness: 1, gridColor: "#BBBBBB", stripLines: [{ labelFontFamily: t, labelFontSize: A, labelFontColor: "#FFA500", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FFA500", thickness: 1 }], crosshair: { labelFontFamily: t, labelFontSize: A, labelFontColor: "#EEEEEE", labelFontWeight: "normal", labelBackgroundColor: "black", color: "black", thickness: 1, lineDashType: "dot" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" } 186 }], axisX2: [{ 187 titleFontFamily: t, 188 titleFontSize: ea, titleFontColor: "#666666", titleFontWeight: "normal", labelFontFamily: t, labelFontSize: A, labelFontColor: "#666666", labelFontWeight: "normal", lineThickness: 1, lineColor: "#BBBBBB", tickColor: "#BBBBBB", tickThickness: 1, gridThickness: 1, gridColor: "#BBBBBB", stripLines: [{ labelFontFamily: t, labelFontSize: A, labelFontColor: "#FFA500", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FFA500", thickness: 1 }], crosshair: { 189 labelFontFamily: t, labelFontSize: A, labelFontColor: "#EEEEEE", labelFontWeight: "normal", 190 labelBackgroundColor: "black", color: "black", thickness: 1, lineDashType: "dot" 191 }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" } 192 }], axisY: [{ 193 titleFontFamily: t, titleFontSize: ea, titleFontColor: "#666666", titleFontWeight: "normal", labelFontFamily: t, labelFontSize: A, labelFontColor: "#666666", labelFontWeight: "normal", lineThickness: 0, lineColor: "#BBBBBB", tickColor: "#BBBBBB", tickThickness: 1, gridThickness: 1, gridColor: "#BBBBBB", stripLines: [{ 194 labelFontFamily: t, labelFontSize: A, 195 labelFontColor: "#FFA500", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FFA500", thickness: 1 196 }], crosshair: { labelFontFamily: t, labelFontSize: A, labelFontColor: "#EEEEEE", labelFontWeight: "normal", labelBackgroundColor: "black", color: "black", thickness: 1, lineDashType: "dot" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" } 197 }], axisY2: [{ 198 titleFontFamily: t, titleFontSize: ea, titleFontColor: "#666666", titleFontWeight: "normal", labelFontFamily: t, labelFontSize: A, 199 labelFontColor: "#666666", labelFontWeight: "normal", lineThickness: 0, lineColor: "#BBBBBB", tickColor: "#BBBBBB", tickThickness: 1, gridThickness: 1, gridColor: "#BBBBBB", stripLines: [{ labelFontFamily: t, labelFontSize: A, labelFontColor: "#FFA500", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FFA500", thickness: 1 }], crosshair: { labelFontFamily: t, labelFontSize: A, labelFontColor: "#EEEEEE", labelFontWeight: "normal", labelBackgroundColor: "black", color: "black", thickness: 1, lineDashType: "dot" }, scaleBreaks: { 200 type: "zigzag", 201 spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" 202 } 203 }], legend: { fontFamily: t, fontSize: 14, fontColor: "#3A3A3A", fontWeight: "bold", verticalAlign: "bottom", horizontalAlign: "center" }, toolTip: { fontFamily: t, fontSize: 14, fontStyle: "normal", cornerRadius: 0, borderThickness: 1 }
203, toolbar: { itemBackgroundColor: "white", itemBackgroundColorOnHover: "#2196f3", buttonBorderColor: "#2196f3", buttonBorderThickness: 1, fontColor: "black", fontColorOnHover: "white" } 204 }; W = ca = "#F5F5F5"; R = "#FFFFFF"; ia = "#40BAF1"; X = "#F5F5F5"; 205 ea = 20; A = 14; Ga = { 206 colorSet: "colorSet12", backgroundColor: "#2A2A2A", title: { fontFamily: Ga, fontSize: 32, fontColor: ca, fontWeight: "normal", verticalAlign: "top", margin: 5 }, subtitles: [{ fontFamily: Ga, fontSize: A, fontColor: ca, fontWeight: "normal", verticalAlign: "top", margin: 5 }], toolbar: { itemBackgroundColor: "#666666", itemBackgroundColorOnHover: "#FF7372", buttonBorderColor: "#FF7372", buttonBorderThickness: 1, fontColor: "#F5F5F5", fontColorOnHover: "#F5F5F5" }, data: [{ 207 indexLabelFontFamily: t, indexLabelFontSize: A, indexLabelFontColor: W, 208 indexLabelFontWeight: "normal", indexLabelLineThickness: 1 209 }], axisX: [{ 210 titleFontFamily: t, titleFontSize: ea, titleFontColor: W, titleFontWeight: "normal", labelFontFamily: t, labelFontSize: A, labelFontColor: W, labelFontWeight: "normal", lineThickness: 1, lineColor: R, tickThickness: 1, tickColor: R, gridThickness: 0, gridColor: R, stripLines: [{ labelFontFamily: t, labelFontSize: A, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { 211 labelFontFamily: t, labelFontSize: A, 212 labelFontColor: "#000000", labelFontWeight: "normal", labelBackgroundColor: X, color: ia, thickness: 1, lineDashType: "dash" 213 }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#777777", lineThickness: 1, lineDashType: "solid", color: "#111111" } 214 }], axisX2: [{ 215 titleFontFamily: t, titleFontSize: ea, titleFontColor: W, titleFontWeight: "normal", labelFontFamily: t, labelFontSize: A, labelFontColor: W, labelFontWeight: "normal", lineThickness: 1, lineColor: R, tickThickness: 1, tickColor: R, gridThickness: 0, gridColor: R, stripLines: [{ 216 labelFontFamily: t, 217 labelFontSize: A, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 218 }], crosshair: { labelFontFamily: t, labelFontSize: A, labelFontColor: "#000000", labelFontWeight: "normal", labelBackgroundColor: X, color: ia, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#777777", lineThickness: 1, lineDashType: "solid", color: "#111111" } 219 }], axisY: [{ 220 titleFontFamily: t, titleFontSize: ea, titleFontColor: W, titleFontWeight: "normal", labelFontFamily: t, 221 labelFontSize: A, labelFontColor: W, labelFontWeight: "normal", lineThickness: 1, lineColor: R, tickThickness: 1, tickColor: R, gridThickness: 1, gridColor: R, stripLines: [{ labelFontFamily: t, labelFontSize: A, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: t, labelFontSize: A, labelFontColor: "#000000", labelFontWeight: "normal", labelBackgroundColor: X, color: ia, thickness: 1, lineDashType: "dash" }, scaleBreaks: { 222 type: "zigzag", spacing: "2%", lineColor: "#777777", 223 lineThickness: 1, lineDashType: "solid", color: "#111111" 224 } 225 }], axisY2: [{ 226 titleFontFamily: t, titleFontSize: ea, titleFontColor: W, titleFontWeight: "normal", labelFontFamily: t, labelFontSize: A, labelFontColor: W, labelFontWeight: "normal", lineThickness: 1, lineColor: R, tickThickness: 1, tickColor: R, gridThickness: 1, gridColor: R, stripLines: [{ labelFontFamily: t, labelFontSize: A, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { 227 labelFontFamily: t, labelFontSize: A, labelFontColor: "#000000", 228 labelFontWeight: "normal", labelBackgroundColor: X, color: ia, thickness: 1, lineDashType: "dash" 229 }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#777777", lineThickness: 1, lineDashType: "solid", color: "#111111" } 230 }], legend: { fontFamily: t, fontSize: 14, fontColor: ca, fontWeight: "bold", verticalAlign: "bottom", horizontalAlign: "center" }, toolTip: { fontFamily: t, fontSize: 14, fontStyle: "normal", cornerRadius: 0, borderThickness: 1, fontColor: W, backgroundColor: "rgba(0, 0, 0, .7)" } 231 }; R = "#FFFFFF"; W = ca = "#FAFAFA"; ia = "#40BAF1"; X = "#F5F5F5"; 232 var ea = 20, A = 14, Pa = { 233 light1: Ya, light2: db, dark1: Ga, dark2: {
234 colorSet: "colorSet2", backgroundColor: "#32373A", title: { fontFamily: t, fontSize: 32, fontColor: ca, fontWeight: "normal", verticalAlign: "top", margin: 5 }, subtitles: [{ fontFamily: t, fontSize: A, fontColor: ca, fontWeight: "normal", verticalAlign: "top", margin: 5 }], toolbar: { itemBackgroundColor: "#666666", itemBackgroundColorOnHover: "#FF7372", buttonBorderColor: "#FF7372", buttonBorderThickness: 1, fontColor: "#F5F5F5", fontColorOnHover: "#F5F5F5" }, data: [{ 235 indexLabelFontFamily: t, 236 indexLabelFontSize: A, indexLabelFontColor: W, indexLabelFontWeight: "normal", indexLabelLineThickness: 1 237 }], axisX: [{ 238 titleFontFamily: t, titleFontSize: ea, titleFontColor: W, titleFontWeight: "normal", labelFontFamily: t, labelFontSize: A, labelFontColor: W, labelFontWeight: "normal", lineThickness: 1, lineColor: R, tickThickness: 1, tickColor: R, gridThickness: 0, gridColor: R, stripLines: [{ labelFontFamily: t, labelFontSize: A, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { 239 labelFontFamily: t, 240 labelFontSize: A, labelFontColor: "#000000", labelFontWeight: "normal", labelBackgroundColor: X, color: ia, thickness: 1, lineDashType: "dash" 241 }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#777777", lineThickness: 1, lineDashType: "solid", color: "#111111" } 242 }], axisX2: [{ 243 titleFontFamily: t, titleFontSize: ea, titleFontColor: W, titleFontWeight: "normal", labelFontFamily: t, labelFontSize: A, labelFontColor: W, labelFontWeight: "normal", lineThickness: 1, lineColor: R, tickThickness: 1, tickColor: R, gridThickness: 0, gridColor: R, stripLines: [{ 244 labelFontFamily: t, 245 labelFontSize: A, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 246 }], crosshair: { labelFontFamily: t, labelFontSize: A, labelFontColor: "#000000", labelFontWeight: "normal", labelBackgroundColor: X, color: ia, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#777777", lineThickness: 1, lineDashType: "solid", color: "#111111" } 247 }], axisY: [{ 248 titleFontFamily: t, titleFontSize: ea, titleFontColor: W, titleFontWeight: "normal", labelFontFamily: t, 249 labelFontSize: A, labelFontColor: W, labelFontWeight: "normal", lineThickness: 0, lineColor: R, tickThickness: 1, tickColor: R, gridThickness: 1, gridColor: R, stripLines: [{ labelFontFamily: t, labelFontSize: A, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: t, labelFontSize: A, labelFontColor: "#000000", labelFontWeight: "normal", labelBackgroundColor: X, color: ia, thickness: 1, lineDashType: "dash" }, scaleBreaks: { 250 type: "zigzag", spacing: "2%", lineColor: "#777777", 251 lineThickness: 1, lineDashType: "solid", color: "#111111" 252 } 253 }], axisY2: [{ 254 titleFontFamily: t, titleFontSize: ea, titleFontColor: W, titleFontWeight: "normal", labelFontFamily: t, labelFontSize: A, labelFontColor: W, labelFontWeight: "normal", lineThickness: 0, lineColor: R, tickThickness: 1, tickColor: R, gridThickness: 1, gridColor: R, stripLines: [{ labelFontFamily: t, labelFontSize: A, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { 255 labelFontFamily: t, labelFontSize: A, labelFontColor: "#000000", 256 labelFontWeight: "normal", labelBackgroundColor: X, color: ia, thickness: 1, lineDashType: "dash" 257 }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#777777", lineThickness: 1, lineDashType: "solid", color: "#111111" } 258 }], legend: { fontFamily: t, fontSize: 14, fontColor: ca, fontWeight: "bold", verticalAlign: "bottom", horizontalAlign: "center" }, toolTip: { fontFamily: t, fontSize: 14, fontStyle: "normal", cornerRadius: 0, borderThickness: 1, fontColor: W, backgroundColor: "rgba(0, 0, 0, .7)" } 259 }, theme1: Ya, theme2: db, theme3: Ya 260 }, T = { 261 numberDuration: 1, 262 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(" ") 263 }; (function () { wa.fSDec = function (d) { for (var l = "", n = 0; n < d.length; n++)l += String.fromCharCode(Math.ceil(d.length / 57 / 5) ^ d.charCodeAt(n)); return l }; delete ra[wa.fSDec("Bi`su")][wa.fSDec("bsdehuIsdg")]; wa.pro = { sCH: ra[wa.fSDec("Bi`su")][wa.fSDec("bsdehuIsdg")] } })(); 264 var hb = function () { var d = !1; try { var l = Object.defineProperty && Object.defineProperty({}, "passive", { get: function () { d = !0; return !1 } }); window.addEventListener && (window.addEventListener("test", null, l), window.removeEventListener("test", null, l)) } catch (n) { d = !1 } return d }(), ab = {}, ya = null, mb = 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)) }, za = function (d) { 265 d.width = 1; d.height = 1; d.getContext("2d") && 266 d.getContext("2d").clearRect(0, 0, 1, 1) 267 }, nb = function (d, l, n) { l = Math.min(this.width, this.height); return Math.max("theme4" === this.theme ? 0 : 300 <= l ? 12 : 11, Math.round(l * (d / 400))) }, Da = function () { 268 var d = /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, l = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), n = "Sun Mon Tue Wed Thu Fri Sat".split(" "), v = "January February March April May June July August September October November December".split(" "), 269 $ = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), t = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, D = /[^-+\dA-Z]/g; return function (A, H, P) { 270 var R = P ? P.days : l, O = P ? P.months : v, J = P ? P.shortDays : n, T = P ? P.shortMonths : $; P = ""; var L = !1; A = A && A.getTime ? A : A ? new Date(A) : new Date; if (isNaN(A)) throw SyntaxError("invalid date"); "UTC:" === H.slice(0, 4) && (H = H.slice(4), L = !0); P = L ? "getUTC" : "get"; var Z = A[P + "Date"](), N = A[P + "Day"](), 271 Y = A[P + "Month"](), a = A[P + "FullYear"](), g = A[P + "Hours"](), c = A[P + "Minutes"](), b = A[P + "Seconds"](), e = A[P + "Milliseconds"](), h = L ? 0 : A.getTimezoneOffset(); return P = H.replace(d, function (r) { 272 switch (r) { 273 case "D": return Z; case "DD": return da(Z, 2); case "DDD": return J[N]; case "DDDD": return R[N]; case "M": return Y + 1; case "MM": return da(Y + 1, 2); case "MMM": return T[Y]; case "MMMM": return O[Y]; case "Y": return parseInt(String(a).slice(-2)); case "YY": return da(String(a).slice(-2), 2); case "YYY": return da(String(a).slice(-3), 274 3); case "YYYY": return da(a, 4); case "h": return g % 12 || 12; case "hh": return da(g % 12 || 12, 2); case "H": return g; case "HH": return da(g, 2); case "m": return c; case "mm": return da(c, 2); case "s": return b; case "ss": return da(b, 2); case "f": return da(String(e), 3).slice(0, 1); case "ff": return da(String(e), 3).slice(0, 2); case "fff": return da(String(e), 3).slice(0, 3); case "t": return 12 > g ? "a" : "p"; case "tt": return 12 > g ? "am" : "pm"; case "T": return 12 > g ? "A" : "P"; case "TT": return 12 > g ? "AM" : "PM"; case "K": return L ? "UTC" : (String(A).match(t) || 275 [""]).pop().replace(D, ""); case "z": return (0 < h ? "-" : "+") + Math.floor(Math.abs(h) / 60); case "zz": return (0 < h ? "-" : "+") + da(Math.floor(Math.abs(h) / 60), 2); case "zzz": return (0 < h ? "-" : "+") + da(Math.floor(Math.abs(h) / 60), 2) + da(Math.abs(h) % 60, 2); default: return r.slice(1, r.length - 1) 276 } 277 }) 278 } 279 }(), ob = function (d) { 280 var l = 0 > d; if (1 > Math.abs(d)) { var n = parseInt(d.toString().split("e-")[1]); n && (d = (l ? -1 * d : d) * Math.pow(10, n - 1), d = "0." + Array(n).join("0") + d.toString().substring(2), d = l ? "-" + d : d) } else n = parseInt(d.toString().split("+")[1]), 281 20 < n && (n -= 20, d /= Math.pow(10, n), d = d.toString() + Array(n + 1).join("0")); return String(d) 282 }, ga = function (d, l, n) { 283 if (null === d) return ""; if (!isFinite(d)) return d; d = Number(d); var v = 0 > d ? !0 : !1; v && (d *= -1); var $ = n ? n.decimalSeparator : ".", t = n ? n.digitGroupSeparator : ",", D = ""; l = String(l); var D = 1, A = n = "", H = -1, P = [], R = [], O = 0, L = 0, J = 0, T = !1, Z = 0, A = l.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g); l = null; for (var N = 0; A && N < A.length; N++)if (l = A[N], "." === l && 0 > H) H = N; else { 284 if ("%" === l) D *= 100; else if ("\u2030" === l) { D *= 1E3;
284 continue } else if ("," === 285 l[0] && "." === l[l.length - 1]) { D /= Math.pow(1E3, l.length - 1); H = N + l.length - 1; continue } else "E" !== l[0] && "e" !== l[0] || "0" !== l[l.length - 1] || (T = !0); 0 > H ? (P.push(l), "#" === l || "0" === l ? O++ : "," === l && J++) : (R.push(l), "#" !== l && "0" !== l || L++) 286 } T && (l = Math.floor(d), A = -Math.floor(Math.log(d) / Math.LN10 + 1), Z = 0 === d ? 0 : 0 === l ? -(O + A) : ob(l).length - O, D /= Math.pow(10, Z)); 0 > H && (H = N); D = (d * D).toFixed(L); l = D.split("."); D = (l[0] + "").split(""); d = (l[1] + "").split(""); D && "0" === D[0] && D.shift(); for (T = A = N = L = H = 0; 0 < P.length;)if (l = P.pop(), "#" === l || "0" === 287 l) if (H++, H === O) { var Y = D, D = []; if ("0" === l) for (l = O - L - (Y ? Y.length : 0); 0 < l;)Y.unshift("0"), l--; for (; 0 < Y.length;)n = Y.pop() + n, T++, 0 === T % A && (N === J && 0 < Y.length) && (n = t + n) } else 0 < D.length ? (n = D.pop() + n, L++, T++) : "0" === l && (n = "0" + n, L++, T++), 0 === T % A && (N === J && 0 < D.length) && (n = t + n); else "E" !== l[0] && "e" !== l[0] || "0" !== l[l.length - 1] || !/[eE][+-]*[0]+/.test(l) ? "," === l ? (N++, A = T, T = 0, 0 < D.length && (n = t + n)) : n = 1 < l.length && ('"' === l[0] && '"' === l[l.length - 1] || "'" === l[0] && "'" === l[l.length - 1]) ? l.slice(1, l.length - 1) + n : l + n : (l = 0 > Z ? l.replace("+", 288 "").replace("-", "") : l.replace("-", ""), n += l.replace(/[0]+/, function (a) { return da(Z, a.length) })); t = ""; for (P = !1; 0 < R.length;)l = R.shift(), "#" === l || "0" === l ? 0 < d.length && 0 !== Number(d.join("")) ? (t += d.shift(), P = !0) : "0" === l && (t += "0", P = !0) : 1 < l.length && ('"' === l[0] && '"' === l[l.length - 1] || "'" === l[0] && "'" === l[l.length - 1]) ? t += l.slice(1, l.length - 1) : "E" !== l[0] && "e" !== l[0] || "0" !== l[l.length - 1] || !/[eE][+-]*[0]+/.test(l) ? t += l : (l = 0 > Z ? l.replace("+", "").replace("-", "") : l.replace("-", ""), t += l.replace(/[0]+/, function (a) { 289 return da(Z, 290 a.length) 291 })); n += (P ? $ : "") + t; return v ? "-" + n : n 292 }, Qa = function (d) { var l = 0, n = 0; d = d || window.event; d.offsetX || 0 === d.offsetX ? (l = d.offsetX, n = d.offsetY) : d.layerX || 0 == d.layerX ? (l = d.layerX, n = d.layerY) : (l = d.pageX - d.target.offsetLeft, n = d.pageY - d.target.offsetTop); return { x: l, y: n } }, cb = !0, Ua = window.devicePixelRatio || 1, Oa = 1, ma = cb ? Ua / Oa : 1, ba = function (d, l, n, v, t, A, D, H, T, P, O, R, L) { 293 "undefined" === typeof L && (L = 1); D = D || 0; H = H || "black"; var J = 15 < v - l && 15 < t - n ? 8 : 0.35 * Math.min(v - l, t - n); d.beginPath(); d.moveTo(l, n); d.save(); d.fillStyle = 294 A; d.globalAlpha = L; d.fillRect(l, n, v - l, t - n); d.globalAlpha = 1; 0 < D && (L = 0 === D % 2 ? 0 : 0.5, d.beginPath(), d.lineWidth = D, d.strokeStyle = H, d.moveTo(l, n), d.rect(l - L, n - L, v - l + 2 * L, t - n + 2 * L), d.stroke()); d.restore(); !0 === T && (d.save(), d.beginPath(), d.moveTo(l, n), d.lineTo(l + J, n + J), d.lineTo(v - J, n + J), d.lineTo(v, n), d.closePath(), D = d.createLinearGradient((v + l) / 2, n + J, (v + l) / 2, n), D.addColorStop(0, A), D.addColorStop(1, "rgba(255, 255, 255, .4)"), d.fillStyle = D, d.fill(), d.restore()); !0 === P && (d.save(), d.beginPath(), d.moveTo(l, t), d.lineTo(l + 295 J, t - J), d.lineTo(v - J, t - J), d.lineTo(v, t), d.closePath(), D = d.createLinearGradient((v + l) / 2, t - J, (v + l) / 2, t), D.addColorStop(0, A), D.addColorStop(1, "rgba(255, 255, 255, .4)"), d.fillStyle = D, d.fill(), d.restore()); !0 === O && (d.save(), d.beginPath(), d.moveTo(l, n), d.lineTo(l + J, n + J), d.lineTo(l + J, t - J), d.lineTo(l, t), d.closePath(), D = d.createLinearGradient(l + J, (t + n) / 2, l, (t + n) / 2), D.addColorStop(0, A), D.addColorStop(1, "rgba(255, 255, 255, 0.1)"), d.fillStyle = D, d.fill(), d.restore()); !0 === R && (d.save(), d.beginPath(), d.moveTo(v, 296 n), d.lineTo(v - J, n + J), d.lineTo(v - J, t - J), d.lineTo(v, t), D = d.createLinearGradient(v - J, (t + n) / 2, v, (t + n) / 2), D.addColorStop(0, A), D.addColorStop(1, "rgba(255, 255, 255, 0.1)"), d.fillStyle = D, D.addColorStop(0, A), D.addColorStop(1, "rgba(255, 255, 255, 0.1)"), d.fillStyle = D, d.fill(), d.closePath(), d.restore(
296)) 297 }, ja = function (d) { for (var n = "", v = 0; v < d.length; v++)n += String.fromCharCode(Math.ceil(d.length / 57 / 5) ^ d.charCodeAt(v)); return n }, kb = window && (window[ja("mnb`uhno")] && window[ja("mnb`uhno")].href && window[ja("mnb`uhno")].href.indexOf && 298 (-1 !== window[ja("mnb`uhno")].href.indexOf(ja("b`ow`rkr/bnl")) || -1 !== window[ja("mnb`uhno")].href.indexOf(ja("gdonqhy/bnl")) || -1 !== window[ja("mnb`uhno")].href.indexOf(ja("gheemd")))) && -1 === window[ja("mnb`uhno")].href.indexOf(ja("gheemd")), lb = { 299 reset: { image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAeCAYAAABJ/8wUAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAPjSURBVFhHxVdJaFNRFP1J/jwkP5MxsbaC1WJEglSxOFAXIsFpVRE3ggi1K90obioRRBA33XXnQnciirhQcMCdorgQxBkXWlREkFKsWkv5npvckp/XnzRpKh64kLw733fffe9L/wrL0+mVUdO8uTSZ3MBL/we2qg4rkuSpodCELstXE46ziVkLQ6FQcGOmeSSq6wd4aV50d3drWjj8kQKZJTUc9kxFGenv79dZrDksTSTWWJp2QYtEPiErysyzdX0LsxsCQR8keX8gs6RHIk8ysdgKFg2G53mhuOPsshTlBjKaFo1g7SqLNoShKLdFXT8huQ/paLSbxatYnc2mHMM4hr18Vi8TIvCmXF3vYrW6cF23gGTOk0M1wA4RKvOmq6vLZRVJipvmSWT6tZ6CSEYkco5V50VPT4+D7RwOqi6RiSZm0fJ+vggSqkeoypdsNmuyelNwbXsbgvkWYMtzDWNvWaijoyOBqE+hVK8abcssUeXQ/YfKyi0gFYv1Ipgfoj34fYGTJLOYJA0ODirok32GLN8XhUWCwSes1hIwBg6LydJ/tEeRRapAdUp+wSAiZchtZZWWgAZ+JNpD8peYXQVK9UwUxNpzOK8pq97kURZhYTCKBwPD7h2zK+js7Myi7D8Fod+0TkMI8+EMAngLGc/WtBFWawkFHFnoj/t9KLgGmF0B3QfkxC+EarxkdhnFYlFLY06USqUwL7UMjICHfh/wOc2sCqhpxGbCkLvL7EUDbF73+6DkmVWB6zi7xUDQSLeYvWjAILvm9zEnkJhlbRcDQZcv6Kg2AipyT/Axw6wKlqVSqxDdjF8Izfod13qURdrG/nxehY+xGh+h0CSzKygGvSNQIcc097BI24jb9hax6kj2E7OrMFX1il+ICEf2NrPbhiXLl+fYl+U7zK4iYdsDcyLGf+ofFlkwcN+s10KhmpuYhhtm0hCLVIFL0MDsqNlDIqy9x2CLs1jL6OvrI7vPRbtohXG6eFmsFnHDGAp6n9AgyuVySRZrGvROxRgIfLXhzjrNYnNBUxNX/dMgRWT1mt4XLDovaApD53E9W3ilNX5M55LJHpRtIsgAvciR4WWcgK2Dvb1YqgXevmF8z2zEBTcKG39EfSKsT9EbhVUaI2FZO+oZIqImxol6j66/hcAu4sSN4vc1ZPoKeoE6RGhYL2YYA+ymOSSi0Z0wWntbtkGUWCvfSDXIxONraZ/FY90KUfNTpfC5spnNLgxoYNnR9RO4F8ofXEHOgogCQE99w+fF2Xw+b7O59rEOsyRqGEfpVoaDMQQ1CZrG46bcM6AZ0C/wPqNfHliqejyTySxh9TqQpL+xmbIlkB9SlAAAAABJRU5ErkJggg==" }, 300 pan: { image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAICSURBVEhLxZbPahNRGMUn/5MpuAiBEAIufQGfzr5E40YptBXajYzudCEuGqS+gGlrFwquDGRTutBdYfydzJ3LzeQmJGZue+Dw/Z17Mnfmu5Pof9Hr9Z61Wq0bWZMKj263O6xWq99wU9lOpzPMKgEhEcRucNOcioOK+0RzBhNvt9tPV4nmVF19+OWhVqt9xXgFXZq+8lCv119UKpUJ7iX2FmvFTKz8RH34YdBsNk8wVtjE4fGYwm8wrrDi3WBG5oKXZGRSS9hGuNFojLTe2lFz5xThWZIktayyiE2FdT3rzXBXz7krKiL8c17wAKFDjCus2AvW+YGZ9y2JF0VFRuMPfI//rsCE/C+s26s4gQu9ul7r4NteKx7H8XOC724xNNGbaNu++IrBqbOV7Tj3FgMRvc/YKOr3+3sE47wgEt/Bl/gaK5cHbNU11vYSXylfpK7XOvjuumPp4Wcoipu30Qsez2uMXYz4lfI+mOmwothY+SLiXJy7mKVpWs3Si0CoOMfeI9Od43Wic+jO+ZVv+crsm9QSNhUW9LXSeoPBYLXopthGuFQgdIxxhY+UDwlt1x5CZ1hX+NTUdt/OIvjKaDSmuOJfaIVNPKX+W18j/PLA2/kR44p5Sd8HbHngT/yTfNRWUXX14ZcL3wmX0+TLf8YO7CGT8yFE5zB3/gney25/OETRP9CtPDFe5jShAAAAAElFTkSuQmCC" }, 301 zoom: { image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALWSURBVEhLvZZLaBNRFIabyftBIgEfqCCBoCC6MYqiXYiIj4U76U4X7sUHbhQhUBfixhZEUBDB16YuFERaUaQLK7ooCOJj4UKtYEFU0EptShO/A9Ph3js3k8lo/eHnP7n3nP/M3LlzMz1hkUwmNziOcyKRSFyFt+LxeD/c2Wq1Ym7Kv0M2m11Os1OxWGycn1OwZXCGuXfwIhezkd9/jRgNT2L4ldhs1pbkX5OLJe4euVxuGQaPCa3mnUjtJx7BDuKusJTCV6jVVGHTMuYRjxma7yIOhTgFY6jNaAKew2xPKpVay9ganmkvj+M448/MfJdT5K5Gg4HJacRngPFgqVRaRNwW1B4i7yehWfsEDdz1K+A01AoxPIqGAiuwGfkOTY8+1A6u7AyiFTB2Hu0KPIrdiOnzHLWDybeImvy+Wq2mZa5bUHsD0Zpz+KxHdWQymV6kAb1ElqeORgJLvgnRdj1+R1AfzkIvSUjxVjQSarVakrueIPT8+H1F5jSUy+WXiJrUYBVWyVxU4PEU8TzhfaijUqnMIWrjaY492eWRwdKOIqrnIxnXwLLeRLwk2GQzrEMjg0avEbXxkIxr4OoOImpj2QwyFgms1koa/SZUG8s+0iGnEhNfCNXEhzIXBVz0McTzEvJ+70P9oNFtxEzei3aFYrFYxmuSUPWSv9Yi9IMm2xE1We56Mp1OV4nDwqFmBDV9gk9AEh4gZtFHNt8W4kAUCoXF5MorY9Z/kDni9nDv7hc0i2fhgLvTtX8a99PoMPPagTFPxofRzmDJ9yM+AyEmTfgGysYbQcfhDzPPJDmX0c7gDg4gs9BqFIWhm/Nct5H8gtBq1I7UfIbtvmIuoaGQcp+fdpbbSM43eEH5wrwLbXmhm/fU63VHXjcuok7hEByFY/AeHGC8L5/PL3HT5xGH1uYwfPOICGo+CBcU0vwO1BqzUqILDl/z/9VYIMfpddiAc47jDP8BsUpb13wOLRwAAAAASUVORK5CYII=" }, 302 menu: { image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAeCAYAAABE4bxTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADoSURBVFhH7dc9CsJAFATgRxIIBCwCqZKATX5sbawsY2MvWOtF9AB6AU8gguAJbD2AnZ2VXQT/Ko2TYGCL2OYtYQc+BuYA+1hCtnCVwMm27SGaXpDJIAiCvCkVR05hGOZNN3HkFMdx3nQRR06+76/R1IcFLJlNQEWlmWlBTwJtKLKHynehZqnjOGM0PYWRVXk61C37p7xlZ3Hk5HneCk1dmMH811xGoKLSzDiQwIBZB4ocoPJdqNkDt2yKlueWRVGUtzy3rPwo3sWRU3nLjuLI6OO67oZM00wMw3hrmpZx0XU9syxrR0T0BeMpb9dneSR2AAAAAElFTkSuQmCC" } 303 }; 304 Z.prototype.setOptions = function (d, n) { if (ra[this._defaultsKey]) { var v = ra[this._defaultsKey], t; for (t in v) "publicProperties" !== t && v.hasOwnProperty(t) && (this[t] = d && t in d ? d[t] : n && t in n ? n[t] : v[t]) } else Ia && window.console && console.log("defaults not set") }; Z.prototype.get = function (d) { 305 var n = ra[this._defaultsKey]; if ("options" === d) return this.options && this.options._isPlaceholder ? null : this.options; if (n.hasOwnProperty(d) || n.publicProperties && n.publicProperties.hasOwnProperty(d)) return this[d]; window.console && 306 window.console.log('Property "' + d + "\" doesn't exist. Please check for typo.") 307 }; Z.prototype.set = function (d, n, v) { 308 v = "undefined" === typeof v ? !0 : v; var t = ra[this._defaultsKey]; if ("options" === d) this.createUserOptions(n); else if (t.hasOwnProperty(d) || t.publicProperties && t.publicProperties.hasOwnProperty(d) && "readWrite" === t.publicProperties[d]) this.options._isPlaceholder && this.createUserOptions(), this.options[d] = n; else { 309 window.console && (t.publicProperties && t.publicProperties.hasOwnProperty(d) && "readOnly" === t.publicProperties[d] ? 310 window.console.log('Property "' + d + '" is read-only.') : window.console.log('Property "' + d + "\" doesn't exist. Please check for typo.")); return 311 } v && (this.stockChart || this.chart || this).render() 312 }; Z.prototype.addTo = function (d, n, v, t) { 313 t = "undefined" === typeof t ? !0 : t; var A = ra[this._defaultsKey]; A.hasOwnProperty(d) || A.publicProperties && A.publicProperties.hasOwnProperty(d) && "readWrite" === A.publicProperties[d] ? (this.options._isPlaceholder && this.createUserOptions(), "undefined" === typeof this.options[d] && (this.options[d] = 314 []), d = this.options[d], v = "undefined" === typeof v || null === v ? d.length : v, d.splice(v, 0, n), t && (this.stockChart || this.chart || this).render()) : window.console && (A.publicProperties && A.publicProperties.hasOwnProperty(d) && "readOnly" === A.publicProperties[d] ? window.console.log('Property "' + d + '" is read-only.') : window.console.log('Property "' + d + "\" doesn't exist. Please check for typo.")) 315 }; Z.prototype.createUserOptions = function (d) { 316 if ("undefined" !== typeof d || this.options._isPlaceholder) if (this.parent && this.parent.options._isPlaceholder && 317 this.parent.createUserOptions(), this.isOptionsInArray) { this.parent.options[this.optionsName] || (this.parent.options[this.optionsName] = []); var n = this.parent.options[this.optionsName], v = n.length; this.options._isPlaceholder || (Ea(n), v = n.indexOf(this.options)); this.options = "undefined" === typeof d ? {} : d; n[v] = this.options } else this.options = "undefined" === typeof d ? {} : d, this.parent && (d = this.parent.options, this.optionsName ? n = this.optionsName : (n = this._defaultsKey) && 0 !== n.length ? (v = n.charAt(0).toLowerCase(), 1 < n.length && 318 (v = v.concat(n.slice(1))), n = v) : n = void 0, d[n] = this.options) 319 }; Z.prototype.remove = function (d) { d = "undefined" === typeof d ? !0 : d; if (this.isOptionsInArray) { var n = this.parent.options[this.optionsName]; Ea(n); var v = n.indexOf(this.options);
319 0 <= v && n.splice(v, 1) } else delete this.parent.options[this.optionsName]; d && (this.stockChart || this.chart || this).render() }; Z.prototype.updateOption = function (d) { 320 !ra[this._defaultsKey] && (Ia && window.console) && console.log("defaults not set"); var l = ra[this._defaultsKey], v = {}, t = this[d], 321 A = this._themeOptionsKey, H = this._index; this.theme && n(this.parent) && n(A) && n(H) ? v = n(this.predefinedThemes[this.theme]) ? this.predefinedThemes.light1 : this.predefinedThemes[this.theme] : this.parent && this.parent.themeOptions && (this.options.theme && Pa[this.options.theme] ? v = Pa[this.options.theme] : this.parent.themeOptions[A] && (null === H ? v = this.parent.themeOptions[A] : 0 < this.parent.themeOptions[A].length && (v = Math.min(this.parent.themeOptions[A].length - 1, H), v = this.parent.themeOptions[A][v]))); this.themeOptions = v; 322 d in l && (t = d in this.options ? this.options[d] : v && d in v ? v[d] : l[d]); if (t === this[d]) return !1; this[d] = t; return !0 323 }; Z.prototype.trackChanges = function (d) { if (!this.sessionVariables) throw "Session Variable Store not set"; this.sessionVariables[d] = this.options[d] }; Z.prototype.isBeingTracked = function (d) { this.options._oldOptions || (this.options._oldOptions = {}); return this.options._oldOptions[d] ? !0 : !1 }; Z.prototype.hasOptionChanged = function (d) { 324 if (!this.sessionVariables) throw "Session Variable Store not set"; return this.sessionVariables[d] !== 325 this.options[d] 326 }; Z.prototype.addEventListener = function (d, n, v) { d && n && (this._eventListeners[d] = this._eventListeners[d] || [], this._eventListeners[d].push({ context: v || this, eventHandler: n })) }; Z.prototype.removeEventListener = function (d, n) { if (d && n && this._eventListeners[d]) for (var v = this._eventListeners[d], t = 0; t < v.length; t++)if (v[t].eventHandler === n) { v[t].splice(t, 1); break } }; Z.prototype.removeAllEventListeners = function () { this._eventListeners = [] }; Z.prototype.dispatchEvent = function (d, n, v) { 327 if (d && this._eventListeners[d]) { 328 n = 329 n || {}; for (var t = this._eventListeners[d], A = 0; A < t.length; A++)t[A].eventHandler.call(t[A].context, n) 330 } "function" === typeof this[d] && this[d].call(v || this.chart, n) 331 }; Fa.prototype.registerSpace = function (d, n) { "top" === d ? this._topOccupied += n.height : "bottom" === d ? this._bottomOccupied += n.height : "left" === d ? this._leftOccupied += n.width : "right" === d && (this._rightOccupied += n.width) }; Fa.prototype.unRegisterSpace = function (d, n) { 332 "top" === d ? this._topOccupied -= n.height : "bottom" === d ? this._bottomOccupied -= n.height : "left" === d ? 333 this._leftOccupied -= n.width : "right" === d && (this._rightOccupied -= n.width) 334 }; Fa.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 } }; Fa.prototype.reset = function () { this._rightOccupied = this._leftOccupied = this._bottomOccupied = this._topOccupied = this._padding }; qa(ka, 335 Z); ka.prototype._initialize = function () { n(this.padding) || "object" !== typeof this.padding ? this.topPadding = this.rightPadding = this.bottomPadding = this.leftPadding = Number(this.padding) | 0 : (this.topPadding = n(this.padding.top) ? 0 : Number(this.padding.top) | 0, this.rightPadding = n(this.padding.right) ? 0 : Number(this.padding.right) | 0, this.bottomPadding = n(this.padding.bottom) ? 0 : Number(this.padding.bottom) | 0, this.leftPadding = n(this.padding.left) ? 0 : Number(this.padding.left) | 0) }; ka.prototype.render = function (d) { 336 if (0 !== this.fontSize) { 337 d && 338 this.ctx.save(); var n = this.ctx.font; this.ctx.textBaseline = this.textBaseline; var v = 0; this._isDirty && this.measureText(this.ctx); this.ctx.translate(this.x, this.y + v); "middle" === this.textBaseline && (v = -this._lineHeight / 2); this.ctx.font = this._getFontString(); this.ctx.rotate(Math.PI / 180 * this.angle); var t = 0, A = this.topPadding, H = null; this.ctx.roundRect || Aa(this.ctx); (0 < this.borderThickness && this.borderColor || this.backgroundColor) && this.ctx.roundRect(0, v, this.width, this.height, this.cornerRadius, this.borderThickness, 339 this.backgroundColor, this.borderColor); this.ctx.fillStyle = this.fontColor; for (v = 0; v < this._wrappedText.lines.length; v++) { 340 H = this._wrappedText.lines[v]; if ("right" === this.horizontalAlign || "right" === this.textAlign) t = this.width - H.width - this.rightPadding; else if ("left" === this.horizontalAlign || "left" === this.textAlign) t = this.leftPadding; else if ("center" === this.horizontalAlign || "center" === this.textAlign) t = (this.width - (this.leftPadding + this.rightPadding)) / 2 - H.width / 2 + this.leftPadding; this.ctx.fillText(H.text, 341 t, A); A += H.height 342 } this.ctx.font = n;
342 d && this.ctx.restore() 343 } 344 }; ka.prototype.setText = function (d) { this.text = d; this._isDirty = !0; this._wrappedText = null }; ka.prototype.measureText = function () { this._lineHeight = $a(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 } }; ka.prototype._getLineWithWidth = function (d, n, v) { 345 d = String(d); if (!d) return { text: "", width: 0 }; var t = 346 v = 0, A = d.length - 1, H = Infinity; for (this.ctx.font = this._getFontString(); t <= A;) { var H = Math.floor((t + A) / 2), D = d.substr(0, H + 1); v = this.ctx.measureText(D).width; if (v < n) t = H + 1; else if (v > n) A = H - 1; else break } v > n && 1 < D.length && (D = D.substr(0, D.length - 1), v = this.ctx.measureText(D).width); n = !0; if (D.length === d.length || " " === d[D.length]) n = !1; n && (d = D.split(" "), 1 < d.length && d.pop(), D = d.join(" "), v = this.ctx.measureText(D).width); return { text: D, width: v } 347 }; ka.prototype._wrapText = function () { 348 var d = new String(Ha(String(this.text))), 349 n = [], v = this.ctx.font, t = 0, A = 0; this.ctx.font = this._getFontString(); if (0 === this.frontSize) A = t = 0; else for (; 0 < d.length;) { var H = this.maxHeight - (this.topPadding + this.bottomPadding), D = this._getLineWithWidth(d, this.maxWidth - (this.leftPadding + this.rightPadding), !1); D.height = this._lineHeight; n.push(D); var J = A, A = Math.max(A, D.width), t = t + D.height, d = Ha(d.slice(D.text.length, d.length)); H && t > H && (D = n.pop(), t -= D.height, A = J) } this._wrappedText = { lines: n, width: A, height: t }; this.width = A + (this.leftPadding + this.rightPadding); 350 this.height = t + (this.topPadding + this.bottomPadding); this.ctx.font = v 351 }; ka.prototype._getFontString = function () { var d; d = "" + (this.fontStyle ? this.fontStyle + " " : ""); d += this.fontWeight ? this.fontWeight + " " : ""; d += this.fontSize ? this.fontSize + "px " : ""; var n = this.fontFamily ? this.fontFamily + "" : ""; !v && n && (n = n.split(",")[0], "'" !== n[0] && '"' !== n[0] && (n = "'" + n + "'")); return d += n }; qa(Wa, Z); qa(Ba, Z); Ba.prototype.setLayout = function () { 352 if (this.text) { 353 var d = this.dockInsidePlotArea ? this.chart.plotArea : this.chart, l = d.layoutManager.getFreeSpace(), 354 v = l.x1, t = l.y1, A = 0, H = 0, D = this.chart._menuButton && this.chart.exportEnabled && "top" === this.verticalAlign ? 40 : 0, J, L; "top" === this.verticalAlign || "bottom" === this.verticalAlign ? (null === this.maxWidth && (this.maxWidth = l.width - 4 - D * ("center" === this.horizontalAlign ? 2 : 1)), H = 0.5 * l.height - this.margin - 2, A = 0) : "center" === this.verticalAlign && ("left" === this.horizontalAlign || "right" === this.horizontalAlign ? (null === this.maxWidth && (this.maxWidth = l.height - 4), H = 0.5 * l.width - this.margin - 2) : "center" === this.horizontalAlign && (null === 355 this.maxWidth && (this.maxWidth = l.width - 4), H = 0.5 * l.height - 4)); var P; n(this.padding) || "number" !== typeof this.padding ? n(this.padding) || "object" !== typeof this.padding || (P = this.padding.top ? this.padding.top : this.padding.bottom ? this.padding.bottom : 0, P += this.padding.bottom ? this.padding.bottom : this.padding.top ? this.padding.top : 0) : P = 2 * this.padding; this.wrap || (H = Math.min(H, 1.5 * this.fontSize + P)); H = new ka(this.ctx, { 356 fontSize: this.fontSize, fontFamily: this.fontFamily, fontColor: this.fontColor, fontStyle: this.fontStyle, 357 fontWeight: this.fontWeight, horizontalAlign: this.horizontalAlign, textAlign: this.horizontalAlign, verticalAlign: this.verticalAlign, borderColor: this.borderColor, borderThickness: this.borderThickness, backgroundColor: this.backgroundColor, maxWidth: this.maxWidth, maxHeight: H, cornerRadius: this.cornerRadius, text: this.text, padding: this.padding, textBaseline: "middle" 358 }); P = H.measureText(); "top" === this.verticalAlign || "bottom" === this.verticalAlign ? ("top" === this.verticalAlign ? (t = l.y1 + 2 + this.fontSize / 2 + 4, L = "top") : "bottom" === 359 this.verticalAlign && (t = l.y2 - 2 - P.height + this.fontSize / 2 + 4, L = "bottom"), "left" === this.horizontalAlign ? v = l.x1 + 2 : "center" === this.horizontalAlign ? v = l.x1 + l.width / 2 - P.width / 2 : "right" === this.horizontalAlign && (v = l.x2 - 2 - P.width - D), J = this.horizontalAlign, this.width = P.width, this.height = P.height) : "center" === this.verticalAlign && ("left" === this.horizontalAlign ? (v = l.x1 + 2 + (this.fontSize / 2 + 4), t = l.y2 - 2 - (this.maxWidth / 2 - P.width / 2), A = -90, L = "left", this.width = P.height, this.height = P.width) : "right" === this.horizontalAlign ? (v = 360 l.x2 - 2 - (this.fontSize / 2 + 4), t = l.y1 + 2 + (this.maxWidth / 2 - P.width / 2), A = 90, L = "right", this.width = P.height, this.height = P.width) : "center" === this.horizontalAlign && (t = d.y1 + (d.height / 2 - P.height / 2) + this.fontSize / 2 + 4, v = d.x1 + (d.width / 2 - P.width / 2), L = "center", this.width = P.width, this.height = P.height), J = "center"); H.x = v; H.y = t; H.angle = A; H.horizontalAlign = J; this._textBlock = H; d.layoutManager.registerSpace(L, { 361 width: this.width + ("left" === L || "right" === L ? this.margin + 2 : 0), height: this.height + ("top" === L || "bottom" === L ? this.margin + 362 2 : 0) 363 }); this.bounds = { x1: v, y1: t, x2: v + this.width, y2: t + this.height }; this.ctx.textBaseline = "top" 364 } 365 }; Ba.prototype.render = function () { this._textBlock && this._textBlock.render(!0) }; qa(Ja, Z); Ja.prototype.setLayout = Ba.prototype.setLayout; Ja.prototype.render = Ba.prototype.render; Xa.prototype.get = function (d, n) { var v = null; 0 < this.pool.length ? (v = this.pool.pop(), Na(v, d, n)) : v = va(d, n); return v }; Xa.prototype.release = function (d) { this.pool.push(d) }; qa(Ka, Z); var Ra = { 366 addTheme: function (d, n) { Pa[d] = n }, addColorSet: function (d, n) { 367 Ca[d] = 368 n 369 }, addCultureInfo: function (d, n) { La[d] = n }, formatNumber: function (d, n, v) { v = v || "en"; if (La[v]) return ga(d, n || "#,##0.##", new Ka(v)); throw "Unknown Culture Name"; }, formatDate: function (d, n, v) { v = v || "en";
369 if (La[v]) return Da(d, n || "DD MMM YYYY", new Ka(v)); throw "Unknown Culture Name"; } 370 }; "undefined" !== typeof module && "undefined" !== typeof module.exports ? module.exports = Ra : "function" === typeof define && define.amd ? define([], function () { return Ra }) : (window.CanvasJS && window.console && window.console.log("CanvasJS namespace already exists. If you are loading both chart and stockchart scripts, just load stockchart alone as it includes all chart features."), 371 window.CanvasJS = window.CanvasJS ? window.CanvasJS : Ra); t = Ra.Chart = function () { 372 function d(a, g) { return a.x - g.x } function l(a, g, c) { 373 g = g || {}; n(c) ? (this.predefinedThemes = Pa, this.optionsName = this.parent = this.index = null) : (this.parent = c.parent, this.index = c.index, this.predefinedThemes = c.predefinedThemes, this.optionsName = c.optionsName, this.stockChart = c.stockChart, this.panel = a, this.isOptionsInArray = c.isOptionsInArray); this.theme = n(g.theme) || n(this.predefinedThemes[g.theme]) ? "light1" : g.theme; l.base.constructor.call(this, 374 "Chart", this.optionsName, g, this.index, this.parent); var b = this; this._containerId = a; this._objectsInitialized = !1; this.overlaidCanvasCtx = this.ctx = null; this._indexLabels = []; this._panTimerId = 0; this._lastTouchEventType = ""; this._lastTouchData = null; this.isAnimating = !1; this.renderCount = 0; this.disableToolTip = this.animatedRender = !1; this.canvasPool = new Xa; this.allDOMEventHandlers = []; this.panEnabled = !1; this._defaultCursor = "default"; this.plotArea = { canvas: null, ctx: null, x1: 0, y1: 0, x2: 0, y2: 0, width: 0, height: 0 }; this._dataInRenderedOrder = 375 []; (this.container = "string" === typeof this._containerId ? document.getElementById(this._containerId) : this._containerId) ? (this.container.innerHTML = "", g = a = 0, a = this.options.width ? this.width : 0 < this.container.clientWidth ? this.container.clientWidth : this.width, g = c && c.height ? c.height : this.options.height ? this.height : 0 < this.container.clientHeight ? this.container.clientHeight : this.height, this.width = a, this.height = g, this.x1 = this.y1 = 0, this.x2 = this.width, this.y2 = this.height, this.selectedColorSet = "undefined" !== typeof Ca[this.colorSet] ? 376 Ca[this.colorSet] : Ca.colorSet1, this._canvasJSContainer = document.createElement("div"), this._canvasJSContainer.setAttribute("class", "canvasjs-chart-container"), this._canvasJSContainer.style.position = "relative", this._canvasJSContainer.style.textAlign = "left", this._canvasJSContainer.style.cursor = "auto", this._canvasJSContainer.style.direction = "ltr", v || (this._canvasJSContainer.style.height = "0px"), this.container.appendChild(this._canvasJSContainer), this.canvas = va(a, g), this._preRenderCanvas = va(a, g), this.canvas.style.position = 377 "absolute", this.canvas.style.WebkitUserSelect = "none", this.canvas.style.MozUserSelect = "none", this.canvas.style.msUserSelect = "none", this.canvas.style.userSelect = "none", this.canvas.getContext && (this._canvasJSContainer.appendChild(this.canvas), this.ctx = this.canvas.getContext("2d"), this.ctx.textBaseline = "top", Aa(this.ctx), this._preRenderCtx = this._preRenderCanvas.getContext("2d"), this._preRenderCtx.textBaseline = "top", Aa(this._preRenderCtx), v ? this.plotArea.ctx = this.ctx : (this.plotArea.canvas = va(a, g), this.plotArea.canvas.style.position = 378 "absolute", this.plotArea.canvas.setAttribute("class", "plotAreaCanvas"), this._canvasJSContainer.appendChild(this.plotArea.canvas), this.plotArea.ctx = this.plotArea.canvas.getContext("2d")), this.overlaidCanvas = va(a, g), this.overlaidCanvas.style.position = "absolute", this.overlaidCanvas.style.webkitTapHighlightColor = "transparent", this.overlaidCanvas.style.WebkitUserSelect = "none", this.overlaidCanvas.style.MozUserSelect = "none", this.overlaidCanvas.style.msUserSelect = "none", this.overlaidCanvas.style.userSelect = 379 "none", this.overlaidCanvas.getContext && (this._canvasJSContainer.appendChild(this.overlaidCanvas), this.overlaidCanvasCtx = this.overlaidCanvas.getContext("2d"), this.overlaidCanvasCtx.textBaseline = "top", Aa(this.overlaidCanvasCtx)), this._eventManager = new ia(this), this.windowResizeHandler = J(window, "resize", function () { b._updateSize() && b.render() }, this.allDOMEventHandlers), this._toolBar = document.createElement("div"), this._toolBar.setAttribute("class", "canvasjs-chart-toolbar"), L(this._toolBar, { 380 position: "absolute",
381 right: "1px", top: "1px" 382 }), this._canvasJSContainer.appendChild(this._toolBar), this.bounds = { x1: 0, y1: 0, x2: this.width, y2: this.height }, J(this.overlaidCanvas, "click", function (a) { b._mouseEventHandler(a) }, this.allDOMEventHandlers), J(this.overlaidCanvas, "mousemove", function (a) { b._mouseEventHandler(a) }, this.allDOMEventHandlers), J(this.overlaidCanvas, "mouseup", function (a) { b._mouseEventHandler(a) }, this.allDOMEventHandlers), J(this.overlaidCanvas, "mousedown", function (a) { b._mouseEventHandler(a); xa(b._dropdownMenu) }, 383 this.allDOMEventHandlers), J(this.overlaidCanvas, "mouseout", function (a) { b._mouseEventHandler(a) }, this.allDOMEventHandlers), J(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerDown" : "touchstart", function (a) { b._touchEventHandler(a) }, this.allDOMEventHandlers), J(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerMove" : "touchmove", function (a) { b._touchEventHandler(a) }, this.allDOMEventHandlers), J(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerUp" : "touchend", function (a) { b._touchEventHandler(a) }, 384 this.allDOMEventHandlers), J(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerCancel" : "touchcancel", function (a) { b._touchEventHandler(a) }, this.allDOMEventHandlers), this.toolTip = new oa(this, this.options.toolTip), this.data = null, this.axisX = [], this.axisX2 = [], this.axisY = [], this.axisY2 = [], this.sessionVariables = { axisX: [], axisX2: [], axisY: [], axisY2: [] })) : window.console && window.console.log('CanvasJS Error: Chart Container with id "' + this._containerId + '" was not found') 385 } function t(a, g) { 386 for (var c = 387 [], b, e = 0; e < a.length; e++)if (0 == e) c.push(a[0]); else { 388 var h, r, x; x = e - 1; h = 0 === x ? 0 : x - 1; r = x === a.length - 1 ? x : x + 1; b = Math.abs((a[r].x - a[h].x) / (0 === a[r].x - a[x].x ? 0.01 : a[r].x - a[x].x)) * (g - 1) / 2 + 1; var I = (a[r].x - a[h].x) / b; b = (a[r].y - a[h].y) / b; c[c.length] = a[x].x > a[h].x && 0 < I || a[x].x < a[h].x && 0 > I ? { x: a[x].x + I / 3, y: a[x].y + b / 3 } : { x: a[x].x, y: a[x].y + (1 === c.length ? 0 : b / 9) }; x = e; h = 0 === x ? 0 : x - 1; r = x === a.length - 1 ? x : x + 1; b = Math.abs((a[r].x - a[h].x) / (0 === a[x].x - a[h].x ? 0.01 : a[x].x - a[h].x)) * (g - 1) / 2 + 1; I = (a[r].x - a[h].x) / b; b = (a[r].y - a[h].y) / b; 389 c[c.length] = a[x].x > a[h].x && 0 < I || a[x].x < a[h].x && 0 > I ? { x: a[x].x - I / 3, y: a[x].y - b / 3 } : { x: a[x].x, y: a[x].y - b / 9 }; c[c.length] = a[e] 390 } return c 391 } function A(a, g, c, b, e, h, r, x, I, k) { 392 var m = 0; k ? (r.color = h, x.color = h) : k = 1; m = I ? Math.abs(e - c) : Math.abs(b - g); m = 0 < r.trimLength ? Math.abs(m * r.trimLength / 100) : Math.abs(m - r.length); I ? (c += m / 2, e -= m / 2) : (g += m / 2, b -= m / 2); var m = 1 === Math.round(r.thickness) % 2 ? 0.5 : 0, p = 1 === Math.round(x.thickness) % 2 ? 0.5 : 0; a.save(); a.globalAlpha = k; a.strokeStyle = x.color || h; a.lineWidth = x.thickness || 2; a.setLineDash && 393 a.setLineDash(H(x.dashType, x.thickness)); a.beginPath(); I && 0 < x.thickness ? (a.moveTo(b - r.thickness / 2, Math.round((c + e) / 2) - p), a.lineTo(g + r.thickness / 2, Math.round((c + e) / 2) - p)) : 0 < x.thickness && (a.moveTo(Math.round((g + b) / 2) - p, c + r.thickness / 2), a.lineTo(Math.round((g + b) / 2) - p, e - r.thickness / 2)); a.stroke(); a.strokeStyle = r.color || h; a.lineWidth = r.thickness || 2; a.setLineDash && a.setLineDash(H(r.dashType, r.thickness)); a.beginPath(); I && 0 < r.thickness ? (a.moveTo(b - m, c), a.lineTo(b - m, e), a.moveTo(g + m, c), a.lineTo(g + m, e)) : 0 < 394 r.thickness && (a.moveTo(g, c + m), a.lineTo(b, c + m), a.moveTo(g, e - m), a.lineTo(b, e - m)); a.stroke();
394 a.restore() 395 } function R(a, g) { 396 R.base.constructor.call(this, "Legend", "legend", g, null, a); this.chart = a; this.canvas = a.canvas; this.ctx = this.chart.ctx; this.ghostCtx = this.chart._eventManager.ghostCtx; this.items = []; this.optionsName = "legend"; this.height = this.width = 0; this.orientation = null; this.dataSeries = []; this.bounds = { x1: null, y1: null, x2: null, y2: null }; "undefined" === typeof this.options.fontSize && (this.fontSize = this.chart.getAutoFontSize(this.fontSize)); 397 this.lineHeight = $a(this.fontFamily, this.fontSize, this.fontWeight); this.horizontalSpacing = this.fontSize 398 } function W(a, g, c, b) { 399 W.base.constructor.call(this, "DataSeries", "data", g, c, a); this.chart = a; this.canvas = a.canvas; this._ctx = a.canvas.ctx; this.index = c; this.noDataPointsInPlotArea = 0; this.id = b; this.chart._eventManager.objectMap[b] = { id: b, objectType: "dataSeries", dataSeriesIndex: c }; a = g.dataPoints ? g.dataPoints.length : 0; this.dataPointEOs = []; for (g = 0; g < a; g++)this.dataPointEOs[g] = {}; this.dataPointIds = []; this.plotUnit = 400 []; this.axisY = this.axisX = null; this.optionsName = "data"; this.isOptionsInArray = !0; null === this.fillOpacity && (this.type.match(/area/i) ? this.fillOpacity = 0.7 : this.fillOpacity = 1); this.axisPlacement = this.getDefaultAxisPlacement(); "undefined" === typeof this.options.indexLabelFontSize && (this.indexLabelFontSize = this.chart.getAutoFontSize(this.indexLabelFontSize)) 401 } function D(a, g, c, b, e, h) { 402 D.base.constructor.call(this, "Axis", g, c, b, a); this.chart = a; this.canvas = a.canvas; this.ctx = a.ctx; this.intervalStartPosition = this.maxHeight = 403 this.maxWidth = 0; this.labels = []; this.dataSeries = []; this._stripLineLabels = this._ticks = this._labels = null; this.dataInfo = { min: Infinity, max: -Infinity, viewPortMin: Infinity, viewPortMax: -Infinity, minDiff: Infinity }; this.isOptionsInArray = !0; "axisX" === e ? ("left" === h || "bottom" === h ? (this.optionsName = "axisX", n(this.chart.sessionVariables.axisX[b]) && (this.chart.sessionVariables.axisX[b] = {}), this.sessionVariables = this.chart.sessionVariables.axisX[b]) : (this.optionsName = "axisX2", n(this.chart.sessionVariables.axisX2[b]) && 404 (this.chart.sessionVariables.axisX2[b] = {}), this.sessionVariables = this.chart.sessionVariables.axisX2[b]), this.options.interval || (this.intervalType = null)) : "left" === h || "bottom" === h ? (this.optionsName = "axisY", n(this.chart.sessionVariables.axisY[b]) && (this.chart.sessionVariables.axisY[b] = {}), this.sessionVariables = this.chart.sessionVariables.axisY[b]) : (this.optionsName = "axisY2", n(this.chart.sessionVariables.axisY2[b]) && (this.chart.sessionVariables.axisY2[b] = {}), this.sessionVariables = this.chart.sessionVariables.axisY2[b]); 405 "undefined" === typeof this.options.titleFontSize && (this.titleFontSize = this.chart.getAutoFontSize(this.titleFontSize)); "undefined" === typeof this.options.labelFontSize && (this.labelFontSize = this.chart.getAutoFontSize(this.labelFontSize)); this.type = e; "axisX" !== e || c && "undefined" !== typeof c.gridThickness || (this.gridThickness = 0); this._position = h; 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 -= 406 180 : 270 <= this.labelAngle && 360 >= this.labelAngle && (this.labelAngle -= 360); this.options.scaleBreaks && (this.scaleBreaks = new ea(this.chart, this.options.scaleBreaks, ++this.chart._eventManager.lastObjectId, this)); this.stripLines = []; if (this.options.stripLines && 0 < this.options.stripLines.length) for (a = 0; a < this.options.stripLines.length; a++)this.stripLines.push(new P(this.chart, this.options.stripLines[a], a, ++this.chart._eventManager.lastObjectId, this)); this.options.crosshair && (this.crosshair = new da(this.chart, 407 this.options.crosshair, this)); this._titleTextBlock = null; this.hasOptionChanged("viewportMinimum") && null === this.viewportMinimum && (this.options.viewportMinimum = void 0, this.sessionVariables.viewportMinimum = null); this.hasOptionChanged("viewportMinimum") || isNaN(this.sessionVariables.newViewportMinimum) || null === this.sessionVariables.newViewportMinimum ? this.sessionVariables.newViewportMinimum = null : this.viewportMinimum = this.sessionVariables.newViewportMinimum; this.hasOptionChanged("viewportMaximum") && null === 408 this.viewportMaximum && (this.options.viewportMaximum = void 0, this.sessionVariables.viewportMaximum = null); this.hasOptionChanged("viewportMaximum") || isNaN(this.sessionVariables.newViewportMaximum) || null === this.sessionVariables.newViewportMaximum ? this.sessionVariables.newViewportMaximum = null : this.viewportMaximum = this.sessionVariables.newViewportMaximum; null !== this.minimum && null !== this.viewportMinimum && (this.viewportMinimum = Math.max(this.viewportMinimum, this.minimum)); null !== this.maximum && null !== this.viewportMaximum && 409 (this.viewportMaximum = Math.min(this.viewportMaximum, this.maximum)); this.trackChanges("viewportMinimum"); this.trackChanges("viewportMaximum") 410 } function ea(a, g, c, b) { 411 ea.base.constructor.call(this, "ScaleBreaks", "scaleBreaks", g, null, b); this.id = c; this.chart = a; this.ctx = this.chart.ctx; this.axis = b; this.optionsName = "scaleBreaks"; this.isOptionsInArray = !1; this._appliedBreaks = []; this.customBreaks = []; this.autoBreaks = []; "string" === typeof this.spacing ? (this.spacing = parseFloat(this.spacing), this.spacing = isNaN(this.spacing) ? 412 8 : (10 < this.spacing ? 10 : this.spacing) + "%") : "number" !== typeof this.spacing && (this.spacing = 8); this.autoCalculate && (this.maxNumberOfAutoBreaks = Math.min(this.maxNumberOfAutoBreaks, 5)); if (this.options.customBreaks && 0 < this.options.customBreaks.length) { 413 for (a = 0; a < this.options.customBreaks.length; a++)this.customBreaks.push(new ca(this.chart, "customBreaks", this.options.customBreaks[a], a, ++this.chart._eventManager.lastObjectId, this)), "number" === typeof this.customBreaks[a].startValue && ("number" === typeof this.customBreaks[a].endValue && 414 this.customBreaks[a].endValue !== this.customBreaks[a].startValue) && this._appliedBreaks.push(this.customBreaks[a]); this._appliedBreaks.sort(function (a, b) { return a.startValue - b.startValue }); for (a = 0; a < this._appliedBreaks.length - 1; a++)this._appliedBreaks[a].endValue >= this._appliedBreaks[a + 1].startValue && (this._appliedBreaks[a].endValue = Math.max(this._appliedBreaks[a].endValue, this._appliedBreaks[a + 1].endValue), window.console && window.console.log("CanvasJS Error: Breaks " + a + " and " + (a + 1) + " are overlapping."), 415 this._appliedBreaks.splice(a, 2), a--) 416 } 417 } function ca(a, g, c, b, e, h) { 418 ca.base.constructor.call(this, "Break", g, c, b, h); this.id = e; this.chart = a; this.ctx = this.chart.ctx; this.scaleBreaks = h; this.optionsName = g; this.isOptionsInArray = !0; this.type = c.type ? this.type : h.type; this.fillOpacity = n(c.fillOpacity) ? h.fillOpacity : this.fillOpacity; this.lineThickness = n(c.lineThickness) ? h.lineThickness : this.lineThickness; this.color = c.color ? this.color : h.color; this.lineColor = c.lineColor ? this.lineColor : h.lineColor; this.lineDashType = 419 c.lineDashType ? this.lineDashType : h.lineDashType; !n(this.startValue) && this.startValue.getTime && (this.startValue = this.startValue.getTime()); !n(this.endValue) && this.endValue.getTime && (this.endValue = this.endValue.getTime()); "number" === typeof this.startValue && ("number" === typeof this.endValue && this.endValue < this.startValue) && (a = this.startValue, this.startValue = this.endValue, this.endValue = a); this.spacing = "undefined" === typeof c.spacing ? h.spacing : c.spacing; "string" === typeof this.options.spacing ? (this.spacing = 420 parseFloat(this.spacing), this.spacing = isNaN(this.spacing) ? 0 : (10 < this.spacing ? 10 : this.spacing) + "%") : "number" !== typeof this.options.spacing && (this.spacing = h.spacing); this.size = h.parent.logarithmic ? 1 : 0 421 } function P(a, g, c, b, e) { 422 P.base.constructor.call(this, "StripLine", "stripLines", g, c, e); this.id = b; this.chart = a; this.ctx = this.chart.ctx; this.label = this.label; this.axis = e; this.optionsName = "stripLines"; this.isOptionsInArray = !0; this._thicknessType = "pixel"; null !== this.startValue && null !== this.endValue && (this.value = 423 e.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._thicknessType = null) 424 } function da(a, g, c) { da.base.constructor.call(this, "Crosshair", "crosshair", g, null, c); this.chart = a; this.ctx = this.chart.ctx; this.axis = c; this.optionsName = "crosshair"; this._thicknessType = "pixel" } 425 function oa(a, g) { oa.base.constructor.call(this, "ToolTip", "toolTip", g, null, a); this.chart = a; this.canvas = a.canvas; this.ctx = this.chart.ctx; this.currentDataPointIndex = this.currentSeriesIndex = -1; this._prevY = this._prevX = NaN; this.containerTransitionDuration = 0.1; this.mozContainerTransition = this.getContainerTransition(this.containerTransitionDuration); this.optionsName = "toolTip"; this._initialize() } function ia(a) { 426 this.chart = a; this.lastObjectId = 0; this.objectMap = []; this.rectangularRegionEventSubscriptions = []; this.previousDataPointEventObject = 427 null; this.ghostCanvas = va(this.chart.width, this.chart.height, !0); this.ghostCtx = this.ghostCanvas.getContext("2d"); this.mouseoveredObjectMaps = [] 428 } function X(a) { this.chart = a; this.ctx = this.chart.plotArea.ctx; this.animations = []; this.animationRequestId = null } qa(l, Z); l.prototype.destroy = function () { 429 var a = this.allDOMEventHandlers; this._animator && this._animator.cancelAllAnimations(); this._panTimerId && clearTimeout(this._panTimerId); for (var g = 0; g < a.length; g++) { 430 var c = a[g][0], b = a[g][1], e = a[g][2], h
430= a[g][3], h = h || !1; 431 c.removeEventListener ? c.removeEventListener(b, e, h) : c.detachEvent && c.detachEvent("on" + b, e) 432 } this.allDOMEventHandlers = []; for (this.removeAllEventListeners(); this._canvasJSContainer && this._canvasJSContainer.hasChildNodes();)this._canvasJSContainer.removeChild(this._canvasJSContainer.lastChild); for (; this.container && this.container.hasChildNodes();)this.container.removeChild(this.container.lastChild); for (; this._dropdownMenu && this._dropdownMenu.hasChildNodes();)this._dropdownMenu.removeChild(this._dropdownMenu.lastChild); 433 this.container = this._canvasJSContainer = null; this.toolTip.container = null; this.canvas && za(this.canvas); this.overlaidCanvas && za(this.overlaidCanvas); this._preRenderCanvas && za(this._preRenderCanvas); this._breaksCanvas && za(this._breaksCanvas); this._eventManager && this._eventManager.ghostCanvas && za(this._eventManager.ghostCanvas); this._toolBar = this._dropdownMenu = this._menuButton = this._resetButton = this._zoomButton = null 434 }; l.prototype._updateOptions = function () { 435 var a = this; this.updateOption("width"); this.updateOption("height"); 436 this.updateOption("dataPointWidth"); this.updateOption("dataPointMinWidth"); this.updateOption("dataPointMaxWidth"); this.updateOption("interactivityEnabled"); this.updateOption("theme"); this.stockChart && (this.stockChart.options && "undefined" !== typeof this.stockChart.options.theme && n(this.options.theme)) && (this.theme = this.stockChart.theme); this.updateOption("colorSet") && (this.selectedColorSet = "undefined" !== typeof Ca[this.colorSet] ? Ca[this.colorSet] : Ca.colorSet1); this.updateOption("backgroundColor"); this.stockChart && 437 (this.stockChart.options && "undefined" !== typeof this.stockChart.options.backgroundColor && n(this.options.backgroundColor)) && (this.backgroundColor = this.stockChart.backgroundColor); this.backgroundColor || (this.backgroundColor = "rgba(0,0,0,0)"); this.updateOption("culture"); this.stockChart && n(this.options.culture) && (this.culture = this.stockChart.culture); this._cultureInfo = new Ka(this.culture); this.updateOption("animationEnabled"); this.animationEnabled = this.animationEnabled && v; this.updateOption("animationDuration"); 438 this.updateOption("rangeChanging"); this.updateOption("rangeChanged"); this.updateOption("exportEnabled"); this.updateOption("exportFileName"); this.updateOption("zoomType"); this.toolbar = new Wa(this, this.options.toolbar); if (this.options.zoomEnabled || this.panEnabled) { 439 if (this._zoomButton) L(this._zoomButton, { borderRight: this.toolbar.buttonBorderThickness + "px solid " + this.toolbar.buttonBorderColor, backgroundColor: a.toolbar.itemBackgroun
439dColor, color: a.toolbar.fontColor }), ta(this, this._zoomButton, "zoom"), 0 >= 440 navigator.userAgent.search("MSIE") && this._zoomButton.childNodes[0] && L(this._zoomButton.childNodes[0], { WebkitFilter: "invert(0%)", filter: "invert(0%)" }); else { 441 var g = !1; xa(this._zoomButton = document.createElement("button")); ta(this, this._zoomButton, "pan"); this._toolBar.appendChild(this._zoomButton); this._zoomButton.style.borderRight = this.toolbar.buttonBorderThickness + "px solid " + this.toolbar.buttonBorderColor; J(this._zoomButton, "touchstart", function (a) { g = !0 }, this.allDOMEventHandlers); J(this._zoomButton, 442 "click", function () { a.zoomEnabled ? (a.zoomEnabled = !1, a.panEnabled = !0, ta(a, a._zoomButton, "zoom")) : (a.zoomEnabled = !0, a.panEnabled = !1, ta(a, a._zoomButton, "pan")); a.render() }, this.allDOMEventHandlers); J(this._zoomButton, "mousemove", function () { g ? g = !1 : (L(a._zoomButton, { backgroundColor: a.toolbar.itemBackgroun
442dColorOnHover, color: a.toolbar.fontColorOnHover, transition: "0.4s", WebkitTransition: "0.4s" }), 0 >= navigator.userAgent.search("MSIE") && L(a._zoomButton.childNodes[0], { WebkitFilter: "invert(100%)", filter: "invert(100%)" })) }, 443 this.allDOMEventHandlers); J(this._zoomButton, "mouseout", function () { g || (L(a._zoomButton, { backgroundColor: a.toolbar.itemBackgroundColor, color: a.toolbar.fontColor, transition: "0.4s", WebkitTransition: "0.4s" }), 0 >= navigator.userAgent.search("MSIE") && L(a._zoomButton.childNodes[0], { WebkitFilter: "invert(0%)", filter: "invert(0%)" })) }, this.allDOMEventHandlers) 444 } this._resetButton ? (L(this._resetButton, { 445 borderRight: this.toolbar.buttonBorderThickness + "px solid " + this.toolbar.buttonBorderColor, backgroundColor: a.toolbar.itemBackgroundColor, 446 color: a.toolbar.fontColor 447 }), 0 >= navigator.userAgent.search("MSIE") && this._resetButton.childNodes[0] && L(this._resetButton.childNodes[0], { WebkitFilter: "invert(0%)", filter: "invert(0%)" }), this._resetButton.title = this._cultureInfo.resetText) : (g = !1, xa(this._resetButton = document.createElement("button")), ta(this, this._resetButton, "reset"), this._resetButton.style.borderRight = (this.exportEnabled ? this.toolbar.buttonBorderThickness : 0) + "px solid " + this.toolbar.buttonBorderColor, this._toolBar.appendChild(this._resetButton), 448 J(this._resetButton, "touchstart", function (a) { g = !0 }, this.allDOMEventHandlers), J(this._resetButton, "click", function () { 449 a.toolTip.hide(); a.toolTip && a.toolTip.enabled && a.toolTip.dispatchEvent("hidden", { chart: a, toolTip: a.toolTip }, a.toolTip); a.zoomEnabled || a.panEnabled ? (a.zoomEnabled = !0, a.panEnabled = !1, ta(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 = 450 null, a.sessionVariables.axisX[b].newViewportMaximum = null; if (a.sessionVariables.axisX2) for (b = 0; b < a.sessionVariables.axisX2.length; b++)a.sessionVariables.axisX2[b].newViewportMinimum = null, a.sessionVariables.axisX2[b].newViewportMaximum = null; if (a.sessionVariables.axisY) for (b = 0; b < a.sessionVariables.axisY.length; b++)a.sessionVariables.axisY[b].newViewportMinimum = null, a.sessionVariables.axisY[b].newViewportMaximum = null; if (a.sessionVariables.axisY2) for (b = 0; b < a.sessionVariables.axisY2.length; b++)a.sessionVariables.axisY2[b].newViewportMinimum = 451 null, a.sessionVariables.axisY2[b].newViewportMaximum = null; a.resetOverlayedCanvas(); 0 >
451= navigator.userAgent.search("MSIE") && L(a._resetButton.childNodes[0], { WebkitFilter: "invert(0%)", filter: "invert(0%)" }); xa(a._zoomButton, a._resetButton); a.stockChart && (a.stockChart._rangeEventParameter = { stockChart: a.stockChart, source: "chart", index: a.stockChart.charts.indexOf(a), minimum: null, maximum: null }); a._dispatchRangeEvent("rangeChanging", "reset"); a.stockChart && (a.stockChart._rangeEventParameter.type = "rangeChanging", 452 a.stockChart.dispatchEvent("rangeChanging", a.stockChart._rangeEventParameter, a.stockChart)); a.render(); a.syncCharts && a.syncCharts(null, null); a._dispatchRangeEvent("rangeChanged", "reset"); a.stockChart && (a.stockChart._rangeEventParameter.type = "rangeChanged", a.stockChart.dispatchEvent("rangeChanged", a.stockChart._rangeEventParameter, a.stockChart)) 453 }, this.allDOMEventHandlers), J(this._resetButton, "mousemove", function () { 454 g || (L(a._resetButton, { 455 backgroundColor: a.toolbar.itemBackgroun
455dColorOnHover, color: a.toolbar.fontColorOnHover, 456 transition: "0.4s", WebkitTransition: "0.4s" 457 }), 0 >= navigator.userAgent.search("MSIE") && L(a._resetButton.childNodes[0], { WebkitFilter: "invert(100%)", filter: "invert(100%)" })) 458 }, this.allDOMEventHandlers), J(this._resetButton, "mouseout", function () { g || (L(a._resetButton, { backgroundColor: a.toolbar.itemBackgroundColor, color: a.toolbar.fontColor, transition: "0.4s", WebkitTransition: "0.4s" }), 0 >= navigator.userAgent.search("MSIE") && L(a._resetButton.childNodes[0], { WebkitFilter: "invert(0%)", filter: "invert(0%)" })) }, this.allDOMEventHandlers), 459 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), Ma(a._zoomButton, a._resetButton)) : (this.zoomEnabled = !0, this.panEnabled = !1)) 460 } else this.panEnabled = this.zoomEnabled = !1; ib(this); "none" !== this._toolBar.style.display && this._zoomButton && (this.panEnabled ? ta(a, a._zoomButton, "zoom") : ta(a, a._zoomButton, "pan"), 461 a._resetButton.getAttribute("state") !== a._cultureInfo.resetText && ta(a, a._resetButton, "reset")); this.options.toolTip && this.toolTip.options !== this.options.toolTip && (this.toolTip.options = this.options.toolTip); for (var c in this.toolTip.options) this.toolTip.options.hasOwnProperty(c) && this.toolTip.updateOption(c) 462 }; l.prototype._updateSize = function () { 463 var a; a = [this.canvas, this.overlaidCanvas, this._eventManager.ghostCanvas]; var g = 0, c = 0; this.options.width ? g = this.width : this.width = g = 0 < this.container.clientWidth ? 464 this.container.clientWidth : this.width; n(this.stockChart) || n(this.index) ? this.options.height ? c = this.height : this.height = c = 0 < this.container.clientHeight ? this.container.clientHeight : this.height : c = this.height = this.stockChart._chartsHeight[this.index]; if (this.canvas.width !== g * ma || this.canvas.height !== c * ma) { for (var b = 0; b < a.length; b++)Na(a[b], g, c); this.bounds = { x1: 0, y1: 0, x2: this.width, y2: this.height, width: this.width, height: this.height }; a = !0 } else a = !1; return a 465 }; l.prototype._initialize = function () { 466 this.isNavigator = 467 n(this.parent) || n(this.parent._defaultsKey) || "Navigator" !== this.parent._defaultsKey ? !1 : !0; this._animator ? this._animator.cancelAllAnimations() : this._animator = new X(this); this.removeAllEventListeners(); this.disableToolTip = !1; this._axes = []; this.funnelPyramidClickHandler = this.pieDoughnutClickHandler = null; this._updateOptions(); this.animatedRender = v && this.animationEnabled && 0 === this.renderCount; this._updateSize(); this.clearCanvas(); this.ctx.beginPath(); this.axisX = []; this.axisX2 = []; this.axisY = []; this.axisY2 = 468 []; this._indexLabels = []; this._dataInRenderedOrder = []; this._events = []; this._eventManager && this._eventManager.reset(); this.plotInfo = { axisPlacement: null, plotTypes: [] }; this.layoutManager = new Fa(0, 0, this.width, this.height, this.isNavigator ? 0 : 2); this.plotArea.layoutManager && this.plotArea.layoutManager.reset(); this.data = []; this.title = null; this.subtitles = []; var a = 0, g = null; if (this.options.data) { 469 for (var c = 0; c < this.options.data.length; c++)if (a++, !this.options.data[c].type || 0 <= l._supportedChartTypes.indexOf(this.options.data[c].type)) { 470 var b = 471 new W(this, this.options.data[c], a - 1, ++this._eventManager.lastObjectId); if (!n(b) && b.dataPoints) for (var e = 0; e < b.dataPoints.length; e++)if (b.dataPoints[e].x && b.dataPoints[e].x.getTime) { b.xValueType = "dateTime"; break } "error" === b.type && (b.linkedDataSeriesIndex = n(this.options.data[c].linkedDataSeriesIndex) ? c - 1 : this.options.data[c].linkedDataSeriesIndex, 0 > b.linkedDataSeriesIndex || b.linkedDataSeriesIndex >= this.options.data.length || "number" !== typeof b.linkedDataSeriesIndex || "error" === this.options.data[b.linkedDataSeriesIndex].type) && 472 (b.linkedDataSeriesIndex = null); null === b.name && (b.name = "DataSeries " + a); null === b.color ? 1 < this.options.data.length ? (b._colorSet = [this.selectedColorSet[b.index % this.selectedColorSet.length]], b.color = this.selectedColorSet[b.index % this.selectedColorSet.length]) : b._colorSet = "line" === b.type || "stepLine" === b.type || "spline" === b.type || "area" === b.type || "stepArea" === b.type || "splineArea" === b.type || "stackedArea" === b.type || "stackedArea100" === b.type || "rangeArea" === b.type || "rangeSplineArea" === b.type || "candlestick" === 473 b.type || "ohlc" === b.type || "waterfall" === b.type || "boxAndWhisker" === b.type ? [this.selectedColorSet[0]] : this.selectedColorSet : b._colorSet = [b.color]; null === b.markerSize && (("line" === b.type || "stepLine" === b.type || "spline" === b.type || 0 <= b.type.toLowerCase().indexOf("area")) && b.dataPoints && b.dataPoints.length < this.width / 16 || "scatter" === b.type) && (b.markerSize = 8); "bubble" !== b.type && "scatter" !== b.type || !b.dataPoints || (b.dataPoints.some ? b.dataPoints.some(function (a) { return a.x }) && b.dataPoints.sort(d) : b.dataPoints.sort(d)); 474 this.data.push(b); var e = b.axisPlacement, g = g || e, h; "normal" === e ? "xySwapped" === this.plotInfo.axisPlacement ? h = 'You cannot combine "' + b.type + '" with bar chart' : "none" === this.plotInfo.axisPlacement ? h = 'You cannot combine "' + b.type + '" with pie chart' : null === this.plotInfo.axisPlacement && (this.plotInfo.axisPlacement = "normal") : "xySwapped" === e ? "n
474ormal" === this.plotInfo.axisPlacement ? h = 'You cannot combine "' + b.type + '" with line, area, column or pie chart' : "none" === this.plotInfo.axisPlacement ? h = 'You cannot combine "' + 475 b.type + '" with pie chart' : null === this.plotInfo.axisPlacement && (this.plotInfo.axisPlacement = "xySwapped") : "none" === e ? "normal" === this.plotInfo.axisPlacement ? h = 'You cannot combine "' + b.type + '" with line, area, column or bar chart' : "xySwapped" === this.plotInfo.axisPlacement ? h = 'You cannot combine "' + b.type + '" with bar chart' : null === this.plotInfo.axisPlacement && (this.plotInfo.axisPlacement = "none") : null === e && "none" === this.plotInfo.axisPlacement && (h = 'You cannot combine "' + b.type + '" with pie chart'); if (h && window.console) { 476 window.console.log(h); 477 return 478 } 479 } for (c = 0; c < this.data.length; c++) { if ("none" == g && "error" === this.data[c].type && window.console) { window.console.log('You cannot combine "' + b.type + '" with error chart'); return } "error" === this.data[c].type && (this.data[c].axisPlacement = this.plotInfo.axisPlacement = g || "normal", this.data[c]._linkedSeries = null === this.data[c].linkedDataSeriesIndex ? null : this.data[this.data[c].linkedDataSeriesIndex]) } 480 } this._objectsInitialized = !0; this._plotAreaElements = [] 481 }; l._supportedChartTypes = Ea("line stepLine spline column area stepArea splineArea bar bubble scatter stackedColumn stackedColumn100 stackedBar stackedBar100 stackedArea stackedArea100 candlestick ohlc boxAndWhisker rangeColumn error rangeBar rangeArea rangeSplineArea pie doughnut funnel pyramid waterfall".split(" ")); 482 l.prototype.setLayout = function () { 483 for (var a = this._plotAreaElements, g = 0; g < this.data.length; g++)if ("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) { 484 if (!this.data[g].axisYType || "primary" === this.data[g].axisYType) if (this.options.axisY && 0 < this.options.axisY.length) { 485 if (!this.axisY.length) for (var c = 0; c < this.options.axisY.length; c++)"normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY[c] = new D(this, "axisY", this.options.axisY[c], c, "axisY", "left")) : "xySwapped" === 486 this.plotInfo.axisPlacement && this._axes.push(this.axisY[c] = new D(this, "axisY", this.options.axisY[c], c, "axisY", "bottom")); this.data[g].axisY = this.axisY[0 <= this.data[g].axisYIndex && this.data[g].axisYIndex < this.axisY.length ? this.data[g].axisYIndex : 0]; this.axisY[0 <= this.data[g].axisYIndex && this.data[g].axisYIndex < this.axisY.length ? this.data[g].axisYIndex : 0].dataSeries.push(this.data[g]) 487 } else this.axisY.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY[0] = new D(this, "axisY", this.options.axisY, 488 0, "axisY", "left")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY[0] = new D(this, "axisY", this.options.axisY, 0, "axisY", "bottom"))), this.data[g].axisY = this.axisY[0], this.axisY[0].dataSeries.push(this.data[g]); if ("secondary" === this.data[g].axisYType) if (this.options.axisY2 && 0 < this.options.axisY2.length) { 489 if (!this.axisY2.length) for (c = 0; c < this.options.axisY2.length; c++)"normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY2[c] = new D(this, "axisY2", this.options.axisY2[c], c, 490 "axisY", "right")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY2[c] = new D(this, "axisY2", this.options.axisY2[c], c, "axisY", "top")); this.data[g].axisY = this.axisY2[0 <= this.data[g].axisYIndex && this.data[g].axisYIndex < this.axisY2.length ? this.data[g].axisYIndex : 0]; this.axisY2[0 <= this.data[g].axisYIndex && this.data[g].axisYIndex < this.axisY2.length ? this.data[g].axisYIndex : 0].dataSeries.push(this.data[g]) 491 } else this.axisY2.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY2[0] = 492 new D(this, "axisY2", this.options.axisY2, 0, "axisY", "right")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY2[0] = new D(this, "axisY2", this.options.axisY2, 0, "axisY", "top"))), this.data[g].axisY = this.axisY2[0], this.axisY2[0].dataSeries.push(this.data[g]); if (!this.data[g].axisXType || "primary" === this.data[g].axisXType) if (this.options.axisX && 0 < this.options.axisX.length) { 493 if (!this.axisX.length) for (c = 0; c < this.options.axisX.length; c++)"normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX[c] = 494 new D(this, "axisX", this.options.axisX[c], c, "axisX", "bottom")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX[c] = new D(this, "axisX", this.options.axisX[c], c, "axisX", "left")); this.data[g].axisX = this.axisX[0 <= this.data[g].axisXIndex && this.data[g].axisXIndex < this.axisX.length ? this.data[g].axisXIndex : 0]; this.axisX[0 <= this.data[g].axisXIndex && this.data[g].axisXIndex < this.axisX.length ? this.data[g].axisXIndex : 0].dataSeries.push(this.data[g]) 495 } else this.axisX.length || ("normal" === this.plotInfo.axisPlacement ? 496 this._axes.push(this.axisX[0] = new D(this, "axisX", this.options.axisX, 0, "axisX", "bottom")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX[0] = new D(this, "axisX", this.options.axisX, 0, "axisX", "left"))), this.data[g].axisX = this.axisX[0], this.axisX[0].dataSeries.push(this.data[g]); if ("secondary" === this.data[g].axisXType) if (this.options.axisX2 && 0 < this.options.axisX2.length) { 497 if (!this.axisX2.length) for (c = 0; c < this.options.axisX2.length; c++)"normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX2[c] = 498 new D(this, "axisX2", this.options.axisX2[c], c, "axisX", "top")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX2[c] = new D(this, "axisX2", this.options.axisX2[c], c, "axisX", "right")); this.data[g].axisX = this.axisX2[0 <= this.data[g].axisXIndex && this.data[g].axisXIndex < this.axisX2.length ? this.data[g].axisXIndex : 0]; this.axisX2[0 <= this.data[g].axisXIndex && this.data[g].axisXIndex < this.axisX2.length ? this.data[g].axisXIndex : 0].dataSeries.push(this.data[g]) 499 } else this.axisX2.length || ("normal" === 500 this.plotInfo.axisPlacement ? this._axes.push(this.axisX2[0] = new D(this, "axisX2", this.options.axisX2, 0, "axisX", "top")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX2[0] = new D(this, "axisX2", this.options.axisX2, 0, "axisX", "right"))), this.data[g].axisX = this.axisX2[0], this.axisX2[0].dataSeries.push(this.data[g]) 501 } if (this.axisY) { 502 for (c = 1; c < this.axisY.length; c++)"undefined" === typeof this.axisY[c].options.gridThickness && (this.axisY[c].gridThickness = 0); for (c = 0; c < this.axisY.length - 1; c++)"undefined" === 503 typeof this.axisY[c].options.margin && (this.axisY[c].margin = 10) 504 } if (this.axisY2) { for (c = 1; c < this.axisY2.length; c++)"undefined" === typeof this.axisY2[c].options.gridThickness && (this.axisY2[c].gridThickness = 0); for (c = 0; c < this.axisY2.length - 1; c++)"undefined" === typeof this.axisY2[c].options.margin && (this.axisY2[c].margin = 10) } this.axisY && 0 < this.axisY.length && (this.axisY2 && 0 < this.axisY2.length) && (0 < this.axisY[0].gridThickness && "undefined" === typeof this.axisY2[0].options.gridThickness ? this.axisY2[0].gridThickness = 505 0 : 0 < this.axisY2[0].gridThickness && "undefined" === typeof this.axisY[0].options.gridThickness && (this.axisY[0].gridThickness = 0)); if (this.axisX) for (c = 0; c < this.axisX.length; c++)"undefined" === typeof this.axisX[c].options.gridThickness && (this.axisX[c].gridThickness = 0); if (this.axisX2) for (c = 0; c < this.axisX2.length; c++)"undefined" === typeof this.axisX2[c].options.gridThickness && (this.axisX2[c].gridThickness = 0); this.axisX && 0 < this.axisX.length && (this.axisX2 && 0 < this.axisX2.length) && (0 < this.axisX[0].gridThickness && 506 "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)); c = !1; if (0 < this._axes.length && this.options.zoomEnabled && (this.zoomEnabled || this.panEnabled)) for (g = 0; g < this._axes.length; g++)if (!n(this._axes[g].viewportMinimum) || !n(this._axes[g].viewportMaximum)) { c = !0; break } c ? (Ma(this._zoomButton, this._resetButton), this._toolBar.style.border = this.toolbar.buttonBorderThickness +
507 "px solid " + this.toolbar.buttonBorderColor, this._zoomButton.style.borderRight = this.toolbar.buttonBorderThickness + "px solid " + this.toolbar.buttonBorderColor, this._resetButton.style.borderRight = (this.exportEnabled ? this.toolbar.buttonBorderThickness : 0) + "px solid " + this.toolbar.buttonBorderColor) : (xa(this._zoomButton, this._resetButton), this._toolBar.style.border = this.toolbar.buttonBorderThickness + "px solid transparent", this.options.zoomEnabled && (this.zoomEnabled = !0, this.panEnabled = !1)); gb(this); this._processData(); 508 this.options.title && (this.title = new Ba(this, this.options.title), this.title.dockInsidePlotArea ? a.push(this.title) : this.title.setLayout()); if (this.options.subtitles) for (g = 0; g < this.options.subtitles.length; g++)c = new Ja(this, this.options.subtitles[g], g), this.subtitles.push(c), c.dockInsidePlotArea ? a.push(c) : c.setLayout(); this.legend = new R(this, this.options.legend); for (g = 0; g < this.data.length; g++)(this.data[g].showInLegend || "pie" === this.data[g].type || "doughnut" === this.data[g].type || "funnel" === this.data[g].type || 509 "pyramid" === this.data[g].type) && this.legend.dataSeries.push(this.data[g]); this.legend.dockInsidePlotArea ? a.push(this.legend) : this.legend.setLayout(); for (g = 0; g < this._axes.length; g++)if (this._axes[g].scaleBreaks && this._axes[g].scaleBreaks._appliedBreaks.length) { v ? (this._breaksCanvas = va(this.width, this.height, !0), this._breaksCanvasCtx = this._breaksCanvas.getContext("2d")) : (this._breaksCanvas = this.canvas, this._breaksCanvasCtx = this.ctx); break } this._preRenderCanvas = va(this.width, this.height); this._preRenderCtx = 510 this._preRenderCanvas.getContext("2d"); "normal" !== this.plotInfo.axisPlacement && "xySwapped" !== this.plotInfo.axisPlacement || D.setLayout(this.axisX, this.axisX2, this.axisY, this.axisY2, this.plotInfo.axisPlacement, this.layoutManager.getFreeSpace()) 511 }; l.prototype.renderElements = function () { 512 if (this.height) { 513 var a = this._plotAreaElements; this.title && !this.title.dockInsidePlotArea && this.title.render(); for (var g = 0; g < this.subtitles.length; g++)this.subtitles[g].dockInsidePlotArea || this.subtitles[g].render(); this.legend.dockInsidePlotArea || 514 this.legend.render(); if ("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) D.render(this.axisX, this.axisX2, this.axisY, this.axisY2, this.plotInfo.axisPlacement); else if ("none" === this.plotInfo.axisPlacement) this.preparePlotArea(); else return; for (g = 0; g < a.length; g++)a[g].setLayout(), a[g].render(); var c = []; if (this.animatedRender) { var b = va(this.width, this.height); b.getContext("2d").drawImage(this.canvas, 0, 0, this.width, this.height) } jb(this); var a = this.ctx.miterLimit, e; this.ctx.miterLimit = 515 3; v && this._breaksCanvas && (this._preRenderCtx.drawImage(this.canvas, 0, 0, this.width, this.height), this._preRenderCtx.drawImage(this._breaksCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx.globalCompositeOperation = "source-atop", this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), this._preRenderCtx.clearRect(0, 0, this.width, this.height)); for (g = 0; g < this.plotInfo.plotTypes.length; g++)for (var h = this.plotInfo.plotTypes[g], r = 0; r < h.plotUnits.length; r++) { 516 var x = h.plotUnits[r], 517 I = null; x.targetCanvas && za(x.targetCanvas); x.targetCanvas = null; this.animatedRender && (x.targetCanvas = va(this.width, this.height), x.targetCanvasCtx = x.targetCanvas.getContext("2d"), e = x.targetCanvasCtx.miterLimit, x.targetCanvasCtx.miterLimit = 3); "line" === x.type ? I = this.renderLine(x) : "stepLine" === x.type ? I = this.renderStepLine(x) : "spline" === x.type ? I = this.renderSpline(x) : "column" === x.type ? I = this.renderColumn(x) : "bar" === x.type ? I = this.renderBar(x) : "area" === x.type ? I = this.renderArea(x) : "stepArea" === x.type ? I = this.renderStepArea(x) : 518 "splineArea" === x.type ? I = this.renderSplineArea(x) : "stackedColumn" === x.type ? I = this.renderStackedColumn(x) : "stackedColumn100" === x.type ? I = this.renderStackedColumn100(x) : "stackedBar" === x.type ? I = this.renderStackedBar(x) : "stackedBar100" === x.type ? I = this.renderStackedBar100(x) : "stackedArea" === x.type ? I = this.renderStackedArea(x) : "stackedArea100" === x.type ? I = this.renderStackedArea100(x) : "bubble" === x.type ? I = I = this.renderBubble(x) : "scatter" === x.type ? I = this.renderScatter(x) : "pie" === x.type ? this.renderPie(x) : "doughnut" === 519 x.type ? this.renderPie(x) : "funnel" === x.type ? I = this.renderFunnel(x) : "pyramid" === x.type ? I = this.renderFunnel(x) : "candlestick" === x.type ? I = this.renderCandlestick(x) : "ohlc" === x.type ? I = this.renderCandlestick(x) : "rangeColumn" === x.type ? I = this.renderRangeColumn(x) : "error" === x.type ? I = this.renderError(x) : "rangeBar" === x.type ? I = this.renderRangeBar(x) : "rangeArea" === x.type ? I = this.renderRangeArea(x) : "rangeSplineArea" === x.type ? I = this.renderRangeSplineArea(x) : "waterfall" === x.type ? I = this.renderWaterfall(x) : "boxAndWhisker" === 520 x.type && (I = this.renderBoxAndWhisker(x)); for (var k = 0; k < x.dataSeriesIndexes.length; k++)this._dataInRenderedOrder.push(this.data[x.dataSeriesIndexes[k]]); this.animatedRender && (x.targetCanvasCtx.miterLimit = e, I && c.push(I)) 521 } this.ctx.miterLimit = a; this.animatedRender && this._breaksCanvasCtx && c.push({ source: this._breaksCanvasCtx, dest: this.plotArea.ctx, animationCallback: N.fadeInAnimation, easingFunction: N.easing.easeInQuad, animationBase: 0, startTimePercent: 0.7 }); this.animatedRender && 0 < this._indexLabels.length && 522 (e = va(this.width, this.height).getContext("2d"), Aa(e), c.push(this.renderIndexLabels(e))); var m = this; if (0 < c.length) m.disableToolTip = !0, m._animator.animate(200, m.animationDuration, function (a) { 523 m.ctx.clearRect(0, 0, m.width, m.height); m.ctx.drawImage(b, 0, 0, Math.floor(m.width * ma), Math.floor(m.height * ma), 0, 0, m.width, m.height); for (var e = 0; e < c.length; e++)I = c[e], 1 > a && "undefined" !== typeof I.startTimePercent ? a >= I.startTimePercent && I.animationCallback(I.easingFunction(a - I.startTimePercent, 0, 1, 1 - I.startTimePercent), 524 I) : I.animationCallback(I.easingFunction(a, 0, 1, 1), I); m.dispatchEvent("dataAnimationIterationEnd", { chart: m }) 525 }, function () { c = []; for (var a = 0; a < m.plotInfo.plotTypes.length; a++)for (var e = m.plotInfo.plotTypes[a], f = 0; f < e.plotUnits.length; f++) { var g = e.plotUnits[f]; g.targetCanvas && za(g.targetCanvas); g.targetCanvas = null } b = null; m.disableToolTip = !1; m.dispatchEvent("dataAnimationEnd", { chart: m }) }); else { 526 if (m._breaksCanvas) if (v) m.plotArea.ctx.drawImage(m._breaksCanvas, 0, 0, this.width, this.height); else for (k = 0; k < m._axes.length; k++)m._axes[k].createMask(); 527 0 < m._indexLabels.length && m.renderIndexLabels(); m.dispatchEvent("dataAnimationIterationEnd", { chart: m }); m.dispatchEvent("dataAnimationEnd", { chart: m }) 528 } this.attachPlotAreaEventHandlers(); this.zoomEnabled || (this.panEnabled || !this._zoomButton || "none" === this._zoomButton.style.display) || xa(this._zoomButton, this._resetButton); n(this.toolTip._xValue) || n(this.toolTip._dataSeriesIndex) || this.toolTip.showAtX(this.toolTip._xValue, this.toolTip._dataSeriesIndex); this.toolTip._updateToolTip(); this.renderCount++; Ia && 529 (m = this, setTimeout(function () { var a = document.getElementById("ghostCanvasCopy"); a && (Na(a, m.width, m.height), a.getContext("2d").drawImage(m._eventManager.ghostCanvas, 0, 0)) }, 2E3)); this._breaksCanvas && (delete this._breaksCanvas, delete this._breaksCanvasCtx); for (k = 0; k < this._axes.length; k++)this._axes[k].maskCanvas && (delete this._axes[k].maskCanvas, delete this._axes[k].maskCtx) 530 } 531 }; l.prototype.render = function (a) { 532 a && (this.options = a); this._initialize(); this.setLayout(); this.renderElements(); this._preRenderCanvas && 533 za(this._preRenderCanvas) 534 }; l.prototype.attachPlotAreaEventHandlers = function () { this.attachEvent({ context: this, chart: this, mousedown: this._plotAreaMouseDown, mouseup: this._plotAreaMouseUp, mousemove: this._plotAreaMouseMove, cursor: this.panEnabled ? "move" : "default", capture: !0, bounds: this.plotArea }) }; l.prototype.categoriseDataSeries = function () { 535 for (var a = "", g = 0; g < this.data.length; g++)if (a = this.data[g], a.dataPoints && (0 !== a.dataPoints.length && a.visible) && 0 <= l._supportedChartTypes.indexOf(a.type)) { 536 for (var c = null, 537 b = !1, e = null, h = !1, r = 0; r < this.plotInfo.plotTypes.length; r++)if (this.plotInfo.plotTypes[r].type === a.type) { b = !0; c = this.plotInfo.plotTypes[r]; break } b || (c = { type: a.type, totalDataSeries: 0, plotUnits: [] }, this.plotInfo.plotTypes.push(c)); for (r = 0; r < c.plotUnits.length; r++)if (c.plotUnits[r].axisYType === a.axisYType && c.plotUnits[r].axisXType === a.axisXType && c.plotUnits[r].axisYIndex === a.axisYIndex && c.plotUnits[r].axisXIndex === a.axisXIndex) { h = !0; e = c.plotUnits[r]; break } h || (e = { 538 type: a.type, previousDataSeriesCount: 0, index: c.plotUnits.length, 539 plotType: c, axisXType: a.axisXType, axisYType: a.axisYType, axisYIndex: a.axisYIndex, axisXIndex: a.axisXIndex, axisY: "primary" === a.axisYType ? this.axisY[0 <= a.axisYIndex && a.axisYIndex < this.axisY.length ? a.axisYIndex : 0] : this.axisY2[0 <= a.axisYIndex && a.axisYIndex < this.axisY2.length ? a.axisYIndex : 0], axisX: "primary" === a.axisXType ? this.axisX[0 <= a.axisXIndex && a.axisXIndex < this.axisX.length ? a.axisXIndex : 0] : this.axisX2[0 <= a.axisXIndex && a.axisXIndex < this.axisX2.length ? a.axisXIndex : 0], dataSeriesIndexes: [], yTotals: [], yAbsTotals: [] 540 }, 541 c.plotUnits.push(e)); c.totalDataSeries++; e.dataSeriesIndexes.push(g); a.plotUnit = e 542 } for (g = 0; g < this.plotInfo.plotTypes.length; g++)for (c = this.plotInfo.plotTypes[g], r = a = 0; r < c.plotUnits.length; r++)c.plotUnits[r].previousDataSeriesCount = a, a += c.plotUnits[r].dataSeriesIndexes.length 543 }; l.prototype.assignIdToDataPoints = function () { for (var a = 0; a < this.data.length; a++) { var g = this.data[a]; if (g.dataPoints) for (var c = g.dataPoints.length, b = 0; b < c; b++)g.dataPointIds[b] = ++this._eventManager.lastObjectId } }; l.prototype._processData = 544 function () { 545 this.assignIdToDataPoints(); this.categoriseDataSeries(); for (var a = 0; a < this.plotInfo.plotTypes.length; a++)for (var g = this.plotInfo.plotTypes[a], c = 0; c < g.plotUnits.length; c++) { 546 var b = g.plotUnits[c]; "line" === b.type || "stepLine" === b.type || "spline" === b.type || "column" === b.type || "area" === b.type || "stepArea" === b.type || "splineArea" === b.type || "bar" === b.type || "bubble" === b.type || "scatter" === b.type ? this._processMultiseriesPlotUnit(b) : "stackedColumn" === b.type || "stackedBar" === b.type || "stackedArea" === b.type ? 547 this._processStackedPlotUnit(b) : "stackedColumn100" === b.type || "stackedBar100" === b.type || "stackedArea100" === b.type ? this._processStacked100PlotUnit(b) : "candlestick" === b.type || "ohlc" === b.type || "rangeColumn" === b.type || "rangeBar" === b.type || "rangeArea" === b.type || "rangeSplineArea" === b.type || "error" === b.type || "boxAndWhisker" === b.type ? this._processMultiYPlotUnit(b) : "waterfall" === b.type && this._processSpecificPlotUnit(b) 548 } this.calculateAutoBreaks() 549 }; l.prototype._processMultiseriesPlotUnit = function (a) { 550 if (a.dataSeriesIndexes && 551 !(1 > a.dataSeriesIndexes.length)) for (var g = a.axisY.dataInfo, c = a.axisX.dataInfo, b, e, h = !1, r = 0; r < a.dataSeriesIndexes.length; r++) { 552 var x = this.data[a.dataSeriesIndexes[r]], I = 0, k = !1, m = !1, p; if ("normal" === x.axisPlacement || "xySwapped" === x.axisPlacement) var q = a.axisX.sessionVariables.newViewportMinimum ? a.axisX.sessionVariables.newViewportMinimum : a.axisX.options && a.axisX.options.viewportMinimum ? a.axisX.options.viewportMinimum : a.axisX.options && a.axisX.options.minimum ? a.axisX.options.minimum : a.axisX.logarithmic ? 553 0 : -Infinity, f = a.axisX.sessionVariables.newViewportMaximum ? a.axisX.sessionVariables.newViewportMaximum : a.axisX.options && a.axisX.options.viewportMaximum ? a.axisX.options.viewportMaximum : a.axisX.options && a.axisX.options.maximum ? a.axisX.options.maximum : Infinity; if (x.dataPoints[I].x && x.dataPoints[I].x.getTime || "dateTime" === x.xValueType) h = !0; for (I = 0; I < x.dataPoints.length; I++) { 554 "undefined" === typeof x.dataPoints[I].x && (x.dataPoints[I].x = I + (a.axisX.logarithmic ? 1 : 0)); x.dataPoints[I].x.getTime ? (h = !0, b = x.dataPoints[I].x.getTime()) : 555 b = x.dataPoints[I].x; e = x.dataPoints[I].y; b < c.min && (c.min = b); b > c.max && (c.max = b); e < g.min && "number" === typeof e && (g.min = e); e > g.max && "number" === typeof e && (g.max = e); if (0 < I) { 556 if (a.axisX.logarithmic) { var d = b / x.dataPoints[I - 1].x; 1 > d && (d = 1 / d); c.minDiff > d && 1 !== d && (c.minDiff = d) } else d = b - x.dataPoints[I - 1].x, 0 > d && (d *= -1), c.minDiff > d && 0 !== d && (c.minDiff = d); null !== e && null !== x.dataPoints[I - 1].y && (a.axisY.logarithmic ? (d = e / x.dataPoints[I - 1].y, 1 > d && (d = 1 / d), g.minDiff > d && 1 !== d && (g.minDiff = d)) : (d = e - x.dataPoints[I - 1].y, 0 > d && 557 (d *= -1), g.minDiff > d && 0 !== d && (g.minDiff = d))) 558 } if (b < q && !k) null !== e && (p = b); else { if (!k && (k = !0, 0 < I)) { I -= 2; continue } if (b > f && !m) m = !0; else if (b > f && m) continue; x.dataPoints[I].label && (a.axisX.labels[b] = x.dataPoints[I].label); b < c.viewPortMin && (c.viewPortMin = b); b > c.viewPortMax && (c.viewPortMax = b); null === e ? c.viewPortMin === b && p < b && (c.viewPortMin = p) : (e < g.viewPortMin && "number" === typeof e && (g.viewPortMin = e), e > g.viewPortMax && "number" === typeof e && (g.viewPortMax = e)) } 559 } x.axisX.valueType = x.xValueType = h ? "dateTime" : "number" 560 } 561 }; 562 l.prototype._processStackedPlotUnit = function (a) { 563 if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) { 564 for (var g = a.axisY.dataInfo, c = a.axisX.dataInfo, b, e, h = !1, r = [], x = [], I = Infinity, k = -Infinity, m = {}, p = 0; p < a.dataSeriesIndexes.length; p++) { 565 var q = this.data[a.dataSeriesIndexes[p]], f = 0, d = !1, w = !1, y; if ("normal" === q.axisPlacement || "xySwapped" === q.axisPlacement) var s = a.axisX.sessionVariables.newViewportMinimum ? a.axisX.sessionVariables.newViewportMinimum : a.axisX.options && a.axisX.options.viewportMinimum ? a.axisX.options.viewportMinimum : 566
566 a.axisX.options && a.axisX.options.minimum ? a.axisX.options.minimum : -Infinity, z = a.axisX.sessionVariables.newViewportMaximum ? a.axisX.sessionVariables.newViewportMaximum : a.axisX.options && a.axisX.options.viewportMaximum ? a.axisX.options.viewportMaximum : a.axisX.options && a.axisX.options.maximum ? a.axisX.options.maximum : Infinity; if (q.dataPoints[f].x && q.dataPoints[f].x.getTime || "dateTime" === q.xValueType) h = !0; for (f = 0; f < q.dataPoints.length; f++) { 567 "undefined" === typeof q.dataPoints[f].x && (q.dataPoints[f].x = f + (a.axisX.logarithmic ? 568 1 : 0)); q.dataPoints[f].x.getTime ? (h = !0, b = q.dataPoints[f].x.getTime()) : b = q.dataPoints[f].x; e = n(q.dataPoints[f].y) ? 0 : q.dataPoints[f].y; b < c.min && (c.min = b); b > c.max && (c.max = b); if (0 < f) { 569 if (a.axisX.logarithmic) { var u = b / q.dataPoints[f - 1].x; 1 > u && (u = 1 / u); c.minDiff > u && 1 !== u && (c.minDiff = u) } else u = b - q.dataPoints[f - 1].x, 0 > u && (u *= -1), c.minDiff > u && 0 !== u && (c.minDiff = u); null !== e && null !== q.dataPoints[f - 1].y && (a.axisY.logarithmic ? 0 < e && (u = e / q.dataPoints[f - 1].y, 1 > u && (u = 1 / u), g.minDiff > u && 1 !== u && (g.minDiff = u)) : (u = e - q.dataPoints[f - 570 1].y, 0 > u && (u *= -1), g.minDiff > u && 0 !== u && (g.minDiff = u))) 571 } if (b < s && !d) null !== q.dataPoints[f].y && (y = b); else { 572 if (!d && (d = !0, 0 < f)) { f -= 2; continue } if (b > z && !w) w = !0; else if (b > z && w) continue; q.dataPoints[f].label && (a.axisX.labels[b] = q.dataPoints[f].label); b < c.viewPortMin && (c.viewPortMin = b); b > c.viewPortMax && (c.viewPortMax = b); null === q.dataPoints[f].y ? c.viewPortMin === b && y < b && (c.viewPortMin = y) : (m[b] = (m[b] || 0) + q.dataPoints[f].y, q.dataPointEOs[f].cumulativeY = m[b], a.yTotals[b] = (a.yTotals[b] ? a.yTotals[b] : 0) + e, a.yAbsTotals[b] = 573 (a.yAbsTotals[b] ? a.yAbsTotals[b] : 0) + Math.abs(e), 0 <= e ? r[b] ? r[b] += e : (r[b] = e, I = Math.min(e, I)) : x[b] ? x[b] += e : (x[b] = e, k = Math.max(e, k))) 574 } 575 } a.axisY.scaleBreaks && (a.axisY.scaleBreaks.autoCalculate && 1 <= a.axisY.scaleBreaks.maxNumberOfAutoBreaks) && (g.dataPointYPositiveSums ? (g.dataPointYPositiveSums.push.apply(g.dataPointYPositiveSums, r), g.dataPointYNegativeSums.push.apply(g.dataPointYPositiveSums, x)) : (g.dataPointYPositiveSums = r, g.dataPointYNegativeSums = x)); q.axisX.valueType = q.xValueType = h ? "dateTime" : "number" 576 } for (f in r) r.hasOwnProperty(f) && 577 !isNaN(f) && (a = r[f], a < g.min && (g.min = Math.min(a, I)), a > g.max && (g.max = a), f < c.viewPortMin || f > c.viewPortMax || (a < g.viewPortMin && (g.viewPortMin = Math.min(a, I)), a > g.viewPortMax && (g.viewPortMax = a))); for (f in x) x.hasOwnProperty(f) && !isNaN(f) && (a = x[f], a < g.min && (g.min = a), a > g.max && (g.max = Math.max(a, k)), f < c.viewPortMin || f > c.viewPortMax || (a < g.viewPortMin && (g.viewPortMin = a), a > g.viewPortMax && (g.viewPortMax = Math.max(a, k)))) 578 } 579 }; l.prototype._processStacked100PlotUnit = function (a) { 580 if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) { 581 for (var g = 582 a.axisY.dataInfo, c = a.axisX.dataInfo, b, e, h = !1, r = !1, x = !1, I = {}, k = [], m = 0; m < a.dataSeriesIndexes.length; m++) { 583 var p = this.data[a.dataSeriesIndexes[m]], q = 0, f = !1, d = !1, w; if ("normal" === p.axisPlacement || "xySwapped" === p.axisPlacement) var y = a.axisX.sessionVariables.newViewportMinimum ? a.axisX.sessionVariables.newViewportMinimum : a.axisX.options && a.axisX.options.viewportMinimum ? a.axisX.options.viewportMinimum : a.axisX.options && a.axisX.options.minimum ? a.axisX.options.minimum : -Infinity, s = a.axisX.sessionVariables.newViewportMaximum ? 584 a.axisX.sessionVariables.newViewportMaximum : a.axisX.options && a.axisX.options.viewportMaximum ? a.axisX.options.viewportMaximum : a.axisX.options && a.axisX.options.maximum ? a.axisX.options.maximum : Infinity; if (p.dataPoints[q].x && p.dataPoints[q].x.getTime || "dateTime" === p.xValueType) h = !0; for (q = 0; q < p.dataPoints.length; q++) { 585 "undefined" === typeof p.dataPoints[q].x && (p.dataPoints[q].x = q + (a.axisX.logarithmic ? 1 : 0)); p.dataPoints[q].x.getTime ? (h = !0, b = p.dataPoints[q].x.getTime()) : b = p.dataPoints[q].x; e = n(p.dataPoints[q].y) ? 586 null : p.dataPoints[q].y; b < c.min && (c.min = b); b > c.max && (c.max = b); if (0 < q) { if (a.axisX.logarithmic) { var z = b / p.dataPoints[q - 1].x; 1 > z && (z = 1 / z); c.minDiff > z && 1 !== z && (c.minDiff = z) } else z = b - p.dataPoints[q - 1].x, 0 > z && (z *= -1), c.minDiff > z && 0 !== z && (c.minDiff = z); n(e) || null === p.dataPoints[q - 1].y || (a.axisY.logarithmic ? 0 < e && (z = e / p.dataPoints[q - 1].y, 1 > z && (z = 1 / z), g.minDiff > z && 1 !== z && (g.minDiff = z)) : (z = e - p.dataPoints[q - 1].y, 0 > z && (z *= -1), g.minDiff > z && 0 !== z && (g.minDiff = z))) } if (b < y && !f) null !== e && (w = b); else { 587 if (!f && (f = !0, 0 < q)) { 588 q -= 589 2; continue 590 } if (b > s && !d) d = !0; else if (b > s && d) continue; p.dataPoints[q].label && (a.axisX.labels[b] = p.dataPoints[q].label); b < c.viewPortMin && (c.viewPortMin = b); b > c.viewPortMax && (c.viewPortMax = b); null === e ? c.viewPortMin === b && w < b && (c.viewPortMin = w) : (I[b] = (I[b] || 0) + p.dataPoints[q].y, p.dataPointEOs[q].cumulativeY = I[b], a.yTotals[b] = (a.yTotals[b] ? a.yTotals[b] : 0) + e, a.yAbsTotals[b] = (a.yAbsTotals[b] ? a.yAbsTotals[b] : 0) + Math.abs(e), 0 <= e ? r = !0 : 0 > e && (x = !0), k[b] = k[b] ? k[b] + Math.abs(e) : Math.abs(e)) 591 } 592 } p.axisX.valueType = p.xValueType = 593 h ? "dateTime" : "number" 594 } a.axisY.logarithmic ? (g.max = n(g.viewPortMax) ? 99 * Math.pow(a.axisY.logarithmBase, -0.05) : Math.max(g.viewPortMax, 99 * Math.pow(a.axisY.logarithmBase, -0.05)), g.min = n(g.viewPortMin) ? 1 : Math.min(g.viewPortMin, 1)) : r && !x ? (g.max = n(g.viewPortMax) ? 99 : Math.max(g.viewPortMax, 99), g.min = n(g.viewPortMin) ? 1 : Math.min(g.viewPortMin, 1)) : r && x ? (g.max = n(g.viewPortMax) ? 99 : Math.max(g.viewPortMax, 99), g.min = n(g.viewPortMin) ? -99 : Math.min(g.viewPortMin, -99)) : !r && x && (g.max = n(g.viewPortMax) ? -1 : Math.max(g.viewPortMax, 595 -1), g.min = n(g.viewPortMin) ? -99 : Math.min(g.viewPortMin, -99)); g.viewPortMin = g.min; g.viewPortMax = g.max; a.dataPointYSums = k 596 } 597 }; l.prototype._processMultiYPlotUnit = function (a) { 598 if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) for (var g = a.axisY.dataInfo, c = a.axisX.dataInfo, b, e, h, r, x = !1, I = 0; I < a.dataSeriesIndexes.length; I++) { 599 var k = this.data[a.dataSeriesIndexes[I]], m = 0, p = !1, q = !1, f, d, n; if ("normal" === k.axisPlacement || "xySwapped" === k.axisPlacement) var y = a.axisX.sessionVariables.newViewportMinimum ? a.axisX.sessionVariables.newViewportMinimum : 600 a.axisX.options && a.axisX.options.viewportMinimum ? a.axisX.options.viewportMinimum : a.axisX.options && a.axisX.options.minimum ? a.axisX.options.minimum : a.axisX.logarithmic ? 0 : -Infinity, s = a.axisX.sessionVariables.newViewportMaximum ? a.axisX.sessionVariables.newViewportMaximum : a.axisX.options && a.axisX.options.viewportMaximum ? a.axisX.options.viewportMaximum : a.axisX.options && a.axisX.options.maximum ? a.axisX.options.maximum : Infinity; if (k.dataPoints[m].x && k.dataPoints[m].x.getTime || "dateTime" === k.xValueType) x = !0; 601 for (m = 0; m < k.dataPoints.length; m++) { 602 "undefined" === typeof k.dataPoints[m].x && (k.dataPoints[m].x = m + (a.axisX.logarithmic ? 1 : 0)); k.dataPoints[m].x.getTime ? (x = !0, b = k.dataPoints[m].x.getTime()) : b = k.dataPoints[m].x; if ((e = k.dataPoints[m].y) && e.length) { h = Math.min.apply(null, e); r = Math.max.apply(null, e); d = !0; for (var z = 0; z < e.length; z++)null === e.k && (d = !1); d && (p || (n = f), f = b) } b < c.min && (c.min = b); b > c.max && (c.max = b); h < g.min && (g.min = h); r > g.max && (g.max = r); 0 < m && (a.axisX.logarithmic ? (d = b / k.dataPoints[m - 1].x, 1 > d && (d = 1 / d), 603 c.minDiff > d && 1 !== d && (c.minDiff = d)) : (d = b - k.dataPoints[m - 1].x, 0 > d && (d *= -1), c.minDiff > d && 0 !== d && (c.minDiff = d)), e && (null !== e[0] && k.dataPoints[m - 1].y && null !== k.dataPoints[m - 1].y[0]) && (a.axisY.logarithmic ? (d = e[0] / k.dataPoints[m - 1].y[0], 1 > d && (d = 1 / d), g.minDiff > d && 1 !== d && (g.minDiff = d)) : (d = e[0] - k.dataPoints[m - 1].y[0], 0 > d && (d *= -1), g.minDiff > d && 0 !== d && (g.minDiff = d)))); if (!(b < y) || p) { 604 if (!p && (p = !0, 0 < m)) { m -= 2; f = n; continue } if (b > s && !q) q = !0; else if (b > s && q) continue; k.dataPoints[m].label && (a.axisX.labels[b] = k.dataPoints[m].label); 605 b < c.viewPortMin && (c.viewPortMin = b); b > c.viewPortMax && (c.viewPortMax = b); if (c.viewPortMin === b && e) for (z = 0; z < e.length; z++)if (null === e[z] && f < b) { c.viewPortMin = f; break } null === e ? c.viewPortMin === b && f < b && (c.viewPortMin = f) : (h < g.viewPortMin && (g.viewPortMin = h), r > g.viewPortMax && (g.viewPortMax = r)) 606 } 607 } k.axisX.valueType = k.xValueType = x ? "dateTime" : "number" 608 } 609 }; l.prototype._processSpecificPlotUnit = function (a) { 610 if ("waterfall" === a.type && a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) for (var g = a.axisY.dataInfo, c = a.axisX.dataInfo, 611 b, e, h = !1, r = 0; r < a.dataSeriesIndexes.length; r++) { 612 var x = this.data[a.dataSeriesIndexes[r]], d = 0, k = !1, m = !1, p = b = 0; if ("normal" === x.axisPlacement || "xySwapped" === x.axisPlacement) var q = a.axisX.sessionVariables.newViewportMinimum ? a.axisX.sessionVariables.newViewportMinimum : a.axisX.options && a.axisX.options.viewportMinimum ? a.axisX.options.viewportMinimum : a.axisX.options && a.axisX.options.minimum ? a.axisX.options.minimum : a.axisX.logarithmic ? 0 : -Infinity, f = a.axisX.sessionVariables.newViewportMaximum ? a.axisX.sessionVariables.newViewportMaximum : 613 a.axisX.options && a.axisX.options.viewportMaximum ? a.axisX.options.viewportMaximum : a.axisX.options && a.axisX.options.maximum ? a.axisX.options.maximum : Infinity; if (x.dataPoints[d].x && x.dataPoints[d].x.getTime || "dateTime" === x.xValueType) h = !0; for (d = 0; d < x.dataPoints.length; d++)"undefined" !== typeof x.dataPoints[d].isCumulativeSum && !0 === x.dataPoints[d].isCumulativeSum ? (x.dataPointEOs[d].cumulativeSumYStartValue = 0, x.dataPointEOs[d].cumulativeSum = 0 === d ? 0 : x.dataPointEOs[d - 1].cumulativeSum, x.dataPoints[d].y = 0 === 614 d ? 0 : x.dataPointEOs[d - 1].cumulativeSum) : "undefined" !== typeof x.dataPoints[d].isIntermediateSum && !0 === x.dataPoints[d].isIntermediateSum ? (x.dataPointEOs[d].cumulativeSumYStartValue = p, x.dataPointEOs[d].cumulativeSum = 0 === d ? 0 : x.dataPointEOs[d - 1].cumulativeSum, x.dataPoints[d].y = 0 === d ? 0 : b, p = 0 === d ? 0 : x.dataPointEOs[d - 1].cumulativeSum, b = 0) : (e = "number" !== typeof x.dataPoints[d].y ? 0 : x.dataPoints[d].y, x.dataPointEOs[d].cumulativeSumYStartValue = 0 === d ? 0 : x.dataPointEOs[d - 1].cumulativeSum, x.dataPointEOs[d].cumulativeSum = 615 0 === d ? e : x.dataPointEOs[d - 1].cumulativeSum + e, b += e); for (d = 0; d < x.dataPoints.length; d++)if ("undefined" === typeof x.dataPoints[d].x && (x.dataPoints[d].x = d + (a.axisX.logarithmic ? 1 : 0)), x.dataPoints[d].x.getTime ? (h = !0, b = x.dataPoints[d].x.getTime()) : b = x.dataPoints[d].x, e = x.dataPoints[d].y, b < c.min && (c.min = b), b > c.max && (c.max = b), x.dataPointEOs[d].cumulativeSum < g.min && (g.min = x.dataPointEOs[d].cumulativeSum), x.dataPointEOs[d].cumulativeSum > g.max && (g.max = x.dataPointEOs[d].cumulativeSum), 0 < d && (a.axisX.logarithmic ? (p = 616 b / x.dataPoints[d - 1].x, 1 > p && (p = 1 / p), c.minDiff > p && 1 !== p && (c.minDiff = p)) : (p = b - x.dataPoints[d - 1].x, 0 > p && (p *= -1), c.minDiff > p && 0 !== p && (c.minDiff = p)), null !== e && null !== x.dataPoints[d - 1].y && (a.axisY.logarithmic ? (e = x.dataPointEOs[d].cumulativeSum / x.dataPointEOs[d - 1].cumulativeSum, 1 > e && (e = 1 / e), g.minDiff > e && 1 !== e && (g.minDiff = e)) : (e = x.dataPointEOs[d].cumulativeSum - x.dataPointEOs[d - 1].cumulativeSum, 0 > e && (e *= -1), g.minDiff > e && 0 !== e && (g.minDiff = e)))), !(b < q) || k) { 617 if (!k && (k = !0, 0 < d)) { d -= 2; continue } if (b > f && !m) m = !0; else if (b > 618 f && m) continue; x.dataPoints[d].label && (a.axisX.labels[b] = x.dataPoints[d].label); b < c.viewPortMin && (c.viewPortMin = b); b > c.viewPortMax && (c.viewPortMax = b); 0 < d && (x.dataPointEOs[d - 1].cumulativeSum < g.viewPortMin && (g.viewPortMin = x.dataPointEOs[d - 1].cumulativeSum), x.dataPointEOs[d - 1].cumulativeSum > g.viewPortMax && (g.viewPortMax = x.dataPointEOs[d - 1].cumulativeSum)); x.dataPointEOs[d].cumulativeSum < g.viewPortMin && (g.viewPortMin = x.dataPointEOs[d].cumulativeSum); x.dataPointEOs[d].cumulativeSum > g.viewPortMax && (g.viewPortMax = 619 x.dataPointEOs[d].cumulativeSum) 620 } x.axisX.valueType = x.xValueType = h ? "dateTime" : "number" 621 } 622 }; l.prototype.calculateAutoBreaks = function () { 623 function a(a, b, c, e) { if (e) return c = Math.pow(Math.min(c * a / b, b / a), 0.2), 1 >= c && (c = Math.pow(1 > a ? 1 / a : Math.min(b / a, a), 0.25)), { startValue: a * c, endValue: b / c }; c = 0.2 * Math.min(c - b + a, b - a);
623 0 >= c && (c = 0.25 * Math.min(b - a, Math.abs(a))); return { startValue: a + c, endValue: b - c } } function g(a) { 624 if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) { 625 var b = a.axisX.scaleBreaks && a.axisX.scaleBreaks.autoCalculate && 626 1 <= a.axisX.scaleBreaks.maxNumberOfAutoBreaks, c = a.axisY.scaleBreaks && a.axisY.scaleBreaks.autoCalculate && 1 <= a.axisY.scaleBreaks.maxNumberOfAutoBreaks; if (b || c) for (var f = a.axisY.dataInfo, g = a.axisX.dataInfo, h, r = g.min, k = g.max, m = f.min, p = f.max, g = g._dataRanges, f = f._dataRanges, q, x = 0, d = 0; d < a.dataSeriesIndexes.length; d++) { 627 var I = e.data[a.dataSeriesIndexes[d]]; if (!(4 > I.dataPoints.length)) for (x = 0; x < I.dataPoints.length; x++)if (b && (q = (k + 1 - r) * Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold) || 10, 10) / 100, 628 h = I.dataPoints[x].x.getTime ? I.dataPoints[x].x.getTime() : I.dataPoints[x].x, q = Math.floor((h - r) / q), h < g[q].min && (g[q].min = h), h > g[q].max && (g[q].max = h)), c) { 629 var v = (p + 1 - m) * Math.max(parseFloat(a.axisY.scaleBreaks.collapsibleThreshold) || 10, 10) / 100; if ((h = "waterfall" === a.type ? I.dataPointEOs[x].cumulativeSum : I.dataPoints[x].y) && h.length) for (var l = 0; l < h.length; l++)q = Math.floor((h[l] - m) / v), h[l] < f[q].min && (f[q].min = h[l]), h[l] > f[q].max && (f[q].max = h[l]); else n(h) || (q = Math.floor((h - m) / v), h < f[q].min && (f[q].min = h), h > 630 f[q].max && (f[q].max = h)) 631 } 632 } 633 } 634 } function c(a) { 635 if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length) && a.axisX.scaleBreaks && a.axisX.scaleBreaks.autoCalculate && 1 <= a.axisX.scaleBreaks.maxNumberOfAutoBreaks) for (var b = a.axisX.dataInfo, c = b.min, f = b.max, g = b._dataRanges, h, r = 0, k = 0; k < a.dataSeriesIndexes.length; k++) { 636 var m = e.data[a.dataSeriesIndexes[k]]; if (!(4 > m.dataPoints.length)) for (r = 0; r < m.dataPoints.length; r++)h = (f + 1 - c) * Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold) || 10, 10) / 100, b = m.dataPoints[r].x.getTime ? 637 m.dataPoints[r].x.getTime() : m.dataPoints[r].x, h = Math.floor((b - c) / h), b < g[h].min && (g[h].min = b), b > g[h].max && (g[h].max = b) 638 } 639 } for (var b, e = this, h = !1, r = 0; r < this._axes.length; r++)if (this._axes[r].scaleBreaks && this._axes[r].scaleBreaks.autoCalculate && 1 <= this._axes[r].scaleBreaks.maxNumberOfAutoBreaks) { h = !0; this._axes[r].dataInfo._dataRanges = []; for (var x = 0; x < 100 / Math.max(parseFloat(this._axes[r].scaleBreaks.collapsibleThreshold) || 10, 10); x++)this._axes[r].dataInfo._dataRanges.push({ min: Infinity, max: -Infinity }) } if (h) { 640 for (r = 641 0; r < this.plotInfo.plotTypes.length; r++)for (h = this.plotInfo.plotTypes[r], x = 0; x < h.plotUnits.length; x++)b = h.plotUnits[x], "line" === b.type || "stepLine" === b.type || "spline" === b.type || "column" === b.type || "area" === b.type || "stepArea" === b.type || "splineArea" === b.type || "bar" === b.type || "bubble" === b.type || "scatter" === b.type || "candlestick" === b.type || "ohlc" === b.type || "rangeColumn" === b.type || "rangeBar" === b.type || "rangeArea" === b.type || "rangeSplineArea" === b.type || "waterfall" === b.type || "error" === b.type || "boxAndWhisker" === 642 b.type ? g(b) : 0 <= b.type.indexOf("stacked") && c(b); for (r = 0; r < this._axes.length; r++)if (this._axes[r].dataInfo._dataRanges) { 643 var d = this._axes[r].dataInfo.min; b = (this._axes[r].dataInfo.max + 1 - d) * Math.max(parseFloat(this._axes[r].scaleBreaks.collapsibleThreshold) || 10, 10) / 100; var k = this._axes[r].dataInfo._dataRanges, m, p, h = []; if (this._axes[r].dataInfo.dataPointYPositiveSums) { 644 var q = this._axes[r].dataInfo.dataPointYPositiveSums; m = k; for (x in q) if (q.hasOwnProperty(x) && !isNaN(x) && (p = q[x], !n(p))) { 645 var f = Math.floor((p - 646 d) / b); p < m[f].min && (m[f].min = p); p > m[f].max && (m[f].max = p) 647 } delete this._axes[r].dataInfo.dataPointYPositiveSums 648 } if (this._axes[r].dataInfo.dataPointYNegativeSums) { q = this._axes[r].dataInfo.dataPointYNegativeSums; m = k; for (x in q) q.hasOwnProperty(x) && !isNaN(x) && (p = -1 * q[x], n(p) || (f = Math.floor((p - d) / b), p < m[f].min && (m[f].min = p), p > m[f].max && (m[f].max = p))); delete this._axes[r].dataInfo.dataPointYNegativeSums } for (x = 0; x < k.length - 1; x++)if (m = k[x].max, isFinite(m)) for (; x < k.length - 1;)if (d = k[x + 1].min, isFinite(d)) { 649 p = d - 650 m; p > b && h.push({ diff: p, start: m, end: d }); break 651 } else x++; if (this._axes[r].scaleBreaks.customBreaks) for (x = 0; x < this._axes[r].scaleBreaks.customBreaks.length; x++)for (b = 0; b < h.length; b++)if (this._axes[r].scaleBreaks.customBreaks[x].startValue <= h[b].start && h[b].start <= this._axes[r].scaleBreaks.customBreaks[x].endValue || this._axes[r].scaleBreaks.customBreaks[x].startValue <= h[b].start && h[b].start <= this._axes[r].scaleBreaks.customBreaks[x].endValue || h[b].start <= this._axes[r].scaleBreaks.customBreaks[x].startValue && 652 this._axes[r].scaleBreaks.customBreaks[x].startValue <= h[b].end || h[b].start <= this._axes[r].scaleBreaks.customBreaks[x].endValue && this._axes[r].scaleBreaks.customBreaks[x].endValue <= h[b].end) h.splice(b, 1), b--; h.sort(function (a, b) { return b.diff - a.diff }); for (x = 0; x < Math.min(h.length, this._axes[r].scaleBreaks.maxNumberOfAutoBreaks); x++)b = a(h[x].start, h[x].end, this._axes[r].logarithmic ? this._axes[r].dataInfo.max / this._axes[r].dataInfo.min : this._axes[r].dataInfo.max - this._axes[r].dataInfo.min, this._axes[r].logarithmic), 653 this._axes[r].scaleBreaks.autoBreaks.push(new ca(this, "autoBreaks", b, x, ++this._eventManager.lastObjectId, this._axes[r].scaleBreaks)), this._axes[r].scaleBreaks._appliedBreaks.push(this._axes[r].scaleBreaks.autoBreaks[this._axes[r].scaleBreaks.autoBreaks.length - 1]); this._axes[r].scaleBreaks._appliedBreaks.sort(function (a, b) { return a.startValue - b.startValue }) 654 } 655 } 656 }; l.prototype.renderCrosshairs = function (a) { 657 for (var g = 0; g < this.axisX.length; g++)this.axisX[g] != a && (this.axisX[g].crosshair && this.axisX[g].crosshair.enabled && 658 !this.axisX[g].crosshair._hidden) && this.axisX[g].showCrosshair(this.axisX[g].crosshair._updatedValue); for (g = 0; g < this.axisX2.length; g++)this.axisX2[g] != a && (this.axisX2[g].crosshair && this.axisX2[g].crosshair.enabled && !this.axisX2[g].crosshair._hidden) && this.axisX2[g].showCrosshair(this.axisX2[g].crosshair._updatedValue); for (g = 0; g < this.axisY.length; g++)this.axisY[g] != a && (this.axisY[g].crosshair && this.axisY[g].crosshair.enabled && !this.axisY[g].crosshair._hidden) && this.axisY[g].showCrosshair(this.axisY[g].crosshair._updatedValue); 659 for (g = 0; g < this.axisY2.length; g++)this.axisY2[g] != a && (this.axisY2[g].crosshair && this.axisY2[g].crosshair.enabled && !this.axisY2[g].crosshair._hidden) && this.axisY2[g].showCrosshair(this.axisY2[g].crosshair._updatedValue) 660 }; l.prototype.getDataPointAtXY = function (a, g, c) { 661 c = c || !1; for (var b = [], e = this._dataInRenderedOrder.length - 1; 0 <= e; e--) { var h = null; (h = this._dataInRenderedOrder[e].getDataPointAtXY(a, g, c)) && b.push(h) } a = null; g = !1; for (c = 0; c < b.length; c++)if ("line" === b[c].dataSeries.type || "stepLine" === b[c].dataSeries.type || 662 "area" === b[c].dataSeries.type || "stepArea" === b[c].dataSeries.type) if (e = na("markerSize", b[c].dataPoint, b[c].dataSeries
662) || 8, b[c].distance <= e / 2) { g = !0; break } for (c = 0; c < b.length; c++)g && "line" !== b[c].dataSeries.type && "stepLine" !== b[c].dataSeries.type && "area" !== b[c].dataSeries.type && "stepArea" !== b[c].dataSeries.type || (a ? b[c].distance <= a.distance && (a = b[c]) : a = b[c]); return a 663 }; l.prototype.getObjectAtXY = function (a, g, c) { 664 var b = null; if (c = this.getDataPointAtXY(a, g, c || !1)) b = c.dataSeries.dataPointIds[c.dataPointIndex]; 665 else if (v) b = bb(a, g, this._eventManager.ghostCtx); else for (c = 0; c < this.legend.items.length; c++) { var e = this.legend.items[c]; a >= e.x1 && (a <= e.x2 && g >= e.y1 && g <= e.y2) && (b = e.id) } return b 666 }; l.prototype.getAutoFontSize = nb; l.prototype.resetOverlayedCanvas = function () { this.overlaidCanvasCtx.clearRect(0, 0, this.width, this.height) }; l.prototype.clearCanvas = mb; l.prototype.attachEvent = function (a) { this._events.push(a) }; l.prototype._touchEventHandler = function (a) { 667 if (a.changedTouches && this.interactivityEnabled) { 668 var g = [], c = 669 a.changedTouches, b = c ? c[0] : a, e = null; switch (a.type) { case "touchstart": case "MSPointerDown": g = ["mousemove", "mousedown"]; this._lastTouchData = Qa(b); this._lastTouchData.time = new Date; break; case "touchmove": case "MSPointerMove": g = ["mousemove"]; break; case "touchend": case "MSPointerUp": var h = this._lastTouchData && this._lastTouchData.time ? new Date - this._lastTouchData.time : 0, g = "touchstart" === this._lastTouchEventType || "MSPointerDown" === this._lastTouchEventType || 300 > h ? ["mouseup", "click"] : ["mouseup"]; break; default: return }if (!(c && 670 1 < c.length)) { 671 e = Qa(b); e.time = new Date; try { var r = e.y - this._lastTouchData.y, h = e.time - this._lastTouchData.time; if (1 < Math.abs(r) && this._lastTouchData.scroll || 5 < Math.abs(r) && 250 > h) this._lastTouchData.scroll = !0 } catch (x) { } this._lastTouchEventType = a.type; if (this._lastTouchData.scroll && this.zoomEnabled) this.isDrag && this.resetOverlayedCanvas(), this.isDrag = !1; else for (c = 0; c < g.length; c++)if (e = g[c], r = document.createEvent("MouseEvent"), r.initMouseEvent(e, !0, !0, window, 1, b.screenX, b.screenY, b.clientX, b.clientY, !1, 672 !1, !1, !1, 0, null), b.target.dispatchEvent(r), !n(this._lastTouchData.scroll) && !this._lastTouchData.scroll || !this._lastTouchData.scroll && 250 < h || "click" === e) a.preventManipulation && a.preventManipulation(), a.preventDefault && a.cancelable && a.preventDefault() 673 } 674 } 675 }; l.prototype._dispatchRangeEvent = function (a, g) { 676 var c = { chart: this }; c.type = a; c.trigger = g; var b = []; this.axisX && 0 < this.axisX.length && b.push("axisX"); this.axisX2 && 0 < this.axisX2.length && b.push("axisX2"); this.axisY && 0 < this.axisY.length && b.push("axisY"); this.axisY2 && 677 0 < this.axisY2.length && b.push("axisY2"); for (var e = 0; e < b.length; e++)if (n(c[b[e]]) && (c[b[e]] = []), "axisY" === b[e]) for (var h = 0; h < this.axisY.length; h++)c[b[e]].push({ viewportMinimum: this[b[e]][h].sessionVariables.newViewportMinimum, viewportMaximum: this[b[e]][h].sessionVariables.newViewportMaximum }); else if ("axisY2" === b[e]) for (h = 0; h < this.axisY2.length; h++)c[b[e]].push({ viewportMinimum: this[b[e]][h].sessionVariables.newViewportMinimum, viewportMaximum: this[b[e]][h].sessionVariables.newViewportMaximum }); else if ("axisX" === 678 b[e]) for (h = 0; h < this.axisX.length; h++)c[b[e]].push({ viewportMinimum: this[b[e]][h].sessionVariables.newViewportMinimum, viewportMaximum: this[b[e]][h].sessionVariables.newViewportMaximum }); else if ("axisX2" === b[e]) for (h = 0; h < this.axisX2.length; h++)c[b[e]].push({ viewportMinimum: this[b[e]][h].sessionVariables.newViewportMinimum, viewportMaximum: this[b[e]][h].sessionVariables.newViewportMaximum }); this.dispatchEvent(a, c, this) 679 }; l.prototype._mouseEventHandler = function (a) { 680 function g() { 681 l.capturedEventParam && (e =
682 l.capturedEventParam, r = e.bounds, "mouseup" === b && (l.capturedEventParam = null, e.chart.overlaidCanvas.releaseCapture ? e.chart.overlaidCanvas.releaseCapture() : document.documentElement.removeEventListener("mouseup", e.chart._mouseEventHandler, !1)), e.hasOwnProperty(b) && ("mouseup" !== b || e.chart.overlaidCanvas.releaseCapture ? a.target !== e.chart.overlaidCanvas && v || e[b].call(e.context, c.x, c.y) : a.target !== e.chart.overlaidCanvas && (e.chart.isDrag = !1))) 683 } "undefined" === typeof a.target && a.srcElement && (a.target = a.srcElement); 684 var c = Qa(a), b = a.type, e, h; a.which ? h = 3 == a.which : a.button && (h = 2 == a.button); if (this._ignoreNextEvent) g(), this._ignoreNextEvent = !1; else if (g(), this.interactivityEnabled) { 685 a.preventManipulation && a.preventManipulation(); a.preventDefault && a.preventDefault(); var r; Ia && window.console && (window.console.log(b + " --\x3e x: " + c.x + "; y:" + c.y), h && window.console.log(a.which), "mouseup" === b && window.console.log("mouseup")); if (!h) { 686 if (!l.capturedEventParam && this._events) { 687 for (h = 0; h < this._events.length; h++)if (this._events[h].hasOwnProperty(b)) if (e = 688 this._events[h], r = e.bounds, c.x >= r.x1 && c.x <= r.x2 && c.y >= r.y1 && c.y <= r.y2) { e[b].call(e.context, c.x, c.y); "mousedown" === b && !0 === e.capture ? (l.capturedEventParam = e, this.overlaidCanvas.setCapture ? this.overlaidCanvas.setCapture() : document.documentElement.addEventListener("mouseup", this._mouseEventHandler, !1)) : "mouseup" === b && (e.chart.overlaidCanvas.releaseCapture ? e.chart.overlaidCanvas.releaseCapture() : document.documentElement.removeEventListener("mouseup", this._mouseEventHandler, !1)); break } else e = null; a.target.style.cursor = 689 e && e.cursor ? e.cursor : this._defaultCursor 690 } h = this.plotArea; if (c.x < h.x1 || c.x > h.x2 || c.y < h.y1 || c.y > h.y2) { 691 this.toolTip && this.toolTip.enabled ? (this.toolTip.hide(), this.toolTip.dispatchEvent("hidden", { chart: this, toolTip: this.toolTip }, this.toolTip)) : this.resetOverlayedCanvas(); for (h = 0; h < this.axisX.length; h++)this.axisX[h].crosshair && this.axisX[h].crosshair.enabled && (this.axisX[h].crosshair.hide(), this.axisX[h].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisX[h].options }, this.axisX[h].crosshair)); 692 for (h = 0; h < this.axisX2.length; h++)this.axisX2[h].crosshair && this.axisX2[h].crosshair.enabled && (this.axisX2[h].crosshair.hide(), this.axisX2[h].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisX2[h].options }, this.axisX2[h].crosshair)); for (h = 0; h < this.axisY.length; h++)this.axisY[h].crosshair && this.axisY[h].crosshair.enabled && (this.axisY[h].crosshair.hide(), this.axisY[h].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisY[h].options }, this.axisY[h].crosshair)); for (h = 0; h < this.axisY2.length; h++)this.axisY2[h].crosshair && 693 this.axisY2[h].crosshair.enabled && (this.axisY2[h].crosshair.hide(), this.axisY2[h].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisY2[h].options }, this.axisY2[h].crosshair)) 694 } this.isDrag && this.zoomEnabled || !this._eventManager || this._eventManager.mouseEventHandler(a) 695 } 696 } 697 }; l.prototype._plotAreaMouseDown = function (a, g) { this.isDrag = !0; this.dragStartPoint = { x: a, y: g } }; l.prototype._plotAreaMouseUp = function (a, g) { 698 if (("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) && this.isDrag) { 699 var c = 700 g - this.dragStartPoint.y, b = a - this.dragStartPoint.x, e = 0 <= this.zoomType.indexOf("x"), h
700= 0 <= this.zoomType.indexOf("y"), r = !1; this.resetOverlayedCanvas(); if ("xySwapped" === this.plotInfo.axisPlacement) var x = h, h = e, e = x; if (this.panEnabled || this.zoomEnabled) { 701 if (this.panEnabled) for (e = h = 0; e < this._axes.length; e++)c = this._axes[e], c.logarithmic ? c.viewportMinimum < c.minimum ? (h = c.minimum / c.viewportMinimum, c.sessionVariables.newViewportMinimum = c.viewportMinimum * h, c.sessionVariables.newViewportMaximum = c.viewportMaximum * 702 h, r = !0) : c.viewportMaximum > c.maximum && (h = c.viewportMaximum / c.maximum, c.sessionVariables.newViewportMinimum = c.viewportMinimum / h, c.sessionVariables.newViewportMaximum = c.viewportMaximum / h, r = !0) : c.viewportMinimum < c.minimum ? (h = c.minimum - c.viewportMinimum, c.sessionVariables.newViewportMinimum = c.viewportMinimum + h, c.sessionVariables.newViewportMaximum = c.viewportMaximum + h, r = !0) : c.viewportMaximum > c.maximum && (h = c.viewportMaximum - c.maximum, c.sessionVariables.newViewportMinimum = c.viewportMinimum - h, c.sessionVariables.newViewportMaximum = 703 c.viewportMaximum - h, r = !0); else if ((!e || 2 < Math.abs(b)) && (!h || 2 < Math.abs(c)) && this.zoomEnabled) { if (!this.dragStartPoint) return; c = e ? this.dragStartPoint.x : this.plotArea.x1; b = h ? this.dragStartPoint.y : this.plotArea.y1; e = e ? a : this.plotArea.x2; h = h ? g : this.plotArea.y2; 2 < Math.abs(c - e) && 2 < Math.abs(b - h) && this._zoomPanToSelectedRegion(c, b, e, h) && (r = !0) } r && (this._ignoreNextEvent = !0, this._dispatchRangeEvent("rangeChanging", "zoom"), this.stockChart && (this.stockChart.navigator && this.stockChart.navigator.enabled) && (this.stockChart._rangeEventParameter || 704 (this.stockChart._rangeEventParameter = { stockChart: this.stockChart, source: "chart", index: this.stockChart.charts.indexOf(this), minimum: this.stockChart.sessionVariables._axisXMin, maximum: this.stockChart.sessionVariables._axisXMax }), this.stockChart._rangeEventParameter.type = "rangeChanging", this.stockChart.dispatchEvent("rangeChanging", this.stockChart._rangeEventParameter, this.stockChart)), this.render(), this._dispatchRangeEvent("rangeChanged", "zoom"), this.stockChart && (this.stockChart.rangeUpdatedBy = "chart", 705 this.stockChart.navigator && this.stockChart.navigator.enabled && (this.stockChart._rangeEventParameter.type = "rangeChanged", this.stockChart.dispatchEvent("rangeChanged", this.stockChart._rangeEventParameter, this.stockChart))), r && (this.zoomEnabled && "none" === this._zoomButton.style.display) && (Ma(this._zoomButton, this._resetButton), ta(this, this._zoomButton, "pan"), ta(this, this._resetButton, "reset"))) 706 } 707 } this.isDrag = !1; if ("none" !== this.plotInfo.axisPlacement) { 708 this.resetOverlayedCanvas(); if (this.axisX && 0 < this.axisX.length) for (r = 709 0; r < this.axisX.length; r++)this.axisX[r].crosshair && this.axisX[r].crosshair.enabled && this.axisX[r].renderCrosshair(a, g); if (this.axisX2 && 0 < this.axisX2.length) for (r = 0; r < this.axisX2.length; r++)this.axisX2[r].crosshair && this.axisX2[r].crosshair.enabled && this.axisX2[r].renderCrosshair(a, g); if (this.axisY && 0 < this.axisY.length) for (r = 0; r < this.axisY.length; r++)this.axisY[r].crosshair && this.axisY[r].crosshair.enabled && this.axisY[r].renderCrosshair(a, g); if (this.axisY2 && 0 < this.axisY2.length) for (r = 0; r < this.axisY2.length; r++)this.axisY2[r].crosshair && 710 this.axisY2[r].crosshair.enabled && this.axisY2[r].renderCrosshair(a, g); if (this.axisX && 0 < this.axisX.length) for (r = 0; r < this.axisX.length; r++)this.axisX[r].crosshair && this.axisX[r].crosshair.enabled && this.axisX[r].crosshair.renderLabel(); if (this.axisX2 && 0 < this.axisX2.length) for (r = 0; r < this.axisX2.length; r++)this.axisX2[r].crosshair && this.axisX2[r].crosshair.enabled && this.axisX2[r].crosshair.renderLabel(); if (this.axisY && 0 < this.axisY.length) for (r = 0; r < this.axisY.length; r++)this.axisY[r].crosshair && this.axisY[r].crosshair.enabled && 711 this.axisY[r].crosshair.renderLabel(); if (this.axisY2 && 0 < this.axisY2.length) for (r = 0; r < this.axisY2.length; r++)this.axisY2[r].crosshair && this.axisY2[r].crosshair.enabled && this.axisY2[r].crosshair.renderLabel() 712 } 713 }; l.prototype._plotAreaMouseMove = function (a, g) { 714 if (this.isDrag && "none" !== this.plotInfo.axisPlacement) { 715 var c = 0, b = 0, e = c = null, e = 0 <= this.zoomType.indexOf("x"), h
715= 0 <= this.zoomType.indexOf("y"), r = this; "xySwapped" === this.plotInfo.axisPlacement && (c = h, h = e, e = c); c = this.dragStartPoint.x - a; b = this.dragStartPoint.y - 716 g; if (2 < Math.abs(c) && 8 > Math.abs(c) && (this.panEnabled || this.zoomEnabled)) { 717 this.toolTip.hide(); this.toolTip && this.toolTip.enabled && this.toolTip.dispatchEvent("hidden", { chart: this, toolTip: this.toolTip }, this.toolTip); for (var x = 0; x < this.axisX.length; x++)this.axisX[x].crosshair && this.axisX[x].crosshair.enabled && (this.axisX[x].crosshair.hide(), this.axisX[x].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisX[x].options }, this.axisX[x].crosshair)); for (x = 0; x < this.axisX2.length; x++)this.axisX2[x].crosshair && 718 this.axisX2[x].crosshair.enabled && (this.axisX2[x].crosshair.hide(), this.axisX2[x].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisX2[x].options }, this.axisX2[x].crosshair)); for (x = 0; x < this.axisY.length; x++)this.axisY[x].crosshair && this.axisY[x].crosshair.enabled && (this.axisY[x].crosshair.hide(), this.axisY[x].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisY[x].options }, this.axisY[x].crosshair)); for (x = 0; x < this.axisY2.length; x++)this.axisY2[x].crosshair && this.axisY2[x].crosshair.enabled && 719 (this.axisY2[x].crosshair.hide(), this.axisY2[x].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisY2[x].options }, this.axisY2[x].crosshair)) 720 } else this.panEnabled || this.zoomEnabled || this.toolTip.mouseMoveHandler(a, g); if ((!e || 2 < Math.abs(c) || !h || 2 < Math.abs(b)) && (this.panEnabled || this.zoomEnabled)) if (this.panEnabled) e = { x1: e ? this.plotArea.x1 + c : this.plotArea.x1, y1: h ? this.plotArea.y1 + b : this.plotArea.y1, x2: e ? this.plotArea.x2 + c : this.plotArea.x2, y2: h ? this.plotArea.y2 + b : this.plotArea.y2 }, clearTimeout(r._panTimerId), 721 r._panTimerId = setTimeout(function (b, c, e, f) { 722 return function () { 723 r._zoomPanToSelectedRegion(b, c, e, f, !0) && (r._dispatchRangeEvent("rangeChanging", "pan"), r.stockChart && (r.stockChart.navigator && r.stockChart.navigator.enabled) && (r.stockChart._rangeEventParameter.type = "rangeChanging", r.stockChart.dispatchEvent("rangeChanging", r.stockChart._rangeEventParameter, r.stockChart)), r.render(), r._dispatchRangeEvent("rangeChanged", "pan"), r.stockChart && (r.stockChart.navigator && r.stockChart.navigator.enabled) && (r.stockChart._rangeEventParameter.type = 724 "rangeChanged", r.stockChart.dispatchEvent("rangeChanged", r.stockChart._rangeEventParameter, r.stockChart)), r.dragStartPoint.x = a, r.dragStartPoint.y = g) 725 } 726 }(e.x1, e.y1, e.x2, e.y2), 0); else if (this.zoomEnabled) { 727 this.resetOverlayedCanvas(); c = this.overlaidCanvasCtx.globalAlpha; this.overlaidCanvasCtx.fillStyle = "#A89896"; var b = e ? this.dragStartPoint.x : this.plotArea.x1, x = h ? this.dragStartPoint.y : this.plotArea.y1, d = e ? a - this.dragStartPoint.x : this.plotArea.x2 - this.plotArea.x1, k = h ? g - this.dragStartPoint.y : this.plotArea.y2 - 728 this.plotArea.y1; this.validateRegion(b, x, e ? a : this.plotArea.x2 - this.plotArea.x1, h ? g : this.plotArea.y2 - this.plotArea.y1, "xy" !== this.zoomType).isValid && (this.resetOverlayedCanvas(), this.overlaidCanvasCtx.fillStyle = "#99B2B5"); this.overlaidCanvasCtx.globalAlpha = 0.7; this.overlaidCanvasCtx.fillRect(b, x, d, k); this.overlaidCanvasCtx.globalAlpha = c 729 } 730 } else if (this.toolTip.mouseMoveHandler(a, g), "none" !== this.plotInfo.axisPlacement) { 731 if (this.axisX && 0 < this.axisX.length) for (e = 0; e < this.axisX.length; e++)this.axisX[e].crosshair && 732 this.axisX[e].crosshair.enabled && this.axisX[e].renderCrosshair(a, g); if (this.axisX2 && 0 < this.axisX2.length) for (e = 0; e < this.axisX2.length; e++)this.axisX2[e].crosshair && this.axisX2[e].crosshair.enabled && this.axisX2[e].renderCrosshair(a, g); if (this.axisY && 0 < this.axisY.length) for (e = 0; e < this.axisY.length; e++)this.axisY[e].crosshair && this.axisY[e].crosshair.enabled && this.axisY[e].renderCrosshair(a, g); if (this.axisY2 && 0 < this.axisY2.length) for (e = 0; e < this.axisY2.length; e++)this.axisY2[e].crosshair && this.axisY2[e].crosshair.enabled && 733 this.axisY2[e].renderCrosshair(a, g); if (this.axisX && 0 < this.axisX.length) for (e = 0; e < this.axisX.length; e++)this.axisX[e].crosshair && this.axisX[e].crosshair.enabled && this.axisX[e].crosshair.renderLabel(); if (this.axisX2 && 0 < this.axisX2.length) for (e = 0; e < this.axisX2.length; e++)this.axisX2[e].crosshair && this.axisX2[e].crosshair.enabled && this.axisX2[e].crosshair.renderLabel(); if (this.axisY && 0 < this.axisY.length) for (e = 0; e < this.axisY.length; e++)this.axisY[e].crosshair && this.axisY[e].crosshair.enabled && this.axisY[e].crosshair.renderLabel(); 734 if (this.axisY2 && 0 < this.axisY2.length) for (e = 0; e < this.axisY2.length; e++)this.axisY2[e].crosshair && this.axisY2[e].crosshair.enabled && this.axisY2[e].crosshair.renderLabel() 735 } 736 }; l.prototype._zoomPanToSelectedRegion = function (a, g, c, b, e) { 737 a = this.validateRegion(a, g, c, b, e); g = a.axesWithValidRange; c = a.axesRanges; if (a.isValid) for (b = 0; b < g.length; b++)e = c[b], g[b].setViewPortRange(e.val1, e.val2), this.syncCharts && "y" != this.zoomType && this.syncCharts(e.val1, e.val2), this.stockChart && (this.stockChart._rangeEventParameter = 738 { stockChart: this.stockChart, source: "chart", index: this.stockChart.charts.indexOf(this), minimum: e.val1, maximum: e.val2 }); return a.isValid 739 }; l.prototype.validateRegion = function (a, g, c, b, e) { 740 e = e || !1; for (var h = 0 <= this.zoomType.indexOf("x"), r = 0 <= this.zoomType.indexOf("y"), x = !1, d = [], k = [], m = [], p
740= 0; p < this._axes.length; p++)("axisX" === this._axes[p].type && h || "axisY" === this._axes[p].type && r) && k.push(this._axes[p]); for (r = 0; r < k.length; r++) { 741 var p = k[r], h = !1, q = p.convertPixelToValue({ x: a, y: g }), f = p.convertPixelToValue({ 742 x: c, 743 y: b 744 }); if (q > f) var n = f, f = q, q = n; if (p.scaleBreaks) for (n = 0; !h && n < p.scaleBreaks._appliedBreaks.length; n++)h = p.scaleBreaks._appliedBreaks[n].startValue <= q && p.scaleBreaks._appliedBreaks[n].endValue >= f; if (isFinite(p.dataInfo.minDiff)) if (n = p.getApparentDifference(q, f, null, !0), !(h || !(this.panEnabled && p.scaleBreaks && p.scaleBreaks._appliedBreaks.length) && (p.logarithmic && n < Math.pow(p.dataInfo.minDiff, 3) || !p.logarithmic && n < 3 * Math.abs(p.dataInfo.minDiff)) || q < p.minimum || f > p.maximum)) d.push(p), m.push({ val1: q, val2: f }), 745 x = !0; else if (!e) { x = !1; break } 746 } return { isValid: x, axesWithValidRange: d, axesRanges: m } 747 }; l.prototype.preparePlotArea = function () { 748 var a = this.plotArea; !v && (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])) { 749 var g = this.axisX[0] ? this.axisX[0].lineCoordinates : this.axisX2[0].lineCoordinates; if (this.axisY && 0 < this.axisY.length && this.axisY[0]) { 750 var c = this.axisY[0]; a.x1 = g.x1 < g.x2 ? g.x1 : c.lineCoordinates.x1; a.y1 = g.y1 < c.lineCoordinates.y1 ? g.y1 : c.lineCoordinates.y1; 751 a.x2 = g.x2 > c.lineCoordinates.x2 ? g.x2 : c.lineCoordinates.x2; a.y2 = g.y1 > c.lineCoordinates.y2 ? g.y1 : c.lineCoordinates.y2; a.width = a.x2 - a.x1; a.height = a.y2 - a.y1 752 } this.axisY2 && 0 < this.axisY2.length && this.axisY2[0] && (c = this.axisY2[0], a.x1 = g.x1 < g.x2 ? g.x1 : c.lineCoordinates.x1, a.y1 = g.y1 < c.lineCoordinates.y1 ? g.y1 : c.lineCoordinates.y1, a.x2 = g.x2 > c.lineCoordinates.x2 ? g.x2 : c.lineCoordinates.x2, a.y2 = g.y2 > c.lineCoordinates.y2 ? g.y2 : c.lineCoordinates.y2, a.width = a.x2 - a.x1, a.height = a.y2 - a.y1) 753 } else g = this.layoutManager.getFreeSpace(), 754 a.x1 = g.x1, a.x2 = g.x2, a.y1 = g.y1, a.y2 = g.y2, a.width = g.width, a.height = g.height; v || (a.canvas.width = a.width, a.canvas.height = a.height, a.canvas.style.left = a.x1 + "px", a.canvas.style.top = a.y1 + "px", (0 < a.x1 || 0 < a.y1) && a.ctx.translate(-a.x1, -a.y1)); a.layoutManager = new Fa(a.x1, a.y1, a.x2, a.y2, 2) 755 }; l.prototype.renderIndexLabels = function (a) { 756 var g = a || this.plotArea.ctx, c = this.plotArea, b = 0, e = 0, h = 0, r = e = h = 0, x = 0, d = b = 0, k = 0; for (a = 0; a < this._indexLabels.length; a++) { 757 var m = this._indexLabels[a], p = m.chartType.toLowerCase(), q, f, x = na("indexLabelFontColor",
758 m.dataPoint, m.dataSeries), Sa = na("indexLabelFontSize", m.dataPoint, m.dataSeries), d = na("indexLabelFontFamily", m.dataPoint, m.dataSeries), k = na("indexLabelFontStyle", m.dataPoint, m.dataSeries); q = na("indexLabelFontWeight", m.dataPoint, m.dataSeries); var w = na("indexLabelBackgroundColor", m.dataPoint, m.dataSeries); f = na("indexLabelMaxWidth", m.dataPoint, m.dataSeries); var h = na("indexLabelWrap", m.dataPoint, m.dataSeries), y = na("indexLabelLineDashType", m.dataPoint, m.dataSeries), s = na("indexLabelLineColor", m.dataPoint, 759 m.dataSeries), z = n(m.dataPoint.indexLabelLineThickness) ? n(m.dataSeries.options.indexLabelLineThickness) ? 0 : m.dataSeries.options.indexLabelLineThickness : m.dataPoint.indexLabelLineThickness, b = 0 < z ? Math.min(10, ("normal" === this.plotInfo.axisPlacement ? this.plotArea.height : this.plotArea.width) << 0) : 0, u = { percent: null, total: null }, l = 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 || 760 m.dataPoint.indexLabelFormatter) l = { chart: this, dataSeries: m.dataSeries, dataPoint: m.dataPoint, index: m.indexKeyword, total: u.total, percent: u.percent }; var B = m.dataPoint.indexLabelFormatter ? m.dataPoint.indexLabelFormatter(l) : m.dataPoint.indexLabel ? this.replaceKeywordsWithValue(m.dataPoint.indexLabel, m.dataPoint, m.dataSeries, null, m.indexKeyword) : m.dataSeries.indexLabelFormatter ? m.dataSeries.indexLabelFormatter(l) : m.dataSeries.indexLabel ? this.replaceKeywordsWithValue(m.dataSeries.indexLabel, m.dataPoint, m.dataSeries, 761 null, m.indexKeyword) : null; if (null !== B && "" !== B) { 762 var u = na("indexLabelPlacement", m.dataPoint, m.dataSeries), l = na("indexLabelOrientation", m.dataPoint, m.dataSeries), C = na("indexLabelTextAlign", m.dataPoint, m.dataSeries), t = m.direction, e = m.dataSeries.axisX, r = m.dataSeries.axisY, A = !1, w = new ka(g, { x: 0, y: 0, maxWidth: f ? f : 0.5 * this.width, maxHeight: h ? 5 * Sa : 1.5 * Sa, angle: "horizontal" === l ? 0 : -90, text: B, padding: 0, backgroundColor: w, textAlign: C, fontSize: Sa, fontFamily: d, fontWeight: q, fontColor: x, fontStyle: k, textBaseline: "middle" }); 763 w.measureText(); m.dataSeries.indexLabelMaxWidth = w.maxWidth; if ("stackedarea100" === p) { if (m.point.x < c.x1 || m.point.x > c.x2 || m.point.y < c.y1 - 1 || m.point.y > c.y2 + 1) continue } else if ("rangearea" === p || "rangesplinearea" === p) { if (m.dataPoint.x < e.viewportMinimum || m.dataPoint.x > e.viewportMaximum || Math.max.apply(null, m.dataPoint.y) < r.viewportMinimum || Math.min.apply(null, m.dataPoint.y) > r.viewportMaximum) continue } else if (0 <= p.indexOf("line") || 0 <= p.indexOf("area") || 0 <= p.indexOf("bubble") || 0 <= p.indexOf("scatter")) { 764 if (m.dataPoint.x < 765 e.viewportMinimum || m.dataPoint.x > e.viewportMaximum || m.dataPoint.y < r.viewportMinimum || m.dataPoint.y > r.viewportMaximum) continue 766 } else if (0 <= p.indexOf("column") || "waterfall" === p || "error" === p && !m.axisSwapped) { if (m.dataPoint.x < e.viewportMinimum || m.dataPoint.x > e.viewportMaximum || m.bounds.y1 > c.y2 || m.bounds.y2 < c.y1) continue } else if (0 <= p.indexOf("bar") || "error" === p) { if (m.dataPoint.x < e.viewportMinimum || m.dataPoint.x > e.viewportMaximum || m.bounds.x1 > c.x2 || m.bounds.x2 < c.x1) continue } else if ("candlestick" === p || "ohlc" === 767 p) { if (m.dataPoint.x < e.viewportMinimum || m.dataPoint.x > e.viewportMaximum || Math.max.apply(null, m.dataPoint.y) < r.viewportMinimum || Math.min.apply(null, m.dataPoint.y) > r.viewportMaximum) continue } else if (m.dataPoint.x < e.viewportMinimum || m.dataPoint.x > e.viewportMaximum) continue; r = x = 2; "horizontal" === l ? (d = w.width, k = w.height) : (k = w.width, d = w.height); if ("normal" === this.plotInfo.axisPlacement) { 768 if (0 <= p.indexOf("line") || 0 <= p.indexOf("area")) u = "auto", x = 4; else if (0 <= p.indexOf("stacked")) "auto" === u && (u = "inside"); else if ("bubble" === 769 p || "scatter" === p) u = "inside"; q = m.point.x - d / 2 + ("horizontal" === l ? 0 : w._lineHeight / 2); if ("inside" !== u) e = c.y1, h = c.y2, 0 < t ? (f = m.point.y + w._lineHeight / 2 - k - x - b, f < e && (f = "auto" === u ? Math.max(m.point.y, e) + w._lineHeight / 2 + x + b : e + w._lineHeight / 2 + x + b, A = f + ("horizontal" === l ? k - w._lineHeight / 2 : 0) > m.point.y, !A || (0 <= p.indexOf("line") || 0 <= p.indexOf("area")) || (f -= b))) : (f = m.point.y + w._lineHeight / 2 + x + b, f > h - k + w._lineHeight / 2 - x && (f = "auto" === u ? Math.min(m.point.y, h) + w._lineHeight / 2 - k - x - b : h + w._lineHeight / 2 - k - x - b, A = f - ("horizontal" === 770 l ? w._lineHeight / 2 : k) < m.point.y, !A || (0 <= p.indexOf("line") || 0 <= p.indexOf("area")) || (f += b))); else { 771 Math.max(m.bounds.y1, c.y1); h = Math.min(m.bounds.y2, c.y2) - k + w._lineHeight / 2; b = 0 <= p.indexOf("range") || "error" === p ? 0 < t ? Math.max(m.bounds.y1, c.y1) + w._lineHeight / 2 + x : Math.min(m.bounds.y2, c.y2) + w._lineHeight / 2 - k - x : (Math.max(m.bounds.y1, c.y1) + Math.min(m.bounds.y2, c.y2)) / 2 - k / 2 + w._lineHeight / 2; if (0 < t) { 772 if (f = b, "bubble" === p || "scatter" === p) f = m.point.y - k / 2 + w._lineHeight / 2, k >
772 m.bounds.y2 - m.bounds.y1 && (f -= k / 2 + x), 0 > f - w._lineHeight / 773 2 && (f += Math.abs(f - w._lineHeight / 2) <= (m.bounds.y2 - m.bounds.y1) / 2 + x ? Math.abs(f - w._lineHeight / 2) : (m.bounds.y2 - m.bounds.y1) / 2 + x) 774 } else f = Math.min(m.point.y, b), f > h - k - x && ("bubble" === p || "scatter" === p) && (f = Math.min(m.point.y + x, c.y2 - k - x)); f = Math.min(f, h) 775 } 776 } else 0 <= p.indexOf("line") || 0 <= p.indexOf("area") || 0 <= p.indexOf("scatter") ? (u = "auto", r = 4) : 0 <= p.indexOf("stacked") ? "auto" === u && (u = "inside") : "bubble" === p && (u = "inside"), f = m.point.y + w._lineHeight / 2 - k / 2, "inside" !== u ? (h = c.x1, e = c.x2, 0 > t ? (q = m.point.x - d + ("horizontal" === 777 l ? 0 : w._lineHeight / 2) - r - b, ("horizontal" === l ? q : q - w._lineHeight / 2) < h && (q = "auto" === u ? Math.max(m.point.x, h) + ("horizontal" === l ? 0 : w._lineHeight / 2) + x + b : h + ("horizontal" === l ? 0 : w._lineHeight / 2) + r, (A = q + d - ("horizontal" === l ? 0 : w._lineHeight / 2) > m.point.x) && (q -= b))) : (q = m.point.x + ("horizontal" === l ? 0 : w._lineHeight / 2) + r + b, ("horizontal" === l ? q : q - w._lineHeight / 2) > e - d - r - b && (q = "auto" === u ? Math.min(m.point.x, e) - ("horizontal" === l ? d : d - w._lineHeight / 2) - r - b : e - d - r + ("horizontal" === l ? 0 : w._lineHeight / 2), (A = q - ("horizontal" === l ? 0 : w._lineHeight / 778 2) < m.point.x) && (q += b)))) : (h = Math.max(m.bounds.x1, c.x1), Math.min(m.bounds.x2, c.x2), b = 0 <= p.indexOf("range") || "error" === p ? 0 > t ? Math.max(m.bounds.x1, c.x1) : Math.min(m.bounds.x2, c.x2) - d - r + ("horizontal" === l ? 0 : w._lineHeight / 2) : (Math.max(m.bounds.x1, c.x1) + Math.min(m.bounds.x2, c.x2)) / 2 - d / 2 + ("horizontal" === l ? 0 : w._lineHeight / 2), q = 0 > t ? b : Math.min(m.point.x, b), q = Math.max(q, h + ("horizontal" === l ? 0 : w._lineHeight / 2 + x))); "vertical" === l && (f += k - w._lineHeight / 2, 0 <= "ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(p) && 779 (A = 0 < t ? f + ("horizontal" === l ? k - w._lineHeight / 2 : 0) > m.point.y : f - ("horizontal" === l ? w._lineHeight / 2 : k) < m.point.y), "bubble" === p || "scatter" === p) && (q += w._lineHeight / 2 - Sa / 2); w.x = q; w.y = f; w.render(!0); z && ("inside" !== u && (0 > p.indexOf("bar") && ("error" !== p || !m.axisSwapped) && m.point.x > c.x1 && m.point.x < c.x2 || !A) && (-1 === "ohlc candlestick boxandwhisker column rangecolumn stackedcolumn stackedcolumn100 error".split(" ").indexOf(p) && ("error" !== p || m.axisSwapped) && m.point.y > c.y1 && m.point.y < c.y2 || !A)) && (g.lineWidth = z, g.strokeStyle = 780 s ? s : "gray", g.setLineDash && g.setLineDash(H(y, z)), g.beginPath(), g.moveTo(m.point.x, m.point.y), 0 <= p.indexOf("bar") || "error" === p && m.axisSwapped ? g.lineTo(q + (0 < m.direction ? 0 : d) + ("vertical" === l ? -w._lineHeight / 2 : 0), f + ("vertical" === l ? -k / 2 : k / 2 - w._lineHeight / 2)) : 0 <= p.indexOf("column") || "error" === p && !m.axisSwapped ? g.lineTo(q + d / 2 - ("horizontal" === l ? 0 : w._lineHeight / 2), f + ("vertical" === l ? f - k < m.point.y ? 0 : -k : (f - w._lineHeight / 2 < m.point.y ? k : 0) - w._lineHeight / 2)) : 0 <= p.indexOf("waterfall") ? g.lineTo(q + d / 2 - ("horizontal" === 781 l ? 0 : w._lineHeight / 2), "vertical" === l ? 0 < t && f < m.point.y ? f : 0 > t && f - k > m.point.y ? f - k : m.point.y : 0 < t && f + k - w._lineHeight / 2 < m.point.y ? f + k - w._lineHeight / 2 : 0 > t && f - w._lineHeight / 2 > m.point.y ? f - w._lineHeight / 2 : m.point.y) : g.lineTo(q + d / 2 - ("horizontal" === l ? 0 : w._lineHeight / 2), f + ("vertical" === l ? f - k < m.point.y ? 0 : -k : (f + k - w._lineHeight / 2 < m.point.y ? k : 0) - w._lineHeight / 2)), g.stroke()) 782 } 783 } g = { source: g, dest: this.plotArea.ctx, animationCallback: N.fadeInAnimation, easingFunction: N.easing.easeInQuad, animationBase: 0, startTimePercent: 0.7 }; 784 for (a = 0; a < this._indexLabels.length;
784 a++)m = this._indexLabels[a], w = na("indexLabelBackgroundColor", m.dataPoint, m.dataSeries), m.dataSeries.indexLabelBackgroundColor = n(w) ? v ? "transparent" : null : w; return g 785 }; l.prototype.renderLine = function (a) { 786 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g; if (!(0 >= a.dataSeriesIndexes.length)) { 787 var b = this._eventManager.ghostCtx; c.save(); var e = this.plotArea; c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); for (var h = [], r, x = 0; x < a.dataSeriesIndexes.length; x++) { 788 var d = 789 a.dataSeriesIndexes[x], k = this.data[d]; c.lineWidth = k.lineThickness; var m = k.dataPoints, p = "solid"; if (c.setLineDash) { var q = H(k.nullDataLineDashType, k.lineThickness), p = k.lineDashType, f = H(p, k.lineThickness); c.setLineDash(f) } var n = k.id; this._eventManager.objectMap[n] = { objectType: "dataSeries", dataSeriesIndex: d }; n = O(n); b.strokeStyle = n; b.lineWidth = 0 < k.lineThickness ? Math.max(k.lineThickness, 4) : 0; var n = k._colorSet, w = n = k.lineColor = k.options.lineColor ? k.options.lineColor : n[0]; c.strokeStyle = n; var y = !0, s = 0, l, u; c.beginPath(); 790 if (0 < m.length) { 791 for (var E = !1, s = 0; s < m.length; s++)if (l = m[s].x.getTime ? m[s].x.getTime() : m[s].x, !(l < a.axisX.dataInfo.viewPortMin || l > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !E))) if ("number" !== typeof m[s].y) 0 < s && !(k.connectNullData || E || y) && (c.stroke(), v && b.stroke()), E = !0; else { 792 l = a.axisX.convertValueToPixel(l); u = a.axisY.convertValueToPixel(m[s].y); var B = k.dataPointIds[s]; this._eventManager.objectMap[B] = { id: B, objectType: "dataPoint", dataSeriesIndex: d, dataPointIndex: s, x1: l, y1: u }; y || E ? (!y && k.connectNullData ? 793 (c.setLineDash && (k.options.nullDataLineDashType || p === k.lineDashType && k.lineDashType !== k.nullDataLineDashType) && (c.stroke(), c.beginPath(), c.moveTo(r.x, r.y), p = k.nullDataLineDashType, c.setLineDash(q)), c.lineTo(l, u), v && b.lineTo(l, u)) : (c.beginPath(), c.moveTo(l, u), v && (b.beginPath(), b.moveTo(l, u))), E = y = !1) : (c.lineTo(l, u), v && b.lineTo(l, u), 0 == s % 500 && (c.stroke(), c.beginPath(), c.moveTo(l, u), v && (b.stroke(), b.beginPath(), b.moveTo(l, u)))); r = { x: l, y: u }; s < m.length - 1 && (w !== (m[s].lineColor || n) || p !== (m[s].lineDashType || 794 k.lineDashType)) && (c.stroke(), c.beginPath(), c.moveTo(l, u), w = m[s].lineColor || n, c.strokeStyle = w, c.setLineDash && (m[s].lineDashType ? (p = m[s].lineDashType, c.setLineDash(H(p, k.lineThickness))) : (p = k.lineDashType, c.setLineDash(f)))); if (0 !== m[s].markerSize && (0 < m[s].markerSize || 0 < k.markerSize)) { var C = k.getMarkerProperties(s, l, u, c); h.push(C); B = O(B); v && h.push({ x: l, y: u, ctx: b, type: C.type, size: C.size, color: B, borderColor: B, borderThickness: C.borderThickness }) } (m[s].indexLabel || k.indexLabel || m[s].indexLabelFormatter || 795 k.indexLabelFormatter) && this._indexLabels.push({ chartType: "line", dataPoint: m[s], dataSeries: k, point: { x: l, y: u }, direction: 0 > m[s].y === a.axisY.reversed ? 1 : -1, color: n }) 796 } c.stroke(); v && b.stroke() 797 } 798 } Y.drawMarkers(h); v && (g.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 799 0, 0, this.width, this.height), c.clearRect(e.x1, e.y1, e.width, e.height), b.beginPath());
799 c.restore(); c.beginPath(); return { source: g, dest: this.plotArea.ctx, animationCallback: N.xClipAnimation, easingFunction: N.easing.linear, animationBase: 0 } 800 } 801 }; l.prototype.renderStepLine = function (a) { 802 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g; if (!(0 >= a.dataSeriesIndexes.length)) { 803 var b = this._eventManager.ghostCtx; c.save(); var e = this.plotArea; c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); for (var h = 804 [], r, x = 0; x < a.dataSeriesIndexes.length; x++) { 805 var d = a.dataSeriesIndexes[x], k = this.data[d]; c.lineWidth = k.lineThickness; var m = k.dataPoints, p = "solid"; if (c.setLineDash) { var q = H(k.nullDataLineDashType, k.lineThickness), p = k.lineDashType, f = H(p, k.lineThickness); c.setLineDash(f) } var n = k.id; this._eventManager.objectMap[n] = { objectType: "dataSeries", dataSeriesIndex: d }; n = O(n); b.strokeStyle = n; b.lineWidth = 0 < k.lineThickness ? Math.max(k.lineThickness, 4) : 0; var n = k._colorSet, w = n = k.lineColor = k.options.lineColor ? k.options.lineColor : 806 n[0]; c.strokeStyle = n; var l = !0, s = 0, z, u; c.beginPath(); if (0 < m.length) { 807 for (var E = !1, s = 0; s < m.length; s++)if (z = m[s].getTime ? m[s].x.getTime() : m[s].x, !(z < a.axisX.dataInfo.viewPortMin || z > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !E))) if ("number" !== typeof m[s].y) 0 < s && !(k.connectNullData || E || l) && (c.stroke(), v && b.stroke()), E = !0; else { 808 var B = u; z = a.axisX.convertValueToPixel(z); u = a.axisY.convertValueToPixel(m[s].y); var C = k.dataPointIds[s]; this._eventManager.objectMap[C] = { 809 id: C, objectType: "dataPoint", dataSeriesIndex: d, 810 dataPointIndex: s, x1: z, y1: u 811 }; l || E ? (!l && k.connectNullData ? (c.setLineDash && (k.options.nullDataLineDashType || p === k.lineDashType && k.lineDashType !== k.nullDataLineDashType) && (c.stroke(), c.beginPath(), c.moveTo(r.x, r.y), p = k.nullDataLineDashType, c.setLineDash(q)), c.lineTo(z, B), c.lineTo(z, u), v && (b.lineTo(z, B), b.lineTo(z, u))) : (c.beginPath(), c.moveTo(z, u), v && (b.beginPath(), b.moveTo(z, u))), E = l = !1) : (c.lineTo(z, B), v && b.lineTo(z, B), c.lineTo(z, u), v && b.lineTo(z, u), 0 == s % 500 && (c.stroke(), c.beginPath(), c.moveTo(z, u), v && 812 (b.stroke(), b.beginPath(), b.moveTo(z, u)))); r = { x: z, y: u }; s < m.length - 1 && (w !== (m[s].lineColor || n) || p !== (m[s].lineDashType || k.lineDashType)) && (c.stroke(), c.beginPath(), c.moveTo(z, u), w = m[s].lineColor || n, c.strokeStyle = w, c.setLineDash && (m[s].lineDashType ? (p = m[s].lineDashType, c.setLineDash(H(p, k.lineThickness))) : (p = k.lineDashType, c.setLineDash(f)))); 0 !== m[s].markerSize && (0 < m[s].markerSize || 0 < k.markerSize) && (B = k.getMarkerProperties(s, z, u, c), h.push(B), C = O(C), v && h.push({ 813 x: z, y: u, ctx: b, type: B.type, size: B.size, 814 color: C, borderColor: C, borderThickness: B.borderThickness 815 })); (m[s].indexLabel || k.indexLabel || m[s].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({ chartType: "stepLine", dataPoint: m[s], dataSeries: k, point: { x: z, y: u }, direction: 0 > m[s].y === a.axisY.reversed ? 1 : -1, color: n }) 816 } c.stroke(); v && b.stroke() 817 } 818 } Y.drawMarkers(h); v && (g.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), 819 a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(e.x1, e.y1, e.width, e.height), b.beginPath());
819 c.restore(); c.beginPath(); return { source: g, dest: this.plotArea.ctx, animationCallback: N.xClipAnimation, easingFunction: N.easing.linear, animationBase: 0 } 820 } 821 }; l.prototype.renderSpline = function (a) { 822 function g(a) { 823 a = t(a, 2); if (0 < a.length) { 824 b.beginPath(); v && e.beginPath(); b.moveTo(a[0].x, 825 a[0].y); a[0].newStrokeStyle && (b.strokeStyle = a[0].newStrokeStyle); a[0].newLineDashArray && b.setLineDash(a[0].newLineDashArray); v && e.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), v && e.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), 826 a[c + 3].newLineDashArray && b.setLineDash(a[c + 3].newLineDashArray), v && (e.stroke(), e.beginPath(), e.moveTo(a[c + 3].x, a[c + 3].y)); b.stroke(); v && e.stroke() 827 } 828 } var c = a.targetCanvasCtx || this.plotArea.ctx, b = v ? this._preRenderCtx : c; if (!(0 >= a.dataSeriesIndexes.length)) { 829 var e = this._eventManager.ghostCtx; b.save(); var h = this.plotArea; b.beginPath(); b.rect(h.x1, h.y1, h.width, h.height); b.clip(); for (var r = [], x = 0; x < a.dataSeriesIndexes.length; x++) { 830 var d = a.dataSeriesIndexes[x], k = this.data[d]; b.lineWidth = k.lineThickness; var m = 831 k.dataPoints, p = "solid"; if (b.setLineDash) { var q = H(k.nullDataLineDashType, k.lineThickness), p = k.lineDashType, f = H(p, k.lineThickness); b.setLineDash(f) } var n = k.id; this._eventManager.objectMap[n] = { objectType: "dataSeries", dataSeriesIndex: d }; n = O(n); e.strokeStyle = n; e.lineWidth = 0 < k.lineThickness ? Math.max(k.lineThickness, 4) : 0; var n = k._colorSet, w = n = k.lineColor = k.options.lineColor ? k.options.lineColor : n[0]; b.strokeStyle = n; var l = 0, s, z, u = []; b.beginPath(); if (0 < m.length) for (z = !1, l = 0; l < m.length; l++)if (s = m[l].getTime ? 832 m[l].x.getTime() : m[l].x, !(s < a.axisX.dataInfo.viewPortMin || s > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !z))) if ("number" !== typeof m[l].y) 0 < l && !z && (k.connectNullData ? b.setLineDash && (0 < u.length && (k.options.nullDataLineDashType || !m[l - 1].lineDashType)) && (u[u.length - 1].newLineDashArray = q, p = k.nullDataLineDashType) : (g(u), u = [])), z = !0; else { 833 s = a.axisX.convertValueToPixel(s); z = a.axisY.convertValueToPixel(m[l].y); var E = k.dataPointIds[l]; this._eventManager.objectMap[E] = { 834 id: E, objectType: "dataPoint", dataSeriesIndex: d, 835 dataPointIndex: l, x1: s, y1: z 836 }; u[u.length] = { x: s, y: z }; l < m.length - 1 && (w !== (m[l].lineColor || n) || p !== (m[l].lineDashType || k.lineDashType)) && (w = m[l].lineColor || n, u[u.length - 1].newStrokeStyle = w, b.setLineDash && (m[l].lineDashType ? (p = m[l].lineDashType, u[u.length - 1].newLineDashArray = H(p, k.lineThickness)) : (p = k.lineDashType, u[u.length - 1].newLineDashArray = f))); if (0 !== m[l].markerSize && (0 < m[l].markerSize || 0 < k.markerSize)) { 837 var B = k.getMarkerProperties(l, s, z, b); r.push(B); E = O(E); v && r.push({ 838 x: s, y: z, ctx: e, type: B.type, size: B.size, 839 color: E, borderColor: E, borderThickness: B.borderThickness 840 }) 841 } (m[l].indexLabel || k.indexLabel || m[l].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({ chartType: "spline", dataPoint: m[l], dataSeries: k, point: { x: s, y: z }, direction: 0 >
841 m[l].y === a.axisY.reversed ? 1 : -1, color: n }); z = !1 842 } g(u) 843 } Y.drawMarkers(r); v && (c.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && 844 b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.clearRect(h.x1, h.y1, h.width, h.height), e.beginPath()); b.restore(); b.beginPath(); return { source: c, dest: this.plotArea.ctx, animationCallback: N.xClipAnimation, easingFunction: N.easing.linear, animationBase: 0 } 845 } 846 }; l.prototype.renderColumn = function (a) { 847 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g; if (!(0 >= a.dataSeriesIndexes.length)) { 848 var b = 849 null, e = this.plotArea, h = 0, r, x, d, k = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), h = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1, m = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.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.options.dataPointWidth ? 850 this.dataPointWidth : 0.9 * (e.width * (a.axisX.logarithmic ? Math.log(p) / Math.log(a.axisX.range) : Math.abs(p) / Math.abs(a.axisX.range)) / a.plotType.totalDataSeries) << 0; this.dataPointMaxWidth && h > m && (h = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, m)); !this.dataPointMaxWidth && (this.dataPointMinWidth && m < h) && (m = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, h)); p < h && (p = h); p > m && (p = m); c.save(); v && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); 851 c.clip(); v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); for (m = 0; m < a.dataSeriesIndexes.length; m++) { 852 var q = a.dataSeriesIndexes[m], f = this.data[q], n = f.dataPoints; if (0 < n.length) for (var l = 5 < p && f.bevelEnabled ? !0 : !1, h = 0; h < n.length; h++)if (n[h].getTime ? d = n[h].x.getTime() : d = n[h].x, !(d < a.axisX.dataInfo.viewPortMin || d > a.axisX.dataInfo.viewPortMax) && "number" === typeof n[h].y) { 853 r = a.axisX.convertValueToPixel(d); x = a.axisY.convertValueToPixel(n[h].y); 854 r = a.axisX.reversed ? r + a.plotType.totalDataSeries * p / 2 - (a.previousDataSeriesCount + m) * p << 0 : r - a.plotType.totalDataSeries * p / 2 + (a.previousDataSeriesCount + m) * p << 0; var y = a.axisX.reversed ? r - p << 0 : r + p << 0, s; 0 <= n[h].y ? s = k : (s = x, x = k); x > s && (b = x, x = s, s = b); b = n[h].color ? n[h].color : f._colorSet[h % f._colorSet.length]; ba(c, a.axisX.reversed ? y : r, x, a.axisX.reversed ? r : y, s, b, 0, null, l && (a.axisY.reversed ? 0 > n[h].y : 0 <= n[h].y), (a.axisY.reversed ? 0 <= n[h].y : 0 > n[h].y) && l, !1, !1, f.fillOpacity); b = f.dataPointIds[h]; this._eventManager.objectMap[b] = 855 { id: b, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: h, x1: r, y1: x, x2: y, y2: s }; b = O(b); v && ba(this._eventManager.ghostCtx, a.axisX.reversed ? y : r, x, a.axisX.reversed ? r : y, s, b, 0, null, !1, !1, !1, !1); (n[h].indexLabel || f.indexLabel || n[h].indexLabelFormatter || f.indexLabelFormatter) && this._indexLabels.push({ chartType: "column", dataPoint: n[h], dataSeries: f, point: { x: r + (y - r) / 2, y: 0 > n[h].y === a.axisY.reversed ? x : s }, direction: 0 > n[h].y === a.axisY.reversed ? 1 : -1, bounds: { x1: r, y1: Math.min(x, s), x2: y, y2: Math.max(x, s) }, color: b }) 856 } 857 } v && 858 (g.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore(
858)); c.restore(); return { 859 source: g, dest: this.plotArea.ctx, animationCallback: N.yScaleAnimation, 860 easingFunction: N.easing.easeOutQuart, animationBase: k < a.axisY.bounds.y1 ? a.axisY.bounds.y1 : k > a.axisY.bounds.y2 ? a.axisY.bounds.y2 : k 861 } 862 } 863 }; l.prototype.renderStackedColumn = function (a) { 864 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g; if (!(0 >= a.dataSeriesIndexes.length)) { 865 var b = null, e = this.plotArea, h = [], r = [], x = [], d = [], k = 0, m, p, q = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), k = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 866 1, f = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.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.options.dataPointWidth ? this.dataPointWidth : 0.9 * (e.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 > f && (k = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, f)); !this.dataPointMaxWidth && 867 (this.dataPointMinWidth && f < k) && (f = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, k)); n < k && (n = k); n > f && (n = f); c.save(); v && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); for (f = 0; f < a.dataSeriesIndexes.length; f++) { 868 var l = a.dataSeriesIndexes[f], y = this.data[l], s = y.dataPoints; if (0 < s.length) { 869 var z = 5 < n && y.bevelEnabled ? 870 !0 : !1; c.strokeStyle = "#4572A7 "; for (k = 0; k < s.length; k++)if (b = s[k].x.getTime ? s[k].x.getTime() : s[k].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof s[k].y) { 871 m = a.axisX.convertValueToPixel(b); m = m - a.plotType.plotUnits.length * n / 2 + a.index * n << 0; var u = m + n << 0, E; if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 < s[k].y) x[b] = s[k].y + (x[b] ? x[b] : 0), 0 < x[b] && (p = a.axisY.convertValueToPixel(x[b]), E = "undefined" !== typeof h[b] ? h[b] : q, h[b] = p); 872 else if (a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 >= s[k].y) d[b] = s[k].y + (d[b] ? d[b] : 0), E = a.axisY.convertValueToPixel(d[b]), p = "undefined" !== typeof r[b] ? r[b] : q, r[b] = E; else if (p = a.axisY.convertValueToPixel(s[k].y), 0 <= s[k].y) { var B = "undefined" !== typeof h[b] ? h[b] : 0; p -= B; E = q - B; h[b] = B + (E - p) } else B = r[b] ? r[b] : 0, E = p + B, p = q + B, r[b] = B + (E - p); b = s[k].color ? s[k].color : y._colorSet[k % y._colorSet.length]; ba(c, m, a.axisY.reversed ? E : p, u, a.axisY.reversed ? p : E, b, 0, null, z && (a.axisY.reversed ? 0 > s[k].y : 0 <= 873 s[k].y), (a.axisY.reversed ? 0 <= s[k].y : 0 > s[k].y) && z, !1, !1, y.fillOpacity); b = y.dataPointIds[k]; this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: l, dataPointIndex: k, x1: m, y1: p, x2: u, y2: E }; b = O(b); v && ba(this._eventManager.ghostCtx, m, p, u, E, b, 0, null, !1, !1, !1, !1); (s[k].indexLabel || y.indexLabel || s[k].indexLabelFormatter || y.indexLabelFormatter) && this._indexLabels.push({ 874 chartType: "stackedColumn", dataPoint: s[k], dataSeries: y, point: { x: m + (u - m) / 2, y: 0 <= s[k].y ? p : E }, direction: 0 > s[k].y === a.axisY.reversed ? 875 1 : -1, bounds: { x1: m, y1: Math.min(p, E), x2: u, y2: Math.max(p, E) }, color: b 876 }) 877 } 878 } 879 } v && (g.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore(
879)); 880 c.restore(); return { source: g, dest: this.plotArea.ctx, animationCallback: N.yScaleAnimation, easingFunction: N.easing.easeOutQuart, animationBase: q < a.axisY.bounds.y1 ? a.axisY.bounds.y1 : q > a.axisY.bounds.y2 ? a.axisY.bounds.y2 : q } 881 } 882 }; l.prototype.renderStackedColumn100 = function (a) { 883 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g; if (!(0 >= a.dataSeriesIndexes.length)) { 884 var b = null, e = this.plotArea, h = [], r = [], x = [], d = [], k = 0, m, p, q = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), 885 k = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1, f = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.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.options.dataPointWidth ? this.dataPointWidth : 0.9 * (e.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 && 886 k > f && (k = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, f)); !this.dataPointMaxWidth && (this.dataPointMinWidth && f < k) && (f = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, k)); n < k && (n = k); n > f && (n = f); c.save(); v && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); for (f = 0; f < a.dataSeriesIndexes.length; f++) { 887 var l = 888 a.dataSeriesIndexes[f], y = this.data[l], s = y.dataPoints; if (0 < s.length) for (var z = 5 < n && y.bevelEnabled ? !0 : !1, k = 0; k < s.length; k++)if (b = s[k].x.getTime ? s[k].x.getTime() : s[k].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof s[k].y) { 889 m = a.axisX.convertValueToPixel(b); p = 0 !== a.dataPointYSums[b] ? 100 * (s[k].y / a.dataPointYSums[b]) : 0; m = m - a.plotType.plotUnits.length * n / 2 + a.index * n << 0; var u = m + n << 0, E; if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 890 0 < s[k].y) { x[b] = p + ("undefined" !== typeof x[b] ? x[b] : 0); if (0 >= x[b]) continue; p = a.axisY.convertValueToPixel(x[b]); E = h[b] ? h[b] : q; h[b] = p } else if (a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 >= s[k].y) d[b] = p + ("undefined" !== typeof d[b] ? d[b] : 0), E = a.axisY.convertValueToPixel(d[b]), p = r[b] ? r[b] : q, r[b] = E; else if (p = a.axisY.convertValueToPixel(p), 0 <= s[k].y) { var B = "undefined" !== typeof h[b] ? h[b] : 0; p -= B; E = q - B; a.dataSeriesIndexes.length - 1 === f && 1 >= Math.abs(e.y1 - p) && (p = e.y1); h[b] = B + (E - p) } else B = "undefined" !== 891 typeof r[b] ? r[b] : 0, E = p + B, p = q + B, a.dataSeriesIndexes.length - 1 === f && 1 >= Math.abs(e.y2 - E) && (E = e.y2), r[b] = B + (E - p); b = s[k].color ? s[k].color : y._colorSet[k % y._colorSet.length]; ba(c, m, a.axisY.reversed ? E : p, u, a.axisY.reversed ? p : E, b, 0, null, z && (a.axisY.reversed ? 0 > s[k].y : 0 <= s[k].y), (a.axisY.reversed ? 0 <= s[k].y : 0 > s[k].y) && z, !1, !1, y.fillOpacity); b = y.dataPointIds[k]; this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: l, dataPointIndex: k, x1: m, y1: p, x2: u, y2: E }; b = O(b); v && ba(this._eventManager.ghostCtx, 892 m, p, u, E, b, 0, null, !1, !1, !1, !1); (s[k].indexLabel || y.indexLabel || s[k].indexLabelFormatter || y.indexLabelFormatter) && this._indexLabels.push({ chartType: "stackedColumn100", dataPoint: s[k], dataSeries: y, point: { x: m + (u - m) / 2, y: 0 <= s[k].y ? p : E }, direction: 0 > s[k].y === a.axisY.reversed ? 1 : -1, bounds: { x1: m, y1: Math.min(p, E), x2: u, y2: Math.max(p, E) }, color: b }) 893 } 894 } v && (g.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, 895 this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore(
895)); c.restore(); return { source: g, dest: this.plotArea.ctx, animationCallback: N.yScaleAnimation, easingFunction: N.easing.easeOutQuart, animationBase: q < a.axisY.bounds.y1 ? a.axisY.bounds.y1 : q > a.axisY.bounds.y2 ? a.axisY.bounds.y2 : q } 896 } 897 }; l.prototype.renderBar = 898 function (a) { 899 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g; if (!(0 >= a.dataSeriesIndexes.length)) { 900 var b = null, e = this.plotArea, h = 0, r, d, n, k = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), h = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1, m = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : Math.min(0.15 * this.height, 0.9 * (this.plotArea.height / a.plotType.totalDataSeries)) << 901 0, p = a.axisX.dataInfo.minDiff; isFinite(p) || (p = 0.3 * Math.abs(a.axisX.range)); p = this.options.dataPointWidth ? this.dataPointWidth : 0.9 * (e.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 && h > m && (h = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, m)); !this.dataPointMaxWidth && (this.dataPointMinWidth && m < h) && (m = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, h)); p < h && (p = 902 h); p > m && (p = m); c.save(); v && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); for (m = 0; m < a.dataSeriesIndexes.length; m++) { 903 var q = a.dataSeriesIndexes[m], f = this.data[q], l = f.dataPoints; if (0 < l.length) { 904 var w = 5 < p && f.bevelEnabled ? !0 : !1; c.strokeStyle = "#4572A7 "; for (h = 0; h < l.length; h++)if (l[h].getTime ? n = l[h].x.getTime() : n = l[h].x, !(n < 905 a.axisX.dataInfo.viewPortMin || n > a.axisX.dataInfo.viewPortMax) && "number" === typeof l[h].y) { 906 d = a.axisX.convertValueToPixel(n); r = a.axisY.convertValueToPixel(l[h].y); d = a.axisX.reversed ? d + a.plotType.totalDataSeries * p / 2 - (a.previousDataSeriesCount + m) * p << 0 : d - a.plotType.totalDataSeries * p / 2 + (a.previousDataSeriesCount + m) * p << 0; var y = a.axisX.reversed ? d - p << 0 : d + p << 0, s; 0 <= l[h].y ? s = k : (s = r, r = k); b = l[h].color ? l[h].color : f._colorSet[h % f._colorSet.length]; ba(c, a.axisY.reversed ? r : s, a.axisX.reversed ? y : d, a.axisY.reversed ? s : 907 r, a.axisX.reversed ? d : y, b, 0, null, w, !1, !1, !1, f.fillOpacity); b = f.dataPointIds[h]; this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: h, x1: s, y1: d, x2: r, y2: y }; b = O(b); v && ba(this._eventManager.ghostCtx, s, a.axisX.reversed ? y : d, r, a.axisX.reversed ? d : y, b, 0, null, !1, !1, !1, !1); (l[h].indexLabel || f.indexLabel || l[h].indexLabelFormatter || f.indexLabelFormatter) && this._indexLabels.push({ 908 chartType: "bar", dataPoint: l[h], dataSeries: f, point: { x: 0 <= l[h].y ? r : s, y: d + (y - d) / 2 }, direction: 0 > 909 l[h].y === a.axisY.reversed ? 1 : -1, bounds: { x1: Math.min(s, r), y1: d, x2: Math.max(s, r), y2: y }, color: b 910 }) 911 } 912 } 913 } v && (g.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(e.x1, e.y1, e.width, e.height), 914 this._eventManager.ghostCtx.restore(
914)); c.restore(); return { source: g, dest: this.plotArea.ctx, animationCallback: N.xScaleAnimation, easingFunction: N.easing.easeOutQuart, animationBase: k < a.axisY.bounds.x1 ? a.axisY.bounds.x1 : k > a.axisY.bounds.x2 ? a.axisY.bounds.x2 : k } 915 } 916 }; l.prototype.renderStackedBar = function (a) { 917 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g; if (!(0 >= a.dataSeriesIndexes.length)) { 918 var b = null, e = this.plotArea, h = [], r = [], d = [], n = [], k = 0, m, p, q = a.axisY.convertValueToPixel(a.axisY.logarithmic ? 919 a.axisY.viewportMinimum : 0), k = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1, f = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : 0.15 * this.height << 0, l = a.axisX.dataInfo.minDiff; isFinite(l) || (l = 0.3 * Math.abs(a.axisX.range)); l = this.options.dataPointWidth ? this.dataPointWidth : 0.9 * (e.height * (a.axisX.logarithmic ? Math.log(l) / Math.log(a.axisX.range) : Math.abs(l) / Math.abs(a.axisX.range)) / a.plotType.plotUnits.length) << 920 0; this.dataPointMaxWidth && k > f && (k = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, f)); !this.dataPointMaxWidth && (this.dataPointMinWidth && f < k) && (f = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, k)); l < k && (l = k); l > f && (l = f); c.save(); v && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); 921 for (f = 0; f < a.dataSeriesIndexes.length; f++) { 922 var w = a.dataSeriesIndexes[f], y = this.data[w], s = y.dataPoints; if (0 < s.length) { 923 var z = 5 < l && y.bevelEnabled ? !0 : !1; c.strokeStyle = "#4572A7 "; for (k = 0; k < s.length; k++)if (b = s[k].x.getTime ? s[k].x.getTime() : s[k].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof s[k].y) { 924 p = a.axisX.convertValueToPixel(b); p = p - a.plotType.plotUnits.length * l / 2 + a.index * l << 0; var u = p + l << 0, E; if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 925 0 < s[k].y) d[b] = s[k].y + (d[b] ? d[b] : 0), 0 < d[b] && (E = h[b] ? h[b] : q, h[b] = m = a.axisY.convertValueToPixel(d[b])); else if (a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 >= s[k].y) n[b] = s[k].y + (n[b] ? n[b] : 0), m = r[b] ? r[b] : q, r[b] = E = a.axisY.convertValueToPixel(n[b]); else if (m = a.axisY.convertValueToPixel(s[k].y), 0 <= s[k].y) { var B = h[b] ? h[b] : 0; E = q + B; m += B; h[b] = B + (m - E) } else B = r[b] ? r[b] : 0, E = m - B, m = q - B, r[b] = B + (m - E); b = s[k].color ? s[k].color : y._colorSet[k % y._colorSet.length]; ba(c, a.axisY.reversed ? m : E, p, a.axisY.reversed ? 926 E : m, u, b, 0, null, z, !1, !1, !1, y.fillOpacity); b = y.dataPointIds[k]; this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: w, dataPointIndex: k, x1: E, y1: p, x2: m, y2: u }; b = O(b); v && ba(this._eventManager.ghostCtx, E, p, m, u, b, 0, null, !1, !1, !1, !1); (s[k].indexLabel || y.indexLabel || s[k].indexLabelFormatter || y.indexLabelFormatter) && this._indexLabels.push({ 927 chartType: "stackedBar", dataPoint: s[k], dataSeries: y, point: { x: 0 <= s[k].y ? m : E, y: p + (u - p) / 2 }, direction: 0 > s[k].y === a.axisY.reversed ? 1 : -1, bounds: { 928 x1: Math.min(E, 929 m), y1: p, x2: Math.max(E, m), y2: u 930 }, color: b 931 }) 932 } 933 } 934 } v && (g.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore(
934)); c.restore(); 935 return { source: g, dest: this.plotArea.ctx, animationCallback: N.xScaleAnimation, easingFunction: N.easing.easeOutQuart, animationBase: q < a.axisY.bounds.x1 ? a.axisY.bounds.x1 : q > a.axisY.bounds.x2 ? a.axisY.bounds.x2 : q } 936 } 937 }; l.prototype.renderStackedBar100 = function (a) { 938 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g; if (!(0 >= a.dataSeriesIndexes.length)) { 939 var b = null, e = this.plotArea, h = [], r = [], d = [], n = [], k = 0, m, p, q = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), k = this.options.dataPointMinWidth ? 940 this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1, f = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : 0.15 * this.height << 0, l = a.axisX.dataInfo.minDiff; isFinite(l) || (l = 0.3 * Math.abs(a.axisX.range)); l = this.options.dataPointWidth ? this.dataPointWidth : 0.9 * (e.height * (a.axisX.logarithmic ? Math.log(l) / Math.log(a.axisX.range) : Math.abs(l) / Math.abs(a.axisX.range)) / a.plotType.plotUnits.length) << 0; this.dataPointMaxWidth && k > f && (k = Math.min(this.options.dataPointWidth ? 941 this.dataPointWidth : Infinity, f)); !this.dataPointMaxWidth && (this.dataPointMinWidth && f < k) && (f = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, k)); l < k && (l = k); l > f && (l = f); c.save(); v && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); for (f = 0; f < a.dataSeriesIndexes.length; f++) { 942 var w = a.dataSeriesIndexes[f], 943 y = this.data[w], s = y.dataPoints; if (0 < s.length) { 944 var z = 5 < l && y.bevelEnabled ? !0 : !1; c.strokeStyle = "#4572A7 "; for (k = 0; k < s.length; k++)if (b = s[k].x.getTime ? s[k].x.getTime() : s[k].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof s[k].y) { 945 p = a.axisX.convertValueToPixel(b); var u; u = 0 !== a.dataPointYSums[b] ? 100 * (s[k].y / a.dataPointYSums[b]) : 0; p = p - a.plotType.plotUnits.length * l / 2 + a.index * l << 0; var E = p + l << 0; if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 946 0 < s[k].y) { d[b] = u + (d[b] ? d[b] : 0); if (0 >= d[b]) continue; u = h[b] ? h[b] : q; h[b] = m = a.axisY.convertValueToPixel(d[b]) } else if (a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 >= s[k].y) n[b] = u + (n[b] ? n[b] : 0), m = r[b] ? r[b] : q, r[b] = u = a.axisY.convertValueToPixel(n[b]); else if (m = a.axisY.convertValueToPixel(u), 0 <= s[k].y) { var B = h[b] ? h[b] : 0; u = q + B; m += B; a.dataSeriesIndexes.length - 1 === f && 1 >= Math.abs(e.x2 - m) && (m = e.x2); h[b] = B + (m - u) } else B = r[b] ? r[b] : 0, u = m - B, m = q - B, a.dataSeriesIndexes.length - 1 === f && 1 >= Math.abs(e.x1 - 947 u) && (u = e.x1), r[b] = B + (m - u); b = s[k].color ? s[k].color : y._colorSet[k % y._colorSet.length]; ba(c, a.axisY.reversed ? m : u, p, a.axisY.reversed ? u : m, E, b, 0, null, z, !1, !1, !1, y.fillOpacity); b = y.dataPointIds[k]; this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: w, dataPointIndex: k, x1: u, y1: p, x2: m, y2: E }; b = O(b); v && ba(this._eventManager.ghostCtx, u, p, m, E, b, 0, null, !1, !1, !1, !1); (s[k].indexLabel || y.indexLabel || s[k].indexLabelFormatter || y.indexLabelFormatter) && this._indexLabels.push({ 948 chartType: "stackedBar100", 949 dataPoint: s[k], dataSeries: y, point: { x: 0 <= s[k].y ? m : u, y: p + (E - p) / 2 }, direction: 0 > s[k].y === a.axisY.reversed ? 1 : -1, bounds: { x1: Math.min(u, m), y1: p, x2: Math.max(u, m), y2: E }, color: b 950 }) 951 } 952 } 953 } v && (g.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 954 0, 0, this.width, this.height), c.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore(
954)); c.restore(); return { source: g, dest: this.plotArea.ctx, animationCallback: N.xScaleAnimation, easingFunction: N.easing.easeOutQuart, animationBase: q < a.axisY.bounds.x1 ? a.axisY.bounds.x1 : q > a.axisY.bounds.x2 ? a.axisY.bounds.x2 : q } 955 } 956 }; l.prototype.renderArea = function (a) { 957 var g, c; function b() { 958 B && (0 < f.lineThickness && h.stroke(), a.axisY.logarithmic || 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? E = u : 0 > a.axisY.viewportMaximum ? 959 E = d.y1 : 0 < a.axisY.viewportMinimum && (E = u), h.lineTo(y, E), h.lineTo(B.x, E), h.closePath(), h.globalAlpha = f.fillOpacity, h.fill(), h.globalAlpha = 1, v && (r.lineTo(y, E), r.lineTo(B.x, E), r.closePath(), r.fill()), h.beginPath(), h.moveTo(y, s), r.beginPath(), r.moveTo(y, s), B = { x: y, y: s }) 960 } var e = a.targetCanvasCtx || this.plotArea.ctx, h = v ? this._preRenderCtx : e; if (!(0 >= a.dataSeriesIndexes.length)) { 961 var r = this._eventManager.ghostCtx, d = a.axisY.lineCoordinates, n = [], k = this.plotArea, m; h.save(); v && r.save(); h.beginPath(); h.rect(k.x1, k.y1, 962 k.width, k.height); h.clip(); v && (r.beginPath(), r.rect(k.x1, k.y1, k.width, k.height), r.clip()); for (var p = 0; p < a.dataSeriesIndexes.length; p++) { 963 var q = a.dataSeriesIndexes[p], f = this.data[q], l = f.dataPoints, n = f.id; this._eventManager.objectMap[n] = { objectType: "dataSeries", dataSeriesIndex: q }; n = O(n); r.fillStyle = n; n = []; g = !0; var w = 0, y, s, z, u = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), E, B = null; if (0 < l.length) { 964 var C = f._colorSet[w % f._colorSet.length], t = f.lineColor = f.options.lineColor || C, 965 A = t; h.fillStyle = C; h.strokeStyle = t; h.lineWidth = f.lineThickness; c = "solid"; if (h.setLineDash) { var K = H(f.nullDataLineDashType, f.lineThickness); c = f.lineDashType; var U = H(c, f.lineThickness); h.setLineDash(U) } for (var fa = !0; w < l.length; w++)if (z = l[w].x.getTime ? l[w].x.getTime() : l[w].x, !(z < a.axisX.dataInfo.viewPortMin || z > a.axisX.dataInfo.viewPortMax && (!f.connectNullData || !fa))) if ("number" !== typeof l[w].y) f.connectNullData || (fa || g) || b(), fa = !0; else { 966 y = a.axisX.convertValueToPixel(z); s = a.axisY.convertValueToPixel(l[w].y); 967 g || fa ? (!g && f.connectNullData ? (h.setLineDash && (f.options.nullDataLineDashType || c === f.lineDashType && f.lineDashType !== f.nullDataLineDashType) && (g = y, c = s, y = m.x, s = m.y, b(), h.moveTo(m.x, m.y), y = g, s = c, B = m, c = f.nullDataLineDashType, h.setLineDash(K)), h.lineTo(y, s), v && r.lineTo(y, s)) : (h.beginPath(), h.moveTo(y, s), v && (r.beginPath(), r.moveTo(y, s)), B = { x: y, y: s }), fa = g = !1) : (h.lineTo(y, s), v && r.lineTo(y, s), 0 == w % 250 && b()); m = { x: y, y: s }; w < l.length - 1 && (A !== (l[w].lineColor || t) || c !== (l[w].lineDashType || f.lineDashType)) && (b(), A = 968 l[w].lineColor || t, h.strokeStyle = A, h.setLineDash && (l[w].lineDashType ? (c = l[w].lineDashType, h.setLineDash(H(c, f.lineThickness))) : (c = f.lineDashType, h.setLineDash(U)))); var aa = f.dataPointIds[w]; this._eventManager.objectMap[aa] = { id: aa, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: w, x1: y, y1: s }; 0 !== l[w].markerSize && (0 < l[w].markerSize || 0 < f.markerSize) && (z = f.getMarkerProperties(w, y, s, h), n.push(z), aa = O(aa), v && n.push({ x: y, y: s, ctx: r, type: z.type, size: z.size, color: aa, borderColor: aa, borderThickness: z.borderThickness })); 969 (l[w].indexLabel || f.indexLabel || l[w].indexLabelFormatter || f.indexLabelFormatter) && this._indexLabels.push({ chartType: "area", dataPoint: l[w], dataSeries: f, point: { x: y, y: s }, direction: 0 >
969 l[w].y === a.axisY.reversed ? 1 : -1, color: C }) 970 } b(); Y.drawMarkers(n) 971 } 972 } v && (e.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), h.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && h.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && h.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), 973 this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), h.clearRect(k.x1, k.y1, k.width, k.height), this._eventManager.ghostCtx.restore()); h.restore(); return { source: e, dest: this.plotArea.ctx, animationCallback: N.xClipAnimation, easingFunction: N.easing.linear, animationBase: 0 } 974 } 975 }; l.prototype.renderSplineArea = function (a) { 976 function g() { 977 var c = t(z, 2); if (0 < c.length) { 978 if (0 < m.lineThickness) { 979 b.beginPath(); b.moveTo(c[0].x, c[0].y); c[0].newStrokeStyle && (b.strokeStyle = c[0].newStrokeStyle); 980 c[0].newLineDashArray && b.setLineDash(c[0].newLineDashArray); for (var f = 0; f < c.length - 3; f += 3)if (b.bezierCurveTo(c[f + 1].x, c[f + 1].y, c[f + 2].x, c[f + 2].y, c[f + 3].x, c[f + 3].y), v && e.bezierCurveTo(c[f + 1].x, c[f + 1].y, c[f + 2].x, c[f + 2].y, c[f + 3].x, c[f + 3].y), c[f + 3].newStrokeStyle || c[f + 3].newLineDashArray) b.stroke(), b.beginPath(), b.moveTo(c[f + 3].x, c[f + 3].y), c[f + 3].newStrokeStyle && (b.strokeStyle = c[f + 3].newStrokeStyle), c[f + 3].newLineDashArray && b.setLineDash(c[f + 3].newLineDashArray); b.stroke() 981 } b.beginPath(); b.moveTo(c[0].x, 982 c[0].y); v && (e.beginPath(), e.moveTo(c[0].x, c[0].y)); for (f = 0; f < c.length - 3; f += 3)b.bezierCurveTo(c[f + 1].x, c[f + 1].y, c[f + 2].x, c[f + 2].y, c[f + 3].x, c[f + 3].y), v && e.bezierCurveTo(c[f + 1].x, c[f + 1].y, c[f + 2].x, c[f + 2].y, c[f + 3].x, c[f + 3].y); a.axisY.logarithmic || 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? y = w : 0 > a.axisY.viewportMaximum ? y = h.y1 : 0 < a.axisY.viewportMinimum && (y = w); s = { x: c[0].x, y: c[0].y }; b.lineTo(c[c.length - 1].x, y); b.lineTo(s.x, y); b.closePath(); b.globalAlpha = m.fillOpacity; b.fill(); b.globalAlpha = 1; 983 v && (e.lineTo(c[c.length - 1].x, y), e.lineTo(s.x, y), e.closePath(), e.fill()) 984 } 985 } var c = a.targetCanvasCtx || this.plotArea.ctx, b = v ? this._preRenderCtx : c; if (!(0 >= a.dataSeriesIndexes.length)) { 986 var e = this._eventManager.ghostCtx, h = a.axisY.lineCoordinates, r = [], d = this.plotArea; b.save(); v && e.save(); b.beginPath(); b.rect(d.x1, d.y1, d.width, d.height); b.clip(); v && (e.beginPath(), e.rect(d.x1, d.y1, d.width, d.height), e.clip()); for (var n = 0; n < a.dataSeriesIndexes.length; n++) { 987 var k = a.dataSeriesIndexes[n], m = this.data[k], p = m.dataPoints, 988 r = m.id; this._eventManager.objectMap[r] = { objectType: "dataSeries", dataSeriesIndex: k }; r = O(r); e.fillStyle = r; var r = [], q = 0, f, l, w = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), y, s = null, z = []; if (0 < p.length) { 989 var u = m._colorSet[q % m._colorSet.length], E = m.lineColor = m.options.lineColor || u, B = E; b.fillStyle = u; b.strokeStyle = E; b.lineWidth = m.lineThickness; var C = "solid"; if (b.setLineDash) { var A = H(m.nullDataLineDashType, m.lineThickness), C = m.lineDashType, D = H(C, m.lineThickness); b.setLineDash(D) } for (l = 990 !1; q < p.length; q++)if (f = p[q].x.getTime ? p[q].x.getTime() : p[q].x, !(f < a.axisX.dataInfo.viewPortMin || f > a.axisX.dataInfo.viewPortMax && (!m.connectNullData || !l))) if ("number" !== typeof p[q].y) 0 < q && !l && (m.connectNullData ? b.setLineDash && (0 < z.length && (m.options.nullDataLineDashType || !p[q - 1].lineDashType)) && (z[z.length - 1].newLineDashArray = A, C = m.nullDataLineDashType) : (g(), z = [])), l = !0; else { 991 f = a.axisX.convertValueToPixel(f); l = a.axisY.convertValueToPixel(p[q].y); var K = m.dataPointIds[q]; this._eventManager.objectMap[K] = 992 { id: K, objectType: "dataPoint", dataSeriesIndex: k, dataPointIndex: q, x1: f, y1: l }; z[z.length] = { x: f, y: l }; q < p.length - 1 && (B !== (p[q].lineColor || E) || C !== (p[q].lineDashType || m.lineDashType)) && (B = p[q].lineColor || E, z[z.length - 1].newStrokeStyle = B, b.setLineDash && (p[q].lineDashType ? (C = p[q].lineDashType, z[z.length - 1].newLineDashArray = H(C, m.lineThickness)) : (C = m.lineDashType, z[z.length - 1].newLineDashArray = D))); if (0 !== p[q].markerSize && (0 < p[q].markerSize || 0 < m.markerSize)) { 993 var U = m.getMarkerProperties(q, f, l, b); r.push(U); 994 K = O(K); v && r.push({ x: f, y: l, ctx: e, type: U.type, size: U.size, color: K, borderColor: K, borderThickness: U.borderThickness }) 995 } (p[q].indexLabel || m.indexLabel || p[q].indexLabelFormatter || m.indexLabelFormatter) && this._indexLabels.push({ chartType: "splineArea", dataPoint: p[q], dataSeries: m, point: { x: f, y: l }, direction: 0 >
995 p[q].y === a.axisY.reversed ? 1 : -1, color: u }); l = !1 996 } g(); Y.drawMarkers(r) 997 } 998 } v && (c.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 999 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.clearRect(d.x1, d.y1, d.width, d.height), this._eventManager.ghostCtx.restore()); b.restore(); return { source: c, dest: this.plotArea.ctx, animationCallback: N.xClipAnimation, easingFunction: N.easing.linear, animationBase: 0 } 1000 } 1001 }; l.prototype.renderStepArea = function (a) { 1002 var g, c; function b() { 1003 B && (0 < f.lineThickness && 1004 h.stroke(), a.axisY.logarithmic || 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? E = u : 0 > a.axisY.viewportMaximum ? E = d.y1 : 0 < a.axisY.viewportMinimum && (E = u), h.lineTo(y, E), h.lineTo(B.x, E), h.closePath(), h.globalAlpha = f.fillOpacity, h.fill(), h.globalAlpha = 1, v && (r.lineTo(y, E), r.lineTo(B.x, E), r.closePath(), r.fill()), h.beginPath(), h.moveTo(y, s), r.beginPath(), r.moveTo(y, s), B = { x: y, y: s }) 1005 } var e = a.targetCanvasCtx || this.plotArea.ctx, h = v ? this._preRenderCtx : e; if (!(0 >= a.dataSeriesIndexes.length)) { 1006 var r = this._eventManager.ghostCtx, 1007 d = a.axisY.lineCoordinates, n = [], k = this.plotArea, m; h.save(); v && r.save(); h.beginPath(); h.rect(k.x1, k.y1, k.width, k.height); h.clip(); v && (r.beginPath(), r.rect(k.x1, k.y1, k.width, k.height), r.clip()); for (var p = 0; p < a.dataSeriesIndexes.length; p++) { 1008 var q = a.dataSeriesIndexes[p], f = this.data[q], l = f.dataPoints, n = f.id; this._eventManager.objectMap[n] = { objectType: "dataSeries", dataSeriesIndex: q }; n = O(n); r.fillStyle = n; n = []; g = !0; var w = 0, y, s, z, u = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), 1009 E, B = null; c = !1; if (0 < l.length) { 1010 var C = f._colorSet[w % f._colorSet.length], t = f.lineColor = f.options.lineColor || C, A = t; h.fillStyle = C; h.strokeStyle = t; h.lineWidth = f.lineThickness; var K = "solid"; if (h.setLineDash) { var U = H(f.nullDataLineDashType, f.lineThickness), K = f.lineDashType, D = H(K, f.lineThickness); h.setLineDash(D) } for (; w < l.length; w++)if (z = l[w].x.getTime ? l[w].x.getTime() : l[w].x, !(z < a.axisX.dataInfo.viewPortMin || z > a.axisX.dataInfo.viewPortMax && (!f.connectNullData || !c))) { 1011 var aa = s; "number" !== typeof l[w].y ? (f.connectNullData || 1012 (c || g) || b(), c = !0) : (y = a.axisX.convertValueToPixel(z), s = a.axisY.convertValueToPixel(l[w].y), g || c ? (!g && f.connectNullData ? (h.setLineDash && (f.options.nullDataLineDashType || K === f.lineDashType && f.lineDashType !== f.nullDataLineDashType) && (g = y, c = s, y = m.x, s = m.y, b(), h.moveTo(m.x, m.y), y = g, s = c, B = m, K = f.nullDataLineDashType, h.setLineDash(U)), h.lineTo(y, aa), h.lineTo(y, s), v && (r.lineTo(y, aa), r.lineTo(y, s))) : (h.beginPath(), h.moveTo(y, s), v && (r.beginPath(), r.moveTo(y, s)), B = { x: y, y: s }), c = g = !1) : (h.lineTo(y, aa), v && r.lineTo(y, 1013 aa), h.lineTo(y, s), v && r.lineTo(y, s), 0 == w % 250 && b()), m = { x: y, y: s }, w < l.length - 1 && (A !== (l[w].lineColor || t) || K !== (l[w].lineDashType || f.lineDashType)) && (b(), A = l[w].lineColor || t, h.strokeStyle = A, h.setLineDash && (l[w].lineDashType ? (K = l[w].lineDashType, h.setLineDash(H(K, f.lineThickness))) : (K = f.lineDashType, h.setLineDash(D)))), z = f.dataPointIds[w], this._eventManager.objectMap[z] = { id: z, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: w, x1: y, y1: s }, 0 !== l[w].markerSize && (0 < l[w].markerSize || 0 < f.markerSize) && (aa = 1014 f.getMarkerProperties(w, y, s, h), n.push(aa), z = O(z), v && n.push({ x: y, y: s, ctx: r, type: aa.type, size: aa.size, color: z, borderColor: z, borderThickness: aa.borderThickness })), (l[w].indexLabel || f.indexLabel || l[w].indexLabelFormatter || f.indexLabelFormatter) && this._indexLabels.push({ chartType: "stepArea", dataPoint: l[w], dataSeries: f, point: { x: y, y: s }, direction: 0 >
1014 l[w].y === a.axisY.reversed ? 1 : -1, color: C })) 1015 } b(); Y.drawMarkers(n) 1016 } 1017 } v && (e.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), h.globalCompositeOperation = "source-atop", 1018 a.axisX.maskCanvas && h.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && h.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), h.clearRect(k.x1, k.y1, k.width, k.height), this._eventManager.ghostCtx.restore()); h.restore(); return { source: e, dest: this.plotArea.ctx, animationCallback: N.xClipAnimation, easingFunction: N.easing.linear, animationBase: 0 } 1019 } 1020 }; l.prototype.renderStackedArea = 1021 function (a) { 1022 function g() { if (!(1 > k.length)) { for (0 < C.lineThickness && b.stroke(); 0 < k.length;) { var a = k.pop(); b.lineTo(a.x, a.y); v && y.lineTo(a.x, a.y) } b.closePath(); b.globalAlpha = C.fillOpacity; b.fill(); b.globalAlpha = 1; b.beginPath(); v && (y.closePath(), y.fill(), y.beginPath()); k = [] } } var c = a.targetCanvasCtx || this.plotArea.ctx, b = v ? this._preRenderCtx : c; if (!(0 >= a.dataSeriesIndexes.length)) { 1023 var e = null, h = null, r = [], d = this.plotArea, n = [], k = [], m = [], p = [], q = 0, f, l, w = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 1024 0), y = this._eventManager.ghostCtx, s, z, u; v && y.beginPath(); b.save(); v && y.save(); b.beginPath(); b.rect(d.x1, d.y1, d.width, d.height); b.clip(); v && (y.beginPath(), y.rect(d.x1, d.y1, d.width, d.height), y.clip()); for (var e = [], E = 0; E < a.dataSeriesIndexes.length; E++) { var B = a.dataSeriesIndexes[E], C = this.data[B], t = C.dataPoints; C.dataPointIndexes = []; for (q = 0; q < t.length; q++)B = t[q].x.getTime ? t[q].x.getTime() : t[q].x, C.dataPointIndexes[B] = q, e[B] || (m.push(B), e[B] = !0); m.sort(Ta) } for (E = 0; E < a.dataSeriesIndexes.length; E++) { 1025 B = a.dataSeriesIndexes[E]; 1026 C = this.data[B]; t = C.dataPoints; z = !0; k = []; q = C.id; this._eventManager.objectMap[q] = { objectType: "dataSeries", dataSeriesIndex: B }; q = O(q); y.fillStyle = q; if (0 < m.length) { 1027 var e = C._colorSet[0], A = C.lineColor = C.options.lineColor || e, K = A; b.fillStyle = e; b.strokeStyle = A; b.lineWidth = C.lineThickness; u = "solid"; if (b.setLineDash) { var U = H(C.nullDataLineDashType, C.lineThickness); u = C.lineDashType; var D = H(u, C.lineThickness); b.setLineDash(D) } for (var aa = !0, q = 0; q < m.length; q++) { 1028 var h = m[q], ha = null, ha = 0 <= C.dataPointIndexes[h] ? t[C.dataPointIndexes[h]] : 1029 { x: h, y: null }; if (!(h < a.axisX.dataInfo.viewPortMin || h > a.axisX.dataInfo.viewPortMax && (!C.connectNullData || !aa))) if ("number" !== typeof ha.y) C.connectNullData || (aa || z) || g(), aa = !0; else { 1030 f = a.axisX.convertValueToPixel(h); var pa = n[h] ? n[h] : 0; if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length) { p[h] = ha.y + (p[h] ? p[h] : 0); if (0 >= p[h] && a.axisY.logarithmic) continue; l = a.axisY.convertValueToPixel(p[h]) } else l = a.axisY.convertValueToPixel(ha.y), l -= pa; k.push({ x: f, y: w - pa }); n[h] = w - l; z || 1031 aa ? (!z && C.connectNullData ? (b.setLineDash && (C.options.nullDataLineDashType || u === C.lineDashType && C.lineDashType !== C.nullDataLineDashType) && (z = k.pop(), u = k[k.length - 1], g(), b.moveTo(s.x, s.y), k.push(u), k.push(z), u = C.nullDataLineDashType, b.setLineDash(U)), b.lineTo(f, l), v && y.lineTo(f, l)) : (b.beginPath(), b.moveTo(f, l), v && (y.beginPath(), y.moveTo(f, l))), aa = z = !1) : (b.lineTo(f, l), v && y.lineTo(f, l), 0 == q
1031% 250 && (g(), b.moveTo(f, l), v && y.moveTo(f, l), k.push({ x: f, y: w - pa }))); s = { x: f, y: l }; q < t.length - 1 && (K !== (t[q].lineColor || 1032 A) || u !== (t[q].lineDashType || C.lineDashType)) && (g(), b.beginPath(), b.moveTo(f, l), k.push({ x: f, y: w - pa }), K = t[q].lineColor || A, b.strokeStyle = K, b.setLineDash && (t[q].lineDashType ? (u = t[q].lineDashType, b.setLineDash(H(u, C.lineThickness))) : (u = C.lineDashType, b.setLineDash(D)))); if (0 <= C.dataPointIndexes[h]) { var la = C.dataPointIds[C.dataPointIndexes[h]]; this._eventManager.objectMap[la] = { id: la, objectType: "dataPoint", dataSeriesIndex: B, dataPointIndex: C.dataPointIndexes[h], x1: f, y1: l } } 0 <= C.dataPointIndexes[h] && 0 !== ha.markerSize && 1033 (0 < ha.markerSize || 0 < C.markerSize) && (pa = C.getMarkerProperties(C.dataPointIndexes[h], f, l, b), r.push(pa), h = O(la), v && r.push({ x: f, y: l, ctx: y, type: pa.type, size: pa.size, color: h, borderColor: h, borderThickness: pa.borderThickness })); (ha.indexLabel || C.indexLabel || ha.indexLabelFormatter || C.indexLabelFormatter) && this._indexLabels.push({ chartType: "stackedArea", dataPoint: ha, dataSeries: C, point: { x: f, y: l }, direction: 0 > ha.y === a.axisY.reversed ? 1 : -1, color: e }) 1034 } 1035 } g(); b.moveTo(f, l); v && y.moveTo(f, l) 1036 } delete C.dataPointIndexes 1037 } Y.drawMarkers(r); 1038 v && (c.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.clearRect(d.x1, d.y1, d.width, d.height), y.restore()); b.restore(); return { 1039 source: c, dest: this.plotArea.ctx, animationCallback: N.xClipAnimation, 1040 easingFunction: N.easing.linear, animationBase: 0 1041 } 1042 } 1043 }; l.prototype.renderStackedArea100 = function (a) { 1044 function g() { for (0 < C.lineThickness && b.stroke(); 0 < k.length;) { var a = k.pop(); b.lineTo(a.x, a.y); v && u.lineTo(a.x, a.y) } b.closePath(); b.globalAlpha = C.fillOpacity; b.fill(); b.globalAlpha = 1; b.beginPath(); v && (u.closePath(), u.fill(), u.beginPath()); k = [] } var c = a.targetCanvasCtx || this.plotArea.ctx, b = v ? this._preRenderCtx : c; if (!(0 >= a.dataSeriesIndexes.length)) { 1045 var e = null, h = null, r = this.plotArea, d = [], n = [], k = [], m = [], p = [], q = 1046 0, f, l, w, y, s, z = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), u = this._eventManager.ghostCtx; b.save(); v && u.save(); b.beginPath(); b.rect(r.x1, r.y1, r.width, r.height); b.clip(); v && (u.beginPath(), u.rect(r.x1, r.y1, r.width, r.height), u.clip()); for (var e = [], t = 0; t < a.dataSeriesIndexes.length; t++) { 1047 var B = a.dataSeriesIndexes[t], C = this.data[B], A = C.dataPoints; C.dataPointIndexes = []; for (q = 0; q < A.length; q++)B = A[q].x.getTime ? A[q].x.getTime() : A[q].x, C.dataPointIndexes[B] = q, e[B] || (m.push(B), e[B] = 1048 !0); m.sort(Ta) 1049 } for (t = 0; t < a.dataSeriesIndexes.length; t++) { 1050 B = a.dataSeriesIndexes[t]; C = this.data[B]; A = C.dataPoints; y = !0; e = C.id; this._eventManager.objectMap[e] = { objectType: "dataSeries", dataSeriesIndex: B }; e = O(e); u.fillStyle = e;
1050 k = []; if (0 < m.length) { 1051 var e = C._colorSet[q % C._colorSet.length], D = C.lineColor = C.options.lineColor || e, K = D; b.fillStyle = e; b.strokeStyle = D; b.lineWidth = C.lineThickness; s = "solid"; if (b.setLineDash) { 1052 var U = H(C.nullDataLineDashType, C.lineThickness); s = C.lineDashType; var fa = H(s, C.lineThickness); 1053 b.setLineDash(fa) 1054 } for (var aa = !0, q = 0; q < m.length; q++) { 1055 var h = m[q], ha = null, ha = 0 <= C.dataPointIndexes[h] ? A[C.dataPointIndexes[h]] : { x: h, y: null }; if (!(h < a.axisX.dataInfo.viewPortMin || h > a.axisX.dataInfo.viewPortMax && (!C.connectNullData || !aa))) if ("number" !== typeof ha.y) C.connectNullData || (aa || y) || g(), aa = !0; else { 1056 var pa; pa = 0 !== a.dataPointYSums[h] ? 100 * (ha.y / a.dataPointYSums[h]) : 0; f = a.axisX.convertValueToPixel(h); var la = n[h] ? n[h] : 0; if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length) { 1057 p[h] = 1058 pa + (p[h] ? p[h] : 0); if (0 >= p[h] && a.axisY.logarithmic) continue; l = a.axisY.convertValueToPixel(p[h]) 1059 } else l = a.axisY.convertValueToPixel(pa), l -= la; k.push({ x: f, y: z - la }); n[h] = z - l; y || aa ? (!y && C.connectNullData ? (b.setLineDash && (C.options.nullDataLineDashType || s === C.lineDashType && C.lineDashType !== C.nullDataLineDashType) && (y = k.pop(), s = k[k.length - 1], g(), b.moveTo(w.x, w.y), k.push(s), k.push(y), s = C.nullDataLineDashType, b.setLineDash(U)), b.lineTo(f, l), v && u.lineTo(f, l)) : (b.beginPath(), b.moveTo(f, l), v && (u.beginPath(), u.moveTo(f, 1060 l))), aa = y = !1) : (b.lineTo(f, l), v && u.lineTo(f, l), 0 == q % 250 && (g(), b.moveTo(f, l), v && u.moveTo(f, l), k.push({ x: f, y: z - la }))); w = { x: f, y: l }; q < A.length - 1 && (K !== (A[q].lineColor || D) || s !== (A[q].lineDashType || C.lineDashType)) && (g(), b.beginPath(), b.moveTo(f, l), k.push({ x: f, y: z - la }), K = A[q].lineColor || D, b.strokeStyle = K, b.setLineDash && (A[q].lineDashType ? (s = A[q].lineDashType, b.setLineDash(H(s, C.lineThickness))) : (s = C.lineDashType, b.setLineDash(fa)))); if (0 <= C.dataPointIndexes[h]) { 1061 var F = C.dataPointIds[C.dataPointIndexes[h]]; 1062 this._eventManager.objectMap[F] = { id: F, objectType: "dataPoint", dataSeriesIndex: B, dataPointIndex: C.dataPointIndexes[h], x1: f, y1: l } 1063 } 0 <= C.dataPointIndexes[h] && 0 !== ha.markerSize && (0 < ha.markerSize || 0 < C.markerSize) && (la = C.getMarkerProperties(C.dataPointIndexes[h], f, l, b), d.push(la), h = O(F), v && d.push({ x: f, y: l, ctx: u, type: la.type, size: la.size, color: h, borderColor: h, borderThickness: la.borderThickness })); (ha.indexLabel || C.indexLabel || ha.indexLabelFormatter || C.indexLabelFormatter) && this._indexLabels.push({ 1064 chartType: "stackedArea100", 1065 dataPoint: ha, dataSeries: C, point: { x: f, y: l }, direction: 0 > ha.y === a.axisY.reversed ? 1 : -1, color: e 1066 }) 1067 } 1068 } g(); b.moveTo(f, l); v && u.moveTo(f, l) 1069 } delete C.dataPointIndexes 1070 } Y.drawMarkers(d); v && (c.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 1071 0, 0, this.width, this.height), b.clearRect(r.x1, r.y1, r.width, r.height), u.restore(
1071)); b.restore(); return { source: c, dest: this.plotArea.ctx, animationCallback: N.xClipAnimation, easingFunction: N.easing.linear, animationBase: 0 } 1072 } 1073 }; l.prototype.renderBubble = function (a) { 1074 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g; if (!(0 >= a.dataSeriesIndexes.length)) { 1075 var b = this.plotArea, e = 0, h, r; c.save(); v && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(b.x1, b.y1, b.width, b.height); c.clip(); v && (this._eventManager.ghostCtx.beginPath(), 1076 this._eventManager.ghostCtx.rect(b.x1, b.y1, b.width, b.height), this._eventManager.ghostCtx.clip()); for (var d = -Infinity, n = Infinity, k = 0; k < a.dataSeriesIndexes.length; k++)for (var m = a.dataSeriesIndexes[k], p = this.data[m], q = p.dataPoints, f = 0, e = 0; e < q.length; e++)h = q[e].getTime ? h = q[e].x.getTime() : h = q[e].x, h < a.axisX.dataInfo.viewPortMin || h > a.axisX.dataInfo.viewPortMax || "undefined" === typeof q[e].z || (f = q[e].z, f > d && (d = f), f < n && (n = f)); for (var l = 25 * Math.PI, w = Math.max(Math.pow(0.25 * Math.min(b.height, b.width) / 2, 2) * Math.PI, 1077 l), k = 0; k < a.dataSeriesIndexes.length; k++)if (m = a.dataSeriesIndexes[k], p = this.data[m], q = p.dataPoints, 0 < q.length) for (c.strokeStyle = "#4572A7 ", e = 0; e < q.length; e++)if (h = q[e].getTime ? h = q[e].x.getTime() : h = q[e].x, !(h < a.axisX.dataInfo.viewPortMin || h > a.axisX.dataInfo.viewPortMax) && "number" === typeof q[e].y) { 1078 h = a.axisX.convertValueToPixel(h); r = a.axisY.convertValueToPixel(q[e].y); var f = q[e].z, y = 2 * Math.max(Math.sqrt((d === n ? w / 2 : l + (w - l) / (d - n) * (f - n)) / Math.PI) << 0, 1), f = p.getMarkerProperties(e, c); f.size = y; c.globalAlpha = 1079 p.fillOpacity; Y.drawMarker(h, r, c, f.type, f.size, f.color, f.borderColor, f.borderThickness); c.globalAlpha = 1; var s = p.dataPointIds[e]; this._eventManager.objectMap[s] = { id: s, objectType: "dataPoint", dataSeriesIndex: m, dataPointIndex: e, x1: h, y1: r, size: y }; y = O(s); v && Y.drawMarker(h, r, this._eventManager.ghostCtx, f.type, f.size, y, y, f.borderThickness); (q[e].indexLabel || p.indexLabel || q[e].indexLabelFormatter || p.indexLabelFormatter) && this._indexLabels.push({ 1080 chartType: "bubble", dataPoint: q[e], dataSeries: p, point: { x: h, y: r }, 1081 direction: 1, bounds: { x1: h - f.size / 2, y1: r - f.size / 2, x2: h + f.size / 2, y2: r + f.size / 2 }, color: null 1082 }) 1083 } v && (g.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(b.x1, b.y1, b.width, b.height), this._eventManager.ghostCtx.restore()); 1084 c.restore(); return { source: g, dest: this.plotArea.ctx, animationCallback: N.fadeInAnimation, easingFunction: N.easing.easeInQuad, animationBase: 0 } 1085 } 1086 }; l.prototype.renderScatter = function (a) { 1087 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g; if (!(0 >= a.dataSeriesIndexes.length)) { 1088 var b = this.plotArea, e = 0, h, r; c.save(); v && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(b.x1, b.y1, b.width, b.height); c.clip(); v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(b.x1, b.y1, 1089 b.width, b.height), this._eventManager.ghostCtx.clip()); for (var d = 0; d < a.dataSeriesIndexes.length; d++) { 1090 var n = a.dataSeriesIndexes[d], k = this.data[n], m = k.dataPoints; if (0 < m.length) { 1091 c.strokeStyle = "#4572A7 "; Math.pow(0.3 * Math.min(b.height, b.width) / 2, 2); for (var p = 0, q = 0, e = 0; e < m.length; e++)if (h = m[e].getTime ? h = m[e].x.getTime() : h = m[e].x, !(h < a.axisX.dataInfo.viewPortMin || h > a.axisX.dataInfo.viewPortMax) && "number" === typeof m[e].y) { 1092 h = a.axisX.convertValueToPixel(h); r = a.axisY.convertValueToPixel(m[e].y); var f = k.getMarkerProperties(e, 1093 h, r, c); c.globalAlpha = k.fillOpacity; Y.drawMarker(f.x, f.y, f.ctx, f.type, f.size, f.color, f.borderColor, f.borderThickness); c.globalAlpha = 1; Math.sqrt((p - h) * (p - h) + (q - r) * (q - r)) < Math.min(f.size, 5) && m.length > Math.min(this.plotArea.width, this.plotArea.height) || (p = k.dataPointIds[e], this._eventManager.objectMap[p] = { id: p, objectType: "dataPoint", dataSeriesIndex: n, dataPointIndex: e, x1: h, y1: r }, p = O(p), v && Y.drawMarker(f.x, f.y, this._eventManager.ghostCtx, f.type, f.size, p, p, f.borderThickness), (m[e].indexLabel || k.indexLabel || 1094 m[e].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({ chartType: "scatter", dataPoint: m[e], dataSeries: k, point: { x: h, y: r }, direction: 1, bounds: { x1: h - f.size / 2, y1: r - f.size / 2, x2: h + f.size / 2, y2: r + f.size / 2 }, color: null }), p = h, q = r) 1095 } 1096 } 1097 } v && (g.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), 1098 this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(b.x1, b.y1, b.width, b.height), this._eventManager.ghostCtx.restore(
1098)); c.restore(); return { source: g, dest: this.plotArea.ctx, animationCallback: N.fadeInAnimation, easingFunction: N.easing.easeInQuad, animationBase: 0 } 1099 } 1100 }; l.prototype.renderCandlestick = function (a) { 1101 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g, b = this._eventManager.ghostCtx; if (!(0 >= a.dataSeriesIndexes.length)) { 1102 var e = 1103 null, h = null, r = this.plotArea, d = 0, l, k, m, p, q, f, e = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1, h = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : 0.015 * this.width, t = a.axisX.dataInfo.minDiff; isFinite(t) || (t = 0.3 * Math.abs(a.axisX.range)); t = this.options.dataPointWidth ? this.dataPointWidth : 0.7 * r.width * (a.axisX.logarithmic ? Math.log(t) / Math.log(a.axisX.range) : Math.abs(t) / Math.abs(a.axisX.range)) << 0; 1104 this.dataPointMaxWidth && e > h && (e = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, h)); !this.dataPointMaxWidth && (this.dataPointMinWidth && h < e) && (h = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, e)); t < e && (t = e); t > h && (t = h); c.save(); v && b.save(); c.beginPath(); c.rect(r.x1, r.y1, r.width, r.height); c.clip(); v && (b.beginPath(), b.rect(r.x1, r.y1, r.width, r.height), b.clip()); for (var w = 0; w < a.dataSeriesIndexes.length; w++) { 1105 var y = a.dataSeriesIndexes[w], s = this.data[y], z = s.dataPoints; 1106 if (0 < z.length) for (var u = 5 < t && s.bevelEnabled ? !0 : !1, d = 0; d < z.length; d++)if (z[d].getTime ? f = z[d].x.getTime() : f = z[d].x, !(f < a.axisX.dataInfo.viewPortMin || f > a.axisX.dataInfo.viewPortMax) && !n(z[d].y) && z[d].y.length && "number" === typeof z[d].y[0] && "number" === typeof z[d].y[1] && "number" === typeof z[d].y[2] && "number" === typeof z[d].y[3]) { 1107 l = a.axisX.convertValueToPixel(f); k = a.axisY.convertValueToPixel(z[d].y[0]); m = a.axisY.convertValueToPixel(z[d].y[1]); p = a.axisY.convertValueToPixel(z[d].y[2]); q = a.axisY.convertValueToPixel(z[d].y[3]); 1108 var E = l - t / 2 << 0, B = E + t << 0, h = s.options.fallingColor ? s.fallingColor : s._colorSet[0], e = z[d].color ? z[d].color : s._colorSet[0], C = Math.round(Math.max(1, 0.15 * t)), A = 0 === C % 2 ? 0 : 0.5, D = s.dataPointIds[d]; this._eventManager.objectMap[D] = { id: D, objectType: "dataPoint", dataSeriesIndex: y, dataPointIndex: d, x1: E, y1: k, x2: B, y2: m, x3: l, y3: p, x4: l, y4: q, borderThickness: C, color: e }; c.strokeStyle = e; c.beginPath(); c.lineWidth = C; b.lineWidth = Math.max(C, 4); "candlestick" === s.type ? (c.moveTo(l - A, m), c.lineTo(l - A, Math.min(k, q)), c.stroke(), c.moveTo(l - 1109 A, Math.max(k, q)), c.lineTo(l - A, p), c.stroke(), ba(c, E, Math.min(k, q), B, Math.max(k, q), z[d].y[0] <= z[d].y[3] ? s.risingColor : h, C, e, u, u, !1, !1, s.fillOpacity), v && (e = O(D), b.strokeStyle = e, b.moveTo(l - A, m), b.lineTo(l - A, Math.min(k, q)), b.stroke(), b.moveTo(l - A, Math.max(k, q)), b.lineTo(l - A, p), b.stroke(), ba(b, E, Math.min(k, q), B, Math.max(k, q), e, 0, null, !1, !1, !1, !1))) : "ohlc" === s.type && (c.moveTo(l - A, m), c.lineTo(l - A, p), c.stroke(), c.beginPath(), c.moveTo(l, k), c.lineTo(E, k), c.stroke(), c.beginPath(), c.moveTo(l, q), c.lineTo(B, q), 1110 c.stroke(), v && (e = O(D), b.strokeStyle = e, b.moveTo(l - A, m), b.lineTo(l - A, p), b.stroke(), b.beginPath(), b.moveTo(l, k), b.lineTo(E, k), b.stroke(), b.beginPath(), b.moveTo(l, q), b.lineTo(B, q), b.stroke())); (z[d].indexLabel || s.indexLabel || z[d].indexLabelFormatter || s.indexLabelFormatter) && this._indexLabels.push({ chartType: s.type, dataPoint: z[d], dataSeries: s, point: { x: E + (B - E) / 2, y: a.axisY.reversed ? p : m }, direction: 1, bounds: { x1: E, y1: Math.min(m, p), x2: B, y2: Math.max(m, p) }, color: e }) 1111 } 1112 } v && (g.drawImage(this._preRenderCanvas, 0, 0, 1113 this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(r.x1, r.y1, r.width, r.height), b.restore(
1113)); c.restore(); return { 1114 source: g, dest: this.plotArea.ctx, animationCallback: N.fadeInAnimation, easingFunction: N.easing.easeInQuad, 1115 animationBase: 0 1116 } 1117 } 1118 }; l.prototype.renderBoxAndWhisker = function (a) { 1119 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g, b = this._eventManager.ghostCtx; if (!(0 >= a.dataSeriesIndexes.length)) { 1120 var e = null, h = this.plotArea, r = 0, d, l, k, m, p, q, f, e = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1, r = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : 0.015 * this.width, t = a.axisX.dataInfo.minDiff; isFinite(t) || 1121 (t = 0.3 * Math.abs(a.axisX.range)); t = this.options.dataPointWidth ? this.dataPointWidth : 0.7 * h.width * (a.axisX.logarithmic ? Math.log(t) / Math.log(a.axisX.range) : Math.abs(t) / Math.abs(a.axisX.range)) << 0; this.dataPointMaxWidth && e > r && (e = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, r)); !this.dataPointMaxWidth && (this.dataPointMinWidth && r < e) && (r = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, e)); t < e && (t = e); t > r && (t = r); c.save(); v && b.save(); c.beginPath(); c.rect(h.x1, h.y1, h.width, 1122 h.height); c.clip(); v && (b.beginPath(), b.rect(h.x1, h.y1, h.width, h.height), b.clip()); for (var w = !1, w = !!a.axisY.reversed, y = 0; y < a.dataSeriesIndexes.length; y++) { 1123 var s = a.dataSeriesIndexes[y], z = this.data[s], u = z.dataPoints; if (0 < u.length) for (var E = 5 < t && z.bevelEnabled ? !0 : !1, r = 0; r < u.length; r++)if (u[r].getTime ? f = u[r].x.getTime() : f = u[r].x, !(f < a.axisX.dataInfo.viewPortMin || f > a.axisX.dataInfo.viewPortMax) && !n(u[r].y) && u[r].y.length && "number" === typeof u[r].y[0] && "number" === typeof u[r].y[1] && "number" === typeof u[r].y[2] && 1124 "number" === typeof u[r].y[3] && "number" === typeof u[r].y[4] && 5 === u[r].y.length) { 1125 d = a.axisX.convertValueToPixel(f); l = a.axisY.convertValueToPixel(u[r].y[0]); k = a.axisY.convertValueToPixel(u[r].y[1]); m = a.axisY.convertValueToPixel(u[r].y[2]); p = a.axisY.convertValueToPixel(u[r].y[3]); q = a.axisY.convertValueToPixel(u[r].y[4]); var B = d - t / 2 << 0, C = d + t / 2 << 0, e = u[r].color ? u[r].color : z._colorSet[0], A = Math.round(Math.max(1, 0.15 * t)), D = 0 === A % 2 ? 0 : 0.5, K = u[r].whiskerColor ? u[r].whiskerColor : u[r].color ? z.whiskerColor ? z.whiskerColor : 1126 u[r].color : z.whiskerColor ? z.whiskerColor : e, U = "number" === typeof u[r].whiskerThickness ? u[r].whiskerThickness : "number" === typeof z.options.whiskerThickness ? z.whiskerThickness : A, fa = u[r].whiskerDashType ? u[r].whiskerDashType : z.whiskerDashType, aa = n(u[r].whiskerLength) ? n(z.options.whiskerLength) ? t : z.whiskerLength : u[r].whiskerLength, aa = "number" === typeof aa ? 0 >= aa ? 0 : aa >= t ? t : aa : "string" === typeof aa ? parseInt(aa) * t / 100 > t ? t : parseInt(aa) * t / 100 : t, ha = 1 === Math.round(U) % 2 ? 0.5 : 0, pa = u[r].stemColor ? u[r].stemColor : u[r].color ? 1127 z.stemColor ? z.stemColor : u[r].color : z.stemColor ? z.stemColor : e, la = "number" === typeof u[r].stemThickness ? u[r].stemThickness : "number" === typeof z.options.stemThickness ? z.stemThickness : A, F = 1 === Math.round(la) % 2 ? 0.5 : 0, J = u[r].stemDashType ? u[r].stemDashType : z.stemDashType, L = u[r].lineColor ? u[r].lineColor : u[r].color ? z.lineColor ? z.lineColor : u[r].color : z.lineColor ? z.lineColor : e, P = "number" === typeof u[r].lineThickness ? u[r].lineThickness : "number" === typeof z.options.lineThickness ? z.lineThickness : A, R = u[r].lineDashType ? 1128 u[r].lineDashType : z.lineDashType, M = 1 === Math.round(P) % 2 ? 0.5 : 0, T = z.upperBoxColor, S = z.lowerBoxColor, ua = n(z.o
1128ptions.fillOpacity) ? 1 : z.fillOpacity, Q = z.dataPointIds[r]; this._eventManager.objectMap[Q] = { id: Q, objectType: "dataPoint", dataSeriesIndex: s, dataPointIndex: r, x1: B, y1: l, x2: C, y2: k, x3: d, y3: m, x4: d, y4: p, y5: q, borderThickness: A, color: e, stemThickness: la, stemColor: pa, whiskerThickness: U, whiskerLength: aa, whiskerColor: K, lineThickness: P, lineColor: L }; c.save(); 0 < la && (c.beginPath(), c.strokeStyle = pa, c.lineWidth = la, c.setLineDash && 1129 c.setLineDash(H(J, la)), c.moveTo(d - F, k), c.lineTo(d - F, l), c.stroke(), c.moveTo(d - F, p), c.lineTo(d - F, m), c.stroke()); c.restore(); b.lineWidth = Math.max(A, 4); c.beginPath(); ba(c, B, Math.min(q, k), C, Math.max(k, q), S, 0, e, w ? E : !1, w ? !1 : E, !1, !1, ua); c.beginPath(); ba(c, B, Math.min(m, q), C, Math.max(q, m), T, 0, e, w ? !1 : E, w ? E : !1, !1, !1, ua); c.beginPath(); c.lineWidth = A; c.strokeStyle = e; c.rect(B - D, Math.min(k, m) - D, C - B + 2 * D, Math.max(k, m) - Math.min(k, m) + 2 * D); c.stroke(); c.save(); 0 < P && (c.beginPath(), c.globalAlpha = 1, c.setLineDash && c.setLineDash(H(R, 1130 P)), c.strokeStyle = L, c.lineWidth = P, c.moveTo(B, q - M), c.lineTo(C, q - M), c.stroke()); c.restore(); c.save(); 0 < U && (c.beginPath(), c.setLineDash && c.setLineDash(H(fa, U)), c.strokeStyle = K, c.lineWidth = U, c.moveTo(d - aa / 2 << 0, p - ha), c.lineTo(d + aa / 2 << 0, p - ha), c.stroke(), c.moveTo(d - aa / 2 << 0, l + ha), c.lineTo(d + aa / 2 << 0, l + ha), c.stroke()); c.restore(); v && (e = O(Q), b.strokeStyle = e, b.lineWidth = la, 0 < la && (b.moveTo(d - D - F, k), b.lineTo(d - D - F, Math.max(l, p)), b.stroke(), b.moveTo(d - D - F, Math.min(l, p)), b.lineTo(d - D - F, m), b.stroke()), ba(b, B, Math.max(k, 1131 m), C, Math.min(k, m), e, 0, null, !1, !1, !1, !1), 0 < U && (b.beginPath(), b.lineWidth = U, b.moveTo(d + aa / 2, p - ha), b.lineTo(d - aa / 2, p - ha), b.stroke(), b.moveTo(d + aa / 2, l + ha), b.lineTo(d - aa / 2, l + ha), b.stroke())); (u[r].indexLabel || z.indexLabel || u[r].indexLabelFormatter || z.indexLabelFormatter) && this._indexLabels.push({ chartType: z.type, dataPoint: u[r], dataSeries: z, point: { x: B + (C - B) / 2, y: a.axisY.reversed ? l : p }, direction: 1, bounds: { x1: B, y1: Math.min(l, p), x2: C, y2: Math.max(l, p) }, color: e }) 1132 } 1133 } v && (g.drawImage(this._preRenderCanvas, 0, 0, this.width, 1134 this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(h.x1, h.y1, h.width, h.height), b.restore()); c.restore(); return { source: g, dest: this.plotArea.ctx, animationCallback: N.fadeInAnimation, easingFunction: N.easing.easeInQuad, animationBase: 0 } 1135 } 1136 }; 1137 l.prototype.renderRangeColumn = function (a) { 1138 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g; if (!(0 >= a.dataSeriesIndexes.length)) { 1139 var b = null, e = this.plotArea, h = 0, r, d, l, h = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1; r = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : 0.03 * this.width; var k = a.axisX.dataInfo.minDiff; isFinite(k) || (k = 0.3 * Math.abs(a.axisX.range)); k = this.options.dataPointWidth ? 1140 this.dataPointWidth : 0.9 * (e.width * (a.axisX.logarithmic ? Math.log(k) / Math.log(a.axisX.range) : Math.abs(k) / Math.abs(a.axisX.range)) / a.plotType.totalDataSeries
1140) << 0; this.dataPointMaxWidth && h > r && (h = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, r)); !this.dataPointMaxWidth && (this.dataPointMinWidth && r < h) && (r = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, h)); k < h && (k = h); k > r && (k = r); c.save(); v && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); 1141 c.clip(); v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); for (var m = 0; m < a.dataSeriesIndexes.length; m++) { 1142 var p = a.dataSeriesIndexes[m], q = this.data[p], f = q.dataPoints; if (0 < f.length) for (var t = 5 < k && q.bevelEnabled ? !0 : !1, h = 0; h < f.length; h++)if (f[h].getTime ? l = f[h].x.getTime() : l = f[h].x, !(l < a.axisX.dataInfo.viewPortMin || l > a.axisX.dataInfo.viewPortMax) && !n(f[h].y) && f[h].y.length && "number" === typeof f[h].y[0] && "number" === 1143 typeof f[h].y[1]) { 1144 b = a.axisX.convertValueToPixel(l); r = a.axisY.convertValueToPixel(f[h].y[0]); d = a.axisY.convertValueToPixel(f[h].y[1]); var w = a.axisX.reversed ? b + a.plotType.totalDataSeries * k / 2 - (a.previousDataSeriesCount + m) * k << 0 : b - a.plotType.totalDataSeries * k / 2 + (a.previousDataSeriesCount + m) * k << 0, y = a.axisX.reversed ? w - k << 0 : w + k << 0, b = f[h].color ? f[h].color : q._colorSet[h % q._colorSet.length]; if (r > d) { var s = r; r = d; d = s } s = q.dataPointIds[h]; this._eventManager.objectMap[s] = { 1145 id: s, objectType: "dataPoint", dataSeriesIndex: p, 1146 dataPointIndex: h, x1: w, y1: r, x2: y, y2: d 1147 }; ba(c, a.axisX.reversed ? y : w, r, a.axisX.reversed ? w : y, d, b, 0, b, t, t, !1, !1, q.fillOpacity); b = O(s); v && ba(this._eventManager.ghostCtx, a.axisX.reversed ? y : w, r, a.axisX.reversed ? w : y, d, b, 0, null, !1, !1, !1, !1); if (f[h].indexLabel || q.indexLabel || f[h].indexLabelFormatter || q.indexLabelFormatter) this._indexLabels.push({ 1148 chartType: "rangeColumn", dataPoint: f[h], dataSeries: q, indexKeyword: 0, point: { x: w + (y - w) / 2, y: f[h].y[1] >= f[h].y[0] ? d : r }, direction: f[h].y[1] >= f[h].y[0] ? -1 : 1, bounds: { 1149 x1: w, y1: Math.min(r, 1150 d), x2: y, y2: Math.max(r, d) 1151 }, color: b 1152 }), this._indexLabels.push({ chartType: "rangeColumn", dataPoint: f[h], dataSeries: q, indexKeyword: 1, point: { x: w + (y - w) / 2, y: f[h].y[1] >= f[h].y[0] ? r : d }, direction: f[h].y[1] >= f[h].y[0] ? 1 : -1, bounds: { x1: w, y1: Math.min(r, d), x2: y, y2: Math.max(r, d) }, color: b }) 1153 } 1154 } v && (g.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 1155 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore()); c.restore(); return { source: g, dest: this.plotArea.ctx, animationCallback: N.fadeInAnimation, easingFunction: N.easing.easeInQuad, animationBase: 0 } 1156 } 1157 }; l.prototype.renderError = function (a) { 1158 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g, b = a.axisY._position ? "left" === a.axisY._position || 1159 "right" === a.axisY._position ? !1 : !0 : !1; if (!(0 >= a.dataSeriesIndexes.length)) { 1160 var e = null, h = !1, r = this.plotArea, d = 0, l, k, m, p, q, f, t, w = a.axisX.dataInfo.minDiff; isFinite(w) || (w = 0.3 * Math.abs(a.axisX.range)); c.save(); v && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(r.x1, r.y1, r.width, r.height); c.clip(); v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(r.x1, r.y1, r.width, r.height), this._eventManager.ghostCtx.clip()); for (var y = 0, s = 0; s < this.data.length; s++)!this.data[s].type.match(/(bar|column)/ig) || 1161 !this.data[s].visible || this.data[s].type.match(/(stacked)/ig) && y || y++; for (var z = 0; z < a.dataSeriesIndexes.length; z++) { 1162 var u = a.dataSeriesIndexes[z], E = this.data[u], B = E.dataPoints, C = n(E._linkedSeries) ? !1 : E._linkedSeries.type.match(/(bar|column)/ig) && E._linkedSeries.visible ? !0 : !1, D = 0; if (C) for (e = E._linkedSeries.id, s = 0; s < e; s++)!this.data[s].type.match(/(bar|column)/ig) || !this.data[s].visible || this.data[s].type.match(/(stacked)/ig) && D || (this.data[s].type.match(/(range)/ig) && (h = !0), D++); e = this.options.dataPointMinWidth ? 1163 this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1; d = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : b ? Math.min(0.15 * this.height, 0.9 * (this.plotArea.height / (C ? y : 1))) << 0 : 0.3 * this.width; h && (d = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : b ? Math.min(0.15 * this.height, 0.9 * (this.plotArea.height / (C ? y : 1))) << 0 : 0.03 * this.width); s = this.options.dataPointWidth ? this.dataPointWidth : 1164 0.9 * ((b ? r.height : r.width) * (a.axisX.logarithmic ? Math.log(w) / Math.log(a.axisX.range) : Math.abs(w) / Math.abs(a.axisX.range)) / (C ? y : 1)) << 0; this.dataPointMaxWidth && e > d && (e = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, d)); !this.dataPointMaxWidth && (this.dataPointMinWidth && d < e) && (d = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, e)); s < e && (s = e); s > d && (s = d); if (0 < B.length) for (var H = E._colorSet, d = 0; d < B.length; d++) { 1165 var e = E.lineColor = E.options.color ? E.options.color : H[0], K = { 1166 color: B[d].whiskerColor ? 1167 B[d].whiskerColor : B[d].color ? E.whiskerColor ? E.whiskerColor : B[d].color : E.whiskerColor ? E.whiskerColor : e, thickness: n(B[d].whiskerThickness) ? E.whiskerThickness : B[d].whiskerThickness, dashType: B[d].whiskerDashType ? B[d].whiskerDashType : E.whiskerDashType, length: n(B[d].whiskerLength) ? n(E.options.whiskerLength) ? s : E.options.whiskerLength : B[d].whiskerLength, trimLength: n(B[d].whiskerLength) ? n(E.options.whiskerLength) ? 50 : 0 : 0 1168 }; K.length = "number" === typeof K.length ? 0 >= K.length ? 0 : K.length >= s ? s : K.length : "string" === typeof K.length ? 1169 parseInt(K.length) * s / 100 > s ? s : parseInt(K.length) * s / 100 > s : s; K.thickness = "number" === typeof K.thickness ? 0 > K.thickness ? 0 : Math.round(K.thickness) : 2; var U = { color: B[d].stemColor ? B[d].stemColor : B[d].color ? E.stemColor ? E.stemColor : B[d].color : E.stemColor ? E.stemColor : e, thickness: B[d].stemThickness ? B[d].stemThickness : E.stemThickness, dashType: B[d].stemDashType ? B[d].stemDashType : E.stemDashType }; U.thickness = "number" === typeof U.thickness ? 0 > U.thickness ? 0 : Math.round(U.thickness) : 2; B[d].getTime ? t = B[d].x.getTime() : t = B[d].x; 1170 if (!(t < a.axisX.dataInfo.viewPortMin || t > a.axisX.dataInfo.viewPortMax) && !n(B[d].y) && B[d].y.length && "number" === typeof B[d].y[0] && "number" === typeof B[d].y[1]) { 1171 var fa = a.axisX.convertValueToPixel(t); b ? k = fa : l = fa; fa = a.axisY.convertValueToPixel(B[d].y[0]); b ? m = fa : q = fa; fa = a.axisY.convertValueToPixel(B[d].y[1]); b ? p = fa : f = fa; b ? (q = a.axisX.reversed ? k + (C ? y : 1) * s / 2 - (C ? D - 1 : 0) * s << 0 : k - (C ? y : 1) * s / 2 + (C ? D - 1 : 0) * s << 0, f = a.axisX.reversed ? q - s << 0 : q + s << 0) : (m = a.axisX.reversed ? l + (C ? y : 1) * s / 2 - (C ? D - 1 : 0) * s << 0 : l - (C ? y : 1) * s / 2 + (C ? D - 1 : 0) * s << 1172 0, p = a.axisX.reversed ? m - s << 0 : m + s << 0); !b && q > f && (fa = q, q = f, f = fa); b && m > p && (fa = m, m = p, p = fa); fa = E.dataPointIds[d]; this._eventManager.objectMap[fa] = { id: fa, objectType: "dataPoint", dataSeriesIndex: u, dataPointIndex: d, x1: Math.min(m, p), y1: Math.min(q, f), x2: Math.max(p, m), y2: Math.max(f, q), isXYSwapped: b, stemProperties: U, whiskerProperties: K }; A(c, Math.min(m, p), Math.min(q, f), Math.max(p, m), Math.max(f, q), e, K, U, b); v && A(this._eventManager.ghostCtx, m, q, p, f, e, K, U, b); if (B[d].indexLabel || E.indexLabel || B[d].indexLabelFormatter || 1173 E.indexLabelFormatter) this._indexLabels.push({ chartType: "error", dataPoint: B[d], dataSeries: E, indexKeyword: 0, point: { x: b ? B[d].y[1] >= B[d].y[0] ? m : p : m + (p - m) / 2, y: b ? q + (f - q) / 2 : B[d].y[1] >= B[d].y[0] ? f : q }, direction: B[d].y[1] >= B[d].y[0] ? -1 : 1, bounds: { x1: b ? Math.min(m, p) : m, y1: b ? q : Math.min(q, f), x2: b ? Math.max(m, p) : p, y2: b ? f : Math.max(q, f) }, color: e, axisSwapped: b }), this._indexLabels.push({ 1174 chartType: "error", dataPoint: B[d], dataSeries: E, indexKeyword: 1, point: { 1175 x: b ? B[d].y[1] >= B[d].y[0] ? p : m : m + (p - m) / 2, y: b ? q + (f - q) / 2 : B[d].y[1] >= 1176 B[d].y[0] ? q : f 1177 }, direction: B[d].y[1] >= B[d].y[0] ? 1 : -1, bounds: { x1: b ? Math.min(m, p) : m, y1: b ? q : Math.min(q, f), x2: b ? Math.max(m, p) : p, y2: b ? f : Math.max(q, f) }, color: e, axisSwapped: b 1178 }) 1179 } 1180 } 1181 } v && (g.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 1182 0, 0, this.width, this.height), c.clearRect(r.x1, r.y1, r.width, r.height), this._eventManager.ghostCtx.restore(
1182)); c.restore(); return { source: g, dest: this.plotArea.ctx, animationCallback: N.fadeInAnimation, easingFunction: N.easing.easeInQuad, animationBase: 0 } 1183 } 1184 }; l.prototype.renderRangeBar = function (a) { 1185 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g; if (!(0 >= a.dataSeriesIndexes.length)) { 1186 var b = null, e = this.plotArea, h = 0, r, d, l, k, h = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? 1187 this.dataPointWidth : 1; r = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : Math.min(0.15 * this.height, 0.9 * (this.plotArea.height / a.plotType.totalDataSeries)) << 0; var m = a.axisX.dataInfo.minDiff; isFinite(m) || (m = 0.3 * Math.abs(a.axisX.range)); m = this.options.dataPointWidth ? this.dataPointWidth : 0.9 * (e.height * (a.axisX.logarithmic ? Math.log(m) / Math.log(a.axisX.range) : Math.abs(m) / Math.abs(a.axisX.range)) / a.plotType.totalDataSeries) << 0; this.dataPointMaxWidth && h > 1188 r && (h = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, r)); !this.dataPointMaxWidth && (this.dataPointMinWidth && r < h) && (r = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, h)); m < h && (m = h); m > r && (m = r); c.save(); v && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); for (var p = 0; p < a.dataSeriesIndexes.length; p++) { 1189 var q = 1190 a.dataSeriesIndexes[p], f = this.data[q], t = f.dataPoints; if (0 < t.length) { 1191 var w = 5 < m && f.bevelEnabled ? !0 : !1; c.strokeStyle = "#4572A7 "; for (h = 0; h < t.length; h++)if (t[h].getTime ? k = t[h].x.getTime() : k = t[h].x, !(k < a.axisX.dataInfo.viewPortMin || k > a.axisX.dataInfo.viewPortMax) && !n(t[h].y) && t[h].y.length && "number" === typeof t[h].y[0] && "number" === typeof t[h].y[1]) { 1192 r = a.axisY.convertValueToPixel(t[h].y[0]); d = a.axisY.convertValueToPixel(t[h].y[1]); l = a.axisX.convertValueToPixel(k); l = a.axisX.reversed ? l + a.plotType.totalDataSeries * 1193 m / 2 - (a.previousDataSeriesCount + p) * m << 0 : l - a.plotType.totalDataSeries * m / 2 + (a.previousDataSeriesCount + p) * m << 0; var y = a.axisX.reversed ? l - m << 0 : l + m << 0; r > d && (b = r, r = d, d = b); b = t[h].color ? t[h].color : f._colorSet[h % f._colorSet.length]; ba(c, r, a.axisX.reversed ? y : l, d, a.axisX.reversed ? l : y, b, 0, null, w, !1, !1, !1, f.fillOpacity); b = f.dataPointIds[h]; this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: h, x1: r, y1: l, x2: d, y2: y }; b = O(b); v && ba(this._eventManager.ghostCtx, r, a.axisX.reversed ? 1194 y : l, d, a.axisX.reversed ? l : y, b, 0, null, !1, !1, !1, !1); if (t[h].indexLabel || f.indexLabel || t[h].indexLabelFormatter || f.indexLabelFormatter) this._indexLabels.push({ chartType: "rangeBar", dataPoint: t[h], dataSeries: f, indexKeyword: 0, point: { x: t[h].y[1] >= t[h].y[0] ? r : d, y: l + (y - l) / 2 }, direction: t[h].y[1] >= t[h].y[0] ? -1 : 1, bounds: { x1: Math.min(r, d), y1: l, x2: Math.max(r, d), y2: y }, color: b }), this._indexLabels.push({ 1195 chartType: "rangeBar", dataPoint: t[h], dataSeries: f, indexKeyword: 1, point: { x: t[h].y[1] >= t[h].y[0] ? d : r, y: l + (y - l) / 2 }, direction: t[h].y[1] >= 1196 t[h].y[0] ? 1 : -1, bounds: { x1: Math.min(r, d), y1: l, x2: Math.max(r, d), y2: y }, color: b 1197 }) 1198 } 1199 } 1200 } v && (g.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.restore(
1200)); 1201 c.restore(); return { source: g, dest: this.plotArea.ctx, animationCallback: N.fadeInAnimation, easingFunction: N.easing.easeInQuad, animationBase: 0 } 1202 } 1203 }; l.prototype.renderRangeArea = function (a) { 1204 function g() { 1205 if (z) { 1206 for (var a = null, c = n.length - 1; 0 <= c; c--)a = n[c], b.lineTo(a.x, a.y2), e.lineTo(a.x, a.y2); b.closePath(); b.globalAlpha = m.fillOpacity; b.fill(); b.globalAlpha = 1; e.fill(); if (0 < m.lineThickness) { 1207 b.beginPath(); b.moveTo(a.x, a.y2); for (c = 0; c < n.length; c++)a = n[c], b.lineTo(a.x, a.y2); b.moveTo(n[0].x, n[0].y1); for (c = 0; c < n.length; c++)a = 1208 n[c], b.lineTo(a.x, a.y1); b.stroke() 1209 } b.beginPath(); b.moveTo(l, w); e.beginPath(); e.moveTo(l, w); z = { x: l, y: w }; n = []; n.push({ x: l, y1: w, y2: y }) 1210 } 1211 } var c = a.targetCanvasCtx || this.plotArea.ctx, b = v ? this._preRenderCtx : c; if (!(0 >= a.dataSeriesIndexes.length)) { 1212 var e = this._eventManager.ghostCtx, h = [], r = this.plotArea; b.save(); v && e.save(); b.beginPath(); b.rect(r.x1, r.y1, r.width, r.height); b.clip(); v && (e.beginPath(), e.rect(r.x1, r.y1, r.width, r.height), e.clip()); for (var d = 0; d < a.dataSeriesIndexes.length; d++) { 1213 var n = [], k = a.dataSeriesIndexes[d], 1214 m = this.data[k], p = m.dataPoints, h = m.id; this._eventManager.objectMap[h] = { objectType: "dataSeries", dataSeriesIndex: k }; h = O(h); e.fillStyle = h; var h = [], q = !0, f = 0, l, w, y, s, z = null; if (0 < p.length) { 1215 var u = m._colorSet[f % m._colorSet.length], t = m.lineColor = m.options.lineColor || u, B = t; b.fillStyle = u; b.strokeStyle = t; b.lineWidth = m.lineThickness; var C = "solid"; if (b.setLineDash) { var A = H(m.nullDataLineDashType, m.lineThickness), C = m.lineDashType, D = H(C, m.lineThickness); b.setLineDash(D) } for (var K = !0; f < p.length; f++)if (s = p[f].x.getTime ? 1216 p[f].x.getTime() : p[f].x, !(s < a.axisX.dataInfo.viewPortMin || s > a.axisX.dataInfo.viewPortMax && (!m.connectNullData || !K))) if (null !== p[f].y && p[f].y.length && "number" === typeof p[f].y[0] && "number" === typeof p[f].y[1]) { 1217 l = a.axisX.convertValueToPixel(s); w = a.axisY.convertValueToPixel(p[f].y[0]); y = a.axisY.convertValueToPixel(p[f].y[1]); q || K ? (m.connectNullData && !q ? (b.setLineDash && (m.options.nullDataLineDashType || C === m.lineDashType && m.lineDashType !== m.nullDataLineDashType) && (n[n.length - 1].newLineDashArray = D, C = m.nullDataLineDashType, 1218 b.setLineDash(A)), b.lineTo(l, w), v && e.lineTo(l, w), n.push({ x: l, y1: w, y2: y })) : (b.beginPath(), b.moveTo(l, w), z = { x: l, y: w }, n = [], n.push({ x: l, y1: w, y2: y }), v && (e.beginPath(), e.moveTo(l, w))), K = q = !1) : (b.lineTo(l, w), n.push({ x: l, y1: w, y2: y }), v && e.lineTo(l, w), 0 == f % 250 && g()); s = m.dataPointIds[f]; this._eventManager.objectMap[s] = { id: s, objectType: "dataPoint", dataSeriesIndex: k, dataPointIndex: f, x1: l, y1: w, y2: y }; f < p.length - 1 && (B !== (p[f].lineColor || t) || C !== (p[f].lineDashType || m.lineDashType)) && (g(), B = p[f].lineColor || t, n[n.length - 1219 1].newStrokeStyle = B, b.strokeStyle = B, b.setLineDash && (p[f].lineDashType ? (C = p[f].lineDashType, n[n.length - 1].newLineDashArray = H(C, m.lineThickness), b.setLineDash(n[n.length - 1].newLineDashArray)) : (C = m.lineDashType, n[n.length - 1].newLineDashArray = D, b.setLineDash(D)))); if (0 !== p[f].markerSize && (0 < p[f].markerSize || 0 < m.markerSize)) { 1220 var U = m.getMarkerProperties(f, l, y, b); h.push(U); var fa = O(s); v && h.push({ x: l, y: y, ctx: e, type: U.type, size: U.size, color: fa, borderColor: fa, borderThickness: U.borderThickness }); U = m.getMarkerProperties(f, 1221 l, w, b); h.push(U); fa = O(s); v && h.push({ x: l, y: w, ctx: e, type: U.type, size: U.size, color: fa, borderColor: fa, borderThickness: U.borderThickness }) 1222 } if (p[f].indexLabel || m.indexLabel || p[f].indexLabelFormatter || m.indexLabelFormatter) this._indexLabels.push({ chartType: "rangeArea", dataPoint: p[f], dataSeries: m, indexKeyword: 0, point: { x: l, y: w }, direction: p[f].y[0] > p[f].y[1] === a.axisY.reversed ? -1 : 1, color: u }), this._indexLabels.push({ 1223 chartType: "rangeArea", dataPoint: p[f], dataSeries: m, indexKeyword: 1, point: { x: l, y: y }, direction: p[f].y[0] > 1224 p[f].y[1] === a.axisY.reversed ? 1 : -1, c
1224olor: u 1225 }) 1226 } else K || q || g(), K = !0; g(); Y.drawMarkers(h) 1227 } 1228 } v && (c.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.clearRect(r.x1, r.y1, r.width, r.height), this._eventManager.ghostCtx.restore()); 1229 b.restore(); return { source: c, dest: this.plotArea.ctx, animationCallback: N.xClipAnimation, easingFunction: N.easing.linear, animationBase: 0 } 1230 } 1231 }; l.prototype.renderRangeSplineArea = function (a) { 1232 function g(a, c) { 1233 var f = t(w, 2); if (0 < f.length) { 1234 if (0 < k.lineThickness) { 1235 b.strokeStyle = c; b.setLineDash && b.setLineDash(a); b.beginPath(); b.moveTo(f[0].x, f[0].y); for (var g = 0; g < f.length - 3; g += 3) { 1236 if (f[g].newStrokeStyle || f[g].newLineDashArray) b.stroke(), b.beginPath(), b.moveTo(f[g].x, f[g].y), f[g].newStrokeStyle && (b.strokeStyle = f[g].newStrokeStyle), 1237 f[g].newLineDashArray && b.setLineDash(f[g].newLineDashArray); b.bezierCurveTo(f[g + 1].x, f[g + 1].y, f[g + 2].x, f[g + 2].y, f[g + 3].x, f[g + 3].y) 1238 } 1239 } b.beginPath(); b.moveTo(f[0].x, f[0].y); v && (e.beginPath(), e.moveTo(f[0].x, f[0].y)); for (g = 0; g < f.length - 3; g += 3)b.bezierCurveTo(f[g + 1].x, f[g + 1].y, f[g + 2].x, f[g + 2].y, f[g + 3].x, f[g + 3].y), v && e.bezierCurveTo(f[g + 1].x, f[g + 1].y, f[g + 2].x, f[g + 2].y, f[g + 3].x, f[g + 3].y); f = t(y, 2); b.lineTo(y[y.length - 1].x, y[y.length - 1].y); for (g = f.length - 1; 2 < g; g -= 3)b.bezierCurveTo(f[g - 1].x, f[g - 1].y, f[g - 2].x, 1240 f[g - 2].y, f[g - 3].x, f[g - 3].y), v && e.bezierCurveTo(f[g - 1].x, f[g - 1].y, f[g - 2].x, f[g - 2].y, f[g - 3].x, f[g - 3].y); b.closePath(); b.globalAlpha = k.fillOpacity; b.fill(); v && (e.closePath(), e.fill()); b.globalAlpha = 1; if (0 < k.lineThickness) { 1241 b.strokeStyle = c; b.setLineDash && b.setLineDash(a); b.beginPath(); b.moveTo(f[0].x, f[0].y); for (var h = g = 0; g < f.length - 3; g += 3, h++) { 1242 if (w[h].newStrokeStyle || w[h].newLineDashArray) b.stroke(), b.beginPath(), b.moveTo(f[g].x, f[g].y), w[h].newStrokeStyle && (b.strokeStyle = w[h].newStrokeStyle), w[h].newLineDashArray && 1243 b.setLineDash(w[h].newLineDashArray); b.bezierCurveTo(f[g + 1].x, f[g + 1].y, f[g + 2].x, f[g + 2].y, f[g + 3].x, f[g + 3].y) 1244 } f = t(w, 2); b.moveTo(f[0].x, f[0].y); for (h = g = 0; g < f.length - 3; g += 3, h++) { if (w[h].newStrokeStyle || w[h].newLineDashArray) b.stroke(), b.beginPath(), b.moveTo(f[g].x, f[g].y), w[h].newStrokeStyle && (b.strokeStyle = w[h].newStrokeStyle), w[h].newLineDashArray && b.setLineDash(w[h].newLineDashArray); b.bezierCurveTo(f[g + 1].x, f[g + 1].y, f[g + 2].x, f[g + 2].y, f[g + 3].x, f[g + 3].y) } b.stroke() 1245 } b.beginPath() 1246 } 1247 } var c = a.targetCanvasCtx || 1248 this.plotArea.ctx, b = v ? this._preRenderCtx : c; if (!(0 >= a.dataSeriesIndexes.length)) { 1249 var e = this._eventManager.ghostCtx, h = [], r = this.plotArea; b.save(); v && e.save(); b.beginPath(); b.rect(r.x1, r.y1, r.width, r.height); b.clip(); v && (e.beginPath(), e.rect(r.x1, r.y1, r.width, r.height), e.clip()); for (var d = 0; d < a.dataSeriesIndexes.length; d++) { 1250 var n = a.dataSeriesIndexes[d], k = this.data[n], m = k.dataPoints, h = k.id; this._eventManager.objectMap[h] = { objectType: "dataSeries", dataSeriesIndex: n }; h = O(h); e.fillStyle = h;
1250 var h = [], p = 0, q, 1251 f, l, w = [], y = []; if (0 < m.length) { 1252 var s = k._colorSet[p % k._colorSet.length], z = k.lineColor = k.options.lineColor || s, u = z; b.fillStyle = s; b.lineWidth = k.lineThickness; var E = "solid", B; if (b.setLineDash) { var C = H(k.nullDataLineDashType, k.lineThickness), E = k.lineDashType; B = H(E, k.lineThickness) } for (f = !1; p < m.length; p++)if (q = m[p].x.getTime ? m[p].x.getTime() : m[p].x, !(q < a.axisX.dataInfo.viewPortMin || q > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !f))) if (null !== m[p].y && m[p].y.length && "number" === typeof m[p].y[0] && "number" === 1253 typeof m[p].y[1]) { 1254 q = a.axisX.convertValueToPixel(q); f = a.axisY.convertValueToPixel(m[p].y[0]); l = a.axisY.convertValueToPixel(m[p].y[1]); var A = k.dataPointIds[p]; this._eventManager.objectMap[A] = { id: A, objectType: "dataPoint", dataSeriesIndex: n, dataPointIndex: p, x1: q, y1: f, y2: l }; w[w.length] = { x: q, y: f }; y[y.length] = { x: q, y: l }; p < m.length - 1 && (u !== (m[p].lineColor || z) || E !== (m[p].lineDashType || k.lineDashType)) && (u = m[p].lineColor || z, w[w.length - 1].newStrokeStyle = u, b.setLineDash && (m[p].lineDashType ? (E = m[p].lineDashType, 1255 w[w.length - 1].newLineDashArray = H(E, k.lineThickness)) : (E = k.lineDashType, w[w.length - 1].newLineDashArray = B))); if (0 !== m[p].markerSize && (0 < m[p].markerSize || 0 < k.markerSize)) { var D = k.getMarkerProperties(p, q, f, b); h.push(D); var K = O(A);
1255 v && h.push({ x: q, y: f, ctx: e, type: D.type, size: D.size, color: K, borderColor: K, borderThickness: D.borderThickness }); D = k.getMarkerProperties(p, q, l, b); h.push(D); K = O(A); v && h.push({ x: q, y: l, ctx: e, type: D.type, size: D.size, color: K, borderColor: K, borderThickness: D.borderThickness }) } if (m[p].indexLabel || 1256 k.indexLabel || m[p].indexLabelFormatter || k.indexLabelFormatter) this._indexLabels.push({ chartType: "rangeSplineArea", dataPoint: m[p], dataSeries: k, indexKeyword: 0, point: { x: q, y: f }, direction: m[p].y[0] <= m[p].y[1] ? -1 : 1, color: s }), this._indexLabels.push({ chartType: "rangeSplineArea", dataPoint: m[p], dataSeries: k, indexKeyword: 1, point: { x: q, y: l }, direction: m[p].y[0] <= m[p].y[1] ? 1 : -1, color: s }); f = !1 1257 } else 0 < p && !f && (k.connectNullData ? b.setLineDash && (0 < w.length && (k.options.nullDataLineDashType || !m[p - 1].lineDashType)) && (w[w.length - 1258 1].newLineDashArray = C, E = k.nullDataLineDashType) : (g(B, z), w = [], y = [])), f = !0; g(B, z); Y.drawMarkers(h) 1259 } 1260 } v && (c.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && b.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && b.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), b.clearRect(r.x1, r.y1, r.width, r.height), 1261 this._eventManager.ghostCtx.restore()); b.restore(); return { source: c, dest: this.plotArea.ctx, animationCallback: N.xClipAnimation, easingFunction: N.easing.linear, animationBase: 0 } 1262 } 1263 }; l.prototype.renderWaterfall = function (a) { 1264 var g = a.targetCanvasCtx || this.plotArea.ctx, c = v ? this._preRenderCtx : g; if (!(0 >= a.dataSeriesIndexes.length)) { 1265 var b = this._eventManager.ghostCtx, e = null, h = this.plotArea, r = 0, d, n, k, m, p = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), r = this.options.dataPointMinWidth ? this.dataPointMinWidth : 1266 this.options.dataPointWidth ? this.dataPointWidth : 1; n = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : Math.min(0.15 * this.width, 0.9 * (this.plotArea.width / a.plotType.totalDataSeries)) << 0; var q = a.axisX.dataInfo.minDiff; isFinite(q) || (q = 0.3 * Math.abs(a.axisX.range)); q = this.options.dataPointWidth ? this.dataPointWidth : 0.6 * (h.width * (a.axisX.logarithmic ? Math.log(q) / Math.log(a.axisX.range) : Math.abs(q) / Math.abs(a.axisX.range)) / a.plotType.totalDataSeries) << 0; this.dataPointMaxWidth && 1267 r > n && (r = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, n)); !this.dataPointMaxWidth && (this.dataPointMinWidth && n < r) && (n = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, r)); q < r && (q = r); q > n && (q = n); c.save(); v && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(h.x1, h.y1, h.width, h.height); c.clip(); v && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(h.x1, h.y1, h.width, h.height), this._eventManager.ghostCtx.clip()); for (var f = 0; f < a.dataSeriesIndexes.length; f++) { 1268 var l = 1269 a.dataSeriesIndexes[f], w = this.data[l], y = w.dataPoints, e = w._colorSet[0]; w.risingColor = w.options.risingColor ? w.options.risingColor : e; w.fallingColor = w.options.fallingColor ? w.options.fallingColor : "#e40a0a"; var s = "number" === typeof w.options.lineThickness ? Math.round(w.lineThickness) : 1, z = 1 === Math.round(s) % 2 ? -0.5 : 0; if (0 < y.length) for (var u = 5 < q && w.bevelEnabled ? !0 : !1, t = !1, B = null, C = null, r = 0; r < y.length;
1269 r++)if (y[r].getTime ? m = y[r].x.getTime() : m = y[r].x, "number" !== typeof y[r].y) { 1270 if (0 < r && !t && w.connectNullData) var A = 1271 w.options.nullDataLineDashType || !y[r - 1].lineDashType ? w.nullDataLineDashType : y[r - 1].lineDashType; t = !0 1272 } else { 1273 d = a.axisX.convertValueToPixel(m); n = 0 === w.dataPointEOs[r].cumulativeSum ? p : a.axisY.convertValueToPixel(w.dataPointEOs[r].cumulativeSum); k = 0 === w.dataPointEOs[r].cumulativeSumYStartValue ? p : a.axisY.convertValueToPixel(w.dataPointEOs[r].cumulativeSumYStartValue); d = a.axisX.reversed ? d + a.plotType.totalDataSeries * q / 2 - (a.previousDataSeriesCount + f) * q << 0 : d - a.plotType.totalDataSeries * q / 2 + (a.previousDataSeriesCount + 1274 f) * q << 0; var D = a.axisX.reversed ? d - q << 0 : d + q << 0; n > k && (e = n, n = k, k = e); a.axisY.reversed && (e = n, n = k, k = e); e = w.dataPointIds[r]; this._eventManager.objectMap[e] = { id: e, objectType: "dataPoint", dataSeriesIndex: l, dataPointIndex: r, x1: d, y1: n, x2: D, y2: k }; var K = y[r].color ? y[r].color : 0 < y[r].y ? w.risingColor : w.fallingColor; ba(c, a.axisX.reversed ? D : d, a.axisY.reversed ? k : n, a.axisX.reversed ? d : D, a.axisY.reversed ? n : k, K, 0, K, u, u, !1, !1, w.fillOpacity); e = O(e); v && ba(this._eventManager.ghostCtx, a.axisX.reversed ? D : d, n, a.axisX.reversed ? d : 1275 D, k, e, 0, null, !1, !1, !1, !1); var U, K = d; U = "undefined" !== typeof y[r].isIntermediateSum && !0 === y[r].isIntermediateSum || "undefined" !== typeof y[r].isCumulativeSum && !0 === y[r].isCumulativeSum ? 0 < y[r].y ? n : k : 0 < y[r].y ? k : n; 0 < r && B && (!t || w.connectNullData) && (t && c.setLineDash && c.setLineDash(H(A, s)), c.beginPath(), c.moveTo(B, C - z), c.lineTo(K, U - z), 0 < s && c.stroke(), v && (b.beginPath(), b.moveTo(B, C - z), b.lineTo(K, U - z), 0 < s && b.stroke())); t = !1; B = D; C = 0 < y[r].y ? n : k; K = y[r].lineDashType ? y[r].lineDashType : w.options.lineDashType ? w.options.lineDashType : 1276 "shortDash"; c.strokeStyle = y[r].lineColor ? y[r].lineColor : w.options.lineColor ? w.options.lineColor : "#9e9e9e"; c.lineWidth = s; c.setLineDash && (K = H(K, s), c.setLineDash(K)); (y[r].indexLabel || w.indexLabel || y[r].indexLabelFormatter || w.indexLabelFormatter) && this._indexLabels.push({ chartType: "waterfall", dataPoint: y[r], dataSeries: w, point: { x: d + (D - d) / 2, y: 0 <= y[r].y ? n : k }, direction: 0 > y[r].y === a.axisY.reversed ? 1 : -1, bounds: { x1: d, y1: Math.min(n, k), x2: D, y2: Math.max(n, k) }, color: e }) 1277 } 1278 } v && (g.drawImage(this._preRenderCanvas, 0, 1279 0, this.width, this.height), c.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && c.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && c.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), c.clearRect(h.x1, h.y1, h.width, h.height), this._eventManager.ghostCtx.restore()); c.restore(); return { 1280 source: g, dest: this.plotArea.ctx, animationCallback: N.fadeInAnimation, easingFunction: N.easing.easeInQuad, 1281 animationBase: 0 1282 } 1283 } 1284 }; var ja = function (a, g, c, b, e, h, r, d, n) { 1285 if (!(0 > c)) { 1286 "undefined" === typeof d && (d = 1); if (!v) { var k = Number((r % (2 * Math.PI)).toFixed(8)); Number((h % (2 * Math.PI)).toFixed(8)) === k && (r -= 1E-4) } a.save(); a.globalAlpha = d; "pie" === e ? (a.beginPath(), a.moveTo(g.x, g.y), a.arc(g.x, g.y, c, h, r, !1), a.fillStyle = b, a.strokeStyle = "white", a.lineWidth = 2, a.closePath(), a.fill()) : "doughnut" === e && (a.beginPath(), a.arc(g.x, g.y, c, h, r, !1), 0 <= n && a.arc(g.x, g.y, n * c, r, h, !0), a.closePath(), a.fillStyle = b, a.strokeStyle = "white", a.lineWidth = 1287 2, a.fill()); a.globalAlpha = 1;
1287 a.restore() 1288 } 1289 }; l.prototype.renderPie = function (a) { 1290 function g() { 1291 if (k && m) { 1292 var a = 0, b = 0, c = 0, e = 0; n(k.options.indexLabelMaxWidth) && (k.indexLabelMaxWidth = 0.33 * q.width); for (var g = 0; g < m.length; g++) { 1293 var h = m[g], r = k.dataPointIds[g]; f[g].id = r; f[g].objectType = "dataPoint"; f[g].dataPointIndex = g; f[g].dataSeriesIndex = 0; var d = f[g], p = { percent: null, total: null }, x = null, p = l.getPercentAndTotal(k, h); if (k.indexLabelFormatter || h.indexLabelFormatter) x = { 1294 chart: l.options, dataSeries: k, dataPoint: h, total: p.total, 1295 percent: p.percent 1296 }; p = h.indexLabelFormatter ? h.indexLabelFormatter(x) : h.indexLabel ? l.replaceKeywordsWithValue(h.indexLabel, h, k, g) : k.indexLabelFormatter ? k.indexLabelFormatter(x) : k.indexLabel ? l.replaceKeywordsWithValue(k.indexLabel, h, k, g) : h.label ? h.label : ""; l._eventManager.objectMap[r] = d; d.center = { x: u.x, y: u.y }; d.y = h.y; d.radius = C; d.percentInnerRadius = D; d.indexLabelText = p; d.indexLabelPlacement = k.indexLabelPlacement; d.indexLabelLineColor = h.indexLabelLineColor ? h.indexLabelLineColor : k.options.indexLabelLineColor ? 1297 k.options.indexLabelLineColor : h.color ? h.color : k._colorSet[g % k._colorSet.length]; d.indexLabelLineThickness = n(h.indexLabelLineThickness) ? k.indexLabelLineThickness : h.indexLabelLineThickness; d.indexLabelLineDashType = h.indexLabelLineDashType ? h.indexLabelLineDashType : k.indexLabelLineDashType; d.indexLabelFontColor = h.indexLabelFontColor ? h.indexLabelFontColor : k.indexLabelFontColor; d.indexLabelFontStyle = h.indexLabelFontStyle ? h.indexLabelFontStyle : k.indexLabelFontStyle; d.indexLabelFontWeight = h.indexLabelFontWeight ? 1298 h.indexLabelFontWeight : k.indexLabelFontWeight; d.indexLabelFontSize = n(h.indexLabelFontSize) ? k.indexLabelFontSize : h.indexLabelFontSize; d.indexLabelFontFamily = h.indexLabelFontFamily ? h.indexLabelFontFamily : k.indexLabelFontFamily; d.indexLabelBackgroundColor = h.indexLabelBackgroundColor ? h.indexLabelBackgroundColor : k.options.indexLabelBackgroundColor ? k.options.indexLabelBackgroundColor : k.indexLabelBackgroundColor; d.indexLabelMaxWidth = h.indexLabelMaxWidth ? h.indexLabelMaxWidth : k.indexLabelMaxWidth; d.indexLabelWrap = 1299 "undefined" !== typeof h.indexLabelWrap ? h.indexLabelWrap : k.indexLabelWrap; d.indexLabelTextAlign = h.indexLabelTextAlign ? h.indexLabelTextAlign : k.indexLabelTextAlign ? k.indexLabelTextAlign : "left"; d.startAngle = 0 === g ? k.startAngle ? k.startAngle / 180 * Math.PI : 0 : f[g - 1].endAngle; d.startAngle = (d.startAngle + 2 * Math.PI) % (2 * Math.PI); d.endAngle = d.startAngle + 2 * Math.PI / t * Math.abs(h.y); h = (d.endAngle + d.startAngle) / 2; h = (h + 2 * Math.PI) % (2 * Math.PI); d.midAngle = h; if (d.midAngle > Math.PI / 2 - s && d.midAngle < Math.PI / 2 + s) { 1300 if (0 === a || f[c].midAngle > 1301 d.midAngle) c = g; a++ 1302 } else if (d.midAngle > 3 * Math.PI / 2 - s && d.midAngle < 3 * Math.PI / 2 + s) { if (0 === b || f[e].midAngle > d.midAngle) e = g; b++ } d.hemisphere = h > Math.PI / 2 && h <= 3 * Math.PI / 2 ? "left" : "right"; d.indexLabelTextBlock = new ka(l.plotArea.ctx, { 1303 fontSize: d.indexLabelFontSize, fontFamily: d.indexLabelFontFamily, fontColor: d.indexLabelFontColor, fontStyle: d.indexLabelFontStyle, fontWeight: d.indexLabelFontWeight, textAlign: d.indexLabelTextAlign, backgroundColor: d.indexLabelBackgroundColor, maxWidth: d.indexLabelMaxWidth, maxHeight: d.indexLabelWrap ? 1304 5 * d.indexLabelFontSize : 1.5 * d.indexLabelFontSize, text: d.indexLabelText, padding: 0, textBaseline: "middle" 1305 }); d.indexLabelTextBlock.measureText() 1306 } r = h = 0; p = !1; for (g = 0; g < m.length; g++)d = f[(c + g) % m.length], 1 < a && (d.midAngle > Math.PI / 2 - s && d.midAngle < Math.PI / 2 + s) && (h <= a / 2 && !p ? (d.hemisphere = "right", h++) : (d.hemisphere = "left", p = !0)); p = !1; for (g = 0; g < m.length; g++)d = f[(e + g) % m.length], 1 < b && (d.midAngle > 3 * Math.PI / 2 - s && d.midAngle < 3 * Math.PI / 2 + s) && (r <= b / 2 && !p ? (d.hemisphere = "left", r++) : (d.hemisphere = "right", p = !0)) 1307 } 1308 } function c(a, 1309 b) { 1310 var c = l.plotArea.ctx; c.clearRect(q.x1, q.y1, q.width, q.height); c.fillStyle = l.backgroundColor; c.fillRect(q.x1, q.y1, q.width, q.height); for (c = 0; c < m.length; c++) { 1311 var g = f[c].startAngle, e = f[c].endAngle; if (e > g) { 1312 var h = 0.07 * C * Math.cos(f[c].midAngle), d = 0.07 * C * Math.sin(f[c].midAngle), r = !1; if (m[c].exploded) { if (1E-9 < Math.abs(f[c].center.x - (u.x + h)) || 1E-9 < Math.abs(f[c].center.y - (u.y + d))
1312) f[c].center.x = u.x + h * a, f[c].center.y = u.y + d * a, r = !0 } else if (0 < Math.abs(f[c].center.x - u.x) || 0 < Math.abs(f[c].center.y - u.y)) f[c].center.x = 1313 u.x + h * (1 - a), f[c].center.y = u.y + d * (1 - a), r = !0; r && b && (h = {}, h.dataSeries = k, h.dataPoint = k.dataPoints[c], h.index = c, l.toolTip.highlightObjects([h])); ja(l.plotArea.ctx, f[c].center, f[c].radius, m[c].color ? m[c].color : k._colorSet[c % k._colorSet.length], k.type, g, e, k.fillOpacity, f[c].percentInnerRadius) 1314 } 1315 } c = l.plotArea.ctx; c.save(); c.fillStyle = "black"; c.strokeStyle = "grey"; c.textBaseline = "middle"; c.lineJoin = "round"; for (g = g = 0; g < m.length; g++)e = f[g], e.indexLabelText && (e.indexLabelTextBlock.y -= e.indexLabelTextBlock.height / 1316 2 - e.indexLabelTextBlock.fontSize / 2, h = 0, h = "left" === e.hemisphere ? "inside" !== k.indexLabelPlacement ? -(e.indexLabelTextBlock.width + p) : -e.indexLabelTextBlock.width / 2 : "inside" !== k.indexLabelPlacement ? p : -e.indexLabelTextBlock.width / 2, e.indexLabelTextBlock.x += h, e.indexLabelTextBlock.render(!0), e.indexLabelTextBlock.x -= h, e.indexLabelTextBlock.y += e.indexLabelTextBlock.height / 2 - e.indexLabelTextBlock.fontSize / 2, "inside" !== e.indexLabelPlacement && 0 < e.indexLabelLineThickness && (h = e.center.x + C * Math.cos(e.midAngle), 1317 d = e.center.y + C * Math.sin(e.midAngle), c.strokeStyle = e.indexLabelLineColor, c.lineWidth = e.indexLabelLineThickness, c.setLineDash && c.setLineDash(H(e.indexLabelLineDashType, e.indexLabelLineThickness)), c.beginPath(), c.moveTo(h, d), c.lineTo(e.indexLabelTextBlock.x, e.indexLabelTextBlock.y), c.lineTo(e.indexLabelTextBlock.x + ("left" === e.hemisphere ? -p : p), e.indexLabelTextBlock.y), c.stroke()), c.lineJoin = "miter"); c.save() 1318 } function b(a, b) { 1319 var c = 0, c = a.indexLabelTextBlock.y - a.indexLabelTextBlock.height / 2, e = a.indexLabelTextBlock.y + 1320 a.indexLabelTextBlock.height / 2, f = b.indexLabelTextBlock.y - b.indexLabelTextBlock.height / 2, g = b.indexLabelTextBlock.y + b.indexLabelTextBlock.height / 2; return c = b.indexLabelTextBlock.y > a.indexLabelTextBlock.y ? f - e : c - g 1321 } function e(a) { 1322 for (var c = null, e = 1; e < m.length; e++)if (c = (a + e + f.length) % f.length, f[c].hemisphere !== f[a].hemisphere) { c = null; break } else if (f[c].indexLabelText && c !== a && (0 > b(f[c], f[a]) || ("right" === f[a].hemisphere ? f[c].indexLabelTextBlock.y >= f[a].indexLabelTextBlock.y : f[c].indexLabelTextBlock.y <= f[a].indexLabelTextBlock.y))) break; 1323 else c = null; return c 1324 } function h(a, c, g) { 1325 g = (g || 0) + 1; if (1E3 < g) return 0; c = c || 0; var d = 0, r = u.y - 1 * w, k = u.y + 1 * w; if (0 <= a && a < m.length) { 1326 var p = f[a]; if (0 > c && p.indexLabelTextBlock.y < r || 0 < c && p.indexLabelTextBlock.y > k) return 0; var q = 0, n = 0, n = q = q = 0; 0 > c ? p.indexLabelTextBlock.y - p.indexLabelTextBlock.height / 2 > r && p.indexLabelTextBlock.y - p.indexLabelTextBlock.height / 2 + c < r && (c = -(r - (p.indexLabelTextBlock.y - p.indexLabelTextBlock.height / 2 + c))) : p.indexLabelTextBlock.y + p.indexLabelTextBlock.height / 2 < r && p.indexLabelTextBlock.y + 1327 p.indexLabelTextBlock.height / 2 + c > k && (c = p.indexLabelTextBlock.y + p.indexLabelTextBlock.height / 2 + c - k); c = p.indexLabelTextBlock.y + c; r = 0; r = "right" === p.hemisphere ? u.x + Math.sqrt(Math.pow(w, 2) - Math.pow(c - u.y, 2)) : u.x - Math.sqrt(Math.pow(w, 2) - Math.pow(c - u.y, 2)); n = u.x + C * Math.cos(p.midAngle); q = u.y + C * Math.sin(p.midAngle); q = Math.sqrt(Math.pow(r - n, 2) + Math.pow(c - q, 2)); n = Math.acos(C / w); q = Math.acos((w * w + C * C - q * q) / (2 * C * w)); c = q < n ? c - p.indexLabelTextBlock.y : 0; r = null; for (k = 1; k < m.length; k++)if (r = (a - k + f.length) % f.length, f[r].hemisphere !== 1328 f[a].hemisphere) { r = null; break } else if (f[r].indexLabelText && f[r].hemisphere === f[a].hemisphere && r !== a && (0 > b(f[r], f[a]) || ("right" === f[a].hemisphere ? f[r].indexLabelTextBlock.y <= f[a].indexLabelTextBlock.y : f[r].indexLabelTextBlock.y >= f[a].indexLabelTextBlock.y))) break; else r = null; n = r; q = e(a); k = r = 0; 0 > c ? (k = "right" === p.hemisphere ? n : q, d = c, null !== k && (n = -c, c = p.indexLabelTextBlock.y - p.indexLabelTextBlock.height / 2 - (f[k].indexLabelTextBlock.y + f[k].indexLabelTextBlock.height / 2), c
1328- n < v && (r = -n, k = h(k, r, g + 1), +k.toFixed(z) > 1329 +r.toFixed(z) && (d = c > v ? -(c - v) : -(n - (k - r)))))) : 0 < c && (k = "right" === p.hemisphere ? q : n, d = c, null !== k && (n = c, c = f[k].indexLabelTextBlock.y - f[k].indexLabelTextBlock.height / 2 - (p.indexLabelTextBlock.y + p.indexLabelTextBlock.height / 2), c - n < v && (r = n, k = h(k, r, g + 1), +k.toFixed(z) < +r.toFixed(z) && (d = c > v ? c - v : n - (r - k))))); d && (g = p.indexLabelTextBlock.y + d, c = 0, c = "right" === p.hemisphere ? u.x + Math.sqrt(Math.pow(w, 2) - Math.pow(g - u.y, 2)) : u.x - Math.sqrt(Math.pow(w, 2) - Math.pow(g - u.y, 2)), p.midAngle > Math.PI / 2 - s && p.midAngle < Math.PI / 2 + s ? (r = (a - 1330 1 + f.length) % f.length, r = f[r], a = f[(a + 1 + f.length) % f.length], "left" === p.hemisphere && "right" === r.hemisphere && c > r.indexLabelTextBlock.x ? c = r.indexLabelTextBlock.x - 15 : "right" === p.hemisphere && ("left" === a.hemisphere && c < a.indexLabelTextBlock.x) && (c = a.indexLabelTextBlock.x + 15)) : p.midAngle > 3 * Math.PI / 2 - s && p.midAngle < 3 * Math.PI / 2 + s && (r = (a - 1 + f.length) % f.length, r = f[r], a = f[(a + 1 + f.length) % f.length], "right" === p.hemisphere && "left" === r.hemisphere && c < r.indexLabelTextBlock.x ? c = r.indexLabelTextBlock.x + 15 : "left" === p.hemisphere && 1331 ("right" === a.hemisphere && c > a.indexLabelTextBlock.x) && (c = a.indexLabelTextBlock.x - 15)), p.indexLabelTextBlock.y = g, p.indexLabelTextBlock.x = c, p.indexLabelAngle = Math.atan2(p.indexLabelTextBlock.y - u.y, p.indexLabelTextBlock.x - u.x)) 1332 } return d 1333 } function r() { 1334 var a = l.plotArea.ctx; a.fillStyle = "grey"; a.strokeStyle = "grey"; a.font = "16px Arial"; a.textBaseline = "middle"; for (var c = a = 0, g = 0, d = !0, c = 0; 10 > c && (1 > c || 0 < g); c++) { 1335 if (k.radius || !k.radius && "undefined" !== typeof k.innerRadius && null !== k.innerRadius && C - g <= A) d = !1; d && (C -= 1336 g); g = 0; if ("inside" !== k.indexLabelPlacement) { 1337 w = C * y; for (a = 0; a < m.length; a++) { var r = f[a]; r.indexLabelTextBlock.x = u.x + w * Math.cos(r.midAngle); r.indexLabelTextBlock.y = u.y + w * Math.sin(r.midAngle); r.indexLabelAngle = r.midAngle; r.radius = C; r.percentInnerRadius = D } for (var n, s, a = 0; a < m.length; a++) { 1338 var r = f[a], x = e(a); if (null !== x) { 1339 n = f[a]; s = f[x]; var t = 0, t = b(n, s) - v; if (0 > t) { 1340 for (var B = s = 0, E = 0; E < m.length; E++)E !== a && f[E].hemisphere === r.hemisphere && (f[E].indexLabelTextBlock.y < r.indexLabelTextBlock.y ? s++ : B++); s = t / (s + B || 1) * B; 1341 var B = -1 * (t - s), H = E = 0; "right" === r.hemisphere ? (E = h(a, s), B = -1 * (t - E), H = h(x, B), +H.toFixed(z) < +B.toFixed(z) && +E.toFixed(z) <= +s.toFixed(z) && h(a, -(B - H))) : (E = h(x, s), B = -1 * (t - E), H = h(a, B), +H.toFixed(z) < +B.toFixed(z) && +E.toFixed(z) <= +s.toFixed(z) && h(x, -(B - H))) 1342 } 1343 } 1344 } 1345 } else for (a = 0; a < m.length; a++)r = f[a], w = "pie" === k.type ? 0.7 * C : 0.85 * C, x = u.x + w * Math.cos(r.midAngle), s = u.y + w * Math.sin(r.midAngle), r.indexLabelTextBlock.x = x, r.indexLabelTextBlock.y = s; for (a = 0; a < m.length; a++)if (r = f[a], x = r.indexLabelTextBlock.measureText(), 0 !== 1346 x.height && 0 !== x.width) x = x = 0, "right" === r.hemisphere ? (x = q.x2 - (r.indexLabelTextBlock.x + r.indexLabelTextBlock.width + p), x *= -1) : x = q.x1 - (r.indexLabelTextBlock.x - r.indexLabelTextBlock.width - p), 0 < x && (!d && r.indexLabelText && (s = "right" === r.hemisphere ? q.x2 - r.indexLabelTextBlock.x : r.indexLabelTextBlock.x - q.x1, 0.3 * r.indexLabelTextBlock.maxWidth > s ? r.indexLabelText = "" : r.indexLabelTextBlock.maxWidth = 0.85 * s, 0.3 * r.indexLabelTextBlock.maxWidth < s && (r.indexLabelTextBlock.x -= "right" === r.hemisphere ? 2 : -2)), Math.abs(r.indexLabelTextBlock.y - 1347 r.indexLabelTextBlock.height / 2 - u.y) < C || Math.abs(r.indexLabelTextBlock.y + r.indexLabelTextBlock.height / 2 - u.y) < C) && (x /= Math.abs(Math.cos(r.indexLabelAngle)), 9 < x && (x *= 0.3), x > g && (g = x)), x = x = 0, 0 < r.indexLabelAngle && r.indexLabelAngle < Math.PI ? (x = q.y2 - (r.indexLabelTextBlock.y + r.indexLabelTextBlock.height / 2 + 5), x *= -1) : x
1347= q.y1 - (r.indexLabelTextBlock.y - r.indexLabelTextBlock.height / 2 - 5), 0 < x && (!d && r.indexLabelText && (s = 0 < r.indexLabelAngle && r.indexLabelAngle < Math.PI ? -1 : 1, 0 === h(a, x * s) && h(a, 2 * s)), Math.abs(r.indexLabelTextBlock.x - 1348 u.x) < C && (x /= Math.abs(Math.sin(r.indexLabelAngle)), 9 < x && (x *= 0.3), x > g && (g = x))); var M = function (a, b, c) { for (var e = [], g = 0; e.push(f[b]), b !== c; b = (b + 1 + m.length) % m.length); e.sort(function (a, b) { return a.y - b.y }); for (b = 0; b < e.length; b++)if (c = e[b], g < 0.7 * a) g += c.indexLabelTextBlock.height, c.indexLabelTextBlock.text = "", c.indexLabelText = "", c.indexLabelTextBlock.measureText(); else break }; (function () { 1349 for (var a = -1, c = -1, g = 0, h = !1, r = 0; r < m.length; r++)if (h = !1, n = f[r], n.indexLabelText) { 1350 var d = e(r); if (null !== d) { 1351 var k = f[d]; t = 0; 1352 t = b(n, k); var q; if (q = 0 > t) { q = n.indexLabelTextBlock.x; var l = n.indexLabelTextBlock.y - n.indexLabelTextBlock.height / 2, s = n.indexLabelTextBlock.y + n.indexLabelTextBlock.height / 2, x = k.indexLabelTextBlock.y - k.indexLabelTextBlock.height / 2, u = k.indexLabelTextBlock.x + k.indexLabelTextBlock.width, w = k.indexLabelTextBlock.y + k.indexLabelTextBlock.height / 2; q = n.indexLabelTextBlock.x + n.indexLabelTextBlock.width < k.indexLabelTextBlock.x - p || q > u + p || l > w + p || s < x - p ? !1 : !0 } q ? (0 > a && (a = r), d !== a && (c = d, g += -t), 0 === r % Math.max(m.length / 1353 10, 3) && (h = !0)) : h = !0; h && (0 < g && 0 <= a && 0 <= c) && (M(g, a, c), c = a = -1, g = 0) 1354 } 1355 } 0 < g && M(g, a, c) 1356 })() 1357 } 1358 } function d() { 1359 l.plotArea.layoutManager.reset(); l.title && (l.title.dockInsidePlotArea || "center" === l.title.horizontalAlign && "center" === l.title.verticalAlign) && l.title.render(); if (l.subtitles) for (var a = 0; a < l.subtitles.length; a++) { var b = l.subtitles[a]; (b.dockInsidePlotArea || "center" === b.horizontalAlign && "center" === b.verticalAlign) && b.render() } l.legend && (l.legend.dockInsidePlotArea || "center" === l.legend.horizontalAlign && "center" === 1360 l.legend.verticalAlign) && (l.legend.setLayout(), l.legend.render()) 1361 } var l = this; if (!(0 >= a.dataSeriesIndexes.length)) { 1362 var k = this.data[a.dataSeriesIndexes[0]], m = k.dataPoints, p = 10, q = this.plotArea, f = k.dataPointEOs, v = 2, w, y = 1.3, s = 20 / 180 * Math.PI, z = 6, u = { x: (q.x2 + q.x1) / 2, y: (q.y2 + q.y1) / 2 }, t = 0; a = !1; for (var B = 0; B < m.length; B++)t += Math.abs(m[B].y), !a && ("undefined" !== typeof m[B].indexLabel && null !== m[B].indexLabel && 0 < m[B].indexLabel.toString().length) && (a = !0), !a && ("undefined" !== typeof m[B].label && null !== m[B].label && 1363 0 < m[B].label.toString().length) && (a = !0); if (0 !== t) { 1364 a = a || "undefined" !== typeof k.indexLabel && null !== k.indexLabel && 0 < k.indexLabel.toString().length; var C = "inside" !== k.indexLabelPlacement && a ? 0.75 * Math.min(q.width, q.height) / 2 : 0.92 * Math.min(q.width, q.height) / 2; k.radius && (C = Va(k.radius, C)); var A = "undefined" !== typeof k.innerRadius && null !== k.innerRadius ? Va(k.innerRadius, C) : 0.7 * C; k.radius = C; "doughnut" === k.type && (k.innerRadius = A); var D = Math.min(A / C, (C - 1) / C); this.pieDoughnutClickHandler = function (a) { 1365 l.isAnimating || 1366 !n(this.explodeOnClick) && !this.explodeOnClick || (a = a.dataPoint, a.exploded = a.exploded ? !1 : !0, 1 < this.dataPoints.length && l._animator.animate(0, 500, function (a) { c(a, !0); d(); l.dispatchEvent("dataAnimationIterationEnd", { chart: l }); l.dispatchEvent("dataAnimationEnd", { chart: l }) })) 1367 }; g(); r(); r(); r(); r(); this.disableToolTip = !0; this._animator.animate(0, this.animatedRender ? this.animationDuration : 0, function (a) { 1368 var b = l.plotArea.ctx; b.clearRect(q.x1, q.y1, q.width, q.height); b.fillStyle = l.backgroundColor; b.fillRect(q.x1, 1369 q.y1, q.width, q.height); for (var b = f[0].startAngle + 2 * Math.PI * a, c = 0; c < m.length; c++) { var g = 0 === c ? f[c].startAngle : e, e = g + (f[c].endAngle - f[c].startAngle), h = !1; e > b && (e = b, h = !0); var r = m[c].color ? m[c].color : k._colorSet[c % k._colorSet.length]; e > g && ja(l.plotArea.ctx, f[c].center, f[c].radius, r, k.type, g, e, k.fillOpacity, f[c].percentInnerRadius); if (h) break } d(); l.dispatchEvent("dataAnimationIterationEnd", { chart: l }); 1 <= a && l.dispatchEvent("dataAnimationEnd", { chart: l }) 1370 }, function () { 1371 l.disableToolTip = !1; l._animator.animate(0, 1372 l.animatedRender ? 500 : 0, function (a) { c(a, !1); d(); l.dispatchEvent("dataAnimationIterationEnd", { chart: l }) }); l.dispatchEvent("dataAnimationEnd", { chart: l }) 1373 }) 1374 } 1375 } 1376 }; var ra = function (a, g, c, b) { 1377 "undefined" === typeof c && (c = 1); 0 >= Math.round(g.y4 - g.y1) || (a.save(), a.globalAlpha = c, a.beginPath(), a.moveTo(Math.round(g.x1), Math.round(g.y1)), a.lineTo(Math.round(g.x2), Math.round(g.y2)), a.lineTo(Math.round(g.x3), Math.round(g.y3)), a.lineTo(Math.round(g.x4), Math.round(g.y4)), "undefined" !== g.x5 && (a.lineTo(Math.round(g.x5), Math.round(g.y5)), 1378 a.lineTo(Math.round(g.x6), Math.round(g.y6))), a.closePath(), a.fillStyle = b ? b : g.color, a.fill(), a.globalAplha = 1, a.restore(
1378)) 1379 }; l.prototype.renderFunnel = function (a) { 1380 function g() { for (var a = 0, b = [], c = 0; c < z.length; c++) { if ("undefined" === typeof z[c].y) return -1; z[c].y = "number" === typeof z[c].y ? z[c].y : 0; a += Math.abs(z[c].y) } if (0 === a) return -1; for (c = b[0] = 0; c < z.length; c++)b.push(Math.abs(z[c].y) * D / a); return b } function c() { 1381 var a = W, b = Z, c = M, g = $, e, f; e = P; f = R - O; g = Math.abs((f - e) * (b - a + (g - c)) / 2); c = $ - M; e = f - e; f = c * (f - R); f = Math.abs(f); 1382 f = g + f; for (var g = [], h = 0, r = 0; r < z.length; r++) { if ("undefined" === typeof z[r].y) return -1; z[r].y = "number" === typeof z[r].y ? z[r].y : 0; h += Math.abs(z[r].y) } if (0 === h) return -1; for (var d = g[0] = 0, k = 0, m, p, b = b - a, d = !1, r = 0; r < z.length; r++)a = Math.abs(z[r].y) * f / h, d ? m = 0 == Number(c.toFixed(3)) ? 0 : a / c : (p = ca * ca * b * b - 4 * Math.abs(ca) * a, 0 > p ? (p = c, d = (b + p) * (e - k) / 2, a -= d, m = e - k, k += e - k, m += 0 == p ? 0 : a / p, k += a / p, d = !0) : (m = (Math.abs(ca) * b - Math.sqrt(p)) / 2, p = b - 2 * m / Math.abs(ca), k += m, k > e && (k -= m, p = c, d = (b + p) * (e - k) / 2, a -= d, m = e - k, k += e - k, m += a / p, k += a / p, d = !0), 1383 b = p)), g.push(m); return g 1384 } function b() { 1385 if (s && z) { 1386 for (var a, b, c, e, g, h, r, d, k, m, p, q, l, x, u, w = [], t = [], I = { percent: null, total: null }, B = null, A = 0; A < z.length; A++)u = Q[A], u = "undefined" !== typeof u.x5 ? (u.y2 + u.y4) / 2 : (u.y2 + u.y3) / 2, u = f(u).x2 + 1, w[A] = L - u - S; u = 0.5 * S; for (var A = 0, C = z.length - 1; A < z.length || 0 <= C; A++, C--) { 1387 b = s.reversed ? z[C] : z[A]; a = b.color ? b.color : s.reversed ? s._colorSet[(z.length - 1 - A) % s._colorSet.length] : s._colorSet[A % s._colorSet.length]; c = b.indexLabelPlacement || s.indexLabelPlacement || "outside"; x = b.indexLabelTextAlign || 1388 s.indexLabelTextAlign || "left"; e = b.indexLabelBackgroundColor || s.indexLabelBackgroundColor || (v ? "transparent" : null); g = b.indexLabelFontColor || s.indexLabelFontColor || "#979797"; h = n(b.indexLabelFontSize) ? s.indexLabelFontSize : b.indexLabelFontSize; r = b.indexLabelFontStyle || s.indexLabelFontStyle || "normal"; d = b.indexLabelFontFamily || s.indexLabelFontFamily || "arial"; k = b.indexLabelFontWeight || s.indexLabelFontWeight || "normal"; a = b.indexLabelLineColor || s.options.indexLabelLineColor || a; m = "number" === typeof b.indexLabelLineThickness ? 1389 b.indexLabelLineThickness : "number" === typeof s.indexLabelLineThickness ? s.indexLabelLineThickness : 2; p = b.indexLabelLineDashType || s.indexLabelLineDashType || "solid"; q = "undefined" !== typeof b.indexLabelWrap ? b.indexLabelWrap : "undefined" !== typeof s.indexLabelWrap ? s.indexLabelWrap : !0; l = s.dataPointIds[A]; y._eventManager.objectMap[l] = { id: l, objectType: "dataPoint", dataPointIndex: A, dataSeriesIndex: 0, funnelSection: Q[s.reversed ? z.length - 1 - A : A] }; "inside" === s.indexLabelPlacement && (w[A] = A !== da ? s.reversed ? Q[A].x2 - Q[A].x1 : 1390 Q[A].x3 - Q[A].x4 : Q[A].x3 - Q[A].x6, 20 > w[A] && (w[A] = A !== da ? s.reversed ? Q[A].x3 - Q[A].x4 : Q[A].x2 - Q[A].x1 : Q[A].x2 - Q[A].x1, w[A] /= 2)); l = b.indexLabelMaxWidth ? b.indexLabelMaxWidth : s.options.indexLabelMaxWidth ? s.indexLabelMaxWidth : w[A]; if (l > w[A] || 0 > l) l = w[A]; t[A] = "inside" === s.indexLabelPlacement ? q ? Math.max(Q[A].height, h) : 1.5 * h : !1; I = y.getPercentAndTotal(s, b); if (s.indexLabelFormatter || b.indexLabelFormatter) B = { chart: y.options, dataSeries: s, dataPoint: b, total: I.total, percent: I.percent }; b = b.indexLabelFormatter ? b.indexLabelFormatter(B) : 1391 b.indexLabel ? y.replaceKeywordsWithValue(b.indexLabel, b, s, A) : s.indexLabelFormatter ? s.indexLabelFormatter(B) : s.indexLabel ? y.replaceKeywordsWithValue(s.indexLabel, b, s, A) : b.label ? b.label : ""; 0 >= m && (m = 0); 1E3 > l && 1E3 - l < u && (l += 1E3 - l); n(s.options.indexLabelMaxWidth) && (s.indexLabelMaxWidth = n(s.indexLabelMaxWidth) ? l : Math.max(l, s.indexLabelMaxWidth)); T.roundRect || Aa(T); c = new ka(T, { 1392 fontSize: h, fontFamily: d, fontColor: g, fontStyle: r, fontWeight: k, horizontalAlign: c, textAlign: x, backgroundColor: e, maxWidth: l, maxHeight: !1 === 1393 t[A] ? q ? 4.28571429 * h : 1.5 * h : t[A], text: b, padding: ea, textBaseline: "middle" 1394 }); c.measureText(); c.height = c.height === 2 * c.padding ? 0 : c.height; c.width = c.width === 2 * c.padding ? 0 : c.width;
1394 G.push({ textBlock: c, id: s.reversed ? C : A, isDirty: !1, lineColor: a, lineThickness: m, lineDashType: p, height: c.height < c.maxHeight ? c.height : c.maxHeight, width: c.width < c.maxWidth ? c.width : c.maxWidth }) 1395 } 1396 } 1397 } function e() { 1398 var a, b, c, e, g, f = []; g = !1; c = 0; for (var h, r = L - Z - S / 2, r = s.options.indexLabelMaxWidth ? s.indexLabelMaxWidth > r ? r : s.indexLabelMaxWidth : r, 1399 d = G.length - 1; 0 <= d; d--) { h = z[G[d].id]; c = G[d]; e = c.textBlock; b = (a = q(d) < Q.length ? G[q(d)] : null) ? a.textBlock : null; c = c.height; a && e.y + c + ea > b.y && (g = !0); c = h.indexLabelMaxWidth || r; if (c > r || 0 > c) c = r; f.push(c) } if (g) for (d = G.length - 1; 0 <= d; d--)a = Q[d], G[d].textBlock.maxWidth = f[f.length - (d + 1)], G[d].textBlock.measureText(), G[d].textBlock.height = G[d].textBlock.height === 2 * G[d].textBlock.padding ? 0 : G[d].textBlock.height, G[d].textBlock.width = G[d].textBlock.width === 2 * G[d].textBlock.padding ? 0 : G[d].textBlock.width, G[d].textBlock.x = 1400 L - r, c = G[d].textBlock.height < G[d].textBlock.maxHeight ? G[d].textBlock.height : G[d].textBlock.maxHeight, g = G[d].textBlock.width < G[d].textBlock.maxWidth ? G[d].textBlock.width : G[d].textBlock.maxWidth, G[d].height = c, G[d].width = g, c = "undefined" !== typeof a.x5 ? (a.y2 + a.y4) / 2 : (a.y2 + a.y3) / 2, G[d].textBlock.y = c - G[d].height / 2, s.reversed ? (G[d].textBlock.y + G[d].height > V + A && (G[d].textBlock.y = V + A - G[d].height), G[d].textBlock.y < ua - A && (G[d].textBlock.y = ua - A)) : (G[d].textBlock.y < V - A && (G[d].textBlock.y = V - A), G[d].textBlock.y + G[d].height > 1401 ua + A && (G[d].textBlock.y = ua + A - G[d].height)) 1402 } function h() { 1403 var a, b, c, g; if ("inside" !== s.indexLabelPlacement) for (var e = 0; e < Q.length; e++)0 == G[e].textBlock.text.length ? G[e].isDirty = !0 : (a = Q[e], c = "undefined" !== typeof a.x5 ? (a.y2 + a.y4) / 2 : (a.y2 + a.y3) / 2, b = s.reversed ? "undefined" !== typeof a.x5 ? c > Y ? f(c).x2 + 1 : (a.x2 + a.x3) / 2 + 1 : (a.x2 + a.x3) / 2 + 1 : "undefined" !== typeof a.x5 ? c < Y ? f(c).x2 + 1 : (a.x4 + a.x3) / 2 + 1 : (a.x2 + a.x3) / 2 + 1, G[e].textBlock.x = b + S, G[e].textBlock.y = c - G[e].height / 2, s.reversed ? (G[e].textBlock.y + G[e].height > V + A && (G[e].textBlock.y = 1404 V + A - G[e].height), G[e].textBlock.y < ua - A && (G[e].textBlock.y = ua - A)) : (G[e].textBlock.y < V - A && (G[e].textBlock.y = V - A), G[e].textBlock.y + G[e].height > ua + A && (G[e].textBlock.y = ua + A - G[e].height))); else for (e = 0; e < Q.length; e++)0 == G[e].textBlock.text.length ? G[e].isDirty = !0 : (a = Q[e], b = a.height, c = G[e].height, g = G[e].width, b >= c ? (b = e != da ? (a.x4 + a.x3) / 2 - g / 2 : (a.x5 + a.x4) / 2 - g / 2, c = e != da ? (a.y1 + a.y3) / 2 - c / 2 : (a.y1 + a.y4) / 2 - c / 2, G[e].textBlock.x = b, G[e].textBlock.y = c) : G[e].isDirty = !0) 1405 } function r() { 1406 function a(b, c) { 1407 var e; if (0 > b || b >= G.length) return 0; 1408 var g, f = G[b].textBlock; if (0 > c) { c *= -1; g = p(b); e = d(g, b); if (e >= c) return f.y -= c, c; if (0 == b) return 0 < e && (f.y -= e), e; e += a(g, -(c - e)); 0 < e && (f.y -= e); return e } g = q(b); e = d(b, g); if (e >= c) return f.y += c, c; if (b == Q.length - 1) return 0 < e && (f.y += e), e; e += a(g, c - e); 0 < e && (f.y += e); return e 1409 } function b() { 1410 var a, e, g, f, h = 0, r; f = (R - P + 2 * A) / m; r = m; for (var d, k = 1; k < r; k++) { 1411 g = k * f; for (var n = G.length - 1; 0 <= n; n--)!G[n].isDirty && (G[n].textBlock.y < g && G[n].textBlock.y + G[n].height > g) && (d = q(n), !(d >= G.length - 1) && G[n].textBlock.y + G[n].height + ea > G[d].textBlock.y && 1412 (G[n].textBlock.y = G[n].textBlock.y + G[n].height - g > g - G[n].textBlock.y ? g + 1 : g - G[n].height - 1)) 1413 } for (d = Q.length - 1; 0 < d; d--)if (!G[d].isDirty) { g = p(d); if (0 > g && (g = 0, G[g].isDirty)) break; if (G[d].textBlock.y < G[g].textBlock.y + G[g].height) { e = e || d; f = d; for (r = 0; G[f].textBlock.y < G[g].textBlock.y + G[g].height + ea;) { a = a || G[f].textBlock.y + G[f].height; r += G[f].height; r += ea; f = g; if (0 >= f) { f = 0; r += G[f].height; break } g = p(f); if (0 > g) { f = 0; r += G[f].height; break } } if (f != d) { h = G[f].textBlock.y; a -= h; a = r - a; h = c(a, e, f); break } } } return h 1414 } function c(a, 1415 b, e) { var g = [], f = 0, h = 0; for (a = Math.abs(a); e <= b; e++)g.push(Q[e]); g.sort(function (a, b) { return a.height - b.height }); for (e = 0; e < g.length; e++)if (b = g[e], f < a) h++, f += G[b.id].height + ea, G[b.id].textBlock.text = "", G[b.id].indexLabelText = "", G[b.id].isDirty = !0, G[b.id].textBlock.measureText(); else break; return h } for (var e, g, f, h, r, k, m = 1, n = 0; n < 2 * m; n++) { 1416 for (var l = G.length - 1; 0 <= l && !(0 <= p(l) && p(l), f = G[l], h = f.textBlock, k = (r = q(l) < Q.length ? G[q(l)] : null) ? r.textBlock : null, e = +f.height.toFixed(6), g = +h.y.toFixed(6), !f.isDirty && 1417 (r && g + e + ea > +k.y.toFixed(6)) && (e = h.y + e + ea - k.y, g = a(l, -e), g < e && (0 < g && (e -= g), g = a(q(l), e), g != e))); l--); b() 1418 } 1419 } function d(a, b) { return (b < Q.length ? G[b].textBlock.y : s.reversed ? V + A : ua + A) - (0 > a ? s.reversed ? ua - A : V - A : G[a].textBlock.y + G[a].height + ea) } function l(a, b, c) { 1420 var e, g, f, r = [], d = A, p = []; -1 !== b && (0 <= X.indexOf(b) ? (g = X.indexOf(b), X.splice(g, 1)) : (X.push(b), X = X.sort(function (a, b) { return a - b }))); if (0 === X.length) r = ja; else { 1421 g = A * (1 != X.length || 0 != X[0] && X[0] != Q.length - 1 ? 2 : 1) / k(); for (var q = 0; q < Q.length; q++) { 1422 if (1 == X.length && 1423 0 == X[0]) { if (0 === q) { r.push(ja[q]); e = d; continue } }
1423 else 0 === q && (e = -1 * d); r.push(ja[q] + e); if (0 <= X.indexOf(q) || q < Q.length && 0 <= X.indexOf(q + 1)) e += g 1424 } 1425 } f = function () { for (var a = [], b = 0; b < Q.length; b++)a.push(r[b] - Q[b].y1); return a }(); var n = { 1426 startTime: (new Date).getTime(), duration: c || 500, easingFunction: function (a, b, c, e) { return N.easing.easeOutQuart(a, b, c, e) }, changeSection: function (a) { 1427 for (var b, c, e = 0; e < Q.length; e++)b = f[e], c = Q[e], b *= a, "undefined" === typeof p[e] && (p[e] = 0), 0 > p && (p *= -1), c.y1 += b - p[e], c.y2 += b - p[e], c.y3 += 1428 b - p[e], c.y4 += b - p[e], c.y5 && (c.y5 += b - p[e], c.y6 += b - p[e]), p[e] = b 1429 } 1430 }; a._animator.animate(0, c, function (c) { 1431 var e = a.plotArea.ctx || a.ctx; ia = !0; e.clearRect(u.x1, u.y1, u.x2 - u.x1, u.y2 - u.y1); e.fillStyle = a.backgroundColor; e.fillRect(u.x1, u.y1, u.width, u.height); n.changeSection(c, b); var g = {}; g.dataSeries = s; g.dataPoint = s.reversed ? s.dataPoints[z.length - 1 - b] : s.dataPoints[b]; g.index = s.reversed ? z.length - 1 - b : b; a.toolTip.highlightObjects([g]); for (g = 0; g < Q.length; g++)ra(e, Q[g], s.fillOpacity); w(e); K && ("inside" !== s.indexLabelPlacement ? 1432 m(e) : h(), t(e)); 1 <= c && (ia = !1) 1433 }, null, N.easing.easeOutQuart) 1434 } function k() { for (var a = 0, b = 0; b < Q.length - 1; b++)(0 <= X.indexOf(b) || 0 <= X.indexOf(b + 1)) && a++; return a } function m(a) { 1435 for (var b, c, e, g, h = 0; h < Q.length; h++)g = 1 === G[h].lineThickness % 2 ? 0.5 : 0, c = ((Q[h].y2 + Q[h].y4) / 2 << 0) + g, b = f(c).x2 - 1, e = G[h].textBlock.x, g = (G[h].textBlock.y + G[h].height / 2 << 0) + g, G[h].isDirty || 0 == G[h].lineThickness || (a.strokeStyle = G[h].lineColor, a.lineWidth = G[h].lineThickness, a.setLineDash && a.setLineDash(H(G[h].lineDashType, G[h].lineThickness)), 1436 a.beginPath(), a.moveTo(b, c), a.lineTo(e, g), a.stroke()) 1437 } function p(a) { for (a -= 1; -1 <= a && -1 != a && G[a].isDirty; a--); return a } function q(a) { for (a += 1; a <= Q.length && a != Q.length && G[a].isDirty; a++); return a } function f(a) { for (var b, c = 0; c < z.length; c++)if (Q[c].y1 < a && Q[c].y4 > a) { b = Q[c]; break } return b ? (a = b.y6 ? a > b.y6 ? b.x3 + (b.x4 - b.x3) / (b.y4 - b.y3) * (a - b.y3) : b.x2 + (b.x3 - b.x2) / (b.y3 - b.y2) * (a - b.y2) : b.x2 + (b.x3 - b.x2) / (b.y3 - b.y2) * (a - b.y2), { x1: a, x2: a }) : -1 } function t(a) { 1438 for (var b = 0; b < Q.length; b++)G[b].isDirty || (a && (G[b].textBlock.ctx = 1439 a), G[b].textBlock.y += G[b].textBlock._lineHeight / 2, G[b].textBlock.render(!0), G[b].textBlock.y -= G[b].textBlock._lineHeight / 2) 1440 } function w(a) { 1441 y.plotArea.layoutManager.reset(); a.roundRect || Aa(a); y.title && (y.title.dockInsidePlotArea || "center" === y.title.horizontalAlign && "center" === y.title.verticalAlign) && (y.title.ctx = a, y.title.render()); if (y.subtitles) for (var b = 0; b < y.subtitles.length; b++) { 1442 var c = y.subtitles[b]; if (c.dockInsidePlotArea || "center" === c.horizontalAlign && "center" === c.verticalAlign) y.subtitles.ctx = 1443 a, c.render() 1444 } y.legend && (y.legend.dockInsidePlotArea || "center" === y.legend.horizontalAlign && "center" === y.legend.verticalAlign) && (y.legend.ctx = a, y.legend.setLayout(), y.legend.render()); wa.fNg && wa.fNg(y) 1445 } var y = this; if (!(0 >= a.dataSeriesIndexes.length)) { 1446 for (var s = this.data[a.dataSeriesIndexes[0]], z = s.dataPoints, u = this.plotArea, A = 0.025 * u.width, B = 0.01 * u.width, C = 0, D = u.height - 2 * A, J = Math.min(u.width - 2 * B, 2.8 * u.height), K = !1, U = 0; U < z.length; U++)if (!K && ("undefined" !== typeof z[U].indexLabel && null !== z[U].indexLabel && 1447 0 < z[U].indexLabel.toString().length) && (K = !0), !K && ("undefined" !== typeof z[U].label && null !== z[U].label && 0 < z[U].label.toString().length) && (K = !0), !K && "function" === typeof s.indexLabelFormatter || "function" === typeof z[U].indexLabelFormatter) K = !0; K = K || "undefined" !== typeof s.indexLabel && null !== s.indexLabel && 0 < s.indexLabel.toString().length; "inside" !== s.indexLabelPlacement && K || (B = (u.width - 0.75 * J) / 2); var U = u.x1 + B, L = u.x2 - B, P = u.y1 + A, R = u.y2 - A, T = a.targetCanvasCtx || this.plotArea.ctx || this.ctx; if (0 != s.length && (s.dataPoints && 1448 s.visible) && 0 !== z.length) { 1449 var O, F; a = 75 * J / 100; var S = 30 * (L - a) / 100; "funnel" === s.type ? (O = n(s.options.neckHeight) ? 0.35 * D : s.neckHeight, F = n(s.options.neckWidth) ? 0.25 * a : s.neckWidth, "string" === typeof O && O.match(/%$/) ? (O = parseInt(O), O = O * D / 100) : O = parseInt(O), "string" === typeof F && F.match(/%$/) ? (F = parseInt(F), F = F * a / 100) : F = parseInt(F), O > D ? O = D : 0 >= O && (O = 0), F > a ? F = a - 0.5 : 0 >= F && (F = 0)) : "pyramid" === s.type && (F = O = 0, s.reversed = s.reversed ? !1 : !0); var B = U + a / 2, W = U, Z = U + a, V = s.reversed ? R : P, M = B - F / 2, $ = B + F / 2, Y = s.reversed ? P + O : R - O, ua = 1450 s.reversed ? P : R; F = s.valueRepresents = s.valueRepresents ? s.valueRepresents : "height"; U = []; a = []; var Q = [], B = [], ba = P, da, ca = (Y - V) / (M - W), ga = -ca, J = "area" === F ? c() : g(); if (-1 !== J) { 1451 if (s.reversed) for (B.push(ba), F = J.length - 1; 0 < F; F--)ba += J[F], B.push(ba); else for (F = 0; F < J.length; F++)ba += J[F], B.push(ba); if (s.reversed) for (F = 0; F < J.length; F++)B[F] < Y ? (U.push(M), a.push($), da = F) : (U.push((B[F] - V + ca * W) / ca), a.push((B[F] - V + ga * Z) / ga)); else for (F = 0; F < J.length; F++)B[F] < Y ? (U.push((B[F] - V + ca * W) / ca), a.push((B[F] - V + ga * Z) / ga), da = F) : (U.push(M), 1452 a.push($)); for (F = 0; F < J.length - 1; F++)ba = s.reversed ? z[z.length - 1 - F].color ? z[z.length - 1 - F].color : s._colorSet[(z.length - 1 - F) % s._colorSet.length] : z[F].color ? z[F].color : s._colorSet[F % s._colorSet.length], F === da ? Q.push({ x1: U[F], y1: B[F], x2: a[F], y2: B[F], x3: $, y3: Y, x4: a[F + 1], y4: B[F + 1], x5: U[F + 1], y5: B[F + 1], x6: M, y6: Y, id: F, height: B[F + 1] - B[F], color: ba }) : Q.push({ x1: U[F], y1: B[F], x2: a[F], y2: B[F], x3: a[F + 1], y3: B[F + 1], x4: U[F + 1], y4: B[F + 1], id: F, height: B[F + 1] - B[F], color: ba }); var ea = 2, G = [], ia = !1, X = [], ja = [], U = !1; a = a = 0; Ea(X); 1453 for (F = 0; F < z.length; F++)z[F].exploded && (U = !0, s.reversed ? X.push(z.length - 1 - F) : X.push(F)); T.clearRect(u.x1, u.y1, u.width, u.height); T.fillStyle = y.backgroundColor; T.fillRect(u.x1, u.y1, u.width, u.height); if (K && s.visible && (b(), h(), "inside" !== s.indexLabelPlacement)) { e(); r(); for (F = 0; F < z.length; F++)G[F].isDirty || (a = G[F].textBlock.x + G[F].width, a = (L - a) / 2, 0 == F && (C = a), C > a && (C = a)); for (F = 0; F < Q.length; F++)Q[F].x1 += C, Q[F].x2 += C, Q[F].x3 += C, Q[F].x4 += C, Q[F].x5 && (Q[F].x5 += C, Q[F].x6 += C), G[F].textBlock.x += C } for (F = 0; F < Q.length; F++)C = 1454 Q[F], ra(T, C, s.fillOpacity), ja.push(C.y1); w(T); K && s.visible && ("inside" === s.indexLabelPlacement || y.animationEnabled || m(T), y.animationEnabled || t()); if (!K) for (F = 0; F < z.length; F++)C = s.dataPointIds[F], a = { id: C, objectType: "dataPoint", dataPointIndex: F, dataSeriesIndex: 0, funnelSection: Q[s.reversed ? z.length - 1 - F : F] }, y._eventManager.objectMap[C] = a; !y.animationEnabled && U ? l(y, -1, 0) : y.animationEnabled && !y.animatedRender && l(y, -1, 0); this.funnelPyramidClickHandler = function (a) { 1455 var b = -1; if (!ia && !y.isAnimating && (n(a.dataSeries.explodeOnClick) || 1456 a.dataSeries.explodeOnClick) && (b = s.reversed ? z.length - 1 - a.dataPointIndex : a.dataPointIndex, 0 <= b)) { a = b; if ("funnel" === s.type || "pyramid" === s.type) s.reversed ? z[z.length - 1 - a].exploded = z[z.length - 1 - a].exploded ? !1 : !0 : z[a].exploded = z[a].exploded ? !1 : !0; l(y, b, 500) } 1457 }; return { source: T, dest: this.plotArea.ctx, animationCallback: function (a, b) { N.fadeInAnimation(a, b); 1 <= a && (l(y, -1, 500), w(y.plotArea.ctx || y.ctx)) }, easingFunction: N.easing.easeInQuad, animationBase: 0 } 1458 } 1459 } 1460 } 1461 }; l.prototype.requestAnimFrame = function () { 1462 return window.requestAnimationFrame || 1463 window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (a) { window.setTimeout(a, 1E3 / 60) } 1464 }(); l.prototype.cancelRequestAnimFrame = window.cancelAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout; l.prototype.set = function (a, g, c) { 1465 c = "undefined" === typeof c ? !0 : c; "options" === a ? (this.options = g, 1466 c && this.render()) : l.base.set.call(this, a, g, c) 1467 };
1467 l.prototype.exportChart = function (a) { 1468 a = "undefined" === typeof a ? {} : a; var g = a.format ? a.format : "png", c = a.fileName ? a.fileName : this.exportFileName; if (a.toDataURL) return this.canvas.toDataURL("image/" + g); var b = this.canvas; if (b && g && c) { 1469 c = c + "." + g; a = "image/" + g; var b = b.toDataURL(a), e = !1, h = document.createElement("a"); h.download = c; h.href = b; if ("undefined" !== typeof Blob && new Blob) { 1470 for (var r = b.replace(/^data:[a-z\/]*;base64,/, ""), r = atob(r), d = new ArrayBuffer(r.length), 1471 d = new Uint8Array(d), n = 0; n < r.length; n++)d[n] = r.charCodeAt(n); g = new Blob([d.buffer], { type: "image/" + g }); try { window.navigator.msSaveBlob(g, c), e = !0 } catch (k) { h.dataset.downloadurl = [a, h.download, h.href].join(":"), h.href = window.URL.createObjectURL(g) } 1472 } if (!e) try { event = document.createEvent("MouseEvents"), event.initMouseEvent("click", !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), h.dispatchEvent ? h.dispatchEvent(event) : h.fireEvent && h.fireEvent("onclick") } catch (m) { 1473 g = window.open(), g.document.write("<img src='" + b + "'></img><div>Please right click on the image and save it to your device</div>"), 1474 g.document.close() 1475 } 1476 } 1477 }; l.prototype.print = function () { 1478 var a = this.exportChart({ toDataURL: !0 }), g = document.createElement("iframe"); g.setAttribute("class", "canvasjs-chart-print-frame"); L(g, { position: "absolute", width: "100%", border: "0px", margin: "0px 0px 0px 0px", padding: "0px 0px 0px 0px" }); g.style.height = this.height + "px"; this._canvasJSContainer.appendChild(g); var c = this, b = g.contentWindow || g.contentDocument.document || g.contentDocument; b.document.open();
1478 b.document.write('<!DOCTYPE HTML>\n<html><body><img src="' + 1479 a + '"/><body/></html>'); b.document.body && b.document.body.style && (b.document.body.style.margin = "0px 0px 0px 0px", b.document.body.style.padding = "0px 0px 0px 0px"); b.document.close(); setTimeout(function () { b.focus(); b.print(); setTimeout(function () { c._canvasJSContainer.removeChild(g) }, 1E3) }, 500) 1480 }; l.prototype.getPercentAndTotal = function (a, g) { 1481 var c = null, b = null, e = c = null; if (0 <= a.type.indexOf("stacked")) b = 0, c = g.x.getTime ? g.x.getTime() : g.x, c in a.plotUnit.yTotals && (b = a.plotUnit.yTotals[c], c = a.plotUnit.yAbsTotals[c], 1482 e = isNaN(g.y) ? 0 : 0 === c ? 0 : 100 * (g.y / c)); else if ("pie" === a.type || "doughnut" === a.type || "funnel" === a.type || "pyramid" === a.type) { for (c = b = 0; c < a.dataPoints.length; c++)isNaN(a.dataPoints[c].y) || (b += a.dataPoints[c].y); e = isNaN(g.y) ? 0 : 100 * (g.y / b) } return { percent: e, total: b } 1483 }; l.prototype.replaceKeywordsWithValue = function (a, g, c, b, e) { 1484 var h = this; e = "undefined" === typeof e ? 0 : e; if ((0 <= c.type.indexOf("stacked") || "pie" === c.type || "doughnut" === c.type || "funnel" === c.type || "pyramid" === c.type) && (0 <= a.indexOf("#percent") || 0 <= a.indexOf("#total"))) { 1485 var r = 1486 "#percent", d = "#total", n = this.getPercentAndTotal(c, g), d = isNaN(n.total) ? d : n.total, r = isNaN(n.percent) ? r : n.percent; do { n = ""; if (c.percentFormatString) n = c.percentFormatString; else { var n = "#,##0.", k = Math.max(Math.ceil(Math.log(1 / Math.abs(r)) / Math.LN10), 2); if (isNaN(k) || !isFinite(k)) k = 2; for (var m = 0; m < k; m++)n += "#"; c.percentFormatString = n } a = a.replace("#percent", ga(r, n, h._cultureInfo)); a = a.replace("#total", ga(d, c.yValueFormatString ? c.yValueFormatString : "#,##0.########", h._cultureInfo)) } while (0 <= a.indexOf("#percent") || 1487 0 <= a.indexOf("#total")) 1488 } return a.replace(/\{.*?\}|"[^"]*"|'[^']*'/g, function (a) { 1489 if ('"' === a[0] && '"' === a[a.length - 1] || "'" === a[0] && "'" === a[a.length - 1]) return a.slice(1, a.length - 1); a = Ha(a.slice(1, a.length - 1)); a = a.replace("#index", e); var r = null; try { var f = a.match(/(.*?)\s*\[\s*(.*?)\s*\]/); f && 0 < f.length && (r = Ha(f[2]), a = Ha(f[1])) } catch (d) { } f = null; if ("color" === a) return "waterfall" === c.type ? g.color ? g.color : 0 < g.y ? c.risingColor : c.fallingColor : "error" === c.type ? c.color ? c.color : c._colorSet[r % c._colorSet.length] : 1490 g.color ? g.color : c.color ? c.color : c._colorSet[b % c._colorSet.length]; if (g.hasOwnProperty(a)) f = g; else if (c.hasOwnProperty(a)) f = c; else return ""; f = f[a]; null !== r && (f = f[r]); return "x" === a ? (c.axisX && "dateTime" === c.axisX.valueType || "dateTime" === c.xValueType || g.x && g.x.getTime) && !c.axisX.logarithmic ? Da(f, g.xValueFormatString ? g.xValueFormatString : c.xValueFormatString ? c.xValueFormatString : c.xValueFormatString = h.axisX && h.axisX.autoValueFormatString ? h.axisX.autoValueFormatString : "DD MMM YY", h._cultureInfo) : ga(f, g.xValueFormatString ? 1491 g.xValueFormatString : c.xValueFormatString ? c.xValueFormatString : c.xValueFormatString = "#,##0.########", h._cultureInfo) : "y" === a ? ga(f, g.yValueFormatString ? g.yValueFormatString : c.yValueFormatString ? c.yValueFormatString : c.yValueFormatString = "#,##0.########", h._cultureInfo) : "z" === a ? ga(f, g.zValueFormatString ? g.zValueFormatString : c.zValueFormatString ? c.zValueFormatString : c.zValueFormatString = "#,##0.########", h._cultureInfo) : f 1492 }) 1493 }; qa(R, Z); R.prototype.setLayout = function () { 1494 var a = this.dockInsidePlotArea ? this.chart.plotArea : 1495 this.chart, g = a.layoutManager.getFreeSpace(), c = null, b = 0, e = 0, h = 0, r = 0, d = this.markerMargin = this.chart.options.legend && !n(this.chart.options.legend.markerMargin) ? this.chart.options.legend.markerMargin : 0.3 * this.fontSize; this.height = 0; var l = [], k = []; if ("top" === this.verticalAlign || "bottom" === this.verticalAlign) this.orientation = "horizontal", c = this.verticalAlign, h = this.maxWidth = null !== this.maxWidth ? this.maxWidth : g.width, r = this.maxHeight = null !== this.maxHeight ? this.maxHeight : 0.5 * g.height; else if ("center" === this.verticalAlign) { 1496 this.orientation = 1497 "vertical"; if ("left" === this.horizontalAlign || "center" === this.horizontalAlign || "right" === this.horizontalAlign) c = this.horizontalAlign; h = this.maxWidth = null !== this.maxWidth ? this.maxWidth : 0.5 * g.width; r = this.maxHeight = null !== this.maxHeight ? this.maxHeight : g.height 1498 } this.errorMarkerColor = []; for (var m = 0; m < this.dataSeries.length; m++) { 1499 var p = this.dataSeries[m]; if (p.dataPoints && p.dataPoints.length) { 1500 if ("pie" !== p.type && "doughnut" !== p.type && "funnel" !== p.type && "pyramid" !== p.type) { 1501 var q = p.legendMarkerType = p.legendMarkerType ? 1502 p.legendMarkerType : "line" !== p.type && "stepLine" !== p.type && "spline" !== p.type && "scatter" !== p.type && "bubble" !== p.type || !p.markerType ? "error" === p.type && p._linkedSeries ? p._linkedSeries.legendMarkerType ? p._linkedSeries.legendMarkerType : W.getDefaultLegendMarker(p._linkedSeries.type) : W.getDefaultLegendMarker(p.type) : p.markerType, f = p.legendText ? p.legendText : this.itemTextFormatter ? this.itemTextFormatter({ chart: this.chart, legend: this.options, dataSeries: p, dataPoint: null }) : p.name, v = p.legendMarkerColor = p.legendMarkerColor ? 1503 p.legendMarkerColor : p.markerColor ? p.markerColor : "error" === p.type ? n(p.whiskerColor) ? p._colorSet[0] : p.whiskerColor : p._colorSet[0], w = p.markerSize || "line" !== p.type && "stepLine" !== p.type && "spline" !== p.type ? 0.75 * this.lineHeight : 0, y = p.legendMarkerBorderColor ? p.legendMarkerBorderColor : p.markerBorderColor, s = p.legendMarkerBorderThickness ? p.legendMarkerBorderThickness : p.markerBorderThickness ? Math.max(1, Math.round(0.2 * w)) : 0; "error" === p.type && this.errorMarkerColor.push(v); f = p.legendText = this.chart.replaceKeywordsWithValue(f, 1504 p.dataPoints[0], p, m); q = { markerType: q, markerColor: v, text: f, textBlock: null, chartType: p.type, markerSize: w, lineColor: p._colorSet[0], dataSeriesIndex: p.index, dataPointIndex: null, markerBorderColor: y, markerBorderThickness: s }; l.push(q) 1505 } else for (var z = 0; z < p.dataPoints.length; z++) { 1506 var u = p.dataPoints[z], q = u.legendMarkerType ? u.legendMarkerType : p.legendMarkerType ? p.legendMarkerType : W.getDefaultLegendMarker(p.type), f = u.legendText ? u.legendText : p.legendText ? p.legendText : this.itemTextFormatter ? this.itemTextFormatter({ 1507 chart: this.chart, 1508 legend: this.options, dataSeries: p, dataPoint: u 1509 }) : u.name ? u.name : "DataPoint: " + (z + 1), v = u.legendMarkerColor ? u.legendMarkerColor : p.legendMarkerColor ? p.legendMarkerColor : u.color ? u.color : p.color ? p.color : p._colorSet[z % p._colorSet.length], w = 0.75 * this.lineHeight, y = u.legendMarkerBorderColor ? u.legendMarkerBorderColor : p.legendMarkerBorderColor ? p.legendMarkerBorderColor : u.markerBorderColor ? u.markerBorderColor : p.markerBorderColor, s = u.legendMarkerBorderThickness ? u.legendMarkerBorderThickness : p.legendMarkerBorderThickness ? 1510 p.legendMarkerBorderThickness : u.markerBorderThickness || p.markerBorderThickness ? Math.max(1, Math.round(0.2 * w)) : 0, f = this.chart.replaceKeywordsWithValue(f, u, p, z), q = { markerType: q, markerColor: v, text: f, textBlock: null, chartType: p.type, markerSize: w, dataSeriesIndex: m, dataPointIndex: z, markerBorderColor: y, markerBorderThickness: s };
1510 (u.showInLegend || p.showInLegend && !1 !== u.showInLegend) && l.push(q) 1511 } n(p.legendText) && (p.legendText = p.name) 1512 } 1513 } !0 === this.reversed && l.reverse(); if (0 < l.length) { 1514 p = null; f = u = z = 0; u = null !== this.itemWidth ? 1515 null !== this.itemMaxWidth ? Math.min(this.itemWidth, this.itemMaxWidth, h) : this.itemMaxWidth = Math.min(this.itemWidth, h) : null !== this.itemMaxWidth ? Math.min(this.itemMaxWidth, h) : this.itemMaxWidth = h; w = 0 === w ? 0.75 * this.lineHeight : w; u = (this.itemMaxWidth ? this.itemMaxWidth : u) - (w + d); for (m = 0; m < l.length; m++) { 1516 q = l[m]; v = u; if ("line" === q.chartType || "spline" === q.chartType || "stepLine" === q.chartType) v -= 2 * 0.1 * this.lineHeight; if (!(0 >= r || "undefined" === typeof r || 0 >= v || "undefined" === typeof v)) if ("horizontal" === this.orientation) { 1517 q.textBlock = 1518 new ka(this.ctx, { x: 0, y: 0, maxWidth: v, maxHeight: this.itemWrap ? r : this.lineHeight, angle: 0, text: q.text, horizontalAlign: "left", fontSize: this.fontSize, fontFamily: this.fontFamily, fontWeight: this.fontWeight, fontColor: this.fontColor, fontStyle: this.fontStyle, textBaseline: "middle" }); q.textBlock.measureText(); null !== this.itemWidth && (q.textBlock.width = this.itemWidth - (w + d + ("line" === q.chartType || "spline" === q.chartType || "stepLine" === q.chartType ? 2 * 0.1 * this.lineHeight : 0))); if (!p || p.width + Math.round(q.textBlock.width + 1519 w + d + (0 === p.width ? 0 : this.horizontalSpacing) + ("line" === q.chartType || "spline" === q.chartType || "stepLine" === q.chartType ? 2 * 0.1 * this.lineHeight : 0)) > h) p = { items: [], width: 0 }, k.push(p), this.height += f, f = 0; f = Math.max(f, q.textBlock.height ? q.textBlock.height : this.lineHeight); q.textBlock.x = p.width; q.textBlock.y = 0; p.width += Math.round(q.textBlock.width + w + d + (0 === p.width ? 0 : this.horizontalSpacing) + ("line" === q.chartType || "spline" === q.chartType || "stepLine" === q.chartType ? 2 * 0.1 * this.lineHeight : 0)); p.items.push(q); this.width = 1520 Math.max(p.width, this.width) 1521 } else q.textBlock = new ka(this.ctx, { x: 0, y: 0, maxWidth: u, maxHeight: !0 === this.itemWrap ? r : 1.5 * this.fontSize, angle: 0, text: q.text, horizontalAlign: "left", fontSize: this.fontSize, fontFamily: this.fontFamily, fontWeight: this.fontWeight, fontColor: this.fontColor, fontStyle: this.fontStyle, textBaseline: "middle" }), q.textBlock.measureText(), null !== this.itemWidth && (q.textBlock.width = this.itemWidth - (w + d + ("line" === q.chartType || "spline" === q.chartType || "stepLine" === q.chartType ? 2 * 0.1 * this.lineHeight : 1522 0))), this.height < r - this.lineHeight ? (p = { items: [], width: 0 }, k.push(p)) : (p = k[z], z = (z + 1) % k.length), p && (this.height += q.textBlock.height ? q.textBlock.height : this.lineHeight, q.textBlock.x = p.width, q.textBlock.y = 0, p.width += Math.round(q.textBlock.width + w + d + (0 === p.width ? 0 : this.horizontalSpacing) + ("line" === q.chartType || "spline" === q.chartType || "stepLine" === q.chartType ? 2 * 0.1 * this.lineHeight : 0)), p.items.push(q), this.width = Math.max(p.width, this.width)) 1523 } this.height = !1 === this.itemWrap ? k.length * this.lineHeight : this.height + 1524 f; this.height = Math.min(r, this.height); this.width = Math.min(h, this.width) 1525 } "top" === this.verticalAlign ? (e = "left" === this.horizontalAlign ? g.x1 : "right" === this.horizontalAlign ? g.x2 - this.width : g.x1 + g.width / 2 - this.width / 2, b = g.y1) : "center" === this.verticalAlign ? (e = "left" === this.horizontalAlign ? g.x1 : "right" === this.horizontalAlign ? g.x2 - this.width : g.x1 + g.width / 2 - this.width / 2, b = g.y1 + g.he
1525ight / 2 - this.height / 2) : "bottom" === this.verticalAlign && (e = "left" === this.horizontalAlign ? g.x1 : "right" === this.horizontalAlign ? g.x2 - 1526 this.width : g.x1 + g.width / 2 - this.width / 2, b = g.y2 - this.height); this.items = l; for (m = 0; m < this.items.length; m++)q = l[m], q.id = ++this.chart._eventManager.lastObjectId, this.chart._eventManager.objectMap[q.id] = { id: q.id, objectType: "legendItem", legendItemIndex: m, dataSeriesIndex: q.dataSeriesIndex, dataPointIndex: q.dataPointIndex }; this.markerSize = w; this.rows = k; 0 < l.length && a.layoutManager.registerSpace(c, { width: this.width + 2 + 2, height: this.height + 5 + 5 }); this.bounds = { x1: e, y1: b, x2: e + this.width, y2: b + this.height } 1527 }; R.prototype.render = 1528 function () { 1529 var a = this.bounds.x1, g = this.bounds.y1, c = this.markerMargin, b = this.maxWidth, e = this.maxHeight, h = this.markerSize, r = this.rows; (0 < this.borderThickness && this.borderColor || this.backgroundColor) && this.ctx.roundRect(a, g, this.width, this.height, this.cornerRadius, this.borderThickness, this.backgroundColor, this.borderColor); for (var d = 0, n = 0; n < r.length; n++) { 1530 for (var k = r[n], m = 0, p = 0; p < k.items.length; p++) { 1531 var q = k.items[p], f = q.textBlock.x + a + (0 === p ? 0.2 * h : this.horizontalSpacing), l = g + d, w = f; this.chart.data[q.dataSeriesIndex].visible || 1532 (this.ctx.globalAlpha = 0.5); this.ctx.save(); this.ctx.beginPath(); this.ctx.rect(a, g, b, Math.max(e - e % this.lineHeight, 0)); this.ctx.clip(); if ("line" === q.chartType || "stepLine" === q.chartType || "spline" === q.chartType) this.ctx.strokeStyle = q.lineColor, this.ctx.lineWidth = Math.ceil(this.lineHeight / 8), this.ctx.beginPath(), this.ctx.moveTo(f - 0.1 * this.lineHeight, l + this.lineHeight / 2), this.ctx.lineTo(f + 0.85 * this.lineHeight, l + this.lineHeight / 2), this.ctx.stroke(), w -= 0.1 * this.lineHeight; if ("error" === q.chartType) { 1533 this.ctx.strokeStyle = 1534 this.errorMarkerColor[0]; this.ctx.lineWidth = h / 8; this.ctx.beginPath(); var v = f - 0.08 * this.lineHeight + 0.1 * this.lineHeight, s = l + 0.15 * this.lineHeight, z = 0.7 * this.lineHeight, u = z + 0.02 * this.lineHeight; this.ctx.moveTo(v, s); this.ctx.lineTo(v + z, s); this.ctx.stroke(); this.ctx.beginPath(); this.ctx.moveTo(v + z / 2, s); this.ctx.lineTo(v + z / 2, s + u); this.ctx.stroke(); this.ctx.beginPath(); this.ctx.moveTo(v, s + u); this.ctx.lineTo(v + z, s + u); this.ctx.stroke(); this.errorMarkerColor.shift() 1535 } Y.drawMarker(f + h / 2, l + this.lineHeight / 2, this.ctx, 1536 q.markerType, "error" === q.chartType || "line" === q.chartType || "spline" === q.chartType ? q.markerSize / 2 : q.markerSize, q.markerColor, q.markerBorderColor, q.markerBorderThickness); q.textBlock.x = f + c + h; if ("line" === q.chartType || "stepLine" === q.chartType || "spline" === q.chartType) q.textBlock.x += 0.1 * this.lineHeight; q.textBlock.y = Math.round(l + this.lineHeight / 2); q.textBlock.render(!0); this.ctx.restore(); m = 0 < p ? Math.max(m, q.textBlock.height ? q.textBlock.height : this.lineHeight) : q.textBlock.height ? q.textBlock.height : this.lineHeight; 1537 this.chart.data[q.dataSeriesIndex].visible || (this.ctx.globalAlpha = 1); f = O(q.id); this.ghostCtx.fillStyle = f; this.ghostCtx.beginPath(); this.ghostCtx.fillRect(w, q.textBlock.y - this.lineHeight / 2, q.textBlock.x + q.textBlock.width - w, q.textBlock.height ? q.textBlock.height : this.lineHeight); q.x1 = this.chart._eventManager.objectMap[q.id].x1 = w; q.y1 = this.chart._eventManager.objectMap[q.id].y1 = q.textBlock.y - this.lineHeight / 2; q.x2 = this.chart._eventManager.objectMap[q.id].x2 = q.textBlock.x + q.textBlock.width; q.y2 = this.chart._eventManager.objectMap[q.id].y2 = 1538 q.textBlock.y + (q.textBlock.height ? q.textBlock.height : this.lineHeight) - this.lineHeight / 2 1539 } d += m 1540 } 1541 }; qa(W, Z); W.prototype.getDefaultAxisPlacement = function () { 1542 var a = this.type; if ("column" === 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" === 1543 a || "boxAndWhisker" === a || "waterfall" === a) return "normal"; if ("bar" === a || "stackedBar" === a || "stackedBar100" === a || "rangeBar" === a) return "xySwapped"; if ("pie" === a || "doughnut" === a || "funnel" === a || "pyramid" === a) return "none"; "error" !== a && window.console.log("Unknown Chart Type: " + a); return null 1544 }; W.getDefaultLegendMarker = function (a) { 1545 if ("column" === a || "stackedColumn" === a || "stackedLine" === a || "bar" === a || "stackedBar" === a || "stackedBar100" === a || "bubble" === a || "scatter" === a || "stackedColumn100" === a || "stackedLine100" === a || 1546 "stepArea" === a || "candlestick" === a || "ohlc" === a || "rangeColumn" === a || "rangeBar" === a || "rangeArea" === a || "rangeSplineArea" === a || "boxAndWhisker" === a || "waterfall" === a) return "square"; if ("line" === a || "stepLine" === a || "spline" === a || "pie" === a || "doughnut" === a) return "circle"; if ("area" === a || "splineArea" === a || "stackedArea" === a || "stackedArea100" === a || "funnel" === a || "pyramid" === a) return "triangle"; if ("error" === a) return "none"; window.console.log("Unknown Chart Type: " + a); return null 1547 }; W.prototype.getDataPointAtX = function (a, 1548 g) { 1549 if (!this.dataPoints || 0 === this.dataPoints.length) return null; var c = { dataPoint: null, distance: Infinity, index: NaN }, b = null, e = 0, h = 0, d = 1, n = Infinity, l = 0, k = 0, m = 0; "none" !== this.chart.plotInfo.axisPlacement && (this.axisX.logarithmic ? (m = Math.log(this.dataPoints[this.dataPoints.length - 1].x / this.dataPoints[0].x), m = 1 < m ? Math.min(Math.max((this.dataPoints.length - 1) / m * Math.log(a / this.dataPoints[0].x) >> 0, 0), this.dataPoints.length) : 0) : (m = this.dataPoints[this.dataPoints.length - 1].x - this.dataPoints[0].x, m = 0 < m ? Math.min(Math.max((this.dataPoints.length - 1550 1) / m * (a - this.dataPoints[0].x) >> 0, 0), this.dataPoints.length) : 0)); for (; ;) { h = 0 < d ? m + e : m - e; if (0 <= h && h < this.dataPoints.length) { var b = this.dataPoints[h], p = this.axisX.logarithmic ? b.x > a ? b.x / a : a / b.x : Math.abs(b.x - a); p < c.distance && (c.dataPoint = b, c.distance = p, c.index = h); b = p; b <= n ? n = b : 0 < d ? l++ : k++; if (1E3 < l && 1E3 < k) break } else if (0 > m - e && m + e >= this.dataPoints.length) break; -1 === d ? (e++, d = 1) : d = -1 } return g || (c.dataPoint.x.getTime ? c.dataPoint.x.getTime() : c.dataPoint.x) !== (a.getTime ? a.getTime() : a) ? g && null !== c.dataPoint ? c : null : 1551 c 1552 }; W.prototype.getDataPointAtXY = function (a, g, c) { 1553 if (!this.dataPoints || 0 === this.dataPoints.length || a < this.chart.plotArea.x1 || a > this.chart.plotArea.x2 || g < this.chart.plotArea.y1 || g > this.chart.plotArea.y2) return null; c = c || !1; var b = [], e = 0, h = 0, d = 1, l = !1, v = Infinity, k = 0, m = 0, p = 0; if ("none" !== this.chart.plotInfo.axisPlacement) if (p = (this.chart.axisX[0] ? this.chart.axisX[0] : this.chart.axisX2[0]).getXValueAt({ x: a, y: g }), this.axisX.logarithmic) var q = Math.log(this.dataPoints[this.dataPoints.length - 1].x / this.dataPoints[0].x), 1554 p = 1 < q ? Math.min(Math.max((this.dataPoints.length - 1) / q * Math.log(p / this.dataPoints[0].x) >> 0, 0), this.dataPoints.length) : 0; else q = this.dataPoints[this.dataPoints.length - 1].x - this.dataPoints[0].x, p
1554= 0 < q ? Math.min(Math.max((this.dataPoints.length - 1) / q * (p - this.dataPoints[0].x) >> 0, 0), this.dataPoints.length) : 0; for (; ;) { 1555 h = 0 < d ? p + e : p - e; if (0 <= h && h < this.dataPoints.length) { 1556 var q = this.chart._eventManager.objectMap[this.dataPointIds[h]], f = this.dataPoints[h], t = null; if (q) { 1557 switch (this.type) { 1558 case "column": case "stackedColumn": case "stackedColumn100": case "bar": case "stackedBar": case "stackedBar100": case "rangeColumn": case "rangeBar": case "waterfall": case "error": a >= 1559 q.x1 && (a <= q.x2 && g >= q.y1 && g <= q.y2) && (b.push({ dataPoint: f, dataPointIndex: h, dataSeries: this, distance: Math.min(Math.abs(q.x1 - a), Math.abs(q.x2 - a), Math.abs(q.y1 - g), Math.abs(q.y2 - g)) }), l = !0); break; case "line": case "stepLine": case "spline": case "area": case "stepArea": case "stackedArea": case "stackedArea100": case "splineArea": case "scatter": var w = na("markerSize", f, this) || 4, y = c ? 20 : w, t = Math.sqrt(Math.pow(q.x1 - a, 2) + Math.pow(q.y1 - g, 2)); t <= y && b.push({ dataPoint: f, dataPointIndex: h, dataSeries: this, distance: t }); q = 1560 Math.abs(q.x1 - a); q <= v ? v = q : 0 < d ? k++ : m++; t <= w / 2 && (l = !0); break; case "rangeArea": case "rangeSplineArea": w = na("markerSize", f, this) || 4; y = c ? 20 : w; t = Math.min(Math.sqrt(Math.pow(q.x1 - a, 2) + Math.pow(q.y1 - g, 2)), Math.sqrt(Math.pow(q.x1 - a, 2) + Math.pow(q.y2 - g, 2))); t <= y && b.push({ dataPoint: f, dataPointIndex: h, dataSeries: this, distance: t }); q = Math.abs(q.x1 - a); q <= v ? v = q : 0 < d ? k++ : m++; t <= w / 2 && (l = !0); break; case "bubble": w = q.size; t = Math.sqrt(Math.pow(q.x1 - a, 2) + Math.pow(q.y1 - g, 2)); t <= w / 2 && (b.push({ 1561 dataPoint: f, dataPointIndex: h, dataSeries: this, 1562 distance: t 1563 }), l = !0); break; case "pie": case "doughnut": w = q.center; y = "doughnut" === this.type ? q.percentInnerRadius * q.radius : 0; t = Math.sqrt(Math.pow(w.x - a, 2) + Math.pow(w.y - g, 2)); t < q.radius && t > y && (t = Math.atan2(g - w.y, a - w.x), 0 > t && (t += 2 * Math.PI), t = Number(((180 * (t / Math.PI) % 360 + 360) % 360).toFixed(12)), w = Number(((180 * (q.startAngle / Math.PI) % 360 + 360) % 360).toFixed(12)), y = Number(((180 * (q.endAngle / Math.PI) % 360 + 360) % 360).toFixed(12)), 0 === y && 1 < q.endAngle && (y = 360), w >= y && (0 !== f.y && !n(f.y)) && (y += 360, t < w && (t += 360)), t > w && t < y && 1564 (b.push({ dataPoint: f, dataPointIndex: h, dataSeries: this, distance: 0 }), l = !0)); break; case "funnel": case "pyramid": t = q.funnelSection; g > t.y1 && g < t.y4 && (t.y6 ? g > t.y6 ? (h = t.x6 + (t.x5 - t.x6) / (t.y5 - t.y6) * (g - t.y6), t = t.x3 + (t.x4 - t.x3) / (t.y4 - t.y3) * (g - t.y3)) : (h = t.x1 + (t.x6 - t.x1) / (t.y6 - t.y1) * (g - t.y1), t = t.x2 + (t.x3 - t.x2) / (t.y3 - t.y2) * (g - t.y2)) : (h = t.x1 + (t.x4 - t.x1) / (t.y4 - t.y1) * (g - t.y1), t = t.x2 + (t.x3 - t.x2) / (t.y3 - t.y2) * (g - t.y2)), a > h && a < t && (b.push({ dataPoint: f, dataPointIndex: q.dataPointIndex, dataSeries: this, distance: 0 }), l = !0)); 1565 break; case "boxAndWhisker": if (a >= q.x1 - q.borderThickness / 2 && a <= q.x2 + q.borderThickness / 2 && g >= q.y4 - q.borderThickness / 2 && g <= q.y1 + q.borderThickness / 2 || Math.abs(q.x2 - a + q.x1 - a) < q.borderThickness && g >= q.y1 && g <= q.y4) b.push({ dataPoint: f, dataPointIndex: h, dataSeries: this, distance: Math.min(Math.abs(q.x1 - a), Math.abs(q.x2 - a), Math.abs(q.y2 - g), Math.abs(q.y3 - g)) }), l = !0; break; case "candlestick": if (a >= q.x1 - q.borderThickness / 2 && a <= q.x2 + q.borderThickness / 2 && g >= q.y2 - q.borderThickness / 2 && g <= q.y3 + q.borderThickness / 2 || Math.abs(q.x2 - 1566 a + q.x1 - a) < q.borderThickness && g >= q.y1 && g <= q.y4) b.push({ dataPoint: f, dataPointIndex: h, dataSeries: this, distance: Math.min(Math.abs(q.x1 - a), Math.abs(q.x2 - a), Math.abs(q.y2 - g), Math.abs(q.y3 - g)) }), l = !0; break; case "ohlc": if (Math.abs(q.x2 - a + q.x1 - a) < q.borderThickness && g >= q.y2 && g <= q.y3 || a >= q.x1 && a <= (q.x2 + q.x1) / 2 && g >= q.y1 - q.borderThickness / 2 && g <= q.y1 + q.borderThickness / 2 || a >= (q.x1 + q.x2) / 2 && a <= q.x2 && g >
1566= q.y4 - q.borderThickness / 2 && g <= q.y4 + q.borderThickness / 2) b.push({ 1567 dataPoint: f, dataPointIndex: h, dataSeries: this, distance: Math.min(Math.abs(q.x1 - 1568 a), Math.abs(q.x2 - a), Math.abs(q.y2 - g), Math.abs(q.y3 - g)) 1569 }), l = !0 1570 }if (l || 1E3 < k && 1E3 < m) break 1571 } 1572 } else if (0 > p - e && p + e >= this.dataPoints.length) break; -1 === d ? (e++, d = 1) : d = -1 1573 } a = null; for (g = 0; g < b.length; g++)a ? b[g].distance <= a.distance && (a = b[g]) : a = b[g]; return a 1574 }; W.prototype.getMarkerProperties = function (a, g, c, b) { 1575 var e = this.dataPoints, h = e[a].markerColor ? e[a].markerColor : this.markerColor ? this.markerColor : e[a].color ? e[a].color : this.color ? this.color : this._colorSet[a % this._colorSet.length], d = e[a].markerBorderColor ? e[a].markerBorderColor : 1576 this.markerBorderColor ? this.markerBorderColor : null, l = n(e[a].markerBorderThickness) ? this.markerBorderThickness ? this.markerBorderThickness : null : e[a].markerBorderThickness, t = e[a].markerType ? e[a].markerType : this.markerType; a = n(e[a].markerSize) ? this.markerSize : e[a].markerSize; return { x: g, y: c, ctx: b, type: t, size: a, color: h, borderColor: d, borderThickness: l } 1577 }; qa(D, Z); D.prototype.createExtraLabelsForLog = function (a) { 1578 a = (a || 0) + 1; if (!(5 < a)) { 1579 var g = this.logLabelValues[0] || this.intervalStartPosition; if (Math.log(this.range) / 1580 Math.log(g / this.viewportMinimum) < this.noTicks - 1) { for (var c = D.getNiceNumber((g - this.viewportMinimum) / Math.min(Math.max(2, this.noTicks - this.logLabelValues.length), 3), !0), b = Math.ceil(this.viewportMinimum / c) * c; b < g; b += c)b < this.viewportMinimum || this.logLabelValues.push(b); this.logLabelValues.sort(Ta); this.createExtraLabelsForLog(a) } 1581 } 1582 }; D.prototype.createLabels = function () { 1583 var a, g, c = 0, b = 0, e, h = 0, d = 0, b = 0, b = this.interval, l = 0, t, k = 0.6 * this.chart.height, m; a = !1; var p = this.scaleBreaks ? this.scaleBreaks._appliedBreaks : 1584 [], q = p.length ? n(this.scaleBreaks.firstBreakIndex) ? 0 : this.scaleBreaks.firstBreakIndex : 0; if ("axisX" !== this.type || "dateTime" !== this.valueType || this.logarithmic) { 1585 e = this.viewportMaximum; if (this.labels) { a = Math.ceil(b); for (var b = Math.ceil(this.intervalStartPosition), f = !1, c = b; c < this.viewportMaximum; c += a)if (this.labels[c]) f = !0; else { f = !1; break } f && (this.interval = a, this.intervalStartPosition = b) } if (this.logarithmic && !this.equidistantInterval) for (this.logLabelValues || (this.logLabelValues = [], this.createExtraLabelsForLog()), 1586 b = 0, f = q; b < this.logLabelValues.length; b++)if (c = this.logLabelValues[b], c < this.viewportMinimum) b++; else { 1587 for (; f < p.length && c > p[f].endValue; f++); a = f < p.length && c >= p[f].startValue && c <= p[f].endValue; m = c; a || (a = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.options, value: m, label: this.labels[m] ? this.labels[m] : null }) : "axisX" === this.type && this.labels[m] ? this.labels[m] : ga(m, this.valueFormatString, this.chart._cultureInfo), a = new ka(this.ctx, { 1588 x: 0, y: 0, maxWidth: h, maxHeight: d, angle: this.labelAngle, 1589 text: this.prefix + a + this.suffix, backgroundColor: this.labelBackgroundColor, borderColor: this.labelBorderColor, cornerRadius: this.labelCornerRadius, textAlign: this.labelTextAlign, fontSize: this.labelFontSize, fontFamily: this.labelFontFamily, fontWeight: this.labelFontWeight, fontColor: this.labelFontColor, fontStyle: this.labelFontStyle, textBaseline: "middle", borderThickness: 0 1590 }), this._labels.push({ position: m, textBlock: a, effectiveHeight: null })) 1591 } f = q; for (c = this.intervalStartPosition; c <= e; c = parseFloat(1E-12 > this.interval ? 1592 this.logarithmic && this.equidistantInterval ? c * Math.pow(this.logarithmBase, this.interval) : c + this.interval : (this.logarithmic && this.equidistantInterval ? c * Math.pow(this.logarithmBase, this.interval) : c + this.interval).toFixed(12))) { 1593 for (; f < p.length && c > p[f].endValue; f++); a = f < p.length && c >= p[f].startValue && c <= p[f].endValue; m = c; a || (a = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.options, value: m, label: this.labels[m] ? this.labels[m] : null }) : "axisX" === this.type && this.labels[m] ? this.labels[m] : 1594 ga(m, this.valueFormatString, this.chart._cultureInfo), a = new ka(this.ctx, { x: 0, y: 0, maxWidth: h, maxHeight: d, angle: this.labelAngle, text: this.prefix + a + this.suffix, textAlign: this.labelTextAlign, backgroundColor: this.labelBackgroun
1594dColor, 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" }), 1595 this._labels.push({ position: m, textBlock: a, effectiveHeight: null })) 1596 } 1597 } else for (this.intervalStartPosition = this.getLabelStartPoint(new Date(this.viewportMinimum), this.intervalType, this.interval), e = Za(new Date(this.viewportMaximum), this.interval, this.intervalType), f = q, c = this.intervalStartPosition; c < e; Za(c, b, this.intervalType)) { 1598 for (a = c.getTime(); f < p.length && a > p[f].endValue; f++); m = a; a = f < p.length && a >= p[f].startValue && a <= p[f].endValue; a || (a = this.labelFormatter ? this.labelFormatter({ 1599 chart: this.chart, axis: this.options, 1600 value: new Date(m), label: this.labels[m] ? this.labels[m] : null 1601 }) : "axisX" === this.type && this.labels[m] ? this.labels[m] : Da(m, this.valueFormatString, this.chart._cultureInfo), a = new ka(this.ctx, { 1602 x: 0, y: 0, maxWidth: h, backgroundColor: this.labelBackgroundColor, borderColor: this.labelBorderColor, borderThickness: this.labelBorderThickness, cornerRadius: this.labelCornerRadius, maxHeight: d, angle: this.labelAngle, text: this.prefix + a + this.suffix, textAlign: this.labelTextAlign, fontSize: this.labelFontSize, fontFamily: this.labelFontFamily, 1603 fontWeight: this.labelFontWeight, fontColor: this.labelFontColor, fontStyle: this.labelFontStyle, textBaseline: "middle" 1604 }), this._labels.push({ position: m, textBlock: a, effectiveHeight: null, breaksLabelType: void 0 })) 1605 } if ("bottom" === this._position || "top" === this._position) l = 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)) / 1606 Math.log(this.range) : this.lineCoordinates.width / (this.logarithmic && this.equidistantInterval ? Math.log(this.range) / Math.log(this.logarithmBase) : Math.abs(this.range)) * T[this.intervalType + "Duration"] * this.interval, h = "undefined" === typeof this.options.labelMaxWidth ? 0.5 * this.chart.width >> 0 : this.options.labelMaxWidth, this.chart.panEnabled || (d = "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) l = 1607 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 / 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)) * T[this.intervalType + "Duration"] * this.interval, this.chart.panEnabled || (h = "undefined" === 1608 typeof this.options.labelMaxWidth ? 0.3 * this.chart.width >> 0 : this.options.labelMaxWidth), d = "undefined" === typeof this.options.labelWrap || this.labelWrap ? 0.3 * this.chart.height >> 0 : 1.5 * this.labelFontSize; for (b = 0; b < this._labels.length; b++) { a = this._labels[b].textBlock; a.maxWidth = h; a.maxHeight = d; var A = a.measureText(); t = A.height } e = []; q = p = 0; if (this.labelAutoFit || this.options.labelAutoFit) if (n(this.labelAngle) || (this.labelAngle = (this.labelAngle % 360 + 360) % 360, 90 < this.labelAngle && 270 > this.labelAngle ? this.labelAngle -= 1609 180 : 270 <= this.labelAngle && 360 >= this.labelAngle && (this.labelAngle -= 360)), "bottom" === this._position || "top" === this._position) if (h = 0.9 * l >> 0, q = 0, !this.chart.panEnabled && 1 <= this._labels.length) { 1610 this.sessionVariables.labelFontSize = this.labelFontSize; this.sessionVariables.labelMaxWidth = h; this.sessionVariables.labelMaxHeight = d; this.sessionVariables.labelAngle = this.labelAngle; this.sessionVariables.labelWrap = this.labelWrap; for (c = 0; c < this._labels.length; c++)if (!this._labels[c].breaksLabelType) { 1611 a = this._labels[c].textBlock; 1612 for (var w, f = a.text.split(" "), b = 0; b < f.length; b++)m = f[b], this.ctx.font = a.fontStyle + " " + a.fontWeight + " " + a.fontSize + "px " + a.fontFamily, m = this.ctx.measureText(m), m.width > q && (w = c, q = m.width) 1613 } c = 0; for (c = this.intervalStartPosition < this.viewportMinimum ? 1 : 0; c < this._labels.length; c++)if (!this._labels[c].breaksLabelType) { 1614 a = this._labels[c].textBlock; A = a.measureText(); for (f = c + 1; f < this._labels.length; f++)if (!this._labels[f].breaksLabelType) { g = this._labels[f].textBlock; g = g.measureText(); break } e.push(a.height); this.sessionVariables.labelMaxHeight = 1615 Math.max.apply(Math, e); Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)); Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)); b = h * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (d - a.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)); if (n(this.options.labelAngle) && isNaN(this.options.labelAngle) && 0 !== this.options.labelAngle)
1615if (this.sessionVariables.labelMaxHeight = 0 === this.labelAngle ? d : Math.min((b - h * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), b), 1616 m = (k - (t + a.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(-25))) / Math.sin(Math.PI / 180 * Math.abs(-25)), !n(this.options.labelWrap)) this.labelWrap ? n(this.options.labelMaxWidth) ? (this.sessionVariables.labelMaxWidth = Math.min(Math.max(h, q), m), this.sessionVariables.labelWrap = this.labelWrap, g && A.width + g.width >> 0 > 2 * h && (this.sessionVariables.labelAngle = -25)) : (this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth, this.sessionVariables.labelAngle = this.sessionVariables.labelMaxWidth > 1617 h ? -25 : this.sessionVariables.labelAngle) : n(this.options.labelMaxWidth) ? (this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxHeight = d, this.sessionVariables.labelMaxWidth = h, g && A.width + g.width >> 0 > 2 * h && (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = m)) : (this.sessionVariables.labelAngle = this.sessionVariables.labelMaxWidth > h ? -25 : this.sessionVariables.labelAngle, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth, this.sessionVariables.labelMaxHeight = 1618 d, this.sessionVariables.labelWrap = this.labelWrap); else { 1619 if (n(this.options.labelWrap)) if (!n(this.options.labelMaxWidth)) this.options.labelMaxWidth < h ? (this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth, this.sessionVariables.labelMaxHeight = b) : (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth, this.sessionVariables.labelMaxHeight = d); else if (!n(g)) if (b = A.width + g.width >> 0, f = this.labelFontSize, q < h) b - 2 * h > p && (p = b - 2 * h, b >= 2 * h && b < 2.2 * h ? (this.sessionVariables.labelMaxWidth = 1620 h, n(this.options.labelFontSize) && 12 < f && (f = Math.floor(12 / 13 * f), a.measureText()), this.sessionVariables.labelFontSize = n(this.options.labelFontSize) ? f : this.options.labelFontSize, this.sessionVariables.labelAngle = this.labelAngle) : b >= 2.2 * h && b < 2.8 * h ? (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = m, this.sessionVariables.labelFontSize = f) : b >= 2.8 * h && b < 3.2 * h ? (this.sessionVariables.labelMaxWidth = Math.max(h, q), this.sessionVariables.labelWrap = !0, n(this.options.labelFontSize) && 12 < this.labelFontSize && 1621 (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = n(this.options.labelFontSize) ? f : this.options.labelFontSize, this.sessionVariables.labelAngle = this.labelAngle) : b >= 3.2 * h && b < 3.6 * h ? (this.sessionVariables.labelAngle = -25, this.sessionVariables.labelWrap = !0, this.sessionVariables.labelMaxWidth = m, this.sessionVariables.labelFontSize = this.labelFontSize) : b > 3.6 * h && b < 5 * h ? (n(this.options.labelFontSize) && 12 < f && (f = Math.floor(12 / 13 * f), a.measureText()), this.sessionVariables.labelFontSize = 1622 n(this.options.labelFontSize) ? f : this.options.labelFontSize, this.sessionVariables.labelWrap = !0, this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = m) : b > 5 * h && (this.sessionVariables.labelWrap = !0, this.sessionVariables.labelMaxWidth = h, this.sessionVariables.labelFontSize = f, this.sessionVariables.labelMaxHeight = d, this.sessionVariables.labelAngle = this.labelAngle)); else if (w === c && (0 === w && q + this._labels[w + 1].textBlock.measureText().width - 2 * h > p || w === this._labels.length - 1 && q + this._labels[w - 1623 1].textBlock.measureText().width - 2 * h > p || 0 < w && w < this._labels.length - 1 && q + this._labels[w + 1].textBlock.measureText().width - 2 * h > p && q + this._labels[w - 1].textBlock.measureText().width - 2 * h > p)) p = 0 === w ? q + this._labels[w + 1].textBlock.measureText().width - 2 * h : q + this._labels[w - 1].textBlock.measureText().width - 2 * h, this.sessionVariables.labelFontSize = n(this.options.labelFontSize) ? f : this.options.labelFontSize, this.sessionVariables.labelWrap = !0, this.sessionVariables.labelAngle = -25, this.sessionVariables.labelMaxWidth = 1624 m; else if (0 === p) for (this.sessionVariables.labelFontSize = n(this.options.labelFontSize) ? f : this.options.labelFontSize, this.sessionVariables.labelWrap = !0, b = 0; b < this._labels.length; b++)a = this._labels[b].textBlock, a.maxWidth = this.sessionVariables.labelMaxWidth = Math.min(Math.max(h, q), m), A = a.measureText(), b < this._labels.length - 1 && (f = b + 1, g = this._labels[f].textBlock, g.maxWidth = this.sessionVariables.labelMaxWidth = Math.min(Math.max(h, q), m), g = g.measureText(), A.width + g.width >> 0 > 2 * h && (this.sessionVariables.labelAngle = 1625 -25)) 1626 } else (this.sessionVariables.labelAngle = this.labelAngle, this.sessionVariables.labelMaxHeight = 0 === this.labelAngle ? d : Math.min((b - h * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), b), m = 0 != this.labelAngle ? (k - (t + a.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) : h, this.sessionVariables.labelMaxHeight = this.labelWrap ? (k - m * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)) : 1627 1.5 * this.labelFontSize, n(this.options.labelWrap)) ? n(this.options.labelWrap) && (this.labelWrap && !n(this.options.labelMaxWidth) ? (this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : m, this.sessionVariables.labelMaxHeight = d) : (this.sessionVariables.labelAngle = this.labelAngle, this.sessionVariables.labelMaxWidth = m, this.sessionVariables.labelMaxHeight = b < 0.9 * l ? 0.9 * l : b, this.sessionVariables.labelWrap = this.labelWrap)) : (this.options.labelWrap ? 1628 (this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : m) : (n(this.options.labelMaxWidth), this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : m, this.sessionVariables.labelWrap = this.labelWrap), this.sessionVariables.labelMaxHeight = d) 1629 } for (b = 0; b < this._labels.length; b++)a = this._labels[b].textBlock, a.maxWidth = this.labelMaxWidth = this.sessionVariables.labelMaxWidth, a.fontSize = this.sessionVariables.labelFontSize, 1630 a.angle = this.labelAngle = this.sessionVariables.labelAngle, a.wrap = this.labelWrap = this.sessionVariables.labelWrap, a.maxHeight = this.sessionVariables.labelMaxHeight, a.measureText() 1631 } else for (c = 0; c < this._labels.length; c++)a = this._labels[c].textBlock, a.maxWidth = this.labelMaxWidth = n(this.options.labelMaxWidth) ? n(this.sessionVariables.labelMaxWidth) ? this.sessionVariables.labelMaxWidth = h : this.sessionVariables.labelMaxWidth : this.options.labelMaxWidth, a.fontSize = this.labelFontSize = n(this.options.labelFontSize) ? 1632 n(this.sessionVariables.labelFontSize) ? this.sessionVariables.labelFontSize = this.labelFontSize : this.sessionVariables.labelFontSize : this.options.labelFontSize, a.angle = this.labelAngle = n(this.options.labelAngle) ? n(this.sessionVariables.labelAngle) ? this.sessionVariables.labelAngle = this.labelAngle : this.sessionVariables.labelAngle : this.labelAngle, a.wrap = this.labelWrap = n(this.options.labelWrap) ? n(this.sessionVariables.labelWrap) ? this.sessionVariables.labelWrap = this.labelWrap : this.sessionVariables.labelWrap : 1633 this.options.labelWrap, a.maxHeight = n(this.sessionVariables.labelMaxHeight) ? this.sessionVariables.labelMaxHeight = d : this.sessionVariables.labelMaxHeight, a.measureText(); else if ("left" === this._position || "right" === this._position) if (h = n(this.options.labelMaxWidth) ? 0.3 * this.chart.width >> 0 : this.options.labelMaxWidth, d = "undefined" === typeof this.options.labelWrap || this.labelWrap ? 0.3 * this.chart.height >> 0 : 1.5 * this.labelFontSize, !this.chart.panEnabled && 1 <= this._labels.length) { 1634 this.sessionVariables.labelFontSize = 1635 this.labelFontSize; this.sessionVariables.labelMaxWidth = h; this.sessionVariables.labelMaxHeight = d; this.sessionVariables.labelAngle = n(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle; this.sessionVariables.labelWrap = this.labelWrap; for (c = 0; c < this._labels.length; c++)if (!this._labels[c].breaksLabelType) { 1636 a = this._labels[c].textBlock; A = a.measureText(); for (f = c + 1; f < this._labels.length; f++)if (!this._labels[f].breaksLabelType) { g = this._labels[f].textBlock; g = g.measureText(); break } e.push(a.height); 1637 this.sessionVariables.labelMaxHeight = Math.max.apply(Math, e); b = h * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (d - 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)); n(this.options.labelAngle) && isNaN(this.options.labelAngle) && 0 !== this.options.labelAngle ? n(this.options.labelWrap) ? n(this.options.labelWrap) && (n(this.options.labelMaxWidth) ? n(g) || (l = A.height + g.height >> 0, l - 2 * d > q && (q = l - 2 * d, l >= 2 * d && 1638 l < 2.4 * d ? (n(this.options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelMaxHeight = d, this.sessionVariables.labelFontSize = n(this.options.labelFontSize) ? this.labelFontSize : this.options.labelFontSize) : l >= 2.4 * d && l < 2.8 * d ? (this.sessionVariables.labelMaxHeight = b, this.sessionVariables.labelFontSize = this.labelFontSize, this.sessionVariables.labelWrap = !0) : l >= 2.8 * d && l < 3.2 * d ? (this.sessionVariables.labelMaxHeight = d, this.sessionVariables.labelWrap = 1639 !0, n(this.options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = n(this.options.labelFontSize) ? this.labelFontSize : this.options.labelFontSize, this.sessionVariables.labelAngle = n(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle) : l >= 3.2 * d && l < 3.6 * d ? (this.sessionVariables.labelMaxHeight = b, this.sessionVariables.labelWrap = !0, this.sessionVariables.labelFontSize = this.labelFontSize) : l > 3.6 * 1640 d && l < 10 * d ? (n(this.options.labelFontSize) && 12 < this.labelFontSize && (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = n(this.options.labelFontSize) ? this.labelFontSize : this.options.labelFontSize, this.sessionVariables.labelMaxWidth = h, this.sessionVariables.labelMaxHeight = d, this.sessionVariables.labelAngle = n(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle) : l > 10 * d && l < 50 * d && (n(this.options.labelFontSize) && 12 < this.labelFontSize && 1641 (this.labelFontSize = Math.floor(12 / 13 * this.labelFontSize), a.measureText()), this.sessionVariables.labelFontSize = n(this.options.labelFontSize) ? this.labelFontSize : this.options.labelFontSize, this.sessionVariables.labelMaxHeight = d, this.sessionVariables.labelMaxWidth = h, this.sessionVariables.labelAngle = n(this.sessionVariables.labelAngle) ? 0 : this.sessionVariables.labelAngle))) : (this.sessionVariables.labelMaxHeight = d, this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : this.sessionVariables.labelMaxWidth)) : 1642 (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 : h, this.sessionVariables.labelMaxHeight = d) : (this.sessionVariables.labelAngle = this.labelAngle, this.sessionVariables.labelMaxWidth = 0 === this.labelAngle ? h : Math.min((b - d * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle))) / Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), 1643 d), n(this.options.labelWrap)) ? n(this.options.labelWrap) && (this.labelWrap && !n(this.options.labelMaxWidth) ? (this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : this.sessionVariables.labelMaxWidth, this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxHeight = b) : (this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : h, this.sessionVariables.labelMaxHeight = 0 === this.labelAngle ? d : b, n(this.options.labelMaxWidth) && 1644 (this.sessionVariables.labelAngle = this.labelAngle))) : this.options.labelWrap ? (this.sessionVariables.labelMaxHeight = 0 === this.labelAngle ? d : b, this.sessionVariables.labelWrap = this.labelWrap, this.sessionVariables.labelMaxWidth = h) : (this.sessionVariables.labelMaxHeight = d, n(this.options.labelMaxWidth), this.sessionVariables.labelMaxWidth = this.options.labelMaxWidth ? this.options.labelMaxWidth : this.sessionVariables.labelMaxWidth, this.sessionVariables.labelWrap = this.labelWrap) 1645 } for (b = 0; b < this._labels.length; b++)a = 1646 this._labels[b].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() 1647 } else for (n(this.chart.stockChart) || this.chart.isNavigator || (this.sessionVariables.labelMaxHeight = d), c = 0; c < this._labels.length; c++)a = this._labels[c].textBlock, a.maxWidth = 1648 this.labelMaxWidth = n(this.options.labelMaxWidth) ? n(this.sessionVariables.labelMaxWidth) ? this.sessionVariables.labelMaxWidth = h : this.sessionVariables.labelMaxWidth : this.options.labelMaxWidth, a.fontSize = this.labelFontSize = n(this.options.labelFontSize) ? n(this.sessionVariables.labe
1648lFontSize) ? this.sessionVariables.labelFontSize = this.labelFontSize : this.sessionVariables.labelFontSize : this.options.labelFontSize, a.angle = this.labelAngle = n(this.options.labelAngle) ? n(this.sessionVariables.labelAngle) ? this.sessionVariables.labelAngle = 1649 this.labelAngle : this.sessionVariables.labelAngle : this.labelAngle, a.wrap = this.labelWrap = n(this.options.labelWrap) ? n(this.sessionVariables.labelWrap) ? this.sessionVariables.labelWrap = this.labelWrap : this.sessionVariables.labelWrap : this.options.labelWrap, a.maxHeight = n(this.sessionVariables.labelMaxHeight) ? this.sessionVariables.labelMaxHeight = d : this.sessionVariables.labelMaxHeight, a.measureText(); for (c = 0; c < this.stripLines.length; c++) { 1650 var h = this.stripLines[c], y; if ("outside" === h.labelPlacement) { 1651 d = this.sessionVariables.labelMaxWidth; 1652 if ("bottom" === this._position || "top" === this._position) n(h.options.labelWrap) && !n(this.sessionVariables.stripLineLabelMaxHeight) ? y = this.sessionVariables.stripLineLabelMaxHeight : this.sessionVariables.stripLineLabelMaxHeight = y = h.labelWrap ? 0.8 * this.chart.height >> 0 : 1.5 * this.labelFontSize; if ("left" === this._position || "right" === this._position) n(h.options.labelWrap) && !n(this.sessionVariables.stripLineLabelMaxHeight) ? y = this.sessionVariables.stripLineLabelMaxHeight : this.sessionVariables.stripLineLabelMaxHeight = 1653 y = h.labelWrap ? 0.8 * this.chart.width >> 0 : 1.5 * this.labelFontSize; n(h.labelBackgroundColor) && (h.labelBackgroundColor = "#EEEEEE") 1654 } else d = "bottom" === this._position || "top" === this._position ? 0.9 * this.chart.width >> 0 : 0.9 * this.chart.height >> 0, y = n(h.options.labelWrap) || h.labelWrap ? "bottom" === this._position || "top" === this._position ? 0.8 * this.chart.width >> 0 : 0.8 * this.chart.height >> 0 : 1.5 * this.labelFontSize, n(h.labelBackgroundColor) && (n(h.startValue) && 0 !== h.startValue ? h.labelBackgroundColor = v ? "transparent" : null : h.labelBackgroundColor = 1655 "#EEEEEE"); a = new ka(this.ctx, { 1656 x: 0, y: 0, backgroundColor: h.labelBackgroundColor, borderColor: h.labelBorderColor, borderThickness: h.labelBorderThickness, cornerRadius: h.labelCornerRadius, maxWidth: h.options.labelMaxWidth ? h.options.labelMaxWidth : d, maxHeight: y, angle: this.labelAngle, text: h.labelFormatter ? h.labelFormatter({ chart: this.chart, axis: this, stripLine: h }) : h.label, textAlign: this.labelTextAlign, fontSize: "outside" === h.labelPlacement ? h.options.labelFontSize ? h.labelFontSize : this.labelFontSize : h.labelFontSize, 1657 fontFamily: "outside" === h.labelPlacement ? h.options.labelFontFamily ? h.labelFontFamily : this.labelFontFamily : h.labelFontFamily, fontWeight: "outside" === h.labelPlacement ? h.options.labelFontWeight ? h.labelFontWeight : this.labelFontWeight : h.labelFontWeight, fontColor: h.labelFontColor || h.color, fontStyle: "outside" === h.labelPlacement ? h.options.labelFontStyle ? h.labelFontStyle : this.fontWeight : h.labelFontStyle, textBaseline: "middle" 1658 }); this._stripLineLabels.push({ position: h.value, textBlock: a, effectiveHeight: null, stripLine: h }) 1659 } 1660 }; 1661 D.prototype.createLabelsAndCalculateWidth = function () { 1662 var a = 0, g = 0; this._labels = []; this._stripLineLabels = []; var c = this.chart.isNavigator ? 0 : 5; if ("left" === this._position || "right" === this._position) { 1663 this.createLabels(); if ("inside" != this.labelPlacement || "inside" === this.labelPlacement && 0 < this._index) for (g = 0; g < this._labels.length; g++) { 1664 var b = this._labels[g].textBlock, e = b.measureText(), h = 0, h = 0 === this.labelAngle ? e.width : e.width * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)) + (e.height - b.fontSize / 2) * Math.sin(Math.PI / 1665 180 * Math.abs(this.labelAngle));
1665 a < h && (this.labelEffectiveWidth = a = h); this._labels[g].effectiveWidth = h 1666 } for (g = 0; g < this._stripLineLabels.length; g++)"outside" === this._stripLineLabels[g].stripLine.labelPlacement && (this._stripLineLabels[g].stripLine.value >= this.viewportMinimum && this._stripLineLabels[g].stripLine.value <= this.viewportMaximum) && (b = this._stripLineLabels[g].textBlock, e = b.measureText(), h = 0 === this.labelAngle ? e.width : e.width * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)) + (e.height - b.fontSize / 2) * 1667 Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)), "inside" === this.tickPlacement && (h += this.tickLength), "inside" === this.labelPlacement && (a += 0 < this._index ? h : 0), a < h && (a = h), this.stripLineLabelEffectiveWidth = this._stripLineLabels[g].effectiveWidth = h) 1668 } return (this.title ? this._titleTextBlock.measureText().height + 2 : 0) + a + ("inside" === this.tickPlacement ? 0 < this._index ? this.tickLength : 0 : this.tickLength) + c 1669 }; D.prototype.createLabelsAndCalculateHeight = function () { 1670 var a = 0; this._labels = []; this._stripLineLabels = []; var g, 1671 c = 0, b = this.chart.isNavigator ? 0 : 5; if ("bottom" === this._position || "top" === this._position) { 1672 this.createLabels(); if ("inside" != this.labelPlacement || "inside" === this.labelPlacement && 0 < this._index) for (c = 0; c < this._labels.length; c++) { 1673 g = this._labels[c].textBlock; var e = g.measureText(), h = 0, h = 0 === this.labelAngle ? e.height : e.width * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (e.height - g.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)); a < h && (this.labelEffectiveHeight = a = h); this._labels[c].effectiveHeight = 1674 h 1675 } for (c = 0; c < this._stripLineLabels.length; c++)"outside" === this._stripLineLabels[c].stripLine.labelPlacement && (this._stripLineLabels[c].stripLine.value >= this.viewportMinimum && this._stripLineLabels[c].stripLine.value <= this.viewportMaximum) && (g = this._stripLineLabels[c].textBlock, e = g.measureText(), h = 0 === this.labelAngle ? e.height : e.width * Math.sin(Math.PI / 180 * Math.abs(this.labelAngle)) + (e.height - g.fontSize / 2) * Math.cos(Math.PI / 180 * Math.abs(this.labelAngle)), "inside" === this.tickPlacement && (h += this.tickLength), 1676 "inside" === this.labelPlacement && (a += 0 < this._index ? h : 0), a < h && (a = h), this.stripLineLabelEffectiveHeight = this._stripLineLabels[c].effectiveHeight = h) 1677 } return (this.title ? this._titleTextBlock.measureText().height + 2 : 0) + a + ("inside" === this.tickPlacement ? 0 < this._index ? this.tickLength : 0 : this.tickLength) + b 1678 }; D.setLayout = function (a, g, c, b, e, h) { 1679 var d, l, t, k, m = a[0] ? a[0].chart : g[0].chart, p = m.isNavigator ? 0 : 10, q = m._axes; if (a && 0 < a.length) for (var f = 0; f < a.length; f++)a[f] && a[f].calculateAxisParameters(); if (g && 0 < g.length) for (f = 1680 0; f < g.length; f++)g[f].calculateAxisParameters(); if (c && 0 < c.length) for (f = 0; f < c.length; f++)c[f].calculateAxisParameters(); if (b && 0 < b.length) for (f = 0; f < b.length; f++)b[f].calculateAxisParameters(); for (f = 0; f < q.length; f++)if (q[f] && q[f].scaleBreaks && q[f].scaleBreaks._appliedBreaks.length) for (var v = q[f].scaleBreaks._appliedBreaks, w = 0; w < v.length && !(v[w].startValue > q[f].viewportMaximum); w++)v[w].endValue < q[f].viewportMinimum || (n(q[f].scaleBreaks.firstBreakIndex) && (q[f].scaleBreaks.firstBreakIndex = w), v[w].startValue >= 1681 q[f].viewPortMinimum && (q[f].scaleBreaks.lastBreakIndex = w)); for (var y = w = 0, s = 0, z = 0, u = 0, A = 0, B = 0, C, D, H = l = 0, K, J, L, v = K = J = L = !1, f = 0; f < q.length; f++)q[f] && q[f].title && (q[f]._titleTextBlock = new ka(q[f].ctx, { 1682 text: q[f].title, horizontalAlign: "center", fontSize: q[f].titleFontSize, fontFamily: q[f].titleFontFamily, fontWeight: q[f].titleFontWeight, fontColor: q[f].titleFontColor, fontStyle: q[f].titleFontStyle, borderColor: q[f].titleBorderColor, borderThickness: q[f].titleBorderThickness, backgroundColor: q[f].titleBackgroun
1682dColor, 1683 cornerRadius: q[f].titleCornerRadius, textBaseline: "middle" 1684 })); for (f = 0; f < q.length; f++)if (q[f].title) switch (q[f]._position) { 1685 case "left": q[f]._titleTextBlock.maxWidth = q[f].titleMaxWidth || h.height; q[f]._titleTextBlock.maxHeight = q[f].titleWrap ? 0.8 * h.width : 1.5 * q[f].titleFontSize; q[f]._titleTextBlock.angle = -90; break; case "right": q[f]._titleTextBlock.maxWidth = q[f].titleMaxWidth || h.height; q[f]._titleTextBlock.maxHeight = q[f].titleWrap ? 0.8 * h.width : 1.5 * q[f].titleFontSize; q[f]._titleTextBlock.angle = 90; break; default: q[f]._titleTextBlock.maxWidth = 1686 q[f].titleMaxWidth || h.width, q[f]._titleTextBlock.maxHeight = q[f].titleWrap ? 0.8 * h.height : 1.5 * q[f].titleFontSize, q[f]._titleTextBlock.angle = 0 1687 }if ("normal" === e) { 1688 for (var z = [], u = [], A = [], B = [], N = [], P = [], O = [], R = []; 4 > w;) { 1689 var F = 0, T = 0, S = 0, V = 0, W = e = 0, M = 0, Z = 0, X = 0, Y = 0, Q = 0, $ = 0; if (c && 0 < c.length) for (A = [], f = Q = 0; f < c.length; f++)A.push(Math.ceil(c[f] ? c[f].createLabelsAndCalculateWidth() : 0)), Q += A[f], M += c[f] && !m.isNavigator ? c[f].margin : 0; else A.push(Math.ceil(c[0] ? c[0].createLabelsAndCalculateWidth() : 0)); O.push(A); if (b && 0 < 1690 b.length) for (B = [], f = $ = 0; f < b.length; f++)B.push(Math.ceil(b[f] ? b[f].createLabelsAndCalculateWidth() : 0)), $ += B[f], Z += b[f] ? b[f].margin : 0; else B.push(Math.ceil(b[0] ? b[0].createLabelsAndCalculateWidth() : 0)); R.push(B); d = Math.round(h.x1 + Q + M); t = Math.round(h.x2 - $ - Z > m.width - p ? m.width - p : h.x2 - $ - Z); if (a && 0 < a.length) for (z = [], f = X = 0; f < a.length; f++)a[f] && (a[f].lineCoordinates = {}), a[f].lineCoordinates.width = Math.abs(t - d), a[f].title && (a[f]._titleTextBlock.maxWidth = 0 < a[f].titleMaxWidth && a[f].titleMaxWidth < a[f].lineCoordinates.width ? 1691 a[f].titleMaxWidth : a[f].lineCoordinates.width), z.push(Math.ceil(a[f] ? a[f].createLabelsAndCalculateHeight() : 0)), X += z[f], e += a[f] && !m.isNavigator ? a[f].margin : 0; else z.push(Math.ceil(a[0] ? a[0].createLabelsAndCalculateHeight() : 0)); N.push(z); if (g && 0 < g.length) for (u = [], f = Y = 0; f < g.length; f++)g[f] && (g[f].lineCoordinates = {}), g[f].lineCoordinates.width = Math.abs(t - d), g[f].title && (g[f]._titleTextBlock.maxWidth = 0 < g[f].titleMaxWidth && g[f].titleMaxWidth < g[f].lineCoordinates.width ? g[f].titleMaxWidth : g[f].lineCoordinates.width), 1692 u.push(Math.ceil(g[f] ? g[f].createLabelsAndCalculateHeight() : 0)), Y += u[f], W += g[f] && !m.isNavigator ? g[f].margin : 0; else u.push(Math.ceil(g[0] ? g[0].createLabelsAndCalculateHeight() : 0)); P.push(u); if (a && 0 < a.length) for (f = 0; f < a.length; f++)a[f] && (a[f].lineCoordinates.x1 = d, t = Math.round(h.x2 - $ - Z > m.width - p ? m.width - p : h.x2 - $ - Z), a[f]._labels && 1 < a[f]._labels.length && (l = k = 0, k = a[f]._labels[1], l = "dateTime" === a[f].valueType ? a[f]._labels[a[f]._labels.length - 2] : a[f]._labels[a[f]._labels.length - 1], y = k.textBlock.width * Math.cos(Math.PI / 1693 180 * Math.abs(k.textBlock.angle)) + (k.textBlock.height - l.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(k.textBlock.angle)), s = l.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(l.textBlock.angle)) + (l.textBlock.height - l.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(l.textBlock.angle))), !a[f] || (!a[f].labelAutoFit || n(C) || n(D) || m.isNavigator || m.stockChart) || (l = 0, 0 < a[f].labelAngle ? D + s > t && (l += 0 < a[f].labelAngle ? D + s - t - $ : 0) : 0 > a[f].labelAngle ? C - y < d && C - y < a[f].viewportMinimum && (H = d - (M + a[f].tickLength + A + 1694 C - y + a[f].labelFontSize / 2)) : 0 === a[f].labelAngle && (D + s > t && (l = D + s / 2 - t - $), C - y < d && C - y < a[f].viewportMinimum && (H = d - M - a[f].tickLength - A - C + y / 2)), a[f].viewportMaximum === a[f].maximum && a[f].viewportMinimum === a[f].minimum && 0 < a[f].labelAngle && 0 < l ? t -= l : a[f].viewportMaximum === a[f].maximum && a[f].viewportMinimum === a[f].minimum && 0 > a[f].labelAngle && 0 < H ? d += H : a[f].viewportMaximum === a[f].maximum && a[f].viewportMinimum === a[f].minimum && 0 === a[f].labelAngle && (0 < H && (d += H), 0 < l && (t -= l))), m.panEnabled ? X = n(m.sessionVariables.axisX.height) || 1695 m.stockChart ? m.sessionVariables.axisX.height = X : m.sessionVariables.axisX.height : m.sessionVariables.axisX.height = X, l = Math.round(h.y2 - X - e + F), k = Math.round(h.y2), a[f].lineCoordinates.x2 = t, a[f].lineCoordinates.width = t - d, a[f].lineCoordinates.y1 = l, a[f].lineCoordinates.y2 = l, "inside" === a[f].labelPlacement && 0 < f && (a[f].lineCoordinates.y1 = a[f - 1].lineCoordinates.y2 + F + (a[f].labelEffe
1695ctiveHeight || 0), a[f].lineCoordinates.y2 = a[f].lineCoordinates.y1 + a[f].lineThickness / 2), "inside" === a[f].tickPlacement && 0 < f && (a[f].lineCoordinates.y1 += 1696 a[f].tickLength, a[f].lineCoordinates.y2 = a[f].lineCoordinates.y1 + a[f].lineThickness / 2), a[f].bounds = { x1: d, y1: l, x2: t, y2: k - (X + e - z[f] - F), width: t - d }, a[f].bounds.height = a[f].bounds.y2 - a[f].bounds.y1), F += z[f] + a[f].margin; if (g && 0 < g.length) for (f = 0; f < g.length; f++)g[f].lineCoordinates.x1 = Math.round(h.x1 + Q + M), g[f].lineCoordinates.x2 = Math.round(h.x2 - $ - Z > m.width - p ? m.width - p : h.x2 - $ - Z), g[f].lineCoordinates.width = Math.abs(t - d), g[f]._labels && 1 < g[f]._labels.length && (k = g[f]._labels[1], l = "dateTime" === g[f].valueType ? g[f]._labels[g[f]._labels.length - 1697 2] : g[f]._labels[g[f]._labels.length - 1], y = k.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(k.textBlock.angle)) + (k.textBlock.height - l.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(k.textBlock.angle)), s = l.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(l.textBlock.angle)) + (l.textBlock.height - l.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(l.textBlock.angle))), m.panEnabled ? Y = n(m.sessionVariables.axisX2.height) || m.stockChart ? m.sessionVariables.axisX2.height = Y : m.sessionVariables.axisX2.height : 1698 m.sessionVariables.axisX2.height = Y, l = Math.round(h.y1), k = g[f].lineCoordinates.y1 = l + Y + W - T, g[f].lineCoordinates.y2 = l, "inside" === g[f].labelPlacement && 0 < f && (g[f].lineCoordinates.y1 = g[f - 1].lineCoordinates.y1 - T - (g[f].labelEffectiveHeight || 0)), "inside" === g[f].tickPlacement && 0 < f && (g[f].lineCoordinates.y1 -= g[f].tickLength), g[f].bounds = { x1: d, y1: l + (Y + W - u[f] - T), x2: t, y2: k, width: t - d }, g[f].bounds.height = g[f].bounds.y2 - g[f].bounds.y1, T += u[f] + g[f].margin; if (c && 0 < c.length) for (f = 0; f < c.length; f++)M = m.isNavigator ? 0 : 10, 1699 c[f] && (d = Math.round(a[0] ? a[0].lineCoordinates.x1 : g[0].lineCoordinates.x1), M = c[f]._labels && 0 < c[f]._labels.length ? c[f]._labels[c[f]._labels.length - 1].textBlock.height / 2 : p, l = Math.round(h.y1 + Y + W < Math.max(M, p) ? Math.max(M, p) : h.y1 + Y + W), t = Math.round(a[0] ? a[0].lineCoordinates.x1 : g[0].lineCoordinates.x1), M = 0 < a.length ? 0 : c[f]._labels && 0 < c[f]._labels.length ? c[f]._labels[0].textBlock.height / 2 : p, k = Math.round(h.y2 - X - e - M), c[f].lineCoordinates = { x1: d - S, y1: l, x2: t - S, y2: k, height: Math.abs(k - l) }, "inside" === c[f].labelPlacement && 1700 0 < f && (c[f].lineCoordinates.x1 = c[f - 1].lineCoordinates.x1 - S - (c[f].labelEffectiveWidth || 0), c[f].lineCoordinates.x2 = c[f].lineCoordinates.x1 + c[f].lineThickness / 2), "inside" === c[f].tickPlacement && 0 < f && (c[f].lineCoordinates.x1 -= c[f].tickLength, c[f].lineCoordinates.x2 = c[f].lineCoordinates.x1 + c[f].lineThickness / 2), c[f].bounds = { x1: d - (A[f] + S), y1: l, x2: t - S, y2: k, height: k - l }, c[f].bounds.width = c[f].bounds.x2 - c[f].bounds.x1, c[f].title && (c[f]._titleTextBlock.maxWidth = 0 < c[f].titleMaxWidth && c[f].titleMaxWidth < c[f].lineCoordinates.height ? 1701 c[f].titleMaxWidth : c[f].lineCoordinates.height), S += A[f] + c[f].margin); if (b && 0 < b.length) for (f = 0; f < b.length; f++)b[f] && (d = Math.round(a[0] ? a[0].lineCoordinates.x2 : g[0].lineCoordinates.x2), t = Math.round(d), M = b[f]._labels && 0 < b[f]._labels.length ? b[f]._labels[b[f]._labels.length - 1].textBlock.height / 2 : 0, l = Math.round(h.y1 + Y + W < Math.max(M, p) ? Math.max(M, p) : h.y1 + Y + W), M = 0 < a.length ? 0 : b[f]._labels && 0 < b[f]._labels.length ? b[f]._labels[0].textBlock.height / 2 : 0, k = Math.round(h.y2 - (X + e + M)), b[f].lineCoordinates = { 1702 x1: d + V, y1: l, 1703 x2: d + V, y2: k, height: Math.abs(k - l) 1704 }, "inside" === b[f].labelPlacement && 0 < f && (b[f].lineCoordinates.x1 = b[f - 1].lineCoordinates.x2 + V + (b[f].labelEffe
1704ctiveWidth || 0), b[f].lineCoordinates.x2 = b[f].lineCoordinates.x1 + b[f].lineThickness / 2), "inside" === b[f].tickPlacement && 0 < f && (b[f].lineCoordinates.x1 += b[f].tickLength, b[f].lineCoordinates.x2 = b[f].lineCoordinates.x1 + b[f].lineThickness / 2), b[f].bounds = { x1: d + V, y1: l, x2: t + (B[f] + V), y2: k, height: k - l }, b[f].bounds.width = b[f].bounds.x2 - b[f].bounds.x1, b[f].title && (b[f]._titleTextBlock.maxWidth = 1705 0 < b[f].titleMaxWidth && b[f].titleMaxWidth < b[f].lineCoordinates.height ? b[f].titleMaxWidth : b[f].lineCoordinates.height), V += B[f] + b[f].margin); if (a && 0 < a.length) for (f = 0; f < a.length; f++)a[f] && (a[f].calculateValueToPixelConversionParameters(), a[f].calculateBreaksSizeInValues(), a[f]._labels && 1 < a[f]._labels.length && (C = (a[f].logarithmic ? Math.log(a[f]._labels[1].position / a[f].viewportMinimum) / a[f].conversionParameters.lnLogarithmBase : a[f]._labels[1].position - a[f].viewportMinimum) * Math.abs(a[f].conversionParameters.pixelPerUnit) + 1706 a[f].lineCoordinates.x1, d = a[f]._labels[a[f]._labels.length - ("dateTime" === a[f].valueType ? 2 : 1)].position, d = a[f].getApparentDifference(a[f].viewportMinimum, d), D = a[f].logarithmic ? (1 < d ? Math.log(d) / a[f].conversionParameters.lnLogarithmBase * Math.abs(a[f].conversionParameters.pixelPerUnit) : 0) + a[f].lineCoordinates.x1 : (0 < d ? d * Math.abs(a[f].conversionParameters.pixelPerUnit) : 0) + a[f].lineCoordinates.x1)); if (g && 0 < g.length) for (f = 0; f < g.length; f++)g[f].calculateValueToPixelConversionParameters(), g[f].calculateBreaksSizeInValues(), 1707 g[f]._labels && 1 < g[f]._labels.length && (C = (g[f].logarithmic ? Math.log(g[f]._labels[1].position / g[f].viewportMinimum) / g[f].conversionParameters.lnLogarithmBase : g[f]._labels[1].position - g[f].viewportMinimum) * Math.abs(g[f].conversionParameters.pixelPerUnit) + g[f].lineCoordinates.x1, d = g[f]._labels[g[f]._labels.length - ("dateTime" === g[f].valueType ? 2 : 1)].position, d = g[f].getApparentDifference(g[f].viewportMinimum, d), D = g[f].logarithmic ? (1 < d ? Math.log(d) / g[f].conversionParameters.lnLogarithmBase * Math.abs(g[f].conversionParameters.pixelPerUnit) : 1708 0) + g[f].lineCoordinates.x1 : (0 < d ? d * Math.abs(g[f].conversionParameters.pixelPerUnit) : 0) + g[f].lineCoordinates.x1); for (f = 0; f < q.length; f++)"axisY" === q[f].type && (q[f].calculateValueToPixelConversionParameters(), q[f].calculateBreaksSizeInValues()); if (0 < w) { 1709 if (a && 0 < a.length) for (f = 0; f < a.length; f++)v = N[w - 1][f] === N[w][f] ? !0 : !1; else v = !0; if (g && 0 < g.length) for (f = 0; f < g.length; f++)K = P[w - 1][f] === P[w][f] ? !0 : !1; else K = !0; if (c && 0 < c.length) for (f = 0; f < c.length; f++)J = O[w - 1][f] === O[w][f] ? !0 : !1; else J = !0; if (b && 0 < b.length) for (f = 1710 0; f < b.length; f++)L = R[w - 1][f] === R[w][f] ? !0 : !1; else L = !0 1711 } if (v && K && J && L) break; w++ 1712 } if (a && 0 < a.length) for (f = 0; f < a.length; f++)a[f].calculateStripLinesThicknessInValues(), a[f].calculateBreaksInPixels(); if (g && 0 < g.length) for (f = 0; f < g.length; f++)g[f].calculateStripLinesThicknessInValues(), g[f].calculateBreaksInPixels(); if (c && 0 < c.length) for (f = 0; f < c.length; f++)c[f].calculateStripLinesThicknessInValues(), c[f].calculateBreaksInPixels(); if (b && 0 < b.length) for (f = 0; f < b.length; f++)b[f].calculateStripLinesThicknessInValues(), 1713 b[f].calculateBreaksInPixels() 1714 } else { 1715 p = []; C = []; H = []; y = []; D = []; s = []; N = []; for (P = []; 4 > w;) { 1716 X = V = S = Z = M = W = e = R = O = F = Y = 0; if (a && 0 < a.length) for (H = [], f = V = 0; f < a.length; f++)H.push(Math.ceil(a[f] ? a[f].createLabelsAndCalculateWidth() : 0)), V += H[f], e += a[f] && !m.isNavigator ? a[f].margin : 0; else H.push(Math.ceil(a[0] ? a[0].createLabelsAndCalculateWidth() : 0)); N.push(H); if (g && 0 < g.length) for (y = [], f = X = 0; f < g.length; f++)y.push(Math.ceil(g[f] ? g[f].createLabelsAndCalculateWidth() : 0)), X += y[f], W += g[f] ? g[f].margin : 0; else y.push(Math.ceil(g[0] ? 1717 g[0].createLabelsAndCalculateWidth() : 0)); P.push(y); if (c && 0 < c.length) for (f = 0; f < c.length; f++)c[f].lineCoordinates = {}, d = Math.round(h.x1 + V + e), t = Math.round(h.x2 - X - W > m.width - 10 ? m.width - 10 : h.x2 - X - W), c[f].labelAutoFit && !n(z) && (0 < !a.length && (d = 0 > c[f].labelAngle ? Math.max(d, z) : 0 === c[f].labelAngle ? Math.max(d, z / 2) : d), 0 < !g.length && (t = 0 < c[f].labelAngle ? t - u / 2 : 0 === c[f].labelAngle ? t - u / 2 : t)), c[f].lineCoordinates.x1 = d, c[f].lineCoordinates.x2 = t, c[f].lineCoordinates.width = Math.abs(t - d), c[f].title && (c[f]._titleTextBlock.maxWidth = 1718 0 < c[f].titleMaxWidth && c[f].titleMaxWidth < c[f].lineCoordinates.width ? c[f].titleMaxWidth : c[f].lineCoordinates.width); if (b && 0 < b.length) for (f = 0; f < b.length; f++)b[f].lineCoordinates = {}, d = Math.round(h.x1 + V + e), t = Math.round(h.x2 - X - W > b[f].chart.width - 10 ? b[f].chart.width - 10 : h.x2 - X - W), b[f] && b[f].labelAutoFit && !n(A) && (0 < !a.length && (d = 0 < b[f].labelAngle ? Math.max(d, A) : 0 === b[f].labelAngle ? Math.max(d, A / 2) : d), 0 < !g.length && (t -= B / 2)), b[f].lineCoordinates.x1 = d, b[f].lineCoordinates.x2 = t, b[f].lineCoordinates.width = Math.abs(t - 1719 d), b[f].title && (b[f]._titleTextBlock.maxWidth = 0 < b[f].titleMaxWidth && b[f].titleMaxWidth < b[f].lineCoordinates.width ? b[f].titleMaxWidth : b[f].lineCoordinates.width); if (c && 0 < c.length) for (p = [], f = S = 0; f < c.length; f++)p.push(Math.ceil(c[f] ? c[f].createLabelsAndCalculateHeight() : 0)), S += p[f] + c[f].margin, M += c[f].margin; else p.push(Math.ceil(c[0] ? c[0].createLabelsAndCalculateHeight() : 0)); D.push(p); if (b && 0 < b.length) for (C = [], f = 0; f < b.length; f++)C.push(Math.ceil(b[f] ? b[f].createLabelsAndCalculateHeight() : 0)), Z += b[f].margin; 1720 else C.push(Math.ceil(b[0] ? b[0].createLabelsAndCalculateHeight() : 0)); s.push(C); if (c && 0 < c.length) for (f = 0; f < c.length; f++)0 < c[f]._labels.length && (k = c[f]._labels[0], l = c[f]._labels[c[f]._labels.length - 1], z = k.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(k.textBlock.angle)) + (k.textBlock.height - l.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(k.textBlock.angle)), u = l.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(l.textBlock.angle)) + (l.textBlock.height - l.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(l.textBlock.angle))); 1721 if (b && 0 < b.length) for (f = 0; f < b.length; f++)b[f] && 0 < b[f]._labels.length && (k = b[f]._labels[0], l = b[f]._labels[b[f]._labels.length - 1], A = k.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(k.textBlock.angle)) + (k.textBlock.height - l.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(k.textBlock.angle)), B = l.textBlock.width * Math.cos(Math.PI / 180 * Math.abs(l.textBlock.angle)) + (l.textBlock.height - l.textBlock.fontSize / 2) * Math.sin(Math.PI / 180 * Math.abs(l.textBlock.angle))); if (m.panEnabled) for (f = 0; f < c.length; f++)p[f] = n(m.sessionVariables.axisY[f].height) ? 1722 m.sessionVariables.axisY[f].height = p[f] : m.sessionVariables.axisY[f].height; else for (f = 0; f < c.length; f++)m.sessionVariables.axisY[f].height = p[f]; if (c && 0 < c.length) for (f = c.length - 1; 0 <= f; f--)l = Math.round(h.y2), k = Math.round(h.y2 > c[f].chart.height ? c[f].chart.height : h.y2), c[f].lineCoordinates.y1 = l - (p[f] + c[f].margin + Y), c[f].lineCoordinates.y2 = l - (p[f] + c[f].margin + Y), "inside" === c[f].labelPlacement && 0 < f && (c[f].lineCoordinates.y1 = c[f].lineCoordinates.y1 + p[f] - (c[f]._titleTextBlock ? c[f]._titleTextBlock.height : 0) - 1723 c[f].tickLength - (c[f].stripLineLabelEffectiveHeight || 0
1723) - 5, c[f].lineCoordinates.y2 = c[f].lineCoordinates.y1 + c[f].lineThickness / 2), "inside" === c[f].tickPlacement && 0 < f && (c[f].lineCoordinates.y1 += c[f].tickLength, c[f].lineCoordinates.y2 = c[f].lineCoordinates.y1 + c[f].lineThickness / 2), c[f].bounds = { x1: d, y1: l - (p[f] + Y + c[f].margin), x2: t, y2: k - (Y + c[f].margin), width: t - d, height: p[f] }, c[f].title && (c[f]._titleTextBlock.maxWidth = 0 < c[f].titleMaxWidth && c[f].titleMaxWidth < c[f].lineCoordinates.width ? c[f].titleMaxWidth : c[f].lineCoordinates.width), 1724 Y += p[f] + c[f].margin; if (b && 0 < b.length) for (f = b.length - 1; 0 <= f; f--)b[f] && (l = Math.round(h.y1), k = Math.round(h.y1 + (C[f] + b[f].margin + F)), b[f].lineCoordinates.y1 = k, b[f].lineCoordinates.y2 = k, "inside" === b[f].labelPlacement && 0 < f && (b[f].lineCoordinates.y1 = k - C[f] + (b[f]._titleTextBlock ? b[f]._titleTextBlock.height : 0) + b[f].tickLength + (b[f].stripLineLabelEffectiveHeight || 0), b[f].lineCoordinates.y2 = b[f].lineCoordinates.y1 - b[f].lineThickness / 2), "inside" === b[f].tickPlacement && 0 < f && (b[f].lineCoordinates.y1 -= b[f].tickLength, 1725 b[f].lineCoordinates.y2 = b[f].lineCoordinates.y1 - b[f].lineThickness / 2), b[f].bounds = { x1: d, y1: l + (b[f].margin + F), x2: t, y2: k, width: t - d }, b[f].bounds.height = b[f].bounds.y2 - b[f].bounds.y1, b[f].title && (b[f]._titleTextBlock.maxWidth = 0 < b[f].titleMaxWidth && b[f].titleMaxWidth < b[f].lineCoordinates.width ? b[f].titleMaxWidth : b[f].lineCoordinates.width), F += C[f] + b[f].margin); if (a && 0 < a.length) for (f = 0; f < a.length; f++) { 1726 M = a[f]._labels && 0 < a[f]._labels.length ? a[f]._labels[0].textBlock.fontSize / 2 : 0; d = Math.round(h.x1 + e); l = b && 1727 0 < b.length ? Math.round(b[0] ? b[0].lineCoordinates.y2 : h.y1 < Math.max(M, 10) ? Math.max(M, 10) : h.y1) : h.y1 < Math.max(M, 10) ? Math.max(M, 10) : h.y1; t = Math.round(h.x1 + V + e); k = c && 0 < c.length ? Math.round(c[0] ? c[0].lineCoordinates.y1 : h.y2 - S > m.height - Math.max(M, 10) ? m.height - Math.max(M, 10) : h.y2 - S) : h.y2 > m.height - Math.max(M, 10) ? m.height - Math.max(M, 10) : h.y2; if (c && 0 < c.length) for (M = 0; M < c.length; M++)c[M] && c[M].labelAutoFit && (t = c[M].lineCoordinates.x1, d = 0 > c[M].labelAngle || 0 === c[M].labelAngle ? t - V : d); if (b && 0 < b.length) for (M = 0; M < b.length; M++)b[M] && 1728 b[M].labelAutoFit && (t = b[M].lineCoordinates.x1, d = t - V); a[f].lineCoordinates = { x1: t - O, y1: l, x2: t - O, y2: k, height: Math.abs(k - l) }; "inside" === a[f].labelPlacement && 0 < f && (a[f].lineCoordinates.x1 = a[f].lineCoordinates.x1 - (H[f] - (a[f]._titleTextBlock ? a[f]._titleTextBlock.height : 0)) + a[f].tickLength + (a[f].stripLineLabelEffectiveWidth || 0), a[f].lineCoordinates.x2 = a[f].lineCoordinates.x1 + a[f].lineThickness / 2); "inside" === a[f].tickPlacement && 0 < f && (a[f].lineCoordinates.x1 -= a[f].tickLength, a[f].lineCoordinates.x2 = a[f].lineCoordinates.x1 + 1729 a[f].lineThickness / 2); a[f].bounds = { x1: t - (H[f] + O), y1: l, x2: t - O, y2: k, height: k - l }; a[f].bounds.width = a[f].bounds.x2 - a[f].bounds.x1; a[f].title && (a[f]._titleTextBlock.maxWidth = 0 < a[f].titleMaxWidth && a[f].titleMaxWidth < a[f].lineCoordinates.height ? a[f].titleMaxWidth : a[f].lineCoordinates.height); a[f].calculateValueToPixelConversionParameters(); a[f].calculateBreaksSizeInValues(); O += H[f] + a[f].margin 1730 } if (g && 0 < g.length) for (f = 0; f < g.length; f++) { 1731 M = g[f]._labels && 0 < g[f]._labels.length ? g[f]._labels[0].textBlock.fontSize / 1732 2 : 0; d = Math.round(h.x1 - e); l = b && 0 < b.length ? Math.round(b[0] ? b[0].lineCoordinates.y2 : h.y1 < Math.max(M, 10) ? Math.max(M, 10) : h.y1) : h.y1 < Math.max(M, 10) ? Math.max(M, 10) : h.y1; t = Math.round(h.x2 - X - W); k = c && 0 < c.length ? Math.round(c[0] ? c[0].lineCoordinates.y1 : h.y2 - S > m.height - Math.max(M, 10) ? m.height - Math.max(M, 10) : h.y2 - S) : h.y2 > m.height - Math.max(M, 10) ? m.height - Math.max(M, 10) : h.y2; if (c && 0 < c.length) for (M = 0; M < c.length; M++)c[M] && c[M].labelAutoFit && (t = 0 > c[M].labelAngle ? Math.max(t, z) : 0 === c[M].labelAngle ? Math.max(t, z / 2) : t, d = 1733 0 > c[M].labelAngle || 0 === c[M].labelAngle ? t - X : d); if (b && 0 < b.length) for (M = 0; M < b.length; M++)b[M] && b[M].labelAutoFit && (t = b[M].lineCoordinates.x2, d = t - X); g[f].lineCoordinates = { x1: t + R, y1: l, x2: t + R, y2: k, height: Math.abs(k - l) }; "inside" === g[f].labelPlacement && 0 < f && (g[f].lineCoordinates.x1 = g[f].lineCoordinates.x1 + (y[f] - (g[f]._titleTextBlock ? g[f]._titleTextBlock.height : 0) - 2) - g[f].tickLength - (g[f].stripLineLabelEffectiveWidth || 0), g[f].lineCoordinates.x2 = g[f].lineCoordinates.x1 + g[f].lineThickness / 2); "inside" === g[f].tickPlacement && 1734 0 < f && (g[f].lineCoordinates.x1 += g[f].tickLength, g[f].lineCoordinates.x2 = g[f].lineCoordinates.x1 + g[f].lineThickness / 2); g[f].bounds = { x1: g[f].lineCoordinates.x1, y1: l, x2: t + y[f] + R, y2: k, width: t - d, height: k - l }; g[f].bounds.width = g[f].bounds.x2 - g[f].bounds.x1; g[f].title && (g[f]._titleTextBlock.maxWidth = 0 < g[f].titleMaxWidth && g[f].titleMaxWidth < g[f].lineCoordinates.height ? g[f].titleMaxWidth : g[f].lineCoordinates.height); g[f].calculateValueToPixelConversionParameters(); g[f].calculateBreaksSizeInValues(); R += y[f] + 1735 g[f].margin 1736 } for (f = 0; f < q.length; f++)"axisY" === q[f].type && (q[f].calculateValueToPixelConversionParameters(), q[f].calculateBreaksSizeInValues()); if (0 < w) { if (a && 0 < a.length) for (f = 0; f < a.length; f++)v = N[w - 1][f] === N[w][f] ? !0 : !1; else v = !0; if (g && 0 < g.length) for (f = 0; f < g.length; f++)K = P[w - 1][f] === P[w][f] ? !0 : !1; else K = !0; if (c && 0 < c.length) for (f = 0; f < c.length; f++)J = D[w - 1][f] === D[w][f] ? !0 : !1; else J = !0; if (b && 0 < b.length) for (f = 0; f < b.length; f++)L = s[w - 1][f] === s[w][f] ? !0 : !1; else L = !0 } if (v && K && J && L) break; w++ 1737 } if (c && 0 < c.length) for (f = 1738 0; f < c.length; f++)c[f].calculateStripLinesThicknessInValues(), c[f].calculateBreaksInPixels(); if (b && 0 < b.length) for (f = 0; f < b.length; f++)b[f].calculateStripLinesThicknessInValues(), b[f].calculateBreaksInPixels(); if (a && 0 < a.length) for (f = 0; f < a.length; f++)a[f].calculateStripLinesThicknessInValues(), a[f].calculateBreaksInPixels(); if (g && 0 < g.length) for (f = 0; f < g.length; f++)g[f].calculateStripLinesThicknessInValues(), g[f].calculateBreaksInPixels() 1739 } 1740 }; D.render = function (a, g, c, b, e) { 1741 var h = a[0] ? a[0].chart : g[0].chart; 1742 e = h.ctx; h.alignVerticalAxes && h.alignVerticalAxes(); e.save(); e.beginPath(); a && a.length && e.rect(5, a[0].bounds.y1, a[0].chart.width - 10, a[a.length - 1].bounds.y2); g && g.length && e.rect(5, g[g.length - 1].bounds.y1, g[0].chart.width - 10, g[0].bounds.y2); e.clip(); if (a && 0 < a.length) for (var d = 0; d < a.length; d++)a[d].renderLabelsTicksAndTitle(); if (g && 0 < g.length) for (d = 0; d < g.length; d++)g[d].renderLabelsTicksAndTitle();
1742 e.restore(); if (c && 0 < c.length) for (d = 0; d < c.length; d++)c[d].renderLabelsTicksAndTitle(); if (b && 0 < b.length) for (d = 1743 0; d < b.length; d++)b[d].renderLabelsTicksAndTitle(); h.preparePlotArea(); h = h.plotArea; e.save(); e.beginPath(); e.rect(h.x1, h.y1, Math.abs(h.x2 - h.x1), Math.abs(h.y2 - h.y1)); e.clip(); if (a && 0 < a.length) for (d = 0; d < a.length; d++)a[d].renderStripLinesOfThicknessType("value"); if (g && 0 < g.length) for (d = 0; d < g.length; d++)g[d].renderStripLinesOfThicknessType("value"); if (c && 0 < c.length) for (d = 0; d < c.length; d++)c[d].renderStripLinesOfThicknessType("value"); if (b && 0 < b.length) for (d = 0; d < b.length; d++)b[d].renderStripLinesOfThicknessType("value"); 1744 if (a && 0 < a.length) for (d = 0; d < a.length; d++)a[d].renderInterlacedColors(); if (g && 0 < g.length) for (d = 0; d < g.length; d++)g[d].renderInterlacedColors(); if (c && 0 < c.length) for (d = 0; d < c.length; d++)c[d].renderInterlacedColors(); if (b && 0 < b.length) for (d = 0; d < b.length; d++)b[d].renderInterlacedColors(); e.restore(); if (a && 0 < a.length) for (d = 0; d < a.length; d++)a[d].renderGrid(), v && (a[d].createMask(), a[d].renderBreaksBackground()); if (g && 0 < g.length) for (d = 0; d < g.length; d++)g[d].renderGrid(), v && (g[d].createMask(), g[d].renderBreaksBackground()); 1745 if (c && 0 < c.length) for (d = 0; d < c.length; d++)c[d].renderGrid(), v && (c[d].createMask(), c[d].renderBreaksBackground()); if (b && 0 < b.length) for (d = 0; d < b.length; d++)b[d].renderGrid(), v && (b[d].createMask(), b[d].renderBreaksBackground()); if (a && 0 < a.length) for (d = 0; d < a.length; d++)a[d].renderAxisLine(); if (g && 0 < g.length) for (d = 0; d < g.length; d++)g[d].renderAxisLine(); if (c && 0 < c.length) for (d = 0; d < c.length; d++)c[d].renderAxisLine(); if (b && 0 < b.length) for (d = 0; d < b.length; d++)b[d].renderAxisLine(); if (a && 0 < a.length) for (d = 0; d < a.length; d++)a[d].renderStripLinesOfThicknessType("pixel"); 1746 if (g && 0 < g.length) for (d = 0; d < g.length; d++)g[d].renderStripLinesOfThicknessType("pixel"); if (c && 0 < c.length) for (d = 0; d < c.length; d++)c[d].renderStripLinesOfThicknessType("pixel"); if (b && 0 < b.length) for (d = 0; d < b.length; d++)b[d].renderStripLinesOfThicknessType("pixel") 1747 }; D.prototype.calculateStripLinesThicknessInValues = function () { 1748 for (var a = 0; a < this.stripLines.length; a++)if (null !== this.stripLines[a].startValue && null !== this.stripLines[a].endValue) { 1749 var g = Math.min(this.stripLines[a].startValue, this.stripLines[a].endValue), 1750 c = Math.max(this.stripLines[a].startValue, this.stripLines[a].endValue), b = this.getApparentDifference(g, c); this.stripLines[a].value = this.convertPixelToValue(Math.abs(this.convertValueToPixel(g) + this.convertValueToPixel(c)) / 2); this.stripLines[a].thickness = b; this.stripLines[a]._thicknessType = "value" 1751 } 1752 }; D.prototype.calculateBreaksSizeInValues = function () { 1753 for (var a = "left" === this._position || "right" === this._position ? this.lineCoordinates.height || this.chart.height : this.lineCoordinates.width || this.chart.width, 1754 g = this.scaleBreaks ? this.scaleBreaks._appliedBreaks : [], c = this.conversionParameters.pixelPerUnit || a / (this.logarithmic ? this.conversionParameters.maximum / this.conversionParameters.minimum : this.conversionParameters.maximum - this.conversionParameters.minimum), b = this.scaleBreaks && !n(this.scaleBreaks.options.spacing), e, h = 0; h < g.length; h++)e = b || !n(g[h].options.spacing), g[h].spacing = Va(g[h].spacing, a, 8, e ? 0.1 * a : 8, e ? 0 : 3) << 0, g[h].size = 0 > g[h].spacing ? 0 : Math.abs(g[h].spacing / c), this.logarithmic && (g[h].size = Math.pow(this.logarithmBase, 1755 g[h].size)) 1756 }; D.prototype.calculateBreaksInPixels = function () { 1757 if (!(this.scaleBreaks && 0 >= this.scaleBreaks._appliedBreaks.length)) { 1758 var a = this.scaleBreaks ? this.scaleBreaks._appliedBreaks : []; a.length && (this.scaleBreaks.firstBreakIndex = this.scaleBreaks.lastBreakIndex = null); for (var g = 0; g < a.length && !(a[g].startValue > this.conversionParameters.maximum); g++)a[g].endValue < this.conversionParameters.minimum || (n(this.scaleBreaks.firstBreakIndex) && (this.scaleBreaks.firstBreakIndex = g), a[g].startValue >= this.conversionParameters.minimum && 1759 (a[g].startPixel = this.convertValueToPixel(a[g].startValue), this.scaleBreaks.lastBreakIndex = g), a[g].endValue <= this.conversionParameters.maximum && (a[g].endPixel = this.convertValueToPixel(a[g].endValue))) 1760 } 1761 }; D.prototype.renderLabelsTicksAndTitle = function () { 1762 var a = this, g = !1, c = 0, b = 0, e = 1, h = 0; 0 !== this.labelAngle && 360 !== this.labelAngle && (e = 1.2); if ("undefined" === typeof this.options.interval) { 1763 if ("bottom" === this._position || "top" === this._position) if (this.logarithmic && !this.equidistantInterval && this.labelAutoFit) { 1764 for (var c = 1765 [], e = 0 !== this.labelAngle && 360 !== this.labelAngle ? 1 : 1.2, d, l = this.viewportMaximum, n = this.lineCoordinates.width / Math.log(this.range), k = this._labels.length - 1; 0 <= k; k--) { p = this._labels[k]; if (p.position < this.viewportMinimum) break; p.position > this.viewportMaximum || !(k === this._labels.length - 1 || d < Math.log(l / p.position) * n / e) || (c.push(p), l = p.position, d = p.textBlock.width * Math.abs(Math.cos(Math.PI / 180 * this.labelAngle)) + p.textBlock.height * Math.abs(Math.sin(Math.PI / 180 * this.labelAngle))) } this._labels = c 1766 } else { 1767 for (k = 1768 0; k < this._labels.length; k++)p = this._labels[k], p.position < this.viewportMinimum || (d = 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 += d); c > this.lineCoordinates.width * e && this.labelAutoFit && (g = !0) 1769 } if ("left" === this._position || "right" === this._position) if (this.logarithmic && !this.equidistantInterval && this.labelAutoFit) { 1770 for (var c = [], m, l = this.viewportMaximum, n = this.lineCoordinates.height / Math.log(this.range), k = this._labels.length - 1771 1; 0 <= k; k--) { p = this._labels[k]; if (p.position < this.viewportMinimum) break; p.position > this.viewportMaximum || !(k === this._labels.length - 1 || m < Math.log(l / p.position) * n) || (c.push(p), l = p.position, m = p.textBlock.height * Math.abs(Math.cos(Math.PI / 180 * this.labelAngle)) + p.textBlock.width * Math.abs(Math.sin(Math.PI / 180 * this.labelAngle))) } this._labels = c 1772 } else { 1773 for (k = 0; k < this._labels.length; k++)p = this._labels[k], p.position < this.viewportMinimum || (m = p.textBlock.height * Math.abs(Math.cos(Math.PI / 180 * this.labelAngle)) + p.textBlock.width * 1774 Math.abs(Math.sin(Math.PI / 180 * this.labelAngle)), b += m); b > this.lineCoordinates.height * e && this.labelAutoFit && (g = !0) 1775 } 1776 } this.logarithmic && (!this.equidistantInterval && this.labelAutoFit) && this._labels.sort(function (a, b) { return a.position - b.position }); var k = 0, p, q; if ("bottom" === this._position) { 1777 for (k = 0; k < this._labels.length; k++)p = this._labels[k], p.position < this.viewportMinimum || p.position > this.viewportMaximum || (q = this.getPixelCoordinatesOnAxis(p.position), this.tickThickness && "inside" != this.tickPlacement && (this.ctx.lineWidth = 1778 this.tickThickness, this.ctx.strokeStyle = this.tickColor, b = 1 === this.ctx.lineWidth % 2 ? (q.x << 0) + 0.5 : q.x << 0, this.ctx.beginPath(), this.ctx.moveTo(b, q.y << 0), this.ctx.lineTo(b, q.y + this.tickLength << 0), this.ctx.stroke()), g && 0 !== h++ % 2 && this.labelAutoFit || (0 === p.textBlock.angle ? (q.x -= p.textBlock.width / 2, q.y = "inside" === this.labelPlacement ? q.y - (("inside" === this.tickPlacement ? this.tickLength : 0) + p.textBlock.height - p.textBlock.fontSize / 2) : q.y + ("inside" === this.tickPlacement ? 0 : this.tickLength) + p.textBlock.fontSize / 2 + 1779 5) : (q.x = "inside" === this.labelPlacement ? 0 > this.labelAngle ? q.x : q.x - p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : q.x - (0 > this.labelAngle ? p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : 0), q.y = "inside" === this.labelPlacement ? 0 > this.labelAngle ? q.y - ("inside" === this.tickPlacement ? this.tickLength : 0) - 5 : q.y - ("inside" === this.tickPlacement ? this.tickLength : 0) - Math.abs(p.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) + 5) : q.y + ("inside" === this.tickPlacement ? 0 : this.tickLength) + Math.abs(0 > this.labelAngle ? 1780 p.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) - 5 : 5)), p.textBlock.x = q.x, p.textBlock.y = q.y)); "inside" === this.tickPlacement && this.chart.addEventListener("dataAnimationIterationEnd", function () { 1781 for (k = 0; k < a._labels.length; k++)if (p = a._labels[k], !(p.position < a.viewportMinimum || p.position > a.viewportMaximum) && (q = a.getPixelCoordinatesOnAxis(p.position), a.tickThickness)) { 1782 a.ctx.lineWidth = a.tickThickness; a.ctx.strokeStyle = a.tickColor; var b = 1 === a.ctx.lineWidth % 2 ? (q.x << 0) + 0.5 : q.x << 0; a.ctx.save(); a.ctx.beginPath(); 1783 a.ctx.moveTo(b, q.y << 0); a.ctx.lineTo(b, q.y - a.tickLength << 0); a.ctx.stroke();
1783 a.ctx.restore() 1784 } 1785 }, this); 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 + this._titleTextBlock.fontSize / 2 - 1, this.titleMaxWidth = this._titleTextBlock.maxWidth, this._titleTextBlock.render(!0)) 1786 } else if ("top" === this._position) { 1787 for (k = 0; k < this._labels.length; k++)p = 1788 this._labels[k], p.position < this.viewportMinimum || p.position > this.viewportMaximum || (q = this.getPixelCoordinatesOnAxis(p.position), this.tickThickness && "inside" != this.tickPlacement && (this.ctx.lineWidth = this.tickThickness, this.ctx.strokeStyle = this.tickColor, b = 1 === this.ctx.lineWidth % 2 ? (q.x << 0) + 0.5 : q.x << 0, this.ctx.beginPath(), this.ctx.moveTo(b, q.y << 0), this.ctx.lineTo(b, q.y - this.tickLength << 0), this.ctx.stroke()), g && 0 !== h++ % 2 && this.labelAutoFit || (0 === p.textBlock.angle ? (q.x -= p.textBlock.width / 2, q.y = "inside" === 1789 this.labelPlacement ? q.y + this.labelFontSize / 2 + ("inside" === this.tickPlacement ? this.tickLength : 0) + 5 : q.y - (("inside" === this.tickPlacement ? 0 : this.tickLength) + p.textBlock.height - p.textBlock.fontSize / 2)) : (q.x = "inside" === this.labelPlacement ? 0 < this.labelAngle ? q.x : q.x - p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : q.x + (p.textBlock.height - this.labelFontSize) * Math.sin(Math.PI / 180 * this.labelAngle) - (0 < this.labelAngle ? p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : 0), q.y = "inside" === this.labelPlacement ? 1790 0 < this.labelAngle ? q.y + ("inside" === this.tickPlacement ? this.tickLength : 0) + 5 : q.y - p.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) + ("inside" === this.tickPlacement ? this.tickLength : 0) + 5 : q.y - (("inside" === this.tickPlacement ? 0 : this.tickLength) + ((p.textBlock.height - p.textBlock.fontSize / 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 = q.x, p.textBlock.y = q.y)); "inside" === this.tickPlacement && this.chart.addEventListener("dataAnimationIterationEnd", 1791 function () { for (k = 0; k < a._labels.length; k++)if (p = a._labels[k], !(p.position < a.viewportMinimum || p.position > a.viewportMaximum) && (q = a.getPixelCoordinatesOnAxis(p.position), a.tickThickness)) { a.ctx.lineWidth = a.tickThickness; a.ctx.strokeStyle = a.tickColor; var b = 1 === a.ctx.lineWidth % 2 ? (q.x << 0) + 0.5 : q.x << 0; a.ctx.save(); a.ctx.beginPath(); a.ctx.moveTo(b, q.y << 0); a.ctx.lineTo(b, q.y + a.tickLength << 0); a.ctx.stroke(); a.ctx.restore() } }, this); this.title && (this._titleTextBlock.measureText(), this._titleTextBlock.x = this.lineCoordinates.x1 + 1792 this.lineCoordinates.width / 2 - this._titleTextBlock.width / 2, this._titleTextBlock.y = this.bounds.y1 + this._titleTextBlock.fontSize / 2 + 1, this.titleMaxWidth = this._titleTextBlock.maxWidth, this._titleTextBlock.render(!0)) 1793 } else if ("left" === this._position) { 1794 for (k = 0; k < this._labels.length; k++)p = this._labels[k], p.position < this.viewportMinimum || p.position > this.viewportMaximum || (q = this.getPixelCoordinatesOnAxis(p.position), this.tickThickness && "inside" != this.tickPlacement && (this.ctx.lineWidth = this.tickThickness, this.ctx.strokeStyle = 1795 this.tickColor, b = 1 === this.ctx.lineWidth % 2 ? (q.y << 0) + 0.5 : q.y << 0, this.ctx.beginPath(), this.ctx.moveTo(q.x << 0, b), this.ctx.lineTo(q.x - this.tickLength << 0, b), this.ctx.stroke()), g && 0 !== h++ % 2 && this.labelAutoFit || (0 === this.labelAngle ? (p.textBlock.y = q.y, p.textBlock.x = "inside" === this.labelPlacement ? q.x + ("inside" === this.tickPlacement ? this.tickLength : 0) + 5 : q.x - p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - ("inside" === this.tickPlacement ? 0 : this.tickLength) - 5) : (p.textBlock.y = "inside" === this.labelPlacement ? 1796 q.y : q.y - p.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle), p.textBlock.x = "inside" === this.labelPlacement ? q.x + ("inside" === this.tickPlacement ? this.tickLength : 0) + 5 : 0 < this.labelAngle ? q.x - p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - ("inside" === this.tickPlacement ? 0 : this.tickLength) - 5 : q.x - p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) + (p.textBlock.height - p.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) - ("inside" === this.tickPlacement ? 0 : this.tickLength)))); "inside" === 1797 this.tickPlacement && this.chart.addEventListener("dataAnimationIterationEnd", function () { for (k = 0; k < a._labels.length; k++)if (p = a._labels[k], !(p.position < a.viewportMinimum || p.position > a.viewportMaximum) && (q = a.getPixelCoordinatesOnAxis(p.position), a.tickThickness)) { a.ctx.lineWidth = a.tickThickness; a.ctx.strokeStyle = a.tickColor; var b = 1 === a.ctx.lineWidth % 2 ? (q.y << 0) + 0.5 : q.y << 0; a.ctx.save(); a.ctx.beginPath(); a.ctx.moveTo(q.x << 0, b); a.ctx.lineTo(q.x + a.tickLength << 0, b); a.ctx.stroke();
1797 a.ctx.restore() } }, this); this.title && 1798 (this._titleTextBlock.measureText(), this._titleTextBlock.x = this.bounds.x1 + this._titleTextBlock.fontSize / 2 + 1, this._titleTextBlock.y = this.lineCoordinates.height / 2 + this._titleTextBlock.width / 2 + this.lineCoordinates.y1, this.titleMaxWidth = this._titleTextBlock.maxWidth, this._titleTextBlock.render(!0)) 1799 } else if ("right" === this._position) { 1800 for (k = 0; k < this._labels.length; k++)p = this._labels[k], p.position < this.viewportMinimum || p.position > this.viewportMaximum || (q = this.getPixelCoordinatesOnAxis(p.position), this.tickThickness && 1801 "inside" != this.tickPlacement && (this.ctx.lineWidth = this.tickThickness, this.ctx.strokeStyle = this.tickColor, b = 1 === this.ctx.lineWidth % 2 ? (q.y << 0) + 0.5 : q.y << 0, this.ctx.beginPath(), this.ctx.moveTo(q.x << 0, b), this.ctx.lineTo(q.x + this.tickLength << 0, b), this.ctx.stroke()), g && 0 !== h++ % 2 && this.labelAutoFit || (0 === this.labelAngle ? (p.textBlock.y = q.y, p.textBlock.x = "inside" === this.labelPlacement ? q.x - p.textBlock.width - ("inside" === this.tickPlacement ? this.tickLength : 0) - 5 : q.x + ("inside" === this.tickPlacement ? 0 : this.tickLength) + 1802 5) : (p.textBlock.y = "inside" === this.labelPlacement ? q.y - p.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) : 0 > this.labelAngle ? q.y : q.y - (p.textBlock.height - p.textBlock.fontSize / 2 - 5) * Math.cos(Math.PI / 180 * this.labelAngle), p.textBlock.x = "inside" === this.labelPlacement ? q.x - p.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - ("inside" === this.tickPlacement ? this.tickLength : 0) - 5 : 0 < this.labelAngle ? q.x + (p.textBlock.height - p.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) + ("inside" === this.tickPlacement ? 1803 0 : this.tickLength) : q.x + ("inside" === this.tickPlacement ? 0 : this.tickLength) + 5))); "inside" === this.tickPlacement && this.chart.addEventListener("dataAnimationIterationEnd", function () { 1804 for (k = 0; k < a._labels.length; k++)if (p = a._labels[k], !(p.position < a.viewportMinimum || p.position > a.viewportMaximum) && (q = a.getPixelCoordinatesOnAxis(p.position), a.tickThickness)) { 1805 a.ctx.lineWidth = a.tickThickness; a.ctx.strokeStyle = a.tickColor; var b = 1 === a.ctx.lineWidth % 2 ? (q.y << 0) + 0.5 : q.y << 0; a.ctx.save(); a.ctx.beginPath(); a.ctx.moveTo(q.x << 1806 0, b); a.ctx.lineTo(q.x - a.tickLength << 0, b); a.ctx.stroke(); a.ctx.restore() 1807 } 1808 }, this); this.title && (this._titleTextBlock.measureText(), this._titleTextBlock.x = this.bounds.x2 - this._titleTextBlock.fontSize / 2 - 1, this._titleTextBlock.y = this.lineCoordinates.height / 2 - this._titleTextBlock.width / 2 + this.lineCoordinates.y1, this.titleMaxWidth = this._titleTextBlock.maxWidth, this._titleTextBlock.render(!0)) 1809 } h = 0; if ("inside" === this.labelPlacement) this.chart.addEventListener("dataAnimationIterationEnd", function () { 1810 for (k = 0; k < 1811 a._labels.length; k++)p = a._labels[k], p.position < a.viewportMinimum || (p.position > a.viewportMaximum || g && 0 !== h++ % 2 && a.labelAutoFit) || (a.ctx.save(), a.ctx.beginPath(), p.textBlock.render(!0), a.ctx.restore()) 1812 }, this); else for (k = 0; k < this._labels.length; k++)p = this._labels[k], p.position < this.viewportMinimum || (p.position > this.viewportMaximum || g && 0 !== h++ % 2 && this.labelAutoFit) || p.textBlock.render(!0) 1813 }; D.prototype.renderInterlacedColors = function () { 1814 var a = this.chart.plotArea.ctx, g, c, b = this.chart.plotArea, e = 0; g = !0; if (("bottom" === 1815 this._position || "top" === this._position) && this.interlacedColor) for (a.fillStyle = this.interlacedColor, e = 0; e < this._labels.length; e++)g ? (g = this.getPixelCoordinatesOnAxis(this._labels[e].position), c = e + 1 > this._labels.length - 1 ? this.getPixelCoordinatesOnAxis(this.viewportMaximum) : this.getPixelCoordinatesOnAxis(this._labels[e + 1].position), a.fillRect(Math.min(c.x, g.x), b.y1, Math.abs(c.x - g.x), Math.abs(b.y1 - b.y2)), g = !1) : g = !0; else if (("left" === this._position || "right" === this._position) && this.interlacedColor) for (a.fillStyle = 1816 this.interlacedColor, e = 0; e < this._labels.length; e++)g ? (c = this.getPixelCoordinatesOnAxis(this._labels[e].position), g = e + 1 > this._labels.length - 1 ? this.getPixelCoordinatesOnAxis(this.viewportMaximum) : this.getPixelCoordinatesOnAxis(this._labels[e + 1].position), a.fillRect(b.x1, Math.min(c.y, g.y), Math.abs(b.x1 - b.x2), Math.abs(g.y - c.y)), g = !1) : g = !0; a.beginPath() 1817 }; D.prototype.renderStripLinesOfThicknessType = function (a) { 1818 if (this.stripLines && 0 < this.stripLines.length && a) { 1819 var g = this, c, b, e = 0, h = 0, d = !1; b = !1; for (var l = [], 1820 t = [], k = !1, e = 0; e < this.stripLines.length; e++) { var m = this.stripLines[e]; m._thicknessType === a && ("pixel" === a && (m.value < this.viewportMinimum || m.value > this.viewportMaximum || n(m.value) || isNaN(this.range)) || "value" === a && (m.startValue <= this.viewportMinimum && m.endValue <= this.viewportMinimum || m.startValue >= this.viewportMaximum && m.endValue >= this.viewportMaximum || n(m.startValue) || n(m.endValue) || isNaN(this.range)) || l.push(m)) } for (e = 0; e < this._stripLineLabels.length; e++)if (m = this.stripLines[e], c = this._stripLineLabels[e], 1821 !(c.position < this.viewportMinimum || c.position > this.viewportMaximum || isNaN(this.range))) if (b = this.getPixelCoordinatesOnAxis(c.position), "outside" === c.stripLine.labelPlacement) { 1822 m && (this.ctx.strokeStyle = m.color, this.ctx.lineWidth = "pixel" === m._thicknessType ? m.thickness : this.tickThickness); if ("bottom" === this._position) { 1823 var p = 1 === this.ctx.lineWidth % 2 ? (b.x << 0) + 0.5 : b.x << 0; this.ctx.beginPath(); this.ctx.moveTo(p, b.y << 0); this.ctx.lineTo(p, b.y + this.tickLength << 0); this.ctx.stroke(); 0 === this.labelAngle ? (b.x -= c.textBlock.width / 1824 2, b.y += this.tickLength + c.textBlock.fontSize / 2 + 5) : (b.x -= 0 > this.labelAngle ? c.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : 0, b.y += this.tickLength + Math.abs(0 > this.labelAngle ? c.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) - 5 : 5)) 1825 } else "top" === this._position ? (p = 1 === this.ctx.lineWidth % 2 ? (b.x << 0) + 0.5 : b.x << 0, this.ctx.beginPath(), this.ctx.moveTo(p, b.y << 0), this.ctx.lineTo(p, b.y - this.tickLength << 0), this.ctx.stroke(), 0 === this.labelAngle ? (b.x -= c.textBlock.width / 2, b.y -= this.tickLength + c.textBlock.height - 1826 c.textBlock.fontSize / 2) : (b.x += (c.textBlock.height - this.tickLength - this.labelFontSize / 2) * Math.sin(Math.PI / 180 * this.labelAngle) - (0 < this.labelAngle ? c.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) : 0), b.y -= this.tickLength + (c.textBlock.height * Math.cos(Math.PI / 180 * this.labelAngle) + (0 < this.labelAngle ? c.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle) : 0)))) : "left" === this._position ? (p = 1 === this.ctx.lineWidth % 2 ? (b.y << 0) + 0.5 : b.y << 0, this.ctx.beginPath(), this.ctx.moveTo(b.x << 0, p), this.ctx.lineTo(b.x - 1827 this.tickLength << 0, p), this.ctx.stroke(), 0 === this.labelAngle ? b.x = b.x - c.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - this.tickLength - 5 : (b.y -= c.textBlock.width * Math.sin(Math.PI / 180 * this.labelAngle), b.x = 0 < this.labelAngle ? b.x - c.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) - this.tickLength - 5 : b.x - c.textBlock.width * Math.cos(Math.PI / 180 * this.labelAngle) + (c.textBlock.height - c.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) - this.tickLength)) : "right" === this._position && (p = 1 === this.ctx.lineWidth % 1828 2 ? (b.y << 0) + 0.5 : b.y << 0, this.ctx.beginPath(), this.ctx.moveTo(b.x << 0, p), this.ctx.lineTo(b.x + this.tickLength << 0, p), this.ctx.stroke(), 0 === this.labelAngle ? b.x = b.x + this.tickLength + 5 : (b.y = 0 > this.labelAngle ? b.y : b.y - (c.textBlock.height - c.textBlock.fontSize / 2 - 5) * Math.cos(Math.PI / 180 * this.labelAngle), b.x = 0 < this.labelAngle ? b.x + (c.textBlock.height - c.textBlock.fontSize / 2 - 5) * Math.sin(Math.PI / 180 * this.labelAngle) + this.tickLength : b.x + this.tickLength + 5)); c.textBlock.x = b.x; c.textBlock.y = b.y; t.push(c) 1829 } else m._thicknessType === 1830 a && (c.textBlock.angle = -90, "bottom" === this._position ? (c.textBlock.maxWidth = this.options.stripLines[e].labelMaxWidth ? this.options.stripLines[e].labelMaxWidth : this.chart.plotArea.height - 3, c.textBlock.measureText(), b.x - c.textBlock.height - m.thickness / 2 > this.chart.plotArea.x1 ? n(m.startValue) ? b.x -= c.textBlock.height - c.textBlock.fontSize / 2 + m.thickness / 2 : b.x -= c.textBlock.height / 2 - c.textBlock.fontSize / 2 : (c.textBlock.angle = 90, n(m.startValue) ? b.x += c.textBlock.height - c.textBlock.fontSize / 2 + m.thickness / 2 : b.x += 1831 c.textBlock.height / 2 - c.textBlock.fontSize / 2), b.y = -90 === c.textBlock.angle ? "near" === c.stripLine.labelAlign ? this.chart.plotArea.y2 - 3 : "center" === c.stripLine.labelAlign ? (this.chart.plotArea.y2 + this.chart.plotArea.y1 + c.textBlock.width) / 2 : this.chart.plotArea.y1 + c.textBlock.width + 3 : "near" === c.stripLine.labelAlign ? this.chart.plotArea.y2 - c.textBlock.width - 3 : "center" === c.stripLine.labelAlign ? (this.chart.plotArea.y2 + this.chart.plotArea.y1 - c.textBlock.width) / 2 : this.chart.plotArea.y1 + 3) : "top" === this._position ? 1832 (c.textBlock.maxWidth = this.options.stripLines[e].labelMaxWidth ? this.options.stripLines[e].labelMaxWidth : this.chart.plotArea.height - 3, c.textBlock.measureText(), b.x - c.textBlock.height - m.thickness / 2 > this.chart.plotArea.x1 ? n(m.startValue) ? b.x -= c.textBlock.height - c.textBlock.fontSize / 2 + m.thickness / 2 : b.x -= c.textBlock.height / 2 - c.textBlock.fontSize / 2 : (c.textBlock.angle = 90, n(m.startValue) ? b.x += c.textBlock.height - c.textBlock.fontSize / 2 + m.thickness / 2 : b.x += c.textBlock.height / 2 - c.textBlock.fontSize / 2), b.y = -90 === 1833 c.textBlock.angle ? "near" === c.stripLine.labelAlign ? this.chart.plotArea.y1 + c.textBlock.width + 3 : "center" === c.stripLine.labelAlign ? (this.chart.plotArea.y2 + this.chart.plotArea.y1 + c.textBlock.width) / 2 : this.chart.plotArea.y2 - 3 : "near" === c.stripLine.labelAlign ? this.chart.plotArea.y1 + 3 : "center" === c.stripLine.labelAlign ? (this.chart.plotArea.y2 + this.chart.plotArea.y1 - c.textBlock.width) / 2 : this.chart.plotArea.y2 - c.textBlock.width - 3) : "left" === this._position ? (c.textBlock.maxWidth = this.options.stripLines[e].labelMaxWidth ? 1834 this.options.stripLines[e].labelMaxWidth : this.chart.plotArea.width - 3, c.textBlock.angle = 0, c.textBlock.measureText(), b.y - c.textBlock.height - m.thickness / 2 > this.chart.plotArea.y1 ? n(m.startValue) ? b.y -= c.textBlock.height - c.textBlock.fontSize / 2 + m.thickness / 2 : b.y -= c.textBlock.height / 2 - c.textBlock.fontSize / 2 : n(m.startValue) ? b.y += c.textBlock.height - c.textBlock.fontSize / 2 + m.thickness / 2 : b.y += c.textBlock.height / 2 - c.textBlock.fontSize + 3, b.x = "near" === c.stripLine.labelAlign ? this.chart.plotArea.x1 + 3 : "center" === c.stripLine.labelAlign ? 1835 (this.chart.plotArea.x2 + this.chart.plotArea.x1) / 2 - c.textBlock.width / 2 : this.chart.plotArea.x2 - c.textBlock.width - 3) : "right" === this._position && (c.textBlock.maxWidth = this.options.stripLines[e].labelMaxWidth ? this.options.stripLines[e].labelMaxWidth : this.chart.plotArea.width - 3, c.textBlock.angle = 0, c.textBlock.measureText(), b.y - c.textBlock.height - m.thickness / 2 > this.chart.plotArea.y1 ? n(m.startValue) ? b.y -= c.textBlock.height - c.textBlock.fontSize / 2 + m.thickness / 2 : b.y -= c.textBlock.height / 2 - c.textBlock.fontSize / 1836 2 : n(m.startValue) ? b.y += c.textBlock.height - c.textBlock.fontSize / 2 + m.thickness / 2 : b.y -= c.textBlock.height / 2 - c.textBlock.fontSize / 2 + 3, b.x = "near" === c.stripLine.labelAlign ? this.chart.plotArea.x2 - c.textBlock.width - 3 : "center" === c.stripLine.labelAlign ? (this.chart.plotArea.x2 + this.chart.plotArea.x1) / 2 - c.textBlock.width / 2 : this.chart.plotArea.x1 + 3), c.textBlock.x = b.x, c.textBlock.y = b.y, t.push(c)); if (!k) { 1837 b = !1; this.ctx.save(); this.ctx.beginPath(); this.ctx.rect(this.chart.plotArea.x1, this.chart.plotArea.y1, this.chart.plotArea.width, 1838 this.chart.plotArea.height); this.ctx.clip(); for (e = 0; e < l.length; e++)m = l[e], m.showOnTop ? d || (d = !0, this.chart.addEventListener("dataAnimationIterationEnd", function () { 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 (h = 0; h < l.length; h++)m = l[h], m.showOnTop && m.render();
1838 this.ctx.restore() }, m)) : m.render(); for (e = 0; e < t.length; e++)c = t[e], c.stripLine.showOnTop ? b || (b = !0, this.chart.addEventListener("dataAnimationIterationEnd", 1839 function () { for (h = 0; h < t.length; h++)c = t[h], "inside" === c.stripLine.labelPlacement && c.stripLine.showOnTop && (g.ctx.save(), g.ctx.beginPath(), g.ctx.rect(g.chart.plotArea.x1, g.chart.plotArea.y1, g.chart.plotArea.width, g.chart.plotArea.height), g.ctx.clip(), c.textBlock.render(!0), g.ctx.restore()) }, c.textBlock)) : "inside" === c.stripLine.labelPlacement && c.textBlock.render(!0); this.ctx.restore(); k = !0 1840 } if (k) for (b = !1, e = 0; e < t.length; e++)c = t[e], "outside" === c.stripLine.labelPlacement && c.textBlock.render(!0) 1841 } 1842 }; D.prototype.renderBreaksBackground = 1843 function () { this.chart._breaksCanvas && (this.scaleBreaks && 0 < this.scaleBreaks._appliedBreaks.length && this.maskCanvas) && (this.chart._breaksCanvasCtx.save(), this.chart._breaksCanvasCtx.beginPath(), this.chart._breaksCanvasCtx.rect(this.chart.plotArea.x1, this.chart.plotArea.y1, this.chart.plotArea.width, this.chart.plotArea.height), this.chart._breaksCanvasCtx.clip(), this.chart._breaksCanvasCtx.drawImage(this.maskCanvas, 0, 0, this.chart.width, this.chart.height), this.chart._breaksCanvasCtx.restore()) }; D.prototype.createMask = 1844 function () { 1845 if (this.scaleBreaks && 0 < this.scaleBreaks._appliedBreaks.length) { 1846 var a = this.scaleBreaks._appliedBreaks; v ? (this.maskCanvas = va(this.chart.width, this.chart.height), this.maskCtx = this.maskCanvas.getContext("2d")) : (this.maskCanvas = this.chart.plotArea.canvas, this.maskCtx = this.chart.plotArea.ctx); this.maskCtx.save(); this.maskCtx.beginPath(); this.maskCtx.rect(this.chart.plotArea.x1, this.chart.plotArea.y1, this.chart.plotArea.width, this.chart.plotArea.height); this.maskCtx.clip(); for (var g = 0; g < a.length; g++)a[g].endValue < 1847 this.viewportMinimum || (a[g].startValue > this.viewportMaximum || isNaN(this.range)) || a[g].render(this.maskCtx); this.maskCtx.restore() 1848 } 1849 }; D.prototype.renderCrosshair = function (a, g) { isFinite(this.minimum) && isFinite(this.maximum) && this.crosshair.render(a, g) }; D.prototype.showCrosshair = function (a) { 1850 n(a) || (a < this.viewportMinimum || a > this.viewportMaximum) || ("top" === this._position || "bottom" === this._position ? this.crosshair.render(this.convertValueToPixel(a), null, a) : this.crosshair.render(null, this.convertValueToPixel(a), 1851 a)) 1852 }; D.prototype.renderGrid = function () { 1853 if (this.gridThickness && 0 < this.gridThickness) { 1854 var a = this.chart.ctx; a.save(); var g, c = this.chart.plotArea; a.lineWidth = this.gridThickness; a.strokeStyle = this.gridColor; a.setLineDash && a.setLineDash(H(this.gridDashType, this.gridThickness)); if ("bottom" === this._position || "top" === this._position) for (b = 0; b < this._labels.length; b++)this._labels[b].position < this.viewportMinimum || (this._labels[b].position > this.viewportMaximum || this._labels[b].breaksLabelType) || (a.beginPath(), 1855 g = this.getPixelCoordinatesOnAxis(this._labels[b].position), g = 1 === a.lineWidth % 2 ? (g.x << 0) + 0.5 : g.x << 0, a.moveTo(g, c.y1 << 0), a.lineTo(g, c.y2 << 0), a.stroke()); else if ("left" === this._position || "right" === this._position) for (var b = 0; b < this._labels.length; b++)this._labels[b].position < this.viewportMinimum || (this._labels[b].position > this.viewportMaximum || this._labels[b].breaksLabelType) || (a.beginPath(), g = this.getPixelCoordinatesOnAxis(this._labels[b].position), g = 1 === a.lineWidth % 2 ? (g.y << 0) + 0.5 : g.y << 0, a.moveTo(c.x1 << 1856 0, g), a.lineTo(c.x2 << 0, g), a.stroke());
1856 a.restore() 1857 } 1858 }; D.prototype.renderAxisLine = function () { 1859 var a = this.chart.ctx, g = v ? this.chart._preRenderCtx : a, c = Math.ceil(this.tickThickness / (this.reversed ? -2 : 2)), b = Math.ceil(this.tickThickness / (this.reversed ? 2 : -2)), e, h; g.save(); if ("bottom" === this._position || "top" === this._position) { 1860 if (this.lineThickness) { 1861 this.reversed ? (e = this.lineCoordinates.x2, h = this.lineCoordinates.x1) : (e = this.lineCoordinates.x1, h = this.lineCoordinates.x2); g.lineWidth = this.lineThickness; g.strokeStyle = 1862 this.lineColor ? this.lineColor : "black"; g.setLineDash && g.setLineDash(H(this.lineDashType, this.lineThickness)); var d = 1 === this.lineThickness % 2 ? (this.lineCoordinates.y1 << 0) + 0.5 : this.lineCoordinates.y1 << 0; g.beginPath(); if (this.scaleBreaks && !n(this.scaleBreaks.firstBreakIndex)) if (n(this.scaleBreaks.lastBreakIndex)) e = this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel + b; else for (var l = this.scaleBreaks.firstBreakIndex; l <= this.scaleBreaks.lastBreakIndex; l++)g.moveTo(e, d), g.lineTo(this.scaleBreaks._appliedBreaks[l].startPixel + 1863 c, d), e = this.scaleBreaks._appliedBreaks[l].endPixel + b; e && (g.moveTo(e, d), g.lineTo(h, d)); g.stroke() 1864 } 1865 } else if (("left" === this._position || "right" === this._position) && this.lineThickness) { 1866 this.reversed ? (e = this.lineCoordinates.y1, h = this.lineCoordinates.y2) : (e = this.lineCoordinates.y2, h = this.lineCoordinates.y1); g.lineWidth = this.lineThickness; g.strokeStyle = this.lineColor; g.setLineDash && g.setLineDash(H(this.lineDashType, this.lineThickness)); d = 1 === this.lineThickness % 2 ? (this.lineCoordinates.x1 << 0) + 0.5 : this.lineCoordinates.x1 << 1867 0; g.beginPath(); if (this.scaleBreaks && !n(this.scaleBreaks.firstBreakIndex)) if (n(this.scaleBreaks.lastBreakIndex)) e = this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel + c; else for (l = this.scaleBreaks.firstBreakIndex; l <= this.scaleBreaks.lastBreakIndex; l++)g.moveTo(d, e), g.lineTo(d, this.scaleBreaks._appliedBreaks[l].startPixel + b), e = this.scaleBreaks._appliedBreaks[l].endPixel + c; e && (g.moveTo(d, e), g.lineTo(d, h)); g.stroke() 1868 } v && (a.drawImage(this.chart._preRenderCanvas, 0, 0, this.chart.width, 1869 this.chart.height), this.chart._breaksCanvasCtx && this.chart._breaksCanvasCtx.drawImage(this.chart._preRenderCanvas, 0, 0, this.chart.width, this.chart.height), g.clearRect(0, 0, this.chart.width, this.chart.height)); g.restore() 1870 }; D.prototype.getPixelCoordinatesOnAxis = function (a) { 1871 var g = {}; if ("bottom" === this._position || "top" === this._position) g.x = this.convertValueToPixel(a), g.y = this.lineCoordinates.y1; if ("left" === this._position || "right" === this._position) g.y = this.convertValueToPixel(a), g.x = this.lineCoordinates.x2; 1872 return g 1873 }; D.prototype.convertPixelToValue = function (a) { 1874 if ("undefined" === typeof a) return null; var g = 0, c = 0, b, g = !0, e = this.scaleBreaks ? this.scaleBreaks._appliedBreaks : [], c = "number" === typeof a ? a : "left" === this._position || "right" === this._position ? a.y : a.x; if (this.logarithmic) { 1875 a = b = Math.pow(this.logarithmBase, (c - this.conversionParameters.reference) / this.conversionParameters.pixelPerUnit); if (c <= this.conversionParameters.reference === ("left" === this._position || "right" === this._position) !== this.reversed) for (c = 0; c < 1876 e.length; c++) { 1877 if (!(e[c].endValue < this.conversionParameters.minimum)) if (g) if (e[c].startValue < this.conversionParameters.minimum) { 1878 if (1 < e[c].size && this.conversionParameters.minimum * Math.pow(e[c].endValue / e[c].startValue, Math.log(b) / Math.log(e[c].size)) < e[c].endValue) { a = Math.pow(e[c].endValue / e[c].startValue, Math.log(b) / Math.log(e[c].size)); break } else a *= e[c].endValue / this.conversionParameters.minimum / Math.pow(e[c].size, Math.log(e[c].endValue / this.conversionParameters.minimum) / Math.log(e[c].endValue / e[c].startValue)), 1879 b /= Math.pow(e[c].size, Math.log(e[c].endValue / this.conversionParameters.minimum) / Math.log(e[c].endValue / e[c].startValue)); g = !1 1880 } else if (b > e[c].startValue / this.conversionParameters.minimum) { b /= e[c].startValue / this.conversionParameters.minimum; if (b < e[c].size) { a *= Math.pow(e[c].endValue / e[c].startValue, 1 === e[c].size ? 1 : Math.log(b) / Math.log(e[c].size)) / b; break } else a *= e[c].endValue / e[c].startValue / e[c].size; b /= e[c].size; g = !1 } else break; else if (b > e[c].startValue / e[c - 1].endValue) { 1881 b /= e[c].startValue / e[c - 1].endValue; 1882 if (b < e[c].size) { a *= Math.pow(e[c].endValue / e[c].startValue, 1 === e[c].size ? 1 : Math.log(b) / Math.log(e[c].size)) / b; break } else a *= e[c].endValue / e[c].startValue / e[c].size; b /= e[c].size 1883 } else break 1884 } else for (c = e.length - 1; 0 <= c; c--)if (!(e[c].startValue > this.conversionParameters.minimum)) if (g) if (e[c].endValue > this.conversionParameters.minimum) { 1885 if (1 < e[c].size && this.conversionParameters.minimum * Math.pow(e[c].endValue / e[c].startValue, Math.log(b) / Math.log(e[c].size)) > e[c].startValue) { 1886 a = Math.pow(e[c].endValue / e[c].startValue, 1887 Math.log(b) / Math.log(e[c].size)); break 1888 } else a *= e[c].startValue / this.conversionParameters.minimum * Math.pow(e[c].size, Math.log(e[c].startValue / this.conversionParameters.minimum) / Math.log(e[c].endValue / e[c].startValue)) * b, b *= Math.pow(e[c].size, Math.log(this.conversionParameters.minimum / e[c].startValue) / Math.log(e[c].endValue / e[c].startValue)); g = !1 1889 } else if (b < e[c].endValue / this.conversionParameters.minimum) { 1890 b /= e[c].endValue / this.conversionParameters.minimum; if (b > 1 / e[c].size) { 1891 a *= Math.pow(e[c].endValue / 1892 e[c].startValue, 1 >= e[c].size ? 1 : Math.log(b) / Math.log(e[c].size)) * b; break 1893 } else a /= e[c].endValue / e[c].startValue / e[c].size; b *= e[c].size; g = !1 1894 } else break; else if (b < e[c].endValue / e[c + 1].startValue) { b /= e[c].endValue / e[c + 1].startValue; if (b > 1 / e[c].size) { a *= Math.pow(e[c].endValue / e[c].startValue, 1 >= e[c].size ? 1 : Math.log(b) / Math.log(e[c].size)) * b; break } else a /= e[c].endValue / e[c].startValue / e[c].size; b *= e[c].size } else break; g = a * this.viewportMinimum 1895 } else { 1896 a = b = (c - this.conversionParameters.reference) / this.conversionParameters.pixelPerUnit; 1897 if (c <= this.conversionParameters.reference === ("left" === this._position || "right" === this._position) !== this.reversed) for (c = 0; c < e.length; c++) { 1898 if (!(e[c].endValue < this.conversionParameters.minimum)) if (g) if (e[c].startValue < this.conversionParameters.minimum) { 1899 if (e[c].size && this.conversionParameters.minimum + b * (e[c].endValue - e[c].startValue) / e[c].size < e[c].endValue) { a = 0 >= e[c].size ? 0 : b * (e[c].endValue - e[c].startValue) / e[c].size; break } else a += e[c].endValue - this.conversionParameters.minimum - e[c].size * (e[c].endValue - 1900 this.conversionParameters.minimum) / (e[c].endValue - e[c].startValue), b -= e[c].size * (e[c].endValue - this.conversionParameters.minimum) / (e[c].endValue - e[c].startValue); g = !1 1901 } else if (b > e[c].startValue - this.conversionParameters.minimum) { b -= e[c].startValue - this.conversionParameters.minimum; if (b < e[c].size) { a += (e[c].endValue - e[c].startValue) * (0 === e[c].size ? 1 : b / e[c].size) - b; break } else a += e[c].endValue - e[c].startValue - e[c].size; b -= e[c].size; g = !1 } else break; else if (b > e[c].startValue - e[c - 1].endValue) { 1902 b -= e[c].startValue - 1903 e[c - 1].endValue; if (b < e[c].size) { a += (e[c].endValue - e[c].startValue) * (0 === e[c].size ? 1 : b / e[c].size) - b; break } else a += e[c].endValue - e[c].startValue - e[c].size; b -= e[c].size 1904 } else break 1905 } else for (c = e.length - 1; 0 <= c; c--)if (!(e[c].startValue > this.conversionParameters.minimum)) if (g) if (e[c].endValue > this.conversionParameters.minimum) if (e[c].size && this.conversionParameters.minimum + b * (e[c].endValue - e[c].startValue) / e[c].size > e[c].startValue) { a = 0 >= e[c].size ? 0 : b * (e[c].endValue - e[c].startValue) / e[c].size; break } else a += 1906 e[c].startValue - this.conversionParameters.minimum + e[c].size * (this.conversionParameters.minimum - e[c].startValue) / (e[c].endValue - e[c].startValue), b += e[c].size * (this.conversionParameters.minimum - e[c].startValue) / (e[c].endValue - e[c].startValue), g = !1; else if (b < e[c].endValue - this.conversionParameters.minimum) { 1907 b -= e[c].endValue - this.conversionParameters.minimum; if (b > -1 * e[c].size) { a += (e[c].endValue - e[c].startValue) * (0 === e[c].size ? 1 : b / e[c].size) + b; break } else a -= e[c].endValue - e[c].startValue - e[c].size; b += e[c].size; 1908 g = !1 1909 } else break; else if (b < e[c].endValue - e[c + 1].startValue) { b -= e[c].endValue - e[c + 1].startValue; if (b > -1 * e[c].size) { a += (e[c].endValue - e[c].startValue) * (0 === e[c].size ? 1 : b / e[c].size) + b; break } else a -= e[c].endValue - e[c].startValue - e[c].size; b += e[c].size } else break; g = this.conversionParameters.minimum + a 1910 } return g 1911 }; D.prototype.convertValueToPixel = function (a) { 1912 a = this.getApparentDifference(this.conversionParameters.minimum, a, a); return this.logarithmic ? this.conversionParameters.reference + this.conversionParameters.pixelPerUnit * 1913 Math.log(a / this.conversionParameters.minimum) / this.conversionParameters.lnLogarithmBase + 0.5 << 0 : "axisX" === this.type ? this.conversionParameters.reference + this.conversionParameters.pixelPerUnit * (a - this.conversionParameters.minimum) + 0.5 << 0 : this.conversionParameters.reference + this.conversionParameters.pixelPerUnit * (a - this.conversionParameters.minimum) + 0.5 1914 }; D.prototype.getApparentDifference = function (a, g, c, b) { 1915 var e = this.scaleBreaks ? this.scaleBreaks._appliedBreaks : []; if (this.logarithmic) { 1916 c = n(c) ? g / a : c; for (var h = 1917 0; h < e.length && !(g < e[h].startValue); h++)a > e[h].endValue || (a <= e[h].startValue && g >= e[h].endValue ? c = c / e[h].endValue * e[h].startValue * e[h].size : a >= e[h].startValue && g >= e[h].endValue ? c = c / e[h].endValue * a * Math.pow(e[h].size, Math.log(e[h].endValue / a) / Math.log(e[h].endValue / e[h].startValue)) : a <= e[h].startValue && g <= e[h].endValue ? c = c / g * e[h].startValue * Math.pow(e[h].size, Math.log(g / e[h].startValue) / Math.log(e[h].endValue / e[h].startValue)) : !b && (a > e[h].startValue && g < e[h].endValue) && (c = a * Math.pow(e[h].size, Math.log(g / 1918 a) / Math.log(e[h].endValue / e[h].startValue)))) 1919 } else for (c = n(c) ? Math.abs(g - a) : c, h = 0; h < e.length && !(g < e[h].startValue); h++)a > e[h].endValue || (a <= e[h].startValue && g >= e[h].endValue ? c = c - e[h].endValue + e[h].startValue + e[h].size : a > e[h].startValue && g >= e[h].endValue ? c = c - e[h].endValue + a + e[h].size * (e[h].endValue - a) / (e[h].endValue - e[h].startValue) : a <= e[h].startValue && g < e[h].endValue ? c = c - g + e[h].startValue + e[h].size * (g - e[h].startValue) / (e[h].endValue - e[h].startValue) : !b && (a > e[h].startValue && g < e[h].endValue) && (c = a + 1920 e[h].size * (g - a) / (e[h].endValue - e[h].startValue))); return c 1921 }; D.prototype.setViewPortRange = function (a, g) { this.sessionVariables.newViewportMinimum = this.viewportMinimum = Math.min(a, g); this.sessionVariables.newViewportMaximum = this.viewportMaximum = Math.max(a, g) }; D.prototype.getXValueAt = function (a) { if (!a) return null; var g = null; "left" === this._position ? g = this.convertPixelToValue(a.y) : "bottom" === this._position && (g = this.convertPixelToValue(a.x)); return g }; D.prototype.calculateValueToPixelConversionParameters = 1922 function (a) { 1923 a = this.scaleBreaks ? this.scaleBreaks._appliedBreaks : []; var g = { pixelPerUnit: null, minimum: null, reference: null }, c = this.lineCoordinates.width, b = this.lineCoordinates.height, c = "bottom" === this._position || "top" === this._position ? c : b, b = Math.abs(this.range); if (this.logarithmic) for (var e = 0; e < a.length && !(this.viewportMaximum < a[e].startValue); e++)this.viewportMinimum > a[e].endValue || (this.viewportMinimum >= a[e].startValue && this.viewportMaximum <= a[e].endValue ? c = 0 : this.viewportMinimum <= a[e].startValue && 1924 this.viewportMaximum >= a[e].endValue ? (b = b / a[e].endValue * a[e].startValue, c = 0 < a[e].spacing.toString().indexOf("%") ? c * (1 - parseFloat(a[e].spacing) / 100) : c - Math.min(a[e].spacing, 0.1 * c)) : this.viewportMinimum > a[e].startValue && this.viewportMaximum >= a[e].endValue ? (b = b / a[e].endValue * this.viewportMinimum, c = 0 < a[e].spacing.toString().indexOf("%") ? c * (1 - parseFloat(a[e].spacing) / 100 * Math.log(a[e].endValue / this.viewportMinimum) / Math.log(a[e].endValue / a[e].startValue)) : c - Math.min(a[e].spacing, 0.1 * c) * Math.log(a[e].endValue / 1925 this.viewportMinimum) / Math.log(a[e].endValue / a[e].startValue)) : this.viewportMinimum <= a[e].startValue && this.viewportMaximum < a[e].endValue && (b = b / this.viewportMaximum * a[e].startValue, c = 0 < a[e].spacing.toString().indexOf("%") ? c * (1 - parseFloat(a[e].spacing) / 100 * Math.log(this.viewportMaximum / a[e].startValue) / Math.log(a[e].endValue / a[e].startValue)) : c - Math.min(a[e].spacing, 0.1 * c) * Math.log(this.viewportMaximum / a[e].startValue) / Math.log(a[e].endValue / a[e].startValue))); else for (e = 0; e < a.length && !(this.viewportMaximum < 1926 a[e].startValue); e++)this.viewportMinimum > a[e].endValue || (this.viewportMinimum >= a[e].startValue && this.viewportMaximum <= a[e].endValue ? c = 0 : this.viewportMinimum <= a[e].startValue && this.viewportMaximum >= a[e].endValue ? (b = b - a[e].endValue + a[e].startValue, c = 0 < a[e].spacing.toString().indexOf("%") ? c * (1 - parseFloat(a[e].spacing) / 100) : c - Math.min(a[e].spacing, 0.1 * c)) : this.viewportMinimum > a[e].startValue && this.viewportMaximum >= a[e].endValue ? (b = b - a[e].endValue + t
1926his.viewportMinimum, c = 0 < a[e].spacing.toString().indexOf("%") ? 1927 c * (1 - parseFloat(a[e].spacing) / 100 * (a[e].endValue - this.viewportMinimum) / (a[e].endValue - a[e].startValue)) : c - Math.min(a[e].spacing, 0.1 * c) * (a[e].endValue - this.viewportMinimum) / (a[e].endValue - a[e].startValue)) : this.viewportMinimum <= a[e].startValue && this.viewportMaximum < a[e].endValue && (b = b - this.viewportMaximum + a[e].startValue, c = 0 < a[e].spacing.toString().indexOf("%") ? c * (1 - parseFloat(a[e].spacing) / 100 * (this.viewportMaximum - a[e].startValue) / (a[e].endValue - a[e].startValue)) : c - Math.min(a[e].spacing, 0.1 * c) * (this.viewportMaximum - 1928 a[e].startValue) / (a[e].endValue - a[e].startValue))); g.minimum = this.viewportMinimum; g.maximum = this.viewportMaximum; g.range = b; if ("bottom" === this._position || "top" === this._position) this.logarithmic ? (g.lnLogarithmBase = Math.log(this.logarithmBase), g.pixelPerUnit = (this.reversed ? -1 : 1) * c * g.lnLogarithmBase / Math.log(Math.abs(b))) : g.pixelPerUnit = (this.reversed ? -1 : 1) * c / Math.abs(b), g.reference = this.reversed ? this.lineCoordinates.x2 : this.lineCoordinates.x1; if ("left" === this._position || "right" === this._position) this.logarithmic ? 1929 (g.lnLogarithmBase = Math.log(this.logarithmBase), g.pixelPerUnit = (this.reversed ? 1 : -1) * c * g.lnLogarithmBase / Math.log(Math.abs(b))) : g.pixelPerUnit = (this.reversed ? 1 : -1) * c / Math.abs(b), g.reference = this.reversed ? this.lineCoordinates.y1 : this.lineCoordinates.y2; this.conversionParameters = g 1930 }; D.prototype.calculateAxisParameters = function () { 1931 if (this.logarithmic) this.calculateLogarithmicAxisParameters(); else { 1932 var a = this.chart.layoutManager.getFreeSpace(), g = !1, c = !1; "bottom" === this._position || "top" === this._position ? (this.maxWidth = 1933 a.width, this.maxHeight = 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, b = 4; "axisX" === this.type && (b = 600 > this.maxWidth ? 8 : 6); var a = Math.max(b, Math.floor(this.maxWidth / a)), e, h, d, b = 0; !n(this.options.viewportMinimum) && (!n(this.options.viewportMaximum) && this.options.viewportMinimum >= this.options.viewportMaximum) && (this.viewportMinimum = this.viewportMaximum = null); 1934 if (n(this.options.viewportMinimum) && !n(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 (n(this.options.viewportMaximum) && !n(this.sessionVariables.newViewportMaximum) && !isNaN(this.sessionVariables.newViewportMaximum)) this.viewportMaximum = this.sessionVariables.newViewportMaximum; else if (null === this.viewportMaximum || 1935 isNaN(this.viewportMaximum)) this.viewportMaximum = this.maximum; if (this.scaleBreaks) for (b = 0; b < this.scaleBreaks._appliedBreaks.length; b++)if ((!n(this.sessionVariables.newViewportMinimum) && this.sessionVariables.newViewportMinimum >= this.scaleBreaks._appliedBreaks[b].startValue || !n(this.options.minimum) && this.options.minimum >= this.scaleBreaks._appliedBreaks[b].startValue || !n(this.options.viewportMinimum) && this.viewportMinimum >= this.scaleBreaks._appliedBreaks[b].startValue) && (!n(this.sessionVariables.newViewportMaximum) && 1936 this.sessionVariables.newViewportMaximum <= this.scaleBreaks._appliedBreaks[b].endValue || !n(this.options.maximum) && this.options.maximum <= this.scaleBreaks._appliedBreaks[b].endValue || !n(this.options.viewportMaximum) && this.viewportMaximum <= this.scaleBreaks._appliedBreaks[b].endValue)) { this.scaleBreaks._appliedBreaks.splice(b, 1); break } if ("axisX" === this.type) { 1937 if (this.dataSeries && 0 < this.dataSeries.length) for (e = 0; e < this.dataSeries.length; e++)"dateTime" === this.dataSeries[e].xValueType && (c = !0); e = null !== this.viewportMinimum ? 1938 this.viewportMinimum : this.dataInfo.viewPortMin; h = null !== this.viewportMaximum ? this.viewportMaximum : this.dataInfo.viewPortMax; 0 === h - e && (b = "undefined" === typeof this.options.interval ? 0.4 : this.options.interval, h += b, e -= b); Infinity !== this.dataInfo.minDiff ? d = this.dataInfo.minDiff : 1 < h - e ? d = 0.5 * Math.abs(h - e) : (d = 1, c && (g = !0)) 1939 } else "axisY" === this.type && (e = null !== this.viewportMinimum ? this.viewportMinimum : this.dataInfo.viewPortMin, h = null !== this.viewportMaximum ? this.viewportMaximum : this.dataInfo.viewPortMax, isFinite(e) || 1940 isFinite(h) ? isFinite(e) ? isFinite(h) || (h = e) : e = h : (h = "undefined" === typeof this.options.interval ? -Infinity : this.options.interval, e = "undefined" !== typeof this.options.interval || isFinite(this.dataInfo.minDiff) ? 0 : Infinity), 0 === e && 0 === h ? (h += 9, e = 0) : 0 === h - e ? (b = Math.min(Math.abs(0.01 * Math.abs(h)), 5), h += b, e -= b) : e > h ? (b = Math.min(0.01 * Math.abs(this.getApparentDifference(h, e, null, !0)), 5), 0 <= h ? e = h - b : h = isFinite(e) ? e + b : 0) : (b = Math.min(0.01 * Math.abs(this.getApparentDifference(e, h, null, !0)), 0.05), 0 !== h && (h += b), 0 !== e && (e -= 1941 b)), d = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : 1 < h - e ? 0.5 * Math.abs(h - e) : 1, this.includeZero && (null === this.viewportMinimum || isNaN(this.viewportMinimum)) && 0 < e && (e = 0), this.includeZero && (null === this.viewportMaximum || isNaN(this.viewportMaximum)) && 0 > h && (h = 0)); b = this.getApparentDifference(isNaN(this.viewportMinimum) || null === this.viewportMinimum ? e : this.viewportMinimum, isNaN(this.viewportMaximum) || null === this.viewportMaximum ? h : this.viewportMaximum, null, !0); if ("axisX" === this.type && c) { 1942 this.valueType = 1943 "dateTime"; this.intervalType || (b / 1 <= a ? (this.interval = 1, this.intervalType = "millisecond") : b / 2 <= a ? (this.interval = 2, this.intervalType = "millisecond") : b / 5 <= a ? (this.interval = 5, this.intervalType = "millisecond") : b / 10 <= a ? (this.interval = 10, this.intervalType = "millisecond") : b / 20 <= a ? (this.interval = 20, this.intervalType = "millisecond") : b / 50 <= a ? (this.interval = 50, this.intervalType = "millisecond") : b / 100 <= a ? (this.interval = 100, this.intervalType = "millisecond") : b / 200 <= a ? (this.interval = 200, this.intervalType = "millisecond") : 1944 b / 250 <= a ? (this.interval = 250, this.intervalType = "millisecond") : b / 300 <= a ? (this.interval = 300, this.intervalType = "millisecond") : b / 400 <= a ? (this.interval = 400, this.intervalType = "millisecond") : b / 500 <= a ? (this.interval = 500, this.intervalType = "millisecond") : b / (1 * T.secondDuration) <= a ? (this.interval = 1, this.intervalType = "second") : b / (2 * T.secondDuration) <= a ? (this.interval = 2, this.intervalType = "second") : b / (5 * T.secondDuration) <= a ? (this.interval = 5, this.intervalType = "second") : b / (10 * T.secondDuration) <= a ? (this.interval = 10, 1945 this.intervalType = "second") : b / (15 * T.secondDuration) <= a ? (this.interval = 15, this.intervalType = "second") : b / (20 * T.secondDuration) <= a ? (this.interval = 20, this.intervalType = "second") : b / (30 * T.secondDuration) <= a ? (this.interval = 30, this.intervalType = "second") : b / (1 * T.minuteDuration) <= a ? (this.interval = 1, this.intervalType = "minute") : b / (2 * T.minuteDuration) <= a ? (this.interval = 2, this.intervalType = "minute") : b / (5 * T.minuteDuration) <= a ? (this.interval = 5, this.intervalType = "minute") : b / (10 * T.minuteDuration) <= a ? (this.interval = 1946 10, this.intervalType = "minute") : b / (15 * T.minuteDuration) <= a ? (this.interval = 15, this.intervalType = "minute") : b / (20 * T.minuteDuration) <= a ? (this.interval = 20, this.intervalType = "minute") : b / (30 * T.minuteDuration) <= a ? (this.interval = 30, this.intervalType = "minute") : b / (1 * T.hourDuration) <= a ? (this.interval = 1, this.intervalType = "hour") : b / (2 * T.hourDuration) <= a ? (this.interval = 2, this.intervalType = "hour") : b / (3 * T.hourDuration) <= a ? (this.interval = 3, this.intervalType = "hour") : b / (6 * T.hourDuration) <= a ? (this.interval = 6, this.intervalType = 1947 "hour") : b / (1 * T.dayDuration) <= a ? (this.interval = 1, this.intervalType = "day") : b / (2 * T.dayDuration) <= a ? (this.interval = 2, this.intervalType = "day") : b / (4 * T.dayDuration) <= a ? (this.interval = 4, this.intervalType = "day") : b / (1 * T.weekDuration) <= a ? (this.interval = 1, this.intervalType = "
1947week") : b / (2 * T.weekDuration) <= a ? (this.interval = 2, this.intervalType = "week") : b / (3 * T.weekDuration) <= a ? (this.interval = 3, this.intervalType = "week") : b / (1 * T.monthDuration) <= a ? (this.interval = 1, this.intervalType = "month") : b / (2 * T.monthDuration) <= a ? (this.interval = 1948 2, this.intervalType = "month") : b / (3 * T.monthDuration) <= a ? (this.interval = 3, this.intervalType = "month") : b / (6 * T.monthDuration) <= a ? (this.interval = 6, this.intervalType = "month") : (this.interval = b / (1 * T.yearDuration) <= a ? 1 : b / (2 * T.yearDuration) <= a ? 2 : b / (4 * T.yearDuration) <= a ? 4 : Math.floor(D.getNiceNumber(b / (a - 1), !0) / T.yearDuration), this.intervalType = "year")); if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) this.viewportMinimum = e - d / 2; if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) this.viewportMaximum = 1949 h + d / 2; g ? 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 = "hh:mm TT" : "second" === this.intervalType ? this.autoValueFormatString = 1950 "hh:mm:ss TT" : "millisecond" === this.intervalType && (this.autoValueFormatString = "fff'ms'"); this.valueFormatString || (this.valueFormatString = this.autoValueFormatString) 1951 } else { 1952 this.intervalType = "number"; b = D.getNiceNumber(b, !1); this.interval = this.options && 0 < this.options.interval ? this.options.interval : D.getNiceNumber(b / (a - 1), !0); if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) this.viewportMinimum = "axisX" === this.type ? e - d / 2 : Math.floor(e / this.interval) * this.interval; if (null === this.viewportMaximum || 1953 isNaN(this.viewportMaximum)) this.viewportMaximum = "axisX" === this.type ? h + d / 2 : Math.ceil(h / 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 = D.getNiceNumber((this.viewportMaximum - this.viewportMinimum) / (a - 1), !0))) 1954 } if (null === this.minimum || null === this.maximum) if ("axisX" === this.type ? (e = 1955 null !== this.minimum ? this.minimum : this.dataInfo.min, h = null !== this.maximum ? this.maximum : this.dataInfo.max, 0 === h - e && (b = "undefined" === typeof this.options.interval ? 0.4 : this.options.interval, h += b, e -= b), d = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : 1 < h - e ? 0.5 * Math.abs(h - e) : 1) : "axisY" === this.type && (e = null !== this.minimum ? this.minimum : this.dataInfo.min, h = null !== this.maximum ? this.maximum : this.dataInfo.max, isFinite(e) || isFinite(h) ? 0 === e && 0 === h ? (h += 9, e = 0) : 0 === h - e ? (b = Math.min(Math.abs(0.01 * Math.abs(h)), 1956 5), h += b, e -= b) : e > h ? (b = Math.min(0.01 * Math.abs(this.getApparentDifference(h, e, null, !0)), 5), 0 <= h ? e = h - b : h = isFinite(e) ? e + b : 0) : (b = Math.min(0.01 * Math.abs(this.getApparentDifference(e, h, null, !0)), 0.05), 0 !== h && (h += b), 0 !== e && (e -= b)) : (h = "undefined" === typeof this.options.interval ? -Infinity : this.options.interval, e = "undefined" !== typeof this.options.interval || isFinite(this.dataInfo.minDiff) ? 0 : Infinity), d = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : 1 < h - e ? 0.5 * Math.abs(h - e) : 1, this.includeZero && (null === this.minimum || 1957 isNaN(this.minimum)) && 0 < e && (e = 0), this.includeZero && (null === this.maximum || isNaN(this.maximum)) && 0 > h && (h = 0)), Math.abs(this.getApparentDifference(e, h, null, !0)), "axisX" === this.type && c) { 1958 this.valueType = "dateTime"; if (null === this.minimum || isNaN(this.minimum)) this.minimum = e - d / 2, this.minimum = Math.min(this.minimum, null === this.sessionVariables.viewportMinimum || isNaN(this.sessionVariables.viewportMinimum) ? Infinity : this.sessionVariables.viewportMinimum); if (null === this.maximum || isNaN(this.maximum)) this.maximum = 1959 h + d / 2, this.maximum = Math.max(this.maximum, null === this.sessionVariables.viewportMaximum || isNaN(this.sessionVariables.viewportMaximum) ? -Infinity : this.sessionVariables.viewportMaximum) 1960 } else this.intervalType = this.valueType = "number", null === this.minimum && (this.minimum = "axisX" === this.type ? e - d / 2 : Math.floor(e / this.interval) * this.interval, this.minimum = Math.min(this.minimum, null === this.sessionVariables.viewportMinimum || isNaN(this.sessionVariables.viewportMinimum) ? Infinity : this.sessionVariables.viewportMinimum)), 1961 null === this.maximum && (this.maximum = "axisX" === this.type ? h + d / 2 : Math.
1961ceil(h / 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)); n(this.sessionVariables.newViewportMinimum) && (this.viewportMinimum = Math.max(this.viewportMinimum, this.minimum)); 1962 n(this.sessionVariables.newViewportMaximum) && (this.viewportMaximum = Math.min(this.viewportMaximum, this.maximum)); this.range = this.viewportMaximum - this.viewportMinimum; this.intervalStartPosition = "axisX" === this.type && c ? this.getLabelStartPoint(new Date(this.viewportMinimum), this.intervalType, this.interval) : Math.floor((this.viewportMinimum + 0.2 * this.interval) / this.interval) * this.interval; this.valueFormatString || (this.valueFormatString = D.generateValueFormatString(this.range, 2)) 1963 } 1964 }; D.prototype.calculateLogarithmicAxisParameters = 1965 function () { 1966 var a = this.chart.layoutManager.getFreeSpace(), g = Math.log(this.logarithmBase), c; "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 / 100)) : Math.max(Math.floor(this.maxWidth / 50), 3), b, e, h, d; d = 1; if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) this.viewportMinimum = this.minimum; if (null === this.viewportMaximum || 1967 isNaN(this.viewportMaximum)) this.viewportMaximum = this.maximum; if (this.scaleBreaks) for (d = 0; d < this.scaleBreaks._appliedBreaks.length; d++)if ((!n(this.sessionVariables.newViewportMinimum) && this.sessionVariables.newViewportMinimum >= this.scaleBreaks._appliedBreaks[d].startValue || !n(this.options.minimum) && this.options.minimum >= this.scaleBreaks._appliedBreaks[d].startValue || !n(this.options.viewportMinimum) && this.viewportMinimum >= this.scaleBreaks._appliedBreaks[d].startValue) && (!n(this.sessionVariables.newViewportMaximum) && 1968 this.sessionVariables.newViewportMaximum <= this.scaleBreaks._appliedBreaks[d].endValue || !n(this.options.maximum) && this.options.maximum <= this.scaleBreaks._appliedBreaks[d].endValue || !n(this.options.viewportMaximum) && this.viewportMaximum <= this.scaleBreaks._appliedBreaks[d].endValue)) { this.scaleBreaks._appliedBreaks.splice(d, 1); break } "axisX" === this.type ? (b = null !== this.viewportMinimum ? this.viewportMinimum : this.dataInfo.viewPortMin, e = null !== this.viewportMaximum ? this.viewportMaximum : this.dataInfo.viewPortMax, 1969 1 === e / b && (d = Math.pow(this.logarithmBase, "undefined" === typeof this.options.interval ? 0.4 : this.options.interval), e *= d, b /= d), h = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : e / b > this.logarithmBase ? e / b * Math.pow(this.logarithmBase, 0.5) : this.logarithmBase) : "axisY" === this.type && (b = null !== this.viewportMinimum ? this.viewportMinimum : this.dataInfo.viewPortMin, e = null !== this.viewportMaximum ? this.viewportMaximum : this.dataInfo.viewPortMax, 0 >= b && !isFinite(e) ? (e = "undefined" === typeof this.options.interval ? 0 : 1970 this.options.interval, b = 1) : 0 >= b ? b = e : isFinite(e) || (e = b), 1 === b && 1 === e ? (e *= this.logarithmBase - 1 / this.logarithmBase, b = 1) : 1 === e / b ? (d = Math.min(e * Math.pow(this.logarithmBase, 0.01), Math.pow(this.logarithmBase, 5)), e *= d, b /= d) : b > e ? (d = Math.min(b / e * Math.pow(this.logarithmBase, 0.01), Math.pow(this.logarithmBase, 5)), 1 <= e ? b = e / d : e = b * d) : (d = Math.min(e / b * Math.pow(this.logarithmBase, 0.01), Math.pow(this.logarithmBase, 0.04)), 1 !== e && (e *= d), 1 !== b && (b /= d)), h = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : e / b > this.logarithmBase ? 1971 e / b * Math.pow(this.logarithmBase, 0.5) : this.logarithmBase, this.includeZero && (null === this.viewportMinimum || isNaN(this.viewportMinimum)) && 1 < b && (b = 1), this.includeZero && (null === this.viewportMaximum || isNaN(this.viewportMaximum)) && 1 > e && (e = 1)); d = (isNaN(this.viewportMaximum) || null === this.viewportMaximum ? e : this.viewportMaximum) / (isNaN(this.viewportMinimum) || null === this.viewportMinimum ? b : this.viewportMinimum); var l = (isNaN(this.viewportMaximum) || null === this.viewportMaximum ? e : this.viewportMaximum) - (isNaN(this.viewportMinimum) || 1972 null === this.viewportMinimum ? b : this.viewportMinimum); this.intervalType = "number"; d = Math.pow(this.logarithmBase, D.getNiceNumber(Math.abs(Math.log(d) / g), !1)); this.options && 0 < this.options.interval ? this.interval = this.options.interval : (this.interval = D.getNiceExponent(Math.log(d) / g / (a - 1), !0), c = D.getNiceNumber(l / (a - 1), !0)); if (null === this.viewportMinimum || isNaN(this.viewportMinimum)) this.viewportMinimum = "axisX" === this.type ? b / Math.sqrt(h) : Math.pow(this.logarithmBase, this.interval * Math.floor(Math.log(b) / g / this.interval)); 1973 if (null === this.viewportMaximum || isNaN(this.viewportMaximum)) this.viewportMaximum = "axisX" === this.type ? e * Math.sqrt(h) : Math.pow(this.logarithmBase, this.interval * Math.ceil(Math.log(e) / g / 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 && 1974 (this.interval = D.getNiceExponent(Math.ceil(Math.log(d) / g) / (a - 1)), c = D.getNiceNumber((this.viewportMaximum - this.viewportMinimum) / (a - 1), !0))); if (null === this.minimum || null === this.maximum) "axisX" === this.type ? (b = null !== this.minimum ? this.minimum : this.dataInfo.min, e = null !== this.maximum ? this.maximum : this.dataInfo.max, 1 === e / b && (d = Math.pow(this.logarithmBase, "undefined" === typeof this.options.interval ? 0.4 : this.options.interval), e *= d, b /= d), h = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : e / b > this.logarithmBase ? 1975 e / b * Math.pow(this.logarithmBase, 0.5) : this.logarithmBase) : "axisY" === this.type && (b = null !== this.minimum ? this.minimum : this.dataInfo.min, e = null !== this.maximum ? this.maximum : this.dataInfo.max, isFinite(b) || isFinite(e) ? 1 === b && 1 === e ? (e *= this.logarithmBase, b /= this.logarithmBase) : 1 === e / b ? (d = Math.pow(this.logarithmBase, this.interval), e *= d, b /= d) : b > e ? (d = Math.min(0.01 * (b / e), 5), 1 <= e ? b = e / d : e = b * d) : (d = Math.min(e / b * Math.pow(this.logarithmBase, 0.01), Math.pow(this.logarithmBase, 0.04)), 1 !== e && (e *= d), 1 !== b && (b /= d)) : (e = "undefined" === 1976 typeof this.options.interval ? 0 : this.options.interval, b = 1), h = Infinity !== this.dataInfo.minDiff ? this.dataInfo.minDiff : e / b > this.logarithmBase ? e / b * Math.pow(this.logarithmBase, 0.5) : this.logarithmBase, this.includeZero && (null === this.minimum || isNaN(this.minimum)) && 1 < b && (b = 1), this.includeZero && (null === this.maximum || isNaN(this.maximum)) && 1 > e && (e = 1)), this.intervalType = "number", null === this.minimum && (this.minimum = "axisX" === this.type ? b / Math.sqrt(h) : Math.pow(this.logarithmBase, this.interval * Math.floor(Math.log(b) / 1977 g / this.interval)), n(null === this.sessionVariables.viewportMinimum || isNaN(this.sessionVariables.viewportMinimum) ? "undefined" === typeof this.sessionVariables.newViewportMinimum ? Infinity : this.sessionVariables.newViewportMinimum : this.sessionVariables.viewportMinimum) || (this.minimum = Math.min(this.minimum, null === this.sessionVariables.viewportMinimum || isNaN(this.sessionVariables.viewportMinimum) ? "undefined" === typeof this.sessionVariables.newViewportMinimum ? Infinity : this.sessionVariables.newViewportMinimum : 1978 this.sessionVariables.viewportMinimum))), null === this.maximum && (this.maximum = "axisX" === this.type ? e * Math.sqrt(h) : Math.pow(this.logarithmBase, this.interval * Math.ceil(Math.log(e) / g / this.interval)), n(null === this.sessionVariables.viewportMaximum || isNaN(this.sessionVariables.viewportMaximum) ? "undefined" === typeof this.sessionVariables.newViewportMaximum ? 0 : this.sessionVariables.newViewportMaximum : this.sessionVariables.viewportMaximum) || (this.maximum = Math.max(this.maximum, null === this.sessionVariables.viewportMaximum || 1979 isNaN(this.sessionVariables.viewportMaximum) ? "undefined" === typeof this.sessionVariables.newViewportMaximum ? 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, 1980 this.maximum); this.viewportMinimum > this.viewportMaximum && (!this.options.viewportMinimum && !this.options.minimum || 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); b = 1981 Math.pow(this.logarithmBase, Math.floor(Math.log(this.viewportMinimum) / (g * this.interval) + 0.2) * this.interval); this.range = 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 (g = Math.floor(this.viewportMinimum / c + 0.5) * c; g < this.viewportMinimum;)g += c; this.equidistantInterval = !1; this.intervalStartPosition = g; this.interval = c } else this.options.interval || (c = Math.ceil(this.interval), this.range > this.interval && 1982 (this.interval = c, b = Math.pow(this.logarithmBase, Math.floor(Math.log(this.viewportMinimum) / (g * this.interval) + 0.2) * this.interval))), this.equidistantInterval = !0, this.intervalStartPosition = b; if (!this.valueFormatString && (this.valueFormatString = "#,##0.##", 1 > this.viewportMinimum)) { g = Math.floor(Math.abs(Math.log(this.viewportMinimum) / Math.LN10)) + 2; if (isNaN(g) || !isFinite(g)) g = 2; if (2 < g) for (d = 0; d < g - 2; d++)this.valueFormatString += "#" } 1983 }; D.generateValueFormatString = function (a, g) { 1984 var c = "#,##0.", b = g; 1 > a && (b += Math.floor(Math.abs(Math.log(a) / 1985 Math.LN10)), isNaN(b) || !isFinite(b)) && (b = g); for (var e = 0; e < b; e++)c += "#"; return c 1986 }; D.getNiceExponent = function (a, g) { var c = Math.floor(Math.log(a) / Math.LN10), b = a / Math.pow(10, c), b = 0 > c ? 1 >= b ? 1 : 5 >= b ? 5 : 10 : Math.max(Math.floor(b), 1); return -20 > c ? Number(b * Math.pow(10, c)) : Number((b * Math.pow(10, c)).toFixed(20)) }; D.getNiceNumber = function (a, g) { var c = Math.floor(Math.log(a) / Math.LN10), b = a / Math.pow(10, c), b = g ? 1.5 > b ? 1 : 3 > b ? 2 : 7 > b ? 5 : 10 : 1 >= b ? 1 : 2 >= b ? 2 : 5 >= b ? 5 : 10; return -20 > c ? Number(b * Math.pow(10, c)) : Number((b * Math.pow(10, c)).toFixed(20)) }; 1987 D.prototype.getLabelStartPoint = function () { 1988 var a = T[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) { if (0 < a.getSeconds() || 0 < a.getMilliseconds()) a.setMinutes(a.getMinutes() + 1), a.setSeconds(0), a.setMilliseconds(0) } else if ("hour" === this.intervalType) { 1989 if (0 < a.getMinutes() || 0 < a.getSeconds() || 1990 0 < a.getMilliseconds()) a.setHours(a.getHours() + 1), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0) 1991 } 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) { 1992 if (0 < 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), 1993 a.setSeconds(0), a.setMilliseconds(0) 1994 } 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() || 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), 1995 a.setSeconds(0), a.setMilliseconds(0)); return a 1996 }; qa(ea, Z); qa(ca, Z); ca.prototype.createUserOptions = function (a) { if ("undefined" !== typeof a || this.options._isPlaceholder) { var g = 0; this.parent.options._isPlaceholder && this.parent.createUserOptions(); this.options._isPlaceholder || (Ea(this.parent[this.optionsName]), g = this.parent.options[this.optionsName].indexOf(this.options)); this.options = "undefined" === typeof a ? {} : a; this.parent.options[this.optionsName][g] = this.options } }; ca.prototype.render = function (a) { 1997 if (0 !== 1998 this.spacing || 0 !== this.options.lineThickness && ("undefined" !== typeof this.options.lineThickness || 0 !== this.parent.lineThickness)) { 1999 var g = this.ctx, c = this.ctx.globalAlpha; this.ctx = a || this.ctx; 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(); var b = this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.startValue), e = this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.endValue); this.ctx.strokeStyle = 2000 this.lineColor; this.ctx.fillStyle = this.color; this.ctx.beginPath(); this.ctx.globalAlpha = 1;
2000 O(this.id); var d, l, n, t, k, m; a = Math.max(this.spacing, 3); var p = Math.max(0, this.lineThickness); this.ctx.lineWidth = p; this.ctx.setLineDash && this.ctx.setLineDash(H(this.lineDashType, p)); if ("bottom" === this.scaleBreaks.parent._position || "top" === this.scaleBreaks.parent._position) if (b = 1 === p % 2 ? (b.x << 0) + 0.5 : b.x << 0, l = 1 === p % 2 ? (e.x << 0) + 0.5 : e.x << 0, "top" === this.scaleBreaks.parent._position ? (e = this.chart.plotArea.y1, n = this.chart.plotArea.y2 + 2001 p / 2 + 0.5 << 0) : (e = this.chart.plotArea.y2, n = this.chart.plotArea.y1 - p / 2 + 0.5 << 0, a *= -1), this.bounds = { x1: b - p / 2, y1: e, x2: l + p / 2, y2: n }, this.ctx.moveTo(b, e), "straight" === this.type || "top" === this.scaleBreaks.parent._position && 0 >= a || "bottom" === this.scaleBreaks.parent._position && 0 <= a) this.ctx.lineTo(b, n), this.ctx.lineTo(l, n), this.ctx.lineTo(l, e); else if ("wavy" === this.type) { 2002 t = b; k = e; d = 0.5; m = (n - k) / a / 3; for (var q = 0; q < m; q++)this.ctx.bezierCurveTo(t + d * a, k + a, t + d * a, k + 2 * a, t, k + 3 * a), k += 3 * a, d *= -1; this.ctx.bezierCurveTo(t + d * a, 2003 k + a, t + d * a, k + 2 * a, t, k + 3 * a); t = l; d *= -1; this.ctx.lineTo(t, k); for (q = 0; q < m; q++)this.ctx.bezierCurveTo(t + d * a, k - a, t + d * a, k - 2 * a, t, k - 3 * a), k -= 3 * a, d *= -1 2004 } else { if ("zigzag" === this.type) { d = -1; k = e + a; t = b + a; m = (n - k) / a / 2; for (q = 0; q < m; q++)this.ctx.lineTo(t, k), t += 2 * d * a, k += 2 * a, d *= -1; this.ctx.lineTo(t, k); t += l - b; for (q = 0; q < m + 1; q++)this.ctx.lineTo(t, k), t += 2 * d * a, k -= 2 * a, d *= -1; this.ctx.lineTo(t + d * a, k + a) } } else if ("left" === this.scaleBreaks.parent._position || "right" === this.scaleBreaks.parent._position) if (e = 1 === p % 2 ? (e.y << 0) + 0.5 : e.y << 2005 0, n = 1 === p % 2 ? (b.y << 0) + 0.5 : b.y << 0, "left" === this.scaleBreaks.parent._position ? (b = this.chart.plotArea.x1, l = this.chart.plotArea.x2 + p / 2 + 0.5 << 0) : (b = this.chart.plotArea.x2, l = this.chart.plotArea.x1 - p / 2 + 0.5 << 0, a *= -1), this.bounds = { x1: b, y1: e - p / 2, x2: l, y2: n + p / 2 }, this.ctx.moveTo(b, e), "straight" === this.type || "left" === this.scaleBreaks.parent._position && 0 >= a || "right" === this.scaleBreaks.parent._position && 0 <= a) this.ctx.lineTo(l, e), this.ctx.lineTo(l, n), this.ctx.lineTo(b, n); else if ("wavy" === this.type) { 2006 t = b; k = e; d = 0.5; m = 2007 (l - t) / a / 3; for (q = 0; q < m; q++)this.ctx.bezierCurveTo(t + a, k + d * a, t + 2 * a, k + d * a, t + 3 * a, k), t += 3 * a, d *= -1; this.ctx.bezierCurveTo(t + a, k + d * a, t + 2 * a, k + d * a, t + 3 * a, k); k = n; d *= -1; this.ctx.lineTo(t, k); for (q = 0; q < m; q++)this.ctx.bezierCurveTo(t - a, k + d * a, t - 2 * a, k + d * a, t - 3 * a, k), t -= 3 * a, d *= -1 2008 } else if ("zigzag" === this.type) { d = 1; k = e - a; t = b + a; m = (l - t) / a / 2; for (q = 0; q < m; q++)this.ctx.lineTo(t, k), k += 2 * d * a, t += 2 * a, d *= -1; this.ctx.lineTo(t, k); k += n - e; for (q = 0; q < m + 1; q++)this.ctx.lineTo(t, k), k += 2 * d * a, t -= 2 * a, d *= -1; this.ctx.lineTo(t + a, k + d * a) } 0 < p && this.ctx.stroke(); 2009 this.ctx.closePath(); this.ctx.globalAlpha = this.fillOpacity; this.ctx.globalCompositeOperation = "destination-over"; this.ctx.fill(); this.ctx.restore(); this.ctx.globalAlpha = c; this.ctx = g 2010 } 2011 }; qa(P, Z); P.prototype.createUserOptions = function (a) { 2012 if ("undefined" !== typeof a || this.options._isPlaceholder) { 2013 var g = 0; this.parent.options._isPlaceholder && this.parent.createUserOptions(); this.options._isPlaceholder || (Ea(this.parent.stripLines), g = this.parent.options.stripLines.indexOf(this.options)); this.options = "undefined" === 2014 typeof a ? {} : a; this.parent.options.stripLines[g] = this.options 2015 } 2016 }; P.prototype.render = function () { 2017 this.ctx.save(); var a = this.parent.getPixelCoordinatesOnAxis(this.value), g = Math.abs("pixel" === this._thicknessType ? this.thickness : Math.abs(this.parent.convertValueToPixel(this.endValue) - this.parent.convertValueToPixel(this.startValue))); if (0 < g) { 2018 var c = null === this.opacity ? 1 : this.opacity; this.ctx.strokeStyle = this.color; this.ctx.beginPath(); var b = this.ctx.globalAlpha; this.ctx.globalAlpha = c;
2018 O(this.id); var e, d, l, 2019 n; this.ctx.lineWidth = g; this.ctx.setLineDash && this.ctx.setLineDash(H(this.lineDashType, g)); if ("bottom" === this.parent._position || "top" === this.parent._position) e = d = 1 === this.ctx.lineWidth % 2 ? (a.x << 0) + 0.5 : a.x << 0, l = this.chart.plotArea.y1, n = this.chart.plotArea.y2, this.bounds = { x1: e - g / 2, y1: l, x2: d + g / 2, y2: n }; else if ("left" === this.parent._position || "right" === this.parent._position) l = n = 1 === this.ctx.lineWidth % 2 ? (a.y << 0) + 0.5 : a.y << 0, e = this.chart.plotArea.x1, d = this.chart.plotArea.x2, this.bounds = { 2020 x1: e, y1: l - g / 2, x2: d, 2021 y2: n + g / 2 2022 }; this.ctx.moveTo(e, l); this.ctx.lineTo(d, n); this.ctx.stroke(); this.ctx.globalAlpha = b 2023 } this.ctx.restore() 2024 }; qa(da, Z); da.prototype.showAt = function (a) { 2025 if (!this.enabled) return !1; var g = this.chart, c = !1; g.resetOverlayedCanvas(); g.clearedOverlayedCanvas = this.parent.type; this.chart.renderCrosshairs(this.parent); if ("xySwapped" === g.plotInfo.axisPlacement) if ("bottom" === this.parent._position) for (var b = 0; b < g.axisY.length; b++)this.parent === g.axisY[b] && (g.axisY[b]._crosshairValue = a >= g.axisY[b].viewportMinimum && 2026 a <= g.axisY[b].viewportMaximum ? a : null); else if ("top" === this.parent._position) for (b = 0; b < g.axisY2.length; b++)this.parent === g.axisY2[b] && (g.axisY2[b]._crosshairValue = a >= g.axisY2[b].viewportMinimum && a <= g.axisY2[b].viewportMaximum ? a : null); else if ("left" === this.parent._position) for (b = 0; b < g.axisX.length; b++)this.parent === g.axisX[b] && (g.axisX[b]._crosshairValue = a >= g.axisX[b].viewportMinimum && a <= g.axisX[b].viewportMaximum ? a : null); else { 2027 if ("right" === this.parent._position) for (b = 0; b < g.axisX2.length; b++)this.parent === 2028 g.axisX2[b] && (g.axisX2[b]._crosshairValue = a >= g.axisX2[b].viewportMinimum && a <= g.axisX2[b].viewportMaximum ? a : null) 2029 } else if ("bottom" === this.parent._position) for (b = 0; b < g.axisX.length; b++)this.parent === g.axisX[b] && (g.axisX[b]._crosshairValue = a >= g.axisX[b].viewportMinimum && a <= g.axisX[b].viewportMaximum ? a : null); else if ("top" === this.parent._position) for (b = 0; b < g.axisX2.length; b++)this.parent === g.axisX2[b] && (g.axisX2[b]._crosshairValue = a >= g.axisX2[b].viewportMinimum && a <= g.axisX2[b].viewportMaximum ? a : null); 2030 else if ("left" === this.parent._position) for (b = 0; b < g.axisY.length; b++)this.parent === g.axisY[b] && (g.axisY[b]._crosshairValue = a >= g.axisY[b].viewportMinimum && a <= g.axisY[b].viewportMaximum ? a : null); else if ("right" === this.parent._position) for (b = 0; b < g.axisY2.length; b++)this.parent === g.axisY2[b] && (g.axisY2[b]._crosshairValue = a >= g.axisY2[b].viewportMinimum && a <= g.axisY2[b].viewportMaximum ? a : null); for (b = 0; b < g.axisX.length; b++)a = g.axisX[b]._crosshairValue, g.axisX[b].crosshair && (g.axisX[b].crosshair.enabled && !n(a) && 2031 a >= g.axisX[b].viewportMinimum && a <= g.axisX[b].viewportMaximum) && (g.axisX[b].showCrosshair(a), g.axisX[b].crosshair._updatedValue = a, this === g.axisX[b].crosshair && (c = !0)); for (b = 0; b < g.axisX2.length; b++)a = g.axisX2[b]._crosshairValue, g.axisX2[b].crosshair && (g.axisX2[b].crosshair.enabled && !n(a) && a >= g.axisX2[b].viewportMinimum && a <= g.axisX2[b].viewportMaximum) && (g.axisX2[b].showCrosshair(a), g.axisX2[b].crosshair._updatedValue = a, this === g.axisX2[b].crosshair && (c = !0)); for (b = 0; b < g.axisY.length; b++)a = g.axisY[b]._crosshairValue, 2032 g.axisY[b].crosshair && (g.axisY[b].crosshair.enabled && !n(a) && a >= g.axisY[b].viewportMinimum && a <= g.axisY[b].viewportMaximum) && (g.axisY[b].showCrosshair(a), g.axisY[b].crosshair._updatedValue = a, this === g.axisY[b].crosshair && (c = !0)); for (b = 0; b < g.axisY2.length; b++)a = g.axisY2[b]._crosshairValue, g.axisY2[b].crosshair && (g.axisY2[b].crosshair.enabled && !n(a) && a >= g.axisY2[b].viewportMinimum && a <= g.axisY2[b].viewportMaximum) && (g.axisY2[b].showCrosshair(a), g.axisY2[b].crosshair._updatedValue = a, this === g.axisY2[b].crosshair && 2033 (c = !0)); this.chart.toolTip && this.chart.toolTip._entries && this.chart.toolTip.highlightObjects(this.chart.toolTip._entries); return c 2034 }; da.prototype.hide = function () { this.chart.resetOverlayedCanvas(); this.chart.renderCrosshairs(this.parent); this._hidden = !0 }; da.prototype.render = function (a, g, c) { 2035 var b, e, d, l, t = null, v = null, k = null, m = ""; this.valueFormatString || ("dateTime" === this.parent.valueType ? this.valueFormatString = this.parent.valueFormatString : (k = 0, k = "xySwapped" === this.chart.plotInfo.axisPlacement ? 50 < this.parent.range ? 2036 0 : 500 < this.chart.width && 25 > this.parent.range ? 2 : Math.floor(Math.abs(Math.log(this.parent.range) / Math.LN10)) + (5 > this.parent.range ? 2 : 10 > this.parent.range ? 1 : 0) : 50 < this.parent.range ? 0 : Math.floor(Math.abs(Math.log(this.parent.range) / Math.LN10)) + (5 > this.parent.range ? 2 : 10 > this.parent.range ? 1 : 0), this.valueFormatString = D.generateValueFormatString(this.parent.range, k))); var p = null === this.opacity ? 1 : this.opacity, q = Math.abs("pixel" === this._thicknessType ? this.thickness : this.parent.conversionParameters.pixelPerUnit * 2037 this.thickness), f = this.chart.overlaidCanvasCtx, A = f.globalAlpha; f.beginPath(); f.strokeStyle = this.color; f.lineWidth = q; f.save(); this.labelFontSize = Math.abs(n(this.options.labelFontSize) ? this.parent.labelFontSize : this.labelFontSize); this.labelMaxWidth = n(this.options.labelMaxWidth) ? 0.3 * this.chart.width : this.labelMaxWidth; this.labelMaxHeight = n(this.options.labelWrap) || this.labelWrap ? 0.3 * this.chart.height : 2 * this.labelFontSize; 0 < q && f.setLineDash && f.setLineDash(H(this.lineDashType, q)); k = new ka(f, { 2038 x: 0, y: 0, 2039 padding: { top: 2, right: 3, bottom: 2, left: 4 }
2039, backgroundColor: this.labelBackgroundColor, borderColor: this.labelBorderColor, borderThickness: this.labelBorderThickness, cornerRadius: this.labelCornerRadius, maxWidth: this.labelMaxWidth, maxHeight: this.labelMaxHeight, angle: this.labelAngle, text: m, horizontalAlign: "left", fontSize: this.labelFontSize, fontFamily: this.labelFontFamily, fontWeight: this.labelFontWeight, fontColor: this.labelFontColor, fontStyle: this.labelFontStyle, textBaseline: "middle" 2040 }); if (this.snapToDataPoint) { 2041 var w = 2042 0, m = []; if ("xySwapped" === this.chart.plotInfo.axisPlacement) { 2043 var y = null; if ("bottom" === this.parent._position || "top" === this.parent._position) w = this.parent.dataSeries[0].axisX.convertPixelToValue({ y: g }); else if ("left" === this.parent._position || "right" === this.parent._position) w = this.parent.convertPixelToValue({ y: g }); for (var s = 0; s < this.parent.dataSeries.length; s++)(y = this.parent.dataSeries[s].getDataPointAtX(w, !0)) && 0 <= y.index && (y.dataSeries = this.parent.dataSeries[s], null !== y.dataPoint.y && y.dataSeries.visible && 2044 m.push(y)); y = null; if (0 === m.length) return; m.sort(function (a, b) { return a.distance - b.distance }); var z = y = 0; yPercent = cumulativeY = 0; for (var w = Infinity, u, s = 0; s < m.length; s++) { 2045 if ("rangeBar" === m[s].dataSeries.type || "error" === m[s].dataSeries.type) { if (m[s].dataPoint.y) for (var E = 0; E < m[s].dataPoint.y.length; E++)z = Math.abs(a - this.parent.convertValueToPixel(m[s].dataPoint.y[E])), z <= w && (w = z, y = s) } else "stackedBar" === m[s].dataSeries.type ? (cumulativeY = m[s].dataSeries.dataPointEOs[m[s].index].cumulativeY, z = Math.abs(a - 2046 this.parent.convertValueToPixel(cumulativeY)), z <= w && (w = z, y = s)) : "stackedBar100" === m[s].dataSeries.type ? (z = m[0].dataPoint.x.getTime ? m[0].dataPoint.x.getTime() : m[0].dataPoint.x, n(u) && (u = Math.abs(a - this.parent.convertValueToPixel(100 * (m[0].dataSeries.dataPointEOs[m[0].index].cumulativeY / m[0].dataSeries.plotUnit.dataPointYSums[z])))), cumulativeY = m[s].dataSeries.dataPointEOs[m[s].index].cumulativeY, z = m[s].dataPoint.x.getTime ? m[s].dataPoint.x.getTime() : m[s].dataPoint.x, yPercent = 100 * (cumulativeY / m[s].dataSeries.plotUnit.dataPointYSums[z]), 2047 z = Math.abs(a - this.parent.convertValueToPixel(yPercent)), z <= u && (u = z, y = s)) : (z = Math.abs(a - this.parent.convertValueToPixel(m[s].dataPoint.y)), z <= w && (w = z, y = s)); n(u) || (w = Math.min(w, u)) 2048 } u = m[y]; s = 0; if ("bottom" === this.parent._position || "top" === this.parent._position) { 2049 if ("rangeBar" === u.dataSeries.type || "error" === u.dataSeries.type) { 2050 w = Math.abs(a - this.parent.convertValueToPixel(u.dataPoint.y[0])); for (m = 0; m < u.dataPoint.y.length; m++)z = Math.abs(a - this.parent.convertValueToPixel(u.dataPoint.y[m])), z < w && (w = z, s = m); t = 2051 1 === f.lineWidth % 2 ? (this.parent.convertValueToPixel(u.dataPoint.y[s]) << 0) + 0.5 : this.parent.convertValueToPixel(u.dataPoint.y[s]) << 0; this.value = u.dataPoint.y[s]; k.text = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: u.dataPoint.y[s] }) : n(this.options.label) ? ga(n(c) ? u.dataPoint.y[s] : c, this.valueFormatString, this.chart._cultureInfo) : this.label 2052 } else "stackedBar" === u.dataSeries.type ? (w = Math.abs(a - this.parent.convertValueToPixel(m[0].dataPoint.y)), 2053 cumulativeY = u.dataSeries.dataPointEOs[u.
2053index].cumulativeY, t = 1 === f.lineWidth % 2 ? (this.parent.convertValueToPixel(cumulativeY) << 0) + 0.5 : this.parent.convertValueToPixel(cumulativeY) << 0, this.value = cumulativeY, k.text = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: cumulativeY }) : n(this.options.label) ? ga(n(c) ? cumulativeY : c, this.valueFormatString, this.chart._cultureInfo) : this.label) : "stackedBar100" === u.dataSeries.type ? (w = Math.abs(a - this.parent.convertValueToPixel(m[0].dataPoint.y)), 2054 cumulativeY = u.dataSeries.dataPointEOs[u.index].cumulativeY, z = u.dataPoint.x.getTime ? u.dataPoint.x.getTime() : u.dataPoint.x, yPercent = 100 * (cumulativeY / u.dataSeries.plotUnit.dataPointYSums[z]), t = 1 === f.lineWidth % 2 ? (this.parent.convertValueToPixel(yPercent) << 0) + 0.5 : this.parent.convertValueToPixel(yPercent) << 0, this.value = yPercent, k.text = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: yPercent }) : n(this.options.label) ? ga(n(c) ? yPercent : c, this.valueFormatString, 2055 this.chart._cultureInfo) : this.label) : (t = 1 === f.lineWidth % 2 ? (this.parent.convertValueToPixel(u.dataPoint.y) << 0) + 0.5 : this.parent.convertValueToPixel(u.dataPoint.y) << 0, this.value = u.dataPoint.y, k.text = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: u.dataPoint.y }) : n(this.options.label) ? ga(n(c) ? u.dataPoint.y : c, this.valueFormatString, this.chart._cultureInfo) : this.label); b = e = t; d = this.chart.plotArea.y1; l = this.chart.plotArea.y2; this.bounds = { 2056 x1: b - 2057 q / 2, y1: d, x2: e + q / 2, y2: l 2058 }; k.x = b - k.measureText().width / 2; k.x + k.width > this.chart.bounds.x2 ? k.x = this.chart.bounds.x2 - k.width : k.x < this.chart.bounds.x1 && (k.x = this.chart.bounds.x1); k.y = this.parent.lineCoordinates.y2 + ("top" === this.parent._position ? -k.height + this.parent.tickLength : k.fontSize / 2) + 2; k.y + k.height > this.chart.bounds.y2 ? k.y = this.chart.bounds.y2 - k.height : k.y < this.chart.bounds.y1 && (k.y = this.chart.bounds.y1) 2059 } else if ("left" === this.parent._position || "right" === this.parent._position) { 2060 d = l = v = 1 === f.lineWidth % 2061 2 ? (this.parent.convertValueToPixel(u.dataPoint.x) << 0) + 0.5 : this.parent.convertValueToPixel(u.dataPoint.x) << 0; b = this.chart.plotArea.x1; e = this.chart.plotArea.x2; this.bounds = { x1: b, y1: d - q / 2, x2: e, y2: l + q / 2 }; s = !1; if (this.parent.labels) for (w = Math.ceil(this.parent.interval), m = 0; m < this.parent.viewportMaximum; m += w)if (this.parent.labels[m]) s = !0; else { s = !1; break } if (s) { 2062 if ("axisX" === this.parent.type) for (w = this.parent.convertPixelToValue({ y: g }), y = null, s = 0; s < this.parent.dataSeries.length; s++)(y = this.parent.dataSeries[s].getDataPointAtX(w, 2063 !0)) && 0 <= y.index && (k.text = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: u.dataPoint.x }) : n(this.options.label) ? y.dataPoint.label : this.label) 2064 } else k.text = "dateTime" !== this.parent.valueType || this.parent.logarithmic ? this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: u.dataPoint.x }) : n(this.options.label) ? ga(u.dataPoint.x, this.valueFormatString, this.chart._cultureInfo) : this.label : 2065 this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: u.dataPoint.x }) : n(this.options.label) ? Da(u.dataPoint.x, this.valueFormatString, this.chart._cultureInfo) : this.label; this.value = u.dataPoint.x; k.y = l + k.fontSize / 2 - k.measureText().height / 2 + 2; k.y - k.fontSize / 2 < this.chart.bounds.y1 ? k.y = this.chart.bounds.y1 + k.fontSize / 2 + 2 : k.y + k.measureText().height - k.fontSize / 2 > this.chart.bounds.y2 && (k.y = this.chart.bounds.y2 - k.measureText().height + k.fontSize / 2); "left" === 2066 this.parent._position ? k.x = this.parent.lineCoordinates.x2 - k.measureText().width : "right" === this.parent._position && (k.x = this.parent.lineCoordinates.x2) 2067 } 2068 } else if ("bottom" === this.parent._position || "top" === this.parent._position) { 2069 w = this.parent.convertPixelToValue({ x: a }); for (s = 0; s < this.parent.dataSeries.length; s++)(y = this.parent.dataSeries[s].getDataPointAtX(w, !0)) && 0 <= y.index && (y.dataSeries = this.parent.dataSeries[s], null !== y.dataPoint.y && y.dataSeries.visible && m.push(y)); if (0 === m.length) return; m.sort(function (a, 2070 b) { return a.distance - b.distance }); u = m[0]; b = e = t = 1 === f.lineWidth % 2 ? (this.parent.convertValueToPixel(u.dataPoint.x) << 0) + 0.5 : this.parent.convertValueToPixel(u.dataPoint.x) << 0; d = this.chart.plotArea.y1; l = this.chart.plotArea.y2; this.bounds = { x1: b - q / 2, y1: d, x2: e + q / 2, y2: l }; s = !1; if (this.parent.labels) for (w = Math.ceil(this.parent.interval), m = 0; m < this.parent.viewportMaximum; m += w)if (this.parent.labels[m]) s = !0; else { s = !1; break } if (s) { 2071 if ("axisX" === this.parent.type) for (w = this.parent.convertPixelToValue({ x: a }), y = null, 2072 s = 0; s < this.parent.dataSeries.length; s++)(y = this.parent.dataSeries[s].getDataPointAtX(w, !0)) && 0 <= y.index && (k.text = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: u.dataPoint.x }) : n(this.options.label) ? y.dataPoint.label : this.label) 2073 } else k.text = "dateTime" !== this.parent.valueType || this.parent.logarithmic ? this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: u.dataPoint.x }) : n(this.options.label) ? 2074 ga(u.dataPoint.x, this.valueFormatString, this.chart._cultureInfo) : this.label : this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: u.dataPoint.x }) : n(this.options.label) ? Da(u.dataPoint.x, this.valueFormatString, this.chart._cultureInfo) : this.label; this.value = u.dataPoint.x; k.x = b - k.measureText().width / 2; k.x + k.width > this.chart.bounds.x2 && (k.x = this.chart.bounds.x2 - k.width); k.x < this.chart.bounds.x1 && (k.x = this.chart.bounds.x1); "bottom" === this.parent._position ? 2075 k.y = this.parent.lineCoordinates.y2 + k.fontSize / 2 + 2 : "top" === this.parent._position && (k.y = this.parent.lineCoordinates.y1 - k.height + k.fontSize / 2 + 2) 2076 } else if ("left" === this.parent._position || "right" === this.parent._position) { 2077 !n(this.parent.dataSeries
2077) && 0 < this.parent.dataSeries.length && (w = this.parent.dataSeries[0].axisX.convertPixelToValue({ x: a })); for (s = 0; s < this.parent.dataSeries.length; s++)(y = this.parent.dataSeries[s].getDataPointAtX(w, !0)) && 0 <= y.index && (y.dataSeries = this.parent.dataSeries[s], null !== y.dataPoint.y && 2078 y.dataSeries.visible && m.push(y)); if (0 === m.length) return; m.sort(function (a, b) { return a.distance - b.distance }); z = y = 0; w = Infinity; for (s = 0; s < m.length; s++) { 2079 if ("rangeColumn" === m[s].dataSeries.type || "rangeArea" === m[s].dataSeries.type || "error" === m[s].dataSeries.type || "rangeSplineArea" === m[s].dataSeries.type || "candlestick" === m[s].dataSeries.type || "ohlc" === m[s].dataSeries.type || "boxAndWhisker" === m[s].dataSeries.type) { 2080 if (m[s].dataPoint.y) for (E = 0; E < m[s].dataPoint.y.length; E++)z = Math.abs(g - this.parent.convertValueToPixel(m[s].dataPoint.y[E])), 2081 z <= w && (w = z, y = s) 2082 } else "stackedColumn" === m[s].dataSeries.type ? (b = m[s].dataSeries.dataPointEOs[m[s].index].cumulativeY, z = Math.abs(g - this.parent.convertValueToPixel(b)), z <= w && (w = z, y = s)) : "stackedArea" === m[s].dataSeries.type ? (b = m[s].dataSeries.dataPointEOs[m[s].index].cumulativeY, z = Math.abs(g - this.parent.convertValueToPixel(b)), z <= w && (w = z, y = s)) : "stackedColumn100" === m[s].dataSeries.type || "stackedArea100" === m[s].dataSeries.type ? (z = m[0].dataPoint.x.getTime ? m[0].dataPoint.x.getTime() : m[0].dataPoint.x, n(u) && 2083 (u = Math.abs(g - this.parent.convertValueToPixel(100 * (m[0].dataSeries.dataPointEOs[m[0].index].cumulativeY / m[0].dataSeries.plotUnit.dataPointYSums[z])))), "stackedColumn100" === m[s].dataSeries.type ? (v = m[s].dataSeries.dataPointEOs[m[s].index].cumulativeY, z = m[s].dataPoint.x.getTime ? m[s].dataPoint.x.getTime() : m[s].dataPoint.x, b = 100 * (v / m[s].dataSeries.plotUnit.dataPointYSums[z]), z = Math.abs(g - this.parent.convertValueToPixel(b)), z <= u && (u = z, y = s)) : "stackedArea100" === m[s].dataSeries.type && (v = m[s].dataSeries.dataPointEOs[m[s].index].cumulativeY, 2084 z = m[s].dataPoint.x.getTime ? m[s].dataPoint.x.getTime() : m[s].dataPoint.x, b = 100 * (v / m[s].dataSeries.plotUnit.dataPointYSums[z]), z = Math.abs(g - this.parent.convertValueToPixel(b)), z <= u && (u = z, y = s))) : "waterfall" === m[s].dataSeries.type ? (z = Math.abs(g - this.parent.convertValueToPixel(m[s].dataSeries.dataPointEOs[m[s].index].cumulativeSum)), z <= w && (u = w = z, y = s)) : (z = Math.abs(g - this.parent.convertValueToPixel(m[s].dataPoint.y)), z <= w && (w = z, y = s)); n(u) || (w = Math.min(w, u)) 2085 } u = m[y]; s = 0; if ("rangeColumn" === u.dataSeries.type || 2086 "rangeArea" === u.dataSeries.type || "error" === u.dataSeries.type || "rangeSplineArea" === u.dataSeries.type || "candlestick" === u.dataSeries.type || "ohlc" === u.dataSeries.type || "boxAndWhisker" === u.dataSeries.type) { 2087 w = Math.abs(g - this.parent.convertValueToPixel(u.dataPoint.y[0])); for (m = 0; m < u.dataPoint.y.length; m++)z = Math.abs(g - this.parent.convertValueToPixel(u.dataPoint.y[m])), z < w && (w = z, s = m); v = 1 === f.lineWidth % 2 ? (this.parent.convertValueToPixel(u.dataPoint.y[s]) << 0) + 0.5 : this.parent.convertValueToPixel(u.dataPoint.y[s]) << 2088 0; k.text = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: u.dataPoint.y[s] }) : n(this.options.label) ? ga(n(c) ? u.dataPoint.y[s] : c, this.valueFormatString, this.chart._cultureInfo) : this.label; this.value = u.dataPoint.y[s] 2089 } else "stackedColumn" === u.dataSeries.type ? (b = u.dataSeries.dataPointEOs[u.
2089index].cumulativeY, v = 1 === f.lineWidth % 2 ? (this.parent.convertValueToPixel(b) << 0) + 0.5 : this.parent.convertValueToPixel(b) << 0, k.text = this.labelFormatter ? this.labelFormatter({ 2090 chart: this.chart, 2091 axis: this.parent.options, crosshair: this.options, value: b 2092 }) : n(this.options.label) ? ga(n(c) ? b : c, this.valueFormatString, this.chart._cultureInfo) : this.label, this.value = b) : "stackedArea" === u.dataSeries.type ? (b = u.dataSeries.dataPointEOs[u.index].cumulativeY, v = 1 === f.lineWidth % 2 ? (this.parent.convertValueToPixel(b) << 0) + 0.5 : this.parent.convertValueToPixel(b) << 0, k.text = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: b }) : n(this.options.label) ? ga(n(c) ? 2093 b : c, this.valueFormatString, this.chart._cultureInfo) : this.label, this.value = b) : "stackedColumn100" === u.dataSeries.type ? (v = u.dataSeries.dataPointEOs[u.index].cumulativeY, z = u.dataPoint.x.getTime ? u.dataPoint.x.getTime() : u.dataPoint.x, b = 100 * (v / u.dataSeries.plotUnit.dataPointYSums[z]), v = 1 === f.lineWidth % 2 ? (this.parent.convertValueToPixel(b) << 0) + 0.5 : this.parent.convertValueToPixel(b) << 0, k.text = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: b }) : 2094 n(this.options.label) ? ga(n(c) ? b : c, this.valueFormatString, this.chart._cultureInfo) : this.label, this.value = b) : "stackedArea100" === u.dataSeries.type ? (v = u.dataSeries.dataPointEOs[u.index].cumulativeY, z = u.dataPoint.x.getTime ? u.dataPoint.x.getTime() : u.dataPoint.x, b = 100 * (v / u.dataSeries.plotUnit.dataPointYSums[z]), v = 1 === f.lineWidth % 2 ? (this.parent.convertValueToPixel(b) << 0) + 0.5 : this.parent.convertValueToPixel(b) << 0, k.text = this.labelFormatter ? this.labelFormatter({ 2095 chart: this.chart, axis: this.parent.options, crosshair: this.options, 2096 value: b 2097 }) : n(this.options.label) ? ga(n(c) ? b : c, this.valueFormatString, this.chart._cultureInfo) : this.label, this.value = b) : "waterfall" === u.dataSeries.type ? (v = 1 === f.lineWidth % 2 ? (this.parent.convertValueToPixel(u.dataSeries.dataPointEOs[u.index].cumulativeSum) << 0) + 0.5 : this.parent.convertValueToPixel(u.dataSeries.dataPointEOs[u.index].cumulativeSum) << 0, k.text = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: u.dataSeries.dataPointEOs[u.index].cumulativeSum }) : 2098 n(this.options.label) ? ga(n(c) ? u.dataSeries.dataPointEOs[u.index].cumulativeSum : c, this.valueFormatString, this.chart._cultureInfo) : this.label, this.value = u.dataSeries.dataPointEOs[u.index].cumulativeSum) : (v = 1 === f.lineWidth % 2 ? (n(a) ? g : this.parent.convertValueToPixel(u.dataPoint.y) << 0) + 0.5 : n(a) ? g : this.parent.convertValueToPixel(u.dataPoint.y) << 0, k.text = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: n(c) ? u.dataPoint.y : c }) : n(this.options.label) ? 2099 ga(n(c) ? u.dataPoint.y : c, this.valueFormatString, this.chart._cultureInfo) : this.label, this.value = u.dataPoint.y); d = l = v; b = this.chart.plotArea.x1; e = this.chart.plotArea.x2; this.bounds = { x1: b, y1: d - q / 2, x2: e, y2: l + q / 2 }; k.y = l + k.fontSize / 2 - k.measureText().height / 2 + 2; k.y - k.fontSize / 2 < this.chart.bounds.y1 ? k.y = this.chart.bounds.y1 + k.fontSize / 2 + 2 : k.y + k.measureText().height - k.fontSize / 2 > this.chart.bounds.y2 && (k.y = this.chart.bounds.y2 - k.measureText().height + k.fontSize / 2); "left" === this.parent._position ? k.x = this.parent.lineCoordinates.x2 - 2100 k.measureText().width : "right" === this.parent._position && (k.x = this.parent.lineCoordinates.x2) 2101 } m = null; f.globalAlpha = p; if ("bottom" === this.parent._position || "top" === this.parent._position) "top" === this.parent._position && k.y - k.fontSize / 2 < this.chart.bounds.y1 && (k.y = this.chart.bounds.y1 + k.fontSize / 2), "bottom" === this.parent._position && this.parent.lineCoordinates.y2 - k.fontSize / 2 + k.measureText().height > this.chart.bounds.y2 && (k.y = this.chart.bounds.y2 - k.height + k.fontSize / 2 + 2), this.value >= Math.min(this.parent.viewportMinimum, 2102 this.parent.viewportMaximum) && this.value <= Math.max(this.parent.viewportMinimum, this.parent.viewportMaximum) && 0 < q && (f.moveTo(b, d), f.lineTo(e, l), f.stroke(), this._hidden = !1); if ("left" === this.parent._position || "right" === this.parent._position) "left" === this.parent._position && k.x < this.chart.bounds.x1 && (k.x = this.chart.bounds.x1), "right" === this.parent._position && k.x + k.measureText().width > this.chart.bounds.x2 && (k.x = this.chart.bounds.x2 - k.measureText().width), this.value >= Math.min(this.parent.viewportMinimum, 2103 this.parent.viewportMaximum) && this.value <= Math.max(this.parent.viewportMinimum, this.parent.viewportMaximum) && 0 < q && (f.moveTo(b, d), f.lineTo(e, l), f.stroke(), this._hidden = !1) 2104 } else { 2105 if ("bottom" === this.parent._position || "top" === this.parent._position) b = e = t = 1 === f.lineWidth % 2 ? (a << 0) + 0.5 : a << 0, d = this.chart.plotArea.y1, l = this.chart.plotArea.y2, this.bounds = { x1: b - q / 2, y1: d, x2: e + q / 2, y2: l }; else if ("left" === this.parent._position || "right" === this.parent._position) d = l = v = 1 === f.lineWidth % 2 ? (g << 0) + 0.5 : g << 0, b = this.chart.plotArea.x1, 2106 e = this.chart.plotArea.x2, this.bounds = { x1: b, y1: d - q / 2, x2: e, y2: l + q / 2 }; if ("xySwapped" === this.chart.plotInfo.axisPlacement) if ("left" === this.parent._position || "right" === this.parent._position) { 2107 s = !1; if (this.parent.labels) for (w = Math.ceil(this.parent.interval), m = 0; m < this.parent.viewportMaximum; m += w)if (this.parent.labels[m]) s = !0; else { s = !1; break } if (s) { 2108 if ("axisX" === this.parent.type) for (w = this.parent.convertPixelToValue({ y: g }), y = null, s = 0; s < this.parent.dataSeries.length; s++)(y = this.parent.dataSeries[s].getDataPointAtX(w, 2109 !0)) && 0 <= y.index && (k.text = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: n(c) ? this.parent.convertPixelToValue(a) : c }) : n(this.options.label) ? y.dataPoint.label : this.label) 2110 } else k.text = "dateTime" !== this.parent.valueType || this.parent.logarithmic ? this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: n(c) ? this.parent.convertPixelToValue(g) : c }) : n(this.options.label) ? ga(n(c) ? this.parent.convertPixelToValue(g) : 2111 c, this.valueFormatString, this.chart._cultureInfo) : this.label : this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: n(c) ? this.parent.convertPixelToValue(g) : c }) : n(this.options.label) ? Da(n(c) ? this.parent.convertPixelToValue(g) : c, this.valueFormatString, this.chart._cultureInfo) : this.label; k.y = g + k.fontSize / 2 - k.measureText().height / 2 + 2; k.y - k.fontSize / 2 < this.chart.bounds.y1 ? k.y = this.chart.bounds.y1 + k.fontSize / 2 + 2 : k.y + k.measureText().height - k.fontSize / 2112 2 > this.chart.bounds.y2 && (k.y = this.chart.bounds.y2 - k.measureText().height + k.fontSize / 2); "left" === this.parent._position ? k.x = this.parent.lineCoordinates.x1 - k.measureText().width : "right" === this.parent._position && (k.x = this.parent.lineCoordinates.x2) 2113 } else { 2114 if ("bottom" === this.parent._position || "top" === this.parent._position) k.text = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: n(c) ? this.parent.convertPixelToValue(a) : c }) : n(this.options.label) ? 2115 ga(n(c) ? this.parent.convertPixelToValue(a) : c, this.valueFormatString, this.chart._cultureInfo) : this.label, k.x = b - k.measureText().width / 2, k.x + k.width > this.chart.bounds.x2 && (k.x = this.chart.bounds.x2 - k.width), k.x < this.chart.bounds.x1 && (k.x = this.chart.bounds.x1), "bottom" === this.parent._position ? k.y = this.parent.lineCoordinates.y2 + k.fontSize / 2 + 2 : "top" === this.parent._position && (k.y = this.parent.lineCoordinates.y1 - k.height + k.fontSize / 2 + 2) 2116 } else if ("bottom" === this.parent._position || "top" === this.parent._position) { 2117 s = 2118 !1; m = ""; if (this.parent.labels) for (w = Math.ceil(this.parent.interval), m = 0; m < this.parent.viewportMaximum; m += w)if (this.parent.labels[m]) s = !0; else { s = !1; break } if (s) { 2119 if ("axisX" === this.parent.type) for (w = this.parent.convertPixelToValue({ x: a }), y = null, s = 0; s < this.parent.dataSeries.length; s++)(y = this.parent.dataSeries[s].getDataPointAtX(w, !0)) && 0 <= y.index && (k.text = this.labelFormatter ? this.labelFormatter({ 2120 chart: this.chart, axis: this.parent.options, crosshair: this.options, value: n(c) ? this.parent.convertPixelToValue(a) : 2121 c 2122 }) : n(this.options.label) ? n(c) ? y.dataPoint.label : c : this.label) 2123 } else k.text = "dateTime" !== this.parent.valueType || this.parent.logarithmic ? this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: n(c) ? 0 < this.parent.dataSeries.length ? this.parent.convertPixelToValue(a) : "" : c }) : n(this.options.label) ? ga(n(c) ? this.parent.convertPixelToValue(a) : c, this.valueFormatString, this.chart._cultureInfo) : this.label : this.labelFormatter ? this.labelFormatter({ 2124 chart: this.chart, 2125 axis: this.parent.options, crosshair: this.options, value: n(c) ? this.parent.convertPixelToValue(a) : c 2126 }) : n(this.options.label) ? Da(n(c) ? this.parent.convertPixelToValue(a) : c, this.valueFormatString, this.chart._cultureInfo) : this.label; k.x = b - k.measureText().width / 2; k.x + k.width > this.chart.bounds.x2 && (k.x = this.chart.bounds.x2 - k.width); k.x < this.chart.bounds.x1 && (k.x = this.chart.bounds.x1); "bottom" === this.parent._position ? k.y = this.parent.lineCoordinates.y2 + k.fontSize / 2 + 2 : "top" === this.parent._position && (k.y = this.parent.lineCoordinates.y1 - 2127 k.height + k.fontSize / 2 + 2) 2128 } else if ("left" === this.parent._position || "right" === this.parent._position) k.text = this.labelFormatter ? this.labelFormatter({ chart: this.chart, axis: this.parent.options, crosshair: this.options, value: n(c) ? this.parent.convertPixelToValue(g) : c }) : n(this.options.label) ? ga(n(c) ? this.parent.convertPixelToValue(g) : c, this.valueFormatString, this.chart._cultureInfo) : this.label, k.y = g + k.fontSize / 2 - k.measureText().height / 2 + 2, k.y - k.fontSize / 2 < this.chart.bounds.y1 ? k.y = this.chart.bounds.y1 + k.fontSize / 2129 2 + 2 : k.y + k.measureText().height - k.fontSize / 2 > this.chart.bounds.y2 && (k.y = this.chart.bounds.y2 - k.measureText().height + k.fontSize / 2), "left" === this.parent._position ? k.x = this.parent.lineCoordinates.x2 - k.measureText().width : "right" === this.parent._position && (k.x = this.parent.lineCoordinates.x2); "left" === this.parent._position && k.x < this.chart.bounds.x1 ? k.x = this.chart.bounds.x1 : "right" === this.parent._position && k.x + k.measureText().width > this.chart.bounds.x2 ? k.x = this.chart.bounds.x2 - k.measureText().width : "to
2129p" === 2130 this.parent._position && k.y - k.fontSize / 2 < this.chart.bounds.y1 ? k.y = this.chart.bounds.y1 + k.fontSize / 2 : "bottom" === this.parent._position && this.parent.lineCoordinates.y2 - k.fontSize / 2 + k.measureText().height > this.chart.bounds.y2 && (k.y = this.chart.bounds.y2 - k.height + k.fontSize / 2 + 2); f.globalAlpha = p; 0 < q && (f.moveTo(b, d), f.lineTo(e, l), f.stroke(), this._hidden = !1); this.value = "bottom" === this.parent._position || "top" === this.parent._position ? this.parent.convertPixelToValue(a) : this.parent.convertPixelToValue(g) 2131 } if ("bottom" === 2132 this.parent._position || "top" === this.parent._position) this._updatedValue = this.parent.convertPixelToValue(t); if ("left" === this.parent._position || "right" === this.parent._position) this._updatedValue = this.parent.convertPixelToValue(v); this._textBlock = k; this._label = c; n(c) || this.renderLabel(); f.restore(); f.globalAlpha = A 2133 }; da.prototype.renderLabel = function () { 2134 this.value >= Math.min(this.parent.viewportMinimum, this.parent.viewportMaximum) && this.value <= Math.max(this.parent.viewportMinimum, this.parent.viewportMaximum) && 2135 (n(this._textBlock) || (n(this._textBlock.text) || !("number" === typeof this._textBlock.text.valueOf() || 0 < this._textBlock.text.length) || this._hidden) || this._textBlock.render(!0), n(this._label) && this.dispatchEvent("updated", { chart: this.chart, crosshair: this.options, axis: this.parent, value: this.value }, this.parent)) 2136 }; qa(oa, Z); oa.prototype._updateOptions = function () { 2137 this.updateOption("enabled"); this.updateOption("shared"); this.updateOption("animationEnabled"); this.updateOption("content"); this.updateOption("contentFormatter"); 2138 this.updateOption("reversed"); this.updateOption("backgroundColor"); this.updateOption("borderColor"); this.updateOption("borderThickness"); this.updateOption("cornerRadius"); this.updateOption("fontSize"); this.updateOption("fontColor"); this.updateOption("fontFamily"); this.updateOption("fontWeight"); this.updateOption("fontStyle") 2139 }; oa.prototype._initialize = function () { 2140 this.updateOption("updated"); this.updateOption("hidden"); if (this.enabled) { 2141 this.container = document.createElement("div"); this.container.setAttribute("class", 2142 "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.pointerEvents = "none"; this.container.style.display = "none"; var a = document.createElement("div"); a.style.width = "auto"; a.style.height = "auto"; a.style.minWidth = "50px"; a.style.lineHeight = "normal"; a.style.margin = "0px 0px 0px 0px"; a.style.padding = "5px"; a.style.fontFamily = "Calibri, Arial, Georgia, serif"; 2143 a.style.fontWeight = "normal"; a.style.fontStyle = v ? "italic" : "normal"; a.style.fontSize = "14px"; a.style.color = "#000000"; a.style.textShadow = "1px 1px 1px rgba(0, 0, 0, 0.1)"; a.style.textAlign = "left"; a.style.border = "2px solid gray"; a.style.background = v ? "rgba(255,255,255,.9)" : "rgb(255,255,255)"; a.style.textIndent = "0px"; a.style.whiteSpace = "nowrap"; a.style.borderRadius = "5px"; a.style.MozUserSelect = "none"; a.style.WebkitUserSelect = "none"; a.style.msUserSelect = "none"; a.style.userSelect = "none"; v || (a.style.filter = "alpha(opacity = 90)", 2144 a.style.filter = "progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#666666')"); a.innerText = "Sample Tooltip"; this.container.appendChild(a); this.contentDiv = this.container.firstChild; this.container.style.borderRadius = this.contentDiv.style.borderRadius; this.chart._canvasJSContainer.appendChild(this.container) 2145 } 2146 }; oa.prototype.mouseMoveHandler = function (a, g) { 2147 this._lastUpdated && 4 > (new Date).getTime() - this._lastUpdated || (this._lastUpdated = (new Date).getTime(), this.chart.resetOverlayedCanvas(), 2148 this._updateToolTip(a, g), this.enabled && (this._updatedEventParameters && !isNaN(this._prevX) && !isNaN(this._prevY)) && this.dispatchEvent("updated", this._updatedEventParameters, this)) 2149 }; oa.prototype._updateToolTip = function (a, g, c) { 2150 c = "undefined" === typeof c ? !0 : c; this._updateOptions(); this.container || this._initialize(); this.enabled || this.hide(); if (!this.chart.disableToolTip) { 2151 if ("undefined" === typeof a || "undefined" === typeof g) { if (isNaN(this._prevX) || isNaN(this._prevY)) return; a = this._prevX; g = this._prevY } else this._prevX = 2152 a, this._prevY = g; var b = null, e = null, d = [], l = 0; if (this.shared && this.enabled && "none" !== this.chart.plotInfo.axisPlacement) { 2153 var t = []; if (this.chart.axisX) for (var A = 0; A < this.chart.axisX.length; A++) { 2154 for (var l = "xySwapped" === this.chart.plotInfo.axisPlacement ? this.chart.axisX[A].convertPixelToValue({ y: g }) : this.chart.axisX[A].convertPixelToValue({ x: a }), k = null, b = 0; b < this.chart.axisX[A].dataSeries.length; b++)(k = this.chart.axisX[A].dataSeries[b].getDataPointAtX(l, c)) && 0 <= k.index && (k.dataSeries = this.chart.axisX[A].dataSeries[b], 2155 null !== k.dataPoint.y && k.dataSeries.visible && t.push(k)); k = null 2156 } if (this.chart.axisX2) for (A = 0; A < this.chart.axisX2.length; A++) { 2157 l = "xySwapped" === this.chart.plotInfo.axisPlacement ? this.chart.axisX2[A].convertPixelToValue({ y: g }) : this.chart.axisX2[A].convertPixelToValue({ x: a }); k = null; for (b = 0; b < this.chart.axisX2[A].dataSeries.length; b++)(k = this.chart.axisX2[A].dataSeries[b].getDataPointAtX(l, c)) && 0 <= k.index && (k.dataSeries = this.chart.axisX2[A].dataSeries[b], null !== k.dataPoint.y && k.dataSeries.visible && t.push(k)); 2158 k = null 2159 } if (0 === t.length) return; t.sort(function (a, b) { return a.dataSeries.axisX.logarithmic || b.dataSeries.axisX.logarithmic ? a.distance - b.distance : a.distance / a.dataSeries.axisX.range - b.distance / b.dataSeries.axisX.range }); c = t[0]; for (b = 0; b < t.length; b++)t[b].dataPoint.x.valueOf() === c.dataPoint.x.valueOf() && d.push(t[b]); t = null 2160 } else { 2161 if (b = this.chart.getDataPointAtXY(a, g, c)) this.currentDataPointIndex = b.dataPointIndex, this.currentSeriesIndex = b.dataSeries.index; else if (v) if (b = bb(a, g, this.chart._eventManager.ghostCtx), 2162 0 < b && "undefined" !== typeof this.chart._eventManager.objectMap[b]) { b = this.chart._eventManager.objectMap[b]; if ("legendItem" === b.objectType) return; this.currentSeriesIndex = b.dataSeriesIndex; this.currentDataPointIndex = 0 <= b.dataPointIndex ? b.dataPointIndex : -1 } else this.currentDataPointIndex = -1; else this.currentDataPointIndex = -1; if (0 <= this.currentSeriesIndex) { 2163 e = this.chart.data[this.currentSeriesIndex]; k = {}; if (0 <= this.currentDataPointIndex) b = e.dataPoints[this.currentDataPointIndex], k.dataSeries = e, k.dataPoint = 2164 b, k.index = this.currentDataPointIndex, k.distance = Math.abs(b.x - l), "w
2164aterfall" === e.type && (k.cumulativeSumYStartValue = e.dataPointEOs[this.currentDataPointIndex].cumulativeSumYStartValue, k.cumulativeSum = e.dataPointEOs[this.currentDataPointIndex].cumulativeSum); else if (this.enabled && e && ("line" === e.type || "stepLine" === e.type || "spline" === e.type || "area" === e.type || "stepArea" === e.type || "splineArea" === e.type || "stackedArea" === e.type || "stackedArea100" === e.type || "rangeArea" === e.type || "rangeSplineArea" === e.type || 2165 "candlestick" === e.type || "ohlc" === e.type || "boxAndWhisker" === e.type)) l = e.axisX.convertPixelToValue({ x: a }), k = e.getDataPointAtX(l, c), n(k) || (k.dataSeries = e, this.currentDataPointIndex = k.index, b = k.dataPoint); else { "toolTip" === this.chart.clearedOverlayedCanvas && (this.chart.resetOverlayedCanvas(), this.chart.clearedOverlayedCanvas = null); return } if (!n(k) && !n(k.dataPoint) && !n(k.dataPoint.y)) if (k.dataSeries.axisY) if (0 < k.dataPoint.y.length) { 2166 for (b = c = 0; b < k.dataPoint.y.length; b++)k.dataPoint.y[b] < k.dataSeries.axisY.viewportMinimum ? 2167 c-- : k.dataPoint.y[b] > k.dataSeries.axisY.viewportMaximum && c++; c < k.dataPoint.y.length && c > -k.dataPoint.y.length && d.push(k) 2168 } else "column" === e.type || "bar" === e.type ? 0 > k.dataPoint.y ? 0 > k.dataSeries.axisY.viewportMinimum && k.dataSeries.axisY.viewportMaximum >= k.dataPoint.y && d.push(k) : k.dataSeries.axisY.viewportMinimum <= k.dataPoint.y && 0 <= k.dataSeries.axisY.viewportMaximum && d.push(k) : "bubble" === e.type ? (c = this.chart._eventManager.objectMap[e.dataPointIds[k.index]].size / 2, k.dataPoint.y >= k.dataSeries.axisY.viewportMinimum - 2169 c && k.dataPoint.y <= k.dataSeries.axisY.viewportMaximum + c && d.push(k)) : "waterfall" === e.type ? (c = 0, k.cumulativeSumYStartValue < k.dataSeries.axisY.viewportMinimum ? c-- : k.cumulativeSumYStartValue > k.dataSeries.axisY.viewportMaximum && c++, k.cumulativeSum < k.dataSeries.axisY.viewportMinimum ? c-- : k.cumulativeSum > k.dataSeries.axisY.viewportMaximum && c++, 2 > c && -2 < c && d.push(k)) : (0 <= k.dataSeries.type.indexOf("100") || "stackedColumn" === e.type || "stackedBar" === e.type || k.dataPoint.y >= k.dataSeries.axisY.viewportMinimum && k.dataPoint.y <= 2170 k.dataSeries.axisY.viewportMaximum) && d.push(k); else d.push(k) 2171 } 2172 } if (0 < d.length) { 2173 if (this.highlightObjects(d), this.enabled) { 2174 c = ""; c = this.getToolTipInnerHTML({ entries: d }); if (null !== c) { 2175 this.contentDiv.innerHTML = c; if (this.isToolTipDefinedInData && n(this.options.content) && n(this.options.contentFormatter)) for (l = this.contentDiv.getElementsByTagName("span"), b = 0; b < l.length; b++)l[b] && (l[b].style.color = l[b].getAttribute("data-color")); l = !1; "none" === this.container.style.display && (l = !0, this.container.style.display = 2176 "block"); try { 2177 this.contentDiv.style.background = this.backgroundColor ? this.backgroundColor : v ? "rgba(255,255,255,.9)" : "rgb(255,255,255)", this.borderColor = "waterfall" === d[0].dataSeries.type ? this.contentDiv.style.borderRightColor = this.contentDiv.style.borderLeftColor = this.contentDiv.style.borderColor = this.options.borderColor ? this.options.borderColor : d[0].dataPoint.color ? d[0].dataPoint.color : 0 < d[0].dataPoint.y ? d[0].dataSeries.risingColor : d[0].dataSeries.fallingColor : "error" === d[0].dataSeries.type ? this.contentDiv.style.borderRightColor = 2178 this.contentDiv.style.borderLeftColor = this.contentDiv.style.borderColor = this.options.borderColor ? this.options.borderColor : d[0].dataSeries.color ? d[0].dataSeries.color : d[0].dataSeries._colorSet[e.index % d[0].dataSeries._colorSet.length] : this.contentDiv.style.borderRightColor = this.contentDiv.style.borderLeftColor = this.contentDiv.style.borderColor = this.options.borderColor ? this.options.borderColor : d[0].dataPoint.color ? d[0].dataPoint.color : d[0].dataSeries.color ? d[0].dataSeries.color : d[0].dataSeries._colorSet[d[0].index % 2179 d[0].dataSeries._colorSet.length], this.contentDiv.style.borderWidth = this.borderThickness || 0 === this.borderThickness ? this.borderThickness + "px" : "2px", this.contentDiv.style.borderRadius = 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 = 2180 this.fontFamily ? this.fontFamily : "Calibri, Arial, Georgia, serif;", this.contentDiv.style.fontWeight = this.fontWeight ? this.fontWeight : "normal", this.contentDiv.style.fontStyle = this.fontStyle ? this.fontStyle : v ? "italic" : "normal" 2181 } catch (m) { } "pie" === d[0].dataSeries.type || "doughnut" === d[0].dataSeries.type || "funnel" === d[0].dataSeries.type || "pyramid" === d[0].dataSeries.type || "bar" === d[0].dataSeries.type || "rangeBar" === d[0].dataSeries.type || "stackedBar" === d[0].dataSeries.type || "stackedBar100" === d[0].dataSeries.type ? 2182 a = a - 10 - this.container.clientWidth : (a = d[0].dataSeries.axisX.convertValueToPixel(
2182d[0].dataPoint.x) - this.container.clientWidth << 0, a -= 10); 0 > a && (a += this.container.clientWidth + 20); a + this.container.clientWidth > 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)); g = 1 !== d.length || this.shared || "line" !== d[0].dataSeries.type && "stepLine" !== d[0].dataSeries.type && "spline" !== d[0].dataSeries.type && "area" !== 2183 d[0].dataSeries.type && "stepArea" !== d[0].dataSeries.type && "splineArea" !== d[0].dataSeries.type ? "bar" === d[0].dataSeries.type || "rangeBar" === d[0].dataSeries.type || "stackedBar" === d[0].dataSeries.type || "stackedBar100" === d[0].dataSeries.type ? d[0].dataSeries.axisX.convertValueToPixel(d[0].dataPoint.x) : g : d[0].dataSeries.axisY.convertValueToPixel(d[0].dataPoint.y); g = -g + 10; 0 < g + this.container.clientHeight + 5 && (g -= g + this.container.clientHeight + 5 - 0); this.fixMozTransitionDelay(a, g); !this.animationEnabled || l ? this.disableAnimation() : 2184 (this.enableAnimation(), this.container.style.MozTransition = this.mozContainerTransition); this.positionLeft = a; this.positionBottom = g; this.container.style.left = a + "px"; this.container.style.bottom = g + "px" 2185 } else this.hide(!1), this.enabled && this.dispatchEvent("hidden", { chart: this.chart, toolTip: this }, this); g = []; for (b = 0; b < d.length; b++)g.push({ xValue: d[b].dataPoint.x, dataPoint: d[b].dataPoint, dataSeries: d[b].dataSeries, dataPointIndex: d[b].index, dataSeriesIndex: d[b].dataSeries._index }); this._updatedEventParameters = 2186 { chart: this.chart, toolTip: this.options, content: c, entries: g }; this._entries = d 2187 } 2188 } else this.hide(), this.enabled && this.dispatchEvent("hidden", { chart: this.chart, toolTip: this }, this); this._dataSeriesIndex = this._xValue = null 2189 } 2190 }; oa.prototype.highlightObjects = function (a) { 2191 var g = this.chart.overlaidCanvasCtx; n(this.chart.clearedOverlayedCanvas) || "toolTip" === this.chart.clearedOverlayedCanvas ? (this.chart.resetOverlayedCanvas(), g.clearRect(0, 0, this.chart.width, this.chart.height), this.chart.clearedOverlayedCanvas = "toolTip") : 2192 this.chart.clearedOverlayedCanvas = null; g.save(); var c = this.chart.plotArea, b = 0; g.beginPath(); g.rect(c.x1, c.y1, c.x2 - c.x1, c.y2 - c.y1); g.clip(); for (c = 0; c < a.length; c++) { 2193 var e = a[c]; if ((e = this.chart._eventManager.objectMap[e.dataSeries.dataPointIds[e.index]]) && e.objectType && "dataPoint" === e.objectType) { 2194 var b = this.chart.data[e.dataSeriesIndex], d = b.dataPoints[e.dataPointIndex], l = e.dataPointIndex; !1 === d.highlightEnabled || !0 !== b.highlightEnabled && !0 !== d.highlightEnabled || ("line" === b.type || "stepLine" === b.type || 2195 "spline" === b.type || "scatter" === b.type || "area" === b.type || "stepArea" === b.type || "splineArea" === b.type || "stackedArea" === b.type || "stackedArea100" === b.type || "rangeArea" === b.type || "rangeSplineArea" === b.type ? (d = b.getMarkerProperties(l, e.x1, e.y1, this.chart.overlaidCanvasCtx), d.size = Math.max(1.5 * d.size << 0, 10), d.borderColor = d.borderColor || "#FFFFFF", d.borderThickness = d.borderThickness || Math.ceil(0.1 * d.size), Y.drawMarkers([d]), "undefined" !== typeof e.y2 && (d = b.getMarkerProperties(l, e.x1, e.y2, this.chart.overlaidCanvasCtx), 2196 d.size = Math.max(1.5 * d.size << 0, 10), d.borderColor = d.borderColor || "#FFFFFF", d.borderThickness = d.borderThickness || Math.ceil(0.1 * d.size), Y.drawMarkers([d]))) : "bubble" === b.type ? (d = b.getMarkerProperties(l, e.x1, e.y1, this.chart.overlaidCanvasCtx), d.size = e.size, d.color = "white", d.borderColor = "white", g.globalAlpha = 0.3, Y.drawMarkers([d]), g.globalAlpha = 1) : "column" === b.type || "stackedColumn" === b.type || "stackedColumn100" === b.type || "bar" === b.type || "rangeBar" === b.type || "stackedBar" === b.type || "stackedBar100" === b.type || 2197 "rangeColumn" === b.type || "waterfall" === b.type ? ba(g, e.x1, e.y1, e.x2, e.y2, "white", 0, null, !1, !1, !1, !1, 0.3) : "pie" === b.type || "doughnut" === b.type ? ja(g, e.center, e.radius, "white", b.type, e.startAngle, e.endAngle, 0.3, e.percentInnerRadius) : "funnel" === b.type || "pyramid" === b.type ? ra(g, e.funnelSection, 0.3, "white") : "candlestick" === b.type ? (g.globalAlpha = 1, g.strokeStyle = e.color, g.lineWidth = 2 * e.borderThickness, b = 0 === g.lineWidth % 2 ? 0 : 0.5, g.beginPath(), g.moveTo(e.x3 - b, Math.min(e.y2, e.y3)), g.lineTo(e.x3 - b, Math.min(e.y1, e.y4)), 2198 g.stroke(), g.beginPath(), g.moveTo(e.x3 - b, Math.max(e.y1, e.y4)), g.lineTo(e.x3 - b, Math.max(e.y2, e.y3)), g.stroke(), ba(g, e.x1, Math.min(e.y1, e.y4), e.x2, Math.max(e.y1, e.y4), "transparent", 2 * e.borderThickness, e.color, !1, !1, !1, !1), g.globalAlpha = 1) : "ohlc" === b.type ? (g.globalAlpha = 1, g.strokeStyle = e.color, g.lineWidth = 2 * e.borderThickness, b = 0 === g.lineWidth % 2 ? 0 : 0.5, g.beginPath(), g.moveTo(e.x3 - b, e.y2), g.lineTo(e.x3 - b, e.y3), g.stroke(), g.beginPath(), g.moveTo(e.x3, e.y1), g.lineTo(e.x1, e.y1), g.stroke(), g.beginPath(), g.moveTo(e.x3, 2199 e.y4), g.lineTo(e.x2, e.y4), g.stroke(), g.globalAlpha = 1) : "boxAndWhisker" === b.type ? (g.save(), g.globalAlpha = 1, g.strokeStyle = e.stemColor, g.lineWidth = 2 * e.
2199stemThickness, 0 < e.stemThickness && (g.beginPath(), g.moveTo(e.x3, e.y2 + e.borderThickness / 2), g.lineTo(e.x3, e.y1 + e.whiskerThickness / 2), g.stroke(), g.beginPath(), g.moveTo(e.x3, e.y4 - e.whiskerThickness / 2), g.lineTo(e.x3, e.y3 - e.borderThickness / 2), g.stroke()), g.beginPath(), ba(g, e.x1, Math.max(e.y2, e.y3), e.x2, Math.min(e.y2, e.y3), "transparent", 2 * e.borderThickness, e.color, 2200 !1, !1, !1, !1), g.globalAlpha = 1, g.strokeStyle = e.whiskerColor, g.lineWidth = 2 * e.whiskerThickness, 0 < e.whiskerThickness && (g.beginPath(), g.moveTo(Math.floor(e.x3 - e.whiskerLength / 2), e.y4), g.lineTo(Math.ceil(e.x3 + e.whiskerLength / 2), e.y4), g.stroke(), g.beginPath(), g.moveTo(Math.floor(e.x3 - e.whiskerLength / 2), e.y1), g.lineTo(Math.ceil(e.x3 + e.whiskerLength / 2), e.y1), g.stroke()), g.globalAlpha = 1, g.strokeStyle = e.lineColor, g.lineWidth = 2 * e.lineThickness, 0 < e.lineThickness && (g.beginPath(), g.moveTo(e.x1, e.y5), g.lineTo(e.x2, 2201 e.y5), g.stroke()), g.restore(), g.globalAlpha = 1) : "error" === b.type && A(g, e.x1, e.y1, e.x2, e.y2, "white", e.whiskerProperties, e.stemProperties, e.isXYSwapped, 0.3)) 2202 } 2203 } g.restore(); g.globalAlpha = 1; g.beginPath() 2204 }; oa.prototype.getToolTipInnerHTML = function (a) { 2205 a = a.entries; var d = null, c = null, b = null, e = 0, h = ""; this.isToolTipDefinedInData = !0; for (var l = 0; l < a.length; l++)if (a[l].dataSeries.toolTipContent || a[l].dataPoint.toolTipContent) { this.isToolTipDefinedInData = !1; break } if (this.isToolTipDefinedInData && (this.content && "function" === 2206 typeof this.content || this.contentFormatter)) a = { chart: this.chart, toolTip: this.options, entries: a }, d = this.contentFormatter ? this.contentFormatter(a) : this.content(a); else if (this.shared && "none" !== this.chart.plotInfo.axisPlacement) { 2207 for (var n = null, t = "", l = 0; l < a.length; l++) { 2208 c = a[l].dataSeries; b = a[l].dataPoint; e = a[l].index; h = ""; if (0 === l && this.isToolTipDefinedInData && !this.content) { 2209 this.chart.axisX && 0 < this.chart.axisX.length ? t += "undefined" !== typeof this.chart.axisX[0].labels[b.x] ? this.chart.axisX[0].labels[b.x] : 2210 "{x}" : this.chart.axisX2 && 0 < this.chart.axisX2.length && (t += "undefined" !== typeof this.chart.axisX2[0].labels[b.x] ? this.chart.axisX2[0].labels[b.x] : "{x}"); t += "</br>"; if (!c.visible) continue; t = this.chart.replaceKeywordsWithValue(t, b, c, e) 2211 } null === b.toolTipContent || "undefined" === typeof b.toolTipContent && null === c.options.toolTipContent || ("line" === c.type || "stepLine" === c.type || "spline" === c.type || "area" === c.type || "stepArea" === c.type || "splineArea" === c.type || "column" === c.type || "bar" === c.type || "scatter" === c.type || 2212 "stackedColumn" === c.type || "stackedColumn100" === c.type || "stackedBar" === c.type || "stackedBar100" === c.type || "stackedArea" === c.type || "stackedArea100" === c.type || "waterfall" === c.type ? (this.chart.axisX && 1 < this.chart.axisX.length && (h += n != c.axisXIndex ? c.axisX.title ? c.axisX.title + "<br/>" : "X:{axisXIndex}<br/>" : ""), h += b.toolTipContent ? b.toolTipContent : c.toolTipContent ? c.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span data-color='\"" + (this.options.fontColor ? "" : "'{color}'") + "\"'>{name}:</span> {y}", 2213 n = c.axisXIndex) : "bubble" === c.type ? (this.chart.axisX && 1 < this.chart.axisX.length && (h += n != c.axisXIndex ? c.axisX.title ? c.axisX.title + "<br/>" : "X:{axisXIndex}<br/>" : ""), h += b.toolTipContent ? b.toolTipContent : c.toolTipContent ? c.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span data-color='\"" + (this.options.fontColor ? "" : "'{color}'") + "\"'>{name}:</span> {y}, {z}") : "rangeColumn" === c.type || "rangeBar" === c.type || "rangeArea" === c.type || "rangeSplineArea" === c.type || 2214 "error" === c.type ? (this.chart.axisX && 1 < this.chart.axisX.length && (h += n != c.axisXIndex ? c.axisX.title ? c.axisX.title + "<br/>" : "X:{axisXIndex}<br/>" : ""), h += b.toolTipContent ? b.toolTipContent : c.toolTipContent ? c.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span data-color='\"" + (this.options.fontColor ? "" : "'{color}'") + "\"'>{name}:</span> {y[0]}, {y[1]}") : "candlestick" === c.type || "ohlc" === c.type ? (this.chart.axisX && 1 < this.chart.axisX.length && (h += n != c.axisXIndex ? c.axisX.title ? 2215 c.axisX.title + "<br/>" : "X:{axisXIndex}<br/>" : ""), h += b.toolTipContent ? b.toolTipContent : c.toolTipContent ? c.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span data-color='\"" + (this.options.fontColor ? "" : "'{color}'") + "\"'>{name}:</span><br/>Open: {y[0]}<br/>High: {y[1]}<br/>Low: {y[2]}<br/>Close: {y[3]}") : "boxAndWhisker" === c.type && (this.chart.axisX && 1 < this.chart.axisX.length && (h += n != c.axisXIndex ? c.axisX.title ? c.axisX.title + 2216 "<br/>" : "X:{axisXIndex}<br/>" : ""), h += b.toolTipContent ? b.toolTipContent : c.toolTipContent ? c.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span data-color='\"" + (this.options.fontColor ? "" : "'{color}'") + "\"'>{name}:</span><br/>Minimum: {y[0]}<br/>Q1: {y[1]}<br/>Q2: {y[4]}<br/>Q3: {y[2]}<br/>Maximum: {y[3]}"), 2217 null === d && (d = ""), c.visible && (!0 === this.reversed ? (d = this.chart.replaceKeywordsWithValue(h, b, c, e) + d, l < a.length - 1 && (d = "</br>" + d)) : (d += this.chart.replaceKeywordsWithValue(h, b, c, e), l < a.length - 1 && (d += "</br>")))) 2218 } null !== d && (d = t + d) 2219 } else { 2220 c = a[0].dataSeries; b = a[0].dataPoint; e = a[0].index; if (null === b.toolTipContent || "undefined" === typeof b.toolTipContent && null === c.options.toolTipContent) return null; "line" === c.type || "stepLine" === c.type || "spline" === c.type || "area" === c.type || "stepArea" === c.type || "splineArea" === c.type || 2221 "column" === c.type || "bar" === c.type || "scatter" === c.type || "stackedColumn" === c.type || "stackedColumn100" === c.type || "stackedBar" === c.type || "stackedBar100" === c.type || "stackedArea" === c.type || "stackedArea100" === c.type || "waterfall" === c.type ? h = b.toolTipContent ? b.toolTipContent : c.toolTipContent ? c.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span data-color='\"" + (this.options.fontColor ? "" : "'{color}'") + "\"'>" + (b.label ? "{label}" : "{x}
2221") + ":</span> {y}" : "bubble" === c.type ? 2222 h = b.toolTipContent ? b.toolTipContent : c.toolTipContent ? c.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span data-color='\"" + (this.options.fontColor ? "" : "'{color}'") + "\"'>" + (b.label ? "{label}" : "{x}") + ":</span> {y}, {z}" : "pie" === c.type || "doughnut" === c.type || "funnel" === c.type || "pyramid" === c.type ? h = b.toolTipContent ? b.toolTipContent : c.toolTipContent ? c.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span data-color='\"" + (this.options.fontColor ? 2223 "" : "'{color}'") + "\"'>" + (b.name ? "{name}:</span> " : b.label ? "{label}:</span> " : "</span>") + "{y}" : "rangeColumn" === c.type || "rangeBar" === c.type || "rangeArea" === c.type || "rangeSplineArea" === c.type || "error" === c.type ? h = b.toolTipContent ? b.toolTipContent : c.toolTipContent ? c.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span data-color='\"" + (this.options.fontColor ? "" : "'{color}'") + "\"'>" + (b.label ? "{label}" : "{x}") + " :</span> {y[0]}, {y[1]}" : "candlestick" === 2224 c.type || "ohlc" === c.type ? h = b.toolTipContent ? b.toolTipContent : c.toolTipContent ? c.toolTipContent : this.content && "function" !== typeof this.content ? this.content : "<span data-color='\"" + (this.options.fontColor ? "" : "'{color}'") + "\"'>" + (b.label ? "{label}" : "{x}") + "</span><br/>Open: {y[0]}<br/>High: {y[1]}<br/>Low: {y[2]}<br/>Close: {y[3]}" : "boxAndWhisker" === c.type && (h = b.toolTipContent ? b.toolTipContent : c.toolTipContent ? c.toolTipContent : this.content && 2225 "function" !== typeof this.content ? this.content : "<span data-color='\"" + (this.options.fontColor ? "" : "'{color}'") + "\"'>" + (b.label ? "{label}" : "{x}") + "</span><br/>Minimum: {y[0]}<br/>Q1: {y[1]}<br/>Q2: {y[4]}<br/>Q3: {y[2]}<br/>Maximum: {y[3]}"); null === d && (d = ""); d += this.chart.replaceKeywordsWithValue(h, 2226 b, c, e) 2227 } return d 2228 }; oa.prototype.enableAnimation = function () { if (!this.container.style.WebkitTransition) { var a = this.getContainerTransition(this.containerTransitionDuration); this.container.style.WebkitTransition = a; this.container.style.MsTransition = a; this.container.style.transition = a; this.container.style.MozTransition = this.mozContainerTransition } }; oa.prototype.disableAnimation = function () { 2229 this.container.style.WebkitTransition && (this.container.style.WebkitTransition = "", this.container.style.MozTransition = "", 2230 this.container.style.MsTransition = "", this.container.style.transition = "") 2231 }; oa.prototype.hide = function (a) { this.container && (this.container.style.display = "none", this.currentSeriesIndex = -1, this._entries = this._dataSeriesIndex = this._xValue = null, this._prevY = this._prevX = NaN, this._updatedEventParameters = null, ("undefined" === typeof a || a) && this.chart.resetOverlayedCanvas()) }; oa.prototype.show = function (a, d, c) { this._updateToolTip(a, d, "undefined" === typeof c ? !1 : c) }; oa.prototype.showAtIndex = function (a, d) { }; oa.prototype.showAtX = 2232 function (a, d) { 2233 if (!this.enabled) return !1; this.chart.clearedOverlayedCanvas = null; this._updateOptions(); var c, b, e, h = []; e = !1; d = !n(d) && 0 <= d && d < this.chart.data.length ? d : 0; if (this.shared) for (var l = 0; l < this.chart.data.length; l++)c = this.chart.data[l], (b = c.getDataPointAtX(a, !1)) && (b.dataPoint && !n(b.dataPoint.y) && c.visible) && (b.dataSeries = c, this.chart.data[d].axisX.convertValueToPixel(a) === c.axisX.convertValueToPixel(b.dataPoint.x) && h.push(b)); else c = this.chart.data[d], (b = c.getDataPointAtX(a, !1)) && (b.dataPoint && 2234 !n(b.dataPoint.y) && c.visible) && (b.dataSeries = c, h.push(b)); if (0 < h.length) { 2235 for (l = 0; l < h.length; l++)if (b = h[l], (this.shared || 0 <= b.dataSeries.type.indexOf("100")) && b.dataPoint.x >= b.dataSeries.axisX.viewportMinimum && b.dataPoint.x <= b.dataSeries.axisX.viewportMaximum) { e = !1; break } else if (b.dataPoint.x < b.dataSeries.axisX.viewportMinimum || b.dataPoint.x > b.dataSeries.axisX.viewportMaximum || b.dataPoint.y < b.dataSeries.axisY.viewportMinimum || b.dataPoint.y > b.dataSeries.axisY.viewportMaximum) e = !0; else { e = !1; break } if (e) return this.hide(), 2236 !1; this.highlightObjects(h); this._entries = h; l = ""; l = this.getToolTipInnerHTML({ entries: h }); if (null !== l) { 2237 this.contentDiv.innerHTML = l; if (this.isToolTipDefinedInData && n(this.options.content) && n(this.options.contentFormatter)) for (b = this.contentDiv.getElementsByTagName("span"), l = 0; l < b.length; l++)b[l] && (b[l].style.color = b[l].getAttribute("data-color")); l = !1; "none" === this.container.style.display && (l = !0, this.container.style.display = "block"); try { 2238 this.contentDiv.style.background = this.backgroundColor ? this.backgroundColor : 2239 v ? "rgba(255,255,255,.9)" : "rgb(255,255,255)", this.borderColor = "waterfall" === h[0].dataSeries.type ? this.contentDiv.style.borderRightColor = this.contentDiv.style.borderLeftColor = this.contentDiv.style.borderColor = this.options.borderColor ? this.options.borderColor : h[0].dataPoint.color ? h[0].dataPoint.color : 0 < h[0].dataPoint.y ? h[0].dataSeries.risingColor : h[0].dataSeries.falling
2239Color : "error" === h[0].dataSeries.type ? this.contentDiv.style.borderRightColor = this.contentDiv.style.borderLeftColor = this.contentDiv.style.borderColor = 2240 this.options.borderColor ? this.options.borderColor : h[0].dataSeries.color ? h[0].dataSeries.color : h[0].dataSeries._colorSet[c.index % h[0].dataSeries._colorSet.length] : this.contentDiv.style.borderRightColor = this.contentDiv.style.borderLeftColor = this.contentDiv.style.borderColor = this.options.borderColor ? this.options.borderColor : h[0].dataPoint.color ? h[0].dataPoint.color : h[0].dataSeries.color ? h[0].dataSeries.color : h[0].dataSeries._colorSet[h[0].index % h[0].dataSeries._colorSet.length], this.contentDiv.style.borderWidth = 2241 this.borderThickness || 0 === this.borderThickness ? this.borderThickness + "px" : "2px", this.contentDiv.style.borderRadius = 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;", 2242 this.contentDiv.style.fontWeight = this.fontWeight ? this.fontWeight : "normal", this.contentDiv.style.fontStyle = this.fontStyle ? this.fontStyle : v ? "italic" : "normal" 2243 } catch (t) { } "pie" === h[0].dataSeries.type || "doughnut" === h[0].dataSeries.type || "funnel" === h[0].dataSeries.type || "pyramid" === h[0].dataSeries.type ? c = mouseX - 10 - this.container.clientWidth : (c = "bar" === h[0].dataSeries.type || "rangeBar" === h[0].dataSeries.type || "stackedBar" === h[0].dataSeries.type || "stackedBar100" === h[0].dataSeries.type ? h[0].dataSeries.axisY.convertValueToPixel(h[0].dataPoint.y) - 2244 this.container.clientWidth << 0 : h[0].dataSeries.axisX.convertValueToPixel(h[0].dataPoint.x) - this.container.clientWidth << 0, c -= 10); 0 > c && (c += this.container.clientWidth + 20); c + this.container.clientWidth > Math.max(this.chart.container.clientWidth, this.chart.width) && (c = Math.max(0, Math.max(this.chart.container.clientWidth, this.chart.width) - this.container.clientWidth)); h = 1 !== h.length || this.shared || "line" !== h[0].dataSeries.type && "stepLine" !== h[0].dataSeries.type && "spline" !== h[0].dataSeries.type && "area" !== h[0].dataSeries.type && 2245 "stepArea" !== h[0].dataSeries.type && "splineArea" !== h[0].dataSeries.type ? "bar" === h[0].dataSeries.type || "rangeBar" === h[0].dataSeries.type || "stackedBar" === h[0].dataSeries.type || "stackedBar100" === h[0].dataSeries.type ? h[0].dataSeries.axisX.convertValueToPixel(h[0].dataPoint.x) : h[0].dataSeries.axisY.convertValueToPixel(h[0].dataPoint.y) : h[0].dataSeries.axisY.convertValueToPixel(h[0].dataPoint.y); h = -h + 10; 0 < h + this.container.clientHeight + 5 && (h -= h + this.container.clientHeight + 5 - 0); this.fixMozTransitionDelay(c, 2246 h); !this.animationEnabled || l ? this.disableAnimation() : (this.enableAnimation(), this.container.style.MozTransition = this.mozContainerTransition); this.container.style.left = c + "px"; this.container.style.bottom = h + "px" 2247 } else return this.hide(!1), !1 2248 } else return this.hide(), !1; this._xValue = a; this._dataSeriesIndex = d; this._prevY = this._prevX = NaN; return !0 2249 }; oa.prototype.fixMozTransitionDelay = function (a, d) { 2250 if (20 < this.chart._eventManager.lastObjectId) this.mozContainerTransition = this.getContainerTransition(0); else { 2251 var c = 2252 parseFloat(this.container.style.left), c = isNaN(c) ? 0 : c, b = parseFloat(this.container.style.bottom), b = isNaN(b) ? 0 : b; 10 < Math.sqrt(Math.pow(c - a, 2) + Math.pow(b - d, 2)) ? this.mozContainerTransition = this.getContainerTransition(0.1) : this.mozContainerTransition = this.getContainerTransition(0) 2253 } 2254 }; oa.prototype.getContainerTransition = function (a) { return "left " + a + "s ease-out 0s, bottom " + a + "s ease-out 0s" }; ia.prototype.reset = function () { 2255 this.lastObjectId = 0; this.objectMap = []; this.rectangularRegionEventSubscriptions = []; this.previousDataPointEventObject = 2256 null; this.eventObjects = []; v && (this.ghostCtx.clearRect(0, 0, this.chart.width, this.chart.height), this.ghostCtx.beginPath()) 2257 }; ia.prototype.getNewObjectTrackingId = function () { return ++this.lastObjectId }; ia.prototype.mouseEventHandler = function (a) { 2258 if ("mousemove" === a.type || "click" === a.type) { 2259 var d = [], c = Qa(a), b = null; if ((b = this.chart.getObjectAtXY(c.x, c.y, !1)) && "undefined" !== typeof this.objectMap[b]) if (b = this.objectMap[b], "dataPoint" === b.objectType) { 2260 var e = this.chart.data[b.dataSeriesIndex], h = e.dataPoints[b.dataPointIndex], 2261 l = b.dataPointIndex; b.eventParameter = { x: c.x, y: c.y, dataPoint: h, dataSeries: e.options, dataPointIndex: l, dataSeriesIndex: e.index, chart: this.chart }; b.eventContext = { context: h, userContext: h, mouseover: "mouseover", mou
2261semove: "mousemove", mouseout: "mouseout", click: "click" }; d.push(b); b = this.objectMap[e.id]; b.eventParameter = { x: c.x, y: c.y, dataPoint: h, dataSeries: e.options, dataPointIndex: l, dataSeriesIndex: e.index, chart: this.chart }; b.eventContext = { 2262 context: e, userContext: e.options, mouseover: "mouseover", mousemove: "mousemove", 2263 mouseout: "mouseout", click: "click" 2264 }; d.push(this.objectMap[e.id]) 2265 } else "legendItem" === b.objectType && (e = this.chart.data[b.dataSeriesIndex], h = null !== b.dataPointIndex ? e.dataPoints[b.dataPointIndex] : null, b.eventParameter = { x: c.x, y: c.y, dataSeries: e.options, dataPoint: h, dataPointIndex: b.dataPointIndex, dataSeriesIndex: b.dataSeriesIndex, chart: this.chart }, b.eventContext = { context: this.chart.legend, userContext: this.chart.legend.options, mouseover: "itemmouseover", mousemove: "itemmousemove", mouseout: "itemmouseout", click: "itemclick" }, 2266 d.push(b)); e = []; for (c = 0; c < this.mouseoveredObjectMaps.length; c++) { h = !0; for (b = 0; b < d.length; b++)if (d[b].id === this.mouseoveredObjectMaps[c].id) { h = !1; break } h ? this.fireEvent(this.mouseoveredObjectMaps[c], "mouseout", a) : e.push(this.mouseoveredObjectMaps[c]) } this.mouseoveredObjectMaps = e; for (c = 0; c < d.length; c++) { 2267 e = !1; for (b = 0; b < this.mouseoveredObjectMaps.length; b++)if (d[c].id === this.mouseoveredObjectMaps[b].id) { e = !0; break } e || (this.fireEvent(d[c], "mouseover", a), this.mouseoveredObjectMaps.push(d[c])); "click" === 2268 a.type ? this.fireEvent(d[c], "click", a) : "mousemove" === a.type && this.fireEvent(d[c], "mousemove", a) 2269 } 2270 } 2271 }; ia.prototype.fireEvent = function (a, d, c) { 2272 if (a && d) { 2273 var b = a.eventParameter, e = a.eventContext, h = a.eventContext.userContext; h && (e && h[e[d]]) && h[e[d]].call(h, b); "mouseout" !== d ? h.cursor && h.cursor !== c.target.style.cursor && (c.target.style.cursor = h.cursor) : (c.target.style.cursor = this.chart.panEnabled ? "itemmouseout" !== e.mouseout || h.dockInsidePlotArea ? "move" : this.chart._defaultCursor : this.chart._defaultCursor, delete a.eventParameter, 2274 delete a.eventContext); "click" === d && ("dataPoint" === a.objectType && this.chart.pieDoughnutClickHandler) && this.chart.pieDoughnutClickHandler.call(this.chart.data[a.dataSeriesIndex], b); "click" === d && ("dataPoint" === a.objectType && this.chart.funnelPyramidClickHandler) && this.chart.funnelPyramidClickHandler.call(this.chart.data[a.dataSeriesIndex], b) 2275 } 2276 }; X.prototype.animate = function (a, d, c, b, e) { 2277 var h = this; this.chart.isAnimating = !0; e = e || N.easing.linear; c && this.animations.push({ 2278 startTime: (new Date).getTime() + (a ? a : 2279 0), duration: d, animationCallback: c, onComplete: b 2280 }); for (a = []; 0 < this.animations.length;)if (d = this.animations.shift(), c = (new Date).getTime(), b = 0, d.startTime <= c && (b = e(Math.min(c - d.startTime, d.duration), 0, 1, d.duration), b = Math.min(b, 1), isNaN(b) || !isFinite(b)) && (b = 1), 1 > b && a.push(d), d.animationCallback(b), 1 <= b && d.onComplete) d.onComplete(); this.animations = a; 0 < this.animations.length ? this.animationRequestId = this.chart.requestAnimFrame.call(window, function () { h.animate.call(h) }) : this.chart.isAnimating = !1 2281 }; X.prototype.cancelAllAnimations = 2282 function () { this.animations = []; this.animationRequestId && this.chart.cancelRequestAnimFrame.call(window, this.animationRequestId); this.animationRequestId = null; this.chart.isAnimating = !1 }; var N = { 2283 yScaleAnimation: function (a, d) { if (0 !== a) { var c = d.dest, b = d.source.canvas, e = d.animationBase; c.drawImage(b, 0, 0, b.width, b.height, 0, e - e * a, c.canvas.width / ma, a * c.canvas.height / ma) } }, xScaleAnimation: function (a, d) { 2284 if (0 !== a) { 2285 var c = d.dest, b = d.source.canvas, e = d.animationBase; c.drawImage(b, 0, 0, b.width, b.height, e - e * a, 0, a * c.canvas.width / 2286 ma, c.canvas.height / ma) 2287 } 2288 }, xClipAnimation: function (a, d) { if (0 !== a) { var c = d.dest, b = d.source.canvas; c.save(); 0 < a && c.drawImage(b, 0, 0, b.width * a, b.height, 0, 0, b.width * a / ma, b.height / ma);
2288 c.restore() } }, fadeInAnimation: function (a, d) { if (0 !== a) { var c = d.dest, b = d.source.canvas; c.save(); c.globalAlpha = a; c.drawImage(b, 0, 0, b.width, b.height, 0, 0, c.canvas.width / ma, c.canvas.height / ma); c.restore() } }, easing: { 2289 linear: function (a, d, c, b) { return c * a / b + d }, easeOutQuad: function (a, d, c, b) { return -c * (a /= b) * (a - 2) + d }, easeOutQuart: function (a, 2290 d, c, b) { return -c * ((a = a / b - 1) * a * a * a - 1) + d }, easeInQuad: function (a, d, c, b) { return c * (a /= b) * a + d }, easeInQuart: function (a, d, c, b) { return c * (a /= b) * a * a * a + d } 2291 } 2292 }, Y = { 2293 drawMarker: function (a, d, c, b, e, h, l, n) { 2294 if (c) { 2295 var t = 1; c.fillStyle = h ? h : "#000000"; c.strokeStyle = l ? l : "#000000"; c.lineWidth = n ? n : 0; c.setLineDash && c.setLineDash(H("solid", n)); "circle" === b ? (c.moveTo(a, d), c.beginPath(), c.arc(a, d, e / 2, 0, 2 * Math.PI, !1), h && c.fill(), n && (l ? c.stroke() : (t = c.globalAlpha, c.globalAlpha = 0.15, c.strokeStyle = "black", c.stroke(), c.globalAlpha = t))) : 2296 "square" === b ? (c.beginPath(), c.rect(a - e / 2, d - e / 2, e, e), h && c.fill(), n && (l ? c.stroke() : (t = c.globalAlpha, c.globalAlpha = 0.15, c.strokeStyle = "black", c.stroke(), c.globalAlpha = t))) : "triangle" === b ? (c.beginPath(), c.moveTo(a - e / 2, d + e / 2), c.lineTo(a + e / 2, d + e / 2), c.lineTo(a, d - e / 2), c.closePath(), h && c.fill(), n && (l ? c.stroke() : (t = c.globalAlpha, c.globalAlpha = 0.15, c.strokeStyle = "black", c.stroke(), c.globalAlpha = t)), c.beginPath()) : "cross" === b && (c.strokeStyle = h, c.lineWidth = e / 4, c.beginPath(), c.moveTo(a - e / 2, d - e / 2), c.lineTo(a + e / 2297 2, d + e / 2), c.stroke(), c.moveTo(a + e / 2, d - e / 2), c.lineTo(a - e / 2, d + e / 2), c.stroke()) 2298 } 2299 }, drawMarkers: function (a) { for (var d = 0; d < a.length; d++) { var c = a[d]; Y.drawMarker(c.x, c.y, c.ctx, c.type, c.size, c.color, c.borderColor, c.borderThickness) } } 2300 }; return l 2301 }(); t.version = "v3.8.8 GA"; window.CanvasJS && (t && !window.CanvasJS.Chart) && (window.CanvasJS.Chart = t) 2302})(); 2303 2304/* 2305 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. 2306 2307 Copyright 2006 Google Inc. https://code.google.com/p/explorercanvas/ 2308 Licensed under the Apache License, Version 2.0 2309*/ 2310document.createElement("canvas").getContext || function () { 2311 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) { 2312 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"); 2313 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}") 2314 } function X(a) { 2315 var b = a.srcElement; switch (a.propertyName) { 2316 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 + 2317 "px" 2318 } 2319 } 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;
2319 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) { 2320 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 = 2321 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_ 2322 } 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) { 2323 0 > c && c++; 1 < c && c--; return 1 > 6 * c ? a + 6 * (b - a) * c : 2324 1 > 2 * c ? b : 2 > 3 * c ? a + 6 * (b - a) * (2 / 3 - c) : a 2325 } function G(a) { 2326 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; 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)) { 2327 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 = "#" + 2328 v[Math.floor(255 * g)] + v[Math.floor(255 * e)] + v[Math.floor(255 * b)]; c = c[3] 2329 } else b = Z[a] || a; return H[a] = { color: b, alpha: c } 2330 } function C(a) { 2331 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", 2332 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 2333 } 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) { 2334 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", 2335 ' opacity="', c, '"', ' joinstyle="', a.lineJoin, '"', ' miterlimit="', a.miterLimit, '"', ' endcap="', $[a.lineCap] || "square", '"', ' weight="', e, 'px"', ' color="', g, '" />') 2336 } function T(a, b, c, g) { 2337 var e = a.fillStyle, f = a.arcScaleX_, d = a.arcScaleY_, k = g.x - c.x, n = g.y - c.y; if (e instanceof w) { 2338 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, 2339 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, '" />') 2340 } else e instanceof 2341 I ? k && n && b.push("<g_vml_:fill", ' position="', -c.x / k * f * f, ",", -c.y / n * d * d, '"', ' type="tile"', ' src="', e.src_, '" />
2341') : (e = G(a.fillStyle), b.push('<g_vml_:fill color="', e.color, '" opacity="', e.alpha * a.globalAlpha, '" />')) 2342 } 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) { 2343 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] * 2344 b[1][0])))) 2345 } 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 } 2346 function A(a) { this.code = this[a]; 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 = { 2347 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) { 2348 if (!a.getContext) { 2349 a.getContext = 2350 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;
2350 b.height && b.height.specified ? a.style.height = b.height.nodeValue + "px" : a.height = a.clientHeight 2351 } return a 2352 } 2353 }; 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 = { 2354 aliceblue: "#F0F8FF", antiquewhite: "#FAEBD7", aquamarine: "#7FFFD4", azure: "#F0FFFF", beige: "#F5F5DC", 2355 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", 2356 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", 2357 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", 2358 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", 2359 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" 2360 }, 2361 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 = 2362 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) { 2363 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({ 2364 type: d, 2365 x: a.x, y: a.y, radius: c, xStart: k.x, yStart: k.y, xEnd: g.x, yEnd: g.y 2366 }) 2367 }; 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) { 2368 var e = this.currentPath_; this.beginPath(); this.moveTo(a, b); this.lineTo(a + c, b); this.lineTo(a + 2369 c, b + g); this.lineTo(a, b + g); this.closePath(); this.fill(); this.currentPath_ = e 2370 }; 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) { 2371 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 = 2372 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:', 2373 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:", 2374 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 -
2374y - h) / u, '"', " />", "</g_vml_:group>"); this.element_.insertAdjacentHTML("BeforeEnd", p.join("")) 2375 }; d.stroke = function (a) { 2376 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, '"', 2377 ' stroked="', !a, '"', ' path="'); for (var c = { x: null, y: null }, d = { x: null, y: null }, e = 0; e < this.currentPath_.length; e++) { 2378 var f = this.currentPath_[e]; switch (f.type) { 2379 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_ * 2380 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)) 2381 }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 } 2382 } b.push(' ">'); a ? T(this, b, c, d) : S(this, b); b.push("</g_vml_:shape>"); this.element_.insertAdjacentHTML("beforeEnd", b.join("")) 2383 }; d.fill = function () { this.stroke(!0) }; d.closePath = function () { this.currentPath_.push({ type: "close" }) }; d.save = function () { 2384 var a = 2385 {}; P(this, a); this.aStack_.push(a); this.mStack_.push(this.m_); this.m_ = t(D(), this.m_) 2386 }; 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) { 2387 z(this, t([[a, 2388 b, 0], [c, d, 0], [e, f, 1]], this.m_), !0) 2389 }; 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) { 2390 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); 2391 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) { 2392 case "left": case "center": case "right": break; case "end": l = "ltr" == m.direction ? "right" : "left"; break; case "start": l = "rtl" == m.direction ? "right" : 2393 "left"; break; default: l = "left" 2394 }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 }, 2395 { 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("")) 2396 }; d.fillText = function (a, b, c, d) { this.drawText_(a, b, c, d, !1) }; d.strokeText = function (a, 2397 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 () { }; 2398 d.arcTo = function () { }; d.createPattern = function (a, b) { return new I(a, b) }; w.prototype.addColorStop = function (a, b) { b = G(b);
2398 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 = 2399 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 2400}(); 2401/*tslint:enable*/ 2402/*eslint-enable*/ 2403/*jshint ignore:end*/
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.