vue-data-ui 3.1.17 → 3.1.18

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 (89) hide show
  1. package/dist/{Arrow-DFX_NfRh.js → Arrow-BC5klzOh.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CrCjMg89.js → BaseDraggableDialog-CkjMZyIs.js} +2 -2
  3. package/dist/{BaseIcon-7s-tCFcQ.js → BaseIcon-BPiT94Lb.js} +1 -1
  4. package/dist/{ColorPicker-BoLH_m_Z.js → ColorPicker-bx5e2RB2.js} +2 -2
  5. package/dist/{DataTable-Dw6dxJk3.js → DataTable-CywujQw9.js} +2 -2
  6. package/dist/{Legend-CjdnJGHq.js → Legend-h35dp0Qf.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-tX2IXHuz.js → NonSvgPenAndPaper-CvnlQ378.js} +3 -3
  8. package/dist/{PackageVersion-D1HToLlZ.js → PackageVersion-BzGzkGiC.js} +1 -1
  9. package/dist/{PenAndPaper-BKnXOYre.js → PenAndPaper-Deh70G9d.js} +3 -3
  10. package/dist/{Shape-6PexQroB.js → Shape-sVxD_SDm.js} +1 -1
  11. package/dist/{Slicer-BJkhMBk4.js → Slicer-CQB967He.js} +2 -2
  12. package/dist/{SparkTooltip-BtO1j0i1.js → SparkTooltip-DFRSPT3_.js} +1 -1
  13. package/dist/{Title-BVMfF0uu.js → Title-B_WMW2Bp.js} +1 -1
  14. package/dist/{Tooltip-DBvmoYXU.js → Tooltip-Db9jy0Iu.js} +1 -1
  15. package/dist/{UserOptions-CKzW9w0Q.js → UserOptions-CtECQwBN.js} +2 -2
  16. package/dist/{dom-to-png-D0wlWRL9.js → dom-to-png-BHpS3cMi.js} +1 -1
  17. package/dist/{img-CeCjiMpr.js → img-BArHHegM.js} +1 -1
  18. package/dist/{index-Lg17rmB1.js → index-smzxfsyV.js} +2 -2
  19. package/dist/{pdf-D5bgIg6W.js → pdf-D1L3r23x.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/{useAutoSizeLabelsInsideViewbox-BxqMb3sU.js → useAutoSizeLabelsInsideViewbox-DeqXeTNw.js} +1 -1
  22. package/dist/{useNestedProp-DpwLJMsW.js → useNestedProp-DeKmJzsE.js} +1 -1
  23. package/dist/{usePrinter-DGI4Mlad.js → usePrinter-nFj0xF0a.js} +2 -2
  24. package/dist/{vue-data-ui-lki09wwK.js → vue-data-ui-DcBYykse.js} +64 -64
  25. package/dist/vue-data-ui.js +1 -1
  26. package/dist/{vue-ui-3d-bar-8b3VZcUI.js → vue-ui-3d-bar-D4rc8PD3.js} +57 -57
  27. package/dist/{vue-ui-accordion-BJG-ogQj.js → vue-ui-accordion-7cfJUVx5.js} +3 -3
  28. package/dist/{vue-ui-age-pyramid-Cr_dhyTO.js → vue-ui-age-pyramid-BXMIUNB_.js} +6 -6
  29. package/dist/{vue-ui-annotator-ttaqcMTz.js → vue-ui-annotator-aCDhQ-m2.js} +2 -2
  30. package/dist/{vue-ui-bullet-DXvTj07g.js → vue-ui-bullet-Cd_iix-z.js} +7 -7
  31. package/dist/{vue-ui-candlestick-B5NqFTXr.js → vue-ui-candlestick-C-TTTgiW.js} +7 -7
  32. package/dist/{vue-ui-carousel-table-B0bpCRFh.js → vue-ui-carousel-table-C58J4zpm.js} +4 -4
  33. package/dist/{vue-ui-chestnut-Cby7Wcbu.js → vue-ui-chestnut-C7u6GW-T.js} +5 -5
  34. package/dist/{vue-ui-chord-Cxg8nwzZ.js → vue-ui-chord-DxLU3Fg1.js} +8 -8
  35. package/dist/{vue-ui-circle-pack-Cc5e6dE3.js → vue-ui-circle-pack--a_KE7qz.js} +6 -6
  36. package/dist/{vue-ui-cursor-D6MvR7jD.js → vue-ui-cursor-DJQWAIj8.js} +2 -2
  37. package/dist/{vue-ui-dashboard-CaUM9n5b.js → vue-ui-dashboard-CIACUYB-.js} +67 -67
  38. package/dist/{vue-ui-digits-DsoHRv9p.js → vue-ui-digits-CLV8h-P8.js} +2 -2
  39. package/dist/{vue-ui-donut-evolution-CFu9WNVV.js → vue-ui-donut-evolution-XGJvBQIm.js} +8 -8
  40. package/dist/{vue-ui-donut-Dxsq1gpz.js → vue-ui-donut-sO6G5oor.js} +8 -8
  41. package/dist/{vue-ui-dumbbell-Cgb7ijQS.js → vue-ui-dumbbell-Bi11rDL7.js} +7 -7
  42. package/dist/{vue-ui-flow-Ucb9PdWP.js → vue-ui-flow-RP2v-aZJ.js} +7 -7
  43. package/dist/{vue-ui-funnel-CV29tksj.js → vue-ui-funnel-TVQXGyw7.js} +6 -6
  44. package/dist/{vue-ui-galaxy-CVJb9_hA.js → vue-ui-galaxy-CUURaWgH.js} +7 -7
  45. package/dist/{vue-ui-gauge-ofpIH29X.js → vue-ui-gauge-hTRlwARA.js} +125 -125
  46. package/dist/{vue-ui-gizmo-Ci9kN9VQ.js → vue-ui-gizmo-CZIgBvWV.js} +3 -3
  47. package/dist/{vue-ui-heatmap-BK_jorrw.js → vue-ui-heatmap-RKtFMgDP.js} +7 -7
  48. package/dist/{vue-ui-history-plot-Ce8BB4Tn.js → vue-ui-history-plot-fbTG7Mke.js} +7 -7
  49. package/dist/{vue-ui-kpi-DAHT9q6j.js → vue-ui-kpi-CfX-zUDS.js} +3 -3
  50. package/dist/{vue-ui-mini-loader-CuilTrcI.js → vue-ui-mini-loader-C1nANuMy.js} +2 -2
  51. package/dist/{vue-ui-molecule-C6suewK-.js → vue-ui-molecule-BU7T1ysb.js} +5 -5
  52. package/dist/{vue-ui-mood-radar-DPvGhgPI.js → vue-ui-mood-radar-Cb8cFWzE.js} +7 -7
  53. package/dist/{vue-ui-nested-donuts-BvPWp9Du.js → vue-ui-nested-donuts-DTZD8BTA.js} +7 -7
  54. package/dist/{vue-ui-onion-BZ0tfRV_.js → vue-ui-onion-5xmlEUsJ.js} +8 -8
  55. package/dist/{vue-ui-parallel-coordinate-plot-DqFj8hbo.js → vue-ui-parallel-coordinate-plot-Wc0TbyJH.js} +8 -8
  56. package/dist/{vue-ui-quadrant-Cg5e73ny.js → vue-ui-quadrant-BC99Cua7.js} +8 -8
  57. package/dist/{vue-ui-quick-chart-sABlk5nb.js → vue-ui-quick-chart-Cbv2UcEu.js} +6 -6
  58. package/dist/{vue-ui-radar-DYcoGzSu.js → vue-ui-radar-B-ey_fDA.js} +8 -8
  59. package/dist/{vue-ui-rating-1eguB-TH.js → vue-ui-rating-BNCKLcCa.js} +2 -2
  60. package/dist/{vue-ui-relation-circle-BeWuQDkk.js → vue-ui-relation-circle-CYFQcAgc.js} +7 -7
  61. package/dist/{vue-ui-ridgeline-CG7FefqU.js → vue-ui-ridgeline-B_6K1FTc.js} +8 -8
  62. package/dist/{vue-ui-rings-2eedFGuC.js → vue-ui-rings-D_BTgxYc.js} +8 -8
  63. package/dist/{vue-ui-scatter-CNtgNP5j.js → vue-ui-scatter-B69SYOfv.js} +8 -8
  64. package/dist/{vue-ui-skeleton-fqG3bKSz.js → vue-ui-skeleton-CpkwgALO.js} +3 -3
  65. package/dist/{vue-ui-smiley-D4bvSF9S.js → vue-ui-smiley-t16dEIoQ.js} +2 -2
  66. package/dist/vue-ui-spark-trend-DskdjYw4.js +336 -0
  67. package/dist/{vue-ui-sparkbar-D1FXZyQE.js → vue-ui-sparkbar-C-evQIq2.js} +81 -81
  68. package/dist/{vue-ui-sparkgauge-CHbbxg13.js → vue-ui-sparkgauge-DycVSHAs.js} +4 -4
  69. package/dist/{vue-ui-sparkhistogram-BxYes64D.js → vue-ui-sparkhistogram-CZLnlSUD.js} +4 -4
  70. package/dist/{vue-ui-sparkline-CS3F5TFN.js → vue-ui-sparkline-C1nZRVTa.js} +169 -169
  71. package/dist/{vue-ui-sparkstackbar-CUSBwkUS.js → vue-ui-sparkstackbar-CUUeuwAI.js} +3 -3
  72. package/dist/{vue-ui-stackbar-CDihyp-i.js → vue-ui-stackbar-D27Wq8Y4.js} +9 -9
  73. package/dist/{vue-ui-strip-plot-D6MFuKnN.js → vue-ui-strip-plot-D-srKJUr.js} +7 -7
  74. package/dist/{vue-ui-table-COT59wVb.js → vue-ui-table-LcImk124.js} +4 -4
  75. package/dist/{vue-ui-table-heatmap--e8yw5yS.js → vue-ui-table-heatmap-BfXe_f0K.js} +5 -5
  76. package/dist/{vue-ui-table-sparkline-DnSLwUNN.js → vue-ui-table-sparkline-DyrnPNGv.js} +4 -4
  77. package/dist/{vue-ui-thermometer-ByiRARW0.js → vue-ui-thermometer-DxRDmz-L.js} +7 -7
  78. package/dist/{vue-ui-timer-DOQVdVN2.js → vue-ui-timer-Bbzb09O8.js} +5 -5
  79. package/dist/{vue-ui-tiremarks-BFXeJQNZ.js → vue-ui-tiremarks-DWy1Dkub.js} +6 -6
  80. package/dist/{vue-ui-treemap-s_O9rQUT.js → vue-ui-treemap-C3Ek_E4n.js} +8 -8
  81. package/dist/{vue-ui-vertical-bar-Bn-m5GKU.js → vue-ui-vertical-bar-CV3Mc1cX.js} +9 -9
  82. package/dist/{vue-ui-waffle-DmxaWHSw.js → vue-ui-waffle-D2mQJdcV.js} +8 -8
  83. package/dist/{vue-ui-wheel-zJ5U-h_D.js → vue-ui-wheel-zbog7bII.js} +6 -6
  84. package/dist/{vue-ui-word-cloud-BEnkOZdv.js → vue-ui-word-cloud-D9iZRkQP.js} +6 -6
  85. package/dist/{vue-ui-world-CkqoTL4V.js → vue-ui-world-D5dR5VdK.js} +6 -6
  86. package/dist/{vue-ui-xy-Uqdl2nk-.js → vue-ui-xy-Cll76_i9.js} +404 -414
  87. package/dist/{vue-ui-xy-canvas-cIU8Y1sD.js → vue-ui-xy-canvas-DJVXAfpL.js} +10 -10
  88. package/package.json +1 -1
  89. package/dist/vue-ui-spark-trend-GML5JJxY.js +0 -315
@@ -1,17 +1,17 @@
1
1
  import { defineAsyncComponent as ee, ref as c, computed as L, useSlots as ea, onMounted as dl, watch as D, nextTick as hl, shallowRef as Me, onBeforeUnmount as la, createElementBlock as de, openBlock as S, unref as p, normalizeClass as aa, normalizeStyle as le, createCommentVNode as H, createElementVNode as Y, createBlock as F, createSlots as yl, withCtx as m, renderSlot as k, normalizeProps as V, guardReactiveProps as G, createVNode as fl, Teleport as ta, toDisplayString as Oe, resolveDynamicComponent as oa, mergeProps as ua, createTextVNode as gl } from "vue";
2
- import { u as sa, c as ra, a as na, p as Z, b as ia, C as xe, d as va, D as Re, k as ae, i as te, e as pl, a7 as ca, G as da, ah as ha, o as ya, f as fa, y as ml, v as ga, w as pa, z as ma, s as he, l as ba } from "./index-Lg17rmB1.js";
2
+ import { u as sa, c as ra, a as na, p as Z, b as ia, C as xe, d as va, D as Re, k as ae, i as te, e as pl, a7 as ca, G as da, ah as ha, o as ya, f as fa, y as ml, v as ga, w as pa, z as ma, s as he, l as ba } from "./index-smzxfsyV.js";
3
3
  import { d as xa, t as La, u as ka, c as Ca, a as bl, l as C, r as De, b as P, p as xl } from "./useResponsive-DfdjqQps.js";
4
- import { u as Ll } from "./useNestedProp-DpwLJMsW.js";
5
- import { u as wa } from "./usePrinter-DGI4Mlad.js";
4
+ import { u as Ll } from "./useNestedProp-DeKmJzsE.js";
5
+ import { u as wa } from "./usePrinter-nFj0xF0a.js";
6
6
  import { u as Sa } from "./useUserOptionState-BIvW1Kz7.js";
7
7
  import { u as za } from "./useChartAccessibility-9icAAmYg.js";
8
- import $a from "./Legend-CjdnJGHq.js";
9
- import Ta from "./Title-BVMfF0uu.js";
10
- import { S as Ia } from "./Slicer-BJkhMBk4.js";
11
- import Ma from "./vue-ui-accordion-BJG-ogQj.js";
8
+ import $a from "./Legend-h35dp0Qf.js";
9
+ import Ta from "./Title-B_WMW2Bp.js";
10
+ import { S as Ia } from "./Slicer-CQB967He.js";
11
+ import Ma from "./vue-ui-accordion-7cfJUVx5.js";
12
12
  import { u as Oa } from "./useTimeLabels-BGFjWgrv.js";
13
- import Ra from "./img-CeCjiMpr.js";
14
- import Da from "./BaseIcon-7s-tCFcQ.js";
13
+ import Ra from "./img-BArHHegM.js";
14
+ import Da from "./BaseIcon-BPiT94Lb.js";
15
15
  import { _ as Fa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
16
16
  const Pa = ["id"], Ea = ["id"], Aa = ["id"], Na = ["onClick"], Ha = {
17
17
  key: 3,
@@ -34,7 +34,7 @@ const Pa = ["id"], Ea = ["id"], Aa = ["id"], Na = ["onClick"], Ha = {
34
34
  },
35
35
  emits: ["selectLegend"],
36
36
  setup(Fe, { expose: kl, emit: Cl }) {
37
- const wl = ee(() => import("./DataTable-Dw6dxJk3.js")), Sl = ee(() => import("./NonSvgPenAndPaper-tX2IXHuz.js")), zl = ee(() => import("./vue-ui-skeleton-fqG3bKSz.js")), $l = ee(() => import("./Tooltip-DBvmoYXU.js")), Tl = ee(() => import("./UserOptions-CKzW9w0Q.js")), Il = ee(() => import("./BaseDraggableDialog-CrCjMg89.js")), { vue_ui_xy_canvas: Ml } = sa(), g = Fe, _ = c(ra()), I = c(null), oe = c(null), n = c(null), y = c(1), E = c(1), ye = c(!1), d = c(null), fe = c(""), Pe = c(null), $ = c([]), j = c(1), B = c(!0), q = c(!0), Le = c(null), Ee = c(0), Ae = c(0), ue = c(!1), Ne = c(null), He = c(null), Ye = c(null), _e = c(null), ke = c(0), Ce = c(0), we = c(0), M = c(null), Be = c(!1), se = c(null), Se = c(null), ge = L(() => !!g.dataset && g.dataset.length), Ol = Cl, Rl = ea();
37
+ const wl = ee(() => import("./DataTable-CywujQw9.js")), Sl = ee(() => import("./NonSvgPenAndPaper-CvnlQ378.js")), zl = ee(() => import("./vue-ui-skeleton-CpkwgALO.js")), $l = ee(() => import("./Tooltip-Db9jy0Iu.js")), Tl = ee(() => import("./UserOptions-CtECQwBN.js")), Il = ee(() => import("./BaseDraggableDialog-CkjMZyIs.js")), { vue_ui_xy_canvas: Ml } = sa(), g = Fe, _ = c(ra()), I = c(null), oe = c(null), n = c(null), y = c(1), E = c(1), ye = c(!1), d = c(null), fe = c(""), Pe = c(null), $ = c([]), j = c(1), B = c(!0), q = c(!0), Le = c(null), Ee = c(0), Ae = c(0), ue = c(!1), Ne = c(null), He = c(null), Ye = c(null), _e = c(null), ke = c(0), Ce = c(0), we = c(0), M = c(null), Be = c(!1), se = c(null), Se = c(null), ge = L(() => !!g.dataset && g.dataset.length), Ol = Cl, Rl = ea();
38
38
  dl(() => {
39
39
  Rl["chart-background"] && console.warn("VueUiXyCanvas does not support the #chart-background slot.");
40
40
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vue-data-ui",
3
3
  "private": false,
4
- "version": "3.1.17",
4
+ "version": "3.1.18",
5
5
  "type": "module",
6
6
  "description": "A user-empowering data visualization Vue 3 components library for eloquent data storytelling",
7
7
  "keywords": [
@@ -1,315 +0,0 @@
1
- import { defineAsyncComponent as de, ref as f, toRefs as fe, computed as u, watch as X, onMounted as ce, createElementBlock as o, openBlock as s, normalizeStyle as he, createCommentVNode as c, createBlock as ye, unref as r, createVNode as pe, createElementVNode as S, renderSlot as J, toDisplayString as K } from "vue";
2
- import { u as ge, c as me, t as ke, b as be, a7 as D, o as Q, f as _e, h as y, a8 as we, X as $e, s as O, V as Y, i as ee, k as xe } from "./index-Lg17rmB1.js";
3
- import { t as Le, u as Ce } from "./useResponsive-DfdjqQps.js";
4
- import { u as Ae, B as Te } from "./BaseScanner-BgWxam9d.js";
5
- import { u as Se } from "./useFitSvgText-2crs6Fv5.js";
6
- import { u as te } from "./useNestedProp-DpwLJMsW.js";
7
- import { _ as Ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- const ze = ["id"], Me = ["xmlns", "viewBox"], Fe = ["width", "height"], Ie = ["id"], Ee = ["stop-color"], Ve = ["stop-color"], je = { key: 1 }, Be = ["d", "fill"], De = ["d", "fill"], Oe = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], Ge = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], Re = ["d"], Ze = ["fill", "d"], We = ["x", "y", "width", "height"], He = ["x", "y", "fill", "font-size", "font-weight"], Ue = ["stroke", "cx", "cy", "fill"], qe = ["x", "y", "font-size", "fill", "font-weight"], Pe = {
9
- __name: "vue-ui-spark-trend",
10
- props: {
11
- config: {
12
- type: Object,
13
- default() {
14
- return {};
15
- }
16
- },
17
- dataset: {
18
- type: Array,
19
- default() {
20
- return [];
21
- }
22
- }
23
- },
24
- setup(le) {
25
- const ae = de(() => import("./PackageVersion-D1HToLlZ.js")), { vue_ui_spark_trend: ne } = ge(), p = le, N = f(null), G = f(null), R = f(null), _ = f(null), x = f(null), L = f(me()), e = f(z()), { loading: g, FINAL_DATASET: w, manualLoading: Z } = Ae({
26
- ...fe(p),
27
- FINAL_CONFIG: e,
28
- prepareConfig: z,
29
- skeletonDataset: [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233],
30
- skeletonConfig: ke({
31
- defaultConfig: e.value,
32
- userConfig: {
33
- style: {
34
- animation: { show: !1 },
35
- backgroundColor: "#99999930",
36
- line: {
37
- stroke: "#6A6A6A",
38
- useColorTrend: !1
39
- },
40
- dataLabel: { show: !1, useColorTrend: !1, color: "#6A6A6A" }
41
- }
42
- }
43
- })
44
- });
45
- function z() {
46
- const t = te({
47
- userConfig: p.config,
48
- defaultConfig: ne
49
- });
50
- return t.theme ? {
51
- ...te({
52
- userConfig: be.vue_ui_spark_trend[t.theme] || p.config,
53
- defaultConfig: t
54
- })
55
- } : t;
56
- }
57
- const m = u(() => D({
58
- data: w.value,
59
- threshold: e.value.downsample.threshold
60
- }));
61
- X(() => p.config, (t) => {
62
- e.value = z(), I.value = e.value.style.width, k.value = e.value.style.height, H();
63
- }, { deep: !0 }), X(() => w.value, (t) => {
64
- $.value = D({
65
- data: w.value,
66
- threshold: e.value.downsample.threshold
67
- }).map((a) => [void 0, 1 / 0, -1 / 0, null, NaN].includes(a) ? null : a), W(), j(".vue-ui-sparktrend-progress-label", 6);
68
- }, { deep: !0 });
69
- function M(t) {
70
- return t.map((a) => y(a));
71
- }
72
- const $ = f(D({
73
- data: w.value,
74
- threshold: e.value.downsample.threshold
75
- }).map((t) => e.value.style.animation.show || [void 0, 1 / 0, -1 / 0, null, NaN].includes(t) ? null : t)), C = f(!1), F = f(null);
76
- function W() {
77
- let a = 1e3 / e.value.style.animation.animationFrames, d = performance.now();
78
- if (!g.value && e.value.style.animation.show && e.value.style.animation.animationFrames && w.value.length > 1) {
79
- let B = function() {
80
- C.value = !0;
81
- let q = performance.now(), P = q - d;
82
- P > a ? (d = q - P % a, b < m.value.length ? ($.value.push(m.value[b]), b += 1, F.value = requestAnimationFrame(B)) : (cancelAnimationFrame(F.value), $.value = M(m.value), C.value = !1, j(".vue-ui-sparktrend-progress-label", 6))) : F.value = requestAnimationFrame(B);
83
- };
84
- $.value = [];
85
- let b = 0;
86
- B();
87
- }
88
- }
89
- ce(() => {
90
- H();
91
- });
92
- const ue = u(() => e.value.debug);
93
- function H() {
94
- if (Q(p.dataset) && (_e({
95
- componentName: "VueUiSparkTrend",
96
- type: "dataset",
97
- debug: ue.value
98
- }), Z.value = !0), Q(p.dataset) || (Z.value = !1), e.value.responsive) {
99
- const t = Le(() => {
100
- const { width: a, height: d } = Ce({
101
- chart: N.value,
102
- source: R.value
103
- });
104
- requestAnimationFrame(() => {
105
- I.value = a, k.value = d;
106
- });
107
- });
108
- _.value && (x.value && _.value.unobserve(x.value), _.value.disconnect()), _.value = new ResizeObserver(t), x.value = N.value.parentNode, _.value.observe(x.value);
109
- }
110
- W(), j(".vue-ui-sparktrend-progress-label", 6);
111
- }
112
- const I = f(e.value.style.width), k = f(e.value.style.height), i = u(() => ({
113
- height: k.value,
114
- width: I.value
115
- })), n = u(() => ({
116
- top: e.value.style.padding.top,
117
- left: e.value.style.padding.left,
118
- right: i.value.width - e.value.style.padding.right,
119
- bottom: i.value.height - e.value.style.padding.bottom,
120
- height: i.value.height - (e.value.style.padding.top + e.value.style.padding.bottom) - (e.value.style.dataLabel.show ? e.value.style.dataLabel.fontSize : 0),
121
- width: i.value.width - (e.value.style.padding.left + e.value.style.padding.right)
122
- })), E = u(() => {
123
- const t = M(m.value);
124
- return {
125
- max: Math.max(...t.map((a) => y(a))),
126
- min: Math.min(...t.map((a) => y(a)))
127
- };
128
- }), A = u(() => {
129
- const t = E.value.min >= 0 ? 0 : E.value.min;
130
- return Math.abs(t);
131
- }), se = u(() => E.value.max + A.value);
132
- function U(t) {
133
- return t / se.value;
134
- }
135
- const oe = u(() => m.value.length), l = u(() => $.value.map((t, a) => {
136
- const d = isNaN(t) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t) ? 0 : t || 0;
137
- return {
138
- value: y(t),
139
- absoluteValue: y(d),
140
- plotValue: y(d + A.value),
141
- toMax: U(d + A.value),
142
- x: n.value.left + y(a * (n.value.width / (oe.value - 1))) - e.value.style.padding.right,
143
- y: n.value.bottom - y(n.value.height * U(d + A.value))
144
- };
145
- })), T = u(() => {
146
- const t = M(m.value);
147
- return e.value.style.trendLabel.trendType === "global" ? we(t) : e.value.style.trendLabel.trendType === "n-1" && t.length > 1 ? (t.at(-1) / t.at(-2) - 1) * 100 : e.value.style.trendLabel.trendType === "lastToFirst" ? (t.at(-1) / t[0] - 1) * 100 : 0;
148
- }), V = u(() => C.value || T.value === 0 ? "neutral" : T.value > 0 ? "positive" : "negative"), h = u(() => e.value.style.arrow.colors[V.value]), re = u(() => {
149
- const t = { x: l.value[0].x, y: i.value.height - 6 }, a = { x: l.value[l.value.length - 1].x, y: i.value.height - 6 }, d = [];
150
- return l.value.forEach((b) => {
151
- d.push(`${b.x},${b.y} `);
152
- }), [t.x, t.y, ...d, a.x, a.y].toString();
153
- }), ie = u(() => {
154
- let t = [];
155
- return l.value.forEach((a) => {
156
- t.push(`${a.x},${a.y} `);
157
- }), `M ${t.toString()}`;
158
- }), v = u(() => k.value / 2 - e.value.style.trendLabel.fontSize), ve = u(() => n.value.left * 0.8), { fitText: j } = Se({
159
- svgRef: G,
160
- unitWidth: ve,
161
- fontSize: e.value.style.trendLabel.fontSize
162
- });
163
- return (t, a) => (s(), o("div", {
164
- ref_key: "sparkTrendChart",
165
- ref: N,
166
- class: "vue-ui-spark-trend",
167
- id: L.value,
168
- style: he(`width:100%;font-family:${e.value.style.fontFamily};background:${e.value.style.backgroundColor}`)
169
- }, [
170
- (s(), o("svg", {
171
- ref_key: "svgRef",
172
- ref: G,
173
- xmlns: r($e),
174
- viewBox: `0 0 ${i.value.width} ${i.value.height}`,
175
- style: "width:100%;background:transparent;overflow:visible"
176
- }, [
177
- pe(r(ae)),
178
- t.$slots["chart-background"] ? (s(), o("foreignObject", {
179
- key: 0,
180
- x: 0,
181
- y: 0,
182
- width: i.value.width <= 0 ? 10 : i.value.width,
183
- height: i.value.height <= 0 ? 10 : i.value.height,
184
- style: {
185
- pointerEvents: "none"
186
- }
187
- }, [
188
- J(t.$slots, "chart-background", {}, void 0, !0)
189
- ], 8, Fe)) : c("", !0),
190
- S("defs", null, [
191
- S("linearGradient", {
192
- x1: "0%",
193
- y1: "0%",
194
- x2: "0%",
195
- y2: "100%",
196
- id: `pill_gradient_${L.value}`
197
- }, [
198
- S("stop", {
199
- offset: "0%",
200
- "stop-color": r(O)(e.value.style.line.useColorTrend ? h.value : e.value.style.line.stroke, e.value.style.area.opacity)
201
- }, null, 8, Ee),
202
- S("stop", {
203
- offset: "100%",
204
- "stop-color": e.value.style.backgroundColor
205
- }, null, 8, Ve)
206
- ], 8, Ie)
207
- ]),
208
- e.value.style.area.show && l.value[0] ? (s(), o("g", je, [
209
- e.value.style.line.smooth ? (s(), o("path", {
210
- key: 0,
211
- d: `M ${l.value[0].x},${n.value.bottom} ${r(Y)(l.value)} L ${l.value.at(-1).x},${n.value.bottom} Z`,
212
- fill: e.value.style.area.useGradient ? `url(#pill_gradient_${L.value})` : r(O)(e.value.style.line.useColorTrend ? h.value : e.value.style.line.stroke, e.value.style.area.opacity),
213
- stroke: "none"
214
- }, null, 8, Be)) : (s(), o("path", {
215
- key: 1,
216
- d: `M${re.value}Z`,
217
- fill: e.value.style.area.useGradient ? `url(#pill_gradient_${L.value})` : r(O)(e.value.style.line.useColorTrend ? h.value : e.value.style.line.stroke, e.value.style.area.opacity),
218
- stroke: "none"
219
- }, null, 8, De))
220
- ])) : c("", !0),
221
- e.value.style.line.smooth && l.value.length ? (s(), o("path", {
222
- key: 2,
223
- d: `M ${r(Y)(l.value)}`,
224
- stroke: e.value.style.line.useColorTrend ? h.value : e.value.style.line.stroke,
225
- fill: "none",
226
- "stroke-width": e.value.style.line.strokeWidth,
227
- "stroke-linecap": e.value.style.line.strokeLinecap,
228
- "stroke-linejoin": e.value.style.line.strokeLinejoin
229
- }, null, 8, Oe)) : c("", !0),
230
- !e.value.style.line.smooth && l.value.length ? (s(), o("path", {
231
- key: 3,
232
- d: ie.value,
233
- stroke: e.value.style.line.useColorTrend ? h.value : e.value.style.line.stroke,
234
- fill: "none",
235
- "stroke-width": e.value.style.line.strokeWidth,
236
- "stroke-linecap": e.value.style.line.strokeLinecap,
237
- "stroke-linejoin": e.value.style.line.strokeLinejoin
238
- }, null, 8, Ge)) : c("", !0),
239
- r(g) ? (s(), o("path", {
240
- key: 4,
241
- fill: "#6A6A6A",
242
- d: `M ${n.value.left / 2 + 6}, ${v.value + 7} ${n.value.left / 2 - 7}, ${v.value} ${n.value.left / 2 - 7}, ${v.value + 14} Z`
243
- }, null, 8, Re)) : (s(), o("path", {
244
- key: 5,
245
- fill: h.value,
246
- d: V.value === "positive" ? `M ${n.value.left / 2}, ${v.value} ${n.value.left / 2 - 7}, ${v.value + 12} ${n.value.left / 2 + 7}, ${v.value + 12} Z` : V.value === "negative" ? `M ${n.value.left / 2}, ${v.value + 12} ${n.value.left / 2 - 7}, ${v.value} ${n.value.left / 2 + 7}, ${v.value} Z` : `M ${n.value.left / 2 + 6}, ${v.value + 7} ${n.value.left / 2 - 7}, ${v.value} ${n.value.left / 2 - 7}, ${v.value + 14} Z`
247
- }, null, 8, Ze)),
248
- r(g) ? (s(), o("rect", {
249
- key: 6,
250
- x: n.value.left / 2 - e.value.style.trendLabel.fontSize - 2,
251
- y: k.value / 2 + e.value.style.trendLabel.fontSize - 2,
252
- width: e.value.style.trendLabel.fontSize * 2,
253
- height: e.value.style.trendLabel.fontSize,
254
- fill: "#6A6A6A80",
255
- rx: "3"
256
- }, null, 8, We)) : c("", !0),
257
- !C.value && !r(g) ? (s(), o("text", {
258
- key: 7,
259
- class: "vue-ui-sparktrend-progress-label",
260
- x: n.value.left / 2,
261
- y: k.value / 2 + e.value.style.trendLabel.fontSize * 2,
262
- "text-anchor": "middle",
263
- fill: e.value.style.trendLabel.useColorTrend ? h.value : e.value.style.trendLabel.color,
264
- "font-size": e.value.style.trendLabel.fontSize,
265
- "font-weight": e.value.style.trendLabel.bold ? "bold" : "normal"
266
- }, K(r(ee)({
267
- p: T.value > 0 ? "+" : "",
268
- v: T.value,
269
- s: "%",
270
- r: e.value.style.trendLabel.rounding
271
- })), 9, He)) : c("", !0),
272
- l.value.length && l.value.at(-1).x !== void 0 ? (s(), o("circle", {
273
- key: 8,
274
- stroke: e.value.style.backgroundColor,
275
- "stroke-width": 2,
276
- cx: l.value.at(-1).x,
277
- cy: l.value.at(-1).y,
278
- r: 4,
279
- fill: r(g) ? "#6A6A6A" : h.value
280
- }, null, 8, Ue)) : c("", !0),
281
- l.value.length && l.value.at(-1).x !== void 0 && e.value.style.dataLabel.show ? (s(), o("text", {
282
- key: 9,
283
- "text-anchor": "middle",
284
- x: l.value.at(-1).x,
285
- y: l.value.at(-1).y - e.value.style.dataLabel.fontSize / 1.5,
286
- "font-size": e.value.style.dataLabel.fontSize,
287
- fill: e.value.style.dataLabel.useColorTrend ? h.value : e.value.style.dataLabel.color,
288
- "font-weight": e.value.style.dataLabel.bold ? "bold" : "normal"
289
- }, K(r(xe)(
290
- e.value.style.dataLabel.formatter,
291
- l.value.at(-1).value,
292
- r(ee)({
293
- p: e.value.style.dataLabel.prefix,
294
- v: l.value.at(-1).value,
295
- s: e.value.style.dataLabel.suffix,
296
- r: e.value.style.dataLabel.rounding
297
- }),
298
- { datapoint: l.value.at(-1) }
299
- )), 9, qe)) : c("", !0)
300
- ], 8, Me)),
301
- t.$slots.source ? (s(), o("div", {
302
- key: 0,
303
- ref_key: "source",
304
- ref: R,
305
- dir: "auto"
306
- }, [
307
- J(t.$slots, "source", {}, void 0, !0)
308
- ], 512)) : c("", !0),
309
- r(g) ? (s(), ye(Te, { key: 1 })) : c("", !0)
310
- ], 12, ze));
311
- }
312
- }, lt = /* @__PURE__ */ Ne(Pe, [["__scopeId", "data-v-7034e800"]]);
313
- export {
314
- lt as default
315
- };