@cfasim-ui/charts 0.4.13 → 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 +726 -592
- 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;
|
|
@@ -2384,26 +2476,36 @@ var Pt = {
|
|
|
2384
2476
|
}
|
|
2385
2477
|
return s;
|
|
2386
2478
|
}
|
|
2387
|
-
let n = [], r = (e, t) => l.categoryFormat ? l.categoryFormat(e, t) : e;
|
|
2388
|
-
for (let t = 0; t < e; t++)
|
|
2479
|
+
let n = [], r = (e, t) => l.categoryFormat ? l.categoryFormat(e, t) : e, i = Array(e), a = 0;
|
|
2480
|
+
for (let t = 0; t < e; t++) i[t] = r(w.value[t], t), i[t].length > a && (a = i[t].length);
|
|
2481
|
+
let o = l.tickLabelStyle?.fontSize ?? 10, s = E.value ? a * o * .6 + 8 : o * 1.2 + 8, c = k.value > 0 ? Math.max(1, Math.ceil(s / k.value)) : 1;
|
|
2482
|
+
for (let t = 0; t < e; t += c) {
|
|
2389
2483
|
let e = j(t) + k.value / 2;
|
|
2390
2484
|
n.push({
|
|
2391
|
-
label:
|
|
2485
|
+
label: i[t],
|
|
2392
2486
|
pos: e,
|
|
2393
2487
|
anchor: "middle"
|
|
2394
2488
|
});
|
|
2395
2489
|
}
|
|
2396
2490
|
return n;
|
|
2397
|
-
}),
|
|
2491
|
+
}), _e = n(() => {
|
|
2398
2492
|
let e = [];
|
|
2399
2493
|
return x.value.forEach((t, n) => {
|
|
2400
2494
|
!t.legend || t.showInLegend === !1 || e.push({
|
|
2401
2495
|
label: t.legend,
|
|
2402
|
-
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
|
|
2403
2505
|
});
|
|
2404
2506
|
}), e;
|
|
2405
|
-
}),
|
|
2406
|
-
function
|
|
2507
|
+
}), ve = n(() => _e.value.map((e) => e.label));
|
|
2508
|
+
function Ce() {
|
|
2407
2509
|
if (typeof l.csv == "function") return l.csv();
|
|
2408
2510
|
if (typeof l.csv == "string") return l.csv;
|
|
2409
2511
|
let e = x.value.map((e) => ({
|
|
@@ -2412,8 +2514,8 @@ var Pt = {
|
|
|
2412
2514
|
}));
|
|
2413
2515
|
return Ve(w.value, e);
|
|
2414
2516
|
}
|
|
2415
|
-
let
|
|
2416
|
-
function
|
|
2517
|
+
let R = n(() => !!l.tooltipData || !!l.tooltipTrigger);
|
|
2518
|
+
function Te(e, t) {
|
|
2417
2519
|
if (!isFinite(e) || !isFinite(t) || k.value === 0) return null;
|
|
2418
2520
|
let n = (E.value ? B.value.left : B.value.top) + (e + .5) * k.value, r = M(t);
|
|
2419
2521
|
return E.value ? {
|
|
@@ -2424,15 +2526,15 @@ var Pt = {
|
|
|
2424
2526
|
y: n
|
|
2425
2527
|
};
|
|
2426
2528
|
}
|
|
2427
|
-
function
|
|
2428
|
-
let n =
|
|
2529
|
+
function Ee(e, t) {
|
|
2530
|
+
let n = De.value?.getBoundingClientRect();
|
|
2429
2531
|
if (!n) return null;
|
|
2430
2532
|
let r = C.value;
|
|
2431
2533
|
if (r === 0 || k.value === 0) return null;
|
|
2432
2534
|
let i = E.value ? e - n.left - B.value.left : t - n.top - B.value.top;
|
|
2433
2535
|
return Math.max(0, Math.min(r - 1, Math.floor(i / k.value)));
|
|
2434
2536
|
}
|
|
2435
|
-
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({
|
|
2436
2538
|
width: () => l.width,
|
|
2437
2539
|
height: () => l.height,
|
|
2438
2540
|
title: () => l.title,
|
|
@@ -2446,16 +2548,16 @@ var Pt = {
|
|
|
2446
2548
|
filename: () => l.filename,
|
|
2447
2549
|
downloadLink: () => l.downloadLink,
|
|
2448
2550
|
chartPadding: () => l.chartPadding,
|
|
2449
|
-
inlineLegendLabels: () =>
|
|
2450
|
-
hasTooltipSlot: () =>
|
|
2451
|
-
getCsv:
|
|
2452
|
-
pointerToIndex:
|
|
2551
|
+
inlineLegendLabels: () => ve.value,
|
|
2552
|
+
hasTooltipSlot: () => R.value,
|
|
2553
|
+
getCsv: Ce,
|
|
2554
|
+
pointerToIndex: Ee,
|
|
2453
2555
|
onHover: (e) => h("hover", e)
|
|
2454
|
-
}),
|
|
2556
|
+
}), q = n(() => z(l.axisLabelStyle, { fontSize: 13 })), J = n(() => z(l.tickLabelStyle, {
|
|
2455
2557
|
fontSize: 10,
|
|
2456
|
-
fillOpacity:
|
|
2457
|
-
})),
|
|
2458
|
-
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";
|
|
2459
2561
|
return {
|
|
2460
2562
|
lines: (l.title ?? "").split("\n"),
|
|
2461
2563
|
fontSize: e?.fontSize ?? 14,
|
|
@@ -2465,20 +2567,20 @@ var Pt = {
|
|
|
2465
2567
|
x: r,
|
|
2466
2568
|
anchor: i
|
|
2467
2569
|
};
|
|
2468
|
-
}),
|
|
2469
|
-
let e =
|
|
2570
|
+
}), He = n(() => {
|
|
2571
|
+
let e = Ne.value;
|
|
2470
2572
|
if (e === null) return;
|
|
2471
2573
|
let t = T.value;
|
|
2472
2574
|
return t && Number.isFinite(t[e]) ? Nt(t[e], l.dateFormat, "utc") : w.value[e];
|
|
2473
|
-
}),
|
|
2474
|
-
let e =
|
|
2575
|
+
}), Ue = n(() => {
|
|
2576
|
+
let e = Ne.value;
|
|
2475
2577
|
if (e === null) return null;
|
|
2476
2578
|
let t = x.value, n = [];
|
|
2477
2579
|
for (let r = 0; r < t.length; r++) {
|
|
2478
2580
|
let i = t[r];
|
|
2479
2581
|
i.showInTooltip !== !1 && n.push({
|
|
2480
2582
|
value: Number(i.data[e] ?? NaN),
|
|
2481
|
-
color: i.color ??
|
|
2583
|
+
color: i.color ?? pe(r),
|
|
2482
2584
|
seriesIndex: r
|
|
2483
2585
|
});
|
|
2484
2586
|
}
|
|
@@ -2488,8 +2590,8 @@ var Pt = {
|
|
|
2488
2590
|
values: n,
|
|
2489
2591
|
data: l.tooltipData?.[e] ?? null
|
|
2490
2592
|
};
|
|
2491
|
-
}),
|
|
2492
|
-
let e =
|
|
2593
|
+
}), Y = n(() => {
|
|
2594
|
+
let e = Ne.value;
|
|
2493
2595
|
if (e === null) return null;
|
|
2494
2596
|
let t = j(e);
|
|
2495
2597
|
return E.value ? {
|
|
@@ -2503,9 +2605,9 @@ var Pt = {
|
|
|
2503
2605
|
w: V.value,
|
|
2504
2606
|
h: k.value
|
|
2505
2607
|
};
|
|
2506
|
-
}),
|
|
2507
|
-
let e =
|
|
2508
|
-
return
|
|
2608
|
+
}), We = n(() => {
|
|
2609
|
+
let e = Me.value.positions, t = B.value.left, n = je.value;
|
|
2610
|
+
return _e.value.map((r, i) => {
|
|
2509
2611
|
let a = e[i];
|
|
2510
2612
|
return {
|
|
2511
2613
|
...r,
|
|
@@ -2516,63 +2618,73 @@ var Pt = {
|
|
|
2516
2618
|
});
|
|
2517
2619
|
return (n, c) => (_(), a("div", {
|
|
2518
2620
|
ref_key: "containerRef",
|
|
2519
|
-
ref:
|
|
2520
|
-
class: f(["bar-chart-wrapper", { "is-fullscreen": S(
|
|
2621
|
+
ref: De,
|
|
2622
|
+
class: f(["bar-chart-wrapper", { "is-fullscreen": S(Re) }])
|
|
2521
2623
|
}, [
|
|
2522
|
-
t.menu ? (_(), r(
|
|
2624
|
+
t.menu ? (_(), r(he, {
|
|
2523
2625
|
key: 0,
|
|
2524
|
-
items: S(
|
|
2626
|
+
items: S(Fe)
|
|
2525
2627
|
}, null, 8, ["items"])) : i("", !0),
|
|
2526
|
-
o("div", xn, b(S(
|
|
2628
|
+
o("div", xn, b(S(Re) ? "Chart expanded to fill window" : ""), 1),
|
|
2527
2629
|
(_(), a("svg", {
|
|
2528
2630
|
ref_key: "svgRef",
|
|
2529
|
-
ref:
|
|
2530
|
-
width: S(
|
|
2531
|
-
height: S(
|
|
2631
|
+
ref: Oe,
|
|
2632
|
+
width: S(ke),
|
|
2633
|
+
height: S(Ae)
|
|
2532
2634
|
}, [
|
|
2533
2635
|
t.title ? (_(), a("text", {
|
|
2534
2636
|
key: 0,
|
|
2535
|
-
x:
|
|
2536
|
-
y:
|
|
2537
|
-
"text-anchor":
|
|
2538
|
-
"font-size":
|
|
2539
|
-
"font-weight":
|
|
2540
|
-
fill:
|
|
2541
|
-
}, [(_(!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", {
|
|
2542
2644
|
key: t,
|
|
2543
|
-
x:
|
|
2544
|
-
dy: t === 0 ? 0 :
|
|
2645
|
+
x: Be.value.x,
|
|
2646
|
+
dy: t === 0 ? 0 : Be.value.lineHeight
|
|
2545
2647
|
}, b(e), 9, wn))), 128))], 8, Cn)) : i("", !0),
|
|
2546
|
-
|
|
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,
|
|
2547
2650
|
x: t.x,
|
|
2548
2651
|
y: t.y - 5,
|
|
2549
2652
|
width: "12",
|
|
2550
2653
|
height: "10",
|
|
2551
2654
|
fill: t.color
|
|
2552
|
-
}, 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", {
|
|
2553
2665
|
x: t.x + 18,
|
|
2554
2666
|
y: t.y + 4,
|
|
2555
|
-
"font-size":
|
|
2556
|
-
fill:
|
|
2557
|
-
"font-weight":
|
|
2558
|
-
}, 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),
|
|
2559
2671
|
o("line", {
|
|
2560
|
-
x1: S(
|
|
2561
|
-
y1: S(
|
|
2562
|
-
x2: S(
|
|
2563
|
-
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)),
|
|
2564
2676
|
stroke: "currentColor",
|
|
2565
2677
|
"stroke-opacity": "0.3"
|
|
2566
|
-
}, null, 8,
|
|
2678
|
+
}, null, 8, kn),
|
|
2567
2679
|
o("line", {
|
|
2568
|
-
x1: S(
|
|
2569
|
-
y1: S(
|
|
2570
|
-
x2: S(
|
|
2571
|
-
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)),
|
|
2572
2684
|
stroke: "currentColor",
|
|
2573
2685
|
"stroke-opacity": "0.3"
|
|
2574
|
-
}, null, 8,
|
|
2575
|
-
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", {
|
|
2576
2688
|
key: "vg" + t,
|
|
2577
2689
|
x1: E.value ? S(B).left : e.pos,
|
|
2578
2690
|
y1: E.value ? e.pos : S(B).top,
|
|
@@ -2580,81 +2692,81 @@ var Pt = {
|
|
|
2580
2692
|
y2: E.value ? e.pos : S(B).top + S(H),
|
|
2581
2693
|
stroke: "currentColor",
|
|
2582
2694
|
"stroke-opacity": "0.1"
|
|
2583
|
-
}, null, 8,
|
|
2584
|
-
|
|
2695
|
+
}, null, 8, jn))), 128)) : i("", !0),
|
|
2696
|
+
Y.value && R.value ? (_(), a("rect", {
|
|
2585
2697
|
key: 3,
|
|
2586
|
-
x:
|
|
2587
|
-
y:
|
|
2588
|
-
width:
|
|
2589
|
-
height:
|
|
2698
|
+
x: Y.value.x,
|
|
2699
|
+
y: Y.value.y,
|
|
2700
|
+
width: Y.value.w,
|
|
2701
|
+
height: Y.value.h,
|
|
2590
2702
|
fill: "currentColor",
|
|
2591
2703
|
"fill-opacity": "0.06",
|
|
2592
2704
|
"pointer-events": "none"
|
|
2593
|
-
}, null, 8,
|
|
2594
|
-
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", {
|
|
2595
2707
|
key: "vt" + t,
|
|
2596
2708
|
"data-testid": "value-tick",
|
|
2597
2709
|
x: S(B).left - 6,
|
|
2598
2710
|
y: e.pos,
|
|
2599
2711
|
"text-anchor": "end",
|
|
2600
2712
|
"dominant-baseline": "middle",
|
|
2601
|
-
"font-size":
|
|
2602
|
-
fill:
|
|
2603
|
-
"font-weight":
|
|
2604
|
-
"fill-opacity":
|
|
2605
|
-
}, 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", {
|
|
2606
2718
|
key: "vt" + t,
|
|
2607
2719
|
"data-testid": "value-tick",
|
|
2608
2720
|
x: e.pos,
|
|
2609
2721
|
y: S(B).top + S(H) + 16,
|
|
2610
2722
|
"text-anchor": "middle",
|
|
2611
|
-
"font-size":
|
|
2612
|
-
fill:
|
|
2613
|
-
"font-weight":
|
|
2614
|
-
"fill-opacity":
|
|
2615
|
-
}, 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)),
|
|
2616
2728
|
t.yLabel ? (_(), a("text", {
|
|
2617
2729
|
key: 6,
|
|
2618
2730
|
x: 0,
|
|
2619
2731
|
y: 0,
|
|
2620
2732
|
transform: `translate(14, ${S(B).top + S(H) / 2}) rotate(-90)`,
|
|
2621
2733
|
"text-anchor": "middle",
|
|
2622
|
-
"font-size":
|
|
2623
|
-
fill:
|
|
2624
|
-
"font-weight":
|
|
2625
|
-
}, b(t.yLabel), 9,
|
|
2626
|
-
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", {
|
|
2627
2739
|
key: "ct" + t,
|
|
2628
2740
|
"data-testid": "category-tick",
|
|
2629
2741
|
x: e.pos,
|
|
2630
2742
|
y: S(B).top + S(H) + 16,
|
|
2631
2743
|
"text-anchor": e.anchor,
|
|
2632
|
-
"font-size":
|
|
2633
|
-
fill:
|
|
2634
|
-
"font-weight":
|
|
2635
|
-
"fill-opacity":
|
|
2636
|
-
}, 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", {
|
|
2637
2749
|
key: "ct" + t,
|
|
2638
2750
|
"data-testid": "category-tick",
|
|
2639
2751
|
x: S(B).left - 6,
|
|
2640
2752
|
y: e.pos,
|
|
2641
2753
|
"text-anchor": "end",
|
|
2642
2754
|
"dominant-baseline": "middle",
|
|
2643
|
-
"font-size":
|
|
2644
|
-
fill:
|
|
2645
|
-
"font-weight":
|
|
2646
|
-
"fill-opacity":
|
|
2647
|
-
}, 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)),
|
|
2648
2760
|
t.xLabel ? (_(), a("text", {
|
|
2649
2761
|
key: 9,
|
|
2650
2762
|
x: S(B).left + S(V) / 2,
|
|
2651
|
-
y: S(
|
|
2763
|
+
y: S(Ae) - 4,
|
|
2652
2764
|
"text-anchor": "middle",
|
|
2653
|
-
"font-size":
|
|
2654
|
-
fill:
|
|
2655
|
-
"font-weight":
|
|
2656
|
-
}, b(t.xLabel), 9,
|
|
2657
|
-
(_(!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", {
|
|
2658
2770
|
key: "bar" + t,
|
|
2659
2771
|
"data-testid": "bar",
|
|
2660
2772
|
"data-category": e.categoryIndex,
|
|
@@ -2664,9 +2776,31 @@ var Pt = {
|
|
|
2664
2776
|
width: e.w,
|
|
2665
2777
|
height: e.h,
|
|
2666
2778
|
fill: e.color,
|
|
2667
|
-
"fill-opacity": e.opacity
|
|
2668
|
-
|
|
2669
|
-
|
|
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({
|
|
2670
2804
|
key: 10,
|
|
2671
2805
|
x: S(B).left,
|
|
2672
2806
|
y: S(B).top,
|
|
@@ -2677,43 +2811,43 @@ var Pt = {
|
|
|
2677
2811
|
cursor: "crosshair",
|
|
2678
2812
|
"touch-action": "none"
|
|
2679
2813
|
}
|
|
2680
|
-
}, te(S(
|
|
2681
|
-
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), {
|
|
2682
2816
|
key: 11,
|
|
2683
2817
|
annotations: t.annotations,
|
|
2684
|
-
project:
|
|
2685
|
-
bounds: S(
|
|
2818
|
+
project: Te,
|
|
2819
|
+
bounds: S(U)
|
|
2686
2820
|
}, null, 8, ["annotations", "bounds"])) : i("", !0)
|
|
2687
2821
|
], 8, Sn)),
|
|
2688
|
-
|
|
2822
|
+
R.value && S(Ne) !== null && Ue.value ? (_(), a("div", {
|
|
2689
2823
|
key: 1,
|
|
2690
2824
|
ref_key: "tooltipRef",
|
|
2691
|
-
ref:
|
|
2825
|
+
ref: Pe,
|
|
2692
2826
|
class: "chart-tooltip-content",
|
|
2693
2827
|
style: m({
|
|
2694
2828
|
position: "absolute",
|
|
2695
2829
|
top: "0",
|
|
2696
2830
|
left: "0",
|
|
2697
2831
|
willChange: "transform",
|
|
2698
|
-
transform: S(
|
|
2699
|
-
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"
|
|
2700
2834
|
})
|
|
2701
|
-
}, [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", {
|
|
2702
2836
|
key: e.seriesIndex,
|
|
2703
2837
|
class: "bar-chart-tooltip-row"
|
|
2704
2838
|
}, [o("span", {
|
|
2705
2839
|
class: "bar-chart-tooltip-swatch",
|
|
2706
2840
|
style: m({ background: e.color })
|
|
2707
|
-
}, null, 4), s(" " + b(isFinite(e.value) ? S(
|
|
2708
|
-
S(
|
|
2841
|
+
}, null, 4), s(" " + b(isFinite(e.value) ? S(me)(e.value) : "—"), 1)]))), 128))])], !0)], 4)) : i("", !0),
|
|
2842
|
+
S(K) ? (_(), a("a", {
|
|
2709
2843
|
key: 2,
|
|
2710
2844
|
class: "bar-chart-download-link",
|
|
2711
|
-
href: S(
|
|
2712
|
-
download: `${S(
|
|
2713
|
-
}, b(S(
|
|
2845
|
+
href: S(Ie),
|
|
2846
|
+
download: `${S(Le)()}.csv`
|
|
2847
|
+
}, b(S(K)), 9, Gn)) : i("", !0)
|
|
2714
2848
|
], 2));
|
|
2715
2849
|
}
|
|
2716
|
-
}), [["__scopeId", "data-v-
|
|
2850
|
+
}), [["__scopeId", "data-v-7b9c52ab"]]), qn = {
|
|
2717
2851
|
ref: "root",
|
|
2718
2852
|
class: "chart-tooltip-content",
|
|
2719
2853
|
style: {
|
|
@@ -2725,7 +2859,7 @@ var Pt = {
|
|
|
2725
2859
|
"pointer-events": "none",
|
|
2726
2860
|
transform: "translateY(-50%)"
|
|
2727
2861
|
}
|
|
2728
|
-
},
|
|
2862
|
+
}, Jn = /* @__PURE__ */ l({
|
|
2729
2863
|
__name: "ChoroplethTooltip",
|
|
2730
2864
|
setup(e, { expose: n }) {
|
|
2731
2865
|
let a = v(null), s = w("root");
|
|
@@ -2736,21 +2870,21 @@ var Pt = {
|
|
|
2736
2870
|
getEl() {
|
|
2737
2871
|
return s.value;
|
|
2738
2872
|
}
|
|
2739
|
-
}), (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)]));
|
|
2740
2874
|
}
|
|
2741
|
-
}),
|
|
2875
|
+
}), Yn = {
|
|
2742
2876
|
class: "chart-sr-only",
|
|
2743
2877
|
"aria-live": "polite"
|
|
2744
|
-
},
|
|
2878
|
+
}, Xn = {
|
|
2745
2879
|
key: 1,
|
|
2746
2880
|
class: "choropleth-header"
|
|
2747
|
-
},
|
|
2881
|
+
}, Zn = {
|
|
2748
2882
|
key: 0,
|
|
2749
2883
|
class: "choropleth-legend-title"
|
|
2750
|
-
},
|
|
2884
|
+
}, Qn = {
|
|
2751
2885
|
key: 2,
|
|
2752
2886
|
class: "choropleth-legend-continuous"
|
|
2753
|
-
},
|
|
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({
|
|
2754
2888
|
__name: "ChoroplethMap",
|
|
2755
2889
|
props: {
|
|
2756
2890
|
topology: {},
|
|
@@ -2808,56 +2942,56 @@ var Pt = {
|
|
|
2808
2942
|
width: "100%"
|
|
2809
2943
|
};
|
|
2810
2944
|
return e?.color && (t.color = e.color), t;
|
|
2811
|
-
}),
|
|
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 = {
|
|
2812
2946
|
width: 0,
|
|
2813
2947
|
height: 0
|
|
2814
|
-
},
|
|
2815
|
-
function
|
|
2816
|
-
if (
|
|
2948
|
+
}, xe = null, Se = !1, L = null, Ce = v(!1), we = 0, R = 0, z = 0;
|
|
2949
|
+
function Te() {
|
|
2950
|
+
if (ve) return;
|
|
2817
2951
|
let e = O.value;
|
|
2818
2952
|
e && (e.addEventListener("click", gt), e.addEventListener("mouseover", gt), e.addEventListener("mousemove", _t), e.addEventListener("mouseout", vt));
|
|
2819
2953
|
}
|
|
2820
|
-
function
|
|
2954
|
+
function Ee() {
|
|
2821
2955
|
let e = O.value;
|
|
2822
2956
|
e && (e.removeEventListener("click", gt), e.removeEventListener("mouseover", gt), e.removeEventListener("mousemove", _t), e.removeEventListener("mouseout", vt));
|
|
2823
2957
|
}
|
|
2824
|
-
function
|
|
2958
|
+
function De() {
|
|
2825
2959
|
Q();
|
|
2826
2960
|
}
|
|
2827
2961
|
h(() => {
|
|
2828
|
-
|
|
2962
|
+
Oe(), Te(), bt(), V(), st(), window.addEventListener("scroll", De, {
|
|
2829
2963
|
passive: !0,
|
|
2830
2964
|
capture: !0
|
|
2831
|
-
}), window.addEventListener("resize",
|
|
2965
|
+
}), window.addEventListener("resize", De, { passive: !0 });
|
|
2832
2966
|
}), g(() => {
|
|
2833
|
-
|
|
2967
|
+
ye?.disconnect(), z && cancelAnimationFrame(z), ke(), Ee(), window.removeEventListener("scroll", De, { capture: !0 }), window.removeEventListener("resize", De);
|
|
2834
2968
|
});
|
|
2835
|
-
function
|
|
2969
|
+
function Oe() {
|
|
2836
2970
|
if (!D.value || !O.value) return;
|
|
2837
|
-
let e =
|
|
2838
|
-
|
|
2839
|
-
|
|
2971
|
+
let e = ue(D.value), t = Math.max(12, l.focusZoomLevel);
|
|
2972
|
+
L = ce().scaleExtent([1, t]).on("start", () => {
|
|
2973
|
+
_e = !0, Q();
|
|
2840
2974
|
}).on("zoom", (e) => {
|
|
2841
2975
|
O.value && O.value.setAttribute("transform", e.transform);
|
|
2842
2976
|
let t = e.transform;
|
|
2843
|
-
|
|
2977
|
+
Ce.value = t.k !== 1 || t.x !== 0 || t.y !== 0;
|
|
2844
2978
|
}).on("end", () => {
|
|
2845
|
-
|
|
2846
|
-
}),
|
|
2847
|
-
let t =
|
|
2979
|
+
_e = !1;
|
|
2980
|
+
}), L.filter((e) => {
|
|
2981
|
+
let t = X.value.length > 0, n = !!l.zoom || t, r = !!l.pan || t;
|
|
2848
2982
|
if (e.type === "wheel" || e.type === "dblclick") {
|
|
2849
2983
|
if (!n) return !1;
|
|
2850
2984
|
} else if (e.type === "mousedown" || e.type === "touchstart") {
|
|
2851
2985
|
if (!r) return !1;
|
|
2852
2986
|
} else if (!n && !r) return !1;
|
|
2853
2987
|
return (!e.ctrlKey || e.type === "wheel") && !e.button;
|
|
2854
|
-
}), e.call(
|
|
2988
|
+
}), e.call(L);
|
|
2855
2989
|
}
|
|
2856
|
-
function
|
|
2857
|
-
D.value &&
|
|
2990
|
+
function ke() {
|
|
2991
|
+
D.value && L && (ue(D.value).on(".zoom", null), L = null);
|
|
2858
2992
|
}
|
|
2859
|
-
function
|
|
2860
|
-
let t =
|
|
2993
|
+
function Ae(e) {
|
|
2994
|
+
let t = Ge.value, n = Ue.value, r = [];
|
|
2861
2995
|
for (let i of e) {
|
|
2862
2996
|
let e = i.geoType ?? l.geoType, a = t.get(e);
|
|
2863
2997
|
if (!a) continue;
|
|
@@ -2875,76 +3009,76 @@ var Pt = {
|
|
|
2875
3009
|
}
|
|
2876
3010
|
return r;
|
|
2877
3011
|
}
|
|
2878
|
-
function
|
|
3012
|
+
function B(e) {
|
|
2879
3013
|
let t = /* @__PURE__ */ new Set();
|
|
2880
|
-
for (let n of
|
|
3014
|
+
for (let n of Ae(e)) n.geoType === l.geoType && t.add(String(n.feature.id));
|
|
2881
3015
|
return t;
|
|
2882
3016
|
}
|
|
2883
|
-
let
|
|
2884
|
-
function
|
|
2885
|
-
if (!D.value || !
|
|
2886
|
-
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();
|
|
2887
3021
|
for (let e of t) {
|
|
2888
|
-
let t =
|
|
3022
|
+
let t = P.get(String(e.feature.id));
|
|
2889
3023
|
t && r.set(t, e.item.style ?? "solid");
|
|
2890
3024
|
}
|
|
2891
|
-
for (let [e] of
|
|
2892
|
-
for (let [e, t] of r)
|
|
2893
|
-
|
|
2894
|
-
for (let [e, t] of r)
|
|
2895
|
-
if (
|
|
2896
|
-
|
|
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();
|
|
2897
3031
|
return;
|
|
2898
3032
|
}
|
|
2899
|
-
let i =
|
|
3033
|
+
let i = ue(D.value);
|
|
2900
3034
|
i.interrupt();
|
|
2901
|
-
let a =
|
|
2902
|
-
|
|
3035
|
+
let a = je;
|
|
3036
|
+
je = !0;
|
|
2903
3037
|
let [[o, s], [c, u]] = Ve.value.bounds({
|
|
2904
3038
|
type: "FeatureCollection",
|
|
2905
3039
|
features: e.map((e) => e.feature)
|
|
2906
|
-
}), 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 = () => {
|
|
2907
3041
|
if (!j.value || !h) return;
|
|
2908
|
-
let e = String(h.id), t =
|
|
3042
|
+
let e = String(h.id), t = P.get(e);
|
|
2909
3043
|
if (!t) return;
|
|
2910
3044
|
let n = t.getBoundingClientRect();
|
|
2911
|
-
|
|
3045
|
+
lt(e, n.left + n.width / 2, n.top + n.height / 2);
|
|
2912
3046
|
};
|
|
2913
|
-
a ? (
|
|
3047
|
+
a ? (dt(), i.transition().duration(rr).call(L.transform, m).on("end", g)) : (L.transform(i, m), g());
|
|
2914
3048
|
}
|
|
2915
|
-
function
|
|
3049
|
+
function H(e) {
|
|
2916
3050
|
let t = k.value;
|
|
2917
3051
|
if (!t) return;
|
|
2918
3052
|
let n = new Set(e.map((e) => e.key));
|
|
2919
|
-
for (let [e, t] of
|
|
3053
|
+
for (let [e, t] of ge) n.has(e) || (t.remove(), ge.delete(e));
|
|
2920
3054
|
let r = Ve.value, i = He.value + 1.5;
|
|
2921
3055
|
for (let { item: n, feature: a, key: o } of e) {
|
|
2922
|
-
let e =
|
|
2923
|
-
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);
|
|
2924
3058
|
}
|
|
2925
3059
|
}
|
|
2926
3060
|
function U() {
|
|
2927
|
-
if (!D.value || !
|
|
2928
|
-
|
|
2929
|
-
let e =
|
|
2930
|
-
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);
|
|
2931
3065
|
}
|
|
2932
3066
|
T(() => l.focusZoomLevel, () => {
|
|
2933
|
-
|
|
3067
|
+
L && L.scaleExtent([1, Math.max(12, l.focusZoomLevel)]), V();
|
|
2934
3068
|
});
|
|
2935
|
-
let Ne = n(() => l.width && l.height ? l.height / l.width : .625), Pe = n(() =>
|
|
2936
|
-
function
|
|
2937
|
-
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;
|
|
2938
3072
|
}
|
|
2939
3073
|
T(() => {
|
|
2940
3074
|
if (l.geoType === "hsas" || l.dataGeoType === "hsas") return !0;
|
|
2941
3075
|
let e = l.focus;
|
|
2942
3076
|
return e ? (Array.isArray(e) ? e : [e]).some((e) => typeof e != "string" && e.geoType === "hsas") : !1;
|
|
2943
3077
|
}, (e) => {
|
|
2944
|
-
e &&
|
|
3078
|
+
e && Le();
|
|
2945
3079
|
}, { immediate: !0 });
|
|
2946
|
-
let
|
|
2947
|
-
let e =
|
|
3080
|
+
let Re = n(() => {
|
|
3081
|
+
let e = K.value;
|
|
2948
3082
|
if (!e) return {
|
|
2949
3083
|
type: "FeatureCollection",
|
|
2950
3084
|
features: []
|
|
@@ -2959,49 +3093,49 @@ var Pt = {
|
|
|
2959
3093
|
type: "Feature",
|
|
2960
3094
|
id: e,
|
|
2961
3095
|
properties: { name: n[e] ?? e },
|
|
2962
|
-
geometry:
|
|
3096
|
+
geometry: de(r, t)
|
|
2963
3097
|
});
|
|
2964
3098
|
return {
|
|
2965
3099
|
type: "FeatureCollection",
|
|
2966
3100
|
features: o
|
|
2967
3101
|
};
|
|
2968
|
-
}),
|
|
2969
|
-
if (l.geoType === "hsas") return
|
|
3102
|
+
}), q = n(() => {
|
|
3103
|
+
if (l.geoType === "hsas") return Re.value;
|
|
2970
3104
|
if (l.geoType === "counties") {
|
|
2971
3105
|
let e = x(l.topology);
|
|
2972
|
-
return
|
|
3106
|
+
return N(e, e.objects.counties);
|
|
2973
3107
|
}
|
|
2974
3108
|
let e = x(l.topology);
|
|
2975
|
-
return
|
|
3109
|
+
return N(e, e.objects.states);
|
|
2976
3110
|
}), ze = n(() => {
|
|
2977
3111
|
if (l.geoType !== "counties" && l.geoType !== "hsas") return null;
|
|
2978
3112
|
let e = x(l.topology);
|
|
2979
|
-
return
|
|
2980
|
-
}), 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(() => {
|
|
2981
3115
|
let e = /* @__PURE__ */ new Map();
|
|
2982
|
-
for (let [t, n] of
|
|
3116
|
+
for (let [t, n] of Ge.value) {
|
|
2983
3117
|
let r = /* @__PURE__ */ new Map();
|
|
2984
3118
|
for (let [e, t] of n) t.properties?.name != null && r.set(t.properties.name, e);
|
|
2985
3119
|
e.set(t, r);
|
|
2986
3120
|
}
|
|
2987
3121
|
return e;
|
|
2988
3122
|
});
|
|
2989
|
-
function
|
|
3123
|
+
function Y(e) {
|
|
2990
3124
|
let t = l.dataGeoType;
|
|
2991
3125
|
if (!t || t === l.geoType) return e;
|
|
2992
|
-
if (l.geoType === "counties" && t === "hsas") return
|
|
3126
|
+
if (l.geoType === "counties" && t === "hsas") return K.value?.fipsToHsa[e];
|
|
2993
3127
|
if (l.geoType === "counties" && t === "states" || l.geoType === "hsas" && t === "states") return e.slice(0, 2);
|
|
2994
3128
|
}
|
|
2995
|
-
let
|
|
3129
|
+
let We = n(() => {
|
|
2996
3130
|
let e = /* @__PURE__ */ new Map();
|
|
2997
|
-
for (let t of
|
|
3131
|
+
for (let t of q.value.features) t.id != null && e.set(String(t.id), t);
|
|
2998
3132
|
return e;
|
|
2999
|
-
}),
|
|
3133
|
+
}), X = n(() => {
|
|
3000
3134
|
let e = l.focus;
|
|
3001
3135
|
return e == null ? [] : (Array.isArray(e) ? e : [e]).map((e) => typeof e == "string" ? { id: e } : e);
|
|
3002
|
-
}),
|
|
3136
|
+
}), Ge = n(() => {
|
|
3003
3137
|
let e = /* @__PURE__ */ new Map();
|
|
3004
|
-
e.set(l.geoType,
|
|
3138
|
+
e.set(l.geoType, We.value);
|
|
3005
3139
|
let t = x(l.topology), n = t?.objects;
|
|
3006
3140
|
if (!n) return e;
|
|
3007
3141
|
let r = (e) => {
|
|
@@ -3010,15 +3144,15 @@ var Pt = {
|
|
|
3010
3144
|
return t;
|
|
3011
3145
|
};
|
|
3012
3146
|
if (!e.has("states") && n.states) {
|
|
3013
|
-
let i =
|
|
3147
|
+
let i = N(t, n.states);
|
|
3014
3148
|
e.set("states", r(i.features));
|
|
3015
3149
|
}
|
|
3016
3150
|
if (!e.has("counties") && n.counties) {
|
|
3017
|
-
let i =
|
|
3151
|
+
let i = N(t, n.counties);
|
|
3018
3152
|
e.set("counties", r(i.features));
|
|
3019
3153
|
}
|
|
3020
|
-
return !e.has("hsas") && n.counties && e.set("hsas", r(
|
|
3021
|
-
}),
|
|
3154
|
+
return !e.has("hsas") && n.counties && e.set("hsas", r(Re.value.features)), e;
|
|
3155
|
+
}), Ke = n(() => {
|
|
3022
3156
|
let e = /* @__PURE__ */ new Map();
|
|
3023
3157
|
if (!l.data) return e;
|
|
3024
3158
|
let t = l.dataGeoType ?? l.geoType, n = Ue.value.get(t);
|
|
@@ -3028,7 +3162,7 @@ var Pt = {
|
|
|
3028
3162
|
r && e.set(r, t.value);
|
|
3029
3163
|
}
|
|
3030
3164
|
return e;
|
|
3031
|
-
}),
|
|
3165
|
+
}), qe = n(() => {
|
|
3032
3166
|
if (!l.data || l.data.length === 0) return {
|
|
3033
3167
|
min: 0,
|
|
3034
3168
|
max: 1
|
|
@@ -3045,8 +3179,8 @@ var Pt = {
|
|
|
3045
3179
|
min: 0,
|
|
3046
3180
|
max: 1
|
|
3047
3181
|
};
|
|
3048
|
-
}),
|
|
3049
|
-
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) {
|
|
3050
3184
|
let t = e.replace("#", "");
|
|
3051
3185
|
return [
|
|
3052
3186
|
parseInt(t.slice(0, 2), 16),
|
|
@@ -3054,100 +3188,100 @@ var Pt = {
|
|
|
3054
3188
|
parseInt(t.slice(4, 6), 16)
|
|
3055
3189
|
];
|
|
3056
3190
|
}
|
|
3057
|
-
function
|
|
3058
|
-
let [t, n, r] =
|
|
3191
|
+
function $e(e) {
|
|
3192
|
+
let [t, n, r] = Qe(Xe.value), [i, a, o] = Qe(Ze.value);
|
|
3059
3193
|
return `rgb(${Math.round(t + (i - t) * e)},${Math.round(n + (a - n) * e)},${Math.round(r + (o - r) * e)})`;
|
|
3060
3194
|
}
|
|
3061
|
-
let
|
|
3062
|
-
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;
|
|
3063
3197
|
let e = /* @__PURE__ */ new Map();
|
|
3064
3198
|
for (let t of l.colorScale) e.set(t.value, t.color);
|
|
3065
3199
|
return e;
|
|
3066
3200
|
});
|
|
3067
|
-
function
|
|
3068
|
-
let t =
|
|
3069
|
-
return t == null ? void 0 :
|
|
3201
|
+
function nt(e) {
|
|
3202
|
+
let t = Y(e);
|
|
3203
|
+
return t == null ? void 0 : Ke.value.get(t);
|
|
3070
3204
|
}
|
|
3071
|
-
function
|
|
3072
|
-
let t =
|
|
3205
|
+
function rt(e) {
|
|
3206
|
+
let t = nt(e), n = l.noDataColor;
|
|
3073
3207
|
if (t == null) return n;
|
|
3074
|
-
let r =
|
|
3208
|
+
let r = tt.value;
|
|
3075
3209
|
if (r) return r.get(String(t)) ?? n;
|
|
3076
|
-
let i =
|
|
3210
|
+
let i = et.value;
|
|
3077
3211
|
if (i) {
|
|
3078
3212
|
let e = t;
|
|
3079
3213
|
for (let t of i) if (e >= t.min) return t.color;
|
|
3080
3214
|
return n;
|
|
3081
3215
|
}
|
|
3082
|
-
let { min: a, max: o } =
|
|
3083
|
-
return
|
|
3216
|
+
let { min: a, max: o } = qe.value;
|
|
3217
|
+
return $e((t - a) / (o - a));
|
|
3084
3218
|
}
|
|
3085
|
-
let
|
|
3086
|
-
function
|
|
3219
|
+
let it = (e) => e.properties?.name ?? String(e.id);
|
|
3220
|
+
function at(e) {
|
|
3087
3221
|
return e == null ? "" : typeof e == "number" && l.tooltipValueFormat !== void 0 ? ne(e, l.tooltipValueFormat) : String(e);
|
|
3088
3222
|
}
|
|
3089
|
-
function
|
|
3090
|
-
return t == null ? e : `${e}: ${
|
|
3223
|
+
function ot(e, t) {
|
|
3224
|
+
return t == null ? e : `${e}: ${at(t)}`;
|
|
3091
3225
|
}
|
|
3092
|
-
function
|
|
3226
|
+
function st() {
|
|
3093
3227
|
let e = A.value?.getEl();
|
|
3094
3228
|
if (!e) return;
|
|
3095
|
-
|
|
3229
|
+
ye?.disconnect();
|
|
3096
3230
|
let t = !1;
|
|
3097
|
-
|
|
3231
|
+
ye = new ResizeObserver((e) => {
|
|
3098
3232
|
let n = e[0]?.contentRect;
|
|
3099
|
-
n && (
|
|
3100
|
-
}),
|
|
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);
|
|
3101
3235
|
}
|
|
3102
|
-
function
|
|
3236
|
+
function ct(e, t) {
|
|
3103
3237
|
let n = A.value?.getEl();
|
|
3104
3238
|
if (!n) return;
|
|
3105
|
-
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);
|
|
3106
3240
|
n.style.transform = `translate3d(${i}px, ${a}px, 0) translateY(-50%)`;
|
|
3107
3241
|
}
|
|
3108
|
-
function
|
|
3109
|
-
let r =
|
|
3242
|
+
function lt(e, t, n) {
|
|
3243
|
+
let r = pe.get(e);
|
|
3110
3244
|
if (!r) return;
|
|
3111
3245
|
let i = A.value, a = i?.getEl();
|
|
3112
|
-
!i || !a || (i.setData(r),
|
|
3246
|
+
!i || !a || (i.setData(r), xe = {
|
|
3113
3247
|
x: t,
|
|
3114
3248
|
y: n
|
|
3115
|
-
},
|
|
3249
|
+
}, Se = !0, ct(t, n), a.style.visibility = "visible");
|
|
3116
3250
|
}
|
|
3117
|
-
function
|
|
3118
|
-
|
|
3251
|
+
function ut(e, t) {
|
|
3252
|
+
Se && (we = e, R = t, !z && (z = requestAnimationFrame(() => {
|
|
3119
3253
|
z = 0;
|
|
3120
3254
|
let e = A.value?.getEl();
|
|
3121
|
-
!e || !
|
|
3122
|
-
x:
|
|
3123
|
-
y:
|
|
3124
|
-
}, 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%)`);
|
|
3125
3259
|
})));
|
|
3126
3260
|
}
|
|
3127
|
-
function
|
|
3128
|
-
if (!
|
|
3129
|
-
|
|
3261
|
+
function dt() {
|
|
3262
|
+
if (!Se) return;
|
|
3263
|
+
Se = !1, xe = null;
|
|
3130
3264
|
let e = A.value?.getEl();
|
|
3131
3265
|
e && (e.style.visibility = "hidden");
|
|
3132
3266
|
}
|
|
3133
|
-
function
|
|
3267
|
+
function ft(e, t) {
|
|
3134
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"));
|
|
3135
3269
|
}
|
|
3136
|
-
function
|
|
3137
|
-
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);
|
|
3138
3272
|
}
|
|
3139
|
-
function
|
|
3273
|
+
function Z(e) {
|
|
3140
3274
|
e.setAttribute("stroke-width", String(He.value)), e.setAttribute("stroke", l.strokeColor), e.removeAttribute("stroke-dasharray"), e.removeAttribute("stroke-linecap");
|
|
3141
3275
|
}
|
|
3142
|
-
function
|
|
3143
|
-
|
|
3276
|
+
function mt(e) {
|
|
3277
|
+
F !== e && (F && !I.has(F) && Z(F), F = e, pt(e, I.get(e) ?? "solid"));
|
|
3144
3278
|
}
|
|
3145
3279
|
function Q() {
|
|
3146
|
-
if (
|
|
3147
|
-
let e =
|
|
3148
|
-
e == null ?
|
|
3280
|
+
if (F) {
|
|
3281
|
+
let e = I.get(F);
|
|
3282
|
+
e == null ? Z(F) : pt(F, e), F = null, d("stateHover", null);
|
|
3149
3283
|
}
|
|
3150
|
-
|
|
3284
|
+
dt();
|
|
3151
3285
|
}
|
|
3152
3286
|
function ht(e) {
|
|
3153
3287
|
let t = e;
|
|
@@ -3155,27 +3289,27 @@ var Pt = {
|
|
|
3155
3289
|
return t ? t.dataset.featId ?? null : null;
|
|
3156
3290
|
}
|
|
3157
3291
|
function gt(e) {
|
|
3158
|
-
if (
|
|
3292
|
+
if (_e) return;
|
|
3159
3293
|
let t = e, n = ht(t.target);
|
|
3160
3294
|
if (!n) return;
|
|
3161
|
-
let r =
|
|
3295
|
+
let r = pe.get(n);
|
|
3162
3296
|
if (!r) return;
|
|
3163
3297
|
let i = {
|
|
3164
3298
|
id: r.id,
|
|
3165
3299
|
name: r.name,
|
|
3166
3300
|
value: r.value
|
|
3167
3301
|
};
|
|
3168
|
-
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));
|
|
3169
3303
|
}
|
|
3170
3304
|
function _t(e) {
|
|
3171
|
-
|
|
3305
|
+
_e || ut(e.clientX, e.clientY);
|
|
3172
3306
|
}
|
|
3173
3307
|
function vt(e) {
|
|
3174
3308
|
let t = e.relatedTarget;
|
|
3175
3309
|
t && O.value?.contains(t) || Q();
|
|
3176
3310
|
}
|
|
3177
3311
|
function yt(e) {
|
|
3178
|
-
let t = document.createElementNS(
|
|
3312
|
+
let t = document.createElementNS(nr, "path");
|
|
3179
3313
|
return e && t.setAttribute("d", e), t;
|
|
3180
3314
|
}
|
|
3181
3315
|
function bt() {
|
|
@@ -3183,15 +3317,15 @@ var Pt = {
|
|
|
3183
3317
|
if (!e || !t) return;
|
|
3184
3318
|
for (; e.firstChild;) e.removeChild(e.firstChild);
|
|
3185
3319
|
for (; t.firstChild;) t.removeChild(t.firstChild);
|
|
3186
|
-
|
|
3187
|
-
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();
|
|
3188
3322
|
for (let e of r) {
|
|
3189
|
-
let t = String(e.id), r =
|
|
3190
|
-
if (l.setAttribute("class", "state-path"), l.setAttribute("data-feat-id", t), l.setAttribute("fill",
|
|
3191
|
-
let e = document.createElementNS(
|
|
3192
|
-
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);
|
|
3193
3327
|
}
|
|
3194
|
-
s.appendChild(l),
|
|
3328
|
+
s.appendChild(l), P.set(t, l), pe.set(t, {
|
|
3195
3329
|
id: t,
|
|
3196
3330
|
name: r,
|
|
3197
3331
|
value: c,
|
|
@@ -3201,34 +3335,34 @@ var Pt = {
|
|
|
3201
3335
|
let c = ze.value;
|
|
3202
3336
|
if (c) {
|
|
3203
3337
|
let e = yt(n(c));
|
|
3204
|
-
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;
|
|
3205
3339
|
}
|
|
3206
3340
|
e.appendChild(s);
|
|
3207
3341
|
}
|
|
3208
3342
|
function xt() {
|
|
3209
3343
|
let e = !j.value;
|
|
3210
|
-
for (let [t, n] of
|
|
3211
|
-
let r =
|
|
3212
|
-
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) {
|
|
3213
3347
|
let e = n.firstElementChild;
|
|
3214
|
-
e && (e.textContent =
|
|
3348
|
+
e && (e.textContent = ot(i.name, r));
|
|
3215
3349
|
}
|
|
3216
3350
|
}
|
|
3217
3351
|
}
|
|
3218
3352
|
function St() {
|
|
3219
|
-
for (let e of
|
|
3220
|
-
|
|
3353
|
+
for (let e of P.values()) e === F || I.has(e) || Z(e);
|
|
3354
|
+
me && me.setAttribute("stroke", l.strokeColor);
|
|
3221
3355
|
}
|
|
3222
3356
|
function Ct() {
|
|
3223
3357
|
return typeof l.menu == "string" ? l.menu : "choropleth";
|
|
3224
3358
|
}
|
|
3225
|
-
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(() => {
|
|
3226
3360
|
let e = [];
|
|
3227
3361
|
for (let t = 0; t <= 10; t++) {
|
|
3228
3362
|
let n = t / 10;
|
|
3229
3363
|
e.push({
|
|
3230
3364
|
offset: `${(n * 100).toFixed(0)}%`,
|
|
3231
|
-
color:
|
|
3365
|
+
color: $e(n)
|
|
3232
3366
|
});
|
|
3233
3367
|
}
|
|
3234
3368
|
return e;
|
|
@@ -3236,7 +3370,7 @@ var Pt = {
|
|
|
3236
3370
|
notation: "compact",
|
|
3237
3371
|
maximumFractionDigits: 1
|
|
3238
3372
|
}), Ot = n(() => {
|
|
3239
|
-
let { min: e, max: t } =
|
|
3373
|
+
let { min: e, max: t } = qe.value, n = t - e, r = [];
|
|
3240
3374
|
for (let t = 1; t <= 3; t++) {
|
|
3241
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$/, "");
|
|
3242
3376
|
r.push({
|
|
@@ -3247,18 +3381,18 @@ var Pt = {
|
|
|
3247
3381
|
return r;
|
|
3248
3382
|
}), kt = n(() => {
|
|
3249
3383
|
let e = [];
|
|
3250
|
-
if (
|
|
3384
|
+
if (Je.value) for (let t of l.colorScale) e.push({
|
|
3251
3385
|
key: t.value,
|
|
3252
3386
|
color: t.color,
|
|
3253
3387
|
label: t.value
|
|
3254
3388
|
});
|
|
3255
|
-
else if (
|
|
3389
|
+
else if (Ye.value) for (let t of Tt.value) e.push({
|
|
3256
3390
|
key: String(t.min),
|
|
3257
3391
|
color: t.color,
|
|
3258
3392
|
label: t.label ?? String(t.min)
|
|
3259
3393
|
});
|
|
3260
3394
|
return e;
|
|
3261
|
-
}), $ = 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(() => {
|
|
3262
3396
|
let e = Ct();
|
|
3263
3397
|
return [
|
|
3264
3398
|
At.menuItem.value,
|
|
@@ -3271,21 +3405,21 @@ var Pt = {
|
|
|
3271
3405
|
{
|
|
3272
3406
|
label: "Save as PNG",
|
|
3273
3407
|
action: () => {
|
|
3274
|
-
D.value &&
|
|
3408
|
+
D.value && Fe(D.value, e);
|
|
3275
3409
|
}
|
|
3276
3410
|
}
|
|
3277
3411
|
];
|
|
3278
3412
|
});
|
|
3279
3413
|
return T(() => [Ve.value, j.value], () => bt()), T(() => [
|
|
3280
|
-
|
|
3414
|
+
Ke.value,
|
|
3281
3415
|
l.colorScale,
|
|
3282
3416
|
l.noDataColor,
|
|
3283
3417
|
l.dataGeoType
|
|
3284
3418
|
], () => xt()), T(() => [l.strokeColor, He.value], () => St()), T(() => [
|
|
3285
|
-
|
|
3419
|
+
X.value,
|
|
3286
3420
|
Ve.value,
|
|
3287
|
-
|
|
3288
|
-
], () =>
|
|
3421
|
+
K.value
|
|
3422
|
+
], () => V(), { flush: "post" }), (n, c) => (_(), a("div", {
|
|
3289
3423
|
ref_key: "containerRef",
|
|
3290
3424
|
ref: w,
|
|
3291
3425
|
class: f(["choropleth-wrapper", {
|
|
@@ -3293,12 +3427,12 @@ var Pt = {
|
|
|
3293
3427
|
"is-fullscreen": S(At).isFullscreen.value
|
|
3294
3428
|
}])
|
|
3295
3429
|
}, [
|
|
3296
|
-
t.menu ? (_(), r(
|
|
3430
|
+
t.menu ? (_(), r(he, {
|
|
3297
3431
|
key: 0,
|
|
3298
3432
|
items: jt.value
|
|
3299
3433
|
}, null, 8, ["items"])) : i("", !0),
|
|
3300
|
-
o("div",
|
|
3301
|
-
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", {
|
|
3302
3436
|
key: 0,
|
|
3303
3437
|
class: "choropleth-title",
|
|
3304
3438
|
style: m(M.value)
|
|
@@ -3306,16 +3440,16 @@ var Pt = {
|
|
|
3306
3440
|
key: 1,
|
|
3307
3441
|
class: "choropleth-legend",
|
|
3308
3442
|
style: m(ae.value)
|
|
3309
|
-
}, [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", {
|
|
3310
3444
|
key: e.key,
|
|
3311
3445
|
class: "choropleth-legend-item"
|
|
3312
3446
|
}, [o("span", {
|
|
3313
3447
|
class: "choropleth-legend-swatch",
|
|
3314
3448
|
style: m({ background: e.color })
|
|
3315
|
-
}, null, 4), s(" " + b(e.label), 1)]))), 128)) : (_(), a("div",
|
|
3449
|
+
}, null, 4), s(" " + b(e.label), 1)]))), 128)) : (_(), a("div", Qn, [o("div", {
|
|
3316
3450
|
class: "choropleth-legend-gradient",
|
|
3317
3451
|
style: m({ background: $.value })
|
|
3318
|
-
}, null, 4), o("div",
|
|
3452
|
+
}, null, 4), o("div", $n, [(_(!0), a(e, null, y(Ot.value, (e) => (_(), a("span", {
|
|
3319
3453
|
key: e.value,
|
|
3320
3454
|
style: m({ left: e.pct + "%" })
|
|
3321
3455
|
}, b(e.value), 5))), 128))])]))], 4)) : i("", !0)])) : i("", !0),
|
|
@@ -3333,15 +3467,15 @@ var Pt = {
|
|
|
3333
3467
|
}, null, 512), o("g", {
|
|
3334
3468
|
ref_key: "overlayGroupRef",
|
|
3335
3469
|
ref: k
|
|
3336
|
-
}, null, 512)], 512)], 8,
|
|
3337
|
-
|
|
3470
|
+
}, null, 512)], 512)], 8, er)),
|
|
3471
|
+
Ce.value ? (_(), a("button", {
|
|
3338
3472
|
key: 2,
|
|
3339
3473
|
type: "button",
|
|
3340
3474
|
class: "choropleth-reset",
|
|
3341
3475
|
"aria-label": "Reset zoom",
|
|
3342
3476
|
onClick: U
|
|
3343
3477
|
}, " Reset ")) : i("", !0),
|
|
3344
|
-
j.value ? (_(), r(
|
|
3478
|
+
j.value ? (_(), r(Jn, {
|
|
3345
3479
|
key: 3,
|
|
3346
3480
|
ref_key: "tooltipChildRef",
|
|
3347
3481
|
ref: A
|
|
@@ -3349,12 +3483,12 @@ var Pt = {
|
|
|
3349
3483
|
default: E((r) => [ee(n.$slots, "tooltip", p(u(te(r))), () => [t.tooltipFormat ? (_(), a("span", {
|
|
3350
3484
|
key: 0,
|
|
3351
3485
|
innerHTML: t.tooltipFormat(r)
|
|
3352
|
-
}, 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)]),
|
|
3353
3487
|
_: 3
|
|
3354
3488
|
}, 512)) : i("", !0)
|
|
3355
3489
|
], 2));
|
|
3356
3490
|
}
|
|
3357
|
-
}), [["__scopeId", "data-v-b11a80ed"]]),
|
|
3491
|
+
}), [["__scopeId", "data-v-b11a80ed"]]), or = /* @__PURE__ */ F(/* @__PURE__ */ l({
|
|
3358
3492
|
__name: "ChartTooltip",
|
|
3359
3493
|
props: {
|
|
3360
3494
|
x: {},
|
|
@@ -3405,7 +3539,7 @@ var Pt = {
|
|
|
3405
3539
|
_: 3
|
|
3406
3540
|
}, 8, ["open"])) : i("", !0);
|
|
3407
3541
|
}
|
|
3408
|
-
}), [["__scopeId", "data-v-44377f70"]]),
|
|
3542
|
+
}), [["__scopeId", "data-v-44377f70"]]), sr = { class: "TableWrapper" }, cr = /* @__PURE__ */ F(/* @__PURE__ */ l({
|
|
3409
3543
|
__name: "DataTable",
|
|
3410
3544
|
props: {
|
|
3411
3545
|
data: {},
|
|
@@ -3496,16 +3630,16 @@ var Pt = {
|
|
|
3496
3630
|
}
|
|
3497
3631
|
let S = n(() => [{
|
|
3498
3632
|
label: c.downloadMenuLink,
|
|
3499
|
-
action: () =>
|
|
3633
|
+
action: () => K(x(), ee())
|
|
3500
3634
|
}]), C = n(() => !!c.menu);
|
|
3501
3635
|
return (n, s) => (_(), a("div", { class: f(["TableOuter", {
|
|
3502
3636
|
"full-width": t.fullWidth,
|
|
3503
3637
|
"has-menu": C.value
|
|
3504
|
-
}]) }, [C.value ? (_(), r(
|
|
3638
|
+
}]) }, [C.value ? (_(), r(he, {
|
|
3505
3639
|
key: 0,
|
|
3506
3640
|
items: S.value,
|
|
3507
3641
|
"force-dropdown": ""
|
|
3508
|
-
}, 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 }]) }, [
|
|
3509
3643
|
o("colgroup", null, [(_(!0), a(e, null, y(h.value, (e) => (_(), a("col", {
|
|
3510
3644
|
key: e.name,
|
|
3511
3645
|
style: m(u(e.name))
|
|
@@ -3523,4 +3657,4 @@ var Pt = {
|
|
|
3523
3657
|
}
|
|
3524
3658
|
}), [["__scopeId", "data-v-d6b3bce8"]]);
|
|
3525
3659
|
//#endregion
|
|
3526
|
-
export {
|
|
3660
|
+
export { Kn as BarChart, or as ChartTooltip, ar as ChoroplethMap, cr as DataTable, bn as LineChart };
|