@mozaic-ds/chart 0.1.0-beta.32 → 0.1.0-beta.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mozaic-chart.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var Ta = Object.defineProperty;
|
|
2
2
|
var Oa = (i, t, e) => t in i ? Ta(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
-
var
|
|
3
|
+
var k = (i, t, e) => (Oa(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
4
|
import { version as Ia, defineComponent as Et, ref as G, shallowRef as po, onMounted as Fa, onBeforeUnmount as Ra, watch as _i, toRaw as Qi, h as mo, isProxy as bo, reactive as yo, computed as R, openBlock as at, createElementBlock as Yt, createElementVNode as st, createBlock as ce, unref as It, normalizeClass as he, normalizeStyle as Xt, createCommentVNode as Gt, toDisplayString as xo } from "vue";
|
|
5
5
|
/*!
|
|
6
6
|
* @kurkle/color v0.3.2
|
|
@@ -1869,15 +1869,15 @@ function Vo(i, t, e) {
|
|
|
1869
1869
|
];
|
|
1870
1870
|
const { property: n, start: s, end: o } = e, a = t.length, { compare: r, between: l, normalize: c } = No(n), { start: h, end: d, loop: u, style: f } = xl(i, t, e), b = [];
|
|
1871
1871
|
let p = !1, m = null, g, y, x;
|
|
1872
|
-
const
|
|
1873
|
-
for (let
|
|
1874
|
-
y = t[
|
|
1872
|
+
const _ = () => l(s, x, g) && r(s, x) !== 0, v = () => r(o, g) === 0 || l(o, x, g), S = () => p || _(), w = () => !p || v();
|
|
1873
|
+
for (let M = h, A = h; M <= d; ++M)
|
|
1874
|
+
y = t[M % a], !y.skip && (g = c(y[n]), g !== x && (p = l(g, s, o), m === null && S() && (m = r(g, s) === 0 ? M : A), m !== null && w() && (b.push(os({
|
|
1875
1875
|
start: m,
|
|
1876
|
-
end:
|
|
1876
|
+
end: M,
|
|
1877
1877
|
loop: u,
|
|
1878
1878
|
count: a,
|
|
1879
1879
|
style: f
|
|
1880
|
-
})), m = null), A =
|
|
1880
|
+
})), m = null), A = M, x = g));
|
|
1881
1881
|
return m !== null && b.push(os({
|
|
1882
1882
|
start: m,
|
|
1883
1883
|
end: d,
|
|
@@ -2744,7 +2744,7 @@ class Mt {
|
|
|
2744
2744
|
]);
|
|
2745
2745
|
}
|
|
2746
2746
|
}
|
|
2747
|
-
|
|
2747
|
+
k(Mt, "defaults", {}), k(Mt, "datasetElementType", null), k(Mt, "dataElementType", null);
|
|
2748
2748
|
function Wl(i, t) {
|
|
2749
2749
|
if (!i._cache.$bar) {
|
|
2750
2750
|
const e = i.getMatchingVisibleMetas(t);
|
|
@@ -2958,8 +2958,8 @@ class gi extends Mt {
|
|
|
2958
2958
|
let g = e.getPixelForValue(m);
|
|
2959
2959
|
if (this.chart.getDataVisibility(t) ? b = e.getPixelForValue(u + f) : b = g, p = b - g, Math.abs(p) < a) {
|
|
2960
2960
|
p = $l(p, e, r) * a, d === r && (g -= p / 2);
|
|
2961
|
-
const y = e.getPixelForDecimal(0), x = e.getPixelForDecimal(1),
|
|
2962
|
-
g = Math.max(Math.min(g,
|
|
2961
|
+
const y = e.getPixelForDecimal(0), x = e.getPixelForDecimal(1), _ = Math.min(y, x), v = Math.max(y, x);
|
|
2962
|
+
g = Math.max(Math.min(g, v), _), b = g + p, n && !h && (l._stacks[e.axis]._visualValues[s] = e.getValueForPixel(b) - e.getValueForPixel(g));
|
|
2963
2963
|
}
|
|
2964
2964
|
if (g === e.getPixelForValue(r)) {
|
|
2965
2965
|
const y = mt(p) * e.getLineWidthForValue(r) / 2;
|
|
@@ -2994,7 +2994,7 @@ class gi extends Mt {
|
|
|
2994
2994
|
this.getParsed(o)[e.axis] !== null && n[o].draw(this._ctx);
|
|
2995
2995
|
}
|
|
2996
2996
|
}
|
|
2997
|
-
|
|
2997
|
+
k(gi, "id", "bar"), k(gi, "defaults", {
|
|
2998
2998
|
datasetElementType: !1,
|
|
2999
2999
|
dataElementType: "bar",
|
|
3000
3000
|
categoryPercentage: 0.8,
|
|
@@ -3012,7 +3012,7 @@ w(gi, "id", "bar"), w(gi, "defaults", {
|
|
|
3012
3012
|
]
|
|
3013
3013
|
}
|
|
3014
3014
|
}
|
|
3015
|
-
}),
|
|
3015
|
+
}), k(gi, "overrides", {
|
|
3016
3016
|
scales: {
|
|
3017
3017
|
_index_: {
|
|
3018
3018
|
type: "category",
|
|
@@ -3088,7 +3088,7 @@ class pi extends Mt {
|
|
|
3088
3088
|
return e !== "active" && (s.radius = 0), s.radius += D(n && n._custom, o), s;
|
|
3089
3089
|
}
|
|
3090
3090
|
}
|
|
3091
|
-
|
|
3091
|
+
k(pi, "id", "bubble"), k(pi, "defaults", {
|
|
3092
3092
|
datasetElementType: !1,
|
|
3093
3093
|
dataElementType: "point",
|
|
3094
3094
|
animations: {
|
|
@@ -3102,7 +3102,7 @@ w(pi, "id", "bubble"), w(pi, "defaults", {
|
|
|
3102
3102
|
]
|
|
3103
3103
|
}
|
|
3104
3104
|
}
|
|
3105
|
-
}),
|
|
3105
|
+
}), k(pi, "overrides", {
|
|
3106
3106
|
scales: {
|
|
3107
3107
|
x: {
|
|
3108
3108
|
type: "linear"
|
|
@@ -3115,7 +3115,7 @@ w(pi, "id", "bubble"), w(pi, "defaults", {
|
|
|
3115
3115
|
function ql(i, t, e) {
|
|
3116
3116
|
let n = 1, s = 1, o = 0, a = 0;
|
|
3117
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,
|
|
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), b = (x, _, v) => je(x, r, l, !0) ? -1 : Math.min(_, _ * e, v, v * e), p = f(0, c, d), m = f(U, h, u), g = b(V, c, d), y = b(V + U, h, u);
|
|
3119
3119
|
n = (p - g) / 2, s = (m - y) / 2, o = -(p + g) / 2, a = -(m + y) / 2;
|
|
3120
3120
|
}
|
|
3121
3121
|
return {
|
|
@@ -3165,8 +3165,8 @@ class Le extends Mt {
|
|
|
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(or(this.options.cutout, r), 1), c = this._getRingWeight(this.index), { circumference: h, rotation: d } = this._getRotationExtents(), { ratioX: u, ratioY: f, offsetX: b, offsetY: p } = ql(d, h, l), m = (n.width - a) / u, g = (n.height - a) / f, y = Math.max(Math.min(m, g) / 2, 0), x = wo(this.options.radius, y),
|
|
3169
|
-
this.offsetX = b * x, this.offsetY = p * 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(or(this.options.cutout, r), 1), c = this._getRingWeight(this.index), { circumference: h, rotation: d } = this._getRotationExtents(), { ratioX: u, ratioY: f, offsetX: b, offsetY: p } = ql(d, h, l), m = (n.width - a) / u, g = (n.height - a) / f, y = Math.max(Math.min(m, g) / 2, 0), x = wo(this.options.radius, y), _ = Math.max(x * l, 0), v = (x - _) / this._getVisibleDatasetWeightTotal();
|
|
3169
|
+
this.offsetX = b * x, this.offsetY = p * 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();
|
|
@@ -3178,7 +3178,7 @@ class Le extends Mt {
|
|
|
3178
3178
|
for (y = 0; y < e; ++y)
|
|
3179
3179
|
g += 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
3184
|
startAngle: g,
|
|
@@ -3187,7 +3187,7 @@ class Le extends Mt {
|
|
|
3187
3187
|
outerRadius: b,
|
|
3188
3188
|
innerRadius: f
|
|
3189
3189
|
};
|
|
3190
|
-
m && (
|
|
3190
|
+
m && (v.options = p || this.resolveDataElementOptions(y, _.active ? "active" : s)), g += x, this.updateElement(_, y, v, s);
|
|
3191
3191
|
}
|
|
3192
3192
|
}
|
|
3193
3193
|
calculateTotal() {
|
|
@@ -3248,7 +3248,7 @@ class Le extends Mt {
|
|
|
3248
3248
|
return this._getRingWeightOffset(this.chart.data.datasets.length) || 1;
|
|
3249
3249
|
}
|
|
3250
3250
|
}
|
|
3251
|
-
|
|
3251
|
+
k(Le, "id", "doughnut"), k(Le, "defaults", {
|
|
3252
3252
|
datasetElementType: !1,
|
|
3253
3253
|
dataElementType: "arc",
|
|
3254
3254
|
animation: {
|
|
@@ -3278,10 +3278,10 @@ w(Le, "id", "doughnut"), w(Le, "defaults", {
|
|
|
3278
3278
|
radius: "100%",
|
|
3279
3279
|
spacing: 0,
|
|
3280
3280
|
indexAxis: "r"
|
|
3281
|
-
}),
|
|
3281
|
+
}), k(Le, "descriptors", {
|
|
3282
3282
|
_scriptable: (t) => t !== "spacing",
|
|
3283
3283
|
_indexable: (t) => t !== "spacing" && !t.startsWith("borderDash") && !t.startsWith("hoverBorderDash")
|
|
3284
|
-
}),
|
|
3284
|
+
}), k(Le, "overrides", {
|
|
3285
3285
|
aspectRatio: 1,
|
|
3286
3286
|
plugins: {
|
|
3287
3287
|
legend: {
|
|
@@ -3329,15 +3329,15 @@ class mi extends Mt {
|
|
|
3329
3329
|
}
|
|
3330
3330
|
updateElements(t, e, n, s) {
|
|
3331
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: b, segment: p } = this.options, m = Ve(b) ? b : Number.POSITIVE_INFINITY, g = this.chart._animationsDisabled || o || s === "none", y = e + n, x = t.length;
|
|
3332
|
-
let
|
|
3333
|
-
for (let
|
|
3334
|
-
const S = t[
|
|
3335
|
-
if (
|
|
3336
|
-
|
|
3332
|
+
let _ = e > 0 && this.getParsed(e - 1);
|
|
3333
|
+
for (let v = 0; v < x; ++v) {
|
|
3334
|
+
const S = t[v], w = g ? S : {};
|
|
3335
|
+
if (v < e || v >= y) {
|
|
3336
|
+
w.skip = !0;
|
|
3337
3337
|
continue;
|
|
3338
3338
|
}
|
|
3339
|
-
const
|
|
3340
|
-
|
|
3339
|
+
const M = this.getParsed(v), A = F(M[f]), L = w[u] = a.getPixelForValue(M[u], v), C = w[f] = o || A ? r.getBasePixel() : r.getPixelForValue(l ? this.applyStack(r, M, l) : M[f], v);
|
|
3340
|
+
w.skip = isNaN(L) || isNaN(C) || A, w.stop = v > 0 && Math.abs(M[u] - _[u]) > m, p && (w.parsed = M, w.raw = c.data[v]), d && (w.options = h || this.resolveDataElementOptions(v, S.active ? "active" : s)), g || this.updateElement(S, v, w, s), _ = M;
|
|
3341
3341
|
}
|
|
3342
3342
|
}
|
|
3343
3343
|
getMaxOverflow() {
|
|
@@ -3352,12 +3352,12 @@ class mi extends Mt {
|
|
|
3352
3352
|
t.dataset.updateControlPoints(this.chart.chartArea, t.iScale.axis), super.draw();
|
|
3353
3353
|
}
|
|
3354
3354
|
}
|
|
3355
|
-
|
|
3355
|
+
k(mi, "id", "line"), k(mi, "defaults", {
|
|
3356
3356
|
datasetElementType: "line",
|
|
3357
3357
|
dataElementType: "point",
|
|
3358
3358
|
showLine: !0,
|
|
3359
3359
|
spanGaps: !1
|
|
3360
|
-
}),
|
|
3360
|
+
}), k(mi, "overrides", {
|
|
3361
3361
|
scales: {
|
|
3362
3362
|
_index_: {
|
|
3363
3363
|
type: "category"
|
|
@@ -3406,7 +3406,7 @@ class bi extends Mt {
|
|
|
3406
3406
|
}
|
|
3407
3407
|
}
|
|
3408
3408
|
}
|
|
3409
|
-
|
|
3409
|
+
k(bi, "id", "radar"), k(bi, "defaults", {
|
|
3410
3410
|
datasetElementType: "line",
|
|
3411
3411
|
dataElementType: "point",
|
|
3412
3412
|
indexAxis: "r",
|
|
@@ -3416,7 +3416,7 @@ w(bi, "id", "radar"), w(bi, "defaults", {
|
|
|
3416
3416
|
fill: "start"
|
|
3417
3417
|
}
|
|
3418
3418
|
}
|
|
3419
|
-
}),
|
|
3419
|
+
}), k(bi, "overrides", {
|
|
3420
3420
|
aspectRatio: 1,
|
|
3421
3421
|
scales: {
|
|
3422
3422
|
r: {
|
|
@@ -3429,7 +3429,7 @@ function Ht() {
|
|
|
3429
3429
|
}
|
|
3430
3430
|
class Fn {
|
|
3431
3431
|
constructor(t) {
|
|
3432
|
-
|
|
3432
|
+
k(this, "options");
|
|
3433
3433
|
this.options = t || {};
|
|
3434
3434
|
}
|
|
3435
3435
|
/**
|
|
@@ -4057,11 +4057,11 @@ function Sc(i) {
|
|
|
4057
4057
|
}
|
|
4058
4058
|
class ht {
|
|
4059
4059
|
constructor() {
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4060
|
+
k(this, "x");
|
|
4061
|
+
k(this, "y");
|
|
4062
|
+
k(this, "active", !1);
|
|
4063
|
+
k(this, "options");
|
|
4064
|
+
k(this, "$animations");
|
|
4065
4065
|
}
|
|
4066
4066
|
tooltipPosition(t) {
|
|
4067
4067
|
const { x: e, y: n } = this.getProps([
|
|
@@ -4086,7 +4086,7 @@ class ht {
|
|
|
4086
4086
|
}), s;
|
|
4087
4087
|
}
|
|
4088
4088
|
}
|
|
4089
|
-
|
|
4089
|
+
k(ht, "defaults", {}), k(ht, "defaultRoutes");
|
|
4090
4090
|
function wc(i, t) {
|
|
4091
4091
|
const e = i.options.ticks, n = kc(i), s = Math.min(e.maxTicksLimit || n, n), o = e.major.enabled ? Cc(t) : [], a = o.length, r = o[0], l = o[a - 1], c = [];
|
|
4092
4092
|
if (a > s)
|
|
@@ -4456,28 +4456,28 @@ class de extends ht {
|
|
|
4456
4456
|
}
|
|
4457
4457
|
_computeLabelSizes(t, e, n) {
|
|
4458
4458
|
const { ctx: s, _longestTextCache: o } = this, a = [], r = [], l = Math.floor(e / Ms(e, n));
|
|
4459
|
-
let c = 0, h = 0, d, u, f, b, p, m, g, y, x,
|
|
4459
|
+
let c = 0, h = 0, d, u, f, b, p, m, g, y, x, _, v;
|
|
4460
4460
|
for (d = 0; d < e; d += l) {
|
|
4461
4461
|
if (b = t[d].label, p = this._resolveTickFontOptions(d), s.font = m = p.string, g = o[m] = o[m] || {
|
|
4462
4462
|
data: {},
|
|
4463
4463
|
gc: []
|
|
4464
|
-
}, y = p.lineHeight, x =
|
|
4465
|
-
x = ki(s, g.data, g.gc, x, b),
|
|
4464
|
+
}, y = p.lineHeight, x = _ = 0, !F(b) && !W(b))
|
|
4465
|
+
x = ki(s, g.data, g.gc, x, b), _ = y;
|
|
4466
4466
|
else if (W(b))
|
|
4467
4467
|
for (u = 0, f = b.length; u < f; ++u)
|
|
4468
|
-
|
|
4469
|
-
a.push(x), r.push(
|
|
4468
|
+
v = b[u], !F(v) && !W(v) && (x = ki(s, g.data, g.gc, x, v), _ += y);
|
|
4469
|
+
a.push(x), r.push(_), c = Math.max(x, c), h = Math.max(_, h);
|
|
4470
4470
|
}
|
|
4471
4471
|
Tc(o, e);
|
|
4472
|
-
const S = a.indexOf(c),
|
|
4472
|
+
const S = a.indexOf(c), w = r.indexOf(h), M = (A) => ({
|
|
4473
4473
|
width: a[A] || 0,
|
|
4474
4474
|
height: r[A] || 0
|
|
4475
4475
|
});
|
|
4476
4476
|
return {
|
|
4477
|
-
first:
|
|
4478
|
-
last:
|
|
4479
|
-
widest:
|
|
4480
|
-
highest:
|
|
4477
|
+
first: M(0),
|
|
4478
|
+
last: M(e - 1),
|
|
4479
|
+
widest: M(S),
|
|
4480
|
+
highest: M(w),
|
|
4481
4481
|
widths: a,
|
|
4482
4482
|
heights: r
|
|
4483
4483
|
};
|
|
@@ -4530,15 +4530,15 @@ class de extends ht {
|
|
|
4530
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 = [], b = r.setContext(this.getContext()), p = b.display ? b.width : 0, m = p / 2, g = function(B) {
|
|
4531
4531
|
return Wt(n, B, p);
|
|
4532
4532
|
};
|
|
4533
|
-
let y, x,
|
|
4533
|
+
let y, x, _, v, S, w, M, A, L, C, P, I;
|
|
4534
4534
|
if (a === "top")
|
|
4535
|
-
y = g(this.bottom),
|
|
4535
|
+
y = g(this.bottom), w = this.bottom - u, A = y - m, C = g(t.top) + m, I = t.bottom;
|
|
4536
4536
|
else if (a === "bottom")
|
|
4537
|
-
y = g(this.top),
|
|
4537
|
+
y = g(this.top), C = t.top, I = g(t.bottom) - m, w = y + m, A = this.top + u;
|
|
4538
4538
|
else if (a === "left")
|
|
4539
|
-
y = g(this.right), S = this.right - u,
|
|
4539
|
+
y = g(this.right), S = this.right - u, M = y - m, L = g(t.left) + m, P = t.right;
|
|
4540
4540
|
else if (a === "right")
|
|
4541
|
-
y = g(this.left), L = t.left, P = g(t.right) - m, S = y + m,
|
|
4541
|
+
y = g(this.left), L = t.left, P = g(t.right) - m, S = y + m, M = this.left + u;
|
|
4542
4542
|
else if (e === "x") {
|
|
4543
4543
|
if (a === "center")
|
|
4544
4544
|
y = g((t.top + t.bottom) / 2 + 0.5);
|
|
@@ -4546,7 +4546,7 @@ class de extends ht {
|
|
|
4546
4546
|
const B = Object.keys(a)[0], j = a[B];
|
|
4547
4547
|
y = g(this.chart.scales[B].getPixelForValue(j));
|
|
4548
4548
|
}
|
|
4549
|
-
|
|
4549
|
+
C = t.top, I = t.bottom, w = y + m, A = w + u;
|
|
4550
4550
|
} else if (e === "y") {
|
|
4551
4551
|
if (a === "center")
|
|
4552
4552
|
y = g((t.left + t.right) / 2);
|
|
@@ -4554,18 +4554,18 @@ class de extends ht {
|
|
|
4554
4554
|
const B = Object.keys(a)[0], j = a[B];
|
|
4555
4555
|
y = g(this.chart.scales[B].getPixelForValue(j));
|
|
4556
4556
|
}
|
|
4557
|
-
S = y - m,
|
|
4557
|
+
S = y - m, M = S - u, L = t.left, P = t.right;
|
|
4558
4558
|
}
|
|
4559
4559
|
const Y = D(s.ticks.maxTicksLimit, d), T = Math.max(1, Math.ceil(d / Y));
|
|
4560
4560
|
for (x = 0; x < d; x += T) {
|
|
4561
4561
|
const B = this.getContext(x), j = o.setContext(B), tt = r.setContext(B), Z = j.lineWidth, Zt = j.color, Ke = tt.dash || [], Jt = tt.dashOffset, xe = j.tickWidth, _e = j.tickColor, ve = j.tickBorderDash || [], Se = j.tickBorderDashOffset;
|
|
4562
|
-
|
|
4562
|
+
_ = Lc(this, x, l), _ !== void 0 && (v = Wt(n, _, Z), c ? S = M = L = P = v : w = A = C = I = v, f.push({
|
|
4563
4563
|
tx1: S,
|
|
4564
|
-
ty1:
|
|
4565
|
-
tx2:
|
|
4564
|
+
ty1: w,
|
|
4565
|
+
tx2: M,
|
|
4566
4566
|
ty2: A,
|
|
4567
4567
|
x1: L,
|
|
4568
|
-
y1:
|
|
4568
|
+
y1: C,
|
|
4569
4569
|
x2: P,
|
|
4570
4570
|
y2: I,
|
|
4571
4571
|
width: Z,
|
|
@@ -4582,17 +4582,17 @@ class de extends ht {
|
|
|
4582
4582
|
}
|
|
4583
4583
|
_computeLabelItems(t) {
|
|
4584
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, b = d ? -h : f, p = -gt(this.labelRotation), m = [];
|
|
4585
|
-
let g, y, x,
|
|
4585
|
+
let g, y, x, _, v, S, w, M, A, L, C, P, I = "middle";
|
|
4586
4586
|
if (s === "top")
|
|
4587
|
-
S = this.bottom - b,
|
|
4587
|
+
S = this.bottom - b, w = this._getXAxisLabelAlignment();
|
|
4588
4588
|
else if (s === "bottom")
|
|
4589
|
-
S = this.top + b,
|
|
4589
|
+
S = this.top + b, w = this._getXAxisLabelAlignment();
|
|
4590
4590
|
else if (s === "left") {
|
|
4591
4591
|
const T = this._getYAxisLabelAlignment(u);
|
|
4592
|
-
|
|
4592
|
+
w = T.textAlign, v = T.x;
|
|
4593
4593
|
} else if (s === "right") {
|
|
4594
4594
|
const T = this._getYAxisLabelAlignment(u);
|
|
4595
|
-
|
|
4595
|
+
w = T.textAlign, v = T.x;
|
|
4596
4596
|
} else if (e === "x") {
|
|
4597
4597
|
if (s === "center")
|
|
4598
4598
|
S = (t.top + t.bottom) / 2 + f;
|
|
@@ -4600,25 +4600,25 @@ class de extends ht {
|
|
|
4600
4600
|
const T = Object.keys(s)[0], B = s[T];
|
|
4601
4601
|
S = this.chart.scales[T].getPixelForValue(B) + f;
|
|
4602
4602
|
}
|
|
4603
|
-
|
|
4603
|
+
w = 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 (O(s)) {
|
|
4608
4608
|
const T = Object.keys(s)[0], B = s[T];
|
|
4609
|
-
|
|
4609
|
+
v = this.chart.scales[T].getPixelForValue(B);
|
|
4610
4610
|
}
|
|
4611
|
-
|
|
4611
|
+
w = this._getYAxisLabelAlignment(u).textAlign;
|
|
4612
4612
|
}
|
|
4613
4613
|
e === "y" && (l === "start" ? I = "top" : l === "end" && (I = "bottom"));
|
|
4614
4614
|
const Y = this._getLabelSizes();
|
|
4615
4615
|
for (g = 0, y = r.length; g < y; ++g) {
|
|
4616
|
-
x = r[g],
|
|
4616
|
+
x = r[g], _ = x.label;
|
|
4617
4617
|
const T = o.setContext(this.getContext(g));
|
|
4618
|
-
|
|
4619
|
-
const B =
|
|
4620
|
-
let Zt =
|
|
4621
|
-
a ? (
|
|
4618
|
+
M = this.getPixelForTick(g) + o.labelOffset, A = this._resolveTickFontOptions(g), L = A.lineHeight, C = W(_) ? _.length : 1;
|
|
4619
|
+
const B = C / 2, j = T.color, tt = T.textStrokeColor, Z = T.textStrokeWidth;
|
|
4620
|
+
let Zt = w;
|
|
4621
|
+
a ? (v = M, w === "inner" && (g === y - 1 ? Zt = this.options.reverse ? "left" : "right" : g === 0 ? Zt = this.options.reverse ? "right" : "left" : Zt = "center"), s === "top" ? c === "near" || p !== 0 ? P = -C * L + L / 2 : c === "center" ? P = -Y.highest.height / 2 - B * L + L : P = -Y.highest.height + L / 2 : c === "near" || p !== 0 ? P = L / 2 : c === "center" ? P = Y.highest.height / 2 - B * L : P = Y.highest.height - C * L, d && (P *= -1), p !== 0 && !T.showLabelBackdrop && (v += L / 2 * Math.sin(p))) : (S = M, P = (1 - C) * L / 2);
|
|
4622
4622
|
let Ke;
|
|
4623
4623
|
if (T.showLabelBackdrop) {
|
|
4624
4624
|
const Jt = K(T.backdropPadding), xe = Y.heights[g], _e = Y.widths[g];
|
|
@@ -4631,7 +4631,7 @@ class de extends ht {
|
|
|
4631
4631
|
ve -= xe;
|
|
4632
4632
|
break;
|
|
4633
4633
|
}
|
|
4634
|
-
switch (
|
|
4634
|
+
switch (w) {
|
|
4635
4635
|
case "center":
|
|
4636
4636
|
Se -= _e / 2;
|
|
4637
4637
|
break;
|
|
@@ -4648,7 +4648,7 @@ class de extends ht {
|
|
|
4648
4648
|
};
|
|
4649
4649
|
}
|
|
4650
4650
|
m.push({
|
|
4651
|
-
label:
|
|
4651
|
+
label: _,
|
|
4652
4652
|
font: A,
|
|
4653
4653
|
textOffset: P,
|
|
4654
4654
|
options: {
|
|
@@ -4659,7 +4659,7 @@ class de extends ht {
|
|
|
4659
4659
|
textAlign: Zt,
|
|
4660
4660
|
textBaseline: I,
|
|
4661
4661
|
translation: [
|
|
4662
|
-
|
|
4662
|
+
v,
|
|
4663
4663
|
S
|
|
4664
4664
|
],
|
|
4665
4665
|
backdrop: Ke
|
|
@@ -5827,7 +5827,7 @@ let Pt = (At = class {
|
|
|
5827
5827
|
const o = this.options.hover;
|
|
5828
5828
|
return this.getElementsAtEventForMode(t, o.mode, o, s);
|
|
5829
5829
|
}
|
|
5830
|
-
},
|
|
5830
|
+
}, k(At, "defaults", $), k(At, "instances", xi), k(At, "overrides", qt), k(At, "registry", ft), k(At, "version", th), k(At, "getChart", Rs), At);
|
|
5831
5831
|
function Es() {
|
|
5832
5832
|
return E(Pt.instances, (i) => i._plugins.invalidate());
|
|
5833
5833
|
}
|
|
@@ -5870,26 +5870,26 @@ function Pi(i, t, e, n, s, o) {
|
|
|
5870
5870
|
const T = h > 0 ? h - n : 0, B = d > 0 ? d - n : 0, j = (T + B) / 2, tt = j !== 0 ? b * j / (j + n) : b;
|
|
5871
5871
|
f = (b - tt) / 2;
|
|
5872
5872
|
}
|
|
5873
|
-
const p = Math.max(1e-3, b * d - e / V) / d, m = (b - p) / 2, g = l + m + f, y = s - m - f, { outerStart: x, outerEnd:
|
|
5873
|
+
const p = Math.max(1e-3, b * d - e / V) / d, m = (b - p) / 2, g = l + m + f, y = s - m - f, { outerStart: x, outerEnd: _, innerStart: v, innerEnd: S } = lh(t, u, d, y - g), w = d - x, M = d - _, A = g + x / w, L = y - _ / M, C = u + v, P = u + S, I = g + v / C, Y = y - S / P;
|
|
5874
5874
|
if (i.beginPath(), o) {
|
|
5875
5875
|
const T = (A + L) / 2;
|
|
5876
|
-
if (i.arc(a, r, d, A, T), i.arc(a, r, d, T, L),
|
|
5877
|
-
const Z = te(
|
|
5878
|
-
i.arc(Z.x, Z.y,
|
|
5876
|
+
if (i.arc(a, r, d, A, T), i.arc(a, r, d, T, L), _ > 0) {
|
|
5877
|
+
const Z = te(M, L, a, r);
|
|
5878
|
+
i.arc(Z.x, Z.y, _, L, y + U);
|
|
5879
5879
|
}
|
|
5880
5880
|
const B = te(P, y, a, r);
|
|
5881
5881
|
if (i.lineTo(B.x, B.y), S > 0) {
|
|
5882
5882
|
const Z = te(P, Y, a, r);
|
|
5883
5883
|
i.arc(Z.x, Z.y, S, y + U, Y + Math.PI);
|
|
5884
5884
|
}
|
|
5885
|
-
const j = (y - S / u + (g +
|
|
5886
|
-
if (i.arc(a, r, u, y - S / u, j, !0), i.arc(a, r, u, j, g +
|
|
5887
|
-
const Z = te(
|
|
5888
|
-
i.arc(Z.x, Z.y,
|
|
5885
|
+
const j = (y - S / u + (g + v / u)) / 2;
|
|
5886
|
+
if (i.arc(a, r, u, y - S / u, j, !0), i.arc(a, r, u, j, g + v / u, !0), v > 0) {
|
|
5887
|
+
const Z = te(C, I, a, r);
|
|
5888
|
+
i.arc(Z.x, Z.y, v, I + Math.PI, g - U);
|
|
5889
5889
|
}
|
|
5890
|
-
const tt = te(
|
|
5890
|
+
const tt = te(w, g, a, r);
|
|
5891
5891
|
if (i.lineTo(tt.x, tt.y), x > 0) {
|
|
5892
|
-
const Z = te(
|
|
5892
|
+
const Z = te(w, A, a, r);
|
|
5893
5893
|
i.arc(Z.x, Z.y, x, g - U, A);
|
|
5894
5894
|
}
|
|
5895
5895
|
} else {
|
|
@@ -5929,13 +5929,13 @@ function hh(i, t, e, n, s) {
|
|
|
5929
5929
|
class ie extends ht {
|
|
5930
5930
|
constructor(e) {
|
|
5931
5931
|
super();
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5932
|
+
k(this, "circumference");
|
|
5933
|
+
k(this, "endAngle");
|
|
5934
|
+
k(this, "fullCircles");
|
|
5935
|
+
k(this, "innerRadius");
|
|
5936
|
+
k(this, "outerRadius");
|
|
5937
|
+
k(this, "pixelMargin");
|
|
5938
|
+
k(this, "startAngle");
|
|
5939
5939
|
this.options = void 0, this.circumference = void 0, this.startAngle = void 0, this.endAngle = void 0, this.innerRadius = void 0, this.outerRadius = void 0, this.pixelMargin = 0, this.fullCircles = 0, e && Object.assign(this, e);
|
|
5940
5940
|
}
|
|
5941
5941
|
inRange(e, n, s) {
|
|
@@ -5982,7 +5982,7 @@ class ie extends ht {
|
|
|
5982
5982
|
e.fillStyle = n.backgroundColor, e.strokeStyle = n.borderColor, ch(e, this, h, a, r), hh(e, this, h, a, r), e.restore();
|
|
5983
5983
|
}
|
|
5984
5984
|
}
|
|
5985
|
-
|
|
5985
|
+
k(ie, "id", "arc"), k(ie, "defaults", {
|
|
5986
5986
|
borderAlign: "center",
|
|
5987
5987
|
borderColor: "#fff",
|
|
5988
5988
|
borderDash: [],
|
|
@@ -5994,9 +5994,9 @@ w(ie, "id", "arc"), w(ie, "defaults", {
|
|
|
5994
5994
|
spacing: 0,
|
|
5995
5995
|
angle: void 0,
|
|
5996
5996
|
circular: !0
|
|
5997
|
-
}),
|
|
5997
|
+
}), k(ie, "defaultRoutes", {
|
|
5998
5998
|
backgroundColor: "backgroundColor"
|
|
5999
|
-
}),
|
|
5999
|
+
}), k(ie, "descriptors", {
|
|
6000
6000
|
_scriptable: !0,
|
|
6001
6001
|
_indexable: (e) => e !== "borderDash"
|
|
6002
6002
|
});
|
|
@@ -6028,14 +6028,14 @@ function fh(i, t, e, n) {
|
|
|
6028
6028
|
function gh(i, t, e, n) {
|
|
6029
6029
|
const s = t.points, { count: o, start: a, ilen: r } = na(s, e, n), { move: l = !0, reverse: c } = n || {};
|
|
6030
6030
|
let h = 0, d = 0, u, f, b, p, m, g;
|
|
6031
|
-
const y = (
|
|
6031
|
+
const y = (_) => (a + (c ? r - _ : _)) % o, x = () => {
|
|
6032
6032
|
p !== m && (i.lineTo(h, m), i.lineTo(h, p), i.lineTo(h, g));
|
|
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
|
-
S === b ? (
|
|
6037
|
+
const _ = f.x, v = f.y, S = _ | 0;
|
|
6038
|
+
S === b ? (v < p ? p = v : v > m && (m = v), h = (d * h + _) / ++d) : (x(), i.lineTo(_, v), b = S, d = 0, p = m = v), g = v;
|
|
6039
6039
|
}
|
|
6040
6040
|
x();
|
|
6041
6041
|
}
|
|
@@ -6130,7 +6130,7 @@ class pt extends ht {
|
|
|
6130
6130
|
(this.points || []).length && o.borderWidth && (t.save(), xh(t, this, n, s), t.restore()), this.animated && (this._pointsUpdated = !1, this._path = void 0);
|
|
6131
6131
|
}
|
|
6132
6132
|
}
|
|
6133
|
-
|
|
6133
|
+
k(pt, "id", "line"), k(pt, "defaults", {
|
|
6134
6134
|
borderCapStyle: "butt",
|
|
6135
6135
|
borderDash: [],
|
|
6136
6136
|
borderDashOffset: 0,
|
|
@@ -6142,10 +6142,10 @@ w(pt, "id", "line"), w(pt, "defaults", {
|
|
|
6142
6142
|
spanGaps: !1,
|
|
6143
6143
|
stepped: !1,
|
|
6144
6144
|
tension: 0
|
|
6145
|
-
}),
|
|
6145
|
+
}), k(pt, "defaultRoutes", {
|
|
6146
6146
|
backgroundColor: "backgroundColor",
|
|
6147
6147
|
borderColor: "borderColor"
|
|
6148
|
-
}),
|
|
6148
|
+
}), k(pt, "descriptors", {
|
|
6149
6149
|
_scriptable: !0,
|
|
6150
6150
|
_indexable: (t) => t !== "borderDash" && t !== "fill"
|
|
6151
6151
|
});
|
|
@@ -6158,9 +6158,9 @@ function Bs(i, t, e, n) {
|
|
|
6158
6158
|
class Ot extends ht {
|
|
6159
6159
|
constructor(e) {
|
|
6160
6160
|
super();
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6161
|
+
k(this, "parsed");
|
|
6162
|
+
k(this, "skip");
|
|
6163
|
+
k(this, "stop");
|
|
6164
6164
|
this.options = void 0, this.parsed = void 0, this.skip = void 0, this.stop = void 0, e && Object.assign(this, e);
|
|
6165
6165
|
}
|
|
6166
6166
|
inRange(e, n, s) {
|
|
@@ -6202,10 +6202,10 @@ class Ot extends ht {
|
|
|
6202
6202
|
return e.radius + e.hitRadius;
|
|
6203
6203
|
}
|
|
6204
6204
|
}
|
|
6205
|
-
|
|
6205
|
+
k(Ot, "id", "point"), /**
|
|
6206
6206
|
* @type {any}
|
|
6207
6207
|
*/
|
|
6208
|
-
|
|
6208
|
+
k(Ot, "defaults", {
|
|
6209
6209
|
borderWidth: 1,
|
|
6210
6210
|
hitRadius: 1,
|
|
6211
6211
|
hoverBorderWidth: 1,
|
|
@@ -6216,7 +6216,7 @@ w(Ot, "defaults", {
|
|
|
6216
6216
|
}), /**
|
|
6217
6217
|
* @type {any}
|
|
6218
6218
|
*/
|
|
6219
|
-
|
|
6219
|
+
k(Ot, "defaultRoutes", {
|
|
6220
6220
|
backgroundColor: "backgroundColor",
|
|
6221
6221
|
borderColor: "borderColor"
|
|
6222
6222
|
});
|
|
@@ -6336,13 +6336,13 @@ class se extends ht {
|
|
|
6336
6336
|
return t === "x" ? this.width / 2 : this.height / 2;
|
|
6337
6337
|
}
|
|
6338
6338
|
}
|
|
6339
|
-
|
|
6339
|
+
k(se, "id", "bar"), k(se, "defaults", {
|
|
6340
6340
|
borderSkipped: "start",
|
|
6341
6341
|
borderWidth: 0,
|
|
6342
6342
|
borderRadius: 0,
|
|
6343
6343
|
inflateAmount: "auto",
|
|
6344
6344
|
pointStyle: void 0
|
|
6345
|
-
}),
|
|
6345
|
+
}), k(se, "defaultRoutes", {
|
|
6346
6346
|
backgroundColor: "backgroundColor",
|
|
6347
6347
|
borderColor: "borderColor"
|
|
6348
6348
|
});
|
|
@@ -6812,59 +6812,59 @@ class $s extends ht {
|
|
|
6812
6812
|
const { options: t, columnSizes: e, lineWidths: n, ctx: s } = this, { align: o, labels: a } = t, r = $.color, l = ne(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: b, boxHeight: p, itemHeight: m } = js(a, d), g = function(S,
|
|
6815
|
+
const { boxWidth: b, boxHeight: p, itemHeight: m } = js(a, d), g = function(S, w, M) {
|
|
6816
6816
|
if (isNaN(b) || b <= 0 || isNaN(p) || p < 0)
|
|
6817
6817
|
return;
|
|
6818
6818
|
s.save();
|
|
6819
|
-
const A = D(
|
|
6820
|
-
if (s.fillStyle = D(
|
|
6819
|
+
const A = D(M.lineWidth, 1);
|
|
6820
|
+
if (s.fillStyle = D(M.fillStyle, r), s.lineCap = D(M.lineCap, "butt"), s.lineDashOffset = D(M.lineDashOffset, 0), s.lineJoin = D(M.lineJoin, "miter"), s.lineWidth = A, s.strokeStyle = D(M.strokeStyle, r), s.setLineDash(D(M.lineDash, [])), a.usePointStyle) {
|
|
6821
6821
|
const L = {
|
|
6822
6822
|
radius: p * Math.SQRT2 / 2,
|
|
6823
|
-
pointStyle:
|
|
6824
|
-
rotation:
|
|
6823
|
+
pointStyle: M.pointStyle,
|
|
6824
|
+
rotation: M.rotation,
|
|
6825
6825
|
borderWidth: A
|
|
6826
|
-
},
|
|
6827
|
-
To(s, L,
|
|
6826
|
+
}, C = l.xPlus(S, b / 2), P = w + u;
|
|
6827
|
+
To(s, L, C, P, a.pointStyleWidth && b);
|
|
6828
6828
|
} else {
|
|
6829
|
-
const L =
|
|
6829
|
+
const L = w + Math.max((d - p) / 2, 0), C = l.leftForLtr(S, b), P = $t(M.borderRadius);
|
|
6830
6830
|
s.beginPath(), Object.values(P).some((I) => I !== 0) ? $e(s, {
|
|
6831
|
-
x:
|
|
6831
|
+
x: C,
|
|
6832
6832
|
y: L,
|
|
6833
6833
|
w: b,
|
|
6834
6834
|
h: p,
|
|
6835
6835
|
radius: P
|
|
6836
|
-
}) : s.rect(
|
|
6836
|
+
}) : s.rect(C, L, b, p), s.fill(), A !== 0 && s.stroke();
|
|
6837
6837
|
}
|
|
6838
6838
|
s.restore();
|
|
6839
|
-
}, y = function(S,
|
|
6840
|
-
Kt(s,
|
|
6841
|
-
strikethrough:
|
|
6842
|
-
textAlign: l.textAlign(
|
|
6839
|
+
}, y = function(S, w, M) {
|
|
6840
|
+
Kt(s, M.text, S, w + m / 2, c, {
|
|
6841
|
+
strikethrough: M.hidden,
|
|
6842
|
+
textAlign: l.textAlign(M.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
|
}, Wo(this.ctx, t.textDirection);
|
|
6854
|
-
const
|
|
6855
|
-
this.legendItems.forEach((S,
|
|
6854
|
+
const v = m + h;
|
|
6855
|
+
this.legendItems.forEach((S, w) => {
|
|
6856
6856
|
s.strokeStyle = S.fontColor, s.fillStyle = S.fontColor;
|
|
6857
|
-
const
|
|
6858
|
-
let
|
|
6859
|
-
l.setWidth(this.width), x ?
|
|
6860
|
-
const I = l.x(
|
|
6861
|
-
if (g(I, P, S),
|
|
6857
|
+
const M = s.measureText(S.text).width, A = l.textAlign(S.textAlign || (S.textAlign = a.textAlign)), L = b + u + M;
|
|
6858
|
+
let C = f.x, P = f.y;
|
|
6859
|
+
l.setWidth(this.width), x ? w > 0 && C + L + h > this.right && (P = f.y += v, f.line++, C = f.x = J(o, this.left + h, this.right - n[f.line])) : w > 0 && P + v > this.bottom && (C = f.x = C + e[f.line].width + h, f.line++, P = f.y = J(o, this.top + _ + h, this.bottom - e[f.line].height));
|
|
6860
|
+
const I = l.x(C);
|
|
6861
|
+
if (g(I, P, S), C = Sr(A, C + b + u, x ? C + L : this.right, t.rtl), y(l.x(C), P, S), x)
|
|
6862
6862
|
f.x += L + h;
|
|
6863
6863
|
else if (typeof S.text != "string") {
|
|
6864
6864
|
const Y = c.lineHeight;
|
|
6865
6865
|
f.y += ra(S, Y) + h;
|
|
6866
6866
|
} else
|
|
6867
|
-
f.y +=
|
|
6867
|
+
f.y += v;
|
|
6868
6868
|
}), Ho(this.ctx, t.textDirection);
|
|
6869
6869
|
}
|
|
6870
6870
|
drawTitle() {
|
|
@@ -7177,18 +7177,18 @@ function Zh(i, t) {
|
|
|
7177
7177
|
}
|
|
7178
7178
|
function Us(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, b = K(t.padding);
|
|
7180
|
-
let p = b.height, m = 0, g = n.reduce((
|
|
7180
|
+
let p = b.height, m = 0, g = n.reduce((_, v) => _ + v.before.length + v.lines.length + v.after.length, 0);
|
|
7181
7181
|
if (g += i.beforeBody.length + i.afterBody.length, d && (p += d * c.lineHeight + (d - 1) * t.titleSpacing + t.titleMarginBottom), g) {
|
|
7182
|
-
const
|
|
7183
|
-
p += f *
|
|
7182
|
+
const _ = t.displayColors ? Math.max(r, l.lineHeight) : l.lineHeight;
|
|
7183
|
+
p += f * _ + (g - f) * l.lineHeight + (g - 1) * t.bodySpacing;
|
|
7184
7184
|
}
|
|
7185
7185
|
u && (p += t.footerMarginTop + u * h.lineHeight + (u - 1) * t.footerSpacing);
|
|
7186
7186
|
let y = 0;
|
|
7187
|
-
const x = function(
|
|
7188
|
-
m = Math.max(m, e.measureText(
|
|
7187
|
+
const x = function(_) {
|
|
7188
|
+
m = Math.max(m, e.measureText(_).width + y);
|
|
7189
7189
|
};
|
|
7190
|
-
return e.save(), e.font = c.string, E(i.title, x), e.font = l.string, E(i.beforeBody.concat(i.afterBody), x), y = t.displayColors ? a + 2 + t.boxPadding : 0, E(n, (
|
|
7191
|
-
E(
|
|
7190
|
+
return e.save(), e.font = c.string, E(i.title, x), e.font = l.string, E(i.beforeBody.concat(i.afterBody), x), y = t.displayColors ? a + 2 + t.boxPadding : 0, E(n, (_) => {
|
|
7191
|
+
E(_.before, x), E(_.lines, x), E(_.after, x);
|
|
7192
7192
|
}), y = 0, e.font = h.string, E(i.footer, x), e.restore(), m += b.width, {
|
|
7193
7193
|
width: m,
|
|
7194
7194
|
height: p
|
|
@@ -7393,14 +7393,14 @@ class hn 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 } = $t(r), { x: u, y: f } = t, { width: b, height: p } = e;
|
|
7396
|
-
let m, g, y, x,
|
|
7397
|
-
return o === "center" ? (
|
|
7396
|
+
let m, g, y, x, _, v;
|
|
7397
|
+
return o === "center" ? (_ = f + p / 2, s === "left" ? (m = u, g = m - a, x = _ + a, v = _ - a) : (m = u + b, g = m + a, x = _ - a, v = _ + a), y = m) : (s === "left" ? g = u + Math.max(l, h) + a : s === "right" ? g = u + b - Math.max(c, d) - a : g = this.caretX, o === "top" ? (x = f, _ = x - a, m = g - a, y = g + a) : (x = f + p, _ = x + a, m = g + a, y = g - a), v = x), {
|
|
7398
7398
|
x1: m,
|
|
7399
7399
|
x2: g,
|
|
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) {
|
|
@@ -7444,13 +7444,13 @@ class hn extends ht {
|
|
|
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 b = ne(n.rtl, this.x, this.width), p = function(
|
|
7448
|
-
e.fillText(
|
|
7447
|
+
const b = ne(n.rtl, this.x, this.width), p = function(M) {
|
|
7448
|
+
e.fillText(M, b.x(t.x + f), t.y + u / 2), t.y += u + o;
|
|
7449
7449
|
}, m = b.textAlign(a);
|
|
7450
|
-
let g, y, x,
|
|
7451
|
-
for (e.textAlign = a, e.textBaseline = "middle", e.font = d.string, t.x = li(this, m, n), e.fillStyle = n.bodyColor, E(this.beforeBody, p), f = r && m !== "right" ? a === "center" ? c / 2 + h : c + 2 + h : 0,
|
|
7452
|
-
for (g = s[
|
|
7453
|
-
p(x[
|
|
7450
|
+
let g, y, x, _, v, S, w;
|
|
7451
|
+
for (e.textAlign = a, e.textBaseline = "middle", e.font = d.string, t.x = li(this, m, n), e.fillStyle = n.bodyColor, E(this.beforeBody, p), f = r && m !== "right" ? a === "center" ? c / 2 + h : c + 2 + h : 0, _ = 0, S = s.length; _ < S; ++_) {
|
|
7452
|
+
for (g = s[_], y = this.labelTextColors[_], e.fillStyle = y, E(g.before, p), x = g.lines, r && x.length && (this._drawColorBox(e, t, _, b, n), u = Math.max(d.lineHeight, l)), v = 0, w = x.length; v < w; ++v)
|
|
7453
|
+
p(x[v]), u = d.lineHeight;
|
|
7454
7454
|
E(g.after, p);
|
|
7455
7455
|
}
|
|
7456
7456
|
f = 0, u = d.lineHeight, E(this.afterBody, p), t.y -= o;
|
|
@@ -7538,7 +7538,7 @@ class hn extends ht {
|
|
|
7538
7538
|
return a !== !1 && (n !== a.x || s !== a.y);
|
|
7539
7539
|
}
|
|
7540
7540
|
}
|
|
7541
|
-
|
|
7541
|
+
k(hn, "positioners", Oe);
|
|
7542
7542
|
var ge = {
|
|
7543
7543
|
id: "tooltip",
|
|
7544
7544
|
_element: hn,
|
|
@@ -7726,15 +7726,15 @@ class re extends de {
|
|
|
7726
7726
|
return this.bottom;
|
|
7727
7727
|
}
|
|
7728
7728
|
}
|
|
7729
|
-
|
|
7729
|
+
k(re, "id", "category"), k(re, "defaults", {
|
|
7730
7730
|
ticks: {
|
|
7731
7731
|
callback: Ks
|
|
7732
7732
|
}
|
|
7733
7733
|
});
|
|
7734
7734
|
function rd(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, b = h - 1, { min: p, max: m } = t, g = !F(a), y = !F(r), x = !F(c),
|
|
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, b = h - 1, { min: p, max: m } = t, g = !F(a), y = !F(r), x = !F(c), _ = (m - p) / (d + 1);
|
|
7736
|
+
let v = Xn((m - p) / b / f) * f, S, w, M, A;
|
|
7737
|
+
if (v < 1e-14 && !g && !y)
|
|
7738
7738
|
return [
|
|
7739
7739
|
{
|
|
7740
7740
|
value: p
|
|
@@ -7743,24 +7743,24 @@ function rd(i, t) {
|
|
|
7743
7743
|
value: m
|
|
7744
7744
|
}
|
|
7745
7745
|
];
|
|
7746
|
-
A = Math.ceil(m /
|
|
7747
|
-
const L = Math.max(Gn(
|
|
7748
|
-
S = Math.pow(10, F(l) ? L : l),
|
|
7749
|
-
let
|
|
7750
|
-
for (g && (u &&
|
|
7746
|
+
A = Math.ceil(m / v) - Math.floor(p / v), A > b && (v = Xn(A * v / b / f) * f), F(l) || (S = Math.pow(10, l), v = Math.ceil(v * S) / S), s === "ticks" ? (w = Math.floor(p / v) * v, M = Math.ceil(m / v) * v) : (w = p, M = m), g && y && o && gr((r - a) / o, v / 1e3) ? (A = Math.round(Math.min((r - a) / v, h)), v = (r - a) / A, w = a, M = r) : x ? (w = g ? a : w, M = y ? r : M, A = c - 1, v = (M - w) / A) : (A = (M - w) / v, Re(A, Math.round(A), v / 1e3) ? A = Math.round(A) : A = Math.ceil(A));
|
|
7747
|
+
const L = Math.max(Gn(v), Gn(w));
|
|
7748
|
+
S = Math.pow(10, F(l) ? L : l), w = Math.round(w * S) / S, M = Math.round(M * S) / S;
|
|
7749
|
+
let C = 0;
|
|
7750
|
+
for (g && (u && w !== a ? (e.push({
|
|
7751
7751
|
value: a
|
|
7752
|
-
}),
|
|
7753
|
-
const P = Math.round((
|
|
7752
|
+
}), w < a && C++, Re(Math.round((w + C * v) * S) / S, a, Zs(a, _, i)) && C++) : w < a && C++); C < A; ++C) {
|
|
7753
|
+
const P = Math.round((w + C * v) * S) / S;
|
|
7754
7754
|
if (y && P > r)
|
|
7755
7755
|
break;
|
|
7756
7756
|
e.push({
|
|
7757
7757
|
value: P
|
|
7758
7758
|
});
|
|
7759
7759
|
}
|
|
7760
|
-
return y && u &&
|
|
7760
|
+
return y && u && M !== r ? e.length && Re(e[e.length - 1].value, r, Zs(r, _, i)) ? e[e.length - 1].value = r : e.push({
|
|
7761
7761
|
value: r
|
|
7762
|
-
}) : (!y ||
|
|
7763
|
-
value:
|
|
7762
|
+
}) : (!y || M === r) && e.push({
|
|
7763
|
+
value: M
|
|
7764
7764
|
}), e;
|
|
7765
7765
|
}
|
|
7766
7766
|
function Zs(i, t, { horizontal: e, minRotation: n }) {
|
|
@@ -7844,7 +7844,7 @@ class le extends dn {
|
|
|
7844
7844
|
return this._startValue + this.getDecimalForPixel(t) * this._valueRange;
|
|
7845
7845
|
}
|
|
7846
7846
|
}
|
|
7847
|
-
|
|
7847
|
+
k(le, "id", "linear"), k(le, "defaults", {
|
|
7848
7848
|
ticks: {
|
|
7849
7849
|
callback: An.formatters.numeric
|
|
7850
7850
|
}
|
|
@@ -8133,7 +8133,7 @@ class Ie extends dn {
|
|
|
8133
8133
|
drawTitle() {
|
|
8134
8134
|
}
|
|
8135
8135
|
}
|
|
8136
|
-
|
|
8136
|
+
k(Ie, "id", "radialLinear"), k(Ie, "defaults", {
|
|
8137
8137
|
display: !0,
|
|
8138
8138
|
animate: !0,
|
|
8139
8139
|
position: "chartArea",
|
|
@@ -8164,11 +8164,11 @@ w(Ie, "id", "radialLinear"), w(Ie, "defaults", {
|
|
|
8164
8164
|
padding: 5,
|
|
8165
8165
|
centerPointLabels: !1
|
|
8166
8166
|
}
|
|
8167
|
-
}),
|
|
8167
|
+
}), k(Ie, "defaultRoutes", {
|
|
8168
8168
|
"angleLines.color": "borderColor",
|
|
8169
8169
|
"pointLabels.color": "color",
|
|
8170
8170
|
"ticks.color": "color"
|
|
8171
|
-
}),
|
|
8171
|
+
}), k(Ie, "descriptors", {
|
|
8172
8172
|
angleLines: {
|
|
8173
8173
|
_fallback: "grid"
|
|
8174
8174
|
}
|
|
@@ -8420,7 +8420,7 @@ class Ai extends de {
|
|
|
8420
8420
|
return Po(t.sort(Qs));
|
|
8421
8421
|
}
|
|
8422
8422
|
}
|
|
8423
|
-
|
|
8423
|
+
k(Ai, "id", "time"), k(Ai, "defaults", {
|
|
8424
8424
|
bounds: "data",
|
|
8425
8425
|
adapters: {},
|
|
8426
8426
|
time: {
|
|
@@ -8496,7 +8496,7 @@ class so extends Ai {
|
|
|
8496
8496
|
return ci(this._table, n * this._tableRange + this._minPos, !0);
|
|
8497
8497
|
}
|
|
8498
8498
|
}
|
|
8499
|
-
|
|
8499
|
+
k(so, "id", "timeseries"), k(so, "defaults", Ai.defaults);
|
|
8500
8500
|
const da = {
|
|
8501
8501
|
data: {
|
|
8502
8502
|
type: Object,
|
|
@@ -8854,7 +8854,7 @@ function Yd() {
|
|
|
8854
8854
|
dataSetIndex: -1,
|
|
8855
8855
|
columnIndex: -1
|
|
8856
8856
|
});
|
|
8857
|
-
function n(p, m, g, y, x,
|
|
8857
|
+
function n(p, m, g, y, x, _) {
|
|
8858
8858
|
return ma(
|
|
8859
8859
|
p,
|
|
8860
8860
|
m,
|
|
@@ -8862,39 +8862,39 @@ function Yd() {
|
|
|
8862
8862
|
g,
|
|
8863
8863
|
y,
|
|
8864
8864
|
x,
|
|
8865
|
-
|
|
8865
|
+
_
|
|
8866
8866
|
);
|
|
8867
8867
|
}
|
|
8868
8868
|
function s() {
|
|
8869
8869
|
i.value = 4, i.value = 3;
|
|
8870
8870
|
}
|
|
8871
|
-
function o(p, m, g, y, x,
|
|
8872
|
-
const
|
|
8873
|
-
return p.map((S,
|
|
8874
|
-
borderColor: function(
|
|
8871
|
+
function o(p, m, g, y, x, _) {
|
|
8872
|
+
const v = i.value;
|
|
8873
|
+
return p.map((S, w) => ({
|
|
8874
|
+
borderColor: function(M) {
|
|
8875
8875
|
return g ? "#00000000" : r(
|
|
8876
|
-
|
|
8877
|
-
|
|
8876
|
+
w,
|
|
8877
|
+
M.index,
|
|
8878
8878
|
y,
|
|
8879
|
-
|
|
8879
|
+
_
|
|
8880
8880
|
);
|
|
8881
8881
|
},
|
|
8882
|
-
backgroundColor: function(
|
|
8882
|
+
backgroundColor: function(M) {
|
|
8883
8883
|
return l(
|
|
8884
|
-
|
|
8885
|
-
|
|
8884
|
+
w,
|
|
8885
|
+
M.index,
|
|
8886
8886
|
g,
|
|
8887
8887
|
y,
|
|
8888
8888
|
x,
|
|
8889
|
-
|
|
8889
|
+
_
|
|
8890
8890
|
);
|
|
8891
8891
|
},
|
|
8892
8892
|
borderWidth: function() {
|
|
8893
|
-
return g ? 1 :
|
|
8893
|
+
return g ? 1 : v;
|
|
8894
8894
|
},
|
|
8895
8895
|
data: S.data,
|
|
8896
8896
|
label: S.label,
|
|
8897
|
-
stack: `Stack ${m ? S.stack :
|
|
8897
|
+
stack: `Stack ${m ? S.stack : w}`
|
|
8898
8898
|
}));
|
|
8899
8899
|
}
|
|
8900
8900
|
function a(p, m, g, y, x) {
|
|
@@ -8910,15 +8910,15 @@ function Yd() {
|
|
|
8910
8910
|
const x = Zi(p, y);
|
|
8911
8911
|
return u(p, m) ? g[x] : qe(g[x], 0.2);
|
|
8912
8912
|
}
|
|
8913
|
-
function l(p, m, g, y, x,
|
|
8914
|
-
const
|
|
8915
|
-
return u(p, m) ? x[
|
|
8913
|
+
function l(p, m, g, y, x, _) {
|
|
8914
|
+
const v = Zi(p, _);
|
|
8915
|
+
return u(p, m) ? x[v](
|
|
8916
8916
|
!1,
|
|
8917
|
-
y[
|
|
8917
|
+
y[v],
|
|
8918
8918
|
g
|
|
8919
|
-
) : x[
|
|
8919
|
+
) : x[v](
|
|
8920
8920
|
!0,
|
|
8921
|
-
y[
|
|
8921
|
+
y[v],
|
|
8922
8922
|
g
|
|
8923
8923
|
);
|
|
8924
8924
|
}
|
|
@@ -8959,14 +8959,14 @@ function Yd() {
|
|
|
8959
8959
|
const { getPatternCanvas: Xd } = Fi();
|
|
8960
8960
|
class pe {
|
|
8961
8961
|
constructor() {
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
|
|
8965
|
-
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8969
|
-
|
|
8962
|
+
k(this, "chartType", "");
|
|
8963
|
+
k(this, "datasetIndex", 0);
|
|
8964
|
+
k(this, "dataIndex", 0);
|
|
8965
|
+
k(this, "titleLines", [""]);
|
|
8966
|
+
k(this, "dataToDisplay", "");
|
|
8967
|
+
k(this, "xValue", "");
|
|
8968
|
+
k(this, "yValue", "");
|
|
8969
|
+
k(this, "patternShifting", 0);
|
|
8970
8970
|
}
|
|
8971
8971
|
createTooltip(t, e, n, s, o, a = !1) {
|
|
8972
8972
|
var c, h, d, u;
|
|
@@ -9398,6 +9398,38 @@ const tu = { class: "container" }, eu = { class: "main" }, iu = /* @__PURE__ */
|
|
|
9398
9398
|
horizontalChart: {
|
|
9399
9399
|
type: Boolean,
|
|
9400
9400
|
default: !1
|
|
9401
|
+
},
|
|
9402
|
+
displayDataSetsTicksLabels: {
|
|
9403
|
+
type: Boolean,
|
|
9404
|
+
default: !0
|
|
9405
|
+
},
|
|
9406
|
+
/**
|
|
9407
|
+
* User defined minimum number for the scale x, overrides minimum value from data.
|
|
9408
|
+
*/
|
|
9409
|
+
xMin: {
|
|
9410
|
+
type: Number,
|
|
9411
|
+
required: !1
|
|
9412
|
+
},
|
|
9413
|
+
/**
|
|
9414
|
+
* User defined maximum number for the scale x, overrides maximum value from data.
|
|
9415
|
+
*/
|
|
9416
|
+
xMax: {
|
|
9417
|
+
type: Number,
|
|
9418
|
+
required: !1
|
|
9419
|
+
},
|
|
9420
|
+
/**
|
|
9421
|
+
* User defined minimum number for the scale y, overrides minimum value from data.
|
|
9422
|
+
*/
|
|
9423
|
+
yMin: {
|
|
9424
|
+
type: Number,
|
|
9425
|
+
required: !1
|
|
9426
|
+
},
|
|
9427
|
+
/**
|
|
9428
|
+
* User defined maximum number for the scale y, overrides maximum value from data.
|
|
9429
|
+
*/
|
|
9430
|
+
yMax: {
|
|
9431
|
+
type: Number,
|
|
9432
|
+
required: !1
|
|
9401
9433
|
}
|
|
9402
9434
|
},
|
|
9403
9435
|
setup(i) {
|
|
@@ -9410,7 +9442,7 @@ const tu = { class: "container" }, eu = { class: "main" }, iu = /* @__PURE__ */
|
|
|
9410
9442
|
re,
|
|
9411
9443
|
le
|
|
9412
9444
|
);
|
|
9413
|
-
const { colourSets: e, patternsStandardList: n } = be(), s = G(null), o = G(!1), a = R(() => t.newPatternsOrder.length !== n.length ? e[t.colourSet] : t.newPatternsOrder.map((
|
|
9445
|
+
const { colourSets: e, patternsStandardList: n } = be(), s = G(null), o = G(!1), a = R(() => t.newPatternsOrder.length !== n.length ? e[t.colourSet] : t.newPatternsOrder.map((C) => e[t.colourSet][C])), r = R(() => t.newPatternsOrder.length !== n.length ? n : t.newPatternsOrder.map((C) => n[C])), l = R(() => t.disableAccessibility), c = R(() => t.enableHoverFeature), {
|
|
9414
9446
|
onHoverIndex: h,
|
|
9415
9447
|
barChartRef: d,
|
|
9416
9448
|
reloadChart: u,
|
|
@@ -9418,12 +9450,12 @@ const tu = { class: "container" }, eu = { class: "main" }, iu = /* @__PURE__ */
|
|
|
9418
9450
|
getStackedDatasets: b,
|
|
9419
9451
|
privateGetHtmlLegendPlugin: p
|
|
9420
9452
|
} = Yd(), m = R(() => {
|
|
9421
|
-
const
|
|
9453
|
+
const C = w(_.value);
|
|
9422
9454
|
return x(), {
|
|
9423
|
-
labels:
|
|
9455
|
+
labels: C,
|
|
9424
9456
|
datasets: b(
|
|
9425
9457
|
t.datasets.map((P, I) => ({
|
|
9426
|
-
data:
|
|
9458
|
+
data: v(I, _.value),
|
|
9427
9459
|
label: t.datasets[I].label,
|
|
9428
9460
|
stack: P.stack || 0
|
|
9429
9461
|
})),
|
|
@@ -9438,26 +9470,26 @@ const tu = { class: "container" }, eu = { class: "main" }, iu = /* @__PURE__ */
|
|
|
9438
9470
|
let g, y;
|
|
9439
9471
|
const x = () => {
|
|
9440
9472
|
g = t.tooltipFirstLineLabel, y = t.tooltipSecondLineLabel;
|
|
9441
|
-
},
|
|
9442
|
-
const
|
|
9443
|
-
if (
|
|
9444
|
-
const P =
|
|
9473
|
+
}, _ = R(() => {
|
|
9474
|
+
const C = t.labels;
|
|
9475
|
+
if (C.includes("other")) {
|
|
9476
|
+
const P = C.indexOf("other");
|
|
9445
9477
|
if (t.datasets[0].data[P].rate + "" == "0" && t.datasets[1].data[P].rate + "" == "0")
|
|
9446
9478
|
return P;
|
|
9447
9479
|
}
|
|
9448
9480
|
return null;
|
|
9449
|
-
}),
|
|
9450
|
-
const Y = Object.assign([], t.datasets[
|
|
9451
|
-
return P &&
|
|
9481
|
+
}), v = (C, P, I = !1) => {
|
|
9482
|
+
const Y = Object.assign([], t.datasets[C].data);
|
|
9483
|
+
return P && _.value && Y.splice(_.value, 1), Y.map(
|
|
9452
9484
|
(T) => t.unit === "%" ? T.rate : T.amount
|
|
9453
9485
|
);
|
|
9454
|
-
}, S = (
|
|
9455
|
-
const P =
|
|
9486
|
+
}, S = (C) => {
|
|
9487
|
+
const P = C.tooltip.dataPoints[0].datasetIndex, I = C.tooltip.dataPoints[0].dataIndex, Y = C.tooltip.body[0].lines[0].split(":")[1], T = t.datasets[P].data[I], B = T.rate ? parseFloat(Y.replace(",", ".")).toFixed(2) + " % " : "", j = T.amountUnit ? T.amountUnit : "", tt = T.amount ? ct(T.amount) : "";
|
|
9456
9488
|
return B + (B && tt ? "/ " : "") + tt + " " + j;
|
|
9457
|
-
},
|
|
9489
|
+
}, w = (C) => {
|
|
9458
9490
|
const P = Object.assign([], t.labels);
|
|
9459
|
-
return
|
|
9460
|
-
},
|
|
9491
|
+
return C && P.splice(C, 1), P.map((I) => I);
|
|
9492
|
+
}, M = R(() => ({
|
|
9461
9493
|
// eslint-disable-next-line
|
|
9462
9494
|
onHover: t.enableHoverFeature ? f() : () => {
|
|
9463
9495
|
},
|
|
@@ -9483,11 +9515,11 @@ const tu = { class: "container" }, eu = { class: "main" }, iu = /* @__PURE__ */
|
|
|
9483
9515
|
tooltip: {
|
|
9484
9516
|
enabled: !1,
|
|
9485
9517
|
position: "nearest",
|
|
9486
|
-
external: function(
|
|
9518
|
+
external: function(C) {
|
|
9487
9519
|
var I;
|
|
9488
|
-
const P = ((I =
|
|
9520
|
+
const P = ((I = C.tooltip.dataPoints) == null ? void 0 : I[0].dataIndex) || 0;
|
|
9489
9521
|
!t.labels[P] || t.labels[P] === "" || new pe().createTooltip(
|
|
9490
|
-
|
|
9522
|
+
C,
|
|
9491
9523
|
S,
|
|
9492
9524
|
{
|
|
9493
9525
|
chartType: me.BAR_CHART,
|
|
@@ -9503,28 +9535,32 @@ const tu = { class: "container" }, eu = { class: "main" }, iu = /* @__PURE__ */
|
|
|
9503
9535
|
},
|
|
9504
9536
|
scales: {
|
|
9505
9537
|
x: {
|
|
9538
|
+
min: t.xMin,
|
|
9539
|
+
max: t.xMax,
|
|
9506
9540
|
stacked: t.stacked,
|
|
9507
9541
|
title: {
|
|
9508
9542
|
display: t.xAxisTitle !== null,
|
|
9509
9543
|
text: t.xAxisTitle
|
|
9510
9544
|
},
|
|
9511
|
-
ticks: t.horizontalChart ? A() : {}
|
|
9545
|
+
ticks: t.horizontalChart ? A() : { display: t.displayDataSetsTicksLabels }
|
|
9512
9546
|
},
|
|
9513
9547
|
y: {
|
|
9548
|
+
min: t.yMin,
|
|
9549
|
+
max: t.yMax,
|
|
9514
9550
|
stacked: t.stacked,
|
|
9515
9551
|
title: {
|
|
9516
9552
|
display: t.yAxisTitle !== null,
|
|
9517
9553
|
text: t.yAxisTitle
|
|
9518
9554
|
},
|
|
9519
|
-
ticks: t.horizontalChart ? {} : A()
|
|
9555
|
+
ticks: t.horizontalChart ? { display: t.displayDataSetsTicksLabels } : A()
|
|
9520
9556
|
}
|
|
9521
9557
|
},
|
|
9522
9558
|
indexAxis: t.horizontalChart ? "y" : "x"
|
|
9523
9559
|
}));
|
|
9524
9560
|
function A() {
|
|
9525
9561
|
return {
|
|
9526
|
-
callback: function(
|
|
9527
|
-
return t.unit === "%" ? fn(
|
|
9562
|
+
callback: function(C) {
|
|
9563
|
+
return t.unit === "%" ? fn(C, t.unit) : Ct(C) + " " + t.unit;
|
|
9528
9564
|
}
|
|
9529
9565
|
};
|
|
9530
9566
|
}
|
|
@@ -9544,7 +9580,7 @@ const tu = { class: "container" }, eu = { class: "main" }, iu = /* @__PURE__ */
|
|
|
9544
9580
|
u();
|
|
9545
9581
|
},
|
|
9546
9582
|
{ deep: !0 }
|
|
9547
|
-
), (
|
|
9583
|
+
), (C, P) => (at(), Yt("div", tu, [
|
|
9548
9584
|
st("div", eu, [
|
|
9549
9585
|
m.value ? (at(), ce(It(ga), {
|
|
9550
9586
|
key: 0,
|
|
@@ -9552,7 +9588,7 @@ const tu = { class: "container" }, eu = { class: "main" }, iu = /* @__PURE__ */
|
|
|
9552
9588
|
ref: d,
|
|
9553
9589
|
id: i.chartId,
|
|
9554
9590
|
data: m.value,
|
|
9555
|
-
options:
|
|
9591
|
+
options: M.value,
|
|
9556
9592
|
plugins: L.value,
|
|
9557
9593
|
class: he(i.cssClasses),
|
|
9558
9594
|
style: Xt([{ width: i.width, height: i.height, cursor: "pointer" }, i.styles])
|
|
@@ -9570,7 +9606,7 @@ const ye = (i, t) => {
|
|
|
9570
9606
|
for (const [n, s] of t)
|
|
9571
9607
|
e[n] = s;
|
|
9572
9608
|
return e;
|
|
9573
|
-
}, gn = /* @__PURE__ */ ye(iu, [["__scopeId", "data-v-
|
|
9609
|
+
}, gn = /* @__PURE__ */ ye(iu, [["__scopeId", "data-v-2d6d9ace"]]);
|
|
9574
9610
|
gn.install = (i) => {
|
|
9575
9611
|
i.component("BarChart", gn);
|
|
9576
9612
|
};
|
|
@@ -9611,12 +9647,12 @@ function nu() {
|
|
|
9611
9647
|
return {
|
|
9612
9648
|
id: "centeredLabelPlugin",
|
|
9613
9649
|
afterDatasetDraw: (f) => {
|
|
9614
|
-
var y, x, v;
|
|
9650
|
+
var y, x, _, v;
|
|
9615
9651
|
const b = [];
|
|
9616
|
-
f.getDatasetMeta(0).data.forEach((
|
|
9617
|
-
|
|
9652
|
+
f.getDatasetMeta(0).data.forEach((S, w) => {
|
|
9653
|
+
S.startAngle !== S.endAngle && b.push(w);
|
|
9618
9654
|
});
|
|
9619
|
-
const m = (
|
|
9655
|
+
const m = (_ = (x = (y = f._metasets[0]) == null ? void 0 : y._dataset) == null ? void 0 : x.raw_value) == null ? void 0 : _.filter((S, w) => b.includes(w)).reduce((S, w) => S + w, 0), g = ((v = u[0]) == null ? void 0 : v.unit) ?? "";
|
|
9620
9656
|
n.value = `${Ct(m)}${g}`;
|
|
9621
9657
|
}
|
|
9622
9658
|
};
|
|
@@ -9624,9 +9660,12 @@ function nu() {
|
|
|
9624
9660
|
function h(u, f, b, p) {
|
|
9625
9661
|
let m = u.slice(0), g = f.slice(0);
|
|
9626
9662
|
return u.length > b && (g = d(f, b), m = m.slice(0, b - 1), m.push(p)), m.map(
|
|
9627
|
-
(y, x) =>
|
|
9628
|
-
|
|
9629
|
-
|
|
9663
|
+
(y, x) => {
|
|
9664
|
+
var _;
|
|
9665
|
+
return `${l(y)} (${Ct(
|
|
9666
|
+
(_ = g[x]) == null ? void 0 : _.rate
|
|
9667
|
+
)} %)`;
|
|
9668
|
+
}
|
|
9630
9669
|
);
|
|
9631
9670
|
}
|
|
9632
9671
|
function d(u, f) {
|
|
@@ -9788,7 +9827,7 @@ const su = { class: "container" }, ou = { class: "main" }, au = {
|
|
|
9788
9827
|
getBorderColor: f
|
|
9789
9828
|
} = nu(), b = G(!1), p = G(null), m = R(
|
|
9790
9829
|
() => d(t.data, t.maxValues)
|
|
9791
|
-
), g = R(() => t.newPatternsOrder.length !== 6 ? e[t.colourSet] : t.newPatternsOrder.map((
|
|
9830
|
+
), g = R(() => t.newPatternsOrder.length !== 6 ? e[t.colourSet] : t.newPatternsOrder.map((C) => e[t.colourSet][C])), y = R(() => t.newPatternsOrder.length !== 6 ? n : t.newPatternsOrder.map((C) => n[C])), x = R(() => ({
|
|
9792
9831
|
labels: u(
|
|
9793
9832
|
t.labels,
|
|
9794
9833
|
t.data,
|
|
@@ -9797,8 +9836,8 @@ const su = { class: "container" }, ou = { class: "main" }, au = {
|
|
|
9797
9836
|
),
|
|
9798
9837
|
datasets: [
|
|
9799
9838
|
{
|
|
9800
|
-
data: m.value.map((
|
|
9801
|
-
raw_value: m.value.map((
|
|
9839
|
+
data: m.value.map((C) => C.rate),
|
|
9840
|
+
raw_value: m.value.map((C) => C.value),
|
|
9802
9841
|
backgroundColor: r(
|
|
9803
9842
|
g.value,
|
|
9804
9843
|
y.value,
|
|
@@ -9811,15 +9850,15 @@ const su = { class: "container" }, ou = { class: "main" }, au = {
|
|
|
9811
9850
|
)
|
|
9812
9851
|
}
|
|
9813
9852
|
]
|
|
9814
|
-
})),
|
|
9815
|
-
const P =
|
|
9853
|
+
})), _ = (C) => {
|
|
9854
|
+
const P = C.tooltip.dataPoints[0].dataIndex, I = m.value[P], Y = ct(I.rate), T = ct(I.value), B = I.unit || "";
|
|
9816
9855
|
return `${T} ${B} (${Y} %)`;
|
|
9817
9856
|
};
|
|
9818
|
-
function
|
|
9857
|
+
function v() {
|
|
9819
9858
|
return t.labels.length <= 1 ? 0 : 12;
|
|
9820
9859
|
}
|
|
9821
9860
|
const S = R(() => {
|
|
9822
|
-
const
|
|
9861
|
+
const C = g.value, P = y.value;
|
|
9823
9862
|
return {
|
|
9824
9863
|
onHover: t.enableHoverFeature ? h() : () => {
|
|
9825
9864
|
},
|
|
@@ -9844,13 +9883,13 @@ const su = { class: "container" }, ou = { class: "main" }, au = {
|
|
|
9844
9883
|
external: function(I) {
|
|
9845
9884
|
new pe().createTooltip(
|
|
9846
9885
|
I,
|
|
9847
|
-
|
|
9886
|
+
_,
|
|
9848
9887
|
{
|
|
9849
9888
|
chartType: me.DOUGHNUT
|
|
9850
9889
|
},
|
|
9851
|
-
|
|
9890
|
+
C,
|
|
9852
9891
|
P,
|
|
9853
|
-
|
|
9892
|
+
M.value
|
|
9854
9893
|
);
|
|
9855
9894
|
}
|
|
9856
9895
|
}
|
|
@@ -9858,40 +9897,40 @@ const su = { class: "container" }, ou = { class: "main" }, au = {
|
|
|
9858
9897
|
radius: "90%",
|
|
9859
9898
|
cutout: "70%",
|
|
9860
9899
|
borderWidth: 3,
|
|
9861
|
-
spacing:
|
|
9900
|
+
spacing: v(),
|
|
9862
9901
|
hoverOffset: 4
|
|
9863
9902
|
};
|
|
9864
|
-
}),
|
|
9903
|
+
}), w = {
|
|
9865
9904
|
data: t.data,
|
|
9866
9905
|
labels: t.labels
|
|
9867
|
-
},
|
|
9906
|
+
}, M = R(() => t.disableAccessibility), A = R(() => t.enableHoverFeature), L = R(() => [
|
|
9868
9907
|
l(
|
|
9869
9908
|
p,
|
|
9870
9909
|
b,
|
|
9871
|
-
|
|
9910
|
+
M,
|
|
9872
9911
|
g,
|
|
9873
9912
|
y,
|
|
9874
9913
|
t.maxValues,
|
|
9875
|
-
|
|
9914
|
+
w,
|
|
9876
9915
|
A
|
|
9877
9916
|
),
|
|
9878
9917
|
c(t.data)
|
|
9879
9918
|
]);
|
|
9880
|
-
return _i(s, (
|
|
9881
|
-
|
|
9919
|
+
return _i(s, (C, P) => {
|
|
9920
|
+
C !== P && A.value && r(
|
|
9882
9921
|
g.value,
|
|
9883
9922
|
y.value,
|
|
9884
9923
|
t.disableAccessibility,
|
|
9885
9924
|
A.value
|
|
9886
9925
|
);
|
|
9887
|
-
}), _i(
|
|
9926
|
+
}), _i(M, () => {
|
|
9888
9927
|
r(
|
|
9889
9928
|
g.value,
|
|
9890
9929
|
y.value,
|
|
9891
9930
|
t.disableAccessibility,
|
|
9892
9931
|
A.value
|
|
9893
9932
|
);
|
|
9894
|
-
}), (
|
|
9933
|
+
}), (C, P) => (at(), Yt("div", su, [
|
|
9895
9934
|
st("div", ou, [
|
|
9896
9935
|
x.value ? (at(), ce(It(Ld), {
|
|
9897
9936
|
key: 0,
|
|
@@ -10063,8 +10102,8 @@ const lu = { class: "container" }, cu = { class: "main" }, hu = /* @__PURE__ */
|
|
|
10063
10102
|
const { colourSets: e, patternsStandardList: n } = be(), s = G(null), o = G(!1), a = R(
|
|
10064
10103
|
() => t.newPatternsOrder.length !== 6 ? e[t.colourSet] : t.newPatternsOrder.map((g) => e[t.colourSet][g])
|
|
10065
10104
|
), r = t.newPatternsOrder.length !== 6 ? n : t.newPatternsOrder.map((g) => n[g]), l = (g) => {
|
|
10066
|
-
const y = g.tooltip.dataPoints[0].datasetIndex, x = g.tooltip.dataPoints[0].dataIndex,
|
|
10067
|
-
return t.lines[y].unit ?
|
|
10105
|
+
const y = g.tooltip.dataPoints[0].datasetIndex, x = g.tooltip.dataPoints[0].dataIndex, _ = ct(t.lines[y].data[x]);
|
|
10106
|
+
return t.lines[y].unit ? _ + " " + t.lines[y].unit : _;
|
|
10068
10107
|
}, c = R(() => t.tooltipFirstLineLabel), h = R(() => t.tooltipSecondLineLabel), d = (g) => {
|
|
10069
10108
|
switch (g) {
|
|
10070
10109
|
case 1:
|
|
@@ -10090,17 +10129,17 @@ const lu = { class: "container" }, cu = { class: "main" }, hu = /* @__PURE__ */
|
|
|
10090
10129
|
{
|
|
10091
10130
|
id: "htmlLegend",
|
|
10092
10131
|
afterUpdate(x) {
|
|
10093
|
-
const
|
|
10094
|
-
for (
|
|
10095
|
-
|
|
10132
|
+
const _ = zi(g, "column");
|
|
10133
|
+
for (_.style.display = "flex", _.style.flexDirection = "row", _.style.margin = "1.375rem 1.0625rem"; _.firstChild; )
|
|
10134
|
+
_.firstChild.remove();
|
|
10096
10135
|
x.options.plugins.legend.labels.generateLabels(x).forEach((S) => {
|
|
10097
|
-
const
|
|
10136
|
+
const w = Ei(
|
|
10098
10137
|
x,
|
|
10099
10138
|
y,
|
|
10100
10139
|
S.datasetIndex
|
|
10101
10140
|
);
|
|
10102
|
-
let
|
|
10103
|
-
y.value ?
|
|
10141
|
+
let M;
|
|
10142
|
+
y.value ? M = b(x, S) : M = Wn(S), M.style.boxSizing = "border-box", w.style.marginRight = "10px", w.appendChild(M), w.appendChild(Ri(S)), _.appendChild(w);
|
|
10104
10143
|
});
|
|
10105
10144
|
}
|
|
10106
10145
|
}
|
|
@@ -10112,8 +10151,8 @@ const lu = { class: "container" }, cu = { class: "main" }, hu = /* @__PURE__ */
|
|
|
10112
10151
|
y,
|
|
10113
10152
|
null
|
|
10114
10153
|
);
|
|
10115
|
-
return x.onclick = (
|
|
10116
|
-
Bi(g, y.datasetIndex, o),
|
|
10154
|
+
return x.onclick = (_) => {
|
|
10155
|
+
Bi(g, y.datasetIndex, o), _.stopPropagation();
|
|
10117
10156
|
}, x;
|
|
10118
10157
|
}
|
|
10119
10158
|
const p = f(s, o), m = R(() => ({
|
|
@@ -10436,13 +10475,13 @@ const gu = { class: "container" }, pu = /* @__PURE__ */ Et({
|
|
|
10436
10475
|
for (; g.firstChild; )
|
|
10437
10476
|
g.firstChild.remove();
|
|
10438
10477
|
m.options.plugins.legend.labels.generateLabels(m).reverse().forEach((x) => {
|
|
10439
|
-
const
|
|
10478
|
+
const _ = Ei(
|
|
10440
10479
|
m,
|
|
10441
10480
|
h,
|
|
10442
10481
|
x.datasetIndex
|
|
10443
10482
|
);
|
|
10444
|
-
let
|
|
10445
|
-
|
|
10483
|
+
let v;
|
|
10484
|
+
_.style.marginRight = "0.625rem", h.value ? v = f(m, x) : v = Wn(x, !0), _.appendChild(v), _.appendChild(Ri(x)), g.appendChild(_);
|
|
10446
10485
|
});
|
|
10447
10486
|
}
|
|
10448
10487
|
},
|
|
@@ -10506,29 +10545,29 @@ function mu() {
|
|
|
10506
10545
|
);
|
|
10507
10546
|
for (y.style.display = "flex", y.style.margin = "1.375rem 1.0625rem", y.style.flexDirection = "row-reverse", y.style.flexWrap = "wrap", y.style.justifyContent = "flex-end"; y.firstChild; )
|
|
10508
10547
|
y.firstChild.remove();
|
|
10509
|
-
g.options.plugins.legend.labels.generateLabels(g).sort((
|
|
10510
|
-
const
|
|
10548
|
+
g.options.plugins.legend.labels.generateLabels(g).sort((_, v) => v.datasetIndex - _.datasetIndex).forEach((_) => {
|
|
10549
|
+
const v = Ei(
|
|
10511
10550
|
g,
|
|
10512
10551
|
u,
|
|
10513
|
-
|
|
10552
|
+
_.datasetIndex
|
|
10514
10553
|
);
|
|
10515
10554
|
let S;
|
|
10516
10555
|
u.value ? S = ya(
|
|
10517
10556
|
g,
|
|
10518
|
-
|
|
10557
|
+
_,
|
|
10519
10558
|
u,
|
|
10520
10559
|
{ datasetIndex: -1 },
|
|
10521
10560
|
p.value,
|
|
10522
10561
|
!1
|
|
10523
|
-
) :
|
|
10524
|
-
|
|
10562
|
+
) : _ != null && _.lineCap ? S = Wn(_) : S = ba(
|
|
10563
|
+
_,
|
|
10525
10564
|
g,
|
|
10526
10565
|
{ datasetIndex: -1 },
|
|
10527
10566
|
b.value,
|
|
10528
10567
|
p.value,
|
|
10529
10568
|
m.value,
|
|
10530
10569
|
!1
|
|
10531
|
-
), S.style.boxSizing = "border-box",
|
|
10570
|
+
), S.style.boxSizing = "border-box", v.style.marginRight = "10px", v.style.marginBottom = "2px", v.appendChild(S), v.appendChild(Ri(_)), y.appendChild(v);
|
|
10532
10571
|
});
|
|
10533
10572
|
}
|
|
10534
10573
|
}
|
|
@@ -10554,18 +10593,18 @@ function mu() {
|
|
|
10554
10593
|
borderWidth: function() {
|
|
10555
10594
|
return u && x ? 1 : m;
|
|
10556
10595
|
},
|
|
10557
|
-
borderColor: function(
|
|
10596
|
+
borderColor: function(_) {
|
|
10558
10597
|
return u && x ? "#00000000" : x ? o(
|
|
10559
10598
|
y,
|
|
10560
|
-
|
|
10599
|
+
_.index,
|
|
10561
10600
|
f,
|
|
10562
10601
|
p
|
|
10563
10602
|
) : f[y % f.length];
|
|
10564
10603
|
},
|
|
10565
|
-
backgroundColor: function(
|
|
10604
|
+
backgroundColor: function(_) {
|
|
10566
10605
|
return a(
|
|
10567
10606
|
y,
|
|
10568
|
-
|
|
10607
|
+
_.index,
|
|
10569
10608
|
u,
|
|
10570
10609
|
f,
|
|
10571
10610
|
b,
|
|
@@ -10801,8 +10840,8 @@ const bu = { class: "container" }, yu = { class: "main" }, xu = /* @__PURE__ */
|
|
|
10801
10840
|
0
|
|
10802
10841
|
)
|
|
10803
10842
|
})), f = (g) => {
|
|
10804
|
-
const y = g.tooltip.dataPoints[0].datasetIndex, x = g.tooltip.dataPoints[0].dataIndex,
|
|
10805
|
-
return ct(
|
|
10843
|
+
const y = g.tooltip.dataPoints[0].datasetIndex, x = g.tooltip.dataPoints[0].dataIndex, _ = l.value[y].data[x], v = l.value[y].type === "bar" ? t.barUnit : t.lineUnit;
|
|
10844
|
+
return ct(_) + " " + v;
|
|
10806
10845
|
}, b = () => Object.assign([], t.labels).map((y) => y), p = R(() => ({
|
|
10807
10846
|
type: "bar",
|
|
10808
10847
|
responsive: !0,
|
|
@@ -11490,8 +11529,8 @@ var Vu = {
|
|
|
11490
11529
|
datasetIndex: n
|
|
11491
11530
|
}, y.update(y.$context), g[it].push(y), o.push(y);
|
|
11492
11531
|
h.restore(), bt(s._listeners, l.listeners, {
|
|
11493
|
-
merger: function(x,
|
|
11494
|
-
|
|
11532
|
+
merger: function(x, _, v) {
|
|
11533
|
+
_[x] = _[x] || {}, _[x][t.index] = v[x], s._listened = !0;
|
|
11495
11534
|
}
|
|
11496
11535
|
});
|
|
11497
11536
|
},
|
|
@@ -11531,7 +11570,7 @@ const fo = "background: white; border-bottom: 1px solid #CCCCCC; border-radius:
|
|
|
11531
11570
|
class ju extends pe {
|
|
11532
11571
|
constructor() {
|
|
11533
11572
|
super(...arguments);
|
|
11534
|
-
|
|
11573
|
+
k(this, "fontProperties", "font-family: Arial; font-size: 16px");
|
|
11535
11574
|
}
|
|
11536
11575
|
createBubbleTooltip(e, n, s) {
|
|
11537
11576
|
if (!s || s === "")
|