You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
450 KiB
45 lines
450 KiB
3 months ago
|
!function (t, e) { "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e(t.echarts = {}) }(this, function (t) {
|
||
|
"use strict"; function e(t) { var e = {}, i = {}, n = t.match(/Firefox\/([\d.]+)/), r = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/), a = t.match(/Edge\/([\d.]+)/), o = /micromessenger/i.test(t); return n && (i.firefox = !0, i.version = n[1]), r && (i.ie = !0, i.version = r[1]), a && (i.edge = !0, i.version = a[1]), o && (i.weChat = !0), { browser: i, os: e, node: !1, canvasSupported: !!document.createElement("canvas").getContext, svgSupported: "undefined" != typeof SVGRect, touchEventsSupported: "ontouchstart" in window && !i.ie && !i.edge, pointerEventsSupported: "onpointerdown" in window && (i.edge || i.ie && i.version >= 11), domSupported: "undefined" != typeof document } } function i(t, e) { "createCanvas" === t && (Gf = null), Vf[t] = e } function n(t) { if (null == t || "object" != typeof t) return t; var e = t, i = Of.call(t); if ("[object Array]" === i) { if (!B(t)) { e = []; for (var r = 0, a = t.length; a > r; r++)e[r] = n(t[r]) } } else if (Lf[i]) { if (!B(t)) { var o = t.constructor; if (t.constructor.from) e = o.from(t); else { e = new o(t.length); for (var r = 0, a = t.length; a > r; r++)e[r] = n(t[r]) } } } else if (!Pf[i] && !B(t) && !T(t)) { e = {}; for (var s in t) t.hasOwnProperty(s) && (e[s] = n(t[s])) } return e } function r(t, e, i) { if (!S(e) || !S(t)) return i ? n(e) : t; for (var a in e) if (e.hasOwnProperty(a)) { var o = t[a], s = e[a]; !S(s) || !S(o) || _(s) || _(o) || T(s) || T(o) || M(s) || M(o) || B(s) || B(o) ? !i && a in t || (t[a] = n(e[a], !0)) : r(o, s, i) } return t } function a(t, e) { for (var i = t[0], n = 1, a = t.length; a > n; n++)i = r(i, t[n], e); return i } function o(t, e) { for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]); return t } function s(t, e, i) { for (var n in e) e.hasOwnProperty(n) && (i ? null != e[n] : null == t[n]) && (t[n] = e[n]); return t } function l() { return Gf || (Gf = Hf().getContext("2d")), Gf } function h(t, e) { if (t) { if (t.indexOf) return t.indexOf(e); for (var i = 0, n = t.length; n > i; i++)if (t[i] === e) return i } return -1 } function u(t, e) { function i() { } var n = t.prototype; i.prototype = e.prototype, t.prototype = new i; for (var r in n) t.prototype[r] = n[r]; t.prototype.constructor = t, t.superClass = e } function c(t, e, i) { t = "prototype" in t ? t.prototype : t, e = "prototype" in e ? e.prototype : e, s(t, e, i) } function d(t) { return t ? "string" == typeof t ? !1 : "number" == typeof t.length : void 0 } function f(t, e, i) { if (t && e) if (t.forEach && t.forEach === zf) t.forEach(e, i); else if (t.length === +t.length) for (var n = 0, r = t.length; r > n; n++)e.call(i, t[n], n, t); else for (var a in t) t.hasOwnProperty(a) && e.call(i, t[a], a, t) } function p(t, e, i) { if (t && e) { if (t.map && t.map === Nf) return t.map(e, i); for (var n = [], r = 0, a = t.length; a > r; r++)n.push(e.call(i, t[r], r, t)); return n } } function g(t, e, i, n) { if (t && e) { if (t.reduce && t.reduce === Ff) return t.reduce(e, i, n); for (var r = 0, a = t.length; a > r; r++)i = e.call(n, i, t[r], r, t); return i } } function v(t, e, i) { if (t && e) { if (t.filter && t.filter === Bf) return t.filter(e, i); for (var n = [], r = 0, a = t.length; a > r; r++)e.call(i, t[r], r, t) && n.push(t[r]); return n } } function m(t, e, i) { if (t && e) for (var n = 0, r = t.length; r > n; n++)if (e.call(i, t[n], n, t)) return t[n] } function y(t, e) { var i = Rf.call(arguments, 2); return function () { return t.apply(e, i.concat(Rf.call(arguments))) } } function x(t) { var e = Rf.call(arguments, 1); return function () { return t.apply(this, e.concat(Rf.call(arguments))) } } function _(t) { return "[object Array]" === Of.call(t) } function w(t) { return "function" == typeof t } function b(t) { return "[object String]" === Of.call(t) } function S(t) { var e = typeof t; return "function" === e || !!t && "object" === e } function M(t) { return !!Pf[Of.call(t)] } function I(t) { return !!Lf[Of.call(t)] } function T(t) { return "object" == typeof t && "number" == typeof t.nodeType && "object" == typeof t.ownerDocument } functi
|
||
|
return null == t || 0 >= e || "transparent" === t || "none" === t ? null : t.image || t.colorStops ? "#000" : t
|
||
|
} function gn(t) { return null == t || "none" === t ? null : t.image || t.colorStops ? "#000" : t } function vn(t, e) { return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t } function mn(t, e, i) { return "right" === e ? t - i[1] : "center" === e ? t + i[3] / 2 - i[1] / 2 : t + i[3] } function yn(t, e) { return null != t && (t || e.textBackgroundColor || e.textBorderWidth && e.textBorderColor || e.textPadding) } function xn(t) { t = t || {}, Bp.call(this, t); for (var e in t) t.hasOwnProperty(e) && "style" !== e && (this[e] = t[e]); this.style = new Zp(t.style, this), this._rect = null, this.__clipPaths = [] } function _n(t) { xn.call(this, t) } function wn(t) { return parseInt(t, 10) } function bn(t) { return t ? t.__builtin__ ? !0 : "function" != typeof t.resize || "function" != typeof t.refresh ? !1 : !0 : !1 } function Sn(t, e, i) { return xg.copy(t.getBoundingRect()), t.transform && xg.applyTransform(t.transform), _g.width = e, _g.height = i, !xg.intersect(_g) } function Mn(t, e) { if (t === e) return !1; if (!t || !e || t.length !== e.length) return !0; for (var i = 0; i < t.length; i++)if (t[i] !== e[i]) return !0 } function In(t, e) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.setTransform(e), e.beginPath(), n.buildPath(e, n.shape), e.clip(), n.restoreTransform(e) } } function Tn(t, e) { var i = document.createElement("div"); return i.style.cssText = ["position:relative", "overflow:hidden", "width:" + t + "px", "height:" + e + "px", "padding:0", "margin:0", "border-width:0"].join(";") + ";", i } function Cn(t) { return "mousewheel" === t && kf.browser.firefox ? "DOMMouseScroll" : t } function Dn(t) { t._touching = !0, clearTimeout(t._touchTimer), t._touchTimer = setTimeout(function () { t._touching = !1 }, 700) } function An(t) { var e = t.pointerType; return "pen" === e || "touch" === e } function kn(t) { function e(t, e) { return function () { return e._touching ? void 0 : t.apply(e, arguments) } } f(Ig, function (e) { t._handlers[e] = y(Dg[e], t) }), f(Cg, function (e) { t._handlers[e] = y(Dg[e], t) }), f(Mg, function (i) { t._handlers[i] = e(Dg[i], t) }) } function Pn(t) { function e(e, i) { f(e, function (e) { ve(t, Cn(e), i._handlers[e]) }, i) } Qf.call(this), this.dom = t, this._touching = !1, this._touchTimer, this._handlers = {}, kn(this), kf.pointerEventsSupported ? e(Cg, this) : (kf.touchEventsSupported && e(Ig, this), e(Mg, this)) } function Ln(t, e) { var i = new Eg(Df(), t, e); return Lg[i.id] = i, i } function On(t) { if (t) t.dispose(); else { for (var e in Lg) Lg.hasOwnProperty(e) && Lg[e].dispose(); Lg = {} } return this } function En(t) { return Lg[t] } function zn(t, e) { Pg[t] = e } function Bn(t) { delete Lg[t] } function Rn(t) { return t instanceof Array ? t : null == t ? [] : [t] } function Nn(t, e, i) { if (t) { t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {}; for (var n = 0, r = i.length; r > n; n++) { var a = i[n]; !t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a) && (t.emphasis[e][a] = t[e][a]) } } } function Fn(t) { return !Rg(t) || Ng(t) || t instanceof Date ? t : t.value } function Vn(t) { return Rg(t) && !(t instanceof Array) } function Hn(t, e) { e = (e || []).slice(); var i = p(t || [], function (t) { return { exist: t } }); return Bg(e, function (t, n) { if (Rg(t)) { for (var r = 0; r < i.length; r++)if (!i[r].option && null != t.id && i[r].exist.id === t.id + "") return i[r].option = t, void (e[n] = null); for (var r = 0; r < i.length; r++) { var a = i[r].exist; if (!(i[r].option || null != a.id && null != t.id || null == t.name || Xn(t) || Xn(a) || a.name !== t.name + "")) return i[r].option = t, void (e[n] = null) } } }), Bg(e, function (t) { if (Rg(t)) { for (var e = 0; e < i.length; e++) { var n = i[e].exist; if (!i[e].option && !Xn(n) && null == t.id) { i[e].option = t; break } } e >= i.length && i.push({ option: t }) } }), i } function Gn(t) { var e = N(); Bg(t, function (t) { var i = t.exist; i && e.set(i.id, t) }), Bg(t, function (t) { var i = t.option; O(!i || n
|
||
|
return t = (t || "").toLowerCase().replace(/-(.)/g, function (t, e) { return e.toUpperCase() }), e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)), t
|
||
|
} function go(t) { return null == t ? "" : (t + "").replace(Gm, function (t, e) { return Wm[e] }) } function vo(t, e, i) { _(e) || (e = [e]); var n = e.length; if (!n) return ""; for (var r = e[0].$vars || [], a = 0; a < r.length; a++) { var o = Xm[a]; t = t.replace(jm(o), jm(o, 0)) } for (var s = 0; n > s; s++)for (var l = 0; l < r.length; l++) { var h = e[s][r[l]]; t = t.replace(jm(Xm[l], s), i ? go(h) : h) } return t } function mo(t, e, i) { return f(e, function (e, n) { t = t.replace("{" + n + "}", i ? go(e) : e) }), t } function yo(t, e) { t = b(t) ? { color: t, extraCssText: e } : t || {}; var i = t.color, n = t.type, e = t.extraCssText, r = t.renderMode || "html", a = t.markerId || "X"; return i ? "html" === r ? "subItem" === n ? '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' + go(i) + ";" + (e || "") + '"></span>' : '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + go(i) + ";" + (e || "") + '"></span>' : { renderMode: r, content: "{marker" + a + "|} ", style: { color: i } } : "" } function xo(t, e) { return t += "", "0000".substr(0, e - t.length) + t } function _o(t, e, i) { ("week" === t || "month" === t || "quarter" === t || "half-year" === t || "year" === t) && (t = "MM-dd\nyyyy"); var n = ao(e), r = i ? "UTC" : "", a = n["get" + r + "FullYear"](), o = n["get" + r + "Month"]() + 1, s = n["get" + r + "Date"](), l = n["get" + r + "Hours"](), h = n["get" + r + "Minutes"](), u = n["get" + r + "Seconds"](), c = n["get" + r + "Milliseconds"](); return t = t.replace("MM", xo(o, 2)).replace("M", o).replace("yyyy", a).replace("yy", a % 100).replace("dd", xo(s, 2)).replace("d", s).replace("hh", xo(l, 2)).replace("h", l).replace("mm", xo(h, 2)).replace("m", h).replace("ss", xo(u, 2)).replace("s", u).replace("SSS", xo(c, 3)) } function wo(t) { return t ? t.charAt(0).toUpperCase() + t.substr(1) : t } function bo(t) { return Ri(t.text, t.font, t.textAlign, t.textVerticalAlign, t.textPadding, t.textLineHeight, t.rich, t.truncate) } function So(t, e, i, n, r, a, o, s) { return Ri(t, e, i, n, r, s, a, o) } function Mo(t, e, i, n, r) { var a = 0, o = 0; null == n && (n = 1 / 0), null == r && (r = 1 / 0); var s = 0; e.eachChild(function (l, h) { var u, c, d = l.position, f = l.getBoundingRect(), p = e.childAt(h + 1), g = p && p.getBoundingRect(); if ("horizontal" === t) { var v = f.width + (g ? -g.x + f.x : 0); u = a + v, u > n || l.newline ? (a = 0, u = v, o += s + i, s = f.height) : s = Math.max(s, f.height) } else { var m = f.height + (g ? -g.y + f.y : 0); c = o + m, c > r || l.newline ? (a += s + i, o = 0, c = m, s = f.width) : s = Math.max(s, f.width) } l.newline || (d[0] = a, d[1] = o, "horizontal" === t ? a = u + i : o = c + i) }) } function Io(t, e, i) { i = Hm(i || 0); var n = e.width, r = e.height, a = $a(t.left, n), o = $a(t.top, r), s = $a(t.right, n), l = $a(t.bottom, r), h = $a(t.width, n), u = $a(t.height, r), c = i[2] + i[0], d = i[1] + i[3], f = t.aspect; switch (isNaN(h) && (h = n - s - d - a), isNaN(u) && (u = r - l - c - o), null != f && (isNaN(h) && isNaN(u) && (f > n / r ? h = .8 * n : u = .8 * r), isNaN(h) && (h = f * u), isNaN(u) && (u = h / f)), isNaN(a) && (a = n - s - h - d), isNaN(o) && (o = r - l - u - c), t.left || t.right) { case "center": a = n / 2 - h / 2 - i[3]; break; case "right": a = n - h - d }switch (t.top || t.bottom) { case "middle": case "center": o = r / 2 - u / 2 - i[0]; break; case "bottom": o = r - u - c }a = a || 0, o = o || 0, isNaN(h) && (h = n - d - a - (s || 0)), isNaN(u) && (u = r - c - o - (l || 0)); var p = new mi(a + i[3], o + i[0], h, u); return p.margin = i, p } function To(t, e, i) { function n(i, n) { var o = {}, l = 0, h = {}, u = 0, c = 2; if (Um(i, function (e) { h[e] = t[e] }), Um(i, function (t) { r(e, t) && (o[t] = h[t] = e[t]), a(o, t) && l++ , a(h, t) && u++ }), s[n]) return a(e, i[1]) ? h[i[2]] = null : a(e, i[2]) && (h[i[1]] = null), h; if (u !== c && l) { if (l >= c) return o; for (var d = 0
|
||
|
function r(t, e, i) { null != u_.get(e) ? t.otherDims[e] = i : (t.coordDim = e, t.coordDimIndex = i, u.set(e, !0)) } Oo.isInstance(e) || (e = Oo.seriesDataToSource(e)), i = i || {}, t = (t || []).slice(); for (var a = (i.dimsDef || []).slice(), l = N(i.encodeDef), h = N(), u = N(), c = [], d = Ph(e, t, a, i.dimCount), p = 0; d > p; p++) {
|
||
|
var g = a[p] = o({}, S(a[p]) ? a[p] : { name: a[p] }), v = g.name, m = c[p] = { otherDims: {} }; null != v && null == h.get(v) && (m.name = m.displayName = v, h.set(v, p)), null != g.type && (m.type = g.type), null != g.displayName && (m.displayName = g.displayName)
|
||
|
} l.each(function (t, e) { if (t = Rn(t).slice(), 1 === t.length && t[0] < 0) return void l.set(e, !1); var i = l.set(e, []); f(t, function (t, n) { b(t) && (t = h.get(t)), null != t && d > t && (i[n] = t, r(c[t], e, n)) }) }); var y = 0; f(t, function (t) { var e, t, i, a; if (b(t)) e = t, t = {}; else { e = t.name; var o = t.ordinalMeta; t.ordinalMeta = null, t = n(t), t.ordinalMeta = o, i = t.dimsDef, a = t.otherDims, t.name = t.coordDim = t.coordDimIndex = t.dimsDef = t.otherDims = null } var h = l.get(e); if (h !== !1) { var h = Rn(h); if (!h.length) for (var u = 0; u < (i && i.length || 1); u++) { for (; y < c.length && null != c[y].coordDim;)y++; y < c.length && h.push(y++) } f(h, function (n, o) { var l = c[n]; if (r(s(l, t), e, o), null == l.name && i) { var h = i[o]; !S(h) && (h = { name: h }), l.name = l.displayName = h.name, l.defaultTooltip = h.defaultTooltip } a && s(l.otherDims, a) }) } }); var x = i.generateCoord, _ = i.generateCoordCount, w = null != _; _ = x ? _ || 1 : 0; for (var M = x || "value", I = 0; d > I; I++) { var m = c[I] = c[I] || {}, T = m.coordDim; null == T && (m.coordDim = Lh(M, u, w), m.coordDimIndex = 0, (!x || 0 >= _) && (m.isExtraCoord = !0), _--), null == m.name && (m.name = Lh(m.coordDim, h)), null == m.type && Xo(e, I, m.name) && (m.type = "ordinal") } return c
|
||
|
} function Ph(t, e, i, n) { var r = Math.max(t.dimensionsDetectCount || 1, e.length, i.length, n || 0); return f(e, function (t) { var e = t.dimsDef; e && (r = Math.max(r, e.length)) }), r } function Lh(t, e, i) { if (i || null != e.get(t)) { for (var n = 0; null != e.get(t + n);)n++; t += n } return e.set(t, !0), t } function Oh(t, e, i) { i = i || {}; var n, r, a, o, s = i.byIndex, l = i.stackedCoordDimension, h = !(!t || !t.get("stack")); if (f(e, function (t, i) { b(t) && (e[i] = t = { name: t }), h && !t.isExtraCoord && (s || n || !t.ordinalMeta || (n = t), r || "ordinal" === t.type || "time" === t.type || l && l !== t.coordDim || (r = t)) }), !r || s || n || (s = !0), r) { a = "__\x00ecstackresult", o = "__\x00ecstackedover", n && (n.createInvertedIndices = !0); var u = r.coordDim, c = r.type, d = 0; f(e, function (t) { t.coordDim === u && d++ }), e.push({ name: a, coordDim: u, coordDimIndex: d, type: c, isExtraCoord: !0, isCalculationCoord: !0 }), d++ , e.push({ name: o, coordDim: o, coordDimIndex: d, type: c, isExtraCoord: !0, isCalculationCoord: !0 }) } return { stackedDimension: r && r.name, stackedByDimension: n && n.name, isStackedByIndex: s, stackedOverDimension: o, stackResultDimension: a } } function Eh(t, e) { return !!e && e === t.getCalculationInfo("stackedDimension") } function zh(t, e) { return Eh(t, e) ? t.getCalculationInfo("stackResultDimension") : e } function Bh(t, e, i) { i = i || {}, Oo.isInstance(t) || (t = Oo.seriesDataToSource(t)); var n, r = e.get("coordinateSystem"), a = ts.get(r), o = Po(e); o && (n = p(o.coordSysDims, function (t) { var e = { name: t }, i = o.axisMap.get(t); if (i) { var n = i.get("type"); e.type = gh(n) } return e })), n || (n = a && (a.getDimensionsInfo ? a.getDimensionsInfo() : a.dimensions.slice()) || ["x", "y"]); var s, l, h = M_(t, { coordDimensions: n, generateCoord: i.generateCoord }); o && f(h, function (t, e) { var i = t.coordDim, n = o.categoryAxisMap.get(i); n && (null == s && (s = e), t.ordinalMeta = n.getOrdinalMeta()), null != t.otherDims.itemName && (l = !0) }), l || null == s || (h[s].otherDims.itemName = 0); var u = Oh(e, h), c = new w_(h, e); c.setCalculationInfo(u); var d = null != s && Rh(t) ? function (t, e, i, n) { return n === s ? i : this.defaultDimValueGetter(t, e, i, n) } : null; return c.hasItemOption = !1, c.initData(t, null, d), c } function Rh(t) { if (t.sourceFormat === oy) { var e = Nh(t.data || []); return null != e && !_(Fn(e)) } } function Nh(t) { for (var e = 0; e < t.length && null == t[e];)e++; return t[e] } function Fh(t) { this._setting = t || {}, this._extent = [1 / 0, -1 / 0], this._interval = 0, this.init && this.init.apply(this, arguments) } function Vh(t) { this.categories = t.categories || [], this._needCollect = t.needCollect, this._deduplication = t.deduplication, this._map } function Hh(t) { return t._map || (t._map = N(t.categories)) } function Gh(t) { return S(t) && null != t.value ? t.value : t + "" } function Wh(t, e, i, n) { var r = {}, a = t[1] - t[0], o = r.interval = lo(a / e, !0); null != i && i > o && (o = r.interval = i), null != n && o > n && (o = r.interval = n); var s = r.intervalPrecision = Xh(o), l = r.niceTickExtent = [D_(Math.ceil(t[0] / o) * o, s), D_(Math.floor(t[1] / o) * o, s)]; return Yh(l, t), r } function Xh(t) { return to(t) + 2 } function jh(t, e, i) { t[e] = Math.max(Math.min(t[e], i[1]), i[0]) } function Yh(t, e) { !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), jh(t, 0, e), jh(t, 1, e), t[0] > t[1] && (t[0] = t[1]) } function qh(t, e, i, n) { var r = []; if (!t) return r; var a = 1e4; e[0] < i[0] && r.push(e[0]); for (var o = i[0]; o <= i[1] && (r.push(o), o = D_(o + t, n), o !== r[r.length - 1]);)if (r.length > a) return []; return e[1] > (r.length ? r[r.length - 1] : i[1]) && r.push(e[1]), r } function Uh(t) { return t.get("stack") || P_ + t.seriesIndex } function Zh(t) { return t.dim + t.index } function $h(t, e) { var i = []; return e.eachSeriesByType(t, function (t) { eu(t) && !iu(t) && i.push(t) }), i } function Kh(t) { var e = []; return f(t, function (t) { var
|
||
|
function s(e, i, n) { for (var r = e; i > r; r++)if (t[r].y += n, r > e && i > r + 1 && t[r + 1].y > t[r].y + t[r].height) return void l(r, n / 2); l(i - 1, n / 2) } function l(e, i) { for (var n = e; n >= 0 && (t[n].y -= i, !(n > 0 && t[n].y > t[n - 1].y + t[n - 1].height)); n--); } function h(t, e, i, n, r, a) {
|
||
|
for (var o = a > 0 ? e ? Number.MAX_VALUE : 0 : e ? Number.MAX_VALUE : 0, s = 0, l = t.length; l > s; s++) {
|
||
|
var h = Math.abs(t[s].y - n), u = t[s].len, c = t[s].len2, d = r + u > h ? Math.sqrt((r + u + c) * (r + u + c) - h * h) : Math.abs(t[s].x - i);
|
||
|
e && d >= o && (d = o - 10), !e && o >= d && (d = o + 10), t[s].x = i + d * a, o = d
|
||
|
}
|
||
|
} t.sort(function (t, e) { return t.y - e.y }); for (var u, c = 0, d = t.length, f = [], p = [], g = 0; d > g; g++)u = t[g].y - c, 0 > u && s(g, d, -u, r), c = t[g].y + t[g].height; 0 > o - c && l(d - 1, c - o); for (var g = 0; d > g; g++)t[g].y >= i ? p.push(t[g]) : f.push(t[g]); h(f, !1, e, i, n, r), h(p, !0, e, i, n, r)
|
||
|
} function cd(t, e, i, n, r, a) { for (var o = [], s = [], l = 0; l < t.length; l++)dd(t[l]) || (t[l].x < e ? o.push(t[l]) : s.push(t[l])); ud(s, e, i, n, 1, r, a), ud(o, e, i, n, -1, r, a); for (var l = 0; l < t.length; l++)if (!dd(t[l])) { var h = t[l].linePoints; if (h) { var u = h[1][0] - h[2][0]; h[2][0] = t[l].x < e ? t[l].x + 3 : t[l].x - 3, h[1][1] = h[2][1] = t[l].y, h[1][0] = h[2][0] + u } } } function dd(t) { return "center" === t.position } function fd(t, e, i) { var n, r = {}, a = "toggleSelected" === t; return i.eachComponent("legend", function (i) { a && null != n ? i[n ? "select" : "unSelect"](e.name) : (i[t](e.name), n = i.isSelected(e.name)); var o = i.getData(); f(o, function (t) { var e = t.get("name"); if ("\n" !== e && "" !== e) { var n = i.isSelected(e); r[e] = r.hasOwnProperty(e) ? r[e] && n : n } }) }), { name: e.name, selected: r } } function pd(t, e) { var i = Hm(e.get("padding")), n = e.getItemStyle(["color", "opacity"]); n.fill = e.get("backgroundColor"); var t = new um({ shape: { x: t.x - i[3], y: t.y - i[0], width: t.width + i[1] + i[3], height: t.height + i[0] + i[2], r: e.get("borderRadius") }, style: n, silent: !0, z2: -1 }); return t } function gd(t, e) { e.dispatchAction({ type: "legendToggleSelect", name: t }) } function vd(t, e, i, n) { var r = i.getZr().storage.getDisplayList()[0]; r && r.useHoverLayer || i.dispatchAction({ type: "highlight", seriesName: t, name: e, excludeSeriesId: n }) } function md(t, e, i, n) { var r = i.getZr().storage.getDisplayList()[0]; r && r.useHoverLayer || i.dispatchAction({ type: "downplay", seriesName: t, name: e, excludeSeriesId: n }) } function yd(t, e, i) { var n = t.getOrient(), r = [1, 1]; r[n.index] = 0, To(e, i, { type: "box", ignoreSize: r }) } function xd(t, e, i, n, r) { var a = t.axis; if (!a.scale.isBlank() && a.containData(e)) { if (!t.involveSeries) return void i.showPointer(t, e); var s = _d(e, t), l = s.payloadBatch, h = s.snapToValue; l[0] && null == r.seriesIndex && o(r, l[0]), !n && t.snap && a.containData(h) && null != h && (e = h), i.showPointer(t, e, l, r), i.showTooltip(t, s, h) } } function _d(t, e) { var i = e.axis, n = i.dim, r = t, a = [], o = Number.MAX_VALUE, s = -1; return Nb(e.seriesModels, function (e) { var l, h, u = e.getData().mapDimension(n, !0); if (e.getAxisTooltipData) { var c = e.getAxisTooltipData(u, t, i); h = c.dataIndices, l = c.nestestValue } else { if (h = e.getData().indicesOfNearest(u[0], t, "category" === i.type ? .5 : null), !h.length) return; l = e.getData().get(u[0], h[0]) } if (null != l && isFinite(l)) { var d = t - l, f = Math.abs(d); o >= f && ((o > f || d >= 0 && 0 > s) && (o = f, s = d, r = l, a.length = 0), Nb(h, function (t) { a.push({ seriesIndex: e.seriesIndex, dataIndexInside: t, dataIndex: e.getData().getRawIndex(t) }) })) } }), { payloadBatch: a, snapToValue: r } } function wd(t, e, i, n) { t[e.key] = { value: i, payloadBatch: n } } function bd(t, e, i, n) { var r = i.payloadBatch, a = e.axis, o = a.model, s = e.axisPointerModel; if (e.triggerTooltip && r.length) { var l = e.coordSys.model, h = Tc(l), u = t.map[h]; u || (u = t.map[h] = { coordSysId: l.id, coordSysIndex: l.componentIndex, coordSysType: l.type, coordSysMainType: l.mainType, dataByAxis: [] }, t.list.push(u)), u.dataByAxis.push({ axisDim: a.dim, axisIndex: o.componentIndex, axisType: o.type, axisId: o.id, value: n, valueLabelOpt: { precision: s.get("label.precision"), formatter: s.get("label.formatter") }, seriesDataIndices: r.slice() }) } } function Sd(t, e, i) { var n = i.axesInfo = []; Nb(e, function (e, i) { var r = e.axisPointerModel.option, a = t[i]; a ? (!e.useHandle && (r.status = "show"), r.value = a.value, r.seriesDataIndices = (a.payloadBatch || []).slice()) : !e.useHandle && (r.status = "hide"), "show" === r.status && n.push({ axisDim: e.axis.dim, axisIndex: e.axis.model.componentIndex, value: r.value }) }) } function Md(t, e, i, n) { if (Dd(e) || !t.list.length) return void n({ type: "hideTip" }); var r = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {}; n({ type: "showTip", escapeConnect:
|
||
|
this._tracks = {}, this._target = t, this._loop = e || !1, this._getter = i || ei, this._setter = n || ii, this._clipCount = 0, this._delay = 0, this._doneList = [], this._onframeList = [], this._clipList = []
|
||
|
}; Ap.prototype = { when: function (t, e) { var i = this._tracks; for (var n in e) if (e.hasOwnProperty(n)) { if (!i[n]) { i[n] = []; var r = this._getter(this._target, n); if (null == r) continue; 0 !== t && i[n].push({ time: 0, value: ui(r) }) } i[n].push({ time: t, value: e[n] }) } return this }, during: function (t) { return this._onframeList.push(t), this }, pause: function () { for (var t = 0; t < this._clipList.length; t++)this._clipList[t].pause(); this._paused = !0 }, resume: function () { for (var t = 0; t < this._clipList.length; t++)this._clipList[t].resume(); this._paused = !1 }, isPaused: function () { return !!this._paused }, _doneCallback: function () { this._tracks = {}, this._clipList.length = 0; for (var t = this._doneList, e = t.length, i = 0; e > i; i++)t[i].call(this) }, start: function (t, e) { var i, n = this, r = 0, a = function () { r-- , r || n._doneCallback() }; for (var o in this._tracks) if (this._tracks.hasOwnProperty(o)) { var s = fi(this, t, a, this._tracks[o], o, e); s && (this._clipList.push(s), r++ , this.animation && this.animation.addClip(s), i = s) } if (i) { var l = i.onframe; i.onframe = function (t, e) { l(t, e); for (var i = 0; i < n._onframeList.length; i++)n._onframeList[i](t, e) } } return r || this._doneCallback(), this }, stop: function (t) { for (var e = this._clipList, i = this.animation, n = 0; n < e.length; n++) { var r = e[n]; t && r.onframe(this._target, 1), i && i.removeClip(r) } e.length = 0 }, delay: function (t) { return this._delay = t, this }, done: function (t) { return t && this._doneList.push(t), this }, getClips: function () { return this._clipList } }; var kp = 1; "undefined" != typeof window && (kp = Math.max(window.devicePixelRatio || 1, 1)); var Pp = 0, Lp = kp, Op = function () { }; 1 === Pp ? Op = function () { for (var t in arguments) throw new Error(arguments[t]) } : Pp > 1 && (Op = function () { for (var t in arguments) console.log(arguments[t]) }); var Ep = Op, zp = function () { this.animators = [] }; zp.prototype = { constructor: zp, animate: function (t, e) { var i, n = !1, r = this, a = this.__zr; if (t) { var o = t.split("."), s = r; n = "shape" === o[0]; for (var l = 0, u = o.length; u > l; l++)s && (s = s[o[l]]); s && (i = s) } else i = r; if (!i) return void Ep('Property "' + t + '" is not existed in element ' + r.id); var c = r.animators, d = new Ap(i, e); return d.during(function () { r.dirty(n) }).done(function () { c.splice(h(c, d), 1) }), c.push(d), a && a.animation.addAnimator(d), d }, stopAnimation: function (t) { for (var e = this.animators, i = e.length, n = 0; i > n; n++)e[n].stop(t); return e.length = 0, this }, animateTo: function (t, e, i, n, r, a) { pi(this, t, e, i, n, r, a) }, animateFrom: function (t, e, i, n, r, a) { pi(this, t, e, i, n, r, a, !0) } }; var Bp = function (t) { cp.call(this, t), Qf.call(this, t), zp.call(this, t), this.id = t.id || Df() }; Bp.prototype = { type: "element", name: "", __zr: null, ignore: !1, clipPath: null, isGroup: !1, drift: function (t, e) { switch (this.draggable) { case "horizontal": e = 0; break; case "vertical": t = 0 }var i = this.transform; i || (i = this.transform = [1, 0, 0, 1, 0, 0]), i[4] += t, i[5] += e, this.decomposeTransform(), this.dirty(!1) }, beforeUpdate: function () { }, afterUpdate: function () { }, update: function () { this.updateTransform() }, traverse: function () { }, attrKV: function (t, e) { if ("position" === t || "scale" === t || "origin" === t) { if (e) { var i = this[t]; i || (i = this[t] = []), i[0] = e[0], i[1] = e[1] } } else this[t] = e }, hide: function () { this.ignore = !0, this.__zr && this.__zr.refresh() }, show: function () { this.ignore = !1, this.__zr && this.__zr.refresh() }, attr: function (t, e) { if ("string" == typeof t) this.attrKV(t, e); else if (S(t)) for (var i in t) t.hasOwnProperty(i) && this.attrKV(i, t[i]); return this.dirty(!1), this }, setClipPath: function (t) { var e = this.__zr; e && t.addSelfToZr(e), this.clipPath && this.clipPath !== t && this.removeClipPath(), this.clipPath = t, t.__zr = e, t.__clipTarget = this, this.dirt
|
||
|
for (var e = 0; e < t.length; e++)t[e][1] || (t[e][1] = t[e][0]);
|
||
|
return function (e, i, n) { for (var r = {}, a = 0; a < t.length; a++) { var o = t[a][1]; if (!(i && h(i, o) >= 0 || n && h(n, o) < 0)) { var s = e.getShallow(o); null != s && (r[t[a][0]] = s) } } return r }
|
||
|
}, Yg = jg([["lineWidth", "width"], ["stroke", "color"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]), qg = { getLineStyle: function (t) { var e = Yg(this, t), i = this.getLineDash(e.lineWidth); return i && (e.lineDash = i), e }, getLineDash: function (t) { null == t && (t = 1); var e = this.get("type"), i = Math.max(t, 2), n = 4 * t; return "solid" === e || null == e ? null : "dashed" === e ? [n, n] : [i, i] } }, Ug = jg([["fill", "color"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["opacity"], ["shadowColor"]]), Zg = { getAreaStyle: function (t, e) { return Ug(this, t, e) } }, $g = Math.pow, Kg = Math.sqrt, Qg = 1e-8, Jg = 1e-4, tv = Kg(3), ev = 1 / 3, iv = H(), nv = H(), rv = H(), av = Math.min, ov = Math.max, sv = Math.sin, lv = Math.cos, hv = 2 * Math.PI, uv = H(), cv = H(), dv = H(), fv = [], pv = [], gv = { M: 1, L: 2, C: 3, Q: 4, A: 5, Z: 6, R: 7 }, vv = [], mv = [], yv = [], xv = [], _v = Math.min, wv = Math.max, bv = Math.cos, Sv = Math.sin, Mv = Math.sqrt, Iv = Math.abs, Tv = "undefined" != typeof Float32Array, Cv = function (t) { this._saveData = !t, this._saveData && (this.data = []), this._ctx = null }; Cv.prototype = { constructor: Cv, _xi: 0, _yi: 0, _x0: 0, _y0: 0, _ux: 0, _uy: 0, _len: 0, _lineDash: null, _dashOffset: 0, _dashIdx: 0, _dashSum: 0, setScale: function (t, e) { this._ux = Iv(1 / Lp / t) || 0, this._uy = Iv(1 / Lp / e) || 0 }, getContext: function () { return this._ctx }, beginPath: function (t) { return this._ctx = t, t && t.beginPath(), t && (this.dpr = t.dpr), this._saveData && (this._len = 0), this._lineDash && (this._lineDash = null, this._dashOffset = 0), this }, moveTo: function (t, e) { return this.addData(gv.M, t, e), this._ctx && this._ctx.moveTo(t, e), this._x0 = t, this._y0 = e, this._xi = t, this._yi = e, this }, lineTo: function (t, e) { var i = Iv(t - this._xi) > this._ux || Iv(e - this._yi) > this._uy || this._len < 5; return this.addData(gv.L, t, e), this._ctx && i && (this._needsDash() ? this._dashedLineTo(t, e) : this._ctx.lineTo(t, e)), i && (this._xi = t, this._yi = e), this }, bezierCurveTo: function (t, e, i, n, r, a) { return this.addData(gv.C, t, e, i, n, r, a), this._ctx && (this._needsDash() ? this._dashedBezierTo(t, e, i, n, r, a) : this._ctx.bezierCurveTo(t, e, i, n, r, a)), this._xi = r, this._yi = a, this }, quadraticCurveTo: function (t, e, i, n) { return this.addData(gv.Q, t, e, i, n), this._ctx && (this._needsDash() ? this._dashedQuadraticTo(t, e, i, n) : this._ctx.quadraticCurveTo(t, e, i, n)), this._xi = i, this._yi = n, this }, arc: function (t, e, i, n, r, a) { return this.addData(gv.A, t, e, i, i, n, r - n, 0, a ? 0 : 1), this._ctx && this._ctx.arc(t, e, i, n, r, a), this._xi = bv(r) * i + t, this._yi = Sv(r) * i + e, this }, arcTo: function (t, e, i, n, r) { return this._ctx && this._ctx.arcTo(t, e, i, n, r), this }, rect: function (t, e, i, n) { return this._ctx && this._ctx.rect(t, e, i, n), this.addData(gv.R, t, e, i, n), this }, closePath: function () { this.addData(gv.Z); var t = this._ctx, e = this._x0, i = this._y0; return t && (this._needsDash() && this._dashedLineTo(e, i), t.closePath()), this._xi = e, this._yi = i, this }, fill: function (t) { t && t.fill(), this.toStatic() }, stroke: function (t) { t && t.stroke(), this.toStatic() }, setLineDash: function (t) { if (t instanceof Array) { this._lineDash = t, this._dashIdx = 0; for (var e = 0, i = 0; i < t.length; i++)e += t[i]; this._dashSum = e } return this }, setLineDashOffset: function (t) { return this._dashOffset = t, this }, len: function () { return this._len }, setData: function (t) { var e = t.length; this.data && this.data.length === e || !Tv || (this.data = new Float32Array(e)); for (var i = 0; e > i; i++)this.data[i] = t[i]; this._len = e }, appendPath: function (t) { t instanceof Array || (t = [t]); for (var e = t.length, i = 0, n = this._len, r = 0; e > r; r++)i += t[r].len(); Tv && this.data instanceof Float32Array && (this.data = new Float32Array(n + i)); for (var r = 0; e > r; r++)for (var a = t[r].data, o = 0; o < a.le
|
||
|
constructor: es, setOption: function (t, e) {
|
||
|
t && f(Rn(t.series), function (t) { t && t.data && I(t.data) && z(t.data) }), t = _y(t, !0); var i = this._optionBackup, n = is.call(this, t, e, !i); this._newBaseOption = n.baseOption, i ? (os(i.baseOption, n.baseOption), n.timelineOptions.length && (i.timelineOptions = n.timelineOptions), n.mediaList.length && (i.mediaList = n.mediaList), n.mediaDefault && (i.mediaDefault = n.mediaDefault)) : this._optionBackup = n
|
||
|
}, mountOption: function (t) { var e = this._optionBackup; return this._timelineOptions = wy(e.timelineOptions, _y), this._mediaList = wy(e.mediaList, _y), this._mediaDefault = _y(e.mediaDefault), this._currentMediaIndices = [], _y(t ? e.baseOption : this._newBaseOption) }, getTimelineOption: function (t) { var e, i = this._timelineOptions; if (i.length) { var n = t.getComponent("timeline"); n && (e = _y(i[n.getCurrentIndex()], !0)) } return e }, getMediaOption: function () { var t = this._api.getWidth(), e = this._api.getHeight(), i = this._mediaList, n = this._mediaDefault, r = [], a = []; if (!i.length && !n) return a; for (var o = 0, s = i.length; s > o; o++)ns(i[o].query, t, e) && r.push(o); return !r.length && n && (r = [-1]), r.length && !as(r, this._currentMediaIndices) && (a = wy(r, function (t) { return _y(-1 === t ? n.option : i[t].option) })), this._currentMediaIndices = r, a }
|
||
|
}; var My = f, Iy = S, Ty = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"], Cy = function (t, e) { My(fs(t.series), function (t) { Iy(t) && ds(t) }); var i = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"]; e && i.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), My(i, function (e) { My(fs(t[e]), function (t) { t && (us(t, "axisLabel"), us(t.axisPointer, "label")) }) }), My(fs(t.parallel), function (t) { var e = t && t.parallelAxisDefault; us(e, "axisLabel"), us(e && e.axisPointer, "label") }), My(fs(t.calendar), function (t) { ls(t, "itemStyle"), us(t, "dayLabel"), us(t, "monthLabel"), us(t, "yearLabel") }), My(fs(t.radar), function (t) { us(t, "name") }), My(fs(t.geo), function (t) { Iy(t) && (cs(t), My(fs(t.regions), function (t) { cs(t) })) }), My(fs(t.timeline), function (t) { cs(t), ls(t, "label"), ls(t, "itemStyle"), ls(t, "controlStyle", !0); var e = t.data; _(e) && f(e, function (t) { S(t) && (ls(t, "label"), ls(t, "itemStyle")) }) }), My(fs(t.toolbox), function (t) { ls(t, "iconStyle"), My(t.feature, function (t) { ls(t, "iconStyle") }) }), us(ps(t.axisPointer), "label"), us(ps(t.tooltip).axisPointer, "label") }, Dy = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]], Ay = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"], ky = function (t, e) { Cy(t, e), t.series = Rn(t.series), f(t.series, function (t) { if (S(t)) { var e = t.type; if (("pie" === e || "gauge" === e) && null != t.clockWise && (t.clockwise = t.clockWise), "gauge" === e) { var i = gs(t, "pointer.color"); null != i && vs(t, "itemStyle.normal.color", i) } ms(t) } }), t.dataRange && (t.visualMap = t.dataRange), f(Ay, function (e) { var i = t[e]; i && (_(i) || (i = [i]), f(i, function (t) { ms(t) })) }) }, Py = function (t) { var e = N(); t.eachSeries(function (t) { var i = t.get("stack"); if (i) { var n = e.get(i) || e.set(i, []), r = t.getData(), a = { stackResultDimension: r.getCalculationInfo("stackResultDimension"), stackedOverDimension: r.getCalculationInfo("stackedOverDimension"), stackedDimension: r.getCalculationInfo("stackedDimension"), stackedByDimension: r.getCalculationInfo("stackedByDimension"), isStackedByIndex: r.getCalculationInfo("isStackedByIndex"), data: r, seriesModel: t }; if (!a.stackedDimension || !a.isStackedByIndex && !a.stackedByDimension) return; n.length && r.setCalculationInfo("stackedOnSeries", n[n.length - 1].seriesModel), n.push(a) } }), e.each(ys) }, Ly = xs.prototype; Ly.pure = !1, Ly.persistent = !0, Ly.getSource = function () { return this._source }; var Oy = { arrayRows_column: { pure: !0, count: function () { return Math.max(0, this._data.length - this._source.startIndex) }, getItem: function (t) { return this._data[t + this._source.startIndex] }, appendData: bs }, arrayRows_row: { pure: !0, count: function () { var t = this._data[0]; return t ? Math.max(0, t.length - this._source.startIndex) : 0 }, getItem: function (t) { t += this._source.startIndex; for (var e = [], i = this._data, n = 0; n < i.length; n++) { var r = i[n]; e.push(r ? r[t] : null) } return e }, appendData: function () { throw new Error('Do not support appendData when set seriesLayoutBy: "row".') } }, objectRows: { pure: !0, count: _s, getItem: ws, appendData: bs }, keyedColumns: { pure: !0, count: function () { var t = this._source.dimensionsDefine[0].name, e = this._data[t]; return e ? e.length : 0 }, getItem: function (t) { for (var e = [], i = this._source.dimensionsDefine, n = 0; n < i.length; n++) { var r = this._data[i[n].name]; e.push(r ? r[t] : null) } return e }, appendData: function (t) { var e = this._data; f(t, function (t, i) { for (var n = e[i] || (e[i] = []), r = 0; r < (t || []).length; r++)n.push(t[r]) }) } }, original: { count: _s, getItem: ws, appendData: bs }, typedArray: { persistent: !1, pure: !0, count: function () { return this._data ? this._data.length / this._dimSize : 0 }, getItem: function (t, e) { t -= this._offset, e = e || []; for (var i = this._dimSize * t, n =
|
||
|
this._zr.resize(t);
|
||
|
var e = this._model; if (this._loadingFX && this._loadingFX.resize(), e) { var i = e.resetOption("media"), n = t && t.silent; this[Wx] = !0, i && bl(this), qx.update.call(this), this[Wx] = !1, Tl.call(this, n), Cl.call(this, n) }
|
||
|
}, Yx.showLoading = function (t, e) { if (kx(t) && (e = t, t = ""), t = t || "default", this.hideLoading(), i_[t]) { var i = i_[t](this._api, e), n = this._zr; this._loadingFX = i, n.add(i) } }, Yx.hideLoading = function () { this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null }, Yx.makeActionFromEvent = function (t) { var e = o({}, t); return e.type = $x[t.type], e }, Yx.dispatchAction = function (t, e) { if (kx(e) || (e = { silent: !!e }), Zx[t.type] && this._model) { if (this[Wx]) return void this._pendingActions.push(t); Il.call(this, t, e.silent), e.flush ? this._zr.flush(!0) : e.flush !== !1 && kf.browser.weChat && this._throttledZrFlush(), Tl.call(this, e.silent), Cl.call(this, e.silent) } }, Yx.appendData = function (t) { var e = t.seriesIndex, i = this.getModel(), n = i.getSeriesByIndex(e); n.appendData(t), this._scheduler.unfinished = !0 }, Yx.on = yl("on"), Yx.off = yl("off"), Yx.one = yl("one"); var Ux = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"]; Yx._initEvents = function () { Dx(Ux, function (t) { var e = function (e) { var i, n = this.getModel(), r = e.target, a = "globalout" === t; if (a) i = {}; else if (r && null != r.dataIndex) { var s = r.dataModel || n.getSeriesByIndex(r.seriesIndex); i = s && s.getDataParams(r.dataIndex, r.dataType, r) || {} } else r && r.eventData && (i = o({}, r.eventData)); if (i) { var l = i.componentType, h = i.componentIndex; ("markLine" === l || "markPoint" === l || "markArea" === l) && (l = "series", h = i.seriesIndex); var u = l && null != h && n.getComponent(l, h), c = u && this["series" === u.mainType ? "_chartsMap" : "_componentsMap"][u.__viewId]; i.event = e, i.type = t, this._ecEventProcessor.eventInfo = { targetEl: r, packedEvent: i, model: u, view: c }, this.trigger(t, i) } }; e.zrEventfulCallAtLast = !0, this._zr.on(t, e, this) }, this), Dx($x, function (t, e) { this._messageCenter.on(e, function (t) { this.trigger(e, t) }, this) }, this) }, Yx.isDisposed = function () { return this._disposed }, Yx.clear = function () { this.setOption({ series: [] }, !0) }, Yx.dispose = function () { if (!this._disposed) { this._disposed = !0, Zn(this.getDom(), s_, ""); var t = this._api, e = this._model; Dx(this._componentsViews, function (i) { i.dispose(e, t) }), Dx(this._chartsViews, function (i) { i.dispose(e, t) }), this._zr.dispose(), delete n_[this.id] } }, c(_l, Qf), Fl.prototype = { constructor: Fl, normalizeQuery: function (t) { var e = {}, i = {}, n = {}; if (b(t)) { var r = Px(t); e.mainType = r.main || null, e.subType = r.sub || null } else { var a = ["Index", "Name", "Id"], o = { name: 1, dataIndex: 1, dataType: 1 }; f(t, function (t, r) { for (var s = !1, l = 0; l < a.length; l++) { var h = a[l], u = r.lastIndexOf(h); if (u > 0 && u === r.length - h.length) { var c = r.slice(0, u); "data" !== c && (e.mainType = c, e[h.toLowerCase()] = t, s = !0) } } o.hasOwnProperty(r) && (i[r] = t, s = !0), s || (n[r] = t) }) } return { cptQuery: e, dataQuery: i, otherQuery: n } }, filter: function (t, e) { function i(t, e, i, n) { return null == t[i] || e[n || i] === t[i] } var n = this.eventInfo; if (!n) return !0; var r = n.targetEl, a = n.packedEvent, o = n.model, s = n.view; if (!o || !s) return !0; var l = e.cptQuery, h = e.dataQuery; return i(l, o, "mainType") && i(l, o, "subType") && i(l, o, "index", "componentIndex") && i(l, o, "name") && i(l, o, "id") && i(h, a, "name") && i(h, a, "dataIndex") && i(h, a, "dataType") && (!s.filterForExposedEvent || s.filterForExposedEvent(t, e.otherQuery, r, a)) }, afterTrigger: function () { this.eventInfo = null } }; var Zx = {}, $x = {}, Kx = [], Qx = [], Jx = [], t_ = [], e_ = {}, i_ = {}, n_ = {}, r_ = {}, a_ = new Date - 0, o_ = new Date - 0, s_ = "_echarts_instance_", l_ = Wl; eh(Nx, Qy), Ul(ky), Zl(Bx, Py), nh("default", ix), Kl({ type: "highlight", event: "highlight", update: "highlight" }, V), Kl({ type: "downplay", event: "downplay", update: "downplay" }, V), ql("light", ux), ql("dark", px); var h_ = {}; dh.prototype = { constructor:
|
||
|
yw[t] = Am[t]
|
||
|
}); var xw = function (t) { this._axes = {}, this._dimList = [], this.name = t || "" }; xw.prototype = { constructor: xw, type: "cartesian", getAxis: function (t) { return this._axes[t] }, getAxes: function () { return p(this._dimList, Gu, this) }, getAxesByScale: function (t) { return t = t.toLowerCase(), v(this.getAxes(), function (e) { return e.scale.type === t }) }, addAxis: function (t) { var e = t.dim; this._axes[e] = t, this._dimList.push(e) }, dataToCoord: function (t) { return this._dataCoordConvert(t, "dataToCoord") }, coordToData: function (t) { return this._dataCoordConvert(t, "coordToData") }, _dataCoordConvert: function (t, e) { for (var i = this._dimList, n = t instanceof Array ? [] : {}, r = 0; r < i.length; r++) { var a = i[r], o = this._axes[a]; n[a] = o[e](t[a]) } return n } }, Wu.prototype = { constructor: Wu, type: "cartesian2d", dimensions: ["x", "y"], getBaseAxis: function () { return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x") }, containPoint: function (t) { var e = this.getAxis("x"), i = this.getAxis("y"); return e.contain(e.toLocalCoord(t[0])) && i.contain(i.toLocalCoord(t[1])) }, containData: function (t) { return this.getAxis("x").containData(t[0]) && this.getAxis("y").containData(t[1]) }, dataToPoint: function (t, e, i) { var n = this.getAxis("x"), r = this.getAxis("y"); return i = i || [], i[0] = n.toGlobalCoord(n.dataToCoord(t[0])), i[1] = r.toGlobalCoord(r.dataToCoord(t[1])), i }, clampData: function (t, e) { var i = this.getAxis("x").scale, n = this.getAxis("y").scale, r = i.getExtent(), a = n.getExtent(), o = i.parse(t[0]), s = n.parse(t[1]); return e = e || [], e[0] = Math.min(Math.max(Math.min(r[0], r[1]), o), Math.max(r[0], r[1])), e[1] = Math.min(Math.max(Math.min(a[0], a[1]), s), Math.max(a[0], a[1])), e }, pointToData: function (t, e) { var i = this.getAxis("x"), n = this.getAxis("y"); return e = e || [], e[0] = i.coordToData(i.toLocalCoord(t[0])), e[1] = n.coordToData(n.toLocalCoord(t[1])), e }, getOtherAxis: function (t) { return this.getAxis("x" === t.dim ? "y" : "x") } }, u(Wu, xw); var _w = function (t, e, i, n, r) { gw.call(this, t, e, i), this.type = n || "value", this.position = r || "bottom" }; _w.prototype = { constructor: _w, index: 0, getAxesOnZeroOf: null, model: null, isHorizontal: function () { var t = this.position; return "top" === t || "bottom" === t }, getGlobalExtent: function (t) { var e = this.getExtent(); return e[0] = this.toGlobalCoord(e[0]), e[1] = this.toGlobalCoord(e[1]), t && e[0] > e[1] && e.reverse(), e }, getOtherAxis: function () { this.grid.getOtherAxis() }, pointToData: function (t, e) { return this.coordToData(this.toLocalCoord(t["x" === this.dim ? 0 : 1]), e) }, toLocalCoord: null, toGlobalCoord: null }, u(_w, gw); var ww = { show: !0, zlevel: 0, z: 0, inverse: !1, name: "", nameLocation: "end", nameRotate: null, nameTruncate: { maxWidth: null, ellipsis: "...", placeholder: "." }, nameTextStyle: {}, nameGap: 15, silent: !1, triggerEvent: !1, tooltip: { show: !1 }, axisPointer: {}, axisLine: { show: !0, onZero: !0, onZeroAxisIndex: null, lineStyle: { color: "#333", width: 1, type: "solid" }, symbol: ["none", "none"], symbolSize: [10, 15] }, axisTick: { show: !0, inside: !1, length: 5, lineStyle: { width: 1 } }, axisLabel: { show: !0, inside: !1, rotate: 0, showMinLabel: null, showMaxLabel: null, margin: 8, fontSize: 12 }, splitLine: { show: !0, lineStyle: { color: ["#ccc"], width: 1, type: "solid" } }, splitArea: { show: !1, areaStyle: { color: ["rgba(250,250,250,0.3)", "rgba(200,200,200,0.3)"] } } }, bw = {}; bw.categoryAxis = r({ boundaryGap: !0, deduplication: null, splitLine: { show: !1 }, axisTick: { alignWithLabel: !1, interval: "auto" }, axisLabel: { interval: "auto" } }, ww), bw.valueAxis = r({ boundaryGap: [0, 0], splitNumber: 5 }, ww), bw.timeAxis = s({ scale: !0, min: "dataMin", max: "dataMax" }, bw.valueAxis), bw.logAxis = s({ scale: !0, logBase: 10 }, bw.valueAxis); var Sw = ["value", "category", "time", "log"], Mw = function (t, e, i, n) { f(Sw, function (o) { e.extend({ type: t + "A
|
||
|
return {
|
||
|
seriesType: t, modifyOutputEnd: !0, reset: function (t) {
|
||
|
var e = t.getData(), i = t.get("sampling"), n = t.coordinateSystem; if ("cartesian2d" === n.type && i) {
|
||
|
var r = n.getBaseAxis(), a = n.getOtherAxis(r), o = r.getExtent(), s = o[1] - o[0], l = Math.round(e.count() / s);
|
||
|
if (l > 1) { var h; "string" == typeof i ? h = db[i] : "function" == typeof i && (h = i), h && t.setData(e.downSample(e.mapDimension(a.dim), 1 / l, h, fb)) }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}; eh(ub("line", "circle", "line")), th(cb("line")), Zl(Gx.PROCESSOR.STATISTIC, pb("line")); var gb = function (t, e, i) { e = _(e) && { coordDimensions: e } || o({}, e); var n = t.getSource(), r = M_(n, e), a = new w_(r, t); return a.initData(n, i), a }, vb = { updateSelectedMap: function (t) { this._targetList = _(t) ? t.slice() : [], this._selectTargetMap = g(t || [], function (t, e) { return t.set(e.name, e), t }, N()) }, select: function (t, e) { var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t), n = this.get("selectedMode"); "single" === n && this._selectTargetMap.each(function (t) { t.selected = !1 }), i && (i.selected = !0) }, unSelect: function (t, e) { var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t); i && (i.selected = !1) }, toggleSelected: function (t, e) { var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t); return null != i ? (this[i.selected ? "unSelect" : "select"](t, e), i.selected) : void 0 }, isSelected: function (t, e) { var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t); return i && i.selected } }, mb = oh({ type: "series.pie", init: function (t) { mb.superApply(this, "init", arguments), this.legendDataProvider = function () { return this.getRawData() }, this.updateSelectedMap(this._createSelectableList()), this._defaultLabelLine(t) }, mergeOption: function (t) { mb.superCall(this, "mergeOption", t), this.updateSelectedMap(this._createSelectableList()) }, getInitialData: function () { return gb(this, ["value"]) }, _createSelectableList: function () { for (var t = this.getRawData(), e = t.mapDimension("value"), i = [], n = 0, r = t.count(); r > n; n++)i.push({ name: t.getName(n), value: t.get(e, n), selected: Cs(t, n, "selected") }); return i }, getDataParams: function (t) { var e = this.getData(), i = mb.superCall(this, "getDataParams", t), n = []; return e.each(e.mapDimension("value"), function (t) { n.push(t) }), i.percent = io(n, t, e.hostModel.get("percentPrecision")), i.$vars.push("percent"), i }, _defaultLabelLine: function (t) { Nn(t, "labelLine", ["show"]); var e = t.labelLine, i = t.emphasis.labelLine; e.show = e.show && t.label.show, i.show = i.show && t.emphasis.label.show }, defaultOption: { zlevel: 0, z: 2, legendHoverLink: !0, hoverAnimation: !0, center: ["50%", "50%"], radius: [0, "75%"], clockwise: !0, startAngle: 90, minAngle: 0, selectedOffset: 10, hoverOffset: 10, avoidLabelOverlap: !0, percentPrecision: 2, stillShowZeroSum: !0, label: { rotate: !1, show: !0, position: "outer" }, labelLine: { show: !0, length: 15, length2: 15, smooth: !1, lineStyle: { width: 1, type: "solid" } }, itemStyle: { borderWidth: 1 }, animationType: "expansion", animationEasing: "cubicOut" } }); c(mb, vb); var yb = hd.prototype; yb.updateData = function (t, e, i) { function n() { a.stopAnimation(!0), a.animateTo({ shape: { r: u.r + l.get("hoverOffset") } }, 300, "elasticOut") } function r() { a.stopAnimation(!0), a.animateTo({ shape: { r: u.r } }, 300, "elasticOut") } var a = this.childAt(0), l = t.hostModel, h = t.getItemModel(e), u = t.getItemLayout(e), c = o({}, u); if (c.label = null, i) { a.setShape(c); var d = l.getShallow("animationType"); "scale" === d ? (a.shape.r = u.r0, Ea(a, { shape: { r: u.r } }, l, e)) : (a.shape.endAngle = u.startAngle, Oa(a, { shape: { endAngle: u.endAngle } }, l, e)) } else Oa(a, { shape: c }, l, e); var f = t.getItemVisual(e, "color"); a.useStyle(s({ lineJoin: "bevel", fill: f }, h.getModel("itemStyle").getItemStyle())), a.hoverStyle = h.getModel("emphasis.itemStyle").getItemStyle(); var p = h.getShallow("cursor"); p && a.attr("cursor", p), ld(this, t.getItemLayout(e), l.isSelected(null, e), l.get("selectedOffset"), l.get("animation")), a.off("mouseover").off("mouseout").off("emphasis").off("normal"), h.get("hoverAnimation") && l.isAnimationEnabled() && a.on("mouseover", n).on("mouseout", r).on("emphasis", n).on("normal", r), this._updateLabel(t, e), _a(this) }, yb._updateLabel = function (t, e) { var i = this.childAt(1), n = this.childAt(2), r = t.hostModel, a = t.getItemModel(e), o =
|
||
|
constructor: nf, _enterable: !0, update: function () { }, show: function () {
|
||
|
this._hideTimeout && clearTimeout(this._hideTimeout), this.el.attr("show", !0), this._show = !0
|
||
|
}, setContent: function (t, e, i) { this.el && this._zr.remove(this.el); for (var n = {}, r = t, a = "{marker", o = "|}", s = r.indexOf(a); s >= 0;) { var l = r.indexOf(o), h = r.substr(s + a.length, l - s - a.length); n["marker" + h] = h.indexOf("sub") > -1 ? { textWidth: 4, textHeight: 4, textBorderRadius: 2, textBackgroundColor: e[h], textOffset: [3, 0] } : { textWidth: 10, textHeight: 10, textBorderRadius: 5, textBackgroundColor: e[h] }, r = r.substr(l + 1), s = r.indexOf("{marker") } this.el = new Qv({ style: { rich: n, text: t, textLineHeight: 20, textBackgroundColor: i.get("backgroundColor"), textBorderRadius: i.get("borderRadius"), textFill: i.get("textStyle.color"), textPadding: i.get("padding") }, z: i.get("z") }), this._zr.add(this.el); var u = this; this.el.on("mouseover", function () { u._enterable && (clearTimeout(u._hideTimeout), u._show = !0), u._inContent = !0 }), this.el.on("mouseout", function () { u._enterable && u._show && u.hideLater(u._hideDelay), u._inContent = !1 }) }, setEnterable: function (t) { this._enterable = t }, getSize: function () { var t = this.el.getBoundingRect(); return [t.width, t.height] }, moveTo: function (t, e) { this.el && this.el.attr("position", [t, e]) }, hide: function () { this.el.hide(), this._show = !1 }, hideLater: function (t) { !this._show || this._inContent && this._enterable || (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout = setTimeout(y(this.hide, this), t)) : this.hide()) }, isShow: function () { return this._show }, getOuterSize: function () { return this.getSize() }
|
||
|
}; var tS = y, eS = f, iS = $a, nS = new um({ shape: { x: -1, y: -1, width: 2, height: 2 } }); ah({ type: "tooltip", init: function (t, e) { if (!kf.node) { var i = t.getComponent("tooltip"), n = i.get("renderMode"); this._renderMode = Kn(n); var r; "html" === this._renderMode ? (r = new ef(e.getDom(), e), this._newLine = "<br/>") : (r = new nf(e), this._newLine = "\n"), this._tooltipContent = r } }, render: function (t, e, i) { if (!kf.node) { this.group.removeAll(), this._tooltipModel = t, this._ecModel = e, this._api = i, this._lastDataByCoordSys = null, this._alwaysShowContent = t.get("alwaysShowContent"); var n = this._tooltipContent; n.update(), n.setEnterable(t.get("enterable")), this._initGlobalListener(), this._keepShow() } }, _initGlobalListener: function () { var t = this._tooltipModel, e = t.get("triggerOn"); Ad("itemTooltip", this._api, tS(function (t, i, n) { "none" !== e && (e.indexOf(t) >= 0 ? this._tryShow(i, n) : "leave" === t && this._hide(n)) }, this)) }, _keepShow: function () { var t = this._tooltipModel, e = this._ecModel, i = this._api; if (null != this._lastX && null != this._lastY && "none" !== t.get("triggerOn")) { var n = this; clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function () { n.manuallyShowTip(t, e, i, { x: n._lastX, y: n._lastY }) }) } }, manuallyShowTip: function (t, e, i, n) { if (n.from !== this.uid && !kf.node) { var r = af(n, i); this._ticket = ""; var a = n.dataByCoordSys; if (n.tooltip && null != n.x && null != n.y) { var o = nS; o.position = [n.x, n.y], o.update(), o.tooltip = n.tooltip, this._tryShow({ offsetX: n.x, offsetY: n.y, target: o }, r) } else if (a) this._tryShow({ offsetX: n.x, offsetY: n.y, position: n.position, event: {}, dataByCoordSys: n.dataByCoordSys, tooltipOption: n.tooltipOption }, r); else if (null != n.seriesIndex) { if (this._manuallyAxisShowTip(t, e, i, n)) return; var s = Rb(n, e), l = s.point[0], h = s.point[1]; null != l && null != h && this._tryShow({ offsetX: l, offsetY: h, position: n.position, target: s.el, event: {} }, r) } else null != n.x && null != n.y && (i.dispatchAction({ type: "updateAxisPointer", x: n.x, y: n.y }), this._tryShow({ offsetX: n.x, offsetY: n.y, position: n.position, target: i.getZr().findHover(n.x, n.y).target, event: {} }, r)) } }, manuallyHideTip: function (t, e, i, n) { var r = this._tooltipContent; !this._alwaysShowContent && this._tooltipModel && r.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = null, n.from !== this.uid && this._hide(af(n, i)) }, _manuallyAxisShowTip: function (t, e, i, n) { var r = n.seriesIndex, a = n.dataIndex, o = e.getComponent("axisPointer").coordSysAxesInfo; if (null != r && null != a && null != o) { var s = e.getSeriesByIndex(r); if (s) { var l = s.getData(), t = rf([l.getItemModel(a), s, (s.coordinateSystem || {}).model, t]); if ("axis" === t.get("trigger")) return i.dispatchAction({ type: "updateAxisPointer", seriesIndex: r, dataIndex: a, position: n.position }), !0 } } }, _tryShow: function (t, e) { var i = t.target, n = this._tooltipModel; if (n) { this._lastX = t.offsetX, this._lastY = t.offsetY; var r = t.dataByCoordSys; r && r.length ? this._showAxisTooltip(r, t) : i && null != i.dataIndex ? (this._lastDataByCoordSys = null, this._showSeriesItemTooltip(t, i, e)) : i && i.tooltip ? (this._lastDataByCoordSys = null, this._showComponentItemTooltip(t, i, e)) : (this._lastDataByCoordSys = null, this._hide(e)) } }, _showOrMove: function (t, e) { var i = t.get("showDelay"); e = y(e, this), clearTimeout(this._showTimout), i > 0 ? this._showTimout = setTimeout(e, i) : e() }, _showAxisTooltip: function (t, e) { var i = this._ecModel, n = this._tooltipModel, a = [e.offsetX, e.offsetY], o = [], s = [], l = rf([e.tooltipOption, n]), h = this._renderMode, u = this._newLine, c = {}; eS(t, function (t) { eS(t.dataByAxis, function (t) { var e = i.getComponent(t.axisDim + "Axis", t.axisIndex), n = t.value, a = []; if (e && null != n) { var l = jd(n, e.axis, i, t.seriesDataIndices, t.valueLabelOpt); f(t.seriesDataIndices, function (o
|
||
|
});
|