@cfasim-ui/charts 0.4.14 → 0.4.15
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/BarChart/BarChart.d.ts +54 -5
- package/dist/LineChart/LineChart.d.ts +11 -15
- package/dist/_shared/chartProps.d.ts +35 -0
- package/dist/_shared/index.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +721 -589
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Fragment as e, Teleport as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeClass as f, normalizeProps as p, normalizeStyle as m, onMounted as h, onUnmounted as g, openBlock as _, ref as v, renderList as y, renderSlot as ee, toDisplayString as b, toHandlers as te, toRaw as x, unref as S, useSlots as C, useTemplateRef as w, watch as T, withCtx as E } from "vue";
|
|
2
2
|
import { formatNumber as ne } from "@cfasim-ui/shared";
|
|
3
3
|
import { DropdownMenuContent as D, DropdownMenuItem as O, DropdownMenuPortal as re, DropdownMenuRoot as k, DropdownMenuTrigger as A, PopoverAnchor as ie, PopoverContent as j, PopoverPortal as ae, PopoverRoot as M } from "reka-ui";
|
|
4
|
-
import { geoAlbersUsa as oe, geoPath as
|
|
5
|
-
import { zoom as
|
|
6
|
-
import { select as
|
|
4
|
+
import { geoAlbersUsa as oe, geoPath as se } from "d3-geo";
|
|
5
|
+
import { zoom as ce, zoomIdentity as le } from "d3-zoom";
|
|
6
|
+
import { select as ue } from "d3-selection";
|
|
7
7
|
import "d3-transition";
|
|
8
|
-
import { feature as
|
|
8
|
+
import { feature as N, merge as de, mesh as fe } from "topojson-client";
|
|
9
9
|
//#region src/ChartMenu/ChartMenu.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
-
var
|
|
10
|
+
var P = { class: "chart-menu-trigger-area" }, pe = ["aria-label"], me = /* @__PURE__ */ l({
|
|
11
11
|
__name: "ChartMenu",
|
|
12
12
|
props: {
|
|
13
13
|
items: {},
|
|
@@ -18,7 +18,7 @@ var F = { class: "chart-menu-trigger-area" }, fe = ["aria-label"], pe = /* @__PU
|
|
|
18
18
|
},
|
|
19
19
|
setup(t) {
|
|
20
20
|
let n = t, i = () => n.forceDropdown || n.items.length > 1;
|
|
21
|
-
return (n, l) => (_(), a("div",
|
|
21
|
+
return (n, l) => (_(), a("div", P, [i() ? (_(), r(S(k), {
|
|
22
22
|
key: 1,
|
|
23
23
|
modal: !1
|
|
24
24
|
}, {
|
|
@@ -85,44 +85,44 @@ var F = { class: "chart-menu-trigger-area" }, fe = ["aria-label"], pe = /* @__PU
|
|
|
85
85
|
"stroke-linecap": "round",
|
|
86
86
|
"stroke-linejoin": "round",
|
|
87
87
|
"aria-hidden": "true"
|
|
88
|
-
}, [o("path", { d: "M7 1v8M3 6l4 4 4-4M2 13h10" })], -1)]], 8,
|
|
88
|
+
}, [o("path", { d: "M7 1v8M3 6l4 4 4-4M2 13h10" })], -1)]], 8, pe))]));
|
|
89
89
|
}
|
|
90
|
-
}),
|
|
90
|
+
}), F = (e, t) => {
|
|
91
91
|
let n = e.__vccOpts || e;
|
|
92
92
|
for (let [e, r] of t) n[e] = r;
|
|
93
93
|
return n;
|
|
94
|
-
},
|
|
94
|
+
}, he = /* @__PURE__ */ F(me, [["__scopeId", "data-v-c74e2889"]]);
|
|
95
95
|
//#endregion
|
|
96
96
|
//#region src/_shared/axes.ts
|
|
97
|
-
function
|
|
97
|
+
function I(e) {
|
|
98
98
|
return Math.round(e) + .5;
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function ge(e, t) {
|
|
101
101
|
let n = e / t, r = 10 ** Math.floor(Math.log10(n)), i = n / r, a;
|
|
102
102
|
return a = i <= 1.5 ? 1 : i <= 3 ? 2 : i <= 7 ? 5 : 10, a * r;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function _e(e, t, n) {
|
|
105
105
|
if (!(n > 0) || !isFinite(n)) return [];
|
|
106
106
|
let r = [], i = Math.ceil(e / n) * n;
|
|
107
107
|
for (let e = 0, a = i; a <= t + 1e-9 && e < 1e3; e++, a = i + e * n) r.push(a);
|
|
108
108
|
return r;
|
|
109
109
|
}
|
|
110
|
-
var
|
|
111
|
-
function
|
|
112
|
-
return Math.abs(e) >= 1e3 ?
|
|
110
|
+
var ve = new Intl.NumberFormat();
|
|
111
|
+
function ye(e) {
|
|
112
|
+
return Math.abs(e) >= 1e3 ? ve.format(e) : Number.isInteger(e) ? e.toString() : e.toFixed(1);
|
|
113
113
|
}
|
|
114
114
|
//#endregion
|
|
115
115
|
//#region src/_shared/computeTicks.ts
|
|
116
|
-
function
|
|
116
|
+
function be(e) {
|
|
117
117
|
let { min: t, max: n, ticks: r } = e;
|
|
118
118
|
if (t === n) return [];
|
|
119
119
|
let i = e.displayOffset ?? 0;
|
|
120
120
|
if (Array.isArray(r)) return r.map((e) => e - i).filter((e) => e >= t && e <= n);
|
|
121
|
-
if (typeof r == "number") return
|
|
122
|
-
let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o =
|
|
123
|
-
return
|
|
121
|
+
if (typeof r == "number") return _e(t + i, n + i, r).map((e) => e - i);
|
|
122
|
+
let a = Math.max(3, Math.floor(e.targetTickCount ?? 3)), o = ge(n - t, a);
|
|
123
|
+
return _e(t + i, n + i, o).map((e) => e - i);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function xe(e, t, n, r) {
|
|
126
126
|
if (r === "log") {
|
|
127
127
|
let r = Math.log10(t), i = Math.log10(n) - r || 1;
|
|
128
128
|
return (Math.log10(e > 0 ? e : t) - r) / i;
|
|
@@ -130,7 +130,7 @@ function be(e, t, n, r) {
|
|
|
130
130
|
let i = n - t || 1;
|
|
131
131
|
return (e - t) / i;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function Se(e, t, n, r) {
|
|
134
134
|
if (n !== "log") return {
|
|
135
135
|
min: e,
|
|
136
136
|
max: t
|
|
@@ -141,7 +141,7 @@ function xe(e, t, n, r) {
|
|
|
141
141
|
max: t > 0 ? Math.max(t, i) : i
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function L(e) {
|
|
145
145
|
let { min: t, max: n, ticks: r } = e;
|
|
146
146
|
if (!(t > 0) || !(n > 0) || t === n) return [];
|
|
147
147
|
if (Array.isArray(r)) return r.filter((e) => e > 0 && e >= t && e <= n);
|
|
@@ -154,7 +154,7 @@ function R(e) {
|
|
|
154
154
|
}
|
|
155
155
|
//#endregion
|
|
156
156
|
//#region src/_shared/useChartSize.ts
|
|
157
|
-
function
|
|
157
|
+
function Ce(e = {}) {
|
|
158
158
|
let t = v(null), n = v(0), r = v(0), i = null, a = null;
|
|
159
159
|
return h(() => {
|
|
160
160
|
t.value && (n.value = t.value.clientWidth, r.value = t.value.clientHeight, i = new ResizeObserver((t) => {
|
|
@@ -173,7 +173,7 @@ function Se(e = {}) {
|
|
|
173
173
|
measuredHeight: r
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
var
|
|
176
|
+
var we = .6, R = 8;
|
|
177
177
|
function z(e, t) {
|
|
178
178
|
return {
|
|
179
179
|
fontSize: e?.fontSize ?? t.fontSize,
|
|
@@ -182,8 +182,8 @@ function z(e, t) {
|
|
|
182
182
|
fillOpacity: e?.color == null ? t.fillOpacity : void 0
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
-
var
|
|
186
|
-
function
|
|
185
|
+
var Te = 7, Ee = 18, De = 16;
|
|
186
|
+
function Oe(e) {
|
|
187
187
|
return e == null ? {
|
|
188
188
|
top: 0,
|
|
189
189
|
right: 0,
|
|
@@ -201,12 +201,12 @@ function V(e) {
|
|
|
201
201
|
left: e.left ?? 0
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
return
|
|
204
|
+
function ke(e) {
|
|
205
|
+
return Ee + e.length * Te;
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function Ae(e) {
|
|
208
208
|
let t = n(() => {
|
|
209
|
-
let t =
|
|
209
|
+
let t = Oe(e.extraPadding?.());
|
|
210
210
|
return {
|
|
211
211
|
left: (e.yLabel() ? 56 : 50) + t.left,
|
|
212
212
|
right: 10 + t.right
|
|
@@ -219,11 +219,11 @@ function De(e) {
|
|
|
219
219
|
};
|
|
220
220
|
let n = Math.max(0, r.value), i = [], a = 0, o = 0;
|
|
221
221
|
for (let e of t) {
|
|
222
|
-
let t =
|
|
222
|
+
let t = ke(e);
|
|
223
223
|
o > 0 && o + t > n && (a++, o = 0), i.push({
|
|
224
224
|
x: o,
|
|
225
225
|
row: a
|
|
226
|
-
}), o += t +
|
|
226
|
+
}), o += t + De;
|
|
227
227
|
}
|
|
228
228
|
return {
|
|
229
229
|
positions: i,
|
|
@@ -233,9 +233,9 @@ function De(e) {
|
|
|
233
233
|
let t = e.title();
|
|
234
234
|
if (!t) return 10;
|
|
235
235
|
let n = e.titleStyle?.()?.lineHeight ?? 18;
|
|
236
|
-
return t.split("\n").length * n +
|
|
236
|
+
return t.split("\n").length * n + R;
|
|
237
237
|
}), o = n(() => {
|
|
238
|
-
let n =
|
|
238
|
+
let n = Oe(e.extraPadding?.()), r = i.value.rowCount;
|
|
239
239
|
return {
|
|
240
240
|
top: a.value + r * 20 + n.top,
|
|
241
241
|
bottom: (e.xLabel() ? 38 : 30) + n.bottom,
|
|
@@ -264,10 +264,10 @@ function De(e) {
|
|
|
264
264
|
}
|
|
265
265
|
//#endregion
|
|
266
266
|
//#region src/tooltip-position.ts
|
|
267
|
-
var
|
|
268
|
-
function
|
|
267
|
+
var B = 16, je = 8;
|
|
268
|
+
function Me(e, t, n, r, i, a) {
|
|
269
269
|
if (i === "none") return {
|
|
270
|
-
left: e +
|
|
270
|
+
left: e + B,
|
|
271
271
|
top: t
|
|
272
272
|
};
|
|
273
273
|
let o = i === "chart" && a ? {
|
|
@@ -280,15 +280,15 @@ function Ae(e, t, n, r, i, a) {
|
|
|
280
280
|
right: window.innerWidth,
|
|
281
281
|
top: 0,
|
|
282
282
|
bottom: window.innerHeight
|
|
283
|
-
}, s = e +
|
|
283
|
+
}, s = e + B + n > o.right - je ? e - B - n : e + B, c = r / 2;
|
|
284
284
|
return {
|
|
285
285
|
left: s,
|
|
286
|
-
top: Math.min(Math.max(t, o.top +
|
|
286
|
+
top: Math.min(Math.max(t, o.top + je + c), o.bottom - je - c)
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
289
|
//#endregion
|
|
290
290
|
//#region src/_shared/useChartTooltip.ts
|
|
291
|
-
function
|
|
291
|
+
function V(e) {
|
|
292
292
|
let t = e.touchYOffset ?? 50, n = v(null), r = v(!1), i = v(null), a = v(null), o = v(null);
|
|
293
293
|
function s(e) {
|
|
294
294
|
return "touches" in e ? e.touches[0] ?? null : e;
|
|
@@ -309,7 +309,7 @@ function je(e) {
|
|
|
309
309
|
}
|
|
310
310
|
let s = i.value, c = e.containerRef.value;
|
|
311
311
|
if (!s || !c) return;
|
|
312
|
-
let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "chart", { left: f, top: p } =
|
|
312
|
+
let l = c.getBoundingClientRect(), u = r.value ? t : 0, d = e.clamp?.() ?? "chart", { left: f, top: p } = Me(a.value.clientX, a.value.clientY - u, s.offsetWidth, s.offsetHeight, d, l);
|
|
313
313
|
o.value = {
|
|
314
314
|
left: f - l.left,
|
|
315
315
|
top: p - l.top
|
|
@@ -355,7 +355,7 @@ function je(e) {
|
|
|
355
355
|
}
|
|
356
356
|
//#endregion
|
|
357
357
|
//#region src/ChartMenu/download.ts
|
|
358
|
-
function
|
|
358
|
+
function H(e, t) {
|
|
359
359
|
let n = URL.createObjectURL(e), r = document.createElement("a");
|
|
360
360
|
r.href = n, r.download = t, r.click(), URL.revokeObjectURL(n);
|
|
361
361
|
}
|
|
@@ -389,35 +389,35 @@ function W(e) {
|
|
|
389
389
|
}
|
|
390
390
|
function G(e, t) {
|
|
391
391
|
let n = W(e), r = new XMLSerializer().serializeToString(n);
|
|
392
|
-
|
|
392
|
+
H(new Blob([r], { type: "image/svg+xml" }), `${t}.svg`);
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function Fe(e, t) {
|
|
395
395
|
let n = W(e), r = new XMLSerializer().serializeToString(n), i = new Blob([r], { type: "image/svg+xml;charset=utf-8" }), a = URL.createObjectURL(i), o = new Image(), s = e.width.baseVal.value || e.clientWidth, c = e.height.baseVal.value || e.clientHeight;
|
|
396
396
|
o.onload = () => {
|
|
397
397
|
let e = document.createElement("canvas");
|
|
398
398
|
e.width = s * 2, e.height = c * 2;
|
|
399
399
|
let n = e.getContext("2d");
|
|
400
400
|
n.scale(2, 2), n.drawImage(o, 0, 0, s, c), e.toBlob((e) => {
|
|
401
|
-
e &&
|
|
401
|
+
e && H(e, `${t}.png`);
|
|
402
402
|
}), URL.revokeObjectURL(a);
|
|
403
403
|
}, o.src = a;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
|
|
405
|
+
function K(e, t) {
|
|
406
|
+
H(new Blob([e], { type: "text/csv" }), `${t}.csv`);
|
|
407
407
|
}
|
|
408
408
|
//#endregion
|
|
409
409
|
//#region src/_shared/useChartFullscreen.ts
|
|
410
|
-
var
|
|
411
|
-
function
|
|
412
|
-
typeof document > "u" || (
|
|
410
|
+
var Ie = 0, Le = "";
|
|
411
|
+
function Re() {
|
|
412
|
+
typeof document > "u" || (Ie === 0 && (Le = document.body.style.overflow, document.body.style.overflow = "hidden"), Ie++);
|
|
413
413
|
}
|
|
414
|
-
function
|
|
415
|
-
typeof document > "u" ||
|
|
414
|
+
function q() {
|
|
415
|
+
typeof document > "u" || Ie !== 0 && (Ie--, Ie === 0 && (document.body.style.overflow = Le));
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function J() {
|
|
418
418
|
let e = v(!1), t = !1;
|
|
419
419
|
function r(n) {
|
|
420
|
-
n !== e.value && (e.value = n, n && !t ? (
|
|
420
|
+
n !== e.value && (e.value = n, n && !t ? (Re(), t = !0) : !n && t && (q(), t = !1));
|
|
421
421
|
}
|
|
422
422
|
function i(t) {
|
|
423
423
|
if (t.key !== "Escape" || !e.value) return;
|
|
@@ -436,7 +436,7 @@ function Re() {
|
|
|
436
436
|
return h(() => {
|
|
437
437
|
typeof document > "u" || document.addEventListener("keydown", i);
|
|
438
438
|
}), g(() => {
|
|
439
|
-
typeof document > "u" || (document.removeEventListener("keydown", i), t &&= (
|
|
439
|
+
typeof document > "u" || (document.removeEventListener("keydown", i), t &&= (q(), !1));
|
|
440
440
|
}), {
|
|
441
441
|
isFullscreen: e,
|
|
442
442
|
toggle: s,
|
|
@@ -459,7 +459,7 @@ function ze(e) {
|
|
|
459
459
|
let n = e.legacyMenuLabel();
|
|
460
460
|
return typeof n == "string" ? n : "chart";
|
|
461
461
|
}
|
|
462
|
-
let i = e.fullscreen ?
|
|
462
|
+
let i = e.fullscreen ? J() : null;
|
|
463
463
|
return {
|
|
464
464
|
svgRef: t,
|
|
465
465
|
items: n(() => {
|
|
@@ -472,11 +472,11 @@ function ze(e) {
|
|
|
472
472
|
}, {
|
|
473
473
|
label: "Save as PNG",
|
|
474
474
|
action: () => {
|
|
475
|
-
t.value &&
|
|
475
|
+
t.value && Fe(t.value, n);
|
|
476
476
|
}
|
|
477
477
|
}), e.downloadLink() || a.push({
|
|
478
478
|
label: "Download CSV",
|
|
479
|
-
action: () =>
|
|
479
|
+
action: () => K(e.getCsv(), n)
|
|
480
480
|
}), a;
|
|
481
481
|
}),
|
|
482
482
|
downloadLinkText: n(() => {
|
|
@@ -520,25 +520,25 @@ function He(e) {
|
|
|
520
520
|
var Ue = {
|
|
521
521
|
class: "chart-annotations",
|
|
522
522
|
"pointer-events": "none"
|
|
523
|
-
},
|
|
523
|
+
}, Y = ["stroke", "stroke-width"], We = [
|
|
524
524
|
"d",
|
|
525
525
|
"stroke",
|
|
526
526
|
"stroke-width"
|
|
527
|
-
],
|
|
527
|
+
], X = [
|
|
528
528
|
"fill",
|
|
529
529
|
"stroke",
|
|
530
530
|
"stroke-width",
|
|
531
531
|
"transform"
|
|
532
|
-
],
|
|
532
|
+
], Ge = [
|
|
533
533
|
"stroke",
|
|
534
534
|
"stroke-width",
|
|
535
535
|
"stroke-dasharray"
|
|
536
|
-
],
|
|
536
|
+
], Ke = [
|
|
537
537
|
"d",
|
|
538
538
|
"stroke",
|
|
539
539
|
"stroke-width",
|
|
540
540
|
"stroke-dasharray"
|
|
541
|
-
],
|
|
541
|
+
], qe = ["fill", "transform"], Je = [
|
|
542
542
|
"x",
|
|
543
543
|
"y",
|
|
544
544
|
"text-anchor",
|
|
@@ -547,7 +547,7 @@ var Ue = {
|
|
|
547
547
|
"fill",
|
|
548
548
|
"stroke",
|
|
549
549
|
"stroke-width"
|
|
550
|
-
],
|
|
550
|
+
], Ye = ["x", "dy"], Xe = ["font-weight", "font-style"], Ze = 13, Qe = "normal", $e = 700, et = "var(--color-bg-0, #fff)", tt = 3, nt = 1, rt = 4, it = 6, at = 1.2, ot = .35, st = /* @__PURE__ */ l({
|
|
551
551
|
__name: "ChartAnnotations",
|
|
552
552
|
props: {
|
|
553
553
|
annotations: { default: () => [] },
|
|
@@ -584,7 +584,7 @@ var Ue = {
|
|
|
584
584
|
if (!n || !isFinite(n.x) || !isFinite(n.y)) continue;
|
|
585
585
|
let i = t.pointer ?? "curved", a = i.startsWith("rule");
|
|
586
586
|
if (a && !r.bounds) continue;
|
|
587
|
-
let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ??
|
|
587
|
+
let { x: o, y: l } = t.offset, d = n.x + o, p = n.y + l, m = t.color ?? "currentColor", h = t.fontSize ?? Ze, g = t.fontWeight ?? Qe, _ = t.outlineColor ?? et, v = t.outlineWidth ?? tt, y = t.lineColor ?? m, ee = t.lineWidth ?? nt, b = s(t.lineDash), te = {
|
|
588
588
|
left: "start",
|
|
589
589
|
center: "middle",
|
|
590
590
|
right: "end"
|
|
@@ -599,7 +599,7 @@ var Ue = {
|
|
|
599
599
|
textX: d,
|
|
600
600
|
textY: p,
|
|
601
601
|
textAnchor: te,
|
|
602
|
-
dy: h *
|
|
602
|
+
dy: h * at,
|
|
603
603
|
fontSize: h,
|
|
604
604
|
fontWeight: g,
|
|
605
605
|
color: m,
|
|
@@ -665,11 +665,11 @@ var Ue = {
|
|
|
665
665
|
}
|
|
666
666
|
function f(e, t, n, r, i, a) {
|
|
667
667
|
if (a === "none") return { path: "" };
|
|
668
|
-
let o = n - e, s = r - t, c = r - i *
|
|
668
|
+
let o = n - e, s = r - t, c = r - i * ot;
|
|
669
669
|
if (o === 0 || s === 0 || a === "straight") {
|
|
670
670
|
let i = s === 0 ? r : c, a = n - e, o = i - t, l = Math.hypot(a, o);
|
|
671
|
-
if (l <=
|
|
672
|
-
let u = a / l, d = o / l, f = e + u *
|
|
671
|
+
if (l <= rt + it) return { path: "" };
|
|
672
|
+
let u = a / l, d = o / l, f = e + u * rt, p = t + d * rt, m = n - u * it, h = i - d * it, g = Math.atan2(-d, -u) * 180 / Math.PI;
|
|
673
673
|
return {
|
|
674
674
|
path: `M${f},${p} L${m},${h}`,
|
|
675
675
|
arrow: {
|
|
@@ -680,8 +680,8 @@ var Ue = {
|
|
|
680
680
|
};
|
|
681
681
|
}
|
|
682
682
|
let l = c - t;
|
|
683
|
-
if (Math.abs(l) <=
|
|
684
|
-
let u = Math.sign(o), d = Math.sign(l), f = e, p = t + d *
|
|
683
|
+
if (Math.abs(l) <= rt || Math.abs(o) <= it) return { path: "" };
|
|
684
|
+
let u = Math.sign(o), d = Math.sign(l), f = e, p = t + d * rt, m = n - u * it, h = c, g = d > 0 ? -90 : 90;
|
|
685
685
|
return {
|
|
686
686
|
path: `M${f},${p} Q${f},${c} ${m},${h}`,
|
|
687
687
|
arrow: {
|
|
@@ -700,7 +700,7 @@ var Ue = {
|
|
|
700
700
|
stroke: t.outlineColor,
|
|
701
701
|
"stroke-width": t.lineWidth + t.outlineWidth,
|
|
702
702
|
"stroke-linecap": "round"
|
|
703
|
-
}), null, 16,
|
|
703
|
+
}), null, 16, Y)) : i("", !0),
|
|
704
704
|
t.pointerPath && t.outlineWidth > 0 ? (_(), a("path", {
|
|
705
705
|
key: 1,
|
|
706
706
|
d: t.pointerPath,
|
|
@@ -709,7 +709,7 @@ var Ue = {
|
|
|
709
709
|
stroke: t.outlineColor,
|
|
710
710
|
"stroke-width": t.lineWidth + t.outlineWidth,
|
|
711
711
|
"stroke-linecap": "round"
|
|
712
|
-
}, null, 8,
|
|
712
|
+
}, null, 8, We)) : i("", !0),
|
|
713
713
|
t.arrowTip && t.outlineWidth > 0 ? (_(), a("polygon", {
|
|
714
714
|
key: 2,
|
|
715
715
|
points: "0,0 -6,-3 -6,3",
|
|
@@ -719,7 +719,7 @@ var Ue = {
|
|
|
719
719
|
"stroke-width": t.outlineWidth,
|
|
720
720
|
"stroke-linejoin": "round",
|
|
721
721
|
transform: t.arrowTransform
|
|
722
|
-
}, null, 8,
|
|
722
|
+
}, null, 8, X)) : i("", !0),
|
|
723
723
|
t.rule ? (_(), a("line", d({
|
|
724
724
|
key: 3,
|
|
725
725
|
ref_for: !0
|
|
@@ -728,7 +728,7 @@ var Ue = {
|
|
|
728
728
|
"stroke-width": t.lineWidth,
|
|
729
729
|
"stroke-dasharray": t.lineDash,
|
|
730
730
|
"stroke-linecap": "round"
|
|
731
|
-
}), null, 16,
|
|
731
|
+
}), null, 16, Ge)) : i("", !0),
|
|
732
732
|
t.pointerPath ? (_(), a("path", {
|
|
733
733
|
key: 4,
|
|
734
734
|
d: t.pointerPath,
|
|
@@ -737,13 +737,13 @@ var Ue = {
|
|
|
737
737
|
"stroke-width": t.lineWidth,
|
|
738
738
|
"stroke-dasharray": t.lineDash,
|
|
739
739
|
"stroke-linecap": "round"
|
|
740
|
-
}, null, 8,
|
|
740
|
+
}, null, 8, Ke)) : i("", !0),
|
|
741
741
|
t.arrowTip ? (_(), a("polygon", {
|
|
742
742
|
key: 5,
|
|
743
743
|
points: "0,0 -6,-3 -6,3",
|
|
744
744
|
fill: t.lineColor,
|
|
745
745
|
transform: t.arrowTransform
|
|
746
|
-
}, null, 8,
|
|
746
|
+
}, null, 8, qe)) : i("", !0),
|
|
747
747
|
o("text", {
|
|
748
748
|
x: t.textX,
|
|
749
749
|
y: t.textY,
|
|
@@ -761,26 +761,26 @@ var Ue = {
|
|
|
761
761
|
dy: r === 0 ? 0 : t.dy
|
|
762
762
|
}, [(_(!0), a(e, null, y(n, (e, t) => (_(), a("tspan", {
|
|
763
763
|
key: t,
|
|
764
|
-
"font-weight": e.bold ?
|
|
764
|
+
"font-weight": e.bold ? $e : void 0,
|
|
765
765
|
"font-style": e.italic ? "italic" : void 0
|
|
766
|
-
}, b(e.text), 9,
|
|
766
|
+
}, b(e.text), 9, Xe))), 128))], 8, Ye))), 128))], 8, Je)
|
|
767
767
|
], 64))), 128))]));
|
|
768
768
|
}
|
|
769
|
-
}),
|
|
770
|
-
function
|
|
771
|
-
let { containerRef: t, measuredWidth: r, measuredHeight: i } =
|
|
769
|
+
}), ct = 400, lt = 200;
|
|
770
|
+
function ut(e) {
|
|
771
|
+
let { containerRef: t, measuredWidth: r, measuredHeight: i } = Ce({ debounce: e.debounce }), { svgRef: a, items: o, downloadLinkText: s, csvHref: c, resolvedFilename: l, isFullscreen: u } = ze({
|
|
772
772
|
filename: e.filename,
|
|
773
773
|
legacyMenuLabel: e.menu,
|
|
774
774
|
getCsv: e.getCsv,
|
|
775
775
|
downloadLink: e.downloadLink,
|
|
776
776
|
fullscreen: !0
|
|
777
|
-
}), d = n(() => u.value && r.value > 0 ? r.value : e.width() ?? (r.value ||
|
|
777
|
+
}), d = n(() => u.value && r.value > 0 ? r.value : e.width() ?? (r.value || ct)), f = n(() => {
|
|
778
778
|
if (u.value && i.value > 0) {
|
|
779
779
|
let t = e.extraBelowHeight?.() ?? 0;
|
|
780
780
|
return i.value - t;
|
|
781
781
|
}
|
|
782
|
-
return e.height() ??
|
|
783
|
-
}), { padding: p, legendY: m, inlineLegendLayout: h, innerW: g, innerH: _, bounds: v } =
|
|
782
|
+
return e.height() ?? lt;
|
|
783
|
+
}), { padding: p, legendY: m, inlineLegendLayout: h, innerW: g, innerH: _, bounds: v } = Ae({
|
|
784
784
|
title: e.title,
|
|
785
785
|
titleStyle: e.titleStyle,
|
|
786
786
|
xLabel: e.xLabel,
|
|
@@ -789,7 +789,7 @@ function dt(e) {
|
|
|
789
789
|
width: () => d.value,
|
|
790
790
|
height: () => f.value,
|
|
791
791
|
extraPadding: e.chartPadding
|
|
792
|
-
}), { hoverIndex: y, tooltipRef: ee, tooltipPos: b, handlers: te } =
|
|
792
|
+
}), { hoverIndex: y, tooltipRef: ee, tooltipPos: b, handlers: te } = V({
|
|
793
793
|
enabled: e.hasTooltipSlot,
|
|
794
794
|
trigger: e.tooltipTrigger,
|
|
795
795
|
clamp: () => e.tooltipClamp() ?? "chart",
|
|
@@ -820,56 +820,56 @@ function dt(e) {
|
|
|
820
820
|
measuredHeight: i
|
|
821
821
|
};
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function dt(e, t) {
|
|
824
824
|
return (n) => {
|
|
825
825
|
let r = e();
|
|
826
826
|
if (r !== void 0) return ne(n, r);
|
|
827
827
|
let i = t();
|
|
828
|
-
return i === void 0 ?
|
|
828
|
+
return i === void 0 ? ye(n) : ne(n, i);
|
|
829
829
|
};
|
|
830
830
|
}
|
|
831
831
|
//#endregion
|
|
832
832
|
//#region src/_shared/dateAxis.ts
|
|
833
|
-
var
|
|
833
|
+
var ft = /^(\d{4})-(\d{2})-(\d{2})$/, pt = /^(\d{4})-(\d{2})-(\d{2})[Tt ](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:?\d{2})?$/, Z = 1e3, mt = 60 * Z, Q = 60 * mt, ht = 24 * Q, gt = 7 * ht, _t = 30 * ht, vt = 365 * ht, yt = [
|
|
834
834
|
{
|
|
835
835
|
unit: "second",
|
|
836
836
|
step: 1,
|
|
837
|
-
ms: 1 *
|
|
837
|
+
ms: 1 * Z
|
|
838
838
|
},
|
|
839
839
|
{
|
|
840
840
|
unit: "second",
|
|
841
841
|
step: 5,
|
|
842
|
-
ms: 5 *
|
|
842
|
+
ms: 5 * Z
|
|
843
843
|
},
|
|
844
844
|
{
|
|
845
845
|
unit: "second",
|
|
846
846
|
step: 15,
|
|
847
|
-
ms: 15 *
|
|
847
|
+
ms: 15 * Z
|
|
848
848
|
},
|
|
849
849
|
{
|
|
850
850
|
unit: "second",
|
|
851
851
|
step: 30,
|
|
852
|
-
ms: 30 *
|
|
852
|
+
ms: 30 * Z
|
|
853
853
|
},
|
|
854
854
|
{
|
|
855
855
|
unit: "minute",
|
|
856
856
|
step: 1,
|
|
857
|
-
ms: 1 *
|
|
857
|
+
ms: 1 * mt
|
|
858
858
|
},
|
|
859
859
|
{
|
|
860
860
|
unit: "minute",
|
|
861
861
|
step: 5,
|
|
862
|
-
ms: 5 *
|
|
862
|
+
ms: 5 * mt
|
|
863
863
|
},
|
|
864
864
|
{
|
|
865
865
|
unit: "minute",
|
|
866
866
|
step: 15,
|
|
867
|
-
ms: 15 *
|
|
867
|
+
ms: 15 * mt
|
|
868
868
|
},
|
|
869
869
|
{
|
|
870
870
|
unit: "minute",
|
|
871
871
|
step: 30,
|
|
872
|
-
ms: 30 *
|
|
872
|
+
ms: 30 * mt
|
|
873
873
|
},
|
|
874
874
|
{
|
|
875
875
|
unit: "hour",
|
|
@@ -963,17 +963,17 @@ function xt(e, t) {
|
|
|
963
963
|
return Number.isFinite(t) ? t : null;
|
|
964
964
|
}
|
|
965
965
|
if (typeof e != "string") return null;
|
|
966
|
-
let n =
|
|
966
|
+
let n = ft.exec(e);
|
|
967
967
|
if (n) {
|
|
968
968
|
let e = +n[1], r = n[2] - 1, i = +n[3];
|
|
969
969
|
return t === "utc" ? Date.UTC(e, r, i) : new Date(e, r, i).getTime();
|
|
970
970
|
}
|
|
971
|
-
let r =
|
|
971
|
+
let r = pt.exec(e);
|
|
972
972
|
if (r) {
|
|
973
973
|
let e = +r[1], n = r[2] - 1, i = +r[3], a = +r[4], o = +r[5], s = r[6] ? +r[6] : 0, c = r[7] ? Number("0." + r[7]) * 1e3 : 0, l = r[8];
|
|
974
974
|
if (l) {
|
|
975
975
|
if (l === "Z" || l === "z") return Date.UTC(e, n, i, a, o, s, c);
|
|
976
|
-
let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) *
|
|
976
|
+
let t = l[0] === "+" ? 1 : -1, r = +l.slice(1, 3), u = +l.slice(-2), d = t * (r * 60 + u) * mt;
|
|
977
977
|
return Date.UTC(e, n, i, a, o, s, c) - d;
|
|
978
978
|
}
|
|
979
979
|
return t === "utc" ? Date.UTC(e, n, i, a, o, s, c) : new Date(e, n, i, a, o, s, c).getTime();
|
|
@@ -981,7 +981,7 @@ function xt(e, t) {
|
|
|
981
981
|
return null;
|
|
982
982
|
}
|
|
983
983
|
function St(e) {
|
|
984
|
-
return e instanceof Date ? Number.isFinite(e.getTime()) : typeof e == "string" ?
|
|
984
|
+
return e instanceof Date ? Number.isFinite(e.getTime()) : typeof e == "string" ? ft.test(e) || pt.test(e) : !1;
|
|
985
985
|
}
|
|
986
986
|
function Ct(e, t) {
|
|
987
987
|
if (e.length === 0) return !1;
|
|
@@ -999,8 +999,8 @@ function wt(e, t) {
|
|
|
999
999
|
function Tt(e, t, n) {
|
|
1000
1000
|
let r = new Date(e);
|
|
1001
1001
|
if (n === "utc") switch (t) {
|
|
1002
|
-
case "second": return Math.floor(e /
|
|
1003
|
-
case "minute": return Math.floor(e /
|
|
1002
|
+
case "second": return Math.floor(e / Z) * Z;
|
|
1003
|
+
case "minute": return Math.floor(e / mt) * mt;
|
|
1004
1004
|
case "hour": return Math.floor(e / Q) * Q;
|
|
1005
1005
|
case "day": return Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate());
|
|
1006
1006
|
case "week": {
|
|
@@ -1011,8 +1011,8 @@ function Tt(e, t, n) {
|
|
|
1011
1011
|
case "year": return Date.UTC(r.getUTCFullYear(), 0, 1);
|
|
1012
1012
|
}
|
|
1013
1013
|
switch (t) {
|
|
1014
|
-
case "second": return Math.floor(e /
|
|
1015
|
-
case "minute": return Math.floor(e /
|
|
1014
|
+
case "second": return Math.floor(e / Z) * Z;
|
|
1015
|
+
case "minute": return Math.floor(e / mt) * mt;
|
|
1016
1016
|
case "hour": return new Date(r.getFullYear(), r.getMonth(), r.getDate(), r.getHours()).getTime();
|
|
1017
1017
|
case "day": return new Date(r.getFullYear(), r.getMonth(), r.getDate()).getTime();
|
|
1018
1018
|
case "week": {
|
|
@@ -1024,8 +1024,8 @@ function Tt(e, t, n) {
|
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
1026
|
function Et(e, t, n, r) {
|
|
1027
|
-
if (t === "second") return e + n *
|
|
1028
|
-
if (t === "minute") return e + n *
|
|
1027
|
+
if (t === "second") return e + n * Z;
|
|
1028
|
+
if (t === "minute") return e + n * mt;
|
|
1029
1029
|
if (t === "hour" && r === "utc") return e + n * Q;
|
|
1030
1030
|
if (t === "week" && r === "utc") return e + n * gt;
|
|
1031
1031
|
let i = new Date(e);
|
|
@@ -1299,7 +1299,7 @@ var Pt = {
|
|
|
1299
1299
|
], pn = { class: "line-chart-tooltip" }, mn = {
|
|
1300
1300
|
key: 0,
|
|
1301
1301
|
class: "line-chart-tooltip-label"
|
|
1302
|
-
}, hn = ["href", "download"], gn = 36, _n = 12, vn = 7, yn = 16, bn = /* @__PURE__ */
|
|
1302
|
+
}, hn = ["href", "download"], gn = 36, _n = 12, vn = 7, yn = 16, bn = /* @__PURE__ */ F(/* @__PURE__ */ l({
|
|
1303
1303
|
__name: "LineChart",
|
|
1304
1304
|
props: {
|
|
1305
1305
|
y: {},
|
|
@@ -1358,7 +1358,7 @@ var Pt = {
|
|
|
1358
1358
|
for (let t = 0; t < e.length; t++) r[t] = xt(e[t], n) ?? NaN;
|
|
1359
1359
|
return r;
|
|
1360
1360
|
}
|
|
1361
|
-
let C =
|
|
1361
|
+
let C = dt(() => l.tooltipValueFormat, () => l.yTickFormat), w = n(() => l.timezone ?? "utc"), T = n(() => {
|
|
1362
1362
|
let e = w.value, t = !1, n = !1;
|
|
1363
1363
|
for (let r of v(l)) {
|
|
1364
1364
|
if (n = !0, !Ct(r, e)) {
|
|
@@ -1439,18 +1439,18 @@ var Pt = {
|
|
|
1439
1439
|
range: 1
|
|
1440
1440
|
};
|
|
1441
1441
|
l.yMin != null && l.yMin < e && (e = l.yMin);
|
|
1442
|
-
let i =
|
|
1442
|
+
let i = Se(e, t, l.yScaleType, n);
|
|
1443
1443
|
return {
|
|
1444
1444
|
min: i.min,
|
|
1445
1445
|
max: i.max,
|
|
1446
1446
|
range: i.max - i.min || 1
|
|
1447
1447
|
};
|
|
1448
1448
|
});
|
|
1449
|
-
function
|
|
1449
|
+
function se(e) {
|
|
1450
1450
|
let { min: t, max: n } = oe.value;
|
|
1451
|
-
return U.value.top + G.value -
|
|
1451
|
+
return U.value.top + G.value - xe(e, t, n, l.yScaleType) * G.value;
|
|
1452
1452
|
}
|
|
1453
|
-
function
|
|
1453
|
+
function ce(e) {
|
|
1454
1454
|
let t = e.data;
|
|
1455
1455
|
if (t.length === 0) return "";
|
|
1456
1456
|
let n = "", r = !1;
|
|
@@ -1460,23 +1460,23 @@ var Pt = {
|
|
|
1460
1460
|
r = !1;
|
|
1461
1461
|
continue;
|
|
1462
1462
|
}
|
|
1463
|
-
let o = M(a), s =
|
|
1463
|
+
let o = M(a), s = se(t[i]);
|
|
1464
1464
|
n += r ? `L${o},${s}` : `M${o},${s}`, r = !0;
|
|
1465
1465
|
}
|
|
1466
1466
|
return n;
|
|
1467
1467
|
}
|
|
1468
|
-
function
|
|
1468
|
+
function le(e) {
|
|
1469
1469
|
let t = e.data, n = [];
|
|
1470
1470
|
for (let r = 0; r < t.length; r++) {
|
|
1471
1471
|
let i = A(e, r);
|
|
1472
1472
|
!isFinite(t[r]) || !isFinite(i) || n.push({
|
|
1473
1473
|
x: M(i),
|
|
1474
|
-
y:
|
|
1474
|
+
y: se(t[r])
|
|
1475
1475
|
});
|
|
1476
1476
|
}
|
|
1477
1477
|
return n;
|
|
1478
1478
|
}
|
|
1479
|
-
function
|
|
1479
|
+
function ue(e) {
|
|
1480
1480
|
let t = Math.min(e.upper.length, e.lower.length);
|
|
1481
1481
|
if (t === 0) return "";
|
|
1482
1482
|
let n = [], r = [];
|
|
@@ -1484,32 +1484,32 @@ var Pt = {
|
|
|
1484
1484
|
r.length && n.push(r);
|
|
1485
1485
|
let i = "";
|
|
1486
1486
|
for (let t of n) {
|
|
1487
|
-
i += `M${M(ie(e, t[0]))},${
|
|
1488
|
-
for (let n = 1; n < t.length; n++) i += `L${M(ie(e, t[n]))},${
|
|
1489
|
-
for (let n = t.length - 1; n >= 0; n--) i += `L${M(ie(e, t[n]))},${
|
|
1487
|
+
i += `M${M(ie(e, t[0]))},${se(e.upper[t[0]])}`;
|
|
1488
|
+
for (let n = 1; n < t.length; n++) i += `L${M(ie(e, t[n]))},${se(e.upper[t[n]])}`;
|
|
1489
|
+
for (let n = t.length - 1; n >= 0; n--) i += `L${M(ie(e, t[n]))},${se(e.lower[t[n]])}`;
|
|
1490
1490
|
i += "Z";
|
|
1491
1491
|
}
|
|
1492
1492
|
return i;
|
|
1493
1493
|
}
|
|
1494
|
-
function
|
|
1494
|
+
function N(e, t) {
|
|
1495
1495
|
let n = t === "start" ? e.startIndex : e.endIndex, r = e.seriesIndex != null && D.value[e.seriesIndex] || D.value[0];
|
|
1496
1496
|
return M(r ? A(r, n) : n);
|
|
1497
1497
|
}
|
|
1498
|
-
function
|
|
1498
|
+
function de(e, t = !0) {
|
|
1499
1499
|
let n = U.value.top + G.value;
|
|
1500
1500
|
if (e.seriesIndex == null) {
|
|
1501
|
-
let t =
|
|
1501
|
+
let t = N(e, "start"), r = N(e, "end");
|
|
1502
1502
|
return t > r ? "" : `M${t},${U.value.top}L${r},${U.value.top}L${r},${n}L${t},${n}Z`;
|
|
1503
1503
|
}
|
|
1504
1504
|
let r = D.value[e.seriesIndex];
|
|
1505
1505
|
if (!r) return "";
|
|
1506
1506
|
let i = Math.max(0, e.startIndex), a = Math.min(r.data.length - 1, e.endIndex);
|
|
1507
1507
|
if (i > a) return "";
|
|
1508
|
-
let o = `M${M(A(r, i))},${
|
|
1509
|
-
for (let e = i + 1; e <= a; e++) isFinite(r.data[e]) && (o += `L${M(A(r, e))},${
|
|
1508
|
+
let o = `M${M(A(r, i))},${se(r.data[i])}`;
|
|
1509
|
+
for (let e = i + 1; e <= a; e++) isFinite(r.data[e]) && (o += `L${M(A(r, e))},${se(r.data[e])}`);
|
|
1510
1510
|
return t && (o += `L${M(A(r, a))},${n}`, o += `L${M(A(r, i))},${n}`, o += "Z"), o;
|
|
1511
1511
|
}
|
|
1512
|
-
let
|
|
1512
|
+
let fe = n(() => {
|
|
1513
1513
|
let e = l.areaSections;
|
|
1514
1514
|
if (!e?.length) return {
|
|
1515
1515
|
labels: [],
|
|
@@ -1518,7 +1518,7 @@ var Pt = {
|
|
|
1518
1518
|
let t = [], n = U.value.left + W.value;
|
|
1519
1519
|
for (let r of e) {
|
|
1520
1520
|
if (!r.label && !r.description || r.legend === "inline" || r.legend === !1) continue;
|
|
1521
|
-
let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * vn, o =
|
|
1521
|
+
let e = r.label ?? "", i = r.description ?? "", a = Math.max(e.length, i.length) * vn, o = N(r, "start") + a / 2 + 2, s = n - a / 2 - 8, c = Math.min(o, s), l = r.color ?? (r.seriesIndex == null ? "#999" : D.value[r.seriesIndex]?.color ?? "currentColor"), u = z({
|
|
1522
1522
|
color: l,
|
|
1523
1523
|
fontWeight: 600,
|
|
1524
1524
|
...r.inlineLabelStyle
|
|
@@ -1554,7 +1554,7 @@ var Pt = {
|
|
|
1554
1554
|
labels: t,
|
|
1555
1555
|
extraHeight: (Math.max(...t.map((e) => e.row)) + 1) * gn + _n
|
|
1556
1556
|
};
|
|
1557
|
-
}),
|
|
1557
|
+
}), P = n(() => {
|
|
1558
1558
|
let e = [];
|
|
1559
1559
|
for (let t of D.value) !t.legend || t.showInLegend === !1 || e.push({
|
|
1560
1560
|
label: t.legend,
|
|
@@ -1574,38 +1574,38 @@ var Pt = {
|
|
|
1574
1574
|
});
|
|
1575
1575
|
}
|
|
1576
1576
|
return e;
|
|
1577
|
-
}),
|
|
1578
|
-
let { min: e, max: t } = oe.value, n = (e) => l.yTickFormat === void 0 ?
|
|
1577
|
+
}), pe = n(() => P.value.map((e) => e.label)), me = n(() => H.value + fe.value.extraHeight), F = n(() => U.value.top + G.value + U.value.bottom + _n), ge = n(() => {
|
|
1578
|
+
let { min: e, max: t } = oe.value, n = (e) => l.yTickFormat === void 0 ? ye(e) : ne(e, l.yTickFormat);
|
|
1579
1579
|
return e === t ? [{
|
|
1580
1580
|
value: n(e),
|
|
1581
|
-
y:
|
|
1582
|
-
}] : (l.yScaleType === "log" ?
|
|
1581
|
+
y: I(U.value.top + G.value / 2)
|
|
1582
|
+
}] : (l.yScaleType === "log" ? L({
|
|
1583
1583
|
min: e,
|
|
1584
1584
|
max: t,
|
|
1585
1585
|
ticks: l.yTicks
|
|
1586
|
-
}) :
|
|
1586
|
+
}) : be({
|
|
1587
1587
|
min: e,
|
|
1588
1588
|
max: t,
|
|
1589
1589
|
ticks: l.yTicks,
|
|
1590
1590
|
targetTickCount: G.value / 50
|
|
1591
1591
|
})).map((e) => ({
|
|
1592
1592
|
value: n(e),
|
|
1593
|
-
y:
|
|
1593
|
+
y: I(se(e))
|
|
1594
1594
|
}));
|
|
1595
1595
|
});
|
|
1596
|
-
function
|
|
1596
|
+
function _e(e, t, n) {
|
|
1597
1597
|
let r = l.xTickFormat;
|
|
1598
1598
|
if (E.value) return typeof r == "function" ? r(e, t) : Nt(e, r, w.value, n);
|
|
1599
1599
|
let i = e + j.value;
|
|
1600
|
-
return r === void 0 ? !k.value && l.xLabels && Number.isInteger(e) && e >= 0 && e < l.xLabels.length ? l.xLabels[e] :
|
|
1600
|
+
return r === void 0 ? !k.value && l.xLabels && Number.isInteger(e) && e >= 0 && e < l.xLabels.length ? l.xLabels[e] : ye(i) : typeof r == "function" ? r(i, t) : ne(i, r);
|
|
1601
1601
|
}
|
|
1602
|
-
let
|
|
1602
|
+
let ve = n(() => {
|
|
1603
1603
|
let { min: e, max: t } = ae.value;
|
|
1604
1604
|
if (e === t) return [];
|
|
1605
1605
|
let n = E.value, r = n ? 0 : j.value, i = re.value, a = W.value / 80, o, s;
|
|
1606
1606
|
if (n) {
|
|
1607
1607
|
let n = Dt(e, t, a, w.value);
|
|
1608
|
-
s = n.unit, o =
|
|
1608
|
+
s = n.unit, o = be({
|
|
1609
1609
|
min: e,
|
|
1610
1610
|
max: t,
|
|
1611
1611
|
ticks: n.values
|
|
@@ -1614,7 +1614,7 @@ var Pt = {
|
|
|
1614
1614
|
let e = Math.max(3, Math.floor(a)), t = Math.max(1, Math.round((i - 1) / e));
|
|
1615
1615
|
o = [];
|
|
1616
1616
|
for (let e = 0; e < i; e += t) o.push(e);
|
|
1617
|
-
} else o =
|
|
1617
|
+
} else o = be({
|
|
1618
1618
|
min: e,
|
|
1619
1619
|
max: t,
|
|
1620
1620
|
ticks: l.xTicks,
|
|
@@ -1623,22 +1623,22 @@ var Pt = {
|
|
|
1623
1623
|
});
|
|
1624
1624
|
let c = U.value.left, u = U.value.left + W.value;
|
|
1625
1625
|
return o.map((e, t) => {
|
|
1626
|
-
let n =
|
|
1626
|
+
let n = I(M(e)), r = "middle";
|
|
1627
1627
|
return n - c <= 1 ? r = "start" : u - n <= 1 && (r = "end"), {
|
|
1628
|
-
value:
|
|
1628
|
+
value: _e(e, t, s),
|
|
1629
1629
|
x: n,
|
|
1630
1630
|
anchor: r
|
|
1631
1631
|
};
|
|
1632
1632
|
});
|
|
1633
1633
|
});
|
|
1634
|
-
function
|
|
1634
|
+
function Ce() {
|
|
1635
1635
|
return typeof l.csv == "function" ? l.csv() : typeof l.csv == "string" ? l.csv : Be(D.value);
|
|
1636
1636
|
}
|
|
1637
|
-
let
|
|
1638
|
-
let e =
|
|
1637
|
+
let R = n(() => !!l.tooltipData || !!l.tooltipTrigger), Te = n(() => {
|
|
1638
|
+
let e = K.value, t = D.value[0];
|
|
1639
1639
|
return e === null || !t ? null : A(t, e);
|
|
1640
|
-
}),
|
|
1641
|
-
function
|
|
1640
|
+
}), Ee = n(() => Te.value === null ? 0 : M(Te.value));
|
|
1641
|
+
function De(e, t) {
|
|
1642
1642
|
let n = e.data.length;
|
|
1643
1643
|
if (n === 0) return null;
|
|
1644
1644
|
let r = 0, i = Infinity;
|
|
@@ -1650,30 +1650,30 @@ var Pt = {
|
|
|
1650
1650
|
}
|
|
1651
1651
|
return i === Infinity ? null : r;
|
|
1652
1652
|
}
|
|
1653
|
-
let
|
|
1654
|
-
let e =
|
|
1653
|
+
let Oe = n(() => {
|
|
1654
|
+
let e = Te.value;
|
|
1655
1655
|
if (e === null) return [];
|
|
1656
1656
|
let t = [];
|
|
1657
1657
|
for (let n of D.value) {
|
|
1658
1658
|
if (n.showInTooltip === !1) continue;
|
|
1659
|
-
let r =
|
|
1659
|
+
let r = De(n, e);
|
|
1660
1660
|
if (r === null) continue;
|
|
1661
1661
|
let i = n.data[r];
|
|
1662
1662
|
isFinite(i) && t.push({
|
|
1663
1663
|
x: M(A(n, r)),
|
|
1664
|
-
y:
|
|
1664
|
+
y: se(i),
|
|
1665
1665
|
color: n.color ?? "currentColor"
|
|
1666
1666
|
});
|
|
1667
1667
|
}
|
|
1668
1668
|
return t;
|
|
1669
|
-
}),
|
|
1670
|
-
let e =
|
|
1669
|
+
}), ke = n(() => {
|
|
1670
|
+
let e = K.value, t = Te.value;
|
|
1671
1671
|
if (e === null || t === null) return null;
|
|
1672
|
-
let n =
|
|
1672
|
+
let n = _e(t, e), r = D.value, i = [];
|
|
1673
1673
|
for (let e = 0; e < r.length; e++) {
|
|
1674
1674
|
let n = r[e];
|
|
1675
1675
|
if (n.showInTooltip === !1) continue;
|
|
1676
|
-
let a =
|
|
1676
|
+
let a = De(n, t);
|
|
1677
1677
|
i.push({
|
|
1678
1678
|
value: a === null ? NaN : Number(n.data[a]),
|
|
1679
1679
|
color: n.color ?? "currentColor",
|
|
@@ -1687,21 +1687,21 @@ var Pt = {
|
|
|
1687
1687
|
data: l.tooltipData?.[e] ?? null
|
|
1688
1688
|
};
|
|
1689
1689
|
});
|
|
1690
|
-
function
|
|
1690
|
+
function Ae(e, t) {
|
|
1691
1691
|
return !isFinite(e) || !isFinite(t) ? null : {
|
|
1692
1692
|
x: M(e - j.value),
|
|
1693
|
-
y:
|
|
1693
|
+
y: se(t)
|
|
1694
1694
|
};
|
|
1695
1695
|
}
|
|
1696
|
-
function
|
|
1697
|
-
let t =
|
|
1696
|
+
function B(e) {
|
|
1697
|
+
let t = je.value?.getBoundingClientRect();
|
|
1698
1698
|
if (!t) return null;
|
|
1699
1699
|
let n = D.value[0];
|
|
1700
1700
|
if (!n || n.data.length === 0) return null;
|
|
1701
1701
|
let { min: r, max: i } = ae.value, a = i - r || 1;
|
|
1702
|
-
return
|
|
1702
|
+
return De(n, r + (e - t.left - U.value.left) / W.value * a);
|
|
1703
1703
|
}
|
|
1704
|
-
let { containerRef:
|
|
1704
|
+
let { containerRef: je, svgRef: Me, width: V, height: H, padding: U, legendY: Ne, inlineLegendLayout: Pe, innerW: W, innerH: G, bounds: Fe, hoverIndex: K, tooltipRef: Ie, tooltipPos: Le, tooltipHandlers: Re, menuItems: q, downloadLinkText: J, csvHref: ze, menuFilename: Ve, isFullscreen: He } = ut({
|
|
1705
1705
|
width: () => l.width,
|
|
1706
1706
|
height: () => l.height,
|
|
1707
1707
|
title: () => l.title,
|
|
@@ -1715,17 +1715,17 @@ var Pt = {
|
|
|
1715
1715
|
filename: () => l.filename,
|
|
1716
1716
|
downloadLink: () => l.downloadLink,
|
|
1717
1717
|
chartPadding: () => l.chartPadding,
|
|
1718
|
-
inlineLegendLabels: () =>
|
|
1719
|
-
hasTooltipSlot: () =>
|
|
1720
|
-
getCsv:
|
|
1721
|
-
pointerToIndex:
|
|
1718
|
+
inlineLegendLabels: () => pe.value,
|
|
1719
|
+
hasTooltipSlot: () => R.value,
|
|
1720
|
+
getCsv: Ce,
|
|
1721
|
+
pointerToIndex: B,
|
|
1722
1722
|
onHover: (e) => h("hover", e),
|
|
1723
|
-
extraBelowHeight: () =>
|
|
1724
|
-
}), Ue = n(() => z(l.axisLabelStyle, { fontSize: 13 })),
|
|
1723
|
+
extraBelowHeight: () => fe.value.extraHeight
|
|
1724
|
+
}), Ue = n(() => z(l.axisLabelStyle, { fontSize: 13 })), Y = n(() => z(l.tickLabelStyle, {
|
|
1725
1725
|
fontSize: 10,
|
|
1726
|
-
fillOpacity:
|
|
1727
|
-
})),
|
|
1728
|
-
let e = l.titleStyle, t = e?.align ?? "left", n =
|
|
1726
|
+
fillOpacity: we
|
|
1727
|
+
})), We = n(() => z(l.legendStyle, { fontSize: 11 })), X = n(() => {
|
|
1728
|
+
let e = l.titleStyle, t = e?.align ?? "left", n = Fe.value, r = t === "left" ? n.left : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
|
|
1729
1729
|
return {
|
|
1730
1730
|
lines: (l.title ?? "").split("\n"),
|
|
1731
1731
|
fontSize: e?.fontSize ?? 14,
|
|
@@ -1735,9 +1735,9 @@ var Pt = {
|
|
|
1735
1735
|
x: r,
|
|
1736
1736
|
anchor: i
|
|
1737
1737
|
};
|
|
1738
|
-
}),
|
|
1738
|
+
}), Ge = n(() => {
|
|
1739
1739
|
let e = Pe.value.positions, t = U.value.left, n = Ne.value;
|
|
1740
|
-
return
|
|
1740
|
+
return P.value.map((r, i) => {
|
|
1741
1741
|
let a = e[i];
|
|
1742
1742
|
return {
|
|
1743
1743
|
...r,
|
|
@@ -1748,34 +1748,34 @@ var Pt = {
|
|
|
1748
1748
|
});
|
|
1749
1749
|
return (n, c) => (_(), a("div", {
|
|
1750
1750
|
ref_key: "containerRef",
|
|
1751
|
-
ref:
|
|
1751
|
+
ref: je,
|
|
1752
1752
|
class: f(["line-chart-wrapper", { "is-fullscreen": S(He) }])
|
|
1753
1753
|
}, [
|
|
1754
|
-
t.menu ? (_(), r(
|
|
1754
|
+
t.menu ? (_(), r(he, {
|
|
1755
1755
|
key: 0,
|
|
1756
|
-
items: S(
|
|
1756
|
+
items: S(q)
|
|
1757
1757
|
}, null, 8, ["items"])) : i("", !0),
|
|
1758
1758
|
o("div", Pt, b(S(He) ? "Chart expanded to fill window" : ""), 1),
|
|
1759
1759
|
(_(), a("svg", {
|
|
1760
1760
|
ref_key: "svgRef",
|
|
1761
|
-
ref:
|
|
1762
|
-
width: S(
|
|
1763
|
-
height:
|
|
1761
|
+
ref: Me,
|
|
1762
|
+
width: S(V),
|
|
1763
|
+
height: me.value
|
|
1764
1764
|
}, [
|
|
1765
1765
|
t.title ? (_(), a("text", {
|
|
1766
1766
|
key: 0,
|
|
1767
|
-
x:
|
|
1768
|
-
y:
|
|
1769
|
-
"text-anchor":
|
|
1770
|
-
"font-size":
|
|
1771
|
-
"font-weight":
|
|
1772
|
-
fill:
|
|
1773
|
-
}, [(_(!0), a(e, null, y(
|
|
1767
|
+
x: X.value.x,
|
|
1768
|
+
y: X.value.lineHeight,
|
|
1769
|
+
"text-anchor": X.value.anchor,
|
|
1770
|
+
"font-size": X.value.fontSize,
|
|
1771
|
+
"font-weight": X.value.fontWeight,
|
|
1772
|
+
fill: X.value.color
|
|
1773
|
+
}, [(_(!0), a(e, null, y(X.value.lines, (e, t) => (_(), a("tspan", {
|
|
1774
1774
|
key: t,
|
|
1775
|
-
x:
|
|
1776
|
-
dy: t === 0 ? 0 :
|
|
1775
|
+
x: X.value.x,
|
|
1776
|
+
dy: t === 0 ? 0 : X.value.lineHeight
|
|
1777
1777
|
}, b(e), 9, Lt))), 128))], 8, It)) : i("", !0),
|
|
1778
|
-
|
|
1778
|
+
Ge.value.length > 0 ? (_(), a("g", Rt, [(_(!0), a(e, null, y(Ge.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.type === "series" ? (_(), a("line", {
|
|
1779
1779
|
key: 0,
|
|
1780
1780
|
x1: t.x,
|
|
1781
1781
|
y1: t.y,
|
|
@@ -1796,27 +1796,27 @@ var Pt = {
|
|
|
1796
1796
|
}, null, 8, Bt)), o("text", {
|
|
1797
1797
|
x: t.x + 18,
|
|
1798
1798
|
y: t.y + 4,
|
|
1799
|
-
"font-size":
|
|
1800
|
-
fill:
|
|
1801
|
-
"font-weight":
|
|
1799
|
+
"font-size": We.value.fontSize,
|
|
1800
|
+
fill: We.value.fill,
|
|
1801
|
+
"font-weight": We.value.fontWeight
|
|
1802
1802
|
}, b(t.label), 9, Vt)], 64))), 128))])) : i("", !0),
|
|
1803
1803
|
o("line", {
|
|
1804
|
-
x1: S(
|
|
1805
|
-
y1: S(
|
|
1806
|
-
x2: S(
|
|
1807
|
-
y2: S(
|
|
1804
|
+
x1: S(I)(S(U).left),
|
|
1805
|
+
y1: S(I)(S(U).top),
|
|
1806
|
+
x2: S(I)(S(U).left),
|
|
1807
|
+
y2: S(I)(S(U).top + S(G)),
|
|
1808
1808
|
stroke: "currentColor",
|
|
1809
1809
|
"stroke-opacity": "0.3"
|
|
1810
1810
|
}, null, 8, Ht),
|
|
1811
1811
|
o("line", {
|
|
1812
|
-
x1: S(
|
|
1813
|
-
y1: S(
|
|
1814
|
-
x2: S(
|
|
1815
|
-
y2: S(
|
|
1812
|
+
x1: S(I)(S(U).left),
|
|
1813
|
+
y1: S(I)(S(U).top + S(G)),
|
|
1814
|
+
x2: S(I)(S(U).left + S(W)),
|
|
1815
|
+
y2: S(I)(S(U).top + S(G)),
|
|
1816
1816
|
stroke: "currentColor",
|
|
1817
1817
|
"stroke-opacity": "0.3"
|
|
1818
1818
|
}, null, 8, Ut),
|
|
1819
|
-
t.yGrid ? (_(!0), a(e, { key: 2 }, y(
|
|
1819
|
+
t.yGrid ? (_(!0), a(e, { key: 2 }, y(ge.value, (e, t) => (_(), a("line", {
|
|
1820
1820
|
key: "yg" + t,
|
|
1821
1821
|
x1: S(U).left,
|
|
1822
1822
|
y1: e.y,
|
|
@@ -1825,7 +1825,7 @@ var Pt = {
|
|
|
1825
1825
|
stroke: "currentColor",
|
|
1826
1826
|
"stroke-opacity": "0.1"
|
|
1827
1827
|
}, null, 8, Wt))), 128)) : i("", !0),
|
|
1828
|
-
t.xGrid ? (_(!0), a(e, { key: 3 }, y(
|
|
1828
|
+
t.xGrid ? (_(!0), a(e, { key: 3 }, y(ve.value, (e, t) => (_(), a("line", {
|
|
1829
1829
|
key: "xg" + t,
|
|
1830
1830
|
x1: e.x,
|
|
1831
1831
|
y1: S(U).top,
|
|
@@ -1834,17 +1834,17 @@ var Pt = {
|
|
|
1834
1834
|
stroke: "currentColor",
|
|
1835
1835
|
"stroke-opacity": "0.1"
|
|
1836
1836
|
}, null, 8, Gt))), 128)) : i("", !0),
|
|
1837
|
-
(_(!0), a(e, null, y(
|
|
1837
|
+
(_(!0), a(e, null, y(ge.value, (e, t) => (_(), a("text", {
|
|
1838
1838
|
key: "y" + t,
|
|
1839
1839
|
"data-testid": "y-tick",
|
|
1840
1840
|
x: S(U).left - 6,
|
|
1841
1841
|
y: e.y,
|
|
1842
1842
|
"text-anchor": "end",
|
|
1843
1843
|
"dominant-baseline": "middle",
|
|
1844
|
-
"font-size":
|
|
1845
|
-
fill:
|
|
1846
|
-
"font-weight":
|
|
1847
|
-
"fill-opacity":
|
|
1844
|
+
"font-size": Y.value.fontSize,
|
|
1845
|
+
fill: Y.value.fill,
|
|
1846
|
+
"font-weight": Y.value.fontWeight,
|
|
1847
|
+
"fill-opacity": Y.value.fillOpacity
|
|
1848
1848
|
}, b(e.value), 9, Kt))), 128)),
|
|
1849
1849
|
t.yLabel ? (_(), a("text", {
|
|
1850
1850
|
key: 4,
|
|
@@ -1856,21 +1856,21 @@ var Pt = {
|
|
|
1856
1856
|
fill: Ue.value.fill,
|
|
1857
1857
|
"font-weight": Ue.value.fontWeight
|
|
1858
1858
|
}, b(t.yLabel), 9, qt)) : i("", !0),
|
|
1859
|
-
(_(!0), a(e, null, y(
|
|
1859
|
+
(_(!0), a(e, null, y(ve.value, (e, t) => (_(), a("text", {
|
|
1860
1860
|
key: "x" + t,
|
|
1861
1861
|
"data-testid": "x-tick",
|
|
1862
1862
|
x: e.x,
|
|
1863
1863
|
y: S(U).top + S(G) + 16,
|
|
1864
1864
|
"text-anchor": e.anchor,
|
|
1865
|
-
"font-size":
|
|
1866
|
-
fill:
|
|
1867
|
-
"font-weight":
|
|
1868
|
-
"fill-opacity":
|
|
1865
|
+
"font-size": Y.value.fontSize,
|
|
1866
|
+
fill: Y.value.fill,
|
|
1867
|
+
"font-weight": Y.value.fontWeight,
|
|
1868
|
+
"fill-opacity": Y.value.fillOpacity
|
|
1869
1869
|
}, b(e.value), 9, Jt))), 128)),
|
|
1870
1870
|
t.xLabel ? (_(), a("text", {
|
|
1871
1871
|
key: 5,
|
|
1872
1872
|
x: S(U).left + S(W) / 2,
|
|
1873
|
-
y: S(
|
|
1873
|
+
y: S(H) - 4,
|
|
1874
1874
|
"text-anchor": "middle",
|
|
1875
1875
|
"font-size": Ue.value.fontSize,
|
|
1876
1876
|
fill: Ue.value.fill,
|
|
@@ -1878,7 +1878,7 @@ var Pt = {
|
|
|
1878
1878
|
}, b(t.xLabel), 9, Yt)) : i("", !0),
|
|
1879
1879
|
(_(!0), a(e, null, y(O.value, (e, t) => (_(), a("path", {
|
|
1880
1880
|
key: "area" + t,
|
|
1881
|
-
d:
|
|
1881
|
+
d: ue(e),
|
|
1882
1882
|
fill: e.color ?? "currentColor",
|
|
1883
1883
|
"fill-opacity": e.opacity ?? .2,
|
|
1884
1884
|
stroke: "none"
|
|
@@ -1886,7 +1886,7 @@ var Pt = {
|
|
|
1886
1886
|
(_(!0), a(e, null, y(D.value, (n, r) => (_(), a(e, { key: r }, [
|
|
1887
1887
|
n.line !== !1 && n.outline ? (_(), a("path", {
|
|
1888
1888
|
key: 0,
|
|
1889
|
-
d:
|
|
1889
|
+
d: ce(n),
|
|
1890
1890
|
fill: "none",
|
|
1891
1891
|
stroke: "var(--color-bg-0, #fff)",
|
|
1892
1892
|
"stroke-width": (n.strokeWidth ?? 1.5) + 4,
|
|
@@ -1896,84 +1896,86 @@ var Pt = {
|
|
|
1896
1896
|
}, null, 8, Zt)) : i("", !0),
|
|
1897
1897
|
n.line === !1 ? i("", !0) : (_(), a("path", {
|
|
1898
1898
|
key: 1,
|
|
1899
|
-
d:
|
|
1899
|
+
d: ce(n),
|
|
1900
1900
|
fill: "none",
|
|
1901
1901
|
stroke: n.color ?? "currentColor",
|
|
1902
1902
|
"stroke-width": n.strokeWidth ?? 1.5,
|
|
1903
1903
|
"stroke-opacity": n.lineOpacity ?? n.opacity ?? t.lineOpacity,
|
|
1904
|
-
"stroke-dasharray": n.dashed ? "6 3" : void 0
|
|
1905
|
-
|
|
1906
|
-
|
|
1904
|
+
"stroke-dasharray": n.dashed ? "6 3" : void 0,
|
|
1905
|
+
style: m(n.blendMode ? { mixBlendMode: n.blendMode } : void 0)
|
|
1906
|
+
}, null, 12, Qt)),
|
|
1907
|
+
n.dots ? (_(!0), a(e, { key: 2 }, y(le(n), (e, r) => (_(), a("circle", {
|
|
1907
1908
|
key: r,
|
|
1908
1909
|
cx: e.x,
|
|
1909
1910
|
cy: e.y,
|
|
1910
1911
|
r: n.dotRadius ?? (n.strokeWidth ?? 1.5) + 1,
|
|
1911
1912
|
fill: n.dotFill ?? n.color ?? "currentColor",
|
|
1912
1913
|
"fill-opacity": n.dotOpacity ?? n.opacity ?? t.lineOpacity,
|
|
1913
|
-
stroke: n.dotStroke ?? "none"
|
|
1914
|
-
|
|
1914
|
+
stroke: n.dotStroke ?? "none",
|
|
1915
|
+
style: m(n.blendMode ? { mixBlendMode: n.blendMode } : void 0)
|
|
1916
|
+
}, null, 12, $t))), 128)) : i("", !0)
|
|
1915
1917
|
], 64))), 128)),
|
|
1916
1918
|
(_(!0), a(e, null, y(t.areaSections ?? [], (t, n) => (_(), a(e, { key: "areasec" + n }, [
|
|
1917
1919
|
o("path", {
|
|
1918
|
-
d:
|
|
1920
|
+
d: de(t),
|
|
1919
1921
|
fill: t.color ?? (t.seriesIndex == null ? "#999" : D.value[t.seriesIndex]?.color ?? "currentColor"),
|
|
1920
1922
|
"fill-opacity": t.opacity ?? .15,
|
|
1921
1923
|
stroke: "none"
|
|
1922
1924
|
}, null, 8, en),
|
|
1923
1925
|
t.seriesIndex == null ? i("", !0) : (_(), a("path", {
|
|
1924
1926
|
key: 0,
|
|
1925
|
-
d:
|
|
1927
|
+
d: de(t, !1),
|
|
1926
1928
|
fill: "none",
|
|
1927
1929
|
stroke: t.color ?? D.value[t.seriesIndex]?.color ?? "currentColor",
|
|
1928
1930
|
"stroke-width": t.strokeWidth ?? 2,
|
|
1929
1931
|
"stroke-dasharray": t.dashed ? "6 3" : void 0
|
|
1930
1932
|
}, null, 8, tn)),
|
|
1931
1933
|
t.seriesIndex == null ? (_(), a(e, { key: 1 }, [o("line", {
|
|
1932
|
-
x1: S(
|
|
1934
|
+
x1: S(I)(N(t, "start")),
|
|
1933
1935
|
y1: S(U).top,
|
|
1934
|
-
x2: S(
|
|
1936
|
+
x2: S(I)(N(t, "start")),
|
|
1935
1937
|
y2: S(U).top + S(G),
|
|
1936
1938
|
stroke: t.color ?? "#999",
|
|
1937
1939
|
"stroke-width": t.strokeWidth ?? 2,
|
|
1938
1940
|
"stroke-dasharray": t.dashed ? "6 3" : void 0
|
|
1939
1941
|
}, null, 8, nn), o("line", {
|
|
1940
|
-
x1: S(
|
|
1942
|
+
x1: S(I)(N(t, "end")),
|
|
1941
1943
|
y1: S(U).top,
|
|
1942
|
-
x2: S(
|
|
1944
|
+
x2: S(I)(N(t, "end")),
|
|
1943
1945
|
y2: S(U).top + S(G),
|
|
1944
1946
|
stroke: t.color ?? "#999",
|
|
1945
1947
|
"stroke-width": t.strokeWidth ?? 2,
|
|
1946
1948
|
"stroke-dasharray": t.dashed ? "6 3" : void 0
|
|
1947
1949
|
}, null, 8, rn)], 64)) : i("", !0),
|
|
1948
1950
|
o("line", {
|
|
1949
|
-
x1: S(
|
|
1951
|
+
x1: S(I)(N(t, "start")),
|
|
1950
1952
|
y1: S(U).top + S(G) - 4,
|
|
1951
|
-
x2: S(
|
|
1953
|
+
x2: S(I)(N(t, "start")),
|
|
1952
1954
|
y2: S(U).top + S(G) + 4,
|
|
1953
1955
|
stroke: "currentColor",
|
|
1954
1956
|
"stroke-opacity": "0.4"
|
|
1955
1957
|
}, null, 8, an),
|
|
1956
1958
|
o("line", {
|
|
1957
|
-
x1: S(
|
|
1959
|
+
x1: S(I)(N(t, "end")),
|
|
1958
1960
|
y1: S(U).top + S(G) - 4,
|
|
1959
|
-
x2: S(
|
|
1961
|
+
x2: S(I)(N(t, "end")),
|
|
1960
1962
|
y2: S(U).top + S(G) + 4,
|
|
1961
1963
|
stroke: "currentColor",
|
|
1962
1964
|
"stroke-opacity": "0.4"
|
|
1963
1965
|
}, null, 8, on)
|
|
1964
1966
|
], 64))), 128)),
|
|
1965
|
-
|
|
1967
|
+
R.value && S(K) !== null ? (_(), a("line", {
|
|
1966
1968
|
key: 6,
|
|
1967
|
-
x1: S(
|
|
1969
|
+
x1: S(I)(Ee.value),
|
|
1968
1970
|
y1: S(U).top,
|
|
1969
|
-
x2: S(
|
|
1971
|
+
x2: S(I)(Ee.value),
|
|
1970
1972
|
y2: S(U).top + S(G),
|
|
1971
1973
|
stroke: "currentColor",
|
|
1972
1974
|
"stroke-opacity": "0.3",
|
|
1973
1975
|
"stroke-dasharray": "4 2",
|
|
1974
1976
|
"pointer-events": "none"
|
|
1975
1977
|
}, null, 8, sn)) : i("", !0),
|
|
1976
|
-
(_(!0), a(e, null, y(
|
|
1978
|
+
(_(!0), a(e, null, y(Oe.value, (e, t) => (_(), a("circle", {
|
|
1977
1979
|
key: "hd" + t,
|
|
1978
1980
|
cx: e.x,
|
|
1979
1981
|
cy: e.y,
|
|
@@ -1983,7 +1985,7 @@ var Pt = {
|
|
|
1983
1985
|
"stroke-width": "2",
|
|
1984
1986
|
"pointer-events": "none"
|
|
1985
1987
|
}, null, 8, cn))), 128)),
|
|
1986
|
-
|
|
1988
|
+
R.value ? (_(), a("rect", d({
|
|
1987
1989
|
key: 7,
|
|
1988
1990
|
x: S(U).left,
|
|
1989
1991
|
y: S(U).top,
|
|
@@ -1994,17 +1996,17 @@ var Pt = {
|
|
|
1994
1996
|
cursor: "crosshair",
|
|
1995
1997
|
"touch-action": "none"
|
|
1996
1998
|
}
|
|
1997
|
-
}, te(S(
|
|
1998
|
-
t.annotations && t.annotations.length > 0 ? (_(), r(S(
|
|
1999
|
+
}, te(S(Re), !0)), null, 16, ln)) : i("", !0),
|
|
2000
|
+
t.annotations && t.annotations.length > 0 ? (_(), r(S(st), {
|
|
1999
2001
|
key: 8,
|
|
2000
2002
|
annotations: t.annotations,
|
|
2001
|
-
project:
|
|
2002
|
-
bounds: S(
|
|
2003
|
+
project: Ae,
|
|
2004
|
+
bounds: S(Fe)
|
|
2003
2005
|
}, null, 8, ["annotations", "bounds"])) : i("", !0),
|
|
2004
|
-
(_(!0), a(e, null, y(
|
|
2006
|
+
(_(!0), a(e, null, y(fe.value.labels, (e, t) => (_(), a("g", { key: "seclab" + t }, [
|
|
2005
2007
|
o("circle", {
|
|
2006
2008
|
cx: e.cx - e.textWidth / 2 - 2,
|
|
2007
|
-
cy:
|
|
2009
|
+
cy: F.value + e.row * gn + 4,
|
|
2008
2010
|
r: "4",
|
|
2009
2011
|
fill: e.color,
|
|
2010
2012
|
"fill-opacity": e.fillOpacity,
|
|
@@ -2014,7 +2016,7 @@ var Pt = {
|
|
|
2014
2016
|
e.labelText ? (_(), a("text", {
|
|
2015
2017
|
key: 0,
|
|
2016
2018
|
x: e.cx - e.textWidth / 2 + 8,
|
|
2017
|
-
y:
|
|
2019
|
+
y: F.value + e.row * gn + 8,
|
|
2018
2020
|
"font-size": e.labelStyle.fontSize,
|
|
2019
2021
|
"font-weight": e.labelStyle.fontWeight,
|
|
2020
2022
|
fill: e.labelStyle.fill
|
|
@@ -2022,7 +2024,7 @@ var Pt = {
|
|
|
2022
2024
|
e.descText ? (_(), a("text", {
|
|
2023
2025
|
key: 1,
|
|
2024
2026
|
x: e.cx - e.textWidth / 2 + 8,
|
|
2025
|
-
y:
|
|
2027
|
+
y: F.value + e.row * gn + 22,
|
|
2026
2028
|
"font-size": e.descStyle.fontSize,
|
|
2027
2029
|
"font-weight": e.descStyle.fontWeight,
|
|
2028
2030
|
fill: e.descStyle.fill,
|
|
@@ -2030,35 +2032,35 @@ var Pt = {
|
|
|
2030
2032
|
}, b(e.descText), 9, fn)) : i("", !0)
|
|
2031
2033
|
]))), 128))
|
|
2032
2034
|
], 8, Ft)),
|
|
2033
|
-
|
|
2035
|
+
R.value && S(K) !== null && ke.value ? (_(), a("div", {
|
|
2034
2036
|
key: 1,
|
|
2035
2037
|
ref_key: "tooltipRef",
|
|
2036
|
-
ref:
|
|
2038
|
+
ref: Ie,
|
|
2037
2039
|
class: "chart-tooltip-content",
|
|
2038
2040
|
style: m({
|
|
2039
2041
|
position: "absolute",
|
|
2040
2042
|
top: "0",
|
|
2041
2043
|
left: "0",
|
|
2042
2044
|
willChange: "transform",
|
|
2043
|
-
transform: S(
|
|
2044
|
-
visibility: S(
|
|
2045
|
+
transform: S(Le) ? `translate3d(${S(Le).left}px, ${S(Le).top}px, 0) translateY(-50%)` : "translateY(-50%)",
|
|
2046
|
+
visibility: S(Le) ? "visible" : "hidden"
|
|
2045
2047
|
})
|
|
2046
|
-
}, [ee(n.$slots, "tooltip", p(u(
|
|
2048
|
+
}, [ee(n.$slots, "tooltip", p(u(ke.value)), () => [o("div", pn, [ke.value.xLabel ? (_(), a("div", mn, b(ke.value.xLabel), 1)) : i("", !0), (_(!0), a(e, null, y(ke.value.values, (e) => (_(), a("div", {
|
|
2047
2049
|
key: e.seriesIndex,
|
|
2048
2050
|
class: "line-chart-tooltip-row"
|
|
2049
2051
|
}, [o("span", {
|
|
2050
2052
|
class: "line-chart-tooltip-swatch",
|
|
2051
2053
|
style: m({ background: e.color })
|
|
2052
2054
|
}, null, 4), s(" " + b(isFinite(e.value) ? S(C)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
|
|
2053
|
-
S(
|
|
2055
|
+
S(J) ? (_(), a("a", {
|
|
2054
2056
|
key: 2,
|
|
2055
2057
|
class: "line-chart-download-link",
|
|
2056
2058
|
href: S(ze),
|
|
2057
2059
|
download: `${S(Ve)()}.csv`
|
|
2058
|
-
}, b(S(
|
|
2060
|
+
}, b(S(J)), 9, hn)) : i("", !0)
|
|
2059
2061
|
], 2));
|
|
2060
2062
|
}
|
|
2061
|
-
}), [["__scopeId", "data-v-
|
|
2063
|
+
}), [["__scopeId", "data-v-44660b21"]]), xn = {
|
|
2062
2064
|
class: "chart-sr-only",
|
|
2063
2065
|
"aria-live": "polite"
|
|
2064
2066
|
}, Sn = ["width", "height"], Cn = [
|
|
@@ -2073,51 +2075,58 @@ var Pt = {
|
|
|
2073
2075
|
"y",
|
|
2074
2076
|
"fill"
|
|
2075
2077
|
], Dn = [
|
|
2078
|
+
"x1",
|
|
2079
|
+
"y1",
|
|
2080
|
+
"x2",
|
|
2081
|
+
"y2",
|
|
2082
|
+
"stroke",
|
|
2083
|
+
"stroke-dasharray"
|
|
2084
|
+
], On = [
|
|
2076
2085
|
"x",
|
|
2077
2086
|
"y",
|
|
2078
2087
|
"font-size",
|
|
2079
2088
|
"fill",
|
|
2080
2089
|
"font-weight"
|
|
2081
|
-
],
|
|
2090
|
+
], kn = [
|
|
2082
2091
|
"x1",
|
|
2083
2092
|
"y1",
|
|
2084
2093
|
"x2",
|
|
2085
2094
|
"y2"
|
|
2086
|
-
],
|
|
2095
|
+
], An = [
|
|
2087
2096
|
"x1",
|
|
2088
2097
|
"y1",
|
|
2089
2098
|
"x2",
|
|
2090
2099
|
"y2"
|
|
2091
|
-
],
|
|
2100
|
+
], jn = [
|
|
2092
2101
|
"x1",
|
|
2093
2102
|
"y1",
|
|
2094
2103
|
"x2",
|
|
2095
2104
|
"y2"
|
|
2096
|
-
],
|
|
2105
|
+
], Mn = [
|
|
2097
2106
|
"x",
|
|
2098
2107
|
"y",
|
|
2099
2108
|
"width",
|
|
2100
2109
|
"height"
|
|
2101
|
-
],
|
|
2110
|
+
], Nn = [
|
|
2102
2111
|
"x",
|
|
2103
2112
|
"y",
|
|
2104
2113
|
"font-size",
|
|
2105
2114
|
"fill",
|
|
2106
2115
|
"font-weight",
|
|
2107
2116
|
"fill-opacity"
|
|
2108
|
-
],
|
|
2117
|
+
], Pn = [
|
|
2109
2118
|
"x",
|
|
2110
2119
|
"y",
|
|
2111
2120
|
"font-size",
|
|
2112
2121
|
"fill",
|
|
2113
2122
|
"font-weight",
|
|
2114
2123
|
"fill-opacity"
|
|
2115
|
-
],
|
|
2124
|
+
], Fn = [
|
|
2116
2125
|
"transform",
|
|
2117
2126
|
"font-size",
|
|
2118
2127
|
"fill",
|
|
2119
2128
|
"font-weight"
|
|
2120
|
-
],
|
|
2129
|
+
], In = [
|
|
2121
2130
|
"x",
|
|
2122
2131
|
"y",
|
|
2123
2132
|
"text-anchor",
|
|
@@ -2125,20 +2134,20 @@ var Pt = {
|
|
|
2125
2134
|
"fill",
|
|
2126
2135
|
"font-weight",
|
|
2127
2136
|
"fill-opacity"
|
|
2128
|
-
],
|
|
2137
|
+
], Ln = [
|
|
2129
2138
|
"x",
|
|
2130
2139
|
"y",
|
|
2131
2140
|
"font-size",
|
|
2132
2141
|
"fill",
|
|
2133
2142
|
"font-weight",
|
|
2134
2143
|
"fill-opacity"
|
|
2135
|
-
],
|
|
2144
|
+
], Rn = [
|
|
2136
2145
|
"x",
|
|
2137
2146
|
"y",
|
|
2138
2147
|
"font-size",
|
|
2139
2148
|
"fill",
|
|
2140
2149
|
"font-weight"
|
|
2141
|
-
],
|
|
2150
|
+
], zn = [
|
|
2142
2151
|
"data-category",
|
|
2143
2152
|
"data-series",
|
|
2144
2153
|
"x",
|
|
@@ -2147,20 +2156,33 @@ var Pt = {
|
|
|
2147
2156
|
"height",
|
|
2148
2157
|
"fill",
|
|
2149
2158
|
"fill-opacity"
|
|
2150
|
-
],
|
|
2159
|
+
], Bn = [
|
|
2160
|
+
"d",
|
|
2161
|
+
"stroke",
|
|
2162
|
+
"stroke-width",
|
|
2163
|
+
"stroke-opacity",
|
|
2164
|
+
"stroke-dasharray"
|
|
2165
|
+
], Vn = [
|
|
2166
|
+
"cx",
|
|
2167
|
+
"cy",
|
|
2168
|
+
"r",
|
|
2169
|
+
"fill",
|
|
2170
|
+
"fill-opacity"
|
|
2171
|
+
], Hn = [
|
|
2151
2172
|
"x",
|
|
2152
2173
|
"y",
|
|
2153
2174
|
"width",
|
|
2154
2175
|
"height"
|
|
2155
|
-
],
|
|
2176
|
+
], Un = { class: "bar-chart-tooltip" }, Wn = {
|
|
2156
2177
|
key: 0,
|
|
2157
2178
|
class: "bar-chart-tooltip-label"
|
|
2158
|
-
},
|
|
2179
|
+
}, Gn = ["href", "download"], Kn = /* @__PURE__ */ F(/* @__PURE__ */ l({
|
|
2159
2180
|
__name: "BarChart",
|
|
2160
2181
|
props: {
|
|
2161
2182
|
data: {},
|
|
2162
2183
|
y: {},
|
|
2163
2184
|
series: {},
|
|
2185
|
+
summaryLines: {},
|
|
2164
2186
|
categories: {},
|
|
2165
2187
|
orientation: { default: "vertical" },
|
|
2166
2188
|
layout: { default: "grouped" },
|
|
@@ -2208,6 +2230,7 @@ var Pt = {
|
|
|
2208
2230
|
data: e.y ?? e.data ?? g,
|
|
2209
2231
|
color: e.color,
|
|
2210
2232
|
opacity: e.opacity,
|
|
2233
|
+
blendMode: e.blendMode,
|
|
2211
2234
|
legend: e.legend,
|
|
2212
2235
|
showInLegend: e.showInLegend,
|
|
2213
2236
|
showInTooltip: e.showInTooltip
|
|
@@ -2256,7 +2279,7 @@ var Pt = {
|
|
|
2256
2279
|
isFinite(e) || (e = 0), isFinite(t) || (t = 0);
|
|
2257
2280
|
let i = l.valueMin ?? 0;
|
|
2258
2281
|
l.valueScaleType === "log" ? i > 0 && i < e && (e = i) : i < e && (e = i);
|
|
2259
|
-
let a =
|
|
2282
|
+
let a = Se(e, t, l.valueScaleType, n);
|
|
2260
2283
|
return {
|
|
2261
2284
|
min: a.min,
|
|
2262
2285
|
max: a.max,
|
|
@@ -2280,34 +2303,36 @@ var Pt = {
|
|
|
2280
2303
|
return M(Math.max(e, Math.min(t, n)));
|
|
2281
2304
|
});
|
|
2282
2305
|
function M(e) {
|
|
2283
|
-
let { min: t, max: n } = D.value, r =
|
|
2306
|
+
let { min: t, max: n } = D.value, r = xe(e, t, n, l.valueScaleType);
|
|
2284
2307
|
return E.value ? B.value.top + H.value - r * H.value : B.value.left + r * V.value;
|
|
2285
2308
|
}
|
|
2286
|
-
function oe(e, t, n, r, i, a, o, s, c) {
|
|
2287
|
-
let
|
|
2309
|
+
function oe(e, t, n, r, i, a, o, s, c, l) {
|
|
2310
|
+
let u = Math.min(e, t), d = Math.abs(e - t);
|
|
2288
2311
|
return E.value ? {
|
|
2289
2312
|
x: n,
|
|
2290
|
-
y:
|
|
2313
|
+
y: u,
|
|
2291
2314
|
w: r,
|
|
2292
|
-
h:
|
|
2315
|
+
h: d,
|
|
2293
2316
|
color: i,
|
|
2294
2317
|
opacity: a,
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2318
|
+
blendMode: o,
|
|
2319
|
+
value: s,
|
|
2320
|
+
categoryIndex: c,
|
|
2321
|
+
seriesIndex: l
|
|
2298
2322
|
} : {
|
|
2299
|
-
x:
|
|
2323
|
+
x: u,
|
|
2300
2324
|
y: n,
|
|
2301
|
-
w:
|
|
2325
|
+
w: d,
|
|
2302
2326
|
h: r,
|
|
2303
2327
|
color: i,
|
|
2304
2328
|
opacity: a,
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2329
|
+
blendMode: o,
|
|
2330
|
+
value: s,
|
|
2331
|
+
categoryIndex: c,
|
|
2332
|
+
seriesIndex: l
|
|
2308
2333
|
};
|
|
2309
2334
|
}
|
|
2310
|
-
let
|
|
2335
|
+
let se = n(() => {
|
|
2311
2336
|
let e = [], t = x.value, n = t.length;
|
|
2312
2337
|
if (n === 0) return e;
|
|
2313
2338
|
let r = C.value, i = k.value, a = A.value, o = ie.value, s = (i - a) / 2, c = ae.value;
|
|
@@ -2319,17 +2344,84 @@ var Pt = {
|
|
|
2319
2344
|
let n = t[c], l = Number(n.data[i] ?? NaN);
|
|
2320
2345
|
if (!isFinite(l)) continue;
|
|
2321
2346
|
let u = l >= 0 ? o : s, d = u + l;
|
|
2322
|
-
e.push(oe(M(u), M(d), r, a, n.color ??
|
|
2347
|
+
e.push(oe(M(u), M(d), r, a, n.color ?? pe(c), n.opacity ?? 1, n.blendMode, l, i, c)), l >= 0 ? o = d : s = d;
|
|
2323
2348
|
}
|
|
2324
|
-
} else for (let
|
|
2349
|
+
} else if (l.layout === "overlay") for (let o = 0; o < n; o++) {
|
|
2350
|
+
let n = t[o], s = Number(n.data[i] ?? NaN);
|
|
2351
|
+
isFinite(s) && e.push(oe(c, M(s), r, a, n.color ?? pe(o), n.opacity ?? 1, n.blendMode, s, i, o));
|
|
2352
|
+
}
|
|
2353
|
+
else for (let a = 0; a < n; a++) {
|
|
2325
2354
|
let s = t[a], u = Number(s.data[i] ?? NaN);
|
|
2326
2355
|
if (!isFinite(u)) continue;
|
|
2327
2356
|
let d = r + (n === 1 ? 0 : a * (o + l.groupGap));
|
|
2328
|
-
e.push(oe(c, M(u), d, o, s.color ??
|
|
2357
|
+
e.push(oe(c, M(u), d, o, s.color ?? pe(a), s.opacity ?? 1, s.blendMode, u, i, a));
|
|
2329
2358
|
}
|
|
2330
2359
|
}
|
|
2331
2360
|
return e;
|
|
2332
|
-
})
|
|
2361
|
+
});
|
|
2362
|
+
function ce(e) {
|
|
2363
|
+
let t = Infinity, n = -Infinity;
|
|
2364
|
+
for (let r of e.data) {
|
|
2365
|
+
let e = Number(r);
|
|
2366
|
+
isFinite(e) && (e < t && (t = e), e > n && (n = e));
|
|
2367
|
+
}
|
|
2368
|
+
return isFinite(t) || (t = 0, n = 1), e.valueMin === void 0 ? t > 0 && (t = 0) : t = e.valueMin, e.valueMax !== void 0 && (n = e.valueMax), t === n && (n = t + 1), {
|
|
2369
|
+
min: t,
|
|
2370
|
+
max: n
|
|
2371
|
+
};
|
|
2372
|
+
}
|
|
2373
|
+
function le(e, t, n) {
|
|
2374
|
+
let r = (E.value ? B.value.left : B.value.top) + (e + .5) * k.value, i = n.max - n.min || 1, a = (t - n.min) / i;
|
|
2375
|
+
return E.value ? {
|
|
2376
|
+
x: r,
|
|
2377
|
+
y: B.value.top + H.value - a * H.value
|
|
2378
|
+
} : {
|
|
2379
|
+
x: B.value.left + a * V.value,
|
|
2380
|
+
y: r
|
|
2381
|
+
};
|
|
2382
|
+
}
|
|
2383
|
+
let ue = n(() => {
|
|
2384
|
+
let e = l.summaryLines;
|
|
2385
|
+
return !e || e.length === 0 ? [] : e.map((e, t) => ({
|
|
2386
|
+
data: e.data ?? g,
|
|
2387
|
+
x: e.x,
|
|
2388
|
+
color: e.color ?? fe(t),
|
|
2389
|
+
strokeWidth: e.strokeWidth ?? 2,
|
|
2390
|
+
dashed: e.dashed ?? !1,
|
|
2391
|
+
opacity: e.opacity ?? 1,
|
|
2392
|
+
blendMode: e.blendMode,
|
|
2393
|
+
dots: e.dots ?? !1,
|
|
2394
|
+
dotRadius: e.dotRadius ?? (e.strokeWidth ?? 2) + 1,
|
|
2395
|
+
extent: ce(e),
|
|
2396
|
+
legend: e.legend,
|
|
2397
|
+
showInLegend: e.showInLegend !== !1
|
|
2398
|
+
}));
|
|
2399
|
+
}), N = n(() => k.value === 0 ? [] : ue.value.map((e) => {
|
|
2400
|
+
let t = [], n = "", r = !1;
|
|
2401
|
+
for (let i = 0; i < e.data.length; i++) {
|
|
2402
|
+
let a = Number(e.data[i]), o = e.x ? Number(e.x[i]) : i;
|
|
2403
|
+
if (!isFinite(a) || !isFinite(o)) {
|
|
2404
|
+
r = !1;
|
|
2405
|
+
continue;
|
|
2406
|
+
}
|
|
2407
|
+
let s = le(o, a, e.extent);
|
|
2408
|
+
t.push(s), n += r ? `L${s.x},${s.y}` : `M${s.x},${s.y}`, r = !0;
|
|
2409
|
+
}
|
|
2410
|
+
return {
|
|
2411
|
+
...e,
|
|
2412
|
+
pathD: n,
|
|
2413
|
+
points: t
|
|
2414
|
+
};
|
|
2415
|
+
})), de = [
|
|
2416
|
+
"var(--color-fg-1, #111)",
|
|
2417
|
+
"var(--color-danger, #ef4444)",
|
|
2418
|
+
"var(--color-success, #10b981)",
|
|
2419
|
+
"var(--color-info, #6366f1)"
|
|
2420
|
+
];
|
|
2421
|
+
function fe(e) {
|
|
2422
|
+
return de[e % de.length];
|
|
2423
|
+
}
|
|
2424
|
+
let P = [
|
|
2333
2425
|
"var(--color-primary, #3b82f6)",
|
|
2334
2426
|
"var(--color-accent, #f59e0b)",
|
|
2335
2427
|
"var(--color-success, #10b981)",
|
|
@@ -2337,30 +2429,30 @@ var Pt = {
|
|
|
2337
2429
|
"var(--color-info, #6366f1)",
|
|
2338
2430
|
"var(--color-warning, #d97706)"
|
|
2339
2431
|
];
|
|
2340
|
-
function
|
|
2341
|
-
return
|
|
2432
|
+
function pe(e) {
|
|
2433
|
+
return P[e % P.length];
|
|
2342
2434
|
}
|
|
2343
|
-
let
|
|
2344
|
-
let { min: e, max: t } = D.value, n = (e) => l.valueTickFormat === void 0 ?
|
|
2435
|
+
let me = dt(() => l.tooltipValueFormat, () => l.valueTickFormat), F = n(() => {
|
|
2436
|
+
let { min: e, max: t } = D.value, n = (e) => l.valueTickFormat === void 0 ? ye(e) : ne(e, l.valueTickFormat);
|
|
2345
2437
|
if (e === t) return [{
|
|
2346
2438
|
value: n(e),
|
|
2347
|
-
pos:
|
|
2439
|
+
pos: I(M(e))
|
|
2348
2440
|
}];
|
|
2349
2441
|
let r = E.value ? 50 : 80;
|
|
2350
|
-
return (l.valueScaleType === "log" ?
|
|
2442
|
+
return (l.valueScaleType === "log" ? L({
|
|
2351
2443
|
min: e,
|
|
2352
2444
|
max: t,
|
|
2353
2445
|
ticks: l.valueTicks
|
|
2354
|
-
}) :
|
|
2446
|
+
}) : be({
|
|
2355
2447
|
min: e,
|
|
2356
2448
|
max: t,
|
|
2357
2449
|
ticks: l.valueTicks,
|
|
2358
2450
|
targetTickCount: re.value / r
|
|
2359
2451
|
})).map((e) => ({
|
|
2360
2452
|
value: n(e),
|
|
2361
|
-
pos:
|
|
2453
|
+
pos: I(M(e))
|
|
2362
2454
|
}));
|
|
2363
|
-
}),
|
|
2455
|
+
}), ge = n(() => {
|
|
2364
2456
|
let e = C.value, t = T.value;
|
|
2365
2457
|
if (t && t.length > 0) {
|
|
2366
2458
|
let e = Infinity, n = -Infinity;
|
|
@@ -2396,16 +2488,24 @@ var Pt = {
|
|
|
2396
2488
|
});
|
|
2397
2489
|
}
|
|
2398
2490
|
return n;
|
|
2399
|
-
}),
|
|
2491
|
+
}), _e = n(() => {
|
|
2400
2492
|
let e = [];
|
|
2401
2493
|
return x.value.forEach((t, n) => {
|
|
2402
2494
|
!t.legend || t.showInLegend === !1 || e.push({
|
|
2403
2495
|
label: t.legend,
|
|
2404
|
-
color: t.color ??
|
|
2496
|
+
color: t.color ?? pe(n),
|
|
2497
|
+
kind: "bar"
|
|
2498
|
+
});
|
|
2499
|
+
}), ue.value.forEach((t) => {
|
|
2500
|
+
!t.legend || !t.showInLegend || e.push({
|
|
2501
|
+
label: t.legend,
|
|
2502
|
+
color: t.color,
|
|
2503
|
+
kind: "line",
|
|
2504
|
+
dashed: t.dashed
|
|
2405
2505
|
});
|
|
2406
2506
|
}), e;
|
|
2407
|
-
}),
|
|
2408
|
-
function
|
|
2507
|
+
}), ve = n(() => _e.value.map((e) => e.label));
|
|
2508
|
+
function Ce() {
|
|
2409
2509
|
if (typeof l.csv == "function") return l.csv();
|
|
2410
2510
|
if (typeof l.csv == "string") return l.csv;
|
|
2411
2511
|
let e = x.value.map((e) => ({
|
|
@@ -2414,8 +2514,8 @@ var Pt = {
|
|
|
2414
2514
|
}));
|
|
2415
2515
|
return Ve(w.value, e);
|
|
2416
2516
|
}
|
|
2417
|
-
let
|
|
2418
|
-
function
|
|
2517
|
+
let R = n(() => !!l.tooltipData || !!l.tooltipTrigger);
|
|
2518
|
+
function Te(e, t) {
|
|
2419
2519
|
if (!isFinite(e) || !isFinite(t) || k.value === 0) return null;
|
|
2420
2520
|
let n = (E.value ? B.value.left : B.value.top) + (e + .5) * k.value, r = M(t);
|
|
2421
2521
|
return E.value ? {
|
|
@@ -2426,15 +2526,15 @@ var Pt = {
|
|
|
2426
2526
|
y: n
|
|
2427
2527
|
};
|
|
2428
2528
|
}
|
|
2429
|
-
function
|
|
2430
|
-
let n =
|
|
2529
|
+
function Ee(e, t) {
|
|
2530
|
+
let n = De.value?.getBoundingClientRect();
|
|
2431
2531
|
if (!n) return null;
|
|
2432
2532
|
let r = C.value;
|
|
2433
2533
|
if (r === 0 || k.value === 0) return null;
|
|
2434
2534
|
let i = E.value ? e - n.left - B.value.left : t - n.top - B.value.top;
|
|
2435
2535
|
return Math.max(0, Math.min(r - 1, Math.floor(i / k.value)));
|
|
2436
2536
|
}
|
|
2437
|
-
let { containerRef:
|
|
2537
|
+
let { containerRef: De, svgRef: Oe, width: ke, height: Ae, padding: B, legendY: je, inlineLegendLayout: Me, innerW: V, innerH: H, bounds: U, hoverIndex: Ne, tooltipRef: Pe, tooltipPos: W, tooltipHandlers: G, menuItems: Fe, downloadLinkText: K, csvHref: Ie, menuFilename: Le, isFullscreen: Re } = ut({
|
|
2438
2538
|
width: () => l.width,
|
|
2439
2539
|
height: () => l.height,
|
|
2440
2540
|
title: () => l.title,
|
|
@@ -2448,16 +2548,16 @@ var Pt = {
|
|
|
2448
2548
|
filename: () => l.filename,
|
|
2449
2549
|
downloadLink: () => l.downloadLink,
|
|
2450
2550
|
chartPadding: () => l.chartPadding,
|
|
2451
|
-
inlineLegendLabels: () =>
|
|
2452
|
-
hasTooltipSlot: () =>
|
|
2453
|
-
getCsv:
|
|
2454
|
-
pointerToIndex:
|
|
2551
|
+
inlineLegendLabels: () => ve.value,
|
|
2552
|
+
hasTooltipSlot: () => R.value,
|
|
2553
|
+
getCsv: Ce,
|
|
2554
|
+
pointerToIndex: Ee,
|
|
2455
2555
|
onHover: (e) => h("hover", e)
|
|
2456
|
-
}),
|
|
2556
|
+
}), q = n(() => z(l.axisLabelStyle, { fontSize: 13 })), J = n(() => z(l.tickLabelStyle, {
|
|
2457
2557
|
fontSize: 10,
|
|
2458
|
-
fillOpacity:
|
|
2459
|
-
})),
|
|
2460
|
-
let e = l.titleStyle, t = e?.align ?? "left", n =
|
|
2558
|
+
fillOpacity: we
|
|
2559
|
+
})), ze = n(() => z(l.legendStyle, { fontSize: 11 })), Be = n(() => {
|
|
2560
|
+
let e = l.titleStyle, t = e?.align ?? "left", n = U.value, r = t === "left" ? n.left : t === "right" ? n.right : n.left + n.width / 2, i = t === "left" ? "start" : t === "right" ? "end" : "middle";
|
|
2461
2561
|
return {
|
|
2462
2562
|
lines: (l.title ?? "").split("\n"),
|
|
2463
2563
|
fontSize: e?.fontSize ?? 14,
|
|
@@ -2467,20 +2567,20 @@ var Pt = {
|
|
|
2467
2567
|
x: r,
|
|
2468
2568
|
anchor: i
|
|
2469
2569
|
};
|
|
2470
|
-
}),
|
|
2471
|
-
let e =
|
|
2570
|
+
}), He = n(() => {
|
|
2571
|
+
let e = Ne.value;
|
|
2472
2572
|
if (e === null) return;
|
|
2473
2573
|
let t = T.value;
|
|
2474
2574
|
return t && Number.isFinite(t[e]) ? Nt(t[e], l.dateFormat, "utc") : w.value[e];
|
|
2475
|
-
}),
|
|
2476
|
-
let e =
|
|
2575
|
+
}), Ue = n(() => {
|
|
2576
|
+
let e = Ne.value;
|
|
2477
2577
|
if (e === null) return null;
|
|
2478
2578
|
let t = x.value, n = [];
|
|
2479
2579
|
for (let r = 0; r < t.length; r++) {
|
|
2480
2580
|
let i = t[r];
|
|
2481
2581
|
i.showInTooltip !== !1 && n.push({
|
|
2482
2582
|
value: Number(i.data[e] ?? NaN),
|
|
2483
|
-
color: i.color ??
|
|
2583
|
+
color: i.color ?? pe(r),
|
|
2484
2584
|
seriesIndex: r
|
|
2485
2585
|
});
|
|
2486
2586
|
}
|
|
@@ -2490,8 +2590,8 @@ var Pt = {
|
|
|
2490
2590
|
values: n,
|
|
2491
2591
|
data: l.tooltipData?.[e] ?? null
|
|
2492
2592
|
};
|
|
2493
|
-
}),
|
|
2494
|
-
let e =
|
|
2593
|
+
}), Y = n(() => {
|
|
2594
|
+
let e = Ne.value;
|
|
2495
2595
|
if (e === null) return null;
|
|
2496
2596
|
let t = j(e);
|
|
2497
2597
|
return E.value ? {
|
|
@@ -2505,9 +2605,9 @@ var Pt = {
|
|
|
2505
2605
|
w: V.value,
|
|
2506
2606
|
h: k.value
|
|
2507
2607
|
};
|
|
2508
|
-
}),
|
|
2509
|
-
let e =
|
|
2510
|
-
return
|
|
2608
|
+
}), We = n(() => {
|
|
2609
|
+
let e = Me.value.positions, t = B.value.left, n = je.value;
|
|
2610
|
+
return _e.value.map((r, i) => {
|
|
2511
2611
|
let a = e[i];
|
|
2512
2612
|
return {
|
|
2513
2613
|
...r,
|
|
@@ -2518,63 +2618,73 @@ var Pt = {
|
|
|
2518
2618
|
});
|
|
2519
2619
|
return (n, c) => (_(), a("div", {
|
|
2520
2620
|
ref_key: "containerRef",
|
|
2521
|
-
ref:
|
|
2522
|
-
class: f(["bar-chart-wrapper", { "is-fullscreen": S(
|
|
2621
|
+
ref: De,
|
|
2622
|
+
class: f(["bar-chart-wrapper", { "is-fullscreen": S(Re) }])
|
|
2523
2623
|
}, [
|
|
2524
|
-
t.menu ? (_(), r(
|
|
2624
|
+
t.menu ? (_(), r(he, {
|
|
2525
2625
|
key: 0,
|
|
2526
|
-
items: S(
|
|
2626
|
+
items: S(Fe)
|
|
2527
2627
|
}, null, 8, ["items"])) : i("", !0),
|
|
2528
|
-
o("div", xn, b(S(
|
|
2628
|
+
o("div", xn, b(S(Re) ? "Chart expanded to fill window" : ""), 1),
|
|
2529
2629
|
(_(), a("svg", {
|
|
2530
2630
|
ref_key: "svgRef",
|
|
2531
|
-
ref:
|
|
2532
|
-
width: S(
|
|
2533
|
-
height: S(
|
|
2631
|
+
ref: Oe,
|
|
2632
|
+
width: S(ke),
|
|
2633
|
+
height: S(Ae)
|
|
2534
2634
|
}, [
|
|
2535
2635
|
t.title ? (_(), a("text", {
|
|
2536
2636
|
key: 0,
|
|
2537
|
-
x:
|
|
2538
|
-
y:
|
|
2539
|
-
"text-anchor":
|
|
2540
|
-
"font-size":
|
|
2541
|
-
"font-weight":
|
|
2542
|
-
fill:
|
|
2543
|
-
}, [(_(!0), a(e, null, y(
|
|
2637
|
+
x: Be.value.x,
|
|
2638
|
+
y: Be.value.lineHeight,
|
|
2639
|
+
"text-anchor": Be.value.anchor,
|
|
2640
|
+
"font-size": Be.value.fontSize,
|
|
2641
|
+
"font-weight": Be.value.fontWeight,
|
|
2642
|
+
fill: Be.value.color
|
|
2643
|
+
}, [(_(!0), a(e, null, y(Be.value.lines, (e, t) => (_(), a("tspan", {
|
|
2544
2644
|
key: t,
|
|
2545
|
-
x:
|
|
2546
|
-
dy: t === 0 ? 0 :
|
|
2645
|
+
x: Be.value.x,
|
|
2646
|
+
dy: t === 0 ? 0 : Be.value.lineHeight
|
|
2547
2647
|
}, b(e), 9, wn))), 128))], 8, Cn)) : i("", !0),
|
|
2548
|
-
|
|
2648
|
+
We.value.length > 0 ? (_(), a("g", Tn, [(_(!0), a(e, null, y(We.value, (t, n) => (_(), a(e, { key: "ileg" + n }, [t.kind === "bar" ? (_(), a("rect", {
|
|
2649
|
+
key: 0,
|
|
2549
2650
|
x: t.x,
|
|
2550
2651
|
y: t.y - 5,
|
|
2551
2652
|
width: "12",
|
|
2552
2653
|
height: "10",
|
|
2553
2654
|
fill: t.color
|
|
2554
|
-
}, null, 8, En),
|
|
2655
|
+
}, null, 8, En)) : (_(), a("line", {
|
|
2656
|
+
key: 1,
|
|
2657
|
+
x1: t.x,
|
|
2658
|
+
y1: t.y,
|
|
2659
|
+
x2: t.x + 12,
|
|
2660
|
+
y2: t.y,
|
|
2661
|
+
stroke: t.color,
|
|
2662
|
+
"stroke-width": "2",
|
|
2663
|
+
"stroke-dasharray": t.dashed ? "4 2" : void 0
|
|
2664
|
+
}, null, 8, Dn)), o("text", {
|
|
2555
2665
|
x: t.x + 18,
|
|
2556
2666
|
y: t.y + 4,
|
|
2557
|
-
"font-size":
|
|
2558
|
-
fill:
|
|
2559
|
-
"font-weight":
|
|
2560
|
-
}, b(t.label), 9,
|
|
2667
|
+
"font-size": ze.value.fontSize,
|
|
2668
|
+
fill: ze.value.fill,
|
|
2669
|
+
"font-weight": ze.value.fontWeight
|
|
2670
|
+
}, b(t.label), 9, On)], 64))), 128))])) : i("", !0),
|
|
2561
2671
|
o("line", {
|
|
2562
|
-
x1: S(
|
|
2563
|
-
y1: S(
|
|
2564
|
-
x2: S(
|
|
2565
|
-
y2: S(
|
|
2672
|
+
x1: S(I)(S(B).left),
|
|
2673
|
+
y1: S(I)(S(B).top),
|
|
2674
|
+
x2: S(I)(S(B).left),
|
|
2675
|
+
y2: S(I)(S(B).top + S(H)),
|
|
2566
2676
|
stroke: "currentColor",
|
|
2567
2677
|
"stroke-opacity": "0.3"
|
|
2568
|
-
}, null, 8,
|
|
2678
|
+
}, null, 8, kn),
|
|
2569
2679
|
o("line", {
|
|
2570
|
-
x1: S(
|
|
2571
|
-
y1: S(
|
|
2572
|
-
x2: S(
|
|
2573
|
-
y2: S(
|
|
2680
|
+
x1: S(I)(S(B).left),
|
|
2681
|
+
y1: S(I)(S(B).top + S(H)),
|
|
2682
|
+
x2: S(I)(S(B).left + S(V)),
|
|
2683
|
+
y2: S(I)(S(B).top + S(H)),
|
|
2574
2684
|
stroke: "currentColor",
|
|
2575
2685
|
"stroke-opacity": "0.3"
|
|
2576
|
-
}, null, 8,
|
|
2577
|
-
t.valueGrid ? (_(!0), a(e, { key: 2 }, y(
|
|
2686
|
+
}, null, 8, An),
|
|
2687
|
+
t.valueGrid ? (_(!0), a(e, { key: 2 }, y(F.value, (e, t) => (_(), a("line", {
|
|
2578
2688
|
key: "vg" + t,
|
|
2579
2689
|
x1: E.value ? S(B).left : e.pos,
|
|
2580
2690
|
y1: E.value ? e.pos : S(B).top,
|
|
@@ -2582,81 +2692,81 @@ var Pt = {
|
|
|
2582
2692
|
y2: E.value ? e.pos : S(B).top + S(H),
|
|
2583
2693
|
stroke: "currentColor",
|
|
2584
2694
|
"stroke-opacity": "0.1"
|
|
2585
|
-
}, null, 8,
|
|
2586
|
-
|
|
2695
|
+
}, null, 8, jn))), 128)) : i("", !0),
|
|
2696
|
+
Y.value && R.value ? (_(), a("rect", {
|
|
2587
2697
|
key: 3,
|
|
2588
|
-
x:
|
|
2589
|
-
y:
|
|
2590
|
-
width:
|
|
2591
|
-
height:
|
|
2698
|
+
x: Y.value.x,
|
|
2699
|
+
y: Y.value.y,
|
|
2700
|
+
width: Y.value.w,
|
|
2701
|
+
height: Y.value.h,
|
|
2592
2702
|
fill: "currentColor",
|
|
2593
2703
|
"fill-opacity": "0.06",
|
|
2594
2704
|
"pointer-events": "none"
|
|
2595
|
-
}, null, 8,
|
|
2596
|
-
E.value ? (_(!0), a(e, { key: 4 }, y(
|
|
2705
|
+
}, null, 8, Mn)) : i("", !0),
|
|
2706
|
+
E.value ? (_(!0), a(e, { key: 4 }, y(F.value, (e, t) => (_(), a("text", {
|
|
2597
2707
|
key: "vt" + t,
|
|
2598
2708
|
"data-testid": "value-tick",
|
|
2599
2709
|
x: S(B).left - 6,
|
|
2600
2710
|
y: e.pos,
|
|
2601
2711
|
"text-anchor": "end",
|
|
2602
2712
|
"dominant-baseline": "middle",
|
|
2603
|
-
"font-size":
|
|
2604
|
-
fill:
|
|
2605
|
-
"font-weight":
|
|
2606
|
-
"fill-opacity":
|
|
2607
|
-
}, b(e.value), 9,
|
|
2713
|
+
"font-size": J.value.fontSize,
|
|
2714
|
+
fill: J.value.fill,
|
|
2715
|
+
"font-weight": J.value.fontWeight,
|
|
2716
|
+
"fill-opacity": J.value.fillOpacity
|
|
2717
|
+
}, b(e.value), 9, Nn))), 128)) : (_(!0), a(e, { key: 5 }, y(F.value, (e, t) => (_(), a("text", {
|
|
2608
2718
|
key: "vt" + t,
|
|
2609
2719
|
"data-testid": "value-tick",
|
|
2610
2720
|
x: e.pos,
|
|
2611
2721
|
y: S(B).top + S(H) + 16,
|
|
2612
2722
|
"text-anchor": "middle",
|
|
2613
|
-
"font-size":
|
|
2614
|
-
fill:
|
|
2615
|
-
"font-weight":
|
|
2616
|
-
"fill-opacity":
|
|
2617
|
-
}, b(e.value), 9,
|
|
2723
|
+
"font-size": J.value.fontSize,
|
|
2724
|
+
fill: J.value.fill,
|
|
2725
|
+
"font-weight": J.value.fontWeight,
|
|
2726
|
+
"fill-opacity": J.value.fillOpacity
|
|
2727
|
+
}, b(e.value), 9, Pn))), 128)),
|
|
2618
2728
|
t.yLabel ? (_(), a("text", {
|
|
2619
2729
|
key: 6,
|
|
2620
2730
|
x: 0,
|
|
2621
2731
|
y: 0,
|
|
2622
2732
|
transform: `translate(14, ${S(B).top + S(H) / 2}) rotate(-90)`,
|
|
2623
2733
|
"text-anchor": "middle",
|
|
2624
|
-
"font-size":
|
|
2625
|
-
fill:
|
|
2626
|
-
"font-weight":
|
|
2627
|
-
}, b(t.yLabel), 9,
|
|
2628
|
-
E.value ? (_(!0), a(e, { key: 7 }, y(
|
|
2734
|
+
"font-size": q.value.fontSize,
|
|
2735
|
+
fill: q.value.fill,
|
|
2736
|
+
"font-weight": q.value.fontWeight
|
|
2737
|
+
}, b(t.yLabel), 9, Fn)) : i("", !0),
|
|
2738
|
+
E.value ? (_(!0), a(e, { key: 7 }, y(ge.value, (e, t) => (_(), a("text", {
|
|
2629
2739
|
key: "ct" + t,
|
|
2630
2740
|
"data-testid": "category-tick",
|
|
2631
2741
|
x: e.pos,
|
|
2632
2742
|
y: S(B).top + S(H) + 16,
|
|
2633
2743
|
"text-anchor": e.anchor,
|
|
2634
|
-
"font-size":
|
|
2635
|
-
fill:
|
|
2636
|
-
"font-weight":
|
|
2637
|
-
"fill-opacity":
|
|
2638
|
-
}, b(e.label), 9,
|
|
2744
|
+
"font-size": J.value.fontSize,
|
|
2745
|
+
fill: J.value.fill,
|
|
2746
|
+
"font-weight": J.value.fontWeight,
|
|
2747
|
+
"fill-opacity": J.value.fillOpacity
|
|
2748
|
+
}, b(e.label), 9, In))), 128)) : (_(!0), a(e, { key: 8 }, y(ge.value, (e, t) => (_(), a("text", {
|
|
2639
2749
|
key: "ct" + t,
|
|
2640
2750
|
"data-testid": "category-tick",
|
|
2641
2751
|
x: S(B).left - 6,
|
|
2642
2752
|
y: e.pos,
|
|
2643
2753
|
"text-anchor": "end",
|
|
2644
2754
|
"dominant-baseline": "middle",
|
|
2645
|
-
"font-size":
|
|
2646
|
-
fill:
|
|
2647
|
-
"font-weight":
|
|
2648
|
-
"fill-opacity":
|
|
2649
|
-
}, b(e.label), 9,
|
|
2755
|
+
"font-size": J.value.fontSize,
|
|
2756
|
+
fill: J.value.fill,
|
|
2757
|
+
"font-weight": J.value.fontWeight,
|
|
2758
|
+
"fill-opacity": J.value.fillOpacity
|
|
2759
|
+
}, b(e.label), 9, Ln))), 128)),
|
|
2650
2760
|
t.xLabel ? (_(), a("text", {
|
|
2651
2761
|
key: 9,
|
|
2652
2762
|
x: S(B).left + S(V) / 2,
|
|
2653
|
-
y: S(
|
|
2763
|
+
y: S(Ae) - 4,
|
|
2654
2764
|
"text-anchor": "middle",
|
|
2655
|
-
"font-size":
|
|
2656
|
-
fill:
|
|
2657
|
-
"font-weight":
|
|
2658
|
-
}, b(t.xLabel), 9,
|
|
2659
|
-
(_(!0), a(e, null, y(
|
|
2765
|
+
"font-size": q.value.fontSize,
|
|
2766
|
+
fill: q.value.fill,
|
|
2767
|
+
"font-weight": q.value.fontWeight
|
|
2768
|
+
}, b(t.xLabel), 9, Rn)) : i("", !0),
|
|
2769
|
+
(_(!0), a(e, null, y(se.value, (e, t) => (_(), a("rect", {
|
|
2660
2770
|
key: "bar" + t,
|
|
2661
2771
|
"data-testid": "bar",
|
|
2662
2772
|
"data-category": e.categoryIndex,
|
|
@@ -2666,9 +2776,31 @@ var Pt = {
|
|
|
2666
2776
|
width: e.w,
|
|
2667
2777
|
height: e.h,
|
|
2668
2778
|
fill: e.color,
|
|
2669
|
-
"fill-opacity": e.opacity
|
|
2670
|
-
|
|
2671
|
-
|
|
2779
|
+
"fill-opacity": e.opacity,
|
|
2780
|
+
style: m(e.blendMode ? { mixBlendMode: e.blendMode } : void 0)
|
|
2781
|
+
}, null, 12, zn))), 128)),
|
|
2782
|
+
(_(!0), a(e, null, y(N.value, (t, n) => (_(), a(e, { key: "sl" + n }, [t.pathD ? (_(), a("path", {
|
|
2783
|
+
key: 0,
|
|
2784
|
+
"data-testid": "summary-line",
|
|
2785
|
+
d: t.pathD,
|
|
2786
|
+
fill: "none",
|
|
2787
|
+
stroke: t.color,
|
|
2788
|
+
"stroke-width": t.strokeWidth,
|
|
2789
|
+
"stroke-opacity": t.opacity,
|
|
2790
|
+
"stroke-dasharray": t.dashed ? "6 3" : void 0,
|
|
2791
|
+
"stroke-linecap": "round",
|
|
2792
|
+
"stroke-linejoin": "round",
|
|
2793
|
+
style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
|
|
2794
|
+
}, null, 12, Bn)) : i("", !0), t.dots ? (_(!0), a(e, { key: 1 }, y(t.points, (e, r) => (_(), a("circle", {
|
|
2795
|
+
key: "sld" + n + "-" + r,
|
|
2796
|
+
cx: e.x,
|
|
2797
|
+
cy: e.y,
|
|
2798
|
+
r: t.dotRadius,
|
|
2799
|
+
fill: t.color,
|
|
2800
|
+
"fill-opacity": t.opacity,
|
|
2801
|
+
style: m(t.blendMode ? { mixBlendMode: t.blendMode } : void 0)
|
|
2802
|
+
}, null, 12, Vn))), 128)) : i("", !0)], 64))), 128)),
|
|
2803
|
+
R.value ? (_(), a("rect", d({
|
|
2672
2804
|
key: 10,
|
|
2673
2805
|
x: S(B).left,
|
|
2674
2806
|
y: S(B).top,
|
|
@@ -2679,43 +2811,43 @@ var Pt = {
|
|
|
2679
2811
|
cursor: "crosshair",
|
|
2680
2812
|
"touch-action": "none"
|
|
2681
2813
|
}
|
|
2682
|
-
}, te(S(
|
|
2683
|
-
t.annotations && t.annotations.length > 0 ? (_(), r(S(
|
|
2814
|
+
}, te(S(G), !0)), null, 16, Hn)) : i("", !0),
|
|
2815
|
+
t.annotations && t.annotations.length > 0 ? (_(), r(S(st), {
|
|
2684
2816
|
key: 11,
|
|
2685
2817
|
annotations: t.annotations,
|
|
2686
|
-
project:
|
|
2687
|
-
bounds: S(
|
|
2818
|
+
project: Te,
|
|
2819
|
+
bounds: S(U)
|
|
2688
2820
|
}, null, 8, ["annotations", "bounds"])) : i("", !0)
|
|
2689
2821
|
], 8, Sn)),
|
|
2690
|
-
|
|
2822
|
+
R.value && S(Ne) !== null && Ue.value ? (_(), a("div", {
|
|
2691
2823
|
key: 1,
|
|
2692
2824
|
ref_key: "tooltipRef",
|
|
2693
|
-
ref:
|
|
2825
|
+
ref: Pe,
|
|
2694
2826
|
class: "chart-tooltip-content",
|
|
2695
2827
|
style: m({
|
|
2696
2828
|
position: "absolute",
|
|
2697
2829
|
top: "0",
|
|
2698
2830
|
left: "0",
|
|
2699
2831
|
willChange: "transform",
|
|
2700
|
-
transform: S(
|
|
2701
|
-
visibility: S(
|
|
2832
|
+
transform: S(W) ? `translate3d(${S(W).left}px, ${S(W).top}px, 0) translateY(-50%)` : "translateY(-50%)",
|
|
2833
|
+
visibility: S(W) ? "visible" : "hidden"
|
|
2702
2834
|
})
|
|
2703
|
-
}, [ee(n.$slots, "tooltip", p(u(
|
|
2835
|
+
}, [ee(n.$slots, "tooltip", p(u(Ue.value)), () => [o("div", Un, [He.value ? (_(), a("div", Wn, b(He.value), 1)) : i("", !0), (_(!0), a(e, null, y(Ue.value.values, (e) => (_(), a("div", {
|
|
2704
2836
|
key: e.seriesIndex,
|
|
2705
2837
|
class: "bar-chart-tooltip-row"
|
|
2706
2838
|
}, [o("span", {
|
|
2707
2839
|
class: "bar-chart-tooltip-swatch",
|
|
2708
2840
|
style: m({ background: e.color })
|
|
2709
|
-
}, null, 4), s(" " + b(isFinite(e.value) ? S(
|
|
2710
|
-
S(
|
|
2841
|
+
}, null, 4), s(" " + b(isFinite(e.value) ? S(me)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
|
|
2842
|
+
S(K) ? (_(), a("a", {
|
|
2711
2843
|
key: 2,
|
|
2712
2844
|
class: "bar-chart-download-link",
|
|
2713
|
-
href: S(
|
|
2714
|
-
download: `${S(
|
|
2715
|
-
}, b(S(
|
|
2845
|
+
href: S(Ie),
|
|
2846
|
+
download: `${S(Le)()}.csv`
|
|
2847
|
+
}, b(S(K)), 9, Gn)) : i("", !0)
|
|
2716
2848
|
], 2));
|
|
2717
2849
|
}
|
|
2718
|
-
}), [["__scopeId", "data-v-
|
|
2850
|
+
}), [["__scopeId", "data-v-7b9c52ab"]]), qn = {
|
|
2719
2851
|
ref: "root",
|
|
2720
2852
|
class: "chart-tooltip-content",
|
|
2721
2853
|
style: {
|
|
@@ -2727,7 +2859,7 @@ var Pt = {
|
|
|
2727
2859
|
"pointer-events": "none",
|
|
2728
2860
|
transform: "translateY(-50%)"
|
|
2729
2861
|
}
|
|
2730
|
-
},
|
|
2862
|
+
}, Jn = /* @__PURE__ */ l({
|
|
2731
2863
|
__name: "ChoroplethTooltip",
|
|
2732
2864
|
setup(e, { expose: n }) {
|
|
2733
2865
|
let a = v(null), s = w("root");
|
|
@@ -2738,21 +2870,21 @@ var Pt = {
|
|
|
2738
2870
|
getEl() {
|
|
2739
2871
|
return s.value;
|
|
2740
2872
|
}
|
|
2741
|
-
}), (e, n) => (_(), r(t, { to: "body" }, [o("div",
|
|
2873
|
+
}), (e, n) => (_(), r(t, { to: "body" }, [o("div", qn, [a.value ? ee(e.$slots, "default", p(d({ key: 0 }, a.value))) : i("", !0)], 512)]));
|
|
2742
2874
|
}
|
|
2743
|
-
}),
|
|
2875
|
+
}), Yn = {
|
|
2744
2876
|
class: "chart-sr-only",
|
|
2745
2877
|
"aria-live": "polite"
|
|
2746
|
-
},
|
|
2878
|
+
}, Xn = {
|
|
2747
2879
|
key: 1,
|
|
2748
2880
|
class: "choropleth-header"
|
|
2749
|
-
},
|
|
2881
|
+
}, Zn = {
|
|
2750
2882
|
key: 0,
|
|
2751
2883
|
class: "choropleth-legend-title"
|
|
2752
|
-
},
|
|
2884
|
+
}, Qn = {
|
|
2753
2885
|
key: 2,
|
|
2754
2886
|
class: "choropleth-legend-continuous"
|
|
2755
|
-
},
|
|
2887
|
+
}, $n = { class: "choropleth-legend-ticks" }, er = ["viewBox"], tr = ["innerHTML"], nr = "http://www.w3.org/2000/svg", rr = 450, ir = 1e3, ar = /* @__PURE__ */ F(/* @__PURE__ */ l({
|
|
2756
2888
|
__name: "ChoroplethMap",
|
|
2757
2889
|
props: {
|
|
2758
2890
|
topology: {},
|
|
@@ -2810,56 +2942,56 @@ var Pt = {
|
|
|
2810
2942
|
width: "100%"
|
|
2811
2943
|
};
|
|
2812
2944
|
return e?.color && (t.color = e.color), t;
|
|
2813
|
-
}),
|
|
2945
|
+
}), P = /* @__PURE__ */ new Map(), pe = /* @__PURE__ */ new Map(), me = null, F = null, I = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map(), _e = !1, ve = typeof window < "u" && "ontouchstart" in window, ye = null, be = {
|
|
2814
2946
|
width: 0,
|
|
2815
2947
|
height: 0
|
|
2816
|
-
},
|
|
2817
|
-
function
|
|
2818
|
-
if (
|
|
2948
|
+
}, xe = null, Se = !1, L = null, Ce = v(!1), we = 0, R = 0, z = 0;
|
|
2949
|
+
function Te() {
|
|
2950
|
+
if (ve) return;
|
|
2819
2951
|
let e = O.value;
|
|
2820
2952
|
e && (e.addEventListener("click", gt), e.addEventListener("mouseover", gt), e.addEventListener("mousemove", _t), e.addEventListener("mouseout", vt));
|
|
2821
2953
|
}
|
|
2822
|
-
function
|
|
2954
|
+
function Ee() {
|
|
2823
2955
|
let e = O.value;
|
|
2824
2956
|
e && (e.removeEventListener("click", gt), e.removeEventListener("mouseover", gt), e.removeEventListener("mousemove", _t), e.removeEventListener("mouseout", vt));
|
|
2825
2957
|
}
|
|
2826
|
-
function
|
|
2958
|
+
function De() {
|
|
2827
2959
|
Q();
|
|
2828
2960
|
}
|
|
2829
2961
|
h(() => {
|
|
2830
|
-
|
|
2962
|
+
Oe(), Te(), bt(), V(), st(), window.addEventListener("scroll", De, {
|
|
2831
2963
|
passive: !0,
|
|
2832
2964
|
capture: !0
|
|
2833
|
-
}), window.addEventListener("resize",
|
|
2965
|
+
}), window.addEventListener("resize", De, { passive: !0 });
|
|
2834
2966
|
}), g(() => {
|
|
2835
|
-
|
|
2967
|
+
ye?.disconnect(), z && cancelAnimationFrame(z), ke(), Ee(), window.removeEventListener("scroll", De, { capture: !0 }), window.removeEventListener("resize", De);
|
|
2836
2968
|
});
|
|
2837
|
-
function
|
|
2969
|
+
function Oe() {
|
|
2838
2970
|
if (!D.value || !O.value) return;
|
|
2839
|
-
let e =
|
|
2840
|
-
|
|
2841
|
-
|
|
2971
|
+
let e = ue(D.value), t = Math.max(12, l.focusZoomLevel);
|
|
2972
|
+
L = ce().scaleExtent([1, t]).on("start", () => {
|
|
2973
|
+
_e = !0, Q();
|
|
2842
2974
|
}).on("zoom", (e) => {
|
|
2843
2975
|
O.value && O.value.setAttribute("transform", e.transform);
|
|
2844
2976
|
let t = e.transform;
|
|
2845
|
-
|
|
2977
|
+
Ce.value = t.k !== 1 || t.x !== 0 || t.y !== 0;
|
|
2846
2978
|
}).on("end", () => {
|
|
2847
|
-
|
|
2848
|
-
}),
|
|
2849
|
-
let t =
|
|
2979
|
+
_e = !1;
|
|
2980
|
+
}), L.filter((e) => {
|
|
2981
|
+
let t = X.value.length > 0, n = !!l.zoom || t, r = !!l.pan || t;
|
|
2850
2982
|
if (e.type === "wheel" || e.type === "dblclick") {
|
|
2851
2983
|
if (!n) return !1;
|
|
2852
2984
|
} else if (e.type === "mousedown" || e.type === "touchstart") {
|
|
2853
2985
|
if (!r) return !1;
|
|
2854
2986
|
} else if (!n && !r) return !1;
|
|
2855
2987
|
return (!e.ctrlKey || e.type === "wheel") && !e.button;
|
|
2856
|
-
}), e.call(
|
|
2988
|
+
}), e.call(L);
|
|
2857
2989
|
}
|
|
2858
|
-
function
|
|
2859
|
-
D.value &&
|
|
2990
|
+
function ke() {
|
|
2991
|
+
D.value && L && (ue(D.value).on(".zoom", null), L = null);
|
|
2860
2992
|
}
|
|
2861
|
-
function
|
|
2862
|
-
let t =
|
|
2993
|
+
function Ae(e) {
|
|
2994
|
+
let t = Ge.value, n = Ue.value, r = [];
|
|
2863
2995
|
for (let i of e) {
|
|
2864
2996
|
let e = i.geoType ?? l.geoType, a = t.get(e);
|
|
2865
2997
|
if (!a) continue;
|
|
@@ -2877,76 +3009,76 @@ var Pt = {
|
|
|
2877
3009
|
}
|
|
2878
3010
|
return r;
|
|
2879
3011
|
}
|
|
2880
|
-
function
|
|
3012
|
+
function B(e) {
|
|
2881
3013
|
let t = /* @__PURE__ */ new Set();
|
|
2882
|
-
for (let n of
|
|
3014
|
+
for (let n of Ae(e)) n.geoType === l.geoType && t.add(String(n.feature.id));
|
|
2883
3015
|
return t;
|
|
2884
3016
|
}
|
|
2885
|
-
let
|
|
2886
|
-
function
|
|
2887
|
-
if (!D.value || !
|
|
2888
|
-
let e =
|
|
3017
|
+
let je = !1;
|
|
3018
|
+
function V() {
|
|
3019
|
+
if (!D.value || !L) return;
|
|
3020
|
+
let e = Ae(X.value), t = e.filter((e) => e.geoType === l.geoType), n = e.filter((e) => e.geoType !== l.geoType), r = /* @__PURE__ */ new Map();
|
|
2889
3021
|
for (let e of t) {
|
|
2890
|
-
let t =
|
|
3022
|
+
let t = P.get(String(e.feature.id));
|
|
2891
3023
|
t && r.set(t, e.item.style ?? "solid");
|
|
2892
3024
|
}
|
|
2893
|
-
for (let [e] of
|
|
2894
|
-
for (let [e, t] of r)
|
|
2895
|
-
|
|
2896
|
-
for (let [e, t] of r)
|
|
2897
|
-
if (
|
|
2898
|
-
|
|
3025
|
+
for (let [e] of I) r.has(e) || e === F || Z(e);
|
|
3026
|
+
for (let [e, t] of r) I.get(e) === t && e !== F || e !== F && pt(e, t);
|
|
3027
|
+
I.clear();
|
|
3028
|
+
for (let [e, t] of r) I.set(e, t);
|
|
3029
|
+
if (H(n), e.length === 0) {
|
|
3030
|
+
je = !0, Q();
|
|
2899
3031
|
return;
|
|
2900
3032
|
}
|
|
2901
|
-
let i =
|
|
3033
|
+
let i = ue(D.value);
|
|
2902
3034
|
i.interrupt();
|
|
2903
|
-
let a =
|
|
2904
|
-
|
|
3035
|
+
let a = je;
|
|
3036
|
+
je = !0;
|
|
2905
3037
|
let [[o, s], [c, u]] = Ve.value.bounds({
|
|
2906
3038
|
type: "FeatureCollection",
|
|
2907
3039
|
features: e.map((e) => e.feature)
|
|
2908
|
-
}), d = (o + c) / 2, f = (s + u) / 2, p = l.focusZoomLevel, m =
|
|
3040
|
+
}), d = (o + c) / 2, f = (s + u) / 2, p = l.focusZoomLevel, m = le.translate(Pe.value / 2 - p * d, W.value / 2 - p * f).scale(p), h = t[0]?.feature ?? null, g = () => {
|
|
2909
3041
|
if (!j.value || !h) return;
|
|
2910
|
-
let e = String(h.id), t =
|
|
3042
|
+
let e = String(h.id), t = P.get(e);
|
|
2911
3043
|
if (!t) return;
|
|
2912
3044
|
let n = t.getBoundingClientRect();
|
|
2913
|
-
|
|
3045
|
+
lt(e, n.left + n.width / 2, n.top + n.height / 2);
|
|
2914
3046
|
};
|
|
2915
|
-
a ? (
|
|
3047
|
+
a ? (dt(), i.transition().duration(rr).call(L.transform, m).on("end", g)) : (L.transform(i, m), g());
|
|
2916
3048
|
}
|
|
2917
|
-
function
|
|
3049
|
+
function H(e) {
|
|
2918
3050
|
let t = k.value;
|
|
2919
3051
|
if (!t) return;
|
|
2920
3052
|
let n = new Set(e.map((e) => e.key));
|
|
2921
|
-
for (let [e, t] of
|
|
3053
|
+
for (let [e, t] of ge) n.has(e) || (t.remove(), ge.delete(e));
|
|
2922
3054
|
let r = Ve.value, i = He.value + 1.5;
|
|
2923
3055
|
for (let { item: n, feature: a, key: o } of e) {
|
|
2924
|
-
let e =
|
|
2925
|
-
e || (e = document.createElementNS(
|
|
3056
|
+
let e = ge.get(o);
|
|
3057
|
+
e || (e = document.createElementNS(nr, "path"), e.setAttribute("d", r(a) ?? ""), e.setAttribute("fill", "none"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("class", "focus-overlay"), t.appendChild(e), ge.set(o, e)), e.setAttribute("stroke", n.stroke ?? "#fff"), e.setAttribute("stroke-width", String(i)), ft(e, n.style);
|
|
2926
3058
|
}
|
|
2927
3059
|
}
|
|
2928
3060
|
function U() {
|
|
2929
|
-
if (!D.value || !
|
|
2930
|
-
|
|
2931
|
-
let e =
|
|
2932
|
-
e.interrupt(),
|
|
3061
|
+
if (!D.value || !L) return;
|
|
3062
|
+
X.value.length > 0 && d("update:focus", null);
|
|
3063
|
+
let e = ue(D.value);
|
|
3064
|
+
e.interrupt(), dt(), e.transition().duration(rr).call(L.transform, le);
|
|
2933
3065
|
}
|
|
2934
3066
|
T(() => l.focusZoomLevel, () => {
|
|
2935
|
-
|
|
3067
|
+
L && L.scaleExtent([1, Math.max(12, l.focusZoomLevel)]), V();
|
|
2936
3068
|
});
|
|
2937
|
-
let Ne = n(() => l.width && l.height ? l.height / l.width : .625), Pe = n(() =>
|
|
2938
|
-
function
|
|
2939
|
-
return
|
|
3069
|
+
let Ne = n(() => l.width && l.height ? l.height / l.width : .625), Pe = n(() => ir), W = n(() => ir * Ne.value), K = v(null), Ie = null;
|
|
3070
|
+
function Le() {
|
|
3071
|
+
return Ie ||= import("./hsaMapping-Devrp7Rk.js").then((e) => e.n).then((e) => (K.value = e, e)), Ie;
|
|
2940
3072
|
}
|
|
2941
3073
|
T(() => {
|
|
2942
3074
|
if (l.geoType === "hsas" || l.dataGeoType === "hsas") return !0;
|
|
2943
3075
|
let e = l.focus;
|
|
2944
3076
|
return e ? (Array.isArray(e) ? e : [e]).some((e) => typeof e != "string" && e.geoType === "hsas") : !1;
|
|
2945
3077
|
}, (e) => {
|
|
2946
|
-
e &&
|
|
3078
|
+
e && Le();
|
|
2947
3079
|
}, { immediate: !0 });
|
|
2948
|
-
let
|
|
2949
|
-
let e =
|
|
3080
|
+
let Re = n(() => {
|
|
3081
|
+
let e = K.value;
|
|
2950
3082
|
if (!e) return {
|
|
2951
3083
|
type: "FeatureCollection",
|
|
2952
3084
|
features: []
|
|
@@ -2961,49 +3093,49 @@ var Pt = {
|
|
|
2961
3093
|
type: "Feature",
|
|
2962
3094
|
id: e,
|
|
2963
3095
|
properties: { name: n[e] ?? e },
|
|
2964
|
-
geometry:
|
|
3096
|
+
geometry: de(r, t)
|
|
2965
3097
|
});
|
|
2966
3098
|
return {
|
|
2967
3099
|
type: "FeatureCollection",
|
|
2968
3100
|
features: o
|
|
2969
3101
|
};
|
|
2970
|
-
}),
|
|
2971
|
-
if (l.geoType === "hsas") return
|
|
3102
|
+
}), q = n(() => {
|
|
3103
|
+
if (l.geoType === "hsas") return Re.value;
|
|
2972
3104
|
if (l.geoType === "counties") {
|
|
2973
3105
|
let e = x(l.topology);
|
|
2974
|
-
return
|
|
3106
|
+
return N(e, e.objects.counties);
|
|
2975
3107
|
}
|
|
2976
3108
|
let e = x(l.topology);
|
|
2977
|
-
return
|
|
3109
|
+
return N(e, e.objects.states);
|
|
2978
3110
|
}), ze = n(() => {
|
|
2979
3111
|
if (l.geoType !== "counties" && l.geoType !== "hsas") return null;
|
|
2980
3112
|
let e = x(l.topology);
|
|
2981
|
-
return
|
|
2982
|
-
}), Be = n(() => oe().fitExtent([[0, 0], [Pe.value, W.value]],
|
|
3113
|
+
return fe(e, e.objects.states, (e, t) => e !== t);
|
|
3114
|
+
}), Be = n(() => oe().fitExtent([[0, 0], [Pe.value, W.value]], q.value)), Ve = n(() => se(Be.value)), He = n(() => l.geoType === "counties" || l.geoType === "hsas" ? l.strokeWidth * .5 : l.strokeWidth), Ue = n(() => {
|
|
2983
3115
|
let e = /* @__PURE__ */ new Map();
|
|
2984
|
-
for (let [t, n] of
|
|
3116
|
+
for (let [t, n] of Ge.value) {
|
|
2985
3117
|
let r = /* @__PURE__ */ new Map();
|
|
2986
3118
|
for (let [e, t] of n) t.properties?.name != null && r.set(t.properties.name, e);
|
|
2987
3119
|
e.set(t, r);
|
|
2988
3120
|
}
|
|
2989
3121
|
return e;
|
|
2990
3122
|
});
|
|
2991
|
-
function
|
|
3123
|
+
function Y(e) {
|
|
2992
3124
|
let t = l.dataGeoType;
|
|
2993
3125
|
if (!t || t === l.geoType) return e;
|
|
2994
|
-
if (l.geoType === "counties" && t === "hsas") return
|
|
3126
|
+
if (l.geoType === "counties" && t === "hsas") return K.value?.fipsToHsa[e];
|
|
2995
3127
|
if (l.geoType === "counties" && t === "states" || l.geoType === "hsas" && t === "states") return e.slice(0, 2);
|
|
2996
3128
|
}
|
|
2997
|
-
let
|
|
3129
|
+
let We = n(() => {
|
|
2998
3130
|
let e = /* @__PURE__ */ new Map();
|
|
2999
|
-
for (let t of
|
|
3131
|
+
for (let t of q.value.features) t.id != null && e.set(String(t.id), t);
|
|
3000
3132
|
return e;
|
|
3001
|
-
}),
|
|
3133
|
+
}), X = n(() => {
|
|
3002
3134
|
let e = l.focus;
|
|
3003
3135
|
return e == null ? [] : (Array.isArray(e) ? e : [e]).map((e) => typeof e == "string" ? { id: e } : e);
|
|
3004
|
-
}),
|
|
3136
|
+
}), Ge = n(() => {
|
|
3005
3137
|
let e = /* @__PURE__ */ new Map();
|
|
3006
|
-
e.set(l.geoType,
|
|
3138
|
+
e.set(l.geoType, We.value);
|
|
3007
3139
|
let t = x(l.topology), n = t?.objects;
|
|
3008
3140
|
if (!n) return e;
|
|
3009
3141
|
let r = (e) => {
|
|
@@ -3012,15 +3144,15 @@ var Pt = {
|
|
|
3012
3144
|
return t;
|
|
3013
3145
|
};
|
|
3014
3146
|
if (!e.has("states") && n.states) {
|
|
3015
|
-
let i =
|
|
3147
|
+
let i = N(t, n.states);
|
|
3016
3148
|
e.set("states", r(i.features));
|
|
3017
3149
|
}
|
|
3018
3150
|
if (!e.has("counties") && n.counties) {
|
|
3019
|
-
let i =
|
|
3151
|
+
let i = N(t, n.counties);
|
|
3020
3152
|
e.set("counties", r(i.features));
|
|
3021
3153
|
}
|
|
3022
|
-
return !e.has("hsas") && n.counties && e.set("hsas", r(
|
|
3023
|
-
}),
|
|
3154
|
+
return !e.has("hsas") && n.counties && e.set("hsas", r(Re.value.features)), e;
|
|
3155
|
+
}), Ke = n(() => {
|
|
3024
3156
|
let e = /* @__PURE__ */ new Map();
|
|
3025
3157
|
if (!l.data) return e;
|
|
3026
3158
|
let t = l.dataGeoType ?? l.geoType, n = Ue.value.get(t);
|
|
@@ -3030,7 +3162,7 @@ var Pt = {
|
|
|
3030
3162
|
r && e.set(r, t.value);
|
|
3031
3163
|
}
|
|
3032
3164
|
return e;
|
|
3033
|
-
}),
|
|
3165
|
+
}), qe = n(() => {
|
|
3034
3166
|
if (!l.data || l.data.length === 0) return {
|
|
3035
3167
|
min: 0,
|
|
3036
3168
|
max: 1
|
|
@@ -3047,8 +3179,8 @@ var Pt = {
|
|
|
3047
3179
|
min: 0,
|
|
3048
3180
|
max: 1
|
|
3049
3181
|
};
|
|
3050
|
-
}),
|
|
3051
|
-
function
|
|
3182
|
+
}), Je = n(() => Array.isArray(l.colorScale) && l.colorScale.length > 0 && "value" in l.colorScale[0]), Ye = n(() => Array.isArray(l.colorScale) && !Je.value), Xe = n(() => Ye.value ? "" : l.colorScale?.min ?? "#e5f0fa"), Ze = n(() => Ye.value ? "" : l.colorScale?.max ?? "#08519c");
|
|
3183
|
+
function Qe(e) {
|
|
3052
3184
|
let t = e.replace("#", "");
|
|
3053
3185
|
return [
|
|
3054
3186
|
parseInt(t.slice(0, 2), 16),
|
|
@@ -3056,100 +3188,100 @@ var Pt = {
|
|
|
3056
3188
|
parseInt(t.slice(4, 6), 16)
|
|
3057
3189
|
];
|
|
3058
3190
|
}
|
|
3059
|
-
function
|
|
3060
|
-
let [t, n, r] =
|
|
3191
|
+
function $e(e) {
|
|
3192
|
+
let [t, n, r] = Qe(Xe.value), [i, a, o] = Qe(Ze.value);
|
|
3061
3193
|
return `rgb(${Math.round(t + (i - t) * e)},${Math.round(n + (a - n) * e)},${Math.round(r + (o - r) * e)})`;
|
|
3062
3194
|
}
|
|
3063
|
-
let
|
|
3064
|
-
if (!
|
|
3195
|
+
let et = n(() => Ye.value ? l.colorScale.slice().sort((e, t) => t.min - e.min) : null), tt = n(() => {
|
|
3196
|
+
if (!Je.value) return null;
|
|
3065
3197
|
let e = /* @__PURE__ */ new Map();
|
|
3066
3198
|
for (let t of l.colorScale) e.set(t.value, t.color);
|
|
3067
3199
|
return e;
|
|
3068
3200
|
});
|
|
3069
|
-
function
|
|
3070
|
-
let t =
|
|
3071
|
-
return t == null ? void 0 :
|
|
3201
|
+
function nt(e) {
|
|
3202
|
+
let t = Y(e);
|
|
3203
|
+
return t == null ? void 0 : Ke.value.get(t);
|
|
3072
3204
|
}
|
|
3073
|
-
function
|
|
3074
|
-
let t =
|
|
3205
|
+
function rt(e) {
|
|
3206
|
+
let t = nt(e), n = l.noDataColor;
|
|
3075
3207
|
if (t == null) return n;
|
|
3076
|
-
let r =
|
|
3208
|
+
let r = tt.value;
|
|
3077
3209
|
if (r) return r.get(String(t)) ?? n;
|
|
3078
|
-
let i =
|
|
3210
|
+
let i = et.value;
|
|
3079
3211
|
if (i) {
|
|
3080
3212
|
let e = t;
|
|
3081
3213
|
for (let t of i) if (e >= t.min) return t.color;
|
|
3082
3214
|
return n;
|
|
3083
3215
|
}
|
|
3084
|
-
let { min: a, max: o } =
|
|
3085
|
-
return
|
|
3216
|
+
let { min: a, max: o } = qe.value;
|
|
3217
|
+
return $e((t - a) / (o - a));
|
|
3086
3218
|
}
|
|
3087
|
-
let
|
|
3088
|
-
function
|
|
3219
|
+
let it = (e) => e.properties?.name ?? String(e.id);
|
|
3220
|
+
function at(e) {
|
|
3089
3221
|
return e == null ? "" : typeof e == "number" && l.tooltipValueFormat !== void 0 ? ne(e, l.tooltipValueFormat) : String(e);
|
|
3090
3222
|
}
|
|
3091
|
-
function
|
|
3092
|
-
return t == null ? e : `${e}: ${
|
|
3223
|
+
function ot(e, t) {
|
|
3224
|
+
return t == null ? e : `${e}: ${at(t)}`;
|
|
3093
3225
|
}
|
|
3094
|
-
function
|
|
3226
|
+
function st() {
|
|
3095
3227
|
let e = A.value?.getEl();
|
|
3096
3228
|
if (!e) return;
|
|
3097
|
-
|
|
3229
|
+
ye?.disconnect();
|
|
3098
3230
|
let t = !1;
|
|
3099
|
-
|
|
3231
|
+
ye = new ResizeObserver((e) => {
|
|
3100
3232
|
let n = e[0]?.contentRect;
|
|
3101
|
-
n && (
|
|
3102
|
-
}),
|
|
3233
|
+
n && (be.width = n.width, be.height = n.height, !t && Se && xe ? (t = !0, ct(xe.x, xe.y)) : t = !0);
|
|
3234
|
+
}), ye.observe(e);
|
|
3103
3235
|
}
|
|
3104
|
-
function
|
|
3236
|
+
function ct(e, t) {
|
|
3105
3237
|
let n = A.value?.getEl();
|
|
3106
3238
|
if (!n) return;
|
|
3107
|
-
let r = w.value?.getBoundingClientRect(), { left: i, top: a } =
|
|
3239
|
+
let r = w.value?.getBoundingClientRect(), { left: i, top: a } = Me(e, t, be.width, be.height, l.tooltipClamp, r);
|
|
3108
3240
|
n.style.transform = `translate3d(${i}px, ${a}px, 0) translateY(-50%)`;
|
|
3109
3241
|
}
|
|
3110
|
-
function
|
|
3111
|
-
let r =
|
|
3242
|
+
function lt(e, t, n) {
|
|
3243
|
+
let r = pe.get(e);
|
|
3112
3244
|
if (!r) return;
|
|
3113
3245
|
let i = A.value, a = i?.getEl();
|
|
3114
|
-
!i || !a || (i.setData(r),
|
|
3246
|
+
!i || !a || (i.setData(r), xe = {
|
|
3115
3247
|
x: t,
|
|
3116
3248
|
y: n
|
|
3117
|
-
},
|
|
3249
|
+
}, Se = !0, ct(t, n), a.style.visibility = "visible");
|
|
3118
3250
|
}
|
|
3119
|
-
function
|
|
3120
|
-
|
|
3251
|
+
function ut(e, t) {
|
|
3252
|
+
Se && (we = e, R = t, !z && (z = requestAnimationFrame(() => {
|
|
3121
3253
|
z = 0;
|
|
3122
3254
|
let e = A.value?.getEl();
|
|
3123
|
-
!e || !
|
|
3124
|
-
x:
|
|
3125
|
-
y:
|
|
3126
|
-
}, e.style.transform = `translate3d(${
|
|
3255
|
+
!e || !Se || (xe = {
|
|
3256
|
+
x: we,
|
|
3257
|
+
y: R
|
|
3258
|
+
}, e.style.transform = `translate3d(${we + 16}px, ${R}px, 0) translateY(-50%)`);
|
|
3127
3259
|
})));
|
|
3128
3260
|
}
|
|
3129
|
-
function
|
|
3130
|
-
if (!
|
|
3131
|
-
|
|
3261
|
+
function dt() {
|
|
3262
|
+
if (!Se) return;
|
|
3263
|
+
Se = !1, xe = null;
|
|
3132
3264
|
let e = A.value?.getEl();
|
|
3133
3265
|
e && (e.style.visibility = "hidden");
|
|
3134
3266
|
}
|
|
3135
|
-
function
|
|
3267
|
+
function ft(e, t) {
|
|
3136
3268
|
t === "dashed" ? (e.setAttribute("stroke-dasharray", "8 4"), e.removeAttribute("stroke-linecap")) : t === "dotted" ? (e.setAttribute("stroke-dasharray", "0 5"), e.setAttribute("stroke-linecap", "round")) : (e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap"));
|
|
3137
3269
|
}
|
|
3138
|
-
function
|
|
3139
|
-
e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(He.value + 1)), e.setAttribute("stroke", "#555"),
|
|
3270
|
+
function pt(e, t = "solid") {
|
|
3271
|
+
e.parentNode?.appendChild(e), e.setAttribute("stroke-width", String(He.value + 1)), e.setAttribute("stroke", "#555"), ft(e, t);
|
|
3140
3272
|
}
|
|
3141
|
-
function
|
|
3273
|
+
function Z(e) {
|
|
3142
3274
|
e.setAttribute("stroke-width", String(He.value)), e.setAttribute("stroke", l.strokeColor), e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap");
|
|
3143
3275
|
}
|
|
3144
|
-
function
|
|
3145
|
-
|
|
3276
|
+
function mt(e) {
|
|
3277
|
+
F !== e && (F && !I.has(F) && Z(F), F = e, pt(e, I.get(e) ?? "solid"));
|
|
3146
3278
|
}
|
|
3147
3279
|
function Q() {
|
|
3148
|
-
if (
|
|
3149
|
-
let e =
|
|
3150
|
-
e == null ?
|
|
3280
|
+
if (F) {
|
|
3281
|
+
let e = I.get(F);
|
|
3282
|
+
e == null ? Z(F) : pt(F, e), F = null, d("stateHover", null);
|
|
3151
3283
|
}
|
|
3152
|
-
|
|
3284
|
+
dt();
|
|
3153
3285
|
}
|
|
3154
3286
|
function ht(e) {
|
|
3155
3287
|
let t = e;
|
|
@@ -3157,27 +3289,27 @@ var Pt = {
|
|
|
3157
3289
|
return t ? t.dataset.featId ?? null : null;
|
|
3158
3290
|
}
|
|
3159
3291
|
function gt(e) {
|
|
3160
|
-
if (
|
|
3292
|
+
if (_e) return;
|
|
3161
3293
|
let t = e, n = ht(t.target);
|
|
3162
3294
|
if (!n) return;
|
|
3163
|
-
let r =
|
|
3295
|
+
let r = pe.get(n);
|
|
3164
3296
|
if (!r) return;
|
|
3165
3297
|
let i = {
|
|
3166
3298
|
id: r.id,
|
|
3167
3299
|
name: r.name,
|
|
3168
3300
|
value: r.value
|
|
3169
3301
|
};
|
|
3170
|
-
e.type === "click" ? (d("stateClick", i), d("update:focus",
|
|
3302
|
+
e.type === "click" ? (d("stateClick", i), d("update:focus", B(X.value).has(r.id) ? null : r.id)) : e.type === "mouseover" && (mt(P.get(n)), j.value && lt(n, t.clientX, t.clientY), d("stateHover", i));
|
|
3171
3303
|
}
|
|
3172
3304
|
function _t(e) {
|
|
3173
|
-
|
|
3305
|
+
_e || ut(e.clientX, e.clientY);
|
|
3174
3306
|
}
|
|
3175
3307
|
function vt(e) {
|
|
3176
3308
|
let t = e.relatedTarget;
|
|
3177
3309
|
t && O.value?.contains(t) || Q();
|
|
3178
3310
|
}
|
|
3179
3311
|
function yt(e) {
|
|
3180
|
-
let t = document.createElementNS(
|
|
3312
|
+
let t = document.createElementNS(nr, "path");
|
|
3181
3313
|
return e && t.setAttribute("d", e), t;
|
|
3182
3314
|
}
|
|
3183
3315
|
function bt() {
|
|
@@ -3185,15 +3317,15 @@ var Pt = {
|
|
|
3185
3317
|
if (!e || !t) return;
|
|
3186
3318
|
for (; e.firstChild;) e.removeChild(e.firstChild);
|
|
3187
3319
|
for (; t.firstChild;) t.removeChild(t.firstChild);
|
|
3188
|
-
|
|
3189
|
-
let n = Ve.value, r =
|
|
3320
|
+
P.clear(), pe.clear(), me = null, F = null, I.clear(), ge.clear();
|
|
3321
|
+
let n = Ve.value, r = q.value.features, i = l.strokeColor, a = String(He.value), o = !j.value, s = document.createDocumentFragment();
|
|
3190
3322
|
for (let e of r) {
|
|
3191
|
-
let t = String(e.id), r =
|
|
3192
|
-
if (l.setAttribute("class", "state-path"), l.setAttribute("data-feat-id", t), l.setAttribute("fill",
|
|
3193
|
-
let e = document.createElementNS(
|
|
3194
|
-
e.textContent =
|
|
3323
|
+
let t = String(e.id), r = it(e), c = nt(t), l = yt(n(e));
|
|
3324
|
+
if (l.setAttribute("class", "state-path"), l.setAttribute("data-feat-id", t), l.setAttribute("fill", rt(t)), l.setAttribute("stroke", i), l.setAttribute("stroke-width", a), l.setAttribute("vector-effect", "non-scaling-stroke"), o) {
|
|
3325
|
+
let e = document.createElementNS(nr, "title");
|
|
3326
|
+
e.textContent = ot(r, c), l.appendChild(e);
|
|
3195
3327
|
}
|
|
3196
|
-
s.appendChild(l),
|
|
3328
|
+
s.appendChild(l), P.set(t, l), pe.set(t, {
|
|
3197
3329
|
id: t,
|
|
3198
3330
|
name: r,
|
|
3199
3331
|
value: c,
|
|
@@ -3203,34 +3335,34 @@ var Pt = {
|
|
|
3203
3335
|
let c = ze.value;
|
|
3204
3336
|
if (c) {
|
|
3205
3337
|
let e = yt(n(c));
|
|
3206
|
-
e.setAttribute("fill", "none"), e.setAttribute("stroke", i), e.setAttribute("stroke-width", "1"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), s.appendChild(e),
|
|
3338
|
+
e.setAttribute("fill", "none"), e.setAttribute("stroke", i), e.setAttribute("stroke-width", "1"), e.setAttribute("stroke-linejoin", "round"), e.setAttribute("pointer-events", "none"), e.setAttribute("vector-effect", "non-scaling-stroke"), s.appendChild(e), me = e;
|
|
3207
3339
|
}
|
|
3208
3340
|
e.appendChild(s);
|
|
3209
3341
|
}
|
|
3210
3342
|
function xt() {
|
|
3211
3343
|
let e = !j.value;
|
|
3212
|
-
for (let [t, n] of
|
|
3213
|
-
let r =
|
|
3214
|
-
if (n.setAttribute("fill",
|
|
3344
|
+
for (let [t, n] of P) {
|
|
3345
|
+
let r = nt(t), i = pe.get(t);
|
|
3346
|
+
if (n.setAttribute("fill", rt(t)), i && (i.value = r), e && i) {
|
|
3215
3347
|
let e = n.firstElementChild;
|
|
3216
|
-
e && (e.textContent =
|
|
3348
|
+
e && (e.textContent = ot(i.name, r));
|
|
3217
3349
|
}
|
|
3218
3350
|
}
|
|
3219
3351
|
}
|
|
3220
3352
|
function St() {
|
|
3221
|
-
for (let e of
|
|
3222
|
-
|
|
3353
|
+
for (let e of P.values()) e === F || I.has(e) || Z(e);
|
|
3354
|
+
me && me.setAttribute("stroke", l.strokeColor);
|
|
3223
3355
|
}
|
|
3224
3356
|
function Ct() {
|
|
3225
3357
|
return typeof l.menu == "string" ? l.menu : "choropleth";
|
|
3226
3358
|
}
|
|
3227
|
-
let wt = n(() => l.legend && (
|
|
3359
|
+
let wt = n(() => l.legend && (Je.value || Ye.value || l.data)), Tt = n(() => l.colorScale.slice().sort((e, t) => e.min - t.min)), Et = n(() => {
|
|
3228
3360
|
let e = [];
|
|
3229
3361
|
for (let t = 0; t <= 10; t++) {
|
|
3230
3362
|
let n = t / 10;
|
|
3231
3363
|
e.push({
|
|
3232
3364
|
offset: `${(n * 100).toFixed(0)}%`,
|
|
3233
|
-
color:
|
|
3365
|
+
color: $e(n)
|
|
3234
3366
|
});
|
|
3235
3367
|
}
|
|
3236
3368
|
return e;
|
|
@@ -3238,7 +3370,7 @@ var Pt = {
|
|
|
3238
3370
|
notation: "compact",
|
|
3239
3371
|
maximumFractionDigits: 1
|
|
3240
3372
|
}), Ot = n(() => {
|
|
3241
|
-
let { min: e, max: t } =
|
|
3373
|
+
let { min: e, max: t } = qe.value, n = t - e, r = [];
|
|
3242
3374
|
for (let t = 1; t <= 3; t++) {
|
|
3243
3375
|
let i = t / 4, a = e + n * i, o = Math.abs(a) >= 1e3 ? Dt.format(a) : Number.isInteger(a) ? String(a) : a.toFixed(1).replace(/\.0$/, "");
|
|
3244
3376
|
r.push({
|
|
@@ -3249,18 +3381,18 @@ var Pt = {
|
|
|
3249
3381
|
return r;
|
|
3250
3382
|
}), kt = n(() => {
|
|
3251
3383
|
let e = [];
|
|
3252
|
-
if (
|
|
3384
|
+
if (Je.value) for (let t of l.colorScale) e.push({
|
|
3253
3385
|
key: t.value,
|
|
3254
3386
|
color: t.color,
|
|
3255
3387
|
label: t.value
|
|
3256
3388
|
});
|
|
3257
|
-
else if (
|
|
3389
|
+
else if (Ye.value) for (let t of Tt.value) e.push({
|
|
3258
3390
|
key: String(t.min),
|
|
3259
3391
|
color: t.color,
|
|
3260
3392
|
label: t.label ?? String(t.min)
|
|
3261
3393
|
});
|
|
3262
3394
|
return e;
|
|
3263
|
-
}), $ = n(() => `linear-gradient(to right, ${Et.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), At =
|
|
3395
|
+
}), $ = n(() => `linear-gradient(to right, ${Et.value.map((e) => `${e.color} ${e.offset}`).join(", ")})`), At = J(), jt = n(() => {
|
|
3264
3396
|
let e = Ct();
|
|
3265
3397
|
return [
|
|
3266
3398
|
At.menuItem.value,
|
|
@@ -3273,21 +3405,21 @@ var Pt = {
|
|
|
3273
3405
|
{
|
|
3274
3406
|
label: "Save as PNG",
|
|
3275
3407
|
action: () => {
|
|
3276
|
-
D.value &&
|
|
3408
|
+
D.value && Fe(D.value, e);
|
|
3277
3409
|
}
|
|
3278
3410
|
}
|
|
3279
3411
|
];
|
|
3280
3412
|
});
|
|
3281
3413
|
return T(() => [Ve.value, j.value], () => bt()), T(() => [
|
|
3282
|
-
|
|
3414
|
+
Ke.value,
|
|
3283
3415
|
l.colorScale,
|
|
3284
3416
|
l.noDataColor,
|
|
3285
3417
|
l.dataGeoType
|
|
3286
3418
|
], () => xt()), T(() => [l.strokeColor, He.value], () => St()), T(() => [
|
|
3287
|
-
|
|
3419
|
+
X.value,
|
|
3288
3420
|
Ve.value,
|
|
3289
|
-
|
|
3290
|
-
], () =>
|
|
3421
|
+
K.value
|
|
3422
|
+
], () => V(), { flush: "post" }), (n, c) => (_(), a("div", {
|
|
3291
3423
|
ref_key: "containerRef",
|
|
3292
3424
|
ref: w,
|
|
3293
3425
|
class: f(["choropleth-wrapper", {
|
|
@@ -3295,12 +3427,12 @@ var Pt = {
|
|
|
3295
3427
|
"is-fullscreen": S(At).isFullscreen.value
|
|
3296
3428
|
}])
|
|
3297
3429
|
}, [
|
|
3298
|
-
t.menu ? (_(), r(
|
|
3430
|
+
t.menu ? (_(), r(he, {
|
|
3299
3431
|
key: 0,
|
|
3300
3432
|
items: jt.value
|
|
3301
3433
|
}, null, 8, ["items"])) : i("", !0),
|
|
3302
|
-
o("div",
|
|
3303
|
-
t.title || wt.value ? (_(), a("div",
|
|
3434
|
+
o("div", Yn, b(S(At).isFullscreen.value ? "Map expanded to fill window" : ""), 1),
|
|
3435
|
+
t.title || wt.value ? (_(), a("div", Xn, [t.title ? (_(), a("div", {
|
|
3304
3436
|
key: 0,
|
|
3305
3437
|
class: "choropleth-title",
|
|
3306
3438
|
style: m(M.value)
|
|
@@ -3308,16 +3440,16 @@ var Pt = {
|
|
|
3308
3440
|
key: 1,
|
|
3309
3441
|
class: "choropleth-legend",
|
|
3310
3442
|
style: m(ae.value)
|
|
3311
|
-
}, [t.legendTitle ? (_(), a("span",
|
|
3443
|
+
}, [t.legendTitle ? (_(), a("span", Zn, b(t.legendTitle), 1)) : i("", !0), Je.value || Ye.value ? (_(!0), a(e, { key: 1 }, y(kt.value, (e) => (_(), a("span", {
|
|
3312
3444
|
key: e.key,
|
|
3313
3445
|
class: "choropleth-legend-item"
|
|
3314
3446
|
}, [o("span", {
|
|
3315
3447
|
class: "choropleth-legend-swatch",
|
|
3316
3448
|
style: m({ background: e.color })
|
|
3317
|
-
}, null, 4), s(" " + b(e.label), 1)]))), 128)) : (_(), a("div",
|
|
3449
|
+
}, null, 4), s(" " + b(e.label), 1)]))), 128)) : (_(), a("div", Qn, [o("div", {
|
|
3318
3450
|
class: "choropleth-legend-gradient",
|
|
3319
3451
|
style: m({ background: $.value })
|
|
3320
|
-
}, null, 4), o("div",
|
|
3452
|
+
}, null, 4), o("div", $n, [(_(!0), a(e, null, y(Ot.value, (e) => (_(), a("span", {
|
|
3321
3453
|
key: e.value,
|
|
3322
3454
|
style: m({ left: e.pct + "%" })
|
|
3323
3455
|
}, b(e.value), 5))), 128))])]))], 4)) : i("", !0)])) : i("", !0),
|
|
@@ -3335,15 +3467,15 @@ var Pt = {
|
|
|
3335
3467
|
}, null, 512), o("g", {
|
|
3336
3468
|
ref_key: "overlayGroupRef",
|
|
3337
3469
|
ref: k
|
|
3338
|
-
}, null, 512)], 512)], 8,
|
|
3339
|
-
|
|
3470
|
+
}, null, 512)], 512)], 8, er)),
|
|
3471
|
+
Ce.value ? (_(), a("button", {
|
|
3340
3472
|
key: 2,
|
|
3341
3473
|
type: "button",
|
|
3342
3474
|
class: "choropleth-reset",
|
|
3343
3475
|
"aria-label": "Reset zoom",
|
|
3344
3476
|
onClick: U
|
|
3345
3477
|
}, " Reset ")) : i("", !0),
|
|
3346
|
-
j.value ? (_(), r(
|
|
3478
|
+
j.value ? (_(), r(Jn, {
|
|
3347
3479
|
key: 3,
|
|
3348
3480
|
ref_key: "tooltipChildRef",
|
|
3349
3481
|
ref: A
|
|
@@ -3351,12 +3483,12 @@ var Pt = {
|
|
|
3351
3483
|
default: E((r) => [ee(n.$slots, "tooltip", p(u(te(r))), () => [t.tooltipFormat ? (_(), a("span", {
|
|
3352
3484
|
key: 0,
|
|
3353
3485
|
innerHTML: t.tooltipFormat(r)
|
|
3354
|
-
}, null, 8,
|
|
3486
|
+
}, null, 8, tr)) : r.value == null ? (_(), a(e, { key: 1 }, [s(b(r.name), 1)], 64)) : (_(), a(e, { key: 2 }, [s(b(r.name) + ": " + b(at(r.value)), 1)], 64))], !0)]),
|
|
3355
3487
|
_: 3
|
|
3356
3488
|
}, 512)) : i("", !0)
|
|
3357
3489
|
], 2));
|
|
3358
3490
|
}
|
|
3359
|
-
}), [["__scopeId", "data-v-b11a80ed"]]),
|
|
3491
|
+
}), [["__scopeId", "data-v-b11a80ed"]]), or = /* @__PURE__ */ F(/* @__PURE__ */ l({
|
|
3360
3492
|
__name: "ChartTooltip",
|
|
3361
3493
|
props: {
|
|
3362
3494
|
x: {},
|
|
@@ -3407,7 +3539,7 @@ var Pt = {
|
|
|
3407
3539
|
_: 3
|
|
3408
3540
|
}, 8, ["open"])) : i("", !0);
|
|
3409
3541
|
}
|
|
3410
|
-
}), [["__scopeId", "data-v-44377f70"]]),
|
|
3542
|
+
}), [["__scopeId", "data-v-44377f70"]]), sr = { class: "TableWrapper" }, cr = /* @__PURE__ */ F(/* @__PURE__ */ l({
|
|
3411
3543
|
__name: "DataTable",
|
|
3412
3544
|
props: {
|
|
3413
3545
|
data: {},
|
|
@@ -3498,16 +3630,16 @@ var Pt = {
|
|
|
3498
3630
|
}
|
|
3499
3631
|
let S = n(() => [{
|
|
3500
3632
|
label: c.downloadMenuLink,
|
|
3501
|
-
action: () =>
|
|
3633
|
+
action: () => K(x(), ee())
|
|
3502
3634
|
}]), C = n(() => !!c.menu);
|
|
3503
3635
|
return (n, s) => (_(), a("div", { class: f(["TableOuter", {
|
|
3504
3636
|
"full-width": t.fullWidth,
|
|
3505
3637
|
"has-menu": C.value
|
|
3506
|
-
}]) }, [C.value ? (_(), r(
|
|
3638
|
+
}]) }, [C.value ? (_(), r(he, {
|
|
3507
3639
|
key: 0,
|
|
3508
3640
|
items: S.value,
|
|
3509
3641
|
"force-dropdown": ""
|
|
3510
|
-
}, null, 8, ["items"])) : i("", !0), o("div",
|
|
3642
|
+
}, null, 8, ["items"])) : i("", !0), o("div", sr, [o("table", { class: f(["Table", { "full-width": t.fullWidth }]) }, [
|
|
3511
3643
|
o("colgroup", null, [(_(!0), a(e, null, y(h.value, (e) => (_(), a("col", {
|
|
3512
3644
|
key: e.name,
|
|
3513
3645
|
style: m(u(e.name))
|
|
@@ -3525,4 +3657,4 @@ var Pt = {
|
|
|
3525
3657
|
}
|
|
3526
3658
|
}), [["__scopeId", "data-v-d6b3bce8"]]);
|
|
3527
3659
|
//#endregion
|
|
3528
|
-
export {
|
|
3660
|
+
export { Kn as BarChart, or as ChartTooltip, ar as ChoroplethMap, cr as DataTable, bn as LineChart };
|