/* CanvasJS Charts - v3.7.7 GA - https://canvasjs.com/ Copyright 2023 fenopix --------------------- License Information -------------------- 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. https://canvasjs.com/license/ */ /*tslint:disable*/ /*eslint-disable*/ /*jshint ignore:start*/ (function() { function ma(h, m) { h.prototype = cb(m.prototype); h.prototype.constructor = h; h.base = m.prototype } function cb(h) { function m() {} m.prototype = h; return new m } function Va(h, m, v) { "millisecond" === v ? h.setMilliseconds(h.getMilliseconds() + 1 * m) : "second" === v ? h.setSeconds(h.getSeconds() + 1 * m) : "minute" === v ? h.setMinutes(h.getMinutes() + 1 * m) : "hour" === v ? h.setHours(h.getHours() + 1 * m) : "day" === v ? h.setDate(h.getDate() + 1 * m) : "week" === v ? h.setDate(h.getDate() + 7 * m) : "month" === v ? h.setMonth(h.getMonth() + 1 * m) : "year" === v && h.setFullYear(h.getFullYear() + 1 * m); return h } function Z(h, m) { var v = !1; 0 > h && (v = !0, h *= -1); h = "" + h; for (m = m ? m : 1; h.length < m;) h = "0" + h; return v ? "-" + h : h } function Ea(h) { if (!h) return h; h = h.replace(/^\s\s*/, ""); for (var m = /\s/, v = h.length; m.test(h.charAt(--v));); return h.slice(0, v + 1) } function Aa(h) { h.roundRect = function(h, v, s, w, oa, x, y, E) { y && (this.fillStyle = y); E && (this.strokeStyle = E); "undefined" === typeof oa && (oa = 5); this.lineWidth = x; this.beginPath(); this.moveTo(h + oa, v); this.lineTo(h + s - oa, v); this.quadraticCurveTo(h + s, v, h + s, v + oa); this.lineTo(h + s, v + w - oa); this.quadraticCurveTo(h + s, v + w, h + s - oa, v + w); this.lineTo(h + oa, v + w); this.quadraticCurveTo(h, v + w, h, v + w - oa); this.lineTo(h, v + oa); this.quadraticCurveTo(h, v, h + oa, v); this.closePath(); y && this.fill(); E && 0 < x && this.stroke() } } function Pa(h, m) { return h - m } function Q(h) { var m = ((h & 16711680) >> 16).toString(16), v = ((h & 65280) >> 8).toString(16); h = ((h & 255) >> 0).toString(16); m = 2 > m.length ? "0" + m : m; v = 2 > v.length ? "0" + v : v; h = 2 > h.length ? "0" + h : h; return "#" + m + v + h } function db(h, m) { var v = this.length >>> 0, s = Number(m) || 0, s = 0 > s ? Math.ceil(s) : Math.floor(s); for (0 > s && (s += v); s < v; s++) if (s in this && this[s] === h) return s; return -1 } function s(h) { return null === h || "undefined" === typeof h } function Ba(h) { h.indexOf || (h.indexOf = db); return h } function eb(h) { if (M.fSDec) h[ha("`eeDwdouMhrudods")](ha("e`u`@ohl`uhnoHuds`uhnoDoe"), function() { M._fTWm && M._fTWm(h) }) } function Wa(h, m, v) { v = v || "normal"; var s = h + "_" + m + "_" + v, w = Xa[s]; if (isNaN(w)) { try { if (!ua) { var oa = document.body; ua = document.createElement("span"); ua.innerHTML = ""; var x = document.createTextNode("Mpgyi"); ua.appendChild(x); oa.appendChild(ua) } ua.style.display = ""; U(ua, { position: "absolute", left: "0px", top: "-20000px", padding: "0px", margin: "0px", border: "none", whiteSpace: "pre", lineHeight: "normal", fontFamily: h, fontSize: m + "px", fontWeight: v }); w = Math.round(ua.offsetHeight); ua.style.display = "none" } catch (y) { w = Math.ceil(1.1 * m) } w = Math.max(w, m); Xa[s] = w } return w } function N(h, m) { var v = []; if (v = { solid: [], shortDash: [3, 1], shortDot: [1, 1], shortDashDot: [3, 1, 1, 1], shortDashDotDot: [3, 1, 1, 1, 1, 1], dot: [1, 2], dash: [4, 2], dashDot: [4, 2, 1, 2], longDash: [8, 2 ], longDashDot: [8, 2, 1, 2], longDashDotDot: [8, 2, 1, 2, 1, 2] } [h || "solid"]) for (var s = 0; s < v.length; s++) v[s] *= m; else v = []; return v } function F(h, m, v, w, sa) { w = w || []; sa = s(sa) ? fb ? { passive: !1, capture: !1 } : !1 : sa; w.push([h, m, v, sa]); return h.addEventListener ? (h.addEventListener(m, v, sa), v) : h.attachEvent ? (w = function(m) { m = m || window.event; m.preventDefault = m.preventDefault || function() { m.returnValue = !1 }; m.stopPropagation = m.stopPropagation || function() { m.cancelBubble = !0 }; v.call(h, m) }, h.attachEvent("on" + m, w), w) : !1 } function gb(h) { if (h._menuButton) h.exportEnabled ? (U(h._menuButton, { backgroundColor: h.toolbar.itemBackgroundColor, color: h.toolbar.fontColor }), Ja(h._menuButton), pa(h, h._menuButton, "menu")) : ta(h._menuButton); else if (h.exportEnabled && w) { var m = !1; h._menuButton = document.createElement("button"); pa(h, h._menuButton, "menu"); h._toolBar.appendChild(h._menuButton); F(h._menuButton, "touchstart", function(h) { m = !0 }, h.allDOMEventHandlers); F(h._menuButton, "click", function() { "none" !== h._dropdownMenu.style.display || h._dropDownCloseTime && 500 >= (new Date).getTime() - h._dropDownCloseTime.getTime() || (h._dropdownMenu.style.display = "block", h._menuButton.blur(), h._dropdownMenu.focus()) }, h.allDOMEventHandlers, !0); F(h._menuButton, "mousemove", function() { m || (U(h._menuButton, { backgroundColor: h.toolbar.itemBackgroundColorOnHover, color: h.toolbar.fontColorOnHover }), 0 >= navigator.userAgent.search("MSIE") && U(h._menuButton.childNodes[0], { WebkitFilter: "invert(100%)", filter: "invert(100%)" })) }, h.allDOMEventHandlers, !0); F(h._menuButton, "mouseout", function() { m || (U(h._menuButton, { backgroundColor: h.toolbar.itemBackgroundColor, color: h.toolbar.fontColor }), 0 >= navigator.userAgent.search("MSIE") && U(h._menuButton.childNodes[0], { WebkitFilter: "invert(0%)", filter: "invert(0%)" })) }, h.allDOMEventHandlers, !0) } if (h.exportEnabled && h._dropdownMenu) { U(h._dropdownMenu, { backgroundColor: h.toolbar.itemBackgroundColor, color: h.toolbar.fontColor }); for (var v = h._dropdownMenu.childNodes, s = [h._cultureInfo.printText, h._cultureInfo.saveJPGText, h._cultureInfo.savePNGText], sa = 0; sa < v.length; sa++) U(v[sa], { backgroundColor: h.toolbar.itemBackgroundColor, color: h.toolbar.fontColor }), v[sa].innerHTML = s[sa] } else !h._dropdownMenu && (h.exportEnabled && w) && (m = !1, h._dropdownMenu = document.createElement("div"), h._dropdownMenu.setAttribute("tabindex", -1), v = -1 !== h.theme.indexOf("dark") ? "black" : "#888888", U(h._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: h.toolbar.itemBackgroundColor, boxShadow: "2px 2px 10px" + v }), h._dropdownMenu.style.display = "none", h._toolBar.appendChild(h._dropdownMenu), F(h._dropdownMenu, "blur", function() { ta(h._dropdownMenu); h._dropDownCloseTime = new Date }, h.allDOMEventHandlers, !0), v = document.createElement("div"), U(v, { padding: "12px 8px 12px 8px" }), v.innerHTML = h._cultureInfo.printText, v.style.backgroundColor = h.toolbar.itemBackgroundColor, v.style.color = h.toolbar.fontColor, h._dropdownMenu.appendChild(v), F(v, "touchstart", function(h) { m = !0 }, h.allDOMEventHandlers), F(v, "mousemove", function() { m || (this.style.backgroundColor = h.toolbar.itemBackgroundColorOnHover, this.style.color = h.toolbar.fontColorOnHover) }, h.allDOMEventHandlers, !0), F(v, "mouseout", function() { m || (this.style.backgroundColor = h.toolbar.itemBackgroundColor, this.style.color = h.toolbar.fontColor) }, h.allDOMEventHandlers, !0), F(v, "click", function() { h.print(); ta(h._dropdownMenu) }, h.allDOMEventHandlers, !0), v = document.createElement("div"), U(v, { padding: "12px 8px 12px 8px" }), v.innerHTML = h._cultureInfo.saveJPGText, v.style.backgroundColor = h.toolbar.itemBackgroundColor, v.style.color = h.toolbar.fontColor, h._dropdownMenu.appendChild(v), F(v, "touchstart", function(h) { m = !0 }, h.allDOMEventHandlers), F(v, "mousemove", function() { m || (this.style.backgroundColor = h.toolbar.itemBackgroundColorOnHover, this.style.color = h.toolbar.fontColorOnHover) }, h.allDOMEventHandlers, !0), F(v, "mouseout", function() { m || (this.style.backgroundColor = h.toolbar.itemBackgroundColor, this.style.color = h.toolbar.fontColor) }, h.allDOMEventHandlers, !0), F(v, "click", function() { h.exportChart({ format: "jpeg", fileName: h.exportFileName }); ta(h._dropdownMenu) }, h.allDOMEventHandlers, !0), v = document.createElement("div"), U(v, { padding: "12px 8px 12px 8px" }), v.innerHTML = h._cultureInfo.savePNGText, v.style.backgroundColor = h.toolbar.itemBackgroundColor, v.style.color = h.toolbar.fontColor, h._dropdownMenu.appendChild(v), F(v, "touchstart", function(h) { m = !0 }, h.allDOMEventHandlers), F(v, "mousemove", function() { m || (this.style.backgroundColor = h.toolbar.itemBackgroundColorOnHover, this.style.color = h.toolbar.fontColorOnHover) }, h.allDOMEventHandlers, !0), F(v, "mouseout", function() { m || (this.style.backgroundColor = h.toolbar.itemBackgroundColor, this.style.color = h.toolbar.fontColor) }, h.allDOMEventHandlers, !0), F(v, "click", function() { h.exportChart({ format: "png", fileName: h.exportFileName }); ta(h._dropdownMenu) }, h.allDOMEventHandlers, !0)) } function Ya(h, m, v) { h *= ja; m *= ja; h = v.getImageData(h, m, 2, 2).data; m = !0; for (v = 0; 4 > v; v++) if (h[v] !== h[v + 4] | h[v] !== h[v + 8] | h[v] !== h[v + 12]) { m = !1; break } return m ? h[0] << 16 | h[1] << 8 | h[2] : 0 } function ka(h, m, v) { return h in m ? m[h] : v[h] } function Ka(h, m, v) { if (w && Za) { var s = h.getContext("2d"); La = s.webkitBackingStorePixelRatio || s.mozBackingStorePixelRatio || s.msBackingStorePixelRatio || s.oBackingStorePixelRatio || s.backingStorePixelRatio || 1; ja = Qa / La; h.width = m * ja; h.height = v * ja; Qa !== La && (h.style.width = m + "px", h.style.height = v + "px", s.scale(ja, ja)) } else h.width = m, h.height = v } function ra(h, m) { Fa && (this.canvasCount |= 0, window.console.log(++this.canvasCount)); var v = document.createElement("canvas"); v.setAttribute("class", "canvasjs-chart-canvas"); Ka(v, h, m); w || "undefined" === typeof G_vmlCanvasManager || G_vmlCanvasManager.initElement(v); return v } function U(h, m) { for (var v in m) h.style[v] = m[v] } function pa(h, m, v) { m.getAttribute("state") || (m.style.backgroundColor = h.toolbar.itemBackgroundColor, m.style.color = h.toolbar.fontColor, m.style.border = "none", U(m, { WebkitUserSelect: "none", MozUserSelect: "none", msUserSelect: "none", userSelect: "none" })); m.getAttribute("state") !== v && (m.setAttribute("state", v), m.setAttribute("type", "button"), U(m, { padding: "5px 12px", cursor: "pointer", "float": "left", width: "40px", height: "25px", outline: "0px", verticalAlign: "baseline", lineHeight: "0" }), m.innerHTML = "", U(m.childNodes[0], { height: "95%", pointerEvents: "none" })); m.setAttribute("title", h._cultureInfo[v + "Text"]) } function Ja() { for (var h = null, m = 0; m < arguments.length; m++) h = arguments[m], h.style && (h.style.display = "inline") } function ta() { for (var h = null, m = 0; m < arguments.length; m++)(h = arguments[m]) && h.style && (h.style.display = "none") } function Ra(h, m, v, s, w) { if (null === h || "undefined" === typeof h) return "undefined" === typeof v ? m : v; h = parseFloat(h.toString()) * (0 <= h.toString().indexOf("%") ? m / 100 : 1); "undefined" !== typeof s && (h = Math.min(s, h), "undefined" !== typeof w && (h = Math.max(w, h))); return !isNaN(h) && h <= m && 0 <= h ? h : "undefined" === typeof v ? m : v } function T(h, m, v, w, y) { this._defaultsKey = h; this._themeOptionsKey = m; this._index = w; this.parent = y; this._eventListeners = []; h = {}; this.theme && s(this.parent) && s(m) && s(w) ? h = s(this.predefinedThemes[this.theme]) ? this.predefinedThemes.light1 : this.predefinedThemes[this.theme] : this.parent && (this.parent.themeOptions && this.parent.themeOptions[m]) && (null === w ? h = this.parent.themeOptions[m] : 0 < this.parent.themeOptions[m].length && (w = Math.min(this.parent.themeOptions[m].length - 1, w), h = this.parent.themeOptions[m][w])); this.themeOptions = h; this.options = v ? v : { _isPlaceholder: !0 }; this.setOptions(this.options, h) } function Ca(h, m, v, s, w) { "undefined" === typeof w && (w = 0); this._padding = w; this._x1 = h; this._y1 = m; this._x2 = v; this._y2 = s; this._rightOccupied = this._leftOccupied = this._bottomOccupied = this._topOccupied = this._padding } function ia(h, m) { ia.base.constructor.call(this, "TextBlock", null, m, null, null); this.ctx = h; this._isDirty = !0; this._wrappedText = null; this._initialize() } function Sa(h, m) { Sa.base.constructor.call(this, "Toolbar", "toolbar", m, null, h); this.chart = h; this.canvas = h.canvas; this.ctx = this.chart.ctx; this.optionsName = "toolbar" } function xa(h, m) { xa.base.constructor.call(this, "Title", "title", m, null, h); this.chart = h; this.canvas = h.canvas; this.ctx = this.chart.ctx; this.optionsName = "title"; if (s(this.options.margin) && h.options.subtitles) for (var v = h.options.subtitles, w = 0; w < v.length; w++) if ((s(v[w].horizontalAlign) && "center" === this.horizontalAlign || v[w].horizontalAlign === this.horizontalAlign) && (s(v[w].verticalAlign) && "top" === this.verticalAlign || v[w].verticalAlign === this.verticalAlign) && !v[w].dockInsidePlotArea === !this.dockInsidePlotArea) { this.margin = 0; break } "undefined" === typeof this.options.fontSize && (this.fontSize = this.chart.getAutoFontSize(this.fontSize)); this.height = this.width = null; this.bounds = { x1: null, y1: null, x2: null, y2: null } } function Ga(h, m, v) { Ga.base.constructor.call(this, "Subtitle", "subtitles", m, v, h); this.chart = h; this.canvas = h.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 Ta() { this.pool = [] } function Ha(h) { var m; h && Ia[h] && (m = Ia[h]); Ha.base.constructor.call(this, "CultureInfo", null, m, null, null) } var Fa = !1, M = {}, w = !!document.createElement("canvas").getContext, na = { Chart: { width: 500, height: 400, zoomEnabled: !1, zoomType: "x", backgroundColor: "white", theme: "light1", animationEnabled: !1, animationDuration: 1200, dataPointWidth: null, dataPointMinWidth: null, dataPointMaxWidth: null, colorSet: "colorSet1", culture: "en", interactivityEnabled: !0, exportEnabled: !1, exportFileName: "Chart", rangeChanging: null, rangeChanged: null, publicProperties: { title: "readWrite", 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" } }, Title: { padding: 0, text: null, verticalAlign: "top", horizontalAlign: "center", fontSize: 20, fontFamily: "Calibri", fontWeight: "normal", fontColor: "black", fontStyle: "normal", borderThickness: 0, borderColor: "black", cornerRadius: 0, backgroundColor: w ? "transparent" : null, margin: 5, wrap: !0, maxWidth: null, dockInsidePlotArea: !1, publicProperties: { options: "readWrite", bounds: "readOnly", chart: "readOnly" } }, Subtitle: { padding: 0, text: null, verticalAlign: "top", horizontalAlign: "center", fontSize: 14, fontFamily: "Calibri", fontWeight: "normal", fontColor: "black", fontStyle: "normal", borderThickness: 0, borderColor: "black", cornerRadius: 0, backgroundColor: null, margin: 2, wrap: !0, maxWidth: null, dockInsidePlotArea: !1, publicProperties: { options: "readWrite", bounds: "readOnly", chart: "readOnly" } }, Toolbar: { itemBackgroundColor: "white", itemBackgroundColorOnHover: "#2196f3", buttonBorderColor: "#2196f3", buttonBorderThickness: 1, fontColor: "black", fontColorOnHover: "white", publicProperties: { options: "readWrite", chart: "readOnly" } }, Legend: { name: null, verticalAlign: "center", horizontalAlign: "right", fontSize: 14, fontFamily: "calibri", fontWeight: "normal", fontColor: "black", fontStyle: "normal", cursor: null, itemmouseover: null, itemmouseout: null, itemmousemove: null, itemclick: null, dockInsidePlotArea: !1, reversed: !1, backgroundColor: w ? "transparent" : null, borderColor: w ? "transparent" : null, borderThickness: 0, cornerRadius: 0, maxWidth: null, maxHeight: null, markerMargin: null, itemMaxWidth: null, itemWidth: null, itemWrap: !0, itemTextFormatter: null, publicProperties: { options: "readWrite", bounds: "readOnly", chart: "readOnly" } }, ToolTip: { enabled: !0, shared: !1, animationEnabled: !0, content: null, contentFormatter: null, reversed: !1, backgroundColor: w ? "rgba(255,255,255,.9)" : "rgb(255,255,255)", borderColor: null, borderThickness: 2, cornerRadius: 5, fontSize: 14, fontColor: "black", fontFamily: "Calibri, Arial, Georgia, serif;", fontWeight: "normal", fontStyle: "italic", updated: null, hidden: null, publicProperties: { options: "readWrite", chart: "readOnly" } }, Axis: { minimum: null, maximum: null, viewportMinimum: null, viewportMaximum: null, interval: null, intervalType: null, reversed: !1, logarithmic: !1, logarithmBase: 10, title: null, titleFontColor: "black", titleFontSize: 20, titleFontFamily: "arial", titleFontWeight: "normal", titleFontStyle: "normal", titleWrap: !0, titleMaxWidth: null, titleBackgroundColor: w ? "transparent" : null, titleBorderColor: w ? "transparent" : null, titleBorderThickness: 0, titleCornerRadius: 0, labelAngle: 0, labelFontFamily: "arial", labelFontColor: "black", labelFontSize: 12, labelFontWeight: "normal", labelFontStyle: "normal", labelAutoFit: !0, labelWrap: !0, labelMaxWidth: null, labelFormatter: null, labelBackgroundColor: w ? "transparent" : null, labelBorderColor: w ? "transparent" : null, labelBorderThickness: 0, labelCornerRadius: 0, labelPlacement: "outside", labelTextAlign: "left", prefix: "", suffix: "", includeZero: !1, tickLength: 5, tickColor: "black", tickThickness: 1, tickPlacement: "outside", lineColor: "black", lineThickness: 1, lineDashType: "solid", gridColor: "#A0A0A0", gridThickness: 0, gridDashType: "solid", interlacedColor: w ? "transparent" : null, valueFormatString: null, margin: 2, publicProperties: { options: "readWrite", stripLines: "readWrite", scaleBreaks: "readWrite", crosshair: "readWrite", bounds: "readOnly", chart: "readOnly" } }, StripLine: { value: null, startValue: null, endValue: null, color: "orange", opacity: null, thickness: 2, lineDashType: "solid", label: "", labelPlacement: "inside", labelAlign: "far", labelWrap: !0, labelMaxWidth: null, labelBackgroundColor: null, labelBorderColor: w ? "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" } }, ScaleBreaks: { autoCalculate: !1, collapsibleThreshold: "25%", maxNumberOfAutoBreaks: 2, spacing: 8, type: "straight", color: "#FFFFFF", fillOpacity: 0.9, lineThickness: 2, lineColor: "#E16E6E", lineDashType: "solid", publicProperties: { options: "readWrite", customBreaks: "readWrite", axis: "readOnly", autoBreaks: "readOnly", bounds: "readOnly", chart: "readOnly" } }, 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: { enabled: !1, snapToDataPoint: !1, color: "grey", opacity: null, thickness: 2, lineDashType: "solid", label: "", labelWrap: !0, labelMaxWidth: null, labelBackgroundColor: w ? "grey" : null, labelBorderColor: w ? "grey" : null, labelBorderThickness: 0, labelCornerRadius: 0, labelFontFamily: w ? "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" } }, DataSeries: { 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, lineThickness: 2, lineDashType: "solid", connectNullData: !1, nullDataLineDashType: "dash", color: null, lineColor: null, risingColor: "white", fallingColor: "red", fillOpacity: null, startAngle: 0, radius: null, innerRadius: null, 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", xValueType: "number", axisXType: "primary", axisYType: "primary", axisXIndex: 0, axisYIndex: 0, xValueFormatString: null, yValueFormatString: null, zValueFormatString: null, percentFormatString: null, showInLegend: null, legendMarkerType: null, legendMarkerColor: null, legendText: null, legendMarkerBorderColor: w ? "transparent" : null, legendMarkerBorderThickness: 0, markerType: "circle", markerColor: null, markerSize: null, markerBorderColor: w ? "transparent" : null, markerBorderThickness: 0, mouseover: null, mouseout: null, mousemove: null, click: null, toolTipContent: null, visible: !0, publicProperties: { options: "readWrite", axisX: "readWrite", axisY: "readWrite", chart: "readOnly" } }, TextBlock: { x: 0, y: 0, width: null, height: null, maxWidth: null, maxHeight: null, padding: 0, angle: 0, text: "", horizontalAlign: "center", textAlign: "left", fontSize: 12, fontFamily: "calibri", fontWeight: "normal", fontColor: "black", fontStyle: "normal", borderThickness: 0, borderColor: "black", cornerRadius: 0, backgroundColor: null, textBaseline: "top" }, CultureInfo: { decimalSeparator: ".", digitGroupSeparator: ",", zoomText: "Zoom", panText: "Pan", resetText: "Reset", menuText: "More Options", saveJPGText: "Save as JPEG", savePNGText: "Save as PNG", printText: "Print", days: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), shortDays: "Sun Mon Tue Wed Thu Fri Sat".split(" "), months: "January February March April May June July August September October November December".split(" "), shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ") } }, Ia = { en: {} }, y = w ? "Trebuchet MS, Helvetica, sans-serif" : "Arial", Da = w ? "Impact, Charcoal, sans-serif" : "Arial", ya = { 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(" ") }, L, ca, V, ga, W; ca = "#333333"; V = "#000000"; L = "#666666"; W = ga = "#000000"; var X = 20, E = 14, Ua = { colorSet: "colorSet1", backgroundColor: "#FFFFFF", title: { fontFamily: Da, fontSize: 32, fontColor: ca, fontWeight: "normal", verticalAlign: "top", margin: 5 }, subtitles: [{ fontFamily: Da, fontSize: E, fontColor: ca, fontWeight: "normal", verticalAlign: "top", margin: 5 }], data: [{ indexLabelFontFamily: y, indexLabelFontSize: E, indexLabelFontColor: ca, indexLabelFontWeight: "normal", indexLabelLineThickness: 1 }], axisX: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: ca, titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: V, labelFontWeight: "normal", lineThickness: 1, lineColor: L, tickThickness: 1, tickColor: L, gridThickness: 0, gridColor: L, stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#EEEEEE", labelFontWeight: "normal", labelBackgroundColor: W, color: ga, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" } }], axisX2: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: ca, titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: V, labelFontWeight: "normal", lineThickness: 1, lineColor: L, tickThickness: 1, tickColor: L, gridThickness: 0, gridColor: L, stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#EEEEEE", labelFontWeight: "normal", labelBackgroundColor: W, color: ga, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" } }], axisY: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: ca, titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: V, labelFontWeight: "normal", lineThickness: 1, lineColor: L, tickThickness: 1, tickColor: L, gridThickness: 1, gridColor: L, stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#EEEEEE", labelFontWeight: "normal", labelBackgroundColor: W, color: ga, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" } }], axisY2: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: ca, titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: V, labelFontWeight: "normal", lineThickness: 1, lineColor: L, tickThickness: 1, tickColor: L, gridThickness: 1, gridColor: L, stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#EEEEEE", labelFontWeight: "normal", labelBackgroundColor: W, color: ga, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" } }], legend: { fontFamily: y, fontSize: 14, fontColor: ca, fontWeight: "bold", verticalAlign: "bottom", horizontalAlign: "center" }, toolTip: { fontFamily: y, fontSize: 14, fontStyle: "normal", cornerRadius: 0, borderThickness: 1 }, toolbar: { itemBackgroundColor: "white", itemBackgroundColorOnHover: "#2196f3", buttonBorderColor: "#2196f3", buttonBorderThickness: 1, fontColor: "black", fontColorOnHover: "white" } }; V = ca = "#F5F5F5"; L = "#FFFFFF"; ga = "#40BAF1"; W = "#F5F5F5"; var X = 20, E = 14, $a = { colorSet: "colorSet2", title: { fontFamily: y, fontSize: 33, fontColor: "#3A3A3A", fontWeight: "bold", verticalAlign: "top", margin: 5 }, subtitles: [{ fontFamily: y, fontSize: E, fontColor: "#3A3A3A", fontWeight: "normal", verticalAlign: "top", margin: 5 }], data: [{ indexLabelFontFamily: y, indexLabelFontSize: E, indexLabelFontColor: "#666666", indexLabelFontWeight: "normal", indexLabelLineThickness: 1 }], axisX: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: "#666666", titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: "#666666", labelFontWeight: "normal", lineThickness: 1, lineColor: "#BBBBBB", tickThickness: 1, tickColor: "#BBBBBB", gridThickness: 1, gridColor: "#BBBBBB", stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FFA500", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FFA500", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#EEEEEE", labelFontWeight: "normal", labelBackgroundColor: "black", color: "black", thickness: 1, lineDashType: "dot" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" } }], axisX2: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: "#666666", titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: "#666666", labelFontWeight: "normal", lineThickness: 1, lineColor: "#BBBBBB", tickColor: "#BBBBBB", tickThickness: 1, gridThickness: 1, gridColor: "#BBBBBB", stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FFA500", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FFA500", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#EEEEEE", labelFontWeight: "normal", labelBackgroundColor: "black", color: "black", thickness: 1, lineDashType: "dot" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" } }], axisY: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: "#666666", titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: "#666666", labelFontWeight: "normal", lineThickness: 0, lineColor: "#BBBBBB", tickColor: "#BBBBBB", tickThickness: 1, gridThickness: 1, gridColor: "#BBBBBB", stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FFA500", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FFA500", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#EEEEEE", labelFontWeight: "normal", labelBackgroundColor: "black", color: "black", thickness: 1, lineDashType: "dot" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" } }], axisY2: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: "#666666", titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: "#666666", labelFontWeight: "normal", lineThickness: 0, lineColor: "#BBBBBB", tickColor: "#BBBBBB", tickThickness: 1, gridThickness: 1, gridColor: "#BBBBBB", stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FFA500", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FFA500", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#EEEEEE", labelFontWeight: "normal", labelBackgroundColor: "black", color: "black", thickness: 1, lineDashType: "dot" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#BBBBBB", lineThickness: 1, lineDashType: "solid" } }], legend: { fontFamily: y, fontSize: 14, fontColor: "#3A3A3A", fontWeight: "bold", verticalAlign: "bottom", horizontalAlign: "center" }, toolTip: { fontFamily: y, fontSize: 14, fontStyle: "normal", cornerRadius: 0, borderThickness: 1 }, toolbar: { itemBackgroundColor: "white", itemBackgroundColorOnHover: "#2196f3", buttonBorderColor: "#2196f3", buttonBorderThickness: 1, fontColor: "black", fontColorOnHover: "white" } }; V = ca = "#F5F5F5"; L = "#FFFFFF"; ga = "#40BAF1"; W = "#F5F5F5"; X = 20; E = 14; Da = { colorSet: "colorSet12", backgroundColor: "#2A2A2A", title: { fontFamily: Da, fontSize: 32, fontColor: ca, fontWeight: "normal", verticalAlign: "top", margin: 5 }, subtitles: [{ fontFamily: Da, fontSize: E, fontColor: ca, fontWeight: "normal", verticalAlign: "top", margin: 5 }], toolbar: { itemBackgroundColor: "#666666", itemBackgroundColorOnHover: "#FF7372", buttonBorderColor: "#FF7372", buttonBorderThickness: 1, fontColor: "#F5F5F5", fontColorOnHover: "#F5F5F5" }, data: [{ indexLabelFontFamily: y, indexLabelFontSize: E, indexLabelFontColor: V, indexLabelFontWeight: "normal", indexLabelLineThickness: 1 }], axisX: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: V, titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: V, labelFontWeight: "normal", lineThickness: 1, lineColor: L, tickThickness: 1, tickColor: L, gridThickness: 0, gridColor: L, stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#000000", labelFontWeight: "normal", labelBackgroundColor: W, color: ga, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#777777", lineThickness: 1, lineDashType: "solid", color: "#111111" } }], axisX2: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: V, titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: V, labelFontWeight: "normal", lineThickness: 1, lineColor: L, tickThickness: 1, tickColor: L, gridThickness: 0, gridColor: L, stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#000000", labelFontWeight: "normal", labelBackgroundColor: W, color: ga, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#777777", lineThickness: 1, lineDashType: "solid", color: "#111111" } }], axisY: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: V, titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: V, labelFontWeight: "normal", lineThickness: 1, lineColor: L, tickThickness: 1, tickColor: L, gridThickness: 1, gridColor: L, stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#000000", labelFontWeight: "normal", labelBackgroundColor: W, color: ga, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#777777", lineThickness: 1, lineDashType: "solid", color: "#111111" } }], axisY2: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: V, titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: V, labelFontWeight: "normal", lineThickness: 1, lineColor: L, tickThickness: 1, tickColor: L, gridThickness: 1, gridColor: L, stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#000000", labelFontWeight: "normal", labelBackgroundColor: W, color: ga, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#777777", lineThickness: 1, lineDashType: "solid", color: "#111111" } }], legend: { fontFamily: y, fontSize: 14, fontColor: ca, fontWeight: "bold", verticalAlign: "bottom", horizontalAlign: "center" }, toolTip: { fontFamily: y, fontSize: 14, fontStyle: "normal", cornerRadius: 0, borderThickness: 1, fontColor: V, backgroundColor: "rgba(0, 0, 0, .7)" } }; L = "#FFFFFF"; V = ca = "#FAFAFA"; ga = "#40BAF1"; W = "#F5F5F5"; var X = 20, E = 14, ab = { light1: Ua, light2: $a, dark1: Da, dark2: { colorSet: "colorSet2", backgroundColor: "#32373A", title: { fontFamily: y, fontSize: 32, fontColor: ca, fontWeight: "normal", verticalAlign: "top", margin: 5 }, subtitles: [{ fontFamily: y, fontSize: E, fontColor: ca, fontWeight: "normal", verticalAlign: "top", margin: 5 }], toolbar: { itemBackgroundColor: "#666666", itemBackgroundColorOnHover: "#FF7372", buttonBorderColor: "#FF7372", buttonBorderThickness: 1, fontColor: "#F5F5F5", fontColorOnHover: "#F5F5F5" }, data: [{ indexLabelFontFamily: y, indexLabelFontSize: E, indexLabelFontColor: V, indexLabelFontWeight: "normal", indexLabelLineThickness: 1 }], axisX: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: V, titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: V, labelFontWeight: "normal", lineThickness: 1, lineColor: L, tickThickness: 1, tickColor: L, gridThickness: 0, gridColor: L, stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#000000", labelFontWeight: "normal", labelBackgroundColor: W, color: ga, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#777777", lineThickness: 1, lineDashType: "solid", color: "#111111" } }], axisX2: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: V, titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: V, labelFontWeight: "normal", lineThickness: 1, lineColor: L, tickThickness: 1, tickColor: L, gridThickness: 0, gridColor: L, stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#000000", labelFontWeight: "normal", labelBackgroundColor: W, color: ga, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#777777", lineThickness: 1, lineDashType: "solid", color: "#111111" } }], axisY: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: V, titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: V, labelFontWeight: "normal", lineThickness: 0, lineColor: L, tickThickness: 1, tickColor: L, gridThickness: 1, gridColor: L, stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#000000", labelFontWeight: "normal", labelBackgroundColor: W, color: ga, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#777777", lineThickness: 1, lineDashType: "solid", color: "#111111" } }], axisY2: [{ titleFontFamily: y, titleFontSize: X, titleFontColor: V, titleFontWeight: "normal", labelFontFamily: y, labelFontSize: E, labelFontColor: V, labelFontWeight: "normal", lineThickness: 0, lineColor: L, tickThickness: 1, tickColor: L, gridThickness: 1, gridColor: L, stripLines: [{ labelFontFamily: y, labelFontSize: E, labelFontColor: "#FF7300", labelFontWeight: "normal", labelBackgroundColor: null, color: "#FF7300", thickness: 1 }], crosshair: { labelFontFamily: y, labelFontSize: E, labelFontColor: "#000000", labelFontWeight: "normal", labelBackgroundColor: W, color: ga, thickness: 1, lineDashType: "dash" }, scaleBreaks: { type: "zigzag", spacing: "2%", lineColor: "#777777", lineThickness: 1, lineDashType: "solid", color: "#111111" } }], legend: { fontFamily: y, fontSize: 14, fontColor: ca, fontWeight: "bold", verticalAlign: "bottom", horizontalAlign: "center" }, toolTip: { fontFamily: y, fontSize: 14, fontStyle: "normal", cornerRadius: 0, borderThickness: 1, fontColor: V, backgroundColor: "rgba(0, 0, 0, .7)" } }, theme1: Ua, theme2: $a, theme3: Ua }, S = { numberDuration: 1, yearDuration: 314496E5, monthDuration: 2592E6, weekDuration: 6048E5, dayDuration: 864E5, hourDuration: 36E5, minuteDuration: 6E4, secondDuration: 1E3, millisecondDuration: 1, dayOfWeekFromInt: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ") }; (function() { M.fSDec = function(h) { for (var m = "", v = 0; v < h.length; v++) m += String.fromCharCode(Math.ceil(h.length / 57 / 5) ^ h.charCodeAt(v)); return m }; delete na[M.fSDec("Bi`su")][M.fSDec("bsdehuIsdg")]; M.pro = { sCH: na[M.fSDec("Bi`su")][M.fSDec("bsdehuIsdg")] }; M._fTWm = function(h) { if ("undefined" === typeof M.pro.sCH && !bb) try { var m, v = h[M.fSDec("buy")]; v[M.fSDec("udyuC`rdmhod")] = M.fSDec("unq"); v[M.fSDec("gnou")] = 11 + M.fSDec("qy!B`mhcsh-!Mtbhe`!Fs`oed-!Mtbhe`!R`or!Tohbned-!@sh`m-!r`or,rdshg"); m = h.height - 11; v[M.fSDec("bmd`sSdbu")](0, m, v[M.fSDec("ld`rtsdUdyu")](M.fSDec("B`ow`rKR!Ush`m")).width, 11); v[M.fSDec("ghmmRuxmd")] = h.backgroundColor; v[M.fSDec("ghmmSdbu")](0, m, v[M.fSDec("ld`rtsdUdyu")](M.fSDec("B`ow`rKR!Ush`m")).width, 11); v[M.fSDec("ghmmRuxmd")] = M.fSDec("fsdx"); v[M.fSDec("ghmmUdyu")](M.fSDec("B`ow`rKR!Ush`m"), 0, m) } catch (s) {} } })(); var fb = function() { var h = !1; try { var m = Object.defineProperty && Object.defineProperty({}, "passive", { get: function() { h = !0; return !1 } }); window.addEventListener && (window.addEventListener("test", null, m), window.removeEventListener("test", null, m)) } catch (v) { h = !1 } return h }(), Xa = {}, ua = null, kb = 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)) }, wa = function(h) { h.width = 1; h.height = 1; h.getContext("2d") && h.getContext("2d").clearRect(0, 0, 1, 1) }, lb = function(h, m, v) { m = Math.min(this.width, this.height); return Math.max("theme4" === this.theme ? 0 : 300 <= m ? 12 : 11, Math.round(m * (h / 400))) }, za = function() { var h = /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, m = "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), v = "Sun Mon Tue Wed Thu Fri Sat".split(" "), s = "January February March April May June July August September October November December".split(" "), w = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), y = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, x = /[^-+\dA-Z]/g; return function(E, N, O) { var L = O ? O.days : m, Q = O ? O.months : s, F = O ? O.shortDays : v, S = O ? O.shortMonths : w; O = ""; var M = !1; E = E && E.getTime ? E : E ? new Date(E) : new Date; if (isNaN(E)) throw SyntaxError("invalid date"); "UTC:" === N.slice(0, 4) && (N = N.slice(4), M = !0); O = M ? "getUTC" : "get"; var U = E[O + "Date"](), J = E[O + "Day"](), $ = E[O + "Month"](), a = E[O + "FullYear"](), d = E[O + "Hours"](), c = E[O + "Minutes"](), b = E[O + "Seconds"](), e = E[O + "Milliseconds"](), f = M ? 0 : E.getTimezoneOffset(); return O = N.replace(h, function(l) { switch (l) { case "D": return U; case "DD": return Z(U, 2); case "DDD": return F[J]; case "DDDD": return L[J]; case "M": return $ + 1; case "MM": return Z($ + 1, 2); case "MMM": return S[$]; case "MMMM": return Q[$]; case "Y": return parseInt(String(a).slice(-2)); case "YY": return Z(String(a).slice(-2), 2); case "YYY": return Z(String(a).slice(-3), 3); case "YYYY": return Z(a, 4); case "h": return d % 12 || 12; case "hh": return Z(d % 12 || 12, 2); case "H": return d; case "HH": return Z(d, 2); case "m": return c; case "mm": return Z(c, 2); case "s": return b; case "ss": return Z(b, 2); case "f": return Z(String(e), 3).slice(0, 1); case "ff": return Z(String(e), 3).slice(0, 2); case "fff": return Z(String(e), 3).slice(0, 3); case "t": return 12 > d ? "a" : "p"; case "tt": return 12 > d ? "am" : "pm"; case "T": return 12 > d ? "A" : "P"; case "TT": return 12 > d ? "AM" : "PM"; case "K": return M ? "UTC" : (String(E).match(y) || [""]).pop().replace(x, ""); case "z": return (0 < f ? "-" : "+") + Math.floor(Math.abs(f) / 60); case "zz": return (0 < f ? "-" : "+") + Z(Math.floor(Math.abs(f) / 60), 2); case "zzz": return (0 < f ? "-" : "+") + Z(Math.floor(Math.abs(f) / 60), 2) + Z(Math.abs(f) % 60, 2); default: return l.slice(1, l.length - 1) } }) } }(), mb = function(h) { var m = 0 > h; if (1 > Math.abs(h)) { var v = parseInt(h.toString().split("e-")[1]); v && (h = (m ? -1 * h : h) * Math.pow(10, v - 1), h = "0." + Array(v).join("0") + h.toString().substring(2), h = m ? "-" + h : h) } else v = parseInt(h.toString().split("+")[1]), 20 < v && (v -= 20, h /= Math.pow(10, v), h = h.toString() + Array(v + 1).join("0")); return String(h) }, da = function(h, m, v) { if (null === h) return ""; if (!isFinite(h)) return h; h = Number(h); var s = 0 > h ? !0 : !1; s && (h *= -1); var w = v ? v.decimalSeparator : ".", y = v ? v.digitGroupSeparator : ",", x = ""; m = String(m); var x = 1, E = v = "", N = -1, O = [], L = [], Q = 0, F = 0, S = 0, M = !1, U = 0, E = m.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g); m = null; for (var J = 0; E && J < E.length; J++) if (m = E[J], "." === m && 0 > N) N = J; else { if ("%" === m) x *= 100; else if ("\u2030" === m) { x *= 1E3; continue } else if ("," === m[0] && "." === m[m.length - 1]) { x /= Math.pow(1E3, m.length - 1); N = J + m.length - 1; continue } else "E" !== m[0] && "e" !== m[0] || "0" !== m[m.length - 1] || (M = !0); 0 > N ? (O.push(m), "#" === m || "0" === m ? Q++ : "," === m && S++) : (L.push(m), "#" !== m && "0" !== m || F++) } M && (m = Math.floor(h), E = -Math.floor(Math.log(h) / Math.LN10 + 1), U = 0 === h ? 0 : 0 === m ? -(Q + E) : mb(m).length - Q, x /= Math.pow(10, U)); 0 > N && (N = J); x = (h * x).toFixed(F); m = x.split("."); x = (m[0] + "").split(""); h = (m[1] + "").split(""); x && "0" === x[0] && x.shift(); for (M = E = J = F = N = 0; 0 < O.length;) if (m = O.pop(), "#" === m || "0" === m) if (N++, N === Q) { var $ = x, x = []; if ("0" === m) for (m = Q - F - ($ ? $.length : 0); 0 < m;) $.unshift("0"), m--; for (; 0 < $.length;) v = $.pop() + v, M++, 0 === M % E && (J === S && 0 < $.length) && (v = y + v) } else 0 < x.length ? (v = x.pop() + v, F++, M++) : "0" === m && (v = "0" + v, F++, M++), 0 === M % E && (J === S && 0 < x.length) && (v = y + v); else "E" !== m[0] && "e" !== m[0] || "0" !== m[m.length - 1] || !/[eE][+-]*[0]+/.test(m) ? "," === m ? (J++, E = M, M = 0, 0 < x.length && (v = y + v)) : v = 1 < m.length && ('"' === m[0] && '"' === m[m.length - 1] || "'" === m[0] && "'" === m[m.length - 1]) ? m.slice(1, m.length - 1) + v : m + v : (m = 0 > U ? m.replace("+", "").replace("-", "") : m.replace("-", ""), v += m.replace(/[0]+/, function(a) { return Z(U, a.length) })); y = ""; for (O = !1; 0 < L.length;) m = L.shift(), "#" === m || "0" === m ? 0 < h.length && 0 !== Number(h.join("")) ? (y += h.shift(), O = !0) : "0" === m && (y += "0", O = !0) : 1 < m.length && ('"' === m[0] && '"' === m[m.length - 1] || "'" === m[0] && "'" === m[m.length - 1]) ? y += m.slice(1, m.length - 1) : "E" !== m[0] && "e" !== m[0] || "0" !== m[m.length - 1] || !/[eE][+-]*[0]+/.test(m) ? y += m : (m = 0 > U ? m.replace("+", "").replace("-", "") : m.replace("-", ""), y += m.replace(/[0]+/, function(a) { return Z(U, a.length) })); v += (O ? w : "") + y; return s ? "-" + v : v }, Ma = function(h) { var m = 0, v = 0; h = h || window.event; h.offsetX || 0 === h.offsetX ? (m = h.offsetX, v = h.offsetY) : h.layerX || 0 == h.layerX ? (m = h.layerX, v = h.layerY) : (m = h.pageX - h.target.offsetLeft, v = h.pageY - h.target.offsetTop); return { x: m, y: v } }, Za = !0, Qa = window.devicePixelRatio || 1, La = 1, ja = Za ? Qa / La : 1, ea = function(h, m, v, s, w, y, x, E, N, O, Q, L, M) { "undefined" === typeof M && (M = 1); x = x || 0; E = E || "black"; var F = 15 < s - m && 15 < w - v ? 8 : 0.35 * Math.min(s - m, w - v); h.beginPath(); h.moveTo(m, v); h.save(); h.fillStyle = y; h.globalAlpha = M; h.fillRect(m, v, s - m, w - v); h.globalAlpha = 1; 0 < x && (M = 0 === x % 2 ? 0 : 0.5, h.beginPath(), h.lineWidth = x, h.strokeStyle = E, h.moveTo(m, v), h.rect(m - M, v - M, s - m + 2 * M, w - v + 2 * M), h.stroke()); h.restore(); !0 === N && (h.save(), h.beginPath(), h.moveTo(m, v), h.lineTo(m + F, v + F), h.lineTo(s - F, v + F), h.lineTo(s, v), h.closePath(), x = h.createLinearGradient((s + m) / 2, v + F, (s + m) / 2, v), x.addColorStop(0, y), x.addColorStop(1, "rgba(255, 255, 255, .4)"), h.fillStyle = x, h.fill(), h.restore()); !0 === O && (h.save(), h.beginPath(), h.moveTo(m, w), h.lineTo(m + F, w - F), h.lineTo(s - F, w - F), h.lineTo(s, w), h.closePath(), x = h.createLinearGradient((s + m) / 2, w - F, (s + m) / 2, w), x.addColorStop(0, y), x.addColorStop(1, "rgba(255, 255, 255, .4)"), h.fillStyle = x, h.fill(), h.restore()); !0 === Q && (h.save(), h.beginPath(), h.moveTo(m, v), h.lineTo(m + F, v + F), h.lineTo(m + F, w - F), h.lineTo(m, w), h.closePath(), x = h.createLinearGradient(m + F, (w + v) / 2, m, (w + v) / 2), x.addColorStop(0, y), x.addColorStop(1, "rgba(255, 255, 255, 0.1)"), h.fillStyle = x, h.fill(), h.restore()); !0 === L && (h.save(), h.beginPath(), h.moveTo(s, v), h.lineTo(s - F, v + F), h.lineTo(s - F, w - F), h.lineTo(s, w), x = h.createLinearGradient(s - F, (w + v) / 2, s, (w + v) / 2), x.addColorStop(0, y), x.addColorStop(1, "rgba(255, 255, 255, 0.1)"), h.fillStyle = x, x.addColorStop(0, y), x.addColorStop(1, "rgba(255, 255, 255, 0.1)"), h.fillStyle = x, h.fill(), h.closePath(), h.restore()) }, ha = function(h) { for (var m = "", s = 0; s < h.length; s++) m += String.fromCharCode(Math.ceil(h.length / 57 / 5) ^ h.charCodeAt(s)); return m }, bb = window && window[ha("mnb`uhno")] && window[ha("mnb`uhno")].href && window[ha("mnb`uhno")].href.indexOf && (-1 !== window[ha("mnb`uhno")].href.indexOf(ha("b`ow`rkr/bnl")) || -1 !== window[ha("mnb`uhno")].href.indexOf(ha("gdonqhy/bnl")) || -1 !== window[ha("mnb`uhno")].href.indexOf(ha("gheemd"))), ib = true, jb = { 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==" }, 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" }, 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=" }, menu: { image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAeCAYAAABE4bxTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADoSURBVFhH7dc9CsJAFATgRxIIBCwCqZKATX5sbawsY2MvWOtF9AB6AU8gguAJbD2AnZ2VXQT/Ko2TYGCL2OYtYQc+BuYA+1hCtnCVwMm27SGaXpDJIAiCvCkVR05hGOZNN3HkFMdx3nQRR06+76/R1IcFLJlNQEWlmWlBTwJtKLKHynehZqnjOGM0PYWRVXk61C37p7xlZ3Hk5HneCk1dmMH811xGoKLSzDiQwIBZB4ocoPJdqNkDt2yKlueWRVGUtzy3rPwo3sWRU3nLjuLI6OO67oZM00wMw3hrmpZx0XU9syxrR0T0BeMpb9dneSR2AAAAAElFTkSuQmCC" } }; T.prototype.setOptions = function(h, m) { if (na[this._defaultsKey]) { var s = na[this._defaultsKey], w; for (w in s) "publicProperties" !== w && s.hasOwnProperty(w) && (this[w] = h && w in h ? h[w] : m && w in m ? m[w] : s[w]) } else Fa && window.console && console.log("defaults not set") }; T.prototype.get = function(h) { var m = na[this._defaultsKey]; if ("options" === h) return this.options && this.options._isPlaceholder ? null : this.options; if (m.hasOwnProperty(h) || m.publicProperties && m.publicProperties.hasOwnProperty(h)) return this[h]; window.console && window.console.log('Property "' + h + "\" doesn't exist. Please check for typo.") }; T.prototype.set = function(h, m, s) { s = "undefined" === typeof s ? !0 : s; var w = na[this._defaultsKey]; if ("options" === h) this.createUserOptions(m); else if (w.hasOwnProperty(h) || w.publicProperties && w.publicProperties.hasOwnProperty(h) && "readWrite" === w.publicProperties[h]) this.options._isPlaceholder && this.createUserOptions(), this.options[h] = m; else { window.console && (w.publicProperties && w.publicProperties.hasOwnProperty(h) && "readOnly" === w.publicProperties[h] ? window.console.log('Property "' + h + '" is read-only.') : window.console.log('Property "' + h + "\" doesn't exist. Please check for typo.")); return } s && (this.stockChart || this.chart || this).render() }; T.prototype.addTo = function(h, m, s, w) { w = "undefined" === typeof w ? !0 : w; var y = na[this._defaultsKey]; y.hasOwnProperty(h) || y.publicProperties && y.publicProperties.hasOwnProperty(h) && "readWrite" === y.publicProperties[h] ? (this.options._isPlaceholder && this.createUserOptions(), "undefined" === typeof this.options[h] && (this.options[h] = []), h = this.options[h], s = "undefined" === typeof s || null === s ? h.length : s, h.splice(s, 0, m), w && (this.stockChart || this.chart || this).render()) : window.console && (y.publicProperties && y.publicProperties.hasOwnProperty(h) && "readOnly" === y.publicProperties[h] ? window.console.log('Property "' + h + '" is read-only.') : window.console.log('Property "' + h + "\" doesn't exist. Please check for typo.")) }; T.prototype.createUserOptions = function(h) { if ("undefined" !== typeof h || this.options._isPlaceholder) if (this.parent.options._isPlaceholder && this.parent.createUserOptions(), this.isOptionsInArray) { this.parent.options[this.optionsName] || (this.parent.options[this.optionsName] = []); var m = this.parent.options[this.optionsName], s = m.length; this.options._isPlaceholder || (Ba(m), s = m.indexOf(this.options)); this.options = "undefined" === typeof h ? {} : h; m[s] = this.options } else this.options = "undefined" === typeof h ? {} : h, h = this.parent.options, this.optionsName ? m = this.optionsName : (m = this._defaultsKey) && 0 !== m.length ? (s = m.charAt(0).toLowerCase(), 1 < m.length && (s = s.concat(m.slice(1))), m = s) : m = void 0, h[m] = this.options }; T.prototype.remove = function(h) { h = "undefined" === typeof h ? !0 : h; if (this.isOptionsInArray) { var m = this.parent.options[this.optionsName]; Ba(m); var s = m.indexOf(this.options); 0 <= s && m.splice(s, 1) } else delete this.parent.options[this.optionsName]; h && (this.stockChart || this.chart || this).render() }; T.prototype.updateOption = function(h) { !na[this._defaultsKey] && (Fa && window.console) && console.log("defaults not set"); var m = na[this._defaultsKey], w = {}, y = this[h], E = this._themeOptionsKey, F = this._index; this.theme && s(this.parent) && s(E) && s(F) ? w = s(this.predefinedThemes[this.theme]) ? this.predefinedThemes.light1 : this.predefinedThemes[this.theme] : this.parent && (this.parent.themeOptions && this.parent.themeOptions[E]) && (null === F ? w = this.parent.themeOptions[E] : 0 < this.parent.themeOptions[E].length && (w = Math.min(this.parent.themeOptions[E].length - 1, F), w = this.parent.themeOptions[E][w])); this.themeOptions = w; h in m && (y = h in this.options ? this.options[h] : w && h in w ? w[h] : m[h]); if (y === this[h]) return !1; this[h] = y; return !0 }; T.prototype.trackChanges = function(h) { if (!this.sessionVariables) throw "Session Variable Store not set"; this.sessionVariables[h] = this.options[h] }; T.prototype.isBeingTracked = function(h) { this.options._oldOptions || (this.options._oldOptions = {}); return this.options._oldOptions[h] ? !0 : !1 }; T.prototype.hasOptionChanged = function(h) { if (!this.sessionVariables) throw "Session Variable Store not set"; return this.sessionVariables[h] !== this.options[h] }; T.prototype.addEventListener = function(h, m, s) { h && m && (this._eventListeners[h] = this._eventListeners[h] || [], this._eventListeners[h].push({ context: s || this, eventHandler: m })) }; T.prototype.removeEventListener = function(h, m) { if (h && m && this._eventListeners[h]) for (var s = this._eventListeners[h], w = 0; w < s.length; w++) if (s[w].eventHandler === m) { s[w].splice(w, 1); break } }; T.prototype.removeAllEventListeners = function() { this._eventListeners = [] }; T.prototype.dispatchEvent = function(h, m, s) { if (h && this._eventListeners[h]) { m = m || {}; for (var w = this._eventListeners[h], y = 0; y < w.length; y++) w[y].eventHandler.call(w[y].context, m) } "function" === typeof this[h] && this[h].call(s || this.chart, m) }; Ca.prototype.registerSpace = function(h, m) { "top" === h ? this._topOccupied += m.height : "bottom" === h ? this._bottomOccupied += m.height : "left" === h ? this._leftOccupied += m.width : "right" === h && (this._rightOccupied += m.width) }; Ca.prototype.unRegisterSpace = function(h, m) { "top" === h ? this._topOccupied -= m.height : "bottom" === h ? this._bottomOccupied -= m.height : "left" === h ? this._leftOccupied -= m.width : "right" === h && (this._rightOccupied -= m.width) }; Ca.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 } }; Ca.prototype.reset = function() { this._rightOccupied = this._leftOccupied = this._bottomOccupied = this._topOccupied = this._padding }; ma(ia, T); ia.prototype._initialize = function() { s(this.padding) || "object" !== typeof this.padding ? this.topPadding = this.rightPadding = this.bottomPadding = this.leftPadding = Number(this.padding) | 0 : (this.topPadding = s(this.padding.top) ? 0 : Number(this.padding.top) | 0, this.rightPadding = s(this.padding.right) ? 0 : Number(this.padding.right) | 0, this.bottomPadding = s(this.padding.bottom) ? 0 : Number(this.padding.bottom) | 0, this.leftPadding = s(this.padding.left) ? 0 : Number(this.padding.left) | 0) }; ia.prototype.render = function(h) { if (0 !== this.fontSize) { h && this.ctx.save(); var m = this.ctx.font; this.ctx.textBaseline = this.textBaseline; var s = 0; this._isDirty && this.measureText(this.ctx); this.ctx.translate(this.x, this.y + s); "middle" === this.textBaseline && (s = -this._lineHeight / 2); this.ctx.font = this._getFontString(); this.ctx.rotate(Math.PI / 180 * this.angle); var w = 0, y = this.topPadding, E = null; this.ctx.roundRect || Aa(this.ctx); (0 < this.borderThickness && this.borderColor || this.backgroundColor) && this.ctx.roundRect(0, s, this.width, this.height, this.cornerRadius, this.borderThickness, this.backgroundColor, this.borderColor); this.ctx.fillStyle = this.fontColor; for (s = 0; s < this._wrappedText.lines.length; s++) { E = this._wrappedText.lines[s]; if ("right" === this.horizontalAlign || "right" === this.textAlign) w = this.width - E.width - this.rightPadding; else if ("left" === this.horizontalAlign || "left" === this.textAlign) w = this.leftPadding; else if ("center" === this.horizontalAlign || "center" === this.textAlign) w = (this.width - (this.leftPadding + this.rightPadding)) / 2 - E.width / 2 + this.leftPadding; this.ctx.fillText(E.text, w, y); y += E.height } this.ctx.font = m; h && this.ctx.restore() } }; ia.prototype.setText = function(h) { this.text = h; this._isDirty = !0; this._wrappedText = null }; ia.prototype.measureText = function() { this._lineHeight = Wa(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 } }; ia.prototype._getLineWithWidth = function(h, m, s) { h = String(h); if (!h) return { text: "", width: 0 }; var w = s = 0, y = h.length - 1, E = Infinity; for (this.ctx.font = this._getFontString(); w <= y;) { var E = Math.floor((w + y) / 2), x = h.substr(0, E + 1); s = this.ctx.measureText(x).width; if (s < m) w = E + 1; else if (s > m) y = E - 1; else break } s > m && 1 < x.length && (x = x.substr(0, x.length - 1), s = this.ctx.measureText(x).width); m = !0; if (x.length === h.length || " " === h[x.length]) m = !1; m && (h = x.split(" "), 1 < h.length && h.pop(), x = h.join(" "), s = this.ctx.measureText(x).width); return { text: x, width: s } }; ia.prototype._wrapText = function() { var h = new String(Ea(String(this.text))), m = [], s = this.ctx.font, w = 0, y = 0; this.ctx.font = this._getFontString(); if (0 === this.frontSize) y = w = 0; else for (; 0 < h.length;) { var E = this.maxHeight - (this.topPadding + this.bottomPadding), x = this._getLineWithWidth(h, this.maxWidth - (this.leftPadding + this.rightPadding), !1); x.height = this._lineHeight; m.push(x); var F = y, y = Math.max(y, x.width), w = w + x.height, h = Ea(h.slice(x.text.length, h.length)); E && w > E && (x = m.pop(), w -= x.height, y = F) } this._wrappedText = { lines: m, width: y, height: w }; this.width = y + (this.leftPadding + this.rightPadding); this.height = w + (this.topPadding + this.bottomPadding); this.ctx.font = s }; ia.prototype._getFontString = function() { var h; h = "" + (this.fontStyle ? this.fontStyle + " " : ""); h += this.fontWeight ? this.fontWeight + " " : ""; h += this.fontSize ? this.fontSize + "px " : ""; var m = this.fontFamily ? this.fontFamily + "" : ""; !w && m && (m = m.split(",")[0], "'" !== m[0] && '"' !== m[0] && (m = "'" + m + "'")); return h += m }; ma(Sa, T); ma(xa, T); xa.prototype.setLayout = function() { if (this.text) { var h = this.dockInsidePlotArea ? this.chart.plotArea : this.chart, m = h.layoutManager.getFreeSpace(), w = m.x1, y = m.y1, E = 0, F = 0, x = this.chart._menuButton && this.chart.exportEnabled && "top" === this.verticalAlign ? 22 : 0, N, M; "top" === this.verticalAlign || "bottom" === this.verticalAlign ? (null === this.maxWidth && (this.maxWidth = m.width - 4 - x * ("center" === this.horizontalAlign ? 2 : 1)), F = 0.5 * m.height - this.margin - 2, E = 0) : "center" === this.verticalAlign && ("left" === this.horizontalAlign || "right" === this.horizontalAlign ? (null === this.maxWidth && (this.maxWidth = m.height - 4), F = 0.5 * m.width - this.margin - 2) : "center" === this.horizontalAlign && (null === this.maxWidth && (this.maxWidth = m.width - 4), F = 0.5 * m.height - 4)); var O; s(this.padding) || "number" !== typeof this.padding ? s(this.padding) || "object" !== typeof this.padding || (O = this.padding.top ? this.padding.top : this.padding.bottom ? this.padding.bottom : 0, O += this.padding.bottom ? this.padding.bottom : this.padding.top ? this.padding.top : 0) : O = 2 * this.padding; this.wrap || (F = Math.min(F, 1.5 * this.fontSize + O)); F = new ia(this.ctx, { fontSize: this.fontSize, fontFamily: this.fontFamily, fontColor: this.fontColor, fontStyle: this.fontStyle, 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: F, cornerRadius: this.cornerRadius, text: this.text, padding: this.padding, textBaseline: "top" }); O = F.measureText(); "top" === this.verticalAlign || "bottom" === this.verticalAlign ? ("top" === this.verticalAlign ? (y = m.y1 + 2, M = "top") : "bottom" === this.verticalAlign && (y = m.y2 - 2 - O.height, M = "bottom"), "left" === this.horizontalAlign ? w = m.x1 + 2 : "center" === this.horizontalAlign ? w = m.x1 + m.width / 2 - O.width / 2 : "right" === this.horizontalAlign && (w = m.x2 - 2 - O.width - x), N = this.horizontalAlign, this.width = O.width, this.height = O.height) : "center" === this.verticalAlign && ("left" === this.horizontalAlign ? (w = m.x1 + 2, y = m.y2 - 2 - (this.maxWidth / 2 - O.width / 2), E = -90, M = "left", this.width = O.height, this.height = O.width) : "right" === this.horizontalAlign ? (w = m.x2 - 2, y = m.y1 + 2 + (this.maxWidth / 2 - O.width / 2), E = 90, M = "right", this.width = O.height, this.height = O.width) : "center" === this.horizontalAlign && (y = h.y1 + (h.height / 2 - O.height / 2), w = h.x1 + (h.width / 2 - O.width / 2), M = "center", this.width = O.width, this.height = O.height), N = "center"); F.x = w; F.y = y; F.angle = E; F.horizontalAlign = N; this._textBlock = F; h.layoutManager.registerSpace(M, { width: this.width + ("left" === M || "right" === M ? this.margin + 2 : 0), height: this.height + ("top" === M || "bottom" === M ? this.margin + 2 : 0) }); this.bounds = { x1: w, y1: y, x2: w + this.width, y2: y + this.height }; this.ctx.textBaseline = "top" } }; xa.prototype.render = function() { this._textBlock && this._textBlock.render(!0) }; ma(Ga, T); Ga.prototype.setLayout = xa.prototype.setLayout; Ga.prototype.render = xa.prototype.render; Ta.prototype.get = function(h, m) { var s = null; 0 < this.pool.length ? (s = this.pool.pop(), Ka(s, h, m)) : s = ra(h, m); return s }; Ta.prototype.release = function(h) { this.pool.push(h) }; ma(Ha, T); var Na = { addTheme: function(h, m) { ab[h] = m }, addColorSet: function(h, m) { ya[h] = m }, addCultureInfo: function(h, m) { Ia[h] = m }, formatNumber: function(h, m, s) { s = s || "en"; if (Ia[s]) return da(h, m || "#,##0.##", new Ha(s)); throw "Unknown Culture Name"; }, formatDate: function(h, m, s) { s = s || "en"; if (Ia[s]) return za(h, m || "DD MMM YYYY", new Ha(s)); throw "Unknown Culture Name"; } }; "undefined" !== typeof module && "undefined" !== typeof module.exports ? module.exports = Na : "function" === typeof define && define.amd ? define([], function() { return Na }) : (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."), window.CanvasJS = window.CanvasJS ? window.CanvasJS : Na); y = Na.Chart = function() { function h(a, d) { return a.x - d.x } function m(a, d, c) { d = d || {}; s(c) ? (this.predefinedThemes = ab, 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 = s(d.theme) || s(this.predefinedThemes[d.theme]) ? "light1" : d.theme; m.base.constructor.call(this, "Chart", this.optionsName, d, 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 Ta; 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 = []; (this.container = "string" === typeof this._containerId ? document.getElementById(this._containerId) : this._containerId) ? (this.container.innerHTML = "", d = a = 0, a = this.options.width ? this.width : 0 < this.container.clientWidth ? this.container.clientWidth : this.width, d = this.options.height ? this.height : 0 < this.container.clientHeight ? this.container.clientHeight : this.height, this.width = a, this.height = d, this.x1 = this.y1 = 0, this.x2 = this.width, this.y2 = this.height, this.selectedColorSet = "undefined" !== typeof ya[this.colorSet] ? ya[this.colorSet] : ya.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", w || (this._canvasJSContainer.style.height = "0px"), this.container.appendChild(this._canvasJSContainer), this.canvas = ra(a, d), this._preRenderCanvas = ra(a, d), this.canvas.style.position = "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), w ? this.plotArea.ctx = this.ctx : (this.plotArea.canvas = ra(a, d), this.plotArea.canvas.style.position = "absolute", this.plotArea.canvas.setAttribute("class", "plotAreaCanvas"), this._canvasJSContainer.appendChild(this.plotArea.canvas), this.plotArea.ctx = this.plotArea.canvas.getContext("2d")), this.overlaidCanvas = ra(a, d), 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 = "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 ga(this), this.windowResizeHandler = F(window, "resize", function() { b._updateSize() && b.render() }, this.allDOMEventHandlers), this._toolBar = document.createElement("div"), this._toolBar.setAttribute("class", "canvasjs-chart-toolbar"), U(this._toolBar, { position: "absolute", right: "1px", top: "1px" }), this._canvasJSContainer.appendChild(this._toolBar), this.bounds = { x1: 0, y1: 0, x2: this.width, y2: this.height }, F(this.overlaidCanvas, "click", function(a) { b._mouseEventHandler(a) }, this.allDOMEventHandlers), F(this.overlaidCanvas, "mousemove", function(a) { b._mouseEventHandler(a) }, this.allDOMEventHandlers), F(this.overlaidCanvas, "mouseup", function(a) { b._mouseEventHandler(a) }, this.allDOMEventHandlers), F(this.overlaidCanvas, "mousedown", function(a) { b._mouseEventHandler(a); ta(b._dropdownMenu) }, this.allDOMEventHandlers), F(this.overlaidCanvas, "mouseout", function(a) { b._mouseEventHandler(a) }, this.allDOMEventHandlers), F(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerDown" : "touchstart", function(a) { b._touchEventHandler(a) }, this.allDOMEventHandlers), F(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerMove" : "touchmove", function(a) { b._touchEventHandler(a) }, this.allDOMEventHandlers), F(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerUp" : "touchend", function(a) { b._touchEventHandler(a) }, this.allDOMEventHandlers), F(this.overlaidCanvas, window.navigator.msPointerEnabled ? "MSPointerCancel" : "touchcancel", function(a) { b._touchEventHandler(a) }, this.allDOMEventHandlers), this.toolTip = new Z(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') } function v(a, d) { for (var c = [], b, e = 0; e < a.length; e++) if (0 == e) c.push(a[0]); else { var f, l, t; t = e - 1; f = 0 === t ? 0 : t - 1; l = t === a.length - 1 ? t : t + 1; b = Math.abs((a[l].x - a[f].x) / (0 === a[l].x - a[t].x ? 0.01 : a[l].x - a[t].x)) * (d - 1) / 2 + 1; var C = (a[l].x - a[f].x) / b; b = (a[l].y - a[f].y) / b; c[c.length] = a[t].x > a[f].x && 0 < C || a[t].x < a[f].x && 0 > C ? { x: a[t].x + C / 3, y: a[t].y + b / 3 } : { x: a[t].x, y: a[t].y + b / 9 }; t = e; f = 0 === t ? 0 : t - 1; l = t === a.length - 1 ? t : t + 1; b = Math.abs((a[l].x - a[f].x) / (0 === a[t].x - a[f].x ? 0.01 : a[t].x - a[f].x)) * (d - 1) / 2 + 1; C = (a[l].x - a[f].x) / b; b = (a[l].y - a[f].y) / b; c[c.length] = a[t].x > a[f].x && 0 < C || a[t].x < a[f].x && 0 > C ? { x: a[t].x - C / 3, y: a[t].y - b / 3 } : { x: a[t].x, y: a[t].y - b / 9 }; c[c.length] = a[e] } return c } function y(a, d, c, b, e, f, l, t, C, k) { var n = 0; k ? (l.color = f, t.color = f) : k = 1; n = C ? Math.abs(e - c) : Math.abs(b - d); n = 0 < l.trimLength ? Math.abs(n * l.trimLength / 100) : Math.abs(n - l.length); C ? (c += n / 2, e -= n / 2) : (d += n / 2, b -= n / 2); var n = 1 === Math.round(l.thickness) % 2 ? 0.5 : 0, p = 1 === Math.round(t.thickness) % 2 ? 0.5 : 0; a.save(); a.globalAlpha = k; a.strokeStyle = t.color || f; a.lineWidth = t.thickness || 2; a.setLineDash && a.setLineDash(N(t.dashType, t.thickness)); a.beginPath(); C && 0 < t.thickness ? (a.moveTo(b - l.thickness / 2, Math.round((c + e) / 2) - p), a.lineTo(d + l.thickness / 2, Math.round((c + e) / 2) - p)) : 0 < t.thickness && (a.moveTo(Math.round((d + b) / 2) - p, c + l.thickness / 2), a.lineTo(Math.round((d + b) / 2) - p, e - l.thickness / 2)); a.stroke(); a.strokeStyle = l.color || f; a.lineWidth = l.thickness || 2; a.setLineDash && a.setLineDash(N(l.dashType, l.thickness)); a.beginPath(); C && 0 < l.thickness ? (a.moveTo(b - n, c), a.lineTo(b - n, e), a.moveTo(d + n, c), a.lineTo(d + n, e)) : 0 < l.thickness && (a.moveTo(d, c + n), a.lineTo(b, c + n), a.moveTo(d, e - n), a.lineTo(b, e - n)); a.stroke(); a.restore() } function E(a, d) { E.base.constructor.call(this, "Legend", "legend", d, 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)); this.lineHeight = Wa(this.fontFamily, this.fontSize, this.fontWeight); this.horizontalSpacing = this.fontSize } function L(a, d, c, b) { L.base.constructor.call(this, "DataSeries", "data", d, 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 = d.dataPoints ? d.dataPoints.length : 0; this.dataPointEOs = []; for (d = 0; d < a; d++) this.dataPointEOs[d] = {}; this.dataPointIds = []; this.plotUnit = []; this.axisY = this.axisX = null; this.optionsName = "data"; this.isOptionsInArray = !0; null === this.fillOpacity && (this.type.match(/area/i) ? this.fillOpacity = 0.7 : this.fillOpacity = 1); this.axisPlacement = this.getDefaultAxisPlacement(); "undefined" === typeof this.options.indexLabelFontSize && (this.indexLabelFontSize = this.chart.getAutoFontSize(this.indexLabelFontSize)) } function x(a, d, c, b, e, f) { x.base.constructor.call(this, "Axis", d, c, b, a); this.chart = a; this.canvas = a.canvas; this.ctx = a.ctx; this.intervalStartPosition = this.maxHeight = this.maxWidth = 0; this.labels = []; this.dataSeries = []; this._stripLineLabels = this._ticks = this._labels = null; this.dataInfo = { min: Infinity, max: -Infinity, viewPortMin: Infinity, viewPortMax: -Infinity, minDiff: Infinity }; this.isOptionsInArray = !0; "axisX" === e ? ("left" === f || "bottom" === f ? (this.optionsName = "axisX", s(this.chart.sessionVariables.axisX[b]) && (this.chart.sessionVariables.axisX[b] = {}), this.sessionVariables = this.chart.sessionVariables.axisX[b]) : (this.optionsName = "axisX2", s(this.chart.sessionVariables.axisX2[b]) && (this.chart.sessionVariables.axisX2[b] = {}), this.sessionVariables = this.chart.sessionVariables.axisX2[b]), this.options.interval || (this.intervalType = null)) : "left" === f || "bottom" === f ? (this.optionsName = "axisY", s(this.chart.sessionVariables.axisY[b]) && (this.chart.sessionVariables.axisY[b] = {}), this.sessionVariables = this.chart.sessionVariables.axisY[b]) : (this.optionsName = "axisY2", s(this.chart.sessionVariables.axisY2[b]) && (this.chart.sessionVariables.axisY2[b] = {}), this.sessionVariables = this.chart.sessionVariables.axisY2[b]); "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 = f; this.lineCoordinates = { x1: null, y1: null, x2: null, y2: null, width: null }; this.labelAngle = (this.labelAngle % 360 + 360) % 360; 90 < this.labelAngle && 270 > this.labelAngle ? this.labelAngle -= 180 : 270 <= this.labelAngle && 360 >= this.labelAngle && (this.labelAngle -= 360); this.options.scaleBreaks && (this.scaleBreaks = new V(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 O(this.chart, this.options.stripLines[a], a, ++this.chart._eventManager.lastObjectId, this)); this.options.crosshair && (this.crosshair = new ca(this.chart, 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 === this.viewportMaximum && (this.options.viewportMaximum = void 0, this.sessionVariables.viewportMaximum = null); this.hasOptionChanged("viewportMaximum") || isNaN(this.sessionVariables.newViewportMaximum) || null === this.sessionVariables.newViewportMaximum ? this.sessionVariables.newViewportMaximum = null : this.viewportMaximum = this.sessionVariables.newViewportMaximum; null !== this.minimum && null !== this.viewportMinimum && (this.viewportMinimum = Math.max(this.viewportMinimum, this.minimum)); null !== this.maximum && null !== this.viewportMaximum && (this.viewportMaximum = Math.min(this.viewportMaximum, this.maximum)); this.trackChanges("viewportMinimum"); this.trackChanges("viewportMaximum") } function V(a, d, c, b) { V.base.constructor.call(this, "ScaleBreaks", "scaleBreaks", d, 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) ? 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) { for (a = 0; a < this.options.customBreaks.length; a++) this.customBreaks.push(new X(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 && 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."), this._appliedBreaks.splice(a, 2), a--) } } function X(a, d, c, b, e, f) { X.base.constructor.call(this, "Break", d, c, b, f); this.id = e; this.chart = a; this.ctx = this.chart.ctx; this.scaleBreaks = f; this.optionsName = d; this.isOptionsInArray = !0; this.type = c.type ? this.type : f.type; this.fillOpacity = s(c.fillOpacity) ? f.fillOpacity : this.fillOpacity; this.lineThickness = s(c.lineThickness) ? f.lineThickness : this.lineThickness; this.color = c.color ? this.color : f.color; this.lineColor = c.lineColor ? this.lineColor : f.lineColor; this.lineDashType = c.lineDashType ? this.lineDashType : f.lineDashType; !s(this.startValue) && this.startValue.getTime && (this.startValue = this.startValue.getTime()); !s(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 ? f.spacing : c.spacing; "string" === typeof this.options.spacing ? (this.spacing = parseFloat(this.spacing), this.spacing = isNaN(this.spacing) ? 0 : (10 < this.spacing ? 10 : this.spacing) + "%") : "number" !== typeof this.options.spacing && (this.spacing = f.spacing); this.size = f.parent.logarithmic ? 1 : 0 } function O(a, d, c, b, e) { O.base.constructor.call(this, "StripLine", "stripLines", d, 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 = 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) } function ca(a, d, c) { ca.base.constructor.call(this, "Crosshair", "crosshair", d, null, c); this.chart = a; this.ctx = this.chart.ctx; this.axis = c; this.optionsName = "crosshair"; this._thicknessType = "pixel" } function Z(a, d) { Z.base.constructor.call(this, "ToolTip", "toolTip", d, 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 ga(a) { this.chart = a; this.lastObjectId = 0; this.objectMap = []; this.rectangularRegionEventSubscriptions = []; this.previousDataPointEventObject = null; this.ghostCanvas = ra(this.chart.width, this.chart.height); this.ghostCtx = this.ghostCanvas.getContext("2d"); this.mouseoveredObjectMaps = [] } function W(a) { this.chart = a; this.ctx = this.chart.plotArea.ctx; this.animations = []; this.animationRequestId = null } ma(m, T); m.prototype.destroy = function() { var a = this.allDOMEventHandlers; this._animator && this._animator.cancelAllAnimations(); this._panTimerId && clearTimeout(this._panTimerId); for (var d = 0; d < a.length; d++) { var c = a[d][0], b = a[d][1], e = a[d][2], f = a[d][3], f = f || !1; c.removeEventListener ? c.removeEventListener(b, e, f) : c.detachEvent && c.detachEvent("on" + b, e) } 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); this.container = this._canvasJSContainer = null; this.toolTip.container = null; this.canvas && wa(this.canvas); this.overlaidCanvas && wa(this.overlaidCanvas); this._preRenderCanvas && wa(this._preRenderCanvas); this._breaksCanvas && wa(this._breaksCanvas); this._eventManager && this._eventManager.ghostCanvas && wa(this._eventManager.ghostCanvas); this._toolBar = this._dropdownMenu = this._menuButton = this._resetButton = this._zoomButton = null }; m.prototype._updateOptions = function() { var a = this; this.updateOption("width"); this.updateOption("height"); this.updateOption("dataPointWidth"); this.updateOption("dataPointMinWidth"); this.updateOption("dataPointMaxWidth"); this.updateOption("interactivityEnabled"); this.updateOption("theme"); this.updateOption("colorSet") && (this.selectedColorSet = "undefined" !== typeof ya[this.colorSet] ? ya[this.colorSet] : ya.colorSet1); this.updateOption("backgroundColor"); this.backgroundColor || (this.backgroundColor = "rgba(0,0,0,0)"); this.updateOption("culture"); this._cultureInfo = new Ha(this.options.culture); this.updateOption("animationEnabled"); this.animationEnabled = this.animationEnabled && w; this.updateOption("animationDuration"); this.updateOption("rangeChanging"); this.updateOption("rangeChanged"); this.updateOption("exportEnabled"); this.updateOption("exportFileName"); this.updateOption("zoomType"); this.toolbar = new Sa(this, this.options.toolbar); if (this.options.zoomEnabled || this.panEnabled) { if (this._zoomButton) U(this._zoomButton, { borderRight: this.toolbar.buttonBorderThickness + "px solid " + this.toolbar.buttonBorderColor, backgroundColor: a.toolbar.itemBackgroundColor, color: a.toolbar.fontColor }), pa(this, this._zoomButton, "zoom"); else { var d = !1; ta(this._zoomButton = document.createElement("button")); pa(this, this._zoomButton, "pan"); this._toolBar.appendChild(this._zoomButton); this._zoomButton.style.borderRight = this.toolbar.buttonBorderThickness + "px solid " + this.toolbar.buttonBorderColor; F(this._zoomButton, "touchstart", function(a) { d = !0 }, this.allDOMEventHandlers); F(this._zoomButton, "click", function() { a.zoomEnabled ? (a.zoomEnabled = !1, a.panEnabled = !0, pa(a, a._zoomButton, "zoom")) : (a.zoomEnabled = !0, a.panEnabled = !1, pa(a, a._zoomButton, "pan")); a.render() }, this.allDOMEventHandlers); F(this._zoomButton, "mousemove", function() { d ? d = !1 : (U(a._zoomButton, { backgroundColor: a.toolbar.itemBackgroundColorOnHover, color: a.toolbar.fontColorOnHover, transition: "0.4s", WebkitTransition: "0.4s" }), 0 >= navigator.userAgent.search("MSIE") && U(a._zoomButton.childNodes[0], { WebkitFilter: "invert(100%)", filter: "invert(100%)" })) }, this.allDOMEventHandlers); F(this._zoomButton, "mouseout", function() { d || (U(a._zoomButton, { backgroundColor: a.toolbar.itemBackgroundColor, color: a.toolbar.fontColor, transition: "0.4s", WebkitTransition: "0.4s" }), 0 >= navigator.userAgent.search("MSIE") && U(a._zoomButton.childNodes[0], { WebkitFilter: "invert(0%)", filter: "invert(0%)" })) }, this.allDOMEventHandlers) } this._resetButton ? (U(this._resetButton, { borderRight: this.toolbar.buttonBorderThickness + "px solid " + this.toolbar.buttonBorderColor, backgroundColor: a.toolbar.itemBackgroundColor, color: a.toolbar.fontColor }), this._resetButton.title = this._cultureInfo.resetText) : (d = !1, ta(this._resetButton = document.createElement("button")), pa(this, this._resetButton, "reset"), this._resetButton.style.borderRight = (this.exportEnabled ? this.toolbar.buttonBorderThickness : 0) + "px solid " + this.toolbar.buttonBorderColor, this._toolBar.appendChild(this._resetButton), F(this._resetButton, "touchstart", function(a) { d = !0 }, this.allDOMEventHandlers), F(this._resetButton, "click", function() { 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, pa(a, a._zoomButton, "pan"), a._defaultCursor = "default", a.overlaidCanvas.style.cursor = a._defaultCursor) : (a.zoomEnabled = !1, a.panEnabled = !1); if (a.sessionVariables.axisX) for (var b = 0; b < a.sessionVariables.axisX.length; b++) a.sessionVariables.axisX[b].newViewportMinimum = null, a.sessionVariables.axisX[b].newViewportMaximum = null; if (a.sessionVariables.axisX2) for (b = 0; b < a.sessionVariables.axisX2.length; b++) a.sessionVariables.axisX2[b].newViewportMinimum = null, a.sessionVariables.axisX2[b].newViewportMaximum = null; if (a.sessionVariables.axisY) for (b = 0; b < a.sessionVariables.axisY.length; b++) a.sessionVariables.axisY[b].newViewportMinimum = null, a.sessionVariables.axisY[b].newViewportMaximum = null; if (a.sessionVariables.axisY2) for (b = 0; b < a.sessionVariables.axisY2.length; b++) a.sessionVariables.axisY2[b].newViewportMinimum = null, a.sessionVariables.axisY2[b].newViewportMaximum = null; a.resetOverlayedCanvas(); 0 >= navigator.userAgent.search("MSIE") && U(a._resetButton.childNodes[0], { WebkitFilter: "invert(0%)", filter: "invert(0%)" }); ta(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", 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)) }, this.allDOMEventHandlers), F(this._resetButton, "mousemove", function() { d || (U(a._resetButton, { backgroundColor: a.toolbar.itemBackgroundColorOnHover, color: a.toolbar.fontColorOnHover, transition: "0.4s", WebkitTransition: "0.4s" }), 0 >= navigator.userAgent.search("MSIE") && U(a._resetButton.childNodes[0], { WebkitFilter: "invert(100%)", filter: "invert(100%)" })) }, this.allDOMEventHandlers), F(this._resetButton, "mouseout", function() { d || (U(a._resetButton, { backgroundColor: a.toolbar.itemBackgroundColor, color: a.toolbar.fontColor, transition: "0.4s", WebkitTransition: "0.4s" }), 0 >= navigator.userAgent.search("MSIE") && U(a._resetButton.childNodes[0], { WebkitFilter: "invert(0%)", filter: "invert(0%)" })) }, this.allDOMEventHandlers), 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), Ja(a._zoomButton, a._resetButton)) : (this.zoomEnabled = !0, this.panEnabled = !1)) } else this.panEnabled = this.zoomEnabled = !1; gb(this); "none" !== this._toolBar.style.display && this._zoomButton && (this.panEnabled ? pa(a, a._zoomButton, "zoom") : pa(a, a._zoomButton, "pan"), a._resetButton.getAttribute("state") !== a._cultureInfo.resetText && pa(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) }; m.prototype._updateSize = function() { var a; a = [this.canvas, this.overlaidCanvas, this._eventManager.ghostCanvas]; var d = 0, c = 0; this.options.width ? d = this.width : this.width = d = 0 < this.container.clientWidth ? this.container.clientWidth : this.width; this.options.height ? c = this.height : this.height = c = 0 < this.container.clientHeight ? this.container.clientHeight : this.height; if (this.canvas.width !== d * ja || this.canvas.height !== c * ja) { for (var b = 0; b < a.length; b++) Ka(a[b], d, 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 }; m.prototype._initialize = function() { this.isNavigator = s(this.parent) || s(this.parent._defaultsKey) || "Navigator" !== this.parent._defaultsKey ? !1 : !0; this._animator ? this._animator.cancelAllAnimations() : this._animator = new W(this); this.removeAllEventListeners(); this.disableToolTip = !1; this._axes = []; this.funnelPyramidClickHandler = this.pieDoughnutClickHandler = null; this._updateOptions(); this.animatedRender = w && this.animationEnabled && 0 === this.renderCount; this._updateSize(); this.clearCanvas(); this.ctx.beginPath(); this.axisX = []; this.axisX2 = []; this.axisY = []; this.axisY2 = []; this._indexLabels = []; this._dataInRenderedOrder = []; this._events = []; this._eventManager && this._eventManager.reset(); this.plotInfo = { axisPlacement: null, plotTypes: [] }; this.layoutManager = new Ca(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, d = null; if (this.options.data) { for (var c = 0; c < this.options.data.length; c++) if (a++, !this.options.data[c].type || 0 <= m._supportedChartTypes.indexOf(this.options.data[c].type)) { var b = new L(this, this.options.data[c], a - 1, ++this._eventManager.lastObjectId); "error" === b.type && (b.linkedDataSeriesIndex = s(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) && (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" === 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(h) : b.dataPoints.sort(h)); this.data.push(b); var e = b.axisPlacement, d = d || e, f; "normal" === e ? "xySwapped" === this.plotInfo.axisPlacement ? f = 'You cannot combine "' + b.type + '" with bar chart' : "none" === this.plotInfo.axisPlacement ? f = 'You cannot combine "' + b.type + '" with pie chart' : null === this.plotInfo.axisPlacement && (this.plotInfo.axisPlacement = "normal") : "xySwapped" === e ? "normal" === this.plotInfo.axisPlacement ? f = 'You cannot combine "' + b.type + '" with line, area, column or pie chart' : "none" === this.plotInfo.axisPlacement ? f = 'You cannot combine "' + b.type + '" with pie chart' : null === this.plotInfo.axisPlacement && (this.plotInfo.axisPlacement = "xySwapped") : "none" === e ? "normal" === this.plotInfo.axisPlacement ? f = 'You cannot combine "' + b.type + '" with line, area, column or bar chart' : "xySwapped" === this.plotInfo.axisPlacement ? f = 'You cannot combine "' + b.type + '" with bar chart' : null === this.plotInfo.axisPlacement && (this.plotInfo.axisPlacement = "none") : null === e && "none" === this.plotInfo.axisPlacement && (f = 'You cannot combine "' + b.type + '" with pie chart'); if (f && window.console) { window.console.log(f); return } } for (c = 0; c < this.data.length; c++) { if ("none" == d && "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 = d || "normal", this.data[c]._linkedSeries = null === this.data[c].linkedDataSeriesIndex ? null : this.data[this.data[c].linkedDataSeriesIndex]) } } this._objectsInitialized = !0; this._plotAreaElements = [] }; m._supportedChartTypes = Ba("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(" ")); m.prototype.setLayout = function() { for (var a = this._plotAreaElements, d = 0; d < this.data.length; d++) if ("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) { if (!this.data[d].axisYType || "primary" === this.data[d].axisYType) if (this.options.axisY && 0 < this.options.axisY.length) { 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 x(this, "axisY", this.options.axisY[c], c, "axisY", "left")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY[c] = new x(this, "axisY", this.options.axisY[c], c, "axisY", "bottom")); this.data[d].axisY = this.axisY[0 <= this.data[d].axisYIndex && this.data[d].axisYIndex < this.axisY.length ? this.data[d].axisYIndex : 0]; this.axisY[0 <= this.data[d].axisYIndex && this.data[d].axisYIndex < this.axisY.length ? this.data[d].axisYIndex : 0].dataSeries.push(this.data[d]) } else this.axisY.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY[0] = new x(this, "axisY", this.options.axisY, 0, "axisY", "left")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY[0] = new x(this, "axisY", this.options.axisY, 0, "axisY", "bottom"))), this.data[d].axisY = this.axisY[0], this.axisY[0].dataSeries.push(this.data[d]); if ("secondary" === this.data[d].axisYType) if (this.options.axisY2 && 0 < this.options.axisY2.length) { if (!this.axisY2.length) for (c = 0; c < this.options.axisY2.length; c++) "normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY2[c] = new x(this, "axisY2", this.options.axisY2[c], c, "axisY", "right")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY2[c] = new x(this, "axisY2", this.options.axisY2[c], c, "axisY", "top")); this.data[d].axisY = this.axisY2[0 <= this.data[d].axisYIndex && this.data[d].axisYIndex < this.axisY2.length ? this.data[d].axisYIndex : 0]; this.axisY2[0 <= this.data[d].axisYIndex && this.data[d].axisYIndex < this.axisY2.length ? this.data[d].axisYIndex : 0].dataSeries.push(this.data[d]) } else this.axisY2.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisY2[0] = new x(this, "axisY2", this.options.axisY2, 0, "axisY", "right")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisY2[0] = new x(this, "axisY2", this.options.axisY2, 0, "axisY", "top"))), this.data[d].axisY = this.axisY2[0], this.axisY2[0].dataSeries.push(this.data[d]); if (!this.data[d].axisXType || "primary" === this.data[d].axisXType) if (this.options.axisX && 0 < this.options.axisX.length) { if (!this.axisX.length) for (c = 0; c < this.options.axisX.length; c++) "normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX[c] = new x(this, "axisX", this.options.axisX[c], c, "axisX", "bottom")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX[c] = new x(this, "axisX", this.options.axisX[c], c, "axisX", "left")); this.data[d].axisX = this.axisX[0 <= this.data[d].axisXIndex && this.data[d].axisXIndex < this.axisX.length ? this.data[d].axisXIndex : 0]; this.axisX[0 <= this.data[d].axisXIndex && this.data[d].axisXIndex < this.axisX.length ? this.data[d].axisXIndex : 0].dataSeries.push(this.data[d]) } else this.axisX.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX[0] = new x(this, "axisX", this.options.axisX, 0, "axisX", "bottom")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX[0] = new x(this, "axisX", this.options.axisX, 0, "axisX", "left"))), this.data[d].axisX = this.axisX[0], this.axisX[0].dataSeries.push(this.data[d]); if ("secondary" === this.data[d].axisXType) if (this.options.axisX2 && 0 < this.options.axisX2.length) { if (!this.axisX2.length) for (c = 0; c < this.options.axisX2.length; c++) "normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX2[c] = new x(this, "axisX2", this.options.axisX2[c], c, "axisX", "top")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX2[c] = new x(this, "axisX2", this.options.axisX2[c], c, "axisX", "right")); this.data[d].axisX = this.axisX2[0 <= this.data[d].axisXIndex && this.data[d].axisXIndex < this.axisX2.length ? this.data[d].axisXIndex : 0]; this.axisX2[0 <= this.data[d].axisXIndex && this.data[d].axisXIndex < this.axisX2.length ? this.data[d].axisXIndex : 0].dataSeries.push(this.data[d]) } else this.axisX2.length || ("normal" === this.plotInfo.axisPlacement ? this._axes.push(this.axisX2[0] = new x(this, "axisX2", this.options.axisX2, 0, "axisX", "top")) : "xySwapped" === this.plotInfo.axisPlacement && this._axes.push(this.axisX2[0] = new x(this, "axisX2", this.options.axisX2, 0, "axisX", "right"))), this.data[d].axisX = this.axisX2[0], this.axisX2[0].dataSeries.push(this.data[d]) } if (this.axisY) { 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" === typeof this.axisY[c].options.margin && (this.axisY[c].margin = 10) } 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 = 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 && "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 (d = 0; d < this._axes.length; d++) if (!s(this._axes[d].viewportMinimum) || !s(this._axes[d].viewportMaximum)) { c = !0; break } c ? (Ja(this._zoomButton, this._resetButton), this._toolBar.style.border = this.toolbar.buttonBorderThickness + "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) : (ta(this._zoomButton, this._resetButton), this._toolBar.style.border = this.toolbar.buttonBorderThickness + "px solid transparent", this.options.zoomEnabled && (this.zoomEnabled = !0, this.panEnabled = !1)); eb(this); this._processData(); this.options.title && (this.title = new xa(this, this.options.title), this.title.dockInsidePlotArea ? a.push(this.title) : this.title.setLayout()); if (this.options.subtitles) for (d = 0; d < this.options.subtitles.length; d++) c = new Ga(this, this.options.subtitles[d], d), this.subtitles.push(c), c.dockInsidePlotArea ? a.push(c) : c.setLayout(); this.legend = new E(this, this.options.legend); for (d = 0; d < this.data.length; d++)(this.data[d].showInLegend || "pie" === this.data[d].type || "doughnut" === this.data[d].type || "funnel" === this.data[d].type || "pyramid" === this.data[d].type) && this.legend.dataSeries.push(this.data[d]); this.legend.dockInsidePlotArea ? a.push(this.legend) : this.legend.setLayout(); for (d = 0; d < this._axes.length; d++) if (this._axes[d].scaleBreaks && this._axes[d].scaleBreaks._appliedBreaks.length) { w ? (this._breaksCanvas = ra(this.width, this.height, !0), this._breaksCanvasCtx = this._breaksCanvas.getContext("2d")) : (this._breaksCanvas = this.canvas, this._breaksCanvasCtx = this.ctx); break } this._preRenderCanvas = ra(this.width, this.height); this._preRenderCtx = this._preRenderCanvas.getContext("2d"); "normal" !== this.plotInfo.axisPlacement && "xySwapped" !== this.plotInfo.axisPlacement || x.setLayout(this.axisX, this.axisX2, this.axisY, this.axisY2, this.plotInfo.axisPlacement, this.layoutManager.getFreeSpace()) }; m.prototype.renderElements = function() { var a = this._plotAreaElements; this.title && !this.title.dockInsidePlotArea && this.title.render(); for (var d = 0; d < this.subtitles.length; d++) this.subtitles[d].dockInsidePlotArea || this.subtitles[d].render(); this.legend.dockInsidePlotArea || this.legend.render(); if ("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) x.render(this.axisX, this.axisX2, this.axisY, this.axisY2, this.plotInfo.axisPlacement); else if ("none" === this.plotInfo.axisPlacement) this.preparePlotArea(); else return; for (d = 0; d < a.length; d++) a[d].setLayout(), a[d].render(); var c = []; if (this.animatedRender) { var b = ra(this.width, this.height); b.getContext("2d").drawImage(this.canvas, 0, 0, this.width, this.height) } var a = this.ctx.miterLimit, e; this.ctx.miterLimit = 3; w && 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 (d = 0; d < this.plotInfo.plotTypes.length; d++) for (var f = this.plotInfo.plotTypes[d], l = 0; l < f.plotUnits.length; l++) { var t = f.plotUnits[l], C = null; t.targetCanvas && wa(t.targetCanvas); t.targetCanvas = null; this.animatedRender && (t.targetCanvas = ra(this.width, this.height), t.targetCanvasCtx = t.targetCanvas.getContext("2d"), e = t.targetCanvasCtx.miterLimit, t.targetCanvasCtx.miterLimit = 3); "line" === t.type ? C = this.renderLine(t) : "stepLine" === t.type ? C = this.renderStepLine(t) : "spline" === t.type ? C = this.renderSpline(t) : "column" === t.type ? C = this.renderColumn(t) : "bar" === t.type ? C = this.renderBar(t) : "area" === t.type ? C = this.renderArea(t) : "stepArea" === t.type ? C = this.renderStepArea(t) : "splineArea" === t.type ? C = this.renderSplineArea(t) : "stackedColumn" === t.type ? C = this.renderStackedColumn(t) : "stackedColumn100" === t.type ? C = this.renderStackedColumn100(t) : "stackedBar" === t.type ? C = this.renderStackedBar(t) : "stackedBar100" === t.type ? C = this.renderStackedBar100(t) : "stackedArea" === t.type ? C = this.renderStackedArea(t) : "stackedArea100" === t.type ? C = this.renderStackedArea100(t) : "bubble" === t.type ? C = C = this.renderBubble(t) : "scatter" === t.type ? C = this.renderScatter(t) : "pie" === t.type ? this.renderPie(t) : "doughnut" === t.type ? this.renderPie(t) : "funnel" === t.type ? C = this.renderFunnel(t) : "pyramid" === t.type ? C = this.renderFunnel(t) : "candlestick" === t.type ? C = this.renderCandlestick(t) : "ohlc" === t.type ? C = this.renderCandlestick(t) : "rangeColumn" === t.type ? C = this.renderRangeColumn(t) : "error" === t.type ? C = this.renderError(t) : "rangeBar" === t.type ? C = this.renderRangeBar(t) : "rangeArea" === t.type ? C = this.renderRangeArea(t) : "rangeSplineArea" === t.type ? C = this.renderRangeSplineArea(t) : "waterfall" === t.type ? C = this.renderWaterfall(t) : "boxAndWhisker" === t.type && (C = this.renderBoxAndWhisker(t)); for (var k = 0; k < t.dataSeriesIndexes.length; k++) this._dataInRenderedOrder.push(this.data[t.dataSeriesIndexes[k]]); this.animatedRender && (t.targetCanvasCtx.miterLimit = e, C && c.push(C)) } this.ctx.miterLimit = a; this.animatedRender && this._breaksCanvasCtx && c.push({ source: this._breaksCanvasCtx, dest: this.plotArea.ctx, animationCallback: J.fadeInAnimation, easingFunction: J.easing.easeInQuad, animationBase: 0, startTimePercent: 0.7 }); this.animatedRender && 0 < this._indexLabels.length && (e = ra(this.width, this.height).getContext("2d"), c.push(this.renderIndexLabels(e))); var n = this; if (0 < c.length) n.disableToolTip = !0, n._animator.animate(200, n.animationDuration, function(a) { n.ctx.clearRect(0, 0, n.width, n.height); n.ctx.drawImage(b, 0, 0, Math.floor(n.width * ja), Math.floor(n.height * ja), 0, 0, n.width, n.height); for (var e = 0; e < c.length; e++) C = c[e], 1 > a && "undefined" !== typeof C.startTimePercent ? a >= C.startTimePercent && C.animationCallback(C.easingFunction(a - C.startTimePercent, 0, 1, 1 - C.startTimePercent), C) : C.animationCallback(C.easingFunction(a, 0, 1, 1), C); n.dispatchEvent("dataAnimationIterationEnd", { chart: n }) }, function() { c = []; for (var a = 0; a < n.plotInfo.plotTypes.length; a++) for (var e = n.plotInfo.plotTypes[a], d = 0; d < e.plotUnits.length; d++) { var f = e.plotUnits[d]; f.targetCanvas && wa(f.targetCanvas); f.targetCanvas = null } b = null; n.disableToolTip = !1; n.dispatchEvent("dataAnimationEnd", { chart: n }) }); else { if (n._breaksCanvas) if (w) n.plotArea.ctx.drawImage(n._breaksCanvas, 0, 0, this.width, this.height); else for (k = 0; k < n._axes.length; k++) n._axes[k].createMask(); 0 < n._indexLabels.length && n.renderIndexLabels(); n.dispatchEvent("dataAnimationIterationEnd", { chart: n }); n.dispatchEvent("dataAnimationEnd", { chart: n }) } this.attachPlotAreaEventHandlers(); this.zoomEnabled || (this.panEnabled || !this._zoomButton || "none" === this._zoomButton.style.display) || ta(this._zoomButton, this._resetButton); this.toolTip._updateToolTip(); this.renderCount++; Fa && (n = this, setTimeout(function() { var a = document.getElementById("ghostCanvasCopy"); a && (Ka(a, n.width, n.height), a.getContext("2d").drawImage(n._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) }; m.prototype.render = function(a) { a && (this.options = a); this._initialize(); this.setLayout(); this.renderElements(); this._preRenderCanvas && wa(this._preRenderCanvas) }; m.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 }) }; m.prototype.categoriseDataSeries = function() { for (var a = "", d = 0; d < this.data.length; d++) if (a = this.data[d], a.dataPoints && (0 !== a.dataPoints.length && a.visible) && 0 <= m._supportedChartTypes.indexOf(a.type)) { for (var c = null, b = !1, e = null, f = !1, l = 0; l < this.plotInfo.plotTypes.length; l++) if (this.plotInfo.plotTypes[l].type === a.type) { b = !0; c = this.plotInfo.plotTypes[l]; break } b || (c = { type: a.type, totalDataSeries: 0, plotUnits: [] }, this.plotInfo.plotTypes.push(c)); for (l = 0; l < c.plotUnits.length; l++) if (c.plotUnits[l].axisYType === a.axisYType && c.plotUnits[l].axisXType === a.axisXType && c.plotUnits[l].axisYIndex === a.axisYIndex && c.plotUnits[l].axisXIndex === a.axisXIndex) { f = !0; e = c.plotUnits[l]; break } f || (e = { type: a.type, previousDataSeriesCount: 0, index: c.plotUnits.length, 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: [] }, c.plotUnits.push(e)); c.totalDataSeries++; e.dataSeriesIndexes.push(d); a.plotUnit = e } for (d = 0; d < this.plotInfo.plotTypes.length; d++) for (c = this.plotInfo.plotTypes[d], l = a = 0; l < c.plotUnits.length; l++) c.plotUnits[l].previousDataSeriesCount = a, a += c.plotUnits[l].dataSeriesIndexes.length }; m.prototype.assignIdToDataPoints = function() { for (var a = 0; a < this.data.length; a++) { var d = this.data[a]; if (d.dataPoints) for (var c = d.dataPoints.length, b = 0; b < c; b++) d.dataPointIds[b] = ++this._eventManager.lastObjectId } }; m.prototype._processData = function() { this.assignIdToDataPoints(); this.categoriseDataSeries(); for (var a = 0; a < this.plotInfo.plotTypes.length; a++) for (var d = this.plotInfo.plotTypes[a], c = 0; c < d.plotUnits.length; c++) { var b = d.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 ? 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) } this.calculateAutoBreaks() }; m.prototype._processMultiseriesPlotUnit = function(a) { if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) for (var d = a.axisY.dataInfo, c = a.axisX.dataInfo, b, e, f = !1, l = 0; l < a.dataSeriesIndexes.length; l++) { var t = this.data[a.dataSeriesIndexes[l]], C = 0, k = !1, n = !1, p; if ("normal" === t.axisPlacement || "xySwapped" === t.axisPlacement) var q = a.axisX.sessionVariables.newViewportMinimum ? a.axisX.sessionVariables.newViewportMinimum : this.options.axisX && this.options.axisX.viewportMinimum ? this.options.axisX.viewportMinimum : this.options.axisX && this.options.axisX.minimum ? this.options.axisX.minimum : a.axisX.logarithmic ? 0 : -Infinity, g = a.axisX.sessionVariables.newViewportMaximum ? a.axisX.sessionVariables.newViewportMaximum : this.options.axisX && this.options.axisX.viewportMaximum ? this.options.axisX.viewportMaximum : this.options.axisX && this.options.axisX.maximum ? this.options.axisX.maximum : Infinity; if (t.dataPoints[C].x && t.dataPoints[C].x.getTime || "dateTime" === t.xValueType) f = !0; for (C = 0; C < t.dataPoints.length; C++) { "undefined" === typeof t.dataPoints[C].x && (t.dataPoints[C].x = C + (a.axisX.logarithmic ? 1 : 0)); t.dataPoints[C].x.getTime ? (f = !0, b = t.dataPoints[C].x.getTime()) : b = t.dataPoints[C].x; e = t.dataPoints[C].y; b < c.min && (c.min = b); b > c.max && (c.max = b); e < d.min && "number" === typeof e && (d.min = e); e > d.max && "number" === typeof e && (d.max = e); if (0 < C) { if (a.axisX.logarithmic) { var r = b / t.dataPoints[C - 1].x; 1 > r && (r = 1 / r); c.minDiff > r && 1 !== r && (c.minDiff = r) } else r = b - t.dataPoints[C - 1].x, 0 > r && (r *= -1), c.minDiff > r && 0 !== r && (c.minDiff = r); null !== e && null !== t.dataPoints[C - 1].y && (a.axisY.logarithmic ? (r = e / t.dataPoints[C - 1].y, 1 > r && (r = 1 / r), d.minDiff > r && 1 !== r && (d.minDiff = r)) : (r = e - t.dataPoints[C - 1].y, 0 > r && (r *= -1), d.minDiff > r && 0 !== r && (d.minDiff = r))) } if (b < q && !k) null !== e && (p = b); else { if (!k && (k = !0, 0 < C)) { C -= 2; continue } if (b > g && !n) n = !0; else if (b > g && n) continue; t.dataPoints[C].label && (a.axisX.labels[b] = t.dataPoints[C].label); b < c.viewPortMin && (c.viewPortMin = b); b > c.viewPortMax && (c.viewPortMax = b); null === e ? c.viewPortMin === b && p < b && (c.viewPortMin = p) : (e < d.viewPortMin && "number" === typeof e && (d.viewPortMin = e), e > d.viewPortMax && "number" === typeof e && (d.viewPortMax = e)) } } t.axisX.valueType = t.xValueType = f ? "dateTime" : "number" } }; m.prototype._processStackedPlotUnit = function(a) { if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) { for (var d = a.axisY.dataInfo, c = a.axisX.dataInfo, b, e, f = !1, l = [], t = [], C = Infinity, k = -Infinity, n = 0; n < a.dataSeriesIndexes.length; n++) { var p = this.data[a.dataSeriesIndexes[n]], q = 0, g = !1, r = !1, h; if ("normal" === p.axisPlacement || "xySwapped" === p.axisPlacement) var nb = a.axisX.sessionVariables.newViewportMinimum ? a.axisX.sessionVariables.newViewportMinimum : this.options.axisX && this.options.axisX.viewportMinimum ? this.options.axisX.viewportMinimum : this.options.axisX && this.options.axisX.minimum ? this.options.axisX.minimum : -Infinity, u = a.axisX.sessionVariables.newViewportMaximum ? a.axisX.sessionVariables.newViewportMaximum : this.options.axisX && this.options.axisX.viewportMaximum ? this.options.axisX.viewportMaximum : this.options.axisX && this.options.axisX.maximum ? this.options.axisX.maximum : Infinity; if (p.dataPoints[q].x && p.dataPoints[q].x.getTime || "dateTime" === p.xValueType) f = !0; for (q = 0; q < p.dataPoints.length; q++) { "undefined" === typeof p.dataPoints[q].x && (p.dataPoints[q].x = q + (a.axisX.logarithmic ? 1 : 0)); p.dataPoints[q].x.getTime ? (f = !0, b = p.dataPoints[q].x.getTime()) : b = p.dataPoints[q].x; e = s(p.dataPoints[q].y) ? 0 : p.dataPoints[q].y; b < c.min && (c.min = b); b > c.max && (c.max = b); if (0 < q) { if (a.axisX.logarithmic) { var m = b / p.dataPoints[q - 1].x; 1 > m && (m = 1 / m); c.minDiff > m && 1 !== m && (c.minDiff = m) } else m = b - p.dataPoints[q - 1].x, 0 > m && (m *= -1), c.minDiff > m && 0 !== m && (c.minDiff = m); null !== e && null !== p.dataPoints[q - 1].y && (a.axisY.logarithmic ? 0 < e && (m = e / p.dataPoints[q - 1].y, 1 > m && (m = 1 / m), d.minDiff > m && 1 !== m && (d.minDiff = m)) : (m = e - p.dataPoints[q - 1].y, 0 > m && (m *= -1), d.minDiff > m && 0 !== m && (d.minDiff = m))) } if (b < nb && !g) null !== p.dataPoints[q].y && (h = b); else { if (!g && (g = !0, 0 < q)) { q -= 2; continue } if (b > u && !r) r = !0; else if (b > u && r) 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 === p.dataPoints[q].y ? c.viewPortMin === b && h < b && (c.viewPortMin = h) : (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 ? l[b] ? l[b] += e : (l[b] = e, C = Math.min(e, C)) : t[b] ? t[b] += e : (t[b] = e, k = Math.max(e, k))) } } a.axisY.scaleBreaks && (a.axisY.scaleBreaks.autoCalculate && 1 <= a.axisY.scaleBreaks.maxNumberOfAutoBreaks) && (d.dataPointYPositiveSums ? (d.dataPointYPositiveSums.push.apply(d.dataPointYPositiveSums, l), d.dataPointYNegativeSums.push.apply(d.dataPointYPositiveSums, t)) : (d.dataPointYPositiveSums = l, d.dataPointYNegativeSums = t)); p.axisX.valueType = p.xValueType = f ? "dateTime" : "number" } for (q in l) l.hasOwnProperty(q) && !isNaN(q) && (a = l[q], a < d.min && (d.min = Math.min(a, C)), a > d.max && (d.max = a), q < c.viewPortMin || q > c.viewPortMax || (a < d.viewPortMin && (d.viewPortMin = Math.min(a, C)), a > d.viewPortMax && (d.viewPortMax = a))); for (q in t) t.hasOwnProperty(q) && !isNaN(q) && (a = t[q], a < d.min && (d.min = a), a > d.max && (d.max = Math.max(a, k)), q < c.viewPortMin || q > c.viewPortMax || (a < d.viewPortMin && (d.viewPortMin = a), a > d.viewPortMax && (d.viewPortMax = Math.max(a, k)))) } }; m.prototype._processStacked100PlotUnit = function(a) { if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) { for (var d = a.axisY.dataInfo, c = a.axisX.dataInfo, b, e, f = !1, l = !1, t = !1, C = [], k = 0; k < a.dataSeriesIndexes.length; k++) { var n = this.data[a.dataSeriesIndexes[k]], p = 0, q = !1, g = !1, r; if ("normal" === n.axisPlacement || "xySwapped" === n.axisPlacement) var h = a.axisX.sessionVariables.newViewportMinimum ? a.axisX.sessionVariables.newViewportMinimum : this.options.axisX && this.options.axisX.viewportMinimum ? this.options.axisX.viewportMinimum : this.options.axisX && this.options.axisX.minimum ? this.options.axisX.minimum : -Infinity, m = a.axisX.sessionVariables.newViewportMaximum ? a.axisX.sessionVariables.newViewportMaximum : this.options.axisX && this.options.axisX.viewportMaximum ? this.options.axisX.viewportMaximum : this.options.axisX && this.options.axisX.maximum ? this.options.axisX.maximum : Infinity; if (n.dataPoints[p].x && n.dataPoints[p].x.getTime || "dateTime" === n.xValueType) f = !0; for (p = 0; p < n.dataPoints.length; p++) { "undefined" === typeof n.dataPoints[p].x && (n.dataPoints[p].x = p + (a.axisX.logarithmic ? 1 : 0)); n.dataPoints[p].x.getTime ? (f = !0, b = n.dataPoints[p].x.getTime()) : b = n.dataPoints[p].x; e = s(n.dataPoints[p].y) ? null : n.dataPoints[p].y; b < c.min && (c.min = b); b > c.max && (c.max = b); if (0 < p) { if (a.axisX.logarithmic) { var u = b / n.dataPoints[p - 1].x; 1 > u && (u = 1 / u); c.minDiff > u && 1 !== u && (c.minDiff = u) } else u = b - n.dataPoints[p - 1].x, 0 > u && (u *= -1), c.minDiff > u && 0 !== u && (c.minDiff = u); s(e) || null === n.dataPoints[p - 1].y || (a.axisY.logarithmic ? 0 < e && (u = e / n.dataPoints[p - 1].y, 1 > u && (u = 1 / u), d.minDiff > u && 1 !== u && (d.minDiff = u)) : (u = e - n.dataPoints[p - 1].y, 0 > u && (u *= -1), d.minDiff > u && 0 !== u && (d.minDiff = u))) } if (b < h && !q) null !== e && (r = b); else { if (!q && (q = !0, 0 < p)) { p -= 2; continue } if (b > m && !g) g = !0; else if (b > m && g) continue; n.dataPoints[p].label && (a.axisX.labels[b] = n.dataPoints[p].label); b < c.viewPortMin && (c.viewPortMin = b); b > c.viewPortMax && (c.viewPortMax = b); null === e ? c.viewPortMin === b && r < b && (c.viewPortMin = r) : (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 ? l = !0 : 0 > e && (t = !0), C[b] = C[b] ? C[b] + Math.abs(e) : Math.abs(e)) } } n.axisX.valueType = n.xValueType = f ? "dateTime" : "number" } a.axisY.logarithmic ? (d.max = s(d.viewPortMax) ? 99 * Math.pow(a.axisY.logarithmBase, -0.05) : Math.max(d.viewPortMax, 99 * Math.pow(a.axisY.logarithmBase, -0.05)), d.min = s(d.viewPortMin) ? 1 : Math.min(d.viewPortMin, 1)) : l && !t ? (d.max = s(d.viewPortMax) ? 99 : Math.max(d.viewPortMax, 99), d.min = s(d.viewPortMin) ? 1 : Math.min(d.viewPortMin, 1)) : l && t ? (d.max = s(d.viewPortMax) ? 99 : Math.max(d.viewPortMax, 99), d.min = s(d.viewPortMin) ? -99 : Math.min(d.viewPortMin, -99)) : !l && t && (d.max = s(d.viewPortMax) ? -1 : Math.max(d.viewPortMax, -1), d.min = s(d.viewPortMin) ? -99 : Math.min(d.viewPortMin, -99)); d.viewPortMin = d.min; d.viewPortMax = d.max; a.dataPointYSums = C } }; m.prototype._processMultiYPlotUnit = function(a) { if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) for (var d = a.axisY.dataInfo, c = a.axisX.dataInfo, b, e, f, l, t = !1, C = 0; C < a.dataSeriesIndexes.length; C++) { var k = this.data[a.dataSeriesIndexes[C]], n = 0, p = !1, q = !1, g, r, h; if ("normal" === k.axisPlacement || "xySwapped" === k.axisPlacement) var m = a.axisX.sessionVariables.newViewportMinimum ? a.axisX.sessionVariables.newViewportMinimum : this.options.axisX && this.options.axisX.viewportMinimum ? this.options.axisX.viewportMinimum : this.options.axisX && this.options.axisX.minimum ? this.options.axisX.minimum : a.axisX.logarithmic ? 0 : -Infinity, u = a.axisX.sessionVariables.newViewportMaximum ? a.axisX.sessionVariables.newViewportMaximum : this.options.axisX && this.options.axisX.viewportMaximum ? this.options.axisX.viewportMaximum : this.options.axisX && this.options.axisX.maximum ? this.options.axisX.maximum : Infinity; if (k.dataPoints[n].x && k.dataPoints[n].x.getTime || "dateTime" === k.xValueType) t = !0; for (n = 0; n < k.dataPoints.length; n++) { "undefined" === typeof k.dataPoints[n].x && (k.dataPoints[n].x = n + (a.axisX.logarithmic ? 1 : 0)); k.dataPoints[n].x.getTime ? (t = !0, b = k.dataPoints[n].x.getTime()) : b = k.dataPoints[n].x; if ((e = k.dataPoints[n].y) && e.length) { f = Math.min.apply(null, e); l = Math.max.apply(null, e); r = !0; for (var B = 0; B < e.length; B++) null === e.k && (r = !1); r && (p || (h = g), g = b) } b < c.min && (c.min = b); b > c.max && (c.max = b); f < d.min && (d.min = f); l > d.max && (d.max = l); 0 < n && (a.axisX.logarithmic ? (r = b / k.dataPoints[n - 1].x, 1 > r && (r = 1 / r), c.minDiff > r && 1 !== r && (c.minDiff = r)) : (r = b - k.dataPoints[n - 1].x, 0 > r && (r *= -1), c.minDiff > r && 0 !== r && (c.minDiff = r)), e && (null !== e[0] && k.dataPoints[n - 1].y && null !== k.dataPoints[n - 1].y[0]) && (a.axisY.logarithmic ? (r = e[0] / k.dataPoints[n - 1].y[0], 1 > r && (r = 1 / r), d.minDiff > r && 1 !== r && (d.minDiff = r)) : (r = e[0] - k.dataPoints[n - 1].y[0], 0 > r && (r *= -1), d.minDiff > r && 0 !== r && (d.minDiff = r)))); if (!(b < m) || p) { if (!p && (p = !0, 0 < n)) { n -= 2; g = h; continue } if (b > u && !q) q = !0; else if (b > u && q) continue; k.dataPoints[n].label && (a.axisX.labels[b] = k.dataPoints[n].label); b < c.viewPortMin && (c.viewPortMin = b); b > c.viewPortMax && (c.viewPortMax = b); if (c.viewPortMin === b && e) for (B = 0; B < e.length; B++) if (null === e[B] && g < b) { c.viewPortMin = g; break } null === e ? c.viewPortMin === b && g < b && (c.viewPortMin = g) : (f < d.viewPortMin && (d.viewPortMin = f), l > d.viewPortMax && (d.viewPortMax = l)) } } k.axisX.valueType = k.xValueType = t ? "dateTime" : "number" } }; m.prototype._processSpecificPlotUnit = function(a) { if ("waterfall" === a.type && a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) for (var d = a.axisY.dataInfo, c = a.axisX.dataInfo, b, e, f = !1, l = 0; l < a.dataSeriesIndexes.length; l++) { var t = this.data[a.dataSeriesIndexes[l]], C = 0, k = !1, n = !1, p = b = 0; if ("normal" === t.axisPlacement || "xySwapped" === t.axisPlacement) var q = a.axisX.sessionVariables.newViewportMinimum ? a.axisX.sessionVariables.newViewportMinimum : this.options.axisX && this.options.axisX.viewportMinimum ? this.options.axisX.viewportMinimum : this.options.axisX && this.options.axisX.minimum ? this.options.axisX.minimum : a.axisX.logarithmic ? 0 : -Infinity, g = a.axisX.sessionVariables.newViewportMaximum ? a.axisX.sessionVariables.newViewportMaximum : this.options.axisX && this.options.axisX.viewportMaximum ? this.options.axisX.viewportMaximum : this.options.axisX && this.options.axisX.maximum ? this.options.axisX.maximum : Infinity; if (t.dataPoints[C].x && t.dataPoints[C].x.getTime || "dateTime" === t.xValueType) f = !0; for (C = 0; C < t.dataPoints.length; C++) "undefined" !== typeof t.dataPoints[C].isCumulativeSum && !0 === t.dataPoints[C].isCumulativeSum ? (t.dataPointEOs[C].cumulativeSumYStartValue = 0, t.dataPointEOs[C].cumulativeSum = 0 === C ? 0 : t.dataPointEOs[C - 1].cumulativeSum, t.dataPoints[C].y = 0 === C ? 0 : t.dataPointEOs[C - 1].cumulativeSum) : "undefined" !== typeof t.dataPoints[C].isIntermediateSum && !0 === t.dataPoints[C].isIntermediateSum ? (t.dataPointEOs[C].cumulativeSumYStartValue = p, t.dataPointEOs[C].cumulativeSum = 0 === C ? 0 : t.dataPointEOs[C - 1].cumulativeSum, t.dataPoints[C].y = 0 === C ? 0 : b, p = 0 === C ? 0 : t.dataPointEOs[C - 1].cumulativeSum, b = 0) : (e = "number" !== typeof t.dataPoints[C].y ? 0 : t.dataPoints[C].y, t.dataPointEOs[C].cumulativeSumYStartValue = 0 === C ? 0 : t.dataPointEOs[C - 1].cumulativeSum, t.dataPointEOs[C].cumulativeSum = 0 === C ? e : t.dataPointEOs[C - 1].cumulativeSum + e, b += e); for (C = 0; C < t.dataPoints.length; C++) if ("undefined" === typeof t.dataPoints[C].x && (t.dataPoints[C].x = C + (a.axisX.logarithmic ? 1 : 0)), t.dataPoints[C].x.getTime ? (f = !0, b = t.dataPoints[C].x.getTime()) : b = t.dataPoints[C].x, e = t.dataPoints[C].y, b < c.min && (c.min = b), b > c.max && (c.max = b), t.dataPointEOs[C].cumulativeSum < d.min && (d.min = t.dataPointEOs[C].cumulativeSum), t.dataPointEOs[C].cumulativeSum > d.max && (d.max = t.dataPointEOs[C].cumulativeSum), 0 < C && (a.axisX.logarithmic ? (p = b / t.dataPoints[C - 1].x, 1 > p && (p = 1 / p), c.minDiff > p && 1 !== p && (c.minDiff = p)) : (p = b - t.dataPoints[C - 1].x, 0 > p && (p *= -1), c.minDiff > p && 0 !== p && (c.minDiff = p)), null !== e && null !== t.dataPoints[C - 1].y && (a.axisY.logarithmic ? (e = t.dataPointEOs[C].cumulativeSum / t.dataPointEOs[C - 1].cumulativeSum, 1 > e && (e = 1 / e), d.minDiff > e && 1 !== e && (d.minDiff = e)) : (e = t.dataPointEOs[C].cumulativeSum - t.dataPointEOs[C - 1].cumulativeSum, 0 > e && (e *= -1), d.minDiff > e && 0 !== e && (d.minDiff = e)))), !(b < q) || k) { if (!k && (k = !0, 0 < C)) { C -= 2; continue } if (b > g && !n) n = !0; else if (b > g && n) continue; t.dataPoints[C].label && (a.axisX.labels[b] = t.dataPoints[C].label); b < c.viewPortMin && (c.viewPortMin = b); b > c.viewPortMax && (c.viewPortMax = b); 0 < C && (t.dataPointEOs[C - 1].cumulativeSum < d.viewPortMin && (d.viewPortMin = t.dataPointEOs[C - 1].cumulativeSum), t.dataPointEOs[C - 1].cumulativeSum > d.viewPortMax && (d.viewPortMax = t.dataPointEOs[C - 1].cumulativeSum)); t.dataPointEOs[C].cumulativeSum < d.viewPortMin && (d.viewPortMin = t.dataPointEOs[C].cumulativeSum); t.dataPointEOs[C].cumulativeSum > d.viewPortMax && (d.viewPortMax = t.dataPointEOs[C].cumulativeSum) } t.axisX.valueType = t.xValueType = f ? "dateTime" : "number" } }; m.prototype.calculateAutoBreaks = function() { 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); 0 >= c && (c = 0.25 * Math.min(b - a, Math.abs(a))); return { startValue: a + c, endValue: b - c } } function d(a) { if (a.dataSeriesIndexes && !(1 > a.dataSeriesIndexes.length)) { var b = a.axisX.scaleBreaks && a.axisX.scaleBreaks.autoCalculate && 1 <= a.axisX.scaleBreaks.maxNumberOfAutoBreaks, c = a.axisY.scaleBreaks && a.axisY.scaleBreaks.autoCalculate && 1 <= a.axisY.scaleBreaks.maxNumberOfAutoBreaks; if (b || c) for (var d = a.axisY.dataInfo, f = a.axisX.dataInfo, g, l = f.min, k = f.max, n = d.min, p = d.max, f = f._dataRanges, d = d._dataRanges, q, t = 0, C = 0; C < a.dataSeriesIndexes.length; C++) { var h = e.data[a.dataSeriesIndexes[C]]; if (!(4 > h.dataPoints.length)) for (t = 0; t < h.dataPoints.length; t++) if (b && (q = (k + 1 - l) * Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold) || 10, 10) / 100, g = h.dataPoints[t].x.getTime ? h.dataPoints[t].x.getTime() : h.dataPoints[t].x, q = Math.floor((g - l) / q), g < f[q].min && (f[q].min = g), g > f[q].max && (f[q].max = g)), c) { var m = (p + 1 - n) * Math.max(parseFloat(a.axisY.scaleBreaks.collapsibleThreshold) || 10, 10) / 100; if ((g = "waterfall" === a.type ? h.dataPointEOs[t].cumulativeSum : h.dataPoints[t].y) && g.length) for (var w = 0; w < g.length; w++) q = Math.floor((g[w] - n) / m), g[w] < d[q].min && (d[q].min = g[w]), g[w] > d[q].max && (d[q].max = g[w]); else s(g) || (q = Math.floor((g - n) / m), g < d[q].min && (d[q].min = g), g > d[q].max && (d[q].max = g)) } } } } function c(a) { 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, d = b.max, f = b._dataRanges, g, l = 0, k = 0; k < a.dataSeriesIndexes.length; k++) { var n = e.data[a.dataSeriesIndexes[k]]; if (!(4 > n.dataPoints.length)) for (l = 0; l < n.dataPoints.length; l++) g = (d + 1 - c) * Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold) || 10, 10) / 100, b = n.dataPoints[l].x.getTime ? n.dataPoints[l].x.getTime() : n.dataPoints[l].x, g = Math.floor((b - c) / g), b < f[g].min && (f[g].min = b), b > f[g].max && (f[g].max = b) } } for (var b, e = this, f = !1, l = 0; l < this._axes.length; l++) if (this._axes[l].scaleBreaks && this._axes[l].scaleBreaks.autoCalculate && 1 <= this._axes[l].scaleBreaks.maxNumberOfAutoBreaks) { f = !0; this._axes[l].dataInfo._dataRanges = []; for (var t = 0; t < 100 / Math.max(parseFloat(this._axes[l].scaleBreaks.collapsibleThreshold) || 10, 10); t++) this._axes[l].dataInfo._dataRanges.push({ min: Infinity, max: -Infinity }) } if (f) { for (l = 0; l < this.plotInfo.plotTypes.length; l++) for (f = this.plotInfo.plotTypes[l], t = 0; t < f.plotUnits.length; t++) b = f.plotUnits[t], "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" === b.type ? d(b) : 0 <= b.type.indexOf("stacked") && c(b); for (l = 0; l < this._axes.length; l++) if (this._axes[l].dataInfo._dataRanges) { var C = this._axes[l].dataInfo.min; b = (this._axes[l].dataInfo.max + 1 - C) * Math.max(parseFloat(this._axes[l].scaleBreaks.collapsibleThreshold) || 10, 10) / 100; var k = this._axes[l].dataInfo._dataRanges, n, p, f = []; if (this._axes[l].dataInfo.dataPointYPositiveSums) { var q = this._axes[l].dataInfo.dataPointYPositiveSums; n = k; for (t in q) if (q.hasOwnProperty(t) && !isNaN(t) && (p = q[t], !s(p))) { var g = Math.floor((p - C) / b); p < n[g].min && (n[g].min = p); p > n[g].max && (n[g].max = p) } delete this._axes[l].dataInfo.dataPointYPositiveSums } if (this._axes[l].dataInfo.dataPointYNegativeSums) { q = this._axes[l].dataInfo.dataPointYNegativeSums; n = k; for (t in q) q.hasOwnProperty(t) && !isNaN(t) && (p = -1 * q[t], s(p) || (g = Math.floor((p - C) / b), p < n[g].min && (n[g].min = p), p > n[g].max && (n[g].max = p))); delete this._axes[l].dataInfo.dataPointYNegativeSums } for (t = 0; t < k.length - 1; t++) if (n = k[t].max, isFinite(n)) for (; t < k.length - 1;) if (C = k[t + 1].min, isFinite(C)) { p = C - n; p > b && f.push({ diff: p, start: n, end: C }); break } else t++; if (this._axes[l].scaleBreaks.customBreaks) for (t = 0; t < this._axes[l].scaleBreaks.customBreaks.length; t++) for (b = 0; b < f.length; b++) if (this._axes[l].scaleBreaks.customBreaks[t].startValue <= f[b].start && f[b].start <= this._axes[l].scaleBreaks.customBreaks[t].endValue || this._axes[l].scaleBreaks.customBreaks[t].startValue <= f[b].start && f[b].start <= this._axes[l].scaleBreaks.customBreaks[t].endValue || f[b].start <= this._axes[l].scaleBreaks.customBreaks[t].startValue && this._axes[l].scaleBreaks.customBreaks[t].startValue <= f[b].end || f[b].start <= this._axes[l].scaleBreaks.customBreaks[t].endValue && this._axes[l].scaleBreaks.customBreaks[t].endValue <= f[b].end) f.splice(b, 1), b--; f.sort(function(a, b) { return b.diff - a.diff }); for (t = 0; t < Math.min(f.length, this._axes[l].scaleBreaks.maxNumberOfAutoBreaks); t++) b = a(f[t].start, f[t].end, this._axes[l].logarithmic ? this._axes[l].dataInfo.max / this._axes[l].dataInfo.min : this._axes[l].dataInfo.max - this._axes[l].dataInfo.min, this._axes[l].logarithmic), this._axes[l].scaleBreaks.autoBreaks.push(new X(this, "autoBreaks", b, t, ++this._eventManager.lastObjectId, this._axes[l].scaleBreaks)), this._axes[l].scaleBreaks._appliedBreaks.push(this._axes[l].scaleBreaks.autoBreaks[this._axes[l].scaleBreaks.autoBreaks.length - 1]); this._axes[l].scaleBreaks._appliedBreaks.sort(function(a, b) { return a.startValue - b.startValue }) } } }; m.prototype.renderCrosshairs = function(a) { for (var d = 0; d < this.axisX.length; d++) this.axisX[d] != a && (this.axisX[d].crosshair && this.axisX[d].crosshair.enabled && !this.axisX[d].crosshair._hidden) && this.axisX[d].showCrosshair(this.axisX[d].crosshair._updatedValue); for (d = 0; d < this.axisX2.length; d++) this.axisX2[d] != a && (this.axisX2[d].crosshair && this.axisX2[d].crosshair.enabled && !this.axisX2[d].crosshair._hidden) && this.axisX2[d].showCrosshair(this.axisX2[d].crosshair._updatedValue); for (d = 0; d < this.axisY.length; d++) this.axisY[d] != a && (this.axisY[d].crosshair && this.axisY[d].crosshair.enabled && !this.axisY[d].crosshair._hidden) && this.axisY[d].showCrosshair(this.axisY[d].crosshair._updatedValue); for (d = 0; d < this.axisY2.length; d++) this.axisY2[d] != a && (this.axisY2[d].crosshair && this.axisY2[d].crosshair.enabled && !this.axisY2[d].crosshair._hidden) && this.axisY2[d].showCrosshair(this.axisY2[d].crosshair._updatedValue) }; m.prototype.getDataPointAtXY = function(a, d, c) { c = c || !1; for (var b = [], e = this._dataInRenderedOrder.length - 1; 0 <= e; e--) { var f = null; (f = this._dataInRenderedOrder[e].getDataPointAtXY(a, d, c)) && b.push(f) } a = null; d = !1; for (c = 0; c < b.length; c++) if ("line" === b[c].dataSeries.type || "stepLine" === b[c].dataSeries.type || "area" === b[c].dataSeries.type || "stepArea" === b[c].dataSeries.type) if (e = ka("markerSize", b[c].dataPoint, b[c].dataSeries) || 8, b[c].distance <= e / 2) { d = !0; break } for (c = 0; c < b.length; c++) d && "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 }; m.prototype.getObjectAtXY = function(a, d, c) { var b = null; if (c = this.getDataPointAtXY(a, d, c || !1)) b = c.dataSeries.dataPointIds[c.dataPointIndex]; else if (w) b = Ya(a, d, 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 && d >= e.y1 && d <= e.y2) && (b = e.id) } return b }; m.prototype.getAutoFontSize = lb; m.prototype.resetOverlayedCanvas = function() { this.overlaidCanvasCtx.clearRect(0, 0, this.width, this.height) }; m.prototype.clearCanvas = kb; m.prototype.attachEvent = function(a) { this._events.push(a) }; m.prototype._touchEventHandler = function(a) { if (a.changedTouches && this.interactivityEnabled) { var d = [], c = a.changedTouches, b = c ? c[0] : a, e = null; switch (a.type) { case "touchstart": case "MSPointerDown": d = ["mousemove", "mousedown"]; this._lastTouchData = Ma(b); this._lastTouchData.time = new Date; break; case "touchmove": case "MSPointerMove": d = ["mousemove"]; break; case "touchend": case "MSPointerUp": var f = this._lastTouchData && this._lastTouchData.time ? new Date - this._lastTouchData.time : 0, d = "touchstart" === this._lastTouchEventType || "MSPointerDown" === this._lastTouchEventType || 300 > f ? ["mouseup", "click"] : ["mouseup"]; break; default: return } if (!(c && 1 < c.length)) { e = Ma(b); e.time = new Date; try { var l = e.y - this._lastTouchData.y, f = e.time - this._lastTouchData.time; if (1 < Math.abs(l) && this._lastTouchData.scroll || 5 < Math.abs(l) && 250 > f) this._lastTouchData.scroll = !0 } catch (t) {} this._lastTouchEventType = a.type; if (this._lastTouchData.scroll && this.zoomEnabled) this.isDrag && this.resetOverlayedCanvas(), this.isDrag = !1; else for (c = 0; c < d.length; c++) if (e = d[c], l = document.createEvent("MouseEvent"), l.initMouseEvent(e, !0, !0, window, 1, b.screenX, b.screenY, b.clientX, b.clientY, !1, !1, !1, !1, 0, null), b.target.dispatchEvent(l), !s(this._lastTouchData.scroll) && !this._lastTouchData.scroll || !this._lastTouchData.scroll && 250 < f || "click" === e) a.preventManipulation && a.preventManipulation(), a.preventDefault && a.cancelable && a.preventDefault() } } }; m.prototype._dispatchRangeEvent = function(a, d) { var c = { chart: this }; c.type = a; c.trigger = d; 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 && 0 < this.axisY2.length && b.push("axisY2"); for (var e = 0; e < b.length; e++) if (s(c[b[e]]) && (c[b[e]] = []), "axisY" === b[e]) for (var f = 0; f < this.axisY.length; f++) c[b[e]].push({ viewportMinimum: this[b[e]][f].sessionVariables.newViewportMinimum, viewportMaximum: this[b[e]][f].sessionVariables.newViewportMaximum }); else if ("axisY2" === b[e]) for (f = 0; f < this.axisY2.length; f++) c[b[e]].push({ viewportMinimum: this[b[e]][f].sessionVariables.newViewportMinimum, viewportMaximum: this[b[e]][f].sessionVariables.newViewportMaximum }); else if ("axisX" === b[e]) for (f = 0; f < this.axisX.length; f++) c[b[e]].push({ viewportMinimum: this[b[e]][f].sessionVariables.newViewportMinimum, viewportMaximum: this[b[e]][f].sessionVariables.newViewportMaximum }); else if ("axisX2" === b[e]) for (f = 0; f < this.axisX2.length; f++) c[b[e]].push({ viewportMinimum: this[b[e]][f].sessionVariables.newViewportMinimum, viewportMaximum: this[b[e]][f].sessionVariables.newViewportMaximum }); this.dispatchEvent(a, c, this) }; m.prototype._mouseEventHandler = function(a) { "undefined" === typeof a.target && a.srcElement && (a.target = a.srcElement); var d = Ma(a), c = a.type, b, e; a.which ? e = 3 == a.which : a.button && (e = 2 == a.button); m.capturedEventParam && (b = m.capturedEventParam, "mouseup" === c && (m.capturedEventParam = null, b.chart.overlaidCanvas.releaseCapture ? b.chart.overlaidCanvas.releaseCapture() : document.documentElement.removeEventListener("mouseup", b.chart._mouseEventHandler, !1)), b.hasOwnProperty(c) && ("mouseup" !== c || b.chart.overlaidCanvas.releaseCapture ? a.target !== b.chart.overlaidCanvas && w || b[c].call(b.context, d.x, d.y) : a.target !== b.chart.overlaidCanvas && (b.chart.isDrag = !1))); if (this.interactivityEnabled) if (this._ignoreNextEvent) this._ignoreNextEvent = !1; else if (a.preventManipulation && a.preventManipulation(), a.preventDefault && a.preventDefault(), Fa && window.console && (window.console.log(c + " --\x3e x: " + d.x + "; y:" + d.y), e && window.console.log(a.which), "mouseup" === c && window.console.log("mouseup")), !e) { if (!m.capturedEventParam && this._events) { for (var f = 0; f < this._events.length; f++) if (this._events[f].hasOwnProperty(c)) if (b = this._events[f], e = b.bounds, d.x >= e.x1 && d.x <= e.x2 && d.y >= e.y1 && d.y <= e.y2) { b[c].call(b.context, d.x, d.y); "mousedown" === c && !0 === b.capture ? (m.capturedEventParam = b, this.overlaidCanvas.setCapture ? this.overlaidCanvas.setCapture() : document.documentElement.addEventListener("mouseup", this._mouseEventHandler, !1)) : "mouseup" === c && (b.chart.overlaidCanvas.releaseCapture ? b.chart.overlaidCanvas.releaseCapture() : document.documentElement.removeEventListener("mouseup", this._mouseEventHandler, !1)); break } else b = null; a.target.style.cursor = b && b.cursor ? b.cursor : this._defaultCursor } c = this.plotArea; if (d.x < c.x1 || d.x > c.x2 || d.y < c.y1 || d.y > c.y2) { this.toolTip && this.toolTip.enabled ? (this.toolTip.hide(), this.toolTip.dispatchEvent("hidden", { chart: this, toolTip: this.toolTip }, this.toolTip)) : this.resetOverlayedCanvas(); for (f = 0; f < this.axisX.length; f++) this.axisX[f].crosshair && this.axisX[f].crosshair.enabled && (this.axisX[f].crosshair.hide(), this.axisX[f].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisX[f].options }, this.axisX[f].crosshair)); for (f = 0; f < this.axisX2.length; f++) this.axisX2[f].crosshair && this.axisX2[f].crosshair.enabled && (this.axisX2[f].crosshair.hide(), this.axisX2[f].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisX2[f].options }, this.axisX2[f].crosshair)); for (f = 0; f < this.axisY.length; f++) this.axisY[f].crosshair && this.axisY[f].crosshair.enabled && (this.axisY[f].crosshair.hide(), this.axisY[f].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisY[f].options }, this.axisY[f].crosshair)); for (f = 0; f < this.axisY2.length; f++) this.axisY2[f].crosshair && this.axisY2[f].crosshair.enabled && (this.axisY2[f].crosshair.hide(), this.axisY2[f].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisY2[f].options }, this.axisY2[f].crosshair)) } this.isDrag && this.zoomEnabled || !this._eventManager || this._eventManager.mouseEventHandler(a) } }; m.prototype._plotAreaMouseDown = function(a, d) { this.isDrag = !0; this.dragStartPoint = { x: a, y: d } }; m.prototype._plotAreaMouseUp = function(a, d) { if (("normal" === this.plotInfo.axisPlacement || "xySwapped" === this.plotInfo.axisPlacement) && this.isDrag) { var c = d - this.dragStartPoint.y, b = a - this.dragStartPoint.x, e = 0 <= this.zoomType.indexOf("x"), f = 0 <= this.zoomType.indexOf("y"), l = !1; this.resetOverlayedCanvas(); if ("xySwapped" === this.plotInfo.axisPlacement) var t = f, f = e, e = t; if (this.panEnabled || this.zoomEnabled) { if (this.panEnabled) for (e = f = 0; e < this._axes.length; e++) c = this._axes[e], c.logarithmic ? c.viewportMinimum < c.minimum ? (f = c.minimum / c.viewportMinimum, c.sessionVariables.newViewportMinimum = c.viewportMinimum * f, c.sessionVariables.newViewportMaximum = c.viewportMaximum * f, l = !0) : c.viewportMaximum > c.maximum && (f = c.viewportMaximum / c.maximum, c.sessionVariables.newViewportMinimum = c.viewportMinimum / f, c.sessionVariables.newViewportMaximum = c.viewportMaximum / f, l = !0) : c.viewportMinimum < c.minimum ? (f = c.minimum - c.viewportMinimum, c.sessionVariables.newViewportMinimum = c.viewportMinimum + f, c.sessionVariables.newViewportMaximum = c.viewportMaximum + f, l = !0) : c.viewportMaximum > c.maximum && (f = c.viewportMaximum - c.maximum, c.sessionVariables.newViewportMinimum = c.viewportMinimum - f, c.sessionVariables.newViewportMaximum = c.viewportMaximum - f, l = !0); else if ((!e || 2 < Math.abs(b)) && (!f || 2 < Math.abs(c)) && this.zoomEnabled) { if (!this.dragStartPoint) return; c = e ? this.dragStartPoint.x : this.plotArea.x1; b = f ? this.dragStartPoint.y : this.plotArea.y1; e = e ? a : this.plotArea.x2; f = f ? d : this.plotArea.y2; 2 < Math.abs(c - e) && 2 < Math.abs(b - f) && this._zoomPanToSelectedRegion(c, b, e, f) && (l = !0) } l && (this._ignoreNextEvent = !0, this._dispatchRangeEvent("rangeChanging", "zoom"), this.stockChart && (this.stockChart.navigator && this.stockChart.navigator.enabled) && (this.stockChart._rangeEventParameter || (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.navigator && this.stockChart.navigator.enabled) && (this.stockChart._rangeEventParameter.type = "rangeChanged", this.stockChart.dispatchEvent("rangeChanged", this.stockChart._rangeEventParameter, this.stockChart)), l && (this.zoomEnabled && "none" === this._zoomButton.style.display) && (Ja(this._zoomButton, this._resetButton), pa(this, this._zoomButton, "pan"), pa(this, this._resetButton, "reset"))) } } this.isDrag = !1; if ("none" !== this.plotInfo.axisPlacement) { this.resetOverlayedCanvas(); if (this.axisX && 0 < this.axisX.length) for (l = 0; l < this.axisX.length; l++) this.axisX[l].crosshair && this.axisX[l].crosshair.enabled && this.axisX[l].renderCrosshair(a, d); if (this.axisX2 && 0 < this.axisX2.length) for (l = 0; l < this.axisX2.length; l++) this.axisX2[l].crosshair && this.axisX2[l].crosshair.enabled && this.axisX2[l].renderCrosshair(a, d); if (this.axisY && 0 < this.axisY.length) for (l = 0; l < this.axisY.length; l++) this.axisY[l].crosshair && this.axisY[l].crosshair.enabled && this.axisY[l].renderCrosshair(a, d); if (this.axisY2 && 0 < this.axisY2.length) for (l = 0; l < this.axisY2.length; l++) this.axisY2[l].crosshair && this.axisY2[l].crosshair.enabled && this.axisY2[l].renderCrosshair(a, d); if (this.axisX && 0 < this.axisX.length) for (l = 0; l < this.axisX.length; l++) this.axisX[l].crosshair && this.axisX[l].crosshair.enabled && this.axisX[l].crosshair.renderLabel(); if (this.axisX2 && 0 < this.axisX2.length) for (l = 0; l < this.axisX2.length; l++) this.axisX2[l].crosshair && this.axisX2[l].crosshair.enabled && this.axisX2[l].crosshair.renderLabel(); if (this.axisY && 0 < this.axisY.length) for (l = 0; l < this.axisY.length; l++) this.axisY[l].crosshair && this.axisY[l].crosshair.enabled && this.axisY[l].crosshair.renderLabel(); if (this.axisY2 && 0 < this.axisY2.length) for (l = 0; l < this.axisY2.length; l++) this.axisY2[l].crosshair && this.axisY2[l].crosshair.enabled && this.axisY2[l].crosshair.renderLabel() } }; m.prototype._plotAreaMouseMove = function(a, d) { if (this.isDrag && "none" !== this.plotInfo.axisPlacement) { var c = 0, b = 0, e = c = null, e = 0 <= this.zoomType.indexOf("x"), f = 0 <= this.zoomType.indexOf("y"), l = this; "xySwapped" === this.plotInfo.axisPlacement && (c = f, f = e, e = c); c = this.dragStartPoint.x - a; b = this.dragStartPoint.y - d; if (2 < Math.abs(c) && 8 > Math.abs(c) && (this.panEnabled || this.zoomEnabled)) { this.toolTip.hide(); this.toolTip && this.toolTip.enabled && this.toolTip.dispatchEvent("hidden", { chart: this, toolTip: this.toolTip }, this.toolTip); for (var t = 0; t < this.axisX.length; t++) this.axisX[t].crosshair && this.axisX[t].crosshair.enabled && (this.axisX[t].crosshair.hide(), this.axisX[t].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisX[t].options }, this.axisX[t].crosshair)); for (t = 0; t < this.axisX2.length; t++) this.axisX2[t].crosshair && this.axisX2[t].crosshair.enabled && (this.axisX2[t].crosshair.hide(), this.axisX2[t].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisX2[t].options }, this.axisX2[t].crosshair)); for (t = 0; t < this.axisY.length; t++) this.axisY[t].crosshair && this.axisY[t].crosshair.enabled && (this.axisY[t].crosshair.hide(), this.axisY[t].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisY[t].options }, this.axisY[t].crosshair)); for (t = 0; t < this.axisY2.length; t++) this.axisY2[t].crosshair && this.axisY2[t].crosshair.enabled && (this.axisY2[t].crosshair.hide(), this.axisY2[t].crosshair.dispatchEvent("hidden", { chart: this, axis: this.axisY2[t].options }, this.axisY2[t].crosshair)) } else this.panEnabled || this.zoomEnabled || this.toolTip.mouseMoveHandler(a, d); if ((!e || 2 < Math.abs(c) || !f || 2 < Math.abs(b)) && (this.panEnabled || this.zoomEnabled)) if (this.panEnabled) e = { x1: e ? this.plotArea.x1 + c : this.plotArea.x1, y1: f ? this.plotArea.y1 + b : this.plotArea.y1, x2: e ? this.plotArea.x2 + c : this.plotArea.x2, y2: f ? this.plotArea.y2 + b : this.plotArea.y2 }, clearTimeout(l._panTimerId), l._panTimerId = setTimeout(function(b, c, e, f) { return function() { l._zoomPanToSelectedRegion(b, c, e, f, !0) && (l._dispatchRangeEvent("rangeChanging", "pan"), l.stockChart && (l.stockChart.navigator && l.stockChart.navigator.enabled) && (l.stockChart._rangeEventParameter.type = "rangeChanging", l.stockChart.dispatchEvent("rangeChanging", l.stockChart._rangeEventParameter, l.stockChart)), l.render(), l._dispatchRangeEvent("rangeChanged", "pan"), l.stockChart && (l.stockChart.navigator && l.stockChart.navigator.enabled) && (l.stockChart._rangeEventParameter.type = "rangeChanged", l.stockChart.dispatchEvent("rangeChanged", l.stockChart._rangeEventParameter, l.stockChart)), l.dragStartPoint.x = a, l.dragStartPoint.y = d) } }(e.x1, e.y1, e.x2, e.y2), 0); else if (this.zoomEnabled) { this.resetOverlayedCanvas(); c = this.overlaidCanvasCtx.globalAlpha; this.overlaidCanvasCtx.fillStyle = "#A89896"; var b = e ? this.dragStartPoint.x : this.plotArea.x1, t = f ? this.dragStartPoint.y : this.plotArea.y1, C = e ? a - this.dragStartPoint.x : this.plotArea.x2 - this.plotArea.x1, k = f ? d - this.dragStartPoint.y : this.plotArea.y2 - this.plotArea.y1; this.validateRegion(b, t, e ? a : this.plotArea.x2 - this.plotArea.x1, f ? d : 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, t, C, k); this.overlaidCanvasCtx.globalAlpha = c } } else if (this.toolTip.mouseMoveHandler(a, d), "none" !== this.plotInfo.axisPlacement) { 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].renderCrosshair(a, d); 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, d); 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, d); 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].renderCrosshair(a, d); 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(); 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() } }; m.prototype._zoomPanToSelectedRegion = function(a, d, c, b, e) { a = this.validateRegion(a, d, c, b, e); d = a.axesWithValidRange; c = a.axesRanges; if (a.isValid) for (b = 0; b < d.length; b++) e = c[b], d[b].setViewPortRange(e.val1, e.val2), this.syncCharts && "y" != this.zoomType && this.syncCharts(e.val1, e.val2), this.stockChart && (this.stockChart._rangeEventParameter = { stockChart: this.stockChart, source: "chart", index: this.stockChart.charts.indexOf(this), minimum: e.val1, maximum: e.val2 }); return a.isValid }; m.prototype.validateRegion = function(a, d, c, b, e) { e = e || !1; for (var f = 0 <= this.zoomType.indexOf("x"), l = 0 <= this.zoomType.indexOf("y"), t = !1, C = [], k = [], n = [], p = 0; p < this._axes.length; p++)("axisX" === this._axes[p].type && f || "axisY" === this._axes[p].type && l) && k.push(this._axes[p]); for (l = 0; l < k.length; l++) { var p = k[l], f = !1, q = p.convertPixelToValue({ x: a, y: d }), g = p.convertPixelToValue({ x: c, y: b }); if (q > g) var r = g, g = q, q = r; if (p.scaleBreaks) for (r = 0; !f && r < p.scaleBreaks._appliedBreaks.length; r++) f = p.scaleBreaks._appliedBreaks[r].startValue <= q && p.scaleBreaks._appliedBreaks[r].endValue >= g; if (isFinite(p.dataInfo.minDiff)) if (r = p.getApparentDifference(q, g, null, !0), !(f || !(this.panEnabled && p.scaleBreaks && p.scaleBreaks._appliedBreaks.length) && (p.logarithmic && r < Math.pow(p.dataInfo.minDiff, 3) || !p.logarithmic && r < 3 * Math.abs(p.dataInfo.minDiff)) || q < p.minimum || g > p.maximum)) C.push(p), n.push({ val1: q, val2: g }), t = !0; else if (!e) { t = !1; break } } return { isValid: t, axesWithValidRange: C, axesRanges: n } }; m.prototype.preparePlotArea = function() { var a = this.plotArea; !w && (0 < a.x1 || 0 < a.y1) && a.ctx.translate(a.x1, a.y1); if ((this.axisX[0] || this.axisX2[0]) && (this.axisY[0] || this.axisY2[0])) { var d = this.axisX[0] ? this.axisX[0].lineCoordinates : this.axisX2[0].lineCoordinates; if (this.axisY && 0 < this.axisY.length && this.axisY[0]) { var c = this.axisY[0]; a.x1 = d.x1 < d.x2 ? d.x1 : c.lineCoordinates.x1; a.y1 = d.y1 < c.lineCoordinates.y1 ? d.y1 : c.lineCoordinates.y1; a.x2 = d.x2 > c.lineCoordinates.x2 ? d.x2 : c.lineCoordinates.x2; a.y2 = d.y2 > d.y1 ? d.y2 : c.lineCoordinates.y2; a.width = a.x2 - a.x1; a.height = a.y2 - a.y1 } this.axisY2 && 0 < this.axisY2.length && this.axisY2[0] && (c = this.axisY2[0], a.x1 = d.x1 < d.x2 ? d.x1 : c.lineCoordinates.x1, a.y1 = d.y1 < c.lineCoordinates.y1 ? d.y1 : c.lineCoordinates.y1, a.x2 = d.x2 > c.lineCoordinates.x2 ? d.x2 : c.lineCoordinates.x2, a.y2 = d.y2 > d.y1 ? d.y2 : c.lineCoordinates.y2, a.width = a.x2 - a.x1, a.height = a.y2 - a.y1) } else d = this.layoutManager.getFreeSpace(), a.x1 = d.x1, a.x2 = d.x2, a.y1 = d.y1, a.y2 = d.y2, a.width = d.width, a.height = d.height; w || (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 Ca(a.x1, a.y1, a.x2, a.y2, 2) }; m.prototype.renderIndexLabels = function(a) { var d = a || this.plotArea.ctx, c = this.plotArea, b = 0, e = 0, f = 0, l = f = e = 0, t = 0, C = b = 0, k = 0; for (a = 0; a < this._indexLabels.length; a++) { var n = this._indexLabels[a], p = n.chartType.toLowerCase(), q, g, l = ka("indexLabelFontColor", n.dataPoint, n.dataSeries), r = ka("indexLabelFontSize", n.dataPoint, n.dataSeries), t = ka("indexLabelFontFamily", n.dataPoint, n.dataSeries), C = ka("indexLabelFontStyle", n.dataPoint, n.dataSeries), k = ka("indexLabelFontWeight", n.dataPoint, n.dataSeries), h = ka("indexLabelBackgroundColor", n.dataPoint, n.dataSeries); q = ka("indexLabelMaxWidth", n.dataPoint, n.dataSeries); g = ka("indexLabelWrap", n.dataPoint, n.dataSeries); var m = ka("indexLabelLineDashType", n.dataPoint, n.dataSeries), u = ka("indexLabelLineColor", n.dataPoint, n.dataSeries), B = s(n.dataPoint.indexLabelLineThickness) ? s(n.dataSeries.options.indexLabelLineThickness) ? 0 : n.dataSeries.options.indexLabelLineThickness : n.dataPoint.indexLabelLineThickness, b = 0 < B ? Math.min(10, ("normal" === this.plotInfo.axisPlacement ? this.plotArea.height : this.plotArea.width) << 0) : 0, z = { percent: null, total: null }, A = null; if (0 <= n.dataSeries.type.indexOf("stacked") || "pie" === n.dataSeries.type || "doughnut" === n.dataSeries.type) z = this.getPercentAndTotal(n.dataSeries, n.dataPoint); if (n.dataSeries.indexLabelFormatter || n.dataPoint.indexLabelFormatter) A = { chart: this, dataSeries: n.dataSeries, dataPoint: n.dataPoint, index: n.indexKeyword, total: z.total, percent: z.percent }; var v = n.dataPoint.indexLabelFormatter ? n.dataPoint.indexLabelFormatter(A) : n.dataPoint.indexLabel ? this.replaceKeywordsWithValue(n.dataPoint.indexLabel, n.dataPoint, n.dataSeries, null, n.indexKeyword) : n.dataSeries.indexLabelFormatter ? n.dataSeries.indexLabelFormatter(A) : n.dataSeries.indexLabel ? this.replaceKeywordsWithValue(n.dataSeries.indexLabel, n.dataPoint, n.dataSeries, null, n.indexKeyword) : null; if (null !== v && "" !== v) { var z = ka("indexLabelPlacement", n.dataPoint, n.dataSeries), A = ka("indexLabelOrientation", n.dataPoint, n.dataSeries), D = ka("indexLabelTextAlign", n.dataPoint, n.dataSeries), y = n.direction, e = n.dataSeries.axisX, f = n.dataSeries.axisY, x = !1, h = new ia(d, { x: 0, y: 0, maxWidth: q ? q : 0.5 * this.width, maxHeight: g ? 5 * r : 1.5 * r, angle: "horizontal" === A ? 0 : -90, text: v, padding: 0, backgroundColor: h, textAlign: D, fontSize: r, fontFamily: t, fontWeight: k, fontColor: l, fontStyle: C, textBaseline: "middle" }); h.measureText(); n.dataSeries.indexLabelMaxWidth = h.maxWidth; if ("stackedarea100" === p) { if (n.point.x < c.x1 || n.point.x > c.x2 || n.point.y < c.y1 - 1 || n.point.y > c.y2 + 1) continue } else if ("rangearea" === p || "rangesplinearea" === p) { if (n.dataPoint.x < e.viewportMinimum || n.dataPoint.x > e.viewportMaximum || Math.max.apply(null, n.dataPoint.y) < f.viewportMinimum || Math.min.apply(null, n.dataPoint.y) > f.viewportMaximum) continue } else if (0 <= p.indexOf("line") || 0 <= p.indexOf("area") || 0 <= p.indexOf("bubble") || 0 <= p.indexOf("scatter")) { if (n.dataPoint.x < e.viewportMinimum || n.dataPoint.x > e.viewportMaximum || n.dataPoint.y < f.viewportMinimum || n.dataPoint.y > f.viewportMaximum) continue } else if (0 <= p.indexOf("column") || "waterfall" === p || "error" === p && !n.axisSwapped) { if (n.dataPoint.x < e.viewportMinimum || n.dataPoint.x > e.viewportMaximum || n.bounds.y1 > c.y2 || n.bounds.y2 < c.y1) continue } else if (0 <= p.indexOf("bar") || "error" === p) { if (n.dataPoint.x < e.viewportMinimum || n.dataPoint.x > e.viewportMaximum || n.bounds.x1 > c.x2 || n.bounds.x2 < c.x1) continue } else if ("candlestick" === p || "ohlc" === p) { if (n.dataPoint.x < e.viewportMinimum || n.dataPoint.x > e.viewportMaximum || Math.max.apply(null, n.dataPoint.y) < f.viewportMinimum || Math.min.apply(null, n.dataPoint.y) > f.viewportMaximum) continue } else if (n.dataPoint.x < e.viewportMinimum || n.dataPoint.x > e.viewportMaximum) continue; l = t = 2; "horizontal" === A ? (C = h.width, k = h.height) : (k = h.width, C = h.height); if ("normal" === this.plotInfo.axisPlacement) { if (0 <= p.indexOf("line") || 0 <= p.indexOf("area")) z = "auto", t = 4; else if (0 <= p.indexOf("stacked")) "auto" === z && (z = "inside"); else if ("bubble" === p || "scatter" === p) z = "inside"; q = n.point.x - ("horizontal" === A ? C / 2 : C / 2 - r / 2); "inside" !== z ? (e = c.y1, f = c.y2, 0 < y ? (g = n.point.y + ("horizontal" === A ? r / 2 : 0) - k - t - b, g < e && (g = "auto" === z ? Math.max(n.point.y, e) + r / 2 + t : e + r / 2 + t, x = g + k > n.point.y)) : (g = n.point.y + r / 2 + t + b, g > f - k && (g = "auto" === z ? Math.min(n.point.y, f) + r / 2 - k - t : f + r / 2 - k, x = g < n.point.y))) : (e = Math.max(n.bounds.y1, c.y1), f = Math.min(n.bounds.y2, c.y2 - k + r / 2), b = 0 <= p.indexOf("range") || "error" === p ? 0 < y ? Math.max(n.bounds.y1, c.y1) + r / 2 + t : Math.min(n.bounds.y2, c.y2) + r / 2 - k + t : (Math.max(n.bounds.y1, c.y1) + Math.min(n.bounds.y2, c.y2)) / 2 - k / 2 + r / 2 + ("horizontal" === A ? t : 0), 0 < y ? (g = Math.max(n.point.y, b), g < e && ("bubble" === p || "scatter" === p) && (g = Math.max(n.point.y - k - t, c.y1 + t))) : (g = Math.min(n.point.y, b), g > f - k - t && ("bubble" === p || "scatter" === p) && (g = Math.min(n.point.y + t, c.y2 - k - t))), g = Math.min(g, f)) } else 0 <= p.indexOf("line") || 0 <= p.indexOf("area") || 0 <= p.indexOf("scatter") ? (z = "auto", l = 4) : 0 <= p.indexOf("stacked") ? "auto" === z && (z = "inside") : "bubble" === p && (z = "inside"), g = n.point.y + r / 2 - k / 2 + t, "inside" !== z ? (e = c.x1, f = c.x2, 0 > y ? (q = n.point.x - ("horizontal" === A ? C : C - r / 2) - l - b, q < e && (q = "auto" === z ? Math.max(n.point.x, e) + l : e + l, x = q + C > n.point.x)) : (q = n.point.x + ("horizontal" === A ? 0 : r / 2) + l + b, q > f - C - l - b && (q = "auto" === z ? Math.min(n.point.x, f) - ("horizontal" === A ? C : C / 2) - l : f - C - l, x = q < n.point.x))) : (e = Math.max(n.bounds.x1, c.x1), Math.min(n.bounds.x2, c.x2), b = 0 <= p.indexOf("range") || "error" === p ? 0 > y ? Math.max(n.bounds.x1, c.x1) + r / 2 + l : Math.min(n.bounds.x2, c.x2) - C / 2 - l + ("horizontal" === A ? 0 : r / 2) : (Math.max(n.bounds.x1, c.x1) + Math.min(n.bounds.x2, c.x2)) / 2 + ("horizontal" === A ? 0 : r / 2), q = 0 > y ? Math.max(n.point.x, b) - ("horizontal" === A ? C / 2 : 0) : Math.min(n.point.x, b) - C / 2, q = Math.max(q, e)); "vertical" === A && (g += k - r / 2); h.x = q; h.y = g; h.render(!0); B && ("inside" !== z && (0 > p.indexOf("bar") && ("error" !== p || !n.axisSwapped) && n.point.x > c.x1 && n.point.x < c.x2 || !x) && (0 > p.indexOf("column") && ("error" !== p || n.axisSwapped) && n.point.y > c.y1 && n.point.y < c.y2 || !x)) && (d.lineWidth = B, d.strokeStyle = u ? u : "gray", d.setLineDash && d.setLineDash(N(m, B)), d.beginPath(), d.moveTo(n.point.x, n.point.y), 0 <= p.indexOf("bar") || "error" === p && n.axisSwapped ? d.lineTo(q + (0 < n.direction ? -l : C + l) + ("vertical" === A ? -r / 2 : 0), g + ("vertical" === A ? -k / 2 : k / 2 - r / 2) - t) : 0 <= p.indexOf("column") || "error" === p && !n.axisSwapped ? d.lineTo(q + C / 2 - ("horizontal" === A ? 0 : r / 2), g + ("vertical" === A ? (g - k < n.point.y ? 0 : -k) + t : (g - r / 2 < n.point.y ? k : 0) - r / 2)) : d.lineTo(q + C / 2 - ("horizontal" === A ? 0 : r / 2), g + ("vertical" === A ? g - k < n.point.y ? 0 : -k : (g - r / 2 < n.point.y ? k : 0) - r / 2)), d.stroke()) } } d = { source: d, dest: this.plotArea.ctx, animationCallback: J.fadeInAnimation, easingFunction: J.easing.easeInQuad, animationBase: 0, startTimePercent: 0.7 }; for (a = 0; a < this._indexLabels.length; a++) n = this._indexLabels[a], h = ka("indexLabelBackgroundColor", n.dataPoint, n.dataSeries), n.dataSeries.indexLabelBackgroundColor = s(h) ? w ? "transparent" : null : h; return d }; m.prototype.renderLine = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d; if (!(0 >= a.dataSeriesIndexes.length)) { 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 f = [], l, t = 0; t < a.dataSeriesIndexes.length; t++) { var C = a.dataSeriesIndexes[t], k = this.data[C]; c.lineWidth = k.lineThickness; var n = k.dataPoints, p = "solid"; if (c.setLineDash) { var q = N(k.nullDataLineDashType, k.lineThickness), p = k.lineDashType, g = N(p, k.lineThickness); c.setLineDash(g) } var r = k.id; this._eventManager.objectMap[r] = { objectType: "dataSeries", dataSeriesIndex: C }; r = Q(r); b.strokeStyle = r; b.lineWidth = 0 < k.lineThickness ? Math.max(k.lineThickness, 4) : 0; var r = k._colorSet, h = r = k.lineColor = k.options.lineColor ? k.options.lineColor : r[0]; c.strokeStyle = r; var m = !0, u = 0, s, z; c.beginPath(); if (0 < n.length) { for (var A = !1, u = 0; u < n.length; u++) if (s = n[u].x.getTime ? n[u].x.getTime() : n[u].x, !(s < a.axisX.dataInfo.viewPortMin || s > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !A))) if ("number" !== typeof n[u].y) 0 < u && !(k.connectNullData || A || m) && (c.stroke(), w && b.stroke()), A = !0; else { s = a.axisX.convertValueToPixel(s); z = a.axisY.convertValueToPixel(n[u].y); var v = k.dataPointIds[u]; this._eventManager.objectMap[v] = { id: v, objectType: "dataPoint", dataSeriesIndex: C, dataPointIndex: u, x1: s, y1: z }; m || A ? (!m && k.connectNullData ? (c.setLineDash && (k.options.nullDataLineDashType || p === k.lineDashType && k.lineDashType !== k.nullDataLineDashType) && (c.stroke(), c.beginPath(), c.moveTo(l.x, l.y), p = k.nullDataLineDashType, c.setLineDash(q)), c.lineTo(s, z), w && b.lineTo(s, z)) : (c.beginPath(), c.moveTo(s, z), w && (b.beginPath(), b.moveTo(s, z))), A = m = !1) : (c.lineTo(s, z), w && b.lineTo(s, z), 0 == u % 500 && (c.stroke(), c.beginPath(), c.moveTo(s, z), w && (b.stroke(), b.beginPath(), b.moveTo(s, z)))); l = { x: s, y: z }; u < n.length - 1 && (h !== (n[u].lineColor || r) || p !== (n[u].lineDashType || k.lineDashType)) && (c.stroke(), c.beginPath(), c.moveTo(s, z), h = n[u].lineColor || r, c.strokeStyle = h, c.setLineDash && (n[u].lineDashType ? (p = n[u].lineDashType, c.setLineDash(N(p, k.lineThickness))) : (p = k.lineDashType, c.setLineDash(g)))); if (0 !== n[u].markerSize && (0 < n[u].markerSize || 0 < k.markerSize)) { var D = k.getMarkerProperties(u, s, z, c); f.push(D); v = Q(v); w && f.push({ x: s, y: z, ctx: b, type: D.type, size: D.size, color: v, borderColor: v, borderThickness: D.borderThickness }) }(n[u].indexLabel || k.indexLabel || n[u].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({ chartType: "line", dataPoint: n[u], dataSeries: k, point: { x: s, y: z }, direction: 0 > n[u].y === a.axisY.reversed ? 1 : -1, color: r }) } c.stroke(); w && b.stroke() } } $.drawMarkers(f); w && (d.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), b.beginPath()); c.restore(); c.beginPath(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.xClipAnimation, easingFunction: J.easing.linear, animationBase: 0 } } }; m.prototype.renderStepLine = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d; if (!(0 >= a.dataSeriesIndexes.length)) { 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 f = [], l, t = 0; t < a.dataSeriesIndexes.length; t++) { var C = a.dataSeriesIndexes[t], k = this.data[C]; c.lineWidth = k.lineThickness; var n = k.dataPoints, p = "solid"; if (c.setLineDash) { var q = N(k.nullDataLineDashType, k.lineThickness), p = k.lineDashType, g = N(p, k.lineThickness); c.setLineDash(g) } var r = k.id; this._eventManager.objectMap[r] = { objectType: "dataSeries", dataSeriesIndex: C }; r = Q(r); b.strokeStyle = r; b.lineWidth = 0 < k.lineThickness ? Math.max(k.lineThickness, 4) : 0; var r = k._colorSet, h = r = k.lineColor = k.options.lineColor ? k.options.lineColor : r[0]; c.strokeStyle = r; var m = !0, u = 0, s, z; c.beginPath(); if (0 < n.length) { for (var A = !1, u = 0; u < n.length; u++) if (s = n[u].getTime ? n[u].x.getTime() : n[u].x, !(s < a.axisX.dataInfo.viewPortMin || s > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !A))) if ("number" !== typeof n[u].y) 0 < u && !(k.connectNullData || A || m) && (c.stroke(), w && b.stroke()), A = !0; else { var v = z; s = a.axisX.convertValueToPixel(s); z = a.axisY.convertValueToPixel(n[u].y); var D = k.dataPointIds[u]; this._eventManager.objectMap[D] = { id: D, objectType: "dataPoint", dataSeriesIndex: C, dataPointIndex: u, x1: s, y1: z }; m || A ? (!m && k.connectNullData ? (c.setLineDash && (k.options.nullDataLineDashType || p === k.lineDashType && k.lineDashType !== k.nullDataLineDashType) && (c.stroke(), c.beginPath(), c.moveTo(l.x, l.y), p = k.nullDataLineDashType, c.setLineDash(q)), c.lineTo(s, v), c.lineTo(s, z), w && (b.lineTo(s, v), b.lineTo(s, z))) : (c.beginPath(), c.moveTo(s, z), w && (b.beginPath(), b.moveTo(s, z))), A = m = !1) : (c.lineTo(s, v), w && b.lineTo(s, v), c.lineTo(s, z), w && b.lineTo(s, z), 0 == u % 500 && (c.stroke(), c.beginPath(), c.moveTo(s, z), w && (b.stroke(), b.beginPath(), b.moveTo(s, z)))); l = { x: s, y: z }; u < n.length - 1 && (h !== (n[u].lineColor || r) || p !== (n[u].lineDashType || k.lineDashType)) && (c.stroke(), c.beginPath(), c.moveTo(s, z), h = n[u].lineColor || r, c.strokeStyle = h, c.setLineDash && (n[u].lineDashType ? (p = n[u].lineDashType, c.setLineDash(N(p, k.lineThickness))) : (p = k.lineDashType, c.setLineDash(g)))); 0 !== n[u].markerSize && (0 < n[u].markerSize || 0 < k.markerSize) && (v = k.getMarkerProperties(u, s, z, c), f.push(v), D = Q(D), w && f.push({ x: s, y: z, ctx: b, type: v.type, size: v.size, color: D, borderColor: D, borderThickness: v.borderThickness })); (n[u].indexLabel || k.indexLabel || n[u].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({ chartType: "stepLine", dataPoint: n[u], dataSeries: k, point: { x: s, y: z }, direction: 0 > n[u].y === a.axisY.reversed ? 1 : -1, color: r }) } c.stroke(); w && b.stroke() } } $.drawMarkers(f); w && (d.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), b.beginPath()); c.restore(); c.beginPath(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.xClipAnimation, easingFunction: J.easing.linear, animationBase: 0 } } }; m.prototype.renderSpline = function(a) { function d(a) { a = v(a, 2); if (0 < a.length) { b.beginPath(); w && e.beginPath(); b.moveTo(a[0].x, a[0].y); a[0].newStrokeStyle && (b.strokeStyle = a[0].newStrokeStyle); a[0].newLineDashArray && b.setLineDash(a[0].newLineDashArray); w && 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), w && 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), a[c + 3].newLineDashArray && b.setLineDash(a[c + 3].newLineDashArray), w && (e.stroke(), e.beginPath(), e.moveTo(a[c + 3].x, a[c + 3].y)); b.stroke(); w && e.stroke() } } var c = a.targetCanvasCtx || this.plotArea.ctx, b = w ? this._preRenderCtx : c; if (!(0 >= a.dataSeriesIndexes.length)) { var e = this._eventManager.ghostCtx; b.save(); var f = this.plotArea; b.beginPath(); b.rect(f.x1, f.y1, f.width, f.height); b.clip(); for (var l = [], t = 0; t < a.dataSeriesIndexes.length; t++) { var C = a.dataSeriesIndexes[t], k = this.data[C]; b.lineWidth = k.lineThickness; var n = k.dataPoints, p = "solid"; if (b.setLineDash) { var q = N(k.nullDataLineDashType, k.lineThickness), p = k.lineDashType, g = N(p, k.lineThickness); b.setLineDash(g) } var r = k.id; this._eventManager.objectMap[r] = { objectType: "dataSeries", dataSeriesIndex: C }; r = Q(r); e.strokeStyle = r; e.lineWidth = 0 < k.lineThickness ? Math.max(k.lineThickness, 4) : 0; var r = k._colorSet, h = r = k.lineColor = k.options.lineColor ? k.options.lineColor : r[0]; b.strokeStyle = r; var m = 0, u, s, z = []; b.beginPath(); if (0 < n.length) for (s = !1, m = 0; m < n.length; m++) if (u = n[m].getTime ? n[m].x.getTime() : n[m].x, !(u < a.axisX.dataInfo.viewPortMin || u > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !s))) if ("number" !== typeof n[m].y) 0 < m && !s && (k.connectNullData ? b.setLineDash && (0 < z.length && (k.options.nullDataLineDashType || !n[m - 1].lineDashType)) && (z[z.length - 1].newLineDashArray = q, p = k.nullDataLineDashType) : (d(z), z = [])), s = !0; else { u = a.axisX.convertValueToPixel(u); s = a.axisY.convertValueToPixel(n[m].y); var A = k.dataPointIds[m]; this._eventManager.objectMap[A] = { id: A, objectType: "dataPoint", dataSeriesIndex: C, dataPointIndex: m, x1: u, y1: s }; z[z.length] = { x: u, y: s }; m < n.length - 1 && (h !== (n[m].lineColor || r) || p !== (n[m].lineDashType || k.lineDashType)) && (h = n[m].lineColor || r, z[z.length - 1].newStrokeStyle = h, b.setLineDash && (n[m].lineDashType ? (p = n[m].lineDashType, z[z.length - 1].newLineDashArray = N(p, k.lineThickness)) : (p = k.lineDashType, z[z.length - 1].newLineDashArray = g))); if (0 !== n[m].markerSize && (0 < n[m].markerSize || 0 < k.markerSize)) { var Oa = k.getMarkerProperties(m, u, s, b); l.push(Oa); A = Q(A); w && l.push({ x: u, y: s, ctx: e, type: Oa.type, size: Oa.size, color: A, borderColor: A, borderThickness: Oa.borderThickness }) }(n[m].indexLabel || k.indexLabel || n[m].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({ chartType: "spline", dataPoint: n[m], dataSeries: k, point: { x: u, y: s }, direction: 0 > n[m].y === a.axisY.reversed ? 1 : -1, color: r }); s = !1 } d(z) } $.drawMarkers(l); w && (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(f.x1, f.y1, f.width, f.height), e.beginPath()); b.restore(); b.beginPath(); return { source: c, dest: this.plotArea.ctx, animationCallback: J.xClipAnimation, easingFunction: J.easing.linear, animationBase: 0 } } }; m.prototype.renderColumn = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d; if (!(0 >= a.dataSeriesIndexes.length)) { var b = null, e = this.plotArea, f = 0, l, t, C, k = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), f = this.options.dataPointMinWidth ? this.dataPointMinWidth : 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, p = a.axisX.dataInfo.minDiff; isFinite(p) || (p = 0.3 * Math.abs(a.axisX.range)); p = this.dataPointWidth = this.options.dataPointWidth ? 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 && f > n && (f = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, n)); !this.dataPointMaxWidth && (this.dataPointMinWidth && n < f) && (n = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, f)); p < f && (p = f); p > n && (p = n); c.save(); w && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); w && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); for (n = 0; n < a.dataSeriesIndexes.length; n++) { var q = a.dataSeriesIndexes[n], g = this.data[q], r = g.dataPoints; if (0 < r.length) for (var h = 5 < p && g.bevelEnabled ? !0 : !1, f = 0; f < r.length; f++) if (r[f].getTime ? C = r[f].x.getTime() : C = r[f].x, !(C < a.axisX.dataInfo.viewPortMin || C > a.axisX.dataInfo.viewPortMax) && "number" === typeof r[f].y) { l = a.axisX.convertValueToPixel(C); t = a.axisY.convertValueToPixel(r[f].y); l = a.axisX.reversed ? l + a.plotType.totalDataSeries * p / 2 - (a.previousDataSeriesCount + n) * p << 0 : l - a.plotType.totalDataSeries * p / 2 + (a.previousDataSeriesCount + n) * p << 0; var m = a.axisX.reversed ? l - p << 0 : l + p << 0, u; 0 <= r[f].y ? u = k : (u = t, t = k); t > u && (b = t, t = u, u = b); b = r[f].color ? r[f].color : g._colorSet[f % g._colorSet.length]; ea(c, a.axisX.reversed ? m : l, t, a.axisX.reversed ? l : m, u, b, 0, null, h && (a.axisY.reversed ? 0 > r[f].y : 0 <= r[f].y), (a.axisY.reversed ? 0 <= r[f].y : 0 > r[f].y) && h, !1, !1, g.fillOpacity); b = g.dataPointIds[f]; this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: f, x1: l, y1: t, x2: m, y2: u }; b = Q(b); w && ea(this._eventManager.ghostCtx, a.axisX.reversed ? m : l, t, a.axisX.reversed ? l : m, u, b, 0, null, !1, !1, !1, !1); (r[f].indexLabel || g.indexLabel || r[f].indexLabelFormatter || g.indexLabelFormatter) && this._indexLabels.push({ chartType: "column", dataPoint: r[f], dataSeries: g, point: { x: l + (m - l) / 2, y: 0 > r[f].y === a.axisY.reversed ? t : u }, direction: 0 > r[f].y === a.axisY.reversed ? 1 : -1, bounds: { x1: l, y1: Math.min(t, u), x2: m, y2: Math.max(t, u) }, color: b }) } } w && (d.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()); c.restore(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.yScaleAnimation, easingFunction: J.easing.easeOutQuart, animationBase: k < a.axisY.bounds.y1 ? a.axisY.bounds.y1 : k > a.axisY.bounds.y2 ? a.axisY.bounds.y2 : k } } }; m.prototype.renderStackedColumn = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d; if (!(0 >= a.dataSeriesIndexes.length)) { var b = null, e = this.plotArea, f = [], l = [], t = [], C = [], k = 0, n, p, q = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), k = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1, g = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : 0.15 * this.width << 0, r = a.axisX.dataInfo.minDiff; isFinite(r) || (r = 0.3 * Math.abs(a.axisX.range)); r = this.options.dataPointWidth ? this.dataPointWidth : 0.9 * (e.width * (a.axisX.logarithmic ? Math.log(r) / Math.log(a.axisX.range) : Math.abs(r) / Math.abs(a.axisX.range)) / a.plotType.plotUnits.length) << 0; this.dataPointMaxWidth && k > g && (k = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, g)); !this.dataPointMaxWidth && (this.dataPointMinWidth && g < k) && (g = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, k)); r < k && (r = k); r > g && (r = g); c.save(); w && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); w && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); for (g = 0; g < a.dataSeriesIndexes.length; g++) { var h = a.dataSeriesIndexes[g], m = this.data[h], u = m.dataPoints; if (0 < u.length) { var s = 5 < r && m.bevelEnabled ? !0 : !1; c.strokeStyle = "#4572A7 "; for (k = 0; k < u.length; k++) if (b = u[k].x.getTime ? u[k].x.getTime() : u[k].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof u[k].y) { n = a.axisX.convertValueToPixel(b); n = n - a.plotType.plotUnits.length * r / 2 + a.index * r << 0; var z = n + r << 0, A; if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 < u[k].y) t[b] = u[k].y + (t[b] ? t[b] : 0), 0 < t[b] && (p = a.axisY.convertValueToPixel(t[b]), A = "undefined" !== typeof f[b] ? f[b] : q, f[b] = p); else if (a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 >= u[k].y) C[b] = u[k].y + (C[b] ? C[b] : 0), A = a.axisY.convertValueToPixel(C[b]), p = "undefined" !== typeof l[b] ? l[b] : q, l[b] = A; else if (p = a.axisY.convertValueToPixel(u[k].y), 0 <= u[k].y) { var v = "undefined" !== typeof f[b] ? f[b] : 0; p -= v; A = q - v; f[b] = v + (A - p) } else v = l[b] ? l[b] : 0, A = p + v, p = q + v, l[b] = v + (A - p); b = u[k].color ? u[k].color : m._colorSet[k % m._colorSet.length]; ea(c, n, a.axisY.reversed ? A : p, z, a.axisY.reversed ? p : A, b, 0, null, s && (a.axisY.reversed ? 0 > u[k].y : 0 <= u[k].y), (a.axisY.reversed ? 0 <= u[k].y : 0 > u[k].y) && s, !1, !1, m.fillOpacity); b = m.dataPointIds[k]; this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: h, dataPointIndex: k, x1: n, y1: p, x2: z, y2: A }; b = Q(b); w && ea(this._eventManager.ghostCtx, n, p, z, A, b, 0, null, !1, !1, !1, !1); (u[k].indexLabel || m.indexLabel || u[k].indexLabelFormatter || m.indexLabelFormatter) && this._indexLabels.push({ chartType: "stackedColumn", dataPoint: u[k], dataSeries: m, point: { x: n + (z - n) / 2, y: 0 <= u[k].y ? p : A }, direction: 0 > u[k].y === a.axisY.reversed ? 1 : -1, bounds: { x1: n, y1: Math.min(p, A), x2: z, y2: Math.max(p, A) }, color: b }) } } } w && (d.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()); c.restore(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.yScaleAnimation, easingFunction: J.easing.easeOutQuart, animationBase: q < a.axisY.bounds.y1 ? a.axisY.bounds.y1 : q > a.axisY.bounds.y2 ? a.axisY.bounds.y2 : q } } }; m.prototype.renderStackedColumn100 = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d; if (!(0 >= a.dataSeriesIndexes.length)) { var b = null, e = this.plotArea, f = [], l = [], t = [], C = [], k = 0, n, p, q = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), k = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1, g = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : 0.15 * this.width << 0, r = a.axisX.dataInfo.minDiff; isFinite(r) || (r = 0.3 * Math.abs(a.axisX.range)); r = this.options.dataPointWidth ? this.dataPointWidth : 0.9 * (e.width * (a.axisX.logarithmic ? Math.log(r) / Math.log(a.axisX.range) : Math.abs(r) / Math.abs(a.axisX.range)) / a.plotType.plotUnits.length) << 0; this.dataPointMaxWidth && k > g && (k = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, g)); !this.dataPointMaxWidth && (this.dataPointMinWidth && g < k) && (g = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, k)); r < k && (r = k); r > g && (r = g); c.save(); w && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); w && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); for (g = 0; g < a.dataSeriesIndexes.length; g++) { var h = a.dataSeriesIndexes[g], m = this.data[h], u = m.dataPoints; if (0 < u.length) for (var s = 5 < r && m.bevelEnabled ? !0 : !1, k = 0; k < u.length; k++) if (b = u[k].x.getTime ? u[k].x.getTime() : u[k].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof u[k].y) { n = a.axisX.convertValueToPixel(b); p = 0 !== a.dataPointYSums[b] ? 100 * (u[k].y / a.dataPointYSums[b]) : 0; n = n - a.plotType.plotUnits.length * r / 2 + a.index * r << 0; var z = n + r << 0, A; if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 < u[k].y) { t[b] = p + ("undefined" !== typeof t[b] ? t[b] : 0); if (0 >= t[b]) continue; p = a.axisY.convertValueToPixel(t[b]); A = f[b] ? f[b] : q; f[b] = p } else if (a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 >= u[k].y) C[b] = p + ("undefined" !== typeof C[b] ? C[b] : 0), A = a.axisY.convertValueToPixel(C[b]), p = l[b] ? l[b] : q, l[b] = A; else if (p = a.axisY.convertValueToPixel(p), 0 <= u[k].y) { var v = "undefined" !== typeof f[b] ? f[b] : 0; p -= v; A = q - v; a.dataSeriesIndexes.length - 1 === g && 1 >= Math.abs(e.y1 - p) && (p = e.y1); f[b] = v + (A - p) } else v = "undefined" !== typeof l[b] ? l[b] : 0, A = p + v, p = q + v, a.dataSeriesIndexes.length - 1 === g && 1 >= Math.abs(e.y2 - A) && (A = e.y2), l[b] = v + (A - p); b = u[k].color ? u[k].color : m._colorSet[k % m._colorSet.length]; ea(c, n, a.axisY.reversed ? A : p, z, a.axisY.reversed ? p : A, b, 0, null, s && (a.axisY.reversed ? 0 > u[k].y : 0 <= u[k].y), (a.axisY.reversed ? 0 <= u[k].y : 0 > u[k].y) && s, !1, !1, m.fillOpacity); b = m.dataPointIds[k]; this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: h, dataPointIndex: k, x1: n, y1: p, x2: z, y2: A }; b = Q(b); w && ea(this._eventManager.ghostCtx, n, p, z, A, b, 0, null, !1, !1, !1, !1); (u[k].indexLabel || m.indexLabel || u[k].indexLabelFormatter || m.indexLabelFormatter) && this._indexLabels.push({ chartType: "stackedColumn100", dataPoint: u[k], dataSeries: m, point: { x: n + (z - n) / 2, y: 0 <= u[k].y ? p : A }, direction: 0 > u[k].y === a.axisY.reversed ? 1 : -1, bounds: { x1: n, y1: Math.min(p, A), x2: z, y2: Math.max(p, A) }, color: b }) } } w && (d.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()); c.restore(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.yScaleAnimation, easingFunction: J.easing.easeOutQuart, animationBase: q < a.axisY.bounds.y1 ? a.axisY.bounds.y1 : q > a.axisY.bounds.y2 ? a.axisY.bounds.y2 : q } } }; m.prototype.renderBar = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d; if (!(0 >= a.dataSeriesIndexes.length)) { var b = null, e = this.plotArea, f = 0, l, t, C, k = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), f = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1, n = 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, 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 && f > n && (f = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, n)); !this.dataPointMaxWidth && (this.dataPointMinWidth && n < f) && (n = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, f)); p < f && (p = f); p > n && (p = n); c.save(); w && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); w && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); for (n = 0; n < a.dataSeriesIndexes.length; n++) { var q = a.dataSeriesIndexes[n], g = this.data[q], r = g.dataPoints; if (0 < r.length) { var h = 5 < p && g.bevelEnabled ? !0 : !1; c.strokeStyle = "#4572A7 "; for (f = 0; f < r.length; f++) if (r[f].getTime ? C = r[f].x.getTime() : C = r[f].x, !(C < a.axisX.dataInfo.viewPortMin || C > a.axisX.dataInfo.viewPortMax) && "number" === typeof r[f].y) { t = a.axisX.convertValueToPixel(C); l = a.axisY.convertValueToPixel(r[f].y); t = a.axisX.reversed ? t + a.plotType.totalDataSeries * p / 2 - (a.previousDataSeriesCount + n) * p << 0 : t - a.plotType.totalDataSeries * p / 2 + (a.previousDataSeriesCount + n) * p << 0; var m = a.axisX.reversed ? t - p << 0 : t + p << 0, u; 0 <= r[f].y ? u = k : (u = l, l = k); b = r[f].color ? r[f].color : g._colorSet[f % g._colorSet.length]; ea(c, a.axisY.reversed ? l : u, a.axisX.reversed ? m : t, a.axisY.reversed ? u : l, a.axisX.reversed ? t : m, b, 0, null, h, !1, !1, !1, g.fillOpacity); b = g.dataPointIds[f]; this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: f, x1: u, y1: t, x2: l, y2: m }; b = Q(b); w && ea(this._eventManager.ghostCtx, u, a.axisX.reversed ? m : t, l, a.axisX.reversed ? t : m, b, 0, null, !1, !1, !1, !1); (r[f].indexLabel || g.indexLabel || r[f].indexLabelFormatter || g.indexLabelFormatter) && this._indexLabels.push({ chartType: "bar", dataPoint: r[f], dataSeries: g, point: { x: 0 <= r[f].y ? l : u, y: t + (m - t) / 2 }, direction: 0 > r[f].y === a.axisY.reversed ? 1 : -1, bounds: { x1: Math.min(u, l), y1: t, x2: Math.max(u, l), y2: m }, color: b }) } } } w && (d.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()); c.restore(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.xScaleAnimation, easingFunction: J.easing.easeOutQuart, animationBase: k < a.axisY.bounds.x1 ? a.axisY.bounds.x1 : k > a.axisY.bounds.x2 ? a.axisY.bounds.x2 : k } } }; m.prototype.renderStackedBar = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d; if (!(0 >= a.dataSeriesIndexes.length)) { var b = null, e = this.plotArea, f = [], l = [], t = [], C = [], k = 0, n, p, q = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), k = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1, g = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : 0.15 * this.height << 0, r = a.axisX.dataInfo.minDiff; isFinite(r) || (r = 0.3 * Math.abs(a.axisX.range)); r = this.options.dataPointWidth ? this.dataPointWidth : 0.9 * (e.height * (a.axisX.logarithmic ? Math.log(r) / Math.log(a.axisX.range) : Math.abs(r) / Math.abs(a.axisX.range)) / a.plotType.plotUnits.length) << 0; this.dataPointMaxWidth && k > g && (k = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, g)); !this.dataPointMaxWidth && (this.dataPointMinWidth && g < k) && (g = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, k)); r < k && (r = k); r > g && (r = g); c.save(); w && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); w && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); for (g = 0; g < a.dataSeriesIndexes.length; g++) { var h = a.dataSeriesIndexes[g], m = this.data[h], u = m.dataPoints; if (0 < u.length) { var s = 5 < r && m.bevelEnabled ? !0 : !1; c.strokeStyle = "#4572A7 "; for (k = 0; k < u.length; k++) if (b = u[k].x.getTime ? u[k].x.getTime() : u[k].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof u[k].y) { p = a.axisX.convertValueToPixel(b); p = p - a.plotType.plotUnits.length * r / 2 + a.index * r << 0; var z = p + r << 0, A; if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 < u[k].y) t[b] = u[k].y + (t[b] ? t[b] : 0), 0 < t[b] && (A = f[b] ? f[b] : q, f[b] = n = a.axisY.convertValueToPixel(t[b])); else if (a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 >= u[k].y) C[b] = u[k].y + (C[b] ? C[b] : 0), n = l[b] ? l[b] : q, l[b] = A = a.axisY.convertValueToPixel(C[b]); else if (n = a.axisY.convertValueToPixel(u[k].y), 0 <= u[k].y) { var v = f[b] ? f[b] : 0; A = q + v; n += v; f[b] = v + (n - A) } else v = l[b] ? l[b] : 0, A = n - v, n = q - v, l[b] = v + (n - A); b = u[k].color ? u[k].color : m._colorSet[k % m._colorSet.length]; ea(c, a.axisY.reversed ? n : A, p, a.axisY.reversed ? A : n, z, b, 0, null, s, !1, !1, !1, m.fillOpacity); b = m.dataPointIds[k]; this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: h, dataPointIndex: k, x1: A, y1: p, x2: n, y2: z }; b = Q(b); w && ea(this._eventManager.ghostCtx, A, p, n, z, b, 0, null, !1, !1, !1, !1); (u[k].indexLabel || m.indexLabel || u[k].indexLabelFormatter || m.indexLabelFormatter) && this._indexLabels.push({ chartType: "stackedBar", dataPoint: u[k], dataSeries: m, point: { x: 0 <= u[k].y ? n : A, y: p + (z - p) / 2 }, direction: 0 > u[k].y === a.axisY.reversed ? 1 : -1, bounds: { x1: Math.min(A, n), y1: p, x2: Math.max(A, n), y2: z }, color: b }) } } } w && (d.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()); c.restore(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.xScaleAnimation, easingFunction: J.easing.easeOutQuart, animationBase: q < a.axisY.bounds.x1 ? a.axisY.bounds.x1 : q > a.axisY.bounds.x2 ? a.axisY.bounds.x2 : q } } }; m.prototype.renderStackedBar100 = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d; if (!(0 >= a.dataSeriesIndexes.length)) { var b = null, e = this.plotArea, f = [], l = [], t = [], C = [], k = 0, n, p, q = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), k = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1, g = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : 0.15 * this.height << 0, r = a.axisX.dataInfo.minDiff; isFinite(r) || (r = 0.3 * Math.abs(a.axisX.range)); r = this.options.dataPointWidth ? this.dataPointWidth : 0.9 * (e.height * (a.axisX.logarithmic ? Math.log(r) / Math.log(a.axisX.range) : Math.abs(r) / Math.abs(a.axisX.range)) / a.plotType.plotUnits.length) << 0; this.dataPointMaxWidth && k > g && (k = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, g)); !this.dataPointMaxWidth && (this.dataPointMinWidth && g < k) && (g = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, k)); r < k && (r = k); r > g && (r = g); c.save(); w && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); w && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); for (g = 0; g < a.dataSeriesIndexes.length; g++) { var h = a.dataSeriesIndexes[g], m = this.data[h], u = m.dataPoints; if (0 < u.length) { var s = 5 < r && m.bevelEnabled ? !0 : !1; c.strokeStyle = "#4572A7 "; for (k = 0; k < u.length; k++) if (b = u[k].x.getTime ? u[k].x.getTime() : u[k].x, !(b < a.axisX.dataInfo.viewPortMin || b > a.axisX.dataInfo.viewPortMax) && "number" === typeof u[k].y) { p = a.axisX.convertValueToPixel(b); var z; z = 0 !== a.dataPointYSums[b] ? 100 * (u[k].y / a.dataPointYSums[b]) : 0; p = p - a.plotType.plotUnits.length * r / 2 + a.index * r << 0; var A = p + r << 0; if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 < u[k].y) { t[b] = z + (t[b] ? t[b] : 0); if (0 >= t[b]) continue; z = f[b] ? f[b] : q; f[b] = n = a.axisY.convertValueToPixel(t[b]) } else if (a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length && 0 >= u[k].y) C[b] = z + (C[b] ? C[b] : 0), n = l[b] ? l[b] : q, l[b] = z = a.axisY.convertValueToPixel(C[b]); else if (n = a.axisY.convertValueToPixel(z), 0 <= u[k].y) { var v = f[b] ? f[b] : 0; z = q + v; n += v; a.dataSeriesIndexes.length - 1 === g && 1 >= Math.abs(e.x2 - n) && (n = e.x2); f[b] = v + (n - z) } else v = l[b] ? l[b] : 0, z = n - v, n = q - v, a.dataSeriesIndexes.length - 1 === g && 1 >= Math.abs(e.x1 - z) && (z = e.x1), l[b] = v + (n - z); b = u[k].color ? u[k].color : m._colorSet[k % m._colorSet.length]; ea(c, a.axisY.reversed ? n : z, p, a.axisY.reversed ? z : n, A, b, 0, null, s, !1, !1, !1, m.fillOpacity); b = m.dataPointIds[k]; this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: h, dataPointIndex: k, x1: z, y1: p, x2: n, y2: A }; b = Q(b); w && ea(this._eventManager.ghostCtx, z, p, n, A, b, 0, null, !1, !1, !1, !1); (u[k].indexLabel || m.indexLabel || u[k].indexLabelFormatter || m.indexLabelFormatter) && this._indexLabels.push({ chartType: "stackedBar100", dataPoint: u[k], dataSeries: m, point: { x: 0 <= u[k].y ? n : z, y: p + (A - p) / 2 }, direction: 0 > u[k].y === a.axisY.reversed ? 1 : -1, bounds: { x1: Math.min(z, n), y1: p, x2: Math.max(z, n), y2: A }, color: b }) } } } w && (d.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()); c.restore(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.xScaleAnimation, easingFunction: J.easing.easeOutQuart, animationBase: q < a.axisY.bounds.x1 ? a.axisY.bounds.x1 : q > a.axisY.bounds.x2 ? a.axisY.bounds.x2 : q } } }; m.prototype.renderArea = function(a) { var d, c; function b() { v && (0 < g.lineThickness && f.stroke(), a.axisY.logarithmic || 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? A = z : 0 > a.axisY.viewportMaximum ? A = t.y1 : 0 < a.axisY.viewportMinimum && (A = z), f.lineTo(m, A), f.lineTo(v.x, A), f.closePath(), f.globalAlpha = g.fillOpacity, f.fill(), f.globalAlpha = 1, w && (l.lineTo(m, A), l.lineTo(v.x, A), l.closePath(), l.fill()), f.beginPath(), f.moveTo(m, u), l.beginPath(), l.moveTo(m, u), v = { x: m, y: u }) } var e = a.targetCanvasCtx || this.plotArea.ctx, f = w ? this._preRenderCtx : e; if (!(0 >= a.dataSeriesIndexes.length)) { var l = this._eventManager.ghostCtx, t = a.axisY.lineCoordinates, C = [], k = this.plotArea, n; f.save(); w && l.save(); f.beginPath(); f.rect(k.x1, k.y1, k.width, k.height); f.clip(); w && (l.beginPath(), l.rect(k.x1, k.y1, k.width, k.height), l.clip()); for (var p = 0; p < a.dataSeriesIndexes.length; p++) { var q = a.dataSeriesIndexes[p], g = this.data[q], r = g.dataPoints, C = g.id; this._eventManager.objectMap[C] = { objectType: "dataSeries", dataSeriesIndex: q }; C = Q(C); l.fillStyle = C; C = []; d = !0; var h = 0, m, u, s, z = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), A, v = null; if (0 < r.length) { var D = g._colorSet[h % g._colorSet.length], y = g.lineColor = g.options.lineColor || D, x = y; f.fillStyle = D; f.strokeStyle = y; f.lineWidth = g.lineThickness; c = "solid"; if (f.setLineDash) { var I = N(g.nullDataLineDashType, g.lineThickness); c = g.lineDashType; var R = N(c, g.lineThickness); f.setLineDash(R) } for (var ba = !0; h < r.length; h++) if (s = r[h].x.getTime ? r[h].x.getTime() : r[h].x, !(s < a.axisX.dataInfo.viewPortMin || s > a.axisX.dataInfo.viewPortMax && (!g.connectNullData || !ba))) if ("number" !== typeof r[h].y) g.connectNullData || (ba || d) || b(), ba = !0; else { m = a.axisX.convertValueToPixel(s); u = a.axisY.convertValueToPixel(r[h].y); d || ba ? (!d && g.connectNullData ? (f.setLineDash && (g.options.nullDataLineDashType || c === g.lineDashType && g.lineDashType !== g.nullDataLineDashType) && (d = m, c = u, m = n.x, u = n.y, b(), f.moveTo(n.x, n.y), m = d, u = c, v = n, c = g.nullDataLineDashType, f.setLineDash(I)), f.lineTo(m, u), w && l.lineTo(m, u)) : (f.beginPath(), f.moveTo(m, u), w && (l.beginPath(), l.moveTo(m, u)), v = { x: m, y: u }), ba = d = !1) : (f.lineTo(m, u), w && l.lineTo(m, u), 0 == h % 250 && b()); n = { x: m, y: u }; h < r.length - 1 && (x !== (r[h].lineColor || y) || c !== (r[h].lineDashType || g.lineDashType)) && (b(), x = r[h].lineColor || y, f.strokeStyle = x, f.setLineDash && (r[h].lineDashType ? (c = r[h].lineDashType, f.setLineDash(N(c, g.lineThickness))) : (c = g.lineDashType, f.setLineDash(R)))); var Y = g.dataPointIds[h]; this._eventManager.objectMap[Y] = { id: Y, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: h, x1: m, y1: u }; 0 !== r[h].markerSize && (0 < r[h].markerSize || 0 < g.markerSize) && (s = g.getMarkerProperties(h, m, u, f), C.push(s), Y = Q(Y), w && C.push({ x: m, y: u, ctx: l, type: s.type, size: s.size, color: Y, borderColor: Y, borderThickness: s.borderThickness })); (r[h].indexLabel || g.indexLabel || r[h].indexLabelFormatter || g.indexLabelFormatter) && this._indexLabels.push({ chartType: "area", dataPoint: r[h], dataSeries: g, point: { x: m, y: u }, direction: 0 > r[h].y === a.axisY.reversed ? 1 : -1, color: D }) } b(); $.drawMarkers(C) } } w && (e.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), f.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && f.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && f.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), f.clearRect(k.x1, k.y1, k.width, k.height), this._eventManager.ghostCtx.restore()); f.restore(); return { source: e, dest: this.plotArea.ctx, animationCallback: J.xClipAnimation, easingFunction: J.easing.linear, animationBase: 0 } } }; m.prototype.renderSplineArea = function(a) { function d() { var c = v(B, 2); if (0 < c.length) { if (0 < n.lineThickness) { b.beginPath(); b.moveTo(c[0].x, c[0].y); c[0].newStrokeStyle && (b.strokeStyle = c[0].newStrokeStyle); c[0].newLineDashArray && b.setLineDash(c[0].newLineDashArray); for (var d = 0; d < c.length - 3; d += 3) if (b.bezierCurveTo(c[d + 1].x, c[d + 1].y, c[d + 2].x, c[d + 2].y, c[d + 3].x, c[d + 3].y), w && e.bezierCurveTo(c[d + 1].x, c[d + 1].y, c[d + 2].x, c[d + 2].y, c[d + 3].x, c[d + 3].y), c[d + 3].newStrokeStyle || c[d + 3].newLineDashArray) b.stroke(), b.beginPath(), b.moveTo(c[d + 3].x, c[d + 3].y), c[d + 3].newStrokeStyle && (b.strokeStyle = c[d + 3].newStrokeStyle), c[d + 3].newLineDashArray && b.setLineDash(c[d + 3].newLineDashArray); b.stroke() } b.beginPath(); b.moveTo(c[0].x, c[0].y); w && (e.beginPath(), e.moveTo(c[0].x, c[0].y)); for (d = 0; d < c.length - 3; d += 3) b.bezierCurveTo(c[d + 1].x, c[d + 1].y, c[d + 2].x, c[d + 2].y, c[d + 3].x, c[d + 3].y), w && e.bezierCurveTo(c[d + 1].x, c[d + 1].y, c[d + 2].x, c[d + 2].y, c[d + 3].x, c[d + 3].y); a.axisY.logarithmic || 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? s = m : 0 > a.axisY.viewportMaximum ? s = f.y1 : 0 < a.axisY.viewportMinimum && (s = m); u = { x: c[0].x, y: c[0].y }; b.lineTo(c[c.length - 1].x, s); b.lineTo(u.x, s); b.closePath(); b.globalAlpha = n.fillOpacity; b.fill(); b.globalAlpha = 1; w && (e.lineTo(c[c.length - 1].x, s), e.lineTo(u.x, s), e.closePath(), e.fill()) } } var c = a.targetCanvasCtx || this.plotArea.ctx, b = w ? this._preRenderCtx : c; if (!(0 >= a.dataSeriesIndexes.length)) { var e = this._eventManager.ghostCtx, f = a.axisY.lineCoordinates, l = [], t = this.plotArea; b.save(); w && e.save(); b.beginPath(); b.rect(t.x1, t.y1, t.width, t.height); b.clip(); w && (e.beginPath(), e.rect(t.x1, t.y1, t.width, t.height), e.clip()); for (var h = 0; h < a.dataSeriesIndexes.length; h++) { var k = a.dataSeriesIndexes[h], n = this.data[k], p = n.dataPoints, l = n.id; this._eventManager.objectMap[l] = { objectType: "dataSeries", dataSeriesIndex: k }; l = Q(l); e.fillStyle = l; var l = [], q = 0, g, r, m = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), s, u = null, B = []; if (0 < p.length) { var z = n._colorSet[q % n._colorSet.length], A = n.lineColor = n.options.lineColor || z, y = A; b.fillStyle = z; b.strokeStyle = A; b.lineWidth = n.lineThickness; var D = "solid"; if (b.setLineDash) { var x = N(n.nullDataLineDashType, n.lineThickness), D = n.lineDashType, E = N(D, n.lineThickness); b.setLineDash(E) } for (r = !1; q < p.length; q++) if (g = p[q].x.getTime ? p[q].x.getTime() : p[q].x, !(g < a.axisX.dataInfo.viewPortMin || g > a.axisX.dataInfo.viewPortMax && (!n.connectNullData || !r))) if ("number" !== typeof p[q].y) 0 < q && !r && (n.connectNullData ? b.setLineDash && (0 < B.length && (n.options.nullDataLineDashType || !p[q - 1].lineDashType)) && (B[B.length - 1].newLineDashArray = x, D = n.nullDataLineDashType) : (d(), B = [])), r = !0; else { g = a.axisX.convertValueToPixel(g); r = a.axisY.convertValueToPixel(p[q].y); var I = n.dataPointIds[q]; this._eventManager.objectMap[I] = { id: I, objectType: "dataPoint", dataSeriesIndex: k, dataPointIndex: q, x1: g, y1: r }; B[B.length] = { x: g, y: r }; q < p.length - 1 && (y !== (p[q].lineColor || A) || D !== (p[q].lineDashType || n.lineDashType)) && (y = p[q].lineColor || A, B[B.length - 1].newStrokeStyle = y, b.setLineDash && (p[q].lineDashType ? (D = p[q].lineDashType, B[B.length - 1].newLineDashArray = N(D, n.lineThickness)) : (D = n.lineDashType, B[B.length - 1].newLineDashArray = E))); if (0 !== p[q].markerSize && (0 < p[q].markerSize || 0 < n.markerSize)) { var R = n.getMarkerProperties(q, g, r, b); l.push(R); I = Q(I); w && l.push({ x: g, y: r, ctx: e, type: R.type, size: R.size, color: I, borderColor: I, borderThickness: R.borderThickness }) }(p[q].indexLabel || n.indexLabel || p[q].indexLabelFormatter || n.indexLabelFormatter) && this._indexLabels.push({ chartType: "splineArea", dataPoint: p[q], dataSeries: n, point: { x: g, y: r }, direction: 0 > p[q].y === a.axisY.reversed ? 1 : -1, color: z }); r = !1 } d(); $.drawMarkers(l) } } w && (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(t.x1, t.y1, t.width, t.height), this._eventManager.ghostCtx.restore()); b.restore(); return { source: c, dest: this.plotArea.ctx, animationCallback: J.xClipAnimation, easingFunction: J.easing.linear, animationBase: 0 } } }; m.prototype.renderStepArea = function(a) { var d, c; function b() { y && (0 < g.lineThickness && f.stroke(), a.axisY.logarithmic || 0 >= a.axisY.viewportMinimum && 0 <= a.axisY.viewportMaximum ? v = z : 0 > a.axisY.viewportMaximum ? v = t.y1 : 0 < a.axisY.viewportMinimum && (v = z), f.lineTo(s, v), f.lineTo(y.x, v), f.closePath(), f.globalAlpha = g.fillOpacity, f.fill(), f.globalAlpha = 1, w && (l.lineTo(s, v), l.lineTo(y.x, v), l.closePath(), l.fill()), f.beginPath(), f.moveTo(s, u), l.beginPath(), l.moveTo(s, u), y = { x: s, y: u }) } var e = a.targetCanvasCtx || this.plotArea.ctx, f = w ? this._preRenderCtx : e; if (!(0 >= a.dataSeriesIndexes.length)) { var l = this._eventManager.ghostCtx, t = a.axisY.lineCoordinates, h = [], k = this.plotArea, n; f.save(); w && l.save(); f.beginPath(); f.rect(k.x1, k.y1, k.width, k.height); f.clip(); w && (l.beginPath(), l.rect(k.x1, k.y1, k.width, k.height), l.clip()); for (var p = 0; p < a.dataSeriesIndexes.length; p++) { var q = a.dataSeriesIndexes[p], g = this.data[q], r = g.dataPoints, h = g.id; this._eventManager.objectMap[h] = { objectType: "dataSeries", dataSeriesIndex: q }; h = Q(h); l.fillStyle = h; h = []; d = !0; var m = 0, s, u, B, z = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), v, y = null; c = !1; if (0 < r.length) { var D = g._colorSet[m % g._colorSet.length], x = g.lineColor = g.options.lineColor || D, E = x; f.fillStyle = D; f.strokeStyle = x; f.lineWidth = g.lineThickness; var I = "solid"; if (f.setLineDash) { var R = N(g.nullDataLineDashType, g.lineThickness), I = g.lineDashType, ba = N(I, g.lineThickness); f.setLineDash(ba) } for (; m < r.length; m++) if (B = r[m].x.getTime ? r[m].x.getTime() : r[m].x, !(B < a.axisX.dataInfo.viewPortMin || B > a.axisX.dataInfo.viewPortMax && (!g.connectNullData || !c))) { var Y = u; "number" !== typeof r[m].y ? (g.connectNullData || (c || d) || b(), c = !0) : (s = a.axisX.convertValueToPixel(B), u = a.axisY.convertValueToPixel(r[m].y), d || c ? (!d && g.connectNullData ? (f.setLineDash && (g.options.nullDataLineDashType || I === g.lineDashType && g.lineDashType !== g.nullDataLineDashType) && (d = s, c = u, s = n.x, u = n.y, b(), f.moveTo(n.x, n.y), s = d, u = c, y = n, I = g.nullDataLineDashType, f.setLineDash(R)), f.lineTo(s, Y), f.lineTo(s, u), w && (l.lineTo(s, Y), l.lineTo(s, u))) : (f.beginPath(), f.moveTo(s, u), w && (l.beginPath(), l.moveTo(s, u)), y = { x: s, y: u }), c = d = !1) : (f.lineTo(s, Y), w && l.lineTo(s, Y), f.lineTo(s, u), w && l.lineTo(s, u), 0 == m % 250 && b()), n = { x: s, y: u }, m < r.length - 1 && (E !== (r[m].lineColor || x) || I !== (r[m].lineDashType || g.lineDashType)) && (b(), E = r[m].lineColor || x, f.strokeStyle = E, f.setLineDash && (r[m].lineDashType ? (I = r[m].lineDashType, f.setLineDash(N(I, g.lineThickness))) : (I = g.lineDashType, f.setLineDash(ba)))), B = g.dataPointIds[m], this._eventManager.objectMap[B] = { id: B, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: m, x1: s, y1: u }, 0 !== r[m].markerSize && (0 < r[m].markerSize || 0 < g.markerSize) && (Y = g.getMarkerProperties(m, s, u, f), h.push(Y), B = Q(B), w && h.push({ x: s, y: u, ctx: l, type: Y.type, size: Y.size, color: B, borderColor: B, borderThickness: Y.borderThickness })), (r[m].indexLabel || g.indexLabel || r[m].indexLabelFormatter || g.indexLabelFormatter) && this._indexLabels.push({ chartType: "stepArea", dataPoint: r[m], dataSeries: g, point: { x: s, y: u }, direction: 0 > r[m].y === a.axisY.reversed ? 1 : -1, color: D })) } b(); $.drawMarkers(h) } } w && (e.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), f.globalCompositeOperation = "source-atop", a.axisX.maskCanvas && f.drawImage(a.axisX.maskCanvas, 0, 0, this.width, this.height), a.axisY.maskCanvas && f.drawImage(a.axisY.maskCanvas, 0, 0, this.width, this.height), this._breaksCanvasCtx && this._breaksCanvasCtx.drawImage(this._preRenderCanvas, 0, 0, this.width, this.height), f.clearRect(k.x1, k.y1, k.width, k.height), this._eventManager.ghostCtx.restore()); f.restore(); return { source: e, dest: this.plotArea.ctx, animationCallback: J.xClipAnimation, easingFunction: J.easing.linear, animationBase: 0 } } }; m.prototype.renderStackedArea = function(a) { function d() { if (!(1 > k.length)) { for (0 < D.lineThickness && b.stroke(); 0 < k.length;) { var a = k.pop(); b.lineTo(a.x, a.y); w && s.lineTo(a.x, a.y) } b.closePath(); b.globalAlpha = D.fillOpacity; b.fill(); b.globalAlpha = 1; b.beginPath(); w && (s.closePath(), s.fill(), s.beginPath()); k = [] } } var c = a.targetCanvasCtx || this.plotArea.ctx, b = w ? this._preRenderCtx : c; if (!(0 >= a.dataSeriesIndexes.length)) { var e = null, f = null, l = [], t = this.plotArea, h = [], k = [], n = [], p = [], q = 0, g, r, m = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), s = this._eventManager.ghostCtx, u, B, z; w && s.beginPath(); b.save(); w && s.save(); b.beginPath(); b.rect(t.x1, t.y1, t.width, t.height); b.clip(); w && (s.beginPath(), s.rect(t.x1, t.y1, t.width, t.height), s.clip()); for (var e = [], v = 0; v < a.dataSeriesIndexes.length; v++) { var y = a.dataSeriesIndexes[v], D = this.data[y], x = D.dataPoints; D.dataPointIndexes = []; for (q = 0; q < x.length; q++) y = x[q].x.getTime ? x[q].x.getTime() : x[q].x, D.dataPointIndexes[y] = q, e[y] || (n.push(y), e[y] = !0); n.sort(Pa) } for (v = 0; v < a.dataSeriesIndexes.length; v++) { y = a.dataSeriesIndexes[v]; D = this.data[y]; x = D.dataPoints; B = !0; k = []; q = D.id; this._eventManager.objectMap[q] = { objectType: "dataSeries", dataSeriesIndex: y }; q = Q(q); s.fillStyle = q; if (0 < n.length) { var e = D._colorSet[0], E = D.lineColor = D.options.lineColor || e, I = E; b.fillStyle = e; b.strokeStyle = E; b.lineWidth = D.lineThickness; z = "solid"; if (b.setLineDash) { var R = N(D.nullDataLineDashType, D.lineThickness); z = D.lineDashType; var ba = N(z, D.lineThickness); b.setLineDash(ba) } for (var Y = !0, q = 0; q < n.length; q++) { var f = n[q], fa = null, fa = 0 <= D.dataPointIndexes[f] ? x[D.dataPointIndexes[f]] : { x: f, y: null }; if (!(f < a.axisX.dataInfo.viewPortMin || f > a.axisX.dataInfo.viewPortMax && (!D.connectNullData || !Y))) if ("number" !== typeof fa.y) D.connectNullData || (Y || B) || d(), Y = !0; else { g = a.axisX.convertValueToPixel(f); var la = h[f] ? h[f] : 0; if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length) { p[f] = fa.y + (p[f] ? p[f] : 0); if (0 >= p[f] && a.axisY.logarithmic) continue; r = a.axisY.convertValueToPixel(p[f]) } else r = a.axisY.convertValueToPixel(fa.y), r -= la; k.push({ x: g, y: m - la }); h[f] = m - r; B || Y ? (!B && D.connectNullData ? (b.setLineDash && (D.options.nullDataLineDashType || z === D.lineDashType && D.lineDashType !== D.nullDataLineDashType) && (B = k.pop(), z = k[k.length - 1], d(), b.moveTo(u.x, u.y), k.push(z), k.push(B), z = D.nullDataLineDashType, b.setLineDash(R)), b.lineTo(g, r), w && s.lineTo(g, r)) : (b.beginPath(), b.moveTo(g, r), w && (s.beginPath(), s.moveTo(g, r))), Y = B = !1) : (b.lineTo(g, r), w && s.lineTo(g, r), 0 == q % 250 && (d(), b.moveTo(g, r), w && s.moveTo(g, r), k.push({ x: g, y: m - la }))); u = { x: g, y: r }; q < x.length - 1 && (I !== (x[q].lineColor || E) || z !== (x[q].lineDashType || D.lineDashType)) && (d(), b.beginPath(), b.moveTo(g, r), k.push({ x: g, y: m - la }), I = x[q].lineColor || E, b.strokeStyle = I, b.setLineDash && (x[q].lineDashType ? (z = x[q].lineDashType, b.setLineDash(N(z, D.lineThickness))) : (z = D.lineDashType, b.setLineDash(ba)))); if (0 <= D.dataPointIndexes[f]) { var aa = D.dataPointIds[D.dataPointIndexes[f]]; this._eventManager.objectMap[aa] = { id: aa, objectType: "dataPoint", dataSeriesIndex: y, dataPointIndex: D.dataPointIndexes[f], x1: g, y1: r } } 0 <= D.dataPointIndexes[f] && 0 !== fa.markerSize && (0 < fa.markerSize || 0 < D.markerSize) && (la = D.getMarkerProperties(D.dataPointIndexes[f], g, r, b), l.push(la), f = Q(aa), w && l.push({ x: g, y: r, ctx: s, type: la.type, size: la.size, color: f, borderColor: f, borderThickness: la.borderThickness })); (fa.indexLabel || D.indexLabel || fa.indexLabelFormatter || D.indexLabelFormatter) && this._indexLabels.push({ chartType: "stackedArea", dataPoint: fa, dataSeries: D, point: { x: g, y: r }, direction: 0 > x[q].y === a.axisY.reversed ? 1 : -1, color: e }) } } d(); b.moveTo(g, r); w && s.moveTo(g, r) } delete D.dataPointIndexes } $.drawMarkers(l); w && (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(t.x1, t.y1, t.width, t.height), s.restore()); b.restore(); return { source: c, dest: this.plotArea.ctx, animationCallback: J.xClipAnimation, easingFunction: J.easing.linear, animationBase: 0 } } }; m.prototype.renderStackedArea100 = function(a) { function d() { for (0 < D.lineThickness && b.stroke(); 0 < k.length;) { var a = k.pop(); b.lineTo(a.x, a.y); w && z.lineTo(a.x, a.y) } b.closePath(); b.globalAlpha = D.fillOpacity; b.fill(); b.globalAlpha = 1; b.beginPath(); w && (z.closePath(), z.fill(), z.beginPath()); k = [] } var c = a.targetCanvasCtx || this.plotArea.ctx, b = w ? this._preRenderCtx : c; if (!(0 >= a.dataSeriesIndexes.length)) { var e = null, f = null, l = this.plotArea, t = [], h = [], k = [], n = [], p = [], q = 0, g, r, m, s, u, B = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), z = this._eventManager.ghostCtx; b.save(); w && z.save(); b.beginPath(); b.rect(l.x1, l.y1, l.width, l.height); b.clip(); w && (z.beginPath(), z.rect(l.x1, l.y1, l.width, l.height), z.clip()); for (var e = [], v = 0; v < a.dataSeriesIndexes.length; v++) { var y = a.dataSeriesIndexes[v], D = this.data[y], x = D.dataPoints; D.dataPointIndexes = []; for (q = 0; q < x.length; q++) y = x[q].x.getTime ? x[q].x.getTime() : x[q].x, D.dataPointIndexes[y] = q, e[y] || (n.push(y), e[y] = !0); n.sort(Pa) } for (v = 0; v < a.dataSeriesIndexes.length; v++) { y = a.dataSeriesIndexes[v]; D = this.data[y]; x = D.dataPoints; s = !0; e = D.id; this._eventManager.objectMap[e] = { objectType: "dataSeries", dataSeriesIndex: y }; e = Q(e); z.fillStyle = e; k = []; if (0 < n.length) { var e = D._colorSet[q % D._colorSet.length], E = D.lineColor = D.options.lineColor || e, I = E; b.fillStyle = e; b.strokeStyle = E; b.lineWidth = D.lineThickness; u = "solid"; if (b.setLineDash) { var R = N(D.nullDataLineDashType, D.lineThickness); u = D.lineDashType; var ba = N(u, D.lineThickness); b.setLineDash(ba) } for (var Y = !0, q = 0; q < n.length; q++) { var f = n[q], fa = null, fa = 0 <= D.dataPointIndexes[f] ? x[D.dataPointIndexes[f]] : { x: f, y: null }; if (!(f < a.axisX.dataInfo.viewPortMin || f > a.axisX.dataInfo.viewPortMax && (!D.connectNullData || !Y))) if ("number" !== typeof fa.y) D.connectNullData || (Y || s) || d(), Y = !0; else { var la; la = 0 !== a.dataPointYSums[f] ? 100 * (fa.y / a.dataPointYSums[f]) : 0; g = a.axisX.convertValueToPixel(f); var aa = h[f] ? h[f] : 0; if (a.axisY.logarithmic || a.axisY.scaleBreaks && 0 < a.axisY.scaleBreaks._appliedBreaks.length) { p[f] = la + (p[f] ? p[f] : 0); if (0 >= p[f] && a.axisY.logarithmic) continue; r = a.axisY.convertValueToPixel(p[f]) } else r = a.axisY.convertValueToPixel(la), r -= aa; k.push({ x: g, y: B - aa }); h[f] = B - r; s || Y ? (!s && D.connectNullData ? (b.setLineDash && (D.options.nullDataLineDashType || u === D.lineDashType && D.lineDashType !== D.nullDataLineDashType) && (s = k.pop(), u = k[k.length - 1], d(), b.moveTo(m.x, m.y), k.push(u), k.push(s), u = D.nullDataLineDashType, b.setLineDash(R)), b.lineTo(g, r), w && z.lineTo(g, r)) : (b.beginPath(), b.moveTo(g, r), w && (z.beginPath(), z.moveTo(g, r))), Y = s = !1) : (b.lineTo(g, r), w && z.lineTo(g, r), 0 == q % 250 && (d(), b.moveTo(g, r), w && z.moveTo(g, r), k.push({ x: g, y: B - aa }))); m = { x: g, y: r }; q < x.length - 1 && (I !== (x[q].lineColor || E) || u !== (x[q].lineDashType || D.lineDashType)) && (d(), b.beginPath(), b.moveTo(g, r), k.push({ x: g, y: B - aa }), I = x[q].lineColor || E, b.strokeStyle = I, b.setLineDash && (x[q].lineDashType ? (u = x[q].lineDashType, b.setLineDash(N(u, D.lineThickness))) : (u = D.lineDashType, b.setLineDash(ba)))); if (0 <= D.dataPointIndexes[f]) { var G = D.dataPointIds[D.dataPointIndexes[f]]; this._eventManager.objectMap[G] = { id: G, objectType: "dataPoint", dataSeriesIndex: y, dataPointIndex: D.dataPointIndexes[f], x1: g, y1: r } } 0 <= D.dataPointIndexes[f] && 0 !== fa.markerSize && (0 < fa.markerSize || 0 < D.markerSize) && (aa = D.getMarkerProperties(q, g, r, b), t.push(aa), f = Q(G), w && t.push({ x: g, y: r, ctx: z, type: aa.type, size: aa.size, color: f, borderColor: f, borderThickness: aa.borderThickness })); (fa.indexLabel || D.indexLabel || fa.indexLabelFormatter || D.indexLabelFormatter) && this._indexLabels.push({ chartType: "stackedArea100", dataPoint: fa, dataSeries: D, point: { x: g, y: r }, direction: 0 > x[q].y === a.axisY.reversed ? 1 : -1, color: e }) } } d(); b.moveTo(g, r); w && z.moveTo(g, r) } delete D.dataPointIndexes } $.drawMarkers(t); w && (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(l.x1, l.y1, l.width, l.height), z.restore()); b.restore(); return { source: c, dest: this.plotArea.ctx, animationCallback: J.xClipAnimation, easingFunction: J.easing.linear, animationBase: 0 } } }; m.prototype.renderBubble = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d; if (!(0 >= a.dataSeriesIndexes.length)) { var b = this.plotArea, e = 0, f, l; c.save(); w && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(b.x1, b.y1, b.width, b.height); c.clip(); w && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(b.x1, b.y1, b.width, b.height), this._eventManager.ghostCtx.clip()); for (var t = -Infinity, h = Infinity, k = 0; k < a.dataSeriesIndexes.length; k++) for (var n = a.dataSeriesIndexes[k], p = this.data[n], q = p.dataPoints, g = 0, e = 0; e < q.length; e++) f = q[e].getTime ? f = q[e].x.getTime() : f = q[e].x, f < a.axisX.dataInfo.viewPortMin || f > a.axisX.dataInfo.viewPortMax || "undefined" === typeof q[e].z || (g = q[e].z, g > t && (t = g), g < h && (h = g)); for (var r = 25 * Math.PI, m = Math.max(Math.pow(0.25 * Math.min(b.height, b.width) / 2, 2) * Math.PI, r), k = 0; k < a.dataSeriesIndexes.length; k++) if (n = a.dataSeriesIndexes[k], p = this.data[n], q = p.dataPoints, 0 < q.length) for (c.strokeStyle = "#4572A7 ", e = 0; e < q.length; e++) if (f = q[e].getTime ? f = q[e].x.getTime() : f = q[e].x, !(f < a.axisX.dataInfo.viewPortMin || f > a.axisX.dataInfo.viewPortMax) && "number" === typeof q[e].y) { f = a.axisX.convertValueToPixel(f); l = a.axisY.convertValueToPixel(q[e].y); var g = q[e].z, s = 2 * Math.max(Math.sqrt((t === h ? m / 2 : r + (m - r) / (t - h) * (g - h)) / Math.PI) << 0, 1), g = p.getMarkerProperties(e, c); g.size = s; c.globalAlpha = p.fillOpacity; $.drawMarker(f, l, c, g.type, g.size, g.color, g.borderColor, g.borderThickness); c.globalAlpha = 1; var u = p.dataPointIds[e]; this._eventManager.objectMap[u] = { id: u, objectType: "dataPoint", dataSeriesIndex: n, dataPointIndex: e, x1: f, y1: l, size: s }; s = Q(u); w && $.drawMarker(f, l, this._eventManager.ghostCtx, g.type, g.size, s, s, g.borderThickness); (q[e].indexLabel || p.indexLabel || q[e].indexLabelFormatter || p.indexLabelFormatter) && this._indexLabels.push({ chartType: "bubble", dataPoint: q[e], dataSeries: p, point: { x: f, y: l }, direction: 1, bounds: { x1: f - g.size / 2, y1: l - g.size / 2, x2: f + g.size / 2, y2: l + g.size / 2 }, color: null }) } w && (d.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()); c.restore(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.fadeInAnimation, easingFunction: J.easing.easeInQuad, animationBase: 0 } } }; m.prototype.renderScatter = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d; if (!(0 >= a.dataSeriesIndexes.length)) { var b = this.plotArea, e = 0, f, l; c.save(); w && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(b.x1, b.y1, b.width, b.height); c.clip(); w && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(b.x1, b.y1, b.width, b.height), this._eventManager.ghostCtx.clip()); for (var t = 0; t < a.dataSeriesIndexes.length; t++) { var h = a.dataSeriesIndexes[t], k = this.data[h], n = k.dataPoints; if (0 < n.length) { c.strokeStyle = "#4572A7 "; Math.pow(0.3 * Math.min(b.height, b.width) / 2, 2); for (var p = 0, q = 0, e = 0; e < n.length; e++) if (f = n[e].getTime ? f = n[e].x.getTime() : f = n[e].x, !(f < a.axisX.dataInfo.viewPortMin || f > a.axisX.dataInfo.viewPortMax) && "number" === typeof n[e].y) { f = a.axisX.convertValueToPixel(f); l = a.axisY.convertValueToPixel(n[e].y); var g = k.getMarkerProperties(e, f, l, c); c.globalAlpha = k.fillOpacity; $.drawMarker(g.x, g.y, g.ctx, g.type, g.size, g.color, g.borderColor, g.borderThickness); c.globalAlpha = 1; Math.sqrt((p - f) * (p - f) + (q - l) * (q - l)) < Math.min(g.size, 5) && n.length > Math.min(this.plotArea.width, this.plotArea.height) || (p = k.dataPointIds[e], this._eventManager.objectMap[p] = { id: p, objectType: "dataPoint", dataSeriesIndex: h, dataPointIndex: e, x1: f, y1: l }, p = Q(p), w && $.drawMarker(g.x, g.y, this._eventManager.ghostCtx, g.type, g.size, p, p, g.borderThickness), (n[e].indexLabel || k.indexLabel || n[e].indexLabelFormatter || k.indexLabelFormatter) && this._indexLabels.push({ chartType: "scatter", dataPoint: n[e], dataSeries: k, point: { x: f, y: l }, direction: 1, bounds: { x1: f - g.size / 2, y1: l - g.size / 2, x2: f + g.size / 2, y2: l + g.size / 2 }, color: null }), p = f, q = l) } } } w && (d.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()); c.restore(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.fadeInAnimation, easingFunction: J.easing.easeInQuad, animationBase: 0 } } }; m.prototype.renderCandlestick = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d, b = this._eventManager.ghostCtx; if (!(0 >= a.dataSeriesIndexes.length)) { var e = null, f = null, l = this.plotArea, t = 0, h, k, n, p, q, g, e = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1, f = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : 0.015 * this.width, r = a.axisX.dataInfo.minDiff; isFinite(r) || (r = 0.3 * Math.abs(a.axisX.range)); r = this.options.dataPointWidth ? this.dataPointWidth : 0.7 * l.width * (a.axisX.logarithmic ? Math.log(r) / Math.log(a.axisX.range) : Math.abs(r) / Math.abs(a.axisX.range)) << 0; this.dataPointMaxWidth && e > f && (e = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, f)); !this.dataPointMaxWidth && (this.dataPointMinWidth && f < e) && (f = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, e)); r < e && (r = e); r > f && (r = f); c.save(); w && b.save(); c.beginPath(); c.rect(l.x1, l.y1, l.width, l.height); c.clip(); w && (b.beginPath(), b.rect(l.x1, l.y1, l.width, l.height), b.clip()); for (var m = 0; m < a.dataSeriesIndexes.length; m++) { var v = a.dataSeriesIndexes[m], u = this.data[v], B = u.dataPoints; if (0 < B.length) for (var z = 5 < r && u.bevelEnabled ? !0 : !1, t = 0; t < B.length; t++) if (B[t].getTime ? g = B[t].x.getTime() : g = B[t].x, !(g < a.axisX.dataInfo.viewPortMin || g > a.axisX.dataInfo.viewPortMax) && !s(B[t].y) && B[t].y.length && "number" === typeof B[t].y[0] && "number" === typeof B[t].y[1] && "number" === typeof B[t].y[2] && "number" === typeof B[t].y[3]) { h = a.axisX.convertValueToPixel(g); k = a.axisY.convertValueToPixel(B[t].y[0]); n = a.axisY.convertValueToPixel(B[t].y[1]); p = a.axisY.convertValueToPixel(B[t].y[2]); q = a.axisY.convertValueToPixel(B[t].y[3]); var A = h - r / 2 << 0, y = A + r << 0, f = u.options.fallingColor ? u.fallingColor : u._colorSet[0], e = B[t].color ? B[t].color : u._colorSet[0], D = Math.round(Math.max(1, 0.15 * r)), x = 0 === D % 2 ? 0 : 0.5, E = u.dataPointIds[t]; this._eventManager.objectMap[E] = { id: E, objectType: "dataPoint", dataSeriesIndex: v, dataPointIndex: t, x1: A, y1: k, x2: y, y2: n, x3: h, y3: p, x4: h, y4: q, borderThickness: D, color: e }; c.strokeStyle = e; c.beginPath(); c.lineWidth = D; b.lineWidth = Math.max(D, 4); "candlestick" === u.type ? (c.moveTo(h - x, n), c.lineTo(h - x, Math.min(k, q)), c.stroke(), c.moveTo(h - x, Math.max(k, q)), c.lineTo(h - x, p), c.stroke(), ea(c, A, Math.min(k, q), y, Math.max(k, q), B[t].y[0] <= B[t].y[3] ? u.risingColor : f, D, e, z, z, !1, !1, u.fillOpacity), w && (e = Q(E), b.strokeStyle = e, b.moveTo(h - x, n), b.lineTo(h - x, Math.min(k, q)), b.stroke(), b.moveTo(h - x, Math.max(k, q)), b.lineTo(h - x, p), b.stroke(), ea(b, A, Math.min(k, q), y, Math.max(k, q), e, 0, null, !1, !1, !1, !1))) : "ohlc" === u.type && (c.moveTo(h - x, n), c.lineTo(h - x, p), c.stroke(), c.beginPath(), c.moveTo(h, k), c.lineTo(A, k), c.stroke(), c.beginPath(), c.moveTo(h, q), c.lineTo(y, q), c.stroke(), w && (e = Q(E), b.strokeStyle = e, b.moveTo(h - x, n), b.lineTo(h - x, p), b.stroke(), b.beginPath(), b.moveTo(h, k), b.lineTo(A, k), b.stroke(), b.beginPath(), b.moveTo(h, q), b.lineTo(y, q), b.stroke())); (B[t].indexLabel || u.indexLabel || B[t].indexLabelFormatter || u.indexLabelFormatter) && this._indexLabels.push({ chartType: u.type, dataPoint: B[t], dataSeries: u, point: { x: A + (y - A) / 2, y: a.axisY.reversed ? p : n }, direction: 1, bounds: { x1: A, y1: Math.min(n, p), x2: y, y2: Math.max(n, p) }, color: e }) } } w && (d.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(l.x1, l.y1, l.width, l.height), b.restore()); c.restore(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.fadeInAnimation, easingFunction: J.easing.easeInQuad, animationBase: 0 } } }; m.prototype.renderBoxAndWhisker = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d, b = this._eventManager.ghostCtx; if (!(0 >= a.dataSeriesIndexes.length)) { var e = null, f = this.plotArea, l = 0, t, h, k, n, p, q, g, e = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1, l = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : 0.015 * this.width, r = a.axisX.dataInfo.minDiff; isFinite(r) || (r = 0.3 * Math.abs(a.axisX.range)); r = this.options.dataPointWidth ? this.dataPointWidth : 0.7 * f.width * (a.axisX.logarithmic ? Math.log(r) / Math.log(a.axisX.range) : Math.abs(r) / Math.abs(a.axisX.range)) << 0; this.dataPointMaxWidth && e > l && (e = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, l)); !this.dataPointMaxWidth && (this.dataPointMinWidth && l < e) && (l = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, e)); r < e && (r = e); r > l && (r = l); c.save(); w && b.save(); c.beginPath(); c.rect(f.x1, f.y1, f.width, f.height); c.clip(); w && (b.beginPath(), b.rect(f.x1, f.y1, f.width, f.height), b.clip()); for (var m = !1, m = !!a.axisY.reversed, v = 0; v < a.dataSeriesIndexes.length; v++) { var u = a.dataSeriesIndexes[v], B = this.data[u], z = B.dataPoints; if (0 < z.length) for (var A = 5 < r && B.bevelEnabled ? !0 : !1, l = 0; l < z.length; l++) if (z[l].getTime ? g = z[l].x.getTime() : g = z[l].x, !(g < a.axisX.dataInfo.viewPortMin || g > a.axisX.dataInfo.viewPortMax) && !s(z[l].y) && z[l].y.length && "number" === typeof z[l].y[0] && "number" === typeof z[l].y[1] && "number" === typeof z[l].y[2] && "number" === typeof z[l].y[3] && "number" === typeof z[l].y[4] && 5 === z[l].y.length) { t = a.axisX.convertValueToPixel(g); h = a.axisY.convertValueToPixel(z[l].y[0]); k = a.axisY.convertValueToPixel(z[l].y[1]); n = a.axisY.convertValueToPixel(z[l].y[2]); p = a.axisY.convertValueToPixel(z[l].y[3]); q = a.axisY.convertValueToPixel(z[l].y[4]); var y = t - r / 2 << 0, D = t + r / 2 << 0, e = z[l].color ? z[l].color : B._colorSet[0], x = Math.round(Math.max(1, 0.15 * r)), E = 0 === x % 2 ? 0 : 0.5, I = z[l].whiskerColor ? z[l].whiskerColor : z[l].color ? B.whiskerColor ? B.whiskerColor : z[l].color : B.whiskerColor ? B.whiskerColor : e, R = "number" === typeof z[l].whiskerThickness ? z[l].whiskerThickness : "number" === typeof B.options.whiskerThickness ? B.whiskerThickness : x, ba = z[l].whiskerDashType ? z[l].whiskerDashType : B.whiskerDashType, Y = s(z[l].whiskerLength) ? s(B.options.whiskerLength) ? r : B.whiskerLength : z[l].whiskerLength, Y = "number" === typeof Y ? 0 >= Y ? 0 : Y >= r ? r : Y : "string" === typeof Y ? parseInt(Y) * r / 100 > r ? r : parseInt(Y) * r / 100 : r, fa = 1 === Math.round(R) % 2 ? 0.5 : 0, la = z[l].stemColor ? z[l].stemColor : z[l].color ? B.stemColor ? B.stemColor : z[l].color : B.stemColor ? B.stemColor : e, aa = "number" === typeof z[l].stemThickness ? z[l].stemThickness : "number" === typeof B.options.stemThickness ? B.stemThickness : x, G = 1 === Math.round(aa) % 2 ? 0.5 : 0, F = z[l].stemDashType ? z[l].stemDashType : B.stemDashType, M = z[l].lineColor ? z[l].lineColor : z[l].color ? B.lineColor ? B.lineColor : z[l].color : B.lineColor ? B.lineColor : e, L = "number" === typeof z[l].lineThickness ? z[l].lineThickness : "number" === typeof B.options.lineThickness ? B.lineThickness : x, O = z[l].lineDashType ? z[l].lineDashType : B.lineDashType, K = 1 === Math.round(L) % 2 ? 0.5 : 0, S = B.upperBoxColor, va = B.lowerBoxColor, qa = s(B.options.fillOpacity) ? 1 : B.fillOpacity, P = B.dataPointIds[l]; this._eventManager.objectMap[P] = { id: P, objectType: "dataPoint", dataSeriesIndex: u, dataPointIndex: l, x1: y, y1: h, x2: D, y2: k, x3: t, y3: n, x4: t, y4: p, y5: q, borderThickness: x, color: e, stemThickness: aa, stemColor: la, whiskerThickness: R, whiskerLength: Y, whiskerColor: I, lineThickness: L, lineColor: M }; c.save(); 0 < aa && (c.beginPath(), c.strokeStyle = la, c.lineWidth = aa, c.setLineDash && c.setLineDash(N(F, aa)), c.moveTo(t - G, k), c.lineTo(t - G, h), c.stroke(), c.moveTo(t - G, p), c.lineTo(t - G, n), c.stroke()); c.restore(); b.lineWidth = Math.max(x, 4); c.beginPath(); ea(c, y, Math.min(q, k), D, Math.max(k, q), va, 0, e, m ? A : !1, m ? !1 : A, !1, !1, qa); c.beginPath(); ea(c, y, Math.min(n, q), D, Math.max(q, n), S, 0, e, m ? !1 : A, m ? A : !1, !1, !1, qa); c.beginPath(); c.lineWidth = x; c.strokeStyle = e; c.rect(y - E, Math.min(k, n) - E, D - y + 2 * E, Math.max(k, n) - Math.min(k, n) + 2 * E); c.stroke(); c.save(); 0 < L && (c.beginPath(), c.globalAlpha = 1, c.setLineDash && c.setLineDash(N(O, L)), c.strokeStyle = M, c.lineWidth = L, c.moveTo(y, q - K), c.lineTo(D, q - K), c.stroke()); c.restore(); c.save(); 0 < R && (c.beginPath(), c.setLineDash && c.setLineDash(N(ba, R)), c.strokeStyle = I, c.lineWidth = R, c.moveTo(t - Y / 2 << 0, p - fa), c.lineTo(t + Y / 2 << 0, p - fa), c.stroke(), c.moveTo(t - Y / 2 << 0, h + fa), c.lineTo(t + Y / 2 << 0, h + fa), c.stroke()); c.restore(); w && (e = Q(P), b.strokeStyle = e, b.lineWidth = aa, 0 < aa && (b.moveTo(t - E - G, k), b.lineTo(t - E - G, Math.max(h, p)), b.stroke(), b.moveTo(t - E - G, Math.min(h, p)), b.lineTo(t - E - G, n), b.stroke()), ea(b, y, Math.max(k, n), D, Math.min(k, n), e, 0, null, !1, !1, !1, !1), 0 < R && (b.beginPath(), b.lineWidth = R, b.moveTo(t + Y / 2, p - fa), b.lineTo(t - Y / 2, p - fa), b.stroke(), b.moveTo(t + Y / 2, h + fa), b.lineTo(t - Y / 2, h + fa), b.stroke())); (z[l].indexLabel || B.indexLabel || z[l].indexLabelFormatter || B.indexLabelFormatter) && this._indexLabels.push({ chartType: B.type, dataPoint: z[l], dataSeries: B, point: { x: y + (D - y) / 2, y: a.axisY.reversed ? h : p }, direction: 1, bounds: { x1: y, y1: Math.min(h, p), x2: D, y2: Math.max(h, p) }, color: e }) } } w && (d.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(f.x1, f.y1, f.width, f.height), b.restore()); c.restore(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.fadeInAnimation, easingFunction: J.easing.easeInQuad, animationBase: 0 } } }; m.prototype.renderRangeColumn = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d; if (!(0 >= a.dataSeriesIndexes.length)) { var b = null, e = this.plotArea, f = 0, l, t, h, f = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1; l = 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 ? 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) << 0; this.dataPointMaxWidth && f > l && (f = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, l)); !this.dataPointMaxWidth && (this.dataPointMinWidth && l < f) && (l = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, f)); k < f && (k = f); k > l && (k = l); c.save(); w && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); w && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(e.x1, e.y1, e.width, e.height), this._eventManager.ghostCtx.clip()); for (var n = 0; n < a.dataSeriesIndexes.length; n++) { var p = a.dataSeriesIndexes[n], q = this.data[p], g = q.dataPoints; if (0 < g.length) for (var r = 5 < k && q.bevelEnabled ? !0 : !1, f = 0; f < g.length; f++) if (g[f].getTime ? h = g[f].x.getTime() : h = g[f].x, !(h < a.axisX.dataInfo.viewPortMin || h > a.axisX.dataInfo.viewPortMax) && !s(g[f].y) && g[f].y.length && "number" === typeof g[f].y[0] && "number" === typeof g[f].y[1]) { b = a.axisX.convertValueToPixel(h); l = a.axisY.convertValueToPixel(g[f].y[0]); t = a.axisY.convertValueToPixel(g[f].y[1]); var m = a.axisX.reversed ? b + a.plotType.totalDataSeries * k / 2 - (a.previousDataSeriesCount + n) * k << 0 : b - a.plotType.totalDataSeries * k / 2 + (a.previousDataSeriesCount + n) * k << 0, v = a.axisX.reversed ? m - k << 0 : m + k << 0, b = g[f].color ? g[f].color : q._colorSet[f % q._colorSet.length]; if (l > t) { var u = l; l = t; t = u } u = q.dataPointIds[f]; this._eventManager.objectMap[u] = { id: u, objectType: "dataPoint", dataSeriesIndex: p, dataPointIndex: f, x1: m, y1: l, x2: v, y2: t }; ea(c, a.axisX.reversed ? v : m, l, a.axisX.reversed ? m : v, t, b, 0, b, r, r, !1, !1, q.fillOpacity); b = Q(u); w && ea(this._eventManager.ghostCtx, a.axisX.reversed ? v : m, l, a.axisX.reversed ? m : v, t, b, 0, null, !1, !1, !1, !1); if (g[f].indexLabel || q.indexLabel || g[f].indexLabelFormatter || q.indexLabelFormatter) this._indexLabels.push({ chartType: "rangeColumn", dataPoint: g[f], dataSeries: q, indexKeyword: 0, point: { x: m + (v - m) / 2, y: g[f].y[1] >= g[f].y[0] ? t : l }, direction: g[f].y[1] >= g[f].y[0] ? -1 : 1, bounds: { x1: m, y1: Math.min(l, t), x2: v, y2: Math.max(l, t) }, color: b }), this._indexLabels.push({ chartType: "rangeColumn", dataPoint: g[f], dataSeries: q, indexKeyword: 1, point: { x: m + (v - m) / 2, y: g[f].y[1] >= g[f].y[0] ? l : t }, direction: g[f].y[1] >= g[f].y[0] ? 1 : -1, bounds: { x1: m, y1: Math.min(l, t), x2: v, y2: Math.max(l, t) }, color: b }) } } w && (d.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()); c.restore(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.fadeInAnimation, easingFunction: J.easing.easeInQuad, animationBase: 0 } } }; m.prototype.renderError = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d, b = a.axisY._position ? "left" === a.axisY._position || "right" === a.axisY._position ? !1 : !0 : !1; if (!(0 >= a.dataSeriesIndexes.length)) { var e = null, f = !1, l = this.plotArea, t = 0, h, k, n, p, q, g, r, m = a.axisX.dataInfo.minDiff; isFinite(m) || (m = 0.3 * Math.abs(a.axisX.range)); c.save(); w && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(l.x1, l.y1, l.width, l.height); c.clip(); w && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(l.x1, l.y1, l.width, l.height), this._eventManager.ghostCtx.clip()); for (var v = 0, u = 0; u < this.data.length; u++) !this.data[u].type.match(/(bar|column)/ig) || !this.data[u].visible || this.data[u].type.match(/(stacked)/ig) && v || v++; for (var B = 0; B < a.dataSeriesIndexes.length; B++) { var z = a.dataSeriesIndexes[B], A = this.data[z], x = A.dataPoints, D = s(A._linkedSeries) ? !1 : A._linkedSeries.type.match(/(bar|column)/ig) && A._linkedSeries.visible ? !0 : !1, E = 0; if (D) for (e = A._linkedSeries.id, u = 0; u < e; u++) !this.data[u].type.match(/(bar|column)/ig) || !this.data[u].visible || this.data[u].type.match(/(stacked)/ig) && E || (this.data[u].type.match(/(range)/ig) && (f = !0), E++); e = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1; t = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : b ? Math.min(0.15 * this.height, 0.9 * (this.plotArea.height / (D ? v : 1))) << 0 : 0.3 * this.width; f && (t = this.options.dataPointMaxWidth ? this.dataPointMaxWidth : this.options.dataPointWidth ? this.dataPointWidth : b ? Math.min(0.15 * this.height, 0.9 * (this.plotArea.height / (D ? v : 1))) << 0 : 0.03 * this.width); u = this.options.dataPointWidth ? this.dataPointWidth : 0.9 * ((b ? l.height : l.width) * (a.axisX.logarithmic ? Math.log(m) / Math.log(a.axisX.range) : Math.abs(m) / Math.abs(a.axisX.range)) / (D ? v : 1)) << 0; this.dataPointMaxWidth && e > t && (e = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, t)); !this.dataPointMaxWidth && (this.dataPointMinWidth && t < e) && (t = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, e)); u < e && (u = e); u > t && (u = t); if (0 < x.length) for (var F = A._colorSet, t = 0; t < x.length; t++) { var e = A.lineColor = A.options.color ? A.options.color : F[0], I = { color: x[t].whiskerColor ? x[t].whiskerColor : x[t].color ? A.whiskerColor ? A.whiskerColor : x[t].color : A.whiskerColor ? A.whiskerColor : e, thickness: s(x[t].whiskerThickness) ? A.whiskerThickness : x[t].whiskerThickness, dashType: x[t].whiskerDashType ? x[t].whiskerDashType : A.whiskerDashType, length: s(x[t].whiskerLength) ? s(A.options.whiskerLength) ? u : A.options.whiskerLength : x[t].whiskerLength, trimLength: s(x[t].whiskerLength) ? s(A.options.whiskerLength) ? 50 : 0 : 0 }; I.length = "number" === typeof I.length ? 0 >= I.length ? 0 : I.length >= u ? u : I.length : "string" === typeof I.length ? parseInt(I.length) * u / 100 > u ? u : parseInt(I.length) * u / 100 > u : u; I.thickness = "number" === typeof I.thickness ? 0 > I.thickness ? 0 : Math.round(I.thickness) : 2; var R = { color: x[t].stemColor ? x[t].stemColor : x[t].color ? A.stemColor ? A.stemColor : x[t].color : A.stemColor ? A.stemColor : e, thickness: x[t].stemThickness ? x[t].stemThickness : A.stemThickness, dashType: x[t].stemDashType ? x[t].stemDashType : A.stemDashType }; R.thickness = "number" === typeof R.thickness ? 0 > R.thickness ? 0 : Math.round(R.thickness) : 2; x[t].getTime ? r = x[t].x.getTime() : r = x[t].x; if (!(r < a.axisX.dataInfo.viewPortMin || r > a.axisX.dataInfo.viewPortMax) && !s(x[t].y) && x[t].y.length && "number" === typeof x[t].y[0] && "number" === typeof x[t].y[1]) { var ba = a.axisX.convertValueToPixel(r); b ? k = ba : h = ba; ba = a.axisY.convertValueToPixel(x[t].y[0]); b ? n = ba : q = ba; ba = a.axisY.convertValueToPixel(x[t].y[1]); b ? p = ba : g = ba; b ? (q = a.axisX.reversed ? k + (D ? v : 1) * u / 2 - (D ? E - 1 : 0) * u << 0 : k - (D ? v : 1) * u / 2 + (D ? E - 1 : 0) * u << 0, g = a.axisX.reversed ? q - u << 0 : q + u << 0) : (n = a.axisX.reversed ? h + (D ? v : 1) * u / 2 - (D ? E - 1 : 0) * u << 0 : h - (D ? v : 1) * u / 2 + (D ? E - 1 : 0) * u << 0, p = a.axisX.reversed ? n - u << 0 : n + u << 0); !b && q > g && (ba = q, q = g, g = ba); b && n > p && (ba = n, n = p, p = ba); ba = A.dataPointIds[t]; this._eventManager.objectMap[ba] = { id: ba, objectType: "dataPoint", dataSeriesIndex: z, dataPointIndex: t, x1: Math.min(n, p), y1: Math.min(q, g), x2: Math.max(p, n), y2: Math.max(g, q), isXYSwapped: b, stemProperties: R, whiskerProperties: I }; y(c, Math.min(n, p), Math.min(q, g), Math.max(p, n), Math.max(g, q), e, I, R, b); w && y(this._eventManager.ghostCtx, n, q, p, g, e, I, R, b); if (x[t].indexLabel || A.indexLabel || x[t].indexLabelFormatter || A.indexLabelFormatter) this._indexLabels.push({ chartType: "error", dataPoint: x[t], dataSeries: A, indexKeyword: 0, point: { x: b ? x[t].y[1] >= x[t].y[0] ? n : p : n + (p - n) / 2, y: b ? q + (g - q) / 2 : x[t].y[1] >= x[t].y[0] ? g : q }, direction: x[t].y[1] >= x[t].y[0] ? -1 : 1, bounds: { x1: b ? Math.min(n, p) : n, y1: b ? q : Math.min(q, g), x2: b ? Math.max(n, p) : p, y2: b ? g : Math.max(q, g) }, color: e, axisSwapped: b }), this._indexLabels.push({ chartType: "error", dataPoint: x[t], dataSeries: A, indexKeyword: 1, point: { x: b ? x[t].y[1] >= x[t].y[0] ? p : n : n + (p - n) / 2, y: b ? q + (g - q) / 2 : x[t].y[1] >= x[t].y[0] ? q : g }, direction: x[t].y[1] >= x[t].y[0] ? 1 : -1, bounds: { x1: b ? Math.min(n, p) : n, y1: b ? q : Math.min(q, g), x2: b ? Math.max(n, p) : p, y2: b ? g : Math.max(q, g) }, color: e, axisSwapped: b }) } } } w && (d.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(l.x1, l.y1, l.width, l.height), this._eventManager.ghostCtx.restore()); c.restore(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.fadeInAnimation, easingFunction: J.easing.easeInQuad, animationBase: 0 } } }; m.prototype.renderRangeBar = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d; if (!(0 >= a.dataSeriesIndexes.length)) { var b = null, e = this.plotArea, f = 0, l, t, h, k, f = this.options.dataPointMinWidth ? this.dataPointMinWidth : this.options.dataPointWidth ? this.dataPointWidth : 1; l = 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 n = a.axisX.dataInfo.minDiff; isFinite(n) || (n = 0.3 * Math.abs(a.axisX.range)); n = this.options.dataPointWidth ? this.dataPointWidth : 0.9 * (e.height * (a.axisX.logarithmic ? Math.log(n) / Math.log(a.axisX.range) : Math.abs(n) / Math.abs(a.axisX.range)) / a.plotType.totalDataSeries) << 0; this.dataPointMaxWidth && f > l && (f = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, l)); !this.dataPointMaxWidth && (this.dataPointMinWidth && l < f) && (l = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, f)); n < f && (n = f); n > l && (n = l); c.save(); w && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(e.x1, e.y1, e.width, e.height); c.clip(); w && (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++) { var q = a.dataSeriesIndexes[p], g = this.data[q], r = g.dataPoints; if (0 < r.length) { var m = 5 < n && g.bevelEnabled ? !0 : !1; c.strokeStyle = "#4572A7 "; for (f = 0; f < r.length; f++) if (r[f].getTime ? k = r[f].x.getTime() : k = r[f].x, !(k < a.axisX.dataInfo.viewPortMin || k > a.axisX.dataInfo.viewPortMax) && !s(r[f].y) && r[f].y.length && "number" === typeof r[f].y[0] && "number" === typeof r[f].y[1]) { l = a.axisY.convertValueToPixel(r[f].y[0]); t = a.axisY.convertValueToPixel(r[f].y[1]); h = a.axisX.convertValueToPixel(k); h = a.axisX.reversed ? h + a.plotType.totalDataSeries * n / 2 - (a.previousDataSeriesCount + p) * n << 0 : h - a.plotType.totalDataSeries * n / 2 + (a.previousDataSeriesCount + p) * n << 0; var v = a.axisX.reversed ? h - n << 0 : h + n << 0; l > t && (b = l, l = t, t = b); b = r[f].color ? r[f].color : g._colorSet[f % g._colorSet.length]; ea(c, l, a.axisX.reversed ? v : h, t, a.axisX.reversed ? h : v, b, 0, null, m, !1, !1, !1, g.fillOpacity); b = g.dataPointIds[f]; this._eventManager.objectMap[b] = { id: b, objectType: "dataPoint", dataSeriesIndex: q, dataPointIndex: f, x1: l, y1: h, x2: t, y2: v }; b = Q(b); w && ea(this._eventManager.ghostCtx, l, a.axisX.reversed ? v : h, t, a.axisX.reversed ? h : v, b, 0, null, !1, !1, !1, !1); if (r[f].indexLabel || g.indexLabel || r[f].indexLabelFormatter || g.indexLabelFormatter) this._indexLabels.push({ chartType: "rangeBar", dataPoint: r[f], dataSeries: g, indexKeyword: 0, point: { x: r[f].y[1] >= r[f].y[0] ? l : t, y: h + (v - h) / 2 }, direction: r[f].y[1] >= r[f].y[0] ? -1 : 1, bounds: { x1: Math.min(l, t), y1: h, x2: Math.max(l, t), y2: v }, color: b }), this._indexLabels.push({ chartType: "rangeBar", dataPoint: r[f], dataSeries: g, indexKeyword: 1, point: { x: r[f].y[1] >= r[f].y[0] ? t : l, y: h + (v - h) / 2 }, direction: r[f].y[1] >= r[f].y[0] ? 1 : -1, bounds: { x1: Math.min(l, t), y1: h, x2: Math.max(l, t), y2: v }, color: b }) } } } w && (d.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()); c.restore(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.fadeInAnimation, easingFunction: J.easing.easeInQuad, animationBase: 0 } } }; m.prototype.renderRangeArea = function(a) { function d() { if (v) { for (var a = null, c = h.length - 1; 0 <= c; c--) a = h[c], b.lineTo(a.x, a.y2), e.lineTo(a.x, a.y2); b.closePath(); b.globalAlpha = n.fillOpacity; b.fill(); b.globalAlpha = 1; e.fill(); if (0 < n.lineThickness) { b.beginPath(); b.moveTo(a.x, a.y2); for (c = 0; c < h.length; c++) a = h[c], b.lineTo(a.x, a.y2); b.moveTo(h[0].x, h[0].y1); for (c = 0; c < h.length; c++) a = h[c], b.lineTo(a.x, a.y1); b.stroke() } b.beginPath(); b.moveTo(r, m); e.beginPath(); e.moveTo(r, m); v = { x: r, y: m }; h = []; h.push({ x: r, y1: m, y2: s }) } } var c = a.targetCanvasCtx || this.plotArea.ctx, b = w ? this._preRenderCtx : c; if (!(0 >= a.dataSeriesIndexes.length)) { var e = this._eventManager.ghostCtx, f = [], l = this.plotArea; b.save(); w && e.save(); b.beginPath(); b.rect(l.x1, l.y1, l.width, l.height); b.clip(); w && (e.beginPath(), e.rect(l.x1, l.y1, l.width, l.height), e.clip()); for (var t = 0; t < a.dataSeriesIndexes.length; t++) { var h = [], k = a.dataSeriesIndexes[t], n = this.data[k], p = n.dataPoints, f = n.id; this._eventManager.objectMap[f] = { objectType: "dataSeries", dataSeriesIndex: k }; f = Q(f); e.fillStyle = f; var f = [], q = !0, g = 0, r, m, s, u, v = null; if (0 < p.length) { var z = n._colorSet[g % n._colorSet.length], A = n.lineColor = n.options.lineColor || z, x = A; b.fillStyle = z; b.strokeStyle = A; b.lineWidth = n.lineThickness; var D = "solid"; if (b.setLineDash) { var y = N(n.nullDataLineDashType, n.lineThickness), D = n.lineDashType, E = N(D, n.lineThickness); b.setLineDash(E) } for (var I = !0; g < p.length; g++) if (u = p[g].x.getTime ? p[g].x.getTime() : p[g].x, !(u < a.axisX.dataInfo.viewPortMin || u > a.axisX.dataInfo.viewPortMax && (!n.connectNullData || !I))) if (null !== p[g].y && p[g].y.length && "number" === typeof p[g].y[0] && "number" === typeof p[g].y[1]) { r = a.axisX.convertValueToPixel(u); m = a.axisY.convertValueToPixel(p[g].y[0]); s = a.axisY.convertValueToPixel(p[g].y[1]); q || I ? (n.connectNullData && !q ? (b.setLineDash && (n.options.nullDataLineDashType || D === n.lineDashType && n.lineDashType !== n.nullDataLineDashType) && (h[h.length - 1].newLineDashArray = E, D = n.nullDataLineDashType, b.setLineDash(y)), b.lineTo(r, m), w && e.lineTo(r, m), h.push({ x: r, y1: m, y2: s })) : (b.beginPath(), b.moveTo(r, m), v = { x: r, y: m }, h = [], h.push({ x: r, y1: m, y2: s }), w && (e.beginPath(), e.moveTo(r, m))), I = q = !1) : (b.lineTo(r, m), h.push({ x: r, y1: m, y2: s }), w && e.lineTo(r, m), 0 == g % 250 && d()); u = n.dataPointIds[g]; this._eventManager.objectMap[u] = { id: u, objectType: "dataPoint", dataSeriesIndex: k, dataPointIndex: g, x1: r, y1: m, y2: s }; g < p.length - 1 && (x !== (p[g].lineColor || A) || D !== (p[g].lineDashType || n.lineDashType)) && (d(), x = p[g].lineColor || A, h[h.length - 1].newStrokeStyle = x, b.strokeStyle = x, b.setLineDash && (p[g].lineDashType ? (D = p[g].lineDashType, h[h.length - 1].newLineDashArray = N(D, n.lineThickness), b.setLineDash(h[h.length - 1].newLineDashArray)) : (D = n.lineDashType, h[h.length - 1].newLineDashArray = E, b.setLineDash(E)))); if (0 !== p[g].markerSize && (0 < p[g].markerSize || 0 < n.markerSize)) { var R = n.getMarkerProperties(g, r, s, b); f.push(R); var ba = Q(u); w && f.push({ x: r, y: s, ctx: e, type: R.type, size: R.size, color: ba, borderColor: ba, borderThickness: R.borderThickness }); R = n.getMarkerProperties(g, r, m, b); f.push(R); ba = Q(u); w && f.push({ x: r, y: m, ctx: e, type: R.type, size: R.size, color: ba, borderColor: ba, borderThickness: R.borderThickness }) } if (p[g].indexLabel || n.indexLabel || p[g].indexLabelFormatter || n.indexLabelFormatter) this._indexLabels.push({ chartType: "rangeArea", dataPoint: p[g], dataSeries: n, indexKeyword: 0, point: { x: r, y: m }, direction: p[g].y[0] > p[g].y[1] === a.axisY.reversed ? -1 : 1, color: z }), this._indexLabels.push({ chartType: "rangeArea", dataPoint: p[g], dataSeries: n, indexKeyword: 1, point: { x: r, y: s }, direction: p[g].y[0] > p[g].y[1] === a.axisY.reversed ? 1 : -1, color: z }) } else I || q || d(), I = !0; d(); $.drawMarkers(f) } } w && (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(l.x1, l.y1, l.width, l.height), this._eventManager.ghostCtx.restore()); b.restore(); return { source: c, dest: this.plotArea.ctx, animationCallback: J.xClipAnimation, easingFunction: J.easing.linear, animationBase: 0 } } }; m.prototype.renderRangeSplineArea = function(a) { function d(a, c) { var d = v(s, 2); if (0 < d.length) { if (0 < k.lineThickness) { b.strokeStyle = c; b.setLineDash && b.setLineDash(a); b.beginPath(); b.moveTo(d[0].x, d[0].y); for (var f = 0; f < d.length - 3; f += 3) { if (d[f].newStrokeStyle || d[f].newLineDashArray) b.stroke(), b.beginPath(), b.moveTo(d[f].x, d[f].y), d[f].newStrokeStyle && (b.strokeStyle = d[f].newStrokeStyle), d[f].newLineDashArray && b.setLineDash(d[f].newLineDashArray); b.bezierCurveTo(d[f + 1].x, d[f + 1].y, d[f + 2].x, d[f + 2].y, d[f + 3].x, d[f + 3].y) } } b.beginPath(); b.moveTo(d[0].x, d[0].y); w && (e.beginPath(), e.moveTo(d[0].x, d[0].y)); for (f = 0; f < d.length - 3; f += 3) b.bezierCurveTo(d[f + 1].x, d[f + 1].y, d[f + 2].x, d[f + 2].y, d[f + 3].x, d[f + 3].y), w && e.bezierCurveTo(d[f + 1].x, d[f + 1].y, d[f + 2].x, d[f + 2].y, d[f + 3].x, d[f + 3].y); d = v(x, 2); b.lineTo(x[x.length - 1].x, x[x.length - 1].y); for (f = d.length - 1; 2 < f; f -= 3) b.bezierCurveTo(d[f - 1].x, d[f - 1].y, d[f - 2].x, d[f - 2].y, d[f - 3].x, d[f - 3].y), w && e.bezierCurveTo(d[f - 1].x, d[f - 1].y, d[f - 2].x, d[f - 2].y, d[f - 3].x, d[f - 3].y); b.closePath(); b.globalAlpha = k.fillOpacity; b.fill(); w && (e.closePath(), e.fill()); b.globalAlpha = 1; if (0 < k.lineThickness) { b.strokeStyle = c; b.setLineDash && b.setLineDash(a); b.beginPath(); b.moveTo(d[0].x, d[0].y); for (var g = f = 0; f < d.length - 3; f += 3, g++) { if (s[g].newStrokeStyle || s[g].newLineDashArray) b.stroke(), b.beginPath(), b.moveTo(d[f].x, d[f].y), s[g].newStrokeStyle && (b.strokeStyle = s[g].newStrokeStyle), s[g].newLineDashArray && b.setLineDash(s[g].newLineDashArray); b.bezierCurveTo(d[f + 1].x, d[f + 1].y, d[f + 2].x, d[f + 2].y, d[f + 3].x, d[f + 3].y) } d = v(s, 2); b.moveTo(d[0].x, d[0].y); for (g = f = 0; f < d.length - 3; f += 3, g++) { if (s[g].newStrokeStyle || s[g].newLineDashArray) b.stroke(), b.beginPath(), b.moveTo(d[f].x, d[f].y), s[g].newStrokeStyle && (b.strokeStyle = s[g].newStrokeStyle), s[g].newLineDashArray && b.setLineDash(s[g].newLineDashArray); b.bezierCurveTo(d[f + 1].x, d[f + 1].y, d[f + 2].x, d[f + 2].y, d[f + 3].x, d[f + 3].y) } b.stroke() } b.beginPath() } } var c = a.targetCanvasCtx || this.plotArea.ctx, b = w ? this._preRenderCtx : c; if (!(0 >= a.dataSeriesIndexes.length)) { var e = this._eventManager.ghostCtx, f = [], l = this.plotArea; b.save(); w && e.save(); b.beginPath(); b.rect(l.x1, l.y1, l.width, l.height); b.clip(); w && (e.beginPath(), e.rect(l.x1, l.y1, l.width, l.height), e.clip()); for (var h = 0; h < a.dataSeriesIndexes.length; h++) { var m = a.dataSeriesIndexes[h], k = this.data[m], n = k.dataPoints, f = k.id; this._eventManager.objectMap[f] = { objectType: "dataSeries", dataSeriesIndex: m }; f = Q(f); e.fillStyle = f; var f = [], p = 0, q, g, r, s = [], x = []; if (0 < n.length) { var u = k._colorSet[p % k._colorSet.length], B = k.lineColor = k.options.lineColor || u, z = B; b.fillStyle = u; b.lineWidth = k.lineThickness; var A = "solid", y; if (b.setLineDash) { var D = N(k.nullDataLineDashType, k.lineThickness), A = k.lineDashType; y = N(A, k.lineThickness) } for (g = !1; p < n.length; p++) if (q = n[p].x.getTime ? n[p].x.getTime() : n[p].x, !(q < a.axisX.dataInfo.viewPortMin || q > a.axisX.dataInfo.viewPortMax && (!k.connectNullData || !g))) if (null !== n[p].y && n[p].y.length && "number" === typeof n[p].y[0] && "number" === typeof n[p].y[1]) { q = a.axisX.convertValueToPixel(q); g = a.axisY.convertValueToPixel(n[p].y[0]); r = a.axisY.convertValueToPixel(n[p].y[1]); var E = k.dataPointIds[p]; this._eventManager.objectMap[E] = { id: E, objectType: "dataPoint", dataSeriesIndex: m, dataPointIndex: p, x1: q, y1: g, y2: r }; s[s.length] = { x: q, y: g }; x[x.length] = { x: q, y: r }; p < n.length - 1 && (z !== (n[p].lineColor || B) || A !== (n[p].lineDashType || k.lineDashType)) && (z = n[p].lineColor || B, s[s.length - 1].newStrokeStyle = z, b.setLineDash && (n[p].lineDashType ? (A = n[p].lineDashType, s[s.length - 1].newLineDashArray = N(A, k.lineThickness)) : (A = k.lineDashType, s[s.length - 1].newLineDashArray = y))); if (0 !== n[p].markerSize && (0 < n[p].markerSize || 0 < k.markerSize)) { var F = k.getMarkerProperties(p, q, g, b); f.push(F); var I = Q(E); w && f.push({ x: q, y: g, ctx: e, type: F.type, size: F.size, color: I, borderColor: I, borderThickness: F.borderThickness }); F = k.getMarkerProperties(p, q, r, b); f.push(F); I = Q(E); w && f.push({ x: q, y: r, ctx: e, type: F.type, size: F.size, color: I, borderColor: I, borderThickness: F.borderThickness }) } if (n[p].indexLabel || k.indexLabel || n[p].indexLabelFormatter || k.indexLabelFormatter) this._indexLabels.push({ chartType: "rangeSplineArea", dataPoint: n[p], dataSeries: k, indexKeyword: 0, point: { x: q, y: g }, direction: n[p].y[0] <= n[p].y[1] ? -1 : 1, color: u }), this._indexLabels.push({ chartType: "rangeSplineArea", dataPoint: n[p], dataSeries: k, indexKeyword: 1, point: { x: q, y: r }, direction: n[p].y[0] <= n[p].y[1] ? 1 : -1, color: u }); g = !1 } else 0 < p && !g && (k.connectNullData ? b.setLineDash && (0 < s.length && (k.options.nullDataLineDashType || !n[p - 1].lineDashType)) && (s[s.length - 1].newLineDashArray = D, A = k.nullDataLineDashType) : (d(y, B), s = [], x = [])), g = !0; d(y, B); $.drawMarkers(f) } } w && (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(l.x1, l.y1, l.width, l.height), this._eventManager.ghostCtx.restore()); b.restore(); return { source: c, dest: this.plotArea.ctx, animationCallback: J.xClipAnimation, easingFunction: J.easing.linear, animationBase: 0 } } }; m.prototype.renderWaterfall = function(a) { var d = a.targetCanvasCtx || this.plotArea.ctx, c = w ? this._preRenderCtx : d; if (!(0 >= a.dataSeriesIndexes.length)) { var b = this._eventManager.ghostCtx, e = null, f = this.plotArea, l = 0, h, m, k, n, p = a.axisY.convertValueToPixel(a.axisY.logarithmic ? a.axisY.viewportMinimum : 0), l = 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; var q = a.axisX.dataInfo.minDiff; isFinite(q) || (q = 0.3 * Math.abs(a.axisX.range)); q = this.options.dataPointWidth ? this.dataPointWidth : 0.6 * (f.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 && l > m && (l = Math.min(this.options.dataPointWidth ? this.dataPointWidth : Infinity, m)); !this.dataPointMaxWidth && (this.dataPointMinWidth && m < l) && (m = Math.max(this.options.dataPointWidth ? this.dataPointWidth : -Infinity, l)); q < l && (q = l); q > m && (q = m); c.save(); w && this._eventManager.ghostCtx.save(); c.beginPath(); c.rect(f.x1, f.y1, f.width, f.height); c.clip(); w && (this._eventManager.ghostCtx.beginPath(), this._eventManager.ghostCtx.rect(f.x1, f.y1, f.width, f.height), this._eventManager.ghostCtx.clip()); for (var g = 0; g < a.dataSeriesIndexes.length; g++) { var r = a.dataSeriesIndexes[g], s = this.data[r], v = s.dataPoints, e = s._colorSet[0]; s.risingColor = s.options.risingColor ? s.options.risingColor : e; s.fallingColor = s.options.fallingColor ? s.options.fallingColor : "#e40a0a"; var u = "number" === typeof s.options.lineThickness ? Math.round(s.lineThickness) : 1, B = 1 === Math.round(u) % 2 ? -0.5 : 0; if (0 < v.length) for (var z = 5 < q && s.bevelEnabled ? !0 : !1, x = !1, y = null, D = null, l = 0; l < v.length; l++) if (v[l].getTime ? n = v[l].x.getTime() : n = v[l].x, "number" !== typeof v[l].y) { if (0 < l && !x && s.connectNullData) var E = s.options.nullDataLineDashType || !v[l - 1].lineDashType ? s.nullDataLineDashType : v[l - 1].lineDashType; x = !0 } else { h = a.axisX.convertValueToPixel(n); m = 0 === s.dataPointEOs[l].cumulativeSum ? p : a.axisY.convertValueToPixel(s.dataPointEOs[l].cumulativeSum); k = 0 === s.dataPointEOs[l].cumulativeSumYStartValue ? p : a.axisY.convertValueToPixel(s.dataPointEOs[l].cumulativeSumYStartValue); h = a.axisX.reversed ? h + a.plotType.totalDataSeries * q / 2 - (a.previousDataSeriesCount + g) * q << 0 : h - a.plotType.totalDataSeries * q / 2 + (a.previousDataSeriesCount + g) * q << 0; var F = a.axisX.reversed ? h - q << 0 : h + q << 0; m > k && (e = m, m = k, k = e); a.axisY.reversed && (e = m, m = k, k = e); e = s.dataPointIds[l]; this._eventManager.objectMap[e] = { id: e, objectType: "dataPoint", dataSeriesIndex: r, dataPointIndex: l, x1: h, y1: m, x2: F, y2: k }; var I = v[l].color ? v[l].color : 0 < v[l].y ? s.risingColor : s.fallingColor; ea(c, a.axisX.reversed ? F : h, a.axisY.reversed ? k : m, a.axisX.reversed ? h : F, a.axisY.reversed ? m : k, I, 0, I, z, z, !1, !1, s.fillOpacity); e = Q(e); w && ea(this._eventManager.ghostCtx, a.axisX.reversed ? F : h, m, a.axisX.reversed ? h : F, k, e, 0, null, !1, !1, !1, !1); var R, I = h; R = "undefined" !== typeof v[l].isIntermediateSum && !0 === v[l].isIntermediateSum || "undefined" !== typeof v[l].isCumulativeSum && !0 === v[l].isCumulativeSum ? 0 < v[l].y ? m : k : 0 < v[l].y ? k : m; 0 < l && y && (!x || s.connectNullData) && (x && c.setLineDash && c.setLineDash(N(E, u)), c.beginPath(), c.moveTo(y, D - B), c.lineTo(I, R - B), 0 < u && c.stroke(), w && (b.beginPath(), b.moveTo(y, D - B), b.lineTo(I, R - B), 0 < u && b.stroke())); x = !1; y = F; D = 0 < v[l].y ? m : k; I = v[l].lineDashType ? v[l].lineDashType : s.options.lineDashType ? s.options.lineDashType : "shortDash"; c.strokeStyle = v[l].lineColor ? v[l].lineColor : s.options.lineColor ? s.options.lineColor : "#9e9e9e"; c.lineWidth = u; c.setLineDash && (I = N(I, u), c.setLineDash(I)); (v[l].indexLabel || s.indexLabel || v[l].indexLabelFormatter || s.indexLabelFormatter) && this._indexLabels.push({ chartType: "waterfall", dataPoint: v[l], dataSeries: s, point: { x: h + (F - h) / 2, y: 0 <= v[l].y ? m : k }, direction: 0 > v[l].y === a.axisY.reversed ? 1 : -1, bounds: { x1: h, y1: Math.min(m, k), x2: F, y2: Math.max(m, k) }, color: e }) } } w && (d.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(f.x1, f.y1, f.width, f.height), this._eventManager.ghostCtx.restore()); c.restore(); return { source: d, dest: this.plotArea.ctx, animationCallback: J.fadeInAnimation, easingFunction: J.easing.easeInQuad, animationBase: 0 } } }; var ha = function(a, d, c, b, e, f, l, h, m) { if (!(0 > c)) { "undefined" === typeof h && (h = 1); if (!w) { var k = Number((l % (2 * Math.PI)).toFixed(8)); Number((f % (2 * Math.PI)).toFixed(8)) === k && (l -= 1E-4) } a.save(); a.globalAlpha = h; "pie" === e ? (a.beginPath(), a.moveTo(d.x, d.y), a.arc(d.x, d.y, c, f, l, !1), a.fillStyle = b, a.strokeStyle = "white", a.lineWidth = 2, a.closePath(), a.fill()) : "doughnut" === e && (a.beginPath(), a.arc(d.x, d.y, c, f, l, !1), 0 <= m && a.arc(d.x, d.y, m * c, l, f, !0), a.closePath(), a.fillStyle = b, a.strokeStyle = "white", a.lineWidth = 2, a.fill()); a.globalAlpha = 1; a.restore() } }; m.prototype.renderPie = function(a) { function d() { if (k && n) { for (var a = 0, b = 0, c = 0, d = 0, e = 0; e < n.length; e++) { var f = n[e], l = k.dataPointIds[e]; g[e].id = l; g[e].objectType = "dataPoint"; g[e].dataPointIndex = e; g[e].dataSeriesIndex = 0; var h = g[e], p = { percent: null, total: null }, t = null, p = m.getPercentAndTotal(k, f); if (k.indexLabelFormatter || f.indexLabelFormatter) t = { chart: m.options, dataSeries: k, dataPoint: f, total: p.total, percent: p.percent }; p = f.indexLabelFormatter ? f.indexLabelFormatter(t) : f.indexLabel ? m.replaceKeywordsWithValue(f.indexLabel, f, k, e) : k.indexLabelFormatter ? k.indexLabelFormatter(t) : k.indexLabel ? m.replaceKeywordsWithValue(k.indexLabel, f, k, e) : f.label ? f.label : ""; m._eventManager.objectMap[l] = h; h.center = { x: z.x, y: z.y }; h.y = f.y; h.radius = D; h.percentInnerRadius = F; h.indexLabelText = p; h.indexLabelPlacement = k.indexLabelPlacement; h.indexLabelLineColor = f.indexLabelLineColor ? f.indexLabelLineColor : k.options.indexLabelLineColor ? k.options.indexLabelLineColor : f.color ? f.color : k._colorSet[e % k._colorSet.length]; h.indexLabelLineThickness = s(f.indexLabelLineThickness) ? k.indexLabelLineThickness : f.indexLabelLineThickness; h.indexLabelLineDashType = f.indexLabelLineDashType ? f.indexLabelLineDashType : k.indexLabelLineDashType; h.indexLabelFontColor = f.indexLabelFontColor ? f.indexLabelFontColor : k.indexLabelFontColor; h.indexLabelFontStyle = f.indexLabelFontStyle ? f.indexLabelFontStyle : k.indexLabelFontStyle; h.indexLabelFontWeight = f.indexLabelFontWeight ? f.indexLabelFontWeight : k.indexLabelFontWeight; h.indexLabelFontSize = s(f.indexLabelFontSize) ? k.indexLabelFontSize : f.indexLabelFontSize; h.indexLabelFontFamily = f.indexLabelFontFamily ? f.indexLabelFontFamily : k.indexLabelFontFamily; h.indexLabelBackgroundColor = f.indexLabelBackgroundColor ? f.indexLabelBackgroundColor : k.options.indexLabelBackgroundColor ? k.options.indexLabelBackgroundColor : k.indexLabelBackgroundColor; h.indexLabelMaxWidth = f.indexLabelMaxWidth ? f.indexLabelMaxWidth : k.indexLabelMaxWidth ? k.indexLabelMaxWidth : 0.33 * q.width; h.indexLabelWrap = "undefined" !== typeof f.indexLabelWrap ? f.indexLabelWrap : k.indexLabelWrap; h.indexLabelTextAlign = f.indexLabelTextAlign ? f.indexLabelTextAlign : k.indexLabelTextAlign ? k.indexLabelTextAlign : "left"; h.startAngle = 0 === e ? k.startAngle ? k.startAngle / 180 * Math.PI : 0 : g[e - 1].endAngle; h.startAngle = (h.startAngle + 2 * Math.PI) % (2 * Math.PI); h.endAngle = h.startAngle + 2 * Math.PI / x * Math.abs(f.y); f = (h.endAngle + h.startAngle) / 2; f = (f + 2 * Math.PI) % (2 * Math.PI); h.midAngle = f; if (h.midAngle > Math.PI / 2 - u && h.midAngle < Math.PI / 2 + u) { if (0 === a || g[c].midAngle > h.midAngle) c = e; a++ } else if (h.midAngle > 3 * Math.PI / 2 - u && h.midAngle < 3 * Math.PI / 2 + u) { if (0 === b || g[d].midAngle > h.midAngle) d = e; b++ } h.hemisphere = f > Math.PI / 2 && f <= 3 * Math.PI / 2 ? "left" : "right"; h.indexLabelTextBlock = new ia(m.plotArea.ctx, { fontSize: h.indexLabelFontSize, fontFamily: h.indexLabelFontFamily, fontColor: h.indexLabelFontColor, fontStyle: h.indexLabelFontStyle, fontWeight: h.indexLabelFontWeight, textAlign: h.indexLabelTextAlign, backgroundColor: h.indexLabelBackgroundColor, maxWidth: h.indexLabelMaxWidth, maxHeight: h.indexLabelWrap ? 5 * h.indexLabelFontSize : 1.5 * h.indexLabelFontSize, text: h.indexLabelText, padding: 0, textBaseline: "top" }); h.indexLabelTextBlock.measureText() } l = f = 0; p = !1; for (e = 0; e < n.length; e++) h = g[(c + e) % n.length], 1 < a && (h.midAngle > Math.PI / 2 - u && h.midAngle < Math.PI / 2 + u) && (f <= a / 2 && !p ? (h.hemisphere = "right", f++) : (h.hemisphere = "left", p = !0)); p = !1; for (e = 0; e < n.length; e++) h = g[(d + e) % n.length], 1 < b && (h.midAngle > 3 * Math.PI / 2 - u && h.midAngle < 3 * Math.PI / 2 + u) && (l <= b / 2 && !p ? (h.hemisphere = "left", l++) : (h.hemisphere = "right", p = !0)) } } function c(a) { var b = m.plotArea.ctx; b.clearRect(q.x1, q.y1, q.width, q.height); b.fillStyle = m.backgroundColor; b.fillRect(q.x1, q.y1, q.width, q.height); for (b = 0; b < n.length; b++) { var c = g[b].startAngle, d = g[b].endAngle; if (d > c) { var e = 0.07 * D * Math.cos(g[b].midAngle), f = 0.07 * D * Math.sin(g[b].midAngle), l = !1; if (n[b].exploded) { if (1E-9 < Math.abs(g[b].center.x - (z.x + e)) || 1E-9 < Math.abs(g[b].center.y - (z.y + f))) g[b].center.x = z.x + e * a, g[b].center.y = z.y + f * a, l = !0 } else if (0 < Math.abs(g[b].center.x - z.x) || 0 < Math.abs(g[b].center.y - z.y)) g[b].center.x = z.x + e * (1 - a), g[b].center.y = z.y + f * (1 - a), l = !0; l && (e = {}, e.dataSeries = k, e.dataPoint = k.dataPoints[b], e.index = b, m.toolTip.highlightObjects([e])); ha(m.plotArea.ctx, g[b].center, g[b].radius, n[b].color ? n[b].color : k._colorSet[b % k._colorSet.length], k.type, c, d, k.fillOpacity, g[b].percentInnerRadius) } } a = m.plotArea.ctx; a.save(); a.fillStyle = "black"; a.strokeStyle = "grey"; a.textBaseline = "middle"; a.lineJoin = "round"; for (b = b = 0; b < n.length; b++) c = g[b], c.indexLabelText && (c.indexLabelTextBlock.y -= c.indexLabelTextBlock.height / 2, d = 0, d = "left" === c.hemisphere ? "inside" !== k.indexLabelPlacement ? -(c.indexLabelTextBlock.width + p) : -c.indexLabelTextBlock.width / 2 : "inside" !== k.indexLabelPlacement ? p : -c.indexLabelTextBlock.width / 2, c.indexLabelTextBlock.x += d, c.indexLabelTextBlock.render(!0), c.indexLabelTextBlock.x -= d, c.indexLabelTextBlock.y += c.indexLabelTextBlock.height / 2, "inside" !== c.indexLabelPlacement && 0 < c.indexLabelLineThickness && (d = c.center.x + D * Math.cos(c.midAngle), e = c.center.y + D * Math.sin(c.midAngle), a.strokeStyle = c.indexLabelLineColor, a.lineWidth = c.indexLabelLineThickness, a.setLineDash && a.setLineDash(N(c.indexLabelLineDashType, c.indexLabelLineThickness)), a.beginPath(), a.moveTo(d, e), a.lineTo(c.indexLabelTextBlock.x, c.indexLabelTextBlock.y), a.lineTo(c.indexLabelTextBlock.x + ("left" === c.hemisphere ? -p : p), c.indexLabelTextBlock.y), a.stroke()), a.lineJoin = "miter"); a.save() } function b(a, b) { var c = 0, c = a.indexLabelTextBlock.y - a.indexLabelTextBlock.height / 2, d = a.indexLabelTextBlock.y + a.indexLabelTextBlock.height / 2, e = b.indexLabelTextBlock.y - b.indexLabelTextBlock.height / 2, f = b.indexLabelTextBlock.y + b.indexLabelTextBlock.height / 2; return c = b.indexLabelTextBlock.y > a.indexLabelTextBlock.y ? e - d : c - f } function e(a) { for (var c = null, d = 1; d < n.length; d++) if (c = (a + d + g.length) % g.length, g[c].hemisphere !== g[a].hemisphere) { c = null; break } else if (g[c].indexLabelText && c !== a && (0 > b(g[c], g[a]) || ("right" === g[a].hemisphere ? g[c].indexLabelTextBlock.y >= g[a].indexLabelTextBlock.y : g[c].indexLabelTextBlock.y <= g[a].indexLabelTextBlock.y))) break; else c = null; return c } function f(a, c, d) { d = (d || 0) + 1; if (1E3 < d) return 0; c = c || 0; var l = 0, k = z.y - 1 * v, h = z.y + 1 * v; if (0 <= a && a < n.length) { var p = g[a]; if (0 > c && p.indexLabelTextBlock.y < k || 0 < c && p.indexLabelTextBlock.y > h) return 0; var q = 0, t = 0, t = q = q = 0; 0 > *****.indexLabelTextBlock.y - p.indexLabelTextBlock.height / 2 > k && p.indexLabelTextBlock.y - p.indexLabelTextBlock.height / 2 + c < k && (c = -(k - (p.indexLabelTextBlock.y - p.indexLabelTextBlock.height / 2 + c))) : p.indexLabelTextBlock.y + p.indexLabelTextBlock.height / 2 < k && p.indexLabelTextBlock.y + p.indexLabelTextBlock.height / 2 + c > h && (*****.indexLabelTextBlock.y + p.indexLabelTextBlock.height / 2 + c - h); *****.indexLabelTextBlock.y + c; k = 0; k = "right" === p.hemisphere ? z.x + Math.sqrt(Math.pow(v, 2) - Math.pow(c - z.y, 2)) : z.x - Math.sqrt(Math.pow(v, 2) - Math.pow(c - z.y, 2)); t = z.x + D * Math.*****.midAngle); q = z.y + D * Math.sin(p.midAngle); q = Math.sqrt(Math.pow(k - t, 2) + Math.pow(c - q, 2)); t = Math.acos(D / v); q = Math.acos((v * v + D * D - q * q) / (2 * D * v)); c = q < t ? *****.indexLabelTextBlock.y : 0; k = null; for (h = 1; h < n.length; h++) if (k = (a - h + g.length) % g.length, g[k].hemisphere !== g[a].hemisphere) { k = null; break } else if (g[k].indexLabelText && g[k].hemisphere === g[a].hemisphere && k !== a && (0 > b(g[k], g[a]) || ("right" === g[a].hemisphere ? g[k].indexLabelTextBlock.y <= g[a].indexLabelTextBlock.y : g[k].indexLabelTextBlock.y >= g[a].indexLabelTextBlock.y))) break; else k = null; t = k; q = e(a); h = k = 0; 0 > c ? (h = "right" === p.hemisphere ? t : q, l = c, null !== h && (t = -c, *****.indexLabelTextBlock.y - p.indexLabelTextBlock.height / 2 - (g[h].indexLabelTextBlock.y + g[h].indexLabelTextBlock.height / 2), c - t < r && (k = -t, h = f(h, k, d + 1), +h.toFixed(B) > +k.toFixed(B) && (l = c > r ? -(c - r) : -(t - (h - k)))))) : 0 < c && (h = "right" === p.hemisphere ? q : t, l = c, null !== h && (t = c, c = g[h].indexLabelTextBlock.y - g[h].indexLabelTextBlock.height / 2 - (p.indexLabelTextBlock.y + p.indexLabelTextBlock.height / 2), c - t < r && (k = t, h = f(h, k, d + 1), +h.toFixed(B) < +k.toFixed(B) && (l = c > r ? c - r : t - (k - h))))); l && (d = p.indexLabelTextBlock.y + l, c = 0, c = "right" === p.hemisphere ? z.x + Math.sqrt(Math.pow(v, 2) - Math.pow(d - z.y, 2)) : z.x - Math.sqrt(Math.pow(v, 2) - Math.pow(d - z.y, 2)), p.midAngle > Math.PI / 2 - u && p.midAngle < Math.PI / 2 + u ? (k = (a - 1 + g.length) % g.length, k = g[k], a = g[(a + 1 + g.length) % g.length], "left" === p.hemisphere && "right" === k.hemisphere && c > k.indexLabelTextBlock.x ? c = k.indexLabelTextBlock.x - 15 : "right" === p.hemisphere && ("left" === a.hemisphere && c < a.indexLabelTextBlock.x) && (c = a.indexLabelTextBlock.x + 15)) : p.midAngle > 3 * Math.PI / 2 - u && p.midAngle < 3 * Math.PI / 2 + u && (k = (a - 1 + g.length) % g.length, k = g[k], a = g[(a + 1 + g.length) % g.length], "right" === p.hemisphere && "left" === k.hemisphere && c < k.indexLabelTextBlock.x ? c = k.indexLabelTextBlock.x + 15 : "left" === p.hemisphere && ("right" === a.hemisphere && c > a.indexLabelTextBlock.x) && (c = a.indexLabelTextBlock.x - 15)), p.indexLabelTextBlock.y = d, p.indexLabelTextBlock.x = c, p.indexLabelAngle = Math.atan2(p.indexLabelTextBlock.y - z.y, p.indexLabelTextBlock.x - z.x)) } return l } function l() { var a = m.plotArea.ctx; a.fillStyle = "grey"; a.strokeStyle = "grey"; a.font = "16px Arial"; a.textBaseline = "middle"; for (var c = a = 0, d = 0, l = !0, c = 0; 10 > c && (1 > c || 0 < d); c++) { if (k.radius || !k.radius && "undefined" !== typeof k.innerRadius && null !== k.innerRadius && D - d <= E) l = !1; l && (D -= d); d = 0; if ("inside" !== k.indexLabelPlacement) { v = D * w; for (a = 0; a < n.length; a++) { var h = g[a]; h.indexLabelTextBlock.x = z.x + v * Math.cos(h.midAngle); h.indexLabelTextBlock.y = z.y + v * Math.sin(h.midAngle); h.indexLabelAngle = h.midAngle; h.radius = D; h.percentInnerRadius = F } for (var t, s, a = 0; a < n.length; a++) { var h = g[a], u = e(a); if (null !== u) { t = g[a]; s = g[u]; var x = 0, x = b(t, s) - r; if (0 > x) { for (var A = s = 0, y = 0; y < n.length; y++) y !== a && g[y].hemisphere === h.hemisphere && (g[y].indexLabelTextBlock.y < h.indexLabelTextBlock.y ? s++ : A++); s = x / (s + A || 1) * A; var A = -1 * (x - s), J = y = 0; "right" === h.hemisphere ? (y = f(a, s), A = -1 * (x - y), J = f(u, A), +J.toFixed(B) < +A.toFixed(B) && +y.toFixed(B) <= +s.toFixed(B) && f(a, -(A - J))) : (y = f(u, s), A = -1 * (x - y), J = f(a, A), +J.toFixed(B) < +A.toFixed(B) && +y.toFixed(B) <= +s.toFixed(B) && f(u, -(A - J))) } } } } else for (a = 0; a < n.length; a++) h = g[a], v = "pie" === k.type ? 0.7 * D : 0.8 * D, u = z.x + v * Math.cos(h.midAngle), s = z.y + v * Math.sin(h.midAngle), h.indexLabelTextBlock.x = u, h.indexLabelTextBlock.y = s; for (a = 0; a < n.length; a++) if (h = g[a], u = h.indexLabelTextBlock.measureText(), 0 !== u.height && 0 !== u.width) u = u = 0, "right" === h.hemisphere ? (u = q.x2 - (h.indexLabelTextBlock.x + h.indexLabelTextBlock.width + p), u *= -1) : u = q.x1 - (h.indexLabelTextBlock.x - h.indexLabelTextBlock.width - p), 0 < u && (!l && h.indexLabelText && (s = "right" === h.hemisphere ? q.x2 - h.indexLabelTextBlock.x : h.indexLabelTextBlock.x - q.x1, 0.3 * h.indexLabelTextBlock.maxWidth > s ? h.indexLabelText = "" : h.indexLabelTextBlock.maxWidth = 0.85 * s, 0.3 * h.indexLabelTextBlock.maxWidth < s && (h.indexLabelTextBlock.x -= "right" === h.hemisphere ? 2 : -2)), Math.abs(h.indexLabelTextBlock.y - h.indexLabelTextBlock.height / 2 - z.y) < D || Math.abs(h.indexLabelTextBlock.y + h.indexLabelTextBlock.height / 2 - z.y) < D) && (u /= Math.abs(Math.cos(h.indexLabelAngle)), 9 < u && (u *= 0.3), u > d && (d = u)), u = u = 0, 0 < h.indexLabelAngle && h.indexLabelAngle < Math.PI ? (u = q.y2 - (h.indexLabelTextBlock.y + h.indexLabelTextBlock.height / 2 + 5), u *= -1) : u = q.y1 - (h.indexLabelTextBlock.y - h.indexLabelTextBlock.height / 2 - 5), 0 < u && (!l && h.indexLabelText && (s = 0 < h.indexLabelAngle && h.indexLabelAngle < Math.PI ? -1 : 1, 0 === f(a, u * s) && f(a, 2 * s)), Math.abs(h.indexLabelTextBlock.x - z.x) < D && (u /= Math.abs(Math.sin(h.indexLabelAngle)), 9 < u && (u *= 0.3), u > d && (d = u))); var K = function(a, b, c) { for (var d = [], e = 0; d.push(g[b]), b !== c; b = (b + 1 + n.length) % n.length); d.sort(function(a, b) { return a.y - b.y }); for (b = 0; b < d.length; b++) if (c = d[b], e < 0.7 * a) e += c.indexLabelTextBlock.height, c.indexLabelTextBlock.text = "", c.indexLabelText = "", c.indexLabelTextBlock.measureText(); else break }; (function() { for (var a = -1, c = -1, d = 0, f = !1, k = 0; k < n.length; k++) if (f = !1, t = g[k], t.indexLabelText) { var l = e(k); if (null !== l) { var h = g[l]; x = 0; x = b(t, h); var q; if (q = 0 > x) { q = t.indexLabelTextBlock.x; var m = t.indexLabelTextBlock.y - t.indexLabelTextBlock.height / 2, r = t.indexLabelTextBlock.y + t.indexLabelTextBlock.height / 2, s = h.indexLabelTextBlock.y - h.indexLabelTextBlock.height / 2, u = h.indexLabelTextBlock.x + h.indexLabelTextBlock.width, C = h.indexLabelTextBlock.y + h.indexLabelTextBlock.height / 2; q = t.indexLabelTextBlock.x + t.indexLabelTextBlock.width < h.indexLabelTextBlock.x - p || q > u + p || m > ***** || r < s - p ? !1 : !0 } q ? (0 > a && (a = k), l !== a && (c = l, d += -x), 0 === k % Math.max(n.length / 10, 3) && (f = !0)) : f = !0; f && (0 < d && 0 <= a && 0 <= c) && (K(d, a, c), c = a = -1, d = 0) } } 0 < d && K(d, a, c) })() } } function h() { m.plotArea.layoutManager.reset(); m.title && (m.title.dockInsidePlotArea || "center" === m.title.horizontalAlign && "center" === m.title.verticalAlign) && m.title.render(); if (m.subtitles) for (var a = 0; a < m.subtitles.length; a++) { var b = m.subtitles[a]; (b.dockInsidePlotArea || "center" === b.horizontalAlign && "center" === b.verticalAlign) && b.render() } m.legend && (m.legend.dockInsidePlotArea || "center" === m.legend.horizontalAlign && "center" === m.legend.verticalAlign) && (m.legend.setLayout(), m.legend.render()) } var m = this; if (!(0 >= a.dataSeriesIndexes.length)) { var k = this.data[a.dataSeriesIndexes[0]], n = k.dataPoints, p = 10, q = this.plotArea, g = k.dataPointEOs, r = 2, v, w = 1.3, u = 20 / 180 * Math.PI, B = 6, z = { x: (q.x2 + q.x1) / 2, y: (q.y2 + q.y1) / 2 }, x = 0; a = !1; for (var y = 0; y < n.length; y++) x += Math.abs(n[y].y), !a && ("undefined" !== typeof n[y].indexLabel && null !== n[y].indexLabel && 0 < n[y].indexLabel.toString().length) && (a = !0), !a && ("undefined" !== typeof n[y].label && null !== n[y].label && 0 < n[y].label.toString().length) && (a = !0); if (0 !== x) { a = a || "undefined" !== typeof k.indexLabel && null !== k.indexLabel && 0 < k.indexLabel.toString().length; var D = "inside" !== k.indexLabelPlacement && a ? 0.75 * Math.min(q.width, q.height) / 2 : 0.92 * Math.min(q.width, q.height) / 2; k.radius && (D = Ra(k.radius, D)); var E = "undefined" !== typeof k.innerRadius && null !== k.innerRadius ? Ra(k.innerRadius, D) : 0.7 * D; k.radius = D; "doughnut" === k.type && (k.innerRadius = E); var F = Math.min(E / D, (D - 1) / D); this.pieDoughnutClickHandler = function(a) { m.isAnimating || !s(a.dataSeries.explodeOnClick) && !a.dataSeries.explodeOnClick || (a = a.dataPoint, a.exploded = a.exploded ? !1 : !0, 1 < this.dataPoints.length && m._animator.animate(0, 500, function(a) { c(a); h(); m.dispatchEvent("dataAnimationIterationEnd", { chart: m }); m.dispatchEvent("dataAnimationEnd", { chart: m }) })) }; d(); l(); l(); l(); l(); this.disableToolTip = !0; this._animator.animate(0, this.animatedRender ? this.animationDuration : 0, function(a) { var b = m.plotArea.ctx; b.clearRect(q.x1, q.y1, q.width, q.height); b.fillStyle = m.backgroundColor; b.fillRect(q.x1, q.y1, q.width, q.height); for (var b = g[0].startAngle + 2 * Math.PI * a, c = 0; c < n.length; c++) { var d = 0 === c ? g[c].startAngle : e, e = d + (g[c].endAngle - g[c].startAngle), f = !1; e > b && (e = b, f = !0); var l = n[c].color ? n[c].color : k._colorSet[c % k._colorSet.length]; e > d && ha(m.plotArea.ctx, g[c].center, g[c].radius, l, k.type, d, e, k.fillOpacity, g[c].percentInnerRadius); if (f) break } h(); m.dispatchEvent("dataAnimationIterationEnd", { chart: m }); 1 <= a && m.dispatchEvent("dataAnimationEnd", { chart: m }) }, function() { m.disableToolTip = !1; m._animator.animate(0, m.animatedRender ? 500 : 0, function(a) { c(a); h(); m.dispatchEvent("dataAnimationIterationEnd", { chart: m }) }); m.dispatchEvent("dataAnimationEnd", { chart: m }) }) } } }; var na = function(a, d, c, b) { "undefined" === typeof c && (c = 1); 0 >= Math.round(d.y4 - d.y1) || (a.save(), a.globalAlpha = c, a.beginPath(), a.moveTo(Math.round(d.x1), Math.round(d.y1)), a.lineTo(Math.round(d.x2), Math.round(d.y2)), a.lineTo(Math.round(d.x3), Math.round(d.y3)), a.lineTo(Math.round(d.x4), Math.round(d.y4)), "undefined" !== d.x5 && (a.lineTo(Math.round(d.x5), Math.round(d.y5)), a.lineTo(Math.round(d.x6), Math.round(d.y6))), a.closePath(), a.fillStyle = b ? b : d.color, a.fill(), a.globalAplha = 1, a.restore()) }; m.prototype.renderFunnel = function(a) { function d() { for (var a = 0, b = [], c = 0; c < B.length; c++) { if ("undefined" === typeof B[c].y) return -1; B[c].y = "number" === typeof B[c].y ? B[c].y : 0; a += Math.abs(B[c].y) } if (0 === a) return -1; for (c = b[0] = 0; c < B.length; c++) b.push(Math.abs(B[c].y) * E / a); return b } function c() { var a = U, b = Z, c = K, d = $, e, f; e = Y; f = O - aa; d = Math.abs((f - e) * (b - a + (d - c)) / 2); c = $ - K; e = f - e; f = c * (f - O); f = Math.abs(f); f = d + f; for (var d = [], g = 0, k = 0; k < B.length; k++) { if ("undefined" === typeof B[k].y) return -1; B[k].y = "number" === typeof B[k].y ? B[k].y : 0; g += Math.abs(B[k].y) } if (0 === g) return -1; for (var l = d[0] = 0, h = 0, n, p, b = b - a, l = !1, k = 0; k < B.length; k++) a = Math.abs(B[k].y) * f / g, l ? n = 0 == Number(c.toFixed(3)) ? 0 : a / c : (p = X * X * b * b - 4 * Math.abs(X) * a, 0 > p ? (p = c, l = (b + p) * (e - h) / 2, a -= l, n = e - h, h += e - h, n += 0 == p ? 0 : a / p, h += a / p, l = !0) : (n = (Math.abs(X) * b - Math.sqrt(p)) / 2, p = b - 2 * n / Math.abs(X), h += n, h > e && (h -= n, p = c, l = (b + p) * (e - h) / 2, a -= l, n = e - h, h += e - h, n += a / p, h += a / p, l = !0), b = p)), d.push(n); return d } function b() { if (u && B) { for (var a, b, c, d, e, f, k, l, h, n, p, q, t, m, r, C = [], v = [], z = { percent: null, total: null }, y = null, A = 0; A < B.length; A++) r = P[A], r = "undefined" !== typeof r.x5 ? (r.y2 + r.y4) / 2 : (r.y2 + r.y3) / 2, r = g(r).x2 + 1, C[A] = L - r - S; r = 0.5 * S; for (var A = 0, D = B.length - 1; A < B.length || 0 <= D; A++, D--) { b = u.reversed ? B[D] : B[A]; a = b.color ? b.color : u.reversed ? u._colorSet[(B.length - 1 - A) % u._colorSet.length] : u._colorSet[A % u._colorSet.length]; c = b.indexLabelPlacement || u.indexLabelPlacement || "outside"; m = b.indexLabelTextAlign || u.indexLabelTextAlign || "left"; d = b.indexLabelBackgroundColor || u.indexLabelBackgroundColor || (w ? "transparent" : null); e = b.indexLabelFontColor || u.indexLabelFontColor || "#979797"; f = s(b.indexLabelFontSize) ? u.indexLabelFontSize : b.indexLabelFontSize; k = b.indexLabelFontStyle || u.indexLabelFontStyle || "normal"; l = b.indexLabelFontFamily || u.indexLabelFontFamily || "arial"; h = b.indexLabelFontWeight || u.indexLabelFontWeight || "normal"; a = b.indexLabelLineColor || u.options.indexLabelLineColor || a; n = "number" === typeof b.indexLabelLineThickness ? b.indexLabelLineThickness : "number" === typeof u.indexLabelLineThickness ? u.indexLabelLineThickness : 2; p = b.indexLabelLineDashType || u.indexLabelLineDashType || "solid"; q = "undefined" !== typeof b.indexLabelWrap ? b.indexLabelWrap : "undefined" !== typeof u.indexLabelWrap ? u.indexLabelWrap : !0; t = u.dataPointIds[A]; x._eventManager.objectMap[t] = { id: t, objectType: "dataPoint", dataPointIndex: A, dataSeriesIndex: 0, funnelSection: P[u.reversed ? B.length - 1 - A : A] }; "inside" === u.indexLabelPlacement && (C[A] = A !== ca ? u.reversed ? P[A].x2 - P[A].x1 : P[A].x3 - P[A].x4 : P[A].x3 - P[A].x6, 20 > C[A] && (C[A] = A !== ca ? u.reversed ? P[A].x3 - P[A].x4 : P[A].x2 - P[A].x1 : P[A].x2 - P[A].x1, C[A] /= 2)); t = b.indexLabelMaxWidth ? b.indexLabelMaxWidth : u.options.indexLabelMaxWidth ? u.indexLabelMaxWidth : C[A]; if (t > C[A] || 0 > t) t = C[A]; v[A] = "inside" === u.indexLabelPlacement ? P[A].height : !1; z = x.getPercentAndTotal(u, b); if (u.indexLabelFormatter || b.indexLabelFormatter) y = { chart: x.options, dataSeries: u, dataPoint: b, total: z.total, percent: z.percent }; b = b.indexLabelFormatter ? b.indexLabelFormatter(y) : b.indexLabel ? x.replaceKeywordsWithValue(b.indexLabel, b, u, A) : u.indexLabelFormatter ? u.indexLabelFormatter(y) : u.indexLabel ? x.replaceKeywordsWithValue(u.indexLabel, b, u, A) : b.label ? b.label : ""; 0 >= n && (n = 0); 1E3 > t && 1E3 - t < r && (t += 1E3 - t); Q.roundRect || Aa(Q); c = new ia(Q, { fontSize: f, fontFamily: l, fontColor: e, fontStyle: k, fontWeight: h, horizontalAlign: c, textAlign: m, backgroundColor: d, maxWidth: t, maxHeight: !1 === v[A] ? q ? 4.28571429 * f : 1.5 * f : v[A], text: b, padding: da }); c.measureText(); H.push({ textBlock: c, id: u.reversed ? D : A, isDirty: !1, lineColor: a, lineThickness: n, lineDashType: p, height: c.height < c.maxHeight ? c.height : c.maxHeight, width: c.width < c.maxWidth ? c.width : c.maxWidth }) } } } function e() { var a, b, c, d, e, f = []; e = !1; c = 0; for (var g, k = L - Z - S / 2, k = u.options.indexLabelMaxWidth ? u.indexLabelMaxWidth > k ? k : u.indexLabelMaxWidth : k, l = H.length - 1; 0 <= l; l--) { g = B[H[l].id]; c = H[l]; d = c.textBlock; b = (a = q(l) < P.length ? H[q(l)] : null) ? a.textBlock : null; c = c.height; a && d.y + c + da > b.y && (e = !0); c = g.indexLabelMaxWidth || k; if (c > k || 0 > c) c = k; f.push(c) } if (e) for (l = H.length - 1; 0 <= l; l--) a = P[l], H[l].textBlock.maxWidth = f[f.length - (l + 1)], H[l].textBlock.measureText(), H[l].textBlock.x = L - k, c = H[l].textBlock.height < H[l].textBlock.maxHeight ? H[l].textBlock.height : H[l].textBlock.maxHeight, e = H[l].textBlock.width < H[l].textBlock.maxWidth ? H[l].textBlock.width : H[l].textBlock.maxWidth, H[l].height = c, H[l].width = e, c = "undefined" !== typeof a.x5 ? (a.y2 + a.y4) / 2 : (a.y2 + a.y3) / 2, H[l].textBlock.y = c - H[l].height / 2, u.reversed ? (H[l].textBlock.y + H[l].height > V + A && (H[l].textBlock.y = V + A - H[l].height), H[l].textBlock.y < qa - A && (H[l].textBlock.y = qa - A)) : (H[l].textBlock.y < V - A && (H[l].textBlock.y = V - A), H[l].textBlock.y + H[l].height > qa + A && (H[l].textBlock.y = qa + A - H[l].height)) } function f() { var a, b, c, d; if ("inside" !== u.indexLabelPlacement) for (var e = 0; e < P.length; e++) 0 == H[e].textBlock.text.length ? H[e].isDirty = !0 : (a = P[e], c = "undefined" !== typeof a.x5 ? (a.y2 + a.y4) / 2 : (a.y2 + a.y3) / 2, b = u.reversed ? "undefined" !== typeof a.x5 ? c > va ? g(c).x2 + 1 : (a.x2 + a.x3) / 2 + 1 : (a.x2 + a.x3) / 2 + 1 : "undefined" !== typeof a.x5 ? c < va ? g(c).x2 + 1 : (a.x4 + a.x3) / 2 + 1 : (a.x2 + a.x3) / 2 + 1, H[e].textBlock.x = b + S, H[e].textBlock.y = c - H[e].height / 2, u.reversed ? (H[e].textBlock.y + H[e].height > V + A && (H[e].textBlock.y = V + A - H[e].height), H[e].textBlock.y < qa - A && (H[e].textBlock.y = qa - A)) : (H[e].textBlock.y < V - A && (H[e].textBlock.y = V - A), H[e].textBlock.y + H[e].height > qa + A && (H[e].textBlock.y = qa + A - H[e].height))); else for (e = 0; e < P.length; e++) 0 == H[e].textBlock.text.length ? H[e].isDirty = !0 : (a = P[e], b = a.height, c = H[e].height, d = H[e].width, b >= c ? (b = e != ca ? (a.x4 + a.x3) / 2 - d / 2 : (a.x5 + a.x4) / 2 - d / 2, c = e != ca ? (a.y1 + a.y3) / 2 - c / 2 : (a.y1 + a.y4) / 2 - c / 2, H[e].textBlock.x = b, H[e].textBlock.y = c) : H[e].isDirty = !0) } function l() { function a(b, c) { var d; if (0 > b || b >= H.length) return 0; var e, f = H[b].textBlock; if (0 > c) { c *= -1; e = p(b); d = h(e, b); if (d >= c) return f.y -= c, c; if (0 == b) return 0 < d && (f.y -= d), d; d += a(e, -(c - d)); 0 < d && (f.y -= d); return d } e = q(b); d = h(b, e); if (d >= c) return f.y += c, c; if (b == P.length - 1) return 0 < d && (f.y += d), d; d += a(e, c - d); 0 < d && (f.y += d); return d } function b() { var a, d, e, f, g = 0, l; f = (O - Y + 2 * A) / n; l = n; for (var k, h = 1; h < l; h++) { e = h * f; for (var t = H.length - 1; 0 <= t; t--) !H[t].isDirty && (H[t].textBlock.y < e && H[t].textBlock.y + H[t].height > e) && (k = q(t), !(k >= H.length - 1) && H[t].textBlock.y + H[t].height + da > H[k].textBlock.y && (H[t].textBlock.y = H[t].textBlock.y + H[t].height - e > e - H[t].textBlock.y ? e + 1 : e - H[t].height - 1)) } for (k = P.length - 1; 0 < k; k--) if (!H[k].isDirty) { e = p(k); if (0 > e && (e = 0, H[e].isDirty)) break; if (H[k].textBlock.y < H[e].textBlock.y + H[e].height) { d = d || k; f = k; for (l = 0; H[f].textBlock.y < H[e].textBlock.y + H[e].height + da;) { a = a || H[f].textBlock.y + H[f].height; l += H[f].height; l += da; f = e; if (0 >= f) { f = 0; l += H[f].height; break } e = p(f); if (0 > e) { f = 0; l += H[f].height; break } } if (f != k) { g = H[f].textBlock.y; a -= g; a = l - a; g = c(a, d, f); break } } } return g } function c(a, b, d) { var e = [], f = 0, g = 0; for (a = Math.abs(a); d <= b; d++) e.push(P[d]); e.sort(function(a, b) { return a.height - b.height }); for (d = 0; d < e.length; d++) if (b = e[d], f < a) g++, f += H[b.id].height + da, H[b.id].textBlock.text = "", H[b.id].indexLabelText = "", H[b.id].isDirty = !0, H[b.id].textBlock.measureText(); else break; return g } for (var d, e, f, g, l, k, n = 1, m = 0; m < 2 * n; m++) { for (var r = H.length - 1; 0 <= r && !(0 <= p(r) && p(r), f = H[r], g = f.textBlock, k = (l = q(r) < P.length ? H[q(r)] : null) ? l.textBlock : null, d = +f.height.toFixed(6), e = +g.y.toFixed(6), !f.isDirty && (l && e + d + da > +k.y.toFixed(6)) && (d = g.y + d + da - k.y, e = a(r, -d), e < d && (0 < e && (d -= e), e = a(q(r), d), e != d))); r--); b() } } function h(a, b) { return (b < P.length ? H[b].textBlock.y : u.reversed ? V + A : qa + A) - (0 > a ? u.reversed ? qa - A : V - A : H[a].textBlock.y + H[a].height + da) } function m(a, b, c) { var d, e, g, l = [], h = A, p = []; - 1 !== b && (0 <= W.indexOf(b) ? (e = W.indexOf(b), W.splice(e, 1)) : (W.push(b), W = W.sort(function(a, b) { return a - b }))); if (0 === W.length) l = ha; else { e = A * (1 != W.length || 0 != W[0] && W[0] != P.length - 1 ? 2 : 1) / k(); for (var q = 0; q < P.length; q++) { if (1 == W.length && 0 == W[0]) { if (0 === q) { l.push(ha[q]); d = h; continue } } else 0 === q && (d = -1 * h); l.push(ha[q] + d); if (0 <= W.indexOf(q) || q < P.length && 0 <= W.indexOf(q + 1)) d += e } } g = function() { for (var a = [], b = 0; b < P.length; b++) a.push(l[b] - P[b].y1); return a }(); var t = { startTime: (new Date).getTime(), duration: c || 500, easingFunction: function(a, b, c, d) { return J.easing.easeOutQuart(a, b, c, d) }, changeSection: function(a) { for (var b, c, d = 0; d < P.length; d++) b = g[d], *****[d], b *= a, "undefined" === typeof p[d] && (p[d] = 0), 0 > p && (p *= -1), c.y1 += b - p[d], c.y2 += b - p[d], c.y3 += b - p[d], c.y4 += b - p[d], c.y5 && (c.y5 += b - p[d], c.y6 += b - p[d]), p[d] = b } }; a._animator.animate(0, c, function(c) { var d = a.plotArea.ctx || a.ctx; ga = !0; d.clearRect(z.x1, z.y1, z.x2 - z.x1, z.y2 - z.y1); d.fillStyle = a.backgroundColor; d.fillRect(z.x1, z.y1, z.width, z.height); t.changeSection(c, b); var e = {}; e.dataSeries = u; e.dataPoint = u.reversed ? u.dataPoints[B.length - 1 - b] : u.dataPoints[b]; e.index = u.reversed ? B.length - 1 - b : b; a.toolTip.highlightObjects([e]); for (e = 0; e < P.length; e++) na(d, P[e], u.fillOpacity); v(d); I && ("inside" !== u.indexLabelPlacement ? n(d) : f(), r(d)); 1 <= c && (ga = !1) }, null, J.easing.easeOutQuart) } function k() { for (var a = 0, b = 0; b < P.length - 1; b++)(0 <= W.indexOf(b) || 0 <= W.indexOf(b + 1)) && a++; return a } function n(a) { for (var b, c, d, e, f = 0; f < P.length; f++) e = 1 === H[f].lineThickness % 2 ? 0.5 : 0, c = ((P[f].y2 + P[f].y4) / 2 << 0) + e, b = g(c).x2 - 1, d = H[f].textBlock.x, e = (H[f].textBlock.y + H[f].height / 2 << 0) + e, H[f].isDirty || 0 == H[f].lineThickness || (a.strokeStyle = H[f].lineColor, a.lineWidth = H[f].lineThickness, a.setLineDash && a.setLineDash(N(H[f].lineDashType, H[f].lineThickness)), a.beginPath(), a.moveTo(b, c), a.lineTo(d, e), a.stroke()) } function p(a) { for (a -= 1; - 1 <= a && -1 != a && H[a].isDirty; a--); return a } function q(a) { for (a += 1; a <= P.length && a != P.length && H[a].isDirty; a++); return a } function g(a) { for (var b, c = 0; c < B.length; c++) if (P[c].y1 < a && P[c].y4 > a) { b = P[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 r(a) { for (var b = 0; b < P.length; b++) H[b].isDirty || (a && (H[b].textBlock.ctx = a), H[b].textBlock.render(!0)) } function v(a) { x.plotArea.layoutManager.reset(); a.roundRect || Aa(a); x.title && (x.title.dockInsidePlotArea || "center" === x.title.horizontalAlign && "center" === x.title.verticalAlign) && (x.title.ctx = a, x.title.render()); if (x.subtitles) for (var b = 0; b < x.subtitles.length; b++) { var c = x.subtitles[b]; if (c.dockInsidePlotArea || "center" === c.horizontalAlign && "center" === c.verticalAlign) x.subtitles.ctx = a, c.render() } x.legend && (x.legend.dockInsidePlotArea || "center" === x.legend.horizontalAlign && "center" === x.legend.verticalAlign) && (x.legend.ctx = a, x.legend.setLayout(), x.legend.render()); M.fNg && M.fNg(x) } var x = this; if (!(0 >= a.dataSeriesIndexes.length)) { for (var u = this.data[a.dataSeriesIndexes[0]], B = u.dataPoints, z = this.plotArea, A = 0.025 * z.width, y = 0.01 * z.width, D = 0, E = z.height - 2 * A, F = Math.min(z.width - 2 * y, 2.8 * z.height), I = !1, R = 0; R < B.length; R++) if (!I && ("undefined" !== typeof B[R].indexLabel && null !== B[R].indexLabel && 0 < B[R].indexLabel.toString().length) && (I = !0), !I && ("undefined" !== typeof B[R].label && null !== B[R].label && 0 < B[R].label.toString().length) && (I = !0), !I && "function" === typeof u.indexLabelFormatter || "function" === typeof B[R].indexLabelFormatter) I = !0; I = I || "undefined" !== typeof u.indexLabel && null !== u.indexLabel && 0 < u.indexLabel.toString().length; "inside" !== u.indexLabelPlacement && I || (y = (z.width - 0.75 * F) / 2); var R = z.x1 + y, L = z.x2 - y, Y = z.y1 + A, O = z.y2 - A, Q = a.targetCanvasCtx || this.plotArea.ctx || this.ctx; if (0 != u.length && (u.dataPoints && u.visible) && 0 !== B.length) { var aa, G; a = 75 * F / 100; var S = 30 * (L - a) / 100; "funnel" === u.type ? (aa = s(u.options.neckHeight) ? 0.35 * E : u.neckHeight, G = s(u.options.neckWidth) ? 0.25 * a : u.neckWidth, "string" === typeof aa && aa.match(/%$/) ? (aa = parseInt(aa), aa = aa * E / 100) : aa = parseInt(aa), "string" === typeof G && G.match(/%$/) ? (G = parseInt(G), G = G * a / 100) : G = parseInt(G), aa > E ? aa = E : 0 >= aa && (aa = 0), G > a ? G = a - 0.5 : 0 >= G && (G = 0)) : "pyramid" === u.type && (G = aa = 0, u.reversed = u.reversed ? !1 : !0); var y = R + a / 2, U = R, Z = R + a, V = u.reversed ? O : Y, K = y - G / 2, $ = y + G / 2, va = u.reversed ? Y + aa : O - aa, qa = u.reversed ? Y : O; a = []; var y = [], P = [], F = [], T = Y, ca, X = (va - V) / (K - U), ea = -X, R = "area" === (u.valueRepresents ? u.valueRepresents : "height") ? c() : d(); if (-1 !== R) { if (u.reversed) for (F.push(T), G = R.length - 1; 0 < G; G--) T += R[G], F.push(T); else for (G = 0; G < R.length; G++) T += R[G], F.push(T); if (u.reversed) for (G = 0; G < R.length; G++) F[G] < va ? (a.push(K), y.push($), ca = G) : (a.push((F[G] - V + X * U) / X), y.push((F[G] - V + ea * Z) / ea)); else for (G = 0; G < R.length; G++) F[G] < va ? (a.push((F[G] - V + X * U) / X), y.push((F[G] - V + ea * Z) / ea), ca = G) : (a.push(K), y.push($)); for (G = 0; G < R.length - 1; G++) T = u.reversed ? B[B.length - 1 - G].color ? B[B.length - 1 - G].color : u._colorSet[(B.length - 1 - G) % u._colorSet.length] : B[G].color ? B[G].color : u._colorSet[G % u._colorSet.length], G === ca ? P.push({ x1: a[G], y1: F[G], x2: y[G], y2: F[G], x3: $, y3: va, x4: y[G + 1], y4: F[G + 1], x5: a[G + 1], y5: F[G + 1], x6: K, y6: va, id: G, height: F[G + 1] - F[G], color: T }) : P.push({ x1: a[G], y1: F[G], x2: y[G], y2: F[G], x3: y[G + 1], y3: F[G + 1], x4: a[G + 1], y4: F[G + 1], id: G, height: F[G + 1] - F[G], color: T }); var da = 2, H = [], ga = !1, W = [], ha = [], R = !1; a = a = 0; Ba(W); for (G = 0; G < B.length; G++) B[G].exploded && (R = !0, u.reversed ? W.push(B.length - 1 - G) : W.push(G)); Q.clearRect(z.x1, z.y1, z.width, z.height); Q.fillStyle = x.backgroundColor; Q.fillRect(z.x1, z.y1, z.width, z.height); if (I && u.visible && (b(), f(), e(), "inside" !== u.indexLabelPlacement)) { l(); for (G = 0; G < B.length; G++) H[G].isDirty || (a = H[G].textBlock.x + H[G].width, a = (L - a) / 2, 0 == G && (D = a), D > a && (D = a)); for (G = 0; G < P.length; G++) P[G].x1 += D, P[G].x2 += D, P[G].x3 += D, P[G].x4 += D, P[G].x5 && (P[G].x5 += D, P[G].x6 += D), H[G].textBlock.x += D } for (G = 0; G < P.length; G++) D = P[G], na(Q, D, u.fillOpacity), ha.push(D.y1); v(Q); I && u.visible && ("inside" === u.indexLabelPlacement || x.animationEnabled || n(Q), x.animationEnabled || r()); if (!I) for (G = 0; G < B.length; G++) D = u.dataPointIds[G], a = { id: D, objectType: "dataPoint", dataPointIndex: G, dataSeriesIndex: 0, funnelSection: P[u.reversed ? B.length - 1 - G : G] }, x._eventManager.objectMap[D] = a; !x.animationEnabled && R ? m(x, -1, 0) : x.animationEnabled && !x.animatedRender && m(x, -1, 0); this.funnelPyramidClickHandler = function(a) { var b = -1; if (!ga && !x.isAnimating && (s(a.dataSeries.explodeOnClick) || a.dataSeries.explodeOnClick) && (b = u.reversed ? B.length - 1 - a.dataPointIndex : a.dataPointIndex, 0 <= b)) { a = b; if ("funnel" === u.type || "pyramid" === u.type) u.reversed ? B[B.length - 1 - a].exploded = B[B.length - 1 - a].exploded ? !1 : !0 : B[a].exploded = B[a].exploded ? !1 : !0; m(x, b, 500) } }; return { source: Q, dest: this.plotArea.ctx, animationCallback: function(a, b) { J.fadeInAnimation(a, b); 1 <= a && (m(x, -1, 500), v(x.plotArea.ctx || x.ctx)) }, easingFunction: J.easing.easeInQuad, animationBase: 0 } } } } }; m.prototype.requestAnimFrame = function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(a) { window.setTimeout(a, 1E3 / 60) } }(); m.prototype.cancelRequestAnimFrame = window.cancelAnimationFrame || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout; m.prototype.set = function(a, d, c) { c = "undefined" === typeof c ? !0 : c; "options" === a ? (this.options = d, c && this.render()) : m.base.set.call(this, a, d, c) }; m.prototype.exportChart = function(a) { a = "undefined" === typeof a ? {} : a; var d = a.format ? a.format : "png", c = a.fileName ? a.fileName : this.exportFileName; if (a.toDataURL) return this.canvas.toDataURL("image/" + d); var b = this.canvas; if (b && d && c) { c = c + "." + d; a = "image/" + d; var b = b.toDataURL(a), e = !1, f = document.createElement("a"); f.download = c; f.href = b; if ("undefined" !== typeof Blob && new Blob) { for (var l = b.replace(/^data:[a-z\/]*;base64,/, ""), l = atob(l), h = new ArrayBuffer(l.length), h = new Uint8Array(h), m = 0; m < l.length; m++) h[m] = l.charCodeAt(m); d = new Blob([h.buffer], { type: "image/" + d }); try { window.navigator.msSaveBlob(d, c), e = !0 } catch (k) { f.dataset.downloadurl = [a, f.download, f.href].join(":"), f.href = window.URL.createObjectURL(d) } } if (!e) try { event = document.createEvent("MouseEvents"), event.initMouseEvent("click", !0, !1, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), f.dispatchEvent ? f.dispatchEvent(event) : f.fireEvent && f.fireEvent("onclick") } catch (n) { d = window.open(), d.document.write("