@mozaic-ds/chart 0.1.0-beta.23 → 0.1.0-beta.26
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/README.md +1 -1
- package/dist/mozaic-chart.js +664 -647
- package/dist/mozaic-chart.umd.cjs +6 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/bar/BarChart.vue +2 -0
- package/src/components/line/LineChart.stories.ts +24 -0
- package/src/components/line/LineChart.vue +37 -21
- package/src/components/mixed/MixedBarLineChart.vue +3 -1
package/dist/mozaic-chart.js
CHANGED
|
@@ -21,7 +21,7 @@ function Lt(i) {
|
|
|
21
21
|
function vt(i) {
|
|
22
22
|
return At(Ye(i / 2.55) / 100, 0, 1);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function Hn(i) {
|
|
25
25
|
return At(Ye(i * 100), 0, 100);
|
|
26
26
|
}
|
|
27
27
|
const at = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15 }, Qi = [..."0123456789ABCDEF"], Ra = (i) => Qi[i & 15], Ea = (i) => Qi[(i & 240) >> 4] + Qi[i & 15], Ke = (i) => (i & 240) >> 4 === (i & 15), Ba = (i) => Ke(i.r) && Ke(i.g) && Ke(i.b) && Ke(i.a);
|
|
@@ -39,10 +39,10 @@ function za(i) {
|
|
|
39
39
|
a: t === 9 ? at[i[7]] << 4 | at[i[8]] : 255
|
|
40
40
|
})), e;
|
|
41
41
|
}
|
|
42
|
-
const
|
|
43
|
-
function
|
|
42
|
+
const Ha = (i, t) => i < 255 ? t(i) : "";
|
|
43
|
+
function Wa(i) {
|
|
44
44
|
var t = Ba(i) ? Ra : Ea;
|
|
45
|
-
return i ? "#" + t(i.r) + t(i.g) + t(i.b) +
|
|
45
|
+
return i ? "#" + t(i.r) + t(i.g) + t(i.b) + Ha(i.a, t) : void 0;
|
|
46
46
|
}
|
|
47
47
|
const Na = /^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;
|
|
48
48
|
function xo(i, t, e) {
|
|
@@ -104,10 +104,10 @@ function Ga(i, t) {
|
|
|
104
104
|
function qa(i) {
|
|
105
105
|
if (!i)
|
|
106
106
|
return;
|
|
107
|
-
const t = yn(i), e = t[0], n =
|
|
107
|
+
const t = yn(i), e = t[0], n = Hn(t[1]), s = Hn(t[2]);
|
|
108
108
|
return i.a < 255 ? `hsla(${e}, ${n}%, ${s}%, ${vt(i.a)})` : `hsl(${e}, ${n}%, ${s}%)`;
|
|
109
109
|
}
|
|
110
|
-
const
|
|
110
|
+
const Wn = {
|
|
111
111
|
x: "dark",
|
|
112
112
|
Z: "light",
|
|
113
113
|
Y: "re",
|
|
@@ -286,11 +286,11 @@ const Hn = {
|
|
|
286
286
|
LwgYF: "9acd32"
|
|
287
287
|
};
|
|
288
288
|
function Ka() {
|
|
289
|
-
const i = {}, t = Object.keys(Nn), e = Object.keys(
|
|
289
|
+
const i = {}, t = Object.keys(Nn), e = Object.keys(Wn);
|
|
290
290
|
let n, s, o, a, r;
|
|
291
291
|
for (n = 0; n < t.length; n++) {
|
|
292
292
|
for (a = r = t[n], s = 0; s < e.length; s++)
|
|
293
|
-
o = e[s], r = r.replace(o,
|
|
293
|
+
o = e[s], r = r.replace(o, Wn[o]);
|
|
294
294
|
o = parseInt(Nn[a], 16), i[r] = [o >> 16 & 255, o >> 8 & 255, o & 255];
|
|
295
295
|
}
|
|
296
296
|
return i;
|
|
@@ -352,9 +352,9 @@ function Vn(i) {
|
|
|
352
352
|
function ir(i) {
|
|
353
353
|
return i.charAt(0) === "r" ? Qa(i) : Xa(i);
|
|
354
354
|
}
|
|
355
|
-
class
|
|
355
|
+
class We {
|
|
356
356
|
constructor(t) {
|
|
357
|
-
if (t instanceof
|
|
357
|
+
if (t instanceof We)
|
|
358
358
|
return t;
|
|
359
359
|
const e = typeof t;
|
|
360
360
|
let n;
|
|
@@ -374,7 +374,7 @@ class He {
|
|
|
374
374
|
return this._valid ? tr(this._rgb) : void 0;
|
|
375
375
|
}
|
|
376
376
|
hexString() {
|
|
377
|
-
return this._valid ?
|
|
377
|
+
return this._valid ? Wa(this._rgb) : void 0;
|
|
378
378
|
}
|
|
379
379
|
hslString() {
|
|
380
380
|
return this._valid ? qa(this._rgb) : void 0;
|
|
@@ -392,7 +392,7 @@ class He {
|
|
|
392
392
|
return t && (this._rgb = er(this._rgb, t._rgb, e)), this;
|
|
393
393
|
}
|
|
394
394
|
clone() {
|
|
395
|
-
return new
|
|
395
|
+
return new We(this.rgb);
|
|
396
396
|
}
|
|
397
397
|
alpha(t) {
|
|
398
398
|
return this._rgb.a = Lt(t), this;
|
|
@@ -585,7 +585,7 @@ const Ne = (i) => typeof i < "u", It = (i) => typeof i == "function", $n = (i, t
|
|
|
585
585
|
function cr(i) {
|
|
586
586
|
return i.type === "mouseup" || i.type === "click" || i.type === "contextmenu";
|
|
587
587
|
}
|
|
588
|
-
const j = Math.PI,
|
|
588
|
+
const j = Math.PI, H = 2 * j, hr = H + j, Si = Number.POSITIVE_INFINITY, dr = j / 180, Y = j / 2, Et = j / 4, Un = j * 2 / 3, tn = Math.log10, mt = Math.sign;
|
|
589
589
|
function Re(i, t, e) {
|
|
590
590
|
return Math.abs(i - t) < e;
|
|
591
591
|
}
|
|
@@ -631,7 +631,7 @@ function Xn(i) {
|
|
|
631
631
|
function ko(i, t) {
|
|
632
632
|
const e = t.x - i.x, n = t.y - i.y, s = Math.sqrt(e * e + n * n);
|
|
633
633
|
let o = Math.atan2(n, e);
|
|
634
|
-
return o < -0.5 * j && (o +=
|
|
634
|
+
return o < -0.5 * j && (o += H), {
|
|
635
635
|
angle: o,
|
|
636
636
|
distance: s
|
|
637
637
|
};
|
|
@@ -640,10 +640,10 @@ function en(i, t) {
|
|
|
640
640
|
return Math.sqrt(Math.pow(t.x - i.x, 2) + Math.pow(t.y - i.y, 2));
|
|
641
641
|
}
|
|
642
642
|
function pr(i, t) {
|
|
643
|
-
return (i - t + hr) %
|
|
643
|
+
return (i - t + hr) % H - j;
|
|
644
644
|
}
|
|
645
645
|
function ot(i) {
|
|
646
|
-
return (i %
|
|
646
|
+
return (i % H + H) % H;
|
|
647
647
|
}
|
|
648
648
|
function je(i, t, e, n) {
|
|
649
649
|
const s = ot(i), o = ot(t), a = ot(e), r = ot(o - s), l = ot(a - s), c = ot(s - o), h = ot(s - a);
|
|
@@ -680,7 +680,7 @@ function yr(i, t, e) {
|
|
|
680
680
|
s--;
|
|
681
681
|
return n > 0 || s < i.length ? i.slice(n, s) : i;
|
|
682
682
|
}
|
|
683
|
-
const
|
|
683
|
+
const Mo = [
|
|
684
684
|
"push",
|
|
685
685
|
"pop",
|
|
686
686
|
"shift",
|
|
@@ -700,7 +700,7 @@ function xr(i, t) {
|
|
|
700
700
|
t
|
|
701
701
|
]
|
|
702
702
|
}
|
|
703
|
-
}),
|
|
703
|
+
}), Mo.forEach((e) => {
|
|
704
704
|
const n = "_onData" + vn(e), s = i[e];
|
|
705
705
|
Object.defineProperty(i, e, {
|
|
706
706
|
configurable: !0,
|
|
@@ -719,11 +719,11 @@ function Gn(i, t) {
|
|
|
719
719
|
if (!e)
|
|
720
720
|
return;
|
|
721
721
|
const n = e.listeners, s = n.indexOf(t);
|
|
722
|
-
s !== -1 && n.splice(s, 1), !(n.length > 0) && (
|
|
722
|
+
s !== -1 && n.splice(s, 1), !(n.length > 0) && (Mo.forEach((o) => {
|
|
723
723
|
delete i[o];
|
|
724
724
|
}), delete i._chartjs);
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function Co(i) {
|
|
727
727
|
const t = new Set(i);
|
|
728
728
|
return t.size === i.length ? i : Array.from(t);
|
|
729
729
|
}
|
|
@@ -781,7 +781,7 @@ function wr(i) {
|
|
|
781
781
|
const o = n.xmin !== t.min || n.xmax !== t.max || n.ymin !== e.min || n.ymax !== e.max;
|
|
782
782
|
return Object.assign(n, s), o;
|
|
783
783
|
}
|
|
784
|
-
const Qe = (i) => i === 0 || i === 1, qn = (i, t, e) => -(Math.pow(2, 10 * (i -= 1)) * Math.sin((i - t) *
|
|
784
|
+
const Qe = (i) => i === 0 || i === 1, qn = (i, t, e) => -(Math.pow(2, 10 * (i -= 1)) * Math.sin((i - t) * H / e)), Kn = (i, t, e) => Math.pow(2, -10 * i) * Math.sin((i - t) * H / e) + 1, Ee = {
|
|
785
785
|
linear: (i) => i,
|
|
786
786
|
easeInQuad: (i) => i * i,
|
|
787
787
|
easeOutQuad: (i) => -i * (i - 2),
|
|
@@ -825,7 +825,7 @@ const Qe = (i) => i === 0 || i === 1, qn = (i, t, e) => -(Math.pow(2, 10 * (i -=
|
|
|
825
825
|
},
|
|
826
826
|
easeInOutBounce: (i) => i < 0.5 ? Ee.easeInBounce(i * 2) * 0.5 : Ee.easeOutBounce(i * 2 - 1) * 0.5 + 0.5
|
|
827
827
|
};
|
|
828
|
-
function
|
|
828
|
+
function Mn(i) {
|
|
829
829
|
if (i && typeof i == "object") {
|
|
830
830
|
const t = i.toString();
|
|
831
831
|
return t === "[object CanvasPattern]" || t === "[object CanvasGradient]";
|
|
@@ -833,10 +833,10 @@ function Cn(i) {
|
|
|
833
833
|
return !1;
|
|
834
834
|
}
|
|
835
835
|
function Zn(i) {
|
|
836
|
-
return
|
|
836
|
+
return Mn(i) ? i : new We(i);
|
|
837
837
|
}
|
|
838
|
-
function
|
|
839
|
-
return
|
|
838
|
+
function Hi(i) {
|
|
839
|
+
return Mn(i) ? i : new We(i).saturate(0.5).darken(0.1).hexString();
|
|
840
840
|
}
|
|
841
841
|
const kr = [
|
|
842
842
|
"x",
|
|
@@ -844,12 +844,12 @@ const kr = [
|
|
|
844
844
|
"borderWidth",
|
|
845
845
|
"radius",
|
|
846
846
|
"tension"
|
|
847
|
-
],
|
|
847
|
+
], Mr = [
|
|
848
848
|
"color",
|
|
849
849
|
"borderColor",
|
|
850
850
|
"backgroundColor"
|
|
851
851
|
];
|
|
852
|
-
function
|
|
852
|
+
function Cr(i) {
|
|
853
853
|
i.set("animation", {
|
|
854
854
|
delay: void 0,
|
|
855
855
|
duration: 1e3,
|
|
@@ -866,7 +866,7 @@ function Mr(i) {
|
|
|
866
866
|
}), i.set("animations", {
|
|
867
867
|
colors: {
|
|
868
868
|
type: "color",
|
|
869
|
-
properties:
|
|
869
|
+
properties: Mr
|
|
870
870
|
},
|
|
871
871
|
numbers: {
|
|
872
872
|
type: "number",
|
|
@@ -928,7 +928,7 @@ function Ar(i, t) {
|
|
|
928
928
|
let n = Jn.get(e);
|
|
929
929
|
return n || (n = new Intl.NumberFormat(i, t), Jn.set(e, n)), n;
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function Cn(i, t, e) {
|
|
932
932
|
return Ar(t, e).format(i);
|
|
933
933
|
}
|
|
934
934
|
const Do = {
|
|
@@ -949,7 +949,7 @@ const Do = {
|
|
|
949
949
|
minimumFractionDigits: r,
|
|
950
950
|
maximumFractionDigits: r
|
|
951
951
|
};
|
|
952
|
-
return Object.assign(l, this.options.ticks.format),
|
|
952
|
+
return Object.assign(l, this.options.ticks.format), Cn(i, n, l);
|
|
953
953
|
},
|
|
954
954
|
logarithmic(i, t, e) {
|
|
955
955
|
if (i === 0)
|
|
@@ -1047,7 +1047,7 @@ function Be(i, t) {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
return i;
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1050
|
+
function Wi(i, t, e) {
|
|
1051
1051
|
return typeof t == "string" ? bt(Be(i, t), e) : bt(Be(i, ""), t);
|
|
1052
1052
|
}
|
|
1053
1053
|
class Tr {
|
|
@@ -1064,23 +1064,23 @@ class Tr {
|
|
|
1064
1064
|
style: "normal",
|
|
1065
1065
|
lineHeight: 1.2,
|
|
1066
1066
|
weight: null
|
|
1067
|
-
}, this.hover = {}, this.hoverBackgroundColor = (n, s) =>
|
|
1067
|
+
}, this.hover = {}, this.hoverBackgroundColor = (n, s) => Hi(s.backgroundColor), this.hoverBorderColor = (n, s) => Hi(s.borderColor), this.hoverColor = (n, s) => Hi(s.color), this.indexAxis = "x", this.interaction = {
|
|
1068
1068
|
mode: "nearest",
|
|
1069
1069
|
intersect: !0,
|
|
1070
1070
|
includeInvisible: !1
|
|
1071
1071
|
}, this.maintainAspectRatio = !0, this.onHover = null, this.onClick = null, this.parsing = !0, this.plugins = {}, this.responsive = !0, this.scale = void 0, this.scales = {}, this.showLine = !0, this.drawActiveElementsOnTop = !0, this.describe(t), this.apply(e);
|
|
1072
1072
|
}
|
|
1073
1073
|
set(t, e) {
|
|
1074
|
-
return
|
|
1074
|
+
return Wi(this, t, e);
|
|
1075
1075
|
}
|
|
1076
1076
|
get(t) {
|
|
1077
1077
|
return Be(this, t);
|
|
1078
1078
|
}
|
|
1079
1079
|
describe(t, e) {
|
|
1080
|
-
return
|
|
1080
|
+
return Wi(nn, t, e);
|
|
1081
1081
|
}
|
|
1082
1082
|
override(t, e) {
|
|
1083
|
-
return
|
|
1083
|
+
return Wi(Yt, t, e);
|
|
1084
1084
|
}
|
|
1085
1085
|
route(t, e, n, s) {
|
|
1086
1086
|
const o = Be(this, t), a = Be(this, n), r = "_" + e;
|
|
@@ -1116,7 +1116,7 @@ var $ = /* @__PURE__ */ new Tr({
|
|
|
1116
1116
|
_indexable: !1
|
|
1117
1117
|
}
|
|
1118
1118
|
}, [
|
|
1119
|
-
|
|
1119
|
+
Cr,
|
|
1120
1120
|
Pr,
|
|
1121
1121
|
Lr
|
|
1122
1122
|
]);
|
|
@@ -1162,44 +1162,44 @@ function sn(i, t, e, n) {
|
|
|
1162
1162
|
function Lo(i, t, e, n, s) {
|
|
1163
1163
|
let o, a, r, l, c, h, d, u;
|
|
1164
1164
|
const f = t.pointStyle, p = t.rotation, g = t.radius;
|
|
1165
|
-
let
|
|
1165
|
+
let b = (p || 0) * dr;
|
|
1166
1166
|
if (f && typeof f == "object" && (o = f.toString(), o === "[object HTMLImageElement]" || o === "[object HTMLCanvasElement]")) {
|
|
1167
|
-
i.save(), i.translate(e, n), i.rotate(
|
|
1167
|
+
i.save(), i.translate(e, n), i.rotate(b), i.drawImage(f, -f.width / 2, -f.height / 2, f.width, f.height), i.restore();
|
|
1168
1168
|
return;
|
|
1169
1169
|
}
|
|
1170
1170
|
if (!(isNaN(g) || g <= 0)) {
|
|
1171
1171
|
switch (i.beginPath(), f) {
|
|
1172
1172
|
default:
|
|
1173
|
-
s ? i.ellipse(e, n, s / 2, g, 0, 0,
|
|
1173
|
+
s ? i.ellipse(e, n, s / 2, g, 0, 0, H) : i.arc(e, n, g, 0, H), i.closePath();
|
|
1174
1174
|
break;
|
|
1175
1175
|
case "triangle":
|
|
1176
|
-
h = s ? s / 2 : g, i.moveTo(e + Math.sin(
|
|
1176
|
+
h = s ? s / 2 : g, i.moveTo(e + Math.sin(b) * h, n - Math.cos(b) * g), b += Un, i.lineTo(e + Math.sin(b) * h, n - Math.cos(b) * g), b += Un, i.lineTo(e + Math.sin(b) * h, n - Math.cos(b) * g), i.closePath();
|
|
1177
1177
|
break;
|
|
1178
1178
|
case "rectRounded":
|
|
1179
|
-
c = g * 0.516, l = g - c, a = Math.cos(
|
|
1179
|
+
c = g * 0.516, l = g - c, a = Math.cos(b + Et) * l, d = Math.cos(b + Et) * (s ? s / 2 - c : l), r = Math.sin(b + Et) * l, u = Math.sin(b + Et) * (s ? s / 2 - c : l), i.arc(e - d, n - r, c, b - j, b - Y), i.arc(e + u, n - a, c, b - Y, b), i.arc(e + d, n + r, c, b, b + Y), i.arc(e - u, n + a, c, b + Y, b + j), i.closePath();
|
|
1180
1180
|
break;
|
|
1181
1181
|
case "rect":
|
|
1182
1182
|
if (!p) {
|
|
1183
1183
|
l = Math.SQRT1_2 * g, h = s ? s / 2 : l, i.rect(e - h, n - l, 2 * h, 2 * l);
|
|
1184
1184
|
break;
|
|
1185
1185
|
}
|
|
1186
|
-
|
|
1186
|
+
b += Et;
|
|
1187
1187
|
case "rectRot":
|
|
1188
|
-
d = Math.cos(
|
|
1188
|
+
d = Math.cos(b) * (s ? s / 2 : g), a = Math.cos(b) * g, r = Math.sin(b) * g, u = Math.sin(b) * (s ? s / 2 : g), i.moveTo(e - d, n - r), i.lineTo(e + u, n - a), i.lineTo(e + d, n + r), i.lineTo(e - u, n + a), i.closePath();
|
|
1189
1189
|
break;
|
|
1190
1190
|
case "crossRot":
|
|
1191
|
-
|
|
1191
|
+
b += Et;
|
|
1192
1192
|
case "cross":
|
|
1193
|
-
d = Math.cos(
|
|
1193
|
+
d = Math.cos(b) * (s ? s / 2 : g), a = Math.cos(b) * g, r = Math.sin(b) * g, u = Math.sin(b) * (s ? s / 2 : g), i.moveTo(e - d, n - r), i.lineTo(e + d, n + r), i.moveTo(e + u, n - a), i.lineTo(e - u, n + a);
|
|
1194
1194
|
break;
|
|
1195
1195
|
case "star":
|
|
1196
|
-
d = Math.cos(
|
|
1196
|
+
d = Math.cos(b) * (s ? s / 2 : g), a = Math.cos(b) * g, r = Math.sin(b) * g, u = Math.sin(b) * (s ? s / 2 : g), i.moveTo(e - d, n - r), i.lineTo(e + d, n + r), i.moveTo(e + u, n - a), i.lineTo(e - u, n + a), b += Et, d = Math.cos(b) * (s ? s / 2 : g), a = Math.cos(b) * g, r = Math.sin(b) * g, u = Math.sin(b) * (s ? s / 2 : g), i.moveTo(e - d, n - r), i.lineTo(e + d, n + r), i.moveTo(e + u, n - a), i.lineTo(e - u, n + a);
|
|
1197
1197
|
break;
|
|
1198
1198
|
case "line":
|
|
1199
|
-
a = s ? s / 2 : Math.cos(
|
|
1199
|
+
a = s ? s / 2 : Math.cos(b) * g, r = Math.sin(b) * g, i.moveTo(e - a, n - r), i.lineTo(e + a, n + r);
|
|
1200
1200
|
break;
|
|
1201
1201
|
case "dash":
|
|
1202
|
-
i.moveTo(e, n), i.lineTo(e + Math.cos(
|
|
1202
|
+
i.moveTo(e, n), i.lineTo(e + Math.cos(b) * (s ? s / 2 : g), n + Math.sin(b) * g);
|
|
1203
1203
|
break;
|
|
1204
1204
|
case !1:
|
|
1205
1205
|
i.closePath();
|
|
@@ -1258,9 +1258,9 @@ function $e(i, t) {
|
|
|
1258
1258
|
const { x: e, y: n, w: s, h: o, radius: a } = t;
|
|
1259
1259
|
i.arc(e + a.topLeft, n + a.topLeft, a.topLeft, 1.5 * j, j, !0), i.lineTo(e, n + o - a.bottomLeft), i.arc(e + a.bottomLeft, n + o - a.bottomLeft, a.bottomLeft, j, Y, !0), i.lineTo(e + s - a.bottomRight, n + o), i.arc(e + s - a.bottomRight, n + o - a.bottomRight, a.bottomRight, Y, 0, !0), i.lineTo(e + s, n + a.topRight), i.arc(e + s - a.topRight, n + a.topRight, a.topRight, 0, -Y, !0), i.lineTo(e + a.topLeft, n);
|
|
1260
1260
|
}
|
|
1261
|
-
const
|
|
1261
|
+
const Hr = /^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/, Wr = /^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;
|
|
1262
1262
|
function Nr(i, t) {
|
|
1263
|
-
const e = ("" + i).match(
|
|
1263
|
+
const e = ("" + i).match(Hr);
|
|
1264
1264
|
if (!e || e[1] === "normal")
|
|
1265
1265
|
return t * 1.2;
|
|
1266
1266
|
switch (i = +e[2], e[3]) {
|
|
@@ -1304,7 +1304,7 @@ function X(i, t) {
|
|
|
1304
1304
|
let e = L(i.size, t.size);
|
|
1305
1305
|
typeof e == "string" && (e = parseInt(e, 10));
|
|
1306
1306
|
let n = L(i.style, t.style);
|
|
1307
|
-
n && !("" + n).match(
|
|
1307
|
+
n && !("" + n).match(Wr) && (console.warn('Invalid font style specified: "' + n + '"'), n = void 0);
|
|
1308
1308
|
const s = {
|
|
1309
1309
|
family: L(i.family, t.family),
|
|
1310
1310
|
lineHeight: Nr(L(i.lineHeight, t.lineHeight), e),
|
|
@@ -1693,7 +1693,7 @@ function hl(i, t) {
|
|
|
1693
1693
|
box: a
|
|
1694
1694
|
};
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1696
|
+
function Ht(i, t) {
|
|
1697
1697
|
if ("native" in i)
|
|
1698
1698
|
return i;
|
|
1699
1699
|
const { canvas: e, currentDevicePixelRatio: n } = t, s = Ti(e), o = s.boxSizing === "border-box", a = jt(s, "padding"), r = jt(s, "border", "width"), { x: l, y: c, box: h } = hl(i, e), d = a.left + (h && r.left), u = a.top + (h && r.top);
|
|
@@ -1757,7 +1757,7 @@ function ns(i, t) {
|
|
|
1757
1757
|
const e = rl(i, t), n = e && e.match(/^(\d+)(\.\d+)?px$/);
|
|
1758
1758
|
return n ? +n[1] : void 0;
|
|
1759
1759
|
}
|
|
1760
|
-
function
|
|
1760
|
+
function Wt(i, t, e, n) {
|
|
1761
1761
|
return {
|
|
1762
1762
|
x: i.x + e * (t.x - i.x),
|
|
1763
1763
|
y: i.y + e * (t.y - i.y)
|
|
@@ -1776,8 +1776,8 @@ function pl(i, t, e, n) {
|
|
|
1776
1776
|
}, o = {
|
|
1777
1777
|
x: t.cp1x,
|
|
1778
1778
|
y: t.cp1y
|
|
1779
|
-
}, a =
|
|
1780
|
-
return
|
|
1779
|
+
}, a = Wt(i, s, e), r = Wt(s, o, e), l = Wt(o, t, e), c = Wt(a, r, e), h = Wt(r, l, e);
|
|
1780
|
+
return Wt(c, h, e);
|
|
1781
1781
|
}
|
|
1782
1782
|
const ml = function(i, t) {
|
|
1783
1783
|
return {
|
|
@@ -1825,10 +1825,10 @@ function zo(i, t) {
|
|
|
1825
1825
|
e.getPropertyPriority("direction")
|
|
1826
1826
|
], e.setProperty("direction", t, "important"), i.prevTextDirection = n);
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1828
|
+
function Ho(i, t) {
|
|
1829
1829
|
t !== void 0 && (delete i.prevTextDirection, i.canvas.style.setProperty("direction", t[0], t[1]));
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1831
|
+
function Wo(i) {
|
|
1832
1832
|
return i === "angle" ? {
|
|
1833
1833
|
between: je,
|
|
1834
1834
|
compare: pr,
|
|
@@ -1848,7 +1848,7 @@ function ss({ start: i, end: t, count: e, loop: n, style: s }) {
|
|
|
1848
1848
|
};
|
|
1849
1849
|
}
|
|
1850
1850
|
function yl(i, t, e) {
|
|
1851
|
-
const { property: n, start: s, end: o } = e, { between: a, normalize: r } =
|
|
1851
|
+
const { property: n, start: s, end: o } = e, { between: a, normalize: r } = Wo(n), l = t.length;
|
|
1852
1852
|
let { start: c, end: h, loop: d } = i, u, f;
|
|
1853
1853
|
if (d) {
|
|
1854
1854
|
for (c += l, h += l, u = 0, f = l; u < f && a(r(t[c % l][n]), s, o); ++u)
|
|
@@ -1867,19 +1867,19 @@ function No(i, t, e) {
|
|
|
1867
1867
|
return [
|
|
1868
1868
|
i
|
|
1869
1869
|
];
|
|
1870
|
-
const { property: n, start: s, end: o } = e, a = t.length, { compare: r, between: l, normalize: c } =
|
|
1871
|
-
let g = !1,
|
|
1872
|
-
const
|
|
1873
|
-
for (let
|
|
1874
|
-
y = t[
|
|
1875
|
-
start:
|
|
1876
|
-
end:
|
|
1870
|
+
const { property: n, start: s, end: o } = e, a = t.length, { compare: r, between: l, normalize: c } = Wo(n), { start: h, end: d, loop: u, style: f } = yl(i, t, e), p = [];
|
|
1871
|
+
let g = !1, b = null, m, y, x;
|
|
1872
|
+
const _ = () => l(s, x, m) && r(s, x) !== 0, v = () => r(o, m) === 0 || l(o, x, m), w = () => g || _(), M = () => !g || v();
|
|
1873
|
+
for (let S = h, A = h; S <= d; ++S)
|
|
1874
|
+
y = t[S % a], !y.skip && (m = c(y[n]), m !== x && (g = l(m, s, o), b === null && w() && (b = r(m, s) === 0 ? S : A), b !== null && M() && (p.push(ss({
|
|
1875
|
+
start: b,
|
|
1876
|
+
end: S,
|
|
1877
1877
|
loop: u,
|
|
1878
1878
|
count: a,
|
|
1879
1879
|
style: f
|
|
1880
|
-
})),
|
|
1881
|
-
return
|
|
1882
|
-
start:
|
|
1880
|
+
})), b = null), A = S, x = m));
|
|
1881
|
+
return b !== null && p.push(ss({
|
|
1882
|
+
start: b,
|
|
1883
1883
|
end: d,
|
|
1884
1884
|
loop: u,
|
|
1885
1885
|
count: a,
|
|
@@ -1947,7 +1947,7 @@ function os(i, t, e, n) {
|
|
|
1947
1947
|
function Sl(i, t, e, n) {
|
|
1948
1948
|
const s = i._chart.getContext(), o = as(i.options), { _datasetIndex: a, options: { spanGaps: r } } = i, l = e.length, c = [];
|
|
1949
1949
|
let h = o, d = t[0].start, u = d;
|
|
1950
|
-
function f(p, g,
|
|
1950
|
+
function f(p, g, b, m) {
|
|
1951
1951
|
const y = r ? -1 : 1;
|
|
1952
1952
|
if (p !== g) {
|
|
1953
1953
|
for (p += l; e[p % l].skip; )
|
|
@@ -1957,24 +1957,24 @@ function Sl(i, t, e, n) {
|
|
|
1957
1957
|
p % l !== g % l && (c.push({
|
|
1958
1958
|
start: p % l,
|
|
1959
1959
|
end: g % l,
|
|
1960
|
-
loop:
|
|
1961
|
-
style:
|
|
1962
|
-
}), h =
|
|
1960
|
+
loop: b,
|
|
1961
|
+
style: m
|
|
1962
|
+
}), h = m, d = g % l);
|
|
1963
1963
|
}
|
|
1964
1964
|
}
|
|
1965
1965
|
for (const p of t) {
|
|
1966
1966
|
d = r ? d : p.start;
|
|
1967
|
-
let g = e[d % l],
|
|
1967
|
+
let g = e[d % l], b;
|
|
1968
1968
|
for (u = d + 1; u <= p.end; u++) {
|
|
1969
|
-
const
|
|
1970
|
-
|
|
1969
|
+
const m = e[u % l];
|
|
1970
|
+
b = as(n.setContext(Rt(s, {
|
|
1971
1971
|
type: "segment",
|
|
1972
1972
|
p0: g,
|
|
1973
|
-
p1:
|
|
1973
|
+
p1: m,
|
|
1974
1974
|
p0DataIndex: (u - 1) % l,
|
|
1975
1975
|
p1DataIndex: u % l,
|
|
1976
1976
|
datasetIndex: a
|
|
1977
|
-
}))), wl(
|
|
1977
|
+
}))), wl(b, h) && f(d, u - 1, p.loop, h), g = m, h = b;
|
|
1978
1978
|
}
|
|
1979
1979
|
d < u - 1 && f(d, u - 1, p.loop, h);
|
|
1980
1980
|
}
|
|
@@ -1995,7 +1995,7 @@ function wl(i, t) {
|
|
|
1995
1995
|
if (!t)
|
|
1996
1996
|
return !1;
|
|
1997
1997
|
const e = [], n = function(s, o) {
|
|
1998
|
-
return
|
|
1998
|
+
return Mn(o) ? (e.includes(o) || e.push(o), e.indexOf(o)) : o;
|
|
1999
1999
|
};
|
|
2000
2000
|
return JSON.stringify(i, n) !== JSON.stringify(t, n);
|
|
2001
2001
|
}
|
|
@@ -2082,7 +2082,7 @@ class kl {
|
|
|
2082
2082
|
}
|
|
2083
2083
|
}
|
|
2084
2084
|
var xt = /* @__PURE__ */ new kl();
|
|
2085
|
-
const rs = "transparent",
|
|
2085
|
+
const rs = "transparent", Ml = {
|
|
2086
2086
|
boolean(i, t, e) {
|
|
2087
2087
|
return e > 0.5 ? t : i;
|
|
2088
2088
|
},
|
|
@@ -2094,7 +2094,7 @@ const rs = "transparent", Cl = {
|
|
|
2094
2094
|
return i + (t - i) * e;
|
|
2095
2095
|
}
|
|
2096
2096
|
};
|
|
2097
|
-
class
|
|
2097
|
+
class Cl {
|
|
2098
2098
|
constructor(t, e, n, s) {
|
|
2099
2099
|
const o = e[n];
|
|
2100
2100
|
s = V([
|
|
@@ -2108,7 +2108,7 @@ class Ml {
|
|
|
2108
2108
|
o,
|
|
2109
2109
|
s
|
|
2110
2110
|
]);
|
|
2111
|
-
this._active = !0, this._fn = t.fn ||
|
|
2111
|
+
this._active = !0, this._fn = t.fn || Ml[t.type || typeof a], this._easing = Ee[t.easing] || Ee.linear, this._start = Math.floor(Date.now() + (t.delay || 0)), this._duration = this._total = Math.floor(t.duration), this._loop = !!t.loop, this._target = e, this._prop = n, this._from = a, this._to = s, this._promises = void 0;
|
|
2112
2112
|
}
|
|
2113
2113
|
active() {
|
|
2114
2114
|
return this._active;
|
|
@@ -2216,7 +2216,7 @@ class jo {
|
|
|
2216
2216
|
t[c] = h;
|
|
2217
2217
|
continue;
|
|
2218
2218
|
}
|
|
2219
|
-
o[c] = d = new
|
|
2219
|
+
o[c] = d = new Cl(u, t, c, h), s.push(d);
|
|
2220
2220
|
}
|
|
2221
2221
|
return s;
|
|
2222
2222
|
}
|
|
@@ -2341,10 +2341,10 @@ function us(i, t) {
|
|
|
2341
2341
|
const { chart: e, _cachedMeta: n } = i, s = e._stacks || (e._stacks = {}), { iScale: o, vScale: a, index: r } = n, l = o.axis, c = a.axis, h = Ol(o, a, n), d = t.length;
|
|
2342
2342
|
let u;
|
|
2343
2343
|
for (let f = 0; f < d; ++f) {
|
|
2344
|
-
const p = t[f], { [l]: g, [c]:
|
|
2345
|
-
u =
|
|
2344
|
+
const p = t[f], { [l]: g, [c]: b } = p, m = p._stacks || (p._stacks = {});
|
|
2345
|
+
u = m[c] = Fl(s, h, g), u[r] = b, u._top = ds(u, a, !0, n.type), u._bottom = ds(u, a, !1, n.type);
|
|
2346
2346
|
const y = u._visualValues || (u._visualValues = {});
|
|
2347
|
-
y[r] =
|
|
2347
|
+
y[r] = b;
|
|
2348
2348
|
}
|
|
2349
2349
|
}
|
|
2350
2350
|
function Ni(i, t) {
|
|
@@ -2389,7 +2389,7 @@ const Vi = (i) => i === "reset" || i === "none", fs = (i, t) => t ? i : Object.a
|
|
|
2389
2389
|
keys: $o(e, !0),
|
|
2390
2390
|
values: null
|
|
2391
2391
|
};
|
|
2392
|
-
class
|
|
2392
|
+
class Mt {
|
|
2393
2393
|
constructor(t, e) {
|
|
2394
2394
|
this.chart = t, this._ctx = t.ctx, this.index = e, this._cachedDataOpts = {}, this._cachedMeta = this.getMeta(), this._type = this._cachedMeta.type, this.options = void 0, this._parsing = !1, this._data = void 0, this._objectData = void 0, this._sharedOptions = void 0, this._drawStart = void 0, this._drawCount = void 0, this.enableOptionSharing = !1, this.supportsDecimation = !1, this.$context = void 0, this._syncList = [], this.datasetElementType = new.target.datasetElementType, this.dataElementType = new.target.dataElementType, this.initialize();
|
|
2395
2395
|
}
|
|
@@ -2744,18 +2744,18 @@ class Ct {
|
|
|
2744
2744
|
]);
|
|
2745
2745
|
}
|
|
2746
2746
|
}
|
|
2747
|
-
k(
|
|
2747
|
+
k(Mt, "defaults", {}), k(Mt, "datasetElementType", null), k(Mt, "dataElementType", null);
|
|
2748
2748
|
function zl(i, t) {
|
|
2749
2749
|
if (!i._cache.$bar) {
|
|
2750
2750
|
const e = i.getMatchingVisibleMetas(t);
|
|
2751
2751
|
let n = [];
|
|
2752
2752
|
for (let s = 0, o = e.length; s < o; s++)
|
|
2753
2753
|
n = n.concat(e[s].controller.getAllParsedValues(i));
|
|
2754
|
-
i._cache.$bar =
|
|
2754
|
+
i._cache.$bar = Co(n.sort((s, o) => s - o));
|
|
2755
2755
|
}
|
|
2756
2756
|
return i._cache.$bar;
|
|
2757
2757
|
}
|
|
2758
|
-
function
|
|
2758
|
+
function Hl(i) {
|
|
2759
2759
|
const t = i.iScale, e = zl(t, i.type);
|
|
2760
2760
|
let n = t._length, s, o, a, r;
|
|
2761
2761
|
const l = () => {
|
|
@@ -2767,7 +2767,7 @@ function Wl(i) {
|
|
|
2767
2767
|
a = t.getPixelForTick(s), l();
|
|
2768
2768
|
return n;
|
|
2769
2769
|
}
|
|
2770
|
-
function
|
|
2770
|
+
function Wl(i, t, e, n) {
|
|
2771
2771
|
const s = e.barThickness;
|
|
2772
2772
|
let o, a;
|
|
2773
2773
|
return O(s) ? (o = t.min * e.categoryPercentage, a = e.barPercentage) : (o = s * n, a = 1), {
|
|
@@ -2857,7 +2857,7 @@ function ms(i, t, e) {
|
|
|
2857
2857
|
function Xl(i, { inflateAmount: t }, e) {
|
|
2858
2858
|
i.inflateAmount = t === "auto" ? e === 1 ? 0.33 : 0 : t;
|
|
2859
2859
|
}
|
|
2860
|
-
class fi extends
|
|
2860
|
+
class fi extends Mt {
|
|
2861
2861
|
parsePrimitiveData(t, e, n, s) {
|
|
2862
2862
|
return gs(t, e, n, s);
|
|
2863
2863
|
}
|
|
@@ -2901,18 +2901,18 @@ class fi extends Ct {
|
|
|
2901
2901
|
const p = this.getParsed(f), g = o || O(p[r.axis]) ? {
|
|
2902
2902
|
base: l,
|
|
2903
2903
|
head: l
|
|
2904
|
-
} : this._calculateBarValuePixels(f),
|
|
2904
|
+
} : this._calculateBarValuePixels(f), b = this._calculateBarIndexPixels(f, h), m = (p._stacks || {})[r.axis], y = {
|
|
2905
2905
|
horizontal: c,
|
|
2906
2906
|
base: g.base,
|
|
2907
|
-
enableBorderRadius: !
|
|
2908
|
-
x: c ? g.head :
|
|
2909
|
-
y: c ?
|
|
2910
|
-
height: c ?
|
|
2911
|
-
width: c ? Math.abs(g.size) :
|
|
2907
|
+
enableBorderRadius: !m || ji(p._custom) || a === m._top || a === m._bottom,
|
|
2908
|
+
x: c ? g.head : b.center,
|
|
2909
|
+
y: c ? b.center : g.head,
|
|
2910
|
+
height: c ? b.size : Math.abs(g.size),
|
|
2911
|
+
width: c ? Math.abs(g.size) : b.size
|
|
2912
2912
|
};
|
|
2913
2913
|
u && (y.options = d || this.resolveDataElementOptions(f, t[f].active ? "active" : s));
|
|
2914
2914
|
const x = y.options || t[f].options;
|
|
2915
|
-
Ul(y, x,
|
|
2915
|
+
Ul(y, x, m, a), Xl(y, x, h.ratio), this.updateElement(t[f], f, y, s);
|
|
2916
2916
|
}
|
|
2917
2917
|
}
|
|
2918
2918
|
_getStacks(t, e) {
|
|
@@ -2940,7 +2940,7 @@ class fi extends Ct {
|
|
|
2940
2940
|
s.push(n.getPixelForValue(this.getParsed(o)[n.axis], o));
|
|
2941
2941
|
const r = t.barThickness;
|
|
2942
2942
|
return {
|
|
2943
|
-
min: r ||
|
|
2943
|
+
min: r || Hl(e),
|
|
2944
2944
|
pixels: s,
|
|
2945
2945
|
start: n._startPixel,
|
|
2946
2946
|
end: n._endPixel,
|
|
@@ -2954,20 +2954,20 @@ class fi extends Ct {
|
|
|
2954
2954
|
const { _cachedMeta: { vScale: e, _stacked: n, index: s }, options: { base: o, minBarLength: a } } = this, r = o || 0, l = this.getParsed(t), c = l._custom, h = ji(c);
|
|
2955
2955
|
let d = l[e.axis], u = 0, f = n ? this.applyStack(e, l, n) : d, p, g;
|
|
2956
2956
|
f !== d && (u = f - d, f = d), h && (d = c.barStart, f = c.barEnd - c.barStart, d !== 0 && mt(d) !== mt(c.barEnd) && (u = 0), u += d);
|
|
2957
|
-
const
|
|
2958
|
-
let
|
|
2959
|
-
if (this.chart.getDataVisibility(t) ? p = e.getPixelForValue(u + f) : p =
|
|
2960
|
-
g = jl(g, e, r) * a, d === r && (
|
|
2961
|
-
const y = e.getPixelForDecimal(0), x = e.getPixelForDecimal(1),
|
|
2962
|
-
|
|
2963
|
-
}
|
|
2964
|
-
if (
|
|
2957
|
+
const b = !O(o) && !h ? o : u;
|
|
2958
|
+
let m = e.getPixelForValue(b);
|
|
2959
|
+
if (this.chart.getDataVisibility(t) ? p = e.getPixelForValue(u + f) : p = m, g = p - m, Math.abs(g) < a) {
|
|
2960
|
+
g = jl(g, e, r) * a, d === r && (m -= g / 2);
|
|
2961
|
+
const y = e.getPixelForDecimal(0), x = e.getPixelForDecimal(1), _ = Math.min(y, x), v = Math.max(y, x);
|
|
2962
|
+
m = Math.max(Math.min(m, v), _), p = m + g, n && !h && (l._stacks[e.axis]._visualValues[s] = e.getValueForPixel(p) - e.getValueForPixel(m));
|
|
2963
|
+
}
|
|
2964
|
+
if (m === e.getPixelForValue(r)) {
|
|
2965
2965
|
const y = mt(g) * e.getLineWidthForValue(r) / 2;
|
|
2966
|
-
|
|
2966
|
+
m += y, g -= y;
|
|
2967
2967
|
}
|
|
2968
2968
|
return {
|
|
2969
2969
|
size: g,
|
|
2970
|
-
base:
|
|
2970
|
+
base: m,
|
|
2971
2971
|
head: p,
|
|
2972
2972
|
center: p + g / 2
|
|
2973
2973
|
};
|
|
@@ -2976,7 +2976,7 @@ class fi extends Ct {
|
|
|
2976
2976
|
const n = e.scale, s = this.options, o = s.skipNull, a = L(s.maxBarThickness, 1 / 0);
|
|
2977
2977
|
let r, l;
|
|
2978
2978
|
if (e.grouped) {
|
|
2979
|
-
const c = o ? this._getStackCount(t) : e.stackCount, h = s.barThickness === "flex" ? Nl(t, e, s, c) :
|
|
2979
|
+
const c = o ? this._getStackCount(t) : e.stackCount, h = s.barThickness === "flex" ? Nl(t, e, s, c) : Wl(t, e, s, c), d = this._getStackIndex(this.index, this._cachedMeta.stack, o ? t : void 0);
|
|
2980
2980
|
r = h.start + h.chunk * d + h.chunk / 2, l = Math.min(a, h.chunk * h.ratio);
|
|
2981
2981
|
} else
|
|
2982
2982
|
r = n.getPixelForValue(this.getParsed(t)[n.axis], t), l = Math.min(a, e.min * e.ratio);
|
|
@@ -3027,7 +3027,7 @@ k(fi, "id", "bar"), k(fi, "defaults", {
|
|
|
3027
3027
|
}
|
|
3028
3028
|
}
|
|
3029
3029
|
});
|
|
3030
|
-
class gi extends
|
|
3030
|
+
class gi extends Mt {
|
|
3031
3031
|
initialize() {
|
|
3032
3032
|
this.enableOptionSharing = !0, super.initialize();
|
|
3033
3033
|
}
|
|
@@ -3074,8 +3074,8 @@ class gi extends Ct {
|
|
|
3074
3074
|
updateElements(t, e, n, s) {
|
|
3075
3075
|
const o = s === "reset", { iScale: a, vScale: r } = this._cachedMeta, { sharedOptions: l, includeOptions: c } = this._getSharedOptions(e, s), h = a.axis, d = r.axis;
|
|
3076
3076
|
for (let u = e; u < e + n; u++) {
|
|
3077
|
-
const f = t[u], p = !o && this.getParsed(u), g = {},
|
|
3078
|
-
g.skip = isNaN(
|
|
3077
|
+
const f = t[u], p = !o && this.getParsed(u), g = {}, b = g[h] = o ? a.getPixelForDecimal(0.5) : a.getPixelForValue(p[h]), m = g[d] = o ? r.getBasePixel() : r.getPixelForValue(p[d]);
|
|
3078
|
+
g.skip = isNaN(b) || isNaN(m), c && (g.options = l || this.resolveDataElementOptions(u, f.active ? "active" : s), o && (g.options.radius = 0)), this.updateElement(f, u, g, s);
|
|
3079
3079
|
}
|
|
3080
3080
|
}
|
|
3081
3081
|
resolveDataElementOptions(t, e) {
|
|
@@ -3114,9 +3114,9 @@ k(gi, "id", "bubble"), k(gi, "defaults", {
|
|
|
3114
3114
|
});
|
|
3115
3115
|
function Gl(i, t, e) {
|
|
3116
3116
|
let n = 1, s = 1, o = 0, a = 0;
|
|
3117
|
-
if (t <
|
|
3118
|
-
const r = i, l = r + t, c = Math.cos(r), h = Math.sin(r), d = Math.cos(l), u = Math.sin(l), f = (x,
|
|
3119
|
-
n = (g -
|
|
3117
|
+
if (t < H) {
|
|
3118
|
+
const r = i, l = r + t, c = Math.cos(r), h = Math.sin(r), d = Math.cos(l), u = Math.sin(l), f = (x, _, v) => je(x, r, l, !0) ? 1 : Math.max(_, _ * e, v, v * e), p = (x, _, v) => je(x, r, l, !0) ? -1 : Math.min(_, _ * e, v, v * e), g = f(0, c, d), b = f(Y, h, u), m = p(j, c, d), y = p(j + Y, h, u);
|
|
3119
|
+
n = (g - m) / 2, s = (b - y) / 2, o = -(g + m) / 2, a = -(b + y) / 2;
|
|
3120
3120
|
}
|
|
3121
3121
|
return {
|
|
3122
3122
|
ratioX: n,
|
|
@@ -3125,7 +3125,7 @@ function Gl(i, t, e) {
|
|
|
3125
3125
|
offsetY: a
|
|
3126
3126
|
};
|
|
3127
3127
|
}
|
|
3128
|
-
class Le extends
|
|
3128
|
+
class Le extends Mt {
|
|
3129
3129
|
constructor(t, e) {
|
|
3130
3130
|
super(t, e), this.enableOptionSharing = !0, this.innerRadius = void 0, this.outerRadius = void 0, this.offsetX = void 0, this.offsetY = void 0;
|
|
3131
3131
|
}
|
|
@@ -3153,7 +3153,7 @@ class Le extends Ct {
|
|
|
3153
3153
|
return gt(this.options.circumference);
|
|
3154
3154
|
}
|
|
3155
3155
|
_getRotationExtents() {
|
|
3156
|
-
let t =
|
|
3156
|
+
let t = H, e = -H;
|
|
3157
3157
|
for (let n = 0; n < this.chart.data.datasets.length; ++n)
|
|
3158
3158
|
if (this.chart.isDatasetVisible(n) && this.chart.getDatasetMeta(n).type === this._type) {
|
|
3159
3159
|
const s = this.chart.getDatasetMeta(n).controller, o = s._getRotation(), a = s._getCircumference();
|
|
@@ -3165,29 +3165,29 @@ class Le extends Ct {
|
|
|
3165
3165
|
};
|
|
3166
3166
|
}
|
|
3167
3167
|
update(t) {
|
|
3168
|
-
const e = this.chart, { chartArea: n } = e, s = this._cachedMeta, o = s.data, a = this.getMaxBorderWidth() + this.getMaxOffset(o) + this.options.spacing, r = Math.max((Math.min(n.width, n.height) - a) / 2, 0), l = Math.min(sr(this.options.cutout, r), 1), c = this._getRingWeight(this.index), { circumference: h, rotation: d } = this._getRotationExtents(), { ratioX: u, ratioY: f, offsetX: p, offsetY: g } = Gl(d, h, l),
|
|
3169
|
-
this.offsetX = p * x, this.offsetY = g * x, s.total = this.calculateTotal(), this.outerRadius = x -
|
|
3168
|
+
const e = this.chart, { chartArea: n } = e, s = this._cachedMeta, o = s.data, a = this.getMaxBorderWidth() + this.getMaxOffset(o) + this.options.spacing, r = Math.max((Math.min(n.width, n.height) - a) / 2, 0), l = Math.min(sr(this.options.cutout, r), 1), c = this._getRingWeight(this.index), { circumference: h, rotation: d } = this._getRotationExtents(), { ratioX: u, ratioY: f, offsetX: p, offsetY: g } = Gl(d, h, l), b = (n.width - a) / u, m = (n.height - a) / f, y = Math.max(Math.min(b, m) / 2, 0), x = So(this.options.radius, y), _ = Math.max(x * l, 0), v = (x - _) / this._getVisibleDatasetWeightTotal();
|
|
3169
|
+
this.offsetX = p * x, this.offsetY = g * x, s.total = this.calculateTotal(), this.outerRadius = x - v * this._getRingWeightOffset(this.index), this.innerRadius = Math.max(this.outerRadius - v * c, 0), this.updateElements(o, 0, o.length, t);
|
|
3170
3170
|
}
|
|
3171
3171
|
_circumference(t, e) {
|
|
3172
3172
|
const n = this.options, s = this._cachedMeta, o = this._getCircumference();
|
|
3173
|
-
return e && n.animation.animateRotate || !this.chart.getDataVisibility(t) || s._parsed[t] === null || s.data[t].hidden ? 0 : this.calculateCircumference(s._parsed[t] * o /
|
|
3173
|
+
return e && n.animation.animateRotate || !this.chart.getDataVisibility(t) || s._parsed[t] === null || s.data[t].hidden ? 0 : this.calculateCircumference(s._parsed[t] * o / H);
|
|
3174
3174
|
}
|
|
3175
3175
|
updateElements(t, e, n, s) {
|
|
3176
|
-
const o = s === "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, p = u ? 0 : this.outerRadius, { sharedOptions: g, includeOptions:
|
|
3177
|
-
let
|
|
3176
|
+
const o = s === "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, p = u ? 0 : this.outerRadius, { sharedOptions: g, includeOptions: b } = this._getSharedOptions(e, s);
|
|
3177
|
+
let m = this._getRotation(), y;
|
|
3178
3178
|
for (y = 0; y < e; ++y)
|
|
3179
|
-
|
|
3179
|
+
m += this._circumference(y, o);
|
|
3180
3180
|
for (y = e; y < e + n; ++y) {
|
|
3181
|
-
const x = this._circumference(y, o),
|
|
3181
|
+
const x = this._circumference(y, o), _ = t[y], v = {
|
|
3182
3182
|
x: h + this.offsetX,
|
|
3183
3183
|
y: d + this.offsetY,
|
|
3184
|
-
startAngle:
|
|
3185
|
-
endAngle:
|
|
3184
|
+
startAngle: m,
|
|
3185
|
+
endAngle: m + x,
|
|
3186
3186
|
circumference: x,
|
|
3187
3187
|
outerRadius: p,
|
|
3188
3188
|
innerRadius: f
|
|
3189
3189
|
};
|
|
3190
|
-
|
|
3190
|
+
b && (v.options = g || this.resolveDataElementOptions(y, _.active ? "active" : s)), m += x, this.updateElement(_, y, v, s);
|
|
3191
3191
|
}
|
|
3192
3192
|
}
|
|
3193
3193
|
calculateTotal() {
|
|
@@ -3201,10 +3201,10 @@ class Le extends Ct {
|
|
|
3201
3201
|
}
|
|
3202
3202
|
calculateCircumference(t) {
|
|
3203
3203
|
const e = this._cachedMeta.total;
|
|
3204
|
-
return e > 0 && !isNaN(t) ?
|
|
3204
|
+
return e > 0 && !isNaN(t) ? H * (Math.abs(t) / e) : 0;
|
|
3205
3205
|
}
|
|
3206
3206
|
getLabelAndValue(t) {
|
|
3207
|
-
const e = this._cachedMeta, n = this.chart, s = n.data.labels || [], o =
|
|
3207
|
+
const e = this._cachedMeta, n = this.chart, s = n.data.labels || [], o = Cn(e._parsed[t], n.options.locale);
|
|
3208
3208
|
return {
|
|
3209
3209
|
label: s[t] || "",
|
|
3210
3210
|
value: o
|
|
@@ -3313,7 +3313,7 @@ k(Le, "id", "doughnut"), k(Le, "defaults", {
|
|
|
3313
3313
|
}
|
|
3314
3314
|
}
|
|
3315
3315
|
});
|
|
3316
|
-
class pi extends
|
|
3316
|
+
class pi extends Mt {
|
|
3317
3317
|
initialize() {
|
|
3318
3318
|
this.enableOptionSharing = !0, this.supportsDecimation = !0, super.initialize();
|
|
3319
3319
|
}
|
|
@@ -3328,16 +3328,16 @@ class pi extends Ct {
|
|
|
3328
3328
|
}, t), this.updateElements(s, r, l, t);
|
|
3329
3329
|
}
|
|
3330
3330
|
updateElements(t, e, n, s) {
|
|
3331
|
-
const o = s === "reset", { iScale: a, vScale: r, _stacked: l, _dataset: c } = this._cachedMeta, { sharedOptions: h, includeOptions: d } = this._getSharedOptions(e, s), u = a.axis, f = r.axis, { spanGaps: p, segment: g } = this.options,
|
|
3332
|
-
let
|
|
3333
|
-
for (let
|
|
3334
|
-
const
|
|
3335
|
-
if (
|
|
3336
|
-
|
|
3331
|
+
const o = s === "reset", { iScale: a, vScale: r, _stacked: l, _dataset: c } = this._cachedMeta, { sharedOptions: h, includeOptions: d } = this._getSharedOptions(e, s), u = a.axis, f = r.axis, { spanGaps: p, segment: g } = this.options, b = Ve(p) ? p : Number.POSITIVE_INFINITY, m = this.chart._animationsDisabled || o || s === "none", y = e + n, x = t.length;
|
|
3332
|
+
let _ = e > 0 && this.getParsed(e - 1);
|
|
3333
|
+
for (let v = 0; v < x; ++v) {
|
|
3334
|
+
const w = t[v], M = m ? w : {};
|
|
3335
|
+
if (v < e || v >= y) {
|
|
3336
|
+
M.skip = !0;
|
|
3337
3337
|
continue;
|
|
3338
3338
|
}
|
|
3339
|
-
const
|
|
3340
|
-
|
|
3339
|
+
const S = this.getParsed(v), A = O(S[f]), C = M[u] = a.getPixelForValue(S[u], v), P = M[f] = o || A ? r.getBasePixel() : r.getPixelForValue(l ? this.applyStack(r, S, l) : S[f], v);
|
|
3340
|
+
M.skip = isNaN(C) || isNaN(P) || A, M.stop = v > 0 && Math.abs(S[u] - _[u]) > b, g && (M.parsed = S, M.raw = c.data[v]), d && (M.options = h || this.resolveDataElementOptions(v, w.active ? "active" : s)), m || this.updateElement(w, v, M, s), _ = S;
|
|
3341
3341
|
}
|
|
3342
3342
|
}
|
|
3343
3343
|
getMaxOverflow() {
|
|
@@ -3367,7 +3367,7 @@ k(pi, "id", "line"), k(pi, "defaults", {
|
|
|
3367
3367
|
}
|
|
3368
3368
|
}
|
|
3369
3369
|
});
|
|
3370
|
-
class mi extends
|
|
3370
|
+
class mi extends Mt {
|
|
3371
3371
|
getLabelAndValue(t) {
|
|
3372
3372
|
const e = this._cachedMeta.vScale, n = this.getParsed(t);
|
|
3373
3373
|
return {
|
|
@@ -3552,14 +3552,14 @@ function Ql(i, t, e, n, s, o) {
|
|
|
3552
3552
|
const p = h.getCenterPoint(s);
|
|
3553
3553
|
if (!(!!o || i.isPointInArea(p)) && !f)
|
|
3554
3554
|
return;
|
|
3555
|
-
const
|
|
3556
|
-
|
|
3555
|
+
const b = r(t, p);
|
|
3556
|
+
b < l ? (a = [
|
|
3557
3557
|
{
|
|
3558
3558
|
element: h,
|
|
3559
3559
|
datasetIndex: d,
|
|
3560
3560
|
index: u
|
|
3561
3561
|
}
|
|
3562
|
-
], l =
|
|
3562
|
+
], l = b) : b === l && a.push({
|
|
3563
3563
|
element: h,
|
|
3564
3564
|
datasetIndex: d,
|
|
3565
3565
|
index: u
|
|
@@ -3585,7 +3585,7 @@ var tc = {
|
|
|
3585
3585
|
evaluateInteractionItems: Xe,
|
|
3586
3586
|
modes: {
|
|
3587
3587
|
index(i, t, e, n) {
|
|
3588
|
-
const s =
|
|
3588
|
+
const s = Ht(t, i), o = e.axis || "x", a = e.includeInvisible || !1, r = e.intersect ? $i(i, s, o, n, a) : Ui(i, s, o, !1, n, a), l = [];
|
|
3589
3589
|
return r.length ? (i.getSortedVisibleDatasetMetas().forEach((c) => {
|
|
3590
3590
|
const h = r[0].index, d = c.data[h];
|
|
3591
3591
|
d && !d.skip && l.push({
|
|
@@ -3596,7 +3596,7 @@ var tc = {
|
|
|
3596
3596
|
}), l) : [];
|
|
3597
3597
|
},
|
|
3598
3598
|
dataset(i, t, e, n) {
|
|
3599
|
-
const s =
|
|
3599
|
+
const s = Ht(t, i), o = e.axis || "xy", a = e.includeInvisible || !1;
|
|
3600
3600
|
let r = e.intersect ? $i(i, s, o, n, a) : Ui(i, s, o, !1, n, a);
|
|
3601
3601
|
if (r.length > 0) {
|
|
3602
3602
|
const l = r[0].datasetIndex, c = i.getDatasetMeta(l).data;
|
|
@@ -3611,19 +3611,19 @@ var tc = {
|
|
|
3611
3611
|
return r;
|
|
3612
3612
|
},
|
|
3613
3613
|
point(i, t, e, n) {
|
|
3614
|
-
const s =
|
|
3614
|
+
const s = Ht(t, i), o = e.axis || "xy", a = e.includeInvisible || !1;
|
|
3615
3615
|
return $i(i, s, o, n, a);
|
|
3616
3616
|
},
|
|
3617
3617
|
nearest(i, t, e, n) {
|
|
3618
|
-
const s =
|
|
3618
|
+
const s = Ht(t, i), o = e.axis || "xy", a = e.includeInvisible || !1;
|
|
3619
3619
|
return Ui(i, s, o, e.intersect, n, a);
|
|
3620
3620
|
},
|
|
3621
3621
|
x(i, t, e, n) {
|
|
3622
|
-
const s =
|
|
3622
|
+
const s = Ht(t, i);
|
|
3623
3623
|
return bs(i, s, "x", e.intersect, n);
|
|
3624
3624
|
},
|
|
3625
3625
|
y(i, t, e, n) {
|
|
3626
|
-
const s =
|
|
3626
|
+
const s = Ht(t, i);
|
|
3627
3627
|
return bs(i, s, "y", e.intersect, n);
|
|
3628
3628
|
}
|
|
3629
3629
|
}
|
|
@@ -3640,7 +3640,7 @@ function ke(i, t) {
|
|
|
3640
3640
|
function ys(i, t) {
|
|
3641
3641
|
return i.filter((e) => Yo.indexOf(e.pos) === -1 && e.box.axis === t);
|
|
3642
3642
|
}
|
|
3643
|
-
function
|
|
3643
|
+
function Me(i, t) {
|
|
3644
3644
|
return i.sort((e, n) => {
|
|
3645
3645
|
const s = t ? n : e, o = t ? e : n;
|
|
3646
3646
|
return s.weight === o.weight ? s.index - o.index : s.weight - o.weight;
|
|
@@ -3688,7 +3688,7 @@ function nc(i, t) {
|
|
|
3688
3688
|
return e;
|
|
3689
3689
|
}
|
|
3690
3690
|
function sc(i) {
|
|
3691
|
-
const t = ec(i), e =
|
|
3691
|
+
const t = ec(i), e = Me(t.filter((c) => c.box.fullSize), !0), n = Me(ke(t, "left"), !0), s = Me(ke(t, "right")), o = Me(ke(t, "top"), !0), a = Me(ke(t, "bottom")), r = ys(t, "x"), l = ys(t, "y");
|
|
3692
3692
|
return {
|
|
3693
3693
|
fullSize: e,
|
|
3694
3694
|
leftAndTop: n.concat(o),
|
|
@@ -3812,7 +3812,7 @@ var rt = {
|
|
|
3812
3812
|
R(i.boxes, (g) => {
|
|
3813
3813
|
typeof g.beforeLayout == "function" && g.beforeLayout();
|
|
3814
3814
|
});
|
|
3815
|
-
const h = l.reduce((g,
|
|
3815
|
+
const h = l.reduce((g, b) => b.box.options && b.box.options.display === !1 ? g : g + 1, 0) || 1, d = Object.freeze({
|
|
3816
3816
|
outerWidth: t,
|
|
3817
3817
|
outerHeight: e,
|
|
3818
3818
|
padding: s,
|
|
@@ -3837,8 +3837,8 @@ var rt = {
|
|
|
3837
3837
|
height: f.h,
|
|
3838
3838
|
width: f.w
|
|
3839
3839
|
}, R(r.chartArea, (g) => {
|
|
3840
|
-
const
|
|
3841
|
-
Object.assign(
|
|
3840
|
+
const b = g.box;
|
|
3841
|
+
Object.assign(b, i.chartArea), b.update(f.w, f.h, {
|
|
3842
3842
|
left: 0,
|
|
3843
3843
|
top: 0,
|
|
3844
3844
|
right: 0,
|
|
@@ -3926,7 +3926,7 @@ function uc(i, t, e) {
|
|
|
3926
3926
|
i.canvas.removeEventListener(t, e, qo);
|
|
3927
3927
|
}
|
|
3928
3928
|
function fc(i, t) {
|
|
3929
|
-
const e = cc[i.type] || i.type, { x: n, y: s } =
|
|
3929
|
+
const e = cc[i.type] || i.type, { x: n, y: s } = Ht(i, t);
|
|
3930
3930
|
return {
|
|
3931
3931
|
type: e,
|
|
3932
3932
|
chart: t,
|
|
@@ -3935,7 +3935,7 @@ function fc(i, t) {
|
|
|
3935
3935
|
y: s !== void 0 ? s : null
|
|
3936
3936
|
};
|
|
3937
3937
|
}
|
|
3938
|
-
function
|
|
3938
|
+
function Mi(i, t) {
|
|
3939
3939
|
for (const e of i)
|
|
3940
3940
|
if (e === t || e.contains(t))
|
|
3941
3941
|
return !0;
|
|
@@ -3944,7 +3944,7 @@ function gc(i, t, e) {
|
|
|
3944
3944
|
const n = i.canvas, s = new MutationObserver((o) => {
|
|
3945
3945
|
let a = !1;
|
|
3946
3946
|
for (const r of o)
|
|
3947
|
-
a = a ||
|
|
3947
|
+
a = a || Mi(r.addedNodes, n), a = a && !Mi(r.removedNodes, n);
|
|
3948
3948
|
a && e();
|
|
3949
3949
|
});
|
|
3950
3950
|
return s.observe(document, {
|
|
@@ -3956,7 +3956,7 @@ function pc(i, t, e) {
|
|
|
3956
3956
|
const n = i.canvas, s = new MutationObserver((o) => {
|
|
3957
3957
|
let a = !1;
|
|
3958
3958
|
for (const r of o)
|
|
3959
|
-
a = a ||
|
|
3959
|
+
a = a || Mi(r.removedNodes, n), a = a && !Mi(r.addedNodes, n);
|
|
3960
3960
|
a && e();
|
|
3961
3961
|
});
|
|
3962
3962
|
return s.observe(document, {
|
|
@@ -4088,9 +4088,9 @@ class ht {
|
|
|
4088
4088
|
}
|
|
4089
4089
|
k(ht, "defaults", {}), k(ht, "defaultRoutes");
|
|
4090
4090
|
function Sc(i, t) {
|
|
4091
|
-
const e = i.options.ticks, n = wc(i), s = Math.min(e.maxTicksLimit || n, n), o = e.major.enabled ?
|
|
4091
|
+
const e = i.options.ticks, n = wc(i), s = Math.min(e.maxTicksLimit || n, n), o = e.major.enabled ? Mc(t) : [], a = o.length, r = o[0], l = o[a - 1], c = [];
|
|
4092
4092
|
if (a > s)
|
|
4093
|
-
return
|
|
4093
|
+
return Cc(t, c, o, a / s), c;
|
|
4094
4094
|
const h = kc(o, t, s);
|
|
4095
4095
|
if (a > 0) {
|
|
4096
4096
|
let d, u;
|
|
@@ -4117,14 +4117,14 @@ function kc(i, t, e) {
|
|
|
4117
4117
|
}
|
|
4118
4118
|
return Math.max(s, 1);
|
|
4119
4119
|
}
|
|
4120
|
-
function
|
|
4120
|
+
function Mc(i) {
|
|
4121
4121
|
const t = [];
|
|
4122
4122
|
let e, n;
|
|
4123
4123
|
for (e = 0, n = i.length; e < n; e++)
|
|
4124
4124
|
i[e].major && t.push(e);
|
|
4125
4125
|
return t;
|
|
4126
4126
|
}
|
|
4127
|
-
function
|
|
4127
|
+
function Cc(i, t, e, n) {
|
|
4128
4128
|
let s = 0, o = e[0], a;
|
|
4129
4129
|
for (n = Math.ceil(n), a = 0; a < i.length; a++)
|
|
4130
4130
|
a === o && (t.push(i[a]), s++, o = e[s * n]);
|
|
@@ -4148,7 +4148,7 @@ function Pc(i) {
|
|
|
4148
4148
|
return n;
|
|
4149
4149
|
}
|
|
4150
4150
|
const Ac = (i) => i === "left" ? "right" : i === "right" ? "left" : i, ws = (i, t, e) => t === "top" || t === "left" ? i[t] + e : i[t] - e, ks = (i, t) => Math.min(t || i, i);
|
|
4151
|
-
function
|
|
4151
|
+
function Ms(i, t) {
|
|
4152
4152
|
const e = [], n = i.length / t, s = i.length;
|
|
4153
4153
|
let o = 0;
|
|
4154
4154
|
for (; o < s; o += n)
|
|
@@ -4172,10 +4172,10 @@ function Lc(i, t) {
|
|
|
4172
4172
|
}
|
|
4173
4173
|
});
|
|
4174
4174
|
}
|
|
4175
|
-
function
|
|
4175
|
+
function Ce(i) {
|
|
4176
4176
|
return i.drawTicks ? i.tickLength : 0;
|
|
4177
4177
|
}
|
|
4178
|
-
function
|
|
4178
|
+
function Cs(i, t) {
|
|
4179
4179
|
if (!i.display)
|
|
4180
4180
|
return 0;
|
|
4181
4181
|
const e = X(i.font, t), n = K(i.padding);
|
|
@@ -4201,20 +4201,20 @@ function Ic(i, t, e) {
|
|
|
4201
4201
|
function Fc(i, t, e, n) {
|
|
4202
4202
|
const { top: s, left: o, bottom: a, right: r, chart: l } = i, { chartArea: c, scales: h } = l;
|
|
4203
4203
|
let d = 0, u, f, p;
|
|
4204
|
-
const g = a - s,
|
|
4204
|
+
const g = a - s, b = r - o;
|
|
4205
4205
|
if (i.isHorizontal()) {
|
|
4206
4206
|
if (f = J(n, o, r), T(e)) {
|
|
4207
|
-
const
|
|
4208
|
-
p = h[
|
|
4207
|
+
const m = Object.keys(e)[0], y = e[m];
|
|
4208
|
+
p = h[m].getPixelForValue(y) + g - t;
|
|
4209
4209
|
} else
|
|
4210
4210
|
e === "center" ? p = (c.bottom + c.top) / 2 + g - t : p = ws(i, e, t);
|
|
4211
4211
|
u = r - o;
|
|
4212
4212
|
} else {
|
|
4213
4213
|
if (T(e)) {
|
|
4214
|
-
const
|
|
4215
|
-
f = h[
|
|
4214
|
+
const m = Object.keys(e)[0], y = e[m];
|
|
4215
|
+
f = h[m].getPixelForValue(y) - b + t;
|
|
4216
4216
|
} else
|
|
4217
|
-
e === "center" ? f = (c.left + c.right) / 2 -
|
|
4217
|
+
e === "center" ? f = (c.left + c.right) / 2 - b + t : f = ws(i, e, t);
|
|
4218
4218
|
p = J(n, a, s), d = e === "left" ? -Y : Y;
|
|
4219
4219
|
}
|
|
4220
4220
|
return {
|
|
@@ -4298,7 +4298,7 @@ class de extends ht {
|
|
|
4298
4298
|
bottom: 0
|
|
4299
4299
|
}, n), this.ticks = null, this._labelSizes = null, this._gridLineItems = null, this._labelItems = null, this.beforeSetDimensions(), this.setDimensions(), this.afterSetDimensions(), this._maxLength = this.isHorizontal() ? this.width + n.left + n.right : this.height + n.top + n.bottom, this._dataLimitsCached || (this.beforeDataLimits(), this.determineDataLimits(), this.afterDataLimits(), this._range = jr(this, o, s), this._dataLimitsCached = !0), this.beforeBuildTicks(), this.ticks = this.buildTicks() || [], this.afterBuildTicks();
|
|
4300
4300
|
const l = r < this.ticks.length;
|
|
4301
|
-
this._convertTicksToLabels(l ?
|
|
4301
|
+
this._convertTicksToLabels(l ? Ms(this.ticks, r) : this.ticks), this.configure(), this.beforeCalculateLabelRotation(), this.calculateLabelRotation(), this.afterCalculateLabelRotation(), a.display && (a.autoSkip || a.source === "auto") && (this.ticks = Sc(this, this.ticks), this._labelSizes = null, this.afterAutoSkip()), l && this._convertTicksToLabels(this.ticks), this.beforeFit(), this.fit(), this.afterFit(), this.afterUpdate();
|
|
4302
4302
|
}
|
|
4303
4303
|
configure() {
|
|
4304
4304
|
let t = this.options.reverse, e, n;
|
|
@@ -4377,7 +4377,7 @@ class de extends ht {
|
|
|
4377
4377
|
return;
|
|
4378
4378
|
}
|
|
4379
4379
|
const h = this._getLabelSizes(), d = h.widest.width, u = h.highest.height, f = Q(this.chart.width - d, 0, this.maxWidth);
|
|
4380
|
-
r = t.offset ? this.maxWidth / n : f / (n - 1), d + 6 > r && (r = f / (n - (t.offset ? 0.5 : 1)), l = this.maxHeight -
|
|
4380
|
+
r = t.offset ? this.maxWidth / n : f / (n - 1), d + 6 > r && (r = f / (n - (t.offset ? 0.5 : 1)), l = this.maxHeight - Ce(t.grid) - e.padding - Cs(t.title, this.chart.options.font), c = Math.sqrt(d * d + u * u), a = Sn(Math.min(Math.asin(Q((h.highest.height + 6) / r, -1, 1)), Math.asin(Q(l / c, -1, 1)) - Math.asin(Q(u / c, -1, 1)))), a = Math.max(s, Math.min(o, a))), this.labelRotation = a;
|
|
4381
4381
|
}
|
|
4382
4382
|
afterCalculateLabelRotation() {
|
|
4383
4383
|
E(this.options.afterCalculateLabelRotation, [
|
|
@@ -4397,17 +4397,17 @@ class de extends ht {
|
|
|
4397
4397
|
height: 0
|
|
4398
4398
|
}, { chart: e, options: { ticks: n, title: s, grid: o } } = this, a = this._isVisible(), r = this.isHorizontal();
|
|
4399
4399
|
if (a) {
|
|
4400
|
-
const l =
|
|
4401
|
-
if (r ? (t.width = this.maxWidth, t.height =
|
|
4402
|
-
const { first: c, last: h, widest: d, highest: u } = this._getLabelSizes(), f = n.padding * 2, p = gt(this.labelRotation), g = Math.cos(p),
|
|
4400
|
+
const l = Cs(s, e.options.font);
|
|
4401
|
+
if (r ? (t.width = this.maxWidth, t.height = Ce(o) + l) : (t.height = this.maxHeight, t.width = Ce(o) + l), n.display && this.ticks.length) {
|
|
4402
|
+
const { first: c, last: h, widest: d, highest: u } = this._getLabelSizes(), f = n.padding * 2, p = gt(this.labelRotation), g = Math.cos(p), b = Math.sin(p);
|
|
4403
4403
|
if (r) {
|
|
4404
|
-
const
|
|
4405
|
-
t.height = Math.min(this.maxHeight, t.height +
|
|
4404
|
+
const m = n.mirror ? 0 : b * d.width + g * u.height;
|
|
4405
|
+
t.height = Math.min(this.maxHeight, t.height + m + f);
|
|
4406
4406
|
} else {
|
|
4407
|
-
const
|
|
4408
|
-
t.width = Math.min(this.maxWidth, t.width +
|
|
4407
|
+
const m = n.mirror ? 0 : g * d.width + b * u.height;
|
|
4408
|
+
t.width = Math.min(this.maxWidth, t.width + m + f);
|
|
4409
4409
|
}
|
|
4410
|
-
this._calculatePadding(c, h,
|
|
4410
|
+
this._calculatePadding(c, h, b, g);
|
|
4411
4411
|
}
|
|
4412
4412
|
}
|
|
4413
4413
|
this._handleMargins(), r ? (this.width = this._length = e.width - this._margins.left - this._margins.right, this.height = t.height) : (this.width = t.width, this.height = this._length = e.height - this._margins.top - this._margins.bottom);
|
|
@@ -4450,34 +4450,34 @@ class de extends ht {
|
|
|
4450
4450
|
if (!t) {
|
|
4451
4451
|
const e = this.options.ticks.sampleSize;
|
|
4452
4452
|
let n = this.ticks;
|
|
4453
|
-
e < n.length && (n =
|
|
4453
|
+
e < n.length && (n = Ms(n, e)), this._labelSizes = t = this._computeLabelSizes(n, n.length, this.options.ticks.maxTicksLimit);
|
|
4454
4454
|
}
|
|
4455
4455
|
return t;
|
|
4456
4456
|
}
|
|
4457
4457
|
_computeLabelSizes(t, e, n) {
|
|
4458
4458
|
const { ctx: s, _longestTextCache: o } = this, a = [], r = [], l = Math.floor(e / ks(e, n));
|
|
4459
|
-
let c = 0, h = 0, d, u, f, p, g,
|
|
4459
|
+
let c = 0, h = 0, d, u, f, p, g, b, m, y, x, _, v;
|
|
4460
4460
|
for (d = 0; d < e; d += l) {
|
|
4461
|
-
if (p = t[d].label, g = this._resolveTickFontOptions(d), s.font =
|
|
4461
|
+
if (p = t[d].label, g = this._resolveTickFontOptions(d), s.font = b = g.string, m = o[b] = o[b] || {
|
|
4462
4462
|
data: {},
|
|
4463
4463
|
gc: []
|
|
4464
|
-
}, y = g.lineHeight, x =
|
|
4465
|
-
x = wi(s,
|
|
4464
|
+
}, y = g.lineHeight, x = _ = 0, !O(p) && !z(p))
|
|
4465
|
+
x = wi(s, m.data, m.gc, x, p), _ = y;
|
|
4466
4466
|
else if (z(p))
|
|
4467
4467
|
for (u = 0, f = p.length; u < f; ++u)
|
|
4468
|
-
|
|
4469
|
-
a.push(x), r.push(
|
|
4468
|
+
v = p[u], !O(v) && !z(v) && (x = wi(s, m.data, m.gc, x, v), _ += y);
|
|
4469
|
+
a.push(x), r.push(_), c = Math.max(x, c), h = Math.max(_, h);
|
|
4470
4470
|
}
|
|
4471
4471
|
Lc(o, e);
|
|
4472
|
-
const
|
|
4472
|
+
const w = a.indexOf(c), M = r.indexOf(h), S = (A) => ({
|
|
4473
4473
|
width: a[A] || 0,
|
|
4474
4474
|
height: r[A] || 0
|
|
4475
4475
|
});
|
|
4476
4476
|
return {
|
|
4477
|
-
first:
|
|
4478
|
-
last:
|
|
4479
|
-
widest: w
|
|
4480
|
-
highest:
|
|
4477
|
+
first: S(0),
|
|
4478
|
+
last: S(e - 1),
|
|
4479
|
+
widest: S(w),
|
|
4480
|
+
highest: S(M),
|
|
4481
4481
|
widths: a,
|
|
4482
4482
|
heights: r
|
|
4483
4483
|
};
|
|
@@ -4527,47 +4527,47 @@ class de extends ht {
|
|
|
4527
4527
|
return t !== "auto" ? !!t : this.getMatchingVisibleMetas().length > 0;
|
|
4528
4528
|
}
|
|
4529
4529
|
_computeGridLineItems(t) {
|
|
4530
|
-
const e = this.axis, n = this.chart, s = this.options, { grid: o, position: a, border: r } = s, l = o.offset, c = this.isHorizontal(), d = this.ticks.length + (l ? 1 : 0), u =
|
|
4530
|
+
const e = this.axis, n = this.chart, s = this.options, { grid: o, position: a, border: r } = s, l = o.offset, c = this.isHorizontal(), d = this.ticks.length + (l ? 1 : 0), u = Ce(o), f = [], p = r.setContext(this.getContext()), g = p.display ? p.width : 0, b = g / 2, m = function(B) {
|
|
4531
4531
|
return Bt(n, B, g);
|
|
4532
4532
|
};
|
|
4533
|
-
let y, x,
|
|
4533
|
+
let y, x, _, v, w, M, S, A, C, P, D, W;
|
|
4534
4534
|
if (a === "top")
|
|
4535
|
-
y =
|
|
4535
|
+
y = m(this.bottom), M = this.bottom - u, A = y - b, P = m(t.top) + b, W = t.bottom;
|
|
4536
4536
|
else if (a === "bottom")
|
|
4537
|
-
y =
|
|
4537
|
+
y = m(this.top), P = t.top, W = m(t.bottom) - b, M = y + b, A = this.top + u;
|
|
4538
4538
|
else if (a === "left")
|
|
4539
|
-
y =
|
|
4539
|
+
y = m(this.right), w = this.right - u, S = y - b, C = m(t.left) + b, D = t.right;
|
|
4540
4540
|
else if (a === "right")
|
|
4541
|
-
y =
|
|
4541
|
+
y = m(this.left), C = t.left, D = m(t.right) - b, w = y + b, S = this.left + u;
|
|
4542
4542
|
else if (e === "x") {
|
|
4543
4543
|
if (a === "center")
|
|
4544
|
-
y =
|
|
4544
|
+
y = m((t.top + t.bottom) / 2 + 0.5);
|
|
4545
4545
|
else if (T(a)) {
|
|
4546
4546
|
const B = Object.keys(a)[0], N = a[B];
|
|
4547
|
-
y =
|
|
4547
|
+
y = m(this.chart.scales[B].getPixelForValue(N));
|
|
4548
4548
|
}
|
|
4549
|
-
P = t.top,
|
|
4549
|
+
P = t.top, W = t.bottom, M = y + b, A = M + u;
|
|
4550
4550
|
} else if (e === "y") {
|
|
4551
4551
|
if (a === "center")
|
|
4552
|
-
y =
|
|
4552
|
+
y = m((t.left + t.right) / 2);
|
|
4553
4553
|
else if (T(a)) {
|
|
4554
4554
|
const B = Object.keys(a)[0], N = a[B];
|
|
4555
|
-
y =
|
|
4555
|
+
y = m(this.chart.scales[B].getPixelForValue(N));
|
|
4556
4556
|
}
|
|
4557
|
-
|
|
4557
|
+
w = y - b, S = w - u, C = t.left, D = t.right;
|
|
4558
4558
|
}
|
|
4559
4559
|
const U = L(s.ticks.maxTicksLimit, d), I = Math.max(1, Math.ceil(d / U));
|
|
4560
4560
|
for (x = 0; x < d; x += I) {
|
|
4561
4561
|
const B = this.getContext(x), N = o.setContext(B), ct = r.setContext(B), Z = N.lineWidth, Gt = N.color, qe = ct.dash || [], qt = ct.dashOffset, xe = N.tickWidth, _e = N.tickColor, ve = N.tickBorderDash || [], Se = N.tickBorderDashOffset;
|
|
4562
|
-
|
|
4563
|
-
tx1:
|
|
4564
|
-
ty1:
|
|
4565
|
-
tx2:
|
|
4562
|
+
_ = Dc(this, x, l), _ !== void 0 && (v = Bt(n, _, Z), c ? w = S = C = D = v : M = A = P = W = v, f.push({
|
|
4563
|
+
tx1: w,
|
|
4564
|
+
ty1: M,
|
|
4565
|
+
tx2: S,
|
|
4566
4566
|
ty2: A,
|
|
4567
|
-
x1:
|
|
4567
|
+
x1: C,
|
|
4568
4568
|
y1: P,
|
|
4569
4569
|
x2: D,
|
|
4570
|
-
y2:
|
|
4570
|
+
y2: W,
|
|
4571
4571
|
width: Z,
|
|
4572
4572
|
color: Gt,
|
|
4573
4573
|
borderDash: qe,
|
|
@@ -4581,49 +4581,49 @@ class de extends ht {
|
|
|
4581
4581
|
return this._ticksLength = d, this._borderValue = y, f;
|
|
4582
4582
|
}
|
|
4583
4583
|
_computeLabelItems(t) {
|
|
4584
|
-
const e = this.axis, n = this.options, { position: s, ticks: o } = n, a = this.isHorizontal(), r = this.ticks, { align: l, crossAlign: c, padding: h, mirror: d } = o, u =
|
|
4585
|
-
let
|
|
4584
|
+
const e = this.axis, n = this.options, { position: s, ticks: o } = n, a = this.isHorizontal(), r = this.ticks, { align: l, crossAlign: c, padding: h, mirror: d } = o, u = Ce(n.grid), f = u + h, p = d ? -h : f, g = -gt(this.labelRotation), b = [];
|
|
4585
|
+
let m, y, x, _, v, w, M, S, A, C, P, D, W = "middle";
|
|
4586
4586
|
if (s === "top")
|
|
4587
|
-
|
|
4587
|
+
w = this.bottom - p, M = this._getXAxisLabelAlignment();
|
|
4588
4588
|
else if (s === "bottom")
|
|
4589
|
-
|
|
4589
|
+
w = this.top + p, M = this._getXAxisLabelAlignment();
|
|
4590
4590
|
else if (s === "left") {
|
|
4591
4591
|
const I = this._getYAxisLabelAlignment(u);
|
|
4592
|
-
|
|
4592
|
+
M = I.textAlign, v = I.x;
|
|
4593
4593
|
} else if (s === "right") {
|
|
4594
4594
|
const I = this._getYAxisLabelAlignment(u);
|
|
4595
|
-
|
|
4595
|
+
M = I.textAlign, v = I.x;
|
|
4596
4596
|
} else if (e === "x") {
|
|
4597
4597
|
if (s === "center")
|
|
4598
|
-
|
|
4598
|
+
w = (t.top + t.bottom) / 2 + f;
|
|
4599
4599
|
else if (T(s)) {
|
|
4600
4600
|
const I = Object.keys(s)[0], B = s[I];
|
|
4601
|
-
|
|
4601
|
+
w = this.chart.scales[I].getPixelForValue(B) + f;
|
|
4602
4602
|
}
|
|
4603
|
-
|
|
4603
|
+
M = this._getXAxisLabelAlignment();
|
|
4604
4604
|
} else if (e === "y") {
|
|
4605
4605
|
if (s === "center")
|
|
4606
|
-
|
|
4606
|
+
v = (t.left + t.right) / 2 - f;
|
|
4607
4607
|
else if (T(s)) {
|
|
4608
4608
|
const I = Object.keys(s)[0], B = s[I];
|
|
4609
|
-
|
|
4609
|
+
v = this.chart.scales[I].getPixelForValue(B);
|
|
4610
4610
|
}
|
|
4611
|
-
|
|
4611
|
+
M = this._getYAxisLabelAlignment(u).textAlign;
|
|
4612
4612
|
}
|
|
4613
|
-
e === "y" && (l === "start" ?
|
|
4613
|
+
e === "y" && (l === "start" ? W = "top" : l === "end" && (W = "bottom"));
|
|
4614
4614
|
const U = this._getLabelSizes();
|
|
4615
|
-
for (
|
|
4616
|
-
x = r[
|
|
4617
|
-
const I = o.setContext(this.getContext(
|
|
4618
|
-
|
|
4615
|
+
for (m = 0, y = r.length; m < y; ++m) {
|
|
4616
|
+
x = r[m], _ = x.label;
|
|
4617
|
+
const I = o.setContext(this.getContext(m));
|
|
4618
|
+
S = this.getPixelForTick(m) + o.labelOffset, A = this._resolveTickFontOptions(m), C = A.lineHeight, P = z(_) ? _.length : 1;
|
|
4619
4619
|
const B = P / 2, N = I.color, ct = I.textStrokeColor, Z = I.textStrokeWidth;
|
|
4620
|
-
let Gt =
|
|
4621
|
-
a ? (
|
|
4620
|
+
let Gt = M;
|
|
4621
|
+
a ? (v = S, M === "inner" && (m === y - 1 ? Gt = this.options.reverse ? "left" : "right" : m === 0 ? Gt = this.options.reverse ? "right" : "left" : Gt = "center"), s === "top" ? c === "near" || g !== 0 ? D = -P * C + C / 2 : c === "center" ? D = -U.highest.height / 2 - B * C + C : D = -U.highest.height + C / 2 : c === "near" || g !== 0 ? D = C / 2 : c === "center" ? D = U.highest.height / 2 - B * C : D = U.highest.height - P * C, d && (D *= -1), g !== 0 && !I.showLabelBackdrop && (v += C / 2 * Math.sin(g))) : (w = S, D = (1 - P) * C / 2);
|
|
4622
4622
|
let qe;
|
|
4623
4623
|
if (I.showLabelBackdrop) {
|
|
4624
|
-
const qt = K(I.backdropPadding), xe = U.heights[
|
|
4624
|
+
const qt = K(I.backdropPadding), xe = U.heights[m], _e = U.widths[m];
|
|
4625
4625
|
let ve = D - qt.top, Se = 0 - qt.left;
|
|
4626
|
-
switch (
|
|
4626
|
+
switch (W) {
|
|
4627
4627
|
case "middle":
|
|
4628
4628
|
ve -= xe / 2;
|
|
4629
4629
|
break;
|
|
@@ -4631,7 +4631,7 @@ class de extends ht {
|
|
|
4631
4631
|
ve -= xe;
|
|
4632
4632
|
break;
|
|
4633
4633
|
}
|
|
4634
|
-
switch (
|
|
4634
|
+
switch (M) {
|
|
4635
4635
|
case "center":
|
|
4636
4636
|
Se -= _e / 2;
|
|
4637
4637
|
break;
|
|
@@ -4647,8 +4647,8 @@ class de extends ht {
|
|
|
4647
4647
|
color: I.backdropColor
|
|
4648
4648
|
};
|
|
4649
4649
|
}
|
|
4650
|
-
|
|
4651
|
-
label:
|
|
4650
|
+
b.push({
|
|
4651
|
+
label: _,
|
|
4652
4652
|
font: A,
|
|
4653
4653
|
textOffset: D,
|
|
4654
4654
|
options: {
|
|
@@ -4657,16 +4657,16 @@ class de extends ht {
|
|
|
4657
4657
|
strokeColor: ct,
|
|
4658
4658
|
strokeWidth: Z,
|
|
4659
4659
|
textAlign: Gt,
|
|
4660
|
-
textBaseline:
|
|
4660
|
+
textBaseline: W,
|
|
4661
4661
|
translation: [
|
|
4662
|
-
|
|
4663
|
-
|
|
4662
|
+
v,
|
|
4663
|
+
w
|
|
4664
4664
|
],
|
|
4665
4665
|
backdrop: qe
|
|
4666
4666
|
}
|
|
4667
4667
|
});
|
|
4668
4668
|
}
|
|
4669
|
-
return
|
|
4669
|
+
return b;
|
|
4670
4670
|
}
|
|
4671
4671
|
_getXAxisLabelAlignment() {
|
|
4672
4672
|
const { position: t, ticks: e } = this.options;
|
|
@@ -4878,7 +4878,7 @@ function Bc(i) {
|
|
|
4878
4878
|
}
|
|
4879
4879
|
class zc {
|
|
4880
4880
|
constructor() {
|
|
4881
|
-
this.controllers = new si(
|
|
4881
|
+
this.controllers = new si(Mt, "datasets", !0), this.elements = new si(ht, "elements"), this.plugins = new si(Object, "plugins"), this.scales = new si(de, "scales"), this._typedRegistries = [
|
|
4882
4882
|
this.controllers,
|
|
4883
4883
|
this.scales,
|
|
4884
4884
|
this.elements
|
|
@@ -4957,7 +4957,7 @@ class zc {
|
|
|
4957
4957
|
}
|
|
4958
4958
|
}
|
|
4959
4959
|
var ft = /* @__PURE__ */ new zc();
|
|
4960
|
-
class
|
|
4960
|
+
class Hc {
|
|
4961
4961
|
constructor() {
|
|
4962
4962
|
this._init = [];
|
|
4963
4963
|
}
|
|
@@ -4989,7 +4989,7 @@ class Wc {
|
|
|
4989
4989
|
return this._notifyStateChanges(t), e;
|
|
4990
4990
|
}
|
|
4991
4991
|
_createDescriptors(t, e) {
|
|
4992
|
-
const n = t && t.config, s = L(n.options && n.options.plugins, {}), o =
|
|
4992
|
+
const n = t && t.config, s = L(n.options && n.options.plugins, {}), o = Wc(n);
|
|
4993
4993
|
return s === !1 && !e ? [] : Vc(t, o, s, e);
|
|
4994
4994
|
}
|
|
4995
4995
|
_notifyStateChanges(t) {
|
|
@@ -4997,7 +4997,7 @@ class Wc {
|
|
|
4997
4997
|
this._notify(s(e, n), t, "stop"), this._notify(s(n, e), t, "start");
|
|
4998
4998
|
}
|
|
4999
4999
|
}
|
|
5000
|
-
function
|
|
5000
|
+
function Wc(i) {
|
|
5001
5001
|
const t = {}, e = [], n = Object.keys(ft.plugins.items);
|
|
5002
5002
|
for (let o = 0; o < n.length; o++)
|
|
5003
5003
|
e.push(ft.getPlugin(n[o]));
|
|
@@ -5348,7 +5348,7 @@ function sh(i, t) {
|
|
|
5348
5348
|
} : t;
|
|
5349
5349
|
}
|
|
5350
5350
|
var Pt;
|
|
5351
|
-
let
|
|
5351
|
+
let Ct = (Pt = class {
|
|
5352
5352
|
static register(...t) {
|
|
5353
5353
|
ft.add(...t), Rs();
|
|
5354
5354
|
}
|
|
@@ -5362,7 +5362,7 @@ let Mt = (Pt = class {
|
|
|
5362
5362
|
const a = n.createResolver(n.chartOptionScopes(), this.getContext());
|
|
5363
5363
|
this.platform = new (n.platform || vc(s))(), this.platform.updateConfig(n);
|
|
5364
5364
|
const r = this.platform.acquireContext(s, a.aspectRatio), l = r && r.canvas, c = l && l.height, h = l && l.width;
|
|
5365
|
-
if (this.id = nr(), this.ctx = r, this.canvas = l, this.width = h, this.height = c, this._options = a, this._aspectRatio = this.aspectRatio, this._layers = [], this._metasets = [], this._stacks = void 0, this.boxes = [], this.currentDevicePixelRatio = void 0, this.chartArea = void 0, this._active = [], this._lastEvent = void 0, this._listeners = {}, this._responsiveListeners = void 0, this._sortedMetasets = [], this.scales = {}, this._plugins = new
|
|
5365
|
+
if (this.id = nr(), this.ctx = r, this.canvas = l, this.width = h, this.height = c, this._options = a, this._aspectRatio = this.aspectRatio, this._layers = [], this._metasets = [], this._stacks = void 0, this.boxes = [], this.currentDevicePixelRatio = void 0, this.chartArea = void 0, this._active = [], this._lastEvent = void 0, this._listeners = {}, this._responsiveListeners = void 0, this._sortedMetasets = [], this.scales = {}, this._plugins = new Hc(), this.$proxies = {}, this._hiddenIndices = {}, this.attached = !1, this._animationsDisabled = void 0, this.$context = void 0, this._doResize = _r((d) => this.update(d), a.resizeDelay || 0), this._dataChanges = [], yi[this.id] = this, !r || !l) {
|
|
5366
5366
|
console.error("Failed to create chart: can't acquire context from the given item");
|
|
5367
5367
|
return;
|
|
5368
5368
|
}
|
|
@@ -5829,7 +5829,7 @@ let Mt = (Pt = class {
|
|
|
5829
5829
|
}
|
|
5830
5830
|
}, k(Pt, "defaults", $), k(Pt, "instances", yi), k(Pt, "overrides", Yt), k(Pt, "registry", ft), k(Pt, "version", Qc), k(Pt, "getChart", Fs), Pt);
|
|
5831
5831
|
function Rs() {
|
|
5832
|
-
return R(
|
|
5832
|
+
return R(Ct.instances, (i) => i._plugins.invalidate());
|
|
5833
5833
|
}
|
|
5834
5834
|
function oh(i, t, e) {
|
|
5835
5835
|
const { startAngle: n, pixelMargin: s, x: o, y: a, outerRadius: r, innerRadius: l } = t;
|
|
@@ -5862,7 +5862,7 @@ function Zt(i, t, e, n) {
|
|
|
5862
5862
|
y: n + i * Math.sin(t)
|
|
5863
5863
|
};
|
|
5864
5864
|
}
|
|
5865
|
-
function
|
|
5865
|
+
function Ci(i, t, e, n, s, o) {
|
|
5866
5866
|
const { x: a, y: r, startAngle: l, pixelMargin: c, innerRadius: h } = t, d = Math.max(t.outerRadius + n + e - c, 0), u = h > 0 ? h + n + e + c : 0;
|
|
5867
5867
|
let f = 0;
|
|
5868
5868
|
const p = s - l;
|
|
@@ -5870,33 +5870,33 @@ function Mi(i, t, e, n, s, o) {
|
|
|
5870
5870
|
const I = h > 0 ? h - n : 0, B = d > 0 ? d - n : 0, N = (I + B) / 2, ct = N !== 0 ? p * N / (N + n) : p;
|
|
5871
5871
|
f = (p - ct) / 2;
|
|
5872
5872
|
}
|
|
5873
|
-
const g = Math.max(1e-3, p * d - e / j) / d,
|
|
5873
|
+
const g = Math.max(1e-3, p * d - e / j) / d, b = (p - g) / 2, m = l + b + f, y = s - b - f, { outerStart: x, outerEnd: _, innerStart: v, innerEnd: w } = rh(t, u, d, y - m), M = d - x, S = d - _, A = m + x / M, C = y - _ / S, P = u + v, D = u + w, W = m + v / P, U = y - w / D;
|
|
5874
5874
|
if (i.beginPath(), o) {
|
|
5875
|
-
const I = (A +
|
|
5876
|
-
if (i.arc(a, r, d, A, I), i.arc(a, r, d, I,
|
|
5877
|
-
const Z = Zt(
|
|
5878
|
-
i.arc(Z.x, Z.y,
|
|
5875
|
+
const I = (A + C) / 2;
|
|
5876
|
+
if (i.arc(a, r, d, A, I), i.arc(a, r, d, I, C), _ > 0) {
|
|
5877
|
+
const Z = Zt(S, C, a, r);
|
|
5878
|
+
i.arc(Z.x, Z.y, _, C, y + Y);
|
|
5879
5879
|
}
|
|
5880
5880
|
const B = Zt(D, y, a, r);
|
|
5881
|
-
if (i.lineTo(B.x, B.y),
|
|
5881
|
+
if (i.lineTo(B.x, B.y), w > 0) {
|
|
5882
5882
|
const Z = Zt(D, U, a, r);
|
|
5883
|
-
i.arc(Z.x, Z.y,
|
|
5883
|
+
i.arc(Z.x, Z.y, w, y + Y, U + Math.PI);
|
|
5884
5884
|
}
|
|
5885
|
-
const N = (y -
|
|
5886
|
-
if (i.arc(a, r, u, y -
|
|
5887
|
-
const Z = Zt(P,
|
|
5888
|
-
i.arc(Z.x, Z.y,
|
|
5885
|
+
const N = (y - w / u + (m + v / u)) / 2;
|
|
5886
|
+
if (i.arc(a, r, u, y - w / u, N, !0), i.arc(a, r, u, N, m + v / u, !0), v > 0) {
|
|
5887
|
+
const Z = Zt(P, W, a, r);
|
|
5888
|
+
i.arc(Z.x, Z.y, v, W + Math.PI, m - Y);
|
|
5889
5889
|
}
|
|
5890
|
-
const ct = Zt(
|
|
5890
|
+
const ct = Zt(M, m, a, r);
|
|
5891
5891
|
if (i.lineTo(ct.x, ct.y), x > 0) {
|
|
5892
|
-
const Z = Zt(
|
|
5893
|
-
i.arc(Z.x, Z.y, x,
|
|
5892
|
+
const Z = Zt(M, A, a, r);
|
|
5893
|
+
i.arc(Z.x, Z.y, x, m - Y, A);
|
|
5894
5894
|
}
|
|
5895
5895
|
} else {
|
|
5896
5896
|
i.moveTo(a, r);
|
|
5897
5897
|
const I = Math.cos(A) * d + a, B = Math.sin(A) * d + r;
|
|
5898
5898
|
i.lineTo(I, B);
|
|
5899
|
-
const N = Math.cos(
|
|
5899
|
+
const N = Math.cos(C) * d + a, ct = Math.sin(C) * d + r;
|
|
5900
5900
|
i.lineTo(N, ct);
|
|
5901
5901
|
}
|
|
5902
5902
|
i.closePath();
|
|
@@ -5905,12 +5905,12 @@ function lh(i, t, e, n, s) {
|
|
|
5905
5905
|
const { fullCircles: o, startAngle: a, circumference: r } = t;
|
|
5906
5906
|
let l = t.endAngle;
|
|
5907
5907
|
if (o) {
|
|
5908
|
-
|
|
5908
|
+
Ci(i, t, e, n, l, s);
|
|
5909
5909
|
for (let c = 0; c < o; ++c)
|
|
5910
5910
|
i.fill();
|
|
5911
|
-
isNaN(r) || (l = a + (r %
|
|
5911
|
+
isNaN(r) || (l = a + (r % H || H));
|
|
5912
5912
|
}
|
|
5913
|
-
return
|
|
5913
|
+
return Ci(i, t, e, n, l, s), i.fill(), l;
|
|
5914
5914
|
}
|
|
5915
5915
|
function ch(i, t, e, n, s) {
|
|
5916
5916
|
const { fullCircles: o, startAngle: a, circumference: r, options: l } = t, { borderWidth: c, borderJoinStyle: h, borderDash: d, borderDashOffset: u } = l, f = l.borderAlign === "inner";
|
|
@@ -5919,12 +5919,12 @@ function ch(i, t, e, n, s) {
|
|
|
5919
5919
|
i.setLineDash(d || []), i.lineDashOffset = u, f ? (i.lineWidth = c * 2, i.lineJoin = h || "round") : (i.lineWidth = c, i.lineJoin = h || "bevel");
|
|
5920
5920
|
let p = t.endAngle;
|
|
5921
5921
|
if (o) {
|
|
5922
|
-
|
|
5922
|
+
Ci(i, t, e, n, p, s);
|
|
5923
5923
|
for (let g = 0; g < o; ++g)
|
|
5924
5924
|
i.stroke();
|
|
5925
|
-
isNaN(r) || (p = a + (r %
|
|
5925
|
+
isNaN(r) || (p = a + (r % H || H));
|
|
5926
5926
|
}
|
|
5927
|
-
f && oh(i, t, p), o || (
|
|
5927
|
+
f && oh(i, t, p), o || (Ci(i, t, e, n, p, s), i.stroke());
|
|
5928
5928
|
}
|
|
5929
5929
|
class Qt extends ht {
|
|
5930
5930
|
constructor(e) {
|
|
@@ -5951,8 +5951,8 @@ class Qt extends ht {
|
|
|
5951
5951
|
"innerRadius",
|
|
5952
5952
|
"outerRadius",
|
|
5953
5953
|
"circumference"
|
|
5954
|
-
], s), f = (this.options.spacing + this.options.borderWidth) / 2, g = L(u, c - l) >=
|
|
5955
|
-
return g &&
|
|
5954
|
+
], s), f = (this.options.spacing + this.options.borderWidth) / 2, g = L(u, c - l) >= H || je(a, l, c), b = St(r, h + f, d + f);
|
|
5955
|
+
return g && b;
|
|
5956
5956
|
}
|
|
5957
5957
|
getCenterPoint(e) {
|
|
5958
5958
|
const { x: n, y: s, startAngle: o, endAngle: a, innerRadius: r, outerRadius: l } = this.getProps([
|
|
@@ -5973,7 +5973,7 @@ class Qt extends ht {
|
|
|
5973
5973
|
}
|
|
5974
5974
|
draw(e) {
|
|
5975
5975
|
const { options: n, circumference: s } = this, o = (n.offset || 0) / 4, a = (n.spacing || 0) / 2, r = n.circular;
|
|
5976
|
-
if (this.pixelMargin = n.borderAlign === "inner" ? 0.33 : 0, this.fullCircles = s >
|
|
5976
|
+
if (this.pixelMargin = n.borderAlign === "inner" ? 0.33 : 0, this.fullCircles = s > H ? Math.floor(s / H) : 0, s === 0 || this.innerRadius < 0 || this.outerRadius < 0)
|
|
5977
5977
|
return;
|
|
5978
5978
|
e.save();
|
|
5979
5979
|
const l = (this.startAngle + this.endAngle) / 2;
|
|
@@ -6027,15 +6027,15 @@ function uh(i, t, e, n) {
|
|
|
6027
6027
|
}
|
|
6028
6028
|
function fh(i, t, e, n) {
|
|
6029
6029
|
const s = t.points, { count: o, start: a, ilen: r } = ia(s, e, n), { move: l = !0, reverse: c } = n || {};
|
|
6030
|
-
let h = 0, d = 0, u, f, p, g,
|
|
6031
|
-
const y = (
|
|
6032
|
-
g !==
|
|
6030
|
+
let h = 0, d = 0, u, f, p, g, b, m;
|
|
6031
|
+
const y = (_) => (a + (c ? r - _ : _)) % o, x = () => {
|
|
6032
|
+
g !== b && (i.lineTo(h, b), i.lineTo(h, g), i.lineTo(h, m));
|
|
6033
6033
|
};
|
|
6034
6034
|
for (l && (f = s[y(0)], i.moveTo(f.x, f.y)), u = 0; u <= r; ++u) {
|
|
6035
6035
|
if (f = s[y(u)], f.skip)
|
|
6036
6036
|
continue;
|
|
6037
|
-
const
|
|
6038
|
-
|
|
6037
|
+
const _ = f.x, v = f.y, w = _ | 0;
|
|
6038
|
+
w === p ? (v < g ? g = v : v > b && (b = v), h = (d * h + _) / ++d) : (x(), i.lineTo(_, v), p = w, d = 0, g = b = v), m = v;
|
|
6039
6039
|
}
|
|
6040
6040
|
x();
|
|
6041
6041
|
}
|
|
@@ -6044,7 +6044,7 @@ function rn(i) {
|
|
|
6044
6044
|
return !i._decimated && !i._loop && !t.tension && t.cubicInterpolationMode !== "monotone" && !t.stepped && !e ? fh : uh;
|
|
6045
6045
|
}
|
|
6046
6046
|
function gh(i) {
|
|
6047
|
-
return i.stepped ? gl : i.tension || i.cubicInterpolationMode === "monotone" ? pl :
|
|
6047
|
+
return i.stepped ? gl : i.tension || i.cubicInterpolationMode === "monotone" ? pl : Wt;
|
|
6048
6048
|
}
|
|
6049
6049
|
function ph(i, t, e, n) {
|
|
6050
6050
|
let s = t._path;
|
|
@@ -6106,8 +6106,8 @@ class pt extends ht {
|
|
|
6106
6106
|
r.push(f);
|
|
6107
6107
|
continue;
|
|
6108
6108
|
}
|
|
6109
|
-
const g = Math.abs((s - f[e]) / (p[e] - f[e])),
|
|
6110
|
-
|
|
6109
|
+
const g = Math.abs((s - f[e]) / (p[e] - f[e])), b = l(f, p, g, n.stepped);
|
|
6110
|
+
b[e] = t[e], r.push(b);
|
|
6111
6111
|
}
|
|
6112
6112
|
return r.length === 1 ? r[0] : r;
|
|
6113
6113
|
}
|
|
@@ -6389,7 +6389,7 @@ function ln(i, t, e, n) {
|
|
|
6389
6389
|
end: o
|
|
6390
6390
|
};
|
|
6391
6391
|
}
|
|
6392
|
-
function
|
|
6392
|
+
function Mh(i, t) {
|
|
6393
6393
|
const { x: e = null, y: n = null } = i || {}, s = t.points, o = [];
|
|
6394
6394
|
return t.segments.forEach(({ start: a, end: r }) => {
|
|
6395
6395
|
r = Fn(a, r, s);
|
|
@@ -6422,7 +6422,7 @@ function Bs(i, t, e, n) {
|
|
|
6422
6422
|
}
|
|
6423
6423
|
function sa(i, t) {
|
|
6424
6424
|
let e = [], n = !1;
|
|
6425
|
-
return z(i) ? (n = !0, e = i) : e =
|
|
6425
|
+
return z(i) ? (n = !0, e = i) : e = Mh(i, t), e.length ? new pt({
|
|
6426
6426
|
points: e,
|
|
6427
6427
|
options: {
|
|
6428
6428
|
tension: 0
|
|
@@ -6434,7 +6434,7 @@ function sa(i, t) {
|
|
|
6434
6434
|
function zs(i) {
|
|
6435
6435
|
return i && i.fill !== !1;
|
|
6436
6436
|
}
|
|
6437
|
-
function
|
|
6437
|
+
function Ch(i, t, e) {
|
|
6438
6438
|
let s = i[t].fill;
|
|
6439
6439
|
const o = [
|
|
6440
6440
|
t
|
|
@@ -6548,7 +6548,7 @@ class oa {
|
|
|
6548
6548
|
const { x: s, y: o, radius: a } = this;
|
|
6549
6549
|
return e = e || {
|
|
6550
6550
|
start: 0,
|
|
6551
|
-
end:
|
|
6551
|
+
end: H
|
|
6552
6552
|
}, t.arc(s, o, a, e.end, e.start, !0), !n.bounds;
|
|
6553
6553
|
}
|
|
6554
6554
|
interpolate(t) {
|
|
@@ -6576,9 +6576,9 @@ function Bh(i, t) {
|
|
|
6576
6576
|
return e && i.isDatasetVisible(t) ? e.dataset : null;
|
|
6577
6577
|
}
|
|
6578
6578
|
function zh(i) {
|
|
6579
|
-
return (i.scale || {}).getPointPositionForValue ?
|
|
6579
|
+
return (i.scale || {}).getPointPositionForValue ? Wh(i) : Hh(i);
|
|
6580
6580
|
}
|
|
6581
|
-
function
|
|
6581
|
+
function Hh(i) {
|
|
6582
6582
|
const { scale: t = {}, fill: e } = i, n = Dh(e, t);
|
|
6583
6583
|
if (q(n)) {
|
|
6584
6584
|
const s = t.isHorizontal();
|
|
@@ -6589,7 +6589,7 @@ function Wh(i) {
|
|
|
6589
6589
|
}
|
|
6590
6590
|
return null;
|
|
6591
6591
|
}
|
|
6592
|
-
function
|
|
6592
|
+
function Wh(i) {
|
|
6593
6593
|
const { scale: t, fill: e } = i, n = t.options, s = t.getLabels().length, o = n.reverse ? t.max : t.min, a = Lh(e, t, o), r = [];
|
|
6594
6594
|
if (n.grid.circular) {
|
|
6595
6595
|
const l = t.getPointPositionForValue(0, o);
|
|
@@ -6617,13 +6617,13 @@ function qi(i, t, e) {
|
|
|
6617
6617
|
}
|
|
6618
6618
|
function Nh(i, t) {
|
|
6619
6619
|
const { line: e, target: n, above: s, below: o, area: a, scale: r } = t, l = e._loop ? "angle" : t.axis;
|
|
6620
|
-
i.save(), l === "x" && o !== s && (
|
|
6620
|
+
i.save(), l === "x" && o !== s && (Hs(i, n, a.top), Ws(i, {
|
|
6621
6621
|
line: e,
|
|
6622
6622
|
target: n,
|
|
6623
6623
|
color: s,
|
|
6624
6624
|
scale: r,
|
|
6625
6625
|
property: l
|
|
6626
|
-
}), i.restore(), i.save(),
|
|
6626
|
+
}), i.restore(), i.save(), Hs(i, n, a.bottom)), Ws(i, {
|
|
6627
6627
|
line: e,
|
|
6628
6628
|
target: n,
|
|
6629
6629
|
color: o,
|
|
@@ -6631,7 +6631,7 @@ function Nh(i, t) {
|
|
|
6631
6631
|
property: l
|
|
6632
6632
|
}), i.restore();
|
|
6633
6633
|
}
|
|
6634
|
-
function
|
|
6634
|
+
function Hs(i, t, e) {
|
|
6635
6635
|
const { segments: n, points: s } = t;
|
|
6636
6636
|
let o = !0, a = !1;
|
|
6637
6637
|
i.beginPath();
|
|
@@ -6643,7 +6643,7 @@ function Ws(i, t, e) {
|
|
|
6643
6643
|
}
|
|
6644
6644
|
i.lineTo(t.first().x, e), i.closePath(), i.clip();
|
|
6645
6645
|
}
|
|
6646
|
-
function
|
|
6646
|
+
function Ws(i, t) {
|
|
6647
6647
|
const { line: e, target: n, property: s, color: o, scale: a } = t, r = kh(e, n, s);
|
|
6648
6648
|
for (const { source: l, target: c, start: h, end: d } of r) {
|
|
6649
6649
|
const { style: { backgroundColor: u = o } = {} } = l, f = n !== !0;
|
|
@@ -6652,11 +6652,11 @@ function Hs(i, t) {
|
|
|
6652
6652
|
let g;
|
|
6653
6653
|
if (f) {
|
|
6654
6654
|
p ? i.closePath() : Ns(i, n, d, s);
|
|
6655
|
-
const
|
|
6655
|
+
const b = !!n.pathSegment(i, c, {
|
|
6656
6656
|
move: p,
|
|
6657
6657
|
reverse: !0
|
|
6658
6658
|
});
|
|
6659
|
-
g = p &&
|
|
6659
|
+
g = p && b, g || Ns(i, n, h, s);
|
|
6660
6660
|
}
|
|
6661
6661
|
i.closePath(), i.fill(g ? "evenodd" : "nonzero"), i.restore();
|
|
6662
6662
|
}
|
|
@@ -6685,7 +6685,7 @@ var jh = {
|
|
|
6685
6685
|
line: r
|
|
6686
6686
|
}), o.$filler = l, s.push(l);
|
|
6687
6687
|
for (a = 0; a < n; ++a)
|
|
6688
|
-
l = s[a], !(!l || l.fill === !1) && (l.fill =
|
|
6688
|
+
l = s[a], !(!l || l.fill === !1) && (l.fill = Ch(s, a, e.propagate));
|
|
6689
6689
|
},
|
|
6690
6690
|
beforeDraw(i, t, e) {
|
|
6691
6691
|
const n = e.drawTime === "beforeDraw", s = i.getSortedVisibleDatasetMetas(), o = i.chartArea;
|
|
@@ -6755,25 +6755,25 @@ class js extends ht {
|
|
|
6755
6755
|
o.textAlign = "left", o.textBaseline = "middle";
|
|
6756
6756
|
let u = -1, f = -h;
|
|
6757
6757
|
return this.legendItems.forEach((p, g) => {
|
|
6758
|
-
const
|
|
6759
|
-
(g === 0 || c[c.length - 1] +
|
|
6758
|
+
const b = n + e / 2 + o.measureText(p.text).width;
|
|
6759
|
+
(g === 0 || c[c.length - 1] + b + 2 * r > a) && (d += h, c[c.length - (g > 0 ? 0 : 1)] = 0, f += h, u++), l[g] = {
|
|
6760
6760
|
left: 0,
|
|
6761
6761
|
top: f,
|
|
6762
6762
|
row: u,
|
|
6763
|
-
width:
|
|
6763
|
+
width: b,
|
|
6764
6764
|
height: s
|
|
6765
|
-
}, c[c.length - 1] +=
|
|
6765
|
+
}, c[c.length - 1] += b + r;
|
|
6766
6766
|
}), d;
|
|
6767
6767
|
}
|
|
6768
6768
|
_fitCols(t, e, n, s) {
|
|
6769
6769
|
const { ctx: o, maxHeight: a, options: { labels: { padding: r } } } = this, l = this.legendHitBoxes = [], c = this.columnSizes = [], h = a - t;
|
|
6770
6770
|
let d = r, u = 0, f = 0, p = 0, g = 0;
|
|
6771
|
-
return this.legendItems.forEach((
|
|
6772
|
-
const { itemWidth: y, itemHeight: x } = Uh(n, e, o,
|
|
6773
|
-
|
|
6771
|
+
return this.legendItems.forEach((b, m) => {
|
|
6772
|
+
const { itemWidth: y, itemHeight: x } = Uh(n, e, o, b, s);
|
|
6773
|
+
m > 0 && f + x + 2 * r > h && (d += u + r, c.push({
|
|
6774
6774
|
width: u,
|
|
6775
6775
|
height: f
|
|
6776
|
-
}), p += u + r, g++, u = f = 0), l[
|
|
6776
|
+
}), p += u + r, g++, u = f = 0), l[m] = {
|
|
6777
6777
|
left: p,
|
|
6778
6778
|
top: f,
|
|
6779
6779
|
col: g,
|
|
@@ -6812,60 +6812,60 @@ class js extends ht {
|
|
|
6812
6812
|
const { options: t, columnSizes: e, lineWidths: n, ctx: s } = this, { align: o, labels: a } = t, r = $.color, l = te(t.rtl, this.left, this.width), c = X(a.font), { padding: h } = a, d = c.size, u = d / 2;
|
|
6813
6813
|
let f;
|
|
6814
6814
|
this.drawTitle(), s.textAlign = l.textAlign("left"), s.textBaseline = "middle", s.lineWidth = 0.5, s.font = c.string;
|
|
6815
|
-
const { boxWidth: p, boxHeight: g, itemHeight:
|
|
6815
|
+
const { boxWidth: p, boxHeight: g, itemHeight: b } = Vs(a, d), m = function(w, M, S) {
|
|
6816
6816
|
if (isNaN(p) || p <= 0 || isNaN(g) || g < 0)
|
|
6817
6817
|
return;
|
|
6818
6818
|
s.save();
|
|
6819
|
-
const A = L(
|
|
6820
|
-
if (s.fillStyle = L(
|
|
6821
|
-
const
|
|
6819
|
+
const A = L(S.lineWidth, 1);
|
|
6820
|
+
if (s.fillStyle = L(S.fillStyle, r), s.lineCap = L(S.lineCap, "butt"), s.lineDashOffset = L(S.lineDashOffset, 0), s.lineJoin = L(S.lineJoin, "miter"), s.lineWidth = A, s.strokeStyle = L(S.strokeStyle, r), s.setLineDash(L(S.lineDash, [])), a.usePointStyle) {
|
|
6821
|
+
const C = {
|
|
6822
6822
|
radius: g * Math.SQRT2 / 2,
|
|
6823
|
-
pointStyle:
|
|
6824
|
-
rotation:
|
|
6823
|
+
pointStyle: S.pointStyle,
|
|
6824
|
+
rotation: S.rotation,
|
|
6825
6825
|
borderWidth: A
|
|
6826
|
-
}, P = l.xPlus(
|
|
6827
|
-
Lo(s,
|
|
6826
|
+
}, P = l.xPlus(w, p / 2), D = M + u;
|
|
6827
|
+
Lo(s, C, P, D, a.pointStyleWidth && p);
|
|
6828
6828
|
} else {
|
|
6829
|
-
const
|
|
6830
|
-
s.beginPath(), Object.values(D).some((
|
|
6829
|
+
const C = M + Math.max((d - g) / 2, 0), P = l.leftForLtr(w, p), D = Vt(S.borderRadius);
|
|
6830
|
+
s.beginPath(), Object.values(D).some((W) => W !== 0) ? $e(s, {
|
|
6831
6831
|
x: P,
|
|
6832
|
-
y:
|
|
6832
|
+
y: C,
|
|
6833
6833
|
w: p,
|
|
6834
6834
|
h: g,
|
|
6835
6835
|
radius: D
|
|
6836
|
-
}) : s.rect(P,
|
|
6836
|
+
}) : s.rect(P, C, p, g), s.fill(), A !== 0 && s.stroke();
|
|
6837
6837
|
}
|
|
6838
6838
|
s.restore();
|
|
6839
|
-
}, y = function(
|
|
6840
|
-
Xt(s,
|
|
6841
|
-
strikethrough:
|
|
6842
|
-
textAlign: l.textAlign(
|
|
6839
|
+
}, y = function(w, M, S) {
|
|
6840
|
+
Xt(s, S.text, w, M + b / 2, c, {
|
|
6841
|
+
strikethrough: S.hidden,
|
|
6842
|
+
textAlign: l.textAlign(S.textAlign)
|
|
6843
6843
|
});
|
|
6844
|
-
}, x = this.isHorizontal(),
|
|
6844
|
+
}, x = this.isHorizontal(), _ = this._computeTitleHeight();
|
|
6845
6845
|
x ? f = {
|
|
6846
6846
|
x: J(o, this.left + h, this.right - n[0]),
|
|
6847
|
-
y: this.top + h +
|
|
6847
|
+
y: this.top + h + _,
|
|
6848
6848
|
line: 0
|
|
6849
6849
|
} : f = {
|
|
6850
6850
|
x: this.left + h,
|
|
6851
|
-
y: J(o, this.top +
|
|
6851
|
+
y: J(o, this.top + _ + h, this.bottom - e[0].height),
|
|
6852
6852
|
line: 0
|
|
6853
6853
|
}, zo(this.ctx, t.textDirection);
|
|
6854
|
-
const
|
|
6855
|
-
this.legendItems.forEach((
|
|
6856
|
-
s.strokeStyle =
|
|
6857
|
-
const
|
|
6854
|
+
const v = b + h;
|
|
6855
|
+
this.legendItems.forEach((w, M) => {
|
|
6856
|
+
s.strokeStyle = w.fontColor, s.fillStyle = w.fontColor;
|
|
6857
|
+
const S = s.measureText(w.text).width, A = l.textAlign(w.textAlign || (w.textAlign = a.textAlign)), C = p + u + S;
|
|
6858
6858
|
let P = f.x, D = f.y;
|
|
6859
|
-
l.setWidth(this.width), x ?
|
|
6860
|
-
const
|
|
6861
|
-
if (
|
|
6862
|
-
f.x +=
|
|
6863
|
-
else if (typeof
|
|
6859
|
+
l.setWidth(this.width), x ? M > 0 && P + C + h > this.right && (D = f.y += v, f.line++, P = f.x = J(o, this.left + h, this.right - n[f.line])) : M > 0 && D + v > this.bottom && (P = f.x = P + e[f.line].width + h, f.line++, D = f.y = J(o, this.top + _ + h, this.bottom - e[f.line].height));
|
|
6860
|
+
const W = l.x(P);
|
|
6861
|
+
if (m(W, D, w), P = vr(A, P + p + u, x ? P + C : this.right, t.rtl), y(l.x(P), D, w), x)
|
|
6862
|
+
f.x += C + h;
|
|
6863
|
+
else if (typeof w.text != "string") {
|
|
6864
6864
|
const U = c.lineHeight;
|
|
6865
|
-
f.y += aa(
|
|
6865
|
+
f.y += aa(w, U) + h;
|
|
6866
6866
|
} else
|
|
6867
|
-
f.y +=
|
|
6868
|
-
}),
|
|
6867
|
+
f.y += v;
|
|
6868
|
+
}), Ho(this.ctx, t.textDirection);
|
|
6869
6869
|
}
|
|
6870
6870
|
drawTitle() {
|
|
6871
6871
|
const t = this.options, e = t.title, n = X(e.font), s = K(e.padding);
|
|
@@ -6876,7 +6876,7 @@ class js extends ht {
|
|
|
6876
6876
|
if (this.isHorizontal())
|
|
6877
6877
|
u = Math.max(...this.lineWidths), h = this.top + c, d = J(t.align, d, this.right - u);
|
|
6878
6878
|
else {
|
|
6879
|
-
const p = this.columnSizes.reduce((g,
|
|
6879
|
+
const p = this.columnSizes.reduce((g, b) => Math.max(g, b.height), 0);
|
|
6880
6880
|
h = c + J(t.align, this.top, this.bottom - p - t.labels.padding - this._computeTitleHeight());
|
|
6881
6881
|
}
|
|
6882
6882
|
const f = J(r, d, d + u);
|
|
@@ -7177,20 +7177,20 @@ function Kh(i, t) {
|
|
|
7177
7177
|
}
|
|
7178
7178
|
function $s(i, t) {
|
|
7179
7179
|
const e = i.chart.ctx, { body: n, footer: s, title: o } = i, { boxWidth: a, boxHeight: r } = t, l = X(t.bodyFont), c = X(t.titleFont), h = X(t.footerFont), d = o.length, u = s.length, f = n.length, p = K(t.padding);
|
|
7180
|
-
let g = p.height,
|
|
7181
|
-
if (
|
|
7182
|
-
const
|
|
7183
|
-
g += f *
|
|
7180
|
+
let g = p.height, b = 0, m = n.reduce((_, v) => _ + v.before.length + v.lines.length + v.after.length, 0);
|
|
7181
|
+
if (m += i.beforeBody.length + i.afterBody.length, d && (g += d * c.lineHeight + (d - 1) * t.titleSpacing + t.titleMarginBottom), m) {
|
|
7182
|
+
const _ = t.displayColors ? Math.max(r, l.lineHeight) : l.lineHeight;
|
|
7183
|
+
g += f * _ + (m - f) * l.lineHeight + (m - 1) * t.bodySpacing;
|
|
7184
7184
|
}
|
|
7185
7185
|
u && (g += t.footerMarginTop + u * h.lineHeight + (u - 1) * t.footerSpacing);
|
|
7186
7186
|
let y = 0;
|
|
7187
|
-
const x = function(
|
|
7188
|
-
|
|
7187
|
+
const x = function(_) {
|
|
7188
|
+
b = Math.max(b, e.measureText(_).width + y);
|
|
7189
7189
|
};
|
|
7190
|
-
return e.save(), e.font = c.string, R(i.title, x), e.font = l.string, R(i.beforeBody.concat(i.afterBody), x), y = t.displayColors ? a + 2 + t.boxPadding : 0, R(n, (
|
|
7191
|
-
R(
|
|
7192
|
-
}), y = 0, e.font = h.string, R(i.footer, x), e.restore(),
|
|
7193
|
-
width:
|
|
7190
|
+
return e.save(), e.font = c.string, R(i.title, x), e.font = l.string, R(i.beforeBody.concat(i.afterBody), x), y = t.displayColors ? a + 2 + t.boxPadding : 0, R(n, (_) => {
|
|
7191
|
+
R(_.before, x), R(_.lines, x), R(_.after, x);
|
|
7192
|
+
}), y = 0, e.font = h.string, R(i.footer, x), e.restore(), b += p.width, {
|
|
7193
|
+
width: b,
|
|
7194
7194
|
height: g
|
|
7195
7195
|
};
|
|
7196
7196
|
}
|
|
@@ -7393,14 +7393,14 @@ class cn extends ht {
|
|
|
7393
7393
|
}
|
|
7394
7394
|
getCaretPosition(t, e, n) {
|
|
7395
7395
|
const { xAlign: s, yAlign: o } = this, { caretSize: a, cornerRadius: r } = n, { topLeft: l, topRight: c, bottomLeft: h, bottomRight: d } = Vt(r), { x: u, y: f } = t, { width: p, height: g } = e;
|
|
7396
|
-
let
|
|
7397
|
-
return o === "center" ? (
|
|
7398
|
-
x1:
|
|
7399
|
-
x2:
|
|
7396
|
+
let b, m, y, x, _, v;
|
|
7397
|
+
return o === "center" ? (_ = f + g / 2, s === "left" ? (b = u, m = b - a, x = _ + a, v = _ - a) : (b = u + p, m = b + a, x = _ - a, v = _ + a), y = b) : (s === "left" ? m = u + Math.max(l, h) + a : s === "right" ? m = u + p - Math.max(c, d) - a : m = this.caretX, o === "top" ? (x = f, _ = x - a, b = m - a, y = m + a) : (x = f + g, _ = x + a, b = m + a, y = m - a), v = x), {
|
|
7398
|
+
x1: b,
|
|
7399
|
+
x2: m,
|
|
7400
7400
|
x3: y,
|
|
7401
7401
|
y1: x,
|
|
7402
|
-
y2:
|
|
7403
|
-
y3:
|
|
7402
|
+
y2: _,
|
|
7403
|
+
y3: v
|
|
7404
7404
|
};
|
|
7405
7405
|
}
|
|
7406
7406
|
drawTitle(t, e, n) {
|
|
@@ -7420,38 +7420,38 @@ class cn extends ht {
|
|
|
7420
7420
|
pointStyle: r.pointStyle,
|
|
7421
7421
|
rotation: r.rotation,
|
|
7422
7422
|
borderWidth: 1
|
|
7423
|
-
},
|
|
7424
|
-
t.strokeStyle = o.multiKeyBackground, t.fillStyle = o.multiKeyBackground, sn(t, g,
|
|
7423
|
+
}, b = s.leftForLtr(u, c) + c / 2, m = p + l / 2;
|
|
7424
|
+
t.strokeStyle = o.multiKeyBackground, t.fillStyle = o.multiKeyBackground, sn(t, g, b, m), t.strokeStyle = a.borderColor, t.fillStyle = a.backgroundColor, sn(t, g, b, m);
|
|
7425
7425
|
} else {
|
|
7426
7426
|
t.lineWidth = T(a.borderWidth) ? Math.max(...Object.values(a.borderWidth)) : a.borderWidth || 1, t.strokeStyle = a.borderColor, t.setLineDash(a.borderDash || []), t.lineDashOffset = a.borderDashOffset || 0;
|
|
7427
|
-
const g = s.leftForLtr(u, c),
|
|
7428
|
-
Object.values(
|
|
7427
|
+
const g = s.leftForLtr(u, c), b = s.leftForLtr(s.xPlus(u, 1), c - 2), m = Vt(a.borderRadius);
|
|
7428
|
+
Object.values(m).some((y) => y !== 0) ? (t.beginPath(), t.fillStyle = o.multiKeyBackground, $e(t, {
|
|
7429
7429
|
x: g,
|
|
7430
7430
|
y: p,
|
|
7431
7431
|
w: c,
|
|
7432
7432
|
h: l,
|
|
7433
|
-
radius:
|
|
7433
|
+
radius: m
|
|
7434
7434
|
}), t.fill(), t.stroke(), t.fillStyle = a.backgroundColor, t.beginPath(), $e(t, {
|
|
7435
|
-
x:
|
|
7435
|
+
x: b,
|
|
7436
7436
|
y: p + 1,
|
|
7437
7437
|
w: c - 2,
|
|
7438
7438
|
h: l - 2,
|
|
7439
|
-
radius:
|
|
7440
|
-
}), t.fill()) : (t.fillStyle = o.multiKeyBackground, t.fillRect(g, p, c, l), t.strokeRect(g, p, c, l), t.fillStyle = a.backgroundColor, t.fillRect(
|
|
7439
|
+
radius: m
|
|
7440
|
+
}), t.fill()) : (t.fillStyle = o.multiKeyBackground, t.fillRect(g, p, c, l), t.strokeRect(g, p, c, l), t.fillStyle = a.backgroundColor, t.fillRect(b, p + 1, c - 2, l - 2));
|
|
7441
7441
|
}
|
|
7442
7442
|
t.fillStyle = this.labelTextColors[n];
|
|
7443
7443
|
}
|
|
7444
7444
|
drawBody(t, e, n) {
|
|
7445
7445
|
const { body: s } = this, { bodySpacing: o, bodyAlign: a, displayColors: r, boxHeight: l, boxWidth: c, boxPadding: h } = n, d = X(n.bodyFont);
|
|
7446
7446
|
let u = d.lineHeight, f = 0;
|
|
7447
|
-
const p = te(n.rtl, this.x, this.width), g = function(
|
|
7448
|
-
e.fillText(
|
|
7449
|
-
},
|
|
7450
|
-
let
|
|
7451
|
-
for (e.textAlign = a, e.textBaseline = "middle", e.font = d.string, t.x = ri(this,
|
|
7452
|
-
for (
|
|
7453
|
-
g(x[
|
|
7454
|
-
R(
|
|
7447
|
+
const p = te(n.rtl, this.x, this.width), g = function(S) {
|
|
7448
|
+
e.fillText(S, p.x(t.x + f), t.y + u / 2), t.y += u + o;
|
|
7449
|
+
}, b = p.textAlign(a);
|
|
7450
|
+
let m, y, x, _, v, w, M;
|
|
7451
|
+
for (e.textAlign = a, e.textBaseline = "middle", e.font = d.string, t.x = ri(this, b, n), e.fillStyle = n.bodyColor, R(this.beforeBody, g), f = r && b !== "right" ? a === "center" ? c / 2 + h : c + 2 + h : 0, _ = 0, w = s.length; _ < w; ++_) {
|
|
7452
|
+
for (m = s[_], y = this.labelTextColors[_], e.fillStyle = y, R(m.before, g), x = m.lines, r && x.length && (this._drawColorBox(e, t, _, p, n), u = Math.max(d.lineHeight, l)), v = 0, M = x.length; v < M; ++v)
|
|
7453
|
+
g(x[v]), u = d.lineHeight;
|
|
7454
|
+
R(m.after, g);
|
|
7455
7455
|
}
|
|
7456
7456
|
f = 0, u = d.lineHeight, R(this.afterBody, g), t.y -= o;
|
|
7457
7457
|
}
|
|
@@ -7496,7 +7496,7 @@ class cn extends ht {
|
|
|
7496
7496
|
};
|
|
7497
7497
|
n = Math.abs(n) < 1e-3 ? 0 : n;
|
|
7498
7498
|
const a = K(e.padding), r = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length;
|
|
7499
|
-
e.enabled && r && (t.save(), t.globalAlpha = n, this.drawBackground(o, t, s, e), zo(t, e.textDirection), o.y += a.top, this.drawTitle(o, t, e), this.drawBody(o, t, e), this.drawFooter(o, t, e),
|
|
7499
|
+
e.enabled && r && (t.save(), t.globalAlpha = n, this.drawBackground(o, t, s, e), zo(t, e.textDirection), o.y += a.top, this.drawTitle(o, t, e), this.drawBody(o, t, e), this.drawFooter(o, t, e), Ho(t, e.textDirection), t.restore());
|
|
7500
7500
|
}
|
|
7501
7501
|
getActiveElements() {
|
|
7502
7502
|
return this._active || [];
|
|
@@ -7732,35 +7732,35 @@ k(se, "id", "category"), k(se, "defaults", {
|
|
|
7732
7732
|
}
|
|
7733
7733
|
});
|
|
7734
7734
|
function ad(i, t) {
|
|
7735
|
-
const e = [], { bounds: s, step: o, min: a, max: r, precision: l, count: c, maxTicks: h, maxDigits: d, includeBounds: u } = i, f = o || 1, p = h - 1, { min: g, max:
|
|
7736
|
-
let
|
|
7737
|
-
if (
|
|
7735
|
+
const e = [], { bounds: s, step: o, min: a, max: r, precision: l, count: c, maxTicks: h, maxDigits: d, includeBounds: u } = i, f = o || 1, p = h - 1, { min: g, max: b } = t, m = !O(a), y = !O(r), x = !O(c), _ = (b - g) / (d + 1);
|
|
7736
|
+
let v = Yn((b - g) / p / f) * f, w, M, S, A;
|
|
7737
|
+
if (v < 1e-14 && !m && !y)
|
|
7738
7738
|
return [
|
|
7739
7739
|
{
|
|
7740
7740
|
value: g
|
|
7741
7741
|
},
|
|
7742
7742
|
{
|
|
7743
|
-
value:
|
|
7743
|
+
value: b
|
|
7744
7744
|
}
|
|
7745
7745
|
];
|
|
7746
|
-
A = Math.ceil(
|
|
7747
|
-
const
|
|
7748
|
-
|
|
7746
|
+
A = Math.ceil(b / v) - Math.floor(g / v), A > p && (v = Yn(A * v / p / f) * f), O(l) || (w = Math.pow(10, l), v = Math.ceil(v * w) / w), s === "ticks" ? (M = Math.floor(g / v) * v, S = Math.ceil(b / v) * v) : (M = g, S = b), m && y && o && fr((r - a) / o, v / 1e3) ? (A = Math.round(Math.min((r - a) / v, h)), v = (r - a) / A, M = a, S = r) : x ? (M = m ? a : M, S = y ? r : S, A = c - 1, v = (S - M) / A) : (A = (S - M) / v, Re(A, Math.round(A), v / 1e3) ? A = Math.round(A) : A = Math.ceil(A));
|
|
7747
|
+
const C = Math.max(Xn(v), Xn(M));
|
|
7748
|
+
w = Math.pow(10, O(l) ? C : l), M = Math.round(M * w) / w, S = Math.round(S * w) / w;
|
|
7749
7749
|
let P = 0;
|
|
7750
|
-
for (
|
|
7750
|
+
for (m && (u && M !== a ? (e.push({
|
|
7751
7751
|
value: a
|
|
7752
|
-
}),
|
|
7753
|
-
const D = Math.round((
|
|
7752
|
+
}), M < a && P++, Re(Math.round((M + P * v) * w) / w, a, Ks(a, _, i)) && P++) : M < a && P++); P < A; ++P) {
|
|
7753
|
+
const D = Math.round((M + P * v) * w) / w;
|
|
7754
7754
|
if (y && D > r)
|
|
7755
7755
|
break;
|
|
7756
7756
|
e.push({
|
|
7757
7757
|
value: D
|
|
7758
7758
|
});
|
|
7759
7759
|
}
|
|
7760
|
-
return y && u &&
|
|
7760
|
+
return y && u && S !== r ? e.length && Re(e[e.length - 1].value, r, Ks(r, _, i)) ? e[e.length - 1].value = r : e.push({
|
|
7761
7761
|
value: r
|
|
7762
|
-
}) : (!y ||
|
|
7763
|
-
value:
|
|
7762
|
+
}) : (!y || S === r) && e.push({
|
|
7763
|
+
value: S
|
|
7764
7764
|
}), e;
|
|
7765
7765
|
}
|
|
7766
7766
|
function Ks(i, t, { horizontal: e, minRotation: n }) {
|
|
@@ -7825,7 +7825,7 @@ class hn extends de {
|
|
|
7825
7825
|
this._startValue = e, this._endValue = n, this._valueRange = n - e;
|
|
7826
7826
|
}
|
|
7827
7827
|
getLabelForValue(t) {
|
|
7828
|
-
return
|
|
7828
|
+
return Cn(t, this.chart.options.locale, this.options.ticks.format);
|
|
7829
7829
|
}
|
|
7830
7830
|
}
|
|
7831
7831
|
class oe extends hn {
|
|
@@ -7889,8 +7889,8 @@ function ld(i) {
|
|
|
7889
7889
|
s[l] = c.padding;
|
|
7890
7890
|
const h = i.getPointPosition(l, i.drawingArea + s[l], r), d = X(c.font), u = rd(i.ctx, d, i._pointLabels[l]);
|
|
7891
7891
|
n[l] = u;
|
|
7892
|
-
const f = ot(i.getIndexAngle(l) + r), p = Math.round(Sn(f)), g = Zs(p, h.x, u.w, 0, 180),
|
|
7893
|
-
cd(e, t, f, g,
|
|
7892
|
+
const f = ot(i.getIndexAngle(l) + r), p = Math.round(Sn(f)), g = Zs(p, h.x, u.w, 0, 180), b = Zs(p, h.y, u.h, 90, 270);
|
|
7893
|
+
cd(e, t, f, g, b);
|
|
7894
7894
|
}
|
|
7895
7895
|
i.setCenterPoint(t.l - e.l, e.r - t.r, t.t - e.t, e.b - t.b), i._pointLabelItems = ud(i, n, s);
|
|
7896
7896
|
}
|
|
@@ -7986,7 +7986,7 @@ function bd(i, t) {
|
|
|
7986
7986
|
function ca(i, t, e, n) {
|
|
7987
7987
|
const { ctx: s } = i;
|
|
7988
7988
|
if (e)
|
|
7989
|
-
s.arc(i.xCenter, i.yCenter, t, 0,
|
|
7989
|
+
s.arc(i.xCenter, i.yCenter, t, 0, H);
|
|
7990
7990
|
else {
|
|
7991
7991
|
let o = i.getPointPosition(0, t);
|
|
7992
7992
|
s.moveTo(o.x, o.y);
|
|
@@ -8037,7 +8037,7 @@ class Ie extends hn {
|
|
|
8037
8037
|
this.xCenter += Math.floor((t - e) / 2), this.yCenter += Math.floor((n - s) / 2), this.drawingArea -= Math.min(this.drawingArea / 2, Math.max(t, e, n, s));
|
|
8038
8038
|
}
|
|
8039
8039
|
getIndexAngle(t) {
|
|
8040
|
-
const e =
|
|
8040
|
+
const e = H / (this._pointLabels.length || 1), n = this.options.startAngle || 0;
|
|
8041
8041
|
return ot(t * e + gt(n));
|
|
8042
8042
|
}
|
|
8043
8043
|
getDistanceFromCenterForValue(t) {
|
|
@@ -8417,7 +8417,7 @@ class Pi extends de {
|
|
|
8417
8417
|
return this._cache.labels = this._normalized ? t : this.normalize(t);
|
|
8418
8418
|
}
|
|
8419
8419
|
normalize(t) {
|
|
8420
|
-
return
|
|
8420
|
+
return Co(t.sort(Js));
|
|
8421
8421
|
}
|
|
8422
8422
|
}
|
|
8423
8423
|
k(Pi, "id", "time"), k(Pi, "defaults", {
|
|
@@ -8530,11 +8530,11 @@ const ha = {
|
|
|
8530
8530
|
function Jt(i) {
|
|
8531
8531
|
return bo(i) ? Ji(i) : i;
|
|
8532
8532
|
}
|
|
8533
|
-
function
|
|
8533
|
+
function Md(i) {
|
|
8534
8534
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : i;
|
|
8535
8535
|
return bo(t) ? new Proxy(i, {}) : i;
|
|
8536
8536
|
}
|
|
8537
|
-
function
|
|
8537
|
+
function Cd(i, t) {
|
|
8538
8538
|
const e = i.options;
|
|
8539
8539
|
e && t && Object.assign(e, t);
|
|
8540
8540
|
}
|
|
@@ -8568,8 +8568,8 @@ const Ad = Ft({
|
|
|
8568
8568
|
const o = () => {
|
|
8569
8569
|
if (!n.value)
|
|
8570
8570
|
return;
|
|
8571
|
-
const { type: l, data: c, options: h, plugins: d, datasetIdKey: u } = i, f = Pd(c, u), p =
|
|
8572
|
-
s.value = new
|
|
8571
|
+
const { type: l, data: c, options: h, plugins: d, datasetIdKey: u } = i, f = Pd(c, u), p = Md(f, c);
|
|
8572
|
+
s.value = new Ct(n.value, {
|
|
8573
8573
|
type: l,
|
|
8574
8574
|
data: p,
|
|
8575
8575
|
options: {
|
|
@@ -8593,12 +8593,12 @@ const Ad = Ft({
|
|
|
8593
8593
|
return;
|
|
8594
8594
|
let g = !1;
|
|
8595
8595
|
if (h) {
|
|
8596
|
-
const
|
|
8597
|
-
|
|
8596
|
+
const b = Jt(h), m = Jt(u);
|
|
8597
|
+
b && b !== m && (Cd(p, b), g = !0);
|
|
8598
8598
|
}
|
|
8599
8599
|
if (d) {
|
|
8600
|
-
const
|
|
8601
|
-
|
|
8600
|
+
const b = Jt(d.labels), m = Jt(f.labels), y = Jt(d.datasets), x = Jt(f.datasets);
|
|
8601
|
+
b !== m && (da(p.config.data, b), g = !0), y && y !== x && (ua(p.config.data, y, i.datasetIdKey), g = !0);
|
|
8602
8602
|
}
|
|
8603
8603
|
g && r(p);
|
|
8604
8604
|
}, {
|
|
@@ -8609,7 +8609,7 @@ const Ad = Ft({
|
|
|
8609
8609
|
}
|
|
8610
8610
|
});
|
|
8611
8611
|
function Ge(i, t) {
|
|
8612
|
-
return
|
|
8612
|
+
return Ct.register(t), Ft({
|
|
8613
8613
|
props: ha,
|
|
8614
8614
|
setup(e, n) {
|
|
8615
8615
|
let { expose: s } = n;
|
|
@@ -8663,15 +8663,15 @@ function pa(i, t, e, n, s, o, a, r, l) {
|
|
|
8663
8663
|
for (u.style.margin = "1.375rem 1.0625rem"; u.firstChild; )
|
|
8664
8664
|
u.firstChild.remove();
|
|
8665
8665
|
c.options.plugins.legend.labels.generateLabels(c).forEach((p) => {
|
|
8666
|
-
const g = c.config.type === "doughnut",
|
|
8666
|
+
const g = c.config.type === "doughnut", b = g ? p.index : p.datasetIndex, m = Ri(c, t, b);
|
|
8667
8667
|
if (g) {
|
|
8668
|
-
const x =
|
|
8669
|
-
|
|
8668
|
+
const x = b + 1 === r;
|
|
8669
|
+
m.style.marginTop = "12px", x && (m.style.position = "relative");
|
|
8670
8670
|
} else
|
|
8671
|
-
|
|
8672
|
-
|
|
8671
|
+
m.style.marginRight = "10px";
|
|
8672
|
+
m.style.width = "max-content", m.style.cursor = "pointer";
|
|
8673
8673
|
let y;
|
|
8674
|
-
t.value ? y = ba(c, p, t, e, s.value, a.value) : y = ma(p, c, e, n.value, s.value, o.value, a.value), y.style.boxSizing = "border-box",
|
|
8674
|
+
t.value ? y = ba(c, p, t, e, s.value, a.value) : y = ma(p, c, e, n.value, s.value, o.value, a.value), y.style.boxSizing = "border-box", m.appendChild(y), m.appendChild(Fi(p)), g && r && zd(l, r, b) && m.appendChild(Hd(l, r)), u.appendChild(m);
|
|
8675
8675
|
});
|
|
8676
8676
|
}
|
|
8677
8677
|
}];
|
|
@@ -8679,17 +8679,17 @@ function pa(i, t, e, n, s, o, a, r, l) {
|
|
|
8679
8679
|
function zd(i, t, e) {
|
|
8680
8680
|
return i.data.length > t && e === t - 1;
|
|
8681
8681
|
}
|
|
8682
|
-
function
|
|
8682
|
+
function Hd(i, t) {
|
|
8683
8683
|
const e = document.createElement("div"), n = document.createElement("div"), s = document.createElement("img");
|
|
8684
8684
|
e.style.position = "absolute", e.style.right = "-32px", s.src = Rd, s.style.top = "0", s.style.width = "1.5rem", s.style.filter = "invert(38%) sepia(19%) saturate(18%) hue-rotate(337deg) brightness(97%) contrast(85%)", n.style.position = "relative", n.style.display = "flex";
|
|
8685
|
-
const o =
|
|
8685
|
+
const o = Wd(i, t);
|
|
8686
8686
|
return s.onmouseover = () => {
|
|
8687
8687
|
n.firstElementChild.style.visibility = "visible";
|
|
8688
8688
|
}, s.onmouseleave = () => {
|
|
8689
8689
|
n.firstElementChild.style.visibility = "hidden";
|
|
8690
8690
|
}, e.appendChild(n), n.appendChild(o), n.appendChild(s), e;
|
|
8691
8691
|
}
|
|
8692
|
-
function
|
|
8692
|
+
function Wd(i, t) {
|
|
8693
8693
|
const e = document.createElement("div");
|
|
8694
8694
|
return e.style.visibility = "hidden", e.style.position = "absolute", e.style.zIndex = "10", e.style.width = "350px", e.style.bottom = "100%", e.style.left = "50%", e.style.marginLeft = "-150px", e.style.background = "#FFFFFF", e.style.boxShadow = "0px 1px 5px rgba(0, 0, 0, 0.2)", e.style.borderRadius = "0.5rem", e.style.fontSize = "14px", e.style.overflow = "hidden", Nd(i, t, e), e;
|
|
8695
8695
|
}
|
|
@@ -8806,58 +8806,58 @@ function Ud() {
|
|
|
8806
8806
|
dataSetIndex: -1,
|
|
8807
8807
|
columnIndex: -1
|
|
8808
8808
|
});
|
|
8809
|
-
function n(g,
|
|
8810
|
-
return pa(g,
|
|
8809
|
+
function n(g, b, m, y, x, _) {
|
|
8810
|
+
return pa(g, b, e, m, y, x, _);
|
|
8811
8811
|
}
|
|
8812
8812
|
function s() {
|
|
8813
8813
|
i.value = 4, i.value = 3;
|
|
8814
8814
|
}
|
|
8815
|
-
function o(g,
|
|
8816
|
-
const
|
|
8817
|
-
return g.map((
|
|
8818
|
-
borderColor: function(
|
|
8819
|
-
return
|
|
8815
|
+
function o(g, b, m, y, x, _) {
|
|
8816
|
+
const v = i.value;
|
|
8817
|
+
return g.map((w, M) => ({
|
|
8818
|
+
borderColor: function(S) {
|
|
8819
|
+
return m ? "#00000000" : r(M, S.index, y, _);
|
|
8820
8820
|
},
|
|
8821
|
-
backgroundColor: function(
|
|
8822
|
-
return l(
|
|
8821
|
+
backgroundColor: function(S) {
|
|
8822
|
+
return l(M, S.index, m, y, x, _);
|
|
8823
8823
|
},
|
|
8824
8824
|
borderWidth: function() {
|
|
8825
|
-
return
|
|
8825
|
+
return m ? 1 : v;
|
|
8826
8826
|
},
|
|
8827
|
-
data:
|
|
8828
|
-
label:
|
|
8829
|
-
stack: `Stack ${
|
|
8827
|
+
data: w.data,
|
|
8828
|
+
label: w.label,
|
|
8829
|
+
stack: `Stack ${b ? w.stack : M}`
|
|
8830
8830
|
}));
|
|
8831
8831
|
}
|
|
8832
|
-
function a(g,
|
|
8833
|
-
return o([g,
|
|
8832
|
+
function a(g, b, m, y, x) {
|
|
8833
|
+
return o([g, b], !1, x, m, y);
|
|
8834
8834
|
}
|
|
8835
|
-
function r(g,
|
|
8835
|
+
function r(g, b, m, y) {
|
|
8836
8836
|
const x = Ki(g, y);
|
|
8837
|
-
return u(g,
|
|
8837
|
+
return u(g, b) ? m[x] : ae(m[x], 0.2);
|
|
8838
8838
|
}
|
|
8839
|
-
function l(g,
|
|
8840
|
-
const
|
|
8841
|
-
return u(g,
|
|
8839
|
+
function l(g, b, m, y, x, _) {
|
|
8840
|
+
const v = Ki(g, _);
|
|
8841
|
+
return u(g, b) ? x[v](!1, y[v], m) : x[v](!0, y[v], m);
|
|
8842
8842
|
}
|
|
8843
8843
|
function c() {
|
|
8844
8844
|
return e.dataSetIndex < 0;
|
|
8845
8845
|
}
|
|
8846
|
-
function h(g,
|
|
8847
|
-
return e.dataSetIndex === g && e.columnIndex ===
|
|
8846
|
+
function h(g, b) {
|
|
8847
|
+
return e.dataSetIndex === g && e.columnIndex === b;
|
|
8848
8848
|
}
|
|
8849
8849
|
function d(g) {
|
|
8850
8850
|
return e.dataSetIndex === g && e.columnIndex < 0;
|
|
8851
8851
|
}
|
|
8852
|
-
function u(g,
|
|
8853
|
-
return c() || h(g,
|
|
8852
|
+
function u(g, b) {
|
|
8853
|
+
return c() || h(g, b) || d(g);
|
|
8854
8854
|
}
|
|
8855
8855
|
function f() {
|
|
8856
8856
|
e.dataSetIndex = -1, e.columnIndex = -1;
|
|
8857
8857
|
}
|
|
8858
8858
|
function p() {
|
|
8859
|
-
return (g,
|
|
8860
|
-
|
|
8859
|
+
return (g, b) => {
|
|
8860
|
+
b[0] !== void 0 ? (e.dataSetIndex = b[0].datasetIndex, e.columnIndex = b[0].index) : f();
|
|
8861
8861
|
};
|
|
8862
8862
|
}
|
|
8863
8863
|
return {
|
|
@@ -8903,14 +8903,14 @@ class pe {
|
|
|
8903
8903
|
const f = l.body.map(this.getBody);
|
|
8904
8904
|
let p = "background: white;";
|
|
8905
8905
|
p += "border-bottom: 1px solid #CCCCCC;", p += "border-radius: 5px;", p += "padding: 10px 20px";
|
|
8906
|
-
const g = `<div style="${p}" class="tooltipTitle">`,
|
|
8907
|
-
let
|
|
8906
|
+
const g = `<div style="${p}" class="tooltipTitle">`, b = this.chartType === "DOUGHNUT" ? [l.title[0].split("(")[0].trim()] : f[0];
|
|
8907
|
+
let m = "", y = "";
|
|
8908
8908
|
const x = (u = (d = (h = t.tooltip) == null ? void 0 : h.dataPoints[0]) == null ? void 0 : d.dataset) == null ? void 0 : u.type;
|
|
8909
|
-
this.chartType === "RADAR" || this.chartType === "LINE_CHART" ? (
|
|
8909
|
+
this.chartType === "RADAR" || this.chartType === "LINE_CHART" ? (m = this.createLegendStyle(t), y = this.createLegendInnerStyle(t)) : this.chartType === "BAR_CHART" || this.chartType === "DETAILS_BAR_CHART" || this.chartType === "DOUGHNUT" ? m = this.createPatternLegendStyle(t) : this.chartType === "MIXED_BAR_LINE_CHART" && (x === "bar" ? m = this.createPatternLegendStyle(t) : (m = this.createLegendStyle(t), y = this.createLegendInnerStyle(t))), this.addLegendToDom(
|
|
8910
8910
|
g,
|
|
8911
|
-
b,
|
|
8912
|
-
y,
|
|
8913
8911
|
m,
|
|
8912
|
+
y,
|
|
8913
|
+
b,
|
|
8914
8914
|
p,
|
|
8915
8915
|
r,
|
|
8916
8916
|
s,
|
|
@@ -9245,7 +9245,7 @@ const Qd = { class: "container" }, tu = { class: "main" }, eu = /* @__PURE__ */
|
|
|
9245
9245
|
},
|
|
9246
9246
|
setup(i) {
|
|
9247
9247
|
const t = i;
|
|
9248
|
-
|
|
9248
|
+
Ct.register(
|
|
9249
9249
|
fe,
|
|
9250
9250
|
ge,
|
|
9251
9251
|
ue,
|
|
@@ -9253,20 +9253,20 @@ const Qd = { class: "container" }, tu = { class: "main" }, eu = /* @__PURE__ */
|
|
|
9253
9253
|
se,
|
|
9254
9254
|
oe
|
|
9255
9255
|
);
|
|
9256
|
-
const { colourSets: e, patternsStandardList: n } = be(), s = G(null), o = G(!1), a = F(() => t.newPatternsOrder.length !== n.length ? e[t.colourSet] : t.newPatternsOrder.map((
|
|
9256
|
+
const { colourSets: e, patternsStandardList: n } = be(), s = G(null), o = G(!1), a = F(() => t.newPatternsOrder.length !== n.length ? e[t.colourSet] : t.newPatternsOrder.map((C) => e[t.colourSet][C])), r = F(() => t.newPatternsOrder.length !== n.length ? n : t.newPatternsOrder.map((C) => n[C])), l = F(() => t.disableAccessibility), c = F(() => t.enableHoverFeature), {
|
|
9257
9257
|
onHoverIndex: h,
|
|
9258
9258
|
barChartRef: d,
|
|
9259
9259
|
reloadChart: u,
|
|
9260
9260
|
getOnHoverOptions: f,
|
|
9261
9261
|
getStackedDatasets: p,
|
|
9262
9262
|
privateGetHtmlLegendPlugin: g
|
|
9263
|
-
} = Ud(),
|
|
9264
|
-
const
|
|
9263
|
+
} = Ud(), b = F(() => {
|
|
9264
|
+
const C = M(_.value);
|
|
9265
9265
|
return x(), {
|
|
9266
|
-
labels:
|
|
9266
|
+
labels: C,
|
|
9267
9267
|
datasets: p(
|
|
9268
9268
|
t.datasets.map((P, D) => ({
|
|
9269
|
-
data:
|
|
9269
|
+
data: v(D, _.value),
|
|
9270
9270
|
label: t.datasets[D].label,
|
|
9271
9271
|
stack: P.stack || 0
|
|
9272
9272
|
})),
|
|
@@ -9278,29 +9278,29 @@ const Qd = { class: "container" }, tu = { class: "main" }, eu = /* @__PURE__ */
|
|
|
9278
9278
|
)
|
|
9279
9279
|
};
|
|
9280
9280
|
});
|
|
9281
|
-
let
|
|
9281
|
+
let m, y;
|
|
9282
9282
|
const x = () => {
|
|
9283
|
-
|
|
9284
|
-
},
|
|
9285
|
-
const
|
|
9286
|
-
if (
|
|
9287
|
-
const P =
|
|
9283
|
+
m = t.tooltipFirstLineLabel, y = t.tooltipSecondLineLabel;
|
|
9284
|
+
}, _ = F(() => {
|
|
9285
|
+
const C = t.labels;
|
|
9286
|
+
if (C.includes("other")) {
|
|
9287
|
+
const P = C.indexOf("other");
|
|
9288
9288
|
if (t.datasets[0].data[P].rate + "" == "0" && t.datasets[1].data[P].rate + "" == "0")
|
|
9289
9289
|
return P;
|
|
9290
9290
|
}
|
|
9291
9291
|
return null;
|
|
9292
|
-
}),
|
|
9293
|
-
const
|
|
9294
|
-
return P &&
|
|
9292
|
+
}), v = (C, P, D = !1) => {
|
|
9293
|
+
const W = Object.assign([], t.datasets[C].data);
|
|
9294
|
+
return P && _.value && W.splice(_.value, 1), W.map(
|
|
9295
9295
|
(U) => t.unit === "%" ? U.rate : U.amount
|
|
9296
9296
|
);
|
|
9297
|
-
},
|
|
9298
|
-
const P =
|
|
9297
|
+
}, w = (C) => {
|
|
9298
|
+
const P = C.tooltip.dataPoints[0].datasetIndex, D = C.tooltip.dataPoints[0].dataIndex, W = C.tooltip.body[0].lines[0].split(":")[1], U = t.datasets[P].data[D], I = U.rate ? parseFloat(W.replace(",", ".")).toFixed(2) + "% " : "", B = U.amountUnit ? U.amountUnit : "", N = U.amount ? tt(U.amount) : "";
|
|
9299
9299
|
return I + (I && N ? "/ " : "") + N + B;
|
|
9300
|
-
},
|
|
9300
|
+
}, M = (C) => {
|
|
9301
9301
|
const P = Object.assign([], t.labels);
|
|
9302
|
-
return
|
|
9303
|
-
},
|
|
9302
|
+
return C && P.splice(C, 1), P.map((D) => D);
|
|
9303
|
+
}, S = F(() => ({
|
|
9304
9304
|
// eslint-disable-next-line
|
|
9305
9305
|
onHover: t.enableHoverFeature ? f() : () => {
|
|
9306
9306
|
},
|
|
@@ -9309,6 +9309,8 @@ const Qd = { class: "container" }, tu = { class: "main" }, eu = /* @__PURE__ */
|
|
|
9309
9309
|
borderSkipped: !1
|
|
9310
9310
|
}
|
|
9311
9311
|
},
|
|
9312
|
+
maxBarThickness: 64,
|
|
9313
|
+
categoryPercentage: 0.6,
|
|
9312
9314
|
plugins: {
|
|
9313
9315
|
responsive: !0,
|
|
9314
9316
|
maintainAspectRatio: !1,
|
|
@@ -9324,15 +9326,15 @@ const Qd = { class: "container" }, tu = { class: "main" }, eu = /* @__PURE__ */
|
|
|
9324
9326
|
tooltip: {
|
|
9325
9327
|
enabled: !1,
|
|
9326
9328
|
position: "nearest",
|
|
9327
|
-
external: function(
|
|
9329
|
+
external: function(C) {
|
|
9328
9330
|
var D;
|
|
9329
|
-
const P = ((D =
|
|
9331
|
+
const P = ((D = C.tooltip.dataPoints) == null ? void 0 : D[0].dataIndex) || 0;
|
|
9330
9332
|
!t.labels[P] || t.labels[P] === "" || new pe().createTooltip(
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
+
C,
|
|
9334
|
+
w,
|
|
9333
9335
|
{
|
|
9334
9336
|
chartType: me.BAR_CHART,
|
|
9335
|
-
firstLineLabel:
|
|
9337
|
+
firstLineLabel: m,
|
|
9336
9338
|
secondLineLabel: y
|
|
9337
9339
|
},
|
|
9338
9340
|
a.value,
|
|
@@ -9357,8 +9359,8 @@ const Qd = { class: "container" }, tu = { class: "main" }, eu = /* @__PURE__ */
|
|
|
9357
9359
|
text: t.yAxisTitle
|
|
9358
9360
|
},
|
|
9359
9361
|
ticks: {
|
|
9360
|
-
callback: function(
|
|
9361
|
-
return t.unit === "%" ? un(
|
|
9362
|
+
callback: function(C) {
|
|
9363
|
+
return t.unit === "%" ? un(C, t.unit) : tt(C) + " " + t.unit;
|
|
9362
9364
|
}
|
|
9363
9365
|
}
|
|
9364
9366
|
}
|
|
@@ -9379,15 +9381,15 @@ const Qd = { class: "container" }, tu = { class: "main" }, eu = /* @__PURE__ */
|
|
|
9379
9381
|
u();
|
|
9380
9382
|
},
|
|
9381
9383
|
{ deep: !0 }
|
|
9382
|
-
), (
|
|
9384
|
+
), (C, P) => (lt(), re("div", Qd, [
|
|
9383
9385
|
st("div", tu, [
|
|
9384
|
-
|
|
9386
|
+
b.value ? (lt(), le($t(fa), {
|
|
9385
9387
|
key: 0,
|
|
9386
9388
|
ref_key: "barChartRef",
|
|
9387
9389
|
ref: d,
|
|
9388
9390
|
id: i.chartId,
|
|
9389
|
-
data:
|
|
9390
|
-
options:
|
|
9391
|
+
data: b.value,
|
|
9392
|
+
options: S.value,
|
|
9391
9393
|
plugins: A.value,
|
|
9392
9394
|
class: ce(i.cssClasses),
|
|
9393
9395
|
style: Ut([{ width: i.width, height: i.height, cursor: "pointer" }, i.styles])
|
|
@@ -9405,13 +9407,13 @@ const ye = (i, t) => {
|
|
|
9405
9407
|
for (const [n, s] of t)
|
|
9406
9408
|
e[n] = s;
|
|
9407
9409
|
return e;
|
|
9408
|
-
}, fn = /* @__PURE__ */ ye(eu, [["__scopeId", "data-v-
|
|
9410
|
+
}, fn = /* @__PURE__ */ ye(eu, [["__scopeId", "data-v-aaa6e255"]]);
|
|
9409
9411
|
fn.install = (i) => {
|
|
9410
9412
|
i.component("BarChart", fn);
|
|
9411
9413
|
};
|
|
9412
9414
|
function iu() {
|
|
9413
9415
|
const i = G(null), t = G(null), e = G(null);
|
|
9414
|
-
function n(h, d, u, f, p, g,
|
|
9416
|
+
function n(h, d, u, f, p, g, b, m) {
|
|
9415
9417
|
return pa(
|
|
9416
9418
|
h,
|
|
9417
9419
|
d,
|
|
@@ -9419,9 +9421,9 @@ function iu() {
|
|
|
9419
9421
|
u,
|
|
9420
9422
|
f,
|
|
9421
9423
|
p,
|
|
9422
|
-
|
|
9424
|
+
m,
|
|
9423
9425
|
g,
|
|
9424
|
-
|
|
9426
|
+
b
|
|
9425
9427
|
);
|
|
9426
9428
|
}
|
|
9427
9429
|
function s(h, d, u, f) {
|
|
@@ -9445,8 +9447,8 @@ function iu() {
|
|
|
9445
9447
|
function l(h, d, u, f) {
|
|
9446
9448
|
let p = h.slice(0), g = d.slice(0);
|
|
9447
9449
|
return h.length > u && (g = c(d, u), p = p.slice(0, u - 1), p.push(f)), p.map(
|
|
9448
|
-
(
|
|
9449
|
-
g[
|
|
9450
|
+
(b, m) => `${r(b)} (${tt(
|
|
9451
|
+
g[m].rate
|
|
9450
9452
|
)} %)`
|
|
9451
9453
|
);
|
|
9452
9454
|
}
|
|
@@ -9586,7 +9588,7 @@ const nu = { class: "container" }, su = { class: "main" }, ou = /* @__PURE__ */
|
|
|
9586
9588
|
},
|
|
9587
9589
|
setup(i) {
|
|
9588
9590
|
const t = i;
|
|
9589
|
-
|
|
9591
|
+
Ct.register(fe, ge, ue, Qt);
|
|
9590
9592
|
const { colourSets: e, patternsStandardList: n } = be(), {
|
|
9591
9593
|
onHoverIndex: s,
|
|
9592
9594
|
doughnutRef: o,
|
|
@@ -9596,7 +9598,7 @@ const nu = { class: "container" }, su = { class: "main" }, ou = /* @__PURE__ */
|
|
|
9596
9598
|
groupDataAfterNthValue: c,
|
|
9597
9599
|
getDoughnutLabels: h,
|
|
9598
9600
|
getBorderColor: d
|
|
9599
|
-
} = iu(), u = G(!1), f = G(null), p = F(() => t.newPatternsOrder.length !== 6 ? e[t.colourSet] : t.newPatternsOrder.map((
|
|
9601
|
+
} = iu(), u = G(!1), f = G(null), p = F(() => t.newPatternsOrder.length !== 6 ? e[t.colourSet] : t.newPatternsOrder.map((S) => e[t.colourSet][S])), g = F(() => t.newPatternsOrder.length !== 6 ? n : t.newPatternsOrder.map((S) => n[S])), b = F(() => ({
|
|
9600
9602
|
labels: h(
|
|
9601
9603
|
t.labels,
|
|
9602
9604
|
t.data,
|
|
@@ -9608,7 +9610,7 @@ const nu = { class: "container" }, su = { class: "main" }, ou = /* @__PURE__ */
|
|
|
9608
9610
|
data: c(
|
|
9609
9611
|
t.data,
|
|
9610
9612
|
t.maxValues
|
|
9611
|
-
).map((
|
|
9613
|
+
).map((S) => S.rate),
|
|
9612
9614
|
backgroundColor: a(
|
|
9613
9615
|
p.value,
|
|
9614
9616
|
g.value,
|
|
@@ -9618,18 +9620,18 @@ const nu = { class: "container" }, su = { class: "main" }, ou = /* @__PURE__ */
|
|
|
9618
9620
|
borderColor: d(p.value, t.enableHoverFeature)
|
|
9619
9621
|
}
|
|
9620
9622
|
]
|
|
9621
|
-
})),
|
|
9622
|
-
const A =
|
|
9623
|
+
})), m = (S) => {
|
|
9624
|
+
const A = S.tooltip.dataPoints[0].dataIndex, C = c(
|
|
9623
9625
|
t.data,
|
|
9624
9626
|
t.maxValues
|
|
9625
|
-
)[A], P = tt(
|
|
9626
|
-
return `${D}${
|
|
9627
|
+
)[A], P = tt(C.rate), D = tt(C.value), W = C.unit || "";
|
|
9628
|
+
return `${D}${W} (${P})%`;
|
|
9627
9629
|
};
|
|
9628
9630
|
function y() {
|
|
9629
9631
|
return t.labels.length <= 1 ? 0 : 12;
|
|
9630
9632
|
}
|
|
9631
9633
|
const x = F(() => {
|
|
9632
|
-
const
|
|
9634
|
+
const S = p.value, A = g.value;
|
|
9633
9635
|
return {
|
|
9634
9636
|
onHover: t.enableHoverFeature ? l() : () => {
|
|
9635
9637
|
},
|
|
@@ -9652,16 +9654,16 @@ const nu = { class: "container" }, su = { class: "main" }, ou = /* @__PURE__ */
|
|
|
9652
9654
|
},
|
|
9653
9655
|
tooltip: {
|
|
9654
9656
|
enabled: !1,
|
|
9655
|
-
external: function(
|
|
9657
|
+
external: function(C) {
|
|
9656
9658
|
new pe().createTooltip(
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
+
C,
|
|
9660
|
+
m,
|
|
9659
9661
|
{
|
|
9660
9662
|
chartType: me.DOUGHNUT
|
|
9661
9663
|
},
|
|
9662
|
-
|
|
9664
|
+
S,
|
|
9663
9665
|
A,
|
|
9664
|
-
|
|
9666
|
+
v.value
|
|
9665
9667
|
);
|
|
9666
9668
|
}
|
|
9667
9669
|
}
|
|
@@ -9672,19 +9674,19 @@ const nu = { class: "container" }, su = { class: "main" }, ou = /* @__PURE__ */
|
|
|
9672
9674
|
spacing: y(),
|
|
9673
9675
|
hoverOffset: 4
|
|
9674
9676
|
};
|
|
9675
|
-
}),
|
|
9677
|
+
}), _ = {
|
|
9676
9678
|
data: t.data,
|
|
9677
9679
|
labels: t.labels
|
|
9678
|
-
},
|
|
9680
|
+
}, v = F(() => t.disableAccessibility), w = F(() => t.enableHoverFeature), M = F(
|
|
9679
9681
|
() => r(
|
|
9680
9682
|
f,
|
|
9681
9683
|
u,
|
|
9682
|
-
|
|
9684
|
+
v,
|
|
9683
9685
|
p,
|
|
9684
9686
|
g,
|
|
9685
9687
|
t.maxValues,
|
|
9686
|
-
|
|
9687
|
-
|
|
9688
|
+
_,
|
|
9689
|
+
w
|
|
9688
9690
|
)
|
|
9689
9691
|
);
|
|
9690
9692
|
return po(() => {
|
|
@@ -9692,32 +9694,32 @@ const nu = { class: "container" }, su = { class: "main" }, ou = /* @__PURE__ */
|
|
|
9692
9694
|
p.value,
|
|
9693
9695
|
g.value,
|
|
9694
9696
|
t.disableAccessibility,
|
|
9695
|
-
|
|
9697
|
+
w.value
|
|
9696
9698
|
);
|
|
9697
|
-
}), xi(s, (
|
|
9698
|
-
|
|
9699
|
+
}), xi(s, (S, A) => {
|
|
9700
|
+
S !== A && w.value && a(
|
|
9699
9701
|
p.value,
|
|
9700
9702
|
g.value,
|
|
9701
9703
|
t.disableAccessibility,
|
|
9702
|
-
|
|
9704
|
+
w.value
|
|
9703
9705
|
);
|
|
9704
|
-
}), xi(
|
|
9706
|
+
}), xi(v, () => {
|
|
9705
9707
|
a(
|
|
9706
9708
|
p.value,
|
|
9707
9709
|
g.value,
|
|
9708
9710
|
t.disableAccessibility,
|
|
9709
|
-
|
|
9711
|
+
w.value
|
|
9710
9712
|
);
|
|
9711
|
-
}), (
|
|
9713
|
+
}), (S, A) => (lt(), re("div", nu, [
|
|
9712
9714
|
st("div", su, [
|
|
9713
|
-
|
|
9715
|
+
b.value ? (lt(), le($t(Dd), {
|
|
9714
9716
|
key: 0,
|
|
9715
9717
|
ref_key: "doughnutRef",
|
|
9716
9718
|
ref: o,
|
|
9717
9719
|
id: i.chartId,
|
|
9718
|
-
data:
|
|
9720
|
+
data: b.value,
|
|
9719
9721
|
options: x.value,
|
|
9720
|
-
plugins:
|
|
9722
|
+
plugins: M.value,
|
|
9721
9723
|
"max-values": i.maxValues,
|
|
9722
9724
|
class: ce(i.cssClasses),
|
|
9723
9725
|
style: Ut([{ width: i.width, height: i.height, cursor: "pointer" }, i.styles])
|
|
@@ -9828,6 +9830,20 @@ const au = { class: "container" }, ru = { class: "main" }, lu = /* @__PURE__ */
|
|
|
9828
9830
|
type: String,
|
|
9829
9831
|
default: null
|
|
9830
9832
|
},
|
|
9833
|
+
/**
|
|
9834
|
+
* Adjustment used when calculating the minimum data value.
|
|
9835
|
+
*/
|
|
9836
|
+
suggestedMin: {
|
|
9837
|
+
type: Number,
|
|
9838
|
+
default: void 0
|
|
9839
|
+
},
|
|
9840
|
+
/**
|
|
9841
|
+
* Adjustment used when calculating the maximum data value.
|
|
9842
|
+
*/
|
|
9843
|
+
suggestedMax: {
|
|
9844
|
+
type: Number,
|
|
9845
|
+
default: void 0
|
|
9846
|
+
},
|
|
9831
9847
|
/**
|
|
9832
9848
|
* Add custom CSS classes to the <canvas> element
|
|
9833
9849
|
*/
|
|
@@ -9853,7 +9869,7 @@ const au = { class: "container" }, ru = { class: "main" }, lu = /* @__PURE__ */
|
|
|
9853
9869
|
},
|
|
9854
9870
|
setup(i) {
|
|
9855
9871
|
const t = i;
|
|
9856
|
-
|
|
9872
|
+
Ct.register(
|
|
9857
9873
|
fe,
|
|
9858
9874
|
ge,
|
|
9859
9875
|
ue,
|
|
@@ -9865,61 +9881,58 @@ const au = { class: "container" }, ru = { class: "main" }, lu = /* @__PURE__ */
|
|
|
9865
9881
|
const { colourSets: e, patternsStandardList: n } = be(), s = G(null), o = G(!1), a = F(
|
|
9866
9882
|
() => t.newPatternsOrder.length !== 6 ? e[t.colourSet] : t.newPatternsOrder.map((m) => e[t.colourSet][m])
|
|
9867
9883
|
), r = t.newPatternsOrder.length !== 6 ? n : t.newPatternsOrder.map((m) => n[m]), l = (m) => {
|
|
9868
|
-
const
|
|
9869
|
-
return t.lines[
|
|
9870
|
-
}, c = F(() => t.tooltipFirstLineLabel), h = F(() => t.tooltipSecondLineLabel), d =
|
|
9884
|
+
const y = m.tooltip.dataPoints[0].datasetIndex, x = m.tooltip.dataPoints[0].dataIndex, _ = t.lines[y].data[x].toFixed(2);
|
|
9885
|
+
return t.lines[y].unit ? _ + " " + t.lines[y].unit : _;
|
|
9886
|
+
}, c = F(() => t.tooltipFirstLineLabel), h = F(() => t.tooltipSecondLineLabel), d = (m) => {
|
|
9887
|
+
switch (m) {
|
|
9888
|
+
case 1:
|
|
9889
|
+
return "circle";
|
|
9890
|
+
default:
|
|
9891
|
+
return "rectRot";
|
|
9892
|
+
}
|
|
9893
|
+
}, u = F(() => ({
|
|
9871
9894
|
labels: t.labels.map((m) => m),
|
|
9872
|
-
datasets:
|
|
9873
|
-
{
|
|
9874
|
-
type: "line",
|
|
9875
|
-
borderColor: a.value[0],
|
|
9876
|
-
pointStyle: "rectRot",
|
|
9877
|
-
pointBackgroundColor: "#FFFFFF",
|
|
9878
|
-
pointRadius: 5,
|
|
9879
|
-
label: t.lines[0].label,
|
|
9880
|
-
data: t.lines[0].data,
|
|
9881
|
-
borderWidth: 2
|
|
9882
|
-
},
|
|
9883
|
-
{
|
|
9895
|
+
datasets: t.lines.map(
|
|
9896
|
+
(m, y) => ({
|
|
9884
9897
|
type: "line",
|
|
9885
|
-
borderColor: a.value[
|
|
9886
|
-
pointStyle:
|
|
9898
|
+
borderColor: a.value[y],
|
|
9899
|
+
pointStyle: d(y),
|
|
9887
9900
|
pointBackgroundColor: "#FFFFFF",
|
|
9888
9901
|
pointRadius: 5,
|
|
9889
|
-
label:
|
|
9890
|
-
data:
|
|
9902
|
+
label: m.label,
|
|
9903
|
+
data: m.data,
|
|
9891
9904
|
borderWidth: 2
|
|
9892
|
-
}
|
|
9893
|
-
|
|
9905
|
+
})
|
|
9906
|
+
)
|
|
9894
9907
|
}));
|
|
9895
|
-
function
|
|
9908
|
+
function f(m, y) {
|
|
9896
9909
|
return [
|
|
9897
9910
|
{
|
|
9898
9911
|
id: "htmlLegend",
|
|
9899
|
-
afterUpdate(
|
|
9900
|
-
const
|
|
9901
|
-
for (
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
const
|
|
9912
|
+
afterUpdate(x) {
|
|
9913
|
+
const _ = Bi(m, "column");
|
|
9914
|
+
for (_.style.display = "flex", _.style.flexDirection = "row", _.style.margin = "1.375rem 1.0625rem"; _.firstChild; )
|
|
9915
|
+
_.firstChild.remove();
|
|
9916
|
+
x.options.plugins.legend.labels.generateLabels(x).forEach((w) => {
|
|
9917
|
+
const M = Ri(
|
|
9918
|
+
x,
|
|
9905
9919
|
y,
|
|
9906
|
-
|
|
9907
|
-
_.datasetIndex
|
|
9920
|
+
w.datasetIndex
|
|
9908
9921
|
);
|
|
9909
|
-
let
|
|
9910
|
-
|
|
9922
|
+
let S;
|
|
9923
|
+
y.value ? S = p(x, w) : S = zn(w), S.style.boxSizing = "border-box", M.style.marginRight = "10px", M.appendChild(S), M.appendChild(Fi(w)), _.appendChild(M);
|
|
9911
9924
|
});
|
|
9912
9925
|
}
|
|
9913
9926
|
}
|
|
9914
9927
|
];
|
|
9915
9928
|
}
|
|
9916
|
-
function
|
|
9917
|
-
const
|
|
9918
|
-
return
|
|
9919
|
-
Ei(m,
|
|
9920
|
-
},
|
|
9929
|
+
function p(m, y) {
|
|
9930
|
+
const x = En(m, y, null);
|
|
9931
|
+
return x.onclick = (_) => {
|
|
9932
|
+
Ei(m, y.datasetIndex, o), _.stopPropagation();
|
|
9933
|
+
}, x;
|
|
9921
9934
|
}
|
|
9922
|
-
const
|
|
9935
|
+
const g = f(s, o), b = F(() => ({
|
|
9923
9936
|
responsive: !0,
|
|
9924
9937
|
maintainAspectRatio: !1,
|
|
9925
9938
|
plugins: {
|
|
@@ -9962,28 +9975,30 @@ const au = { class: "container" }, ru = { class: "main" }, lu = /* @__PURE__ */
|
|
|
9962
9975
|
display: t.yAxisTitle !== null,
|
|
9963
9976
|
text: t.yAxisTitle
|
|
9964
9977
|
},
|
|
9978
|
+
suggestedMin: t.suggestedMin,
|
|
9979
|
+
suggestedMax: t.suggestedMax,
|
|
9965
9980
|
position: "left",
|
|
9966
9981
|
grid: {
|
|
9967
9982
|
drawOnChartArea: !0
|
|
9968
9983
|
},
|
|
9969
9984
|
ticks: {
|
|
9970
9985
|
callback: function(m) {
|
|
9971
|
-
const
|
|
9972
|
-
return `${tt(m)} ${
|
|
9986
|
+
const y = t.lines[0].unit;
|
|
9987
|
+
return `${tt(m)} ${y || ""}`;
|
|
9973
9988
|
}
|
|
9974
9989
|
}
|
|
9975
9990
|
}
|
|
9976
9991
|
}
|
|
9977
9992
|
}));
|
|
9978
|
-
return (m,
|
|
9993
|
+
return (m, y) => (lt(), re("div", au, [
|
|
9979
9994
|
st("div", ru, [
|
|
9980
|
-
|
|
9995
|
+
u.value ? (lt(), le($t(Ld), {
|
|
9981
9996
|
key: 0,
|
|
9982
9997
|
ref: "lineChartRef",
|
|
9983
9998
|
id: i.chartId,
|
|
9984
|
-
data:
|
|
9985
|
-
options:
|
|
9986
|
-
plugins: $t(
|
|
9999
|
+
data: u.value,
|
|
10000
|
+
options: b.value,
|
|
10001
|
+
plugins: $t(g),
|
|
9987
10002
|
class: ce(i.cssClasses),
|
|
9988
10003
|
style: Ut([{ width: i.width, height: i.height, cursor: "pointer" }, i.styles])
|
|
9989
10004
|
}, null, 8, ["id", "data", "options", "plugins", "class", "style"])) : he("", !0)
|
|
@@ -9995,7 +10010,7 @@ const au = { class: "container" }, ru = { class: "main" }, lu = /* @__PURE__ */
|
|
|
9995
10010
|
]));
|
|
9996
10011
|
}
|
|
9997
10012
|
});
|
|
9998
|
-
const pn = /* @__PURE__ */ ye(lu, [["__scopeId", "data-v-
|
|
10013
|
+
const pn = /* @__PURE__ */ ye(lu, [["__scopeId", "data-v-8e74b12a"]]);
|
|
9999
10014
|
pn.install = (i) => {
|
|
10000
10015
|
i.component("LineChart", pn);
|
|
10001
10016
|
};
|
|
@@ -10010,8 +10025,8 @@ function cu(i, t) {
|
|
|
10010
10025
|
e.font = "12px Arial", o.forEach((u, f) => {
|
|
10011
10026
|
const p = f === o.length - 1 ? hu(t)[a] : "#000000";
|
|
10012
10027
|
e.fillStyle = p;
|
|
10013
|
-
const g = l.x + c,
|
|
10014
|
-
e.fillText(u, g,
|
|
10028
|
+
const g = l.x + c, b = d + 15 * f;
|
|
10029
|
+
e.fillText(u, g, b);
|
|
10015
10030
|
});
|
|
10016
10031
|
}), e.restore());
|
|
10017
10032
|
}
|
|
@@ -10122,7 +10137,7 @@ const uu = { class: "container" }, fu = /* @__PURE__ */ Ft({
|
|
|
10122
10137
|
},
|
|
10123
10138
|
setup(i) {
|
|
10124
10139
|
const t = i;
|
|
10125
|
-
|
|
10140
|
+
Ct.register(
|
|
10126
10141
|
fe,
|
|
10127
10142
|
ge,
|
|
10128
10143
|
ue,
|
|
@@ -10173,8 +10188,8 @@ const uu = { class: "container" }, fu = /* @__PURE__ */ Ft({
|
|
|
10173
10188
|
}
|
|
10174
10189
|
]
|
|
10175
10190
|
})), r = {
|
|
10176
|
-
onClick: (g,
|
|
10177
|
-
|
|
10191
|
+
onClick: (g, b, m) => {
|
|
10192
|
+
b[0] && _a(m, b[0].datasetIndex, c);
|
|
10178
10193
|
},
|
|
10179
10194
|
plugins: {
|
|
10180
10195
|
htmlLegend: {
|
|
@@ -10229,33 +10244,33 @@ const uu = { class: "container" }, fu = /* @__PURE__ */ Ft({
|
|
|
10229
10244
|
}
|
|
10230
10245
|
}
|
|
10231
10246
|
}
|
|
10232
|
-
}, l = G(null), c = G(!1), h = () => t.labels.map((g,
|
|
10233
|
-
const
|
|
10234
|
-
t.datasets[0].areaData[
|
|
10235
|
-
)} ${t.datasets[0].areaData[
|
|
10236
|
-
return du(g,
|
|
10247
|
+
}, l = G(null), c = G(!1), h = () => t.labels.map((g, b) => {
|
|
10248
|
+
const m = t.datasets[0].areaData[b].value ? `${d(
|
|
10249
|
+
t.datasets[0].areaData[b].value + ""
|
|
10250
|
+
)} ${t.datasets[0].areaData[b].unit}` : "No Data";
|
|
10251
|
+
return du(g, m);
|
|
10237
10252
|
}), d = (g) => tt(parseFloat(g));
|
|
10238
|
-
function u(g,
|
|
10239
|
-
const
|
|
10240
|
-
return
|
|
10241
|
-
Ei(g,
|
|
10242
|
-
},
|
|
10253
|
+
function u(g, b) {
|
|
10254
|
+
const m = En(g, b, null);
|
|
10255
|
+
return m.onclick = (y) => {
|
|
10256
|
+
Ei(g, b.datasetIndex, c), y.stopPropagation();
|
|
10257
|
+
}, m;
|
|
10243
10258
|
}
|
|
10244
10259
|
const f = [
|
|
10245
10260
|
{
|
|
10246
10261
|
id: "htmlLegend",
|
|
10247
10262
|
afterUpdate(g) {
|
|
10248
|
-
const
|
|
10249
|
-
for (;
|
|
10250
|
-
|
|
10263
|
+
const b = Bi(l, "row");
|
|
10264
|
+
for (; b.firstChild; )
|
|
10265
|
+
b.firstChild.remove();
|
|
10251
10266
|
g.options.plugins.legend.labels.generateLabels(g).reverse().forEach((y) => {
|
|
10252
10267
|
const x = Ri(
|
|
10253
10268
|
g,
|
|
10254
10269
|
c,
|
|
10255
10270
|
y.datasetIndex
|
|
10256
10271
|
);
|
|
10257
|
-
let
|
|
10258
|
-
x.style.marginRight = "0.625rem", c.value ?
|
|
10272
|
+
let _;
|
|
10273
|
+
x.style.marginRight = "0.625rem", c.value ? _ = u(g, y) : _ = zn(y, !0), x.appendChild(_), x.appendChild(Fi(y)), b.appendChild(x);
|
|
10259
10274
|
});
|
|
10260
10275
|
}
|
|
10261
10276
|
},
|
|
@@ -10266,10 +10281,10 @@ const uu = { class: "container" }, fu = /* @__PURE__ */ Ft({
|
|
|
10266
10281
|
}
|
|
10267
10282
|
}
|
|
10268
10283
|
], p = (g) => {
|
|
10269
|
-
const
|
|
10270
|
-
return y.areaData[
|
|
10284
|
+
const b = g.tooltip.dataPoints[0].datasetIndex, m = g.tooltip.dataPoints[0].dataIndex, y = t.datasets[b];
|
|
10285
|
+
return y.areaData[m].value.toFixed(2) + " " + y.areaData[m].unit;
|
|
10271
10286
|
};
|
|
10272
|
-
return (g,
|
|
10287
|
+
return (g, b) => (lt(), re("div", uu, [
|
|
10273
10288
|
st("div", {
|
|
10274
10289
|
class: "main",
|
|
10275
10290
|
style: Ut({ height: i.height })
|
|
@@ -10308,40 +10323,40 @@ function gu() {
|
|
|
10308
10323
|
dataSetIndex: -1,
|
|
10309
10324
|
columnIndex: -1
|
|
10310
10325
|
});
|
|
10311
|
-
function e(d, u, f, p, g,
|
|
10326
|
+
function e(d, u, f, p, g, b) {
|
|
10312
10327
|
return [
|
|
10313
10328
|
{
|
|
10314
10329
|
id: "htmlLegend",
|
|
10315
|
-
afterUpdate(
|
|
10330
|
+
afterUpdate(m) {
|
|
10316
10331
|
const y = Bi(
|
|
10317
10332
|
d,
|
|
10318
10333
|
"column"
|
|
10319
10334
|
);
|
|
10320
10335
|
for (y.style.display = "flex", y.style.margin = "1.375rem 1.0625rem", y.style.flexDirection = "row-reverse", y.style.justifyContent = "flex-end"; y.firstChild; )
|
|
10321
10336
|
y.firstChild.remove();
|
|
10322
|
-
|
|
10323
|
-
const
|
|
10324
|
-
|
|
10337
|
+
m.options.plugins.legend.labels.generateLabels(m).sort((_, v) => v.datasetIndex - _.datasetIndex).forEach((_) => {
|
|
10338
|
+
const v = Ri(
|
|
10339
|
+
m,
|
|
10325
10340
|
u,
|
|
10326
|
-
|
|
10341
|
+
_.datasetIndex
|
|
10327
10342
|
);
|
|
10328
|
-
let
|
|
10329
|
-
u.value ?
|
|
10330
|
-
|
|
10331
|
-
|
|
10343
|
+
let w;
|
|
10344
|
+
u.value ? w = ba(
|
|
10345
|
+
m,
|
|
10346
|
+
_,
|
|
10332
10347
|
u,
|
|
10333
10348
|
{ datasetIndex: -1 },
|
|
10334
10349
|
g.value,
|
|
10335
10350
|
!1
|
|
10336
|
-
) :
|
|
10337
|
-
|
|
10338
|
-
|
|
10351
|
+
) : _ != null && _.lineCap ? w = zn(_) : w = ma(
|
|
10352
|
+
_,
|
|
10353
|
+
m,
|
|
10339
10354
|
{ datasetIndex: -1 },
|
|
10340
10355
|
p.value,
|
|
10341
10356
|
g.value,
|
|
10342
|
-
|
|
10357
|
+
b.value,
|
|
10343
10358
|
!1
|
|
10344
|
-
),
|
|
10359
|
+
), w.style.boxSizing = "border-box", v.style.marginRight = "10px", v.appendChild(w), v.appendChild(Fi(_)), y.appendChild(v);
|
|
10345
10360
|
});
|
|
10346
10361
|
}
|
|
10347
10362
|
}
|
|
@@ -10358,27 +10373,27 @@ function gu() {
|
|
|
10358
10373
|
);
|
|
10359
10374
|
}
|
|
10360
10375
|
function s(d, u, f, p, g) {
|
|
10361
|
-
const
|
|
10362
|
-
return d.map((
|
|
10363
|
-
const x =
|
|
10376
|
+
const b = i.value;
|
|
10377
|
+
return d.map((m, y) => {
|
|
10378
|
+
const x = m.type === "bar";
|
|
10364
10379
|
return {
|
|
10365
|
-
type:
|
|
10380
|
+
type: m.type,
|
|
10366
10381
|
fill: x ? null : !1,
|
|
10367
10382
|
borderWidth: function() {
|
|
10368
|
-
return u && x ? 1 :
|
|
10383
|
+
return u && x ? 1 : b;
|
|
10369
10384
|
},
|
|
10370
|
-
borderColor: function(
|
|
10385
|
+
borderColor: function(_) {
|
|
10371
10386
|
return u && x ? "#00000000" : x ? o(
|
|
10372
10387
|
y,
|
|
10373
|
-
|
|
10388
|
+
_.index,
|
|
10374
10389
|
f,
|
|
10375
10390
|
g
|
|
10376
10391
|
) : f[y];
|
|
10377
10392
|
},
|
|
10378
|
-
backgroundColor: function(
|
|
10393
|
+
backgroundColor: function(_) {
|
|
10379
10394
|
return a(
|
|
10380
10395
|
y,
|
|
10381
|
-
|
|
10396
|
+
_.index,
|
|
10382
10397
|
u,
|
|
10383
10398
|
f,
|
|
10384
10399
|
p,
|
|
@@ -10387,11 +10402,11 @@ function gu() {
|
|
|
10387
10402
|
},
|
|
10388
10403
|
yAxisID: x ? "A" : "B",
|
|
10389
10404
|
pointStyle: y % 2 === 0 ? "rectRot" : "circle",
|
|
10390
|
-
data:
|
|
10391
|
-
label:
|
|
10405
|
+
data: m.data,
|
|
10406
|
+
label: m.label,
|
|
10392
10407
|
pointBackgroundColor: "#FFFFFF",
|
|
10393
10408
|
pointRadius: 5,
|
|
10394
|
-
order:
|
|
10409
|
+
order: m.type === "line" ? 0 : 1
|
|
10395
10410
|
};
|
|
10396
10411
|
});
|
|
10397
10412
|
}
|
|
@@ -10399,15 +10414,15 @@ function gu() {
|
|
|
10399
10414
|
const g = ro(d, p);
|
|
10400
10415
|
return r(d, u) ? f[g] : ae(f[g], 0.2);
|
|
10401
10416
|
}
|
|
10402
|
-
function a(d, u, f, p, g,
|
|
10403
|
-
const
|
|
10404
|
-
return r(d, u) ? g[
|
|
10417
|
+
function a(d, u, f, p, g, b) {
|
|
10418
|
+
const m = ro(d, b);
|
|
10419
|
+
return r(d, u) ? g[m](
|
|
10405
10420
|
!1,
|
|
10406
|
-
p[
|
|
10421
|
+
p[m],
|
|
10407
10422
|
f
|
|
10408
|
-
) : g[
|
|
10423
|
+
) : g[m](
|
|
10409
10424
|
!0,
|
|
10410
|
-
p[
|
|
10425
|
+
p[m],
|
|
10411
10426
|
f
|
|
10412
10427
|
);
|
|
10413
10428
|
}
|
|
@@ -10591,7 +10606,7 @@ const pu = { class: "container" }, mu = { class: "main" }, bu = /* @__PURE__ */
|
|
|
10591
10606
|
},
|
|
10592
10607
|
setup(i) {
|
|
10593
10608
|
const t = i;
|
|
10594
|
-
|
|
10609
|
+
Ct.register(
|
|
10595
10610
|
fe,
|
|
10596
10611
|
ge,
|
|
10597
10612
|
ue,
|
|
@@ -10602,9 +10617,9 @@ const pu = { class: "container" }, mu = { class: "main" }, bu = /* @__PURE__ */
|
|
|
10602
10617
|
Tt
|
|
10603
10618
|
);
|
|
10604
10619
|
const { privateGetHtmlLegendPlugin: e, getMixedDatasets: n } = gu(), { colourSets: s, patternsStandardList: o } = be(), a = G(null), r = G(!1), l = F(() => {
|
|
10605
|
-
let
|
|
10606
|
-
return t.barDatasets && (
|
|
10607
|
-
}), c = F(() => t.newPatternsOrder.length !== o.length ? s[t.colourSet] : t.newPatternsOrder.map((
|
|
10620
|
+
let m = [];
|
|
10621
|
+
return t.barDatasets && (m = m.concat(t.barDatasets)), t.lineDatasets && (m = m.concat(t.lineDatasets)), m;
|
|
10622
|
+
}), c = F(() => t.newPatternsOrder.length !== o.length ? s[t.colourSet] : t.newPatternsOrder.map((m) => s[t.colourSet][m])), h = F(() => t.newPatternsOrder.length !== o.length ? o : t.newPatternsOrder.map((m) => o[m])), d = F(() => t.disableAccessibility), u = F(() => ({
|
|
10608
10623
|
labels: p(),
|
|
10609
10624
|
datasets: n(
|
|
10610
10625
|
l.value,
|
|
@@ -10613,13 +10628,15 @@ const pu = { class: "container" }, mu = { class: "main" }, bu = /* @__PURE__ */
|
|
|
10613
10628
|
h.value,
|
|
10614
10629
|
0
|
|
10615
10630
|
)
|
|
10616
|
-
})), f = (
|
|
10617
|
-
const y =
|
|
10618
|
-
return (
|
|
10631
|
+
})), f = (m) => {
|
|
10632
|
+
const y = m.tooltip.dataPoints[0].datasetIndex, x = m.tooltip.dataPoints[0].dataIndex, _ = l.value[y].data[x], v = l.value[y].type === "bar" ? t.barUnit : t.lineUnit;
|
|
10633
|
+
return (v === "%" ? parseFloat(_.toString().replace(",", ".")).toFixed(2) : tt(_)) + v;
|
|
10619
10634
|
}, p = () => Object.assign([], t.labels).map((y) => y), g = F(() => ({
|
|
10620
|
-
type: "
|
|
10635
|
+
type: "bar",
|
|
10621
10636
|
responsive: !0,
|
|
10622
10637
|
maintainAspectRatio: !0,
|
|
10638
|
+
maxBarThickness: 64,
|
|
10639
|
+
categoryPercentage: 0.6,
|
|
10623
10640
|
elements: {
|
|
10624
10641
|
bar: {
|
|
10625
10642
|
borderSkipped: !1
|
|
@@ -10637,9 +10654,9 @@ const pu = { class: "container" }, mu = { class: "main" }, bu = /* @__PURE__ */
|
|
|
10637
10654
|
},
|
|
10638
10655
|
tooltip: {
|
|
10639
10656
|
enabled: !1,
|
|
10640
|
-
external: function(
|
|
10657
|
+
external: function(m) {
|
|
10641
10658
|
new pe().createTooltip(
|
|
10642
|
-
|
|
10659
|
+
m,
|
|
10643
10660
|
f,
|
|
10644
10661
|
{
|
|
10645
10662
|
chartType: me.MIXED_BAR_LINE_CHART,
|
|
@@ -10673,8 +10690,8 @@ const pu = { class: "container" }, mu = { class: "main" }, bu = /* @__PURE__ */
|
|
|
10673
10690
|
text: t.yLeftAxisTitle
|
|
10674
10691
|
},
|
|
10675
10692
|
ticks: {
|
|
10676
|
-
callback: function(
|
|
10677
|
-
return t.barUnit === "%" ? un(
|
|
10693
|
+
callback: function(m) {
|
|
10694
|
+
return t.barUnit === "%" ? un(m, t.unit) : tt(m) + " " + t.barUnit;
|
|
10678
10695
|
}
|
|
10679
10696
|
}
|
|
10680
10697
|
},
|
|
@@ -10690,13 +10707,13 @@ const pu = { class: "container" }, mu = { class: "main" }, bu = /* @__PURE__ */
|
|
|
10690
10707
|
text: t.yRightAxisTitle
|
|
10691
10708
|
},
|
|
10692
10709
|
ticks: {
|
|
10693
|
-
callback: function(
|
|
10694
|
-
return (t.lineUnit === "%" ? un(
|
|
10710
|
+
callback: function(m) {
|
|
10711
|
+
return (t.lineUnit === "%" ? un(m, t.unit) : tt(m)) + " " + t.lineUnit;
|
|
10695
10712
|
}
|
|
10696
10713
|
}
|
|
10697
10714
|
}
|
|
10698
10715
|
}
|
|
10699
|
-
})),
|
|
10716
|
+
})), b = G(
|
|
10700
10717
|
e(
|
|
10701
10718
|
a,
|
|
10702
10719
|
r,
|
|
@@ -10705,7 +10722,7 @@ const pu = { class: "container" }, mu = { class: "main" }, bu = /* @__PURE__ */
|
|
|
10705
10722
|
h
|
|
10706
10723
|
)
|
|
10707
10724
|
);
|
|
10708
|
-
return (
|
|
10725
|
+
return (m, y) => (lt(), re("div", pu, [
|
|
10709
10726
|
st("div", mu, [
|
|
10710
10727
|
u.value ? (lt(), le($t(fa), {
|
|
10711
10728
|
key: 0,
|
|
@@ -10713,7 +10730,7 @@ const pu = { class: "container" }, mu = { class: "main" }, bu = /* @__PURE__ */
|
|
|
10713
10730
|
id: i.chartId,
|
|
10714
10731
|
data: u.value,
|
|
10715
10732
|
options: g.value,
|
|
10716
|
-
plugins:
|
|
10733
|
+
plugins: b.value,
|
|
10717
10734
|
class: ce(i.cssClasses),
|
|
10718
10735
|
style: Ut([{ width: i.width, height: i.height, cursor: "pointer" }, i.styles])
|
|
10719
10736
|
}, null, 8, ["id", "data", "options", "plugins", "class", "style"])) : he("", !0)
|
|
@@ -10725,7 +10742,7 @@ const pu = { class: "container" }, mu = { class: "main" }, bu = /* @__PURE__ */
|
|
|
10725
10742
|
]));
|
|
10726
10743
|
}
|
|
10727
10744
|
});
|
|
10728
|
-
const lo = /* @__PURE__ */ ye(bu, [["__scopeId", "data-v-
|
|
10745
|
+
const lo = /* @__PURE__ */ ye(bu, [["__scopeId", "data-v-6a9cb065"]]);
|
|
10729
10746
|
lo.install = (i) => {
|
|
10730
10747
|
i.component("MixedBarLineChart", lo);
|
|
10731
10748
|
};
|
|
@@ -10838,14 +10855,14 @@ function xu(i, t, e, n, s) {
|
|
|
10838
10855
|
vy: n
|
|
10839
10856
|
};
|
|
10840
10857
|
}
|
|
10841
|
-
var _u = 0, Sa = 1, wa = 2, ka = 4,
|
|
10858
|
+
var _u = 0, Sa = 1, wa = 2, ka = 4, Ma = 8;
|
|
10842
10859
|
function ci(i, t, e) {
|
|
10843
10860
|
var n = _u;
|
|
10844
|
-
return i < e.left ? n |= Sa : i > e.right && (n |= wa), t < e.top ? n |=
|
|
10861
|
+
return i < e.left ? n |= Sa : i > e.right && (n |= wa), t < e.top ? n |= Ma : t > e.bottom && (n |= ka), n;
|
|
10845
10862
|
}
|
|
10846
10863
|
function vu(i, t) {
|
|
10847
10864
|
for (var e = i.x0, n = i.y0, s = i.x1, o = i.y1, a = ci(e, n, t), r = ci(s, o, t), l, c, h; !(!(a | r) || a & r); )
|
|
10848
|
-
l = a || r, l &
|
|
10865
|
+
l = a || r, l & Ma ? (c = e + (s - e) * (t.top - n) / (o - n), h = t.top) : l & ka ? (c = e + (s - e) * (t.bottom - n) / (o - n), h = t.bottom) : l & wa ? (h = n + (o - n) * (t.right - e) / (s - e), c = t.right) : l & Sa && (h = n + (o - n) * (t.left - e) / (s - e), c = t.left), l === a ? (e = c, n = h, a = ci(e, n, t)) : (s = c, o = h, r = ci(s, o, t));
|
|
10849
10866
|
return {
|
|
10850
10867
|
x0: e,
|
|
10851
10868
|
x1: s,
|
|
@@ -10932,7 +10949,7 @@ function wu(i, t) {
|
|
|
10932
10949
|
function ku(i) {
|
|
10933
10950
|
return i instanceof Qt ? di.arc : i instanceof Tt ? di.point : i instanceof ee ? di.bar : di.fallback;
|
|
10934
10951
|
}
|
|
10935
|
-
function
|
|
10952
|
+
function Mu(i, t, e, n, s, o) {
|
|
10936
10953
|
var a = Math.PI / 2;
|
|
10937
10954
|
if (o) {
|
|
10938
10955
|
var r = Math.min(o, s / 2, n / 2), l = t + r, c = e + r, h = t + n - r, d = e + s - r;
|
|
@@ -10940,9 +10957,9 @@ function Cu(i, t, e, n, s, o) {
|
|
|
10940
10957
|
} else
|
|
10941
10958
|
i.rect(t, e, n, s);
|
|
10942
10959
|
}
|
|
10943
|
-
function
|
|
10960
|
+
function Cu(i, t, e) {
|
|
10944
10961
|
var n = e.backgroundColor, s = e.borderColor, o = e.borderWidth;
|
|
10945
|
-
!n && (!s || !o) || (i.beginPath(),
|
|
10962
|
+
!n && (!s || !o) || (i.beginPath(), Mu(
|
|
10946
10963
|
i,
|
|
10947
10964
|
kt(t.x) + o / 2,
|
|
10948
10965
|
kt(t.y) + o / 2,
|
|
@@ -10976,11 +10993,11 @@ function Du(i, t, e, n) {
|
|
|
10976
10993
|
y: e.y + e.h * u
|
|
10977
10994
|
});
|
|
10978
10995
|
}
|
|
10979
|
-
var
|
|
10996
|
+
var Ca = function(i, t, e, n) {
|
|
10980
10997
|
var s = this;
|
|
10981
10998
|
s._config = i, s._index = n, s._model = null, s._rects = null, s._ctx = t, s._el = e;
|
|
10982
10999
|
};
|
|
10983
|
-
bt(
|
|
11000
|
+
bt(Ca.prototype, {
|
|
10984
11001
|
/**
|
|
10985
11002
|
* @private
|
|
10986
11003
|
*/
|
|
@@ -11037,7 +11054,7 @@ bt(Ma.prototype, {
|
|
|
11037
11054
|
a.top,
|
|
11038
11055
|
a.right - a.left,
|
|
11039
11056
|
a.bottom - a.top
|
|
11040
|
-
), n.clip()), n.globalAlpha = ze.bound(0, s.opacity, 1), n.translate(kt(t.x), kt(t.y)), n.rotate(s.rotation),
|
|
11057
|
+
), n.clip()), n.globalAlpha = ze.bound(0, s.opacity, 1), n.translate(kt(t.x), kt(t.y)), n.rotate(s.rotation), Cu(n, o.frame, s), Du(n, s.lines, o.text, s), n.restore());
|
|
11041
11058
|
}
|
|
11042
11059
|
});
|
|
11043
11060
|
var Lu = Number.MIN_SAFE_INTEGER || -9007199254740991, Tu = Number.MAX_SAFE_INTEGER || 9007199254740991;
|
|
@@ -11148,7 +11165,7 @@ function Iu(i) {
|
|
|
11148
11165
|
h && d || d ? c._visible = !1 : h && (l._visible = !1);
|
|
11149
11166
|
});
|
|
11150
11167
|
}
|
|
11151
|
-
var
|
|
11168
|
+
var He = {
|
|
11152
11169
|
prepare: function(i) {
|
|
11153
11170
|
var t = [], e, n, s, o, a;
|
|
11154
11171
|
for (e = 0, s = i.length; e < s; ++e)
|
|
@@ -11263,17 +11280,17 @@ function zu(i, t) {
|
|
|
11263
11280
|
var e = i[it], n = e._listeners, s, o;
|
|
11264
11281
|
if (!(!n.enter && !n.leave)) {
|
|
11265
11282
|
if (t.type === "mousemove")
|
|
11266
|
-
o =
|
|
11283
|
+
o = He.lookup(e._labels, t);
|
|
11267
11284
|
else if (t.type !== "mouseout")
|
|
11268
11285
|
return;
|
|
11269
11286
|
s = e._hovered, e._hovered = o, Bu(i, n, s, o, t);
|
|
11270
11287
|
}
|
|
11271
11288
|
}
|
|
11272
|
-
function
|
|
11273
|
-
var e = i[it], n = e._listeners.click, s = n &&
|
|
11289
|
+
function Hu(i, t) {
|
|
11290
|
+
var e = i[it], n = e._listeners.click, s = n && He.lookup(e._labels, t);
|
|
11274
11291
|
s && bn(i, n, s, t);
|
|
11275
11292
|
}
|
|
11276
|
-
var
|
|
11293
|
+
var Wu = {
|
|
11277
11294
|
id: "datalabels",
|
|
11278
11295
|
defaults: Ru,
|
|
11279
11296
|
beforeInit: function(i) {
|
|
@@ -11286,34 +11303,34 @@ var Hu = {
|
|
|
11286
11303
|
t._listened = !1, t._listeners = {}, t._datasets = [], t._labels = [];
|
|
11287
11304
|
},
|
|
11288
11305
|
afterDatasetUpdate: function(i, t, e) {
|
|
11289
|
-
var n = t.index, s = i[it], o = s._datasets[n] = [], a = i.isDatasetVisible(n), r = i.data.datasets[n], l = Eu(r, e), c = t.meta.data || [], h = i.ctx, d, u, f, p, g,
|
|
11306
|
+
var n = t.index, s = i[it], o = s._datasets[n] = [], a = i.isDatasetVisible(n), r = i.data.datasets[n], l = Eu(r, e), c = t.meta.data || [], h = i.ctx, d, u, f, p, g, b, m, y;
|
|
11290
11307
|
for (h.save(), d = 0, f = c.length; d < f; ++d)
|
|
11291
|
-
if (
|
|
11308
|
+
if (m = c[d], m[it] = [], a && m && i.getDataVisibility(d) && !m.skip)
|
|
11292
11309
|
for (u = 0, p = l.labels.length; u < p; ++u)
|
|
11293
|
-
g = l.labels[u],
|
|
11310
|
+
g = l.labels[u], b = g._key, y = new Ca(g, h, m, d), y.$groups = {
|
|
11294
11311
|
_set: n,
|
|
11295
|
-
_key:
|
|
11312
|
+
_key: b || Da
|
|
11296
11313
|
}, y.$context = {
|
|
11297
11314
|
active: !1,
|
|
11298
11315
|
chart: i,
|
|
11299
11316
|
dataIndex: d,
|
|
11300
11317
|
dataset: r,
|
|
11301
11318
|
datasetIndex: n
|
|
11302
|
-
}, y.update(y.$context),
|
|
11319
|
+
}, y.update(y.$context), m[it].push(y), o.push(y);
|
|
11303
11320
|
h.restore(), bt(s._listeners, l.listeners, {
|
|
11304
|
-
merger: function(x,
|
|
11305
|
-
|
|
11321
|
+
merger: function(x, _, v) {
|
|
11322
|
+
_[x] = _[x] || {}, _[x][t.index] = v[x], s._listened = !0;
|
|
11306
11323
|
}
|
|
11307
11324
|
});
|
|
11308
11325
|
},
|
|
11309
11326
|
afterUpdate: function(i) {
|
|
11310
|
-
i[it]._labels =
|
|
11327
|
+
i[it]._labels = He.prepare(i[it]._datasets);
|
|
11311
11328
|
},
|
|
11312
11329
|
// Draw labels on top of all dataset elements
|
|
11313
11330
|
// https://github.com/chartjs/chartjs-plugin-datalabels/issues/29
|
|
11314
11331
|
// https://github.com/chartjs/chartjs-plugin-datalabels/issues/32
|
|
11315
11332
|
afterDatasetsDraw: function(i) {
|
|
11316
|
-
|
|
11333
|
+
He.draw(i, i[it]._labels);
|
|
11317
11334
|
},
|
|
11318
11335
|
beforeEvent: function(i, t) {
|
|
11319
11336
|
if (i[it]._listened) {
|
|
@@ -11324,7 +11341,7 @@ var Hu = {
|
|
|
11324
11341
|
zu(i, e);
|
|
11325
11342
|
break;
|
|
11326
11343
|
case "click":
|
|
11327
|
-
|
|
11344
|
+
Hu(i, e);
|
|
11328
11345
|
break;
|
|
11329
11346
|
}
|
|
11330
11347
|
}
|
|
@@ -11335,7 +11352,7 @@ var Hu = {
|
|
|
11335
11352
|
if (c = s[o], c[1])
|
|
11336
11353
|
for (d = c[0].element[it] || [], r = 0, l = d.length; r < l; ++r)
|
|
11337
11354
|
h = d[r], h.$context.active = c[1] === 1, h.update(h.$context);
|
|
11338
|
-
(t._dirty || s.length) && (
|
|
11355
|
+
(t._dirty || s.length) && (He.update(t._labels), i.render()), delete t._dirty;
|
|
11339
11356
|
}
|
|
11340
11357
|
};
|
|
11341
11358
|
const uo = "background: white; border-bottom: 1px solid #CCCCCC; border-radius: 5px; padding: 10px 20px";
|
|
@@ -11520,14 +11537,14 @@ const Vu = { class: "container" }, ju = { class: "main" }, $u = { class: "chart-
|
|
|
11520
11537
|
},
|
|
11521
11538
|
setup(i) {
|
|
11522
11539
|
const t = i;
|
|
11523
|
-
|
|
11540
|
+
Ct.register(
|
|
11524
11541
|
fe,
|
|
11525
11542
|
ge,
|
|
11526
11543
|
ue,
|
|
11527
11544
|
Tt,
|
|
11528
11545
|
se,
|
|
11529
11546
|
oe,
|
|
11530
|
-
|
|
11547
|
+
Wu
|
|
11531
11548
|
);
|
|
11532
11549
|
const { colourSets: e } = be(), n = function(a) {
|
|
11533
11550
|
const r = [];
|