(function() { function bW() { var m, p = arguments, r, s = {}, t = function(u, w) { var x, z; typeof u !== "object" && (u = {}); for (z in w) { w.hasOwnProperty(z) && (x = w[z], u[z] = x && typeof x === "object" && Object.prototype.toString.call(x) !== "[object Array]" && z !== "renderTo" && typeof x.nodeType !== "number" ? t(u[z] || {}, x) : w[z]) } return u }; p[0] === !0 && (s = p[1], p = Array.prototype.slice.call(p, 2)); r = p.length; for (m = 0; m < r; m++) { s = t(s, p[m]) } return s } function h(m, p) { return parseInt(m, p || 10) } function E(m) { return typeof m === "string" } function n(m) { return m && typeof m === "object" } function aq(m) { return Object.prototype.toString.call(m) === "[object Array]" } function bb(m) { return typeof m === "number" } function ac(m) { return bB.log(m) / bB.LN10 } function ap(m) { return bB.pow(10, m) } function av(m, p) { for (var r = m.length; r--; ) { if (m[r] === p) { m.splice(r, 1); break } } } function bl(m) { return m !== bw && m !== null } function aJ(m, p, r) { var s, t; if (E(p)) { bl(r) ? m.setAttribute(p, r) : m && m.getAttribute && (t = m.getAttribute(p)) } else { if (bl(p) && n(p)) { for (s in p) { m.setAttribute(s, p[s]) } } } return t } function bh(m) { return aq(m) ? m : [m] } function af(m, p) { if (bT && !i && p && p.opacity !== bw) { p.filter = "alpha(opacity=" + p.opacity * 100 + ")" } bf(m.style, p) } function bX(m, p, r, s, t) { m = c.createElement(m); p && bf(m, p); t && af(m, { padding: 0, border: bg, margin: 0 }); r && af(m, r); s && s.appendChild(m); return m } function aA(m, p) { var r = function() { return bw }; r.prototype = new m; bf(r.prototype, p); return r } function aw(m, p) { return Array((p || 2) + 1 - String(m).length).join(0) + m } function bJ(m) { return (ad && ad(m) || aX || 0) * 60000 } function aB(m, p) { for (var r = "{", s = !1, t, u, w, x, z, A = []; (r = m.indexOf(r)) !== -1; ) { t = m.slice(0, r); if (s) { u = t.split(":"); w = u.shift().split("."); z = w.length; t = p; for (x = 0; x < z; x++) { t = t[w[x]] } if (u.length) { u = u.join(":"), w = /\.([0-9])/, x = a5.lang, z = void 0, /f$/.test(u) ? (z = (z = u.match(w)) ? z[1] : -1, t !== null && (t = bG.numberFormat(t, z, x.decimalPoint, u.indexOf(",") > -1 ? x.thousandsSep : ""))) : t = a1(u, t) } } A.push(t); m = m.slice(r + 1); r = (s = !s) ? "}" : "{" } A.push(m); return A.join("") } function a2(m) { return bB.pow(10, bx(bB.log(m) / bB.LN10)) } function a8(m, p, r, s, t) { var u, w = m, r = a4(r, 1); u = m / r; p || (p = [1, 2, 2.5, 5, 10], s === !1 && (r === 1 ? p = [1, 2, 5, 10] : r <= 0.1 && (p = [1 / r]))); for (s = 0; s < p.length; s++) { if (w = p[s], t && w * r >= m || !t && u <= (p[s] + (p[s + 1] || p[s])) / 2) { break } } w *= r; return w } function bd(m, p) { var r = m.length, s, t; for (t = 0; t < r; t++) { m[t].ss_i = t } m.sort(function(u, w) { s = p(u, w); return s === 0 ? u.ss_i - w.ss_i : s }); for (t = 0; t < r; t++) { delete m[t].ss_i } } function a7(m) { for (var p = m.length, r = m[0]; p--; ) { m[p] < r && (r = m[p]) } return r } function ag(m) { for (var p = m.length, r = m[0]; p--; ) { m[p] > r && (r = m[p]) } return r } function bc(m, p) { for (var r in m) { m[r] && m[r] !== p && m[r].destroy && m[r].destroy(), delete m[r] } } function bi(m) { ah || (ah = bX(aG)); m && ah.appendChild(m); ah.innerHTML = "" } function aF(m, p) { var r = "Highcharts error #" + m + ": www.highcharts.com/errors/" + m; if (p) { throw r } ao.console && console.log(r) } function C(m) { return parseFloat(m.toPrecision(14)) } function bn(m, p) { bY = a4(m, p.animation) } function v() { var m = a5.global , p = m.useUTC , r = p ? "getUTC" : "get" , s = p ? "setUTC" : "set"; e = m.Date || window.Date; aX = p && m.timezoneOffset; ad = p && m.getTimezoneOffset; am = function(t, u, w, x, z, A) { var B; p ? (B = e.UTC.apply(0, arguments), B += bJ(B)) : B = (new e(t,u,a4(w, 1),a4(x, 0),a4(z, 0),a4(A, 0))).getTime(); return B } ; bj = r + "Minutes"; bo = r + "Hours"; bu = r + "Day"; bP = r + "Date"; bU = r + "Month"; bZ = r + "FullYear"; aa = s + "Milliseconds"; ae = s + "Seconds"; ai = s + "Minutes"; an = s + "Hours"; bz = s + "Date"; bE = s + "Month"; bK = s + "FullYear" } function aE() {} function bt(m, p, r, s) { this.axis = m; this.pos = p; this.type = r || ""; this.isNew = !0; !r && !s && this.addLabel() } function at(m, p, r, s, t) { var u = m.chart.inverted; this.axis = m; this.isNegative = r; this.options = p; this.x = s; this.total = null; this.points = {}; this.stack = t; this.alignOptions = { align: p.align || (u ? r ? "left" : "right" : "center"), verticalAlign: p.verticalAlign || (u ? "middle" : r ? "bottom" : "top"), y: a4(p.y, u ? 4 : r ? 14 : -6), x: a4(p.x, u ? r ? -6 : 6 : 0) }; this.textAlign = p.textAlign || (u ? r ? "right" : "left" : "center") } var bw, c = document, ao = window, bB = Math, bM = bB.round, bx = bB.floor, bm = bB.ceil, bq = bB.max, au = bB.min, aZ = bB.abs, bH = bB.cos, a = bB.sin, aK = bB.PI, ak = aK * 2 / 360, j = navigator.userAgent, ay = ao.opera, bT = /(msie|trident)/i.test(j) && !ay, ar = c.documentMode === 8, bQ = /AppleWebKit/.test(j), aL = /Firefox/.test(j), aD = /(Mobile|Android|Windows Phone)/.test(j), o = "http://www.w3.org/2000/svg", i = !!c.createElementNS && !!c.createElementNS(o, "svg").createSVGRect, aY = aL && parseInt(j.split("Firefox/")[1], 10) < 4, ab = !i && !bT && !!c.createElement("canvas").getContext, b, f, aI = {}, bV = 0, ah, a5, a1, bY, b0, aj, aQ = function() { return bw }, bN = [], k = 0, aG = "div", bg = "none", a3 = /^[0-9]+$/, ax = ["plotTop", "marginRight", "marginBottom", "plotLeft"], a9 = "stroke-width", e, am, aX, ad, bj, bo, bu, bP, bU, bZ, aa, ae, ai, an, bz, bE, bK, az = {}, bG; bG = ao.Highcharts = ao.Highcharts ? aF(16, !0) : {}; bG.seriesTypes = az; var bf = bG.extend = function(m, p) { var r; m || (m = {}); for (r in p) { m[r] = p[r] } return m } , a4 = bG.pick = function() { var m = arguments, p, r, s = m.length; for (p = 0; p < s; p++) { if (r = m[p], r !== bw && r !== null) { return r } } } , q = bG.wrap = function(m, p, r) { var s = m[p]; m[p] = function() { var t = Array.prototype.slice.call(arguments); t.unshift(s); return r.apply(this, t) } } ; a1 = function(m, p, r) { if (!bl(p) || isNaN(p)) { return "Invalid date" } var m = a4(m, "%Y-%m-%d %H:%M:%S"), s = new e(p - bJ(p)), t, u = s[bo](), w = s[bu](), x = s[bP](), z = s[bU](), A = s[bZ](), B = a5.lang, D = B.weekdays, s = bf({ a: D[w].substr(0, 3), A: D[w], d: aw(x), e: x, w: w, b: B.shortMonths[z], B: B.months[z], m: aw(z + 1), y: A.toString().substr(2, 2), Y: A, H: aw(u), I: aw(u % 12 || 12), l: u % 12 || 12, M: aw(s[bj]()), p: u < 12 ? "AM" : "PM", P: u < 12 ? "am" : "pm", S: aw(s.getSeconds()), L: aw(bM(p % 1000), 3) }, bG.dateFormats); for (t in s) { for (; m.indexOf("%" + t) !== -1; ) { m = m.replace("%" + t, typeof s[t] === "function" ? s[t](p) : s[t]) } } return r ? m.substr(0, 1).toUpperCase() + m.substr(1) : m } ; aj = { millisecond: 1, second: 1000, minute: 60000, hour: 3600000, day: 86400000, week: 604800000, month: 2419200000, year: 31449600000 }; bG.numberFormat = function(m, p, r, s) { var t = a5.lang , m = +m || 0 , u = p === -1 ? au((m.toString().split(".")[1] || "").length, 20) : isNaN(p = aZ(p)) ? 2 : p , p = r === void 0 ? t.decimalPoint : r , s = s === void 0 ? t.thousandsSep : s , t = m < 0 ? "-" : "" , r = String(h(m = aZ(m).toFixed(u))) , w = r.length > 3 ? r.length % 3 : 0; return t + (w ? r.substr(0, w) + s : "") + r.substr(w).replace(/(\d{3})(?=\d)/g, "$1" + s) + (u ? p + aZ(m - r).toFixed(u).slice(2) : "") } ; b0 = { init: function(m, p, r) { var p = p || "", s = m.shift, t = p.indexOf("C") > -1, u = t ? 7 : 3, w, p = p.split(" "), r = [].concat(r), x, z, A = function(B) { for (w = B.length; w--; ) { B[w] === "M" && B.splice(w + 1, 0, B[w + 1], B[w + 2], B[w + 1], B[w + 2]) } }; t && (A(p), A(r)); m.isArea && (x = p.splice(p.length - 6, 6), z = r.splice(r.length - 6, 6)); if (s <= r.length / u && p.length === r.length) { for (; s--; ) { r = [].concat(r).splice(0, u).concat(r) } } m.shift = 0; if (p.length) { for (m = r.length; p.length < m; ) { s = [].concat(p).splice(p.length - u, u), t && (s[u - 6] = s[u - 2], s[u - 5] = s[u - 1]), p = p.concat(s) } } x && (p = p.concat(x), r = r.concat(z)); return [p, r] }, step: function(m, p, r, s) { var t = [] , u = m.length; if (r === 1) { t = s } else { if (u === p.length && r < 1) { for (; u--; ) { s = parseFloat(m[u]), t[u] = isNaN(s) ? m[u] : r * parseFloat(p[u] - s) + s } } else { t = p } } return t } }; (function(m) { ao.HighchartsAdapter = ao.HighchartsAdapter || m && { init: function(p) { var r = m.fx; m.extend(m.easing, { easeOutQuad: function(s, t, u, w, x) { return -w * (t /= x) * (t - 2) + u } }); m.each(["cur", "_default", "width", "height", "opacity"], function(s, t) { var u = r.step, w; t === "cur" ? u = r.prototype : t === "_default" && m.Tween && (u = m.Tween.propHooks[t], t = "set"); (w = u[t]) && (u[t] = function(x) { var z, x = s ? x : this; if (x.prop !== "align") { return z = x.elem, z.attr ? z.attr(x.prop, t === "cur" ? bw : x.now) : w.apply(this, arguments) } } ) }); q(m.cssHooks.opacity, "get", function(s, t, u) { return t.attr ? t.opacity || 0 : s.call(this, t, u) }); this.addAnimSetter("d", function(s) { var t = s.elem, u; if (!s.started) { u = p.init(t, t.d, t.toD), s.start = u[0], s.end = u[1], s.started = !0 } t.attr("d", p.step(s.start, s.end, s.pos, t.toD)) }); this.each = Array.prototype.forEach ? function(s, t) { return Array.prototype.forEach.call(s, t) } : function(s, t) { var u, w = s.length; for (u = 0; u < w; u++) { if (t.call(s[u], s[u], u, s) === !1) { return u } } } ; m.fn.highcharts = function() { var s = "Chart", t = arguments, u, w; if (this[0]) { E(t[0]) && (s = t[0], t = Array.prototype.slice.call(t, 1)); u = t[0]; if (u !== bw) { u.chart = u.chart || {}, u.chart.renderTo = this[0], new bG[s](u,t[1]), w = this } u === bw && (w = bN[aJ(this[0], "data-highcharts-chart")]) } return w } }, addAnimSetter: function(p, r) { m.Tween ? m.Tween.propHooks[p] = { set: r } : m.fx.step[p] = r }, getScript: m.getScript, inArray: m.inArray, adapterRun: function(p, r) { return m(p)[r]() }, grep: m.grep, map: function(p, r) { for (var s = [], t = 0, u = p.length; t < u; t++) { s[t] = r.call(p[t], p[t], t, p) } return s }, offset: function(p) { return m(p).offset() }, addEvent: function(p, r, s) { m(p).bind(r, s) }, removeEvent: function(p, r, s) { var t = c.removeEventListener ? "removeEventListener" : "detachEvent"; c[t] && p && !p[t] && (p[t] = function() {} ); m(p).unbind(r, s) }, fireEvent: function(p, r, s, t) { var u = m.Event(r), w = "detached" + r, x; !bT && s && (delete s.layerX, delete s.layerY, delete s.returnValue); bf(u, s); p[r] && (p[w] = p[r], p[r] = null); m.each(["preventDefault", "stopPropagation"], function(z, A) { var B = u[A]; u[A] = function() { try { B.call(u) } catch (D) { A === "preventDefault" && (x = !0) } } }); m(p).trigger(u); p[w] && (p[r] = p[w], p[w] = null); t && !u.isDefaultPrevented() && !x && t(u) }, washMouseEvent: function(p) { var r = p.originalEvent || p; if (r.pageX === bw) { r.pageX = p.pageX, r.pageY = p.pageY } return r }, animate: function(p, r, s) { var t = m(p); if (!p.style) { p.style = {} } if (r.d) { p.toD = r.d, r.d = 1 } t.stop(); r.opacity !== bw && p.attr && (r.opacity += "px"); p.hasAnim = 1; t.animate(r, s) }, stop: function(p) { p.hasAnim && m(p).stop() } } } )(ao.jQuery); var br = ao.HighchartsAdapter , y = br || {}; br && br.init.call(br, b0); var aC = y.adapterRun , be = y.getScript , aR = y.inArray , aO = bG.each = y.each , aH = y.grep , bk = y.offset , by = y.map , aU = y.addEvent , bS = y.removeEvent , aP = y.fireEvent , bp = y.washMouseEvent , aM = y.animate , S = y.stop; a5 = { colors: "#7cb5ec,#434348,#90ed7d,#f7a35c,#8085e9,#f15c80,#e4d354,#2b908f,#f45b5b,#91e8e1".split(","), symbols: ["circle", "diamond", "square", "triangle", "triangle-down"], lang: { loading: "Loading...", 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(","), weekdays: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","), decimalPoint: ".", numericSymbols: "k,M,G,T,P,E".split(","), resetZoom: "Reset zoom", resetZoomTitle: "Reset zoom level 1:1", thousandsSep: " " }, global: { useUTC: !0, canvasToolsURL: "http://code.highcharts.com/4.1.5/modules/canvas-tools.js", VMLRadialGradientURL: "http://code.highcharts.com/4.1.5/gfx/vml-radial-gradient.png" }, chart: { borderColor: "#4572A7", borderRadius: 0, defaultSeriesType: "line", ignoreHiddenSeries: !0, spacing: [10, 10, 15, 10], backgroundColor: "#FFFFFF", plotBorderColor: "#C0C0C0", resetZoomButton: { theme: { zIndex: 20 }, position: { align: "right", x: -10, y: 10 } } }, title: { text: "Chart title", align: "center", margin: 15, style: { color: "#333333", fontSize: "18px" } }, subtitle: { text: "", align: "center", style: { color: "#555555" } }, plotOptions: { line: { allowPointSelect: !1, showCheckbox: !1, animation: { duration: 1000 }, events: {}, lineWidth: 2, marker: { lineWidth: 0, radius: 4, lineColor: "#FFFFFF", states: { hover: { enabled: !0, lineWidthPlus: 1, radiusPlus: 2 }, select: { fillColor: "#FFFFFF", lineColor: "#000000", lineWidth: 2 } } }, point: { events: {} }, dataLabels: { align: "center", formatter: function() { return this.y === null ? "" : bG.numberFormat(this.y, -1) }, style: { color: "contrast", fontSize: "11px", fontWeight: "bold", textShadow: "0 0 6px contrast, 0 0 3px contrast" }, verticalAlign: "bottom", x: 0, y: 0, padding: 5 }, cropThreshold: 300, pointRange: 0, states: { hover: { lineWidthPlus: 1, marker: {}, halo: { size: 10, opacity: 0.25 } }, select: { marker: {} } }, stickyTracking: !0, turboThreshold: 1000 } }, labels: { style: { position: "absolute", color: "#3E576F" } }, legend: { enabled: !0, align: "center", layout: "horizontal", labelFormatter: function() { return this.name }, borderColor: "#909090", borderRadius: 0, navigation: { activeColor: "#274b6d", inactiveColor: "#CCC" }, shadow: !1, itemStyle: { color: "#333333", fontSize: "12px", fontWeight: "bold" }, itemHoverStyle: { color: "#000" }, itemHiddenStyle: { color: "#CCC" }, itemCheckboxStyle: { position: "absolute", width: "13px", height: "13px" }, symbolPadding: 5, verticalAlign: "bottom", x: 0, y: 0, title: { style: { fontWeight: "bold" } } }, loading: { labelStyle: { fontWeight: "bold", position: "relative", top: "45%" }, style: { position: "absolute", backgroundColor: "white", opacity: 0.5, textAlign: "center" } }, tooltip: { enabled: !0, animation: i, backgroundColor: "rgba(249, 249, 249, .85)", borderWidth: 1, borderRadius: 3, dateTimeLabelFormats: { millisecond: "%A, %b %e, %H:%M:%S.%L", second: "%A, %b %e, %H:%M:%S", minute: "%A, %b %e, %H:%M", hour: "%A, %b %e, %H:%M", day: "%A, %b %e, %Y", week: "Week from %A, %b %e, %Y", month: "%B %Y", year: "%Y" }, footerFormat: "", headerFormat: '{point.key}
', pointFormat: '\u25CF {series.name}: {point.y}
', shadow: !0, snap: aD ? 25 : 10, style: { color: "#333333", cursor: "default", fontSize: "12px", padding: "8px", whiteSpace: "nowrap" } }, credits: { enabled: !0, text: "Highcharts.com", href: "http://www.highcharts.com", position: { align: "right", x: -10, verticalAlign: "bottom", y: -5 }, style: { cursor: "pointer", color: "#909090", fontSize: "9px" } } }; var d = a5.plotOptions , br = d.line; v(); var bv = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/ , bA = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/ , bF = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/ , aV = function(m) { var p = [], r, s; (function(t) { t && t.stops ? s = by(t.stops, function(u) { return aV(u[1]) }) : (r = bv.exec(t)) ? p = [h(r[1]), h(r[2]), h(r[3]), parseFloat(r[4], 10)] : (r = bA.exec(t)) ? p = [h(r[1], 16), h(r[2], 16), h(r[3], 16), 1] : (r = bF.exec(t)) && (p = [h(r[1]), h(r[2]), h(r[3]), 1]) } )(m); return { get: function(t) { var u; s ? (u = bW(m), u.stops = [].concat(u.stops), aO(s, function(w, x) { u.stops[x] = [u.stops[x][0], w.get(t)] })) : u = p && !isNaN(p[0]) ? t === "rgb" ? "rgb(" + p[0] + "," + p[1] + "," + p[2] + ")" : t === "a" ? p[3] : "rgba(" + p.join(",") + ")" : m; return u }, brighten: function(t) { if (s) { aO(s, function(w) { w.brighten(t) }) } else { if (bb(t) && t !== 0) { var u; for (u = 0; u < 3; u++) { p[u] += h(t * 255), p[u] < 0 && (p[u] = 0), p[u] > 255 && (p[u] = 255) } } } return this }, rgba: p, setOpacity: function(t) { p[3] = t; return this }, raw: m } }; aE.prototype = { opacity: 1, textProps: "fontSize,fontWeight,fontFamily,fontStyle,color,lineHeight,width,textDecoration,textShadow".split(","), init: function(m, p) { this.element = p === "span" ? bX(p) : c.createElementNS(o, p); this.renderer = m }, animate: function(m, p, r) { p = a4(p, bY, !0); S(this); if (p) { p = bW(p, {}); if (r) { p.complete = r } aM(this, m, p) } else { this.attr(m), r && r() } return this }, colorGradient: function(m, p, r) { var s = this.renderer, t, u, w, x, z, A, B, D, F, G, H = []; m.linearGradient ? u = "linearGradient" : m.radialGradient && (u = "radialGradient"); if (u) { w = m[u]; x = s.gradients; A = m.stops; F = r.radialReference; aq(w) && (m[u] = w = { x1: w[0], y1: w[1], x2: w[2], y2: w[3], gradientUnits: "userSpaceOnUse" }); u === "radialGradient" && F && !bl(w.gradientUnits) && (w = bW(w, { cx: F[0] - F[2] / 2 + w.cx * F[2], cy: F[1] - F[2] / 2 + w.cy * F[2], r: w.r * F[2], gradientUnits: "userSpaceOnUse" })); for (G in w) { G !== "id" && H.push(G, w[G]) } for (G in A) { H.push(A[G]) } H = H.join(","); x[H] ? m = x[H].attr("id") : (w.id = m = "highcharts-" + bV++, x[H] = z = s.createElement(u).attr(w).add(s.defs), z.stops = [], aO(A, function(I) { I[1].indexOf("rgba") === 0 ? (t = aV(I[1]), B = t.get("rgb"), D = t.get("a")) : (B = I[1], D = 1); I = s.createElement("stop").attr({ offset: I[0], "stop-color": B, "stop-opacity": D }).add(z); z.stops.push(I) })); r.setAttribute(p, "url(" + s.url + "#" + m + ")") } }, applyTextShadow: function(m) { var p = this.element, r, s = m.indexOf("contrast") !== -1, t = this.renderer.forExport || p.style.textShadow !== bw && !bT; s && (m = m.replace(/contrast/g, this.renderer.getContrast(p.style.fill))); t ? s && af(p, { textShadow: m }) : (this.fakeTS = !0, this.ySetter = this.xSetter, r = [].slice.call(p.getElementsByTagName("tspan")), aO(m.split(/\s?,\s?/g), function(u) { var w = p.firstChild, x, z, u = u.split(" "); x = u[u.length - 1]; (z = u[u.length - 2]) && aO(r, function(A, B) { var D; B === 0 && (A.setAttribute("x", p.getAttribute("x")), B = p.getAttribute("y"), A.setAttribute("y", B || 0), B === null && p.setAttribute("y", 0)); D = A.cloneNode(1); aJ(D, { "class": "highcharts-text-shadow", fill: x, stroke: x, "stroke-opacity": 1 / bq(h(z), 3), "stroke-width": z, "stroke-linejoin": "round" }); p.insertBefore(D, w) }) })) }, attr: function(m, p) { var r, s, t = this.element, u, w = this, x; typeof m === "string" && p !== bw && (r = m, m = {}, m[r] = p); if (typeof m === "string") { w = (this[m + "Getter"] || this._defaultGetter).call(this, m, t) } else { for (r in m) { s = m[r]; x = !1; this.symbolName && /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(r) && (u || (this.symbolAttr(m), u = !0), x = !0); if (this.rotation && (r === "x" || r === "y")) { this.doTransform = !0 } x || (this[r + "Setter"] || this._defaultSetter).call(this, s, r, t); this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(r) && this.updateShadows(r, s) } if (this.doTransform) { this.updateTransform(), this.doTransform = !1 } } return w }, updateShadows: function(m, p) { for (var r = this.shadows, s = r.length; s--; ) { r[s].setAttribute(m, m === "height" ? bq(p - (r[s].cutHeight || 0), 0) : m === "d" ? this.d : p) } }, addClass: function(m) { var p = this.element , r = aJ(p, "class") || ""; r.indexOf(m) === -1 && aJ(p, "class", r + " " + m); return this }, symbolAttr: function(m) { var p = this; aO("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","), function(r) { p[r] = a4(m[r], p[r]) }); p.attr({ d: p.renderer.symbols[p.symbolName](p.x, p.y, p.width, p.height, p) }) }, clip: function(m) { return this.attr("clip-path", m ? "url(" + this.renderer.url + "#" + m.id + ")" : bg) }, crisp: function(m) { var p, r = {}, s, t = m.strokeWidth || this.strokeWidth || 0; s = bM(t) % 2 / 2; m.x = bx(m.x || this.x || 0) + s; m.y = bx(m.y || this.y || 0) + s; m.width = bx((m.width || this.width || 0) - 2 * s); m.height = bx((m.height || this.height || 0) - 2 * s); m.strokeWidth = t; for (p in m) { this[p] !== m[p] && (this[p] = r[p] = m[p]) } return r }, css: function(m) { var p = this.styles, r = {}, s = this.element, t, u, w = ""; t = !p; if (m && m.color) { m.fill = m.color } if (p) { for (u in m) { m[u] !== p[u] && (r[u] = m[u], t = !0) } } if (t) { t = this.textWidth = m && m.width && s.nodeName.toLowerCase() === "text" && h(m.width) || this.textWidth; p && (m = bf(p, r)); this.styles = m; t && (ab || !i && this.renderer.forExport) && delete m.width; if (bT && !i) { af(this.element, m) } else { p = function(x, z) { return "-" + z.toLowerCase() } ; for (u in m) { w += u.replace(/([A-Z])/g, p) + ":" + m[u] + ";" } aJ(s, "style", w) } t && this.added && this.renderer.buildText(this) } return this }, on: function(m, p) { var r = this , s = r.element; f && m === "click" ? (s.ontouchstart = function(t) { r.touchEventFired = e.now(); t.preventDefault(); p.call(s, t) } , s.onclick = function(t) { (j.indexOf("Android") === -1 || e.now() - (r.touchEventFired || 0) > 1100) && p.call(s, t) } ) : s["on" + m] = p; return this }, setRadialReference: function(m) { this.element.radialReference = m; return this }, translate: function(m, p) { return this.attr({ translateX: m, translateY: p }) }, invert: function() { this.inverted = !0; this.updateTransform(); return this }, updateTransform: function() { var m = this.translateX || 0 , p = this.translateY || 0 , r = this.scaleX , s = this.scaleY , t = this.inverted , u = this.rotation , w = this.element; t && (m += this.attr("width"), p += this.attr("height")); m = ["translate(" + m + "," + p + ")"]; t ? m.push("rotate(90) scale(-1,1)") : u && m.push("rotate(" + u + " " + (w.getAttribute("x") || 0) + " " + (w.getAttribute("y") || 0) + ")"); (bl(r) || bl(s)) && m.push("scale(" + a4(r, 1) + " " + a4(s, 1) + ")"); m.length && w.setAttribute("transform", m.join(" ")) }, toFront: function() { var m = this.element; m.parentNode.appendChild(m); return this }, align: function(m, p, r) { var s, t, u, w, x = {}; t = this.renderer; u = t.alignedObjects; if (m) { if (this.alignOptions = m, this.alignByTranslate = p, !r || E(r)) { this.alignTo = s = r || "renderer", av(u, this), u.push(this), r = null } } else { m = this.alignOptions, p = this.alignByTranslate, s = this.alignTo } r = a4(r, t[s], t); s = m.align; t = m.verticalAlign; u = (r.x || 0) + (m.x || 0); w = (r.y || 0) + (m.y || 0); if (s === "right" || s === "center") { u += (r.width - (m.width || 0)) / { right: 1, center: 2 }[s] } x[p ? "translateX" : "x"] = bM(u); if (t === "bottom" || t === "middle") { w += (r.height - (m.height || 0)) / ({ bottom: 1, middle: 2 }[t] || 1) } x[p ? "translateY" : "y"] = bM(w); this[this.placed ? "animate" : "attr"](x); this.placed = !0; this.alignAttr = x; return this }, getBBox: function(m) { var p, r = this.renderer, s, t = this.rotation, u = this.element, w = this.styles, x = t * ak; s = this.textStr; var z, A = u.style, B, D; s !== bw && (D = ["", t || 0, w && w.fontSize, u.style.width].join(","), D = s === "" || a3.test(s) ? "num:" + s.toString().length + D : s + D); D && !m && (p = r.cache[D]); if (!p) { if (u.namespaceURI === o || r.forExport) { try { B = this.fakeTS && function(G) { aO(u.querySelectorAll(".highcharts-text-shadow"), function(H) { H.style.display = G }) } , aL && A.textShadow ? (z = A.textShadow, A.textShadow = "") : B && B(bg), p = u.getBBox ? bf({}, u.getBBox()) : { width: u.offsetWidth, height: u.offsetHeight }, z ? A.textShadow = z : B && B("") } catch (F) {} if (!p || p.width < 0) { p = { width: 0, height: 0 } } } else { p = this.htmlGetBBox() } if (r.isSVG) { m = p.width; s = p.height; if (bT && w && w.fontSize === "11px" && s.toPrecision(3) === "16.9") { p.height = s = 14 } if (t) { p.width = aZ(s * a(x)) + aZ(m * bH(x)), p.height = aZ(s * bH(x)) + aZ(m * a(x)) } } r.cache[D] = p } return p }, show: function(m) { m && this.element.namespaceURI === o ? this.element.removeAttribute("visibility") : this.attr({ visibility: m ? "inherit" : "visible" }); return this }, hide: function() { return this.attr({ visibility: "hidden" }) }, fadeOut: function(m) { var p = this; p.animate({ opacity: 0 }, { duration: m || 150, complete: function() { p.attr({ y: -9999 }) } }) }, add: function(m) { var p = this.renderer, r = this.element, s; if (m) { this.parentGroup = m } this.parentInverted = m && m.inverted; this.textStr !== void 0 && p.buildText(this); this.added = !0; if (!m || m.handleZ || this.zIndex) { s = this.zIndexSetter() } s || (m ? m.element : p.box).appendChild(r); if (this.onAdd) { this.onAdd() } return this }, safeRemoveChild: function(m) { var p = m.parentNode; p && p.removeChild(m) }, destroy: function() { var m = this, p = m.element || {}, r = m.shadows, s = m.renderer.isSVG && p.nodeName === "SPAN" && m.parentGroup, t, u; p.onclick = p.onmouseout = p.onmouseover = p.onmousemove = p.point = null; S(m); if (m.clipPath) { m.clipPath = m.clipPath.destroy() } if (m.stops) { for (u = 0; u < m.stops.length; u++) { m.stops[u] = m.stops[u].destroy() } m.stops = null } m.safeRemoveChild(p); for (r && aO(r, function(w) { m.safeRemoveChild(w) }); s && s.div && s.div.childNodes.length === 0; ) { p = s.parentGroup, m.safeRemoveChild(s.div), delete s.div, s = p } m.alignTo && av(m.renderer.alignedObjects, m); for (t in m) { delete m[t] } return null }, shadow: function(m, p, r) { var s = [], t, u, w = this.element, x, z, A, B; if (m) { z = a4(m.width, 3); A = (m.opacity || 0.15) / z; B = this.parentInverted ? "(-1,-1)" : "(" + a4(m.offsetX, 1) + ", " + a4(m.offsetY, 1) + ")"; for (t = 1; t <= z; t++) { u = w.cloneNode(0); x = z * 2 + 1 - 2 * t; aJ(u, { isShadow: "true", stroke: m.color || "black", "stroke-opacity": A * t, "stroke-width": x, transform: "translate" + B, fill: bg }); if (r) { aJ(u, "height", bq(aJ(u, "height") - x, 0)), u.cutHeight = x } p ? p.element.appendChild(u) : w.parentNode.insertBefore(u, w); s.push(u) } this.shadows = s } return this }, xGetter: function(m) { this.element.nodeName === "circle" && (m = { x: "cx", y: "cy" }[m] || m); return this._defaultGetter(m) }, _defaultGetter: function(m) { m = a4(this[m], this.element ? this.element.getAttribute(m) : null, 0); /^[\-0-9\.]+$/.test(m) && (m = parseFloat(m)); return m }, dSetter: function(m, p, r) { m && m.join && (m = m.join(" ")); /(NaN| {2}|^$)/.test(m) && (m = "M 0 0"); r.setAttribute(p, m); this[p] = m }, dashstyleSetter: function(m) { var p; if (m = m && m.toLowerCase()) { m = m.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(","); for (p = m.length; p--; ) { m[p] = h(m[p]) * this["stroke-width"] } m = m.join(",").replace("NaN", "none"); this.element.setAttribute("stroke-dasharray", m) } }, alignSetter: function(m) { this.element.setAttribute("text-anchor", { left: "start", center: "middle", right: "end" }[m]) }, opacitySetter: function(m, p, r) { this[p] = m; r.setAttribute(p, m) }, titleSetter: function(m) { var p = this.element.getElementsByTagName("title")[0]; p || (p = c.createElementNS(o, "title"), this.element.appendChild(p)); p.textContent = String(a4(m), "").replace(/<[^>]*>/g, "") }, textSetter: function(m) { if (m !== this.textStr) { delete this.bBox, this.textStr = m, this.added && this.renderer.buildText(this) } }, fillSetter: function(m, p, r) { typeof m === "string" ? r.setAttribute(p, m) : m && this.colorGradient(m, p, r) }, zIndexSetter: function(m, p) { var r = this.renderer, s = this.parentGroup, r = (s || r).element || r.box, t, u, w = this.element, x; t = this.added; var z; bl(m) && (w.setAttribute(p, m), m = +m, this[p] === m && (t = !1), this[p] = m); if (t) { if ((m = this.zIndex) && s) { s.handleZ = !0 } s = r.childNodes; for (z = 0; z < s.length && !x; z++) { if (t = s[z], u = aJ(t, "zIndex"), t !== w && (h(u) > m || !bl(m) && bl(u))) { r.insertBefore(w, t), x = !0 } } x || r.appendChild(w) } return x }, _defaultSetter: function(m, p, r) { r.setAttribute(p, m) } }; aE.prototype.yGetter = aE.prototype.xGetter; aE.prototype.translateXSetter = aE.prototype.translateYSetter = aE.prototype.rotationSetter = aE.prototype.verticalAlignSetter = aE.prototype.scaleXSetter = aE.prototype.scaleYSetter = function(m, p) { this[p] = m; this.doTransform = !0 } ; aE.prototype["stroke-widthSetter"] = aE.prototype.strokeSetter = function(m, p, r) { this[p] = m; if (this.stroke && this["stroke-width"]) { this.strokeWidth = this["stroke-width"], aE.prototype.fillSetter.call(this, this.stroke, "stroke", r), r.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0 } else { if (p === "stroke-width" && m === 0 && this.hasStroke) { r.removeAttribute("stroke"), this.hasStroke = !1 } } } ; var bs = function() { this.init.apply(this, arguments) }; bs.prototype = { Element: aE, init: function(m, p, r, s, t) { var u = location, w, s = this.createElement("svg").attr({ version: "1.1" }).css(this.getStyle(s)); w = s.element; m.appendChild(w); m.innerHTML.indexOf("xmlns") === -1 && aJ(w, "xmlns", o); this.isSVG = !0; this.box = w; this.boxWrapper = s; this.alignedObjects = []; this.url = (aL || bQ) && c.getElementsByTagName("base").length ? u.href.replace(/#.*?$/, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20") : ""; this.createElement("desc").add().element.appendChild(c.createTextNode("Created with Highcharts 4.1.5")); this.defs = this.createElement("defs").add(); this.forExport = t; this.gradients = {}; this.cache = {}; this.setSize(p, r, !1); var x; if (aL && m.getBoundingClientRect) { this.subPixelFix = p = function() { af(m, { left: 0, top: 0 }); x = m.getBoundingClientRect(); af(m, { left: bm(x.left) - x.left + "px", top: bm(x.top) - x.top + "px" }) } , p(), aU(ao, "resize", p) } }, getStyle: function(m) { return this.style = bf({ fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', fontSize: "12px" }, m) }, isHidden: function() { return !this.boxWrapper.getBBox().width }, destroy: function() { var m = this.defs; this.box = null; this.boxWrapper = this.boxWrapper.destroy(); bc(this.gradients || {}); this.gradients = null; if (m) { this.defs = m.destroy() } this.subPixelFix && bS(ao, "resize", this.subPixelFix); return this.alignedObjects = null }, createElement: function(m) { var p = new this.Element; p.init(this, m); return p }, draw: function() {}, buildText: function(m) { for (var p = m.element, r = this, t = r.forExport, u = a4(m.textStr, "").toString(), w = u.indexOf("<") !== -1, x = p.childNodes, z, A, B = aJ(p, "x"), D = m.styles, F = m.textWidth, G = D && D.lineHeight, H = D && D.textShadow, I = D && D.textOverflow === "ellipsis", L = x.length, J = F && !m.added && this.box, s = function(M) { return G ? h(G) : r.fontMetrics(/(px|em)$/.test(M && M.style.fontSize) ? M.style.fontSize : D && D.fontSize || r.style.fontSize || 12, M).h }, K = function(M) { return M.replace(/</g, "<").replace(/>/g, ">") }; L--; ) { p.removeChild(x[L]) } !w && !H && !I && u.indexOf(" ") === -1 ? p.appendChild(c.createTextNode(K(u))) : (z = /<.*style="([^"]+)".*>/, A = /<.*href="(http[^"]+)".*>/, J && J.appendChild(p), u = w ? u.replace(/<(b|strong)>/g, '').replace(/<(i|em)>/g, '').replace(//g, "").split(//g) : [u], u[u.length - 1] === "" && u.pop(), aO(u, function(M, N) { var O, P = 0, M = M.replace(//g, "|||"); O = M.split("|||"); aO(O, function(Q) { if (Q !== "" || O.length === 1) { var T = {}, b4 = c.createElementNS(o, "tspan"), U; z.test(Q) && (U = Q.match(z)[1].replace(/(;| |^)color([ :])/, "$1fill$2"), aJ(b4, "style", U)); A.test(Q) && !t && (aJ(b4, "onclick", 'location.href="' + Q.match(A)[1] + '"'), af(b4, { cursor: "pointer" })); Q = K(Q.replace(/<(.|\n)*?>/g, "") || " "); if (Q !== " ") { b4.appendChild(c.createTextNode(Q)); if (P) { T.dx = 0 } else { if (N && B !== null) { T.x = B } } aJ(b4, T); p.appendChild(b4); !P && N && (!i && t && af(b4, { display: "block" }), aJ(b4, "dy", s(b4))); if (F) { for (var T = Q.replace(/([^\^])-/g, "$1- ").split(" "), R = O.length > 1 || N || T.length > 1 && D.whiteSpace !== "nowrap", X, W, b1, Z = [], Y = s(b4), b3 = 1, V = m.rotation, b5 = Q, b2 = b5.length; (R || I) && (T.length || Z.length); ) { m.rotation = 0, X = m.getBBox(!0), b1 = X.width, !i && r.forExport && (b1 = r.measureSpanWidth(b4.firstChild.data, m.styles)), X = b1 > F, W === void 0 && (W = X), I && W ? (b2 /= 2, b5 === "" || !X && b2 < 0.5 ? T = [] : (X && (W = !0), b5 = Q.substring(0, b5.length + (X ? -1 : 1) * bm(b2)), T = [b5 + "…"], b4.removeChild(b4.firstChild))) : !X || T.length === 1 ? (T = Z, Z = [], T.length && (b3++, b4 = c.createElementNS(o, "tspan"), aJ(b4, { dy: Y, x: B }), U && aJ(b4, "style", U), p.appendChild(b4)), b1 > F && (F = b1)) : (b4.removeChild(b4.firstChild), Z.unshift(T.pop())), T.length && b4.appendChild(c.createTextNode(T.join(" ").replace(/- /g, "-"))) } W && m.attr("title", m.textStr); m.rotation = V } P++ } } }) }), J && J.removeChild(p), H && m.applyTextShadow && m.applyTextShadow(H)) }, getContrast: function(m) { m = aV(m).rgba; return m[0] + m[1] + m[2] > 384 ? "#000" : "#FFF" }, button: function(m, r, s, t, u, w, x, z, A) { var B = this.label(m, r, s, A, null, null, null, null, "button"), D = 0, F, G, H, J, K, I, m = { x1: 0, y1: 0, x2: 0, y2: 1 }, u = bW({ "stroke-width": 1, stroke: "#CCCCCC", fill: { linearGradient: m, stops: [[0, "#FEFEFE"], [1, "#F6F6F6"]] }, r: 2, padding: 5, style: { color: "black" } }, u); H = u.style; delete u.style; w = bW(u, { stroke: "#68A", fill: { linearGradient: m, stops: [[0, "#FFF"], [1, "#ACF"]] } }, w); J = w.style; delete w.style; x = bW(u, { stroke: "#68A", fill: { linearGradient: m, stops: [[0, "#9BD"], [1, "#CDF"]] } }, x); K = x.style; delete x.style; z = bW(u, { style: { color: "#CCC" } }, z); I = z.style; delete z.style; aU(B.element, bT ? "mouseover" : "mouseenter", function() { D !== 3 && B.attr(w).css(J) }); aU(B.element, bT ? "mouseout" : "mouseleave", function() { D !== 3 && (F = [u, w, x][D], G = [H, J, K][D], B.attr(F).css(G)) }); B.setState = function(p) { (B.state = D = p) ? p === 2 ? B.attr(x).css(K) : p === 3 && B.attr(z).css(I) : B.attr(u).css(H) } ; return B.on("click", function() { D !== 3 && t.call(B) }).attr(u).css(bf({ cursor: "default" }, H)) }, crispLine: function(m, p) { m[1] === m[4] && (m[1] = m[4] = bM(m[1]) - p % 2 / 2); m[2] === m[5] && (m[2] = m[5] = bM(m[2]) + p % 2 / 2); return m }, path: function(m) { var p = { fill: bg }; aq(m) ? p.d = m : n(m) && bf(p, m); return this.createElement("path").attr(p) }, circle: function(m, p, r) { m = n(m) ? m : { x: m, y: p, r: r }; p = this.createElement("circle"); p.xSetter = function(s) { this.element.setAttribute("cx", s) } ; p.ySetter = function(s) { this.element.setAttribute("cy", s) } ; return p.attr(m) }, arc: function(m, p, r, s, t, u) { if (n(m)) { p = m.y, r = m.r, s = m.innerR, t = m.start, u = m.end, m = m.x } m = this.symbol("arc", m || 0, p || 0, r || 0, r || 0, { innerR: s || 0, start: t || 0, end: u || 0 }); m.r = r; return m }, rect: function(m, p, r, s, t, u) { var t = n(m) ? m.r : t , w = this.createElement("rect") , m = n(m) ? m : m === bw ? {} : { x: m, y: p, width: bq(r, 0), height: bq(s, 0) }; if (u !== bw) { m.strokeWidth = u, m = w.crisp(m) } if (t) { m.r = t } w.rSetter = function(x) { aJ(this.element, { rx: x, ry: x }) } ; return w.attr(m) }, setSize: function(m, p, r) { var s = this.alignedObjects , t = s.length; this.width = m; this.height = p; for (this.boxWrapper[a4(r, !0) ? "animate" : "attr"]({ width: m, height: p }); t--; ) { s[t].align() } }, g: function(m) { var p = this.createElement("g"); return bl(m) ? p.attr({ "class": "highcharts-" + m }) : p }, image: function(m, p, r, s, t) { var u = { preserveAspectRatio: bg }; arguments.length > 1 && bf(u, { x: p, y: r, width: s, height: t }); u = this.createElement("image").attr(u); u.element.setAttributeNS ? u.element.setAttributeNS("http://www.w3.org/1999/xlink", "href", m) : u.element.setAttribute("hc-svg-href", m); return u }, symbol: function(m, p, r, s, t, u) { var w, x = this.symbols[m], x = x && x(bM(p), bM(r), s, t, u), z = /^url\((.*?)\)$/, A, B; if (x) { w = this.path(x), bf(w, { symbolName: m, x: p, y: r, width: s, height: t }), u && bf(w, u) } else { if (z.test(m)) { B = function(D, F) { D.element && (D.attr({ width: F[0], height: F[1] }), D.alignByTranslate || D.translate(bM((s - F[0]) / 2), bM((t - F[1]) / 2))) } , A = m.match(z)[1], m = aI[A] || u && u.width && u.height && [u.width, u.height], w = this.image(A).attr({ x: p, y: r }), w.isImg = !0, m ? B(w, m) : (w.attr({ width: 0, height: 0 }), bX("img", { onload: function() { B(w, aI[A] = [this.width, this.height]) }, src: A })) } } return w }, symbols: { circle: function(m, p, r, s) { var t = 0.166 * r; return ["M", m + r / 2, p, "C", m + r + t, p, m + r + t, p + s, m + r / 2, p + s, "C", m - t, p + s, m - t, p, m + r / 2, p, "Z"] }, square: function(m, p, r, s) { return ["M", m, p, "L", m + r, p, m + r, p + s, m, p + s, "Z"] }, triangle: function(m, p, r, s) { return ["M", m + r / 2, p, "L", m + r, p + s, m, p + s, "Z"] }, "triangle-down": function(m, p, r, s) { return ["M", m, p, "L", m + r, p, m + r / 2, p + s, "Z"] }, diamond: function(m, p, r, s) { return ["M", m + r / 2, p, "L", m + r, p + s / 2, m + r / 2, p + s, m, p + s / 2, "Z"] }, arc: function(m, p, r, s, t) { var u = t.start , r = t.r || r || s , w = t.end - 0.001 , s = t.innerR , x = t.open , z = bH(u) , A = a(u) , B = bH(w) , w = a(w) , t = t.end - u < aK ? 0 : 1; return ["M", m + r * z, p + r * A, "A", r, r, 0, t, 1, m + r * B, p + r * w, x ? "M" : "L", m + s * B, p + s * w, "A", s, s, 0, t, 0, m + s * z, p + s * A, x ? "" : "Z"] }, callout: function(m, p, r, s, t) { var u = au(t && t.r || 0, r, s) , w = u + 6 , x = t && t.anchorX , z = t && t.anchorY , t = bM(t.strokeWidth || 0) % 2 / 2; m += t; p += t; t = ["M", m + u, p, "L", m + r - u, p, "C", m + r, p, m + r, p, m + r, p + u, "L", m + r, p + s - u, "C", m + r, p + s, m + r, p + s, m + r - u, p + s, "L", m + u, p + s, "C", m, p + s, m, p + s, m, p + s - u, "L", m, p + u, "C", m, p, m, p, m + u, p]; x && x > r && z > p + w && z < p + s - w ? t.splice(13, 3, "L", m + r, z - 6, m + r + 6, z, m + r, z + 6, m + r, p + s - u) : x && x < 0 && z > p + w && z < p + s - w ? t.splice(33, 3, "L", m, z + 6, m - 6, z, m, z - 6, m, p + u) : z && z > s && x > m + w && x < m + r - w ? t.splice(23, 3, "L", x + 6, p + s, x, p + s + 6, x - 6, p + s, m + u, p + s) : z && z < 0 && x > m + w && x < m + r - w && t.splice(3, 3, "L", x - 6, p, x, p - 6, x + 6, p, r - u, p); return t } }, clipRect: function(m, p, r, s) { var t = "highcharts-" + bV++ , u = this.createElement("clipPath").attr({ id: t }).add(this.defs) , m = this.rect(m, p, r, s, 0).add(u); m.id = t; m.clipPath = u; m.count = 0; return m }, text: function(m, p, r, s) { var t = ab || !i && this.forExport , u = {}; if (s && !this.forExport) { return this.html(m, p, r) } u.x = Math.round(p || 0); if (r) { u.y = Math.round(r) } if (m || m === 0) { u.text = m } m = this.createElement("text").attr(u); t && m.css({ position: "absolute" }); if (!s) { m.xSetter = function(w, x, z) { var A = z.getElementsByTagName("tspan"), B, D = z.getAttribute(x), F; for (F = 0; F < A.length; F++) { B = A[F], B.getAttribute(x) === D && B.setAttribute(x, w) } z.setAttribute(x, w) } } return m }, fontMetrics: function(m, p) { m = m || this.style.fontSize; if (p && ao.getComputedStyle) { p = p.element || p, m = ao.getComputedStyle(p, "").fontSize } var m = /px/.test(m) ? h(m) : /em/.test(m) ? parseFloat(m) * 12 : 12 , r = m < 24 ? m + 3 : bM(m * 1.2) , s = bM(r * 0.8); return { h: r, b: s, f: m } }, rotCorr: function(m, p, r) { var s = m; p && r && (s = bq(s * bH(p * ak), 4)); return { x: -m / 3 * a(p * ak), y: s } }, label: function(m, s, x, F, J, L, N, P, Q) { function T() { var p, t; p = Z.element.style; Y = (M === void 0 || b1 === void 0 || X.styles.textAlign) && bl(Z.textStr) && Z.getBBox(); X.width = (M || Y.width || 0) + 2 * b3 + b2; X.height = (b1 || Y.height || 0) + 2 * b3; R = b3 + W.fontMetrics(p && p.fontSize, Z).b; if (H) { if (!b5) { p = bM(-z * b3), t = P ? -R : 0, X.box = b5 = F ? W.symbol(F, p, t, X.width, X.height, K) : W.rect(p, t, X.width, X.height, 0, K[a9]), b5.attr("fill", bg).add(X) } b5.isImg || b5.attr(bf({ width: bM(X.width), height: bM(X.height) }, K)); K = null } } function U() { var p = X.styles, p = p && p.textAlign, t = b2 + b3 * (1 - z), w; w = P ? 0 : R; if (bl(M) && Y && (p === "center" || p === "right")) { t += { center: 0.5, right: 1 }[p] * (M - Y.width) } if (t !== Z.x || w !== Z.y) { Z.attr("x", t), w !== bw && Z.attr(Z.element.nodeName === "SPAN" ? "y" : "translateY", w) } Z.x = t; Z.y = w } function V(p, t) { b5 ? b5.attr(p, t) : K[p] = t } var W = this, X = W.g(Q), Z = W.text("", 0, 0, N).attr({ zIndex: 1 }), b5, Y, z = 0, b3 = 3, b2 = 0, M, b1, b4, r, u = 0, K = {}, R, H; X.onAdd = function() { Z.add(X); X.attr({ text: m || m === 0 ? m : "", x: s, y: x }); b5 && bl(J) && X.attr({ anchorX: J, anchorY: L }) } ; X.widthSetter = function(p) { M = p } ; X.heightSetter = function(p) { b1 = p } ; X.paddingSetter = function(p) { if (bl(p) && p !== b3) { b3 = X.padding = p, U() } } ; X.paddingLeftSetter = function(p) { bl(p) && p !== b2 && (b2 = p, U()) } ; X.alignSetter = function(p) { z = { left: 0, center: 0.5, right: 1 }[p] } ; X.textSetter = function(p) { p !== bw && Z.textSetter(p); T(); U() } ; X["stroke-widthSetter"] = function(p, t) { p && (H = !0); u = p % 2 / 2; V(t, p) } ; X.strokeSetter = X.fillSetter = X.rSetter = function(p, t) { t === "fill" && p && (H = !0); V(t, p) } ; X.anchorXSetter = function(p, t) { J = p; V(t, p + u - b4) } ; X.anchorYSetter = function(p, t) { L = p; V(t, p - r) } ; X.xSetter = function(p) { X.x = p; z && (p -= z * ((M || Y.width) + b3)); b4 = bM(p); X.attr("translateX", b4) } ; X.ySetter = function(p) { r = X.y = bM(p); X.attr("translateY", r) } ; var O = X.css; return bf(X, { css: function(p) { if (p) { var t = {} , p = bW(p); aO(X.textProps, function(w) { p[w] !== bw && (t[w] = p[w], delete p[w]) }); Z.css(t) } return O.call(X, p) }, getBBox: function() { return { width: Y.width + 2 * b3, height: Y.height + 2 * b3, x: Y.x - b3, y: Y.y - b3 } }, shadow: function(p) { b5 && b5.shadow(p); return X }, destroy: function() { bS(X.element, "mouseenter"); bS(X.element, "mouseleave"); Z && (Z = Z.destroy()); b5 && (b5 = b5.destroy()); aE.prototype.destroy.call(X); X = W = T = U = V = null } }) } }; b = bs; bf(aE.prototype, { htmlCss: function(m) { var p = this.element; if (p = m && p.tagName === "SPAN" && m.width) { delete m.width, this.textWidth = p, this.updateTransform() } if (m && m.textOverflow === "ellipsis") { m.whiteSpace = "nowrap", m.overflow = "hidden" } this.styles = bf(this.styles, m); af(this.element, m); return this }, htmlGetBBox: function() { var m = this.element; if (m.nodeName === "text") { m.style.position = "absolute" } return { x: m.offsetLeft, y: m.offsetTop, width: m.offsetWidth, height: m.offsetHeight } }, htmlUpdateTransform: function() { if (this.added) { var m = this.renderer , p = this.element , r = this.translateX || 0 , s = this.translateY || 0 , t = this.x || 0 , u = this.y || 0 , w = this.textAlign || "left" , x = { left: 0, center: 0.5, right: 1 }[w] , z = this.shadows , A = this.styles; af(p, { marginLeft: r, marginTop: s }); z && aO(z, function(H) { af(H, { marginLeft: r + 1, marginTop: s + 1 }) }); this.inverted && aO(p.childNodes, function(H) { m.invertChild(H, p) }); if (p.tagName === "SPAN") { var B = this.rotation, D, F = h(this.textWidth), G = [B, w, p.innerHTML, this.textWidth].join(","); if (G !== this.cTT) { D = m.fontMetrics(p.style.fontSize).b; bl(B) && this.setSpanRotation(B, x, D); z = a4(this.elemWidth, p.offsetWidth); if (z > F && /[ \-]/.test(p.textContent || p.innerText)) { af(p, { width: F + "px", display: "block", whiteSpace: A && A.whiteSpace || "normal" }), z = F } this.getSpanCorrection(z, D, x, B, w) } af(p, { left: t + (this.xCorr || 0) + "px", top: u + (this.yCorr || 0) + "px" }); if (bQ) { D = p.offsetHeight } this.cTT = G } } else { this.alignOnAdd = !0 } }, setSpanRotation: function(m, p, r) { var s = {} , t = bT ? "-ms-transform" : bQ ? "-webkit-transform" : aL ? "MozTransform" : ay ? "-o-transform" : ""; s[t] = s.transform = "rotate(" + m + "deg)"; s[t + (aL ? "Origin" : "-origin")] = s.transformOrigin = p * 100 + "% " + r + "px"; af(this.element, s) }, getSpanCorrection: function(m, p, r) { this.xCorr = -m * r; this.yCorr = -p } }); bf(bs.prototype, { html: function(m, p, r) { var s = this.createElement("span") , t = s.element , u = s.renderer; s.textSetter = function(w) { w !== t.innerHTML && delete this.bBox; t.innerHTML = this.textStr = w } ; s.xSetter = s.ySetter = s.alignSetter = s.rotationSetter = function(w, x) { x === "align" && (x = "textAlign"); s[x] = w; s.htmlUpdateTransform() } ; s.attr({ text: m, x: bM(p), y: bM(r) }).css({ position: "absolute", fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }); t.style.whiteSpace = "nowrap"; s.css = s.htmlCss; if (u.isSVG) { s.add = function(w) { var x, z = u.box.parentNode, A = []; if (this.parentGroup = w) { if (x = w.div, !x) { for (; w; ) { A.push(w), w = w.parentGroup } aO(A.reverse(), function(B) { var D; x = B.div = B.div || bX(aG, { className: aJ(B.element, "class") }, { position: "absolute", left: (B.translateX || 0) + "px", top: (B.translateY || 0) + "px" }, x || z); D = x.style; bf(B, { translateXSetter: function(F, G) { D.left = F + "px"; B[G] = F; B.doTransform = !0 }, translateYSetter: function(F, G) { D.top = F + "px"; B[G] = F; B.doTransform = !0 }, visibilitySetter: function(F, G) { D[G] = F } }) }) } } else { x = z } x.appendChild(t); s.added = !0; s.alignOnAdd && s.htmlUpdateTransform(); return s } } return s } }); if (!i && !ab) { y = { init: function(m, p) { var r = ["<", p, ' filled="f" stroked="f"'] , s = ["position: ", "absolute", ";"] , t = p === aG; (p === "shape" || t) && s.push("left:0;top:0;width:1px;height:1px;"); s.push("visibility: ", t ? "hidden" : "visible"); r.push(' style="', s.join(""), '"/>'); if (p) { r = t || p === "span" || p === "img" ? r.join("") : m.prepVML(r), this.element = bX(r) } this.renderer = m }, add: function(m) { var p = this.renderer , r = this.element , s = p.box , s = m ? m.element || m : s; m && m.inverted && p.invertChild(r, s); s.appendChild(r); this.added = !0; this.alignOnAdd && !this.deferUpdateTransform && this.updateTransform(); if (this.onAdd) { this.onAdd() } return this }, updateTransform: aE.prototype.htmlUpdateTransform, setSpanRotation: function() { var m = this.rotation , p = bH(m * ak) , r = a(m * ak); af(this.element, { filter: m ? ["progid:DXImageTransform.Microsoft.Matrix(M11=", p, ", M12=", -r, ", M21=", r, ", M22=", p, ", sizingMethod='auto expand')"].join("") : bg }) }, getSpanCorrection: function(m, p, r, s, t) { var u = s ? bH(s * ak) : 1, w = s ? a(s * ak) : 0, x = a4(this.elemHeight, this.element.offsetHeight), z; this.xCorr = u < 0 && -m; this.yCorr = w < 0 && -x; z = u * w < 0; this.xCorr += w * p * (z ? 1 - r : r); this.yCorr -= u * p * (s ? z ? r : 1 - r : 1); t && t !== "left" && (this.xCorr -= m * r * (u < 0 ? -1 : 1), s && (this.yCorr -= x * r * (w < 0 ? -1 : 1)), af(this.element, { textAlign: t })) }, pathToVML: function(m) { for (var p = m.length, r = []; p--; ) { if (bb(m[p])) { r[p] = bM(m[p] * 10) - 5 } else { if (m[p] === "Z") { r[p] = "x" } else { if (r[p] = m[p], m.isArc && (m[p] === "wa" || m[p] === "at")) { r[p + 5] === r[p + 7] && (r[p + 7] += m[p + 7] > m[p + 5] ? 1 : -1), r[p + 6] === r[p + 8] && (r[p + 8] += m[p + 8] > m[p + 6] ? 1 : -1) } } } } return r.join(" ") || "x" }, clip: function(m) { var p = this, r; m ? (r = m.members, av(r, p), r.push(p), p.destroyClip = function() { av(r, p) } , m = m.getCSS(p)) : (p.destroyClip && p.destroyClip(), m = { clip: ar ? "inherit" : "rect(auto)" }); return p.css(m) }, css: aE.prototype.htmlCss, safeRemoveChild: function(m) { m.parentNode && bi(m) }, destroy: function() { this.destroyClip && this.destroyClip(); return aE.prototype.destroy.apply(this) }, on: function(m, p) { this.element["on" + m] = function() { var r = ao.event; r.target = r.srcElement; p(r) } ; return this }, cutOffPath: function(m, p) { var r, m = m.split(/[ ,]/); r = m.length; if (r === 9 || r === 11) { m[r - 4] = m[r - 2] = h(m[r - 2]) - 10 * p } return m.join(" ") }, shadow: function(m, p, r) { var s = [], t, u = this.element, w = this.renderer, x, z = u.style, A, B = u.path, D, F, G, H; B && typeof B.value !== "string" && (B = "x"); F = B; if (m) { G = a4(m.width, 3); H = (m.opacity || 0.15) / G; for (t = 1; t <= 3; t++) { D = G * 2 + 1 - 2 * t; r && (F = this.cutOffPath(B.value, D + 0.5)); A = ['']; x = bX(w.prepVML(A), null, { left: h(z.left) + a4(m.offsetX, 1), top: h(z.top) + a4(m.offsetY, 1) }); if (r) { x.cutOff = D + 1 } A = ['']; bX(w.prepVML(A), null, null, x); p ? p.element.appendChild(x) : u.parentNode.insertBefore(x, u); s.push(x) } this.shadows = s } return this }, updateShadows: aQ, setAttr: function(m, p) { ar ? this.element[m] = p : this.element.setAttribute(m, p) }, classSetter: function(m) { this.element.className = m }, dashstyleSetter: function(m, p, r) { (r.getElementsByTagName("stroke")[0] || bX(this.renderer.prepVML([""]), null, null, r))[p] = m || "solid"; this[p] = m }, dSetter: function(m, p, r) { var s = this.shadows , m = m || []; this.d = m.join && m.join(" "); r.path = m = this.pathToVML(m); if (s) { for (r = s.length; r--; ) { s[r].path = s[r].cutOff ? this.cutOffPath(m, s[r].cutOff) : m } } this.setAttr(p, m) }, fillSetter: function(m, p, r) { var s = r.nodeName; if (s === "SPAN") { r.style.color = m } else { if (s !== "IMG") { r.filled = m !== bg, this.setAttr("fillcolor", this.renderer.color(m, r, p, this)) } } }, opacitySetter: aQ, rotationSetter: function(m, p, r) { r = r.style; this[p] = r[p] = m; r.left = -bM(a(m * ak) + 1) + "px"; r.top = bM(bH(m * ak)) + "px" }, strokeSetter: function(m, p, r) { this.setAttr("strokecolor", this.renderer.color(m, r, p)) }, "stroke-widthSetter": function(m, p, r) { r.stroked = !!m; this[p] = m; bb(m) && (m += "px"); this.setAttr("strokeweight", m) }, titleSetter: function(m, p) { this.setAttr(p, m) }, visibilitySetter: function(m, p, r) { m === "inherit" && (m = "visible"); this.shadows && aO(this.shadows, function(s) { s.style[p] = m }); r.nodeName === "DIV" && (m = m === "hidden" ? "-999em" : 0, ar || (r.style[p] = m ? "visible" : "hidden"), p = "top"); r.style[p] = m }, xSetter: function(m, p, r) { this[p] = m; p === "x" ? p = "left" : p === "y" && (p = "top"); this.updateClipping ? (this[p] = m, this.updateClipping()) : r.style[p] = m }, zIndexSetter: function(m, p, r) { r.style[p] = m } }; bG.VMLElement = y = aA(aE, y); y.prototype.ySetter = y.prototype.widthSetter = y.prototype.heightSetter = y.prototype.xSetter; var aW = { Element: y, isIE8: j.indexOf("MSIE 8.0") > -1, init: function(m, p, r, s) { var t; this.alignedObjects = []; s = this.createElement(aG).css(bf(this.getStyle(s), { position: "relative" })); t = s.element; m.appendChild(s.element); this.isVML = !0; this.box = t; this.boxWrapper = s; this.cache = {}; this.setSize(p, r, !1); if (!c.namespaces.hcv) { c.namespaces.add("hcv", "urn:schemas-microsoft-com:vml"); try { c.createStyleSheet().cssText = "hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } " } catch (u) { c.styleSheets[0].cssText += "hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } " } } }, isHidden: function() { return !this.box.offsetWidth }, clipRect: function(m, p, r, s) { var t = this.createElement() , u = n(m); return bf(t, { members: [], count: 0, left: (u ? m.x : m) + 1, top: (u ? m.y : p) + 1, width: (u ? m.width : r) - 1, height: (u ? m.height : s) - 1, getCSS: function(w) { var x = w.element , z = x.nodeName , w = w.inverted , A = this.top - (z === "shape" ? x.offsetTop : 0) , B = this.left , x = B + this.width , D = A + this.height , A = { clip: "rect(" + bM(w ? B : A) + "px," + bM(w ? D : x) + "px," + bM(w ? x : D) + "px," + bM(w ? A : B) + "px)" }; !w && ar && z === "DIV" && bf(A, { width: x + "px", height: D + "px" }); return A }, updateClipping: function() { aO(t.members, function(w) { w.element && w.css(t.getCSS(w)) }) } }) }, color: function(m, A, B, F) { var G = this, I, K = /^rgba/, L, M, N = bg; m && m.linearGradient ? M = "gradient" : m && m.radialGradient && (M = "pattern"); if (M) { var O, P, Q = m.linearGradient || m.radialGradient, R, U, b3, T, D, Z = "", m = m.stops, W, J = [], X = function() { L = ['']; bX(G.prepVML(L), null, null, A) }; R = m[0]; W = m[m.length - 1]; R[0] > 0 && m.unshift([0, R[1]]); W[0] < 1 && m.push([1, W[1]]); aO(m, function(p, r) { K.test(p[1]) ? (I = aV(p[1]), O = I.get("rgb"), P = I.get("a")) : (O = p[1], P = 1); J.push(p[0] * 100 + "% " + O); r ? (b3 = P, T = O) : (U = P, D = O) }); if (B === "fill") { if (M === "gradient") { B = Q.x1 || Q[0] || 0, m = Q.y1 || Q[1] || 0, R = Q.x2 || Q[2] || 0, Q = Q.y2 || Q[3] || 0, Z = 'angle="' + (90 - bB.atan((Q - m) / (R - B)) * 180 / aK) + '"', X() } else { var N = Q.r, Y = N * 2, b2 = N * 2, V = Q.cx, H = Q.cy, b4 = A.radialReference, b1, N = function() { b4 && (b1 = F.getBBox(), V += (b4[0] - b1.x) / b1.width - 0.5, H += (b4[1] - b1.y) / b1.height - 0.5, Y *= b4[2] / b1.width, b2 *= b4[2] / b1.height); Z = 'src="' + a5.global.VMLRadialGradientURL + '" size="' + Y + "," + b2 + '" origin="0.5,0.5" position="' + V + "," + H + '" color2="' + D + '" '; X() }; F.added ? N() : F.onAdd = N; N = T } } else { N = O } } else { if (K.test(m) && A.tagName !== "IMG") { I = aV(m), L = ["<", B, ' opacity="', I.get("a"), '"/>'], bX(this.prepVML(L), null, null, A), N = I.get("rgb") } else { N = A.getElementsByTagName(B); if (N.length) { N[0].opacity = 1, N[0].type = "solid" } N = m } } return N }, prepVML: function(m) { var p = this.isIE8 , m = m.join(""); p ? (m = m.replace("/>", ' xmlns="urn:schemas-microsoft-com:vml" />'), m = m.indexOf('style="') === -1 ? m.replace("/>", ' style="display:inline-block;behavior:url(#default#VML);" />') : m.replace('style="', 'style="display:inline-block;behavior:url(#default#VML);')) : m = m.replace("<", " 1 && u.attr({ x: p, y: r, width: s, height: t }); return u }, createElement: function(m) { return m === "rect" ? this.symbol(m) : bs.prototype.createElement.call(this, m) }, invertChild: function(m, p) { var r = this , s = p.style , t = m.tagName === "IMG" && m.style; af(m, { flip: "x", left: h(s.width) - (t ? h(t.top) : 1), top: h(s.height) - (t ? h(t.left) : 1), rotation: -90 }); aO(m.childNodes, function(u) { r.invertChild(u, m) }) }, symbols: { arc: function(m, p, r, s, t) { var u = t.start , w = t.end , x = t.r || r || s , r = t.innerR , s = bH(u) , z = a(u) , A = bH(w) , B = a(w); if (w - u === 0) { return ["x"] } u = ["wa", m - x, p - x, m + x, p + x, m + x * s, p + x * z, m + x * A, p + x * B]; t.open && !r && u.push("e", "M", m, p); u.push("at", m - r, p - r, m + r, p + r, m + r * A, p + r * B, m + r * s, p + r * z, "x", "e"); u.isArc = !0; return u }, circle: function(m, p, r, s, t) { t && (r = s = 2 * t.r); t && t.isCircle && (m -= r / 2, p -= s / 2); return ["wa", m, p, m + r, p + s, m + r, p + s / 2, m + r, p + s / 2, "e"] }, rect: function(m, p, r, s, t) { return bs.prototype.symbols[!bl(t) || !t.r ? "square" : "callout"].call(0, m, p, r, s, t) } } }; bG.VMLRenderer = y = function() { this.init.apply(this, arguments) } ; y.prototype = bW(bs.prototype, aW); b = y } bs.prototype.measureSpanWidth = function(m, p) { var r = c.createElement("span"), s; s = c.createTextNode(m); r.appendChild(s); af(r, p); this.box.appendChild(r); s = r.offsetWidth; bi(r); return s } ; var aN; if (ab) { bG.CanVGRenderer = y = function() { o = "http://www.w3.org/1999/xhtml" } , y.prototype.symbols = {}, aN = function() { function m() { var r = p.length, s; for (s = 0; s < r; s++) { p[s]() } p = [] } var p = []; return { push: function(r, s) { p.length === 0 && be(s, m); p.push(r) } } }(), b = y } bt.prototype = { addLabel: function() { var m = this.axis, p = m.options, r = m.chart, s = m.categories, t = m.names, u = this.pos, w = p.labels, x = m.tickPositions, z = u === x[0], A = u === x[x.length - 1], t = s ? a4(s[u], t[u], u) : u, s = this.label, x = x.info, B; m.isDatetimeAxis && x && (B = p.dateTimeLabelFormats[x.higherRanks[u] || x.unitName]); this.isFirst = z; this.isLast = A; p = m.labelFormatter.call({ axis: m, chart: r, isFirst: z, isLast: A, dateTimeLabelFormat: B, value: m.isLog ? C(ap(t)) : t }); bl(s) ? s && s.attr({ text: p }) : (this.labelLength = (this.label = s = bl(p) && w.enabled ? r.renderer.text(p, 0, 0, w.useHTML).css(bW(w.style)).add(m.labelGroup) : null) && s.getBBox().width, this.rotation = 0) }, getLabelSize: function() { return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0 }, handleOverflow: function(m) { var p = this.axis, r = m.x, s = p.chart.chartWidth, t = p.chart.spacing, u = a4(p.labelLeft, t[3]), t = a4(p.labelRight, s - t[1]), w = this.label, x = this.rotation, z = { left: 0, center: 0.5, right: 1 }[p.labelAlign], A = w.getBBox().width, B = p.slotWidth, D; if (x) { x < 0 && r - z * A < u ? D = bM(r / bH(x * ak) - u) : x > 0 && r + z * A > t && (D = bM((s - r) / bH(x * ak))) } else { s = r - z * A; r += z * A; if (s < u) { B -= u - s, m.x = u, w.attr({ align: "left" }) } else { if (r > t) { B -= r - t, m.x = t, w.attr({ align: "right" }) } } if (A > B || p.autoRotation && w.styles.width) { D = B } } D && w.css({ width: D, textOverflow: "ellipsis" }) }, getPosition: function(m, p, r, s) { var t = this.axis , u = t.chart , w = s && u.oldChartHeight || u.chartHeight; return { x: m ? t.translate(p + r, null, null, s) + t.transB : t.left + t.offset + (t.opposite ? (s && u.oldChartWidth || u.chartWidth) - t.right - t.left : 0), y: m ? w - t.bottom + t.offset - (t.opposite ? t.height : 0) : w - t.translate(p + r, null, null, s) - t.transB } }, getLabelPosition: function(m, p, r, s, t, u, w, x) { var z = this.axis , A = z.transA , B = z.reversed , D = z.staggerLines , F = z.tickRotCorr || { x: 0, y: 0 } , r = a4(t.y, F.y + (z.side === 2 ? 8 : -(r.getBBox().height / 2))) , m = m + t.x + F.x - (u && s ? u * A * (B ? -1 : 1) : 0) , p = p + r - (u && !s ? u * A * (B ? 1 : -1) : 0); D && (p += w / (x || 1) % D * (z.labelOffset / D)); return { x: m, y: bM(p) } }, getMarkPath: function(m, p, r, s, t, u) { return u.crispLine(["M", m, p, "L", m + (t ? 0 : -r), p + (t ? r : 0)], s) }, render: function(p, u, A) { var D = this.axis , F = D.options , G = D.chart.renderer , I = D.horiz , J = this.type , K = this.label , L = this.pos , M = F.labels , N = this.gridLine , P = J ? J + "Grid" : "grid" , Q = J ? J + "Tick" : "tick" , R = F[P + "LineWidth"] , Z = F[P + "LineColor"] , O = F[P + "LineDashStyle"] , B = F[Q + "Length"] , P = F[Q + "Width"] || 0 , W = F[Q + "Color"] , U = F[Q + "Position"] , Q = this.mark , H = M.step , V = !0 , Y = D.tickmarkOffset , T = this.getPosition(I, L, Y, u) , X = T.x , T = T.y , b1 = I && X === D.pos + D.len || !I && T === D.pos ? -1 : 1 , A = a4(A, 1); this.isActive = !0; if (R) { L = D.getPlotLinePath(L + Y, R * b1, u, !0); if (N === bw) { N = { stroke: Z, "stroke-width": R }; if (O) { N.dashstyle = O } if (!J) { N.zIndex = 1 } if (u) { N.opacity = 0 } this.gridLine = N = R ? G.path(L).attr(N).add(D.gridGroup) : null } if (!u && N && L) { N[this.isNew ? "attr" : "animate"]({ d: L, opacity: A }) } } if (P && B) { U === "inside" && (B = -B), D.opposite && (B = -B), J = this.getMarkPath(X, T, B, P * b1, I, G), Q ? Q.animate({ d: J, opacity: A }) : this.mark = G.path(J).attr({ stroke: W, "stroke-width": P, opacity: A }).add(D.axisGroup) } if (K && !isNaN(X)) { K.xy = T = this.getLabelPosition(X, T, K, I, M, Y, p, H), this.isFirst && !this.isLast && !a4(F.showFirstLabel, 1) || this.isLast && !this.isFirst && !a4(F.showLastLabel, 1) ? V = !1 : I && !D.isRadial && !M.step && !M.rotation && !u && A !== 0 && this.handleOverflow(T), H && p % H && (V = !1), V && !isNaN(T.y) ? (T.opacity = A, K[this.isNew ? "attr" : "animate"](T), this.isNew = !1) : K.attr("y", -9999) } }, destroy: function() { bc(this, this.axis) } }; bG.PlotLineOrBand = function(m, p) { this.axis = m; if (p) { this.options = p, this.id = p.id } } ; bG.PlotLineOrBand.prototype = { render: function() { var r = this, s = r.axis, u = s.horiz, w = r.options, x = w.label, z = r.label, A = w.width, B = w.to, D = w.from, F = bl(D) && bl(B), G = w.value, H = w.dashStyle, J = r.svgElem, K = [], M, P = w.color, L = w.zIndex, I = w.events, O = {}, N = s.chart.renderer; s.isLog && (D = ac(D), B = ac(B), G = ac(G)); if (A) { if (K = s.getPlotLinePath(G, A), O = { stroke: P, "stroke-width": A }, H) { O.dashstyle = H } } else { if (F) { K = s.getPlotBandPath(D, B, w); if (P) { O.fill = P } if (w.borderWidth) { O.stroke = w.borderColor, O["stroke-width"] = w.borderWidth } } else { return } } if (bl(L)) { O.zIndex = L } if (J) { if (K) { J.animate({ d: K }, null, J.onGetPath) } else { if (J.hide(), J.onGetPath = function() { J.show() } , z) { r.label = z = z.destroy() } } } else { if (K && K.length && (r.svgElem = J = N.path(K).attr(O).add(), I)) { for (M in w = function(m) { J.on(m, function(p) { I[m].apply(r, [p]) }) } , I) { w(M) } } } if (x && bl(x.text) && K && K.length && s.width > 0 && s.height > 0) { x = bW({ align: u && F && "center", x: u ? !F && 4 : 10, verticalAlign: !u && F && "middle", y: u ? F ? 16 : 10 : F ? 6 : -4, rotation: u && !F && 90 }, x); if (!z) { O = { align: x.textAlign || x.align, rotation: x.rotation }; if (bl(L)) { O.zIndex = L } r.label = z = N.text(x.text, 0, 0, x.useHTML).attr(O).css(x.style).add() } s = [K[1], K[4], F ? K[6] : K[1]]; F = [K[2], K[5], F ? K[7] : K[2]]; K = a7(s); u = a7(F); z.align(x, !1, { x: K, y: u, width: ag(s) - K, height: ag(F) - u }); z.show() } else { z && z.hide() } return r }, destroy: function() { av(this.axis.plotLinesAndBands, this); delete this.axis; bc(this) } }; var bC = bG.Axis = function() { this.init.apply(this, arguments) } ; bC.prototype = { defaultOptions: { dateTimeLabelFormats: { millisecond: "%H:%M:%S.%L", second: "%H:%M:%S", minute: "%H:%M", hour: "%H:%M", day: "%e. %b", week: "%e. %b", month: "%b '%y", year: "%Y" }, endOnTick: !1, gridLineColor: "#D8D8D8", labels: { enabled: !0, style: { color: "#606060", cursor: "default", fontSize: "11px" }, x: 0, y: 15 }, lineColor: "#C0D0E0", lineWidth: 1, minPadding: 0.01, maxPadding: 0.01, minorGridLineColor: "#E0E0E0", minorGridLineWidth: 1, minorTickColor: "#A0A0A0", minorTickLength: 2, minorTickPosition: "outside", startOfWeek: 1, startOnTick: !1, tickColor: "#C0D0E0", tickLength: 10, tickmarkPlacement: "between", tickPixelInterval: 100, tickPosition: "outside", tickWidth: 1, title: { align: "middle", style: { color: "#707070" } }, type: "linear" }, defaultYAxisOptions: { endOnTick: !0, gridLineWidth: 1, tickPixelInterval: 72, showLastLabel: !0, labels: { x: -8, y: 3 }, lineWidth: 0, maxPadding: 0.05, minPadding: 0.05, startOnTick: !0, tickWidth: 0, title: { rotation: 270, text: "Values" }, stackLabels: { enabled: !1, formatter: function() { return bG.numberFormat(this.total, -1) }, style: bW(d.line.dataLabels.style, { color: "#000000" }) } }, defaultLeftAxisOptions: { labels: { x: -15, y: null }, title: { rotation: 270 } }, defaultRightAxisOptions: { labels: { x: 15, y: null }, title: { rotation: 90 } }, defaultBottomAxisOptions: { labels: { autoRotation: [-45], x: 0, y: null }, title: { rotation: 0 } }, defaultTopAxisOptions: { labels: { autoRotation: [-45], x: 0, y: -15 }, title: { rotation: 0 } }, init: function(m, p) { var r = p.isX; this.horiz = m.inverted ? !r : r; this.coll = (this.isXAxis = r) ? "xAxis" : "yAxis"; this.opposite = p.opposite; this.side = p.side || (this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3); this.setOptions(p); var s = this.options , t = s.type; this.labelFormatter = s.labels.formatter || this.defaultLabelFormatter; this.userOptions = p; this.minPixelPadding = 0; this.chart = m; this.reversed = s.reversed; this.zoomEnabled = s.zoomEnabled !== !1; this.categories = s.categories || t === "category"; this.names = this.names || []; this.isLog = t === "logarithmic"; this.isDatetimeAxis = t === "datetime"; this.isLinked = bl(s.linkedTo); this.ticks = {}; this.labelEdge = []; this.minorTicks = {}; this.plotLinesAndBands = []; this.alternateBands = {}; this.len = 0; this.minRange = this.userMinRange = s.minRange || s.maxZoom; this.range = s.range; this.offset = s.offset || 0; this.stacks = {}; this.oldStacks = {}; this.min = this.max = null; this.crosshair = a4(s.crosshair, bh(m.options.tooltip.crosshairs)[r ? 0 : 1], !1); var u, s = this.options.events; aR(this, m.axes) === -1 && (r && !this.isColorAxis ? m.axes.splice(m.xAxis.length, 0, this) : m.axes.push(this), m[this.coll].push(this)); this.series = this.series || []; if (m.inverted && r && this.reversed === bw) { this.reversed = !0 } this.removePlotLine = this.removePlotBand = this.removePlotBandOrLine; for (u in s) { aU(this, u, s[u]) } if (this.isLog) { this.val2lin = ac, this.lin2val = ap } }, setOptions: function(m) { this.options = bW(this.defaultOptions, this.isXAxis ? {} : this.defaultYAxisOptions, [this.defaultTopAxisOptions, this.defaultRightAxisOptions, this.defaultBottomAxisOptions, this.defaultLeftAxisOptions][this.side], bW(a5[this.coll], m)) }, defaultLabelFormatter: function() { var m = this.axis, p = this.value, r = m.categories, s = this.dateTimeLabelFormat, t = a5.lang.numericSymbols, u = t && t.length, w, x = m.options.labels.format, m = m.isLog ? p : m.tickInterval; if (x) { w = aB(x, this) } else { if (r) { w = p } else { if (s) { w = a1(s, p) } else { if (u && m >= 1000) { for (; u-- && w === bw; ) { r = Math.pow(1000, u + 1), m >= r && t[u] !== null && (w = bG.numberFormat(p / r, -1) + t[u]) } } } } } w === bw && (w = aZ(p) >= 10000 ? bG.numberFormat(p, 0) : bG.numberFormat(p, -1, bw, "")); return w }, getSeriesExtremes: function() { var m = this , p = m.chart; m.hasVisibleSeries = !1; m.dataMin = m.dataMax = m.ignoreMinPadding = m.ignoreMaxPadding = null; m.buildStacks && m.buildStacks(); aO(m.series, function(r) { if (r.visible || !p.options.chart.ignoreHiddenSeries) { var s; s = r.options.threshold; var t; m.hasVisibleSeries = !0; m.isLog && s <= 0 && (s = null); if (m.isXAxis) { if (s = r.xData, s.length) { m.dataMin = au(a4(m.dataMin, s[0]), a7(s)), m.dataMax = bq(a4(m.dataMax, s[0]), ag(s)) } } else { r.getExtremes(); t = r.dataMax; r = r.dataMin; if (bl(r) && bl(t)) { m.dataMin = au(a4(m.dataMin, r), r), m.dataMax = bq(a4(m.dataMax, t), t) } if (bl(s)) { if (m.dataMin >= s) { m.dataMin = s, m.ignoreMinPadding = !0 } else { if (m.dataMax < s) { m.dataMax = s, m.ignoreMaxPadding = !0 } } } } } }) }, translate: function(m, p, r, s, t, u) { var w = 1 , x = 0 , z = s ? this.oldTransA : this.transA , s = s ? this.oldMin : this.min , A = this.minPixelPadding , t = (this.doPostTranslate || this.isLog && t) && this.lin2val; if (!z) { z = this.transA } if (r) { w *= -1, x = this.len } this.reversed && (w *= -1, x -= w * (this.sector || this.len)); p ? (m = m * w + x, m -= A, m = m / z + s, t && (m = this.lin2val(m))) : (t && (m = this.val2lin(m)), u === "between" && (u = 0.5), m = w * (m - s) * z + x + w * A + (bb(u) ? z * u * this.pointRange : 0)); return m }, toPixels: function(m, p) { return this.translate(m, !1, !this.horiz, null, !0) + (p ? 0 : this.pos) }, toValue: function(m, p) { return this.translate(m - (p ? 0 : this.pos), !0, !this.horiz, null, !0) }, getPlotLinePath: function(m, p, r, s, t) { var u = this.chart, w = this.left, x = this.top, z, A, B = r && u.oldChartHeight || u.chartHeight, D = r && u.oldChartWidth || u.chartWidth, F; z = this.transB; var G = function(H, I, J) { if (H < I || H > J) { s ? H = au(bq(I, H), J) : F = !0 } return H } , t = a4(t, this.translate(m, null, null, r)) , m = r = bM(t + z); z = A = bM(B - t - z); isNaN(t) ? F = !0 : this.horiz ? (z = x, A = B - this.bottom, m = r = G(m, w, w + this.width)) : (m = w, r = D - this.right, z = A = G(z, x, x + this.height)); return F && !s ? null : u.renderer.crispLine(["M", m, z, "L", r, A], p || 1) }, getLinearTickPositions: function(m, p, r) { var s, t = C(bx(p / m) * m), u = C(bm(r / m) * m), w = []; if (p === r && bb(p)) { return [p] } for (p = t; p <= u; ) { w.push(p); p = C(p + m); if (p === s) { break } s = p } return w }, getMinorTickPositions: function() { var m = this.options, p = this.tickPositions, r = this.minorTickInterval, s = [], t, u = this.min; t = this.max; var w = t - u; if (w && w / r < this.len / 3) { if (this.isLog) { m = p.length; for (t = 1; t < m; t++) { s = s.concat(this.getLogTickPositions(r, p[t - 1], p[t], !0)) } } else { if (this.isDatetimeAxis && m.minorTickInterval === "auto") { s = s.concat(this.getTimeTicks(this.normalizeTimeTickInterval(r), u, t, m.startOfWeek)) } else { for (p = u + (p[0] - u) % r; p <= t; p += r) { s.push(p) } } } } this.trimTicks(s); return s }, adjustForMinRange: function() { var m = this.options, p = this.min, r = this.max, s, t = this.dataMax - this.dataMin >= this.minRange, u, w, x, z, A; if (this.isXAxis && this.minRange === bw && !this.isLog) { bl(m.min) || bl(m.max) ? this.minRange = null : (aO(this.series, function(D) { z = D.xData; for (w = A = D.xIncrement ? 1 : z.length - 1; w > 0; w--) { if (x = z[w] - z[w - 1], u === bw || x < u) { u = x } } }), this.minRange = au(u * 5, this.dataMax - this.dataMin)) } if (r - p < this.minRange) { var B = this.minRange; s = (B - r + p) / 2; s = [p - s, a4(m.min, p - s)]; if (t) { s[2] = this.dataMin } p = ag(s); r = [p + B, a4(m.max, p + B)]; if (t) { r[2] = this.dataMax } r = a7(r); r - p < B && (s[0] = r - B, s[1] = a4(m.min, r - B), p = ag(s)) } this.min = p; this.max = r }, setAxisTranslation: function(m) { var p = this, r = p.max - p.min, s = p.axisPointRange || 0, t, u = 0, w = 0, x = p.linkedParent, z = !!p.categories, A = p.transA, B = p.isXAxis; if (B || z || s) { if (x ? (u = x.minPointOffset, w = x.pointRangePadding) : aO(p.series, function(D) { var F = z ? 1 : B ? D.pointRange : p.axisPointRange || 0 , G = D.options.pointPlacement , H = D.closestPointRange; F > r && (F = 0); s = bq(s, F); p.single || (u = bq(u, E(G) ? 0 : F / 2), w = bq(w, G === "on" ? 0 : F)); !D.noSharedTooltip && bl(H) && (t = bl(t) ? au(t, H) : H) }), x = p.ordinalSlope && t ? p.ordinalSlope / t : 1, p.minPointOffset = u *= x, p.pointRangePadding = w *= x, p.pointRange = au(s, r), B) { p.closestPointRange = t } } if (m) { p.oldTransA = A } p.translationSlope = p.transA = A = p.len / (r + w || 1); p.transB = p.horiz ? p.left : p.bottom; p.minPixelPadding = A * u }, setTickInterval: function(m) { var p = this , r = p.chart , s = p.options , t = p.isLog , u = p.isDatetimeAxis , w = p.isXAxis , x = p.isLinked , z = s.maxPadding , A = s.minPadding , B = s.tickInterval , D = s.tickPixelInterval , F = p.categories; !u && !F && !x && this.getTickAmount(); x ? (p.linkedParent = r[p.coll][s.linkedTo], r = p.linkedParent.getExtremes(), p.min = a4(r.min, r.dataMin), p.max = a4(r.max, r.dataMax), s.type !== p.linkedParent.options.type && aF(11, 1)) : (p.min = a4(p.userMin, s.min, p.dataMin), p.max = a4(p.userMax, s.max, p.dataMax)); if (t) { !m && au(p.min, a4(p.dataMin, p.min)) <= 0 && aF(10, 1), p.min = C(ac(p.min)), p.max = C(ac(p.max)) } if (p.range && bl(p.max)) { p.userMin = p.min = bq(p.min, p.max - p.range), p.userMax = p.max, p.range = null } p.beforePadding && p.beforePadding(); p.adjustForMinRange(); if (!F && !p.axisPointRange && !p.usePercentage && !x && bl(p.min) && bl(p.max) && (r = p.max - p.min)) { if (!bl(s.min) && !bl(p.userMin) && A && (p.dataMin < 0 || !p.ignoreMinPadding)) { p.min -= r * A } if (!bl(s.max) && !bl(p.userMax) && z && (p.dataMax > 0 || !p.ignoreMaxPadding)) { p.max += r * z } } if (bb(s.floor)) { p.min = bq(p.min, s.floor) } if (bb(s.ceiling)) { p.max = au(p.max, s.ceiling) } p.tickInterval = p.min === p.max || p.min === void 0 || p.max === void 0 ? 1 : x && !B && D === p.linkedParent.options.tickPixelInterval ? p.linkedParent.tickInterval : a4(B, this.tickAmount ? (p.max - p.min) / bq(this.tickAmount - 1, 1) : void 0, F ? 1 : (p.max - p.min) * D / bq(p.len, D)); w && !m && aO(p.series, function(G) { G.processData(p.min !== p.oldMin || p.max !== p.oldMax) }); p.setAxisTranslation(!0); p.beforeSetTickPositions && p.beforeSetTickPositions(); if (p.postProcessTickInterval) { p.tickInterval = p.postProcessTickInterval(p.tickInterval) } if (p.pointRange) { p.tickInterval = bq(p.pointRange, p.tickInterval) } m = a4(s.minTickInterval, p.isDatetimeAxis && p.closestPointRange); if (!B && p.tickInterval < m) { p.tickInterval = m } if (!u && !t && !B) { p.tickInterval = a8(p.tickInterval, null, a2(p.tickInterval), a4(s.allowDecimals, !(p.tickInterval > 0.5 && p.tickInterval < 5 && p.max > 1000 && p.max < 9999)), !!this.tickAmount) } if (!this.tickAmount && this.len) { p.tickInterval = p.unsquish() } this.setTickPositions() }, setTickPositions: function() { var m = this.options, p, r = m.tickPositions, s = m.tickPositioner, t = m.startOnTick, u = m.endOnTick, w; this.tickmarkOffset = this.categories && m.tickmarkPlacement === "between" && this.tickInterval === 1 ? 0.5 : 0; this.minorTickInterval = m.minorTickInterval === "auto" && this.tickInterval ? this.tickInterval / 5 : m.minorTickInterval; this.tickPositions = p = m.tickPositions && m.tickPositions.slice(); if (!p && (this.tickPositions = p = this.isDatetimeAxis ? this.getTimeTicks(this.normalizeTimeTickInterval(this.tickInterval, m.units), this.min, this.max, m.startOfWeek, this.ordinalPositions, this.closestPointRange, !0) : this.isLog ? this.getLogTickPositions(this.tickInterval, this.min, this.max) : this.getLinearTickPositions(this.tickInterval, this.min, this.max), s && (s = s.apply(this, [this.min, this.max])))) { this.tickPositions = p = s } if (!this.isLinked) { this.trimTicks(p, t, u), this.min === this.max && bl(this.min) && !this.tickAmount && (w = !0, this.min -= 0.5, this.max += 0.5), this.single = w, !r && !s && this.adjustTickAmount() } }, trimTicks: function(m, p, r) { var s = m[0] , t = m[m.length - 1] , u = this.minPointOffset || 0; p ? this.min = s : this.min - u > s && m.shift(); r ? this.max = t : this.max + u < t && m.pop(); m.length === 0 && bl(s) && m.push((t + s) / 2) }, getTickAmount: function() { var m = {}, p, r = this.options, s = r.tickAmount, t = r.tickPixelInterval; !bl(r.tickInterval) && this.len < t && !this.isRadial && !this.isLog && r.startOnTick && r.endOnTick && (s = 2); !s && this.chart.options.chart.alignTicks !== !1 && r.alignTicks !== !1 && (aO(this.chart[this.coll], function(u) { var w = u.options , u = u.horiz , w = [u ? w.left : w.top, u ? w.width : w.height, w.pane].join(","); m[w] ? p = !0 : m[w] = 1 }), p && (s = bm(this.len / t) + 1)); if (s < 4) { this.finalTickAmt = s, s = 5 } this.tickAmount = s }, adjustTickAmount: function() { var m = this.tickInterval , p = this.tickPositions , r = this.tickAmount , s = this.finalTickAmt , t = p && p.length; if (t < r) { for (; p.length < r; ) { p.push(C(p[p.length - 1] + m)) } this.transA *= (t - 1) / (r - 1); this.max = p[p.length - 1] } else { t > r && (this.tickInterval *= 2, this.setTickPositions()) } if (bl(s)) { for (m = r = p.length; m--; ) { (s === 3 && m % 2 === 1 || s <= 2 && m > 0 && m < r - 1) && p.splice(m, 1) } this.finalTickAmt = bw } }, setScale: function() { var m = this.stacks, p, r, s, t; this.oldMin = this.min; this.oldMax = this.max; this.oldAxisLength = this.len; this.setAxisSize(); t = this.len !== this.oldAxisLength; aO(this.series, function(u) { if (u.isDirtyData || u.isDirty || u.xAxis.isDirty) { s = !0 } }); if (t || s || this.isLinked || this.forceRedraw || this.userMin !== this.oldUserMin || this.userMax !== this.oldUserMax) { if (!this.isXAxis) { for (p in m) { for (r in m[p]) { m[p][r].total = null, m[p][r].cum = 0 } } } this.forceRedraw = !1; this.getSeriesExtremes(); this.setTickInterval(); this.oldUserMin = this.userMin; this.oldUserMax = this.userMax; if (!this.isDirty) { this.isDirty = t || this.min !== this.oldMin || this.max !== this.oldMax } } else { if (!this.isXAxis) { if (this.oldStacks) { m = this.stacks = this.oldStacks } for (p in m) { for (r in m[p]) { m[p][r].cum = m[p][r].total } } } } }, setExtremes: function(m, p, r, s, t) { var u = this , w = u.chart , r = a4(r, !0); aO(u.series, function(x) { delete x.kdTree }); t = bf(t, { min: m, max: p }); aP(u, "setExtremes", t, function() { u.userMin = m; u.userMax = p; u.eventArgs = t; u.isDirtyExtremes = !0; r && w.redraw(s) }) }, zoom: function(m, p) { var r = this.dataMin , s = this.dataMax , t = this.options; this.allowZoomOutside || (bl(r) && m <= au(r, a4(t.min, r)) && (m = bw), bl(s) && p >= bq(s, a4(t.max, s)) && (p = bw)); this.displayBtn = m !== bw || p !== bw; this.setExtremes(m, p, !1, bw, { trigger: "zoom" }); return !0 }, setAxisSize: function() { var m = this.chart , p = this.options , r = p.offsetLeft || 0 , s = this.horiz , t = a4(p.width, m.plotWidth - r + (p.offsetRight || 0)) , u = a4(p.height, m.plotHeight) , w = a4(p.top, m.plotTop) , p = a4(p.left, m.plotLeft + r) , r = /%$/; r.test(u) && (u = parseFloat(u) / 100 * m.plotHeight); r.test(w) && (w = parseFloat(w) / 100 * m.plotHeight + m.plotTop); this.left = p; this.top = w; this.width = t; this.height = u; this.bottom = m.chartHeight - u - w; this.right = m.chartWidth - t - p; this.len = bq(s ? t : u, 0); this.pos = s ? p : w }, getExtremes: function() { var m = this.isLog; return { min: m ? C(ap(this.min)) : this.min, max: m ? C(ap(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax } }, getThreshold: function(m) { var p = this.isLog , r = p ? ap(this.min) : this.min , p = p ? ap(this.max) : this.max; r > m || m === null ? m = r : p < m && (m = p); return this.translate(m, 0, 1, 0, 1) }, autoLabelAlign: function(m) { m = (a4(m, 0) - this.side * 90 + 720) % 360; return m > 15 && m < 165 ? "right" : m > 195 && m < 345 ? "left" : "center" }, unsquish: function() { var m = this.ticks, p = this.options.labels, r = this.horiz, s = this.tickInterval, t = s, u = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / s), w, x = p.rotation, z = this.chart.renderer.fontMetrics(p.style.fontSize, m[0] && m[0].label), A, B = Number.MAX_VALUE, D, F = function(G) { G /= u || 1; G = G > 1 ? bm(G) : 1; return G * s }; r ? (D = bl(x) ? [x] : u < a4(p.autoRotationLimit, 80) && !p.staggerLines && !p.step && p.autoRotation) && aO(D, function(G) { var H; if (G === x || G && G >= -90 && G <= 90) { A = F(aZ(z.h / a(ak * G))), H = A + aZ(G / 360), H < B && (B = H, w = G, t = A) } }) : t = F(z.h); this.autoRotation = D; this.labelRotation = w; return t }, renderUnsquish: function() { var m = this.chart, p = m.renderer, r = this.tickPositions, s = this.ticks, t = this.options.labels, u = this.horiz, w = m.margin, x = this.slotWidth = u && !t.step && !t.rotation && (this.staggerLines || 1) * m.plotWidth / r.length || !u && (w[3] && w[3] - m.spacing[3] || m.chartWidth * 0.33), z = bq(1, bM(x - 2 * (t.padding || 5))), A = {}, w = p.fontMetrics(t.style.fontSize, s[0] && s[0].label), B, D = 0; if (!E(t.rotation)) { A.rotation = t.rotation } if (this.autoRotation) { aO(r, function(F) { if ((F = s[F]) && F.labelLength > D) { D = F.labelLength } }), D > z && D > w.h ? A.rotation = this.labelRotation : this.labelRotation = 0 } else { if (x) { B = { width: z + "px", textOverflow: "clip" }; for (x = r.length; !u && x--; ) { if (z = r[x], z = s[z].label) { if (z.styles.textOverflow === "ellipsis" && z.css({ textOverflow: "clip" }), z.getBBox().height > this.len / r.length - (w.h - w.f)) { z.specCss = { textOverflow: "ellipsis" } } } } } } A.rotation && (B = { width: (D > m.chartHeight * 0.5 ? m.chartHeight * 0.33 : m.chartHeight) + "px", textOverflow: "ellipsis" }); this.labelAlign = A.align = t.align || this.autoLabelAlign(this.labelRotation); aO(r, function(F) { var G = (F = s[F]) && F.label; if (G) { B && G.css(bW(B, G.specCss)), delete G.specCss, G.attr(A), F.rotation = A.rotation } }); this.tickRotCorr = p.rotCorr(w.b, this.labelRotation || 0, this.side === 2) }, getOffset: function() { var m = this, p = m.chart, s = p.renderer, u = m.options, w = m.tickPositions, x = m.ticks, z = m.horiz, A = m.side, B = p.inverted ? [1, 0, 3, 2][A] : A, D, F, G = 0, H, I = 0, J = u.title, N = u.labels, L = 0, t = p.axisOffset, p = p.clipOffset, M = [-1, 1, 1, -1][A], K; m.hasData = D = m.hasVisibleSeries || bl(m.min) && bl(m.max) && !!w; m.showAxis = F = D || a4(u.showEmpty, !0); m.staggerLines = m.horiz && N.staggerLines; if (!m.axisGroup) { m.gridGroup = s.g("grid").attr({ zIndex: u.gridZIndex || 1 }).add(), m.axisGroup = s.g("axis").attr({ zIndex: u.zIndex || 2 }).add(), m.labelGroup = s.g("axis-labels").attr({ zIndex: N.zIndex || 7 }).addClass("highcharts-" + m.coll.toLowerCase() + "-labels").add() } if (D || m.isLinked) { if (aO(w, function(r) { x[r] ? x[r].addLabel() : x[r] = new bt(m,r) }), m.renderUnsquish(), aO(w, function(r) { if (A === 0 || A === 2 || { 1: "left", 3: "right" }[A] === m.labelAlign) { L = bq(x[r].getLabelSize(), L) } }), m.staggerLines) { L *= m.staggerLines, m.labelOffset = L } } else { for (K in x) { x[K].destroy(), delete x[K] } } if (J && J.text && J.enabled !== !1) { if (!m.axisTitle) { m.axisTitle = s.text(J.text, 0, 0, J.useHTML).attr({ zIndex: 7, rotation: J.rotation || 0, align: J.textAlign || { low: "left", middle: "center", high: "right" }[J.align] }).addClass("highcharts-" + this.coll.toLowerCase() + "-title").css(J.style).add(m.axisGroup), m.axisTitle.isNew = !0 } if (F) { G = m.axisTitle.getBBox()[z ? "height" : "width"], H = J.offset, I = bl(H) ? 0 : a4(J.margin, z ? 5 : 10) } m.axisTitle[F ? "show" : "hide"]() } m.offset = M * a4(u.offset, t[A]); m.tickRotCorr = m.tickRotCorr || { x: 0, y: 0 }; s = A === 2 ? m.tickRotCorr.y : 0; z = L + I + (L && M * (z ? a4(N.y, m.tickRotCorr.y + 8) : N.x) - s); m.axisTitleMargin = a4(H, z); t[A] = bq(t[A], m.axisTitleMargin + G + M * m.offset, z); p[B] = bq(p[B], bx(u.lineWidth / 2) * 2) }, getLinePath: function(m) { var p = this.chart , r = this.opposite , s = this.offset , t = this.horiz , u = this.left + (r ? this.width : 0) + s , s = p.chartHeight - this.bottom - (r ? this.height : 0) + s; r && (m *= -1); return p.renderer.crispLine(["M", t ? this.left : u, t ? s : this.top, "L", t ? p.chartWidth - this.right : u, t ? s : p.chartHeight - this.bottom], m) }, getTitlePosition: function() { var m = this.horiz , p = this.left , r = this.top , s = this.len , t = this.options.title , u = m ? p : r , w = this.opposite , x = this.offset , z = h(t.style.fontSize || 12) , s = { low: u + (m ? 0 : s), middle: u + s / 2, high: u + (m ? s : 0) }[t.align] , p = (m ? r + this.height : p) + (m ? 1 : -1) * (w ? -1 : 1) * this.axisTitleMargin + (this.side === 2 ? z : 0); return { x: m ? s : p + (w ? this.width : 0) + x + (t.x || 0), y: m ? p - (w ? this.height : 0) + x : s + (t.y || 0) } }, render: function() { var m = this, s = m.chart, t = s.renderer, w = m.options, x = m.isLog, z = m.isLinked, A = m.tickPositions, B = m.axisTitle, D = m.ticks, F = m.minorTicks, G = m.alternateBands, H = w.stackLabels, I = w.alternateGridColor, J = m.tickmarkOffset, L = w.lineWidth, O, K = s.hasRendered && bl(m.oldMin) && !isNaN(m.oldMin); O = m.hasData; var u = m.showAxis, N, M; m.labelEdge.length = 0; m.overlap = !1; aO([D, F, G], function(p) { for (var r in p) { p[r].isActive = !1 } }); if (O || z) { m.minorTickInterval && !m.categories && aO(m.getMinorTickPositions(), function(p) { F[p] || (F[p] = new bt(m,p,"minor")); K && F[p].isNew && F[p].render(null, !0); F[p].render(null, !1, 1) }); if (A.length && (aO(A, function(p, r) { if (!z || p >= m.min && p <= m.max) { D[p] || (D[p] = new bt(m,p)), K && D[p].isNew && D[p].render(r, !0, 0.1), D[p].render(r) } }), J && (m.min === 0 || m.single))) { D[-1] || (D[-1] = new bt(m,-1,null,!0)), D[-1].render(-1) } I && aO(A, function(p, r) { if (r % 2 === 0 && p < m.max) { G[p] || (G[p] = new bG.PlotLineOrBand(m)), N = p + J, M = A[r + 1] !== bw ? A[r + 1] + J : m.max, G[p].options = { from: x ? ap(N) : N, to: x ? ap(M) : M, color: I }, G[p].render(), G[p].isActive = !0 } }); if (!m._addedPlotLB) { aO((w.plotLines || []).concat(w.plotBands || []), function(p) { m.addPlotBandOrLine(p) }), m._addedPlotLB = !0 } } aO([D, F, G], function(p) { var r, P, Q = [], R = bY ? bY.duration || 500 : 0, T = function() { for (P = Q.length; P--; ) { p[Q[P]] && !p[Q[P]].isActive && (p[Q[P]].destroy(), delete p[Q[P]]) } }; for (r in p) { if (!p[r].isActive) { p[r].render(r, !1, 0), p[r].isActive = !1, Q.push(r) } } p === G || !s.hasRendered || !R ? T() : R && setTimeout(T, R) }); if (L) { O = m.getLinePath(L), m.axisLine ? m.axisLine.animate({ d: O }) : m.axisLine = t.path(O).attr({ stroke: w.lineColor, "stroke-width": L, zIndex: 7 }).add(m.axisGroup), m.axisLine[u ? "show" : "hide"]() } if (B && u) { B[B.isNew ? "attr" : "animate"](m.getTitlePosition()), B.isNew = !1 } H && H.enabled && m.renderStackTotals(); m.isDirty = !1 }, redraw: function() { this.render(); aO(this.plotLinesAndBands, function(m) { m.render() }); aO(this.series, function(m) { m.isDirty = !0 }) }, destroy: function(m) { var p = this, r = p.stacks, s, t = p.plotLinesAndBands; m || bS(p); for (s in r) { bc(r[s]), r[s] = null } aO([p.ticks, p.minorTicks, p.alternateBands], function(u) { bc(u) }); for (m = t.length; m--; ) { t[m].destroy() } aO("stackTotalGroup,axisLine,axisTitle,axisGroup,cross,gridGroup,labelGroup".split(","), function(u) { p[u] && (p[u] = p[u].destroy()) }); this.cross && this.cross.destroy() }, drawCrosshair: function(m, p) { var r, s = this.crosshair, t = s.animation; if (!this.crosshair || (bl(p) || !a4(this.crosshair.snap, !0)) === !1) { this.hideCrosshair() } else { if (a4(s.snap, !0) ? bl(p) && (r = this.isXAxis ? p.plotX : this.len - p.plotY) : r = this.horiz ? m.chartX - this.pos : this.len - m.chartY + this.pos, r = this.isRadial ? this.getPlotLinePath(this.isXAxis ? p.x : a4(p.stackY, p.y)) || null : this.getPlotLinePath(null, null, null, null, r) || null, r === null) { this.hideCrosshair() } else { if (this.cross) { this.cross.attr({ visibility: "visible" })[t ? "animate" : "attr"]({ d: r }, t) } else { t = this.categories && !this.isRadial; t = { "stroke-width": s.width || (t ? this.transA : 1), stroke: s.color || (t ? "rgba(155,200,255,0.2)" : "#C0C0C0"), zIndex: s.zIndex || 2 }; if (s.dashStyle) { t.dashstyle = s.dashStyle } this.cross = this.chart.renderer.path(r).attr(t).add() } } } }, hideCrosshair: function() { this.cross && this.cross.hide() } }; bf(bC.prototype, { getPlotBandPath: function(m, p) { var r = this.getPlotLinePath(p, null, null, !0) , s = this.getPlotLinePath(m, null, null, !0); s && r && s.toString() !== r.toString() ? s.push(r[4], r[5], r[1], r[2]) : s = null; return s }, addPlotBand: function(m) { return this.addPlotBandOrLine(m, "plotBands") }, addPlotLine: function(m) { return this.addPlotBandOrLine(m, "plotLines") }, addPlotBandOrLine: function(m, p) { var r = (new bG.PlotLineOrBand(this,m)).render() , s = this.userOptions; r && (p && (s[p] = s[p] || [], s[p].push(m)), this.plotLinesAndBands.push(r)); return r }, removePlotBandOrLine: function(m) { for (var p = this.plotLinesAndBands, r = this.options, s = this.userOptions, t = p.length; t--; ) { p[t].id === m && p[t].destroy() } aO([r.plotLines || [], s.plotLines || [], r.plotBands || [], s.plotBands || []], function(u) { for (t = u.length; t--; ) { u[t].id === m && av(u, u[t]) } }) } }); bC.prototype.getTimeTicks = function(m, p, r, s) { var t = [], u = {}, w = a5.global.useUTC, x, z = new e(p - bJ(p)), A = m.unitRange, B = m.count; if (bl(p)) { z[aa](A >= aj.second ? 0 : B * bx(z.getMilliseconds() / B)); if (A >= aj.second) { z[ae](A >= aj.minute ? 0 : B * bx(z.getSeconds() / B)) } if (A >= aj.minute) { z[ai](A >= aj.hour ? 0 : B * bx(z[bj]() / B)) } if (A >= aj.hour) { z[an](A >= aj.day ? 0 : B * bx(z[bo]() / B)) } if (A >= aj.day) { z[bz](A >= aj.month ? 1 : B * bx(z[bP]() / B)) } A >= aj.month && (z[bE](A >= aj.year ? 0 : B * bx(z[bU]() / B)), x = z[bZ]()); A >= aj.year && (x -= x % B, z[bK](x)); if (A === aj.week) { z[bz](z[bP]() - z[bu]() + a4(s, 1)) } p = 1; if (aX || ad) { z = z.getTime(), z = new e(z + bJ(z)) } x = z[bZ](); for (var s = z.getTime(), D = z[bU](), F = z[bP](), G = (aj.day + (w ? bJ(z) : z.getTimezoneOffset() * 60000)) % aj.day; s < r; ) { t.push(s), A === aj.year ? s = am(x + p * B, 0) : A === aj.month ? s = am(x, D + p * B) : !w && (A === aj.day || A === aj.week) ? s = am(x, D, F + p * B * (A === aj.day ? 1 : 7)) : s += A * B, p++ } t.push(s); aO(aH(t, function(H) { return A <= aj.hour && H % aj.day === G }), function(H) { u[H] = "day" }) } t.info = bf(m, { higherRanks: u, totalRange: A * B }); return t } ; bC.prototype.normalizeTimeTickInterval = function(m, p) { var r = p || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]], s = r[r.length - 1], t = aj[s[0]], u = s[1], w; for (w = 0; w < r.length; w++) { if (s = r[w], t = aj[s[0]], u = s[1], r[w + 1] && m <= (t * u[u.length - 1] + aj[r[w + 1][0]]) / 2) { break } } t === aj.year && m < 5 * t && (u = [1, 2, 5]); r = a8(m / t, u, s[0] === "year" ? bq(a2(m / t), 1) : 1); return { unitRange: t, count: r, unitName: s[0] } } ; bC.prototype.getLogTickPositions = function(m, p, r, s) { var t = this.options , u = this.len , w = []; if (!s) { this._minorAutoInterval = null } if (m >= 0.5) { m = bM(m), w = this.getLinearTickPositions(m, p, r) } else { if (m >= 0.08) { for (var u = bx(p), x, z, A, B, D, t = m > 0.3 ? [1, 2, 4] : m > 0.15 ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; u < r + 1 && !D; u++) { z = t.length; for (x = 0; x < z && !D; x++) { A = ac(ap(u) * t[x]), A > p && (!s || B <= r) && B !== bw && w.push(B), B > r && (D = !0), B = A } } } else { if (p = ap(p), r = ap(r), m = t[s ? "minorTickInterval" : "tickInterval"], m = a4(m === "auto" ? null : m, this._minorAutoInterval, (r - p) * (t.tickPixelInterval / (s ? 5 : 1)) / ((s ? u / this.tickPositions.length : u) || 1)), m = a8(m, null, a2(m)), w = by(this.getLinearTickPositions(m, p, r), ac), !s) { this._minorAutoInterval = m / 5 } } } if (!s) { this.tickInterval = m } return w } ; var aT = bG.Tooltip = function() { this.init.apply(this, arguments) } ; aT.prototype = { init: function(m, p) { var r = p.borderWidth , s = p.style , t = h(s.padding); this.chart = m; this.options = p; this.crosshairs = []; this.now = { x: 0, y: 0 }; this.isHidden = !0; this.label = m.renderer.label("", 0, 0, p.shape || "callout", null, null, p.useHTML, null, "tooltip").attr({ padding: t, fill: p.backgroundColor, "stroke-width": r, r: p.borderRadius, zIndex: 8 }).css(s).css({ padding: 0 }).add().attr({ y: -9999 }); ab || this.label.shadow(p.shadow); this.shared = p.shared }, destroy: function() { if (this.label) { this.label = this.label.destroy() } clearTimeout(this.hideTimer); clearTimeout(this.tooltipTimeout) }, move: function(m, p, r, s) { var t = this , u = t.now , w = t.options.animation !== !1 && !t.isHidden && (aZ(m - u.x) > 1 || aZ(p - u.y) > 1) , x = t.followPointer || t.len > 1; bf(u, { x: w ? (2 * u.x + m) / 3 : m, y: w ? (u.y + p) / 2 : p, anchorX: x ? bw : w ? (2 * u.anchorX + r) / 3 : r, anchorY: x ? bw : w ? (u.anchorY + s) / 2 : s }); t.label.attr(u); if (w) { clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() { t && t.move(m, p, r, s) }, 32) } }, hide: function(m) { var p = this, r; clearTimeout(this.hideTimer); if (!this.isHidden) { r = this.chart.hoverPoints, this.hideTimer = setTimeout(function() { p.label.fadeOut(); p.isHidden = !0 }, a4(m, this.options.hideDelay, 500)), r && aO(r, function(s) { s.setState() }), this.chart.hoverPoints = null, this.chart.hoverSeries = null } }, getAnchor: function(m, p) { var r, s = this.chart, t = s.inverted, u = s.plotTop, w = s.plotLeft, x = 0, z = 0, A, B, m = bh(m); r = m[0].tooltipPos; this.followPointer && p && (p.chartX === bw && (p = s.pointer.normalize(p)), r = [p.chartX - s.plotLeft, p.chartY - u]); r || (aO(m, function(D) { A = D.series.yAxis; B = D.series.xAxis; x += D.plotX + (!t && B ? B.left - w : 0); z += (D.plotLow ? (D.plotLow + D.plotHigh) / 2 : D.plotY) + (!t && A ? A.top - u : 0) }), x /= m.length, z /= m.length, r = [t ? s.plotWidth - z : x, this.shared && !t && m.length > 1 && p ? p.chartY - u : t ? s.plotHeight - x : z]); return by(r, bM) }, getPosition: function(m, p, r) { var s = this.chart, t = this.distance, u = {}, w = r.h, x, z = ["y", s.chartHeight, p, r.plotY + s.plotTop], A = ["x", s.chartWidth, m, r.plotX + s.plotLeft], B = a4(r.ttBelow, s.inverted && !r.negative || !s.inverted && r.negative), D = function(I, J, K, L) { var M = K < L - t , N = L + t + K < J , O = L - t - K; L += t; if (B && N) { u[I] = L } else { if (!B && M) { u[I] = O } else { if (M) { u[I] = O - w < 0 ? O : O - w } else { if (N) { u[I] = L + w + K > J ? L : L + w } else { return !1 } } } } }, F = function(I, J, K, L) { if (L < t || L > J - t) { return !1 } else { u[I] = L < K / 2 ? 1 : L > J - K / 2 ? J - K - 2 : L - K / 2 } }, G = function(I) { var J = z; z = A; A = J; x = I }, H = function() { D.apply(0, z) !== !1 ? F.apply(0, A) === !1 && !x && (G(!0), H()) : x ? u.x = u.y = 0 : (G(!0), H()) }; (s.inverted || this.len > 1) && G(); H(); return u }, defaultFormatter: function(m) { var p = this.points || bh(this), r; r = [m.tooltipFooterHeaderFormatter(p[0])]; r = r.concat(m.bodyFormatter(p)); r.push(m.tooltipFooterHeaderFormatter(p[0], !0)); return r.join("") }, refresh: function(m, p) { var r = this.chart, s = this.label, t = this.options, u, w, x = {}, z, A = []; z = t.formatter || this.defaultFormatter; var x = r.hoverPoints, B, D = this.shared; clearTimeout(this.hideTimer); this.followPointer = bh(m)[0].series.tooltipOptions.followPointer; w = this.getAnchor(m, p); u = w[0]; w = w[1]; D && (!m.series || !m.series.noSharedTooltip) ? (r.hoverPoints = m, x && aO(x, function(F) { F.setState() }), aO(m, function(F) { F.setState("hover"); A.push(F.getLabelConfig()) }), x = { x: m[0].category, y: m[0].y }, x.points = A, this.len = A.length, m = m[0]) : x = m.getLabelConfig(); z = z.call(x, this); x = m.series; this.distance = a4(x.tooltipOptions.distance, 16); z === !1 ? this.hide() : (this.isHidden && (S(s), s.attr("opacity", 1).show()), s.attr({ text: z }), B = t.borderColor || m.color || x.color || "#606060", s.attr({ stroke: B }), this.updatePosition({ plotX: u, plotY: w, negative: m.negative, ttBelow: m.ttBelow, h: m.shapeArgs && m.shapeArgs.height || 0 }), this.isHidden = !1); aP(r, "tooltipRefresh", { text: z, x: u + r.plotLeft, y: w + r.plotTop, borderColor: B }) }, updatePosition: function(m) { var p = this.chart , r = this.label , r = (this.options.positioner || this.getPosition).call(this, r.width, r.height, m); this.move(bM(r.x), bM(r.y), m.plotX + p.plotLeft, m.plotY + p.plotTop) }, getXDateFormat: function(m, p, r) { var s, p = p.dateTimeLabelFormats, t = r && r.closestPointRange, u, w = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, x, z; if (t) { x = a1("%m-%d %H:%M:%S.%L", m.x); for (u in aj) { if (t === aj.week && +a1("%w", m.x) === r.options.startOfWeek && x.substr(6) === "00:00:00.000") { u = "week"; break } else { if (aj[u] > t) { u = z; break } else { if (w[u] && x.substr(w[u]) !== "01-01 00:00:00.000".substr(w[u])) { break } } } u !== "week" && (z = u) } u && (s = p[u]) } else { s = p.day } return s || p.year }, tooltipFooterHeaderFormatter: function(m, p) { var r = p ? "footer" : "header" , s = m.series , t = s.tooltipOptions , u = t.xDateFormat , w = s.xAxis , x = w && w.options.type === "datetime" && bb(m.key) , r = t[r + "Format"]; x && !u && (u = this.getXDateFormat(m, t, w)); x && u && (r = r.replace("{point.key}", "{point.key:" + u + "}")); return aB(r, { point: m, series: s }) }, bodyFormatter: function(m) { return by(m, function(p) { var r = p.series.tooltipOptions; return (r.pointFormatter || p.point.tooltipFormatter).call(p.point, r.pointFormat) }) } }; var a0; f = c.documentElement.ontouchstart !== bw; var bD = bG.Pointer = function(m, p) { this.init(m, p) } ; bD.prototype = { init: function(m, p) { var r = p.chart, s = r.events, t = ab ? "" : r.zoomType, r = m.inverted, u; this.options = p; this.chart = m; this.zoomX = u = /x/.test(t); this.zoomY = t = /y/.test(t); this.zoomHor = u && !r || t && r; this.zoomVert = t && !r || u && r; this.hasZoom = u || t; this.runChartClick = s && !!s.click; this.pinchDown = []; this.lastValidTouch = {}; if (bG.Tooltip && p.tooltip.enabled) { m.tooltip = new aT(m,p.tooltip), this.followTouchMove = a4(p.tooltip.followTouchMove, !0) } this.setDOMEvents() }, normalize: function(m, p) { var r, s, m = m || window.event, m = bp(m); if (!m.target) { m.target = m.srcElement } s = m.touches ? m.touches.length ? m.touches.item(0) : m.changedTouches[0] : m; if (!p) { this.chartPosition = p = bk(this.chart.container) } s.pageX === bw ? (r = bq(m.x, m.clientX - p.left), s = m.y) : (r = s.pageX - p.left, s = s.pageY - p.top); return bf(m, { chartX: bM(r), chartY: bM(s) }) }, getCoordinates: function(m) { var p = { xAxis: [], yAxis: [] }; aO(this.chart.axes, function(r) { p[r.isXAxis ? "xAxis" : "yAxis"].push({ axis: r, value: r.toValue(m[r.horiz ? "chartX" : "chartY"]) }) }); return p }, runPointActions: function(m) { var p = this.chart, r = p.series, s = p.tooltip, t = s ? s.shared : !1, u = p.hoverPoint, w = p.hoverSeries, x, z = p.chartWidth, A = p.chartWidth, B, D = [], F, G; if (!t && !w) { for (x = 0; x < r.length; x++) { if (r[x].directTouch || !r[x].options.stickyTracking) { r = [] } } } !t && w && w.directTouch && u ? F = u : (aO(r, function(H) { B = H.noSharedTooltip && t; H.visible && !B && a4(H.options.enableMouseTracking, !0) && (G = H.searchPoint(m)) && D.push(G) }), aO(D, function(H) { if (H && bl(H.plotX) && bl(H.plotY) && (H.dist.distX < z || (H.dist.distX === z || H.series.kdDimensions > 1) && H.dist.distR < A)) { z = H.dist.distX, A = H.dist.distR, F = H } })); if (F && (F !== u || s && s.isHidden)) { if (t && !F.series.noSharedTooltip) { for (x = D.length; x--; ) { (D[x].clientX !== F.clientX || D[x].series.noSharedTooltip) && D.splice(x, 1) } D.length && s && s.refresh(D, m); aO(D, function(H) { if (H !== F) { H.onMouseOver(m) } }); (w && w.directTouch && u || F).onMouseOver(m) } else { s && s.refresh(F, m), F.onMouseOver(m) } } else { r = w && w.tooltipOptions.followPointer, s && r && !s.isHidden && (r = s.getAnchor([{}], m), s.updatePosition({ plotX: r[0], plotY: r[1] })) } if (s && !this._onDocumentMouseMove) { this._onDocumentMouseMove = function(H) { if (bN[a0]) { bN[a0].pointer.onDocumentMouseMove(H) } } , aU(c, "mousemove", this._onDocumentMouseMove) } aO(p.axes, function(H) { H.drawCrosshair(m, a4(F, u)) }) }, reset: function(m, p) { var r = this.chart , s = r.hoverSeries , t = r.hoverPoint , u = r.tooltip , w = u && u.shared ? r.hoverPoints : t; (m = m && u && w) && bh(w)[0].plotX === bw && (m = !1); if (m) { u.refresh(w), t && (t.setState(t.state, !0), aO(r.axes, function(x) { a4(x.options.crosshair && x.options.crosshair.snap, !0) ? x.drawCrosshair(null, m) : x.hideCrosshair() })) } else { if (t) { t.onMouseOut() } if (s) { s.onMouseOut() } u && u.hide(p); if (this._onDocumentMouseMove) { bS(c, "mousemove", this._onDocumentMouseMove), this._onDocumentMouseMove = null } aO(r.axes, function(x) { x.hideCrosshair() }); this.hoverX = null } }, scaleGroups: function(m, p) { var r = this.chart, s; aO(r.series, function(t) { s = m || t.getPlotBox(); t.xAxis && t.xAxis.zoomEnabled && (t.group.attr(s), t.markerGroup && (t.markerGroup.attr(s), t.markerGroup.clip(p ? r.clipRect : null)), t.dataLabelsGroup && t.dataLabelsGroup.attr(s)) }); r.clipRect.attr(p || r.clipBox) }, dragStart: function(m) { var p = this.chart; p.mouseIsDown = m.type; p.cancelClick = !1; p.mouseDownX = this.mouseDownX = m.chartX; p.mouseDownY = this.mouseDownY = m.chartY }, drag: function(m) { var p = this.chart, r = p.options.chart, s = m.chartX, t = m.chartY, u = this.zoomHor, w = this.zoomVert, x = p.plotLeft, z = p.plotTop, A = p.plotWidth, B = p.plotHeight, D, F = this.mouseDownX, G = this.mouseDownY, H = r.panKey && m[r.panKey + "Key"]; s < x ? s = x : s > x + A && (s = x + A); t < z ? t = z : t > z + B && (t = z + B); this.hasDragged = Math.sqrt(Math.pow(F - s, 2) + Math.pow(G - t, 2)); if (this.hasDragged > 10) { D = p.isInsidePlot(F - x, G - z); if (p.hasCartesianSeries && (this.zoomX || this.zoomY) && D && !H && !this.selectionMarker) { this.selectionMarker = p.renderer.rect(x, z, u ? 1 : A, w ? 1 : B, 0).attr({ fill: r.selectionMarkerFill || "rgba(69,114,167,0.25)", zIndex: 7 }).add() } this.selectionMarker && u && (s -= F, this.selectionMarker.attr({ width: aZ(s), x: (s > 0 ? 0 : s) + F })); this.selectionMarker && w && (s = t - G, this.selectionMarker.attr({ height: aZ(s), y: (s > 0 ? 0 : s) + G })); D && !this.selectionMarker && r.panning && p.pan(m, r.panning) } }, drop: function(m) { var p = this , r = this.chart , s = this.hasPinched; if (this.selectionMarker) { var t = { xAxis: [], yAxis: [], originalEvent: m.originalEvent || m }, u = this.selectionMarker, w = u.attr ? u.attr("x") : u.x, x = u.attr ? u.attr("y") : u.y, z = u.attr ? u.attr("width") : u.width, A = u.attr ? u.attr("height") : u.height, B; if (this.hasDragged || s) { aO(r.axes, function(D) { if (D.zoomEnabled && bl(D.min) && (s || p[{ xAxis: "zoomX", yAxis: "zoomY" }[D.coll]])) { var F = D.horiz , G = m.type === "touchend" ? D.minPixelPadding : 0 , H = D.toValue((F ? w : x) + G) , F = D.toValue((F ? w + z : x + A) - G); t[D.coll].push({ axis: D, min: au(H, F), max: bq(H, F) }); B = !0 } }), B && aP(r, "selection", t, function(D) { r.zoom(bf(D, s ? { animation: !1 } : null)) }) } this.selectionMarker = this.selectionMarker.destroy(); s && this.scaleGroups() } if (r) { af(r.container, { cursor: r._cursor }), r.cancelClick = this.hasDragged > 10, r.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = [] } }, onContainerMouseDown: function(m) { m = this.normalize(m); m.preventDefault && m.preventDefault(); this.dragStart(m) }, onDocumentMouseUp: function(m) { bN[a0] && bN[a0].pointer.drop(m) }, onDocumentMouseMove: function(m) { var p = this.chart , r = this.chartPosition , m = this.normalize(m, r); r && !this.inClass(m.target, "highcharts-tracker") && !p.isInsidePlot(m.chartX - p.plotLeft, m.chartY - p.plotTop) && this.reset() }, onContainerMouseLeave: function() { var m = bN[a0]; if (m) { m.pointer.reset(), m.pointer.chartPosition = null } }, onContainerMouseMove: function(m) { var p = this.chart; a0 = p.index; m = this.normalize(m); m.returnValue = !1; p.mouseIsDown === "mousedown" && this.drag(m); (this.inClass(m.target, "highcharts-tracker") || p.isInsidePlot(m.chartX - p.plotLeft, m.chartY - p.plotTop)) && !p.openMenu && this.runPointActions(m) }, inClass: function(m, p) { for (var r; m; ) { if (r = aJ(m, "class")) { if (r.indexOf(p) !== -1) { return !0 } else { if (r.indexOf("highcharts-container") !== -1) { return !1 } } } m = m.parentNode } }, onTrackerMouseOut: function(m) { var p = this.chart.hoverSeries , r = (m = m.relatedTarget || m.toElement) && m.point && m.point.series; if (p && !p.options.stickyTracking && !this.inClass(m, "highcharts-tooltip") && r !== p) { p.onMouseOut() } }, onContainerClick: function(m) { var p = this.chart , r = p.hoverPoint , s = p.plotLeft , t = p.plotTop , m = this.normalize(m); m.originalEvent = m; m.cancelBubble = !0; p.cancelClick || (r && this.inClass(m.target, "highcharts-tracker") ? (aP(r.series, "click", bf(m, { point: r })), p.hoverPoint && r.firePointEvent("click", m)) : (bf(m, this.getCoordinates(m)), p.isInsidePlot(m.chartX - s, m.chartY - t) && aP(p, "click", m))) }, setDOMEvents: function() { var m = this , p = m.chart.container; p.onmousedown = function(r) { m.onContainerMouseDown(r) } ; p.onmousemove = function(r) { m.onContainerMouseMove(r) } ; p.onclick = function(r) { m.onContainerClick(r) } ; aU(p, "mouseleave", m.onContainerMouseLeave); k === 1 && aU(c, "mouseup", m.onDocumentMouseUp); if (f) { p.ontouchstart = function(r) { m.onContainerTouchStart(r) } , p.ontouchmove = function(r) { m.onContainerTouchMove(r) } , k === 1 && aU(c, "touchend", m.onDocumentTouchEnd) } }, destroy: function() { var m; bS(this.chart.container, "mouseleave", this.onContainerMouseLeave); k || (bS(c, "mouseup", this.onDocumentMouseUp), bS(c, "touchend", this.onDocumentTouchEnd)); clearInterval(this.tooltipTimeout); for (m in this) { this[m] = null } } }; bf(bG.Pointer.prototype, { pinchTranslate: function(m, p, r, s, t, u) { (this.zoomHor || this.pinchHor) && this.pinchTranslateDirection(!0, m, p, r, s, t, u); (this.zoomVert || this.pinchVert) && this.pinchTranslateDirection(!1, m, p, r, s, t, u) }, pinchTranslateDirection: function(z, A, B, F, G, H, I, J) { var K = this.chart, L = z ? "x" : "y", M = z ? "X" : "Y", N = "chart" + M, P = z ? "width" : "height", Q = K["plot" + (z ? "Left" : "Top")], T, R, O = J || 1, D = K.inverted, Y = K.bounds[z ? "h" : "v"], V = A.length === 1, U = A[0][N], W = B[0][N], X = !V && A[1][N], b1 = !V && B[1][N], Z, B = function() { !V && aZ(U - X) > 20 && (O = J || aZ(W - b1) / aZ(U - X)); R = (Q - W) / O + U; T = K["plot" + (z ? "Width" : "Height")] / O }; B(); A = R; A < Y.min ? (A = Y.min, Z = !0) : A + T > Y.max && (A = Y.max - T, Z = !0); Z ? (W -= 0.8 * (W - I[L][0]), V || (b1 -= 0.8 * (b1 - I[L][1])), B()) : I[L] = [W, b1]; D || (H[L] = R - Q, H[P] = T); H = D ? 1 / O : O; G[P] = T; G[L] = A; F[D ? z ? "scaleY" : "scaleX" : "scale" + M] = O; F["translate" + M] = H * Q + (W - H * U) }, pinch: function(m) { var p = this , r = p.chart , s = p.pinchDown , t = m.touches , u = t.length , w = p.lastValidTouch , x = p.hasZoom , z = p.selectionMarker , A = {} , B = u === 1 && (p.inClass(m.target, "highcharts-tracker") && r.runTrackerClick || p.runChartClick) , D = {}; x && !B && m.preventDefault(); by(t, function(F) { return p.normalize(F) }); if (m.type === "touchstart") { aO(t, function(F, G) { s[G] = { chartX: F.chartX, chartY: F.chartY } }), w.x = [s[0].chartX, s[1] && s[1].chartX], w.y = [s[0].chartY, s[1] && s[1].chartY], aO(r.axes, function(F) { if (F.zoomEnabled) { var G = r.bounds[F.horiz ? "h" : "v"] , H = F.minPixelPadding , I = F.toPixels(a4(F.options.min, F.dataMin)) , J = F.toPixels(a4(F.options.max, F.dataMax)) , K = au(I, J) , I = bq(I, J); G.min = au(F.pos, K - H); G.max = bq(F.pos + F.len, I + H) } }), p.res = !0 } else { if (s.length) { if (!z) { p.selectionMarker = z = bf({ destroy: aQ }, r.plotBox) } p.pinchTranslate(s, t, A, z, D, w); p.hasPinched = x; p.scaleGroups(A, D); if (!x && p.followTouchMove && u === 1) { this.runPointActions(p.normalize(m)) } else { if (p.res) { p.res = !1, this.reset(!1, 0) } } } } }, onContainerTouchStart: function(m) { var p = this.chart; a0 = p.index; m.touches.length === 1 ? (m = this.normalize(m), p.isInsidePlot(m.chartX - p.plotLeft, m.chartY - p.plotTop) && !p.openMenu ? (this.runPointActions(m), this.pinch(m)) : this.reset()) : m.touches.length === 2 && this.pinch(m) }, onContainerTouchMove: function(m) { (m.touches.length === 1 || m.touches.length === 2) && this.pinch(m) }, onDocumentTouchEnd: function(m) { bN[a0] && bN[a0].pointer.drop(m) } }); if (ao.PointerEvent || ao.MSPointerEvent) { var bI = {} , g = !!ao.PointerEvent , bL = function() { var m, p = []; p.item = function(r) { return this[r] } ; for (m in bI) { bI.hasOwnProperty(m) && p.push({ pageX: bI[m].pageX, pageY: bI[m].pageY, target: bI[m].target }) } return p } , l = function(m, p, r, s) { m = m.originalEvent || m; if ((m.pointerType === "touch" || m.pointerType === m.MSPOINTER_TYPE_TOUCH) && bN[a0]) { s(m), s = bN[a0].pointer, s[p]({ type: r, target: m.currentTarget, preventDefault: aQ, touches: bL() }) } }; bf(bD.prototype, { onContainerPointerDown: function(m) { l(m, "onContainerTouchStart", "touchstart", function(p) { bI[p.pointerId] = { pageX: p.pageX, pageY: p.pageY, target: p.currentTarget } }) }, onContainerPointerMove: function(m) { l(m, "onContainerTouchMove", "touchmove", function(p) { bI[p.pointerId] = { pageX: p.pageX, pageY: p.pageY }; if (!bI[p.pointerId].target) { bI[p.pointerId].target = p.currentTarget } }) }, onDocumentPointerUp: function(m) { l(m, "onDocumentTouchEnd", "touchend", function(p) { delete bI[p.pointerId] }) }, batchMSEvents: function(m) { m(this.chart.container, g ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown); m(this.chart.container, g ? "pointermove" : "MSPointerMove", this.onContainerPointerMove); m(c, g ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp) } }); q(bD.prototype, "init", function(m, p, r) { m.call(this, p, r); this.hasZoom && af(p.container, { "-ms-touch-action": bg, "touch-action": bg }) }); q(bD.prototype, "setDOMEvents", function(m) { m.apply(this); (this.hasZoom || this.followTouchMove) && this.batchMSEvents(aU) }); q(bD.prototype, "destroy", function(m) { this.batchMSEvents(bS); m.call(this) }) } var aS = bG.Legend = function(m, p) { this.init(m, p) } ; aS.prototype = { init: function(m, p) { var r = this , s = p.itemStyle , t = p.itemMarginTop || 0; this.options = p; if (p.enabled) { r.itemStyle = s, r.itemHiddenStyle = bW(s, p.itemHiddenStyle), r.itemMarginTop = t, r.padding = s = a4(p.padding, 8), r.initialItemX = s, r.initialItemY = s - 5, r.maxItemWidth = 0, r.chart = m, r.itemHeight = 0, r.symbolWidth = a4(p.symbolWidth, 16), r.pages = [], r.render(), aU(r.chart, "endResize", function() { r.positionCheckboxes() }) } }, colorizeItem: function(m, p) { var r = this.options, s = m.legendItem, t = m.legendLine, u = m.legendSymbol, w = this.itemHiddenStyle.color, r = p ? r.itemStyle.color : w, x = p ? m.legendColor || m.color || "#CCC" : w, w = m.options && m.options.marker, z = { fill: x }, A; s && s.css({ fill: r, color: r }); t && t.attr({ stroke: x }); if (u) { if (w && u.isMarker) { for (A in z.stroke = x, w = m.convertAttribs(w), w) { s = w[A], s !== bw && (z[A] = s) } } u.attr(z) } }, positionItem: function(m) { var p = this.options , r = p.symbolPadding , p = !p.rtl , s = m._legendItemPos , t = s[0] , s = s[1] , u = m.checkbox; m.legendGroup && m.legendGroup.translate(p ? t : this.legendWidth - t - 2 * r - 4, s); if (u) { u.x = t, u.y = s } }, destroyItem: function(m) { var p = m.checkbox; aO(["legendItem", "legendLine", "legendSymbol", "legendGroup"], function(r) { m[r] && (m[r] = m[r].destroy()) }); p && bi(m.checkbox) }, clearItems: function() { var m = this; aO(m.getAllItems(), function(p) { m.destroyItem(p) }) }, destroy: function() { var m = this.group , p = this.box; if (p) { this.box = p.destroy() } if (m) { this.group = m.destroy() } }, positionCheckboxes: function(m) { var p = this.group.alignAttr, r, s = this.clipHeight || this.legendHeight; if (p) { r = p.translateY, aO(this.allItems, function(t) { var u = t.checkbox, w; u && (w = r + u.y + (m || 0) + 3, af(u, { left: p.translateX + t.checkboxOffset + u.x - 20 + "px", top: w + "px", display: w > r - 6 && w < r + s - 6 ? "" : bg })) }) } }, renderTitle: function() { var m = this.padding , p = this.options.title , r = 0; if (p.text) { if (!this.title) { this.title = this.chart.renderer.label(p.text, m - 3, m - 4, null, null, null, null, null, "legend-title").attr({ zIndex: 1 }).css(p.style).add(this.group) } m = this.title.getBBox(); r = m.height; this.offsetWidth = m.width; this.contentGroup.attr({ translateY: r }) } this.titleHeight = r }, renderItem: function(p) { var t = this.chart , u = t.renderer , w = this.options , x = w.layout === "horizontal" , z = this.symbolWidth , A = w.symbolPadding , B = this.itemStyle , D = this.itemHiddenStyle , F = this.padding , G = x ? a4(w.itemDistance, 20) : 0 , H = !w.rtl , J = w.width , K = w.itemMarginBottom || 0 , L = this.itemMarginTop , P = this.initialItemX , I = p.legendItem , N = p.series && p.series.drawLegendSymbol ? p.series : p , O = N.options , O = this.createCheckboxForItem && O && O.showCheckbox , M = w.useHTML; if (!I) { p.legendGroup = u.g("legend-item").attr({ zIndex: 1 }).add(this.scrollGroup); p.legendItem = I = u.text(w.labelFormat ? aB(w.labelFormat, p) : w.labelFormatter.call(p), H ? z + A : -A, this.baseline || 0, M).css(bW(p.visible ? B : D)).attr({ align: H ? "left" : "right", zIndex: 2 }).add(p.legendGroup); if (!this.baseline) { this.fontMetrics = u.fontMetrics(B.fontSize, I), this.baseline = this.fontMetrics.f + 3 + L, I.attr("y", this.baseline) } N.drawLegendSymbol(this, p); this.setItemEvents && this.setItemEvents(p, I, M, B, D); this.colorizeItem(p, p.visible); O && this.createCheckboxForItem(p) } u = I.getBBox(); z = p.checkboxOffset = w.itemWidth || p.legendItemWidth || z + A + u.width + G + (O ? 20 : 0); this.itemHeight = A = bM(p.legendItemHeight || u.height); if (x && this.itemX - P + z > (J || t.chartWidth - 2 * F - P - w.x)) { this.itemX = P, this.itemY += L + this.lastLineHeight + K, this.lastLineHeight = 0 } this.maxItemWidth = bq(this.maxItemWidth, z); this.lastItemY = L + this.itemY + K; this.lastLineHeight = bq(A, this.lastLineHeight); p._legendItemPos = [this.itemX, this.itemY]; x ? this.itemX += z : (this.itemY += L + A + K, this.lastLineHeight = A); this.offsetWidth = J || bq((x ? this.itemX - P - G : z) + F, this.offsetWidth) }, getAllItems: function() { var m = []; aO(this.chart.series, function(p) { var r = p.options; if (a4(r.showInLegend, !bl(r.linkedTo) ? bw : !1, !0)) { m = m.concat(p.legendItems || (r.legendType === "point" ? p.data : p)) } }); return m }, adjustMargins: function(m, p) { var r = this.chart , s = this.options , t = s.align[0] + s.verticalAlign[0] + s.layout[0]; this.display && !s.floating && aO([/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/], function(u, w) { u.test(t) && !bl(m[w]) && (r[ax[w]] = bq(r[ax[w]], r.legend[(w + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][w] * s[w % 2 ? "x" : "y"] + a4(s.margin, 12) + p[w])) }) }, render: function() { var m = this, p = m.chart, r = p.renderer, s = m.group, t, u, w, x, z = m.box, A = m.options, B = m.padding, D = A.borderWidth, F = A.backgroundColor; m.itemX = m.initialItemX; m.itemY = m.initialItemY; m.offsetWidth = 0; m.lastItemY = 0; if (!s) { m.group = s = r.g("legend").attr({ zIndex: 7 }).add(), m.contentGroup = r.g().attr({ zIndex: 1 }).add(s), m.scrollGroup = r.g().add(m.contentGroup) } m.renderTitle(); t = m.getAllItems(); bd(t, function(G, H) { return (G.options && G.options.legendIndex || 0) - (H.options && H.options.legendIndex || 0) }); A.reversed && t.reverse(); m.allItems = t; m.display = u = !!t.length; m.lastLineHeight = 0; aO(t, function(G) { m.renderItem(G) }); w = (A.width || m.offsetWidth) + B; x = m.lastItemY + m.lastLineHeight + m.titleHeight; x = m.handleOverflow(x); x += B; if (D || F) { if (z) { if (w > 0 && x > 0) { z[z.isNew ? "attr" : "animate"](z.crisp({ width: w, height: x })), z.isNew = !1 } } else { m.box = z = r.rect(0, 0, w, x, A.borderRadius, D || 0).attr({ stroke: A.borderColor, "stroke-width": D || 0, fill: F || bg }).add(s).shadow(A.shadow), z.isNew = !0 } z[u ? "show" : "hide"]() } m.legendWidth = w; m.legendHeight = x; aO(t, function(G) { m.positionItem(G) }); u && s.align(bf({ width: w, height: x }, A), !0, "spacingBox"); p.isResizing || this.positionCheckboxes() }, handleOverflow: function(m) { var p = this, r = this.chart, s = r.renderer, t = this.options, u = t.y, u = r.spacingBox.height + (t.verticalAlign === "top" ? -u : u) - this.padding, w = t.maxHeight, x, z = this.clipRect, A = t.navigation, B = a4(A.animation, !0), D = A.arrowSize || 12, F = this.nav, G = this.pages, H, I = this.allItems; t.layout === "horizontal" && (u /= 2); w && (u = au(u, w)); G.length = 0; if (m > u && !t.useHTML) { this.clipHeight = x = bq(u - 20 - this.titleHeight - this.padding, 0); this.currentPage = a4(this.currentPage, 1); this.fullHeight = m; aO(I, function(J, K) { var L = J._legendItemPos[1] , M = bM(J.legendItem.getBBox().height) , N = G.length; if (!N || L - G[N - 1] > x && (H || L) !== G[N - 1]) { G.push(H || L), N++ } K === I.length - 1 && L + M - G[N - 1] > x && G.push(L); L !== H && (H = L) }); if (!z) { z = p.clipRect = s.clipRect(0, this.padding, 9999, 0), p.contentGroup.clip(z) } z.attr({ height: x }); if (!F) { this.nav = F = s.g().attr({ zIndex: 1 }).add(this.group), this.up = s.symbol("triangle", 0, 0, D, D).on("click", function() { p.scroll(-1, B) }).add(F), this.pager = s.text("", 15, 10).css(A.style).add(F), this.down = s.symbol("triangle-down", 0, 0, D, D).on("click", function() { p.scroll(1, B) }).add(F) } p.scroll(0); m = u } else { if (F) { z.attr({ height: r.chartHeight }), F.hide(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0 } } return m }, scroll: function(m, p) { var r = this.pages , s = r.length , t = this.currentPage + m , u = this.clipHeight , w = this.options.navigation , x = w.activeColor , w = w.inactiveColor , z = this.pager , A = this.padding; t > s && (t = s); if (t > 0) { p !== bw && bn(p, this.chart), this.nav.attr({ translateX: A, translateY: u + this.padding + 7 + this.titleHeight, visibility: "visible" }), this.up.attr({ fill: t === 1 ? w : x }).css({ cursor: t === 1 ? "default" : "pointer" }), z.attr({ text: t + "/" + s }), this.down.attr({ x: 18 + this.pager.getBBox().width, fill: t === s ? w : x }).css({ cursor: t === s ? "default" : "pointer" }), r = -r[t - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: r }), this.currentPage = t, this.positionCheckboxes(r) } } }; aW = bG.LegendSymbolMixin = { drawRectangle: function(m, p) { var r = m.options.symbolHeight || m.fontMetrics.f; p.legendSymbol = this.chart.renderer.rect(0, m.baseline - r + 1, m.symbolWidth, r, m.options.symbolRadius || 0).attr({ zIndex: 3 }).add(p.legendGroup) }, drawLineMarker: function(m) { var p = this.options, r = p.marker, s; s = m.symbolWidth; var t = this.chart.renderer, u = this.legendGroup, m = m.baseline - bM(m.fontMetrics.b * 0.3), w; if (p.lineWidth) { w = { "stroke-width": p.lineWidth }; if (p.dashStyle) { w.dashstyle = p.dashStyle } this.legendLine = t.path(["M", 0, m, "L", s, m]).attr(w).add(u) } if (r && r.enabled !== !1) { p = r.radius, this.legendSymbol = s = t.symbol(this.symbol, s / 2 - p, m - p, 2 * p, 2 * p).add(u), s.isMarker = !0 } } }; (/Trident\/7\.0/.test(j) || aL) && q(aS.prototype, "positionItem", function(m, p) { var r = this , s = function() { p._legendItemPos && m.call(r, p) }; s(); setTimeout(s) }); y = bG.Chart = function() { this.init.apply(this, arguments) } ; y.prototype = { callbacks: [], init: function(m, p) { var r, s = m.series; m.series = null; r = bW(a5, m); r.series = m.series = s; this.userOptions = m; s = r.chart; this.margin = this.splashArray("margin", s); this.spacing = this.splashArray("spacing", s); var t = s.events; this.bounds = { h: {}, v: {} }; this.callback = p; this.isResizing = 0; this.options = r; this.axes = []; this.series = []; this.hasCartesianSeries = s.showAxes; var u = this, w; u.index = bN.length; bN.push(u); k++; s.reflow !== !1 && aU(u, "load", function() { u.initReflow() }); if (t) { for (w in t) { aU(u, w, t[w]) } } u.xAxis = []; u.yAxis = []; u.animation = ab ? !1 : a4(s.animation, !0); u.pointCount = u.colorCounter = u.symbolCounter = 0; u.firstRender() }, initSeries: function(m) { var p = this.options.chart; (p = az[m.type || p.type || p.defaultSeriesType]) || aF(17, !0); p = new p; p.init(this, m); return p }, isInsidePlot: function(m, p, r) { var s = r ? p : m , m = r ? m : p; return s >= 0 && s <= this.plotWidth && m >= 0 && m <= this.plotHeight }, redraw: function(m) { var p = this.axes, r = this.series, s = this.pointer, t = this.legend, u = this.isDirtyLegend, w, x, z = this.hasCartesianSeries, A = this.isDirtyBox, B = r.length, D = B, F = this.renderer, G = F.isHidden(), H = []; bn(m, this); G && this.cloneRenderTo(); for (this.layOutTitles(); D--; ) { if (m = r[D], m.options.stacking && (w = !0, m.isDirty)) { x = !0; break } } if (x) { for (D = B; D--; ) { if (m = r[D], m.options.stacking) { m.isDirty = !0 } } } aO(r, function(I) { I.isDirty && I.options.legendType === "point" && (u = !0) }); if (u && t.options.enabled) { t.render(), this.isDirtyLegend = !1 } w && this.getStacks(); if (z && !this.isResizing) { this.maxTicks = null, aO(p, function(I) { I.setScale() }) } this.getMargins(); z && (aO(p, function(I) { I.isDirty && (A = !0) }), aO(p, function(I) { if (I.isDirtyExtremes) { I.isDirtyExtremes = !1, H.push(function() { aP(I, "afterSetExtremes", bf(I.eventArgs, I.getExtremes())); delete I.eventArgs }) } (A || w) && I.redraw() })); A && this.drawChartBox(); aO(r, function(I) { I.isDirty && I.visible && (!I.isCartesian || I.xAxis) && I.redraw() }); s && s.reset(!0); F.draw(); aP(this, "redraw"); G && this.cloneRenderTo(!0); aO(H, function(I) { I.call() }) }, get: function(m) { var p = this.axes, r = this.series, s, t; for (s = 0; s < p.length; s++) { if (p[s].options.id === m) { return p[s] } } for (s = 0; s < r.length; s++) { if (r[s].options.id === m) { return r[s] } } for (s = 0; s < r.length; s++) { t = r[s].points || []; for (p = 0; p < t.length; p++) { if (t[p].id === m) { return t[p] } } } return null }, getAxes: function() { var m = this , p = this.options , r = p.xAxis = bh(p.xAxis || {}) , p = p.yAxis = bh(p.yAxis || {}); aO(r, function(s, t) { s.index = t; s.isX = !0 }); aO(p, function(s, t) { s.index = t }); r = r.concat(p); aO(r, function(s) { new bC(m,s) }) }, getSelectedPoints: function() { var m = []; aO(this.series, function(p) { m = m.concat(aH(p.points || [], function(r) { return r.selected })) }); return m }, getSelectedSeries: function() { return aH(this.series, function(m) { return m.selected }) }, getStacks: function() { var m = this; aO(m.yAxis, function(p) { if (p.stacks && p.hasVisibleSeries) { p.oldStacks = p.stacks } }); aO(m.series, function(p) { if (p.options.stacking && (p.visible === !0 || m.options.chart.ignoreHiddenSeries === !1)) { p.stackKey = p.type + a4(p.options.stack, "") } }) }, setTitle: function(m, p, r) { var w; var s = this, t = s.options, u; u = t.title = bW(t.title, m); w = t.subtitle = bW(t.subtitle, p), t = w; aO([["title", m, u], ["subtitle", p, t]], function(x) { var z = x[0] , A = s[z] , B = x[1] , x = x[2]; A && B && (s[z] = A = A.destroy()); x && x.text && !A && (s[z] = s.renderer.text(x.text, 0, 0, x.useHTML).attr({ align: x.align, "class": "highcharts-" + z, zIndex: x.zIndex || 4 }).css(x.style).add()) }); s.layOutTitles(r) }, layOutTitles: function(m) { var p = 0 , r = this.title , s = this.subtitle , t = this.options , u = t.title , t = t.subtitle , w = this.renderer , x = this.spacingBox.width - 44; if (r && (r.css({ width: (u.width || x) + "px" }).align(bf({ y: w.fontMetrics(u.style.fontSize, r).b - 3 }, u), !1, "spacingBox"), !u.floating && !u.verticalAlign)) { p = r.getBBox().height } s && (s.css({ width: (t.width || x) + "px" }).align(bf({ y: p + (u.margin - 13) + w.fontMetrics(u.style.fontSize, s).b }, t), !1, "spacingBox"), !t.floating && !t.verticalAlign && (p = bm(p + s.getBBox().height))); r = this.titleOffset !== p; this.titleOffset = p; if (!this.isDirtyBox && r) { this.isDirtyBox = r, this.hasRendered && a4(m, !0) && this.isDirtyBox && this.redraw() } }, getChartSize: function() { var m = this.options.chart , p = m.width , m = m.height , r = this.renderToClone || this.renderTo; if (!bl(p)) { this.containerWidth = aC(r, "width") } if (!bl(m)) { this.containerHeight = aC(r, "height") } this.chartWidth = bq(0, p || this.containerWidth || 600); this.chartHeight = bq(0, a4(m, this.containerHeight > 19 ? this.containerHeight : 400)) }, cloneRenderTo: function(m) { var p = this.renderToClone , r = this.container; m ? p && (this.renderTo.appendChild(r), bi(p), delete this.renderToClone) : (r && r.parentNode === this.renderTo && this.renderTo.removeChild(r), this.renderToClone = p = this.renderTo.cloneNode(0), af(p, { position: "absolute", top: "-9999px", display: "block" }), p.style.setProperty && p.style.setProperty("display", "block", "important"), c.body.appendChild(p), r && p.appendChild(r)) }, getContainer: function() { var m, p = this.options.chart, r, s, t; this.renderTo = m = p.renderTo; t = "highcharts-" + bV++; if (E(m)) { this.renderTo = m = c.getElementById(m) } m || aF(13, !0); r = h(aJ(m, "data-highcharts-chart")); !isNaN(r) && bN[r] && bN[r].hasRendered && bN[r].destroy(); aJ(m, "data-highcharts-chart", this.index); m.innerHTML = ""; !p.skipClone && !m.offsetWidth && this.cloneRenderTo(); this.getChartSize(); r = this.chartWidth; s = this.chartHeight; this.container = m = bX(aG, { className: "highcharts-container" + (p.className ? " " + p.className : ""), id: t }, bf({ position: "relative", overflow: "hidden", width: r + "px", height: s + "px", textAlign: "left", lineHeight: "normal", zIndex: 0, "-webkit-tap-highlight-color": "rgba(0,0,0,0)" }, p.style), this.renderToClone || m); this._cursor = m.style.cursor; this.renderer = p.forExport ? new bs(m,r,s,p.style,!0) : new b(m,r,s,p.style); ab && this.renderer.create(this, m, r, s); this.renderer.chartIndex = this.index }, getMargins: function(m) { var p = this.spacing , r = this.margin , s = this.titleOffset; this.resetMargins(); if (s && !bl(r[0])) { this.plotTop = bq(this.plotTop, s + this.options.title.margin + p[0]) } this.legend.adjustMargins(r, p); this.extraBottomMargin && (this.marginBottom += this.extraBottomMargin); this.extraTopMargin && (this.plotTop += this.extraTopMargin); m || this.getAxisMargins() }, getAxisMargins: function() { var m = this , p = m.axisOffset = [0, 0, 0, 0] , r = m.margin; m.hasCartesianSeries && aO(m.axes, function(s) { s.getOffset() }); aO(ax, function(s, t) { bl(r[t]) || (m[s] += p[t]) }); m.setChartSize() }, reflow: function(m) { var p = this , r = p.options.chart , s = p.renderTo , t = r.width || aC(s, "width") , u = r.height || aC(s, "height") , r = m ? m.target : ao , s = function() { if (p.container) { p.setSize(t, u, !1), p.hasUserSize = null } }; if (!p.hasUserSize && !p.isPrinting && t && u && (r === ao || r === c)) { if (t !== p.containerWidth || u !== p.containerHeight) { clearTimeout(p.reflowTimeout), m ? p.reflowTimeout = setTimeout(s, 100) : s() } p.containerWidth = t; p.containerHeight = u } }, initReflow: function() { var m = this , p = function(r) { m.reflow(r) }; aU(ao, "resize", p); aU(m, "destroy", function() { bS(ao, "resize", p) }) }, setSize: function(m, p, r) { var s = this, t, u, w; s.isResizing += 1; w = function() { s && aP(s, "endResize", null, function() { s.isResizing -= 1 }) } ; bn(r, s); s.oldChartHeight = s.chartHeight; s.oldChartWidth = s.chartWidth; if (bl(m)) { s.chartWidth = t = bq(0, bM(m)), s.hasUserSize = !!t } if (bl(p)) { s.chartHeight = u = bq(0, bM(p)) } (bY ? aM : af)(s.container, { width: t + "px", height: u + "px" }, bY); s.setChartSize(!0); s.renderer.setSize(t, u, r); s.maxTicks = null; aO(s.axes, function(x) { x.isDirty = !0; x.setScale() }); aO(s.series, function(x) { x.isDirty = !0 }); s.isDirtyLegend = !0; s.isDirtyBox = !0; s.layOutTitles(); s.getMargins(); s.redraw(r); s.oldChartHeight = null; aP(s, "resize"); bY === !1 ? w() : setTimeout(w, bY && bY.duration || 500) }, setChartSize: function(m) { var p = this.inverted, r = this.renderer, s = this.chartWidth, t = this.chartHeight, u = this.options.chart, w = this.spacing, x = this.clipOffset, z, A, B, D; this.plotLeft = z = bM(this.plotLeft); this.plotTop = A = bM(this.plotTop); this.plotWidth = B = bq(0, bM(s - z - this.marginRight)); this.plotHeight = D = bq(0, bM(t - A - this.marginBottom)); this.plotSizeX = p ? D : B; this.plotSizeY = p ? B : D; this.plotBorderWidth = u.plotBorderWidth || 0; this.spacingBox = r.spacingBox = { x: w[3], y: w[0], width: s - w[3] - w[1], height: t - w[0] - w[2] }; this.plotBox = r.plotBox = { x: z, y: A, width: B, height: D }; s = 2 * bx(this.plotBorderWidth / 2); p = bm(bq(s, x[3]) / 2); r = bm(bq(s, x[0]) / 2); this.clipBox = { x: p, y: r, width: bx(this.plotSizeX - bq(s, x[1]) / 2 - p), height: bq(0, bx(this.plotSizeY - bq(s, x[2]) / 2 - r)) }; m || aO(this.axes, function(F) { F.setAxisSize(); F.setAxisTranslation() }) }, resetMargins: function() { var m = this; aO(ax, function(p, r) { m[p] = a4(m.margin[r], m.spacing[r]) }); m.axisOffset = [0, 0, 0, 0]; m.clipOffset = [0, 0, 0, 0] }, drawChartBox: function() { var u = this.options.chart, w = this.renderer, x = this.chartWidth, z = this.chartHeight, A = this.chartBackground, B = this.plotBackground, D = this.plotBorder, F = this.plotBGImage, G = u.borderWidth || 0, H = u.backgroundColor, I = u.plotBackgroundColor, J = u.plotBackgroundImage, L = u.plotBorderWidth || 0, M, O = this.plotLeft, N = this.plotTop, K = this.plotWidth, Q = this.plotHeight, T = this.plotBox, P = this.clipRect, R = this.clipBox; M = G + (u.shadow ? 8 : 0); if (G || H) { if (A) { A.animate(A.crisp({ width: x - M, height: z - M })) } else { A = { fill: H || bg }; if (G) { A.stroke = u.borderColor, A["stroke-width"] = G } this.chartBackground = w.rect(M / 2, M / 2, x - M, z - M, u.borderRadius, G).attr(A).addClass("highcharts-background").add().shadow(u.shadow) } } if (I) { B ? B.animate(T) : this.plotBackground = w.rect(O, N, K, Q, 0).attr({ fill: I }).add().shadow(u.plotShadow) } if (J) { F ? F.animate(T) : this.plotBGImage = w.image(J, O, N, K, Q).add() } P ? P.animate({ width: R.width, height: R.height }) : this.clipRect = w.clipRect(R); if (L) { D ? D.animate(D.crisp({ x: O, y: N, width: K, height: Q, strokeWidth: -L })) : this.plotBorder = w.rect(O, N, K, Q, 0, -L).attr({ stroke: u.plotBorderColor, "stroke-width": L, fill: bg, zIndex: 1 }).add() } this.isDirtyBox = !1 }, propFromSeries: function() { var m = this, p = m.options.chart, r, s = m.options.series, t, u; aO(["inverted", "angular", "polar"], function(w) { r = az[p.type || p.defaultSeriesType]; u = m[w] || p[w] || r && r.prototype[w]; for (t = s && s.length; !u && t--; ) { (r = az[s[t].type]) && r.prototype[w] && (u = !0) } m[w] = u }) }, linkSeries: function() { var m = this , p = m.series; aO(p, function(r) { r.linkedSeries.length = 0 }); aO(p, function(r) { var s = r.options.linkedTo; if (E(s) && (s = s === ":previous" ? m.series[r.index - 1] : m.get(s))) { s.linkedSeries.push(r), r.linkedParent = s } }) }, renderSeries: function() { aO(this.series, function(m) { m.translate(); m.render() }) }, renderLabels: function() { var m = this , p = m.options.labels; p.items && aO(p.items, function(r) { var s = bf(p.style, r.style) , t = h(s.left) + m.plotLeft , u = h(s.top) + m.plotTop + 12; delete s.left; delete s.top; m.renderer.text(r.html, t, u).attr({ zIndex: 2 }).css(s).add() }) }, render: function() { var m = this.axes, p = this.renderer, r = this.options, s, t, u, w; this.setTitle(); this.legend = new aS(this,r.legend); this.getStacks(); this.getMargins(!0); this.setChartSize(); s = this.plotWidth; t = this.plotHeight -= 13; aO(m, function(x) { x.setScale() }); this.getAxisMargins(); u = s / this.plotWidth > 1.1; w = t / this.plotHeight > 1.1; if (u || w) { this.maxTicks = null, aO(m, function(x) { (x.horiz && u || !x.horiz && w) && x.setTickInterval(!0) }), this.getMargins() } this.drawChartBox(); this.hasCartesianSeries && aO(m, function(x) { x.render() }); if (!this.seriesGroup) { this.seriesGroup = p.g("series-group").attr({ zIndex: 3 }).add() } this.renderSeries(); this.renderLabels(); this.showCredits(r.credits); this.hasRendered = !0 }, showCredits: function(m) { if (m.enabled && !this.credits) { this.credits = this.renderer.text(m.text, 0, 0).on("click", function() { if (m.href) { location.href = m.href } }).attr({ align: m.position.align, zIndex: 8 }).css(m.style).add().align(m.position) } }, destroy: function() { var m = this, p = m.axes, r = m.series, s = m.container, t, u = s && s.parentNode; aP(m, "destroy"); bN[m.index] = bw; k--; m.renderTo.removeAttribute("data-highcharts-chart"); bS(m); for (t = p.length; t--; ) { p[t] = p[t].destroy() } for (t = r.length; t--; ) { r[t] = r[t].destroy() } aO("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","), function(w) { var x = m[w]; x && x.destroy && (m[w] = x.destroy()) }); if (s) { s.innerHTML = "", bS(s), u && bi(s) } for (t in m) { delete m[t] } }, isReadyToRender: function() { var m = this; return !i && ao == ao.top && c.readyState !== "complete" || ab && !ao.canvg ? (ab ? aN.push(function() { m.firstRender() }, m.options.global.canvasToolsURL) : c.attachEvent("onreadystatechange", function() { c.detachEvent("onreadystatechange", m.firstRender); c.readyState === "complete" && m.firstRender() }), !1) : !0 }, firstRender: function() { var m = this , p = m.options , r = m.callback; if (m.isReadyToRender()) { m.getContainer(); aP(m, "init"); m.resetMargins(); m.setChartSize(); m.propFromSeries(); m.getAxes(); aO(p.series || [], function(s) { m.initSeries(s) }); m.linkSeries(); aP(m, "beforeRender"); if (bG.Pointer) { m.pointer = new bD(m,p) } m.render(); m.renderer.draw(); r && r.apply(m, [m]); aO(m.callbacks, function(s) { m.index !== bw && s.apply(m, [m]) }); aP(m, "load"); m.cloneRenderTo(!0) } }, splashArray: function(m, p) { var r = p[m] , r = n(r) ? r : [r, r, r, r]; return [a4(p[m + "Top"], r[0]), a4(p[m + "Right"], r[1]), a4(p[m + "Bottom"], r[2]), a4(p[m + "Left"], r[3])] } }; var bR = bG.CenteredSeriesMixin = { getCenter: function() { var m = this.options, p = this.chart, r = 2 * (m.slicedOffset || 0), s = p.plotWidth - 2 * r, p = p.plotHeight - 2 * r, t = m.center, t = [a4(t[0], "50%"), a4(t[1], "50%"), m.size || "100%", m.innerSize || 0], u = au(s, p), w, x, z; for (x = 0; x < 4; ++x) { z = t[x], w = /%$/.test(z), m = x < 2 || x === 2 && w, t[x] = (w ? [s, p, u, t[2]][x] * h(z) / 100 : h(z)) + (m ? r : 0) } return t } } , al = function() {}; al.prototype = { init: function(m, p, r) { this.series = m; this.color = m.color; this.applyOptions(p, r); this.pointAttr = {}; if (m.options.colorByPoint && (p = m.options.colors || m.chart.options.colors, this.color = this.color || p[m.colorCounter++], m.colorCounter === p.length)) { m.colorCounter = 0 } m.chart.pointCount++; return this }, applyOptions: function(m, p) { var r = this.series , s = r.options.pointValKey || r.pointValKey , m = al.prototype.optionsToObject.call(this, m); bf(this, m); this.options = this.options ? bf(this.options, m) : m; if (s) { this.y = this[s] } if (this.x === bw && r) { this.x = p === bw ? r.autoIncrement() : p } return this }, optionsToObject: function(m) { var p = {} , r = this.series , s = r.options.keys , t = s || r.pointArrayMap || ["y"] , u = t.length , w = 0 , x = 0; if (typeof m === "number" || m === null) { p[t[0]] = m } else { if (aq(m)) { if (!s && m.length > u) { r = typeof m[0]; if (r === "string") { p.name = m[0] } else { if (r === "number") { p.x = m[0] } } w++ } for (; x < u; ) { p[t[x++]] = m[w++] } } else { if (typeof m === "object") { p = m; if (m.dataLabels) { r._hasPointLabels = !0 } if (m.marker) { r._hasPointMarkers = !0 } } } } return p }, destroy: function() { var m = this.series.chart, p = m.hoverPoints, r; m.pointCount--; if (p && (this.setState(), av(p, this), !p.length)) { m.hoverPoints = null } if (this === m.hoverPoint) { this.onMouseOut() } if (this.graphic || this.dataLabel) { bS(this), this.destroyElements() } this.legendItem && m.legend.destroyItem(this); for (r in this) { this[r] = null } }, destroyElements: function() { for (var m = "graphic,dataLabel,dataLabelUpper,group,connector,shadowGroup".split(","), p, r = 6; r--; ) { p = m[r], this[p] && (this[p] = this[p].destroy()) } }, getLabelConfig: function() { return { x: this.category, y: this.y, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage, total: this.total || this.stackTotal } }, tooltipFormatter: function(m) { var p = this.series , r = p.tooltipOptions , s = a4(r.valueDecimals, "") , t = r.valuePrefix || "" , u = r.valueSuffix || ""; aO(p.pointArrayMap || ["y"], function(w) { w = "{point." + w; if (t || u) { m = m.replace(w + "}", t + w + "}" + u) } m = m.replace(w + "}", w + ":,." + s + "f}") }); return aB(m, { point: this, series: this.series }) }, firePointEvent: function(m, p, r) { var s = this , t = this.series.options; (t.point.events[m] || s.options && s.options.events && s.options.events[m]) && this.importEvents(); m === "click" && t.allowPointSelect && (r = function(u) { s.select(null, u.ctrlKey || u.metaKey || u.shiftKey) } ); aP(this, m, p, r) } }; var ba = bG.Series = function() {} ; ba.prototype = { isCartesian: !0, type: "line", pointClass: al, sorted: !0, requireSorting: !0, pointAttrToOptions: { stroke: "lineColor", "stroke-width": "lineWidth", fill: "fillColor", r: "radius" }, axisTypes: ["xAxis", "yAxis"], colorCounter: 0, parallelArrays: ["x", "y"], init: function(m, p) { var r = this, s, t, u = m.series, w = function(x, z) { return a4(x.options.index, x._i) - a4(z.options.index, z._i) }; r.chart = m; r.options = p = r.setOptions(p); r.linkedSeries = []; r.bindAxes(); bf(r, { name: p.name, state: "", pointAttr: {}, visible: p.visible !== !1, selected: p.selected === !0 }); if (ab) { p.animation = !1 } t = p.events; for (s in t) { aU(r, s, t[s]) } if (t && t.click || p.point && p.point.events && p.point.events.click || p.allowPointSelect) { m.runTrackerClick = !0 } r.getColor(); r.getSymbol(); aO(r.parallelArrays, function(x) { r[x + "Data"] = [] }); r.setData(p.data, !1); if (r.isCartesian) { m.hasCartesianSeries = !0 } u.push(r); r._i = u.length - 1; bd(u, w); this.yAxis && bd(this.yAxis.series, w); aO(u, function(x, z) { x.index = z; x.name = x.name || "Series " + (z + 1) }) }, bindAxes: function() { var m = this, p = m.options, r = m.chart, s; aO(m.axisTypes || [], function(t) { aO(r[t], function(u) { s = u.options; if (p[t] === s.index || p[t] !== bw && p[t] === s.id || p[t] === bw && s.index === 0) { u.series.push(m), m[t] = u, u.isDirty = !0 } }); !m[t] && m.optionalAxis !== t && aF(18, !0) }) }, updateParallelArrays: function(m, p) { var r = m.series , s = arguments; aO(r.parallelArrays, typeof p === "number" ? function(t) { var u = t === "y" && r.toYData ? r.toYData(m) : m[t]; r[t + "Data"][p] = u } : function(t) { Array.prototype[p].apply(r[t + "Data"], Array.prototype.slice.call(s, 2)) } ) }, autoIncrement: function() { var m = this.options, p = this.xIncrement, r, s = m.pointIntervalUnit, p = a4(p, m.pointStart, 0); this.pointInterval = r = a4(this.pointInterval, m.pointInterval, 1); if (s === "month" || s === "year") { m = new e(p), m = s === "month" ? +m[bE](m[bU]() + r) : +m[bK](m[bZ]() + r), r = m - p } this.xIncrement = p + r; return p }, getSegments: function() { var m = -1, p = [], r, s = this.points, t = s.length; if (t) { if (this.options.connectNulls) { for (r = t; r--; ) { s[r].y === null && s.splice(r, 1) } s.length && (p = [s]) } else { aO(s, function(u, w) { u.y === null ? (w > m + 1 && p.push(s.slice(m + 1, w)), m = w) : w === t - 1 && p.push(s.slice(m + 1, w + 1)) }) } } this.segments = p }, setOptions: function(m) { var p = this.chart , r = p.options.plotOptions , p = p.userOptions || {} , s = p.plotOptions || {} , t = r[this.type]; this.userOptions = m; r = bW(t, r.series, m); this.tooltipOptions = bW(a5.tooltip, a5.plotOptions[this.type].tooltip, p.tooltip, s.series && s.series.tooltip, s[this.type] && s[this.type].tooltip, m.tooltip); t.marker === null && delete r.marker; this.zoneAxis = r.zoneAxis; m = this.zones = (r.zones || []).slice(); if ((r.negativeColor || r.negativeFillColor) && !r.zones) { m.push({ value: r[this.zoneAxis + "Threshold"] || r.threshold || 0, color: r.negativeColor, fillColor: r.negativeFillColor }) } m.length && bl(m[m.length - 1].value) && m.push({ color: this.color, fillColor: this.fillColor }); return r }, getCyclic: function(m, p, r) { var s = this.userOptions , t = "_" + m + "Index" , u = m + "Counter"; p || (bl(s[t]) ? p = s[t] : (s[t] = p = this.chart[u] % r.length, this.chart[u] += 1), p = r[p]); this[m] = p }, getColor: function() { this.options.colorByPoint || this.getCyclic("color", this.options.color || d[this.type].color, this.chart.options.colors) }, getSymbol: function() { var m = this.options.marker; this.getCyclic("symbol", m.symbol, this.chart.options.symbols); if (/^url/.test(this.symbol)) { m.radius = 0 } }, drawLegendSymbol: aW.drawLineMarker, setData: function(m, p, r, t) { var u = this, w = u.points, x = w && w.length || 0, z, A = u.options, B = u.chart, D = null, F = u.xAxis, G = F && !!F.categories, H = A.turboThreshold, I = this.xData, K = this.yData, J = (z = u.pointArrayMap) && z.length, m = m || []; z = m.length; p = a4(p, !0); if (t !== !1 && z && x === z && !u.cropped && !u.hasGroupedData && u.visible) { aO(m, function(s, L) { w[L].update(s, !1, null, !1) }) } else { u.xIncrement = null; u.pointRange = G ? 1 : A.pointRange; u.colorCounter = 0; aO(this.parallelArrays, function(s) { u[s + "Data"].length = 0 }); if (H && z > H) { for (r = 0; D === null && r < z; ) { D = m[r], r++ } if (bb(D)) { G = a4(A.pointStart, 0); A = a4(A.pointInterval, 1); for (r = 0; r < z; r++) { I[r] = G, K[r] = m[r], G += A } u.xIncrement = G } else { if (aq(D)) { if (J) { for (r = 0; r < z; r++) { A = m[r], I[r] = A[0], K[r] = A.slice(1, J + 1) } } else { for (r = 0; r < z; r++) { A = m[r], I[r] = A[0], K[r] = A[1] } } } else { aF(12) } } } else { for (r = 0; r < z; r++) { if (m[r] !== bw && (A = { series: u }, u.pointClass.prototype.applyOptions.apply(A, [m[r]]), u.updateParallelArrays(A, r), G && A.name)) { F.names[A.x] = A.name } } } E(K[0]) && aF(14, !0); u.data = []; u.options.data = m; for (r = x; r--; ) { w[r] && w[r].destroy && w[r].destroy() } if (F) { F.minRange = F.userMinRange } u.isDirty = u.isDirtyData = B.isDirtyBox = !0; r = !1 } p && B.redraw(r) }, processData: function(m) { var p = this.xData, r = this.yData, s = p.length, t; t = 0; var u, w, x = this.xAxis, z, A = this.options; z = A.cropThreshold; var B = this.isCartesian, D, F; if (B && !this.isDirty && !x.isDirty && !this.yAxis.isDirty && !m) { return !1 } if (x) { m = x.getExtremes(), D = m.min, F = m.max } if (B && this.sorted && (!z || s > z || this.forceCrop)) { if (p[s - 1] < D || p[0] > F) { p = [], r = [] } else { if (p[0] < D || p[s - 1] > F) { t = this.cropData(this.xData, this.yData, D, F), p = t.xData, r = t.yData, t = t.start, u = !0 } } } for (z = p.length - 1; z >= 0; z--) { s = p[z] - p[z - 1], s > 0 && (w === bw || s < w) ? w = s : s < 0 && this.requireSorting && aF(15) } this.cropped = u; this.cropStart = t; this.processedXData = p; this.processedYData = r; if (A.pointRange === null) { this.pointRange = w || 1 } this.closestPointRange = w }, cropData: function(m, p, r, s) { var t = m.length, u = 0, w = t, x = a4(this.cropShoulder, 1), z; for (z = 0; z < t; z++) { if (m[z] >= r) { u = bq(0, z - x); break } } for (; z < t; z++) { if (m[z] > s) { w = z + x; break } } return { xData: m.slice(u, w), yData: p.slice(u, w), start: u, end: w } }, generatePoints: function() { var m = this.options.data, p = this.data, r, s = this.processedXData, t = this.processedYData, u = this.pointClass, w = s.length, x = this.cropStart || 0, z, A = this.hasGroupedData, B, D = [], F; if (!p && !A) { p = [], p.length = m.length, p = this.data = p } for (F = 0; F < w; F++) { z = x + F, A ? D[F] = (new u).init(this, [s[F]].concat(bh(t[F]))) : (p[z] ? B = p[z] : m[z] !== bw && (p[z] = B = (new u).init(this, m[z], s[F])), D[F] = B), D[F].index = z } if (p && (w !== (r = p.length) || A)) { for (F = 0; F < r; F++) { if (F === x && !A && (F += w), p[F]) { p[F].destroyElements(), p[F].plotX = bw } } } this.data = p; this.points = D }, getExtremes: function(m) { var p = this.yAxis, r = this.processedXData, s, t = [], u = 0; s = this.xAxis.getExtremes(); var w = s.min, x = s.max, z, A, B, D, m = m || this.stackedYData || this.processedYData; s = m.length; for (D = 0; D < s; D++) { if (A = r[D], B = m[D], z = B !== null && B !== bw && (!p.isLog || B.length || B > 0), A = this.getExtremesFromAll || this.cropped || (r[D + 1] || A) >= w && (r[D - 1] || A) <= x, z && A) { if (z = B.length) { for (; z--; ) { B[z] !== null && (t[u++] = B[z]) } } else { t[u++] = B } } } this.dataMin = a7(t); this.dataMax = ag(t) }, translate: function() { this.processedXData || this.processData(); this.generatePoints(); for (var p = this.options, s = p.stacking, t = this.xAxis, w = t.categories, x = this.yAxis, z = this.points, A = z.length, B = !!this.modifyValue, D = p.pointPlacement, F = D === "between" || bb(D), G = p.threshold, H, J, K, L = Number.MAX_VALUE, p = 0; p < A; p++) { var I = z[p] , M = I.x , u = I.y; J = I.low; var N = s && x.stacks[(this.negStacks && u < G ? "-" : "") + this.stackKey]; if (x.isLog && u !== null && u <= 0) { I.y = u = null, aF(10) } I.plotX = H = t.translate(M, 0, 0, 0, 1, D, this.type === "flags"); if (s && this.visible && N && N[M]) { N = N[M], u = N.points[this.index + "," + p], J = u[0], u = u[1], J === 0 && (J = a4(G, x.min)), x.isLog && J <= 0 && (J = null), I.total = I.stackTotal = N.total, I.percentage = N.total && I.y / N.total * 100, I.stackY = u, N.setOffset(this.pointXOffset || 0, this.barW || 0) } I.yBottom = bl(J) ? x.translate(J, 0, 1, 0, 1) : null; B && (u = this.modifyValue(u, I)); I.plotY = J = typeof u === "number" && u !== Infinity ? au(bq(-100000, x.translate(u, 0, 1, 0, 1)), 100000) : bw; I.isInside = J !== bw && J >= 0 && J <= x.len && H >= 0 && H <= t.len; I.clientX = F ? t.translate(M, 0, 0, 0, 1) : H; I.negative = I.y < (G || 0); I.category = w && w[I.x] !== bw ? w[I.x] : I.x; p && (L = au(L, aZ(H - K))); K = H } this.closestPointRangePx = L; this.getSegments() }, setClip: function(m) { var p = this.chart , r = p.renderer , s = p.inverted , t = this.clipBox , u = t || p.clipBox , w = this.sharedClipKey || ["_sharedClip", m && m.duration, m && m.easing, u.height].join(",") , x = p[w] , z = p[w + "m"]; if (!x) { if (m) { u.width = 0, p[w + "m"] = z = r.clipRect(-99, s ? -p.plotLeft : -p.plotTop, 99, s ? p.chartWidth : p.chartHeight) } p[w] = x = r.clipRect(u) } m && (x.count += 1); if (this.options.clip !== !1) { this.group.clip(m || t ? x : p.clipRect), this.markerGroup.clip(z), this.sharedClipKey = w } m || (x.count -= 1, x.count <= 0 && w && p[w] && (t || (p[w] = p[w].destroy()), p[w + "m"] && (p[w + "m"] = p[w + "m"].destroy()))) }, animate: function(m) { var p = this.chart, r = this.options.animation, s; if (r && !n(r)) { r = d[this.type].animation } m ? this.setClip(r) : (s = this.sharedClipKey, (m = p[s]) && m.animate({ width: p.plotSizeX }, r), p[s + "m"] && p[s + "m"].animate({ width: p.plotSizeX + 99 }, r), this.animate = null) }, afterAnimate: function() { this.setClip(); aP(this, "afterAnimate") }, drawPoints: function() { var p, r = this.points, u = this.chart, w, x, z, A, B, D, F, G, H = this.options.marker, J = this.pointAttr[""], K, L, I, M = this.markerGroup, N = a4(H.enabled, this.xAxis.isRadial, this.closestPointRangePx > 2 * H.radius); if (H.enabled !== !1 || this._hasPointMarkers) { for (z = r.length; z--; ) { if (A = r[z], w = bx(A.plotX), x = A.plotY, G = A.graphic, K = A.marker || {}, L = !!A.marker, p = N && K.enabled === bw || K.enabled, I = A.isInside, p && x !== bw && !isNaN(x) && A.y !== null) { if (p = A.pointAttr[A.selected ? "select" : ""] || J, B = p.r, D = a4(K.symbol, this.symbol), F = D.indexOf("url") === 0, G) { G[I ? "show" : "hide"](!0).animate(bf({ x: w - B, y: x - B }, G.symbolName ? { width: 2 * B, height: 2 * B } : {})) } else { if (I && (B > 0 || F)) { A.graphic = u.renderer.symbol(D, w - B, x - B, 2 * B, 2 * B, L ? K : H).attr(p).add(M) } } } else { if (G) { A.graphic = G.destroy() } } } } }, convertAttribs: function(m, p, r, s) { var t = this.pointAttrToOptions, u, w, x = {}, m = m || {}, p = p || {}, r = r || {}, s = s || {}; for (u in t) { w = t[u], x[u] = a4(m[w], p[u], r[u], s[u]) } return x }, getAttribs: function() { var m = this, r = m.options, s = d[m.type].marker ? r.marker : r, w = s.states, x = w.hover, z, A = m.color, B = m.options.negativeColor; z = { stroke: A, fill: A }; var D = m.points || [], F, G = [], H, I = m.pointAttrToOptions; H = m.hasPointSpecificOptions; var J = s.lineColor , L = s.fillColor; F = r.turboThreshold; var K = m.zones, M = m.zoneAxis || "y", u; r.marker ? (x.radius = x.radius || s.radius + x.radiusPlus, x.lineWidth = x.lineWidth || s.lineWidth + x.lineWidthPlus) : (x.color = x.color || aV(x.color || A).brighten(x.brightness).get(), x.negativeColor = x.negativeColor || aV(x.negativeColor || B).brighten(x.brightness).get()); G[""] = m.convertAttribs(s, z); aO(["hover", "select"], function(p) { G[p] = m.convertAttribs(w[p], G[""]) }); m.pointAttr = G; A = D.length; if (!F || A < F || H) { for (; A--; ) { F = D[A]; if ((s = F.options && F.options.marker || F.options) && s.enabled === !1) { s.radius = 0 } if (K.length) { H = 0; for (z = K[H]; F[M] >= z.value; ) { z = K[++H] } F.color = F.fillColor = z.color } H = r.colorByPoint || F.color; if (F.options) { for (u in I) { bl(s[I[u]]) && (H = !0) } } if (H) { s = s || {}; H = []; w = s.states || {}; z = w.hover = w.hover || {}; if (!r.marker) { z.color = z.color || !F.options.color && x[F.negative && B ? "negativeColor" : "color"] || aV(F.color).brighten(z.brightness || x.brightness).get() } z = { color: F.color }; if (!L) { z.fillColor = F.color } if (!J) { z.lineColor = F.color } s.hasOwnProperty("color") && !s.color && delete s.color; H[""] = m.convertAttribs(bf(z, s), G[""]); H.hover = m.convertAttribs(w.hover, G.hover, H[""]); H.select = m.convertAttribs(w.select, G.select, H[""]) } else { H = G } F.pointAttr = H } } }, destroy: function() { var m = this, p = m.chart, r = /AppleWebKit\/533/.test(j), s, t = m.data || [], u, w, x; aP(m, "destroy"); bS(m); aO(m.axisTypes || [], function(z) { if (x = m[z]) { av(x.series, m), x.isDirty = x.forceRedraw = !0 } }); m.legendItem && m.chart.legend.destroyItem(m); for (s = t.length; s--; ) { (u = t[s]) && u.destroy && u.destroy() } m.points = null; clearTimeout(m.animationTimeout); for (w in m) { m[w]instanceof aE && !m[w].survive && (s = r && w === "group" ? "hide" : "destroy", m[w][s]()) } if (p.hoverSeries === m) { p.hoverSeries = null } av(p.series, m); for (w in m) { delete m[w] } }, getSegmentPath: function(m) { var p = this , r = [] , s = p.options.step; aO(m, function(t, u) { var w = t.plotX, x = t.plotY, z; p.getPointSpline ? r.push.apply(r, p.getPointSpline(m, t, u)) : (r.push(u ? "L" : "M"), s && u && (z = m[u - 1], s === "right" ? r.push(z.plotX, x) : s === "center" ? r.push((z.plotX + w) / 2, z.plotY, (z.plotX + w) / 2, x) : r.push(w, z.plotY)), r.push(t.plotX, t.plotY)) }); return r }, getGraphPath: function() { var m = this, p = [], r, s = []; aO(m.segments, function(t) { r = m.getSegmentPath(t); t.length > 1 ? p = p.concat(r) : s.push(t[0]) }); m.singlePoints = s; return m.graphPath = p }, drawGraph: function() { var m = this , p = this.options , r = [["graph", p.lineColor || this.color, p.dashStyle]] , s = p.lineWidth , t = p.linecap !== "square" , u = this.getGraphPath() , w = this.fillGraph && this.color || bg; aO(this.zones, function(x, z) { r.push(["zoneGraph" + z, x.color || m.color, x.dashStyle || p.dashStyle]) }); aO(r, function(x, z) { var A = x[0] , B = m[A]; if (B) { S(B), B.animate({ d: u }) } else { if ((s || w) && u.length) { B = { stroke: x[1], "stroke-width": s, fill: w, zIndex: 1 }, x[2] ? B.dashstyle = x[2] : t && (B["stroke-linecap"] = B["stroke-linejoin"] = "round"), m[A] = m.chart.renderer.path(u).attr(B).add(m.group).shadow(z < 2 && p.shadow) } } }) }, applyZones: function() { var m = this, p = this.chart, r = p.renderer, s = this.zones, t, u, w = this.clips || [], x, z = this.graph, A = this.area, B = bq(p.chartWidth, p.chartHeight), D = this[(this.zoneAxis || "y") + "Axis"], F = D.reversed, G = D.horiz, H = !1; if (s.length && (z || A)) { z && z.hide(), A && A.hide(), aO(s, function(I, J) { t = a4(u, F ? G ? p.plotWidth : 0 : G ? 0 : D.toPixels(D.min)); u = bM(D.toPixels(a4(I.value, D.max), !0)); t = D.isXAxis ? t > u ? u : t : t < u ? u : t; H && (t = u = D.toPixels(D.max)); if (D.isXAxis) { if (x = { x: F ? u : t, y: 0, width: Math.abs(t - u), height: B }, !G) { x.x = p.plotHeight - x.x } } else { if (x = { x: 0, y: F ? t : u, width: B, height: Math.abs(t - u) }, G) { x.y = p.plotWidth - x.y } } p.inverted && r.isVML && (x = D.isXAxis ? { x: 0, y: F ? t : u, height: x.width, width: p.chartWidth } : { x: x.y - p.plotLeft - p.spacingBox.x, y: 0, width: x.height, height: p.chartHeight }); w[J] ? w[J].animate(x) : (w[J] = r.clipRect(x), z && m["zoneGraph" + J].clip(w[J]), A && m["zoneArea" + J].clip(w[J])); H = I.value > D.max }), this.clips = w } }, invertGroups: function() { function m() { var s = { width: p.yAxis.len, height: p.xAxis.len }; aO(["group", "markerGroup"], function(t) { p[t] && p[t].attr(s).invert() }) } var p = this , r = p.chart; if (p.xAxis) { aU(r, "resize", m), aU(p, "destroy", function() { bS(r, "resize", m) }), m(), p.invertGroups = m } }, plotGroup: function(m, p, r, s, t) { var u = this[m] , w = !u; w && (this[m] = u = this.chart.renderer.g(p).attr({ visibility: r, zIndex: s || 0.1 }).add(t)); u[w ? "attr" : "animate"](this.getPlotBox()); return u }, getPlotBox: function() { var m = this.chart , p = this.xAxis , r = this.yAxis; if (m.inverted) { p = r, r = this.xAxis } return { translateX: p ? p.left : m.plotLeft, translateY: r ? r.top : m.plotTop, scaleX: 1, scaleY: 1 } }, render: function() { var m = this, p = m.chart, r, s = m.options, t = (r = s.animation) && !!m.animate && p.renderer.isSVG && a4(r.duration, 500) || 0, u = m.visible ? "visible" : "hidden", w = s.zIndex, x = m.hasRendered, z = p.seriesGroup; r = m.plotGroup("group", "series", u, w, z); m.markerGroup = m.plotGroup("markerGroup", "markers", u, w, z); t && m.animate(!0); m.getAttribs(); r.inverted = m.isCartesian ? p.inverted : !1; m.drawGraph && (m.drawGraph(), m.applyZones()); aO(m.points, function(A) { A.redraw && A.redraw() }); m.drawDataLabels && m.drawDataLabels(); m.visible && m.drawPoints(); m.drawTracker && m.options.enableMouseTracking !== !1 && m.drawTracker(); p.inverted && m.invertGroups(); s.clip !== !1 && !m.sharedClipKey && !x && r.clip(p.clipRect); t && m.animate(); if (!x) { t ? m.animationTimeout = setTimeout(function() { m.afterAnimate() }, t) : m.afterAnimate() } m.isDirty = m.isDirtyData = !1; m.hasRendered = !0 }, redraw: function() { var m = this.chart , p = this.isDirtyData , r = this.isDirty , s = this.group , t = this.xAxis , u = this.yAxis; s && (m.inverted && s.attr({ width: m.plotWidth, height: m.plotHeight }), s.animate({ translateX: a4(t && t.left, m.plotLeft), translateY: a4(u && u.top, m.plotTop) })); this.translate(); this.render(); p && aP(this, "updatedData"); (r || p) && delete this.kdTree }, kdDimensions: 1, kdTree: null, kdAxisArray: ["clientX", "plotY"], kdComparer: "distX", searchPoint: function(m) { var p = this.xAxis , r = this.yAxis , s = this.chart.inverted; return this.searchKDTree({ clientX: s ? p.len - m.chartY + p.pos : m.chartX - p.pos, plotY: s ? r.len - m.chartX + r.pos : m.chartY - r.pos }) }, buildKDTree: function() { function m(t, u, w) { var x, z; if (z = t && t.length) { return x = r.kdAxisArray[u % w], t.sort(function(A, B) { return A[x] - B[x] }), z = Math.floor(z / 2), { point: t[z], left: m(t.slice(0, z), u + 1, w), right: m(t.slice(z + 1), u + 1, w) } } } function p() { var t = aH(r.points, function(u) { return u.y !== null }); r.kdTree = m(t, s, s) } var r = this , s = r.kdDimensions; delete r.kdTree; r.options.kdSync ? p() : setTimeout(p) }, searchKDTree: function(m) { function p(w, x, z, A) { var B = x.point, D = r.kdAxisArray[z % A], G, H = B; G = bl(w[t]) && bl(B[t]) ? Math.pow(w[t] - B[t], 2) : null; var F = bl(w[u]) && bl(B[u]) ? Math.pow(w[u] - B[u], 2) : null , I = (G || 0) + (F || 0); G = { distX: bl(G) ? Math.sqrt(G) : Number.MAX_VALUE, distY: bl(F) ? Math.sqrt(F) : Number.MAX_VALUE, distR: bl(I) ? Math.sqrt(I) : Number.MAX_VALUE }; B.dist = G; D = w[D] - B[D]; G = D < 0 ? "left" : "right"; x[G] && (G = p(w, x[G], z + 1, A), H = G.dist[s] < H.dist[s] ? G : B, B = D < 0 ? "right" : "left", x[B] && Math.sqrt(D * D) < H.dist[s] && (w = p(w, x[B], z + 1, A), H = w.dist[s] < H.dist[s] ? w : H)); return H } var r = this , s = this.kdComparer , t = this.kdAxisArray[0] , u = this.kdAxisArray[1]; this.kdTree || this.buildKDTree(); if (this.kdTree) { return p(m, this.kdTree, this.kdDimensions, this.kdDimensions) } } }; at.prototype = { destroy: function() { bc(this, this.axis) }, render: function(m) { var p = this.options , r = p.format , r = r ? aB(r, this) : p.formatter.call(this); this.label ? this.label.attr({ text: r, visibility: "hidden" }) : this.label = this.axis.chart.renderer.text(r, null, null, p.useHTML).css(p.style).attr({ align: this.textAlign, rotation: p.rotation, visibility: "hidden" }).add(m) }, setOffset: function(m, p) { var r = this.axis , s = r.chart , t = s.inverted , u = r.reversed , u = this.isNegative && !u || !this.isNegative && u , w = r.translate(r.usePercentage ? 100 : this.total, 0, 0, 0, 1) , r = r.translate(0) , r = aZ(w - r) , x = s.xAxis[0].translate(this.x) + m , z = s.plotHeight , u = { x: t ? u ? w : w - r : x, y: t ? z - x - p : u ? z - w - r : z - w, width: t ? r : p, height: t ? p : r }; if (t = this.label) { t.align(this.alignOptions, null, u), u = t.alignAttr, t[this.options.crop === !1 || s.isInsidePlot(u.x, u.y) ? "show" : "hide"](!0) } } }; bC.prototype.buildStacks = function() { var m = this.series , p = a4(this.options.reversedStacks, !0) , r = m.length; if (!this.isXAxis) { for (this.usePercentage = !1; r--; ) { m[p ? r : m.length - r - 1].setStackedPoints() } if (this.usePercentage) { for (r = 0; r < m.length; r++) { m[r].setPercentStacks() } } } } ; bC.prototype.renderStackTotals = function() { var m = this.chart, p = m.renderer, r = this.stacks, s, t, u = this.stackTotalGroup; if (!u) { this.stackTotalGroup = u = p.g("stack-labels").attr({ visibility: "visible", zIndex: 6 }).add() } u.translate(m.plotLeft, m.plotTop); for (s in r) { for (t in m = r[s], m) { m[t].render(u) } } } ; ba.prototype.setStackedPoints = function() { if (this.options.stacking && !(this.visible !== !0 && this.chart.options.chart.ignoreHiddenSeries !== !1)) { var t = this.processedXData, u = this.processedYData, w = [], x = u.length, z = this.options, A = z.threshold, B = z.stack, z = z.stacking, D = this.stackKey, F = "-" + D, G = this.negStacks, H = this.yAxis, I = H.stacks, K = H.oldStacks, L, J, M, O, N, P; for (O = 0; O < x; O++) { N = t[O]; P = u[O]; M = this.index + "," + O; J = (L = G && P < A) ? F : D; I[J] || (I[J] = {}); if (!I[J][N]) { K[J] && K[J][N] ? (I[J][N] = K[J][N], I[J][N].total = null) : I[J][N] = new at(H,H.options.stackLabels,L,N,B) } J = I[J][N]; J.points[M] = [J.cum || 0]; z === "percent" ? (L = L ? D : F, G && I[L] && I[L][N] ? (L = I[L][N], J.total = L.total = bq(L.total, J.total) + aZ(P) || 0) : J.total = C(J.total + (aZ(P) || 0))) : J.total = C(J.total + (P || 0)); J.cum = (J.cum || 0) + (P || 0); J.points[M].push(J.cum); w[O] = J.cum } if (z === "percent") { H.usePercentage = !0 } this.stackedYData = w; H.oldStacks = {} } } ; ba.prototype.setPercentStacks = function() { var m = this , p = m.stackKey , r = m.yAxis.stacks , s = m.processedXData; aO([p, "-" + p], function(t) { var u; for (var w = s.length, x, z; w--; ) { if (x = s[w], u = (z = r[t] && r[t][x]) && z.points[m.index + "," + w], x = u) { z = z.total ? 100 / z.total : 0, x[0] = C(x[0] * z), x[1] = C(x[1] * z), m.stackedYData[w] = x[1] } } }) } ; bf(y.prototype, { addSeries: function(m, p, r) { var s, t = this; m && (p = a4(p, !0), aP(t, "addSeries", { options: m }, function() { s = t.initSeries(m); t.isDirtyLegend = !0; t.linkSeries(); p && t.redraw(r) })); return s }, addAxis: function(m, p, r, s) { var t = p ? "xAxis" : "yAxis" , u = this.options; new bC(this,bW(m, { index: this[t].length, isX: p })); u[t] = bh(u[t] || {}); u[t].push(m); a4(r, !0) && this.redraw(s) }, showLoading: function(m) { var p = this , r = p.options , s = p.loadingDiv , t = r.loading , u = function() { s && af(s, { left: p.plotLeft + "px", top: p.plotTop + "px", width: p.plotWidth + "px", height: p.plotHeight + "px" }) }; if (!s) { p.loadingDiv = s = bX(aG, { className: "highcharts-loading" }, bf(t.style, { zIndex: 10, display: bg }), p.container), p.loadingSpan = bX("span", null, t.labelStyle, s), aU(p, "redraw", u) } p.loadingSpan.innerHTML = m || r.lang.loading; if (!p.loadingShown) { af(s, { opacity: 0, display: "" }), aM(s, { opacity: t.style.opacity }, { duration: t.showDuration || 0 }), p.loadingShown = !0 } u() }, hideLoading: function() { var m = this.options , p = this.loadingDiv; p && aM(p, { opacity: 0 }, { duration: m.loading.hideDuration || 100, complete: function() { af(p, { display: bg }) } }); this.loadingShown = !1 } }); bf(al.prototype, { update: function(m, p, r, s) { function t() { u.applyOptions(m); if (n(m) && !aq(m)) { u.redraw = function() { if (x) { m && m.marker && m.marker.symbol ? u.graphic = x.destroy() : x.attr(u.pointAttr[u.state || ""]) } if (m && m.dataLabels && u.dataLabel) { u.dataLabel = u.dataLabel.destroy() } u.redraw = null } } z = u.index; w.updateParallelArrays(u, z); if (D && u.name) { D[u.x] = u.name } B.data[z] = u.options; w.isDirty = w.isDirtyData = !0; if (!w.fixedBox && w.hasCartesianSeries) { A.isDirtyBox = !0 } A.legend.display && B.legendType === "point" && (w.updateTotals(), A.legend.clearItems()); p && A.redraw(r) } var u = this, w = u.series, x = u.graphic, z, A = w.chart, B = w.options, D = w.xAxis && w.xAxis.names, p = a4(p, !0); s === !1 ? t() : u.firePointEvent("update", { options: m }, t) }, remove: function(m, p) { this.series.removePoint(aR(this, this.series.data), m, p) } }); bf(ba.prototype, { addPoint: function(m, p, r, s) { var t = this, u = t.options, w = t.data, x = t.graph, z = t.area, A = t.chart, B = t.xAxis && t.xAxis.names, D = x && x.shift || 0, F = ["graph", "area"], x = u.data, G, H = t.xData; bn(s, A); if (r) { for (s = t.zones.length; s--; ) { F.push("zoneGraph" + s, "zoneArea" + s) } aO(F, function(I) { if (t[I]) { t[I].shift = D + 1 } }) } if (z) { z.isArea = !0 } p = a4(p, !0); z = { series: t }; t.pointClass.prototype.applyOptions.apply(z, [m]); F = z.x; s = H.length; if (t.requireSorting && F < H[s - 1]) { for (G = !0; s && H[s - 1] > F; ) { s-- } } t.updateParallelArrays(z, "splice", s, 0, 0); t.updateParallelArrays(z, s); if (B && z.name) { B[F] = z.name } x.splice(s, 0, m); G && (t.data.splice(s, 0, null), t.processData()); u.legendType === "point" && t.generatePoints(); r && (w[0] && w[0].remove ? w[0].remove(!1) : (w.shift(), t.updateParallelArrays(z, "shift"), x.shift())); t.isDirty = !0; t.isDirtyData = !0; p && (t.getAttribs(), A.redraw()) }, removePoint: function(m, p, r) { var s = this , t = s.data , u = t[m] , w = s.points , x = s.chart , z = function() { t.length === w.length && w.splice(m, 1); t.splice(m, 1); s.options.data.splice(m, 1); s.updateParallelArrays(u || { series: s }, "splice", m, 1); u && u.destroy(); s.isDirty = !0; s.isDirtyData = !0; p && x.redraw() }; bn(r, x); p = a4(p, !0); u ? u.firePointEvent("remove", null, z) : z() }, remove: function(m, p) { var r = this , s = r.chart , m = a4(m, !0); if (!r.isRemoving) { r.isRemoving = !0, aP(r, "remove", null, function() { r.destroy(); s.isDirtyLegend = s.isDirtyBox = !0; s.linkSeries(); m && s.redraw(p) }) } r.isRemoving = !1 }, update: function(m, p) { var r = this, s = this.chart, t = this.userOptions, u = this.type, w = az[u].prototype, x = ["group", "markerGroup", "dataLabelsGroup"], z; if (m.type && m.type !== u || m.zIndex !== void 0) { x.length = 0 } aO(x, function(A) { x[A] = r[A]; delete r[A] }); m = bW(t, { animation: !1, index: this.index, pointStart: this.xData[0] }, { data: this.options.data }, m); this.remove(!1); for (z in w) { this[z] = bw } bf(this, az[m.type || u].prototype); aO(x, function(A) { r[A] = x[A] }); this.init(s, m); s.linkSeries(); a4(p, !0) && s.redraw(!1) } }); bf(bC.prototype, { update: function(m, p) { var r = this.chart , m = r.options[this.coll][this.options.index] = bW(this.userOptions, m); this.destroy(!0); this._addedPlotLB = bw; this.init(r, bf(m, { events: bw })); r.isDirtyBox = !0; a4(p, !0) && r.redraw() }, remove: function(m) { for (var p = this.chart, r = this.coll, s = this.series, t = s.length; t--; ) { s[t] && s[t].remove(!1) } av(p.axes, this); av(p[r], this); p.options[r].splice(this.options.index, 1); aO(p[r], function(u, w) { u.options.index = w }); this.destroy(); p.isDirtyBox = !0; a4(m, !0) && p.redraw() }, setTitle: function(m, p) { this.update({ title: m }, p) }, setCategories: function(m, p) { this.update({ categories: m }, p) } }); var bO = aA(ba); az.line = bO; d.area = bW(br, { threshold: 0 }); var a6 = aA(ba, { type: "area", getSegments: function() { var m = this, p = [], r = [], s = [], t = this.xAxis, u = this.yAxis, w = u.stacks[this.stackKey], x = {}, z, A, B = this.points, D = this.options.connectNulls, F, G; if (this.options.stacking && !this.cropped) { for (F = 0; F < B.length; F++) { x[B[F].x] = B[F] } for (G in w) { w[G].total !== null && s.push(+G) } s.sort(function(H, I) { return H - I }); aO(s, function(H) { var I = 0, J; if (!D || x[H] && x[H].y !== null) { if (x[H]) { r.push(x[H]) } else { for (F = m.index; F <= u.series.length; F++) { if (J = w[H].points[F + "," + H]) { I = J[1]; break } } z = t.translate(H); A = u.toPixels(I, !0); r.push({ y: null, plotX: z, clientX: z, plotY: A, yBottom: A, onMouseOver: aQ }) } } }); r.length && p.push(r) } else { ba.prototype.getSegments.call(this), p = this.segments } this.segments = p }, getSegmentPath: function(m) { var p = ba.prototype.getSegmentPath.call(this, m), r = [].concat(p), s, t = this.options; s = p.length; var u = this.yAxis.getThreshold(t.threshold), w; s === 3 && r.push("L", p[1], p[2]); if (t.stacking && !this.closedStacks) { for (s = m.length - 1; s >= 0; s--) { w = a4(m[s].yBottom, u), s < m.length - 1 && t.step && r.push(m[s + 1].plotX, w), r.push(m[s].plotX, w) } } else { this.closeSegment(r, m, u) } this.areaPath = this.areaPath.concat(r); return p }, closeSegment: function(m, p, r) { m.push("L", p[p.length - 1].plotX, r, "L", p[0].plotX, r) }, drawGraph: function() { this.areaPath = []; ba.prototype.drawGraph.apply(this); var m = this , p = this.areaPath , r = this.options , s = [["area", this.color, r.fillColor]]; aO(this.zones, function(t, u) { s.push(["zoneArea" + u, t.color || m.color, t.fillColor || r.fillColor]) }); aO(s, function(t) { var u = t[0] , w = m[u]; w ? w.animate({ d: p }) : m[u] = m.chart.renderer.path(p).attr({ fill: a4(t[2], aV(t[1]).setOpacity(a4(r.fillOpacity, 0.75)).get()), zIndex: 0 }).add(m.group) }) }, drawLegendSymbol: aW.drawRectangle }); az.area = a6; d.spline = bW(br); bO = aA(ba, { type: "spline", getPointSpline: function(m, p, r) { var s = p.plotX, t = p.plotY, u = m[r - 1], w = m[r + 1], x, z, A, B; if (u && w) { m = u.plotY; A = w.plotX; var w = w.plotY, D; x = (1.5 * s + u.plotX) / 2.5; z = (1.5 * t + m) / 2.5; A = (1.5 * s + A) / 2.5; B = (1.5 * t + w) / 2.5; D = (B - z) * (A - s) / (A - x) + t - B; z += D; B += D; z > m && z > t ? (z = bq(m, t), B = 2 * t - z) : z < m && z < t && (z = au(m, t), B = 2 * t - z); B > w && B > t ? (B = bq(w, t), z = 2 * t - B) : B < w && B < t && (B = au(w, t), z = 2 * t - B); p.rightContX = A; p.rightContY = B } r ? (p = ["C", u.rightContX || u.plotX, u.rightContY || u.plotY, x || s, z || t, s, t], u.rightContX = u.rightContY = null) : p = ["M", s, t]; return p } }); az.spline = bO; d.areaspline = bW(d.area); a6 = a6.prototype; bO = aA(bO, { type: "areaspline", closedStacks: !0, getSegmentPath: a6.getSegmentPath, closeSegment: a6.closeSegment, drawGraph: a6.drawGraph, drawLegendSymbol: aW.drawRectangle }); az.areaspline = bO; d.column = bW(br, { borderColor: "#FFFFFF", borderRadius: 0, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: { hover: { brightness: 0.1, shadow: !1, halo: !1 }, select: { color: "#C0C0C0", borderColor: "#000000", shadow: !1 } }, dataLabels: { align: null, verticalAlign: null, y: null }, stickyTracking: !1, tooltip: { distance: 6 }, threshold: 0 }); bO = aA(ba, { type: "column", pointAttrToOptions: { stroke: "borderColor", fill: "color", r: "borderRadius" }, cropShoulder: 0, directTouch: !0, trackerGroups: ["group", "dataLabelsGroup"], negStacks: !0, init: function() { ba.prototype.init.apply(this, arguments); var m = this , p = m.chart; p.hasRendered && aO(p.series, function(r) { if (r.type === m.type) { r.isDirty = !0 } }) }, getColumnMetrics: function() { var m = this, p = m.options, r = m.xAxis, s = m.yAxis, t = r.reversed, u, w = {}, x, z = 0; p.grouping === !1 ? z = 1 : aO(m.chart.series, function(F) { var G = F.options , H = F.yAxis; if (F.type === m.type && F.visible && s.len === H.len && s.pos === H.pos) { G.stacking ? (u = F.stackKey, w[u] === bw && (w[u] = z++), x = w[u]) : G.grouping !== !1 && (x = z++), F.columnIndex = x } }); var r = au(aZ(r.transA) * (r.ordinalSlope || p.pointRange || r.closestPointRange || r.tickInterval || 1), r.len) , A = r * p.groupPadding , B = (r - 2 * A) / z , D = p.pointWidth , p = bl(D) ? (B - D) / 2 : B * p.pointPadding , D = a4(D, B - 2 * p); return m.columnMetrics = { width: D, offset: p + (A + ((t ? z - (m.columnIndex || 0) : m.columnIndex) || 0) * B - r / 2) * (t ? -1 : 1) } }, translate: function() { var m = this , p = m.chart , r = m.options , s = m.borderWidth = a4(r.borderWidth, m.closestPointRange * m.xAxis.transA < 2 ? 0 : 1) , t = m.yAxis , u = m.translatedThreshold = t.getThreshold(r.threshold) , w = a4(r.minPointLength, 5) , x = m.getColumnMetrics() , z = x.width , A = m.barW = bq(z, 1 + 2 * s) , B = m.pointXOffset = x.offset , D = -(s % 2 ? 0.5 : 0) , F = s % 2 ? 0.5 : 1; p.inverted && (u -= 0.5, p.renderer.isVML && (F += 1)); r.pointPadding && (A = bm(A)); ba.prototype.translate.apply(m); aO(m.points, function(G) { var H = a4(G.yBottom, u), I = au(bq(-999 - H, G.plotY), t.len + 999 + H), J = G.plotX + B, L = A, K = au(I, H), M, N; M = bq(I, H) - K; aZ(M) < w && w && (M = w, N = !t.reversed && !G.negative || t.reversed && G.negative, K = bM(aZ(K - u) > w ? H - w : u - (N ? w : 0))); G.barX = J; G.pointWidth = z; G.tooltipPos = p.inverted ? [t.len + t.pos - p.plotLeft - I, m.xAxis.len - J - L / 2] : [J + L / 2, I + t.pos - p.plotTop]; L = bM(J + L) + D; J = bM(J) + D; L -= J; H = aZ(K) < 0.5; M = au(bM(K + M) + F, 90000); K = bM(K) + F; M -= K; H && (K -= 1, M += 1); G.shapeType = "rect"; G.shapeArgs = { x: J, y: K, width: L, height: M } }) }, getSymbol: aQ, drawLegendSymbol: aW.drawRectangle, drawGraph: aQ, drawPoints: function() { var m = this, p = this.chart, r = m.options, s = p.renderer, t = r.animationLimit || 250, u, w; aO(m.points, function(x) { var z = x.plotY , A = x.graphic; if (z !== bw && !isNaN(z) && x.y !== null) { u = x.shapeArgs, z = bl(m.borderWidth) ? { "stroke-width": m.borderWidth } : {}, w = x.pointAttr[x.selected ? "select" : ""] || m.pointAttr[""], A ? (S(A), A.attr(z)[p.pointCount < t ? "animate" : "attr"](bW(u))) : x.graphic = s[x.shapeType](u).attr(z).attr(w).add(m.group).shadow(r.shadow, null, r.stacking && !r.borderRadius) } else { if (A) { x.graphic = A.destroy() } } }) }, animate: function(m) { var p = this.yAxis , r = this.options , s = this.chart.inverted , t = {}; if (i) { m ? (t.scaleY = 0.001, m = au(p.pos + p.len, bq(p.pos, p.toPixels(r.threshold))), s ? t.translateX = m - p.len : t.translateY = m, this.group.attr(t)) : (t.scaleY = 1, t[s ? "translateX" : "translateY"] = p.pos, this.group.animate(t, this.options.animation), this.animate = null) } }, remove: function() { var m = this , p = m.chart; p.hasRendered && aO(p.series, function(r) { if (r.type === m.type) { r.isDirty = !0 } }); ba.prototype.remove.apply(m, arguments) } }); az.column = bO; d.bar = bW(d.column); a6 = aA(bO, { type: "bar", inverted: !0 }); az.bar = a6; d.scatter = bW(br, { lineWidth: 0, marker: { enabled: !0 }, tooltip: { headerFormat: '\u25CF {series.name}
', pointFormat: "x: {point.x}
y: {point.y}
" } }); a6 = aA(ba, { type: "scatter", sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1, kdDimensions: 2, kdComparer: "distR", drawGraph: function() { this.options.lineWidth && ba.prototype.drawGraph.call(this) } }); az.scatter = a6; d.pie = bW(br, { borderColor: "#FFFFFF", borderWidth: 1, center: [null, null], clip: !1, colorByPoint: !0, dataLabels: { distance: 30, enabled: !0, formatter: function() { return this.point.name }, x: 0 }, ignoreHiddenPoint: !0, legendType: "point", marker: null, size: null, showInLegend: !1, slicedOffset: 10, states: { hover: { brightness: 0.1, shadow: !1 } }, stickyTracking: !1, tooltip: { followPointer: !0 } }); br = { type: "pie", isCartesian: !1, pointClass: aA(al, { init: function() { al.prototype.init.apply(this, arguments); var m = this, p; bf(m, { visible: m.visible !== !1, name: a4(m.name, "Slice") }); p = function(r) { m.slice(r.type === "select") } ; aU(m, "select", p); aU(m, "unselect", p); return m }, setVisible: function(m, p) { var r = this , s = r.series , t = s.chart , u = !s.isDirty && s.options.ignoreHiddenPoint; if (m !== r.visible || p) { if (r.visible = r.options.visible = m = m === bw ? !r.visible : m, s.options.data[aR(r, s.data)] = r.options, aO(["graphic", "dataLabel", "connector", "shadowGroup"], function(w) { if (r[w]) { r[w][m ? "show" : "hide"](!0) } }), r.legendItem && (t.hasRendered && (s.updateTotals(), t.legend.clearItems(), u || t.legend.render()), t.legend.colorizeItem(r, m)), u) { s.isDirty = !0, t.redraw() } } }, slice: function(m, p, r) { var s = this.series; bn(r, s.chart); a4(p, !0); this.sliced = this.options.sliced = m = bl(m) ? m : !this.sliced; s.options.data[aR(this, s.data)] = this.options; m = m ? this.slicedTranslation : { translateX: 0, translateY: 0 }; this.graphic.animate(m); this.shadowGroup && this.shadowGroup.animate(m) }, haloPath: function(m) { var p = this.shapeArgs , r = this.series.chart; return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(r.plotLeft + p.x, r.plotTop + p.y, p.r + m, p.r + m, { innerR: this.shapeArgs.r, start: p.start, end: p.end }) } }), requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "dataLabelsGroup"], axisTypes: [], pointAttrToOptions: { stroke: "borderColor", "stroke-width": "borderWidth", fill: "color" }, getColor: aQ, animate: function(m) { var p = this , r = p.points , s = p.startAngleRad; if (!m) { aO(r, function(t) { var u = t.graphic , w = t.shapeArgs; u && (u.attr({ r: t.startR || p.center[3] / 2, start: s, end: s }), u.animate({ r: w.r, start: w.start, end: w.end }, p.options.animation)) }), p.animate = null } }, setData: function(m, p, r, s) { ba.prototype.setData.call(this, m, !1, r, s); this.processData(); this.generatePoints(); a4(p, !0) && this.chart.redraw(r) }, updateTotals: function() { var m, p = 0, r, s, t, u = this.options.ignoreHiddenPoint; r = this.points; s = r.length; for (m = 0; m < s; m++) { t = r[m]; if (t.y < 0) { t.y = null } p += u && !t.visible ? 0 : t.y } this.total = p; for (m = 0; m < s; m++) { t = r[m], t.percentage = p > 0 && (t.visible || !u) ? t.y / p * 100 : 0, t.total = p } }, generatePoints: function() { ba.prototype.generatePoints.call(this); this.updateTotals() }, translate: function(p) { this.generatePoints(); var r = 0, s = this.options, t = s.slicedOffset, u = t + s.borderWidth, w, x, z, A = s.startAngle || 0, B = this.startAngleRad = aK / 180 * (A - 90), A = (this.endAngleRad = aK / 180 * (a4(s.endAngle, A + 360) - 90)) - B, D = this.points, F = s.dataLabels.distance, s = s.ignoreHiddenPoint, H, G = D.length, I; if (!p) { this.center = p = this.getCenter() } this.getX = function(m, J) { z = bB.asin(au((m - p[1]) / (p[2] / 2 + F), 1)); return p[0] + (J ? -1 : 1) * bH(z) * (p[2] / 2 + F) } ; for (H = 0; H < G; H++) { I = D[H]; w = B + r * A; if (!s || I.visible) { r += I.percentage / 100 } x = B + r * A; I.shapeType = "arc"; I.shapeArgs = { x: p[0], y: p[1], r: p[2] / 2, innerR: p[3] / 2, start: bM(w * 1000) / 1000, end: bM(x * 1000) / 1000 }; z = (x + w) / 2; z > 1.5 * aK ? z -= 2 * aK : z < -aK / 2 && (z += 2 * aK); I.slicedTranslation = { translateX: bM(bH(z) * t), translateY: bM(a(z) * t) }; w = bH(z) * p[2] / 2; x = a(z) * p[2] / 2; I.tooltipPos = [p[0] + w * 0.7, p[1] + x * 0.7]; I.half = z < -aK / 2 || z > aK / 2 ? 1 : 0; I.angle = z; u = au(u, F / 2); I.labelPos = [p[0] + w + bH(z) * F, p[1] + x + a(z) * F, p[0] + w + bH(z) * u, p[1] + x + a(z) * u, p[0] + w, p[1] + x, F < 0 ? "center" : I.half ? "right" : "left", z] } }, drawGraph: null, drawPoints: function() { var m = this, p = m.chart.renderer, r, s, t = m.options.shadow, u, w; if (t && !m.shadowGroup) { m.shadowGroup = p.g("shadow").add(m.group) } aO(m.points, function(x) { var z = x.options.visible; s = x.graphic; w = x.shapeArgs; u = x.shadowGroup; if (t && !u) { u = x.shadowGroup = p.g("shadow").add(m.shadowGroup) } r = x.sliced ? x.slicedTranslation : { translateX: 0, translateY: 0 }; u && u.attr(r); s ? s.animate(bf(w, r)) : x.graphic = s = p[x.shapeType](w).setRadialReference(m.center).attr(x.pointAttr[x.selected ? "select" : ""]).attr({ "stroke-linejoin": "round" }).attr(r).add(m.group).shadow(t, u); z !== void 0 && x.setVisible(z, !0) }) }, searchPoint: aQ, sortByAngle: function(m, p) { m.sort(function(r, s) { return r.angle !== void 0 && (s.angle - r.angle) * p }) }, drawLegendSymbol: aW.drawRectangle, getCenter: bR.getCenter, getSymbol: aQ }; br = aA(ba, br); az.pie = br; ba.prototype.drawDataLabels = function() { var m = this, p = m.options, r = p.cursor, s = p.dataLabels, t = m.points, u, w, x = m.hasRendered || 0, z, A, B = m.chart.renderer; if (s.enabled || m._hasPointLabels) { m.dlProcessOptions && m.dlProcessOptions(s), A = m.plotGroup("dataLabelsGroup", "data-labels", s.defer ? "hidden" : "visible", s.zIndex || 6), a4(s.defer, !0) && (A.attr({ opacity: +x }), x || aU(m, "afterAnimate", function() { m.visible && A.show(); A[p.animation ? "animate" : "attr"]({ opacity: 1 }, { duration: 200 }) })), w = s, aO(t, function(F) { var G, H = F.dataLabel, I, J, M = F.connector, L = !0, K, D = {}; u = F.dlOptions || F.options && F.options.dataLabels; G = a4(u && u.enabled, w.enabled); if (H && !G) { F.dataLabel = H.destroy() } else { if (G) { s = bW(w, u); K = s.style; G = s.rotation; I = F.getLabelConfig(); z = s.format ? aB(s.format, I) : s.formatter.call(I, s); K.color = a4(s.color, K.color, m.color, "black"); if (H) { if (bl(z)) { H.attr({ text: z }), L = !1 } else { if (F.dataLabel = H = H.destroy(), M) { F.connector = M.destroy() } } } else { if (bl(z)) { H = { fill: s.backgroundColor, stroke: s.borderColor, "stroke-width": s.borderWidth, r: s.borderRadius || 0, rotation: G, padding: s.padding, zIndex: 1 }; if (K.color === "contrast") { D.color = s.inside || s.distance < 0 || p.stacking ? B.getContrast(F.color || m.color) : "#000000" } if (r) { D.cursor = r } for (J in H) { H[J] === bw && delete H[J] } H = F.dataLabel = B[G ? "text" : "label"](z, 0, -999, s.shape, null, null, s.useHTML).attr(H).css(bf(K, D)).add(A).shadow(s.shadow) } } H && m.alignDataLabel(F, H, s, null, L) } } }) } } ; ba.prototype.alignDataLabel = function(m, p, r, s, t) { var u = this.chart , w = u.inverted , x = a4(m.plotX, -999) , z = a4(m.plotY, -999) , A = p.getBBox() , B = u.renderer.fontMetrics(r.style.fontSize).b , D = this.visible && (m.series.forceDL || u.isInsidePlot(x, bM(z), w) || s && u.isInsidePlot(x, w ? s.x + 1 : s.y + s.height - 1, w)); if (D) { s = bf({ x: w ? u.plotWidth - z : x, y: bM(w ? u.plotHeight - x : z), width: 0, height: 0 }, s), bf(r, { width: A.width, height: A.height }), r.rotation ? (m = u.renderer.rotCorr(B, r.rotation), p[t ? "attr" : "animate"]({ x: s.x + r.x + s.width / 2 + m.x, y: s.y + r.y + s.height / 2 }).attr({ align: r.align })) : (p.align(r, null, s), w = p.alignAttr, a4(r.overflow, "justify") === "justify" ? this.justifyDataLabel(p, r, w, A, s, t) : a4(r.crop, !0) && (D = u.isInsidePlot(w.x, w.y) && u.isInsidePlot(w.x + A.width, w.y + A.height)), r.shape && p.attr({ anchorX: m.plotX, anchorY: m.plotY })) } if (!D) { p.attr({ y: -999 }), p.placed = !1 } } ; ba.prototype.justifyDataLabel = function(m, p, r, s, t, u) { var w = this.chart, x = p.align, z = p.verticalAlign, A, B, D = m.box ? 0 : m.padding || 0; A = r.x + D; if (A < 0) { x === "right" ? p.align = "left" : p.x = -A, B = !0 } A = r.x + s.width - D; if (A > w.plotWidth) { x === "left" ? p.align = "right" : p.x = w.plotWidth - A, B = !0 } A = r.y + D; if (A < 0) { z === "bottom" ? p.verticalAlign = "top" : p.y = -A, B = !0 } A = r.y + s.height - D; if (A > w.plotHeight) { z === "top" ? p.verticalAlign = "bottom" : p.y = w.plotHeight - A, B = !0 } if (B) { m.placed = !u, m.align(p, null, t) } } ; if (az.pie) { az.pie.prototype.drawDataLabels = function() { var m = this, t = m.data, I, O = m.chart, T = m.options.dataLabels, V = a4(T.connectorPadding, 10), X = a4(T.connectorWidth, 1), Z = O.plotWidth, b2 = O.plotHeight, b3, b5, b7 = a4(T.softConnector, !0), ca = T.distance, cc = m.center, ce = cc[2] / 2, cf = cc[1], ch = ca > 0, ci, cj, ck, cl = [[], []], p, x, Q, Y, U, W = [0, 0, 0, 0], b9 = function(r, s) { return s.y - r.y }; if (m.visible && (T.enabled || m._hasPointLabels)) { ba.prototype.drawDataLabels.apply(m); aO(t, function(r) { r.dataLabel && r.visible && cl[r.half].push(r) }); for (Y = 2; Y--; ) { var b4 = [], cb = [], b1 = cl[Y], b8 = b1.length, b6; if (b8) { m.sortByAngle(b1, Y - 0.5); for (U = t = 0; !t && b1[U]; ) { t = b1[U] && b1[U].dataLabel && (b1[U].dataLabel.getBBox().height || 21), U++ } if (ca > 0) { cj = au(cf + ce + ca, O.plotHeight); for (U = bq(0, cf - ce - ca); U <= cj; U += t) { b4.push(U) } cj = b4.length; if (b8 > cj) { I = [].concat(b1); I.sort(b9); for (U = b8; U--; ) { I[U].rank = U } for (U = b8; U--; ) { b1[U].rank >= cj && b1.splice(U, 1) } b8 = b1.length } for (U = 0; U < b8; U++) { I = b1[U]; ck = I.labelPos; I = 9999; var cg, cd; for (cd = 0; cd < cj; cd++) { cg = aZ(b4[cd] - ck[1]), cg < I && (I = cg, b6 = cd) } if (b6 < U && b4[U] !== null) { b6 = U } else { for (cj < b8 - U + b6 && b4[U] !== null && (b6 = cj - b8 + U); b4[b6] === null; ) { b6++ } } cb.push({ i: b6, y: b4[b6] }); b4[b6] = null } cb.sort(b9) } for (U = 0; U < b8; U++) { I = b1[U]; ck = I.labelPos; ci = I.dataLabel; Q = I.visible === !1 ? "hidden" : "inherit"; I = ck[1]; if (ca > 0) { if (cj = cb.pop(), b6 = cj.i, x = cj.y, I > x && b4[b6 + 1] !== null || I < x && b4[b6 - 1] !== null) { x = au(bq(0, I), O.plotHeight) } } else { x = I } p = T.justify ? cc[0] + (Y ? -1 : 1) * (ce + ca) : m.getX(x === cf - ce - ca || x === cf + ce + ca ? I : x, Y); ci._attr = { visibility: Q, align: ck[6] }; ci._pos = { x: p + T.x + ({ left: V, right: -V }[ck[6]] || 0), y: x + T.y - 10 }; ci.connX = p; ci.connY = x; if (this.options.size === null) { cj = ci.width, p - cj < V ? W[3] = bq(bM(cj - p + V), W[3]) : p + cj > Z - V && (W[1] = bq(bM(p + cj - Z + V), W[1])), x - t / 2 < 0 ? W[0] = bq(bM(-x + t / 2), W[0]) : x + t / 2 > b2 && (W[2] = bq(bM(x + t / 2 - b2), W[2])) } } } } if (ag(W) === 0 || this.verifyDataLabelOverflow(W)) { this.placeDataLabels(), ch && X && aO(this.points, function(r) { b3 = r.connector; ck = r.labelPos; if ((ci = r.dataLabel) && ci._pos) { Q = ci._attr.visibility, p = ci.connX, x = ci.connY, b5 = b7 ? ["M", p + (ck[6] === "left" ? 5 : -5), x, "C", p, x, 2 * ck[2] - ck[4], 2 * ck[3] - ck[5], ck[2], ck[3], "L", ck[4], ck[5]] : ["M", p + (ck[6] === "left" ? 5 : -5), x, "L", ck[2], ck[3], "L", ck[4], ck[5]], b3 ? (b3.animate({ d: b5 }), b3.attr("visibility", Q)) : r.connector = b3 = m.chart.renderer.path(b5).attr({ "stroke-width": X, stroke: T.connectorColor || r.color || "#606060", visibility: Q }).add(m.dataLabelsGroup) } else { if (b3) { r.connector = b3.destroy() } } }) } } } , az.pie.prototype.placeDataLabels = function() { aO(this.points, function(m) { var m = m.dataLabel, p; if (m) { (p = m._pos) ? (m.attr(m._attr), m[m.moved ? "animate" : "attr"](p), m.moved = !0) : m && m.attr({ y: -999 }) } }) } , az.pie.prototype.alignDataLabel = aQ, az.pie.prototype.verifyDataLabelOverflow = function(m) { var p = this.center, r = this.options, s = r.center, t = r = r.minSize || 80, u; s[0] !== null ? t = bq(p[2] - bq(m[1], m[3]), r) : (t = bq(p[2] - m[1] - m[3], r), p[0] += (m[3] - m[1]) / 2); s[1] !== null ? t = bq(au(t, p[2] - bq(m[0], m[2])), r) : (t = bq(au(t, p[2] - m[0] - m[2]), r), p[1] += (m[0] - m[2]) / 2); t < p[2] ? (p[2] = t, this.translate(p), aO(this.points, function(w) { if (w.dataLabel) { w.dataLabel._pos = null } }), this.drawDataLabels && this.drawDataLabels()) : u = !0; return u } } if (az.column) { az.column.prototype.alignDataLabel = function(m, p, r, s, t) { var u = this.chart.inverted , w = m.series , x = m.dlBox || m.shapeArgs , z = m.below || m.plotY > a4(this.translatedThreshold, w.yAxis.len) , A = a4(r.inside, !!this.options.stacking); if (x && (s = bW(x), u && (s = { x: w.yAxis.len - s.y - s.height, y: w.xAxis.len - s.x - s.width, width: s.height, height: s.width }), !A)) { u ? (s.x += z ? 0 : s.width, s.width = 0) : (s.y += z ? s.height : 0, s.height = 0) } r.align = a4(r.align, !u || A ? "center" : z ? "right" : "left"); r.verticalAlign = a4(r.verticalAlign, u || A ? "middle" : z ? "top" : "bottom"); ba.prototype.alignDataLabel.call(this, m, p, r, s, t) } } (function(m) { var p = m.Chart , r = m.each , s = HighchartsAdapter.addEvent; p.prototype.callbacks.push(function(t) { function u() { var w = []; r(t.series, function(x) { var z = x.options.dataLabels; (z.enabled || x._hasPointLabels) && !z.allowOverlap && x.visible && r(x.points, function(A) { if (A.dataLabel) { A.dataLabel.labelrank = A.labelrank, w.push(A.dataLabel) } }) }); t.hideOverlappingLabels(w) } u(); s(t, "redraw", u) }); p.prototype.hideOverlappingLabels = function(t) { var u = t.length, w, x, z, A; for (x = 0; x < u; x++) { if (w = t[x]) { w.oldOpacity = w.opacity, w.newOpacity = 1 } } for (x = 0; x < u; x++) { z = t[x]; for (w = x + 1; w < u; ++w) { if (A = t[w], z && A && z.placed && A.placed && z.newOpacity !== 0 && A.newOpacity !== 0 && !(A.alignAttr.x > z.alignAttr.x + z.width || A.alignAttr.x + A.width < z.alignAttr.x || A.alignAttr.y > z.alignAttr.y + z.height || A.alignAttr.y + A.height < z.alignAttr.y)) { (z.labelrank < A.labelrank ? z : A).newOpacity = 0 } } } for (x = 0; x < u; x++) { if (w = t[x]) { if (w.oldOpacity !== w.newOpacity && w.placed) { w.alignAttr.opacity = w.newOpacity, w[w.isOld && w.newOpacity ? "animate" : "attr"](w.alignAttr) } w.isOld = !0 } } } } )(bG); br = bG.TrackerMixin = { drawTrackerPoint: function() { var m = this , p = m.chart , r = p.pointer , s = m.options.cursor , t = s && { cursor: s } , u = function(w) { for (var x = w.target, z; x && !z; ) { z = x.point, x = x.parentNode } if (z !== bw && z !== p.hoverPoint) { z.onMouseOver(w) } }; aO(m.points, function(w) { if (w.graphic) { w.graphic.element.point = w } if (w.dataLabel) { w.dataLabel.element.point = w } }); if (!m._hasTracking) { aO(m.trackerGroups, function(w) { if (m[w] && (m[w].addClass("highcharts-tracker").on("mouseover", u).on("mouseout", function(x) { r.onTrackerMouseOut(x) }).css(t), f)) { m[w].on("touchstart", u) } }), m._hasTracking = !0 } }, drawTrackerGraph: function() { var m = this, r = m.options, s = r.trackByArea, t = [].concat(s ? m.areaPath : m.graphPath), u = t.length, w = m.chart, x = w.pointer, z = w.renderer, A = w.options.tooltip.snap, B = m.tracker, D = r.cursor, F = D && { cursor: D }, D = m.singlePoints, G, H = function() { if (w.hoverSeries !== m) { m.onMouseOver() } }, I = "rgba(192,192,192," + (i ? 0.0001 : 0.002) + ")"; if (u && !s) { for (G = u + 1; G--; ) { t[G] === "M" && t.splice(G + 1, 0, t[G + 1] - A, t[G + 2], "L"), (G && t[G] === "M" || G === u) && t.splice(G, 0, "L", t[G - 2] + A, t[G - 1]) } } for (G = 0; G < D.length; G++) { u = D[G], t.push("M", u.plotX - A, u.plotY, "L", u.plotX + A, u.plotY) } B ? B.attr({ d: t }) : (m.tracker = z.path(t).attr({ "stroke-linejoin": "round", visibility: m.visible ? "visible" : "hidden", stroke: I, fill: s ? I : bg, "stroke-width": r.lineWidth + (s ? 0 : 2 * A), zIndex: 2 }).add(m.group), aO([m.tracker, m.markerGroup], function(p) { p.addClass("highcharts-tracker").on("mouseover", H).on("mouseout", function(J) { x.onTrackerMouseOut(J) }).css(F); if (f) { p.on("touchstart", H) } })) } }; if (az.column) { bO.prototype.drawTracker = br.drawTrackerPoint } if (az.pie) { az.pie.prototype.drawTracker = br.drawTrackerPoint } if (az.scatter) { a6.prototype.drawTracker = br.drawTrackerPoint } bf(aS.prototype, { setItemEvents: function(m, p, r, s, t) { var u = this; (r ? p : m.legendGroup).on("mouseover", function() { m.setState("hover"); p.css(u.options.itemHoverStyle) }).on("mouseout", function() { p.css(m.visible ? s : t); m.setState() }).on("click", function(w) { var x = function() { m.setVisible() } , w = { browserEvent: w }; m.firePointEvent ? m.firePointEvent("legendItemClick", w, x) : aP(m, "legendItemClick", w, x) }) }, createCheckboxForItem: function(m) { m.checkbox = bX("input", { type: "checkbox", checked: m.selected, defaultChecked: m.selected }, this.options.itemCheckboxStyle, this.chart.container); aU(m.checkbox, "click", function(p) { aP(m.series || m, "checkboxClick", { checked: p.target.checked, item: m }, function() { m.select() }) }) } }); a5.legend.itemStyle.cursor = "pointer"; bf(y.prototype, { showResetZoom: function() { var m = this , p = a5.lang , r = m.options.chart.resetZoomButton , s = r.theme , t = s.states , u = r.relativeTo === "chart" ? null : "plotBox"; this.resetZoomButton = m.renderer.button(p.resetZoom, null, null, function() { m.zoomOut() }, s, t && t.hover).attr({ align: r.position.align, title: p.resetZoomTitle }).add().align(r.position, !1, u) }, zoomOut: function() { var m = this; aP(m, "selection", { resetSelection: !0 }, function() { m.zoom() }) }, zoom: function(m) { var p, r = this.pointer, s = !1, t; !m || m.resetSelection ? aO(this.axes, function(u) { p = u.zoom() }) : aO(m.xAxis.concat(m.yAxis), function(u) { var w = u.axis , x = w.isXAxis; if (r[x ? "zoomX" : "zoomY"] || r[x ? "pinchX" : "pinchY"]) { p = w.zoom(u.min, u.max), w.displayBtn && (s = !0) } }); t = this.resetZoomButton; if (s && !t) { this.showResetZoom() } else { if (!s && n(t)) { this.resetZoomButton = t.destroy() } } p && this.redraw(a4(this.options.chart.animation, m && m.animation, this.pointCount < 100)) }, pan: function(m, p) { var r = this, s = r.hoverPoints, t; s && aO(s, function(u) { u.setState() }); aO(p === "xy" ? [1, 0] : [1], function(u) { var w = m[u ? "chartX" : "chartY"] , x = r[u ? "xAxis" : "yAxis"][0] , z = r[u ? "mouseDownX" : "mouseDownY"] , A = (x.pointRange || 0) / 2 , B = x.getExtremes() , D = x.toValue(z - w, !0) + A , A = x.toValue(z + r[u ? "plotWidth" : "plotHeight"] - w, !0) - A , z = z > w; if (x.series.length && (z || D > au(B.dataMin, B.min)) && (!z || A < bq(B.dataMax, B.max))) { x.setExtremes(D, A, !1, !1, { trigger: "pan" }), t = !0 } r[u ? "mouseDownX" : "mouseDownY"] = w }); t && r.redraw(!1); af(r.container, { cursor: "move" }) } }); bf(al.prototype, { select: function(m, p) { var r = this , s = r.series , t = s.chart , m = a4(m, !r.selected); r.firePointEvent(m ? "select" : "unselect", { accumulate: p }, function() { r.selected = r.options.selected = m; s.options.data[aR(r, s.data)] = r.options; r.setState(m && "select"); p || aO(t.getSelectedPoints(), function(u) { if (u.selected && u !== r) { u.selected = u.options.selected = !1, s.options.data[aR(u, s.data)] = u.options, u.setState(""), u.firePointEvent("unselect") } }) }) }, onMouseOver: function(m) { var p = this.series , r = p.chart , s = r.tooltip , t = r.hoverPoint; if (r.hoverSeries !== p) { p.onMouseOver() } if (t && t !== this) { t.onMouseOut() } this.firePointEvent("mouseOver"); s && (!s.shared || p.noSharedTooltip) && s.refresh(this, m); this.setState("hover"); r.hoverPoint = this }, onMouseOut: function() { var m = this.series.chart , p = m.hoverPoints; this.firePointEvent("mouseOut"); if (!p || aR(this, p) === -1) { this.setState(), m.hoverPoint = null } }, importEvents: function() { if (!this.hasImportedEvents) { var m = bW(this.series.options.point, this.options).events, p; this.events = m; for (p in m) { aU(this, p, m[p]) } this.hasImportedEvents = !0 } }, setState: function(r, s) { var t = this.plotX, u = this.plotY, w = this.series, x = w.options.states, z = d[w.type].marker && w.options.marker, A = z && !z.enabled, B = z && z.states[r], D = B && B.enabled === !1, F = w.stateMarkerGraphic, G = this.marker || {}, I = w.chart, H = w.halo, J, r = r || ""; J = this.pointAttr[r] || w.pointAttr[r]; if (!(r === this.state && !s || this.selected && r !== "select" || x[r] && x[r].enabled === !1 || r && (D || A && B.enabled === !1) || r && G.states && G.states[r] && G.states[r].enabled === !1)) { if (this.graphic) { z = z && this.graphic.symbolName && J.r, this.graphic.attr(bW(J, z ? { x: t - z, y: u - z, width: 2 * z, height: 2 * z } : {})), F && F.hide() } else { if (r && B) { if (z = B.radius, G = G.symbol || w.symbol, F && F.currentSymbol !== G && (F = F.destroy()), F) { F[s ? "animate" : "attr"]({ x: t - z, y: u - z }) } else { if (G) { w.stateMarkerGraphic = F = I.renderer.symbol(G, t - z, u - z, 2 * z, 2 * z).attr(J).add(w.markerGroup), F.currentSymbol = G } } } if (F) { F[r && I.isInsidePlot(t, u, I.inverted) ? "show" : "hide"]() } } if ((t = x[r] && x[r].halo) && t.size) { if (!H) { w.halo = H = I.renderer.path().add(I.seriesGroup) } H.attr(bf({ fill: aV(this.color || w.color).setOpacity(t.opacity).get() }, t.attributes))[s ? "animate" : "attr"]({ d: this.haloPath(t.size) }) } else { H && H.attr({ d: [] }) } this.state = r } }, haloPath: function(m) { var p = this.series , r = p.chart , s = p.getPlotBox() , t = r.inverted; return r.renderer.symbols.circle(s.translateX + (t ? p.yAxis.len - this.plotY : this.plotX) - m, s.translateY + (t ? p.xAxis.len - this.plotX : this.plotY) - m, m * 2, m * 2) } }); bf(ba.prototype, { onMouseOver: function() { var m = this.chart , p = m.hoverSeries; if (p && p !== this) { p.onMouseOut() } this.options.events.mouseOver && aP(this, "mouseOver"); this.setState("hover"); m.hoverSeries = this }, onMouseOut: function() { var m = this.options , p = this.chart , r = p.tooltip , s = p.hoverPoint; if (s) { s.onMouseOut() } this && m.events.mouseOut && aP(this, "mouseOut"); r && !m.stickyTracking && (!r.shared || this.noSharedTooltip) && r.hide(); this.setState(); p.hoverSeries = null }, setState: function(m) { var p = this.options , r = this.graph , s = p.states , t = p.lineWidth , p = 0 , m = m || ""; if (this.state !== m && (this.state = m, !(s[m] && s[m].enabled === !1) && (m && (t = s[m].lineWidth || t + (s[m].lineWidthPlus || 0)), r && !r.dashstyle))) { m = { "stroke-width": t }; for (r.attr(m); this["zoneGraph" + p]; ) { this["zoneGraph" + p].attr(m), p += 1 } } }, setVisible: function(m, p) { var r = this, s = r.chart, t = r.legendItem, u, w = s.options.chart.ignoreHiddenSeries, x = r.visible; u = (r.visible = m = r.userOptions.visible = m === bw ? !x : m) ? "show" : "hide"; aO(["group", "dataLabelsGroup", "markerGroup", "tracker"], function(z) { if (r[z]) { r[z][u]() } }); if (s.hoverSeries === r || (s.hoverPoint && s.hoverPoint.series) === r) { r.onMouseOut() } t && s.legend.colorizeItem(r, m); r.isDirty = !0; r.options.stacking && aO(s.series, function(z) { if (z.options.stacking && z.visible) { z.isDirty = !0 } }); aO(r.linkedSeries, function(z) { z.setVisible(m, !1) }); if (w) { s.isDirtyBox = !0 } p !== !1 && s.redraw(); aP(r, u) }, show: function() { this.setVisible(!0) }, hide: function() { this.setVisible(!1) }, select: function(m) { this.selected = m = m === bw ? !this.selected : m; if (this.checkbox) { this.checkbox.checked = m } aP(this, m ? "select" : "unselect") }, drawTracker: br.drawTrackerGraph }); bf(bG, { Color: aV, Point: al, Tick: bt, Renderer: b, SVGElement: aE, SVGRenderer: bs, arrayMin: a7, arrayMax: ag, charts: bN, dateFormat: a1, error: aF, format: aB, pathAnim: b0, getOptions: function() { return a5 }, hasBidiBug: aY, isTouchDevice: aD, setOptions: function(m) { a5 = bW(!0, a5, m); v(); return a5 }, addEvent: aU, removeEvent: bS, createElement: bX, discardElement: bi, css: af, each: aO, map: by, merge: bW, splat: bh, extendClass: aA, pInt: h, svg: i, canvas: ab, vml: !i && !ab, product: "Highcharts", version: "4.1.5" }) } )(); var size = false; var shangpanHome = false; (function(g) { g.chartt = {}; g.chart = {}; Highcharts.setOptions({ global: { useUTC: false } }); Highcharts.theme = { colors: ["#666666", "#666666", "#666666", "#666666", "#666666", "#666666", "#666666", "#666666", "#666666"], plotOptions: { series: { marker: { radius: 2, symbol: "circle" } } }, chart: { borderWidth: 0, plotBackgroundColor: "rgba(255, 255, 255, 0)", marginBottom: 55 }, title: { style: { color: "#000", font: 'bold 16px "Trebuchet MS", Verdana, sans-serif' } }, subtitle: { style: { color: "#666666", font: 'bold 12px "Trebuchet MS", Verdana, sans-serif' } }, xAxis: { gridLineWidth: 1, lineColor: "#d2d2d2", tickColor: "#000", labels: { style: { color: "#000", font: "11px Trebuchet MS, Verdana, sans-serif", } }, title: { style: { color: "#333", fontWeight: "bold", fontSize: "12px", fontFamily: "Trebuchet MS, Verdana, sans-serif" } } }, yAxis: { minorTickInterval: "auto", lineColor: "#ccc", lineWidth: 1, tickWidth: 1, tickColor: "#000", labels: { style: { color: "#000", font: "11px Trebuchet MS, Verdana, sans-serif" } }, title: { style: { color: "#333", fontWeight: "bold", fontSize: "12px", fontFamily: "Trebuchet MS, Verdana, sans-serif" } } }, labels: { style: { color: "#99b" } }, navigation: { buttonOptions: { theme: { stroke: "#CCCCCC" } } } }; var e = Highcharts.setOptions(Highcharts.theme); function b() { var h = new Object(); h.chart = { defaultSeriesType: "line", renderTo: "chart_one" }; h.legend = { enabled: false }; h.title = { text: "", y: 300 }; h.xAxis = { tickInterval: 3, title: { text: "", y: "bottom" }, labels: { enabled: false } }; h.yAxis = { title: { text: "" }, plotLines: [{ value: 0.95, width: 1, color: "#808080" }], labels: { formatter: function() { var i = this.axis.defaultLabelFormatter.call(this); if (/^[0-9]{4}$/.test(i)) {} return Highcharts.numberFormat(this.value, 2) } } }; h.tooltip = { shared: true, useHTML: true, headerFormat: '
', pointFormat: "{point.pk}" > 0 ? ' ' : ' ', footerFormat: "
' + (size == true ? "大球" : "上盘") + '{point.odds1}
盘口:{point.pk}
' + (size == true ? "小球" : "下盘") + ':{point.odds3}
时间:{point.writetime}
' + (size == true ? "大球" : shangpanHome ? "下盘" : "上盘") + '{point.odds1}
盘口:{point.pk}
' + (size == true ? "小球" : shangpanHome ? "上盘" : "下盘") + ':{point.odds3}
时间:{point.writetime}
" }; h.credits = { enabled: true, text: "", href: "javascript:;", style: { cursor: "default" } }; h.series = [{ name: "", data: [], lineWidth: 1 }]; return h } chart.createAisaChart = chartt.createAisaChart = function(h) { return chart.createChart(1, h) } ; chart.createSizeChart = chartt.createSizeChart = function(h) { return chart.createChart(2, h) } ; var d = function(k) { var l = k.length > 0 ? k[0].pk : ""; if (l.indexOf("受让") != -1) { shangpanHome = true } var m = []; for (var h = 0; h < k.length; h++) { var j = k[h]; m.push({ y: j.odds1, odds1: j.odds1, odds2: j.odds2, odds3: j.odds3, pk: j.pk, writetime: j.writetime }) } return m }; var c = function(j) { var h = []; var k = 0; var i = new ArrayEx(j); if (j.length <= 5) { h = i.Select(function(l) { return l.writetime }) } else { k = parseInt(i.length / 5) + 1; i.Each(function(m, l) { if (l % k == 0) { h.push(m.writetime) } }) } return { categories: h, tickInterval: k } }; chart.createLineChart = chartt.createLineChart = function(n, j, m, k, l) { var o = d(j); var h = new ArrayEx(o).Select(function(p) { return p.writetime }); var i = b(); i.xAxis.tickInterval = parseInt(h.length / 5) + 1; i.chart.renderTo = k; i.title.text = m; if (typeof l === "undefined") { l = false } i.xAxis.labels.enabled = l; if (n == 1) { i.series.name = "亚盘" } else { if (n == 2) { i.series.name = "大小" } } return new Highcharts.Chart(i,function(p) { p.series[0].setData(o); p.xAxis[0].setCategories(h); setChartPointColor(p); var r = 0; var s = 0; try { s = o.length > 0 ? o.length - 1 : 0 } catch (q) {} p.xAxis[0].addPlotBand({ from: r, to: s, color: "#fff" }) } ) } ; chart.createChart = chartt.createChart = function(j, i) { var k = d(i); var h = new ArrayEx(k).Select(function(l) { return l.writetime }); if (h.length > 5) { if (j == 1) { a.xAxis.tickInterval = parseInt(h.length / 5) + 1 } else { f.xAxis.tickInterval = parseInt(h.length / 5) + 1 } } return new Highcharts.Chart(j == 1 ? a : f,function(l) { l.series[0].setData(k); l.xAxis[0].setCategories(h); setChartPointColor(l); var n = 0; var o = 0; try { o = k.length > 0 ? k.length - 1 : 0 } catch (m) {} l.xAxis[0].addPlotBand({ from: n, to: o, color: "#fff" }) } ) } ; $(function() { $(".settbtnm3").each(function() { if ($(this).is(".onsec")) { size = true } else { size = false } }) }); var a = { legend: { enabled: false }, title: { text: "" }, labels: { items: [{ html: "亚盘走势图", style: { left: "150px;", top: "0px;", color: "#99b" } }] }, xAxis: { labels: { enabled: false, }, tickInterval: 3 }, yAxis: { title: { text: "" }, plotLines: [{ value: 0, width: 1, color: "#808080" }], labels: { formatter: function() { return Highcharts.numberFormat(this.value, 2) } } }, credits: { enabled: true, text: "", href: "javascript:;", style: { cursor: "default" } }, tooltip: { shared: true, useHTML: true, headerFormat: '
', pointFormat: ' ', footerFormat: "
上盘1:{point.odds1}
盘口:{point.pk}
下盘:{point.odds3}
时间:{point.writetime}
" }, series: [{ name: "亚盘", data: [], lineWidth: 1 }] }; var f = { legend: { enabled: false }, title: { text: "" }, labels: { items: [{ html: "大小走势图", style: { left: "150px;", top: "-5px;", color: "#99b", height: "80px" } }] }, xAxis: { labels: { enabled: false, }, tickInterval: 1 }, yAxis: { title: { text: "" }, plotLines: [{ value: 0.95, width: 1, color: "#808080" }], labels: { formatter: function() { return Highcharts.numberFormat(this.value, 2) } } }, credits: { enabled: true, text: "", href: "javascript:;", style: { cursor: "default" } }, tooltip: { shared: true, useHTML: true, headerFormat: '
', pointFormat: ' ', footerFormat: "
大盘:{point.odds1}
盘口:{point.pk}
小盘:{point.odds3}
时间:{point.writetime}
" }, series: [{ name: "亚盘", data: [], lineWidth: 1 }] }; chart.createFlowChart = chartt.createFlowChart = function(o, m, j) { var p = d(m); var h = new ArrayEx(p).Select(function(q) { return q.writetime }); if (h.length > 5) { if (o == 1) { a.xAxis.tickInterval = parseInt(h.length / 5) + 1 } else { f.xAxis.tickInterval = parseInt(h.length / 5) + 1 } } j.highcharts(o == 1 ? a : f); var i = j.highcharts(); i.series[0].setData(p); i.xAxis[0].setCategories(h); setChartPointColor(i); var l = 0; var n = 0; try { n = p.length > 0 ? p.length - 1 : 0 } catch (k) {} i.xAxis[0].addPlotBand({ from: l, to: n, color: "#fff" }) } } )(window);