@adyen/lume-vue3 1.7.0 → 1.9.0
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/@types/components/charts/lume-alluvial-diagram/lume-alluvial-diagram.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-alluvial-diagram/lume-alluvial-diagram.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-bar-chart/lume-bar-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-bar-chart/lume-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-grouped-bar-chart/lume-grouped-bar-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-grouped-bar-chart/lume-grouped-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-line-chart/lume-line-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-line-chart/lume-line-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-single-bar-chart/lume-single-bar-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-single-bar-chart/lume-single-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-sparkline-chart/lume-sparkline-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-sparkline-chart/lume-sparkline-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/charts/lume-stacked-bar-chart/defaults.d.ts +1 -1
- package/dist/@types/components/charts/lume-stacked-bar-chart/lume-stacked-bar-chart.vue.d.ts +2 -0
- package/dist/@types/components/charts/lume-stacked-bar-chart/lume-stacked-bar-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-chart/lume-chart.vue.d.ts +2 -0
- package/dist/@types/components/core/lume-chart/lume-chart.vue.d.ts.map +1 -1
- package/dist/@types/components/core/lume-tooltip/lume-tooltip.vue.d.ts +9 -0
- package/dist/@types/components/core/lume-tooltip/lume-tooltip.vue.d.ts.map +1 -1
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-header/index.d.ts +2 -0
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-header/index.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-header/lume-alluvial-node-header.vue.d.ts +30 -0
- package/dist/@types/components/groups/lume-alluvial-group/components/lume-alluvial-node-header/lume-alluvial-node-header.vue.d.ts.map +1 -0
- package/dist/@types/components/groups/lume-alluvial-group/lume-alluvial-group.vue.d.ts +4 -1
- package/dist/@types/components/groups/lume-alluvial-group/lume-alluvial-group.vue.d.ts.map +1 -1
- package/dist/@types/components/index.d.ts +1 -0
- package/dist/@types/components/index.d.ts.map +1 -1
- package/dist/@types/composables/events.d.ts.map +1 -1
- package/dist/@types/docs/storybook-helpers.d.ts.map +1 -1
- package/dist/@types/types/events.d.ts +1 -0
- package/dist/@types/types/events.d.ts.map +1 -1
- package/dist/index.js +1029 -986
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +32 -31
- package/dist/plugin.js.map +1 -1
- package/dist/scss/main.scss +2 -2
- package/dist/styles/main.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { format as
|
|
3
|
-
import { createPopper as
|
|
4
|
-
import { sankeyLinkHorizontal as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as W, ref as R, openBlock as y, createElementBlock as x, mergeProps as G, createElementVNode as C, toDisplayString as oe, createCommentVNode as Z, isRef as Ct, computed as v, watch as U, toRefs as te, inject as Pe, reactive as Fe, onMounted as _e, unref as d, Fragment as q, renderList as z, createBlock as X, normalizeClass as ne, normalizeStyle as Gt, onBeforeUnmount as jt, watchEffect as Vt, renderSlot as M, createTextVNode as ce, useSlots as re, withDirectives as sn, withCtx as V, createSlots as de, vShow as cn, pushScopeId as dn, popScopeId as vn, provide as Ke, createVNode as ie, nextTick as kt, toHandlers as ae, normalizeProps as pe, guardReactiveProps as he, defineAsyncComponent as Je, resolveDynamicComponent as mn } from "vue";
|
|
2
|
+
import { format as fn, ticks as pn, scaleBand as Be, scaleLinear as Me, link as hn, line as gn, area as _n } from "d3";
|
|
3
|
+
import { createPopper as yn } from "@popperjs/core";
|
|
4
|
+
import { sankeyLinkHorizontal as kn, sankey as bn, sankeyJustify as An } from "d3-sankey";
|
|
5
|
+
const Tn = {
|
|
6
6
|
class: "axis__tick-label lume-typography--axis",
|
|
7
7
|
"pointer-events": "all",
|
|
8
8
|
"data-j-axis__tick-label": ""
|
|
9
|
-
},
|
|
9
|
+
}, Ln = /* @__PURE__ */ W({
|
|
10
10
|
__name: "lume-tick",
|
|
11
11
|
props: {
|
|
12
12
|
value: {
|
|
@@ -44,37 +44,37 @@ const Ln = {
|
|
|
44
44
|
},
|
|
45
45
|
emits: ["click", "mouseenter"],
|
|
46
46
|
setup(e, { expose: n, emit: t }) {
|
|
47
|
-
const o = t,
|
|
48
|
-
return n({ ref:
|
|
47
|
+
const o = t, a = R(null);
|
|
48
|
+
return n({ ref: a }), (u, l) => (y(), x("g", G(e.group, {
|
|
49
49
|
class: ["axis__tick", {
|
|
50
50
|
"axis__tick--hovered": e.isHovered,
|
|
51
51
|
"axis__tick--hidden": e.isHidden
|
|
52
52
|
}],
|
|
53
53
|
"data-j-axis__tick": "",
|
|
54
|
-
onMouseenter:
|
|
55
|
-
onClick:
|
|
54
|
+
onMouseenter: l[0] || (l[0] = (i) => o("mouseenter", i)),
|
|
55
|
+
onClick: l[1] || (l[1] = (i) => o("click", i))
|
|
56
56
|
}), [
|
|
57
|
-
C("g",
|
|
57
|
+
C("g", Tn, [
|
|
58
58
|
C("rect", G(e.ghost, {
|
|
59
59
|
class: "axis__ghost",
|
|
60
60
|
fill: "url(#lume-tick-gradient)"
|
|
61
61
|
}), null, 16),
|
|
62
62
|
C("text", G(e.label, {
|
|
63
63
|
ref_key: "labelRef",
|
|
64
|
-
ref:
|
|
64
|
+
ref: a,
|
|
65
65
|
class: "axis__label"
|
|
66
66
|
}), oe(e.value), 17)
|
|
67
67
|
]),
|
|
68
|
-
e.withGridlines ? (y(),
|
|
68
|
+
e.withGridlines ? (y(), x("line", G({ key: 0 }, e.gridline, { class: "axis__grid-line" }), null, 16)) : Z("", !0)
|
|
69
69
|
], 16));
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
const ee = (e, n) => {
|
|
73
73
|
const t = e.__vccOpts || e;
|
|
74
|
-
for (const [o,
|
|
75
|
-
t[o] =
|
|
74
|
+
for (const [o, a] of n)
|
|
75
|
+
t[o] = a;
|
|
76
76
|
return t;
|
|
77
|
-
}, bt = /* @__PURE__ */ ee(
|
|
77
|
+
}, bt = /* @__PURE__ */ ee(Ln, [["__scopeId", "data-v-59ddc0a6"]]), On = [
|
|
78
78
|
"controls",
|
|
79
79
|
"legend",
|
|
80
80
|
"axes",
|
|
@@ -103,38 +103,38 @@ function Qe(e) {
|
|
|
103
103
|
}
|
|
104
104
|
function zt(e, n) {
|
|
105
105
|
const t = { ...e };
|
|
106
|
-
return Object.entries(n).forEach(([o,
|
|
107
|
-
t[o] = Qe(e[o]) && Qe(
|
|
106
|
+
return Object.entries(n).forEach(([o, a]) => {
|
|
107
|
+
t[o] = Qe(e[o]) && Qe(a) ? zt(e[o], a) : a;
|
|
108
108
|
}), t;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function xn(e) {
|
|
111
111
|
return e != null && Qe(e) && "value" in e;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function ve(e) {
|
|
114
114
|
return (e == null ? void 0 : e.bandwidth) !== void 0;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
return
|
|
116
|
+
function In(e) {
|
|
117
|
+
return ve(e) ? e.step() : Math.max(...e.range()) / Math.max(...e.domain());
|
|
118
118
|
}
|
|
119
119
|
function At(e) {
|
|
120
120
|
const [n, t] = e.domain();
|
|
121
121
|
return n == null || t == null || n === 0 && t === 0;
|
|
122
122
|
}
|
|
123
|
-
const
|
|
123
|
+
const wn = (e, n) => {
|
|
124
124
|
if (!e)
|
|
125
125
|
throw new Error("Data is not a valid array");
|
|
126
126
|
if (e.length === 0)
|
|
127
127
|
throw new Error("Cannot get highest value from empty array");
|
|
128
128
|
e.some(
|
|
129
129
|
({ values: o }) => o.length - 1 >= n
|
|
130
|
-
) || ge(
|
|
130
|
+
) || ge(me.IndexExceedsLengthOfDataSets);
|
|
131
131
|
};
|
|
132
|
-
function
|
|
132
|
+
function En(e, n) {
|
|
133
133
|
var t;
|
|
134
|
-
return
|
|
135
|
-
(o,
|
|
136
|
-
var u,
|
|
137
|
-
return (((u = o.values[n]) == null ? void 0 : u.value) ?? 0) > (((
|
|
134
|
+
return wn(e, n), ((t = e.reduce(
|
|
135
|
+
(o, a) => {
|
|
136
|
+
var u, l;
|
|
137
|
+
return (((u = o.values[n]) == null ? void 0 : u.value) ?? 0) > (((l = a.values[n]) == null ? void 0 : l.value) ?? 0) ? o : a;
|
|
138
138
|
}
|
|
139
139
|
).values[n]) == null ? void 0 : t.value) || 0;
|
|
140
140
|
}
|
|
@@ -148,17 +148,17 @@ function Wt(e) {
|
|
|
148
148
|
);
|
|
149
149
|
return Array(t).fill(null);
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
return
|
|
151
|
+
function Nn(e) {
|
|
152
|
+
return ve(e) ? e.domain().length : Math.max(...e.domain());
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Dn(e, n) {
|
|
155
155
|
return (t) => Math.round(e * (1 - t) + n * t);
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
const o = t ? e.length - n : n,
|
|
159
|
-
return e.slice(o).concat(
|
|
157
|
+
function Hn(e, n, t) {
|
|
158
|
+
const o = t ? e.length - n : n, a = e.slice(0, o);
|
|
159
|
+
return e.slice(o).concat(a);
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Te(e) {
|
|
162
162
|
if (e.groups) {
|
|
163
163
|
const n = Object.keys(e);
|
|
164
164
|
return Object.assign(
|
|
@@ -168,15 +168,15 @@ function Le(e) {
|
|
|
168
168
|
}
|
|
169
169
|
return e;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Bn(e) {
|
|
172
172
|
return Object.assign(
|
|
173
173
|
{},
|
|
174
174
|
...Object.keys(e).map(
|
|
175
|
-
(n) =>
|
|
175
|
+
(n) => On.includes(n) ? {} : { [n]: e[n] }
|
|
176
176
|
)
|
|
177
177
|
);
|
|
178
178
|
}
|
|
179
|
-
const
|
|
179
|
+
const Mn = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce(
|
|
180
180
|
(n, t) => n += (t &= 63) < 36 ? t.toString(36) : t < 62 ? (t - 26).toString(36).toUpperCase() : t > 62 ? "-" : "_",
|
|
181
181
|
""
|
|
182
182
|
);
|
|
@@ -184,20 +184,20 @@ function st(e, n) {
|
|
|
184
184
|
const t = n - e.length;
|
|
185
185
|
return t > 0 ? [...e, ...Array(t).fill({ value: null })] : e;
|
|
186
186
|
}
|
|
187
|
-
var
|
|
188
|
-
Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.Empty = "The dataset(s) provided are empty.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", e))(
|
|
189
|
-
const
|
|
187
|
+
var me = /* @__PURE__ */ ((e) => (e.DatasetLength = `Our guidelines highly recommend not having more than 5 datasets in one chart.
|
|
188
|
+
Learn more: https://lume.design/guidelines/datasets`, e.ColorLoop = "Colors will loop around after the 5th dataset. You can prevent this by setting specific colors for your datasets.", e.Empty = "The dataset(s) provided are empty.", e.InvalidFormat = "The string provided to format is invalid. Please refer to https://github.com/d3/d3-format for valid arguments.", e.NotContainedInSvg = "This component is an `SVGElement`, thus it is required to be inside an `<svg>` container.", e.InvalidHoveredIndex = "The provided hovered index is not valid for the data of this chart.", e.InvalidHoveredElement = "The provided hovered element is not valid for the data of this diagram.", e.IndexExceedsLengthOfDataSets = "Index exceeds length of all of the datasets", e))(me || {});
|
|
189
|
+
const Sn = "[lume] ";
|
|
190
190
|
function ge(e, n = !0) {
|
|
191
|
-
n && Pt() || console.warn(
|
|
191
|
+
n && Pt() || console.warn(Sn + "Warning: " + e);
|
|
192
192
|
}
|
|
193
193
|
const je = (e) => {
|
|
194
194
|
let n = null;
|
|
195
195
|
switch (typeof e) {
|
|
196
196
|
case "string":
|
|
197
197
|
try {
|
|
198
|
-
n =
|
|
198
|
+
n = fn(e);
|
|
199
199
|
} catch {
|
|
200
|
-
ge(
|
|
200
|
+
ge(me.InvalidFormat), n = null;
|
|
201
201
|
}
|
|
202
202
|
break;
|
|
203
203
|
case "function":
|
|
@@ -210,50 +210,50 @@ const je = (e) => {
|
|
|
210
210
|
return n ? n(...o) : o[0];
|
|
211
211
|
}
|
|
212
212
|
return t;
|
|
213
|
-
},
|
|
213
|
+
}, Se = () => ({
|
|
214
214
|
options: {
|
|
215
215
|
type: Object,
|
|
216
216
|
default: () => ({})
|
|
217
217
|
}
|
|
218
218
|
});
|
|
219
|
-
function
|
|
219
|
+
function fe(e, n) {
|
|
220
220
|
return { allOptions: v(() => {
|
|
221
221
|
const o = Ct(n) ? n == null ? void 0 : n.value : n;
|
|
222
222
|
return o ? zt(o, e.value) : e.value;
|
|
223
223
|
}) };
|
|
224
224
|
}
|
|
225
|
-
const
|
|
226
|
-
function
|
|
227
|
-
const o =
|
|
228
|
-
function
|
|
225
|
+
const Rn = 0.2;
|
|
226
|
+
function Cn(e, n, t) {
|
|
227
|
+
const o = R(), a = v(() => Math.max(...e.value.range())), u = v(() => n.value.length);
|
|
228
|
+
function l() {
|
|
229
229
|
if (!n.value)
|
|
230
230
|
return;
|
|
231
|
-
const
|
|
231
|
+
const c = n.value.reduce(
|
|
232
232
|
(f, r) => f + r.ref.getBoundingClientRect().width,
|
|
233
233
|
0
|
|
234
|
-
),
|
|
235
|
-
o.value =
|
|
234
|
+
), s = Math.ceil(c / u.value);
|
|
235
|
+
o.value = s + s * Rn;
|
|
236
236
|
}
|
|
237
|
-
function i(
|
|
237
|
+
function i(c) {
|
|
238
238
|
if (!n.value)
|
|
239
239
|
return !0;
|
|
240
|
-
const
|
|
241
|
-
if (
|
|
240
|
+
const s = t.value.skip, f = n.value.length;
|
|
241
|
+
if (c === 0)
|
|
242
242
|
return !0;
|
|
243
|
-
const r =
|
|
244
|
-
return
|
|
243
|
+
const r = a.value / f, m = typeof s == "number" && s > 0 && s + 1 || Math.ceil(o.value / r);
|
|
244
|
+
return c % m === 0;
|
|
245
245
|
}
|
|
246
|
-
return
|
|
246
|
+
return U(n, l), { showTick: i };
|
|
247
247
|
}
|
|
248
248
|
var se = /* @__PURE__ */ ((e) => (e.Skyblue = "skyblue", e.Royalblue = "royalblue", e.Violet = "violet", e.Darkteal = "darkteal", e.Gold = "gold", e))(se || {}), Zt = /* @__PURE__ */ ((e) => (e.Skyblue10 = "skyblue-10", e.Skyblue20 = "skyblue-20", e.Skyblue30 = "skyblue-30", e.Skyblue40 = "skyblue-40", e.Skyblue50 = "skyblue-50", e.Skyblue60 = "skyblue-60", e.Skyblue70 = "skyblue-70", e.Skyblue80 = "skyblue-80", e.Skyblue90 = "skyblue-90", e.Skyblue100 = "skyblue-100", e.Royalblue10 = "royalblue-10", e.Royalblue20 = "royalblue-20", e.Royalblue30 = "royalblue-30", e.Royalblue40 = "royalblue-40", e.Royalblue50 = "royalblue-50", e.Royalblue60 = "royalblue-60", e.Royalblue70 = "royalblue-70", e.Royalblue80 = "royalblue-80", e.Royalblue90 = "royalblue-90", e.Royalblue100 = "royalblue-100", e.Violet10 = "violet-10", e.Violet20 = "violet-20", e.Violet30 = "violet-30", e.Violet40 = "violet-40", e.Violet50 = "violet-50", e.Violet60 = "violet-60", e.Violet70 = "violet-70", e.Violet80 = "violet-80", e.Violet90 = "violet-90", e.Violet100 = "violet-100", e.Darkteal10 = "darkteal-10", e.Darkteal20 = "darkteal-20", e.Darkteal30 = "darkteal-30", e.Darkteal40 = "darkteal-40", e.Darkteal50 = "darkteal-50", e.Darkteal60 = "darkteal-60", e.Darkteal70 = "darkteal-70", e.Darkteal80 = "darkteal-80", e.Darkteal90 = "darkteal-90", e.Darkteal100 = "darkteal-100", e.Gold10 = "gold-10", e.Gold20 = "gold-20", e.Gold30 = "gold-30", e.Gold40 = "gold-40", e.Gold50 = "gold-50", e.Gold60 = "gold-60", e.Gold70 = "gold-70", e.Gold80 = "gold-80", e.Gold90 = "gold-90", e.Gold100 = "gold-100", e))(Zt || {}), ct = /* @__PURE__ */ ((e) => (e.SkyTeal = "skyblue-darkteal", e.VioletRoyal = "violet-royalblue", e.VioletTeal = "violet-darkteal", e.GoldTeal = "gold-darkteal", e.GoldRoyal = "gold-royalblue", e))(ct || {}), dt = /* @__PURE__ */ ((e) => (e.Grey = "grey", e.Green = "green", e.Orange = "orange", e.Red = "red", e))(dt || {}), vt = /* @__PURE__ */ ((e) => (e["01"] = "01", e["02"] = "02", e["03"] = "03", e["04"] = "04", e["05"] = "05", e["06"] = "06", e["07"] = "07", e["08"] = "08", e["09"] = "09", e))(vt || {});
|
|
249
249
|
const B = {
|
|
250
250
|
HORIZONTAL: "horizontal",
|
|
251
251
|
VERTICAL: "vertical"
|
|
252
|
-
},
|
|
252
|
+
}, Gn = {
|
|
253
253
|
SINGLE: "single",
|
|
254
254
|
GROUPED: "grouped",
|
|
255
255
|
STACKED: "stacked"
|
|
256
|
-
}, Ut = "No data", Tt = 20, Xt = 0.33, Yt = 0.5, Kt = 12,
|
|
256
|
+
}, Ut = "No data", Tt = 20, Xt = 0.33, Yt = 0.5, Kt = 12, Re = 8, jn = 1, Vn = [
|
|
257
257
|
"auto",
|
|
258
258
|
"auto-start",
|
|
259
259
|
"auto-end",
|
|
@@ -271,7 +271,7 @@ const B = {
|
|
|
271
271
|
"left-end"
|
|
272
272
|
];
|
|
273
273
|
function ze(e) {
|
|
274
|
-
e != null && e.closest("svg") || ge(
|
|
274
|
+
e != null && e.closest("svg") || ge(me.NotContainedInSvg);
|
|
275
275
|
}
|
|
276
276
|
const Jt = {
|
|
277
277
|
/** Displays a line for each tick. */
|
|
@@ -289,37 +289,37 @@ const Jt = {
|
|
|
289
289
|
tickFormat: null,
|
|
290
290
|
/** Space between the tick label and the axis line. */
|
|
291
291
|
tickPadding: 8
|
|
292
|
-
},
|
|
292
|
+
}, Pn = {
|
|
293
293
|
...Jt,
|
|
294
294
|
withTitle: !1,
|
|
295
295
|
skip: !0
|
|
296
|
-
},
|
|
296
|
+
}, Fn = {
|
|
297
297
|
...Jt,
|
|
298
298
|
gridLines: !0
|
|
299
|
-
},
|
|
299
|
+
}, zn = function(e, n, t) {
|
|
300
300
|
const o = v(() => e.value.step() * e.value.paddingInner() / 2);
|
|
301
|
-
function
|
|
301
|
+
function a(c, s) {
|
|
302
302
|
return {
|
|
303
|
-
transform: `translate(${(e.value(
|
|
303
|
+
transform: `translate(${(e.value(s) ?? e.value(c)) - o.value}, 0)`
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
|
-
function u(
|
|
306
|
+
function u(c) {
|
|
307
307
|
var f;
|
|
308
|
-
const
|
|
308
|
+
const s = Math.max(
|
|
309
309
|
e.value.step(),
|
|
310
|
-
(
|
|
310
|
+
(c ? (f = c.getComputedTextLength) == null ? void 0 : f.call(c) : e.value.step()) + 20
|
|
311
311
|
);
|
|
312
312
|
return {
|
|
313
|
-
x: -(
|
|
314
|
-
width:
|
|
315
|
-
height: t.value.tickPadding + Kt +
|
|
313
|
+
x: -(s - e.value.step()) / 2,
|
|
314
|
+
width: s,
|
|
315
|
+
height: t.value.tickPadding + Kt + Re
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
const
|
|
318
|
+
function l() {
|
|
319
|
+
const c = e.value.step() / 2;
|
|
320
320
|
return {
|
|
321
|
-
x1:
|
|
322
|
-
x2:
|
|
321
|
+
x1: c,
|
|
322
|
+
x2: c,
|
|
323
323
|
y1: -n.value.height
|
|
324
324
|
// Negative height means it goes from bottom to top
|
|
325
325
|
};
|
|
@@ -333,32 +333,32 @@ const Jt = {
|
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
335
|
return {
|
|
336
|
-
getGridLinesAttributes:
|
|
336
|
+
getGridLinesAttributes: l,
|
|
337
337
|
getTickGhostAttributes: u,
|
|
338
|
-
getTickGroupAttributes:
|
|
338
|
+
getTickGroupAttributes: a,
|
|
339
339
|
getTickLabelAttributes: i
|
|
340
340
|
};
|
|
341
|
-
},
|
|
341
|
+
}, Wn = function(e, n, t) {
|
|
342
342
|
const o = v(() => e.value.step() * e.value.paddingInner() / 2);
|
|
343
|
-
function
|
|
343
|
+
function a(c, s) {
|
|
344
344
|
return {
|
|
345
|
-
transform: `translate(0, ${(e.value(
|
|
345
|
+
transform: `translate(0, ${(e.value(s) ?? e.value(c)) - o.value})`
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
|
-
function u(
|
|
348
|
+
function u(c) {
|
|
349
349
|
var f;
|
|
350
|
-
const
|
|
350
|
+
const s = (c ? (f = c.getComputedTextLength) == null ? void 0 : f.call(c) : 42) + t.value.tickPadding + Re;
|
|
351
351
|
return {
|
|
352
|
-
x: -
|
|
353
|
-
width:
|
|
352
|
+
x: -s,
|
|
353
|
+
width: s,
|
|
354
354
|
height: e.value.step()
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
|
-
function
|
|
358
|
-
const
|
|
357
|
+
function l() {
|
|
358
|
+
const c = e.value.step() / 2;
|
|
359
359
|
return {
|
|
360
|
-
y1:
|
|
361
|
-
y2:
|
|
360
|
+
y1: c,
|
|
361
|
+
y2: c,
|
|
362
362
|
x1: n.value.width
|
|
363
363
|
};
|
|
364
364
|
}
|
|
@@ -371,29 +371,29 @@ const Jt = {
|
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
373
|
return {
|
|
374
|
-
getGridLinesAttributes:
|
|
374
|
+
getGridLinesAttributes: l,
|
|
375
375
|
getTickGhostAttributes: u,
|
|
376
|
-
getTickGroupAttributes:
|
|
376
|
+
getTickGroupAttributes: a,
|
|
377
377
|
getTickLabelAttributes: i
|
|
378
378
|
};
|
|
379
|
-
},
|
|
379
|
+
}, Zn = function(e, n, t) {
|
|
380
380
|
const o = v(() => {
|
|
381
|
-
const
|
|
382
|
-
return
|
|
381
|
+
const c = e.value.ticks();
|
|
382
|
+
return c.length > 1 ? e.value(c[1]) - e.value(c[0]) : 0;
|
|
383
383
|
});
|
|
384
|
-
function
|
|
384
|
+
function a(c) {
|
|
385
385
|
return {
|
|
386
|
-
transform: `translate(${e.value(
|
|
386
|
+
transform: `translate(${e.value(c)}, 0)`
|
|
387
387
|
};
|
|
388
388
|
}
|
|
389
389
|
function u() {
|
|
390
390
|
return {
|
|
391
|
-
height: t.value.tickPadding + Kt +
|
|
391
|
+
height: t.value.tickPadding + Kt + Re,
|
|
392
392
|
width: o.value,
|
|
393
393
|
x: -(o.value / 2)
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function l() {
|
|
397
397
|
return {
|
|
398
398
|
y1: -n.value.height
|
|
399
399
|
};
|
|
@@ -406,32 +406,32 @@ const Jt = {
|
|
|
406
406
|
};
|
|
407
407
|
}
|
|
408
408
|
return {
|
|
409
|
-
getGridLinesAttributes:
|
|
409
|
+
getGridLinesAttributes: l,
|
|
410
410
|
getTickGhostAttributes: u,
|
|
411
|
-
getTickGroupAttributes:
|
|
411
|
+
getTickGroupAttributes: a,
|
|
412
412
|
getTickLabelAttributes: i
|
|
413
413
|
};
|
|
414
|
-
},
|
|
414
|
+
}, Un = function(e, n, t) {
|
|
415
415
|
const o = v(() => {
|
|
416
|
-
const
|
|
417
|
-
return
|
|
416
|
+
const c = e.value.ticks();
|
|
417
|
+
return c.length > 1 ? e.value(c[1]) - e.value(c[0]) : 0;
|
|
418
418
|
});
|
|
419
|
-
function
|
|
419
|
+
function a(c) {
|
|
420
420
|
return {
|
|
421
|
-
transform: `translate(0, ${e.value(
|
|
421
|
+
transform: `translate(0, ${e.value(c)})`
|
|
422
422
|
};
|
|
423
423
|
}
|
|
424
|
-
function u(
|
|
424
|
+
function u(c) {
|
|
425
425
|
var f;
|
|
426
|
-
const
|
|
426
|
+
const s = (((f = c == null ? void 0 : c.getComputedTextLength) == null ? void 0 : f.call(c)) || 0) + t.value.tickPadding + Re;
|
|
427
427
|
return {
|
|
428
|
-
width:
|
|
428
|
+
width: s,
|
|
429
429
|
height: o.value,
|
|
430
|
-
x: -
|
|
430
|
+
x: -s,
|
|
431
431
|
y: -(o.value / 2)
|
|
432
432
|
};
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function l() {
|
|
435
435
|
return {
|
|
436
436
|
x1: n.value.width
|
|
437
437
|
};
|
|
@@ -444,17 +444,17 @@ const Jt = {
|
|
|
444
444
|
};
|
|
445
445
|
}
|
|
446
446
|
return {
|
|
447
|
-
getGridLinesAttributes:
|
|
447
|
+
getGridLinesAttributes: l,
|
|
448
448
|
getTickGhostAttributes: u,
|
|
449
|
-
getTickGroupAttributes:
|
|
449
|
+
getTickGroupAttributes: a,
|
|
450
450
|
getTickLabelAttributes: i
|
|
451
451
|
};
|
|
452
|
-
},
|
|
453
|
-
"x-band-scale-axis":
|
|
454
|
-
"y-band-scale-axis":
|
|
455
|
-
"x-linear-scale-axis":
|
|
456
|
-
"y-linear-scale-axis":
|
|
457
|
-
},
|
|
452
|
+
}, Xn = {
|
|
453
|
+
"x-band-scale-axis": zn,
|
|
454
|
+
"y-band-scale-axis": Wn,
|
|
455
|
+
"x-linear-scale-axis": Zn,
|
|
456
|
+
"y-linear-scale-axis": Un
|
|
457
|
+
}, Yn = ["transform"], Kn = { key: 0 }, Jn = /* @__PURE__ */ C("linearGradient", { id: "lume-tick-gradient" }, [
|
|
458
458
|
/* @__PURE__ */ C("stop", {
|
|
459
459
|
offset: "0%",
|
|
460
460
|
"stop-color": "rgba(255,255,255,0)"
|
|
@@ -471,11 +471,11 @@ const Jt = {
|
|
|
471
471
|
offset: "100%",
|
|
472
472
|
"stop-color": "rgba(255,255,255,0)"
|
|
473
473
|
})
|
|
474
|
-
], -1),
|
|
475
|
-
|
|
474
|
+
], -1), Qn = [
|
|
475
|
+
Jn
|
|
476
476
|
];
|
|
477
477
|
var Qt = /* @__PURE__ */ ((e) => (e.bandScale = "band-scale-axis", e.linearScale = "linear-scale-axis", e))(Qt || {}), qt = /* @__PURE__ */ ((e) => (e.left = "left", e.bottom = "bottom", e))(qt || {}), qe = /* @__PURE__ */ ((e) => (e.x = "bottom", e.y = "left", e))(qe || {});
|
|
478
|
-
const Lt = /* @__PURE__ */
|
|
478
|
+
const Lt = /* @__PURE__ */ W({
|
|
479
479
|
__name: "lume-axis",
|
|
480
480
|
props: {
|
|
481
481
|
scale: {
|
|
@@ -504,43 +504,43 @@ const Lt = /* @__PURE__ */ U({
|
|
|
504
504
|
type: String,
|
|
505
505
|
default: B.VERTICAL
|
|
506
506
|
},
|
|
507
|
-
...
|
|
507
|
+
...Se()
|
|
508
508
|
},
|
|
509
509
|
emits: ["mouseenter", "click", "mouseleave", "lume__internal--axis-size"],
|
|
510
510
|
setup(e, { emit: n }) {
|
|
511
|
-
const o = e,
|
|
511
|
+
const o = e, a = n, { scale: u, containerSize: l, hoveredIndex: i, options: c, orientation: s } = te(o), f = Pe("isEmpty", R(!1)), r = Fe({}), m = R(null), g = R(null), p = R(null), b = v(
|
|
512
512
|
() => o.type ? qe[o.type] : o.position
|
|
513
513
|
), L = v(
|
|
514
514
|
() => o.type || (b.value === "left" ? "y" : "x")
|
|
515
515
|
), A = v(
|
|
516
|
-
() => L.value === "x" &&
|
|
517
|
-
), { allOptions: h } =
|
|
518
|
-
|
|
519
|
-
L.value === "x" ?
|
|
520
|
-
), { showTick:
|
|
521
|
-
var
|
|
522
|
-
return L.value === "y" && f.value && (!u.value || At(u.value)) ? `translate(0, ${((
|
|
516
|
+
() => L.value === "x" && s.value === B.VERTICAL || L.value === "y" && s.value === B.HORIZONTAL
|
|
517
|
+
), { allOptions: h } = fe(
|
|
518
|
+
c,
|
|
519
|
+
L.value === "x" ? Pn : Fn
|
|
520
|
+
), { showTick: $ } = Cn(u, m, h), N = v(() => {
|
|
521
|
+
var S, k, E, _;
|
|
522
|
+
return L.value === "y" && f.value && (!u.value || At(u.value)) ? `translate(0, ${((S = l.value) == null ? void 0 : S.height) / 2})` : L.value === "x" && f.value && (!u.value || At(u.value)) ? `translate(-${((k = l.value) == null ? void 0 : k.width) / 2}, ${(E = l.value) == null ? void 0 : E.height})` : `translate(0, ${L.value === "x" ? (_ = l.value) == null ? void 0 : _.height : 0})`;
|
|
523
523
|
}), D = v(() => {
|
|
524
524
|
if (!u.value)
|
|
525
525
|
return [];
|
|
526
|
-
if (
|
|
526
|
+
if (ve(u.value))
|
|
527
527
|
return u.value.labels || u.value.domain();
|
|
528
|
-
const { tickCount:
|
|
529
|
-
return
|
|
528
|
+
const { tickCount: S } = h.value, [k, E] = u.value.domain();
|
|
529
|
+
return pn(k, E, S);
|
|
530
530
|
}), P = v(() => {
|
|
531
|
-
const { tickFormat:
|
|
532
|
-
return je(
|
|
531
|
+
const { tickFormat: S } = h.value;
|
|
532
|
+
return je(S);
|
|
533
533
|
}), w = v(
|
|
534
534
|
() => h.value.withHover && A.value && i.value > -1
|
|
535
535
|
), H = v(
|
|
536
|
-
() => h.value.tickPadding +
|
|
537
|
-
),
|
|
536
|
+
() => h.value.tickPadding + Re || 16
|
|
537
|
+
), Y = v(() => L.value === "x" ? (
|
|
538
538
|
// If x axis, get the tick height
|
|
539
539
|
Math.max(
|
|
540
540
|
...(m.value || []).map(
|
|
541
|
-
(
|
|
541
|
+
(S) => {
|
|
542
542
|
var k, E;
|
|
543
|
-
return ((E = (k =
|
|
543
|
+
return ((E = (k = S.ref).getBBox) == null ? void 0 : E.call(k).height) + H.value;
|
|
544
544
|
}
|
|
545
545
|
)
|
|
546
546
|
)
|
|
@@ -548,33 +548,33 @@ const Lt = /* @__PURE__ */ U({
|
|
|
548
548
|
// If y axis, get the tick width
|
|
549
549
|
Math.max(
|
|
550
550
|
...(m.value || []).map(
|
|
551
|
-
(
|
|
551
|
+
(S) => {
|
|
552
552
|
var k, E;
|
|
553
|
-
return ((E = (k =
|
|
553
|
+
return ((E = (k = S.ref).getBBox) == null ? void 0 : E.call(k).width) + H.value;
|
|
554
554
|
}
|
|
555
555
|
)
|
|
556
556
|
)
|
|
557
557
|
));
|
|
558
|
-
function
|
|
558
|
+
function K(S) {
|
|
559
559
|
const { showTicks: k } = h.value;
|
|
560
|
-
return k === !1 ? "" : P.value(
|
|
560
|
+
return k === !1 ? "" : P.value(S);
|
|
561
561
|
}
|
|
562
|
-
function Q(
|
|
563
|
-
|
|
562
|
+
function Q(S, k, E) {
|
|
563
|
+
a("mouseenter", { index: A.value ? S : null, value: k, event: E });
|
|
564
564
|
}
|
|
565
|
-
function F(
|
|
566
|
-
|
|
565
|
+
function F(S, k, E) {
|
|
566
|
+
a("click", { index: S, value: k, event: E });
|
|
567
567
|
}
|
|
568
|
-
function ue(
|
|
568
|
+
function ue(S) {
|
|
569
569
|
var k;
|
|
570
570
|
if (!(!m.value || !m.value.length))
|
|
571
|
-
return (k = m.value[
|
|
571
|
+
return (k = m.value[S]) == null ? void 0 : k.ref;
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Le() {
|
|
574
574
|
p.value = D.value.map(
|
|
575
|
-
(
|
|
576
|
-
value:
|
|
577
|
-
group: r.getTickGroupAttributes(
|
|
575
|
+
(S, k) => ({
|
|
576
|
+
value: K(S),
|
|
577
|
+
group: r.getTickGroupAttributes(S, k),
|
|
578
578
|
ghost: r.getTickGhostAttributes(ue(k)),
|
|
579
579
|
label: r.getTickLabelAttributes(),
|
|
580
580
|
gridline: r.getGridLinesAttributes()
|
|
@@ -582,40 +582,40 @@ const Lt = /* @__PURE__ */ U({
|
|
|
582
582
|
);
|
|
583
583
|
}
|
|
584
584
|
function ke() {
|
|
585
|
-
p.value && p.value.map((
|
|
585
|
+
p.value && p.value.map((S) => (S.gridline = r.getGridLinesAttributes(), S));
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function Oe() {
|
|
588
588
|
if (!u.value)
|
|
589
589
|
return;
|
|
590
|
-
const
|
|
591
|
-
Object.entries(k(u,
|
|
590
|
+
const S = u.value.step ? "bandScale" : "linearScale", k = Xn[`${L.value}-${Qt[S]}`];
|
|
591
|
+
Object.entries(k(u, l, h) || []).forEach(
|
|
592
592
|
([E, _]) => {
|
|
593
593
|
r[E] = _;
|
|
594
594
|
}
|
|
595
595
|
);
|
|
596
596
|
}
|
|
597
|
-
return
|
|
597
|
+
return U(u, Oe, { flush: "sync", immediate: !0 }), U(u, Le, { immediate: !0 }), U(m, Le), U(Y, (S) => a("lume__internal--axis-size", S)), U(o.containerSize, ke), _e(() => ze(g.value)), (S, k) => d(u) ? (y(), x("g", {
|
|
598
598
|
key: 0,
|
|
599
599
|
ref_key: "root",
|
|
600
600
|
ref: g,
|
|
601
601
|
class: "axis",
|
|
602
602
|
transform: N.value,
|
|
603
603
|
"data-j-axis": "",
|
|
604
|
-
onMouseleave: k[1] || (k[1] = (E) =>
|
|
604
|
+
onMouseleave: k[1] || (k[1] = (E) => a("mouseleave", E))
|
|
605
605
|
}, [
|
|
606
|
-
L.value === "x" ? (y(),
|
|
607
|
-
(y(!0),
|
|
606
|
+
L.value === "x" ? (y(), x("defs", Kn, Qn)) : Z("", !0),
|
|
607
|
+
(y(!0), x(q, null, z(p.value, (E, _) => (y(), X(d(bt), G({
|
|
608
608
|
key: `${E.value}_${_}`,
|
|
609
609
|
ref_for: !0,
|
|
610
610
|
ref_key: "tickRefs",
|
|
611
611
|
ref: m
|
|
612
612
|
}, E, {
|
|
613
|
-
"is-hidden": d(h).skip && !d(
|
|
613
|
+
"is-hidden": d(h).skip && !d($)(_),
|
|
614
614
|
"with-gridlines": d(h).gridLines,
|
|
615
615
|
onMouseenter: (j) => Q(_, E.value, j),
|
|
616
616
|
onClick: (j) => F(_, E.value, j)
|
|
617
617
|
}), null, 16, ["is-hidden", "with-gridlines", "onMouseenter", "onClick"]))), 128)),
|
|
618
|
-
w.value ? (y(),
|
|
618
|
+
w.value ? (y(), X(d(bt), G({ key: 1 }, p.value[d(i)], {
|
|
619
619
|
"with-gridlines": !1,
|
|
620
620
|
"is-hovered": "",
|
|
621
621
|
onClick: k[0] || (k[0] = (E) => F(
|
|
@@ -623,29 +623,29 @@ const Lt = /* @__PURE__ */ U({
|
|
|
623
623
|
p.value[d(i)].value,
|
|
624
624
|
E
|
|
625
625
|
))
|
|
626
|
-
}), null, 16)) :
|
|
627
|
-
], 40,
|
|
626
|
+
}), null, 16)) : Z("", !0)
|
|
627
|
+
], 40, Yn)) : Z("", !0);
|
|
628
628
|
}
|
|
629
629
|
});
|
|
630
|
-
function
|
|
631
|
-
const
|
|
630
|
+
function qn(e, n, t, o) {
|
|
631
|
+
const a = v(() => t.value > 0 && t.value < 1), u = v(
|
|
632
632
|
() => o.value > 0 && o.value < 1
|
|
633
|
-
),
|
|
634
|
-
() =>
|
|
633
|
+
), l = v(
|
|
634
|
+
() => a.value ? e.value - 0.5 : e.value
|
|
635
635
|
// draws the 1px bar closer to the axis
|
|
636
636
|
), i = v(
|
|
637
637
|
() => u.value ? n.value - 0.5 : n.value
|
|
638
638
|
// draws the 1px bar closer to the axis
|
|
639
639
|
);
|
|
640
|
-
return { computedX:
|
|
640
|
+
return { computedX: l, computedY: i, shouldHaveMinWidth: a, shouldHaveMinHeight: u };
|
|
641
641
|
}
|
|
642
|
-
function
|
|
643
|
-
const
|
|
642
|
+
function eo(e, n, t, o) {
|
|
643
|
+
const a = R(0), u = R(0), l = v(() => `${e.value + t.value / 2}px ${n.value + o.value / 2}px`);
|
|
644
644
|
return _e(() => {
|
|
645
|
-
|
|
646
|
-
}),
|
|
645
|
+
a.value = t.value, u.value = o.value;
|
|
646
|
+
}), U(t, (i) => a.value = i), U(o, (i) => u.value = i), { computedWidth: a, computedHeight: u, transformOrigin: l };
|
|
647
647
|
}
|
|
648
|
-
const
|
|
648
|
+
const to = ["x", "y", "width", "height"], no = /* @__PURE__ */ W({
|
|
649
649
|
__name: "lume-bar",
|
|
650
650
|
props: {
|
|
651
651
|
x: {
|
|
@@ -683,10 +683,10 @@ const no = ["x", "y", "width", "height"], oo = /* @__PURE__ */ U({
|
|
|
683
683
|
},
|
|
684
684
|
emits: ["click", "mouseover", "mouseleave"],
|
|
685
685
|
setup(e, { emit: n }) {
|
|
686
|
-
const t = e, o = n, { x:
|
|
687
|
-
() => typeof
|
|
688
|
-
), m = v(() =>
|
|
689
|
-
return _e(() => ze(f.value)), (P, w) => (y(),
|
|
686
|
+
const t = e, o = n, { x: a, y: u, width: l, height: i, transition: c, classList: s } = te(t), f = R(null), r = v(
|
|
687
|
+
() => typeof s.value == "string" ? [s.value] : s.value
|
|
688
|
+
), m = v(() => c.value === "width"), g = v(() => c.value === "height"), p = eo(a, u, l, i), { computedX: b, computedY: L, shouldHaveMinWidth: A, shouldHaveMinHeight: h } = qn(a, u, l, i), $ = v(() => A.value ? 1 : (m.value ? p.computedWidth : l).value), N = v(() => h.value ? 1 : (g.value ? p.computedHeight : i).value), D = m.value || g.value ? p.transformOrigin : null;
|
|
689
|
+
return _e(() => ze(f.value)), (P, w) => (y(), x("rect", {
|
|
690
690
|
ref_key: "root",
|
|
691
691
|
ref: f,
|
|
692
692
|
class: ne(["lume-bar", [
|
|
@@ -701,22 +701,22 @@ const no = ["x", "y", "width", "height"], oo = /* @__PURE__ */ U({
|
|
|
701
701
|
style: Gt({ transformOrigin: d(D) }),
|
|
702
702
|
x: d(b),
|
|
703
703
|
y: d(L),
|
|
704
|
-
width:
|
|
704
|
+
width: $.value,
|
|
705
705
|
height: N.value,
|
|
706
706
|
"data-j-bar": "",
|
|
707
707
|
onClick: w[0] || (w[0] = (H) => o("click", H)),
|
|
708
708
|
onMouseover: w[1] || (w[1] = (H) => o("mouseover", H)),
|
|
709
709
|
onMouseleave: w[2] || (w[2] = (H) => o("mouseleave", H))
|
|
710
|
-
}, null, 46,
|
|
710
|
+
}, null, 46, to));
|
|
711
711
|
}
|
|
712
712
|
});
|
|
713
|
-
const mt = /* @__PURE__ */ ee(
|
|
714
|
-
function
|
|
715
|
-
const e =
|
|
713
|
+
const mt = /* @__PURE__ */ ee(no, [["__scopeId", "data-v-8e8f732a"]]);
|
|
714
|
+
function oo() {
|
|
715
|
+
const e = R(), n = Fe({
|
|
716
716
|
dimensions: {}
|
|
717
717
|
}), t = new ResizeObserver((o) => {
|
|
718
|
-
o.forEach((
|
|
719
|
-
n.dimensions =
|
|
718
|
+
o.forEach((a) => {
|
|
719
|
+
n.dimensions = a.contentRect;
|
|
720
720
|
});
|
|
721
721
|
});
|
|
722
722
|
return _e(() => {
|
|
@@ -725,7 +725,7 @@ function lo() {
|
|
|
725
725
|
t.unobserve(e.value);
|
|
726
726
|
}), { resizeState: n, resizeRef: e };
|
|
727
727
|
}
|
|
728
|
-
const ao = ["height"],
|
|
728
|
+
const ao = ["height"], lo = ["transform"], uo = /* @__PURE__ */ W({
|
|
729
729
|
__name: "lume-chart-container",
|
|
730
730
|
props: {
|
|
731
731
|
margins: {
|
|
@@ -747,23 +747,23 @@ const ao = ["height"], uo = ["transform"], ro = /* @__PURE__ */ U({
|
|
|
747
747
|
},
|
|
748
748
|
emits: ["click", "mouseenter", "mouseleave", "resize"],
|
|
749
749
|
setup(e, { emit: n }) {
|
|
750
|
-
const t = e, o = n, { margins:
|
|
751
|
-
() => u.value.height +
|
|
750
|
+
const t = e, o = n, { margins: a, containerSize: u } = te(t), l = R(null), { resizeRef: i, resizeState: c } = oo(), s = v(
|
|
751
|
+
() => u.value.height + a.value.top + a.value.bottom
|
|
752
752
|
);
|
|
753
753
|
return Vt(() => {
|
|
754
|
-
if (!
|
|
754
|
+
if (!l.value)
|
|
755
755
|
return;
|
|
756
|
-
const { width: f } =
|
|
756
|
+
const { width: f } = c.dimensions, { height: r } = l.value.getBoundingClientRect();
|
|
757
757
|
if (!f || !r)
|
|
758
758
|
return;
|
|
759
|
-
const m = f -
|
|
759
|
+
const m = f - a.value.left - a.value.right, g = r - a.value.top - a.value.bottom, p = {
|
|
760
760
|
width: m > 0 ? m : 0,
|
|
761
761
|
height: g > 0 ? g : 0,
|
|
762
762
|
outerWidth: f,
|
|
763
763
|
outerHeight: r
|
|
764
764
|
};
|
|
765
765
|
o("resize", p);
|
|
766
|
-
}), (f, r) => (y(),
|
|
766
|
+
}), (f, r) => (y(), x("div", {
|
|
767
767
|
ref_key: "resizeRef",
|
|
768
768
|
ref: i,
|
|
769
769
|
class: ne(["lume-chart-container", {
|
|
@@ -771,33 +771,33 @@ const ao = ["height"], uo = ["transform"], ro = /* @__PURE__ */ U({
|
|
|
771
771
|
}]),
|
|
772
772
|
"data-j-chart-container": ""
|
|
773
773
|
}, [
|
|
774
|
-
|
|
775
|
-
(y(),
|
|
774
|
+
M(f.$slots, "header", {}, void 0, !0),
|
|
775
|
+
(y(), x("svg", {
|
|
776
776
|
ref_key: "root",
|
|
777
|
-
ref:
|
|
777
|
+
ref: l,
|
|
778
778
|
class: ne(["lume-chart-container__svg", {
|
|
779
779
|
"lume-chart-container__svg--transparent": e.transparentBackground
|
|
780
780
|
}]),
|
|
781
|
-
height:
|
|
781
|
+
height: s.value,
|
|
782
782
|
"data-j-chart-container__root": "",
|
|
783
783
|
onClick: r[0] || (r[0] = (m) => o("click", m)),
|
|
784
784
|
onMouseenter: r[1] || (r[1] = (m) => o("mouseenter", m)),
|
|
785
785
|
onMouseleave: r[2] || (r[2] = (m) => o("mouseleave", m))
|
|
786
786
|
}, [
|
|
787
787
|
C("g", {
|
|
788
|
-
transform: `translate(${d(
|
|
788
|
+
transform: `translate(${d(a).left}, ${d(a).top})`,
|
|
789
789
|
class: "lume-chart-container__group",
|
|
790
790
|
"data-j-chart-container__group": ""
|
|
791
791
|
}, [
|
|
792
|
-
|
|
793
|
-
], 8,
|
|
792
|
+
M(f.$slots, "default", {}, void 0, !0)
|
|
793
|
+
], 8, lo)
|
|
794
794
|
], 42, ao)),
|
|
795
|
-
|
|
796
|
-
|
|
795
|
+
M(f.$slots, "footer", {}, void 0, !0),
|
|
796
|
+
M(f.$slots, "extra", {}, void 0, !0)
|
|
797
797
|
], 2));
|
|
798
798
|
}
|
|
799
799
|
});
|
|
800
|
-
const
|
|
800
|
+
const ro = /* @__PURE__ */ ee(uo, [["__scopeId", "data-v-2c7d0302"]]), io = ["onClick", "onMouseenter"], so = /* @__PURE__ */ W({
|
|
801
801
|
__name: "lume-chart-legend",
|
|
802
802
|
props: {
|
|
803
803
|
data: {
|
|
@@ -809,60 +809,60 @@ const io = /* @__PURE__ */ ee(ro, [["__scopeId", "data-v-2c7d0302"]]), so = ["on
|
|
|
809
809
|
emits: ["click", "mouseenter", "mouseleave"],
|
|
810
810
|
setup(e, { emit: n }) {
|
|
811
811
|
const t = n;
|
|
812
|
-
return (o,
|
|
812
|
+
return (o, a) => (y(), x("div", {
|
|
813
813
|
class: "lume-chart-legend",
|
|
814
814
|
"data-j-chart-legend": "",
|
|
815
|
-
onMouseleave:
|
|
815
|
+
onMouseleave: a[0] || (a[0] = (u) => t("mouseleave"))
|
|
816
816
|
}, [
|
|
817
|
-
(y(!0),
|
|
818
|
-
key: `legend-item-${
|
|
817
|
+
(y(!0), x(q, null, z(e.data, (u, l) => (y(), x("div", {
|
|
818
|
+
key: `legend-item-${l}`,
|
|
819
819
|
class: "lume-chart-legend__item lume-typography--body",
|
|
820
820
|
tabindex: "0",
|
|
821
821
|
"data-j-chart-legend__symbol-wrapper": "",
|
|
822
|
-
onClick: (i) => t("click", { index:
|
|
823
|
-
onMouseenter: (i) => t("mouseenter", { index:
|
|
822
|
+
onClick: (i) => t("click", { index: l, dataset: u, event: i }),
|
|
823
|
+
onMouseenter: (i) => t("mouseenter", { index: l, dataset: u, event: i })
|
|
824
824
|
}, [
|
|
825
825
|
C("span", {
|
|
826
826
|
class: ne(["lume-chart-legend__symbol", `lume-background-color--${u.color}`]),
|
|
827
827
|
"data-j-chart-legend__symbol": ""
|
|
828
828
|
}, null, 2),
|
|
829
|
-
|
|
830
|
-
], 40,
|
|
829
|
+
ce(" " + oe(u.label || l), 1)
|
|
830
|
+
], 40, io))), 128))
|
|
831
831
|
], 32));
|
|
832
832
|
}
|
|
833
833
|
});
|
|
834
|
-
const Ot = /* @__PURE__ */ ee(
|
|
835
|
-
const
|
|
834
|
+
const Ot = /* @__PURE__ */ ee(so, [["__scopeId", "data-v-f8ebd3b9"]]);
|
|
835
|
+
const co = {}, vo = {
|
|
836
836
|
class: "lume-tooltip__title",
|
|
837
837
|
"data-j-tooltip__title": ""
|
|
838
838
|
};
|
|
839
|
-
function
|
|
840
|
-
return y(),
|
|
841
|
-
|
|
839
|
+
function mo(e, n) {
|
|
840
|
+
return y(), x("div", vo, [
|
|
841
|
+
M(e.$slots, "default", {}, void 0, !0)
|
|
842
842
|
]);
|
|
843
843
|
}
|
|
844
|
-
const
|
|
845
|
-
const
|
|
844
|
+
const fo = /* @__PURE__ */ ee(co, [["render", mo], ["__scopeId", "data-v-8af3fac6"]]);
|
|
845
|
+
const po = {}, ho = {
|
|
846
846
|
class: "lume-tooltip__item",
|
|
847
847
|
"data-j-tooltip__summary-item": ""
|
|
848
|
-
},
|
|
849
|
-
function
|
|
850
|
-
return y(),
|
|
848
|
+
}, go = { class: "lume-tooltip__value" };
|
|
849
|
+
function _o(e, n) {
|
|
850
|
+
return y(), x("li", ho, [
|
|
851
851
|
C("span", null, [
|
|
852
|
-
|
|
852
|
+
M(e.$slots, "default", {}, void 0, !0)
|
|
853
853
|
]),
|
|
854
|
-
C("strong",
|
|
855
|
-
|
|
854
|
+
C("strong", go, [
|
|
855
|
+
M(e.$slots, "value", {}, void 0, !0)
|
|
856
856
|
])
|
|
857
857
|
]);
|
|
858
858
|
}
|
|
859
|
-
const
|
|
859
|
+
const yo = /* @__PURE__ */ ee(po, [["render", _o], ["__scopeId", "data-v-4ed7ec1b"]]), ko = {
|
|
860
860
|
class: "lume-tooltip__item",
|
|
861
861
|
"data-j-tooltip__item": ""
|
|
862
|
-
},
|
|
862
|
+
}, bo = { "data-j-tooltip__item__label": "" }, Ao = {
|
|
863
863
|
class: "lume-tooltip__value",
|
|
864
864
|
"data-j-tooltip__item__value": ""
|
|
865
|
-
},
|
|
865
|
+
}, To = /* @__PURE__ */ W({
|
|
866
866
|
__name: "lume-tooltip-item",
|
|
867
867
|
props: {
|
|
868
868
|
color: {
|
|
@@ -871,29 +871,33 @@ const ko = /* @__PURE__ */ ee(ho, [["render", yo], ["__scopeId", "data-v-4ed7ec1
|
|
|
871
871
|
}
|
|
872
872
|
},
|
|
873
873
|
setup(e) {
|
|
874
|
-
return (n, t) => (y(),
|
|
875
|
-
e.color ? (y(),
|
|
874
|
+
return (n, t) => (y(), x("li", ko, [
|
|
875
|
+
e.color ? (y(), x("span", {
|
|
876
876
|
key: 0,
|
|
877
877
|
class: ne([[`lume-background-color--${e.color}`], "lume-tooltip__symbol"]),
|
|
878
878
|
"data-j-tooltip__item__symbol": ""
|
|
879
|
-
}, null, 2)) :
|
|
880
|
-
C("span",
|
|
881
|
-
|
|
879
|
+
}, null, 2)) : Z("", !0),
|
|
880
|
+
C("span", bo, [
|
|
881
|
+
M(n.$slots, "label", {}, void 0, !0)
|
|
882
882
|
]),
|
|
883
|
-
C("strong",
|
|
884
|
-
|
|
883
|
+
C("strong", Ao, [
|
|
884
|
+
M(n.$slots, "value", {}, void 0, !0)
|
|
885
885
|
])
|
|
886
886
|
]));
|
|
887
887
|
}
|
|
888
888
|
});
|
|
889
|
-
const
|
|
889
|
+
const Lo = /* @__PURE__ */ ee(To, [["__scopeId", "data-v-4f995c3c"]]), Oo = (e) => (dn("data-v-e0426df7"), e = e(), vn(), e), $o = { class: "lume-tooltip__items" }, xo = {
|
|
890
890
|
key: 0,
|
|
891
891
|
class: "lume-tooltip__break"
|
|
892
|
-
},
|
|
893
|
-
|
|
894
|
-
],
|
|
892
|
+
}, Io = /* @__PURE__ */ Oo(() => /* @__PURE__ */ C("hr", null, null, -1)), wo = [
|
|
893
|
+
Io
|
|
894
|
+
], Eo = /* @__PURE__ */ W({
|
|
895
895
|
__name: "lume-tooltip",
|
|
896
896
|
props: {
|
|
897
|
+
opened: {
|
|
898
|
+
type: Boolean,
|
|
899
|
+
default: !1
|
|
900
|
+
},
|
|
897
901
|
targetElement: {
|
|
898
902
|
type: Element,
|
|
899
903
|
default: null
|
|
@@ -905,7 +909,7 @@ const Oo = /* @__PURE__ */ ee(Lo, [["__scopeId", "data-v-4f995c3c"]]), xo = (e)
|
|
|
905
909
|
position: {
|
|
906
910
|
type: String,
|
|
907
911
|
default: "auto",
|
|
908
|
-
validator: (e) =>
|
|
912
|
+
validator: (e) => Vn.includes(e)
|
|
909
913
|
},
|
|
910
914
|
fixedPositioning: {
|
|
911
915
|
type: Boolean,
|
|
@@ -927,12 +931,12 @@ const Oo = /* @__PURE__ */ ee(Lo, [["__scopeId", "data-v-4f995c3c"]]), xo = (e)
|
|
|
927
931
|
type: String,
|
|
928
932
|
default: null
|
|
929
933
|
},
|
|
930
|
-
...
|
|
934
|
+
...Se()
|
|
931
935
|
},
|
|
932
936
|
emits: ["opened", "moved", "closed", "tooltip-mouseenter", "tooltip-mouseleave"],
|
|
933
937
|
setup(e, { emit: n }) {
|
|
934
|
-
const t = e, o = n,
|
|
935
|
-
() =>
|
|
938
|
+
const t = e, o = n, a = R(null), { items: u, options: l } = te(t), i = re(), c = R(null), { allOptions: s } = fe(l), f = v(
|
|
939
|
+
() => s.value.fixedPositioning ?? t.fixedPositioning
|
|
936
940
|
), r = v(
|
|
937
941
|
() => f.value ? "fixed" : "absolute"
|
|
938
942
|
), m = v(() => [
|
|
@@ -945,86 +949,86 @@ const Oo = /* @__PURE__ */ ee(Lo, [["__scopeId", "data-v-4f995c3c"]]), xo = (e)
|
|
|
945
949
|
},
|
|
946
950
|
{
|
|
947
951
|
name: "offset",
|
|
948
|
-
options: { offset: [0,
|
|
952
|
+
options: { offset: [0, s.value.offset || 8] }
|
|
949
953
|
},
|
|
950
954
|
...t.modifiers || []
|
|
951
955
|
]), g = v(
|
|
952
|
-
() =>
|
|
953
|
-
), p = v(() => je(
|
|
956
|
+
() => s.value.showTitle !== !1 && t.title != null
|
|
957
|
+
), p = v(() => je(s.value.valueFormat)), b = v(() => je(s.value.titleFormat)), L = v(
|
|
954
958
|
() => {
|
|
955
959
|
var P;
|
|
956
960
|
return ((P = u.value) == null ? void 0 : P.find((w) => w.isSummary)) || {
|
|
957
|
-
label:
|
|
961
|
+
label: s.value.summary ?? t.summary
|
|
958
962
|
};
|
|
959
963
|
}
|
|
960
|
-
), A = v(() => i.summary || L.value.label), h = v(() => t.inverse ||
|
|
961
|
-
function
|
|
962
|
-
t.targetElement &&
|
|
964
|
+
), A = v(() => i.summary || L.value.label), h = v(() => t.inverse || s.value.inverse ? [...u.value].reverse() : u.value);
|
|
965
|
+
function $() {
|
|
966
|
+
t.targetElement && a.value && (c.value = yn(t.targetElement, a.value, {
|
|
963
967
|
placement: t.position,
|
|
964
968
|
strategy: r.value,
|
|
965
969
|
modifiers: m.value
|
|
966
970
|
}), o("opened", t.targetElement));
|
|
967
971
|
}
|
|
968
972
|
function N() {
|
|
969
|
-
|
|
973
|
+
c.value && (c.value.destroy(), o("closed"), a.value.classList.remove("lume-tooltip--animated"));
|
|
970
974
|
}
|
|
971
975
|
function D() {
|
|
972
|
-
|
|
973
|
-
|
|
976
|
+
c.value && (s.value.withAnimation !== !1 && a.value.classList.add("lume-tooltip--animated"), t.targetElement ? function() {
|
|
977
|
+
c.value.state.elements.reference = t.targetElement, c.value.update(), o("moved", t.targetElement);
|
|
974
978
|
}() : N());
|
|
975
979
|
}
|
|
976
|
-
return
|
|
980
|
+
return U(
|
|
977
981
|
() => t.targetElement,
|
|
978
982
|
(P, w) => {
|
|
979
|
-
!w && P ?
|
|
983
|
+
!w && P ? $() : D();
|
|
980
984
|
}
|
|
981
|
-
), _e(
|
|
985
|
+
), _e($), jt(N), (P, w) => sn((y(), x("div", {
|
|
982
986
|
ref_key: "root",
|
|
983
|
-
ref:
|
|
987
|
+
ref: a,
|
|
984
988
|
class: ne(["lume-tooltip lume-typography--caption", {
|
|
985
|
-
"lume-tooltip--pointer-events": d(
|
|
989
|
+
"lume-tooltip--pointer-events": d(l).withPointerEvents
|
|
986
990
|
}]),
|
|
987
991
|
"data-j-tooltip": "",
|
|
988
992
|
onMouseenter: w[0] || (w[0] = (H) => o("tooltip-mouseenter")),
|
|
989
993
|
onMouseleave: w[1] || (w[1] = (H) => o("tooltip-mouseleave"))
|
|
990
994
|
}, [
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
g.value ? (y(),
|
|
995
|
+
M(P.$slots, "default", {}, () => [
|
|
996
|
+
M(P.$slots, "title", {}, () => [
|
|
997
|
+
g.value ? (y(), X(d(fo), { key: 0 }, {
|
|
994
998
|
default: V(() => [
|
|
995
|
-
|
|
999
|
+
ce(oe(b.value(e.title)), 1)
|
|
996
1000
|
]),
|
|
997
1001
|
_: 1
|
|
998
|
-
})) :
|
|
1002
|
+
})) : Z("", !0)
|
|
999
1003
|
], !0),
|
|
1000
1004
|
C("ul", $o, [
|
|
1001
|
-
|
|
1002
|
-
A.value ? (y(),
|
|
1005
|
+
M(P.$slots, "summary", {}, () => [
|
|
1006
|
+
A.value ? (y(), X(d(yo), { key: 0 }, de({
|
|
1003
1007
|
default: V(() => [
|
|
1004
|
-
|
|
1008
|
+
ce(oe(L.value.label) + " ", 1)
|
|
1005
1009
|
]),
|
|
1006
1010
|
_: 2
|
|
1007
1011
|
}, [
|
|
1008
1012
|
L.value.value ? {
|
|
1009
1013
|
name: "value",
|
|
1010
1014
|
fn: V(() => [
|
|
1011
|
-
|
|
1015
|
+
ce(oe(p.value(L.value.value)), 1)
|
|
1012
1016
|
]),
|
|
1013
1017
|
key: "0"
|
|
1014
1018
|
} : void 0
|
|
1015
|
-
]), 1024)) :
|
|
1019
|
+
]), 1024)) : Z("", !0)
|
|
1016
1020
|
], !0),
|
|
1017
|
-
A.value ? (y(),
|
|
1018
|
-
|
|
1019
|
-
(y(!0),
|
|
1021
|
+
A.value ? (y(), x("li", xo, wo)) : Z("", !0),
|
|
1022
|
+
M(P.$slots, "items", {}, () => [
|
|
1023
|
+
(y(!0), x(q, null, z(h.value, (H) => (y(), X(d(Lo), {
|
|
1020
1024
|
key: H.label,
|
|
1021
1025
|
color: H.color
|
|
1022
1026
|
}, {
|
|
1023
1027
|
label: V(() => [
|
|
1024
|
-
|
|
1028
|
+
ce(oe(H.label), 1)
|
|
1025
1029
|
]),
|
|
1026
1030
|
value: V(() => [
|
|
1027
|
-
|
|
1031
|
+
ce(oe(p.value(H.value)), 1)
|
|
1028
1032
|
]),
|
|
1029
1033
|
_: 2
|
|
1030
1034
|
}, 1032, ["color"]))), 128))
|
|
@@ -1032,57 +1036,57 @@ const Oo = /* @__PURE__ */ ee(Lo, [["__scopeId", "data-v-4f995c3c"]]), xo = (e)
|
|
|
1032
1036
|
])
|
|
1033
1037
|
], !0)
|
|
1034
1038
|
], 34)), [
|
|
1035
|
-
[
|
|
1039
|
+
[cn, e.opened && e.targetElement]
|
|
1036
1040
|
]);
|
|
1037
1041
|
}
|
|
1038
1042
|
});
|
|
1039
|
-
const
|
|
1040
|
-
var
|
|
1041
|
-
const
|
|
1042
|
-
function
|
|
1043
|
-
return e ===
|
|
1043
|
+
const No = /* @__PURE__ */ ee(Eo, [["__scopeId", "data-v-e0426df7"]]);
|
|
1044
|
+
var be = /* @__PURE__ */ ((e) => (e.Categorical = "categorical", e.Sequential = "sequential", e.Divergent = "divergent", e))(be || {});
|
|
1045
|
+
const Do = be.Categorical, Ce = se.Skyblue, Ho = ct.SkyTeal;
|
|
1046
|
+
function Bo(e) {
|
|
1047
|
+
return e === be.Divergent ? Ho : Ce;
|
|
1044
1048
|
}
|
|
1045
|
-
function
|
|
1049
|
+
function Mo(e) {
|
|
1046
1050
|
return Object.values(vt).includes(e);
|
|
1047
1051
|
}
|
|
1048
|
-
function
|
|
1049
|
-
return n ===
|
|
1052
|
+
function $t(e, n) {
|
|
1053
|
+
return n === be.Divergent ? Object.values(ct).includes(e) : Object.values({
|
|
1050
1054
|
...se,
|
|
1051
1055
|
...Zt,
|
|
1052
1056
|
...dt,
|
|
1053
1057
|
...vt
|
|
1054
1058
|
}).includes(e);
|
|
1055
1059
|
}
|
|
1056
|
-
function
|
|
1060
|
+
function So(e, n) {
|
|
1057
1061
|
const t = Object.values(se).indexOf(e);
|
|
1058
|
-
return
|
|
1062
|
+
return Hn(Object.values(se), t > -1 ? t : 0)[n];
|
|
1059
1063
|
}
|
|
1060
|
-
function
|
|
1064
|
+
function Ro(e, n) {
|
|
1061
1065
|
const t = 50 + n * 10;
|
|
1062
1066
|
return `${e}-${t}`;
|
|
1063
1067
|
}
|
|
1064
|
-
function
|
|
1068
|
+
function Co(e, n) {
|
|
1065
1069
|
const t = (n + 1) * 10;
|
|
1066
1070
|
return `${e}-${t}`;
|
|
1067
1071
|
}
|
|
1068
|
-
function
|
|
1072
|
+
function xt(e, n, t) {
|
|
1069
1073
|
switch (n) {
|
|
1070
1074
|
default:
|
|
1071
|
-
case
|
|
1072
|
-
return
|
|
1073
|
-
case
|
|
1075
|
+
case be.Categorical:
|
|
1076
|
+
return Mo(e) ? e : So(e, t);
|
|
1077
|
+
case be.Sequential:
|
|
1078
|
+
return Ro(e, t);
|
|
1079
|
+
case be.Divergent:
|
|
1074
1080
|
return Co(e, t);
|
|
1075
|
-
case Ae.Divergent:
|
|
1076
|
-
return Go(e, t);
|
|
1077
1081
|
}
|
|
1078
1082
|
}
|
|
1079
|
-
function
|
|
1080
|
-
return
|
|
1083
|
+
function Go(e, n, t = Do, o) {
|
|
1084
|
+
return $t(e, t) ? e : (o > 4 && (ge(me.ColorLoop), o = o % 5), $t(n, t) ? xt(n, t, o) : xt(Bo(t), t, o));
|
|
1081
1085
|
}
|
|
1082
|
-
function
|
|
1083
|
-
return e.map((n) =>
|
|
1086
|
+
function jo(e) {
|
|
1087
|
+
return e.map((n) => xn(n) ? n : { value: n });
|
|
1084
1088
|
}
|
|
1085
|
-
function
|
|
1089
|
+
function Vo(e) {
|
|
1086
1090
|
return e.__internal === !0;
|
|
1087
1091
|
}
|
|
1088
1092
|
const ft = (e = null) => ({
|
|
@@ -1104,17 +1108,17 @@ const ft = (e = null) => ({
|
|
|
1104
1108
|
default: null
|
|
1105
1109
|
}
|
|
1106
1110
|
});
|
|
1107
|
-
function pt(e, n, t, o,
|
|
1111
|
+
function pt(e, n, t, o, a) {
|
|
1108
1112
|
const u = Fe({
|
|
1109
1113
|
width: 0,
|
|
1110
1114
|
height: 0
|
|
1111
|
-
}),
|
|
1115
|
+
}), l = Mn(12), i = v(() => {
|
|
1112
1116
|
var f;
|
|
1113
|
-
return e.value.length > 5 && ge(
|
|
1117
|
+
return e.value.length > 5 && ge(me.DatasetLength), (f = e.value) == null ? void 0 : f.map(
|
|
1114
1118
|
(r, m) => {
|
|
1115
|
-
if (
|
|
1119
|
+
if (Vo(r))
|
|
1116
1120
|
return r;
|
|
1117
|
-
const g =
|
|
1121
|
+
const g = jo(r.values), p = Go(
|
|
1118
1122
|
r.color,
|
|
1119
1123
|
t == null ? void 0 : t.value,
|
|
1120
1124
|
o == null ? void 0 : o.value.colorPalette,
|
|
@@ -1128,20 +1132,20 @@ function pt(e, n, t, o, l) {
|
|
|
1128
1132
|
};
|
|
1129
1133
|
}
|
|
1130
1134
|
);
|
|
1131
|
-
}),
|
|
1132
|
-
function
|
|
1133
|
-
const r = (
|
|
1135
|
+
}), c = v(() => Array.isArray(n.value) ? n.value : Wt(e.value).map((f, r) => r));
|
|
1136
|
+
function s(f) {
|
|
1137
|
+
const r = (a == null ? void 0 : a.value) === B.HORIZONTAL && c.value.length * (((o == null ? void 0 : o.value.barHeight) || Tt) * 2) + ((o == null ? void 0 : o.value.barHeight) || Tt) || f.height;
|
|
1134
1138
|
u.width = f.width, u.height = r;
|
|
1135
1139
|
}
|
|
1136
1140
|
return {
|
|
1137
|
-
chartID:
|
|
1138
|
-
computedLabels:
|
|
1141
|
+
chartID: l,
|
|
1142
|
+
computedLabels: c,
|
|
1139
1143
|
containerSize: u,
|
|
1140
1144
|
internalData: i,
|
|
1141
|
-
updateSize:
|
|
1145
|
+
updateSize: s
|
|
1142
1146
|
};
|
|
1143
1147
|
}
|
|
1144
|
-
const
|
|
1148
|
+
const Po = () => ({
|
|
1145
1149
|
xScale: {
|
|
1146
1150
|
type: Function,
|
|
1147
1151
|
default: null
|
|
@@ -1151,70 +1155,70 @@ const Fo = () => ({
|
|
|
1151
1155
|
default: null
|
|
1152
1156
|
}
|
|
1153
1157
|
});
|
|
1154
|
-
function
|
|
1155
|
-
const u =
|
|
1158
|
+
function Fo(e, n, t, o, a) {
|
|
1159
|
+
const u = R(null), l = R(null);
|
|
1156
1160
|
function i() {
|
|
1157
1161
|
var f, r, m, g;
|
|
1158
|
-
const { width:
|
|
1159
|
-
!
|
|
1162
|
+
const { width: c, height: s } = t;
|
|
1163
|
+
!c && !s || (o.value === B.HORIZONTAL ? (u.value = (f = e.value) != null && f.length ? wt(
|
|
1160
1164
|
e.value,
|
|
1161
|
-
|
|
1165
|
+
c,
|
|
1162
1166
|
o.value,
|
|
1163
|
-
|
|
1164
|
-
) : null,
|
|
1167
|
+
a.value.startOnZero
|
|
1168
|
+
) : null, l.value = (r = n.value) != null && r.length ? It(
|
|
1165
1169
|
n.value,
|
|
1166
|
-
|
|
1170
|
+
s,
|
|
1167
1171
|
o.value,
|
|
1168
|
-
|
|
1172
|
+
a.value
|
|
1169
1173
|
) : null) : (u.value = (m = n.value) != null && m.length ? It(
|
|
1170
1174
|
n.value,
|
|
1171
|
-
|
|
1175
|
+
c,
|
|
1172
1176
|
o.value,
|
|
1173
|
-
|
|
1174
|
-
) : null,
|
|
1177
|
+
a.value
|
|
1178
|
+
) : null, l.value = (g = e.value) != null && g.length ? wt(
|
|
1175
1179
|
e.value,
|
|
1176
|
-
|
|
1180
|
+
s,
|
|
1177
1181
|
o.value,
|
|
1178
|
-
|
|
1182
|
+
a.value.startOnZero
|
|
1179
1183
|
) : null));
|
|
1180
1184
|
}
|
|
1181
|
-
return Vt(i), { xScale: u, yScale:
|
|
1185
|
+
return Vt(i), { xScale: u, yScale: l };
|
|
1182
1186
|
}
|
|
1183
1187
|
function It(e, n, t, o) {
|
|
1184
|
-
const
|
|
1188
|
+
const a = [0, n], { padding: u, paddingInner: l, paddingOuter: i } = o, c = u ?? (t === B.HORIZONTAL ? Yt : Xt);
|
|
1185
1189
|
return Object.assign(
|
|
1186
|
-
|
|
1190
|
+
Be().range(a).paddingInner(l ?? c).paddingOuter(i ?? c).domain(e.map((s, f) => f)),
|
|
1187
1191
|
{ labels: e }
|
|
1188
1192
|
);
|
|
1189
1193
|
}
|
|
1190
1194
|
function wt(e, n, t, o) {
|
|
1191
|
-
const
|
|
1192
|
-
if (
|
|
1193
|
-
return
|
|
1194
|
-
const
|
|
1195
|
-
return
|
|
1195
|
+
const a = Ft(e).filter((f) => f != null), u = [0, n];
|
|
1196
|
+
if (a.length === 0)
|
|
1197
|
+
return Me().range(u).domain([0, 0]).nice();
|
|
1198
|
+
const l = Math.min(...a), i = o && l > 0 ? 0 : l, c = Math.max(...a), s = t === B.HORIZONTAL ? [i, c] : [c, i];
|
|
1199
|
+
return Me().range(u).domain(s).nice();
|
|
1196
1200
|
}
|
|
1197
1201
|
function Et(e) {
|
|
1198
1202
|
return (e == null ? void 0 : e.range) !== void 0 || (e == null ? void 0 : e.copy) !== void 0;
|
|
1199
1203
|
}
|
|
1200
1204
|
function et(e, n) {
|
|
1201
|
-
return
|
|
1205
|
+
return ve(e) ? e.bandwidth() / 2 + e(e.domain()[n]) : e(n);
|
|
1202
1206
|
}
|
|
1203
1207
|
function Nt(e, n, {
|
|
1204
1208
|
padding: t,
|
|
1205
1209
|
paddingInner: o,
|
|
1206
|
-
paddingOuter:
|
|
1210
|
+
paddingOuter: a
|
|
1207
1211
|
} = {}) {
|
|
1208
1212
|
const u = t ?? (n === B.HORIZONTAL ? Yt : Xt);
|
|
1209
|
-
return e.copy().paddingInner(o ?? u).paddingOuter(
|
|
1213
|
+
return e.copy().paddingInner(o ?? u).paddingOuter(a ?? u);
|
|
1210
1214
|
}
|
|
1211
1215
|
function en(e) {
|
|
1212
1216
|
return Object.values(B).includes(e);
|
|
1213
1217
|
}
|
|
1214
|
-
const
|
|
1218
|
+
const Ee = (e, n = !0) => ({
|
|
1215
1219
|
...ft(e),
|
|
1216
|
-
...
|
|
1217
|
-
...
|
|
1220
|
+
...Po(),
|
|
1221
|
+
...Se(),
|
|
1218
1222
|
classList: {
|
|
1219
1223
|
type: [String, Array],
|
|
1220
1224
|
default: () => []
|
|
@@ -1230,9 +1234,9 @@ const Ne = (e, n = !0) => ({
|
|
|
1230
1234
|
validator: en
|
|
1231
1235
|
}
|
|
1232
1236
|
} : {}
|
|
1233
|
-
}),
|
|
1237
|
+
}), zo = (e) => ({
|
|
1234
1238
|
...ft(e),
|
|
1235
|
-
...
|
|
1239
|
+
...Se(),
|
|
1236
1240
|
hoveredElement: {
|
|
1237
1241
|
type: [Number, String],
|
|
1238
1242
|
default: null
|
|
@@ -1279,7 +1283,7 @@ const Ne = (e, n = !0) => ({
|
|
|
1279
1283
|
type: [String, Array],
|
|
1280
1284
|
default: () => []
|
|
1281
1285
|
}
|
|
1282
|
-
}),
|
|
1286
|
+
}), Wo = { class: "lume-overlay-group" }, Zo = /* @__PURE__ */ W({
|
|
1283
1287
|
__name: "lume-overlay-group",
|
|
1284
1288
|
props: {
|
|
1285
1289
|
...We(),
|
|
@@ -1290,12 +1294,12 @@ const Ne = (e, n = !0) => ({
|
|
|
1290
1294
|
},
|
|
1291
1295
|
emits: ["click", "lume__internal--hover", "mouseover"],
|
|
1292
1296
|
setup(e, { emit: n }) {
|
|
1293
|
-
const t = e, o = n, { data:
|
|
1294
|
-
function
|
|
1297
|
+
const t = e, o = n, { data: a, orientation: u, xScale: l, yScale: i } = te(t), c = v(() => Wt(a));
|
|
1298
|
+
function s(f) {
|
|
1295
1299
|
var A;
|
|
1296
|
-
const r = u.value === B.HORIZONTAL ? i.value :
|
|
1300
|
+
const r = u.value === B.HORIZONTAL ? i.value : l.value, m = r.domain(), g = In(r), p = ((A = r.paddingInner) == null ? void 0 : A.call(r)) ?? 0, b = g * p, L = ve(r) ? r(m[f]) - b / 2 : r(f) - g / 2;
|
|
1297
1301
|
return u.value === B.HORIZONTAL ? {
|
|
1298
|
-
width: Math.max(...
|
|
1302
|
+
width: Math.max(...l.value.range()),
|
|
1299
1303
|
height: g,
|
|
1300
1304
|
transform: `translate(0, ${L})`
|
|
1301
1305
|
} : {
|
|
@@ -1304,8 +1308,8 @@ const Ne = (e, n = !0) => ({
|
|
|
1304
1308
|
transform: `translate(${L}, 0)`
|
|
1305
1309
|
};
|
|
1306
1310
|
}
|
|
1307
|
-
return (f, r) => (y(),
|
|
1308
|
-
(y(!0),
|
|
1311
|
+
return (f, r) => (y(), x("g", Wo, [
|
|
1312
|
+
(y(!0), x(q, null, z(c.value, (m, g) => (y(), X(d(mt), G(s(g), {
|
|
1309
1313
|
key: `overlay-${g}`,
|
|
1310
1314
|
"data-j-lume-overlay-group": g,
|
|
1311
1315
|
transition: !1,
|
|
@@ -1316,85 +1320,85 @@ const Ne = (e, n = !0) => ({
|
|
|
1316
1320
|
]));
|
|
1317
1321
|
}
|
|
1318
1322
|
}), ye = (e, n) => {
|
|
1319
|
-
function t(u, ...
|
|
1323
|
+
function t(u, ...l) {
|
|
1320
1324
|
}
|
|
1321
|
-
function o(u,
|
|
1325
|
+
function o(u, l) {
|
|
1322
1326
|
}
|
|
1323
1327
|
return { componentEventPropagator: {}, emitInternalEvent: t, listenInternalEvent: o };
|
|
1324
1328
|
};
|
|
1325
|
-
function
|
|
1329
|
+
function Uo(e) {
|
|
1326
1330
|
return { hasNegativeValues: v(
|
|
1327
1331
|
() => Ft(e.value).some((t) => t < 0)
|
|
1328
1332
|
) };
|
|
1329
1333
|
}
|
|
1330
|
-
function
|
|
1331
|
-
const
|
|
1334
|
+
function Xo(e, n, t, o) {
|
|
1335
|
+
const a = v(
|
|
1332
1336
|
() => o.value === B.HORIZONTAL
|
|
1333
1337
|
), u = v(
|
|
1334
1338
|
() => {
|
|
1335
|
-
var
|
|
1336
|
-
return e.height - (
|
|
1339
|
+
var s;
|
|
1340
|
+
return e.height - (a != null && a.value ? 0 : ((s = t.value) == null ? void 0 : s.call(t, 0)) || 0);
|
|
1337
1341
|
}
|
|
1338
|
-
),
|
|
1342
|
+
), l = v(
|
|
1339
1343
|
() => {
|
|
1340
|
-
var
|
|
1341
|
-
return
|
|
1344
|
+
var s;
|
|
1345
|
+
return a != null && a.value ? ((s = n.value) == null ? void 0 : s.call(n, 0)) || 0 : e.width;
|
|
1342
1346
|
}
|
|
1343
1347
|
), i = v(
|
|
1344
1348
|
() => {
|
|
1345
|
-
var
|
|
1346
|
-
return
|
|
1349
|
+
var s;
|
|
1350
|
+
return a != null && a.value ? "translate(0, 0)" : `translate(0, ${((s = t.value) == null ? void 0 : s.call(t, 0)) || 0})`;
|
|
1347
1351
|
}
|
|
1348
1352
|
);
|
|
1349
1353
|
return { negativeBarAttributes: v(() => ({
|
|
1350
|
-
width:
|
|
1354
|
+
width: l.value,
|
|
1351
1355
|
height: u.value,
|
|
1352
1356
|
transform: i.value
|
|
1353
1357
|
})) };
|
|
1354
1358
|
}
|
|
1355
|
-
function
|
|
1359
|
+
function Yo(e, n) {
|
|
1356
1360
|
return e.reduce((t, o) => st(o.values, n).map(
|
|
1357
|
-
(
|
|
1361
|
+
(a, u) => t[u] ? a.value > t[u] ? a.value : t[u] : a.value ?? 0
|
|
1358
1362
|
), []);
|
|
1359
1363
|
}
|
|
1360
|
-
function
|
|
1364
|
+
function Ko(e, n) {
|
|
1361
1365
|
return e.reduce((t, o) => st(o.values, n).map(
|
|
1362
|
-
(
|
|
1363
|
-
const
|
|
1364
|
-
return t[u] ? t[u] +
|
|
1366
|
+
(a, u) => {
|
|
1367
|
+
const l = a.value == null || a.value < 0 ? 0 : a.value;
|
|
1368
|
+
return t[u] ? t[u] + l : l;
|
|
1365
1369
|
}
|
|
1366
1370
|
), []);
|
|
1367
1371
|
}
|
|
1368
1372
|
const Dt = {
|
|
1369
|
-
"stacked-bar":
|
|
1373
|
+
"stacked-bar": Ko
|
|
1370
1374
|
};
|
|
1371
|
-
function tn(e, n, t, o,
|
|
1372
|
-
const
|
|
1375
|
+
function tn(e, n, t, o, a, u, l, i) {
|
|
1376
|
+
const c = v(
|
|
1373
1377
|
() => {
|
|
1374
1378
|
var f;
|
|
1375
1379
|
return n.value.withTooltip !== !1 && !((f = n.value.tooltipOptions) != null && f.targetElement);
|
|
1376
1380
|
}
|
|
1377
1381
|
);
|
|
1378
|
-
function
|
|
1382
|
+
function s(f) {
|
|
1379
1383
|
var g;
|
|
1380
|
-
const r = ((g =
|
|
1384
|
+
const r = ((g = a == null ? void 0 : a.value) == null ? void 0 : g.length) ?? 0, m = i != null && i.value && Dt[i.value] ? Dt[i.value](
|
|
1381
1385
|
f,
|
|
1382
1386
|
r
|
|
1383
|
-
) :
|
|
1387
|
+
) : Yo(f, r);
|
|
1384
1388
|
e.value = m.map((p, b) => ({
|
|
1385
1389
|
cx: (u == null ? void 0 : u.value) === B.HORIZONTAL ? t.value(p) : et(t.value, b),
|
|
1386
1390
|
cy: (u == null ? void 0 : u.value) === B.HORIZONTAL ? et(o.value, b) : o.value(p)
|
|
1387
1391
|
}));
|
|
1388
1392
|
}
|
|
1389
|
-
return
|
|
1393
|
+
return U(
|
|
1390
1394
|
[t, o],
|
|
1391
1395
|
() => {
|
|
1392
|
-
t.value && o.value && (
|
|
1396
|
+
t.value && o.value && (l != null && l.value) && c.value && s(l.value);
|
|
1393
1397
|
},
|
|
1394
1398
|
{ immediate: !0 }
|
|
1395
|
-
), { shouldGenerateTooltipAnchors:
|
|
1399
|
+
), { shouldGenerateTooltipAnchors: c, updateTooltipAnchorAttributes: s };
|
|
1396
1400
|
}
|
|
1397
|
-
function
|
|
1401
|
+
function Jo() {
|
|
1398
1402
|
const e = Fe({
|
|
1399
1403
|
opened: !1,
|
|
1400
1404
|
targetElement: null
|
|
@@ -1405,128 +1409,126 @@ function Qo() {
|
|
|
1405
1409
|
e.opened = !1, e.targetElement = null;
|
|
1406
1410
|
} };
|
|
1407
1411
|
}
|
|
1408
|
-
function
|
|
1412
|
+
function Qo(e) {
|
|
1409
1413
|
return { getTooltipItems: v(
|
|
1410
|
-
() => (t) => e.value.map(({ color: o, label:
|
|
1411
|
-
var
|
|
1414
|
+
() => (t) => e.value.map(({ color: o, label: a, values: u }) => {
|
|
1415
|
+
var l, i, c;
|
|
1412
1416
|
return {
|
|
1413
|
-
color: ((
|
|
1414
|
-
label:
|
|
1415
|
-
value: ((i = u[t]) == null ? void 0 : i.label) ?? ((
|
|
1417
|
+
color: ((l = u[t]) == null ? void 0 : l.color) || o,
|
|
1418
|
+
label: a,
|
|
1419
|
+
value: ((i = u[t]) == null ? void 0 : i.label) ?? ((c = u[t]) == null ? void 0 : c.value) ?? Ut
|
|
1416
1420
|
};
|
|
1417
1421
|
})
|
|
1418
1422
|
) };
|
|
1419
1423
|
}
|
|
1420
|
-
const tt = 16, nt = 8, ot = 28,
|
|
1424
|
+
const tt = 16, nt = 8, ot = 28, at = 24, Ae = {
|
|
1421
1425
|
VERTICAL: {
|
|
1422
1426
|
top: tt,
|
|
1423
1427
|
right: nt,
|
|
1424
1428
|
bottom: ot,
|
|
1425
|
-
left:
|
|
1429
|
+
left: at
|
|
1426
1430
|
},
|
|
1427
1431
|
HORIZONTAL: {
|
|
1428
1432
|
top: tt,
|
|
1429
1433
|
right: nt,
|
|
1430
1434
|
bottom: ot,
|
|
1431
|
-
left:
|
|
1435
|
+
left: at
|
|
1432
1436
|
}
|
|
1433
1437
|
};
|
|
1434
|
-
function
|
|
1438
|
+
function qo(e) {
|
|
1435
1439
|
return !e || e === "auto" || e.top == null || e.top === "auto" ? tt : e.top;
|
|
1436
1440
|
}
|
|
1437
|
-
function
|
|
1441
|
+
function ea(e) {
|
|
1438
1442
|
return !e || e === "auto" || e.right == null || e.right === "auto" ? nt : e.right;
|
|
1439
1443
|
}
|
|
1440
|
-
function
|
|
1444
|
+
function ta(e, n) {
|
|
1441
1445
|
return !e || e === "auto" || e.bottom == null || e.bottom === "auto" ? n || ot : e.bottom;
|
|
1442
1446
|
}
|
|
1443
|
-
function
|
|
1444
|
-
return !e || e === "auto" || e.left == null || e.left === "auto" ? n ||
|
|
1447
|
+
function na(e, n) {
|
|
1448
|
+
return !e || e === "auto" || e.left == null || e.left === "auto" ? n || at : e.left;
|
|
1445
1449
|
}
|
|
1446
|
-
const
|
|
1450
|
+
const oa = { class: "lume-chart__header" }, aa = { class: "lume-chart__header-section" }, la = {
|
|
1447
1451
|
key: 0,
|
|
1448
1452
|
class: "lume-chart__title lume-chart-title lume-typography--display"
|
|
1449
|
-
},
|
|
1453
|
+
}, ua = { class: "lume-chart__controls" }, ra = { class: "lume-chart__header-section" }, ia = {
|
|
1450
1454
|
key: 0,
|
|
1451
1455
|
class: "lume-chart__axis-title lume-axis-title lume-typography--body"
|
|
1452
|
-
},
|
|
1456
|
+
}, sa = { key: 3 }, ca = ["r"], da = {
|
|
1453
1457
|
key: 0,
|
|
1454
1458
|
class: "lume-chart__axis-title lume-chart__axis-title--centered lume-axis-title lume-typography--body"
|
|
1455
|
-
},
|
|
1459
|
+
}, va = /* @__PURE__ */ W({
|
|
1456
1460
|
__name: "lume-chart",
|
|
1457
1461
|
props: {
|
|
1458
|
-
...
|
|
1462
|
+
...Ee(),
|
|
1459
1463
|
chartType: {
|
|
1460
1464
|
type: String,
|
|
1461
1465
|
default: null
|
|
1462
1466
|
}
|
|
1463
1467
|
},
|
|
1464
1468
|
setup(e, { emit: n }) {
|
|
1465
|
-
const t = e, o = re(),
|
|
1466
|
-
|
|
1469
|
+
const t = e, o = re(), a = n, { data: u, labels: l, color: i, options: c, orientation: s, chartType: f } = te(t), r = R(-1), m = R(null), g = R(null), p = R([]), b = R(null), L = R(0), A = R(0), { allOptions: h } = fe(c), { internalData: $, computedLabels: N, containerSize: D, updateSize: P, chartID: w } = pt(u, l, i, h, s), { xScale: H, yScale: Y } = Fo(
|
|
1470
|
+
$,
|
|
1467
1471
|
N,
|
|
1468
1472
|
D,
|
|
1469
|
-
|
|
1473
|
+
s,
|
|
1470
1474
|
h
|
|
1471
|
-
),
|
|
1472
|
-
top:
|
|
1473
|
-
right:
|
|
1474
|
-
bottom:
|
|
1475
|
-
left:
|
|
1475
|
+
), K = v(() => ({
|
|
1476
|
+
top: qo(h.value.margins),
|
|
1477
|
+
right: ea(h.value.margins),
|
|
1478
|
+
bottom: ta(h.value.margins, L.value),
|
|
1479
|
+
left: na(h.value.margins, A.value)
|
|
1476
1480
|
})), Q = v(() => {
|
|
1477
1481
|
var O;
|
|
1478
|
-
return t.xScale ? Et(t.xScale) ? t.xScale : (O = t.xScale) == null ? void 0 : O.call(t,
|
|
1482
|
+
return t.xScale ? Et(t.xScale) ? t.xScale : (O = t.xScale) == null ? void 0 : O.call(t, $.value, l.value, D) : H.value;
|
|
1479
1483
|
}), F = v(() => {
|
|
1480
1484
|
var O;
|
|
1481
|
-
return t.yScale ? Et(t.yScale) ? t.yScale : (O = t.yScale) == null ? void 0 : O.call(t,
|
|
1485
|
+
return t.yScale ? Et(t.yScale) ? t.yScale : (O = t.yScale) == null ? void 0 : O.call(t, $.value, l.value, D) : Y.value;
|
|
1482
1486
|
}), ue = v(() => ({
|
|
1483
1487
|
...h.value.xAxisOptions,
|
|
1484
|
-
withHover:
|
|
1485
|
-
})),
|
|
1488
|
+
withHover: s.value === B.VERTICAL
|
|
1489
|
+
})), Le = v(() => ({
|
|
1486
1490
|
...h.value.yAxisOptions,
|
|
1487
|
-
withHover:
|
|
1491
|
+
withHover: s.value === B.HORIZONTAL
|
|
1488
1492
|
})), ke = v(() => {
|
|
1489
1493
|
var O;
|
|
1490
1494
|
return (O = h.value.xAxisOptions) == null ? void 0 : O.title;
|
|
1491
|
-
}),
|
|
1495
|
+
}), Oe = v(() => {
|
|
1492
1496
|
var O;
|
|
1493
1497
|
return (O = h.value.yAxisOptions) == null ? void 0 : O.title;
|
|
1494
|
-
}),
|
|
1498
|
+
}), S = v(() => {
|
|
1495
1499
|
var O;
|
|
1496
1500
|
return ((O = h.value.xAxisOptions) == null ? void 0 : O.withTitle) !== !1 && ke.value;
|
|
1497
1501
|
}), k = v(() => {
|
|
1498
1502
|
var O;
|
|
1499
|
-
return ((O = h.value.yAxisOptions) == null ? void 0 : O.withTitle) !== !1 &&
|
|
1503
|
+
return ((O = h.value.yAxisOptions) == null ? void 0 : O.withTitle) !== !1 && Oe.value;
|
|
1500
1504
|
}), E = v(
|
|
1501
1505
|
() => u.value.every((O) => !O.values.length)
|
|
1502
1506
|
), _ = v(() => {
|
|
1503
1507
|
const O = [], { noBaseScales: T } = h.value;
|
|
1504
1508
|
return !T && !E.value && O.push(() => !!(Q.value && F.value)), O.every((I) => I() === !0);
|
|
1505
|
-
}), { hasNegativeValues: j } =
|
|
1509
|
+
}), { hasNegativeValues: j } = Uo($), { negativeBarAttributes: J } = Xo(
|
|
1506
1510
|
D,
|
|
1507
1511
|
Q,
|
|
1508
1512
|
F,
|
|
1509
|
-
|
|
1510
|
-
), { shouldGenerateTooltipAnchors:
|
|
1513
|
+
s
|
|
1514
|
+
), { shouldGenerateTooltipAnchors: le } = tn(
|
|
1511
1515
|
p,
|
|
1512
1516
|
h,
|
|
1513
1517
|
Q,
|
|
1514
1518
|
F,
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1519
|
+
l,
|
|
1520
|
+
s,
|
|
1521
|
+
$,
|
|
1518
1522
|
f
|
|
1519
|
-
), { tooltipConfig:
|
|
1520
|
-
() => h.value.withTooltip !== !1 && $e.opened
|
|
1521
|
-
), be = v(
|
|
1523
|
+
), { tooltipConfig: De, showTooltip: Ze, hideTooltip: Ue } = Jo(), { getTooltipItems: $e } = Qo($), He = v(
|
|
1522
1524
|
() => {
|
|
1523
1525
|
var O;
|
|
1524
1526
|
return ((O = h.value.tooltipOptions) == null ? void 0 : O.position) || "top";
|
|
1525
1527
|
}
|
|
1526
|
-
),
|
|
1528
|
+
), xe = v(() => {
|
|
1527
1529
|
var T;
|
|
1528
1530
|
const O = (T = h.value.tooltipOptions) == null ? void 0 : T.withPointerEvents;
|
|
1529
|
-
return
|
|
1531
|
+
return De.opened && (!O || O && b.value === !1);
|
|
1530
1532
|
});
|
|
1531
1533
|
function Ge(O) {
|
|
1532
1534
|
var I;
|
|
@@ -1537,147 +1539,147 @@ const ll = { class: "lume-chart__header" }, al = { class: "lume-chart__header-se
|
|
|
1537
1539
|
const Ye = (I = h.value.tooltipOptions) != null && I.targetElement ? h.value.tooltipOptions.targetElement === "self" ? g.value.$el : h.value.tooltipOptions.targetElement : m.value[O];
|
|
1538
1540
|
Ze(Ye);
|
|
1539
1541
|
}
|
|
1540
|
-
|
|
1542
|
+
a("hovered-index-changed", { newIndex: O, oldIndex: T }), a("update:hoveredIndex", O);
|
|
1541
1543
|
}
|
|
1542
1544
|
function Xe() {
|
|
1543
|
-
Ue(), r.value = -1;
|
|
1545
|
+
Ue(), r.value = -1, a("update:hoveredIndex", -1);
|
|
1544
1546
|
}
|
|
1545
1547
|
function gt(O) {
|
|
1546
1548
|
if (!u.value.some(
|
|
1547
1549
|
({ values: I }) => O <= I.length - 1
|
|
1548
1550
|
)) {
|
|
1549
|
-
ge(
|
|
1551
|
+
ge(me.InvalidHoveredIndex);
|
|
1550
1552
|
return;
|
|
1551
1553
|
}
|
|
1552
1554
|
O == null || O === -1 ? Xe() : Ge(O);
|
|
1553
1555
|
}
|
|
1554
|
-
function
|
|
1556
|
+
function rn() {
|
|
1555
1557
|
setTimeout(() => {
|
|
1556
|
-
|
|
1558
|
+
xe.value && Xe(), a("chart-mouseleave");
|
|
1557
1559
|
}, 0);
|
|
1558
1560
|
}
|
|
1559
1561
|
function _t({ index: O, value: T, event: I }) {
|
|
1560
|
-
O !== null && Ge(O),
|
|
1562
|
+
O !== null && Ge(O), a("axis-mouseenter", { index: O, value: T, event: I });
|
|
1561
1563
|
}
|
|
1562
1564
|
function yt({ index: O, value: T, event: I }) {
|
|
1563
|
-
|
|
1565
|
+
a("axis-click", { index: O, value: T, event: I });
|
|
1564
1566
|
}
|
|
1565
|
-
return
|
|
1567
|
+
return U(
|
|
1566
1568
|
u,
|
|
1567
|
-
(O, T) =>
|
|
1568
|
-
),
|
|
1569
|
-
|
|
1570
|
-
(O, T) =>
|
|
1571
|
-
),
|
|
1569
|
+
(O, T) => a("data-changed", { newValue: O, oldValue: T })
|
|
1570
|
+
), U(
|
|
1571
|
+
l,
|
|
1572
|
+
(O, T) => a("labels-changed", { newValue: O, oldValue: T })
|
|
1573
|
+
), U(E, (O) => O && ge(me.Empty), { immediate: !0 }), U(() => t.hoveredIndex, gt), U(
|
|
1572
1574
|
p,
|
|
1573
1575
|
(O) => {
|
|
1574
1576
|
O && t.hoveredIndex != null && r.value === -1 && gt(t.hoveredIndex);
|
|
1575
1577
|
},
|
|
1576
1578
|
{ flush: "post" }
|
|
1577
|
-
),
|
|
1578
|
-
O === !1 &&
|
|
1579
|
+
), U(b, (O) => {
|
|
1580
|
+
O === !1 && De.opened && Xe();
|
|
1579
1581
|
}), _e(async () => {
|
|
1580
|
-
|
|
1581
|
-
}), Ke("chartID", w), Ke("isEmpty", E), Ke("tooltipAnchorAttributes", p), (O, T) => (y(),
|
|
1582
|
+
a("rendered"), o.groups || console.error('"groups" `<slot>` must have content.');
|
|
1583
|
+
}), Ke("chartID", w), Ke("isEmpty", E), Ke("tooltipAnchorAttributes", p), (O, T) => (y(), X(d(ro), {
|
|
1582
1584
|
id: `lume-chart_${d(w)}`,
|
|
1583
1585
|
ref_key: "chartContainer",
|
|
1584
1586
|
ref: g,
|
|
1585
|
-
margins:
|
|
1587
|
+
margins: K.value,
|
|
1586
1588
|
"container-size": d(D),
|
|
1587
1589
|
"no-min-size": d(h).noMinSize,
|
|
1588
1590
|
"transparent-background": d(h).transparentBackground,
|
|
1589
1591
|
"data-j-lume-chart": "",
|
|
1590
1592
|
onResize: d(P),
|
|
1591
|
-
onClick: T[24] || (T[24] = (I) =>
|
|
1592
|
-
onMouseenter: T[25] || (T[25] = (I) =>
|
|
1593
|
-
onMouseleave:
|
|
1593
|
+
onClick: T[24] || (T[24] = (I) => a("chart-click", I)),
|
|
1594
|
+
onMouseenter: T[25] || (T[25] = (I) => a("chart-mouseenter", I)),
|
|
1595
|
+
onMouseleave: rn
|
|
1594
1596
|
}, {
|
|
1595
1597
|
header: V(() => [
|
|
1596
|
-
C("div",
|
|
1597
|
-
C("div",
|
|
1598
|
-
O.title ? (y(),
|
|
1599
|
-
C("div",
|
|
1600
|
-
|
|
1598
|
+
C("div", oa, [
|
|
1599
|
+
C("div", aa, [
|
|
1600
|
+
O.title ? (y(), x("h1", la, oe(O.title), 1)) : Z("", !0),
|
|
1601
|
+
C("div", ua, [
|
|
1602
|
+
M(O.$slots, "controls", {}, void 0, !0)
|
|
1601
1603
|
])
|
|
1602
1604
|
]),
|
|
1603
|
-
C("div",
|
|
1604
|
-
k.value ? (y(),
|
|
1605
|
-
|
|
1606
|
-
d(h).withLegend !== !1 && d(h).legendPosition !== "bottom" ? (y(),
|
|
1605
|
+
C("div", ra, [
|
|
1606
|
+
k.value ? (y(), x("h3", ia, oe(Oe.value), 1)) : Z("", !0),
|
|
1607
|
+
M(O.$slots, "legend", { data: d($) }, () => [
|
|
1608
|
+
d(h).withLegend !== !1 && d(h).legendPosition !== "bottom" ? (y(), X(d(Ot), {
|
|
1607
1609
|
key: 0,
|
|
1608
|
-
data: d(
|
|
1610
|
+
data: d($),
|
|
1609
1611
|
class: "lume-chart__legend",
|
|
1610
1612
|
"data-j-lume-chart__legend": "",
|
|
1611
|
-
onClick: T[0] || (T[0] = (I) =>
|
|
1612
|
-
onMouseenter: T[1] || (T[1] = (I) =>
|
|
1613
|
-
onMouseleave: T[2] || (T[2] = (I) =>
|
|
1614
|
-
}, null, 8, ["data"])) :
|
|
1613
|
+
onClick: T[0] || (T[0] = (I) => a("legend-click", I)),
|
|
1614
|
+
onMouseenter: T[1] || (T[1] = (I) => a("legend-mouseenter", I)),
|
|
1615
|
+
onMouseleave: T[2] || (T[2] = (I) => a("legend-mouseleave"))
|
|
1616
|
+
}, null, 8, ["data"])) : Z("", !0)
|
|
1615
1617
|
], !0)
|
|
1616
1618
|
])
|
|
1617
1619
|
])
|
|
1618
1620
|
]),
|
|
1619
1621
|
footer: V(() => [
|
|
1620
|
-
|
|
1621
|
-
d(h).withLegend !== !1 && d(h).legendPosition == "bottom" ? (y(),
|
|
1622
|
+
S.value ? (y(), x("h3", da, oe(ke.value), 1)) : Z("", !0),
|
|
1623
|
+
d(h).withLegend !== !1 && d(h).legendPosition == "bottom" ? (y(), X(d(Ot), {
|
|
1622
1624
|
key: 1,
|
|
1623
|
-
data: d(
|
|
1625
|
+
data: d($),
|
|
1624
1626
|
class: "lume-chart__legend lume-chart__legend--bottom",
|
|
1625
1627
|
"data-j-lume-chart__legend": "",
|
|
1626
|
-
onClick: T[16] || (T[16] = (I) =>
|
|
1627
|
-
onMouseenter: T[17] || (T[17] = (I) =>
|
|
1628
|
-
onMouseleave: T[18] || (T[18] = (I) =>
|
|
1629
|
-
}, null, 8, ["data"])) :
|
|
1628
|
+
onClick: T[16] || (T[16] = (I) => a("legend-click", I)),
|
|
1629
|
+
onMouseenter: T[17] || (T[17] = (I) => a("legend-mouseenter", I)),
|
|
1630
|
+
onMouseleave: T[18] || (T[18] = (I) => a("legend-mouseleave"))
|
|
1631
|
+
}, null, 8, ["data"])) : Z("", !0)
|
|
1630
1632
|
]),
|
|
1631
1633
|
extra: V(() => [
|
|
1632
|
-
|
|
1633
|
-
data: d(
|
|
1634
|
+
M(O.$slots, "tooltip", G(d(De), {
|
|
1635
|
+
data: d($),
|
|
1634
1636
|
labels: d(N),
|
|
1635
1637
|
title: d(N)[r.value],
|
|
1636
|
-
items: d(
|
|
1637
|
-
position:
|
|
1638
|
+
items: d($e)(r.value),
|
|
1639
|
+
position: He.value,
|
|
1638
1640
|
withTooltip: d(h).withTooltip !== !1,
|
|
1639
1641
|
hoveredIndex: r.value,
|
|
1640
1642
|
handleMouseEnter: () => b.value = !0,
|
|
1641
1643
|
handleMouseLeave: () => b.value = !1,
|
|
1642
1644
|
options: d(h).tooltipOptions
|
|
1643
1645
|
}), () => [
|
|
1644
|
-
|
|
1645
|
-
position:
|
|
1646
|
+
d(h).withTooltip !== !1 ? (y(), X(d(No), G({ key: 0 }, d(De), {
|
|
1647
|
+
position: He.value,
|
|
1646
1648
|
title: d(N)[r.value],
|
|
1647
|
-
items: d(
|
|
1649
|
+
items: d($e)(r.value),
|
|
1648
1650
|
options: d(h).tooltipOptions,
|
|
1649
1651
|
"data-j-lume-chart__tooltip": "",
|
|
1650
|
-
onOpened: T[19] || (T[19] = (I) =>
|
|
1652
|
+
onOpened: T[19] || (T[19] = (I) => a("tooltip-opened", {
|
|
1651
1653
|
index: r.value,
|
|
1652
1654
|
targetElement: I
|
|
1653
1655
|
})),
|
|
1654
|
-
onMoved: T[20] || (T[20] = (I) =>
|
|
1656
|
+
onMoved: T[20] || (T[20] = (I) => a("tooltip-moved", {
|
|
1655
1657
|
index: r.value,
|
|
1656
1658
|
targetElement: I
|
|
1657
1659
|
})),
|
|
1658
|
-
onClosed: T[21] || (T[21] = (I) =>
|
|
1660
|
+
onClosed: T[21] || (T[21] = (I) => a("tooltip-closed")),
|
|
1659
1661
|
onTooltipMouseenter: T[22] || (T[22] = (I) => b.value = !0),
|
|
1660
1662
|
onTooltipMouseleave: T[23] || (T[23] = (I) => b.value = !1)
|
|
1661
1663
|
}), {
|
|
1662
1664
|
default: V(() => [
|
|
1663
|
-
|
|
1664
|
-
data: d(
|
|
1665
|
+
M(O.$slots, "tooltip-content", {
|
|
1666
|
+
data: d($),
|
|
1665
1667
|
labels: d(N),
|
|
1666
1668
|
hoveredIndex: r.value
|
|
1667
1669
|
}, void 0, !0)
|
|
1668
1670
|
]),
|
|
1669
1671
|
_: 3
|
|
1670
|
-
}, 16, ["position", "title", "items", "options"])) :
|
|
1672
|
+
}, 16, ["position", "title", "items", "options"])) : Z("", !0)
|
|
1671
1673
|
], !0)
|
|
1672
1674
|
]),
|
|
1673
1675
|
default: V(() => [
|
|
1674
|
-
_.value ? (y(),
|
|
1675
|
-
d(j) ? (y(),
|
|
1676
|
+
_.value ? (y(), x(q, { key: 0 }, [
|
|
1677
|
+
d(j) ? (y(), X(d(mt), G({ key: 0 }, d(J), {
|
|
1676
1678
|
"class-list": "lume-fill--negative",
|
|
1677
1679
|
transition: !1,
|
|
1678
1680
|
"data-j-lume-chart__negative-values": ""
|
|
1679
|
-
}), null, 16)) :
|
|
1680
|
-
d(h).withAxes !== !1 ?
|
|
1681
|
+
}), null, 16)) : Z("", !0),
|
|
1682
|
+
d(h).withAxes !== !1 ? M(O.$slots, "axes", {
|
|
1681
1683
|
key: 1,
|
|
1682
1684
|
xScale: Q.value,
|
|
1683
1685
|
yScale: F.value,
|
|
@@ -1691,75 +1693,75 @@ const ll = { class: "lume-chart__header" }, al = { class: "lume-chart__header-se
|
|
|
1691
1693
|
"container-size": d(D),
|
|
1692
1694
|
options: ue.value,
|
|
1693
1695
|
"hovered-index": r.value,
|
|
1694
|
-
orientation: d(
|
|
1696
|
+
orientation: d(s),
|
|
1695
1697
|
"data-j-lume-chart__x-axis": "",
|
|
1696
1698
|
onClick: yt,
|
|
1697
1699
|
onMouseenter: _t,
|
|
1698
|
-
onMouseleave: T[3] || (T[3] = (I) =>
|
|
1700
|
+
onMouseleave: T[3] || (T[3] = (I) => a("axis-mouseleave")),
|
|
1699
1701
|
"onLume__internal-AxisSize": T[4] || (T[4] = (I) => L.value = I)
|
|
1700
1702
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"]),
|
|
1701
1703
|
ie(d(Lt), {
|
|
1702
1704
|
type: "y",
|
|
1703
1705
|
scale: F.value,
|
|
1704
1706
|
"container-size": d(D),
|
|
1705
|
-
options:
|
|
1707
|
+
options: Le.value,
|
|
1706
1708
|
"hovered-index": r.value,
|
|
1707
|
-
orientation: d(
|
|
1709
|
+
orientation: d(s),
|
|
1708
1710
|
"data-j-lume-chart__y-axis": "",
|
|
1709
1711
|
onClick: yt,
|
|
1710
1712
|
onMouseenter: _t,
|
|
1711
|
-
onMouseleave: T[5] || (T[5] = (I) =>
|
|
1713
|
+
onMouseleave: T[5] || (T[5] = (I) => a("axis-mouseleave")),
|
|
1712
1714
|
"onLume__internal-AxisSize": T[6] || (T[6] = (I) => A.value = I)
|
|
1713
1715
|
}, null, 8, ["scale", "container-size", "options", "hovered-index", "orientation"])
|
|
1714
|
-
], !0) :
|
|
1715
|
-
d(h).withHover !== !1 ? (y(),
|
|
1716
|
+
], !0) : Z("", !0),
|
|
1717
|
+
d(h).withHover !== !1 ? (y(), X(d(Zo), {
|
|
1716
1718
|
key: 2,
|
|
1717
|
-
data: d(
|
|
1718
|
-
orientation: d(
|
|
1719
|
+
data: d($),
|
|
1720
|
+
orientation: d(s),
|
|
1719
1721
|
"x-scale": Q.value,
|
|
1720
1722
|
"y-scale": F.value,
|
|
1721
1723
|
"data-j-lume-chart__overlay-group": "",
|
|
1722
1724
|
"onLume__internal-Hover": Ge
|
|
1723
|
-
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) :
|
|
1724
|
-
d(
|
|
1725
|
-
(y(!0),
|
|
1725
|
+
}, null, 8, ["data", "orientation", "x-scale", "y-scale"])) : Z("", !0),
|
|
1726
|
+
d(le) ? (y(), x("g", sa, [
|
|
1727
|
+
(y(!0), x(q, null, z(p.value, (I, Ye) => (y(), x("circle", G(I, {
|
|
1726
1728
|
ref_for: !0,
|
|
1727
1729
|
ref_key: "tooltipAnchor",
|
|
1728
1730
|
ref: m,
|
|
1729
1731
|
key: `anchor_${Ye}`,
|
|
1730
|
-
r: d(
|
|
1732
|
+
r: d(jn),
|
|
1731
1733
|
class: "lume-fill--transparent"
|
|
1732
|
-
}), null, 16,
|
|
1733
|
-
])) :
|
|
1734
|
-
|
|
1735
|
-
data: d(
|
|
1734
|
+
}), null, 16, ca))), 128))
|
|
1735
|
+
])) : Z("", !0),
|
|
1736
|
+
M(O.$slots, "groups", {
|
|
1737
|
+
data: d($),
|
|
1736
1738
|
labels: d(N),
|
|
1737
1739
|
options: d(h),
|
|
1738
|
-
orientation: d(
|
|
1740
|
+
orientation: d(s),
|
|
1739
1741
|
xScale: Q.value,
|
|
1740
1742
|
yScale: F.value,
|
|
1741
1743
|
hoveredIndex: r.value,
|
|
1742
1744
|
containerSize: d(D),
|
|
1743
1745
|
transition: d(h).withTransition !== !1,
|
|
1744
1746
|
classList: O.classList,
|
|
1745
|
-
onNodeClick: T[7] || (T[7] = (I) =>
|
|
1746
|
-
onNodeMouseenter: T[8] || (T[8] = (I) =>
|
|
1747
|
-
onNodeMouseleave: T[9] || (T[9] = (I) =>
|
|
1748
|
-
onLinkClick: T[10] || (T[10] = (I) =>
|
|
1749
|
-
onLinkMouseenter: T[11] || (T[11] = (I) =>
|
|
1750
|
-
onLinkMouseleave: T[12] || (T[12] = (I) =>
|
|
1751
|
-
onBarClick: T[13] || (T[13] = (I) =>
|
|
1752
|
-
onLineClick: T[14] || (T[14] = (I) =>
|
|
1753
|
-
onPointClick: T[15] || (T[15] = (I) =>
|
|
1747
|
+
onNodeClick: T[7] || (T[7] = (I) => a("node-click", I)),
|
|
1748
|
+
onNodeMouseenter: T[8] || (T[8] = (I) => a("node-mouseenter", I)),
|
|
1749
|
+
onNodeMouseleave: T[9] || (T[9] = (I) => a("node-mouseleave", I)),
|
|
1750
|
+
onLinkClick: T[10] || (T[10] = (I) => a("link-click", I)),
|
|
1751
|
+
onLinkMouseenter: T[11] || (T[11] = (I) => a("link-mouseenter", I)),
|
|
1752
|
+
onLinkMouseleave: T[12] || (T[12] = (I) => a("link-mouseleave", I)),
|
|
1753
|
+
onBarClick: T[13] || (T[13] = (I) => a("bar-click", I)),
|
|
1754
|
+
onLineClick: T[14] || (T[14] = (I) => a("line-click", I)),
|
|
1755
|
+
onPointClick: T[15] || (T[15] = (I) => a("point-click", I)),
|
|
1754
1756
|
"onLume__internal-Hover": Ge
|
|
1755
1757
|
}, void 0, !0)
|
|
1756
|
-
], 64)) :
|
|
1758
|
+
], 64)) : Z("", !0)
|
|
1757
1759
|
]),
|
|
1758
1760
|
_: 3
|
|
1759
1761
|
}, 8, ["id", "margins", "container-size", "no-min-size", "transparent-background", "onResize"]));
|
|
1760
1762
|
}
|
|
1761
1763
|
});
|
|
1762
|
-
const
|
|
1764
|
+
const Ne = /* @__PURE__ */ ee(va, [["__scopeId", "data-v-14e6a8a3"]]), Ht = 8, ma = 8, fa = 20, we = 2, Bt = 2, pa = ["dy", "dominant-baseline"], ha = ["y", "x", "width", "height"], ga = { class: "lume-alluvial-group__label-wrapper" }, _a = /* @__PURE__ */ W({
|
|
1763
1765
|
__name: "lume-alluvial-node-label",
|
|
1764
1766
|
props: {
|
|
1765
1767
|
bottom: { type: Boolean, default: !1 },
|
|
@@ -1768,62 +1770,93 @@ const De = /* @__PURE__ */ ee(ml, [["__scopeId", "data-v-84133075"]]), Ht = 8, f
|
|
|
1768
1770
|
},
|
|
1769
1771
|
emits: ["lume__internal--node-resize"],
|
|
1770
1772
|
setup(e, { emit: n }) {
|
|
1771
|
-
const t = e, o = n,
|
|
1772
|
-
return
|
|
1773
|
-
[
|
|
1774
|
-
async ([i,
|
|
1775
|
-
if (i &&
|
|
1776
|
-
u.value =
|
|
1777
|
-
const { width:
|
|
1778
|
-
u.value =
|
|
1773
|
+
const t = e, o = n, a = R(null), u = R(t.maxWidth), l = R(1);
|
|
1774
|
+
return U(
|
|
1775
|
+
[a, () => t.maxWidth],
|
|
1776
|
+
async ([i, c]) => {
|
|
1777
|
+
if (i && c) {
|
|
1778
|
+
u.value = c, await kt();
|
|
1779
|
+
const { width: s, height: f } = i.getBoundingClientRect();
|
|
1780
|
+
u.value = s + Bt > c ? c : s + Bt, l.value = Math.ceil(f);
|
|
1779
1781
|
}
|
|
1780
1782
|
},
|
|
1781
1783
|
{ immediate: !0 }
|
|
1782
|
-
),
|
|
1784
|
+
), U(u, async (i) => {
|
|
1783
1785
|
i !== t.maxWidth && (await kt(), o("lume__internal--node-resize"));
|
|
1784
|
-
}), (i,
|
|
1786
|
+
}), (i, c) => e.maxWidth ? (y(), x("foreignObject", {
|
|
1785
1787
|
key: 1,
|
|
1786
1788
|
class: "lume-alluvial-group__node-foreign",
|
|
1787
|
-
y: e.bottom ? "0.1em" : -
|
|
1789
|
+
y: e.bottom ? "0.1em" : -l.value + 1,
|
|
1788
1790
|
x: e.left ? -u.value : 0,
|
|
1789
1791
|
width: u.value,
|
|
1790
|
-
height:
|
|
1792
|
+
height: l.value
|
|
1791
1793
|
}, [
|
|
1792
|
-
C("div",
|
|
1794
|
+
C("div", ga, [
|
|
1793
1795
|
C("span", {
|
|
1794
1796
|
ref_key: "text",
|
|
1795
|
-
ref:
|
|
1797
|
+
ref: a,
|
|
1796
1798
|
class: "lume-alluvial-group__node-label"
|
|
1797
1799
|
}, [
|
|
1798
|
-
|
|
1800
|
+
M(i.$slots, "default", {}, void 0, !0)
|
|
1799
1801
|
], 512)
|
|
1800
1802
|
])
|
|
1801
|
-
], 8,
|
|
1803
|
+
], 8, ha)) : (y(), x("text", {
|
|
1802
1804
|
key: 0,
|
|
1803
1805
|
class: "lume-alluvial-group__node-label",
|
|
1804
1806
|
dy: e.bottom ? ".2em" : "-.2em",
|
|
1805
1807
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1806
1808
|
}, [
|
|
1807
|
-
|
|
1808
|
-
], 8,
|
|
1809
|
+
M(i.$slots, "default", {}, void 0, !0)
|
|
1810
|
+
], 8, pa));
|
|
1809
1811
|
}
|
|
1810
1812
|
});
|
|
1811
|
-
const
|
|
1813
|
+
const ya = /* @__PURE__ */ ee(_a, [["__scopeId", "data-v-7126dfdb"]]), ka = ["y", "dominant-baseline"], ba = /* @__PURE__ */ W({
|
|
1812
1814
|
__name: "lume-alluvial-node-value",
|
|
1813
1815
|
props: {
|
|
1814
1816
|
bottom: { type: Boolean, default: !0 }
|
|
1815
1817
|
},
|
|
1816
1818
|
setup(e) {
|
|
1817
|
-
return (n, t) => (y(),
|
|
1819
|
+
return (n, t) => (y(), x("text", {
|
|
1818
1820
|
class: "lume-alluvial-group__node-value",
|
|
1819
1821
|
y: e.bottom ? ".2em" : "-.2em",
|
|
1820
1822
|
"dominant-baseline": e.bottom ? "hanging" : "auto"
|
|
1821
1823
|
}, [
|
|
1822
|
-
|
|
1823
|
-
], 8,
|
|
1824
|
+
M(n.$slots, "default", {}, void 0, !0)
|
|
1825
|
+
], 8, ka));
|
|
1826
|
+
}
|
|
1827
|
+
});
|
|
1828
|
+
const Aa = /* @__PURE__ */ ee(ba, [["__scopeId", "data-v-b4fc758b"]]), Ta = ["transform"], La = ["transform"], Oa = ["transform"], $a = /* @__PURE__ */ W({
|
|
1829
|
+
__name: "lume-alluvial-node-header",
|
|
1830
|
+
props: {
|
|
1831
|
+
x: { type: Number, required: !0 },
|
|
1832
|
+
y: { type: Number, required: !0 }
|
|
1833
|
+
},
|
|
1834
|
+
setup(e) {
|
|
1835
|
+
const n = R(null), t = v(
|
|
1836
|
+
() => n.value && `translate(${-n.value.getBBox().width / 2}, 0)`
|
|
1837
|
+
), o = v(
|
|
1838
|
+
() => n.value && `translate(${n.value.getBBox().width / 2}, 0)`
|
|
1839
|
+
);
|
|
1840
|
+
return (a, u) => (y(), x("g", {
|
|
1841
|
+
transform: `translate(${e.x}, ${e.y})`
|
|
1842
|
+
}, [
|
|
1843
|
+
C("g", { transform: t.value }, [
|
|
1844
|
+
M(a.$slots, "before", {}, void 0, !0)
|
|
1845
|
+
], 8, La),
|
|
1846
|
+
C("text", {
|
|
1847
|
+
ref_key: "textRef",
|
|
1848
|
+
ref: n,
|
|
1849
|
+
class: "lume-alluvial-group__node-header lume-typography--caption"
|
|
1850
|
+
}, [
|
|
1851
|
+
M(a.$slots, "default", {}, void 0, !0)
|
|
1852
|
+
], 512),
|
|
1853
|
+
C("g", { transform: o.value }, [
|
|
1854
|
+
M(a.$slots, "after", {}, void 0, !0)
|
|
1855
|
+
], 8, Oa)
|
|
1856
|
+
], 8, Ta));
|
|
1824
1857
|
}
|
|
1825
1858
|
});
|
|
1826
|
-
const
|
|
1859
|
+
const xa = /* @__PURE__ */ ee($a, [["__scopeId", "data-v-0e483453"]]);
|
|
1827
1860
|
function Mt(e, n) {
|
|
1828
1861
|
return {
|
|
1829
1862
|
x0: 0 + (n ? n.left : 0),
|
|
@@ -1832,57 +1865,57 @@ function Mt(e, n) {
|
|
|
1832
1865
|
y1: e.height - (n ? n.bottom : 0)
|
|
1833
1866
|
};
|
|
1834
1867
|
}
|
|
1835
|
-
function
|
|
1836
|
-
const n =
|
|
1868
|
+
function Ia(e) {
|
|
1869
|
+
const n = R(Mt(e));
|
|
1837
1870
|
function t(o) {
|
|
1838
1871
|
n.value = Mt(e, o);
|
|
1839
1872
|
}
|
|
1840
1873
|
return { extents: n, updateExtents: t };
|
|
1841
1874
|
}
|
|
1842
1875
|
var Ve = /* @__PURE__ */ ((e) => (e.GraphProblem = "There was an issue generating your alluvial graph.", e.BarScaleDomainAbove0 = "Bar linear scale domain cannot start above 0!", e.BarScaleNull = "Bar linear scale cannot be `null`", e))(Ve || {});
|
|
1843
|
-
const
|
|
1844
|
-
function
|
|
1845
|
-
t && Pt() || console.error(
|
|
1876
|
+
const wa = "[lume] ";
|
|
1877
|
+
function lt(e, n, t = !0) {
|
|
1878
|
+
t && Pt() || console.error(wa + "Error: " + e, n);
|
|
1846
1879
|
}
|
|
1847
|
-
const
|
|
1848
|
-
function
|
|
1880
|
+
const Ea = 200;
|
|
1881
|
+
function Ie(e) {
|
|
1849
1882
|
return typeof e == "string" || typeof e == "number" ? e : e.id ?? e.label;
|
|
1850
1883
|
}
|
|
1851
|
-
function
|
|
1884
|
+
function Na(e, n) {
|
|
1852
1885
|
return n.nodes.find((t) => t.id === e);
|
|
1853
1886
|
}
|
|
1854
|
-
function
|
|
1887
|
+
function Da(e, n) {
|
|
1855
1888
|
return n.links.find((t) => t.id === e);
|
|
1856
1889
|
}
|
|
1857
1890
|
function nn(e) {
|
|
1858
1891
|
return !!(e.sourceLinks && e.targetLinks);
|
|
1859
1892
|
}
|
|
1860
|
-
function
|
|
1893
|
+
function Ha(e, n) {
|
|
1861
1894
|
if (!n)
|
|
1862
1895
|
return;
|
|
1863
|
-
const t = e.nodes.filter((
|
|
1864
|
-
(
|
|
1896
|
+
const t = e.nodes.filter((l) => l.targetLinks.length === 0).map((l) => `${l.id}`), o = e.nodes.filter((l) => l.sourceLinks.length === 0).map((l) => `${l.id}`), a = n.filter((l) => t.includes(l.dataset.id)).reduce(
|
|
1897
|
+
(l, i) => Math.max(l, i.getBBox().width),
|
|
1865
1898
|
-1 / 0
|
|
1866
|
-
), u = n.filter((
|
|
1867
|
-
(
|
|
1899
|
+
), u = n.filter((l) => o.includes(l.dataset.id)).reduce(
|
|
1900
|
+
(l, i) => Math.max(l, i.getBBox().width),
|
|
1868
1901
|
-1 / 0
|
|
1869
1902
|
);
|
|
1870
1903
|
return {
|
|
1871
|
-
left:
|
|
1904
|
+
left: a,
|
|
1872
1905
|
top: 0,
|
|
1873
1906
|
right: u,
|
|
1874
1907
|
bottom: 0
|
|
1875
1908
|
};
|
|
1876
1909
|
}
|
|
1877
|
-
function
|
|
1910
|
+
function Ba(e) {
|
|
1878
1911
|
return e.map((n) => {
|
|
1879
|
-
const t = n.y1 - n.y0 <
|
|
1912
|
+
const t = n.y1 - n.y0 < we;
|
|
1880
1913
|
return {
|
|
1881
1914
|
x: n.x0,
|
|
1882
|
-
y: n.y0 - (t ?
|
|
1915
|
+
y: n.y0 - (t ? we / 2 : 0),
|
|
1883
1916
|
// Negative offset to account for the min. height
|
|
1884
1917
|
width: n.x1 - n.x0,
|
|
1885
|
-
height: t ?
|
|
1918
|
+
height: t ? we : n.y1 - n.y0,
|
|
1886
1919
|
textTransform: {
|
|
1887
1920
|
x: n.depth > 0 ? n.x1 + Ht : n.x0 - Ht,
|
|
1888
1921
|
y: (n.y1 + n.y0) / 2
|
|
@@ -1891,59 +1924,59 @@ function El(e) {
|
|
|
1891
1924
|
};
|
|
1892
1925
|
});
|
|
1893
1926
|
}
|
|
1894
|
-
function
|
|
1927
|
+
function Ma(e) {
|
|
1895
1928
|
return [e.source.x1, e.y0];
|
|
1896
1929
|
}
|
|
1897
|
-
function
|
|
1930
|
+
function Sa(e) {
|
|
1898
1931
|
return [e.target.x0, e.y1];
|
|
1899
1932
|
}
|
|
1900
|
-
function
|
|
1901
|
-
return e.curveFunction ?
|
|
1933
|
+
function Ra(e) {
|
|
1934
|
+
return e.curveFunction ? hn(e.curveFunction).source(Ma).target(Sa) : kn();
|
|
1902
1935
|
}
|
|
1903
|
-
function
|
|
1936
|
+
function Ca(e) {
|
|
1904
1937
|
return e.map((n) => {
|
|
1905
1938
|
var t;
|
|
1906
1939
|
return {
|
|
1907
1940
|
id: n.id,
|
|
1908
|
-
color: n.color || ((t = n.source) == null ? void 0 : t.color) ||
|
|
1909
|
-
d:
|
|
1941
|
+
color: n.color || ((t = n.source) == null ? void 0 : t.color) || Ce,
|
|
1942
|
+
d: Ra(n)(n),
|
|
1910
1943
|
strokeWidth: Math.max(1, n.width),
|
|
1911
1944
|
link: n
|
|
1912
1945
|
};
|
|
1913
1946
|
});
|
|
1914
1947
|
}
|
|
1915
|
-
function St(e, n, t, o,
|
|
1948
|
+
function St(e, n, t, o, a) {
|
|
1916
1949
|
if (o === !1) {
|
|
1917
1950
|
e.node = {
|
|
1918
1951
|
...e.node,
|
|
1919
|
-
transitionValue:
|
|
1952
|
+
transitionValue: a ? void 0 : t
|
|
1920
1953
|
};
|
|
1921
1954
|
return;
|
|
1922
1955
|
}
|
|
1923
|
-
const u = Date.now(),
|
|
1924
|
-
let
|
|
1925
|
-
|
|
1956
|
+
const u = Date.now(), l = Dn(n, t), i = () => {
|
|
1957
|
+
let s = (Date.now() - u) / Ea;
|
|
1958
|
+
s > 1 && (s = 1), e.node = {
|
|
1926
1959
|
...e.node,
|
|
1927
|
-
transitionValue:
|
|
1928
|
-
},
|
|
1960
|
+
transitionValue: a && s === 1 ? void 0 : l(s)
|
|
1961
|
+
}, s < 1 && requestAnimationFrame(i);
|
|
1929
1962
|
};
|
|
1930
1963
|
requestAnimationFrame(i);
|
|
1931
1964
|
}
|
|
1932
|
-
const
|
|
1965
|
+
const Ga = {
|
|
1933
1966
|
nodes: [],
|
|
1934
1967
|
links: []
|
|
1935
1968
|
};
|
|
1936
1969
|
function Rt(e, n) {
|
|
1937
1970
|
return n.find((t) => t.every((o) => o.x0 === e.x0));
|
|
1938
1971
|
}
|
|
1939
|
-
function
|
|
1940
|
-
const o =
|
|
1972
|
+
function ja(e, n, t) {
|
|
1973
|
+
const o = R(null), a = v(() => {
|
|
1941
1974
|
var r, m;
|
|
1942
1975
|
return (m = (r = e.value) == null ? void 0 : r[0]) == null ? void 0 : m.values.map(
|
|
1943
1976
|
({ label: g, color: p, value: b, deriveColorFromIncomingLinks: L, offset: A }) => ({
|
|
1944
1977
|
label: g || b.toString(),
|
|
1945
1978
|
color: p,
|
|
1946
|
-
fallbackColor: p ||
|
|
1979
|
+
fallbackColor: p || Ce,
|
|
1947
1980
|
id: b,
|
|
1948
1981
|
deriveColorFromIncomingLinks: L,
|
|
1949
1982
|
offset: A
|
|
@@ -1968,7 +2001,7 @@ function Sl(e, n, t) {
|
|
|
1968
2001
|
}
|
|
1969
2002
|
).filter(Boolean).flat();
|
|
1970
2003
|
}
|
|
1971
|
-
),
|
|
2004
|
+
), l = v(() => bn().nodeId(Ie).nodeAlign(n.value.nodeAlign).nodePadding(n.value.nodePadding).nodeSort(n.value.nodeSort).nodeWidth(n.value.nodeWidth).linkSort(n.value.linkSort).iterations(n.value.iterations)), i = v(() => {
|
|
1972
2005
|
var r;
|
|
1973
2006
|
return (r = o.value) == null ? void 0 : r.nodes.reduce(
|
|
1974
2007
|
(m, g) => {
|
|
@@ -1978,36 +2011,36 @@ function Sl(e, n, t) {
|
|
|
1978
2011
|
[]
|
|
1979
2012
|
);
|
|
1980
2013
|
});
|
|
1981
|
-
function
|
|
2014
|
+
function c(r) {
|
|
1982
2015
|
const { offset: m } = r, g = Rt(r, i.value);
|
|
1983
2016
|
if (!g)
|
|
1984
2017
|
return;
|
|
1985
2018
|
const p = g[g.findIndex((L) => L.id === r.id) - 1], b = p && g.length !== 1 ? p.y1 + m : m;
|
|
1986
2019
|
r._y0 = r.y0, r._y1 = r.y1, r.y0 = b, r.y1 = r.y0 + (r._y1 - r._y0);
|
|
1987
2020
|
}
|
|
1988
|
-
function
|
|
2021
|
+
function s(r, m) {
|
|
1989
2022
|
const { id: g, _y0: p, y0: b } = r, L = m.links.filter(
|
|
1990
|
-
(
|
|
2023
|
+
($) => $.source.id === g
|
|
1991
2024
|
), A = m.links.filter(
|
|
1992
|
-
(
|
|
2025
|
+
($) => $.target.id === g
|
|
1993
2026
|
), h = b - p;
|
|
1994
|
-
L.forEach((
|
|
2027
|
+
L.forEach(($) => $.y0 += h), A.forEach(($) => $.y1 += h);
|
|
1995
2028
|
}
|
|
1996
2029
|
const f = v(() => {
|
|
1997
2030
|
var r;
|
|
1998
|
-
return o.value && ((r =
|
|
1999
|
-
m.value === 0 && (m.fallbackColor = dt.Grey), typeof m.offset == "number" && (
|
|
2031
|
+
return o.value && ((r = a.value) == null || r.forEach((m) => {
|
|
2032
|
+
m.value === 0 && (m.fallbackColor = dt.Grey), typeof m.offset == "number" && (c(m), s(m, o.value));
|
|
2000
2033
|
})), o.value;
|
|
2001
2034
|
});
|
|
2002
|
-
return
|
|
2035
|
+
return U([l, t], () => {
|
|
2003
2036
|
try {
|
|
2004
2037
|
const { x0: r, y0: m, x1: g, y1: p } = t.value;
|
|
2005
|
-
o.value =
|
|
2038
|
+
o.value = l.value.extent([
|
|
2006
2039
|
[r, m],
|
|
2007
2040
|
[g, p]
|
|
2008
|
-
])({ nodes:
|
|
2041
|
+
])({ nodes: a.value, links: u.value });
|
|
2009
2042
|
} catch (r) {
|
|
2010
|
-
|
|
2043
|
+
lt(Ve.GraphProblem, r), o.value = Ga;
|
|
2011
2044
|
}
|
|
2012
2045
|
}), { columns: i, graph: f };
|
|
2013
2046
|
}
|
|
@@ -2027,10 +2060,10 @@ function rt(e, n) {
|
|
|
2027
2060
|
);
|
|
2028
2061
|
}), n;
|
|
2029
2062
|
}
|
|
2030
|
-
function
|
|
2063
|
+
function Va(e, n) {
|
|
2031
2064
|
return n.links.reduce((t, o) => (o.source.id in e && o.target.id in e && t.push(o.id), t), []);
|
|
2032
2065
|
}
|
|
2033
|
-
const
|
|
2066
|
+
const Pa = (e, n) => {
|
|
2034
2067
|
let t;
|
|
2035
2068
|
nn(e) ? t = {
|
|
2036
2069
|
[e.id]: e.value,
|
|
@@ -2042,38 +2075,38 @@ const Cl = (e, n) => {
|
|
|
2042
2075
|
...ut(e.source),
|
|
2043
2076
|
...rt(e.target)
|
|
2044
2077
|
};
|
|
2045
|
-
const o =
|
|
2078
|
+
const o = Va(t, n);
|
|
2046
2079
|
return { nodes: t, links: o };
|
|
2047
|
-
},
|
|
2080
|
+
}, Fa = (e) => {
|
|
2048
2081
|
if (nn(e)) {
|
|
2049
2082
|
const n = [...e.sourceLinks, ...e.targetLinks];
|
|
2050
2083
|
return {
|
|
2051
2084
|
nodes: n.reduce(
|
|
2052
|
-
(t, { source: o, target:
|
|
2053
|
-
{ [
|
|
2085
|
+
(t, { source: o, target: a, value: u }) => o === e ? { ...t, [Ie(a)]: u } : { ...t, [Ie(o)]: u },
|
|
2086
|
+
{ [Ie(e)]: e.value }
|
|
2054
2087
|
),
|
|
2055
2088
|
links: n.map(({ id: t }) => t)
|
|
2056
2089
|
};
|
|
2057
2090
|
}
|
|
2058
2091
|
return {
|
|
2059
2092
|
nodes: {
|
|
2060
|
-
[
|
|
2061
|
-
[
|
|
2093
|
+
[Ie(e.target)]: e.value,
|
|
2094
|
+
[Ie(e.source)]: e.source.value
|
|
2062
2095
|
},
|
|
2063
2096
|
links: [e.id]
|
|
2064
2097
|
};
|
|
2065
2098
|
};
|
|
2066
|
-
function
|
|
2067
|
-
const o =
|
|
2099
|
+
function za(e, n, t) {
|
|
2100
|
+
const o = R(null), a = v(() => o.value ? typeof n.value.highlightedElements == "function" ? n.value.highlightedElements(
|
|
2068
2101
|
o.value,
|
|
2069
2102
|
t.value
|
|
2070
|
-
) : n.value.highlightedElements === "closest" ?
|
|
2071
|
-
return
|
|
2103
|
+
) : n.value.highlightedElements === "closest" ? Fa(o.value, t.value) : Pa(o.value, t.value) : { nodes: {}, links: [] });
|
|
2104
|
+
return U(a, (u, l) => {
|
|
2072
2105
|
if (u.links.length === 0 && Object.keys(u.nodes).length === 0) {
|
|
2073
2106
|
e.value.forEach((i) => {
|
|
2074
|
-
i.node.id in
|
|
2107
|
+
i.node.id in l.nodes && St(
|
|
2075
2108
|
i,
|
|
2076
|
-
|
|
2109
|
+
l.nodes[i.node.id],
|
|
2077
2110
|
i.node.value,
|
|
2078
2111
|
n.value.withTransition,
|
|
2079
2112
|
!0
|
|
@@ -2089,12 +2122,12 @@ function jl(e, n, t) {
|
|
|
2089
2122
|
n.value.withTransition
|
|
2090
2123
|
);
|
|
2091
2124
|
});
|
|
2092
|
-
}), { highlightedElements:
|
|
2125
|
+
}), { highlightedElements: a, hoveredElement: o };
|
|
2093
2126
|
}
|
|
2094
|
-
const
|
|
2127
|
+
const Wa = {
|
|
2095
2128
|
class: "lume-alluvial-group",
|
|
2096
2129
|
"data-j-alluvial-group": ""
|
|
2097
|
-
},
|
|
2130
|
+
}, Za = { key: 0 }, Ua = { key: 0 }, Xa = ["id", "x1", "x2"], Ya = ["stop-color"], Ka = ["stop-color"], Ja = ["d", "stroke-width", "onClick", "onMouseover"], Qa = ["d", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-width", "data-id", "onClick", "onMouseover"], qa = ["onClick", "onMouseenter", "onMouseleave", "onMouseover"], el = ["x", "y", "height", "width"], tl = ["transform", "data-id", "width"], nl = /* @__PURE__ */ W({
|
|
2098
2131
|
__name: "lume-alluvial-group",
|
|
2099
2132
|
props: {
|
|
2100
2133
|
...We(),
|
|
@@ -2105,29 +2138,29 @@ const Vl = {
|
|
|
2105
2138
|
},
|
|
2106
2139
|
emits: ["node-click", "node-mouseenter", "node-mouseleave", "link-click", "link-mouseenter", "link-mouseleave"],
|
|
2107
2140
|
setup(e, { emit: n }) {
|
|
2108
|
-
const t = e, o = n,
|
|
2141
|
+
const t = e, o = n, a = Pe("chartID"), { data: u, options: l } = te(t), i = R([]), c = R([]), s = R(null), { extents: f, updateExtents: r } = Ia(t.containerSize), { columns: m, graph: g } = ja(u, l, f), { hoveredElement: p, highlightedElements: b } = za(
|
|
2109
2142
|
i,
|
|
2110
|
-
|
|
2143
|
+
l,
|
|
2111
2144
|
g
|
|
2112
|
-
), L = v(() => je(
|
|
2145
|
+
), L = v(() => je(l.value.valueFormat)), A = v(
|
|
2113
2146
|
() => Object.keys(b.value.nodes)
|
|
2114
2147
|
), h = v(() => m.value ? m.value.map(
|
|
2115
|
-
(k) => k[0].x0 +
|
|
2116
|
-
) : []),
|
|
2117
|
-
if (!(!
|
|
2118
|
-
return
|
|
2148
|
+
(k) => k[0].x0 + l.value.nodeWidth / 2
|
|
2149
|
+
) : []), $ = v(() => {
|
|
2150
|
+
if (!(!l.value.nodeHeaders || !l.value.nodeHeaders.length))
|
|
2151
|
+
return l.value.nodeHeaders.slice(0, h.value.length).map((k, E) => ({
|
|
2119
2152
|
label: k,
|
|
2120
2153
|
x: h.value[E]
|
|
2121
2154
|
}));
|
|
2122
2155
|
}), N = v(
|
|
2123
|
-
() =>
|
|
2156
|
+
() => l.value.nodeHeaderPadding ?? fa
|
|
2124
2157
|
), D = v(() => {
|
|
2125
|
-
if (!(!
|
|
2158
|
+
if (!(!l.value.gradient || !g.value))
|
|
2126
2159
|
return g.value.links.reduce((k, E) => {
|
|
2127
|
-
const { source: _, target: j } = E, J = _.color || _.fallbackColor,
|
|
2160
|
+
const { source: _, target: j } = E, J = _.color || _.fallbackColor, le = j.deriveColorFromIncomingLinks ? J : j.color || j.fallbackColor;
|
|
2128
2161
|
return k[E.id] = {
|
|
2129
2162
|
source: J,
|
|
2130
|
-
target:
|
|
2163
|
+
target: le,
|
|
2131
2164
|
x1: _.x1,
|
|
2132
2165
|
x2: j.x0
|
|
2133
2166
|
}, k;
|
|
@@ -2138,17 +2171,17 @@ const Vl = {
|
|
|
2138
2171
|
), E = [];
|
|
2139
2172
|
return k.forEach((_) => {
|
|
2140
2173
|
const j = [];
|
|
2141
|
-
|
|
2142
|
-
const Ue =
|
|
2143
|
-
let
|
|
2144
|
-
return Ue ? (
|
|
2174
|
+
c.value.filter(({ link: J }) => J.target.id === _.node.id).reverse().reduce((J, le, De, Ze) => {
|
|
2175
|
+
const Ue = le.link.target.y1 - le.link.target.y0 > we;
|
|
2176
|
+
let $e, He, xe;
|
|
2177
|
+
return Ue ? ($e = le.link.target.y1 - le.link.target.y0, He = le.link.value / _.node.value, xe = He * $e) : ($e = we, xe = we / Ze.length), j.push({
|
|
2145
2178
|
x: _.x,
|
|
2146
2179
|
y: _.y + J,
|
|
2147
|
-
height:
|
|
2180
|
+
height: xe,
|
|
2148
2181
|
width: _.width,
|
|
2149
|
-
key: `node-block-${_.node.id}-source-link-${
|
|
2150
|
-
class: `lume-alluvial-group__node-block lume-fill--${
|
|
2151
|
-
}), J +
|
|
2182
|
+
key: `node-block-${_.node.id}-source-link-${le.link.source.id}`,
|
|
2183
|
+
class: `lume-alluvial-group__node-block lume-fill--${le.link.source.color || Ce}`
|
|
2184
|
+
}), J + xe;
|
|
2152
2185
|
}, 0), E.push({
|
|
2153
2186
|
id: _.node.id,
|
|
2154
2187
|
subNodes: j
|
|
@@ -2156,15 +2189,15 @@ const Vl = {
|
|
|
2156
2189
|
}), E;
|
|
2157
2190
|
});
|
|
2158
2191
|
function w(k) {
|
|
2159
|
-
return
|
|
2192
|
+
return l.value.gradient && `url('#${a}_${k.id}')`;
|
|
2160
2193
|
}
|
|
2161
2194
|
function H(k) {
|
|
2162
2195
|
return A.value.length > 0 && !A.value.includes(k.toString());
|
|
2163
2196
|
}
|
|
2164
|
-
function
|
|
2197
|
+
function Y(k) {
|
|
2165
2198
|
return A.value.length > 0 && A.value.includes(k.toString());
|
|
2166
2199
|
}
|
|
2167
|
-
function
|
|
2200
|
+
function K(k) {
|
|
2168
2201
|
return b.value.links.length > 0 && !b.value.links.includes(k);
|
|
2169
2202
|
}
|
|
2170
2203
|
function Q(k) {
|
|
@@ -2176,7 +2209,7 @@ const Vl = {
|
|
|
2176
2209
|
function ue(k, E) {
|
|
2177
2210
|
k !== p.value && (p.value = k, o("link-mouseenter", { link: k, event: E }));
|
|
2178
2211
|
}
|
|
2179
|
-
function
|
|
2212
|
+
function Le(k) {
|
|
2180
2213
|
const E = p.value;
|
|
2181
2214
|
p.value = null, o("link-mouseleave", { link: E, event: k });
|
|
2182
2215
|
}
|
|
@@ -2185,41 +2218,50 @@ const Vl = {
|
|
|
2185
2218
|
p.value = null;
|
|
2186
2219
|
return;
|
|
2187
2220
|
}
|
|
2188
|
-
const E =
|
|
2221
|
+
const E = Na(k, g.value) || Da(k, g.value);
|
|
2189
2222
|
if (!E) {
|
|
2190
|
-
ge(
|
|
2223
|
+
ge(me.InvalidHoveredElement);
|
|
2191
2224
|
return;
|
|
2192
2225
|
}
|
|
2193
2226
|
p.value = E;
|
|
2194
2227
|
}
|
|
2195
|
-
function
|
|
2228
|
+
function Oe(k) {
|
|
2196
2229
|
var E;
|
|
2197
2230
|
return ((E = P.value.find(({ id: _ }) => k === _)) == null ? void 0 : E.subNodes) ?? [];
|
|
2198
2231
|
}
|
|
2199
|
-
function
|
|
2200
|
-
const k =
|
|
2232
|
+
function S() {
|
|
2233
|
+
const k = Ha(g.value, s.value);
|
|
2201
2234
|
r(k);
|
|
2202
2235
|
}
|
|
2203
|
-
return
|
|
2204
|
-
i.value =
|
|
2205
|
-
}),
|
|
2206
|
-
t.containerSize.width && t.containerSize.height &&
|
|
2207
|
-
}),
|
|
2208
|
-
|
|
2209
|
-
(y(!0),
|
|
2210
|
-
key: `header_${_.x}`,
|
|
2236
|
+
return U(g, (k) => {
|
|
2237
|
+
i.value = Ba(k.nodes), c.value = Ca(k.links).reverse(), p.value == null && t.hoveredElementId != null && ke(t.hoveredElementId);
|
|
2238
|
+
}), U([t.containerSize, s], () => {
|
|
2239
|
+
t.containerSize.width && t.containerSize.height && S();
|
|
2240
|
+
}), U(() => t.hoveredElementId, ke), (k, E) => (y(), x("g", Wa, [
|
|
2241
|
+
$.value ? (y(), x("g", Za, [
|
|
2242
|
+
(y(!0), x(q, null, z($.value, (_, j) => M(k.$slots, `node-header-${j}`, {
|
|
2211
2243
|
x: _.x,
|
|
2212
|
-
y: -N.value
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2244
|
+
y: -N.value
|
|
2245
|
+
}, () => [
|
|
2246
|
+
(y(), X(d(xa), {
|
|
2247
|
+
key: `header_${_.x}`,
|
|
2248
|
+
x: _.x,
|
|
2249
|
+
y: -N.value
|
|
2250
|
+
}, {
|
|
2251
|
+
default: V(() => [
|
|
2252
|
+
ce(oe(_.label), 1)
|
|
2253
|
+
]),
|
|
2254
|
+
_: 2
|
|
2255
|
+
}, 1032, ["x", "y"]))
|
|
2256
|
+
], !0)), 256))
|
|
2257
|
+
])) : Z("", !0),
|
|
2216
2258
|
C("g", {
|
|
2217
2259
|
class: "lume-alluvial-link-group",
|
|
2218
|
-
onMouseleave:
|
|
2260
|
+
onMouseleave: Le
|
|
2219
2261
|
}, [
|
|
2220
|
-
d(
|
|
2221
|
-
(y(!0),
|
|
2222
|
-
id: `${d(
|
|
2262
|
+
d(l).gradient ? (y(), x("defs", Ua, [
|
|
2263
|
+
(y(!0), x(q, null, z(D.value, (_, j) => (y(), x("linearGradient", {
|
|
2264
|
+
id: `${d(a)}_${j}`,
|
|
2223
2265
|
key: j,
|
|
2224
2266
|
gradientUnits: "userSpaceOnUse",
|
|
2225
2267
|
x1: _.x1,
|
|
@@ -2228,30 +2270,30 @@ const Vl = {
|
|
|
2228
2270
|
C("stop", {
|
|
2229
2271
|
offset: "0%",
|
|
2230
2272
|
"stop-color": `var(--lume-color--${_.source})`
|
|
2231
|
-
}, null, 8,
|
|
2273
|
+
}, null, 8, Ya),
|
|
2232
2274
|
C("stop", {
|
|
2233
2275
|
offset: "100%",
|
|
2234
2276
|
"stop-color": `var(--lume-color--${_.target})`
|
|
2235
|
-
}, null, 8,
|
|
2236
|
-
], 8,
|
|
2237
|
-
])) :
|
|
2238
|
-
(y(!0),
|
|
2277
|
+
}, null, 8, Ka)
|
|
2278
|
+
], 8, Xa))), 128))
|
|
2279
|
+
])) : Z("", !0),
|
|
2280
|
+
(y(!0), x(q, null, z(c.value, (_) => (y(), x("path", {
|
|
2239
2281
|
key: `link-ghost_${_.id}`,
|
|
2240
2282
|
class: ne(["lume-alluvial-group__link", [
|
|
2241
2283
|
"lume-stroke--transparent",
|
|
2242
2284
|
"lume-alluvial-group__link--ghost"
|
|
2243
2285
|
]]),
|
|
2244
2286
|
d: _.d,
|
|
2245
|
-
"stroke-width": _.strokeWidth + d(
|
|
2287
|
+
"stroke-width": _.strokeWidth + d(ma),
|
|
2246
2288
|
"data-j-alluvial-ghost": "",
|
|
2247
2289
|
onClick: (j) => o("link-click", { link: _.link, event: j }),
|
|
2248
2290
|
onMouseover: (j) => ue(_.link, j)
|
|
2249
|
-
}, null, 40,
|
|
2250
|
-
(y(!0),
|
|
2291
|
+
}, null, 40, Ja))), 128)),
|
|
2292
|
+
(y(!0), x(q, null, z(c.value, (_) => (y(), x("path", {
|
|
2251
2293
|
key: `link_${_.id}`,
|
|
2252
2294
|
class: ne(["lume-alluvial-group__link", {
|
|
2253
|
-
[`lume-stroke--${_.color}`]: !d(
|
|
2254
|
-
"lume-alluvial-group__link--faded":
|
|
2295
|
+
[`lume-stroke--${_.color}`]: !d(l).gradient && _.color,
|
|
2296
|
+
"lume-alluvial-group__link--faded": K(_.id),
|
|
2255
2297
|
"lume-alluvial-group__link--focused": Q(_.id)
|
|
2256
2298
|
}]),
|
|
2257
2299
|
d: _.d,
|
|
@@ -2263,13 +2305,13 @@ const Vl = {
|
|
|
2263
2305
|
"data-id": _.id,
|
|
2264
2306
|
onClick: (j) => o("link-click", { link: _.link, event: j }),
|
|
2265
2307
|
onMouseover: (j) => ue(_.link, j)
|
|
2266
|
-
}, null, 42,
|
|
2308
|
+
}, null, 42, Qa))), 128))
|
|
2267
2309
|
], 32),
|
|
2268
|
-
(y(!0),
|
|
2310
|
+
(y(!0), x(q, null, z(i.value, (_, j) => (y(), x("g", {
|
|
2269
2311
|
key: `node-block_${j}`,
|
|
2270
2312
|
class: ne(["lume-alluvial-group__node", {
|
|
2271
2313
|
"lume-alluvial-group__node--faded": H(_.node.id),
|
|
2272
|
-
"lume-alluvial-group__node--focused":
|
|
2314
|
+
"lume-alluvial-group__node--focused": Y(_.node.id)
|
|
2273
2315
|
}]),
|
|
2274
2316
|
"data-j-alluvial-group__node-block": ""
|
|
2275
2317
|
}, [
|
|
@@ -2280,53 +2322,53 @@ const Vl = {
|
|
|
2280
2322
|
onMouseover: (J) => p.value = _.node,
|
|
2281
2323
|
onMouseout: E[0] || (E[0] = (J) => p.value = null)
|
|
2282
2324
|
}, [
|
|
2283
|
-
F(_) ? (y(!0),
|
|
2325
|
+
F(_) ? (y(!0), x(q, { key: 0 }, z(Oe(
|
|
2284
2326
|
_.node.id
|
|
2285
|
-
), (J) => (y(),
|
|
2327
|
+
), (J) => (y(), x("rect", G(J, {
|
|
2286
2328
|
key: J.key,
|
|
2287
2329
|
"data-j-alluvial-sub-nodes": ""
|
|
2288
|
-
}), null, 16))), 128)) : (y(),
|
|
2330
|
+
}), null, 16))), 128)) : (y(), x("rect", {
|
|
2289
2331
|
key: 1,
|
|
2290
2332
|
class: ne(["lume-alluvial-group__node-block", `lume-fill--${_.node.color || _.node.fallbackColor}`]),
|
|
2291
2333
|
x: _.x,
|
|
2292
2334
|
y: _.y,
|
|
2293
2335
|
height: _.height,
|
|
2294
2336
|
width: _.width
|
|
2295
|
-
}, null, 10,
|
|
2337
|
+
}, null, 10, el)),
|
|
2296
2338
|
C("g", {
|
|
2297
2339
|
ref_for: !0,
|
|
2298
2340
|
ref_key: "nodeTextRefs",
|
|
2299
|
-
ref:
|
|
2341
|
+
ref: s,
|
|
2300
2342
|
class: ne(["lume-alluvial-group__node-text lume-typography--caption", {
|
|
2301
2343
|
"lume-alluvial-group__node-text--left": _.node.depth === 0
|
|
2302
2344
|
}]),
|
|
2303
2345
|
transform: `translate(${_.textTransform.x},${_.textTransform.y})`,
|
|
2304
2346
|
"data-id": _.node.id,
|
|
2305
|
-
width: d(
|
|
2347
|
+
width: d(l).nodeLabelMaxWidth
|
|
2306
2348
|
}, [
|
|
2307
|
-
|
|
2349
|
+
M(k.$slots, `node-text-${_.node.id}`, {
|
|
2308
2350
|
node: _.node,
|
|
2309
2351
|
value: L.value(
|
|
2310
2352
|
_.node.transitionValue || _.node.value,
|
|
2311
2353
|
_.node.value
|
|
2312
2354
|
)
|
|
2313
2355
|
}, () => [
|
|
2314
|
-
ie(d(
|
|
2315
|
-
bottom: d(
|
|
2356
|
+
ie(d(ya), {
|
|
2357
|
+
bottom: d(l).switchText,
|
|
2316
2358
|
left: _.node.depth === 0,
|
|
2317
|
-
"max-width": d(
|
|
2318
|
-
"onLume__internal-NodeResize":
|
|
2359
|
+
"max-width": d(l).nodeLabelMaxWidth,
|
|
2360
|
+
"onLume__internal-NodeResize": S
|
|
2319
2361
|
}, {
|
|
2320
2362
|
default: V(() => [
|
|
2321
|
-
|
|
2363
|
+
ce(oe(_.node.label), 1)
|
|
2322
2364
|
]),
|
|
2323
2365
|
_: 2
|
|
2324
2366
|
}, 1032, ["bottom", "left", "max-width"]),
|
|
2325
|
-
ie(d(
|
|
2326
|
-
bottom: !d(
|
|
2367
|
+
ie(d(Aa), {
|
|
2368
|
+
bottom: !d(l).switchText
|
|
2327
2369
|
}, {
|
|
2328
2370
|
default: V(() => [
|
|
2329
|
-
|
|
2371
|
+
ce(oe(L.value(
|
|
2330
2372
|
_.node.transitionValue || _.node.value,
|
|
2331
2373
|
_.node.value
|
|
2332
2374
|
)), 1)
|
|
@@ -2334,13 +2376,13 @@ const Vl = {
|
|
|
2334
2376
|
_: 2
|
|
2335
2377
|
}, 1032, ["bottom"])
|
|
2336
2378
|
], !0)
|
|
2337
|
-
], 10,
|
|
2338
|
-
], 40,
|
|
2379
|
+
], 10, tl)
|
|
2380
|
+
], 40, qa)
|
|
2339
2381
|
], 2))), 128))
|
|
2340
2382
|
]));
|
|
2341
2383
|
}
|
|
2342
2384
|
});
|
|
2343
|
-
const
|
|
2385
|
+
const ol = /* @__PURE__ */ ee(nl, [["__scopeId", "data-v-02af69f2"]]), al = {
|
|
2344
2386
|
margins: {
|
|
2345
2387
|
top: 0,
|
|
2346
2388
|
right: 0,
|
|
@@ -2356,53 +2398,53 @@ const ea = /* @__PURE__ */ ee(ql, [["__scopeId", "data-v-f004e5fb"]]), ta = {
|
|
|
2356
2398
|
highlightedElements: "closest",
|
|
2357
2399
|
nodePadding: 16,
|
|
2358
2400
|
nodeWidth: 16,
|
|
2359
|
-
nodeAlign:
|
|
2401
|
+
nodeAlign: An,
|
|
2360
2402
|
valueFormat: (e) => String(e),
|
|
2361
2403
|
iterations: 6
|
|
2362
|
-
},
|
|
2404
|
+
}, Ul = /* @__PURE__ */ W({
|
|
2363
2405
|
__name: "lume-alluvial-diagram",
|
|
2364
2406
|
props: {
|
|
2365
|
-
...
|
|
2407
|
+
...zo(it)
|
|
2366
2408
|
},
|
|
2367
2409
|
setup(e, { emit: n }) {
|
|
2368
|
-
const t = e, { componentEventPropagator: o } = ye(),
|
|
2369
|
-
function s
|
|
2410
|
+
const t = e, { componentEventPropagator: o } = ye(), a = Te(re()), u = Bn(re()), { options: l } = te(t), { allOptions: i } = fe(l, al);
|
|
2411
|
+
function c(s) {
|
|
2370
2412
|
return {
|
|
2371
|
-
...
|
|
2413
|
+
...s,
|
|
2372
2414
|
noBaseScales: !0
|
|
2373
2415
|
// Alluvial chart never uses base scales
|
|
2374
2416
|
};
|
|
2375
2417
|
}
|
|
2376
|
-
return (
|
|
2377
|
-
options:
|
|
2418
|
+
return (s, f) => (y(), X(d(Ne), G({ ...t, ...s.$attrs }, {
|
|
2419
|
+
options: c(d(i)),
|
|
2378
2420
|
"data-j-alluvial-diagram": ""
|
|
2379
|
-
},
|
|
2421
|
+
}, ae(d(o))), de({
|
|
2380
2422
|
groups: V((r) => [
|
|
2381
|
-
ie(d(
|
|
2423
|
+
ie(d(ol), G(r, { "hovered-element-id": s.hoveredElement }, ae(d(o))), de({ _: 2 }, [
|
|
2382
2424
|
z(d(u), (m, g) => ({
|
|
2383
2425
|
name: g,
|
|
2384
2426
|
fn: V((p) => [
|
|
2385
|
-
|
|
2427
|
+
M(s.$slots, g, pe(he(p || {})))
|
|
2386
2428
|
])
|
|
2387
2429
|
}))
|
|
2388
2430
|
]), 1040, ["hovered-element-id"])
|
|
2389
2431
|
]),
|
|
2390
2432
|
_: 2
|
|
2391
2433
|
}, [
|
|
2392
|
-
z(d(
|
|
2434
|
+
z(d(a), (r, m) => ({
|
|
2393
2435
|
name: m,
|
|
2394
2436
|
fn: V((g) => [
|
|
2395
|
-
|
|
2437
|
+
M(s.$slots, m, pe(he(g || {})))
|
|
2396
2438
|
])
|
|
2397
2439
|
}))
|
|
2398
2440
|
]), 1040, ["options"]));
|
|
2399
2441
|
}
|
|
2400
2442
|
});
|
|
2401
2443
|
var on = /* @__PURE__ */ ((e) => (e.grouped = "grouped", e.stacked = "stacked", e))(on || {});
|
|
2402
|
-
const
|
|
2444
|
+
const Xl = /* @__PURE__ */ W({
|
|
2403
2445
|
__name: "lume-bar-chart",
|
|
2404
2446
|
props: {
|
|
2405
|
-
...
|
|
2447
|
+
...Ee(),
|
|
2406
2448
|
type: {
|
|
2407
2449
|
type: String,
|
|
2408
2450
|
default: null,
|
|
@@ -2414,269 +2456,269 @@ const Wa = /* @__PURE__ */ U({
|
|
|
2414
2456
|
() => import("./common/42f5d2fc.js")
|
|
2415
2457
|
), o = Je(
|
|
2416
2458
|
() => import("./common/abc9d23d.js")
|
|
2417
|
-
),
|
|
2459
|
+
), a = Je(
|
|
2418
2460
|
() => import("./common/0664fd4d.js")
|
|
2419
2461
|
), u = /* @__PURE__ */ new Map([
|
|
2420
2462
|
["single", t],
|
|
2421
2463
|
["grouped", o],
|
|
2422
|
-
["stacked",
|
|
2423
|
-
]),
|
|
2424
|
-
function
|
|
2464
|
+
["stacked", a]
|
|
2465
|
+
]), l = e, { componentEventPropagator: i } = ye(), c = Te(re());
|
|
2466
|
+
function s(r) {
|
|
2425
2467
|
return {
|
|
2426
2468
|
...r,
|
|
2427
2469
|
startOnZero: !0,
|
|
2428
2470
|
// Bar chart always starts on zero,
|
|
2429
2471
|
tooltipOptions: {
|
|
2430
2472
|
...(r == null ? void 0 : r.tooltipOptions) || {},
|
|
2431
|
-
position:
|
|
2473
|
+
position: l.orientation === B.HORIZONTAL ? "right" : void 0
|
|
2432
2474
|
}
|
|
2433
2475
|
};
|
|
2434
2476
|
}
|
|
2435
2477
|
const f = v(() => {
|
|
2436
|
-
if (it(
|
|
2478
|
+
if (it(l.data))
|
|
2437
2479
|
return u.get("single");
|
|
2438
|
-
if (!
|
|
2480
|
+
if (!l.type)
|
|
2439
2481
|
throw new Error("Bar chart needs a type when there's multiple datasets.");
|
|
2440
|
-
return u.get(
|
|
2482
|
+
return u.get(l.type);
|
|
2441
2483
|
});
|
|
2442
|
-
return (r, m) => (y(),
|
|
2443
|
-
options:
|
|
2444
|
-
},
|
|
2445
|
-
z(d(
|
|
2484
|
+
return (r, m) => (y(), X(mn(f.value), G({ ...l, ...r.$attrs }, {
|
|
2485
|
+
options: s(r.options)
|
|
2486
|
+
}, ae(d(i))), de({ _: 2 }, [
|
|
2487
|
+
z(d(c), (g, p) => ({
|
|
2446
2488
|
name: p,
|
|
2447
2489
|
fn: V((b) => [
|
|
2448
|
-
|
|
2490
|
+
M(r.$slots, p, pe(he(b || {})))
|
|
2449
2491
|
])
|
|
2450
2492
|
}))
|
|
2451
2493
|
]), 1040, ["options"]));
|
|
2452
2494
|
}
|
|
2453
2495
|
});
|
|
2454
|
-
function
|
|
2455
|
-
return Object.values(
|
|
2496
|
+
function ll(e) {
|
|
2497
|
+
return Object.values(Gn).includes(e) || e == null;
|
|
2456
2498
|
}
|
|
2457
|
-
function
|
|
2499
|
+
function ul(e) {
|
|
2458
2500
|
return Object.values(B).includes(e);
|
|
2459
2501
|
}
|
|
2460
|
-
const
|
|
2502
|
+
const rl = (e = !1) => ({
|
|
2461
2503
|
type: {
|
|
2462
2504
|
type: String,
|
|
2463
2505
|
default: null,
|
|
2464
|
-
validator:
|
|
2506
|
+
validator: ll
|
|
2465
2507
|
},
|
|
2466
2508
|
...e ? {
|
|
2467
2509
|
orientation: {
|
|
2468
2510
|
type: String,
|
|
2469
2511
|
default: B.VERTICAL,
|
|
2470
|
-
validator:
|
|
2512
|
+
validator: ul
|
|
2471
2513
|
}
|
|
2472
2514
|
} : {}
|
|
2473
2515
|
});
|
|
2474
|
-
function
|
|
2475
|
-
const t = v(() => e.value.map((
|
|
2516
|
+
function an(e, n) {
|
|
2517
|
+
const t = v(() => e.value.map((a) => {
|
|
2476
2518
|
var u;
|
|
2477
2519
|
return {
|
|
2478
|
-
...
|
|
2520
|
+
...a,
|
|
2479
2521
|
values: st(
|
|
2480
|
-
|
|
2522
|
+
a.values,
|
|
2481
2523
|
((u = n == null ? void 0 : n.value) == null ? void 0 : u.length) ?? 0
|
|
2482
|
-
).map((
|
|
2483
|
-
...
|
|
2484
|
-
value: (
|
|
2524
|
+
).map((l) => ({
|
|
2525
|
+
...l,
|
|
2526
|
+
value: (l == null ? void 0 : l.value) || 0
|
|
2485
2527
|
}))
|
|
2486
2528
|
};
|
|
2487
2529
|
})), o = v(() => {
|
|
2488
|
-
var
|
|
2489
|
-
return (
|
|
2490
|
-
u[
|
|
2530
|
+
var a;
|
|
2531
|
+
return (a = t.value) == null ? void 0 : a.reduce((u, l) => (l.values.forEach((i, c) => {
|
|
2532
|
+
u[c] ? u[c].push(i) : u[c] = [i];
|
|
2491
2533
|
}), u), []);
|
|
2492
2534
|
});
|
|
2493
2535
|
return { multiBarData: t, groupedData: o };
|
|
2494
2536
|
}
|
|
2495
|
-
function
|
|
2537
|
+
function il(e, n) {
|
|
2496
2538
|
return e.value.length === 1 ? "single" : n.value;
|
|
2497
2539
|
}
|
|
2498
|
-
function
|
|
2540
|
+
function sl(e, n, t) {
|
|
2499
2541
|
const o = v(
|
|
2500
2542
|
() => t.value === B.HORIZONTAL
|
|
2501
2543
|
);
|
|
2502
|
-
function
|
|
2503
|
-
i ||
|
|
2544
|
+
function a(i) {
|
|
2545
|
+
i || lt(Ve.BarScaleNull), Math.min(...i.domain()) > 0 && lt(Ve.BarScaleDomainAbove0);
|
|
2504
2546
|
}
|
|
2505
|
-
const u = v(() => o.value ? (() => (
|
|
2506
|
-
return { barXScale: u, barYScale:
|
|
2547
|
+
const u = v(() => o.value ? (() => (a(e.value), e.value))() : e.value), l = v(() => o.value ? n.value : (() => (a(n.value), n.value))());
|
|
2548
|
+
return { barXScale: u, barYScale: l };
|
|
2507
2549
|
}
|
|
2508
|
-
const
|
|
2550
|
+
const cl = {
|
|
2509
2551
|
x: 0,
|
|
2510
2552
|
y: 0,
|
|
2511
2553
|
width: 0,
|
|
2512
2554
|
height: 0
|
|
2513
2555
|
};
|
|
2514
|
-
function
|
|
2515
|
-
const
|
|
2556
|
+
function dl(e, n, t, o, a, u) {
|
|
2557
|
+
const l = v(
|
|
2516
2558
|
() => o.value === B.HORIZONTAL
|
|
2517
2559
|
);
|
|
2518
2560
|
function i(r, m) {
|
|
2519
2561
|
let g, p;
|
|
2520
|
-
return
|
|
2521
|
-
}
|
|
2522
|
-
function s(r) {
|
|
2523
|
-
return a.value ? r < 0 ? n.value(0) - n.value(r) : n.value(r) - n.value(0) : n.value.bandwidth();
|
|
2562
|
+
return l.value ? (g = r >= 0 ? n.value(0) : n.value(r), p = t.value(t.value.domain()[m])) : (g = n.value(n.value.domain()[m]), p = r < 0 ? t.value(0) : t.value(r)), { x: g, y: p };
|
|
2524
2563
|
}
|
|
2525
2564
|
function c(r) {
|
|
2526
|
-
return
|
|
2565
|
+
return l.value ? r < 0 ? n.value(0) - n.value(r) : n.value(r) - n.value(0) : n.value.bandwidth();
|
|
2566
|
+
}
|
|
2567
|
+
function s(r) {
|
|
2568
|
+
return l.value ? t.value.bandwidth() : r < 0 ? t.value(r) - t.value(0) : t.value(0) - t.value(r);
|
|
2527
2569
|
}
|
|
2528
2570
|
function f(r, m, g) {
|
|
2529
2571
|
if (!(n.value && t.value))
|
|
2530
|
-
return
|
|
2531
|
-
const { value: b, color: L } = r, A = L ?? e.value[m].color ??
|
|
2572
|
+
return cl;
|
|
2573
|
+
const { value: b, color: L } = r, A = L ?? e.value[m].color ?? Ce, { x: h, y: $ } = i(b, g), N = c(b), D = s(b);
|
|
2532
2574
|
return {
|
|
2533
2575
|
classList: [`lume-fill--${A}`, ...u],
|
|
2534
2576
|
x: h,
|
|
2535
|
-
y:
|
|
2577
|
+
y: $,
|
|
2536
2578
|
width: N,
|
|
2537
2579
|
height: D,
|
|
2538
|
-
isFaded:
|
|
2580
|
+
isFaded: a.value !== -1 && a.value !== g,
|
|
2539
2581
|
isNegative: b < 0
|
|
2540
2582
|
};
|
|
2541
2583
|
}
|
|
2542
2584
|
return { barAttributeGenerator: f };
|
|
2543
2585
|
}
|
|
2544
|
-
const
|
|
2586
|
+
const vl = {
|
|
2545
2587
|
x: 0,
|
|
2546
2588
|
y: 0,
|
|
2547
2589
|
width: 0,
|
|
2548
2590
|
height: 0
|
|
2549
2591
|
};
|
|
2550
|
-
function
|
|
2551
|
-
const
|
|
2592
|
+
function ml(e, n, t, o, a, u) {
|
|
2593
|
+
const l = v(
|
|
2552
2594
|
() => o.value === B.HORIZONTAL
|
|
2553
|
-
), i = v(() =>
|
|
2554
|
-
function
|
|
2555
|
-
if (
|
|
2595
|
+
), i = v(() => Be().domain(e.value.map((p, b) => b)).range([0, n.value.bandwidth()]).padding(0)), c = v(() => Be().domain(e.value.map((p, b) => b)).range([0, t.value.bandwidth()]).padding(0));
|
|
2596
|
+
function s(p, b, L) {
|
|
2597
|
+
if (l.value)
|
|
2556
2598
|
return p >= 0 ? n.value(0) : n.value(p);
|
|
2557
2599
|
const A = n.value.domain();
|
|
2558
2600
|
return n.value(A[b]) + i.value(L);
|
|
2559
2601
|
}
|
|
2560
2602
|
function f(p, b, L) {
|
|
2561
|
-
if (
|
|
2603
|
+
if (l.value) {
|
|
2562
2604
|
const A = t.value.domain();
|
|
2563
|
-
return t.value(A[b]) +
|
|
2605
|
+
return t.value(A[b]) + c.value(L);
|
|
2564
2606
|
}
|
|
2565
2607
|
return p < 0 ? t.value(0) : t.value(p);
|
|
2566
2608
|
}
|
|
2567
2609
|
function r(p) {
|
|
2568
|
-
return
|
|
2610
|
+
return l.value ? p < 0 ? n.value(0) - n.value(p) : n.value(p) - n.value(0) : i.value.bandwidth();
|
|
2569
2611
|
}
|
|
2570
2612
|
function m(p) {
|
|
2571
|
-
return
|
|
2613
|
+
return l.value ? c.value.bandwidth() : p < 0 ? t.value(p) - t.value(0) : t.value(0) - t.value(p);
|
|
2572
2614
|
}
|
|
2573
2615
|
function g(p, b, L) {
|
|
2574
2616
|
if (!(n.value && t.value))
|
|
2575
|
-
return
|
|
2576
|
-
const { value: h, color:
|
|
2617
|
+
return vl;
|
|
2618
|
+
const { value: h, color: $ } = p, N = $ ?? e.value[b].color ?? Object.values(se)[b], D = s(h, L, b), P = f(h, L, b), w = r(h), H = m(h);
|
|
2577
2619
|
return {
|
|
2578
2620
|
classList: [`lume-fill--${N}`, ...u],
|
|
2579
2621
|
x: D,
|
|
2580
2622
|
y: P,
|
|
2581
2623
|
width: w,
|
|
2582
2624
|
height: H,
|
|
2583
|
-
isFaded:
|
|
2625
|
+
isFaded: a.value !== -1 && a.value !== L,
|
|
2584
2626
|
isNegative: h < 0
|
|
2585
2627
|
};
|
|
2586
2628
|
}
|
|
2587
2629
|
return { barAttributeGenerator: g };
|
|
2588
2630
|
}
|
|
2589
|
-
function
|
|
2631
|
+
function fl(e, n, t) {
|
|
2590
2632
|
const o = v(
|
|
2591
2633
|
() => n.value === B.HORIZONTAL
|
|
2592
|
-
),
|
|
2593
|
-
const
|
|
2594
|
-
(
|
|
2634
|
+
), a = v(() => {
|
|
2635
|
+
const c = e.value.map(
|
|
2636
|
+
(s) => s.filter((f) => f.value < 0).reduce((f, r) => f + r.value, 0)
|
|
2595
2637
|
);
|
|
2596
|
-
return Math.min(...
|
|
2638
|
+
return Math.min(...c);
|
|
2597
2639
|
}), u = v(() => {
|
|
2598
|
-
const
|
|
2599
|
-
(
|
|
2640
|
+
const c = e.value.map(
|
|
2641
|
+
(s) => s.reduce(
|
|
2600
2642
|
(f, r) => r.value >= 0 ? f + r.value : f,
|
|
2601
2643
|
0
|
|
2602
2644
|
)
|
|
2603
2645
|
);
|
|
2604
|
-
return Math.max(...
|
|
2646
|
+
return Math.max(...c);
|
|
2605
2647
|
});
|
|
2606
|
-
function
|
|
2607
|
-
return
|
|
2648
|
+
function l(c, s, f) {
|
|
2649
|
+
return s.length ? o.value ? Me().domain([a.value, u.value]).range([0, f.width]) : Object.assign(
|
|
2608
2650
|
Nt(
|
|
2609
|
-
|
|
2651
|
+
Be().domain(s.map((r, m) => m)).range([0, f.width]),
|
|
2610
2652
|
n.value,
|
|
2611
2653
|
t.value
|
|
2612
2654
|
),
|
|
2613
|
-
{ labels:
|
|
2655
|
+
{ labels: s }
|
|
2614
2656
|
) : null;
|
|
2615
2657
|
}
|
|
2616
|
-
function i(
|
|
2617
|
-
return
|
|
2658
|
+
function i(c, s, f) {
|
|
2659
|
+
return s.length ? o.value ? Object.assign(
|
|
2618
2660
|
Nt(
|
|
2619
|
-
|
|
2661
|
+
Be().domain(s.map((r, m) => m)).range([0, f.height]),
|
|
2620
2662
|
n.value,
|
|
2621
2663
|
t.value
|
|
2622
2664
|
),
|
|
2623
|
-
{ labels:
|
|
2624
|
-
) :
|
|
2665
|
+
{ labels: s }
|
|
2666
|
+
) : Me().domain([u.value, a.value]).range([0, f.height]) : null;
|
|
2625
2667
|
}
|
|
2626
|
-
return { stackedXScaleGenerator:
|
|
2668
|
+
return { stackedXScaleGenerator: l, stackedYScaleGenerator: i };
|
|
2627
2669
|
}
|
|
2628
|
-
function
|
|
2629
|
-
const
|
|
2670
|
+
function pl(e, n, t, o, a, u) {
|
|
2671
|
+
const l = v(
|
|
2630
2672
|
() => o.value === B.HORIZONTAL
|
|
2631
2673
|
), i = v(
|
|
2632
|
-
() =>
|
|
2633
|
-
),
|
|
2674
|
+
() => l.value ? t.value.domain() : n.value.domain()
|
|
2675
|
+
), c = v(
|
|
2634
2676
|
() => e.value.map((A) => A.values.map((h) => h == null ? void 0 : h.value))
|
|
2635
2677
|
);
|
|
2636
|
-
function
|
|
2678
|
+
function s(A, h, $) {
|
|
2637
2679
|
let N, D;
|
|
2638
|
-
return
|
|
2680
|
+
return l.value ? (N = n.value(A >= 0 ? 0 + $ : A + $), D = t.value(i.value[h])) : (N = n.value(i.value[h]), D = t.value(A >= 0 ? A + $ : 0 + $)), { x: N, y: D };
|
|
2639
2681
|
}
|
|
2640
2682
|
function f(A) {
|
|
2641
|
-
return
|
|
2683
|
+
return l.value ? n.value(A) - n.value(0) : n.value.bandwidth();
|
|
2642
2684
|
}
|
|
2643
2685
|
function r(A) {
|
|
2644
|
-
return
|
|
2686
|
+
return l.value ? n.value(0) - n.value(A) : n.value.bandwidth();
|
|
2645
2687
|
}
|
|
2646
2688
|
function m(A) {
|
|
2647
|
-
return
|
|
2689
|
+
return l.value ? t.value.bandwidth() : t.value(0) - t.value(A);
|
|
2648
2690
|
}
|
|
2649
2691
|
function g(A) {
|
|
2650
|
-
return
|
|
2692
|
+
return l.value ? t.value.bandwidth() : t.value(A) - t.value(0);
|
|
2651
2693
|
}
|
|
2652
2694
|
function p(A, h) {
|
|
2653
|
-
return A ?
|
|
2695
|
+
return A ? c.value.reduce(($, N, D) => (D < A && N[h] >= 0 && ($ += N[h]), $), 0) : 0;
|
|
2654
2696
|
}
|
|
2655
2697
|
function b(A, h) {
|
|
2656
|
-
return A ?
|
|
2698
|
+
return A ? c.value.reduce(($, N, D) => (D < A && N[h] < 0 && ($ += N[h]), $), 0) : 0;
|
|
2657
2699
|
}
|
|
2658
|
-
function L(A, h,
|
|
2659
|
-
const { value: N, color: D } = A, P = N >= 0 ? f(N) : r(N), w = N >= 0 ? m(N) : g(N), H = N >= 0 ? p(h,
|
|
2700
|
+
function L(A, h, $) {
|
|
2701
|
+
const { value: N, color: D } = A, P = N >= 0 ? f(N) : r(N), w = N >= 0 ? m(N) : g(N), H = N >= 0 ? p(h, $) : b(h, $), { x: Y, y: K } = s(N, $, H);
|
|
2660
2702
|
return {
|
|
2661
2703
|
classList: [`lume-fill--${D ?? e.value[h].color ?? Object.values(se)[h]}`, ...u],
|
|
2662
2704
|
width: P,
|
|
2663
2705
|
height: w,
|
|
2664
|
-
x:
|
|
2665
|
-
y:
|
|
2666
|
-
isFaded:
|
|
2706
|
+
x: Y,
|
|
2707
|
+
y: K,
|
|
2708
|
+
isFaded: a.value !== -1 && a.value !== $,
|
|
2667
2709
|
isNegative: N < 0
|
|
2668
2710
|
};
|
|
2669
2711
|
}
|
|
2670
2712
|
return { barAttributeGenerator: L };
|
|
2671
2713
|
}
|
|
2672
|
-
const
|
|
2714
|
+
const hl = {
|
|
2673
2715
|
class: "lume-bar-group",
|
|
2674
2716
|
"data-j-bars-group": ""
|
|
2675
|
-
},
|
|
2676
|
-
single:
|
|
2677
|
-
grouped:
|
|
2678
|
-
stacked:
|
|
2679
|
-
}, ht = /* @__PURE__ */
|
|
2717
|
+
}, gl = ["onMouseenter"], _l = {
|
|
2718
|
+
single: dl,
|
|
2719
|
+
grouped: ml,
|
|
2720
|
+
stacked: pl
|
|
2721
|
+
}, ht = /* @__PURE__ */ W({
|
|
2680
2722
|
__name: "lume-bar-group",
|
|
2681
2723
|
props: {
|
|
2682
2724
|
...We(),
|
|
@@ -2684,7 +2726,7 @@ const ma = {
|
|
|
2684
2726
|
type: [String, Array],
|
|
2685
2727
|
default: () => []
|
|
2686
2728
|
},
|
|
2687
|
-
...
|
|
2729
|
+
...rl(!0),
|
|
2688
2730
|
transition: {
|
|
2689
2731
|
type: Boolean,
|
|
2690
2732
|
default: !0
|
|
@@ -2693,191 +2735,191 @@ const ma = {
|
|
|
2693
2735
|
emits: ["bar-click", "lume__internal--hover"],
|
|
2694
2736
|
setup(e, { emit: n }) {
|
|
2695
2737
|
const t = e, o = n, {
|
|
2696
|
-
data:
|
|
2738
|
+
data: a,
|
|
2697
2739
|
hoveredIndex: u,
|
|
2698
|
-
orientation:
|
|
2740
|
+
orientation: l,
|
|
2699
2741
|
transition: i,
|
|
2700
|
-
type:
|
|
2701
|
-
xScale:
|
|
2742
|
+
type: c,
|
|
2743
|
+
xScale: s,
|
|
2702
2744
|
yScale: f,
|
|
2703
2745
|
classList: r,
|
|
2704
2746
|
labels: m
|
|
2705
2747
|
} = te(t);
|
|
2706
2748
|
Pe("chartID");
|
|
2707
|
-
const { emitInternalEvent: g } = ye(), { groupedData: p } =
|
|
2708
|
-
const D =
|
|
2709
|
-
|
|
2749
|
+
const { emitInternalEvent: g } = ye(), { groupedData: p } = an(a, m), { barXScale: b, barYScale: L } = sl(s, f, l), A = v(() => typeof r.value == "string" ? [r.value] : r.value), h = v(() => {
|
|
2750
|
+
const D = il(a, c), { barAttributeGenerator: P } = _l[D](
|
|
2751
|
+
a,
|
|
2710
2752
|
b,
|
|
2711
2753
|
L,
|
|
2712
|
-
|
|
2754
|
+
l,
|
|
2713
2755
|
u,
|
|
2714
2756
|
A.value
|
|
2715
2757
|
);
|
|
2716
2758
|
return P;
|
|
2717
|
-
}),
|
|
2759
|
+
}), $ = v(() => {
|
|
2718
2760
|
if (i.value)
|
|
2719
|
-
return
|
|
2761
|
+
return l.value === B.HORIZONTAL ? "width" : "height";
|
|
2720
2762
|
});
|
|
2721
2763
|
async function N(D) {
|
|
2722
2764
|
o("lume__internal--hover", D), g("lume__internal--hover", D);
|
|
2723
2765
|
}
|
|
2724
|
-
return (D, P) => (y(),
|
|
2725
|
-
(y(!0),
|
|
2766
|
+
return (D, P) => (y(), x("g", hl, [
|
|
2767
|
+
(y(!0), x(q, null, z(d(p), (w, H) => (y(), x("g", {
|
|
2726
2768
|
key: H,
|
|
2727
|
-
onMouseenter: (
|
|
2769
|
+
onMouseenter: (Y) => N(H)
|
|
2728
2770
|
}, [
|
|
2729
|
-
(y(!0),
|
|
2730
|
-
key: `bar-${
|
|
2731
|
-
transition:
|
|
2771
|
+
(y(!0), x(q, null, z(w, (Y, K) => (y(), X(d(mt), G(h.value(Y, K, H, w), {
|
|
2772
|
+
key: `bar-${K}`,
|
|
2773
|
+
transition: $.value,
|
|
2732
2774
|
"data-j-lume-bar": "",
|
|
2733
2775
|
onClick: (Q) => o("bar-click", {
|
|
2734
2776
|
index: H,
|
|
2735
|
-
datasetIndex:
|
|
2777
|
+
datasetIndex: K,
|
|
2736
2778
|
event: Q
|
|
2737
2779
|
})
|
|
2738
2780
|
}), null, 16, ["transition", "onClick"]))), 128))
|
|
2739
|
-
], 40,
|
|
2781
|
+
], 40, gl))), 128))
|
|
2740
2782
|
]));
|
|
2741
2783
|
}
|
|
2742
|
-
}),
|
|
2784
|
+
}), yl = {
|
|
2743
2785
|
[B.VERTICAL]: {
|
|
2744
2786
|
withTooltip: !0,
|
|
2745
2787
|
xAxisOptions: {},
|
|
2746
2788
|
yAxisOptions: { gridLines: !0 },
|
|
2747
|
-
margins:
|
|
2789
|
+
margins: Ae.VERTICAL
|
|
2748
2790
|
},
|
|
2749
2791
|
[B.HORIZONTAL]: {
|
|
2750
2792
|
withTooltip: !0,
|
|
2751
2793
|
xAxisOptions: { gridLines: !0 },
|
|
2752
2794
|
yAxisOptions: { gridLines: !1 },
|
|
2753
|
-
margins:
|
|
2795
|
+
margins: Ae.HORIZONTAL
|
|
2754
2796
|
}
|
|
2755
|
-
},
|
|
2797
|
+
}, Yl = /* @__PURE__ */ W({
|
|
2756
2798
|
__name: "lume-single-bar-chart",
|
|
2757
2799
|
props: {
|
|
2758
|
-
...
|
|
2800
|
+
...Ee(it)
|
|
2759
2801
|
},
|
|
2760
2802
|
setup(e, { emit: n }) {
|
|
2761
|
-
const t = e, { componentEventPropagator: o } = ye(),
|
|
2762
|
-
() =>
|
|
2803
|
+
const t = e, { componentEventPropagator: o } = ye(), a = Te(re()), { orientation: u, options: l } = te(t), i = v(
|
|
2804
|
+
() => yl[u.value || B.VERTICAL]
|
|
2763
2805
|
// needs to be computed so that default options are reactive
|
|
2764
|
-
), { allOptions:
|
|
2765
|
-
return (
|
|
2806
|
+
), { allOptions: c } = fe(l, i);
|
|
2807
|
+
return (s, f) => (y(), X(d(Ne), G({ ...t, ...s.$attrs }, {
|
|
2766
2808
|
"chart-type": "single-bar",
|
|
2767
|
-
options: d(
|
|
2809
|
+
options: d(c),
|
|
2768
2810
|
"data-j-single-bar-chart": ""
|
|
2769
|
-
},
|
|
2811
|
+
}, ae(d(o))), de({
|
|
2770
2812
|
groups: V((r) => [
|
|
2771
|
-
ie(d(ht), G(r, { orientation: d(u) },
|
|
2813
|
+
ie(d(ht), G(r, { orientation: d(u) }, ae(d(o))), null, 16, ["orientation"])
|
|
2772
2814
|
]),
|
|
2773
2815
|
_: 2
|
|
2774
2816
|
}, [
|
|
2775
|
-
z(d(
|
|
2817
|
+
z(d(a), (r, m) => ({
|
|
2776
2818
|
name: m,
|
|
2777
2819
|
fn: V((g) => [
|
|
2778
|
-
|
|
2820
|
+
M(s.$slots, m, pe(he(g || {})))
|
|
2779
2821
|
])
|
|
2780
2822
|
}))
|
|
2781
2823
|
]), 1040, ["options"]));
|
|
2782
2824
|
}
|
|
2783
|
-
}),
|
|
2825
|
+
}), kl = {
|
|
2784
2826
|
[B.VERTICAL]: {
|
|
2785
2827
|
withTooltip: !0,
|
|
2786
2828
|
xAxisOptions: {},
|
|
2787
2829
|
yAxisOptions: { gridLines: !0 },
|
|
2788
|
-
margins:
|
|
2830
|
+
margins: Ae.VERTICAL
|
|
2789
2831
|
},
|
|
2790
2832
|
[B.HORIZONTAL]: {
|
|
2791
2833
|
withTooltip: !0,
|
|
2792
2834
|
xAxisOptions: { gridLines: !0 },
|
|
2793
2835
|
yAxisOptions: { gridLines: !1 },
|
|
2794
|
-
margins:
|
|
2836
|
+
margins: Ae.HORIZONTAL,
|
|
2795
2837
|
tooltipOptions: { position: "right" }
|
|
2796
2838
|
}
|
|
2797
|
-
},
|
|
2839
|
+
}, Kl = /* @__PURE__ */ W({
|
|
2798
2840
|
__name: "lume-grouped-bar-chart",
|
|
2799
2841
|
props: {
|
|
2800
|
-
...
|
|
2842
|
+
...Ee()
|
|
2801
2843
|
},
|
|
2802
2844
|
setup(e, { emit: n }) {
|
|
2803
|
-
const t = e, { componentEventPropagator: o } = ye(),
|
|
2804
|
-
() =>
|
|
2845
|
+
const t = e, { componentEventPropagator: o } = ye(), a = Te(re()), { orientation: u, options: l } = te(t), i = v(
|
|
2846
|
+
() => kl[u.value || B.VERTICAL]
|
|
2805
2847
|
// needs to be computed so that default options are reactive
|
|
2806
|
-
), { allOptions:
|
|
2807
|
-
|
|
2848
|
+
), { allOptions: c } = fe(
|
|
2849
|
+
l,
|
|
2808
2850
|
i
|
|
2809
2851
|
);
|
|
2810
|
-
return (
|
|
2852
|
+
return (s, f) => (y(), X(d(Ne), G({ ...t, ...s.$attrs }, {
|
|
2811
2853
|
"chart-type": "grouped-bar",
|
|
2812
|
-
options: d(
|
|
2854
|
+
options: d(c),
|
|
2813
2855
|
"data-j-grouped-bar-chart": ""
|
|
2814
|
-
},
|
|
2856
|
+
}, ae(d(o))), de({
|
|
2815
2857
|
groups: V((r) => [
|
|
2816
|
-
ie(d(ht), G(r, { type: "grouped" },
|
|
2858
|
+
ie(d(ht), G(r, { type: "grouped" }, ae(d(o))), null, 16)
|
|
2817
2859
|
]),
|
|
2818
2860
|
_: 2
|
|
2819
2861
|
}, [
|
|
2820
|
-
z(d(
|
|
2862
|
+
z(d(a), (r, m) => ({
|
|
2821
2863
|
name: m,
|
|
2822
2864
|
fn: V((g) => [
|
|
2823
|
-
|
|
2865
|
+
M(s.$slots, m, pe(he(g || {})))
|
|
2824
2866
|
])
|
|
2825
2867
|
}))
|
|
2826
2868
|
]), 1040, ["options"]));
|
|
2827
2869
|
}
|
|
2828
|
-
}),
|
|
2870
|
+
}), bl = {
|
|
2829
2871
|
[B.VERTICAL]: {
|
|
2830
2872
|
withTooltip: !0,
|
|
2831
2873
|
xAxisOptions: {},
|
|
2832
2874
|
yAxisOptions: { gridLines: !0 },
|
|
2833
|
-
margins:
|
|
2875
|
+
margins: Ae.VERTICAL,
|
|
2834
2876
|
tooltipOptions: { inverse: !0 }
|
|
2835
2877
|
},
|
|
2836
2878
|
[B.HORIZONTAL]: {
|
|
2837
2879
|
withTooltip: !0,
|
|
2838
2880
|
xAxisOptions: { gridLines: !0 },
|
|
2839
2881
|
yAxisOptions: { gridLines: !1 },
|
|
2840
|
-
margins:
|
|
2841
|
-
tooltipOptions: { position: "right"
|
|
2882
|
+
margins: Ae.HORIZONTAL,
|
|
2883
|
+
tooltipOptions: { position: "right" }
|
|
2842
2884
|
}
|
|
2843
|
-
},
|
|
2885
|
+
}, Jl = /* @__PURE__ */ W({
|
|
2844
2886
|
__name: "lume-stacked-bar-chart",
|
|
2845
2887
|
props: {
|
|
2846
|
-
...
|
|
2888
|
+
...Ee()
|
|
2847
2889
|
},
|
|
2848
2890
|
setup(e, { emit: n }) {
|
|
2849
|
-
const t = e, { componentEventPropagator: o } = ye(),
|
|
2850
|
-
() =>
|
|
2891
|
+
const t = e, { componentEventPropagator: o } = ye(), a = Te(re()), { data: u, orientation: l, options: i, labels: c } = te(t), s = v(
|
|
2892
|
+
() => bl[l.value || B.VERTICAL]
|
|
2851
2893
|
// needs to be computed so that default options are reactive
|
|
2852
|
-
), { allOptions: f } =
|
|
2894
|
+
), { allOptions: f } = fe(
|
|
2853
2895
|
i,
|
|
2854
|
-
|
|
2855
|
-
), { internalData: r } = pt(u), { groupedData: m } =
|
|
2896
|
+
s
|
|
2897
|
+
), { internalData: r } = pt(u), { groupedData: m } = an(r, c), { stackedXScaleGenerator: g, stackedYScaleGenerator: p } = fl(
|
|
2856
2898
|
m,
|
|
2857
|
-
|
|
2899
|
+
l,
|
|
2858
2900
|
i
|
|
2859
2901
|
), b = v(() => t.xScale || g), L = v(() => t.yScale || p);
|
|
2860
|
-
return (A, h) => (y(),
|
|
2902
|
+
return (A, h) => (y(), X(d(Ne), G({ ...t, ...A.$attrs }, {
|
|
2861
2903
|
"chart-type": "stacked-bar",
|
|
2862
2904
|
options: d(f),
|
|
2863
2905
|
"x-scale": b.value,
|
|
2864
2906
|
"y-scale": L.value,
|
|
2865
2907
|
"data-j-stacked-bar-chart": ""
|
|
2866
|
-
},
|
|
2867
|
-
groups: V((
|
|
2868
|
-
ie(d(ht), G(
|
|
2908
|
+
}, ae(d(o))), de({
|
|
2909
|
+
groups: V(($) => [
|
|
2910
|
+
ie(d(ht), G($, { type: "stacked" }, ae(d(o))), null, 16)
|
|
2869
2911
|
]),
|
|
2870
2912
|
_: 2
|
|
2871
2913
|
}, [
|
|
2872
|
-
z(d(
|
|
2914
|
+
z(d(a), ($, N) => ({
|
|
2873
2915
|
name: N,
|
|
2874
2916
|
fn: V((D) => [
|
|
2875
|
-
|
|
2917
|
+
M(A.$slots, N, pe(he(D || {})))
|
|
2876
2918
|
])
|
|
2877
2919
|
}))
|
|
2878
2920
|
]), 1040, ["options", "x-scale", "y-scale"]));
|
|
2879
2921
|
}
|
|
2880
|
-
}),
|
|
2922
|
+
}), Al = ["d", "stroke-width"], Tl = 2, Ll = /* @__PURE__ */ W({
|
|
2881
2923
|
__name: "lume-line",
|
|
2882
2924
|
props: {
|
|
2883
2925
|
pathDefinition: {
|
|
@@ -2886,7 +2928,7 @@ const ma = {
|
|
|
2886
2928
|
},
|
|
2887
2929
|
width: {
|
|
2888
2930
|
type: Number,
|
|
2889
|
-
default:
|
|
2931
|
+
default: Tl
|
|
2890
2932
|
},
|
|
2891
2933
|
color: {
|
|
2892
2934
|
type: String,
|
|
@@ -2911,8 +2953,8 @@ const ma = {
|
|
|
2911
2953
|
},
|
|
2912
2954
|
emits: ["click"],
|
|
2913
2955
|
setup(e, { emit: n }) {
|
|
2914
|
-
const t = n, o =
|
|
2915
|
-
return _e(() => ze(o.value)), (
|
|
2956
|
+
const t = n, o = R(null);
|
|
2957
|
+
return _e(() => ze(o.value)), (a, u) => (y(), x("path", {
|
|
2916
2958
|
ref_key: "root",
|
|
2917
2959
|
ref: o,
|
|
2918
2960
|
class: ne(["lume-line", {
|
|
@@ -2927,11 +2969,11 @@ const ma = {
|
|
|
2927
2969
|
animationDuration: e.transition && e.animationDuration + "s"
|
|
2928
2970
|
}),
|
|
2929
2971
|
"data-j-line": "",
|
|
2930
|
-
onClick: u[0] || (u[0] = (
|
|
2931
|
-
}, null, 14,
|
|
2972
|
+
onClick: u[0] || (u[0] = (l) => t("click", l))
|
|
2973
|
+
}, null, 14, Al));
|
|
2932
2974
|
}
|
|
2933
2975
|
});
|
|
2934
|
-
const
|
|
2976
|
+
const Ol = /* @__PURE__ */ ee(Ll, [["__scopeId", "data-v-08896455"]]), $l = ["cx", "cy", "r", "stroke-width"], xl = 4, Il = /* @__PURE__ */ W({
|
|
2935
2977
|
__name: "lume-point",
|
|
2936
2978
|
props: {
|
|
2937
2979
|
x: { type: Number, required: !0 },
|
|
@@ -2942,7 +2984,7 @@ const Aa = /* @__PURE__ */ ee(ba, [["__scopeId", "data-v-08896455"]]), Ta = ["cx
|
|
|
2942
2984
|
},
|
|
2943
2985
|
radius: {
|
|
2944
2986
|
type: Number,
|
|
2945
|
-
default:
|
|
2987
|
+
default: xl
|
|
2946
2988
|
},
|
|
2947
2989
|
active: {
|
|
2948
2990
|
type: Boolean,
|
|
@@ -2951,56 +2993,56 @@ const Aa = /* @__PURE__ */ ee(ba, [["__scopeId", "data-v-08896455"]]), Ta = ["cx
|
|
|
2951
2993
|
},
|
|
2952
2994
|
emits: ["click"],
|
|
2953
2995
|
setup(e, { emit: n }) {
|
|
2954
|
-
const t = e, o = n,
|
|
2955
|
-
return _e(() => ze(
|
|
2996
|
+
const t = e, o = n, a = R(null), u = v(() => t.radius / 2);
|
|
2997
|
+
return _e(() => ze(a.value)), (l, i) => (y(), x("circle", {
|
|
2956
2998
|
ref_key: "root",
|
|
2957
|
-
ref:
|
|
2999
|
+
ref: a,
|
|
2958
3000
|
class: ne(["lume-point", `lume-stroke--${e.color}`]),
|
|
2959
3001
|
cx: e.x,
|
|
2960
3002
|
cy: e.y,
|
|
2961
3003
|
r: e.active ? e.radius : 0,
|
|
2962
3004
|
"stroke-width": u.value,
|
|
2963
3005
|
"data-j-point": "",
|
|
2964
|
-
onClick: i[0] || (i[0] = (
|
|
2965
|
-
}, null, 10,
|
|
3006
|
+
onClick: i[0] || (i[0] = (c) => o("click", c))
|
|
3007
|
+
}, null, 10, $l));
|
|
2966
3008
|
}
|
|
2967
3009
|
});
|
|
2968
|
-
const
|
|
2969
|
-
function
|
|
3010
|
+
const wl = /* @__PURE__ */ ee(Il, [["__scopeId", "data-v-b6745177"]]);
|
|
3011
|
+
function ln(e) {
|
|
2970
3012
|
function n(u) {
|
|
2971
|
-
let
|
|
2972
|
-
return u == null ? void 0 : u.reduce((i,
|
|
3013
|
+
let l = null;
|
|
3014
|
+
return u == null ? void 0 : u.reduce((i, c, s) => (c == null || c.value == null ? (l ? l.push(s) : l = [s], s === (u == null ? void 0 : u.length) - 1 && i.push(l)) : l && (i.push(l), l = null), i), []);
|
|
2973
3015
|
}
|
|
2974
|
-
function t(u,
|
|
2975
|
-
const r = Math.abs(u -
|
|
2976
|
-
return u == null &&
|
|
3016
|
+
function t(u, l, i, c) {
|
|
3017
|
+
const r = Math.abs(u - l) / (i + 1) * (c + 1);
|
|
3018
|
+
return u == null && l == null ? null : u > l ? u - r : u + r;
|
|
2977
3019
|
}
|
|
2978
3020
|
function o(u) {
|
|
2979
3021
|
return function(i) {
|
|
2980
3022
|
return !!u.find(
|
|
2981
|
-
(
|
|
3023
|
+
(c) => c.includes(i) || c.includes(i - 1)
|
|
2982
3024
|
);
|
|
2983
3025
|
};
|
|
2984
3026
|
}
|
|
2985
3027
|
return { computedLineData: v(() => e.value.map((u) => {
|
|
2986
|
-
const
|
|
3028
|
+
const l = n(u.values);
|
|
2987
3029
|
return {
|
|
2988
3030
|
...u,
|
|
2989
|
-
isDashed: o(
|
|
2990
|
-
values: u.values.map((i,
|
|
3031
|
+
isDashed: o(l),
|
|
3032
|
+
values: u.values.map((i, c) => {
|
|
2991
3033
|
var f, r;
|
|
2992
|
-
const
|
|
2993
|
-
(m) => m.includes(
|
|
3034
|
+
const s = l.find(
|
|
3035
|
+
(m) => m.includes(c)
|
|
2994
3036
|
);
|
|
2995
|
-
if (
|
|
2996
|
-
const m =
|
|
3037
|
+
if (s) {
|
|
3038
|
+
const m = s[0] - 1, g = s[s.length - 1] + 1;
|
|
2997
3039
|
let p = (f = u.values[m]) == null ? void 0 : f.value, b = (r = u.values[g]) == null ? void 0 : r.value;
|
|
2998
3040
|
return p == null && (p = b), b == null && (b = p), {
|
|
2999
3041
|
value: t(
|
|
3000
3042
|
p,
|
|
3001
3043
|
b,
|
|
3002
|
-
|
|
3003
|
-
|
|
3044
|
+
s.length,
|
|
3045
|
+
s.indexOf(c)
|
|
3004
3046
|
),
|
|
3005
3047
|
label: Ut
|
|
3006
3048
|
};
|
|
@@ -3010,27 +3052,27 @@ function an(e) {
|
|
|
3010
3052
|
};
|
|
3011
3053
|
})) };
|
|
3012
3054
|
}
|
|
3013
|
-
function
|
|
3055
|
+
function El(e, n) {
|
|
3014
3056
|
const t = e.bandwidth() / 2;
|
|
3015
|
-
return (o,
|
|
3057
|
+
return (o, a) => e(e.domain()[n + (a - 1)]) + t;
|
|
3016
3058
|
}
|
|
3017
|
-
function
|
|
3059
|
+
function Nl(e, n) {
|
|
3018
3060
|
return (t, o) => e(n + (o - 1));
|
|
3019
3061
|
}
|
|
3020
|
-
function
|
|
3021
|
-
const
|
|
3022
|
-
|
|
3062
|
+
function Dl(e, n, t, o) {
|
|
3063
|
+
const a = gn().x(
|
|
3064
|
+
ve(t) ? El(t, e) : Nl(t, e)
|
|
3023
3065
|
).y((u) => o(u));
|
|
3024
|
-
return n.every((u) => u == null) ? null :
|
|
3066
|
+
return n.every((u) => u == null) ? null : a(n);
|
|
3025
3067
|
}
|
|
3026
|
-
const
|
|
3068
|
+
const Hl = {
|
|
3027
3069
|
class: "lume-line-group",
|
|
3028
3070
|
"data-j-lume-line-group": ""
|
|
3029
|
-
},
|
|
3071
|
+
}, Bl = { class: "lume-line-group__lines" }, Ml = {
|
|
3030
3072
|
key: 0,
|
|
3031
3073
|
class: "lume-line-group__points",
|
|
3032
3074
|
"data-j-lume-line-group__points": ""
|
|
3033
|
-
},
|
|
3075
|
+
}, Sl = 1, Rl = /* @__PURE__ */ W({
|
|
3034
3076
|
__name: "lume-line-group",
|
|
3035
3077
|
props: {
|
|
3036
3078
|
...We(),
|
|
@@ -3045,34 +3087,34 @@ const Ea = {
|
|
|
3045
3087
|
},
|
|
3046
3088
|
emits: ["line-click", "point-click", "lume__internal--hover"],
|
|
3047
3089
|
setup(e, { emit: n }) {
|
|
3048
|
-
const t = e, o = n, { data:
|
|
3090
|
+
const t = e, o = n, { data: a, options: u, xScale: l, yScale: i, labels: c } = te(t), s = Pe(
|
|
3049
3091
|
"tooltipAnchorAttributes",
|
|
3050
3092
|
null
|
|
3051
3093
|
), { updateTooltipAnchorAttributes: f } = tn(
|
|
3052
|
-
|
|
3094
|
+
s,
|
|
3053
3095
|
u,
|
|
3054
|
-
|
|
3096
|
+
l,
|
|
3055
3097
|
i,
|
|
3056
|
-
|
|
3098
|
+
c
|
|
3057
3099
|
), r = v(() => {
|
|
3058
|
-
if (
|
|
3059
|
-
return
|
|
3060
|
-
const { computedLineData: w } =
|
|
3061
|
-
return u.value.withTooltip !== !1 && (
|
|
3100
|
+
if (a.value.every((H) => H.isDashed))
|
|
3101
|
+
return a.value;
|
|
3102
|
+
const { computedLineData: w } = ln(a);
|
|
3103
|
+
return u.value.withTooltip !== !1 && (s != null && s.value) && f(w.value), w.value;
|
|
3062
3104
|
}), m = v(() => {
|
|
3063
3105
|
if (t.hoveredIndex === -1)
|
|
3064
3106
|
return;
|
|
3065
|
-
const w =
|
|
3107
|
+
const w = En(
|
|
3066
3108
|
r.value,
|
|
3067
3109
|
t.hoveredIndex
|
|
3068
3110
|
);
|
|
3069
3111
|
return {
|
|
3070
|
-
d: `M ${et(
|
|
3112
|
+
d: `M ${et(l.value, t.hoveredIndex)},${i.value.range()[1]}
|
|
3071
3113
|
V ${i.value(w)}`
|
|
3072
3114
|
// Move to X index, Vertical line to the highest point
|
|
3073
3115
|
};
|
|
3074
3116
|
}), g = v(
|
|
3075
|
-
() =>
|
|
3117
|
+
() => l.value && Sl / (Nn(l.value) - 1)
|
|
3076
3118
|
// Subtracting the first line (read below)
|
|
3077
3119
|
), p = v(
|
|
3078
3120
|
() => {
|
|
@@ -3081,23 +3123,23 @@ const Ea = {
|
|
|
3081
3123
|
}
|
|
3082
3124
|
// If no `lineWidth`, returns NaN which needs to be undefined
|
|
3083
3125
|
), b = v(
|
|
3084
|
-
() =>
|
|
3085
|
-
), L = v(() =>
|
|
3126
|
+
() => l.value.bandwidth() / 2
|
|
3127
|
+
), L = v(() => l.value.domain()), A = v(
|
|
3086
3128
|
() => u.value.withPoints ?? t.withPoints
|
|
3087
3129
|
);
|
|
3088
3130
|
function h(w) {
|
|
3089
3131
|
return r.value[w].values;
|
|
3090
3132
|
}
|
|
3091
|
-
function
|
|
3092
|
-
var
|
|
3093
|
-
const
|
|
3094
|
-
(
|
|
3133
|
+
function $(w, H) {
|
|
3134
|
+
var K, Q;
|
|
3135
|
+
const Y = w === 0 ? [] : [
|
|
3136
|
+
(K = h(H)[w - 1]) == null ? void 0 : K.value,
|
|
3095
3137
|
(Q = h(H)[w]) == null ? void 0 : Q.value
|
|
3096
3138
|
];
|
|
3097
|
-
return
|
|
3139
|
+
return Dl(
|
|
3098
3140
|
w,
|
|
3099
|
-
|
|
3100
|
-
|
|
3141
|
+
Y,
|
|
3142
|
+
l.value,
|
|
3101
3143
|
i.value
|
|
3102
3144
|
) || "";
|
|
3103
3145
|
}
|
|
@@ -3108,93 +3150,93 @@ const Ea = {
|
|
|
3108
3150
|
};
|
|
3109
3151
|
}
|
|
3110
3152
|
function D(w, H) {
|
|
3111
|
-
var
|
|
3112
|
-
const
|
|
3153
|
+
var K;
|
|
3154
|
+
const Y = (K = h(H)[w]) == null ? void 0 : K.value;
|
|
3113
3155
|
return {
|
|
3114
|
-
x:
|
|
3115
|
-
y:
|
|
3156
|
+
x: ve(l.value) ? t.xScale(L.value[w]) + b.value : t.xScale(w),
|
|
3157
|
+
y: Y === null ? i.value(i.value.domain()[1]) : i.value(Y)
|
|
3116
3158
|
};
|
|
3117
3159
|
}
|
|
3118
3160
|
function P(w) {
|
|
3119
3161
|
return t.hoveredIndex === w;
|
|
3120
3162
|
}
|
|
3121
|
-
return (w, H) => (y(),
|
|
3163
|
+
return (w, H) => (y(), x("g", Hl, [
|
|
3122
3164
|
C("path", G(m.value, {
|
|
3123
3165
|
class: "lume-line-group__overlay-line",
|
|
3124
3166
|
"data-j-lume-line-group__overlay-line": ""
|
|
3125
3167
|
}), null, 16),
|
|
3126
|
-
(y(!0),
|
|
3127
|
-
key:
|
|
3168
|
+
(y(!0), x(q, null, z(r.value, (Y, K) => (y(), x("g", {
|
|
3169
|
+
key: Y.label,
|
|
3128
3170
|
class: "lume-line-group__group"
|
|
3129
3171
|
}, [
|
|
3130
|
-
C("g",
|
|
3131
|
-
(y(!0),
|
|
3172
|
+
C("g", Bl, [
|
|
3173
|
+
(y(!0), x(q, null, z(Y.values, (Q, F) => (y(), X(d(Ol), G(N(F), {
|
|
3132
3174
|
key: `line-${F}`,
|
|
3133
|
-
color:
|
|
3134
|
-
dashed:
|
|
3135
|
-
"path-definition":
|
|
3175
|
+
color: Y.color,
|
|
3176
|
+
dashed: Y.isDashed(F),
|
|
3177
|
+
"path-definition": $(F, K),
|
|
3136
3178
|
transition: e.transition,
|
|
3137
3179
|
width: d(u).lineWidth,
|
|
3138
|
-
onClick: (ue) => o("line-click", { index: F, datasetIndex:
|
|
3180
|
+
onClick: (ue) => o("line-click", { index: F, datasetIndex: K, event: ue })
|
|
3139
3181
|
}), null, 16, ["color", "dashed", "path-definition", "transition", "width", "onClick"]))), 128))
|
|
3140
3182
|
]),
|
|
3141
|
-
A.value ? (y(),
|
|
3142
|
-
(y(!0),
|
|
3183
|
+
A.value ? (y(), x("g", Ml, [
|
|
3184
|
+
(y(!0), x(q, null, z(Y.values, (Q, F) => (y(), X(d(wl), G(D(F, K), {
|
|
3143
3185
|
key: `point-${F}`,
|
|
3144
3186
|
active: P(F),
|
|
3145
|
-
color:
|
|
3187
|
+
color: Y.color,
|
|
3146
3188
|
index: F,
|
|
3147
3189
|
radius: p.value,
|
|
3148
|
-
onClick: (ue) => o("point-click", { index: F, datasetIndex:
|
|
3190
|
+
onClick: (ue) => o("point-click", { index: F, datasetIndex: K, event: ue })
|
|
3149
3191
|
}), null, 16, ["active", "color", "index", "radius", "onClick"]))), 128))
|
|
3150
|
-
])) :
|
|
3192
|
+
])) : Z("", !0)
|
|
3151
3193
|
]))), 128))
|
|
3152
3194
|
]));
|
|
3153
3195
|
}
|
|
3154
3196
|
});
|
|
3155
|
-
const un = /* @__PURE__ */ ee(
|
|
3156
|
-
margins:
|
|
3197
|
+
const un = /* @__PURE__ */ ee(Rl, [["__scopeId", "data-v-44ba7be1"]]), Cl = {
|
|
3198
|
+
margins: Ae.VERTICAL,
|
|
3157
3199
|
startOnZero: !0,
|
|
3158
3200
|
withTooltip: !0,
|
|
3159
3201
|
xAxisOptions: {},
|
|
3160
3202
|
yAxisOptions: { gridLines: !0 }
|
|
3161
|
-
},
|
|
3203
|
+
}, Ql = /* @__PURE__ */ W({
|
|
3162
3204
|
__name: "lume-line-chart",
|
|
3163
3205
|
props: {
|
|
3164
|
-
...
|
|
3206
|
+
...Ee(null, !1)
|
|
3165
3207
|
},
|
|
3166
3208
|
setup(e, { emit: n }) {
|
|
3167
|
-
const t = e, { componentEventPropagator: o } = ye(),
|
|
3168
|
-
return (i,
|
|
3209
|
+
const t = e, { componentEventPropagator: o } = ye(), a = Te(re()), { options: u } = te(t), { allOptions: l } = fe(u, Cl);
|
|
3210
|
+
return (i, c) => (y(), X(d(Ne), G({ ...t, ...i.$attrs }, {
|
|
3169
3211
|
"chart-type": "line",
|
|
3170
|
-
options: d(
|
|
3212
|
+
options: d(l),
|
|
3171
3213
|
"data-j-lume-line-chart": ""
|
|
3172
|
-
},
|
|
3173
|
-
groups: V((
|
|
3174
|
-
ie(d(un), G(
|
|
3214
|
+
}, ae(d(o))), de({
|
|
3215
|
+
groups: V((s) => [
|
|
3216
|
+
ie(d(un), G(s, ae(d(o))), null, 16)
|
|
3175
3217
|
]),
|
|
3176
3218
|
_: 2
|
|
3177
3219
|
}, [
|
|
3178
|
-
z(d(
|
|
3220
|
+
z(d(a), (s, f) => ({
|
|
3179
3221
|
name: f,
|
|
3180
3222
|
fn: V((r) => [
|
|
3181
|
-
|
|
3223
|
+
M(i.$slots, f, pe(he(r || {})))
|
|
3182
3224
|
])
|
|
3183
3225
|
}))
|
|
3184
3226
|
]), 1040, ["options"]));
|
|
3185
3227
|
}
|
|
3186
3228
|
});
|
|
3187
|
-
function
|
|
3229
|
+
function Gl(e) {
|
|
3188
3230
|
return { areaPathDefinition: v(
|
|
3189
3231
|
() => function(t, o) {
|
|
3190
|
-
if (!t || !o ||
|
|
3232
|
+
if (!t || !o || ve(t) || ve(o))
|
|
3191
3233
|
return;
|
|
3192
|
-
const
|
|
3193
|
-
return
|
|
3234
|
+
const a = e.value[0].values;
|
|
3235
|
+
return _n().x((u, l) => t(l)).y0(o(Math.min(...o.domain()))).y1((u) => o(u.value))(a);
|
|
3194
3236
|
}
|
|
3195
3237
|
) };
|
|
3196
3238
|
}
|
|
3197
|
-
const
|
|
3239
|
+
const jl = {
|
|
3198
3240
|
margins: {
|
|
3199
3241
|
top: 0,
|
|
3200
3242
|
right: 0,
|
|
@@ -3208,20 +3250,20 @@ const Ra = {
|
|
|
3208
3250
|
tooltipOptions: {
|
|
3209
3251
|
showTitle: !1
|
|
3210
3252
|
}
|
|
3211
|
-
},
|
|
3253
|
+
}, Vl = ["d"], Pl = /* @__PURE__ */ W({
|
|
3212
3254
|
__name: "lume-sparkline-chart",
|
|
3213
3255
|
props: {
|
|
3214
3256
|
...ft(null),
|
|
3215
|
-
...
|
|
3257
|
+
...Se()
|
|
3216
3258
|
},
|
|
3217
3259
|
setup(e, { expose: n, emit: t }) {
|
|
3218
|
-
const o = e, { componentEventPropagator:
|
|
3260
|
+
const o = e, { componentEventPropagator: a } = ye(), u = Te(re()), { data: l, options: i } = te(o), { internalData: c } = pt(l), { allOptions: s } = fe(i, jl), { computedLineData: f } = ln(c), { areaPathDefinition: r } = Gl(f), m = v(() => {
|
|
3219
3261
|
var L, A;
|
|
3220
|
-
return (A = (L =
|
|
3262
|
+
return (A = (L = c.value) == null ? void 0 : L[0]) == null ? void 0 : A.color;
|
|
3221
3263
|
}), g = v(
|
|
3222
3264
|
() => {
|
|
3223
3265
|
var L, A;
|
|
3224
|
-
return ((A = (L =
|
|
3266
|
+
return ((A = (L = l.value) == null ? void 0 : L[0]) == null ? void 0 : A.areaColor) || m.value;
|
|
3225
3267
|
}
|
|
3226
3268
|
);
|
|
3227
3269
|
function p(L) {
|
|
@@ -3232,17 +3274,17 @@ const Ra = {
|
|
|
3232
3274
|
}
|
|
3233
3275
|
function b(L, A, h) {
|
|
3234
3276
|
if (L.length)
|
|
3235
|
-
return
|
|
3277
|
+
return Me().range([0, h.width]).domain([0, L[0].values.length - 1]);
|
|
3236
3278
|
}
|
|
3237
3279
|
return n({
|
|
3238
3280
|
areaPathDefinition: r
|
|
3239
|
-
}), (L, A) => (y(),
|
|
3281
|
+
}), (L, A) => (y(), X(d(Ne), G(o, {
|
|
3240
3282
|
"chart-type": "line",
|
|
3241
|
-
options: p(d(
|
|
3283
|
+
options: p(d(s)),
|
|
3242
3284
|
"x-scale": b
|
|
3243
|
-
},
|
|
3285
|
+
}, ae(d(a))), de({
|
|
3244
3286
|
groups: V((h) => [
|
|
3245
|
-
d(
|
|
3287
|
+
d(s).showArea ? (y(), x("path", {
|
|
3246
3288
|
key: 0,
|
|
3247
3289
|
class: ne([
|
|
3248
3290
|
"sparkline-chart__area",
|
|
@@ -3252,45 +3294,46 @@ const Ra = {
|
|
|
3252
3294
|
]),
|
|
3253
3295
|
d: d(r)(h.xScale, h.yScale),
|
|
3254
3296
|
"data-j-sparkline__area": ""
|
|
3255
|
-
}, null, 10,
|
|
3256
|
-
ie(d(un), G(h, { "with-points": !1 },
|
|
3297
|
+
}, null, 10, Vl)) : Z("", !0),
|
|
3298
|
+
ie(d(un), G(h, { "with-points": !1 }, ae(d(a))), null, 16)
|
|
3257
3299
|
]),
|
|
3258
3300
|
_: 2
|
|
3259
3301
|
}, [
|
|
3260
|
-
z(d(u), (h,
|
|
3261
|
-
name:
|
|
3302
|
+
z(d(u), (h, $) => ({
|
|
3303
|
+
name: $,
|
|
3262
3304
|
fn: V((N) => [
|
|
3263
|
-
|
|
3305
|
+
M(L.$slots, $, pe(he(N || {})), void 0, !0)
|
|
3264
3306
|
])
|
|
3265
3307
|
}))
|
|
3266
3308
|
]), 1040, ["options"]));
|
|
3267
3309
|
}
|
|
3268
3310
|
});
|
|
3269
|
-
const
|
|
3311
|
+
const ql = /* @__PURE__ */ ee(Pl, [["__scopeId", "data-v-bda226a1"]]);
|
|
3270
3312
|
export {
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3313
|
+
Ul as LumeAlluvialDiagram,
|
|
3314
|
+
ol as LumeAlluvialGroup,
|
|
3315
|
+
xa as LumeAlluvialNodeHeader,
|
|
3316
|
+
ya as LumeAlluvialNodeLabel,
|
|
3317
|
+
Aa as LumeAlluvialNodeValue,
|
|
3275
3318
|
Lt as LumeAxis,
|
|
3276
3319
|
mt as LumeBar,
|
|
3277
|
-
|
|
3320
|
+
Xl as LumeBarChart,
|
|
3278
3321
|
ht as LumeBarGroup,
|
|
3279
|
-
|
|
3280
|
-
|
|
3322
|
+
Ne as LumeChart,
|
|
3323
|
+
ro as LumeChartContainer,
|
|
3281
3324
|
Ot as LumeChartLegend,
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3325
|
+
Kl as LumeGroupedBarChart,
|
|
3326
|
+
Ol as LumeLine,
|
|
3327
|
+
Ql as LumeLineChart,
|
|
3285
3328
|
un as LumeLineGroup,
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3329
|
+
Zo as LumeOverlayGroup,
|
|
3330
|
+
wl as LumePoint,
|
|
3331
|
+
Yl as LumeSingleBarChart,
|
|
3332
|
+
ql as LumeSparklineChart,
|
|
3333
|
+
Jl as LumeStackedBarChart,
|
|
3334
|
+
No as LumeTooltip,
|
|
3335
|
+
Lo as LumeTooltipItem,
|
|
3336
|
+
yo as LumeTooltipSummary,
|
|
3337
|
+
fo as LumeTooltipTitle
|
|
3295
3338
|
};
|
|
3296
3339
|
//# sourceMappingURL=index.js.map
|