vue-data-ui 3.0.0-next.4 → 3.0.0-next.40

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 (106) hide show
  1. package/dist/{Arrow-COeGcYaf.js → Arrow-CJMQcuGh.js} +1 -1
  2. package/dist/{BaseDraggableDialog-B6a_nUd1.js → BaseDraggableDialog-BorVmOH6.js} +2 -2
  3. package/dist/{BaseIcon-C_m_NEgt.js → BaseIcon-DEsg88EI.js} +1 -1
  4. package/dist/{useLoading-Bt5Doa8m.js → BaseScanner-DIK2NTdp.js} +11 -11
  5. package/dist/{ColorPicker-_xpvmgl6.js → ColorPicker-Co40B_SG.js} +2 -2
  6. package/dist/{DataTable-kd4xY9pT.js → DataTable-DY-e2LXS.js} +2 -2
  7. package/dist/{Legend-Bow74t3d.js → Legend-C7zp8-t4.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-cUcAGGV2.js → NonSvgPenAndPaper-C2R7jHOH.js} +3 -3
  9. package/dist/{PackageVersion-3ZfzB951.js → PackageVersion-B6kajKgU.js} +1 -1
  10. package/dist/{PenAndPaper-BZddJqUG.js → PenAndPaper-en69u8G0.js} +3 -3
  11. package/dist/{Shape-BsptIVCm.js → Shape-D2suYivy.js} +43 -37
  12. package/dist/Slicer-DlcITWn0.js +588 -0
  13. package/dist/{SparkTooltip-BdD0e0jv.js → SparkTooltip-BwDKg_cF.js} +7 -7
  14. package/dist/{Title-FiH2Kirc.js → Title-CBSyhlmd.js} +1 -1
  15. package/dist/{Tooltip-BLtR7DBZ.js → Tooltip-Dis_Iqvl.js} +23 -19
  16. package/dist/{UserOptions-DOwmMJId.js → UserOptions-BAGpDPid.js} +2 -2
  17. package/dist/{dom-to-png-DnsK-Zal.js → dom-to-png-Ov4kozad.js} +1 -1
  18. package/dist/{img-CP2uNkKq.js → img-lSctQ4V6.js} +1 -1
  19. package/dist/{index-BnnNoGGd.js → index-Dt40W2hN.js} +1533 -1265
  20. package/dist/{pdf-urw1sGoX.js → pdf-DtFuExHv.js} +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +231 -10
  23. package/dist/types/vue-data-ui.d.ts +231 -10
  24. package/dist/{useNestedProp-B6Dz15k2.js → useNestedProp-CiNTcBth.js} +1 -1
  25. package/dist/{usePrinter-Dd-RkmL8.js → usePrinter-C4Hc_Nbf.js} +2 -2
  26. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  27. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  28. package/dist/{vue-data-ui-Dql75T3d.js → vue-data-ui-Bgp_em-v.js} +64 -64
  29. package/dist/vue-data-ui.js +26 -25
  30. package/dist/{vue-ui-3d-bar-CUDEgTKp.js → vue-ui-3d-bar-osKQ4IOP.js} +6 -6
  31. package/dist/{vue-ui-accordion-qNR0BQCP.js → vue-ui-accordion-BrdvtjzQ.js} +3 -3
  32. package/dist/{vue-ui-age-pyramid-BFWU1VGZ.js → vue-ui-age-pyramid-CioF-ZZz.js} +11 -9
  33. package/dist/{vue-ui-annotator-CeMOjHpf.js → vue-ui-annotator-CSqAhQiG.js} +2 -2
  34. package/dist/vue-ui-bullet-CVDhxrNn.js +571 -0
  35. package/dist/vue-ui-candlestick--MPqDI4C.js +999 -0
  36. package/dist/{vue-ui-carousel-table-CAr64-2F.js → vue-ui-carousel-table-BVk7PLwZ.js} +4 -4
  37. package/dist/{vue-ui-chestnut-B0zNp1jY.js → vue-ui-chestnut-DEx9TbrF.js} +5 -5
  38. package/dist/{vue-ui-chord-C-_tz6Tb.js → vue-ui-chord-CA-KhxYT.js} +8 -8
  39. package/dist/{vue-ui-circle-pack-BSTkkKx-.js → vue-ui-circle-pack-DBathPgi.js} +26 -26
  40. package/dist/{vue-ui-cursor-Dqd6RkcK.js → vue-ui-cursor-DMgru1Ut.js} +2 -2
  41. package/dist/{vue-ui-dashboard-CspqjC6x.js → vue-ui-dashboard-DjR4GMXi.js} +62 -62
  42. package/dist/{vue-ui-digits-CazGAGyM.js → vue-ui-digits-Zyo5YPt9.js} +2 -2
  43. package/dist/{vue-ui-donut-BK35Gt-7.js → vue-ui-donut-CTkQZ2S_.js} +408 -381
  44. package/dist/vue-ui-donut-evolution-CqWJyBuS.js +1075 -0
  45. package/dist/{vue-ui-dumbbell-CJal89Ud.js → vue-ui-dumbbell-CqW_fq8N.js} +7 -7
  46. package/dist/vue-ui-flow-CrAhSPCS.js +841 -0
  47. package/dist/{vue-ui-funnel-Dm0LCakq.js → vue-ui-funnel-DhfW5rrz.js} +6 -6
  48. package/dist/{vue-ui-galaxy-C9poCSSD.js → vue-ui-galaxy-PAdaOeqx.js} +51 -49
  49. package/dist/{vue-ui-gauge-CYXXfMRC.js → vue-ui-gauge-O3pWOp6L.js} +6 -6
  50. package/dist/{vue-ui-gizmo-B-8rhor5.js → vue-ui-gizmo-euqtfneE.js} +3 -3
  51. package/dist/vue-ui-heatmap-DpJtmmha.js +1078 -0
  52. package/dist/{vue-ui-history-plot-C_Si7S5S.js → vue-ui-history-plot-D-ERYWqA.js} +12 -10
  53. package/dist/{vue-ui-kpi-BYYBkt55.js → vue-ui-kpi-BVPy5lir.js} +3 -3
  54. package/dist/{vue-ui-mini-loader-DmHE-wrb.js → vue-ui-mini-loader-C1jyLTN0.js} +2 -2
  55. package/dist/{vue-ui-molecule-I2ZUVtal.js → vue-ui-molecule-D5a1xiZe.js} +35 -33
  56. package/dist/{vue-ui-mood-radar-BYUr9rcv.js → vue-ui-mood-radar-BFoBLBHr.js} +7 -7
  57. package/dist/vue-ui-nested-donuts-C5EdQl9m.js +1286 -0
  58. package/dist/{vue-ui-onion-BpGz1RFC.js → vue-ui-onion-R8aDUWKW.js} +46 -44
  59. package/dist/vue-ui-parallel-coordinate-plot-BlyVabIZ.js +915 -0
  60. package/dist/{vue-ui-quadrant-CByC4r8k.js → vue-ui-quadrant-IUglavFx.js} +59 -57
  61. package/dist/vue-ui-quick-chart-BpNPyMU7.js +1761 -0
  62. package/dist/{vue-ui-radar-CBVb6GyN.js → vue-ui-radar-gw_Juu9G.js} +12 -10
  63. package/dist/{vue-ui-rating-Thf6P6AF.js → vue-ui-rating-1unEFc2G.js} +2 -2
  64. package/dist/{vue-ui-relation-circle-Blg3GkeU.js → vue-ui-relation-circle-BcfPtGPT.js} +6 -6
  65. package/dist/{vue-ui-ridgeline-D6kxALQN.js → vue-ui-ridgeline-MPTZgHBN.js} +12 -10
  66. package/dist/{vue-ui-rings-bBHc4cwe.js → vue-ui-rings-BathT6rc.js} +13 -11
  67. package/dist/{vue-ui-scatter-DS6-kGZL.js → vue-ui-scatter-c18cEUOV.js} +72 -70
  68. package/dist/{vue-ui-skeleton-gHkpLBcj.js → vue-ui-skeleton-B7-_d7dq.js} +3 -3
  69. package/dist/{vue-ui-smiley-S7qJ-dRf.js → vue-ui-smiley-BDXogV8H.js} +2 -2
  70. package/dist/{vue-ui-spark-trend-Co-sKoQX.js → vue-ui-spark-trend-DDTjw45H.js} +3 -3
  71. package/dist/{vue-ui-sparkbar-G1Jhr305.js → vue-ui-sparkbar-C_5eGtLa.js} +3 -3
  72. package/dist/{vue-ui-sparkgauge-Bzm5X8us.js → vue-ui-sparkgauge-DHY87x_9.js} +3 -3
  73. package/dist/{vue-ui-sparkhistogram-IGnxrQK9.js → vue-ui-sparkhistogram-DS5XBE2H.js} +4 -4
  74. package/dist/vue-ui-sparkline-CSDFmjTw.js +489 -0
  75. package/dist/{vue-ui-sparkstackbar-C_cbbRT_.js → vue-ui-sparkstackbar-BlbqR90E.js} +55 -53
  76. package/dist/vue-ui-stackbar-BQhWHZhn.js +1370 -0
  77. package/dist/{vue-ui-strip-plot-Cw1CDIL0.js → vue-ui-strip-plot-DqW7c8P5.js} +30 -28
  78. package/dist/{vue-ui-table-C4A73F9D.js → vue-ui-table-CgQG6lgC.js} +3 -3
  79. package/dist/{vue-ui-table-heatmap-DDlDAXMI.js → vue-ui-table-heatmap-BSvr6nNW.js} +5 -5
  80. package/dist/{vue-ui-table-sparkline-CQDLqNvX.js → vue-ui-table-sparkline-w7bQM7Hk.js} +4 -4
  81. package/dist/{vue-ui-thermometer-DgBtT1Ts.js → vue-ui-thermometer-DXtr4W_t.js} +6 -6
  82. package/dist/{vue-ui-timer-DwL2EUHc.js → vue-ui-timer-DFF2z6Uo.js} +5 -5
  83. package/dist/{vue-ui-tiremarks-J9v9JAmf.js → vue-ui-tiremarks-a_a4b9HI.js} +6 -6
  84. package/dist/{vue-ui-treemap-BSPd3wFo.js → vue-ui-treemap-DLbstU3H.js} +13 -11
  85. package/dist/vue-ui-vertical-bar-B7NnA0GU.js +1108 -0
  86. package/dist/vue-ui-waffle-B9VX_YKC.js +910 -0
  87. package/dist/{vue-ui-wheel-B_r_vUFd.js → vue-ui-wheel-BuMOe8AU.js} +6 -6
  88. package/dist/{vue-ui-word-cloud-DqvRfwF3.js → vue-ui-word-cloud-CEZ2XSvH.js} +12 -10
  89. package/dist/{vue-ui-world-DguPtgux.js → vue-ui-world-BTXi0bm-.js} +11 -9
  90. package/dist/vue-ui-xy-DIstI78B.js +3755 -0
  91. package/dist/{vue-ui-xy-canvas-Cv4Fs6Jw.js → vue-ui-xy-canvas-u2RoNNiK.js} +265 -264
  92. package/package.json +1 -1
  93. package/dist/Slicer-i0BAmgHn.js +0 -577
  94. package/dist/vue-ui-bullet-CmNollxj.js +0 -513
  95. package/dist/vue-ui-candlestick-CkoAVYNh.js +0 -873
  96. package/dist/vue-ui-donut-evolution-SomhFGJh.js +0 -903
  97. package/dist/vue-ui-flow-BFsmk2iL.js +0 -765
  98. package/dist/vue-ui-heatmap-BQzObiF9.js +0 -877
  99. package/dist/vue-ui-nested-donuts-DEm7s2uC.js +0 -1177
  100. package/dist/vue-ui-parallel-coordinate-plot-SkVvzSSQ.js +0 -807
  101. package/dist/vue-ui-quick-chart-GEYFXShR.js +0 -1612
  102. package/dist/vue-ui-sparkline-ezu4qjgC.js +0 -459
  103. package/dist/vue-ui-stackbar-BD9gyxAb.js +0 -1207
  104. package/dist/vue-ui-vertical-bar-B5b5tXjT.js +0 -1029
  105. package/dist/vue-ui-waffle-Bh_gS8y2.js +0 -863
  106. package/dist/vue-ui-xy-MFNbJqgb.js +0 -2980
@@ -0,0 +1,489 @@
1
+ import { defineAsyncComponent as le, computed as h, ref as g, toRefs as $e, watch as ue, shallowRef as oe, onMounted as Ce, onBeforeUnmount as Me, createElementBlock as d, openBlock as r, normalizeStyle as V, renderSlot as M, createCommentVNode as y, createBlock as se, normalizeProps as ne, guardReactiveProps as re, createElementVNode as f, toDisplayString as z, unref as i, createVNode as Ie, Fragment as G, renderList as U, withCtx as Se, createTextVNode as Ve, nextTick as ze } from "vue";
2
+ import { u as De, c as We, A as Pe, a as Re, C as ie, a7 as j, o as ve, e as de, g as Te, w as D, a8 as Ee, a9 as Oe, X as Be, s as W, V as ce, U as Fe, aa as he, i as X, f as Y, ab as Ge } from "./index-Dt40W2hN.js";
3
+ import { u as ye } from "./useNestedProp-CiNTcBth.js";
4
+ import { t as Ue, u as je } from "./useResponsive-DfdjqQps.js";
5
+ import { u as Xe } from "./useChartAccessibility-9icAAmYg.js";
6
+ import { u as Ye, B as qe } from "./BaseScanner-DIK2NTdp.js";
7
+ import { u as Ze } from "./useTimeLabels-DkzmKfZn.js";
8
+ import { _ as He } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
+ const Je = ["id"], Ke = ["xmlns", "viewBox"], Qe = ["width", "height"], et = ["id"], tt = ["stop-color"], at = ["stop-color"], lt = ["id"], ut = ["stop-color"], ot = ["stop-color"], st = ["id"], nt = ["stop-color"], rt = ["stop-color"], it = { key: 1 }, vt = ["d", "fill"], dt = ["d", "fill"], ct = ["d", "stroke", "stroke-width"], ht = ["d", "stroke", "stroke-width"], yt = ["x", "y", "width", "height", "fill", "rx"], ft = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], pt = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], gt = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], bt = ["x", "y", "font-size", "font-weight", "fill"], mt = ["x", "y", "height", "width", "onMouseenter", "onMouseleave", "onClick"], kt = {
10
+ __name: "vue-ui-sparkline",
11
+ props: {
12
+ config: {
13
+ type: Object,
14
+ default() {
15
+ return {};
16
+ }
17
+ },
18
+ dataset: {
19
+ type: Array,
20
+ default() {
21
+ return [];
22
+ }
23
+ },
24
+ showInfo: {
25
+ type: Boolean,
26
+ default: !0
27
+ },
28
+ selectedIndex: {
29
+ type: Number,
30
+ default: void 0
31
+ },
32
+ heightRatio: {
33
+ type: Number,
34
+ default: 1
35
+ },
36
+ forcedPadding: {
37
+ type: Number,
38
+ default: 30
39
+ }
40
+ },
41
+ emits: ["hoverIndex", "selectDatapoint"],
42
+ setup(_, { emit: fe }) {
43
+ const pe = le(() => import("./PackageVersion-B6kajKgU.js")), ge = le(() => import("./SparkTooltip-BwDKg_cF.js")), { vue_ui_sparkline: be } = De(), n = _, q = h(() => Array.isArray(n.dataset) && n.dataset.length > 0), p = g(We()), P = g(null), Z = g(null), H = g(null), e = g(E());
44
+ function me(t) {
45
+ return Ge(t).map((a) => ({ period: "-", value: a }));
46
+ }
47
+ const { loading: R, FINAL_DATASET: I, manualLoading: T } = Ye({
48
+ ...$e(n),
49
+ FINAL_CONFIG: e,
50
+ prepareConfig: E,
51
+ callback: () => {
52
+ Promise.resolve().then(async () => {
53
+ await ze(), K();
54
+ });
55
+ },
56
+ skeletonDataset: me(12),
57
+ skeletonConfig: Pe({
58
+ defaultConfig: e.value,
59
+ userConfig: {
60
+ style: {
61
+ backgroundColor: "#99999930",
62
+ scaleMin: 0,
63
+ scaleMax: 89,
64
+ animation: { show: !1 },
65
+ line: { color: "#AAAAAA" },
66
+ bar: { color: "#AAAAAA" },
67
+ area: { color: "#CACACA" },
68
+ zeroLine: { color: "#6A6A6A" },
69
+ dataLabel: { show: !1 },
70
+ tooltip: { show: !1 }
71
+ }
72
+ }
73
+ })
74
+ }), { svgRef: J } = Xe({ config: e.value.style.title });
75
+ function E() {
76
+ const t = ye({
77
+ userConfig: n.config,
78
+ defaultConfig: be
79
+ });
80
+ let a = {};
81
+ return t.theme ? a = {
82
+ ...ye({
83
+ userConfig: Re.vue_ui_sparkline[t.theme] || n.config,
84
+ defaultConfig: t
85
+ })
86
+ } : a = t, n.config && ie(n.config, "style.scaleMin") ? a.style.scaleMin = n.config.style.scaleMin : a.style.scaleMin = null, n.config && ie(n.config, "style.scaleMax") ? a.style.scaleMax = n.config.style.scaleMax : a.style.scaleMax = null, a;
87
+ }
88
+ const k = h(() => j({
89
+ data: I.value,
90
+ threshold: e.value.downsample.threshold
91
+ }));
92
+ ue(() => n.config, (t) => {
93
+ R.value || (e.value = E()), ee(), u.value.chartWidth = e.value.style.chartWidth;
94
+ }, { deep: !0 }), ue(() => n.dataset, (t) => {
95
+ Array.isArray(t) && t.length > 0 && (T.value = !1), x.value = j({
96
+ data: I.value.map((a) => ({
97
+ ...a,
98
+ value: [void 0].includes(a.value) ? null : a.value
99
+ })),
100
+ threshold: e.value.downsample.threshold
101
+ });
102
+ }, { deep: !0 });
103
+ const x = g(ke());
104
+ function ke() {
105
+ return j({
106
+ data: I.value.map((t) => e.value.style.animation.show && I.value.length > 1 ? {
107
+ ...t,
108
+ value: null
109
+ } : {
110
+ ...t,
111
+ value: [void 0].includes(t.value) ? null : t.value
112
+ }),
113
+ threshold: e.value.downsample.threshold
114
+ });
115
+ }
116
+ const b = oe(null), L = oe(null);
117
+ function K() {
118
+ if (e.value.style.animation.show && n.dataset.length > 1 && !R.value) {
119
+ let l = function() {
120
+ a < k.value.length ? (x.value.push(k.value[a]), setTimeout(() => {
121
+ requestAnimationFrame(l);
122
+ }, t)) : x.value = k.value, a += 1;
123
+ };
124
+ x.value = [];
125
+ const t = e.value.style.animation.animationFrames / n.dataset.length;
126
+ let a = 0;
127
+ l();
128
+ }
129
+ }
130
+ Ce(() => {
131
+ ee(), K();
132
+ });
133
+ const Q = h(() => !!e.value.debug);
134
+ function ee() {
135
+ if (ve(n.dataset) ? (de({
136
+ componentName: "VueUiSparkline",
137
+ type: "dataset",
138
+ debug: Q.value
139
+ }), T.value = !0) : n.dataset.forEach((t, a) => {
140
+ Te({
141
+ datasetObject: t,
142
+ requiredAttributes: ["period", "value"]
143
+ }).forEach((l) => {
144
+ de({
145
+ componentName: "VueUiSparkline",
146
+ type: "datasetSerieAttribute",
147
+ property: l,
148
+ index: a,
149
+ debug: Q.value
150
+ });
151
+ });
152
+ }), ve(n.dataset) || (T.value = e.value.loading), e.value.responsive) {
153
+ const t = Ue(() => {
154
+ const { width: a, height: l } = je({
155
+ chart: P.value,
156
+ title: e.value.style.title.show && n.showInfo ? Z.value : null,
157
+ source: H.value
158
+ });
159
+ requestAnimationFrame(() => {
160
+ u.value.width = a, u.value.height = l, u.value.chartWidth = e.value.style.chartWidth / 500 * a, u.value.padding = n.forcedPadding / 500 * a;
161
+ });
162
+ });
163
+ b.value && (L.value && b.value.unobserve(L.value), b.value.disconnect()), b.value = new ResizeObserver(t), L.value = P.value.parentNode, b.value.observe(L.value);
164
+ }
165
+ }
166
+ Me(() => {
167
+ b.value && (L.value && b.value.unobserve(L.value), b.value.disconnect());
168
+ });
169
+ const u = g({
170
+ height: 80 * n.heightRatio,
171
+ width: 500,
172
+ chartWidth: e.value.style.chartWidth,
173
+ padding: n.forcedPadding
174
+ }), O = fe, o = h(() => {
175
+ const { top: t, right: a, bottom: l, left: s } = e.value.style.padding;
176
+ return {
177
+ top: t,
178
+ left: s,
179
+ right: u.value.width - a,
180
+ bottom: u.value.height - l,
181
+ start: n.showInfo && e.value.style.dataLabel.show && e.value.style.dataLabel.position === "left" ? u.value.width - u.value.chartWidth + s : u.value.padding + s,
182
+ width: n.showInfo && e.value.style.dataLabel.show ? u.value.chartWidth - s - a : u.value.width - u.value.padding - s - a,
183
+ height: u.value.height - t - l
184
+ };
185
+ }), B = h(() => [null, void 0].includes(e.value.style.scaleMin) ? Math.min(...x.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0)) : e.value.style.scaleMin), xe = h(() => [null, void 0].includes(e.value.style.scaleMax) ? Math.max(...x.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0)) : e.value.style.scaleMax), $ = h(() => {
186
+ const t = B.value >= 0 ? 0 : B.value;
187
+ return Math.abs(t);
188
+ }), te = h(() => xe.value + $.value), A = h(() => o.value.bottom - o.value.height * F($.value));
189
+ function F(t) {
190
+ return isNaN(t / te.value) ? 0 : t / te.value;
191
+ }
192
+ const w = h(() => k.value.length - 1), S = h(() => Ze({
193
+ values: k.value.map((t) => t.period),
194
+ maxDatapoints: k.value.length,
195
+ formatter: e.value.style.dataLabel.datetimeFormatter,
196
+ start: 0,
197
+ end: k.value.length
198
+ })), c = h(() => x.value.map((t, a) => {
199
+ const l = isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0, s = o.value.width / (w.value + 1) > u.padding ? u.padding : o.value.width / (w.value + 1);
200
+ return {
201
+ absoluteValue: l,
202
+ period: S.value && S.value[a] && S.value[a].text ? S.value[a].text : t.period,
203
+ plotValue: l + $.value,
204
+ toMax: F(l + $.value),
205
+ x: o.value.start + a * (s > o.value.width / 12 ? o.value.width / 12 : s),
206
+ y: o.value.bottom - o.value.height * F(l + $.value),
207
+ id: `plot_${p.value}_${a}`,
208
+ color: C.value ? e.value.style.bar.color : e.value.style.area.useGradient ? D(e.value.style.line.color, 0.05 * (1 - a / w.value)) : e.value.style.line.color,
209
+ width: s > o.value.width / 12 ? o.value.width / 12 : s
210
+ };
211
+ })), we = h(() => {
212
+ const t = { x: c.value[0].x || 0, y: (u.value.height || 0) - 6 }, a = { x: c.value[c.value.length - 1].x || 0, y: (u.value.height || 0) - 6 }, l = [];
213
+ return c.value.forEach((s) => {
214
+ l.push(`${s.x || 0},${s.y || 0} `);
215
+ }), [t.x, t.y, ...l, a.x, a.y].toString();
216
+ }), v = g(void 0), N = g(void 0);
217
+ function _e(t, a) {
218
+ e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: a }), v.value = t, N.value || (N.value = t), O("hoverIndex", { index: a });
219
+ }
220
+ function Le(t, a) {
221
+ e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: a }), N.value = v.value, v.value = void 0, O("hoverIndex", { index: void 0 });
222
+ }
223
+ const m = h(() => {
224
+ if (q.value) {
225
+ const t = c.value.map((l) => l.absoluteValue), a = t.reduce((l, s) => l + s, 0);
226
+ return {
227
+ latest: c.value[c.value.length - 1].absoluteValue,
228
+ sum: a,
229
+ average: a / c.value.length,
230
+ median: Oe(t),
231
+ trend: Ee(c.value.map(({ x: l, y: s, absoluteValue: Ne }) => ({
232
+ x: l,
233
+ y: s,
234
+ value: Ne
235
+ }))).trend
236
+ };
237
+ } else
238
+ return {
239
+ latest: null,
240
+ sum: null,
241
+ average: null,
242
+ median: null,
243
+ trend: null
244
+ };
245
+ }), ae = h(() => q.value ? e.value.style.dataLabel.valueType === "latest" ? m.value.latest : e.value.style.dataLabel.valueType === "sum" ? m.value.sum : e.value.style.dataLabel.valueType === "average" ? m.value.average : 0 : 0), C = h(() => e.value.type && e.value.type === "bar");
246
+ function Ae(t, a) {
247
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: a }), O("selectDatapoint", { datapoint: t, index: a });
248
+ }
249
+ return (t, a) => (r(), d("div", {
250
+ ref_key: "sparklineChart",
251
+ ref: P,
252
+ class: "vue-ui-sparkline",
253
+ id: p.value,
254
+ style: V(`width:100%;font-family:${e.value.style.fontFamily};`)
255
+ }, [
256
+ M(t.$slots, "before", ne(re({
257
+ selected: v.value,
258
+ latest: m.value.latest,
259
+ sum: m.value.sum,
260
+ average: m.value.average,
261
+ median: m.value.median,
262
+ trend: m.value.trend
263
+ })), void 0, !0),
264
+ e.value.style.title.show && _.showInfo ? (r(), d("div", {
265
+ key: 0,
266
+ ref_key: "chartTitle",
267
+ ref: Z,
268
+ class: "vue-ui-sparkline-title",
269
+ style: V(`display:flex;align-items:center;width:100%;color:${e.value.style.title.color};background:${e.value.style.backgroundColor};justify-content:${e.value.style.title.textAlign === "left" ? "flex-start" : e.value.style.title.textAlign === "right" ? "flex-end" : "center"};height:${e.value.style.title.fontSize * 2}px;font-size:${e.value.style.title.fontSize}px;font-weight:${e.value.style.title.bold ? "bold" : "normal"};`)
270
+ }, [
271
+ f("span", {
272
+ style: V(`padding:${e.value.style.title.textAlign === "left" ? "0 0 0 12px" : e.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
273
+ }, z(v.value ? v.value.period : e.value.style.title.text), 5)
274
+ ], 4)) : y("", !0),
275
+ (r(), d("svg", {
276
+ ref_key: "svgRef",
277
+ ref: J,
278
+ xmlns: i(Be),
279
+ viewBox: `0 0 ${u.value.width} ${u.value.height}`,
280
+ style: V(`background:${e.value.style.backgroundColor};overflow:visible`),
281
+ onMouseleave: a[0] || (a[0] = (l) => N.value = void 0)
282
+ }, [
283
+ Ie(i(pe)),
284
+ t.$slots["chart-background"] ? (r(), d("foreignObject", {
285
+ key: 0,
286
+ x: 0,
287
+ y: 0,
288
+ width: u.value.width <= 0 ? 10 : u.value.width,
289
+ height: u.value.height <= 0 ? 10 : u.value.height,
290
+ style: {
291
+ pointerEvents: "none"
292
+ }
293
+ }, [
294
+ M(t.$slots, "chart-background", {}, void 0, !0)
295
+ ], 8, Qe)) : y("", !0),
296
+ f("defs", null, [
297
+ f("linearGradient", {
298
+ x1: "0%",
299
+ y1: "0%",
300
+ x2: "100%",
301
+ y2: "0%",
302
+ id: `sparkline_gradient_${p.value}`
303
+ }, [
304
+ f("stop", {
305
+ offset: "0%",
306
+ "stop-color": i(W)(i(D)(e.value.style.area.color, 0.05), e.value.style.area.opacity)
307
+ }, null, 8, tt),
308
+ f("stop", {
309
+ offset: "100%",
310
+ "stop-color": i(W)(e.value.style.area.color, e.value.style.area.opacity)
311
+ }, null, 8, at)
312
+ ], 8, et),
313
+ f("linearGradient", {
314
+ x2: "0%",
315
+ y2: "100%",
316
+ id: `sparkline_bar_gradient_pos_${p.value}`
317
+ }, [
318
+ f("stop", {
319
+ offset: "0%",
320
+ "stop-color": e.value.style.bar.color
321
+ }, null, 8, ut),
322
+ f("stop", {
323
+ offset: "100%",
324
+ "stop-color": i(D)(e.value.style.bar.color, 0.05)
325
+ }, null, 8, ot)
326
+ ], 8, lt),
327
+ f("linearGradient", {
328
+ x2: "0%",
329
+ y2: "100%",
330
+ id: `sparkline_bar_gradient_neg_${p.value}`
331
+ }, [
332
+ f("stop", {
333
+ offset: "0%",
334
+ "stop-color": i(D)(e.value.style.bar.color, 0.05)
335
+ }, null, 8, nt),
336
+ f("stop", {
337
+ offset: "100%",
338
+ "stop-color": e.value.style.bar.color
339
+ }, null, 8, rt)
340
+ ], 8, st)
341
+ ]),
342
+ e.value.style.area.show && !C.value && c.value[0] ? (r(), d("g", it, [
343
+ e.value.style.line.smooth ? (r(), d("path", {
344
+ key: 0,
345
+ d: `M ${c.value[0].x},${o.value.bottom} ${i(ce)(c.value)} L ${c.value.at(-1).x},${o.value.bottom} Z`,
346
+ fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : i(W)(e.value.style.area.color, e.value.style.area.opacity)
347
+ }, null, 8, vt)) : (r(), d("path", {
348
+ key: 1,
349
+ d: `M${we.value}Z`,
350
+ fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : i(W)(e.value.style.area.color, e.value.style.area.opacity)
351
+ }, null, 8, dt))
352
+ ])) : y("", !0),
353
+ e.value.style.line.smooth && !C.value ? (r(), d("path", {
354
+ key: 2,
355
+ d: `M ${i(ce)(c.value)}`,
356
+ stroke: e.value.style.line.color,
357
+ fill: "none",
358
+ "stroke-width": e.value.style.line.strokeWidth,
359
+ "stroke-linecap": "round"
360
+ }, null, 8, ct)) : y("", !0),
361
+ !e.value.style.line.smooth && !C.value ? (r(), d("path", {
362
+ key: 3,
363
+ d: `M ${i(Fe)(c.value)}`,
364
+ stroke: e.value.style.line.color,
365
+ fill: "none",
366
+ "stroke-width": e.value.style.line.strokeWidth,
367
+ "stroke-linecap": "round"
368
+ }, null, 8, ht)) : y("", !0),
369
+ (r(!0), d(G, null, U(c.value, (l, s) => (r(), d("g", null, [
370
+ C.value ? (r(), d("rect", {
371
+ key: 0,
372
+ x: l.x - l.width / 2,
373
+ y: isNaN(l.absoluteValue > 0 ? l.y : A.value) ? 0 : l.absoluteValue > 0 ? l.y : A.value,
374
+ width: l.width,
375
+ height: isNaN(Math.abs(l.y - A.value)) ? 0 : Math.abs(l.y - A.value),
376
+ fill: l.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${p.value})` : `url(#sparkline_bar_gradient_neg_${p.value})`,
377
+ rx: e.value.style.bar.borderRadius
378
+ }, null, 8, yt)) : y("", !0),
379
+ e.value.style.verticalIndicator.show && (v.value && l.id === v.value.id || _.selectedIndex === s) ? (r(), d("line", {
380
+ key: 1,
381
+ x1: l.x,
382
+ x2: l.x,
383
+ y1: o.value.top - 6,
384
+ y2: o.value.bottom,
385
+ stroke: e.value.style.verticalIndicator.color || l.color,
386
+ "stroke-width": e.value.style.verticalIndicator.strokeWidth,
387
+ "stroke-linecap": "round",
388
+ "stroke-dasharray": e.value.style.verticalIndicator.strokeDasharray || 0
389
+ }, null, 8, ft)) : y("", !0)
390
+ ]))), 256)),
391
+ B.value < 0 ? (r(), d("line", {
392
+ key: 4,
393
+ x1: o.value.start,
394
+ x2: o.value.start + o.value.width - 16,
395
+ y1: i(he)(A.value, o.value.bottom),
396
+ y2: i(he)(A.value, o.value.bottom),
397
+ stroke: e.value.style.zeroLine.color,
398
+ "stroke-dasharray": e.value.style.zeroLine.strokeWidth * 2,
399
+ "stroke-width": e.value.style.zeroLine.strokeWidth,
400
+ "stroke-linecap": "round"
401
+ }, null, 8, pt)) : y("", !0),
402
+ e.value.style.plot.show ? (r(!0), d(G, { key: 5 }, U(c.value, (l, s) => (r(), d("g", null, [
403
+ v.value && l.id === v.value.id || _.selectedIndex === s || _.dataset.length === 1 ? (r(), d("circle", {
404
+ key: 0,
405
+ cx: l.x,
406
+ cy: l.y,
407
+ r: e.value.style.plot.radius,
408
+ fill: l.color,
409
+ stroke: e.value.style.plot.stroke,
410
+ "stroke-width": e.value.style.plot.strokeWidth
411
+ }, null, 8, gt)) : y("", !0)
412
+ ]))), 256)) : y("", !0),
413
+ _.showInfo && e.value.style.dataLabel.show ? (r(), d("text", {
414
+ key: 6,
415
+ x: e.value.style.dataLabel.position === "left" ? 12 + e.value.style.dataLabel.offsetX : o.value.width + 12 + e.value.style.dataLabel.offsetX,
416
+ y: u.value.height / 2 + e.value.style.dataLabel.fontSize / 2.5 + e.value.style.dataLabel.offsetY,
417
+ "font-size": e.value.style.dataLabel.fontSize,
418
+ "font-weight": e.value.style.dataLabel.bold ? "bold" : "normal",
419
+ fill: e.value.style.dataLabel.color
420
+ }, z(v.value ? i(X)(
421
+ e.value.style.dataLabel.formatter,
422
+ v.value.absoluteValue,
423
+ i(Y)({ p: e.value.style.dataLabel.prefix, v: v.value.absoluteValue, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue }),
424
+ { datapoint: v.value }
425
+ ) : i(X)(
426
+ e.value.style.dataLabel.formatter,
427
+ ae.value,
428
+ i(Y)({ p: e.value.style.dataLabel.prefix, v: ae.value, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue })
429
+ )), 9, bt)) : y("", !0),
430
+ (r(!0), d(G, null, U(c.value, (l, s) => (r(), d("rect", {
431
+ x: l.x - (o.value.width / (w.value + 1) > u.value.padding ? u.value.padding : o.value.width / (w.value + 1)) / 2,
432
+ y: o.value.top - 6,
433
+ height: o.value.height + 6,
434
+ width: o.value.width / (w.value + 1) > u.value.padding ? u.value.padding : o.value.width / (w.value + 1),
435
+ fill: "transparent",
436
+ onMouseenter: () => _e(l, s),
437
+ onMouseleave: () => Le(l, s),
438
+ onClick: () => Ae(l, s)
439
+ }, null, 40, mt))), 256)),
440
+ M(t.$slots, "svg", { svg: u.value }, void 0, !0)
441
+ ], 44, Ke)),
442
+ v.value && e.value.style.tooltip.show ? (r(), se(i(ge), {
443
+ key: 1,
444
+ x: v.value.x,
445
+ y: v.value.y,
446
+ prevX: N.value.x,
447
+ prevY: N.value.y,
448
+ offsetY: e.value.style.plot.radius * 3 + e.value.style.tooltip.offsetY,
449
+ svgRef: i(J),
450
+ background: e.value.style.tooltip.backgroundColor,
451
+ color: e.value.style.tooltip.color,
452
+ fontSize: e.value.style.tooltip.fontSize,
453
+ borderWidth: e.value.style.tooltip.borderWidth,
454
+ borderColor: e.value.style.tooltip.borderColor,
455
+ borderRadius: e.value.style.tooltip.borderRadius,
456
+ backgroundOpacity: e.value.style.tooltip.backgroundOpacity
457
+ }, {
458
+ default: Se(() => [
459
+ M(t.$slots, "tooltip", ne(re({ ...v.value })), () => [
460
+ Ve(z(v.value.period) + ": " + z(i(X)(
461
+ e.value.style.dataLabel.formatter,
462
+ v.value.absoluteValue,
463
+ i(Y)({
464
+ p: e.value.style.dataLabel.prefix,
465
+ v: v.value.absoluteValue,
466
+ s: e.value.style.dataLabel.suffix,
467
+ r: e.value.style.dataLabel.roundingValue
468
+ }),
469
+ { datapoint: v.value }
470
+ )), 1)
471
+ ], !0)
472
+ ]),
473
+ _: 3
474
+ }, 8, ["x", "y", "prevX", "prevY", "offsetY", "svgRef", "background", "color", "fontSize", "borderWidth", "borderColor", "borderRadius", "backgroundOpacity"])) : y("", !0),
475
+ t.$slots.source ? (r(), d("div", {
476
+ key: 2,
477
+ ref_key: "source",
478
+ ref: H,
479
+ dir: "auto"
480
+ }, [
481
+ M(t.$slots, "source", {}, void 0, !0)
482
+ ], 512)) : y("", !0),
483
+ i(R) ? (r(), se(qe, { key: 3 })) : y("", !0)
484
+ ], 12, Je));
485
+ }
486
+ }, Mt = /* @__PURE__ */ He(kt, [["__scopeId", "data-v-251d35ec"]]);
487
+ export {
488
+ Mt as default
489
+ };