!
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, e) {
"createcanvas" === t && (q_ = null),
j_[t] = e
}
function i(t) {
if (null == t || "object" != typeof t) return t;
var e = t,
n = g_.call(t);
if ("[object array]" === n) {
if (!o(t)) {
e = [];
for (var o = 0,
a = t.length; o < a; o++) e[o] = i(t[o])
}
} else if (v_[n]) {
if (!o(t)) {
var r = t.constructor;
if (t.constructor.from) e = r.from(t);
else {
e = new r(t.length);
for (var o = 0,
a = t.length; o < a; o++) e[o] = i(t[o])
}
}
} else if (!b_[n] && !o(t) && !m(t)) {
e = {};
for (var s in t) t.hasownproperty(s) && (e[s] = i(t[s]))
}
return e
}
function n(t, e, o) {
if (!w(e) || !w(t)) return o ? i(e) : t;
for (var a in e) if (e.hasownproperty(a)) {
var r = t[a],
s = e[a]; ! w(s) || !w(r) || y(s) || y(r) || m(s) || m(r) || b(s) || b(r) || o(s) || o(r) ? !o && a in t || (t[a] = i(e[a], !0)) : n(r, s, o)
}
return t
}
function o(t, e) {
for (var i = t[0], o = 1, a = t.length; o < a; o++) i = n(i, t[o], e);
return i
}
function a(t, e) {
for (var i in e) e.hasownproperty(i) && (t[i] = e[i]);
return t
}
function r(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 s() {
return q_ || (q_ = y_().getcontext("2d")),
q_
}
function l(t, e) {
if (t) {
if (t.indexof) return t.indexof(e);
for (var i = 0,
n = t.length; i < n; 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 o in n) t.prototype[o] = n[o];
t.prototype.constructor = t,
t.superclass = e
}
function h(t, e, i) {
r(t = "prototype" in t ? t.prototype: t, e = "prototype" in e ? e.prototype: e, i)
}
function c(t) {
if (t) return "string" != typeof t && "number" == typeof t.length
}
function d(t, e, i) {
if (t && e) if (t.foreach && t.foreach === w_) t.foreach(e, i);
else if (t.length === +t.length) for (var n = 0,
o = t.length; n < o; 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 f(t, e, i) {
if (t && e) {
if (t.map && t.map === u_) return t.map(e, i);
for (var n = [], o = 0, a = t.length; o < a; o++) n.push(e.call(i, t[o], o, t));
return n
}
}
function p(t, e, i, n) {
if (t && e) {
if (t.reduce && t.reduce === x_) return t.reduce(e, i, n);
for (var o = 0,
a = t.length; o < a; o++) i = e.call(n, i, t[o], o, t);
return i
}
}
function g(t, e, i) {
if (t && e) {
if (t.filter && t.filter === h_) return t.filter(e, i);
for (var n = [], o = 0, a = t.length; o < a; o++) e.call(i, t[o], o, t) && n.push(t[o]);
return n
}
}
function m(t, e) {
var i = z_.call(arguments, 2);
return function() {
return t.apply(e, i.concat(z_.call(arguments)))
}
}
function v(t) {
var e = z_.call(arguments, 1);
return function() {
return t.apply(this, e.concat(z_.call(arguments)))
}
}
function y(t) {
return "[object array]" === g_.call(t)
}
function x(t) {
return "function" == typeof t
}
function _(t) {
return "[object string]" === g_.call(t)
}
function w(t) {
var e = typeof t;
return "function" === e || !!t && "object" == e
}
function b(t) {
return !! b_[g_.call(t)]
}
function s(t) {
return !! v_[g_.call(t)]
}
function m(t) {
return "object" == typeof t && "number" == typeof t.nodetype && "object" == typeof t.ownerdocument
}
function i(t) {
return t !== t
}
function t(t) {
for (var e = 0,
i = arguments.length; e < i; e++) if (null != arguments[e]) return arguments[e]
}
function a(t, e) {
return null != t ? t: e
}
function d(t, e, i) {
return null != t ? t: null != e ? e: i
}
function c() {
return function.call.apply(z_, arguments)
}
function l(t) {
if ("number" == typeof t) return [t, t, t, t];
var e = t.length;
return 2 === e ? [t[0], t[1], t[0], t[1]] : 3 === e ? [t[0], t[1], t[2], t[1]] : t
}
function k(t, e) {
if (!t) throw new error(e)
}
function p(t) {
return null == t ? null: "function" == typeof t.trim ? t.trim() : t.replace(/^[\s\ufeff\xa0]+|[\s\ufeff\xa0]+$/g, "")
}
function n(t) {
t[k_] = !0
}
function o(t) {
return t[k_]
}
function e(t) {
function e(t, e) {
i ? n.set(t, e) : n.set(e, t)
}
var i = y(t);
this.data = {};
var n = this;
t instanceof e ? t.each(e) : t && d(t, e)
}
function r(t) {
return new e(t)
}
function z(t, e) {
for (var i = new t.constructor(t.length + e.length), n = 0; n < t.length; n++) i[n] = t[n];
var o = t.length;
for (n = 0; n < e.length; n++) i[n + o] = e[n];
return i
}
function b() {}
function v(t, e) {
var i = new j_(2);
return null == t && (t = 0),
null == e && (e = 0),
i[0] = t,
i[1] = e,
i
}
function g(t, e) {
return t[0] = e[0],
t[1] = e[1],
t
}
function f(t) {
var e = new j_(2);
return e[0] = t[0],
e[1] = t[1],
e
}
function w(t, e, i) {
return t[0] = e,
t[1] = i,
t
}
function h(t, e, i) {
return t[0] = e[0] + i[0],
t[1] = e[1] + i[1],
t
}
function z(t, e, i, n) {
return t[0] = e[0] + i[0] * n,
t[1] = e[1] + i[1] * n,
t
}
function u(t, e, i) {
return t[0] = e[0] - i[0],
t[1] = e[1] - i[1],
t
}
function x(t) {
return math.sqrt(j(t))
}
function j(t) {
return t[0] * t[0] + t[1] * t[1]
}
function y(t, e, i) {
return t[0] = e[0] * i,
t[1] = e[1] * i,
t
}
function q(t, e) {
var i = x(e);
return 0 === i ? (t[0] = 0, t[1] = 0) : (t[0] = e[0] / i, t[1] = e[1] / i),
t
}
function k(t, e) {
return math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]))
}
function $(t, e) {
return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1])
}
function j(t, e, i, n) {
return t[0] = e[0] + n * (i[0] - e[0]),
t[1] = e[1] + n * (i[1] - e[1]),
t
}
function q(t, e, i) {
var n = e[0],
o = e[1];
return t[0] = i[0] * n + i[2] * o + i[4],
t[1] = i[1] * n + i[3] * o + i[5],
t
}
function tt(t, e, i) {
return t[0] = math.min(e[0], i[0]),
t[1] = math.min(e[1], i[1]),
t
}
function et(t, e, i) {
return t[0] = math.max(e[0], i[0]),
t[1] = math.max(e[1], i[1]),
t
}
function it() {
this.on("mousedown", this._dragstart, this),
this.on("mousemove", this._drag, this),
this.on("mouseup", this._dragend, this),
this.on("globalout", this._dragend, this)
}
function nt(t, e) {
return {
target: t,
toptarget: e && e.toptarget
}
}
function ot(t, e) {
var i = t._$eventprocessor;
return null != e && i && i.normalizequery && (e = i.normalizequery(e)),
e
}
function at(t) {
return t.getboundingclientrect ? t.getboundingclientrect() : {
left: 0,
top: 0
}
}
function rt(t, e, i, n) {
return i = i || {},
n || !z_.canvassupported ? st(t, e, i) : z_.browser.firefox && null != e.layerx && e.layerx !== e.offsetx ? (i.zrx = e.layerx, i.zry = e.layery) : null != e.offsetx ? (i.zrx = e.offsetx, i.zry = e.offsety) : st(t, e, i),
i
}
function st(t, e, i) {
var n = at(t);
i.zrx = e.clientx - n.left,
i.zry = e.clienty - n.top
}
function lt(t, e, i) {
if (null != (e = e || window.event).zrx) return e;
var n = e.type;
if (n && n.indexof("touch") >= 0) {
var o = "touchend" != n ? e.targettouches[0] : e.changedtouches[0];
o && rt(t, o, e, i)
} else rt(t, e, e, i),
e.zrdelta = e.wheeldelta ? e.wheeldelta / 120 : -(e.detail || 0) / 3;
var a = e.button;
return null == e.which && void 0 !== a && sw.test(e.type) && (e.which = 1 & a ? 1 : 2 & a ? 3 : 4 & a ? 2 : 0),
e
}
function ut(t, e, i) {
rw ? t.addeventlistener(e, i) : t.attachevent("on" + e, i)
}
function ht(t, e, i) {
rw ? t.removeeventlistener(e, i) : t.detachevent("on" + e, i)
}
function ct(t) {
return t.which > 1
}
function dt(t, e, i) {
return {
type: t,
event: i,
target: e.target,
toptarget: e.toptarget,
cancelbubble: !1,
offsetx: i.zrx,
offsety: i.zry,
gestureevent: i.gestureevent,
pinchx: i.pinchx,
pinchy: i.pinchy,
pinchscale: i.pinchscale,
wheeldelta: i.zrdelta,
zrbytouch: i.zrbytouch,
which: i.which,
stop: ft
}
}
function ft(t) {
lw(this.event)
}
function pt() {}
function gt(t, e, i) {
if (t[t.recthover ? "rectcontain": "contain"](e, i)) {
for (var n, o = t; o;) {
if (o.clippath && !o.clippath.contain(e, i)) return ! 1;
o.silent && (n = !0),
o = o.parent
}
return ! n || uw
}
return ! 1
}
function mt() {
var t = new dw(6);
return vt(t),
t
}
function vt(t) {
return t[0] = 1,
t[1] = 0,
t[2] = 0,
t[3] = 1,
t[4] = 0,
t[5] = 0,
t
}
function yt(t, e) {
return t[0] = e[0],
t[1] = e[1],
t[2] = e[2],
t[3] = e[3],
t[4] = e[4],
t[5] = e[5],
t
}
function xt(t, e, i) {
var n = e[0] * i[0] + e[2] * i[1],
o = e[1] * i[0] + e[3] * i[1],
a = e[0] * i[2] + e[2] * i[3],
r = e[1] * i[2] + e[3] * i[3],
s = e[0] * i[4] + e[2] * i[5] + e[4],
l = e[1] * i[4] + e[3] * i[5] + e[5];
return t[0] = n,
t[1] = o,
t[2] = a,
t[3] = r,
t[4] = s,
t[5] = l,
t
}
function _t(t, e, i) {
return t[0] = e[0],
t[1] = e[1],
t[2] = e[2],
t[3] = e[3],
t[4] = e[4] + i[0],
t[5] = e[5] + i[1],
t
}
function wt(t, e, i) {
var n = e[0],
o = e[2],
a = e[4],
r = e[1],
s = e[3],
l = e[5],
u = math.sin(i),
h = math.cos(i);
return t[0] = n * h + r * u,
t[1] = -n * u + r * h,
t[2] = o * h + s * u,
t[3] = -o * u + h * s,
t[4] = h * a + u * l,
t[5] = h * l - u * a,
t
}
function bt(t, e, i) {
var n = i[0],
o = i[1];
return t[0] = e[0] * n,
t[1] = e[1] * o,
t[2] = e[2] * n,
t[3] = e[3] * o,
t[4] = e[4] * n,
t[5] = e[5] * o,
t
}
function st(t, e) {
var i = e[0],
n = e[2],
o = e[4],
a = e[1],
r = e[3],
s = e[5],
l = i * r - a * n;
return l ? (l = 1 / l, t[0] = r * l, t[1] = -a * l, t[2] = -n * l, t[3] = i * l, t[4] = (n * s - r * o) * l, t[5] = (a * o - i * s) * l, t) : null
}
function mt(t) {
var e = mt();
return yt(e, t),
e
}
function it(t) {
return t > gw || t < -gw
}
function tt(t) {
this._target = t.target,
this._life = t.life || 1e3,
this._delay = t.delay || 0,
this._initialized = !1,
this.loop = null != t.loop && t.loop,
this.gap = t.gap || 0,
this.easing = t.easing || "linear",
this.onframe = t.onframe,
this.ondestroy = t.ondestroy,
this.onrestart = t.onrestart,
this._pausedtime = 0,
this._paused = !1
}
function at(t) {
return (t = math.round(t)) < 0 ? 0 : t > 255 ? 255 : t
}
function dt(t) {
return (t = math.round(t)) < 0 ? 0 : t > 360 ? 360 : t
}
function ct(t) {
return t < 0 ? 0 : t > 1 ? 1 : t
}
function lt(t) {
return at(t.length && "%" === t.charat(t.length - 1) ? parsefloat(t) / 100 * 255 : parseint(t, 10))
}
function kt(t) {
return ct(t.length && "%" === t.charat(t.length - 1) ? parsefloat(t) / 100 : parsefloat(t))
}
function pt(t, e, i) {
return i < 0 ? i += 1 : i > 1 && (i -= 1),
6 * i < 1 ? t + (e - t) * i * 6 : 2 * i < 1 ? e: 3 * i < 2 ? t + (e - t) * (2 / 3 - i) * 6 : t
}
function nt(t, e, i) {
return t + (e - t) * i
}
function ot(t, e, i, n, o) {
return t[0] = e,
t[1] = i,
t[2] = n,
t[3] = o,
t
}
function et(t, e) {
return t[0] = e[0],
t[1] = e[1],
t[2] = e[2],
t[3] = e[3],
t
}
function rt(t, e) {
cw && et(cw, e),
cw = dw.put(t, cw || e.slice())
}
function zt(t, e) {
if (t) {
e = e || [];
var i = dw.get(t);
if (i) return et(e, i);
var n = (t += "").replace(/ /g, "").tolowercase();
if (n in aw) return et(e, aw[n]),
rt(t, e),
e;
if ("#" !== n.charat(0)) {
var o = n.indexof("("),
a = n.indexof(")");
if ( - 1 !== o && a + 1 === n.length) {
var r = n.substr(0, o),
s = n.substr(o + 1, a - (o + 1)).split(","),
l = 1;
switch (r) {
case "rgba":
if (4 !== s.length) return void ot(e, 0, 0, 0, 1);
l = kt(s.pop());
case "rgb":
return 3 !== s.length ? void ot(e, 0, 0, 0, 1) : (ot(e, lt(s[0]), lt(s[1]), lt(s[2]), l), rt(t, e), e);
case "hsla":
return 4 !== s.length ? void ot(e, 0, 0, 0, 1) : (s[3] = kt(s[3]), bt(s, e), rt(t, e), e);
case "hsl":
return 3 !== s.length ? void ot(e, 0, 0, 0, 1) : (bt(s, e), rt(t, e), e);
default:
return
}
}
ot(e, 0, 0, 0, 1)
} else {
if (4 === n.length) return (u = parseint(n.substr(1), 16)) >= 0 && u <= 4095 ? (ot(e, (3840 & u) >> 4 | (3840 & u) >> 8, 240 & u | (240 & u) >> 4, 15 & u | (15 & u) << 4, 1), rt(t, e), e) : void ot(e, 0, 0, 0, 1);
if (7 === n.length) {
var u = parseint(n.substr(1), 16);
return u >= 0 && u <= 16777215 ? (ot(e, (16711680 & u) >> 16, (65280 & u) >> 8, 255 & u, 1), rt(t, e), e) : void ot(e, 0, 0, 0, 1)
}
}
}
}
function bt(t, e) {
var i = (parsefloat(t[0]) % 360 + 360) % 360 / 360,
n = kt(t[1]),
o = kt(t[2]),
a = o <= .5 ? o * (n + 1) : o + n - o * n,
r = 2 * o - a;
return e = e || [],
ot(e, at(255 * pt(r, a, i + 1 / 3)), at(255 * pt(r, a, i)), at(255 * pt(r, a, i - 1 / 3)), 1),
4 === t.length && (e[3] = t[3]),
e
}
function vt(t) {
if (t) {
var e, i, n = t[0] / 255,
o = t[1] / 255,
a = t[2] / 255,
r = math.min(n, o, a),
s = math.max(n, o, a),
l = s - r,
u = (s + r) / 2;
if (0 === l) e = 0,
i = 0;
else {
i = u < .5 ? l / (s + r) : l / (2 - s - r);
var h = ((s - n) / 6 + l / 2) / l,
c = ((s - o) / 6 + l / 2) / l,
d = ((s - a) / 6 + l / 2) / l;
n === s ? e = d - c: o === s ? e = 1 / 3 + h - d: a === s && (e = 2 / 3 + c - h),
e < 0 && (e += 1),
e > 1 && (e -= 1)
}
var f = [360 * e, i, u];
return null != t[3] && f.push(t[3]),
f
}
}
function gt(t, e) {
var i = zt(t);
if (i) {
for (var n = 0; n < 3; n++) i[n] = e < 0 ? i[n] * (1 - e) | 0 : (255 - i[n]) * e + i[n] | 0,
i[n] > 255 ? i[n] = 255 : t[n] < 0 && (i[n] = 0);
return xt(i, 4 === i.length ? "rgba": "rgb")
}
}
function ft(t) {
var e = zt(t);
if (e) return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).tostring(16).slice(1)
}
function wt(t, e, i) {
if (e && e.length && t >= 0 && t <= 1) {
i = i || [];
var n = t * (e.length - 1),
o = math.floor(n),
a = math.ceil(n),
r = e[o],
s = e[a],
l = n - o;
return i[0] = at(nt(r[0], s[0], l)),
i[1] = at(nt(r[1], s[1], l)),
i[2] = at(nt(r[2], s[2], l)),
i[3] = ct(nt(r[3], s[3], l)),
i
}
}
function ht(t, e, i) {
if (e && e.length && t >= 0 && t <= 1) {
var n = t * (e.length - 1),
o = math.floor(n),
a = math.ceil(n),
r = zt(e[o]),
s = zt(e[a]),
l = n - o,
u = xt([at(nt(r[0], s[0], l)), at(nt(r[1], s[1], l)), at(nt(r[2], s[2], l)), ct(nt(r[3], s[3], l))], "rgba");
return i ? {
color: u,
leftindex: o,
rightindex: a,
value: n
}: u
}
}
function zt(t, e, i, n) {
if (t = zt(t)) return t = vt(t),
null != e && (t[0] = dt(e)),
null != i && (t[1] = kt(i)),
null != n && (t[2] = kt(n)),
xt(bt(t), "rgba")
}
function ut(t, e) {
if ((t = zt(t)) && null != e) return t[3] = ct(e),
xt(t, "rgba")
}
function xt(t, e) {
if (t && t.length) {
var i = t[0] + "," + t[1] + "," + t[2];
return "rgba" !== e && "hsva" !== e && "hsla" !== e || (i += "," + t[3]),
e + "(" + i + ")"
}
}
function jt(t, e) {
return t[e]
}
function yt(t, e, i) {
t[e] = i
}
function qt(t, e, i) {
return (e - t) * i + t
}
function kt(t, e, i) {
return i > .5 ? e: t
}
function $t(t, e, i, n, o) {
var a = t.length;
if (1 == o) for (s = 0; s < a; s++) n[s] = qt(t[s], e[s], i);
else for (var r = a && t[0].length, s = 0; s < a; s++) for (var l = 0; l < r; l++) n[s][l] = qt(t[s][l], e[s][l], i)
}
function jt(t, e, i) {
var n = t.length,
o = e.length;
if (n !== o) if (n > o) t.length = o;
else for (r = n; r < o; r++) t.push(1 === i ? e[r] : nw.call(e[r]));
for (var a = t[0] && t[0].length, r = 0; r < t.length; r++) if (1 === i) isnan(t[r]) && (t[r] = e[r]);
else for (var s = 0; s < a; s++) isnan(t[r][s]) && (t[r][s] = e[r][s])
}
function qt(t, e, i) {
if (t === e) return ! 0;
var n = t.length;
if (n !== e.length) return ! 1;
if (1 === i) {
for (a = 0; a < n; a++) if (t[a] !== e[a]) return ! 1
} else for (var o = t[0].length, a = 0; a < n; a++) for (var r = 0; r < o; r++) if (t[a][r] !== e[a][r]) return ! 1;
return ! 0
}
function te(t, e, i, n, o, a, r, s, l) {
var u = t.length;
if (1 == l) for (c = 0; c < u; c++) s[c] = ee(t[c], e[c], i[c], n[c], o, a, r);
else for (var h = t[0].length, c = 0; c < u; c++) for (var d = 0; d < h; d++) s[c][d] = ee(t[c][d], e[c][d], i[c][d], n[c][d], o, a, r)
}
function ee(t, e, i, n, o, a, r) {
var s = .5 * (i - t),
l = .5 * (n - e);
return (2 * (e - i) + s + l) * r + ( - 3 * (e - i) - 2 * s - l) * a + s * o + e
}
function ie(t) {
if (c(t)) {
var e = t.length;
if (c(t[0])) {
for (var i = [], n = 0; n < e; n++) i.push(nw.call(t[n]));
return i
}
return nw.call(t)
}
return t
}
function ne(t) {
return t[0] = math.floor(t[0]),
t[1] = math.floor(t[1]),
t[2] = math.floor(t[2]),
"rgba(" + t.join(",") + ")"
}
function oe(t) {
var e = t[t.length - 1].value;
return c(e && e[0]) ? 2 : 1
}
function ae(t, e, i, n, o, a) {
var r = t._getter,
s = t._setter,
l = "spline" === e,
u = n.length;
if (u) {
var h, d = c(n[0].value),
f = !1,
p = !1,
g = d ? oe(n) : 0;
n.sort(function(t, e) {
return t.time - e.time
}),
h = n[u - 1].time;
for (var m = [], v = [], y = n[0].value, x = !0, _ = 0; _ < u; _++) {
m.push(n[_].time / h);
var w = n[_].value;
if (d && qt(w, y, g) || !d && w === y || (x = !1), y = w, "string" == typeof w) {
var b = zt(w);
b ? (w = b, f = !0) : p = !0
}
v.push(w)
}
if (a || !x) {
for (var s = v[u - 1], _ = 0; _ < u - 1; _++) d ? jt(v[_], s, g) : !isnan(v[_]) || isnan(s) || p || f || (v[_] = s);
d && jt(r(t._target, o), s, g);
var m, i, t, a, d, c, l = 0,
k = 0;
if (f) var p = [0, 0, 0, 0];
var n = new tt({
target: t._target,
life: h,
loop: t._loop,
delay: t._delay,
onframe: function(t, e) {
var i;
if (e < 0) i = 0;
else if (e < k) {
for (i = m = math.min(l + 1, u - 1); i >= 0 && !(m[i] <= e); i--);
i = math.min(i, u - 2)
} else {
for (i = l; i < u && !(m[i] > e); i++);
i = math.min(i - 1, u - 2)
}
l = i,
k = e;
var n = m[i + 1] - m[i];
if (0 !== n) if (i = (e - m[i]) / n, l) if (a = v[i], t = v[0 === i ? i: i - 1], d = v[i > u - 2 ? u - 1 : i + 1], c = v[i > u - 3 ? u - 1 : i + 2], d) te(t, a, d, c, i, i * i, i * i * i, r(t, o), g);
else {
if (f) a = te(t, a, d, c, i, i * i, i * i * i, p, 1),
a = ne(p);
else {
if (p) return kt(a, d, i);
a = ee(t, a, d, c, i, i * i, i * i * i)
}
s(t, o, a)
} else if (d) $t(v[i], v[i + 1], i, r(t, o), g);
else {
var a;
if (f) $t(v[i], v[i + 1], i, p, 1),
a = ne(p);
else {
if (p) return kt(v[i], v[i + 1], i);
a = qt(v[i], v[i + 1], i)
}
s(t, o, a)
}
},
ondestroy: i
});
return e && "spline" !== e && (n.easing = e),
n
}
}
}
function re(t, e, i, n, o, a, r, s) {
_(n) ? (a = o, o = n, n = 0) : x(o) ? (a = o, o = "linear", n = 0) : x(n) ? (a = n, n = 0) : x(i) ? (a = i, i = 500) : i || (i = 500),
t.stopanimation(),
se(t, "", t, e, i, n, s);
var l = t.animators.slice(),
u = l.length;
u || a && a();
for (var h = 0; h < l.length; h++) l[h].done(function() {--u || a && a()
}).start(o, r)
}
function se(t, e, i, n, o, a, r) {
var s = {},
l = 0;
for (var u in n) n.hasownproperty(u) && (null != i[u] ? w(n[u]) && !c(n[u]) ? se(t, e ? e + "." + u: u, i[u], n[u], o, a, r) : (r ? (s[u] = i[u], le(t, e, u, n[u])) : s[u] = n[u], l++) : null == n[u] || r || le(t, e, u, n[u]));
l > 0 && t.animate(e, !1).when(null == o ? 500 : o, s).delay(a || 0)
}
function le(t, e, i, n) {
if (e) {
var o = {};
o[e] = {},
o[e][i] = n,
t.attr(o)
} else t.attr(i, n)
}
function ue(t, e, i, n) {
i < 0 && (t += i, i = -i),
n < 0 && (e += n, n = -n),
this.x = t,
this.y = e,
this.width = i,
this.height = n
}
function he(t) {
for (var e = 0; t >= uw;) e |= 1 & t,
t >>= 1;
return t + e
}
function ce(t, e, i, n) {
var o = e + 1;
if (o === i) return 1;
if (n(t[o++], t[e]) < 0) {
for (; o < i && n(t[o], t[o - 1]) < 0;) o++;
de(t, e, o)
} else for (; o < i && n(t[o], t[o - 1]) >= 0;) o++;
return o - e
}
function de(t, e, i) {
for (i--; e < i;) {
var n = t[e];
t[e++] = t[i],
t[i--] = n
}
}
function fe(t, e, i, n, o) {
for (n === e && n++; n < i; n++) {
for (var a, r = t[n], s = e, l = n; s < l;) o(r, t[a = s + l >>> 1]) < 0 ? l = a: s = a + 1;
var u = n - s;
switch (u) {
case 3:
t[s + 3] = t[s + 2];
case 2:
t[s + 2] = t[s + 1];
case 1:
t[s + 1] = t[s];
break;
default:
for (; u > 0;) t[s + u] = t[s + u - 1],
u--
}
t[s] = r
}
}
function pe(t, e, i, n, o, a) {
var r = 0,
s = 0,
l = 1;
if (a(t, e[i + o]) > 0) {
for (s = n - o; l < s && a(t, e[i + o + l]) > 0;) r = l,
(l = 1 + (l << 1)) <= 0 && (l = s);
l > s && (l = s),
r += o,
l += o
} else {
for (s = o + 1; l < s && a(t, e[i + o - l]) <= 0;) r = l,
(l = 1 + (l << 1)) <= 0 && (l = s);
l > s && (l = s);
var u = r;
r = o - l,
l = o - u
}
for (r++; r < l;) {
var h = r + (l - r >>> 1);
a(t, e[i + h]) > 0 ? r = h + 1 : l = h
}
return l
}
function ge(t, e, i, n, o, a) {
var r = 0,
s = 0,
l = 1;
if (a(t, e[i + o]) < 0) {
for (s = o + 1; l < s && a(t, e[i + o - l]) < 0;) r = l,
(l = 1 + (l << 1)) <= 0 && (l = s);
l > s && (l = s);
var u = r;
r = o - l,
l = o - u
} else {
for (s = n - o; l < s && a(t, e[i + o + l]) >= 0;) r = l,
(l = 1 + (l << 1)) <= 0 && (l = s);
l > s && (l = s),
r += o,
l += o
}
for (r++; r < l;) {
var h = r + (l - r >>> 1);
a(t, e[i + h]) < 0 ? l = h: r = h + 1
}
return l
}
function me(t, e) {
function i(i) {
var s = a[i],
u = r[i],
h = a[i + 1],
c = r[i + 1];
r[i] = u + c,
i === l - 3 && (a[i + 1] = a[i + 2], r[i + 1] = r[i + 2]),
l--;
var d = ge(t[h], t, s, u, 0, e);
s += d,
0 !== (u -= d) && 0 !== (c = pe(t[s + u - 1], t, h, c, c - 1, e)) && (u <= c ? n(s, u, h, c) : o(s, u, h, c))
}
function n(i, n, o, a) {
var r = 0;
for (r = 0; r < n; r++) u[r] = t[i + r];
var l = 0,
h = o,
c = i;
if (t[c++] = t[h++], 0 != --a) if (1 !== n) {
for (var d, f, p, g = s;;) {
d = 0,
f = 0,
p = !1;
do {
if (e(t[h], u[l]) < 0) {
if (t[c++] = t[h++], f++, d = 0, 0 == --a) {
p = !0;
break
}
} else if (t[c++] = u[l++], d++, f = 0, 1 == --n) {
p = !0;
break
}
} while (( d | f ) < g);
if (p) break;
do {
if (0 !== (d = ge(t[h], u, l, n, 0, e))) {
for (r = 0; r < d; r++) t[c + r] = u[l + r];
if (c += d, l += d, (n -= d) <= 1) {
p = !0;
break
}
}
if (t[c++] = t[h++], 0 == --a) {
p = !0;
break
}
if (0 !== (f = pe(u[l], t, h, a, 0, e))) {
for (r = 0; r < f; r++) t[c + r] = t[h + r];
if (c += f, h += f, 0 === (a -= f)) {
p = !0;
break
}
}
if (t[c++] = u[l++], 1 == --n) {
p = !0;
break
}
g--
} while ( d >= xw || f >= xw );
if (p) break;
g < 0 && (g = 0),
g += 2
}
if ((s = g) < 1 && (s = 1), 1 === n) {
for (r = 0; r < a; r++) t[c + r] = t[h + r];
t[c + a] = u[l]
} else {
if (0 === n) throw new error;
for (r = 0; r < n; r++) t[c + r] = u[l + r]
}
} else {
for (r = 0; r < a; r++) t[c + r] = t[h + r];
t[c + a] = u[l]
} else for (r = 0; r < n; r++) t[c + r] = u[l + r]
}
function o(i, n, o, a) {
var r = 0;
for (r = 0; r < a; r++) u[r] = t[o + r];
var l = i + n - 1,
h = a - 1,
c = o + a - 1,
d = 0,
f = 0;
if (t[c--] = t[l--], 0 != --n) if (1 !== a) {
for (var p = s;;) {
var g = 0,
m = 0,
v = !1;
do {
if (e(u[h], t[l]) < 0) {
if (t[c--] = t[l--], g++, m = 0, 0 == --n) {
v = !0;
break
}
} else if (t[c--] = u[h--], m++, g = 0, 1 == --a) {
v = !0;
break
}
} while (( g | m ) < p);
if (v) break;
do {
if (0 != (g = n - ge(u[h], t, i, n, n - 1, e))) {
for (n -= g, f = (c -= g) + 1, d = (l -= g) + 1, r = g - 1; r >= 0; r--) t[f + r] = t[d + r];
if (0 === n) {
v = !0;
break
}
}
if (t[c--] = u[h--], 1 == --a) {
v = !0;
break
}
if (0 != (m = a - pe(t[l], u, 0, a, a - 1, e))) {
for (a -= m, f = (c -= m) + 1, d = (h -= m) + 1, r = 0; r < m; r++) t[f + r] = u[d + r];
if (a <= 1) {
v = !0;
break
}
}
if (t[c--] = t[l--], 0 == --n) {
v = !0;
break
}
p--
} while ( g >= xw || m >= xw );
if (v) break;
p < 0 && (p = 0),
p += 2
}
if ((s = p) < 1 && (s = 1), 1 === a) {
for (f = (c -= n) + 1, d = (l -= n) + 1, r = n - 1; r >= 0; r--) t[f + r] = t[d + r];
t[c] = u[h]
} else {
if (0 === a) throw new error;
for (d = c - (a - 1), r = 0; r < a; r++) t[d + r] = u[r]
}
} else {
for (f = (c -= n) + 1, d = (l -= n) + 1, r = n - 1; r >= 0; r--) t[f + r] = t[d + r];
t[c] = u[h]
} else for (d = c - (a - 1), r = 0; r < a; r++) t[d + r] = u[r]
}
var a, r, s = xw,
l = 0,
u = [];
a = [],
r = [],
this.mergeruns = function() {
for (; l > 1;) {
var t = l - 2;
if (t >= 1 && r[t - 1] <= r[t] + r[t + 1] || t >= 2 && r[t - 2] <= r[t] + r[t - 1]) r[t - 1] < r[t + 1] && t--;
else if (r[t] > r[t + 1]) break;
i(t)
}
},
this.forcemergeruns = function() {
for (; l > 1;) {
var t = l - 2;
t > 0 && r[t - 1] < r[t + 1] && t--,
i(t)
}
},
this.pushrun = function(t, e) {
a[l] = t,
r[l] = e,
l += 1
}
}
function ve(t, e, i, n) {
i || (i = 0),
n || (n = t.length);
var o = n - i;
if (! (o < 2)) {
var a = 0;
if (o < uw) return a = ce(t, i, n, e),
void fe(t, i, n, i + a, e);
var r = new me(t, e),
s = he(o);
do {
if ((a = ce(t, i, n, e)) < s) {
var l = o;
l > s && (l = s),
fe(t, i, i + l, i + a, e),
a = l
}
r.pushrun(i, a), r.mergeruns(), o -= a, i += a
} while ( 0 !== o );
r.forcemergeruns()
}
}
function ye(t, e) {
return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2: t.z - e.z: t.zlevel - e.zlevel
}
function xe(t, e, i) {
var n = null == e.x ? 0 : e.x,
o = null == e.x2 ? 1 : e.x2,
a = null == e.y ? 0 : e.y,
r = null == e.y2 ? 0 : e.y2;
return e.global || (n = n * i.width + i.x, o = o * i.width + i.x, a = a * i.height + i.y, r = r * i.height + i.y),
n = isnan(n) ? 0 : n,
o = isnan(o) ? 1 : o,
a = isnan(a) ? 0 : a,
r = isnan(r) ? 0 : r,
t.createlineargradient(n, a, o, r)
}
function _e(t, e, i) {
var n = i.width,
o = i.height,
a = math.min(n, o),
r = null == e.x ? .5 : e.x,
s = null == e.y ? .5 : e.y,
l = null == e.r ? .5 : e.r;
return e.global || (r = r * n + i.x, s = s * o + i.y, l *= a),
t.createradialgradient(r, s, 0, r, s, l)
}
function we() {
return ! 1
}
function be(t, e, i) {
var n = y_(),
o = e.getwidth(),
a = e.getheight(),
r = n.style;
return r && (r.position = "absolute", r.left = 0, r.top = 0, r.width = o + "px", r.height = a + "px", n.setattribute("data-zr-dom-id", t)),
n.width = o * i,
n.height = a * i,
n
}
function se(t) {
if ("string" == typeof t) {
var e = ob.get(t);
return e && e.image
}
return t
}
function me(t, e, i, n, o) {
if (t) {
if ("string" == typeof t) {
if (e && e.__zrimagesrc === t || !i) return e;
var a = ob.get(t),
r = {
hostel: i,
cb: n,
cbpayload: o
};
return a ? !te(e = a.image) && a.pending.push(r) : (!e && (e = new image), e.onload = e.onerror = ie, ob.put(t, e.__cachedimgobj = {
image: e,
pending: [r]
}), e.src = e.__zrimagesrc = t),
e
}
return t
}
return e
}
function ie() {
var t = this.__cachedimgobj;
this.onload = this.onerror = this.__cachedimgobj = null;
for (var e = 0; e < t.pending.length; e++) {
var i = t.pending[e],
n = i.cb;
n && n(this, i.cbpayload),
i.hostel.dirty()
}
t.pending.length = 0
}
function te(t) {
return t && t.width && t.height
}
function ae(t, e) {
var i = t + ":" + (e = e || ub);
if (ab[i]) return ab[i];
for (var n = (t + "").split("\n"), o = 0, a = 0, r = n.length; a < r; a++) o = math.max(ve(n[a], e).width, o);
return rb > sb && (rb = 0, ab = {}),
rb++,
ab[i] = o,
o
}
function de(t, e, i, n, o, a, r) {
return a ? le(t, e, i, n, o, a, r) : ce(t, e, i, n, o, r)
}
function ce(t, e, i, n, o, a) {
var r = ge(t, e, o, a),
s = ae(t, e);
o && (s += o[1] + o[3]);
var l = r.outerheight,
u = new ue(ke(0, s, i), pe(0, l, n), s, l);
return u.lineheight = r.lineheight,
u
}
function le(t, e, i, n, o, a, r) {
var s = fe(t, {
rich: a,
truncate: r,
font: e,
textalign: i,
textpadding: o
}),
l = s.outerwidth,
u = s.outerheight;
return new ue(ke(0, l, i), pe(0, u, n), l, u)
}
function ke(t, e, i) {
return "right" === i ? t -= e: "center" === i && (t -= e / 2),
t
}
function pe(t, e, i) {
return "middle" === i ? t -= e / 2 : "bottom" === i && (t -= e),
t
}
function ne(t, e, i) {
var n = e.x,
o = e.y,
a = e.height,
r = e.width,
s = a / 2,
l = "left",
u = "top";
switch (t) {
case "left":
n -= i,
o += s,
l = "right",
u = "middle";
break;
case "right":
n += i + r,
o += s,
u = "middle";
break;
case "top":
n += r / 2,
o -= i,
l = "center",
u = "bottom";
break;
case "bottom":
n += r / 2,
o += a + i,
l = "center";
break;
case "inside":
n += r / 2,
o += s,
l = "center",
u = "middle";
break;
case "insideleft":
n += i,
o += s,
u = "middle";
break;
case "insideright":
n += r - i,
o += s,
l = "right",
u = "middle";
break;
case "insidetop":
n += r / 2,
o += i,
l = "center";
break;
case "insidebottom":
n += r / 2,
o += a - i,
l = "center",
u = "bottom";
break;
case "insidetopleft":
n += i,
o += i;
break;
case "insidetopright":
n += r - i,
o += i,
l = "right";
break;
case "insidebottomleft":
n += i,
o += a - i,
u = "bottom";
break;
case "insidebottomright":
n += r - i,
o += a - i,
l = "right",
u = "bottom"
}
return {
x: n,
y: o,
textalign: l,
textverticalalign: u
}
}
function oe(t, e, i, n, o) {
if (!e) return "";
var a = (t + "").split("\n");
o = ee(e, i, n, o);
for (var r = 0,
s = a.length; r < s; r++) a[r] = re(a[r], o);
return a.join("\n")
}
function ee(t, e, i, n) { (n = a({},
n)).font = e;
var i = a(i, "...");
n.maxiterations = a(n.maxiterations, 2);
var o = n.minchar = a(n.minchar, 0);
n.cncharwidth = ae("鍥�", e);
var r = n.asccharwidth = ae("a", e);
n.placeholder = a(n.placeholder, "");
for (var s = t = math.max(0, t - 1), l = 0; l < o && s >= r; l++) s -= r;
var u = ae(i);
return u > s && (i = "", u = 0),
s = t - u,
n.ellipsis = i,
n.ellipsiswidth = u,
n.contentwidth = s,
n.containerwidth = t,
n
}
function re(t, e) {
var i = e.containerwidth,
n = e.font,
o = e.contentwidth;
if (!i) return "";
var a = ae(t, n);
if (a <= i) return t;
for (var r = 0;; r++) {
if (a <= o || r >= e.maxiterations) {
t += e.ellipsis;
break
}
var s = 0 === r ? ze(t, o, e.asccharwidth, e.cncharwidth) : a > 0 ? math.floor(t.length * o / a) : 0;
a = ae(t = t.substr(0, s), n)
}
return "" === t && (t = e.placeholder),
t
}
function ze(t, e, i, n) {
for (var o = 0,
a = 0,
r = t.length; a < r && o < e; a++) {
var s = t.charcodeat(a);
o += 0 <= s && s <= 127 ? i: n
}
return a
}
function be(t) {
return ae("鍥�", t)
}
function ve(t, e) {
return hb.measuretext(t, e)
}
function ge(t, e, i, n) {
null != t && (t += "");
var o = be(e),
a = t ? t.split("\n") : [],
r = a.length * o,
s = r;
if (i && (s += i[0] + i[2]), t && n) {
var l = n.outerheight,
u = n.outerwidth;
if (null != l && s > l) t = "",
a = [];
else if (null != u) for (var h = ee(u - (i ? i[1] + i[3] : 0), e, n.ellipsis, {
minchar: n.minchar,
placeholder: n.placeholder
}), c = 0, d = a.length; c < d; c++) a[c] = re(a[c], h)
}
return {
lines: a,
height: r,
outerheight: s,
lineheight: o
}
}
function fe(t, e) {
var i = {
lines: [],
width: 0,
height: 0
};
if (null != t && (t += ""), !t) return i;
for (var n, o = lb.lastindex = 0; null != (n = lb.exec(t));) {
var a = n.index;
a > o && we(i, t.substring(o, a)),
we(i, n[2], n[1]),
o = lb.lastindex
}
o < t.length && we(i, t.substring(o, t.length));
var r = i.lines,
s = 0,
l = 0,
u = [],
h = e.textpadding,
c = e.truncate,
d = c && c.outerwidth,
f = c && c.outerheight;
h && (null != d && (d -= h[1] + h[3]), null != f && (f -= h[0] + h[2]));
for (l = 0; l < r.length; l++) {
for (var p = r[l], g = 0, m = 0, v = 0; v < p.tokens.length; v++) {
var y = (k = p.tokens[v]).stylename && e.rich[k.stylename] || {},
x = k.textpadding = y.textpadding,
_ = k.font = y.font || e.font,
w = k.textheight = a(y.textheight, be(_));
if (x && (w += x[0] + x[2]), k.height = w, k.lineheight = d(y.textlineheight, e.textlineheight, w), k.textalign = y && y.textalign || e.textalign, k.textverticalalign = y && y.textverticalalign || "middle", null != f && s + k.lineheight > f) return {
lines: [],
width: 0,
height: 0
};
k.textwidth = ae(k.text, _);
var b = y.textwidth,
s = null == b || "auto" === b;
if ("string" == typeof b && "%" === b.charat(b.length - 1)) k.percentwidth = b,
u.push(k),
b = 0;
else {
if (s) {
b = k.textwidth;
var m = y.textbackgroundcolor,
i = m && m.image;
i && te(i = se(i)) && (b = math.max(b, i.width * w / i.height))
}
var t = x ? x[1] + x[3] : 0;
b += t;
var c = null != d ? d - m: null;
null != c && c < b && (!s || c < t ? (k.text = "", k.textwidth = b = 0) : (k.text = oe(k.text, c - t, _, c.ellipsis, {
minchar: c.minchar
}), k.textwidth = ae(k.text, _), b = k.textwidth + t))
}
m += k.width = b,
y && (g = math.max(g, k.lineheight))
}
p.width = m,
p.lineheight = g,
s += g,
l = math.max(l, m)
}
i.outerwidth = i.width = a(e.textwidth, l),
i.outerheight = i.height = a(e.textheight, s),
h && (i.outerwidth += h[1] + h[3], i.outerheight += h[0] + h[2]);
for (var l = 0; l < u.length; l++) {
var k = u[l],
p = k.percentwidth;
k.width = parseint(p, 10) / 100 * l
}
return i
}
function we(t, e, i) {
for (var n = "" === e,
o = e.split("\n"), a = t.lines, r = 0; r < o.length; r++) {
var s = o[r],
l = {
stylename: i,
text: s,
islineholder: !s && !n
};
if (r) a.push({
tokens: [l]
});
else {
var u = (a[a.length - 1] || (a[0] = {
tokens: []
})).tokens,
h = u.length;
1 === h && u[0].islineholder ? u[0] = l: (s || !h || n) && u.push(l)
}
}
}
function he(t) {
var e = (t.fontsize || t.fontfamily) && [t.fontstyle, t.fontweight, (t.fontsize || 12) + "px", t.fontfamily || "sans-serif"].join(" ");
return e && p(e) || t.textfont || t.font
}
function ze(t, e) {
var i, n, o, a, r = e.x,
s = e.y,
l = e.width,
u = e.height,
h = e.r;
l < 0 && (r += l, l = -l),
u < 0 && (s += u, u = -u),
"number" == typeof h ? i = n = o = a = h: h instanceof array ? 1 === h.length ? i = n = o = a = h[0] : 2 === h.length ? (i = o = h[0], n = a = h[1]) : 3 === h.length ? (i = h[0], n = a = h[1], o = h[2]) : (i = h[0], n = h[1], o = h[2], a = h[3]) : i = n = o = a = 0;
var c;
i + n > l && (i *= l / (c = i + n), n *= l / c),
o + a > l && (o *= l / (c = o + a), a *= l / c),
n + o > u && (n *= u / (c = n + o), o *= u / c),
i + a > u && (i *= u / (c = i + a), a *= u / c),
t.moveto(r + i, s),
t.lineto(r + l - n, s),
0 !== n && t.arc(r + l - n, s + n, n, -math.pi / 2, 0),
t.lineto(r + l, s + u - o),
0 !== o && t.arc(r + l - o, s + u - o, o, 0, math.pi / 2),
t.lineto(r + a, s + u),
0 !== a && t.arc(r + a, s + u - a, a, math.pi / 2, math.pi),
t.lineto(r, s + i),
0 !== i && t.arc(r + i, s + i, i, math.pi, 1.5 * math.pi)
}
function ue(t) {
return xe(t),
d(t.rich, xe),
t
}
function xe(t) {
if (t) {
t.font = he(t);
var e = t.textalign;
"middle" === e && (e = "center"),
t.textalign = null == e || cb[e] ? e: "left";
var i = t.textverticalalign || t.textbaseline;
"center" === i && (i = "middle"),
t.textverticalalign = null == i || db[i] ? i: "top",
t.textpadding && (t.textpadding = l(t.textpadding))
}
}
function je(t, e, i, n, o, a) {
n.rich ? qe(t, e, i, n, o) : ye(t, e, i, n, o, a)
}
function ye(t, e, i, n, o, a) {
var r = a && a.style,
s = r && "text" === a.type,
l = n.font || ub;
s && l === (r.font || ub) || (e.font = l);
var u = t.__computedfont;
t.__stylefont !== l && (t.__stylefont = l, u = t.__computedfont = e.font);
var h = n.textpadding,
c = t.__textcotentblock;
c && !t.__dirtytext || (c = t.__textcotentblock = ge(i, u, h, n.truncate));
var d = c.outerheight,
f = c.lines,
p = c.lineheight,
g = ii(d, n, o),
m = g.basex,
v = g.basey,
y = g.textalign || "left",
x = g.textverticalalign;
$e(e, n, o, m, v);
var _ = pe(v, d, x),
w = m,
b = _,
s = qe(n);
if (s || h) {
var m = ae(i, u);
h && (m += h[1] + h[3]);
var i = ke(m, m, y);
s && ti(t, e, n, i, _, m, d),
h && (w = si(m, y, h), b += h[0])
}
e.textalign = y,
e.textbaseline = "middle";
for (r = 0; r < fb.length; r++) {
var t = fb[r],
a = t[0],
d = t[1],
c = n[a];
s && c === r[a] || (e[d] = qw(e, d, c || t[2]))
}
b += p / 2;
var l = n.textstrokewidth,
k = s ? r.textstrokewidth: null,
p = !s || l !== k,
n = !s || p || n.textstroke !== r.textstroke,
o = oi(n.textstroke, l),
e = ai(n.textfill);
if (o && (p && (e.linewidth = l), n && (e.strokestyle = o)), e && (s && n.textfill === r.textfill && !r.textbackgroundcolor || (e.fillstyle = e)), 1 === f.length) o && e.stroketext(f[0], w, b),
e && e.filltext(f[0], w, b);
else for (var r = 0; r < f.length; r++) o && e.stroketext(f[r], w, b),
e && e.filltext(f[r], w, b),
b += p
}
function qe(t, e, i, n, o) {
var a = t.__textcotentblock;
a && !t.__dirtytext || (a = t.__textcotentblock = fe(i, n)),
ke(t, e, a, n, o)
}
function ke(t, e, i, n, o) {
var a = i.width,
r = i.outerwidth,
s = i.outerheight,
l = n.textpadding,
u = ii(s, n, o),
h = u.basex,
c = u.basey,
d = u.textalign,
f = u.textverticalalign;
$e(e, n, o, h, c);
var p = ke(h, r, d),
g = pe(c, s, f),
m = p,
v = g;
l && (m += l[3], v += l[0]);
var y = m + a;
qe(n) && ti(t, e, n, p, g, r, s);
for (var x = 0; x < i.lines.length; x++) {
for (var _, w = i.lines[x], b = w.tokens, s = b.length, m = w.lineheight, i = w.width, t = 0, a = m, d = y, c = s - 1; t < s && (!(_ = b[t]).textalign || "left" === _.textalign);) je(t, e, _, n, m, v, a, "left"),
i -= _.width,
a += _.width,
t++;
for (; c >= 0 && "right" === (_ = b[c]).textalign;) je(t, e, _, n, m, v, d, "right"),
i -= _.width,
d -= _.width,
c--;
for (a += (a - (a - m) - (y - d) - i) / 2; t <= c;) je(t, e, _ = b[t], n, m, v, a + _.width / 2, "center"),
a += _.width,
t++;
v += m
}
}
function $e(t, e, i, n, o) {
if (i && e.textrotation) {
var a = e.textorigin;
"center" === a ? (n = i.width / 2 + i.x, o = i.height / 2 + i.y) : a && (n = a[0] + i.x, o = a[1] + i.y),
t.translate(n, o),
t.rotate( - e.textrotation),
t.translate( - n, -o)
}
}
function je(t, e, i, n, o, a, r, s) {
var l = n.rich[i.stylename] || {};
l.text = i.text;
var u = i.textverticalalign,
h = a + o / 2;
"top" === u ? h = a + i.height / 2 : "bottom" === u && (h = a + o - i.height / 2),
!i.islineholder && qe(l) && ti(t, e, l, "right" === s ? r - i.width: "center" === s ? r - i.width / 2 : r, h - i.height / 2, i.width, i.height);
var c = i.textpadding;
c && (r = si(r, s, c), h -= i.height / 2 - c[2] - i.textheight / 2),
ni(e, "shadowblur", d(l.textshadowblur, n.textshadowblur, 0)),
ni(e, "shadowcolor", l.textshadowcolor || n.textshadowcolor || "transparent"),
ni(e, "shadowoffsetx", d(l.textshadowoffsetx, n.textshadowoffsetx, 0)),
ni(e, "shadowoffsety", d(l.textshadowoffsety, n.textshadowoffsety, 0)),
ni(e, "textalign", s),
ni(e, "textbaseline", "middle"),
ni(e, "font", i.font || ub);
var d = oi(l.textstroke || n.textstroke, p),
f = ai(l.textfill || n.textfill),
p = a(l.textstrokewidth, n.textstrokewidth);
d && (ni(e, "linewidth", p), ni(e, "strokestyle", d), e.stroketext(i.text, r, h)),
f && (ni(e, "fillstyle", f), e.filltext(i.text, r, h))
}
function qe(t) {
return t.textbackgroundcolor || t.textborderwidth && t.textbordercolor
}
function ti(t, e, i, n, o, a, r) {
var s = i.textbackgroundcolor,
l = i.textborderwidth,
u = i.textbordercolor,
h = _(s);
if (ni(e, "shadowblur", i.textboxshadowblur || 0), ni(e, "shadowcolor", i.textboxshadowcolor || "transparent"), ni(e, "shadowoffsetx", i.textboxshadowoffsetx || 0), ni(e, "shadowoffsety", i.textboxshadowoffsety || 0), h || l && u) {
e.beginpath();
var c = i.textborderradius;
c ? ze(e, {
x: n,
y: o,
width: a,
height: r,
r: c
}) : e.rect(n, o, a, r),
e.closepath()
}
if (h) if (ni(e, "fillstyle", s), null != i.fillopacity) {
f = e.globalalpha;
e.globalalpha = i.fillopacity * i.opacity,
e.fill(),
e.globalalpha = f
} else e.fill();
else if (x(s)) ni(e, "fillstyle", s(i)),
e.fill();
else if (w(s)) {
var d = s.image; (d = me(d, null, t, ei, s)) && te(d) && e.drawimage(d, n, o, a, r)
}
if (l && u) if (ni(e, "linewidth", l), ni(e, "strokestyle", u), null != i.strokeopacity) {
var f = e.globalalpha;
e.globalalpha = i.strokeopacity * i.opacity,
e.stroke(),
e.globalalpha = f
} else e.stroke()
}
function ei(t, e) {
e.image = t
}
function ii(t, e, i) {
var n = e.x || 0,
o = e.y || 0,
a = e.textalign,
r = e.textverticalalign;
if (i) {
var s = e.textposition;
if (s instanceof array) n = i.x + ri(s[0], i.width),
o = i.y + ri(s[1], i.height);
else {
var l = ne(s, i, e.textdistance);
n = l.x,
o = l.y,
a = a || l.textalign,
r = r || l.textverticalalign
}
var u = e.textoffset;
u && (n += u[0], o += u[1])
}
return {
basex: n,
basey: o,
textalign: a,
textverticalalign: r
}
}
function ni(t, e, i) {
return t[e] = qw(t, e, i),
t[e]
}
function oi(t, e) {
return null == t || e <= 0 || "transparent" === t || "none" === t ? null: t.image || t.colorstops ? "#000": t
}
function ai(t) {
return null == t || "none" === t ? null: t.image || t.colorstops ? "#000": t
}
function ri(t, e) {
return "string" == typeof t ? t.lastindexof("%") >= 0 ? parsefloat(t) / 100 * e: parsefloat(t) : t
}
function si(t, e, i) {
return "right" === e ? t - i[1] : "center" === e ? t + i[3] / 2 - i[1] / 2 : t + i[3]
}
function li(t, e) {
return null != t && (t || e.textbackgroundcolor || e.textborderwidth && e.textbordercolor || e.textpadding)
}
function ui(t) {
t = t || {},
gw.call(this, t);
for (var e in t) t.hasownproperty(e) && "style" !== e && (this[e] = t[e]);
this.style = new $w(t.style, this),
this._rect = null,
this.__clippaths = []
}
function hi(t) {
ui.call(this, t)
}
function ci(t) {
return parseint(t, 10)
}
function di(t) {
return !! t && ( !! t.__builtin__ || "function" == typeof t.resize && "function" == typeof t.refresh)
}
function fi(t, e, i) {
return mb.copy(t.getboundingrect()),
t.transform && mb.applytransform(t.transform),
vb.width = e,
vb.height = i,
!mb.intersect(vb)
}
function pi(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 gi(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 mi(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 vi(t) {
var e = t[1][0] - t[0][0],
i = t[1][1] - t[0][1];
return math.sqrt(e * e + i * i)
}
function yi(t) {
return [(t[0][0] + t[1][0]) / 2, (t[0][1] + t[1][1]) / 2]
}
function xi(t) {
return "mousewheel" === t && z_.browser.firefox ? "dommousescroll": t
}
function _i(t, e, i) {
var n = t._gesturemgr;
"start" === i && n.clear();
var o = n.recognize(e, t.handler.findhover(e.zrx, e.zry, null).target, t.dom);
if ("end" === i && n.clear(), o) {
var a = o.type;
e.gestureevent = a,
t.handler.dispatchtoelement({
target: o.target
},
a, o.event)
}
}
function wi(t) {
t._touching = !0,
cleartimeout(t._touchtimer),
t._touchtimer = settimeout(function() {
t._touching = !1
},
700)
}
function bi(t) {
var e = t.pointertype;
return "pen" === e || "touch" === e
}
function si(t) {
function e(t, e) {
return function() {
if (!e._touching) return t.apply(e, arguments)
}
}
d(sb,
function(e) {
t._handlers[e] = m(tb[e], t)
}),
d(ib,
function(e) {
t._handlers[e] = m(tb[e], t)
}),
d(bb,
function(i) {
t._handlers[i] = e(tb[i], t)
})
}
function mi(t) {
function e(e, i) {
d(e,
function(e) {
ut(t, xi(e), i._handlers[e])
},
i)
}
aw.call(this),
this.dom = t,
this._touching = !1,
this._touchtimer,
this._gesturemgr = new _b,
this._handlers = {},
si(this),
z_.pointereventssupported ? e(ib, this) : (z_.toucheventssupported && e(sb, this), e(bb, this))
}
function ii(t, e) {
var i = new kb(e_(), t, e);
return lb[i.id] = i,
i
}
function ti(t, e) {
cb[t] = e
}
function ai(t) {
delete lb[t]
}
function di(t) {
return t instanceof array ? t: null == t ? [] : [t]
}
function ci(t, e, i) {
if (t) {
t[e] = t[e] || {},
t.emphasis = t.emphasis || {},
t.emphasis[e] = t.emphasis[e] || {};
for (var n = 0,
o = i.length; n < o; n++) {
var a = i[n]; ! t.emphasis[e].hasownproperty(a) && t[e].hasownproperty(a) && (t.emphasis[e][a] = t[e][a])
}
}
}
function li(t) {
return ! ob(t) || eb(t) || t instanceof date ? t: t.value
}
function ki(t) {
return ob(t) && !(t instanceof array)
}
function pi(t, e) {
e = (e || []).slice();
var i = f(t || [],
function(t, e) {
return {
exist: t
}
});
return nb(e,
function(t, n) {
if (ob(t)) {
for (o = 0; o < i.length; o++) if (!i[o].option && null != t.id && i[o].exist.id === t.id + "") return i[o].option = t,
void(e[n] = null);
for (var o = 0; o < i.length; o++) {
var a = i[o].exist;
if (! (i[o].option || null != a.id && null != t.id || null == t.name || ei(t) || ei(a) || a.name !== t.name + "")) return i[o].option = t,
void(e[n] = null)
}
}
}),
nb(e,
function(t, e) {
if (ob(t)) {
for (var n = 0; n < i.length; n++) {
var o = i[n].exist;
if (!i[n].option && !ei(o) && null == t.id) {
i[n].option = t;
break
}
}
n >= i.length && i.push({
option: t
})
}
}),
i
}
function ni(t) {
var e = r();
nb(t,
function(t, i) {
var n = t.exist;
n && e.set(n.id, t)
}),
nb(t,
function(t, i) {
var n = t.option;
k(!n || null == n.id || !e.get(n.id) || e.get(n.id) === t, "id duplicates: " + (n && n.id)),
n && null != n.id && e.set(n.id, t),
!t.keyinfo && (t.keyinfo = {})
}),
nb(t,
function(t, i) {
var n = t.exist,
o = t.option,
a = t.keyinfo;
if (ob(o)) {
if (a.name = null != o.name ? o.name + "": n ? n.name: rb + i, n) a.id = n.id;
else if (null != o.id) a.id = o.id + "";
else {
var r = 0;
do {
a.id = "\0" + a.name + "\0" + r++
} while ( e . get ( a . id ))
}
e.set(a.id, t)
}
})
}
function oi(t) {
var e = t.name;
return ! (!e || !e.indexof(rb))
}
function ei(t) {
return ob(t) && t.id && 0 === (t.id + "").indexof("\0_ec_\0")
}
function ri(t, e) {
function i(t, e, i) {
for (var n = 0,
o = t.length; n < o; n++) for (var a = t[n].seriesid, r = di(t[n].dataindex), s = i && i[a], l = 0, u = r.length; l < u; l++) {
var h = r[l];
s && s[h] ? s[h] = null: (e[a] || (e[a] = {}))[h] = 1
}
}
function n(t, e) {
var i = [];
for (var o in t) if (t.hasownproperty(o) && null != t[o]) if (e) i.push( + o);
else {
var a = n(t[o], !0);
a.length && i.push({
seriesid: o,
dataindex: a
})
}
return i
}
var o = {},
a = {};
return i(t || [], o),
i(e || [], a, o),
[n(o), n(a)]
}
function zi(t, e) {
return null != e.dataindexinside ? e.dataindexinside: null != e.dataindex ? y(e.dataindex) ? f(e.dataindex,
function(e) {
return t.indexofrawindex(e)
}) : t.indexofrawindex(e.dataindex) : null != e.name ? y(e.name) ? f(e.name,
function(e) {
return t.indexofname(e)
}) : t.indexofname(e.name) : void 0
}
function bi() {
var t = "__\0ec_inner_" + bb+++"_" + math.random().tofixed(5);
return function(e) {
return e[t] || (e[t] = {})
}
}
function vi(t, e, i) {
if (_(e)) {
var n = {};
n[e + "index"] = 0,
e = n
}
var o = i && i.defaultmaintype; ! o || gi(e, o + "index") || gi(e, o + "id") || gi(e, o + "name") || (e[o + "index"] = 0);
var a = {};
return nb(e,
function(n, o) {
var n = e[o];
if ("dataindex" !== o && "dataindexinside" !== o) {
var r = o.match(/^(\w+)(index|id|name)$/) || [],
s = r[1],
u = (r[2] || "").tolowercase();
if (! (!s || !u || null == n || "index" === u && "none" === n || i && i.includemaintypes && l(i.includemaintypes, s) < 0)) {
var h = {
maintype: s
};
"index" === u && "all" === n || (h[u] = n);
var c = t.querycomponents(h);
a[s + "models"] = c,
a[s + "model"] = c[0]
}
} else a[o] = n
}),
a
}
function gi(t, e) {
return t && t.hasownproperty(e)
}
function fi(t, e, i) {
t.setattribute ? t.setattribute(e, i) : t[e] = i
}
function wi(t, e) {
return t.getattribute ? t.getattribute(e) : t[e]
}
function hi(t) {
return "auto" === t ? z_.domsupported ? "html": "richtext": t || "html"
}
function zi(t) {
var e = {
main: "",
sub: ""
};
return t && (t = t.split(vb), e.main = t[0] || "", e.sub = t[1] || ""),
e
}
function ui(t) {
k(/^[a-za-z0-9_]+([.][a-za-z0-9_]+)?$/.test(t), 'componenttype "' + t + '" illegal')
}
function xi(t, e) {
t.$constructor = t,
t.extend = function(t) {
var e = this,
i = function() {
t.$constructor ? t.$constructor.apply(this, arguments) : e.apply(this, arguments)
};
return a(i.prototype, t),
i.extend = this.extend,
i.supercall = yi,
i.superapply = qi,
u(i, this),
i.superclass = e,
i
}
}
function ji(t) {
var e = ["__\0is_clz", fb++, math.random().tofixed(3)].join("_");
t.prototype[e] = !0,
t.isinstance = function(t) {
return ! (!t || !t[e])
}
}
function yi(t, e) {
var i = c(arguments, 2);
return this.superclass.prototype[e].apply(t, i)
}
function qi(t, e, i) {
return this.superclass.prototype[e].apply(t, i)
}
function ki(t, e) {
function i(t) {
var e = n[t.main];
return e && e[gb] || ((e = n[t.main] = {})[gb] = !0),
e
}
e = e || {};
var n = {};
if (t.registerclass = function(t, e) {
return e && (ui(e), (e = zi(e)).sub ? e.sub !== gb && (i(e)[e.sub] = t) : n[e.main] = t),
t
},
t.getclass = function(t, e, i) {
var o = n[t];
if (o && o[gb] && (o = e ? o[e] : null), i && !o) throw new error(e ? "component " + t + "." + (e || "") + " not exists. load it first.": t + ".type should be specified.");
return o
},
t.getclassesbymaintype = function(t) {
t = zi(t);
var e = [],
i = n[t.main];
return i && i[gb] ? d(i,
function(t, i) {
i !== gb && e.push(t)
}) : e.push(i),
e
},
t.hasclass = function(t) {
return t = zi(t),
!!n[t.main]
},
t.getallclassmaintypes = function() {
var t = [];
return d(n,
function(e, i) {
t.push(i)
}),
t
},
t.hassubtypes = function(t) {
t = zi(t);
var e = n[t.main];
return e && e[gb]
},
t.parseclasstype = zi, e.registerwhenextend) {
var o = t.extend;
o && (t.extend = function(e) {
var i = o.call(this, e);
return t.registerclass(i, e.type)
})
}
return t
}
function $i(t) {
return t > -qb && t < qb
}
function ji(t) {
return t > qb || t < -qb
}
function qi(t, e, i, n, o) {
var a = 1 - o;
return a * a * (a * t + 3 * o * e) + o * o * (o * n + 3 * a * i)
}
function tn(t, e, i, n, o) {
var a = 1 - o;
return 3 * (((e - t) * a + 2 * (i - e) * o) * a + (n - i) * o * o)
}
function en(t, e, i, n, o, a) {
var r = n + 3 * (e - i) - t,
s = 3 * (i - 2 * e + t),
l = 3 * (e - t),
u = t - o,
h = s * s - 3 * r * l,
c = s * l - 9 * r * u,
d = l * l - 3 * s * u,
f = 0;
if ($i(h) && $i(c)) $i(s) ? a[0] = 0 : (m = -l / s) >= 0 && m <= 1 && (a[f++] = m);
else {
var p = c * c - 4 * h * d;
if ($i(p)) {
var g = c / h,
m = -g / 2; (m = -s / r + g) >= 0 && m <= 1 && (a[f++] = m),
m >= 0 && m <= 1 && (a[f++] = m)
} else if (p > 0) {
var v = yb(p),
y = h * s + 1.5 * r * ( - c + v),
x = h * s + 1.5 * r * ( - c - v); (m = ( - s - ((y = y < 0 ? -jb( - y, jb) : jb(y, jb)) + (x = x < 0 ? -jb( - x, jb) : jb(x, jb)))) / (3 * r)) >= 0 && m <= 1 && (a[f++] = m)
} else {
var _ = (2 * h * s - 3 * r * c) / (2 * yb(h * h * h)),
w = math.acos(_) / 3,
b = yb(h),
s = math.cos(w),
m = ( - s - 2 * b * s) / (3 * r),
m = ( - s + b * (s + $b * math.sin(w))) / (3 * r),
i = ( - s + b * (s - $b * math.sin(w))) / (3 * r);
m >= 0 && m <= 1 && (a[f++] = m),
m >= 0 && m <= 1 && (a[f++] = m),
i >= 0 && i <= 1 && (a[f++] = i)
}
}
return f
}
function nn(t, e, i, n, o) {
var a = 6 * i - 12 * e + 6 * t,
r = 9 * e + 3 * n - 3 * t - 9 * i,
s = 3 * e - 3 * t,
l = 0;
if ($i(r)) ji(a) && (c = -s / a) >= 0 && c <= 1 && (o[l++] = c);
else {
var u = a * a - 4 * r * s;
if ($i(u)) o[0] = -a / (2 * r);
else if (u > 0) {
var h = yb(u),
c = ( - a + h) / (2 * r),
d = ( - a - h) / (2 * r);
c >= 0 && c <= 1 && (o[l++] = c),
d >= 0 && d <= 1 && (o[l++] = d)
}
}
return l
}
function on(t, e, i, n, o, a) {
var r = (e - t) * o + t,
s = (i - e) * o + e,
l = (n - i) * o + i,
u = (s - r) * o + r,
h = (l - s) * o + s,
c = (h - u) * o + u;
a[0] = t,
a[1] = r,
a[2] = u,
a[3] = c,
a[4] = c,
a[5] = h,
a[6] = l,
a[7] = n
}
function an(t, e, i, n, o, a, r, s, l, u, h) {
var c, d, f, p, g, m = .005,
v = 1 / 0;
qb[0] = l,
qb[1] = u;
for (var y = 0; y < 1; y += .05) ts[0] = qi(t, i, o, r, y),
ts[1] = qi(e, n, a, s, y),
(p = iw(qb, ts)) < v && (c = y, v = p);
v = 1 / 0;
for (var x = 0; x < 32 && !(m < kb); x++) d = c - m,
f = c + m,
ts[0] = qi(t, i, o, r, d),
ts[1] = qi(e, n, a, s, d),
p = iw(ts, qb),
d >= 0 && p < v ? (c = d, v = p) : (es[0] = qi(t, i, o, r, f), es[1] = qi(e, n, a, s, f), g = iw(es, qb), f <= 1 && g < v ? (c = f, v = g) : m *= .5);
return h && (h[0] = qi(t, i, o, r, c), h[1] = qi(e, n, a, s, c)),
yb(v)
}
function rn(t, e, i, n) {
var o = 1 - n;
return o * (o * t + 2 * n * e) + n * n * i
}
function sn(t, e, i, n) {
return 2 * ((1 - n) * (e - t) + n * (i - e))
}
function ln(t, e, i, n, o) {
var a = t - 2 * e + i,
r = 2 * (e - t),
s = t - n,
l = 0;
if ($i(a)) ji(r) && (c = -s / r) >= 0 && c <= 1 && (o[l++] = c);
else {
var u = r * r - 4 * a * s;
if ($i(u))(c = -r / (2 * a)) >= 0 && c <= 1 && (o[l++] = c);
else if (u > 0) {
var h = yb(u),
c = ( - r + h) / (2 * a),
d = ( - r - h) / (2 * a);
c >= 0 && c <= 1 && (o[l++] = c),
d >= 0 && d <= 1 && (o[l++] = d)
}
}
return l
}
function un(t, e, i) {
var n = t + i - 2 * e;
return 0 === n ? .5 : (t - e) / n
}
function hn(t, e, i, n, o) {
var a = (e - t) * n + t,
r = (i - e) * n + e,
s = (r - a) * n + a;
o[0] = t,
o[1] = a,
o[2] = s,
o[3] = s,
o[4] = r,
o[5] = i
}
function cn(t, e, i, n, o, a, r, s, l) {
var u, h = .005,
c = 1 / 0;
qb[0] = r,
qb[1] = s;
for (var d = 0; d < 1; d += .05) ts[0] = rn(t, i, o, d),
ts[1] = rn(e, n, a, d),
(m = iw(qb, ts)) < c && (u = d, c = m);
c = 1 / 0;
for (var f = 0; f < 32 && !(h < kb); f++) {
var p = u - h,
g = u + h;
ts[0] = rn(t, i, o, p),
ts[1] = rn(e, n, a, p);
var m = iw(ts, qb);
if (p >= 0 && m < c) u = p,
c = m;
else {
es[0] = rn(t, i, o, g),
es[1] = rn(e, n, a, g);
var v = iw(es, qb);
g <= 1 && v < c ? (u = g, c = v) : h *= .5
}
}
return l && (l[0] = rn(t, i, o, u), l[1] = rn(e, n, a, u)),
yb(c)
}
function dn(t, e, i) {
if (0 !== t.length) {
var n, o = t[0],
a = o[0],
r = o[0],
s = o[1],
l = o[1];
for (n = 1; n < t.length; n++) o = t[n],
a = is(a, o[0]),
r = ns(r, o[0]),
s = is(s, o[1]),
l = ns(l, o[1]);
e[0] = a,
e[1] = s,
i[0] = r,
i[1] = l
}
}
function fn(t, e, i, n, o, a) {
o[0] = is(t, i),
o[1] = is(e, n),
a[0] = ns(t, i),
a[1] = ns(e, n)
}
function pn(t, e, i, n, o, a, r, s, l, u) {
var h, c = nn,
d = qi,
f = c(t, i, o, r, hs);
for (l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0, h = 0; h < f; h++) {
var p = d(t, i, o, r, hs[h]);
l[0] = is(p, l[0]),
u[0] = ns(p, u[0])
}
for (f = c(e, n, a, s, cs), h = 0; h < f; h++) {
var g = d(e, n, a, s, cs[h]);
l[1] = is(g, l[1]),
u[1] = ns(g, u[1])
}
l[0] = is(t, l[0]),
u[0] = ns(t, u[0]),
l[0] = is(r, l[0]),
u[0] = ns(r, u[0]),
l[1] = is(e, l[1]),
u[1] = ns(e, u[1]),
l[1] = is(s, l[1]),
u[1] = ns(s, u[1])
}
function gn(t, e, i, n, o, a, r, s) {
var l = un,
u = rn,
h = ns(is(l(t, i, o), 1), 0),
c = ns(is(l(e, n, a), 1), 0),
d = u(t, i, o, h),
f = u(e, n, a, c);
r[0] = is(t, o, d),
r[1] = is(e, a, f),
s[0] = ns(t, o, d),
s[1] = ns(e, a, f)
}
function mn(t, e, i, n, o, a, r, s, l) {
var u = tt,
h = et,
c = math.abs(o - a);
if (c % rs < 1e-4 && c > 1e-4) return s[0] = t - i,
s[1] = e - n,
l[0] = t + i,
void(l[1] = e + n);
if (ss[0] = as(o) * i + t, ss[1] = os(o) * n + e, ls[0] = as(a) * i + t, ls[1] = os(a) * n + e, u(s, ss, ls), h(l, ss, ls), (o %= rs) < 0 && (o += rs), (a %= rs) < 0 && (a += rs), o > a && !r ? a += rs: o < a && r && (o += rs), r) {
var d = a;
a = o,
o = d
}
for (var f = 0; f < a; f += math.pi / 2) f > o && (us[0] = as(f) * i + t, us[1] = os(f) * n + e, u(s, us, s), h(l, us, l))
}
function vn(t, e, i, n, o, a, r) {
if (0 === o) return ! 1;
var s = o,
l = 0,
u = t;
if (r > e + s && r > n + s || r < e - s && r < n - s || a > t + s && a > i + s || a < t - s && a < i - s) return ! 1;
if (t === i) return math.abs(a - t) <= s / 2;
var h = (l = (e - n) / (t - i)) * a - r + (u = (t * n - i * e) / (t - i));
return h * h / (l * l + 1) <= s / 2 * s / 2
}
function yn(t, e, i, n, o, a, r, s, l, u, h) {
if (0 === l) return ! 1;
var c = l;
return ! (h > e + c && h > n + c && h > a + c && h > s + c || h < e - c && h < n - c && h < a - c && h < s - c || u > t + c && u > i + c && u > o + c && u > r + c || u < t - c && u < i - c && u < o - c && u < r - c) && an(t, e, i, n, o, a, r, s, u, h, null) <= c / 2
}
function xn(t, e, i, n, o, a, r, s, l) {
if (0 === r) return ! 1;
var u = r;
return ! (l > e + u && l > n + u && l > a + u || l < e - u && l < n - u && l < a - u || s > t + u && s > i + u && s > o + u || s < t - u && s < i - u && s < o - u) && cn(t, e, i, n, o, a, s, l, null) <= u / 2
}
function _n(t) {
return (t %= is) < 0 && (t += is),
t
}
function wn(t, e, i, n, o, a, r, s, l) {
if (0 === r) return ! 1;
var u = r;
s -= t,
l -= e;
var h = math.sqrt(s * s + l * l);
if (h - u > i || h + u < i) return ! 1;
if (math.abs(n - o) % ts < 1e-4) return ! 0;
if (a) {
var c = n;
n = _n(o),
o = _n(c)
} else n = _n(n),
o = _n(o);
n > o && (o += ts);
var d = math.atan2(l, s);
return d < 0 && (d += ts),
d >= n && d <= o || d + ts >= n && d + ts <= o
}
function bn(t, e, i, n, o, a) {
if (a > e && a > n || a < e && a < n) return 0;
if (n === e) return 0;
var r = n < e ? 1 : -1,
s = (a - e) / (n - e);
1 !== s && 0 !== s || (r = n < e ? .5 : -.5);
var l = s * (i - t) + t;
return l === o ? 1 / 0 : l > o ? r: 0
}
function sn(t, e) {
return math.abs(t - e) < cs
}
function mn() {
var t = ks[0];
ks[0] = ks[1],
ks[1] = t
}
function in(t, e, i, n, o, a, r, s, l, u) {
if (u > e && u > n && u > a && u > s || u < e && u < n && u < a && u < s) return 0;
var h = en(e, n, a, s, u, ls);
if (0 === h) return 0;
for (var c, d, f = 0,
p = -1,
g = 0; g < h; g++) {
var m = ls[g],
v = 0 === m || 1 === m ? .5 : 1;
qi(t, i, o, r, m) < l || (p < 0 && (p = nn(e, n, a, s, ks), ks[1] < ks[0] && p > 1 && mn(), c = qi(e, n, a, s, ks[0]), p > 1 && (d = qi(e, n, a, s, ks[1]))), 2 == p ? m < ks[0] ? f += c < e ? v: -v: m < ks[1] ? f += d < c ? v: -v: f += s < d ? v: -v: m < ks[0] ? f += c < e ? v: -v: f += s < c ? v: -v)
}
return f
}
function tn(t, e, i, n, o, a, r, s) {
if (s > e && s > n && s > a || s < e && s < n && s < a) return 0;
var l = ln(e, n, a, s, ls);
if (0 === l) return 0;
var u = un(e, n, a);
if (u >= 0 && u <= 1) {
for (var h = 0,
c = rn(e, n, a, u), d = 0; d < l; d++) {
f = 0 === ls[d] || 1 === ls[d] ? .5 : 1; (p = rn(t, i, o, ls[d])) < r || (ls[d] < u ? h += c < e ? f: -f: h += a < c ? f: -f)
}
return h
}
var f = 0 === ls[0] || 1 === ls[0] ? .5 : 1,
p = rn(t, i, o, ls[0]);
return p < r ? 0 : a < e ? f: -f
}
function an(t, e, i, n, o, a, r, s) {
if ((s -= e) > i || s < -i) return 0;
u = math.sqrt(i * i - s * s);
ls[0] = -u,
ls[1] = u;
var l = math.abs(n - o);
if (l < 1e-4) return 0;
if (l % ds < 1e-4) {
n = 0,
o = ds;
p = a ? 1 : -1;
return r >= ls[0] + t && r <= ls[1] + t ? p: 0
}
if (a) {
var u = n;
n = _n(o),
o = _n(u)
} else n = _n(n),
o = _n(o);
n > o && (o += ds);
for (var h = 0,
c = 0; c < 2; c++) {
var d = ls[c];
if (d + t > r) {
var f = math.atan2(s, d),
p = a ? 1 : -1;
f < 0 && (f = ds + f),
(f >= n && f <= o || f + ds >= n && f + ds <= o) && (f > math.pi / 2 && f < 1.5 * math.pi && (p = -p), h += p)
}
}
return h
}
function dn(t, e, i, n, o) {
for (var a = 0,
r = 0,
s = 0,
l = 0,
u = 0,
h = 0; h < t.length;) {
var c = t[h++];
switch (c === as.m && h > 1 && (i || (a += bn(r, s, l, u, n, o))), 1 == h && (l = r = t[h], u = s = t[h + 1]), c) {
case as.m:
r = l = t[h++],
s = u = t[h++];
break;
case as.l:
if (i) {
if (vn(r, s, t[h], t[h + 1], e, n, o)) return ! 0
} else a += bn(r, s, t[h], t[h + 1], n, o) || 0;
r = t[h++],
s = t[h++];
break;
case as.c:
if (i) {
if (yn(r, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], e, n, o)) return ! 0
} else a += in(r, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], n, o) || 0;
r = t[h++],
s = t[h++];
break;
case as.q:
if (i) {
if (xn(r, s, t[h++], t[h++], t[h], t[h + 1], e, n, o)) return ! 0
} else a += tn(r, s, t[h++], t[h++], t[h], t[h + 1], n, o) || 0;
r = t[h++],
s = t[h++];
break;
case as.a:
var d = t[h++],
f = t[h++],
p = t[h++],
g = t[h++],
m = t[h++],
v = t[h++],
y = (t[h++], 1 - t[h++]),
x = math.cos(m) * p + d,
_ = math.sin(m) * g + f;
h > 1 ? a += bn(r, s, x, _, n, o) : (l = x, u = _);
var w = (n - d) * g / p + d;
if (i) {
if (wn(d, f, g, m, m + v, y, e, w, o)) return ! 0
} else a += an(d, f, g, m, m + v, y, w, o);
r = math.cos(m + v) * p + d,
s = math.sin(m + v) * g + f;
break;
case as.r:
l = r = t[h++],
u = s = t[h++];
var x = l + t[h++],
_ = u + t[h++];
if (i) {
if (vn(l, u, x, u, e, n, o) || vn(x, u, x, _, e, n, o) || vn(x, _, l, _, e, n, o) || vn(l, _, l, u, e, n, o)) return ! 0
} else a += bn(x, u, x, _, n, o),
a += bn(l, _, l, u, n, o);
break;
case as.z:
if (i) {
if (vn(r, s, l, u, e, n, o)) return ! 0
} else a += bn(r, s, l, u, n, o);
r = l,
s = u
}
}
return i || sn(s, u) || (a += bn(r, s, l, u, n, o) || 0),
0 !== a
}
function cn(t, e, i) {
return dn(t, 0, !1, e, i)
}
function ln(t, e, i, n) {
return dn(t, e, !0, i, n)
}
function kn(t) {
ui.call(this, t),
this.path = null
}
function pn(t, e, i, n, o, a, r, s, l, u, h) {
var c = l * (hs / 180),
d = ws(c) * (t - i) / 2 + fs(c) * (e - n) / 2,
f = -1 * fs(c) * (t - i) / 2 + ws(c) * (e - n) / 2,
p = d * d / (r * r) + f * f / (s * s);
p > 1 && (r *= gs(p), s *= gs(p));
var g = (o === a ? -1 : 1) * gs((r * r * (s * s) - r * r * (f * f) - s * s * (d * d)) / (r * r * (f * f) + s * s * (d * d))) || 0,
m = g * r * f / s,
v = g * -s * d / r,
y = (t + i) / 2 + ws(c) * m - fs(c) * v,
x = (e + n) / 2 + fs(c) * m + ws(c) * v,
_ = xs([1, 0], [(d - m) / r, (f - v) / s]),
w = [(d - m) / r, (f - v) / s],
b = [( - 1 * d - m) / r, ( - 1 * f - v) / s],
s = xs(w, b);
us(w, b) <= -1 && (s = hs),
us(w, b) >= 1 && (s = 0),
0 === a && s > 0 && (s -= 2 * hs),
1 === a && s < 0 && (s += 2 * hs),
h.adddata(u, y, x, r, s, _, s, c, a)
}
function nn(t) {
if (!t) return new ms;
for (var e, i = 0,
n = 0,
o = i,
a = n,
r = new ms,
s = ms.cmd,
l = t.match(js), u = 0; u < l.length; u++) {
for (var h, c = l[u], d = c.charat(0), f = c.match(ys) || [], p = f.length, g = 0; g < p; g++) f[g] = parsefloat(f[g]);
for (var m = 0; m < p;) {
var v, y, x, _, w, b, s, m = i,
i = n;
switch (d) {
case "l":
i += f[m++],
n += f[m++],
h = s.l,
r.adddata(h, i, n);
break;
case "l":
i = f[m++],
n = f[m++],
h = s.l,
r.adddata(h, i, n);
break;
case "m":
i += f[m++],
n += f[m++],
h = s.m,
r.adddata(h, i, n),
o = i,
a = n,
d = "l";
break;
case "m":
i = f[m++],
n = f[m++],
h = s.m,
r.adddata(h, i, n),
o = i,
a = n,
d = "l";
break;
case "h":
i += f[m++],
h = s.l,
r.adddata(h, i, n);
break;
case "h":
i = f[m++],
h = s.l,
r.adddata(h, i, n);
break;
case "v":
n += f[m++],
h = s.l,
r.adddata(h, i, n);
break;
case "v":
n = f[m++],
h = s.l,
r.adddata(h, i, n);
break;
case "c":
h = s.c,
r.adddata(h, f[m++], f[m++], f[m++], f[m++], f[m++], f[m++]),
i = f[m - 2],
n = f[m - 1];
break;
case "c":
h = s.c,
r.adddata(h, f[m++] + i, f[m++] + n, f[m++] + i, f[m++] + n, f[m++] + i, f[m++] + n),
i += f[m - 2],
n += f[m - 1];
break;
case "s":
v = i,
y = n;
var t = r.len(),
a = r.data;
e === s.c && (v += i - a[t - 4], y += n - a[t - 3]),
h = s.c,
m = f[m++],
i = f[m++],
i = f[m++],
n = f[m++],
r.adddata(h, v, y, m, i, i, n);
break;
case "s":
v = i,
y = n;
var t = r.len(),
a = r.data;
e === s.c && (v += i - a[t - 4], y += n - a[t - 3]),
h = s.c,
m = i + f[m++],
i = n + f[m++],
i += f[m++],
n += f[m++],
r.adddata(h, v, y, m, i, i, n);
break;
case "q":
m = f[m++],
i = f[m++],
i = f[m++],
n = f[m++],
h = s.q,
r.adddata(h, m, i, i, n);
break;
case "q":
m = f[m++] + i,
i = f[m++] + n,
i += f[m++],
n += f[m++],
h = s.q,
r.adddata(h, m, i, i, n);
break;
case "t":
v = i,
y = n;
var t = r.len(),
a = r.data;
e === s.q && (v += i - a[t - 4], y += n - a[t - 3]),
i = f[m++],
n = f[m++],
h = s.q,
r.adddata(h, v, y, i, n);
break;
case "t":
v = i,
y = n;
var t = r.len(),
a = r.data;
e === s.q && (v += i - a[t - 4], y += n - a[t - 3]),
i += f[m++],
n += f[m++],
h = s.q,
r.adddata(h, v, y, i, n);
break;
case "a":
x = f[m++],
_ = f[m++],
w = f[m++],
b = f[m++],
s = f[m++],
pn(m = i, i = n, i = f[m++], n = f[m++], b, s, x, _, w, h = s.a, r);
break;
case "a":
x = f[m++],
_ = f[m++],
w = f[m++],
b = f[m++],
s = f[m++],
pn(m = i, i = n, i += f[m++], n += f[m++], b, s, x, _, w, h = s.a, r)
}
}
"z" !== d && "z" !== d || (h = s.z, r.adddata(h), i = o, n = a),
e = h
}
return r.tostatic(),
r
}
function on(t, e) {
var i = nn(t);
return e = e || {},
e.buildpath = function(t) {
if (t.setdata) t.setdata(i.data),
(e = t.getcontext()) && t.rebuildpath(e);
else {
var e = t;
i.rebuildpath(e)
}
},
e.applytransform = function(t) {
vs(i, t),
this.dirty(!0)
},
e
}
function en(t, e) {
return new kn(on(t, e))
}
function rn(t, e) {
return kn.extend(on(t, e))
}
function zn(t, e, i, n, o, a, r) {
var s = .5 * (i - t),
l = .5 * (n - e);
return (2 * (e - i) + s + l) * r + ( - 3 * (e - i) - 2 * s - l) * a + s * o + e
}
function bn(t, e, i) {
var n = e.points,
o = e.smooth;
if (n && n.length >= 2) {
if (o && "spline" !== o) {
var a = im(n, o, i, e.smoothconstraint);
t.moveto(n[0][0], n[0][1]);
for (var r = n.length,
s = 0; s < (i ? r: r - 1); s++) {
var l = a[2 * s],
u = a[2 * s + 1],
h = n[(s + 1) % r];
t.beziercurveto(l[0], l[1], u[0], u[1], h[0], h[1])
}
} else {
"spline" === o && (n = em(n, i)),
t.moveto(n[0][0], n[0][1]);
for (var s = 1,
c = n.length; s < c; s++) t.lineto(n[s][0], n[s][1])
}
i && t.closepath()
}
}
function vn(t, e, i) {
var n = t.cpx2,
o = t.cpy2;
return null === n || null === o ? [(i ? tn: qi)(t.x1, t.cpx1, t.cpx2, t.x2, e), (i ? tn: qi)(t.y1, t.cpy1, t.cpy2, t.y2, e)] : [(i ? sn: rn)(t.x1, t.cpx1, t.x2, e), (i ? sn: rn)(t.y1, t.cpy1, t.y2, e)]
}
function gn(t) {
ui.call(this, t),
this._displayables = [],
this._temporarydisplayables = [],
this._cursor = 0,
this.notclear = !0
}
function fn(t) {
return kn.extend(t)
}
function wn(t, e, i, n) {
var o = en(t, e);
return i && ("center" === n && (i = zn(i, o.getboundingrect())), un(o, i)),
o
}
function hn(t, e, i) {
var n = new hi({
style: {
image: t,
x: e.x,
y: e.y,
width: e.width,
height: e.height
},
onload: function(t) {
if ("center" === i) {
var o = {
width: t.width,
height: t.height
};
n.setstyle(zn(e, o))
}
}
});
return n
}
function zn(t, e) {
var i, n = e.width / e.height,
o = t.height * n;
return i = o <= t.width ? t.height: (o = t.width) / n,
{
x: t.x + t.width / 2 - o / 2,
y: t.y + t.height / 2 - i / 2,
width: o,
height: i
}
}
function un(t, e) {
if (t.applytransform) {
var i = t.getboundingrect().calculatetransform(e);
t.applytransform(i)
}
}
function xn(t) {
var e = t.shape,
i = t.style.linewidth;
return gm(2 * e.x1) === gm(2 * e.x2) && (e.x1 = e.x2 = yn(e.x1, i, !0)),
gm(2 * e.y1) === gm(2 * e.y2) && (e.y1 = e.y2 = yn(e.y1, i, !0)),
t
}
function jn(t) {
var e = t.shape,
i = t.style.linewidth,
n = e.x,
o = e.y,
a = e.width,
r = e.height;
return e.x = yn(e.x, i, !0),
e.y = yn(e.y, i, !0),
e.width = math.max(yn(n + a, i, !1) - e.x, 0 === a ? 0 : 1),
e.height = math.max(yn(o + r, i, !1) - e.y, 0 === r ? 0 : 1),
t
}
function yn(t, e, i) {
var n = gm(2 * t);
return (n + gm(e)) % 2 == 0 ? n / 2 : (n + (i ? 1 : -1)) / 2
}
function qn(t) {
return null != t && "none" !== t
}
function kn(t) {
if ("string" != typeof t) return t;
var e = _m.get(t);
return e || (e = gt(t, -.1), wm < 1e4 && (_m.set(t, e), wm++)),
e
}
function $n(t) {
if (t.__hoverstldirty) {
t.__hoverstldirty = !1;
var e = t.__hoverstl;
if (e) {
var i = t.__normalstl = {},
n = t.style;
for (var o in e) null != e[o] && (i[o] = n[o]);
i.fill = n.fill,
i.stroke = n.stroke
} else t.__normalstl = null
}
}
function jn(t) {
var e = t.__hoverstl;
if (e && !t.__highlighted) {
var i = t.usehoverlayer;
t.__highlighted = i ? "layer": "plain";
var n = t.__zr;
if (n || !i) {
var o = t,
a = t.style;
i && (a = (o = n.addhover(t)).style),
xo(a),
i || $n(o),
a.extendfrom(e),
qn(a, e, "fill"),
qn(a, e, "stroke"),
yo(a),
i || (t.dirty(!1), t.z2 += 1)
}
}
}
function qn(t, e, i) { ! qn(e[i]) && qn(t[i]) && (t[i] = kn(t[i]))
}
function to(t) {
t.__highlighted && (eo(t), t.__highlighted = !1)
}
function eo(t) {
var e = t.__highlighted;
if ("layer" === e) t.__zr && t.__zr.removehover(t);
else if (e) {
var i = t.style,
n = t.__normalstl;
n && (xo(i), t.setstyle(n), yo(i), t.z2 -= 1)
}
}
function io(t, e) {
t.isgroup ? t.traverse(function(t) { ! t.isgroup && e(t)
}) : e(t)
}
function no(t, e) {
e = t.__hoverstl = !1 !== e && (e || {}),
t.__hoverstldirty = !0,
t.__highlighted && (to(t), jn(t))
}
function oo(t) {
return t && t.__isemphasisentered
}
function ao(t) {
this.__hoversilentontouch && t.zrbytouch || !this.__isemphasisentered && io(this, jn)
}
function ro(t) {
this.__hoversilentontouch && t.zrbytouch || !this.__isemphasisentered && io(this, to)
}
function so() {
this.__isemphasisentered = !0,
io(this, jn)
}
function lo() {
this.__isemphasisentered = !1,
io(this, to)
}
function uo(t, e, i) {
t.isgroup ? t.traverse(function(t) { ! t.isgroup && no(t, t.hoverstyle || e)
}) : no(t, t.hoverstyle || e),
ho(t, i)
}
function ho(t, e) {
var i = !1 === e;
if (t.__hoversilentontouch = null != e && e.hoversilentontouch, !i || t.__hoverstyletrigger) {
var n = i ? "off": "on";
t[n]("mouseover", ao)[n]("mouseout", ro),
t[n]("emphasis", so)[n]("normal", lo),
t.__hoverstyletrigger = !i
}
}
function co(t, e, i, n, o, a, r) {
var s, l = (o = o || ym).labelfetcher,
u = o.labeldataindex,
h = o.labeldimindex,
c = i.getshallow("show"),
d = n.getshallow("show"); (c || d) && (l && (s = l.getformattedlabel(u, "normal", null, h)), null == s && (s = x(o.defaulttext) ? o.defaulttext(u, o) : o.defaulttext));
var f = c ? s: null,
p = d ? a(l ? l.getformattedlabel(u, "emphasis", null, h) : null, s) : null;
null == f && null == p || (fo(t, i, a, o), fo(e, n, r, o, !0)),
t.text = f,
e.text = p
}
function fo(t, e, i, n, o) {
return po(t, e, n, o),
i && a(t, i),
t
}
function po(t, e, i, n) {
if ((i = i || ym).isrecttext) {
var o = e.getshallow("position") || (n ? null: "inside");
"outside" === o && (o = "top"),
t.textposition = o,
t.textoffset = e.getshallow("offset");
var a = e.getshallow("rotate");
null != a && (a *= math.pi / 180),
t.textrotation = a,
t.textdistance = a(e.getshallow("distance"), n ? null: 5)
}
var r, s = e.ecmodel,
l = s && s.option.textstyle,
u = go(e);
if (u) {
r = {};
for (var h in u) if (u.hasownproperty(h)) {
var c = e.getmodel(["rich", h]);
mo(r[h] = {},
c, l, i, n)
}
}
return t.rich = r,
mo(t, e, l, i, n, !0),
i.forcerich && !i.textstyle && (i.textstyle = {}),
t
}
function go(t) {
for (var e; t && t !== t.ecmodel;) {
var i = (t.option || ym).rich;
if (i) {
e = e || {};
for (var n in i) i.hasownproperty(n) && (e[n] = 1)
}
t = t.parentmodel
}
return e
}
function mo(t, e, i, n, o, a) {
i = !o && i || ym,
t.textfill = vo(e.getshallow("color"), n) || i.color,
t.textstroke = vo(e.getshallow("textbordercolor"), n) || i.textbordercolor,
t.textstrokewidth = a(e.getshallow("textborderwidth"), i.textborderwidth),
t.insiderawtextposition = t.textposition,
o || (a && (t.insiderollbackopt = n, yo(t)), null == t.textfill && (t.textfill = n.autocolor)),
t.fontstyle = e.getshallow("fontstyle") || i.fontstyle,
t.fontweight = e.getshallow("fontweight") || i.fontweight,
t.fontsize = e.getshallow("fontsize") || i.fontsize,
t.fontfamily = e.getshallow("fontfamily") || i.fontfamily,
t.textalign = e.getshallow("align"),
t.textverticalalign = e.getshallow("verticalalign") || e.getshallow("baseline"),
t.textlineheight = e.getshallow("lineheight"),
t.textwidth = e.getshallow("width"),
t.textheight = e.getshallow("height"),
t.texttag = e.getshallow("tag"),
a && n.disablebox || (t.textbackgroundcolor = vo(e.getshallow("backgroundcolor"), n), t.textpadding = e.getshallow("padding"), t.textbordercolor = vo(e.getshallow("bordercolor"), n), t.textborderwidth = e.getshallow("borderwidth"), t.textborderradius = e.getshallow("borderradius"), t.textboxshadowcolor = e.getshallow("shadowcolor"), t.textboxshadowblur = e.getshallow("shadowblur"), t.textboxshadowoffsetx = e.getshallow("shadowoffsetx"), t.textboxshadowoffsety = e.getshallow("shadowoffsety")),
t.textshadowcolor = e.getshallow("textshadowcolor") || i.textshadowcolor,
t.textshadowblur = e.getshallow("textshadowblur") || i.textshadowblur,
t.textshadowoffsetx = e.getshallow("textshadowoffsetx") || i.textshadowoffsetx,
t.textshadowoffsety = e.getshallow("textshadowoffsety") || i.textshadowoffsety
}
function vo(t, e) {
return "auto" !== t ? t: e && e.autocolor ? e.autocolor: null
}
function yo(t) {
var e = t.insiderollbackopt;
if (e && null == t.textfill) {
var i, n = e.useinsidestyle,
o = t.insiderawtextposition,
a = e.autocolor; ! 1 !== n && (!0 === n || e.isrecttext && o && "string" == typeof o && o.indexof("inside") >= 0) ? (i = {
textfill: null,
textstroke: t.textstroke,
textstrokewidth: t.textstrokewidth
},
t.textfill = "#fff", null == t.textstroke && (t.textstroke = a, null == t.textstrokewidth && (t.textstrokewidth = 2))) : null != a && (i = {
textfill: null
},
t.textfill = a),
i && (t.insiderollback = i)
}
}
function xo(t) {
var e = t.insiderollback;
e && (t.textfill = e.textfill, t.textstroke = e.textstroke, t.textstrokewidth = e.textstrokewidth, t.insiderollback = null)
}
function _o(t, e) {
var i = e || e.getmodel("textstyle");
return p([t.fontstyle || i && i.getshallow("fontstyle") || "", t.fontweight || i && i.getshallow("fontweight") || "", (t.fontsize || i && i.getshallow("fontsize") || 12) + "px", t.fontfamily || i && i.getshallow("fontfamily") || "sans-serif"].join(" "))
}
function wo(t, e, i, n, o, a) {
if ("function" == typeof o && (a = o, o = null), n && n.isanimationenabled()) {
var r = t ? "update": "",
s = n.getshallow("animationduration" + r),
l = n.getshallow("animationeasing" + r),
u = n.getshallow("animationdelay" + r);
"function" == typeof u && (u = u(o, n.getanimationdelayparams ? n.getanimationdelayparams(e, o) : null)),
"function" == typeof s && (s = s(o)),
s > 0 ? e.animateto(i, s, u || 0, l, a, !!a) : (e.stopanimation(), e.attr(i), a && a())
} else e.stopanimation(),
e.attr(i),
a && a()
}
function bo(t, e, i, n, o) {
wo(!0, t, e, i, n, o)
}
function so(t, e, i, n, o) {
wo(!1, t, e, i, n, o)
}
function mo(t, e) {
for (var i = vt([]); t && t !== e;) xt(i, t.getlocaltransform(), i),
t = t.parent;
return i
}
function io(t, e, i) {
return e && !c(e) && (e = mw.getlocaltransform(e)),
i && (e = st([], e)),
q([], t, e)
}
function to(t, e, i) {
var n = 0 === e[4] || 0 === e[5] || 0 === e[0] ? 1 : math.abs(2 * e[4] / e[0]),
o = 0 === e[4] || 0 === e[5] || 0 === e[2] ? 1 : math.abs(2 * e[4] / e[2]),
a = ["left" === t ? -n: "right" === t ? n: 0, "top" === t ? -o: "bottom" === t ? o: 0];
return a = io(a, e, i),
math.abs(a[0]) > math.abs(a[1]) ? a[0] > 0 ? "right": "left": a[1] > 0 ? "bottom": "top"
}
function ao(t, e, i, n) {
function o(t) {
var e = {
position: f(t.position),
rotation: t.rotation
};
return t.shape && (e.shape = a({},
t.shape)),
e
}
if (t && e) {
var r = function(t) {
var e = {};
return t.traverse(function(t) { ! t.isgroup && t.anid && (e[t.anid] = t)
}),
e
} (t);
e.traverse(function(t) {
if (!t.isgroup && t.anid) {
var e = r[t.anid];
if (e) {
var n = o(t);
t.attr(o(e)),
bo(t, n, i, t.dataindex)
}
}
})
}
}
function do(t, e) {
return f(t,
function(t) {
var i = t[0];
i = mm(i, e.x),
i = vm(i, e.x + e.width);
var n = t[1];
return n = mm(n, e.y),
n = vm(n, e.y + e.height),
[i, n]
})
}
function co(t, e, i) {
var n = (e = a({
recthover: !0
},
e)).style = {
strokenoscale: !0
};
if (i = i || {
x: -1,
y: -1,
width: 2,
height: 2
},
t) return 0 === t.indexof("image://") ? (n.image = t.slice(8), r(n, i), new hi(e)) : wn(t.replace("path://", ""), e, i, "center")
}
function lo(t, e, i) {
this.parentmodel = e,
this.ecmodel = i,
this.option = t
}
function ko(t, e, i) {
for (var n = 0; n < e.length && (!e[n] || null != (t = t && "object" == typeof t ? t[e[n]] : null)); n++);
return null == t && i && (t = i.get(e)),
t
}
function po(t, e) {
var i = dm(t).getparent;
return i ? i.call(t, e) : t.parentmodel
}
function no(t) {
return [t || "", cm++, math.random().tofixed(5)].join("_")
}
function oo(t) {
return t.replace(/^\s+/, "").replace(/\s+$/, "")
}
function eo(t, e, i, n) {
var o = e[1] - e[0],
a = i[1] - i[0];
if (0 === o) return 0 === a ? i[0] : (i[0] + i[1]) / 2;
if (n) if (o > 0) {
if (t <= e[0]) return i[0];
if (t >= e[1]) return i[1]
} else {
if (t >= e[0]) return i[0];
if (t <= e[1]) return i[1]
} else {
if (t === e[0]) return i[0];
if (t === e[1]) return i[1]
}
return (t - e[0]) / o * a + i[0]
}
function ro(t, e) {
switch (t) {
case "center":
case "middle":
t = "50%";
break;
case "left":
case "top":
t = "0%";
break;
case "right":
case "bottom":
t = "100%"
}
return "string" == typeof t ? oo(t).match(/%$/) ? parsefloat(t) / 100 * e: parsefloat(t) : null == t ? nan: +t
}
function zo(t, e, i) {
return null == e && (e = 10),
e = math.min(math.max(0, e), 20),
t = ( + t).tofixed(e),
i ? t: +t
}
function bo(t) {
return t.sort(function(t, e) {
return t - e
}),
t
}
function vo(t) {
if (t = +t, isnan(t)) return 0;
for (var e = 1,
i = 0; math.round(t * e) / e !== t;) e *= 10,
i++;
return i
}
function go(t) {
var e = t.tostring(),
i = e.indexof("e");
if (i > 0) {
var n = +e.slice(i + 1);
return n < 0 ? -n: 0
}
var o = e.indexof(".");
return o < 0 ? 0 : e.length - 1 - o
}
function fo(t, e) {
var i = math.log,
n = math.ln10,
o = math.floor(i(t[1] - t[0]) / n),
a = math.round(i(math.abs(e[1] - e[0])) / n),
r = math.min(math.max( - o + a, 0), 20);
return isfinite(r) ? r: 20
}
function wo(t, e, i) {
if (!t[e]) return 0;
var n = p(t,
function(t, e) {
return t + (isnan(e) ? 0 : e)
},
0);
if (0 === n) return 0;
for (var o = math.pow(10, i), a = f(t,
function(t) {
return (isnan(t) ? 0 : t) / n * o * 100
}), r = 100 * o, s = f(a,
function(t) {
return math.floor(t)
}), l = p(s,
function(t, e) {
return t + e
},
0), u = f(a,
function(t, e) {
return t - s[e]
}); l < r;) {
for (var h = number.negative_infinity,
c = null,
d = 0,
g = u.length; d < g; ++d) u[d] > h && (h = u[d], c = d); ++s[c],
u[c] = 0,
++l
}
return s[e] / o
}
function ho(t) {
var e = 2 * math.pi;
return (t % e + e) % e
}
function zo(t) {
return t > -lm && t < lm
}
function uo(t) {
if (t instanceof date) return t;
if ("string" == typeof t) {
var e = pm.exec(t);
if (!e) return new date(nan);
if (e[8]) {
var i = +e[4] || 0;
return "z" !== e[8].touppercase() && (i -= e[8].slice(0, 3)),
new date(date.utc( + e[1], +(e[2] || 1) - 1, +e[3] || 1, i, +(e[5] || 0), +e[6] || 0, +e[7] || 0))
}
return new date( + e[1], +(e[2] || 1) - 1, +e[3] || 1, +e[4] || 0, +(e[5] || 0), +e[6] || 0, +e[7] || 0)
}
return null == t ? new date(nan) : new date(math.round(t))
}
function xo(t) {
return math.pow(10, jo(t))
}
function jo(t) {
return math.floor(math.log(t) / math.ln10)
}
function yo(t, e) {
var i, n = jo(t),
o = math.pow(10, n),
a = t / o;
return i = e ? a < 1.5 ? 1 : a < 2.5 ? 2 : a < 4 ? 3 : a < 7 ? 5 : 10 : a < 1 ? 1 : a < 2 ? 2 : a < 3 ? 3 : a < 5 ? 5 : 10,
t = i * o,
n >= -20 ? +t.tofixed(n < 0 ? -n: 0) : t
}
function qo(t) {
function e(t, i, n) {
return t.interval[n] < i.interval[n] || t.interval[n] === i.interval[n] && (t.close[n] - i.close[n] == (n ? -1 : 1) || !n && e(t, i, 1))
}
t.sort(function(t, i) {
return e(t, i, 0) ? -1 : 1
});
for (var i = -1 / 0,
n = 1,
o = 0; o < t.length;) {
for (var a = t[o].interval, r = t[o].close, s = 0; s < 2; s++) a[s] <= i && (a[s] = i, r[s] = s ? 1 : 1 - n),
i = a[s],
n = r[s];
a[0] === a[1] && r[0] * r[1] != 1 ? t.splice(o, 1) : o++
}
return t
}
function ko(t) {
return t - parsefloat(t) >= 0
}
function $o(t) {
return isnan(t) ? "-": (t = (t + "").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (t.length > 1 ? "." + t[1] : "")
}
function jo(t, e) {
return t = (t || "").tolowercase().replace(/-(.)/g,
function(t, e) {
return e.touppercase()
}),
e && t && (t = t.charat(0).touppercase() + t.slice(1)),
t
}
function qo(t) {
return null == t ? "": (t + "").replace(em,
function(t, e) {
return rm[e]
})
}
function ta(t, e, i) {
y(e) || (e = [e]);
var n = e.length;
if (!n) return "";
for (var o = e[0].$vars || [], a = 0; a < o.length; a++) {
var r = zm[a];
t = t.replace(bm(r), bm(r, 0))
}
for (var s = 0; s < n; s++) for (var l = 0; l < o.length; l++) {
var u = e[s][o[l]];
t = t.replace(bm(zm[l], s), i ? qo(u) : u)
}
return t
}
function ea(t, e, i) {
return d(e,
function(e, n) {
t = t.replace("{" + n + "}", i ? qo(e) : e)
}),
t
}
function ia(t, e) {
var i = (t = _(t) ? {
color: t,
extracsstext: e
}: t || {}).color,
n = t.type,
e = t.extracsstext,
o = t.rendermode || "html",
a = t.markerid || "x";
return i ? "html" === o ? "subitem" === n ? '': '': {
rendermode: o,
content: "{marker" + a + "|} ",
style: {
color: i
}
}: ""
}
function na(t, e) {
return t += "",
"0000".substr(0, e - t.length) + t
}
function oa(t, e, i) {
"week" !== t && "month" !== t && "quarter" !== t && "half-year" !== t && "year" !== t || (t = "mm-dd\nyyyy");
var n = uo(e),
o = i ? "utc": "",
a = n["get" + o + "fullyear"](),
r = n["get" + o + "month"]() + 1,
s = n["get" + o + "date"](),
l = n["get" + o + "hours"](),
u = n["get" + o + "minutes"](),
h = n["get" + o + "seconds"](),
c = n["get" + o + "milliseconds"]();
return t = t.replace("mm", na(r, 2)).replace("m", r).replace("yyyy", a).replace("yy", a % 100).replace("dd", na(s, 2)).replace("d", s).replace("hh", na(l, 2)).replace("h", l).replace("mm", na(u, 2)).replace("m", u).replace("ss", na(h, 2)).replace("s", h).replace("sss", na(c, 3))
}
function aa(t) {
return t ? t.charat(0).touppercase() + t.substr(1) : t
}
function ra(t, e, i, n, o) {
var a = 0,
r = 0;
null == n && (n = 1 / 0),
null == o && (o = 1 / 0);
var s = 0;
e.eachchild(function(l, u) {
var h, c, d = l.position,
f = l.getboundingrect(),
p = e.childat(u + 1),
g = p && p.getboundingrect();
if ("horizontal" === t) {
var m = f.width + (g ? -g.x + f.x: 0); (h = a + m) > n || l.newline ? (a = 0, h = m, r += s + i, s = f.height) : s = math.max(s, f.height)
} else {
var v = f.height + (g ? -g.y + f.y: 0); (c = r + v) > o || l.newline ? (a += s + i, r = 0, c = v, s = f.width) : s = math.max(s, f.width)
}
l.newline || (d[0] = a, d[1] = r, "horizontal" === t ? a = h + i: r = c + i)
})
}
function sa(t, e, i) {
var n = e.width,
o = e.height,
a = ro(t.x, n),
r = ro(t.y, o),
s = ro(t.x2, n),
l = ro(t.y2, o);
return (isnan(a) || isnan(parsefloat(t.x))) && (a = 0),
(isnan(s) || isnan(parsefloat(t.x2))) && (s = n),
(isnan(r) || isnan(parsefloat(t.y))) && (r = 0),
(isnan(l) || isnan(parsefloat(t.y2))) && (l = o),
i = om(i || 0),
{
width: math.max(s - a - i[1] - i[3], 0),
height: math.max(l - r - i[0] - i[2], 0)
}
}
function la(t, e, i) {
i = om(i || 0);
var n = e.width,
o = e.height,
a = ro(t.left, n),
r = ro(t.top, o),
s = ro(t.right, n),
l = ro(t.bottom, o),
u = ro(t.width, n),
h = ro(t.height, o),
c = i[2] + i[0],
d = i[1] + i[3],
f = t.aspect;
switch (isnan(u) && (u = n - s - d - a), isnan(h) && (h = o - l - c - r), null != f && (isnan(u) && isnan(h) && (f > n / o ? u = .8 * n: h = .8 * o), isnan(u) && (u = f * h), isnan(h) && (h = u / f)), isnan(a) && (a = n - s - u - d), isnan(r) && (r = o - l - h - c), t.left || t.right) {
case "center":
a = n / 2 - u / 2 - i[3];
break;
case "right":
a = n - u - d
}
switch (t.top || t.bottom) {
case "middle":
case "center":
r = o / 2 - h / 2 - i[0];
break;
case "bottom":
r = o - h - c
}
a = a || 0,
r = r || 0,
isnan(u) && (u = n - d - a - (s || 0)),
isnan(h) && (h = o - c - r - (l || 0));
var p = new ue(a + i[3], r + i[0], u, h);
return p.margin = i,
p
}
function ua(t, e, i, n, o) {
var a = !o || !o.hv || o.hv[0],
s = !o || !o.hv || o.hv[1],
l = o && o.boundingmode || "all";
if (a || s) {
var u;
if ("raw" === l) u = "group" === t.type ? new ue(0, 0, +e.width || 0, +e.height || 0) : t.getboundingrect();
else if (u = t.getboundingrect(), t.needlocaltransform()) {
var h = t.getlocaltransform(); (u = u.clone()).applytransform(h)
}
e = la(r({
width: u.width,
height: u.height
},
e), i, n);
var c = t.position,
d = a ? e.x - u.x: 0,
f = s ? e.y - u.y: 0;
t.attr("position", "raw" === l ? [d, f] : [c[0] + d, c[1] + f])
}
}
function ha(t, e) {
return null != t[zm[e][0]] || null != t[zm[e][1]] && null != t[zm[e][2]]
}
function ca(t, e, i) {
function n(i, n) {
var r = {},
l = 0,
u = {},
h = 0;
if (wm(i,
function(e) {
u[e] = t[e]
}), wm(i,
function(t) {
o(e, t) && (r[t] = u[t] = e[t]),
a(r, t) && l++,
a(u, t) && h++
}), s[n]) return a(e, i[1]) ? u[i[2]] = null: a(e, i[2]) && (u[i[1]] = null),
u;
if (2 !== h && l) {
if (l >= 2) return r;
for (var c = 0; c < i.length; c++) {
var d = i[c];
if (!o(r, d) && o(t, d)) {
r[d] = t[d];
break
}
}
return r
}
return u
}
function o(t, e) {
return t.hasownproperty(e)
}
function a(t, e) {
return null != t[e] && "auto" !== t[e]
}
function r(t, e, i) {
wm(t,
function(t) {
e[t] = i[t]
})
} ! w(i) && (i = {});
var s = i.ignoresize; ! y(s) && (s = [s, s]);
var l = n(zm[0], 0),
u = n(zm[1], 1);
r(zm[0], t, l),
r(zm[1], t, u)
}
function da(t) {
return fa({},
t)
}
function fa(t, e) {
return e && t && wm(hm,
function(i) {
e.hasownproperty(i) && (t[i] = e[i])
}),
t
}
function pa(t, e) {
for (var i = t.length,
n = 0; n < i; n++) if (t[n].length > e) return t[n];
return t[i - 1]
}
function ga(t) {
var e = t.get("coordinatesystem"),
i = {
coordsysname: e,
coordsysdims: [],
axismap: r(),
categoryaxismap: r()
},
n = qm[e];
if (n) return n(t, i, i.axismap, i.categoryaxismap),
i
}
function ma(t) {
return "category" === t.get("type")
}
function va(t) {
this.fromdataset = t.fromdataset,
this.data = t.data || (t.sourceformat === ni ? {}: []),
this.sourceformat = t.sourceformat || oi,
this.serieslayoutby = t.serieslayoutby || ri,
this.dimensionsdefine = t.dimensionsdefine,
this.encodedefine = t.encodedefine && r(t.encodedefine),
this.startindex = t.startindex || 0,
this.dimensionsdetectcount = t.dimensionsdetectcount
}
function ya(t) {
var e = t.option.source,
i = oi;
if (s(e)) i = ai;
else if (y(e)) {
0 === e.length && (i = ei);
for (var n = 0,
o = e.length; n < o; n++) {
var a = e[n];
if (null != a) {
if (y(a)) {
i = ei;
break
}
if (w(a)) {
i = ii;
break
}
}
}
} else if (w(e)) {
for (var r in e) if (e.hasownproperty(r) && c(e[r])) {
i = ni;
break
}
} else if (null != e) throw new error("invalid data");
li(t).sourceformat = i
}
function xa(t) {
return li(t).source
}
function _a(t) {
li(t).datasetmap = r()
}
function wa(t) {
var e = t.option,
i = e.data,
n = s(i) ? ai: ti,
o = !1,
a = e.serieslayoutby,
r = e.sourceheader,
s = e.dimensions,
l = aa(t);
if (l) {
var u = l.option;
i = u.source,
n = li(l).sourceformat,
o = !0,
a = a || u.serieslayoutby,
null == r && (r = u.sourceheader),
s = s || u.dimensions
}
var h = ba(i, n, a, r, s),
c = e.encode; ! c && l && (c = ta(t, l, i, n, a, h)),
li(t).source = new va({
data: i,
fromdataset: o,
serieslayoutby: a,
sourceformat: n,
dimensionsdefine: h.dimensionsdefine,
startindex: h.startindex,
dimensionsdetectcount: h.dimensionsdetectcount,
encodedefine: c
})
}
function ba(t, e, i, n, o) {
if (!t) return {
dimensionsdefine: sa(o)
};
var a, r, s;
if (e === ei)"auto" === n || null == n ? ma(function(t) {
null != t && "-" !== t && (_(t) ? null == r && (r = 1) : r = 0)
},
i, t, 10) : r = n ? 1 : 0,
o || 1 !== r || (o = [], ma(function(t, e) {
o[e] = null != t ? t: ""
},
i, t)),
a = o ? o.length: i === si ? t.length: t[0] ? t[0].length: null;
else if (e === ii) o || (o = ia(t), s = !0);
else if (e === ni) o || (o = [], s = !0, d(t,
function(t, e) {
o.push(e)
}));
else if (e === ti) {
var l = li(t[0]);
a = y(l) && l.length || 1
}
var u;
return s && d(o,
function(t, e) {
"name" === (w(t) ? t.name: t) && (u = e)
}),
{
startindex: r,
dimensionsdefine: sa(o),
dimensionsdetectcount: a,
potentialnamedimindex: u
}
}
function sa(t) {
if (t) {
var e = r();
return f(t,
function(t, i) {
if (null == (t = a({},
w(t) ? t: {
name: t
})).name) return t;
t.name += "",
null == t.displayname && (t.displayname = t.name);
var n = e.get(t.name);
return n ? t.name += "-" + n.count++:e.set(t.name, {
count: 1
}),
t
})
}
}
function ma(t, e, i, n) {
if (null == n && (n = 1 / 0), e === si) for (a = 0; a < i.length && a < n; a++) t(i[a] ? i[a][0] : null, a);
else for (var o = i[0] || [], a = 0; a < o.length && a < n; a++) t(o[a], a)
}
function ia(t) {
for (var e, i = 0; i < t.length && !(e = t[i++]););
if (e) {
var n = [];
return d(e,
function(t, e) {
n.push(e)
}),
n
}
}
function ta(t, e, i, n, o, a) {
var r = ga(t),
s = {},
l = [],
u = [],
h = t.subtype,
c = r(["pie", "map", "funnel"]),
f = r(["line", "bar", "pictorialbar", "scatter", "effectscatter", "candlestick", "boxplot"]);
if (r && null != f.get(h)) {
var p = t.ecmodel,
g = li(p).datasetmap,
m = e.uid + "_" + o,
v = g.get(m) || g.set(m, {
categorywaydim: 1,
valuewaydim: 0
});
d(r.coordsysdims,
function(t) {
if (null == r.firstcategorydimindex) {
e = v.valuewaydim++;
s[t] = e,
u.push(e)
} else if (r.categoryaxismap.get(t)) s[t] = 0,
l.push(0);
else {
var e = v.categorywaydim++;
s[t] = e,
u.push(e)
}
})
} else if (null != c.get(h)) {
for (var y, x = 0; x < 5 && null == y; x++) ca(i, n, o, a.dimensionsdefine, a.startindex, x) || (y = x);
if (null != y) {
s.value = y;
var _ = a.potentialnamedimindex || math.max(y - 1, 0);
u.push(_),
l.push(_)
}
}
return l.length && (s.itemname = l),
u.length && (s.seriesname = u),
s
}
function aa(t) {
var e = t.option;
if (!e.data) return t.ecmodel.getcomponent("dataset", e.datasetindex || 0)
}
function da(t, e) {
return ca(t.data, t.sourceformat, t.serieslayoutby, t.dimensionsdefine, t.startindex, e)
}
function ca(t, e, i, n, o, a) {
function r(t) {
return (null == t || !isfinite(t) || "" === t) && (!(!_(t) || "-" === t) || void 0)
}
var s;
if (s(t)) return ! 1;
var l;
if (n && (l = w(l = n[a]) ? l.name: l), e === ei) if (i === si) {
for (var u = t[a], h = 0; h < (u || []).length && h < 5; h++) if (null != (s = r(u[o + h]))) return s
} else for (h = 0; h < t.length && h < 5; h++) {
var c = t[o + h];
if (c && null != (s = r(c[a]))) return s
} else if (e === ii) {
if (!l) return;
for (h = 0; h < t.length && h < 5; h++) if ((d = t[h]) && null != (s = r(d[l]))) return s
} else if (e === ni) {
if (!l) return;
if (! (u = t[l]) || s(u)) return ! 1;
for (h = 0; h < u.length && h < 5; h++) if (null != (s = r(u[h]))) return s
} else if (e === ti) for (h = 0; h < t.length && h < 5; h++) {
var d = t[h],
f = li(d);
if (!y(f)) return ! 1;
if (null != (s = r(f[a]))) return s
}
return ! 1
}
function la(t, e) {
if (e) {
var i = e.seiresindex,
n = e.seriesid,
o = e.seriesname;
return null != i && t.componentindex !== i || null != n && t.id !== n || null != o && t.name !== o
}
}
function ka(t, e) {
var o = t.color && !t.colorlayer;
d(e,
function(e, a) {
"colorlayer" === a && o || ym.hasclass(a) || ("object" == typeof e ? t[a] = t[a] ? n(t[a], e, !1) : i(e) : null == t[a] && (t[a] = e))
})
}
function pa(t) {
t = t,
this.option = {},
this.option[ui] = 1,
this._componentsmap = r({
series: []
}),
this._seriesindices,
this._seriesindicesmap,
ka(t, this._theme.option),
n(t, km, !1),
this.mergeoption(t)
}
function na(t, e) {
y(e) || (e = e ? [e] : []);
var i = {};
return d(e,
function(e) {
i[e] = (t.get(e) || []).slice()
}),
i
}
function oa(t, e, i) {
return e.type ? e.type: i ? i.subtype: ym.determinesubtype(t, e)
}
function ea(t, e) {
t._seriesindicesmap = r(t._seriesindices = f(e,
function(t) {
return t.componentindex
}) || [])
}
function ra(t, e) {
return e.hasownproperty("subtype") ? g(t,
function(t) {
return t.subtype === e.subtype
}) : t
}
function za(t) {
d(ci,
function(e) {
this[e] = m(t[e], t)
},
this)
}
function ba() {
this._coordinatesystems = []
}
function va(t) {
this._api = t,
this._timelineoptions = [],
this._medialist = [],
this._mediadefault,
this._currentmediaindices = [],
this._optionbackup,
this._newbaseoption
}
function ga(t, e, i) {
var n, o, a = [],
r = [],
s = t.timeline;
if (t.baseoption && (o = t.baseoption), (s || t.options) && (o = o || {},
a = (t.options || []).slice()), t.media) {
o = o || {};
var l = t.media;
fi(l,
function(t) {
t && t.option && (t.query ? r.push(t) : n || (n = t))
})
}
return o || (o = t),
o.timeline || (o.timeline = s),
fi([o].concat(a).concat(f(r,
function(t) {
return t.option
})),
function(t) {
fi(e,
function(e) {
e(t, i)
})
}),
{
baseoption: o,
timelineoptions: a,
mediadefault: n,
medialist: r
}
}
function fa(t, e, i) {
var n = {
width: e,
height: i,
aspectratio: e / i
},
o = !0;
return d(t,
function(t, e) {
var i = e.match(vi);
if (i && i[1] && i[2]) {
var a = i[1],
r = i[2].tolowercase();
wa(n[r], t, a) || (o = !1)
}
}),
o
}
function wa(t, e, i) {
return "min" === i ? t >= e: "max" === i ? t <= e: t === e
}
function ha(t, e) {
return t.join(",") === e.join(",")
}
function za(t, e) {
fi(e = e || {},
function(e, i) {
if (null != e) {
var n = t[i];
if (ym.hasclass(i)) {
e = di(e);
var o = pi(n = di(n), e);
t[i] = gi(o,
function(t) {
return t.option && t.exist ? mi(t.exist, t.option, !0) : t.exist || t.option
})
} else t[i] = mi(n, e, !0)
}
})
}
function ua(t) {
var e = t && t.itemstyle;
if (e) for (var i = 0,
o = _i.length; i < o; i++) {
var a = _i[i],
r = e.normal,
s = e.emphasis;
r && r[a] && (t[a] = t[a] || {},
t[a].normal ? n(t[a].normal, r[a]) : t[a].normal = r[a], r[a] = null),
s && s[a] && (t[a] = t[a] || {},
t[a].emphasis ? n(t[a].emphasis, s[a]) : t[a].emphasis = s[a], s[a] = null)
}
}
function xa(t, e, i) {
if (t && t[e] && (t[e].normal || t[e].emphasis)) {
var n = t[e].normal,
o = t[e].emphasis;
n && (i ? (t[e].normal = t[e].emphasis = null, r(t[e], n)) : t[e] = n),
o && (t.emphasis = t.emphasis || {},
t.emphasis[e] = o)
}
}
function ja(t) {
xa(t, "itemstyle"),
xa(t, "linestyle"),
xa(t, "areastyle"),
xa(t, "label"),
xa(t, "labelline"),
xa(t, "upperlabel"),
xa(t, "edgelabel")
}
function ya(t, e) {
var i = xi(t) && t[e],
n = xi(i) && i.textstyle;
if (n) for (var o = 0,
a = zb.length; o < a; o++) {
var e = zb[o];
n.hasownproperty(e) && (i[e] = n[e])
}
}
function qa(t) {
t && (ja(t), ya(t, "label"), t.emphasis && ya(t.emphasis, "label"))
}
function ka(t) {
if (xi(t)) {
ua(t),
ja(t),
ya(t, "label"),
ya(t, "upperlabel"),
ya(t, "edgelabel"),
t.emphasis && (ya(t.emphasis, "label"), ya(t.emphasis, "upperlabel"), ya(t.emphasis, "edgelabel"));
var e = t.markpoint;
e && (ua(e), qa(e));
var i = t.markline;
i && (ua(i), qa(i));
var n = t.markarea;
n && qa(n);
var o = t.data;
if ("graph" === t.type) {
o = o || t.nodes;
var a = t.links || t.edges;
if (a && !s(a)) for (s = 0; s < a.length; s++) qa(a[s]);
d(t.categories,
function(t) {
ja(t)
})
}
if (o && !s(o)) for (s = 0; s < o.length; s++) qa(o[s]);
if ((e = t.markpoint) && e.data) for (var r = e.data,
s = 0; s < r.length; s++) qa(r[s]);
if ((i = t.markline) && i.data) for (var l = i.data,
s = 0; s < l.length; s++) y(l[s]) ? (qa(l[s][0]), qa(l[s][1])) : qa(l[s]);
"gauge" === t.type ? (ya(t, "axislabel"), ya(t, "title"), ya(t, "detail")) : "treemap" === t.type ? (xa(t.breadcrumb, "itemstyle"), d(t.levels,
function(t) {
ja(t)
})) : "tree" === t.type && ja(t.leaves)
}
}
function $a(t) {
return y(t) ? t: t ? [t] : []
}
function ja(t) {
return (y(t) ? t[0] : t) || {}
}
function qa(t, e) {
e = e.split(",");
for (var i = t,
n = 0; n < e.length && null != (i = i && i[e[n]]); n++);
return i
}
function tr(t, e, i, n) {
e = e.split(",");
for (var o, a = t,
r = 0; r < e.length - 1; r++) null == a[o = e[r]] && (a[o] = {}),
a = a[o]; (n || null == a[e[r]]) && (a[e[r]] = i)
}
function er(t) {
d(bi,
function(e) {
e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]])
})
}
function ir(t) {
d(t,
function(e, i) {
var n = [],
o = [nan, nan],
a = [e.stackresultdimension, e.stackedoverdimension],
r = e.data,
s = e.isstackedbyindex,
l = r.map(a,
function(a, l, u) {
var h = r.get(e.stackeddimension, u);
if (isnan(h)) return o;
var c, d;
s ? d = r.getrawindex(u) : c = r.get(e.stackedbydimension, u);
for (var f = nan,
p = i - 1; p >= 0; p--) {
var g = t[p];
if (s || (d = g.data.rawindexof(g.stackedbydimension, c)), d >= 0) {
var m = g.data.getbyrawindex(g.stackresultdimension, d);
if (h >= 0 && m > 0 || h <= 0 && m < 0) {
h += m,
f = m;
break
}
}
}
return n[0] = h,
n[1] = f,
n
});
r.hostmodel.setdata(l),
e.data = l
})
}
function nr(t, e) {
va.isinstance(t) || (t = va.seriesdatatosource(t)),
this._source = t;
var i = this._data = t.data,
n = t.sourceformat;
n === ai && (this._offset = 0, this._dimsize = e, this._data = i),
a(this, ti[n === ei ? n + "_" + t.serieslayoutby: n])
}
function or() {
return this._data.length
}
function ar(t) {
return this._data[t]
}
function rr(t) {
for (var e = 0; e < t.length; e++) this._data.push(t[e])
}
function sr(t, e, i, n) {
return null != i ? t[i] : t
}
function lr(t, e, i, n) {
return ur(t[n], this._dimensioninfos[e])
}
function ur(t, e) {
var i = e && e.type;
if ("ordinal" === i) {
var n = e && e.ordinalmeta;
return n ? n.parseandcollect(t) : t
}
return "time" === i && "number" != typeof t && null != t && "-" !== t && (t = +uo(t)),
null == t || "" === t ? nan: +t
}
function hr(t, e, i) {
if (t) {
var n = t.getrawdataitem(e);
if (null != n) {
var o, a, r = t.getprovider().getsource().sourceformat,
s = t.getdimensioninfo(i);
return s && (o = s.name, a = s.index),
ai[r](n, e, a, o)
}
}
}
function cr(t, e, i) {
if (t) {
var n = t.getprovider().getsource().sourceformat;
if (n === ti || n === ii) {
var o = t.getrawdataitem(e);
return n !== ti || w(o) || (o = null),
o ? o[i] : void 0
}
}
}
function dr(t) {
return new fr(t)
}
function fr(t) {
t = t || {},
this._reset = t.reset,
this._plan = t.plan,
this._count = t.count,
this._ondirty = t.ondirty,
this._dirty = !0,
this.context
}
function pr(t, e, i, n, o, a) {
pi.reset(i, n, o, a),
t._callingprogress = e,
t._callingprogress({
start: i,
end: n,
count: n - i,
next: pi.next
},
t.context)
}
function gr(t, e) {
t._dueindex = t._outputdueend = t._dueend = 0,
t._settedoutputend = null;
var i, n; ! e && t._reset && ((i = t._reset(t.context)) && i.progress && (n = i.forcefirstprogress, i = i.progress), y(i) && !i.length && (i = null)),
t._progress = i,
t._modby = t._moddatacount = null;
var o = t._downstream;
return o && o.dirty(),
n
}
function mr(t) {
var e = t.name;
oi(t) || (t.name = vr(t) || e)
}
function vr(t) {
var e = t.getrawdata(),
i = [];
return d(e.mapdimension("seriesname", !0),
function(t) {
var n = e.getdimensioninfo(t);
n.displayname && i.push(n.displayname)
}),
i.join(" ")
}
function yr(t) {
return t.model.getrawdata().count()
}
function xr(t) {
var e = t.model;
return e.setdata(e.getrawdata().cloneshallow()),
_r
}
function _r(t, e) {
t.end > e.outputdata.count() && e.model.getrawdata().cloneshallow(e.outputdata)
}
function wr(t, e) {
d(t.changable_methods,
function(i) {
t.wrapmethod(i, v(br, e))
})
}
function br(t) {
var e = sr(t);
e && e.setoutputend(this.count())
}
function sr(t) {
var e = (t.ecmodel || {}).scheduler,
i = e && e.getpipeline(t.uid);
if (i) {
var n = i.currenttask;
if (n) {
var o = n.agentstubmap;
o && (n = o.get(t.uid))
}
return n
}
}
function mr() {
this.group = new zw,
this.uid = no("viewchart"),
this.rendertask = dr({
plan: ar,
reset: dr
}),
this.rendertask.context = {
view: this
}
}
function ir(t, e) {
if (t && (t.trigger(e), "group" === t.type)) for (var i = 0; i < t.childcount(); i++) ir(t.childat(i), e)
}
function tr(t, e, i) {
var n = zi(t, e);
null != n ? d(di(n),
function(e) {
ir(t.getitemgraphicel(e), i)
}) : t.eachitemgraphicel(function(t) {
ir(t, i)
})
}
function ar(t) {
return vi(t.model)
}
function dr(t) {
var e = t.model,
i = t.ecmodel,
n = t.api,
o = t.payload,
a = e.pipelinecontext.progressiverender,
r = t.view,
s = o && bi(o).updatemethod,
l = a ? "incrementalpreparerender": s && r[s] ? s: "render";
return "render" !== l && r[l](e, i, n, o),
fi[l]
}
function cr(t, e, i) {
function n() {
h = (new date).gettime(),
c = null,
t.apply(r, s || [])
}
var o, a, r, s, l, u = 0,
h = 0,
c = null;
e = e || 0;
var d = function() {
o = (new date).gettime(),
r = this,
s = arguments;
var t = l || e,
d = l || i;
l = null,
a = o - (d ? u: h) - t,
cleartimeout(c),
d ? c = settimeout(n, t) : a >= 0 ? n() : c = settimeout(n, -a),
u = o
};
return d.clear = function() {
c && (cleartimeout(c), c = null)
},
d.debouncenextcall = function(t) {
l = t
},
d
}
function lr(t, e, i, n) {
var o = t[e];
if (o) {
var a = o[wi] || o,
r = o[zi];
if (o[hi] !== i || r !== n) {
if (null == i || !n) return t[e] = a; (o = t[e] = cr(a, i, "debounce" === n))[wi] = a,
o[zi] = n,
o[hi] = i
}
return o
}
}
function kr(t, e) {
var i = t[e];
i && i[wi] && (t[e] = i[wi])
}
function pr(t, e, i, n) {
this.ecinstance = t,
this.api = e,
this.unfinished;
var i = this._dataprocessorhandlers = i.slice(),
n = this._visualhandlers = n.slice();
this._allhandlers = i.concat(n),
this._stagetaskmap = r()
}
function nr(t, e, i, n, o) {
function a(t, e) {
return t.setdirty && (!t.dirtymap || t.dirtymap.get(e.__pipeline.id))
}
o = o || {};
var r;
d(e,
function(e, s) {
if (!o.visualtype || o.visualtype === e.visualtype) {
var l = t._stagetaskmap.get(e.uid),
u = l.seriestaskmap,
h = l.overalltask;
if (h) {
var c, d = h.agentstubmap;
d.each(function(t) {
a(o, t) && (t.dirty(), c = !0)
}),
c && h.dirty(),
ki(h, n);
var f = t.getperformargs(h, o.block);
d.each(function(t) {
t.perform(f)
}),
r |= h.perform(f)
} else u && u.each(function(s, l) {
a(o, s) && s.dirty();
var u = t.getperformargs(s, o.block);
u.skip = !e.performrawseries && i.isseriesfiltered(s.context.model),
ki(s, n),
r |= s.perform(u)
})
}
}),
t.unfinished |= r
}
function or(t, e, i, n, o) {
function a(i) {
var a = i.uid,
s = r.get(a) || r.set(a, dr({
plan: gr,
reset: fr,
count: hr
}));
s.context = {
model: i,
ecmodel: n,
api: o,
useclearvisual: e.isvisual && !e.islayout,
plan: e.plan,
reset: e.reset,
scheduler: t
},
zr(t, i, s)
}
var r = i.seriestaskmap || (i.seriestaskmap = r()),
s = e.seriestype,
l = e.gettargetseries;
e.createonallseries ? n.eachrawseries(a) : s ? n.eachrawseriesbytype(s, a) : l && l(n, o).each(a);
var u = t._pipelinemap;
r.each(function(t, e) {
u.get(e) || (t.dispose(), r.removekey(e))
})
}
function er(t, e, i, n, o) {
function a(e) {
var i = e.uid,
n = s.get(i);
n || (n = s.set(i, dr({
reset: zr,
ondirty: vr
})), r.dirty()),
n.context = {
model: e,
overallprogress: h,
modifyoutputend: c
},
n.agent = r,
n.__block = h,
zr(t, e, n)
}
var r = i.overalltask = i.overalltask || dr({
reset: rr
});
r.context = {
ecmodel: n,
api: o,
overallreset: e.overallreset,
scheduler: t
};
var s = r.agentstubmap = r.agentstubmap || r(),
l = e.seriestype,
u = e.gettargetseries,
h = !0,
c = e.modifyoutputend;
l ? n.eachrawseriesbytype(l, a) : u ? u(n, o).each(a) : (h = !1, d(n.getseries(), a));
var f = t._pipelinemap;
s.each(function(t, e) {
f.get(e) || (t.dispose(), r.dirty(), s.removekey(e))
})
}
function rr(t) {
t.overallreset(t.ecmodel, t.api, t.payload)
}
function zr(t, e) {
return t.overallprogress && br
}
function br() {
this.agent.dirty(),
this.getdownstream().dirty()
}
function vr() {
this.agent && this.agent.dirty()
}
function gr(t) {
return t.plan && t.plan(t.model, t.ecmodel, t.api, t.payload)
}
function fr(t) {
t.useclearvisual && t.data.clearallvisual();
var e = t.resetdefines = di(t.reset(t.model, t.ecmodel, t.api, t.payload));
return e.length > 1 ? f(e,
function(t, e) {
return wr(e)
}) : $i
}
function wr(t) {
return function(e, i) {
var n = i.data,
o = i.resetdefines[t];
if (o && o.dataeach) for (var a = e.start; a < e.end; a++) o.dataeach(n, a);
else o && o.progress && o.progress(e, n)
}
}
function hr(t) {
return t.data.count()
}
function zr(t, e, i) {
var n = e.uid,
o = t._pipelinemap.get(n); ! o.head && (o.head = i),
o.tail && o.tail.pipe(i),
o.tail = i,
i.__idxinpipeline = o.count++,
i.__pipeline = o
}
function ur(t) {
ji = null;
try {
t(qi, tt)
} catch(t) {}
return ji
}
function xr(t, e) {
for (var i in e.prototype) t[i] = b
}
function jr(t) {
for (_(t) && (t = (new domparser).parsefromstring(t, "text/xml")), 9 === t.nodetype && (t = t.firstchild);
"svg" !== t.nodename.tolowercase() || 1 !== t.nodetype;) t = t.nextsibling;
return t
}
function yr() {
this._defs = {},
this._root = null,
this._isdefine = !1,
this._istext = !1
}
function qr(t, e) {
for (var i = t.firstchild; i;) {
if (1 === i.nodetype) {
var n = i.getattribute("offset");
n = n.indexof("%") > 0 ? parseint(n, 10) / 100 : n ? parsefloat(n) : 0;
var o = i.getattribute("stop-color") || "#000000";
e.addcolorstop(n, o)
}
i = i.nextsibling
}
}
function kr(t, e) {
t && t.__inheritedstyle && (e.__inheritedstyle || (e.__inheritedstyle = {}), r(e.__inheritedstyle, t.__inheritedstyle))
}
function $r(t) {
for (var e = p(t).split(rt), i = [], n = 0; n < e.length; n += 2) {
var o = parsefloat(e[n]),
a = parsefloat(e[n + 1]);
i.push([o, a])
}
return i
}
function jr(t, e, i, n) {
var o = e.__inheritedstyle || {},
r = "text" === e.type;
if (1 === t.nodetype && (ts(t, e), a(o, es(t)), !n)) for (var s in ut) if (ut.hasownproperty(s)) {
var l = t.getattribute(s);
null != l && (o[ut[s]] = l)
}
var u = r ? "textfill": "fill",
h = r ? "textstroke": "stroke";
e.style = e.style || new $w;
var c = e.style;
null != o.fill && c.set(u, qr(o.fill, i)),
null != o.stroke && c.set(h, qr(o.stroke, i)),
d(["linewidth", "opacity", "fillopacity", "strokeopacity", "miterlimit", "fontsize"],
function(t) {
var e = "linewidth" === t && r ? "textstrokewidth": t;
null != o[t] && c.set(e, parsefloat(o[t]))
}),
o.textbaseline && "auto" !== o.textbaseline || (o.textbaseline = "alphabetic"),
"alphabetic" === o.textbaseline && (o.textbaseline = "bottom"),
"start" === o.textalign && (o.textalign = "left"),
"end" === o.textalign && (o.textalign = "right"),
d(["linedashoffset", "linecap", "linejoin", "fontweight", "fontfamily", "fontstyle", "textalign", "textbaseline"],
function(t) {
null != o[t] && c.set(t, o[t])
}),
o.linedash && (e.style.linedash = p(o.linedash).split(rt)),
c[h] && "none" !== c[h] && (e[h] = !0),
e.__inheritedstyle = o
}
function qr(t, e) {
var i = e && t && t.match(ht);
return i ? e[p(i[1])] : t
}
function ts(t, e) {
var i = t.getattribute("transform");
if (i) {
var n = null,
o = []; (i = i.replace(/,/g, " ")).replace(ct,
function(t, e, i) {
o.push(e, i)
});
for (var a = o.length - 1; a > 0; a -= 2) {
var r = o[a],
s = o[a - 1];
switch (n = n || mt(), s) {
case "translate":
r = p(r).split(rt),
_t(n, n, [parsefloat(r[0]), parsefloat(r[1] || 0)]);
break;
case "scale":
r = p(r).split(rt),
bt(n, n, [parsefloat(r[0]), parsefloat(r[1] || r[0])]);
break;
case "rotate":
r = p(r).split(rt),
wt(n, n, parsefloat(r[0]));
break;
case "skew":
r = p(r).split(rt),
console.warn("skew transform is not supported yet");
break;
case "matrix":
r = p(r).split(rt);
n[0] = parsefloat(r[0]),
n[1] = parsefloat(r[1]),
n[2] = parsefloat(r[2]),
n[3] = parsefloat(r[3]),
n[4] = parsefloat(r[4]),
n[5] = parsefloat(r[5])
}
}
}
e.setlocaltransform(n)
}
function es(t) {
var e = t.getattribute("style"),
i = {};
if (!e) return i;
var n = {};
dt.lastindex = 0;
for (var o; null != (o = dt.exec(e));) n[o[1]] = o[2];
for (var a in ut) ut.hasownproperty(a) && null != n[a] && (i[ut[a]] = n[a]);
return i
}
function is(t, e, i) {
var n = e / t.width,
o = i / t.height,
a = math.min(n, o);
return {
scale: [a, a],
position: [ - (t.x + t.width / 2) * a + e / 2, -(t.y + t.height / 2) * a + i / 2]
}
}
function ns(t, e) {
return (new yr).parse(t, e)
}
function os(t) {
return function(e, i, n) {
e = e && e.tolowercase(),
aw.prototype[t].call(this, e, i, n)
}
}
function as() {
aw.call(this)
}
function rs(t, e, n) {
function o(t, e) {
return t.__prio - e.__prio
}
n = n || {},
"string" == typeof e && (e = bt[e]),
this.id,
this.group,
this._dom = t;
var a = this._zr = ii(t, {
renderer: n.renderer || "canvas",
devicepixelratio: n.devicepixelratio,
width: n.width,
height: n.height
});
this._throttledzrflush = cr(m(a.flush, a), 17),
(e = i(e)) && mi(e, !0),
this._theme = e,
this._chartsviews = [],
this._chartsmap = {},
this._componentsviews = [],
this._componentsmap = {},
this._coordsysmgr = new ba;
var r = this._api = ms(this);
ve(zt, o),
ve(ot, o),
this._scheduler = new pr(this, r, ot, zt),
aw.call(this, this._eceventprocessor = new is),
this._messagecenter = new as,
this._initevents(),
this.resize = m(this.resize, this),
this._pendingactions = [],
a.animation.on("frame", this._onframe, this),
ps(a, this),
n(this)
}
function ss(t, e, i) {
var n, o = this._model,
a = this._coordsysmgr.getcoordinatesystems();
e = vi(o, e);
for (var r = 0; r < a.length; r++) {
var s = a[r];
if (s[t] && null != (n = s[t](o, e, i))) return n
}
}
function ls(t) {
var e = t._model,
i = t._scheduler;
i.restorepipelines(e),
i.preparestagetasks(),
gs(t, "component", e, i),
gs(t, "chart", e, i),
i.plan()
}
function us(t, e, i, n, o) {
function a(n) {
n && n.__alive && n[e] && n[e](n.__model, r, t._api, i)
}
var r = t._model;
if (n) {
var s = {};
s[n + "id"] = i[n + "id"],
s[n + "index"] = i[n + "index"],
s[n + "name"] = i[n + "name"];
var l = {
maintype: n,
query: s
};
o && (l.subtype = o);
var u = i.excludeseriesid;
null != u && (u = r(di(u))),
r && r.eachcomponent(l,
function(e) {
u && null != u.get(e.id) || a(t["series" === n ? "_chartsmap": "_componentsmap"][e.__viewid])
},
t)
} else vt(t._componentsviews.concat(t._chartsviews), a)
}
function hs(t, e) {
var i = t._chartsmap,
n = t._scheduler;
e.eachseries(function(t) {
n.updatestreammodes(t, i[t.__viewid])
})
}
function cs(t, e) {
var i = t.type,
n = t.escapeconnect,
o = pt[i],
s = o.actioninfo,
l = (s.update || "update").split(":"),
u = l.pop();
l = null != l[0] && _t(l[0]),
this[tt] = !0;
var h = [t],
c = !1;
t.batch && (c = !0, h = f(t.batch,
function(e) {
return e = r(a({},
e), t),
e.batch = null,
e
}));
var d, p = [],
g = "highlight" === i || "downplay" === i;
vt(h,
function(t) {
d = o.action(t, this._model, this._api),
(d = d || a({},
t)).type = s.event || d.type,
p.push(d),
g ? us(this, u, t, "series") : l && us(this, u, t, l.main, l.sub)
},
this),
"none" === u || g || l || (this[at] ? (ls(this), lt.update.call(this, t), this[at] = !1) : lt[u].call(this, t)),
d = c ? {
type: s.event || i,
escapeconnect: n,
batch: p
}: p[0],
this[tt] = !1,
!e && this._messagecenter.trigger(d.type, d)
}
function ds(t) {
for (var e = this._pendingactions; e.length;) {
var i = e.shift();
cs.call(this, i, t)
}
}
function fs(t) { ! t && this.trigger("updated")
}
function ps(t, e) {
t.on("rendered",
function() {
e.trigger("rendered"),
!t.animation.isfinished() || e[at] || e._scheduler.unfinished || e._pendingactions.length || e.trigger("finished")
})
}
function gs(t, e, i, n) {
function o(t) {
var e = "_ec_" + t.id + "_" + t.type,
o = s[e];
if (!o) {
var h = _t(t.type); (o = new(a ? ei.getclass(h.main, h.sub) : mr.getclass(h.sub))).init(i, u),
s[e] = o,
r.push(o),
l.add(o.group)
}
t.__viewid = o.__id = e,
o.__alive = !0,
o.__model = t,
o.group.__eccomponentinfo = {
maintype: t.maintype,
index: t.componentindex
},
!a && n.prepareview(o, t, i, u)
}
for (var a = "component" === e,
r = a ? t._componentsviews: t._chartsviews, s = a ? t._componentsmap: t._chartsmap, l = t._zr, u = t._api, h = 0; h < r.length; h++) r[h].__alive = !1;
a ? i.eachcomponent(function(t, e) {
"series" !== t && o(e)
}) : i.eachseries(o);
for (h = 0; h < r.length;) {
var c = r[h];
c.__alive ? h++:(!a && c.rendertask.dispose(), l.remove(c.group), c.dispose(i, u), r.splice(h, 1), delete s[c.__id], c.__id = c.group.__eccomponentinfo = null)
}
}
function ms(t) {
t.clearcolorpalette(),
t.eachseries(function(t) {
t.clearcolorpalette()
})
}
function vs(t, e, i, n) {
ys(t, e, i, n),
vt(t._chartsviews,
function(t) {
t.__alive = !1
}),
xs(t, e, i, n),
vt(t._chartsviews,
function(t) {
t.__alive || t.remove(e, i)
})
}
function ys(t, e, i, n, o) {
vt(o || t._componentsviews,
function(t) {
var o = t.__model;
t.render(o, e, i, n),
ss(o, t)
})
}
function xs(t, e, i, n, o) {
var a, r = t._scheduler;
e.eachseries(function(e) {
var i = t._chartsmap[e.__viewid];
i.__alive = !0;
var s = i.rendertask;
r.updatepayload(s, n),
o && o.get(e.uid) && s.dirty(),
a |= s.perform(r.getperformargs(s)),
i.group.silent = !!e.get("silent"),
ss(e, i),
bs(e, i)
}),
r.unfinished |= a,
ws(t._zr, e),
ji(t._zr.dom, e)
}
function _s(t, e) {
vt(rt,
function(i) {
i(t, e)
})
}
function ws(t, e) {
var i = t.storage,
n = 0;
i.traverse(function(t) {
t.isgroup || n++
}),
n > e.get("hoverlayerthreshold") && !z_.node && i.traverse(function(t) {
t.isgroup || (t.usehoverlayer = !0)
})
}
function bs(t, e) {
var i = t.get("blendmode") || null;
e.group.traverse(function(t) {
t.isgroup || t.style.blend !== i && t.setstyle("blend", i),
t.eachpendingdisplayable && t.eachpendingdisplayable(function(t) {
t.setstyle("blend", i)
})
})
}
function ss(t, e) {
var i = t.get("z"),
n = t.get("zlevel");
e.group.traverse(function(t) {
"group" !== t.type && (null != i && (t.z = i), null != n && (t.zlevel = n))
})
}
function ms(t) {
var e = t._coordsysmgr;
return a(new za(t), {
getcoordinatesystems: m(e.getcoordinatesystems, e),
getcomponentbyelement: function(e) {
for (; e;) {
var i = e.__eccomponentinfo;
if (null != i) return t._model.getcomponent(i.maintype, i.index);
e = e.parent
}
}
})
}
function is() {
this.eventinfo
}
function ts(t) {
function e(t, e) {
for (var n = 0; n < t.length; n++) t[n][i] = e
}
var i = "__connectupdatestatus";
vt(nt,
function(n, o) {
t._messagecenter.on(o,
function(n) {
if (ft[t.group] && 0 !== t[i]) {
if (n && n.escapeconnect) return;
var o = t.makeactionfromevent(n),
a = [];
vt(gt,
function(e) {
e !== t && e.group === t.group && a.push(e)
}),
e(a, 0),
vt(a,
function(t) {
1 !== t[i] && t.dispatchaction(o)
}),
e(a, 2)
}
})
})
}
function as(t) {
ft[t] = !1
}
function ds(t) {
return gt[wi(t, zt)]
}
function cs(t, e) {
bt[t] = e
}
function ls(t) {
et.push(t)
}
function ks(t, e) {
rs(ot, t, e, bt)
}
function ps(t, e, i) {
"function" == typeof e && (i = e, e = "");
var n = xt(t) ? t.type: [t, t = {
event: e
}][0];
t.event = (t.event || n).tolowercase(),
e = t.event,
mt(dt.test(n) && dt.test(e)),
pt[n] || (pt[n] = {
action: i,
actioninfo: t
}),
nt[e] = n
}
function ns(t, e) {
ba.register(t, e)
}
function os(t, e) {
rs(zt, t, e, st, "layout")
}
function es(t, e) {
rs(zt, t, e, mt, "visual")
}
function rs(t, e, i, n, o) { (yt(e) || xt(e)) && (i = e, e = n);
var a = pr.wrapstagehandler(i, o);
return a.__prio = e,
a.__raw = i,
t.push(a),
a
}
function zs(t, e) {
vt[t] = e
}
function bs(t) {
return ym.extend(t)
}
function vs(t) {
return ei.extend(t)
}
function gs(t) {
return oi.extend(t)
}
function fs(t) {
return mr.extend(t)
}
function ws(t) {
return t
}
function hs(t, e, i, n, o) {
this._old = t,
this._new = e,
this._oldkeygetter = i || ws,
this._newkeygetter = n || ws,
this.context = o
}
function zs(t, e, i, n, o) {
for (var a = 0; a < t.length; a++) {
var r = "_ec_" + o[n](t[a], a),
s = e[r];
null == s ? (i.push(r), e[r] = a) : (s.length || (e[r] = s = [s]), s.push(a))
}
}
function us(t) {
var e = {},
i = e.encode = {},
n = r(),
o = [],
a = [];
d(t.dimensions,
function(e) {
var r = t.getdimensioninfo(e),
s = r.coorddim;
if (s) {
var l = i[s];
i.hasownproperty(s) || (l = i[s] = []),
l[r.coorddimindex] = e,
r.isextracoord || (n.set(s, 1), js(r.type) && (o[0] = e)),
r.defaulttooltip && a.push(e)
}
jt.each(function(t, e) {
var n = i[e];
i.hasownproperty(e) || (n = i[e] = []);
var o = r.otherdims[e];
null != o && !1 !== o && (n[o] = r.name)
})
});
var r = [],
s = {};
n.each(function(t, e) {
var n = i[e];
s[e] = n[0],
r = r.concat(n)
}),
e.datadimsoncoord = r,
e.encodefirstdimnotextra = s;
var l = i.label;
l && l.length && (o = l.slice());
var u = i.tooltip;
return u && u.length ? a = u.slice() : a.length || (a = o.slice()),
i.defaultedlabel = o,
i.defaultedtooltip = a,
e
}
function xs(t) {
return "category" === t ? "ordinal": "time" === t ? "time": "float"
}
function js(t) {
return ! ("ordinal" === t || "time" === t)
}
function ys(t) {
return t._rawcount > 65535 ? $t: jt
}
function qs(t) {
var e = t.constructor;
return e === array ? t.slice() : new e(t)
}
function ks(t, e) {
d(qt.concat(e.__wrappedmethods || []),
function(i) {
e.hasownproperty(i) && (t[i] = e[i])
}),
t.__wrappedmethods = e.__wrappedmethods,
d(ta,
function(n) {
t[n] = i(e[n])
}),
t._calculationinfo = a(e._calculationinfo)
}
function $s(t) {
var e = t._invertedindicesmap;
d(e,
function(i, n) {
var o = t._dimensioninfos[n].ordinalmeta;
if (o) {
i = e[n] = new $t(o.categories.length);
for (a = 0; a < i.length; a++) i[a] = nan;
for (var a = 0; a < t._count; a++) i[t.get(n, a)] = a
}
})
}
function js(t, e, i) {
var n;
if (null != e) {
var o = t._chunksize,
a = math.floor(i / o),
r = i % o,
s = t.dimensions[e],
l = t._storage[s][a];
if (l) {
n = l[r];
var u = t._dimensioninfos[s].ordinalmeta;
u && u.categories.length && (n = u.categories[n])
}
}
return n
}
function qs(t) {
return t
}
function tl(t) {
return t < this._count && t >= 0 ? this._indices[t] : -1
}
function el(t, e) {
var i = t._idlist[e];
return null == i && (i = js(t, t._iddimidx, e)),
null == i && (i = qt + e),
i
}
function il(t) {
return y(t) || (t = [t]),
t
}
function nl(t, e) {
var i = t.dimensions,
n = new ea(f(i, t.getdimensioninfo, t), t.hostmodel);
ks(n, t);
for (var o = n._storage = {},
a = t._storage,
r = 0; r < i.length; r++) {
var s = i[r];
a[s] && (l(e, s) >= 0 ? (o[s] = ol(a[s]), n._rawextent[s] = al(), n._extent[s] = null) : o[s] = a[s])
}
return n
}
function ol(t) {
for (var e = new array(t.length), i = 0; i < t.length; i++) e[i] = qs(t[i]);
return e
}
function al() {
return [1 / 0, -1 / 0]
}
function rl(t, e, n) {
function o(t, e, i) {
null != jt.get(e) ? t.otherdims[e] = i: (t.coorddim = e, t.coorddimindex = i, h.set(e, !0))
}
va.isinstance(e) || (e = va.seriesdatatosource(e)),
n = n || {},
t = (t || []).slice();
for (var s = (n.dimsdef || []).slice(), l = r(n.encodedef), u = r(), h = r(), c = [], f = sl(e, t, s, n.dimcount), p = 0; p < f; p++) {
var g = s[p] = a({},
w(s[p]) ? s[p] : {
name: s[p]
}),
m = g.name,
v = c[p] = {
otherdims: {}
};
null != m && null == u.get(m) && (v.name = v.displayname = m, u.set(m, p)),
null != g.type && (v.type = g.type),
null != g.displayname && (v.displayname = g.displayname)
}
l.each(function(t, e) {
if (1 === (t = di(t).slice()).length && t[0] < 0) l.set(e, !1);
else {
var i = l.set(e, []);
d(t,
function(t, n) {
_(t) && (t = u.get(t)),
null != t && t < f && (i[n] = t, o(c[t], e, n))
})
}
});
var y = 0;
d(t,
function(t, e) {
var n, t, a, s;
if (_(t)) n = t,
t = {};
else {
n = t.name;
var u = t.ordinalmeta;
t.ordinalmeta = null,
(t = i(t)).ordinalmeta = u,
a = t.dimsdef,
s = t.otherdims,
t.name = t.coorddim = t.coorddimindex = t.dimsdef = t.otherdims = null
}
var h = l.get(n);
if (!1 !== h) {
if (! (h = di(h)).length) for (var f = 0; f < (a && a.length || 1); f++) {
for (; y < c.length && null != c[y].coorddim;) y++;
y < c.length && h.push(y++)
}
d(h,
function(e, i) {
var l = c[e];
if (o(r(l, t), n, i), null == l.name && a) {
var u = a[i]; ! w(u) && (u = {
name: u
}),
l.name = l.displayname = u.name,
l.defaulttooltip = u.defaulttooltip
}
s && r(l.otherdims, s)
})
}
});
var x = n.generatecoord,
b = n.generatecoordcount,
s = null != b;
b = x ? b || 1 : 0;
for (var m = x || "value",
i = 0; i < f; i++) null == (v = c[i] = c[i] || {}).coorddim && (v.coorddim = ll(m, h, s), v.coorddimindex = 0, (!x || b <= 0) && (v.isextracoord = !0), b--),
null == v.name && (v.name = ll(v.coorddim, u)),
null == v.type && da(e, i, v.name) && (v.type = "ordinal");
return c
}
function sl(t, e, i, n) {
var o = math.max(t.dimensionsdetectcount || 1, e.length, i.length, n || 0);
return d(e,
function(t) {
var e = t.dimsdef;
e && (o = math.max(o, e.length))
}),
o
}
function ll(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 ul(t, e, i) {
var n, o, a, r, s = (i = i || {}).byindex,
l = i.stackedcoorddimension,
u = !(!t || !t.get("stack"));
if (d(e,
function(t, i) {
_(t) && (e[i] = t = {
name: t
}),
u && !t.isextracoord && (s || n || !t.ordinalmeta || (n = t), o || "ordinal" === t.type || "time" === t.type || l && l !== t.coorddim || (o = t))
}), !o || s || n || (s = !0), o) {
a = "__\0ecstackresult",
r = "__\0ecstackedover",
n && (n.createinvertedindices = !0);
var h = o.coorddim,
c = o.type,
f = 0;
d(e,
function(t) {
t.coorddim === h && f++
}),
e.push({
name: a,
coorddim: h,
coorddimindex: f,
type: c,
isextracoord: !0,
iscalculationcoord: !0
}),
f++,
e.push({
name: r,
coorddim: r,
coorddimindex: f,
type: c,
isextracoord: !0,
iscalculationcoord: !0
})
}
return {
stackeddimension: o && o.name,
stackedbydimension: n && n.name,
isstackedbyindex: s,
stackedoverdimension: r,
stackresultdimension: a
}
}
function hl(t, e) {
return !! e && e === t.getcalculationinfo("stackeddimension")
}
function cl(t, e) {
return hl(t, e) ? t.getcalculationinfo("stackresultdimension") : e
}
function dl(t, e, i) {
i = i || {},
va.isinstance(t) || (t = va.seriesdatatosource(t));
var n, o = e.get("coordinatesystem"),
a = ba.get(o),
r = ga(e);
r && (n = f(r.coordsysdims,
function(t) {
var e = {
name: t
},
i = r.axismap.get(t);
if (i) {
var n = i.get("type");
e.type = xs(n)
}
return e
})),
n || (n = a && (a.getdimensionsinfo ? a.getdimensionsinfo() : a.dimensions.slice()) || ["x", "y"]);
var s, l, u = oa(t, {
coorddimensions: n,
generatecoord: i.generatecoord
});
r && d(u,
function(t, e) {
var i = t.coorddim,
n = r.categoryaxismap.get(i);
n && (null == s && (s = e), t.ordinalmeta = n.getordinalmeta()),
null != t.otherdims.itemname && (l = !0)
}),
l || null == s || (u[s].otherdims.itemname = 0);
var h = ul(e, u),
c = new ea(u, e);
c.setcalculationinfo(h);
var p = null != s && fl(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, p),
c
}
function fl(t) {
if (t.sourceformat === ti) {
var e = pl(t.data || []);
return null != e && !y(li(e))
}
}
function pl(t) {
for (var e = 0; e < t.length && null == t[e];) e++;
return t[e]
}
function gl(t) {
this._setting = t || {},
this._extent = [1 / 0, -1 / 0],
this._interval = 0,
this.init && this.init.apply(this, arguments)
}
function ml(t) {
this.categories = t.categories || [],
this._needcollect = t.needcollect,
this._deduplication = t.deduplication,
this._map
}
function vl(t) {
return t._map || (t._map = r(t.categories))
}
function yl(t) {
return w(t) && null != t.value ? t.value: t + ""
}
function xl(t, e, i, n) {
var o = {},
a = t[1] - t[0],
r = o.interval = yo(a / e, !0);
null != i && r < i && (r = o.interval = i),
null != n && r > n && (r = o.interval = n);
var s = o.intervalprecision = _l(r);
return bl(o.nicetickextent = [la(math.ceil(t[0] / r) * r, s), la(math.floor(t[1] / r) * r, s)], t),
o
}
function _l(t) {
return go(t) + 2
}
function wl(t, e, i) {
t[e] = math.max(math.min(t[e], i[1]), i[0])
}
function bl(t, e) { ! isfinite(t[0]) && (t[0] = e[0]),
!isfinite(t[1]) && (t[1] = e[1]),
wl(t, 0, e),
wl(t, 1, e),
t[0] > t[1] && (t[0] = t[1])
}
function sl(t, e, i, n) {
var o = [];
if (!t) return o;
e[0] < i[0] && o.push(e[0]);
for (var a = i[0]; a <= i[1] && (o.push(a), (a = la(a + t, n)) !== o[o.length - 1]);) if (o.length > 1e4) return [];
return e[1] > (o.length ? o[o.length - 1] : i[1]) && o.push(e[1]),
o
}
function ml(t) {
return t.get("stack") || ca + t.seriesindex
}
function il(t) {
return t.dim + t.index
}
function tl(t) {
var e = [],
i = t.axis;
if ("category" === i.type) {
for (var n = i.getbandwidth(), o = 0; o < t.count; o++) e.push(r({
bandwidth: n,
axiskey: "axis0",
stackid: ca + o
},
t));
for (var a = cl(e), s = [], o = 0; o < t.count; o++) {
var l = a.axis0[ca + o];
l.offsetcenter = l.offset + l.width / 2,
s.push(l)
}
return s
}
}
function al(t, e) {
var i = [];
return e.eachseriesbytype(t,
function(t) {
pl(t) && !nl(t) && i.push(t)
}),
i
}
function dl(t) {
var e = [];
return d(t,
function(t) {
var i = t.getdata(),
n = t.coordinatesystem.getbaseaxis(),
o = n.getextent(),
a = "category" === n.type ? n.getbandwidth() : math.abs(o[1] - o[0]) / i.count(),
r = ro(t.get("barwidth"), a),
s = ro(t.get("barmaxwidth"), a),
l = t.get("bargap"),
u = t.get("barcategorygap");
e.push({
bandwidth: a,
barwidth: r,
barmaxwidth: s,
bargap: l,
barcategorygap: u,
axiskey: il(n),
stackid: ml(t)
})
}),
cl(e)
}
function cl(t) {
var e = {};
d(t,
function(t, i) {
var n = t.axiskey,
o = t.bandwidth,
a = e[n] || {
bandwidth: o,
remainedwidth: o,
autowidthcount: 0,
categorygap: "20%",
gap: "30%",
stacks: {}
},
r = a.stacks;
e[n] = a;
var s = t.stackid;
r[s] || a.autowidthcount++,
r[s] = r[s] || {
width: 0,
maxwidth: 0
};
var l = t.barwidth;
l && !r[s].width && (r[s].width = l, l = math.min(a.remainedwidth, l), a.remainedwidth -= l);
var u = t.barmaxwidth;
u && (r[s].maxwidth = u);
var h = t.bargap;
null != h && (a.gap = h);
var c = t.barcategorygap;
null != c && (a.categorygap = c)
});
var i = {};
return d(e,
function(t, e) {
i[e] = {};
var n = t.stacks,
o = t.bandwidth,
a = ro(t.categorygap, o),
r = ro(t.gap, 1),
s = t.remainedwidth,
l = t.autowidthcount,
u = (s - a) / (l + (l - 1) * r);
u = math.max(u, 0),
d(n,
function(t, e) {
var i = t.maxwidth;
i && i < u && (i = math.min(i, s), t.width && (i = math.min(i, t.width)), s -= i, t.width = i, l--)
}),
u = (s - a) / (l + (l - 1) * r),
u = math.max(u, 0);
var h, c = 0;
d(n,
function(t, e) {
t.width || (t.width = u),
h = t,
c += t.width * (1 + r)
}),
h && (c -= h.width * r);
var f = -c / 2;
d(n,
function(t, n) {
i[e][n] = i[e][n] || {
offset: f,
width: t.width
},
f += t.width * (1 + r)
})
}),
i
}
function ll(t, e, i) {
if (t && e) {
var n = t[il(e)];
return null != n && null != i && (n = n[ml(i)]),
n
}
}
function kl(t, e) {
var i = al(t, e),
n = dl(i),
o = {};
d(i,
function(t) {
var e = t.getdata(),
i = t.coordinatesystem,
a = i.getbaseaxis(),
r = ml(t),
s = n[il(a)][r],
l = s.offset,
u = s.width,
h = i.getotheraxis(a),
c = t.get("barminheight") || 0;
o[r] = o[r] || [],
e.setlayout({
offset: l,
size: u
});
for (var d = e.mapdimension(h.dim), f = e.mapdimension(a.dim), p = hl(e, d), g = h.ishorizontal(), m = ol(a, h, p), v = 0, y = e.count(); v < y; v++) {
var x = e.get(d, v),
_ = e.get(f, v);
if (!isnan(x)) {
var w = x >= 0 ? "p": "n",
b = m;
p && (o[r][_] || (o[r][_] = {
p: m,
n: m
}), b = o[r][_][w]);
var s, m, i, t;
if (g) s = b,
m = (a = i.datatopoint([x, _]))[1] + l,
i = a[0] - m,
t = u,
math.abs(i) < c && (i = (i < 0 ? -1 : 1) * c),
p && (o[r][_][w] += i);
else {
var a = i.datatopoint([_, x]);
s = a[0] + l,
m = b,
i = u,
t = a[1] - m,
math.abs(t) < c && (t = (t <= 0 ? -1 : 1) * c),
p && (o[r][_][w] += t)
}
e.setitemlayout(v, {
x: s,
y: m,
width: i,
height: t
})
}
}
},
this)
}
function pl(t) {
return t.coordinatesystem && "cartesian2d" === t.coordinatesystem.type
}
function nl(t) {
return t.pipelinecontext && t.pipelinecontext.large
}
function ol(t, e, i) {
var n, o, a = e.getglobalextent();
a[0] > a[1] ? (n = a[1], o = a[0]) : (n = a[0], o = a[1]);
var r = e.toglobalcoord(e.datatocoord(0));
return r < n && (r = n),
r > o && (r = o),
r
}
function el(t, e) {
return sa(t, ba(e))
}
function rl(t, e) {
var i, n, o, a = t.type,
r = e.getmin(),
s = e.getmax(),
l = null != r,
u = null != s,
h = t.getextent();
"ordinal" === a ? i = e.getcategories().length: (y(n = e.get("boundarygap")) || (n = [n || 0, n || 0]), "boolean" == typeof n[0] && (n = [0, 0]), n[0] = ro(n[0], 1), n[1] = ro(n[1], 1), o = h[1] - h[0] || math.abs(h[0])),
null == r && (r = "ordinal" === a ? i ? 0 : nan: h[0] - n[0] * o),
null == s && (s = "ordinal" === a ? i ? i - 1 : nan: h[1] + n[1] * o),
"datamin" === r ? r = h[0] : "function" == typeof r && (r = r({
min: h[0],
max: h[1]
})),
"datamax" === s ? s = h[1] : "function" == typeof s && (s = s({
min: h[0],
max: h[1]
})),
(null == r || !isfinite(r)) && (r = nan),
(null == s || !isfinite(s)) && (s = nan),
t.setblank(i(r) || i(s) || "ordinal" === a && !t.getordinalmeta().categories.length),
e.getneedcrosszero() && (r > 0 && s > 0 && !l && (r = 0), r < 0 && s < 0 && !u && (s = 0));
var c = e.ecmodel;
if (c && "time" === a) {
var f, p = al("bar", c);
if (d(p,
function(t) {
f |= t.getbaseaxis() === e.axis
}), f) {
var g = dl(p),
m = zl(r, s, e, g);
r = m.min,
s = m.max
}
}
return [r, s]
}
function zl(t, e, i, n) {
var o = i.axis.getextent(),
a = o[1] - o[0],
r = ll(n, i.axis);
if (void 0 === r) return {
min: t,
max: e
};
var s = 1 / 0;
d(r,
function(t) {
s = math.min(t.offset, s)
});
var l = -1 / 0;
d(r,
function(t) {
l = math.max(t.offset + t.width, l)
}),
s = math.abs(s),
l = math.abs(l);
var u = s + l,
h = e - t,
c = h / (1 - (s + l) / a) - h;
return e += c * (l / u),
t -= c * (s / u),
{
min: t,
max: e
}
}
function bl(t, e) {
var i = rl(t, e),
n = null != e.getmin(),
o = null != e.getmax(),
a = e.get("splitnumber");
"log" === t.type && (t.base = e.get("logbase"));
var r = t.type;
t.setextent(i[0], i[1]),
t.niceextent({
splitnumber: a,
fixmin: n,
fixmax: o,
mininterval: "interval" === r || "time" === r ? e.get("mininterval") : null,
maxinterval: "interval" === r || "time" === r ? e.get("maxinterval") : null
});
var s = e.get("interval");
null != s && t.setinterval && t.setinterval(s)
}
function vl(t, e) {
if (e = e || t.get("type")) switch (e) {
case "category":
return new sa(t.getordinalmeta ? t.getordinalmeta() : t.getcategories(), [1 / 0, -1 / 0]);
case "value":
return new ha;
default:
return (gl.getclass(e) || ha).create(t)
}
}
function gl(t) {
var e = t.scale.getextent(),
i = e[0],
n = e[1];
return ! (i > 0 && n > 0 || i < 0 && n < 0)
}
function fl(t) {
var e = t.getlabelmodel().get("formatter"),
i = "category" === t.type ? t.scale.getextent()[0] : null;
return "string" == typeof e ? e = function(e) {
return function(i) {
return i = t.scale.getlabel(i),
e.replace("{value}", null != i ? i: "")
}
} (e) : "function" == typeof e ?
function(n, o) {
return null != i && (o = n - i),
e(wl(t, n), o)
}: function(e) {
return t.scale.getlabel(e)
}
}
function wl(t, e) {
return "category" === t.type ? t.scale.getlabel(e) : e
}
function hl(t) {
var e = t.model,
i = t.scale;
if (e.get("axislabel.show") && !i.isblank()) {
var n, o, a = "category" === t.type,
r = i.getextent();
o = a ? i.count() : (n = i.getticks()).length;
var s, l = t.getlabelmodel(),
u = fl(t),
h = 1;
o > 40 && (h = math.ceil(o / 40));
for (var c = 0; c < o; c += h) {
var d = u(n ? n[c] : r[0] + c),
f = zl(l.gettextrect(d), l.get("rotate") || 0);
s ? s.union(f) : s = f
}
return s
}
}
function zl(t, e) {
var i = e * math.pi / 180,
n = t.plain(),
o = n.width,
a = n.height,
r = o * math.cos(i) + a * math.sin(i),
s = o * math.sin(i) + a * math.cos(i);
return new ue(n.x, n.y, r, s)
}
function ul(t, e) {
if ("image" !== this.type) {
var i = this.style,
n = this.shape;
n && "line" === n.symboltype ? i.stroke = t: this.__isemptybrush ? (i.stroke = t, i.fill = e || "#fff") : (i.fill && (i.fill = t), i.stroke && (i.stroke = t)),
this.dirty(!1)
}
}
function xl(t, e, i, n, o, a, r) {
var s = 0 === t.indexof("empty");
s && (t = t.substr(5, 1).tolowercase() + t.substr(6));
var l;
return l = 0 === t.indexof("image://") ? hn(t.slice(8), new ue(e, i, n, o), r ? "center": "cover") : 0 === t.indexof("path://") ? wn(t.slice(7), {},
new ue(e, i, n, o), r ? "center": "cover") : new ra({
shape: {
symboltype: t,
x: e,
y: i,
width: n,
height: o
}
}),
l.__isemptybrush = s,
l.setcolor = ul,
l.setcolor(a),
l
}
function jl(t, e) {
return math.abs(t - e) < va
}
function yl(t, e, i) {
var n = 0,
o = t[0];
if (!o) return ! 1;
for (var a = 1; a < t.length; a++) {
var r = t[a];
n += bn(o[0], o[1], r[0], r[1], e, i),
o = r
}
var s = t[0];
return jl(o[0], s[0]) && jl(o[1], s[1]) || (n += bn(o[0], o[1], s[0], s[1], e, i)),
0 !== n
}
function ql(t, e, i) {
if (this.name = t, this.geometries = e, i) i = [i[0], i[1]];
else {
var n = this.getboundingrect();
i = [n.x + n.width / 2, n.y + n.height / 2]
}
this.center = i
}
function kl(t) {
if (!t.utf8encoding) return t;
var e = t.utf8scale;
null == e && (e = 1024);
for (var i = t.features,
n = 0; n < i.length; n++) for (var o = i[n].geometry, a = o.coordinates, r = o.encodeoffsets, s = 0; s < a.length; s++) {
var l = a[s];
if ("polygon" === o.type) a[s] = $l(l, r[s], e);
else if ("multipolygon" === o.type) for (var u = 0; u < l.length; u++) {
var h = l[u];
l[u] = $l(h, r[s][u], e)
}
}
return t.utf8encoding = !1,
t
}
function $l(t, e, i) {
for (var n = [], o = e[0], a = e[1], r = 0; r < t.length; r += 2) {
var s = t.charcodeat(r) - 64,
l = t.charcodeat(r + 1) - 64;
s = s >> 1 ^ -(1 & s),
l = l >> 1 ^ -(1 & l),
o = s += o,
a = l += a,
n.push([s / i, l / i])
}
return n
}
function jl(t) {
return "category" === t.type ? tu(t) : nu(t)
}
function ql(t, e) {
return "category" === t.type ? iu(t, e) : {
ticks: t.scale.getticks()
}
}
function tu(t) {
var e = t.getlabelmodel(),
i = eu(t, e);
return ! e.get("show") || t.scale.isblank() ? {
labels: [],
labelcategoryinterval: i.labelcategoryinterval
}: i
}
function eu(t, e) {
var i = ou(t, "labels"),
n = du(e),
o = au(i, n);
if (o) return o;
var a, r;
return a = x(n) ? cu(t, n) : hu(t, r = "auto" === n ? su(t) : n),
ru(i, n, {
labels: a,
labelcategoryinterval: r
})
}
function iu(t, e) {
var i = ou(t, "ticks"),
n = du(e),
o = au(i, n);
if (o) return o;
var a, r;
if (e.get("show") && !t.scale.isblank() || (a = []), x(n)) a = cu(t, n, !0);
else if ("auto" === n) {
var s = eu(t, t.getlabelmodel());
r = s.labelcategoryinterval,
a = f(s.labels,
function(t) {
return t.tickvalue
})
} else a = hu(t, r = n, !0);
return ru(i, n, {
ticks: a,
tickcategoryinterval: r
})
}
function nu(t) {
var e = t.scale.getticks(),
i = fl(t);
return {
labels: f(e,
function(e, n) {
return {
formattedlabel: i(e, n),
rawlabel: t.scale.getlabel(e),
tickvalue: e
}
})
}
}
function ou(t, e) {
return fa(t)[e] || (fa(t)[e] = [])
}
function au(t, e) {
for (var i = 0; i < t.length; i++) if (t[i].key === e) return t[i].value
}
function ru(t, e, i) {
return t.push({
key: e,
value: i
}),
i
}
function su(t) {
var e = fa(t).autointerval;
return null != e ? e: fa(t).autointerval = t.calculatecategoryinterval()
}
function lu(t) {
var e = uu(t),
i = fl(t),
n = (e.axisrotate - e.labelrotate) / 180 * math.pi,
o = t.scale,
a = o.getextent(),
r = o.count();
if (a[1] - a[0] < 1) return 0;
var s = 1;
r > 40 && (s = math.max(1, math.floor(r / 40)));
for (var l = a[0], u = t.datatocoord(l + 1) - t.datatocoord(l), h = math.abs(u * math.cos(n)), c = math.abs(u * math.sin(n)), d = 0, f = 0; l <= a[1]; l += s) {
var p = 0,
g = 0,
m = de(i(l), e.font, "center", "top");
p = 1.3 * m.width,
g = 1.3 * m.height,
d = math.max(d, p, 7),
f = math.max(f, g, 7)
}
var v = d / h,
y = f / c;
isnan(v) && (v = 1 / 0),
isnan(y) && (y = 1 / 0);
var x = math.max(0, math.floor(math.min(v, y))),
_ = fa(t.model),
w = _.lastautointerval,
b = _.lasttickcount;
return null != w && null != b && math.abs(w - x) <= 1 && math.abs(b - r) <= 1 && w > x ? x = w: (_.lasttickcount = r, _.lastautointerval = x),
x
}
function uu(t) {
var e = t.getlabelmodel();
return {
axisrotate: t.getrotate ? t.getrotate() : t.ishorizontal && !t.ishorizontal() ? 90 : 0,
labelrotate: e.get("rotate") || 0,
font: e.getfont()
}
}
function hu(t, e, i) {
function n(t) {
l.push(i ? t: {
formattedlabel: o(t),
rawlabel: a.getlabel(t),
tickvalue: t
})
}
var o = fl(t),
a = t.scale,
r = a.getextent(),
s = t.getlabelmodel(),
l = [],
u = math.max((e || 0) + 1, 1),
h = r[0],
c = a.count();
0 !== h && u > 1 && c / u > 2 && (h = math.round(math.ceil(h / u) * u));
var d = {
min: s.get("showminlabel"),
max: s.get("showmaxlabel")
};
d.min && h !== r[0] && n(r[0]);
for (var f = h; f <= r[1]; f += u) n(f);
return d.max && f !== r[1] && n(r[1]),
l
}
function cu(t, e, i) {
var n = t.scale,
o = fl(t),
a = [];
return d(n.getticks(),
function(t) {
var r = n.getlabel(t);
e(t, r) && a.push(i ? t: {
formattedlabel: o(t),
rawlabel: r,
tickvalue: t
})
}),
a
}
function du(t) {
var e = t.get("interval");
return null == e ? "auto": e
}
function fu(t, e) {
var i = (t[1] - t[0]) / e / 2;
t[0] += i,
t[1] -= i
}
function pu(t, e, i, n, o) {
function a(t, e) {
return h ? t > e: t < e
}
var r = e.length;
if (t.onband && !n && r) {
var s, l = t.getextent();
if (1 === r) e[0].coord = l[0],
s = e[1] = {
coord: l[0]
};
else {
var u = e[1].coord - e[0].coord;
d(e,
function(t) {
t.coord -= u / 2;
var e = e || 0;
e % 2 > 0 && (t.coord -= u / (2 * (e + 1)))
}),
s = {
coord: e[r - 1].coord + u
},
e.push(s)
}
var h = l[0] > l[1];
a(e[0].coord, l[0]) && (o ? e[0].coord = l[0] : e.shift()),
o && a(l[0], e[0].coord) && e.unshift({
coord: l[0]
}),
a(l[1], s.coord) && (o ? s.coord = l[1] : e.pop()),
o && a(s.coord, l[1]) && e.push({
coord: l[1]
})
}
}
function gu(t, e) {
var i = t.mapdimension("defaultedlabel", !0),
n = i.length;
if (1 === n) return hr(t, e, i[0]);
if (n) {
for (var o = [], a = 0; a < i.length; a++) {
var r = hr(t, e, i[a]);
o.push(r)
}
return o.join(" ")
}
}
function mu(t, e, i) {
zw.call(this),
this.updatedata(t, e, i)
}
function vu(t) {
return [t[0] / 2, t[1] / 2]
}
function yu(t, e) {
this.parent.drift(t, e)
}
function xu() { ! oo(this) && wu.call(this)
}
function _u() { ! oo(this) && bu.call(this)
}
function wu() {
if (!this.incremental && !this.usehoverlayer) {
var t = this.__symboloriginalscale,
e = t[1] / t[0];
this.animateto({
scale: [math.max(1.1 * t[0], t[0] + 3), math.max(1.1 * t[1], t[1] + 3 * e)]
},
400, "elasticout")
}
}
function bu() {
this.incremental || this.usehoverlayer || this.animateto({
scale: this.__symboloriginalscale
},
400, "elasticout")
}
function su(t) {
this.group = new zw,
this._symbolctor = t || mu
}
function mu(t, e, i, n) {
return e && !isnan(e[0]) && !isnan(e[1]) && !(n.isignore && n.isignore(i)) && !(n.clipshape && !n.clipshape.contain(e[0], e[1])) && "none" !== t.getitemvisual(i, "symbol")
}
function iu(t) {
return null == t || w(t) || (t = {
isignore: t
}),
t || {}
}
function tu(t) {
var e = t.hostmodel;
return {
itemstyle: e.getmodel("itemstyle").getitemstyle(["color"]),
hoveritemstyle: e.getmodel("emphasis.itemstyle").getitemstyle(),
symbolrotate: e.get("symbolrotate"),
symboloffset: e.get("symboloffset"),
hoveranimation: e.get("hoveranimation"),
labelmodel: e.getmodel("label"),
hoverlabelmodel: e.getmodel("emphasis.label"),
cursorstyle: e.get("cursor")
}
}
function au(t, e, i) {
var n, o = t.getbaseaxis(),
a = t.getotheraxis(o),
r = du(a, i),
s = o.dim,
l = a.dim,
u = e.mapdimension(l),
h = e.mapdimension(s),
c = "x" === l || "radius" === l ? 1 : 0,
d = f(t.dimensions,
function(t) {
return e.mapdimension(t)
}),
p = e.getcalculationinfo("stackresultdimension");
return (n |= hl(e, d[0])) && (d[0] = p),
(n |= hl(e, d[1])) && (d[1] = p),
{
datadimsforpoint: d,
valuestart: r,
valueaxisdim: l,
baseaxisdim: s,
stacked: !!n,
valuedim: u,
basedim: h,
basedataoffset: c,
stackedoverdimension: e.getcalculationinfo("stackedoverdimension")
}
}
function du(t, e) {
var i = 0,
n = t.scale.getextent();
return "start" === e ? i = n[0] : "end" === e ? i = n[1] : n[0] > 0 ? i = n[0] : n[1] < 0 && (i = n[1]),
i
}
function cu(t, e, i, n) {
var o = nan;
t.stacked && (o = i.get(i.getcalculationinfo("stackedoverdimension"), n)),
isnan(o) && (o = t.valuestart);
var a = t.basedataoffset,
r = [];
return r[a] = i.get(t.basedim, n),
r[1 - a] = o,
e.datatopoint(r)
}
function lu(t, e) {
var i = [];
return e.diff(t).add(function(t) {
i.push({
cmd: "+",
idx: t
})
}).update(function(t, e) {
i.push({
cmd: "=",
idx: e,
idx1: t
})
}).remove(function(t) {
i.push({
cmd: "-",
idx: t
})
}).execute(),
i
}
function ku(t) {
return isnan(t[0]) || isnan(t[1])
}
function pu(t, e, i, n, o, a, r, s, l, u, h) {
return "none" !== u && u ? nu.apply(this, arguments) : ou.apply(this, arguments)
}
function nu(t, e, i, n, o, a, r, s, l, u, h) {
for (var c = 0,
d = i,
f = 0; f < n; f++) {
var p = e[d];
if (d >= o || d < 0) break;
if (ku(p)) {
if (h) {
d += a;
continue
}
break
}
if (d === i) t[a > 0 ? "moveto": "lineto"](p[0], p[1]);
else if (l > 0) {
var g = e[c],
m = "y" === u ? 1 : 0,
v = (p[m] - g[m]) * l;
od(rd, g),
rd[m] = g[m] + v,
od(sd, p),
sd[m] = p[m] - v,
t.beziercurveto(rd[0], rd[1], sd[0], sd[1], p[0], p[1])
} else t.lineto(p[0], p[1]);
c = d,
d += a
}
return f
}
function ou(t, e, i, n, o, a, r, s, l, u, h) {
for (var c = 0,
d = i,
f = 0; f < n; f++) {
var p = e[d];
if (d >= o || d < 0) break;
if (ku(p)) {
if (h) {
d += a;
continue
}
break
}
if (d === i) t[a > 0 ? "moveto": "lineto"](p[0], p[1]),
od(rd, p);
else if (l > 0) {
var g = d + a,
m = e[g];
if (h) for (; m && ku(e[g]);) m = e[g += a];
var v = .5,
y = e[c];
if (! (m = e[g]) || ku(m)) od(sd, p);
else {
ku(m) && !h && (m = p),
u(ad, m, y);
var x, _;
if ("x" === u || "y" === u) {
var w = "x" === u ? 0 : 1;
x = math.abs(p[w] - y[w]),
_ = math.abs(p[w] - m[w])
} else x = ew(p, y),
_ = ew(p, m);
nd(sd, p, ad, -l * (1 - (v = _ / (_ + x))))
}
ed(rd, rd, s),
id(rd, rd, r),
ed(sd, sd, s),
id(sd, sd, r),
t.beziercurveto(rd[0], rd[1], sd[0], sd[1], p[0], p[1]),
nd(rd, p, ad, l * v)
} else t.lineto(p[0], p[1]);
c = d,
d += a
}
return f
}
function eu(t, e) {
var i = [1 / 0, 1 / 0],
n = [ - 1 / 0, -1 / 0];
if (e) for (var o = 0; o < t.length; o++) {
var a = t[o];
a[0] < i[0] && (i[0] = a[0]),
a[1] < i[1] && (i[1] = a[1]),
a[0] > n[0] && (n[0] = a[0]),
a[1] > n[1] && (n[1] = a[1])
}
return {
min: e ? i: n,
max: e ? n: i
}
}
function ru(t, e) {
if (t.length === e.length) {
for (var i = 0; i < t.length; i++) {
var n = t[i],
o = e[i];
if (n[0] !== o[0] || n[1] !== o[1]) return
}
return ! 0
}
}
function zu(t) {
return "number" == typeof t ? t: t ? .5 : 0
}
function bu(t) {
var e = t.getglobalextent();
if (t.onband) {
var i = t.getbandwidth() / 2 - 1,
n = e[1] > e[0] ? 1 : -1;
e[0] += n * i,
e[1] -= n * i
}
return e
}
function vu(t, e, i) {
if (!i.valuedim) return [];
for (var n = [], o = 0, a = e.count(); o < a; o++) n.push(cu(i, t, e, o));
return n
}
function gu(t, e, i, n) {
var o = bu(t.getaxis("x")),
a = bu(t.getaxis("y")),
r = t.getbaseaxis().ishorizontal(),
s = math.min(o[0], o[1]),
l = math.min(a[0], a[1]),
u = math.max(o[0], o[1]) - s,
h = math.max(a[0], a[1]) - l;
if (i) s -= .5,
u += .5,
l -= .5,
h += .5;
else {
var c = n.get("linestyle.width") || 2,
d = n.get("clipoverflow") ? c / 2 : math.max(u, h);
r ? (l -= d, h += 2 * d) : (s -= d, u += 2 * d)
}
var f = new am({
shape: {
x: s,
y: l,
width: u,
height: h
}
});
return e && (f.shape[r ? "width": "height"] = 0, so(f, {
shape: {
width: u,
height: h
}
},
n)),
f
}
function fu(t, e, i, n) {
var o = t.getangleaxis(),
a = t.getradiusaxis().getextent().slice();
a[0] > a[1] && a.reverse();
var r = o.getextent(),
s = math.pi / 180;
i && (a[0] -= .5, a[1] += .5);
var l = new qs({
shape: {
cx: zo(t.cx, 1),
cy: zo(t.cy, 1),
r0: zo(a[0], 1),
r: zo(a[1], 1),
startangle: -r[0] * s,
endangle: -r[1] * s,
clockwise: o.inverse
}
});
return e && (l.shape.endangle = -r[0] * s, so(l, {
shape: {
endangle: -r[1] * s
}
},
n)),
l
}
function wu(t, e, i, n) {
return "polar" === t.type ? fu(t, e, i, n) : gu(t, e, i, n)
}
function hu(t, e, i) {
for (var n = e.getbaseaxis(), o = "x" === n.dim || "radius" === n.dim ? 0 : 1, a = [], r = 0; r < t.length - 1; r++) {
var s = t[r + 1],
l = t[r];
a.push(l);
var u = [];
switch (i) {
case "end":
u[o] = s[o],
u[1 - o] = l[1 - o],
a.push(u);
break;
case "middle":
var h = (l[o] + s[o]) / 2,
c = [];
u[o] = c[o] = h,
u[1 - o] = l[1 - o],
c[1 - o] = s[1 - o],
a.push(u),
a.push(c);
break;
default:
u[o] = l[o],
u[1 - o] = s[1 - o],
a.push(u)
}
}
return t[r] && a.push(t[r]),
a
}
function zu(t, e) {
var i = t.getvisual("visualmeta");
if (i && i.length && t.count() && "cartesian2d" === e.type) {
for (var n, o, a = i.length - 1; a >= 0; a--) {
var r = i[a].dimension,
s = t.dimensions[r],
l = t.getdimensioninfo(s);
if ("x" === (n = l && l.coorddim) || "y" === n) {
o = i[a];
break
}
}
if (o) {
var u = e.getaxis(n),
h = f(o.stops,
function(t) {
return {
coord: u.toglobalcoord(u.datatocoord(t.value)),
color: t.color
}
}),
c = h.length,
p = o.outercolors.slice();
c && h[0].coord > h[c - 1].coord && (h.reverse(), p.reverse());
var g = h[0].coord - 10,
m = h[c - 1].coord + 10,
v = m - g;
if (v < .001) return "transparent";
d(h,
function(t) {
t.offset = (t.coord - g) / v
}),
h.push({
offset: c ? h[c - 1].offset: .5,
color: p[1] || "transparent"
}),
h.unshift({
offset: c ? h[0].offset: .5,
color: p[0] || "transparent"
});
var y = new dm(0, 0, 0, 0, h, !0);
return y[n] = g,
y[n + "2"] = m,
y
}
}
}
function uu(t, e, i) {
var n = t.get("showallsymbol"),
o = "auto" === n;
if (!n || o) {
var a = i.getaxesbyscale("ordinal")[0];
if (a && (!o || !xu(a, e))) {
var r = e.mapdimension(a.dim),
s = {};
return d(a.getviewlabels(),
function(t) {
s[t.tickvalue] = 1
}),
function(t) {
return ! s.hasownproperty(e.get(r, t))
}
}
}
}
function xu(t, e) {
var i = t.getextent(),
n = math.abs(i[1] - i[0]) / t.scale.count();
isnan(n) && (n = 0);
for (var o = e.count(), a = math.max(1, math.round(o / 5)), r = 0; r < o; r += a) if (1.5 * mu.getsymbolsize(e, r)[t.ishorizontal() ? 1 : 0] > n) return ! 1;
return ! 0
}
function ju(t) {
return this._axes[t]
}
function yu(t) {
pd.call(this, t)
}
function qu(t, e) {
return e.type || (e.data ? "category": "value")
}
function ku(t, e, i) {
return t.getcoordsysmodel() === e
}
function $u(t, e, i) {
this._coordsmap = {},
this._coordslist = [],
this._axesmap = {},
this._axeslist = [],
this._initcartesian(t, e, i),
this.model = t
}
function ju(t, e, i, n) {
function o(t) {
return t.dim + "_" + t.index
}
i.getaxesonzeroof = function() {
return a ? [a] : []
};
var a, r = t[e],
s = i.model,
l = s.get("axisline.onzero"),
u = s.get("axisline.onzeroaxisindex");
if (l) {
if (null != u) qu(r[u]) && (a = r[u]);
else for (var h in r) if (r.hasownproperty(h) && qu(r[h]) && !n[o(r[h])]) {
a = r[h];
break
}
a && (n[o(a)] = !0)
}
}
function qu(t) {
return t && "category" !== t.type && "time" !== t.type && gl(t)
}
function th(t, e) {
var i = t.getextent(),
n = i[0] + i[1];
t.toglobalcoord = "x" === t.dim ?
function(t) {
return t + e
}: function(t) {
return n - t + e
},
t.tolocalcoord = "x" === t.dim ?
function(t) {
return t - e
}: function(t) {
return n - t + e
}
}
function eh(t, e) {
return f(sd,
function(e) {
return t.getreferringcomponents(e)[0]
})
}
function ih(t) {
return "cartesian2d" === t.get("coordinatesystem")
}
function nh(t) {
var e = {
componenttype: t.maintype,
componentindex: t.componentindex
};
return e[t.maintype + "index"] = t.componentindex,
e
}
function oh(t, e, i, n) {
var o, a, r = ho(i - t.rotation),
s = n[0] > n[1],
l = "start" === e && !s || "start" !== e && s;
return zo(r - md / 2) ? (a = l ? "bottom": "top", o = "center") : zo(r - 1.5 * md) ? (a = l ? "top": "bottom", o = "center") : (a = "middle", o = r < 1.5 * md && r > md / 2 ? l ? "left": "right": l ? "right": "left"),
{
rotation: r,
textalign: o,
textverticalalign: a
}
}
function ah(t) {
var e = t.get("tooltip");
return t.get("silent") || !(t.get("triggerevent") || e && e.show)
}
function rh(t, e, i) {
var n = t.get("axislabel.showminlabel"),
o = t.get("axislabel.showmaxlabel");
e = e || [],
i = i || [];
var a = e[0],
r = e[1],
s = e[e.length - 1],
l = e[e.length - 2],
u = i[0],
h = i[1],
c = i[i.length - 1],
d = i[i.length - 2]; ! 1 === n ? (sh(a), sh(u)) : lh(a, r) && (n ? (sh(r), sh(h)) : (sh(a), sh(u))),
!1 === o ? (sh(s), sh(c)) : lh(l, s) && (o ? (sh(l), sh(d)) : (sh(s), sh(c)))
}
function sh(t) {
t && (t.ignore = !0)
}
function lh(t, e, i) {
var n = t && t.getboundingrect().clone(),
o = e && e.getboundingrect().clone();
if (n && o) {
var a = vt([]);
return wt(a, a, -t.rotation),
n.applytransform(xt([], a, t.getlocaltransform())),
o.applytransform(xt([], a, e.getlocaltransform())),
n.intersect(o)
}
}
function uh(t) {
return "middle" === t || "center" === t
}
function hh(t, e, i) {
var n = e.axis;
if (e.get("axistick.show") && !n.scale.isblank()) {
for (var o = e.getmodel("axistick"), a = o.getmodel("linestyle"), s = o.get("length"), l = n.gettickscoords(), u = [], h = [], c = t._transform, d = [], f = 0; f < l.length; f++) {
var p = l[f].coord;
u[0] = p,
u[1] = 0,
h[0] = p,
h[1] = i.tickdirection * s,
c && (q(u, u, c), q(h, h, c));
var g = new rm(xn({
anid: "tick_" + l[f].tickvalue,
shape: {
x1: u[0],
y1: u[1],
x2: h[0],
y2: h[1]
},
style: r(a.getlinestyle(), {
stroke: e.get("axisline.linestyle.color")
}),
z2: 2,
silent: !0
}));
t.group.add(g),
d.push(g)
}
return d
}
}
function ch(t, e, i) {
var n = e.axis;
if (t(i.axislabelshow, e.get("axislabel.show")) && !n.scale.isblank()) {
var o = e.getmodel("axislabel"),
a = o.get("margin"),
r = n.getviewlabels(),
s = (t(i.labelrotate, o.get("rotate")) || 0) * md / 180,
l = ad(i.rotation, s, i.labeldirection),
u = e.getcategories(!0),
h = [],
c = ah(e),
f = e.get("triggerevent");
return d(r,
function(r, s) {
var d = r.tickvalue,
p = r.formattedlabel,
g = r.rawlabel,
m = o;
u && u[d] && u[d].textstyle && (m = new lo(u[d].textstyle, o, e.ecmodel));
var v = m.gettextcolor() || e.get("axisline.linestyle.color"),
y = [n.datatocoord(d), i.labeloffset + i.labeldirection * a],
x = new qs({
anid: "label_" + d,
position: y,
rotation: l.rotation,
silent: c,
z2: 10
});
fo(x.style, m, {
text: p,
textalign: m.getshallow("align", !0) || l.textalign,
textverticalalign: m.getshallow("verticalalign", !0) || m.getshallow("baseline", !0) || l.textverticalalign,
textfill: "function" == typeof v ? v("category" === n.type ? g: "value" === n.type ? d + "": d, s) : v
}),
f && (x.eventdata = nh(e), x.eventdata.targettype = "axislabel", x.eventdata.value = g),
t._dumbgroup.add(x),
x.updatetransform(),
h.push(x),
t.group.add(x),
x.decomposetransform()
}),
h
}
}
function dh(t, e) {
var i = {
axesinfo: {},
seriesinvolved: !1,
coordsysaxesinfo: {},
coordsysmap: {}
};
return fh(i, t, e),
i.seriesinvolved && gh(i, t),
i
}
function fh(t, e, i) {
var n = e.getcomponent("tooltip"),
o = e.getcomponent("axispointer"),
a = o.get("link", !0) || [],
r = [];
dd(i.getcoordinatesystems(),
function(i) {
function s(n, s, l) {
var c = l.model.getmodel("axispointer", o),
d = c.get("show");
if (d && ("auto" !== d || n || wh(c))) {
null == s && (s = c.get("triggertooltip"));
var f = (c = n ? ph(l, h, o, e, n, s) : c).get("snap"),
p = bh(l.model),
g = s || f || "category" === l.type,
m = t.axesinfo[p] = {
key: p,
axis: l,
coordsys: i,
axispointermodel: c,
triggertooltip: s,
involveseries: g,
snap: f,
usehandle: wh(c),
seriesmodels: []
};
u[p] = m,
t.seriesinvolved |= g;
var v = mh(a, l);
if (null != v) {
var y = r[v] || (r[v] = {
axesinfo: {}
});
y.axesinfo[p] = m,
y.mapper = a[v].mapper,
m.linkgroup = y
}
}
}
if (i.axispointerenabled) {
var l = bh(i.model),
u = t.coordsysaxesinfo[l] = {};
t.coordsysmap[l] = i;
var h = i.model.getmodel("tooltip", n);
if (dd(i.getaxes(), cd(s, !1, null)), i.gettooltipaxes && n && h.get("show")) {
var c = "axis" === h.get("trigger"),
d = "cross" === h.get("axispointer.type"),
f = i.gettooltipaxes(h.get("axispointer.axis")); (c || d) && dd(f.baseaxes, cd(s, !d || "cross", c)),
d && dd(f.otheraxes, cd(s, "cross", !1))
}
}
})
}
function ph(t, e, n, o, a, s) {
var l = e.getmodel("axispointer"),
u = {};
dd(["type", "snap", "linestyle", "shadowstyle", "label", "animation", "animationdurationupdate", "animationeasingupdate", "z"],
function(t) {
u[t] = i(l.get(t))
}),
u.snap = "category" !== t.type && !!s,
"cross" === l.get("type") && (u.type = "line");
var h = u.label || (u.label = {});
if (null == h.show && (h.show = !1), "cross" === a) {
var c = l.get("label.show");
if (h.show = null == c || c, !s) {
var d = u.linestyle = l.get("crossstyle");
d && r(h, d.textstyle)
}
}
return t.model.getmodel("axispointer", new lo(u, n, o))
}
function gh(t, e) {
e.eachseries(function(e) {
var i = e.coordinatesystem,
n = e.get("tooltip.trigger", !0),
o = e.get("tooltip.show", !0);
i && "none" !== n && !1 !== n && "item" !== n && !1 !== o && !1 !== e.get("axispointer.show", !0) && dd(t.coordsysaxesinfo[bh(i.model)],
function(t) {
var n = t.axis;
i.getaxis(n.dim) === n && (t.seriesmodels.push(e), null == t.seriesdatacount && (t.seriesdatacount = 0), t.seriesdatacount += e.getdata().count())
})
},
this)
}
function mh(t, e) {
for (var i = e.model,
n = e.dim,
o = 0; o < t.length; o++) {
var a = t[o] || {};
if (vh(a[n + "axisid"], i.id) || vh(a[n + "axisindex"], i.componentindex) || vh(a[n + "axisname"], i.name)) return o
}
}
function vh(t, e) {
return "all" === t || y(t) && l(t, e) >= 0 || t === e
}
function yh(t) {
var e = xh(t);
if (e) {
var i = e.axispointermodel,
n = e.axis.scale,
o = i.option,
a = i.get("status"),
r = i.get("value");
null != r && (r = n.parse(r));
var s = wh(i);
null == a && (o.status = s ? "show": "hide");
var l = n.getextent().slice();
l[0] > l[1] && l.reverse(),
(null == r || r > l[1]) && (r = l[1]),
r < l[0] && (r = l[0]),
o.value = r,
s && (o.status = e.axis.scale.isblank() ? "hide": "show")
}
}
function xh(t) {
var e = (t.ecmodel.getcomponent("axispointer") || {}).coordsysaxesinfo;
return e && e.axesinfo[bh(t)]
}
function _h(t) {
var e = xh(t);
return e && e.axispointermodel
}
function wh(t) {
return !! t.get("handle.show")
}
function bh(t) {
return t.type + "||" + t.id
}
function sh(t, e, i, n, o, a) {
var r = ld.getaxispointerclass(t.axispointerclass);
if (r) {
var s = _h(e);
s ? (t._axispointer || (t._axispointer = new r)).render(e, s, n, a) : mh(t, n)
}
}
function mh(t, e, i) {
var n = t._axispointer;
n && n.dispose(e, i),
t._axispointer = null
}
function ih(t, e, i) {
i = i || {};
var n = t.coordinatesystem,
o = e.axis,
a = {},
r = o.getaxesonzeroof()[0],
s = o.position,
l = r ? "onzero": s,
u = o.dim,
h = n.getrect(),
c = [h.x, h.x + h.width, h.y, h.y + h.height],
d = {
left: 0,
right: 1,
top: 0,
bottom: 1,
onzero: 2
},
f = e.get("offset") || 0,
p = "x" === u ? [c[2] - f, c[3] + f] : [c[0] - f, c[1] + f];
if (r) {
var g = r.toglobalcoord(r.datatocoord(0));
p[d.onzero] = math.max(math.min(g, p[1]), p[0])
}
a.position = ["y" === u ? p[d[l]] : c[0], "x" === u ? p[d[l]] : c[3]],
a.rotation = math.pi / 2 * ("x" === u ? 0 : 1);
var m = {
top: -1,
bottom: 1,
left: -1,
right: 1
};
a.labeldirection = a.tickdirection = a.namedirection = m[s],
a.labeloffset = r ? p[d[s]] - p[d.onzero] : 0,
e.get("axistick.inside") && (a.tickdirection = -a.tickdirection),
t(i.labelinside, e.get("axislabel.inside")) && (a.labeldirection = -a.labeldirection);
var v = e.get("axislabel.rotate");
return a.labelrotate = "top" === l ? -v: v,
a.z2 = 1,
a
}
function th(t, e, i, n, o, a, r) {
co(t, e, i.getmodel("label"), i.getmodel("emphasis.label"), {
labelfetcher: o,
labeldataindex: a,
defaulttext: gu(o.getdata(), a),
isrecttext: !0,
autocolor: n
}),
ah(t),
ah(e)
}
function ah(t, e) {
"outside" === t.textposition && (t.textposition = e)
}
function dh(t, e, i) {
i.style.text = null,
bo(i, {
shape: {
width: 0
}
},
e, t,
function() {
i.parent && i.parent.remove(i)
})
}
function ch(t, e, i) {
i.style.text = null,
bo(i, {
shape: {
r: i.shape.r0
}
},
e, t,
function() {
i.parent && i.parent.remove(i)
})
}
function lh(t, e, i, n, o, a, s, l) {
var u = e.getitemvisual(i, "color"),
h = e.getitemvisual(i, "opacity"),
c = n.getmodel("itemstyle"),
d = n.getmodel("emphasis.itemstyle").getbaritemstyle();
l || t.setshape("r", c.get("barborderradius") || 0),
t.usestyle(r({
fill: u,
opacity: h
},
c.getbaritemstyle()));
var f = n.getshallow("cursor");
f && t.attr("cursor", f);
var p = s ? o.height > 0 ? "bottom": "top": o.width > 0 ? "left": "right";
l || th(t.style, d, n, u, a, i, p),
uo(t, d)
}
function kh(t, e) {
var i = t.get(bd) || 0;
return math.min(i, math.abs(e.width), math.abs(e.height))
}
function ph(t, e, i) {
var n = t.getdata(),
o = [],
a = n.getlayout("valueaxishorizontal") ? 1 : 0;
o[1 - a] = n.getlayout("valueaxisstart");
var r = new fd({
shape: {
points: n.getlayout("largepoints")
},
incremental: !!i,
__startpoint: o,
__valueidx: a
});
e.add(r),
nh(r, t, n)
}
function nh(t, e, i) {
var n = i.getvisual("bordercolor") || i.getvisual("color"),
o = e.getmodel("itemstyle").getitemstyle(["color", "bordercolor"]);
t.usestyle(o),
t.style.fill = null,
t.style.stroke = n,
t.style.linewidth = i.getlayout("barwidth")
}
function oh(t, e, i, n) {
var o = e.getdata(),
a = this.dataindex,
r = o.getname(a),
s = e.get("selectedoffset");
n.dispatchaction({
type: "pietoggleselect",
from: t,
name: r,
seriesid: e.id
}),
o.each(function(t) {
eh(o.getitemgraphicel(t), o.getitemlayout(t), e.isselected(o.getname(t)), s, i)
})
}
function eh(t, e, i, n, o) {
var a = (e.startangle + e.endangle) / 2,
r = math.cos(a),
s = math.sin(a),
l = i ? n: 0,
u = [r * l, s * l];
o ? t.animate().when(200, {
position: u
}).start("bounceout") : t.attr("position", u)
}
function rh(t, e) {
function i() {
a.ignore = a.hoverignore,
r.ignore = r.hoverignore
}
function n() {
a.ignore = a.normalignore,
r.ignore = r.normalignore
}
zw.call(this);
var o = new qs({
z2: 2
}),
a = new om,
r = new qs;
this.add(o),
this.add(a),
this.add(r),
this.updatedata(t, e, !0),
this.on("emphasis", i).on("normal", n).on("mouseover", i).on("mouseout", n)
}
function zh(t, e, i, n, o, a, r) {
function s(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 l(t, e, i, n, o, a) {
for (var r = e ? number.max_value: 0, s = 0, l = t.length; s < l; s++) if ("center" !== t[s].position) {
var u = math.abs(t[s].y - n),
h = t[s].len,
c = t[s].len2,
d = u < o + h ? math.sqrt((o + h + c) * (o + h + c) - u * u) : math.abs(t[s].x - i);
e && d >= r && (d = r - 10),
!e && d <= r && (d = r + 10),
t[s].x = i + d * a,
r = d
}
}
t.sort(function(t, e) {
return t.y - e.y
});
for (var u, h = 0,
c = t.length,
d = [], f = [], p = 0; p < c; p++)(u = t[p].y - h) < 0 &&
function(e, i, n, o) {
for (var a = e; a < i; a++) if (t[a].y += n, a > e && a + 1 < i && t[a + 1].y > t[a].y + t[a].height) return void s(a, n / 2);
s(i - 1, n / 2)
} (p, c, -u),
h = t[p].y + t[p].height;
r - h < 0 && s(c - 1, h - r);
for (p = 0; p < c; p++) t[p].y >= i ? f.push(t[p]) : d.push(t[p]);
l(d, !1, e, i, n, o),
l(f, !0, e, i, n, o)
}
function bh(t, e, i, n, o, a) {
for (var r = [], s = [], l = 0; l < t.length; l++) t[l].x < e ? r.push(t[l]) : s.push(t[l]);
zh(s, e, i, n, 1, o, a),
zh(r, e, i, n, -1, o, a);
for (l = 0; l < t.length; l++) {
var u = t[l].linepoints;
if (u) {
var h = u[1][0] - u[2][0];
t[l].x < e ? u[2][0] = t[l].x + 3 : u[2][0] = t[l].x - 3,
u[1][1] = u[2][1] = t[l].y,
u[1][0] = u[2][0] + h
}
}
}
function vh() {
this.group = new zw
}
function gh(t, e, i) {
ha.call(this, t, e, i),
this.type = "value",
this.angle = 0,
this.name = "",
this.model
}
function fh(t, e, i) {
this._model = t,
this.dimensions = [],
this._indicatoraxes = f(t.getindicatormodels(),
function(t, e) {
var i = "indicator_" + e,
n = new gh(i, new ha);
return n.name = t.get("name"),
n.model = t,
t.axis = n,
this.dimensions.push(i),
n
},
this),
this.resize(t, i),
this.cx,
this.cy,
this.r,
this.r0,
this.startangle
}
function wh(t, e) {
return r({
show: e
},
t)
}
function hh(t) {
return y(t) || (t = [ + t, +t]),
t
}
function zh() {
mw.call(this)
}
function uh(t) {
this.name = t,
this.zoomlimit,
mw.call(this),
this._roamtransformable = new zh,
this._rawtransformable = new zh,
this._center,
this._zoom
}
function xh(t, e, i, n) {
var o = i.seriesmodel,
a = o ? o.coordinatesystem: null;
return a === this ? a[t](n) : null
}
function jh(t) {
for (var e, i = 0; i < t.length; i++) {
var n = t[i].getboundingrect(); (e = e || n.clone()).union(n)
}
return e
}
function yh(t, e) {
var i, n, o = t.svgxml;
try {
k(null != (n = (i = o && ns(o, {
ignoreviewbox: !0,
ignorerootclip: !0
}) || {}).root))
} catch(t) {
throw new error("invalid svg format\n" + t.message)
}
var a = i.width,
r = i.height,
s = i.viewboxrect;
if (e || (e = null == a || null == r ? n.getboundingrect() : new ue(0, 0, 0, 0), null != a && (e.width = a), null != r && (e.height = r)), s) {
var l = is(s, e.width, e.height),
u = n; (n = new zw).add(u),
u.scale = l.scale,
u.position = l.position
}
return n.setclippath(new am({
shape: e.plain()
})),
{
root: n,
boundingrect: e
}
}
function qh(t) {
return function(e, i) {
var n = [];
return d(kh(e),
function(o) {
var a = yc[o.type][t];
a && n.push(a(e, o, i))
}),
n
}
}
function kh(t) {
return pt.retrievemap(t) || []
}
function $h(t, e, i, n) {
uh.call(this, t),
this.map = e;
var o = xc.load(e, i);
this._namecoordmap = o.namecoordmap,
this._regionsmap = o.namecoordmap,
this._invertlongitute = null == n || n,
this.regions = o.regions,
this._rect = o.boundingrect
}
function jh(t, e, i, n) {
var o = i.geomodel,
a = i.seriesmodel,
r = o ? o.coordinatesystem: a ? a.coordinatesystem || (a.getreferringcomponents("geo")[0] || {}).coordinatesystem: null;
return r === this ? r[t](n) : null
}
function qh(t, e) {
var i = t.get("boundingcoords");
if (null != i) {
var n = i[0],
o = i[1];
isnan(n[0]) || isnan(n[1]) || isnan(o[0]) || isnan(o[1]) || this.setboundingrect(n[0], n[1], o[0] - n[0], o[1] - n[1])
}
var a, r = this.getboundingrect(),
s = t.get("layoutcenter"),
l = t.get("layoutsize"),
u = e.getwidth(),
h = e.getheight(),
c = r.width / r.height * this.aspectscale,
d = !1;
s && l && (s = [ro(s[0], u), ro(s[1], h)], l = ro(l, math.min(u, h)), isnan(s[0]) || isnan(s[1]) || isnan(l) || (d = !0));
if (d) {
var f = {};
c > 1 ? (f.width = l, f.height = l / c) : (f.height = l, f.width = l * c),
f.y = s[1] - f.height / 2,
f.x = s[0] - f.width / 2
} else(a = t.getboxlayoutparams()).aspect = c,
f = la(a, {
width: u,
height: h
});
this.setviewrect(f.x, f.y, f.width, f.height),
this.setcenter(t.get("center")),
this.setzoom(t.get("zoom"))
}
function tc(t, e) {
d(e.get("geocoord"),
function(e, i) {
t.addgeocoord(i, e)
})
}
function ec(t, e, i) {
oc(t)[e] = i
}
function ic(t, e, i) {
var n = oc(t);
n[e] === i && (n[e] = null)
}
function nc(t, e) {
return !! oc(t)[e]
}
function oc(t) {
return t[bc] || (t[bc] = {})
}
function ac(t) {
this.pointerchecker,
this._zr = t,
this._opt = {};
var e = m,
n = e(rc, this),
o = e(sc, this),
a = e(lc, this),
s = e(uc, this),
l = e(hc, this);
aw.call(this),
this.setpointerchecker = function(t) {
this.pointerchecker = t
},
this.enable = function(e, u) {
this.disable(),
this._opt = r(i(u) || {},
{
zoomonmousewheel: !0,
moveonmousemove: !0,
moveonmousewheel: !1,
preventdefaultmousemove: !0
}),
null == e && (e = !0),
!0 !== e && "move" !== e && "pan" !== e || (t.on("mousedown", n), t.on("mousemove", o), t.on("mouseup", a)),
!0 !== e && "scale" !== e && "zoom" !== e || (t.on("mousewheel", s), t.on("pinch", l))
},
this.disable = function() {
t.off("mousedown", n),
t.off("mousemove", o),
t.off("mouseup", a),
t.off("mousewheel", s),
t.off("pinch", l)
},
this.dispose = this.disable,
this.isdragging = function() {
return this._dragging
},
this.ispinching = function() {
return this._pinching
}
}
function rc(t) {
if (! (ct(t) || t.target && t.target.draggable)) {
var e = t.offsetx,
i = t.offsety;
this.pointerchecker && this.pointerchecker(t, e, i) && (this._x = e, this._y = i, this._dragging = !0)
}
}
function sc(t) {
if (!ct(t) && fc("moveonmousemove", t, this._opt) && this._dragging && "pinch" !== t.gestureevent && !nc(this._zr, "globalpan")) {
var e = t.offsetx,
i = t.offsety,
n = this._x,
o = this._y,
a = e - n,
r = i - o;
this._x = e,
this._y = i,
this._opt.preventdefaultmousemove && lw(t.event),
dc(this, "pan", "moveonmousemove", t, {
dx: a,
dy: r,
oldx: n,
oldy: o,
newx: e,
newy: i
})
}
}
function lc(t) {
ct(t) || (this._dragging = !1)
}
function uc(t) {
var e = fc("zoomonmousewheel", t, this._opt),
i = fc("moveonmousewheel", t, this._opt),
n = t.wheeldelta,
o = math.abs(n),
a = t.offsetx,
r = t.offsety;
if (0 !== n && (e || i)) {
if (e) {
var s = o > 3 ? 1.4 : o > 1 ? 1.2 : 1.1;
cc(this, "zoom", "zoomonmousewheel", t, {
scale: n > 0 ? s: 1 / s,
originx: a,
originy: r
})
}
if (i) {
var l = math.abs(n);
cc(this, "scrollmove", "moveonmousewheel", t, {
scrolldelta: (n > 0 ? 1 : -1) * (l > 3 ? .4 : l > 1 ? .15 : .05),
originx: a,
originy: r
})
}
}
}
function hc(t) {
nc(this._zr, "globalpan") || cc(this, "zoom", null, t, {
scale: t.pinchscale > 1 ? 1.1 : 1 / 1.1,
originx: t.pinchx,
originy: t.pinchy
})
}
function cc(t, e, i, n, o) {
t.pointerchecker && t.pointerchecker(n, o.originx, o.originy) && (lw(n.event), dc(t, e, i, n, o))
}
function dc(t, e, i, n, o) {
o.isavailablebehavior = m(fc, null, i, n),
t.trigger(e, o)
}
function fc(t, e, i) {
var n = i[t];
return ! t || n && (!_(n) || e.event[n + "key"])
}
function pc(t, e, i) {
var n = t.target,
o = n.position;
o[0] += e,
o[1] += i,
n.dirty()
}
function gc(t, e, i, n) {
var o = t.target,
a = t.zoomlimit,
r = o.position,
s = o.scale,
l = t.zoom = t.zoom || 1;
if (l *= e, a) {
var u = a.min || 0,
h = a.max || 1 / 0;
l = math.max(math.min(h, l), u)
}
var c = l / t.zoom;
t.zoom = l,
r[0] -= (i - r[0]) * (c - 1),
r[1] -= (n - r[1]) * (c - 1),
s[0] *= c,
s[1] *= c,
o.dirty()
}
function mc(t, e, i) {
var n = e.getcomponentbyelement(t.toptarget),
o = n && n.coordinatesystem;
return n && n !== i && !sc[n.maintype] && o && o.model !== i
}
function vc(t, e) {
var i = t.getitemstyle(),
n = t.get("areacolor");
return null != n && (i.fill = n),
i
}
function yc(t, e, i, n, o) {
i.off("click"),
i.off("mousedown"),
e.get("selectedmode") && (i.on("mousedown",
function() {
t._mousedownflag = !0
}), i.on("click",
function(a) {
if (t._mousedownflag) {
t._mousedownflag = !1;
for (var r = a.target; ! r.__regions;) r = r.parent;
if (r) {
var s = {
type: ("geo" === e.maintype ? "geo": "map") + "toggleselect",
batch: f(r.__regions,
function(t) {
return {
name: t.name,
from: o.uid
}
})
};
s[e.maintype + "id"] = e.id,
n.dispatchaction(s),
xc(e, i)
}
}
}))
}
function xc(t, e) {
e.eachchild(function(e) {
d(e.__regions,
function(i) {
e.trigger(t.isselected(i.name) ? "emphasis": "normal")
})
})
}
function _c(t, e) {
var i = new zw;
this.uid = no("ec_map_draw"),
this._controller = new ac(t.getzr()),
this._controllerhost = {
target: e ? i: null
},
this.group = i,
this._updategroup = e,
this._mousedownflag,
this._mapname,
this._initialized,
i.add(this._regionsgroup = new zw),
i.add(this._backgroundgroup = new zw)
}
function wc(t, e, i) {
var n = t.getzoom(),
o = t.getcenter(),
a = e.zoom,
r = t.datatopoint(o);
if (null != e.dx && null != e.dy) {
r[0] -= e.dx,
r[1] -= e.dy;
o = t.pointtodata(r);
t.setcenter(o)
}
if (null != a) {
if (i) {
var s = i.min || 0,
l = i.max || 1 / 0;
a = math.max(math.min(n * a, l), s) / n
}
t.scale[0] *= a,
t.scale[1] *= a;
var u = t.position,
h = (e.originx - u[0]) * (a - 1),
c = (e.originy - u[1]) * (a - 1);
u[0] -= h,
u[1] -= c,
t.updatetransform();
o = t.pointtodata(r);
t.setcenter(o),
t.setzoom(a * n)
}
return {
center: t.getcenter(),
zoom: t.getzoom()
}
}
function bc(t, e) {
var i = {};
return d(t,
function(t) {
t.each(t.mapdimension("value"),
function(e, n) {
var o = "ec-" + t.getname(n);
i[o] = i[o] || [],
isnan(e) || i[o].push(e)
})
}),
t[0].map(t[0].mapdimension("value"),
function(n, o) {
for (var a = "ec-" + t[0].getname(o), r = 0, s = 1 / 0, l = -1 / 0, u = i[a].length, h = 0; h < u; h++) s = math.min(s, i[a][h]),
l = math.max(l, i[a][h]),
r += i[a][h];
var c;
return c = "min" === e ? s: "max" === e ? l: "average" === e ? r / u: r,
0 === u ? nan: c
})
}
function sc(t) {
var e = t.maindata,
i = t.datas;
i || (i = {
main: e
},
t.datasattr = {
main: "data"
}),
t.datas = t.maindata = null,
cc(e, i, t),
mc(i,
function(i) {
mc(e.transferable_methods,
function(e) {
i.wrapmethod(e, v(mc, t))
})
}),
e.wrapmethod("cloneshallow", v(tc, t)),
mc(e.changable_methods,
function(i) {
e.wrapmethod(i, v(ic, t))
}),
k(i[e.datatype] === e)
}
function mc(t, e) {
if (dc(this)) {
var i = a({},
this[ic]);
i[this.datatype] = e,
cc(e, i, t)
} else lc(e, this.datatype, this[tc], t);
return e
}
function ic(t, e) {
return t.struct && t.struct.update(this),
e
}
function tc(t, e) {
return mc(e[ic],
function(i, n) {
i !== e && lc(i.cloneshallow(), n, e, t)
}),
e
}
function ac(t) {
var e = this[tc];
return null == t || null == e ? e: e[ic][t]
}
function dc(t) {
return t[tc] === t
}
function cc(t, e, i) {
t[ic] = {},
mc(e,
function(e, n) {
lc(e, n, t, i)
})
}
function lc(t, e, i, n) {
i[ic][e] = t,
t[tc] = i,
t.datatype = e,
n.struct && (t[n.structattr] = n.struct, n.struct[n.datasattr[e]] = t),
t.getlinkeddata = ac
}
function kc(t, e, i) {
this.root,
this.data,
this._nodes = [],
this.hostmodel = t,
this.levelmodels = f(e || [],
function(e) {
return new lo(e, t, t.ecmodel)
}),
this.leavesmodel = new lo(i || {},
t, t.ecmodel)
}
function pc(t, e) {
var i = e.children;
t.parentnode !== e && (i.push(t), t.parentnode = e)
}
function nc(t) {
t.hiernode = {
defaultancestor: null,
ancestor: t,
prelim: 0,
modifier: 0,
change: 0,
shift: 0,
i: 0,
thread: null
};
for (var e, i, n = [t]; e = n.pop();) if (i = e.children, e.isexpand && i.length) for (var o = i.length - 1; o >= 0; o--) {
var a = i[o];
a.hiernode = {
defaultancestor: null,
ancestor: a,
prelim: 0,
modifier: 0,
change: 0,
shift: 0,
i: o,
thread: null
},
n.push(a)
}
}
function oc(t, e) {
var i = t.isexpand ? t.children: [],
n = t.parentnode.children,
o = t.hiernode.i ? n[t.hiernode.i - 1] : null;
if (i.length) {
vc(t);
var a = (i[0].hiernode.prelim + i[i.length - 1].hiernode.prelim) / 2;
o ? (t.hiernode.prelim = o.hiernode.prelim + e(t, o), t.hiernode.modifier = t.hiernode.prelim - a) : t.hiernode.prelim = a
} else o && (t.hiernode.prelim = o.hiernode.prelim + e(t, o));
t.parentnode.hiernode.defaultancestor = gc(t, o, t.parentnode.hiernode.defaultancestor || n[0], e)
}
function ec(t) {
var e = t.hiernode.prelim + t.parentnode.hiernode.modifier;
t.setlayout({
x: e
},
!0),
t.hiernode.modifier += t.parentnode.hiernode.modifier
}
function rc(t) {
return arguments.length ? t: uc
}
function zc(t, e) {
var i = {};
return t -= math.pi / 2,
i.x = e * math.cos(t),
i.y = e * math.sin(t),
i
}
function bc(t, e) {
return la(t.getboxlayoutparams(), {
width: e.getwidth(),
height: e.getheight()
})
}
function vc(t) {
for (var e = t.children,
i = e.length,
n = 0,
o = 0; --i >= 0;) {
var a = e[i];
a.hiernode.prelim += n,
a.hiernode.modifier += n,
o += a.hiernode.change,
n += a.hiernode.shift + o
}
}
function gc(t, e, i, n) {
if (e) {
for (var o = t,
a = t,
r = a.parentnode.children[0], s = e, l = o.hiernode.modifier, u = a.hiernode.modifier, h = r.hiernode.modifier, c = s.hiernode.modifier; s = fc(s), a = wc(a), s && a;) {
o = fc(o),
r = wc(r),
o.hiernode.ancestor = t;
var d = s.hiernode.prelim + c - a.hiernode.prelim - u + n(s, a);
d > 0 && (zc(hc(s, t, i), t, d), u += d, l += d),
c += s.hiernode.modifier,
u += a.hiernode.modifier,
l += o.hiernode.modifier,
h += r.hiernode.modifier
}
s && !fc(o) && (o.hiernode.thread = s, o.hiernode.modifier += c - l),
a && !wc(r) && (r.hiernode.thread = a, r.hiernode.modifier += u - h, i = t)
}
return i
}
function fc(t) {
var e = t.children;
return e.length && t.isexpand ? e[e.length - 1] : t.hiernode.thread
}
function wc(t) {
var e = t.children;
return e.length && t.isexpand ? e[0] : t.hiernode.thread
}
function hc(t, e, i) {
return t.hiernode.ancestor.parentnode === e.parentnode ? t.hiernode.ancestor: i
}
function zc(t, e, i) {
var n = i / (e.hiernode.i - t.hiernode.i);
e.hiernode.change -= n,
e.hiernode.shift += i,
e.hiernode.modifier += i,
e.hiernode.prelim += i,
t.hiernode.change += n
}
function uc(t, e) {
return t.parentnode === e.parentnode ? 1 : 2
}
function xc(t, e) {
var i = t.getitemlayout(e);
return i && !isnan(i.x) && !isnan(i.y) && "none" !== t.getitemvisual(e, "symbol")
}
function jc(t, e, i) {
return i.itemmodel = e,
i.itemstyle = e.getmodel("itemstyle").getitemstyle(),
i.hoveritemstyle = e.getmodel("emphasis.itemstyle").getitemstyle(),
i.linestyle = e.getmodel("linestyle").getlinestyle(),
i.labelmodel = e.getmodel("label"),
i.hoverlabelmodel = e.getmodel("emphasis.label"),
!1 === t.isexpand && 0 !== t.children.length ? i.symbolinnercolor = i.itemstyle.fill: i.symbolinnercolor = "#fff",
i
}
function yc(t, e, i, n, o, a) {
var s = !i,
l = t.tree.getnodebydataindex(e),
a = jc(l, l.getmodel(), a),
u = t.tree.root,
h = l.parentnode === u ? l: l.parentnode || l,
c = t.getitemgraphicel(h.dataindex),
d = h.getlayout(),
f = c ? {
x: c.position[0],
y: c.position[1],
rawx: c.__radialoldrawx,
rawy: c.__radialoldrawy
}: d,
p = l.getlayout();
s ? (i = new mu(t, e, a)).attr("position", [f.x, f.y]) : i.updatedata(t, e, a),
i.__radialoldrawx = i.__radialrawx,
i.__radialoldrawy = i.__radialrawy,
i.__radialrawx = p.rawx,
i.__radialrawy = p.rawy,
n.add(i),
t.setitemgraphicel(e, i),
bo(i, {
position: [p.x, p.y]
},
o);
var g = i.getsymbolpath();
if ("radial" === a.layout) {
var m, v, y = u.children[0],
x = y.getlayout(),
_ = y.children.length;
if (p.x === x.x && !0 === l.isexpand) {
var w = {};
w.x = (y.children[0].getlayout().x + y.children[_ - 1].getlayout().x) / 2,
w.y = (y.children[0].getlayout().y + y.children[_ - 1].getlayout().y) / 2,
(m = math.atan2(w.y - x.y, w.x - x.x)) < 0 && (m = 2 * math.pi + m),
(v = w.x < x.x) && (m -= math.pi)
} else(m = math.atan2(p.y - x.y, p.x - x.x)) < 0 && (m = 2 * math.pi + m),
0 === l.children.length || 0 !== l.children.length && !1 === l.isexpand ? (v = p.x < x.x) && (m -= math.pi) : (v = p.x > x.x) || (m -= math.pi);
var b = v ? "left": "right";
g.setstyle({
textposition: b,
textrotation: -m,
textorigin: "center",
verticalalign: "middle"
})
}
if (l.parentnode && l.parentnode !== u) {
var s = i.__edge;
s || (s = i.__edge = new lm({
shape: kc(a, f, f),
style: r({
opacity: 0,
strokenoscale: !0
},
a.linestyle)
})),
bo(s, {
shape: kc(a, d, p),
style: {
opacity: 1
}
},
o),
n.add(s)
}
}
function qc(t, e, i, n, o, a) {
for (var r, s = t.tree.getnodebydataindex(e), l = t.tree.root, a = jc(s, s.getmodel(), a), u = s.parentnode === l ? s: s.parentnode || s; null == (r = u.getlayout());) u = u.parentnode === l ? u: u.parentnode || u;
bo(i, {
position: [r.x + 1, r.y + 1]
},
o,
function() {
n.remove(i),
t.setitemgraphicel(e, null)
}),
i.fadeout(null, {
keeplabel: !0
});
var h = i.__edge;
h && bo(h, {
shape: kc(a, r, r),
style: {
opacity: 0
}
},
o,
function() {
n.remove(h)
})
}
function kc(t, e, i) {
var n, o, a, r, s, l, u, h, c = t.orient;
if ("radial" === t.layout) {
s = e.rawx,
u = e.rawy,
l = i.rawx,
h = i.rawy;
var d = zc(s, u),
f = zc(s, u + (h - u) * t.curvature),
p = zc(l, h + (u - h) * t.curvature),
g = zc(l, h);
return {
x1: d.x,
y1: d.y,
x2: g.x,
y2: g.y,
cpx1: f.x,
cpy1: f.y,
cpx2: p.x,
cpy2: p.y
}
}
return s = e.x,
u = e.y,
l = i.x,
h = i.y,
"lr" !== c && "rl" !== c || (n = s + (l - s) * t.curvature, o = u, a = l + (s - l) * t.curvature, r = h),
"tb" !== c && "bt" !== c || (n = s, o = u + (h - u) * t.curvature, a = l, r = h + (u - h) * t.curvature),
{
x1: s,
y1: u,
x2: l,
y2: h,
cpx1: n,
cpy1: o,
cpx2: a,
cpy2: r
}
}
function $c(t, e, i) {
for (var n, o = [t], a = []; n = o.pop();) if (a.push(n), n.isexpand) {
var r = n.children;
if (r.length) for (var s = 0; s < r.length; s++) o.push(r[s])
}
for (; n = a.pop();) e(n, i)
}
function jc(t, e) {
for (var i, n = [t]; i = n.pop();) if (e(i), i.isexpand) {
var o = i.children;
if (o.length) for (var a = o.length - 1; a >= 0; a--) n.push(o[a])
}
}
function qc(t, e) {
var i = bc(t, e);
t.layoutinfo = i;
var n = t.get("layout"),
o = 0,
a = 0,
r = null;
"radial" === n ? (o = 2 * math.pi, a = math.min(i.height, i.width) / 2, r = rc(function(t, e) {
return (t.parentnode === e.parentnode ? 1 : 2) / t.depth
})) : (o = i.width, a = i.height, r = rc());
var s = t.getdata().tree.root,
l = s.children[0];
if (l) {
nc(s),
$c(l, oc, r),
s.hiernode.modifier = -l.hiernode.prelim,
jc(l, ec);
var u = l,
h = l,
c = l;
jc(l,
function(t) {
var e = t.getlayout().x;
e < u.getlayout().x && (u = t),
e > h.getlayout().x && (h = t),
t.depth > c.depth && (c = t)
});
var d = u === h ? 1 : r(u, h) / 2,
f = d - u.getlayout().x,
p = 0,
g = 0,
m = 0,
v = 0;
if ("radial" === n) p = o / (h.getlayout().x + d + f),
g = a / (c.depth - 1 || 1),
jc(l,
function(t) {
m = (t.getlayout().x + f) * p,
v = (t.depth - 1) * g;
var e = zc(m, v);
t.setlayout({
x: e.x,
y: e.y,
rawx: m,
rawy: v
},
!0)
});
else {
var y = t.getorient();
"rl" === y || "lr" === y ? (g = a / (h.getlayout().x + d + f), p = o / (c.depth - 1 || 1), jc(l,
function(t) {
v = (t.getlayout().x + f) * g,
m = "lr" === y ? (t.depth - 1) * p: o - (t.depth - 1) * p,
t.setlayout({
x: m,
y: v
},
!0)
})) : "tb" !== y && "bt" !== y || (p = o / (h.getlayout().x + d + f), g = a / (c.depth - 1 || 1), jc(l,
function(t) {
m = (t.getlayout().x + f) * p,
v = "tb" === y ? (t.depth - 1) * g: a - (t.depth - 1) * g,
t.setlayout({
x: m,
y: v
},
!0)
}))
}
}
}
function td(t, e, i) {
if (t && l(e, t.type) >= 0) {
var n = i.getdata().tree.root,
o = t.targetnode;
if ("string" == typeof o && (o = n.getnodebyid(o)), o && n.contains(o)) return {
node: o
};
var a = t.targetnodeid;
if (null != a && (o = n.getnodebyid(a))) return {
node: o
}
}
}
function ed(t) {
for (var e = []; t;)(t = t.parentnode) && e.push(t);
return e.reverse()
}
function id(t, e) {
return l(ed(t), e) >= 0
}
function nd(t, e) {
for (var i = []; t;) {
var n = t.dataindex;
i.push({
name: t.name,
dataindex: n,
value: e.getrawvalue(n)
}),
t = t.parentnode
}
return i.reverse(),
i
}
function od(t) {
var e = 0;
d(t.children,
function(t) {
od(t);
var i = t.value;
y(i) && (i = i[0]),
e += i
});
var i = t.value;
y(i) && (i = i[0]),
(null == i || isnan(i)) && (i = e),
i < 0 && (i = 0),
y(t.value) ? t.value[0] = i: t.value = i
}
function ad(t, e) {
var i = e.get("color");
if (i) {
var n;
return d(t = t || [],
function(t) {
var e = new lo(t),
i = e.get("color"); (e.get("itemstyle.color") || i && "none" !== i) && (n = !0)
}),
n || ((t[0] || (t[0] = {})).color = i.slice()),
t
}
}
function rd(t) {
this.group = new zw,
t.add(this.group)
}
function sd(t, e, i, n, o, a) {
var r = [[o ? t: t - dc, e], [t + i, e], [t + i, e + n], [o ? t: t - dc, e + n]];
return ! a && r.splice(2, 0, [t + i + dc, e + n / 2]),
!o && r.push([t, e + n / 2]),
r
}
function ld(t, e, i) {
t.eventdata = {
componenttype: "series",
componentsubtype: "treemap",
componentindex: e.componentindex,
seriesindex: e.componentindex,
seriesname: e.name,
seriestype: "treemap",
selftype: "breadcrumb",
nodedata: {
dataindex: i && i.dataindex,
name: i && i.name
},
treepathinfo: i && nd(i, e)
}
}
function ud() {
var t, e = [],
i = {};
return {
add: function(t, n, o, a, r) {
return _(a) && (r = a, a = 0),
!i[t.id] && (i[t.id] = 1, e.push({
el: t,
target: n,
time: o,
delay: a,
easing: r
}), !0)
},
done: function(e) {
return t = e,
this
},
start: function() {
for (var n = e.length,
o = 0,
a = e.length; o < a; o++) {
var r = e[o];
r.el.animateto(r.target, r.time, r.delay, r.easing,
function() {--n || (e.length = 0, i = {},
t && t())
})
}
return this
}
}
}
function hd(t, e, n, o, r, s, l, u, h, c) {
function d(t, e) {
w ? !t.invisible && s.push(t) : (e(), t.__tmwillvisible || (t.invisible = !1))
}
function f(e, n, o, a, r, s) {
var u = l.getmodel(),
h = t(t.getformattedlabel(l.dataindex, "normal", null, null, s ? "upperlabel": "label"), u.get("name"));
if (!s && v.isleafroot) {
var c = t.get("drilldownicon", !0);
h = c ? c + " " + h: h
}
var d = u.getmodel(s ? ec: nc),
f = u.getmodel(s ? rc: oc),
p = d.getshallow("show");
co(e, n, d, f, {
defaulttext: p ? h: null,
autocolor: o,
isrecttext: !0
}),
s && (e.textrect = i(s)),
e.truncate = p && d.get("ellipsis") ? {
outerwidth: a,
outerheight: r,
minchar: 2
}: null
}
function p(t, i, o, a) {
var s = null != s && n[t][s],
l = r[t];
return s ? (n[t][s] = null, g(l, s, t)) : w || ((s = new i({
z: cd(o, a)
})).__tmdepth = o, s.__tmstoragename = t, m(l, s, t)),
e[t][b] = s
}
function g(t, e, i) { (t[b] = {}).old = "nodegroup" === i ? e.position.slice() : a({},
e.shape)
}
function m(t, e, i) {
var n = t[b] = {},
a = l.parentnode;
if (a && (!o || "drilldown" === o.direction)) {
var s = 0,
u = 0,
h = r.background[a.getrawindex()]; ! o && h && h.old && (s = h.old.width, u = h.old.height),
n.old = "nodegroup" === i ? [0, u] : {
x: s,
y: u,
width: 0,
height: 0
}
}
n.fadein = "nodegroup" !== i
}
if (l) {
var v = l.getlayout();
if (v && v.isinview) {
var y = v.width,
x = v.height,
_ = v.borderwidth,
w = v.invisible,
b = l.getrawindex(),
s = u && u.getrawindex(),
m = l.viewchildren,
i = v.upperheight,
a = m && m.length,
d = l.getmodel("itemstyle"),
c = l.getmodel("emphasis.itemstyle"),
l = p("nodegroup", lc);
if (l) {
if (h.add(l), l.attr("position", [v.x || 0, v.y || 0]), l.__tmnodewidth = y, l.__tmnodeheight = x, v.isaboveviewroot) return l;
var k = p("background", kc, c, bc);
if (k &&
function(e, i, n) {
i.dataindex = l.dataindex,
i.seriesindex = t.seriesindex,
i.setshape({
x: 0,
y: 0,
width: y,
height: x
});
var o = l.getvisual("bordercolor", !0),
a = c.get("bordercolor");
d(i,
function() {
var t = fc(d);
t.fill = o;
var e = gc(c);
if (e.fill = a, n) {
var r = y - 2 * _;
f(t, e, o, r, i, {
x: _,
y: 0,
width: r,
height: i
})
} else t.text = e.text = null;
i.setstyle(t),
uo(i, e)
}),
e.add(i)
} (l, k, a && v.upperheight), !a) {
var p = p("content", kc, c, vc);
p &&
function(e, i) {
i.dataindex = l.dataindex,
i.seriesindex = t.seriesindex;
var n = math.max(y - 2 * _, 0),
o = math.max(x - 2 * _, 0);
i.culling = !0,
i.setshape({
x: _,
y: _,
width: n,
height: o
});
var a = l.getvisual("color", !0);
d(i,
function() {
var t = fc(d);
t.fill = a;
var e = gc(c);
f(t, e, a, n, o),
i.setstyle(t),
uo(i, e)
}),
e.add(i)
} (l, p)
}
return l
}
}
}
}
function cd(t, e) {
var i = t * zc + e;
return (i - 1) / i
}
function dd(t) {
var e = t.piecelist;
t.hasspecialvisual = !1,
d(e,
function(e, i) {
e.originindex = i,
null != e.visual && (t.hasspecialvisual = !0)
})
}
function fd(t) {
var e = t.categories,
i = t.visual,
n = t.categorymap = {};
if (zc(e,
function(t, e) {
n[t] = e
}), !y(i)) {
var o = [];
w(i) ? zc(i,
function(t, e) {
var i = n[e];
o[null != i ? i: xc] = t
}) : o[xc] = i,
i = bd(t, o)
}
for (var a = e.length - 1; a >= 0; a--) null == i[a] && (delete n[e[a]], e.pop())
}
function pd(t, e) {
var i = t.visual,
n = [];
w(i) ? zc(i,
function(t) {
n.push(t)
}) : null != i && n.push(i);
var o = {
color: 1,
symbol: 1
};
e || 1 !== n.length || o.hasownproperty(t.type) || (n[1] = n[0]),
bd(t, n)
}
function gd(t) {
return {
applyvisual: function(e, i, n) {
e = this.mapvaluetovisual(e),
n("color", t(i("color"), e))
},
_domap: _d([0, 1])
}
}
function md(t) {
var e = this.option.visual;
return e[math.round(eo(t, [0, 1], [0, e.length - 1], !0))] || {}
}
function vd(t) {
return function(e, i, n) {
n(t, this.mapvaluetovisual(e))
}
}
function yd(t) {
var e = this.option.visual;
return e[this.option.loop && t !== xc ? t % e.length: t]
}
function xd() {
return this.option.visual[0]
}
function _d(t) {
return {
linear: function(e) {
return eo(e, t, this.option.visual, !0)
},
category: yd,
piecewise: function(e, i) {
var n = wd.call(this, i);
return null == n && (n = eo(e, t, this.option.visual, !0)),
n
},
fixed: xd
}
}
function wd(t) {
var e = this.option,
i = e.piecelist;
if (e.hasspecialvisual) {
var n = i[jc.findpieceindex(t, i)];
if (n && n.visual) return n.visual[this.type]
}
}
function bd(t, e) {
return t.visual = e,
"color" === t.type && (t.parsedvisual = f(e,
function(t) {
return zt(t)
})),
e
}
function sd(t, e, i) {
return t ? e <= i: e < i
}
function md(t, e, i, n, o, a) {
var r = t.getmodel(),
s = t.getlayout();
if (s && !s.invisible && s.isinview) {
var l, u = t.getmodel($c),
h = id(u, e, i[t.depth], n),
c = u.get("bordercolor"),
f = u.get("bordercolorsaturation");
null != f && (c = ad(f, l = td(h))),
t.setvisual("bordercolor", c);
var p = t.viewchildren;
if (p && p.length) {
var g = cd(t, r, s, u, h, p);
d(p,
function(t, e) { (t.depth >= o.length || t === o[t.depth]) && md(t, kd(r, h, t, e, g, a), i, n, o, a)
})
} else l = td(h),
t.setvisual("color", l)
}
}
function id(t, e, i, n) {
var o = a({},
e);
return d(["color", "coloralpha", "colorsaturation"],
function(a) {
var r = t.get(a, !0);
null == r && i && (r = i[a]),
null == r && (r = e[a]),
null == r && (r = n.get(a)),
null != r && (o[a] = r)
}),
o
}
function td(t) {
var e = dd(t, "color");
if (e) {
var i = dd(t, "coloralpha"),
n = dd(t, "colorsaturation");
return n && (e = zt(e, null, null, n)),
i && (e = ut(e, i)),
e
}
}
function ad(t, e) {
return null != e ? zt(e, null, null, t) : null
}
function dd(t, e) {
var i = t[e];
if (null != i && "none" !== i) return i
}
function cd(t, e, i, n, o, a) {
if (a && a.length) {
var r = ld(e, "color") || null != o.color && "none" !== o.color && (ld(e, "coloralpha") || ld(e, "colorsaturation"));
if (r) {
var s = e.get("visualmin"),
l = e.get("visualmax"),
u = i.dataextent.slice();
null != s && s < u[0] && (u[0] = s),
null != l && l > u[1] && (u[1] = l);
var h = e.get("colormappingby"),
c = {
type: r.name,
dataextent: u,
visual: r.range
};
"color" !== c.type || "index" !== h && "id" !== h ? c.mappingmethod = "linear": (c.mappingmethod = "category", c.loop = !0);
var d = new jc(c);
return d.__drcolormappingby = h,
d
}
}
}
function ld(t, e) {
var i = t.get(e);
return kc(i) && i.length ? {
name: e,
range: i
}: null
}
function kd(t, e, i, n, o, r) {
var s = a({},
e);
if (o) {
var l = o.type,
u = "color" === l && o.__drcolormappingby,
h = "index" === u ? n: "id" === u ? r.mapidtoindex(i.getid()) : i.getvalue(t.get("visualdimension"));
s[l] = o.mapvaluetovisual(h)
}
return s
}
function pd(t, e, i, n) {
var o, a;
if (!t.isremoved()) {
var r = t.getlayout();
o = r.width,
a = r.height;
var s = (f = t.getmodel()).get(nl),
l = f.get(ol) / 2,
u = wd(f),
h = math.max(s, u),
c = s - l,
d = h - l,
f = t.getmodel();
t.setlayout({
borderwidth: s,
upperheight: h,
upperlabelheight: u
},
!0);
var p = (o = qc(o - 2 * c, 0)) * (a = qc(a - c - d, 0)),
g = nd(t, f, p, e, i, n);
if (g.length) {
var m = {
x: c,
y: d,
width: o,
height: a
},
v = tl(o, a),
y = 1 / 0,
x = [];
x.area = 0;
for (var _ = 0,
w = g.length; _ < w;) {
var b = g[_];
x.push(b),
x.area += b.getlayout().area;
var s = zd(x, v, e.squareratio);
s <= y ? (_++, y = s) : (x.area -= x.pop().getlayout().area, bd(x, v, m, l, !1), v = tl(m.width, m.height), x.length = x.area = 0, y = 1 / 0)
}
if (x.length && bd(x, v, m, l, !0), !i) {
var m = f.get("childrenvisiblemin");
null != m && p < m && (i = !0)
}
for (var _ = 0,
w = g.length; _ < w; _++) pd(g[_], e, i, n + 1)
}
}
}
function nd(t, e, i, n, o, a) {
var r = t.children || [],
s = n.sort;
"asc" !== s && "desc" !== s && (s = null);
var l = null != n.leafdepth && n.leafdepth <= a;
if (o && !l) return t.viewchildren = [];
ed(r = g(r,
function(t) {
return ! t.isremoved()
}), s);
var u = rd(e, r, s);
if (0 === u.sum) return t.viewchildren = [];
if (u.sum = od(e, i, u.sum, s, r), 0 === u.sum) return t.viewchildren = [];
for (var h = 0,
c = r.length; h < c; h++) {
var d = r[h].getvalue() / u.sum * i;
r[h].setlayout({
area: d
})
}
return l && (r.length && t.setlayout({
isleafroot: !0
},
!0), r.length = 0),
t.viewchildren = r,
t.setlayout({
dataextent: u.dataextent
},
!0),
r
}
function od(t, e, i, n, o) {
if (!n) return i;
for (var a = t.get("visiblemin"), r = o.length, s = r, l = r - 1; l >= 0; l--) {
var u = o["asc" === n ? r - l - 1 : l].getvalue();
u / i * e < a && (s = l, i -= u)
}
return "asc" === n ? o.splice(0, r - s) : o.splice(s, r - s),
i
}
function ed(t, e) {
return e && t.sort(function(t, i) {
var n = "asc" === e ? t.getvalue() - i.getvalue() : i.getvalue() - t.getvalue();
return 0 === n ? "asc" === e ? t.dataindex - i.dataindex: i.dataindex - t.dataindex: n
}),
t
}
function rd(t, e, i) {
for (var n = 0,
o = 0,
a = e.length; o < a; o++) n += e[o].getvalue();
var r = t.get("visualdimension");
if (e && e.length) if ("value" === r && i) s = [e[e.length - 1].getvalue(), e[0].getvalue()],
"asc" === i && s.reverse();
else {
var s = [1 / 0, -1 / 0];
il(e,
function(t) {
var e = t.getvalue(r);
e < s[0] && (s[0] = e),
e > s[1] && (s[1] = e)
})
} else s = [nan, nan];
return {
sum: n,
dataextent: s
}
}
function zd(t, e, i) {
for (var n, o = 0,
a = 1 / 0,
r = 0,
s = t.length; r < s; r++)(n = t[r].getlayout().area) && (n < a && (a = n), n > o && (o = n));
var l = t.area * t.area,
u = e * e * i;
return l ? qc(u * o / l, l / (u * a)) : 1 / 0
}
function bd(t, e, i, n, o) {
var a = e === i.width ? 0 : 1,
r = 1 - a,
s = ["x", "y"],
l = ["width", "height"],
u = i[s[a]],
h = e ? t.area / e: 0; (o || h > i[l[r]]) && (h = i[l[r]]);
for (var c = 0,
d = t.length; c < d; c++) {
var f = t[c],
p = {},
g = h ? f.getlayout().area / h: 0,
m = p[l[r]] = qc(h - 2 * n, 0),
v = i[s[a]] + i[l[a]] - u,
y = c === d - 1 || v < g ? v: g,
x = p[l[a]] = qc(y - 2 * n, 0);
p[s[r]] = i[s[r]] + tl(n, m / 2),
p[s[a]] = u + tl(n, x / 2),
u += y,
f.setlayout(p, !0)
}
i[s[r]] += h,
i[l[r]] -= h
}
function vd(t, e, i, n, o) {
var a = (e || {}).node,
r = [n, o];
if (!a || a === i) return r;
for (var s, l = n * o,
u = l * t.option.zoomtonoderatio; s = a.parentnode;) {
for (var h = 0,
c = s.children,
d = 0,
f = c.length; d < f; d++) h += c[d].getvalue();
var p = a.getvalue();
if (0 === p) return r;
u *= h / p;
var g = s.getmodel(),
m = g.get(nl); (u += 4 * m * m + (3 * m + math.max(m, wd(g))) * math.pow(u, .5)) > km && (u = km),
a = s
}
u < l && (u = l);
var v = math.pow(u / l, .5);
return [n * v, o * v]
}
function gd(t, e, i) {
if (e) return {
x: e.x,
y: e.y
};
var n = {
x: 0,
y: 0
};
if (!i) return n;
var o = i.node,
a = o.getlayout();
if (!a) return n;
for (var r = [a.width / 2, a.height / 2], s = o; s;) {
var l = s.getlayout();
r[0] += l.x,
r[1] += l.y,
s = s.parentnode
}
return {
x: t.width / 2 - r[0],
y: t.height / 2 - r[1]
}
}
function fd(t, e, i, n, o) {
var a = t.getlayout(),
r = i[o],
s = r && r === t;
if (! (r && !s || o === i.length && t !== n)) {
t.setlayout({
isinview: !0,
invisible: !s && !e.intersect(a),
isaboveviewroot: s
},
!0);
var l = new ue(e.x - a.x, e.y - a.y, e.width, e.height);
il(t.viewchildren || [],
function(t) {
fd(t, l, i, n, o + 1)
})
}
}
function wd(t) {
return t.get(al) ? t.get(rl) : 0
}
function hd(t) {
return "_ec_" + t
}
function zd(t, e) {
this.id = null == t ? "": t,
this.inedges = [],
this.outedges = [],
this.edges = [],
this.hostgraph,
this.dataindex = null == e ? -1 : e
}
function ud(t, e, i) {
this.node1 = t,
this.node2 = e,
this.dataindex = null == i ? -1 : i
}
function xd(t) {
return isnan( + t.cpx1) || isnan( + t.cpy1)
}
function jd(t) {
return "_" + t + "type"
}
function yd(t, e, i) {
var n = e.getitemvisual(i, "color"),
o = e.getitemvisual(i, t),
a = e.getitemvisual(i, t + "size");
if (o && "none" !== o) {
y(a) || (a = [a, a]);
var r = xl(o, -a[0] / 2, -a[1] / 2, a[0], a[1], n);
return r.name = t,
r
}
}
function qd(t) {
var e = new gl({
name: "line"
});
return kd(e.shape, t),
e
}
function kd(t, e) {
var i = e[0],
n = e[1],
o = e[2];
t.x1 = i[0],
t.y1 = i[1],
t.x2 = n[0],
t.y2 = n[1],
t.percent = 1,
o ? (t.cpx1 = o[0], t.cpy1 = o[1]) : (t.cpx1 = nan, t.cpy1 = nan)
}
function $d(t, e, i) {
zw.call(this),
this._createline(t, e, i)
}
function jd(t) {
this._ctor = t || $d,
this.group = new zw
}
function qd(t, e, i, n) {
if (of(e.getitemlayout(i))) {
var o = new t._ctor(e, i, n);
e.setitemgraphicel(i, o),
t.group.add(o)
}
}
function tf(t, e, i, n, o, a) {
var r = e.getitemgraphicel(n);
of(i.getitemlayout(o)) ? (r ? r.updatedata(i, o, a) : r = new t._ctor(i, o, a), i.setitemgraphicel(o, r), t.group.add(r)) : t.group.remove(r)
}
function ef(t) {
var e = t.hostmodel;
return {
linestyle: e.getmodel("linestyle").getlinestyle(),
hoverlinestyle: e.getmodel("emphasis.linestyle").getlinestyle(),
labelmodel: e.getmodel("label"),
hoverlabelmodel: e.getmodel("emphasis.label")
}
}
function nf(t) {
return isnan(t[0]) || isnan(t[1])
}
function of(t) {
return ! nf(t[0]) && !nf(t[1])
}
function af(t, e, i) {
for (var n, o = t[0], a = t[1], r = t[2], s = 1 / 0, l = i * i, u = .1, h = .1; h <= .9; h += .1) xl[0] = bl(o[0], a[0], r[0], h),
xl[1] = bl(o[1], a[1], r[1], h),
(f = ml(sl(xl, e) - l)) < s && (s = f, n = h);
for (var c = 0; c < 32; c++) {
var d = n + u;
_l[0] = bl(o[0], a[0], r[0], n),
_l[1] = bl(o[1], a[1], r[1], n),
wl[0] = bl(o[0], a[0], r[0], d),
wl[1] = bl(o[1], a[1], r[1], d);
var f = sl(_l, e) - l;
if (ml(f) < .01) break;
var p = sl(wl, e) - l;
u /= 2,
f < 0 ? p >= 0 ? n += u: n -= u: p >= 0 ? n -= u: n += u
}
return n
}
function rf(t, e) {
return t.getvisual("opacity") || t.getmodel().get(e)
}
function sf(t, e, i) {
var n = t.getgraphicel(),
o = rf(t, e);
null != i && (null == o && (o = 1), o *= i),
n.downplay && n.downplay(),
n.traverse(function(t) {
"group" !== t.type && t.setstyle("opacity", o)
})
}
function lf(t, e) {
var i = rf(t, e),
n = t.getgraphicel();
n.highlight && n.highlight(),
n.traverse(function(t) {
"group" !== t.type && t.setstyle("opacity", i)
})
}
function uf(t) {
return t instanceof array || (t = [t, t]),
t
}
function hf(t) {
var e = t.coordinatesystem;
if (!e || "view" === e.type) {
var i = t.getgraph();
i.eachnode(function(t) {
var e = t.getmodel();
t.setlayout([ + e.get("x"), +e.get("y")])
}),
cf(i)
}
}
function cf(t) {
t.eachedge(function(t) {
var e = t.getmodel().get("linestyle.curveness") || 0,
i = f(t.node1.getlayout()),
n = f(t.node2.getlayout()),
o = [i, n]; + e && o.push([(i[0] + n[0]) / 2 - (i[1] - n[1]) * e, (i[1] + n[1]) / 2 - (n[0] - i[0]) * e]),
t.setlayout(o)
})
}
function df(t) {
var e = t.coordinatesystem;
if (!e || "view" === e.type) {
var i = e.getboundingrect(),
n = t.getdata(),
o = n.graph,
a = 0,
r = n.getsum("value"),
s = 2 * math.pi / (r || n.count()),
l = i.width / 2 + i.x,
u = i.height / 2 + i.y,
h = math.min(i.width, i.height) / 2;
o.eachnode(function(t) {
var e = t.getvalue("value");
a += s * (r ? e: 1) / 2,
t.setlayout([h * math.cos(a) + l, h * math.sin(a) + u]),
a += s * (r ? e: 1) / 2
}),
n.setlayout({
cx: l,
cy: u
}),
o.eachedge(function(t) {
var e, i = t.getmodel().get("linestyle.curveness") || 0,
n = f(t.node1.getlayout()),
o = f(t.node2.getlayout()),
a = (n[0] + o[0]) / 2,
r = (n[1] + o[1]) / 2; + i && (e = [l * (i *= 3) + a * (1 - i), u * i + r * (1 - i)]),
t.setlayout([n, o, e])
})
}
}
function ff(t, e, i) {
for (var n = i.rect,
o = n.width,
a = n.height,
r = [n.x + o / 2, n.y + a / 2], s = null == i.gravity ? .1 : i.gravity, l = 0; l < t.length; l++) {
var u = t[l];
u.p || (u.p = v(o * (math.random() - .5) + r[0], a * (math.random() - .5) + r[1])),
u.pp = f(u.p),
u.edges = null
}
var h = .6;
return {
warmup: function() {
h = .5
},
setfixed: function(e) {
t[e].fixed = !0
},
setunfixed: function(e) {
t[e].fixed = !1
},
step: function(i) {
for (var n = [], o = t.length, a = 0; a < e.length; a++) {
var l = e[a],
u = l.n1;
u(n, (p = l.n2).p, u.p);
var c = x(n) - l.d,
d = p.w / (u.w + p.w);
isnan(d) && (d = 0),
q(n, n),
!u.fixed && dl(u.p, u.p, n, d * c * h),
!p.fixed && dl(p.p, p.p, n, -(1 - d) * c * h)
}
for (a = 0; a < o; a++)(v = t[a]).fixed || (u(n, r, v.p), dl(v.p, v.p, n, s * h));
for (a = 0; a < o; a++) for (var u = t[a], f = a + 1; f < o; f++) {
var p = t[f];
u(n, p.p, u.p),
0 === (c = x(n)) && (w(n, math.random() - .5, math.random() - .5), c = 1);
var g = (u.rep + p.rep) / c / c; ! u.fixed && dl(u.pp, u.pp, n, g),
!p.fixed && dl(p.pp, p.pp, n, -g)
}
for (var m = [], a = 0; a < o; a++) {
var v = t[a];
v.fixed || (u(m, v.p, v.pp), dl(v.p, v.p, m, h), g(v.pp, v.p))
}
h *= .992,
i && i(t, e, h < .01)
}
}
}
function pf(t, e, i) {
var n = t.getboxlayoutparams();
return n.aspect = i,
la(n, {
width: e.getwidth(),
height: e.getheight()
})
}
function gf(t, e) {
var i = t.get("center"),
n = e.getwidth(),
o = e.getheight(),
a = math.min(n, o);
return {
cx: ro(i[0], e.getwidth()),
cy: ro(i[1], e.getheight()),
r: ro(t.get("radius"), a / 2)
}
}
function mf(t, e) {
return e && ("string" == typeof e ? t = e.replace("{value}", null != t ? t: "") : "function" == typeof e && (t = e(t))),
t
}
function vf(t, e) {
function i() {
a.ignore = a.hoverignore,
r.ignore = r.hoverignore
}
function n() {
a.ignore = a.normalignore,
r.ignore = r.normalignore
}
zw.call(this);
var o = new nm,
a = new om,
r = new qs;
this.add(o),
this.add(a),
this.add(r),
this.updatedata(t, e, !0),
this.on("emphasis", i).on("normal", n).on("mouseover", i).on("mouseout", n)
}
function yf(t, e) {
return la(t.getboxlayoutparams(), {
width: e.getwidth(),
height: e.getheight()
})
}
function xf(t, e) {
for (var i = t.mapdimension("value"), n = t.maparray(i,
function(t) {
return t
}), o = [], a = "ascending" === e, r = 0, s = t.count(); r < s; r++) o[r] = r;
return "function" == typeof e ? o.sort(e) : "none" !== e && o.sort(function(t, e) {
return a ? n[t] - n[e] : n[e] - n[t]
}),
o
}
function _f(t) {
t.each(function(e) {
var i, n, o, a, r = t.getitemmodel(e),
s = r.getmodel("label").get("position"),
l = r.getmodel("labelline"),
u = t.getitemlayout(e),
h = u.points,
c = "inner" === s || "inside" === s || "center" === s;
if (c) i = "center",
a = [[n = (h[0][0] + h[1][0] + h[2][0] + h[3][0]) / 4, o = (h[0][1] + h[1][1] + h[2][1] + h[3][1]) / 4], [n, o]];
else {
var d, f, p, g = l.get("length");
"left" === s ? (d = (h[3][0] + h[0][0]) / 2, f = (h[3][1] + h[0][1]) / 2, n = (p = d - g) - 5, i = "right") : (d = (h[1][0] + h[2][0]) / 2, f = (h[1][1] + h[2][1]) / 2, n = (p = d + g) + 5, i = "left");
var m = f;
a = [[d, f], [p, m]],
o = m
}
u.label = {
linepoints: a,
x: n,
y: o,
verticalalign: "middle",
textalign: i,
inside: c
}
})
}
function wf(t) {
if (!t.parallel) {
var e = !1;
d(t.series,
function(t) {
t && "parallel" === t.type && (e = !0)
}),
e && (t.parallel = [{}])
}
}
function bf(t) {
d(di(t.parallelaxis),
function(e) {
if (w(e)) {
var i = e.parallelindex || 0,
o = di(t.parallel)[i];
o && o.parallelaxisdefault && n(e, o.parallelaxisdefault, !1)
}
})
}
function sf(t, e) {
var i = t[e] - t[1 - e];
return {
span: math.abs(i),
sign: i > 0 ? -1 : i < 0 ? 1 : e ? -1 : 1
}
}
function mf(t, e) {
return math.min(e[1], math.max(e[0], t))
}
function if(t, e, i) {
this._axesmap = r(),
this._axeslayout = {},
this.dimensions = t.dimensions,
this._rect,
this._model = t,
this._init(t, e, i)
}
function tf(t, e) {
return zl(bl(t, e[0]), e[1])
}
function af(t, e) {
var i = e.layoutlength / (e.axiscount - 1);
return {
position: i * t,
axisnameavailablewidth: i,
axislabelshow: !0
}
}
function df(t, e) {
var i, n, o = e.layoutlength,
a = e.axisexpandwidth,
r = e.axiscount,
s = e.axiscollapsewidth,
l = e.wininnerindices,
u = s,
h = !1;
return t < l[0] ? (i = t * s, n = s) : t <= l[1] ? (i = e.axisexpandwindow0pos + t * a - e.axisexpandwindow[0], u = a, h = !0) : (i = o - (r - 1 - t) * s, n = s),
{
position: i,
axisnameavailablewidth: u,
axislabelshow: h,
nametruncatemaxwidth: n
}
}
function cf(t) {
aw.call(this),
this._zr = t,
this.group = new zw,
this._brushtype,
this._brushoption,
this._panels,
this._track = [],
this._dragging,
this._covers = [],
this._creatingcover,
this._creatingpanel,
this._enableglobalpan,
this._uid = "brushcontroller_" + ok++,
this._handlers = {},
xl(ak,
function(t, e) {
this._handlers[e] = m(t, this)
},
this)
}
function lf(t, e) {
var o = t._zr;
t._enableglobalpan || ec(o, tk, t._uid),
xl(t._handlers,
function(t, e) {
o.on(e, t)
}),
t._brushtype = e.brushtype,
t._brushoption = n(i(nk), e, !0)
}
function kf(t) {
var e = t._zr;
ic(e, tk, t._uid),
xl(t._handlers,
function(t, i) {
e.off(i, t)
}),
t._brushtype = t._brushoption = null
}
function pf(t, e) {
var i = rk[e.brushtype].createcover(t, e);
return i.__brushoption = e,
ef(i, e),
t.group.add(i),
i
}
function nf(t, e) {
var i = zf(e);
return i.endcreating && (i.endcreating(t, e), ef(e, e.__brushoption)),
e
}
function of(t, e) {
var i = e.__brushoption;
zf(e).updatecovershape(t, e, i.range, i)
}
function ef(t, e) {
var i = e.z;
null == i && (i = $l),
t.traverse(function(t) {
t.z = i,
t.z2 = i
})
}
function rf(t, e) {
zf(e).updatecommon(t, e),
of(t, e)
}
function zf(t) {
return rk[t.__brushoption.brushtype]
}
function bf(t, e, i) {
var n = t._panels;
if (!n) return ! 0;
var o, a = t._transform;
return xl(n,
function(t) {
t.istargetbycursor(e, i, a) && (o = t)
}),
o
}
function vf(t, e) {
var i = t._panels;
if (!i) return ! 0;
var n = e.__brushoption.panelid;
return null == n || i[n]
}
function gf(t) {
var e = t._covers,
i = e.length;
return xl(e,
function(e) {
t.group.remove(e)
},
t),
e.length = 0,
!!i
}
function ff(t, e) {
var n = jl(t._covers,
function(t) {
var e = t.__brushoption,
n = i(e.range);
return {
brushtype: e.brushtype,
panelid: e.panelid,
range: n
}
});
t.trigger("brush", n, {
isend: !!e.isend,
removeonclick: !!e.removeonclick
})
}
function wf(t) {
var e = t._track;
if (!e.length) return ! 1;
var i = e[e.length - 1],
n = e[0],
o = i[0] - n[0],
a = i[1] - n[1];
return kl(o * o + a * a, .5) > jl
}
function hf(t) {
var e = t.length - 1;
return e < 0 && (e = 0),
[t[0], t[e]]
}
function zf(t, e, i, n) {
var o = new zw;
return o.add(new am({
name: "main",
style: yf(i),
silent: !0,
draggable: !0,
cursor: "move",
drift: ul(t, e, o, "nswe"),
ondragend: ul(ff, e, {
isend: !0
})
})),
xl(n,
function(i) {
o.add(new am({
name: i,
style: {
opacity: 0
},
draggable: !0,
silent: !0,
invisible: !0,
drift: ul(t, e, o, i),
ondragend: ul(ff, e, {
isend: !0
})
}))
}),
o
}
function uf(t, e, i, n) {
var o = n.brushstyle.linewidth || 0,
a = ql(o, ql),
r = i[0][0],
s = i[1][0],
l = r - o / 2,
u = s - o / 2,
h = i[0][1],
c = i[1][1],
d = h - a + o / 2,
f = c - a + o / 2,
p = h - r,
g = c - s,
m = p + o,
v = g + o;
jf(t, e, "main", r, s, p, g),
n.transformable && (jf(t, e, "w", l, u, a, v), jf(t, e, "e", d, u, a, v), jf(t, e, "n", l, u, m, a), jf(t, e, "s", l, f, m, a), jf(t, e, "nw", l, u, a, a), jf(t, e, "ne", d, u, a, a), jf(t, e, "sw", l, f, a, a), jf(t, e, "se", d, f, a, a))
}
function xf(t, e) {
var i = e.__brushoption,
n = i.transformable,
o = e.childat(0);
o.usestyle(yf(i)),
o.attr({
silent: !n,
cursor: n ? "move": "default"
}),
xl(["w", "e", "n", "s", "se", "sw", "ne", "nw"],
function(i) {
var o = e.childofname(i),
a = $f(t, i);
o && o.attr({
silent: !n,
invisible: !n,
cursor: n ? ik[a] + "-resize": null
})
})
}
function jf(t, e, i, n, o, a, r) {
var s = e.childofname(i);
s && s.setshape(ip(ep(t, e, [[n, o], [n + a, o + r]])))
}
function yf(t) {
return r({
strokenoscale: !0
},
t.brushstyle)
}
function qf(t, e, i, n) {
var o = [yl(t, i), yl(e, n)],
a = [ql(t, i), ql(e, n)];
return [[o[0], a[0]], [o[1], a[1]]]
}
function kf(t) {
return mo(t.group)
}
function $f(t, e) {
if (e.length > 1) return ("e" === (n = [$f(t, (e = e.split(""))[0]), $f(t, e[1])])[0] || "w" === n[0]) && n.reverse(),
n.join("");
var i = {
left: "w",
right: "e",
top: "n",
bottom: "s"
},
n = to({
w: "left",
e: "right",
n: "top",
s: "bottom"
} [e], kf(t));
return i[n]
}
function jf(t, e, i, n, o, a, r, s) {
var l = n.__brushoption,
u = t(l.range),
h = tp(i, a, r);
xl(o.split(""),
function(t) {
var e = ek[t];
u[e[0]][e[1]] += h[e[0]]
}),
l.range = e(qf(u[0][0], u[1][0], u[0][1], u[1][1])),
rf(i, n),
ff(i, {
isend: !1
})
}
function qf(t, e, i, n, o) {
var a = e.__brushoption.range,
r = tp(t, i, n);
xl(a,
function(t) {
t[0] += r[0],
t[1] += r[1]
}),
rf(t, e),
ff(t, {
isend: !1
})
}
function tp(t, e, i) {
var n = t.group,
o = n.transformcoordtolocal(e, i),
a = n.transformcoordtolocal(0, 0);
return [o[0] - a[0], o[1] - a[1]]
}
function ep(t, e, n) {
var o = vf(t, e);
return o && !0 !== o ? o.clippath(n, t._transform) : i(n)
}
function ip(t) {
var e = yl(t[0][0], t[1][0]),
i = yl(t[0][1], t[1][1]);
return {
x: e,
y: i,
width: ql(t[0][0], t[1][0]) - e,
height: ql(t[0][1], t[1][1]) - i
}
}
function np(t, e, i) {
if (t._brushtype) {
var n = t._zr,
o = t._covers,
a = bf(t, e, i);
if (!t._dragging) for (var r = 0; r < o.length; r++) {
var s = o[r].__brushoption;
if (a && (!0 === a || s.panelid === a.panelid) && rk[s.brushtype].contain(o[r], i[0], i[1])) return
}
a && n.setcursorstyle("crosshair")
}
}
function op(t) {
var e = t.event;
e.preventdefault && e.preventdefault()
}
function ap(t, e, i) {
return t.childofname("main").contain(e, i)
}
function rp(t, e, n, o) {
var a, r = t._creatingcover,
s = t._creatingpanel,
l = t._brushoption;
if (t._track.push(n.slice()), wf(t) || r) {
if (s && !r) {
"single" === l.brushmode && gf(t);
var u = i(l);
u.brushtype = sp(u.brushtype, s),
u.panelid = !0 === s ? null: s.panelid,
r = t._creatingcover = pf(t, u),
t._covers.push(r)
}
if (r) {
var h = rk[sp(t._brushtype, s)];
r.__brushoption.range = h.getcreatingrange(ep(t, r, t._track)),
o && (nf(t, r), h.updatecommon(t, r)),
of(t, r),
a = {
isend: o
}
}
} else o && "single" === l.brushmode && l.removeonclick && bf(t, e, n) && gf(t) && (a = {
isend: o,
removeonclick: !0
});
return a
}
function sp(t, e) {
return "auto" === t ? e.defaultbrushtype: t
}
function lp(t) {
if (this._dragging) {
op(t);
var e = rp(this, t, this.group.transformcoordtolocal(t.offsetx, t.offsety), !0);
this._dragging = !1,
this._track = [],
this._creatingcover = null,
e && ff(this, e)
}
}
function up(t) {
return {
createcover: function(e, i) {
return zf(ul(jf,
function(e) {
var i = [e, [0, 100]];
return t && i.reverse(),
i
},
function(e) {
return e[t]
}), e, i, [["w", "e"], ["n", "s"]][t])
},
getcreatingrange: function(e) {
var i = hf(e);
return [yl(i[0][t], i[1][t]), ql(i[0][t], i[1][t])]
},
updatecovershape: function(e, i, n, o) {
var a, r = vf(e, i);
if (!0 !== r && r.getlinearbrushotherextent) a = r.getlinearbrushotherextent(t, e._transform);
else {
var s = e._zr;
a = [0, [s.getwidth(), s.getheight()][1 - t]]
}
var l = [n, a];
t && l.reverse(),
uf(e, i, l, o)
},
updatecommon: xf,
contain: ap
}
}
function hp(t) {
return t = fp(t),
function(e, i) {
return do(e, t)
}
}
function cp(t, e) {
return t = fp(t),
function(i) {
var n = null != e ? e: i,
o = n ? t.width: t.height,
a = n ? t.x: t.y;
return [a, a + (o || 0)]
}
}
function dp(t, e, i) {
return t = fp(t),
function(n, o, a) {
return t.contain(o[0], o[1]) && !mc(n, e, i)
}
}
function fp(t) {
return ue.create(t)
}
function pp(t, e, i) {
return i && "axisareaselect" === i.type && e.findcomponents({
maintype: "parallelaxis",
query: i
})[0] === t
}
function gp(t) {
var e = t.axis;
return f(t.activeintervals,
function(t) {
return {
brushtype: "linex",
panelid: "pl",
range: [e.datatocoord(t[0], !0), e.datatocoord(t[1], !0)]
}
})
}
function mp(t, e) {
return e.getcomponent("parallel", t.get("parallelindex"))
}
function vp(t, e) {
var i = t._model;
return i.get("axisexpandable") && i.get("axisexpandtriggeron") === e
}
function yp(t, e) {
if (!t.encodedefine) {
var i = e.ecmodel.getcomponent("parallel", e.get("parallelindex"));
if (i) {
var n = t.encodedefine = r();
d(i.dimensions,
function(t) {
var e = xp(t);
n.set(t, e)
})
}
}
}
function xp(t) {
return + t.replace("dim", "")
}
function _p(t, e, i) {
var n = t.model,
o = t.getrect(),
a = new am({
shape: {
x: o.x,
y: o.y,
width: o.width,
height: o.height
}
}),
r = "horizontal" === n.get("layout") ? "width": "height";
return a.setshape(r, 0),
so(a, {
shape: {
width: o.width,
height: o.height
}
},
e, i),
a
}
function wp(t, e, i, n) {
for (var o = [], a = 0; a < i.length; a++) {
var r = i[a],
s = t.get(t.mapdimension(r), e);
ip(s, n.getaxis(r).type) || o.push(n.datatopoint(s, r))
}
return o
}
function bp(t, e, i, n, o) {
var a = wp(t, i, n, o),
r = new om({
shape: {
points: a
},
silent: !0,
z2: 10
});
return e.add(r),
t.setitemgraphicel(i, r),
r
}
function sp(t) {
var e = t.get("smooth", !0);
return ! 0 === e && (e = hk),
{
linestyle: t.getmodel("linestyle").getlinestyle(),
smooth: null != e ? e: hk
}
}
function mp(t, e, i, n) {
var o = n.linestyle;
e.hasitemoption && (o = e.getitemmodel(i).getmodel("linestyle").getlinestyle()),
t.usestyle(o);
var a = t.style;
a.fill = null,
a.stroke = e.getitemvisual(i, "color"),
a.opacity = e.getitemvisual(i, "opacity"),
n.smooth && (t.shape.smooth = n.smooth)
}
function ip(t, e) {
return "category" === e ? null == t: null == t || isnan(t)
}
function tp(t, e) {
return t.getvisual("opacity") || t.getmodel().get(e)
}
function ap(t, e, i) {
var n = t.getgraphicel(),
o = tp(t, e);
null != i && (null == o && (o = 1), o *= i),
n.downplay && n.downplay(),
n.traverse(function(t) {
"group" !== t.type && t.setstyle("opacity", o)
})
}
function dp(t, e) {
var i = tp(t, e),
n = t.getgraphicel();
n.highlight && n.highlight(),
n.traverse(function(t) {
"group" !== t.type && t.setstyle("opacity", i)
})
}
function cp(t, e, i) {
var n = new am({
shape: {
x: t.x - 10,
y: t.y - 10,
width: 0,
height: t.height + 20
}
});
return so(n, {
shape: {
width: t.width + 20,
height: t.height + 20
}
},
e, i),
n
}
function lp() {
function t(e, n) {
if (n >= i.length) return e;
for (var o = -1,
a = e.length,
r = i[n++], s = {},
l = {}; ++o < a;) {
var u = r(e[o]),
h = l[u];
h ? h.push(e[o]) : l[u] = [e[o]]
}
return d(l,
function(e, i) {
s[i] = t(e, n)
}),
s
}
function e(t, o) {
if (o >= i.length) return t;
var a = [],
r = n[o++];
return d(t,
function(t, i) {
a.push({
key: i,
values: e(t, o)
})
}),
r ? a.sort(function(t, e) {
return r(t.key, e.key)
}) : a
}
var i = [],
n = [];
return {
key: function(t) {
return i.push(t),
this
},
sortkeys: function(t) {
return n[i.length - 1] = t,
this
},
entries: function(i) {
return e(t(i, 0), 0)
}
}
}
function kp(t, e) {
return la(t.getboxlayoutparams(), {
width: e.getwidth(),
height: e.getheight()
})
}
function pp(t, e, i, n, o, a, r, s) {
op(t, e, i, o, a, s),
zp(t, e, a, o, n, r, s),
yp(t, s)
}
function np(t) {
d(t,
function(t) {
var e = xp(t.outedges, up),
i = xp(t.inedges, up),
n = math.max(e, i);
t.setlayout({
value: n
},
!0)
})
}
function op(t, e, i, n, o, a) {
for (var r = [], s = [], l = [], u = [], h = 0, c = 0; c < e.length; c++) r[c] = 1;
for (c = 0; c < t.length; c++) s[c] = t[c].inedges.length,
0 === s[c] && l.push(t[c]);
for (; l.length;) {
for (var d = 0; d < l.length; d++) {
var f = l[d];
"vertical" === a ? (f.setlayout({
y: h
},
!0), f.setlayout({
dy: i
},
!0)) : (f.setlayout({
x: h
},
!0), f.setlayout({
dx: i
},
!0));
for (var p = 0; p < f.outedges.length; p++) {
var g = f.outedges[p];
r[e.indexof(g)] = 0;
var m = g.node2;
0 == --s[t.indexof(m)] && u.push(m)
}
}++h,
l = u,
u = []
}
for (c = 0; c < r.length; c++);
ep(t, h, a),
rp(t, "vertical" === a ? (o - i) / (h - 1) : (n - i) / (h - 1), a)
}
function ep(t, e, i) {
d(t,
function(t) {
t.outedges.length || ("vertical" === i ? t.setlayout({
y: e - 1
},
!0) : t.setlayout({
x: e - 1
},
!0))
})
}
function rp(t, e, i) {
d(t,
function(t) {
if ("vertical" === i) {
var n = t.getlayout().y * e;
t.setlayout({
y: n
},
!0)
} else {
var o = t.getlayout().x * e;
t.setlayout({
x: o
},
!0)
}
})
}
function zp(t, e, i, n, o, a, r) {
var s = lp().key(bp(r)).sortkeys(function(t, e) {
return t - e
}).entries(t).map(function(t) {
return t.values
});
vp(t, s, e, i, n, o, r),
gp(s, o, i, n, r);
for (var l = 1; a > 0; a--) fp(s, l *= .99, r),
gp(s, o, i, n, r),
jp(s, l, r),
gp(s, o, i, n, r)
}
function bp(t) {
return "vertical" === t ?
function(t) {
return t.getlayout().y
}: function(t) {
return t.getlayout().x
}
}
function vp(t, e, i, n, o, a, r) {
var s = [];
d(e,
function(t) {
var e = t.length,
i = 0,
l = 0;
d(t,
function(t) {
i += t.getlayout().value
}),
l = "vertical" === r ? (o - (e - 1) * a) / i: (n - (e - 1) * a) / i,
s.push(l)
}),
s.sort(function(t, e) {
return t - e
});
var l = s[0];
d(e,
function(t) {
d(t,
function(t, e) {
var i = t.getlayout().value * l;
"vertical" === r ? (t.setlayout({
x: e
},
!0), t.setlayout({
dx: i
},
!0)) : (t.setlayout({
y: e
},
!0), t.setlayout({
dy: i
},
!0))
})
}),
d(i,
function(t) {
var e = +t.getvalue() * l;
t.setlayout({
dy: e
},
!0)
})
}
function gp(t, e, i, n, o) {
d(t,
function(t) {
var a, r, s, l = 0,
u = t.length;
if ("vertical" === o) {
var h;
for (t.sort(function(t, e) {
return t.getlayout().x - e.getlayout().x
}), s = 0; s < u; s++)(r = l - (a = t[s]).getlayout().x) > 0 && (h = a.getlayout().x + r, a.setlayout({
x: h
},
!0)),
l = a.getlayout().x + a.getlayout().dx + e;
if ((r = l - e - n) > 0) for (h = a.getlayout().x - r, a.setlayout({
x: h
},
!0), l = h, s = u - 2; s >= 0; --s)(r = (a = t[s]).getlayout().x + a.getlayout().dx + e - l) > 0 && (h = a.getlayout().x - r, a.setlayout({
x: h
},
!0)),
l = a.getlayout().x
} else {
var c;
for (t.sort(function(t, e) {
return t.getlayout().y - e.getlayout().y
}), s = 0; s < u; s++)(r = l - (a = t[s]).getlayout().y) > 0 && (c = a.getlayout().y + r, a.setlayout({
y: c
},
!0)),
l = a.getlayout().y + a.getlayout().dy + e;
if ((r = l - e - i) > 0) for (c = a.getlayout().y - r, a.setlayout({
y: c
},
!0), l = c, s = u - 2; s >= 0; --s)(r = (a = t[s]).getlayout().y + a.getlayout().dy + e - l) > 0 && (c = a.getlayout().y - r, a.setlayout({
y: c
},
!0)),
l = a.getlayout().y
}
})
}
function fp(t, e, i) {
d(t.slice().reverse(),
function(t) {
d(t,
function(t) {
if (t.outedges.length) {
var n = xp(t.outedges, wp, i) / xp(t.outedges, up, i);
if ("vertical" === i) {
var o = t.getlayout().x + (n - zp(t, i)) * e;
t.setlayout({
x: o
},
!0)
} else {
var a = t.getlayout().y + (n - zp(t, i)) * e;
t.setlayout({
y: a
},
!0)
}
}
})
})
}
function wp(t, e) {
return zp(t.node2, e) * t.getvalue()
}
function hp(t, e) {
return zp(t.node1, e) * t.getvalue()
}
function zp(t, e) {
return "vertical" === e ? t.getlayout().x + t.getlayout().dx / 2 : t.getlayout().y + t.getlayout().dy / 2
}
function up(t) {
return t.getvalue()
}
function xp(t, e, i) {
for (var n = 0,
o = t.length,
a = -1; ++a < o;) {
var r = +e.call(t, t[a], i);
isnan(r) || (n += r)
}
return n
}
function jp(t, e, i) {
d(t,
function(t) {
d(t,
function(t) {
if (t.inedges.length) {
var n = xp(t.inedges, hp, i) / xp(t.inedges, up, i);
if ("vertical" === i) {
var o = t.getlayout().x + (n - zp(t, i)) * e;
t.setlayout({
x: o
},
!0)
} else {
var a = t.getlayout().y + (n - zp(t, i)) * e;
t.setlayout({
y: a
},
!0)
}
}
})
})
}
function yp(t, e) {
d(t,
function(t) {
"vertical" === e ? (t.outedges.sort(function(t, e) {
return t.node2.getlayout().x - e.node2.getlayout().x
}), t.inedges.sort(function(t, e) {
return t.node1.getlayout().x - e.node1.getlayout().x
})) : (t.outedges.sort(function(t, e) {
return t.node2.getlayout().y - e.node2.getlayout().y
}), t.inedges.sort(function(t, e) {
return t.node1.getlayout().y - e.node1.getlayout().y
}))
}),
d(t,
function(t) {
var e = 0,
i = 0;
d(t.outedges,
function(t) {
t.setlayout({
sy: e
},
!0),
e += t.getlayout().dy
}),
d(t.inedges,
function(t) {
t.setlayout({
ty: i
},
!0),
i += t.getlayout().dy
})
})
}
function qp(t, e, i, n, o) {
var a = t.ends,
r = new xk({
shape: {
points: o ? $p(a, n, t) : a
}
});
return kp(t, r, e, i, o),
r
}
function kp(t, e, i, n, o) {
var a = i.hostmodel; (0, bm[o ? "initprops": "updateprops"])(e, {
shape: {
points: t.ends
}
},
a, n);
var r = i.getitemmodel(n),
s = r.getmodel(vk),
l = i.getitemvisual(n, "color"),
u = s.getitemstyle(["bordercolor"]);
u.stroke = l,
u.strokenoscale = !0,
e.usestyle(u),
e.z2 = 100,
uo(e, r.getmodel(yk).getitemstyle())
}
function $p(t, e, i) {
return f(t,
function(t) {
return t = t.slice(),
t[e] = i.initbaseline,
t
})
}
function jp(t) {
var e = [],
i = [];
return t.eachseriesbytype("boxplot",
function(t) {
var n = t.getbaseaxis(),
o = l(i, n);
o < 0 && (o = i.length, i[o] = n, e[o] = {
axis: n,
seriesmodels: []
}),
e[o].seriesmodels.push(t)
}),
e
}
function qp(t) {
var e, i, n = t.axis,
o = t.seriesmodels,
a = o.length,
r = t.boxwidthlist = [],
s = t.boxoffsetlist = [],
l = [];
if ("category" === n.type) i = n.getbandwidth();
else {
var u = 0;
wk(o,
function(t) {
u = math.max(u, t.getdata().count())
}),
e = n.getextent(),
math.abs(e[1] - e[0])
}
wk(o,
function(t) {
var e = t.get("boxwidth");
y(e) || (e = [e, e]),
l.push([ro(e[0], i) || 0, ro(e[1], i) || 0])
});
var h = .8 * i - 2,
c = h / a * .3,
d = (h - c * (a - 1)) / a,
f = d / 2 - h / 2;
wk(o,
function(t, e) {
s.push(f),
f += c + d,
r.push(math.min(math.max(d, l[e][0]), l[e][1]))
})
}
function tg(t, e, i) {
function n(t, i, n) {
var o = s.get(i, n),
a = [];
a[u] = t,
a[h] = o;
var l;
return isnan(t) || isnan(o) ? l = [nan, nan] : (l = r.datatopoint(a))[u] += e,
l
}
function o(t, e, i) {
var n = e.slice(),
o = e.slice();
n[u] += l,
o[u] -= l,
i ? t.push(n, o) : t.push(o, n)
}
function a(t, e) {
var i = e.slice(),
n = e.slice();
i[u] -= l,
n[u] += l,
t.push(i, n)
}
var r = t.coordinatesystem,
s = t.getdata(),
l = i / 2,
u = "horizontal" === t.get("layout") ? 0 : 1,
h = 1 - u,
c = ["x", "y"],
d = s.mapdimension(c[u]),
f = s.mapdimension(c[h], !0);
if (! (null == d || f.length < 5)) for (var p = 0; p < s.count(); p++) {
var g = s.get(d, p),
m = n(g, f[2], p),
v = n(g, f[0], p),
y = n(g, f[1], p),
x = n(g, f[3], p),
_ = n(g, f[4], p),
w = [];
o(w, y, 0),
o(w, x, 1),
w.push(v, y, _, x),
a(w, v),
a(w, _),
a(w, m),
s.setitemlayout(p, {
initbaseline: m[h],
ends: w
})
}
}
function eg(t, e, i) {
var n = t.ends;
return new ik({
shape: {
points: i ? ng(n, t) : n
},
z2: 100
})
}
function ig(t, e, i, n) {
var o = e.getitemmodel(i),
a = o.getmodel(bk),
r = e.getitemvisual(i, "color"),
s = e.getitemvisual(i, "bordercolor") || r,
l = a.getitemstyle(mk);
t.usestyle(l),
t.style.strokenoscale = !0,
t.style.fill = r,
t.style.stroke = s,
t.__simplebox = n,
uo(t, o.getmodel(sk).getitemstyle())
}
function ng(t, e) {
return f(t,
function(t) {
return t = t.slice(),
t[1] = e.initbaseline,
t
})
}
function og(t, e, i) {
var n = t.getdata(),
o = n.getlayout("largepoints"),
a = new tk({
shape: {
points: o
},
__sign: 1
});
e.add(a);
var r = new tk({
shape: {
points: o
},
__sign: -1
});
e.add(r),
ag(1, a, t, n),
ag( - 1, r, t, n),
i && (a.incremental = !0, r.incremental = !0)
}
function ag(t, e, i, n) {
var o = t > 0 ? "p": "n",
a = n.getvisual("bordercolor" + o) || n.getvisual("color" + o),
r = i.getmodel(bk).getitemstyle(mk);
e.usestyle(r),
e.style.fill = null,
e.style.stroke = a
}
function rg(t, e, i, n, o) {
return i > n ? -1 : i < n ? 1 : e > 0 ? t.get(o, e - 1) <= n ? 1 : -1 : 1
}
function sg(t, e) {
var i, n = t.getbaseaxis(),
o = "category" === n.type ? n.getbandwidth() : (i = n.getextent(), math.abs(i[1] - i[0]) / e.count()),
a = ro(a(t.get("barmaxwidth"), o), o),
r = ro(a(t.get("barminwidth"), 1), o),
s = t.get("barwidth");
return null != s ? ro(s, o) : math.max(math.min(o / 2, a), r)
}
function lg(t) {
return y(t) || (t = [ + t, +t]),
t
}
function ug(t, e) {
t.eachchild(function(t) {
t.attr({
z: e.z,
zlevel: e.zlevel,
style: {
stroke: "stroke" === e.brushtype ? e.color: null,
fill: "fill" === e.brushtype ? e.color: null
}
})
})
}
function hg(t, e) {
zw.call(this);
var i = new mu(t, e),
n = new zw;
this.add(i),
this.add(n),
n.beforeupdate = function() {
this.attr(i.getscale())
},
this.updatedata(t, e)
}
function cg(t) {
var e = t.data;
e && e[0] && e[0][0] && e[0][0].coord && (t.data = f(e,
function(t) {
var e = {
coords: [t[0].coord, t[1].coord]
};
return t[0].name && (e.fromname = t[0].name),
t[1].name && (e.toname = t[1].name),
o([e, t[0], t[1]])
}))
}
function dg(t, e, i) {
zw.call(this),
this.add(this.createline(t, e, i)),
this._updateeffectsymbol(t, e)
}
function fg(t, e, i) {
zw.call(this),
this._createpolyline(t, e, i)
}
function pg(t, e, i) {
dg.call(this, t, e, i),
this._lastframe = 0,
this._lastframepercent = 0
}
function gg() {
this.group = new zw
}
function mg(t) {
return t instanceof array || (t = [t, t]),
t
}
function vg() {
var t = y_();
this.canvas = t,
this.blursize = 30,
this.pointsize = 20,
this.maxopacity = 1,
this.minopacity = 0,
this._gradientpixels = {}
}
function yg(t, e, i) {
var n = t[1] - t[0],
o = (e = f(e,
function(e) {
return {
interval: [(e.interval[0] - t[0]) / n, (e.interval[1] - t[0]) / n]
}
})).length,
a = 0;
return function(t) {
for (n = a; n < o; n++) if ((r = e[n].interval)[0] <= t && t <= r[1]) {
a = n;
break
}
if (n === o) for (var n = a - 1; n >= 0; n--) {
var r = e[n].interval;
if (r[0] <= t && t <= r[1]) {
a = n;
break
}
}
return n >= 0 && n < o && i[n]
}
}
function xg(t, e) {
var i = t[1] - t[0];
return e = [(e[0] - t[0]) / i, (e[1] - t[0]) / i],
function(t) {
return t >= e[0] && t <= e[1]
}
}
function _g(t) {
var e = t.dimensions;
return "lng" === e[0] && "lat" === e[1]
}
function wg(t, e, i, n) {
var o = t.getitemlayout(e),
a = i.get("symbolrepeat"),
r = i.get("symbolclip"),
s = i.get("symbolposition") || "start",
l = (i.get("symbolrotate") || 0) * math.pi / 180 || 0,
u = i.get("symbolpatternsize") || 2,
h = i.isanimationenabled(),
c = {
dataindex: e,
layout: o,
itemmodel: i,
symboltype: t.getitemvisual(e, "symbol") || "circle",
color: t.getitemvisual(e, "color"),
symbolclip: r,
symbolrepeat: a,
symbolrepeatdirection: i.get("symbolrepeatdirection"),
symbolpatternsize: u,
rotation: l,
animationmodel: h ? i: null,
hoveranimation: h && i.get("hoveranimation"),
z2: i.getshallow("z", !0) || 0
};
bg(i, a, o, n, c),
mg(t, e, o, a, r, c.boundinglength, c.pxsign, u, n, c),
ig(i, c.symbolscale, l, n, c);
var d = c.symbolsize,
f = i.get("symboloffset");
return y(f) && (f = [ro(f[0], d[0]), ro(f[1], d[1])]),
tg(i, d, o, a, r, f, s, c.valuelinewidth, c.boundinglength, c.repeatcutlength, n, c),
c
}
function bg(t, e, i, n, o) {
var a, r = n.valuedim,
s = t.get("symbolboundingdata"),
l = n.coordsys.getotheraxis(n.coordsys.getbaseaxis()),
u = l.toglobalcoord(l.datatocoord(0)),
h = 1 - +(i[r.wh] <= 0);
if (y(s)) {
var c = [sg(l, s[0]) - u, sg(l, s[1]) - u];
c[1] < c[0] && c.reverse(),
a = c[h]
} else a = null != s ? sg(l, s) - u: e ? n.coordsysextent[r.index][h] - u: i[r.wh];
o.boundinglength = a,
e && (o.repeatcutlength = i[r.wh]),
o.pxsign = a > 0 ? 1 : a < 0 ? -1 : 0
}
function sg(t, e) {
return t.toglobalcoord(t.datatocoord(t.scale.parse(e)))
}
function mg(t, e, i, n, o, a, r, s, l, u) {
var h = l.valuedim,
c = l.categorydim,
d = math.abs(i[c.wh]),
f = t.getitemvisual(e, "symbolsize");
y(f) ? f = f.slice() : (null == f && (f = "100%"), f = [f, f]),
f[c.index] = ro(f[c.index], d),
f[h.index] = ro(f[h.index], n ? d: math.abs(a)),
u.symbolsize = f,
(u.symbolscale = [f[0] / s, f[1] / s])[h.index] *= (l.ishorizontal ? -1 : 1) * r
}
function ig(t, e, i, n, o) {
var a = t.get(jk) || 0;
a && (qk.attr({
scale: e.slice(),
rotation: i
}), qk.updatetransform(), a /= qk.getlinescale(), a *= e[n.valuedim.index]),
o.valuelinewidth = a
}
function tg(t, e, i, n, o, r, s, l, u, h, c, d) {
var f = c.categorydim,
p = c.valuedim,
g = d.pxsign,
m = math.max(e[p.index] + l, 0),
v = m;
if (n) {
var y = math.abs(u),
x = t(t.get("symbolmargin"), "15%") + "",
_ = !1;
x.lastindexof("!") === x.length - 1 && (_ = !0, x = x.slice(0, x.length - 1)),
x = ro(x, e[p.index]);
var w = math.max(m + 2 * x, 0),
b = _ ? 0 : 2 * x,
s = ko(n),
m = s ? n: hg((y + b) / w);
w = m + 2 * (x = (y - m * m) / 2 / (_ ? m: m - 1)),
b = _ ? 0 : 2 * x,
s || "fixed" === n || (m = h ? hg((math.abs(h) + b) / w) : 0),
v = m * w - b,
d.repeattimes = m,
d.symbolmargin = x
}
var i = g * (v / 2),
a = d.pathposition = [];
a[f.index] = i[f.wh] / 2,
a[p.index] = "start" === s ? i: "end" === s ? u - i: u / 2,
r && (a[0] += r[0], a[1] += r[1]);
var d = d.bundleposition = [];
d[f.index] = i[f.xy],
d[p.index] = i[p.xy];
var c = d.barrectshape = a({},
i);
c[p.wh] = g * math.max(math.abs(i[p.wh]), math.abs(a[p.index] + i)),
c[f.wh] = i[f.wh];
var l = d.clipshape = {};
l[f.xy] = -i[f.xy],
l[f.wh] = c.ecsize[f.wh],
l[p.xy] = 0,
l[p.wh] = i[p.wh]
}
function ag(t) {
var e = t.symbolpatternsize,
i = xl(t.symboltype, -e / 2, -e / 2, e, e, t.color);
return i.attr({
culling: !0
}),
"image" !== i.type && i.setstyle({
strokenoscale: !0
}),
i
}
function dg(t, e, i, n) {
function o(t) {
var e = l.slice(),
n = i.pxsign,
o = t;
return ("start" === i.symbolrepeatdirection ? n > 0 : n < 0) && (o = h - 1 - t),
e[u.index] = d * (o - h / 2 + .5) + l[u.index],
{
position: e,
scale: i.symbolscale.slice(),
rotation: i.rotation
}
}
var a = t.__pictorialbundle,
r = i.symbolsize,
s = i.valuelinewidth,
l = i.pathposition,
u = e.valuedim,
h = i.repeattimes || 0,
c = 0,
d = r[e.valuedim.index] + s + 2 * i.symbolmargin;
for (gg(t,
function(t) {
t.__pictorialanimationindex = c,
t.__pictorialrepeattimes = h,
c < h ? fg(t, null, o(c), i, n) : fg(t, null, {
scale: [0, 0]
},
i, n,
function() {
a.remove(t)
}),
eg(t, i),
c++
}); c < h; c++) {
var f = ag(i);
f.__pictorialanimationindex = c,
f.__pictorialrepeattimes = h,
a.add(f);
var p = o(c);
fg(f, {
position: p.position,
scale: [0, 0]
},
{
scale: p.scale,
rotation: p.rotation
},
i, n),
f.on("mouseover",
function() {
gg(t,
function(t) {
t.trigger("emphasis")
})
}).on("mouseout",
function() {
gg(t,
function(t) {
t.trigger("normal")
})
}),
eg(f, i)
}
}
function cg(t, e, i, n) {
var o = t.__pictorialbundle,
a = t.__pictorialmainpath;
a ? fg(a, null, {
position: i.pathposition.slice(),
scale: i.symbolscale.slice(),
rotation: i.rotation
},
i, n) : (a = t.__pictorialmainpath = ag(i), o.add(a), fg(a, {
position: i.pathposition.slice(),
scale: [0, 0],
rotation: i.rotation
},
{
scale: i.symbolscale.slice()
},
i, n), a.on("mouseover",
function() {
this.trigger("emphasis")
}).on("mouseout",
function() {
this.trigger("normal")
})),
eg(a, i)
}
function lg(t, e, i) {
var n = a({},
e.barrectshape),
o = t.__pictorialbarrect;
o ? fg(o, null, {
shape: n
},
e, i) : (o = t.__pictorialbarrect = new am({
z2: 2,
shape: n,
silent: !0,
style: {
stroke: "transparent",
fill: "transparent",
linewidth: 0
}
}), t.add(o))
}
function kg(t, e, i, n) {
if (i.symbolclip) {
var o = t.__pictorialclippath,
r = a({},
i.clipshape),
s = e.valuedim,
l = i.animationmodel,
u = i.dataindex;
if (o) bo(o, {
shape: r
},
l, u);
else {
r[s.wh] = 0,
o = new am({
shape: r
}),
t.__pictorialbundle.setclippath(o),
t.__pictorialclippath = o;
var h = {};
h[s.wh] = i.clipshape[s.wh],
bm[n ? "updateprops": "initprops"](o, {
shape: h
},
l, u)
}
}
}
function pg(t, e) {
var i = t.getitemmodel(e);
return i.getanimationdelayparams = ng,
i.isanimationenabled = og,
i
}
function ng(t) {
return {
index: t.__pictorialanimationindex,
count: t.__pictorialrepeattimes
}
}
function og() {
return this.parentmodel.isanimationenabled() && !!this.getshallow("animation")
}
function eg(t, e) {
t.off("emphasis").off("normal");
var i = e.symbolscale.slice();
e.hoveranimation && t.on("emphasis",
function() {
this.animateto({
scale: [1.1 * i[0], 1.1 * i[1]]
},
400, "elasticout")
}).on("normal",
function() {
this.animateto({
scale: i.slice()
},
400, "elasticout")
})
}
function rg(t, e, i, n) {
var o = new zw,
a = new zw;
return o.add(a),
o.__pictorialbundle = a,
a.attr("position", i.bundleposition.slice()),
i.symbolrepeat ? dg(o, e, i) : cg(o, e, i),
lg(o, i, n),
kg(o, e, i, n),
o.__pictorialshapestr = vg(t, i),
o.__pictorialsymbolmeta = i,
o
}
function zg(t, e, i) {
var n = i.animationmodel,
o = i.dataindex;
bo(t.__pictorialbundle, {
position: i.bundleposition.slice()
},
n, o),
i.symbolrepeat ? dg(t, e, i, !0) : cg(t, e, i, !0),
lg(t, i, !0),
kg(t, e, i, !0)
}
function bg(t, e, i, n) {
var o = n.__pictorialbarrect;
o && (o.style.text = null);
var a = [];
gg(n,
function(t) {
a.push(t)
}),
n.__pictorialmainpath && a.push(n.__pictorialmainpath),
n.__pictorialclippath && (i = null),
d(a,
function(t) {
bo(t, {
scale: [0, 0]
},
i, e,
function() {
n.parent && n.parent.remove(n)
})
}),
t.setitemgraphicel(e, null)
}
function vg(t, e) {
return [t.getitemvisual(e.dataindex, "symbol") || "none", !!e.symbolrepeat, !!e.symbolclip].join(":")
}
function gg(t, e, i) {
d(t.__pictorialbundle.children(),
function(n) {
n !== t.__pictorialbarrect && e.call(i, n)
})
}
function fg(t, e, i, n, o, a) {
e && t.attr(e),
n.symbolclip && !o ? i && t.attr(i) : i && bm[o ? "updateprops": "initprops"](t, i, n.animationmodel, n.dataindex, a)
}
function wg(t, e, i) {
var n = i.color,
o = i.dataindex,
a = i.itemmodel,
s = a.getmodel("itemstyle").getitemstyle(["color"]),
l = a.getmodel("emphasis.itemstyle").getitemstyle(),
u = a.getshallow("cursor");
gg(t,
function(t) {
t.setcolor(n),
t.setstyle(r({
fill: n,
opacity: i.opacity
},
s)),
uo(t, l),
u && (t.cursor = u),
t.z2 = i.z2
});
var h = {},
c = e.valuedim.posdesc[ + (i.boundinglength > 0)],
d = t.__pictorialbarrect;
th(d.style, h, a, n, e.seriesmodel, o, c),
uo(d, h)
}
function hg(t) {
var e = math.round(t);
return math.abs(t - e) < 1e-4 ? e: math.ceil(t)
}
function zg(t, e, i) {
this.dimension = "single",
this.dimensions = ["single"],
this._axis = null,
this._rect,
this._init(t, e, i),
this.model = t
}
function ug(t, e) {
e = e || {};
var i = t.coordinatesystem,
n = t.axis,
o = {},
a = n.position,
r = n.orient,
s = i.getrect(),
l = [s.x, s.x + s.width, s.y, s.y + s.height],
u = {
horizontal: {
top: l[2],
bottom: l[3]
},
vertical: {
left: l[0],
right: l[1]
}
};
o.position = ["vertical" === r ? u.vertical[a] : l[0], "horizontal" === r ? u.horizontal[a] : l[3]];
var h = {
horizontal: 0,
vertical: 1
};
o.rotation = math.pi / 2 * h[r];
var c = {
top: -1,
bottom: 1,
right: 1,
left: -1
};
o.labeldirection = o.tickdirection = o.namedirection = c[a],
t.get("axistick.inside") && (o.tickdirection = -o.tickdirection),
t(e.labelinside, t.get("axislabel.inside")) && (o.labeldirection = -o.labeldirection);
var d = e.rotate;
return null == d && (d = t.get("axislabel.rotate")),
o.labelrotation = "top" === a ? -d: d,
o.z2 = 1,
o
}
function xg(t, e, i, n, o) {
var r = t.axis;
if (!r.scale.isblank() && r.containdata(e)) if (t.involveseries) {
var s = jg(e, t),
l = s.payloadbatch,
u = s.snaptovalue;
l[0] && null == o.seriesindex && a(o, l[0]),
!n && t.snap && r.containdata(u) && null != u && (e = u),
i.showpointer(t, e, l, o),
i.showtooltip(t, s, u)
} else i.showpointer(t, e)
}
function jg(t, e) {
var i = e.axis,
n = i.dim,
o = t,
a = [],
r = number.max_value,
s = -1;
return ip(e.seriesmodels,
function(e, l) {
var u, h, c = e.getdata().mapdimension(n, !0);
if (e.getaxistooltipdata) {
var d = e.getaxistooltipdata(c, t, i);
h = d.dataindices,
u = d.nestestvalue
} else {
if (! (h = e.getdata().indicesofnearest(c[0], t, "category" === i.type ? .5 : null)).length) return;
u = e.getdata().get(c[0], h[0])
}
if (null != u && isfinite(u)) {
var f = t - u,
p = math.abs(f);
p <= r && ((p < r || f >= 0 && s < 0) && (r = p, s = f, o = u, a.length = 0), ip(h,
function(t) {
a.push({
seriesindex: e.seriesindex,
dataindexinside: t,
dataindex: e.getdata().getrawindex(t)
})
}))
}
}),
{
payloadbatch: a,
snaptovalue: o
}
}
function yg(t, e, i, n) {
t[e.key] = {
value: i,
payloadbatch: n
}
}
function qg(t, e, i, n) {
var o = i.payloadbatch,
a = e.axis,
r = a.model,
s = e.axispointermodel;
if (e.triggertooltip && o.length) {
var l = e.coordsys.model,
u = bh(l),
h = t.map[u];
h || (h = t.map[u] = {
coordsysid: l.id,
coordsysindex: l.componentindex,
coordsystype: l.type,
coordsysmaintype: l.maintype,
databyaxis: []
},
t.list.push(h)),
h.databyaxis.push({
axisdim: a.dim,
axisindex: r.componentindex,
axistype: r.type,
axisid: r.id,
value: n,
valuelabelopt: {
precision: s.get("label.precision"),
formatter: s.get("label.formatter")
},
seriesdataindices: o.slice()
})
}
}
function kg(t, e, i) {
var n = i.axesinfo = [];
ip(e,
function(e, i) {
var o = e.axispointermodel.option,
a = t[i];
a ? (!e.usehandle && (o.status = "show"), o.value = a.value, o.seriesdataindices = (a.payloadbatch || []).slice()) : !e.usehandle && (o.status = "hide"),
"show" === o.status && n.push({
axisdim: e.axis.dim,
axisindex: e.axis.model.componentindex,
value: o.value
})
})
}
function $g(t, e, i, n) {
if (!em(e) && t.list.length) {
var o = ((t.list[0].databyaxis[0] || {}).seriesdataindices || [])[0] || {};
n({
type: "showtip",
escapeconnect: !0,
x: e[0],
y: e[1],
tooltipoption: i.tooltipoption,
position: i.position,
dataindexinside: o.dataindexinside,
dataindex: o.dataindex,
seriesindex: o.seriesindex,
databycoordsys: t.list
})
} else n({
type: "hidetip"
})
}
function jg(t, e, i) {
var n = i.getzr(),
o = op(n).axispointerlasthighlights || {},
a = op(n).axispointerlasthighlights = {};
ip(t,
function(t, e) {
var i = t.axispointermodel.option;
"show" === i.status && ip(i.seriesdataindices,
function(t) {
var e = t.seriesindex + " | " + t.dataindex;
a[e] = t
})
});
var r = [],
s = [];
d(o,
function(t, e) { ! a[e] && s.push(t)
}),
d(a,
function(t, e) { ! o[e] && r.push(t)
}),
s.length && i.dispatchaction({
type: "downplay",
escapeconnect: !0,
batch: s
}),
r.length && i.dispatchaction({
type: "highlight",
escapeconnect: !0,
batch: r
})
}
function qg(t, e) {
for (var i = 0; i < (t || []).length; i++) {
var n = t[i];
if (e.axis.dim === n.axisdim && e.axis.model.componentindex === n.axisindex) return n
}
}
function tm(t) {
var e = t.axis.model,
i = {},
n = i.axisdim = t.axis.dim;
return i.axisindex = i[n + "axisindex"] = e.componentindex,
i.axisname = i[n + "axisname"] = e.name,
i.axisid = i[n + "axisid"] = e.id,
i
}
function em(t) {
return ! t || null == t[0] || isnan(t[0]) || null == t[1] || isnan(t[1])
}
function im(t, e, i) {
if (!z_.node) {
var n = e.getzr();
ap(n).records || (ap(n).records = {}),
nm(n, e),
(ap(n).records[t] || (ap(n).records[t] = {})).handler = i
}
}
function nm(t, e) {
function i(i, n) {
t.on(i,
function(i) {
var o = sm(e);
rp(ap(t).records,
function(t) {
t && n(t, i, o.dispatchaction)
}),
om(o.pendings, e)
})
}
ap(t).initialized || (ap(t).initialized = !0, i("click", v(rm, "click")), i("mousemove", v(rm, "mousemove")), i("globalout", am))
}
function om(t, e) {
var i, n = t.showtip.length,
o = t.hidetip.length;
n ? i = t.showtip[n - 1] : o && (i = t.hidetip[o - 1]),
i && (i.dispatchaction = null, e.dispatchaction(i))
}
function am(t, e, i) {
t.handler("leave", null, i)
}
function rm(t, e, i, n) {
e.handler(t, i, n)
}
function sm(t) {
var e = {
showtip: [],
hidetip: []
},
i = function(n) {
var o = e[n.type];
o ? o.push(n) : (n.dispatchaction = i, t.dispatchaction(n))
};
return {
dispatchaction: i,
pendings: e
}
}
function lm(t, e) {
if (!z_.node) {
var i = e.getzr(); (ap(i).records || {})[t] && (ap(i).records[t] = null)
}
}
function um() {}
function hm(t, e, i, n) {
cm(lp(i).lastprop, n) || (lp(i).lastprop = n, e ? bo(i, n, t) : (i.stopanimation(), i.attr(n)))
}
function cm(t, e) {
if (w(t) && w(e)) {
var i = !0;
return d(e,
function(e, n) {
i = i && cm(t[n], e)
}),
!!i
}
return t === e
}
function dm(t, e) {
t[e.get("label.show") ? "show": "hide"]()
}
function fm(t) {
return {
position: t.position.slice(),
rotation: t.rotation || 0
}
}
function pm(t, e, i) {
var n = e.get("z"),
o = e.get("zlevel");
t && t.traverse(function(t) {
"group" !== t.type && (null != n && (t.z = n), null != o && (t.zlevel = o), t.silent = i)
})
}
function gm(t) {
var e, i = t.get("type"),
n = t.getmodel(i + "style");
return "line" === i ? (e = n.getlinestyle()).fill = null: "shadow" === i && ((e = n.getareastyle()).stroke = null),
e
}
function mm(t, e, i, n, o) {
var a = ym(i.get("value"), e.axis, e.ecmodel, i.get("seriesdataindices"), {
precision: i.get("label.precision"),
formatter: i.get("label.formatter")
}),
r = i.getmodel("label"),
s = om(r.get("padding") || 0),
l = r.getfont(),
u = de(a, l),
h = o.position,
c = u.width + s[1] + s[3],
d = u.height + s[0] + s[2],
f = o.align;
"right" === f && (h[0] -= c),
"center" === f && (h[0] -= c / 2);
var p = o.verticalalign;
"bottom" === p && (h[1] -= d),
"middle" === p && (h[1] -= d / 2),
vm(h, c, d, n);
var g = r.get("backgroundcolor");
g && "auto" !== g || (g = e.get("axisline.linestyle.color")),
t.label = {
shape: {
x: 0,
y: 0,
width: c,
height: d,
r: r.get("borderradius")
},
position: h.slice(),
style: {
text: a,
textfont: l,
textfill: r.gettextcolor(),
textposition: "inside",
fill: g,
stroke: r.get("bordercolor") || "transparent",
linewidth: r.get("borderwidth") || 0,
shadowblur: r.get("shadowblur"),
shadowcolor: r.get("shadowcolor"),
shadowoffsetx: r.get("shadowoffsetx"),
shadowoffsety: r.get("shadowoffsety")
},
z2: 10
}
}
function vm(t, e, i, n) {
var o = n.getwidth(),
a = n.getheight();
t[0] = math.min(t[0] + e, o) - e,
t[1] = math.min(t[1] + i, a) - i,
t[0] = math.max(t[0], 0),
t[1] = math.max(t[1], 0)
}
function ym(t, e, i, n, o) {
t = e.scale.parse(t);
var a = e.scale.getlabel(t, {
precision: o.precision
}),
r = o.formatter;
if (r) {
var s = {
value: wl(e, t),
seriesdata: []
};
d(n,
function(t) {
var e = i.getseriesbyindex(t.seriesindex),
n = t.dataindexinside,
o = e && e.getdataparams(n);
o && s.seriesdata.push(o)
}),
_(r) ? a = r.replace("{value}", a) : x(r) && (a = r(s))
}
return a
}
function xm(t, e, i) {
var n = mt();
return wt(n, n, i.rotation),
_t(n, n, i.position),
io([t.datatocoord(e), (i.labeloffset || 0) + (i.labeldirection || 1) * (i.labelmargin || 0)], n)
}
function _m(t, e, i, n, o, a) {
var r = id.innertextlayout(i.rotation, 0, i.labeldirection);
i.labelmargin = o.get("label.margin"),
mm(e, n, o, a, {
position: xm(n.axis, t, i),
align: r.textalign,
verticalalign: r.textverticalalign
})
}
function wm(t, e, i) {
return i = i || 0,
{
x1: t[i],
y1: t[1 - i],
x2: e[i],
y2: e[1 - i]
}
}
function bm(t, e, i) {
return i = i || 0,
{
x: t[i],
y: t[1 - i],
width: e[i],
height: e[1 - i]
}
}
function sm(t, e, i, n, o, a) {
return {
cx: t,
cy: e,
r0: i,
r: n,
startangle: o,
endangle: a,
clockwise: !0
}
}
function mm(t, e) {
var i = {};
return i[e.dim + "axisindex"] = e.index,
t.getcartesian(i)
}
function im(t) {
return "x" === t.dim ? 0 : 1
}
function tm(t) {
return t.ishorizontal() ? 0 : 1
}
function am(t, e) {
var i = t.getrect();
return [i[fp[e]], i[fp[e]] + i[pp[e]]]
}
function dm(t, e, i) {
var n = new am({
shape: {
x: t.x - 10,
y: t.y - 10,
width: 0,
height: t.height + 20
}
});
return so(n, {
shape: {
width: t.width + 20,
height: t.height + 20
}
},
e, i),
n
}
function cm(t, e, i) {
if (t.count()) for (var n, o = e.coordinatesystem,
a = e.getlayerseries(), r = t.mapdimension("single"), s = t.mapdimension("value"), l = f(a,
function(e) {
return f(e.indices,
function(e) {
var i = o.datatopoint(t.get(r, e));
return i[1] = t.get(s, e),
i
})
}), u = lm(l), h = u.y0, c = i / u.max, d = a.length, p = a[0].indices.length, g = 0; g < p; ++g) {
n = h[g] * c,
t.setitemlayout(a[0].indices[g], {
layerindex: 0,
x: l[0][g][0],
y0: n,
y: l[0][g][1] * c
});
for (var m = 1; m < d; ++m) n += l[m - 1][g][1] * c,
t.setitemlayout(a[m].indices[g], {
layerindex: m,
x: l[m][g][0],
y0: n,
y: l[m][g][1] * c
})
}
}
function lm(t) {
for (var e = t.length,
i = t[0].length, n = [], o = [], a = 0, r = {},
s = 0; s < i; ++s) {
for (var l = 0,
u = 0; l < e; ++l) u += t[l][s][1];
u > a && (a = u),
n.push(u)
}
for (var h = 0; h < i; ++h) o[h] = (a - n[h]) / 2;
a = 0;
for (var c = 0; c < i; ++c) {
var d = n[c] + o[c];
d > a && (a = d)
}
return r.y0 = o,
r.max = a,
r
}
function km(t) {
var e = 0;
d(t.children,
function(t) {
km(t);
var i = t.value;
y(i) && (i = i[0]),
e += i
});
var i = t.value;
y(i) && (i = i[0]),
(null == i || isnan(i)) && (i = e),
i < 0 && (i = 0),
y(t.value) ? t.value[0] = i: t.value = i
}
function pm(t, e, i) {
function n() {
r.ignore = r.hoverignore
}
function o() {
r.ignore = r.normalignore
}
zw.call(this);
var a = new qs({
z2: xp
});
a.seriesindex = e.seriesindex;
var r = new qs({
z2: _p,
silent: t.getmodel("label").get("silent")
});
this.add(a),
this.add(r),
this.updatedata(!0, t, "normal", e, i),
this.on("emphasis", n).on("normal", o).on("mouseover", n).on("mouseout", o)
}
function nm(t, e, i) {
var n = t.getvisual("color"),
o = t.getvisual("visualmeta");
o && 0 !== o.length || (n = null);
var a = t.getmodel("itemstyle").get("color");
if (a) return a;
if (n) return n;
if (0 === t.depth) return i.option.color[0];
var r = i.option.color.length;
return a = i.option.color[om(t) % r]
}
function om(t) {
for (var e = t; e.depth > 1;) e = e.parentnode;
return l(t.getancestors()[0].children, e)
}
function em(t, e, i) {
return i !== yp.none && (i === yp.self ? t === e: i === yp.ancestor ? t === e || t.isancestorof(e) : t === e || t.isdescendantof(e))
}
function rm(t, e) {
var i = t.children || [];
t.children = zm(i, e),
i.length && d(t.children,
function(t) {
rm(t, e)
})
}
function zm(t, e) {
if ("function" == typeof e) return t.sort(e);
var i = "asc" === e;
return t.sort(function(t, e) {
var n = (t.getvalue() - e.getvalue()) * (i ? 1 : -1);
return 0 === n ? (t.dataindex - e.dataindex) * (i ? -1 : 1) : n
})
}
function bm(t, e) {
return e = e || [0, 0],
f(["x", "y"],
function(i, n) {
var o = this.getaxis(i),
a = e[n],
r = t[n] / 2;
return "category" === o.type ? o.getbandwidth() : math.abs(o.datatocoord(a - r) - o.datatocoord(a + r))
},
this)
}
function vm(t, e) {
return e = e || [0, 0],
f([0, 1],
function(i) {
var n = e[i],
o = t[i] / 2,
a = [],
r = [];
return a[i] = n - o,
r[i] = n + o,
a[1 - i] = r[1 - i] = e[1 - i],
math.abs(this.datatopoint(a)[i] - this.datatopoint(r)[i])
},
this)
}
function gm(t, e) {
var i = this.getaxis(),
n = e instanceof array ? e[0] : e,
o = (t instanceof array ? t[0] : t) / 2;
return "category" === i.type ? i.getbandwidth() : math.abs(i.datatocoord(n - o) - i.datatocoord(n + o))
}
function fm(t, e) {
return f(["radius", "angle"],
function(i, n) {
var o = this["get" + i + "axis"](),
a = e[n],
r = t[n] / 2,
s = "datato" + i,
l = "category" === o.type ? o.getbandwidth() : math.abs(o[s](a - r) - o[s](a + r));
return "angle" === i && (l = l * math.pi / 180),
l
},
this)
}
function wm(t) {
var e, i = t.type;
if ("path" === i) {
var n = t.shape,
o = null != n.width && null != n.height ? {
x: n.x || 0,
y: n.y || 0,
width: n.width,
height: n.height
}: null,
a = tv(n); (e = wn(a, null, o, n.layout || "center")).__custompathdata = a
} else "image" === i ? (e = new hi({})).__customimagepath = t.style.image: "text" === i ? (e = new qs({})).__customtext = t.style.text: e = new(0, bm[i.charat(0).touppercase() + i.slice(1)]);
return e.__customgraphictype = i,
e.name = t.name,
e
}
function hm(t, e, n, o, a, r, s) {
var l = {},
u = n.style || {};
if (n.shape && (l.shape = i(n.shape)), n.position && (l.position = n.position.slice()), n.scale && (l.scale = n.scale.slice()), n.origin && (l.origin = n.origin.slice()), n.rotation && (l.rotation = n.rotation), "image" === t.type && n.style) {
h = l.style = {};
d(["x", "y", "width", "height"],
function(e) {
zm(e, h, u, t.style, r)
})
}
if ("text" === t.type && n.style) {
var h = l.style = {};
d(["x", "y"],
function(e) {
zm(e, h, u, t.style, r)
}),
!u.hasownproperty("textfill") && u.fill && (u.textfill = u.fill),
!u.hasownproperty("textstroke") && u.stroke && (u.textstroke = u.stroke)
}
if ("group" !== t.type && (t.usestyle(u), r)) {
t.style.opacity = 0;
var c = u.opacity;
null == c && (c = 1),
so(t, {
style: {
opacity: c
}
},
o, e)
}
r ? t.attr(l) : bo(t, l, o, e),
n.hasownproperty("z2") && t.attr("z2", n.z2 || 0),
n.hasownproperty("silent") && t.attr("silent", n.silent),
n.hasownproperty("invisible") && t.attr("invisible", n.invisible),
n.hasownproperty("ignore") && t.attr("ignore", n.ignore),
n.hasownproperty("info") && t.attr("info", n.info);
var f = n.styleemphasis,
p = !1 === f;
t.__cushasemphstl && null == f || !t.__cushasemphstl && p || (no(t, f), t.__cushasemphstl = !p),
s && ho(t, !p)
}
function zm(t, e, i, n, o) {
null == i[t] || o || (e[t] = i[t], i[t] = n[t])
}
function um(t, e, i, n) {
function o(t) {
null == t && (t = h),
v && (c = e.getitemmodel(t), d = c.getmodel(ap), f = c.getmodel(dp), p = e.getitemvisual(t, "color"), v = !1)
}
var s = t.get("renderitem"),
l = t.coordinatesystem,
u = {};
l && (u = l.preparecustoms ? l.preparecustoms() : lp[l.type](l));
var h, c, d, f, p, g = r({
getwidth: n.getwidth,
getheight: n.getheight,
getzr: n.getzr,
getdevicepixelratio: n.getdevicepixelratio,
value: function(t, i) {
return null == i && (i = h),
e.get(e.getdimension(t || 0), i)
},
style: function(i, n) {
null == n && (n = h),
o(n);
var r = c.getmodel(ip).getitemstyle();
null != p && (r.fill = p);
var s = e.getitemvisual(n, "opacity");
return null != s && (r.opacity = s),
fo(r, d, null, {
autocolor: p,
isrecttext: !0
}),
r.text = d.getshallow("show") ? a(t.getformattedlabel(n, "normal"), gu(e, n)) : null,
i && a(r, i),
r
},
styleemphasis: function(i, n) {
null == n && (n = h),
o(n);
var r = c.getmodel(tp).getitemstyle();
return fo(r, f, null, {
isrecttext: !0
},
!0),
r.text = f.getshallow("show") ? d(t.getformattedlabel(n, "emphasis"), t.getformattedlabel(n, "normal"), gu(e, n)) : null,
i && a(r, i),
r
},
visual: function(t, i) {
return null == i && (i = h),
e.getitemvisual(i, t)
},
barlayout: function(t) {
if (l.getbaseaxis) return tl(r({
axis: l.getbaseaxis()
},
t), n)
},
currentseriesindices: function() {
return i.getcurrentseriesindices()
},
font: function(t) {
return _o(t, i)
}
},
u.api || {}),
m = {
context: {},
seriesid: t.id,
seriesname: t.name,
seriesindex: t.seriesindex,
coordsys: u.coordsys,
datainsidelength: e.count(),
encode: xm(t.getdata())
},
v = !0;
return function(t, i) {
return h = t,
v = !0,
s && s(r({
dataindexinside: t,
dataindex: e.getrawindex(t),
actiontype: i ? i.type: null
},
m), g)
}
}
function xm(t) {
var e = {};
return d(t.dimensions,
function(i, n) {
var o = t.getdimensioninfo(i);
if (!o.isextracoord) {
var a = o.coorddim; (e[a] = e[a] || [])[o.coorddimindex] = n
}
}),
e
}
function jm(t, e, i, n, o, a) {
return (t = ym(t, e, i, n, o, a, !0)) && a.setitemgraphicel(e, t),
t
}
function ym(t, e, i, n, o, a, r) {
var s = !i,
l = (i = i || {}).type,
u = i.shape,
h = i.style;
if (t && (s || null != l && l !== t.__customgraphictype || "path" === l && ev(u) && tv(u) !== t.__custompathdata || "image" === l && iv(h, "image") && h.image !== t.__customimagepath || "text" === l && iv(u, "text") && h.text !== t.__customtext) && (o.remove(t), t = null), !s) {
var c = !t;
return ! t && (t = wm(i)),
hm(t, e, i, n, a, c, r),
"group" === l && qm(t, e, i, n, a),
o.add(t),
t
}
}
function qm(t, e, i, n, o) {
var a = i.children,
r = a ? a.length: 0,
s = i.$mergechildren,
l = "byname" === s || i.diffchildrenbyname,
u = !1 === s;
if (r || l || u) if (l) km({
oldchildren: t.children() || [],
newchildren: a || [],
dataindex: e,
animatablemodel: n,
group: t,
data: o
});
else {
u && t.removeall();
for (var h = 0; h < r; h++) a[h] && ym(t.childat(h), e, a[h], n, t, o)
}
}
function km(t) {
new hs(t.oldchildren, t.newchildren, $m, $m, t).add(jm).update(jm).remove(qm).execute()
}
function $m(t, e) {
var i = t && t.name;
return null != i ? i: cp + e
}
function jm(t, e) {
var i = this.context,
n = null != t ? i.newchildren[t] : null;
ym(null != e ? i.oldchildren[e] : null, i.dataindex, n, i.animatablemodel, i.group, i.data)
}
function qm(t) {
var e = this.context,
i = e.oldchildren[t];
i && e.group.remove(i)
}
function tv(t) {
return t && (t.pathdata || t.d)
}
function ev(t) {
return t && (t.hasownproperty("pathdata") || t.hasownproperty("d"))
}
function iv(t, e) {
return t && t.hasownproperty(e)
}
function nv(t, e, i, n) {
var o = i.type,
a = new(0, bm[o.charat(0).touppercase() + o.slice(1)])(i);
e.add(a),
n.set(t, a),
a.__ecgraphicid = t
}
function ov(t, e) {
var i = t && t.parent;
i && ("group" === t.type && t.traverse(function(t) {
ov(t, e)
}), e.removekey(t.__ecgraphicid), i.remove(t))
}
function av(t) {
return t = a({},
t),
d(["id", "parentid", "$action", "hv", "bounding"].concat(hm),
function(e) {
delete t[e]
}),
t
}
function rv(t, e) {
var i;
return d(e,
function(e) {
null != t[e] && "auto" !== t[e] && (i = !0)
}),
i
}
function sv(t, e) {
var i = t.exist;
if (e.id = t.keyinfo.id, !e.type && i && (e.type = i.type), null == e.parentid) {
var n = e.parentoption;
n ? e.parentid = n.id: i && (e.parentid = i.parentid)
}
e.parentoption = null
}
function lv(t, e, i) {
var o = a({},
i),
r = t[e],
s = i.$action || "merge";
"merge" === s ? r ? (n(r, o, !0), ca(r, o, {
ignoresize: !0
}), fa(i, r)) : t[e] = o: "replace" === s ? t[e] = o: "remove" === s && r && (t[e] = null)
}
function uv(t, e) {
t && (t.hv = e.hv = [rv(e, ["left", "right"]), rv(e, ["top", "bottom"])], "group" === t.type && (null == t.width && (t.width = e.width = 0), null == t.height && (t.height = e.height = 0)))
}
function hv(t, e, i) {
var n = t.eventdata;
t.silent || t.ignore || n || (n = t.eventdata = {
componenttype: "graphic",
componentindex: e.componentindex,
name: t.name
}),
n && (n.info = t.info)
}
function cv(t, e, i) {
var n, o = {},
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)),
d(i.getdata(),
function(t) {
var e = t.get("name");
if ("\n" !== e && "" !== e) {
var n = i.isselected(e);
o.hasownproperty(e) ? o[e] = o[e] && n: o[e] = n
}
})
}),
{
name: e.name,
selected: o
}
}
function dv(t, e, i) {
var n = e.getboxlayoutparams(),
o = e.get("padding"),
a = {
width: i.getwidth(),
height: i.getheight()
},
r = la(n, a, o);
um(e.get("orient"), t, e.get("itemgap"), r.width, r.height),
ua(t, n, a, o)
}
function fv(t, e) {
var i = om(e.get("padding")),
n = e.getitemstyle(["color", "opacity"]);
return n.fill = e.get("backgroundcolor"),
t = new am({
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
})
}
function pv(t, e) {
e.dispatchaction({
type: "legendtoggleselect",
name: t
})
}
function gv(t, e, i, n) {
var o = i.getzr().storage.getdisplaylist()[0];
o && o.usehoverlayer || i.dispatchaction({
type: "highlight",
seriesname: t,
name: e,
excludeseriesid: n
})
}
function mv(t, e, i, n) {
var o = i.getzr().storage.getdisplaylist()[0];
o && o.usehoverlayer || i.dispatchaction({
type: "downplay",
seriesname: t,
name: e,
excludeseriesid: n
})
}
function vv(t, e, i) {
var n = [1, 1];
n[t.getorient().index] = 0,
ca(e, i, {
type: "box",
ignoresize: n
})
}
function yv(t) {
var e = "left " + t + "s cubic-bezier(0.23, 1, 0.32, 1),top " + t + "s cubic-bezier(0.23, 1, 0.32, 1)";
return f(zp,
function(t) {
return t + "transition:" + e
}).join(";")
}
function xv(t) {
var e = [],
i = t.get("fontsize"),
n = t.gettextcolor();
return n && e.push("color:" + n),
e.push("font:" + t.getfont()),
i && e.push("line-height:" + math.round(3 * i / 2) + "px"),
wp(["decoration", "align"],
function(i) {
var n = t.get(i);
n && e.push("text-" + i + ":" + n)
}),
e.join(";")
}
function _v(t) {
var e = [],
i = t.get("transitionduration"),
n = t.get("backgroundcolor"),
o = t.getmodel("textstyle"),
a = t.get("padding");
return i && e.push(yv(i)),
n && (z_.canvassupported ? e.push("background-color:" + n) : (e.push("background-color:#" + ft(n)), e.push("filter:alpha(opacity=70)"))),
wp(["width", "color", "radius"],
function(i) {
var n = "border-" + i,
o = hp(n),
a = t.get(o);
null != a && e.push(n + ":" + a + ("color" === i ? "": "px"))
}),
e.push(xv(o)),
null != a && e.push("padding:" + om(a).join("px ") + "px"),
e.join(";") + ";"
}
function wv(t, e) {
if (z_.wxa) return null;
var i = document.createelement("div"),
n = this._zr = e.getzr();
this.el = i,
this._x = e.getwidth() / 2,
this._y = e.getheight() / 2,
t.appendchild(i),
this._container = t,
this._show = !1,
this._hidetimeout;
var o = this;
i.onmouseenter = function() {
o._enterable && (cleartimeout(o._hidetimeout), o._show = !0),
o._incontent = !0
},
i.onmousemove = function(e) {
if (e = e || window.event, !o._enterable) {
var i = n.handler;
lt(t, e, !0),
i.dispatch("mousemove", e)
}
},
i.onmouseleave = function() {
o._enterable && o._show && o.hidelater(o._hidedelay),
o._incontent = !1
}
}
function bv(t) {
this._zr = t.getzr(),
this._show = !1,
this._hidetimeout
}
function sv(t) {
for (var e = t.pop(); t.length;) {
var i = t.pop();
i && (lo.isinstance(i) && (i = i.get("tooltip", !0)), "string" == typeof i && (i = {
formatter: i
}), e = new lo(i, e, e.ecmodel))
}
return e
}
function mv(t, e) {
return t.dispatchaction || m(e.dispatchaction, e)
}
function iv(t, e, i, n, o, a, r) {
var s = i.getoutersize(),
l = s.width,
u = s.height;
return null != a && (t + l + a > n ? t -= l + a: t += a),
null != r && (e + u + r > o ? e -= u + r: e += r),
[t, e]
}
function tv(t, e, i, n, o) {
var a = i.getoutersize(),
r = a.width,
s = a.height;
return t = math.min(t + r, n) - r,
e = math.min(e + s, o) - s,
t = math.max(t, 0),
e = math.max(e, 0),
[t, e]
}
function av(t, e, i) {
var n = i[0],
o = i[1],
a = 0,
r = 0,
s = e.width,
l = e.height;
switch (t) {
case "inside":
a = e.x + s / 2 - n / 2,
r = e.y + l / 2 - o / 2;
break;
case "top":
a = e.x + s / 2 - n / 2,
r = e.y - o - 5;
break;
case "bottom":
a = e.x + s / 2 - n / 2,
r = e.y + l + 5;
break;
case "left":
a = e.x - n - 5,
r = e.y + l / 2 - o / 2;
break;
case "right":
a = e.x + s + 5,
r = e.y + l / 2 - o / 2
}
return [a, r]
}
function dv(t) {
return "center" === t || "middle" === t
}
function cv(t) {
return t.get("stack") || "__ec_stack_" + t.seriesindex
}
function lv(t) {
return t.dim
}
function kv(t, e) {
var i = {};
d(t,
function(t, e) {
var n = t.getdata(),
o = t.coordinatesystem.getbaseaxis(),
a = o.getextent(),
r = "category" === o.type ? o.getbandwidth() : math.abs(a[1] - a[0]) / n.count(),
s = i[lv(o)] || {
bandwidth: r,
remainedwidth: r,
autowidthcount: 0,
categorygap: "20%",
gap: "30%",
stacks: {}
},
l = s.stacks;
i[lv(o)] = s;
var u = cv(t);
l[u] || s.autowidthcount++,
l[u] = l[u] || {
width: 0,
maxwidth: 0
};
var h = ro(t.get("barwidth"), r),
c = ro(t.get("barmaxwidth"), r),
d = t.get("bargap"),
f = t.get("barcategorygap");
h && !l[u].width && (h = math.min(s.remainedwidth, h), l[u].width = h, s.remainedwidth -= h),
c && (l[u].maxwidth = c),
null != d && (s.gap = d),
null != f && (s.categorygap = f)
});
var n = {};
return d(i,
function(t, e) {
n[e] = {};
var i = t.stacks,
o = t.bandwidth,
a = ro(t.categorygap, o),
r = ro(t.gap, 1),
s = t.remainedwidth,
l = t.autowidthcount,
u = (s - a) / (l + (l - 1) * r);
u = math.max(u, 0),
d(i,
function(t, e) {
var i = t.maxwidth;
i && i < u && (i = math.min(i, s), t.width && (i = math.min(i, t.width)), s -= i, t.width = i, l--)
}),
u = (s - a) / (l + (l - 1) * r),
u = math.max(u, 0);
var h, c = 0;
d(i,
function(t, e) {
t.width || (t.width = u),
h = t,
c += t.width * (1 + r)
}),
h && (c -= h.width * r);
var f = -c / 2;
d(i,
function(t, i) {
n[e][i] = n[e][i] || {
offset: f,
width: t.width
},
f += t.width * (1 + r)
})
}),
n
}
function pv(t, e) {
ha.call(this, "radius", t, e),
this.type = "category"
}
function nv(t, e) {
e = e || [0, 360],
ha.call(this, "angle", t, e),
this.type = "category"
}
function ov(t, e) {
return e.type || (e.data ? "category": "value")
}
function ev(t, e, i) {
var n = e.get("center"),
o = i.getwidth(),
a = i.getheight();
t.cx = ro(n[0], o),
t.cy = ro(n[1], a);
var r = t.getradiusaxis(),
s = math.min(o, a) / 2,
l = ro(e.get("radius"), s);
r.inverse ? r.setextent(l, 0) : r.setextent(0, l)
}
function rv(t, e) {
var i = this,
n = i.getangleaxis(),
o = i.getradiusaxis();
if (n.scale.setextent(1 / 0, -1 / 0), o.scale.setextent(1 / 0, -1 / 0), t.eachseries(function(t) {
if (t.coordinatesystem === i) {
var e = t.getdata();
d(e.mapdimension("radius", !0),
function(t) {
o.scale.unionextentfromdata(e, cl(e, t))
}),
d(e.mapdimension("angle", !0),
function(t) {
n.scale.unionextentfromdata(e, cl(e, t))
})
}
}), bl(n.scale, n.model), bl(o.scale, o.model), "category" === n.type && !n.onband) {
var a = n.getextent(),
r = 360 / n.scale.count();
n.inverse ? a[1] += r: a[1] -= r,
n.setextent(a[0], a[1])
}
}
function zv(t, e) {
if (t.type = e.get("type"), t.scale = vl(e), t.onband = e.get("boundarygap") && "category" === t.type, t.inverse = e.get("inverse"), "angleaxis" === e.maintype) {
t.inverse ^= e.get("clockwise");
var i = e.get("startangle");
t.setextent(i, i + (t.inverse ? -360 : 360))
}
e.axis = t,
t.model = e
}
function bv(t, e, i) {
e[1] > e[0] && (e = e.slice().reverse());
var n = t.coordtopoint([e[0], i]),
o = t.coordtopoint([e[1], i]);
return {
x1: n[0],
y1: n[1],
x2: o[0],
y2: o[1]
}
}
function vv(t) {
return t.getradiusaxis().inverse ? 0 : 1
}
function gv(t) {
var e = t[0],
i = t[t.length - 1];
e && i && math.abs(math.abs(e.coord - i.coord) - 360) < 1e-4 && t.pop()
}
function fv(t, e, i) {
return {
position: [t.cx, t.cy],
rotation: i / 180 * math.pi,
labeldirection: -1,
tickdirection: -1,
namedirection: 1,
labelrotate: e.getmodel("axislabel").get("rotate"),
z2: 1
}
}
function wv(t, e, i, n, o) {
var a = e.axis,
r = a.datatocoord(t),
s = n.getangleaxis().getextent()[0];
s = s / 180 * math.pi;
var l, u, h, c = n.getradiusaxis().getextent();
if ("radius" === a.dim) {
var d = mt();
wt(d, d, s),
_t(d, d, [n.cx, n.cy]),
l = io([r, -o], d);
var f = e.getmodel("axislabel").get("rotate") || 0,
p = id.innertextlayout(s, f * math.pi / 180, -1);
u = p.textalign,
h = p.textverticalalign
} else {
var g = c[1];
l = n.coordtopoint([g + o, r]);
var m = n.cx,
v = n.cy;
u = math.abs(l[0] - m) / g < .3 ? "center": l[0] > m ? "left": "right",
h = math.abs(l[1] - v) / g < .3 ? "middle": l[1] > v ? "top": "bottom"
}
return {
position: l,
align: u,
verticalalign: h
}
}
function hv(t, e) {
e.update = "updateview",
ps(e,
function(e, i) {
var n = {};
return i.eachcomponent({
maintype: "geo",
query: e
},
function(i) {
i[t](e.name),
d(i.coordinatesystem.regions,
function(t) {
n[t.name] = i.isselected(t.name) || !1
})
}),
{
selected: n,
name: e.name
}
})
}
function zv(t) {
var e = {};
d(t,
function(t) {
e[t] = 1
}),
t.length = 0,
d(e,
function(e, i) {
t.push(i)
})
}
function uv(t) {
if (t) for (var e in t) if (t.hasownproperty(e)) return ! 0
}
function xv(t, e, n) {
function o() {
var t = function() {};
return t.prototype.__hidden = t.prototype,
new t
}
var a = {};
return rn(e,
function(e) {
var r = a[e] = o();
rn(t[e],
function(t, o) {
if (jc.isvalidtype(o)) {
var a = {
type: o,
visual: t
};
n && n(a, e),
r[o] = new jc(a),
"opacity" === o && ((a = i(a)).type = "coloralpha", r.__hidden.__alphaforopacity = new jc(a))
}
})
}),
a
}
function jv(t, e, n) {
var o;
d(n,
function(t) {
e.hasownproperty(t) && uv(e[t]) && (o = !0)
}),
o && d(n,
function(n) {
e.hasownproperty(n) && uv(e[n]) ? t[n] = i(e[n]) : delete t[n]
})
}
function yv(t, e, i, n, o, a) {
function r(t) {
return i.getitemvisual(h, t)
}
function s(t, e) {
i.setitemvisual(h, t, e)
}
function l(t, l) {
h = null == a ? t: l;
var c = i.getrawdataitem(h);
if (!c || !1 !== c.visualmap) for (var d = n.call(o, t), f = e[d], p = u[d], g = 0, m = p.length; g < m; g++) {
var v = p[g];
f[v] && f[v].applyvisual(t, r, s)
}
}
var u = {};
d(t,
function(t) {
var i = jc.preparevisualtypes(e[t]);
u[t] = i
});
var h;
null == a ? i.each(l) : i.each([a], l)
}
function qv(t, e, i, n) {
var o = {};
return d(t,
function(t) {
var i = jc.preparevisualtypes(e[t]);
o[t] = i
}),
{
progress: function(t, a) {
null != n && (n = a.getdimension(n));
for (var r; null != (r = t.next());) {
var s = a.getrawdataitem(r);
if (s && !1 === s.visualmap) return;
for (var l = null != n ? a.get(n, r, !0) : r, u = i(l), h = e[u], c = o[u], d = 0, f = c.length; d < f; d++) {
var p = c[d];
h[p] && h[p].applyvisual(l,
function(t) {
return a.getitemvisual(r, t)
},
function(t, e) {
a.setitemvisual(r, t, e)
})
}
}
}
}
}
function kv(t) {
var e = ["x", "y"],
i = ["width", "height"];
return {
point: function(e, i, n) {
if (e) {
var o = n.range;
return $v(e[t], o)
}
},
rect: function(n, o, a) {
if (n) {
var r = a.range,
s = [n[e[t]], n[e[t]] + n[i[t]]];
return s[1] < s[0] && s.reverse(),
$v(s[0], r) || $v(s[1], r) || $v(r[0], s) || $v(r[1], s)
}
}
}
}
function $v(t, e) {
return e[0] <= t && t <= e[1]
}
function jv(t, e, i, n, o) {
for (var a = 0,
r = o[o.length - 1]; a < o.length; a++) {
var s = o[a];
if (qv(t, e, i, n, s[0], s[1], r[0], r[1])) return ! 0;
r = s
}
}
function qv(t, e, i, n, o, a, r, s) {
var l = ey(i - t, o - r, n - e, a - s);
if (ty(l)) return ! 1;
var u = ey(o - t, o - r, a - e, a - s) / l;
if (u < 0 || u > 1) return ! 1;
var h = ey(i - t, o - t, n - e, a - e) / l;
return ! (h < 0 || h > 1)
}
function ty(t) {
return t <= 1e-6 && t >= -1e-6
}
function ey(t, e, i, n) {
return t * n - e * i
}
function iy(t, e, i) {
var n = this._targetinfolist = [],
o = {},
a = oy(e, t);
ln(pn,
function(t, e) { (!i || !i.include || un(i.include, e) >= 0) && t(a, n, o)
})
}
function ny(t) {
return t[0] > t[1] && t.reverse(),
t
}
function oy(t, e) {
return vi(t, e, {
includemaintypes: dn
})
}
function ay(t, e, i, n) {
var o = i.getaxis(["x", "y"][t]),
a = ny(f([0, 1],
function(t) {
return e ? o.coordtodata(o.tolocalcoord(n[t])) : o.toglobalcoord(o.datatocoord(n[t]))
})),
r = [];
return r[t] = a,
r[1 - t] = [nan, nan],
{
values: a,
xyminmax: r
}
}
function ry(t, e, i, n) {
return [e[0] - n[t] * i[0], e[1] - n[t] * i[1]]
}
function sy(t, e) {
var i = ly(t),
n = ly(e),
o = [i[0] / n[0], i[1] / n[1]];
return isnan(o[0]) && (o[0] = 1),
isnan(o[1]) && (o[1] = 1),
o
}
function ly(t) {
return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [nan, nan]
}
function uy(t, e, i, n, o) {
if (o) {
var a = t.getzr();
a[wn] || (a[_n] || (a[_n] = hy), lr(a, _n, i, e)(t, n))
}
}
function hy(t, e) {
if (!t.isdisposed()) {
var i = t.getzr();
i[wn] = !0,
t.dispatchaction({
type: "brushselect",
batch: e
}),
i[wn] = !1
}
}
function cy(t, e, i, n) {
for (var o = 0,
a = e.length; o < a; o++) {
var r = e[o];
if (t[r.brushtype](n, i, r.selectors, r)) return ! 0
}
}
function dy(t) {
var e = t.brushselector;
if (_(e)) {
var i = [];
return d(sn,
function(t, n) {
i[n] = function(i, n, o, a) {
var r = n.getitemlayout(i);
return t[e](r, o, a)
}
}),
i
}
if (x(e)) {
var n = {};
return d(sn,
function(t, i) {
n[i] = e
}),
n
}
return e
}
function fy(t, e) {
var i = t.option.seriesindex;
return null != i && "all" !== i && (y(i) ? l(i, e) < 0 : e !== i)
}
function py(t) {
var e = t.selectors = {};
return d(sn[t.brushtype],
function(i, n) {
e[n] = function(n) {
return i(n, e, t)
}
}),
t
}
function gy(t) {
return new ue(t[0][0], t[1][0], t[0][1] - t[0][0], t[1][1] - t[1][0])
}
function my(t, e) {
return n({
brushtype: t.brushtype,
brushmode: t.brushmode,
transformable: t.transformable,
brushstyle: new lo(t.brushstyle).getitemstyle(),
removeonclick: t.removeonclick,
z: t.z
},
e, !0)
}
function vy(t, e, i, n) { (!n || n.$from !== t.id) && this._brushcontroller.setpanels(t.brushtargetmanager.makepanelopts(i)).enablebrush(t.brushoption).updatecovers(t.areas.slice())
}
function yy(t, e) {
in[t] = e
}
function xy(t) {
return in[t]
}
function _y(t, e, i) {
this.model = t,
this.ecmodel = e,
this.api = i,
this._brushtype,
this._brushmode
}
function wy(t, e, i) {
this._model = t
}
function by(t, e, i, n) {
var o = i.calendarmodel,
a = i.seriesmodel,
r = o ? o.coordinatesystem: a ? a.coordinatesystem: null;
return r === this ? r[t](n) : null
}
function sy(t, e) {
var i = t.cellsize;
y(i) ? 1 === i.length && (i[1] = i[0]) : i = t.cellsize = [i, i];
var n = f([0, 1],
function(t) {
return ha(e, t) && (i[t] = "auto"),
null != i[t] && "auto" !== i[t]
});
ca(t, e, {
type: "box",
ignoresize: n
})
}
function my(t) {
return l(kn, t) >= 0
}
function iy(t, e, i) {
function n(t, e) {
return l(e.nodes, t) >= 0
}
function o(t, n) {
var o = !1;
return e(function(e) {
d(i(t, e) || [],
function(t) {
n.records[e.name][t] && (o = !0)
})
}),
o
}
function a(t, n) {
n.nodes.push(t),
e(function(e) {
d(i(t, e) || [],
function(t) {
n.records[e.name][t] = !0
})
})
}
return function(i) {
var r = {
nodes: [],
records: {}
};
if (e(function(t) {
r.records[t.name] = {}
}), !i) return r;
a(i, r);
var s;
do {
s = !1, t(function(t) { ! n(t, r) && o(t, r) && (a(t, r), s = !0)
})
} while ( s );
return r
}
}
function ty(t, e, i) {
var n = [1 / 0, -1 / 0];
return nn(i,
function(t) {
var i = t.getdata();
i && nn(i.mapdimension(e, !0),
function(t) {
var e = i.getapproximateextent(t);
e[0] < n[0] && (n[0] = e[0]),
e[1] > n[1] && (n[1] = e[1])
})
}),
n[1] < n[0] && (n = [nan, nan]),
ay(t, n),
n
}
function ay(t, e) {
var i = t.getaxismodel(),
n = i.getmin(!0),
o = "category" === i.get("type"),
a = o && i.getcategories().length;
null != n && "datamin" !== n && "function" != typeof n ? e[0] = n: o && (e[0] = a > 0 ? 0 : nan);
var r = i.getmax(!0);
return null != r && "datamax" !== r && "function" != typeof r ? e[1] = r: o && (e[1] = a > 0 ? a - 1 : nan),
i.get("scale", !0) || (e[0] > 0 && (e[0] = 0), e[1] < 0 && (e[1] = 0)),
e
}
function dy(t, e) {
var i = t.getaxismodel(),
n = t._percentwindow,
o = t._valuewindow;
if (n) {
var a = fo(o, [0, 500]);
a = math.min(a, 20);
var r = e || 0 === n[0] && 100 === n[1];
i.setrange(r ? null: +o[0].tofixed(a), r ? null: +o[1].tofixed(a))
}
}
function cy(t) {
var e = t._minmaxspan = {},
i = t._datazoommodel;
nn(["min", "max"],
function(n) {
e[n + "span"] = i.get(n + "span");
var o = i.get(n + "valuespan");
if (null != o && (e[n + "valuespan"] = o, null != (o = t.getaxismodel().axis.scale.parse(o)))) {
var a = t._dataextent;
e[n + "span"] = eo(a[0] + o, a, [0, 100], !0)
}
})
}
function ly(t) {
var e = {};
return rn(["start", "end", "startvalue", "endvalue", "throttle"],
function(i) {
t.hasownproperty(i) && (e[i] = t[i])
}),
e
}
function ky(t, e) {
var i = t._rangepropmode,
n = t.get("rangemode");
rn([["start", "startvalue"], ["end", "endvalue"]],
function(t, o) {
var a = null != e[t[0]],
r = null != e[t[1]];
a && !r ? i[o] = "percent": !a && r ? i[o] = "value": n ? i[o] = n[o] : a && (i[o] = "percent")
})
}
function py(t) {
return {
x: "y",
y: "x",
radius: "angle",
angle: "radius"
} [t]
}
function ny(t) {
return "vertical" === t ? "ns-resize": "ew-resize"
}
function oy(t, e) {
var i = zy(t),
n = e.datazoomid,
o = e.coordid;
d(i,
function(t, i) {
var a = t.datazoominfos;
a[n] && l(e.allcoordids, o) < 0 && (delete a[n], t.count--)
}),
vy(i);
var a = i[o];
a || ((a = i[o] = {
coordid: o,
datazoominfos: {},
count: 0
}).controller = by(t, a), a.dispatchaction = v(gy, t)),
!a.datazoominfos[n] && a.count++,
a.datazoominfos[n] = e;
var r = fy(a.datazoominfos);
a.controller.enable(r.controltype, r.opt),
a.controller.setpointerchecker(e.containspoint),
lr(a, "dispatchaction", e.datazoommodel.get("throttle", !0), "fixrate")
}
function ey(t, e) {
var i = zy(t);
d(i,
function(t) {
t.controller.dispose();
var i = t.datazoominfos;
i[e] && (delete i[e], t.count--)
}),
vy(i)
}
function ry(t) {
return t.type + "\0_" + t.id
}
function zy(t) {
var e = t.getzr();
return e[qn] || (e[qn] = {})
}
function by(t, e) {
var i = new ac(t.getzr());
return d(["pan", "zoom", "scrollmove"],
function(t) {
i.on(t,
function(i) {
var n = [];
d(e.datazoominfos,
function(o) {
if (i.isavailablebehavior(o.datazoommodel.option)) {
var a = (o.getrange || {})[t],
r = a && a(e.controller, i); ! o.datazoommodel.get("disabled", !0) && r && n.push({
datazoomid: o.datazoomid,
start: r[0],
end: r[1]
})
}
}),
n.length && e.dispatchaction(n)
})
}),
i
}
function vy(t) {
d(t,
function(e, i) {
e.count || (e.controller.dispose(), delete t[i])
})
}
function gy(t, e) {
t.dispatchaction({
type: "datazoom",
batch: e
})
}
function fy(t) {
var e, i = {
type_true: 2,
type_move: 1,
type_false: 0,
type_undefined: -1
},
n = !0;
return d(t,
function(t) {
var o = t.datazoommodel,
a = !o.get("disabled", !0) && (!o.get("zoomlock", !0) || "move");
i["type_" + a] > i["type_" + e] && (e = a),
n &= o.get("preventdefaultmousemove", !0)
}),
{
controltype: e,
opt: {
zoomonmousewheel: !0,
moveonmousemove: !0,
moveonmousewheel: !0,
preventdefaultmousemove: !!n
}
}
}
function wy(t) {
return function(e, i, n, o) {
var a = this._range,
r = a.slice(),
s = e.axismodels[0];
if (s) {
var l = t(r, s, e, i, n, o);
return el(l, r, [0, 100], "all"),
this._range = r,
a[0] !== r[0] || a[1] !== r[1] ? r: void 0
}
}
}
function hy(t, e) {
return t && t.hasownproperty && t.hasownproperty(e)
}
function zy(t, e, i, n) {
for (var o = e.targetvisuals[n], a = jc.preparevisualtypes(o), r = {
color: t.getdata().getvisual("color")
},
s = 0, l = a.length; s < l; s++) {
var u = a[s],
h = o["opacity" === u ? "__alphaforopacity": u];
h && h.applyvisual(i,
function(t) {
return r[t]
},
function(t, e) {
r[t] = e
})
}
return r.color
}
function uy(t, e, i) {
if (i[0] === i[1]) return i.slice();
for (var n = (i[1] - i[0]) / 200, o = i[0], a = [], r = 0; r <= 200 && o < i[1]; r++) a.push(o),
o += n;
return a.push(i[1]),
a
}
function xy(t, e, i) {
var n = t.option,
o = n.align;
if (null != o && "auto" !== o) return o;
for (var a = {
width: e.getwidth(),
height: e.getheight()
},
r = "horizontal" === n.orient ? 1 : 0, s = [["left", "right", "width"], ["top", "bottom", "height"]], l = s[r], u = [0, null, 10], h = {},
c = 0; c < 3; c++) h[s[1 - r][c]] = u[c],
h[l[c]] = 2 === c ? i[0] : n[l[c]];
var d = [["x", "width", 3], ["y", "height", 0]][r],
f = la(h, a, n.padding);
return l[(f.margin[d[2]] || 0) + f[d[0]] + .5 * f[d[1]] < .5 * a[d[1]] ? 0 : 1]
}
function jy(t) {
return d(t || [],
function(e) {
null != t.dataindex && (t.dataindexinside = t.dataindex, t.dataindex = null)
}),
t
}
function yy(t, e, i, n) {
return new nm({
shape: {
points: t
},
draggable: !!i,
cursor: e,
drift: i,
onmousemove: function(t) {
lw(t.event)
},
ondragend: n
})
}
function qy(t, e) {
return 0 === t ? [[0, 0], [e, 0], [e, -e]] : [[0, 0], [e, 0], [e, e]]
}
function ky(t, e, i, n) {
return t ? [[0, -yo(e, xo(i, 0))], [wo, 0], [0, yo(e, xo(n - i, 0))]] : [[0, 0], [5, -5], [5, 5]]
}
function $y(t, e, i) {
var n = _o / 2,
o = t.get("hoverlinkdatasize");
return o && (n = mo(o, e, i, !0) / 2),
n
}
function jy(t) {
var e = t.get("hoverlinkonhandle");
return !! (null == e ? t.get("realtime") : e)
}
function qy(t) {
return "vertical" === t ? "ns-resize": "ew-resize"
}
function tx(t, e) {
var i = t.inverse; ("vertical" === t.orient ? !i: i) && e.reverse()
}
function ex(t) {
ci(t, "label", ["show"])
}
function ix(t) {
return ! (isnan(parsefloat(t.x)) && isnan(parsefloat(t.y)))
}
function nx(t) {
return ! isnan(parsefloat(t.x)) && !isnan(parsefloat(t.y))
}
function ox(t, e, i, n, o, a) {
var r = [],
s = hl(e, n) ? e.getcalculationinfo("stackresultdimension") : n,
l = hx(e, s, t),
u = e.indicesofnearest(s, l)[0];
r[o] = e.get(i, u),
r[a] = e.get(n, u);
var h = vo(e.get(n, u));
return (h = math.min(h, 20)) >= 0 && (r[a] = +r[a].tofixed(h)),
r
}
function ax(t, e) {
var n = t.getdata(),
o = t.coordinatesystem;
if (e && !nx(e) && !y(e.coord) && o) {
var a = o.dimensions,
r = rx(e, n, o, t);
if ((e = i(e)).type && lo[e.type] && r.baseaxis && r.valueaxis) {
var s = do(a, r.baseaxis.dim),
l = do(a, r.valueaxis.dim);
e.coord = lo[e.type](n, r.basedatadim, r.valuedatadim, s, l),
e.value = e.coord[l]
} else {
for (var u = [null != e.xaxis ? e.xaxis: e.radiusaxis, null != e.yaxis ? e.yaxis: e.angleaxis], h = 0; h < 2; h++) lo[u[h]] && (u[h] = hx(n, n.mapdimension(a[h]), u[h]));
e.coord = u
}
}
return e
}
function rx(t, e, i, n) {
var o = {};
return null != t.valueindex || null != t.valuedim ? (o.valuedatadim = null != t.valueindex ? e.getdimension(t.valueindex) : t.valuedim, o.valueaxis = i.getaxis(sx(n, o.valuedatadim)), o.baseaxis = i.getotheraxis(o.valueaxis), o.basedatadim = e.mapdimension(o.baseaxis.dim)) : (o.baseaxis = n.getbaseaxis(), o.valueaxis = i.getotheraxis(o.baseaxis), o.basedatadim = e.mapdimension(o.baseaxis.dim), o.valuedatadim = e.mapdimension(o.valueaxis.dim)),
o
}
function sx(t, e) {
var i = t.getdata(),
n = i.dimensions;
e = i.getdimension(e);
for (var o = 0; o < n.length; o++) {
var a = i.getdimensioninfo(n[o]);
if (a.name === e) return a.coorddim
}
}
function lx(t, e) {
return ! (t && t.containdata && e.coord && !ix(e)) || t.containdata(e.coord)
}
function ux(t, e, i, n) {
return n < 2 ? t.coord && t.coord[n] : t.value
}
function hx(t, e, i) {
if ("average" === i) {
var n = 0,
o = 0;
return t.each(e,
function(t, e) {
isnan(t) || (n += t, o++)
}),
n / o
}
return "median" === i ? t.getmedian(e) : t.getdataextent(e, !0)["max" === i ? 1 : 0]
}
function cx(t, e, i) {
var n = e.coordinatesystem;
t.each(function(o) {
var a, r = t.getitemmodel(o),
s = ro(r.get("x"), i.getwidth()),
l = ro(r.get("y"), i.getheight());
if (isnan(s) || isnan(l)) {
if (e.getmarkerposition) a = e.getmarkerposition(t.getvalues(t.dimensions, o));
else if (n) {
var u = t.get(n.dimensions[0], o),
h = t.get(n.dimensions[1], o);
a = n.datatopoint([u, h])
}
} else a = [s, l];
isnan(s) || (a[0] = s),
isnan(l) || (a[1] = l),
t.setitemlayout(o, a)
})
}
function dx(t, e, i) {
var n;
n = t ? f(t && t.dimensions,
function(t) {
return r({
name: t
},
e.getdata().getdimensioninfo(e.getdata().mapdimension(t)) || {})
}) : [{
name: "value",
type: "float"
}];
var o = new ea(n, i),
a = f(i.get("data"), v(ax, e));
return t && (a = g(a, v(lx, t))),
o.initdata(a, null, t ? ux: function(t) {
return t.value
}),
o
}
function fx(t) {
return ! isnan(t) && !isfinite(t)
}
function px(t, e, i, n) {
var o = 1 - t,
a = n.dimensions[t];
return fx(e[o]) && fx(i[o]) && e[t] === i[t] && n.getaxis(a).containdata(e[t])
}
function gx(t, e) {
if ("cartesian2d" === t.type) {
var i = e[0].coord,
n = e[1].coord;
if (i && n && (px(1, i, n, t) || px(0, i, n, t))) return ! 0
}
return lx(t, e[0]) && lx(t, e[1])
}
function mx(t, e, i, n, o) {
var a, r = n.coordinatesystem,
s = t.getitemmodel(e),
l = ro(s.get("x"), o.getwidth()),
u = ro(s.get("y"), o.getheight());
if (isnan(l) || isnan(u)) {
if (n.getmarkerposition) a = n.getmarkerposition(t.getvalues(t.dimensions, e));
else {
var h = r.dimensions,
c = t.get(h[0], e),
d = t.get(h[1], e);
a = r.datatopoint([c, d])
}
if ("cartesian2d" === r.type) {
var f = r.getaxis("x"),
p = r.getaxis("y"),
h = r.dimensions;
fx(t.get(h[0], e)) ? a[0] = f.toglobalcoord(f.getextent()[i ? 0 : 1]) : fx(t.get(h[1], e)) && (a[1] = p.toglobalcoord(p.getextent()[i ? 0 : 1]))
}
isnan(l) || (a[0] = l),
isnan(u) || (a[1] = u)
} else a = [l, u];
t.setitemlayout(e, a)
}
function vx(t, e, i) {
var n;
n = t ? f(t && t.dimensions,
function(t) {
return r({
name: t
},
e.getdata().getdimensioninfo(e.getdata().mapdimension(t)) || {})
}) : [{
name: "value",
type: "float"
}];
var o = new ea(n, i),
a = new ea(n, i),
s = new ea([], i),
l = f(i.get("data"), v(po, e, t, i));
t && (l = g(l, v(gx, t)));
var u = t ? ux: function(t) {
return t.value
};
return o.initdata(f(l,
function(t) {
return t[0]
}), null, u),
a.initdata(f(l,
function(t) {
return t[1]
}), null, u),
s.initdata(f(l,
function(t) {
return t[2]
})),
s.hasitemoption = !0,
{
from: o,
to: a,
line: s
}
}
function yx(t) {
return ! isnan(t) && !isfinite(t)
}
function xx(t, e, i, n) {
var o = 1 - t;
return yx(e[o]) && yx(i[o])
}
function _x(t, e) {
var i = e.coord[0],
n = e.coord[1];
return ! ("cartesian2d" !== t.type || !i || !n || !xx(1, i, n, t) && !xx(0, i, n, t)) || (lx(t, {
coord: i,
x: e.x0,
y: e.y0
}) || lx(t, {
coord: n,
x: e.x1,
y: e.y1
}))
}
function bx(t, e, i, n, o) {
var a, r = n.coordinatesystem,
s = t.getitemmodel(e),
l = ro(s.get(i[0]), o.getwidth()),
u = ro(s.get(i[1]), o.getheight());
if (isnan(l) || isnan(u)) {
if (n.getmarkerposition) a = n.getmarkerposition(t.getvalues(i, e));
else {
var h = [f = t.get(i[0], e), p = t.get(i[1], e)];
r.clampdata && r.clampdata(h, h),
a = r.datatopoint(h, !0)
}
if ("cartesian2d" === r.type) {
var c = r.getaxis("x"),
d = r.getaxis("y"),
f = t.get(i[0], e),
p = t.get(i[1], e);
yx(f) ? a[0] = c.toglobalcoord(c.getextent()["x0" === i[0] ? 0 : 1]) : yx(p) && (a[1] = d.toglobalcoord(d.getextent()["y0" === i[1] ? 0 : 1]))
}
isnan(l) || (a[0] = l),
isnan(u) || (a[1] = u)
} else a = [l, u];
return a
}
function sx(t, e, i) {
var n, o, a = ["x0", "y0", "x1", "y1"];
t ? (n = f(t && t.dimensions,
function(t) {
var i = e.getdata();
return r({
name: t
},
i.getdimensioninfo(i.mapdimension(t)) || {})
}), o = new ea(f(a,
function(t, e) {
return {
name: t,
type: n[e % 2].type
}
}), i)) : o = new ea(n = [{
name: "value",
type: "float"
}], i);
var s = f(i.get("data"), v(no, e, t, i));
t && (s = g(s, v(_x, t)));
var l = t ?
function(t, e, i, n) {
return t.coord[math.floor(n / 2)][n % 2]
}: function(t) {
return t.value
};
return o.initdata(s, null, l),
o.hasitemoption = !0,
o
}
function mx(t) {
var e = t.type,
i = {
number: "value",
time: "time"
};
if (i[e] && (t.axistype = i[e], delete t.type), ix(t), tx(t, "controlposition")) {
var n = t.controlstyle || (t.controlstyle = {});
tx(n, "position") || (n.position = t.controlposition),
"none" !== n.position || tx(n, "show") || (n.show = !1, delete n.position),
delete t.controlposition
}
d(t.data || [],
function(t) {
w(t) && !y(t) && (!tx(t, "value") && tx(t, "name") && (t.value = t.name), ix(t))
})
}
function ix(t) {
var e = t.itemstyle || (t.itemstyle = {}),
i = e.emphasis || (e.emphasis = {}),
n = t.label || t.label || {},
o = n.normal || (n.normal = {}),
a = {
normal: 1,
emphasis: 1
};
d(n,
function(t, e) {
a[e] || tx(o, e) || (o[e] = t)
}),
i.label && !tx(n, "emphasis") && (n.emphasis = i.label, delete i.label)
}
function tx(t, e) {
return t.hasownproperty(e)
}
function ax(t, e) {
return la(t.getboxlayoutparams(), {
width: e.getwidth(),
height: e.getheight()
},
t.get("padding"))
}
function dx(t, e, n, o) {
return wn(t.get(e).replace(/^path:\/\//, ""), i(o || {}), new ue(n[0], n[1], n[2], n[3]), "center")
}
function cx(t, e, i, o, a, r) {
var s = e.get("color");
a ? (a.setcolor(s), i.add(a), r && r.onupdate(a)) : ((a = xl(t.get("symbol"), -1, -1, 2, 2, s)).setstyle("strokenoscale", !0), i.add(a), r && r.oncreate(a));
var l = e.getitemstyle(["color", "symbol", "symbolsize"]);
a.setstyle(l),
o = n({
recthover: !0,
z2: 100
},
o, !0);
var u = t.get("symbolsize"); (u = u instanceof array ? u.slice() : [ + u, +u])[0] /= 2,
u[1] /= 2,
o.scale = u;
var h = t.get("symboloffset");
if (h) {
var c = o.position = o.position || [0, 0];
c[0] += ro(h[0], u[0]),
c[1] += ro(h[1], u[1])
}
var d = t.get("symbolrotate");
return o.rotation = (d || 0) * math.pi / 180 || 0,
a.attr(o),
a.updatetransform(),
a
}
function lx(t, e, i, n, o) {
if (!t.dragging) {
var a = n.getmodel("checkpointstyle"),
r = i.datatocoord(n.getdata().get(["value"], e));
o || !a.get("animation", !0) ? t.attr({
position: [r, 0]
}) : (t.stopanimation(!0), t.animateto({
position: [r, 0]
},
a.get("animationduration", !0), a.get("animationeasing", !0)))
}
}
function kx(t) {
return 0 === t.indexof("my")
}
function px(t) {
this.model = t
}
function nx(t) {
this.model = t
}
function ox(t) {
var e = {},
i = [],
n = [];
return t.eachrawseries(function(t) {
var o = t.coordinatesystem;
if (!o || "cartesian2d" !== o.type && "polar" !== o.type) i.push(t);
else {
var a = o.getbaseaxis();
if ("category" === a.type) {
var r = a.dim + "_" + a.index;
e[r] || (e[r] = {
categoryaxis: a,
valueaxis: o.getotheraxis(a),
series: []
},
n.push({
axisdim: a.dim,
axisindex: a.index
})),
e[r].series.push(t)
} else i.push(t)
}
}),
{
seriesgroupbycategoryaxis: e,
other: i,
meta: n
}
}
function ex(t) {
var e = [];
return d(t,
function(t, i) {
var n = t.categoryaxis,
o = t.valueaxis.dim,
a = [" "].concat(f(t.series,
function(t) {
return t.name
})),
r = [n.model.getcategories()];
d(t.series,
function(t) {
r.push(t.getrawdata().maparray(o,
function(t) {
return t
}))
});
for (var s = [a.join(qo)], l = 0; l < r[0].length; l++) {
for (var u = [], h = 0; h < r.length; h++) u.push(r[h][l]);
s.push(u.join(qo))
}
e.push(s.join("\n"))
}),
e.join("\n\n" + yo + "\n\n")
}
function rx(t) {
return f(t,
function(t) {
var e = t.getrawdata(),
i = [t.name],
n = [];
return e.each(e.dimensions,
function() {
for (var t = arguments.length,
o = arguments[t - 1], a = e.getname(o), r = 0; r < t - 1; r++) n[r] = arguments[r];
i.push((a ? a + qo: "") + n.join(qo))
}),
i.join("\n")
}).join("\n\n" + yo + "\n\n")
}
function zx(t) {
var e = ox(t);
return {
value: g([ex(e.seriesgroupbycategoryaxis), rx(e.other)],
function(t) {
return t.replace(/[\n\t\s]/g, "")
}).join("\n\n" + yo + "\n\n"),
meta: e.meta
}
}
function bx(t) {
return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "")
}
function vx(t) {
if (t.slice(0, t.indexof("\n")).indexof(qo) >= 0) return ! 0
}
function gx(t) {
for (var e = t.split(/\n+/g), i = [], n = f(bx(e.shift()).split(ko),
function(t) {
return {
name: t,
data: []
}
}), o = 0; o < e.length; o++) {
var a = bx(e[o]).split(ko);
i.push(a.shift());
for (var r = 0; r < a.length; r++) n[r] && (n[r].data[o] = a[r])
}
return {
series: n,
categories: i
}
}
function fx(t) {
for (var e = t.split(/\n+/g), i = bx(e.shift()), n = [], o = 0; o < e.length; o++) {
var a, r = bx(e[o]).split(ko),
s = "",
l = !1;
isnan(r[0]) ? (l = !0, s = r[0], r = r.slice(1), n[o] = {
name: s,
value: []
},
a = n[o].value) : a = n[o] = [];
for (var u = 0; u < r.length; u++) a.push( + r[u]);
1 === a.length && (l ? n[o].value = a[0] : n[o] = a[0])
}
return {
name: i,
data: n
}
}
function wx(t, e) {
var i = {
series: []
};
return d(t.split(new regexp("\n*" + yo + "\n*", "g")),
function(t, n) {
if (vx(t)) {
var o = gx(t),
a = e[n],
r = a.axisdim + "axis";
a && (i[r] = i[r] || [], i[r][a.axisindex] = {
data: o.categories
},
i.series = i.series.concat(o.series))
} else {
o = fx(t);
i.series.push(o)
}
}),
i
}
function hx(t) {
this._dom = null,
this.model = t
}
function zx(t, e) {
return f(t,
function(t, i) {
var n = e && e[i];
return w(n) && !y(n) ? (w(t) && !y(t) && (t = t.value), r({
value: t
},
n)) : t
})
}
function ux(t, e) {
var i = qx(t);
$o(e,
function(e, n) {
for (var o = i.length - 1; o >= 0 && !i[o][n]; o--);
if (o < 0) {
var a = t.querycomponents({
maintype: "datazoom",
subtype: "select",
id: n
})[0];
if (a) {
var r = a.getpercentrange();
i[0][n] = {
datazoomid: n,
start: r[0],
end: r[1]
}
}
}
}),
i.push(e)
}
function xx(t) {
var e = qx(t),
i = e[e.length - 1];
e.length > 1 && e.pop();
var n = {};
return $o(i,
function(t, i) {
for (var o = e.length - 1; o >= 0; o--) if (t = e[o][i]) {
n[i] = t;
break
}
}),
n
}
function jx(t) {
t[jo] = null
}
function yx(t) {
return qx(t).length
}
function qx(t) {
var e = t[jo];
return e || (e = t[jo] = [{}]),
e
}
function kx(t, e, i) { (this._brushcontroller = new cf(i.getzr())).on("brush", m(this._onbrush, this)).mount(),
this._iszoomactive
}
function $x(t) {
var e = {};
return d(["xaxisindex", "yaxisindex"],
function(i) {
e[i] = t[i],
null == e[i] && (e[i] = "all"),
(!1 === e[i] || "none" === e[i]) && (e[i] = [])
}),
e
}
function jx(t, e) {
t.seticonstatus("back", yx(e) > 1 ? "emphasis": "normal")
}
function qx(t, e, i, n, o) {
var a = i._iszoomactive;
n && "takeglobalcursor" === n.type && (a = "datazoomselect" === n.key && n.datazoomselectactive),
i._iszoomactive = a,
t.seticonstatus("zoom", a ? "emphasis": "normal");
var r = new iy($x(t.option), e, {
include: ["grid"]
});
i._brushcontroller.setpanels(r.makepanelopts(o,
function(t) {
return t.xaxisdeclared && !t.yaxisdeclared ? "linex": !t.xaxisdeclared && t.yaxisdeclared ? "liney": "rect"
})).enablebrush( !! a && {
brushtype: "auto",
brushstyle: {
linewidth: 0,
fill: "rgba(0,0,0,0.2)"
}
})
}
function t_(t) {
this.model = t
}
function e_(t) {
return ae(t)
}
function i_() {
if (!le && ue) {
le = !0;
var t = ue.stylesheets;
t.length < 31 ? ue.createstylesheet().addrule(".zrvml", "behavior:url(#default#vml)") : t[0].addrule(".zrvml", "behavior:url(#default#vml)")
}
}
function n_(t) {
return parseint(t, 10)
}
function o_(t, e) {
i_(),
this.root = t,
this.storage = e;
var i = document.createelement("div"),
n = document.createelement("div");
i.style.csstext = "display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",
n.style.csstext = "position:absolute;left:0;top:0;",
t.appendchild(i),
this._vmlroot = n,
this._vmlviewport = i,
this.resize();
var o = e.delfromstorage,
a = e.addtostorage;
e.delfromstorage = function(t) {
o.call(e, t),
t && t.onremove && t.onremove(n)
},
e.addtostorage = function(t) {
t.onadd && t.onadd(n),
a.call(e, t)
},
this._firstpaint = !0
}
function a_(t) {
return function() {
bw('in ie8.0 vml mode painter not support method "' + t + '"')
}
}
function r_(t) {
return document.createelementns(he, t)
}
function s_(t) {
return je(1e4 * t) / 1e4
}
function l_(t) {
return t < qe && t > -qe
}
function u_(t, e) {
var i = e ? t.textfill: t.fill;
return null != i && i !== xe
}
function h_(t, e) {
var i = e ? t.textstroke: t.stroke;
return null != i && i !== xe
}
function c_(t, e) {
e && d_(t, "transform", "matrix(" + ue.call(e, ",") + ")")
}
function d_(t, e, i) { (!i || "linear" !== i.type && "radial" !== i.type) && ("string" == typeof i && i.indexof("nan") > -1 && console.log(i), t.setattribute(e, i))
}
function f_(t, e, i) {
t.setattributens("http://www.w3.org/1999/xlink", e, i)
}
function p_(t, e, i, n) {
if (u_(e, i)) {
var o = i ? e.textfill: e.fill;
o = "transparent" === o ? xe: o,
"none" !== t.getattribute("clip-path") && o === xe && (o = "rgba(0, 0, 0, 0.002)"),
d_(t, "fill", o),
d_(t, "fill-opacity", null != e.fillopacity ? e.fillopacity * e.opacity: e.opacity)
} else d_(t, "fill", xe);
if (h_(e, i)) {
var a = i ? e.textstroke: e.stroke;
d_(t, "stroke", a = "transparent" === a ? xe: a),
d_(t, "stroke-width", (i ? e.textstrokewidth: e.linewidth) / (!i && e.strokenoscale ? n.getlinescale() : 1)),
d_(t, "paint-order", i ? "stroke": "fill"),
d_(t, "stroke-opacity", null != e.strokeopacity ? e.strokeopacity: e.opacity),
e.linedash ? (d_(t, "stroke-dasharray", e.linedash.join(",")), d_(t, "stroke-dashoffset", je(e.linedashoffset || 0))) : d_(t, "stroke-dasharray", ""),
e.linecap && d_(t, "stroke-linecap", e.linecap),
e.linejoin && d_(t, "stroke-linejoin", e.linejoin),
e.miterlimit && d_(t, "stroke-miterlimit", e.miterlimit)
} else d_(t, "stroke", xe)
}
function g_(t) {
for (var e = [], i = t.data, n = t.len(), o = 0; o < n;) {
var a = "",
r = 0;
switch (i[o++]) {
case ze.m:
a = "m",
r = 2;
break;
case ze.l:
a = "l",
r = 2;
break;
case ze.q:
a = "q",
r = 4;
break;
case ze.c:
a = "c",
r = 6;
break;
case ze.a:
var s = i[o++],
l = i[o++],
u = i[o++],
h = i[o++],
c = i[o++],
d = i[o++],
f = i[o++],
p = i[o++],
g = math.abs(d),
m = l_(g - $e) && !l_(g),
v = !1;
v = g >= $e || !l_(g) && (d > -ke && d < 0 || d > ke) == !!p;
var y = s_(s + u * qe(c)),
x = s_(l + h * ye(c));
m && (d = p ? $e - 1e-4: 1e-4 - $e, v = !0, 9 === o && e.push("m", y, x));
var _ = s_(s + u * qe(c + d)),
w = s_(l + h * ye(c + d));
e.push("a", s_(u), s_(h), je(f * je), +v, +p, _, w);
break;
case ze.z:
a = "z";
break;
case ze.r:
var _ = s_(i[o++]),
w = s_(i[o++]),
b = s_(i[o++]),
s = s_(i[o++]);
e.push("m", _, w, "l", _ + b, w, "l", _ + b, w + s, "l", _, w + s, "l", _, w)
}
a && e.push(a);
for (var m = 0; m < r; m++) e.push(s_(i[o++]))
}
return e.join(" ")
}
function m_(t) {
return "middle" === t ? "middle": "bottom" === t ? "after-edge": "hanging"
}
function v_() {}
function y_(t, e, i, n) {
for (var o = 0,
a = e.length,
r = 0,
s = 0; o < a; o++) {
var l = e[o];
if (l.removed) {
for (var u = [], h = s; h < s + l.count; h++) u.push(h);
l.indices = u,
s += l.count
} else {
for (var u = [], h = r; h < r + l.count; h++) u.push(h);
l.indices = u,
r += l.count,
l.added || (s += l.count)
}
}
return e
}
function x_(t) {
return {
newpos: t.newpos,
components: t.components.slice(0)
}
}
function __(t, e, i, n, o) {
this._zrid = t,
this._svgroot = e,
this._tagnames = "string" == typeof i ? [i] : i,
this._marklabel = n,
this._domname = o || "_dom",
this.nextid = 0
}
function w_(t, e) {
__.call(this, t, e, ["lineargradient", "radialgradient"], "__gradient_in_use__")
}
function b_(t, e) {
__.call(this, t, e, "clippath", "__clippath_in_use__")
}
function s_(t, e) {
__.call(this, t, e, ["filter"], "__filter_in_use__", "_shadowdom")
}
function m_(t) {
return t && (t.shadowblur || t.shadowoffsetx || t.shadowoffsety || t.textshadowblur || t.textshadowoffsetx || t.textshadowoffsety)
}
function i_(t) {
return parseint(t, 10)
}
function t_(t) {
return t instanceof kn ? tr: t instanceof hi ? er: t instanceof qs ? ir: tr
}
function a_(t, e) {
return e && t && e.parentnode !== t
}
function d_(t, e, i) {
if (a_(t, e) && i) {
var n = i.nextsibling;
n ? t.insertbefore(e, n) : t.appendchild(e)
}
}
function c_(t, e) {
if (a_(t, e)) {
var i = t.firstchild;
i ? t.insertbefore(e, i) : t.appendchild(e)
}
}
function l_(t, e) {
e && t && e.parentnode === t && t.removechild(e)
}
function k_(t) {
return t.__textsvgel
}
function p_(t) {
return t.__svgel
}
function n_(t) {
return function() {
bw('in svg mode painter not support method "' + t + '"')
}
}
var o_ = 2311,
e_ = function() {
return o_++
},
r_ = {},
z_ = r_ = "object" == typeof wx && "function" == typeof wx.getsysteminfosync ? {
browser: {},
os: {},
node: !1,
wxa: !0,
canvassupported: !0,
svgsupported: !1,
toucheventssupported: !0,
domsupported: !1
}: "undefined" == typeof document && "undefined" != typeof self ? {
browser: {},
os: {},
node: !1,
worker: !0,
canvassupported: !0,
domsupported: !1
}: "undefined" == typeof navigator ? {
browser: {},
os: {},
node: !0,
worker: !1,
canvassupported: !0,
svgsupported: !0,
domsupported: !1
}: function(t) {
var e = {},
i = {},
n = t.match(/firefox\/([\d.]+)/),
o = t.match(/msie\s([\d.]+)/) || t.match(/trident\/.+?rv:(([\d.]+))/),
a = t.match(/edge\/([\d.]+)/),
r = /micromessenger/i.test(t);
return n && (i.firefox = !0, i.version = n[1]),
o && (i.ie = !0, i.version = o[1]),
a && (i.edge = !0, i.version = a[1]),
r && (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
}
} (navigator.useragent),
b_ = {
"[object function]": 1,
"[object regexp]": 1,
"[object date]": 1,
"[object error]": 1,
"[object canvasgradient]": 1,
"[object canvaspattern]": 1,
"[object image]": 1,
"[object canvas]": 1
},
v_ = {
"[object int8array]": 1,
"[object uint8array]": 1,
"[object uint8clampedarray]": 1,
"[object int16array]": 1,
"[object uint16array]": 1,
"[object int32array]": 1,
"[object uint32array]": 1,
"[object float32array]": 1,
"[object float64array]": 1
},
g_ = object.prototype.tostring,
f_ = array.prototype,
w_ = f_.foreach,
h_ = f_.filter,
z_ = f_.slice,
u_ = f_.map,
x_ = f_.reduce,
j_ = {},
y_ = function() {
return j_.createcanvas()
};
j_.createcanvas = function() {
return document.createelement("canvas")
};
var q_, k_ = "__ec_primitive__";
e.prototype = {
constructor: e,
get: function(t) {
return this.data.hasownproperty(t) ? this.data[t] : null
},
set: function(t, e) {
return this.data[t] = e
},
each: function(t, e) {
void 0 !== e && (t = m(t, e));
for (var i in this.data) this.data.hasownproperty(i) && t(this.data[i], i)
},
removekey: function(t) {
delete this.data[t]
}
};
var $_ = (object.freeze || object)({
$override: e,
clone: i,
merge: n,
mergeall: o,
extend: a,
defaults: r,
createcanvas: y_,
getcontext: s,
indexof: l,
inherits: u,
mixin: h,
isarraylike: c,
each: d,
map: f,
reduce: p,
filter: g,
find: function(t, e, i) {
if (t && e) for (var n = 0,
o = t.length; n < o; n++) if (e.call(i, t[n], n, t)) return t[n]
},
bind: m,
curry: v,
isarray: y,
isfunction: x,
isstring: _,
isobject: w,
isbuiltinobject: b,
istypedarray: s,
isdom: m,
eqnan: i,
retrieve: t,
retrieve2: a,
retrieve3: d,
slice: c,
normalizecssarray: l,
assert: k,
trim: p,
setasprimitive: n,
isprimitive: o,
createhashmap: r,
concatarray: z,
noop: b
}),
j_ = "undefined" == typeof float32array ? array: float32array,
q_ = x,
tw = j,
ew = k,
iw = $,
nw = (object.freeze || object)({
create: v,
copy: g,
clone: f,
set: w,
add: h,
scaleandadd: z,
sub: u,
len: x,
length: q_,
lensquare: j,
lengthsquare: tw,
mul: function(t, e, i) {
return t[0] = e[0] * i[0],
t[1] = e[1] * i[1],
t
},
div: function(t, e, i) {
return t[0] = e[0] / i[0],
t[1] = e[1] / i[1],
t
},
dot: function(t, e) {
return t[0] * e[0] + t[1] * e[1]
},
scale: y,
normalize: q,
distance: k,
dist: ew,
distancesquare: $,
distsquare: iw,
negate: function(t, e) {
return t[0] = -e[0],
t[1] = -e[1],
t
},
lerp: j,
applytransform: q,
min: tt,
max: et
});
it.prototype = {
constructor: it,
_dragstart: function(t) {
var e = t.target;
e && e.draggable && (this._draggingtarget = e, e.dragging = !0, this._x = t.offsetx, this._y = t.offsety, this.dispatchtoelement(nt(e, t), "dragstart", t.event))
},
_drag: function(t) {
var e = this._draggingtarget;
if (e) {
var i = t.offsetx,
n = t.offsety,
o = i - this._x,
a = n - this._y;
this._x = i,
this._y = n,
e.drift(o, a, t),
this.dispatchtoelement(nt(e, t), "drag", t.event);
var r = this.findhover(i, n, e).target,
s = this._droptarget;
this._droptarget = r,
e !== r && (s && r !== s && this.dispatchtoelement(nt(s, t), "dragleave", t.event), r && r !== s && this.dispatchtoelement(nt(r, t), "dragenter", t.event))
}
},
_dragend: function(t) {
var e = this._draggingtarget;
e && (e.dragging = !1),
this.dispatchtoelement(nt(e, t), "dragend", t.event),
this._droptarget && this.dispatchtoelement(nt(this._droptarget, t), "drop", t.event),
this._draggingtarget = null,
this._droptarget = null
}
};
var ow = array.prototype.slice,
aw = function(t) {
this._$handlers = {},
this._$eventprocessor = t
};
aw.prototype = {
constructor: aw,
one: function(t, e, i, n) {
var o = this._$handlers;
if ("function" == typeof e && (n = i, i = e, e = null), !i || !t) return this;
e = ot(this, e),
o[t] || (o[t] = []);
for (var a = 0; a < o[t].length; a++) if (o[t][a].h === i) return this;
return o[t].push({
h: i,
one: !0,
query: e,
ctx: n || this
}),
this
},
on: function(t, e, i, n) {
var o = this._$handlers;
if ("function" == typeof e && (n = i, i = e, e = null), !i || !t) return this;
e = ot(this, e),
o[t] || (o[t] = []);
for (var a = 0; a < o[t].length; a++) if (o[t][a].h === i) return this;
return o[t].push({
h: i,
one: !1,
query: e,
ctx: n || this
}),
this
},
issilent: function(t) {
var e = this._$handlers;
return e[t] && e[t].length
},
off: function(t, e) {
var i = this._$handlers;
if (!t) return this._$handlers = {},
this;
if (e) {
if (i[t]) {
for (var n = [], o = 0, a = i[t].length; o < a; o++) i[t][o].h !== e && n.push(i[t][o]);
i[t] = n
}
i[t] && 0 === i[t].length && delete i[t]
} else delete i[t];
return this
},
trigger: function(t) {
var e = this._$handlers[t],
i = this._$eventprocessor;
if (e) {
var n = arguments,
o = n.length;
o > 3 && (n = ow.call(n, 1));
for (var a = e.length,
r = 0; r < a;) {
var s = e[r];
if (i && i.filter && null != s.query && !i.filter(t, s.query)) r++;
else {
switch (o) {
case 1:
s.h.call(s.ctx);
break;
case 2:
s.h.call(s.ctx, n[1]);
break;
case 3:
s.h.call(s.ctx, n[1], n[2]);
break;
default:
s.h.apply(s.ctx, n)
}
s.one ? (e.splice(r, 1), a--) : r++
}
}
}
return i && i.aftertrigger && i.aftertrigger(t),
this
},
triggerwithcontext: function(t) {
var e = this._$handlers[t],
i = this._$eventprocessor;
if (e) {
var n = arguments,
o = n.length;
o > 4 && (n = ow.call(n, 1, n.length - 1));
for (var a = n[n.length - 1], r = e.length, s = 0; s < r;) {
var l = e[s];
if (i && i.filter && null != l.query && !i.filter(t, l.query)) s++;
else {
switch (o) {
case 1:
l.h.call(a);
break;
case 2:
l.h.call(a, n[1]);
break;
case 3:
l.h.call(a, n[1], n[2]);
break;
default:
l.h.apply(a, n)
}
l.one ? (e.splice(s, 1), r--) : s++
}
}
}
return i && i.aftertrigger && i.aftertrigger(t),
this
}
};
var rw = "undefined" != typeof window && !!window.addeventlistener,
sw = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
lw = rw ?
function(t) {
t.preventdefault(),
t.stoppropagation(),
t.cancelbubble = !0
}: function(t) {
t.returnvalue = !1,
t.cancelbubble = !0
},
uw = "silent";
pt.prototype.dispose = function() {};
var hw = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
cw = function(t, e, i, n) {
aw.call(this),
this.storage = t,
this.painter = e,
this.painterroot = n,
i = i || new pt,
this.proxy = null,
this._hovered = {},
this._lasttouchmoment,
this._lastx,
this._lasty,
it.call(this),
this.sethandlerproxy(i)
};
cw.prototype = {
constructor: cw,
sethandlerproxy: function(t) {
this.proxy && this.proxy.dispose(),
t && (d(hw,
function(e) {
t.on && t.on(e, this[e], this)
},
this), t.handler = this),
this.proxy = t
},
mousemove: function(t) {
var e = t.zrx,
i = t.zry,
n = this._hovered,
o = n.target;
o && !o.__zr && (o = (n = this.findhover(n.x, n.y)).target);
var a = this._hovered = this.findhover(e, i),
r = a.target,
s = this.proxy;
s.setcursor && s.setcursor(r ? r.cursor: "default"),
o && r !== o && this.dispatchtoelement(n, "mouseout", t),
this.dispatchtoelement(a, "mousemove", t),
r && r !== o && this.dispatchtoelement(a, "mouseover", t)
},
mouseout: function(t) {
this.dispatchtoelement(this._hovered, "mouseout", t);
var e, i = t.toelement || t.relatedtarget;
do {
i = i && i.parentnode
} while ( i && 9 != i . nodetype && !( e = i === this . painterroot )); ! e && this.trigger("globalout", {
event: t
})
},
resize: function(t) {
this._hovered = {}
},
dispatch: function(t, e) {
var i = this[t];
i && i.call(this, e)
},
dispose: function() {
this.proxy.dispose(),
this.storage = this.proxy = this.painter = null
},
setcursorstyle: function(t) {
var e = this.proxy;
e.setcursor && e.setcursor(t)
},
dispatchtoelement: function(t, e, i) {
var n = (t = t || {}).target;
if (!n || !n.silent) {
for (var o = "on" + e,
a = dt(e, t, i); n && (n[o] && (a.cancelbubble = n[o].call(n, a)), n.trigger(e, a), n = n.parent, !a.cancelbubble););
a.cancelbubble || (this.trigger(e, a), this.painter && this.painter.eachotherlayer(function(t) {
"function" == typeof t[o] && t[o].call(t, a),
t.trigger && t.trigger(e, a)
}))
}
},
findhover: function(t, e, i) {
for (var n = this.storage.getdisplaylist(), o = {
x: t,
y: e
},
a = n.length - 1; a >= 0; a--) {
var r;
if (n[a] !== i && !n[a].ignore && (r = gt(n[a], t, e)) && (!o.toptarget && (o.toptarget = n[a]), r !== uw)) {
o.target = n[a];
break
}
}
return o
}
},
d(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"],
function(t) {
cw.prototype[t] = function(e) {
var i = this.findhover(e.zrx, e.zry),
n = i.target;
if ("mousedown" === t) this._downel = n,
this._downpoint = [e.zrx, e.zry],
this._upel = n;
else if ("mouseup" === t) this._upel = n;
else if ("click" === t) {
if (this._downel !== this._upel || !this._downpoint || ew(this._downpoint, [e.zrx, e.zry]) > 4) return;
this._downpoint = null
}
this.dispatchtoelement(i, t, e)
}
}),
h(cw, aw),
h(cw, it);
var dw = "undefined" == typeof float32array ? array: float32array,
fw = (object.freeze || object)({
create: mt,
identity: vt,
copy: yt,
mul: xt,
translate: _t,
rotate: wt,
scale: bt,
invert: st,
clone: mt
}),
pw = vt,
gw = 5e-5,
mw = function(t) { (t = t || {}).position || (this.position = [0, 0]),
null == t.rotation && (this.rotation = 0),
t.scale || (this.scale = [1, 1]),
this.origin = this.origin || null
},
vw = mw.prototype;
vw.transform = null,
vw.needlocaltransform = function() {
return it(this.rotation) || it(this.position[0]) || it(this.position[1]) || it(this.scale[0] - 1) || it(this.scale[1] - 1)
};
var yw = [];
vw.updatetransform = function() {
var t = this.parent,
e = t && t.transform,
i = this.needlocaltransform(),
n = this.transform;
if (i || e) {
n = n || mt(),
i ? this.getlocaltransform(n) : pw(n),
e && (i ? xt(n, t.transform, n) : yt(n, t.transform)),
this.transform = n;
var o = this.globalscaleratio;
if (null != o && 1 !== o) {
this.getglobalscale(yw);
var a = yw[0] < 0 ? -1 : 1,
r = yw[1] < 0 ? -1 : 1,
s = ((yw[0] - a) * o + a) / yw[0] || 0,
l = ((yw[1] - r) * o + r) / yw[1] || 0;
n[0] *= s,
n[1] *= s,
n[2] *= l,
n[3] *= l
}
this.invtransform = this.invtransform || mt(),
st(this.invtransform, n)
} else n && pw(n)
},
vw.getlocaltransform = function(t) {
return mw.getlocaltransform(this, t)
},
vw.settransform = function(t) {
var e = this.transform,
i = t.dpr || 1;
e ? t.settransform(i * e[0], i * e[1], i * e[2], i * e[3], i * e[4], i * e[5]) : t.settransform(i, 0, 0, i, 0, 0)
},
vw.restoretransform = function(t) {
var e = t.dpr || 1;
t.settransform(e, 0, 0, e, 0, 0)
};
var xw = [],
_w = mt();
vw.setlocaltransform = function(t) {
if (t) {
var e = t[0] * t[0] + t[1] * t[1],
i = t[2] * t[2] + t[3] * t[3],
n = this.position,
o = this.scale;
it(e - 1) && (e = math.sqrt(e)),
it(i - 1) && (i = math.sqrt(i)),
t[0] < 0 && (e = -e),
t[3] < 0 && (i = -i),
n[0] = t[4],
n[1] = t[5],
o[0] = e,
o[1] = i,
this.rotation = math.atan2( - t[1] / i, t[0] / e)
}
},
vw.decomposetransform = function() {
if (this.transform) {
var t = this.parent,
e = this.transform;
t && t.transform && (xt(xw, t.invtransform, e), e = xw);
var i = this.origin;
i && (i[0] || i[1]) && (_w[4] = i[0], _w[5] = i[1], xt(xw, e, _w), xw[4] -= i[0], xw[5] -= i[1], e = xw),
this.setlocaltransform(e)
}
},
vw.getglobalscale = function(t) {
var e = this.transform;
return t = t || [],
e ? (t[0] = math.sqrt(e[0] * e[0] + e[1] * e[1]), t[1] = math.sqrt(e[2] * e[2] + e[3] * e[3]), e[0] < 0 && (t[0] = -t[0]), e[3] < 0 && (t[1] = -t[1]), t) : (t[0] = 1, t[1] = 1, t)
},
vw.transformcoordtolocal = function(t, e) {
var i = [t, e],
n = this.invtransform;
return n && q(i, i, n),
i
},
vw.transformcoordtoglobal = function(t, e) {
var i = [t, e],
n = this.transform;
return n && q(i, i, n),
i
},
mw.getlocaltransform = function(t, e) {
pw(e = e || []);
var i = t.origin,
n = t.scale || [1, 1],
o = t.rotation || 0,
a = t.position || [0, 0];
return i && (e[4] -= i[0], e[5] -= i[1]),
bt(e, e, n),
o && wt(e, e, o),
i && (e[4] += i[0], e[5] += i[1]),
e[4] += a[0],
e[5] += a[1],
e
};
var ww = {
linear: function(t) {
return t
},
quadraticin: function(t) {
return t * t
},
quadraticout: function(t) {
return t * (2 - t)
},
quadraticinout: function(t) {
return (t *= 2) < 1 ? .5 * t * t: -.5 * (--t * (t - 2) - 1)
},
cubicin: function(t) {
return t * t * t
},
cubicout: function(t) {
return--t * t * t + 1
},
cubicinout: function(t) {
return (t *= 2) < 1 ? .5 * t * t * t: .5 * ((t -= 2) * t * t + 2)
},
quarticin: function(t) {
return t * t * t * t
},
quarticout: function(t) {
return 1 - --t * t * t * t
},
quarticinout: function(t) {
return (t *= 2) < 1 ? .5 * t * t * t * t: -.5 * ((t -= 2) * t * t * t - 2)
},
quinticin: function(t) {
return t * t * t * t * t
},
quinticout: function(t) {
return--t * t * t * t * t + 1
},
quinticinout: function(t) {
return (t *= 2) < 1 ? .5 * t * t * t * t * t: .5 * ((t -= 2) * t * t * t * t + 2)
},
sinusoidalin: function(t) {
return 1 - math.cos(t * math.pi / 2)
},
sinusoidalout: function(t) {
return math.sin(t * math.pi / 2)
},
sinusoidalinout: function(t) {
return.5 * (1 - math.cos(math.pi * t))
},
exponentialin: function(t) {
return 0 === t ? 0 : math.pow(1024, t - 1)
},
exponentialout: function(t) {
return 1 === t ? 1 : 1 - math.pow(2, -10 * t)
},
exponentialinout: function(t) {
return 0 === t ? 0 : 1 === t ? 1 : (t *= 2) < 1 ? .5 * math.pow(1024, t - 1) : .5 * (2 - math.pow(2, -10 * (t - 1)))
},
circularin: function(t) {
return 1 - math.sqrt(1 - t * t)
},
circularout: function(t) {
return math.sqrt(1 - --t * t)
},
circularinout: function(t) {
return (t *= 2) < 1 ? -.5 * (math.sqrt(1 - t * t) - 1) : .5 * (math.sqrt(1 - (t -= 2) * t) + 1)
},
elasticin: function(t) {
var e, i = .1;
return 0 === t ? 0 : 1 === t ? 1 : (!i || i < 1 ? (i = 1, e = .1) : e = .4 * math.asin(1 / i) / (2 * math.pi), -i * math.pow(2, 10 * (t -= 1)) * math.sin((t - e) * (2 * math.pi) / .4))
},
elasticout: function(t) {
var e, i = .1;
return 0 === t ? 0 : 1 === t ? 1 : (!i || i < 1 ? (i = 1, e = .1) : e = .4 * math.asin(1 / i) / (2 * math.pi), i * math.pow(2, -10 * t) * math.sin((t - e) * (2 * math.pi) / .4) + 1)
},
elasticinout: function(t) {
var e, i = .1;
return 0 === t ? 0 : 1 === t ? 1 : (!i || i < 1 ? (i = 1, e = .1) : e = .4 * math.asin(1 / i) / (2 * math.pi), (t *= 2) < 1 ? i * math.pow(2, 10 * (t -= 1)) * math.sin((t - e) * (2 * math.pi) / .4) * -.5 : i * math.pow(2, -10 * (t -= 1)) * math.sin((t - e) * (2 * math.pi) / .4) * .5 + 1)
},
backin: function(t) {
var e = 1.70158;
return t * t * ((e + 1) * t - e)
},
backout: function(t) {
var e = 1.70158;
return--t * t * ((e + 1) * t + e) + 1
},
backinout: function(t) {
var e = 2.5949095;
return (t *= 2) < 1 ? t * t * ((e + 1) * t - e) * .5 : .5 * ((t -= 2) * t * ((e + 1) * t + e) + 2)
},
bouncein: function(t) {
return 1 - ww.bounceout(1 - t)
},
bounceout: function(t) {
return t < 1 / 2.75 ? 7.5625 * t * t: t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375
},
bounceinout: function(t) {
return t < .5 ? .5 * ww.bouncein(2 * t) : .5 * ww.bounceout(2 * t - 1) + .5
}
};
tt.prototype = {
constructor: tt,
step: function(t, e) {
if (this._initialized || (this._starttime = t + this._delay, this._initialized = !0), this._paused) this._pausedtime += e;
else {
var i = (t - this._starttime - this._pausedtime) / this._life;
if (! (i < 0)) {
i = math.min(i, 1);
var n = this.easing,
o = "string" == typeof n ? ww[n] : n,
a = "function" == typeof o ? o(i) : i;
return this.fire("frame", a),
1 == i ? this.loop ? (this.restart(t), "restart") : (this._needsremove = !0, "destroy") : null
}
}
},
restart: function(t) {
var e = (t - this._starttime - this._pausedtime) % this._life;
this._starttime = t - e + this.gap,
this._pausedtime = 0,
this._needsremove = !1
},
fire: function(t, e) {
this[t = "on" + t] && this[t](this._target, e)
},
pause: function() {
this._paused = !0
},
resume: function() {
this._paused = !1
}
};
var bw = function() {
this.head = null,
this.tail = null,
this._len = 0
},
sw = bw.prototype;
sw.insert = function(t) {
var e = new mw(t);
return this.insertentry(e),
e
},
sw.insertentry = function(t) {
this.head ? (this.tail.next = t, t.prev = this.tail, t.next = null, this.tail = t) : this.head = this.tail = t,
this._len++
},
sw.remove = function(t) {
var e = t.prev,
i = t.next;
e ? e.next = i: this.head = i,
i ? i.prev = e: this.tail = e,
t.next = t.prev = null,
this._len--
},
sw.len = function() {
return this._len
},
sw.clear = function() {
this.head = this.tail = null,
this._len = 0
};
var mw = function(t) {
this.value = t,
this.next,
this.prev
},
iw = function(t) {
this._list = new bw,
this._map = {},
this._maxsize = t || 10,
this._lastremovedentry = null
},
tw = iw.prototype;
tw.put = function(t, e) {
var i = this._list,
n = this._map,
o = null;
if (null == n[t]) {
var a = i.len(),
r = this._lastremovedentry;
if (a >= this._maxsize && a > 0) {
var s = i.head;
i.remove(s),
delete n[s.key],
o = s.value,
this._lastremovedentry = s
}
r ? r.value = e: r = new mw(e),
r.key = t,
i.insertentry(r),
n[t] = r
}
return o
},
tw.get = function(t) {
var e = this._map[t],
i = this._list;
if (null != e) return e !== i.tail && (i.remove(e), i.insertentry(e)),
e.value
},
tw.clear = function() {
this._list.clear(),
this._map = {}
};
var aw = {
transparent: [0, 0, 0, 0],
aliceblue: [240, 248, 255, 1],
antiquewhite: [250, 235, 215, 1],
aqua: [0, 255, 255, 1],
aquamarine: [127, 255, 212, 1],
azure: [240, 255, 255, 1],
beige: [245, 245, 220, 1],
bisque: [255, 228, 196, 1],
black: [0, 0, 0, 1],
blanchedalmond: [255, 235, 205, 1],
blue: [0, 0, 255, 1],
blueviolet: [138, 43, 226, 1],
brown: [165, 42, 42, 1],
burlywood: [222, 184, 135, 1],
cadetblue: [95, 158, 160, 1],
chartreuse: [127, 255, 0, 1],
chocolate: [210, 105, 30, 1],
coral: [255, 127, 80, 1],
cornflowerblue: [100, 149, 237, 1],
cornsilk: [255, 248, 220, 1],
crimson: [220, 20, 60, 1],
cyan: [0, 255, 255, 1],
darkblue: [0, 0, 139, 1],
darkcyan: [0, 139, 139, 1],
darkgoldenrod: [184, 134, 11, 1],
darkgray: [169, 169, 169, 1],
darkgreen: [0, 100, 0, 1],
darkgrey: [169, 169, 169, 1],
darkkhaki: [189, 183, 107, 1],
darkmagenta: [139, 0, 139, 1],
darkolivegreen: [85, 107, 47, 1],
darkorange: [255, 140, 0, 1],
darkorchid: [153, 50, 204, 1],
darkred: [139, 0, 0, 1],
darksalmon: [233, 150, 122, 1],
darkseagreen: [143, 188, 143, 1],
darkslateblue: [72, 61, 139, 1],
darkslategray: [47, 79, 79, 1],
darkslategrey: [47, 79, 79, 1],
darkturquoise: [0, 206, 209, 1],
darkviolet: [148, 0, 211, 1],
deeppink: [255, 20, 147, 1],
deepskyblue: [0, 191, 255, 1],
dimgray: [105, 105, 105, 1],
dimgrey: [105, 105, 105, 1],
dodgerblue: [30, 144, 255, 1],
firebrick: [178, 34, 34, 1],
floralwhite: [255, 250, 240, 1],
forestgreen: [34, 139, 34, 1],
fuchsia: [255, 0, 255, 1],
gainsboro: [220, 220, 220, 1],
ghostwhite: [248, 248, 255, 1],
gold: [255, 215, 0, 1],
goldenrod: [218, 165, 32, 1],
gray: [128, 128, 128, 1],
green: [0, 128, 0, 1],
greenyellow: [173, 255, 47, 1],
grey: [128, 128, 128, 1],
honeydew: [240, 255, 240, 1],
hotpink: [255, 105, 180, 1],
indianred: [205, 92, 92, 1],
indigo: [75, 0, 130, 1],
ivory: [255, 255, 240, 1],
khaki: [240, 230, 140, 1],
lavender: [230, 230, 250, 1],
lavenderblush: [255, 240, 245, 1],
lawngreen: [124, 252, 0, 1],
lemonchiffon: [255, 250, 205, 1],
lightblue: [173, 216, 230, 1],
lightcoral: [240, 128, 128, 1],
lightcyan: [224, 255, 255, 1],
lightgoldenrodyellow: [250, 250, 210, 1],
lightgray: [211, 211, 211, 1],
lightgreen: [144, 238, 144, 1],
lightgrey: [211, 211, 211, 1],
lightpink: [255, 182, 193, 1],
lightsalmon: [255, 160, 122, 1],
lightseagreen: [32, 178, 170, 1],
lightskyblue: [135, 206, 250, 1],
lightslategray: [119, 136, 153, 1],
lightslategrey: [119, 136, 153, 1],
lightsteelblue: [176, 196, 222, 1],
lightyellow: [255, 255, 224, 1],
lime: [0, 255, 0, 1],
limegreen: [50, 205, 50, 1],
linen: [250, 240, 230, 1],
magenta: [255, 0, 255, 1],
maroon: [128, 0, 0, 1],
mediumaquamarine: [102, 205, 170, 1],
mediumblue: [0, 0, 205, 1],
mediumorchid: [186, 85, 211, 1],
mediumpurple: [147, 112, 219, 1],
mediumseagreen: [60, 179, 113, 1],
mediumslateblue: [123, 104, 238, 1],
mediumspringgreen: [0, 250, 154, 1],
mediumturquoise: [72, 209, 204, 1],
mediumvioletred: [199, 21, 133, 1],
midnightblue: [25, 25, 112, 1],
mintcream: [245, 255, 250, 1],
mistyrose: [255, 228, 225, 1],
moccasin: [255, 228, 181, 1],
navajowhite: [255, 222, 173, 1],
navy: [0, 0, 128, 1],
oldlace: [253, 245, 230, 1],
olive: [128, 128, 0, 1],
olivedrab: [107, 142, 35, 1],
orange: [255, 165, 0, 1],
orangered: [255, 69, 0, 1],
orchid: [218, 112, 214, 1],
palegoldenrod: [238, 232, 170, 1],
palegreen: [152, 251, 152, 1],
paleturquoise: [175, 238, 238, 1],
palevioletred: [219, 112, 147, 1],
papayawhip: [255, 239, 213, 1],
peachpuff: [255, 218, 185, 1],
peru: [205, 133, 63, 1],
pink: [255, 192, 203, 1],
plum: [221, 160, 221, 1],
powderblue: [176, 224, 230, 1],
purple: [128, 0, 128, 1],
red: [255, 0, 0, 1],
rosybrown: [188, 143, 143, 1],
royalblue: [65, 105, 225, 1],
saddlebrown: [139, 69, 19, 1],
salmon: [250, 128, 114, 1],
sandybrown: [244, 164, 96, 1],
seagreen: [46, 139, 87, 1],
seashell: [255, 245, 238, 1],
sienna: [160, 82, 45, 1],
silver: [192, 192, 192, 1],
skyblue: [135, 206, 235, 1],
slateblue: [106, 90, 205, 1],
slategray: [112, 128, 144, 1],
slategrey: [112, 128, 144, 1],
snow: [255, 250, 250, 1],
springgreen: [0, 255, 127, 1],
steelblue: [70, 130, 180, 1],
tan: [210, 180, 140, 1],
teal: [0, 128, 128, 1],
thistle: [216, 191, 216, 1],
tomato: [255, 99, 71, 1],
turquoise: [64, 224, 208, 1],
violet: [238, 130, 238, 1],
wheat: [245, 222, 179, 1],
white: [255, 255, 255, 1],
whitesmoke: [245, 245, 245, 1],
yellow: [255, 255, 0, 1],
yellowgreen: [154, 205, 50, 1]
},
dw = new iw(20),
cw = null,
lw = wt,
kw = ht,
pw = (object.freeze || object)({
parse: zt,
lift: gt,
tohex: ft,
fastlerp: wt,
fastmaptocolor: lw,
lerp: ht,
maptocolor: kw,
modifyhsl: zt,
modifyalpha: ut,
stringify: xt
}),
nw = array.prototype.slice,
ow = function(t, e, i, n) {
this._tracks = {},
this._target = t,
this._loop = e || !1,
this._getter = i || jt,
this._setter = n || yt,
this._clipcount = 0,
this._delay = 0,
this._donelist = [],
this._onframelist = [],
this._cliplist = []
};
ow.prototype = {
when: function(t, e) {
var i = this._tracks;
for (var n in e) if (e.hasownproperty(n)) {
if (!i[n]) {
i[n] = [];
var o = this._getter(this._target, n);
if (null == o) continue;
0 !== t && i[n].push({
time: 0,
value: ie(o)
})
}
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; i < e; i++) t[i].call(this)
},
start: function(t, e) {
var i, n = this,
o = 0;
for (var a in this._tracks) if (this._tracks.hasownproperty(a)) {
var r = ae(this, t,
function() {--o || n._donecallback()
},
this._tracks[a], a, e);
r && (this._cliplist.push(r), o++, this.animation && this.animation.addclip(r), i = r)
}
if (i) {
var s = i.onframe;
i.onframe = function(t, e) {
s(t, e);
for (var i = 0; i < n._onframelist.length; i++) n._onframelist[i](t, e)
}
}
return o || this._donecallback(),
this
},
stop: function(t) {
for (var e = this._cliplist,
i = this.animation,
n = 0; n < e.length; n++) {
var o = e[n];
t && o.onframe(this._target, 1),
i && i.removeclip(o)
}
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 ew = 1;
"undefined" != typeof window && (ew = math.max(window.devicepixelratio || 1, 1));
var rw = ew,
zw = function() {},
bw = zw,
vw = function() {
this.animators = []
};
vw.prototype = {
constructor: vw,
animate: function(t, e) {
var i, n = !1,
o = this,
a = this.__zr;
if (t) {
var r = t.split("."),
s = o;
n = "shape" === r[0];
for (var u = 0,
h = r.length; u < h; u++) s && (s = s[r[u]]);
s && (i = s)
} else i = o;
if (i) {
var c = o.animators,
d = new ow(i, e);
return d.during(function(t) {
o.dirty(n)
}).done(function() {
c.splice(l(c, d), 1)
}),
c.push(d),
a && a.animation.addanimator(d),
d
}
bw('property "' + t + '" is not existed in element ' + o.id)
},
stopanimation: function(t) {
for (var e = this.animators,
i = e.length,
n = 0; n < i; n++) e[n].stop(t);
return e.length = 0,
this
},
animateto: function(t, e, i, n, o, a) {
re(this, t, e, i, n, o, a)
},
animatefrom: function(t, e, i, n, o, a) {
re(this, t, e, i, n, o, a, !0)
}
};
var gw = function(t) {
mw.call(this, t),
aw.call(this, t),
vw.call(this, t),
this.id = t.id || e_()
};
gw.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(t, e) {},
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 (w(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.dirty(!1)
},
removeclippath: function() {
var t = this.clippath;
t && (t.__zr && t.removeselffromzr(t.__zr), t.__zr = null, t.__cliptarget = null, this.clippath = null, this.dirty(!1))
},
addselftozr: function(t) {
this.__zr = t;
var e = this.animators;
if (e) for (var i = 0; i < e.length; i++) t.animation.addanimator(e[i]);
this.clippath && this.clippath.addselftozr(t)
},
removeselffromzr: function(t) {
this.__zr = null;
var e = this.animators;
if (e) for (var i = 0; i < e.length; i++) t.animation.removeanimator(e[i]);
this.clippath && this.clippath.removeselffromzr(t)
}
},
h(gw, vw),
h(gw, mw),
h(gw, aw);
var fw = q,
ww = math.min,
hw = math.max;
ue.prototype = {
constructor: ue,
union: function(t) {
var e = ww(t.x, this.x),
i = ww(t.y, this.y);
this.width = hw(t.x + t.width, this.x + this.width) - e,
this.height = hw(t.y + t.height, this.y + this.height) - i,
this.x = e,
this.y = i
},
applytransform: function() {
var t = [],
e = [],
i = [],
n = [];
return function(o) {
if (o) {
t[0] = i[0] = this.x,
t[1] = n[1] = this.y,
e[0] = n[0] = this.x + this.width,
e[1] = i[1] = this.y + this.height,
fw(t, t, o),
fw(e, e, o),
fw(i, i, o),
fw(n, n, o),
this.x = ww(t[0], e[0], i[0], n[0]),
this.y = ww(t[1], e[1], i[1], n[1]);
var a = hw(t[0], e[0], i[0], n[0]),
r = hw(t[1], e[1], i[1], n[1]);
this.width = a - this.x,
this.height = r - this.y
}
}
} (),
calculatetransform: function(t) {
var e = this,
i = t.width / e.width,
n = t.height / e.height,
o = mt();
return _t(o, o, [ - e.x, -e.y]),
bt(o, o, [i, n]),
_t(o, o, [t.x, t.y]),
o
},
intersect: function(t) {
if (!t) return ! 1;
t instanceof ue || (t = ue.create(t));
var e = this,
i = e.x,
n = e.x + e.width,
o = e.y,
a = e.y + e.height,
r = t.x,
s = t.x + t.width,
l = t.y,
u = t.y + t.height;
return ! (n < r || s < i || a < l || u < o)
},
contain: function(t, e) {
var i = this;
return t >= i.x && t <= i.x + i.width && e >= i.y && e <= i.y + i.height
},
clone: function() {
return new ue(this.x, this.y, this.width, this.height)
},
copy: function(t) {
this.x = t.x,
this.y = t.y,
this.width = t.width,
this.height = t.height
},
plain: function() {
return {
x: this.x,
y: this.y,
width: this.width,
height: this.height
}
}
},
ue.create = function(t) {
return new ue(t.x, t.y, t.width, t.height)
};
var zw = function(t) {
t = t || {},
gw.call(this, t);
for (var e in t) t.hasownproperty(e) && (this[e] = t[e]);
this._children = [],
this.__storage = null,
this.__dirty = !0
};
zw.prototype = {
constructor: zw,
isgroup: !0,
type: "group",
silent: !1,
children: function() {
return this._children.slice()
},
childat: function(t) {
return this._children[t]
},
childofname: function(t) {
for (var e = this._children,
i = 0; i < e.length; i++) if (e[i].name === t) return e[i]
},
childcount: function() {
return this._children.length
},
add: function(t) {
return t && t !== this && t.parent !== this && (this._children.push(t), this._doadd(t)),
this
},
addbefore: function(t, e) {
if (t && t !== this && t.parent !== this && e && e.parent === this) {
var i = this._children,
n = i.indexof(e);
n >= 0 && (i.splice(n, 0, t), this._doadd(t))
}
return this
},
_doadd: function(t) {
t.parent && t.parent.remove(t),
t.parent = this;
var e = this.__storage,
i = this.__zr;
e && e !== t.__storage && (e.addtostorage(t), t instanceof zw && t.addchildrentostorage(e)),
i && i.refresh()
},
remove: function(t) {
var e = this.__zr,
i = this.__storage,
n = this._children,
o = l(n, t);
return o < 0 ? this: (n.splice(o, 1), t.parent = null, i && (i.delfromstorage(t), t instanceof zw && t.delchildrenfromstorage(i)), e && e.refresh(), this)
},
removeall: function() {
var t, e, i = this._children,
n = this.__storage;
for (e = 0; e < i.length; e++) t = i[e],
n && (n.delfromstorage(t), t instanceof zw && t.delchildrenfromstorage(n)),
t.parent = null;
return i.length = 0,
this
},
eachchild: function(t, e) {
for (var i = this._children,
n = 0; n < i.length; n++) {
var o = i[n];
t.call(e, o, n)
}
return this
},
traverse: function(t, e) {
for (var i = 0; i < this._children.length; i++) {
var n = this._children[i];
t.call(e, n),
"group" === n.type && n.traverse(t, e)
}
return this
},
addchildrentostorage: function(t) {
for (var e = 0; e < this._children.length; e++) {
var i = this._children[e];
t.addtostorage(i),
i instanceof zw && i.addchildrentostorage(t)
}
},
delchildrenfromstorage: function(t) {
for (var e = 0; e < this._children.length; e++) {
var i = this._children[e];
t.delfromstorage(i),
i instanceof zw && i.delchildrenfromstorage(t)
}
},
dirty: function() {
return this.__dirty = !0,
this.__zr && this.__zr.refresh(),
this
},
getboundingrect: function(t) {
for (var e = null,
i = new ue(0, 0, 0, 0), n = t || this._children, o = [], a = 0; a < n.length; a++) {
var r = n[a];
if (!r.ignore && !r.invisible) {
var s = r.getboundingrect(),
l = r.getlocaltransform(o);
l ? (i.copy(s), i.applytransform(l), (e = e || i.clone()).union(i)) : (e = e || s.clone()).union(s)
}
}
return e || i
}
},
u(zw, gw);
var uw = 32,
xw = 7,
jw = function() {
this._roots = [],
this._displaylist = [],
this._displaylistlen = 0
};
jw.prototype = {
constructor: jw,
traverse: function(t, e) {
for (var i = 0; i < this._roots.length; i++) this._roots[i].traverse(t, e)
},
getdisplaylist: function(t, e) {
return e = e || !1,
t && this.updatedisplaylist(e),
this._displaylist
},
updatedisplaylist: function(t) {
this._displaylistlen = 0;
for (var e = this._roots,
i = this._displaylist,
n = 0,
o = e.length; n < o; n++) this._updateandadddisplayable(e[n], null, t);
i.length = this._displaylistlen,
z_.canvassupported && ve(i, ye)
},
_updateandadddisplayable: function(t, e, i) {
if (!t.ignore || i) {
t.beforeupdate(),
t.__dirty && t.update(),
t.afterupdate();
var n = t.clippath;
if (n) {
e = e ? e.slice() : [];
for (var o = n,
a = t; o;) o.parent = a,
o.updatetransform(),
e.push(o),
a = o,
o = o.clippath
}
if (t.isgroup) {
for (var r = t._children,
s = 0; s < r.length; s++) {
var l = r[s];
t.__dirty && (l.__dirty = !0),
this._updateandadddisplayable(l, e, i)
}
t.__dirty = !1
} else t.__clippaths = e,
this._displaylist[this._displaylistlen++] = t
}
},
addroot: function(t) {
t.__storage !== this && (t instanceof zw && t.addchildrentostorage(this), this.addtostorage(t), this._roots.push(t))
},
delroot: function(t) {
if (null == t) {
for (i = 0; i < this._roots.length; i++) {
var e = this._roots[i];
e instanceof zw && e.delchildrenfromstorage(this)
}
return this._roots = [],
this._displaylist = [],
void(this._displaylistlen = 0)
}
if (t instanceof array) for (var i = 0,
n = t.length; i < n; i++) this.delroot(t[i]);
else {
var o = l(this._roots, t);
o >= 0 && (this.delfromstorage(t), this._roots.splice(o, 1), t instanceof zw && t.delchildrenfromstorage(this))
}
},
addtostorage: function(t) {
return t && (t.__storage = this, t.dirty(!1)),
this
},
delfromstorage: function(t) {
return t && (t.__storage = null),
this
},
dispose: function() {
this._renderlist = this._roots = null
},
displayablesortfunc: ye
};
var yw = {
shadowblur: 1,
shadowoffsetx: 1,
shadowoffsety: 1,
textshadowblur: 1,
textshadowoffsetx: 1,
textshadowoffsety: 1,
textboxshadowblur: 1,
textboxshadowoffsetx: 1,
textboxshadowoffsety: 1
},
qw = function(t, e, i) {
return yw.hasownproperty(e) ? i *= t.dpr: i
},
kw = [["shadowblur", 0], ["shadowoffsetx", 0], ["shadowoffsety", 0], ["shadowcolor", "#000"], ["linecap", "butt"], ["linejoin", "miter"], ["miterlimit", 10]],
$w = function(t) {
this.extendfrom(t, !1)
};
$w.prototype = {
constructor: $w,
fill: "#000",
stroke: null,
opacity: 1,
fillopacity: null,
strokeopacity: null,
linedash: null,
linedashoffset: 0,
shadowblur: 0,
shadowoffsetx: 0,
shadowoffsety: 0,
linewidth: 1,
strokenoscale: !1,
text: null,
font: null,
textfont: null,
fontstyle: null,
fontweight: null,
fontsize: null,
fontfamily: null,
texttag: null,
textfill: "#000",
textstroke: null,
textwidth: null,
textheight: null,
textstrokewidth: 0,
textlineheight: null,
textposition: "inside",
textrect: null,
textoffset: null,
textalign: null,
textverticalalign: null,
textdistance: 5,
textshadowcolor: "transparent",
textshadowblur: 0,
textshadowoffsetx: 0,
textshadowoffsety: 0,
textboxshadowcolor: "transparent",
textboxshadowblur: 0,
textboxshadowoffsetx: 0,
textboxshadowoffsety: 0,
transformtext: !1,
textrotation: 0,
textorigin: null,
textbackgroundcolor: null,
textbordercolor: null,
textborderwidth: 0,
textborderradius: 0,
textpadding: null,
rich: null,
truncate: null,
blend: null,
bind: function(t, e, i) {
for (var n = this,
o = i && i.style,
a = !o,
r = 0; r < kw.length; r++) {
var s = kw[r],
l = s[0]; (a || n[l] !== o[l]) && (t[l] = qw(t, l, n[l] || s[1]))
}
if ((a || n.fill !== o.fill) && (t.fillstyle = n.fill), (a || n.stroke !== o.stroke) && (t.strokestyle = n.stroke), (a || n.opacity !== o.opacity) && (t.globalalpha = null == n.opacity ? 1 : n.opacity), (a || n.blend !== o.blend) && (t.globalcompositeoperation = n.blend || "source-over"), this.hasstroke()) {
var u = n.linewidth;
t.linewidth = u / (this.strokenoscale && e && e.getlinescale ? e.getlinescale() : 1)
}
},
hasfill: function() {
var t = this.fill;
return null != t && "none" !== t
},
hasstroke: function() {
var t = this.stroke;
return null != t && "none" !== t && this.linewidth > 0
},
extendfrom: function(t, e) {
if (t) for (var i in t) ! t.hasownproperty(i) || !0 !== e && (!1 === e ? this.hasownproperty(i) : null == t[i]) || (this[i] = t[i])
},
set: function(t, e) {
"string" == typeof t ? this[t] = e: this.extendfrom(t, !0)
},
clone: function() {
var t = new this.constructor;
return t.extendfrom(this, !0),
t
},
getgradient: function(t, e, i) {
for (var n = ("radial" === e.type ? _e: xe)(t, e, i), o = e.colorstops, a = 0; a < o.length; a++) n.addcolorstop(o[a].offset, o[a].color);
return n
}
};
for (var jw = $w.prototype,
qw = 0; qw < kw.length; qw++) {
var tb = kw[qw];
tb[0] in jw || (jw[tb[0]] = tb[1])
}
$w.getgradient = jw.getgradient;
var eb = function(t, e) {
this.image = t,
this.repeat = e,
this.type = "pattern"
};
eb.prototype.getcanvaspattern = function(t) {
return t.createpattern(this.image, this.repeat || "repeat")
};
var ib = function(t, e, i) {
var n;
i = i || rw,
"string" == typeof t ? n = be(t, e, i) : w(t) && (t = (n = t).id),
this.id = t,
this.dom = n;
var o = n.style;
o && (n.onselectstart = we, o["-webkit-user-select"] = "none", o["user-select"] = "none", o["-webkit-touch-callout"] = "none", o["-webkit-tap-highlight-color"] = "rgba(0,0,0,0)", o.padding = 0, o.margin = 0, o["border-width"] = 0),
this.domback = null,
this.ctxback = null,
this.painter = e,
this.config = null,
this.clearcolor = 0,
this.motionblur = !1,
this.lastframealpha = .7,
this.dpr = i
};
ib.prototype = {
constructor: ib,
__dirty: !0,
__used: !1,
__drawindex: 0,
__startindex: 0,
__endindex: 0,
incremental: !1,
getelementcount: function() {
return this.__endindex - this.__startindex
},
initcontext: function() {
this.ctx = this.dom.getcontext("2d"),
this.ctx.dpr = this.dpr
},
createbackbuffer: function() {
var t = this.dpr;
this.domback = be("back-" + this.id, this.painter, t),
this.ctxback = this.domback.getcontext("2d"),
1 != t && this.ctxback.scale(t, t)
},
resize: function(t, e) {
var i = this.dpr,
n = this.dom,
o = n.style,
a = this.domback;
o && (o.width = t + "px", o.height = e + "px"),
n.width = t * i,
n.height = e * i,
a && (a.width = t * i, a.height = e * i, 1 != i && this.ctxback.scale(i, i))
},
clear: function(t, e) {
var i = this.dom,
n = this.ctx,
o = i.width,
a = i.height,
e = e || this.clearcolor,
r = this.motionblur && !t,
s = this.lastframealpha,
l = this.dpr;
if (r && (this.domback || this.createbackbuffer(), this.ctxback.globalcompositeoperation = "copy", this.ctxback.drawimage(i, 0, 0, o / l, a / l)), n.clearrect(0, 0, o, a), e && "transparent" !== e) {
var u;
e.colorstops ? (u = e.__canvasgradient || $w.getgradient(n, e, {
x: 0,
y: 0,
width: o,
height: a
}), e.__canvasgradient = u) : e.image && (u = eb.prototype.getcanvaspattern.call(e, n)),
n.save(),
n.fillstyle = u || e,
n.fillrect(0, 0, o, a),
n.restore()
}
if (r) {
var h = this.domback;
n.save(),
n.globalalpha = s,
n.drawimage(h, 0, 0, o, a),
n.restore()
}
}
};
var nb = "undefined" != typeof window && (window.requestanimationframe && window.requestanimationframe.bind(window) || window.msrequestanimationframe && window.msrequestanimationframe.bind(window) || window.mozrequestanimationframe || window.webkitrequestanimationframe) ||
function(t) {
settimeout(t, 16)
},
ob = new iw(50),
ab = {},
rb = 0,
sb = 5e3,
lb = /\{([a-za-z0-9_]+)\|([^}]*)\}/g,
ub = "12px sans-serif",
hb = {};
hb.measuretext = function(t, e) {
var i = s();
return i.font = e || ub,
i.measuretext(t)
};
var cb = {
left: 1,
right: 1,
center: 1
},
db = {
top: 1,
bottom: 1,
middle: 1
},
fb = [["textshadowblur", "shadowblur", 0], ["textshadowoffsetx", "shadowoffsetx", 0], ["textshadowoffsety", "shadowoffsety", 0], ["textshadowcolor", "shadowcolor", "transparent"]],
pb = new ue,
gb = function() {};
gb.prototype = {
constructor: gb,
drawrecttext: function(t, e) {
var i = this.style;
e = i.textrect || e,
this.__dirty && ue(i);
var n = i.text;
if (null != n && (n += ""), li(n, i)) {
t.save();
var o = this.transform;
i.transformtext ? this.settransform(t) : o && (pb.copy(e), pb.applytransform(o), e = pb),
je(this, t, n, i, e),
t.restore()
}
}
},
ui.prototype = {
constructor: ui,
type: "displayable",
__dirty: !0,
invisible: !1,
z: 0,
z2: 0,
zlevel: 0,
draggable: !1,
dragging: !1,
silent: !1,
culling: !1,
cursor: "pointer",
recthover: !1,
progressive: !1,
incremental: !1,
globalscaleratio: 1,
beforebrush: function(t) {},
afterbrush: function(t) {},
brush: function(t, e) {},
getboundingrect: function() {},
contain: function(t, e) {
return this.rectcontain(t, e)
},
traverse: function(t, e) {
t.call(e, this)
},
rectcontain: function(t, e) {
var i = this.transformcoordtolocal(t, e);
return this.getboundingrect().contain(i[0], i[1])
},
dirty: function() {
this.__dirty = this.__dirtytext = !0,
this._rect = null,
this.__zr && this.__zr.refresh()
},
animatestyle: function(t) {
return this.animate("style", t)
},
attrkv: function(t, e) {
"style" !== t ? gw.prototype.attrkv.call(this, t, e) : this.style.set(e)
},
setstyle: function(t, e) {
return this.style.set(t, e),
this.dirty(!1),
this
},
usestyle: function(t) {
return this.style = new $w(t, this),
this.dirty(!1),
this
}
},
u(ui, gw),
h(ui, gb),
hi.prototype = {
constructor: hi,
type: "image",
brush: function(t, e) {
var i = this.style,
n = i.image;
i.bind(t, this, e);
var o = this._image = me(n, this._image, this, this.onload);
if (o && te(o)) {
var a = i.x || 0,
r = i.y || 0,
s = i.width,
l = i.height,
u = o.width / o.height;
if (null == s && null != l ? s = l * u: null == l && null != s ? l = s / u: null == s && null == l && (s = o.width, l = o.height), this.settransform(t), i.swidth && i.sheight) {
var h = i.sx || 0,
c = i.sy || 0;
t.drawimage(o, h, c, i.swidth, i.sheight, a, r, s, l)
} else if (i.sx && i.sy) {
var d = s - (h = i.sx),
f = l - (c = i.sy);
t.drawimage(o, h, c, d, f, a, r, s, l)
} else t.drawimage(o, a, r, s, l);
null != i.text && (this.restoretransform(t), this.drawrecttext(t, this.getboundingrect()))
}
},
getboundingrect: function() {
var t = this.style;
return this._rect || (this._rect = new ue(t.x || 0, t.y || 0, t.width || 0, t.height || 0)),
this._rect
}
},
u(hi, ui);
var mb = new ue(0, 0, 0, 0),
vb = new ue(0, 0, 0, 0),
yb = function(t, e, i) {
this.type = "canvas";
var n = !t.nodename || "canvas" === t.nodename.touppercase();
this._opts = i = a({},
i || {}),
this.dpr = i.devicepixelratio || rw,
this._singlecanvas = n,
this.root = t;
var o = t.style;
o && (o["-webkit-tap-highlight-color"] = "transparent", o["-webkit-user-select"] = o["user-select"] = o["-webkit-touch-callout"] = "none", t.innerhtml = ""),
this.storage = e;
var r = this._zlevellist = [],
s = this._layers = {};
if (this._layerconfig = {},
this._needsmanuallycompositing = !1, n) {
var l = t.width,
u = t.height;
null != i.width && (l = i.width),
null != i.height && (u = i.height),
this.dpr = i.devicepixelratio || 1,
t.width = l * this.dpr,
t.height = u * this.dpr,
this._width = l,
this._height = u;
var h = new ib(t, this, this.dpr);
h.__builtin__ = !0,
h.initcontext(),
s[314159] = h,
h.zlevel = 314159,
r.push(314159),
this._domroot = t
} else {
this._width = this._getsize(0),
this._height = this._getsize(1);
var c = this._domroot = mi(this._width, this._height);
t.appendchild(c)
}
this._hoverlayer = null,
this._hoverelements = []
};
yb.prototype = {
constructor: yb,
gettype: function() {
return "canvas"
},
issinglecanvas: function() {
return this._singlecanvas
},
getviewportroot: function() {
return this._domroot
},
getviewportrootoffset: function() {
var t = this.getviewportroot();
if (t) return {
offsetleft: t.offsetleft || 0,
offsettop: t.offsettop || 0
}
},
refresh: function(t) {
var e = this.storage.getdisplaylist(!0),
i = this._zlevellist;
this._redrawid = math.random(),
this._paintlist(e, t, this._redrawid);
for (var n = 0; n < i.length; n++) {
var o = i[n],
a = this._layers[o];
if (!a.__builtin__ && a.refresh) {
var r = 0 === n ? this._backgroundcolor: null;
a.refresh(r)
}
}
return this.refreshhover(),
this
},
addhover: function(t, e) {
if (!t.__hovermir) {
var i = new t.constructor({
style: t.style,
shape: t.shape,
z: t.z,
z2: t.z2,
silent: t.silent
});
return i.__from = t,
t.__hovermir = i,
e && i.setstyle(e),
this._hoverelements.push(i),
i
}
},
removehover: function(t) {
var e = t.__hovermir,
i = this._hoverelements,
n = l(i, e);
n >= 0 && i.splice(n, 1),
t.__hovermir = null
},
clearhover: function(t) {
for (var e = this._hoverelements,
i = 0; i < e.length; i++) {
var n = e[i].__from;
n && (n.__hovermir = null)
}
e.length = 0
},
refreshhover: function() {
var t = this._hoverelements,
e = t.length,
i = this._hoverlayer;
if (i && i.clear(), e) {
ve(t, this.storage.displayablesortfunc),
i || (i = this._hoverlayer = this.getlayer(1e5));
var n = {};
i.ctx.save();
for (var o = 0; o < e;) {
var a = t[o],
r = a.__from;
r && r.__zr ? (o++, r.invisible || (a.transform = r.transform, a.invtransform = r.invtransform, a.__clippaths = r.__clippaths, this._dopaintel(a, i, !0, n))) : (t.splice(o, 1), r.__hovermir = null, e--)
}
i.ctx.restore()
}
},
gethoverlayer: function() {
return this.getlayer(1e5)
},
_paintlist: function(t, e, i) {
if (this._redrawid === i) {
e = e || !1,
this._updatelayerstatus(t);
var n = this._dopaintlist(t, e);
if (this._needsmanuallycompositing && this._compositemanually(), !n) {
var o = this;
nb(function() {
o._paintlist(t, e, i)
})
}
}
},
_compositemanually: function() {
var t = this.getlayer(314159).ctx,
e = this._domroot.width,
i = this._domroot.height;
t.clearrect(0, 0, e, i),
this.eachbuiltinlayer(function(n) {
n.virtual && t.drawimage(n.dom, 0, 0, e, i)
})
},
_dopaintlist: function(t, e) {
for (var i = [], n = 0; n < this._zlevellist.length; n++) {
var o = this._zlevellist[n]; (s = this._layers[o]).__builtin__ && s !== this._hoverlayer && (s.__dirty || e) && i.push(s)
}
for (var a = !0,
r = 0; r < i.length; r++) {
var s = i[r],
l = s.ctx,
u = {};
l.save();
var h = e ? s.__startindex: s.__drawindex,
c = !e && s.incremental && date.now,
f = c && date.now(),
p = s.zlevel === this._zlevellist[0] ? this._backgroundcolor: null;
if (s.__startindex === s.__endindex) s.clear(!1, p);
else if (h === s.__startindex) {
var g = t[h];
g.incremental && g.notclear && !e || s.clear(!1, p)
} - 1 === h && (console.error("for some unknown reason. drawindex is -1"), h = s.__startindex);
for (var m = h; m < s.__endindex; m++) {
var v = t[m];
if (this._dopaintel(v, s, e, u), v.__dirty = v.__dirtytext = !1, c && date.now() - f > 15) break
}
s.__drawindex = m,
s.__drawindex < s.__endindex && (a = !1),
u.prevelclippaths && l.restore(),
l.restore()
}
return z_.wxa && d(this._layers,
function(t) {
t && t.ctx && t.ctx.draw && t.ctx.draw()
}),
a
},
_dopaintel: function(t, e, i, n) {
var o = e.ctx,
a = t.transform;
if ((e.__dirty || i) && !t.invisible && 0 !== t.style.opacity && (!a || a[0] || a[3]) && (!t.culling || !fi(t, this._width, this._height))) {
var r = t.__clippaths;
n.prevelclippaths && !pi(r, n.prevelclippaths) || (n.prevelclippaths && (e.ctx.restore(), n.prevelclippaths = null, n.prevel = null), r && (o.save(), gi(r, o), n.prevelclippaths = r)),
t.beforebrush && t.beforebrush(o),
t.brush(o, n.prevel || null),
n.prevel = t,
t.afterbrush && t.afterbrush(o)
}
},
getlayer: function(t, e) {
this._singlecanvas && !this._needsmanuallycompositing && (t = 314159);
var i = this._layers[t];
return i || ((i = new ib("zr_" + t, this, this.dpr)).zlevel = t, i.__builtin__ = !0, this._layerconfig[t] && n(i, this._layerconfig[t], !0), e && (i.virtual = e), this.insertlayer(t, i), i.initcontext()),
i
},
insertlayer: function(t, e) {
var i = this._layers,
n = this._zlevellist,
o = n.length,
a = null,
r = -1,
s = this._domroot;
if (i[t]) bw("zlevel " + t + " has been used already");
else if (di(e)) {
if (o > 0 && t > n[0]) {
for (r = 0; r < o - 1 && !(n[r] < t && n[r + 1] > t); r++);
a = i[n[r]]
}
if (n.splice(r + 1, 0, t), i[t] = e, !e.virtual) if (a) {
var l = a.dom;
l.nextsibling ? s.insertbefore(e.dom, l.nextsibling) : s.appendchild(e.dom)
} else s.firstchild ? s.insertbefore(e.dom, s.firstchild) : s.appendchild(e.dom)
} else bw("layer of zlevel " + t + " is not valid")
},
eachlayer: function(t, e) {
var i, n, o = this._zlevellist;
for (n = 0; n < o.length; n++) i = o[n],
t.call(e, this._layers[i], i)
},
eachbuiltinlayer: function(t, e) {
var i, n, o, a = this._zlevellist;
for (o = 0; o < a.length; o++) n = a[o],
(i = this._layers[n]).__builtin__ && t.call(e, i, n)
},
eachotherlayer: function(t, e) {
var i, n, o, a = this._zlevellist;
for (o = 0; o < a.length; o++) n = a[o],
(i = this._layers[n]).__builtin__ || t.call(e, i, n)
},
getlayers: function() {
return this._layers
},
_updatelayerstatus: function(t) {
function e(t) {
i && (i.__endindex !== t && (i.__dirty = !0), i.__endindex = t)
}
if (this.eachbuiltinlayer(function(t, e) {
t.__dirty = t.__used = !1
}), this._singlecanvas) for (o = 1; o < t.length; o++) if ((r = t[o]).zlevel !== t[o - 1].zlevel || r.incremental) {
this._needsmanuallycompositing = !0;
break
}
for (var i = null,
n = 0,
o = 0; o < t.length; o++) {
var a, r = t[o],
s = r.zlevel;
r.incremental ? ((a = this.getlayer(s + .001, this._needsmanuallycompositing)).incremental = !0, n = 1) : a = this.getlayer(s + (n > 0 ? .01 : 0), this._needsmanuallycompositing),
a.__builtin__ || bw("zlevel " + s + " has been used by unkown layer " + a.id),
a !== i && (a.__used = !0, a.__startindex !== o && (a.__dirty = !0), a.__startindex = o, a.incremental ? a.__drawindex = -1 : a.__drawindex = o, e(o), i = a),
r.__dirty && (a.__dirty = !0, a.incremental && a.__drawindex < 0 && (a.__drawindex = o))
}
e(o),
this.eachbuiltinlayer(function(t, e) { ! t.__used && t.getelementcount() > 0 && (t.__dirty = !0, t.__startindex = t.__endindex = t.__drawindex = 0),
t.__dirty && t.__drawindex < 0 && (t.__drawindex = t.__startindex)
})
},
clear: function() {
return this.eachbuiltinlayer(this._clearlayer),
this
},
_clearlayer: function(t) {
t.clear()
},
setbackgroundcolor: function(t) {
this._backgroundcolor = t
},
configlayer: function(t, e) {
if (e) {
var i = this._layerconfig;
i[t] ? n(i[t], e, !0) : i[t] = e;
for (var o = 0; o < this._zlevellist.length; o++) {
var a = this._zlevellist[o];
a !== t && a !== t + .01 || n(this._layers[a], i[t], !0)
}
}
},
dellayer: function(t) {
var e = this._layers,
i = this._zlevellist,
n = e[t];
n && (n.dom.parentnode.removechild(n.dom), delete e[t], i.splice(l(i, t), 1))
},
resize: function(t, e) {
if (this._domroot.style) {
var i = this._domroot;
i.style.display = "none";
var n = this._opts;
if (null != t && (n.width = t), null != e && (n.height = e), t = this._getsize(0), e = this._getsize(1), i.style.display = "", this._width != t || e != this._height) {
i.style.width = t + "px",
i.style.height = e + "px";
for (var o in this._layers) this._layers.hasownproperty(o) && this._layers[o].resize(t, e);
d(this._progressivelayers,
function(i) {
i.resize(t, e)
}),
this.refresh(!0)
}
this._width = t,
this._height = e
} else {
if (null == t || null == e) return;
this._width = t,
this._height = e,
this.getlayer(314159).resize(t, e)
}
return this
},
clearlayer: function(t) {
var e = this._layers[t];
e && e.clear()
},
dispose: function() {
this.root.innerhtml = "",
this.root = this.storage = this._domroot = this._layers = null
},
getrenderedcanvas: function(t) {
if (t = t || {},
this._singlecanvas && !this._compositemanually) return this._layers[314159].dom;
var e = new ib("image", this, t.pixelratio || this.dpr);
if (e.initcontext(), e.clear(!1, t.backgroundcolor || this._backgroundcolor), t.pixelratio <= this.dpr) {
this.refresh();
var i = e.dom.width,
n = e.dom.height,
o = e.ctx;
this.eachlayer(function(t) {
t.__builtin__ ? o.drawimage(t.dom, 0, 0, i, n) : t.rendertocanvas && (e.ctx.save(), t.rendertocanvas(e.ctx), e.ctx.restore())
})
} else for (var a = {},
r = this.storage.getdisplaylist(!0), s = 0; s < r.length; s++) {
var l = r[s];
this._dopaintel(l, e, !0, a)
}
return e.dom
},
getwidth: function() {
return this._width
},
getheight: function() {
return this._height
},
_getsize: function(t) {
var e = this._opts,
i = ["width", "height"][t],
n = ["clientwidth", "clientheight"][t],
o = ["paddingleft", "paddingtop"][t],
a = ["paddingright", "paddingbottom"][t];
if (null != e[i] && "auto" !== e[i]) return parsefloat(e[i]);
var r = this.root,
s = document.defaultview.getcomputedstyle(r);
return (r[n] || ci(s[i]) || ci(r.style[i])) - (ci(s[o]) || 0) - (ci(s[a]) || 0) | 0
},
pathtoimage: function(t, e) {
e = e || this.dpr;
var i = document.createelement("canvas"),
n = i.getcontext("2d"),
o = t.getboundingrect(),
a = t.style,
r = a.shadowblur * e,
s = a.shadowoffsetx * e,
l = a.shadowoffsety * e,
u = a.hasstroke() ? a.linewidth: 0,
h = math.max(u / 2, -s + r),
c = math.max(u / 2, s + r),
d = math.max(u / 2, -l + r),
f = math.max(u / 2, l + r),
p = o.width + h + c,
g = o.height + d + f;
i.width = p * e,
i.height = g * e,
n.scale(e, e),
n.clearrect(0, 0, p, g),
n.dpr = e;
var m = {
position: t.position,
rotation: t.rotation,
scale: t.scale
};
t.position = [h - o.x, d - o.y],
t.rotation = 0,
t.scale = [1, 1],
t.updatetransform(),
t && t.brush(n);
var v = new hi({
style: {
x: 0,
y: 0,
image: i
}
});
return null != m.position && (v.position = t.position = m.position),
null != m.rotation && (v.rotation = t.rotation = m.rotation),
null != m.scale && (v.scale = t.scale = m.scale),
v
}
};
var xb = function(t) {
t = t || {},
this.stage = t.stage || {},
this.onframe = t.onframe ||
function() {},
this._clips = [],
this._running = !1,
this._time,
this._pausedtime,
this._pausestart,
this._paused = !1,
aw.call(this)
};
xb.prototype = {
constructor: xb,
addclip: function(t) {
this._clips.push(t)
},
addanimator: function(t) {
t.animation = this;
for (var e = t.getclips(), i = 0; i < e.length; i++) this.addclip(e[i])
},
removeclip: function(t) {
var e = l(this._clips, t);
e >= 0 && this._clips.splice(e, 1)
},
removeanimator: function(t) {
for (var e = t.getclips(), i = 0; i < e.length; i++) this.removeclip(e[i]);
t.animation = null
},
_update: function() {
for (var t = (new date).gettime() - this._pausedtime, e = t - this._time, i = this._clips, n = i.length, o = [], a = [], r = 0; r < n; r++) {
var s = i[r],
l = s.step(t, e);
l && (o.push(l), a.push(s))
}
for (r = 0; r < n;) i[r]._needsremove ? (i[r] = i[n - 1], i.pop(), n--) : r++;
n = o.length;
for (r = 0; r < n; r++) a[r].fire(o[r]);
this._time = t,
this.onframe(e),
this.trigger("frame", e),
this.stage.update && this.stage.update()
},
_startloop: function() {
function t() {
e._running && (nb(t), !e._paused && e._update())
}
var e = this;
this._running = !0,
nb(t)
},
start: function() {
this._time = (new date).gettime(),
this._pausedtime = 0,
this._startloop()
},
stop: function() {
this._running = !1
},
pause: function() {
this._paused || (this._pausestart = (new date).gettime(), this._paused = !0)
},
resume: function() {
this._paused && (this._pausedtime += (new date).gettime() - this._pausestart, this._paused = !1)
},
clear: function() {
this._clips = []
},
isfinished: function() {
return ! this._clips.length
},
animate: function(t, e) {
var i = new ow(t, (e = e || {}).loop, e.getter, e.setter);
return this.addanimator(i),
i
}
},
h(xb, aw);
var _b = function() {
this._track = []
};
_b.prototype = {
constructor: _b,
recognize: function(t, e, i) {
return this._dotrack(t, e, i),
this._recognize(t)
},
clear: function() {
return this._track.length = 0,
this
},
_dotrack: function(t, e, i) {
var n = t.touches;
if (n) {
for (var o = {
points: [],
touches: [],
target: e,
event: t
},
a = 0, r = n.length; a < r; a++) {
var s = n[a],
l = rt(i, s, {});
o.points.push([l.zrx, l.zry]),
o.touches.push(s)
}
this._track.push(o)
}
},
_recognize: function(t) {
for (var e in wb) if (wb.hasownproperty(e)) {
var i = wb[e](this._track, t);
if (i) return i
}
}
};
var wb = {
pinch: function(t, e) {
var i = t.length;
if (i) {
var n = (t[i - 1] || {}).points,
o = (t[i - 2] || {}).points || n;
if (o && o.length > 1 && n && n.length > 1) {
var a = vi(n) / vi(o); ! isfinite(a) && (a = 1),
e.pinchscale = a;
var r = yi(n);
return e.pinchx = r[0],
e.pinchy = r[1],
{
type: "pinch",
target: t[0].target,
event: e
}
}
}
}
},
bb = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
sb = ["touchstart", "touchend", "touchmove"],
mb = {
pointerdown: 1,
pointerup: 1,
pointermove: 1,
pointerout: 1
},
ib = f(bb,
function(t) {
var e = t.replace("mouse", "pointer");
return mb[e] ? e: t
}),
tb = {
mousemove: function(t) {
t = lt(this.dom, t),
this.trigger("mousemove", t)
},
mouseout: function(t) {
var e = (t = lt(this.dom, t)).toelement || t.relatedtarget;
if (e != this.dom) for (; e && 9 != e.nodetype;) {
if (e === this.dom) return;
e = e.parentnode
}
this.trigger("mouseout", t)
},
touchstart: function(t) { (t = lt(this.dom, t)).zrbytouch = !0,
this._lasttouchmoment = new date,
_i(this, t, "start"),
tb.mousemove.call(this, t),
tb.mousedown.call(this, t),
wi(this)
},
touchmove: function(t) { (t = lt(this.dom, t)).zrbytouch = !0,
_i(this, t, "change"),
tb.mousemove.call(this, t),
wi(this)
},
touchend: function(t) { (t = lt(this.dom, t)).zrbytouch = !0,
_i(this, t, "end"),
tb.mouseup.call(this, t),
+new date - this._lasttouchmoment < 300 && tb.click.call(this, t),
wi(this)
},
pointerdown: function(t) {
tb.mousedown.call(this, t)
},
pointermove: function(t) {
bi(t) || tb.mousemove.call(this, t)
},
pointerup: function(t) {
tb.mouseup.call(this, t)
},
pointerout: function(t) {
bi(t) || tb.mouseout.call(this, t)
}
};
d(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"],
function(t) {
tb[t] = function(e) {
e = lt(this.dom, e),
this.trigger(t, e)
}
});
var ab = mi.prototype;
ab.dispose = function() {
for (var t = bb.concat(sb), e = 0; e < t.length; e++) {
var i = t[e];
ht(this.dom, xi(i), this._handlers[i])
}
},
ab.setcursor = function(t) {
this.dom.style && (this.dom.style.cursor = t || "default")
},
h(mi, aw);
var db = !z_.canvassupported,
cb = {
canvas: yb
},
lb = {},
kb = function(t, e, i) {
i = i || {},
this.dom = e,
this.id = t;
var n = this,
o = new jw,
a = i.renderer;
if (db) {
if (!cb.vml) throw new error("you need to require 'zrender/vml/vml' to support ie8");
a = "vml"
} else a && cb[a] || (a = "canvas");
var r = new cb[a](e, o, i, t);
this.storage = o,
this.painter = r;
var s = z_.node || z_.worker ? null: new mi(r.getviewportroot());
this.handler = new cw(o, r, s, r.root),
this.animation = new xb({
stage: {
update: m(this.flush, this)
}
}),
this.animation.start(),
this._needsrefresh;
var l = o.delfromstorage,
u = o.addtostorage;
o.delfromstorage = function(t) {
l.call(o, t),
t && t.removeselffromzr(n)
},
o.addtostorage = function(t) {
u.call(o, t),
t.addselftozr(n)
}
};
kb.prototype = {
constructor: kb,
getid: function() {
return this.id
},
add: function(t) {
this.storage.addroot(t),
this._needsrefresh = !0
},
remove: function(t) {
this.storage.delroot(t),
this._needsrefresh = !0
},
configlayer: function(t, e) {
this.painter.configlayer && this.painter.configlayer(t, e),
this._needsrefresh = !0
},
setbackgroundcolor: function(t) {
this.painter.setbackgroundcolor && this.painter.setbackgroundcolor(t),
this._needsrefresh = !0
},
refreshimmediately: function() {
this._needsrefresh = !1,
this.painter.refresh(),
this._needsrefresh = !1
},
refresh: function() {
this._needsrefresh = !0
},
flush: function() {
var t;
this._needsrefresh && (t = !0, this.refreshimmediately()),
this._needsrefreshhover && (t = !0, this.refreshhoverimmediately()),
t && this.trigger("rendered")
},
addhover: function(t, e) {
if (this.painter.addhover) {
var i = this.painter.addhover(t, e);
return this.refreshhover(),
i
}
},
removehover: function(t) {
this.painter.removehover && (this.painter.removehover(t), this.refreshhover())
},
clearhover: function() {
this.painter.clearhover && (this.painter.clearhover(), this.refreshhover())
},
refreshhover: function() {
this._needsrefreshhover = !0
},
refreshhoverimmediately: function() {
this._needsrefreshhover = !1,
this.painter.refreshhover && this.painter.refreshhover()
},
resize: function(t) {
t = t || {},
this.painter.resize(t.width, t.height),
this.handler.resize()
},
clearanimation: function() {
this.animation.clear()
},
getwidth: function() {
return this.painter.getwidth()
},
getheight: function() {
return this.painter.getheight()
},
pathtoimage: function(t, e) {
return this.painter.pathtoimage(t, e)
},
setcursorstyle: function(t) {
this.handler.setcursorstyle(t)
},
findhover: function(t, e) {
return this.handler.findhover(t, e)
},
on: function(t, e, i) {
this.handler.on(t, e, i)
},
off: function(t, e) {
this.handler.off(t, e)
},
trigger: function(t, e) {
this.handler.trigger(t, e)
},
clear: function() {
this.storage.delroot(),
this.painter.clear()
},
dispose: function() {
this.animation.stop(),
this.clear(),
this.storage.dispose(),
this.painter.dispose(),
this.handler.dispose(),
this.animation = this.storage = this.painter = this.handler = null,
ai(this.id)
}
};
var pb = (object.freeze || object)({
version: "4.0.5",
init: ii,
dispose: function(t) {
if (t) t.dispose();
else {
for (var e in lb) lb.hasownproperty(e) && lb[e].dispose();
lb = {}
}
return this
},
getinstance: function(t) {
return lb[t]
},
registerpainter: ti
}),
nb = d,
ob = w,
eb = y,
rb = "series\0",
zb = ["fontstyle", "fontweight", "fontsize", "fontfamily", "rich", "tag", "color", "textbordercolor", "textborderwidth", "width", "height", "lineheight", "align", "verticalalign", "baseline", "shadowcolor", "shadowblur", "shadowoffsetx", "shadowoffsety", "textshadowcolor", "textshadowblur", "textshadowoffsetx", "textshadowoffsety", "backgroundcolor", "bordercolor", "borderwidth", "borderradius", "padding"],
bb = 0,
vb = ".",
gb = "___ec__component__container___",
fb = 0,
wb = function(t) {
for (var e = 0; e < t.length; e++) t[e][1] || (t[e][1] = t[e][0]);
return function(e, i, n) {
for (var o = {},
a = 0; a < t.length; a++) {
var r = t[a][1];
if (! (i && l(i, r) >= 0 || n && l(n, r) < 0)) {
var s = e.getshallow(r);
null != s && (o[t[a][0]] = s)
}
}
return o
}
},
hb = wb([["linewidth", "width"], ["stroke", "color"], ["opacity"], ["shadowblur"], ["shadowoffsetx"], ["shadowoffsety"], ["shadowcolor"]]),
zb = {
getlinestyle: function(t) {
var e = hb(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]
}
},
ub = wb([["fill", "color"], ["shadowblur"], ["shadowoffsetx"], ["shadowoffsety"], ["opacity"], ["shadowcolor"]]),
xb = {
getareastyle: function(t, e) {
return ub(this, t, e)
}
},
jb = math.pow,
yb = math.sqrt,
qb = 1e-8,
kb = 1e-4,
$b = yb(3),
jb = 1 / 3,
qb = v(),
ts = v(),
es = v(),
is = math.min,
ns = math.max,
os = math.sin,
as = math.cos,
rs = 2 * math.pi,
ss = v(),
ls = v(),
us = v(),
hs = [],
cs = [],
ds = {
m: 1,
l: 2,
c: 3,
q: 4,
a: 5,
z: 6,
r: 7
},
fs = [],
ps = [],
gs = [],
ms = [],
vs = math.min,
ys = math.max,
xs = math.cos,
_s = math.sin,
ws = math.sqrt,
bs = math.abs,
ss = "undefined" != typeof float32array,
ms = function(t) {
this._savedata = !t,
this._savedata && (this.data = []),
this._ctx = null
};
ms.prototype = {
constructor: ms,
_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 = bs(1 / rw / t) || 0,
this._uy = bs(1 / rw / 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(ds.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 = bs(t - this._xi) > this._ux || bs(e - this._yi) > this._uy || this._len < 5;
return this.adddata(ds.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, o, a) {
return this.adddata(ds.c, t, e, i, n, o, a),
this._ctx && (this._needsdash() ? this._dashedbezierto(t, e, i, n, o, a) : this._ctx.beziercurveto(t, e, i, n, o, a)),
this._xi = o,
this._yi = a,
this
},
quadraticcurveto: function(t, e, i, n) {
return this.adddata(ds.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, o, a) {
return this.adddata(ds.a, t, e, i, i, n, o - n, 0, a ? 0 : 1),
this._ctx && this._ctx.arc(t, e, i, n, o, a),
this._xi = xs(o) * i + t,
this._yi = _s(o) * i + e,
this
},
arcto: function(t, e, i, n, o) {
return this._ctx && this._ctx.arcto(t, e, i, n, o),
this
},
rect: function(t, e, i, n) {
return this._ctx && this._ctx.rect(t, e, i, n),
this.adddata(ds.r, t, e, i, n),
this
},
closepath: function() {
this.adddata(ds.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 || !ss || (this.data = new float32array(e));
for (var i = 0; i < e; 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,
o = 0; o < e; o++) i += t[o].len();
ss && this.data instanceof float32array && (this.data = new float32array(n + i));
for (o = 0; o < e; o++) for (var a = t[o].data, r = 0; r < a.length; r++) this.data[n++] = a[r];
this._len = n
},
adddata: function(t) {
if (this._savedata) {
var e = this.data;
this._len + arguments.length > e.length && (this._expanddata(), e = this.data);
for (var i = 0; i < arguments.length; i++) e[this._len++] = arguments[i];
this._prevcmd = t
}
},
_expanddata: function() {
if (! (this.data instanceof array)) {
for (var t = [], e = 0; e < this._len; e++) t[e] = this.data[e];
this.data = t
}
},
_needsdash: function() {
return this._linedash
},
_dashedlineto: function(t, e) {
var i, n, o = this._dashsum,
a = this._dashoffset,
r = this._linedash,
s = this._ctx,
l = this._xi,
u = this._yi,
h = t - l,
c = e - u,
d = ws(h * h + c * c),
f = l,
p = u,
g = r.length;
for (h /= d, c /= d, a < 0 && (a = o + a), f -= (a %= o) * h, p -= a * c; h > 0 && f <= t || h < 0 && f >= t || 0 == h && (c > 0 && p <= e || c < 0 && p >= e);) f += h * (i = r[n = this._dashidx]),
p += c * i,
this._dashidx = (n + 1) % g,
h > 0 && f < l || h < 0 && f > l || c > 0 && p < u || c < 0 && p > u || s[n % 2 ? "moveto": "lineto"](h >= 0 ? vs(f, t) : ys(f, t), c >= 0 ? vs(p, e) : ys(p, e));
h = f - t,
c = p - e,
this._dashoffset = -ws(h * h + c * c)
},
_dashedbezierto: function(t, e, i, n, o, a) {
var r, s, l, u, h, c = this._dashsum,
d = this._dashoffset,
f = this._linedash,
p = this._ctx,
g = this._xi,
m = this._yi,
v = qi,
y = 0,
x = this._dashidx,
_ = f.length,
w = 0;
for (d < 0 && (d = c + d), d %= c, r = 0; r < 1; r += .1) s = v(g, t, i, o, r + .1) - v(g, t, i, o, r),
l = v(m, e, n, a, r + .1) - v(m, e, n, a, r),
y += ws(s * s + l * l);
for (; x < _ && !((w += f[x]) > d); x++);
for (r = (w - d) / y; r <= 1;) u = v(g, t, i, o, r),
h = v(m, e, n, a, r),
x % 2 ? p.moveto(u, h) : p.lineto(u, h),
r += f[x] / y,
x = (x + 1) % _;
x % 2 != 0 && p.lineto(o, a),
s = o - u,
l = a - h,
this._dashoffset = -ws(s * s + l * l)
},
_dashedquadraticto: function(t, e, i, n) {
var o = i,
a = n;
i = (i + 2 * t) / 3,
n = (n + 2 * e) / 3,
t = (this._xi + 2 * t) / 3,
e = (this._yi + 2 * e) / 3,
this._dashedbezierto(t, e, i, n, o, a)
},
tostatic: function() {
var t = this.data;
t instanceof array && (t.length = this._len, ss && (this.data = new float32array(t)))
},
getboundingrect: function() {
fs[0] = fs[1] = gs[0] = gs[1] = number.max_value,
ps[0] = ps[1] = ms[0] = ms[1] = -number.max_value;
for (var t = this.data,
e = 0,
i = 0,
n = 0,
o = 0,
a = 0; a < t.length;) {
var r = t[a++];
switch (1 == a && (n = e = t[a], o = i = t[a + 1]), r) {
case ds.m:
e = n = t[a++],
i = o = t[a++],
gs[0] = n,
gs[1] = o,
ms[0] = n,
ms[1] = o;
break;
case ds.l:
fn(e, i, t[a], t[a + 1], gs, ms),
e = t[a++],
i = t[a++];
break;
case ds.c:
pn(e, i, t[a++], t[a++], t[a++], t[a++], t[a], t[a + 1], gs, ms),
e = t[a++],
i = t[a++];
break;
case ds.q:
gn(e, i, t[a++], t[a++], t[a], t[a + 1], gs, ms),
e = t[a++],
i = t[a++];
break;
case ds.a:
var s = t[a++],
l = t[a++],
u = t[a++],
h = t[a++],
c = t[a++],
d = t[a++] + c,
f = (t[a++], 1 - t[a++]);
1 == a && (n = xs(c) * u + s, o = _s(c) * h + l),
mn(s, l, u, h, c, d, f, gs, ms),
e = xs(d) * u + s,
i = _s(d) * h + l;
break;
case ds.r:
fn(n = e = t[a++], o = i = t[a++], n + t[a++], o + t[a++], gs, ms);
break;
case ds.z:
e = n,
i = o
}
tt(fs, fs, gs),
et(ps, ps, ms)
}
return 0 === a && (fs[0] = fs[1] = ps[0] = ps[1] = 0),
new ue(fs[0], fs[1], ps[0] - fs[0], ps[1] - fs[1])
},
rebuildpath: function(t) {
for (var e, i, n, o, a, r, s = this.data,
l = this._ux,
u = this._uy,
h = this._len,
c = 0; c < h;) {
var d = s[c++];
switch (1 == c && (e = n = s[c], i = o = s[c + 1]), d) {
case ds.m:
e = n = s[c++],
i = o = s[c++],
t.moveto(n, o);
break;
case ds.l:
a = s[c++],
r = s[c++],
(bs(a - n) > l || bs(r - o) > u || c === h - 1) && (t.lineto(a, r), n = a, o = r);
break;
case ds.c:
t.beziercurveto(s[c++], s[c++], s[c++], s[c++], s[c++], s[c++]),
n = s[c - 2],
o = s[c - 1];
break;
case ds.q:
t.quadraticcurveto(s[c++], s[c++], s[c++], s[c++]),
n = s[c - 2],
o = s[c - 1];
break;
case ds.a:
var f = s[c++],
p = s[c++],
g = s[c++],
m = s[c++],
v = s[c++],
y = s[c++],
x = s[c++],
_ = s[c++],
w = g > m ? g: m,
b = g > m ? 1 : g / m,
s = g > m ? m / g: 1,
m = v + y;
math.abs(g - m) > .001 ? (t.translate(f, p), t.rotate(x), t.scale(b, s), t.arc(0, 0, w, v, m, 1 - _), t.scale(1 / b, 1 / s), t.rotate( - x), t.translate( - f, -p)) : t.arc(f, p, w, v, m, 1 - _),
1 == c && (e = xs(v) * g + f, i = _s(v) * m + p),
n = xs(m) * g + f,
o = _s(m) * m + p;
break;
case ds.r:
e = n = s[c],
i = o = s[c + 1],
t.rect(s[c++], s[c++], s[c++], s[c++]);
break;
case ds.z:
t.closepath(),
n = e,
o = i
}
}
}
},
ms.cmd = ds;
var is = 2 * math.pi,
ts = 2 * math.pi,
as = ms.cmd,
ds = 2 * math.pi,
cs = 1e-4,
ls = [ - 1, -1, -1],
ks = [ - 1, -1],
ps = eb.prototype.getcanvaspattern,
ns = math.abs,
os = new ms(!0);
kn.prototype = {
constructor: kn,
type: "path",
__dirtypath: !0,
strokecontainthreshold: 5,
brush: function(t, e) {
var i = this.style,
n = this.path || os,
o = i.hasstroke(),
a = i.hasfill(),
r = i.fill,
s = i.stroke,
l = a && !!r.colorstops,
u = o && !!s.colorstops,
h = a && !!r.image,
c = o && !!s.image;
if (i.bind(t, this, e), this.settransform(t), this.__dirty) {
var d;
l && (d = d || this.getboundingrect(), this._fillgradient = i.getgradient(t, r, d)),
u && (d = d || this.getboundingrect(), this._strokegradient = i.getgradient(t, s, d))
}
l ? t.fillstyle = this._fillgradient: h && (t.fillstyle = ps.call(r, t)),
u ? t.strokestyle = this._strokegradient: c && (t.strokestyle = ps.call(s, t));
var f = i.linedash,
p = i.linedashoffset,
g = !!t.setlinedash,
m = this.getglobalscale();
if (n.setscale(m[0], m[1]), this.__dirtypath || f && !g && o ? (n.beginpath(t), f && !g && (n.setlinedash(f), n.setlinedashoffset(p)), this.buildpath(n, this.shape, !1), this.path && (this.__dirtypath = !1)) : (t.beginpath(), this.path.rebuildpath(t)), a) if (null != i.fillopacity) {
v = t.globalalpha;
t.globalalpha = i.fillopacity * i.opacity,
n.fill(t),
t.globalalpha = v
} else n.fill(t);
if (f && g && (t.setlinedash(f), t.linedashoffset = p), o) if (null != i.strokeopacity) {
var v = t.globalalpha;
t.globalalpha = i.strokeopacity * i.opacity,
n.stroke(t),
t.globalalpha = v
} else n.stroke(t);
f && g && t.setlinedash([]),
null != i.text && (this.restoretransform(t), this.drawrecttext(t, this.getboundingrect()))
},
buildpath: function(t, e, i) {},
createpathproxy: function() {
this.path = new ms
},
getboundingrect: function() {
var t = this._rect,
e = this.style,
i = !t;
if (i) {
var n = this.path;
n || (n = this.path = new ms),
this.__dirtypath && (n.beginpath(), this.buildpath(n, this.shape, !1)),
t = n.getboundingrect()
}
if (this._rect = t, e.hasstroke()) {
var o = this._rectwithstroke || (this._rectwithstroke = t.clone());
if (this.__dirty || i) {
o.copy(t);
var a = e.linewidth,
r = e.strokenoscale ? this.getlinescale() : 1;
e.hasfill() || (a = math.max(a, this.strokecontainthreshold || 4)),
r > 1e-10 && (o.width += a / r, o.height += a / r, o.x -= a / r / 2, o.y -= a / r / 2)
}
return o
}
return t
},
contain: function(t, e) {
var i = this.transformcoordtolocal(t, e),
n = this.getboundingrect(),
o = this.style;
if (t = i[0], e = i[1], n.contain(t, e)) {
var a = this.path.data;
if (o.hasstroke()) {
var r = o.linewidth,
s = o.strokenoscale ? this.getlinescale() : 1;
if (s > 1e-10 && (o.hasfill() || (r = math.max(r, this.strokecontainthreshold)), ln(a, r / s, t, e))) return ! 0
}
if (o.hasfill()) return cn(a, t, e)
}
return ! 1
},
dirty: function(t) {
null == t && (t = !0),
t && (this.__dirtypath = t, this._rect = null),
this.__dirty = this.__dirtytext = !0,
this.__zr && this.__zr.refresh(),
this.__cliptarget && this.__cliptarget.dirty()
},
animateshape: function(t) {
return this.animate("shape", t)
},
attrkv: function(t, e) {
"shape" === t ? (this.setshape(e), this.__dirtypath = !0, this._rect = null) : ui.prototype.attrkv.call(this, t, e)
},
setshape: function(t, e) {
var i = this.shape;
if (i) {
if (w(t)) for (var n in t) t.hasownproperty(n) && (i[n] = t[n]);
else i[t] = e;
this.dirty(!0)
}
return this
},
getlinescale: function() {
var t = this.transform;
return t && ns(t[0] - 1) > 1e-10 && ns(t[3] - 1) > 1e-10 ? math.sqrt(ns(t[0] * t[3] - t[2] * t[1])) : 1
}
},
kn.extend = function(t) {
var e = function(e) {
kn.call(this, e),
t.style && this.style.extendfrom(t.style, !1);
var i = t.shape;
if (i) {
this.shape = this.shape || {};
var n = this.shape;
for (var o in i) ! n.hasownproperty(o) && i.hasownproperty(o) && (n[o] = i[o])
}
t.init && t.init.call(this, e)
};
u(e, kn);
for (var i in t)"style" !== i && "shape" !== i && (e.prototype[i] = t[i]);
return e
},
u(kn, ui);
var es = ms.cmd,
rs = [[], [], []],
zs = math.sqrt,
bs = math.atan2,
vs = function(t, e) {
var i, n, o, a, r, s, l = t.data,
u = es.m,
h = es.c,
c = es.l,
d = es.r,
f = es.a,
p = es.q;
for (o = 0, a = 0; o < l.length;) {
switch (i = l[o++], a = o, n = 0, i) {
case u:
case c:
n = 1;
break;
case h:
n = 3;
break;
case p:
n = 2;
break;
case f:
var g = e[4],
m = e[5],
v = zs(e[0] * e[0] + e[1] * e[1]),
y = zs(e[2] * e[2] + e[3] * e[3]),
x = bs( - e[1] / y, e[0] / v);
l[o] *= v,
l[o++] += g,
l[o] *= y,
l[o++] += m,
l[o++] *= v,
l[o++] *= y,
l[o++] += x,
l[o++] += x,
a = o += 2;
break;
case d:
s[0] = l[o++],
s[1] = l[o++],
q(s, s, e),
l[a++] = s[0],
l[a++] = s[1],
s[0] += l[o++],
s[1] += l[o++],
q(s, s, e),
l[a++] = s[0],
l[a++] = s[1]
}
for (r = 0; r < n; r++)(s = rs[r])[0] = l[o++],
s[1] = l[o++],
q(s, s, e),
l[a++] = s[0],
l[a++] = s[1]
}
},
gs = math.sqrt,
fs = math.sin,
ws = math.cos,
hs = math.pi,
zs = function(t) {
return math.sqrt(t[0] * t[0] + t[1] * t[1])
},
us = function(t, e) {
return (t[0] * e[0] + t[1] * e[1]) / (zs(t) * zs(e))
},
xs = function(t, e) {
return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * math.acos(us(t, e))
},
js = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,
ys = /-?([0-9]*\.)?[0-9]+([ee]-?[0-9]+)?/g,
qs = function(t) {
ui.call(this, t)
};
qs.prototype = {
constructor: qs,
type: "text",
brush: function(t, e) {
var i = this.style;
this.__dirty && ue(i),
i.fill = i.stroke = i.shadowblur = i.shadowcolor = i.shadowoffsetx = i.shadowoffsety = null;
var n = i.text;
null != n && (n += ""),
li(n, i) && (this.settransform(t), je(this, t, n, i, null, e), this.restoretransform(t))
},
getboundingrect: function() {
var t = this.style;
if (this.__dirty && ue(t), !this._rect) {
var e = t.text;
null != e ? e += "": e = "";
var i = de(t.text + "", t.font, t.textalign, t.textverticalalign, t.textpadding, t.rich);
if (i.x += t.x || 0, i.y += t.y || 0, oi(t.textstroke, t.textstrokewidth)) {
var n = t.textstrokewidth;
i.x -= n / 2,
i.y -= n / 2,
i.width += n,
i.height += n
}
this._rect = i
}
return this._rect
}
},
u(qs, ui);
var ks = kn.extend({
type: "circle",
shape: {
cx: 0,
cy: 0,
r: 0
},
buildpath: function(t, e, i) {
i && t.moveto(e.cx + e.r, e.cy),
t.arc(e.cx, e.cy, e.r, 0, 2 * math.pi, !0)
}
}),
$s = [["shadowblur", 0], ["shadowcolor", "#000"], ["shadowoffsetx", 0], ["shadowoffsety", 0]],
js = function(t) {
return z_.browser.ie && z_.browser.version >= 11 ?
function() {
var e, i = this.__clippaths,
n = this.style;
if (i) for (var o = 0; o < i.length; o++) {
var a = i[o],
r = a && a.shape,
s = a && a.type;
if (r && ("sector" === s && r.startangle === r.endangle || "rect" === s && (!r.width || !r.height))) {
for (l = 0; l < $s.length; l++) $s[l][2] = n[$s[l][0]],
n[$s[l][0]] = $s[l][1];
e = !0;
break
}
}
if (t.apply(this, arguments), e) for (var l = 0; l < $s.length; l++) n[$s[l][0]] = $s[l][2]
}: t
},
qs = kn.extend({
type: "sector",
shape: {
cx: 0,
cy: 0,
r0: 0,
r: 0,
startangle: 0,
endangle: 2 * math.pi,
clockwise: !0
},
brush: js(kn.prototype.brush),
buildpath: function(t, e) {
var i = e.cx,
n = e.cy,
o = math.max(e.r0 || 0, 0),
a = math.max(e.r, 0),
r = e.startangle,
s = e.endangle,
l = e.clockwise,
u = math.cos(r),
h = math.sin(r);
t.moveto(u * o + i, h * o + n),
t.lineto(u * a + i, h * a + n),
t.arc(i, n, a, r, s, !l),
t.lineto(math.cos(s) * o + i, math.sin(s) * o + n),
0 !== o && t.arc(i, n, o, s, r, l),
t.closepath()
}
}),
tm = kn.extend({
type: "ring",
shape: {
cx: 0,
cy: 0,
r: 0,
r0: 0
},
buildpath: function(t, e) {
var i = e.cx,
n = e.cy,
o = 2 * math.pi;
t.moveto(i + e.r, n),
t.arc(i, n, e.r, 0, o, !1),
t.moveto(i + e.r0, n),
t.arc(i, n, e.r0, 0, o, !0)
}
}),
em = function(t, e) {
for (var i = t.length,
n = [], o = 0, a = 1; a < i; a++) o += k(t[a - 1], t[a]);
var r = o / 2;
r = r < i ? i: r;
for (a = 0; a < r; a++) {
var s, l, u, h = a / (r - 1) * (e ? i: i - 1),
c = math.floor(h),
d = h - c,
f = t[c % i];
e ? (s = t[(c - 1 + i) % i], l = t[(c + 1) % i], u = t[(c + 2) % i]) : (s = t[0 === c ? c: c - 1], l = t[c > i - 2 ? i - 1 : c + 1], u = t[c > i - 3 ? i - 1 : c + 2]);
var p = d * d,
g = d * p;
n.push([zn(s[0], f[0], l[0], u[0], d, p, g), zn(s[1], f[1], l[1], u[1], d, p, g)])
}
return n
},
im = function(t, e, i, n) {
var o, a, r, s, l = [],
u = [],
h = [],
c = [];
if (n) {
r = [1 / 0, 1 / 0],
s = [ - 1 / 0, -1 / 0];
for (var d = 0,
f = t.length; d < f; d++) tt(r, r, t[d]),
et(s, s, t[d]);
tt(r, r, n[0]),
et(s, s, n[1])
}
for (var d = 0,
f = t.length; d < f; d++) {
var p = t[d];
if (i) o = t[d ? d - 1 : f - 1],
a = t[(d + 1) % f];
else {
if (0 === d || d === f - 1) {
l.push(f(t[d]));
continue
}
o = t[d - 1],
a = t[d + 1]
}
u(u, a, o),
y(u, u, e);
var g = k(p, o),
m = k(p, a),
v = g + m;
0 !== v && (g /= v, m /= v),
y(h, u, -g),
y(c, u, m);
var y = h([], p, h),
x = h([], p, c);
n && (et(y, y, r), tt(y, y, s), et(x, x, r), tt(x, x, s)),
l.push(y),
l.push(x)
}
return i && l.push(l.shift()),
l
},
nm = kn.extend({
type: "polygon",
shape: {
points: null,
smooth: !1,
smoothconstraint: null
},
buildpath: function(t, e) {
bn(t, e, !0)
}
}),
om = kn.extend({
type: "polyline",
shape: {
points: null,
smooth: !1,
smoothconstraint: null
},
style: {
stroke: "#000",
fill: null
},
buildpath: function(t, e) {
bn(t, e, !1)
}
}),
am = kn.extend({
type: "rect",
shape: {
r: 0,
x: 0,
y: 0,
width: 0,
height: 0
},
buildpath: function(t, e) {
var i = e.x,
n = e.y,
o = e.width,
a = e.height;
e.r ? ze(t, e) : t.rect(i, n, o, a),
t.closepath()
}
}),
rm = kn.extend({
type: "line",
shape: {
x1: 0,
y1: 0,
x2: 0,
y2: 0,
percent: 1
},
style: {
stroke: "#000",
fill: null
},
buildpath: function(t, e) {
var i = e.x1,
n = e.y1,
o = e.x2,
a = e.y2,
r = e.percent;
0 !== r && (t.moveto(i, n), r < 1 && (o = i * (1 - r) + o * r, a = n * (1 - r) + a * r), t.lineto(o, a))
},
pointat: function(t) {
var e = this.shape;
return [e.x1 * (1 - t) + e.x2 * t, e.y1 * (1 - t) + e.y2 * t]
}
}),
sm = [],
lm = kn.extend({
type: "bezier-curve",
shape: {
x1: 0,
y1: 0,
x2: 0,
y2: 0,
cpx1: 0,
cpy1: 0,
percent: 1
},
style: {
stroke: "#000",
fill: null
},
buildpath: function(t, e) {
var i = e.x1,
n = e.y1,
o = e.x2,
a = e.y2,
r = e.cpx1,
s = e.cpy1,
l = e.cpx2,
u = e.cpy2,
h = e.percent;
0 !== h && (t.moveto(i, n), null == l || null == u ? (h < 1 && (hn(i, r, o, h, sm), r = sm[1], o = sm[2], hn(n, s, a, h, sm), s = sm[1], a = sm[2]), t.quadraticcurveto(r, s, o, a)) : (h < 1 && (on(i, r, l, o, h, sm), r = sm[1], l = sm[2], o = sm[3], on(n, s, u, a, h, sm), s = sm[1], u = sm[2], a = sm[3]), t.beziercurveto(r, s, l, u, o, a)))
},
pointat: function(t) {
return vn(this.shape, t, !1)
},
tangentat: function(t) {
var e = vn(this.shape, t, !0);
return q(e, e)
}
}),
um = kn.extend({
type: "arc",
shape: {
cx: 0,
cy: 0,
r: 0,
startangle: 0,
endangle: 2 * math.pi,
clockwise: !0
},
style: {
stroke: "#000",
fill: null
},
buildpath: function(t, e) {
var i = e.cx,
n = e.cy,
o = math.max(e.r, 0),
a = e.startangle,
r = e.endangle,
s = e.clockwise,
l = math.cos(a),
u = math.sin(a);
t.moveto(l * o + i, u * o + n),
t.arc(i, n, o, a, r, !s)
}
}),
hm = kn.extend({
type: "compound",
shape: {
paths: null
},
_updatepathdirty: function() {
for (var t = this.__dirtypath,
e = this.shape.paths,
i = 0; i < e.length; i++) t = t || e[i].__dirtypath;
this.__dirtypath = t,
this.__dirty = this.__dirty || t
},
beforebrush: function() {
this._updatepathdirty();
for (var t = this.shape.paths || [], e = this.getglobalscale(), i = 0; i < t.length; i++) t[i].path || t[i].createpathproxy(),
t[i].path.setscale(e[0], e[1])
},
buildpath: function(t, e) {
for (var i = e.paths || [], n = 0; n < i.length; n++) i[n].buildpath(t, i[n].shape, !0)
},
afterbrush: function() {
for (var t = this.shape.paths || [], e = 0; e < t.length; e++) t[e].__dirtypath = !1
},
getboundingrect: function() {
return this._updatepathdirty(),
kn.prototype.getboundingrect.call(this)
}
}),
cm = function(t) {
this.colorstops = t || []
};
cm.prototype = {
constructor: cm,
addcolorstop: function(t, e) {
this.colorstops.push({
offset: t,
color: e
})
}
};
var dm = function(t, e, i, n, o, a) {
this.x = null == t ? 0 : t,
this.y = null == e ? 0 : e,
this.x2 = null == i ? 1 : i,
this.y2 = null == n ? 0 : n,
this.type = "linear",
this.global = a || !1,
cm.call(this, o)
};
dm.prototype = {
constructor: dm
},
u(dm, cm);
var fm = function(t, e, i, n, o) {
this.x = null == t ? .5 : t,
this.y = null == e ? .5 : e,
this.r = null == i ? .5 : i,
this.type = "radial",
this.global = o || !1,
cm.call(this, n)
};
fm.prototype = {
constructor: fm
},
u(fm, cm),
gn.prototype.incremental = !0,
gn.prototype.cleardisplaybles = function() {
this._displayables = [],
this._temporarydisplayables = [],
this._cursor = 0,
this.dirty(),
this.notclear = !1
},
gn.prototype.adddisplayable = function(t, e) {
e ? this._temporarydisplayables.push(t) : this._displayables.push(t),
this.dirty()
},
gn.prototype.adddisplayables = function(t, e) {
e = e || !1;
for (var i = 0; i < t.length; i++) this.adddisplayable(t[i], e)
},
gn.prototype.eachpendingdisplayable = function(t) {
for (e = this._cursor; e < this._displayables.length; e++) t && t(this._displayables[e]);
for (var e = 0; e < this._temporarydisplayables.length; e++) t && t(this._temporarydisplayables[e])
},
gn.prototype.update = function() {
this.updatetransform();
for (t = this._cursor; t < this._displayables.length; t++)(e = this._displayables[t]).parent = this,
e.update(),
e.parent = null;
for (var t = 0; t < this._temporarydisplayables.length; t++) {
var e = this._temporarydisplayables[t];
e.parent = this,
e.update(),
e.parent = null
}
},
gn.prototype.brush = function(t, e) {
for (i = this._cursor; i < this._displayables.length; i++)(n = this._displayables[i]).beforebrush && n.beforebrush(t),
n.brush(t, i === this._cursor ? null: this._displayables[i - 1]),
n.afterbrush && n.afterbrush(t);
this._cursor = i;
for (var i = 0; i < this._temporarydisplayables.length; i++) {
var n = this._temporarydisplayables[i];
n.beforebrush && n.beforebrush(t),
n.brush(t, 0 === i ? null: this._temporarydisplayables[i - 1]),
n.afterbrush && n.afterbrush(t)
}
this._temporarydisplayables = [],
this.notclear = !0
};
var pm = [];
gn.prototype.getboundingrect = function() {
if (!this._rect) {
for (var t = new ue(1 / 0, 1 / 0, -1 / 0, -1 / 0), e = 0; e < this._displayables.length; e++) {
var i = this._displayables[e],
n = i.getboundingrect().clone();
i.needlocaltransform() && n.applytransform(i.getlocaltransform(pm)),
t.union(n)
}
this._rect = t
}
return this._rect
},
gn.prototype.contain = function(t, e) {
var i = this.transformcoordtolocal(t, e);
if (this.getboundingrect().contain(i[0], i[1])) for (var n = 0; n < this._displayables.length; n++) if (this._displayables[n].contain(t, e)) return ! 0;
return ! 1
},
u(gn, ui);
var gm = math.round,
mm = math.max,
vm = math.min,
ym = {},
xm = function(t, e) {
for (var i = [], n = t.length, o = 0; o < n; o++) {
var a = t[o];
a.path || a.createpathproxy(),
a.__dirtypath && a.buildpath(a.path, a.shape, !0),
i.push(a.path)
}
var r = new kn(e);
return r.createpathproxy(),
r.buildpath = function(t) {
t.appendpath(i);
var e = t.getcontext();
e && t.rebuildpath(e)
},
r
},
_m = r(),
wm = 0,
bm = (object.freeze || object)({
extendshape: fn,
extendpath: function(t, e) {
return rn(t, e)
},
makepath: wn,
makeimage: hn,
mergepath: xm,
resizepath: un,
subpixeloptimizeline: xn,
subpixeloptimizerect: jn,
subpixeloptimize: yn,
setelementhoverstyle: no,
isinemphasis: oo,
sethoverstyle: uo,
setashoverstyletrigger: ho,
setlabelstyle: co,
settextstyle: fo,
settext: function(t, e, i) {
var n, o = {
isrecttext: !0
}; ! 1 === i ? n = !0 : o.autocolor = i,
po(t, e, o, n)
},
getfont: _o,
updateprops: bo,
initprops: so,
gettransform: mo,
applytransform: io,
transformdirection: to,
grouptransition: ao,
clippointsbyrect: do,
cliprectbyrect: function(t, e) {
var i = mm(t.x, e.x),
n = vm(t.x + t.width, e.x + e.width),
o = mm(t.y, e.y),
a = vm(t.y + t.height, e.y + e.height);
if (n >= i && a >= o) return {
x: i,
y: o,
width: n - i,
height: a - o
}
},
createicon: co,
group: zw,
image: hi,
text: qs,
circle: ks,
sector: qs,
ring: tm,
polygon: nm,
polyline: om,
rect: am,
line: rm,
beziercurve: lm,
arc: um,
incrementaldisplayable: gn,
compoundpath: hm,
lineargradient: dm,
radialgradient: fm,
boundingrect: ue
}),
sm = ["textstyle", "color"],
mm = {
gettextcolor: function(t) {
var e = this.ecmodel;
return this.getshallow("color") || (!t && e ? e.get(sm) : null)
},
getfont: function() {
return _o({
fontstyle: this.getshallow("fontstyle"),
fontweight: this.getshallow("fontweight"),
fontsize: this.getshallow("fontsize"),
fontfamily: this.getshallow("fontfamily")
},
this.ecmodel)
},
gettextrect: function(t) {
return de(t, this.getfont(), this.getshallow("align"), this.getshallow("verticalalign") || this.getshallow("baseline"), this.getshallow("padding"), this.getshallow("rich"), this.getshallow("truncatetext"))
}
},
im = wb([["fill", "color"], ["stroke", "bordercolor"], ["linewidth", "borderwidth"], ["opacity"], ["shadowblur"], ["shadowoffsetx"], ["shadowoffsety"], ["shadowcolor"], ["textposition"], ["textalign"]]),
tm = {
getitemstyle: function(t, e) {
var i = im(this, t, e),
n = this.getborderlinedash();
return n && (i.linedash = n),
i
},
getborderlinedash: function() {
var t = this.get("bordertype");
return "solid" === t || null == t ? null: "dashed" === t ? [5, 5] : [1, 1]
}
},
am = h,
dm = bi();
lo.prototype = {
constructor: lo,
init: null,
mergeoption: function(t) {
n(this.option, t, !0)
},
get: function(t, e) {
return null == t ? this.option: ko(this.option, this.parsepath(t), !e && po(this, t))
},
getshallow: function(t, e) {
var i = this.option,
n = null == i ? i: i[t],
o = !e && po(this, t);
return null == n && o && (n = o.getshallow(t)),
n
},
getmodel: function(t, e) {
var i, n = null == t ? this.option: ko(this.option, t = this.parsepath(t));
return e = e || (i = po(this, t)) && i.getmodel(t),
new lo(n, e, this.ecmodel)
},
isempty: function() {
return null == this.option
},
restoredata: function() {},
clone: function() {
return new(0, this.constructor)(i(this.option))
},
setreadonly: function(t) {},
parsepath: function(t) {
return "string" == typeof t && (t = t.split(".")),
t
},
customizegetparent: function(t) {
dm(this).getparent = t
},
isanimationenabled: function() {
if (!z_.node) {
if (null != this.option.animation) return !! this.option.animation;
if (this.parentmodel) return this.parentmodel.isanimationenabled()
}
}
},
xi(lo),
ji(lo),
am(lo, zb),
am(lo, xb),
am(lo, mm),
am(lo, tm);
var cm = 0,
lm = 1e-4,
km = 9007199254740991,
pm = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[t ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,
nm = (object.freeze || object)({
linearmap: eo,
parsepercent: ro,
round: zo,
asc: bo,
getprecision: vo,
getprecisionsafe: go,
getpixelprecision: fo,
getpercentwithprecision: wo,
max_safe_integer: km,
remradian: ho,
isradianaroundzero: zo,
parsedate: uo,
quantity: xo,
nice: yo,
quantile: function(t, e) {
var i = (t.length - 1) * e + 1,
n = math.floor(i),
o = +t[n - 1],
a = i - n;
return a ? o + a * (t[n] - o) : o
},
reformintervals: qo,
isnumeric: ko
}),
om = l,
em = /([&<>"'])/g,
rm = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'"
},
zm = ["a", "b", "c", "d", "e", "f", "g"],
bm = function(t, e) {
return "{" + t + (null == e ? "": e) + "}"
},
vm = oe,
gm = de,
fm = (object.freeze || object)({
addcommas: $o,
tocamelcase: jo,
normalizecssarray: om,
encodehtml: qo,
formattpl: ta,
formattplsimple: ea,
gettooltipmarker: ia,
formattime: oa,
capitalfirst: aa,
truncatetext: vm,
gettextrect: gm
}),
wm = d,
hm = ["left", "right", "top", "bottom", "width", "height"],
zm = [["width", "left", "right"], ["height", "top", "bottom"]],
um = ra,
xm = (v(ra, "vertical"), v(ra, "horizontal"), {
getboxlayoutparams: function() {
return {
left: this.get("left"),
top: this.get("top"),
right: this.get("right"),
bottom: this.get("bottom"),
width: this.get("width"),
height: this.get("height")
}
}
}),
jm = bi(),
ym = lo.extend({
type: "component",
id: "",
name: "",
maintype: "",
subtype: "",
componentindex: 0,
defaultoption: null,
ecmodel: null,
dependentmodels: [],
uid: null,
layoutmode: null,
$constructor: function(t, e, i, n) {
lo.call(this, t, e, i, n),
this.uid = no("ec_cpt_model")
},
init: function(t, e, i, n) {
this.mergedefaultandtheme(t, i)
},
mergedefaultandtheme: function(t, e) {
var i = this.layoutmode,
o = i ? da(t) : {};
n(t, e.gettheme().get(this.maintype)),
n(t, this.getdefaultoption()),
i && ca(t, o, i)
},
mergeoption: function(t, e) {
n(this.option, t, !0);
var i = this.layoutmode;
i && ca(this.option, t, i)
},
optionupdated: function(t, e) {},
getdefaultoption: function() {
var t = jm(this);
if (!t.defaultoption) {
for (var e = [], i = this.constructor; i;) {
var o = i.prototype.defaultoption;
o && e.push(o),
i = i.superclass
}
for (var a = {},
r = e.length - 1; r >= 0; r--) a = n(a, e[r], !0);
t.defaultoption = a
}
return t.defaultoption
},
getreferringcomponents: function(t) {
return this.ecmodel.querycomponents({
maintype: t,
index: this.get(t + "index", !0),
id: this.get(t + "id", !0)
})
}
});
ki(ym, {
registerwhenextend: !0
}),
function(t) {
var e = {};
t.registersubtypedefaulter = function(t, i) {
t = zi(t),
e[t.main] = i
},
t.determinesubtype = function(i, n) {
var o = n.type;
if (!o) {
var a = zi(i).main;
t.hassubtypes(i) && e[a] && (o = e[a](n))
}
return o
}
} (ym),
function(t, e) {
function i(t) {
var i = {},
a = [];
return d(t,
function(r) {
var s = n(i, r),
u = o(s.originaldeps = e(r), t);
s.entrycount = u.length,
0 === s.entrycount && a.push(r),
d(u,
function(t) {
l(s.predecessor, t) < 0 && s.predecessor.push(t);
var e = n(i, t);
l(e.successor, t) < 0 && e.successor.push(r)
})
}),
{
graph: i,
noentrylist: a
}
}
function n(t, e) {
return t[e] || (t[e] = {
predecessor: [],
successor: []
}),
t[e]
}
function o(t, e) {
var i = [];
return d(t,
function(t) {
l(e, t) >= 0 && i.push(t)
}),
i
}
t.topologicaltravel = function(t, e, n, o) {
function a(t) {
s[t].entrycount--,
0 === s[t].entrycount && l.push(t)
}
if (t.length) {
var r = i(e),
s = r.graph,
l = r.noentrylist,
u = {};
for (d(t,
function(t) {
u[t] = !0
}); l.length;) {
var h = l.pop(),
c = s[h],
f = !!u[h];
f && (n.call(o, h, c.originaldeps.slice()), delete u[h]),
d(c.successor, f ?
function(t) {
u[t] = !0,
a(t)
}: a)
}
d(u,
function() {
throw new error("circle dependency may exists")
})
}
}
} (ym,
function(t) {
var e = [];
return d(ym.getclassesbymaintype(t),
function(t) {
e = e.concat(t.prototype.dependencies || [])
}),
e = f(e,
function(t) {
return zi(t).main
}),
"dataset" !== t && l(e, "dataset") <= 0 && e.unshift("dataset"),
e
}),
h(ym, xm);
var qm = "";
"undefined" != typeof navigator && (qm = navigator.platform || "");
var km = {
color: ["#c23531", "#2f4554", "#61a0a8", "#d48265", "#91c7ae", "#749f83", "#ca8622", "#bda29a", "#6e7074", "#546570", "#c4ccd3"],
gradientcolor: ["#f6efa6", "#d88273", "#bf444c"],
textstyle: {
fontfamily: qm.match(/^win/) ? "microsoft yahei": "sans-serif",
fontsize: 12,
fontstyle: "normal",
fontweight: "normal"
},
blendmode: null,
animation: "auto",
animationduration: 1e3,
animationdurationupdate: 300,
animationeasing: "exponentialout",
animationeasingupdate: "cubicout",
animationthreshold: 2e3,
progressivethreshold: 3e3,
progressive: 400,
hoverlayerthreshold: 3e3,
useutc: !1
},
$m = bi(),
jm = {
clearcolorpalette: function() {
$m(this).coloridx = 0,
$m(this).colornamemap = {}
},
getcolorfrompalette: function(t, e, i) {
var n = $m(e = e || this),
o = n.coloridx || 0,
a = n.colornamemap = n.colornamemap || {};
if (a.hasownproperty(t)) return a[t];
var r = di(this.get("color", !0)),
s = this.get("colorlayer", !0),
l = null != i && s ? pa(s, i) : r;
if ((l = l || r) && l.length) {
var u = l[o];
return t && (a[t] = u),
n.coloridx = (o + 1) % l.length,
u
}
}
},
qm = {
cartesian2d: function(t, e, i, n) {
var o = t.getreferringcomponents("xaxis")[0],
a = t.getreferringcomponents("yaxis")[0];
e.coordsysdims = ["x", "y"],
i.set("x", o),
i.set("y", a),
ma(o) && (n.set("x", o), e.firstcategorydimindex = 0),
ma(a) && (n.set("y", a), e.firstcategorydimindex = 1)
},
singleaxis: function(t, e, i, n) {
var o = t.getreferringcomponents("singleaxis")[0];
e.coordsysdims = ["single"],
i.set("single", o),
ma(o) && (n.set("single", o), e.firstcategorydimindex = 0)
},
polar: function(t, e, i, n) {
var o = t.getreferringcomponents("polar")[0],
a = o.findaxismodel("radiusaxis"),
r = o.findaxismodel("angleaxis");
e.coordsysdims = ["radius", "angle"],
i.set("radius", a),
i.set("angle", r),
ma(a) && (n.set("radius", a), e.firstcategorydimindex = 0),
ma(r) && (n.set("angle", r), e.firstcategorydimindex = 1)
},
geo: function(t, e, i, n) {
e.coordsysdims = ["lng", "lat"]
},
parallel: function(t, e, i, n) {
var o = t.ecmodel,
a = o.getcomponent("parallel", t.get("parallelindex")),
r = e.coordsysdims = a.dimensions.slice();
d(a.parallelaxisindex,
function(t, a) {
var s = o.getcomponent("parallelaxis", t),
l = r[a];
i.set(l, s),
ma(s) && null == e.firstcategorydimindex && (n.set(l, s), e.firstcategorydimindex = a)
})
}
},
ti = "original",
ei = "arrayrows",
ii = "objectrows",
ni = "keyedcolumns",
oi = "unknown",
ai = "typedarray",
ri = "column",
si = "row";
va.seriesdatatosource = function(t) {
return new va({
data: t,
sourceformat: s(t) ? ai: ti,
fromdataset: !1
})
},
ji(va);
var li = bi(),
ui = "\0_ec_inner",
hi = lo.extend({
init: function(t, e, i, n) {
i = i || {},
this.option = null,
this._theme = new lo(i),
this._optionmanager = n
},
setoption: function(t, e) {
k(!(ui in t), "please use chart.getoption()"),
this._optionmanager.setoption(t, e),
this.resetoption(null)
},
resetoption: function(t) {
var e = !1,
i = this._optionmanager;
if (!t || "recreate" === t) {
var n = i.mountoption("recreate" === t);
this.option && "recreate" !== t ? (this.restoredata(), this.mergeoption(n)) : pa.call(this, n),
e = !0
}
if ("timeline" !== t && "media" !== t || this.restoredata(), !t || "recreate" === t || "timeline" === t) {
var o = i.gettimelineoption(this);
o && (this.mergeoption(o), e = !0)
}
if (!t || "recreate" === t || "media" === t) {
var a = i.getmediaoption(this, this._api);
a.length && d(a,
function(t) {
this.mergeoption(t, e = !0)
},
this)
}
return e
},
mergeoption: function(t) {
var e = this.option,
o = this._componentsmap,
r = [];
_a(this),
d(t,
function(t, o) {
null != t && (ym.hasclass(o) ? o && r.push(o) : e[o] = null == e[o] ? i(t) : n(e[o], t, !0))
}),
ym.topologicaltravel(r, ym.getallclassmaintypes(),
function(i, n) {
var r = di(t[i]),
s = pi(o.get(i), r);
ni(s),
d(s,
function(t, e) {
var n = t.option;
w(n) && (t.keyinfo.maintype = i, t.keyinfo.subtype = oa(i, n, t.exist))
});
var l = na(o, n);
e[i] = [],
o.set(i, []),
d(s,
function(t, n) {
var r = t.exist,
s = t.option;
if (k(w(s) || r, "empty component definition"), s) {
var u = ym.getclass(i, t.keyinfo.subtype, !0);
if (r && r instanceof u) r.name = t.keyinfo.name,
r.mergeoption(s, this),
r.optionupdated(s, !1);
else {
var h = a({
dependentmodels: l,
componentindex: n
},
t.keyinfo);
a(r = new u(s, this, this, h), h),
r.init(s, this, this, h),
r.optionupdated(null, !0)
}
} else r.mergeoption({},
this),
r.optionupdated({},
!1);
o.get(i)[n] = r,
e[i][n] = r.option
},
this),
"series" === i && ea(this, o.get("series"))
},
this),
this._seriesindicesmap = r(this._seriesindices = this._seriesindices || [])
},
getoption: function() {
var t = i(this.option);
return d(t,
function(e, i) {
if (ym.hasclass(i)) {
for (var n = (e = di(e)).length - 1; n >= 0; n--) ei(e[n]) && e.splice(n, 1);
t[i] = e
}
}),
delete t[ui],
t
},
gettheme: function() {
return this._theme
},
getcomponent: function(t, e) {
var i = this._componentsmap.get(t);
if (i) return i[e || 0]
},
querycomponents: function(t) {
var e = t.maintype;
if (!e) return [];
var i = t.index,
n = t.id,
o = t.name,
a = this._componentsmap.get(e);
if (!a || !a.length) return [];
var r;
if (null != i) y(i) || (i = [i]),
r = g(f(i,
function(t) {
return a[t]
}),
function(t) {
return !! t
});
else if (null != n) {
var s = y(n);
r = g(a,
function(t) {
return s && l(n, t.id) >= 0 || !s && t.id === n
})
} else if (null != o) {
var u = y(o);
r = g(a,
function(t) {
return u && l(o, t.name) >= 0 || !u && t.name === o
})
} else r = a.slice();
return ra(r, t)
},
findcomponents: function(t) {
var e = t.query,
i = t.maintype,
n = function(t) {
var e = i + "index",
n = i + "id",
o = i + "name";
return ! t || null == t[e] && null == t[n] && null == t[o] ? null: {
maintype: i,
index: t[e],
id: t[n],
name: t[o]
}
} (e);
return function(e) {
return t.filter ? g(e, t.filter) : e
} (ra(n ? this.querycomponents(n) : this._componentsmap.get(i), t))
},
eachcomponent: function(t, e, i) {
var n = this._componentsmap;
"function" == typeof t ? (i = e, e = t, n.each(function(t, n) {
d(t,
function(t, o) {
e.call(i, n, t, o)
})
})) : _(t) ? d(n.get(t), e, i) : w(t) && d(this.findcomponents(t), e, i)
},
getseriesbyname: function(t) {
return g(this._componentsmap.get("series"),
function(e) {
return e.name === t
})
},
getseriesbyindex: function(t) {
return this._componentsmap.get("series")[t]
},
getseriesbytype: function(t) {
return g(this._componentsmap.get("series"),
function(e) {
return e.subtype === t
})
},
getseries: function() {
return this._componentsmap.get("series").slice()
},
getseriescount: function() {
return this._componentsmap.get("series").length
},
eachseries: function(t, e) {
d(this._seriesindices,
function(i) {
var n = this._componentsmap.get("series")[i];
t.call(e, n, i)
},
this)
},
eachrawseries: function(t, e) {
d(this._componentsmap.get("series"), t, e)
},
eachseriesbytype: function(t, e, i) {
d(this._seriesindices,
function(n) {
var o = this._componentsmap.get("series")[n];
o.subtype === t && e.call(i, o, n)
},
this)
},
eachrawseriesbytype: function(t, e, i) {
return d(this.getseriesbytype(t), e, i)
},
isseriesfiltered: function(t) {
return null == this._seriesindicesmap.get(t.componentindex)
},
getcurrentseriesindices: function() {
return (this._seriesindices || []).slice()
},
filterseries: function(t, e) {
ea(this, g(this._componentsmap.get("series"), t, e))
},
restoredata: function(t) {
var e = this._componentsmap;
ea(this, e.get("series"));
var i = [];
e.each(function(t, e) {
i.push(e)
}),
ym.topologicaltravel(i, ym.getallclassmaintypes(),
function(i, n) {
d(e.get(i),
function(e) { ("series" !== i || !la(e, t)) && e.restoredata()
})
})
}
});
h(hi, jm);
var ci = ["getdom", "getzr", "getwidth", "getheight", "getdevicepixelratio", "dispatchaction", "isdisposed", "on", "off", "getdataurl", "getconnecteddataurl", "getmodel", "getoption", "getviewofcomponentmodel", "getviewofseriesmodel"],
di = {};
ba.prototype = {
constructor: ba,
create: function(t, e) {
var i = [];
d(di,
function(n, o) {
var a = n.create(t, e);
i = i.concat(a || [])
}),
this._coordinatesystems = i
},
update: function(t, e) {
d(this._coordinatesystems,
function(i) {
i.update && i.update(t, e)
})
},
getcoordinatesystems: function() {
return this._coordinatesystems.slice()
}
},
ba.register = function(t, e) {
di[t] = e
},
ba.get = function(t) {
return di[t]
};
var fi = d,
pi = i,
gi = f,
mi = n,
vi = /^(min|max)?(.+)$/;
va.prototype = {
constructor: va,
setoption: function(t, e) {
t && d(di(t.series),
function(t) {
t && t.data && s(t.data) && n(t.data)
}),
t = pi(t, !0);
var i = this._optionbackup,
n = ga.call(this, t, e, !i);
this._newbaseoption = n.baseoption,
i ? (za(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 = gi(e.timelineoptions, pi),
this._medialist = gi(e.medialist, pi),
this._mediadefault = pi(e.mediadefault),
this._currentmediaindices = [],
pi(t ? e.baseoption: this._newbaseoption)
},
gettimelineoption: function(t) {
var e, i = this._timelineoptions;
if (i.length) {
var n = t.getcomponent("timeline");
n && (e = pi(i[n.getcurrentindex()], !0))
}
return e
},
getmediaoption: function(t) {
var e = this._api.getwidth(),
i = this._api.getheight(),
n = this._medialist,
o = this._mediadefault,
a = [],
r = [];
if (!n.length && !o) return r;
for (var s = 0,
l = n.length; s < l; s++) fa(n[s].query, e, i) && a.push(s);
return ! a.length && o && (a = [ - 1]),
a.length && !ha(a, this._currentmediaindices) && (r = gi(a,
function(t) {
return pi( - 1 === t ? o.option: n[t].option)
})),
this._currentmediaindices = a,
r
}
};
var yi = d,
xi = w,
_i = ["areastyle", "linestyle", "nodestyle", "linkstyle", "chordstyle", "label", "labelline"],
wi = function(t, e) {
yi($a(t.series),
function(t) {
xi(t) && ka(t)
});
var i = ["xaxis", "yaxis", "radiusaxis", "angleaxis", "singleaxis", "parallelaxis", "radar"];
e && i.push("valueaxis", "categoryaxis", "logaxis", "timeaxis"),
yi(i,
function(e) {
yi($a(t[e]),
function(t) {
t && (ya(t, "axislabel"), ya(t.axispointer, "label"))
})
}),
yi($a(t.parallel),
function(t) {
var e = t && t.parallelaxisdefault;
ya(e, "axislabel"),
ya(e && e.axispointer, "label")
}),
yi($a(t.calendar),
function(t) {
xa(t, "itemstyle"),
ya(t, "daylabel"),
ya(t, "monthlabel"),
ya(t, "yearlabel")
}),
yi($a(t.radar),
function(t) {
ya(t, "name")
}),
yi($a(t.geo),
function(t) {
xi(t) && (qa(t), yi($a(t.regions),
function(t) {
qa(t)
}))
}),
yi($a(t.timeline),
function(t) {
qa(t),
xa(t, "label"),
xa(t, "itemstyle"),
xa(t, "controlstyle", !0);
var e = t.data;
y(e) && d(e,
function(t) {
w(t) && (xa(t, "label"), xa(t, "itemstyle"))
})
}),
yi($a(t.toolbox),
function(t) {
xa(t, "iconstyle"),
yi(t.feature,
function(t) {
xa(t, "iconstyle")
})
}),
ya(ja(t.axispointer), "label"),
ya(ja(t.tooltip).axispointer, "label")
},
bi = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]],
si = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualmap", "datazoom", "timeline"],
mi = function(t, e) {
wi(t, e),
t.series = di(t.series),
d(t.series,
function(t) {
if (w(t)) {
var e = t.type;
if ("pie" !== e && "gauge" !== e || null != t.clockwise && (t.clockwise = t.clockwise), "gauge" === e) {
var i = qa(t, "pointer.color");
null != i && tr(t, "itemstyle.normal.color", i)
}
er(t)
}
}),
t.datarange && (t.visualmap = t.datarange),
d(si,
function(e) {
var i = t[e];
i && (y(i) || (i = [i]), d(i,
function(t) {
er(t)
}))
})
},
ii = nr.prototype;
ii.pure = !1,
ii.persistent = !0,
ii.getsource = function() {
return this._source
};
var ti = {
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: rr
},
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 o = i[n];
e.push(o ? o[t] : null)
}
return e
},
appenddata: function() {
throw new error('do not support appenddata when set serieslayoutby: "row".')
}
},
objectrows: {
pure: !0,
count: or,
getitem: ar,
appenddata: rr
},
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 o = this._data[i[n].name];
e.push(o ? o[t] : null)
}
return e
},
appenddata: function(t) {
var e = this._data;
d(t,
function(t, i) {
for (var n = e[i] || (e[i] = []), o = 0; o < (t || []).length; o++) n.push(t[o])
})
}
},
original: {
count: or,
getitem: ar,
appenddata: rr
},
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 = 0; n < this._dimsize; n++) e[n] = this._data[i + n];
return e
},
appenddata: function(t) {
this._data = t
},
clean: function() {
this._offset += this.count(),
this._data = null
}
}
},
ai = {
arrayrows: sr,
objectrows: function(t, e, i, n) {
return null != i ? t[n] : t
},
keyedcolumns: sr,
original: function(t, e, i, n) {
var o = li(t);
return null != i && o instanceof array ? o[i] : o
},
typedarray: sr
},
di = {
arrayrows: lr,
objectrows: function(t, e, i, n) {
return ur(t[e], this._dimensioninfos[e])
},
keyedcolumns: lr,
original: function(t, e, i, n) {
var o = t && (null == t.value ? t: t.value);
return ! this._rawdata.pure && ki(t) && (this.hasitemoption = !0),
ur(o instanceof array ? o[n] : o, this._dimensioninfos[e])
},
typedarray: function(t, e, i, n) {
return t[n]
}
},
ci = /\{@(.+?)\}/g,
li = {
getdataparams: function(t, e) {
var i = this.getdata(e),
n = this.getrawvalue(t, e),
o = i.getrawindex(t),
a = i.getname(t),
r = i.getrawdataitem(t),
s = i.getitemvisual(t, "color"),
l = this.ecmodel.getcomponent("tooltip"),
u = hi(l && l.get("rendermode")),
h = this.maintype,
c = "series" === h;
return {
componenttype: h,
componentsubtype: this.subtype,
componentindex: this.componentindex,
seriestype: c ? this.subtype: null,
seriesindex: this.seriesindex,
seriesid: c ? this.id: null,
seriesname: c ? this.name: null,
name: a,
dataindex: o,
data: r,
datatype: e,
value: n,
color: s,
marker: ia({
color: s,
rendermode: u
}),
$vars: ["seriesname", "name", "value"]
}
},
getformattedlabel: function(t, e, i, n, o) {
e = e || "normal";
var a = this.getdata(i),
r = a.getitemmodel(t),
s = this.getdataparams(t, i);
null != n && s.value instanceof array && (s.value = s.value[n]);
var l = r.get("normal" === e ? [o || "label", "formatter"] : [e, o || "label", "formatter"]);
return "function" == typeof l ? (s.status = e, l(s)) : "string" == typeof l ? ta(l, s).replace(ci,
function(e, i) {
var n = i.length;
return "[" === i.charat(0) && "]" === i.charat(n - 1) && (i = +i.slice(1, n - 1)),
hr(a, t, i)
}) : void 0
},
getrawvalue: function(t, e) {
return hr(this.getdata(e), t)
},
formattooltip: function() {}
},
ki = fr.prototype;
ki.perform = function(t) {
function e(t) {
return ! (t >= 1) && (t = 1),
t
}
var i = this._upstream,
n = t && t.skip;
if (this._dirty && i) {
var o = this.context;
o.data = o.outputdata = i.context.outputdata
}
this.__pipeline && (this.__pipeline.currenttask = this);
var a;
this._plan && !n && (a = this._plan(this.context));
var r = e(this._modby),
s = this._moddatacount || 0,
l = e(t && t.modby),
u = t && t.moddatacount || 0;
r === l && s === u || (a = "reset");
var h; (this._dirty || "reset" === a) && (this._dirty = !1, h = gr(this, n)),
this._modby = l,
this._moddatacount = u;
var c = t && t.step;
if (this._dueend = i ? i._outputdueend: this._count ? this._count(this.context) : 1 / 0, this._progress) {
var d = this._dueindex,
f = math.min(null != c ? this._dueindex + c: 1 / 0, this._dueend);
if (!n && (h || d < f)) {
var p = this._progress;
if (y(p)) for (var g = 0; g < p.length; g++) pr(this, p[g], d, f, l, u);
else pr(this, p, d, f, l, u)
}
this._dueindex = f;
var m = null != this._settedoutputend ? this._settedoutputend: f;
this._outputdueend = m
} else this._dueindex = this._outputdueend = null != this._settedoutputend ? this._settedoutputend: this._dueend;
return this.unfinished()
};
var pi = function() {
function t() {
return n < i ? n++:null
}
function e() {
var t = n % r * o + math.ceil(n / r),
e = n >= i ? null: t < a ? t: n;
return n++,
e
}
var i, n, o, a, r, s = {
reset: function(l, u, h, c) {
n = l,
i = u,
o = h,
a = c,
r = math.ceil(a / o),
s.next = o > 1 && a > 0 ? e: t
}
};
return s
} ();
ki.dirty = function() {
this._dirty = !0,
this._ondirty && this._ondirty(this.context)
},
ki.unfinished = function() {
return this._progress && this._dueindex < this._dueend
},
ki.pipe = function(t) { (this._downstream !== t || this._dirty) && (this._downstream = t, t._upstream = this, t.dirty())
},
ki.dispose = function() {
this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0)
},
ki.getupstream = function() {
return this._upstream
},
ki.getdownstream = function() {
return this._downstream
},
ki.setoutputend = function(t) {
this._outputdueend = this._settedoutputend = t
};
var ni = bi(),
oi = ym.extend({
type: "series.__base__",
seriesindex: 0,
coordinatesystem: null,
defaultoption: null,
legenddataprovider: null,
visualcoloraccesspath: "itemstyle.color",
layoutmode: null,
init: function(t, e, i, n) {
this.seriesindex = this.componentindex,
this.datatask = dr({
count: yr,
reset: xr
}),
this.datatask.context = {
model: this
},
this.mergedefaultandtheme(t, i),
wa(this);
var o = this.getinitialdata(t, i);
wr(o, this),
this.datatask.context.data = o,
ni(this).databeforeprocessed = o,
mr(this)
},
mergedefaultandtheme: function(t, e) {
var i = this.layoutmode,
o = i ? da(t) : {},
a = this.subtype;
ym.hasclass(a) && (a += "series"),
n(t, e.gettheme().get(this.subtype)),
n(t, this.getdefaultoption()),
ci(t, "label", ["show"]),
this.filldatatextstyle(t.data),
i && ca(t, o, i)
},
mergeoption: function(t, e) {
t = n(this.option, t, !0),
this.filldatatextstyle(t.data);
var i = this.layoutmode;
i && ca(this.option, t, i),
wa(this);
var o = this.getinitialdata(t, e);
wr(o, this),
this.datatask.dirty(),
this.datatask.context.data = o,
ni(this).databeforeprocessed = o,
mr(this)
},
filldatatextstyle: function(t) {
if (t && !s(t)) for (var e = ["show"], i = 0; i < t.length; i++) t[i] && t[i].label && ci(t[i], "label", e)
},
getinitialdata: function() {},
appenddata: function(t) {
this.getrawdata().appenddata(t.data)
},
getdata: function(t) {
var e = sr(this);
if (e) {
var i = e.context.data;
return null == t ? i: i.getlinkeddata(t)
}
return ni(this).data
},
setdata: function(t) {
var e = sr(this);
if (e) {
var i = e.context;
i.data !== t && e.modifyoutputend && e.setoutputend(t.count()),
i.outputdata = t,
e !== this.datatask && (i.data = t)
}
ni(this).data = t
},
getsource: function() {
return xa(this)
},
getrawdata: function() {
return ni(this).databeforeprocessed
},
getbaseaxis: function() {
var t = this.coordinatesystem;
return t && t.getbaseaxis && t.getbaseaxis()
},
formattooltip: function(t, e, i, n) {
function o(t) {
return {
rendermode: n,
content: qo($o(t)),
style: l
}
}
var a = this,
r = "html" === (n = n || "html") ? "
": "\n",
s = "richtext" === n,
l = {},
u = 0,
h = this.getdata(),
c = h.mapdimension("defaultedtooltip", !0),
f = c.length,
g = this.getrawvalue(t),
m = y(g),
v = h.getitemvisual(t, "color");
w(v) && v.colorstops && (v = (v.colorstops[0] || {}).color),
v = v || "transparent";
var x = (f > 1 || m && !f ?
function(i) {
function o(t, i) {
var o = h.getdimensioninfo(i);
if (o && !1 !== o.otherdims.tooltip) {
var c = o.type,
d = "sub" + a.seriesindex + "at" + u,
p = ia({
color: v,
type: "subitem",
rendermode: n,
markerid: d
}),
g = "string" == typeof p ? p: p.content,
m = (r ? g + qo(o.displayname || "-") + ": ": "") + qo("ordinal" === c ? t + "": "time" === c ? e ? "": oa("yyyy/mm/dd hh:mm:ss", t) : $o(t));
m && f.push(m),
s && (l[d] = v, ++u)
}
}
var r = p(i,
function(t, e, i) {
var n = h.getdimensioninfo(i);
return t |= n && !1 !== n.tooltip && null != n.displayname
},
0),
f = [];
c.length ? d(c,
function(e) {
o(hr(h, t, e), e)
}) : d(i, o);
var g = r ? s ? "\n": "
": "",
m = g + f.join(g || ", ");
return {
rendermode: n,
content: m,
style: l
}
} (g) : o(f ? hr(h, t, c[0]) : m ? g[0] : g)).content,
_ = a.seriesindex + "at" + u,
b = ia({
color: v,
type: "item",
rendermode: n,
markerid: _
});
l[_] = v,
++u;
var s = h.getname(t),
m = this.name;
oi(this) || (m = ""),
m = m ? qo(m) + (e ? ": ": r) : "";
var i = "string" == typeof b ? b: b.content;
return {
html: e ? i + m + x: m + i + (s ? qo(s) + ": " + x: x),
markers: l
}
},
isanimationenabled: function() {
if (z_.node) return ! 1;
var t = this.getshallow("animation");
return t && this.getdata().count() > this.getshallow("animationthreshold") && (t = !1),
t
},
restoredata: function() {
this.datatask.dirty()
},
getcolorfrompalette: function(t, e, i) {
var n = this.ecmodel,
o = jm.getcolorfrompalette.call(this, t, e, i);
return o || (o = n.getcolorfrompalette(t, e, i)),
o
},
coorddimtodatadim: function(t) {
return this.getrawdata().mapdimension(t, !0)
},
getprogressive: function() {
return this.get("progressive")
},
getprogressivethreshold: function() {
return this.get("progressivethreshold")
},
getaxistooltipdata: null,
gettooltipposition: null,
pipetask: null,
preventincremental: null,
pipelinecontext: null
});
h(oi, li),
h(oi, jm);
var ei = function() {
this.group = new zw,
this.uid = no("viewcomponent")
};
ei.prototype = {
constructor: ei,
init: function(t, e) {},
render: function(t, e, i, n) {},
dispose: function() {},
filterforexposedevent: null
};
var ri = ei.prototype;
ri.updateview = ri.updatelayout = ri.updatevisual = function(t, e, i, n) {},
xi(ei),
ki(ei, {
registerwhenextend: !0
});
var zi = function() {
var t = bi();
return function(e) {
var i = t(e),
n = e.pipelinecontext,
o = i.large,
a = i.progressiverender,
r = i.large = n.large,
s = i.progressiverender = n.progressiverender;
return !! (o ^ r || a ^ s) && "reset"
}
},
bi = bi(),
vi = zi();
mr.prototype = {
type: "chart",
init: function(t, e) {},
render: function(t, e, i, n) {},
highlight: function(t, e, i, n) {
tr(t.getdata(), n, "emphasis")
},
downplay: function(t, e, i, n) {
tr(t.getdata(), n, "normal")
},
remove: function(t, e) {
this.group.removeall()
},
dispose: function() {},
incrementalpreparerender: null,
incrementalrender: null,
updatetransform: null,
filterforexposedevent: null
};
var gi = mr.prototype;
gi.updateview = gi.updatelayout = gi.updatevisual = function(t, e, i, n) {
this.render(t, e, i, n)
},
xi(mr),
ki(mr, {
registerwhenextend: !0
}),
mr.markupdatemethod = function(t, e) {
bi(t).updatemethod = e
};
var fi = {
incrementalpreparerender: {
progress: function(t, e) {
e.view.incrementalrender(t, e.model, e.ecmodel, e.api, e.payload)
}
},
render: {
forcefirstprogress: !0,
progress: function(t, e) {
e.view.render(e.model, e.ecmodel, e.api, e.payload)
}
}
},
wi = "\0__throttleoriginmethod",
hi = "\0__throttlerate",
zi = "\0__throttletype",
ui = {
createonallseries: !0,
performrawseries: !0,
reset: function(t, e) {
var i = t.getdata(),
n = (t.visualcoloraccesspath || "itemstyle.color").split("."),
o = t.get(n) || t.getcolorfrompalette(t.name, null, e.getseriescount());
if (i.setvisual("color", o), !e.isseriesfiltered(t)) {
"function" != typeof o || o instanceof cm || i.each(function(e) {
i.setitemvisual(e, "color", o(t.getdataparams(e)))
});
return {
dataeach: i.hasitemoption ?
function(t, e) {
var i = t.getitemmodel(e).get(n, !0);
null != i && t.setitemvisual(e, "color", i)
}: null
}
}
}
},
xi = {
toolbox: {
brush: {
title: {
rect: "çÿ©å½¢é€‰æ‹©",
polygon: "圈选",
linex: "横å‘选择",
liney: "纵å‘选择",
keep: "ä¿æœé€‰æ‹©",
clear: "清除选择"
}
},
dataview: {
title: "æ•°æ®è§†å›¾",
lang: ["æ•°æ®è§†å›¾", "å…³é—", "刷新"]
},
datazoom: {
title: {
zoom: "场åÿÿ缩放",
back: "场åÿÿ缩放还åžÿ"
}
},
magictype: {
title: {
line: "切æ¢ä¸ºæš˜çº¿å›¾",
bar: "切æ¢ä¸ºæÿ±çš¶å›¾",
stack: "切æ¢ä¸ºå †å ",
tiled: "切æ¢ä¸ºå¹³é“º"
}
},
restore: {
title: "还åžÿ"
},
saveasimage: {
title: "ä¿å˜ä¸ºå›¾ç‰‡",
lang: ["å³é”®å¦å˜ä¸ºå›¾ç‰‡"]
}
},
series: {
typenames: {
pie: "饼图",
bar: "æÿ±çš¶å›¾",
line: "暘线图",
scatter: "散点图",
effectscatter: "æ¶ÿ漪散点图",
radar: "雷达图",
tree: "æ ‘å›¾",
treemap: "çÿ©å½¢æ ‘图",
boxplot: "箱型图",
candlestick: "k线图",
k: "k线图",
heatmap: "çƒåš›å›¾",
map: "地图",
parallel: "平衜åæ ‡å›¾",
lines: "线图",
graph: "关系图",
sankey: "æ¡‘åÿºå›¾",
funnel: "æ¼æ–—图",
gauge: "仪表盘图",
pictorialbar: "象形æÿ±å›¾",
themeriver: "主题河æµå›¾",
sunburst: "æ—日图"
}
},
aria: {
general: {
withtitle: "这是一个关亞“{title}â€çš„图表。",
withouttitle: "这是一个图表<"
},
series: {
single: {
prefix: "",
withname: "图表类型是{seriestype}<表示{seriesname}。",
withoutname: "图表类型是{seriestype}。"
},
multiple: {
prefix: "它由{seriescount}个图表系列组æˆã€‚",
withname: "第{seriesid}个系列是一个表示{seriesname}的{seriestype}<",
withoutname: "第{seriesid}个系列是一个{seriestype}<",
separator: {
middle: "ï¼›",
end: "。"
}
}
},
data: {
alldata: "其数æ®æ˜¯â€”—",
partialdata: "å…¶ä¸ï¼œå‰{displaycnt}项是——",
withname: "{name}çš„æ•°æ®æ˜¯{value}",
withoutname: "{value}",
separator: {
middle: "<",
end: ""
}
}
}
},
ji = function(t, e) {
function i(t, e) {
if ("string" != typeof t) return t;
var i = t;
return d(e,
function(t, e) {
i = i.replace(new regexp("\\{\\s*" + e + "\\s*\\}", "g"), t)
}),
i
}
function n(t) {
var e = a.get(t);
if (null == e) {
for (var i = t.split("."), n = xi.aria, o = 0; o < i.length; ++o) n = n[i[o]];
return n
}
return e
}
function o(t) {
return xi.series.typenames[t] || "自定义图"
}
var a = e.getmodel("aria");
if (a.get("show")) if (a.get("description")) t.setattribute("aria-label", a.get("description"));
else {
var r = 0;
e.eachseries(function(t, e) {++r
},
this);
var s, l = a.get("data.maxcount") || 10,
u = a.get("series.maxcount") || 10,
h = math.min(r, u);
if (! (r < 1)) {
var c = function() {
var t = e.getmodel("title").option;
return t && t.length && (t = t[0]),
t && t.text
} ();
s = c ? i(n("general.withtitle"), {
title: c
}) : n("general.withouttitle");
var f = [];
s += i(n(r > 1 ? "series.multiple.prefix": "series.single.prefix"), {
seriescount: r
}),
e.eachseries(function(t, e) {
if (e < h) {
var a, s = t.get("name"),
u = "series." + (r > 1 ? "multiple": "single") + ".";
a = i(a = n(s ? u + "withname": u + "withoutname"), {
seriesid: t.seriesindex,
seriesname: t.get("name"),
seriestype: o(t.subtype)
});
var c = t.getdata();
window.data = c,
c.count() > l ? a += i(n("data.partialdata"), {
displaycnt: l
}) : a += n("data.alldata");
for (var d = [], p = 0; p < c.count(); p++) if (p < l) {
var g = c.getname(p),
m = hr(c, p);
d.push(i(n(g ? "data.withname": "data.withoutname"), {
name: g,
value: m
}))
}
a += d.join(n("data.separator.middle")) + n("data.separator.end"),
f.push(a)
}
}),
s += f.join(n("series.multiple.separator.middle")) + n("series.multiple.separator.end"),
t.setattribute("aria-label", s)
}
}
},
yi = math.pi,
qi = pr.prototype;
qi.restoredata = function(t, e) {
t.restoredata(e),
this._stagetaskmap.each(function(t) {
var e = t.overalltask;
e && e.dirty()
})
},
qi.getperformargs = function(t, e) {
if (t.__pipeline) {
var i = this._pipelinemap.get(t.__pipeline.id),
n = i.context,
o = !e && i.progressiveenabled && (!n || n.progressiverender) && t.__idxinpipeline > i.blockindex ? i.step: null,
a = n && n.moddatacount;
return {
step: o,
modby: null != a ? math.ceil(a / o) : null,
moddatacount: a
}
}
},
qi.getpipeline = function(t) {
return this._pipelinemap.get(t)
},
qi.updatestreammodes = function(t, e) {
var i = this._pipelinemap.get(t.uid),
n = t.getdata().count(),
o = i.progressiveenabled && e.incrementalpreparerender && n >= i.threshold,
a = t.get("large") && n >= t.get("largethreshold"),
r = "mod" === t.get("progressivechunkmode") ? n: null;
t.pipelinecontext = i.context = {
progressiverender: o,
moddatacount: r,
large: a
}
},
qi.restorepipelines = function(t) {
var e = this,
i = e._pipelinemap = r();
t.eachseries(function(t) {
var n = t.getprogressive(),
o = t.uid;
i.set(o, {
id: o,
head: null,
tail: null,
threshold: t.getprogressivethreshold(),
progressiveenabled: n && !(t.preventincremental && t.preventincremental()),
blockindex: -1,
step: math.round(n || 700),
count: 0
}),
zr(e, t, t.datatask)
})
},
qi.preparestagetasks = function() {
var t = this._stagetaskmap,
e = this.ecinstance.getmodel(),
i = this.api;
d(this._allhandlers,
function(n) {
var o = t.get(n.uid) || t.set(n.uid, []);
n.reset && or(this, n, o, e, i),
n.overallreset && er(this, n, o, e, i)
},
this)
},
qi.prepareview = function(t, e, i, n) {
var o = t.rendertask,
a = o.context;
a.model = e,
a.ecmodel = i,
a.api = n,
o.__block = !t.incrementalpreparerender,
zr(this, e, o)
},
qi.performdataprocessortasks = function(t, e) {
nr(this, this._dataprocessorhandlers, t, e, {
block: !0
})
},
qi.performvisualtasks = function(t, e, i) {
nr(this, this._visualhandlers, t, e, i)
},
qi.performseriestasks = function(t) {
var e;
t.eachseries(function(t) {
e |= t.datatask.perform()
}),
this.unfinished |= e
},
qi.plan = function() {
this._pipelinemap.each(function(t) {
var e = t.tail;
do {
if (e.__block) {
t.blockindex = e.__idxinpipeline;
break
}
e = e.getupstream()
} while ( e )
})
};
var ki = qi.updatepayload = function(t, e) {
"remain" !== e && (t.context.payload = e)
},
$i = wr(0);
pr.wrapstagehandler = function(t, e) {
return x(t) && (t = {
overallreset: t,
seriestype: ur(t)
}),
t.uid = no("stagehandler"),
e && (t.visualtype = e),
t
};
var ji, qi = {},
tt = {};
xr(qi, hi),
xr(tt, za),
qi.eachseriesbytype = qi.eachrawseriesbytype = function(t) {
ji = t
},
qi.eachcomponent = function(t) {
"series" === t.maintype && t.subtype && (ji = t.subtype)
};
var et = ["#37a2da", "#32c5e9", "#67e0e3", "#9fe6b8", "#ffdb5c", "#ff9f7f", "#fb7293", "#e062ae", "#e690d1", "#e7bcf3", "#9d96f5", "#8378ea", "#96bfff"],
it = {
color: et,
colorlayer: [["#37a2da", "#ffd85c", "#fd7b5f"], ["#37a2da", "#67e0e3", "#ffdb5c", "#ff9f7f", "#e062ae", "#9d96f5"], ["#37a2da", "#32c5e9", "#9fe6b8", "#ffdb5c", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378ea", "#96bfff"], et]
},
nt = ["#dd6b66", "#759aa0", "#e69d87", "#8dc1a9", "#ea7e53", "#eedd78", "#73a373", "#73b9bc", "#7289ab", "#91ca8c", "#f49f42"],
ot = {
color: nt,
backgroundcolor: "#333",
tooltip: {
axispointer: {
linestyle: {
color: "#eee"
},
crossstyle: {
color: "#eee"
}
}
},
legend: {
textstyle: {
color: "#eee"
}
},
textstyle: {
color: "#eee"
},
title: {
textstyle: {
color: "#eee"
}
},
toolbox: {
iconstyle: {
normal: {
bordercolor: "#eee"
}
}
},
datazoom: {
textstyle: {
color: "#eee"
}
},
visualmap: {
textstyle: {
color: "#eee"
}
},
timeline: {
linestyle: {
color: "#eee"
},
itemstyle: {
normal: {
color: nt[1]
}
},
label: {
normal: {
textstyle: {
color: "#eee"
}
}
},
controlstyle: {
normal: {
color: "#eee",
bordercolor: "#eee"
}
}
},
timeaxis: {
axisline: {
linestyle: {
color: "#eee"
}
},
axistick: {
linestyle: {
color: "#eee"
}
},
axislabel: {
textstyle: {
color: "#eee"
}
},
splitline: {
linestyle: {
type: "dashed",
color: "#aaa"
}
},
splitarea: {
areastyle: {
color: "#eee"
}
}
},
logaxis: {
axisline: {
linestyle: {
color: "#eee"
}
},
axistick: {
linestyle: {
color: "#eee"
}
},
axislabel: {
textstyle: {
color: "#eee"
}
},
splitline: {
linestyle: {
type: "dashed",
color: "#aaa"
}
},
splitarea: {
areastyle: {
color: "#eee"
}
}
},
valueaxis: {
axisline: {
linestyle: {
color: "#eee"
}
},
axistick: {
linestyle: {
color: "#eee"
}
},
axislabel: {
textstyle: {
color: "#eee"
}
},
splitline: {
linestyle: {
type: "dashed",
color: "#aaa"
}
},
splitarea: {
areastyle: {
color: "#eee"
}
}
},
categoryaxis: {
axisline: {
linestyle: {
color: "#eee"
}
},
axistick: {
linestyle: {
color: "#eee"
}
},
axislabel: {
textstyle: {
color: "#eee"
}
},
splitline: {
linestyle: {
type: "dashed",
color: "#aaa"
}
},
splitarea: {
areastyle: {
color: "#eee"
}
}
},
line: {
symbol: "circle"
},
graph: {
color: nt
},
gauge: {
title: {
textstyle: {
color: "#eee"
}
}
},
candlestick: {
itemstyle: {
normal: {
color: "#fd1050",
color0: "#0cf49b",
bordercolor: "#fd1050",
bordercolor0: "#0cf49b"
}
}
}
};
ot.categoryaxis.splitline.show = !1,
ym.extend({
type: "dataset",
defaultoption: {
serieslayoutby: ri,
sourceheader: null,
dimensions: null,
source: null
},
optionupdated: function() {
ya(this)
}
}),
ei.extend({
type: "dataset"
});
var at = kn.extend({
type: "ellipse",
shape: {
cx: 0,
cy: 0,
rx: 0,
ry: 0
},
buildpath: function(t, e) {
var i = .5522848,
n = e.cx,
o = e.cy,
a = e.rx,
r = e.ry,
s = a * i,
l = r * i;
t.moveto(n - a, o),
t.beziercurveto(n - a, o - l, n - s, o - r, n, o - r),
t.beziercurveto(n + s, o - r, n + a, o - l, n + a, o),
t.beziercurveto(n + a, o + l, n + s, o + r, n, o + r),
t.beziercurveto(n - s, o + r, n - a, o + l, n - a, o),
t.closepath()
}
}),
rt = /[\s,]+/;
yr.prototype.parse = function(t, e) {
e = e || {};
var i = jr(t);
if (!i) throw new error("illegal svg");
var n = new zw;
this._root = n;
var o = i.getattribute("viewbox") || "",
a = parsefloat(i.getattribute("width") || e.width),
r = parsefloat(i.getattribute("height") || e.height);
isnan(a) && (a = null),
isnan(r) && (r = null),
jr(i, n, null, !0);
for (var s = i.firstchild; s;) this._parsenode(s, n),
s = s.nextsibling;
var l, u;
if (o) {
var h = p(o).split(rt);
h.length >= 4 && (l = {
x: parsefloat(h[0] || 0),
y: parsefloat(h[1] || 0),
width: parsefloat(h[2]),
height: parsefloat(h[3])
})
}
if (l && null != a && null != r && (u = is(l, a, r), !e.ignoreviewbox)) {
var c = n; (n = new zw).add(c),
c.scale = u.scale.slice(),
c.position = u.position.slice()
}
return e.ignorerootclip || null == a || null == r || n.setclippath(new am({
shape: {
x: 0,
y: 0,
width: a,
height: r
}
})),
{
root: n,
width: a,
height: r,
viewboxrect: l,
viewboxtransform: u
}
},
yr.prototype._parsenode = function(t, e) {
var i = t.nodename.tolowercase();
"defs" === i ? this._isdefine = !0 : "text" === i && (this._istext = !0);
var n;
if (this._isdefine) {
if (r = lt[i]) {
var o = r.call(this, t),
a = t.getattribute("id");
a && (this._defs[a] = o)
}
} else {
var r = st[i];
r && (n = r.call(this, t, e), e.add(n))
}
for (var s = t.firstchild; s;) 1 === s.nodetype && this._parsenode(s, n),
3 === s.nodetype && this._istext && this._parsetext(s, n),
s = s.nextsibling;
"defs" === i ? this._isdefine = !1 : "text" === i && (this._istext = !1)
},
yr.prototype._parsetext = function(t, e) {
if (1 === t.nodetype) {
var i = t.getattribute("dx") || 0,
n = t.getattribute("dy") || 0;
this._textx += parsefloat(i),
this._texty += parsefloat(n)
}
var o = new qs({
style: {
text: t.textcontent,
transformtext: !0
},
position: [this._textx || 0, this._texty || 0]
});
kr(e, o),
jr(t, o, this._defs);
var a = o.style.fontsize;
a && a < 9 && (o.style.fontsize = 9, o.scale = o.scale || [1, 1], o.scale[0] *= a / 9, o.scale[1] *= a / 9);
var r = o.getboundingrect();
return this._textx += r.width,
e.add(o),
o
};
var st = {
g: function(t, e) {
var i = new zw;
return kr(e, i),
jr(t, i, this._defs),
i
},
rect: function(t, e) {
var i = new am;
return kr(e, i),
jr(t, i, this._defs),
i.setshape({
x: parsefloat(t.getattribute("x") || 0),
y: parsefloat(t.getattribute("y") || 0),
width: parsefloat(t.getattribute("width") || 0),
height: parsefloat(t.getattribute("height") || 0)
}),
i
},
circle: function(t, e) {
var i = new ks;
return kr(e, i),
jr(t, i, this._defs),
i.setshape({
cx: parsefloat(t.getattribute("cx") || 0),
cy: parsefloat(t.getattribute("cy") || 0),
r: parsefloat(t.getattribute("r") || 0)
}),
i
},
line: function(t, e) {
var i = new rm;
return kr(e, i),
jr(t, i, this._defs),
i.setshape({
x1: parsefloat(t.getattribute("x1") || 0),
y1: parsefloat(t.getattribute("y1") || 0),
x2: parsefloat(t.getattribute("x2") || 0),
y2: parsefloat(t.getattribute("y2") || 0)
}),
i
},
ellipse: function(t, e) {
var i = new at;
return kr(e, i),
jr(t, i, this._defs),
i.setshape({
cx: parsefloat(t.getattribute("cx") || 0),
cy: parsefloat(t.getattribute("cy") || 0),
rx: parsefloat(t.getattribute("rx") || 0),
ry: parsefloat(t.getattribute("ry") || 0)
}),
i
},
polygon: function(t, e) {
var i = t.getattribute("points");
i && (i = $r(i));
var n = new nm({
shape: {
points: i || []
}
});
return kr(e, n),
jr(t, n, this._defs),
n
},
polyline: function(t, e) {
var i = new kn;
kr(e, i),
jr(t, i, this._defs);
var n = t.getattribute("points");
return n && (n = $r(n)),
new om({
shape: {
points: n || []
}
})
},
image: function(t, e) {
var i = new hi;
return kr(e, i),
jr(t, i, this._defs),
i.setstyle({
image: t.getattribute("xlink:href"),
x: t.getattribute("x"),
y: t.getattribute("y"),
width: t.getattribute("width"),
height: t.getattribute("height")
}),
i
},
text: function(t, e) {
var i = t.getattribute("x") || 0,
n = t.getattribute("y") || 0,
o = t.getattribute("dx") || 0,
a = t.getattribute("dy") || 0;
this._textx = parsefloat(i) + parsefloat(o),
this._texty = parsefloat(n) + parsefloat(a);
var r = new zw;
return kr(e, r),
jr(t, r, this._defs),
r
},
tspan: function(t, e) {
var i = t.getattribute("x"),
n = t.getattribute("y");
null != i && (this._textx = parsefloat(i)),
null != n && (this._texty = parsefloat(n));
var o = t.getattribute("dx") || 0,
a = t.getattribute("dy") || 0,
r = new zw;
return kr(e, r),
jr(t, r, this._defs),
this._textx += o,
this._texty += a,
r
},
path: function(t, e) {
var i = en(t.getattribute("d") || "");
return kr(e, i),
jr(t, i, this._defs),
i
}
},
lt = {
lineargradient: function(t) {
var e = parseint(t.getattribute("x1") || 0, 10),
i = parseint(t.getattribute("y1") || 0, 10),
n = parseint(t.getattribute("x2") || 10, 10),
o = parseint(t.getattribute("y2") || 0, 10),
a = new dm(e, i, n, o);
return qr(t, a),
a
},
radialgradient: function(t) {}
},
ut = {
fill: "fill",
stroke: "stroke",
"stroke-width": "linewidth",
opacity: "opacity",
"fill-opacity": "fillopacity",
"stroke-opacity": "strokeopacity",
"stroke-dasharray": "linedash",
"stroke-dashoffset": "linedashoffset",
"stroke-linecap": "linecap",
"stroke-linejoin": "linejoin",
"stroke-miterlimit": "miterlimit",
"font-family": "fontfamily",
"font-size": "fontsize",
"font-style": "fontstyle",
"font-weight": "fontweight",
"text-align": "textalign",
"alignment-baseline": "textbaseline"
},
ht = /url\(\s*#(.*?)\)/,
ct = /(translate|scale|rotate|skewx|skewy|matrix)\(([\-\s0-9\.e,]*)\)/g,
dt = /([^\s:;]+)\s*:\s*([^:;]+)/g,
ft = r(),
pt = {
registermap: function(t, e, i) {
var n;
return y(e) ? n = e: e.svg ? n = [{
type: "svg",
source: e.svg,
specialareas: e.specialareas
}] : (e.geojson && !e.features && (i = e.specialareas, e = e.geojson), n = [{
type: "geojson",
source: e,
specialareas: i
}]),
d(n,
function(t) {
var e = t.type;
"geojson" === e && (e = t.type = "geojson"),
(0, gt[e])(t)
}),
ft.set(t, n)
},
retrievemap: function(t) {
return ft.get(t)
}
},
gt = {
geojson: function(t) {
var e = t.source;
t.geojson = _(e) ? "undefined" != typeof json && json.parse ? json.parse(e) : new function("return (" + e + ");")() : e
},
svg: function(t) {
t.svgxml = jr(t.source)
}
},
mt = k,
vt = d,
yt = x,
xt = w,
_t = ym.parseclasstype,
wt = {
zrender: "4.0.5"
},
bt = 1e3,
st = 1e3,
mt = 3e3,
it = {
processor: {
filter: bt,
statistic: 5e3
},
visual: {
layout: st,
global: 2e3,
chart: mt,
component: 4e3,
brush: 5e3
}
},
tt = "__flaginmainprocess",
at = "__optionupdated",
dt = /^[a-za-z0-9_]+$/;
as.prototype.on = os("on"),
as.prototype.off = os("off"),
as.prototype.one = os("one"),
h(as, aw);
var ct = rs.prototype;
ct._onframe = function() {
if (!this._disposed) {
var t = this._scheduler;
if (this[at]) {
var e = this[at].silent;
this[tt] = !0,
ls(this),
lt.update.call(this),
this[tt] = !1,
this[at] = !1,
ds.call(this, e),
fs.call(this, e)
} else if (t.unfinished) {
var i = 1,
n = this._model;
this._api;
t.unfinished = !1;
do {
var o = +new date;
t.performseriestasks(n), t.performdataprocessortasks(n), hs(this, n), t.performvisualtasks(n), xs(this, this._model, 0, "remain"), i -= +new date - o
} while ( i > 0 && t . unfinished );
t.unfinished || this._zr.flush()
}
}
},
ct.getdom = function() {
return this._dom
},
ct.getzr = function() {
return this._zr
},
ct.setoption = function(t, e, i) {
var n;
if (xt(e) && (i = e.lazyupdate, n = e.silent, e = e.notmerge), this[tt] = !0, !this._model || e) {
var o = new va(this._api),
a = this._theme,
r = this._model = new hi(null, null, a, o);
r.scheduler = this._scheduler,
r.init(null, null, a, o)
}
this._model.setoption(t, et),
i ? (this[at] = {
silent: n
},
this[tt] = !1) : (ls(this), lt.update.call(this), this._zr.flush(), this[at] = !1, this[tt] = !1, ds.call(this, n), fs.call(this, n))
},
ct.settheme = function() {
console.error("echarts#settheme() is deprecated in echarts 3.0")
},
ct.getmodel = function() {
return this._model
},
ct.getoption = function() {
return this._model && this._model.getoption()
},
ct.getwidth = function() {
return this._zr.getwidth()
},
ct.getheight = function() {
return this._zr.getheight()
},
ct.getdevicepixelratio = function() {
return this._zr.painter.dpr || window.devicepixelratio || 1
},
ct.getrenderedcanvas = function(t) {
if (z_.canvassupported) return (t = t || {}).pixelratio = t.pixelratio || 1,
t.backgroundcolor = t.backgroundcolor || this._model.get("backgroundcolor"),
this._zr.painter.getrenderedcanvas(t)
},
ct.getsvgdataurl = function() {
if (z_.svgsupported) {
var t = this._zr;
return d(t.storage.getdisplaylist(),
function(t) {
t.stopanimation(!0)
}),
t.painter.pathtodataurl()
}
},
ct.getdataurl = function(t) {
var e = (t = t || {}).excludecomponents,
i = this._model,
n = [],
o = this;
vt(e,
function(t) {
i.eachcomponent({
maintype: t
},
function(t) {
var e = o._componentsmap[t.__viewid];
e.group.ignore || (n.push(e), e.group.ignore = !0)
})
});
var a = "svg" === this._zr.painter.gettype() ? this.getsvgdataurl() : this.getrenderedcanvas(t).todataurl("image/" + (t && t.type || "png"));
return vt(n,
function(t) {
t.group.ignore = !1
}),
a
},
ct.getconnecteddataurl = function(t) {
if (z_.canvassupported) {
var e = this.group,
n = math.min,
o = math.max;
if (ft[e]) {
var a = 1 / 0,
r = 1 / 0,
s = -1 / 0,
l = -1 / 0,
u = [],
h = t && t.pixelratio || 1;
d(gt,
function(h, c) {
if (h.group === e) {
var d = h.getrenderedcanvas(i(t)),
f = h.getdom().getboundingclientrect();
a = n(f.left, a),
r = n(f.top, r),
s = o(f.right, s),
l = o(f.bottom, l),
u.push({
dom: d,
left: f.left,
top: f.top
})
}
});
var c = (s *= h) - (a *= h),
f = (l *= h) - (r *= h),
p = y_();
p.width = c,
p.height = f;
var g = ii(p);
return vt(u,
function(t) {
var e = new hi({
style: {
x: t.left * h - a,
y: t.top * h - r,
image: t.dom
}
});
g.add(e)
}),
g.refreshimmediately(),
p.todataurl("image/" + (t && t.type || "png"))
}
return this.getdataurl(t)
}
},
ct.converttopixel = v(ss, "converttopixel"),
ct.convertfrompixel = v(ss, "convertfrompixel"),
ct.containpixel = function(t, e) {
var i;
return t = vi(this._model, t),
d(t,
function(t, n) {
n.indexof("models") >= 0 && d(t,
function(t) {
var o = t.coordinatesystem;
if (o && o.containpoint) i |= !!o.containpoint(e);
else if ("seriesmodels" === n) {
var a = this._chartsmap[t.__viewid];
a && a.containpoint && (i |= a.containpoint(e, t))
}
},
this)
},
this),
!!i
},
ct.getvisual = function(t, e) {
var i = (t = vi(this._model, t, {
defaultmaintype: "series"
})).seriesmodel.getdata(),
n = t.hasownproperty("dataindexinside") ? t.dataindexinside: t.hasownproperty("dataindex") ? i.indexofrawindex(t.dataindex) : null;
return null != n ? i.getitemvisual(n, e) : i.getvisual(e)
},
ct.getviewofcomponentmodel = function(t) {
return this._componentsmap[t.__viewid]
},
ct.getviewofseriesmodel = function(t) {
return this._chartsmap[t.__viewid]
};
var lt = {
prepareandupdate: function(t) {
ls(this),
lt.update.call(this, t)
},
update: function(t) {
var e = this._model,
i = this._api,
n = this._zr,
o = this._coordsysmgr,
a = this._scheduler;
if (e) {
a.restoredata(e, t),
a.performseriestasks(e),
o.create(e, i),
a.performdataprocessortasks(e, t),
hs(this, e),
o.update(e, i),
ms(e),
a.performvisualtasks(e, t),
vs(this, e, i, t);
var r = e.get("backgroundcolor") || "transparent";
if (z_.canvassupported) n.setbackgroundcolor(r);
else {
var s = zt(r);
r = xt(s, "rgb"),
0 === s[3] && (r = "transparent")
}
_s(e, i)
}
},
updatetransform: function(t) {
var e = this._model,
i = this,
n = this._api;
if (e) {
var o = [];
e.eachcomponent(function(a, r) {
var s = i.getviewofcomponentmodel(r);
if (s && s.__alive) if (s.updatetransform) {
var l = s.updatetransform(r, e, n, t);
l && l.update && o.push(s)
} else o.push(s)
});
var a = r();
e.eachseries(function(o) {
var r = i._chartsmap[o.__viewid];
if (r.updatetransform) {
var s = r.updatetransform(o, e, n, t);
s && s.update && a.set(o.uid, 1)
} else a.set(o.uid, 1)
}),
ms(e),
this._scheduler.performvisualtasks(e, t, {
setdirty: !0,
dirtymap: a
}),
xs(i, e, 0, t, a),
_s(e, this._api)
}
},
updateview: function(t) {
var e = this._model;
e && (mr.markupdatemethod(t, "updateview"), ms(e), this._scheduler.performvisualtasks(e, t, {
setdirty: !0
}), vs(this, this._model, this._api, t), _s(e, this._api))
},
updatevisual: function(t) {
lt.update.call(this, t)
},
updatelayout: function(t) {
lt.update.call(this, t)
}
};
ct.resize = function(t) {
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[tt] = !0,
i && ls(this),
lt.update.call(this),
this[tt] = !1,
ds.call(this, n),
fs.call(this, n)
}
},
ct.showloading = function(t, e) {
if (xt(t) && (e = t, t = ""), t = t || "default", this.hideloading(), vt[t]) {
var i = vt[t](this._api, e),
n = this._zr;
this._loadingfx = i,
n.add(i)
}
},
ct.hideloading = function() {
this._loadingfx && this._zr.remove(this._loadingfx),
this._loadingfx = null
},
ct.makeactionfromevent = function(t) {
var e = a({},
t);
return e.type = nt[t.type],
e
},
ct.dispatchaction = function(t, e) {
xt(e) || (e = {
silent: !!e
}),
pt[t.type] && this._model && (this[tt] ? this._pendingactions.push(t) : (cs.call(this, t, e.silent), e.flush ? this._zr.flush(!0) : !1 !== e.flush && z_.browser.wechat && this._throttledzrflush(), ds.call(this, e.silent), fs.call(this, e.silent)))
},
ct.appenddata = function(t) {
var e = t.seriesindex;
this.getmodel().getseriesbyindex(e).appenddata(t),
this._scheduler.unfinished = !0
},
ct.on = os("on"),
ct.off = os("off"),
ct.one = os("one");
var kt = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
ct._initevents = function() {
vt(kt,
function(t) {
this._zr.on(t,
function(e) {
var i, n = this.getmodel(),
o = e.target;
if ("globalout" === t) i = {};
else if (o && null != o.dataindex) {
var r = o.datamodel || n.getseriesbyindex(o.seriesindex);
i = r && r.getdataparams(o.dataindex, o.datatype, o) || {}
} else o && o.eventdata && (i = a({},
o.eventdata));
if (i) {
var s = i.componenttype,
l = i.componentindex;
"markline" !== s && "markpoint" !== s && "markarea" !== s || (s = "series", l = i.seriesindex);
var u = s && null != l && n.getcomponent(s, l),
h = u && this["series" === u.maintype ? "_chartsmap": "_componentsmap"][u.__viewid];
i.event = e,
i.type = t,
this._eceventprocessor.eventinfo = {
targetel: o,
packedevent: i,
model: u,
view: h
},
this.trigger(t, i)
}
},
this)
},
this),
vt(nt,
function(t, e) {
this._messagecenter.on(e,
function(t) {
this.trigger(e, t)
},
this)
},
this)
},
ct.isdisposed = function() {
return this._disposed
},
ct.clear = function() {
this.setoption({
series: []
},
!0)
},
ct.dispose = function() {
if (!this._disposed) {
this._disposed = !0,
fi(this.getdom(), zt, "");
var t = this._api,
e = this._model;
vt(this._componentsviews,
function(i) {
i.dispose(e, t)
}),
vt(this._chartsviews,
function(i) {
i.dispose(e, t)
}),
this._zr.dispose(),
delete gt[this.id]
}
},
h(rs, aw),
is.prototype = {
constructor: is,
normalizequery: function(t) {
var e = {},
i = {},
n = {};
if (_(t)) {
var o = _t(t);
e.maintype = o.main || null,
e.subtype = o.sub || null
} else {
var a = ["index", "name", "id"],
r = {
name: 1,
dataindex: 1,
datatype: 1
};
d(t,
function(t, o) {
for (var s = !1,
l = 0; l < a.length; l++) {
var u = a[l],
h = o.lastindexof(u);
if (h > 0 && h === o.length - u.length) {
var c = o.slice(0, h);
"data" !== c && (e.maintype = c, e[u.tolowercase()] = t, s = !0)
}
}
r.hasownproperty(o) && (i[o] = t, s = !0),
s || (n[o] = t)
})
}
return {
cptquery: e,
dataquery: i,
otherquery: n
}
},
filter: function(t, e, i) {
function n(t, e, i, n) {
return null == t[i] || e[n || i] === t[i]
}
var o = this.eventinfo;
if (!o) return ! 0;
var a = o.targetel,
r = o.packedevent,
s = o.model,
l = o.view;
if (!s || !l) return ! 0;
var u = e.cptquery,
h = e.dataquery;
return n(u, s, "maintype") && n(u, s, "subtype") && n(u, s, "index", "componentindex") && n(u, s, "name") && n(u, s, "id") && n(h, r, "name") && n(h, r, "dataindex") && n(h, r, "datatype") && (!l.filterforexposedevent || l.filterforexposedevent(t, e.otherquery, a, r))
},
aftertrigger: function() {
this.eventinfo = null
}
};
var pt = {},
nt = {},
ot = [],
et = [],
rt = [],
zt = [],
bt = {},
vt = {},
gt = {},
ft = {},
wt = new date - 0,
ht = new date - 0,
zt = "_echarts_instance_",
ut = as;
es(2e3, ui),
ls(mi),
ks(5e3,
function(t) {
var e = r();
t.eachseries(function(t) {
var i = t.get("stack");
if (i) {
var n = e.get(i) || e.set(i, []),
o = t.getdata(),
a = {
stackresultdimension: o.getcalculationinfo("stackresultdimension"),
stackedoverdimension: o.getcalculationinfo("stackedoverdimension"),
stackeddimension: o.getcalculationinfo("stackeddimension"),
stackedbydimension: o.getcalculationinfo("stackedbydimension"),
isstackedbyindex: o.getcalculationinfo("isstackedbyindex"),
data: o,
seriesmodel: t
};
if (!a.stackeddimension || !a.isstackedbyindex && !a.stackedbydimension) return;
n.length && o.setcalculationinfo("stackedonseries", n[n.length - 1].seriesmodel),
n.push(a)
}
}),
e.each(ir)
}),
zs("default",
function(t, e) {
r(e = e || {},
{
text: "loading",
color: "#c23531",
textcolor: "#000",
maskcolor: "rgba(255, 255, 255, 0.8)",
zlevel: 0
});
var i = new am({
style: {
fill: e.maskcolor
},
zlevel: e.zlevel,
z: 1e4
}),
n = new um({
shape: {
startangle: -yi / 2,
endangle: -yi / 2 + .1,
r: 10
},
style: {
stroke: e.color,
linecap: "round",
linewidth: 5
},
zlevel: e.zlevel,
z: 10001
}),
o = new am({
style: {
fill: "none",
text: e.text,
textposition: "right",
textdistance: 10,
textfill: e.textcolor
},
zlevel: e.zlevel,
z: 10001
});
n.animateshape(!0).when(1e3, {
endangle: 3 * yi / 2
}).start("circularinout"),
n.animateshape(!0).when(1e3, {
startangle: 3 * yi / 2
}).delay(300).start("circularinout");
var a = new zw;
return a.add(n),
a.add(o),
a.add(i),
a.resize = function() {
var e = t.getwidth() / 2,
a = t.getheight() / 2;
n.setshape({
cx: e,
cy: a
});
var r = n.shape.r;
o.setshape({
x: e - r,
y: a - r,
width: 2 * r,
height: 2 * r
}),
i.setshape({
x: 0,
y: 0,
width: t.getwidth(),
height: t.getheight()
})
},
a.resize(),
a
}),
ps({
type: "highlight",
event: "highlight",
update: "highlight"
},
b),
ps({
type: "downplay",
event: "downplay",
update: "downplay"
},
b),
cs("light", it),
cs("dark", ot);
var xt = {};
hs.prototype = {
constructor: hs,
add: function(t) {
return this._add = t,
this
},
update: function(t) {
return this._update = t,
this
},
remove: function(t) {
return this._remove = t,
this
},
execute: function() {
var t = this._old,
e = this._new,
i = {},
n = [],
o = [];
for (zs(t, {},
n, "_oldkeygetter", this), zs(e, i, o, "_newkeygetter", this), a = 0; a < t.length; a++) null != (s = i[r = n[a]]) ? ((u = s.length) ? (1 === u && (i[r] = null), s = s.unshift()) : i[r] = null, this._update && this._update(s, a)) : this._remove && this._remove(a);
for (var a = 0; a < o.length; a++) {
var r = o[a];
if (i.hasownproperty(r)) {
var s = i[r];
if (null == s) continue;
if (s.length) for (var l = 0,
u = s.length; l < u; l++) this._add && this._add(s[l]);
else this._add && this._add(s)
}
}
}
};
var jt = r(["tooltip", "label", "itemname", "itemid", "seriesname"]),
yt = w,
qt = "e\0\0",
kt = {
float: "undefined" == typeof float64array ? array: float64array,
int: "undefined" == typeof int32array ? array: int32array,
ordinal: array,
number: array,
time: array
},
$t = "undefined" == typeof uint32array ? array: uint32array,
jt = "undefined" == typeof uint16array ? array: uint16array,
qt = ["hasitemoption", "_namelist", "_idlist", "_invertedindicesmap", "_rawdata", "_chunksize", "_chunkcount", "_dimvaluegetter", "_count", "_rawcount", "_namedimidx", "_iddimidx"],
ta = ["_extent", "_approximateextent", "_rawextent"],
ea = function(t, e) {
t = t || ["x", "y"];
for (var i = {},
n = [], o = {},
a = 0; a < t.length; a++) {
var r = t[a];
_(r) && (r = {
name: r
});
var s = r.name;
r.type = r.type || "float",
r.coorddim || (r.coorddim = s, r.coorddimindex = 0),
r.otherdims = r.otherdims || {},
n.push(s),
i[s] = r,
r.index = a,
r.createinvertedindices && (o[s] = [])
}
this.dimensions = n,
this._dimensioninfos = i,
this.hostmodel = e,
this.datatype,
this._indices = null,
this._count = 0,
this._rawcount = 0,
this._storage = {},
this._namelist = [],
this._idlist = [],
this._optionmodels = [],
this._visual = {},
this._layout = {},
this._itemvisuals = [],
this.hasitemvisual = {},
this._itemlayouts = [],
this._graphicels = [],
this._chunksize = 1e5,
this._chunkcount = 0,
this._rawdata,
this._rawextent = {},
this._extent = {},
this._approximateextent = {},
this._dimensionssummary = us(this),
this._invertedindicesmap = o,
this._calculationinfo = {}
},
ia = ea.prototype;
ia.type = "list",
ia.hasitemoption = !0,
ia.getdimension = function(t) {
return isnan(t) || (t = this.dimensions[t] || t),
t
},
ia.getdimensioninfo = function(t) {
return this._dimensioninfos[this.getdimension(t)]
},
ia.getdimensionsoncoord = function() {
return this._dimensionssummary.datadimsoncoord.slice()
},
ia.mapdimension = function(t, e) {
var i = this._dimensionssummary;
if (null == e) return i.encodefirstdimnotextra[t];
var n = i.encode[t];
return ! 0 === e ? (n || []).slice() : n && n[e]
},
ia.initdata = function(t, e, i) { (va.isinstance(t) || c(t)) && (t = new nr(t, this.dimensions.length)),
this._rawdata = t,
this._storage = {},
this._indices = null,
this._namelist = e || [],
this._idlist = [],
this._namerepeatcount = {},
i || (this.hasitemoption = !1),
this.defaultdimvaluegetter = di[this._rawdata.getsource().sourceformat],
this._dimvaluegetter = i = i || this.defaultdimvaluegetter,
this._rawextent = {},
this._initdatafromprovider(0, t.count()),
t.pure && (this.hasitemoption = !1)
},
ia.getprovider = function() {
return this._rawdata
},
ia.appenddata = function(t) {
var e = this._rawdata,
i = this.count();
e.appenddata(t);
var n = e.count();
e.persistent || (n += i),
this._initdatafromprovider(i, n)
},
ia._initdatafromprovider = function(t, e) {
if (! (t >= e)) {
for (var i, n = this._chunksize,
o = this._rawdata,
a = this._storage,
r = this.dimensions,
s = r.length,
l = this._dimensioninfos,
u = this._namelist,
h = this._idlist,
c = this._rawextent,
d = this._namerepeatcount = {},
f = this._chunkcount,
p = f - 1,
g = 0; g < s; g++) {
c[t = r[g]] || (c[t] = [1 / 0, -1 / 0]);
var m = l[t];
0 === m.otherdims.itemname && (i = this._namedimidx = g),
0 === m.otherdims.itemid && (this._iddimidx = g);
var v = kt[m.type];
a[t] || (a[t] = []);
var y = a[t][p];
if (y && y.length < n) {
for (var x = new v(math.min(e - p * n, n)), _ = 0; _ < y.length; _++) x[_] = y[_];
a[t][p] = x
}
for (i = f * n; i < e; i += n) a[t].push(new v(math.min(e - i, n)));
this._chunkcount = a[t].length
}
for (var w = new array(s), b = t; b < e; b++) {
w = o.getitem(b, w);
for (var s = math.floor(b / n), m = b % n, i = 0; i < s; i++) {
var t = r[i],
a = a[t][s],
d = this._dimvaluegetter(w, t, b, i);
a[m] = d;
var c = c[t];
d < c[0] && (c[0] = d),
d > c[1] && (c[1] = d)
}
if (!o.pure) {
var l = u[b];
if (w && null == l) if (null != w.name) u[b] = l = w.name;
else if (null != i) {
var k = r[i],
p = a[k][s];
if (p) {
l = p[m];
var n = l[k].ordinalmeta;
n && n.categories.length && (l = n.categories[l])
}
}
var o = null == w ? null: w.id;
null == o && null != l && (d[l] = d[l] || 0, o = l, d[l] > 0 && (o += "__ec__" + d[l]), d[l]++),
null != o && (h[b] = o)
}
} ! o.persistent && o.clean && o.clean(),
this._rawcount = this._count = e,
this._extent = {},
$s(this)
}
},
ia.count = function() {
return this._count
},
ia.getindices = function() {
var t = this._indices;
if (t) {
var e = t.constructor,
i = this._count;
if (e === array) {
n = new e(i);
for (o = 0; o < i; o++) n[o] = t[o]
} else n = new e(t.buffer, 0, i)
} else for (var n = new(e = ys(this))(this.count()), o = 0; o < n.length; o++) n[o] = o;
return n
},
ia.get = function(t, e) {
if (! (e >= 0 && e < this._count)) return nan;
var i = this._storage;
if (!i[t]) return nan;
e = this.getrawindex(e);
var n = math.floor(e / this._chunksize),
o = e % this._chunksize;
return i[t][n][o]
},
ia.getbyrawindex = function(t, e) {
if (! (e >= 0 && e < this._rawcount)) return nan;
var i = this._storage[t];
if (!i) return nan;
var n = math.floor(e / this._chunksize),
o = e % this._chunksize;
return i[n][o]
},
ia._getfast = function(t, e) {
var i = math.floor(e / this._chunksize),
n = e % this._chunksize;
return this._storage[t][i][n]
},
ia.getvalues = function(t, e) {
var i = [];
y(t) || (e = t, t = this.dimensions);
for (var n = 0,
o = t.length; n < o; n++) i.push(this.get(t[n], e));
return i
},
ia.hasvalue = function(t) {
for (var e = this._dimensionssummary.datadimsoncoord,
i = this._dimensioninfos,
n = 0,
o = e.length; n < o; n++) if ("ordinal" !== i[e[n]].type && isnan(this.get(e[n], t))) return ! 1;
return ! 0
},
ia.getdataextent = function(t) {
t = this.getdimension(t);
var e = [1 / 0, -1 / 0];
if (!this._storage[t]) return e;
var i, n = this.count();
if (!this._indices) return this._rawextent[t].slice();
if (i = this._extent[t]) return i.slice();
for (var o = (i = e)[0], a = i[1], r = 0; r < n; r++) {
var s = this._getfast(t, this.getrawindex(r));
s < o && (o = s),
s > a && (a = s)
}
return i = [o, a],
this._extent[t] = i,
i
},
ia.getapproximateextent = function(t) {
return t = this.getdimension(t),
this._approximateextent[t] || this.getdataextent(t)
},
ia.setapproximateextent = function(t, e) {
e = this.getdimension(e),
this._approximateextent[e] = t.slice()
},
ia.getcalculationinfo = function(t) {
return this._calculationinfo[t]
},
ia.setcalculationinfo = function(t, e) {
yt(t) ? a(this._calculationinfo, t) : this._calculationinfo[t] = e
},
ia.getsum = function(t) {
var e = 0;
if (this._storage[t]) for (var i = 0,
n = this.count(); i < n; i++) {
var o = this.get(t, i);
isnan(o) || (e += o)
}
return e
},
ia.getmedian = function(t) {
var e = [];
this.each(t,
function(t, i) {
isnan(t) || e.push(t)
});
var i = [].concat(e).sort(function(t, e) {
return t - e
}),
n = this.count();
return 0 === n ? 0 : n % 2 == 1 ? i[(n - 1) / 2] : (i[n / 2] + i[n / 2 - 1]) / 2
},
ia.rawindexof = function(t, e) {
var i = (t && this._invertedindicesmap[t])[e];
return null == i || isnan(i) ? -1 : i
},
ia.indexofname = function(t) {
for (var e = 0,
i = this.count(); e < i; e++) if (this.getname(e) === t) return e;
return - 1
},
ia.indexofrawindex = function(t) {
if (!this._indices) return t;
if (t >= this._rawcount || t < 0) return - 1;
var e = this._indices,
i = e[t];
if (null != i && i < this._count && i === t) return t;
for (var n = 0,
o = this._count - 1; n <= o;) {
var a = (n + o) / 2 | 0;
if (e[a] < t) n = a + 1;
else {
if (! (e[a] > t)) return a;
o = a - 1
}
}
return - 1
},
ia.indicesofnearest = function(t, e, i) {
var n = [];
if (!this._storage[t]) return n;
null == i && (i = 1 / 0);
for (var o = number.max_value,
a = -1,
r = 0,
s = this.count(); r < s; r++) {
var l = e - this.get(t, r),
u = math.abs(l);
l <= i && u <= o && ((u < o || l >= 0 && a < 0) && (o = u, a = l, n.length = 0), n.push(r))
}
return n
},
ia.getrawindex = qs,
ia.getrawdataitem = function(t) {
if (this._rawdata.persistent) return this._rawdata.getitem(this.getrawindex(t));
for (var e = [], i = 0; i < this.dimensions.length; i++) {
var n = this.dimensions[i];
e.push(this.get(n, t))
}
return e
},
ia.getname = function(t) {
var e = this.getrawindex(t);
return this._namelist[e] || js(this, this._namedimidx, e) || ""
},
ia.getid = function(t) {
return el(this, this.getrawindex(t))
},
ia.each = function(t, e, i, n) {
if (this._count) {
"function" == typeof t && (n = i, i = e, e = t, t = []),
i = i || n || this;
for (var o = (t = f(il(t), this.getdimension, this)).length, a = 0; a < this.count(); a++) switch (o) {
case 0:
e.call(i, a);
break;
case 1:
e.call(i, this.get(t[0], a), a);
break;
case 2:
e.call(i, this.get(t[0], a), this.get(t[1], a), a);
break;
default:
for (var r = 0,
s = []; r < o; r++) s[r] = this.get(t[r], a);
s[r] = a,
e.apply(i, s)
}
}
},
ia.filterself = function(t, e, i, n) {
if (this._count) {
"function" == typeof t && (n = i, i = e, e = t, t = []),
i = i || n || this,
t = f(il(t), this.getdimension, this);
for (var o = this.count(), a = new(ys(this))(o), r = [], s = t.length, l = 0, u = t[0], h = 0; h < o; h++) {
var c, d = this.getrawindex(h);
if (0 === s) c = e.call(i, h);
else if (1 === s) {
var p = this._getfast(u, d);
c = e.call(i, p, h)
} else {
for (var g = 0; g < s; g++) r[g] = this._getfast(u, d);
r[g] = h,
c = e.apply(i, r)
}
c && (a[l++] = d)
}
return l < o && (this._indices = a),
this._count = l,
this._extent = {},
this.getrawindex = this._indices ? tl: qs,
this
}
},
ia.selectrange = function(t) {
if (this._count) {
var e = [];
for (var i in t) t.hasownproperty(i) && e.push(i);
var n = e.length;
if (n) {
var o = this.count(),
a = new(ys(this))(o),
r = 0,
s = e[0],
l = t[s][0],
u = t[s][1],
h = !1;
if (!this._indices) {
var c = 0;
if (1 === n) {
for (var d = this._storage[e[0]], f = 0; f < this._chunkcount; f++) for (var p = d[f], g = math.min(this._count - f * this._chunksize, this._chunksize), m = 0; m < g; m++)((w = p[m]) >= l && w <= u || isnan(w)) && (a[r++] = c),
c++;
h = !0
} else if (2 === n) {
for (var d = this._storage[s], v = this._storage[e[1]], y = t[e[1]][0], x = t[e[1]][1], f = 0; f < this._chunkcount; f++) for (var p = d[f], _ = v[f], g = math.min(this._count - f * this._chunksize, this._chunksize), m = 0; m < g; m++) {
var w = p[m],
b = _[m]; (w >= l && w <= u || isnan(w)) && (b >= y && b <= x || isnan(b)) && (a[r++] = c),
c++
}
h = !0
}
}
if (!h) if (1 === n) for (m = 0; m < o; m++) {
m = this.getrawindex(m); ((w = this._getfast(s, m)) >= l && w <= u || isnan(w)) && (a[r++] = m)
} else for (m = 0; m < o; m++) {
for (var s = !0,
m = this.getrawindex(m), f = 0; f < n; f++) {
var i = e[f]; ((w = this._getfast(i, m)) < t[i][0] || w > t[i][1]) && (s = !1)
}
s && (a[r++] = this.getrawindex(m))
}
return r < o && (this._indices = a),
this._count = r,
this._extent = {},
this.getrawindex = this._indices ? tl: qs,
this
}
}
},
ia.maparray = function(t, e, i, n) {
"function" == typeof t && (n = i, i = e, e = t, t = []),
i = i || n || this;
var o = [];
return this.each(t,
function() {
o.push(e && e.apply(this, arguments))
},
i),
o
},
ia.map = function(t, e, i, n) {
i = i || n || this;
var o = nl(this, t = f(il(t), this.getdimension, this));
o._indices = this._indices,
o.getrawindex = o._indices ? tl: qs;
for (var a = o._storage,
r = [], s = this._chunksize, l = t.length, u = this.count(), h = [], c = o._rawextent, d = 0; d < u; d++) {
for (var p = 0; p < l; p++) h[p] = this.get(t[p], d);
h[l] = d;
var g = e && e.apply(i, h);
if (null != g) {
"object" != typeof g && (r[0] = g, g = r);
for (var m = this.getrawindex(d), v = math.floor(m / s), y = m % s, x = 0; x < g.length; x++) {
var _ = t[x],
w = g[x],
b = c[_],
s = a[_];
s && (s[v][y] = w),
w < b[0] && (b[0] = w),
w > b[1] && (b[1] = w)
}
}
}
return o
},
ia.downsample = function(t, e, i, n) {
for (var o = nl(this, [t]), a = o._storage, r = [], s = math.floor(1 / e), l = a[t], u = this.count(), h = this._chunksize, c = o._rawextent[t], d = new(ys(this))(u), f = 0, p = 0; p < u; p += s) {
s > u - p && (s = u - p, r.length = s);
for (var g = 0; g < s; g++) {
var m = this.getrawindex(p + g),
v = math.floor(m / h),
y = m % h;
r[g] = l[v][y]
}
var x = i(r),
_ = this.getrawindex(math.min(p + n(r, x) || 0, u - 1)),
w = _ % h;
l[math.floor(_ / h)][w] = x,
x < c[0] && (c[0] = x),
x > c[1] && (c[1] = x),
d[f++] = _
}
return o._count = f,
o._indices = d,
o.getrawindex = tl,
o
},
ia.getitemmodel = function(t) {
var e = this.hostmodel;
return new lo(this.getrawdataitem(t), e, e && e.ecmodel)
},
ia.diff = function(t) {
var e = this;
return new hs(t ? t.getindices() : [], this.getindices(),
function(e) {
return el(t, e)
},
function(t) {
return el(e, t)
})
},
ia.getvisual = function(t) {
var e = this._visual;
return e && e[t]
},
ia.setvisual = function(t, e) {
if (yt(t)) for (var i in t) t.hasownproperty(i) && this.setvisual(i, t[i]);
else this._visual = this._visual || {},
this._visual[t] = e
},
ia.setlayout = function(t, e) {
if (yt(t)) for (var i in t) t.hasownproperty(i) && this.setlayout(i, t[i]);
else this._layout[t] = e
},
ia.getlayout = function(t) {
return this._layout[t]
},
ia.getitemlayout = function(t) {
return this._itemlayouts[t]
},
ia.setitemlayout = function(t, e, i) {
this._itemlayouts[t] = i ? a(this._itemlayouts[t] || {},
e) : e
},
ia.clearitemlayouts = function() {
this._itemlayouts.length = 0
},
ia.getitemvisual = function(t, e, i) {
var n = this._itemvisuals[t],
o = n && n[e];
return null != o || i ? o: this.getvisual(e)
},
ia.setitemvisual = function(t, e, i) {
var n = this._itemvisuals[t] || {},
o = this.hasitemvisual;
if (this._itemvisuals[t] = n, yt(e)) for (var a in e) e.hasownproperty(a) && (n[a] = e[a], o[a] = !0);
else n[e] = i,
o[e] = !0
},
ia.clearallvisual = function() {
this._visual = {},
this._itemvisuals = [],
this.hasitemvisual = {}
};
var na = function(t) {
t.seriesindex = this.seriesindex,
t.dataindex = this.dataindex,
t.datatype = this.datatype
};
ia.setitemgraphicel = function(t, e) {
var i = this.hostmodel;
e && (e.dataindex = t, e.datatype = this.datatype, e.seriesindex = i && i.seriesindex, "group" === e.type && e.traverse(na, e)),
this._graphicels[t] = e
},
ia.getitemgraphicel = function(t) {
return this._graphicels[t]
},
ia.eachitemgraphicel = function(t, e) {
d(this._graphicels,
function(i, n) {
i && t && t.call(e, i, n)
})
},
ia.cloneshallow = function(t) {
if (!t) {
var e = f(this.dimensions, this.getdimensioninfo, this);
t = new ea(e, this.hostmodel)
}
if (t._storage = this._storage, ks(t, this), this._indices) {
var i = this._indices.constructor;
t._indices = new i(this._indices)
} else t._indices = null;
return t.getrawindex = t._indices ? tl: qs,
t
},
ia.wrapmethod = function(t, e) {
var i = this[t];
"function" == typeof i && (this.__wrappedmethods = this.__wrappedmethods || [], this.__wrappedmethods.push(t), this[t] = function() {
var t = i.apply(this, arguments);
return e.apply(this, [t].concat(c(arguments)))
})
},
ia.transferable_methods = ["cloneshallow", "downsample", "map"],
ia.changable_methods = ["filterself", "selectrange"];
var oa = function(t, e) {
return e = e || {},
rl(e.coorddimensions || [], t, {
dimsdef: e.dimensionsdefine || t.dimensionsdefine,
encodedef: e.encodedefine || t.encodedefine,
dimcount: e.dimensionscount,
generatecoord: e.generatecoord,
generatecoordcount: e.generatecoordcount
})
};
gl.prototype.parse = function(t) {
return t
},
gl.prototype.getsetting = function(t) {
return this._setting[t]
},
gl.prototype.contain = function(t) {
var e = this._extent;
return t >= e[0] && t <= e[1]
},
gl.prototype.normalize = function(t) {
var e = this._extent;
return e[1] === e[0] ? .5 : (t - e[0]) / (e[1] - e[0])
},
gl.prototype.scale = function(t) {
var e = this._extent;
return t * (e[1] - e[0]) + e[0]
},
gl.prototype.unionextent = function(t) {
var e = this._extent;
t[0] < e[0] && (e[0] = t[0]),
t[1] > e[1] && (e[1] = t[1])
},
gl.prototype.unionextentfromdata = function(t, e) {
this.unionextent(t.getapproximateextent(e))
},
gl.prototype.getextent = function() {
return this._extent.slice()
},
gl.prototype.setextent = function(t, e) {
var i = this._extent;
isnan(t) || (i[0] = t),
isnan(e) || (i[1] = e)
},
gl.prototype.isblank = function() {
return this._isblank
},
gl.prototype.setblank = function(t) {
this._isblank = t
},
gl.prototype.getlabel = null,
xi(gl),
ki(gl, {
registerwhenextend: !0
}),
ml.createbyaxismodel = function(t) {
var e = t.option,
i = e.data,
n = i && f(i, yl);
return new ml({
categories: n,
needcollect: !n,
deduplication: !1 !== e.dedplication
})
};
var aa = ml.prototype;
aa.getordinal = function(t) {
return vl(this).get(t)
},
aa.parseandcollect = function(t) {
var e, i = this._needcollect;
if ("string" != typeof t && !i) return t;
if (i && !this._deduplication) return e = this.categories.length,
this.categories[e] = t,
e;
var n = vl(this);
return null == (e = n.get(t)) && (i ? (e = this.categories.length, this.categories[e] = t, n.set(t, e)) : e = nan),
e
};
var ra = gl.prototype,
sa = gl.extend({
type: "ordinal",
init: function(t, e) {
t && !y(t) || (t = new ml({
categories: t
})),
this._ordinalmeta = t,
this._extent = e || [0, t.categories.length - 1]
},
parse: function(t) {
return "string" == typeof t ? this._ordinalmeta.getordinal(t) : math.round(t)
},
contain: function(t) {
return t = this.parse(t),
ra.contain.call(this, t) && null != this._ordinalmeta.categories[t]
},
normalize: function(t) {
return ra.normalize.call(this, this.parse(t))
},
scale: function(t) {
return math.round(ra.scale.call(this, t))
},
getticks: function() {
for (var t = [], e = this._extent, i = e[0]; i <= e[1];) t.push(i),
i++;
return t
},
getlabel: function(t) {
if (!this.isblank()) return this._ordinalmeta.categories[t]
},
count: function() {
return this._extent[1] - this._extent[0] + 1
},
unionextentfromdata: function(t, e) {
this.unionextent(t.getapproximateextent(e))
},
getordinalmeta: function() {
return this._ordinalmeta
},
niceticks: b,
niceextent: b
});
sa.create = function() {
return new sa
};
var la = zo,
ua = zo,
ha = gl.extend({
type: "interval",
_interval: 0,
_intervalprecision: 2,
setextent: function(t, e) {
var i = this._extent;
isnan(t) || (i[0] = parsefloat(t)),
isnan(e) || (i[1] = parsefloat(e))
},
unionextent: function(t) {
var e = this._extent;
t[0] < e[0] && (e[0] = t[0]),
t[1] > e[1] && (e[1] = t[1]),
ha.prototype.setextent.call(this, e[0], e[1])
},
getinterval: function() {
return this._interval
},
setinterval: function(t) {
this._interval = t,
this._niceextent = this._extent.slice(),
this._intervalprecision = _l(t)
},
getticks: function() {
return sl(this._interval, this._extent, this._niceextent, this._intervalprecision)
},
getlabel: function(t, e) {
if (null == t) return "";
var i = e && e.precision;
return null == i ? i = go(t) || 0 : "auto" === i && (i = this._intervalprecision),
t = ua(t, i, !0),
$o(t)
},
niceticks: function(t, e, i) {
t = t || 5;
var n = this._extent,
o = n[1] - n[0];
if (isfinite(o)) {
o < 0 && (o = -o, n.reverse());
var a = xl(n, t, e, i);
this._intervalprecision = a.intervalprecision,
this._interval = a.interval,
this._niceextent = a.nicetickextent
}
},
niceextent: function(t) {
var e = this._extent;
if (e[0] === e[1]) if (0 !== e[0]) {
var i = e[0];
t.fixmax ? e[0] -= i / 2 : (e[1] += i / 2, e[0] -= i / 2)
} else e[1] = 1;
var n = e[1] - e[0];
isfinite(n) || (e[0] = 0, e[1] = 1),
this.niceticks(t.splitnumber, t.mininterval, t.maxinterval);
var o = this._interval;
t.fixmin || (e[0] = ua(math.floor(e[0] / o) * o)),
t.fixmax || (e[1] = ua(math.ceil(e[1] / o) * o))
}
});
ha.create = function() {
return new ha
};
var ca = "__ec_stack_",
da = "undefined" != typeof float32array ? float32array: array,
fa = {
seriestype: "bar",
plan: zi(),
reset: function(t) {
if (pl(t) && nl(t)) {
var e = t.getdata(),
i = t.coordinatesystem,
n = i.getbaseaxis(),
o = i.getotheraxis(n),
a = e.mapdimension(o.dim),
r = e.mapdimension(n.dim),
s = o.ishorizontal(),
l = s ? 0 : 1,
u = ll(dl([t]), n, t).width;
return u > .5 || (u = .5),
{
progress: function(t, e) {
for (var n, h = new da(2 * t.count), c = [], d = [], f = 0; null != (n = t.next());) d[l] = e.get(a, n),
d[1 - l] = e.get(r, n),
c = i.datatopoint(d, null, c),
h[f++] = c[0],
h[f++] = c[1];
e.setlayout({
largepoints: h,
barwidth: u,
valueaxisstart: ol(0, o),
valueaxishorizontal: s
})
}
}
}
}
},
pa = ha.prototype,
ga = math.ceil,
ma = math.floor,
va = function(t, e, i, n) {
for (; i < n;) {
var o = i + n >>> 1;
t[o][1] < e ? i = o + 1 : n = o
}
return i
},
ya = ha.extend({
type: "time",
getlabel: function(t) {
var e = this._steplvl,
i = new date(t);
return oa(e[0], i, this.getsetting("useutc"))
},
niceextent: function(t) {
var e = this._extent;
if (e[0] === e[1] && (e[0] -= 864e5, e[1] += 864e5), e[1] === -1 / 0 && e[0] === 1 / 0) {
var i = new date;
e[1] = +new date(i.getfullyear(), i.getmonth(), i.getdate()),
e[0] = e[1] - 864e5
}
this.niceticks(t.splitnumber, t.mininterval, t.maxinterval);
var n = this._interval;
t.fixmin || (e[0] = zo(ma(e[0] / n) * n)),
t.fixmax || (e[1] = zo(ga(e[1] / n) * n))
},
niceticks: function(t, e, i) {
t = t || 10;
var n = this._extent,
o = n[1] - n[0],
a = o / t;
null != e && a < e && (a = e),
null != i && a > i && (a = i);
var r = xa.length,
s = va(xa, a, 0, r),
l = xa[math.min(s, r - 1)],
u = l[1];
"year" === l[0] && (u *= yo(o / u / t, !0));
var h = this.getsetting("useutc") ? 0 : 60 * new date( + n[0] || +n[1]).gettimezoneoffset() * 1e3,
c = [math.round(ga((n[0] - h) / u) * u + h), math.round(ma((n[1] - h) / u) * u + h)];
bl(c, n),
this._steplvl = l,
this._interval = u,
this._niceextent = c
},
parse: function(t) {
return + uo(t)
}
});
d(["contain", "normalize"],
function(t) {
ya.prototype[t] = function(e) {
return pa[t].call(this, this.parse(e))
}
});
var xa = [["hh:mm:ss", 1e3], ["hh:mm:ss", 5e3], ["hh:mm:ss", 1e4], ["hh:mm:ss", 15e3], ["hh:mm:ss", 3e4], ["hh:mm\nmm-dd", 6e4], ["hh:mm\nmm-dd", 3e5], ["hh:mm\nmm-dd", 6e5], ["hh:mm\nmm-dd", 9e5], ["hh:mm\nmm-dd", 18e5], ["hh:mm\nmm-dd", 36e5], ["hh:mm\nmm-dd", 72e5], ["hh:mm\nmm-dd", 216e5], ["hh:mm\nmm-dd", 432e5], ["mm-dd\nyyyy", 864e5], ["mm-dd\nyyyy", 1728e5], ["mm-dd\nyyyy", 2592e5], ["mm-dd\nyyyy", 3456e5], ["mm-dd\nyyyy", 432e6], ["mm-dd\nyyyy", 5184e5], ["week", 6048e5], ["mm-dd\nyyyy", 864e6], ["week", 12096e5], ["week", 18144e5], ["month", 26784e5], ["week", 36288e5], ["month", 53568e5], ["week", 6048e6], ["quarter", 8208e6], ["month", 107136e5], ["month", 13392e6], ["half-year", 16416e6], ["month", 214272e5], ["month", 26784e6], ["year", 32832e6]];
ya.create = function(t) {
return new ya({
useutc: t.ecmodel.get("useutc")
})
};
var _a = gl.prototype,
wa = ha.prototype,
ba = go,
sa = zo,
ma = math.floor,
ia = math.ceil,
ta = math.pow,
aa = math.log,
da = gl.extend({
type: "log",
base: 10,
$constructor: function() {
gl.apply(this, arguments),
this._originalscale = new ha
},
getticks: function() {
var t = this._originalscale,
e = this._extent,
i = t.getextent();
return f(wa.getticks.call(this),
function(n) {
var o = zo(ta(this.base, n));
return o = n === e[0] && t.__fixmin ? el(o, i[0]) : o,
o = n === e[1] && t.__fixmax ? el(o, i[1]) : o
},
this)
},
getlabel: wa.getlabel,
scale: function(t) {
return t = _a.scale.call(this, t),
ta(this.base, t)
},
setextent: function(t, e) {
var i = this.base;
t = aa(t) / aa(i),
e = aa(e) / aa(i),
wa.setextent.call(this, t, e)
},
getextent: function() {
var t = this.base,
e = _a.getextent.call(this);
e[0] = ta(t, e[0]),
e[1] = ta(t, e[1]);
var i = this._originalscale,
n = i.getextent();
return i.__fixmin && (e[0] = el(e[0], n[0])),
i.__fixmax && (e[1] = el(e[1], n[1])),
e
},
unionextent: function(t) {
this._originalscale.unionextent(t);
var e = this.base;
t[0] = aa(t[0]) / aa(e),
t[1] = aa(t[1]) / aa(e),
_a.unionextent.call(this, t)
},
unionextentfromdata: function(t, e) {
this.unionextent(t.getapproximateextent(e))
},
niceticks: function(t) {
t = t || 10;
var e = this._extent,
i = e[1] - e[0];
if (! (i === 1 / 0 || i <= 0)) {
var n = xo(i);
for (t / i * n <= .5 && (n *= 10); ! isnan(n) && math.abs(n) < 1 && math.abs(n) > 0;) n *= 10;
var o = [zo(ia(e[0] / n) * n), zo(ma(e[1] / n) * n)];
this._interval = n,
this._niceextent = o
}
},
niceextent: function(t) {
wa.niceextent.call(this, t);
var e = this._originalscale;
e.__fixmin = t.fixmin,
e.__fixmax = t.fixmax
}
});
d(["contain", "normalize"],
function(t) {
da.prototype[t] = function(e) {
return e = aa(e) / aa(this.base),
_a[t].call(this, e)
}
}),
da.create = function() {
return new da
};
var ca = {
getmin: function(t) {
var e = this.option,
i = t || null == e.rangestart ? e.min: e.rangestart;
return this.axis && null != i && "datamin" !== i && "function" != typeof i && !i(i) && (i = this.axis.scale.parse(i)),
i
},
getmax: function(t) {
var e = this.option,
i = t || null == e.rangeend ? e.max: e.rangeend;
return this.axis && null != i && "datamax" !== i && "function" != typeof i && !i(i) && (i = this.axis.scale.parse(i)),
i
},
getneedcrosszero: function() {
var t = this.option;
return null == t.rangestart && null == t.rangeend && !t.scale
},
getcoordsysmodel: b,
setrange: function(t, e) {
this.option.rangestart = t,
this.option.rangeend = e
},
resetrange: function() {
this.option.rangestart = this.option.rangeend = null
}
},
la = fn({
type: "triangle",
shape: {
cx: 0,
cy: 0,
width: 0,
height: 0
},
buildpath: function(t, e) {
var i = e.cx,
n = e.cy,
o = e.width / 2,
a = e.height / 2;
t.moveto(i, n - a),
t.lineto(i + o, n + a),
t.lineto(i - o, n + a),
t.closepath()
}
}),
ka = fn({
type: "diamond",
shape: {
cx: 0,
cy: 0,
width: 0,
height: 0
},
buildpath: function(t, e) {
var i = e.cx,
n = e.cy,
o = e.width / 2,
a = e.height / 2;
t.moveto(i, n - a),
t.lineto(i + o, n),
t.lineto(i, n + a),
t.lineto(i - o, n),
t.closepath()
}
}),
pa = fn({
type: "pin",
shape: {
x: 0,
y: 0,
width: 0,
height: 0
},
buildpath: function(t, e) {
var i = e.x,
n = e.y,
o = e.width / 5 * 3,
a = math.max(o, e.height),
r = o / 2,
s = r * r / (a - r),
l = n - a + r + s,
u = math.asin(s / r),
h = math.cos(u) * r,
c = math.sin(u),
d = math.cos(u),
f = .6 * r,
p = .7 * r;
t.moveto(i - h, l + s),
t.arc(i, l, r, math.pi - u, 2 * math.pi + u),
t.beziercurveto(i + h - c * f, l + s + d * f, i, n - p, i, n),
t.beziercurveto(i, n - p, i - h + c * f, l + s + d * f, i - h, l + s),
t.closepath()
}
}),
na = fn({
type: "arrow",
shape: {
x: 0,
y: 0,
width: 0,
height: 0
},
buildpath: function(t, e) {
var i = e.height,
n = e.width,
o = e.x,
a = e.y,
r = n / 3 * 2;
t.moveto(o, a),
t.lineto(o + r, a + i),
t.lineto(o, a + i / 4 * 3),
t.lineto(o - r, a + i),
t.lineto(o, a),
t.closepath()
}
}),
oa = {
line: function(t, e, i, n, o) {
o.x1 = t,
o.y1 = e + n / 2,
o.x2 = t + i,
o.y2 = e + n / 2
},
rect: function(t, e, i, n, o) {
o.x = t,
o.y = e,
o.width = i,
o.height = n
},
roundrect: function(t, e, i, n, o) {
o.x = t,
o.y = e,
o.width = i,
o.height = n,
o.r = math.min(i, n) / 4
},
square: function(t, e, i, n, o) {
var a = math.min(i, n);
o.x = t,
o.y = e,
o.width = a,
o.height = a
},
circle: function(t, e, i, n, o) {
o.cx = t + i / 2,
o.cy = e + n / 2,
o.r = math.min(i, n) / 2
},
diamond: function(t, e, i, n, o) {
o.cx = t + i / 2,
o.cy = e + n / 2,
o.width = i,
o.height = n
},
pin: function(t, e, i, n, o) {
o.x = t + i / 2,
o.y = e + n / 2,
o.width = i,
o.height = n
},
arrow: function(t, e, i, n, o) {
o.x = t + i / 2,
o.y = e + n / 2,
o.width = i,
o.height = n
},
triangle: function(t, e, i, n, o) {
o.cx = t + i / 2,
o.cy = e + n / 2,
o.width = i,
o.height = n
}
},
ea = {};
d({
line: rm,
rect: am,
roundrect: am,
square: am,
circle: ks,
diamond: ka,
pin: pa,
arrow: na,
triangle: la
},
function(t, e) {
ea[e] = new t
});
var ra = fn({
type: "symbol",
shape: {
symboltype: "",
x: 0,
y: 0,
width: 0,
height: 0
},
beforebrush: function() {
var t = this.style;
"pin" === this.shape.symboltype && "inside" === t.textposition && (t.textposition = ["50%", "40%"], t.textalign = "center", t.textverticalalign = "middle")
},
buildpath: function(t, e, i) {
var n = e.symboltype,
o = ea[n];
"none" !== e.symboltype && (o || (o = ea[n = "rect"]), oa[n](e.x, e.y, e.width, e.height, o.shape), o.buildpath(t, o.shape, i))
}
}),
za = {
isdimensionstacked: hl,
enabledatastack: ul,
getstackeddimension: cl
},
ba = (object.freeze || object)({
createlist: function(t) {
return dl(t.getsource(), t)
},
getlayoutrect: la,
datastack: za,
createscale: function(t, e) {
var i = e;
lo.isinstance(e) || h(i = new lo(e), ca);
var n = vl(i);
return n.setextent(t[0], t[1]),
bl(n, i),
n
},
mixinaxismodelcommonmethods: function(t) {
h(t, ca)
},
completedimensions: rl,
createdimensions: oa,
createsymbol: xl
}),
va = 1e-8;
ql.prototype = {
constructor: ql,
properties: null,
getboundingrect: function() {
var t = this._rect;
if (t) return t;
for (var e = number.max_value,
i = [e, e], n = [ - e, -e], o = [], a = [], r = this.geometries, s = 0; s < r.length; s++)"polygon" === r[s].type && (dn(r[s].exterior, o, a), tt(i, i, o), et(n, n, a));
return 0 === s && (i[0] = i[1] = n[0] = n[1] = 0),
this._rect = new ue(i[0], i[1], n[0] - i[0], n[1] - i[1])
},
contain: function(t) {
var e = this.getboundingrect(),
i = this.geometries;
if (!e.contain(t[0], t[1])) return ! 1;
t: for (var n = 0,
o = i.length; n < o; n++) if ("polygon" === i[n].type) {
var a = i[n].exterior,
r = i[n].interiors;
if (yl(a, t[0], t[1])) {
for (var s = 0; s < (r ? r.length: 0); s++) if (yl(r[s])) continue t;
return ! 0
}
}
return ! 1
},
transformto: function(t, e, i, n) {
var o = this.getboundingrect(),
a = o.width / o.height;
i ? n || (n = i / a) : i = a * n;
for (var r = new ue(t, e, i, n), s = o.calculatetransform(r), l = this.geometries, u = 0; u < l.length; u++) if ("polygon" === l[u].type) {
for (var h = l[u].exterior, c = l[u].interiors, d = 0; d < h.length; d++) q(h[d], h[d], s);
for (var f = 0; f < (c ? c.length: 0); f++) for (d = 0; d < c[f].length; d++) q(c[f][d], c[f][d], s)
} (o = this._rect).copy(r),
this.center = [o.x + o.width / 2, o.y + o.height / 2]
},
cloneshallow: function(t) {
null == t && (t = this.name);
var e = new ql(t, this.geometries, this.center);
return e._rect = this._rect,
e.transformto = null,
e
}
};
var ga = function(t) {
return kl(t),
f(g(t.features,
function(t) {
return t.geometry && t.properties && t.geometry.coordinates.length > 0
}),
function(t) {
var e = t.properties,
i = t.geometry,
n = i.coordinates,
o = [];
"polygon" === i.type && o.push({
type: "polygon",
exterior: n[0],
interiors: n.slice(1)
}),
"multipolygon" === i.type && d(n,
function(t) {
t[0] && o.push({
type: "polygon",
exterior: t[0],
interiors: t.slice(1)
})
});
var a = new ql(e.name, o, e.cp);
return a.properties = e,
a
})
},
fa = bi(),
wa = [0, 1],
ha = function(t, e, i) {
this.dim = t,
this.scale = e,
this._extent = i || [0, 0],
this.inverse = !1,
this.onband = !1
};
ha.prototype = {
constructor: ha,
contain: function(t) {
var e = this._extent,
i = math.min(e[0], e[1]),
n = math.max(e[0], e[1]);
return t >= i && t <= n
},
containdata: function(t) {
return this.contain(this.datatocoord(t))
},
getextent: function() {
return this._extent.slice()
},
getpixelprecision: function(t) {
return fo(t || this.scale.getextent(), this._extent)
},
setextent: function(t, e) {
var i = this._extent;
i[0] = t,
i[1] = e
},
datatocoord: function(t, e) {
var i = this._extent,
n = this.scale;
return t = n.normalize(t),
this.onband && "ordinal" === n.type && fu(i = i.slice(), n.count()),
eo(t, wa, i, e)
},
coordtodata: function(t, e) {
var i = this._extent,
n = this.scale;
this.onband && "ordinal" === n.type && fu(i = i.slice(), n.count());
var o = eo(t, i, wa, e);
return this.scale.scale(o)
},
pointtodata: function(t, e) {},
gettickscoords: function(t) {
var e = (t = t || {}).tickmodel || this.gettickmodel(),
i = ql(this, e),
n = f(i.ticks,
function(t) {
return {
coord: this.datatocoord(t),
tickvalue: t
}
},
this),
o = e.get("alignwithlabel");
return pu(this, n, i.tickcategoryinterval, o, t.clamp),
n
},
getviewlabels: function() {
return jl(this).labels
},
getlabelmodel: function() {
return this.model.getmodel("axislabel")
},
gettickmodel: function() {
return this.model.getmodel("axistick")
},
getbandwidth: function() {
var t = this._extent,
e = this.scale.getextent(),
i = e[1] - e[0] + (this.onband ? 1 : 0);
0 === i && (i = 1);
var n = math.abs(t[1] - t[0]);
return math.abs(n) / i
},
ishorizontal: null,
getrotate: null,
calculatecategoryinterval: function() {
return lu(this)
}
};
var za = ga,
ua = {};
d(["map", "each", "filter", "indexof", "inherits", "reduce", "filter", "bind", "curry", "isarray", "isstring", "isobject", "isfunction", "extend", "defaults", "clone", "merge"],
function(t) {
ua[t] = $_[t]
});
var xa = {};
d(["extendshape", "extendpath", "makepath", "makeimage", "mergepath", "resizepath", "createicon", "sethoverstyle", "setlabelstyle", "settextstyle", "settext", "getfont", "updateprops", "initprops", "gettransform", "clippointsbyrect", "cliprectbyrect", "group", "image", "text", "circle", "sector", "ring", "polygon", "polyline", "rect", "line", "beziercurve", "arc", "incrementaldisplayable", "compoundpath", "lineargradient", "radialgradient", "boundingrect"],
function(t) {
xa[t] = bm[t]
}),
oi.extend({
type: "series.line",
dependencies: ["grid", "polar"],
getinitialdata: function(t, e) {
return dl(this.getsource(), this)
},
defaultoption: {
zlevel: 0,
z: 2,
coordinatesystem: "cartesian2d",
legendhoverlink: !0,
hoveranimation: !0,
clipoverflow: !0,
label: {
position: "top"
},
linestyle: {
width: 2,
type: "solid"
},
step: !1,
smooth: !1,
smoothmonotone: null,
symbol: "emptycircle",
symbolsize: 4,
symbolrotate: null,
showsymbol: !0,
showallsymbol: "auto",
connectnulls: !1,
sampling: "none",
animationeasing: "linear",
progressive: 0,
hoverlayerthreshold: 1 / 0
}
});
var ja = mu.prototype,
ya = mu.getsymbolsize = function(t, e) {
var i = t.getitemvisual(e, "symbolsize");
return i instanceof array ? i.slice() : [ + i, +i]
};
ja._createsymbol = function(t, e, i, n, o) {
this.removeall();
var a = xl(t, -1, -1, 2, 2, e.getitemvisual(i, "color"), o);
a.attr({
z2: 100,
culling: !0,
scale: vu(n)
}),
a.drift = yu,
this._symboltype = t,
this.add(a)
},
ja.stopsymbolanimation = function(t) {
this.childat(0).stopanimation(t)
},
ja.getsymbolpath = function() {
return this.childat(0)
},
ja.getscale = function() {
return this.childat(0).scale
},
ja.highlight = function() {
this.childat(0).trigger("emphasis")
},
ja.downplay = function() {
this.childat(0).trigger("normal")
},
ja.setz = function(t, e) {
var i = this.childat(0);
i.zlevel = t,
i.z = e
},
ja.setdraggable = function(t) {
var e = this.childat(0);
e.draggable = t,
e.cursor = t ? "move": "pointer"
},
ja.updatedata = function(t, e, i) {
this.silent = !1;
var n = t.getitemvisual(e, "symbol") || "circle",
o = t.hostmodel,
a = ya(t, e),
r = n !== this._symboltype;
if (r) {
var s = t.getitemvisual(e, "symbolkeepaspect");
this._createsymbol(n, t, e, a, s)
} else(l = this.childat(0)).silent = !1,
bo(l, {
scale: vu(a)
},
o, e);
if (this._updatecommon(t, e, a, i), r) {
var l = this.childat(0),
u = i && i.fadein,
h = {
scale: l.scale.slice()
};
u && (h.style = {
opacity: l.style.opacity
}),
l.scale = [0, 0],
u && (l.style.opacity = 0),
so(l, h, o, e)
}
this._seriesmodel = o
};
var qa = ["itemstyle"],
ka = ["emphasis", "itemstyle"],
$a = ["label"],
ja = ["emphasis", "label"];
ja._updatecommon = function(t, e, i, n) {
var o = this.childat(0),
r = t.hostmodel,
s = t.getitemvisual(e, "color");
"image" !== o.type && o.usestyle({
strokenoscale: !0
});
var l = n && n.itemstyle,
u = n && n.hoveritemstyle,
h = n && n.symbolrotate,
c = n && n.symboloffset,
d = n && n.labelmodel,
f = n && n.hoverlabelmodel,
p = n && n.hoveranimation,
g = n && n.cursorstyle;
if (!n || t.hasitemoption) {
var m = n && n.itemmodel ? n.itemmodel: t.getitemmodel(e);
l = m.getmodel(qa).getitemstyle(["color"]),
u = m.getmodel(ka).getitemstyle(),
h = m.getshallow("symbolrotate"),
c = m.getshallow("symboloffset"),
d = m.getmodel($a),
f = m.getmodel(ja),
p = m.getshallow("hoveranimation"),
g = m.getshallow("cursor")
} else u = a({},
u);
var v = o.style;
o.attr("rotation", (h || 0) * math.pi / 180 || 0),
c && o.attr("position", [ro(c[0], i[0]), ro(c[1], i[1])]),
g && o.attr("cursor", g),
o.setcolor(s, n && n.symbolinnercolor),
o.setstyle(l);
var y = t.getitemvisual(e, "opacity");
null != y && (v.opacity = y);
var x = t.getitemvisual(e, "liftz"),
_ = o.__z2origin;
null != x ? null == _ && (o.__z2origin = o.z2, o.z2 += x) : null != _ && (o.z2 = _, o.__z2origin = null);
var w = n && n.usenamelabel;
co(v, u, d, f, {
labelfetcher: r,
labeldataindex: e,
defaulttext: function(e, i) {
return w ? t.getname(e) : gu(t, e)
},
isrecttext: !0,
autocolor: s
}),
o.off("mouseover").off("mouseout").off("emphasis").off("normal"),
o.hoverstyle = u,
uo(o),
o.__symboloriginalscale = vu(i),
p && r.isanimationenabled() && o.on("mouseover", xu).on("mouseout", _u).on("emphasis", wu).on("normal", bu)
},
ja.fadeout = function(t, e) {
var i = this.childat(0);
this.silent = i.silent = !0,
!(e && e.keeplabel) && (i.style.text = null),
bo(i, {
style: {
opacity: 0
},
scale: [0, 0]
},
this._seriesmodel, this.dataindex, t)
},
u(mu, zw);
var qa = su.prototype;
qa.updatedata = function(t, e) {
e = iu(e);
var i = this.group,
n = t.hostmodel,
o = this._data,
a = this._symbolctor,
r = tu(t);
o || i.removeall(),
t.diff(o).add(function(n) {
var o = t.getitemlayout(n);
if (mu(t, o, n, e)) {
var s = new a(t, n, r);
s.attr("position", o),
t.setitemgraphicel(n, s),
i.add(s)
}
}).update(function(s, l) {
var u = o.getitemgraphicel(l),
h = t.getitemlayout(s);
mu(t, h, s, e) ? (u ? (u.updatedata(t, s, r), bo(u, {
position: h
},
n)) : (u = new a(t, s)).attr("position", h), i.add(u), t.setitemgraphicel(s, u)) : i.remove(u)
}).remove(function(t) {
var e = o.getitemgraphicel(t);
e && e.fadeout(function() {
i.remove(e)
})
}).execute(),
this._data = t
},
qa.ispersistent = function() {
return ! 0
},
qa.updatelayout = function() {
var t = this._data;
t && t.eachitemgraphicel(function(e, i) {
var n = t.getitemlayout(i);
e.attr("position", n)
})
},
qa.incrementalprepareupdate = function(t) {
this._seriesscope = tu(t),
this._data = null,
this.group.removeall()
},
qa.incrementalupdate = function(t, e, i) {
i = iu(i);
for (var n = t.start; n < t.end; n++) {
var o = e.getitemlayout(n);
if (mu(e, o, n, i)) {
var a = new this._symbolctor(e, n, this._seriesscope);
a.traverse(function(t) {
t.isgroup || (t.incremental = t.usehoverlayer = !0)
}),
a.attr("position", o),
this.group.add(a),
e.setitemgraphicel(n, a)
}
}
},
qa.remove = function(t) {
var e = this.group,
i = this._data;
i && t ? i.eachitemgraphicel(function(t) {
t.fadeout(function() {
e.remove(t)
})
}) : e.removeall()
};
var td = function(t, e, i, n, o, a, r, s) {
for (var l = lu(t, e), u = [], h = [], c = [], d = [], f = [], p = [], g = [], m = au(o, e, r), v = au(a, t, s), y = 0; y < l.length; y++) {
var x = l[y],
_ = !0;
switch (x.cmd) {
case "=":
var w = t.getitemlayout(x.idx),
b = e.getitemlayout(x.idx1); (isnan(w[0]) || isnan(w[1])) && (w = b.slice()),
u.push(w),
h.push(b),
c.push(i[x.idx]),
d.push(n[x.idx1]),
g.push(e.getrawindex(x.idx1));
break;
case "+":
s = x.idx;
u.push(o.datatopoint([e.get(m.datadimsforpoint[0], s), e.get(m.datadimsforpoint[1], s)])),
h.push(e.getitemlayout(s).slice()),
c.push(cu(m, o, e, s)),
d.push(n[s]),
g.push(e.getrawindex(s));
break;
case "-":
var s = x.idx,
m = t.getrawindex(s);
m !== s ? (u.push(t.getitemlayout(s)), h.push(a.datatopoint([t.get(v.datadimsforpoint[0], s), t.get(v.datadimsforpoint[1], s)])), c.push(i[s]), d.push(cu(v, a, t, s)), g.push(m)) : _ = !1
}
_ && (f.push(x), p.push(p.length))
}
p.sort(function(t, e) {
return g[t] - g[e]
});
for (var i = [], t = [], a = [], d = [], c = [], y = 0; y < p.length; y++) {
s = p[y];
i[y] = u[s],
t[y] = h[s],
a[y] = c[s],
d[y] = d[s],
c[y] = f[s]
}
return {
current: i,
next: t,
stackedoncurrent: a,
stackedonnext: d,
status: c
}
},
ed = tt,
id = et,
nd = z,
od = g,
ad = [],
rd = [],
sd = [],
ld = kn.extend({
type: "ec-polyline",
shape: {
points: [],
smooth: 0,
smoothconstraint: !0,
smoothmonotone: null,
connectnulls: !1
},
style: {
fill: null,
stroke: "#000"
},
brush: js(kn.prototype.brush),
buildpath: function(t, e) {
var i = e.points,
n = 0,
o = i.length,
a = eu(i, e.smoothconstraint);
if (e.connectnulls) {
for (; o > 0 && ku(i[o - 1]); o--);
for (; n < o && ku(i[n]); n++);
}
for (; n < o;) n += pu(t, i, n, o, o, 1, a.min, a.max, e.smooth, e.smoothmonotone, e.connectnulls) + 1
}
}),
ud = kn.extend({
type: "ec-polygon",
shape: {
points: [],
stackedonpoints: [],
smooth: 0,
stackedonsmooth: 0,
smoothconstraint: !0,
smoothmonotone: null,
connectnulls: !1
},
brush: js(kn.prototype.brush),
buildpath: function(t, e) {
var i = e.points,
n = e.stackedonpoints,
o = 0,
a = i.length,
r = e.smoothmonotone,
s = eu(i, e.smoothconstraint),
l = eu(n, e.smoothconstraint);
if (e.connectnulls) {
for (; a > 0 && ku(i[a - 1]); a--);
for (; o < a && ku(i[o]); o++);
}
for (; o < a;) {
var u = pu(t, i, o, a, a, 1, s.min, s.max, e.smooth, r, e.connectnulls);
pu(t, n, o + u - 1, u, a, -1, l.min, l.max, e.stackedonsmooth, r, e.connectnulls),
o += u + 1,
t.closepath()
}
}
});
mr.extend({
type: "line",
init: function() {
var t = new zw,
e = new su;
this.group.add(e.group),
this._symboldraw = e,
this._linegroup = t
},
render: function(t, e, i) {
var n = t.coordinatesystem,
o = this.group,
a = t.getdata(),
s = t.getmodel("linestyle"),
l = t.getmodel("areastyle"),
u = a.maparray(a.getitemlayout),
h = "polar" === n.type,
c = this._coordsys,
d = this._symboldraw,
f = this._polyline,
p = this._polygon,
g = this._linegroup,
m = t.get("animation"),
v = !l.isempty(),
y = l.get("origin"),
x = vu(n, a, au(n, a, y)),
_ = t.get("showsymbol"),
w = _ && !h && uu(t, a, n),
b = this._data;
b && b.eachitemgraphicel(function(t, e) {
t.__temp && (o.remove(t), b.setitemgraphicel(e, null))
}),
_ || d.remove(),
o.add(g);
var s = !h && t.get("step");
f && c.type === n.type && s === this._step ? (v && !p ? p = this._newpolygon(u, x, n, m) : p && !v && (g.remove(p), p = this._polygon = null), g.setclippath(wu(n, !1, !1, t)), _ && d.updatedata(a, {
isignore: w,
clipshape: wu(n, !1, !0, t)
}), a.eachitemgraphicel(function(t) {
t.stopanimation(!0)
}), ru(this._stackedonpoints, x) && ru(this._points, u) || (m ? this._updateanimation(a, x, n, i, s, y) : (s && (u = hu(u, n, s), x = hu(x, n, s)), f.setshape({
points: u
}), p && p.setshape({
points: u,
stackedonpoints: x
})))) : (_ && d.updatedata(a, {
isignore: w,
clipshape: wu(n, !1, !0, t)
}), s && (u = hu(u, n, s), x = hu(x, n, s)), f = this._newpolyline(u, n, m), v && (p = this._newpolygon(u, x, n, m)), g.setclippath(wu(n, !0, !1, t)));
var m = zu(a, n) || a.getvisual("color");
f.usestyle(r(s.getlinestyle(), {
fill: "none",
stroke: m,
linejoin: "bevel"
}));
var i = t.get("smooth");
if (i = zu(t.get("smooth")), f.setshape({
smooth: i,
smoothmonotone: t.get("smoothmonotone"),
connectnulls: t.get("connectnulls")
}), p) {
var t = a.getcalculationinfo("stackedonseries"),
a = 0;
p.usestyle(r(l.getareastyle(), {
fill: m,
opacity: .7,
linejoin: "bevel"
})),
t && (a = zu(t.get("smooth"))),
p.setshape({
smooth: i,
stackedonsmooth: a,
smoothmonotone: t.get("smoothmonotone"),
connectnulls: t.get("connectnulls")
})
}
this._data = a,
this._coordsys = n,
this._stackedonpoints = x,
this._points = u,
this._step = s,
this._valueorigin = y
},
dispose: function() {},
highlight: function(t, e, i, n) {
var o = t.getdata(),
a = zi(o, n);
if (! (a instanceof array) && null != a && a >= 0) {
var r = o.getitemgraphicel(a);
if (!r) {
var s = o.getitemlayout(a);
if (!s) return; (r = new mu(o, a)).position = s,
r.setz(t.get("zlevel"), t.get("z")),
r.ignore = isnan(s[0]) || isnan(s[1]),
r.__temp = !0,
o.setitemgraphicel(a, r),
r.stopsymbolanimation(!0),
this.group.add(r)
}
r.highlight()
} else mr.prototype.highlight.call(this, t, e, i, n)
},
downplay: function(t, e, i, n) {
var o = t.getdata(),
a = zi(o, n);
if (null != a && a >= 0) {
var r = o.getitemgraphicel(a);
r && (r.__temp ? (o.setitemgraphicel(a, null), this.group.remove(r)) : r.downplay())
} else mr.prototype.downplay.call(this, t, e, i, n)
},
_newpolyline: function(t) {
var e = this._polyline;
return e && this._linegroup.remove(e),
e = new ld({
shape: {
points: t
},
silent: !0,
z2: 10
}),
this._linegroup.add(e),
this._polyline = e,
e
},
_newpolygon: function(t, e) {
var i = this._polygon;
return i && this._linegroup.remove(i),
i = new ud({
shape: {
points: t,
stackedonpoints: e
},
silent: !0
}),
this._linegroup.add(i),
this._polygon = i,
i
},
_updateanimation: function(t, e, i, n, o, a) {
var r = this._polyline,
s = this._polygon,
l = t.hostmodel,
u = td(this._data, t, this._stackedonpoints, e, this._coordsys, i, this._valueorigin, a),
h = u.current,
c = u.stackedoncurrent,
d = u.next,
f = u.stackedonnext;
o && (h = hu(u.current, i, o), c = hu(u.stackedoncurrent, i, o), d = hu(u.next, i, o), f = hu(u.stackedonnext, i, o)),
r.shape.__points = u.current,
r.shape.points = h,
bo(r, {
shape: {
points: d
}
},
l),
s && (s.setshape({
points: h,
stackedonpoints: c
}), bo(s, {
shape: {
points: d,
stackedonpoints: f
}
},
l));
for (var p = [], g = u.status, m = 0; m < g.length; m++) if ("=" === g[m].cmd) {
var v = t.getitemgraphicel(g[m].idx1);
v && p.push({
el: v,
ptidx: m
})
}
r.animators && r.animators.length && r.animators[0].during(function() {
for (var t = 0; t < p.length; t++) p[t].el.attr("position", r.shape.__points[p[t].ptidx])
})
},
remove: function(t) {
var e = this.group,
i = this._data;
this._linegroup.removeall(),
this._symboldraw.remove(!0),
i && i.eachitemgraphicel(function(t, n) {
t.__temp && (e.remove(t), i.setitemgraphicel(n, null))
}),
this._polyline = this._polygon = this._coordsys = this._points = this._stackedonpoints = this._data = null
}
});
var hd = function(t, e, i) {
return {
seriestype: t,
performrawseries: !0,
reset: function(t, n, o) {
var a = t.getdata(),
r = t.get("symbol") || e,
s = t.get("symbolsize"),
l = t.get("symbolkeepaspect");
if (a.setvisual({
legendsymbol: i || r,
symbol: r,
symbolsize: s,
symbolkeepaspect: l
}), !n.isseriesfiltered(t)) {
var u = "function" == typeof s;
return {
dataeach: a.hasitemoption || u ?
function(e, i) {
if ("function" == typeof s) {
var n = t.getrawvalue(i),
o = t.getdataparams(i);
e.setitemvisual(i, "symbolsize", s(n, o))
}
if (e.hasitemoption) {
var a = e.getitemmodel(i),
r = a.getshallow("symbol", !0),
l = a.getshallow("symbolsize", !0),
u = a.getshallow("symbolkeepaspect", !0);
null != r && e.setitemvisual(i, "symbol", r),
null != l && e.setitemvisual(i, "symbolsize", l),
null != u && e.setitemvisual(i, "symbolkeepaspect", u)
}
}: null
}
}
}
}
},
cd = function(t) {
return {
seriestype: t,
plan: zi(),
reset: function(t) {
var e = t.getdata(),
i = t.coordinatesystem,
n = t.pipelinecontext.large;
if (i) {
var o = f(i.dimensions,
function(t) {
return e.mapdimension(t)
}).slice(0, 2),
a = o.length,
r = e.getcalculationinfo("stackresultdimension");
return hl(e, o[0]) && (o[0] = r),
hl(e, o[1]) && (o[1] = r),
a && {
progress: function(t, e) {
for (var r = t.end - t.start,
s = n && new float32array(r * a), l = t.start, u = 0, h = [], c = []; l < t.end; l++) {
var d;
if (1 === a) f = e.get(o[0], l),
d = !isnan(f) && i.datatopoint(f, null, c);
else {
var f = h[0] = e.get(o[0], l),
p = h[1] = e.get(o[1], l);
d = !isnan(f) && !isnan(p) && i.datatopoint(h, null, c)
}
n ? (s[u++] = d ? d[0] : nan, s[u++] = d ? d[1] : nan) : e.setitemlayout(l, d && d.slice() || [nan, nan])
}
n && e.setlayout("symbolpoints", s)
}
}
}
}
}
},
dd = {
average: function(t) {
for (var e = 0,
i = 0,
n = 0; n < t.length; n++) isnan(t[n]) || (e += t[n], i++);
return 0 === i ? nan: e / i
},
sum: function(t) {
for (var e = 0,
i = 0; i < t.length; i++) e += t[i] || 0;
return e
},
max: function(t) {
for (var e = -1 / 0,
i = 0; i < t.length; i++) t[i] > e && (e = t[i]);
return isfinite(e) ? e: nan
},
min: function(t) {
for (var e = 1 / 0,
i = 0; i < t.length; i++) t[i] < e && (e = t[i]);
return isfinite(e) ? e: nan
},
nearest: function(t) {
return t[0]
}
},
fd = function(t, e) {
return math.round(t.length / 2)
},
pd = function(t) {
this._axes = {},
this._dimlist = [],
this.name = t || ""
};
pd.prototype = {
constructor: pd,
type: "cartesian",
getaxis: function(t) {
return this._axes[t]
},
getaxes: function() {
return f(this._dimlist, ju, this)
},
getaxesbyscale: function(t) {
return t = t.tolowercase(),
g(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 ? [] : {},
o = 0; o < i.length; o++) {
var a = i[o],
r = this._axes[a];
n[a] = r[e](t[a])
}
return n
}
},
yu.prototype = {
constructor: yu,
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"),
o = this.getaxis("y");
return i = i || [],
i[0] = n.toglobalcoord(n.datatocoord(t[0])),
i[1] = o.toglobalcoord(o.datatocoord(t[1])),
i
},
clampdata: function(t, e) {
var i = this.getaxis("x").scale,
n = this.getaxis("y").scale,
o = i.getextent(),
a = n.getextent(),
r = i.parse(t[0]),
s = n.parse(t[1]);
return e = e || [],
e[0] = math.min(math.max(math.min(o[0], o[1]), r), math.max(o[0], o[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(yu, pd);
var gd = function(t, e, i, n, o) {
ha.call(this, t, e, i),
this.type = n || "value",
this.position = o || "bottom"
};
gd.prototype = {
constructor: gd,
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(gd, ha);
var md = {
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)"]
}
}
},
vd = {};
vd.categoryaxis = n({
boundarygap: !0,
deduplication: null,
splitline: {
show: !1
},
axistick: {
alignwithlabel: !1,
interval: "auto"
},
axislabel: {
interval: "auto"
}
},
md),
vd.valueaxis = n({
boundarygap: [0, 0],
splitnumber: 5
},
md),
vd.timeaxis = r({
scale: !0,
min: "datamin",
max: "datamax"
},
vd.valueaxis),
vd.logaxis = r({
scale: !0,
logbase: 10
},
vd.valueaxis);
var yd = ["value", "category", "time", "log"],
xd = function(t, e, i, a) {
d(yd,
function(r) {
e.extend({
type: t + "axis." + r,
mergedefaultandtheme: function(e, o) {
var a = this.layoutmode,
s = a ? da(e) : {};
n(e, o.gettheme().get(r + "axis")),
n(e, this.getdefaultoption()),
e.type = i(t, e),
a && ca(e, s, a)
},
optionupdated: function() {
"category" === this.option.type && (this.__ordinalmeta = ml.createbyaxismodel(this))
},
getcategories: function(t) {
var e = this.option;
if ("category" === e.type) return t ? e.data: this.__ordinalmeta.categories
},
getordinalmeta: function() {
return this.__ordinalmeta
},
defaultoption: o([{},
vd[r + "axis"], a], !0)
})
}),
ym.registersubtypedefaulter(t + "axis", v(i, t))
},
_d = ym.extend({
type: "cartesian2daxis",
axis: null,
init: function() {
_d.superapply(this, "init", arguments),
this.resetrange()
},
mergeoption: function() {
_d.superapply(this, "mergeoption", arguments),
this.resetrange()
},
restoredata: function() {
_d.superapply(this, "restoredata", arguments),
this.resetrange()
},
getcoordsysmodel: function() {
return this.ecmodel.querycomponents({
maintype: "grid",
index: this.option.gridindex,
id: this.option.gridid
})[0]
}
});
n(_d.prototype, ca);
var wd = {
offset: 0
};
xd("x", _d, qu, wd),
xd("y", _d, qu, wd),
ym.extend({
type: "grid",
dependencies: ["xaxis", "yaxis"],
layoutmode: "box",
coordinatesystem: null,
defaultoption: {
show: !1,
zlevel: 0,
z: 0,
left: "10%",
top: 60,
right: "10%",
bottom: 60,
containlabel: !1,
backgroundcolor: "rgba(0,0,0,0)",
borderwidth: 1,
bordercolor: "#ccc"
}
});
var bd = $u.prototype;
bd.type = "grid",
bd.axispointerenabled = !0,
bd.getrect = function() {
return this._rect
},
bd.update = function(t, e) {
var i = this._axesmap;
this._updatescale(t, this.model),
d(i.x,
function(t) {
bl(t.scale, t.model)
}),
d(i.y,
function(t) {
bl(t.scale, t.model)
});
var n = {};
d(i.x,
function(t) {
ju(i, "y", t, n)
}),
d(i.y,
function(t) {
ju(i, "x", t, n)
}),
this.resize(this.model, e)
},
bd.resize = function(t, e, i) {
function n() {
d(a,
function(t) {
var e = t.ishorizontal(),
i = e ? [0, o.width] : [0, o.height],
n = t.inverse ? 1 : 0;
t.setextent(i[n], i[1 - n]),
th(t, e ? o.x: o.y)
})
}
var o = la(t.getboxlayoutparams(), {
width: e.getwidth(),
height: e.getheight()
});
this._rect = o;
var a = this._axeslist;
n(),
!i && t.get("containlabel") && (d(a,
function(t) {
if (!t.model.get("axislabel.inside")) {
var e = hl(t);
if (e) {
var i = t.ishorizontal() ? "height": "width",
n = t.model.get("axislabel.margin");
o[i] -= e[i] + n,
"top" === t.position ? o.y += e.height + n: "left" === t.position && (o.x += e.width + n)
}
}
}), n())
},
bd.getaxis = function(t, e) {
var i = this._axesmap[t];
if (null != i) {
if (null == e) for (var n in i) if (i.hasownproperty(n)) return i[n];
return i[e]
}
},
bd.getaxes = function() {
return this._axeslist.slice()
},
bd.getcartesian = function(t, e) {
if (null != t && null != e) {
var i = "x" + t + "y" + e;
return this._coordsmap[i]
}
w(t) && (e = t.yaxisindex, t = t.xaxisindex);
for (var n = 0,
o = this._coordslist; n < o.length; n++) if (o[n].getaxis("x").index === t || o[n].getaxis("y").index === e) return o[n]
},
bd.getcartesians = function() {
return this._coordslist.slice()
},
bd.converttopixel = function(t, e, i) {
var n = this._findconverttarget(t, e);
return n.cartesian ? n.cartesian.datatopoint(i) : n.axis ? n.axis.toglobalcoord(n.axis.datatocoord(i)) : null
},
bd.convertfrompixel = function(t, e, i) {
var n = this._findconverttarget(t, e);
return n.cartesian ? n.cartesian.pointtodata(i) : n.axis ? n.axis.coordtodata(n.axis.tolocalcoord(i)) : null
},
bd._findconverttarget = function(t, e) {
var i, n, o = e.seriesmodel,
a = e.xaxismodel || o && o.getreferringcomponents("xaxis")[0],
r = e.yaxismodel || o && o.getreferringcomponents("yaxis")[0],
s = e.gridmodel,
u = this._coordslist;
return o ? l(u, i = o.coordinatesystem) < 0 && (i = null) : a && r ? i = this.getcartesian(a.componentindex, r.componentindex) : a ? n = this.getaxis("x", a.componentindex) : r ? n = this.getaxis("y", r.componentindex) : s && s.coordinatesystem === this && (i = this._coordslist[0]),
{
cartesian: i,
axis: n
}
},
bd.containpoint = function(t) {
var e = this._coordslist[0];
if (e) return e.containpoint(t)
},
bd._initcartesian = function(t, e, i) {
function n(i) {
return function(n, s) {
if (ku(n, t, e)) {
var l = n.get("position");
"x" === i ? "top" !== l && "bottom" !== l && o[l = "bottom"] && (l = "top" === l ? "bottom": "top") : "left" !== l && "right" !== l && o[l = "left"] && (l = "left" === l ? "right": "left"),
o[l] = !0;
var u = new gd(i, vl(n), [0, 0], n.get("type"), l),
h = "category" === u.type;
u.onband = h && n.get("boundarygap"),
u.inverse = n.get("inverse"),
n.axis = u,
u.model = n,
u.grid = this,
u.index = s,
this._axeslist.push(u),
a[i][s] = u,
r[i]++
}
}
}
var o = {
left: !1,
right: !1,
top: !1,
bottom: !1
},
a = {
x: {},
y: {}
},
r = {
x: 0,
y: 0
};
if (e.eachcomponent("xaxis", n("x"), this), e.eachcomponent("yaxis", n("y"), this), !r.x || !r.y) return this._axesmap = {},
void(this._axeslist = []);
this._axesmap = a,
d(a.x,
function(e, i) {
d(a.y,
function(n, o) {
var a = "x" + i + "y" + o,
r = new yu(a);
r.grid = this,
r.model = t,
this._coordsmap[a] = r,
this._coordslist.push(r),
r.addaxis(e),
r.addaxis(n)
},
this)
},
this)
},
bd._updatescale = function(t, e) {
function i(t, e, i) {
d(t.mapdimension(e.dim, !0),
function(i) {
e.scale.unionextentfromdata(t, cl(t, i))
})
}
d(this._axeslist,
function(t) {
t.scale.setextent(1 / 0, -1 / 0)
}),
t.eachseries(function(n) {
if (ih(n)) {
var o = eh(n),
a = o[0],
r = o[1];
if (!ku(a, e, t) || !ku(r, e, t)) return;
var s = this.getcartesian(a.componentindex, r.componentindex),
l = n.getdata(),
u = s.getaxis("x"),
h = s.getaxis("y");
"list" === l.type && (i(l, u), i(l, h))
}
},
this)
},
bd.gettooltipaxes = function(t) {
var e = [],
i = [];
return d(this.getcartesians(),
function(n) {
var o = null != t && "auto" !== t ? n.getaxis(t) : n.getbaseaxis(),
a = n.getotheraxis(o);
l(e, o) < 0 && e.push(o),
l(i, a) < 0 && i.push(a)
}),
{
baseaxes: e,
otheraxes: i
}
};
var sd = ["xaxis", "yaxis"];
$u.create = function(t, e) {
var i = [];
return t.eachcomponent("grid",
function(n, o) {
var a = new $u(n, t, e);
a.name = "grid_" + o,
a.resize(n, e, !0),
n.coordinatesystem = a,
i.push(a)
}),
t.eachseries(function(t) {
if (ih(t)) {
var e = eh(t),
i = e[0],
n = e[1],
o = i.getcoordsysmodel().coordinatesystem;
t.coordinatesystem = o.getcartesian(i.componentindex, n.componentindex)
}
}),
i
},
$u.dimensions = $u.prototype.dimensions = yu.prototype.dimensions,
ba.register("cartesian2d", $u);
var md = math.pi,
id = function(t, e) {
this.opt = e,
this.axismodel = t,
r(e, {
labeloffset: 0,
namedirection: 1,
tickdirection: 1,
labeldirection: 1,
silent: !0
}),
this.group = new zw;
var i = new zw({
position: e.position.slice(),
rotation: e.rotation
});
i.updatetransform(),
this._transform = i.transform,
this._dumbgroup = i
};
id.prototype = {
constructor: id,
hasbuilder: function(t) {
return !! td[t]
},
add: function(t) {
td[t].call(this)
},
getgroup: function() {
return this.group
}
};
var td = {
axisline: function() {
var t = this.opt,
e = this.axismodel;
if (e.get("axisline.show")) {
var i = this.axismodel.axis.getextent(),
n = this._transform,
o = [i[0], 0],
r = [i[1], 0];
n && (q(o, o, n), q(r, r, n));
var s = a({
linecap: "round"
},
e.getmodel("axisline.linestyle").getlinestyle());
this.group.add(new rm(xn({
anid: "line",
shape: {
x1: o[0],
y1: o[1],
x2: r[0],
y2: r[1]
},
style: s,
strokecontainthreshold: t.strokecontainthreshold || 5,
silent: !0,
z2: 1
})));
var l = e.get("axisline.symbol"),
u = e.get("axisline.symbolsize"),
h = e.get("axisline.symboloffset") || 0;
if ("number" == typeof h && (h = [h, h]), null != l) {
"string" == typeof l && (l = [l, l]),
"string" != typeof u && "number" != typeof u || (u = [u, u]);
var c = u[0],
f = u[1];
d([{
rotate: t.rotation + math.pi / 2,
offset: h[0],
r: 0
},
{
rotate: t.rotation - math.pi / 2,
offset: h[1],
r: math.sqrt((o[0] - r[0]) * (o[0] - r[0]) + (o[1] - r[1]) * (o[1] - r[1]))
}],
function(e, i) {
if ("none" !== l[i] && null != l[i]) {
var n = xl(l[i], -c / 2, -f / 2, c, f, s.stroke, !0),
a = e.r + e.offset,
r = [o[0] + a * math.cos(t.rotation), o[1] - a * math.sin(t.rotation)];
n.attr({
rotation: e.rotate,
position: r,
silent: !0
}),
this.group.add(n)
}
},
this)
}
}
},
axisticklabel: function() {
var t = this.axismodel,
e = this.opt,
i = hh(this, t, e);
rh(t, ch(this, t, e), i)
},
axisname: function() {
var t = this.opt,
e = this.axismodel,
i = t(t.axisname, e.get("name"));
if (i) {
var n, o = e.get("namelocation"),
r = t.namedirection,
s = e.getmodel("nametextstyle"),
l = e.get("namegap") || 0,
u = this.axismodel.axis.getextent(),
h = u[0] > u[1] ? -1 : 1,
c = ["start" === o ? u[0] - h * l: "end" === o ? u[1] + h * l: (u[0] + u[1]) / 2, uh(o) ? t.labeloffset + r * l: 0],
d = e.get("namerotate");
null != d && (d = d * md / 180);
var f;
uh(o) ? n = ad(t.rotation, null != d ? d: t.rotation, r) : (n = oh(t, o, d || 0, u), null != (f = t.axisnameavailablewidth) && (f = math.abs(f / math.sin(n.rotation)), !isfinite(f) && (f = null)));
var p = s.getfont(),
g = e.get("nametruncate", !0) || {},
m = g.ellipsis,
v = t(t.nametruncatemaxwidth, g.maxwidth, f),
y = null != m && null != v ? vm(i, v, p, m, {
minchar: 2,
placeholder: g.placeholder
}) : i,
x = e.get("tooltip", !0),
_ = e.maintype,
w = {
componenttype: _,
name: i,
$vars: ["name"]
};
w[_ + "index"] = e.componentindex;
var b = new qs({
anid: "name",
__fulltext: i,
__truncatedtext: y,
position: c,
rotation: n.rotation,
silent: ah(e),
z2: 1,
tooltip: x && x.show ? a({
content: i,
formatter: function() {
return i
},
formatterparams: w
},
x) : null
});
fo(b.style, s, {
text: y,
textfont: p,
textfill: s.gettextcolor() || e.get("axisline.linestyle.color"),
textalign: n.textalign,
textverticalalign: n.textverticalalign
}),
e.get("triggerevent") && (b.eventdata = nh(e), b.eventdata.targettype = "axisname", b.eventdata.name = i),
this._dumbgroup.add(b),
b.updatetransform(),
this.group.add(b),
b.decomposetransform()
}
}
},
ad = id.innertextlayout = function(t, e, i) {
var n, o, a = ho(e - t);
return zo(a) ? (o = i > 0 ? "top": "bottom", n = "center") : zo(a - md) ? (o = i > 0 ? "bottom": "top", n = "center") : (o = "middle", n = a > 0 && a < md ? i > 0 ? "right": "left": i > 0 ? "left": "right"),
{
rotation: a,
textalign: n,
textverticalalign: o
}
},
dd = d,
cd = v,
ld = vs({
type: "axis",
_axispointer: null,
axispointerclass: null,
render: function(t, e, i, n) {
this.axispointerclass && yh(t),
ld.superapply(this, "render", arguments),
sh(this, t, 0, i, 0, !0)
},
updateaxispointer: function(t, e, i, n, o) {
sh(this, t, 0, i, 0, !1)
},
remove: function(t, e) {
var i = this._axispointer;
i && i.remove(e),
ld.superapply(this, "remove", arguments)
},
dispose: function(t, e) {
mh(this, e),
ld.superapply(this, "dispose", arguments)
}
}),
kd = [];
ld.registeraxispointerclass = function(t, e) {
kd[t] = e
},
ld.getaxispointerclass = function(t) {
return t && kd[t]
};
var pd = ["axisline", "axisticklabel", "axisname"],
nd = ["splitarea", "splitline"],
od = ld.extend({
type: "cartesianaxis",
axispointerclass: "cartesianaxispointer",
render: function(t, e, i, n) {
this.group.removeall();
var o = this._axisgroup;
if (this._axisgroup = new zw, this.group.add(this._axisgroup), t.get("show")) {
var a = t.getcoordsysmodel(),
r = ih(a, t),
s = new id(t, r);
d(pd, s.add, s),
this._axisgroup.add(s.getgroup()),
d(nd,
function(e) {
t.get(e + ".show") && this["_" + e](t, a)
},
this),
ao(o, this._axisgroup, t),
od.supercall(this, "render", t, e, i, n)
}
},
remove: function() {
this._splitareacolors = null
},
_splitline: function(t, e) {
var i = t.axis;
if (!i.scale.isblank()) {
var n = t.getmodel("splitline"),
o = n.getmodel("linestyle"),
a = o.get("color");
a = y(a) ? a: [a];
for (var s = e.coordinatesystem.getrect(), l = i.ishorizontal(), u = 0, h = i.gettickscoords({
tickmodel: n
}), c = [], d = [], f = o.getlinestyle(), p = 0; p < h.length; p++) {
var g = i.toglobalcoord(h[p].coord);
l ? (c[0] = g, c[1] = s.y, d[0] = g, d[1] = s.y + s.height) : (c[0] = s.x, c[1] = g, d[0] = s.x + s.width, d[1] = g);
var m = u++%a.length,
v = h[p].tickvalue;
this._axisgroup.add(new rm(xn({
anid: null != v ? "line_" + h[p].tickvalue: null,
shape: {
x1: c[0],
y1: c[1],
x2: d[0],
y2: d[1]
},
style: r({
stroke: a[m]
},
f),
silent: !0
})))
}
}
},
_splitarea: function(t, e) {
var i = t.axis;
if (!i.scale.isblank()) {
var n = t.getmodel("splitarea"),
o = n.getmodel("areastyle"),
a = o.get("color"),
s = e.coordinatesystem.getrect(),
l = i.gettickscoords({
tickmodel: n,
clamp: !0
});
if (l.length) {
var u = a.length,
h = this._splitareacolors,
c = r(),
d = 0;
if (h) for (m = 0; m < l.length; m++) {
var f = h.get(l[m].tickvalue);
if (null != f) {
d = (f + (u - 1) * m) % u;
break
}
}
var p = i.toglobalcoord(l[0].coord),
g = o.getareastyle();
a = y(a) ? a: [a];
for (var m = 1; m < l.length; m++) {
var v, x, _, w, b = i.toglobalcoord(l[m].coord);
i.ishorizontal() ? (v = p, x = s.y, _ = b - v, w = s.height, p = v + _) : (v = s.x, x = p, _ = s.width, p = x + (w = b - x));
var s = l[m - 1].tickvalue;
null != s && c.set(s, d),
this._axisgroup.add(new am({
anid: null != s ? "area_" + s: null,
shape: {
x: v,
y: x,
width: _,
height: w
},
style: r({
fill: a[d]
},
g),
silent: !0
})),
d = (d + 1) % u
}
this._splitareacolors = c
}
}
}
});
od.extend({
type: "xaxis"
}),
od.extend({
type: "yaxis"
}),
vs({
type: "grid",
render: function(t, e) {
this.group.removeall(),
t.get("show") && this.group.add(new am({
shape: t.coordinatesystem.getrect(),
style: r({
fill: t.get("backgroundcolor")
},
t.getitemstyle()),
silent: !0,
z2: -1
}))
}
}),
ls(function(t) {
t.xaxis && t.yaxis && !t.grid && (t.grid = {})
}),
es(hd("line", "circle", "line")),
os(cd("line")),
ks(it.processor.statistic,
function(t) {
return {
seriestype: t,
modifyoutputend: !0,
reset: function(t, e, i) {
var n = t.getdata(),
o = t.get("sampling"),
a = t.coordinatesystem;
if ("cartesian2d" === a.type && o) {
var r = a.getbaseaxis(),
s = a.getotheraxis(r),
l = r.getextent(),
u = l[1] - l[0],
h = math.round(n.count() / u);
if (h > 1) {
var c;
"string" == typeof o ? c = dd[o] : "function" == typeof o && (c = o),
c && t.setdata(n.downsample(n.mapdimension(s.dim), 1 / h, c, fd))
}
}
}
}
} ("line"));
var ed = oi.extend({
type: "series.__base_bar__",
getinitialdata: function(t, e) {
return dl(this.getsource(), this)
},
getmarkerposition: function(t) {
var e = this.coordinatesystem;
if (e) {
var i = e.datatopoint(e.clampdata(t)),
n = this.getdata(),
o = n.getlayout("offset"),
a = n.getlayout("size");
return i[e.getbaseaxis().ishorizontal() ? 0 : 1] += o + a / 2,
i
}
return [nan, nan]
},
defaultoption: {
zlevel: 0,
z: 2,
coordinatesystem: "cartesian2d",
legendhoverlink: !0,
barminheight: 0,
barminangle: 0,
large: !1,
largethreshold: 400,
progressive: 3e3,
progressivechunkmode: "mod",
itemstyle: {},
emphasis: {}
}
});
ed.extend({
type: "series.bar",
dependencies: ["grid", "polar"],
brushselector: "rect",
getprogressive: function() {
return !! this.get("large") && this.get("progressive")
},
getprogressivethreshold: function() {
var t = this.get("progressivethreshold"),
e = this.get("largethreshold");
return e > t && (t = e),
t
}
});
var rd = wb([["fill", "color"], ["stroke", "bordercolor"], ["linewidth", "borderwidth"], ["stroke", "barbordercolor"], ["linewidth", "barborderwidth"], ["opacity"], ["shadowblur"], ["shadowoffsetx"], ["shadowoffsety"], ["shadowcolor"]]),
zd = {
getbaritemstyle: function(t) {
var e = rd(this, t);
if (this.getborderlinedash) {
var i = this.getborderlinedash();
i && (e.linedash = i)
}
return e
}
},
bd = ["itemstyle", "barborderwidth"];
a(lo.prototype, zd),
fs({
type: "bar",
render: function(t, e, i) {
this._updatedrawmode(t);
var n = t.get("coordinatesystem");
return "cartesian2d" !== n && "polar" !== n || (this._islargedraw ? this._renderlarge(t, e, i) : this._rendernormal(t, e, i)),
this.group
},
incrementalpreparerender: function(t, e, i) {
this._clear(),
this._updatedrawmode(t)
},
incrementalrender: function(t, e, i, n) {
this._incrementalrenderlarge(t, e)
},
_updatedrawmode: function(t) {
var e = t.pipelinecontext.large; (null == this._islargedraw || e ^ this._islargedraw) && (this._islargedraw = e, this._clear())
},
_rendernormal: function(t, e, i) {
var n, o = this.group,
a = t.getdata(),
r = this._data,
s = t.coordinatesystem,
l = s.getbaseaxis();
"cartesian2d" === s.type ? n = l.ishorizontal() : "polar" === s.type && (n = "angle" === l.dim);
var u = t.isanimationenabled() ? t: null;
a.diff(r).add(function(e) {
if (a.hasvalue(e)) {
var i = a.getitemmodel(e),
r = gd[s.type](a, e, i),
l = vd[s.type](a, e, i, r, n, u);
a.setitemgraphicel(e, l),
o.add(l),
lh(l, a, e, i, r, t, n, "polar" === s.type)
}
}).update(function(e, i) {
var l = r.getitemgraphicel(i);
if (a.hasvalue(e)) {
var h = a.getitemmodel(e),
c = gd[s.type](a, e, h);
l ? bo(l, {
shape: c
},
u, e) : l = vd[s.type](a, e, h, c, n, u, !0),
a.setitemgraphicel(e, l),
o.add(l),
lh(l, a, e, h, c, t, n, "polar" === s.type)
} else o.remove(l)
}).remove(function(t) {
var e = r.getitemgraphicel(t);
"cartesian2d" === s.type ? e && dh(t, u, e) : e && ch(t, u, e)
}).execute(),
this._data = a
},
_renderlarge: function(t, e, i) {
this._clear(),
ph(t, this.group)
},
_incrementalrenderlarge: function(t, e) {
ph(e, this.group, !0)
},
dispose: b,
remove: function(t) {
this._clear(t)
},
_clear: function(t) {
var e = this.group,
i = this._data;
t && t.get("animation") && i && !this._islargedraw ? i.eachitemgraphicel(function(e) {
"sector" === e.type ? ch(e.dataindex, t, e) : dh(e.dataindex, t, e)
}) : e.removeall(),
this._data = null
}
});
var vd = {
cartesian2d: function(t, e, i, n, o, r, s) {
var l = new am({
shape: a({},
n)
});
if (r) {
var u = l.shape,
h = o ? "height": "width",
c = {};
u[h] = 0,
c[h] = n[h],
bm[s ? "updateprops": "initprops"](l, {
shape: c
},
r, e)
}
return l
},
polar: function(t, e, i, n, o, a, s) {
var l = n.startangle < n.endangle,
u = new qs({
shape: r({
clockwise: l
},
n)
});
if (a) {
var h = u.shape,
c = o ? "r": "endangle",
d = {};
h[c] = o ? 0 : n.startangle,
d[c] = n[c],
bm[s ? "updateprops": "initprops"](u, {
shape: d
},
a, e)
}
return u
}
},
gd = {
cartesian2d: function(t, e, i) {
var n = t.getitemlayout(e),
o = kh(i, n),
a = n.width > 0 ? 1 : -1,
r = n.height > 0 ? 1 : -1;
return {
x: n.x + a * o / 2,
y: n.y + r * o / 2,
width: n.width - a * o,
height: n.height - r * o
}
},
polar: function(t, e, i) {
var n = t.getitemlayout(e);
return {
cx: n.cx,
cy: n.cy,
r0: n.r0,
r: n.r,
startangle: n.startangle,
endangle: n.endangle
}
}
},
fd = kn.extend({
type: "largebar",
shape: {
points: []
},
buildpath: function(t, e) {
for (var i = e.points,
n = this.__startpoint,
o = this.__valueidx,
a = 0; a < i.length; a += 2) n[this.__valueidx] = i[a + o],
t.moveto(n[0], n[1]),
t.lineto(i[a], i[a + 1])
}
});
os(v(kl, "bar")),
os(fa),
es({
seriestype: "bar",
reset: function(t) {
t.getdata().setvisual("legendsymbol", "roundrect")
}
});
var wd = function(t, e, i) {
e = y(e) && {
coorddimensions: e
} || a({},
e);
var n = t.getsource(),
o = oa(n, e),
r = new ea(o, t);
return r.initdata(n, i),
r
},
hd = {
updateselectedmap: function(t) {
this._targetlist = y(t) ? t.slice() : [],
this._selecttargetmap = p(t || [],
function(t, e) {
return t.set(e.name, e),
t
},
r())
},
select: function(t, e) {
var i = null != e ? this._targetlist[e] : this._selecttargetmap.get(t);
"single" === this.get("selectedmode") && 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);
if (null != i) return this[i.selected ? "unselect": "select"](t, e),
i.selected
},
isselected: function(t, e) {
var i = null != e ? this._targetlist[e] : this._selecttargetmap.get(t);
return i && i.selected
}
},
zd = gs({
type: "series.pie",
init: function(t) {
zd.superapply(this, "init", arguments),
this.legenddataprovider = function() {
return this.getrawdata()
},
this.updateselectedmap(this._createselectablelist()),
this._defaultlabelline(t)
},
mergeoption: function(t) {
zd.supercall(this, "mergeoption", t),
this.updateselectedmap(this._createselectablelist())
},
getinitialdata: function(t, e) {
return wd(this, ["value"])
},
_createselectablelist: function() {
for (var t = this.getrawdata(), e = t.mapdimension("value"), i = [], n = 0, o = t.count(); n < o; n++) i.push({
name: t.getname(n),
value: t.get(e, n),
selected: cr(t, n, "selected")
});
return i
},
getdataparams: function(t) {
var e = this.getdata(),
i = zd.supercall(this, "getdataparams", t),
n = [];
return e.each(e.mapdimension("value"),
function(t) {
n.push(t)
}),
i.percent = wo(n, t, e.hostmodel.get("percentprecision")),
i.$vars.push("percent"),
i
},
_defaultlabelline: function(t) {
ci(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"
}
});
h(zd, hd);
var ud = rh.prototype;
ud.updatedata = function(t, e, i) {
function n() {
s.stopanimation(!0),
s.animateto({
shape: {
r: h.r + l.get("hoveroffset")
}
},
300, "elasticout")
}
function o() {
s.stopanimation(!0),
s.animateto({
shape: {
r: h.r
}
},
300, "elasticout")
}
var s = this.childat(0),
l = t.hostmodel,
u = t.getitemmodel(e),
h = t.getitemlayout(e),
c = a({},
h);
c.label = null,
i ? (s.setshape(c), "scale" === l.getshallow("animationtype") ? (s.shape.r = h.r0, so(s, {
shape: {
r: h.r
}
},
l, e)) : (s.shape.endangle = h.startangle, bo(s, {
shape: {
endangle: h.endangle
}
},
l, e))) : bo(s, {
shape: c
},
l, e);
var d = t.getitemvisual(e, "color");
s.usestyle(r({
linejoin: "bevel",
fill: d
},
u.getmodel("itemstyle").getitemstyle())),
s.hoverstyle = u.getmodel("emphasis.itemstyle").getitemstyle();
var f = u.getshallow("cursor");
f && s.attr("cursor", f),
eh(this, t.getitemlayout(e), l.isselected(null, e), l.get("selectedoffset"), l.get("animation")),
s.off("mouseover").off("mouseout").off("emphasis").off("normal"),
u.get("hoveranimation") && l.isanimationenabled() && s.on("mouseover", n).on("mouseout", o).on("emphasis", n).on("normal", o),
this._updatelabel(t, e),
uo(this)
},
ud._updatelabel = function(t, e) {
var i = this.childat(1),
n = this.childat(2),
o = t.hostmodel,
a = t.getitemmodel(e),
r = t.getitemlayout(e).label,
s = t.getitemvisual(e, "color");
bo(i, {
shape: {
points: r.linepoints || [[r.x, r.y], [r.x, r.y], [r.x, r.y]]
}
},
o, e),
bo(n, {
style: {
x: r.x,
y: r.y
}
},
o, e),
n.attr({
rotation: r.rotation,
origin: [r.x, r.y],
z2: 10
});
var l = a.getmodel("label"),
u = a.getmodel("emphasis.label"),
h = a.getmodel("labelline"),
c = a.getmodel("emphasis.labelline"),
s = t.getitemvisual(e, "color");
co(n.style, n.hoverstyle = {},
l, u, {
labelfetcher: t.hostmodel,
labeldataindex: e,
defaulttext: t.getname(e),
autocolor: s,
useinsidestyle: !!r.inside
},
{
textalign: r.textalign,
textverticalalign: r.verticalalign,
opacity: t.getitemvisual(e, "opacity")
}),
n.ignore = n.normalignore = !l.get("show"),
n.hoverignore = !u.get("show"),
i.ignore = i.normalignore = !h.get("show"),
i.hoverignore = !c.get("show"),
i.setstyle({
stroke: s,
opacity: t.getitemvisual(e, "opacity")
}),
i.setstyle(h.getmodel("linestyle").getlinestyle()),
i.hoverstyle = c.getmodel("linestyle").getlinestyle();
var d = h.get("smooth");
d && !0 === d && (d = .4),
i.setshape({
smooth: d
})
},
u(rh, zw);
mr.extend({
type: "pie",
init: function() {
var t = new zw;
this._sectorgroup = t
},
render: function(t, e, i, n) {
if (!n || n.from !== this.uid) {
var o = t.getdata(),
a = this._data,
r = this.group,
s = e.get("animation"),
l = !a,
u = t.get("animationtype"),
h = v(oh, this.uid, t, s, i),
c = t.get("selectedmode");
if (o.diff(a).add(function(t) {
var e = new rh(o, t);
l && "scale" !== u && e.eachchild(function(t) {
t.stopanimation(!0)
}),
c && e.on("click", h),
o.setitemgraphicel(t, e),
r.add(e)
}).update(function(t, e) {
var i = a.getitemgraphicel(e);
i.updatedata(o, t),
i.off("click"),
c && i.on("click", h),
r.add(i),
o.setitemgraphicel(t, i)
}).remove(function(t) {
var e = a.getitemgraphicel(t);
r.remove(e)
}).execute(), s && l && o.count() > 0 && "scale" !== u) {
var d = o.getitemlayout(0),
f = math.max(i.getwidth(), i.getheight()) / 2,
p = m(r.removeclippath, r);
r.setclippath(this._createclippath(d.cx, d.cy, f, d.startangle, d.clockwise, p, t))
} else r.removeclippath();
this._data = o
}
},
dispose: function() {},
_createclippath: function(t, e, i, n, o, a, r) {
var s = new qs({
shape: {
cx: t,
cy: e,
r0: 0,
r: i,
startangle: n,
endangle: n,
clockwise: o
}
});
return so(s, {
shape: {
endangle: n + (o ? 1 : -1) * math.pi * 2
}
},
r, a),
s
},
containpoint: function(t, e) {
var i = e.getdata().getitemlayout(0);
if (i) {
var n = t[0] - i.cx,
o = t[1] - i.cy,
a = math.sqrt(n * n + o * o);
return a <= i.r && a >= i.r0
}
}
});
var xd = function(t, e) {
d(e,
function(e) {
e.update = "updateview",
ps(e,
function(i, n) {
var o = {};
return n.eachcomponent({
maintype: "series",
subtype: t,
query: i
},
function(t) {
t[e.method] && t[e.method](i.name, i.dataindex);
var n = t.getdata();
n.each(function(e) {
var i = n.getname(e);
o[i] = t.isselected(i) || !1
})
}),
{
name: i.name,
selected: o
}
})
})
},
jd = function(t) {
return {
gettargetseries: function(e) {
var i = {},
n = r();
return e.eachseriesbytype(t,
function(t) {
t.__palettescope = i,
n.set(t.uid, t)
}),
n
},
reset: function(t, e) {
var i = t.getrawdata(),
n = {},
o = t.getdata();
o.each(function(t) {
var e = o.getrawindex(t);
n[e] = t
}),
i.each(function(e) {
var a = n[e],
r = null != a && o.getitemvisual(a, "color", !0);
if (r) i.setitemvisual(e, "color", r);
else {
var s = i.getitemmodel(e).get("itemstyle.color") || t.getcolorfrompalette(i.getname(e) || e + "", t.__palettescope, i.count());
i.setitemvisual(e, "color", s),
null != a && o.setitemvisual(a, "color", s)
}
})
}
}
},
yd = function(t, e, i, n) {
var o, a, r = t.getdata(),
s = [],
l = !1;
r.each(function(i) {
var n, u, h, c, d = r.getitemlayout(i),
f = r.getitemmodel(i),
p = f.getmodel("label"),
g = p.get("position") || f.get("emphasis.label.position"),
m = f.getmodel("labelline"),
v = m.get("length"),
y = m.get("length2"),
x = (d.startangle + d.endangle) / 2,
_ = math.cos(x),
w = math.sin(x);
o = d.cx,
a = d.cy;
var b = "inside" === g || "inner" === g;
if ("center" === g) n = d.cx,
u = d.cy,
c = "center";
else {
var s = (b ? (d.r + d.r0) / 2 * _: d.r * _) + o,
m = (b ? (d.r + d.r0) / 2 * w: d.r * w) + a;
if (n = s + 3 * _, u = m + 3 * w, !b) {
var i = s + _ * (v + e - d.r),
t = m + w * (v + e - d.r),
a = i + (_ < 0 ? -1 : 1) * y,
d = t;
n = a + (_ < 0 ? -5 : 5),
u = d,
h = [[s, m], [i, t], [a, d]]
}
c = b ? "center": _ > 0 ? "left": "right"
}
var c = p.getfont(),
l = p.get("rotate") ? _ < 0 ? -x + math.pi: -x: 0,
k = de(t.getformattedlabel(i, "normal") || r.getname(i), c, c, "top");
l = !!l,
d.label = {
x: n,
y: u,
position: g,
height: k.height,
len: v,
len2: y,
linepoints: h,
textalign: c,
verticalalign: "middle",
rotation: l,
inside: b
},
b || s.push(d.label)
}),
!l && t.get("avoidlabeloverlap") && bh(s, o, a, e, i, n)
},
qd = 2 * math.pi,
kd = math.pi / 180,
$d = function(t) {
return {
seriestype: t,
reset: function(t, e) {
var i = e.findcomponents({
maintype: "legend"
});
if (i && i.length) {
var n = t.getdata();
n.filterself(function(t) {
for (var e = n.getname(t), o = 0; o < i.length; o++) if (!i[o].isselected(e)) return ! 1;
return ! 0
})
}
}
}
};
xd("pie", [{
type: "pietoggleselect",
event: "pieselectchanged",
method: "toggleselected"
},
{
type: "pieselect",
event: "pieselected",
method: "select"
},
{
type: "pieunselect",
event: "pieunselected",
method: "unselect"
}]),
es(jd("pie")),
os(v(function(t, e, i, n) {
e.eachseriesbytype(t,
function(t) {
var e = t.getdata(),
n = e.mapdimension("value"),
o = t.get("center"),
a = t.get("radius");
y(a) || (a = [0, a]),
y(o) || (o = [o, o]);
var r = i.getwidth(),
s = i.getheight(),
l = math.min(r, s),
u = ro(o[0], r),
h = ro(o[1], s),
c = ro(a[0], l / 2),
d = ro(a[1], l / 2),
f = -t.get("startangle") * kd,
p = t.get("minangle") * kd,
g = 0;
e.each(n,
function(t) { ! isnan(t) && g++
});
var m = e.getsum(n),
v = math.pi / (m || g) * 2,
x = t.get("clockwise"),
_ = t.get("rosetype"),
w = t.get("stillshowzerosum"),
b = e.getdataextent(n);
b[0] = 0;
var s = qd,
m = 0,
i = f,
t = x ? 1 : -1;
if (e.each(n,
function(t, i) {
var n;
if (isnan(t)) e.setitemlayout(i, {
angle: nan,
startangle: nan,
endangle: nan,
clockwise: x,
cx: u,
cy: h,
r0: c,
r: _ ? nan: d
});
else { (n = "area" !== _ ? 0 === m && w ? v: t * v: qd / g) < p ? (n = p, s -= p) : m += t;
var o = i + t * n;
e.setitemlayout(i, {
angle: n,
startangle: i,
endangle: o,
clockwise: x,
cx: u,
cy: h,
r0: c,
r: _ ? eo(t, b, [c, d]) : d
}),
i = o
}
}), s < qd && g) if (s <= .001) {
var a = qd / g;
e.each(n,
function(t, i) {
if (!isnan(t)) {
var n = e.getitemlayout(i);
n.angle = a,
n.startangle = f + t * i * a,
n.endangle = f + t * (i + 1) * a
}
})
} else v = s / m,
i = f,
e.each(n,
function(t, i) {
if (!isnan(t)) {
var n = e.getitemlayout(i),
o = n.angle === p ? p: t * v;
n.startangle = i,
n.endangle = i + t * o,
i += t * o
}
});
yd(t, d, r, s)
})
},
"pie")),
ks($d("pie")),
oi.extend({
type: "series.scatter",
dependencies: ["grid", "polar", "geo", "singleaxis", "calendar"],
getinitialdata: function(t, e) {
return dl(this.getsource(), this)
},
brushselector: "point",
getprogressive: function() {
var t = this.option.progressive;
return null == t ? this.option.large ? 5e3: this.get("progressive") : t
},
getprogressivethreshold: function() {
var t = this.option.progressivethreshold;
return null == t ? this.option.large ? 1e4: this.get("progressivethreshold") : t
},
defaultoption: {
coordinatesystem: "cartesian2d",
zlevel: 0,
z: 2,
legendhoverlink: !0,
hoveranimation: !0,
symbolsize: 10,
large: !1,
largethreshold: 2e3,
itemstyle: {
opacity: .8
}
}
});
var jd = fn({
shape: {
points: null
},
symbolproxy: null,
buildpath: function(t, e) {
var i = e.points,
n = e.size,
o = this.symbolproxy,
a = o.shape;
if (! ((t.getcontext ? t.getcontext() : t) && n[0] < 4)) for (var r = 0; r < i.length;) {
var s = i[r++],
l = i[r++];
isnan(s) || isnan(l) || (a.x = s - n[0] / 2, a.y = l - n[1] / 2, a.width = n[0], a.height = n[1], o.buildpath(t, a, !0))
}
},
afterbrush: function(t) {
var e = this.shape,
i = e.points,
n = e.size;
if (n[0] < 4) {
this.settransform(t);
for (var o = 0; o < i.length;) {
var a = i[o++],
r = i[o++];
isnan(a) || isnan(r) || t.fillrect(a - n[0] / 2, r - n[1] / 2, n[0], n[1])
}
this.restoretransform(t)
}
},
finddataindex: function(t, e) {
for (var i = this.shape,
n = i.points,
o = i.size,
a = math.max(o[0], 4), r = math.max(o[1], 4), s = n.length / 2 - 1; s >= 0; s--) {
var l = 2 * s,
u = n[l] - a / 2,
h = n[l + 1] - r / 2;
if (t >= u && e >= h && t <= u + a && e <= h + r) return s
}
return - 1
}
}),
qd = vh.prototype;
qd.ispersistent = function() {
return ! this._incremental
},
qd.updatedata = function(t) {
this.group.removeall();
var e = new jd({
recthover: !0,
cursor: "default"
});
e.setshape({
points: t.getlayout("symbolpoints")
}),
this._setcommon(e, t),
this.group.add(e),
this._incremental = null
},
qd.updatelayout = function(t) {
if (!this._incremental) {
var e = t.getlayout("symbolpoints");
this.group.eachchild(function(t) {
if (null != t.startindex) {
var i = 2 * (t.endindex - t.startindex),
n = 4 * t.startindex * 2;
e = new float32array(e.buffer, n, i)
}
t.setshape("points", e)
})
}
},
qd.incrementalprepareupdate = function(t) {
this.group.removeall(),
this._clearincremental(),
t.count() > 2e6 ? (this._incremental || (this._incremental = new gn({
silent: !0
})), this.group.add(this._incremental)) : this._incremental = null
},
qd.incrementalupdate = function(t, e) {
var i;
this._incremental ? (i = new jd, this._incremental.adddisplayable(i, !0)) : ((i = new jd({
recthover: !0,
cursor: "default",
startindex: t.start,
endindex: t.end
})).incremental = !0, this.group.add(i)),
i.setshape({
points: e.getlayout("symbolpoints")
}),
this._setcommon(i, e, !!this._incremental)
},
qd._setcommon = function(t, e, i) {
var n = e.hostmodel,
o = e.getvisual("symbolsize");
t.setshape("size", o instanceof array ? o: [o, o]),
t.symbolproxy = xl(e.getvisual("symbol"), 0, 0, 0, 0),
t.setcolor = t.symbolproxy.setcolor;
var a = t.shape.size[0] < 4;
t.usestyle(n.getmodel("itemstyle").getitemstyle(a ? ["color", "shadowblur", "shadowcolor"] : ["color"]));
var r = e.getvisual("color");
r && t.setcolor(r),
i || (t.seriesindex = n.seriesindex, t.on("mousemove",
function(e) {
t.dataindex = null;
var i = t.finddataindex(e.offsetx, e.offsety);
i >= 0 && (t.dataindex = i + (t.startindex || 0))
}))
},
qd.remove = function() {
this._clearincremental(),
this._incremental = null,
this.group.removeall()
},
qd._clearincremental = function() {
var t = this._incremental;
t && t.cleardisplaybles()
},
fs({
type: "scatter",
render: function(t, e, i) {
var n = t.getdata();
this._updatesymboldraw(n, t).updatedata(n),
this._finished = !0
},
incrementalpreparerender: function(t, e, i) {
var n = t.getdata();
this._updatesymboldraw(n, t).incrementalprepareupdate(n),
this._finished = !1
},
incrementalrender: function(t, e, i) {
this._symboldraw.incrementalupdate(t, e.getdata()),
this._finished = t.end === e.getdata().count()
},
updatetransform: function(t, e, i) {
var n = t.getdata();
if (this.group.dirty(), !this._finished || n.count() > 1e4 || !this._symboldraw.ispersistent()) return {
update: !0
};
var o = cd().reset(t);
o.progress && o.progress({
start: 0,
end: n.count()
},
n),
this._symboldraw.updatelayout(n)
},
_updatesymboldraw: function(t, e) {
var i = this._symboldraw,
n = e.pipelinecontext.large;
return i && n === this._islargedraw || (i && i.remove(), i = this._symboldraw = n ? new vh: new su, this._islargedraw = n, this.group.removeall()),
this.group.add(i.group),
i
},
remove: function(t, e) {
this._symboldraw && this._symboldraw.remove(!0),
this._symboldraw = null
},
dispose: function() {}
}),
es(hd("scatter", "circle")),
os(cd("scatter")),
u(gh, ha),
fh.prototype.getindicatoraxes = function() {
return this._indicatoraxes
},
fh.prototype.datatopoint = function(t, e) {
var i = this._indicatoraxes[e];
return this.coordtopoint(i.datatocoord(t), e)
},
fh.prototype.coordtopoint = function(t, e) {
var i = this._indicatoraxes[e].angle;
return [this.cx + t * math.cos(i), this.cy - t * math.sin(i)]
},
fh.prototype.pointtodata = function(t) {
var e = t[0] - this.cx,
i = t[1] - this.cy,
n = math.sqrt(e * e + i * i);
e /= n,
i /= n;
for (var o, a = math.atan2( - i, e), r = 1 / 0, s = -1, l = 0; l < this._indicatoraxes.length; l++) {
var u = this._indicatoraxes[l],
h = math.abs(a - u.angle);
h < r && (o = u, s = l, r = h)
}
return [s, +(o && o.coodtodata(n))]
},
fh.prototype.resize = function(t, e) {
var i = t.get("center"),
n = e.getwidth(),
o = e.getheight(),
a = math.min(n, o) / 2;
this.cx = ro(i[0], n),
this.cy = ro(i[1], o),
this.startangle = t.get("startangle") * math.pi / 180;
var r = t.get("radius");
"string" != typeof r && "number" != typeof r || (r = [0, r]),
this.r0 = ro(r[0], a),
this.r = ro(r[1], a),
d(this._indicatoraxes,
function(t, e) {
t.setextent(this.r0, this.r);
var i = this.startangle + e * math.pi * 2 / this._indicatoraxes.length;
i = math.atan2(math.sin(i), math.cos(i)),
t.angle = i
},
this)
},
fh.prototype.update = function(t, e) {
function i(t) {
var e = math.pow(10, math.floor(math.log(t) / math.ln10)),
i = t / e;
return 2 === i ? i = 5 : i *= 2,
i * e
}
var n = this._indicatoraxes,
o = this._model;
d(n,
function(t) {
t.scale.setextent(1 / 0, -1 / 0)
}),
t.eachseriesbytype("radar",
function(e, i) {
if ("radar" === e.get("coordinatesystem") && t.getcomponent("radar", e.get("radarindex")) === o) {
var a = e.getdata();
d(n,
function(t) {
t.scale.unionextentfromdata(a, a.mapdimension(t.dim))
})
}
},
this);
var a = o.get("splitnumber");
d(n,
function(t, e) {
var n = rl(t.scale, t.model);
bl(t.scale, t.model);
var o = t.model,
r = t.scale,
s = o.getmin(),
l = o.getmax(),
u = r.getinterval();
if (null != s && null != l) r.setextent( + s, +l),
r.setinterval((l - s) / a);
else if (null != s) {
var h;
do {
h = s + u * a, r.setextent( + s, h), r.setinterval(u), u = i(u)
} while ( h < n [ 1 ] && isfinite(h) && isfinite(n[1]))
} else if (null != l) {
var c;
do {
c = l - u * a, r.setextent(c, +l), r.setinterval(u), u = i(u)
} while ( c > n [ 0 ] && isfinite(c) && isfinite(n[0]))
} else {
r.getticks().length - 1 > a && (u = i(u));
var d = math.round((n[0] + n[1]) / 2 / u) * u,
f = math.round(a / 2);
r.setextent(zo(d - f * u), zo(d + (a - f) * u)),
r.setinterval(u)
}
})
},
fh.dimensions = [],
fh.create = function(t, e) {
var i = [];
return t.eachcomponent("radar",
function(n) {
var o = new fh(n, t, e);
i.push(o),
n.coordinatesystem = o
}),
t.eachseriesbytype("radar",
function(t) {
"radar" === t.get("coordinatesystem") && (t.coordinatesystem = i[t.get("radarindex") || 0])
}),
i
},
ba.register("radar", fh);
var tc = vd.valueaxis,
ec = (bs({
type: "radar",
optionupdated: function() {
var t = this.get("boundarygap"),
e = this.get("splitnumber"),
o = this.get("scale"),
s = this.get("axisline"),
l = this.get("axistick"),
u = this.get("axislabel"),
h = this.get("name"),
c = this.get("name.show"),
d = this.get("name.formatter"),
p = this.get("namegap"),
g = this.get("triggerevent"),
m = f(this.get("indicator") || [],
function(f) {
null != f.max && f.max > 0 && !f.min ? f.min = 0 : null != f.min && f.min < 0 && !f.max && (f.max = 0);
var m = h;
if (null != f.color && (m = r({
color: f.color
},
h)), f = n(i(f), {
boundarygap: t,
splitnumber: e,
scale: o,
axisline: s,
axistick: l,
axislabel: u,
name: f.text,
namelocation: "end",
namegap: p,
nametextstyle: m,
triggerevent: g
},
!1), c || (f.name = ""), "string" == typeof d) {
var v = f.name;
f.name = d.replace("{value}", null != v ? v: "")
} else "function" == typeof d && (f.name = d(f.name, f));
var y = a(new lo(f, null, this.ecmodel), ca);
return y.maintype = "radar",
y.componentindex = this.componentindex,
y
},
this);
this.getindicatormodels = function() {
return m
}
},
defaultoption: {
zlevel: 0,
z: 0,
center: ["50%", "50%"],
radius: "75%",
startangle: 90,
name: {
show: !0
},
boundarygap: [0, 0],
splitnumber: 5,
namegap: 15,
scale: !1,
shape: "polygon",
axisline: n({
linestyle: {
color: "#bbb"
}
},
tc.axisline),
axislabel: wh(tc.axislabel, !1),
axistick: wh(tc.axistick, !1),
splitline: wh(tc.splitline, !0),
splitarea: wh(tc.splitarea, !0),
indicator: []
}
}), ["axisline", "axisticklabel", "axisname"]);
vs({
type: "radar",
render: function(t, e, i) {
this.group.removeall(),
this._buildaxes(t),
this._buildsplitlineandarea(t)
},
_buildaxes: function(t) {
var e = t.coordinatesystem;
d(f(e.getindicatoraxes(),
function(t) {
return new id(t.model, {
position: [e.cx, e.cy],
rotation: t.angle,
labeldirection: -1,
tickdirection: -1,
namedirection: 1
})
}),
function(t) {
d(ec, t.add, t),
this.group.add(t.getgroup())
},
this)
},
_buildsplitlineandarea: function(t) {
function e(t, e, i) {
var n = i % e.length;
return t[n] = t[n] || [],
n
}
var i = t.coordinatesystem,
n = i.getindicatoraxes();
if (n.length) {
var o = t.get("shape"),
a = t.getmodel("splitline"),
s = t.getmodel("splitarea"),
l = a.getmodel("linestyle"),
u = s.getmodel("areastyle"),
h = a.get("show"),
c = s.get("show"),
p = l.get("color"),
g = u.get("color");
p = y(p) ? p: [p],
g = y(g) ? g: [g];
var m = [],
v = [];
if ("circle" === o) for (var x = n[0].gettickscoords(), _ = i.cx, w = i.cy, b = 0; b < x.length; b++) h && m[d = e(m, p, b)].push(new ks({
shape: {
cx: _,
cy: w,
r: x[b].coord
}
})),
c && b < x.length - 1 && v[d = e(v, g, b)].push(new tm({
shape: {
cx: _,
cy: w,
r0: x[b].coord,
r: x[b + 1].coord
}
}));
else for (var s, m = f(n,
function(t, e) {
var n = t.gettickscoords();
return s = null == s ? n.length - 1 : math.min(n.length - 1, s),
f(n,
function(t) {
return i.coordtopoint(t.coord, e)
})
}), i = [], b = 0; b <= s; b++) {
for (var t = [], a = 0; a < n.length; a++) t.push(m[a][b]);
if (t[0] && t.push(t[0].slice()), h && m[d = e(m, p, b)].push(new om({
shape: {
points: t
}
})), c && i) {
var d = e(v, g, b - 1);
v[d].push(new nm({
shape: {
points: t.concat(i)
}
}))
}
i = t.slice().reverse()
}
var c = l.getlinestyle(),
l = u.getareastyle();
d(v,
function(t, e) {
this.group.add(xm(t, {
style: r({
stroke: "none",
fill: g[e % g.length]
},
l),
silent: !0
}))
},
this),
d(m,
function(t, e) {
this.group.add(xm(t, {
style: r({
fill: "none",
stroke: p[e % p.length]
},
c),
silent: !0
}))
},
this)
}
}
});
var ic = oi.extend({
type: "series.radar",
dependencies: ["radar"],
init: function(t) {
ic.superapply(this, "init", arguments),
this.legenddataprovider = function() {
return this.getrawdata()
}
},
getinitialdata: function(t, e) {
return wd(this, {
generatecoord: "indicator_",
generatecoordcount: 1 / 0
})
},
formattooltip: function(t) {
var e = this.getdata(),
i = this.coordinatesystem.getindicatoraxes(),
n = this.getdata().getname(t);
return qo("" === n ? this.name: n) + "
" + f(i,
function(i, n) {
var o = e.get(e.mapdimension(i.dim), t);
return qo(i.name + " : " + o)
}).join("
")
},
defaultoption: {
zlevel: 0,
z: 2,
coordinatesystem: "radar",
legendhoverlink: !0,
radarindex: 0,
linestyle: {
width: 2,
type: "solid"
},
label: {
position: "top"
},
symbol: "emptycircle",
symbolsize: 4
}
});
fs({
type: "radar",
render: function(t, e, n) {
function o(t, e) {
var i = t.getitemvisual(e, "symbol") || "circle",
n = t.getitemvisual(e, "color");
if ("none" !== i) {
var o = hh(t.getitemvisual(e, "symbolsize")),
a = xl(i, -1, -1, 2, 2, n);
return a.attr({
style: {
strokenoscale: !0
},
z2: 100,
scale: [o[0] / 2, o[1] / 2]
}),
a
}
}
function a(e, i, n, a, r, s) {
n.removeall();
for (var l = 0; l < i.length - 1; l++) {
var u = o(a, r);
u && (u.__dimidx = l, e[l] ? (u.attr("position", e[l]), bm[s ? "initprops": "updateprops"](u, {
position: i[l]
},
t, r)) : u.attr("position", i[l]), n.add(u))
}
}
function s(t) {
return f(t,
function(t) {
return [l.cx, l.cy]
})
}
var l = t.coordinatesystem,
u = this.group,
h = t.getdata(),
c = this._data;
h.diff(c).add(function(e) {
var i = h.getitemlayout(e);
if (i) {
var n = new nm,
o = new om,
r = {
shape: {
points: i
}
};
n.shape.points = s(i),
o.shape.points = s(i),
so(n, r, t, e),
so(o, r, t, e);
var l = new zw,
u = new zw;
l.add(o),
l.add(n),
l.add(u),
a(o.shape.points, i, u, h, e, !0),
h.setitemgraphicel(e, l)
}
}).update(function(e, i) {
var n = c.getitemgraphicel(i),
o = n.childat(0),
r = n.childat(1),
s = n.childat(2),
l = {
shape: {
points: h.getitemlayout(e)
}
};
l.shape.points && (a(o.shape.points, l.shape.points, s, h, e, !1), bo(o, l, t), bo(r, l, t), h.setitemgraphicel(e, n))
}).remove(function(t) {
u.remove(c.getitemgraphicel(t))
}).execute(),
h.eachitemgraphicel(function(t, e) {
function n() {
l.attr("ignore", m)
}
function o() {
l.attr("ignore", g)
}
var a = h.getitemmodel(e),
s = t.childat(0),
l = t.childat(1),
c = t.childat(2),
d = h.getitemvisual(e, "color");
u.add(t),
s.usestyle(r(a.getmodel("linestyle").getlinestyle(), {
fill: "none",
stroke: d
})),
s.hoverstyle = a.getmodel("emphasis.linestyle").getlinestyle();
var f = a.getmodel("areastyle"),
p = a.getmodel("emphasis.areastyle"),
g = f.isempty() && f.parentmodel.isempty(),
m = p.isempty() && p.parentmodel.isempty();
m = m && g,
l.ignore = g,
l.usestyle(r(f.getareastyle(), {
fill: d,
opacity: .7
})),
l.hoverstyle = p.getareastyle();
var v = a.getmodel("itemstyle").getitemstyle(["color"]),
y = a.getmodel("emphasis.itemstyle").getitemstyle(),
x = a.getmodel("label"),
_ = a.getmodel("emphasis.label");
c.eachchild(function(t) {
t.setstyle(v),
t.hoverstyle = i(y),
co(t.style, t.hoverstyle, x, _, {
labelfetcher: h.hostmodel,
labeldataindex: e,
labeldimindex: t.__dimidx,
defaulttext: h.get(h.dimensions[t.__dimidx], e),
autocolor: d,
isrecttext: !0
})
}),
t.off("mouseover").off("mouseout").off("normal").off("emphasis"),
t.on("emphasis", n).on("mouseover", n).on("normal", o).on("mouseout", o),
uo(t)
}),
this._data = h
},
remove: function() {
this.group.removeall(),
this._data = null
},
dispose: function() {}
});
es(jd("radar")),
es(hd("radar", "circle")),
os(function(t) {
t.eachseriesbytype("radar",
function(t) {
var e = t.getdata(),
i = [],
n = t.coordinatesystem;
if (n) {
for (var o = n.getindicatoraxes(), a = 0; a < o.length; a++) e.each(e.mapdimension(o[a].dim),
function(t, e) {
i[e] = i[e] || [],
i[e][a] = n.datatopoint(t, a)
});
e.each(function(t) {
i[t][0] && i[t].push(i[t][0].slice()),
e.setitemlayout(t, i[t])
})
}
})
}),
ks($d("radar")),
ls(function(t) {
var e = t.polar;
if (e) {
y(e) || (e = [e]);
var i = [];
d(e,
function(e, n) {
e.indicator ? (e.type && !e.shape && (e.shape = e.type), t.radar = t.radar || [], y(t.radar) || (t.radar = [t.radar]), t.radar.push(e)) : i.push(e)
}),
t.polar = i
}
d(t.series,
function(t) {
t && "radar" === t.type && t.polarindex && (t.radarindex = t.polarindex)
})
});
var nc = q;
h(zh, mw),
uh.prototype = {
constructor: uh,
type: "view",
dimensions: ["x", "y"],
setboundingrect: function(t, e, i, n) {
return this._rect = new ue(t, e, i, n),
this._rect
},
getboundingrect: function() {
return this._rect
},
setviewrect: function(t, e, i, n) {
this.transformto(t, e, i, n),
this._viewrect = new ue(t, e, i, n)
},
transformto: function(t, e, i, n) {
var o = this.getboundingrect(),
a = this._rawtransformable;
a.transform = o.calculatetransform(new ue(t, e, i, n)),
a.decomposetransform(),
this._updatetransform()
},
setcenter: function(t) {
t && (this._center = t, this._updatecenterandzoom())
},
setzoom: function(t) {
t = t || 1;
var e = this.zoomlimit;
e && (null != e.max && (t = math.min(e.max, t)), null != e.min && (t = math.max(e.min, t))),
this._zoom = t,
this._updatecenterandzoom()
},
getdefaultcenter: function() {
var t = this.getboundingrect();
return [t.x + t.width / 2, t.y + t.height / 2]
},
getcenter: function() {
return this._center || this.getdefaultcenter()
},
getzoom: function() {
return this._zoom || 1
},
getroamtransform: function() {
return this._roamtransformable.getlocaltransform()
},
_updatecenterandzoom: function() {
var t = this._rawtransformable.getlocaltransform(),
e = this._roamtransformable,
i = this.getdefaultcenter(),
n = this.getcenter(),
o = this.getzoom();
n = q([], n, t),
i = q([], i, t),
e.origin = n,
e.position = [i[0] - n[0], i[1] - n[1]],
e.scale = [o, o],
this._updatetransform()
},
_updatetransform: function() {
var t = this._roamtransformable,
e = this._rawtransformable;
e.parent = t,
t.updatetransform(),
e.updatetransform(),
yt(this.transform || (this.transform = []), e.transform || mt()),
this._rawtransform = e.getlocaltransform(),
this.invtransform = this.invtransform || [],
st(this.invtransform, this.transform),
this.decomposetransform()
},
getviewrect: function() {
return this._viewrect
},
getviewrectafterroam: function() {
var t = this.getboundingrect().clone();
return t.applytransform(this.transform),
t
},
datatopoint: function(t, e, i) {
var n = e ? this._rawtransform: this.transform;
return i = i || [],
n ? nc(i, t, n) : g(i, t)
},
pointtodata: function(t) {
var e = this.invtransform;
return e ? nc([], t, e) : [t[0], t[1]]
},
converttopixel: v(xh, "datatopoint"),
convertfrompixel: v(xh, "pointtodata"),
containpoint: function(t) {
return this.getviewrectafterroam().contain(t[0], t[1])
}
},
h(uh, mw);
for (var oc = [126, 25], ac = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, .7], [52, .7], [56, 7.7], [59, .7], [64, .7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]], rc = 0; rc < ac.length; rc++) for (var sc = 0; sc < ac[rc].length; sc++) ac[rc][sc][0] /= 10.5,
ac[rc][sc][1] /= -14,
ac[rc][sc][0] += oc[0],
ac[rc][sc][1] += oc[1];
var lc = function(t, e) {
"china" === t && e.push(new ql("南海诸岛", f(ac,
function(t) {
return {
type: "polygon",
exterior: t
}
}), oc))
},
uc = {
"å—海诸岛": [32, 80],
"广东": [0, -10],
"香港": [10, 5],
"澳门": [ - 10, 10],
"天津": [5, 5]
},
hc = function(t, e) {
if ("china" === t) {
var i = uc[e.name];
if (i) {
var n = e.center;
n[0] += i[0] / 10.5,
n[1] += -i[1] / 14
}
}
},
cc = {
russia: [100, 60],
"united states": [ - 99, 38],
"united states of america": [ - 99, 38]
},
dc = function(t, e) {
if ("world" === t) {
var i = cc[e.name];
if (i) {
var n = e.center;
n[0] = i[0],
n[1] = i[1]
}
}
},
fc = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]],
pc = function(t, e) {
"china" === t && "å°æ¹¾" === e.name && e.geometries.push({
type: "polygon",
exterior: fc[0]
})
},
gc = bi(),
mc = {
load: function(t, e) {
var i = gc(e).parsed;
if (i) return i;
var n, o = e.specialareas || {},
a = e.geojson;
try {
n = a ? ga(a) : []
} catch(t) {
throw new error("invalid geojson format\n" + t.message)
}
return d(n,
function(e) {
var i = e.name;
hc(t, e),
dc(t, e),
pc(t, e);
var n = o[i];
n && e.transformto(n.left, n.top, n.width, n.height)
}),
lc(t, n),
gc(e).parsed = {
regions: n,
boundingrect: jh(n)
}
}
},
vc = bi(),
yc = {
geojson: mc,
svg: {
load: function(t, e) {
var i = vc(e).originroot;
if (i) return {
root: i,
boundingrect: vc(e).boundingrect
};
var n = yh(e);
return vc(e).originroot = n.root,
vc(e).boundingrect = n.boundingrect,
n
},
makegraphic: function(t, e, i) {
var n = vc(e),
o = n.rootmap || (n.rootmap = r()),
a = o.get(i);
if (a) return a;
var r = n.originroot,
s = n.boundingrect;
return n.originroothostkey ? a = yh(e, s).root: (n.originroothostkey = i, a = r),
o.set(i, a)
},
removegraphic: function(t, e, i) {
var n = vc(e),
o = n.rootmap;
o && o.removekey(i),
i === n.originroothostkey && (n.originroothostkey = null)
}
}
},
xc = {
load: function(t, e) {
var i, n = [],
o = r(),
a = r();
return d(kh(t),
function(r) {
var s = yc[r.type].load(t, r);
d(s.regions,
function(t) {
var i = t.name;
e && e.hasownproperty(i) && (t = t.cloneshallow(i = e[i])),
n.push(t),
o.set(i, t),
a.set(i, t.center)
});
var l = s.boundingrect;
l && (i ? i.union(l) : i = l.clone())
}),
{
regions: n,
regionsmap: o,
namecoordmap: a,
boundingrect: i || new ue(0, 0, 0, 0)
}
},
makegraphic: qh("makegraphic"),
removegraphic: qh("removegraphic")
};
$h.prototype = {
constructor: $h,
type: "geo",
dimensions: ["lng", "lat"],
containcoord: function(t) {
for (var e = this.regions,
i = 0; i < e.length; i++) if (e[i].contain(t)) return ! 0;
return ! 1
},
transformto: function(t, e, i, n) {
var o = this.getboundingrect(),
a = this._invertlongitute;
o = o.clone(),
a && (o.y = -o.y - o.height);
var r = this._rawtransformable;
if (r.transform = o.calculatetransform(new ue(t, e, i, n)), r.decomposetransform(), a) {
var s = r.scale;
s[1] = -s[1]
}
r.updatetransform(),
this._updatetransform()
},
getregion: function(t) {
return this._regionsmap.get(t)
},
getregionbycoord: function(t) {
for (var e = this.regions,
i = 0; i < e.length; i++) if (e[i].contain(t)) return e[i]
},
addgeocoord: function(t, e) {
this._namecoordmap.set(t, e)
},
getgeocoord: function(t) {
return this._namecoordmap.get(t)
},
getboundingrect: function() {
return this._rect
},
datatopoint: function(t, e, i) {
if ("string" == typeof t && (t = this.getgeocoord(t)), t) return uh.prototype.datatopoint.call(this, t, e, i)
},
converttopixel: v(jh, "datatopoint"),
convertfrompixel: v(jh, "pointtodata")
},
h($h, uh);
var _c = {
dimensions: $h.prototype.dimensions,
create: function(t, e) {
var i = [];
t.eachcomponent("geo",
function(t, n) {
var o = t.get("map"),
a = t.get("aspectscale"),
r = !0,
s = pt.retrievemap(o);
s && s[0] && "svg" === s[0].type ? (null == a && (a = 1), r = !1) : null == a && (a = .75);
var l = new $h(o + n, o, t.get("namemap"), r);
l.aspectscale = a,
l.zoomlimit = t.get("scalelimit"),
i.push(l),
tc(l, t),
t.coordinatesystem = l,
l.model = t,
l.resize = qh,
l.resize(t, e)
}),
t.eachseries(function(t) {
if ("geo" === t.get("coordinatesystem")) {
var e = t.get("geoindex") || 0;
t.coordinatesystem = i[e]
}
});
var n = {};
return t.eachseriesbytype("map",
function(t) {
if (!t.gethostgeomodel()) {
var e = t.getmaptype();
n[e] = n[e] || [],
n[e].push(t)
}
}),
d(n,
function(t, n) {
var a = new $h(n, n, o(f(t,
function(t) {
return t.get("namemap")
})));
a.zoomlimit = t.apply(null, f(t,
function(t) {
return t.get("scalelimit")
})),
i.push(a),
a.resize = qh,
a.aspectscale = t[0].get("aspectscale"),
a.resize(t[0], e),
d(t,
function(t) {
t.coordinatesystem = a,
tc(a, t)
})
}),
i
},
getfilledregions: function(t, e, i) {
for (var n = (t || []).slice(), o = r(), a = 0; a < n.length; a++) o.set(n[a].name, n[a]);
return d(xc.load(e, i).regions,
function(t) {
var e = t.name; ! o.get(e) && n.push({
name: e
})
}),
n
}
};
ns("geo", _c);
var wc = oi.extend({
type: "series.map",
dependencies: ["geo"],
layoutmode: "box",
needsdrawmap: !1,
seriesgroup: [],
init: function(t) {
wc.superapply(this, "init", arguments),
this.updateselectedmap(this._createselectablelist())
},
getinitialdata: function(t) {
return wd(this, ["value"])
},
mergeoption: function(t) {
wc.superapply(this, "mergeoption", arguments),
this.updateselectedmap(this._createselectablelist())
},
_createselectablelist: function() {
for (var t = this.getrawdata(), e = t.mapdimension("value"), i = [], n = 0, o = t.count(); n < o; n++) i.push({
name: t.getname(n),
value: t.get(e, n),
selected: cr(t, n, "selected")
});
return i = _c.getfilledregions(i, this.getmaptype(), this.option.namemap)
},
gethostgeomodel: function() {
var t = this.option.geoindex;
return null != t ? this.dependentmodels.geo[t] : null
},
getmaptype: function() {
return (this.gethostgeomodel() || this).option.map
},
_filloption: function(t, e) {},
getrawvalue: function(t) {
var e = this.getdata();
return e.get(e.mapdimension("value"), t)
},
getregionmodel: function(t) {
var e = this.getdata();
return e.getitemmodel(e.indexofname(t))
},
formattooltip: function(t) {
for (var e = this.getdata(), i = $o(this.getrawvalue(t)), n = e.getname(t), o = this.seriesgroup, a = [], r = 0; r < o.length; r++) {
var s = o[r].originaldata.indexofname(n),
l = e.mapdimension("value");
isnan(o[r].originaldata.get(l, s)) || a.push(qo(o[r].name))
}
return a.join(", ") + "
" + qo(n + " : " + i)
},
gettooltipposition: function(t) {
if (null != t) {
var e = this.getdata().getname(t),
i = this.coordinatesystem,
n = i.getregion(e);
return n && i.datatopoint(n.center)
}
},
setzoom: function(t) {
this.option.zoom = t
},
setcenter: function(t) {
this.option.center = t
},
defaultoption: {
zlevel: 0,
z: 2,
coordinatesystem: "geo",
map: "",
left: "center",
top: "center",
aspectscale: .75,
showlegendsymbol: !0,
datarangehoverlink: !0,
boundingcoords: null,
center: null,
zoom: 1,
scalelimit: null,
label: {
show: !1,
color: "#000"
},
itemstyle: {
borderwidth: .5,
bordercolor: "#444",
areacolor: "#eee"
},
emphasis: {
label: {
show: !0,
color: "rgb(100,0,0)"
},
itemstyle: {
areacolor: "rgba(255,215,0,0.8)"
}
}
}
});
h(wc, hd);
var bc = "\0_ec_interaction_mutex";
ps({
type: "takeglobalcursor",
event: "globalcursortaken",
update: "update"
},
function() {}),
h(ac, aw);
var sc = {
axispointer: 1,
tooltip: 1,
brush: 1
};
_c.prototype = {
constructor: _c,
draw: function(t, e, i, n, o) {
var a = "geo" === t.maintype,
r = t.getdata && t.getdata();
a && e.eachcomponent({
maintype: "series",
subtype: "map"
},
function(e) {
r || e.gethostgeomodel() !== t || (r = e.getdata())
});
var s = t.coordinatesystem;
this._updatebackground(s);
var l = this._regionsgroup,
u = this.group,
h = s.scale,
c = {
position: s.position,
scale: h
}; ! l.childat(0) || o ? u.attr(c) : bo(u, c, t),
l.removeall();
var f = ["itemstyle"],
p = ["emphasis", "itemstyle"],
g = ["label"],
m = ["emphasis", "label"],
v = r();
d(s.regions,
function(e) {
var i = v.get(e.name) || v.set(e.name, new zw),
n = new hm({
shape: {
paths: []
}
});
i.add(n);
var o, s = (c = t.getregionmodel(e.name) || t).getmodel(f),
u = c.getmodel(p),
c = vc(s),
y = vc(u),
x = c.getmodel(g),
_ = c.getmodel(m);
if (r) {
o = r.indexofname(e.name);
var w = r.getitemvisual(o, "color", !0);
w && (c.fill = w)
}
d(e.geometries,
function(t) {
if ("polygon" === t.type) {
n.shape.paths.push(new nm({
shape: {
points: t.exterior
}
}));
for (var e = 0; e < (t.interiors ? t.interiors.length: 0); e++) n.shape.paths.push(new nm({
shape: {
points: t.interiors[e]
}
}))
}
}),
n.setstyle(c),
n.style.strokenoscale = !0,
n.culling = !0;
var b = x.get("show"),
s = _.get("show"),
m = r && isnan(r.get(r.mapdimension("value"), o)),
i = r && r.getitemlayout(o);
if (a || m && (b || s) || i && i.showlabel) {
var t, a = a ? e.name: o; (!r || o >= 0) && (t = t);
var d = new qs({
position: e.center.slice(),
scale: [1 / h[0], 1 / h[1]],
z2: 10,
silent: !0
});
co(d.style, d.hoverstyle = {},
x, _, {
labelfetcher: t,
labeldataindex: a,
defaulttext: e.name,
useinsidestyle: !1
},
{
textalign: "center",
textverticalalign: "middle"
}),
i.add(d)
}
if (r) r.setitemgraphicel(o, i);
else {
var c = t.getregionmodel(e.name);
n.eventdata = {
componenttype: "geo",
componentindex: t.componentindex,
geoindex: t.componentindex,
name: e.name,
region: c && c.option || {}
}
} (i.__regions || (i.__regions = [])).push(e),
uo(i, y, {
hoversilentontouch: !!t.get("selectedmode")
}),
l.add(i)
}),
this._updatecontroller(t, e, i),
yc(this, t, l, i, n),
xc(t, l)
},
remove: function() {
this._regionsgroup.removeall(),
this._backgroundgroup.removeall(),
this._controller.dispose(),
this._mapname && xc.removegraphic(this._mapname, this.uid),
this._mapname = null,
this._controllerhost = {}
},
_updatebackground: function(t) {
var e = t.map;
this._mapname !== e && d(xc.makegraphic(e, this.uid),
function(t) {
this._backgroundgroup.add(t)
},
this),
this._mapname = e
},
_updatecontroller: function(t, e, i) {
function n() {
var e = {
type: "georoam",
componenttype: l
};
return e[l + "id"] = t.id,
e
}
var o = t.coordinatesystem,
r = this._controller,
s = this._controllerhost;
s.zoomlimit = t.get("scalelimit"),
s.zoom = o.getzoom(),
r.enable(t.get("roam") || !1);
var l = t.maintype;
r.off("pan").on("pan",
function(t) {
this._mousedownflag = !1,
pc(s, t.dx, t.dy),
i.dispatchaction(a(n(), {
dx: t.dx,
dy: t.dy
}))
},
this),
r.off("zoom").on("zoom",
function(t) {
if (this._mousedownflag = !1, gc(s, t.scale, t.originx, t.originy), i.dispatchaction(a(n(), {
zoom: t.scale,
originx: t.originx,
originy: t.originy
})), this._updategroup) {
var e = this.group.scale;
this._regionsgroup.traverse(function(t) {
"text" === t.type && t.attr("scale", [1 / e[0], 1 / e[1]])
})
}
},
this),
r.setpointerchecker(function(e, n, a) {
return o.getviewrectafterroam().contain(n, a) && !mc(e, i, t)
})
}
},
fs({
type: "map",
render: function(t, e, i, n) {
if (!n || "maptoggleselect" !== n.type || n.from !== this.uid) {
var o = this.group;
if (o.removeall(), !t.gethostgeomodel()) {
if (n && "georoam" === n.type && "series" === n.componenttype && n.seriesid === t.id)(a = this._mapdraw) && o.add(a.group);
else if (t.needsdrawmap) {
var a = this._mapdraw || new _c(i, !0);
o.add(a.group),
a.draw(t, e, i, this, n),
this._mapdraw = a
} else this._mapdraw && this._mapdraw.remove(),
this._mapdraw = null;
t.get("showlegendsymbol") && e.getcomponent("legend") && this._rendersymbols(t, e, i)
}
}
},
remove: function() {
this._mapdraw && this._mapdraw.remove(),
this._mapdraw = null,
this.group.removeall()
},
dispose: function() {
this._mapdraw && this._mapdraw.remove(),
this._mapdraw = null
},
_rendersymbols: function(t, e, i) {
var n = t.originaldata,
o = this.group;
n.each(n.mapdimension("value"),
function(e, i) {
if (!isnan(e)) {
var a = n.getitemlayout(i);
if (a && a.point) {
var r = a.point,
s = a.offset,
l = new ks({
style: {
fill: t.getdata().getvisual("color")
},
shape: {
cx: r[0] + 9 * s,
cy: r[1],
r: 3
},
silent: !0,
z2: s ? 8 : 10
});
if (!s) {
var u = t.mainseries.getdata(),
h = n.getname(i),
c = u.indexofname(h),
d = n.getitemmodel(i),
f = d.getmodel("label"),
p = d.getmodel("emphasis.label"),
g = u.getitemgraphicel(c),
m = a(t.getformattedlabel(i, "normal"), h),
v = a(t.getformattedlabel(i, "emphasis"), m),
y = function() {
var t = fo({},
p, {
text: p.get("show") ? v: null
},
{
isrecttext: !0,
useinsidestyle: !1
},
!0);
l.style.extendfrom(t),
l.__maporiginalz2 = l.z2,
l.z2 += 1
},
x = function() {
fo(l.style, f, {
text: f.get("show") ? m: null,
textposition: f.getshallow("position") || "bottom"
},
{
isrecttext: !0,
useinsidestyle: !1
}),
null != l.__maporiginalz2 && (l.z2 = l.__maporiginalz2, l.__maporiginalz2 = null)
};
g.on("mouseover", y).on("mouseout", x).on("emphasis", y).on("normal", x),
x()
}
o.add(l)
}
}
})
}
}),
ps({
type: "georoam",
event: "georoam",
update: "updatetransform"
},
function(t, e) {
var i = t.componenttype || "series";
e.eachcomponent({
maintype: i,
query: t
},
function(e) {
var n = e.coordinatesystem;
if ("geo" === n.type) {
var o = wc(n, t, e.get("scalelimit"));
e.setcenter && e.setcenter(o.center),
e.setzoom && e.setzoom(o.zoom),
"series" === i && d(e.seriesgroup,
function(t) {
t.setcenter(o.center),
t.setzoom(o.zoom)
})
}
})
});
os(function(t) {
var e = {};
t.eachseriesbytype("map",
function(i) {
var n = i.getmaptype();
if (!i.gethostgeomodel() && !e[n]) {
var o = {};
d(i.seriesgroup,
function(e) {
var i = e.coordinatesystem,
n = e.originaldata;
e.get("showlegendsymbol") && t.getcomponent("legend") && n.each(n.mapdimension("value"),
function(t, e) {
var a = n.getname(e),
r = i.getregion(a);
if (r && !isnan(t)) {
var s = o[a] || 0,
l = i.datatopoint(r.center);
o[a] = s + 1,
n.setitemlayout(e, {
point: l,
offset: s
})
}
})
});
var a = i.getdata();
a.each(function(t) {
var e = a.getname(t),
i = a.getitemlayout(t) || {};
i.showlabel = !o[e],
a.setitemlayout(t, i)
}),
e[n] = !0
}
})
}),
es(function(t) {
t.eachseriesbytype("map",
function(t) {
var e = t.get("color"),
i = t.getmodel("itemstyle"),
n = i.get("areacolor"),
o = i.get("color") || e[t.seriesindex % e.length];
t.getdata().setvisual({
areacolor: n,
color: o
})
})
}),
ks(it.processor.statistic,
function(t) {
var e = {};
t.eachseriesbytype("map",
function(t) {
var i = t.gethostgeomodel(),
n = i ? "o" + i.id: "i" + t.getmaptype(); (e[n] = e[n] || []).push(t)
}),
d(e,
function(t, e) {
for (var i = bc(f(t,
function(t) {
return t.getdata()
}), t[0].get("mapvaluecalculation")), n = 0; n < t.length; n++) t[n].originaldata = t[n].getdata();
for (n = 0; n < t.length; n++) t[n].seriesgroup = t,
t[n].needsdrawmap = 0 === n && !t[n].gethostgeomodel(),
t[n].setdata(i.cloneshallow()),
t[n].mainseries = t[0]
})
}),
ls(function(t) {
var e = [];
d(t.series,
function(t) {
t && "map" === t.type && (e.push(t), t.map = t.map || t.maptype, r(t, t.maplocation))
})
}),
xd("map", [{
type: "maptoggleselect",
event: "mapselectchanged",
method: "toggleselected"
},
{
type: "mapselect",
event: "mapselected",
method: "select"
},
{
type: "mapunselect",
event: "mapunselected",
method: "unselect"
}]);
var mc = d,
ic = "\0__link_datas",
tc = "\0__link_maindata",
ac = function(t, e) {
this.name = t || "",
this.depth = 0,
this.height = 0,
this.parentnode = null,
this.dataindex = -1,
this.children = [],
this.viewchildren = [],
this.hosttree = e
};
ac.prototype = {
constructor: ac,
isremoved: function() {
return this.dataindex < 0
},
eachnode: function(t, e, i) {
"function" == typeof t && (i = e, e = t, t = null),
_(t = t || {}) && (t = {
order: t
});
var n, o = t.order || "preorder",
a = this[t.attr || "children"];
"preorder" === o && (n = e.call(i, this));
for (var r = 0; ! n && r < a.length; r++) a[r].eachnode(t, e, i);
"postorder" === o && e.call(i, this)
},
updatedepthandheight: function(t) {
var e = 0;
this.depth = t;
for (var i = 0; i < this.children.length; i++) {
var n = this.children[i];
n.updatedepthandheight(t + 1),
n.height > e && (e = n.height)
}
this.height = e + 1
},
getnodebyid: function(t) {
if (this.getid() === t) return this;
for (var e = 0,
i = this.children,
n = i.length; e < n; e++) {
var o = i[e].getnodebyid(t);
if (o) return o
}
},
contains: function(t) {
if (t === this) return ! 0;
for (var e = 0,
i = this.children,
n = i.length; e < n; e++) {
var o = i[e].contains(t);
if (o) return o
}
},
getancestors: function(t) {
for (var e = [], i = t ? this: this.parentnode; i;) e.push(i),
i = i.parentnode;
return e.reverse(),
e
},
getvalue: function(t) {
var e = this.hosttree.data;
return e.get(e.getdimension(t || "value"), this.dataindex)
},
setlayout: function(t, e) {
this.dataindex >= 0 && this.hosttree.data.setitemlayout(this.dataindex, t, e)
},
getlayout: function() {
return this.hosttree.data.getitemlayout(this.dataindex)
},
getmodel: function(t) {
if (! (this.dataindex < 0)) {
var e, i = this.hosttree,
n = i.data.getitemmodel(this.dataindex),
o = this.getlevelmodel();
return o || 0 !== this.children.length && (0 === this.children.length || !1 !== this.isexpand) || (e = this.getleavesmodel()),
n.getmodel(t, (o || e || i.hostmodel).getmodel(t))
}
},
getlevelmodel: function() {
return (this.hosttree.levelmodels || [])[this.depth]
},
getleavesmodel: function() {
return this.hosttree.leavesmodel
},
setvisual: function(t, e) {
this.dataindex >= 0 && this.hosttree.data.setitemvisual(this.dataindex, t, e)
},
getvisual: function(t, e) {
return this.hosttree.data.getitemvisual(this.dataindex, t, e)
},
getrawindex: function() {
return this.hosttree.data.getrawindex(this.dataindex)
},
getid: function() {
return this.hosttree.data.getid(this.dataindex)
},
isancestorof: function(t) {
for (var e = t.parentnode; e;) {
if (e === this) return ! 0;
e = e.parentnode
}
return ! 1
},
isdescendantof: function(t) {
return t !== this && t.isancestorof(this)
}
},
kc.prototype = {
constructor: kc,
type: "tree",
eachnode: function(t, e, i) {
this.root.eachnode(t, e, i)
},
getnodebydataindex: function(t) {
var e = this.data.getrawindex(t);
return this._nodes[e]
},
getnodebyname: function(t) {
return this.root.getnodebyname(t)
},
update: function() {
for (var t = this.data,
e = this._nodes,
i = 0,
n = e.length; i < n; i++) e[i].dataindex = -1;
for (var i = 0,
n = t.count(); i < n; i++) e[t.getrawindex(i)].dataindex = i
},
clearlayouts: function() {
this.data.clearitemlayouts()
}
},
kc.createtree = function(t, e, i) {
function n(t, e) {
var i = t.value;
r = math.max(r, y(i) ? i.length: 1),
a.push(t);
var s = new ac(t.name, o);
e ? pc(s, e) : o.root = s,
o._nodes.push(s);
var l = t.children;
if (l) for (var u = 0; u < l.length; u++) n(l[u], s)
}
var o = new kc(e, i.levels, i.leaves),
a = [],
r = 1;
n(t),
o.root.updatedepthandheight(0);
var s = oa(a, {
coorddimensions: ["value"],
dimensionscount: r
}),
l = new ea(s, e);
return l.initdata(a),
sc({
maindata: l,
struct: o,
structattr: "tree"
}),
o.update(),
o
},
oi.extend({
type: "series.tree",
layoutinfo: null,
layoutmode: "box",
getinitialdata: function(t) {
var e = {
name: t.name,
children: t.data
},
i = t.leaves || {},
n = {};
n.leaves = i;
var o = kc.createtree(e, this, n),
a = 0;
o.eachnode("preorder",
function(t) {
t.depth > a && (a = t.depth)
});
var r = t.expandandcollapse && t.initialtreedepth >= 0 ? t.initialtreedepth: a;
return o.root.eachnode("preorder",
function(t) {
var e = t.hosttree.data.getrawdataitem(t.dataindex);
t.isexpand = e && null != e.collapsed ? !e.collapsed: t.depth <= r
}),
o.data
},
getorient: function() {
var t = this.get("orient");
return "horizontal" === t ? t = "lr": "vertical" === t && (t = "tb"),
t
},
setzoom: function(t) {
this.option.zoom = t
},
setcenter: function(t) {
this.option.center = t
},
formattooltip: function(t) {
for (var e = this.getdata().tree, i = e.root.children[0], n = e.getnodebydataindex(t), o = n.getvalue(), a = n.name; n && n !== i;) a = n.parentnode.name + "." + a,
n = n.parentnode;
return qo(a + (isnan(o) || null == o ? "": " : " + o))
},
defaultoption: {
zlevel: 0,
z: 2,
coordinatesystem: "view",
left: "12%",
top: "12%",
right: "12%",
bottom: "12%",
layout: "orthogonal",
roam: !1,
nodescaleratio: .4,
center: null,
zoom: 1,
orient: "lr",
symbol: "emptycircle",
symbolsize: 7,
expandandcollapse: !0,
initialtreedepth: 2,
linestyle: {
color: "#ccc",
width: 1.5,
curveness: .5
},
itemstyle: {
color: "lightsteelblue",
bordercolor: "#c23531",
borderwidth: 1.5
},
label: {
show: !0,
color: "#555"
},
leaves: {
label: {
show: !0
}
},
animationeasing: "linear",
animationduration: 700,
animationdurationupdate: 1e3
}
}),
fs({
type: "tree",
init: function(t, e) {
this._oldtree,
this._maingroup = new zw,
this._controller = new ac(e.getzr()),
this._controllerhost = {
target: this.group
},
this.group.add(this._maingroup)
},
render: function(t, e, i, n) {
var o = t.getdata(),
a = t.layoutinfo,
r = this._maingroup,
s = t.get("layout");
"radial" === s ? r.attr("position", [a.x + a.width / 2, a.y + a.height / 2]) : r.attr("position", [a.x, a.y]),
this._updateviewcoordsys(t),
this._updatecontroller(t, e, i);
var l = this._data,
u = {
expandandcollapse: t.get("expandandcollapse"),
layout: s,
orient: t.getorient(),
curvature: t.get("linestyle.curveness"),
symbolrotate: t.get("symbolrotate"),
symboloffset: t.get("symboloffset"),
hoveranimation: t.get("hoveranimation"),
usenamelabel: !0,
fadein: !0
};
o.diff(l).add(function(e) {
xc(o, e) && yc(o, e, null, r, t, u)
}).update(function(e, i) {
var n = l.getitemgraphicel(i);
xc(o, e) ? yc(o, e, n, r, t, u) : n && qc(l, i, n, r, t, u)
}).remove(function(e) {
var i = l.getitemgraphicel(e);
i && qc(l, e, i, r, t, u)
}).execute(),
this._nodescaleratio = t.get("nodescaleratio"),
this._updatenodeandlinkscale(t),
!0 === u.expandandcollapse && o.eachitemgraphicel(function(e, n) {
e.off("click").on("click",
function() {
i.dispatchaction({
type: "treeexpandandcollapse",
seriesid: t.id,
dataindex: n
})
})
}),
this._data = o
},
_updateviewcoordsys: function(t) {
var e = t.getdata(),
i = [];
e.each(function(t) {
var n = e.getitemlayout(t); ! n || isnan(n.x) || isnan(n.y) || i.push([ + n.x, +n.y])
});
var n = [],
o = [];
dn(i, n, o),
o[0] - n[0] == 0 && (o[0] += 1, n[0] -= 1),
o[1] - n[1] == 0 && (o[1] += 1, n[1] -= 1);
var a = t.coordinatesystem = new uh;
a.zoomlimit = t.get("scalelimit"),
a.setboundingrect(n[0], n[1], o[0] - n[0], o[1] - n[1]),
a.setcenter(t.get("center")),
a.setzoom(t.get("zoom")),
this.group.attr({
position: a.position,
scale: a.scale
}),
this._viewcoordsys = a
},
_updatecontroller: function(t, e, i) {
var n = this._controller,
o = this._controllerhost,
a = this.group;
n.setpointerchecker(function(e, n, o) {
var r = a.getboundingrect();
return r.applytransform(a.transform),
r.contain(n, o) && !mc(e, i, t)
}),
n.enable(t.get("roam")),
o.zoomlimit = t.get("scalelimit"),
o.zoom = t.coordinatesystem.getzoom(),
n.off("pan").off("zoom").on("pan",
function(e) {
pc(o, e.dx, e.dy),
i.dispatchaction({
seriesid: t.id,
type: "treeroam",
dx: e.dx,
dy: e.dy
})
},
this).on("zoom",
function(e) {
gc(o, e.scale, e.originx, e.originy),
i.dispatchaction({
seriesid: t.id,
type: "treeroam",
zoom: e.scale,
originx: e.originx,
originy: e.originy
}),
this._updatenodeandlinkscale(t)
},
this)
},
_updatenodeandlinkscale: function(t) {
var e = t.getdata(),
i = this._getnodeglobalscale(t),
n = [i, i];
e.eachitemgraphicel(function(t, e) {
t.attr("scale", n)
})
},
_getnodeglobalscale: function(t) {
var e = t.coordinatesystem;
if ("view" !== e.type) return 1;
var i = this._nodescaleratio,
n = e.scale,
o = n && n[0] || 1;
return ((e.getzoom() - 1) * i + 1) / o
},
dispose: function() {
this._controller && this._controller.dispose(),
this._controllerhost = {}
},
remove: function() {
this._maingroup.removeall(),
this._data = null
}
}),
ps({
type: "treeexpandandcollapse",
event: "treeexpandandcollapse",
update: "update"
},
function(t, e) {
e.eachcomponent({
maintype: "series",
subtype: "tree",
query: t
},
function(e) {
var i = t.dataindex,
n = e.getdata().tree.getnodebydataindex(i);
n.isexpand = !n.isexpand
})
}),
ps({
type: "treeroam",
event: "treeroam",
update: "none"
},
function(t, e) {
e.eachcomponent({
maintype: "series",
subtype: "tree",
query: t
},
function(e) {
var i = wc(e.coordinatesystem, t);
e.setcenter && e.setcenter(i.center),
e.setzoom && e.setzoom(i.zoom)
})
});
es(hd("tree", "circle")),
os(function(t, e) {
t.eachseriesbytype("tree",
function(t) {
qc(t, e)
})
}),
oi.extend({
type: "series.treemap",
layoutmode: "box",
dependencies: ["grid", "polar"],
_viewroot: null,
defaultoption: {
progressive: 0,
hoverlayerthreshold: 1 / 0,
left: "center",
top: "middle",
right: null,
bottom: null,
width: "80%",
height: "80%",
sort: !0,
clipwindow: "origin",
squareratio: .5 * (1 + math.sqrt(5)),
leafdepth: null,
drilldownicon: "â–¶",
zoomtonoderatio: .1024,
roam: !0,
nodeclick: "zoomtonode",
animation: !0,
animationdurationupdate: 900,
animationeasing: "quinticinout",
breadcrumb: {
show: !0,
height: 22,
left: "center",
top: "bottom",
emptyitemwidth: 25,
itemstyle: {
color: "rgba(0,0,0,0.7)",
bordercolor: "rgba(255,255,255,0.7)",
borderwidth: 1,
shadowcolor: "rgba(150,150,150,1)",
shadowblur: 3,
shadowoffsetx: 0,
shadowoffsety: 0,
textstyle: {
color: "#fff"
}
},
emphasis: {
textstyle: {}
}
},
label: {
show: !0,
distance: 0,
padding: 5,
position: "inside",
color: "#fff",
ellipsis: !0
},
upperlabel: {
show: !1,
position: [0, "50%"],
height: 20,
color: "#fff",
ellipsis: !0,
verticalalign: "middle"
},
itemstyle: {
color: null,
coloralpha: null,
colorsaturation: null,
borderwidth: 0,
gapwidth: 0,
bordercolor: "#fff",
bordercolorsaturation: null
},
emphasis: {
upperlabel: {
show: !0,
position: [0, "50%"],
color: "#fff",
ellipsis: !0,
verticalalign: "middle"
}
},
visualdimension: 0,
visualmin: null,
visualmax: null,
color: [],
coloralpha: null,
colorsaturation: null,
colormappingby: "index",
visiblemin: 10,
childrenvisiblemin: null,
levels: []
},
getinitialdata: function(t, e) {
var i = {
name: t.name,
children: t.data
};
od(i);
var n = t.levels || [];
n = t.levels = ad(n, e);
var o = {};
return o.levels = n,
kc.createtree(i, this, o).data
},
optionupdated: function() {
this.resetviewroot()
},
formattooltip: function(t) {
var e = this.getdata(),
i = this.getrawvalue(t),
n = $o(y(i) ? i[0] : i);
return qo(e.getname(t) + ": " + n)
},
getdataparams: function(t) {
var e = oi.prototype.getdataparams.apply(this, arguments),
i = this.getdata().tree.getnodebydataindex(t);
return e.treepathinfo = nd(i, this),
e
},
setlayoutinfo: function(t) {
this.layoutinfo = this.layoutinfo || {},
a(this.layoutinfo, t)
},
mapidtoindex: function(t) {
var e = this._idindexmap;
e || (e = this._idindexmap = r(), this._idindexmapcount = 0);
var i = e.get(t);
return null == i && e.set(t, i = this._idindexmapcount++),
i
},
getviewroot: function() {
return this._viewroot
},
resetviewroot: function(t) {
t ? this._viewroot = t: t = this._viewroot;
var e = this.getrawdata().tree.root;
t && (t === e || e.contains(t)) || (this._viewroot = e)
}
});
var dc = 5;
rd.prototype = {
constructor: rd,
render: function(t, e, i, n) {
var o = t.getmodel("breadcrumb"),
a = this.group;
if (a.removeall(), o.get("show") && i) {
var r = o.getmodel("itemstyle"),
s = r.getmodel("textstyle"),
l = {
pos: {
left: o.get("left"),
right: o.get("right"),
top: o.get("top"),
bottom: o.get("bottom")
},
box: {
width: e.getwidth(),
height: e.getheight()
},
emptyitemwidth: o.get("emptyitemwidth"),
totalwidth: 0,
renderlist: []
};
this._prepare(i, l, s),
this._rendercontent(t, l, r, s, n),
ua(a, l.pos, l.box)
}
},
_prepare: function(t, e, i) {
for (var n = t; n; n = n.parentnode) {
var o = n.getmodel().get("name"),
a = i.gettextrect(o),
r = math.max(a.width + 16, e.emptyitemwidth);
e.totalwidth += r + 8,
e.renderlist.push({
node: n,
text: o,
width: r
})
}
},
_rendercontent: function(t, e, i, n, o) {
for (var a = 0,
s = e.emptyitemwidth,
l = t.get("breadcrumb.height"), u = sa(e.pos, e.box), h = e.totalwidth, c = e.renderlist, d = c.length - 1; d >= 0; d--) {
var f = c[d],
p = f.node,
g = f.width,
m = f.text;
h > u.width && (h -= g - s, g = s, m = null);
var y = new nm({
shape: {
points: sd(a, 0, g, l, d === c.length - 1, 0 === d)
},
style: r(i.getitemstyle(), {
linejoin: "bevel",
text: m,
textfill: n.gettextcolor(),
textfont: n.getfont()
}),
z: 10,
onclick: v(o, p)
});
this.group.add(y),
ld(y, t, p),
a += g + 8
}
},
remove: function() {
this.group.removeall()
}
};
var cc = m,
lc = zw,
kc = am,
pc = d,
nc = ["label"],
oc = ["emphasis", "label"],
ec = ["upperlabel"],
rc = ["emphasis", "upperlabel"],
zc = 10,
bc = 1,
vc = 2,
gc = wb([["fill", "color"], ["stroke", "strokecolor"], ["linewidth", "strokewidth"], ["shadowblur"], ["shadowoffsetx"], ["shadowoffsety"], ["shadowcolor"]]),
fc = function(t) {
var e = gc(t);
return e.stroke = e.fill = e.linewidth = null,
e
};
fs({
type: "treemap",
init: function(t, e) {
this._containergroup,
this._storage = {
nodegroup: [],
background: [],
content: []
},
this._oldtree,
this._breadcrumb,
this._controller,
this._state = "ready"
},
render: function(t, e, i, n) {
if (! (l(e.findcomponents({
maintype: "series",
subtype: "treemap",
query: n
}), t) < 0)) {
this.seriesmodel = t,
this.api = i,
this.ecmodel = e;
var o = td(n, ["treemapzoomtonode", "treemaproottonode"], t),
a = n && n.type,
r = t.layoutinfo,
s = !this._oldtree,
u = this._storage,
h = "treemaproottonode" === a && o && u ? {
rootnodegroup: u.nodegroup[o.node.getrawindex()],
direction: n.direction
}: null,
c = this._givecontainergroup(r),
d = this._dorender(c, t, h);
s || a && "treemapzoomtonode" !== a && "treemaproottonode" !== a ? d.renderfinally() : this._doanimation(c, d, t, h),
this._resetcontroller(i),
this._renderbreadcrumb(t, i, o)
}
},
_givecontainergroup: function(t) {
var e = this._containergroup;
return e || (e = this._containergroup = new lc, this._initevents(e), this.group.add(e)),
e.attr("position", [t.x, t.y]),
e
},
_dorender: function(t, e, i) {
function n(t, e, i, o, a) {
function r(t) {
return t.getid()
}
function s(r, s) {
var l = null != r ? t[r] : null,
u = null != s ? e[s] : null,
c = h(l, u, i, a);
c && n(l && l.viewchildren || [], u && u.viewchildren || [], c, o, a + 1)
}
o ? (e = t, pc(t,
function(t, e) { ! t.isremoved() && s(e, e)
})) : new hs(e, t, r, r).add(s).update(s).remove(v(s, null)).execute()
}
var o = e.getdata().tree,
a = this._oldtree,
r = {
nodegroup: [],
background: [],
content: []
},
s = {
nodegroup: [],
background: [],
content: []
},
l = this._storage,
u = [],
h = v(hd, e, s, l, i, r, u);
n(o.root ? [o.root] : [], a && a.root ? [a.root] : [], t, o === a || !a, 0);
var c = function(t) {
var e = {
nodegroup: [],
background: [],
content: []
};
return t && pc(t,
function(t, i) {
var n = e[i];
pc(t,
function(t) {
t && (n.push(t), t.__tmwilldelete = 1)
})
}),
e
} (l);
return this._oldtree = o,
this._storage = s,
{
lastsforanimation: r,
willdeleteels: c,
renderfinally: function() {
pc(c,
function(t) {
pc(t,
function(t) {
t.parent && t.parent.remove(t)
})
}),
pc(u,
function(t) {
t.invisible = !0,
t.dirty()
})
}
}
},
_doanimation: function(t, e, i, n) {
if (i.get("animation")) {
var o = i.get("animationdurationupdate"),
r = i.get("animationeasing"),
s = ud();
pc(e.willdeleteels,
function(t, e) {
pc(t,
function(t, i) {
if (!t.invisible) {
var a, l = t.parent;
if (n && "drilldown" === n.direction) a = l === n.rootnodegroup ? {
shape: {
x: 0,
y: 0,
width: l.__tmnodewidth,
height: l.__tmnodeheight
},
style: {
opacity: 0
}
}: {
style: {
opacity: 0
}
};
else {
var u = 0,
h = 0;
l.__tmwilldelete || (u = l.__tmnodewidth / 2, h = l.__tmnodeheight / 2),
a = "nodegroup" === e ? {
position: [u, h],
style: {
opacity: 0
}
}: {
shape: {
x: u,
y: h,
width: 0,
height: 0
},
style: {
opacity: 0
}
}
}
a && s.add(t, a, o, r)
}
})
}),
pc(this._storage,
function(t, i) {
pc(t,
function(t, n) {
var l = e.lastsforanimation[i][n],
u = {};
l && ("nodegroup" === i ? l.old && (u.position = t.position.slice(), t.attr("position", l.old)) : (l.old && (u.shape = a({},
t.shape), t.setshape(l.old)), l.fadein ? (t.setstyle("opacity", 0), u.style = {
opacity: 1
}) : 1 !== t.style.opacity && (u.style = {
opacity: 1
})), s.add(t, u, o, r))
})
},
this),
this._state = "animating",
s.done(cc(function() {
this._state = "ready",
e.renderfinally()
},
this)).start()
}
},
_resetcontroller: function(t) {
var e = this._controller;
e || ((e = this._controller = new ac(t.getzr())).enable(this.seriesmodel.get("roam")), e.on("pan", cc(this._onpan, this)), e.on("zoom", cc(this._onzoom, this)));
var i = new ue(0, 0, t.getwidth(), t.getheight());
e.setpointerchecker(function(t, e, n) {
return i.contain(e, n)
})
},
_clearcontroller: function() {
var t = this._controller;
t && (t.dispose(), t = null)
},
_onpan: function(t) {
if ("animating" !== this._state && (math.abs(t.dx) > 3 || math.abs(t.dy) > 3)) {
var e = this.seriesmodel.getdata().tree.root;
if (!e) return;
var i = e.getlayout();
if (!i) return;
this.api.dispatchaction({
type: "treemapmove",
from: this.uid,
seriesid: this.seriesmodel.id,
rootrect: {
x: i.x + t.dx,
y: i.y + t.dy,
width: i.width,
height: i.height
}
})
}
},
_onzoom: function(t) {
var e = t.originx,
i = t.originy;
if ("animating" !== this._state) {
var n = this.seriesmodel.getdata().tree.root;
if (!n) return;
var o = n.getlayout();
if (!o) return;
var a = new ue(o.x, o.y, o.width, o.height),
r = this.seriesmodel.layoutinfo;
e -= r.x,
i -= r.y;
var s = mt();
_t(s, s, [ - e, -i]),
bt(s, s, [t.scale, t.scale]),
_t(s, s, [e, i]),
a.applytransform(s),
this.api.dispatchaction({
type: "treemaprender",
from: this.uid,
seriesid: this.seriesmodel.id,
rootrect: {
x: a.x,
y: a.y,
width: a.width,
height: a.height
}
})
}
},
_initevents: function(t) {
t.on("click",
function(t) {
if ("ready" === this._state) {
var e = this.seriesmodel.get("nodeclick", !0);
if (e) {
var i = this.findtarget(t.offsetx, t.offsety);
if (i) {
var n = i.node;
if (n.getlayout().isleafroot) this._roottonode(i);
else if ("zoomtonode" === e) this._zoomtonode(i);
else if ("link" === e) {
var o = n.hosttree.data.getitemmodel(n.dataindex),
a = o.get("link", !0),
r = o.get("target", !0) || "blank";
a && window.open(a, r)
}
}
}
}
},
this)
},
_renderbreadcrumb: function(t, e, i) {
i || (i = null != t.get("leafdepth", !0) ? {
node: t.getviewroot()
}: this.findtarget(e.getwidth() / 2, e.getheight() / 2)) || (i = {
node: t.getdata().tree.root
}),
(this._breadcrumb || (this._breadcrumb = new rd(this.group))).render(t, e, i.node, cc(function(e) {
"animating" !== this._state && (id(t.getviewroot(), e) ? this._roottonode({
node: e
}) : this._zoomtonode({
node: e
}))
},
this))
},
remove: function() {
this._clearcontroller(),
this._containergroup && this._containergroup.removeall(),
this._storage = {
nodegroup: [],
background: [],
content: []
},
this._state = "ready",
this._breadcrumb && this._breadcrumb.remove()
},
dispose: function() {
this._clearcontroller()
},
_zoomtonode: function(t) {
this.api.dispatchaction({
type: "treemapzoomtonode",
from: this.uid,
seriesid: this.seriesmodel.id,
targetnode: t.node
})
},
_roottonode: function(t) {
this.api.dispatchaction({
type: "treemaproottonode",
from: this.uid,
seriesid: this.seriesmodel.id,
targetnode: t.node
})
},
findtarget: function(t, e) {
var i;
return this.seriesmodel.getviewroot().eachnode({
attr: "viewchildren",
order: "preorder"
},
function(n) {
var o = this._storage.background[n.getrawindex()];
if (o) {
var a = o.transformcoordtolocal(t, e),
r = o.shape;
if (! (r.x <= a[0] && a[0] <= r.x + r.width && r.y <= a[1] && a[1] <= r.y + r.height)) return ! 1;
i = {
node: n,
offsetx: a[0],
offsety: a[1]
}
}
},
this),
i
}
});
for (var wc = ["treemapzoomtonode", "treemaprender", "treemapmove"], hc = 0; hc < wc.length; hc++) ps({
type: wc[hc],
update: "updateview"
},
function() {});
ps({
type: "treemaproottonode",
update: "updateview"
},
function(t, e) {
e.eachcomponent({
maintype: "series",
subtype: "treemap",
query: t
},
function(e, i) {
var n = td(t, ["treemapzoomtonode", "treemaproottonode"], e);
if (n) {
var o = e.getviewroot();
o && (t.direction = id(o, n.node) ? "rollup": "drilldown"),
e.resetviewroot(n.node)
}
})
});
var zc = d,
uc = w,
xc = -1,
jc = function(t) {
var e = t.mappingmethod,
n = t.type,
o = this.option = i(t);
this.type = n,
this.mappingmethod = e,
this._normalizedata = qc[e];
var a = yc[n];
this.applyvisual = a.applyvisual,
this.getcolormapper = a.getcolormapper,
this._domap = a._domap[e],
"piecewise" === e ? (pd(o), dd(o)) : "category" === e ? o.categories ? fd(o) : pd(o, !0) : (k("linear" !== e || o.dataextent), pd(o))
};
jc.prototype = {
constructor: jc,
mapvaluetovisual: function(t) {
var e = this._normalizedata(t);
return this._domap(e, t)
},
getnormalizer: function() {
return m(this._normalizedata, this)
}
};
var yc = jc.visualhandlers = {
color: {
applyvisual: vd("color"),
getcolormapper: function() {
var t = this.option;
return m("category" === t.mappingmethod ?
function(t, e) {
return ! e && (t = this._normalizedata(t)),
yd.call(this, t)
}: function(e, i, n) {
var o = !!n;
return ! i && (e = this._normalizedata(e)),
n = wt(e, t.parsedvisual, n),
o ? n: xt(n, "rgba")
},
this)
},
_domap: {
linear: function(t) {
return xt(wt(t, this.option.parsedvisual), "rgba")
},
category: yd,
piecewise: function(t, e) {
var i = wd.call(this, e);
return null == i && (i = xt(wt(t, this.option.parsedvisual), "rgba")),
i
},
fixed: xd
}
},
colorhue: gd(function(t, e) {
return zt(t, e)
}),
colorsaturation: gd(function(t, e) {
return zt(t, null, e)
}),
colorlightness: gd(function(t, e) {
return zt(t, null, null, e)
}),
coloralpha: gd(function(t, e) {
return ut(t, e)
}),
opacity: {
applyvisual: vd("opacity"),
_domap: _d([0, 1])
},
liftz: {
applyvisual: vd("liftz"),
_domap: {
linear: xd,
category: xd,
piecewise: xd,
fixed: xd
}
},
symbol: {
applyvisual: function(t, e, i) {
var n = this.mapvaluetovisual(t);
if (_(n)) i("symbol", n);
else if (uc(n)) for (var o in n) n.hasownproperty(o) && i(o, n[o])
},
_domap: {
linear: md,
category: yd,
piecewise: function(t, e) {
var i = wd.call(this, e);
return null == i && (i = md.call(this, t)),
i
},
fixed: xd
}
},
symbolsize: {
applyvisual: vd("symbolsize"),
_domap: _d([0, 1])
}
},
qc = {
linear: function(t) {
return eo(t, this.option.dataextent, [0, 1], !0)
},
piecewise: function(t) {
var e = this.option.piecelist,
i = jc.findpieceindex(t, e, !0);
if (null != i) return eo(i, [0, e.length - 1], [0, 1], !0)
},
category: function(t) {
var e = this.option.categories ? this.option.categorymap[t] : t;
return null == e ? xc: e
},
fixed: b
};
jc.listvisualtypes = function() {
var t = [];
return d(yc,
function(e, i) {
t.push(i)
}),
t
},
jc.addvisualhandler = function(t, e) {
yc[t] = e
},
jc.isvalidtype = function(t) {
return yc.hasownproperty(t)
},
jc.eachvisual = function(t, e, i) {
w(t) ? d(t, e, i) : e.call(i, t)
},
jc.mapvisual = function(t, e, i) {
var n, o = y(t) ? [] : w(t) ? {}: (n = !0, null);
return jc.eachvisual(t,
function(t, a) {
var r = e.call(i, t, a);
n ? o = r: o[a] = r
}),
o
},
jc.retrievevisuals = function(t) {
var e, i = {};
return t && zc(yc,
function(n, o) {
t.hasownproperty(o) && (i[o] = t[o], e = !0)
}),
e ? i: null
},
jc.preparevisualtypes = function(t) {
if (uc(t)) {
var e = [];
zc(t,
function(t, i) {
e.push(i)
}),
t = e
} else {
if (!y(t)) return [];
t = t.slice()
}
return t.sort(function(t, e) {
return "color" === e && "color" !== t && 0 === t.indexof("color") ? 1 : -1
}),
t
},
jc.dependson = function(t, e) {
return "color" === e ? !(!t || 0 !== t.indexof(e)) : t === e
},
jc.findpieceindex = function(t, e, i) {
function n(e, i) {
var n = math.abs(e - t);
n < a && (a = n, o = i)
}
for (var o, a = 1 / 0,
r = 0,
s = e.length; r < s; r++) {
var l = e[r].value;
if (null != l) {
if (l === t || "string" == typeof l && l === t + "") return r;
i && n(l, r)
}
}
for (var r = 0,
s = e.length; r < s; r++) {
var u = e[r],
h = u.interval,
c = u.close;
if (h) {
if (h[0] === -1 / 0) {
if (sd(c[1], t, h[1])) return r
} else if (h[1] === 1 / 0) {
if (sd(c[0], h[0], t)) return r
} else if (sd(c[0], h[0], t) && sd(c[1], t, h[1])) return r;
i && n(h[0], r),
i && n(h[1], r)
}
}
if (i) return t === 1 / 0 ? e.length - 1 : t === -1 / 0 ? 0 : o
};
var kc = y,
$c = "itemstyle",
jc = {
seriestype: "treemap",
reset: function(t, e, i, n) {
var o = t.getdata().tree,
a = o.root,
r = t.getmodel($c);
a.isremoved() || md(a, {},
f(o.levelmodels,
function(t) {
return t ? t.get($c) : null
}), r, t.getviewroot().getancestors(), t)
}
},
qc = math.max,
tl = math.min,
el = t,
il = d,
nl = ["itemstyle", "borderwidth"],
ol = ["itemstyle", "gapwidth"],
al = ["upperlabel", "show"],
rl = ["upperlabel", "height"],
sl = {
seriestype: "treemap",
reset: function(t, e, i, n) {
var o = i.getwidth(),
r = i.getheight(),
s = t.option,
l = la(t.getboxlayoutparams(), {
width: i.getwidth(),
height: i.getheight()
}),
u = s.size || [],
h = ro(el(l.width, u[0]), o),
c = ro(el(l.height, u[1]), r),
d = n && n.type,
f = td(n, ["treemapzoomtonode", "treemaproottonode"], t),
p = "treemaprender" === d || "treemapmove" === d ? n.rootrect: null,
g = t.getviewroot(),
m = ed(g);
if ("treemapmove" !== d) {
var v = "treemapzoomtonode" === d ? vd(t, f, g, h, c) : p ? [p.width, p.height] : [h, c],
y = s.sort;
y && "asc" !== y && "desc" !== y && (y = "desc");
var x = {
squareratio: s.squareratio,
sort: y,
leafdepth: s.leafdepth
};
g.hosttree.clearlayouts();
_ = {
x: 0,
y: 0,
width: v[0],
height: v[1],
area: v[0] * v[1]
};
g.setlayout(_),
pd(g, x, !1, 0);
var _ = g.getlayout();
il(m,
function(t, e) {
var i = (m[e + 1] || g).getvalue();
t.setlayout(a({
dataextent: [i, i],
borderwidth: 0,
upperheight: 0
},
_))
})
}
var w = t.getdata().tree.root;
w.setlayout(gd(l, p, f), !0),
t.setlayoutinfo(l),
fd(w, new ue( - l.x, -l.y, o, r), m, g, 0)
}
};
es(jc),
os(sl);
var ll = function(t) {
this._directed = t || !1,
this.nodes = [],
this.edges = [],
this._nodesmap = {},
this._edgesmap = {},
this.data,
this.edgedata
},
ul = ll.prototype;
ul.type = "graph",
ul.isdirected = function() {
return this._directed
},
ul.addnode = function(t, e) {
t = t || "" + e;
var i = this._nodesmap;
if (!i[hd(t)]) {
var n = new zd(t, e);
return n.hostgraph = this,
this.nodes.push(n),
i[hd(t)] = n,
n
}
},
ul.getnodebyindex = function(t) {
var e = this.data.getrawindex(t);
return this.nodes[e]
},
ul.getnodebyid = function(t) {
return this._nodesmap[hd(t)]
},
ul.addedge = function(t, e, i) {
var n = this._nodesmap,
o = this._edgesmap;
if ("number" == typeof t && (t = this.nodes[t]), "number" == typeof e && (e = this.nodes[e]), zd.isinstance(t) || (t = n[hd(t)]), zd.isinstance(e) || (e = n[hd(e)]), t && e) {
var a = t.id + "-" + e.id;
if (!o[a]) {
var r = new ud(t, e, i);
return r.hostgraph = this,
this._directed && (t.outedges.push(r), e.inedges.push(r)),
t.edges.push(r),
t !== e && e.edges.push(r),
this.edges.push(r),
o[a] = r,
r
}
}
},
ul.getedgebyindex = function(t) {
var e = this.edgedata.getrawindex(t);
return this.edges[e]
},
ul.getedge = function(t, e) {
zd.isinstance(t) && (t = t.id),
zd.isinstance(e) && (e = e.id);
var i = this._edgesmap;
return this._directed ? i[t + "-" + e] : i[t + "-" + e] || i[e + "-" + t]
},
ul.eachnode = function(t, e) {
for (var i = this.nodes,
n = i.length,
o = 0; o < n; o++) i[o].dataindex >= 0 && t.call(e, i[o], o)
},
ul.eachedge = function(t, e) {
for (var i = this.edges,
n = i.length,
o = 0; o < n; o++) i[o].dataindex >= 0 && i[o].node1.dataindex >= 0 && i[o].node2.dataindex >= 0 && t.call(e, i[o], o)
},
ul.breadthfirsttraverse = function(t, e, i, n) {
if (zd.isinstance(e) || (e = this._nodesmap[hd(e)]), e) {
for (var o = "out" === i ? "outedges": "in" === i ? "inedges": "edges", a = 0; a < this.nodes.length; a++) this.nodes[a].__visited = !1;
if (!t.call(n, e, null)) for (var r = [e]; r.length;) for (var s = r.shift(), l = s[o], a = 0; a < l.length; a++) {
var u = l[a],
h = u.node1 === s ? u.node2: u.node1;
if (!h.__visited) {
if (t.call(n, h, s)) return;
r.push(h),
h.__visited = !0
}
}
}
},
ul.update = function() {
for (var t = this.data,
e = this.edgedata,
i = this.nodes,
n = this.edges,
o = 0,
a = i.length; o < a; o++) i[o].dataindex = -1;
for (var o = 0,
a = t.count(); o < a; o++) i[t.getrawindex(o)].dataindex = o;
e.filterself(function(t) {
var i = n[e.getrawindex(t)];
return i.node1.dataindex >= 0 && i.node2.dataindex >= 0
});
for (var o = 0,
a = n.length; o < a; o++) n[o].dataindex = -1;
for (var o = 0,
a = e.count(); o < a; o++) n[e.getrawindex(o)].dataindex = o
},
ul.clone = function() {
for (var t = new ll(this._directed), e = this.nodes, i = this.edges, n = 0; n < e.length; n++) t.addnode(e[n].id, e[n].dataindex);
for (n = 0; n < i.length; n++) {
var o = i[n];
t.addedge(o.node1.id, o.node2.id, o.dataindex)
}
return t
},
zd.prototype = {
constructor: zd,
degree: function() {
return this.edges.length
},
indegree: function() {
return this.inedges.length
},
outdegree: function() {
return this.outedges.length
},
getmodel: function(t) {
if (! (this.dataindex < 0)) return this.hostgraph.data.getitemmodel(this.dataindex).getmodel(t)
}
},
ud.prototype.getmodel = function(t) {
if (! (this.dataindex < 0)) return this.hostgraph.edgedata.getitemmodel(this.dataindex).getmodel(t)
};
var hl = function(t, e) {
return {
getvalue: function(i) {
var n = this[t][e];
return n.get(n.getdimension(i || "value"), this.dataindex)
},
setvisual: function(i, n) {
this.dataindex >= 0 && this[t][e].setitemvisual(this.dataindex, i, n)
},
getvisual: function(i, n) {
return this[t][e].getitemvisual(this.dataindex, i, n)
},
setlayout: function(i, n) {
this.dataindex >= 0 && this[t][e].setitemlayout(this.dataindex, i, n)
},
getlayout: function() {
return this[t][e].getitemlayout(this.dataindex)
},
getgraphicel: function() {
return this[t][e].getitemgraphicel(this.dataindex)
},
getrawindex: function() {
return this[t][e].getrawindex(this.dataindex)
}
}
};
h(zd, hl("hostgraph", "data")),
h(ud, hl("hostgraph", "edgedata")),
ll.node = zd,
ll.edge = ud,
ji(zd),
ji(ud);
var cl = function(t, e, i, n, o) {
for (var a = new ll(n), r = 0; r < t.length; r++) a.addnode(t(t[r].id, t[r].name, r), r);
for (var s = [], u = [], h = 0, r = 0; r < e.length; r++) {
var c = e[r],
d = c.source,
f = c.target;
a.addedge(d, f, h) && (u.push(c), s.push(t(c.id, d + " > " + f)), h++)
}
var p, g = i.get("coordinatesystem");
if ("cartesian2d" === g || "polar" === g) p = dl(t, i);
else {
var m = ba.get(g),
v = m && "view" !== m.type ? m.dimensions || [] : [];
l(v, "value") < 0 && v.concat(["value"]);
var y = oa(t, {
coorddimensions: v
}); (p = new ea(y, i)).initdata(t)
}
var x = new ea(["value"], i);
return x.initdata(u, s),
o && o(p, x),
sc({
maindata: p,
struct: a,
structattr: "graph",
datas: {
node: p,
edge: x
},
datasattr: {
node: "data",
edge: "edgedata"
}
}),
a.update(),
a
},
dl = gs({
type: "series.graph",
init: function(t) {
dl.superapply(this, "init", arguments),
this.legenddataprovider = function() {
return this._categoriesdata
},
this.filldatatextstyle(t.edges || t.links),
this._updatecategoriesdata()
},
mergeoption: function(t) {
dl.superapply(this, "mergeoption", arguments),
this.filldatatextstyle(t.edges || t.links),
this._updatecategoriesdata()
},
mergedefaultandtheme: function(t) {
dl.superapply(this, "mergedefaultandtheme", arguments),
ci(t, ["edgelabel"], ["show"])
},
getinitialdata: function(t, e) {
var i = t.edges || t.links || [],
n = t.data || t.nodes || [],
o = this;
if (n && i) return cl(n, i, this, !0,
function(t, i) {
function n(t) {
return (t = this.parsepath(t)) && "label" === t[0] ? r: t && "emphasis" === t[0] && "label" === t[1] ? l: this.parentmodel
}
t.wrapmethod("getitemmodel",
function(t) {
var e = o._categoriesmodels[t.getshallow("category")];
return e && (e.parentmodel = t.parentmodel, t.parentmodel = e),
t
});
var a = o.getmodel("edgelabel"),
r = new lo({
label: a.option
},
a.parentmodel, e),
s = o.getmodel("emphasis.edgelabel"),
l = new lo({
emphasis: {
label: s.option
}
},
s.parentmodel, e);
i.wrapmethod("getitemmodel",
function(t) {
return t.customizegetparent(n),
t
})
}).data
},
getgraph: function() {
return this.getdata().graph
},
getedgedata: function() {
return this.getgraph().edgedata
},
getcategoriesdata: function() {
return this._categoriesdata
},
formattooltip: function(t, e, i) {
if ("edge" === i) {
var n = this.getdata(),
o = this.getdataparams(t, i),
a = n.graph.getedgebyindex(t),
r = n.getname(a.node1.dataindex),
s = n.getname(a.node2.dataindex),
l = [];
return null != r && l.push(r),
null != s && l.push(s),
l = qo(l.join(" > ")),
o.value && (l += " : " + qo(o.value)),
l
}
return dl.superapply(this, "formattooltip", arguments)
},
_updatecategoriesdata: function() {
var t = f(this.option.categories || [],
function(t) {
return null != t.value ? t: a({
value: 0
},
t)
}),
e = new ea(["value"], this);
e.initdata(t),
this._categoriesdata = e,
this._categoriesmodels = e.maparray(function(t) {
return e.getitemmodel(t, !0)
})
},
setzoom: function(t) {
this.option.zoom = t
},
setcenter: function(t) {
this.option.center = t
},
isanimationenabled: function() {
return dl.supercall(this, "isanimationenabled") && !("force" === this.get("layout") && this.get("force.layoutanimation"))
},
defaultoption: {
zlevel: 0,
z: 2,
coordinatesystem: "view",
legendhoverlink: !0,
hoveranimation: !0,
layout: null,
focusnodeadjacency: !1,
circular: {
rotatelabel: !1
},
force: {
initlayout: null,
repulsion: [0, 50],
gravity: .1,
edgelength: 30,
layoutanimation: !0
},
left: "center",
top: "center",
symbol: "circle",
symbolsize: 10,
edgesymbol: ["none", "none"],
edgesymbolsize: 10,
edgelabel: {
position: "middle"
},
draggable: !1,
roam: !1,
center: null,
zoom: 1,
nodescaleratio: .6,
label: {
show: !1,
formatter: "{b}"
},
itemstyle: {},
linestyle: {
color: "#aaa",
width: 1,
curveness: 0,
opacity: .5
},
emphasis: {
label: {
show: !0
}
}
}
}),
fl = rm.prototype,
pl = lm.prototype,
gl = fn({
type: "ec-line",
style: {
stroke: "#000",
fill: null
},
shape: {
x1: 0,
y1: 0,
x2: 0,
y2: 0,
percent: 1,
cpx1: null,
cpy1: null
},
buildpath: function(t, e) { (xd(e) ? fl: pl).buildpath(t, e)
},
pointat: function(t) {
return xd(this.shape) ? fl.pointat.call(this, t) : pl.pointat.call(this, t)
},
tangentat: function(t) {
var e = this.shape,
i = xd(e) ? [e.x2 - e.x1, e.y2 - e.y1] : pl.tangentat.call(this, t);
return q(i, i)
}
}),
ml = ["fromsymbol", "tosymbol"],
vl = $d.prototype;
vl.beforeupdate = function() {
var t = this,
e = t.childofname("fromsymbol"),
i = t.childofname("tosymbol"),
n = t.childofname("label");
if (e || i || !n.ignore) {
for (var o = 1,
a = this.parent; a;) a.scale && (o /= a.scale[0]),
a = a.parent;
var r = t.childofname("line");
if (this.__dirty || r.__dirty) {
var s = r.shape.percent,
l = r.pointat(0),
u = r.pointat(s),
h = u([], u, l);
if (q(h, h), e && (e.attr("position", l), c = r.tangentat(0), e.attr("rotation", math.pi / 2 - math.atan2(c[1], c[0])), e.attr("scale", [o * s, o * s])), i) {
i.attr("position", u);
var c = r.tangentat(1);
i.attr("rotation", -math.pi / 2 - math.atan2(c[1], c[0])),
i.attr("scale", [o * s, o * s])
}
if (!n.ignore) {
n.attr("position", u);
var d, f, p, g = 5 * o;
if ("end" === n.__position) d = [h[0] * g + u[0], h[1] * g + u[1]],
f = h[0] > .8 ? "left": h[0] < -.8 ? "right": "center",
p = h[1] > .8 ? "top": h[1] < -.8 ? "bottom": "middle";
else if ("middle" === n.__position) {
var m = s / 2,
v = [(c = r.tangentat(m))[1], -c[0]],
y = r.pointat(m);
v[1] > 0 && (v[0] = -v[0], v[1] = -v[1]),
d = [y[0] + v[0] * g, y[1] + v[1] * g],
f = "center",
p = "bottom";
var x = -math.atan2(c[1], c[0]);
u[0] < l[0] && (x = math.pi + x),
n.attr("rotation", x)
} else d = [ - h[0] * g + l[0], -h[1] * g + l[1]],
f = h[0] > .8 ? "right": h[0] < -.8 ? "left": "center",
p = h[1] > .8 ? "bottom": h[1] < -.8 ? "top": "middle";
n.attr({
style: {
textverticalalign: n.__verticalalign || p,
textalign: n.__textalign || f
},
position: d,
scale: [o, o]
})
}
}
}
},
vl._createline = function(t, e, i) {
var n = t.hostmodel,
o = qd(t.getitemlayout(e));
o.shape.percent = 0,
so(o, {
shape: {
percent: 1
}
},
n, e),
this.add(o);
var a = new qs({
name: "label"
});
this.add(a),
d(ml,
function(i) {
var n = yd(i, t, e);
this.add(n),
this[jd(i)] = t.getitemvisual(e, i)
},
this),
this._updatecommonstl(t, e, i)
},
vl.updatedata = function(t, e, i) {
var n = t.hostmodel,
o = this.childofname("line"),
a = t.getitemlayout(e),
r = {
shape: {}
};
kd(r.shape, a),
bo(o, r, n, e),
d(ml,
function(i) {
var n = t.getitemvisual(e, i),
o = jd(i);
if (this[o] !== n) {
this.remove(this.childofname(i));
var a = yd(i, t, e);
this.add(a)
}
this[o] = n
},
this),
this._updatecommonstl(t, e, i)
},
vl._updatecommonstl = function(t, e, i) {
var n = t.hostmodel,
o = this.childofname("line"),
a = i && i.linestyle,
s = i && i.hoverlinestyle,
l = i && i.labelmodel,
u = i && i.hoverlabelmodel;
if (!i || t.hasitemoption) {
var h = t.getitemmodel(e);
a = h.getmodel("linestyle").getlinestyle(),
s = h.getmodel("emphasis.linestyle").getlinestyle(),
l = h.getmodel("label"),
u = h.getmodel("emphasis.label")
}
var c = t.getitemvisual(e, "color"),
f = d(t.getitemvisual(e, "opacity"), a.opacity, 1);
o.usestyle(r({
strokenoscale: !0,
fill: "none",
stroke: c,
opacity: f
},
a)),
o.hoverstyle = s,
d(ml,
function(t) {
var e = this.childofname(t);
e && (e.setcolor(c), e.setstyle({
opacity: f
}))
},
this);
var p, g, m = l.getshallow("show"),
v = u.getshallow("show"),
y = this.childofname("label");
if ((m || v) && (p = c || "#000", null == (g = n.getformattedlabel(e, "normal", t.datatype)))) {
var x = n.getrawvalue(e);
g = null == x ? t.getname(e) : isfinite(x) ? zo(x) : x
}
var _ = m ? g: null,
w = v ? a(n.getformattedlabel(e, "emphasis", t.datatype), g) : null,
b = y.style;
null == _ && null == w || (fo(y.style, l, {
text: _
},
{
autocolor: p
}), y.__textalign = b.textalign, y.__verticalalign = b.textverticalalign, y.__position = l.get("position") || "middle"),
y.hoverstyle = null != w ? {
text: w,
textfill: u.gettextcolor(!0),
fontstyle: u.getshallow("fontstyle"),
fontweight: u.getshallow("fontweight"),
fontsize: u.getshallow("fontsize"),
fontfamily: u.getshallow("fontfamily")
}: {
text: null
},
y.ignore = !m && !v,
uo(this)
},
vl.highlight = function() {
this.trigger("emphasis")
},
vl.downplay = function() {
this.trigger("normal")
},
vl.updatelayout = function(t, e) {
this.setlinepoints(t.getitemlayout(e))
},
vl.setlinepoints = function(t) {
var e = this.childofname("line");
kd(e.shape, t),
e.dirty()
},
u($d, zw);
var yl = jd.prototype;
yl.ispersistent = function() {
return ! 0
},
yl.updatedata = function(t) {
var e = this,
i = e.group,
n = e._linedata;
e._linedata = t,
n || i.removeall();
var o = ef(t);
t.diff(n).add(function(i) {
qd(e, t, i, o)
}).update(function(i, a) {
tf(e, n, t, a, i, o)
}).remove(function(t) {
i.remove(n.getitemgraphicel(t))
}).execute()
},
yl.updatelayout = function() {
var t = this._linedata;
t && t.eachitemgraphicel(function(e, i) {
e.updatelayout(t, i)
},
this)
},
yl.incrementalprepareupdate = function(t) {
this._seriesscope = ef(t),
this._linedata = null,
this.group.removeall()
},
yl.incrementalupdate = function(t, e) {
for (var i = t.start; i < t.end; i++) if (of(e.getitemlayout(i))) {
var n = new this._ctor(e, i, this._seriesscope);
n.traverse(function(t) {
t.isgroup || (t.incremental = t.usehoverlayer = !0)
}),
this.group.add(n),
e.setitemgraphicel(i, n)
}
},
yl.remove = function() {
this._clearincremental(),
this._incremental = null,
this.group.removeall()
},
yl._clearincremental = function() {
var t = this._incremental;
t && t.cleardisplaybles()
};
var xl = [],
_l = [],
wl = [],
bl = rn,
sl = iw,
ml = math.abs,
il = function(t, e) {
function i(t) {
var e = t.getvisual("symbolsize");
return e instanceof array && (e = (e[0] + e[1]) / 2),
e
}
var n = [],
o = hn,
a = [[], [], []],
r = [[], []],
s = [];
e /= 2,
t.eachedge(function(t, l) {
var u = t.getlayout(),
h = t.getvisual("fromsymbol"),
c = t.getvisual("tosymbol");
u.__original || (u.__original = [f(u[0]), f(u[1])], u[2] && u.__original.push(f(u[2])));
var d = u.__original;
if (null != u[2]) {
if (g(a[0], d[0]), g(a[1], d[2]), g(a[2], d[1]), h && "none" !== h) {
var f = i(t.node1),
p = af(a, d[0], f * e);
o(a[0][0], a[1][0], a[2][0], p, n),
a[0][0] = n[3],
a[1][0] = n[4],
o(a[0][1], a[1][1], a[2][1], p, n),
a[0][1] = n[3],
a[1][1] = n[4]
}
if (c && "none" !== c) {
var f = i(t.node2),
p = af(a, d[1], f * e);
o(a[0][0], a[1][0], a[2][0], p, n),
a[1][0] = n[1],
a[2][0] = n[2],
o(a[0][1], a[1][1], a[2][1], p, n),
a[1][1] = n[1],
a[2][1] = n[2]
}
g(u[0], a[0]),
g(u[1], a[2]),
g(u[2], a[1])
} else {
if (g(r[0], d[0]), g(r[1], d[1]), u(s, r[1], r[0]), q(s, s), h && "none" !== h) {
f = i(t.node1);
z(r[0], r[0], s, f * e)
}
if (c && "none" !== c) {
f = i(t.node2);
z(r[1], r[1], s, -f * e)
}
g(u[0], r[0]),
g(u[1], r[1])
}
})
},
tl = ["itemstyle", "opacity"],
al = ["linestyle", "opacity"];
fs({
type: "graph",
init: function(t, e) {
var i = new su,
n = new jd,
o = this.group;
this._controller = new ac(e.getzr()),
this._controllerhost = {
target: o
},
o.add(i.group),
o.add(n.group),
this._symboldraw = i,
this._linedraw = n,
this._firstrender = !0
},
render: function(t, e, i) {
var n = t.coordinatesystem;
this._model = t,
this._nodescaleratio = t.get("nodescaleratio");
var o = this._symboldraw,
a = this._linedraw,
r = this.group;
if ("view" === n.type) {
var s = {
position: n.position,
scale: n.scale
};
this._firstrender ? r.attr(s) : bo(r, s, t)
}
il(t.getgraph(), this._getnodeglobalscale(t));
var l = t.getdata();
o.updatedata(l);
var u = t.getedgedata();
a.updatedata(u),
this._updatenodeandlinkscale(),
this._updatecontroller(t, e, i),
cleartimeout(this._layouttimeout);
var h = t.forcelayout,
c = t.get("force.layoutanimation");
h && this._startforcelayoutiteration(h, c),
l.eachitemgraphicel(function(e, n) {
var o = l.getitemmodel(n);
e.off("drag").off("dragend");
var a = o.get("draggable");
a && e.on("drag",
function() {
h && (h.warmup(), !this._layouting && this._startforcelayoutiteration(h, c), h.setfixed(n), l.setitemlayout(n, e.position))
},
this).on("dragend",
function() {
h && h.setunfixed(n)
},
this),
e.setdraggable(a && h),
e.off("mouseover", e.__focusnodeadjacency),
e.off("mouseout", e.__unfocusnodeadjacency),
o.get("focusnodeadjacency") && (e.on("mouseover", e.__focusnodeadjacency = function() {
i.dispatchaction({
type: "focusnodeadjacency",
seriesid: t.id,
dataindex: e.dataindex
})
}), e.on("mouseout", e.__unfocusnodeadjacency = function() {
i.dispatchaction({
type: "unfocusnodeadjacency",
seriesid: t.id
})
}))
},
this),
l.graph.eachedge(function(e) {
var n = e.getgraphicel();
n.off("mouseover", n.__focusnodeadjacency),
n.off("mouseout", n.__unfocusnodeadjacency),
e.getmodel().get("focusnodeadjacency") && (n.on("mouseover", n.__focusnodeadjacency = function() {
i.dispatchaction({
type: "focusnodeadjacency",
seriesid: t.id,
edgedataindex: e.dataindex
})
}), n.on("mouseout", n.__unfocusnodeadjacency = function() {
i.dispatchaction({
type: "unfocusnodeadjacency",
seriesid: t.id
})
}))
});
var d = "circular" === t.get("layout") && t.get("circular.rotatelabel"),
f = l.getlayout("cx"),
p = l.getlayout("cy");
l.eachitemgraphicel(function(t, e) {
var i = t.getsymbolpath();
if (d) {
var n = l.getitemlayout(e),
o = math.atan2(n[1] - p, n[0] - f);
o < 0 && (o = 2 * math.pi + o);
var a = n[0] < f;
a && (o -= math.pi);
var r = a ? "left": "right";
i.setstyle({
textrotation: -o,
textposition: r,
textorigin: "center"
}),
i.hoverstyle && (i.hoverstyle.textposition = r)
} else i.setstyle({
textrotation: 0
})
}),
this._firstrender = !1
},
dispose: function() {
this._controller && this._controller.dispose(),
this._controllerhost = {}
},
focusnodeadjacency: function(t, e, i, n) {
var o = this._model.getdata().graph,
a = n.dataindex,
r = n.edgedataindex,
s = o.getnodebyindex(a),
l = o.getedgebyindex(r); (s || l) && (o.eachnode(function(t) {
sf(t, tl, .1)
}), o.eachedge(function(t) {
sf(t, al, .1)
}), s && (lf(s, tl), d(s.edges,
function(t) {
t.dataindex < 0 || (lf(t, al), lf(t.node1, tl), lf(t.node2, tl))
})), l && (lf(l, al), lf(l.node1, tl), lf(l.node2, tl)))
},
unfocusnodeadjacency: function(t, e, i, n) {
var o = this._model.getdata().graph;
o.eachnode(function(t) {
sf(t, tl)
}),
o.eachedge(function(t) {
sf(t, al)
})
},
_startforcelayoutiteration: function(t, e) {
var i = this; !
function n() {
t.step(function(t) {
i.updatelayout(i._model),
(i._layouting = !t) && (e ? i._layouttimeout = settimeout(n, 16) : n())
})
} ()
},
_updatecontroller: function(t, e, i) {
var n = this._controller,
o = this._controllerhost,
a = this.group;
n.setpointerchecker(function(e, n, o) {
var r = a.getboundingrect();
return r.applytransform(a.transform),
r.contain(n, o) && !mc(e, i, t)
}),
"view" === t.coordinatesystem.type ? (n.enable(t.get("roam")), o.zoomlimit = t.get("scalelimit"), o.zoom = t.coordinatesystem.getzoom(), n.off("pan").off("zoom").on("pan",
function(e) {
pc(o, e.dx, e.dy),
i.dispatchaction({
seriesid: t.id,
type: "graphroam",
dx: e.dx,
dy: e.dy
})
}).on("zoom",
function(e) {
gc(o, e.scale, e.originx, e.originy),
i.dispatchaction({
seriesid: t.id,
type: "graphroam",
zoom: e.scale,
originx: e.originx,
originy: e.originy
}),
this._updatenodeandlinkscale(),
il(t.getgraph(), this._getnodeglobalscale(t)),
this._linedraw.updatelayout()
},
this)) : n.disable()
},
_updatenodeandlinkscale: function() {
var t = this._model,
e = t.getdata(),
i = this._getnodeglobalscale(t),
n = [i, i];
e.eachitemgraphicel(function(t, e) {
t.attr("scale", n)
})
},
_getnodeglobalscale: function(t) {
var e = t.coordinatesystem;
if ("view" !== e.type) return 1;
var i = this._nodescaleratio,
n = e.scale,
o = n && n[0] || 1;
return ((e.getzoom() - 1) * i + 1) / o
},
updatelayout: function(t) {
il(t.getgraph(), this._getnodeglobalscale(t)),
this._symboldraw.updatelayout(),
this._linedraw.updatelayout()
},
remove: function(t, e) {
this._symboldraw && this._symboldraw.remove(),
this._linedraw && this._linedraw.remove()
}
}),
ps({
type: "focusnodeadjacency",
event: "focusnodeadjacency",
update: "series:focusnodeadjacency"
},
function() {}),
ps({
type: "unfocusnodeadjacency",
event: "unfocusnodeadjacency",
update: "series:unfocusnodeadjacency"
},
function() {}),
ps({
type: "graphroam",
event: "graphroam",
update: "none"
},
function(t, e) {
e.eachcomponent({
maintype: "series",
query: t
},
function(e) {
var i = wc(e.coordinatesystem, t);
e.setcenter && e.setcenter(i.center),
e.setzoom && e.setzoom(i.zoom)
})
});
var dl = z;
ks(function(t) {
var e = t.findcomponents({
maintype: "legend"
});
e && e.length && t.eachseriesbytype("graph",
function(t) {
var i = t.getcategoriesdata(),
n = t.getgraph().data,
o = i.maparray(i.getname);
n.filterself(function(t) {
var i = n.getitemmodel(t).getshallow("category");
if (null != i) {
"number" == typeof i && (i = o[i]);
for (var a = 0; a < e.length; a++) if (!e[a].isselected(i)) return ! 1
}
return ! 0
})
},
this)
}),
es(hd("graph", "circle", null)),
es(function(t) {
var e = {};
t.eachseriesbytype("graph",
function(t) {
var i = t.getcategoriesdata(),
n = t.getdata(),
o = {};
i.each(function(n) {
var a = i.getname(n);
o["ec-" + a] = n;
var r = i.getitemmodel(n).get("itemstyle.color") || t.getcolorfrompalette(a, e);
i.setitemvisual(n, "color", r)
}),
i.count() && n.each(function(t) {
var e = n.getitemmodel(t).getshallow("category");
null != e && ("string" == typeof e && (e = o["ec-" + e]), n.getitemvisual(t, "color", !0) || n.setitemvisual(t, "color", i.getitemvisual(e, "color")))
})
})
}),
es(function(t) {
t.eachseriesbytype("graph",
function(t) {
var e = t.getgraph(),
i = t.getedgedata(),
n = uf(t.get("edgesymbol")),
o = uf(t.get("edgesymbolsize")),
a = "linestyle.color".split("."),
r = "linestyle.opacity".split(".");
i.setvisual("fromsymbol", n && n[0]),
i.setvisual("tosymbol", n && n[1]),
i.setvisual("fromsymbolsize", o && o[0]),
i.setvisual("tosymbolsize", o && o[1]),
i.setvisual("color", t.get(a)),
i.setvisual("opacity", t.get(r)),
i.each(function(t) {
var n = i.getitemmodel(t),
o = e.getedgebyindex(t),
s = uf(n.getshallow("symbol", !0)),
l = uf(n.getshallow("symbolsize", !0)),
u = n.get(a),
h = n.get(r);
switch (u) {
case "source":
u = o.node1.getvisual("color");
break;
case "target":
u = o.node2.getvisual("color")
}
s[0] && o.setvisual("fromsymbol", s[0]),
s[1] && o.setvisual("tosymbol", s[1]),
l[0] && o.setvisual("fromsymbolsize", l[0]),
l[1] && o.setvisual("tosymbolsize", l[1]),
o.setvisual("color", u),
o.setvisual("opacity", h)
})
})
}),
os(function(t, e) {
t.eachseriesbytype("graph",
function(t) {
var e = t.get("layout"),
i = t.coordinatesystem;
if (i && "view" !== i.type) {
var n = t.getdata(),
o = [];
d(i.dimensions,
function(t) {
o = o.concat(n.mapdimension(t, !0))
});
for (var a = 0; a < n.count(); a++) {
for (var r = [], s = !1, l = 0; l < o.length; l++) {
var u = n.get(o[l], a);
isnan(u) || (s = !0),
r.push(u)
}
s ? n.setitemlayout(a, i.datatopoint(r)) : n.setitemlayout(a, [nan, nan])
}
cf(n.graph)
} else e && "none" !== e || hf(t)
})
}),
os(function(t) {
t.eachseriesbytype("graph",
function(t) {
"circular" === t.get("layout") && df(t)
})
}),
os(function(t) {
t.eachseriesbytype("graph",
function(t) {
var e = t.coordinatesystem;
if (!e || "view" === e.type) if ("force" === t.get("layout")) {
var i = t.preservedpoints || {},
n = t.getgraph(),
o = n.data,
a = n.edgedata,
r = t.getmodel("force"),
s = r.get("initlayout");
t.preservedpoints ? o.each(function(t) {
var e = o.getid(t);
o.setitemlayout(t, i[e] || [nan, nan])
}) : s && "none" !== s ? "circular" === s && df(t) : hf(t);
var l = o.getdataextent("value"),
u = a.getdataextent("value"),
h = r.get("repulsion"),
c = r.get("edgelength");
y(h) || (h = [h, h]),
y(c) || (c = [c, c]),
c = [c[1], c[0]];
var d = o.maparray("value",
function(t, e) {
var i = o.getitemlayout(e),
n = eo(t, l, h);
return isnan(n) && (n = (h[0] + h[1]) / 2),
{
w: n,
rep: n,
fixed: o.getitemmodel(e).get("fixed"),
p: !i || isnan(i[0]) || isnan(i[1]) ? null: i
}
}),
f = a.maparray("value",
function(t, e) {
var i = n.getedgebyindex(e),
o = eo(t, u, c);
return isnan(o) && (o = (c[0] + c[1]) / 2),
{
n1: d[i.node1.dataindex],
n2: d[i.node2.dataindex],
d: o,
curveness: i.getmodel().get("linestyle.curveness") || 0
}
}),
p = (e = t.coordinatesystem).getboundingrect(),
g = ff(d, f, {
rect: p,
gravity: r.get("gravity")
}),
m = g.step;
g.step = function(t) {
for (var e = 0,
a = d.length; e < a; e++) d[e].fixed && g(d[e].p, n.getnodebyindex(e).getlayout());
m(function(e, a, r) {
for (var s = 0,
l = e.length; s < l; s++) e[s].fixed || n.getnodebyindex(s).setlayout(e[s].p),
i[o.getid(s)] = e[s].p;
for (var s = 0,
l = a.length; s < l; s++) {
var u = a[s],
h = n.getedgebyindex(s),
c = u.n1.p,
d = u.n2.p,
f = h.getlayout(); (f = f ? f.slice() : [])[0] = f[0] || [],
f[1] = f[1] || [],
g(f[0], c),
g(f[1], d),
+u.curveness && (f[2] = [(c[0] + d[0]) / 2 - (c[1] - d[1]) * u.curveness, (c[1] + d[1]) / 2 - (d[0] - c[0]) * u.curveness]),
h.setlayout(f)
}
t && t(r)
})
},
t.forcelayout = g,
t.preservedpoints = i,
g.step()
} else t.forcelayout = null
})
}),
ns("graphview", {
create: function(t, e) {
var i = [];
return t.eachseriesbytype("graph",
function(t) {
var n = t.get("coordinatesystem");
if (!n || "view" === n) {
var o = t.getdata(),
a = [],
r = [];
dn(o.maparray(function(t) {
var e = o.getitemmodel(t);
return [ + e.get("x"), +e.get("y")]
}), a, r),
r[0] - a[0] == 0 && (r[0] += 1, a[0] -= 1),
r[1] - a[1] == 0 && (r[1] += 1, a[1] -= 1);
var s = (r[0] - a[0]) / (r[1] - a[1]),
l = pf(t, e, s);
isnan(s) && (a = [l.x, l.y], r = [l.x + l.width, l.y + l.height]);
var u = r[0] - a[0],
h = r[1] - a[1],
c = l.width,
d = l.height,
f = t.coordinatesystem = new uh;
f.zoomlimit = t.get("scalelimit"),
f.setboundingrect(a[0], a[1], u, h),
f.setviewrect(l.x, l.y, c, d),
f.setcenter(t.get("center")),
f.setzoom(t.get("zoom")),
i.push(f)
}
}),
i
}
});
oi.extend({
type: "series.gauge",
getinitialdata: function(t, e) {
var i = t.data || [];
return y(i) || (i = [i]),
t.data = i,
wd(this, ["value"])
},
defaultoption: {
zlevel: 0,
z: 2,
center: ["50%", "50%"],
legendhoverlink: !0,
radius: "75%",
startangle: 225,
endangle: -45,
clockwise: !0,
min: 0,
max: 100,
splitnumber: 10,
axisline: {
show: !0,
linestyle: {
color: [[.2, "#91c7ae"], [.8, "#63869e"], [1, "#c23531"]],
width: 30
}
},
splitline: {
show: !0,
length: 30,
linestyle: {
color: "#eee",
width: 2,
type: "solid"
}
},
axistick: {
show: !0,
splitnumber: 5,
length: 8,
linestyle: {
color: "#eee",
width: 1,
type: "solid"
}
},
axislabel: {
show: !0,
distance: 5,
color: "auto"
},
pointer: {
show: !0,
length: "80%",
width: 8
},
itemstyle: {
color: "auto"
},
title: {
show: !0,
offsetcenter: [0, "-40%"],
color: "#333",
fontsize: 15
},
detail: {
show: !0,
backgroundcolor: "rgba(0,0,0,0)",
borderwidth: 0,
bordercolor: "#ccc",
width: 100,
height: null,
padding: [5, 10],
offsetcenter: [0, "40%"],
color: "auto",
fontsize: 30
}
}
});
var cl = kn.extend({
type: "echartsgaugepointer",
shape: {
angle: 0,
width: 10,
r: 10,
x: 0,
y: 0
},
buildpath: function(t, e) {
var i = math.cos,
n = math.sin,
o = e.r,
a = e.width,
r = e.angle,
s = e.x - i(r) * a * (a >= o / 3 ? 1 : 2),
l = e.y - n(r) * a * (a >= o / 3 ? 1 : 2);
r = e.angle - math.pi / 2,
t.moveto(s, l),
t.lineto(e.x + i(r) * a, e.y + n(r) * a),
t.lineto(e.x + i(e.angle) * o, e.y + n(e.angle) * o),
t.lineto(e.x - i(r) * a, e.y - n(r) * a),
t.lineto(s, l)
}
}),
ll = 2 * math.pi,
kl = (mr.extend({
type: "gauge",
render: function(t, e, i) {
this.group.removeall();
var n = t.get("axisline.linestyle.color"),
o = gf(t, i);
this._rendermain(t, e, i, n, o)
},
dispose: function() {},
_rendermain: function(t, e, i, n, o) {
for (var a = this.group,
r = t.getmodel("axisline").getmodel("linestyle"), s = t.get("clockwise"), l = -t.get("startangle") / 180 * math.pi, u = -t.get("endangle") / 180 * math.pi, h = (u - l) % ll, c = l, d = r.get("width"), f = 0; f < n.length; f++) {
var p = math.min(math.max(n[f][0], 0), 1),
g = new qs({
shape: {
startangle: c,
endangle: u = l + h * p,
cx: o.cx,
cy: o.cy,
clockwise: s,
r0: o.r - d,
r: o.r
},
silent: !0
});
g.setstyle({
fill: n[f][1]
}),
g.setstyle(r.getlinestyle(["color", "borderwidth", "bordercolor"])),
a.add(g),
c = u
}
var m = function(t) {
if (t <= 0) return n[0][1];
for (var e = 0; e < n.length; e++) if (n[e][0] >= t && (0 === e ? 0 : n[e - 1][0]) < t) return n[e][1];
return n[e - 1][1]
};
if (!s) {
var v = l;
l = u,
u = v
}
this._renderticks(t, e, i, m, o, l, u, s),
this._renderpointer(t, e, i, m, o, l, u, s),
this._rendertitle(t, e, i, m, o),
this._renderdetail(t, e, i, m, o)
},
_renderticks: function(t, e, i, n, o, a, r, s) {
for (var l = this.group,
u = o.cx,
h = o.cy,
c = o.r,
d = +t.get("min"), f = +t.get("max"), p = t.getmodel("splitline"), g = t.getmodel("axistick"), m = t.getmodel("axislabel"), v = t.get("splitnumber"), y = g.get("splitnumber"), x = ro(p.get("length"), c), _ = ro(g.get("length"), c), w = a, b = (r - a) / v, s = b / y, m = p.getmodel("linestyle").getlinestyle(), i = g.getmodel("linestyle").getlinestyle(), t = 0; t <= v; t++) {
var a = math.cos(w),
d = math.sin(w);
if (p.get("show")) {
var c = new rm({
shape: {
x1: a * c + u,
y1: d * c + h,
x2: a * (c - x) + u,
y2: d * (c - x) + h
},
style: m,
silent: !0
});
"auto" === m.stroke && c.setstyle({
stroke: n(t / v)
}),
l.add(c)
}
if (m.get("show")) {
var l = mf(zo(t / v * (f - d) + d), m.get("formatter")),
k = m.get("distance"),
p = n(t / v);
l.add(new qs({
style: fo({},
m, {
text: l,
x: a * (c - x - k) + u,
y: d * (c - x - k) + h,
textverticalalign: d < -.4 ? "top": d > .4 ? "bottom": "middle",
textalign: a < -.4 ? "left": a > .4 ? "right": "center"
},
{
autocolor: p
}),
silent: !0
}))
}
if (g.get("show") && t !== v) {
for (var n = 0; n <= y; n++) {
var a = math.cos(w),
d = math.sin(w),
o = new rm({
shape: {
x1: a * c + u,
y1: d * c + h,
x2: a * (c - _) + u,
y2: d * (c - _) + h
},
silent: !0,
style: i
});
"auto" === i.stroke && o.setstyle({
stroke: n((t + n / y) / v)
}),
l.add(o),
w += s
}
w -= s
} else w += b
}
},
_renderpointer: function(t, e, i, n, o, a, r, s) {
var l = this.group,
u = this._data;
if (t.get("pointer.show")) {
var h = [ + t.get("min"), +t.get("max")],
c = [a, r],
d = t.getdata(),
f = d.mapdimension("value");
d.diff(u).add(function(e) {
var i = new cl({
shape: {
angle: a
}
});
so(i, {
shape: {
angle: eo(d.get(f, e), h, c, !0)
}
},
t),
l.add(i),
d.setitemgraphicel(e, i)
}).update(function(e, i) {
var n = u.getitemgraphicel(i);
bo(n, {
shape: {
angle: eo(d.get(f, e), h, c, !0)
}
},
t),
l.add(n),
d.setitemgraphicel(e, n)
}).remove(function(t) {
var e = u.getitemgraphicel(t);
l.remove(e)
}).execute(),
d.eachitemgraphicel(function(t, e) {
var i = d.getitemmodel(e),
a = i.getmodel("pointer");
t.setshape({
x: o.cx,
y: o.cy,
width: ro(a.get("width"), o.r),
r: ro(a.get("length"), o.r)
}),
t.usestyle(i.getmodel("itemstyle").getitemstyle()),
"auto" === t.style.fill && t.setstyle("fill", n(eo(d.get(f, e), h, [0, 1], !0))),
uo(t, i.getmodel("emphasis.itemstyle").getitemstyle())
}),
this._data = d
} else u && u.eachitemgraphicel(function(t) {
l.remove(t)
})
},
_rendertitle: function(t, e, i, n, o) {
var a = t.getdata(),
r = a.mapdimension("value"),
s = t.getmodel("title");
if (s.get("show")) {
var l = s.get("offsetcenter"),
u = o.cx + ro(l[0], o.r),
h = o.cy + ro(l[1], o.r),
c = +t.get("min"),
d = +t.get("max"),
f = n(eo(t.getdata().get(r, 0), [c, d], [0, 1], !0));
this.group.add(new qs({
silent: !0,
style: fo({},
s, {
x: u,
y: h,
text: a.getname(0),
textalign: "center",
textverticalalign: "middle"
},
{
autocolor: f,
forcerich: !0
})
}))
}
},
_renderdetail: function(t, e, i, n, o) {
var a = t.getmodel("detail"),
r = +t.get("min"),
s = +t.get("max");
if (a.get("show")) {
var l = a.get("offsetcenter"),
u = o.cx + ro(l[0], o.r),
h = o.cy + ro(l[1], o.r),
c = ro(a.get("width"), o.r),
d = ro(a.get("height"), o.r),
f = t.getdata(),
p = f.get(f.mapdimension("value"), 0),
g = n(eo(p, [r, s], [0, 1], !0));
this.group.add(new qs({
silent: !0,
style: fo({},
a, {
x: u,
y: h,
text: mf(p, a.get("formatter")),
textwidth: isnan(c) ? null: c,
textheight: isnan(d) ? null: d,
textalign: "center",
textverticalalign: "middle"
},
{
autocolor: g,
forcerich: !0
})
}))
}
}
}), gs({
type: "series.funnel",
init: function(t) {
kl.superapply(this, "init", arguments),
this.legenddataprovider = function() {
return this.getrawdata()
},
this._defaultlabelline(t)
},
getinitialdata: function(t, e) {
return wd(this, ["value"])
},
_defaultlabelline: function(t) {
ci(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
},
getdataparams: function(t) {
var e = this.getdata(),
i = kl.supercall(this, "getdataparams", t),
n = e.mapdimension("value"),
o = e.getsum(n);
return i.percent = o ? +(e.get(n, t) / o * 100).tofixed(2) : 0,
i.$vars.push("percent"),
i
},
defaultoption: {
zlevel: 0,
z: 2,
legendhoverlink: !0,
left: 80,
top: 60,
right: 80,
bottom: 60,
minsize: "0%",
maxsize: "100%",
sort: "descending",
gap: 0,
funnelalign: "center",
label: {
show: !0,
position: "outer"
},
labelline: {
show: !0,
length: 20,
linestyle: {
width: 1,
type: "solid"
}
},
itemstyle: {
bordercolor: "#fff",
borderwidth: 1
},
emphasis: {
label: {
show: !0
}
}
}
})),
pl = vf.prototype,
nl = ["itemstyle", "opacity"];
pl.updatedata = function(t, e, i) {
var n = this.childat(0),
o = t.hostmodel,
a = t.getitemmodel(e),
s = t.getitemlayout(e),
l = t.getitemmodel(e).get(nl);
l = null == l ? 1 : l,
n.usestyle({}),
i ? (n.setshape({
points: s.points
}), n.setstyle({
opacity: 0
}), so(n, {
style: {
opacity: l
}
},
o, e)) : bo(n, {
style: {
opacity: l
},
shape: {
points: s.points
}
},
o, e);
var u = a.getmodel("itemstyle"),
h = t.getitemvisual(e, "color");
n.setstyle(r({
linejoin: "round",
fill: h
},
u.getitemstyle(["opacity"]))),
n.hoverstyle = u.getmodel("emphasis").getitemstyle(),
this._updatelabel(t, e),
uo(this)
},
pl._updatelabel = function(t, e) {
var i = this.childat(1),
n = this.childat(2),
o = t.hostmodel,
a = t.getitemmodel(e),
r = t.getitemlayout(e).label,
s = t.getitemvisual(e, "color");
bo(i, {
shape: {
points: r.linepoints || r.linepoints
}
},
o, e),
bo(n, {
style: {
x: r.x,
y: r.y
}
},
o, e),
n.attr({
rotation: r.rotation,
origin: [r.x, r.y],
z2: 10
});
var l = a.getmodel("label"),
u = a.getmodel("emphasis.label"),
h = a.getmodel("labelline"),
c = a.getmodel("emphasis.labelline"),
s = t.getitemvisual(e, "color");
co(n.style, n.hoverstyle = {},
l, u, {
labelfetcher: t.hostmodel,
labeldataindex: e,
defaulttext: t.getname(e),
autocolor: s,
useinsidestyle: !!r.inside
},
{
textalign: r.textalign,
textverticalalign: r.verticalalign
}),
n.ignore = n.normalignore = !l.get("show"),
n.hoverignore = !u.get("show"),
i.ignore = i.normalignore = !h.get("show"),
i.hoverignore = !c.get("show"),
i.setstyle({
stroke: s
}),
i.setstyle(h.getmodel("linestyle").getlinestyle()),
i.hoverstyle = c.getmodel("linestyle").getlinestyle()
},
u(vf, zw);
mr.extend({
type: "funnel",
render: function(t, e, i) {
var n = t.getdata(),
o = this._data,
a = this.group;
n.diff(o).add(function(t) {
var e = new vf(n, t);
n.setitemgraphicel(t, e),
a.add(e)
}).update(function(t, e) {
var i = o.getitemgraphicel(e);
i.updatedata(n, t),
a.add(i),
n.setitemgraphicel(t, i)
}).remove(function(t) {
var e = o.getitemgraphicel(t);
a.remove(e)
}).execute(),
this._data = n
},
remove: function() {
this.group.removeall(),
this._data = null
},
dispose: function() {}
});
es(jd("funnel")),
os(function(t, e, i) {
t.eachseriesbytype("funnel",
function(t) {
var i = t.getdata(),
n = i.mapdimension("value"),
o = t.get("sort"),
a = yf(t, e),
r = xf(i, o),
s = [ro(t.get("minsize"), a.width), ro(t.get("maxsize"), a.width)],
l = i.getdataextent(n),
u = t.get("min"),
h = t.get("max");
null == u && (u = math.min(l[0], 0)),
null == h && (h = l[1]);
var c = t.get("funnelalign"),
d = t.get("gap"),
f = (a.height - d * (i.count() - 1)) / i.count(),
p = a.y,
g = function(t, e) {
var o, r = eo(i.get(n, t) || 0, [u, h], s, !0);
switch (c) {
case "left":
o = a.x;
break;
case "center":
o = a.x + (a.width - r) / 2;
break;
case "right":
o = a.x + a.width - r
}
return [[o, e], [o + r, e]]
};
"ascending" === o && (f = -f, d = -d, p += a.height, r = r.reverse());
for (var m = 0; m < r.length; m++) {
var v = r[m],
y = r[m + 1],
x = i.getitemmodel(v).get("itemstyle.height");
null == x ? x = f: (x = ro(x, a.height), "ascending" === o && (x = -x));
var _ = g(v, p),
w = g(y, p + x);
p += x + d,
i.setitemlayout(v, {
points: _.concat(w.slice().reverse())
})
}
_f(i)
})
}),
ks($d("funnel"));
var ol = function(t, e, i, n, o) {
ha.call(this, t, e, i),
this.type = n || "value",
this.axisindex = o
};
ol.prototype = {
constructor: ol,
model: null,
ishorizontal: function() {
return "horizontal" !== this.coordinatesystem.getmodel().get("layout")
}
},
u(ol, ha);
var el = function(t, e, i, n, o, a) {
e[0] = mf(e[0], i),
e[1] = mf(e[1], i),
t = t || 0;
var r = i[1] - i[0];
null != o && (o = mf(o, [0, r])),
null != a && (a = math.max(a, null != o ? o: 0)),
"all" === n && (o = a = math.abs(e[1] - e[0]), n = 0);
var s = sf(e, n);
e[n] += t;
var l = o || 0,
u = i.slice();
s.sign < 0 ? u[0] += l: u[1] -= l,
e[n] = mf(e[n], u);
h = sf(e, n);
null != o && (h.sign !== s.sign || h.span < o) && (e[1 - n] = e[n] + s.sign * o);
var h = sf(e, n);
return null != a && h.span > a && (e[1 - n] = e[n] + h.sign * a),
e
},
rl = d,
zl = math.min,
bl = math.max,
vl = math.floor,
gl = math.ceil,
fl = zo,
wl = math.pi;
if.prototype = {
type: "parallel",
constructor: if,
_init: function(t, e, i) {
var n = t.dimensions,
o = t.parallelaxisindex;
rl(n,
function(t, i) {
var n = o[i],
a = e.getcomponent("parallelaxis", n),
r = this._axesmap.set(t, new ol(t, vl(a), [0, 0], a.get("type"), n)),
s = "category" === r.type;
r.onband = s && a.get("boundarygap"),
r.inverse = a.get("inverse"),
a.axis = r,
r.model = a,
r.coordinatesystem = a.coordinatesystem = this
},
this)
},
update: function(t, e) {
this._updateaxesfromseries(this._model, t)
},
containpoint: function(t) {
var e = this._makelayoutinfo(),
i = e.axisbase,
n = e.layoutbase,
o = e.pixeldimindex,
a = t[1 - o],
r = t[o];
return a >= i && a <= i + e.axislength && r >= n && r <= n + e.layoutlength
},
getmodel: function() {
return this._model
},
_updateaxesfromseries: function(t, e) {
e.eachseries(function(i) {
if (t.contains(i, e)) {
var n = i.getdata();
rl(this.dimensions,
function(t) {
var e = this._axesmap.get(t);
e.scale.unionextentfromdata(n, n.mapdimension(t)),
bl(e.scale, e.model)
},
this)
}
},
this)
},
resize: function(t, e) {
this._rect = la(t.getboxlayoutparams(), {
width: e.getwidth(),
height: e.getheight()
}),
this._layoutaxes()
},
getrect: function() {
return this._rect
},
_makelayoutinfo: function() {
var t, e = this._model,
i = this._rect,
n = ["x", "y"],
o = ["width", "height"],
a = e.get("layout"),
r = "horizontal" === a ? 0 : 1,
s = i[o[r]],
l = [0, s],
u = this.dimensions.length,
h = tf(e.get("axisexpandwidth"), l),
c = tf(e.get("axisexpandcount") || 0, [0, u]),
d = e.get("axisexpandable") && u > 3 && u > c && c > 1 && h > 0 && s > 0,
f = e.get("axisexpandwindow");
f ? (t = tf(f[1] - f[0], l), f[1] = f[0] + t) : (t = tf(h * (c - 1), l), (f = [h * (e.get("axisexpandcenter") || vl(u / 2)) - t / 2])[1] = f[0] + t);
var p = (s - t) / (u - c);
p < 3 && (p = 0);
var g = [vl(fl(f[0] / h, 1)) + 1, gl(fl(f[1] / h, 1)) - 1],
m = p / h * f[0];
return {
layout: a,
pixeldimindex: r,
layoutbase: i[n[r]],
layoutlength: s,
axisbase: i[n[1 - r]],
axislength: i[o[1 - r]],
axisexpandable: d,
axisexpandwidth: h,
axiscollapsewidth: p,
axisexpandwindow: f,
axiscount: u,
wininnerindices: g,
axisexpandwindow0pos: m
}
},
_layoutaxes: function() {
var t = this._rect,
e = this._axesmap,
i = this.dimensions,
n = this._makelayoutinfo(),
o = n.layout;
e.each(function(t) {
var e = [0, n.axislength],
i = t.inverse ? 1 : 0;
t.setextent(e[i], e[1 - i])
}),
rl(i,
function(e, i) {
var a = (n.axisexpandable ? df: af)(i, n),
r = {
horizontal: {
x: a.position,
y: n.axislength
},
vertical: {
x: 0,
y: a.position
}
},
s = {
horizontal: wl / 2,
vertical: 0
},
l = [r[o].x + t.x, r[o].y + t.y],
u = s[o],
h = mt();
wt(h, h, u),
_t(h, h, l),
this._axeslayout[e] = {
position: l,
rotation: u,
transform: h,
axisnameavailablewidth: a.axisnameavailablewidth,
axislabelshow: a.axislabelshow,
nametruncatemaxwidth: a.nametruncatemaxwidth,
tickdirection: 1,
labeldirection: 1
}
},
this)
},
getaxis: function(t) {
return this._axesmap.get(t)
},
datatopoint: function(t, e) {
return this.axiscoordtopoint(this._axesmap.get(e).datatocoord(t), e)
},
eachactivestate: function(t, e, i, n) {
null == i && (i = 0),
null == n && (n = t.count());
var o = this._axesmap,
a = this.dimensions,
r = [],
s = [];
d(a,
function(e) {
r.push(t.mapdimension(e)),
s.push(o.get(e).model)
});
for (var l = this.hasaxisbrushed(), u = i; u < n; u++) {
var h;
if (l) {
h = "active";
for (var c = t.getvalues(r, u), f = 0, p = a.length; f < p; f++) if ("inactive" === s[f].getactivestate(c[f])) {
h = "inactive";
break
}
} else h = "normal";
e(h, u)
}
},
hasaxisbrushed: function() {
for (var t = this.dimensions,
e = this._axesmap,
i = !1,
n = 0,
o = t.length; n < o; n++)"normal" !== e.get(t[n]).model.getactivestate() && (i = !0);
return i
},
axiscoordtopoint: function(t, e) {
return io([t, 0], this._axeslayout[e].transform)
},
getaxislayout: function(t) {
return i(this._axeslayout[t])
},
getslidedaxisexpandwindow: function(t) {
var e = this._makelayoutinfo(),
i = e.pixeldimindex,
n = e.axisexpandwindow.slice(),
o = n[1] - n[0],
a = [0, e.axisexpandwidth * (e.axiscount - 1)];
if (!this.containpoint(t)) return {
behavior: "none",
axisexpandwindow: n
};
var r, s = t[i] - e.layoutbase - e.axisexpandwindow0pos,
l = "slide",
u = e.axiscollapsewidth,
h = this._model.get("axisexpandslidetriggerarea"),
c = null != h[0];
if (u) c && u && s < o * h[0] ? (l = "jump", r = s - o * h[2]) : c && u && s > o * (1 - h[0]) ? (l = "jump", r = s - o * (1 - h[2])) : (r = s - o * h[1]) >= 0 && (r = s - o * (1 - h[1])) <= 0 && (r = 0),
(r *= e.axisexpandwidth / u) ? el(r, n, a, "all") : l = "none";
else {
o = n[1] - n[0]; (n = [bl(0, a[1] * s / o - o / 2)])[1] = zl(a[1], n[0] + o),
n[0] = n[1] - o
}
return {
axisexpandwindow: n,
behavior: l
}
}
},
ba.register("parallel", {
create: function(t, e) {
var i = [];
return t.eachcomponent("parallel",
function(n, o) {
var a = new if(n, t, e);
a.name = "parallel_" + o,
a.resize(n, e),
n.coordinatesystem = a,
a.model = n,
i.push(a)
}),
t.eachseries(function(e) {
if ("parallel" === e.get("coordinatesystem")) {
var i = t.querycomponents({
maintype: "parallel",
index: e.get("parallelindex"),
id: e.get("parallelid")
})[0];
e.coordinatesystem = i.coordinatesystem
}
}),
i
}
});
var hl = ym.extend({
type: "baseparallelaxis",
axis: null,
activeintervals: [],
getareaselectstyle: function() {
return wb([["fill", "color"], ["linewidth", "borderwidth"], ["stroke", "bordercolor"], ["width", "width"], ["opacity", "opacity"]])(this.getmodel("areaselectstyle"))
},
setactiveintervals: function(t) {
var e = this.activeintervals = i(t);
if (e) for (var n = e.length - 1; n >= 0; n--) bo(e[n])
},
getactivestate: function(t) {
var e = this.activeintervals;
if (!e.length) return "normal";
if (null == t || isnan(t)) return "inactive";
if (1 === e.length) {
var i = e[0];
if (i[0] <= t && t <= i[1]) return "active"
} else for (var n = 0,
o = e.length; n < o; n++) if (e[n][0] <= t && t <= e[n][1]) return "active";
return "inactive"
}
}),
zl = {
type: "value",
dim: null,
areaselectstyle: {
width: 20,
borderwidth: 1,
bordercolor: "rgba(160,197,232)",
color: "rgba(160,197,232)",
opacity: .3
},
realtime: !0,
z: 10
};
n(hl.prototype, ca),
xd("parallel", hl,
function(t, e) {
return e.type || (e.data ? "category": "value")
},
zl),
ym.extend({
type: "parallel",
dependencies: ["parallelaxis"],
coordinatesystem: null,
dimensions: null,
parallelaxisindex: null,
layoutmode: "box",
defaultoption: {
zlevel: 0,
z: 0,
left: 80,
top: 60,
right: 80,
bottom: 60,
layout: "horizontal",
axisexpandable: !1,
axisexpandcenter: null,
axisexpandcount: 0,
axisexpandwidth: 50,
axisexpandrate: 17,
axisexpanddebounce: 50,
axisexpandslidetriggerarea: [ - .15, .05, .4],
axisexpandtriggeron: "click",
parallelaxisdefault: null
},
init: function() {
ym.prototype.init.apply(this, arguments),
this.mergeoption({})
},
mergeoption: function(t) {
var e = this.option;
t && n(e, t, !0),
this._initdimensions()
},
contains: function(t, e) {
var i = t.get("parallelindex");
return null != i && e.getcomponent("parallel", i) === this
},
setaxisexpand: function(t) {
d(["axisexpandable", "axisexpandcenter", "axisexpandcount", "axisexpandwidth", "axisexpandwindow"],
function(e) {
t.hasownproperty(e) && (this.option[e] = t[e])
},
this)
},
_initdimensions: function() {
var t = this.dimensions = [],
e = this.parallelaxisindex = [];
d(g(this.dependentmodels.parallelaxis,
function(t) {
return (t.get("parallelindex") || 0) === this.componentindex
},
this),
function(i) {
t.push("dim" + i.get("dim")),
e.push(i.componentindex)
})
}
}),
ps({
type: "axisareaselect",
event: "axisareaselected"
},
function(t, e) {
e.eachcomponent({
maintype: "parallelaxis",
query: t
},
function(e) {
e.axis.model.setactiveintervals(t.intervals)
})
}),
ps("parallelaxisexpand",
function(t, e) {
e.eachcomponent({
maintype: "parallel",
query: t
},
function(e) {
e.setaxisexpand(t)
})
});
var ul = v,
xl = d,
jl = f,
yl = math.min,
ql = math.max,
kl = math.pow,
$l = 1e4,
jl = 6,
ql = 6,
tk = "globalpan",
ek = {
w: [0, 0],
e: [0, 1],
n: [1, 0],
s: [1, 1]
},
ik = {
w: "ew",
e: "ew",
n: "ns",
s: "ns",
ne: "nesw",
sw: "nesw",
nw: "nwse",
se: "nwse"
},
nk = {
brushstyle: {
linewidth: 2,
stroke: "rgba(0,0,0,0.3)",
fill: "rgba(0,0,0,0.1)"
},
transformable: !0,
brushmode: "single",
removeonclick: !1
},
ok = 0;
cf.prototype = {
constructor: cf,
enablebrush: function(t) {
return this._brushtype && kf(this),
t.brushtype && lf(this, t),
this
},
setpanels: function(t) {
if (t && t.length) {
var e = this._panels = {};
d(t,
function(t) {
e[t.panelid] = i(t)
})
} else this._panels = null;
return this
},
mount: function(t) {
t = t || {},
this._enableglobalpan = t.enableglobalpan;
var e = this.group;
return this._zr.add(e),
e.attr({
position: t.position || [0, 0],
rotation: t.rotation || 0,
scale: t.scale || [1, 1]
}),
this._transform = e.getlocaltransform(),
this
},
eachcover: function(t, e) {
xl(this._covers, t, e)
},
updatecovers: function(t) {
function e(t, e) {
return (null != t.id ? t.id: a + e) + "-" + t.brushtype
}
function o(e, i) {
var n = t[e];
if (null != i && r[i] === u) s[e] = r[i];
else {
var o = s[e] = null != i ? (r[i].__brushoption = n, r[i]) : nf(l, pf(l, n));
rf(l, o)
}
}
t = f(t,
function(t) {
return n(i(nk), t, !0)
});
var a = "\0-brush-index-",
r = this._covers,
s = this._covers = [],
l = this,
u = this._creatingcover;
return new hs(r, t,
function(t, i) {
return e(t.__brushoption, i)
},
e).add(o).update(o).remove(function(t) {
r[t] !== u && l.group.remove(r[t])
}).execute(),
this
},
unmount: function() {
return this.enablebrush(!1),
gf(this),
this._zr.remove(this.group),
this
},
dispose: function() {
this.unmount(),
this.off()
}
},
h(cf, aw);
var ak = {
mousedown: function(t) {
if (this._dragging) lp.call(this, t);
else if (!t.target || !t.target.draggable) {
op(t);
var e = this.group.transformcoordtolocal(t.offsetx, t.offsety);
this._creatingcover = null,
(this._creatingpanel = bf(this, t, e)) && (this._dragging = !0, this._track = [e.slice()])
}
},
mousemove: function(t) {
var e = this.group.transformcoordtolocal(t.offsetx, t.offsety);
if (np(this, t, e), this._dragging) {
op(t);
var i = rp(this, t, e, !1);
i && ff(this, i)
}
},
mouseup: lp
},
rk = {
linex: up(0),
liney: up(1),
rect: {
createcover: function(t, e) {
return zf(ul(jf,
function(t) {
return t
},
function(t) {
return t
}), t, e, ["w", "e", "n", "s", "se", "sw", "ne", "nw"])
},
getcreatingrange: function(t) {
var e = hf(t);
return qf(e[1][0], e[1][1], e[0][0], e[0][1])
},
updatecovershape: function(t, e, i, n) {
uf(t, e, i, n)
},
updatecommon: xf,
contain: ap
},
polygon: {
createcover: function(t, e) {
var i = new zw;
return i.add(new om({
name: "main",
style: yf(e),
silent: !0
})),
i
},
getcreatingrange: function(t) {
return t
},
endcreating: function(t, e) {
e.remove(e.childat(0)),
e.add(new nm({
name: "main",
draggable: !0,
drift: ul(qf, t, e),
ondragend: ul(ff, t, {
isend: !0
})
}))
},
updatecovershape: function(t, e, i, n) {
e.childat(0).setshape({
points: ep(t, e, i)
})
},
updatecommon: xf,
contain: ap
}
},
sk = ["axisline", "axisticklabel", "axisname"],
lk = vs({
type: "parallelaxis",
init: function(t, e) {
lk.superapply(this, "init", arguments),
(this._brushcontroller = new cf(e.getzr())).on("brush", m(this._onbrush, this))
},
render: function(t, e, i, n) {
if (!pp(t, e, n)) {
this.axismodel = t,
this.api = i,
this.group.removeall();
var o = this._axisgroup;
if (this._axisgroup = new zw, this.group.add(this._axisgroup), t.get("show")) {
var r = mp(t, e),
s = r.coordinatesystem,
l = t.getareaselectstyle(),
u = l.width,
h = t.axis.dim,
c = a({
strokecontainthreshold: u
},
s.getaxislayout(h)),
f = new id(t, c);
d(sk, f.add, f),
this._axisgroup.add(f.getgroup()),
this._refreshbrushcontroller(c, l, t, r, u, i);
var p = n && !1 === n.animation ? null: t;
ao(o, this._axisgroup, p)
}
}
},
_refreshbrushcontroller: function(t, e, i, n, o, a) {
var r = i.axis.getextent(),
s = r[1] - r[0],
l = math.min(30, .1 * math.abs(s)),
u = ue.create({
x: r[0],
y: -o / 2,
width: s,
height: o
});
u.x -= l,
u.width += 2 * l,
this._brushcontroller.mount({
enableglobalpan: !0,
rotation: t.rotation,
position: t.position
}).setpanels([{
panelid: "pl",
clippath: hp(u),
istargetbycursor: dp(u, a, n),
getlinearbrushotherextent: cp(u, 0)
}]).enablebrush({
brushtype: "linex",
brushstyle: e,
removeonclick: !0
}).updatecovers(gp(i))
},
_onbrush: function(t, e) {
var i = this.axismodel,
n = i.axis,
o = f(t,
function(t) {
return [n.coordtodata(t.range[0], !0), n.coordtodata(t.range[1], !0)]
}); (!i.option.realtime === e.isend || e.removeonclick) && this.api.dispatchaction({
type: "axisareaselect",
parallelaxisid: i.id,
intervals: o
})
},
dispose: function() {
this._brushcontroller.dispose()
}
});
vs({
type: "parallel",
render: function(t, e, i) {
this._model = t,
this._api = i,
this._handlers || (this._handlers = {},
d(uk,
function(t, e) {
i.getzr().on(e, this._handlers[e] = m(t, this))
},
this)),
lr(this, "_throttleddispatchexpand", t.get("axisexpandrate"), "fixrate")
},
dispose: function(t, e) {
d(this._handlers,
function(t, i) {
e.getzr().off(i, t)
}),
this._handlers = null
},
_throttleddispatchexpand: function(t) {
this._dispatchexpand(t)
},
_dispatchexpand: function(t) {
t && this._api.dispatchaction(a({
type: "parallelaxisexpand"
},
t))
}
});
var uk = {
mousedown: function(t) {
vp(this, "click") && (this._mousedownpoint = [t.offsetx, t.offsety])
},
mouseup: function(t) {
var e = this._mousedownpoint;
if (vp(this, "click") && e) {
var i = [t.offsetx, t.offsety];
if (math.pow(e[0] - i[0], 2) + math.pow(e[1] - i[1], 2) > 5) return;
var n = this._model.coordinatesystem.getslidedaxisexpandwindow([t.offsetx, t.offsety]);
"none" !== n.behavior && this._dispatchexpand({
axisexpandwindow: n.axisexpandwindow
})
}
this._mousedownpoint = null
},
mousemove: function(t) {
if (!this._mousedownpoint && vp(this, "mousemove")) {
var e = this._model,
i = e.coordinatesystem.getslidedaxisexpandwindow([t.offsetx, t.offsety]),
n = i.behavior;
"jump" === n && this._throttleddispatchexpand.debouncenextcall(e.get("axisexpanddebounce")),
this._throttleddispatchexpand("none" === n ? null: {
axisexpandwindow: i.axisexpandwindow,
animation: "jump" === n && null
})
}
}
};
ls(function(t) {
wf(t),
bf(t)
}),
oi.extend({
type: "series.parallel",
dependencies: ["parallel"],
visualcoloraccesspath: "linestyle.color",
getinitialdata: function(t, e) {
var i = this.getsource();
return yp(i, this),
dl(i, this)
},
getrawindicesbyactivestate: function(t) {
var e = this.coordinatesystem,
i = this.getdata(),
n = [];
return e.eachactivestate(i,
function(e, o) {
t === e && n.push(i.getrawindex(o))
}),
n
},
defaultoption: {
zlevel: 0,
z: 2,
coordinatesystem: "parallel",
parallelindex: 0,
label: {
show: !1
},
inactiveopacity: .05,
activeopacity: 1,
linestyle: {
width: 1,
opacity: .45,
type: "solid"
},
emphasis: {
label: {
show: !1
}
},
progressive: 500,
smooth: !1,
animationeasing: "linear"
}
});
var hk = .3,
ck = (mr.extend({
type: "parallel",
init: function() {
this._datagroup = new zw,
this.group.add(this._datagroup),
this._data,
this._initialized
},
render: function(t, e, i, n) {
var o = this._datagroup,
a = t.getdata(),
r = this._data,
s = t.coordinatesystem,
l = s.dimensions,
u = sp(t);
if (a.diff(r).add(function(t) {
mp(bp(a, o, t, l, s), a, t, u)
}).update(function(e, i) {
var o = r.getitemgraphicel(i),
h = wp(a, e, l, s);
a.setitemgraphicel(e, o),
bo(o, {
shape: {
points: h
}
},
n && !1 === n.animation ? null: t, e),
mp(o, a, e, u)
}).remove(function(t) {
var e = r.getitemgraphicel(t);
o.remove(e)
}).execute(), !this._initialized) {
this._initialized = !0;
var h = _p(s, t,
function() {
settimeout(function() {
o.removeclippath()
})
});
o.setclippath(h)
}
this._data = a
},
incrementalpreparerender: function(t, e, i) {
this._initialized = !0,
this._data = null,
this._datagroup.removeall()
},
incrementalrender: function(t, e, i) {
for (var n = e.getdata(), o = e.coordinatesystem, a = o.dimensions, r = sp(e), s = t.start; s < t.end; s++) {
var l = bp(n, this._datagroup, s, a, o);
l.incremental = !0,
mp(l, n, s, r)
}
},
dispose: function() {},
remove: function() {
this._datagroup && this._datagroup.removeall(),
this._data = null
}
}), ["linestyle", "normal", "opacity"]);
es({
seriestype: "parallel",
reset: function(t, e, i) {
var n = t.getmodel("itemstyle"),
o = t.getmodel("linestyle"),
a = e.get("color"),
r = o.get("color") || n.get("color") || a[t.seriesindex % a.length],
s = t.get("inactiveopacity"),
l = t.get("activeopacity"),
u = t.getmodel("linestyle").getlinestyle(),
h = t.coordinatesystem,
c = t.getdata(),
d = {
normal: u.opacity,
active: l,
inactive: s
};
return c.setvisual("color", r),
{
progress: function(t, e) {
h.eachactivestate(e,
function(t, i) {
var n = d[t];
if ("normal" === t && e.hasitemoption) {
var o = e.getitemmodel(i).get(ck, !0);
null != o && (n = o)
}
e.setitemvisual(i, "opacity", n)
},
t.start, t.end)
}
}
}
});
var dk = oi.extend({
type: "series.sankey",
layoutinfo: null,
getinitialdata: function(t) {
var e = t.edges || t.links,
i = t.data || t.nodes;
if (i && e) return cl(i, e, this, !0).data
},
setnodeposition: function(t, e) {
var i = this.option.data[t];
i.localx = e[0],
i.localy = e[1]
},
getgraph: function() {
return this.getdata().graph
},
getedgedata: function() {
return this.getgraph().edgedata
},
formattooltip: function(t, e, i) {
if ("edge" === i) {
var n = this.getdataparams(t, i),
o = n.data,
a = o.source + " -- " + o.target;
return n.value && (a += " : " + n.value),
qo(a)
}
return dk.supercall(this, "formattooltip", t, e)
},
optionupdated: function() {
var t = this.option; ! 0 === t.focusnodeadjacency && (t.focusnodeadjacency = "alledges")
},
defaultoption: {
zlevel: 0,
z: 2,
coordinatesystem: "view",
layout: null,
left: "5%",
top: "5%",
right: "20%",
bottom: "5%",
orient: "horizontal",
nodewidth: 20,
nodegap: 8,
draggable: !0,
focusnodeadjacency: !1,
layoutiterations: 32,
label: {
show: !0,
position: "right",
color: "#000",
fontsize: 12
},
itemstyle: {
borderwidth: 1,
bordercolor: "#333"
},
linestyle: {
color: "#314656",
opacity: .2,
curveness: .5
},
emphasis: {
label: {
show: !0
},
linestyle: {
opacity: .6
}
},
animationeasing: "linear",
animationduration: 1e3
}
}),
fk = ["itemstyle", "opacity"],
pk = ["linestyle", "opacity"],
gk = fn({
shape: {
x1: 0,
y1: 0,
x2: 0,
y2: 0,
cpx1: 0,
cpy1: 0,
cpx2: 0,
cpy2: 0,
extent: 0,
orient: ""
},
buildpath: function(t, e) {
var i = e.extent;
"vertical" === e.orient ? (t.moveto(e.x1, e.y1), t.beziercurveto(e.cpx1, e.cpy1, e.cpx2, e.cpy2, e.x2, e.y2), t.lineto(e.x2 + i, e.y2), t.beziercurveto(e.cpx2 + i, e.cpy2, e.cpx1 + i, e.cpy1, e.x1 + i, e.y1)) : (t.moveto(e.x1, e.y1), t.beziercurveto(e.cpx1, e.cpy1, e.cpx2, e.cpy2, e.x2, e.y2), t.lineto(e.x2, e.y2 + i), t.beziercurveto(e.cpx2, e.cpy2 + i, e.cpx1, e.cpy1 + i, e.x1, e.y1 + i)),
t.closepath()
}
});
fs({
type: "sankey",
_model: null,
_focusadjacencydisabled: !1,
render: function(t, e, i) {
var n = this,
o = t.getgraph(),
a = this.group,
r = t.layoutinfo,
s = r.width,
l = r.height,
u = t.getdata(),
h = t.getdata("edge"),
c = t.get("orient");
this._model = t,
a.removeall(),
a.attr("position", [r.x, r.y]),
o.eachedge(function(e) {
var i = new gk;
i.dataindex = e.dataindex,
i.seriesindex = t.seriesindex,
i.datatype = "edge";
var n, o, r, u, d, f, p, g, m = e.getmodel("linestyle"),
v = m.get("curveness"),
y = e.node1.getlayout(),
x = e.node1.getmodel(),
_ = x.get("localx"),
w = x.get("localy"),
b = e.node2.getlayout(),
s = e.node2.getmodel(),
m = s.get("localx"),
i = s.get("localy"),
t = e.getlayout();
switch (i.shape.extent = math.max(1, t.dy), i.shape.orient = c, "vertical" === c ? (n = (null != _ ? _ * s: y.x) + t.sy, o = (null != w ? w * l: y.y) + y.dy, r = (null != m ? m * s: b.x) + t.ty, d = n, f = o * (1 - v) + (u = null != i ? i * l: b.y) * v, p = r, g = o * v + u * (1 - v)) : (n = (null != _ ? _ * s: y.x) + y.dx, o = (null != w ? w * l: y.y) + t.sy, d = n * (1 - v) + (r = null != m ? m * s: b.x) * v, f = o, p = n * v + r * (1 - v), g = u = (null != i ? i * l: b.y) + t.ty), i.setshape({
x1: n,
y1: o,
x2: r,
y2: u,
cpx1: d,
cpy1: f,
cpx2: p,
cpy2: g
}), i.setstyle(m.getitemstyle()), i.style.fill) {
case "source":
i.style.fill = e.node1.getvisual("color");
break;
case "target":
i.style.fill = e.node2.getvisual("color")
}
uo(i, e.getmodel("emphasis.linestyle").getitemstyle()),
a.add(i),
h.setitemgraphicel(e.dataindex, i)
}),
o.eachnode(function(e) {
var i = e.getlayout(),
n = e.getmodel(),
o = n.get("localx"),
r = n.get("localy"),
h = n.getmodel("label"),
c = n.getmodel("emphasis.label"),
d = new am({
shape: {
x: null != o ? o * s: i.x,
y: null != r ? r * l: i.y,
width: i.dx,
height: i.dy
},
style: n.getmodel("itemstyle").getitemstyle()
}),
f = e.getmodel("emphasis.itemstyle").getitemstyle();
co(d.style, f, h, c, {
labelfetcher: t,
labeldataindex: e.dataindex,
defaulttext: e.id,
isrecttext: !0
}),
d.setstyle("fill", e.getvisual("color")),
uo(d, f),
a.add(d),
u.setitemgraphicel(e.dataindex, d),
d.datatype = "node"
}),
u.eachitemgraphicel(function(e, o) {
var a = u.getitemmodel(o);
a.get("draggable") && (e.drift = function(e, a) {
n._focusadjacencydisabled = !0,
this.shape.x += e,
this.shape.y += a,
this.dirty(),
i.dispatchaction({
type: "dragnode",
seriesid: t.id,
dataindex: u.getrawindex(o),
localx: this.shape.x / s,
localy: this.shape.y / l
})
},
e.ondragend = function() {
n._focusadjacencydisabled = !1
},
e.draggable = !0, e.cursor = "move"),
a.get("focusnodeadjacency") && (e.off("mouseover").on("mouseover",
function() {
n._focusadjacencydisabled || i.dispatchaction({
type: "focusnodeadjacency",
seriesid: t.id,
dataindex: e.dataindex
})
}), e.off("mouseout").on("mouseout",
function() {
n._focusadjacencydisabled || i.dispatchaction({
type: "unfocusnodeadjacency",
seriesid: t.id
})
}))
}),
h.eachitemgraphicel(function(e, o) {
h.getitemmodel(o).get("focusnodeadjacency") && (e.off("mouseover").on("mouseover",
function() {
n._focusadjacencydisabled || i.dispatchaction({
type: "focusnodeadjacency",
seriesid: t.id,
edgedataindex: e.dataindex
})
}), e.off("mouseout").on("mouseout",
function() {
n._focusadjacencydisabled || i.dispatchaction({
type: "unfocusnodeadjacency",
seriesid: t.id
})
}))
}),
!this._data && t.get("animation") && a.setclippath(cp(a.getboundingrect(), t,
function() {
a.removeclippath()
})),
this._data = t.getdata()
},
dispose: function() {},
focusnodeadjacency: function(t, e, i, n) {
var o = this._model.getdata(),
a = o.graph,
r = n.dataindex,
s = o.getitemmodel(r),
l = n.edgedataindex;
if (null != r || null != l) {
var u = a.getnodebyindex(r),
h = a.getedgebyindex(l);
if (a.eachnode(function(t) {
ap(t, fk, .1)
}), a.eachedge(function(t) {
ap(t, pk, .1)
}), u) {
dp(u, fk);
var c = s.get("focusnodeadjacency");
"outedges" === c ? d(u.outedges,
function(t) {
t.dataindex < 0 || (dp(t, pk), dp(t.node2, fk))
}) : "inedges" === c ? d(u.inedges,
function(t) {
t.dataindex < 0 || (dp(t, pk), dp(t.node1, fk))
}) : "alledges" === c && d(u.edges,
function(t) {
t.dataindex < 0 || (dp(t, pk), dp(t.node1, fk), dp(t.node2, fk))
})
}
h && (dp(h, pk), dp(h.node1, fk), dp(h.node2, fk))
}
},
unfocusnodeadjacency: function(t, e, i, n) {
var o = this._model.getgraph();
o.eachnode(function(t) {
ap(t, fk)
}),
o.eachedge(function(t) {
ap(t, pk)
})
}
}),
ps({
type: "dragnode",
event: "dragnode",
update: "update"
},
function(t, e) {
e.eachcomponent({
maintype: "series",
subtype: "sankey",
query: t
},
function(e) {
e.setnodeposition(t.dataindex, [t.localx, t.localy])
})
});
os(function(t, e, i) {
t.eachseriesbytype("sankey",
function(t) {
var i = t.get("nodewidth"),
n = t.get("nodegap"),
o = kp(t, e);
t.layoutinfo = o;
var a = o.width,
r = o.height,
s = t.getgraph(),
l = s.nodes,
u = s.edges;
np(l),
pp(l, u, i, n, a, r, 0 !== g(l,
function(t) {
return 0 === t.getlayout().value
}).length ? 0 : t.get("layoutiterations"), t.get("orient"))
})
}),
es(function(t, e) {
t.eachseriesbytype("sankey",
function(t) {
var e = t.getgraph().nodes;
if (e.length) {
var i = 1 / 0,
n = -1 / 0;
d(e,
function(t) {
var e = t.getlayout().value;
e < i && (i = e),
e > n && (n = e)
}),
d(e,
function(e) {
var o = new jc({
type: "color",
mappingmethod: "linear",
dataextent: [i, n],
visual: t.get("color")
}).mapvaluetovisual(e.getlayout().value);
e.setvisual("color", o);
var a = e.getmodel().get("itemstyle.color");
null != a && e.setvisual("color", a)
})
}
})
});
var mk = {
_baseaxisdim: null,
getinitialdata: function(t, e) {
var i, n, o = e.getcomponent("xaxis", this.get("xaxisindex")),
a = e.getcomponent("yaxis", this.get("yaxisindex")),
r = o.get("type"),
s = a.get("type");
"category" === r ? (t.layout = "horizontal", i = o.getordinalmeta(), n = !0) : "category" === s ? (t.layout = "vertical", i = a.getordinalmeta(), n = !0) : t.layout = t.layout || "horizontal";
var l = ["x", "y"],
u = "horizontal" === t.layout ? 0 : 1,
h = this._baseaxisdim = l[u],
c = l[1 - u],
f = [o, a],
p = f[u].get("type"),
g = f[1 - u].get("type"),
m = t.data;
if (m && n) {
var v = [];
d(m,
function(t, e) {
var i;
t.value && y(t.value) ? (i = t.value.slice(), t.value.unshift(e)) : y(t) ? (i = t.slice(), t.unshift(e)) : i = t,
v.push(i)
}),
t.data = v
}
var x = this.defaultvaluedimensions;
return wd(this, {
coorddimensions: [{
name: h,
type: xs(p),
ordinalmeta: i,
otherdims: {
tooltip: !1,
itemname: 0
},
dimsdef: ["base"]
},
{
name: c,
type: xs(g),
dimsdef: x.slice()
}],
dimensionscount: x.length + 1
})
},
getbaseaxis: function() {
var t = this._baseaxisdim;
return this.ecmodel.getcomponent(t + "axis", this.get(t + "axisindex")).axis
}
};
h(oi.extend({
type: "series.boxplot",
dependencies: ["xaxis", "yaxis", "grid"],
defaultvaluedimensions: [{
name: "min",
defaulttooltip: !0
},
{
name: "q1",
defaulttooltip: !0
},
{
name: "median",
defaulttooltip: !0
},
{
name: "q3",
defaulttooltip: !0
},
{
name: "max",
defaulttooltip: !0
}],
dimensions: null,
defaultoption: {
zlevel: 0,
z: 2,
coordinatesystem: "cartesian2d",
legendhoverlink: !0,
hoveranimation: !0,
layout: null,
boxwidth: [7, 50],
itemstyle: {
color: "#fff",
borderwidth: 1
},
emphasis: {
itemstyle: {
borderwidth: 2,
shadowblur: 5,
shadowoffsetx: 2,
shadowoffsety: 2,
shadowcolor: "rgba(0,0,0,0.4)"
}
},
animationeasing: "elasticout",
animationduration: 800
}
}), mk, !0);
var vk = ["itemstyle"],
yk = ["emphasis", "itemstyle"],
xk = (mr.extend({
type: "boxplot",
render: function(t, e, i) {
var n = t.getdata(),
o = this.group,
a = this._data;
this._data || o.removeall();
var r = "horizontal" === t.get("layout") ? 1 : 0;
n.diff(a).add(function(t) {
if (n.hasvalue(t)) {
var e = qp(n.getitemlayout(t), n, t, r, !0);
n.setitemgraphicel(t, e),
o.add(e)
}
}).update(function(t, e) {
var i = a.getitemgraphicel(e);
if (n.hasvalue(t)) {
var s = n.getitemlayout(t);
i ? kp(s, i, n, t) : i = qp(s, n, t, r),
o.add(i),
n.setitemgraphicel(t, i)
} else o.remove(i)
}).remove(function(t) {
var e = a.getitemgraphicel(t);
e && o.remove(e)
}).execute(),
this._data = n
},
remove: function(t) {
var e = this.group,
i = this._data;
this._data = null,
i && i.eachitemgraphicel(function(t) {
t && e.remove(t)
})
},
dispose: b
}), kn.extend({
type: "boxplotboxpath",
shape: {},
buildpath: function(t, e) {
var i = e.points,
n = 0;
for (t.moveto(i[n][0], i[n][1]), n++; n < 4; n++) t.lineto(i[n][0], i[n][1]);
for (t.closepath(); n < i.length; n++) t.moveto(i[n][0], i[n][1]),
n++,
t.lineto(i[n][0], i[n][1])
}
})),
_k = ["itemstyle", "bordercolor"],
wk = d;
es(function(t, e) {
var i = t.get("color");
t.eachrawseriesbytype("boxplot",
function(e) {
var n = i[e.seriesindex % i.length],
o = e.getdata();
o.setvisual({
legendsymbol: "roundrect",
color: e.get(_k) || n
}),
t.isseriesfiltered(e) || o.each(function(t) {
var e = o.getitemmodel(t);
o.setitemvisual(t, {
color: e.get(_k, !0)
})
})
})
}),
os(function(t) {
var e = jp(t);
wk(e,
function(t) {
var e = t.seriesmodels;
e.length && (qp(t), wk(e,
function(e, i) {
tg(e, t.boxoffsetlist[i], t.boxwidthlist[i])
}))
})
}),
h(oi.extend({
type: "series.candlestick",
dependencies: ["xaxis", "yaxis", "grid"],
defaultvaluedimensions: [{
name: "open",
defaulttooltip: !0
},
{
name: "close",
defaulttooltip: !0
},
{
name: "lowest",
defaulttooltip: !0
},
{
name: "highest",
defaulttooltip: !0
}],
dimensions: null,
defaultoption: {
zlevel: 0,
z: 2,
coordinatesystem: "cartesian2d",
legendhoverlink: !0,
hoveranimation: !0,
layout: null,
itemstyle: {
color: "#c23531",
color0: "#314656",
borderwidth: 1,
bordercolor: "#c23531",
bordercolor0: "#314656"
},
emphasis: {
itemstyle: {
borderwidth: 2
}
},
barmaxwidth: null,
barminwidth: null,
barwidth: null,
large: !0,
largethreshold: 600,
progressive: 3e3,
progressivethreshold: 1e4,
progressivechunkmode: "mod",
animationupdate: !1,
animationeasing: "linear",
animationduration: 300
},
getshadowdim: function() {
return "open"
},
brushselector: function(t, e, i) {
var n = e.getitemlayout(t);
return n && i.rect(n.brushrect)
}
}), mk, !0);
var bk = ["itemstyle"],
sk = ["emphasis", "itemstyle"],
mk = ["color", "color0", "bordercolor", "bordercolor0"],
ik = (mr.extend({
type: "candlestick",
render: function(t, e, i) {
this._updatedrawmode(t),
this._islargedraw ? this._renderlarge(t) : this._rendernormal(t)
},
incrementalpreparerender: function(t, e, i) {
this._clear(),
this._updatedrawmode(t)
},
incrementalrender: function(t, e, i, n) {
this._islargedraw ? this._incrementalrenderlarge(t, e) : this._incrementalrendernormal(t, e)
},
_updatedrawmode: function(t) {
var e = t.pipelinecontext.large; (null == this._islargedraw || e ^ this._islargedraw) && (this._islargedraw = e, this._clear())
},
_rendernormal: function(t) {
var e = t.getdata(),
i = this._data,
n = this.group,
o = e.getlayout("issimplebox");
this._data || n.removeall(),
e.diff(i).add(function(i) {
if (e.hasvalue(i)) {
var a, r = e.getitemlayout(i);
so(a = eg(r, 0, !0), {
shape: {
points: r.ends
}
},
t, i),
ig(a, e, i, o),
n.add(a),
e.setitemgraphicel(i, a)
}
}).update(function(a, r) {
var s = i.getitemgraphicel(r);
if (e.hasvalue(a)) {
var l = e.getitemlayout(a);
s ? bo(s, {
shape: {
points: l.ends
}
},
t, a) : s = eg(l),
ig(s, e, a, o),
n.add(s),
e.setitemgraphicel(a, s)
} else n.remove(s)
}).remove(function(t) {
var e = i.getitemgraphicel(t);
e && n.remove(e)
}).execute(),
this._data = e
},
_renderlarge: function(t) {
this._clear(),
og(t, this.group)
},
_incrementalrendernormal: function(t, e) {
for (var i, n = e.getdata(), o = n.getlayout("issimplebox"); null != (i = t.next());) {
var a;
ig(a = eg(n.getitemlayout(i)), n, i, o),
a.incremental = !0,
this.group.add(a)
}
},
_incrementalrenderlarge: function(t, e) {
og(e, this.group, !0)
},
remove: function(t) {
this._clear()
},
_clear: function() {
this.group.removeall(),
this._data = null
},
dispose: b
}), kn.extend({
type: "normalcandlestickbox",
shape: {},
buildpath: function(t, e) {
var i = e.points;
this.__simplebox ? (t.moveto(i[4][0], i[4][1]), t.lineto(i[6][0], i[6][1])) : (t.moveto(i[0][0], i[0][1]), t.lineto(i[1][0], i[1][1]), t.lineto(i[2][0], i[2][1]), t.lineto(i[3][0], i[3][1]), t.closepath(), t.moveto(i[4][0], i[4][1]), t.lineto(i[5][0], i[5][1]), t.moveto(i[6][0], i[6][1]), t.lineto(i[7][0], i[7][1]))
}
})),
tk = kn.extend({
type: "largecandlestickbox",
shape: {},
buildpath: function(t, e) {
for (var i = e.points,
n = 0; n < i.length;) if (this.__sign === i[n++]) {
var o = i[n++];
t.moveto(o, i[n++]),
t.lineto(o, i[n++])
} else n += 3
}
}),
ak = ["itemstyle", "bordercolor"],
dk = ["itemstyle", "bordercolor0"],
ck = ["itemstyle", "color"],
lk = ["itemstyle", "color0"],
kk = {
seriestype: "candlestick",
plan: zi(),
performrawseries: !0,
reset: function(t, e) {
function i(t, e) {
return e.get(t > 0 ? ck: lk)
}
function n(t, e) {
return e.get(t > 0 ? ak: dk)
}
var o = t.getdata(),
a = t.pipelinecontext.large;
if (o.setvisual({
legendsymbol: "roundrect",
colorp: i(1, t),
colorn: i( - 1, t),
bordercolorp: n(1, t),
bordercolorn: n( - 1, t)
}), !e.isseriesfiltered(t)) return ! a && {
progress: function(t, e) {
for (var o; null != (o = t.next());) {
var a = e.getitemmodel(o),
r = e.getitemlayout(o).sign;
e.setitemvisual(o, {
color: i(r, a),
bordercolor: n(r, a)
})
}
}
}
}
},
pk = "undefined" != typeof float32array ? float32array: array,
nk = {
seriestype: "candlestick",
plan: zi(),
reset: function(t) {
var e = t.coordinatesystem,
i = t.getdata(),
n = sg(t, i),
o = 0,
a = 1,
r = ["x", "y"],
s = i.mapdimension(r[o]),
l = i.mapdimension(r[a], !0),
u = l[0],
h = l[1],
c = l[2],
d = l[3];
if (i.setlayout({
candlewidth: n,
issimplebox: n <= 1.3
}), !(null == s || l.length < 4)) return {
progress: t.pipelinecontext.large ?
function(t, i) {
for (var n, r, l = new pk(5 * t.count), f = 0, p = [], g = []; null != (r = t.next());) {
var m = i.get(s, r),
v = i.get(u, r),
y = i.get(h, r),
x = i.get(c, r),
_ = i.get(d, r);
isnan(m) || isnan(x) || isnan(_) ? (l[f++] = nan, f += 4) : (l[f++] = rg(i, r, v, y, h), p[o] = m, p[a] = x, n = e.datatopoint(p, null, g), l[f++] = n ? n[0] : nan, l[f++] = n ? n[1] : nan, p[a] = _, n = e.datatopoint(p, null, g), l[f++] = n ? n[1] : nan)
}
i.setlayout("largepoints", l)
}: function(t, i) {
function r(t, i) {
var n = [];
return n[o] = i,
n[a] = t,
isnan(i) || isnan(t) ? [nan, nan] : e.datatopoint(n)
}
function l(t, e, i) {
var a = e.slice(),
r = e.slice();
a[o] = yn(a[o] + n / 2, 1, !1),
r[o] = yn(r[o] - n / 2, 1, !0),
i ? t.push(a, r) : t.push(r, a)
}
function f(t) {
return t[o] = yn(t[o], 1),
t
}
for (var p; null != (p = t.next());) {
var g = i.get(s, p),
m = i.get(u, p),
v = i.get(h, p),
y = i.get(c, p),
x = i.get(d, p),
_ = math.min(m, v),
w = math.max(m, v),
b = r(_, g),
s = r(w, g),
m = r(y, g),
i = r(x, g),
t = [];
l(t, s, 0),
l(t, b, 1),
t.push(f(i), f(s), f(m), f(b)),
i.setitemlayout(p, {
sign: rg(i, p, m, v, h),
initbaseline: m > v ? s[a] : b[a],
ends: t,
brushrect: function(t, e, i) {
var s = r(t, i),
l = r(e, i);
return s[o] -= n / 2,
l[o] -= n / 2,
{
x: s[0],
y: s[1],
width: a ? n: l[0] - s[0],
height: a ? l[1] - s[1] : n
}
} (y, x, g)
})
}
}
}
}
};
ls(function(t) {
t && y(t.series) && d(t.series,
function(t) {
w(t) && "k" === t.type && (t.type = "candlestick")
})
}),
es(kk),
os(nk),
oi.extend({
type: "series.effectscatter",
dependencies: ["grid", "polar"],
getinitialdata: function(t, e) {
return dl(this.getsource(), this)
},
brushselector: "point",
defaultoption: {
coordinatesystem: "cartesian2d",
zlevel: 0,
z: 2,
legendhoverlink: !0,
effecttype: "ripple",
progressive: 0,
showeffecton: "render",
rippleeffect: {
period: 4,
scale: 2.5,
brushtype: "fill"
},
symbolsize: 10
}
});
var ok = hg.prototype;
ok.stopeffectanimation = function() {
this.childat(1).removeall()
},
ok.starteffectanimation = function(t) {
for (var e = t.symboltype,
i = t.color,
n = this.childat(1), o = 0; o < 3; o++) {
var a = xl(e, -1, -1, 2, 2, i);
a.attr({
style: {
strokenoscale: !0
},
z2: 99,
silent: !0,
scale: [.5, .5]
});
var r = -o / 3 * t.period + t.effectoffset;
a.animate("", !0).when(t.period, {
scale: [t.ripplescale / 2, t.ripplescale / 2]
}).delay(r).start(),
a.animatestyle(!0).when(t.period, {
opacity: 0
}).delay(r).start(),
n.add(a)
}
ug(n, t)
},
ok.updateeffectanimation = function(t) {
for (var e = this._effectcfg,
i = this.childat(1), n = ["symboltype", "period", "ripplescale"], o = 0; o < n.length; o++) {
var a = n[o];
if (e[a] !== t[a]) return this.stopeffectanimation(),
void this.starteffectanimation(t)
}
ug(i, t)
},
ok.highlight = function() {
this.trigger("emphasis")
},
ok.downplay = function() {
this.trigger("normal")
},
ok.updatedata = function(t, e) {
var i = t.hostmodel;
this.childat(0).updatedata(t, e);
var n = this.childat(1),
o = t.getitemmodel(e),
a = t.getitemvisual(e, "symbol"),
r = lg(t.getitemvisual(e, "symbolsize")),
s = t.getitemvisual(e, "color");
n.attr("scale", r),
n.traverse(function(t) {
t.attr({
fill: s
})
});
var l = o.getshallow("symboloffset");
if (l) {
var u = n.position;
u[0] = ro(l[0], r[0]),
u[1] = ro(l[1], r[1])
}
n.rotation = (o.getshallow("symbolrotate") || 0) * math.pi / 180 || 0;
var h = {};
if (h.showeffecton = i.get("showeffecton"), h.ripplescale = o.get("rippleeffect.scale"), h.brushtype = o.get("rippleeffect.brushtype"), h.period = 1e3 * o.get("rippleeffect.period"), h.effectoffset = e / t.count(), h.z = o.getshallow("z") || 0, h.zlevel = o.getshallow("zlevel") || 0, h.symboltype = a, h.color = s, this.off("mouseover").off("mouseout").off("emphasis").off("normal"), "render" === h.showeffecton) this._effectcfg ? this.updateeffectanimation(h) : this.starteffectanimation(h),
this._effectcfg = h;
else {
this._effectcfg = null,
this.stopeffectanimation();
var c = this.childat(0),
d = function() {
c.highlight(),
"render" !== h.showeffecton && this.starteffectanimation(h)
},
f = function() {
c.downplay(),
"render" !== h.showeffecton && this.stopeffectanimation()
};
this.on("mouseover", d, this).on("mouseout", f, this).on("emphasis", d, this).on("normal", f, this)
}
this._effectcfg = h
},
ok.fadeout = function(t) {
this.off("mouseover").off("mouseout").off("emphasis").off("normal"),
t && t()
},
u(hg, zw),
fs({
type: "effectscatter",
init: function() {
this._symboldraw = new su(hg)
},
render: function(t, e, i) {
var n = t.getdata(),
o = this._symboldraw;
o.updatedata(n),
this.group.add(o.group)
},
updatetransform: function(t, e, i) {
var n = t.getdata();
this.group.dirty();
var o = cd().reset(t);
o.progress && o.progress({
start: 0,
end: n.count()
},
n),
this._symboldraw.updatelayout(n)
},
_updategrouptransform: function(t) {
var e = t.coordinatesystem;
e && e.getroamtransform && (this.group.transform = mt(e.getroamtransform()), this.group.decomposetransform())
},
remove: function(t, e) {
this._symboldraw && this._symboldraw.remove(e)
},
dispose: function() {}
}),
es(hd("effectscatter", "circle")),
os(cd("effectscatter"));
var ek = "undefined" == typeof uint32array ? array: uint32array,
rk = "undefined" == typeof float64array ? array: float64array,
zk = oi.extend({
type: "series.lines",
dependencies: ["grid", "polar"],
visualcoloraccesspath: "linestyle.color",
init: function(t) {
t.data = t.data || [],
cg(t);
var e = this._processflatcoordsarray(t.data);
this._flatcoords = e.flatcoords,
this._flatcoordsoffset = e.flatcoordsoffset,
e.flatcoords && (t.data = new float32array(e.count)),
zk.superapply(this, "init", arguments)
},
mergeoption: function(t) {
if (t.data = t.data || [], cg(t), t.data) {
var e = this._processflatcoordsarray(t.data);
this._flatcoords = e.flatcoords,
this._flatcoordsoffset = e.flatcoordsoffset,
e.flatcoords && (t.data = new float32array(e.count))
}
zk.superapply(this, "mergeoption", arguments)
},
appenddata: function(t) {
var e = this._processflatcoordsarray(t.data);
e.flatcoords && (this._flatcoords ? (this._flatcoords = z(this._flatcoords, e.flatcoords), this._flatcoordsoffset = z(this._flatcoordsoffset, e.flatcoordsoffset)) : (this._flatcoords = e.flatcoords, this._flatcoordsoffset = e.flatcoordsoffset), t.data = new float32array(e.count)),
this.getrawdata().appenddata(t.data)
},
_getcoordsfromitemmodel: function(t) {
var e = this.getdata().getitemmodel(t);
return e.option instanceof array ? e.option: e.getshallow("coords")
},
getlinecoordscount: function(t) {
return this._flatcoordsoffset ? this._flatcoordsoffset[2 * t + 1] : this._getcoordsfromitemmodel(t).length
},
getlinecoords: function(t, e) {
if (this._flatcoordsoffset) {
for (var i = this._flatcoordsoffset[2 * t], n = this._flatcoordsoffset[2 * t + 1], o = 0; o < n; o++) e[o] = e[o] || [],
e[o][0] = this._flatcoords[i + 2 * o],
e[o][1] = this._flatcoords[i + 2 * o + 1];
return n
}
for (var a = this._getcoordsfromitemmodel(t), o = 0; o < a.length; o++) e[o] = e[o] || [],
e[o][0] = a[o][0],
e[o][1] = a[o][1];
return a.length
},
_processflatcoordsarray: function(t) {
var e = 0;
if (this._flatcoords && (e = this._flatcoords.length), "number" == typeof t[0]) {
for (var i = t.length,
n = new ek(i), o = new rk(i), a = 0, r = 0, s = 0, l = 0; l < i;) {
s++;
var u = t[l++];
n[r++] = a + e,
n[r++] = u;
for (var h = 0; h < u; h++) {
var c = t[l++],
d = t[l++];
o[a++] = c,
o[a++] = d
}
}
return {
flatcoordsoffset: new uint32array(n.buffer, 0, r),
flatcoords: o,
count: s
}
}
return {
flatcoordsoffset: null,
flatcoords: null,
count: t.length
}
},
getinitialdata: function(t, e) {
var i = new ea(["value"], this);
return i.hasitemoption = !1,
i.initdata(t.data, [],
function(t, e, n, o) {
if (t instanceof array) return nan;
i.hasitemoption = !0;
var a = t.value;
return null != a ? a instanceof array ? a[o] : a: void 0
}),
i
},
formattooltip: function(t) {
var e = this.getdata().getitemmodel(t),
i = e.get("name");
if (i) return i;
var n = e.get("fromname"),
o = e.get("toname"),
a = [];
return null != n && a.push(n),
null != o && a.push(o),
qo(a.join(" > "))
},
preventincremental: function() {
return !! this.get("effect.show")
},
getprogressive: function() {
var t = this.option.progressive;
return null == t ? this.option.large ? 1e4: this.get("progressive") : t
},
getprogressivethreshold: function() {
var t = this.option.progressivethreshold;
return null == t ? this.option.large ? 2e4: this.get("progressivethreshold") : t
},
defaultoption: {
coordinatesystem: "geo",
zlevel: 0,
z: 2,
legendhoverlink: !0,
hoveranimation: !0,
xaxisindex: 0,
yaxisindex: 0,
symbol: ["none", "none"],
symbolsize: [10, 10],
geoindex: 0,
effect: {
show: !1,
period: 4,
constantspeed: 0,
symbol: "circle",
symbolsize: 3,
loop: !0,
traillength: .2
},
large: !1,
largethreshold: 2e3,
polyline: !1,
label: {
show: !1,
position: "end"
},
linestyle: {
opacity: .5
}
}
}),
bk = dg.prototype;
bk.createline = function(t, e, i) {
return new $d(t, e, i)
},
bk._updateeffectsymbol = function(t, e) {
var i = t.getitemmodel(e).getmodel("effect"),
n = i.get("symbolsize"),
o = i.get("symbol");
y(n) || (n = [n, n]);
var a = i.get("color") || t.getitemvisual(e, "color"),
r = this.childat(1);
this._symboltype !== o && (this.remove(r), (r = xl(o, -.5, -.5, 1, 1, a)).z2 = 100, r.culling = !0, this.add(r)),
r && (r.setstyle("shadowcolor", a), r.setstyle(i.getitemstyle(["color"])), r.attr("scale", n), r.setcolor(a), r.attr("scale", n), this._symboltype = o, this._updateeffectanimation(t, i, e))
},
bk._updateeffectanimation = function(t, e, i) {
var n = this.childat(1);
if (n) {
var o = this,
a = t.getitemlayout(i),
r = 1e3 * e.get("period"),
s = e.get("loop"),
l = e.get("constantspeed"),
u = t(e.get("delay"),
function(e) {
return e / t.count() * r / 3
}),
h = "function" == typeof u;
if (n.ignore = !0, this.updateanimationpoints(n, a), l > 0 && (r = this.getlinelength(n) / l * 1e3), r !== this._period || s !== this._loop) {
n.stopanimation();
var c = u;
h && (c = u(i)),
n.__t > 0 && (c = -r * n.__t),
n.__t = 0;
var d = n.animate("", s).when(r, {
__t: 1
}).delay(c).during(function() {
o.updatesymbolposition(n)
});
s || d.done(function() {
o.remove(n)
}),
d.start()
}
this._period = r,
this._loop = s
}
},
bk.getlinelength = function(t) {
return ew(t.__p1, t.__cp1) + ew(t.__cp1, t.__p2)
},
bk.updateanimationpoints = function(t, e) {
t.__p1 = e[0],
t.__p2 = e[1],
t.__cp1 = e[2] || [(e[0][0] + e[1][0]) / 2, (e[0][1] + e[1][1]) / 2]
},
bk.updatedata = function(t, e, i) {
this.childat(0).updatedata(t, e, i),
this._updateeffectsymbol(t, e)
},
bk.updatesymbolposition = function(t) {
var e = t.__p1,
i = t.__p2,
n = t.__cp1,
o = t.__t,
a = t.position,
r = rn,
s = sn;
a[0] = r(e[0], n[0], i[0], o),
a[1] = r(e[1], n[1], i[1], o);
var l = s(e[0], n[0], i[0], o),
u = s(e[1], n[1], i[1], o);
t.rotation = -math.atan2(u, l) - math.pi / 2,
t.ignore = !1
},
bk.updatelayout = function(t, e) {
this.childat(0).updatelayout(t, e);
var i = t.getitemmodel(e).getmodel("effect");
this._updateeffectanimation(t, i, e)
},
u(dg, zw);
var vk = fg.prototype;
vk._createpolyline = function(t, e, i) {
var n = t.getitemlayout(e),
o = new om({
shape: {
points: n
}
});
this.add(o),
this._updatecommonstl(t, e, i)
},
vk.updatedata = function(t, e, i) {
var n = t.hostmodel;
bo(this.childat(0), {
shape: {
points: t.getitemlayout(e)
}
},
n, e),
this._updatecommonstl(t, e, i)
},
vk._updatecommonstl = function(t, e, i) {
var n = this.childat(0),
o = t.getitemmodel(e),
a = t.getitemvisual(e, "color"),
s = i && i.linestyle,
l = i && i.hoverlinestyle;
i && !t.hasitemoption || (s = o.getmodel("linestyle").getlinestyle(), l = o.getmodel("emphasis.linestyle").getlinestyle()),
n.usestyle(r({
strokenoscale: !0,
fill: "none",
stroke: a
},
s)),
n.hoverstyle = l,
uo(this)
},
vk.updatelayout = function(t, e) {
this.childat(0).setshape("points", t.getitemlayout(e))
},
u(fg, zw);
var gk = pg.prototype;
gk.createline = function(t, e, i) {
return new fg(t, e, i)
},
gk.updateanimationpoints = function(t, e) {
this._points = e;
for (var i = [0], n = 0, o = 1; o < e.length; o++) {
var a = e[o - 1],
r = e[o];
n += ew(a, r),
i.push(n)
}
if (0 !== n) {
for (o = 0; o < i.length; o++) i[o] /= n;
this._offsets = i,
this._length = n
}
},
gk.getlinelength = function(t) {
return this._length
},
gk.updatesymbolposition = function(t) {
var e = t.__t,
i = this._points,
n = this._offsets,
o = i.length;
if (n) {
var a = this._lastframe;
if (e < this._lastframepercent) {
for (r = math.min(a + 1, o - 1); r >= 0 && !(n[r] <= e); r--);
r = math.min(r, o - 2)
} else {
for (var r = a; r < o && !(n[r] > e); r++);
r = math.min(r - 1, o - 2)
}
j(t.position, i[r], i[r + 1], (e - n[r]) / (n[r + 1] - n[r]));
var s = i[r + 1][0] - i[r][0],
l = i[r + 1][1] - i[r][1];
t.rotation = -math.atan2(l, s) - math.pi / 2,
this._lastframe = r,
this._lastframepercent = e,
t.ignore = !1
}
},
u(pg, dg);
var fk = fn({
shape: {
polyline: !1,
curveness: 0,
segs: []
},
buildpath: function(t, e) {
var i = e.segs,
n = e.curveness;
if (e.polyline) for (r = 0; r < i.length;) {
var o = i[r++];
if (o > 0) {
t.moveto(i[r++], i[r++]);
for (var a = 1; a < o; a++) t.lineto(i[r++], i[r++])
}
} else for (var r = 0; r < i.length;) {
var s = i[r++],
l = i[r++],
u = i[r++],
h = i[r++];
if (t.moveto(s, l), n > 0) {
var c = (s + u) / 2 - (l - h) * n,
d = (l + h) / 2 - (u - s) * n;
t.quadraticcurveto(c, d, u, h)
} else t.lineto(u, h)
}
},
finddataindex: function(t, e) {
var i = this.shape,
n = i.segs,
o = i.curveness;
if (i.polyline) for (var a = 0,
r = 0; r < n.length;) {
var s = n[r++];
if (s > 0) for (var l = n[r++], u = n[r++], h = 1; h < s; h++) if (vn(l, u, c = n[r++], d = n[r++])) return a;
a++
} else for (var a = 0,
r = 0; r < n.length;) {
var l = n[r++],
u = n[r++],
c = n[r++],
d = n[r++];
if (o > 0) {
if (xn(l, u, (l + c) / 2 - (u - d) * o, (u + d) / 2 - (c - l) * o, c, d)) return a
} else if (vn(l, u, c, d)) return a;
a++
}
return - 1
}
}),
wk = gg.prototype;
wk.ispersistent = function() {
return ! this._incremental
},
wk.updatedata = function(t) {
this.group.removeall();
var e = new fk({
recthover: !0,
cursor: "default"
});
e.setshape({
segs: t.getlayout("linespoints")
}),
this._setcommon(e, t),
this.group.add(e),
this._incremental = null
},
wk.incrementalprepareupdate = function(t) {
this.group.removeall(),
this._clearincremental(),
t.count() > 5e5 ? (this._incremental || (this._incremental = new gn({
silent: !0
})), this.group.add(this._incremental)) : this._incremental = null
},
wk.incrementalupdate = function(t, e) {
var i = new fk;
i.setshape({
segs: e.getlayout("linespoints")
}),
this._setcommon(i, e, !!this._incremental),
this._incremental ? this._incremental.adddisplayable(i, !0) : (i.recthover = !0, i.cursor = "default", i.__startindex = t.start, this.group.add(i))
},
wk.remove = function() {
this._clearincremental(),
this._incremental = null,
this.group.removeall()
},
wk._setcommon = function(t, e, i) {
var n = e.hostmodel;
t.setshape({
polyline: n.get("polyline"),
curveness: n.get("linestyle.curveness")
}),
t.usestyle(n.getmodel("linestyle").getlinestyle()),
t.style.strokenoscale = !0;
var o = e.getvisual("color");
o && t.setstyle("stroke", o),
t.setstyle("fill"),
i || (t.seriesindex = n.seriesindex, t.on("mousemove",
function(e) {
t.dataindex = null;
var i = t.finddataindex(e.offsetx, e.offsety);
i > 0 && (t.dataindex = i + t.__startindex)
}))
},
wk._clearincremental = function() {
var t = this._incremental;
t && t.cleardisplaybles()
};
var hk = {
seriestype: "lines",
plan: zi(),
reset: function(t) {
var e = t.coordinatesystem,
i = t.get("polyline"),
n = t.pipelinecontext.large;
return {
progress: function(o, a) {
var r = [];
if (n) {
var s, l = o.end - o.start;
if (i) {
for (var u = 0,
h = o.start; h < o.end; h++) u += t.getlinecoordscount(h);
s = new float32array(l + 2 * u)
} else s = new float32array(4 * l);
for (var c = 0,
d = [], h = o.start; h < o.end; h++) {
g = t.getlinecoords(h, r),
i && (s[c++] = g);
for (var f = 0; f < g; f++) d = e.datatopoint(r[f], !1, d),
s[c++] = d[0],
s[c++] = d[1]
}
a.setlayout("linespoints", s)
} else for (h = o.start; h < o.end; h++) {
var p = a.getitemmodel(h),
g = t.getlinecoords(h, r),
m = [];
if (i) for (var v = 0; v < g; v++) m.push(e.datatopoint(r[v]));
else {
m[0] = e.datatopoint(r[0]),
m[1] = e.datatopoint(r[1]);
var y = p.get("linestyle.curveness"); + y && (m[2] = [(m[0][0] + m[1][0]) / 2 - (m[0][1] - m[1][1]) * y, (m[0][1] + m[1][1]) / 2 - (m[1][0] - m[0][0]) * y])
}
a.setitemlayout(h, m)
}
}
}
}
};
fs({
type: "lines",
init: function() {},
render: function(t, e, i) {
var n = t.getdata(),
o = this._updatelinedraw(n, t),
a = t.get("zlevel"),
r = t.get("effect.traillength"),
s = i.getzr(),
l = "svg" === s.painter.gettype();
l || s.painter.getlayer(a).clear(!0),
null == this._lastzlevel || l || s.configlayer(this._lastzlevel, {
motionblur: !1
}),
this._showeffect(t) && r && (l || s.configlayer(a, {
motionblur: !0,
lastframealpha: math.max(math.min(r / 10 + .9, 1), 0)
})),
o.updatedata(n),
this._lastzlevel = a,
this._finished = !0
},
incrementalpreparerender: function(t, e, i) {
var n = t.getdata();
this._updatelinedraw(n, t).incrementalprepareupdate(n),
this._clearlayer(i),
this._finished = !1
},
incrementalrender: function(t, e, i) {
this._linedraw.incrementalupdate(t, e.getdata()),
this._finished = t.end === e.getdata().count()
},
updatetransform: function(t, e, i) {
var n = t.getdata(),
o = t.pipelinecontext;
if (!this._finished || o.large || o.progressiverender) return {
update: !0
};
var a = hk.reset(t);
a.progress && a.progress({
start: 0,
end: n.count()
},
n),
this._linedraw.updatelayout(),
this._clearlayer(i)
},
_updatelinedraw: function(t, e) {
var i = this._linedraw,
n = this._showeffect(e),
o = !!e.get("polyline"),
a = e.pipelinecontext.large;
return i && n === this._haseffet && o === this._ispolyline && a === this._islargedraw || (i && i.remove(), i = this._linedraw = a ? new gg: new jd(o ? n ? pg: fg: n ? dg: $d), this._haseffet = n, this._ispolyline = o, this._islargedraw = a, this.group.removeall()),
this.group.add(i.group),
i
},
_showeffect: function(t) {
return !! t.get("effect.show")
},
_clearlayer: function(t) {
var e = t.getzr();
"svg" === e.painter.gettype() || null == this._lastzlevel || e.painter.getlayer(this._lastzlevel).clear(!0)
},
remove: function(t, e) {
this._linedraw && this._linedraw.remove(),
this._linedraw = null,
this._clearlayer(e)
},
dispose: function() {}
});
var zk = "linestyle.opacity".split("."),
uk = {
seriestype: "lines",
reset: function(t, e, i) {
var n = mg(t.get("symbol")),
o = mg(t.get("symbolsize")),
a = t.getdata();
return a.setvisual("fromsymbol", n && n[0]),
a.setvisual("tosymbol", n && n[1]),
a.setvisual("fromsymbolsize", o && o[0]),
a.setvisual("tosymbolsize", o && o[1]),
a.setvisual("opacity", t.get(zk)),
{
dataeach: a.hasitemoption ?
function(t, e) {
var i = t.getitemmodel(e),
n = mg(i.getshallow("symbol", !0)),
o = mg(i.getshallow("symbolsize", !0)),
a = i.get(zk);
n[0] && t.setitemvisual(e, "fromsymbol", n[0]),
n[1] && t.setitemvisual(e, "tosymbol", n[1]),
o[0] && t.setitemvisual(e, "fromsymbolsize", o[0]),
o[1] && t.setitemvisual(e, "tosymbolsize", o[1]),
t.setitemvisual(e, "opacity", a)
}: null
}
}
};
os(hk),
es(uk),
oi.extend({
type: "series.heatmap",
getinitialdata: function(t, e) {
return dl(this.getsource(), this, {
generatecoord: "value"
})
},
preventincremental: function() {
var t = ba.get(this.get("coordinatesystem"));
if (t && t.dimensions) return "lng" === t.dimensions[0] && "lat" === t.dimensions[1]
},
defaultoption: {
coordinatesystem: "cartesian2d",
zlevel: 0,
z: 2,
geoindex: 0,
blursize: 30,
pointsize: 20,
maxopacity: 1,
minopacity: 0
}
});
vg.prototype = {
update: function(t, e, i, n, o, a) {
var r = this._getbrush(),
s = this._getgradient(t, o, "inrange"),
l = this._getgradient(t, o, "outofrange"),
u = this.pointsize + this.blursize,
h = this.canvas,
c = h.getcontext("2d"),
d = t.length;
h.width = e,
h.height = i;
for (var f = 0; f < d; ++f) {
var p = t[f],
g = p[0],
m = p[1],
v = n(p[2]);
c.globalalpha = v,
c.drawimage(r, g - u, m - u)
}
if (!h.width || !h.height) return h;
for (var y = c.getimagedata(0, 0, h.width, h.height), x = y.data, _ = 0, w = x.length, b = this.minopacity, s = this.maxopacity - b; _ < w;) {
var v = x[_ + 3] / 256,
m = 4 * math.floor(255 * v);
if (v > 0) {
var i = a(v) ? s: l;
v > 0 && (v = v * s + b),
x[_++] = i[m],
x[_++] = i[m + 1],
x[_++] = i[m + 2],
x[_++] = i[m + 3] * v * 256
} else _ += 4
}
return c.putimagedata(y, 0, 0),
h
},
_getbrush: function() {
var t = this._brushcanvas || (this._brushcanvas = y_()),
e = this.pointsize + this.blursize,
i = 2 * e;
t.width = i,
t.height = i;
var n = t.getcontext("2d");
return n.clearrect(0, 0, i, i),
n.shadowoffsetx = i,
n.shadowblur = this.blursize,
n.shadowcolor = "#000",
n.beginpath(),
n.arc( - e, e, this.pointsize, 0, 2 * math.pi, !0),
n.closepath(),
n.fill(),
t
},
_getgradient: function(t, e, i) {
for (var n = this._gradientpixels,
o = n[i] || (n[i] = new uint8clampedarray(1024)), a = [0, 0, 0, 0], r = 0, s = 0; s < 256; s++) e[i](s / 255, !0, a),
o[r++] = a[0],
o[r++] = a[1],
o[r++] = a[2],
o[r++] = a[3];
return o
}
},
fs({
type: "heatmap",
render: function(t, e, i) {
var n;
e.eachcomponent("visualmap",
function(e) {
e.eachtargetseries(function(i) {
i === t && (n = e)
})
}),
this.group.removeall(),
this._incrementaldisplayable = null;
var o = t.coordinatesystem;
"cartesian2d" === o.type || "calendar" === o.type ? this._renderoncartesianandcalendar(t, i, 0, t.getdata().count()) : _g(o) && this._renderongeo(o, t, n, i)
},
incrementalpreparerender: function(t, e, i) {
this.group.removeall()
},
incrementalrender: function(t, e, i, n) {
e.coordinatesystem && this._renderoncartesianandcalendar(e, n, t.start, t.end, !0)
},
_renderoncartesianandcalendar: function(t, e, i, n, o) {
var r, s, l = t.coordinatesystem;
if ("cartesian2d" === l.type) {
var u = l.getaxis("x"),
h = l.getaxis("y");
r = u.getbandwidth(),
s = h.getbandwidth()
}
for (var c = this.group,
d = t.getdata(), f = t.getmodel("itemstyle").getitemstyle(["color"]), p = t.getmodel("emphasis.itemstyle").getitemstyle(), g = t.getmodel("label"), m = t.getmodel("emphasis.label"), v = l.type, y = "cartesian2d" === v ? [d.mapdimension("x"), d.mapdimension("y"), d.mapdimension("value")] : [d.mapdimension("time"), d.mapdimension("value")], x = i; x < n; x++) {
var _;
if ("cartesian2d" === v) {
if (isnan(d.get(y[2], x))) continue;
var w = l.datatopoint([d.get(y[0], x), d.get(y[1], x)]);
_ = new am({
shape: {
x: w[0] - r / 2,
y: w[1] - s / 2,
width: r,
height: s
},
style: {
fill: d.getitemvisual(x, "color"),
opacity: d.getitemvisual(x, "opacity")
}
})
} else {
if (isnan(d.get(y[1], x))) continue;
_ = new am({
z2: 1,
shape: l.datatorect([d.get(y[0], x)]).contentshape,
style: {
fill: d.getitemvisual(x, "color"),
opacity: d.getitemvisual(x, "opacity")
}
})
}
var b = d.getitemmodel(x);
d.hasitemoption && (f = b.getmodel("itemstyle").getitemstyle(["color"]), p = b.getmodel("emphasis.itemstyle").getitemstyle(), g = b.getmodel("label"), m = b.getmodel("emphasis.label"));
var s = t.getrawvalue(x),
m = "-";
s && null != s[2] && (m = s[2]),
co(f, p, g, m, {
labelfetcher: t,
labeldataindex: x,
defaulttext: m,
isrecttext: !0
}),
_.setstyle(f),
uo(_, d.hasitemoption ? p: a({},
p)),
_.incremental = o,
o && (_.usehoverlayer = !0),
c.add(_),
d.setitemgraphicel(x, _)
}
},
_renderongeo: function(t, e, i, n) {
var o = i.targetvisuals.inrange,
a = i.targetvisuals.outofrange,
r = e.getdata(),
s = this._hmlayer || this._hmlayer || new vg;
s.blursize = e.get("blursize"),
s.pointsize = e.get("pointsize"),
s.minopacity = e.get("minopacity"),
s.maxopacity = e.get("maxopacity");
var l = t.getviewrect().clone(),
u = t.getroamtransform();
l.applytransform(u);
var h = math.max(l.x, 0),
c = math.max(l.y, 0),
d = math.min(l.width + l.x, n.getwidth()),
f = math.min(l.height + l.y, n.getheight()),
p = d - h,
g = f - c,
m = [r.mapdimension("lng"), r.mapdimension("lat"), r.mapdimension("value")],
v = r.maparray(m,
function(e, i, n) {
var o = t.datatopoint([e, i]);
return o[0] -= h,
o[1] -= c,
o.push(n),
o
}),
y = i.getextent(),
x = "visualmap.continuous" === i.type ? xg(y, i.option.range) : yg(y, i.getpiecelist(), i.option.selected);
s.update(v, p, g, o.color.getnormalizer(), {
inrange: o.color.getcolormapper(),
outofrange: a.color.getcolormapper()
},
x);
var _ = new hi({
style: {
width: p,
height: g,
x: h,
y: c,
image: s.canvas
},
silent: !0
});
this.group.add(_)
},
dispose: function() {}
});
var xk = ed.extend({
type: "series.pictorialbar",
dependencies: ["grid"],
defaultoption: {
symbol: "circle",
symbolsize: null,
symbolrotate: null,
symbolposition: null,
symboloffset: null,
symbolmargin: null,
symbolrepeat: !1,
symbolrepeatdirection: "end",
symbolclip: !1,
symbolboundingdata: null,
symbolpatternsize: 400,
bargap: "-100%",
progressive: 0,
hoveranimation: !1
},
getinitialdata: function(t) {
return t.stack = null,
xk.superapply(this, "getinitialdata", arguments)
}
}),
jk = ["itemstyle", "borderwidth"],
yk = [{
xy: "x",
wh: "width",
index: 0,
posdesc: ["left", "right"]
},
{
xy: "y",
wh: "height",
index: 1,
posdesc: ["top", "bottom"]
}],
qk = new ks;
fs({
type: "pictorialbar",
render: function(t, e, i) {
var n = this.group,
o = t.getdata(),
a = this._data,
r = t.coordinatesystem,
s = !!r.getbaseaxis().ishorizontal(),
l = r.grid.getrect(),
u = {
ecsize: {
width: i.getwidth(),
height: i.getheight()
},
seriesmodel: t,
coordsys: r,
coordsysextent: [[l.x, l.x + l.width], [l.y, l.y + l.height]],
ishorizontal: s,
valuedim: yk[ + s],
categorydim: yk[1 - s]
};
return o.diff(a).add(function(t) {
if (o.hasvalue(t)) {
var e = pg(o, t),
i = wg(o, t, e, u),
a = rg(o, u, i);
o.setitemgraphicel(t, a),
n.add(a),
wg(a, u, i)
}
}).update(function(t, e) {
var i = a.getitemgraphicel(e);
if (o.hasvalue(t)) {
var r = pg(o, t),
s = wg(o, t, r, u),
l = vg(o, s);
i && l !== i.__pictorialshapestr && (n.remove(i), o.setitemgraphicel(t, null), i = null),
i ? zg(i, u, s) : i = rg(o, u, s, !0),
o.setitemgraphicel(t, i),
i.__pictorialsymbolmeta = s,
n.add(i),
wg(i, u, s)
} else n.remove(i)
}).remove(function(t) {
var e = a.getitemgraphicel(t);
e && bg(a, t, e.__pictorialsymbolmeta.animationmodel, e)
}).execute(),
this._data = o,
this.group
},
dispose: b,
remove: function(t, e) {
var i = this.group,
n = this._data;
t.get("animation") ? n && n.eachitemgraphicel(function(e) {
bg(n, e.dataindex, t, e)
}) : i.removeall()
}
});
os(v(kl, "pictorialbar")),
es(hd("pictorialbar", "roundrect"));
var kk = function(t, e, i, n, o) {
ha.call(this, t, e, i),
this.type = n || "value",
this.position = o || "bottom",
this.orient = null
};
kk.prototype = {
constructor: kk,
model: null,
ishorizontal: function() {
var t = this.position;
return "top" === t || "bottom" === t
},
pointtodata: function(t, e) {
return this.coordinatesystem.pointtodata(t, e)[0]
},
toglobalcoord: null,
tolocalcoord: null
},
u(kk, ha),
zg.prototype = {
type: "singleaxis",
axispointerenabled: !0,
constructor: zg,
_init: function(t, e, i) {
var n = this.dimension,
o = new kk(n, vl(t), [0, 0], t.get("type"), t.get("position")),
a = "category" === o.type;
o.onband = a && t.get("boundarygap"),
o.inverse = t.get("inverse"),
o.orient = t.get("orient"),
t.axis = o,
o.model = t,
o.coordinatesystem = this,
this._axis = o
},
update: function(t, e) {
t.eachseries(function(t) {
if (t.coordinatesystem === this) {
var e = t.getdata();
d(e.mapdimension(this.dimension, !0),
function(t) {
this._axis.scale.unionextentfromdata(e, t)
},
this),
bl(this._axis.scale, this._axis.model)
}
},
this)
},
resize: function(t, e) {
this._rect = la({
left: t.get("left"),
top: t.get("top"),
right: t.get("right"),
bottom: t.get("bottom"),
width: t.get("width"),
height: t.get("height")
},
{
width: e.getwidth(),
height: e.getheight()
}),
this._adjustaxis()
},
getrect: function() {
return this._rect
},
_adjustaxis: function() {
var t = this._rect,
e = this._axis,
i = e.ishorizontal(),
n = i ? [0, t.width] : [0, t.height],
o = e.reverse ? 1 : 0;
e.setextent(n[o], n[1 - o]),
this._updateaxistransform(e, i ? t.x: t.y)
},
_updateaxistransform: function(t, e) {
var i = t.getextent(),
n = i[0] + i[1],
o = t.ishorizontal();
t.toglobalcoord = o ?
function(t) {
return t + e
}: function(t) {
return n - t + e
},
t.tolocalcoord = o ?
function(t) {
return t - e
}: function(t) {
return n - t + e
}
},
getaxis: function() {
return this._axis
},
getbaseaxis: function() {
return this._axis
},
getaxes: function() {
return [this._axis]
},
gettooltipaxes: function() {
return {
baseaxes: [this.getaxis()]
}
},
containpoint: function(t) {
var e = this.getrect(),
i = this.getaxis();
return "horizontal" === i.orient ? i.contain(i.tolocalcoord(t[0])) && t[1] >= e.y && t[1] <= e.y + e.height: i.contain(i.tolocalcoord(t[1])) && t[0] >= e.y && t[0] <= e.y + e.height
},
pointtodata: function(t) {
var e = this.getaxis();
return [e.coordtodata(e.tolocalcoord(t["horizontal" === e.orient ? 0 : 1]))]
},
datatopoint: function(t) {
var e = this.getaxis(),
i = this.getrect(),
n = [],
o = "horizontal" === e.orient ? 0 : 1;
return t instanceof array && (t = t[0]),
n[o] = e.toglobalcoord(e.datatocoord( + t)),
n[1 - o] = 0 === o ? i.y + i.height / 2 : i.x + i.width / 2,
n
}
},
ba.register("single", {
create: function(t, e) {
var i = [];
return t.eachcomponent("singleaxis",
function(n, o) {
var a = new zg(n, t, e);
a.name = "single_" + o,
a.resize(n, e),
n.coordinatesystem = a,
i.push(a)
}),
t.eachseries(function(e) {
if ("singleaxis" === e.get("coordinatesystem")) {
var i = t.querycomponents({
maintype: "singleaxis",
index: e.get("singleaxisindex"),
id: e.get("singleaxisid")
})[0];
e.coordinatesystem = i && i.coordinatesystem
}
}),
i
},
dimensions: zg.prototype.dimensions
});
var $k = ["axisline", "axisticklabel", "axisname"],
jk = ld.extend({
type: "singleaxis",
axispointerclass: "singleaxispointer",
render: function(t, e, i, n) {
var o = this.group;
o.removeall();
var a = ug(t),
r = new id(t, a);
d($k, r.add, r),
o.add(r.getgroup()),
t.get("splitline.show") && this._splitline(t),
jk.supercall(this, "render", t, e, i, n)
},
_splitline: function(t) {
var e = t.axis;
if (!e.scale.isblank()) {
var i = t.getmodel("splitline"),
n = i.getmodel("linestyle"),
o = n.get("width"),
a = n.get("color");
a = a instanceof array ? a: [a];
for (var r = t.coordinatesystem.getrect(), s = e.ishorizontal(), l = [], u = 0, h = e.gettickscoords({
tickmodel: i
}), c = [], d = [], f = 0; f < h.length; ++f) {
var p = e.toglobalcoord(h[f].coord);
s ? (c[0] = p, c[1] = r.y, d[0] = p, d[1] = r.y + r.height) : (c[0] = r.x, c[1] = p, d[0] = r.x + r.width, d[1] = p);
var g = u++%a.length;
l[g] = l[g] || [],
l[g].push(new rm(xn({
shape: {
x1: c[0],
y1: c[1],
x2: d[0],
y2: d[1]
},
style: {
linewidth: o
},
silent: !0
})))
}
for (f = 0; f < l.length; ++f) this.group.add(xm(l[f], {
style: {
stroke: a[f % a.length],
linedash: n.getlinedash(o),
linewidth: o
},
silent: !0
}))
}
}
}),
qk = ym.extend({
type: "singleaxis",
layoutmode: "box",
axis: null,
coordinatesystem: null,
getcoordsysmodel: function() {
return this
}
}),
tp = {
left: "5%",
top: "5%",
right: "5%",
bottom: "5%",
type: "value",
position: "bottom",
orient: "horizontal",
axisline: {
show: !0,
linestyle: {
width: 2,
type: "solid"
}
},
tooltip: {
show: !0
},
axistick: {
show: !0,
length: 6,
linestyle: {
width: 2
}
},
axislabel: {
show: !0,
interval: "auto"
},
splitline: {
show: !0,
linestyle: {
type: "dashed",
opacity: .2
}
}
};
n(qk.prototype, ca),
xd("single", qk,
function(t, e) {
return e.type || (e.data ? "category": "value")
},
tp);
var ep = function(t, e) {
var i, n = [],
o = t.seriesindex;
if (null == o || !(i = e.getseriesbyindex(o))) return {
point: []
};
var a = i.getdata(),
r = zi(a, t);
if (null == r || r < 0 || y(r)) return {
point: []
};
var s = a.getitemgraphicel(r),
l = i.coordinatesystem;
if (i.gettooltipposition) n = i.gettooltipposition(r) || [];
else if (l && l.datatopoint) n = l.datatopoint(a.getvalues(f(l.dimensions,
function(t) {
return a.mapdimension(t)
}), r, !0)) || [];
else if (s) {
var u = s.getboundingrect().clone();
u.applytransform(s.transform),
n = [u.x + u.width / 2, u.y + u.height / 2]
}
return {
point: n,
el: s
}
},
ip = d,
np = v,
op = bi(),
ap = (bs({
type: "axispointer",
coordsysaxesinfo: null,
defaultoption: {
show: "auto",
triggeron: null,
zlevel: 0,
z: 50,
type: "line",
snap: !1,
triggertooltip: !0,
value: null,
status: null,
link: [],
animation: null,
animationdurationupdate: 200,
linestyle: {
color: "#aaa",
width: 1,
type: "solid"
},
shadowstyle: {
color: "rgba(150,150,150,0.3)"
},
label: {
show: !0,
formatter: null,
precision: "auto",
margin: 3,
color: "#fff",
padding: [5, 7, 5, 7],
backgroundcolor: "auto",
bordercolor: null,
borderwidth: 0,
shadowblur: 3,
shadowcolor: "#aaa"
},
handle: {
show: !1,
icon: "m10.7,11.9v-1.3h9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4c19.5,16.3,15.6,12.2,10.7,11.9z m13.3,24.4h6.7v-1.2h6.6z m13.3,22h6.7v-1.2h6.6z m13.3,19.6h6.7v-1.2h6.6z",
size: 45,
margin: 50,
color: "#333",
shadowblur: 3,
shadowcolor: "#aaa",
shadowoffsetx: 0,
shadowoffsety: 2,
throttle: 40
}
}
}), bi()),
rp = d,
sp = vs({
type: "axispointer",
render: function(t, e, i) {
var n = e.getcomponent("tooltip"),
o = t.get("triggeron") || n && n.get("triggeron") || "mousemove|click";
im("axispointer", i,
function(t, e, i) {
"none" !== o && ("leave" === t || o.indexof(t) >= 0) && i({
type: "updateaxispointer",
currtrigger: t,
x: e && e.offsetx,
y: e && e.offsety
})
})
},
remove: function(t, e) {
lm(e.getzr(), "axispointer"),
sp.superapply(this._model, "remove", arguments)
},
dispose: function(t, e) {
lm("axispointer", e),
sp.superapply(this._model, "dispose", arguments)
}
}),
lp = bi(),
up = i,
hp = m; (um.prototype = {
_group: null,
_lastgraphickey: null,
_handle: null,
_dragging: !1,
_lastvalue: null,
_laststatus: null,
_payloadinfo: null,
animationthreshold: 15,
render: function(t, e, i, n) {
var o = e.get("value"),
a = e.get("status");
if (this._axismodel = t, this._axispointermodel = e, this._api = i, n || this._lastvalue !== o || this._laststatus !== a) {
this._lastvalue = o,
this._laststatus = a;
var r = this._group,
s = this._handle;
if (!a || "hide" === a) return r && r.hide(),
void(s && s.hide());
r && r.show(),
s && s.show();
var l = {};
this.makeeloption(l, o, t, e, i);
var u = l.graphickey;
u !== this._lastgraphickey && this.clear(i),
this._lastgraphickey = u;
var h = this._moveanimation = this.determineanimation(t, e);
if (r) {
var c = v(hm, e, h);
this.updatepointerel(r, l, c, e),
this.updatelabelel(r, l, c, e)
} else r = this._group = new zw,
this.createpointerel(r, l, t, e),
this.createlabelel(r, l, t, e),
i.getzr().add(r);
pm(r, e, !0),
this._renderhandle(o)
}
},
remove: function(t) {
this.clear(t)
},
dispose: function(t) {
this.clear(t)
},
determineanimation: function(t, e) {
var i = e.get("animation"),
n = t.axis,
o = "category" === n.type,
a = e.get("snap");
if (!a && !o) return ! 1;
if ("auto" === i || null == i) {
var r = this.animationthreshold;
if (o && n.getbandwidth() > r) return ! 0;
if (a) {
var s = xh(t).seriesdatacount,
l = n.getextent();
return math.abs(l[0] - l[1]) / s > r
}
return ! 1
}
return ! 0 === i
},
makeeloption: function(t, e, i, n, o) {},
createpointerel: function(t, e, i, n) {
var o = e.pointer;
if (o) {
var a = lp(t).pointerel = new bm[o.type](up(e.pointer));
t.add(a)
}
},
createlabelel: function(t, e, i, n) {
if (e.label) {
var o = lp(t).labelel = new am(up(e.label));
t.add(o),
dm(o, n)
}
},
updatepointerel: function(t, e, i) {
var n = lp(t).pointerel;
n && (n.setstyle(e.pointer.style), i(n, {
shape: e.pointer.shape
}))
},
updatelabelel: function(t, e, i, n) {
var o = lp(t).labelel;
o && (o.setstyle(e.label.style), i(o, {
shape: e.label.shape,
position: e.label.position
}), dm(o, n))
},
_renderhandle: function(t) {
if (!this._dragging && this.updatehandletransform) {
var e = this._axispointermodel,
i = this._api.getzr(),
n = this._handle,
o = e.getmodel("handle"),
a = e.get("status");
if (!o.get("show") || !a || "hide" === a) return n && i.remove(n),
void(this._handle = null);
var r;
this._handle || (r = !0, n = this._handle = co(o.get("icon"), {
cursor: "move",
draggable: !0,
onmousemove: function(t) {
lw(t.event)
},
onmousedown: hp(this._onhandledragmove, this, 0, 0),
drift: hp(this._onhandledragmove, this),
ondragend: hp(this._onhandledragend, this)
}), i.add(n)),
pm(n, e, !1);
var s = ["color", "bordercolor", "borderwidth", "opacity", "shadowcolor", "shadowblur", "shadowoffsetx", "shadowoffsety"];
n.setstyle(o.getitemstyle(null, s));
var l = o.get("size");
y(l) || (l = [l, l]),
n.attr("scale", [l[0] / 2, l[1] / 2]),
lr(this, "_dodispatchaxispointer", o.get("throttle") || 0, "fixrate"),
this._movehandletovalue(t, r)
}
},
_movehandletovalue: function(t, e) {
hm(this._axispointermodel, !e && this._moveanimation, this._handle, fm(this.gethandletransform(t, this._axismodel, this._axispointermodel)))
},
_onhandledragmove: function(t, e) {
var i = this._handle;
if (i) {
this._dragging = !0;
var n = this.updatehandletransform(fm(i), [t, e], this._axismodel, this._axispointermodel);
this._payloadinfo = n,
i.stopanimation(),
i.attr(fm(n)),
lp(i).lastprop = null,
this._dodispatchaxispointer()
}
},
_dodispatchaxispointer: function() {
if (this._handle) {
var t = this._payloadinfo,
e = this._axismodel;
this._api.dispatchaction({
type: "updateaxispointer",
x: t.cursorpoint[0],
y: t.cursorpoint[1],
tooltipoption: t.tooltipoption,
axesinfo: [{
axisdim: e.axis.dim,
axisindex: e.componentindex
}]
})
}
},
_onhandledragend: function(t) {
if (this._dragging = !1, this._handle) {
var e = this._axispointermodel.get("value");
this._movehandletovalue(e),
this._api.dispatchaction({
type: "hidetip"
})
}
},
gethandletransform: null,
updatehandletransform: null,
clear: function(t) {
this._lastvalue = null,
this._laststatus = null;
var e = t.getzr(),
i = this._group,
n = this._handle;
e && i && (this._lastgraphickey = null, i && e.remove(i), n && e.remove(n), this._group = null, this._handle = null, this._payloadinfo = null)
},
doclear: function() {},
buildlabel: function(t, e, i) {
return i = i || 0,
{
x: t[i],
y: t[1 - i],
width: e[i],
height: e[1 - i]
}
}
}).constructor = um,
xi(um);
var cp = um.extend({
makeeloption: function(t, e, i, n, o) {
var a = i.axis,
r = a.grid,
s = n.get("type"),
l = mm(r, a).getotheraxis(a).getglobalextent(),
u = a.toglobalcoord(a.datatocoord(e, !0));
if (s && "none" !== s) {
var h = gm(n),
c = dp[s](a, u, l, h);
c.style = h,
t.graphickey = c.type,
t.pointer = c
}
_m(e, t, ih(r.model, i), i, n, o)
},
gethandletransform: function(t, e, i) {
var n = ih(e.axis.grid.model, e, {
labelinside: !1
});
return n.labelmargin = i.get("handle.margin"),
{
position: xm(e.axis, t, n),
rotation: n.rotation + (n.labeldirection < 0 ? math.pi: 0)
}
},
updatehandletransform: function(t, e, i, n) {
var o = i.axis,
a = o.grid,
r = o.getglobalextent(!0),
s = mm(a, o).getotheraxis(o).getglobalextent(),
l = "x" === o.dim ? 0 : 1,
u = t.position;
u[l] += e[l],
u[l] = math.min(r[1], u[l]),
u[l] = math.max(r[0], u[l]);
var h = (s[1] + s[0]) / 2,
c = [h, h];
c[l] = u[l];
var d = [{
verticalalign: "middle"
},
{
align: "center"
}];
return {
position: u,
rotation: t.rotation,
cursorpoint: c,
tooltipoption: d[l]
}
}
}),
dp = {
line: function(t, e, i, n) {
var o = wm([e, i[0]], [e, i[1]], im(t));
return xn({
shape: o,
style: n
}),
{
type: "line",
shape: o
}
},
shadow: function(t, e, i, n) {
var o = math.max(1, t.getbandwidth()),
a = i[1] - i[0];
return {
type: "rect",
shape: bm([e - o / 2, i[0]], [o, a], im(t))
}
}
};
ld.registeraxispointerclass("cartesianaxispointer", cp),
ls(function(t) {
if (t) { (!t.axispointer || 0 === t.axispointer.length) && (t.axispointer = {});
var e = t.axispointer.link;
e && !y(e) && (t.axispointer.link = [e])
}
}),
ks(it.processor.statistic,
function(t, e) {
t.getcomponent("axispointer").coordsysaxesinfo = dh(t, e)
}),
ps({
type: "updateaxispointer",
event: "updateaxispointer",
update: ":updateaxispointer"
},
function(t, e, i) {
var n = t.currtrigger,
o = [t.x, t.y],
a = t,
r = t.dispatchaction || m(i.dispatchaction, i),
s = e.getcomponent("axispointer").coordsysaxesinfo;
if (s) {
em(o) && (o = ep({
seriesindex: a.seriesindex,
dataindex: a.dataindex
},
e).point);
var l = em(o),
u = a.axesinfo,
h = s.axesinfo,
c = "leave" === n || em(o),
d = {},
f = {},
p = {
list: [],
map: {}
},
g = {
showpointer: np(yg, f),
showtooltip: np(qg, p)
};
ip(s.coordsysmap,
function(t, e) {
var i = l || t.containpoint(o);
ip(s.coordsysaxesinfo[e],
function(t, e) {
var n = t.axis,
a = qg(u, t);
if (!c && i && (!u || a)) {
var r = a && a.value;
null != r || l || (r = n.pointtodata(o)),
null != r && xg(t, r, g, !1, d)
}
})
});
var v = {};
return ip(h,
function(t, e) {
var i = t.linkgroup;
i && !f[e] && ip(i.axesinfo,
function(e, n) {
var o = f[n];
if (e !== t && o) {
var a = o.value;
i.mapper && (a = t.axis.scale.parse(i.mapper(a, tm(e), tm(t)))),
v[t.key] = a
}
})
}),
ip(v,
function(t, e) {
xg(h[e], t, g, !0, d)
}),
kg(f, h, d),
$g(p, o, t, r),
jg(h, 0, i),
d
}
});
var fp = ["x", "y"],
pp = ["width", "height"],
gp = um.extend({
makeeloption: function(t, e, i, n, o) {
var a = i.axis,
r = a.coordinatesystem,
s = am(r, 1 - tm(a)),
l = r.datatopoint(e)[0],
u = n.get("type");
if (u && "none" !== u) {
var h = gm(n),
c = mp[u](a, l, s, h);
c.style = h,
t.graphickey = c.type,
t.pointer = c
}
_m(e, t, ug(i), i, n, o)
},
gethandletransform: function(t, e, i) {
var n = ug(e, {
labelinside: !1
});
return n.labelmargin = i.get("handle.margin"),
{
position: xm(e.axis, t, n),
rotation: n.rotation + (n.labeldirection < 0 ? math.pi: 0)
}
},
updatehandletransform: function(t, e, i, n) {
var o = i.axis,
a = o.coordinatesystem,
r = tm(o),
s = am(a, r),
l = t.position;
l[r] += e[r],
l[r] = math.min(s[1], l[r]),
l[r] = math.max(s[0], l[r]);
var u = am(a, 1 - r),
h = (u[1] + u[0]) / 2,
c = [h, h];
return c[r] = l[r],
{
position: l,
rotation: t.rotation,
cursorpoint: c,
tooltipoption: {
verticalalign: "middle"
}
}
}
}),
mp = {
line: function(t, e, i, n) {
var o = wm([e, i[0]], [e, i[1]], tm(t));
return xn({
shape: o,
style: n
}),
{
type: "line",
shape: o
}
},
shadow: function(t, e, i, n) {
var o = t.getbandwidth(),
a = i[1] - i[0];
return {
type: "rect",
shape: bm([e - o / 2, i[0]], [o, a], tm(t))
}
}
};
ld.registeraxispointerclass("singleaxispointer", gp),
vs({
type: "single"
});
var vp = oi.extend({
type: "series.themeriver",
dependencies: ["singleaxis"],
namemap: null,
init: function(t) {
vp.superapply(this, "init", arguments),
this.legenddataprovider = function() {
return this.getrawdata()
}
},
fixdata: function(t) {
for (var e = t.length,
i = f(lp().key(function(t) {
return t[2]
}).entries(t),
function(t) {
return {
name: t.key,
datalist: t.values
}
}), n = i.length, o = -1, a = -1, r = 0; r < n; ++r) {
var s = i[r].datalist.length;
s > o && (o = s, a = r)
}
for (var l = 0; l < n; ++l) if (l !== a) for (var u = i[l].name, h = 0; h < o; ++h) {
for (var c = i[a].datalist[h][0], d = i[l].datalist.length, p = -1, g = 0; g < d; ++g) if (i[l].datalist[g][0] === c) {
p = g;
break
} - 1 === p && (t[e] = [], t[e][0] = c, t[e][1] = 0, t[e][2] = u, e++)
}
return t
},
getinitialdata: function(t, e) {
for (var i = e.querycomponents({
maintype: "singleaxis",
index: this.get("singleaxisindex"),
id: this.get("singleaxisid")
})[0].get("type"), n = g(t.data,
function(t) {
return void 0 !== t[2]
}), o = this.fixdata(n || []), a = [], r = this.namemap = r(), s = 0, l = 0; l < o.length; ++l) a.push(o[l][2]),
r.get(o[l][2]) || (r.set(o[l][2], s), s++);
var u = oa(o, {
coorddimensions: ["single"],
dimensionsdefine: [{
name: "time",
type: xs(i)
},
{
name: "value",
type: "float"
},
{
name: "name",
type: "ordinal"
}],
encodedefine: {
single: 0,
value: 1,
itemname: 2
}
}),
h = new ea(u, this);
return h.initdata(o),
h
},
getlayerseries: function() {
for (var t = this.getdata(), e = t.count(), i = [], n = 0; n < e; ++n) i[n] = n;
for (var o = f(lp().key(function(e) {
return t.get("name", e)
}).entries(i),
function(t) {
return {
name: t.key,
indices: t.values
}
}), a = t.mapdimension("single"), r = 0; r < o.length; ++r) o[r].indices.sort(function(e, i) {
return t.get(a, e) - t.get(a, i)
});
return o
},
getaxistooltipdata: function(t, e, i) {
y(t) || (t = t ? [t] : []);
for (var n, o = this.getdata(), a = this.getlayerseries(), r = [], s = a.length, l = 0; l < s; ++l) {
for (var u = number.max_value,
h = -1,
c = a[l].indices.length, d = 0; d < c; ++d) {
var f = o.get(t[0], a[l].indices[d]),
p = math.abs(f - e);
p <= u && (n = f, u = p, h = a[l].indices[d])
}
r.push(h)
}
return {
dataindices: r,
nestestvalue: n
}
},
formattooltip: function(t) {
var e = this.getdata(),
i = e.getname(t),
n = e.get(e.mapdimension("value"), t);
return (isnan(n) || null == n) && (n = "-"),
qo(i + " : " + n)
},
defaultoption: {
zlevel: 0,
z: 2,
coordinatesystem: "singleaxis",
boundarygap: ["10%", "10%"],
singleaxisindex: 0,
animationeasing: "linear",
label: {
margin: 4,
show: !0,
position: "left",
color: "#000",
fontsize: 11
},
emphasis: {
label: {
show: !0
}
}
}
});
fs({
type: "themeriver",
init: function() {
this._layers = []
},
render: function(t, e, i) {
function n(t) {
return t.name
}
function o(e, i, n) {
var o = this._layers;
if ("remove" !== e) {
for (var u, h = [], c = [], f = l[i].indices, p = 0; p < f.length; p++) {
var g = r.getitemlayout(f[p]),
m = g.x,
v = g.y0,
y = g.y;
h.push([m, v]),
c.push([m, v + y]),
u = r.getitemvisual(f[p], "color")
}
var x, _, w = r.getitemlayout(f[0]),
b = r.getitemmodel(f[p - 1]),
s = b.getmodel("label"),
m = s.get("margin");
if ("add" === e) {
i = d[i] = new zw;
x = new ud({
shape: {
points: h,
stackedonpoints: c,
smooth: .4,
stackedonsmooth: .4,
smoothconstraint: !1
},
z2: 0
}),
_ = new qs({
style: {
x: w.x - m,
y: w.y0 + w.y / 2
}
}),
i.add(x),
i.add(_),
s.add(i),
x.setclippath(dm(x.getboundingrect(), t,
function() {
x.removeclippath()
}))
} else {
var i = o[n];
x = i.childat(0),
_ = i.childat(1),
s.add(i),
d[i] = i,
bo(x, {
shape: {
points: h,
stackedonpoints: c
}
},
t),
bo(_, {
style: {
x: w.x - m,
y: w.y0 + w.y / 2
}
},
t)
}
var t = b.getmodel("emphasis.itemstyle"),
a = b.getmodel("itemstyle");
fo(_.style, s, {
text: s.get("show") ? t.getformattedlabel(f[p - 1], "normal") || r.getname(f[p - 1]) : null,
textverticalalign: "middle"
}),
x.setstyle(a({
fill: u
},
a.getitemstyle(["color"]))),
uo(x, t.getitemstyle())
} else s.remove(o[i])
}
var r = t.getdata(),
s = this.group,
l = t.getlayerseries(),
u = r.getlayout("layoutinfo"),
h = u.rect,
c = u.boundarygap;
s.attr("position", [0, h.y + c[0]]);
var d = {};
new hs(this._layersseries || [], l, n, n).add(m(o, this, "add")).update(m(o, this, "update")).remove(m(o, this, "remove")).execute(),
this._layersseries = l,
this._layers = d
},
dispose: function() {}
});
os(function(t, e) {
t.eachseriesbytype("themeriver",
function(t) {
var e = t.getdata(),
i = t.coordinatesystem,
n = {},
o = i.getrect();
n.rect = o;
var a = t.get("boundarygap"),
r = i.getaxis();
n.boundarygap = a,
"horizontal" === r.orient ? (a[0] = ro(a[0], o.height), a[1] = ro(a[1], o.height), cm(e, t, o.height - a[0] - a[1])) : (a[0] = ro(a[0], o.width), a[1] = ro(a[1], o.width), cm(e, t, o.width - a[0] - a[1])),
e.setlayout("layoutinfo", n)
})
}),
es(function(t) {
t.eachseriesbytype("themeriver",
function(t) {
var e = t.getdata(),
i = t.getrawdata(),
n = t.get("color"),
o = r();
e.each(function(t) {
o.set(e.getrawindex(t), t)
}),
i.each(function(a) {
var r = i.getname(a),
s = n[(t.namemap.get(r) - 1) % n.length];
i.setitemvisual(a, "color", s);
var l = o.get(a);
null != l && e.setitemvisual(l, "color", s)
})
})
}),
ks($d("themeriver")),
oi.extend({
type: "series.sunburst",
_viewroot: null,
getinitialdata: function(t, e) {
var i = {
name: t.name,
children: t.data
};
km(i);
var n = t.levels || [],
o = {};
return o.levels = n,
kc.createtree(i, this, o).data
},
optionupdated: function() {
this.resetviewroot()
},
getdataparams: function(t) {
var e = oi.prototype.getdataparams.apply(this, arguments),
i = this.getdata().tree.getnodebydataindex(t);
return e.treepathinfo = nd(i, this),
e
},
defaultoption: {
zlevel: 0,
z: 2,
center: ["50%", "50%"],
radius: [0, "75%"],
clockwise: !0,
startangle: 90,
minangle: 0,
percentprecision: 2,
stillshowzerosum: !0,
highlightpolicy: "descendant",
nodeclick: "roottonode",
renderlabelforzerodata: !1,
label: {
rotate: "radial",
show: !0,
opacity: 1,
align: "center",
position: "inside",
distance: 5,
silent: !0,
emphasis: {}
},
itemstyle: {
borderwidth: 1,
bordercolor: "white",
bordertype: "solid",
shadowblur: 0,
shadowcolor: "rgba(0, 0, 0, 0.2)",
shadowoffsetx: 0,
shadowoffsety: 0,
opacity: 1,
emphasis: {},
highlight: {
opacity: 1
},
downplay: {
opacity: .9
}
},
animationtype: "expansion",
animationduration: 1e3,
animationdurationupdate: 500,
animationeasing: "cubicout",
data: [],
levels: [],
sort: "desc"
},
getviewroot: function() {
return this._viewroot
},
resetviewroot: function(t) {
t ? this._viewroot = t: t = this._viewroot;
var e = this.getrawdata().tree.root;
t && (t === e || e.contains(t)) || (this._viewroot = e)
}
});
var yp = {
none: "none",
descendant: "descendant",
ancestor: "ancestor",
self: "self"
},
xp = 2,
_p = 4,
wp = pm.prototype;
wp.updatedata = function(t, e, i, o, s) {
this.node = e,
e.piece = this,
o = o || this._seriesmodel,
s = s || this._ecmodel;
var l = this.childat(0);
l.dataindex = e.dataindex;
var u = e.getmodel(),
h = e.getlayout();
h || console.log(e.getlayout());
var c = a({},
h);
c.label = null;
var d, f = nm(e, 0, s),
p = u.getmodel("itemstyle").getitemstyle();
d = r({
linejoin: "bevel",
fill: (d = "normal" === i ? p: n(u.getmodel(i + ".itemstyle").getitemstyle(), p)).fill || f
},
d),
t ? (l.setshape(c), l.shape.r = h.r0, bo(l, {
shape: {
r: h.r
}
},
o, e.dataindex), l.usestyle(d)) : "object" == typeof d.fill && d.fill.type || "object" == typeof l.style.fill && l.style.fill.type ? (bo(l, {
shape: c
},
o), l.usestyle(d)) : bo(l, {
shape: c,
style: d
},
o),
this._updatelabel(o, f, i);
var g = u.getshallow("cursor");
if (g && l.attr("cursor", g), t) {
var m = o.getshallow("highlightpolicy");
this._initevents(l, e, o, m)
}
this._seriesmodel = o || this._seriesmodel,
this._ecmodel = s || this._ecmodel
},
wp.onemphasis = function(t) {
var e = this;
this.node.hosttree.root.eachnode(function(i) {
i.piece && (e.node === i ? i.piece.updatedata(!1, i, "emphasis") : em(i, e.node, t) ? i.piece.childat(0).trigger("highlight") : t !== yp.none && i.piece.childat(0).trigger("downplay"))
})
},
wp.onnormal = function() {
this.node.hosttree.root.eachnode(function(t) {
t.piece && t.piece.updatedata(!1, t, "normal")
})
},
wp.onhighlight = function() {
this.updatedata(!1, this.node, "highlight")
},
wp.ondownplay = function() {
this.updatedata(!1, this.node, "downplay")
},
wp._updatelabel = function(t, e, i) {
function n(t) {
var e = r.get(t);
return null == e ? a.get(t) : e
}
var o = this.node.getmodel(),
a = o.getmodel("label"),
r = "normal" === i || "emphasis" === i ? a: o.getmodel(i + ".label"),
s = o.getmodel("emphasis.label"),
l = t(t.getformattedlabel(this.node.dataindex, "normal", null, null, "label"), this.node.name); ! 1 === n("show") && (l = "");
var u = this.node.getlayout(),
h = r.get("minangle");
null == h && (h = a.get("minangle")),
h = h / 180 * math.pi;
var c = u.endangle - u.startangle;
null != h && math.abs(c) < h && (l = "");
var d = this.childat(1);
co(d.style, d.hoverstyle || {},
a, s, {
defaulttext: r.getshallow("show") ? l: null,
autocolor: e,
useinsidestyle: !0
});
var f, p = (u.startangle + u.endangle) / 2,
g = math.cos(p),
m = math.sin(p),
v = n("position"),
y = n("distance") || 0,
x = n("align");
"outside" === v ? (f = u.r + y, x = p > math.pi / 2 ? "right": "left") : x && "center" !== x ? "left" === x ? (f = u.r0 + y, p > math.pi / 2 && (x = "right")) : "right" === x && (f = u.r - y, p > math.pi / 2 && (x = "left")) : (f = (u.r + u.r0) / 2, x = "center"),
d.attr("style", {
text: l,
textalign: x,
textverticalalign: n("verticalalign") || "middle",
opacity: n("opacity")
});
var _ = f * g + u.cx,
w = f * m + u.cy;
d.attr("position", [_, w]);
var b = n("rotate"),
s = 0;
"radial" === b ? (s = -p) < -math.pi / 2 && (s += math.pi) : "tangential" === b ? (s = math.pi / 2 - p) > math.pi / 2 ? s -= math.pi: s < -math.pi / 2 && (s += math.pi) : "number" == typeof b && (s = b * math.pi / 180),
d.attr("rotation", s)
},
wp._initevents = function(t, e, i, n) {
t.off("mouseover").off("mouseout").off("emphasis").off("normal");
var o = this,
a = function() {
o.onemphasis(n)
},
r = function() {
o.onnormal()
};
i.isanimationenabled() && t.on("mouseover", a).on("mouseout", r).on("emphasis", a).on("normal", r).on("downplay",
function() {
o.ondownplay()
}).on("highlight",
function() {
o.onhighlight()
})
},
u(pm, zw);
mr.extend({
type: "sunburst",
init: function() {},
render: function(t, e, i, n) {
function o(i, n) {
if (c || !i || i.getvalue() || (i = null), i !== l && n !== l) if (n && n.piece) i ? (n.piece.updatedata(!1, i, "normal", t, e), s.setitemgraphicel(i.dataindex, n.piece)) : a(n);
else if (i) {
var o = new pm(i, t, e);
h.add(o),
s.setitemgraphicel(i.dataindex, o)
}
}
function a(t) {
t && t.piece && (h.remove(t.piece), t.piece = null)
}
var r = this;
this.seriesmodel = t,
this.api = i,
this.ecmodel = e;
var s = t.getdata(),
l = s.tree.root,
u = t.getviewroot(),
h = this.group,
c = t.get("renderlabelforzerodata"),
d = [];
u.eachnode(function(t) {
d.push(t)
});
var f = this._oldchildren || [];
if (function(t, e) {
function i(t) {
return t.getid()
}
function n(i, n) {
o(null == i ? null: t[i], null == n ? null: e[n])
}
0 === t.length && 0 === e.length || new hs(e, t, i, i).add(n).update(n).remove(v(n, null)).execute()
} (d, f),
function(i, n) {
if (n.depth > 0) {
r.virtualpiece ? r.virtualpiece.updatedata(!1, i, "normal", t, e) : (r.virtualpiece = new pm(i, t, e), h.add(r.virtualpiece)),
n.piece._onclickevent && n.piece.off("click", n.piece._onclickevent);
var o = function(t) {
r._roottonode(n.parentnode)
};
n.piece._onclickevent = o,
r.virtualpiece.on("click", o)
} else r.virtualpiece && (h.remove(r.virtualpiece), r.virtualpiece = null)
} (l, u), n && n.highlight && n.highlight.piece) {
var p = t.getshallow("highlightpolicy");
n.highlight.piece.onemphasis(p)
} else if (n && n.unhighlight) {
var g = this.virtualpiece; ! g && l.children.length && (g = l.children[0].piece),
g && g.onnormal()
}
this._initevents(),
this._oldchildren = d
},
dispose: function() {},
_initevents: function() {
var t = this,
e = function(e) {
var i = !1;
t.seriesmodel.getviewroot().eachnode(function(n) {
if (!i && n.piece && n.piece.childat(0) === e.target) {
var o = n.getmodel().get("nodeclick");
if ("roottonode" === o) t._roottonode(n);
else if ("link" === o) {
var a = n.getmodel(),
r = a.get("link");
if (r) {
var s = a.get("target", !0) || "_blank";
window.open(r, s)
}
}
i = !0
}
})
};
this.group._onclickevent && this.group.off("click", this.group._onclickevent),
this.group.on("click", e),
this.group._onclickevent = e
},
_roottonode: function(t) {
t !== this.seriesmodel.getviewroot() && this.api.dispatchaction({
type: "sunburstroottonode",
from: this.uid,
seriesid: this.seriesmodel.id,
targetnode: t
})
},
containpoint: function(t, e) {
var i = e.getdata().getitemlayout(0);
if (i) {
var n = t[0] - i.cx,
o = t[1] - i.cy,
a = math.sqrt(n * n + o * o);
return a <= i.r && a >= i.r0
}
}
});
var bp = "sunburstroottonode";
ps({
type: bp,
update: "updateview"
},
function(t, e) {
e.eachcomponent({
maintype: "series",
subtype: "sunburst",
query: t
},
function(e, i) {
var n = td(t, [bp], e);
if (n) {
var o = e.getviewroot();
o && (t.direction = id(o, n.node) ? "rollup": "drilldown"),
e.resetviewroot(n.node)
}
})
});
var sp = "sunbursthighlight";
ps({
type: sp,
update: "updateview"
},
function(t, e) {
e.eachcomponent({
maintype: "series",
subtype: "sunburst",
query: t
},
function(e, i) {
var n = td(t, [sp], e);
n && (t.highlight = n.node)
})
});
ps({
type: "sunburstunhighlight",
update: "updateview"
},
function(t, e) {
e.eachcomponent({
maintype: "series",
subtype: "sunburst",
query: t
},
function(e, i) {
t.unhighlight = !0
})
});
var mp = math.pi / 180;
es(v(jd, "sunburst")),
os(v(function(t, e, i, n) {
e.eachseriesbytype(t,
function(t) {
var e = t.get("center"),
n = t.get("radius");
y(n) || (n = [0, n]),
y(e) || (e = [e, e]);
var o = i.getwidth(),
a = i.getheight(),
r = math.min(o, a),
s = ro(e[0], o),
l = ro(e[1], a),
u = ro(n[0], r / 2),
h = ro(n[1], r / 2),
c = -t.get("startangle") * mp,
f = t.get("minangle") * mp,
p = t.getdata().tree.root,
g = t.getviewroot(),
m = g.depth,
v = t.get("sort");
null != v && rm(g, v);
var x = 0;
d(g.children,
function(t) { ! isnan(t.getvalue()) && x++
});
var _ = g.getvalue(),
w = math.pi / (_ || x) * 2,
b = g.depth > 0,
s = g.height - (b ? -1 : 1),
m = (h - u) / (s || 1),
i = t.get("clockwise"),
t = t.get("stillshowzerosum"),
a = i ? 1 : -1,
d = function(t, e) {
if (t) {
var i = e;
if (t !== p) {
var n = t.getvalue(),
o = 0 === _ && t ? w: n * w;
o < f && (o = f),
i = e + a * o;
var a = t.depth - m - (b ? -1 : 1),
h = u + m * a,
c = u + m * (a + 1),
g = t.getmodel();
null != g.get("r0") && (h = ro(g.get("r0"), r / 2)),
null != g.get("r") && (c = ro(g.get("r"), r / 2)),
t.setlayout({
angle: o,
startangle: e,
endangle: i,
clockwise: i,
cx: s,
cy: l,
r0: h,
r: c
})
}
if (t.children && t.children.length) {
var v = 0;
d(t.children,
function(t) {
v += d(t, e + v)
})
}
return i - e
}
};
if (b) {
var c = u,
l = u + m,
k = 2 * math.pi;
p.setlayout({
angle: k,
startangle: c,
endangle: c + k,
clockwise: i,
cx: s,
cy: l,
r0: c,
r: l
})
}
d(g, c)
})
},
"sunburst")),
ks(v($d, "sunburst"));
var ip = ["itemstyle"],
tp = ["emphasis", "itemstyle"],
ap = ["label"],
dp = ["emphasis", "label"],
cp = "e\0\0",
lp = {
cartesian2d: function(t) {
var e = t.grid.getrect();
return {
coordsys: {
type: "cartesian2d",
x: e.x,
y: e.y,
width: e.width,
height: e.height
},
api: {
coord: function(e) {
return t.datatopoint(e)
},
size: m(bm, t)
}
}
},
geo: function(t) {
var e = t.getboundingrect();
return {
coordsys: {
type: "geo",
x: e.x,
y: e.y,
width: e.width,
height: e.height,
zoom: t.getzoom()
},
api: {
coord: function(e) {
return t.datatopoint(e)
},
size: m(vm, t)
}
}
},
singleaxis: function(t) {
var e = t.getrect();
return {
coordsys: {
type: "singleaxis",
x: e.x,
y: e.y,
width: e.width,
height: e.height
},
api: {
coord: function(e) {
return t.datatopoint(e)
},
size: m(gm, t)
}
}
},
polar: function(t) {
var e = t.getradiusaxis(),
i = t.getangleaxis(),
n = e.getextent();
return n[0] > n[1] && n.reverse(),
{
coordsys: {
type: "polar",
cx: t.cx,
cy: t.cy,
r: n[1],
r0: n[0]
},
api: {
coord: m(function(n) {
var o = e.datatoradius(n[0]),
a = i.datatoangle(n[1]),
r = t.coordtopoint([o, a]);
return r.push(o, a * math.pi / 180),
r
}),
size: m(fm, t)
}
}
},
calendar: function(t) {
var e = t.getrect(),
i = t.getrangeinfo();
return {
coordsys: {
type: "calendar",
x: e.x,
y: e.y,
width: e.width,
height: e.height,
cellwidth: t.getcellwidth(),
cellheight: t.getcellheight(),
rangeinfo: {
start: i.start,
end: i.end,
weeks: i.weeks,
daycount: i.allday
}
},
api: {
coord: function(e, i) {
return t.datatopoint(e, i)
}
}
}
}
};
oi.extend({
type: "series.custom",
dependencies: ["grid", "polar", "geo", "singleaxis", "calendar"],
defaultoption: {
coordinatesystem: "cartesian2d",
zlevel: 0,
z: 2,
legendhoverlink: !0,
usetransform: !0
},
getinitialdata: function(t, e) {
return dl(this.getsource(), this)
},
getdataparams: function(t, e, i) {
var n = oi.prototype.getdataparams.apply(this, arguments);
return i && (n.info = i.info),
n
}
}),
mr.extend({
type: "custom",
_data: null,
render: function(t, e, i, n) {
var o = this._data,
a = t.getdata(),
r = this.group,
s = um(t, a, e, i);
a.diff(o).add(function(e) {
jm(null, e, s(e, n), t, r, a)
}).update(function(e, i) {
jm(o.getitemgraphicel(i), e, s(e, n), t, r, a)
}).remove(function(t) {
var e = o.getitemgraphicel(t);
e && r.remove(e)
}).execute(),
this._data = a
},
incrementalpreparerender: function(t, e, i) {
this.group.removeall(),
this._data = null
},
incrementalrender: function(t, e, i, n, o) {
for (var a = e.getdata(), r = um(e, a, i, n), s = t.start; s < t.end; s++) jm(null, s, r(s, o), e, this.group, a).traverse(function(t) {
t.isgroup || (t.incremental = !0, t.usehoverlayer = !0)
})
},
dispose: b,
filterforexposedevent: function(t, e, i, n) {
var o = e.element;
if (null == o || i.name === o) return ! 0;
for (; (i = i.parent) && i !== this.group;) if (i.name === o) return ! 0;
return ! 1
}
}),
ls(function(t) {
var e = t.graphic;
y(e) ? e[0] && e[0].elements ? t.graphic = [t.graphic[0]] : t.graphic = [{
elements: e
}] : e && !e.elements && (t.graphic = [{
elements: [e]
}])
});
var kp = bs({
type: "graphic",
defaultoption: {
elements: [],
parentid: null
},
_eloptionstoupdate: null,
mergeoption: function(t) {
var e = this.option.elements;
this.option.elements = null,
kp.superapply(this, "mergeoption", arguments),
this.option.elements = e
},
optionupdated: function(t, e) {
var i = this.option,
n = (e ? i: t).elements,
o = i.elements = e ? [] : i.elements,
a = [];
this._flatten(n, a);
var r = pi(o, a);
ni(r);
var s = this._eloptionstoupdate = [];
d(r,
function(t, e) {
var i = t.option;
i && (s.push(i), sv(t, i), lv(o, e, i), uv(o[e], i))
},
this);
for (var l = o.length - 1; l >= 0; l--) null == o[l] ? o.splice(l, 1) : delete o[l].$action
},
_flatten: function(t, e, i) {
d(t,
function(t) {
if (t) {
i && (t.parentoption = i),
e.push(t);
var n = t.children;
"group" === t.type && n && this._flatten(n, e, t),
delete t.children
}
},
this)
},
useeloptionstoupdate: function() {
var t = this._eloptionstoupdate;
return this._eloptionstoupdate = null,
t
}
});
vs({
type: "graphic",
init: function(t, e) {
this._elmap = r(),
this._lastgraphicmodel
},
render: function(t, e, i) {
t !== this._lastgraphicmodel && this._clear(),
this._lastgraphicmodel = t,
this._updateelements(t),
this._relocate(t, i)
},
_updateelements: function(t) {
var e = t.useeloptionstoupdate();
if (e) {
var i = this._elmap,
n = this.group;
d(e,
function(e) {
var o = e.$action,
a = e.id,
r = i.get(a),
s = e.parentid,
l = null != s ? i.get(s) : n,
u = e.style;
"text" === e.type && u && (e.hv && e.hv[1] && (u.textverticalalign = u.textbaseline = null), !u.hasownproperty("textfill") && u.fill && (u.textfill = u.fill), !u.hasownproperty("textstroke") && u.stroke && (u.textstroke = u.stroke));
var h = av(e);
o && "merge" !== o ? "replace" === o ? (ov(r, i), nv(a, l, h, i)) : "remove" === o && ov(r, i) : r ? r.attr(h) : nv(a, l, h, i);
var c = i.get(a);
c && (c.__ecgraphicwidth = e.width, c.__ecgraphicheight = e.height, hv(c, t))
})
}
},
_relocate: function(t, e) {
for (var i = t.option.elements,
n = this.group,
o = this._elmap,
a = i.length - 1; a >= 0; a--) {
var r = i[a],
s = o.get(r.id);
if (s) {
var l = s.parent;
ua(s, r, l === n ? {
width: e.getwidth(),
height: e.getheight()
}: {
width: l.__ecgraphicwidth || 0,
height: l.__ecgraphicheight || 0
},
null, {
hv: r.hv,
boundingmode: r.bounding
})
}
}
},
_clear: function() {
var t = this._elmap;
t.each(function(e) {
ov(e, t)
}),
this._elmap = r()
},
dispose: function() {
this._clear()
}
});
var pp = bs({
type: "legend.plain",
dependencies: ["series"],
layoutmode: {
type: "box",
ignoresize: !0
},
init: function(t, e, i) {
this.mergedefaultandtheme(t, i),
t.selected = t.selected || {}
},
mergeoption: function(t) {
pp.supercall(this, "mergeoption", t)
},
optionupdated: function() {
this._updatedata(this.ecmodel);
var t = this._data;
if (t[0] && "single" === this.get("selectedmode")) {
for (var e = !1,
i = 0; i < t.length; i++) {
var n = t[i].get("name");
if (this.isselected(n)) {
this.select(n),
e = !0;
break
}
} ! e && this.select(t[0].get("name"))
}
},
_updatedata: function(t) {
var e = [],
i = [];
t.eachrawseries(function(n) {
var o = n.name;
i.push(o);
var a;
if (n.legenddataprovider) {
var r = n.legenddataprovider(),
s = r.maparray(r.getname);
t.isseriesfiltered(n) || (i = i.concat(s)),
s.length ? e = e.concat(s) : a = !0
} else a = !0;
a && oi(n) && e.push(n.name)
}),
this._availablenames = i;
var n = f(this.get("data") || e,
function(t) {
return "string" != typeof t && "number" != typeof t || (t = {
name: t
}),
new lo(t, this, this.ecmodel)
},
this);
this._data = n
},
getdata: function() {
return this._data
},
select: function(t) {
var e = this.option.selected;
"single" === this.get("selectedmode") && d(this._data,
function(t) {
e[t.get("name")] = !1
}),
e[t] = !0
},
unselect: function(t) {
"single" !== this.get("selectedmode") && (this.option.selected[t] = !1)
},
toggleselected: function(t) {
var e = this.option.selected;
e.hasownproperty(t) || (e[t] = !0),
this[e[t] ? "unselect": "select"](t)
},
isselected: function(t) {
var e = this.option.selected;
return ! (e.hasownproperty(t) && !e[t]) && l(this._availablenames, t) >= 0
},
defaultoption: {
zlevel: 0,
z: 4,
show: !0,
orient: "horizontal",
left: "center",
top: 0,
align: "auto",
backgroundcolor: "rgba(0,0,0,0)",
bordercolor: "#ccc",
borderradius: 0,
borderwidth: 0,
padding: 5,
itemgap: 10,
itemwidth: 25,
itemheight: 14,
inactivecolor: "#ccc",
textstyle: {
color: "#333"
},
selectedmode: !0,
tooltip: {
show: !1
}
}
});
ps("legendtoggleselect", "legendselectchanged", v(cv, "toggleselected")),
ps("legendselect", "legendselected", v(cv, "select")),
ps("legendunselect", "legendunselected", v(cv, "unselect"));
var np = v,
op = d,
ep = zw,
rp = vs({
type: "legend.plain",
newlinedisabled: !1,
init: function() {
this.group.add(this._contentgroup = new ep),
this._backgroundel
},
getcontentgroup: function() {
return this._contentgroup
},
render: function(t, e, i) {
if (this.resetinner(), t.get("show", !0)) {
var n = t.get("align");
n && "auto" !== n || (n = "right" === t.get("left") && "vertical" === t.get("orient") ? "right": "left"),
this.renderinner(n, t, e, i);
var o = t.getboxlayoutparams(),
a = {
width: i.getwidth(),
height: i.getheight()
},
s = t.get("padding"),
l = la(o, a, s),
u = this.layoutinner(t, n, l),
h = la(r({
width: u.width,
height: u.height
},
o), a, s);
this.group.attr("position", [h.x - u.x, h.y - u.y]),
this.group.add(this._backgroundel = fv(u, t))
}
},
resetinner: function() {
this.getcontentgroup().removeall(),
this._backgroundel && this.group.remove(this._backgroundel)
},
renderinner: function(t, e, i, n) {
var o = this.getcontentgroup(),
a = r(),
r = e.get("selectedmode"),
s = [];
i.eachrawseries(function(t) { ! t.get("legendhoverlink") && s.push(t.id)
}),
op(e.getdata(),
function(l, u) {
var h = l.get("name");
if (this.newlinedisabled || "" !== h && "\n" !== h) {
var c = i.getseriesbyname(h)[0];
if (!a.get(h)) if (c) {
var d = c.getdata(),
f = d.getvisual("color");
"function" == typeof f && (f = f(c.getdataparams(0)));
var p = d.getvisual("legendsymbol") || "roundrect",
g = d.getvisual("symbol");
this._createitem(h, u, l, e, p, g, t, f, r).on("click", np(pv, h, n)).on("mouseover", np(gv, c.name, null, n, s)).on("mouseout", np(mv, c.name, null, n, s)),
a.set(h, !0)
} else i.eachrawseries(function(i) {
if (!a.get(h) && i.legenddataprovider) {
var o = i.legenddataprovider(),
c = o.indexofname(h);
if (c < 0) return;
var d = o.getitemvisual(c, "color");
this._createitem(h, u, l, e, "roundrect", null, t, d, r).on("click", np(pv, h, n)).on("mouseover", np(gv, null, h, n, s)).on("mouseout", np(mv, null, h, n, s)),
a.set(h, !0)
}
},
this)
} else o.add(new ep({
newline: !0
}))
},
this)
},
_createitem: function(t, e, i, n, o, r, s, l, u) {
var h = n.get("itemwidth"),
c = n.get("itemheight"),
d = n.get("inactivecolor"),
f = n.get("symbolkeepaspect"),
p = n.isselected(t),
g = new ep,
m = i.getmodel("textstyle"),
v = i.get("icon"),
y = i.getmodel("tooltip"),
x = y.parentmodel;
if (o = v || o, g.add(xl(o, 0, 0, h, c, p ? l: d, null == f || f)), !v && r && (r !== o || "none" === r)) {
var _ = .8 * c;
"none" === r && (r = "circle"),
g.add(xl(r, (h - _) / 2, (c - _) / 2, _, _, p ? l: d, null == f || f))
}
var w = "left" === s ? h + 5 : -5,
b = s,
s = n.get("formatter"),
m = t;
"string" == typeof s && s ? m = s.replace("{name}", null != t ? t: "") : "function" == typeof s && (m = s(t)),
g.add(new qs({
style: fo({},
m, {
text: m,
x: w,
y: c / 2,
textfill: p ? m.gettextcolor() : d,
textalign: b,
textverticalalign: "middle"
})
}));
var i = new am({
shape: g.getboundingrect(),
invisible: !0,
tooltip: y.get("show") ? a({
content: t,
formatter: x.get("formatter", !0) ||
function() {
return t
},
formatterparams: {
componenttype: "legend",
legendindex: n.componentindex,
name: t,
$vars: ["name"]
}
},
y.option) : null
});
return g.add(i),
g.eachchild(function(t) {
t.silent = !0
}),
i.silent = !u,
this.getcontentgroup().add(g),
uo(g),
g.__legenddataindex = e,
g
},
layoutinner: function(t, e, i) {
var n = this.getcontentgroup();
um(t.get("orient"), n, t.get("itemgap"), i.width, i.height);
var o = n.getboundingrect();
return n.attr("position", [ - o.x, -o.y]),
this.group.getboundingrect()
}
});
ks(function(t) {
var e = t.findcomponents({
maintype: "legend"
});
e && e.length && t.filterseries(function(t) {
for (var i = 0; i < e.length; i++) if (!e[i].isselected(t.name)) return ! 1;
return ! 0
})
}),
ym.registersubtypedefaulter("legend",
function() {
return "plain"
});
var zp = pp.extend({
type: "legend.scroll",
setscrolldataindex: function(t) {
this.option.scrolldataindex = t
},
defaultoption: {
scrolldataindex: 0,
pagebuttonitemgap: 5,
pagebuttongap: null,
pagebuttonposition: "end",
pageformatter: "{current}/{total}",
pageicons: {
horizontal: ["m0,0l12,-10l12,10z", "m0,0l-12,-10l-12,10z"],
vertical: ["m0,0l20,0l10,-20z", "m0,0l20,0l10,20z"]
},
pageiconcolor: "#2f4554",
pageiconinactivecolor: "#aaa",
pageiconsize: 15,
pagetextstyle: {
color: "#333"
},
animationdurationupdate: 800
},
init: function(t, e, i, n) {
var o = da(t);
zp.supercall(this, "init", t, e, i, n),
vv(this, t, o)
},
mergeoption: function(t, e) {
zp.supercall(this, "mergeoption", t, e),
vv(this, this.option, t)
},
getorient: function() {
return "vertical" === this.get("orient") ? {
index: 1,
name: "vertical"
}: {
index: 0,
name: "horizontal"
}
}
}),
bp = zw,
vp = ["width", "height"],
gp = ["x", "y"],
fp = rp.extend({
type: "legend.scroll",
newlinedisabled: !0,
init: function() {
fp.supercall(this, "init"),
this._currentindex = 0,
this.group.add(this._containergroup = new bp),
this._containergroup.add(this.getcontentgroup()),
this.group.add(this._controllergroup = new bp),
this._showcontroller
},
resetinner: function() {
fp.supercall(this, "resetinner"),
this._controllergroup.removeall(),
this._containergroup.removeclippath(),
this._containergroup.__rectsize = null
},
renderinner: function(t, e, i, n) {
function o(t, i) {
var o = t + "dataindex",
l = co(e.get("pageicons", !0)[e.getorient().name][i], {
onclick: m(a._pagego, a, o, e, n)
},
{
x: -s[0] / 2,
y: -s[1] / 2,
width: s[0],
height: s[1]
});
l.name = t,
r.add(l)
}
var a = this;
fp.supercall(this, "renderinner", t, e, i, n);
var r = this._controllergroup,
s = e.get("pageiconsize", !0);
y(s) || (s = [s, s]),
o("pageprev", 0);
var l = e.getmodel("pagetextstyle");
r.add(new qs({
name: "pagetext",
style: {
textfill: l.gettextcolor(),
font: l.getfont(),
textverticalalign: "middle",
textalign: "center"
},
silent: !0
})),
o("pagenext", 1)
},
layoutinner: function(t, e, i) {
var n = this.getcontentgroup(),
o = this._containergroup,
a = this._controllergroup,
r = t.getorient().index,
s = vp[r],
l = vp[1 - r],
u = gp[1 - r];
um(t.get("orient"), n, t.get("itemgap"), r ? i.width: null, r ? null: i.height),
um("horizontal", a, t.get("pagebuttonitemgap", !0));
var h = n.getboundingrect(),
c = a.getboundingrect(),
d = this._showcontroller = h[s] > i[s],
f = [ - h.x, -h.y];
f[r] = n.position[r];
var p = [0, 0],
g = [ - c.x, -c.y],
m = a(t.get("pagebuttongap", !0), t.get("itemgap", !0));
d && ("end" === t.get("pagebuttonposition", !0) ? g[r] += i[s] - c[s] : p[r] += c[s] + m),
g[1 - r] += h[l] / 2 - c[l] / 2,
n.attr("position", f),
o.attr("position", p),
a.attr("position", g);
var v = this.group.getboundingrect();
if ((v = {
x: 0,
y: 0
})[s] = d ? i[s] : h[s], v[l] = math.max(h[l], c[l]), v[u] = math.min(0, c[u] + g[1 - r]), o.__rectsize = i[s], d) {
var y = {
x: 0,
y: 0
};
y[s] = math.max(i[s] - c[s] - m, 0),
y[l] = v[l],
o.setclippath(new am({
shape: y
})),
o.__rectsize = y[s]
} else a.eachchild(function(t) {
t.attr({
invisible: !0,
silent: !0
})
});
var x = this._getpageinfo(t);
return null != x.pageindex && bo(n, {
position: x.contentposition
},
!!d && t),
this._updatepageinfoview(t, x),
v
},
_pagego: function(t, e, i) {
var n = this._getpageinfo(e)[t];
null != n && i.dispatchaction({
type: "legendscroll",
scrolldataindex: n,
legendid: e.id
})
},
_updatepageinfoview: function(t, e) {
var i = this._controllergroup;
d(["pageprev", "pagenext"],
function(n) {
var o = null != e[n + "dataindex"],
a = i.childofname(n);
a && (a.setstyle("fill", o ? t.get("pageiconcolor", !0) : t.get("pageiconinactivecolor", !0)), a.cursor = o ? "pointer": "default")
});
var n = i.childofname("pagetext"),
o = t.get("pageformatter"),
a = e.pageindex,
r = null != a ? a + 1 : 0,
s = e.pagecount;
n && o && n.setstyle("text", _(o) ? o.replace("{current}", r).replace("{total}", s) : o({
current: r,
total: s
}))
},
_getpageinfo: function(t) {
function e(t) {
var e = t.getboundingrect().clone();
return e[f] += t.position[h],
e
}
var i, n, o, a, r = t.get("scrolldataindex", !0),
s = this.getcontentgroup(),
l = s.getboundingrect(),
u = this._containergroup.__rectsize,
h = t.getorient().index,
c = vp[h],
d = vp[1 - h],
f = gp[h],
p = s.position.slice();
this._showcontroller ? s.eachchild(function(t) {
t.__legenddataindex === r && (a = t)
}) : a = s.childat(0);
var g = u ? math.ceil(l[c] / u) : 0;
if (a) {
var m = a.getboundingrect(),
v = a.position[h] + m[f];
p[h] = -v - l[f],
i = math.floor(g * (v + m[f] + u / 2) / l[c]),
i = l[c] && g ? math.max(0, math.min(g - 1, i)) : -1;
var y = {
x: 0,
y: 0
};
y[c] = u,
y[d] = l[d],
y[f] = -p[h] - l[f];
var x, _ = s.children();
if (s.eachchild(function(t, i) {
var n = e(t);
n.intersect(y) && (null == x && (x = i), o = t.__legenddataindex),
i === _.length - 1 && n[f] + n[c] <= y[f] + y[c] && (o = null)
}), null != x) {
var w = e(_[x]);
if (y[f] = w[f] + w[c] - y[c], x <= 0 && w[f] >= y[f]) n = null;
else {
for (; x > 0 && e(_[x - 1]).intersect(y);) x--;
n = _[x].__legenddataindex
}
}
}
return {
contentposition: p,
pageindex: i,
pagecount: g,
pageprevdataindex: n,
pagenextdataindex: o
}
}
});
ps("legendscroll", "legendscroll",
function(t, e) {
var i = t.scrolldataindex;
null != i && e.eachcomponent({
maintype: "legend",
subtype: "scroll",
query: t
},
function(t) {
t.setscrolldataindex(i)
})
}),
bs({
type: "tooltip",
dependencies: ["axispointer"],
defaultoption: {
zlevel: 0,
z: 60,
show: !0,
showcontent: !0,
trigger: "item",
triggeron: "mousemove|click",
alwaysshowcontent: !1,
displaymode: "single",
rendermode: "auto",
confine: !1,
showdelay: 0,
hidedelay: 100,
transitionduration: .4,
enterable: !1,
backgroundcolor: "rgba(50,50,50,0.7)",
bordercolor: "#333",
borderradius: 4,
borderwidth: 0,
padding: 5,
extracsstext: "",
axispointer: {
type: "line",
axis: "auto",
animation: "auto",
animationdurationupdate: 200,
animationeasingupdate: "exponentialout",
crossstyle: {
color: "#999",
width: 1,
type: "dashed",
textstyle: {}
}
},
textstyle: {
color: "#fff",
fontsize: 14
}
}
});
var wp = d,
hp = jo,
zp = ["", "-webkit-", "-moz-", "-o-"];
wv.prototype = {
constructor: wv,
_enterable: !0,
update: function() {
var t = this._container,
e = t.currentstyle || document.defaultview.getcomputedstyle(t),
i = t.style;
"absolute" !== i.position && "absolute" !== e.position && (i.position = "relative")
},
show: function(t) {
cleartimeout(this._hidetimeout);
var e = this.el;
e.style.csstext = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;" + _v(t) + ";left:" + this._x + "px;top:" + this._y + "px;" + (t.get("extracsstext") || ""),
e.style.display = e.innerhtml ? "block": "none",
e.style.pointerevents = this._enterable ? "auto": "none",
this._show = !0
},
setcontent: function(t) {
this.el.innerhtml = null == t ? "": t
},
setenterable: function(t) {
this._enterable = t
},
getsize: function() {
var t = this.el;
return [t.clientwidth, t.clientheight]
},
moveto: function(t, e) {
var i, n = this._zr;
n && n.painter && (i = n.painter.getviewportrootoffset()) && (t += i.offsetleft, e += i.offsettop);
var o = this.el.style;
o.left = t + "px",
o.top = e + "px",
this._x = t,
this._y = e
},
hide: function() {
this.el.style.display = "none",
this._show = !1
},
hidelater: function(t) { ! this._show || this._incontent && this._enterable || (t ? (this._hidedelay = t, this._show = !1, this._hidetimeout = settimeout(m(this.hide, this), t)) : this.hide())
},
isshow: function() {
return this._show
},
getoutersize: function() {
var t = this.el.clientwidth,
e = this.el.clientheight;
if (document.defaultview && document.defaultview.getcomputedstyle) {
var i = document.defaultview.getcomputedstyle(this.el);
i && (t += parseint(i.paddingleft, 10) + parseint(i.paddingright, 10) + parseint(i.borderleftwidth, 10) + parseint(i.borderrightwidth, 10), e += parseint(i.paddingtop, 10) + parseint(i.paddingbottom, 10) + parseint(i.bordertopwidth, 10) + parseint(i.borderbottomwidth, 10))
}
return {
width: t,
height: e
}
}
},
bv.prototype = {
constructor: bv,
_enterable: !0,
update: function() {},
show: function(t) {
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 = {},
o = t,
a = o.indexof("{marker"); a >= 0;) {
var r = o.indexof("|}"),
s = o.substr(a + "{marker".length, r - a - "{marker".length);
s.indexof("sub") > -1 ? n["marker" + s] = {
textwidth: 4,
textheight: 4,
textborderradius: 2,
textbackgroundcolor: e[s],
textoffset: [3, 0]
}: n["marker" + s] = {
textwidth: 10,
textheight: 10,
textborderradius: 5,
textbackgroundcolor: e[s]
},
a = (o = o.substr(r + 1)).indexof("{marker")
}
this.el = new qs({
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 l = this;
this.el.on("mouseover",
function() {
l._enterable && (cleartimeout(l._hidetimeout), l._show = !0),
l._incontent = !0
}),
this.el.on("mouseout",
function() {
l._enterable && l._show && l.hidelater(l._hidedelay),
l._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(m(this.hide, this), t)) : this.hide())
},
isshow: function() {
return this._show
},
getoutersize: function() {
return this.getsize()
}
};
var up = m,
xp = d,
jp = ro,
yp = new am({
shape: {
x: -1,
y: -1,
width: 2,
height: 2
}
});
vs({
type: "tooltip",
init: function(t, e) {
if (!z_.node) {
var i = t.getcomponent("tooltip").get("rendermode");
this._rendermode = hi(i);
var n;
"html" === this._rendermode ? (n = new wv(e.getdom(), e), this._newline = "
") : (n = new bv(e), this._newline = "\n"),
this._tooltipcontent = n
}
},
render: function(t, e, i) {
if (!z_.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.get("triggeron");
im("itemtooltip", this._api, up(function(e, i, n) {
"none" !== t && (t.indexof(e) >= 0 ? this._tryshow(i, n) : "leave" === e && 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 && !z_.node) {
var o = mv(n, i);
this._ticket = "";
var a = n.databycoordsys;
if (n.tooltip && null != n.x && null != n.y) {
var r = yp;
r.position = [n.x, n.y],
r.update(),
r.tooltip = n.tooltip,
this._tryshow({
offsetx: n.x,
offsety: n.y,
target: r
},
o)
} else if (a) this._tryshow({
offsetx: n.x,
offsety: n.y,
position: n.position,
event: {},
databycoordsys: n.databycoordsys,
tooltipoption: n.tooltipoption
},
o);
else if (null != n.seriesindex) {
if (this._manuallyaxisshowtip(t, e, i, n)) return;
var s = ep(n, e),
l = s.point[0],
u = s.point[1];
null != l && null != u && this._tryshow({
offsetx: l,
offsety: u,
position: n.position,
target: s.el,
event: {}
},
o)
} 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: {}
},
o))
}
},
manuallyhidetip: function(t, e, i, n) {
var o = this._tooltipcontent; ! this._alwaysshowcontent && this._tooltipmodel && o.hidelater(this._tooltipmodel.get("hidedelay")),
this._lastx = this._lasty = null,
n.from !== this.uid && this._hide(mv(n, i))
},
_manuallyaxisshowtip: function(t, e, i, n) {
var o = n.seriesindex,
a = n.dataindex,
r = e.getcomponent("axispointer").coordsysaxesinfo;
if (null != o && null != a && null != r) {
var s = e.getseriesbyindex(o);
if (s && "axis" === (t = sv([s.getdata().getitemmodel(a), s, (s.coordinatesystem || {}).model, t])).get("trigger")) return i.dispatchaction({
type: "updateaxispointer",
seriesindex: o,
dataindex: a,
position: n.position
}),
!0
}
},
_tryshow: function(t, e) {
var i = t.target;
if (this._tooltipmodel) {
this._lastx = t.offsetx,
this._lasty = t.offsety;
var n = t.databycoordsys;
n && n.length ? this._showaxistooltip(n, 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 = m(e, this),
cleartimeout(this._showtimout),
i > 0 ? this._showtimout = settimeout(e, i) : e()
},
_showaxistooltip: function(t, e) {
var i = this._ecmodel,
o = this._tooltipmodel,
a = [e.offsetx, e.offsety],
r = [],
s = [],
l = sv([e.tooltipoption, o]),
u = this._rendermode,
h = this._newline,
c = {};
xp(t,
function(t) {
xp(t.databyaxis,
function(t) {
var e = i.getcomponent(t.axisdim + "axis", t.axisindex),
o = t.value,
a = [];
if (e && null != o) {
var l = ym(o, e.axis, i, t.seriesdataindices, t.valuelabelopt);
d(t.seriesdataindices,
function(r) {
var h = i.getseriesbyindex(r.seriesindex),
d = r.dataindexinside,
f = h && h.getdataparams(d);
if (f.axisdim = t.axisdim, f.axisindex = t.axisindex, f.axistype = t.axistype, f.axisid = t.axisid, f.axisvalue = wl(e.axis, o), f.axisvaluelabel = l, f) {
s.push(f);
var p, g = h.formattooltip(d, !0, null, u);
if (w(g)) {
p = g.html;
var m = g.markers;
n(c, m)
} else p = g;
a.push(p)
}
});
var f = l;
"html" !== u ? r.push(a.join(h)) : r.push((f ? qo(f) + h: "") + a.join(h))
}
})
},
this),
r.reverse(),
r = r.join(this._newline + this._newline);
var f = e.position;
this._showormove(l,
function() {
this._updatecontentnotchangedonaxis(t) ? this._updateposition(l, f, a[0], a[1], this._tooltipcontent, s) : this._showtooltipcontent(l, r, s, math.random(), a[0], a[1], f, void 0, c)
})
},
_showseriesitemtooltip: function(t, e, i) {
var n = this._ecmodel,
o = e.seriesindex,
a = n.getseriesbyindex(o),
r = e.datamodel || a,
s = e.dataindex,
l = e.datatype,
u = r.getdata(),
h = sv([u.getitemmodel(s), r, a && (a.coordinatesystem || {}).model, this._tooltipmodel]),
c = h.get("trigger");
if (null == c || "item" === c) {
var d, f, p = r.getdataparams(s, l),
g = r.formattooltip(s, !1, l, this._rendermode);
w(g) ? (d = g.html, f = g.markers) : (d = g, f = null);
var m = "item_" + r.name + "_" + s;
this._showormove(h,
function() {
this._showtooltipcontent(h, d, p, m, t.offsetx, t.offsety, t.position, t.target, f)
}),
i({
type: "showtip",
dataindexinside: s,
dataindex: u.getrawindex(s),
seriesindex: o,
from: this.uid
})
}
},
_showcomponentitemtooltip: function(t, e, i) {
var n = e.tooltip;
if ("string" == typeof n) {
var o = n;
n = {
content: o,
formatter: o
}
}
var a = new lo(n, this._tooltipmodel, this._ecmodel),
r = a.get("content"),
s = math.random();
this._showormove(a,
function() {
this._showtooltipcontent(a, r, a.get("formatterparams") || {},
s, t.offsetx, t.offsety, t.position, e)
}),
i({
type: "showtip",
from: this.uid
})
},
_showtooltipcontent: function(t, e, i, n, o, a, r, s, l) {
if (this._ticket = "", t.get("showcontent") && t.get("show")) {
var u = this._tooltipcontent,
h = t.get("formatter");
r = r || t.get("position");
var c = e;
if (h && "string" == typeof h) c = ta(h, i, !0);
else if ("function" == typeof h) {
var d = up(function(e, n) {
e === this._ticket && (u.setcontent(n, l, t), this._updateposition(t, r, o, a, u, i, s))
},
this);
this._ticket = n,
c = h(i, n, d)
}
u.setcontent(c, l, t),
u.show(t),
this._updateposition(t, r, o, a, u, i, s)
}
},
_updateposition: function(t, e, i, n, o, a, r) {
var s = this._api.getwidth(),
l = this._api.getheight();
e = e || t.get("position");
var u = o.getsize(),
h = t.get("align"),
c = t.get("verticalalign"),
d = r && r.getboundingrect().clone();
if (r && d.applytransform(r.transform), "function" == typeof e && (e = e([i, n], a, o.el, d, {
viewsize: [s, l],
contentsize: u.slice()
})), y(e)) i = jp(e[0], s),
n = jp(e[1], l);
else if (w(e)) {
e.width = u[0],
e.height = u[1];
var f = la(e, {
width: s,
height: l
});
i = f.x,
n = f.y,
h = null,
c = null
} else "string" == typeof e && r ? (i = (p = av(e, d, u))[0], n = p[1]) : (i = (p = iv(i, n, o, s, l, h ? null: 20, c ? null: 20))[0], n = p[1]);
if (h && (i -= dv(h) ? u[0] / 2 : "right" === h ? u[0] : 0), c && (n -= dv(c) ? u[1] / 2 : "bottom" === c ? u[1] : 0), t.get("confine")) {
var p = tv(i, n, o, s, l);
i = p[0],
n = p[1]
}
o.moveto(i, n)
},
_updatecontentnotchangedonaxis: function(t) {
var e = this._lastdatabycoordsys,
i = !!e && e.length === t.length;
return i && xp(e,
function(e, n) {
var o = e.databyaxis || {},
a = (t[n] || {}).databyaxis || []; (i &= o.length === a.length) && xp(o,
function(t, e) {
var n = a[e] || {},
o = t.seriesdataindices || [],
r = n.seriesdataindices || []; (i &= t.value === n.value && t.axistype === n.axistype && t.axisid === n.axisid && o.length === r.length) && xp(o,
function(t, e) {
var n = r[e];
i &= t.seriesindex === n.seriesindex && t.dataindex === n.dataindex
})
})
}),
this._lastdatabycoordsys = t,
!!i
},
_hide: function(t) {
this._lastdatabycoordsys = null,
t({
type: "hidetip",
from: this.uid
})
},
dispose: function(t, e) {
z_.node || (this._tooltipcontent.hide(), lm("itemtooltip", e))
}
}),
ps({
type: "showtip",
event: "showtip",
update: "tooltip:manuallyshowtip"
},
function() {}),
ps({
type: "hidetip",
event: "hidetip",
update: "tooltip:manuallyhidetip"
},
function() {}),
pv.prototype = {
constructor: pv,
pointtodata: function(t, e) {
return this.polar.pointtodata(t, e)["radius" === this.dim ? 0 : 1]
},
datatoradius: ha.prototype.datatocoord,
radiustodata: ha.prototype.coordtodata
},
u(pv, ha);
var qp = bi();
nv.prototype = {
constructor: nv,
pointtodata: function(t, e) {
return this.polar.pointtodata(t, e)["radius" === this.dim ? 0 : 1]
},
datatoangle: ha.prototype.datatocoord,
angletodata: ha.prototype.coordtodata,
calculatecategoryinterval: function() {
var t = this,
e = t.getlabelmodel(),
i = t.scale,
n = i.getextent(),
o = i.count();
if (n[1] - n[0] < 1) return 0;
var a = n[0],
r = t.datatocoord(a + 1) - t.datatocoord(a),
s = math.abs(r),
l = de(a, e.getfont(), "center", "top"),
u = math.max(l.height, 7) / s;
isnan(u) && (u = 1 / 0);
var h = math.max(0, math.floor(u)),
c = qp(t.model),
d = c.lastautointerval,
f = c.lasttickcount;
return null != d && null != f && math.abs(d - h) <= 1 && math.abs(f - o) <= 1 && d > h ? h = d: (c.lasttickcount = o, c.lastautointerval = h),
h
}
},
u(nv, ha);
var kp = function(t) {
this.name = t || "",
this.cx = 0,
this.cy = 0,
this._radiusaxis = new pv,
this._angleaxis = new nv,
this._radiusaxis.polar = this._angleaxis.polar = this
};
kp.prototype = {
type: "polar",
axispointerenabled: !0,
constructor: kp,
dimensions: ["radius", "angle"],
model: null,
containpoint: function(t) {
var e = this.pointtocoord(t);
return this._radiusaxis.contain(e[0]) && this._angleaxis.contain(e[1])
},
containdata: function(t) {
return this._radiusaxis.containdata(t[0]) && this._angleaxis.containdata(t[1])
},
getaxis: function(t) {
return this["_" + t + "axis"]
},
getaxes: function() {
return [this._radiusaxis, this._angleaxis]
},
getaxesbyscale: function(t) {
var e = [],
i = this._angleaxis,
n = this._radiusaxis;
return i.scale.type === t && e.push(i),
n.scale.type === t && e.push(n),
e
},
getangleaxis: function() {
return this._angleaxis
},
getradiusaxis: function() {
return this._radiusaxis
},
getotheraxis: function(t) {
var e = this._angleaxis;
return t === e ? this._radiusaxis: e
},
getbaseaxis: function() {
return this.getaxesbyscale("ordinal")[0] || this.getaxesbyscale("time")[0] || this.getangleaxis()
},
gettooltipaxes: function(t) {
var e = null != t && "auto" !== t ? this.getaxis(t) : this.getbaseaxis();
return {
baseaxes: [e],
otheraxes: [this.getotheraxis(e)]
}
},
datatopoint: function(t, e) {
return this.coordtopoint([this._radiusaxis.datatoradius(t[0], e), this._angleaxis.datatoangle(t[1], e)])
},
pointtodata: function(t, e) {
var i = this.pointtocoord(t);
return [this._radiusaxis.radiustodata(i[0], e), this._angleaxis.angletodata(i[1], e)]
},
pointtocoord: function(t) {
var e = t[0] - this.cx,
i = t[1] - this.cy,
n = this.getangleaxis(),
o = n.getextent(),
a = math.min(o[0], o[1]),
r = math.max(o[0], o[1]);
n.inverse ? a = r - 360 : r = a + 360;
var s = math.sqrt(e * e + i * i);
e /= s,
i /= s;
for (var l = math.atan2( - i, e) / math.pi * 180, u = l < a ? 1 : -1; l < a || l > r;) l += 360 * u;
return [s, l]
},
coordtopoint: function(t) {
var e = t[0],
i = t[1] / 180 * math.pi;
return [math.cos(i) * e + this.cx, -math.sin(i) * e + this.cy]
}
};
var $p = ym.extend({
type: "polaraxis",
axis: null,
getcoordsysmodel: function() {
return this.ecmodel.querycomponents({
maintype: "polar",
index: this.option.polarindex,
id: this.option.polarid
})[0]
}
});
n($p.prototype, ca);
var jp = {
angle: {
startangle: 90,
clockwise: !0,
splitnumber: 12,
axislabel: {
rotate: !1
}
},
radius: {
splitnumber: 5
}
};
xd("angle", $p, ov, jp.angle),
xd("radius", $p, ov, jp.radius),
bs({
type: "polar",
dependencies: ["polaraxis", "angleaxis"],
coordinatesystem: null,
findaxismodel: function(t) {
var e;
return this.ecmodel.eachcomponent(t,
function(t) {
t.getcoordsysmodel() === this && (e = t)
},
this),
e
},
defaultoption: {
zlevel: 0,
z: 0,
center: ["50%", "50%"],
radius: "80%"
}
});
var qp = {
dimensions: kp.prototype.dimensions,
create: function(t, e) {
var i = [];
return t.eachcomponent("polar",
function(t, n) {
var o = new kp(n);
o.update = rv;
var a = o.getradiusaxis(),
r = o.getangleaxis(),
s = t.findaxismodel("radiusaxis"),
l = t.findaxismodel("angleaxis");
zv(a, s),
zv(r, l),
ev(o, t, e),
i.push(o),
t.coordinatesystem = o,
o.model = t
}),
t.eachseries(function(e) {
if ("polar" === e.get("coordinatesystem")) {
var i = t.querycomponents({
maintype: "polar",
index: e.get("polarindex"),
id: e.get("polarid")
})[0];
e.coordinatesystem = i.coordinatesystem
}
}),
i
}
};
ba.register("polar", qp);
var tn = ["axisline", "axislabel", "axistick", "splitline", "splitarea"];
ld.extend({
type: "angleaxis",
axispointerclass: "polaraxispointer",
render: function(t, e) {
if (this.group.removeall(), t.get("show")) {
var n = t.axis,
o = n.polar,
a = o.getradiusaxis().getextent(),
r = n.gettickscoords(),
s = f(n.getviewlabels(),
function(t) {
return (t = i(t)).coord = n.datatocoord(t.tickvalue),
t
});
gv(s),
gv(r),
d(tn,
function(e) { ! t.get(e + ".show") || n.scale.isblank() && "axisline" !== e || this["_" + e](t, o, r, a, s)
},
this)
}
},
_axisline: function(t, e, i, n) {
var o = t.getmodel("axisline.linestyle"),
a = new ks({
shape: {
cx: e.cx,
cy: e.cy,
r: n[vv(e)]
},
style: o.getlinestyle(),
z2: 1,
silent: !0
});
a.style.fill = null,
this.group.add(a)
},
_axistick: function(t, e, i, n) {
var o = t.getmodel("axistick"),
a = (o.get("inside") ? -1 : 1) * o.get("length"),
s = n[vv(e)],
l = f(i,
function(t) {
return new rm({
shape: bv(e, [s, s + a], t.coord)
})
});
this.group.add(xm(l, {
style: r(o.getmodel("linestyle").getlinestyle(), {
stroke: t.get("axisline.linestyle.color")
})
}))
},
_axislabel: function(t, e, i, n, o) {
var a = t.getcategories(!0),
r = t.getmodel("axislabel"),
s = r.get("margin");
d(o,
function(i, o) {
var l = r,
u = i.tickvalue,
h = n[vv(e)],
c = e.coordtopoint([h + s, i.coord]),
d = e.cx,
f = e.cy,
p = math.abs(c[0] - d) / h < .3 ? "center": c[0] > d ? "left": "right",
g = math.abs(c[1] - f) / h < .3 ? "middle": c[1] > f ? "top": "bottom";
a && a[u] && a[u].textstyle && (l = new lo(a[u].textstyle, r, r.ecmodel));
var m = new qs({
silent: !0
});
this.group.add(m),
fo(m.style, l, {
x: c[0],
y: c[1],
textfill: l.gettextcolor() || t.get("axisline.linestyle.color"),
text: i.formattedlabel,
textalign: p,
textverticalalign: g
})
},
this)
},
_splitline: function(t, e, i, n) {
var o = t.getmodel("splitline").getmodel("linestyle"),
a = o.get("color"),
s = 0;
a = a instanceof array ? a: [a];
for (var l = [], u = 0; u < i.length; u++) {
var h = s++%a.length;
l[h] = l[h] || [],
l[h].push(new rm({
shape: bv(e, n, i[u].coord)
}))
}
for (u = 0; u < l.length; u++) this.group.add(xm(l[u], {
style: r({
stroke: a[u % a.length]
},
o.getlinestyle()),
silent: !0,
z: t.get("z")
}))
},
_splitarea: function(t, e, i, n) {
if (i.length) {
var o = t.getmodel("splitarea").getmodel("areastyle"),
a = o.get("color"),
s = 0;
a = a instanceof array ? a: [a];
for (var l = [], u = math.pi / 180, h = -i[0].coord * u, c = math.min(n[0], n[1]), d = math.max(n[0], n[1]), f = t.get("clockwise"), p = 1; p < i.length; p++) {
var g = s++%a.length;
l[g] = l[g] || [],
l[g].push(new qs({
shape: {
cx: e.cx,
cy: e.cy,
r0: c,
r: d,
startangle: h,
endangle: -i[p].coord * u,
clockwise: f
},
silent: !0
})),
h = -i[p].coord * u
}
for (p = 0; p < l.length; p++) this.group.add(xm(l[p], {
style: r({
fill: a[p % a.length]
},
o.getareastyle()),
silent: !0
}))
}
}
});
var en = ["axisline", "axisticklabel", "axisname"],
in = ["splitline", "splitarea"];
ld.extend({
type: "radiusaxis",
axispointerclass: "polaraxispointer",
render: function(t, e) {
if (this.group.removeall(), t.get("show")) {
var i = t.axis,
n = i.polar,
o = n.getangleaxis(),
a = i.gettickscoords(),
r = o.getextent()[0],
s = i.getextent(),
l = fv(n, t, r),
u = new id(t, l);
d(en, u.add, u),
this.group.add(u.getgroup()),
d(in,
function(e) {
t.get(e + ".show") && !i.scale.isblank() && this["_" + e](t, n, r, s, a)
},
this)
}
},
_splitline: function(t, e, i, n, o) {
var a = t.getmodel("splitline").getmodel("linestyle"),
s = a.get("color"),
l = 0;
s = s instanceof array ? s: [s];
for (var u = [], h = 0; h < o.length; h++) {
var c = l++%s.length;
u[c] = u[c] || [],
u[c].push(new ks({
shape: {
cx: e.cx,
cy: e.cy,
r: o[h].coord
},
silent: !0
}))
}
for (h = 0; h < u.length; h++) this.group.add(xm(u[h], {
style: r({
stroke: s[h % s.length],
fill: null
},
a.getlinestyle()),
silent: !0
}))
},
_splitarea: function(t, e, i, n, o) {
if (o.length) {
var a = t.getmodel("splitarea").getmodel("areastyle"),
s = a.get("color"),
l = 0;
s = s instanceof array ? s: [s];
for (var u = [], h = o[0].coord, c = 1; c < o.length; c++) {
var d = l++%s.length;
u[d] = u[d] || [],
u[d].push(new qs({
shape: {
cx: e.cx,
cy: e.cy,
r0: h,
r: o[c].coord,
startangle: 0,
endangle: 2 * math.pi
},
silent: !0
})),
h = o[c].coord
}
for (c = 0; c < u.length; c++) this.group.add(xm(u[c], {
style: r({
fill: s[c % s.length]
},
a.getareastyle()),
silent: !0
}))
}
}
});
var nn = um.extend({
makeeloption: function(t, e, i, n, o) {
var a = i.axis;
"angle" === a.dim && (this.animationthreshold = math.pi / 18);
var r, s = a.polar,
l = s.getotheraxis(a).getextent();
r = a["datato" + aa(a.dim)](e);
var u = n.get("type");
if (u && "none" !== u) {
var h = gm(n),
c = on[u](a, s, r, l, h);
c.style = h,
t.graphickey = c.type,
t.pointer = c
}
mm(t, i, n, o, wv(e, i, 0, s, n.get("label.margin")))
}
}),
on = {
line: function(t, e, i, n, o) {
return "angle" === t.dim ? {
type: "line",
shape: wm(e.coordtopoint([n[0], i]), e.coordtopoint([n[1], i]))
}: {
type: "circle",
shape: {
cx: e.cx,
cy: e.cy,
r: i
}
}
},
shadow: function(t, e, i, n, o) {
var a = math.max(1, t.getbandwidth()),
r = math.pi / 180;
return "angle" === t.dim ? {
type: "sector",
shape: sm(e.cx, e.cy, n[0], n[1], ( - i - a / 2) * r, (a / 2 - i) * r)
}: {
type: "sector",
shape: sm(e.cx, e.cy, i - a / 2, i + a / 2, 0, 2 * math.pi)
}
}
};
ld.registeraxispointerclass("polaraxispointer", nn),
os(v(function(t, e, i) {
i.getwidth(),
i.getheight();
var n = {},
o = kv(g(e.getseriesbytype(t),
function(t) {
return ! e.isseriesfiltered(t) && t.coordinatesystem && "polar" === t.coordinatesystem.type
}));
e.eachseriesbytype(t,
function(t) {
if ("polar" === t.coordinatesystem.type) {
var e = t.getdata(),
i = t.coordinatesystem,
a = i.getbaseaxis(),
r = cv(t),
s = o[lv(a)][r],
l = s.offset,
u = s.width,
h = i.getotheraxis(a),
c = t.coordinatesystem.cx,
d = t.coordinatesystem.cy,
f = t.get("barminheight") || 0,
p = t.get("barminangle") || 0;
n[r] = n[r] || [];
for (var g = e.mapdimension(h.dim), m = e.mapdimension(a.dim), v = hl(e, g), y = h.getextent()[0], x = 0, _ = e.count(); x < _; x++) {
var w = e.get(g, x),
b = e.get(m, x);
if (!isnan(w)) {
var s = w >= 0 ? "p": "n",
m = y;
v && (n[r][b] || (n[r][b] = {
p: y,
n: y
}), m = n[r][b][s]);
var i, t, a, d;
if ("radius" === h.dim) {
var c = h.datatoradius(w) - y,
l = a.datatoangle(b);
math.abs(c) < f && (c = (c < 0 ? -1 : 1) * f),
i = m,
t = m + c,
d = (a = l - l) - u,
v && (n[r][b][s] = t)
} else {
var k = h.datatoangle(w, !0) - y,
p = a.datatoradius(b);
math.abs(k) < p && (k = (k < 0 ? -1 : 1) * p),
t = (i = p + l) + u,
a = m,
d = m + k,
v && (n[r][b][s] = d)
}
e.setitemlayout(x, {
cx: c,
cy: d,
r0: i,
r: t,
startangle: -a * math.pi / 180,
endangle: -d * math.pi / 180
})
}
}
}
},
this)
},
"bar")),
vs({
type: "polar"
}),
h(ym.extend({
type: "geo",
coordinatesystem: null,
layoutmode: "box",
init: function(t) {
ym.prototype.init.apply(this, arguments),
ci(t, "label", ["show"])
},
optionupdated: function() {
var t = this.option,
e = this;
t.regions = _c.getfilledregions(t.regions, t.map, t.namemap),
this._optionmodelmap = p(t.regions || [],
function(t, i) {
return i.name && t.set(i.name, new lo(i, e)),
t
},
r()),
this.updateselectedmap(t.regions)
},
defaultoption: {
zlevel: 0,
z: 0,
show: !0,
left: "center",
top: "center",
aspectscale: null,
silent: !1,
map: "",
boundingcoords: null,
center: null,
zoom: 1,
scalelimit: null,
label: {
show: !1,
color: "#000"
},
itemstyle: {
borderwidth: .5,
bordercolor: "#444",
color: "#eee"
},
emphasis: {
label: {
show: !0,
color: "rgb(100,0,0)"
},
itemstyle: {
color: "rgba(255,215,0,0.8)"
}
},
regions: []
},
getregionmodel: function(t) {
return this._optionmodelmap.get(t) || new lo(null, this, this.ecmodel)
},
getformattedlabel: function(t, e) {
var i = this.getregionmodel(t).get("label." + e + ".formatter"),
n = {
name: t
};
return "function" == typeof i ? (n.status = e, i(n)) : "string" == typeof i ? i.replace("{a}", null != t ? t: "") : void 0
},
setzoom: function(t) {
this.option.zoom = t
},
setcenter: function(t) {
this.option.center = t
}
}), hd),
vs({
type: "geo",
init: function(t, e) {
var i = new _c(e, !0);
this._mapdraw = i,
this.group.add(i.group)
},
render: function(t, e, i, n) {
if (!n || "geotoggleselect" !== n.type || n.from !== this.uid) {
var o = this._mapdraw;
t.get("show") ? o.draw(t, e, i, this, n) : this._mapdraw.group.removeall(),
this.group.silent = t.get("silent")
}
},
dispose: function() {
this._mapdraw && this._mapdraw.remove()
}
}),
hv("toggleselected", {
type: "geotoggleselect",
event: "geoselectchanged"
}),
hv("select", {
type: "geoselect",
event: "geoselected"
}),
hv("unselect", {
type: "geounselect",
event: "geounselected"
});
var an = ["rect", "polygon", "keep", "clear"],
rn = d,
sn = {
linex: kv(0),
liney: kv(1),
rect: {
point: function(t, e, i) {
return t && i.boundingrect.contain(t[0], t[1])
},
rect: function(t, e, i) {
return t && i.boundingrect.intersect(t)
}
},
polygon: {
point: function(t, e, i) {
return t && i.boundingrect.contain(t[0], t[1]) && yl(i.range, t[0], t[1])
},
rect: function(t, e, i) {
var n = i.range;
if (!t || n.length <= 1) return ! 1;
var o = t.x,
a = t.y,
r = t.width,
s = t.height,
l = n[0];
return !! (yl(n, o, a) || yl(n, o + r, a) || yl(n, o, a + s) || yl(n, o + r, a + s) || ue.create(t).contain(l[0], l[1]) || jv(o, a, o + r, a, n) || jv(o, a, o, a + s, n) || jv(o + r, a, o + r, a + s, n) || jv(o, a + s, o + r, a + s, n)) || void 0
}
}
},
ln = d,
un = l,
hn = v,
cn = ["datatopoint", "pointtodata"],
dn = ["grid", "xaxis", "yaxis", "geo", "graph", "polar", "radiusaxis", "angleaxis", "bmap"],
fn = iy.prototype;
fn.setoutputranges = function(t, e) {
this.matchoutputranges(t, e,
function(t, e, i) {
if ((t.coordranges || (t.coordranges = [])).push(e), !t.coordrange) {
t.coordrange = e;
var n = vn[t.brushtype](0, i, e);
t.__rangeoffset = {
offset: yn[t.brushtype](n.values, t.range, [1, 1]),
xyminmax: n.xyminmax
}
}
})
},
fn.matchoutputranges = function(t, e, i) {
ln(t,
function(t) {
var n = this.findtargetinfo(t, e);
n && !0 !== n && d(n.coordsyses,
function(n) {
var o = vn[t.brushtype](1, n, t.range);
i(t, o.values, n, e)
})
},
this)
},
fn.setinputranges = function(t, e) {
ln(t,
function(t) {
var i = this.findtargetinfo(t, e);
if (t.range = t.range || [], i && !0 !== i) {
t.panelid = i.panelid;
var n = vn[t.brushtype](0, i.coordsys, t.coordrange),
o = t.__rangeoffset;
t.range = o ? yn[t.brushtype](n.values, o.offset, sy(n.xyminmax, o.xyminmax)) : n.values
}
},
this)
},
fn.makepanelopts = function(t, e) {
return f(this._targetinfolist,
function(i) {
var n = i.getpanelrect();
return {
panelid: i.panelid,
defaultbrushtype: e && e(i),
clippath: hp(n),
istargetbycursor: dp(n, t, i.coordsysmodel),
getlinearbrushotherextent: cp(n)
}
})
},
fn.controlseries = function(t, e, i) {
var n = this.findtargetinfo(t, i);
return ! 0 === n || n && un(n.coordsyses, e.coordinatesystem) >= 0
},
fn.findtargetinfo = function(t, e) {
for (var i = this._targetinfolist,
n = oy(e, t), o = 0; o < i.length; o++) {
var a = i[o],
r = t.panelid;
if (r) {
if (a.panelid === r) return a
} else for (o = 0; o < gn.length; o++) if (gn[o](n, a)) return a
}
return ! 0
};
var pn = {
grid: function(t, e) {
var i = t.xaxismodels,
n = t.yaxismodels,
o = t.gridmodels,
a = r(),
r = {},
s = {}; (i || n || o) && (ln(i,
function(t) {
var e = t.axis.grid.model;
a.set(e.id, e),
r[e.id] = !0
}), ln(n,
function(t) {
var e = t.axis.grid.model;
a.set(e.id, e),
s[e.id] = !0
}), ln(o,
function(t) {
a.set(t.id, t),
r[t.id] = !0,
s[t.id] = !0
}), a.each(function(t) {
var o = t.coordinatesystem,
a = [];
ln(o.getcartesians(),
function(t, e) { (un(i, t.getaxis("x").model) >= 0 || un(n, t.getaxis("y").model) >= 0) && a.push(t)
}),
e.push({
panelid: "grid--" + t.id,
gridmodel: t,
coordsysmodel: t,
coordsys: a[0],
coordsyses: a,
getpanelrect: mn.grid,
xaxisdeclared: r[t.id],
yaxisdeclared: s[t.id]
})
}))
},
geo: function(t, e) {
ln(t.geomodels,
function(t) {
var i = t.coordinatesystem;
e.push({
panelid: "geo--" + t.id,
geomodel: t,
coordsysmodel: t,
coordsys: i,
coordsyses: [i],
getpanelrect: mn.geo
})
})
}
},
gn = [function(t, e) {
var i = t.xaxismodel,
n = t.yaxismodel,
o = t.gridmodel;
return ! o && i && (o = i.axis.grid.model),
!o && n && (o = n.axis.grid.model),
o && o === e.gridmodel
},
function(t, e) {
var i = t.geomodel;
return i && i === e.geomodel
}],
mn = {
grid: function() {
return this.coordsys.grid.getrect().clone()
},
geo: function() {
var t = this.coordsys,
e = t.getboundingrect().clone();
return e.applytransform(mo(t)),
e
}
},
vn = {
linex: hn(ay, 0),
liney: hn(ay, 1),
rect: function(t, e, i) {
var n = e[cn[t]]([i[0][0], i[1][0]]),
o = e[cn[t]]([i[0][1], i[1][1]]),
a = [ny([n[0], o[0]]), ny([n[1], o[1]])];
return {
values: a,
xyminmax: a
}
},
polygon: function(t, e, i) {
var n = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
return {
values: f(i,
function(i) {
var o = e[cn[t]](i);
return n[0][0] = math.min(n[0][0], o[0]),
n[1][0] = math.min(n[1][0], o[1]),
n[0][1] = math.max(n[0][1], o[0]),
n[1][1] = math.max(n[1][1], o[1]),
o
}),
xyminmax: n
}
}
},
yn = {
linex: hn(ry, 0),
liney: hn(ry, 1),
rect: function(t, e, i) {
return [[t[0][0] - i[0] * e[0][0], t[0][1] - i[0] * e[0][1]], [t[1][0] - i[1] * e[1][0], t[1][1] - i[1] * e[1][1]]]
},
polygon: function(t, e, i) {
return f(t,
function(t, n) {
return [t[0] - i[0] * e[n][0], t[1] - i[1] * e[n][1]]
})
}
},
xn = ["inbrush", "outofbrush"],
_n = "__ecbrushselect",
wn = "__ecinbrushselectevent",
bn = it.visual.brush;
os(bn,
function(t, e, i) {
t.eachcomponent({
maintype: "brush"
},
function(e) {
i && "takeglobalcursor" === i.type && e.setbrushoption("brush" === i.key ? i.brushoption: {
brushtype: !1
}),
(e.brushtargetmanager = new iy(e.option, t)).setinputranges(e.areas, t)
})
}),
es(bn,
function(t, e, n) {
var o, a, s = [];
t.eachcomponent({
maintype: "brush"
},
function(e, n) {
function l(t) {
return "all" === m || v[t]
}
function u(t) {
return !! t.length
}
function h(t, e) {
var i = t.coordinatesystem;
w |= i.hasaxisbrushed(),
l(e) && i.eachactivestate(t.getdata(),
function(t, e) {
"active" === t && (x[e] = 1)
})
}
function c(i, n, o) {
var a = dy(i);
if (a && !fy(e, n) && (d(b,
function(n) {
a[n.brushtype] && e.brushtargetmanager.controlseries(n, i, t) && o.push(n),
w |= u(o)
}), l(n) && u(o))) {
var r = i.getdata();
r.each(function(t) {
cy(a, o, r, t) && (x[t] = 1)
})
}
}
var p = {
brushid: e.id,
brushindex: n,
brushname: e.name,
areas: i(e.areas),
selected: []
};
s.push(p);
var g = e.option,
m = g.brushlink,
v = [],
x = [],
_ = [],
w = 0;
n || (o = g.throttletype, a = g.throttledelay);
var b = f(e.areas,
function(t) {
return py(r({
boundingrect: sn[t.brushtype](t)
},
t))
}),
s = xv(e.option, xn,
function(t) {
t.mappingmethod = "fixed"
});
y(m) && d(m,
function(t) {
v[t] = 1
}),
t.eachseries(function(t, e) {
var i = _[e] = [];
"parallel" === t.subtype ? h(t, e) : c(t, e, i)
}),
t.eachseries(function(t, e) {
var i = {
seriesid: t.id,
seriesindex: e,
seriesname: t.name,
dataindex: []
};
p.selected.push(i);
var n = dy(t),
o = _[e],
a = t.getdata(),
r = l(e) ?
function(t) {
return x[t] ? (i.dataindex.push(a.getrawindex(t)), "inbrush") : "outofbrush"
}: function(t) {
return cy(n, o, a, t) ? (i.dataindex.push(a.getrawindex(t)), "inbrush") : "outofbrush"
}; (l(e) ? w: u(o)) && yv(xn, s, a, r)
})
}),
uy(e, o, a, s, n)
});
var sn = {
linex: b,
liney: b,
rect: function(t) {
return gy(t.range)
},
polygon: function(t) {
for (var e, i = t.range,
n = 0,
o = i.length; n < o; n++) {
e = e || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]];
var a = i[n];
a[0] < e[0][0] && (e[0][0] = a[0]),
a[0] > e[0][1] && (e[0][1] = a[0]),
a[1] < e[1][0] && (e[1][0] = a[1]),
a[1] > e[1][1] && (e[1][1] = a[1])
}
return e && gy(e)
}
},
mn = ["#ddd"];
bs({
type: "brush",
dependencies: ["geo", "grid", "xaxis", "yaxis", "parallel", "series"],
defaultoption: {
toolbox: null,
brushlink: null,
seriesindex: "all",
geoindex: null,
xaxisindex: null,
yaxisindex: null,
brushtype: "rect",
brushmode: "single",
transformable: !0,
brushstyle: {
borderwidth: 1,
color: "rgba(120,140,180,0.3)",
bordercolor: "rgba(120,140,180,0.8)"
},
throttletype: "fixrate",
throttledelay: 0,
removeonclick: !0,
z: 1e4
},
areas: [],
brushtype: null,
brushoption: {},
coordinfolist: [],
optionupdated: function(t, e) {
var i = this.option; ! e && jv(i, t, ["inbrush", "outofbrush"]);
var n = i.inbrush = i.inbrush || {};
i.outofbrush = i.outofbrush || {
color: mn
},
n.hasownproperty("liftz") || (n.liftz = 5)
},
setareas: function(t) {
t && (this.areas = f(t,
function(t) {
return my(this.option, t)
},
this))
},
setbrushoption: function(t) {
this.brushoption = my(this.option, t),
this.brushtype = this.brushoption.brushtype
}
});
vs({
type: "brush",
init: function(t, e) {
this.ecmodel = t,
this.api = e,
this.model,
(this._brushcontroller = new cf(e.getzr())).on("brush", m(this._onbrush, this)).mount()
},
render: function(t) {
return this.model = t,
vy.apply(this, arguments)
},
updatetransform: vy,
updateview: vy,
dispose: function() {
this._brushcontroller.dispose()
},
_onbrush: function(t, e) {
var n = this.model.id;
this.model.brushtargetmanager.setoutputranges(t, this.ecmodel),
(!e.isend || e.removeonclick) && this.api.dispatchaction({
type: "brush",
brushid: n,
areas: i(t),
$from: n
})
}
}),
ps({
type: "brush",
event: "brush"
},
function(t, e) {
e.eachcomponent({
maintype: "brush",
query: t
},
function(e) {
e.setareas(t.areas)
})
}),
ps({
type: "brushselect",
event: "brushselected",
update: "none"
},
function() {});
var in = {},
tn = xi.toolbox.brush;
_y.defaultoption = {
show: !0,
type: ["rect", "polygon", "linex", "liney", "keep", "clear"],
icon: {
rect: "m7.3,34.7 m0.4,10v-0.2h9.8 m89.6,10v-0.2h-9.8 m0.4,60v10.2h9.8 m89.6,60v10.2h-9.8 m12.3,22.4v10.5h13.1 m33.6,10.5h7.8 m49.1,10.5h7.8 m77.5,22.4v10.5h-13 m12.3,31.1v8.2 m77.7,31.1v8.2 m12.3,47.6v11.9h13.1 m33.6,59.5h7.6 m49.1,59.5 h7.7 m77.5,47.6v11.9h-13",
polygon: "m55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1s53.5,34.9,55.2,34.9z m50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 c47.3,52.4,48.7,51,50.4,51z m55.6,37.1l1.5-7.8 m60.1,13.5l1.6-8.7l-7.8,4 m59,19l-1,5.3 m24,16.1l6.4,4.9l6.4-3.3 m48.5,11.6 l-5.9,3.1 m19.1,12.8l9.7,5.1l1.1,7.7 m13.4,29.8l1,7.3l6.6,1.6 m11.6,18.4l1,6.1 m32.8,41.9 m26.6,40.4 m27.3,40.2l6.1,1.6 m49.9,52.1l-5.6-7.6l-4.9-1.2",
linex: "m15.2,30 m19.7,15.6v1.9h29 m34.8,1.9h40.4 m55.3,15.6v1.9h45.9 m19.7,44.4v58.1h29 m34.8,58.1h40.4 m55.3,44.4 v58.1h45.9 m12.5,20.3l-9.4,9.6l9.6,9.8 m3.1,29.9h16.5 m62.5,20.3l9.4,9.6l62.3,39.7 m71.9,29.9h55.4",
liney: "m38.8,7.7 m52.7,12h13.2v9 m65.9,26.6v32 m52.7,46.3h13.2v-9 m24.9,12h11.8v9 m11.8,26.6v32 m24.9,46.3h11.8v-9 m48.2,5.1l-9.3-9l-9.4,9.2 m38.9-3.9v12 m48.2,53.3l-9.3,9l-9.4-9.2 m38.9,62.3v46.4",
keep: "m4,10.5v1h10.3 m20.7,1h6.1 m33,1h6.1 m55.4,10.5v1h45.2 m4,17.3v6.6 m55.6,17.3v6.6 m4,30.5v40h10.3 m20.7,40 h6.1 m33,40h6.1 m55.4,30.5v40h45.2 m21,18.9h62.9v48.6h21v18.9z",
clear: "m22,14.7l30.9,31 m52.9,14.7l22,45.7 m4.7,16.8v4.2h13.1 m26,4.2h7.8 m41.6,4.2h7.8 m70.3,16.8v4.2h57.2 m4.7,25.9v8.6 m70.3,25.9v8.6 m4.7,43.2v12.6h13.1 m26,55.8h7.8 m41.6,55.8h7.8 m70.3,43.2v12.6h57.2"
},
title: i(tn.title)
};
var an = _y.prototype;
an.render = an.updateview = function(t, e, i) {
var n, o, a;
e.eachcomponent({
maintype: "brush"
},
function(t) {
n = t.brushtype,
o = t.brushoption.brushmode || "single",
a |= t.areas.length
}),
this._brushtype = n,
this._brushmode = o,
d(t.get("type", !0),
function(e) {
t.seticonstatus(e, ("keep" === e ? "multiple" === o: "clear" === e ? a: e === n) ? "emphasis": "normal")
})
},
an.geticons = function() {
var t = this.model,
e = t.get("icon", !0),
i = {};
return d(t.get("type", !0),
function(t) {
e[t] && (i[t] = e[t])
}),
i
},
an.onclick = function(t, e, i) {
var n = this._brushtype,
o = this._brushmode;
"clear" === i ? (e.dispatchaction({
type: "axisareaselect",
intervals: []
}), e.dispatchaction({
type: "brush",
command: "clear",
areas: []
})) : e.dispatchaction({
type: "takeglobalcursor",
key: "brush",
brushoption: {
brushtype: "keep" === i ? n: n !== i && i,
brushmode: "keep" === i ? "multiple" === o ? "single": "multiple": o
}
})
},
yy("brush", _y),
ls(function(t, e) {
var i = t && t.brush;
if (y(i) || (i = i ? [i] : []), i.length) {
var n = [];
d(i,
function(t) {
var e = t.hasownproperty("toolbox") ? t.toolbox: [];
e instanceof array && (n = n.concat(e))
});
var o = t && t.toolbox;
y(o) && (o = o[0]),
o || (o = {
feature: {}
},
t.toolbox = [o]);
var a = o.feature || (o.feature = {}),
r = a.brush || (a.brush = {}),
s = r.type || (r.type = []);
s.push.apply(s, n),
zv(s),
e && !s.length && s.push.apply(s, an)
}
});
wy.prototype = {
constructor: wy,
type: "calendar",
dimensions: ["time", "value"],
getdimensionsinfo: function() {
return [{
name: "time",
type: "time"
},
"value"]
},
getrangeinfo: function() {
return this._rangeinfo
},
getmodel: function() {
return this._model
},
getrect: function() {
return this._rect
},
getcellwidth: function() {
return this._sw
},
getcellheight: function() {
return this._sh
},
getorient: function() {
return this._orient
},
getfirstdayofweek: function() {
return this._firstdayofweek
},
getdateinfo: function(t) {
var e = (t = uo(t)).getfullyear(),
i = t.getmonth() + 1;
i = i < 10 ? "0" + i: i;
var n = t.getdate();
n = n < 10 ? "0" + n: n;
var o = t.getday();
return o = math.abs((o + 7 - this.getfirstdayofweek()) % 7),
{
y: e,
m: i,
d: n,
day: o,
time: t.gettime(),
formateddate: e + "-" + i + "-" + n,
date: t
}
},
getnextnday: function(t, e) {
return 0 === (e = e || 0) ? this.getdateinfo(t) : ((t = new date(this.getdateinfo(t).time)).setdate(t.getdate() + e), this.getdateinfo(t))
},
update: function(t, e) {
function i(t, e) {
return null != t[e] && "auto" !== t[e]
}
this._firstdayofweek = +this._model.getmodel("daylabel").get("firstday"),
this._orient = this._model.get("orient"),
this._linewidth = this._model.getmodel("itemstyle").getitemstyle().linewidth || 0,
this._rangeinfo = this._getrangeinfo(this._initrangeoption());
var n = this._rangeinfo.weeks || 1,
o = ["width", "height"],
a = this._model.get("cellsize").slice(),
r = this._model.getboxlayoutparams(),
s = "horizontal" === this._orient ? [n, 7] : [7, n];
d([0, 1],
function(t) {
i(a, t) && (r[o[t]] = a[t] * s[t])
});
var l = {
width: e.getwidth(),
height: e.getheight()
},
u = this._rect = la(r, l);
d([0, 1],
function(t) {
i(a, t) || (a[t] = u[o[t]] / s[t])
}),
this._sw = a[0],
this._sh = a[1]
},
datatopoint: function(t, e) {
y(t) && (t = t[0]),
null == e && (e = !0);
var i = this.getdateinfo(t),
n = this._rangeinfo,
o = i.formateddate;
if (e && !(i.time >= n.start.time && i.time < n.end.time + 864e5)) return [nan, nan];
var a = i.day,
r = this._getrangeinfo([n.start.time, o]).nthweek;
return "vertical" === this._orient ? [this._rect.x + a * this._sw + this._sw / 2, this._rect.y + r * this._sh + this._sh / 2] : [this._rect.x + r * this._sw + this._sw / 2, this._rect.y + a * this._sh + this._sh / 2]
},
pointtodata: function(t) {
var e = this.pointtodate(t);
return e && e.time
},
datatorect: function(t, e) {
var i = this.datatopoint(t, e);
return {
contentshape: {
x: i[0] - (this._sw - this._linewidth) / 2,
y: i[1] - (this._sh - this._linewidth) / 2,
width: this._sw - this._linewidth,
height: this._sh - this._linewidth
},
center: i,
tl: [i[0] - this._sw / 2, i[1] - this._sh / 2],
tr: [i[0] + this._sw / 2, i[1] - this._sh / 2],
br: [i[0] + this._sw / 2, i[1] + this._sh / 2],
bl: [i[0] - this._sw / 2, i[1] + this._sh / 2]
}
},
pointtodate: function(t) {
var e = math.floor((t[0] - this._rect.x) / this._sw) + 1,
i = math.floor((t[1] - this._rect.y) / this._sh) + 1,
n = this._rangeinfo.range;
return "vertical" === this._orient ? this._getdatebyweeksandday(i, e - 1, n) : this._getdatebyweeksandday(e, i - 1, n)
},
converttopixel: v(by, "datatopoint"),
convertfrompixel: v(by, "pointtodata"),
_initrangeoption: function() {
var t = this._model.get("range"),
e = t;
if (y(e) && 1 === e.length && (e = e[0]), /^\d{4}$/.test(e) && (t = [e + "-01-01", e + "-12-31"]), /^\d{4}[\/|-]\d{1,2}$/.test(e)) {
var i = this.getdateinfo(e),
n = i.date;
n.setmonth(n.getmonth() + 1);
var o = this.getnextnday(n, -1);
t = [i.formateddate, o.formateddate]
}
/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e) && (t = [e, e]);
var a = this._getrangeinfo(t);
return a.start.time > a.end.time && t.reverse(),
t
},
_getrangeinfo: function(t) {
var e; (t = [this.getdateinfo(t[0]), this.getdateinfo(t[1])])[0].time > t[1].time && (e = !0, t.reverse());
var i = math.floor(t[1].time / 864e5) - math.floor(t[0].time / 864e5) + 1,
n = new date(t[0].time),
o = n.getdate(),
a = t[1].date.getdate();
if (n.setdate(o + i - 1), n.getdate() !== a) for (var r = n.gettime() - t[1].time > 0 ? 1 : -1; n.getdate() !== a && (n.gettime() - t[1].time) * r > 0;) i -= r,
n.setdate(o + i - 1);
var s = math.floor((i + t[0].day + 6) / 7),
l = e ? 1 - s: s - 1;
return e && t.reverse(),
{
range: [t[0].formateddate, t[1].formateddate],
start: t[0],
end: t[1],
allday: i,
weeks: s,
nthweek: l,
fweek: t[0].day,
lweek: t[1].day
}
},
_getdatebyweeksandday: function(t, e, i) {
var n = this._getrangeinfo(i);
if (t > n.weeks || 0 === t && e < n.fweek || t === n.weeks && e > n.lweek) return ! 1;
var o = 7 * (t - 1) - n.fweek + e,
a = new date(n.start.time);
return a.setdate(n.start.d + o),
this.getdateinfo(a)
}
},
wy.dimensions = wy.prototype.dimensions,
wy.getdimensionsinfo = wy.prototype.getdimensionsinfo,
wy.create = function(t, e) {
var i = [];
return t.eachcomponent("calendar",
function(n) {
var o = new wy(n, t, e);
i.push(o),
n.coordinatesystem = o
}),
t.eachseries(function(t) {
"calendar" === t.get("coordinatesystem") && (t.coordinatesystem = i[t.get("calendarindex") || 0])
}),
i
},
ba.register("calendar", wy);
var dn = ym.extend({
type: "calendar",
coordinatesystem: null,
defaultoption: {
zlevel: 0,
z: 2,
left: 80,
top: 60,
cellsize: 20,
orient: "horizontal",
splitline: {
show: !0,
linestyle: {
color: "#000",
width: 1,
type: "solid"
}
},
itemstyle: {
color: "#fff",
borderwidth: 1,
bordercolor: "#ccc"
},
daylabel: {
show: !0,
firstday: 0,
position: "start",
margin: "50%",
namemap: "en",
color: "#000"
},
monthlabel: {
show: !0,
position: "start",
margin: 5,
align: "center",
namemap: "en",
formatter: null,
color: "#000"
},
yearlabel: {
show: !0,
position: null,
margin: 30,
formatter: null,
color: "#ccc",
fontfamily: "sans-serif",
fontweight: "bolder",
fontsize: 20
}
},
init: function(t, e, i, n) {
var o = da(t);
dn.superapply(this, "init", arguments),
sy(t, o)
},
mergeoption: function(t, e) {
dn.superapply(this, "mergeoption", arguments),
sy(this.option, t)
}
}),
cn = {
en: ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"],
cn: ["一月", "亜月", "三月", "四月", "五月", "å…月", "七月", "八月", "ä¹æœˆ", "å月", "å一月", "å亜月"]
},
ln = {
en: ["s", "m", "t", "w", "t", "f", "s"],
cn: ["æ—¥", "一", "亜", "三", "å››", "五", "å…"]
};
vs({
type: "calendar",
_tlpoints: null,
_blpoints: null,
_firstdayofmonth: null,
_firstdaypoints: null,
render: function(t, e, i) {
var n = this.group;
n.removeall();
var o = t.coordinatesystem,
a = o.getrangeinfo(),
r = o.getorient();
this._renderdayrect(t, a, n),
this._renderlines(t, a, r, n),
this._renderyeartext(t, a, r, n),
this._rendermonthtext(t, r, n),
this._renderweektext(t, a, r, n)
},
_renderdayrect: function(t, e, i) {
for (var n = t.coordinatesystem,
o = t.getmodel("itemstyle").getitemstyle(), a = n.getcellwidth(), r = n.getcellheight(), s = e.start.time; s <= e.end.time; s = n.getnextnday(s, 1).time) {
var l = n.datatorect([s], !1).tl,
u = new am({
shape: {
x: l[0],
y: l[1],
width: a,
height: r
},
cursor: "default",
style: o
});
i.add(u)
}
},
_renderlines: function(t, e, i, n) {
function o(e) {
a._firstdayofmonth.push(r.getdateinfo(e)),
a._firstdaypoints.push(r.datatorect([e], !1).tl);
var o = a._getlinepointsofoneweek(t, e, i);
a._tlpoints.push(o[0]),
a._blpoints.push(o[o.length - 1]),
l && a._drawsplitline(o, s, n)
}
var a = this,
r = t.coordinatesystem,
s = t.getmodel("splitline.linestyle").getlinestyle(),
l = t.get("splitline.show"),
u = s.linewidth;
this._tlpoints = [],
this._blpoints = [],
this._firstdayofmonth = [],
this._firstdaypoints = [];
for (var h = e.start,
c = 0; h.time <= e.end.time; c++) {
o(h.formateddate),
0 === c && (h = r.getdateinfo(e.start.y + "-" + e.start.m));
var d = h.date;
d.setmonth(d.getmonth() + 1),
h = r.getdateinfo(d)
}
o(r.getnextnday(e.end.time, 1).formateddate),
l && this._drawsplitline(a._getedgespoints(a._tlpoints, u, i), s, n),
l && this._drawsplitline(a._getedgespoints(a._blpoints, u, i), s, n)
},
_getedgespoints: function(t, e, i) {
var n = [t[0].slice(), t[t.length - 1].slice()],
o = "horizontal" === i ? 0 : 1;
return n[0][o] = n[0][o] - e / 2,
n[1][o] = n[1][o] + e / 2,
n
},
_drawsplitline: function(t, e, i) {
var n = new om({
z2: 20,
shape: {
points: t
},
style: e
});
i.add(n)
},
_getlinepointsofoneweek: function(t, e, i) {
var n = t.coordinatesystem;
e = n.getdateinfo(e);
for (var o = [], a = 0; a < 7; a++) {
var r = n.getnextnday(e.time, a),
s = n.datatorect([r.time], !1);
o[2 * r.day] = s.tl,
o[2 * r.day + 1] = s["horizontal" === i ? "bl": "tr"]
}
return o
},
_formatterlabel: function(t, e) {
return "string" == typeof t && t ? ea(t, e) : "function" == typeof t ? t(e) : e.namemap
},
_yeartextpositioncontrol: function(t, e, i, n, o) {
e = e.slice();
var a = ["center", "bottom"];
"bottom" === n ? (e[1] += o, a = ["center", "top"]) : "left" === n ? e[0] -= o: "right" === n ? (e[0] += o, a = ["center", "top"]) : e[1] -= o;
var r = 0;
return "left" !== n && "right" !== n || (r = math.pi / 2),
{
rotation: r,
position: e,
style: {
textalign: a[0],
textverticalalign: a[1]
}
}
},
_renderyeartext: function(t, e, i, n) {
var o = t.getmodel("yearlabel");
if (o.get("show")) {
var a = o.get("margin"),
r = o.get("position");
r || (r = "horizontal" !== i ? "top": "left");
var s = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]],
l = (s[0][0] + s[1][0]) / 2,
u = (s[0][1] + s[1][1]) / 2,
h = "horizontal" === i ? 0 : 1,
c = {
top: [l, s[h][1]],
bottom: [l, s[1 - h][1]],
left: [s[1 - h][0], u],
right: [s[h][0], u]
},
d = e.start.y; + e.end.y > +e.start.y && (d = d + "-" + e.end.y);
var f = o.get("formatter"),
p = {
start: e.start.y,
end: e.end.y,
namemap: d
},
g = this._formatterlabel(f, p),
m = new qs({
z2: 30
});
fo(m.style, o, {
text: g
}),
m.attr(this._yeartextpositioncontrol(m, c[r], i, r, a)),
n.add(m)
}
},
_monthtextpositioncontrol: function(t, e, i, n, o) {
var a = "left",
r = "top",
s = t[0],
l = t[1];
return "horizontal" === i ? (l += o, e && (a = "center"), "start" === n && (r = "bottom")) : (s += o, e && (r = "middle"), "start" === n && (a = "right")),
{
x: s,
y: l,
textalign: a,
textverticalalign: r
}
},
_rendermonthtext: function(t, e, i) {
var n = t.getmodel("monthlabel");
if (n.get("show")) {
var o = n.get("namemap"),
r = n.get("margin"),
s = n.get("position"),
l = n.get("align"),
u = [this._tlpoints, this._blpoints];
_(o) && (o = cn[o.touppercase()] || []);
var h = "start" === s ? 0 : 1,
c = "horizontal" === e ? 0 : 1;
r = "start" === s ? -r: r;
for (var d = "center" === l,
f = 0; f < u[h].length - 1; f++) {
var p = u[h][f].slice(),
g = this._firstdayofmonth[f];
if (d) {
var m = this._firstdaypoints[f];
p[c] = (m[c] + u[0][f + 1][c]) / 2
}
var v = n.get("formatter"),
y = o[ + g.m - 1],
x = {
yyyy: g.y,
yy: (g.y + "").slice(2),
mm: g.m,
m: +g.m,
namemap: y
},
w = this._formatterlabel(v, x),
b = new qs({
z2: 30
});
a(fo(b.style, n, {
text: w
}), this._monthtextpositioncontrol(p, d, e, s, r)),
i.add(b)
}
}
},
_weektextpositioncontrol: function(t, e, i, n, o) {
var a = "center",
r = "middle",
s = t[0],
l = t[1],
u = "start" === i;
return "horizontal" === e ? (s = s + n + (u ? 1 : -1) * o[0] / 2, a = u ? "right": "left") : (l = l + n + (u ? 1 : -1) * o[1] / 2, r = u ? "bottom": "top"),
{
x: s,
y: l,
textalign: a,
textverticalalign: r
}
},
_renderweektext: function(t, e, i, n) {
var o = t.getmodel("daylabel");
if (o.get("show")) {
var r = t.coordinatesystem,
s = o.get("position"),
l = o.get("namemap"),
u = o.get("margin"),
h = r.getfirstdayofweek();
_(l) && (l = ln[l.touppercase()] || []);
var c = r.getnextnday(e.end.time, 7 - e.lweek).time,
d = [r.getcellwidth(), r.getcellheight()];
u = ro(u, d["horizontal" === i ? 0 : 1]),
"start" === s && (c = r.getnextnday(e.start.time, -(7 + e.fweek)).time, u = -u);
for (var f = 0; f < 7; f++) {
var p = r.getnextnday(c, f),
g = r.datatorect([p.time], !1).center,
m = f;
m = math.abs((f + h) % 7);
var v = new qs({
z2: 30
});
a(fo(v.style, o, {
text: l[m]
}), this._weektextpositioncontrol(g, i, s, u, d)),
n.add(v)
}
}
}
}),
bs({
type: "title",
layoutmode: {
type: "box",
ignoresize: !0
},
defaultoption: {
zlevel: 0,
z: 6,
show: !0,
text: "",
target: "blank",
subtext: "",
subtarget: "blank",
left: 0,
top: 0,
backgroundcolor: "rgba(0,0,0,0)",
bordercolor: "#ccc",
borderwidth: 0,
padding: 5,
itemgap: 10,
textstyle: {
fontsize: 18,
fontweight: "bolder",
color: "#333"
},
subtextstyle: {
color: "#aaa"
}
}
}),
vs({
type: "title",
render: function(t, e, i) {
if (this.group.removeall(), t.get("show")) {
var n = this.group,
o = t.getmodel("textstyle"),
a = t.getmodel("subtextstyle"),
r = t.get("textalign"),
s = t.get("textbaseline"),
l = new qs({
style: fo({},
o, {
text: t.get("text"),
textfill: o.gettextcolor()
},
{
disablebox: !0
}),
z2: 10
}),
u = l.getboundingrect(),
h = t.get("subtext"),
c = new qs({
style: fo({},
a, {
text: h,
textfill: a.gettextcolor(),
y: u.height + t.get("itemgap"),
textverticalalign: "top"
},
{
disablebox: !0
}),
z2: 10
}),
d = t.get("link"),
f = t.get("sublink"),
p = t.get("triggerevent", !0);
l.silent = !d && !p,
c.silent = !f && !p,
d && l.on("click",
function() {
window.open(d, "_" + t.get("target"))
}),
f && c.on("click",
function() {
window.open(f, "_" + t.get("subtarget"))
}),
l.eventdata = c.eventdata = p ? {
componenttype: "title",
componentindex: t.componentindex
}: null,
n.add(l),
h && n.add(c);
var g = n.getboundingrect(),
m = t.getboxlayoutparams();
m.width = g.width,
m.height = g.height;
var v = la(m, {
width: i.getwidth(),
height: i.getheight()
},
t.get("padding"));
r || ("middle" === (r = t.get("left") || t.get("right")) && (r = "center"), "right" === r ? v.x += v.width: "center" === r && (v.x += v.width / 2)),
s || ("center" === (s = t.get("top") || t.get("bottom")) && (s = "middle"), "bottom" === s ? v.y += v.height: "middle" === s && (v.y += v.height / 2), s = s || "top"),
n.attr("position", [v.x, v.y]);
var y = {
textalign: r,
textverticalalign: s
};
l.setstyle(y),
c.setstyle(y),
g = n.getboundingrect();
var x = v.margin,
_ = t.getitemstyle(["color", "opacity"]);
_.fill = t.get("backgroundcolor");
var w = new am({
shape: {
x: g.x - x[3],
y: g.y - x[0],
width: g.width + x[1] + x[3],
height: g.height + x[0] + x[2],
r: t.get("borderradius")
},
style: _,
silent: !0
});
jn(w),
n.add(w)
}
}
}),
ym.registersubtypedefaulter("datazoom",
function() {
return "slider"
});
var kn = ["cartesian2d", "polar", "singleaxis"],
pn = function(t, e) {
var i = f(t = t.slice(), aa),
n = f(e = (e || []).slice(), aa);
return function(o, a) {
d(t,
function(t, r) {
for (var s = {
name: t,
capital: i[r]
},
l = 0; l < e.length; l++) s[e[l]] = t + n[l];
o.call(a, s)
})
}
} (["x", "y", "z", "radius", "angle", "single"], ["axisindex", "axis", "index", "id"]),
nn = d,
on = bo,
en = function(t, e, i, n) {
this._dimname = t,
this._axisindex = e,
this._valuewindow,
this._percentwindow,
this._dataextent,
this._minmaxspan,
this.ecmodel = n,
this._datazoommodel = i
};
en.prototype = {
constructor: en,
hostedby: function(t) {
return this._datazoommodel === t
},
getdatavaluewindow: function() {
return this._valuewindow.slice()
},
getdatapercentwindow: function() {
return this._percentwindow.slice()
},
gettargetseriesmodels: function() {
var t = [],
e = this.ecmodel;
return e.eachseries(function(i) {
if (my(i.get("coordinatesystem"))) {
var n = this._dimname,
o = e.querycomponents({
maintype: n + "axis",
index: i.get(n + "axisindex"),
id: i.get(n + "axisid")
})[0];
this._axisindex === (o && o.componentindex) && t.push(i)
}
},
this),
t
},
getaxismodel: function() {
return this.ecmodel.getcomponent(this._dimname + "axis", this._axisindex)
},
getotheraxismodel: function() {
var t, e, i = this._dimname,
n = this.ecmodel,
o = this.getaxismodel();
"x" === i || "y" === i ? (e = "gridindex", t = "x" === i ? "y": "x") : (e = "polarindex", t = "angle" === i ? "radius": "angle");
var a;
return n.eachcomponent(t + "axis",
function(t) { (t.get(e) || 0) === (o.get(e) || 0) && (a = t)
}),
a
},
getminmaxspan: function() {
return i(this._minmaxspan)
},
calculatedatawindow: function(t) {
var e = this._dataextent,
i = this.getaxismodel().axis.scale,
n = this._datazoommodel.getrangepropmode(),
o = [0, 100],
a = [t.start, t.end],
r = [];
return nn(["startvalue", "endvalue"],
function(e) {
r.push(null != t[e] ? i.parse(t[e]) : null)
}),
nn([0, 1],
function(t) {
var s = r[t],
l = a[t];
"percent" === n[t] ? (null == l && (l = o[t]), s = i.parse(eo(l, o, e, !0))) : l = eo(s, e, o, !0),
r[t] = s,
a[t] = l
}),
{
valuewindow: on(r),
percentwindow: on(a)
}
},
reset: function(t) {
if (t === this._datazoommodel) {
var e = this.gettargetseriesmodels();
this._dataextent = ty(this, this._dimname, e);
var i = this.calculatedatawindow(t.option);
this._valuewindow = i.valuewindow,
this._percentwindow = i.percentwindow,
cy(this),
dy(this)
}
},
restore: function(t) {
t === this._datazoommodel && (this._valuewindow = this._percentwindow = null, dy(this, !0))
},
filterdata: function(t, e) {
function i(t) {
return t >= r[0] && t <= r[1]
}
if (t === this._datazoommodel) {
var n = this._dimname,
o = this.gettargetseriesmodels(),
a = t.get("filtermode"),
r = this._valuewindow;
"none" !== a && nn(o,
function(t) {
var e = t.getdata(),
o = e.mapdimension(n, !0);
o.length && ("weakfilter" === a ? e.filterself(function(t) {
for (var i, n, a, s = 0; s < o.length; s++) {
var l = e.get(o[s], t),
u = !isnan(l),
h = l < r[0],
c = l > r[1];
if (u && !h && !c) return ! 0;
u && (a = !0),
h && (i = !0),
c && (n = !0)
}
return a && i && n
}) : nn(o,
function(n) {
if ("empty" === a) t.setdata(e.map(n,
function(t) {
return i(t) ? t: nan
}));
else {
var o = {};
o[n] = r,
e.selectrange(o)
}
}), nn(o,
function(t) {
e.setapproximateextent(r, t)
}))
})
}
}
};
var rn = d,
zn = pn,
bn = bs({
type: "datazoom",
dependencies: ["xaxis", "yaxis", "zaxis", "radiusaxis", "angleaxis", "singleaxis", "series"],
defaultoption: {
zlevel: 0,
z: 4,
orient: null,
xaxisindex: null,
yaxisindex: null,
filtermode: "filter",
throttle: null,
start: 0,
end: 100,
startvalue: null,
endvalue: null,
minspan: null,
maxspan: null,
minvaluespan: null,
maxvaluespan: null,
rangemode: null
},
init: function(t, e, i) {
this._dataintervalbyaxis = {},
this._datainfo = {},
this._axisproxies = {},
this.textstylemodel,
this._autothrottle = !0,
this._rangepropmode = ["percent", "percent"];
var n = ly(t);
this.mergedefaultandtheme(t, i),
this.doinit(n)
},
mergeoption: function(t) {
var e = ly(t);
n(this.option, t, !0),
this.doinit(e)
},
doinit: function(t) {
var e = this.option;
z_.canvassupported || (e.realtime = !1),
this._setdefaultthrottle(t),
ky(this, t),
rn([["start", "startvalue"], ["end", "endvalue"]],
function(t, i) {
"value" === this._rangepropmode[i] && (e[t[0]] = null)
},
this),
this.textstylemodel = this.getmodel("textstyle"),
this._resettarget(),
this._giveaxisproxies()
},
_giveaxisproxies: function() {
var t = this._axisproxies;
this.eachtargetaxis(function(e, i, n, o) {
var a = this.dependentmodels[e.axis][i],
r = a.__dzaxisproxy || (a.__dzaxisproxy = new en(e.name, i, this, o));
t[e.name + "_" + i] = r
},
this)
},
_resettarget: function() {
var t = this.option,
e = this._judgeautomode();
zn(function(e) {
var i = e.axisindex;
t[i] = di(t[i])
},
this),
"axisindex" === e ? this._autosetaxisindex() : "orient" === e && this._autosetorient()
},
_judgeautomode: function() {
var t = this.option,
e = !1;
zn(function(i) {
null != t[i.axisindex] && (e = !0)
},
this);
var i = t.orient;
return null == i && e ? "orient": e ? void 0 : (null == i && (t.orient = "horizontal"), "axisindex")
},
_autosetaxisindex: function() {
var t = !0,
e = this.get("orient", !0),
i = this.option,
n = this.dependentmodels;
if (t) {
var o = "vertical" === e ? "y": "x";
n[o + "axis"].length ? (i[o + "axisindex"] = [0], t = !1) : rn(n.singleaxis,
function(n) {
t && n.get("orient", !0) === e && (i.singleaxisindex = [n.componentindex], t = !1)
})
}
t && zn(function(e) {
if (t) {
var n = [],
o = this.dependentmodels[e.axis];
if (o.length && !n.length) for (var a = 0,
r = o.length; a < r; a++)"category" === o[a].get("type") && n.push(a);
i[e.axisindex] = n,
n.length && (t = !1)
}
},
this),
t && this.ecmodel.eachseries(function(t) {
this._isserieshasallaxestypeof(t, "value") && zn(function(e) {
var n = i[e.axisindex],
o = t.get(e.axisindex),
a = t.get(e.axisid);
l(n, o = t.ecmodel.querycomponents({
maintype: e.axis,
index: o,
id: a
})[0].componentindex) < 0 && n.push(o)
})
},
this)
},
_autosetorient: function() {
var t;
this.eachtargetaxis(function(e) { ! t && (t = e.name)
},
this),
this.option.orient = "y" === t ? "vertical": "horizontal"
},
_isserieshasallaxestypeof: function(t, e) {
var i = !0;
return zn(function(n) {
var o = t.get(n.axisindex),
a = this.dependentmodels[n.axis][o];
a && a.get("type") === e || (i = !1)
},
this),
i
},
_setdefaultthrottle: function(t) {
if (t.hasownproperty("throttle") && (this._autothrottle = !1), this._autothrottle) {
var e = this.ecmodel.option;
this.option.throttle = e.animation && e.animationdurationupdate > 0 ? 100 : 20
}
},
getfirsttargetaxismodel: function() {
var t;
return zn(function(e) {
if (null == t) {
var i = this.get(e.axisindex);
i.length && (t = this.dependentmodels[e.axis][i[0]])
}
},
this),
t
},
eachtargetaxis: function(t, e) {
var i = this.ecmodel;
zn(function(n) {
rn(this.get(n.axisindex),
function(o) {
t.call(e, n, o, this, i)
},
this)
},
this)
},
getaxisproxy: function(t, e) {
return this._axisproxies[t + "_" + e]
},
getaxismodel: function(t, e) {
var i = this.getaxisproxy(t, e);
return i && i.getaxismodel()
},
setrawrange: function(t, e) {
var i = this.option;
rn([["start", "startvalue"], ["end", "endvalue"]],
function(e) {
null == t[e[0]] && null == t[e[1]] || (i[e[0]] = t[e[0]], i[e[1]] = t[e[1]])
},
this),
!e && ky(this, t)
},
getpercentrange: function() {
var t = this.findrepresentativeaxisproxy();
if (t) return t.getdatapercentwindow()
},
getvaluerange: function(t, e) {
if (null != t || null != e) return this.getaxisproxy(t, e).getdatavaluewindow();
var i = this.findrepresentativeaxisproxy();
return i ? i.getdatavaluewindow() : void 0
},
findrepresentativeaxisproxy: function(t) {
if (t) return t.__dzaxisproxy;
var e = this._axisproxies;
for (var i in e) if (e.hasownproperty(i) && e[i].hostedby(this)) return e[i];
for (var i in e) if (e.hasownproperty(i) && !e[i].hostedby(this)) return e[i]
},
getrangepropmode: function() {
return this._rangepropmode.slice()
}
}),
vn = ei.extend({
type: "datazoom",
render: function(t, e, i, n) {
this.datazoommodel = t,
this.ecmodel = e,
this.api = i
},
gettargetcoordinfo: function() {
function t(t, e, i, n) {
for (var o, a = 0; a < i.length; a++) if (i[a].model === t) {
o = i[a];
break
}
o || i.push(o = {
model: t,
axismodels: [],
coordindex: n
}),
o.axismodels.push(e)
}
var e = this.datazoommodel,
i = this.ecmodel,
n = {};
return e.eachtargetaxis(function(e, o) {
var a = i.getcomponent(e.axis, o);
if (a) {
var r = a.getcoordsysmodel();
r && t(r, a, n[r.maintype] || (n[r.maintype] = []), r.componentindex)
}
},
this),
n
}
}),
gn = (bn.extend({
type: "datazoom.slider",
layoutmode: "box",
defaultoption: {
show: !0,
right: "ph",
top: "ph",
width: "ph",
height: "ph",
left: null,
bottom: null,
backgroundcolor: "rgba(47,69,84,0)",
databackground: {
linestyle: {
color: "#2f4554",
width: .5,
opacity: .3
},
areastyle: {
color: "rgba(47,69,84,0.3)",
opacity: .3
}
},
bordercolor: "#ddd",
fillercolor: "rgba(167,183,204,0.4)",
handleicon: "m8.2,13.6v3.9h6.3v9.7h3.1v14.9h3.3v9.7h1.8v-9.7h3.3v13.6h8.2z m9.7,24.4h4.8v-1.4h4.9v24.4z m9.7,19.1h4.8v-1.4h4.9v19.1z",
handlesize: "100%",
handlestyle: {
color: "#a7b7cc"
},
labelprecision: null,
labelformatter: null,
showdetail: !0,
showdatashadow: "auto",
realtime: !0,
zoomlock: !1,
textstyle: {
color: "#333"
}
}
}), am),
fn = eo,
wn = bo,
hn = m,
zn = d,
un = "horizontal",
xn = 5,
jn = ["line", "bar", "candlestick", "scatter"],
yn = vn.extend({
type: "datazoom.slider",
init: function(t, e) {
this._displayables = {},
this._orient,
this._range,
this._handleends,
this._size,
this._handlewidth,
this._handleheight,
this._location,
this._dragging,
this._datashadowinfo,
this.api = e
},
render: function(t, e, i, n) {
yn.superapply(this, "render", arguments),
lr(this, "_dispatchzoomaction", this.datazoommodel.get("throttle"), "fixrate"),
this._orient = t.get("orient"),
!1 !== this.datazoommodel.get("show") ? (n && "datazoom" === n.type && n.from === this.uid || this._buildview(), this._updateview()) : this.group.removeall()
},
remove: function() {
yn.superapply(this, "remove", arguments),
kr(this, "_dispatchzoomaction")
},
dispose: function() {
yn.superapply(this, "dispose", arguments),
kr(this, "_dispatchzoomaction")
},
_buildview: function() {
var t = this.group;
t.removeall(),
this._resetlocation(),
this._resetinterval();
var e = this._displayables.bargroup = new zw;
this._renderbackground(),
this._renderhandle(),
this._renderdatashadow(),
t.add(e),
this._positiongroup()
},
_resetlocation: function() {
var t = this.datazoommodel,
e = this.api,
i = this._findcoordrect(),
n = {
width: e.getwidth(),
height: e.getheight()
},
o = this._orient === un ? {
right: n.width - i.x - i.width,
top: n.height - 30 - 7,
width: i.width,
height: 30
}: {
right: 7,
top: i.y,
width: 30,
height: i.height
},
a = da(t.option);
d(["right", "top", "width", "height"],
function(t) {
"ph" === a[t] && (a[t] = o[t])
});
var r = la(a, n, t.padding);
this._location = {
x: r.x,
y: r.y
},
this._size = [r.width, r.height],
"vertical" === this._orient && this._size.reverse()
},
_positiongroup: function() {
var t = this.group,
e = this._location,
i = this._orient,
n = this.datazoommodel.getfirsttargetaxismodel(),
o = n && n.get("inverse"),
a = this._displayables.bargroup,
r = (this._datashadowinfo || {}).otheraxisinverse;
a.attr(i !== un || o ? i === un && o ? {
scale: r ? [ - 1, 1] : [ - 1, -1]
}: "vertical" !== i || o ? {
scale: r ? [ - 1, -1] : [ - 1, 1],
rotation: math.pi / 2
}: {
scale: r ? [1, -1] : [1, 1],
rotation: math.pi / 2
}: {
scale: r ? [1, 1] : [1, -1]
});
var s = t.getboundingrect([a]);
t.attr("position", [e.x - s.x, e.y - s.y])
},
_getviewextent: function() {
return [0, this._size[0]]
},
_renderbackground: function() {
var t = this.datazoommodel,
e = this._size,
i = this._displayables.bargroup;
i.add(new gn({
silent: !0,
shape: {
x: 0,
y: 0,
width: e[0],
height: e[1]
},
style: {
fill: t.get("backgroundcolor")
},
z2: -40
})),
i.add(new gn({
shape: {
x: 0,
y: 0,
width: e[0],
height: e[1]
},
style: {
fill: "transparent"
},
z2: 0,
onclick: m(this._onclickpanelclick, this)
}))
},
_renderdatashadow: function() {
var t = this._datashadowinfo = this._preparedatashadowinfo();
if (t) {
var e = this._size,
i = t.series,
n = i.getrawdata(),
o = i.getshadowdim ? i.getshadowdim() : t.otherdim;
if (null != o) {
var a = n.getdataextent(o),
s = .3 * (a[1] - a[0]);
a = [a[0] - s, a[1] + s];
var l, u = [0, e[1]],
h = [0, e[0]],
c = [[e[0], 0], [0, 0]],
d = [],
f = h[1] / (n.count() - 1),
p = 0,
g = math.round(n.count() / e[0]);
n.each([o],
function(t, e) {
if (g > 0 && e % g) p += f;
else {
var i = null == t || isnan(t) || "" === t,
n = i ? 0 : fn(t, a, u, !0);
i && !l && e ? (c.push([c[c.length - 1][0], 0]), d.push([d[d.length - 1][0], 0])) : !i && l && (c.push([p, 0]), d.push([p, 0])),
c.push([p, n]),
d.push([p, n]),
p += f,
l = i
}
});
var m = this.datazoommodel;
this._displayables.bargroup.add(new nm({
shape: {
points: c
},
style: r({
fill: m.get("databackgroundcolor")
},
m.getmodel("databackground.areastyle").getareastyle()),
silent: !0,
z2: -20
})),
this._displayables.bargroup.add(new om({
shape: {
points: d
},
style: m.getmodel("databackground.linestyle").getlinestyle(),
silent: !0,
z2: -19
}))
}
}
},
_preparedatashadowinfo: function() {
var t = this.datazoommodel,
e = t.get("showdatashadow");
if (!1 !== e) {
var i, n = this.ecmodel;
return t.eachtargetaxis(function(o, a) {
d(t.getaxisproxy(o.name, a).gettargetseriesmodels(),
function(t) {
if (! (i || !0 !== e && l(jn, t.get("type")) < 0)) {
var r, s = n.getcomponent(o.axis, a).axis,
u = py(o.name),
h = t.coordinatesystem;
null != u && h.getotheraxis && (r = h.getotheraxis(s).inverse),
u = t.getdata().mapdimension(u),
i = {
thisaxis: s,
series: t,
thisdim: o.name,
otherdim: u,
otheraxisinverse: r
}
}
},
this)
},
this),
i
}
},
_renderhandle: function() {
var t = this._displayables,
e = t.handles = [],
i = t.handlelabels = [],
n = this._displayables.bargroup,
o = this._size,
a = this.datazoommodel;
n.add(t.filler = new gn({
draggable: !0,
cursor: ny(this._orient),
drift: hn(this._ondragmove, this, "all"),
onmousemove: function(t) {
lw(t.event)
},
ondragstart: hn(this._showdatainfo, this, !0),
ondragend: hn(this._ondragend, this),
onmouseover: hn(this._showdatainfo, this, !0),
onmouseout: hn(this._showdatainfo, this, !1),
style: {
fill: a.get("fillercolor"),
textposition: "inside"
}
})),
n.add(new gn(jn({
silent: !0,
shape: {
x: 0,
y: 0,
width: o[0],
height: o[1]
},
style: {
stroke: a.get("databackgroundcolor") || a.get("bordercolor"),
linewidth: 1,
fill: "rgba(0,0,0,0)"
}
}))),
zn([0, 1],
function(t) {
var o = co(a.get("handleicon"), {
cursor: ny(this._orient),
draggable: !0,
drift: hn(this._ondragmove, this, t),
onmousemove: function(t) {
lw(t.event)
},
ondragend: hn(this._ondragend, this),
onmouseover: hn(this._showdatainfo, this, !0),
onmouseout: hn(this._showdatainfo, this, !1)
},
{
x: -1,
y: 0,
width: 2,
height: 2
}),
r = o.getboundingrect();
this._handleheight = ro(a.get("handlesize"), this._size[1]),
this._handlewidth = r.width / r.height * this._handleheight,
o.setstyle(a.getmodel("handlestyle").getitemstyle());
var s = a.get("handlecolor");
null != s && (o.style.fill = s),
n.add(e[t] = o);
var l = a.textstylemodel;
this.group.add(i[t] = new qs({
silent: !0,
invisible: !0,
style: {
x: 0,
y: 0,
text: "",
textverticalalign: "middle",
textalign: "center",
textfill: l.gettextcolor(),
textfont: l.getfont()
},
z2: 10
}))
},
this)
},
_resetinterval: function() {
var t = this._range = this.datazoommodel.getpercentrange(),
e = this._getviewextent();
this._handleends = [fn(t[0], [0, 100], e, !0), fn(t[1], [0, 100], e, !0)]
},
_updateinterval: function(t, e) {
var i = this.datazoommodel,
n = this._handleends,
o = this._getviewextent(),
a = i.findrepresentativeaxisproxy().getminmaxspan(),
r = [0, 100];
el(e, n, o, i.get("zoomlock") ? "all": t, null != a.minspan ? fn(a.minspan, r, o, !0) : null, null != a.maxspan ? fn(a.maxspan, r, o, !0) : null);
var s = this._range,
l = this._range = wn([fn(n[0], o, r, !0), fn(n[1], o, r, !0)]);
return ! s || s[0] !== l[0] || s[1] !== l[1]
},
_updateview: function(t) {
var e = this._displayables,
i = this._handleends,
n = wn(i.slice()),
o = this._size;
zn([0, 1],
function(t) {
var n = e.handles[t],
a = this._handleheight;
n.attr({
scale: [a / 2, a / 2],
position: [i[t], o[1] / 2 - a / 2]
})
},
this),
e.filler.setshape({
x: n[0],
y: 0,
width: n[1] - n[0],
height: o[1]
}),
this._updatedatainfo(t)
},
_updatedatainfo: function(t) {
function e(t) {
var e = mo(n.handles[t].parent, this.group),
i = to(0 === t ? "right": "left", e),
s = this._handlewidth / 2 + xn,
l = io([c[t] + (0 === t ? -s: s), this._size[1] / 2], e);
o[t].setstyle({
x: l[0],
y: l[1],
textverticalalign: a === un ? "middle": i,
textalign: a === un ? i: "center",
text: r[t]
})
}
var i = this.datazoommodel,
n = this._displayables,
o = n.handlelabels,
a = this._orient,
r = ["", ""];
if (i.get("showdetail")) {
var s = i.findrepresentativeaxisproxy();
if (s) {
var l = s.getaxismodel().axis,
u = this._range,
h = t ? s.calculatedatawindow({
start: u[0],
end: u[1]
}).valuewindow: s.getdatavaluewindow();
r = [this._formatlabel(h[0], l), this._formatlabel(h[1], l)]
}
}
var c = wn(this._handleends.slice());
e.call(this, 0),
e.call(this, 1)
},
_formatlabel: function(t, e) {
var i = this.datazoommodel,
n = i.get("labelformatter"),
o = i.get("labelprecision");
null != o && "auto" !== o || (o = e.getpixelprecision());
var a = null == t || isnan(t) ? "": "category" === e.type || "time" === e.type ? e.scale.getlabel(math.round(t)) : t.tofixed(math.min(o, 20));
return x(n) ? n(t, a) : _(n) ? n.replace("{value}", a) : a
},
_showdatainfo: function(t) {
t = this._dragging || t;
var e = this._displayables.handlelabels;
e[0].attr("invisible", !t),
e[1].attr("invisible", !t)
},
_ondragmove: function(t, e, i) {
this._dragging = !0;
var n = io([e, i], this._displayables.bargroup.getlocaltransform(), !0),
o = this._updateinterval(t, n[0]),
a = this.datazoommodel.get("realtime");
this._updateview(!a),
o && a && this._dispatchzoomaction()
},
_ondragend: function() {
this._dragging = !1,
this._showdatainfo(!1),
!this.datazoommodel.get("realtime") && this._dispatchzoomaction()
},
_onclickpanelclick: function(t) {
var e = this._size,
i = this._displayables.bargroup.transformcoordtolocal(t.offsetx, t.offsety);
if (! (i[0] < 0 || i[0] > e[0] || i[1] < 0 || i[1] > e[1])) {
var n = this._handleends,
o = (n[0] + n[1]) / 2,
a = this._updateinterval("all", i[0] - o);
this._updateview(),
a && this._dispatchzoomaction()
}
},
_dispatchzoomaction: function() {
var t = this._range;
this.api.dispatchaction({
type: "datazoom",
from: this.uid,
datazoomid: this.datazoommodel.id,
start: t[0],
end: t[1]
})
},
_findcoordrect: function() {
var t;
if (zn(this.gettargetcoordinfo(),
function(e) {
if (!t && e.length) {
var i = e[0].model.coordinatesystem;
t = i.getrect && i.getrect()
}
}), !t) {
var e = this.api.getwidth(),
i = this.api.getheight();
t = {
x: .2 * e,
y: .2 * i,
width: .6 * e,
height: .6 * i
}
}
return t
}
});
bn.extend({
type: "datazoom.inside",
defaultoption: {
disabled: !1,
zoomlock: !1,
zoomonmousewheel: !0,
moveonmousemove: !0,
moveonmousewheel: !1,
preventdefaultmousemove: !0
}
});
var qn = "\0_ec_datazoom_roams",
kn = m,
$n = vn.extend({
type: "datazoom.inside",
init: function(t, e) {
this._range
},
render: function(t, e, i, n) {
$n.superapply(this, "render", arguments),
this._range = t.getpercentrange(),
d(this.gettargetcoordinfo(),
function(e, n) {
var o = f(e,
function(t) {
return ry(t.model)
});
d(e,
function(e) {
var a = e.model,
r = {};
d(["pan", "zoom", "scrollmove"],
function(t) {
r[t] = kn(jn[t], this, e, n)
},
this),
oy(i, {
coordid: ry(a),
allcoordids: o,
containspoint: function(t, e, i) {
return a.coordinatesystem.containpoint([e, i])
},
datazoomid: t.id,
datazoommodel: t,
getrange: r
})
},
this)
},
this)
},
dispose: function() {
ey(this.api, this.datazoommodel.id),
$n.superapply(this, "dispose", arguments),
this._range = null
}
}),
jn = {
zoom: function(t, e, i, n) {
var o = this._range,
a = o.slice(),
r = t.axismodels[0];
if (r) {
var s = qn[e](null, [n.originx, n.originy], r, i, t),
l = (s.signal > 0 ? s.pixelstart + s.pixellength - s.pixel: s.pixel - s.pixelstart) / s.pixellength * (a[1] - a[0]) + a[0],
u = math.max(1 / n.scale, 0);
a[0] = (a[0] - l) * u + l,
a[1] = (a[1] - l) * u + l;
var h = this.datazoommodel.findrepresentativeaxisproxy().getminmaxspan();
return el(0, a, [0, 100], 0, h.minspan, h.maxspan),
this._range = a,
o[0] !== a[0] || o[1] !== a[1] ? a: void 0
}
},
pan: wy(function(t, e, i, n, o, a) {
var r = qn[n]([a.oldx, a.oldy], [a.newx, a.newy], e, o, i);
return r.signal * (t[1] - t[0]) * r.pixel / r.pixellength
}),
scrollmove: wy(function(t, e, i, n, o, a) {
return qn[n]([0, 0], [a.scrolldelta, a.scrolldelta], e, o, i).signal * (t[1] - t[0]) * a.scrolldelta
})
},
qn = {
grid: function(t, e, i, n, o) {
var a = i.axis,
r = {},
s = o.model.coordinatesystem.getrect();
return t = t || [0, 0],
"x" === a.dim ? (r.pixel = e[0] - t[0], r.pixellength = s.width, r.pixelstart = s.x, r.signal = a.inverse ? 1 : -1) : (r.pixel = e[1] - t[1], r.pixellength = s.height, r.pixelstart = s.y, r.signal = a.inverse ? -1 : 1),
r
},
polar: function(t, e, i, n, o) {
var a = i.axis,
r = {},
s = o.model.coordinatesystem,
l = s.getradiusaxis().getextent(),
u = s.getangleaxis().getextent();
return t = t ? s.pointtocoord(t) : [0, 0],
e = s.pointtocoord(e),
"radiusaxis" === i.maintype ? (r.pixel = e[0] - t[0], r.pixellength = l[1] - l[0], r.pixelstart = l[0], r.signal = a.inverse ? 1 : -1) : (r.pixel = e[1] - t[1], r.pixellength = u[1] - u[0], r.pixelstart = u[0], r.signal = a.inverse ? -1 : 1),
r
},
singleaxis: function(t, e, i, n, o) {
var a = i.axis,
r = o.model.coordinatesystem.getrect(),
s = {};
return t = t || [0, 0],
"horizontal" === a.orient ? (s.pixel = e[0] - t[0], s.pixellength = r.width, s.pixelstart = r.x, s.signal = a.inverse ? 1 : -1) : (s.pixel = e[1] - t[1], s.pixellength = r.height, s.pixelstart = r.y, s.signal = a.inverse ? -1 : 1),
s
}
};
ks({
gettargetseries: function(t) {
var e = r();
return t.eachcomponent("datazoom",
function(t) {
t.eachtargetaxis(function(t, i, n) {
d(n.getaxisproxy(t.name, i).gettargetseriesmodels(),
function(t) {
e.set(t.uid, t)
})
})
}),
e
},
modifyoutputend: !0,
overallreset: function(t, e) {
t.eachcomponent("datazoom",
function(t) {
t.eachtargetaxis(function(t, i, n) {
n.getaxisproxy(t.name, i).reset(n, e)
}),
t.eachtargetaxis(function(t, i, n) {
n.getaxisproxy(t.name, i).filterdata(n, e)
})
}),
t.eachcomponent("datazoom",
function(t) {
var e = t.findrepresentativeaxisproxy(),
i = e.getdatapercentwindow(),
n = e.getdatavaluewindow();
t.setrawrange({
start: i[0],
end: i[1],
startvalue: n[0],
endvalue: n[1]
},
!0)
})
}
}),
ps("datazoom",
function(t, e) {
var i = iy(m(e.eachcomponent, e, "datazoom"), pn,
function(t, e) {
return t.get(e.axisindex)
}),
n = [];
e.eachcomponent({
maintype: "datazoom",
query: t
},
function(t, e) {
n.push.apply(n, i(t).nodes)
}),
d(n,
function(e, i) {
e.setrawrange({
start: t.start,
end: t.end,
startvalue: t.startvalue,
endvalue: t.endvalue
})
})
});
var to = d,
eo = function(t) {
var e = t && t.visualmap;
y(e) || (e = e ? [e] : []),
to(e,
function(t) {
if (t) {
hy(t, "splitlist") && !hy(t, "pieces") && (t.pieces = t.splitlist, delete t.splitlist);
var e = t.pieces;
e && y(e) && to(e,
function(t) {
w(t) && (hy(t, "start") && !hy(t, "min") && (t.min = t.start), hy(t, "end") && !hy(t, "max") && (t.max = t.end))
})
}
})
};
ym.registersubtypedefaulter("visualmap",
function(t) {
return t.categories || (t.pieces ? t.pieces.length > 0 : t.splitnumber > 0) && !t.calculable ? "piecewise": "continuous"
});
var io = it.visual.component;
es(io, {
createonallseries: !0,
reset: function(t, e) {
var i = [];
return e.eachcomponent("visualmap",
function(e) {
var n = t.pipelinecontext; ! e.istargetseries(t) || n && n.large || i.push(qv(e.statelist, e.targetvisuals, m(e.getvaluestate, e), e.getdatadimension(t.getdata())))
}),
i
}
}),
es(io, {
createonallseries: !0,
reset: function(t, e) {
var i = t.getdata(),
n = [];
e.eachcomponent("visualmap",
function(e) {
if (e.istargetseries(t)) {
var o = e.getvisualmeta(m(zy, null, t, e)) || {
stops: [],
outercolors: []
},
a = e.getdatadimension(i),
r = i.getdimensioninfo(a);
null != r && (o.dimension = r.index, n.push(o))
}
}),
t.getdata().setvisual("visualmeta", n)
}
});
var no = {
get: function(t, e, n) {
var o = i((oo[t] || {})[e]);
return n && y(o) ? o[o.length - 1] : o
}
},
oo = {
color: {
active: ["#006edd", "#e0ffff"],
inactive: ["rgba(0,0,0,0)"]
},
colorhue: {
active: [0, 360],
inactive: [0, 0]
},
colorsaturation: {
active: [.3, 1],
inactive: [0, 0]
},
colorlightness: {
active: [.9, .5],
inactive: [0, 0]
},
coloralpha: {
active: [.3, 1],
inactive: [0, 0]
},
opacity: {
active: [.3, 1],
inactive: [0, 0]
},
symbol: {
active: ["circle", "roundrect", "diamond"],
inactive: ["none"]
},
symbolsize: {
active: [10, 50],
inactive: [0, 0]
}
},
ao = jc.mapvisual,
ro = jc.eachvisual,
so = y,
lo = d,
uo = bo,
ho = eo,
co = b,
do = bs({
type: "visualmap",
dependencies: ["series"],
statelist: ["inrange", "outofrange"],
replacableoptionkeys: ["inrange", "outofrange", "target", "controller", "color"],
databound: [ - 1 / 0, 1 / 0],
layoutmode: {
type: "box",
ignoresize: !0
},
defaultoption: {
show: !0,
zlevel: 0,
z: 4,
seriesindex: "all",
min: 0,
max: 200,
dimension: null,
inrange: null,
outofrange: null,
left: 0,
right: null,
top: null,
bottom: 0,
itemwidth: null,
itemheight: null,
inverse: !1,
orient: "vertical",
backgroundcolor: "rgba(0,0,0,0)",
bordercolor: "#ccc",
contentcolor: "#5793f3",
inactivecolor: "#aaa",
borderwidth: 0,
padding: 5,
textgap: 10,
precision: 0,
color: null,
formatter: null,
text: null,
textstyle: {
color: "#333"
}
},
init: function(t, e, i) {
this._dataextent,
this.targetvisuals = {},
this.controllervisuals = {},
this.textstylemodel,
this.itemsize,
this.mergedefaultandtheme(t, i)
},
optionupdated: function(t, e) {
var i = this.option;
z_.canvassupported || (i.realtime = !1),
!e && jv(i, t, this.replacableoptionkeys),
this.textstylemodel = this.getmodel("textstyle"),
this.resetitemsize(),
this.completevisualoption()
},
resetvisual: function(t) {
var e = this.statelist;
t = m(t, this),
this.controllervisuals = xv(this.option.controller, e, t),
this.targetvisuals = xv(this.option.target, e, t)
},
gettargetseriesindices: function() {
var t = this.option.seriesindex,
e = [];
return null == t || "all" === t ? this.ecmodel.eachseries(function(t, i) {
e.push(i)
}) : e = di(t),
e
},
eachtargetseries: function(t, e) {
d(this.gettargetseriesindices(),
function(i) {
t.call(e, this.ecmodel.getseriesbyindex(i))
},
this)
},
istargetseries: function(t) {
var e = !1;
return this.eachtargetseries(function(i) {
i === t && (e = !0)
}),
e
},
formatvaluetext: function(t, e, i) {
function n(t) {
return t === l[0] ? "min": t === l[1] ? "max": ( + t).tofixed(math.min(s, 20))
}
var o, a, r = this.option,
s = r.precision,
l = this.databound,
u = r.formatter;
return i = i || ["<", ">"],
y(t) && (t = t.slice(), o = !0),
a = e ? t: o ? [n(t[0]), n(t[1])] : n(t),
_(u) ? u.replace("{value}", o ? a[0] : a).replace("{value2}", o ? a[1] : a) : x(u) ? o ? u(t[0], t[1]) : u(t) : o ? t[0] === l[0] ? i[0] + " " + a[1] : t[1] === l[1] ? i[1] + " " + a[0] : a[0] + " - " + a[1] : a
},
resetextent: function() {
var t = this.option,
e = uo([t.min, t.max]);
this._dataextent = e
},
getdatadimension: function(t) {
var e = this.option.dimension,
i = t.dimensions;
if (null != e || i.length) {
if (null != e) return t.getdimension(e);
for (var n = t.dimensions,
o = n.length - 1; o >= 0; o--) {
var a = n[o];
if (!t.getdimensioninfo(a).iscalculationcoord) return a
}
}
},
getextent: function() {
return this._dataextent.slice()
},
completevisualoption: function() {
function t(t) {
so(o.color) && !t.inrange && (t.inrange = {
color: o.color.slice().reverse()
}),
t.inrange = t.inrange || {
color: e.get("gradientcolor")
},
lo(this.statelist,
function(e) {
var i = t[e];
if (_(i)) {
var n = no.get(i, "active", l);
n ? (t[e] = {},
t[e][i] = n) : delete t[e]
}
},
this)
}
var e = this.ecmodel,
o = this.option,
a = {
inrange: o.inrange,
outofrange: o.outofrange
},
r = o.target || (o.target = {}),
s = o.controller || (o.controller = {});
n(r, a),
n(s, a);
var l = this.iscategory();
t.call(this, r),
t.call(this, s),
function(t, e, i) {
var n = t[e],
o = t[i];
n && !o && (o = t[i] = {},
lo(n,
function(t, e) {
if (jc.isvalidtype(e)) {
var i = no.get(e, "inactive", l);
null != i && (o[e] = i, "color" !== e || o.hasownproperty("opacity") || o.hasownproperty("coloralpha") || (o.opacity = [0, 0]))
}
}))
}.call(this, r, "inrange", "outofrange"),
function(t) {
var e = (t.inrange || {}).symbol || (t.outofrange || {}).symbol,
n = (t.inrange || {}).symbolsize || (t.outofrange || {}).symbolsize,
o = this.get("inactivecolor");
lo(this.statelist,
function(a) {
var r = this.itemsize,
s = t[a];
s || (s = t[a] = {
color: l ? o: [o]
}),
null == s.symbol && (s.symbol = e && i(e) || (l ? "roundrect": ["roundrect"])),
null == s.symbolsize && (s.symbolsize = n && i(n) || (l ? r[0] : [r[0], r[0]])),
s.symbol = ao(s.symbol,
function(t) {
return "none" === t || "square" === t ? "roundrect": t
});
var u = s.symbolsize;
if (null != u) {
var h = -1 / 0;
ro(u,
function(t) {
t > h && (h = t)
}),
s.symbolsize = ao(u,
function(t) {
return ho(t, [0, h], [0, r[0]], !0)
})
}
},
this)
}.call(this, s)
},
resetitemsize: function() {
this.itemsize = [parsefloat(this.get("itemwidth")), parsefloat(this.get("itemheight"))]
},
iscategory: function() {
return !! this.option.categories
},
setselected: co,
getvaluestate: co,
getvisualmeta: co
}),
fo = [20, 140],
po = do.extend({
type: "visualmap.continuous",
defaultoption: {
align: "auto",
calculable: !1,
range: null,
realtime: !0,
itemheight: null,
itemwidth: null,
hoverlink: !0,
hoverlinkdatasize: null,
hoverlinkonhandle: null
},
optionupdated: function(t, e) {
po.superapply(this, "optionupdated", arguments),
this.resetextent(),
this.resetvisual(function(t) {
t.mappingmethod = "linear",
t.dataextent = this.getextent()
}),
this._resetrange()
},
resetitemsize: function() {
po.superapply(this, "resetitemsize", arguments);
var t = this.itemsize;
"horizontal" === this._orient && t.reverse(),
(null == t[0] || isnan(t[0])) && (t[0] = fo[0]),
(null == t[1] || isnan(t[1])) && (t[1] = fo[1])
},
_resetrange: function() {
var t = this.getextent(),
e = this.option.range; ! e || e.auto ? (t.auto = 1, this.option.range = t) : y(e) && (e[0] > e[1] && e.reverse(), e[0] = math.max(e[0], t[0]), e[1] = math.min(e[1], t[1]))
},
completevisualoption: function() {
do.prototype.completevisualoption.apply(this, arguments),
d(this.statelist,
function(t) {
var e = this.option.controller[t].symbolsize;
e && e[0] !== e[1] && (e[0] = 0)
},
this)
},
setselected: function(t) {
this.option.range = t.slice(),
this._resetrange()
},
getselected: function() {
var t = this.getextent(),
e = bo((this.get("range") || []).slice());
return e[0] > t[1] && (e[0] = t[1]),
e[1] > t[1] && (e[1] = t[1]),
e[0] < t[0] && (e[0] = t[0]),
e[1] < t[0] && (e[1] = t[0]),
e
},
getvaluestate: function(t) {
var e = this.option.range,
i = this.getextent();
return (e[0] <= i[0] || e[0] <= t) && (e[1] >= i[1] || t <= e[1]) ? "inrange": "outofrange"
},
findtargetdataindices: function(t) {
var e = [];
return this.eachtargetseries(function(i) {
var n = [],
o = i.getdata();
o.each(this.getdatadimension(o),
function(e, i) {
t[0] <= e && e <= t[1] && n.push(i)
},
this),
e.push({
seriesid: i.id,
dataindex: n
})
},
this),
e
},
getvisualmeta: function(t) {
function e(e, i) {
o.push({
value: e,
color: t(e, i)
})
}
for (var i = uy(0, 0, this.getextent()), n = uy(0, 0, this.option.range.slice()), o = [], a = 0, r = 0, s = n.length, l = i.length; r < l && (!n.length || i[r] <= n[0]); r++) i[r] < n[a] && e(i[r], "outofrange");
for (u = 1; a < s; a++, u = 0) u && o.length && e(n[a], "outofrange"),
e(n[a], "inrange");
for (var u = 1; r < l; r++)(!n.length || n[n.length - 1] < i[r]) && (u && (o.length && e(o[o.length - 1].value, "outofrange"), u = 0), e(i[r], "outofrange"));
var h = o.length;
return {
stops: o,
outercolors: [h ? o[0].color: "transparent", h ? o[h - 1].color: "transparent"]
}
}
}),
go = vs({
type: "visualmap",
autopositionvalues: {
left: 1,
right: 1,
top: 1,
bottom: 1
},
init: function(t, e) {
this.ecmodel = t,
this.api = e,
this.visualmapmodel
},
render: function(t, e, i, n) {
this.visualmapmodel = t,
!1 !== t.get("show") ? this.dorender.apply(this, arguments) : this.group.removeall()
},
renderbackground: function(t) {
var e = this.visualmapmodel,
i = om(e.get("padding") || 0),
n = t.getboundingrect();
t.add(new am({
z2: -1,
silent: !0,
shape: {
x: n.x - i[3],
y: n.y - i[0],
width: n.width + i[3] + i[1],
height: n.height + i[0] + i[2]
},
style: {
fill: e.get("backgroundcolor"),
stroke: e.get("bordercolor"),
linewidth: e.get("borderwidth")
}
}))
},
getcontrollervisual: function(t, e, i) {
function n(t) {
return s[t]
}
function o(t, e) {
s[t] = e
}
var a = (i = i || {}).forcestate,
r = this.visualmapmodel,
s = {};
if ("symbol" === e && (s.symbol = r.get("itemsymbol")), "color" === e) {
var l = r.get("contentcolor");
s.color = l
}
var u = r.controllervisuals[a || r.getvaluestate(t)];
return d(jc.preparevisualtypes(u),
function(a) {
var r = u[a];
i.convertopacitytoalpha && "opacity" === a && (a = "coloralpha", r = u.__alphaforopacity),
jc.dependson(a, e) && r && r.applyvisual(t, n, o)
}),
s[e]
},
positiongroup: function(t) {
var e = this.visualmapmodel,
i = this.api;
ua(t, e.getboxlayoutparams(), {
width: i.getwidth(),
height: i.getheight()
})
},
dorender: b
}),
mo = eo,
vo = d,
yo = math.min,
xo = math.max,
_o = 12,
wo = 6,
bo = go.extend({
type: "visualmap.continuous",
init: function() {
bo.superapply(this, "init", arguments),
this._shapes = {},
this._datainterval = [],
this._handleends = [],
this._orient,
this._usehandle,
this._hoverlinkdataindices = [],
this._dragging,
this._hovering
},
dorender: function(t, e, i, n) {
n && "selectdatarange" === n.type && n.from === this.uid || this._buildview()
},
_buildview: function() {
this.group.removeall();
var t = this.visualmapmodel,
e = this.group;
this._orient = t.get("orient"),
this._usehandle = t.get("calculable"),
this._resetinterval(),
this._renderbar(e);
var i = t.get("text");
this._renderendstext(e, i, 0),
this._renderendstext(e, i, 1),
this._updateview(!0),
this.renderbackground(e),
this._updateview(),
this._enablehoverlinktoseries(),
this._enablehoverlinkfromseries(),
this.positiongroup(e)
},
_renderendstext: function(t, e, i) {
if (e) {
var n = e[1 - i];
n = null != n ? n + "": "";
var o = this.visualmapmodel,
a = o.get("textgap"),
r = o.itemsize,
s = this._shapes.bargroup,
l = this._applytransform([r[0] / 2, 0 === i ? -a: r[1] + a], s),
u = this._applytransform(0 === i ? "bottom": "top", s),
h = this._orient,
c = this.visualmapmodel.textstylemodel;
this.group.add(new qs({
style: {
x: l[0],
y: l[1],
textverticalalign: "horizontal" === h ? "middle": u,
textalign: "horizontal" === h ? u: "center",
text: n,
textfont: c.getfont(),
textfill: c.gettextcolor()
}
}))
}
},
_renderbar: function(t) {
var e = this.visualmapmodel,
i = this._shapes,
n = e.itemsize,
o = this._orient,
a = this._usehandle,
r = xy(e, this.api, n),
s = i.bargroup = this._createbargroup(r);
s.add(i.outofrange = yy()),
s.add(i.inrange = yy(null, a ? qy(this._orient) : null, m(this._draghandle, this, "all", !1), m(this._draghandle, this, "all", !0)));
var l = e.textstylemodel.gettextrect("国"),
u = xo(l.width, l.height);
a && (i.handlethumbs = [], i.handlelabels = [], i.handlelabelpoints = [], this._createhandle(s, 0, n, u, o, r), this._createhandle(s, 1, n, u, o, r)),
this._createindicator(s, n, u, o),
t.add(s)
},
_createhandle: function(t, e, i, n, o) {
var a = m(this._draghandle, this, e, !1),
r = m(this._draghandle, this, e, !0),
s = yy(qy(e, n), qy(this._orient), a, r);
s.position[0] = i[0],
t.add(s);
var l = this.visualmapmodel.textstylemodel,
u = new qs({
draggable: !0,
drift: a,
onmousemove: function(t) {
lw(t.event)
},
ondragend: r,
style: {
x: 0,
y: 0,
text: "",
textfont: l.getfont(),
textfill: l.gettextcolor()
}
});
this.group.add(u);
var h = ["horizontal" === o ? n / 2 : 1.5 * n, "horizontal" === o ? 0 === e ? -1.5 * n: 1.5 * n: 0 === e ? -n / 2 : n / 2],
c = this._shapes;
c.handlethumbs[e] = s,
c.handlelabelpoints[e] = h,
c.handlelabels[e] = u
},
_createindicator: function(t, e, i, n) {
var o = yy([[0, 0]], "move");
o.position[0] = e[0],
o.attr({
invisible: !0,
silent: !0
}),
t.add(o);
var a = this.visualmapmodel.textstylemodel,
r = new qs({
silent: !0,
invisible: !0,
style: {
x: 0,
y: 0,
text: "",
textfont: a.getfont(),
textfill: a.gettextcolor()
}
});
this.group.add(r);
var s = ["horizontal" === n ? i / 2 : wo + 3, 0],
l = this._shapes;
l.indicator = o,
l.indicatorlabel = r,
l.indicatorlabelpoint = s
},
_draghandle: function(t, e, i, n) {
if (this._usehandle) {
if (this._dragging = !e, !e) {
var o = this._applytransform([i, n], this._shapes.bargroup, !0);
this._updateinterval(t, o[1]),
this._updateview()
}
e === !this.visualmapmodel.get("realtime") && this.api.dispatchaction({
type: "selectdatarange",
from: this.uid,
visualmapid: this.visualmapmodel.id,
selected: this._datainterval.slice()
}),
e ? !this._hovering && this._clearhoverlinktoseries() : jy(this.visualmapmodel) && this._dohoverlinktoseries(this._handleends[t], !1)
}
},
_resetinterval: function() {
var t = this.visualmapmodel,
e = this._datainterval = t.getselected(),
i = t.getextent(),
n = [0, t.itemsize[1]];
this._handleends = [mo(e[0], i, n, !0), mo(e[1], i, n, !0)]
},
_updateinterval: function(t, e) {
e = e || 0;
var i = this.visualmapmodel,
n = this._handleends,
o = [0, i.itemsize[1]];
el(e, n, o, t, 0);
var a = i.getextent();
this._datainterval = [mo(n[0], o, a, !0), mo(n[1], o, a, !0)]
},
_updateview: function(t) {
var e = this.visualmapmodel,
i = e.getextent(),
n = this._shapes,
o = [0, e.itemsize[1]],
a = t ? o: this._handleends,
r = this._createbarvisual(this._datainterval, i, a, "inrange"),
s = this._createbarvisual(i, i, o, "outofrange");
n.inrange.setstyle({
fill: r.barcolor,
opacity: r.opacity
}).setshape("points", r.barpoints),
n.outofrange.setstyle({
fill: s.barcolor,
opacity: s.opacity
}).setshape("points", s.barpoints),
this._updatehandle(a, r)
},
_createbarvisual: function(t, e, i, n) {
var o = {
forcestate: n,
convertopacitytoalpha: !0
},
a = this._makecolorgradient(t, o),
r = [this.getcontrollervisual(t[0], "symbolsize", o), this.getcontrollervisual(t[1], "symbolsize", o)],
s = this._createbarpoints(i, r);
return {
barcolor: new dm(0, 0, 0, 1, a),
barpoints: s,
handlescolor: [a[0].color, a[a.length - 1].color]
}
},
_makecolorgradient: function(t, e) {
var i = [],
n = (t[1] - t[0]) / 100;
i.push({
color: this.getcontrollervisual(t[0], "color", e),
offset: 0
});
for (var o = 1; o < 100; o++) {
var a = t[0] + n * o;
if (a > t[1]) break;
i.push({
color: this.getcontrollervisual(a, "color", e),
offset: o / 100
})
}
return i.push({
color: this.getcontrollervisual(t[1], "color", e),
offset: 1
}),
i
},
_createbarpoints: function(t, e) {
var i = this.visualmapmodel.itemsize;
return [[i[0] - e[0], t[0]], [i[0], t[0]], [i[0], t[1]], [i[0] - e[1], t[1]]]
},
_createbargroup: function(t) {
var e = this._orient,
i = this.visualmapmodel.get("inverse");
return new zw("horizontal" !== e || i ? "horizontal" === e && i ? {
scale: "bottom" === t ? [ - 1, 1] : [1, 1],
rotation: -math.pi / 2
}: "vertical" !== e || i ? {
scale: "left" === t ? [1, 1] : [ - 1, 1]
}: {
scale: "left" === t ? [1, -1] : [ - 1, -1]
}: {
scale: "bottom" === t ? [1, 1] : [ - 1, 1],
rotation: math.pi / 2
})
},
_updatehandle: function(t, e) {
if (this._usehandle) {
var i = this._shapes,
n = this.visualmapmodel,
o = i.handlethumbs,
a = i.handlelabels;
vo([0, 1],
function(r) {
var s = o[r];
s.setstyle("fill", e.handlescolor[r]),
s.position[1] = t[r];
var l = io(i.handlelabelpoints[r], mo(s, this.group));
a[r].setstyle({
x: l[0],
y: l[1],
text: n.formatvaluetext(this._datainterval[r]),
textverticalalign: "middle",
textalign: this._applytransform("horizontal" === this._orient ? 0 === r ? "bottom": "top": "left", i.bargroup)
})
},
this)
}
},
_showindicator: function(t, e, i, n) {
var o = this.visualmapmodel,
a = o.getextent(),
r = o.itemsize,
s = [0, r[1]],
l = mo(t, a, s, !0),
u = this._shapes,
h = u.indicator;
if (h) {
h.position[1] = l,
h.attr("invisible", !1),
h.setshape("points", ky( !! i, n, l, r[1]));
var c = {
convertopacitytoalpha: !0
},
d = this.getcontrollervisual(t, "color", c);
h.setstyle("fill", d);
var f = io(u.indicatorlabelpoint, mo(h, this.group)),
p = u.indicatorlabel;
p.attr("invisible", !1);
var g = this._applytransform("left", u.bargroup),
m = this._orient;
p.setstyle({
text: (i || "") + o.formatvaluetext(e),
textverticalalign: "horizontal" === m ? g: "middle",
textalign: "horizontal" === m ? "center": g,
x: f[0],
y: f[1]
})
}
},
_enablehoverlinktoseries: function() {
var t = this;
this._shapes.bargroup.on("mousemove",
function(e) {
if (t._hovering = !0, !t._dragging) {
var i = t.visualmapmodel.itemsize,
n = t._applytransform([e.offsetx, e.offsety], t._shapes.bargroup, !0, !0);
n[1] = yo(xo(0, n[1]), i[1]),
t._dohoverlinktoseries(n[1], 0 <= n[0] && n[0] <= i[0])
}
}).on("mouseout",
function() {
t._hovering = !1,
!t._dragging && t._clearhoverlinktoseries()
})
},
_enablehoverlinkfromseries: function() {
var t = this.api.getzr();
this.visualmapmodel.option.hoverlink ? (t.on("mouseover", this._hoverlinkfromseriesmouseover, this), t.on("mouseout", this._hideindicator, this)) : this._clearhoverlinkfromseries()
},
_dohoverlinktoseries: function(t, e) {
var i = this.visualmapmodel,
n = i.itemsize;
if (i.option.hoverlink) {
var o = [0, n[1]],
a = i.getextent();
t = yo(xo(o[0], t), o[1]);
var r = $y(i, a, o),
s = [t - r, t + r],
l = mo(t, o, a, !0),
u = [mo(s[0], o, a, !0), mo(s[1], o, a, !0)];
s[0] < o[0] && (u[0] = -1 / 0),
s[1] > o[1] && (u[1] = 1 / 0),
e && (u[0] === -1 / 0 ? this._showindicator(l, u[1], "< ", r) : u[1] === 1 / 0 ? this._showindicator(l, u[0], "> ", r) : this._showindicator(l, l, "≈ ", r));
var h = this._hoverlinkdataindices,
c = []; (e || jy(i)) && (c = this._hoverlinkdataindices = i.findtargetdataindices(u));
var d = ri(h, c);
this._dispatchhighdown("downplay", jy(d[0])),
this._dispatchhighdown("highlight", jy(d[1]))
}
},
_hoverlinkfromseriesmouseover: function(t) {
var e = t.target,
i = this.visualmapmodel;
if (e && null != e.dataindex) {
var n = this.ecmodel.getseriesbyindex(e.seriesindex);
if (i.istargetseries(n)) {
var o = n.getdata(e.datatype),
a = o.get(i.getdatadimension(o), e.dataindex, !0);
isnan(a) || this._showindicator(a, a)
}
}
},
_hideindicator: function() {
var t = this._shapes;
t.indicator && t.indicator.attr("invisible", !0),
t.indicatorlabel && t.indicatorlabel.attr("invisible", !0)
},
_clearhoverlinktoseries: function() {
this._hideindicator();
var t = this._hoverlinkdataindices;
this._dispatchhighdown("downplay", jy(t)),
t.length = 0
},
_clearhoverlinkfromseries: function() {
this._hideindicator();
var t = this.api.getzr();
t.off("mouseover", this._hoverlinkfromseriesmouseover),
t.off("mouseout", this._hideindicator)
},
_applytransform: function(t, e, i, n) {
var o = mo(e, n ? null: this.group);
return bm[y(t) ? "applytransform": "transformdirection"](t, o, i)
},
_dispatchhighdown: function(t, e) {
e && e.length && this.api.dispatchaction({
type: t,
batch: e
})
},
dispose: function() {
this._clearhoverlinkfromseries(),
this._clearhoverlinktoseries()
},
remove: function() {
this._clearhoverlinkfromseries(),
this._clearhoverlinktoseries()
}
});
ps({
type: "selectdatarange",
event: "datarangeselected",
update: "update"
},
function(t, e) {
e.eachcomponent({
maintype: "visualmap",
query: t
},
function(e) {
e.setselected(t.selected)
})
}),
ls(eo);
var so = do.extend({
type: "visualmap.piecewise",
defaultoption: {
selected: null,
minopen: !1,
maxopen: !1,
align: "auto",
itemwidth: 20,
itemheight: 14,
itemsymbol: "roundrect",
piecelist: null,
categories: null,
splitnumber: 5,
selectedmode: "multiple",
itemgap: 10,
hoverlink: !0,
showlabel: null
},
optionupdated: function(t, e) {
so.superapply(this, "optionupdated", arguments),
this._piecelist = [],
this.resetextent();
var n = this._mode = this._determinemode();
mo[this._mode].call(this),
this._resetselected(t, e);
var o = this.option.categories;
this.resetvisual(function(t, e) {
"categories" === n ? (t.mappingmethod = "category", t.categories = i(o)) : (t.dataextent = this.getextent(), t.mappingmethod = "piecewise", t.piecelist = f(this._piecelist,
function(t) {
var t = i(t);
return "inrange" !== e && (t.visual = null),
t
}))
})
},
completevisualoption: function() {
function t(t, e, i) {
return t && t[e] && (w(t[e]) ? t[e].hasownproperty(i) : t[e] === i)
}
var e = this.option,
i = {},
n = jc.listvisualtypes(),
o = this.iscategory();
d(e.pieces,
function(t) {
d(n,
function(e) {
t.hasownproperty(e) && (i[e] = 1)
})
}),
d(i,
function(i, n) {
var a = 0;
d(this.statelist,
function(i) {
a |= t(e, i, n) || t(e.target, i, n)
},
this),
!a && d(this.statelist,
function(t) { (e[t] || (e[t] = {}))[n] = no.get(n, "inrange" === t ? "active": "inactive", o)
})
},
this),
do.prototype.completevisualoption.apply(this, arguments)
},
_resetselected: function(t, e) {
var i = this.option,
n = this._piecelist,
o = (e ? i: t).selected || {};
if (i.selected = o, d(n,
function(t, e) {
var i = this.getselectedmapkey(t);
o.hasownproperty(i) || (o[i] = !0)
},
this), "single" === i.selectedmode) {
var a = !1;
d(n,
function(t, e) {
var i = this.getselectedmapkey(t);
o[i] && (a ? o[i] = !1 : a = !0)
},
this)
}
},
getselectedmapkey: function(t) {
return "categories" === this._mode ? t.value + "": t.index + ""
},
getpiecelist: function() {
return this._piecelist
},
_determinemode: function() {
var t = this.option;
return t.pieces && t.pieces.length > 0 ? "pieces": this.option.categories ? "categories": "splitnumber"
},
setselected: function(t) {
this.option.selected = i(t)
},
getvaluestate: function(t) {
var e = jc.findpieceindex(t, this._piecelist);
return null != e && this.option.selected[this.getselectedmapkey(this._piecelist[e])] ? "inrange": "outofrange"
},
findtargetdataindices: function(t) {
var e = [];
return this.eachtargetseries(function(i) {
var n = [],
o = i.getdata();
o.each(this.getdatadimension(o),
function(e, i) {
jc.findpieceindex(e, this._piecelist) === t && n.push(i)
},
this),
e.push({
seriesid: i.id,
dataindex: n
})
},
this),
e
},
getrepresentvalue: function(t) {
var e;
if (this.iscategory()) e = t.value;
else if (null != t.value) e = t.value;
else {
var i = t.interval || [];
e = i[0] === -1 / 0 && i[1] === 1 / 0 ? 0 : (i[0] + i[1]) / 2
}
return e
},
getvisualmeta: function(t) {
function e(e, a) {
var r = o.getrepresentvalue({
interval: e
});
a || (a = o.getvaluestate(r));
var s = t(r, a);
e[0] === -1 / 0 ? n[0] = s: e[1] === 1 / 0 ? n[1] = s: i.push({
value: e[0],
color: s
},
{
value: e[1],
color: s
})
}
if (!this.iscategory()) {
var i = [],
n = [],
o = this,
a = this._piecelist.slice();
if (a.length) {
var r = a[0].interval[0];
r !== -1 / 0 && a.unshift({
interval: [ - 1 / 0, r]
}),
(r = a[a.length - 1].interval[1]) !== 1 / 0 && a.push({
interval: [r, 1 / 0]
})
} else a.push({
interval: [ - 1 / 0, 1 / 0]
});
var s = -1 / 0;
return d(a,
function(t) {
var i = t.interval;
i && (i[0] > s && e([s, i[0]], "outofrange"), e(i.slice()), s = i[1])
},
this),
{
stops: i,
outercolors: n
}
}
}
}),
mo = {
splitnumber: function() {
var t = this.option,
e = this._piecelist,
i = math.min(t.precision, 20),
n = this.getextent(),
o = t.splitnumber;
o = math.max(parseint(o, 10), 1),
t.splitnumber = o;
for (var a = (n[1] - n[0]) / o; + a.tofixed(i) !== a && i < 5;) i++;
t.precision = i,
a = +a.tofixed(i);
var r = 0;
t.minopen && e.push({
index: r++,
interval: [ - 1 / 0, n[0]],
close: [0, 0]
});
for (var s = n[0], l = r + o; r < l; s += a) {
var u = r === o - 1 ? n[1] : s + a;
e.push({
index: r++,
interval: [s, u],
close: [1, 1]
})
}
t.maxopen && e.push({
index: r++,
interval: [n[1], 1 / 0],
close: [0, 0]
}),
qo(e),
d(e,
function(t) {
t.text = this.formatvaluetext(t.interval)
},
this)
},
categories: function() {
var t = this.option;
d(t.categories,
function(t) {
this._piecelist.push({
text: this.formatvaluetext(t, !0),
value: t
})
},
this),
tx(t, this._piecelist)
},
pieces: function() {
var t = this.option,
e = this._piecelist;
d(t.pieces,
function(t, i) {
w(t) || (t = {
value: t
});
var n = {
text: "",
index: i
};
if (null != t.label && (n.text = t.label), t.hasownproperty("value")) {
var o = n.value = t.value;
n.interval = [o, o],
n.close = [1, 1]
} else {
for (var a = n.interval = [], r = n.close = [0, 0], s = [1, 0, 1], l = [ - 1 / 0, 1 / 0], u = [], h = 0; h < 2; h++) {
for (var c = [["gte", "gt", "min"], ["lte", "lt", "max"]][h], d = 0; d < 3 && null == a[h]; d++) a[h] = t[c[d]],
r[h] = s[d],
u[h] = 2 === d;
null == a[h] && (a[h] = l[h])
}
u[0] && a[1] === 1 / 0 && (r[0] = 0),
u[1] && a[0] === -1 / 0 && (r[1] = 0),
a[0] === a[1] && r[0] && r[1] && (n.value = a[0])
}
n.visual = jc.retrievevisuals(t),
e.push(n)
},
this),
tx(t, e),
qo(e),
d(e,
function(t) {
var e = t.close,
i = [["<", "≤"][e[1]], [">", "≥"][e[0]]];
t.text = t.text || this.formatvaluetext(null != t.value ? t.value: t.interval, !1, i)
},
this)
}
};
go.extend({
type: "visualmap.piecewise",
dorender: function() {
var t = this.group;
t.removeall();
var e = this.visualmapmodel,
i = e.get("textgap"),
n = e.textstylemodel,
o = n.getfont(),
a = n.gettextcolor(),
r = this._getitemalign(),
s = e.itemsize,
l = this._getviewdata(),
u = l.endstext,
h = t(e.get("showlabel", !0), !u);
u && this._renderendstext(t, u[0], s, h, r),
d(l.viewpiecelist,
function(n) {
var l = n.piece,
u = new zw;
u.onclick = m(this._onitemclick, this, l),
this._enablehoverlink(u, n.indexinmodelpiecelist);
var c = e.getrepresentvalue(l);
if (this._createitemsymbol(u, c, [0, 0, s[0], s[1]]), h) {
var d = this.visualmapmodel.getvaluestate(c);
u.add(new qs({
style: {
x: "right" === r ? -i: s[0] + i,
y: s[1] / 2,
text: l.text,
textverticalalign: "middle",
textalign: r,
textfont: o,
textfill: a,
opacity: "outofrange" === d ? .5 : 1
}
}))
}
t.add(u)
},
this),
u && this._renderendstext(t, u[1], s, h, r),
um(e.get("orient"), t, e.get("itemgap")),
this.renderbackground(t),
this.positiongroup(t)
},
_enablehoverlink: function(t, e) {
function i(t) {
var i = this.visualmapmodel;
i.option.hoverlink && this.api.dispatchaction({
type: t,
batch: jy(i.findtargetdataindices(e))
})
}
t.on("mouseover", m(i, this, "highlight")).on("mouseout", m(i, this, "downplay"))
},
_getitemalign: function() {
var t = this.visualmapmodel,
e = t.option;
if ("vertical" === e.orient) return xy(t, this.api, t.itemsize);
var i = e.align;
return i && "auto" !== i || (i = "left"),
i
},
_renderendstext: function(t, e, i, n, o) {
if (e) {
var a = new zw,
r = this.visualmapmodel.textstylemodel;
a.add(new qs({
style: {
x: n ? "right" === o ? i[0] : 0 : i[0] / 2,
y: i[1] / 2,
textverticalalign: "middle",
textalign: n ? o: "center",
text: e,
textfont: r.getfont(),
textfill: r.gettextcolor()
}
})),
t.add(a)
}
},
_getviewdata: function() {
var t = this.visualmapmodel,
e = f(t.getpiecelist(),
function(t, e) {
return {
piece: t,
indexinmodelpiecelist: e
}
}),
i = t.get("text"),
n = t.get("orient"),
o = t.get("inverse");
return ("horizontal" === n ? o: !o) ? e.reverse() : i && (i = i.slice().reverse()),
{
viewpiecelist: e,
endstext: i
}
},
_createitemsymbol: function(t, e, i) {
t.add(xl(this.getcontrollervisual(e, "symbol"), i[0], i[1], i[2], i[3], this.getcontrollervisual(e, "color")))
},
_onitemclick: function(t) {
var e = this.visualmapmodel,
n = e.option,
o = i(n.selected),
a = e.getselectedmapkey(t);
"single" === n.selectedmode ? (o[a] = !0, d(o,
function(t, e) {
o[e] = e === a
})) : o[a] = !o[a],
this.api.dispatchaction({
type: "selectdatarange",
from: this.uid,
visualmapid: this.visualmapmodel.id,
selected: o
})
}
});
ls(eo);
var io = $o,
to = qo,
ao = bs({
type: "marker",
dependencies: ["series", "grid", "polar", "geo"],
init: function(t, e, i, n) {
this.mergedefaultandtheme(t, i),
this.mergeoption(t, i, n.createdbyself, !0)
},
isanimationenabled: function() {
if (z_.node) return ! 1;
var t = this.__hostseries;
return this.getshallow("animation") && t && t.isanimationenabled()
},
mergeoption: function(t, e, i, n) {
var o = this.constructor,
r = this.maintype + "model";
i || e.eachseries(function(t) {
var i = t.get(this.maintype, !0),
s = t[r];
i && i.data ? (s ? s.mergeoption(i, e, !0) : (n && ex(i), d(i.data,
function(t) {
t instanceof array ? (ex(t[0]), ex(t[1])) : ex(t)
}), a(s = new o(i, this, e), {
maintype: this.maintype,
seriesindex: t.seriesindex,
name: t.name,
createdbyself: !0
}), s.__hostseries = t), t[r] = s) : t[r] = null
},
this)
},
formattooltip: function(t) {
var e = this.getdata(),
i = this.getrawvalue(t),
n = y(i) ? f(i, io).join(", ") : io(i),
o = e.getname(t),
a = to(this.name);
return (null != i || o) && (a += "
"),
o && (a += to(o), null != i && (a += " : ")),
null != i && (a += to(n)),
a
},
getdata: function() {
return this._data
},
setdata: function(t) {
this._data = t
}
});
h(ao, li),
ao.extend({
type: "markpoint",
defaultoption: {
zlevel: 0,
z: 5,
symbol: "pin",
symbolsize: 50,
tooltip: {
trigger: "item"
},
label: {
show: !0,
position: "inside"
},
itemstyle: {
borderwidth: 2
},
emphasis: {
label: {
show: !0
}
}
}
});
var do = l,
co = v,
lo = {
min: co(ox, "min"),
max: co(ox, "max"),
average: co(ox, "average")
},
ko = vs({
type: "marker",
init: function() {
this.markergroupmap = r()
},
render: function(t, e, i) {
var n = this.markergroupmap;
n.each(function(t) {
t.__keep = !1
});
var o = this.type + "model";
e.eachseries(function(t) {
var n = t[o];
n && this.renderseries(t, n, e, i)
},
this),
n.each(function(t) { ! t.__keep && this.group.remove(t.group)
},
this)
},
renderseries: function() {}
});
ko.extend({
type: "markpoint",
updatetransform: function(t, e, i) {
e.eachseries(function(t) {
var e = t.markpointmodel;
e && (cx(e.getdata(), t, i), this.markergroupmap.get(t.id).updatelayout(e))
},
this)
},
renderseries: function(t, e, i, n) {
var o = t.coordinatesystem,
a = t.id,
r = t.getdata(),
s = this.markergroupmap,
l = s.get(a) || s.set(a, new su),
u = dx(o, t, e);
e.setdata(u),
cx(e.getdata(), t, n),
u.each(function(t) {
var i = u.getitemmodel(t),
n = i.getshallow("symbolsize");
"function" == typeof n && (n = n(e.getrawvalue(t), e.getdataparams(t))),
u.setitemvisual(t, {
symbolsize: n,
color: i.get("itemstyle.color") || r.getvisual("color"),
symbol: i.getshallow("symbol")
})
}),
l.updatedata(u),
this.group.add(l.group),
u.eachitemgraphicel(function(t) {
t.traverse(function(t) {
t.datamodel = e
})
}),
l.__keep = !0,
l.group.silent = e.get("silent") || t.get("silent")
}
}),
ls(function(t) {
t.markpoint = t.markpoint || {}
}),
ao.extend({
type: "markline",
defaultoption: {
zlevel: 0,
z: 5,
symbol: ["circle", "arrow"],
symbolsize: [8, 16],
precision: 2,
tooltip: {
trigger: "item"
},
label: {
show: !0,
position: "end"
},
linestyle: {
type: "dashed"
},
emphasis: {
label: {
show: !0
},
linestyle: {
width: 3
}
},
animationeasing: "linear"
}
});
var po = function(t, e, o, r) {
var s = t.getdata(),
l = r.type;
if (!y(r) && ("min" === l || "max" === l || "average" === l || "median" === l || null != r.xaxis || null != r.yaxis)) {
var u, h;
if (null != r.yaxis || null != r.xaxis) u = null != r.yaxis ? "y": "x",
e.getaxis(u),
h = t(r.yaxis, r.xaxis);
else {
var c = rx(r, s, e, t);
u = c.valuedatadim,
c.valueaxis,
h = hx(s, u, l)
}
var d = "x" === u ? 0 : 1,
f = 1 - d,
p = i(r),
g = {};
p.type = null,
p.coord = [],
g.coord = [],
p.coord[f] = -1 / 0,
g.coord[f] = 1 / 0;
var m = o.get("precision");
m >= 0 && "number" == typeof h && (h = +h.tofixed(math.min(m, 20))),
p.coord[d] = g.coord[d] = h,
r = [p, g, {
type: l,
valueindex: r.valueindex,
value: h
}]
}
return r = [ax(t, r[0]), ax(t, r[1]), a({},
r[2])],
r[2].type = r[2].type || "",
n(r[2], r[0]),
n(r[2], r[1]),
r
};
ko.extend({
type: "markline",
updatetransform: function(t, e, i) {
e.eachseries(function(t) {
var e = t.marklinemodel;
if (e) {
var n = e.getdata(),
o = e.__from,
a = e.__to;
o.each(function(e) {
mx(o, e, !0, t, i),
mx(a, e, !1, t, i)
}),
n.each(function(t) {
n.setitemlayout(t, [o.getitemlayout(t), a.getitemlayout(t)])
}),
this.markergroupmap.get(t.id).updatelayout()
}
},
this)
},
renderseries: function(t, e, i, n) {
function o(e, i, o) {
var a = e.getitemmodel(i);
mx(e, i, o, t, n),
e.setitemvisual(i, {
symbolsize: a.get("symbolsize") || g[o ? 0 : 1],
symbol: a.get("symbol", !0) || p[o ? 0 : 1],
color: a.get("itemstyle.color") || s.getvisual("color")
})
}
var a = t.coordinatesystem,
r = t.id,
s = t.getdata(),
l = this.markergroupmap,
u = l.get(r) || l.set(r, new jd);
this.group.add(u.group);
var h = vx(a, t, e),
c = h.from,
d = h.to,
f = h.line;
e.__from = c,
e.__to = d,
e.setdata(f);
var p = e.get("symbol"),
g = e.get("symbolsize");
y(p) || (p = [p, p]),
"number" == typeof g && (g = [g, g]),
h.from.each(function(t) {
o(c, t, !0),
o(d, t, !1)
}),
f.each(function(t) {
var e = f.getitemmodel(t).get("linestyle.color");
f.setitemvisual(t, {
color: e || c.getitemvisual(t, "color")
}),
f.setitemlayout(t, [c.getitemlayout(t), d.getitemlayout(t)]),
f.setitemvisual(t, {
fromsymbolsize: c.getitemvisual(t, "symbolsize"),
fromsymbol: c.getitemvisual(t, "symbol"),
tosymbolsize: d.getitemvisual(t, "symbolsize"),
tosymbol: d.getitemvisual(t, "symbol")
})
}),
u.updatedata(f),
h.line.eachitemgraphicel(function(t, i) {
t.traverse(function(t) {
t.datamodel = e
})
}),
u.__keep = !0,
u.group.silent = e.get("silent") || t.get("silent")
}
}),
ls(function(t) {
t.markline = t.markline || {}
}),
ao.extend({
type: "markarea",
defaultoption: {
zlevel: 0,
z: 1,
tooltip: {
trigger: "item"
},
animation: !1,
label: {
show: !0,
position: "top"
},
itemstyle: {
borderwidth: 0
},
emphasis: {
label: {
show: !0,
position: "top"
}
}
}
});
var no = function(t, e, i, n) {
var a = ax(t, n[0]),
r = ax(t, n[1]),
s = t,
l = a.coord,
u = r.coord;
l[0] = s(l[0], -1 / 0),
l[1] = s(l[1], -1 / 0),
u[0] = s(u[0], 1 / 0),
u[1] = s(u[1], 1 / 0);
var h = o([{},
a, r]);
return h.coord = [a.coord, r.coord],
h.x0 = a.x,
h.y0 = a.y,
h.x1 = r.x,
h.y1 = r.y,
h
},
oo = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]];
ko.extend({
type: "markarea",
updatetransform: function(t, e, i) {
e.eachseries(function(t) {
var e = t.markareamodel;
if (e) {
var n = e.getdata();
n.each(function(e) {
var o = f(oo,
function(o) {
return bx(n, e, o, t, i)
});
n.setitemlayout(e, o),
n.getitemgraphicel(e).setshape("points", o)
})
}
},
this)
},
renderseries: function(t, e, i, n) {
var o = t.coordinatesystem,
a = t.id,
s = t.getdata(),
l = this.markergroupmap,
u = l.get(a) || l.set(a, {
group: new zw
});
this.group.add(u.group),
u.__keep = !0;
var h = sx(o, t, e);
e.setdata(h),
h.each(function(e) {
h.setitemlayout(e, f(oo,
function(i) {
return bx(h, e, i, t, n)
})),
h.setitemvisual(e, {
color: s.getvisual("color")
})
}),
h.diff(u.__data).add(function(t) {
var e = new nm({
shape: {
points: h.getitemlayout(t)
}
});
h.setitemgraphicel(t, e),
u.group.add(e)
}).update(function(t, i) {
var n = u.__data.getitemgraphicel(i);
bo(n, {
shape: {
points: h.getitemlayout(t)
}
},
e, t),
u.group.add(n),
h.setitemgraphicel(t, n)
}).remove(function(t) {
var e = u.__data.getitemgraphicel(t);
u.group.remove(e)
}).execute(),
h.eachitemgraphicel(function(t, i) {
var n = h.getitemmodel(i),
o = n.getmodel("label"),
a = n.getmodel("emphasis.label"),
s = h.getitemvisual(i, "color");
t.usestyle(r(n.getmodel("itemstyle").getitemstyle(), {
fill: ut(s, .4),
stroke: s
})),
t.hoverstyle = n.getmodel("emphasis.itemstyle").getitemstyle(),
co(t.style, t.hoverstyle, o, a, {
labelfetcher: e,
labeldataindex: i,
defaulttext: h.getname(i) || "",
isrecttext: !0,
autocolor: s
}),
uo(t, {}),
t.datamodel = e
}),
u.__data = h,
u.group.silent = e.get("silent") || t.get("silent")
}
}),
ls(function(t) {
t.markarea = t.markarea || {}
});
ym.registersubtypedefaulter("timeline",
function() {
return "slider"
}),
ps({
type: "timelinechange",
event: "timelinechanged",
update: "prepareandupdate"
},
function(t, e) {
var i = e.getcomponent("timeline");
return i && null != t.currentindex && (i.setcurrentindex(t.currentindex), !i.get("loop", !0) && i.isindexmax() && i.setplaystate(!1)),
e.resetoption("timeline"),
r({
currentindex: i.option.currentindex
},
t)
}),
ps({
type: "timelineplaychange",
event: "timelineplaychanged",
update: "update"
},
function(t, e) {
var i = e.getcomponent("timeline");
i && null != t.playstate && i.setplaystate(t.playstate)
});
var eo = ym.extend({
type: "timeline",
layoutmode: "box",
defaultoption: {
zlevel: 0,
z: 4,
show: !0,
axistype: "time",
realtime: !0,
left: "20%",
top: null,
right: "20%",
bottom: 0,
width: null,
height: 40,
padding: 5,
controlposition: "left",
autoplay: !1,
rewind: !1,
loop: !0,
playinterval: 2e3,
currentindex: 0,
itemstyle: {},
label: {
color: "#000"
},
data: []
},
init: function(t, e, i) {
this._data,
this._names,
this.mergedefaultandtheme(t, i),
this._initdata()
},
mergeoption: function(t) {
eo.superapply(this, "mergeoption", arguments),
this._initdata()
},
setcurrentindex: function(t) {
null == t && (t = this.option.currentindex);
var e = this._data.count();
this.option.loop ? t = (t % e + e) % e: (t >= e && (t = e - 1), t < 0 && (t = 0)),
this.option.currentindex = t
},
getcurrentindex: function() {
return this.option.currentindex
},
isindexmax: function() {
return this.getcurrentindex() >= this._data.count() - 1
},
setplaystate: function(t) {
this.option.autoplay = !!t
},
getplaystate: function() {
return !! this.option.autoplay
},
_initdata: function() {
var t = this.option,
e = t.data || [],
n = t.axistype,
o = this._names = [];
if ("category" === n) {
var a = [];
d(e,
function(t, e) {
var n, r = li(t);
w(t) ? (n = i(t)).value = e: n = e,
a.push(n),
_(r) || null != r && !isnan(r) || (r = ""),
o.push(r + "")
}),
e = a
}
var r = {
category: "ordinal",
time: "time"
} [n] || "number"; (this._data = new ea([{
name: "value",
type: r
}], this)).initdata(e, o)
},
getdata: function() {
return this._data
},
getcategories: function() {
if ("category" === this.get("axistype")) return this._names.slice()
}
});
h(eo.extend({
type: "timeline.slider",
defaultoption: {
backgroundcolor: "rgba(0,0,0,0)",
bordercolor: "#ccc",
borderwidth: 0,
orient: "horizontal",
inverse: !1,
tooltip: {
trigger: "item"
},
symbol: "emptycircle",
symbolsize: 10,
linestyle: {
show: !0,
width: 2,
color: "#304654"
},
label: {
position: "auto",
show: !0,
interval: "auto",
rotate: 0,
color: "#304654"
},
itemstyle: {
color: "#304654",
borderwidth: 1
},
checkpointstyle: {
symbol: "circle",
symbolsize: 13,
color: "#c23531",
borderwidth: 5,
bordercolor: "rgba(194,53,49, 0.5)",
animation: !0,
animationduration: 300,
animationeasing: "quinticinout"
},
controlstyle: {
show: !0,
showplaybtn: !0,
showprevbtn: !0,
shownextbtn: !0,
itemsize: 22,
itemgap: 12,
position: "left",
playicon: "path://m31.6,53c17.5,53,6,41.5,6,27.4s17.5,1.8,31.6,1.8c45.7,1.8,57.2,13.3,57.2,27.4s45.7,53,31.6,53z m31.6,3.3 c18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1c44.9,51.5,55.7,40.7,55.7,27.4c55.7,14.1,44.9,3.3,31.6,3.3z m24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2v21.3z",
stopicon: "path://m30.9,53.2c16.8,53.2,5.3,41.7,5.3,27.6s16.8,2,30.9,2c45,2,56.4,13.5,56.4,27.6s45,53.2,30.9,53.2z m30.9,3.5c17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1c44.2,51.7,55,40.9,55,27.6c54.9,14.4,44.1,3.5,30.9,3.5z m36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1v19.5c0-0.6,0.4-1,0.9-1h36c0.5,0,0.9,0.4,0.9,1v35.8z m27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1v19.5c0-0.6,0.4-1,0.9-1h27c0.5,0,0.9,0.4,0.9,1l27.8,35.8l27.8,35.8z",
nexticon: "path://m18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7l18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1l19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8c18.4,51.2,18.5,51,18.6,50.8z",
previcon: "path://m43,52.8l20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7l42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3l18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1l41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8c43.2,53.2,43.1,53,43,52.8z",
color: "#304654",
bordercolor: "#304654",
borderwidth: 1
},
emphasis: {
label: {
show: !0,
color: "#c23531"
},
itemstyle: {
color: "#c23531"
},
controlstyle: {
color: "#c23531",
bordercolor: "#c23531",
borderwidth: 2
}
},
data: []
}
}), li);
var ro = ei.extend({
type: "timeline"
}),
zo = function(t, e, i, n) {
ha.call(this, t, e, i),
this.type = n || "value",
this.model = null
};
zo.prototype = {
constructor: zo,
getlabelmodel: function() {
return this.model.getmodel("label")
},
ishorizontal: function() {
return "horizontal" === this.model.get("orient")
}
},
u(zo, ha);
var bo = m,
vo = d,
go = math.pi;
ro.extend({
type: "timeline.slider",
init: function(t, e) {
this.api = e,
this._axis,
this._viewrect,
this._timer,
this._currentpointer,
this._maingroup,
this._labelgroup
},
render: function(t, e, i, n) {
if (this.model = t, this.api = i, this.ecmodel = e, this.group.removeall(), t.get("show", !0)) {
var o = this._layout(t, i),
a = this._creategroup("maingroup"),
r = this._creategroup("labelgroup"),
s = this._axis = this._createaxis(o, t);
t.formattooltip = function(t) {
return qo(s.scale.getlabel(t))
},
vo(["axisline", "axistick", "control", "currentpointer"],
function(e) {
this["_render" + e](o, a, s, t)
},
this),
this._renderaxislabel(o, r, s, t),
this._position(o, t)
}
this._doplaystop()
},
remove: function() {
this._cleartimer(),
this.group.removeall()
},
dispose: function() {
this._cleartimer()
},
_layout: function(t, e) {
var i = t.get("label.position"),
n = t.get("orient"),
o = ax(t, e);
null == i || "auto" === i ? i = "horizontal" === n ? o.y + o.height / 2 < e.getheight() / 2 ? "-": "+": o.x + o.width / 2 < e.getwidth() / 2 ? "+": "-": isnan(i) && (i = {
horizontal: {
top: "-",
bottom: "+"
},
vertical: {
left: "-",
right: "+"
}
} [n][i]);
var a = {
horizontal: "center",
vertical: i >= 0 || "+" === i ? "left": "right"
},
r = {
horizontal: i >= 0 || "+" === i ? "top": "bottom",
vertical: "middle"
},
s = {
horizontal: 0,
vertical: go / 2
},
l = "vertical" === n ? o.height: o.width,
u = t.getmodel("controlstyle"),
h = u.get("show", !0),
c = h ? u.get("itemsize") : 0,
d = h ? u.get("itemgap") : 0,
f = c + d,
p = t.get("label.rotate") || 0;
p = p * go / 180;
var g, m, v, y, x = u.get("position", !0),
_ = h && u.get("showplaybtn", !0),
w = h && u.get("showprevbtn", !0),
b = h && u.get("shownextbtn", !0),
s = 0,
m = l;
return "left" === x || "bottom" === x ? (_ && (g = [0, 0], s += f), w && (m = [s, 0], s += f), b && (v = [m - c, 0], m -= f)) : (_ && (g = [m - c, 0], m -= f), w && (m = [0, 0], s += f), b && (v = [m - c, 0], m -= f)),
y = [s, m],
t.get("inverse") && y.reverse(),
{
viewrect: o,
mainlength: l,
orient: n,
rotation: s[n],
labelrotation: p,
labelposopt: i,
labelalign: t.get("label.align") || a[n],
labelbaseline: t.get("label.verticalalign") || t.get("label.baseline") || r[n],
playposition: g,
prevbtnposition: m,
nextbtnposition: v,
axisextent: y,
controlsize: c,
controlgap: d
}
},
_position: function(t, e) {
function i(t) {
var e = t.position;
t.origin = [c[0][0] - e[0], c[1][0] - e[1]]
}
function n(t) {
return [[t.x, t.x + t.width], [t.y, t.y + t.height]]
}
function o(t, e, i, n, o) {
t[n] += i[n][o] - e[n][o]
}
var a = this._maingroup,
r = this._labelgroup,
s = t.viewrect;
if ("vertical" === t.orient) {
var l = mt(),
u = s.x,
h = s.y + s.height;
_t(l, l, [ - u, -h]),
wt(l, l, -go / 2),
_t(l, l, [u, h]),
(s = s.clone()).applytransform(l)
}
var c = n(s),
d = n(a.getboundingrect()),
f = n(r.getboundingrect()),
p = a.position,
g = r.position;
g[0] = p[0] = c[0][0];
var m = t.labelposopt;
if (isnan(m)) o(p, d, c, 1, v = "+" === m ? 0 : 1),
o(g, f, c, 1, 1 - v);
else {
var v = m >= 0 ? 0 : 1;
o(p, d, c, 1, v),
g[1] = p[1] + m
}
a.attr("position", p),
r.attr("position", g),
a.rotation = r.rotation = t.rotation,
i(a),
i(r)
},
_createaxis: function(t, e) {
var i = e.getdata(),
n = e.get("axistype"),
o = vl(e, n);
o.getticks = function() {
return i.maparray(["value"],
function(t) {
return t
})
};
var a = i.getdataextent("value");
o.setextent(a[0], a[1]),
o.niceticks();
var r = new zo("value", o, t.axisextent, n);
return r.model = e,
r
},
_creategroup: function(t) {
var e = this["_" + t] = new zw;
return this.group.add(e),
e
},
_renderaxisline: function(t, e, i, n) {
var o = i.getextent();
n.get("linestyle.show") && e.add(new rm({
shape: {
x1: o[0],
y1: 0,
x2: o[1],
y2: 0
},
style: a({
linecap: "round"
},
n.getmodel("linestyle").getlinestyle()),
silent: !0,
z2: 1
}))
},
_renderaxistick: function(t, e, i, n) {
var o = n.getdata(),
a = i.scale.getticks();
vo(a,
function(t) {
var a = i.datatocoord(t),
r = o.getitemmodel(t),
s = r.getmodel("itemstyle"),
l = r.getmodel("emphasis.itemstyle"),
u = {
position: [a, 0],
onclick: bo(this._changetimeline, this, t)
},
h = cx(r, s, e, u);
uo(h, l.getitemstyle()),
r.get("tooltip") ? (h.dataindex = t, h.datamodel = n) : h.dataindex = h.datamodel = null
},
this)
},
_renderaxislabel: function(t, e, i, n) {
if (i.getlabelmodel().get("show")) {
var o = n.getdata(),
a = i.getviewlabels();
vo(a,
function(n) {
var a = n.tickvalue,
r = o.getitemmodel(a),
s = r.getmodel("label"),
l = r.getmodel("emphasis.label"),
u = i.datatocoord(n.tickvalue),
h = new qs({
position: [u, 0],
rotation: t.labelrotation - t.rotation,
onclick: bo(this._changetimeline, this, a),
silent: !1
});
fo(h.style, s, {
text: n.formattedlabel,
textalign: t.labelalign,
textverticalalign: t.labelbaseline
}),
e.add(h),
uo(h, fo({},
l))
},
this)
}
},
_rendercontrol: function(t, e, i, n) {
function o(t, i, o, h) {
if (t) {
var c = dx(n, i, u, {
position: t,
origin: [a / 2, 0],
rotation: h ? -r: 0,
recthover: !0,
style: s,
onclick: o
});
e.add(c),
uo(c, l)
}
}
var a = t.controlsize,
r = t.rotation,
s = n.getmodel("controlstyle").getitemstyle(),
l = n.getmodel("emphasis.controlstyle").getitemstyle(),
u = [0, -a / 2, a, a],
h = n.getplaystate(),
c = n.get("inverse", !0);
o(t.nextbtnposition, "controlstyle.nexticon", bo(this._changetimeline, this, c ? "-": "+")),
o(t.prevbtnposition, "controlstyle.previcon", bo(this._changetimeline, this, c ? "+": "-")),
o(t.playposition, "controlstyle." + (h ? "stopicon": "playicon"), bo(this._handleplayclick, this, !h), !0)
},
_rendercurrentpointer: function(t, e, i, n) {
var o = n.getdata(),
a = n.getcurrentindex(),
r = o.getitemmodel(a).getmodel("checkpointstyle"),
s = this,
l = {
oncreate: function(t) {
t.draggable = !0,
t.drift = bo(s._handlepointerdrag, s),
t.ondragend = bo(s._handlepointerdragend, s),
lx(t, a, i, n, !0)
},
onupdate: function(t) {
lx(t, a, i, n)
}
};
this._currentpointer = cx(r, r, this._maingroup, {},
this._currentpointer, l)
},
_handleplayclick: function(t) {
this._cleartimer(),
this.api.dispatchaction({
type: "timelineplaychange",
playstate: t,
from: this.uid
})
},
_handlepointerdrag: function(t, e, i) {
this._cleartimer(),
this._pointerchangetimeline([i.offsetx, i.offsety])
},
_handlepointerdragend: function(t) {
this._pointerchangetimeline([t.offsetx, t.offsety], !0)
},
_pointerchangetimeline: function(t, e) {
var i = this._toaxiscoord(t)[0],
n = bo(this._axis.getextent().slice());
i > n[1] && (i = n[1]),
i < n[0] && (i = n[0]),
this._currentpointer.position[0] = i,
this._currentpointer.dirty();
var o = this._findnearesttick(i),
a = this.model; (e || o !== a.getcurrentindex() && a.get("realtime")) && this._changetimeline(o)
},
_doplaystop: function() {
this._cleartimer(),
this.model.getplaystate() && (this._timer = settimeout(bo(function() {
var t = this.model;
this._changetimeline(t.getcurrentindex() + (t.get("rewind", !0) ? -1 : 1))
},
this), this.model.get("playinterval")))
},
_toaxiscoord: function(t) {
return io(t, this._maingroup.getlocaltransform(), !0)
},
_findnearesttick: function(t) {
var e, i = this.model.getdata(),
n = 1 / 0,
o = this._axis;
return i.each(["value"],
function(i, a) {
var r = o.datatocoord(i),
s = math.abs(r - t);
s < n && (n = s, e = a)
}),
e
},
_cleartimer: function() {
this._timer && (cleartimeout(this._timer), this._timer = null)
},
_changetimeline: function(t) {
var e = this.model.getcurrentindex();
"+" === t ? t = e + 1 : "-" === t && (t = e - 1),
this.api.dispatchaction({
type: "timelinechange",
currentindex: t,
from: this.uid
})
}
}),
ls(function(t) {
var e = t && t.timeline;
y(e) || (e = e ? [e] : []),
d(e,
function(t) {
t && mx(t)
})
});
var fo = bs({
type: "toolbox",
layoutmode: {
type: "box",
ignoresize: !0
},
optionupdated: function() {
fo.superapply(this, "optionupdated", arguments),
d(this.option.feature,
function(t, e) {
var i = xy(e);
i && n(t, i.defaultoption)
})
},
defaultoption: {
show: !0,
z: 6,
zlevel: 0,
orient: "horizontal",
left: "right",
top: "top",
backgroundcolor: "transparent",
bordercolor: "#ccc",
borderradius: 0,
borderwidth: 0,
padding: 5,
itemsize: 15,
itemgap: 8,
showtitle: !0,
iconstyle: {
bordercolor: "#666",
color: "none"
},
emphasis: {
iconstyle: {
bordercolor: "#3e98c5"
}
}
}
});
vs({
type: "toolbox",
render: function(t, e, i, n) {
function o(o, r) {
var s, c = h[o],
d = h[r],
f = new lo(l[c], t, t.ecmodel);
if (c && !d) {
if (kx(c)) s = {
model: f,
onclick: f.option.onclick,
featurename: c
};
else {
var p = xy(c);
if (!p) return;
s = new p(f, e, i)
}
u[c] = s
} else {
if (! (s = u[d])) return;
s.model = f,
s.ecmodel = e,
s.api = i
}
c || !d ? f.get("show") && !s.unusable ? (a(f, s, c), f.seticonstatus = function(t, e) {
var i = this.option,
n = this.iconpaths;
i.iconstatus = i.iconstatus || {},
i.iconstatus[t] = e,
n[t] && n[t].trigger(e)
},
s.render && s.render(f, e, i, n)) : s.remove && s.remove(e, i) : s.dispose && s.dispose(e, i)
}
function a(n, o, a) {
var l = n.getmodel("iconstyle"),
u = n.getmodel("emphasis.iconstyle"),
h = o.geticons ? o.geticons() : n.get("icon"),
c = n.get("title") || {};
if ("string" == typeof h) {
var f = h,
p = c;
c = {},
(h = {})[a] = f,
c[a] = p
}
var g = n.iconpaths = {};
d(h,
function(a, h) {
var d = co(a, {},
{
x: -s / 2,
y: -s / 2,
width: s,
height: s
});
d.setstyle(l.getitemstyle()),
d.hoverstyle = u.getitemstyle(),
uo(d),
t.get("showtitle") && (d.__title = c[h], d.on("mouseover",
function() {
var t = u.getitemstyle();
d.setstyle({
text: c[h],
textposition: t.textposition || "bottom",
textfill: t.fill || t.stroke || "#000",
textalign: t.textalign || "center"
})
}).on("mouseout",
function() {
d.setstyle({
textfill: null
})
})),
d.trigger(n.get("iconstatus." + h) || "normal"),
r.add(d),
d.on("click", m(o.onclick, o, e, i, h)),
g[h] = d
})
}
var r = this.group;
if (r.removeall(), t.get("show")) {
var s = +t.get("itemsize"),
l = t.get("feature") || {},
u = this._features || (this._features = {}),
h = [];
d(l,
function(t, e) {
h.push(e)
}),
new hs(this._featurenames || [], h).add(o).update(o).remove(v(o, null)).execute(),
this._featurenames = h,
dv(r, t, i),
r.add(fv(r.getboundingrect(), t)),
r.eachchild(function(t) {
var e = t.__title,
n = t.hoverstyle;
if (n && e) {
var o = de(e, he(n)),
a = t.position[0] + r.position[0],
l = !1;
t.position[1] + r.position[1] + s + o.height > i.getheight() && (n.textposition = "top", l = !0);
var u = l ? -5 - o.height: s + 8;
a + o.width / 2 > i.getwidth() ? (n.textposition = ["100%", u], n.textalign = "right") : a - o.width / 2 < 0 && (n.textposition = [0, u], n.textalign = "left")
}
})
}
},
updateview: function(t, e, i, n) {
d(this._features,
function(t) {
t.updateview && t.updateview(t.model, e, i, n)
})
},
remove: function(t, e) {
d(this._features,
function(i) {
i.remove && i.remove(t, e)
}),
this.group.removeall()
},
dispose: function(t, e) {
d(this._features,
function(i) {
i.dispose && i.dispose(t, e)
})
}
});
var wo = xi.toolbox.saveasimage;
px.defaultoption = {
show: !0,
icon: "m4.7,22.9l29.3,45.5l54.7,23.4m4.6,43.6l4.6,58l53.8,58l53.8,43.6m29.2,45.1l29.2,0",
title: wo.title,
type: "png",
name: "",
excludecomponents: ["toolbox"],
pixelratio: 1,
lang: wo.lang.slice()
},
px.prototype.unusable = !z_.canvassupported,
px.prototype.onclick = function(t, e) {
var i = this.model,
n = i.get("name") || t.get("title.0.text") || "echarts",
o = document.createelement("a"),
a = i.get("type", !0) || "png";
o.download = n + "." + a,
o.target = "_blank";
var r = e.getconnecteddataurl({
type: a,
backgroundcolor: i.get("backgroundcolor", !0) || t.get("backgroundcolor") || "#fff",
excludecomponents: i.get("excludecomponents"),
pixelratio: i.get("pixelratio")
});
if (o.href = r, "function" != typeof mouseevent || z_.browser.ie || z_.browser.edge) if (window.navigator.mssaveoropenblob) {
for (var s = atob(r.split(",")[1]), l = s.length, u = new uint8array(l); l--;) u[l] = s.charcodeat(l);
var h = new blob([u]);
window.navigator.mssaveoropenblob(h, n + "." + a)
} else {
var c = i.get("lang"),
d = '