vue-data-ui 3.0.0-next.62 → 3.0.0-next.63

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 (93) hide show
  1. package/dist/{Arrow-vPQ5umgl.js → Arrow-BGKdsLII.js} +1 -1
  2. package/dist/{BaseDraggableDialog-rmweWafM.js → BaseDraggableDialog-gVVf8X_B.js} +2 -2
  3. package/dist/{BaseIcon-BdOuqa-n.js → BaseIcon-DNo7kjXj.js} +1 -1
  4. package/dist/{ColorPicker-BJYD-Akc.js → ColorPicker-vBh0CR5P.js} +2 -2
  5. package/dist/{DataTable-DKhkUltp.js → DataTable-DS3KWyd9.js} +2 -2
  6. package/dist/{Legend-DJVidRKZ.js → Legend-B6SFVKMo.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-BO1MTyPj.js → NonSvgPenAndPaper-BS2khXRd.js} +3 -3
  8. package/dist/{PackageVersion-CvXTVTaQ.js → PackageVersion-DSFdazAW.js} +1 -1
  9. package/dist/{PenAndPaper-B_AMsItI.js → PenAndPaper-CB61YgV9.js} +3 -3
  10. package/dist/{Shape-CVE1tn78.js → Shape-4rbQQ_12.js} +1 -1
  11. package/dist/{Slicer-Bu8DjZuX.js → Slicer-BYPUhbns.js} +2 -2
  12. package/dist/{SparkTooltip-CZVDoHxg.js → SparkTooltip-CcYxnK-3.js} +1 -1
  13. package/dist/{Title-Cr_usVXc.js → Title-5i51sn5z.js} +1 -1
  14. package/dist/{Tooltip-7jDTalyv.js → Tooltip-Ccrc8V99.js} +1 -1
  15. package/dist/{UserOptions-UTvI0Q98.js → UserOptions-B3sujtRb.js} +2 -2
  16. package/dist/{dom-to-png-ONrUYTRb.js → dom-to-png-CBszweF6.js} +1 -1
  17. package/dist/{img-iMtnfYdI.js → img-DGl0_Nzz.js} +1 -1
  18. package/dist/{index-CwGyyfTA.js → index-jlnByA4k.js} +9 -1
  19. package/dist/{pdf-DiMYy8s9.js → pdf-BHzrjI_S.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +5 -0
  22. package/dist/types/vue-data-ui.d.ts +5 -0
  23. package/dist/{useAutoSizeLabelsInsideViewbox-CqI-y0RH.js → useAutoSizeLabelsInsideViewbox-Btmy72IJ.js} +1 -1
  24. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  25. package/dist/{useNestedProp-Dd5rDkqs.js → useNestedProp-69PJWTUX.js} +1 -1
  26. package/dist/{usePrinter-Ctvv8qBg.js → usePrinter-CJSwPpxV.js} +2 -2
  27. package/dist/{vue-data-ui-DwvF4C9M.js → vue-data-ui-5hHAwcR8.js} +64 -64
  28. package/dist/vue-data-ui.js +1 -1
  29. package/dist/{vue-ui-3d-bar-zgyRNuSO.js → vue-ui-3d-bar-jcGPVz03.js} +6 -6
  30. package/dist/{vue-ui-accordion-5YUMPNG1.js → vue-ui-accordion-CtOEIleg.js} +3 -3
  31. package/dist/{vue-ui-age-pyramid-DW6p9iWS.js → vue-ui-age-pyramid-s246qBP8.js} +6 -6
  32. package/dist/{vue-ui-annotator-C2CMEveI.js → vue-ui-annotator-Bi3ndTdh.js} +2 -2
  33. package/dist/{vue-ui-bullet-I1UZAw0O.js → vue-ui-bullet-Ly8acZ65.js} +7 -7
  34. package/dist/{vue-ui-candlestick-N2rX18KX.js → vue-ui-candlestick-Dwy-2H2Q.js} +7 -7
  35. package/dist/{vue-ui-carousel-table-CXe6ghc3.js → vue-ui-carousel-table-ynesSu18.js} +4 -4
  36. package/dist/{vue-ui-chestnut-Dkeqv0lM.js → vue-ui-chestnut-DpXc1djY.js} +5 -5
  37. package/dist/{vue-ui-chord-Dp_n9sP9.js → vue-ui-chord-DXnK1f_K.js} +8 -8
  38. package/dist/{vue-ui-circle-pack-DrPM1UXc.js → vue-ui-circle-pack-BOt9llcy.js} +6 -6
  39. package/dist/{vue-ui-cursor-BcS6aiX1.js → vue-ui-cursor-DnJIyien.js} +2 -2
  40. package/dist/{vue-ui-dashboard-BcyCNmVV.js → vue-ui-dashboard-Cbz4dOIJ.js} +62 -62
  41. package/dist/{vue-ui-digits-BvNRrVgl.js → vue-ui-digits-CaiStt5K.js} +2 -2
  42. package/dist/{vue-ui-donut-Rvu6m-aE.js → vue-ui-donut-DzsorCa2.js} +8 -8
  43. package/dist/{vue-ui-donut-evolution-D2ZcgYhJ.js → vue-ui-donut-evolution-Cn-2v5OQ.js} +8 -8
  44. package/dist/{vue-ui-dumbbell-CvYVCA6I.js → vue-ui-dumbbell-LG-iNxUc.js} +7 -7
  45. package/dist/{vue-ui-flow-_6zAZMI6.js → vue-ui-flow-D4Mvh3N4.js} +7 -7
  46. package/dist/{vue-ui-funnel-CIEJVq4d.js → vue-ui-funnel-B9bd8Qdo.js} +6 -6
  47. package/dist/{vue-ui-galaxy-DcZ04iAF.js → vue-ui-galaxy-CFGFpWFJ.js} +5 -5
  48. package/dist/{vue-ui-gauge-C5j1wKcj.js → vue-ui-gauge-BoM3ea8S.js} +7 -7
  49. package/dist/{vue-ui-gizmo-BD9EY4bZ.js → vue-ui-gizmo-Bz1WJOzC.js} +3 -3
  50. package/dist/{vue-ui-heatmap-DDZ8g5dM.js → vue-ui-heatmap-DTlVM_Rg.js} +7 -7
  51. package/dist/{vue-ui-history-plot-C7ZRZHzl.js → vue-ui-history-plot-z-ycrjqs.js} +7 -7
  52. package/dist/{vue-ui-kpi-DZ5FITOL.js → vue-ui-kpi-CWGMNCQT.js} +3 -3
  53. package/dist/{vue-ui-mini-loader-BaQpwyu-.js → vue-ui-mini-loader-D-YAgXQh.js} +2 -2
  54. package/dist/{vue-ui-molecule-B8Ob6p-h.js → vue-ui-molecule-C8RnofGI.js} +5 -5
  55. package/dist/{vue-ui-mood-radar-BrTY3gyR.js → vue-ui-mood-radar-CTTAiDCG.js} +7 -7
  56. package/dist/{vue-ui-nested-donuts-yN_txLmU.js → vue-ui-nested-donuts-BJ_MVOPC.js} +9 -9
  57. package/dist/{vue-ui-onion-C613Zf1i.js → vue-ui-onion-CHGIIpnQ.js} +8 -8
  58. package/dist/{vue-ui-parallel-coordinate-plot-B-aXg4S4.js → vue-ui-parallel-coordinate-plot-BZtohM97.js} +8 -8
  59. package/dist/{vue-ui-quadrant-C2AeZvmZ.js → vue-ui-quadrant-D3Voh1B3.js} +8 -8
  60. package/dist/{vue-ui-quick-chart-CkE6ybPo.js → vue-ui-quick-chart-BWf2yNU3.js} +6 -6
  61. package/dist/{vue-ui-radar-BbiqR92L.js → vue-ui-radar-DG2V_zsj.js} +7 -7
  62. package/dist/{vue-ui-rating-CbRUCAxl.js → vue-ui-rating-BX3DRGia.js} +2 -2
  63. package/dist/{vue-ui-relation-circle-vWsjRm3W.js → vue-ui-relation-circle-XCU4OM_5.js} +6 -6
  64. package/dist/{vue-ui-ridgeline-CaiytuOs.js → vue-ui-ridgeline-b1zJ9JMy.js} +8 -8
  65. package/dist/{vue-ui-rings-AFUuMvpu.js → vue-ui-rings-DOyQUS4a.js} +8 -8
  66. package/dist/{vue-ui-scatter-Dcb9tLMu.js → vue-ui-scatter-D9LdWCZd.js} +8 -8
  67. package/dist/{vue-ui-skeleton-B1SFKW_l.js → vue-ui-skeleton-Cv6EVbCt.js} +3 -3
  68. package/dist/{vue-ui-smiley-Ba-ctrns.js → vue-ui-smiley-C2mnVQu-.js} +2 -2
  69. package/dist/vue-ui-spark-trend-gbAr_BYc.js +315 -0
  70. package/dist/{vue-ui-sparkbar-D8-HNaN_.js → vue-ui-sparkbar-BPU9JtvX.js} +3 -3
  71. package/dist/{vue-ui-sparkgauge-Dfnr6Bjc.js → vue-ui-sparkgauge-B1smUA41.js} +3 -3
  72. package/dist/vue-ui-sparkhistogram-CZTxCQgR.js +380 -0
  73. package/dist/{vue-ui-sparkline-BA_5ICer.js → vue-ui-sparkline-jChhbwmi.js} +3 -3
  74. package/dist/{vue-ui-sparkstackbar-BQkH5ltm.js → vue-ui-sparkstackbar-Dt7wTy19.js} +3 -3
  75. package/dist/{vue-ui-stackbar-C7iPaQOn.js → vue-ui-stackbar-CGgA6-n6.js} +9 -9
  76. package/dist/{vue-ui-strip-plot-CnfeJeRi.js → vue-ui-strip-plot-BtCiUFRZ.js} +7 -7
  77. package/dist/{vue-ui-table-Dz6RLYoS.js → vue-ui-table-DzWPHCpf.js} +3 -3
  78. package/dist/{vue-ui-table-heatmap-Cbgogx6N.js → vue-ui-table-heatmap-_FhnVCOZ.js} +5 -5
  79. package/dist/{vue-ui-table-sparkline-CLEfp8d2.js → vue-ui-table-sparkline-CYsSg1z9.js} +4 -4
  80. package/dist/{vue-ui-thermometer-CzNFOqrV.js → vue-ui-thermometer-dSqhossO.js} +7 -7
  81. package/dist/{vue-ui-timer-CI7VUX-B.js → vue-ui-timer-DyIsQAqp.js} +5 -5
  82. package/dist/{vue-ui-tiremarks-C0QDwzEt.js → vue-ui-tiremarks-BEqXVq_9.js} +6 -6
  83. package/dist/{vue-ui-treemap-D-5MOqu3.js → vue-ui-treemap-khKWfnVU.js} +8 -8
  84. package/dist/{vue-ui-vertical-bar-sZjQranC.js → vue-ui-vertical-bar-CXZGkJh7.js} +9 -9
  85. package/dist/{vue-ui-waffle-6zNYC1rh.js → vue-ui-waffle-DrHd1WXy.js} +8 -8
  86. package/dist/{vue-ui-wheel-kx79XCaH.js → vue-ui-wheel-OqQd6Weo.js} +6 -6
  87. package/dist/{vue-ui-word-cloud-DI8bEQrN.js → vue-ui-word-cloud-CG4W1l66.js} +6 -6
  88. package/dist/{vue-ui-world-Ba2tdGRe.js → vue-ui-world-BBrwRZF-.js} +6 -6
  89. package/dist/{vue-ui-xy-TM3uzoN-.js → vue-ui-xy-CqeSePUr.js} +9 -9
  90. package/dist/{vue-ui-xy-canvas-DFqIhqzJ.js → vue-ui-xy-canvas-BZhZZQae.js} +8 -8
  91. package/package.json +1 -1
  92. package/dist/vue-ui-spark-trend-BshA2mRL.js +0 -291
  93. package/dist/vue-ui-sparkhistogram-BMtpx_0l.js +0 -444
@@ -1,444 +0,0 @@
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-CwGyyfTA.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-Dd5rDkqs.js";
6
- import { u as Te } from "./useChartAccessibility-9icAAmYg.js";
7
- import { _ as Ee } from "./Shape-CVE1tn78.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-CvXTVTaQ.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
- };