mhz-ui 1.0.49 → 1.0.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/UiChart/UiChart.js +82 -86
- package/dist/UiEditor/UiEditor.js +194 -194
- package/package.json +19 -19
package/dist/UiChart/UiChart.js
CHANGED
|
@@ -443,7 +443,7 @@ const ho = /* @__PURE__ */ (() => {
|
|
|
443
443
|
function D(i) {
|
|
444
444
|
return i === null || typeof i > "u";
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function F(i) {
|
|
447
447
|
if (Array.isArray && Array.isArray(i))
|
|
448
448
|
return !0;
|
|
449
449
|
const t = Object.prototype.toString.call(i);
|
|
@@ -468,13 +468,9 @@ function z(i, t, e) {
|
|
|
468
468
|
}
|
|
469
469
|
function C(i, t, e, s) {
|
|
470
470
|
let n, o, a;
|
|
471
|
-
if (
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
t.call(e, i[n], n);
|
|
475
|
-
else
|
|
476
|
-
for (n = 0; n < o; n++)
|
|
477
|
-
t.call(e, i[n], n);
|
|
471
|
+
if (F(i))
|
|
472
|
+
for (o = i.length, n = 0; n < o; n++)
|
|
473
|
+
t.call(e, i[n], n);
|
|
478
474
|
else if (S(i))
|
|
479
475
|
for (a = Object.keys(i), o = a.length, n = 0; n < o; n++)
|
|
480
476
|
t.call(e, i[a[n]], a[n]);
|
|
@@ -489,7 +485,7 @@ function ke(i, t) {
|
|
|
489
485
|
return !0;
|
|
490
486
|
}
|
|
491
487
|
function ve(i) {
|
|
492
|
-
if (
|
|
488
|
+
if (F(i))
|
|
493
489
|
return i.map(ve);
|
|
494
490
|
if (S(i)) {
|
|
495
491
|
const t = /* @__PURE__ */ Object.create(null), e = Object.keys(i), s = e.length;
|
|
@@ -514,7 +510,7 @@ function fo(i, t, e, s) {
|
|
|
514
510
|
S(n) && S(o) ? Zt(n, o, s) : t[i] = ve(o);
|
|
515
511
|
}
|
|
516
512
|
function Zt(i, t, e) {
|
|
517
|
-
const s =
|
|
513
|
+
const s = F(t) ? t : [
|
|
518
514
|
t
|
|
519
515
|
], n = s.length;
|
|
520
516
|
if (!S(i))
|
|
@@ -584,7 +580,7 @@ const Qt = (i) => typeof i < "u", pt = (i) => typeof i == "function", Ci = (i, t
|
|
|
584
580
|
function bo(i) {
|
|
585
581
|
return i.type === "mouseup" || i.type === "click" || i.type === "contextmenu";
|
|
586
582
|
}
|
|
587
|
-
const E = Math.PI,
|
|
583
|
+
const E = Math.PI, V = 2 * E, we = Number.POSITIVE_INFINITY, _o = E / 180, N = E / 2, _t = E / 4, Ai = E * 2 / 3, ct = Math.log10, ft = Math.sign;
|
|
588
584
|
function xe(i, t, e) {
|
|
589
585
|
return Math.abs(i - t) < e;
|
|
590
586
|
}
|
|
@@ -630,7 +626,7 @@ function Oi(i) {
|
|
|
630
626
|
function $s(i, t) {
|
|
631
627
|
const e = t.x - i.x, s = t.y - i.y, n = Math.sqrt(e * e + s * s);
|
|
632
628
|
let o = Math.atan2(s, e);
|
|
633
|
-
return o < -0.5 * E && (o +=
|
|
629
|
+
return o < -0.5 * E && (o += V), {
|
|
634
630
|
angle: o,
|
|
635
631
|
distance: n
|
|
636
632
|
};
|
|
@@ -639,7 +635,7 @@ function Mo(i, t) {
|
|
|
639
635
|
return Math.sqrt(Math.pow(t.x - i.x, 2) + Math.pow(t.y - i.y, 2));
|
|
640
636
|
}
|
|
641
637
|
function st(i) {
|
|
642
|
-
return (i %
|
|
638
|
+
return (i % V + V) % V;
|
|
643
639
|
}
|
|
644
640
|
function Pe(i, t, e, s) {
|
|
645
641
|
const n = st(i), o = st(t), a = st(e), r = st(o - n), l = st(a - n), c = st(n - o), h = st(n - a);
|
|
@@ -742,7 +738,7 @@ function Po(i, t) {
|
|
|
742
738
|
return t ? (clearTimeout(e), e = setTimeout(i, t, s)) : i.apply(this, s), t;
|
|
743
739
|
};
|
|
744
740
|
}
|
|
745
|
-
const qs = (i) => i === "start" ? "left" : i === "end" ? "right" : "center", Ut = (i, t, e) => i === "start" ? t : i === "end" ? e : (t + e) / 2, ce = (i) => i === 0 || i === 1, Ri = (i, t, e) => -(Math.pow(2, 10 * (i -= 1)) * Math.sin((i - t) *
|
|
741
|
+
const qs = (i) => i === "start" ? "left" : i === "end" ? "right" : "center", Ut = (i, t, e) => i === "start" ? t : i === "end" ? e : (t + e) / 2, ce = (i) => i === 0 || i === 1, Ri = (i, t, e) => -(Math.pow(2, 10 * (i -= 1)) * Math.sin((i - t) * V / e)), Ti = (i, t, e) => Math.pow(2, -10 * i) * Math.sin((i - t) * V / e) + 1, Kt = {
|
|
746
742
|
linear: (i) => i,
|
|
747
743
|
easeInQuad: (i) => i * i,
|
|
748
744
|
easeOutQuad: (i) => -i * (i - 2),
|
|
@@ -894,7 +890,7 @@ function se(i, t, e) {
|
|
|
894
890
|
}
|
|
895
891
|
const Zs = {
|
|
896
892
|
values(i) {
|
|
897
|
-
return
|
|
893
|
+
return F(i) ? i : "" + i;
|
|
898
894
|
},
|
|
899
895
|
numeric(i, t, e) {
|
|
900
896
|
if (i === 0)
|
|
@@ -1096,11 +1092,11 @@ function Io(i, t, e, s) {
|
|
|
1096
1092
|
const r = e.length;
|
|
1097
1093
|
let l, c, h, d, u;
|
|
1098
1094
|
for (l = 0; l < r; l++)
|
|
1099
|
-
if (d = e[l], d != null && !
|
|
1095
|
+
if (d = e[l], d != null && !F(d))
|
|
1100
1096
|
a = Ce(i, n, o, a, d);
|
|
1101
|
-
else if (
|
|
1097
|
+
else if (F(d))
|
|
1102
1098
|
for (c = 0, h = d.length; c < h; c++)
|
|
1103
|
-
u = d[c], u != null && !
|
|
1099
|
+
u = d[c], u != null && !F(u) && (a = Ce(i, n, o, a, u));
|
|
1104
1100
|
i.restore();
|
|
1105
1101
|
const f = o.length / 2;
|
|
1106
1102
|
if (f > e.length) {
|
|
@@ -1118,7 +1114,7 @@ function Ii(i, t) {
|
|
|
1118
1114
|
t = t || i.getContext("2d"), t.save(), t.resetTransform(), t.clearRect(0, 0, i.width, i.height), t.restore();
|
|
1119
1115
|
}
|
|
1120
1116
|
function zi(i, t, e, s) {
|
|
1121
|
-
zo(i, t, e, s
|
|
1117
|
+
zo(i, t, e, s);
|
|
1122
1118
|
}
|
|
1123
1119
|
function zo(i, t, e, s, n) {
|
|
1124
1120
|
let o, a, r, l, c, h, d, u;
|
|
@@ -1131,36 +1127,36 @@ function zo(i, t, e, s, n) {
|
|
|
1131
1127
|
if (!(isNaN(p) || p <= 0)) {
|
|
1132
1128
|
switch (i.beginPath(), f) {
|
|
1133
1129
|
default:
|
|
1134
|
-
|
|
1130
|
+
i.arc(e, s, p, 0, V), i.closePath();
|
|
1135
1131
|
break;
|
|
1136
1132
|
case "triangle":
|
|
1137
|
-
h =
|
|
1133
|
+
h = p, i.moveTo(e + Math.sin(m) * h, s - Math.cos(m) * p), m += Ai, i.lineTo(e + Math.sin(m) * h, s - Math.cos(m) * p), m += Ai, i.lineTo(e + Math.sin(m) * h, s - Math.cos(m) * p), i.closePath();
|
|
1138
1134
|
break;
|
|
1139
1135
|
case "rectRounded":
|
|
1140
|
-
c = p * 0.516, l = p - c, a = Math.cos(m + _t) * l, d = Math.cos(m + _t) *
|
|
1136
|
+
c = p * 0.516, l = p - c, a = Math.cos(m + _t) * l, d = Math.cos(m + _t) * l, r = Math.sin(m + _t) * l, u = Math.sin(m + _t) * l, i.arc(e - d, s - r, c, m - E, m - N), i.arc(e + u, s - a, c, m - N, m), i.arc(e + d, s + r, c, m, m + N), i.arc(e - u, s + a, c, m + N, m + E), i.closePath();
|
|
1141
1137
|
break;
|
|
1142
1138
|
case "rect":
|
|
1143
1139
|
if (!g) {
|
|
1144
|
-
l = Math.SQRT1_2 * p, h =
|
|
1140
|
+
l = Math.SQRT1_2 * p, h = l, i.rect(e - h, s - l, 2 * h, 2 * l);
|
|
1145
1141
|
break;
|
|
1146
1142
|
}
|
|
1147
1143
|
m += _t;
|
|
1148
1144
|
case "rectRot":
|
|
1149
|
-
d = Math.cos(m) *
|
|
1145
|
+
d = Math.cos(m) * p, a = Math.cos(m) * p, r = Math.sin(m) * p, u = Math.sin(m) * p, i.moveTo(e - d, s - r), i.lineTo(e + u, s - a), i.lineTo(e + d, s + r), i.lineTo(e - u, s + a), i.closePath();
|
|
1150
1146
|
break;
|
|
1151
1147
|
case "crossRot":
|
|
1152
1148
|
m += _t;
|
|
1153
1149
|
case "cross":
|
|
1154
|
-
d = Math.cos(m) *
|
|
1150
|
+
d = Math.cos(m) * p, a = Math.cos(m) * p, r = Math.sin(m) * p, u = Math.sin(m) * p, i.moveTo(e - d, s - r), i.lineTo(e + d, s + r), i.moveTo(e + u, s - a), i.lineTo(e - u, s + a);
|
|
1155
1151
|
break;
|
|
1156
1152
|
case "star":
|
|
1157
|
-
d = Math.cos(m) *
|
|
1153
|
+
d = Math.cos(m) * p, a = Math.cos(m) * p, r = Math.sin(m) * p, u = Math.sin(m) * p, i.moveTo(e - d, s - r), i.lineTo(e + d, s + r), i.moveTo(e + u, s - a), i.lineTo(e - u, s + a), m += _t, d = Math.cos(m) * p, a = Math.cos(m) * p, r = Math.sin(m) * p, u = Math.sin(m) * p, i.moveTo(e - d, s - r), i.lineTo(e + d, s + r), i.moveTo(e + u, s - a), i.lineTo(e - u, s + a);
|
|
1158
1154
|
break;
|
|
1159
1155
|
case "line":
|
|
1160
|
-
a =
|
|
1156
|
+
a = Math.cos(m) * p, r = Math.sin(m) * p, i.moveTo(e - a, s - r), i.lineTo(e + a, s + r);
|
|
1161
1157
|
break;
|
|
1162
1158
|
case "dash":
|
|
1163
|
-
i.moveTo(e, s), i.lineTo(e + Math.cos(m) *
|
|
1159
|
+
i.moveTo(e, s), i.lineTo(e + Math.cos(m) * p, s + Math.sin(m) * p);
|
|
1164
1160
|
break;
|
|
1165
1161
|
case !1:
|
|
1166
1162
|
i.closePath();
|
|
@@ -1192,7 +1188,7 @@ function No(i, t) {
|
|
|
1192
1188
|
i.fillStyle = t.color, i.fillRect(t.left, t.top, t.width, t.height), i.fillStyle = e;
|
|
1193
1189
|
}
|
|
1194
1190
|
function Jt(i, t, e, s, n, o = {}) {
|
|
1195
|
-
const a =
|
|
1191
|
+
const a = F(t) ? t : [
|
|
1196
1192
|
t
|
|
1197
1193
|
], r = o.strokeWidth > 0 && o.strokeColor !== "";
|
|
1198
1194
|
let l, c;
|
|
@@ -1262,10 +1258,10 @@ function $(i, t) {
|
|
|
1262
1258
|
return n.string = Eo(n), n;
|
|
1263
1259
|
}
|
|
1264
1260
|
function he(i, t, e, s) {
|
|
1265
|
-
let n
|
|
1266
|
-
for (
|
|
1267
|
-
if (
|
|
1268
|
-
return
|
|
1261
|
+
let n, o, a;
|
|
1262
|
+
for (n = 0, o = i.length; n < o; ++n)
|
|
1263
|
+
if (a = i[n], a !== void 0 && a !== void 0)
|
|
1264
|
+
return a;
|
|
1269
1265
|
}
|
|
1270
1266
|
function Yo(i, t, e) {
|
|
1271
1267
|
const { min: s, max: n } = i, o = Ws(t, (n - s) / 2), a = (r, l) => e && r === 0 ? 0 : r + l;
|
|
@@ -1424,7 +1420,7 @@ function sn(i, t, e) {
|
|
|
1424
1420
|
function Uo(i, t, e) {
|
|
1425
1421
|
const { _proxy: s, _context: n, _subProxy: o, _descriptors: a } = i;
|
|
1426
1422
|
let r = s[t];
|
|
1427
|
-
return pt(r) && a.isScriptable(t) && (r = Ko(t, r, i, e)),
|
|
1423
|
+
return pt(r) && a.isScriptable(t) && (r = Ko(t, r, i, e)), F(r) && r.length && (r = qo(t, r, i, a.isIndexable)), pi(t, r) && (r = Ft(r, n, o && o[t], a)), r;
|
|
1428
1424
|
}
|
|
1429
1425
|
function Ko(i, t, e, s) {
|
|
1430
1426
|
const { _proxy: n, _context: o, _subProxy: a, _stack: r } = e;
|
|
@@ -1485,7 +1481,7 @@ function Qo(i, t, e) {
|
|
|
1485
1481
|
const s = i._getTarget();
|
|
1486
1482
|
t in s || (s[t] = {});
|
|
1487
1483
|
const n = s[t];
|
|
1488
|
-
return
|
|
1484
|
+
return F(n) && S(e) ? e : n || {};
|
|
1489
1485
|
}
|
|
1490
1486
|
function Jo(i, t, e, s) {
|
|
1491
1487
|
let n;
|
|
@@ -1857,7 +1853,7 @@ class an {
|
|
|
1857
1853
|
const a = {};
|
|
1858
1854
|
for (const r of e)
|
|
1859
1855
|
a[r] = o[r];
|
|
1860
|
-
(
|
|
1856
|
+
(F(o.properties) && o.properties || [
|
|
1861
1857
|
n
|
|
1862
1858
|
]).forEach((r) => {
|
|
1863
1859
|
(r === n || !s.has(r)) && s.set(r, a);
|
|
@@ -2143,7 +2139,7 @@ class Ee {
|
|
|
2143
2139
|
if (this._parsing === !1)
|
|
2144
2140
|
s._parsed = n, s._sorted = !0, u = n;
|
|
2145
2141
|
else {
|
|
2146
|
-
|
|
2142
|
+
F(n[t]) ? u = this.parseArrayData(s, n, t, e) : S(n[t]) ? u = this.parseObjectData(s, n, t, e) : u = this.parsePrimitiveData(s, n, t, e);
|
|
2147
2143
|
const f = () => d[r] === null || c && d[r] < c[r];
|
|
2148
2144
|
for (h = 0; h < e; ++h)
|
|
2149
2145
|
s._parsed[h + t] = d = u[h], l && (f() && (l = !1), c = d);
|
|
@@ -2485,7 +2481,7 @@ function La(i, t, e, s) {
|
|
|
2485
2481
|
};
|
|
2486
2482
|
}
|
|
2487
2483
|
function ln(i, t, e, s) {
|
|
2488
|
-
return
|
|
2484
|
+
return F(i) ? La(i, t, e, s) : t[e.axis] = e.parse(i, s), t;
|
|
2489
2485
|
}
|
|
2490
2486
|
function qi(i, t, e, s) {
|
|
2491
2487
|
const n = i.iScale, o = i.vScale, a = n.getLabels(), r = n === o, l = [];
|
|
@@ -2715,7 +2711,7 @@ class za extends Ee {
|
|
|
2715
2711
|
}
|
|
2716
2712
|
function Ba(i, t, e) {
|
|
2717
2713
|
let s = 1, n = 1, o = 0, a = 0;
|
|
2718
|
-
if (t <
|
|
2714
|
+
if (t < V) {
|
|
2719
2715
|
const r = i, l = r + t, c = Math.cos(r), h = Math.sin(r), d = Math.cos(l), u = Math.sin(l), f = (y, M, x) => Pe(y, r, l, !0) ? 1 : Math.max(M, M * e, x, x * e), g = (y, M, x) => Pe(y, r, l, !0) ? -1 : Math.min(M, M * e, x, x * e), p = f(0, c, d), m = f(N, h, u), b = g(E, c, d), _ = g(E + N, h, u);
|
|
2720
2716
|
s = (p - b) / 2, n = (m - _) / 2, o = -(p + b) / 2, a = -(m + _) / 2;
|
|
2721
2717
|
}
|
|
@@ -2822,7 +2818,7 @@ class cn extends Ee {
|
|
|
2822
2818
|
return tt(this.options.circumference);
|
|
2823
2819
|
}
|
|
2824
2820
|
_getRotationExtents() {
|
|
2825
|
-
let t =
|
|
2821
|
+
let t = V, e = -V;
|
|
2826
2822
|
for (let s = 0; s < this.chart.data.datasets.length; ++s)
|
|
2827
2823
|
if (this.chart.isDatasetVisible(s) && this.chart.getDatasetMeta(s).type === this._type) {
|
|
2828
2824
|
const n = this.chart.getDatasetMeta(s).controller, o = n._getRotation(), a = n._getCircumference();
|
|
@@ -2839,7 +2835,7 @@ class cn extends Ee {
|
|
|
2839
2835
|
}
|
|
2840
2836
|
_circumference(t, e) {
|
|
2841
2837
|
const s = this.options, n = this._cachedMeta, o = this._getCircumference();
|
|
2842
|
-
return e && s.animation.animateRotate || !this.chart.getDataVisibility(t) || n._parsed[t] === null || n.data[t].hidden ? 0 : this.calculateCircumference(n._parsed[t] * o /
|
|
2838
|
+
return e && s.animation.animateRotate || !this.chart.getDataVisibility(t) || n._parsed[t] === null || n.data[t].hidden ? 0 : this.calculateCircumference(n._parsed[t] * o / V);
|
|
2843
2839
|
}
|
|
2844
2840
|
updateElements(t, e, s, n) {
|
|
2845
2841
|
const o = n === "reset", a = this.chart, r = a.chartArea, c = a.options.animation, h = (r.left + r.right) / 2, d = (r.top + r.bottom) / 2, u = o && c.animateScale, f = u ? 0 : this.innerRadius, g = u ? 0 : this.outerRadius, { sharedOptions: p, includeOptions: m } = this._getSharedOptions(e, n);
|
|
@@ -2870,7 +2866,7 @@ class cn extends Ee {
|
|
|
2870
2866
|
}
|
|
2871
2867
|
calculateCircumference(t) {
|
|
2872
2868
|
const e = this._cachedMeta.total;
|
|
2873
|
-
return e > 0 && !isNaN(t) ?
|
|
2869
|
+
return e > 0 && !isNaN(t) ? V * (Math.abs(t) / e) : 0;
|
|
2874
2870
|
}
|
|
2875
2871
|
getLabelAndValue(t) {
|
|
2876
2872
|
const e = this._cachedMeta, s = this.chart, n = s.data.labels || [], o = se(e._parsed[t], s.options.locale);
|
|
@@ -3816,7 +3812,7 @@ function rs(i, t) {
|
|
|
3816
3812
|
if (!i.display)
|
|
3817
3813
|
return 0;
|
|
3818
3814
|
const e = $(i.font, t), s = G(i.padding);
|
|
3819
|
-
return (
|
|
3815
|
+
return (F(i.text) ? i.text.length : 1) * e.lineHeight + s.height;
|
|
3820
3816
|
}
|
|
3821
3817
|
function vr(i, t) {
|
|
3822
3818
|
return St(i, {
|
|
@@ -4098,11 +4094,11 @@ class Pt extends Et {
|
|
|
4098
4094
|
if (g = t[d].label, p = this._resolveTickFontOptions(d), n.font = m = p.string, b = o[m] = o[m] || {
|
|
4099
4095
|
data: {},
|
|
4100
4096
|
gc: []
|
|
4101
|
-
}, _ = p.lineHeight, y = M = 0, !D(g) && !
|
|
4097
|
+
}, _ = p.lineHeight, y = M = 0, !D(g) && !F(g))
|
|
4102
4098
|
y = Ce(n, b.data, b.gc, y, g), M = _;
|
|
4103
|
-
else if (
|
|
4099
|
+
else if (F(g))
|
|
4104
4100
|
for (u = 0, f = g.length; u < f; ++u)
|
|
4105
|
-
x = g[u], !D(x) && !
|
|
4101
|
+
x = g[u], !D(x) && !F(x) && (y = Ce(n, b.data, b.gc, y, x), M += _);
|
|
4106
4102
|
a.push(y), r.push(M), c = Math.max(y, c), h = Math.max(M, h);
|
|
4107
4103
|
}
|
|
4108
4104
|
kr(o, e);
|
|
@@ -4167,43 +4163,43 @@ class Pt extends Et {
|
|
|
4167
4163
|
const e = this.axis, s = this.chart, n = this.options, { grid: o, position: a, border: r } = n, l = o.offset, c = this.isHorizontal(), d = this.ticks.length + (l ? 1 : 0), u = Wt(o), f = [], g = r.setContext(this.getContext()), p = g.display ? g.width : 0, m = p / 2, b = function(R) {
|
|
4168
4164
|
return xt(s, R, p);
|
|
4169
4165
|
};
|
|
4170
|
-
let _, y, M, x, v, k, P, w, O, I,
|
|
4166
|
+
let _, y, M, x, v, k, P, w, O, I, T, K;
|
|
4171
4167
|
if (a === "top")
|
|
4172
4168
|
_ = b(this.bottom), k = this.bottom - u, w = _ - m, I = b(t.top) + m, K = t.bottom;
|
|
4173
4169
|
else if (a === "bottom")
|
|
4174
4170
|
_ = b(this.top), I = t.top, K = b(t.bottom) - m, k = _ + m, w = this.top + u;
|
|
4175
4171
|
else if (a === "left")
|
|
4176
|
-
_ = b(this.right), v = this.right - u, P = _ - m, O = b(t.left) + m,
|
|
4172
|
+
_ = b(this.right), v = this.right - u, P = _ - m, O = b(t.left) + m, T = t.right;
|
|
4177
4173
|
else if (a === "right")
|
|
4178
|
-
_ = b(this.left), O = t.left,
|
|
4174
|
+
_ = b(this.left), O = t.left, T = b(t.right) - m, v = _ + m, P = this.left + u;
|
|
4179
4175
|
else if (e === "x") {
|
|
4180
4176
|
if (a === "center")
|
|
4181
4177
|
_ = b((t.top + t.bottom) / 2 + 0.5);
|
|
4182
4178
|
else if (S(a)) {
|
|
4183
|
-
const R = Object.keys(a)[0],
|
|
4184
|
-
_ = b(this.chart.scales[R].getPixelForValue(
|
|
4179
|
+
const R = Object.keys(a)[0], B = a[R];
|
|
4180
|
+
_ = b(this.chart.scales[R].getPixelForValue(B));
|
|
4185
4181
|
}
|
|
4186
4182
|
I = t.top, K = t.bottom, k = _ + m, w = k + u;
|
|
4187
4183
|
} else if (e === "y") {
|
|
4188
4184
|
if (a === "center")
|
|
4189
4185
|
_ = b((t.left + t.right) / 2);
|
|
4190
4186
|
else if (S(a)) {
|
|
4191
|
-
const R = Object.keys(a)[0],
|
|
4192
|
-
_ = b(this.chart.scales[R].getPixelForValue(
|
|
4187
|
+
const R = Object.keys(a)[0], B = a[R];
|
|
4188
|
+
_ = b(this.chart.scales[R].getPixelForValue(B));
|
|
4193
4189
|
}
|
|
4194
|
-
v = _ - m, P = v - u, O = t.left,
|
|
4190
|
+
v = _ - m, P = v - u, O = t.left, T = t.right;
|
|
4195
4191
|
}
|
|
4196
4192
|
const Q = L(n.ticks.maxTicksLimit, d), A = Math.max(1, Math.ceil(d / Q));
|
|
4197
4193
|
for (y = 0; y < d; y += A) {
|
|
4198
|
-
const R = this.getContext(y),
|
|
4199
|
-
M = Mr(this, y, l), M !== void 0 && (x = xt(s, M, H), c ? v = P = O =
|
|
4194
|
+
const R = this.getContext(y), B = o.setContext(R), J = r.setContext(R), H = B.lineWidth, Ct = B.color, oe = J.dash || [], At = J.dashOffset, It = B.tickWidth, mt = B.tickColor, zt = B.tickBorderDash || [], bt = B.tickBorderDashOffset;
|
|
4195
|
+
M = Mr(this, y, l), M !== void 0 && (x = xt(s, M, H), c ? v = P = O = T = x : k = w = I = K = x, f.push({
|
|
4200
4196
|
tx1: v,
|
|
4201
4197
|
ty1: k,
|
|
4202
4198
|
tx2: P,
|
|
4203
4199
|
ty2: w,
|
|
4204
4200
|
x1: O,
|
|
4205
4201
|
y1: I,
|
|
4206
|
-
x2:
|
|
4202
|
+
x2: T,
|
|
4207
4203
|
y2: K,
|
|
4208
4204
|
width: H,
|
|
4209
4205
|
color: Ct,
|
|
@@ -4219,7 +4215,7 @@ class Pt extends Et {
|
|
|
4219
4215
|
}
|
|
4220
4216
|
_computeLabelItems(t) {
|
|
4221
4217
|
const e = this.axis, s = this.options, { position: n, ticks: o } = s, a = this.isHorizontal(), r = this.ticks, { align: l, crossAlign: c, padding: h, mirror: d } = o, u = Wt(s.grid), f = u + h, g = d ? -h : f, p = -tt(this.labelRotation), m = [];
|
|
4222
|
-
let b, _, y, M, x, v, k, P, w, O, I,
|
|
4218
|
+
let b, _, y, M, x, v, k, P, w, O, I, T, K = "middle";
|
|
4223
4219
|
if (n === "top")
|
|
4224
4220
|
v = this.bottom - g, k = this._getXAxisLabelAlignment();
|
|
4225
4221
|
else if (n === "bottom")
|
|
@@ -4252,14 +4248,14 @@ class Pt extends Et {
|
|
|
4252
4248
|
for (b = 0, _ = r.length; b < _; ++b) {
|
|
4253
4249
|
y = r[b], M = y.label;
|
|
4254
4250
|
const A = o.setContext(this.getContext(b));
|
|
4255
|
-
P = this.getPixelForTick(b) + o.labelOffset, w = this._resolveTickFontOptions(b), O = w.lineHeight, I =
|
|
4256
|
-
const R = I / 2,
|
|
4251
|
+
P = this.getPixelForTick(b) + o.labelOffset, w = this._resolveTickFontOptions(b), O = w.lineHeight, I = F(M) ? M.length : 1;
|
|
4252
|
+
const R = I / 2, B = A.color, J = A.textStrokeColor, H = A.textStrokeWidth;
|
|
4257
4253
|
let Ct = k;
|
|
4258
|
-
a ? (x = P, k === "inner" && (b === _ - 1 ? Ct = this.options.reverse ? "left" : "right" : b === 0 ? Ct = this.options.reverse ? "right" : "left" : Ct = "center"), n === "top" ? c === "near" || p !== 0 ?
|
|
4254
|
+
a ? (x = P, k === "inner" && (b === _ - 1 ? Ct = this.options.reverse ? "left" : "right" : b === 0 ? Ct = this.options.reverse ? "right" : "left" : Ct = "center"), n === "top" ? c === "near" || p !== 0 ? T = -I * O + O / 2 : c === "center" ? T = -Q.highest.height / 2 - R * O + O : T = -Q.highest.height + O / 2 : c === "near" || p !== 0 ? T = O / 2 : c === "center" ? T = Q.highest.height / 2 - R * O : T = Q.highest.height - I * O, d && (T *= -1), p !== 0 && !A.showLabelBackdrop && (x += O / 2 * Math.sin(p))) : (v = P, T = (1 - I) * O / 2);
|
|
4259
4255
|
let oe;
|
|
4260
4256
|
if (A.showLabelBackdrop) {
|
|
4261
4257
|
const At = G(A.backdropPadding), It = Q.heights[b], mt = Q.widths[b];
|
|
4262
|
-
let zt =
|
|
4258
|
+
let zt = T - At.top, bt = 0 - At.left;
|
|
4263
4259
|
switch (K) {
|
|
4264
4260
|
case "middle":
|
|
4265
4261
|
zt -= It / 2;
|
|
@@ -4290,10 +4286,10 @@ class Pt extends Et {
|
|
|
4290
4286
|
m.push({
|
|
4291
4287
|
label: M,
|
|
4292
4288
|
font: w,
|
|
4293
|
-
textOffset:
|
|
4289
|
+
textOffset: T,
|
|
4294
4290
|
options: {
|
|
4295
4291
|
rotation: p,
|
|
4296
|
-
color:
|
|
4292
|
+
color: B,
|
|
4297
4293
|
strokeColor: J,
|
|
4298
4294
|
strokeWidth: H,
|
|
4299
4295
|
textAlign: Ct,
|
|
@@ -4408,7 +4404,7 @@ class Pt extends Et {
|
|
|
4408
4404
|
return;
|
|
4409
4405
|
const o = $(s.font), a = G(s.padding), r = s.align;
|
|
4410
4406
|
let l = o.lineHeight / 2;
|
|
4411
|
-
e === "bottom" || e === "center" || S(e) ? (l += a.bottom,
|
|
4407
|
+
e === "bottom" || e === "center" || S(e) ? (l += a.bottom, F(s.text) && (l += o.lineHeight * (s.text.length - 1))) : l += a.top;
|
|
4412
4408
|
const { titleX: c, titleY: h, maxWidth: d, rotation: u } = Pr(this, l, e, r);
|
|
4413
4409
|
Jt(t, s.text, 0, 0, o, {
|
|
4414
4410
|
color: s.color,
|
|
@@ -4922,7 +4918,7 @@ function $r(i, t) {
|
|
|
4922
4918
|
const { isScriptable: e, isIndexable: s } = en(i);
|
|
4923
4919
|
for (const n of t) {
|
|
4924
4920
|
const o = e(n), a = s(n), r = (a || o) && i[n];
|
|
4925
|
-
if (o && (pt(r) || Hr(r)) || a &&
|
|
4921
|
+
if (o && (pt(r) || Hr(r)) || a && F(r))
|
|
4926
4922
|
return !0;
|
|
4927
4923
|
}
|
|
4928
4924
|
return !1;
|
|
@@ -5512,23 +5508,23 @@ function Le(i, t, e, s, n, o) {
|
|
|
5512
5508
|
let f = 0;
|
|
5513
5509
|
const g = n - l;
|
|
5514
5510
|
if (s) {
|
|
5515
|
-
const A = h > 0 ? h - s : 0, R = d > 0 ? d - s : 0,
|
|
5511
|
+
const A = h > 0 ? h - s : 0, R = d > 0 ? d - s : 0, B = (A + R) / 2, J = B !== 0 ? g * B / (B + s) : g;
|
|
5516
5512
|
f = (g - J) / 2;
|
|
5517
5513
|
}
|
|
5518
|
-
const p = Math.max(1e-3, g * d - e / E) / d, m = (g - p) / 2, b = l + m + f, _ = n - m - f, { outerStart: y, outerEnd: M, innerStart: x, innerEnd: v } = Jr(t, u, d, _ - b), k = d - y, P = d - M, w = b + y / k, O = _ - M / P, I = u + x,
|
|
5514
|
+
const p = Math.max(1e-3, g * d - e / E) / d, m = (g - p) / 2, b = l + m + f, _ = n - m - f, { outerStart: y, outerEnd: M, innerStart: x, innerEnd: v } = Jr(t, u, d, _ - b), k = d - y, P = d - M, w = b + y / k, O = _ - M / P, I = u + x, T = u + v, K = b + x / I, Q = _ - v / T;
|
|
5519
5515
|
if (i.beginPath(), o) {
|
|
5520
5516
|
const A = (w + O) / 2;
|
|
5521
5517
|
if (i.arc(a, r, d, w, A), i.arc(a, r, d, A, O), M > 0) {
|
|
5522
5518
|
const H = Ot(P, O, a, r);
|
|
5523
5519
|
i.arc(H.x, H.y, M, O, _ + N);
|
|
5524
5520
|
}
|
|
5525
|
-
const R = Ot(
|
|
5521
|
+
const R = Ot(T, _, a, r);
|
|
5526
5522
|
if (i.lineTo(R.x, R.y), v > 0) {
|
|
5527
|
-
const H = Ot(
|
|
5523
|
+
const H = Ot(T, Q, a, r);
|
|
5528
5524
|
i.arc(H.x, H.y, v, _ + N, Q + Math.PI);
|
|
5529
5525
|
}
|
|
5530
|
-
const
|
|
5531
|
-
if (i.arc(a, r, u, _ - v / u,
|
|
5526
|
+
const B = (_ - v / u + (b + x / u)) / 2;
|
|
5527
|
+
if (i.arc(a, r, u, _ - v / u, B, !0), i.arc(a, r, u, B, b + x / u, !0), x > 0) {
|
|
5532
5528
|
const H = Ot(I, K, a, r);
|
|
5533
5529
|
i.arc(H.x, H.y, x, K + Math.PI, b - N);
|
|
5534
5530
|
}
|
|
@@ -5541,8 +5537,8 @@ function Le(i, t, e, s, n, o) {
|
|
|
5541
5537
|
i.moveTo(a, r);
|
|
5542
5538
|
const A = Math.cos(w) * d + a, R = Math.sin(w) * d + r;
|
|
5543
5539
|
i.lineTo(A, R);
|
|
5544
|
-
const
|
|
5545
|
-
i.lineTo(
|
|
5540
|
+
const B = Math.cos(O) * d + a, J = Math.sin(O) * d + r;
|
|
5541
|
+
i.lineTo(B, J);
|
|
5546
5542
|
}
|
|
5547
5543
|
i.closePath();
|
|
5548
5544
|
}
|
|
@@ -5553,7 +5549,7 @@ function tl(i, t, e, s, n) {
|
|
|
5553
5549
|
Le(i, t, e, s, l, n);
|
|
5554
5550
|
for (let c = 0; c < o; ++c)
|
|
5555
5551
|
i.fill();
|
|
5556
|
-
isNaN(r) || (l = a + (r %
|
|
5552
|
+
isNaN(r) || (l = a + (r % V || V));
|
|
5557
5553
|
}
|
|
5558
5554
|
return Le(i, t, e, s, l, n), i.fill(), l;
|
|
5559
5555
|
}
|
|
@@ -5567,7 +5563,7 @@ function el(i, t, e, s, n) {
|
|
|
5567
5563
|
Le(i, t, e, s, g, n);
|
|
5568
5564
|
for (let p = 0; p < o; ++p)
|
|
5569
5565
|
i.stroke();
|
|
5570
|
-
isNaN(r) || (g = a + (r %
|
|
5566
|
+
isNaN(r) || (g = a + (r % V || V));
|
|
5571
5567
|
}
|
|
5572
5568
|
f && Zr(i, t, g), o || (Le(i, t, e, s, g, n), i.stroke());
|
|
5573
5569
|
}
|
|
@@ -5616,7 +5612,7 @@ class il extends Et {
|
|
|
5616
5612
|
"innerRadius",
|
|
5617
5613
|
"outerRadius",
|
|
5618
5614
|
"circumference"
|
|
5619
|
-
], s), u = (this.options.spacing + this.options.borderWidth) / 2, g = L(d, l - r) >=
|
|
5615
|
+
], s), u = (this.options.spacing + this.options.borderWidth) / 2, g = L(d, l - r) >= V || Pe(o, r, l), p = Je(a, c + u, h + u);
|
|
5620
5616
|
return g && p;
|
|
5621
5617
|
}
|
|
5622
5618
|
getCenterPoint(t) {
|
|
@@ -5638,7 +5634,7 @@ class il extends Et {
|
|
|
5638
5634
|
}
|
|
5639
5635
|
draw(t) {
|
|
5640
5636
|
const { options: e, circumference: s } = this, n = (e.offset || 0) / 4, o = (e.spacing || 0) / 2, a = e.circular;
|
|
5641
|
-
if (this.pixelMargin = e.borderAlign === "inner" ? 0.33 : 0, this.fullCircles = s >
|
|
5637
|
+
if (this.pixelMargin = e.borderAlign === "inner" ? 0.33 : 0, this.fullCircles = s > V ? Math.floor(s / V) : 0, s === 0 || this.innerRadius < 0 || this.outerRadius < 0)
|
|
5642
5638
|
return;
|
|
5643
5639
|
t.save();
|
|
5644
5640
|
const r = (this.startAngle + this.endAngle) / 2;
|
|
@@ -5844,7 +5840,7 @@ class kn extends Et {
|
|
|
5844
5840
|
return;
|
|
5845
5841
|
}
|
|
5846
5842
|
this.width = this.right = t, this.height = this.bottom = e;
|
|
5847
|
-
const n =
|
|
5843
|
+
const n = F(s.text) ? s.text.length : 1;
|
|
5848
5844
|
this._padding = G(s.padding);
|
|
5849
5845
|
const o = n * $(s.font).lineHeight + this._padding.height;
|
|
5850
5846
|
this.isHorizontal() ? this.height = o : this.width = o;
|
|
@@ -5964,7 +5960,7 @@ const Yt = {
|
|
|
5964
5960
|
}
|
|
5965
5961
|
};
|
|
5966
5962
|
function et(i, t) {
|
|
5967
|
-
return t && (
|
|
5963
|
+
return t && (F(t) ? Array.prototype.push.apply(i, t) : i.push(t)), i;
|
|
5968
5964
|
}
|
|
5969
5965
|
function at(i) {
|
|
5970
5966
|
return (typeof i == "string" || i instanceof String) && i.indexOf(`
|
|
@@ -6561,11 +6557,11 @@ function Dl(i, t) {
|
|
|
6561
6557
|
for (b && (u && k !== a ? (e.push({
|
|
6562
6558
|
value: a
|
|
6563
6559
|
}), k < a && I++, xe(Math.round((k + I * x) * v) / v, a, Ps(a, M, i)) && I++) : k < a && I++); I < w; ++I) {
|
|
6564
|
-
const
|
|
6565
|
-
if (_ &&
|
|
6560
|
+
const T = Math.round((k + I * x) * v) / v;
|
|
6561
|
+
if (_ && T > r)
|
|
6566
6562
|
break;
|
|
6567
6563
|
e.push({
|
|
6568
|
-
value:
|
|
6564
|
+
value: T
|
|
6569
6565
|
});
|
|
6570
6566
|
}
|
|
6571
6567
|
return _ && u && P !== r ? e.length && xe(e[e.length - 1].value, r, Ps(r, M, i)) ? e[e.length - 1].value = r : e.push({
|
|
@@ -6762,7 +6758,7 @@ function oi(i) {
|
|
|
6762
6758
|
return 0;
|
|
6763
6759
|
}
|
|
6764
6760
|
function Tl(i, t, e) {
|
|
6765
|
-
return e =
|
|
6761
|
+
return e = F(e) ? e : [
|
|
6766
6762
|
e
|
|
6767
6763
|
], {
|
|
6768
6764
|
w: Io(i, t.string, e),
|
|
@@ -6890,7 +6886,7 @@ function Hl(i, t) {
|
|
|
6890
6886
|
function wn(i, t, e, s) {
|
|
6891
6887
|
const { ctx: n } = i;
|
|
6892
6888
|
if (e)
|
|
6893
|
-
n.arc(i.xCenter, i.yCenter, t, 0,
|
|
6889
|
+
n.arc(i.xCenter, i.yCenter, t, 0, V);
|
|
6894
6890
|
else {
|
|
6895
6891
|
let o = i.getPointPosition(0, t);
|
|
6896
6892
|
n.moveTo(o.x, o.y);
|
|
@@ -6984,7 +6980,7 @@ class fc extends Re {
|
|
|
6984
6980
|
this.xCenter += Math.floor((t - e) / 2), this.yCenter += Math.floor((s - n) / 2), this.drawingArea -= Math.min(this.drawingArea / 2, Math.max(t, e, s, n));
|
|
6985
6981
|
}
|
|
6986
6982
|
getIndexAngle(t) {
|
|
6987
|
-
const e =
|
|
6983
|
+
const e = V / (this._pointLabels.length || 1), s = this.options.startAngle || 0;
|
|
6988
6984
|
return st(t * e + tt(s));
|
|
6989
6985
|
}
|
|
6990
6986
|
getDistanceFromCenterForValue(t) {
|