vue-data-ui 2.3.90 → 2.3.92
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.
- package/README.md +3 -2
- package/dist/{Arrow-C_Fnn6al.js → Arrow-16rQhq4i.js} +1 -1
- package/dist/{Arrow-D1pymKl6.cjs → Arrow-CdJD01md.cjs} +1 -1
- package/dist/{BaseIcon-BMfi5PnL.js → BaseIcon-CAmYNoaf.js} +1 -1
- package/dist/{BaseIcon-CnFXP_n9.cjs → BaseIcon-dYWMubrH.cjs} +1 -1
- package/dist/{DataTable-Cmbf3abv.js → DataTable-BXnbua0J.js} +2 -2
- package/dist/{DataTable-cOEA6Z37.cjs → DataTable-oa0Srfuc.cjs} +1 -1
- package/dist/{Legend-CCq0mNRg.js → Legend-Cr1hulgT.js} +1 -1
- package/dist/{Legend-XqP6-7Ac.cjs → Legend-Dhm9_peB.cjs} +1 -1
- package/dist/PackageVersion-BVZfgDqm.js +10 -0
- package/dist/PackageVersion-BkgJVmj1.cjs +1 -0
- package/dist/{Shape-BNocET8E.js → Shape-D75m5xWM.js} +1 -1
- package/dist/{Shape-B51JGReT.cjs → Shape-hGbEoQOv.cjs} +1 -1
- package/dist/{Slicer-Bc7OWCcl.cjs → Slicer-B7ya0m2Q.cjs} +1 -1
- package/dist/{Slicer-BKszZXjM.js → Slicer-Bx8AozB8.js} +2 -2
- package/dist/{Title-DlBwa3-X.js → Title-1Sw6EmHy.js} +1 -1
- package/dist/{Title-BaR4XyXa.cjs → Title-Bjrh7khe.cjs} +1 -1
- package/dist/{Tooltip-CX57w9Q9.cjs → Tooltip-CPATjuur.cjs} +1 -1
- package/dist/{Tooltip-w32n-8sY.js → Tooltip-EJf3VBPR.js} +1 -1
- package/dist/documentation/installation.md +1 -1
- package/dist/index-D09qCApg.cjs +4 -0
- package/dist/{index-DQl1TFXa.js → index-DhJby8wL.js} +8 -3
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +16 -0
- package/dist/types/vue-data-ui.d.ts +16 -0
- package/dist/{useNestedProp-DlCe_zZz.cjs → useNestedProp-Bwd7mK1Z.cjs} +1 -1
- package/dist/{useNestedProp-lmeFt-ev.js → useNestedProp-CrHvyupb.js} +1 -1
- package/dist/{usePrinter-DgKGVvJC.js → usePrinter-Bwm8J3RQ.js} +1 -1
- package/dist/{usePrinter-BmXrEJ99.cjs → usePrinter-DdsPm5a4.cjs} +1 -1
- package/dist/{vue-data-ui-Byrb_Y3k.js → vue-data-ui-CLxne31S.js} +57 -57
- package/dist/{vue-data-ui-DQurgvN8.cjs → vue-data-ui-ZitCqVgG.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-DAv5cYGJ.cjs +19 -0
- package/dist/{vue-ui-3d-bar-CM_usP2U.js → vue-ui-3d-bar-Dg87_AAm.js} +148 -146
- package/dist/{vue-ui-accordion-DRI-fN6I.cjs → vue-ui-accordion-BAHX7KzB.cjs} +1 -1
- package/dist/{vue-ui-accordion-CroZrm7T.js → vue-ui-accordion-Cn5Jbplg.js} +3 -3
- package/dist/vue-ui-age-pyramid-GzHwQzsH.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-BZU-WI_a.js → vue-ui-age-pyramid-PlamQWqC.js} +83 -81
- package/dist/{vue-ui-annotator-BpzM25VY.cjs → vue-ui-annotator-DGgQwl-K.cjs} +1 -1
- package/dist/{vue-ui-annotator-CsfYgmrC.js → vue-ui-annotator-Dd5KF_cy.js} +1 -1
- package/dist/vue-ui-candlestick-BIEB2J1w.cjs +2 -0
- package/dist/{vue-ui-candlestick-BPi7aBEf.js → vue-ui-candlestick-DTzwPhV5.js} +113 -111
- package/dist/{vue-ui-carousel-table-CpodLcgX.cjs → vue-ui-carousel-table-HNTf5AYY.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-tbviS8Fo.js → vue-ui-carousel-table-YEfvPESA.js} +4 -4
- package/dist/vue-ui-chestnut-DzjdAYsT.cjs +6 -0
- package/dist/{vue-ui-chestnut-ql9yEs6j.js → vue-ui-chestnut-PzMOM7mp.js} +161 -159
- package/dist/{vue-ui-cursor-B3w0SgJP.cjs → vue-ui-cursor-C5rsiCdn.cjs} +1 -1
- package/dist/{vue-ui-cursor-Dw7_R_Pd.js → vue-ui-cursor-DWea2yXV.js} +2 -2
- package/dist/{vue-ui-dashboard-enrB5B3P.cjs → vue-ui-dashboard-BqXhoS8m.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DAY0cdat.js → vue-ui-dashboard-CVespiTo.js} +2 -2
- package/dist/{vue-ui-digits-DN6CRpXc.js → vue-ui-digits-gNKgZqYU.js} +2 -2
- package/dist/{vue-ui-digits-3Q6uZCzD.cjs → vue-ui-digits-wmDN7Vkf.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-CzBvVRKG.js → vue-ui-donut-evolution-Ch6HH0ja.js} +102 -100
- package/dist/vue-ui-donut-evolution-DhDxLZ1J.cjs +1 -0
- package/dist/vue-ui-donut-n37BZPxr.cjs +1 -0
- package/dist/{vue-ui-donut-B3yDJvZI.js → vue-ui-donut-sQunZI1L.js} +118 -116
- package/dist/vue-ui-dumbbell-B9Z_pjnG.cjs +9 -0
- package/dist/{vue-ui-dumbbell-vQ5YRGwJ.js → vue-ui-dumbbell-lFlZX8Yi.js} +88 -86
- package/dist/vue-ui-flow-BaFpUJg-.cjs +1 -0
- package/dist/{vue-ui-flow-DAOKURA6.js → vue-ui-flow-CSIOC-JR.js} +65 -63
- package/dist/vue-ui-galaxy-BIR5GxIc.cjs +1 -0
- package/dist/{vue-ui-galaxy-B86BK1JM.js → vue-ui-galaxy-DL2mnel_.js} +82 -80
- package/dist/{vue-ui-gauge-n8TilFo9.js → vue-ui-gauge-BMq7KT3t.js} +56 -54
- package/dist/vue-ui-gauge-r_qvpwE7.cjs +1 -0
- package/dist/vue-ui-gizmo-DBas_Sw_.cjs +1 -0
- package/dist/{vue-ui-gizmo-CFIBlG4V.js → vue-ui-gizmo-Dj7zvNI1.js} +32 -30
- package/dist/{vue-ui-heatmap-ZkmD9EAg.js → vue-ui-heatmap-pqBYIrxm.js} +99 -97
- package/dist/vue-ui-heatmap-qPgEhAzc.cjs +1 -0
- package/dist/{vue-ui-kpi-D6Myg0y1.cjs → vue-ui-kpi-Cmo9J7wp.cjs} +1 -1
- package/dist/{vue-ui-kpi-CtJ3t6GX.js → vue-ui-kpi-ZPBinMiF.js} +3 -3
- package/dist/{vue-ui-mini-loader-BjJ_YYZj.cjs → vue-ui-mini-loader-Ce-jbgMT.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-Cosy9XjR.js → vue-ui-mini-loader-DOTWhLi9.js} +2 -2
- package/dist/vue-ui-molecule-D429iwPP.cjs +1 -0
- package/dist/{vue-ui-molecule-DTFOBjgC.js → vue-ui-molecule-RDpgNrHQ.js} +77 -75
- package/dist/{vue-ui-mood-radar-J_dI9m_i.js → vue-ui-mood-radar-CD5L8WCU.js} +76 -74
- package/dist/vue-ui-mood-radar-CdLJxrkT.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-CtqU4xxu.js → vue-ui-nested-donuts-A-tid5cQ.js} +112 -110
- package/dist/vue-ui-nested-donuts-DyM3uc7x.cjs +17 -0
- package/dist/vue-ui-onion-BKql8oal.cjs +5 -0
- package/dist/{vue-ui-onion-BMo0Ye54.js → vue-ui-onion-Cap01Ehu.js} +82 -80
- package/dist/vue-ui-parallel-coordinate-plot-B0zMgtnq.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-yKLZbDS5.js → vue-ui-parallel-coordinate-plot-CcDKe4L0.js} +91 -89
- package/dist/{vue-ui-quadrant-BrRasVaj.js → vue-ui-quadrant-BDEfAeyJ.js} +141 -139
- package/dist/vue-ui-quadrant-CZzdpeQ2.cjs +1 -0
- package/dist/{vue-ui-quick-chart-uH33UIjX.js → vue-ui-quick-chart-DlAUYg5u.js} +166 -164
- package/dist/vue-ui-quick-chart-DpGYUyhq.cjs +15 -0
- package/dist/{vue-ui-radar-BJ3qMHP4.js → vue-ui-radar-CbTln7gs.js} +89 -87
- package/dist/vue-ui-radar-oBeaHlpT.cjs +1 -0
- package/dist/{vue-ui-rating-BEWaQMBR.cjs → vue-ui-rating-BU7-F3_e.cjs} +1 -1
- package/dist/{vue-ui-rating-BFskhiyh.js → vue-ui-rating-BkDncqow.js} +2 -2
- package/dist/{vue-ui-relation-circle-DdK4qk0P.js → vue-ui-relation-circle-C5B6UNGd.js} +54 -52
- package/dist/vue-ui-relation-circle-IWiJWgcB.cjs +1 -0
- package/dist/{vue-ui-rings-BqHSq6Wt.js → vue-ui-rings-BujVUJ90.js} +97 -93
- package/dist/{vue-ui-rings-D_T_D6AS.cjs → vue-ui-rings-Df2cRgD8.cjs} +2 -2
- package/dist/{vue-ui-scatter-C0gfF6NJ.js → vue-ui-scatter-D6yqZJ7s.js} +132 -130
- package/dist/vue-ui-scatter-jFTeM2hW.cjs +1 -0
- package/dist/{vue-ui-screenshot-6tOLntj9.js → vue-ui-screenshot-CHAySwpv.js} +1 -1
- package/dist/{vue-ui-screenshot-CbvIYfYU.cjs → vue-ui-screenshot-CVu8IM33.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BVJGmYjj.js → vue-ui-skeleton-ASX40MGk.js} +423 -388
- package/dist/vue-ui-skeleton-CAlTn_Cg.cjs +41 -0
- package/dist/{vue-ui-smiley-2EoxEmXW.js → vue-ui-smiley-DGVzhza2.js} +2 -2
- package/dist/{vue-ui-smiley-CUgH2tnV.cjs → vue-ui-smiley-dwCqhB0r.cjs} +1 -1
- package/dist/vue-ui-spark-trend-A1EHFK_r.cjs +1 -0
- package/dist/{vue-ui-spark-trend-DjNPMOkN.js → vue-ui-spark-trend-B7XhDvTj.js} +42 -40
- package/dist/{vue-ui-sparkbar-BBm3DE1P.js → vue-ui-sparkbar-BuNcvi66.js} +53 -51
- package/dist/vue-ui-sparkbar-CwNjHOjD.cjs +1 -0
- package/dist/vue-ui-sparkgauge-ISu154lS.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-IIW24eJQ.js → vue-ui-sparkgauge-JY2kB9WX.js} +31 -29
- package/dist/vue-ui-sparkhistogram-C8zyC-ii.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-DVXxA6ji.js → vue-ui-sparkhistogram-DyEPWxkP.js} +69 -67
- package/dist/vue-ui-sparkline-DL3Thtc4.cjs +1 -0
- package/dist/{vue-ui-sparkline-CH89kcaa.js → vue-ui-sparkline-DYC3sdvQ.js} +65 -63
- package/dist/{vue-ui-sparkstackbar-Bcod5yu_.js → vue-ui-sparkstackbar-7TmtP3WR.js} +46 -44
- package/dist/vue-ui-sparkstackbar-ChIM9bn2.cjs +1 -0
- package/dist/{vue-ui-stackbar-Djjcgtyg.js → vue-ui-stackbar-CP5C6Gb_.js} +128 -126
- package/dist/vue-ui-stackbar-DrtiSaNc.cjs +6 -0
- package/dist/vue-ui-strip-plot-BMYMIHGu.cjs +1 -0
- package/dist/{vue-ui-strip-plot-ByPCQ4xk.js → vue-ui-strip-plot-DJQCq_KE.js} +78 -76
- package/dist/{vue-ui-table-B6Kpda3o.cjs → vue-ui-table-D6hvgMif.cjs} +1 -1
- package/dist/{vue-ui-table-D8Sm2fzX.js → vue-ui-table-IJi0xaVg.js} +1 -1
- package/dist/{vue-ui-table-heatmap-DjEN0l12.cjs → vue-ui-table-heatmap-BZNKXZNs.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-mlq_J56h.js → vue-ui-table-heatmap-Ls8_xq0D.js} +4 -4
- package/dist/{vue-ui-table-sparkline-DByva7rj.cjs → vue-ui-table-sparkline-BQFK30H1.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DF29_qZk.js → vue-ui-table-sparkline-BeuvdssX.js} +5 -5
- package/dist/vue-ui-thermometer-DKm8SXlE.cjs +1 -0
- package/dist/{vue-ui-thermometer-BKf-rGuS.js → vue-ui-thermometer-DPWIvG92.js} +80 -78
- package/dist/{vue-ui-timer-B8jW8M60.js → vue-ui-timer-CEzDvZf7.js} +62 -60
- package/dist/vue-ui-timer-n6lv7oTx.cjs +64 -0
- package/dist/vue-ui-tiremarks-B33mHXZN.cjs +1 -0
- package/dist/{vue-ui-tiremarks-riEfve5q.js → vue-ui-tiremarks-BUGoY22W.js} +51 -49
- package/dist/vue-ui-treemap-DPxBZUUr.cjs +1 -0
- package/dist/{vue-ui-treemap-5F0ynBnb.js → vue-ui-treemap-DmOYjJ_F.js} +93 -91
- package/dist/vue-ui-vertical-bar-BJMYX8t4.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-CxRBvHZy.js → vue-ui-vertical-bar-BpVKdSY5.js} +110 -108
- package/dist/vue-ui-waffle-DGcueccy.cjs +1 -0
- package/dist/{vue-ui-waffle-B8G4i5WH.js → vue-ui-waffle-ULg6SwPx.js} +72 -70
- package/dist/vue-ui-wheel-CWKq-CFW.cjs +1 -0
- package/dist/{vue-ui-wheel-DmzkGeCY.js → vue-ui-wheel-DlmgZd-_.js} +43 -41
- package/dist/vue-ui-word-cloud-BhHWdmqP.cjs +1 -0
- package/dist/vue-ui-word-cloud-DWyboczt.js +574 -0
- package/dist/vue-ui-xy-Cz81fw_E.cjs +3 -0
- package/dist/{vue-ui-xy-iUQyB_PL.js → vue-ui-xy-V13Ns1gv.js} +507 -504
- package/dist/{vue-ui-xy-canvas-nraUv13Y.js → vue-ui-xy-canvas-B9cRe5gT.js} +10 -10
- package/dist/{vue-ui-xy-canvas-CCwtKYgd.cjs → vue-ui-xy-canvas-GiuHOyj5.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-B8EMsnjU.cjs +0 -4
- package/dist/vue-ui-3d-bar-Ce-Re50D.cjs +0 -19
- package/dist/vue-ui-age-pyramid-C08rTXJn.cjs +0 -1
- package/dist/vue-ui-candlestick-m8fjxbj-.cjs +0 -2
- package/dist/vue-ui-chestnut-Y0gQvbbf.cjs +0 -6
- package/dist/vue-ui-donut-CCm7GJsm.cjs +0 -1
- package/dist/vue-ui-donut-evolution-DiN8Jm0n.cjs +0 -1
- package/dist/vue-ui-dumbbell-lb72j7bY.cjs +0 -9
- package/dist/vue-ui-flow-B5Gxaqvl.cjs +0 -1
- package/dist/vue-ui-galaxy-Ck5cPkrh.cjs +0 -1
- package/dist/vue-ui-gauge-BwIhwSUw.cjs +0 -1
- package/dist/vue-ui-gizmo-DrGaoiM_.cjs +0 -1
- package/dist/vue-ui-heatmap-BLc6thGZ.cjs +0 -1
- package/dist/vue-ui-molecule-CAj1HFit.cjs +0 -1
- package/dist/vue-ui-mood-radar-CV2in2wO.cjs +0 -1
- package/dist/vue-ui-nested-donuts-4vO23n9z.cjs +0 -17
- package/dist/vue-ui-onion-B3mtn6xf.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-DFMbhLY9.cjs +0 -8
- package/dist/vue-ui-quadrant-CpJX1Jwa.cjs +0 -1
- package/dist/vue-ui-quick-chart-CTxsI2tk.cjs +0 -15
- package/dist/vue-ui-radar-DFjsXmJ3.cjs +0 -1
- package/dist/vue-ui-relation-circle-DXuKdCih.cjs +0 -1
- package/dist/vue-ui-scatter-DPByFMNL.cjs +0 -1
- package/dist/vue-ui-skeleton-Bli7jLZ7.cjs +0 -41
- package/dist/vue-ui-spark-trend-sfgUJ32Q.cjs +0 -1
- package/dist/vue-ui-sparkbar-CKWYzriN.cjs +0 -1
- package/dist/vue-ui-sparkgauge-D0q9F9Nz.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-CywhBkm2.cjs +0 -1
- package/dist/vue-ui-sparkline-Besp8Ffy.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-qXm8Ozzm.cjs +0 -1
- package/dist/vue-ui-stackbar-D0fGVkCR.cjs +0 -6
- package/dist/vue-ui-strip-plot-XDj8rL9m.cjs +0 -1
- package/dist/vue-ui-thermometer-C3T56ras.cjs +0 -1
- package/dist/vue-ui-timer-B_ZvV1ON.cjs +0 -64
- package/dist/vue-ui-tiremarks-DRbSpTgq.cjs +0 -1
- package/dist/vue-ui-treemap-CtKUTs2G.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BBIWdeXH.cjs +0 -4
- package/dist/vue-ui-waffle-9a3C4Nj-.cjs +0 -1
- package/dist/vue-ui-wheel-CErxlmqw.cjs +0 -1
- package/dist/vue-ui-word-cloud-dMBTVGVk.js +0 -513
- package/dist/vue-ui-word-cloud-nmx846H2.cjs +0 -1
- package/dist/vue-ui-xy-CLYgZk3Y.cjs +0 -3
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { computed as g, ref as x, watch as P, onMounted as q, nextTick as H, openBlock as r, createElementBlock as v, normalizeStyle as p, unref as s, renderSlot as z, normalizeProps as L, mergeProps as X, createCommentVNode as d, createElementVNode as c, toDisplayString as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { computed as g, ref as x, watch as P, onMounted as q, nextTick as H, openBlock as r, createElementBlock as v, normalizeStyle as p, unref as s, renderSlot as z, normalizeProps as L, mergeProps as X, createCommentVNode as d, createElementVNode as c, toDisplayString as f, Fragment as O, renderList as R, guardReactiveProps as J, createVNode as K, createBlock as Q } from "vue";
|
|
2
|
+
import { u as Y, c as Z, t as ee, a as te, p as k, b as le, o as ae, e as T, g as oe, d as se, s as b, i as w, f as _, X as ue, w as ne } from "./index-DhJby8wL.js";
|
|
3
|
+
import { u as V } from "./useNestedProp-CrHvyupb.js";
|
|
4
|
+
import ie from "./vue-ui-skeleton-ASX40MGk.js";
|
|
5
|
+
import { _ as re } from "./PackageVersion-BVZfgDqm.js";
|
|
6
|
+
const ve = ["onClick"], ce = { key: 1 }, de = ["xmlns", "viewBox"], pe = ["id"], fe = ["stop-color"], ye = ["stop-color"], me = ["height", "width", "fill", "rx"], ge = ["height", "width", "fill", "rx"], he = ["height", "width", "fill", "rx"], be = {
|
|
6
7
|
__name: "vue-ui-sparkbar",
|
|
7
8
|
props: {
|
|
8
9
|
config: {
|
|
@@ -26,45 +27,45 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
26
27
|
}
|
|
27
28
|
},
|
|
28
29
|
emits: ["selectDatapoint"],
|
|
29
|
-
setup(
|
|
30
|
-
const a =
|
|
30
|
+
setup(C, { emit: E }) {
|
|
31
|
+
const a = C, { vue_ui_sparkbar: B } = Y(), $ = g(() => !!a.dataset && a.dataset.length), S = x(Z()), e = g({
|
|
31
32
|
get: () => A(),
|
|
32
33
|
set: (t) => t
|
|
33
34
|
});
|
|
34
35
|
function A() {
|
|
35
|
-
const t =
|
|
36
|
+
const t = V({
|
|
36
37
|
userConfig: a.config,
|
|
37
38
|
defaultConfig: B
|
|
38
39
|
});
|
|
39
40
|
return t.theme ? {
|
|
40
|
-
...
|
|
41
|
-
userConfig:
|
|
41
|
+
...V({
|
|
42
|
+
userConfig: ee.vue_ui_sparkbar[t.theme] || a.config,
|
|
42
43
|
defaultConfig: t
|
|
43
44
|
}),
|
|
44
|
-
customPalette:
|
|
45
|
+
customPalette: te[t.theme] || k
|
|
45
46
|
} : t;
|
|
46
47
|
}
|
|
47
48
|
P(() => a.config, (t) => {
|
|
48
49
|
e.value = A();
|
|
49
50
|
}, { deep: !0 });
|
|
50
|
-
const M = g(() =>
|
|
51
|
+
const M = g(() => le(e.value.customPalette)), y = x(a.dataset.map((t) => ({
|
|
51
52
|
...t,
|
|
52
53
|
value: e.value.style.animation.show ? 0 : t.value || 0,
|
|
53
54
|
formatter: t.formatter || null
|
|
54
|
-
}))),
|
|
55
|
+
}))), N = x(null);
|
|
55
56
|
q(async () => {
|
|
56
|
-
|
|
57
|
+
ae(a.dataset) && T({
|
|
57
58
|
componentName: "VueUiSparkbar",
|
|
58
59
|
type: "dataset"
|
|
59
|
-
}),
|
|
60
|
+
}), D();
|
|
60
61
|
});
|
|
61
|
-
function
|
|
62
|
+
function D() {
|
|
62
63
|
if (e.value.style.animation.show) {
|
|
63
64
|
let I = function() {
|
|
64
|
-
i += l / t, i < l ? (
|
|
65
|
+
i += l / t, i < l ? (y.value = y.value.map((u, h) => ({
|
|
65
66
|
...u,
|
|
66
67
|
value: u.value += o[h]
|
|
67
|
-
})),
|
|
68
|
+
})), N.value = requestAnimationFrame(I)) : y.value = a.dataset.map((u) => ({
|
|
68
69
|
...u,
|
|
69
70
|
value: u.value || 0,
|
|
70
71
|
formatter: u.formatter || null
|
|
@@ -76,17 +77,17 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
P(() => a.dataset, async (t) => {
|
|
79
|
-
cancelAnimationFrame(
|
|
80
|
+
cancelAnimationFrame(N.value), y.value = a.dataset.map((o) => ({
|
|
80
81
|
...o,
|
|
81
82
|
value: e.value.style.animation.show ? 0 : o.value || 0,
|
|
82
83
|
formatter: o.formatter || null
|
|
83
|
-
})), H(
|
|
84
|
+
})), H(D);
|
|
84
85
|
}, { deep: !0 });
|
|
85
86
|
const n = x({
|
|
86
87
|
width: 500,
|
|
87
88
|
height: 16
|
|
88
89
|
}), U = g(() => Math.max(...a.dataset.map((t) => t.value))), j = g(() => (a.dataset.forEach((t, o) => {
|
|
89
|
-
|
|
90
|
+
oe({
|
|
90
91
|
datasetObject: t,
|
|
91
92
|
requiredAttributes: ["name", "value"]
|
|
92
93
|
}).forEach((l) => {
|
|
@@ -97,28 +98,28 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
97
98
|
index: o
|
|
98
99
|
});
|
|
99
100
|
});
|
|
100
|
-
}),
|
|
101
|
+
}), y.value.map((t, o) => ({
|
|
101
102
|
...t,
|
|
102
103
|
value: t.value || 0,
|
|
103
|
-
color:
|
|
104
|
+
color: se(t.color) || M.value[o] || k[o] || k[o % k.length]
|
|
104
105
|
}))));
|
|
105
106
|
function G(t) {
|
|
106
107
|
return t / U.value;
|
|
107
108
|
}
|
|
108
|
-
function
|
|
109
|
+
function F(t) {
|
|
109
110
|
return e.value.style.layout.independant ? t.target ? t.value / t.target : e.value.style.layout.percentage ? t.value > 100 ? 1 : t.value / 100 : e.value.style.layout.target === 0 ? 1 : t.value / e.value.style.layout.target : G(t.value);
|
|
110
111
|
}
|
|
111
112
|
function m(t) {
|
|
112
113
|
return e.value.style.layout.independant && t.target || e.value.style.layout.target;
|
|
113
114
|
}
|
|
114
115
|
function W(t, o) {
|
|
115
|
-
|
|
116
|
+
E("selectDatapoint", { datapoint: t, index: o });
|
|
116
117
|
}
|
|
117
118
|
return (t, o) => (r(), v("div", {
|
|
118
119
|
style: p({
|
|
119
120
|
width: "100%",
|
|
120
121
|
fontFamily: e.value.style.fontFamily,
|
|
121
|
-
background: a.backgroundOpacity !== null ? s(
|
|
122
|
+
background: a.backgroundOpacity !== null ? s(b)(e.value.style.backgroundColor, a.backgroundOpacity) : e.value.style.backgroundColor
|
|
122
123
|
})
|
|
123
124
|
}, [
|
|
124
125
|
t.$slots.title ? z(t.$slots, "title", L(X({ key: 0 }, { title: { ...t.title, title: e.value.style.title.text, subtitle: e.value.style.title.subtitle.text } }))) : d("", !0),
|
|
@@ -138,7 +139,7 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
138
139
|
color: e.value.style.title.color,
|
|
139
140
|
fontWeight: e.value.style.title.bold ? "bold" : "normal"
|
|
140
141
|
})
|
|
141
|
-
},
|
|
142
|
+
}, f(e.value.style.title.text), 5),
|
|
142
143
|
e.value.style.title.subtitle.text ? (r(), v("div", {
|
|
143
144
|
key: 0,
|
|
144
145
|
class: "vue-ui-sparkbar-subtitle",
|
|
@@ -147,12 +148,12 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
147
148
|
color: e.value.style.title.subtitle.color,
|
|
148
149
|
fontWeight: e.value.style.title.subtitle.bold ? "bold" : "normal"
|
|
149
150
|
})
|
|
150
|
-
},
|
|
151
|
+
}, f(e.value.style.title.subtitle.text), 5)) : d("", !0)
|
|
151
152
|
], 4)) : d("", !0),
|
|
152
153
|
(r(!0), v(O, null, R(j.value, (l, i) => (r(), v(O, null, [
|
|
153
154
|
$.value ? (r(), v("div", {
|
|
154
155
|
key: 0,
|
|
155
|
-
style: p(`display:flex !important;${["left", "right"].includes(e.value.style.labels.name.position) ? `flex-direction: ${e.value.style.labels.name.position === "right" ? "row-reverse" : "row"} !important` : "flex-direction:column !important"};gap:${e.value.style.gap}px !important;align-items:center;${
|
|
156
|
+
style: p(`display:flex !important;${["left", "right"].includes(e.value.style.labels.name.position) ? `flex-direction: ${e.value.style.labels.name.position === "right" ? "row-reverse" : "row"} !important` : "flex-direction:column !important"};gap:${e.value.style.gap}px !important;align-items:center;${C.dataset.length > 0 && i !== C.dataset.length - 1 ? "margin-bottom:6px" : ""}`),
|
|
156
157
|
onClick: () => W(l, i)
|
|
157
158
|
}, [
|
|
158
159
|
z(t.$slots, "data-label", L(J({ bar: {
|
|
@@ -161,7 +162,7 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
161
162
|
valueLabel: s(w)(
|
|
162
163
|
l.formatter,
|
|
163
164
|
l.value,
|
|
164
|
-
s(
|
|
165
|
+
s(_)({
|
|
165
166
|
p: l.prefix || "",
|
|
166
167
|
v: l.value,
|
|
167
168
|
s: l.suffix || "",
|
|
@@ -172,7 +173,7 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
172
173
|
targetLabel: s(w)(
|
|
173
174
|
l.formatter,
|
|
174
175
|
m(l),
|
|
175
|
-
s(
|
|
176
|
+
s(_)({
|
|
176
177
|
p: l.prefix || "",
|
|
177
178
|
v: m(l),
|
|
178
179
|
s: l.suffix || "",
|
|
@@ -191,14 +192,14 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
191
192
|
textAlign: ["left", "right"].includes(e.value.style.labels.name.position) || ["top", "top-left"].includes(e.value.style.labels.name.position) ? "left" : e.value.style.labels.name.position === "top-center" ? "center" : "right"
|
|
192
193
|
})
|
|
193
194
|
}, [
|
|
194
|
-
c("span", null,
|
|
195
|
+
c("span", null, f(l.name), 1),
|
|
195
196
|
e.value.style.labels.value.show ? (r(), v("span", {
|
|
196
197
|
key: 0,
|
|
197
198
|
style: p(`font-weight:${e.value.style.labels.value.bold ? "bold" : "normal"}`)
|
|
198
|
-
}, ": " +
|
|
199
|
+
}, ": " + f(s(w)(
|
|
199
200
|
l.formatter,
|
|
200
201
|
l.value,
|
|
201
|
-
s(
|
|
202
|
+
s(_)({
|
|
202
203
|
p: l.prefix || "",
|
|
203
204
|
v: l.value,
|
|
204
205
|
s: l.suffix || "",
|
|
@@ -206,10 +207,10 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
206
207
|
}),
|
|
207
208
|
{ datapoint: l, seriesIndex: i }
|
|
208
209
|
)), 5)) : d("", !0),
|
|
209
|
-
e.value.style.layout.showTargetValue ? (r(), v("span",
|
|
210
|
+
e.value.style.layout.showTargetValue ? (r(), v("span", ce, f(" " + e.value.style.layout.targetValueText) + " " + f(s(w)(
|
|
210
211
|
l.formatter,
|
|
211
212
|
m(l),
|
|
212
|
-
s(
|
|
213
|
+
s(_)({
|
|
213
214
|
p: l.prefix || "",
|
|
214
215
|
v: m(l),
|
|
215
216
|
s: l.suffix || "",
|
|
@@ -219,10 +220,11 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
219
220
|
)), 1)) : d("", !0)
|
|
220
221
|
], 4)),
|
|
221
222
|
(r(), v("svg", {
|
|
222
|
-
xmlns: s(
|
|
223
|
+
xmlns: s(ue),
|
|
223
224
|
viewBox: `0 0 ${n.value.width} ${n.value.height}`,
|
|
224
225
|
width: "100%"
|
|
225
226
|
}, [
|
|
227
|
+
K(re),
|
|
226
228
|
c("defs", null, [
|
|
227
229
|
c("linearGradient", {
|
|
228
230
|
x1: "0%",
|
|
@@ -233,42 +235,42 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
233
235
|
}, [
|
|
234
236
|
c("stop", {
|
|
235
237
|
offset: "0%",
|
|
236
|
-
"stop-color": s(
|
|
237
|
-
}, null, 8,
|
|
238
|
+
"stop-color": s(b)(s(ne)(l.color, 0.03), 100 - e.value.style.bar.gradient.intensity)
|
|
239
|
+
}, null, 8, fe),
|
|
238
240
|
c("stop", {
|
|
239
241
|
offset: "100%",
|
|
240
242
|
"stop-color": l.color
|
|
241
|
-
}, null, 8,
|
|
242
|
-
], 8,
|
|
243
|
+
}, null, 8, ye)
|
|
244
|
+
], 8, pe)
|
|
243
245
|
]),
|
|
244
246
|
c("rect", {
|
|
245
247
|
height: n.value.height,
|
|
246
248
|
width: n.value.width,
|
|
247
249
|
x: 0,
|
|
248
250
|
y: 0,
|
|
249
|
-
fill: s(
|
|
251
|
+
fill: s(b)(e.value.style.gutter.backgroundColor, e.value.style.gutter.opacity),
|
|
250
252
|
rx: n.value.height / 2
|
|
251
|
-
}, null, 8,
|
|
253
|
+
}, null, 8, me),
|
|
252
254
|
c("rect", {
|
|
253
255
|
height: n.value.height,
|
|
254
|
-
width: n.value.width *
|
|
256
|
+
width: n.value.width * F(l),
|
|
255
257
|
x: 0,
|
|
256
258
|
y: 0,
|
|
257
259
|
fill: e.value.style.bar.gradient.underlayerColor,
|
|
258
260
|
rx: n.value.height / 2
|
|
259
|
-
}, null, 8,
|
|
261
|
+
}, null, 8, ge),
|
|
260
262
|
c("rect", {
|
|
261
263
|
height: n.value.height,
|
|
262
|
-
width: n.value.width *
|
|
264
|
+
width: n.value.width * F(l),
|
|
263
265
|
x: 0,
|
|
264
266
|
y: 0,
|
|
265
267
|
fill: e.value.style.bar.gradient.show ? `url(#sparkbar_gradient_${i}_${S.value})` : l.color,
|
|
266
268
|
rx: n.value.height / 2
|
|
267
|
-
}, null, 8,
|
|
268
|
-
], 8,
|
|
269
|
-
], 12,
|
|
269
|
+
}, null, 8, he)
|
|
270
|
+
], 8, de))
|
|
271
|
+
], 12, ve)) : d("", !0)
|
|
270
272
|
], 64))), 256)),
|
|
271
|
-
$.value ? d("", !0) : (r(),
|
|
273
|
+
$.value ? d("", !0) : (r(), Q(ie, {
|
|
272
274
|
key: 2,
|
|
273
275
|
config: {
|
|
274
276
|
type: "sparkbar",
|
|
@@ -284,5 +286,5 @@ const ie = ["onClick"], re = { key: 1 }, ve = ["xmlns", "viewBox"], ce = ["id"],
|
|
|
284
286
|
}
|
|
285
287
|
};
|
|
286
288
|
export {
|
|
287
|
-
|
|
289
|
+
be as default
|
|
288
290
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-D09qCApg.cjs"),C=require("./useNestedProp-Bwd7mK1Z.cjs"),V=require("./vue-ui-skeleton-CAlTn_Cg.cjs"),D=require("./PackageVersion-BkgJVmj1.cjs"),$=["onClick"],z={key:1},L=["xmlns","viewBox"],P=["id"],A=["stop-color"],F=["stop-color"],O=["height","width","fill","rx"],I=["height","width","fill","rx"],T=["height","width","fill","rx"],q={__name:"vue-ui-sparkbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},backgroundOpacity:{type:Number,default:null}},emits:["selectDatapoint"],setup(p,{emit:b}){const n=p,{vue_ui_sparkbar:w}=o.useConfig(),v=e.computed(()=>!!n.dataset&&n.dataset.length),y=e.ref(o.createUid()),t=e.computed({get:()=>f(),set:l=>l});function f(){const l=C.useNestedProp({userConfig:n.config,defaultConfig:w});return l.theme?{...C.useNestedProp({userConfig:o.themes.vue_ui_sparkbar[l.theme]||n.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}e.watch(()=>n.config,l=>{t.value=f()},{deep:!0});const S=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),c=e.ref(n.dataset.map(l=>({...l,value:t.value.style.animation.show?0:l.value||0,formatter:l.formatter||null}))),g=e.ref(null);e.onMounted(async()=>{o.objectIsEmpty(n.dataset)&&o.error({componentName:"VueUiSparkbar",type:"dataset"}),h()});function h(){if(t.value.style.animation.show){let x=function(){s+=a/l,s<a?(c.value=c.value.map((u,m)=>({...u,value:u.value+=r[m]})),g.value=requestAnimationFrame(x)):c.value=n.dataset.map(u=>({...u,value:u.value||0,formatter:u.formatter||null}))};const l=t.value.style.animation.animationFrames,r=n.dataset.map((u,m)=>u.value/l),a=n.dataset.map(u=>u.value||0).reduce((u,m)=>u+m,0);let s=0;x()}}e.watch(()=>n.dataset,async l=>{cancelAnimationFrame(g.value),c.value=n.dataset.map(r=>({...r,value:t.value.style.animation.show?0:r.value||0,formatter:r.formatter||null})),e.nextTick(h)},{deep:!0});const i=e.ref({width:500,height:16}),_=e.computed(()=>Math.max(...n.dataset.map(l=>l.value))),N=e.computed(()=>(n.dataset.forEach((l,r)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkbar",type:"datasetSerieAttribute",property:a,index:r})})}),c.value.map((l,r)=>({...l,value:l.value||0,color:o.convertColorToHex(l.color)||S.value[r]||o.palette[r]||o.palette[r%o.palette.length]}))));function B(l){return l/_.value}function k(l){return t.value.style.layout.independant?l.target?l.value/l.target:t.value.style.layout.percentage?l.value>100?1:l.value/100:t.value.style.layout.target===0?1:l.value/t.value.style.layout.target:B(l.value)}function d(l){return t.value.style.layout.independant&&l.target||t.value.style.layout.target}function E(l,r){b("selectDatapoint",{datapoint:l,index:r})}return(l,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle({width:"100%",fontFamily:t.value.style.fontFamily,background:n.backgroundOpacity!==null?e.unref(o.setOpacity)(t.value.style.backgroundColor,n.backgroundOpacity):t.value.style.backgroundColor})},[l.$slots.title?e.renderSlot(l.$slots,"title",e.normalizeProps(e.mergeProps({key:0},{title:{...l.title,title:t.value.style.title.text,subtitle:t.value.style.title.subtitle.text}}))):e.createCommentVNode("",!0),!l.$slots.title&&t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:"vue-ui-sparkbar-title-container",style:e.normalizeStyle({background:t.value.style.title.backgroundColor,margin:t.value.style.title.margin,textAlign:t.value.style.title.textAlign})},[e.createElementVNode("div",{class:"vue-ui-sparkbar-title",style:e.normalizeStyle({fontSize:t.value.style.title.fontSize+"px",color:t.value.style.title.color,fontWeight:t.value.style.title.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-sparkbar-subtitle",style:e.normalizeStyle({fontSize:t.value.style.title.subtitle.fontSize+"px",color:t.value.style.title.subtitle.color,fontWeight:t.value.style.title.subtitle.bold?"bold":"normal"})},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(a,s)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`display:flex !important;${["left","right"].includes(t.value.style.labels.name.position)?`flex-direction: ${t.value.style.labels.name.position==="right"?"row-reverse":"row"} !important`:"flex-direction:column !important"};gap:${t.value.style.gap}px !important;align-items:center;${p.dataset.length>0&&s!==p.dataset.length-1?"margin-bottom:6px":""}`),onClick:()=>E(a,s)},[e.renderSlot(l.$slots,"data-label",e.normalizeProps(e.guardReactiveProps({bar:{...a,target:d(a),valueLabel:e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s}),targetLabel:e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s})}}))),l.$slots["data-label"]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({width:t.value.style.labels.name.width,color:t.value.style.labels.name.color,fontSize:t.value.style.labels.fontSize+"px",fontWeight:t.value.style.labels.name.bold?"bold":"normal",textAlign:["left","right"].includes(t.value.style.labels.name.position)||["top","top-left"].includes(t.value.style.labels.name.position)?"left":t.value.style.labels.name.position==="top-center"?"center":"right"})},[e.createElementVNode("span",null,e.toDisplayString(a.name),1),t.value.style.labels.value.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.labels.value.bold?"bold":"normal"}`)},": "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,a.value,e.unref(o.dataLabel)({p:a.prefix||"",v:a.value,s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s})),5)):e.createCommentVNode("",!0),t.value.style.layout.showTargetValue?(e.openBlock(),e.createElementBlock("span",z,e.toDisplayString(" "+t.value.style.layout.targetValueText)+" "+e.toDisplayString(e.unref(o.applyDataLabel)(a.formatter,d(a),e.unref(o.dataLabel)({p:a.prefix||"",v:d(a),s:a.suffix||"",r:a.rounding||0}),{datapoint:a,seriesIndex:s})),1)):e.createCommentVNode("",!0)],4)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(o.XMLNS),viewBox:`0 0 ${i.value.width} ${i.value.height}`,width:"100%"},[e.createVNode(D._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`sparkbar_gradient_${s}_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(a.color,.03),100-t.value.style.bar.gradient.intensity)},null,8,A),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,F)],8,P)]),e.createElementVNode("rect",{height:i.value.height,width:i.value.width,x:0,y:0,fill:e.unref(o.setOpacity)(t.value.style.gutter.backgroundColor,t.value.style.gutter.opacity),rx:i.value.height/2},null,8,O),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.underlayerColor,rx:i.value.height/2},null,8,I),e.createElementVNode("rect",{height:i.value.height,width:i.value.width*k(a),x:0,y:0,fill:t.value.style.bar.gradient.show?`url(#sparkbar_gradient_${s}_${y.value})`:a.color,rx:i.value.height/2},null,8,T)],8,L))],12,$)):e.createCommentVNode("",!0)],64))),256)),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(V.default,{key:2,config:{type:"sparkbar",style:{backgroundColor:t.value.style.backgroundColor,sparkbar:{color:"#CCCCCC"}}}},null,8,["config"]))],4))}};exports.default=q;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-D09qCApg.cjs"),b=require("./useNestedProp-Bwd7mK1Z.cjs"),w=require("./vue-ui-skeleton-CAlTn_Cg.cjs"),$=require("./PackageVersion-BkgJVmj1.cjs"),L=["xmlns","viewBox"],S=["id"],B=["stop-color"],E=["stop-color"],M=["d","stroke","stroke-linecap"],z=["d","stroke","stroke-linecap","stroke-dashoffset"],A=["x","y","font-size","fill","font-weight"],V={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(_){const o=_,{vue_ui_sparkgauge:x}=n.useConfig(),c=e.computed(()=>!!o.dataset&&Object.keys(o.dataset).length);e.onMounted(()=>{d()});function d(){n.objectIsEmpty(o.dataset)?n.error({componentName:"VueUiSparkgauge",type:"dataset"}):n.getMissingDatasetAttributes({datasetObject:o.dataset,requiredAttributes:["value","min","max"]}).forEach(a=>{n.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:a})})}const v=e.ref(n.createUid()),t=e.computed({get:()=>m(),set:a=>a});function m(){const a=b.useNestedProp({userConfig:o.config,defaultConfig:x});return a.theme?{...b.useNestedProp({userConfig:n.themes.vue_ui_sparkgauge[a.theme]||o.config,defaultConfig:a})}:a}e.watch(()=>o.config,a=>{t.value=m(),d()},{deep:!0});const u=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),s=e.computed(()=>{const a=o.dataset.min??0,r=o.dataset.max??0,N=r-a;return{min:a,max:r,diff:N}}),l=e.ref(t.value.style.animation.show?s.value.min:o.dataset.value);e.watch(()=>o.dataset.value,()=>{y(o.dataset.value||0)});const f=e.computed(()=>l.value>s.value.max?s.value.max:l.value<s.value.min?s.value.min:l.value),p=e.computed(()=>s.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{y(o.dataset.value||0)});function y(a){function r(){l.value<a?l.value=Math.min(l.value+p.value,a):l.value>a&&(l.value=Math.max(l.value-p.value,a)),l.value!==a&&requestAnimationFrame(r)}r()}const i=e.computed(()=>o.dataset.title??""),g=e.computed(()=>l.value>=0?(f.value-s.value.min)/s.value.diff:(Math.abs(s.value.min)-Math.abs(f.value))/s.value.diff),k=e.computed(()=>n.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,s.value.min,s.value.max,l.value)),h=e.computed(()=>t.value.style.dataLabel.autoColor?k.value:t.value.style.dataLabel.color),C=e.computed(()=>t.value.style.track.autoColor?k.value:t.value.style.track.color);return(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width: 100%; background:${t.value.style.background}`)},[t.value.style.title.show&&i.value&&t.value.style.title.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${u.value.width} ${u.value.height}`,style:"overflow: visible; background:transparent; width:100%;"},[e.createVNode($._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${v.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,B),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,E)],8,S)]),e.createElementVNode("path",{d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,M),g.value!==0?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${v.value})`:C.value,"stroke-width":8,"stroke-linecap":t.value.style.track.strokeLinecap,fill:"none","stroke-dasharray":169.5,"stroke-dashoffset":169.5-169.5*g.value,class:e.normalizeClass({"vue-ui-sparkgauge-track":t.value.style.animation.show}),style:e.normalizeStyle(t.value.style.animation.show?`animation: vue-ui-sparkgauge-animation ${t.value.style.animation.speedMs}ms ease-in;`:"")},null,14,z)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:u.value.width/2,y:u.value.base+6+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,fill:h.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.dataLabel.formatter,e.unref(n.checkNaN)(l.value),e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:e.unref(n.checkNaN)(l.value),s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:e.unref(n.checkNaN)(l.value),color:h.value})),9,A)],8,L)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&i.value&&t.value.style.title.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(i.value),5)):e.createCommentVNode("",!0)],4))}};exports.default=V;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { computed as s, onMounted as M, ref as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as z } from "./useNestedProp-
|
|
4
|
-
import Y from "./vue-ui-skeleton-
|
|
5
|
-
|
|
1
|
+
import { computed as s, onMounted as M, ref as N, watch as A, openBlock as i, createElementBlock as c, normalizeStyle as m, toDisplayString as y, createCommentVNode as d, unref as r, createVNode as D, createElementVNode as v, normalizeClass as E, createBlock as G } from "vue";
|
|
2
|
+
import { u as I, o as U, e as S, g as q, c as P, t as R, M as T, X, i as H, v as p, f as V } from "./index-DhJby8wL.js";
|
|
3
|
+
import { u as z } from "./useNestedProp-CrHvyupb.js";
|
|
4
|
+
import Y from "./vue-ui-skeleton-ASX40MGk.js";
|
|
5
|
+
import { _ as J } from "./PackageVersion-BVZfgDqm.js";
|
|
6
|
+
const K = ["xmlns", "viewBox"], Q = ["id"], W = ["stop-color"], Z = ["stop-color"], ee = ["d", "stroke", "stroke-linecap"], te = ["d", "stroke", "stroke-linecap", "stroke-dashoffset"], ae = ["x", "y", "font-size", "fill", "font-weight"], ie = {
|
|
6
7
|
__name: "vue-ui-sparkgauge",
|
|
7
8
|
props: {
|
|
8
9
|
config: {
|
|
@@ -19,15 +20,15 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
19
20
|
}
|
|
20
21
|
},
|
|
21
22
|
setup(F) {
|
|
22
|
-
const l = F, { vue_ui_sparkgauge: O } =
|
|
23
|
+
const l = F, { vue_ui_sparkgauge: O } = I(), g = s(() => !!l.dataset && Object.keys(l.dataset).length);
|
|
23
24
|
M(() => {
|
|
24
25
|
h();
|
|
25
26
|
});
|
|
26
27
|
function h() {
|
|
27
|
-
|
|
28
|
+
U(l.dataset) ? S({
|
|
28
29
|
componentName: "VueUiSparkgauge",
|
|
29
30
|
type: "dataset"
|
|
30
|
-
}) :
|
|
31
|
+
}) : q({
|
|
31
32
|
datasetObject: l.dataset,
|
|
32
33
|
requiredAttributes: ["value", "min", "max"]
|
|
33
34
|
}).forEach((t) => {
|
|
@@ -38,7 +39,7 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
38
39
|
});
|
|
39
40
|
});
|
|
40
41
|
}
|
|
41
|
-
const b =
|
|
42
|
+
const b = N(P()), e = s({
|
|
42
43
|
get: () => k(),
|
|
43
44
|
set: (t) => t
|
|
44
45
|
});
|
|
@@ -49,12 +50,12 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
49
50
|
});
|
|
50
51
|
return t.theme ? {
|
|
51
52
|
...z({
|
|
52
|
-
userConfig:
|
|
53
|
+
userConfig: R.vue_ui_sparkgauge[t.theme] || l.config,
|
|
53
54
|
defaultConfig: t
|
|
54
55
|
})
|
|
55
56
|
} : t;
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
+
A(() => l.config, (t) => {
|
|
58
59
|
e.value = k(), h();
|
|
59
60
|
}, { deep: !0 });
|
|
60
61
|
const u = s(() => ({
|
|
@@ -68,21 +69,21 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
68
69
|
max: n,
|
|
69
70
|
diff: B
|
|
70
71
|
};
|
|
71
|
-
}), a =
|
|
72
|
-
|
|
72
|
+
}), a = N(e.value.style.animation.show ? o.value.min : l.dataset.value);
|
|
73
|
+
A(() => l.dataset.value, () => {
|
|
73
74
|
C(l.dataset.value || 0);
|
|
74
75
|
});
|
|
75
|
-
const
|
|
76
|
+
const _ = s(() => a.value > o.value.max ? o.value.max : a.value < o.value.min ? o.value.min : a.value), x = s(() => o.value.diff / e.value.style.animation.speedMs);
|
|
76
77
|
M(() => {
|
|
77
78
|
C(l.dataset.value || 0);
|
|
78
79
|
});
|
|
79
80
|
function C(t) {
|
|
80
81
|
function n() {
|
|
81
|
-
a.value < t ? a.value = Math.min(a.value +
|
|
82
|
+
a.value < t ? a.value = Math.min(a.value + x.value, t) : a.value > t && (a.value = Math.max(a.value - x.value, t)), a.value !== t && requestAnimationFrame(n);
|
|
82
83
|
}
|
|
83
84
|
n();
|
|
84
85
|
}
|
|
85
|
-
const f = s(() => l.dataset.title ?? ""), $ = s(() => a.value >= 0 ? (
|
|
86
|
+
const f = s(() => l.dataset.title ?? ""), $ = s(() => a.value >= 0 ? (_.value - o.value.min) / o.value.diff : (Math.abs(o.value.min) - Math.abs(_.value)) / o.value.diff), w = s(() => T(e.value.style.colors.min, e.value.style.colors.max, o.value.min, o.value.max, a.value)), L = s(() => e.value.style.dataLabel.autoColor ? w.value : e.value.style.dataLabel.color), j = s(() => e.value.style.track.autoColor ? w.value : e.value.style.track.color);
|
|
86
87
|
return (t, n) => (i(), c("div", {
|
|
87
88
|
style: m(`font-family:${e.value.style.fontFamily};width: 100%; background:${e.value.style.background}`)
|
|
88
89
|
}, [
|
|
@@ -93,10 +94,11 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
93
94
|
}, y(f.value), 5)) : d("", !0),
|
|
94
95
|
g.value ? (i(), c("svg", {
|
|
95
96
|
key: 1,
|
|
96
|
-
xmlns: r(
|
|
97
|
+
xmlns: r(X),
|
|
97
98
|
viewBox: `0 0 ${u.value.width} ${u.value.height}`,
|
|
98
99
|
style: "overflow: visible; background:transparent; width:100%;"
|
|
99
100
|
}, [
|
|
101
|
+
D(J),
|
|
100
102
|
v("defs", null, [
|
|
101
103
|
v("linearGradient", {
|
|
102
104
|
id: `gradient_${b.value}`,
|
|
@@ -108,12 +110,12 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
108
110
|
v("stop", {
|
|
109
111
|
offset: "0%",
|
|
110
112
|
"stop-color": e.value.style.colors.min
|
|
111
|
-
}, null, 8,
|
|
113
|
+
}, null, 8, W),
|
|
112
114
|
v("stop", {
|
|
113
115
|
offset: "100%",
|
|
114
116
|
"stop-color": e.value.style.colors.max
|
|
115
|
-
}, null, 8,
|
|
116
|
-
], 8,
|
|
117
|
+
}, null, 8, Z)
|
|
118
|
+
], 8, Q)
|
|
117
119
|
]),
|
|
118
120
|
v("path", {
|
|
119
121
|
d: `M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,
|
|
@@ -121,7 +123,7 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
121
123
|
"stroke-width": 8,
|
|
122
124
|
"stroke-linecap": e.value.style.gutter.strokeLinecap,
|
|
123
125
|
fill: "none"
|
|
124
|
-
}, null, 8,
|
|
126
|
+
}, null, 8, ee),
|
|
125
127
|
$.value !== 0 ? (i(), c("path", {
|
|
126
128
|
key: 0,
|
|
127
129
|
d: `M10 ${u.value.base} A 1 1 0 1 1 118 ${u.value.base}`,
|
|
@@ -131,9 +133,9 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
131
133
|
fill: "none",
|
|
132
134
|
"stroke-dasharray": 169.5,
|
|
133
135
|
"stroke-dashoffset": 169.5 - 169.5 * $.value,
|
|
134
|
-
class:
|
|
136
|
+
class: E({ "vue-ui-sparkgauge-track": e.value.style.animation.show }),
|
|
135
137
|
style: m(e.value.style.animation.show ? `animation: vue-ui-sparkgauge-animation ${e.value.style.animation.speedMs}ms ease-in;` : "")
|
|
136
|
-
}, null, 14,
|
|
138
|
+
}, null, 14, te)) : d("", !0),
|
|
137
139
|
v("text", {
|
|
138
140
|
"text-anchor": "middle",
|
|
139
141
|
x: u.value.width / 2,
|
|
@@ -141,19 +143,19 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
141
143
|
"font-size": e.value.style.dataLabel.fontSize,
|
|
142
144
|
fill: L.value,
|
|
143
145
|
"font-weight": e.value.style.dataLabel.bold ? "bold" : "normal"
|
|
144
|
-
}, y(r(
|
|
146
|
+
}, y(r(H)(
|
|
145
147
|
e.value.style.dataLabel.formatter,
|
|
146
148
|
r(p)(a.value),
|
|
147
|
-
r(
|
|
149
|
+
r(V)({
|
|
148
150
|
p: e.value.style.dataLabel.prefix,
|
|
149
151
|
v: r(p)(a.value),
|
|
150
152
|
s: e.value.style.dataLabel.suffix,
|
|
151
153
|
r: e.value.style.dataLabel.rounding
|
|
152
154
|
}),
|
|
153
155
|
{ datapoint: r(p)(a.value), color: L.value }
|
|
154
|
-
)), 9,
|
|
155
|
-
], 8,
|
|
156
|
-
g.value ? d("", !0) : (i(),
|
|
156
|
+
)), 9, ae)
|
|
157
|
+
], 8, K)) : d("", !0),
|
|
158
|
+
g.value ? d("", !0) : (i(), G(Y, {
|
|
157
159
|
key: 2,
|
|
158
160
|
config: {
|
|
159
161
|
type: "gauge",
|
|
@@ -174,5 +176,5 @@ const J = ["xmlns", "viewBox"], K = ["id"], Q = ["stop-color"], V = ["stop-color
|
|
|
174
176
|
}
|
|
175
177
|
};
|
|
176
178
|
export {
|
|
177
|
-
|
|
179
|
+
ie as default
|
|
178
180
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-D09qCApg.cjs"),_=require("./useNestedProp-Bwd7mK1Z.cjs"),F=require("./Shape-hGbEoQOv.cjs"),M=require("./vue-ui-skeleton-CAlTn_Cg.cjs"),O=require("./PackageVersion-BkgJVmj1.cjs"),A=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),H={key:0},q={key:1},I=["xmlns","viewBox"],U=["id"],W=["stop-color"],P=["stop-color"],j=["id"],G=["stop-color"],T=["stop-color"],X=["id"],Y=["stop-color"],R=["stop-color"],J={key:0},K=["x","y","height","width","fill","stroke","stroke-width","rx"],Q={key:1},Z=["x","y","font-size","font-weight","fill"],ee=["x","y","font-size","fill"],te=["x","y","font-size","fill"],le=["height","width","x","onMouseover","stroke","stroke-width","rx","stroke-dasharray","onClick"],oe={__name:"vue-ui-sparkhistogram",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(x,{emit:B}){const u=x;e.useCssVars(o=>({b8c0e060:S.value}));const{vue_ui_sparkhistogram:E}=a.useConfig(),h=e.computed(()=>!!u.dataset&&u.dataset.length);e.onMounted(()=>{k()});function k(){a.objectIsEmpty(u.dataset)?a.error({componentName:"VueUiSparkHistogram",type:"dataset"}):u.dataset.forEach((o,r)=>{a.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["value"]}).forEach(l=>{a.error({componentName:"VueUiSparkHistogram",type:"datasetSerieAttribute",property:l,index:r})})})}const v=e.ref(a.createUid()),t=e.computed({get:()=>b(),set:o=>o});function b(){const o=_.useNestedProp({userConfig:u.config,defaultConfig:E});return o.theme?{..._.useNestedProp({userConfig:a.themes.vue_ui_sparkhistogram[o.theme]||u.config,defaultConfig:o})}:o}e.watch(()=>u.config,o=>{t.value=b(),k()},{deep:!0});const c=e.computed(()=>{const o=t.value.style.layout.height,r=t.value.style.layout.width,l=t.value.style.layout.padding.top,s=o-t.value.style.layout.padding.bottom,d=t.value.style.layout.padding.left,y=r-t.value.style.layout.padding.right,p=l+(o-l-t.value.style.layout.padding.bottom)/2,f=o-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,m=r-t.value.style.layout.padding.left-t.value.style.layout.padding.right;return{bottom:s,centerY:p,drawingHeight:f,drawingWidth:m,height:o,left:d,right:y,top:l,width:r}}),w=e.computed(()=>Math.max(...u.dataset.map(o=>Math.abs(o.value||0))));function C(o){return Math.abs(o)/w.value}const i=e.computed(()=>u.dataset.map((o,r)=>{const l=C(o.value||0),s=c.value.drawingHeight*l,d=c.value.drawingWidth/u.dataset.length,y=d*(t.value.style.bars.gap/100),p=d-y,f=c.value.centerY-s/2,m=c.value.left+(y/2+r*d),$=c.value.left+r*d,g=typeof o.intensity>"u"?100:Math.round(o.intensity*100),N=o.color?o.color:o.value>=0?a.setOpacity(t.value.style.bars.colors.positive,g):a.setOpacity(t.value.style.bars.colors.negative,g),V=o.color?o.color:o.value>=0?t.value.style.bars.colors.positive:t.value.style.bars.colors.negative,z=o.color?`url(#gradient_datapoint_${r}_${v.value})`:o.value>=0?`url(#gradient_positive_${r}_${v.value})`:`url(#gradient_negative_${r}_${v.value})`,D=m+p/2;return{...o,color:N,gradient:z,height:s,intensity:g,proportion:l,stroke:V,textAnchor:D,trapX:$,unitWidth:d,width:p,x:m,y:f}})),n=e.ref(null);function L(o,r){B("selectDatapoint",{datapoint:o,index:r})}const S=e.computed(()=>`${t.value.style.animation.speedMs}ms`);return(o,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily}`),onMouseleave:r[1]||(r[1]=l=>n.value=null)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"}`)},[e.createTextVNode(e.toDisplayString(t.value.style.title.text)+" ",1),n.value!==null?(e.openBlock(),e.createElementBlock("span",H,"- "+e.toDisplayString(i.value[n.value].timeLabel||"")+" "+e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,i.value[n.value].value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:i.value[n.value].value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[n.value],seriesIndex:n.value})),1)):e.createCommentVNode("",!0),![void 0,null].includes(n.value)&&![null,void 0].includes(i.value[n.value].valueLabel)?(e.openBlock(),e.createElementBlock("span",q,"("+e.toDisplayString(i.value[n.value].valueLabel||0)+")",1)):e.createCommentVNode("",!0)],4),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${c.value.width} ${c.value.height}`,style:{overflow:"visible"}},[e.createVNode(O._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_positive_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.positive,.05),l.intensity)},null,8,W),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.positive,l.intensity)},null,8,P)],8,U))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_negative_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(t.value.style.bars.colors.negative,.05),l.intensity)},null,8,G),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(t.value.style.bars.colors.negative,l.intensity)},null,8,T)],8,j))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`gradient_datapoint_${s}_${v.value}`,cy:"50%",cx:"50%",r:"50%",fx:"50%",fy:"50%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(a.setOpacity)(e.unref(a.shiftHue)(l.color,.05),l.intensity)},null,8,Y),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(a.setOpacity)(l.color,l.intensity)},null,8,R)],8,X))),256))]),!t.value.style.bars.shape||t.value.style.bars.shape==="square"?(e.openBlock(),e.createElementBlock("g",J,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x,y:l.y,height:l.height,width:l.width,fill:t.value.style.bars.colors.gradient.show?l.gradient:l.color,stroke:l.stroke,"stroke-width":t.value.style.bars.strokeWidth,rx:`${t.value.style.bars.borderRadius*l.proportion/12}%`,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,10,K))),256))])):(e.openBlock(),e.createElementBlock("g",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createBlock(F._sfc_main,{plot:{x:l.x+l.width/2,y:l.y+l.height/2},color:t.value.style.bars.colors.gradient.show?l.gradient:l.color,shape:t.value.style.bars.shape,radius:l.height*.4,class:e.normalizeClass({"vue-ui-sparkhistogram-shape":t.value.style.animation.show})},null,8,["plot","color","shape","radius","class"]))),256))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle",x:l.textAnchor,y:l.y-t.value.style.labels.value.fontSize/3+t.value.style.labels.value.offsetY,"font-size":t.value.style.labels.value.fontSize,"font-weight":t.value.style.labels.value.bold?"bold":"normal",fill:t.value.style.labels.value.color},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.labels.value.formatter,l.value,e.unref(a.dataLabel)({p:t.value.style.labels.value.prefix,v:l.value,s:t.value.style.labels.value.suffix,r:t.value.style.labels.value.rounding}),{datapoint:i.value[n.value],seriesIndex:n.value})),9,Z))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.valueLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:l.y+l.height+t.value.style.labels.valueLabel.fontSize,"font-size":t.value.style.labels.valueLabel.fontSize,"text-anchor":"middle",fill:t.value.style.labels.valueLabel.color},e.toDisplayString(l.valueLabel),9,ee)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.timeLabel?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.textAnchor,y:c.value.height-t.value.style.labels.timeLabel.fontSize/2,"font-size":t.value.style.labels.timeLabel.fontSize,fill:t.value.style.labels.timeLabel.color,"text-anchor":"middle"},e.toDisplayString(l.timeLabel),9,te)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{height:c.value.height,width:l.unitWidth,fill:"transparent",x:l.trapX,y:0,onMouseover:d=>n.value=s,onMouseleave:r[0]||(r[0]=d=>n.value=null),stroke:n.value!==null&&n.value===s?t.value.style.selector.stroke:"","stroke-width":n.value!==null&&n.value===s?t.value.style.selector.strokeWidth:0,rx:t.value.style.selector.borderRadius,"stroke-dasharray":t.value.style.selector.strokeDasharray,onClick:()=>L(l,s)},null,40,le)]))),256))],8,I)):e.createCommentVNode("",!0),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:2,config:{type:"sparkHistogram",style:{backgroundColor:t.value.style.backgroundColor,sparkHistogram:{color:"#CCCCCC"}}}},null,8,["config"]))],36))}},ae=A._export_sfc(oe,[["__scopeId","data-v-eff7ec8f"]]);exports.default=ae;
|