vue-data-ui 2.3.28 → 2.3.29
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 +15 -0
- package/dist/{Arrow-C6lQ94rK.cjs → Arrow-B8z06v67.cjs} +1 -1
- package/dist/{Arrow-BPoxM_Tq.js → Arrow-Bh7WeO_g.js} +1 -1
- package/dist/{BaseIcon-Op8_v5x7.js → BaseIcon-BG_bJS3R.js} +1 -1
- package/dist/{BaseIcon-BK5xYOzV.cjs → BaseIcon-DDCJA3rm.cjs} +1 -1
- package/dist/{DataTable-bEXuvNn5.js → DataTable-CsPidn0_.js} +23 -20
- package/dist/DataTable-Doh_4M84.cjs +1 -0
- package/dist/{Legend-BNfS77GS.cjs → Legend-B20rRwGi.cjs} +1 -1
- package/dist/{Legend-DwludSgp.js → Legend-CkQ_zypV.js} +1 -1
- package/dist/{Shape-COYAxpcP.js → Shape-B4gGeBLI.js} +1 -1
- package/dist/{Shape-CcWWIf-s.cjs → Shape-B8O8_E6l.cjs} +1 -1
- package/dist/{Slicer-DGkm-5p-.cjs → Slicer-BXveU40S.cjs} +1 -1
- package/dist/{Slicer-Cv-2s_-r.js → Slicer-DaEfxscP.js} +1 -1
- package/dist/{Title-DQz9dO4d.cjs → Title-BU6E8Xld.cjs} +1 -1
- package/dist/{Title-CtWGLaoz.js → Title-eBTH8iGJ.js} +1 -1
- package/dist/{Tooltip-D6BUVHr1.js → Tooltip-B11OahTD.js} +1 -1
- package/dist/{Tooltip-DQgBkgFk.cjs → Tooltip-Oicp_EIo.cjs} +1 -1
- package/dist/{index-BhCM2QF1.js → index-BlXzlBwZ.js} +443 -364
- package/dist/index-hKWfT7Wa.cjs +4 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +65 -0
- package/dist/types/vue-data-ui.d.ts +65 -0
- package/dist/{useNestedProp-CH3PVhvc.js → useNestedProp-BoNl5H_z.js} +1 -1
- package/dist/{useNestedProp-C2H2jmU6.cjs → useNestedProp-Cggpoz7e.cjs} +1 -1
- package/dist/{usePrinter-B75HLwzw.js → usePrinter-CZ8F5Cth.js} +1 -1
- package/dist/{usePrinter-DTF28E03.cjs → usePrinter-DoYKBzst.cjs} +1 -1
- package/dist/{vue-data-ui-DdhV5Pth.js → vue-data-ui-BOqzG_nZ.js} +57 -57
- package/dist/{vue-data-ui-cqeqQWwY.cjs → vue-data-ui-CGgiWEo3.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +6 -6
- package/dist/{vue-ui-3d-bar-gi0fEJUl.js → vue-ui-3d-bar-CjnVg4YI.js} +342 -294
- package/dist/vue-ui-3d-bar-CpntMt7p.cjs +19 -0
- package/dist/{vue-ui-accordion-CVrj6roI.cjs → vue-ui-accordion-CTYvdLLH.cjs} +1 -1
- package/dist/{vue-ui-accordion-CSZdj7wA.js → vue-ui-accordion-wHRG3nXl.js} +3 -3
- package/dist/vue-ui-age-pyramid-DDiL1Zje.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CFSWDX3d.js → vue-ui-age-pyramid-vmCwgRy9.js} +258 -219
- package/dist/{vue-ui-annotator-DqZU11ky.js → vue-ui-annotator-9FGJdNLY.js} +1 -1
- package/dist/{vue-ui-annotator-u5YbenPl.cjs → vue-ui-annotator-DQ3wKf9n.cjs} +1 -1
- package/dist/{vue-ui-candlestick-C3xswSm3.cjs → vue-ui-candlestick-6joQ9JKQ.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Dph2PhZC.js → vue-ui-candlestick-DpMr2r0i.js} +9 -9
- package/dist/{vue-ui-carousel-table-0S6lSZnt.cjs → vue-ui-carousel-table-BV0EOLqU.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-eY08SE2G.js → vue-ui-carousel-table-CgR4ADOz.js} +4 -4
- package/dist/{vue-ui-chestnut-BikYCrjQ.js → vue-ui-chestnut-Ca2878kV.js} +439 -347
- package/dist/vue-ui-chestnut-CxoCcw_B.cjs +6 -0
- package/dist/{vue-ui-cursor-OFgeAFSo.js → vue-ui-cursor-BW8C6oUc.js} +2 -2
- package/dist/{vue-ui-cursor-DUA57VkZ.cjs → vue-ui-cursor-DxF_gXQf.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BTG0m9YL.cjs → vue-ui-dashboard-BGrVyITN.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DA4M1Z0-.js → vue-ui-dashboard-DN4nErBZ.js} +2 -2
- package/dist/{vue-ui-digits-55Zmunkv.js → vue-ui-digits-CmSFSs5S.js} +2 -2
- package/dist/{vue-ui-digits-COxRiMVI.cjs → vue-ui-digits-CpSKBG2c.cjs} +1 -1
- package/dist/vue-ui-donut-BqfRwAIM.js +857 -0
- package/dist/vue-ui-donut-C29yXH3H.cjs +1 -0
- package/dist/vue-ui-donut-evolution-COFG73Xl.cjs +1 -0
- package/dist/vue-ui-donut-evolution-DIR7yBUC.js +839 -0
- package/dist/{vue-ui-dumbbell-BSFT-Bce.cjs → vue-ui-dumbbell-1NA60u3h.cjs} +2 -2
- package/dist/{vue-ui-dumbbell-BtEXt5Ox.js → vue-ui-dumbbell-BASuPAvI.js} +202 -187
- package/dist/{vue-ui-flow-BPEGOFRZ.cjs → vue-ui-flow-DBK7d0DQ.cjs} +1 -1
- package/dist/{vue-ui-flow-BBoXBTkC.js → vue-ui-flow-wq0aqc5r.js} +98 -93
- package/dist/vue-ui-galaxy-BgdVvk4N.cjs +1 -0
- package/dist/{vue-ui-galaxy-ZFEufIyy.js → vue-ui-galaxy-CFQ2hQAl.js} +180 -144
- package/dist/{vue-ui-gauge-CfZ9XJW_.cjs → vue-ui-gauge-C4_kEbgg.cjs} +1 -1
- package/dist/{vue-ui-gauge-BqZp_V5m.js → vue-ui-gauge-CIN265dN.js} +158 -149
- package/dist/vue-ui-gizmo-BpT3iwC9.cjs +1 -0
- package/dist/{vue-ui-gizmo-DitbWAJp.js → vue-ui-gizmo-DRXWEpqU.js} +63 -49
- package/dist/vue-ui-heatmap-CVD7FVfk.cjs +1 -0
- package/dist/vue-ui-heatmap-Dc0ft_Ga.js +644 -0
- package/dist/{vue-ui-kpi-BWuzEkyY.js → vue-ui-kpi-DDL1TvBP.js} +19 -10
- package/dist/{vue-ui-kpi-B2Bo26hh.cjs → vue-ui-kpi-WDZIt76s.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BwAWiK3k.js → vue-ui-mini-loader-B2C5U55l.js} +2 -2
- package/dist/{vue-ui-mini-loader-C_Nb-qVd.cjs → vue-ui-mini-loader-BcGSpUfg.cjs} +1 -1
- package/dist/{vue-ui-molecule-CSbXNrvu.cjs → vue-ui-molecule-C5BmRi2R.cjs} +1 -1
- package/dist/{vue-ui-molecule-BD2UW2lJ.js → vue-ui-molecule-CD3cPNOq.js} +9 -9
- package/dist/{vue-ui-mood-radar-CbMab8pJ.js → vue-ui-mood-radar-D0KbeV5j.js} +213 -187
- package/dist/vue-ui-mood-radar-afS64zg-.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-SDaiotgC.js → vue-ui-nested-donuts-BGoc1RFX.js} +295 -228
- package/dist/vue-ui-nested-donuts-D-TeyOtL.cjs +17 -0
- package/dist/{vue-ui-onion-BamHJBdP.js → vue-ui-onion-B_khL0Kv.js} +230 -196
- package/dist/vue-ui-onion-CFdbWLu3.cjs +1 -0
- package/dist/{vue-ui-parallel-coordinate-plot-BaAa3t1h.cjs → vue-ui-parallel-coordinate-plot-BmXvVt8r.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-1R4CyBdQ.js → vue-ui-parallel-coordinate-plot-CP4V0K8m.js} +87 -87
- package/dist/{vue-ui-quadrant-CKCLhAS7.js → vue-ui-quadrant-C1YbjeI7.js} +455 -397
- package/dist/vue-ui-quadrant-C6-A8Gx_.cjs +1 -0
- package/dist/vue-ui-quick-chart-ConXdEsU.cjs +15 -0
- package/dist/vue-ui-quick-chart-CtWhs_2c.js +1374 -0
- package/dist/{vue-ui-radar-BY-y8Mal.js → vue-ui-radar-B2vAPYa7.js} +237 -214
- package/dist/vue-ui-radar-DMJLLVWb.cjs +1 -0
- package/dist/{vue-ui-rating-DGEgzOaB.cjs → vue-ui-rating-DhZ0tltR.cjs} +1 -1
- package/dist/{vue-ui-rating-Bq1SsByA.js → vue-ui-rating-xGz4av68.js} +9 -9
- package/dist/{vue-ui-relation-circle-BPzLP6U6.js → vue-ui-relation-circle-BQK8wMQE.js} +5 -5
- package/dist/{vue-ui-relation-circle-pdZ79G9r.cjs → vue-ui-relation-circle-hb4Q051h.cjs} +1 -1
- package/dist/vue-ui-rings-D1EW3d4M.cjs +2 -0
- package/dist/{vue-ui-rings-C5ce6pEf.js → vue-ui-rings-ZKjhNx5K.js} +191 -162
- package/dist/{vue-ui-scatter-CMetujXJ.js → vue-ui-scatter-CHONk8k0.js} +437 -381
- package/dist/vue-ui-scatter-CMRe2b2K.cjs +1 -0
- package/dist/{vue-ui-screenshot-BqzljUT3.cjs → vue-ui-screenshot-DcKhT745.cjs} +1 -1
- package/dist/{vue-ui-screenshot--2aeIH_x.js → vue-ui-screenshot-DmGe5ptH.js} +6 -6
- package/dist/{vue-ui-skeleton-_VMQ594N.js → vue-ui-skeleton-CJ2R5R6u.js} +37 -37
- package/dist/{vue-ui-skeleton-B5Z4craS.cjs → vue-ui-skeleton-j-IOiy5w.cjs} +1 -1
- package/dist/{vue-ui-smiley-CL-bubXk.cjs → vue-ui-smiley-D5Jn6d5f.cjs} +1 -1
- package/dist/{vue-ui-smiley-Cty3e_yE.js → vue-ui-smiley-DXVcosKR.js} +2 -2
- package/dist/{vue-ui-spark-trend-DT1fMqf_.cjs → vue-ui-spark-trend-CWH3W7h3.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-pgdWTEqG.js → vue-ui-spark-trend-Gg6TxR4m.js} +63 -58
- package/dist/vue-ui-sparkbar-BsoKTXr2.cjs +1 -0
- package/dist/vue-ui-sparkbar-DUx1qVzQ.js +280 -0
- package/dist/{vue-ui-sparkgauge-DdzlyDsm.cjs → vue-ui-sparkgauge-DPusPoRv.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-Dx2gFX6H.js → vue-ui-sparkgauge-xrvp9g87.js} +60 -50
- package/dist/vue-ui-sparkhistogram---JRg2R1.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-Bg_fJsT5.js → vue-ui-sparkhistogram-DzYXMNj8.js} +99 -90
- package/dist/{vue-ui-sparkline-WMI-RgkW.cjs → vue-ui-sparkline-1Z6GnwoN.cjs} +1 -1
- package/dist/{vue-ui-sparkline-BWl_B6LX.js → vue-ui-sparkline-CGWePkVI.js} +114 -105
- package/dist/{vue-ui-sparkstackbar-Skcshn6g.cjs → vue-ui-sparkstackbar-DCc68t8g.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-MMGRG9eS.js → vue-ui-sparkstackbar-DFgeRAbQ.js} +52 -47
- package/dist/{vue-ui-stackbar-NZFO3R77.js → vue-ui-stackbar-B0dWToaf.js} +211 -196
- package/dist/vue-ui-stackbar-Cz0mT8Mo.cjs +15 -0
- package/dist/{vue-ui-strip-plot-CJmCgC_a.js → vue-ui-strip-plot-BFqd-S7c.js} +213 -198
- package/dist/vue-ui-strip-plot-DZt1Wq20.cjs +1 -0
- package/dist/{vue-ui-table-jJ3daLHe.cjs → vue-ui-table-CMvyMuc4.cjs} +1 -1
- package/dist/{vue-ui-table-B-vHHlRw.js → vue-ui-table-DtwEoIzI.js} +9 -9
- package/dist/{vue-ui-table-heatmap-YCyFyq8J.cjs → vue-ui-table-heatmap-3RSMOHkc.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-BfzDb2H7.js → vue-ui-table-heatmap-C8b3pE04.js} +12 -12
- package/dist/vue-ui-table-sparkline-BKOaVFtt.cjs +1 -0
- package/dist/vue-ui-table-sparkline-BrqhBv29.js +467 -0
- package/dist/vue-ui-thermometer-CKgIqM5y.cjs +1 -0
- package/dist/{vue-ui-thermometer-CdtG1AoI.js → vue-ui-thermometer-DMkLvJgE.js} +118 -108
- package/dist/{vue-ui-timer-Cb95XSdn.cjs → vue-ui-timer-D7fvoR77.cjs} +1 -1
- package/dist/{vue-ui-timer-DBqMb9iX.js → vue-ui-timer-RA9yfgBk.js} +8 -8
- package/dist/{vue-ui-tiremarks-CHKETcHr.js → vue-ui-tiremarks-B_EncUi6.js} +79 -71
- package/dist/{vue-ui-tiremarks-BqXfvQ4t.cjs → vue-ui-tiremarks-C7y6Mbxe.cjs} +1 -1
- package/dist/{vue-ui-treemap-DxKunHfW.js → vue-ui-treemap-BuGZgQsr.js} +274 -236
- package/dist/vue-ui-treemap-CfngjVUS.cjs +1 -0
- package/dist/vue-ui-vertical-bar-DKbq4bX4.cjs +4 -0
- package/dist/vue-ui-vertical-bar-T4bFd3JF.js +792 -0
- package/dist/vue-ui-waffle-BJFbhWnA.cjs +1 -0
- package/dist/vue-ui-waffle-CrxmrYsV.js +735 -0
- package/dist/{vue-ui-wheel-kMVi976p.cjs → vue-ui-wheel-BDRvKR1Z.cjs} +1 -1
- package/dist/{vue-ui-wheel-4HKXl04I.js → vue-ui-wheel-DOyC7NgR.js} +73 -65
- package/dist/{vue-ui-word-cloud-CrC3iKGd.js → vue-ui-word-cloud-DBxVNlJ3.js} +7 -7
- package/dist/{vue-ui-word-cloud-WgbYJhMF.cjs → vue-ui-word-cloud-Dmcelg3z.cjs} +1 -1
- package/dist/{vue-ui-xy-BN_H7q0X.js → vue-ui-xy-BIbvJSh2.js} +367 -288
- package/dist/vue-ui-xy-CVKaR90p.cjs +3 -0
- package/dist/vue-ui-xy-canvas-2AaNivzI.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-DAY9Ylzs.js → vue-ui-xy-canvas-CXVni3kC.js} +284 -259
- package/package.json +1 -1
- package/dist/DataTable-B4_9ynlY.cjs +0 -1
- package/dist/index-Y23HeR26.cjs +0 -4
- package/dist/vue-ui-3d-bar-BB6yidY7.cjs +0 -19
- package/dist/vue-ui-age-pyramid-CrTadT86.cjs +0 -1
- package/dist/vue-ui-chestnut-C3XOHDgw.cjs +0 -6
- package/dist/vue-ui-donut-CG3VWjnG.js +0 -751
- package/dist/vue-ui-donut-JA9hlLlV.cjs +0 -1
- package/dist/vue-ui-donut-evolution-CA8sDbwX.js +0 -805
- package/dist/vue-ui-donut-evolution-_E0xUI9Y.cjs +0 -1
- package/dist/vue-ui-galaxy-DPrJum3L.cjs +0 -1
- package/dist/vue-ui-gizmo-CrSaW32p.cjs +0 -1
- package/dist/vue-ui-heatmap-CTRjjhmd.cjs +0 -1
- package/dist/vue-ui-heatmap-zV0pg2Q5.js +0 -606
- package/dist/vue-ui-mood-radar-zpxdsZ4u.cjs +0 -1
- package/dist/vue-ui-nested-donuts-07UI_VlW.cjs +0 -16
- package/dist/vue-ui-onion-DiychUul.cjs +0 -1
- package/dist/vue-ui-quadrant-DxLYb8Mk.cjs +0 -1
- package/dist/vue-ui-quick-chart-CAXuRSdm.js +0 -1318
- package/dist/vue-ui-quick-chart-DgCRM6WA.cjs +0 -13
- package/dist/vue-ui-radar-iETP_3US.cjs +0 -1
- package/dist/vue-ui-rings-DdpKT3DJ.cjs +0 -1
- package/dist/vue-ui-scatter-Dsc6RABP.cjs +0 -1
- package/dist/vue-ui-sparkbar-BVQPOz2O.js +0 -257
- package/dist/vue-ui-sparkbar-kfA-BPVJ.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-B5xstgQG.cjs +0 -1
- package/dist/vue-ui-stackbar-DZ0CArmk.cjs +0 -15
- package/dist/vue-ui-strip-plot-Db_dqjd9.cjs +0 -1
- package/dist/vue-ui-table-sparkline-4Qbmxxsy.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DZt-bo2D.js +0 -420
- package/dist/vue-ui-thermometer-HXWDU2wD.cjs +0 -1
- package/dist/vue-ui-treemap-CW9JmJ2d.cjs +0 -1
- package/dist/vue-ui-vertical-bar-83AMwsHD.cjs +0 -4
- package/dist/vue-ui-vertical-bar-DRLwZjIz.js +0 -745
- package/dist/vue-ui-waffle-BRuDxyDU.js +0 -650
- package/dist/vue-ui-waffle-BwUbvdOE.cjs +0 -1
- package/dist/vue-ui-xy-BXfP5pz5.cjs +0 -3
- package/dist/vue-ui-xy-canvas-NrhVgFsv.cjs +0 -9
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { computed as d, ref as w, onMounted as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import
|
|
5
|
-
import { _ as
|
|
6
|
-
const
|
|
1
|
+
import { computed as d, ref as w, onMounted as J, openBlock as s, createElementBlock as n, normalizeStyle as N, renderSlot as F, normalizeProps as K, guardReactiveProps as Q, createElementVNode as f, toDisplayString as G, createCommentVNode as y, unref as v, Fragment as P, renderList as z, createBlock as ee } from "vue";
|
|
2
|
+
import { u as te, c as ae, t as le, o as ue, e as W, g as oe, s as I, R as se, S as ne, X as re, v as C, M as B, i as E, f as T } from "./index-BlXzlBwZ.js";
|
|
3
|
+
import { u as j } from "./useNestedProp-BoNl5H_z.js";
|
|
4
|
+
import ie from "./vue-ui-skeleton-CJ2R5R6u.js";
|
|
5
|
+
import { _ as de } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
+
const ve = ["id"], ce = ["xmlns", "viewBox"], ye = ["id"], he = ["stop-color"], fe = ["stop-color"], pe = ["id"], ge = ["stop-color"], me = ["stop-color"], ke = ["id"], be = ["stop-color"], xe = ["stop-color"], _e = { key: 0 }, we = ["d", "fill"], $e = ["d", "fill"], Le = ["d", "stroke", "stroke-width"], Ne = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ie = ["x", "y", "width", "height", "fill", "rx"], Ce = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Me = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], Se = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Ve = ["x", "y", "font-size", "font-weight", "fill"], Pe = ["x", "y", "height", "width", "onMouseenter", "onClick"], ze = {
|
|
7
7
|
__name: "vue-ui-sparkline",
|
|
8
8
|
props: {
|
|
9
9
|
config: {
|
|
@@ -28,35 +28,35 @@ const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"],
|
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
30
|
emits: ["hoverIndex", "selectDatapoint"],
|
|
31
|
-
setup(
|
|
32
|
-
const i =
|
|
33
|
-
const t =
|
|
31
|
+
setup(b, { emit: M }) {
|
|
32
|
+
const i = b, { vue_ui_sparkline: O } = te(), $ = d(() => !!i.dataset && i.dataset.length), p = w(ae()), e = d(() => {
|
|
33
|
+
const t = j({
|
|
34
34
|
userConfig: i.config,
|
|
35
|
-
defaultConfig:
|
|
35
|
+
defaultConfig: O
|
|
36
36
|
});
|
|
37
37
|
return t.theme ? {
|
|
38
|
-
...
|
|
39
|
-
userConfig:
|
|
38
|
+
...j({
|
|
39
|
+
userConfig: le.vue_ui_sparkline[t.theme] || i.config,
|
|
40
40
|
defaultConfig: t
|
|
41
41
|
})
|
|
42
42
|
} : t;
|
|
43
|
-
}),
|
|
43
|
+
}), k = w(i.dataset.map((t) => e.value.style.animation.show ? {
|
|
44
44
|
...t,
|
|
45
45
|
value: null
|
|
46
46
|
} : {
|
|
47
47
|
...t,
|
|
48
48
|
value: [void 0].includes(t.value) ? null : t.value
|
|
49
49
|
}));
|
|
50
|
-
|
|
51
|
-
if (
|
|
50
|
+
J(() => {
|
|
51
|
+
if (ue(i.dataset) ? W({
|
|
52
52
|
componentName: "VueUiSparkline",
|
|
53
53
|
type: "dataset"
|
|
54
54
|
}) : i.dataset.forEach((t, o) => {
|
|
55
|
-
|
|
55
|
+
oe({
|
|
56
56
|
datasetObject: t,
|
|
57
57
|
requiredAttributes: ["period", "value"]
|
|
58
58
|
}).forEach((a) => {
|
|
59
|
-
|
|
59
|
+
W({
|
|
60
60
|
componentName: "VueUiSparkline",
|
|
61
61
|
type: "datasetSerieAttribute",
|
|
62
62
|
property: a,
|
|
@@ -65,71 +65,71 @@ const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"],
|
|
|
65
65
|
});
|
|
66
66
|
}), e.value.style.animation.show && i.dataset.length > 1) {
|
|
67
67
|
let a = function() {
|
|
68
|
-
o < i.dataset.length ? (
|
|
68
|
+
o < i.dataset.length ? (k.value.push(i.dataset[o]), setTimeout(() => {
|
|
69
69
|
requestAnimationFrame(a);
|
|
70
|
-
}, t)) :
|
|
70
|
+
}, t)) : k.value = i.dataset, o += 1;
|
|
71
71
|
};
|
|
72
|
-
|
|
72
|
+
k.value = [];
|
|
73
73
|
const t = e.value.style.animation.animationFrames / i.dataset.length;
|
|
74
74
|
let o = 0;
|
|
75
75
|
a();
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
|
-
const
|
|
78
|
+
const h = w({
|
|
79
79
|
height: 80,
|
|
80
80
|
width: 500
|
|
81
|
-
}),
|
|
81
|
+
}), U = w(6), l = d(() => ({
|
|
82
82
|
top: 12,
|
|
83
83
|
left: 0,
|
|
84
|
-
right:
|
|
85
|
-
bottom:
|
|
86
|
-
start: i.showInfo && e.value.style.dataLabel.show && e.value.style.dataLabel.position === "left" ?
|
|
87
|
-
width: i.showInfo && e.value.style.dataLabel.show ? e.value.style.chartWidth :
|
|
88
|
-
height:
|
|
89
|
-
})), S = d(() => Math.min(...
|
|
84
|
+
right: h.value.width,
|
|
85
|
+
bottom: h.value.height - 3,
|
|
86
|
+
start: i.showInfo && e.value.style.dataLabel.show && e.value.style.dataLabel.position === "left" ? h.value.width - e.value.style.chartWidth : 30,
|
|
87
|
+
width: i.showInfo && e.value.style.dataLabel.show ? e.value.style.chartWidth : h.value.width - 30,
|
|
88
|
+
height: h.value.height - 12
|
|
89
|
+
})), S = d(() => Math.min(...k.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0))), X = d(() => Math.max(...k.value.map((t) => isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0))), x = d(() => {
|
|
90
90
|
const t = S.value >= 0 ? 0 : S.value;
|
|
91
91
|
return Math.abs(t);
|
|
92
|
-
}),
|
|
92
|
+
}), R = d(() => X.value + x.value + U.value), L = d(() => l.value.bottom - l.value.height * V(x.value));
|
|
93
93
|
function V(t) {
|
|
94
|
-
return t /
|
|
94
|
+
return t / R.value;
|
|
95
95
|
}
|
|
96
|
-
const g = d(() => i.dataset.length - 1), u = d(() =>
|
|
96
|
+
const g = d(() => i.dataset.length - 1), u = d(() => k.value.map((t, o) => {
|
|
97
97
|
const a = isNaN(t.value) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t.value) ? 0 : t.value || 0;
|
|
98
98
|
return {
|
|
99
99
|
absoluteValue: a,
|
|
100
100
|
period: t.period,
|
|
101
|
-
plotValue: a +
|
|
102
|
-
toMax: V(a +
|
|
101
|
+
plotValue: a + x.value,
|
|
102
|
+
toMax: V(a + x.value),
|
|
103
103
|
x: l.value.start + o * (l.value.width / (g.value + 1) > 30 ? 30 : l.value.width / (g.value + 1)),
|
|
104
|
-
y: l.value.bottom - l.value.height * V(a +
|
|
104
|
+
y: l.value.bottom - l.value.height * V(a + x.value),
|
|
105
105
|
id: `plot_${p.value}_${o}`,
|
|
106
|
-
color:
|
|
106
|
+
color: _.value ? e.value.style.bar.color : e.value.style.area.useGradient ? I(e.value.style.line.color, 0.05 * (1 - o / g.value)) : e.value.style.line.color,
|
|
107
107
|
width: l.value.width / (g.value + 1) > 30 ? 30 : l.value.width / (g.value + 1)
|
|
108
108
|
};
|
|
109
|
-
})),
|
|
110
|
-
const t = { x: u.value[0].x, y:
|
|
109
|
+
})), Z = d(() => {
|
|
110
|
+
const t = { x: u.value[0].x, y: h.value.height - 6 }, o = { x: u.value[u.value.length - 1].x, y: h.value.height - 6 }, a = [];
|
|
111
111
|
return u.value.forEach((r) => {
|
|
112
112
|
a.push(`${r.x},${r.y} `);
|
|
113
113
|
}), [t.x, t.y, ...a, o.x, o.y].toString();
|
|
114
|
-
}),
|
|
115
|
-
function
|
|
116
|
-
|
|
114
|
+
}), c = w(void 0);
|
|
115
|
+
function q(t, o) {
|
|
116
|
+
c.value = t, M("hoverIndex", { index: o });
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
118
|
+
function H() {
|
|
119
|
+
c.value = void 0, M("hoverIndex", { index: void 0 });
|
|
120
120
|
}
|
|
121
|
-
const
|
|
121
|
+
const m = d(() => {
|
|
122
122
|
if ($.value) {
|
|
123
123
|
const t = u.value.map((a) => a.absoluteValue), o = t.reduce((a, r) => a + r, 0);
|
|
124
124
|
return {
|
|
125
125
|
latest: u.value[u.value.length - 1].absoluteValue,
|
|
126
126
|
sum: o,
|
|
127
127
|
average: o / u.value.length,
|
|
128
|
-
median:
|
|
129
|
-
trend:
|
|
128
|
+
median: se(t),
|
|
129
|
+
trend: ne(u.value.map(({ x: a, y: r, absoluteValue: D }) => ({
|
|
130
130
|
x: a,
|
|
131
131
|
y: r,
|
|
132
|
-
value:
|
|
132
|
+
value: D
|
|
133
133
|
}))).trend
|
|
134
134
|
};
|
|
135
135
|
} else
|
|
@@ -140,8 +140,8 @@ const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"],
|
|
|
140
140
|
median: null,
|
|
141
141
|
trend: null
|
|
142
142
|
};
|
|
143
|
-
}),
|
|
144
|
-
function
|
|
143
|
+
}), A = d(() => $.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), _ = d(() => e.value.type && e.value.type === "bar");
|
|
144
|
+
function Y(t, o) {
|
|
145
145
|
M("selectDatapoint", { datapoint: t, index: o });
|
|
146
146
|
}
|
|
147
147
|
return (t, o) => (s(), n("div", {
|
|
@@ -149,27 +149,27 @@ const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"],
|
|
|
149
149
|
id: p.value,
|
|
150
150
|
style: N(`width:100%;font-family:${e.value.style.fontFamily}`)
|
|
151
151
|
}, [
|
|
152
|
-
|
|
153
|
-
selected:
|
|
154
|
-
latest:
|
|
155
|
-
sum:
|
|
156
|
-
average:
|
|
157
|
-
median:
|
|
158
|
-
trend:
|
|
152
|
+
F(t.$slots, "before", K(Q({
|
|
153
|
+
selected: c.value,
|
|
154
|
+
latest: m.value.latest,
|
|
155
|
+
sum: m.value.sum,
|
|
156
|
+
average: m.value.average,
|
|
157
|
+
median: m.value.median,
|
|
158
|
+
trend: m.value.trend
|
|
159
159
|
})), void 0, !0),
|
|
160
|
-
e.value.style.title.show &&
|
|
160
|
+
e.value.style.title.show && b.showInfo ? (s(), n("div", {
|
|
161
161
|
key: 0,
|
|
162
162
|
class: "vue-ui-sparkline-title",
|
|
163
163
|
style: N(`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"};`)
|
|
164
164
|
}, [
|
|
165
165
|
f("span", {
|
|
166
166
|
style: N(`padding:${e.value.style.title.textAlign === "left" ? "0 0 0 12px" : e.value.style.title.textAlign === "right" ? "0 12px 0 0" : "0"}`)
|
|
167
|
-
},
|
|
168
|
-
], 4)) :
|
|
167
|
+
}, G(c.value ? c.value.period : e.value.style.title.text), 5)
|
|
168
|
+
], 4)) : y("", !0),
|
|
169
169
|
$.value ? (s(), n("svg", {
|
|
170
170
|
key: 1,
|
|
171
|
-
xmlns:
|
|
172
|
-
viewBox: `0 0 ${
|
|
171
|
+
xmlns: v(re),
|
|
172
|
+
viewBox: `0 0 ${h.value.width} ${h.value.height}`,
|
|
173
173
|
style: N(`background:${e.value.style.backgroundColor};overflow:visible`)
|
|
174
174
|
}, [
|
|
175
175
|
f("defs", null, [
|
|
@@ -182,13 +182,13 @@ const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"],
|
|
|
182
182
|
}, [
|
|
183
183
|
f("stop", {
|
|
184
184
|
offset: "0%",
|
|
185
|
-
"stop-color": `${
|
|
186
|
-
}, null, 8,
|
|
185
|
+
"stop-color": `${v(I)(e.value.style.area.color, 0.05)}${v(C)[e.value.style.area.opacity]}`
|
|
186
|
+
}, null, 8, he),
|
|
187
187
|
f("stop", {
|
|
188
188
|
offset: "100%",
|
|
189
|
-
"stop-color": e.value.style.area.color +
|
|
190
|
-
}, null, 8,
|
|
191
|
-
], 8,
|
|
189
|
+
"stop-color": e.value.style.area.color + v(C)[e.value.style.area.opacity]
|
|
190
|
+
}, null, 8, fe)
|
|
191
|
+
], 8, ye),
|
|
192
192
|
f("linearGradient", {
|
|
193
193
|
x2: "0%",
|
|
194
194
|
y2: "100%",
|
|
@@ -197,12 +197,12 @@ const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"],
|
|
|
197
197
|
f("stop", {
|
|
198
198
|
offset: "0%",
|
|
199
199
|
"stop-color": e.value.style.bar.color
|
|
200
|
-
}, null, 8,
|
|
200
|
+
}, null, 8, ge),
|
|
201
201
|
f("stop", {
|
|
202
202
|
offset: "100%",
|
|
203
|
-
"stop-color": `${
|
|
204
|
-
}, null, 8,
|
|
205
|
-
], 8,
|
|
203
|
+
"stop-color": `${v(I)(e.value.style.bar.color, 0.05)}`
|
|
204
|
+
}, null, 8, me)
|
|
205
|
+
], 8, pe),
|
|
206
206
|
f("linearGradient", {
|
|
207
207
|
x2: "0%",
|
|
208
208
|
y2: "100%",
|
|
@@ -210,35 +210,35 @@ const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"],
|
|
|
210
210
|
}, [
|
|
211
211
|
f("stop", {
|
|
212
212
|
offset: "0%",
|
|
213
|
-
"stop-color": `${
|
|
214
|
-
}, null, 8,
|
|
213
|
+
"stop-color": `${v(I)(e.value.style.bar.color, 0.05)}`
|
|
214
|
+
}, null, 8, be),
|
|
215
215
|
f("stop", {
|
|
216
216
|
offset: "100%",
|
|
217
217
|
"stop-color": e.value.style.bar.color
|
|
218
218
|
}, null, 8, xe)
|
|
219
219
|
], 8, ke)
|
|
220
220
|
]),
|
|
221
|
-
e.value.style.area.show && !
|
|
221
|
+
e.value.style.area.show && !_.value && u.value[0] ? (s(), n("g", _e, [
|
|
222
222
|
e.value.style.line.smooth ? (s(), n("path", {
|
|
223
223
|
key: 0,
|
|
224
|
-
d: `M ${u.value[0].x},${l.value.bottom} ${
|
|
225
|
-
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : `${e.value.style.area.color}${
|
|
226
|
-
}, null, 8,
|
|
224
|
+
d: `M ${u.value[0].x},${l.value.bottom} ${v(B)(u.value)} L ${u.value.at(-1).x},${l.value.bottom} Z`,
|
|
225
|
+
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : `${e.value.style.area.color}${v(C)[e.value.style.area.opacity]}`
|
|
226
|
+
}, null, 8, we)) : (s(), n("path", {
|
|
227
227
|
key: 1,
|
|
228
|
-
d: `M${
|
|
229
|
-
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : `${e.value.style.area.color}${
|
|
230
|
-
}, null, 8,
|
|
231
|
-
])) :
|
|
232
|
-
e.value.style.line.smooth && !
|
|
228
|
+
d: `M${Z.value}Z`,
|
|
229
|
+
fill: e.value.style.area.useGradient ? `url(#sparkline_gradient_${p.value})` : `${e.value.style.area.color}${v(C)[e.value.style.area.opacity]}`
|
|
230
|
+
}, null, 8, $e))
|
|
231
|
+
])) : y("", !0),
|
|
232
|
+
e.value.style.line.smooth && !_.value ? (s(), n("path", {
|
|
233
233
|
key: 1,
|
|
234
|
-
d: `M ${
|
|
234
|
+
d: `M ${v(B)(u.value)}`,
|
|
235
235
|
stroke: e.value.style.line.color,
|
|
236
236
|
fill: "none",
|
|
237
237
|
"stroke-width": e.value.style.line.strokeWidth,
|
|
238
238
|
"stroke-linecap": "round"
|
|
239
|
-
}, null, 8,
|
|
239
|
+
}, null, 8, Le)) : y("", !0),
|
|
240
240
|
(s(!0), n(P, null, z(u.value, (a, r) => (s(), n("g", null, [
|
|
241
|
-
r < u.value.length - 1 && !e.value.style.line.smooth && !
|
|
241
|
+
r < u.value.length - 1 && !e.value.style.line.smooth && !_.value ? (s(), n("line", {
|
|
242
242
|
key: 0,
|
|
243
243
|
x1: a.x,
|
|
244
244
|
x2: u.value[r + 1].x,
|
|
@@ -249,8 +249,8 @@ const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"],
|
|
|
249
249
|
"stroke-linecap": "round",
|
|
250
250
|
"stroke-linejoin": "round",
|
|
251
251
|
"shape-rendering": "geometricPrecision"
|
|
252
|
-
}, null, 8,
|
|
253
|
-
|
|
252
|
+
}, null, 8, Ne)) : y("", !0),
|
|
253
|
+
_.value ? (s(), n("rect", {
|
|
254
254
|
key: 1,
|
|
255
255
|
x: a.x - a.width / 2,
|
|
256
256
|
y: a.absoluteValue > 0 ? a.y : L.value,
|
|
@@ -258,8 +258,8 @@ const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"],
|
|
|
258
258
|
height: Math.abs(a.y - L.value),
|
|
259
259
|
fill: a.absoluteValue > 0 ? `url(#sparkline_bar_gradient_pos_${p.value})` : `url(#sparkline_bar_gradient_neg_${p.value})`,
|
|
260
260
|
rx: e.value.style.bar.borderRadius
|
|
261
|
-
}, null, 8,
|
|
262
|
-
e.value.style.verticalIndicator.show && (
|
|
261
|
+
}, null, 8, Ie)) : y("", !0),
|
|
262
|
+
e.value.style.verticalIndicator.show && (c.value && a.id === c.value.id || b.selectedIndex === r) ? (s(), n("line", {
|
|
263
263
|
key: 2,
|
|
264
264
|
x1: a.x,
|
|
265
265
|
x2: a.x,
|
|
@@ -269,7 +269,7 @@ const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"],
|
|
|
269
269
|
"stroke-width": e.value.style.verticalIndicator.strokeWidth,
|
|
270
270
|
"stroke-linecap": "round",
|
|
271
271
|
"stroke-dasharray": e.value.style.verticalIndicator.strokeDasharray || 0
|
|
272
|
-
}, null, 8,
|
|
272
|
+
}, null, 8, Ce)) : y("", !0)
|
|
273
273
|
]))), 256)),
|
|
274
274
|
S.value < 0 ? (s(), n("line", {
|
|
275
275
|
key: 2,
|
|
@@ -281,9 +281,9 @@ const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"],
|
|
|
281
281
|
"stroke-dasharray": e.value.style.zeroLine.strokeWidth * 2,
|
|
282
282
|
"stroke-width": e.value.style.zeroLine.strokeWidth,
|
|
283
283
|
"stroke-linecap": "round"
|
|
284
|
-
}, null, 8,
|
|
284
|
+
}, null, 8, Me)) : y("", !0),
|
|
285
285
|
e.value.style.plot.show ? (s(!0), n(P, { key: 3 }, z(u.value, (a, r) => (s(), n("g", null, [
|
|
286
|
-
|
|
286
|
+
c.value && a.id === c.value.id || b.selectedIndex === r ? (s(), n("circle", {
|
|
287
287
|
key: 0,
|
|
288
288
|
cx: a.x,
|
|
289
289
|
cy: a.y,
|
|
@@ -291,29 +291,38 @@ const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"],
|
|
|
291
291
|
fill: a.color,
|
|
292
292
|
stroke: e.value.style.plot.stroke,
|
|
293
293
|
"stroke-width": e.value.style.plot.strokeWidth
|
|
294
|
-
}, null, 8,
|
|
295
|
-
]))), 256)) :
|
|
296
|
-
|
|
294
|
+
}, null, 8, Se)) : y("", !0)
|
|
295
|
+
]))), 256)) : y("", !0),
|
|
296
|
+
b.showInfo && e.value.style.dataLabel.show ? (s(), n("text", {
|
|
297
297
|
key: 4,
|
|
298
298
|
x: e.value.style.dataLabel.position === "left" ? 12 + e.value.style.dataLabel.offsetX : l.value.width + 12 + e.value.style.dataLabel.offsetX,
|
|
299
|
-
y:
|
|
299
|
+
y: h.value.height / 2 + e.value.style.dataLabel.fontSize / 2.5 + e.value.style.dataLabel.offsetY,
|
|
300
300
|
"font-size": e.value.style.dataLabel.fontSize,
|
|
301
301
|
"font-weight": e.value.style.dataLabel.bold ? "bold" : "normal",
|
|
302
302
|
fill: e.value.style.dataLabel.color
|
|
303
|
-
},
|
|
303
|
+
}, G(c.value ? v(E)(
|
|
304
|
+
e.value.style.dataLabel.formatter,
|
|
305
|
+
c.value.absoluteValue,
|
|
306
|
+
v(T)({ p: e.value.style.dataLabel.prefix, v: c.value.absoluteValue, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue }),
|
|
307
|
+
{ datapoint: c.value }
|
|
308
|
+
) : v(E)(
|
|
309
|
+
e.value.style.dataLabel.formatter,
|
|
310
|
+
A.value,
|
|
311
|
+
v(T)({ p: e.value.style.dataLabel.prefix, v: A.value, s: e.value.style.dataLabel.suffix, r: e.value.style.dataLabel.roundingValue })
|
|
312
|
+
)), 9, Ve)) : y("", !0),
|
|
304
313
|
(s(!0), n(P, null, z(u.value, (a, r) => (s(), n("rect", {
|
|
305
314
|
x: a.x - (l.value.width / (g.value + 1) > 30 ? 30 : l.value.width / (g.value + 1)) / 2,
|
|
306
315
|
y: l.value.top - 6,
|
|
307
316
|
height: l.value.height + 6,
|
|
308
317
|
width: l.value.width / (g.value + 1) > 30 ? 30 : l.value.width / (g.value + 1),
|
|
309
318
|
fill: "transparent",
|
|
310
|
-
onMouseenter: (
|
|
311
|
-
onMouseleave:
|
|
312
|
-
onClick: () =>
|
|
313
|
-
}, null, 40,
|
|
314
|
-
|
|
315
|
-
], 12,
|
|
316
|
-
$.value ?
|
|
319
|
+
onMouseenter: (D) => q(a, r),
|
|
320
|
+
onMouseleave: H,
|
|
321
|
+
onClick: () => Y(a, r)
|
|
322
|
+
}, null, 40, Pe))), 256)),
|
|
323
|
+
F(t.$slots, "svg", { svg: h.value }, void 0, !0)
|
|
324
|
+
], 12, ce)) : y("", !0),
|
|
325
|
+
$.value ? y("", !0) : (s(), ee(ie, {
|
|
317
326
|
key: 2,
|
|
318
327
|
config: {
|
|
319
328
|
type: "sparkline",
|
|
@@ -325,9 +334,9 @@ const de = ["id"], ve = ["xmlns", "viewBox"], ce = ["id"], ye = ["stop-color"],
|
|
|
325
334
|
}
|
|
326
335
|
}
|
|
327
336
|
}, null, 8, ["config"]))
|
|
328
|
-
], 12,
|
|
337
|
+
], 12, ve));
|
|
329
338
|
}
|
|
330
|
-
},
|
|
339
|
+
}, Be = /* @__PURE__ */ de(ze, [["__scopeId", "data-v-71dd1d7d"]]);
|
|
331
340
|
export {
|
|
332
|
-
|
|
341
|
+
Be as default
|
|
333
342
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-hKWfT7Wa.cjs"),C=require("./useNestedProp-Cggpoz7e.cjs"),E=require("./vue-ui-skeleton-j-IOiy5w.cjs"),N=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=["xmlns","viewBox"],z=["id"],D=["stop-color"],P=["stop-color"],L=["stop-color"],A={id:"stackPill",clipPathUnits:"objectBoundingBox"},F=["fill"],U={"clip-path":"url(#stackPill)"},j=["height","width","fill"],q=["onClick","x","width","height","fill","stroke"],I=["onClick"],T={style:{display:"flex","flex-direction":"row","align-items":"center",gap:"4px","justify-content":"center"}},H=["height","width"],O=["fill"],M={__name:"vue-ui-sparkstackbar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(B,{emit:w}){const u=B,{vue_ui_sparkstackbar:$}=o.useConfig(),k=e.computed(()=>!!u.dataset&&u.dataset.length),b=e.ref(o.createUid()),t=e.computed(()=>{const l=C.useNestedProp({userConfig:u.config,defaultConfig:$});return l.theme?{...C.useNestedProp({userConfig:o.themes.vue_ui_sparkstackbar[l.theme]||u.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}),m=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),d=e.ref(u.dataset.map((l,n)=>({...l,value:t.value.style.animation.show?0:l.value||0,color:l.color?o.convertColorToHex(l.color):m.value[n]||o.palette[n]||o.palette[n%o.palette.length]}))),p=e.ref(!0);e.onMounted(()=>{if(o.objectIsEmpty(u.dataset)?o.error({componentName:"VueUiSparkStackbar",type:"dataset"}):u.dataset.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(a=>{o.error({componentName:"VueUiSparkStackbar",type:"datasetSerieAttribute",property:a,index:n})})}),t.value.style.animation.show){let h=function(){r+=a/l,r<a?(d.value=d.value.map((s,i)=>({...s,value:s.value+=n[i],color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length]})),requestAnimationFrame(h)):(p.value=!1,d.value=u.dataset.map((s,i)=>({...s,value:s.value||0,color:s.color?o.convertColorToHex(s.color):m.value[i]||o.palette[i]||o.palette[i%o.palette.length],id:o.createUid()})))};const l=t.value.style.animation.animationFrames,n=u.dataset.map((s,i)=>s.value/l),a=u.dataset.map(s=>s.value||0).reduce((s,i)=>s+i,0);let r=0;p.value=!0,h()}});const v=e.ref({width:500,height:16}),c=e.ref([]),g=e.computed(()=>u.dataset.map(l=>l.value||0).filter((l,n)=>!c.value.includes(n)).reduce((l,n)=>l+n,0)),_=e.computed(()=>d.value.map((l,n)=>({...l,value:l.value||0,proportion:(l.value||0)/g.value,width:(l.value||0)/g.value*v.value.width,proportionLabel:o.dataLabel({v:(l.value||0)/g.value*100,s:"%",r:t.value.style.legend.percentage.rounding})}))),y=e.computed(()=>_.value.filter((l,n)=>!c.value.includes(n)));function S(l){c.value.includes(l)?c.value=c.value.filter(n=>n!==l):c.value.length<d.value.length-1&&c.value.push(l)}const f=e.computed(()=>{let l=0;const n=[];for(let a=0;a<y.value.length;a+=1)n.push({...y.value[a],start:l}),l+=y.value[a].width;return n});function x(l,n){w("selectDatapoint",{datapoint:l,index:n})}return(l,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`width:100%; background:${t.value.style.backgroundColor}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:calc(100% - 12px);background:${t.value.style.backgroundColor};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.toDisplayString(t.value.style.title.text),5),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),k.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(o.XMLNS),width:"100%",viewBox:`0 0 ${v.value.width} ${v.value.height}`},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{key:`stack_gradient_${r}`,gradientTransform:"rotate(90)",id:`stack_gradient_${r}_${b.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":a.color},null,8,D),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(o.shiftHue)(a.color,.05)}${e.unref(o.opacity)[100-t.value.style.bar.gradient.intensity]}`},null,8,P),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,L)],8,z))),128)),e.createElementVNode("clipPath",A,[e.createElementVNode("rect",{x:"0.005",y:"-2",width:"0.99",height:"5",rx:"3",ry:"3",fill:t.value.style.backgroundColor},null,8,F)])]),e.createElementVNode("g",U,[e.createElementVNode("rect",{x:0,y:0,height:v.value.height,width:f.value.map(a=>a.width).reduce((a,r)=>a+r,0),fill:t.value.style.bar.gradient.underlayerColor,class:e.normalizeClass({animated:!p.value})},null,10,j),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(a,r)=>(e.openBlock(),e.createElementBlock("rect",{key:`stack_${r}`,onClick:()=>x(a,r),x:a.start,y:0,width:a.width,height:v.value.height,fill:t.value.style.bar.gradient.show?`url(#stack_gradient_${r}_${b.value})`:a.color,stroke:t.value.style.backgroundColor,"stroke-linecap":"round",class:e.normalizeClass({animated:!p.value})},null,10,q))),128))])],8,V)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(E.default,{key:2,config:{type:"sparkStackbar",style:{backgroundColor:t.value.style.backgroundColor,sparkStackbar:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.legend.show?(e.openBlock(),e.createElementBlock("div",{key:3,style:e.normalizeStyle(`background:${t.value.style.backgroundColor};margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign==="left"?"flex-start":t.value.style.legend.textAlign==="right"?"flex-end":"center"}`),class:"vue-ui-sparkstackbar-legend"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(a,r)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-size:${t.value.style.legend.fontSize}px;`),class:e.normalizeClass({"vue-ui-sparkstackbar-legend-item":!0,"vue-ui-sparkstackbar-legend-item-unselected":c.value.includes(r)}),onClick:h=>{S(r),x(a,r)}},[e.createElementVNode("div",T,[(e.openBlock(),e.createElementBlock("svg",{height:`${t.value.style.legend.fontSize}px`,width:`${t.value.style.legend.fontSize}px`,viewBox:"0 0 10 10"},[e.createElementVNode("circle",{cx:5,cy:5,r:5,fill:a.color},null,8,O)],8,H)),e.createElementVNode("span",{style:e.normalizeStyle(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold?"bold":"normal"}`)},e.toDisplayString(a.name),5),t.value.style.legend.percentage.show?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-weight:${t.value.style.legend.percentage.bold?"bold":"normal"};color:${t.value.style.legend.percentage.color}`)},e.toDisplayString(c.value.includes(r)?" - ":a.proportionLabel),5)):e.createCommentVNode("",!0),t.value.style.legend.value.show?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-weight:${t.value.style.legend.value.bold?"bold":"normal"};color:${t.value.style.legend.value.color}`)}," ("+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.legend.value.formatter,a.value,e.unref(o.dataLabel)({p:t.value.style.legend.value.prefix,v:a.value,s:t.value.style.legend.value.suffix,r:t.value.style.legend.value.rounding}),{datapoint:a,seriesIndex:r}))+") ",5)):e.createCommentVNode("",!0)])],14,I))),256))],4)):e.createCommentVNode("",!0)],4))}},G=N._export_sfc(M,[["__scopeId","data-v-86f11bbc"]]);exports.default=G;
|