vue-data-ui 3.25.7 → 3.25.9
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/{BaseScanner-DZvpgOjM.js → BaseScanner-Dzc8VT3j.js} +6 -3
- package/dist/{PackageVersion-UfoQuPMf.js → PackageVersion-KBMdaOXg.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{package-B-3S5q00.js → package-BL27Ev_h.js} +1 -1
- package/dist/{render-common-CAXK7ycr.js → render-common-By8J0AE-.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +2 -0
- package/dist/{useConfig-CIQZ6_r7.js → useConfig-D32D002m.js} +2 -0
- package/dist/{useObjectBindings---mHNfbS.js → useObjectBindings-Cd_WuYIn.js} +1 -1
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-DlWT702n.js → vue-data-ui-CBWuUAXT.js} +69 -69
- package/dist/vue-data-ui.js +70 -70
- package/dist/{vue-ui-3d-bar-DbOk2kpM.js → vue-ui-3d-bar-BSbq90H3.js} +3 -3
- package/dist/{vue-ui-accordion-BSmBUjwZ.js → vue-ui-accordion-DmkL8A59.js} +1 -1
- package/dist/{vue-ui-age-pyramid-C7_mGIRk.js → vue-ui-age-pyramid-CrXl71iC.js} +263 -251
- package/dist/{vue-ui-annotator-CTQHAPho.js → vue-ui-annotator-BO5ihHOB.js} +2 -2
- package/dist/{vue-ui-bullet-CDy_dkYz.js → vue-ui-bullet-B2Y3Wqh9.js} +3 -3
- package/dist/{vue-ui-bump-DP24leiD.js → vue-ui-bump-DXvvjG4I.js} +3 -3
- package/dist/{vue-ui-candlestick-kJLmYaR7.js → vue-ui-candlestick-CFqR6W56.js} +453 -441
- package/dist/{vue-ui-carousel-table-BQzAQDw6.js → vue-ui-carousel-table-D-ZkPRta.js} +2 -2
- package/dist/{vue-ui-chestnut-DnnRp3Kl.js → vue-ui-chestnut-CyW3IoYC.js} +3 -3
- package/dist/{vue-ui-chord-DO15ZDCS.js → vue-ui-chord-DS0jni9A.js} +3 -3
- package/dist/{vue-ui-circle-pack-DYTllMPV.js → vue-ui-circle-pack-j2ChgLWr.js} +494 -482
- package/dist/{vue-ui-cursor-CtViSjNp.js → vue-ui-cursor-qOONOtcv.js} +2 -2
- package/dist/{vue-ui-dag-NXtGYzqg.js → vue-ui-dag-CmeFsKhR.js} +3 -3
- package/dist/{vue-ui-dashboard-D3_4QohV.js → vue-ui-dashboard-C7Z5BTN4.js} +65 -65
- package/dist/{vue-ui-digits-CB09pLQx.js → vue-ui-digits-Bf68x6fb.js} +2 -2
- package/dist/{vue-ui-donut-yTE6D8yV.js → vue-ui-donut-CkBPJW_T.js} +837 -825
- package/dist/{vue-ui-donut-eysaEyTy.js → vue-ui-donut-DzDSYgVp.js} +2 -2
- package/dist/{vue-ui-donut-evolution-DhrtxvAd.js → vue-ui-donut-evolution-CDJumo0t.js} +3 -3
- package/dist/{vue-ui-dumbbell-CmGIeULQ.js → vue-ui-dumbbell-Cr__26dN.js} +3 -3
- package/dist/vue-ui-flow-Cz6WRi2c.js +1229 -0
- package/dist/{vue-ui-funnel-CLAii4wi.js → vue-ui-funnel-BlC7KxS6.js} +2 -2
- package/dist/vue-ui-galaxy-Bg2smlcI.js +1097 -0
- package/dist/{vue-ui-gauge-D76-4Z_0.js → vue-ui-gauge-BHsaent1.js} +3 -3
- package/dist/{vue-ui-geo-BQ7-UnuG.js → vue-ui-geo-CE3Cr0or.js} +407 -395
- package/dist/{vue-ui-gizmo-C47zjcs-.js → vue-ui-gizmo-DqFUBEai.js} +3 -3
- package/dist/{vue-ui-heatmap-XJef60IZ.js → vue-ui-heatmap-DXqj9ial.js} +478 -446
- package/dist/{vue-ui-hill-D5BYGPXB.js → vue-ui-hill-B3fPAfhL.js} +2 -2
- package/dist/vue-ui-history-plot-CrnTnpaM.js +1710 -0
- package/dist/{vue-ui-horizontal-bar-BgFHi6_7.js → vue-ui-horizontal-bar-DqvN3imH.js} +432 -420
- package/dist/{vue-ui-kpi-Cb8QJeaj.js → vue-ui-kpi-Mf318HvK.js} +2 -2
- package/dist/{vue-ui-label-ClMQ5Gez.js → vue-ui-label-C1UAzvAu.js} +1 -1
- package/dist/{vue-ui-mini-loader-DtPOVIkK.js → vue-ui-mini-loader-wGeACd-Y.js} +1 -1
- package/dist/{vue-ui-molecule-BzwMl-in.js → vue-ui-molecule-CaLReo4h.js} +346 -334
- package/dist/{vue-ui-mood-radar-BUR_YCcr.js → vue-ui-mood-radar-jkE2ENX5.js} +3 -3
- package/dist/{vue-ui-nested-donuts-BEB4nfsD.js → vue-ui-nested-donuts-BgMOKjil.js} +360 -348
- package/dist/vue-ui-onion-DBN3Ev4j.js +1247 -0
- package/dist/{vue-ui-parallel-coordinate-plot-CSO4johj.js → vue-ui-parallel-coordinate-plot-BcJzEGJ-.js} +387 -375
- package/dist/{vue-ui-quadrant-CKav0I6g.js → vue-ui-quadrant-BvoVlxTI.js} +418 -406
- package/dist/{vue-ui-quick-chart-BAQNS9_2.js → vue-ui-quick-chart-2hn8-F_C.js} +550 -538
- package/dist/{vue-ui-radar-ClPAgf5I.js → vue-ui-radar-O3AjGrc-.js} +330 -318
- package/dist/{vue-ui-rating-CWFMoYpE.js → vue-ui-rating-Criq0ofQ.js} +1 -1
- package/dist/{vue-ui-relation-circle-Da2MhrVe.js → vue-ui-relation-circle-CRnH2ikm.js} +3 -3
- package/dist/{vue-ui-ridgeline-D7gFs8yR.js → vue-ui-ridgeline-Blejn8LY.js} +3 -3
- package/dist/{vue-ui-rings-DkDJ0k5b.js → vue-ui-rings-C1U38Bp0.js} +321 -309
- package/dist/{vue-ui-scatter-yv4JzJID.js → vue-ui-scatter-DTsCc9hg.js} +584 -572
- package/dist/{vue-ui-skeleton-oFnh5zWs.js → vue-ui-skeleton-BPr3u7IL.js} +2 -2
- package/dist/{vue-ui-smiley-DJVusLnp.js → vue-ui-smiley-BIjAIpJ9.js} +1 -1
- package/dist/{vue-ui-spark-trend-IqZWPvSB.js → vue-ui-spark-trend-B7w4Mg8O.js} +3 -3
- package/dist/{vue-ui-sparkbar-_FW47iYj.js → vue-ui-sparkbar-lVDnYEYA.js} +3 -3
- package/dist/{vue-ui-sparkgauge--2vk2Y23.js → vue-ui-sparkgauge-BryoGCoc.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-CFEIPa5n.js → vue-ui-sparkhistogram-BdNoLb9L.js} +3 -3
- package/dist/{vue-ui-sparkline-Cs9CJR6W.js → vue-ui-sparkline-CNFD5K6z.js} +3 -3
- package/dist/vue-ui-sparkstackbar-CZ4tGL-_.js +750 -0
- package/dist/vue-ui-stackbar-DfsgaZy7.js +2369 -0
- package/dist/vue-ui-stackline-Cx7q2sGF.js +2483 -0
- package/dist/vue-ui-strip-plot-BcYhLPHM.js +1752 -0
- package/dist/{vue-ui-table-CiccGbRB.js → vue-ui-table-BzF75YjN.js} +3 -3
- package/dist/{vue-ui-table-heatmap-DnP3pzh2.js → vue-ui-table-heatmap-BSUab4fG.js} +1 -1
- package/dist/{vue-ui-table-sparkline-Bp7RiZh4.js → vue-ui-table-sparkline-B9ICTtoE.js} +2 -2
- package/dist/{vue-ui-thermometer-CawumQKP.js → vue-ui-thermometer-Am7llqdI.js} +3 -3
- package/dist/{vue-ui-timer-CXinMW7q.js → vue-ui-timer-D6EvkM31.js} +2 -2
- package/dist/{vue-ui-tiremarks-BnI2uhki.js → vue-ui-tiremarks-DiQJu8Em.js} +3 -3
- package/dist/{vue-ui-treemap-DTlFbfD6.js → vue-ui-treemap-wUZpijpr.js} +310 -298
- package/dist/vue-ui-waffle-6hO0flDT.js +1633 -0
- package/dist/{vue-ui-wheel-B02tiG0p.js → vue-ui-wheel-DnyCE0CK.js} +3 -3
- package/dist/{vue-ui-word-cloud-BZnCOMHx.js → vue-ui-word-cloud-D_MZ3gCS.js} +385 -372
- package/dist/{vue-ui-world-DO2VZ-T-.js → vue-ui-world-QNGY2WPz.js} +474 -462
- package/dist/{vue-ui-xy-CD6BiP_g.js → vue-ui-xy-BD-ighya.js} +2 -2
- package/dist/{vue-ui-xy-BC9GVdWE.js → vue-ui-xy-Ctcwn7Rk.js} +1447 -1432
- package/dist/{vue-ui-xy-canvas-DANPuyf4.js → vue-ui-xy-canvas-DUeglcdP.js} +523 -511
- package/package.json +1 -1
- package/dist/vue-ui-flow-qYAq3Rmn.js +0 -1217
- package/dist/vue-ui-galaxy-BVX-o2f-.js +0 -1085
- package/dist/vue-ui-history-plot-D-d-1ZiM.js +0 -1698
- package/dist/vue-ui-onion-CG6myK7a.js +0 -1235
- package/dist/vue-ui-sparkstackbar-Cvbue77A.js +0 -738
- package/dist/vue-ui-stackbar-C5ANS2hd.js +0 -2355
- package/dist/vue-ui-stackline-7yajJFW4.js +0 -2469
- package/dist/vue-ui-strip-plot-BT6Eqhup.js +0 -1740
- package/dist/vue-ui-waffle-CjgRkQAp.js +0 -1621
|
@@ -0,0 +1,750 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { Ct as t, Lt as n, Pt as r, S as i, Ut as a, Wt as o, X as s, Yt as c, Z as ee, Zt as te, ht as ne, i as re, nt as ie, q as ae, t as oe, w as se } from "./lib-Dql7cqyA.js";
|
|
3
|
+
import { n as ce, t as le } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as ue } from "./useConfig-D32D002m.js";
|
|
5
|
+
import { n as de, t as fe } from "./BaseScanner-Dzc8VT3j.js";
|
|
6
|
+
import { t as pe } from "./useNestedProp-Chvyfpl-.js";
|
|
7
|
+
import { t as me } from "./useThemeCheck-C43Tcqmk.js";
|
|
8
|
+
import { t as he } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
9
|
+
import { t as ge } from "./DefGrad-DVBqDjhO.js";
|
|
10
|
+
import { t as _e } from "./BaseLegendToggle-CXQrLjd-.js";
|
|
11
|
+
import { t as ve } from "./A11yDataTable-DdRsVULz.js";
|
|
12
|
+
import { t as ye } from "./useChartAccessibility-DYqac8yF.js";
|
|
13
|
+
import { t as be } from "./usePrefersMotion-BC-CsqR1.js";
|
|
14
|
+
import { t as xe } from "./vue_ui_sparkstackbar-BOjuQnZd.js";
|
|
15
|
+
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as Se, defineAsyncComponent as Ce, guardReactiveProps as h, normalizeClass as g, normalizeProps as _, normalizeStyle as v, onMounted as we, openBlock as y, ref as b, renderList as x, renderSlot as S, toDisplayString as C, toRefs as Te, unref as w, useSlots as Ee, watch as De, withCtx as Oe } from "vue";
|
|
16
|
+
//#region src/components/vue-ui-sparkstackbar.vue
|
|
17
|
+
var ke = /* @__PURE__ */ e({ default: () => Ye }), Ae = ["id"], je = { style: { position: "relative" } }, Me = [
|
|
18
|
+
"xmlns",
|
|
19
|
+
"viewBox",
|
|
20
|
+
"aria-describedby"
|
|
21
|
+
], Ne = ["id"], Pe = [
|
|
22
|
+
"width",
|
|
23
|
+
"height",
|
|
24
|
+
"rx"
|
|
25
|
+
], Fe = ["clip-path"], Ie = [
|
|
26
|
+
"x",
|
|
27
|
+
"width",
|
|
28
|
+
"height",
|
|
29
|
+
"fill"
|
|
30
|
+
], Le = [
|
|
31
|
+
"x",
|
|
32
|
+
"width",
|
|
33
|
+
"height",
|
|
34
|
+
"fill"
|
|
35
|
+
], Re = [
|
|
36
|
+
"x",
|
|
37
|
+
"height",
|
|
38
|
+
"fill"
|
|
39
|
+
], ze = [
|
|
40
|
+
"x",
|
|
41
|
+
"width",
|
|
42
|
+
"height",
|
|
43
|
+
"onClick",
|
|
44
|
+
"onMouseenter",
|
|
45
|
+
"onMouseleave"
|
|
46
|
+
], Be = [
|
|
47
|
+
"width",
|
|
48
|
+
"height",
|
|
49
|
+
"rx",
|
|
50
|
+
"stroke"
|
|
51
|
+
], Ve = [
|
|
52
|
+
"width",
|
|
53
|
+
"height",
|
|
54
|
+
"rx"
|
|
55
|
+
], He = {
|
|
56
|
+
key: 0,
|
|
57
|
+
style: {
|
|
58
|
+
position: "absolute",
|
|
59
|
+
top: "100%",
|
|
60
|
+
left: "0",
|
|
61
|
+
width: "100%"
|
|
62
|
+
},
|
|
63
|
+
"data-dom-to-png-ignore": "",
|
|
64
|
+
"aria-hidden": "true"
|
|
65
|
+
}, Ue = [
|
|
66
|
+
"aria-pressed",
|
|
67
|
+
"aria-label",
|
|
68
|
+
"onClick",
|
|
69
|
+
"onFocus",
|
|
70
|
+
"onKeydown"
|
|
71
|
+
], We = { style: {
|
|
72
|
+
display: "flex",
|
|
73
|
+
"flex-direction": "row",
|
|
74
|
+
"align-items": "center",
|
|
75
|
+
gap: "4px",
|
|
76
|
+
"justify-content": "center"
|
|
77
|
+
} }, Ge = ["height", "width"], Ke = ["rx", "fill"], qe = ["rx", "fill"], Je = {
|
|
78
|
+
key: 3,
|
|
79
|
+
ref: "source",
|
|
80
|
+
dir: "auto"
|
|
81
|
+
}, Ye = /*#__PURE__*/ he({
|
|
82
|
+
__name: "vue-ui-sparkstackbar",
|
|
83
|
+
props: {
|
|
84
|
+
config: {
|
|
85
|
+
type: Object,
|
|
86
|
+
default() {
|
|
87
|
+
return {};
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
dataset: {
|
|
91
|
+
type: Array,
|
|
92
|
+
default() {
|
|
93
|
+
return [];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
emits: ["selectDatapoint", "selectLegend"],
|
|
98
|
+
setup(e, { expose: he, emit: ke }) {
|
|
99
|
+
let Ye = Ce(() => import("./PackageVersion-KBMdaOXg.js").then((e) => e.t)), Xe = Ce(() => import("./Tooltip-hhrkQ3Lk.js")), { vue_ui_sparkstackbar: Ze } = ue(), { isThemeValid: Qe, warnInvalidTheme: $e } = me(), et = be(), tt = Ee(), T = e, nt = b(null), E = b(ae()), D = b(!1), rt = b(""), O = b(null), k = b(!1), A = b(null), it = b({
|
|
100
|
+
x: 0,
|
|
101
|
+
y: 0
|
|
102
|
+
}), j = b("pointer"), at = b(!1), M = b(null), ot = b([]), N = b(ut()), P = u(() => N.value.style.bar), F = u(() => N.value.style.legend), I = u(() => N.value.style.tooltip), L = u(() => N.value.style), st = u(() => N.value.debug);
|
|
103
|
+
we(() => {
|
|
104
|
+
tt["chart-background"] && st.value && console.warn("VueUiSparkStackbar does not support the #chart-background slot.");
|
|
105
|
+
}), ce({
|
|
106
|
+
config: () => N.value,
|
|
107
|
+
dataset: () => T.dataset,
|
|
108
|
+
component: "VueUiSparkStackbar",
|
|
109
|
+
rules: [le.emptyArray, {
|
|
110
|
+
test: (e) => e.length > 6,
|
|
111
|
+
message: [
|
|
112
|
+
"👀 The number of series is > 6. Consider:",
|
|
113
|
+
"",
|
|
114
|
+
"▶️ Grouping small values dynamically into a single \"Other\" series.",
|
|
115
|
+
"",
|
|
116
|
+
"▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read."
|
|
117
|
+
]
|
|
118
|
+
}]
|
|
119
|
+
});
|
|
120
|
+
let ct = u(() => N.value.useCursorPointer), lt = u(() => te({
|
|
121
|
+
defaultConfig: { style: {
|
|
122
|
+
backgroundColor: "#99999930",
|
|
123
|
+
animation: { show: !1 },
|
|
124
|
+
bar: { gradient: { inderlayerColor: "#6A6A6A" } },
|
|
125
|
+
title: { backgroundColor: "transparent" }
|
|
126
|
+
} },
|
|
127
|
+
userConfig: N.value.skeletonConfig ?? {}
|
|
128
|
+
})), { loading: R, FINAL_DATASET: z } = de({
|
|
129
|
+
...Te(T),
|
|
130
|
+
FINAL_CONFIG: N,
|
|
131
|
+
prepareConfig: ut,
|
|
132
|
+
skeletonDataset: T.config?.skeletonDataset ?? [
|
|
133
|
+
{
|
|
134
|
+
name: "_",
|
|
135
|
+
value: 8,
|
|
136
|
+
color: "#808080"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: "_",
|
|
140
|
+
value: 5,
|
|
141
|
+
color: "#ADADAD"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: "_",
|
|
145
|
+
value: 3,
|
|
146
|
+
color: "#DBDBDB"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
skeletonConfig: te({
|
|
150
|
+
defaultConfig: N.value,
|
|
151
|
+
userConfig: lt.value
|
|
152
|
+
})
|
|
153
|
+
}), { svgRef: B } = ye({ config: L.value.title });
|
|
154
|
+
function ut() {
|
|
155
|
+
let e = pe({
|
|
156
|
+
userConfig: T.config,
|
|
157
|
+
defaultConfig: Ze
|
|
158
|
+
}), t = e.theme;
|
|
159
|
+
if (!t) return e;
|
|
160
|
+
if (!Qe.value(e)) return $e(e), e;
|
|
161
|
+
let r = pe({
|
|
162
|
+
userConfig: xe[t] || T.config,
|
|
163
|
+
defaultConfig: e
|
|
164
|
+
}), i = pe({
|
|
165
|
+
userConfig: T.config,
|
|
166
|
+
defaultConfig: r
|
|
167
|
+
});
|
|
168
|
+
return {
|
|
169
|
+
...i,
|
|
170
|
+
customPalette: i.customPalette.length ? i.customPalette : c[t] || n
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function dt(e) {
|
|
174
|
+
let t = ee(e);
|
|
175
|
+
return t?.style && delete t.style.tooltip, JSON.stringify(t);
|
|
176
|
+
}
|
|
177
|
+
let ft = dt(T.config);
|
|
178
|
+
De(() => T.config, (e, t) => {
|
|
179
|
+
let n = dt(e), r = n !== ft;
|
|
180
|
+
ft = n;
|
|
181
|
+
let i = ut();
|
|
182
|
+
if (!r) {
|
|
183
|
+
N.value.style.tooltip = i.style.tooltip;
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
N.value = i, mt();
|
|
187
|
+
}, { deep: !0 }), De(() => z.value, (e) => {
|
|
188
|
+
H.value = z.value.map((e, t) => ({
|
|
189
|
+
...e,
|
|
190
|
+
color: e.color ? i(e.color) : V.value[t] || n[t] || n[t % n.length]
|
|
191
|
+
})), pt();
|
|
192
|
+
}, { deep: !0 });
|
|
193
|
+
let V = u(() => se(N.value.customPalette)), H = b(z.value.map((e, t) => ({
|
|
194
|
+
...e,
|
|
195
|
+
value: L.value.animation.show ? 0 : e.value || 0,
|
|
196
|
+
color: e.color ? i(e.color) : V.value[t] || n[t] || n[t % n.length]
|
|
197
|
+
}))), U = b(!0);
|
|
198
|
+
function pt() {
|
|
199
|
+
if (!L.value.animation.show || et.value) {
|
|
200
|
+
U.value = !1;
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
let e = L.value.animation.animationFrames, t = z.value.map((e) => e.value || 0), r = t.map((t) => t / e), a = t.reduce((e, t) => e + t, 0), o = 0;
|
|
204
|
+
U.value = !0, H.value = z.value.map((e, t) => ({
|
|
205
|
+
...e,
|
|
206
|
+
value: 0,
|
|
207
|
+
color: e.color ? i(e.color) : V.value[t] || n[t] || n[t % n.length]
|
|
208
|
+
}));
|
|
209
|
+
function s() {
|
|
210
|
+
o += a / e, o < a ? (H.value = H.value.map((e, a) => ({
|
|
211
|
+
...e,
|
|
212
|
+
value: Math.min(e.value + r[a], t[a]),
|
|
213
|
+
color: e.color ? i(e.color) : V.value[a] || n[a] || n[a % n.length]
|
|
214
|
+
})), requestAnimationFrame(s)) : (U.value = !1, H.value = z.value.map((e, r) => ({
|
|
215
|
+
...e,
|
|
216
|
+
value: t[r],
|
|
217
|
+
color: e.color ? i(e.color) : V.value[r] || n[r] || n[r % n.length],
|
|
218
|
+
id: ae()
|
|
219
|
+
})));
|
|
220
|
+
}
|
|
221
|
+
s();
|
|
222
|
+
}
|
|
223
|
+
we(() => {
|
|
224
|
+
mt();
|
|
225
|
+
});
|
|
226
|
+
function mt() {
|
|
227
|
+
r(T.dataset) ? ie({
|
|
228
|
+
componentName: "VueUiSparkStackbar",
|
|
229
|
+
type: "dataset",
|
|
230
|
+
debug: st.value
|
|
231
|
+
}) : st.value && T.dataset.forEach((e, t) => {
|
|
232
|
+
ne({
|
|
233
|
+
datasetObject: e,
|
|
234
|
+
requiredAttributes: ["name", "value"]
|
|
235
|
+
}).forEach((e) => {
|
|
236
|
+
ie({
|
|
237
|
+
componentName: "VueUiSparkStackbar",
|
|
238
|
+
type: "datasetSerieAttribute",
|
|
239
|
+
property: e,
|
|
240
|
+
index: t
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
}), pt();
|
|
244
|
+
}
|
|
245
|
+
let W = b({
|
|
246
|
+
width: 500,
|
|
247
|
+
height: 16
|
|
248
|
+
}), G = b([]), ht = u(() => z.value.map((e) => e.value || 0).filter((e, t) => !G.value.includes(t)).reduce((e, t) => e + t, 0)), K = u(() => H.value.map((e, t) => {
|
|
249
|
+
let r = e.value || 0, a = r / ht.value, o = isNaN(a) ? 0 : a, c = o * W.value.width;
|
|
250
|
+
return {
|
|
251
|
+
...e,
|
|
252
|
+
color: i(z.value[t]?.color ? z.value[t]?.color : V.value[t] || n[t] || n[t % n.length]),
|
|
253
|
+
value: r,
|
|
254
|
+
proportion: o,
|
|
255
|
+
width: c,
|
|
256
|
+
seriesIndex: t,
|
|
257
|
+
proportionLabel: s({
|
|
258
|
+
v: o * 100,
|
|
259
|
+
s: "%",
|
|
260
|
+
r: F.value.percentage.rounding
|
|
261
|
+
})
|
|
262
|
+
};
|
|
263
|
+
})), q = u(() => K.value.filter((e, t) => !G.value.includes(t)));
|
|
264
|
+
function gt() {
|
|
265
|
+
D.value = !1, M.value = null, A.value = null, j.value = "pointer";
|
|
266
|
+
}
|
|
267
|
+
function _t() {
|
|
268
|
+
gt(), G.value.length ? G.value = [] : K.value.forEach((e, t) => {
|
|
269
|
+
G.value.push(t);
|
|
270
|
+
}), St("selectLegend", q.value);
|
|
271
|
+
}
|
|
272
|
+
function J(e) {
|
|
273
|
+
gt(), G.value.includes(e) ? G.value = G.value.filter((t) => t !== e) : G.value.length < H.value.length - 1 && G.value.push(e), St("selectLegend", q.value);
|
|
274
|
+
}
|
|
275
|
+
function vt(e) {
|
|
276
|
+
return K.value.length ? K.value.find((t) => t.name === e) || (N.value.debug && console.warn(`VueUiSparkStackbar - Series name not found "${e}"`), null) : (N.value.debug && console.warn("VueUiSparkStackbar - There are no series to show."), null);
|
|
277
|
+
}
|
|
278
|
+
function yt(e) {
|
|
279
|
+
let t = vt(e);
|
|
280
|
+
t !== null && G.value.includes(t.id) && J(t.seriesIndex);
|
|
281
|
+
}
|
|
282
|
+
function bt(e) {
|
|
283
|
+
let t = vt(e);
|
|
284
|
+
t !== null && (G.value.includes(t.id) || J(t.seriesIndex));
|
|
285
|
+
}
|
|
286
|
+
let Y = u(() => {
|
|
287
|
+
let e = 0, t = [];
|
|
288
|
+
for (let n = 0; n < q.value.length; n += 1) t.push({
|
|
289
|
+
...q.value[n],
|
|
290
|
+
start: e
|
|
291
|
+
}), e += q.value[n].width;
|
|
292
|
+
return t;
|
|
293
|
+
}), xt = u(() => {
|
|
294
|
+
let e = Y.value.reduce((e, t) => e + t.width, 0);
|
|
295
|
+
return Math.min(Math.max(e, 0), W.value.width);
|
|
296
|
+
}), St = ke;
|
|
297
|
+
function X(e, t, n = !1) {
|
|
298
|
+
St("selectDatapoint", {
|
|
299
|
+
datapoint: e,
|
|
300
|
+
index: t
|
|
301
|
+
}), N.value.events.datapointClick && !n && N.value.events.datapointClick({
|
|
302
|
+
datapoint: e,
|
|
303
|
+
seriesIndex: e.seriesIndex
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
function Ct({ datapoint: e, seriesIndex: t }) {
|
|
307
|
+
D.value = !1, M.value = null, A.value = null, j.value = "pointer", N.value.events.datapointLeave && N.value.events.datapointLeave({
|
|
308
|
+
datapoint: e,
|
|
309
|
+
seriesIndex: e.seriesIndex
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
function wt({ datapoint: e, seriesIndex: n, triggerMode: r = "pointer" }) {
|
|
313
|
+
if (k.value = !1, N.value.events.datapointEnter && N.value.events.datapointEnter({
|
|
314
|
+
datapoint: e,
|
|
315
|
+
seriesIndex: e.seriesIndex
|
|
316
|
+
}), !I.value.show) return;
|
|
317
|
+
j.value = r, O.value = {
|
|
318
|
+
datapoint: e,
|
|
319
|
+
seriesIndex: n,
|
|
320
|
+
config: N.value,
|
|
321
|
+
series: K.value
|
|
322
|
+
}, D.value = !0, M.value = e.seriesIndex;
|
|
323
|
+
let i = I.value.customFormat;
|
|
324
|
+
if (t(i)) try {
|
|
325
|
+
let t = i({
|
|
326
|
+
seriesIndex: e.seriesIndex,
|
|
327
|
+
datapoint: e,
|
|
328
|
+
series: K.value,
|
|
329
|
+
config: N.value
|
|
330
|
+
});
|
|
331
|
+
typeof t == "string" && (rt.value = t, k.value = !0);
|
|
332
|
+
} catch {
|
|
333
|
+
console.warn("Custom format cannot be applied."), k.value = !1;
|
|
334
|
+
}
|
|
335
|
+
if (!k.value) {
|
|
336
|
+
let t = "", r = P.value.gradient.show, i = `tooltip_grad_${n}_${E.value}`, c = a(o(e.color, .05), 100 - P.value.gradient.intensity), ee = r ? `<rect x="0" y="0" width="10" height="10" rx="${Z.value}" fill="${P.value.gradient.underlayerColor}"/>` : "", te = r ? `<defs><radialGradient id="${i}"><stop offset="0%" stop-color="${c}"/><stop offset="100%" stop-color="${e.color}"/></radialGradient></defs>` : "";
|
|
337
|
+
t += `<div style="width:100%;text-align:center;border-bottom:1px solid ${I.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, t += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 10 10" height="14" width="14">${te}${ee}<rect x="0" y="0" width="10" height="10" rx="${Z.value}" fill="${r ? `url(#${i})` : e.color}"/></svg>`, t += `<b>${e.proportionLabel}</b>`, t += `<span>(${re(F.value.value.formatter, e.value, s({
|
|
338
|
+
p: F.value.value.prefix,
|
|
339
|
+
v: e.value,
|
|
340
|
+
s: F.value.value.suffix,
|
|
341
|
+
r: F.value.value.rounding
|
|
342
|
+
}), {
|
|
343
|
+
datapoint: e,
|
|
344
|
+
seriesIndex: n
|
|
345
|
+
})})</span>`, rt.value = `<div>${t}</div>`;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
let Tt = u(() => {
|
|
349
|
+
let e = P.value.borderRadius == null ? W.value.height / 2 : P.value.borderRadius;
|
|
350
|
+
return Math.min(Math.max(e, 0), W.value.height / 2);
|
|
351
|
+
}), Z = u(() => {
|
|
352
|
+
let e = W.value.height / 2;
|
|
353
|
+
return e === 0 ? 5 : Tt.value / e * 5;
|
|
354
|
+
});
|
|
355
|
+
function Q(e) {
|
|
356
|
+
let t = ot.value[e];
|
|
357
|
+
t && typeof t.focus == "function" && t.focus();
|
|
358
|
+
}
|
|
359
|
+
function Et(e) {
|
|
360
|
+
if (!Number.isFinite(e) || !B.value) return;
|
|
361
|
+
let t = Y.value[e];
|
|
362
|
+
if (!t) return;
|
|
363
|
+
let n = B.value.getBoundingClientRect(), r = t.start + t.width / 2, i = W.value.height / 2;
|
|
364
|
+
it.value = {
|
|
365
|
+
x: n.left + r / W.value.width * n.width,
|
|
366
|
+
y: n.top + i / W.value.height * n.height
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
function Dt() {
|
|
370
|
+
A.value = null, at.value = !0;
|
|
371
|
+
}
|
|
372
|
+
function Ot() {
|
|
373
|
+
A.value = null, j.value = "pointer", D.value = !1, M.value = null, at.value = !1;
|
|
374
|
+
}
|
|
375
|
+
function kt(e) {
|
|
376
|
+
if (!B.value || document.activeElement !== B.value || !Y.value.length) return;
|
|
377
|
+
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "Enter" || e.key === " ", i = e.key === "Escape", a = e.key === "Home", o = e.key === "End";
|
|
378
|
+
if (!t && !n && !r && !i && !a && !o) return;
|
|
379
|
+
if (e.preventDefault(), e.stopPropagation(), i) {
|
|
380
|
+
A.value = null, j.value = "pointer", D.value = !1, M.value = null;
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
if (r) {
|
|
384
|
+
if (A.value === null) return;
|
|
385
|
+
let e = Y.value[A.value];
|
|
386
|
+
if (!e) return;
|
|
387
|
+
X(e, e.seriesIndex);
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
let s = A.value;
|
|
391
|
+
a ? s = 0 : o ? s = Y.value.length - 1 : s === null || s < 0 || s >= Y.value.length ? s = n ? 0 : Y.value.length - 1 : n ? (s += 1, s >= Y.value.length && (s = 0)) : t && (--s, s < 0 && (s = Y.value.length - 1));
|
|
392
|
+
let c = Y.value[s];
|
|
393
|
+
c && (A.value = s, Et(s), wt({
|
|
394
|
+
datapoint: c,
|
|
395
|
+
seriesIndex: c.seriesIndex,
|
|
396
|
+
triggerMode: "keyboard"
|
|
397
|
+
}));
|
|
398
|
+
}
|
|
399
|
+
function At(e) {
|
|
400
|
+
D.value = !1, A.value = null, j.value = "pointer", M.value = e.seriesIndex;
|
|
401
|
+
}
|
|
402
|
+
function jt() {
|
|
403
|
+
A.value = null, j.value = "pointer", D.value = !1, M.value = null;
|
|
404
|
+
}
|
|
405
|
+
function Mt(e, t, n) {
|
|
406
|
+
let r = e.key === "Enter" || e.key === " ", i = e.key === "ArrowLeft" || e.key === "ArrowUp", a = e.key === "ArrowRight" || e.key === "ArrowDown", o = e.key === "Home", s = e.key === "End", c = e.key === "Escape";
|
|
407
|
+
if (!(!r && !i && !a && !o && !s && !c)) {
|
|
408
|
+
if (e.preventDefault(), e.stopPropagation(), c) {
|
|
409
|
+
jt();
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
if (r) {
|
|
413
|
+
J(n), X(t, n, !0);
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
if (o) {
|
|
417
|
+
Q(0);
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
if (s) {
|
|
421
|
+
Q(K.value.length - 1);
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
if (i) {
|
|
425
|
+
Q(n <= 0 ? K.value.length - 1 : n - 1);
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
a && Q(n >= K.value.length - 1 ? 0 : n + 1);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
let $ = u(() => ({
|
|
432
|
+
headers: [
|
|
433
|
+
N.value.a11y.translations.series,
|
|
434
|
+
N.value.a11y.translations.percentage,
|
|
435
|
+
N.value.a11y.translations.value
|
|
436
|
+
],
|
|
437
|
+
rows: K.value.map((e, t) => [
|
|
438
|
+
e.name,
|
|
439
|
+
G.value.includes(t) ? " - " : e.proportionLabel,
|
|
440
|
+
re(F.value.value.formatter, e.value, s({
|
|
441
|
+
p: F.value.value.prefix,
|
|
442
|
+
v: e.value,
|
|
443
|
+
s: F.value.value.suffix,
|
|
444
|
+
r: F.value.value.rounding
|
|
445
|
+
}), {
|
|
446
|
+
datapoint: e,
|
|
447
|
+
seriesIndex: t
|
|
448
|
+
})
|
|
449
|
+
])
|
|
450
|
+
}));
|
|
451
|
+
return he({
|
|
452
|
+
hideSeries: bt,
|
|
453
|
+
showSeries: yt
|
|
454
|
+
}), (e, t) => (y(), p("div", {
|
|
455
|
+
class: "vue-data-ui-component vue-ui-spark-stackbar",
|
|
456
|
+
ref_key: "sparkstackbarChart",
|
|
457
|
+
ref: nt,
|
|
458
|
+
style: v(`width:100%; background:${L.value.backgroundColor}`)
|
|
459
|
+
}, [
|
|
460
|
+
m("div", {
|
|
461
|
+
id: `chart-instructions-${E.value}`,
|
|
462
|
+
class: "sr-only"
|
|
463
|
+
}, [m("p", null, C(N.value.a11y.translations.keyboardNavigation), 1)], 8, Ae),
|
|
464
|
+
$.value?.rows?.length ? (y(), d(ve, {
|
|
465
|
+
key: 0,
|
|
466
|
+
uid: E.value,
|
|
467
|
+
head: $.value.headers,
|
|
468
|
+
body: $.value.rows,
|
|
469
|
+
notice: N.value.a11y.translations.tableAvailable,
|
|
470
|
+
caption: N.value.a11y.translations.tableCaption
|
|
471
|
+
}, null, 8, [
|
|
472
|
+
"uid",
|
|
473
|
+
"head",
|
|
474
|
+
"body",
|
|
475
|
+
"notice",
|
|
476
|
+
"caption"
|
|
477
|
+
])) : f("", !0),
|
|
478
|
+
L.value.title.text ? (y(), p("div", {
|
|
479
|
+
key: 1,
|
|
480
|
+
style: v(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${L.value.title.margin};padding: 0 6px;text-align:${L.value.title.textAlign}`)
|
|
481
|
+
}, [m("div", {
|
|
482
|
+
class: "atom-title",
|
|
483
|
+
style: v(`font-size:${L.value.title.fontSize}px;color:${L.value.title.color};font-weight:${L.value.title.bold ? "bold" : "normal"}`)
|
|
484
|
+
}, C(L.value.title.text), 5), L.value.title.subtitle.text ? (y(), p("div", {
|
|
485
|
+
key: 0,
|
|
486
|
+
class: "atom-subtitle",
|
|
487
|
+
style: v(`font-size:${L.value.title.subtitle.fontSize}px;color:${L.value.title.subtitle.color};font-weight:${L.value.title.subtitle.bold ? "bold" : "normal"}`)
|
|
488
|
+
}, C(L.value.title.subtitle.text), 5)) : f("", !0)], 4)) : f("", !0),
|
|
489
|
+
m("div", je, [(y(), p("svg", {
|
|
490
|
+
ref_key: "svgRef",
|
|
491
|
+
ref: B,
|
|
492
|
+
xmlns: w(oe),
|
|
493
|
+
width: "100%",
|
|
494
|
+
viewBox: `0 0 ${W.value.width} ${W.value.height}`,
|
|
495
|
+
"aria-describedby": `chart-instructions-${E.value}`,
|
|
496
|
+
tabindex: "0",
|
|
497
|
+
onFocus: Dt,
|
|
498
|
+
onBlur: Ot,
|
|
499
|
+
onKeydown: kt
|
|
500
|
+
}, [
|
|
501
|
+
Se(w(Ye)),
|
|
502
|
+
m("defs", null, [(y(!0), p(l, null, x(Y.value, (e, t) => (y(), d(ge, {
|
|
503
|
+
t: "linear",
|
|
504
|
+
id: `stack_gradient_${t}_${E.value}`,
|
|
505
|
+
key: `stack_gradient_${t}`,
|
|
506
|
+
gradientTransform: "rotate(90)",
|
|
507
|
+
stops: [
|
|
508
|
+
[
|
|
509
|
+
"0%",
|
|
510
|
+
e.color,
|
|
511
|
+
1
|
|
512
|
+
],
|
|
513
|
+
[
|
|
514
|
+
"50%",
|
|
515
|
+
w(a)(w(o)(e.color, .05), 100 - P.value.gradient.intensity),
|
|
516
|
+
1
|
|
517
|
+
],
|
|
518
|
+
[
|
|
519
|
+
"100%",
|
|
520
|
+
e.color,
|
|
521
|
+
1
|
|
522
|
+
]
|
|
523
|
+
]
|
|
524
|
+
}, null, 8, ["id", "stops"]))), 128)), m("clipPath", { id: `stackPill_${E.value}` }, [m("rect", {
|
|
525
|
+
x: "0",
|
|
526
|
+
y: "0",
|
|
527
|
+
width: xt.value,
|
|
528
|
+
height: W.value.height,
|
|
529
|
+
rx: Tt.value,
|
|
530
|
+
class: g({ animated: !U.value && !w(R) })
|
|
531
|
+
}, null, 10, Pe)], 8, Ne)]),
|
|
532
|
+
ht.value > 0 ? (y(), p(l, { key: 0 }, [m("g", { "clip-path": `url(#stackPill_${E.value})` }, [
|
|
533
|
+
(y(!0), p(l, null, x(Y.value, (e, t) => (y(), p("rect", {
|
|
534
|
+
key: `stack_underlayer_${t}`,
|
|
535
|
+
x: e.start,
|
|
536
|
+
y: 0,
|
|
537
|
+
width: e.width,
|
|
538
|
+
height: W.value.height,
|
|
539
|
+
fill: P.value.gradient.underlayerColor,
|
|
540
|
+
class: g({ animated: !U.value && !w(R) }),
|
|
541
|
+
style: v({ opacity: D.value && M.value !== null && I.value.show ? M.value === e.seriesIndex ? 1 : .5 : 1 })
|
|
542
|
+
}, null, 14, Ie))), 128)),
|
|
543
|
+
(y(!0), p(l, null, x(Y.value, (e, t) => (y(), p("rect", {
|
|
544
|
+
key: `stack_${t}`,
|
|
545
|
+
x: e.start,
|
|
546
|
+
y: 0,
|
|
547
|
+
width: e.width,
|
|
548
|
+
height: W.value.height,
|
|
549
|
+
fill: P.value.gradient.show ? `url(#stack_gradient_${t}_${E.value})` : e.color,
|
|
550
|
+
class: g({ animated: !U.value && !w(R) }),
|
|
551
|
+
style: v({ opacity: D.value && M.value !== null && I.value.show ? M.value === e.seriesIndex ? 1 : .5 : 1 })
|
|
552
|
+
}, null, 14, Le))), 128)),
|
|
553
|
+
(y(!0), p(l, null, x(Y.value.slice(1), (e, t) => (y(), p("rect", {
|
|
554
|
+
key: `stack_separator_${t}`,
|
|
555
|
+
x: e.start - .5,
|
|
556
|
+
y: "0",
|
|
557
|
+
width: "1",
|
|
558
|
+
height: W.value.height,
|
|
559
|
+
fill: L.value.backgroundColor,
|
|
560
|
+
"pointer-events": "none",
|
|
561
|
+
class: g({ animated: !U.value && !w(R) })
|
|
562
|
+
}, null, 10, Re))), 128)),
|
|
563
|
+
(y(!0), p(l, null, x(Y.value, (e, t) => (y(), p("rect", {
|
|
564
|
+
key: `stack_trap_${t}`,
|
|
565
|
+
x: e.start,
|
|
566
|
+
y: 0,
|
|
567
|
+
width: e.width,
|
|
568
|
+
height: W.value.height,
|
|
569
|
+
fill: "transparent",
|
|
570
|
+
stroke: "none",
|
|
571
|
+
class: g({ animated: !U.value && !w(R) }),
|
|
572
|
+
onClick: () => X(e, t),
|
|
573
|
+
onMouseenter: () => wt({
|
|
574
|
+
datapoint: e,
|
|
575
|
+
seriesIndex: e.seriesIndex
|
|
576
|
+
}),
|
|
577
|
+
onMouseleave: (t) => Ct({
|
|
578
|
+
datapoint: e,
|
|
579
|
+
seriesIndex: e.seriesIndex
|
|
580
|
+
})
|
|
581
|
+
}, null, 42, ze))), 128))
|
|
582
|
+
], 8, Fe), m("rect", {
|
|
583
|
+
x: "0.5",
|
|
584
|
+
y: "0.5",
|
|
585
|
+
width: W.value.width - 1,
|
|
586
|
+
height: W.value.height - 1,
|
|
587
|
+
rx: Math.max(0, Tt.value - .5),
|
|
588
|
+
fill: "none",
|
|
589
|
+
stroke: L.value.backgroundColor,
|
|
590
|
+
"stroke-width": "1",
|
|
591
|
+
"pointer-events": "none"
|
|
592
|
+
}, null, 8, Be)], 64)) : (y(), p("rect", {
|
|
593
|
+
key: 1,
|
|
594
|
+
x: 2,
|
|
595
|
+
y: 1,
|
|
596
|
+
width: W.value.width - 4,
|
|
597
|
+
height: W.value.height - 2,
|
|
598
|
+
stroke: "#CCCCCC",
|
|
599
|
+
"stroke-width": "2",
|
|
600
|
+
fill: "transparent",
|
|
601
|
+
rx: (W.value.height - 4) / 2
|
|
602
|
+
}, null, 8, Ve))
|
|
603
|
+
], 40, Me)), e.$slots.hint ? (y(), p("div", He, [S(e.$slots, "hint", _(h({
|
|
604
|
+
hint: N.value.a11y.translations.keyboardNavigation,
|
|
605
|
+
isVisible: at.value
|
|
606
|
+
})), void 0, !0)])) : f("", !0)]),
|
|
607
|
+
F.value.show ? (y(), p("div", {
|
|
608
|
+
key: 2,
|
|
609
|
+
style: v(`background:transparent;margin:0 auto;margin:${F.value.margin};justify-content:${F.value.textAlign === "left" ? "flex-start" : F.value.textAlign === "right" ? "flex-end" : "center"}`),
|
|
610
|
+
class: "vue-ui-sparkstackbar-legend",
|
|
611
|
+
"aria-label": "legend",
|
|
612
|
+
role: "toolbar"
|
|
613
|
+
}, [F.value.selectAllToggle.show && K.value.length > 2 && !w(R) ? (y(), d(_e, {
|
|
614
|
+
key: 0,
|
|
615
|
+
backgroundColor: F.value.selectAllToggle.backgroundColor,
|
|
616
|
+
color: F.value.selectAllToggle.color,
|
|
617
|
+
fontSize: F.value.fontSize,
|
|
618
|
+
checked: G.value.length > 0,
|
|
619
|
+
isCursorPointer: ct.value,
|
|
620
|
+
onToggle: _t
|
|
621
|
+
}, null, 8, [
|
|
622
|
+
"backgroundColor",
|
|
623
|
+
"color",
|
|
624
|
+
"fontSize",
|
|
625
|
+
"checked",
|
|
626
|
+
"isCursorPointer"
|
|
627
|
+
])) : f("", !0), (y(!0), p(l, null, x(K.value, (e, t) => (y(), p("div", {
|
|
628
|
+
role: "button",
|
|
629
|
+
tabindex: "0",
|
|
630
|
+
"aria-pressed": G.value.includes(t),
|
|
631
|
+
"aria-label": `${e.name}, ${G.value.includes(t) ? "hidden" : "visible"}, ${e.proportionLabel}`,
|
|
632
|
+
style: v(`font-size:${F.value.fontSize}px;cursor:${ct.value ? "pointer" : "default"}`),
|
|
633
|
+
class: g({
|
|
634
|
+
"vue-ui-sparkstackbar-legend-item": !0,
|
|
635
|
+
"vue-ui-sparkstackbar-legend-item-unselected": G.value.includes(t)
|
|
636
|
+
}),
|
|
637
|
+
onClick: (n) => {
|
|
638
|
+
J(t), X(e, t, !0);
|
|
639
|
+
},
|
|
640
|
+
onFocus: (t) => At(e),
|
|
641
|
+
onBlur: jt,
|
|
642
|
+
onKeydown: (n) => Mt(n, e, t)
|
|
643
|
+
}, [m("div", We, [(y(), p("svg", {
|
|
644
|
+
height: `${F.value.fontSize}px`,
|
|
645
|
+
width: `${F.value.fontSize}px`,
|
|
646
|
+
viewBox: "0 0 10 10"
|
|
647
|
+
}, [
|
|
648
|
+
m("defs", null, [Se(ge, {
|
|
649
|
+
t: "radial",
|
|
650
|
+
id: `legend_grad_${t}-${E.value}`,
|
|
651
|
+
stops: [[
|
|
652
|
+
"0%",
|
|
653
|
+
w(R) ? "#FFFFFF" : w(a)(w(o)(e.color, .05), 100 - P.value.gradient.intensity),
|
|
654
|
+
1
|
|
655
|
+
], [
|
|
656
|
+
"100%",
|
|
657
|
+
e.color,
|
|
658
|
+
1
|
|
659
|
+
]]
|
|
660
|
+
}, null, 8, ["id", "stops"])]),
|
|
661
|
+
P.value.gradient.show ? (y(), p("rect", {
|
|
662
|
+
key: 0,
|
|
663
|
+
x: "0",
|
|
664
|
+
y: "0",
|
|
665
|
+
width: "10",
|
|
666
|
+
height: "10",
|
|
667
|
+
rx: Z.value,
|
|
668
|
+
fill: P.value.gradient.underlayerColor
|
|
669
|
+
}, null, 8, Ke)) : f("", !0),
|
|
670
|
+
m("rect", {
|
|
671
|
+
x: "0",
|
|
672
|
+
y: "0",
|
|
673
|
+
width: "10",
|
|
674
|
+
height: "10",
|
|
675
|
+
rx: Z.value,
|
|
676
|
+
fill: P.value.gradient.show ? `url(#legend_grad_${t}-${E.value})` : e.color
|
|
677
|
+
}, null, 8, qe)
|
|
678
|
+
], 8, Ge)), w(R) ? f("", !0) : (y(), p(l, { key: 0 }, [m("span", { style: v(`color:${F.value.name.color}; font-weight:${F.value.name.bold ? "bold" : "normal"}`) }, C(e.name), 5), U.value ? f("", !0) : (y(), p(l, { key: 0 }, [F.value.percentage.show ? (y(), p("span", {
|
|
679
|
+
key: 0,
|
|
680
|
+
style: v(`font-weight:${F.value.percentage.bold ? "bold" : "normal"};color:${F.value.percentage.color}`)
|
|
681
|
+
}, C(G.value.includes(t) ? " - " : e.proportionLabel), 5)) : f("", !0), F.value.value.show ? (y(), p("span", {
|
|
682
|
+
key: 1,
|
|
683
|
+
style: v(`font-weight:${F.value.value.bold ? "bold" : "normal"};color:${F.value.value.color}`)
|
|
684
|
+
}, " (" + C(w(re)(F.value.value.formatter, e.value, w(s)({
|
|
685
|
+
p: F.value.value.prefix,
|
|
686
|
+
v: e.value,
|
|
687
|
+
s: F.value.value.suffix,
|
|
688
|
+
r: F.value.value.rounding
|
|
689
|
+
}), {
|
|
690
|
+
datapoint: e,
|
|
691
|
+
seriesIndex: t
|
|
692
|
+
})) + ") ", 5)) : f("", !0)], 64))], 64))])], 46, Ue))), 256))], 4)) : f("", !0),
|
|
693
|
+
Se(w(Xe), {
|
|
694
|
+
teleportTo: I.value.teleportTo,
|
|
695
|
+
show: D.value && I.value.show,
|
|
696
|
+
parent: nt.value,
|
|
697
|
+
backgroundColor: I.value.backgroundColor,
|
|
698
|
+
color: I.value.color,
|
|
699
|
+
fontSize: I.value.fontSize,
|
|
700
|
+
borderRadius: I.value.borderRadius,
|
|
701
|
+
borderColor: I.value.borderColor,
|
|
702
|
+
borderWidth: I.value.borderWidth,
|
|
703
|
+
backgroundOpacity: I.value.backgroundOpacity,
|
|
704
|
+
position: I.value.position,
|
|
705
|
+
content: rt.value,
|
|
706
|
+
isCustom: k.value,
|
|
707
|
+
offsetX: I.value.offsetX,
|
|
708
|
+
offsetY: -124 + I.value.offsetY,
|
|
709
|
+
blockShiftY: !0,
|
|
710
|
+
smooth: I.value.smooth,
|
|
711
|
+
backdropFilter: I.value.backdropFilter,
|
|
712
|
+
smoothForce: I.value.smoothForce,
|
|
713
|
+
smoothSnapThreshold: I.value.smoothSnapThreshold,
|
|
714
|
+
isA11yMode: j.value === "keyboard",
|
|
715
|
+
a11yPosition: it.value
|
|
716
|
+
}, {
|
|
717
|
+
"tooltip-before": Oe(() => [S(e.$slots, "tooltip-before", _(h({ ...O.value })), void 0, !0)]),
|
|
718
|
+
tooltip: Oe(() => [S(e.$slots, "tooltip", _(h({ ...O.value })), void 0, !0)]),
|
|
719
|
+
"tooltip-after": Oe(() => [S(e.$slots, "tooltip-after", _(h({ ...O.value })), void 0, !0)]),
|
|
720
|
+
_: 3
|
|
721
|
+
}, 8, [
|
|
722
|
+
"teleportTo",
|
|
723
|
+
"show",
|
|
724
|
+
"parent",
|
|
725
|
+
"backgroundColor",
|
|
726
|
+
"color",
|
|
727
|
+
"fontSize",
|
|
728
|
+
"borderRadius",
|
|
729
|
+
"borderColor",
|
|
730
|
+
"borderWidth",
|
|
731
|
+
"backgroundOpacity",
|
|
732
|
+
"position",
|
|
733
|
+
"content",
|
|
734
|
+
"isCustom",
|
|
735
|
+
"offsetX",
|
|
736
|
+
"offsetY",
|
|
737
|
+
"smooth",
|
|
738
|
+
"backdropFilter",
|
|
739
|
+
"smoothForce",
|
|
740
|
+
"smoothSnapThreshold",
|
|
741
|
+
"isA11yMode",
|
|
742
|
+
"a11yPosition"
|
|
743
|
+
]),
|
|
744
|
+
e.$slots.source ? (y(), p("div", Je, [S(e.$slots, "source", {}, void 0, !0)], 512)) : f("", !0),
|
|
745
|
+
S(e.$slots, "skeleton", {}, () => [w(R) ? (y(), d(fe, { key: 0 })) : f("", !0)], !0)
|
|
746
|
+
], 4));
|
|
747
|
+
}
|
|
748
|
+
}, [["__scopeId", "data-v-b9cf09ef"]]);
|
|
749
|
+
//#endregion
|
|
750
|
+
export { ke as n, Ye as t };
|