vue-data-ui 3.0.0-next.9 → 3.0.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.
Files changed (144) hide show
  1. package/README.md +32 -30
  2. package/dist/{Arrow-B6OlqyCG.js → Arrow-r2f8Bpd-.js} +1 -1
  3. package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-CGGcf8d8.js} +4 -4
  4. package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-CXtL10fo.js} +1 -1
  5. package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-H91bBsqM.js} +2 -2
  6. package/dist/{DataTable--paavNqF.js → DataTable-BSSXpM7w.js} +2 -2
  7. package/dist/{Legend-BZ06qU55.js → Legend-BUk0WvWJ.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-DQDgPoW8.js} +3 -3
  9. package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CJ6Vd7V5.js} +3 -3
  10. package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3zudcNI.js} +32 -32
  11. package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
  12. package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
  13. package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
  14. package/dist/{Shape-Mr1eIp_G.js → Shape-BRzOzubn.js} +43 -37
  15. package/dist/Slicer-MID8pgT3.js +602 -0
  16. package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-DATI1fGZ.js} +7 -7
  17. package/dist/{Title-B2dA6-uH.js → Title-BGu6gEd2.js} +1 -1
  18. package/dist/{Tooltip-O_hCvqgF.js → Tooltip-Bh2zYSoM.js} +23 -19
  19. package/dist/{UserOptions-Bk03FRqW.js → UserOptions-Ck8fz9f4.js} +2 -2
  20. package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-DhIh24Ti.js} +1 -1
  21. package/dist/{img-C_9wps3s.js → img-DrR839Ot.js} +1 -1
  22. package/dist/{index-CgShIRes.js → index-BtNwOUja.js} +2885 -2010
  23. package/dist/{pdf-CXdbjyRJ.js → pdf-DoShrdT5.js} +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +753 -65
  26. package/dist/types/vue-data-ui.d.ts +753 -65
  27. package/dist/useAutoSizeLabelsInsideViewbox-FmDQyX4z.js +81 -0
  28. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  29. package/dist/useLoading-D7YHNtLX.js +29 -0
  30. package/dist/useNestedProp-f2H3m6Yj.js +13 -0
  31. package/dist/usePanZoom-BVca3eMk.js +122 -0
  32. package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DUNjpQNe.js} +2 -2
  33. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  34. package/dist/{useTimeLabels-DG97x2hL.js → useTimeLabels-DkzmKfZn.js} +208 -156
  35. package/dist/{vue-data-ui-DiwfJSwC.js → vue-data-ui-D7QVxNhO.js} +105 -100
  36. package/dist/vue-data-ui.js +26 -25
  37. package/dist/vue-ui-3d-bar-ITaF-6Kn.js +1323 -0
  38. package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-BKUrAowe.js} +3 -3
  39. package/dist/vue-ui-age-pyramid-DxsuDr6o.js +835 -0
  40. package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-B06QtxgJ.js} +12 -12
  41. package/dist/vue-ui-bullet-B7Fy45tA.js +571 -0
  42. package/dist/vue-ui-candlestick-Dw0U4uIQ.js +1000 -0
  43. package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-DGz0nw28.js} +29 -29
  44. package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-CFfKYm9i.js} +664 -536
  45. package/dist/vue-ui-chord-EhlQhMSs.js +1038 -0
  46. package/dist/vue-ui-circle-pack-BHrrEUUd.js +709 -0
  47. package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-Dd-HtWzG.js} +2 -2
  48. package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-6R8udDY3.js} +64 -64
  49. package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-zKn3uhGN.js} +2 -2
  50. package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-BtnIwS_E.js} +431 -422
  51. package/dist/vue-ui-donut-evolution-DHo1MuMM.js +1076 -0
  52. package/dist/vue-ui-dumbbell-Czi9r9Na.js +1120 -0
  53. package/dist/vue-ui-flow-jOfM0RZY.js +841 -0
  54. package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-tBvVpdhy.js} +16 -16
  55. package/dist/vue-ui-galaxy-IdoY2oqG.js +680 -0
  56. package/dist/vue-ui-gauge-DR6Xm_Hz.js +791 -0
  57. package/dist/vue-ui-gizmo-Dto73UsB.js +210 -0
  58. package/dist/vue-ui-heatmap-zmFv-0z1.js +1078 -0
  59. package/dist/vue-ui-history-plot-ILemyyYw.js +1074 -0
  60. package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-hmqSCvxr.js} +26 -26
  61. package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-CbD-E8ci.js} +2 -2
  62. package/dist/vue-ui-molecule-mTy6YIm6.js +656 -0
  63. package/dist/vue-ui-mood-radar-BEnSYV3Q.js +785 -0
  64. package/dist/vue-ui-nested-donuts-CGE9dmJK.js +1284 -0
  65. package/dist/vue-ui-onion-Dh2J9GV0.js +776 -0
  66. package/dist/vue-ui-parallel-coordinate-plot-xsgmMIJK.js +916 -0
  67. package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-DA0Kw6eq.js} +512 -459
  68. package/dist/vue-ui-quick-chart-DKbxF5Yt.js +1762 -0
  69. package/dist/vue-ui-radar-BFY9bN_h.js +796 -0
  70. package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-Bh35aujf.js} +2 -2
  71. package/dist/vue-ui-relation-circle-B-05kQ_l.js +598 -0
  72. package/dist/vue-ui-ridgeline-CuGfF83t.js +1157 -0
  73. package/dist/vue-ui-rings-DrQXXzAM.js +728 -0
  74. package/dist/vue-ui-scatter-CWn9c7e9.js +1178 -0
  75. package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-oG4Bm5nL.js} +13 -13
  76. package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-Cnwba_gV.js} +46 -46
  77. package/dist/vue-ui-spark-trend-D9iNCf4o.js +315 -0
  78. package/dist/vue-ui-sparkbar-iJkiubZC.js +351 -0
  79. package/dist/vue-ui-sparkgauge-BH3uA5rh.js +232 -0
  80. package/dist/vue-ui-sparkhistogram-B3kR62pf.js +380 -0
  81. package/dist/vue-ui-sparkline-DczR2ZAf.js +513 -0
  82. package/dist/vue-ui-sparkstackbar-Cg0ItRGH.js +421 -0
  83. package/dist/vue-ui-stackbar-d4PrzcGS.js +1371 -0
  84. package/dist/vue-ui-strip-plot-BXBpN5rl.js +916 -0
  85. package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BXOLZXuz.js} +17 -17
  86. package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-7YT7VF2H.js} +5 -5
  87. package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-BfgqajJ2.js} +19 -16
  88. package/dist/vue-ui-thermometer-C7Tg6HLz.js +541 -0
  89. package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-Ch5JP1pQ.js} +5 -5
  90. package/dist/vue-ui-tiremarks-fY-4pWAK.js +406 -0
  91. package/dist/vue-ui-treemap-DTSX6suB.js +1035 -0
  92. package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-C-i2dRnU.js} +104 -102
  93. package/dist/vue-ui-waffle-BbgLlhGH.js +910 -0
  94. package/dist/vue-ui-wheel-waZf462K.js +379 -0
  95. package/dist/vue-ui-word-cloud-DtLK91Dk.js +765 -0
  96. package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-Cx4uuwTY.js} +364 -327
  97. package/dist/vue-ui-xy-DDOT8cyx.js +3808 -0
  98. package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-CUCsC8vD.js} +265 -264
  99. package/package.json +4 -4
  100. package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
  101. package/dist/Slicer-3t0HimeE.js +0 -577
  102. package/dist/useLoading-Bt5Doa8m.js +0 -28
  103. package/dist/useNestedProp-BC4Ciblw.js +0 -13
  104. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  105. package/dist/vue-ui-3d-bar-BqmzX9u4.js +0 -1227
  106. package/dist/vue-ui-age-pyramid-eRPt0BJb.js +0 -746
  107. package/dist/vue-ui-bullet-BSnF2gql.js +0 -513
  108. package/dist/vue-ui-candlestick-kMbNnoYe.js +0 -873
  109. package/dist/vue-ui-chord-Dxy_bfIE.js +0 -949
  110. package/dist/vue-ui-circle-pack-I_p4FPiW.js +0 -673
  111. package/dist/vue-ui-donut-evolution-DQhZJ4Sa.js +0 -903
  112. package/dist/vue-ui-dumbbell-DdN-7b3g.js +0 -753
  113. package/dist/vue-ui-flow-MvORTthN.js +0 -765
  114. package/dist/vue-ui-galaxy-B0PLMAn8.js +0 -617
  115. package/dist/vue-ui-gauge-C4FTzDFt.js +0 -738
  116. package/dist/vue-ui-gizmo-Dl5FHFb4.js +0 -192
  117. package/dist/vue-ui-heatmap-C3dee43W.js +0 -877
  118. package/dist/vue-ui-history-plot-dqv4u1Oa.js +0 -924
  119. package/dist/vue-ui-molecule-DtRAlfhC.js +0 -597
  120. package/dist/vue-ui-mood-radar-BZj2G0zE.js +0 -670
  121. package/dist/vue-ui-nested-donuts-OqJTwMb2.js +0 -1212
  122. package/dist/vue-ui-onion-DXLokGec.js +0 -701
  123. package/dist/vue-ui-parallel-coordinate-plot-tg7QhtIE.js +0 -807
  124. package/dist/vue-ui-quick-chart-4EODniQ3.js +0 -1612
  125. package/dist/vue-ui-radar-Dt5p5oSy.js +0 -741
  126. package/dist/vue-ui-relation-circle-_SysXj9T.js +0 -542
  127. package/dist/vue-ui-ridgeline-Cs5UihNN.js +0 -969
  128. package/dist/vue-ui-rings-Duay-EmS.js +0 -685
  129. package/dist/vue-ui-scatter-C6oGQcbL.js +0 -1045
  130. package/dist/vue-ui-spark-trend-CEAqGu3d.js +0 -291
  131. package/dist/vue-ui-sparkbar-ByPUDc6x.js +0 -301
  132. package/dist/vue-ui-sparkgauge-C-GKwevJ.js +0 -201
  133. package/dist/vue-ui-sparkhistogram-Dz0DdaVW.js +0 -313
  134. package/dist/vue-ui-sparkline-BULntz_U.js +0 -459
  135. package/dist/vue-ui-sparkstackbar-DXjHOeeU.js +0 -381
  136. package/dist/vue-ui-stackbar-CeP9n7zy.js +0 -1207
  137. package/dist/vue-ui-strip-plot-CaFQkWV8.js +0 -761
  138. package/dist/vue-ui-thermometer-BXf14CYH.js +0 -495
  139. package/dist/vue-ui-tiremarks-D6hJ1cd4.js +0 -358
  140. package/dist/vue-ui-treemap-tBurCrdn.js +0 -965
  141. package/dist/vue-ui-waffle-BNzs_BxY.js +0 -863
  142. package/dist/vue-ui-wheel-tydUATi8.js +0 -352
  143. package/dist/vue-ui-word-cloud-DUUc_tj6.js +0 -659
  144. package/dist/vue-ui-xy--HToGdle.js +0 -2982
@@ -0,0 +1,421 @@
1
+ import { defineAsyncComponent as X, useSlots as be, onMounted as J, ref as v, toRefs as ke, watch as K, computed as $, createElementBlock as r, openBlock as s, normalizeStyle as p, createCommentVNode as h, createVNode as Q, createBlock as _e, createElementVNode as d, toDisplayString as A, unref as c, Fragment as k, renderList as F, normalizeClass as N, withCtx as Z, renderSlot as R, normalizeProps as ee, guardReactiveProps as te } from "vue";
2
+ import { u as xe, c as le, t as we, a as Ce, p as i, b as $e, e as D, d as Se, o as Ae, f as oe, g as Fe, i as U, X as De, s as ae, x as se, k as re, y as Ie } from "./index-BtNwOUja.js";
3
+ import { u as ne } from "./useNestedProp-f2H3m6Yj.js";
4
+ import { u as Pe } from "./useChartAccessibility-9icAAmYg.js";
5
+ import { u as ze, B as Be } from "./useLoading-D7YHNtLX.js";
6
+ import { _ as Le } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
+ const Ne = ["xmlns", "viewBox"], Te = ["id"], Ee = ["stop-color"], Me = ["stop-color"], Oe = ["stop-color"], Ve = {
8
+ id: "stackPill",
9
+ clipPathUnits: "objectBoundingBox"
10
+ }, Re = ["fill"], Ue = {
11
+ key: 0,
12
+ "clip-path": "url(#stackPill)"
13
+ }, je = ["x", "width", "height", "fill"], Ge = ["x", "width", "height", "fill", "stroke"], We = ["x", "width", "height", "onClick", "onMouseenter", "onMouseleave"], Ye = ["width", "height", "rx"], qe = ["onClick"], He = { style: { display: "flex", "flex-direction": "row", "align-items": "center", gap: "4px", "justify-content": "center" } }, Xe = ["height", "width"], Je = ["id"], Ke = ["stop-color"], Qe = ["stop-color"], Ze = ["fill"], et = {
14
+ key: 2,
15
+ ref: "source",
16
+ dir: "auto"
17
+ }, tt = {
18
+ __name: "vue-ui-sparkstackbar",
19
+ props: {
20
+ config: {
21
+ type: Object,
22
+ default() {
23
+ return {};
24
+ }
25
+ },
26
+ dataset: {
27
+ type: Array,
28
+ default() {
29
+ return [];
30
+ }
31
+ }
32
+ },
33
+ emits: ["selectDatapoint"],
34
+ setup(ue, { emit: ie }) {
35
+ const ce = X(() => import("./PackageVersion-CJ6Vd7V5.js")), de = X(() => import("./Tooltip-Bh2zYSoM.js")), { vue_ui_sparkstackbar: ve } = xe(), _ = ue, pe = be();
36
+ J(() => {
37
+ pe["chart-background"] && console.warn("VueUiSparkStackbar does not support the #chart-background slot.");
38
+ });
39
+ const j = v(null), I = v(le()), T = v(!1), E = v(""), e = v(M()), { loading: x, FINAL_DATASET: m } = ze({
40
+ ...ke(_),
41
+ FINAL_CONFIG: e,
42
+ prepareConfig: M,
43
+ skeletonDataset: [
44
+ { name: "_", value: 8, color: "#808080" },
45
+ { name: "_", value: 5, color: "#ADADAD" },
46
+ { name: "_", value: 3, color: "#DBDBDB" }
47
+ ],
48
+ skeletonConfig: we({
49
+ defaultConfig: e.value,
50
+ userConfig: {
51
+ style: {
52
+ backgroundColor: "#99999930",
53
+ animation: { show: !1 },
54
+ bar: { gradient: { inderlayerColor: "#6A6A6A" } },
55
+ title: {
56
+ backgroundColor: "transparent"
57
+ }
58
+ }
59
+ }
60
+ })
61
+ }), { svgRef: ge } = Pe({ config: e.value.style.title });
62
+ function M() {
63
+ const t = ne({
64
+ userConfig: _.config,
65
+ defaultConfig: ve
66
+ });
67
+ return t.theme ? {
68
+ ...ne({
69
+ userConfig: $e.vue_ui_sparkstackbar[t.theme] || _.config,
70
+ defaultConfig: t
71
+ }),
72
+ customPalette: Ce[t.theme] || i
73
+ } : t;
74
+ }
75
+ K(() => _.config, (t) => {
76
+ e.value = M(), Y();
77
+ }, { deep: !0 }), K(() => m.value, (t) => {
78
+ b.value = m.value.map((a, l) => ({
79
+ ...a,
80
+ color: a.color ? D(a.color) : S.value[l] || i[l] || i[l % i.length]
81
+ })), G();
82
+ }, { deep: !0 });
83
+ const S = $(() => Se(e.value.customPalette)), b = v(m.value.map((t, a) => ({
84
+ ...t,
85
+ value: e.value.style.animation.show ? 0 : t.value || 0,
86
+ color: t.color ? D(t.color) : S.value[a] || i[a] || i[a % i.length]
87
+ }))), w = v(!0);
88
+ function G() {
89
+ if (!e.value.style.animation.show) return;
90
+ const t = e.value.style.animation.animationFrames, a = m.value.map((n) => n.value || 0), l = a.map((n) => n / t), o = a.reduce((n, u) => n + u, 0);
91
+ let y = 0;
92
+ w.value = !0, b.value = m.value.map((n, u) => ({
93
+ ...n,
94
+ value: 0,
95
+ color: n.color ? D(n.color) : S.value[u] || i[u] || i[u % i.length]
96
+ }));
97
+ function L() {
98
+ y += o / t, y < o ? (b.value = b.value.map((n, u) => ({
99
+ ...n,
100
+ value: Math.min(n.value + l[u], a[u]),
101
+ color: n.color ? D(n.color) : S.value[u] || i[u] || i[u % i.length]
102
+ })), requestAnimationFrame(L)) : (w.value = !1, b.value = m.value.map((n, u) => ({
103
+ ...n,
104
+ value: a[u],
105
+ color: n.color ? D(n.color) : S.value[u] || i[u] || i[u % i.length],
106
+ id: le()
107
+ })));
108
+ }
109
+ L();
110
+ }
111
+ J(() => {
112
+ Y();
113
+ });
114
+ const W = $(() => e.value.debug);
115
+ function Y() {
116
+ Ae(_.dataset) ? oe({
117
+ componentName: "VueUiSparkStackbar",
118
+ type: "dataset",
119
+ debug: W.value
120
+ }) : _.dataset.forEach((t, a) => {
121
+ Fe({
122
+ datasetObject: t,
123
+ requiredAttributes: ["name", "value"]
124
+ }).forEach((l) => {
125
+ oe({
126
+ componentName: "VueUiSparkStackbar",
127
+ type: "datasetSerieAttribute",
128
+ property: l,
129
+ index: a,
130
+ debug: W.value
131
+ });
132
+ });
133
+ }), G();
134
+ }
135
+ const g = v({
136
+ width: 500,
137
+ height: 16
138
+ }), f = v([]), q = $(() => m.value.map((t) => t.value || 0).filter((t, a) => !f.value.includes(a)).reduce((t, a) => t + a, 0)), P = $(() => b.value.map((t, a) => {
139
+ const l = t.value || 0, o = l / q.value, y = isNaN(o) ? 0 : o, L = y * g.value.width;
140
+ return {
141
+ ...t,
142
+ value: l,
143
+ proportion: y,
144
+ width: L,
145
+ seriesIndex: a,
146
+ proportionLabel: U({
147
+ v: y * 100,
148
+ s: "%",
149
+ r: e.value.style.legend.percentage.rounding
150
+ })
151
+ };
152
+ })), O = $(() => P.value.filter((t, a) => !f.value.includes(a)));
153
+ function fe(t) {
154
+ f.value.includes(t) ? f.value = f.value.filter((a) => a !== t) : f.value.length < b.value.length - 1 && f.value.push(t);
155
+ }
156
+ const z = $(() => {
157
+ let t = 0;
158
+ const a = [];
159
+ for (let l = 0; l < O.value.length; l += 1)
160
+ a.push({
161
+ ...O.value[l],
162
+ start: t
163
+ }), t += O.value[l].width;
164
+ return a;
165
+ }), he = ie;
166
+ function H(t, a, l = !1) {
167
+ he("selectDatapoint", { datapoint: t, index: a }), e.value.events.datapointClick && !l && e.value.events.datapointClick({ datapoint: t, seriesIndex: t.seriesIndex });
168
+ }
169
+ const V = v(null), B = v(!1), C = v(null);
170
+ function ye({ datapoint: t, seriesIndex: a }) {
171
+ T.value = !1, C.value = null, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: t.seriesIndex });
172
+ }
173
+ function me({ datapoint: t, seriesIndex: a }) {
174
+ if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: t.seriesIndex }), !e.value.style.tooltip.show)
175
+ return;
176
+ V.value = { datapoint: t, seriesIndex: a, config: e.value, series: P.value }, T.value = !0, C.value = a;
177
+ const l = e.value.style.tooltip.customFormat;
178
+ if (Ie(l))
179
+ try {
180
+ const o = l({
181
+ seriesIndex: t.seriesIndex,
182
+ datapoint: t,
183
+ series: P.value,
184
+ config: e.value
185
+ });
186
+ typeof o == "string" && (E.value = o, B.value = !0);
187
+ } catch {
188
+ console.warn("Custom format cannot be applied."), B.value = !1;
189
+ }
190
+ if (!B.value) {
191
+ let o = "";
192
+ o += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`, o += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`, o += `<b>${t.proportionLabel}</b>`, o += `<span>(${re(
193
+ e.value.style.legend.value.formatter,
194
+ t.value,
195
+ U({
196
+ p: e.value.style.legend.value.prefix,
197
+ v: t.value,
198
+ s: e.value.style.legend.value.suffix,
199
+ r: e.value.style.legend.value.rounding
200
+ }),
201
+ {
202
+ datapoint: t,
203
+ seriesIndex: a
204
+ }
205
+ )})</span>`, E.value = `<div>${o}</div>`;
206
+ }
207
+ }
208
+ return (t, a) => (s(), r("div", {
209
+ class: "vue-ui-spark-stackbar",
210
+ ref_key: "sparkstackbarChart",
211
+ ref: j,
212
+ style: p(`width:100%; background:${e.value.style.backgroundColor}`)
213
+ }, [
214
+ e.value.style.title.text ? (s(), r("div", {
215
+ key: 0,
216
+ style: p(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${e.value.style.title.margin};padding: 0 6px;text-align:${e.value.style.title.textAlign}`)
217
+ }, [
218
+ d("div", {
219
+ class: "atom-title",
220
+ style: p(`font-size:${e.value.style.title.fontSize}px;color:${e.value.style.title.color};font-weight:${e.value.style.title.bold ? "bold" : "normal"}`)
221
+ }, A(e.value.style.title.text), 5),
222
+ e.value.style.title.subtitle.text ? (s(), r("div", {
223
+ key: 0,
224
+ class: "atom-subtitle",
225
+ style: p(`font-size:${e.value.style.title.subtitle.fontSize}px;color:${e.value.style.title.subtitle.color};font-weight:${e.value.style.title.subtitle.bold ? "bold" : "normal"}`)
226
+ }, A(e.value.style.title.subtitle.text), 5)) : h("", !0)
227
+ ], 4)) : h("", !0),
228
+ (s(), r("svg", {
229
+ ref_key: "svgRef",
230
+ ref: ge,
231
+ xmlns: c(De),
232
+ width: "100%",
233
+ viewBox: `0 0 ${g.value.width} ${g.value.height}`
234
+ }, [
235
+ Q(c(ce)),
236
+ d("defs", null, [
237
+ (s(!0), r(k, null, F(z.value, (l, o) => (s(), r("linearGradient", {
238
+ key: `stack_gradient_${o}`,
239
+ gradientTransform: "rotate(90)",
240
+ id: `stack_gradient_${o}_${I.value}`
241
+ }, [
242
+ d("stop", {
243
+ offset: "0%",
244
+ "stop-color": l.color
245
+ }, null, 8, Ee),
246
+ d("stop", {
247
+ offset: "50%",
248
+ "stop-color": c(ae)(c(se)(l.color, 0.05), 100 - e.value.style.bar.gradient.intensity)
249
+ }, null, 8, Me),
250
+ d("stop", {
251
+ offset: "100%",
252
+ "stop-color": l.color
253
+ }, null, 8, Oe)
254
+ ], 8, Te))), 128)),
255
+ d("clipPath", Ve, [
256
+ d("rect", {
257
+ x: "0.005",
258
+ y: "-2",
259
+ width: "0.99",
260
+ height: "5",
261
+ rx: "3",
262
+ ry: "3",
263
+ fill: e.value.style.backgroundColor
264
+ }, null, 8, Re)
265
+ ])
266
+ ]),
267
+ q.value > 0 ? (s(), r("g", Ue, [
268
+ (s(!0), r(k, null, F(z.value, (l, o) => (s(), r("rect", {
269
+ key: `stack_underlayer_${o}`,
270
+ x: l.start,
271
+ y: 0,
272
+ width: l.width,
273
+ height: g.value.height,
274
+ fill: e.value.style.bar.gradient.underlayerColor,
275
+ class: N({ animated: !w.value && !c(x) }),
276
+ style: p({
277
+ opacity: C.value !== null && e.value.style.tooltip.show ? C.value === o ? 1 : 0.5 : 1
278
+ })
279
+ }, null, 14, je))), 128)),
280
+ (s(!0), r(k, null, F(z.value, (l, o) => (s(), r("rect", {
281
+ key: `stack_${o}`,
282
+ x: l.start,
283
+ y: 0,
284
+ width: l.width,
285
+ height: g.value.height,
286
+ fill: e.value.style.bar.gradient.show ? `url(#stack_gradient_${o}_${I.value})` : l.color,
287
+ stroke: e.value.style.backgroundColor,
288
+ "stroke-linecap": "round",
289
+ class: N({ animated: !w.value && !c(x) }),
290
+ style: p({
291
+ opacity: C.value !== null && e.value.style.tooltip.show ? C.value === o ? 1 : 0.5 : 1
292
+ })
293
+ }, null, 14, Ge))), 128)),
294
+ (s(!0), r(k, null, F(z.value, (l, o) => (s(), r("rect", {
295
+ key: `stack_trap_${o}`,
296
+ x: l.start,
297
+ y: 0,
298
+ width: l.width,
299
+ height: g.value.height,
300
+ fill: "transparent",
301
+ stroke: "none",
302
+ class: N({ animated: !w.value && !c(x) }),
303
+ onClick: () => H(l, o),
304
+ onMouseenter: () => me({ datapoint: l, seriesIndex: o }),
305
+ onMouseleave: (y) => ye({ datapoint: l, seriesIndex: o })
306
+ }, null, 42, We))), 128))
307
+ ])) : (s(), r("rect", {
308
+ key: 1,
309
+ x: 2,
310
+ y: 1,
311
+ width: g.value.width - 4,
312
+ height: g.value.height - 2,
313
+ stroke: "#CCCCCC",
314
+ "stroke-width": "2",
315
+ fill: "transparent",
316
+ rx: (g.value.height - 4) / 2
317
+ }, null, 8, Ye))
318
+ ], 8, Ne)),
319
+ e.value.style.legend.show ? (s(), r("div", {
320
+ key: 1,
321
+ style: p(`background:transparent;margin:0 auto;margin:${e.value.style.legend.margin};justify-content:${e.value.style.legend.textAlign === "left" ? "flex-start" : e.value.style.legend.textAlign === "right" ? "flex-end" : "center"}`),
322
+ class: "vue-ui-sparkstackbar-legend"
323
+ }, [
324
+ (s(!0), r(k, null, F(P.value, (l, o) => (s(), r("div", {
325
+ style: p(`font-size:${e.value.style.legend.fontSize}px;`),
326
+ class: N({ "vue-ui-sparkstackbar-legend-item": !0, "vue-ui-sparkstackbar-legend-item-unselected": f.value.includes(o) }),
327
+ onClick: (y) => {
328
+ fe(o), H(l, o, !0);
329
+ }
330
+ }, [
331
+ d("div", He, [
332
+ (s(), r("svg", {
333
+ height: `${e.value.style.legend.fontSize}px`,
334
+ width: `${e.value.style.legend.fontSize}px`,
335
+ viewBox: "0 0 10 10"
336
+ }, [
337
+ d("defs", null, [
338
+ d("radialGradient", {
339
+ id: `legend_grad_${o}-${I.value}`
340
+ }, [
341
+ d("stop", {
342
+ offset: "0%",
343
+ "stop-color": c(x) ? "#FFFFFF" : c(ae)(c(se)(l.color, 0.05), 100 - e.value.style.bar.gradient.intensity)
344
+ }, null, 8, Ke),
345
+ d("stop", {
346
+ offset: "100%",
347
+ "stop-color": l.color
348
+ }, null, 8, Qe)
349
+ ], 8, Je)
350
+ ]),
351
+ d("circle", {
352
+ cx: 5,
353
+ cy: 5,
354
+ r: 5,
355
+ fill: e.value.style.bar.gradient.show ? `url(#legend_grad_${o}-${I.value})` : l.color
356
+ }, null, 8, Ze)
357
+ ], 8, Xe)),
358
+ c(x) ? h("", !0) : (s(), r(k, { key: 0 }, [
359
+ d("span", {
360
+ style: p(`color:${e.value.style.legend.name.color}; font-weight:${e.value.style.legend.name.bold ? "bold" : "normal"}`)
361
+ }, A(l.name), 5),
362
+ w.value ? h("", !0) : (s(), r(k, { key: 0 }, [
363
+ e.value.style.legend.percentage.show ? (s(), r("span", {
364
+ key: 0,
365
+ style: p(`font-weight:${e.value.style.legend.percentage.bold ? "bold" : "normal"};color:${e.value.style.legend.percentage.color}`)
366
+ }, A(f.value.includes(o) ? " - " : l.proportionLabel), 5)) : h("", !0),
367
+ e.value.style.legend.value.show ? (s(), r("span", {
368
+ key: 1,
369
+ style: p(`font-weight:${e.value.style.legend.value.bold ? "bold" : "normal"};color:${e.value.style.legend.value.color}`)
370
+ }, " (" + A(c(re)(
371
+ e.value.style.legend.value.formatter,
372
+ l.value,
373
+ c(U)({
374
+ p: e.value.style.legend.value.prefix,
375
+ v: l.value,
376
+ s: e.value.style.legend.value.suffix,
377
+ r: e.value.style.legend.value.rounding
378
+ }),
379
+ { datapoint: l, seriesIndex: o }
380
+ )) + ") ", 5)) : h("", !0)
381
+ ], 64))
382
+ ], 64))
383
+ ])
384
+ ], 14, qe))), 256))
385
+ ], 4)) : h("", !0),
386
+ Q(c(de), {
387
+ show: T.value && e.value.style.tooltip.show,
388
+ parent: j.value,
389
+ backgroundColor: e.value.style.tooltip.backgroundColor,
390
+ color: e.value.style.tooltip.color,
391
+ fontSize: e.value.style.tooltip.fontSize,
392
+ borderRadius: e.value.style.tooltip.borderRadius,
393
+ borderColor: e.value.style.tooltip.borderColor,
394
+ borderWidth: e.value.style.tooltip.borderWidth,
395
+ backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
396
+ position: e.value.style.tooltip.position,
397
+ content: E.value,
398
+ isCustom: B.value,
399
+ offsetY: -124 + e.value.style.tooltip.offsetY,
400
+ blockShiftY: !0,
401
+ smooth: e.value.style.tooltip.smooth,
402
+ backdropFilter: e.value.style.tooltip.backdropFilter
403
+ }, {
404
+ "tooltip-before": Z(() => [
405
+ R(t.$slots, "tooltip-before", ee(te({ ...V.value })), void 0, !0)
406
+ ]),
407
+ "tooltip-after": Z(() => [
408
+ R(t.$slots, "tooltip-after", ee(te({ ...V.value })), void 0, !0)
409
+ ]),
410
+ _: 3
411
+ }, 8, ["show", "parent", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "content", "isCustom", "offsetY", "smooth", "backdropFilter"]),
412
+ t.$slots.source ? (s(), r("div", et, [
413
+ R(t.$slots, "source", {}, void 0, !0)
414
+ ], 512)) : h("", !0),
415
+ c(x) ? (s(), _e(Be, { key: 3 })) : h("", !0)
416
+ ], 4));
417
+ }
418
+ }, ut = /* @__PURE__ */ Le(tt, [["__scopeId", "data-v-6ef55310"]]);
419
+ export {
420
+ ut as default
421
+ };