vue-data-ui 3.0.0-next.6 → 3.0.0-next.61

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 (126) hide show
  1. package/dist/{Arrow-Ul64M9UV.js → Arrow-CTQyTL3_.js} +1 -1
  2. package/dist/{BaseDraggableDialog-Q2ajCztp.js → BaseDraggableDialog-BmcSbNWl.js} +2 -2
  3. package/dist/{BaseIcon-BKR7AGeP.js → BaseIcon-E-K7hXbm.js} +1 -1
  4. package/dist/{ColorPicker-BagIs8-K.js → ColorPicker-BZSE2TU-.js} +2 -2
  5. package/dist/{DataTable-CDwApkI_.js → DataTable-B5DjuhMR.js} +2 -2
  6. package/dist/{Legend-BSLj7tYc.js → Legend-zE2FGq08.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DjJe5fXu.js → NonSvgPenAndPaper-DI_RgDTc.js} +3 -3
  8. package/dist/{PackageVersion-BsKpz6KS.js → PackageVersion-Bdp5L-7L.js} +1 -1
  9. package/dist/{PenAndPaper-BYRk8xrS.js → PenAndPaper-AGK10PP8.js} +3 -3
  10. package/dist/{Shape-DK7zYTKa.js → Shape-WLqGGUwB.js} +43 -37
  11. package/dist/Slicer-BztBbYcP.js +602 -0
  12. package/dist/{SparkTooltip-Dy2sVTb_.js → SparkTooltip-DJJKq5GE.js} +1 -1
  13. package/dist/{Title-Cednydse.js → Title-C6NLfPnz.js} +1 -1
  14. package/dist/{Tooltip-DJlwW-XP.js → Tooltip-p-yn5Kd2.js} +23 -19
  15. package/dist/{UserOptions-DxIzWere.js → UserOptions-DWW9T1IK.js} +2 -2
  16. package/dist/{dom-to-png-lZcM-YfK.js → dom-to-png-4P9Z65Z4.js} +1 -1
  17. package/dist/{img-DqlIAUF6.js → img-fg88maiR.js} +1 -1
  18. package/dist/{index-BQcLOx39.js → index-BRenDuve.js} +1732 -1135
  19. package/dist/{pdf-CjIXhsyg.js → pdf-BuhR1JTC.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +493 -21
  22. package/dist/types/vue-data-ui.d.ts +493 -21
  23. package/dist/useAutoSizeLabelsInsideViewbox-BkBqjBrr.js +41 -0
  24. package/dist/useNestedProp-iKx-oGDH.js +13 -0
  25. package/dist/usePanZoom-BVca3eMk.js +122 -0
  26. package/dist/{usePrinter-BRY5saEA.js → usePrinter-Co_j432s.js} +2 -2
  27. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  28. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  29. package/dist/{vue-data-ui-CWRlSsiN.js → vue-data-ui-CUDfDclz.js} +105 -100
  30. package/dist/vue-data-ui.js +23 -22
  31. package/dist/vue-ui-3d-bar-DWL8tnZS.js +1323 -0
  32. package/dist/{vue-ui-accordion-Df-5BRRg.js → vue-ui-accordion-CYDiGhBw.js} +3 -3
  33. package/dist/vue-ui-age-pyramid-d31eHPpI.js +834 -0
  34. package/dist/{vue-ui-annotator-BxC5dcIv.js → vue-ui-annotator-dkOqfvKt.js} +2 -2
  35. package/dist/vue-ui-bullet-D4tBc3eh.js +571 -0
  36. package/dist/vue-ui-candlestick-GoQ4LBVC.js +999 -0
  37. package/dist/{vue-ui-carousel-table-NTDzafWQ.js → vue-ui-carousel-table-Bp3MJfzX.js} +29 -29
  38. package/dist/{vue-ui-chestnut-k21Qqjjq.js → vue-ui-chestnut-D3fzDYcV.js} +5 -5
  39. package/dist/{vue-ui-chord-BVoA6nfI.js → vue-ui-chord-CntRIJ55.js} +8 -8
  40. package/dist/{vue-ui-circle-pack-CEBgImRX.js → vue-ui-circle-pack-BMuynHUs.js} +24 -24
  41. package/dist/{vue-ui-cursor-BQcz8xw2.js → vue-ui-cursor-KR7TU5mQ.js} +2 -2
  42. package/dist/{vue-ui-dashboard-CyzEpJoI.js → vue-ui-dashboard-C6OQIu4w.js} +62 -62
  43. package/dist/{vue-ui-digits-Dafw1UsT.js → vue-ui-digits-6KV8lh1Q.js} +2 -2
  44. package/dist/{vue-ui-donut-DKfux8XT.js → vue-ui-donut-Dg0b9Sag.js} +320 -308
  45. package/dist/vue-ui-donut-evolution-BqDGpZwn.js +1075 -0
  46. package/dist/vue-ui-dumbbell-BvTH-vpa.js +1119 -0
  47. package/dist/vue-ui-flow-DY0brMkH.js +841 -0
  48. package/dist/{vue-ui-funnel-CuN8HWwP.js → vue-ui-funnel-Z2nxFAoy.js} +16 -16
  49. package/dist/{vue-ui-galaxy-BHCLFlmy.js → vue-ui-galaxy-Dho2szS3.js} +60 -58
  50. package/dist/vue-ui-gauge-0FV4JwS3.js +791 -0
  51. package/dist/{vue-ui-gizmo-DHEEfdp9.js → vue-ui-gizmo-CxuU2BQY.js} +3 -3
  52. package/dist/vue-ui-heatmap-FFmRSZ9u.js +1078 -0
  53. package/dist/vue-ui-history-plot-CUH155Yu.js +1073 -0
  54. package/dist/{vue-ui-kpi-C4i2w_Yd.js → vue-ui-kpi-Dmpm_ZZb.js} +7 -7
  55. package/dist/{vue-ui-mini-loader-BeetGv_m.js → vue-ui-mini-loader-DPsQQimr.js} +2 -2
  56. package/dist/{vue-ui-molecule-F_gDXjJr.js → vue-ui-molecule-BNSTyoBk.js} +53 -51
  57. package/dist/{vue-ui-mood-radar-BJMOEqlu.js → vue-ui-mood-radar-Db-qlLKm.js} +15 -15
  58. package/dist/vue-ui-nested-donuts-BMECUS7j.js +1286 -0
  59. package/dist/vue-ui-onion-CARHtDjI.js +776 -0
  60. package/dist/vue-ui-parallel-coordinate-plot-C7pL6x10.js +915 -0
  61. package/dist/{vue-ui-quadrant-DTyRC1_v.js → vue-ui-quadrant-BdtVr-y2.js} +59 -57
  62. package/dist/vue-ui-quick-chart-D7uobNWx.js +1761 -0
  63. package/dist/{vue-ui-radar-De2iznwo.js → vue-ui-radar-VoD-Lot7.js} +30 -28
  64. package/dist/{vue-ui-rating-CarXXyD-.js → vue-ui-rating-DZ89nAiD.js} +2 -2
  65. package/dist/{vue-ui-relation-circle-CKkK9D4E.js → vue-ui-relation-circle-B2z8YXgB.js} +6 -6
  66. package/dist/vue-ui-ridgeline-DfFSJ747.js +1153 -0
  67. package/dist/vue-ui-rings-Dyt5QafW.js +728 -0
  68. package/dist/vue-ui-scatter-BFFRDlp-.js +1178 -0
  69. package/dist/{vue-ui-skeleton-C7maR60-.js → vue-ui-skeleton-DU2RLC8J.js} +3 -3
  70. package/dist/{vue-ui-smiley-DzCCn5Oc.js → vue-ui-smiley-Bud0unLv.js} +26 -26
  71. package/dist/{vue-ui-spark-trend-Db-Fnp8C.js → vue-ui-spark-trend-BD6UWRMn.js} +3 -3
  72. package/dist/vue-ui-sparkbar-I4wpToMO.js +351 -0
  73. package/dist/{vue-ui-sparkgauge-DAQ4zozy.js → vue-ui-sparkgauge-Dih6jl_u.js} +3 -3
  74. package/dist/vue-ui-sparkhistogram-DBJcd-6V.js +444 -0
  75. package/dist/vue-ui-sparkline-B64MPZBB.js +489 -0
  76. package/dist/vue-ui-sparkstackbar-CtdHM2gY.js +421 -0
  77. package/dist/vue-ui-stackbar-Bee1NxIb.js +1370 -0
  78. package/dist/vue-ui-strip-plot-CmC5Byn1.js +915 -0
  79. package/dist/{vue-ui-table-Dck8Pyg9.js → vue-ui-table-DyScQo_p.js} +11 -11
  80. package/dist/{vue-ui-table-heatmap-DknIGf9_.js → vue-ui-table-heatmap-DLtEbgnG.js} +5 -5
  81. package/dist/{vue-ui-table-sparkline-G4HAzUt6.js → vue-ui-table-sparkline-CSOSu5lF.js} +14 -14
  82. package/dist/vue-ui-thermometer-DvWCyvgp.js +541 -0
  83. package/dist/{vue-ui-timer-Dmr-HCSc.js → vue-ui-timer-DIe7TbGV.js} +5 -5
  84. package/dist/vue-ui-tiremarks-DFAFKdig.js +406 -0
  85. package/dist/vue-ui-treemap-Car9RQI6.js +1035 -0
  86. package/dist/{vue-ui-vertical-bar--QFtoFje.js → vue-ui-vertical-bar-I05hhnAv.js} +318 -302
  87. package/dist/vue-ui-waffle-DyY-UYli.js +910 -0
  88. package/dist/vue-ui-wheel-Bb4GPN1q.js +379 -0
  89. package/dist/vue-ui-word-cloud-8Xl-ixz8.js +765 -0
  90. package/dist/{vue-ui-world-BcK_brDq.js → vue-ui-world-DpgHCDon.js} +11 -9
  91. package/dist/vue-ui-xy-B5GeHpC1.js +3760 -0
  92. package/dist/{vue-ui-xy-canvas--88oKdGN.js → vue-ui-xy-canvas-CJpbS5qD.js} +265 -264
  93. package/package.json +1 -1
  94. package/dist/Slicer-B_Hb6qSk.js +0 -577
  95. package/dist/useNestedProp-DefBVltl.js +0 -13
  96. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  97. package/dist/vue-ui-3d-bar-CJMZqDo1.js +0 -1227
  98. package/dist/vue-ui-age-pyramid-B6WAMtPk.js +0 -746
  99. package/dist/vue-ui-bullet-NmtltFbU.js +0 -513
  100. package/dist/vue-ui-candlestick-BzqQtynP.js +0 -873
  101. package/dist/vue-ui-donut-evolution-D7cNk_6l.js +0 -903
  102. package/dist/vue-ui-dumbbell--H80zebk.js +0 -753
  103. package/dist/vue-ui-flow-lk_HU5NB.js +0 -765
  104. package/dist/vue-ui-gauge-DWlCh2_B.js +0 -738
  105. package/dist/vue-ui-heatmap-BK6BNOY_.js +0 -877
  106. package/dist/vue-ui-history-plot-CGF6lE-7.js +0 -924
  107. package/dist/vue-ui-nested-donuts-BX0Z0rb1.js +0 -1177
  108. package/dist/vue-ui-onion-BhjUET_W.js +0 -701
  109. package/dist/vue-ui-parallel-coordinate-plot-n7QPVLrW.js +0 -807
  110. package/dist/vue-ui-quick-chart-5xX-yBIY.js +0 -1612
  111. package/dist/vue-ui-ridgeline-DQ8RQf3E.js +0 -969
  112. package/dist/vue-ui-rings-Cze6OsmO.js +0 -685
  113. package/dist/vue-ui-scatter-CwI3_Dn7.js +0 -1045
  114. package/dist/vue-ui-sparkbar-C6wsNMMO.js +0 -301
  115. package/dist/vue-ui-sparkhistogram-CMEaO0CW.js +0 -313
  116. package/dist/vue-ui-sparkline-R7pfxRWN.js +0 -459
  117. package/dist/vue-ui-sparkstackbar-DV_XqJQ2.js +0 -381
  118. package/dist/vue-ui-stackbar-gReSujA_.js +0 -1207
  119. package/dist/vue-ui-strip-plot-8fsm3nn2.js +0 -761
  120. package/dist/vue-ui-thermometer-BIkXa4hY.js +0 -495
  121. package/dist/vue-ui-tiremarks-YWbRk0dm.js +0 -358
  122. package/dist/vue-ui-treemap-D2OnG3Fh.js +0 -965
  123. package/dist/vue-ui-waffle-BdaCXuWc.js +0 -863
  124. package/dist/vue-ui-wheel-Bw3XSa8N.js +0 -352
  125. package/dist/vue-ui-word-cloud-BH8UZH_J.js +0 -659
  126. package/dist/vue-ui-xy-Be--zwe9.js +0 -2980
@@ -0,0 +1,444 @@
1
+ import { nextTick as Q, useCssVars as ge, computed as F, defineAsyncComponent as be, ref as p, toRefs as me, onMounted as Z, watch as ee, createElementBlock as o, openBlock as a, normalizeStyle as R, createCommentVNode as h, createBlock as te, createElementVNode as m, createTextVNode as _e, toDisplayString as A, unref as d, createVNode as xe, renderSlot as le, Fragment as f, renderList as g, normalizeClass as ae } from "vue";
2
+ import { u as ke, c as Ce, t as Ae, b as we, o as ze, f as se, g as Se, s as w, k as oe, i as ie, X as $e, x as K } from "./index-BRenDuve.js";
3
+ import { t as Le, u as Me } from "./useResponsive-DfdjqQps.js";
4
+ import { u as Fe, B as Ne } from "./useLoading-Bt5Doa8m.js";
5
+ import { u as ne } from "./useNestedProp-iKx-oGDH.js";
6
+ import { u as Te } from "./useChartAccessibility-9icAAmYg.js";
7
+ import { _ as Ee } from "./Shape-WLqGGUwB.js";
8
+ import { _ as Ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
+ function De({
10
+ svgRef: U,
11
+ unitWidth: X,
12
+ fontSize: j = 12,
13
+ step: q = 0.5,
14
+ maxIterations: _ = 60,
15
+ hideUnderMin: x = !0
16
+ }) {
17
+ const S = /* @__PURE__ */ new WeakMap(), N = (i) => {
18
+ if (typeof i == "number") return i;
19
+ if (!i) return NaN;
20
+ const c = parseFloat(String(i).replace("px", ""));
21
+ return Number.isFinite(c) ? c : NaN;
22
+ }, $ = (i) => {
23
+ const c = N(i.getAttribute("font-size"));
24
+ if (Number.isFinite(c)) return c;
25
+ const k = window.getComputedStyle(i);
26
+ return N(k.fontSize) || j;
27
+ }, y = (i, c) => {
28
+ i.setAttribute("font-size", String(c));
29
+ }, L = (i) => {
30
+ if (S.has(i))
31
+ y(i, S.get(i));
32
+ else {
33
+ const c = $(i);
34
+ S.set(i, c), y(i, c);
35
+ }
36
+ }, e = (i) => {
37
+ try {
38
+ return i.getBBox().width || 0;
39
+ } catch {
40
+ return 0;
41
+ }
42
+ };
43
+ return {
44
+ fitText: async (i, c = 6) => {
45
+ await Q();
46
+ const k = U?.value;
47
+ if (!k) return;
48
+ const T = k.querySelectorAll(i);
49
+ if (!T.length) return;
50
+ const C = Math.max(0, X.value);
51
+ if (C <= 0) return;
52
+ const z = [];
53
+ T.forEach((s) => {
54
+ const E = s.style.display, W = s.style.opacity;
55
+ s.style.display = "", s.style.opacity = "0", L(s);
56
+ let r = e(s), I = $(s), v = I, B = 0;
57
+ if (r <= C)
58
+ z.push({ el: s, finalSize: I, fits: !0 });
59
+ else {
60
+ for (; r > C && v > c && B < _; )
61
+ v = Math.max(c, v - q), y(s, v), r = e(s), B += 1;
62
+ const P = r <= C && v > c;
63
+ z.push({ el: s, finalSize: v, fits: P }), y(s, I);
64
+ }
65
+ s.style.display = E, s.style.opacity = W;
66
+ });
67
+ const D = x && z.some((s) => !s.fits);
68
+ z.forEach(({ el: s, finalSize: E, fits: W }) => {
69
+ D ? s.style.display = "none" : (s.style.display = "", y(s, E));
70
+ });
71
+ }
72
+ };
73
+ }
74
+ const We = { key: 0 }, Be = { key: 1 }, He = ["xmlns", "viewBox"], Oe = ["width", "height"], Ve = ["id"], Re = ["stop-color"], Ue = ["stop-color"], Xe = ["id"], je = ["stop-color"], qe = ["stop-color"], Ge = ["id"], Pe = ["stop-color"], Ye = ["stop-color"], Je = ["height", "width", "fill", "x", "stroke", "stroke-width", "rx", "stroke-dasharray"], Ke = { key: 1 }, Qe = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], Ze = { key: 2 }, et = ["x", "y", "font-size", "font-weight", "fill"], tt = ["x", "y", "font-size", "fill"], lt = ["x", "y", "font-size", "fill"], at = ["height", "width", "x", "onMouseover", "onMouseleave", "onClick"], st = {
75
+ __name: "vue-ui-sparkhistogram",
76
+ props: {
77
+ config: {
78
+ type: Object,
79
+ default() {
80
+ return {};
81
+ }
82
+ },
83
+ dataset: {
84
+ type: Array,
85
+ default() {
86
+ return [];
87
+ }
88
+ }
89
+ },
90
+ emits: ["selectDatapoint"],
91
+ setup(U, { emit: X }) {
92
+ ge((l) => ({
93
+ c8e2d1ee: ve.value
94
+ }));
95
+ const j = be(() => import("./PackageVersion-Bdp5L-7L.js")), { vue_ui_sparkhistogram: q } = ke(), _ = U, x = p(Ce()), S = p(null), N = p(null), $ = p(null), y = p(null), L = p(null), e = p(C()), { loading: G, FINAL_DATASET: i } = Fe({
96
+ ...me(_),
97
+ FINAL_CONFIG: e,
98
+ prepareConfig: C,
99
+ skeletonDataset: [
100
+ { value: 1, intensity: 0.2, color: "#CACACA" },
101
+ { value: 2, intensity: 0.3, color: "#CACACA" },
102
+ { value: 3, intensity: 0.5, color: "#CACACA" },
103
+ { value: 5, intensity: 0.7, color: "#CACACA" },
104
+ { value: 8, intensity: 0.9, color: "#CACACA" },
105
+ { value: 13, intensity: 0.95, color: "#CACACA" },
106
+ { value: 21, intensity: 1, color: "#CACACA" },
107
+ { value: 13, intensity: 0.95, color: "#CACACA" },
108
+ { value: 8, intensity: 0.9, color: "#CACACA" },
109
+ { value: 5, intensity: 0.7, color: "#CACACA" },
110
+ { value: 3, intensity: 0.5, color: "#CACACA" },
111
+ { value: 2, intensity: 0.3, color: "#CACACA" },
112
+ { value: 1, intensity: 0.2, color: "#CACACA" }
113
+ ],
114
+ skeletonConfig: Ae({
115
+ defaultConfig: e.value,
116
+ userConfig: {
117
+ style: {
118
+ animation: { show: !1 },
119
+ backgroundColor: "#99999930"
120
+ }
121
+ }
122
+ })
123
+ }), c = p(e.value.style.layout.width), k = p(e.value.style.layout.height), { svgRef: T } = Te({ config: e.value.style.title });
124
+ function C() {
125
+ const l = ne({
126
+ userConfig: _.config,
127
+ defaultConfig: q
128
+ });
129
+ return l.theme ? {
130
+ ...ne({
131
+ userConfig: we.vue_ui_sparkhistogram[l.theme] || _.config,
132
+ defaultConfig: l
133
+ })
134
+ } : l;
135
+ }
136
+ Z(() => {
137
+ D();
138
+ });
139
+ const z = F(() => !!e.value.debug);
140
+ function D() {
141
+ if (ze(_.dataset) ? se({
142
+ componentName: "VueUiSparkHistogram",
143
+ type: "dataset",
144
+ debug: z.value
145
+ }) : _.dataset.forEach((l, n) => {
146
+ Se({
147
+ datasetObject: l,
148
+ requiredAttributes: ["value"]
149
+ }).forEach((t) => {
150
+ se({
151
+ componentName: "VueUiSparkHistogram",
152
+ type: "datasetSerieAttribute",
153
+ property: t,
154
+ index: n,
155
+ debug: z.value
156
+ });
157
+ });
158
+ }), e.value.responsive) {
159
+ const l = Le(() => {
160
+ const { width: n, height: t } = Me({
161
+ chart: $.value,
162
+ title: e.value.style.title.text ? N.value : null,
163
+ source: S.value
164
+ });
165
+ requestAnimationFrame(() => {
166
+ c.value = Math.max(10, n), k.value = Math.max(10, t - 12);
167
+ });
168
+ });
169
+ y.value && (L.value && y.value.unobserve(L.value), y.value.disconnect()), y.value = new ResizeObserver(l), L.value = $.value.parentNode, y.value.observe(L.value);
170
+ }
171
+ }
172
+ ee(() => _.config, (l) => {
173
+ e.value = C(), D();
174
+ }, { deep: !0 });
175
+ const s = F(() => {
176
+ const l = k.value, n = c.value, t = e.value.style.layout.padding.top, u = l - e.value.style.layout.padding.bottom, b = e.value.style.layout.padding.left, H = n - e.value.style.layout.padding.right, O = t + (l - t - e.value.style.layout.padding.bottom) / 2, Y = l - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom, V = n - e.value.style.layout.padding.left - e.value.style.layout.padding.right;
177
+ return {
178
+ bottom: u,
179
+ centerY: O,
180
+ drawingHeight: Y,
181
+ drawingWidth: V,
182
+ height: l,
183
+ left: b,
184
+ right: H,
185
+ top: t,
186
+ width: n
187
+ };
188
+ }), E = F(() => Math.max(...i.value.map((l) => Math.abs(l.value || 0))));
189
+ function W(l) {
190
+ return Math.abs(l) / E.value;
191
+ }
192
+ const r = F(() => i.value.map((l, n) => {
193
+ const t = W(l.value || 0), u = s.value.drawingHeight * t, b = s.value.drawingWidth / i.value.length, H = b * (e.value.style.bars.gap / 100), O = b - H, Y = s.value.centerY - u / 2, V = s.value.left + (H / 2 + n * b), de = s.value.left + n * b, J = typeof l.intensity > "u" ? 100 : Math.round(l.intensity * 100), ye = l.color ? l.color : l.value >= 0 ? w(e.value.style.bars.colors.positive, J) : w(e.value.style.bars.colors.negative, J), he = l.color ? l.color : l.value >= 0 ? e.value.style.bars.colors.positive : e.value.style.bars.colors.negative, fe = l.color ? `url(#gradient_datapoint_${n}_${x.value})` : l.value >= 0 ? `url(#gradient_positive_${n}_${x.value})` : `url(#gradient_negative_${n}_${x.value})`, pe = V + O / 2;
194
+ return {
195
+ ...l,
196
+ color: ye,
197
+ gradient: fe,
198
+ height: u,
199
+ intensity: J,
200
+ proportion: t,
201
+ stroke: he,
202
+ textAnchor: pe,
203
+ trapX: de,
204
+ unitWidth: b,
205
+ width: O,
206
+ x: V,
207
+ y: Y
208
+ };
209
+ }));
210
+ function I(l, n) {
211
+ return oe(
212
+ e.value.style.labels.value.formatter,
213
+ l.value,
214
+ ie({
215
+ p: e.value.style.labels.value.prefix,
216
+ v: l.value,
217
+ s: e.value.style.labels.value.suffix,
218
+ r: e.value.style.labels.value.rounding
219
+ }),
220
+ { datapoint: l, seriesIndex: n }
221
+ );
222
+ }
223
+ const v = p(null), B = X;
224
+ function P(l, n) {
225
+ B("selectDatapoint", { datapoint: l, index: n }), e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: n });
226
+ }
227
+ function ue(l, n) {
228
+ v.value = n, e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: l, seriesIndex: n });
229
+ }
230
+ function re(l, n) {
231
+ v.value = null, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: n });
232
+ }
233
+ const ve = F(() => `${e.value.style.animation.speedMs}ms`), ce = F(() => s.value.drawingWidth / i.value.length * 0.9), { fitText: M } = De({
234
+ svgRef: T,
235
+ unitWidth: ce
236
+ });
237
+ return Z(async () => {
238
+ await Q(), M(".vue-ui-sparkhistogram-top-label", e.value.style.labels.value.minFontSize), M(".vue-ui-sparkhistogram-bottom-label", e.value.style.labels.valueLabel.minFontSize), M(".vue-ui-sparkhistogram-time-label", e.value.style.labels.timeLabel.minFontSize);
239
+ }), ee([c, k, () => i.value], async () => {
240
+ await Q(), M(".vue-ui-sparkhistogram-top-label", e.value.style.labels.value.minFontSize), M(".vue-ui-sparkhistogram-bottom-label", e.value.style.labels.valueLabel.minFontSize), M(".vue-ui-sparkhistogram-time-label", e.value.style.labels.timeLabel.minFontSize);
241
+ }), (l, n) => (a(), o("div", {
242
+ class: "vue-ui-spark-histogram",
243
+ ref_key: "histogramChart",
244
+ ref: $,
245
+ style: R(`width:100%;background:${e.value.style.backgroundColor};font-family:${e.value.style.fontFamily}`),
246
+ onMouseleave: n[0] || (n[0] = (t) => v.value = null)
247
+ }, [
248
+ e.value.style.title.text ? (a(), o("div", {
249
+ key: 0,
250
+ ref_key: "chartTitle",
251
+ ref: N,
252
+ style: R(`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}`)
253
+ }, [
254
+ m("div", {
255
+ style: R(`font-size:${e.value.style.title.fontSize}px;color:${e.value.style.title.color};font-weight:${e.value.style.title.bold ? "bold" : "normal"}`)
256
+ }, [
257
+ _e(A(e.value.style.title.text) + " ", 1),
258
+ v.value !== null ? (a(), o("span", We, "- " + A(r.value[v.value].timeLabel || "") + " " + A(d(oe)(
259
+ e.value.style.labels.value.formatter,
260
+ r.value[v.value].value,
261
+ d(ie)({
262
+ p: e.value.style.labels.value.prefix,
263
+ v: r.value[v.value].value,
264
+ s: e.value.style.labels.value.suffix,
265
+ r: e.value.style.labels.value.rounding
266
+ }),
267
+ { datapoint: r.value[v.value], seriesIndex: v.value }
268
+ )), 1)) : h("", !0),
269
+ ![void 0, null].includes(v.value) && ![null, void 0].includes(r.value[v.value].valueLabel) ? (a(), o("span", Be, "(" + A(r.value[v.value].valueLabel || 0) + ")", 1)) : h("", !0)
270
+ ], 4),
271
+ e.value.style.title.subtitle.text ? (a(), o("div", {
272
+ key: 0,
273
+ style: R(`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"}`)
274
+ }, A(e.value.style.title.subtitle.text), 5)) : h("", !0)
275
+ ], 4)) : h("", !0),
276
+ (a(), o("svg", {
277
+ ref_key: "svgRef",
278
+ ref: T,
279
+ xmlns: d($e),
280
+ viewBox: `0 0 ${s.value.width} ${s.value.height}`,
281
+ style: { overflow: "visible" }
282
+ }, [
283
+ xe(d(j)),
284
+ l.$slots["chart-background"] ? (a(), o("foreignObject", {
285
+ key: 0,
286
+ x: 0,
287
+ y: 0,
288
+ width: s.value.width,
289
+ height: s.value.height,
290
+ style: {
291
+ pointerEvents: "none"
292
+ }
293
+ }, [
294
+ le(l.$slots, "chart-background", {}, void 0, !0)
295
+ ], 8, Oe)) : h("", !0),
296
+ m("defs", null, [
297
+ (a(!0), o(f, null, g(r.value, (t, u) => (a(), o("radialGradient", {
298
+ id: `gradient_positive_${u}_${x.value}`,
299
+ cy: "50%",
300
+ cx: "50%",
301
+ r: "50%",
302
+ fx: "50%",
303
+ fy: "50%"
304
+ }, [
305
+ m("stop", {
306
+ offset: "0%",
307
+ "stop-color": d(w)(d(K)(e.value.style.bars.colors.positive, 0.05), t.intensity)
308
+ }, null, 8, Re),
309
+ m("stop", {
310
+ offset: "100%",
311
+ "stop-color": d(w)(e.value.style.bars.colors.positive, t.intensity)
312
+ }, null, 8, Ue)
313
+ ], 8, Ve))), 256)),
314
+ (a(!0), o(f, null, g(r.value, (t, u) => (a(), o("radialGradient", {
315
+ id: `gradient_negative_${u}_${x.value}`,
316
+ cy: "50%",
317
+ cx: "50%",
318
+ r: "50%",
319
+ fx: "50%",
320
+ fy: "50%"
321
+ }, [
322
+ m("stop", {
323
+ offset: "0%",
324
+ "stop-color": d(w)(d(K)(e.value.style.bars.colors.negative, 0.05), t.intensity)
325
+ }, null, 8, je),
326
+ m("stop", {
327
+ offset: "100%",
328
+ "stop-color": d(w)(e.value.style.bars.colors.negative, t.intensity)
329
+ }, null, 8, qe)
330
+ ], 8, Xe))), 256)),
331
+ (a(!0), o(f, null, g(r.value, (t, u) => (a(), o("radialGradient", {
332
+ id: `gradient_datapoint_${u}_${x.value}`,
333
+ cy: "50%",
334
+ cx: "50%",
335
+ r: "50%",
336
+ fx: "50%",
337
+ fy: "50%"
338
+ }, [
339
+ m("stop", {
340
+ offset: "0%",
341
+ "stop-color": d(w)(d(K)(t.color, 0.05), t.intensity)
342
+ }, null, 8, Pe),
343
+ m("stop", {
344
+ offset: "100%",
345
+ "stop-color": d(w)(t.color, t.intensity)
346
+ }, null, 8, Ye)
347
+ ], 8, Ge))), 256))
348
+ ]),
349
+ (a(!0), o(f, null, g(r.value, (t, u) => (a(), o("g", null, [
350
+ v.value !== null && v.value === u ? (a(), o("rect", {
351
+ key: 0,
352
+ height: s.value.height,
353
+ width: t.unitWidth,
354
+ fill: e.value.style.selector.fill,
355
+ x: t.trapX,
356
+ y: 0,
357
+ stroke: e.value.style.selector.stroke,
358
+ "stroke-width": e.value.style.selector.strokeWidth,
359
+ rx: e.value.style.selector.borderRadius,
360
+ "stroke-dasharray": e.value.style.selector.strokeDasharray
361
+ }, null, 8, Je)) : h("", !0)
362
+ ]))), 256)),
363
+ !e.value.style.bars.shape || e.value.style.bars.shape === "square" ? (a(), o("g", Ke, [
364
+ (a(!0), o(f, null, g(r.value, (t, u) => (a(), o("rect", {
365
+ x: t.x,
366
+ y: t.y,
367
+ height: t.height,
368
+ width: t.width,
369
+ fill: e.value.style.bars.colors.gradient.show ? t.gradient : t.color,
370
+ stroke: t.stroke,
371
+ "stroke-width": e.value.style.bars.strokeWidth,
372
+ rx: `${e.value.style.bars.borderRadius * t.proportion / 12}%`,
373
+ class: ae({ "vue-ui-sparkhistogram-shape": e.value.style.animation.show })
374
+ }, null, 10, Qe))), 256))
375
+ ])) : (a(), o("g", Ze, [
376
+ (a(!0), o(f, null, g(r.value, (t, u) => (a(), te(Ee, {
377
+ plot: { x: t.x + t.width / 2, y: t.y + t.height / 2 },
378
+ color: e.value.style.bars.colors.gradient.show ? t.gradient : t.color,
379
+ shape: e.value.style.bars.shape,
380
+ radius: Math.min(t.height * 0.4, t.width * 0.4),
381
+ class: ae({ "vue-ui-sparkhistogram-shape": e.value.style.animation.show })
382
+ }, null, 8, ["plot", "color", "shape", "radius", "class"]))), 256))
383
+ ])),
384
+ d(G) ? h("", !0) : (a(), o(f, { key: 3 }, [
385
+ (a(!0), o(f, null, g(r.value, (t, u) => (a(), o("text", {
386
+ class: "vue-ui-sparkhistogram-top-label",
387
+ "text-anchor": "middle",
388
+ x: t.textAnchor,
389
+ y: t.y - e.value.style.labels.value.fontSize / 3 + e.value.style.labels.value.offsetY,
390
+ "font-size": e.value.style.labels.value.fontSize,
391
+ "font-weight": e.value.style.labels.value.bold ? "bold" : "normal",
392
+ fill: e.value.style.labels.value.color
393
+ }, A(I(t, u)), 9, et))), 256)),
394
+ (a(!0), o(f, null, g(r.value, (t, u) => (a(), o("g", null, [
395
+ t.valueLabel ? (a(), o("text", {
396
+ key: 0,
397
+ class: "vue-ui-sparkhistogram-bottom-label",
398
+ x: t.textAnchor,
399
+ y: t.y + t.height + e.value.style.labels.valueLabel.fontSize,
400
+ "font-size": e.value.style.labels.valueLabel.fontSize,
401
+ "text-anchor": "middle",
402
+ fill: e.value.style.labels.valueLabel.color
403
+ }, A(t.valueLabel), 9, tt)) : h("", !0)
404
+ ]))), 256)),
405
+ (a(!0), o(f, null, g(r.value, (t, u) => (a(), o("g", null, [
406
+ t.timeLabel ? (a(), o("text", {
407
+ key: 0,
408
+ class: "vue-ui-sparkhistogram-time-label",
409
+ x: t.textAnchor,
410
+ y: s.value.height - e.value.style.labels.timeLabel.fontSize / 2,
411
+ "font-size": e.value.style.labels.timeLabel.fontSize,
412
+ fill: e.value.style.labels.timeLabel.color,
413
+ "text-anchor": "middle"
414
+ }, A(t.timeLabel), 9, lt)) : h("", !0)
415
+ ]))), 256))
416
+ ], 64)),
417
+ (a(!0), o(f, null, g(r.value, (t, u) => (a(), o("g", null, [
418
+ m("rect", {
419
+ height: s.value.height,
420
+ width: t.unitWidth,
421
+ fill: "transparent",
422
+ x: t.trapX,
423
+ y: 0,
424
+ onMouseover: (b) => ue(t, u),
425
+ onMouseleave: (b) => re(t, u),
426
+ onClick: () => P(t, u)
427
+ }, null, 40, at)
428
+ ]))), 256))
429
+ ], 8, He)),
430
+ l.$slots.source ? (a(), o("div", {
431
+ key: 1,
432
+ ref_key: "source",
433
+ ref: S,
434
+ dir: "auto"
435
+ }, [
436
+ le(l.$slots, "source", {}, void 0, !0)
437
+ ], 512)) : h("", !0),
438
+ d(G) ? (a(), te(Ne, { key: 2 })) : h("", !0)
439
+ ], 36));
440
+ }
441
+ }, yt = /* @__PURE__ */ Ie(st, [["__scopeId", "data-v-f8e879db"]]);
442
+ export {
443
+ yt as default
444
+ };