vue-data-ui 3.6.0 → 3.7.1
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 +26 -26
- package/dist/{Arrow-BGVin3AS.js → Arrow-CWYIBV-7.js} +1 -1
- package/dist/{BaseDraggableDialog-DhKIof09.js → BaseDraggableDialog-CRF94NJQ.js} +2 -2
- package/dist/{BaseIcon-DLFL0M4-.js → BaseIcon-CofSxalQ.js} +1 -1
- package/dist/{ColorPicker-CjIJvLdc.js → ColorPicker-e1-OSGlQ.js} +10 -10
- package/dist/{DataTable-UCyd_BQI.js → DataTable-CHaOCmsE.js} +2 -2
- package/dist/{Legend-D9ZTJKjh.js → Legend-Web3GjlR.js} +2 -2
- package/dist/{NonSvgPenAndPaper-a2UzZL0y.js → NonSvgPenAndPaper-CjYFLlns.js} +3 -3
- package/dist/{PackageVersion-D_4Hr4S4.js → PackageVersion-C82JCJOX.js} +1 -1
- package/dist/{PenAndPaper-BJSMejV9.js → PenAndPaper-HCZQTkqi.js} +20 -20
- package/dist/{Shape-CNXKB8O0.js → Shape-DE6X_t31.js} +3 -3
- package/dist/{Slicer-CJfhtoVn.js → Slicer-BFBBG6xv.js} +23 -23
- package/dist/{SlicerPreview-wXjV4LWO.js → SlicerPreview-D76aSViW.js} +2 -2
- package/dist/{SparkTooltip-BEewz-_Q.js → SparkTooltip-B2rpVWE1.js} +6 -6
- package/dist/{Title-Bb1VWCtR.js → Title-DfFUb9hd.js} +1 -1
- package/dist/{Tooltip-oWCO1HKy.js → Tooltip-WD0Ros6G.js} +1 -1
- package/dist/{UserOptions-BqmUW9Kp.js → UserOptions-B3I-s3Lw.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +3 -3
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +3 -3
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +3 -3
- package/dist/components/vue-ui-candlestick.js +3 -3
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +3 -3
- package/dist/components/vue-ui-chord.js +3 -3
- package/dist/components/vue-ui-circle-pack.js +3 -3
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +2 -2
- package/dist/components/vue-ui-donut.js +3 -3
- package/dist/components/vue-ui-dumbbell.js +3 -3
- package/dist/components/vue-ui-flow.js +3 -3
- package/dist/components/vue-ui-funnel.js +2 -2
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-history-plot.js +3 -3
- package/dist/components/vue-ui-horizontal-bar.js +3 -3
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +3 -3
- package/dist/components/vue-ui-mood-radar.js +3 -3
- package/dist/components/vue-ui-nested-donuts.js +2 -2
- package/dist/components/vue-ui-onion.js +3 -3
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +3 -3
- package/dist/components/vue-ui-quick-chart.js +3 -3
- package/dist/components/vue-ui-radar.js +3 -3
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +3 -3
- package/dist/components/vue-ui-ridgeline.js +3 -3
- package/dist/components/vue-ui-rings.js +3 -3
- package/dist/components/vue-ui-scatter.js +3 -3
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +2 -2
- package/dist/components/vue-ui-sparkgauge.js +3 -3
- package/dist/components/vue-ui-sparkhistogram.js +3 -3
- package/dist/components/vue-ui-sparkline.js +3 -3
- package/dist/components/vue-ui-sparkstackbar.js +2 -2
- package/dist/components/vue-ui-stackbar.js +3 -3
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +3 -3
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +2 -2
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +3 -3
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +2 -2
- package/dist/components/vue-ui-treemap.js +3 -3
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +2 -2
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +3 -3
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +3 -3
- package/dist/components/vue-ui-xy.js +3 -3
- package/dist/{dom-to-png--BNgrTZV.js → dom-to-png-CH2DfsJe.js} +1 -1
- package/dist/{img-BecE5qXd.js → img-DUzJeMlr.js} +1 -1
- package/dist/{lib-C_mNZmhD.js → lib-C5BH09_g.js} +111 -110
- package/dist/{pdf-DuG5j3Wv.js → pdf-BSWQncok.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +2 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-BhzfwQ_k.js → useAutoSizeLabelsInsideViewbox-DOALwU4q.js} +7 -7
- package/dist/{useNestedProp-CIoDlpHu.js → useNestedProp-CWo6bftQ.js} +1 -1
- package/dist/{usePrinter-DTzqpYKF.js → usePrinter-DCJzEiS8.js} +2 -2
- package/dist/useThemeCheck-DGJ31Vi5.js +32 -0
- package/dist/{useTimeLabels-BGFjWgrv.js → useTimeLabels-C5qMhpbe.js} +50 -49
- package/dist/{vue-data-ui-BWuOXu_s.js → vue-data-ui-d-OXgGG3.js} +78 -78
- package/dist/vue-data-ui.js +225 -205
- package/dist/{vue-ui-3d-bar-BNQAuLqF.js → vue-ui-3d-bar-BLbSbx2V.js} +546 -517
- package/dist/{vue-ui-accordion-SSLXLlNz.js → vue-ui-accordion-DSdZUn2C.js} +3 -3
- package/dist/vue-ui-age-pyramid-DQ-xc-if.js +960 -0
- package/dist/{vue-ui-annotator-34Ld0u5M.js → vue-ui-annotator-DRaH8hXn.js} +7 -7
- package/dist/vue-ui-bullet-BvMdxLkK.js +657 -0
- package/dist/{vue-ui-candlestick-BcChw-8c.js → vue-ui-candlestick-DIWeygxV.js} +596 -561
- package/dist/{vue-ui-carousel-table-Cp_od0lI.js → vue-ui-carousel-table-DM2HJFMH.js} +48 -48
- package/dist/{vue-ui-chestnut-DTaIsP72.js → vue-ui-chestnut-DNOG6dqY.js} +534 -505
- package/dist/vue-ui-chord-D2wPt2JV.js +1182 -0
- package/dist/vue-ui-circle-pack-D_GDv7OV.js +832 -0
- package/dist/{vue-ui-cursor-lW-dVs_k.js → vue-ui-cursor-BMe8ZiV6.js} +2 -2
- package/dist/{vue-ui-dashboard-DIymn9Cx.js → vue-ui-dashboard-BMby447A.js} +140 -140
- package/dist/{vue-ui-digits-YHA3fA0j.js → vue-ui-digits-D382I0-w.js} +2 -2
- package/dist/{vue-ui-donut-BaDmbWLh.js → vue-ui-donut-BqiNPW3q.js} +634 -602
- package/dist/vue-ui-donut-evolution-BL7HtdsP.js +1243 -0
- package/dist/vue-ui-dumbbell-BlTDnM8L.js +1258 -0
- package/dist/vue-ui-flow-BxIv20FH.js +1026 -0
- package/dist/vue-ui-funnel-Tnjg4srR.js +743 -0
- package/dist/vue-ui-galaxy-CYDVXdNj.js +837 -0
- package/dist/vue-ui-gauge-DAcpazK7.js +864 -0
- package/dist/{vue-ui-gizmo-E33_xZte.js → vue-ui-gizmo-Bg2TpPwm.js} +3 -3
- package/dist/{vue-ui-heatmap-DJXMvFPp.js → vue-ui-heatmap-BPEE_cLi.js} +501 -466
- package/dist/vue-ui-history-plot-BhfbLer8.js +1239 -0
- package/dist/{vue-ui-kpi-C-XuLBVQ.js → vue-ui-kpi-CKMZDc3n.js} +3 -3
- package/dist/{vue-ui-mini-loader-DawncJvl.js → vue-ui-mini-loader-BN72OfS0.js} +2 -2
- package/dist/vue-ui-molecule-DnzXYuUi.js +782 -0
- package/dist/vue-ui-mood-radar-CXyQEfeM.js +930 -0
- package/dist/vue-ui-nested-donuts-Dq8JoU5d.js +1454 -0
- package/dist/vue-ui-onion-D0KUHi-Z.js +944 -0
- package/dist/vue-ui-parallel-coordinate-plot-DNc2L4Rg.js +1080 -0
- package/dist/{vue-ui-quadrant-B2bLWyCm.js → vue-ui-quadrant-Cp8loNVN.js} +510 -481
- package/dist/{vue-ui-quick-chart-J_RmCwI_.js → vue-ui-quick-chart-kuTdgAKG.js} +795 -758
- package/dist/vue-ui-radar-x2Ry_IGa.js +1013 -0
- package/dist/{vue-ui-rating-CBS8zaQd.js → vue-ui-rating-DtzmtJwF.js} +26 -26
- package/dist/vue-ui-relation-circle-DbYE9UHq.js +671 -0
- package/dist/vue-ui-ridgeline-yaMl8iIE.js +1302 -0
- package/dist/vue-ui-rings-BowsO9I8.js +884 -0
- package/dist/vue-ui-scatter-C_nz0A4x.js +1619 -0
- package/dist/{vue-ui-skeleton-DsrlMELy.js → vue-ui-skeleton-DdXq2gl1.js} +3 -3
- package/dist/{vue-ui-smiley-P_8WIBDD.js → vue-ui-smiley-OYyM-ukP.js} +2 -2
- package/dist/vue-ui-spark-trend-BLticwHl.js +364 -0
- package/dist/vue-ui-sparkbar-DC2sDr9_.js +381 -0
- package/dist/vue-ui-sparkgauge-BENUfyuR.js +260 -0
- package/dist/vue-ui-sparkhistogram-BY0jsNsc.js +411 -0
- package/dist/vue-ui-sparkline-fS36LGCB.js +549 -0
- package/dist/vue-ui-sparkstackbar-C59ocU83.js +470 -0
- package/dist/vue-ui-stackbar-BtWWtzDp.js +1867 -0
- package/dist/vue-ui-stackline-CsGEHOOr.js +1963 -0
- package/dist/{vue-ui-strip-plot-CTtivaxm.js → vue-ui-strip-plot-n_rEdwkM.js} +343 -314
- package/dist/{vue-ui-table-CHt3AQiq.js → vue-ui-table-Kv2YL5OU.js} +5 -5
- package/dist/vue-ui-table-heatmap-vQEFrjCX.js +307 -0
- package/dist/{vue-ui-table-sparkline-D5MckwMl.js → vue-ui-table-sparkline-B8CCAdco.js} +292 -263
- package/dist/vue-ui-thermometer-C1Hr_LrY.js +613 -0
- package/dist/{vue-ui-timer-B-Xa6ALH.js → vue-ui-timer-CmnO99_j.js} +25 -25
- package/dist/vue-ui-tiremarks-DbZbhw6Q.js +477 -0
- package/dist/vue-ui-treemap-BGMpUu5v.js +1359 -0
- package/dist/{vue-ui-vertical-bar-D9XQe_ud.js → vue-ui-vertical-bar-CWlGQoB3.js} +520 -485
- package/dist/{vue-ui-waffle-Bk98w86A.js → vue-ui-waffle-BVVrMghT.js} +376 -347
- package/dist/vue-ui-wheel-B2pFBeKR.js +690 -0
- package/dist/vue-ui-word-cloud-BqKSDn2J.js +904 -0
- package/dist/{vue-ui-world-xOY__pp8.js → vue-ui-world-glj9mQAg.js} +57 -57
- package/dist/vue-ui-xy-BdXV4naK.js +3455 -0
- package/dist/vue-ui-xy-canvas-Cr13t9M5.js +1599 -0
- package/dist/vue_ui_vertical_bar-CELc39b8.js +18 -0
- package/package.json +5 -5
- package/dist/themes-DH-N_ePR.js +0 -54
- package/dist/vue-ui-age-pyramid-DsOlpJBh.js +0 -933
- package/dist/vue-ui-bullet-Ci4lO4_W.js +0 -630
- package/dist/vue-ui-chord-BKC--Nbq.js +0 -1153
- package/dist/vue-ui-circle-pack-B3sfU0Vo.js +0 -803
- package/dist/vue-ui-donut-evolution-BqUzmyW2.js +0 -1208
- package/dist/vue-ui-dumbbell-CWKTrzsm.js +0 -1231
- package/dist/vue-ui-flow-SMbuDPdL.js +0 -991
- package/dist/vue-ui-funnel-3fRlMBzq.js +0 -716
- package/dist/vue-ui-galaxy-CFZ1xYD5.js +0 -808
- package/dist/vue-ui-gauge-DJpbjfpL.js +0 -835
- package/dist/vue-ui-history-plot-CvPMx5Lg.js +0 -1204
- package/dist/vue-ui-molecule-CasngKZI.js +0 -753
- package/dist/vue-ui-mood-radar-DGz2TQi4.js +0 -903
- package/dist/vue-ui-nested-donuts-Bjjz2sWG.js +0 -1419
- package/dist/vue-ui-onion-DwTIY6i1.js +0 -915
- package/dist/vue-ui-parallel-coordinate-plot-DedxvtPN.js +0 -1051
- package/dist/vue-ui-radar-D1rz2RnH.js +0 -984
- package/dist/vue-ui-relation-circle-DUfRwwo1.js +0 -641
- package/dist/vue-ui-ridgeline-DKPWMWRc.js +0 -1273
- package/dist/vue-ui-rings-BY0EQGLb.js +0 -855
- package/dist/vue-ui-scatter-ky9p5Pgh.js +0 -1590
- package/dist/vue-ui-spark-trend-DkJn_3FI.js +0 -337
- package/dist/vue-ui-sparkbar-qB1fmgej.js +0 -352
- package/dist/vue-ui-sparkgauge-BezFN_Rc.js +0 -233
- package/dist/vue-ui-sparkhistogram-DGt5b8FR.js +0 -384
- package/dist/vue-ui-sparkline-D7Wx1ejg.js +0 -514
- package/dist/vue-ui-sparkstackbar-DtO7-yim.js +0 -441
- package/dist/vue-ui-stackbar-Dr48I48D.js +0 -1832
- package/dist/vue-ui-stackline-Juns5Yh4.js +0 -1928
- package/dist/vue-ui-table-heatmap-Cn-56b5F.js +0 -282
- package/dist/vue-ui-thermometer-BOidpwAZ.js +0 -584
- package/dist/vue-ui-tiremarks-BsTyVS2P.js +0 -450
- package/dist/vue-ui-treemap-BWTaY91B.js +0 -1330
- package/dist/vue-ui-wheel-nj73b_Dc.js +0 -663
- package/dist/vue-ui-word-cloud-Dcaogr-D.js +0 -875
- package/dist/vue-ui-xy-BT67faLv.js +0 -3424
- package/dist/vue-ui-xy-canvas-BoB7-4QK.js +0 -1564
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as K, useSlots as we, onMounted as Q, ref as v, toRefs as Ce, watch as Z, computed as S, createElementBlock as r, openBlock as s, normalizeStyle as f, createCommentVNode as h, createVNode as ee, createBlock as $e, createElementVNode as d, toDisplayString as A, unref as c, Fragment as k, renderList as I, normalizeClass as L, withCtx as te, renderSlot as R, normalizeProps as le, guardReactiveProps as oe } from "vue";
|
|
2
|
-
import { c as ae, t as Se, b as Fe, p as i, h as D, e as Ae, o as Ie, f as se, g as De, d as j, X as Te, s as re, i as ne, a as ue, G as Pe } from "./lib-C_mNZmhD.js";
|
|
3
|
-
import { u as ze, a as ie } from "./useNestedProp-CIoDlpHu.js";
|
|
4
|
-
import { u as Be } from "./useChartAccessibility-9icAAmYg.js";
|
|
5
|
-
import { t as Le } from "./themes-DH-N_ePR.js";
|
|
6
|
-
import { u as Ne, B as Ve } from "./BaseScanner-BgWxam9d.js";
|
|
7
|
-
import { _ as Ee } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
-
const Ue = ["xmlns", "viewBox"], Me = ["id"], Oe = ["stop-color"], Re = ["stop-color"], je = ["stop-color"], Ge = {
|
|
9
|
-
id: "stackPill",
|
|
10
|
-
clipPathUnits: "objectBoundingBox"
|
|
11
|
-
}, We = ["fill"], Ye = {
|
|
12
|
-
key: 0,
|
|
13
|
-
"clip-path": "url(#stackPill)"
|
|
14
|
-
}, qe = ["x", "width", "height", "fill"], He = ["x", "width", "height", "fill", "stroke"], Xe = ["x", "width", "height", "onClick", "onMouseenter", "onMouseleave"], Je = ["width", "height", "rx"], Ke = ["onClick"], Qe = { style: { display: "flex", "flex-direction": "row", "align-items": "center", gap: "4px", "justify-content": "center" } }, Ze = ["height", "width"], et = ["id"], tt = ["stop-color"], lt = ["stop-color"], ot = ["fill"], at = {
|
|
15
|
-
key: 2,
|
|
16
|
-
ref: "source",
|
|
17
|
-
dir: "auto"
|
|
18
|
-
}, st = {
|
|
19
|
-
__name: "vue-ui-sparkstackbar",
|
|
20
|
-
props: {
|
|
21
|
-
config: {
|
|
22
|
-
type: Object,
|
|
23
|
-
default() {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
dataset: {
|
|
28
|
-
type: Array,
|
|
29
|
-
default() {
|
|
30
|
-
return [];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
emits: ["selectDatapoint"],
|
|
35
|
-
setup(ce, { expose: de, emit: ve }) {
|
|
36
|
-
const pe = K(() => import("./PackageVersion-D_4Hr4S4.js")), fe = K(() => import("./Tooltip-oWCO1HKy.js")), { vue_ui_sparkstackbar: ge } = ze(), _ = ce, he = we();
|
|
37
|
-
Q(() => {
|
|
38
|
-
he["chart-background"] && console.warn("VueUiSparkStackbar does not support the #chart-background slot.");
|
|
39
|
-
});
|
|
40
|
-
const G = v(null), T = v(ae()), N = v(!1), V = v(""), e = v(E()), { loading: x, FINAL_DATASET: m } = Ne({
|
|
41
|
-
...Ce(_),
|
|
42
|
-
FINAL_CONFIG: e,
|
|
43
|
-
prepareConfig: E,
|
|
44
|
-
skeletonDataset: [
|
|
45
|
-
{ name: "_", value: 8, color: "#808080" },
|
|
46
|
-
{ name: "_", value: 5, color: "#ADADAD" },
|
|
47
|
-
{ name: "_", value: 3, color: "#DBDBDB" }
|
|
48
|
-
],
|
|
49
|
-
skeletonConfig: Se({
|
|
50
|
-
defaultConfig: e.value,
|
|
51
|
-
userConfig: {
|
|
52
|
-
style: {
|
|
53
|
-
backgroundColor: "#99999930",
|
|
54
|
-
animation: { show: !1 },
|
|
55
|
-
bar: { gradient: { inderlayerColor: "#6A6A6A" } },
|
|
56
|
-
title: {
|
|
57
|
-
backgroundColor: "transparent"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
})
|
|
62
|
-
}), { svgRef: ye } = Be({ config: e.value.style.title });
|
|
63
|
-
function E() {
|
|
64
|
-
const t = ie({
|
|
65
|
-
userConfig: _.config,
|
|
66
|
-
defaultConfig: ge
|
|
67
|
-
});
|
|
68
|
-
return t.theme ? {
|
|
69
|
-
...ie({
|
|
70
|
-
userConfig: Le.vue_ui_sparkstackbar[t.theme] || _.config,
|
|
71
|
-
defaultConfig: t
|
|
72
|
-
}),
|
|
73
|
-
customPalette: Fe[t.theme] || i
|
|
74
|
-
} : t;
|
|
75
|
-
}
|
|
76
|
-
Z(() => _.config, (t) => {
|
|
77
|
-
e.value = E(), q();
|
|
78
|
-
}, { deep: !0 }), Z(() => m.value, (t) => {
|
|
79
|
-
b.value = m.value.map((o, l) => ({
|
|
80
|
-
...o,
|
|
81
|
-
color: o.color ? D(o.color) : F.value[l] || i[l] || i[l % i.length]
|
|
82
|
-
})), W();
|
|
83
|
-
}, { deep: !0 });
|
|
84
|
-
const F = S(() => Ae(e.value.customPalette)), b = v(m.value.map((t, o) => ({
|
|
85
|
-
...t,
|
|
86
|
-
value: e.value.style.animation.show ? 0 : t.value || 0,
|
|
87
|
-
color: t.color ? D(t.color) : F.value[o] || i[o] || i[o % i.length]
|
|
88
|
-
}))), w = v(!0);
|
|
89
|
-
function W() {
|
|
90
|
-
if (!e.value.style.animation.show) return;
|
|
91
|
-
const t = e.value.style.animation.animationFrames, o = m.value.map((n) => n.value || 0), l = o.map((n) => n / t), a = o.reduce((n, u) => n + u, 0);
|
|
92
|
-
let y = 0;
|
|
93
|
-
w.value = !0, b.value = m.value.map((n, u) => ({
|
|
94
|
-
...n,
|
|
95
|
-
value: 0,
|
|
96
|
-
color: n.color ? D(n.color) : F.value[u] || i[u] || i[u % i.length]
|
|
97
|
-
}));
|
|
98
|
-
function B() {
|
|
99
|
-
y += a / t, y < a ? (b.value = b.value.map((n, u) => ({
|
|
100
|
-
...n,
|
|
101
|
-
value: Math.min(n.value + l[u], o[u]),
|
|
102
|
-
color: n.color ? D(n.color) : F.value[u] || i[u] || i[u % i.length]
|
|
103
|
-
})), requestAnimationFrame(B)) : (w.value = !1, b.value = m.value.map((n, u) => ({
|
|
104
|
-
...n,
|
|
105
|
-
value: o[u],
|
|
106
|
-
color: n.color ? D(n.color) : F.value[u] || i[u] || i[u % i.length],
|
|
107
|
-
id: ae()
|
|
108
|
-
})));
|
|
109
|
-
}
|
|
110
|
-
B();
|
|
111
|
-
}
|
|
112
|
-
Q(() => {
|
|
113
|
-
q();
|
|
114
|
-
});
|
|
115
|
-
const Y = S(() => e.value.debug);
|
|
116
|
-
function q() {
|
|
117
|
-
Ie(_.dataset) ? se({
|
|
118
|
-
componentName: "VueUiSparkStackbar",
|
|
119
|
-
type: "dataset",
|
|
120
|
-
debug: Y.value
|
|
121
|
-
}) : _.dataset.forEach((t, o) => {
|
|
122
|
-
De({
|
|
123
|
-
datasetObject: t,
|
|
124
|
-
requiredAttributes: ["name", "value"]
|
|
125
|
-
}).forEach((l) => {
|
|
126
|
-
se({
|
|
127
|
-
componentName: "VueUiSparkStackbar",
|
|
128
|
-
type: "datasetSerieAttribute",
|
|
129
|
-
property: l,
|
|
130
|
-
index: o,
|
|
131
|
-
debug: Y.value
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
}), W();
|
|
135
|
-
}
|
|
136
|
-
const g = v({
|
|
137
|
-
width: 500,
|
|
138
|
-
height: 16
|
|
139
|
-
}), p = v([]), H = S(() => m.value.map((t) => t.value || 0).filter((t, o) => !p.value.includes(o)).reduce((t, o) => t + o, 0)), C = S(() => b.value.map((t, o) => {
|
|
140
|
-
const l = t.value || 0, a = l / H.value, y = isNaN(a) ? 0 : a, B = y * g.value.width;
|
|
141
|
-
return {
|
|
142
|
-
...t,
|
|
143
|
-
value: l,
|
|
144
|
-
proportion: y,
|
|
145
|
-
width: B,
|
|
146
|
-
seriesIndex: o,
|
|
147
|
-
proportionLabel: j({
|
|
148
|
-
v: y * 100,
|
|
149
|
-
s: "%",
|
|
150
|
-
r: e.value.style.legend.percentage.rounding
|
|
151
|
-
})
|
|
152
|
-
};
|
|
153
|
-
})), U = S(() => C.value.filter((t, o) => !p.value.includes(o)));
|
|
154
|
-
function M(t) {
|
|
155
|
-
p.value.includes(t) ? p.value = p.value.filter((o) => o !== t) : p.value.length < b.value.length - 1 && p.value.push(t);
|
|
156
|
-
}
|
|
157
|
-
function X(t) {
|
|
158
|
-
if (!C.value.length)
|
|
159
|
-
return e.value.debug && console.warn("VueUiSparkStackbar - There are no series to show."), null;
|
|
160
|
-
const o = C.value.find((l) => l.name === t);
|
|
161
|
-
return o || (e.value.debug && console.warn(`VueUiSparkStackbar - Series name not found "${t}"`), null);
|
|
162
|
-
}
|
|
163
|
-
function me(t) {
|
|
164
|
-
const o = X(t);
|
|
165
|
-
o !== null && p.value.includes(o.id) && M(o.seriesIndex);
|
|
166
|
-
}
|
|
167
|
-
function be(t) {
|
|
168
|
-
const o = X(t);
|
|
169
|
-
o !== null && (p.value.includes(o.id) || M(o.seriesIndex));
|
|
170
|
-
}
|
|
171
|
-
const P = S(() => {
|
|
172
|
-
let t = 0;
|
|
173
|
-
const o = [];
|
|
174
|
-
for (let l = 0; l < U.value.length; l += 1)
|
|
175
|
-
o.push({
|
|
176
|
-
...U.value[l],
|
|
177
|
-
start: t
|
|
178
|
-
}), t += U.value[l].width;
|
|
179
|
-
return o;
|
|
180
|
-
}), ke = ve;
|
|
181
|
-
function J(t, o, l = !1) {
|
|
182
|
-
ke("selectDatapoint", { datapoint: t, index: o }), e.value.events.datapointClick && !l && e.value.events.datapointClick({ datapoint: t, seriesIndex: t.seriesIndex });
|
|
183
|
-
}
|
|
184
|
-
const O = v(null), z = v(!1), $ = v(null);
|
|
185
|
-
function _e({ datapoint: t, seriesIndex: o }) {
|
|
186
|
-
N.value = !1, $.value = null, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: t.seriesIndex });
|
|
187
|
-
}
|
|
188
|
-
function xe({ datapoint: t, seriesIndex: o }) {
|
|
189
|
-
if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: t.seriesIndex }), !e.value.style.tooltip.show)
|
|
190
|
-
return;
|
|
191
|
-
O.value = { datapoint: t, seriesIndex: o, config: e.value, series: C.value }, N.value = !0, $.value = o;
|
|
192
|
-
const l = e.value.style.tooltip.customFormat;
|
|
193
|
-
if (Pe(l))
|
|
194
|
-
try {
|
|
195
|
-
const a = l({
|
|
196
|
-
seriesIndex: t.seriesIndex,
|
|
197
|
-
datapoint: t,
|
|
198
|
-
series: C.value,
|
|
199
|
-
config: e.value
|
|
200
|
-
});
|
|
201
|
-
typeof a == "string" && (V.value = a, z.value = !0);
|
|
202
|
-
} catch {
|
|
203
|
-
console.warn("Custom format cannot be applied."), z.value = !1;
|
|
204
|
-
}
|
|
205
|
-
if (!z.value) {
|
|
206
|
-
let a = "";
|
|
207
|
-
a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`, a += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`, a += `<b>${t.proportionLabel}</b>`, a += `<span>(${ue(
|
|
208
|
-
e.value.style.legend.value.formatter,
|
|
209
|
-
t.value,
|
|
210
|
-
j({
|
|
211
|
-
p: e.value.style.legend.value.prefix,
|
|
212
|
-
v: t.value,
|
|
213
|
-
s: e.value.style.legend.value.suffix,
|
|
214
|
-
r: e.value.style.legend.value.rounding
|
|
215
|
-
}),
|
|
216
|
-
{
|
|
217
|
-
datapoint: t,
|
|
218
|
-
seriesIndex: o
|
|
219
|
-
}
|
|
220
|
-
)})</span>`, V.value = `<div>${a}</div>`;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
return de({
|
|
224
|
-
hideSeries: be,
|
|
225
|
-
showSeries: me
|
|
226
|
-
}), (t, o) => (s(), r("div", {
|
|
227
|
-
class: "vue-data-ui-component vue-ui-spark-stackbar",
|
|
228
|
-
ref_key: "sparkstackbarChart",
|
|
229
|
-
ref: G,
|
|
230
|
-
style: f(`width:100%; background:${e.value.style.backgroundColor}`)
|
|
231
|
-
}, [
|
|
232
|
-
e.value.style.title.text ? (s(), r("div", {
|
|
233
|
-
key: 0,
|
|
234
|
-
style: f(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${e.value.style.title.margin};padding: 0 6px;text-align:${e.value.style.title.textAlign}`)
|
|
235
|
-
}, [
|
|
236
|
-
d("div", {
|
|
237
|
-
class: "atom-title",
|
|
238
|
-
style: f(`font-size:${e.value.style.title.fontSize}px;color:${e.value.style.title.color};font-weight:${e.value.style.title.bold ? "bold" : "normal"}`)
|
|
239
|
-
}, A(e.value.style.title.text), 5),
|
|
240
|
-
e.value.style.title.subtitle.text ? (s(), r("div", {
|
|
241
|
-
key: 0,
|
|
242
|
-
class: "atom-subtitle",
|
|
243
|
-
style: f(`font-size:${e.value.style.title.subtitle.fontSize}px;color:${e.value.style.title.subtitle.color};font-weight:${e.value.style.title.subtitle.bold ? "bold" : "normal"}`)
|
|
244
|
-
}, A(e.value.style.title.subtitle.text), 5)) : h("", !0)
|
|
245
|
-
], 4)) : h("", !0),
|
|
246
|
-
(s(), r("svg", {
|
|
247
|
-
ref_key: "svgRef",
|
|
248
|
-
ref: ye,
|
|
249
|
-
xmlns: c(Te),
|
|
250
|
-
width: "100%",
|
|
251
|
-
viewBox: `0 0 ${g.value.width} ${g.value.height}`
|
|
252
|
-
}, [
|
|
253
|
-
ee(c(pe)),
|
|
254
|
-
d("defs", null, [
|
|
255
|
-
(s(!0), r(k, null, I(P.value, (l, a) => (s(), r("linearGradient", {
|
|
256
|
-
key: `stack_gradient_${a}`,
|
|
257
|
-
gradientTransform: "rotate(90)",
|
|
258
|
-
id: `stack_gradient_${a}_${T.value}`
|
|
259
|
-
}, [
|
|
260
|
-
d("stop", {
|
|
261
|
-
offset: "0%",
|
|
262
|
-
"stop-color": l.color
|
|
263
|
-
}, null, 8, Oe),
|
|
264
|
-
d("stop", {
|
|
265
|
-
offset: "50%",
|
|
266
|
-
"stop-color": c(re)(c(ne)(l.color, 0.05), 100 - e.value.style.bar.gradient.intensity)
|
|
267
|
-
}, null, 8, Re),
|
|
268
|
-
d("stop", {
|
|
269
|
-
offset: "100%",
|
|
270
|
-
"stop-color": l.color
|
|
271
|
-
}, null, 8, je)
|
|
272
|
-
], 8, Me))), 128)),
|
|
273
|
-
d("clipPath", Ge, [
|
|
274
|
-
d("rect", {
|
|
275
|
-
x: "0.005",
|
|
276
|
-
y: "-2",
|
|
277
|
-
width: "0.99",
|
|
278
|
-
height: "5",
|
|
279
|
-
rx: "3",
|
|
280
|
-
ry: "3",
|
|
281
|
-
fill: e.value.style.backgroundColor
|
|
282
|
-
}, null, 8, We)
|
|
283
|
-
])
|
|
284
|
-
]),
|
|
285
|
-
H.value > 0 ? (s(), r("g", Ye, [
|
|
286
|
-
(s(!0), r(k, null, I(P.value, (l, a) => (s(), r("rect", {
|
|
287
|
-
key: `stack_underlayer_${a}`,
|
|
288
|
-
x: l.start,
|
|
289
|
-
y: 0,
|
|
290
|
-
width: l.width,
|
|
291
|
-
height: g.value.height,
|
|
292
|
-
fill: e.value.style.bar.gradient.underlayerColor,
|
|
293
|
-
class: L({ animated: !w.value && !c(x) }),
|
|
294
|
-
style: f({
|
|
295
|
-
opacity: $.value !== null && e.value.style.tooltip.show ? $.value === a ? 1 : 0.5 : 1
|
|
296
|
-
})
|
|
297
|
-
}, null, 14, qe))), 128)),
|
|
298
|
-
(s(!0), r(k, null, I(P.value, (l, a) => (s(), r("rect", {
|
|
299
|
-
key: `stack_${a}`,
|
|
300
|
-
x: l.start,
|
|
301
|
-
y: 0,
|
|
302
|
-
width: l.width,
|
|
303
|
-
height: g.value.height,
|
|
304
|
-
fill: e.value.style.bar.gradient.show ? `url(#stack_gradient_${a}_${T.value})` : l.color,
|
|
305
|
-
stroke: e.value.style.backgroundColor,
|
|
306
|
-
"stroke-linecap": "round",
|
|
307
|
-
class: L({ animated: !w.value && !c(x) }),
|
|
308
|
-
style: f({
|
|
309
|
-
opacity: $.value !== null && e.value.style.tooltip.show ? $.value === a ? 1 : 0.5 : 1
|
|
310
|
-
})
|
|
311
|
-
}, null, 14, He))), 128)),
|
|
312
|
-
(s(!0), r(k, null, I(P.value, (l, a) => (s(), r("rect", {
|
|
313
|
-
key: `stack_trap_${a}`,
|
|
314
|
-
x: l.start,
|
|
315
|
-
y: 0,
|
|
316
|
-
width: l.width,
|
|
317
|
-
height: g.value.height,
|
|
318
|
-
fill: "transparent",
|
|
319
|
-
stroke: "none",
|
|
320
|
-
class: L({ animated: !w.value && !c(x) }),
|
|
321
|
-
onClick: () => J(l, a),
|
|
322
|
-
onMouseenter: () => xe({ datapoint: l, seriesIndex: a }),
|
|
323
|
-
onMouseleave: (y) => _e({ datapoint: l, seriesIndex: a })
|
|
324
|
-
}, null, 42, Xe))), 128))
|
|
325
|
-
])) : (s(), r("rect", {
|
|
326
|
-
key: 1,
|
|
327
|
-
x: 2,
|
|
328
|
-
y: 1,
|
|
329
|
-
width: g.value.width - 4,
|
|
330
|
-
height: g.value.height - 2,
|
|
331
|
-
stroke: "#CCCCCC",
|
|
332
|
-
"stroke-width": "2",
|
|
333
|
-
fill: "transparent",
|
|
334
|
-
rx: (g.value.height - 4) / 2
|
|
335
|
-
}, null, 8, Je))
|
|
336
|
-
], 8, Ue)),
|
|
337
|
-
e.value.style.legend.show ? (s(), r("div", {
|
|
338
|
-
key: 1,
|
|
339
|
-
style: f(`background:transparent;margin:0 auto;margin:${e.value.style.legend.margin};justify-content:${e.value.style.legend.textAlign === "left" ? "flex-start" : e.value.style.legend.textAlign === "right" ? "flex-end" : "center"}`),
|
|
340
|
-
class: "vue-ui-sparkstackbar-legend"
|
|
341
|
-
}, [
|
|
342
|
-
(s(!0), r(k, null, I(C.value, (l, a) => (s(), r("div", {
|
|
343
|
-
style: f(`font-size:${e.value.style.legend.fontSize}px;`),
|
|
344
|
-
class: L({ "vue-ui-sparkstackbar-legend-item": !0, "vue-ui-sparkstackbar-legend-item-unselected": p.value.includes(a) }),
|
|
345
|
-
onClick: (y) => {
|
|
346
|
-
M(a), J(l, a, !0);
|
|
347
|
-
}
|
|
348
|
-
}, [
|
|
349
|
-
d("div", Qe, [
|
|
350
|
-
(s(), r("svg", {
|
|
351
|
-
height: `${e.value.style.legend.fontSize}px`,
|
|
352
|
-
width: `${e.value.style.legend.fontSize}px`,
|
|
353
|
-
viewBox: "0 0 10 10"
|
|
354
|
-
}, [
|
|
355
|
-
d("defs", null, [
|
|
356
|
-
d("radialGradient", {
|
|
357
|
-
id: `legend_grad_${a}-${T.value}`
|
|
358
|
-
}, [
|
|
359
|
-
d("stop", {
|
|
360
|
-
offset: "0%",
|
|
361
|
-
"stop-color": c(x) ? "#FFFFFF" : c(re)(c(ne)(l.color, 0.05), 100 - e.value.style.bar.gradient.intensity)
|
|
362
|
-
}, null, 8, tt),
|
|
363
|
-
d("stop", {
|
|
364
|
-
offset: "100%",
|
|
365
|
-
"stop-color": l.color
|
|
366
|
-
}, null, 8, lt)
|
|
367
|
-
], 8, et)
|
|
368
|
-
]),
|
|
369
|
-
d("circle", {
|
|
370
|
-
cx: 5,
|
|
371
|
-
cy: 5,
|
|
372
|
-
r: 5,
|
|
373
|
-
fill: e.value.style.bar.gradient.show ? `url(#legend_grad_${a}-${T.value})` : l.color
|
|
374
|
-
}, null, 8, ot)
|
|
375
|
-
], 8, Ze)),
|
|
376
|
-
c(x) ? h("", !0) : (s(), r(k, { key: 0 }, [
|
|
377
|
-
d("span", {
|
|
378
|
-
style: f(`color:${e.value.style.legend.name.color}; font-weight:${e.value.style.legend.name.bold ? "bold" : "normal"}`)
|
|
379
|
-
}, A(l.name), 5),
|
|
380
|
-
w.value ? h("", !0) : (s(), r(k, { key: 0 }, [
|
|
381
|
-
e.value.style.legend.percentage.show ? (s(), r("span", {
|
|
382
|
-
key: 0,
|
|
383
|
-
style: f(`font-weight:${e.value.style.legend.percentage.bold ? "bold" : "normal"};color:${e.value.style.legend.percentage.color}`)
|
|
384
|
-
}, A(p.value.includes(a) ? " - " : l.proportionLabel), 5)) : h("", !0),
|
|
385
|
-
e.value.style.legend.value.show ? (s(), r("span", {
|
|
386
|
-
key: 1,
|
|
387
|
-
style: f(`font-weight:${e.value.style.legend.value.bold ? "bold" : "normal"};color:${e.value.style.legend.value.color}`)
|
|
388
|
-
}, " (" + A(c(ue)(
|
|
389
|
-
e.value.style.legend.value.formatter,
|
|
390
|
-
l.value,
|
|
391
|
-
c(j)({
|
|
392
|
-
p: e.value.style.legend.value.prefix,
|
|
393
|
-
v: l.value,
|
|
394
|
-
s: e.value.style.legend.value.suffix,
|
|
395
|
-
r: e.value.style.legend.value.rounding
|
|
396
|
-
}),
|
|
397
|
-
{ datapoint: l, seriesIndex: a }
|
|
398
|
-
)) + ") ", 5)) : h("", !0)
|
|
399
|
-
], 64))
|
|
400
|
-
], 64))
|
|
401
|
-
])
|
|
402
|
-
], 14, Ke))), 256))
|
|
403
|
-
], 4)) : h("", !0),
|
|
404
|
-
ee(c(fe), {
|
|
405
|
-
show: N.value && e.value.style.tooltip.show,
|
|
406
|
-
parent: G.value,
|
|
407
|
-
backgroundColor: e.value.style.tooltip.backgroundColor,
|
|
408
|
-
color: e.value.style.tooltip.color,
|
|
409
|
-
fontSize: e.value.style.tooltip.fontSize,
|
|
410
|
-
borderRadius: e.value.style.tooltip.borderRadius,
|
|
411
|
-
borderColor: e.value.style.tooltip.borderColor,
|
|
412
|
-
borderWidth: e.value.style.tooltip.borderWidth,
|
|
413
|
-
backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
|
|
414
|
-
position: e.value.style.tooltip.position,
|
|
415
|
-
content: V.value,
|
|
416
|
-
isCustom: z.value,
|
|
417
|
-
offsetY: -124 + e.value.style.tooltip.offsetY,
|
|
418
|
-
blockShiftY: !0,
|
|
419
|
-
smooth: e.value.style.tooltip.smooth,
|
|
420
|
-
backdropFilter: e.value.style.tooltip.backdropFilter,
|
|
421
|
-
smoothForce: e.value.style.tooltip.smoothForce,
|
|
422
|
-
smoothSnapThreshold: e.value.style.tooltip.smoothSnapThreshold
|
|
423
|
-
}, {
|
|
424
|
-
"tooltip-before": te(() => [
|
|
425
|
-
R(t.$slots, "tooltip-before", le(oe({ ...O.value })), void 0, !0)
|
|
426
|
-
]),
|
|
427
|
-
"tooltip-after": te(() => [
|
|
428
|
-
R(t.$slots, "tooltip-after", le(oe({ ...O.value })), void 0, !0)
|
|
429
|
-
]),
|
|
430
|
-
_: 3
|
|
431
|
-
}, 8, ["show", "parent", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "content", "isCustom", "offsetY", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
|
|
432
|
-
t.$slots.source ? (s(), r("div", at, [
|
|
433
|
-
R(t.$slots, "source", {}, void 0, !0)
|
|
434
|
-
], 512)) : h("", !0),
|
|
435
|
-
c(x) ? (s(), $e(Ve, { key: 3 })) : h("", !0)
|
|
436
|
-
], 4));
|
|
437
|
-
}
|
|
438
|
-
}, pt = /* @__PURE__ */ Ee(st, [["__scopeId", "data-v-ffa64d8d"]]);
|
|
439
|
-
export {
|
|
440
|
-
pt as default
|
|
441
|
-
};
|