vue-data-ui 3.1.0 → 3.1.2
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/dist/{Arrow-DvG07exK.js → Arrow-BotYLY2I.js} +1 -1
- package/dist/{BaseDraggableDialog-O7900pGp.js → BaseDraggableDialog-Dkpr-qUQ.js} +2 -2
- package/dist/{BaseIcon-DHtro8us.js → BaseIcon-BLg8FaQ2.js} +5 -3
- package/dist/{ColorPicker-CpWzNn4r.js → ColorPicker-C2sMVpbA.js} +2 -2
- package/dist/{DataTable-DJjA2_wf.js → DataTable-BRN1-1ob.js} +2 -2
- package/dist/{Legend-2-dC7DVb.js → Legend-DLzeDl3-.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DHeE4Yuv.js → NonSvgPenAndPaper-Dp53d2re.js} +3 -3
- package/dist/{PackageVersion-DU12WH3O.js → PackageVersion-Jz9FlNXl.js} +1 -1
- package/dist/{PenAndPaper-B7QEDgx4.js → PenAndPaper-TgGWddgD.js} +3 -3
- package/dist/{Shape-Dj2Hl33H.js → Shape-Bmpx9GRg.js} +1 -1
- package/dist/{Slicer-D99HytqX.js → Slicer-DeWHn8zH.js} +2 -2
- package/dist/{SparkTooltip-B-wL07rI.js → SparkTooltip-C6fJOQ0j.js} +1 -1
- package/dist/{Title-Dq2_Z9kR.js → Title-AGmmsSi_.js} +1 -1
- package/dist/{Tooltip-Y219DXZO.js → Tooltip-le0yZk_t.js} +1 -1
- package/dist/{UserOptions-BuGfCdAY.js → UserOptions-DEFwuQIo.js} +125 -108
- package/dist/{dom-to-png-BhciAKaM.js → dom-to-png-C7V0EktO.js} +1 -1
- package/dist/{img-JOqdlnUs.js → img-DvuphHeJ.js} +1 -1
- package/dist/{index-CDQbCd41.js → index-BFqW8WA0.js} +97 -74
- package/dist/pdf-Bdf65IBz.js +79 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +25 -2
- package/dist/types/vue-data-ui.d.ts +25 -2
- package/dist/{useAutoSizeLabelsInsideViewbox-Bky5KGFZ.js → useAutoSizeLabelsInsideViewbox-N1I6Rk6M.js} +1 -1
- package/dist/{useNestedProp-BPEHGiYX.js → useNestedProp-BSZCnuGl.js} +1 -1
- package/dist/{usePrinter-Bnl1YeUU.js → usePrinter-DDIKRiOp.js} +13 -12
- package/dist/useTableResponsive-Cbx-ACcP.js +22 -0
- package/dist/{vue-data-ui-DcNYz3cZ.js → vue-data-ui-vwh3dolO.js} +64 -64
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BNIFAeN-.js → vue-ui-3d-bar-DNw3RWRt.js} +371 -366
- package/dist/{vue-ui-accordion-Bf_LHFFX.js → vue-ui-accordion-Cv747Pg6.js} +3 -3
- package/dist/{vue-ui-age-pyramid-Bz-l1afR.js → vue-ui-age-pyramid-B1Yun-v7.js} +200 -195
- package/dist/{vue-ui-annotator-BcfRH2BF.js → vue-ui-annotator-B_5hOApA.js} +2 -2
- package/dist/{vue-ui-bullet-DK1aM9fX.js → vue-ui-bullet-C2Aj7Lcx.js} +7 -7
- package/dist/{vue-ui-candlestick-D6mMjvtu.js → vue-ui-candlestick-BBYqZVUp.js} +225 -220
- package/dist/{vue-ui-carousel-table-Vp5f238W.js → vue-ui-carousel-table-DPIOnp9J.js} +4 -4
- package/dist/{vue-ui-chestnut-BKc4v-lf.js → vue-ui-chestnut-C4B0wEFn.js} +484 -487
- package/dist/{vue-ui-chord-CquhRjf0.js → vue-ui-chord-B9Zml1V7.js} +272 -266
- package/dist/{vue-ui-circle-pack-D6zLgxa3.js → vue-ui-circle-pack-CLn19BHH.js} +6 -6
- package/dist/{vue-ui-cursor-DIXb2S93.js → vue-ui-cursor-AVEV-uv3.js} +2 -2
- package/dist/vue-ui-dashboard-DwNYa1I4.js +412 -0
- package/dist/{vue-ui-digits-CLAIo9gW.js → vue-ui-digits-Dr4OHGU0.js} +2 -2
- package/dist/{vue-ui-donut-evolution-C3r0YhKz.js → vue-ui-donut-evolution-hJh-1Z48.js} +310 -304
- package/dist/{vue-ui-donut-C8h_tCSO.js → vue-ui-donut-xseR2SnT.js} +348 -343
- package/dist/{vue-ui-dumbbell-D-t4M00E.js → vue-ui-dumbbell-FdTx7uAG.js} +293 -287
- package/dist/{vue-ui-flow-D7_D_UNm.js → vue-ui-flow-Bh6FqlC1.js} +263 -257
- package/dist/{vue-ui-funnel-B0QOfZRz.js → vue-ui-funnel-BlsKhHbk.js} +206 -200
- package/dist/{vue-ui-galaxy-Ccw5uNes.js → vue-ui-galaxy-C0B8stYi.js} +243 -238
- package/dist/{vue-ui-gauge-DvW7nFmK.js → vue-ui-gauge-B1-UiZwV.js} +7 -7
- package/dist/{vue-ui-gizmo-WGQxvGPy.js → vue-ui-gizmo-Df_SCjOI.js} +3 -3
- package/dist/{vue-ui-heatmap-BQkLujyp.js → vue-ui-heatmap-NfRSd6fU.js} +370 -375
- package/dist/{vue-ui-history-plot-eU33r_Ot.js → vue-ui-history-plot-Ce-DJ8xC.js} +305 -299
- package/dist/{vue-ui-kpi-CKg2i71M.js → vue-ui-kpi-CH3rWyiG.js} +3 -3
- package/dist/{vue-ui-mini-loader-BmkGQsm_.js → vue-ui-mini-loader-D9EVnpxk.js} +2 -2
- package/dist/{vue-ui-molecule-Dlu0hjSg.js → vue-ui-molecule-C973vfYh.js} +188 -183
- package/dist/{vue-ui-mood-radar-DQaxfw9R.js → vue-ui-mood-radar-DdLxBhlO.js} +197 -192
- package/dist/{vue-ui-nested-donuts-Djj9Aw_i.js → vue-ui-nested-donuts-tARXMYzx.js} +326 -320
- package/dist/{vue-ui-onion-ZgsErXis.js → vue-ui-onion-BC9czZGG.js} +8 -8
- package/dist/{vue-ui-parallel-coordinate-plot-B5fB22Jc.js → vue-ui-parallel-coordinate-plot-CxDIkZKr.js} +401 -395
- package/dist/{vue-ui-quadrant-CMevCtXH.js → vue-ui-quadrant-Bpm5ZoTp.js} +339 -334
- package/dist/{vue-ui-quick-chart-DcparKSX.js → vue-ui-quick-chart-Bkc_JBCw.js} +6 -6
- package/dist/{vue-ui-radar-DFbxoKCK.js → vue-ui-radar-DVJQYNeL.js} +248 -243
- package/dist/{vue-ui-rating-ZUpxCWrk.js → vue-ui-rating-DITnRSiS.js} +2 -2
- package/dist/{vue-ui-relation-circle-eNKJY4Sx.js → vue-ui-relation-circle-D_OTYUmS.js} +7 -7
- package/dist/{vue-ui-ridgeline-D4shpQZd.js → vue-ui-ridgeline-Gc1c4LXq.js} +267 -263
- package/dist/{vue-ui-rings-TdTHMbsa.js → vue-ui-rings-CUT1N_kK.js} +229 -224
- package/dist/{vue-ui-scatter-CVuV9ljU.js → vue-ui-scatter-DwnZHy0V.js} +359 -354
- package/dist/{vue-ui-skeleton-CFxBU2-p.js → vue-ui-skeleton-CeyaKpZd.js} +3 -3
- package/dist/{vue-ui-smiley-Har3B3aQ.js → vue-ui-smiley-B9yNexWr.js} +2 -2
- package/dist/{vue-ui-spark-trend-FPk-XEwI.js → vue-ui-spark-trend-DTYVcrHV.js} +3 -3
- package/dist/{vue-ui-sparkbar-V3eJ0w0t.js → vue-ui-sparkbar-BzxynYoW.js} +3 -3
- package/dist/{vue-ui-sparkgauge-DKTGkWnJ.js → vue-ui-sparkgauge-DoznCX5h.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-DJsgFwHs.js → vue-ui-sparkhistogram-DoZpd0H2.js} +4 -4
- package/dist/{vue-ui-sparkline-Dmrm5SL5.js → vue-ui-sparkline-ZKit-hgG.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-B0Pl7VMI.js → vue-ui-sparkstackbar-DjoqH_Xs.js} +3 -3
- package/dist/{vue-ui-stackbar-CNsgBPhj.js → vue-ui-stackbar-J-gxI4Xn.js} +310 -304
- package/dist/{vue-ui-strip-plot-CYAWwYOM.js → vue-ui-strip-plot-CO7NVeFi.js} +246 -240
- package/dist/{vue-ui-table-heatmap-COI9LRqC.js → vue-ui-table-heatmap-BEFdai_O.js} +5 -5
- package/dist/{vue-ui-table-Dn6H98rP.js → vue-ui-table-rmbBw_0d.js} +3 -3
- package/dist/{vue-ui-table-sparkline-B7Gg5FfJ.js → vue-ui-table-sparkline-CjgaQXbc.js} +4 -4
- package/dist/{vue-ui-thermometer-Bgynq5El.js → vue-ui-thermometer--aqaJwFo.js} +7 -7
- package/dist/{vue-ui-timer-CXng51v5.js → vue-ui-timer-qFNHDcU_.js} +5 -5
- package/dist/{vue-ui-tiremarks-Cy1U3hO1.js → vue-ui-tiremarks-DA8fzQHo.js} +6 -6
- package/dist/{vue-ui-treemap-BsvIvRmE.js → vue-ui-treemap-DGC9zxon.js} +262 -256
- package/dist/{vue-ui-vertical-bar-DHqWeDIf.js → vue-ui-vertical-bar-DOCeCCqz.js} +297 -298
- package/dist/{vue-ui-waffle-D1Mscj3N.js → vue-ui-waffle-DD9jtkcQ.js} +257 -252
- package/dist/{vue-ui-wheel-DpV-N5tF.js → vue-ui-wheel-87VStrfJ.js} +6 -6
- package/dist/vue-ui-word-cloud-CCMfa9H1.js +817 -0
- package/dist/{vue-ui-world-DYz6zw3x.js → vue-ui-world-Cm3Hn1-2.js} +257 -252
- package/dist/{vue-ui-xy-B1nqNbzw.js → vue-ui-xy-C2SnbN6w.js} +1453 -1447
- package/dist/{vue-ui-xy-canvas-D4wd-Asd.js → vue-ui-xy-canvas-WxSJqoiF.js} +235 -229
- package/package.json +1 -1
- package/dist/pdf-Dd-LIJqz.js +0 -61
- package/dist/vue-ui-dashboard-DmiriAK7.js +0 -325
- package/dist/vue-ui-word-cloud-MaNQ3Kdk.js +0 -811
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { useCssVars as Ut, defineAsyncComponent as K, useSlots as Xt, computed as y, ref as
|
|
2
|
-
import { u as qt, c as Yt, t as Kt, a as Jt, p as W, b as Qt, C as
|
|
1
|
+
import { useCssVars as Ut, defineAsyncComponent as K, useSlots as Xt, computed as y, ref as i, toRefs as Wt, watch as Ae, shallowRef as vt, onMounted as ze, nextTick as de, onBeforeUnmount as Gt, createElementBlock as v, openBlock as u, unref as s, normalizeStyle as d, normalizeClass as U, createBlock as X, createCommentVNode as f, renderSlot as _, createVNode as J, createSlots as he, withCtx as m, normalizeProps as Q, guardReactiveProps as Z, createElementVNode as n, toDisplayString as h, Fragment as ee, renderList as te, mergeProps as ct, resolveDynamicComponent as Ht, withKeys as jt, createTextVNode as dt } from "vue";
|
|
2
|
+
import { u as qt, c as Yt, t as Kt, a as Jt, p as W, b as Qt, C as Ve, d as Zt, h as L, o as Ie, f as ue, e as Oe, k as pe, i as G, X as ea, s as Fe, x as ta, v as aa, w as la, y as oa, z as na } from "./index-BFqW8WA0.js";
|
|
3
3
|
import { t as ua, u as sa } from "./useResponsive-DfdjqQps.js";
|
|
4
4
|
import { u as ra, B as ia } from "./BaseScanner-BgWxam9d.js";
|
|
5
|
-
import { u as va } from "./usePrinter-
|
|
6
|
-
import { u as
|
|
5
|
+
import { u as va } from "./usePrinter-DDIKRiOp.js";
|
|
6
|
+
import { u as ht } from "./useNestedProp-BSZCnuGl.js";
|
|
7
|
+
import { u as ca } from "./useTableResponsive-Cbx-ACcP.js";
|
|
7
8
|
import { u as da } from "./useUserOptionState-BIvW1Kz7.js";
|
|
8
|
-
import { u as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { _ as
|
|
13
|
-
import
|
|
14
|
-
import { _ as
|
|
15
|
-
const
|
|
9
|
+
import { u as ha } from "./useChartAccessibility-9icAAmYg.js";
|
|
10
|
+
import pt from "./Legend-DLzeDl3-.js";
|
|
11
|
+
import pa from "./vue-ui-accordion-Cv747Pg6.js";
|
|
12
|
+
import fa from "./Title-AGmmsSi_.js";
|
|
13
|
+
import { _ as ft } from "./Shape-Bmpx9GRg.js";
|
|
14
|
+
import ga from "./img-DvuphHeJ.js";
|
|
15
|
+
import { _ as ya } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
|
+
const ba = ["id"], ma = ["onClick"], ka = ["xmlns", "viewBox"], xa = ["x", "width", "height"], _a = ["id"], wa = ["stop-color"], $a = ["stop-color"], Ca = { key: 1 }, Ta = ["x", "y", "width", "height", "fill", "rx"], Sa = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], La = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], Pa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Na = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Aa = { class: "vue-ui-horizontal-bar-child-label" }, za = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], Va = ["x", "y", "font-size", "fill", "font-weight"], Ia = { class: "vue-ui-horizontal-bar-parent-label" }, Oa = ["x", "y", "font-size", "fill", "font-weight"], Fa = ["x", "y", "font-size", "fill", "font-weight"], Ma = ["x", "y", "width", "height", "fill", "onMouseenter", "onMouseleave", "onClick"], Da = {
|
|
16
17
|
key: 5,
|
|
17
18
|
class: "vue-data-ui-watermark"
|
|
18
|
-
}, Ba = ["onClick"],
|
|
19
|
+
}, Ba = ["onClick"], Ra = { style: "width:100%;padding-top: 36px;position:relative" }, Ea = { class: "vue-ui-data-table" }, Ua = { key: 0 }, Xa = { style: { width: "100%" } }, Wa = ["data-cell"], Ga = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ha = ["data-cell"], ja = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, qa = ["data-cell"], Ya = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ka = ["data-cell"], Ja = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Qa = ["data-cell"], Za = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, el = ["data-cell"], tl = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, al = ["data-cell"], ll = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, ol = {
|
|
19
20
|
__name: "vue-ui-vertical-bar",
|
|
20
21
|
props: {
|
|
21
22
|
config: {
|
|
@@ -32,31 +33,31 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
32
33
|
}
|
|
33
34
|
},
|
|
34
35
|
emits: ["selectLegend"],
|
|
35
|
-
setup(
|
|
36
|
+
setup(gt, { expose: yt, emit: bt }) {
|
|
36
37
|
Ut((t) => ({
|
|
37
|
-
|
|
38
|
+
f1ede08a: t.tdo
|
|
38
39
|
}));
|
|
39
|
-
const
|
|
40
|
+
const mt = K(() => import("./Tooltip-le0yZk_t.js")), Me = K(() => import("./BaseIcon-BLg8FaQ2.js")), kt = K(() => import("./PenAndPaper-TgGWddgD.js")), xt = K(() => import("./UserOptions-DEFwuQIo.js")), _t = K(() => import("./PackageVersion-Jz9FlNXl.js")), wt = K(() => import("./BaseDraggableDialog-Dkpr-qUQ.js")), { vue_ui_vertical_bar: $t } = qt(), Ct = Xt(), b = gt, fe = y({
|
|
40
41
|
get() {
|
|
41
42
|
return !!b.dataset && b.dataset.length;
|
|
42
43
|
},
|
|
43
44
|
set(t) {
|
|
44
45
|
return t;
|
|
45
46
|
}
|
|
46
|
-
}), S =
|
|
47
|
+
}), S = i(Yt()), ge = i(!1), ye = i(""), ae = i(0), Tt = i(null), De = i(0), P = i(null), Be = i(null), be = i(null), Re = i(null), Ee = i(null), Ue = i(0), me = i(0), H = i(null), le = i(null), ke = i(null), St = bt, e = i($e()), Lt = y(() => [
|
|
47
48
|
{ name: "", value: 6, color: "#d9d9d9" },
|
|
48
49
|
{ name: "", value: 5, color: "#d9d9d9" },
|
|
49
50
|
{ name: "", value: 4, color: "#d9d9d9" },
|
|
50
51
|
{ name: "", value: 3, color: "#d9d9d9" },
|
|
51
52
|
{ name: "", value: 2, color: "#d9d9d9" },
|
|
52
53
|
{ name: "", value: 1, color: "#d9d9d9" }
|
|
53
|
-
]), { loading:
|
|
54
|
+
]), { loading: Xe, FINAL_DATASET: xe, manualLoading: _e } = ra({
|
|
54
55
|
...Wt(b),
|
|
55
56
|
FINAL_CONFIG: e,
|
|
56
57
|
prepareConfig: $e,
|
|
57
58
|
callback: () => {
|
|
58
59
|
Promise.resolve().then(async () => {
|
|
59
|
-
q(),
|
|
60
|
+
q(), $.value.showTable = e.value.table.show, await O();
|
|
60
61
|
});
|
|
61
62
|
},
|
|
62
63
|
skeletonDataset: Lt.value,
|
|
@@ -106,67 +107,67 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
109
|
})
|
|
109
|
-
}), { userOptionsVisible:
|
|
110
|
+
}), { userOptionsVisible: we, setUserOptionsVisibility: We, keepUserOptionState: Ge } = da({ config: e.value }), { svgRef: He } = ha({ config: e.value.style.chart.title });
|
|
110
111
|
function $e() {
|
|
111
|
-
const t =
|
|
112
|
+
const t = ht({
|
|
112
113
|
userConfig: b.config,
|
|
113
|
-
defaultConfig:
|
|
114
|
+
defaultConfig: $t
|
|
114
115
|
});
|
|
115
116
|
let l = {};
|
|
116
117
|
return t.theme ? l = {
|
|
117
|
-
...
|
|
118
|
+
...ht({
|
|
118
119
|
userConfig: Qt.vue_ui_vertical_bar[t.theme] || b.config,
|
|
119
120
|
defaultConfig: t
|
|
120
121
|
}),
|
|
121
122
|
customPalette: Jt[t.theme] || W
|
|
122
|
-
} : l = t, b.config &&
|
|
123
|
+
} : l = t, b.config && Ve(b.config, "events.datapointEnter") ? l.events.datapointEnter = b.config.events.datapointEnter : l.events.datapointEnter = null, b.config && Ve(b.config, "events.datapointLeave") ? l.events.datapointLeave = b.config.events.datapointLeave : l.events.datapointLeave = null, b.config && Ve(b.config, "events.datapointClick") ? l.events.datapointClick = b.config.events.datapointClick : l.events.datapointClick = null, l;
|
|
123
124
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}, { deep: !0 }),
|
|
127
|
-
Array.isArray(t) && t.length > 0 && (
|
|
125
|
+
Ae(() => b.config, (t) => {
|
|
126
|
+
Xe.value || (e.value = $e()), we.value = !e.value.userOptions.showOnChartHover, et(), Ue.value += 1, me.value += 1, p.value = e.value.style.chart.layout.bars.height, k.value = e.value.style.chart.layout.bars.gap, $.value.showTable = e.value.table.show, $.value.sortDesc = e.value.style.chart.layout.bars.sort === "desc", $.value.showTooltip = e.value.style.chart.tooltip.show;
|
|
127
|
+
}, { deep: !0 }), Ae(() => b.dataset, (t) => {
|
|
128
|
+
Array.isArray(t) && t.length > 0 && (_e.value = !1), q();
|
|
128
129
|
}, { deep: !0 });
|
|
129
|
-
const { isPrinting:
|
|
130
|
+
const { isPrinting: je, isImaging: qe, generatePdf: Ye, generateImage: Ke } = va({
|
|
130
131
|
elementId: `vue-ui-vertical-bar_${S.value}`,
|
|
131
132
|
fileName: e.value.style.chart.title.text || "vue-ui-vertical-bar",
|
|
132
133
|
options: e.value.userOptions.print
|
|
133
|
-
}), Pt = y(() => e.value.userOptions.show && !e.value.style.chart.title.text),
|
|
134
|
+
}), Pt = y(() => e.value.userOptions.show && !e.value.style.chart.title.text), Je = y(() => Zt(e.value.customPalette)), Qe = i(null), Nt = y(() => e.value.table.responsiveBreakpoint), I = vt(null), j = vt(null), se = i("0 0 10 10"), N = y(() => {
|
|
134
135
|
const [t, l, a, o] = se.value.split(" ").map(Number);
|
|
135
136
|
return { x: t, y: l, width: a, height: o };
|
|
136
137
|
});
|
|
137
|
-
|
|
138
|
-
await
|
|
138
|
+
ze(async () => {
|
|
139
|
+
await de(), et(), O();
|
|
139
140
|
});
|
|
140
141
|
async function O() {
|
|
141
|
-
if (se.value = `0 0 ${C.value.width} ${
|
|
142
|
+
if (se.value = `0 0 ${C.value.width} ${r.value.fullHeight}`, !e.value.autoSize || !H.value) return;
|
|
142
143
|
const t = H.value.querySelectorAll(".vue-ui-horizontal-bar-parent-label"), l = H.value.querySelectorAll(".vue-ui-horizontal-bar-child-label");
|
|
143
144
|
if (t && t.length) {
|
|
144
|
-
const g = Math.max(...Array.from(t).flatMap((
|
|
145
|
-
const
|
|
146
|
-
return
|
|
147
|
-
})),
|
|
148
|
-
const
|
|
149
|
-
return
|
|
145
|
+
const g = Math.max(...Array.from(t).flatMap((c) => {
|
|
146
|
+
const x = c.querySelectorAll("text");
|
|
147
|
+
return x.length ? Array.from(x).map((Y) => Y.getBBox().width) : 0;
|
|
148
|
+
})), w = Math.max(...Array.from(l).flatMap((c) => {
|
|
149
|
+
const x = c.querySelectorAll("text");
|
|
150
|
+
return x.length ? Array.from(x).map((Y) => Y.getBBox().width) : 0;
|
|
150
151
|
}));
|
|
151
|
-
Array.from(t).forEach((
|
|
152
|
-
const
|
|
153
|
-
Array.from(
|
|
154
|
-
Y.setAttribute("x", 0), Y.setAttribute("x", L(-g -
|
|
152
|
+
Array.from(t).forEach((c) => {
|
|
153
|
+
const x = c.querySelectorAll("text");
|
|
154
|
+
Array.from(x).forEach(async (Y) => {
|
|
155
|
+
Y.setAttribute("x", 0), Y.setAttribute("x", L(-g - w));
|
|
155
156
|
});
|
|
156
157
|
});
|
|
157
158
|
}
|
|
158
|
-
await
|
|
159
|
+
await de();
|
|
159
160
|
const a = H.value ? H.value.getBBox() : 0, o = e.value.style.chart.layout.bars.dataLabels.offsetX;
|
|
160
161
|
se.value = [
|
|
161
162
|
a.x + -o,
|
|
162
163
|
0,
|
|
163
164
|
a.width + o * 2,
|
|
164
|
-
|
|
165
|
+
r.value.fullHeight
|
|
165
166
|
].join(" ");
|
|
166
167
|
}
|
|
167
|
-
let
|
|
168
|
-
|
|
169
|
-
P.value && (
|
|
168
|
+
let Ze;
|
|
169
|
+
ze(() => {
|
|
170
|
+
P.value && (Ze = new ResizeObserver((t) => {
|
|
170
171
|
for (const l of t) {
|
|
171
172
|
const { width: a, height: o } = l.contentRect;
|
|
172
173
|
if (a > 0 && o > 0) {
|
|
@@ -176,27 +177,27 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
176
177
|
break;
|
|
177
178
|
}
|
|
178
179
|
}
|
|
179
|
-
}),
|
|
180
|
+
}), Ze.observe(P.value.parentElement));
|
|
180
181
|
});
|
|
181
|
-
const re = y(() => !!e.value.debug), Ce =
|
|
182
|
-
function
|
|
183
|
-
if (
|
|
182
|
+
const re = y(() => !!e.value.debug), Ce = i(0);
|
|
183
|
+
function et() {
|
|
184
|
+
if (Ie(b.dataset) && (ue({
|
|
184
185
|
componentName: "VueUiVerticalBar",
|
|
185
186
|
type: "dataset",
|
|
186
187
|
debug: re.value
|
|
187
|
-
}), fe.value = !1,
|
|
188
|
+
}), fe.value = !1, _e.value = !0), ae.value = xe.value.flatMap((t) => t.children && t.children.length > 0 ? t.children.length : 1).reduce((t, l) => t + l, 0), Ie(b.dataset) || (_e.value = e.value.loading), e.value.responsive) {
|
|
188
189
|
const t = ua(() => {
|
|
189
190
|
const { width: l, height: a } = sa({
|
|
190
191
|
chart: P.value,
|
|
191
192
|
title: e.value.style.chart.title.text ? Be.value : null,
|
|
192
193
|
legend: e.value.style.chart.legend.show ? be.value : null,
|
|
193
|
-
source:
|
|
194
|
-
noTitle:
|
|
194
|
+
source: Re.value,
|
|
195
|
+
noTitle: Ee.value
|
|
195
196
|
});
|
|
196
197
|
Ce.value = a / 3, requestAnimationFrame(async () => {
|
|
197
|
-
|
|
198
|
-
const o =
|
|
199
|
-
p.value = (a - o) / ae.value, await
|
|
198
|
+
lt.value = l;
|
|
199
|
+
const o = k.value * (ae.value - 1);
|
|
200
|
+
p.value = (a - o) / ae.value, await de(), O();
|
|
200
201
|
});
|
|
201
202
|
});
|
|
202
203
|
I.value && (j.value && I.value.unobserve(j.value), I.value.disconnect()), I.value = new ResizeObserver(t), j.value = P.value.parentNode, I.value.observe(j.value), e.value.autoSize && O();
|
|
@@ -205,25 +206,17 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
205
206
|
Gt(() => {
|
|
206
207
|
I.value && (j.value && I.value.unobserve(j.value), I.value.disconnect());
|
|
207
208
|
});
|
|
208
|
-
|
|
209
|
-
if (ke.value) return;
|
|
210
|
-
new ResizeObserver((l) => {
|
|
211
|
-
l.forEach((a) => {
|
|
212
|
-
Je.value = a.contentRect.width < Nt.value;
|
|
213
|
-
});
|
|
214
|
-
}).observe(Ke.value);
|
|
215
|
-
}
|
|
216
|
-
const k = r({
|
|
209
|
+
const $ = i({
|
|
217
210
|
showTable: e.value.table.show,
|
|
218
211
|
sortDesc: e.value.style.chart.layout.bars.sort === "desc",
|
|
219
212
|
showTooltip: e.value.style.chart.tooltip.show
|
|
220
|
-
}),
|
|
213
|
+
}), tt = y(() => $.value.sortDesc), F = y(() => (xe.value.forEach((t, l) => {
|
|
221
214
|
!t.value && !t.children && ue({
|
|
222
215
|
componentName: "VueUiVerticalBar",
|
|
223
216
|
type: "datasetAttributeEmpty",
|
|
224
217
|
property: `value (index ${l})`,
|
|
225
218
|
debug: re.value
|
|
226
|
-
}), t.children && (
|
|
219
|
+
}), t.children && (Ie(t.children) ? ue({
|
|
227
220
|
componentName: "VueUiVerticalBar",
|
|
228
221
|
type: "datasetAttributeEmpty",
|
|
229
222
|
property: `children (index ${l})`,
|
|
@@ -239,7 +232,7 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
239
232
|
});
|
|
240
233
|
}));
|
|
241
234
|
}), xe.value.map((t, l) => {
|
|
242
|
-
const a = `vertical_parent_${l}_${S.value}`, o = t.children && t.children.length > 0, g = L(t.value ? t.value : o ? t.children.map((
|
|
235
|
+
const a = `vertical_parent_${l}_${S.value}`, o = t.children && t.children.length > 0, g = L(t.value ? t.value : o ? t.children.map((c) => c.value || 0).reduce((c, x) => c + x, 0) : 0), w = g >= 0 ? 1 : -1;
|
|
243
236
|
return {
|
|
244
237
|
...t,
|
|
245
238
|
id: a,
|
|
@@ -247,48 +240,48 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
247
240
|
shape: "square",
|
|
248
241
|
opacity: A.value.includes(a) ? 0.5 : 1,
|
|
249
242
|
value: Math.abs(g),
|
|
250
|
-
sign:
|
|
243
|
+
sign: w,
|
|
251
244
|
hasChildren: o,
|
|
252
245
|
isChild: !1,
|
|
253
246
|
segregate: () => oe(a),
|
|
254
247
|
isSegregated: A.value.includes(a),
|
|
255
|
-
color:
|
|
256
|
-
children: !t.children || !t.children.length ? [] : t.children.toSorted(ie.value ? () => 0 : (
|
|
257
|
-
...
|
|
258
|
-
value: L(Math.abs(
|
|
248
|
+
color: Oe(t.color) || Je.value[l] || W[l] || W[l % W.length],
|
|
249
|
+
children: !t.children || !t.children.length ? [] : t.children.toSorted(ie.value ? () => 0 : (c, x) => tt.value ? x.value - c.value : c.value - x.value).map((c, x) => ({
|
|
250
|
+
...c,
|
|
251
|
+
value: L(Math.abs(c.value)),
|
|
259
252
|
absoluteIndex: l,
|
|
260
|
-
sign:
|
|
253
|
+
sign: c.value >= 0 ? 1 : -1,
|
|
261
254
|
isChild: !0,
|
|
262
255
|
parentId: a,
|
|
263
256
|
parentName: t.name,
|
|
264
257
|
parentValue: g,
|
|
265
|
-
parentSign:
|
|
266
|
-
id: `vertical_child_${l}_${
|
|
267
|
-
childIndex:
|
|
268
|
-
color:
|
|
269
|
-
})).map((
|
|
270
|
-
...
|
|
271
|
-
isFirstChild:
|
|
272
|
-
isLastChild:
|
|
258
|
+
parentSign: w,
|
|
259
|
+
id: `vertical_child_${l}_${x}_${S.value}`,
|
|
260
|
+
childIndex: x,
|
|
261
|
+
color: Oe(c.color) || Oe(t.color) || Je.value[l] || W[l] || W[l % W.length]
|
|
262
|
+
})).map((c, x) => ({
|
|
263
|
+
...c,
|
|
264
|
+
isFirstChild: x === 0,
|
|
265
|
+
isLastChild: x === t.children.length - 1
|
|
273
266
|
}))
|
|
274
267
|
};
|
|
275
|
-
}).toSorted(ie.value ? () => 0 : (t, l) =>
|
|
268
|
+
}).toSorted(ie.value ? () => 0 : (t, l) => tt.value ? l.value - t.value : t.value - l.value))), at = y(() => ({
|
|
276
269
|
cy: "vertical-bar-div-legend",
|
|
277
270
|
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
278
271
|
color: e.value.style.chart.legend.color,
|
|
279
272
|
fontSize: e.value.style.chart.legend.fontSize,
|
|
280
273
|
paddingBottom: 12,
|
|
281
274
|
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
282
|
-
})), p =
|
|
283
|
-
width:
|
|
284
|
-
height:
|
|
275
|
+
})), p = i(e.value.style.chart.layout.bars.height), k = i(e.value.style.chart.layout.bars.gap), At = y(() => (p.value + k.value) * ae.value), lt = i(512), C = y(() => ({
|
|
276
|
+
width: lt.value,
|
|
277
|
+
height: At.value,
|
|
285
278
|
padding: {
|
|
286
279
|
top: 12,
|
|
287
280
|
left: (e.value.autoSize ? 0 : 128) + e.value.style.chart.layout.bars.offsetX,
|
|
288
281
|
right: (e.value.autoSize ? 0 : 64) + e.value.style.chart.layout.bars.paddingRight,
|
|
289
282
|
bottom: 12
|
|
290
283
|
}
|
|
291
|
-
})),
|
|
284
|
+
})), r = y(() => ({
|
|
292
285
|
fullHeight: C.value.padding.top + C.value.padding.bottom + C.value.height,
|
|
293
286
|
top: C.value.padding.top,
|
|
294
287
|
left: C.value.padding.left,
|
|
@@ -297,9 +290,9 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
297
290
|
width: C.value.width - (C.value.padding.left + C.value.padding.right)
|
|
298
291
|
}));
|
|
299
292
|
async function q() {
|
|
300
|
-
ae.value =
|
|
293
|
+
ae.value = D.value.flatMap((t) => t.children && t.children.length > 0 ? t.children.length : 1).reduce((t, l) => t + l, 0), e.value.autoSize && await O();
|
|
301
294
|
}
|
|
302
|
-
const A =
|
|
295
|
+
const A = i([]);
|
|
303
296
|
async function oe(t) {
|
|
304
297
|
if (A.value.includes(t))
|
|
305
298
|
A.value = A.value.filter((l) => l !== t);
|
|
@@ -307,45 +300,45 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
307
300
|
if (A.value.length === F.value.length - 1) return;
|
|
308
301
|
A.value.push(t);
|
|
309
302
|
}
|
|
310
|
-
q(), await
|
|
303
|
+
q(), await de(), e.value.autoSize && O(), St("selectLegend", D.value);
|
|
311
304
|
}
|
|
312
|
-
const
|
|
313
|
-
function
|
|
305
|
+
const D = y(() => F.value.filter((t) => !A.value.includes(t.id))), V = y(() => D.value.map((t) => Math.abs(t.value)).reduce((t, l) => t + l, 0));
|
|
306
|
+
function ot(t, l = !1, a = 0) {
|
|
314
307
|
return l ? G({
|
|
315
308
|
v: L(Math.abs(t) / V.value * 100),
|
|
316
309
|
s: "%",
|
|
317
310
|
r: a
|
|
318
311
|
}) : Math.abs(t) / V.value;
|
|
319
312
|
}
|
|
320
|
-
const
|
|
313
|
+
const B = y(() => D.value.flatMap((t) => t.hasChildren ? t.children : t)), R = y(() => B.value.map((t) => t.sign).includes(-1)), zt = y(() => Math.max(...D.value.flatMap((t) => t.children && t.children.length ? Math.max(...t.children.map((l) => l.value)) : t.value)));
|
|
321
314
|
function T(t) {
|
|
322
|
-
const l = t /
|
|
323
|
-
return
|
|
315
|
+
const l = t / zt.value;
|
|
316
|
+
return r.value.width / (R.value ? 2 : 1) * l;
|
|
324
317
|
}
|
|
325
|
-
function
|
|
326
|
-
return T(t) +
|
|
318
|
+
function Vt(t) {
|
|
319
|
+
return T(t) + r.value.left;
|
|
327
320
|
}
|
|
328
321
|
function ne(t, l) {
|
|
329
|
-
const a =
|
|
322
|
+
const a = D.value.find((w) => w.id === t.parentId), o = r.value.top + (k.value + p.value) * l, g = a.children.length * (k.value + p.value);
|
|
330
323
|
return {
|
|
331
324
|
y: o + g / 2 - e.value.style.chart.layout.bars.parentLabels.fontSize,
|
|
332
325
|
name: a.name,
|
|
333
326
|
value: [void 0, NaN, null].includes(a.value) ? "" : a.sign === 1 ? a.value : -a.value,
|
|
334
|
-
percentageToTotal: isNaN(a.value / V.value) ? "" :
|
|
327
|
+
percentageToTotal: isNaN(a.value / V.value) ? "" : ot(a.value, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),
|
|
335
328
|
sign: a.sign
|
|
336
329
|
};
|
|
337
330
|
}
|
|
338
|
-
function
|
|
339
|
-
return
|
|
331
|
+
function It() {
|
|
332
|
+
return D.value;
|
|
340
333
|
}
|
|
341
|
-
const Te =
|
|
342
|
-
function
|
|
334
|
+
const Te = i(null), Se = i(null);
|
|
335
|
+
function Ot({ datapoint: t, seriesIndex: l }) {
|
|
343
336
|
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: l });
|
|
344
337
|
}
|
|
345
|
-
function
|
|
338
|
+
function Ft({ datapoint: t, seriesIndex: l }) {
|
|
346
339
|
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: l }), Tt.value = null, ge.value = !1, Te.value = null;
|
|
347
340
|
}
|
|
348
|
-
function
|
|
341
|
+
function Mt(t, l) {
|
|
349
342
|
e.value.events.datapointEnter && e.value.events.datapointEnter({ datpoint: t, seriesIndex: l }), Se.value = {
|
|
350
343
|
datapoint: t,
|
|
351
344
|
seriesIndex: l,
|
|
@@ -353,19 +346,19 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
353
346
|
config: e.value
|
|
354
347
|
}, ge.value = !0, Te.value = t.id;
|
|
355
348
|
let a = "";
|
|
356
|
-
const o = t.isChild ? t.parentName : t.name, g = t.isChild ? t.name : "",
|
|
357
|
-
oa(
|
|
349
|
+
const o = t.isChild ? t.parentName : t.name, g = t.isChild ? t.name : "", w = e.value.style.chart.tooltip.customFormat;
|
|
350
|
+
oa(w) && na(() => w({
|
|
358
351
|
datapoint: t,
|
|
359
352
|
series: F.value,
|
|
360
353
|
config: e.value,
|
|
361
354
|
seriesIndex: l
|
|
362
|
-
})) ? ye.value =
|
|
355
|
+
})) ? ye.value = w({
|
|
363
356
|
datapoint: t,
|
|
364
357
|
series: F.value,
|
|
365
358
|
config: e.value,
|
|
366
359
|
seriesIndex: l
|
|
367
360
|
}) : (a += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
|
|
368
|
-
<div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${t.color}"/>${
|
|
361
|
+
<div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${t.color}"/>${Ct.pattern ? `<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${S.value}_${t.absoluteIndex})"/>` : ""}</svg> ${o}</div>
|
|
369
362
|
${g ? `<div>${g}</div>` : ""}
|
|
370
363
|
</div>`, e.value.style.chart.tooltip.showValue && (a += `<div>${e.value.translations.value}: <b>${pe(
|
|
371
364
|
e.value.style.chart.layout.bars.dataLabels.value.formatter,
|
|
@@ -387,7 +380,7 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
387
380
|
r: e.value.style.chart.tooltip.roundingPercentage
|
|
388
381
|
})}</b></div>`)), ye.value = `<div style="text-align:left">${a}</div>`);
|
|
389
382
|
}
|
|
390
|
-
function
|
|
383
|
+
function nt(t, l, a, o) {
|
|
391
384
|
if (!e.value.style.chart.layout.bars.dataLabels.value.show)
|
|
392
385
|
return "";
|
|
393
386
|
const g = pe(
|
|
@@ -400,8 +393,8 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
400
393
|
r: e.value.style.chart.layout.bars.dataLabels.value.roundingValue
|
|
401
394
|
}),
|
|
402
395
|
{ datapoint: l, seriesIndex: a }
|
|
403
|
-
),
|
|
404
|
-
return `${g}${e.value.style.chart.layout.bars.dataLabels.percentage.show ? ` ${
|
|
396
|
+
), w = `(${ot(t, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;
|
|
397
|
+
return `${g}${e.value.style.chart.layout.bars.dataLabels.percentage.show ? ` ${w}` : ""}`;
|
|
405
398
|
}
|
|
406
399
|
const z = y(() => {
|
|
407
400
|
const t = [
|
|
@@ -412,7 +405,7 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
412
405
|
e.value.translations.value,
|
|
413
406
|
e.value.translations.percentageToSerie,
|
|
414
407
|
e.value.translations.percentageToTotal
|
|
415
|
-
], l =
|
|
408
|
+
], l = B.value.map((a) => a.isChild ? a.isFirstChild ? {
|
|
416
409
|
color: a.color,
|
|
417
410
|
parentName: a.parentName,
|
|
418
411
|
parentValue: a.parentValue,
|
|
@@ -443,66 +436,66 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
443
436
|
return { head: t, body: l };
|
|
444
437
|
});
|
|
445
438
|
function Le(t = null) {
|
|
446
|
-
const l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], a = z.value.head, o = z.value.body.map((
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
]), g = l.concat([a]).concat(o),
|
|
455
|
-
t ? t(
|
|
439
|
+
const l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], a = z.value.head, o = z.value.body.map((c) => [
|
|
440
|
+
c.parentName,
|
|
441
|
+
c.parentValue,
|
|
442
|
+
c.percentageToTotal,
|
|
443
|
+
c.childName,
|
|
444
|
+
c.childValue,
|
|
445
|
+
c.childPercentageToParent,
|
|
446
|
+
c.childPercentageToTotal
|
|
447
|
+
]), g = l.concat([a]).concat(o), w = aa(g);
|
|
448
|
+
t ? t(w) : la({ csvContent: w, title: e.value.style.chart.title.text || "vue-ui-vertical-bar" });
|
|
456
449
|
}
|
|
457
|
-
const E =
|
|
458
|
-
function
|
|
459
|
-
E.value = t,
|
|
450
|
+
const E = i(!1);
|
|
451
|
+
function ut(t) {
|
|
452
|
+
E.value = t, De.value += 1;
|
|
460
453
|
}
|
|
461
|
-
function
|
|
462
|
-
|
|
454
|
+
function st() {
|
|
455
|
+
$.value.showTable = !$.value.showTable;
|
|
463
456
|
}
|
|
464
|
-
const Dt =
|
|
457
|
+
const Dt = i({
|
|
465
458
|
none: 0,
|
|
466
459
|
asc: 1,
|
|
467
460
|
desc: 2
|
|
468
|
-
}), M =
|
|
469
|
-
|
|
461
|
+
}), M = i(0), ie = i(!1);
|
|
462
|
+
ze(() => {
|
|
470
463
|
["none", "asc", "desc"].includes(e.value.style.chart.layout.bars.sort) || ue({
|
|
471
464
|
componentName: "VueUiVerticalBar",
|
|
472
465
|
type: "attributeWrongValue",
|
|
473
466
|
property: "style.chart.layout.bars.sort",
|
|
474
467
|
key: e.value.style.chart.layout.bars.sort
|
|
475
|
-
}), M.value = Dt.value[e.value.style.chart.layout.bars.sort],
|
|
468
|
+
}), M.value = Dt.value[e.value.style.chart.layout.bars.sort], $.value.sortDesc = M.value === 2, ie.value = M.value === 0;
|
|
476
469
|
});
|
|
477
|
-
function
|
|
470
|
+
function Bt() {
|
|
478
471
|
M.value += 1, M.value > 2 && (M.value = 0);
|
|
479
472
|
}
|
|
480
|
-
function st() {
|
|
481
|
-
Rt(), k.value.sortDesc = M.value === 2, ie.value = M.value === 0, q();
|
|
482
|
-
}
|
|
483
473
|
function rt() {
|
|
484
|
-
|
|
474
|
+
Bt(), $.value.sortDesc = M.value === 2, ie.value = M.value === 0, q();
|
|
485
475
|
}
|
|
486
|
-
|
|
476
|
+
function it() {
|
|
477
|
+
$.value.showTooltip = !$.value.showTooltip;
|
|
478
|
+
}
|
|
479
|
+
const ve = i(!1);
|
|
487
480
|
function Pe() {
|
|
488
481
|
ve.value = !ve.value;
|
|
489
482
|
}
|
|
490
|
-
async function
|
|
483
|
+
async function Rt({ scale: t = 2 } = {}) {
|
|
491
484
|
if (!P.value) return;
|
|
492
|
-
const { width: l, height: a } = P.value.getBoundingClientRect(), o = l / a, { imageUri: g, base64:
|
|
485
|
+
const { width: l, height: a } = P.value.getBoundingClientRect(), o = l / a, { imageUri: g, base64: w } = await ga({ domElement: P.value, base64: !0, img: !0, scale: t });
|
|
493
486
|
return {
|
|
494
487
|
imageUri: g,
|
|
495
|
-
base64:
|
|
488
|
+
base64: w,
|
|
496
489
|
title: e.value.style.chart.title.text,
|
|
497
490
|
width: l,
|
|
498
491
|
height: a,
|
|
499
492
|
aspectRatio: o
|
|
500
493
|
};
|
|
501
494
|
}
|
|
502
|
-
const
|
|
503
|
-
const t = e.value.table.useDialog && !e.value.table.show, l =
|
|
495
|
+
const ce = y(() => {
|
|
496
|
+
const t = e.value.table.useDialog && !e.value.table.show, l = $.value.showTable;
|
|
504
497
|
return {
|
|
505
|
-
component: t ? wt :
|
|
498
|
+
component: t ? wt : pa,
|
|
506
499
|
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
507
500
|
props: t ? {
|
|
508
501
|
backgroundColor: e.value.table.th.backgroundColor,
|
|
@@ -529,34 +522,39 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
529
522
|
}
|
|
530
523
|
};
|
|
531
524
|
});
|
|
532
|
-
|
|
525
|
+
Ae(() => $.value.showTable, (t) => {
|
|
533
526
|
e.value.table.show || (t && e.value.table.useDialog && le.value ? le.value.open() : "close" in le.value && le.value.close());
|
|
534
|
-
})
|
|
527
|
+
});
|
|
528
|
+
const { isResponsive: Et } = ca(Qe, Nt);
|
|
529
|
+
function Ne() {
|
|
530
|
+
$.value.showTable = !1, ke.value && ke.value.setTableIconState(!1);
|
|
531
|
+
}
|
|
532
|
+
return yt({
|
|
535
533
|
autoSize: O,
|
|
536
534
|
// v3
|
|
537
|
-
getData:
|
|
538
|
-
getImage:
|
|
535
|
+
getData: It,
|
|
536
|
+
getImage: Rt,
|
|
539
537
|
recalculateHeight: q,
|
|
540
|
-
generatePdf:
|
|
538
|
+
generatePdf: Ye,
|
|
541
539
|
generateCsv: Le,
|
|
542
|
-
generateImage:
|
|
543
|
-
toggleTable:
|
|
544
|
-
toggleSort:
|
|
545
|
-
toggleTooltip:
|
|
540
|
+
generateImage: Ke,
|
|
541
|
+
toggleTable: st,
|
|
542
|
+
toggleSort: rt,
|
|
543
|
+
toggleTooltip: it,
|
|
546
544
|
toggleAnnotator: Pe,
|
|
547
|
-
toggleFullscreen:
|
|
545
|
+
toggleFullscreen: ut
|
|
548
546
|
}), (t, l) => (u(), v("div", {
|
|
549
547
|
class: U(`vue-ui-vertical-bar ${E.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"} ${e.value.responsive && e.value.autoSize ? "vue-ui-vertical-bar-autosize" : ""}`),
|
|
550
548
|
ref_key: "verticalBarChart",
|
|
551
549
|
ref: P,
|
|
552
550
|
id: `vue-ui-vertical-bar_${S.value}`,
|
|
553
|
-
style:
|
|
554
|
-
onMouseenter: l[
|
|
555
|
-
onMouseleave: l[
|
|
551
|
+
style: d(`padding-top:${e.value.responsive && e.value.autoSize ? `${Ce.value / 2}px` : "0"}; font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? e.value.autoSize ? `height:calc(100% - ${Ce.value}px` : "height: 100%" : ""}`),
|
|
552
|
+
onMouseenter: l[3] || (l[3] = () => s(We)(!0)),
|
|
553
|
+
onMouseleave: l[4] || (l[4] = () => s(We)(!1))
|
|
556
554
|
}, [
|
|
557
|
-
e.value.userOptions.buttons.annotator ? (u(), X(s(
|
|
555
|
+
e.value.userOptions.buttons.annotator ? (u(), X(s(kt), {
|
|
558
556
|
key: 0,
|
|
559
|
-
svgRef: s(
|
|
557
|
+
svgRef: s(He),
|
|
560
558
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
561
559
|
color: e.value.style.chart.color,
|
|
562
560
|
active: ve.value,
|
|
@@ -565,7 +563,7 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
565
563
|
Pt.value ? (u(), v("div", {
|
|
566
564
|
key: 1,
|
|
567
565
|
ref_key: "noTitle",
|
|
568
|
-
ref:
|
|
566
|
+
ref: Ee,
|
|
569
567
|
class: "vue-data-ui-no-title-space",
|
|
570
568
|
style: "height:36px; width: 100%;background:transparent"
|
|
571
569
|
}, null, 512)) : f("", !0),
|
|
@@ -575,8 +573,8 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
575
573
|
ref: Be,
|
|
576
574
|
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
577
575
|
}, [
|
|
578
|
-
(u(), X(
|
|
579
|
-
key: `title_${
|
|
576
|
+
(u(), X(fa, {
|
|
577
|
+
key: `title_${Ue.value}`,
|
|
580
578
|
config: {
|
|
581
579
|
title: {
|
|
582
580
|
cy: "vertical-bar-div-title",
|
|
@@ -589,14 +587,14 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
589
587
|
}
|
|
590
588
|
}, null, 8, ["config"]))
|
|
591
589
|
], 512)) : f("", !0),
|
|
592
|
-
e.value.userOptions.show && fe.value && (s(
|
|
593
|
-
ref_key: "
|
|
594
|
-
ref:
|
|
595
|
-
key: `user_options_${
|
|
590
|
+
e.value.userOptions.show && fe.value && (s(Ge) || s(we)) ? (u(), X(s(xt), {
|
|
591
|
+
ref_key: "userOptionsRef",
|
|
592
|
+
ref: ke,
|
|
593
|
+
key: `user_options_${De.value}`,
|
|
596
594
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
597
595
|
color: e.value.style.chart.color,
|
|
598
|
-
isImaging: s(
|
|
599
|
-
isPrinting: s(
|
|
596
|
+
isImaging: s(qe),
|
|
597
|
+
isPrinting: s(je),
|
|
600
598
|
uid: S.value,
|
|
601
599
|
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
602
600
|
hasPdf: e.value.userOptions.buttons.pdf,
|
|
@@ -606,7 +604,7 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
606
604
|
hasSort: e.value.userOptions.buttons.sort,
|
|
607
605
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
608
606
|
isFullscreen: E.value,
|
|
609
|
-
isTooltip:
|
|
607
|
+
isTooltip: $.value.showTooltip,
|
|
610
608
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
611
609
|
chartElement: P.value,
|
|
612
610
|
position: e.value.userOptions.position,
|
|
@@ -614,16 +612,17 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
614
612
|
isAnnotation: ve.value,
|
|
615
613
|
callbacks: e.value.userOptions.callbacks,
|
|
616
614
|
printScale: e.value.userOptions.print.scale,
|
|
617
|
-
|
|
618
|
-
|
|
615
|
+
tableDialog: e.value.table.useDialog,
|
|
616
|
+
onToggleFullscreen: ut,
|
|
617
|
+
onGeneratePdf: s(Ye),
|
|
619
618
|
onGenerateCsv: Le,
|
|
620
|
-
onGenerateImage: s(
|
|
621
|
-
onToggleTable:
|
|
622
|
-
onToggleSort:
|
|
623
|
-
onToggleTooltip:
|
|
619
|
+
onGenerateImage: s(Ke),
|
|
620
|
+
onToggleTable: st,
|
|
621
|
+
onToggleSort: rt,
|
|
622
|
+
onToggleTooltip: it,
|
|
624
623
|
onToggleAnnotator: Pe,
|
|
625
|
-
style:
|
|
626
|
-
visibility: s(
|
|
624
|
+
style: d({
|
|
625
|
+
visibility: s(Ge) ? s(we) ? "visible" : "hidden" : "visible"
|
|
627
626
|
})
|
|
628
627
|
}, he({ _: 2 }, [
|
|
629
628
|
t.$slots.menuIcon ? {
|
|
@@ -696,22 +695,22 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
696
695
|
]),
|
|
697
696
|
key: "9"
|
|
698
697
|
} : void 0
|
|
699
|
-
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasSort", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : f("", !0),
|
|
698
|
+
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasSort", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : f("", !0),
|
|
700
699
|
e.value.style.chart.legend.show && e.value.style.chart.legend.position === "top" ? (u(), v("div", {
|
|
701
700
|
key: 4,
|
|
702
701
|
ref_key: "chartLegend",
|
|
703
702
|
ref: be
|
|
704
703
|
}, [
|
|
705
|
-
(u(), X(
|
|
704
|
+
(u(), X(pt, {
|
|
706
705
|
key: `legend_top_${me.value}`,
|
|
707
706
|
legendSet: F.value,
|
|
708
|
-
config:
|
|
707
|
+
config: at.value,
|
|
709
708
|
onClickMarker: l[0] || (l[0] = ({ legend: a }) => oe(a.id))
|
|
710
709
|
}, he({
|
|
711
710
|
item: m(({ legend: a, index: o }) => [
|
|
712
711
|
n("div", {
|
|
713
712
|
onClick: (g) => oe(a.id),
|
|
714
|
-
style:
|
|
713
|
+
style: d(`opacity:${A.value.includes(a.id) ? 0.5 : 1}`)
|
|
715
714
|
}, h(a.name) + ": " + h(s(pe)(
|
|
716
715
|
e.value.style.chart.layout.bars.dataLabels.value.formatter,
|
|
717
716
|
a.value,
|
|
@@ -722,14 +721,14 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
722
721
|
r: e.value.style.chart.legend.roundingValue
|
|
723
722
|
}),
|
|
724
723
|
{ datapoint: a, seriesIndex: o }
|
|
725
|
-
)), 13,
|
|
724
|
+
)), 13, ma)
|
|
726
725
|
]),
|
|
727
726
|
_: 2
|
|
728
727
|
}, [
|
|
729
728
|
t.$slots.pattern ? {
|
|
730
729
|
name: "legend-pattern",
|
|
731
730
|
fn: m(({ legend: a, index: o }) => [
|
|
732
|
-
J(
|
|
731
|
+
J(ft, {
|
|
733
732
|
shape: a.shape,
|
|
734
733
|
radius: 30,
|
|
735
734
|
stroke: "none",
|
|
@@ -743,18 +742,18 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
743
742
|
], 512)) : f("", !0),
|
|
744
743
|
(u(), v("svg", {
|
|
745
744
|
ref_key: "svgRef",
|
|
746
|
-
ref:
|
|
745
|
+
ref: He,
|
|
747
746
|
xmlns: s(ea),
|
|
748
747
|
class: U({ "vue-data-ui-fullscreen--on": E.value, "vue-data-ui-fulscreen--off": !E.value }),
|
|
749
748
|
viewBox: se.value,
|
|
750
|
-
style:
|
|
749
|
+
style: d(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
751
750
|
}, [
|
|
752
751
|
n("g", {
|
|
753
752
|
ref_key: "G",
|
|
754
753
|
ref: H,
|
|
755
754
|
class: "vue-data-ui-g"
|
|
756
755
|
}, [
|
|
757
|
-
J(s(
|
|
756
|
+
J(s(_t)),
|
|
758
757
|
t.$slots["chart-background"] ? (u(), v("foreignObject", {
|
|
759
758
|
key: 0,
|
|
760
759
|
x: N.value.x,
|
|
@@ -766,8 +765,8 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
766
765
|
}
|
|
767
766
|
}, [
|
|
768
767
|
_(t.$slots, "chart-background", {}, void 0, !0)
|
|
769
|
-
], 8,
|
|
770
|
-
(u(!0), v(ee, null, te(
|
|
768
|
+
], 8, xa)) : f("", !0),
|
|
769
|
+
(u(!0), v(ee, null, te(B.value, (a, o) => (u(), v("linearGradient", {
|
|
771
770
|
x1: "0%",
|
|
772
771
|
y1: "0%",
|
|
773
772
|
x2: "100%",
|
|
@@ -780,41 +779,41 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
780
779
|
}, null, 8, wa),
|
|
781
780
|
n("stop", {
|
|
782
781
|
offset: "100%",
|
|
783
|
-
"stop-color": s(
|
|
784
|
-
}, null, 8,
|
|
785
|
-
], 8,
|
|
786
|
-
t.$slots.pattern ? (u(), v("g",
|
|
787
|
-
(u(!0), v(ee, null, te(
|
|
788
|
-
_(t.$slots, "pattern",
|
|
782
|
+
"stop-color": s(Fe)(s(ta)(a.color, 0.03), 100 - e.value.style.chart.layout.bars.gradientIntensity)
|
|
783
|
+
}, null, 8, $a)
|
|
784
|
+
], 8, _a))), 256)),
|
|
785
|
+
t.$slots.pattern ? (u(), v("g", Ca, [
|
|
786
|
+
(u(!0), v(ee, null, te(B.value, (a) => (u(), v("defs", null, [
|
|
787
|
+
_(t.$slots, "pattern", ct({ ref_for: !0 }, { seriesIndex: a.absoluteIndex, patternId: `pattern_${S.value}_${a.absoluteIndex}` }), void 0, !0)
|
|
789
788
|
]))), 256))
|
|
790
789
|
])) : f("", !0),
|
|
791
|
-
(u(!0), v(ee, null, te(
|
|
790
|
+
(u(!0), v(ee, null, te(B.value, (a, o) => (u(), v("g", null, [
|
|
792
791
|
n("rect", {
|
|
793
|
-
x: s(L)(R.value ?
|
|
794
|
-
y:
|
|
792
|
+
x: s(L)(R.value ? r.value.left + r.value.width / 2 - (a.sign === 1 ? 0 : T(a.value) <= 0 ? 1e-4 : T(a.value)) : r.value.left),
|
|
793
|
+
y: r.value.top + (k.value + p.value) * o,
|
|
795
794
|
width: s(L)(T(a.value) <= 0 ? 1e-4 : T(a.value)),
|
|
796
795
|
height: p.value <= 0 ? 1e-4 : p.value,
|
|
797
796
|
fill: e.value.style.chart.layout.bars.underlayerColor,
|
|
798
797
|
rx: e.value.style.chart.layout.bars.borderRadius,
|
|
799
798
|
class: U({ animated: e.value.useCssAnimation })
|
|
800
|
-
}, null, 10,
|
|
799
|
+
}, null, 10, Ta)
|
|
801
800
|
]))), 256)),
|
|
802
|
-
(u(!0), v(ee, null, te(
|
|
801
|
+
(u(!0), v(ee, null, te(B.value, (a, o) => (u(), v("g", null, [
|
|
803
802
|
n("rect", {
|
|
804
|
-
x: s(L)(R.value ?
|
|
805
|
-
y:
|
|
803
|
+
x: s(L)(R.value ? r.value.left + r.value.width / 2 - (a.sign === 1 ? 0 : T(a.value) <= 0 ? 1e-4 : T(a.value)) : r.value.left),
|
|
804
|
+
y: r.value.top + (k.value + p.value) * o,
|
|
806
805
|
width: s(L)(T(a.value) <= 0 ? 1e-4 : T(a.value)),
|
|
807
806
|
height: p.value <= 0 ? 1e-4 : p.value,
|
|
808
|
-
fill: e.value.style.chart.layout.bars.useGradient ? `url(#vertical_bar_gradient_${S.value}_${o})` : s(
|
|
807
|
+
fill: e.value.style.chart.layout.bars.useGradient ? `url(#vertical_bar_gradient_${S.value}_${o})` : s(Fe)(a.color, e.value.style.chart.layout.bars.fillOpacity),
|
|
809
808
|
rx: e.value.style.chart.layout.bars.borderRadius,
|
|
810
809
|
stroke: e.value.style.chart.layout.bars.useStroke ? a.color : "none",
|
|
811
810
|
"stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
|
|
812
811
|
class: U({ animated: e.value.useCssAnimation })
|
|
813
|
-
}, null, 10,
|
|
812
|
+
}, null, 10, Sa),
|
|
814
813
|
t.$slots.pattern ? (u(), v("rect", {
|
|
815
814
|
key: 0,
|
|
816
|
-
x: s(L)(R.value ?
|
|
817
|
-
y:
|
|
815
|
+
x: s(L)(R.value ? r.value.left + r.value.width / 2 - (a.sign === 1 ? 0 : T(a.value) <= 0 ? 1e-4 : T(a.value)) : r.value.left),
|
|
816
|
+
y: r.value.top + (k.value + p.value) * o,
|
|
818
817
|
width: s(L)(T(a.value) <= 0 ? 1e-4 : T(a.value)),
|
|
819
818
|
height: p.value <= 0 ? 1e-4 : p.value,
|
|
820
819
|
fill: `url(#pattern_${S.value}_${a.absoluteIndex})`,
|
|
@@ -822,48 +821,48 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
822
821
|
stroke: e.value.style.chart.layout.bars.useStroke ? a.color : "none",
|
|
823
822
|
"stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
|
|
824
823
|
class: U({ animated: e.value.useCssAnimation })
|
|
825
|
-
}, null, 10,
|
|
826
|
-
(!a.isChild || a.isLastChild) && e.value.style.chart.layout.separators.show && o !==
|
|
824
|
+
}, null, 10, La)) : f("", !0),
|
|
825
|
+
(!a.isChild || a.isLastChild) && e.value.style.chart.layout.separators.show && o !== B.value.length - 1 ? (u(), v("line", {
|
|
827
826
|
key: 1,
|
|
828
827
|
x1: N.value.x,
|
|
829
|
-
x2: e.value.style.chart.layout.separators.fullWidth ? N.value.width - Math.abs(N.value.x) :
|
|
830
|
-
y1: p.value +
|
|
831
|
-
y2: p.value +
|
|
828
|
+
x2: e.value.style.chart.layout.separators.fullWidth ? N.value.width - Math.abs(N.value.x) : r.value.left,
|
|
829
|
+
y1: p.value + k.value / 2 + r.value.top + (k.value + p.value) * o,
|
|
830
|
+
y2: p.value + k.value / 2 + r.value.top + (k.value + p.value) * o,
|
|
832
831
|
stroke: e.value.style.chart.layout.separators.color,
|
|
833
832
|
"stroke-width": e.value.style.chart.layout.separators.strokeWidth,
|
|
834
833
|
"stroke-linecap": "round",
|
|
835
834
|
style: { transition: "none !important", animation: "none !important" }
|
|
836
|
-
}, null, 8,
|
|
835
|
+
}, null, 8, Pa)) : f("", !0),
|
|
837
836
|
R.value && e.value.style.chart.layout.separators.show ? (u(), v("line", {
|
|
838
837
|
key: 2,
|
|
839
|
-
x1:
|
|
840
|
-
x2:
|
|
841
|
-
y1:
|
|
842
|
-
y2:
|
|
838
|
+
x1: r.value.left + r.value.width / 2,
|
|
839
|
+
x2: r.value.left + r.value.width / 2,
|
|
840
|
+
y1: r.value.top,
|
|
841
|
+
y2: r.value.bottom,
|
|
843
842
|
stroke: e.value.style.chart.layout.separators.color,
|
|
844
843
|
"stroke-width": e.value.style.chart.layout.separators.strokeWidth,
|
|
845
844
|
"stroke-linecap": "round"
|
|
846
|
-
}, null, 8,
|
|
847
|
-
n("g",
|
|
845
|
+
}, null, 8, Na)) : f("", !0),
|
|
846
|
+
n("g", Aa, [
|
|
848
847
|
n("text", {
|
|
849
|
-
x: R.value ?
|
|
850
|
-
y:
|
|
848
|
+
x: R.value ? r.value.left + r.value.width / 2 + (a.sign === 1 ? -12 : 12) + (a.sign === 1 ? -e.value.style.chart.layout.bars.dataLabels.offsetX : e.value.style.chart.layout.bars.dataLabels.offsetX) : Vt(a.value) + 3 + e.value.style.chart.layout.bars.dataLabels.offsetX,
|
|
849
|
+
y: r.value.top + (k.value + p.value) * o + p.value / 2 + e.value.style.chart.layout.bars.dataLabels.fontSize / 2,
|
|
851
850
|
"text-anchor": !R.value || a.sign === -1 ? "start" : "end",
|
|
852
851
|
"font-size": e.value.style.chart.layout.bars.dataLabels.fontSize,
|
|
853
852
|
fill: e.value.style.chart.layout.bars.dataLabels.color,
|
|
854
853
|
"font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal"
|
|
855
|
-
}, h(
|
|
854
|
+
}, h(nt(a.value, a, o, a.sign)), 9, za),
|
|
856
855
|
(a.isChild || !a.hasChildren) && e.value.style.chart.layout.bars.nameLabels.show ? (u(), v("text", {
|
|
857
856
|
key: 0,
|
|
858
857
|
"text-anchor": "end",
|
|
859
|
-
x:
|
|
860
|
-
y:
|
|
858
|
+
x: r.value.left - 3 + e.value.style.chart.layout.bars.nameLabels.offsetX,
|
|
859
|
+
y: r.value.top + (k.value + p.value) * o + p.value / 2 + e.value.style.chart.layout.bars.nameLabels.fontSize / 2,
|
|
861
860
|
"font-size": e.value.style.chart.layout.bars.nameLabels.fontSize,
|
|
862
861
|
fill: e.value.style.chart.layout.bars.nameLabels.color,
|
|
863
862
|
"font-weight": e.value.style.chart.layout.bars.nameLabels.bold ? "bold" : "normal"
|
|
864
|
-
}, h(a.name), 9,
|
|
863
|
+
}, h(a.name), 9, Va)) : f("", !0)
|
|
865
864
|
]),
|
|
866
|
-
n("g",
|
|
865
|
+
n("g", Ia, [
|
|
867
866
|
a.isChild && a.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (u(), v("text", {
|
|
868
867
|
key: 0,
|
|
869
868
|
x: e.value.autoSize ? void 0 : N.value.x + e.value.style.chart.layout.bars.parentLabels.offsetX,
|
|
@@ -872,7 +871,7 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
872
871
|
fill: e.value.style.chart.layout.bars.parentLabels.color,
|
|
873
872
|
"font-weight": e.value.style.chart.layout.bars.parentLabels.bold ? "bold" : "normal",
|
|
874
873
|
"text-anchor": "start"
|
|
875
|
-
}, h(ne(a, o).name), 9,
|
|
874
|
+
}, h(ne(a, o).name), 9, Oa)) : f("", !0),
|
|
876
875
|
a.isChild && a.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (u(), v("text", {
|
|
877
876
|
key: 1,
|
|
878
877
|
x: e.value.autoSize ? void 0 : N.value.x + e.value.style.chart.layout.bars.parentLabels.offsetX,
|
|
@@ -881,40 +880,40 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
881
880
|
fill: e.value.style.chart.layout.bars.parentLabels.color,
|
|
882
881
|
"font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal",
|
|
883
882
|
"text-anchor": "start"
|
|
884
|
-
}, h(
|
|
883
|
+
}, h(nt(ne(a, o).value), ne(a, o), o, a.parentSign || a.sign), 9, Fa)) : f("", !0)
|
|
885
884
|
]),
|
|
886
885
|
n("rect", {
|
|
887
886
|
x: N.value.x,
|
|
888
|
-
y:
|
|
887
|
+
y: r.value.top + (k.value + p.value) * o - k.value / 2,
|
|
889
888
|
width: N.value.width,
|
|
890
|
-
height: p.value +
|
|
891
|
-
fill: Te.value === a.id ? s(
|
|
892
|
-
onMouseenter: (g) =>
|
|
893
|
-
onMouseleave: (g) =>
|
|
894
|
-
onClick: (g) =>
|
|
895
|
-
}, null, 40,
|
|
889
|
+
height: p.value + k.value <= 0 ? 1e-4 : p.value + k.value,
|
|
890
|
+
fill: Te.value === a.id ? s(Fe)(e.value.style.chart.layout.highlighter.color, e.value.style.chart.layout.highlighter.opacity) : "transparent",
|
|
891
|
+
onMouseenter: (g) => Mt(a, o),
|
|
892
|
+
onMouseleave: (g) => Ft({ datapoint: a, seriesIndex: o }),
|
|
893
|
+
onClick: (g) => Ot({ datapoint: a, seriesIndex: o })
|
|
894
|
+
}, null, 40, Ma)
|
|
896
895
|
]))), 256)),
|
|
897
896
|
_(t.$slots, "svg", { svg: N.value }, void 0, !0)
|
|
898
897
|
], 512)
|
|
899
|
-
], 14,
|
|
900
|
-
t.$slots.watermark ? (u(), v("div",
|
|
901
|
-
_(t.$slots, "watermark", Q(Z({ isPrinting: s(
|
|
898
|
+
], 14, ka)),
|
|
899
|
+
t.$slots.watermark ? (u(), v("div", Da, [
|
|
900
|
+
_(t.$slots, "watermark", Q(Z({ isPrinting: s(je) || s(qe) })), void 0, !0)
|
|
902
901
|
])) : f("", !0),
|
|
903
902
|
e.value.style.chart.legend.show && e.value.style.chart.legend.position === "bottom" ? (u(), v("div", {
|
|
904
903
|
key: 6,
|
|
905
904
|
ref_key: "chartLegend",
|
|
906
905
|
ref: be
|
|
907
906
|
}, [
|
|
908
|
-
(u(), X(
|
|
907
|
+
(u(), X(pt, {
|
|
909
908
|
key: `legend_bottom_${me.value}`,
|
|
910
909
|
legendSet: F.value,
|
|
911
|
-
config:
|
|
910
|
+
config: at.value,
|
|
912
911
|
onClickMarker: l[1] || (l[1] = ({ legend: a }) => oe(a.id))
|
|
913
912
|
}, he({
|
|
914
913
|
item: m(({ legend: a, index: o }) => [
|
|
915
914
|
n("div", {
|
|
916
915
|
onClick: (g) => oe(a.id),
|
|
917
|
-
style:
|
|
916
|
+
style: d(`opacity:${A.value.includes(a.id) ? 0.5 : 1}`)
|
|
918
917
|
}, h(a.name) + ": " + h(s(pe)(
|
|
919
918
|
e.value.style.chart.layout.bars.dataLabels.value.formatter,
|
|
920
919
|
a.value,
|
|
@@ -932,7 +931,7 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
932
931
|
t.$slots.pattern ? {
|
|
933
932
|
name: "legend-pattern",
|
|
934
933
|
fn: m(({ legend: a, index: o }) => [
|
|
935
|
-
J(
|
|
934
|
+
J(ft, {
|
|
936
935
|
shape: a.shape,
|
|
937
936
|
radius: 30,
|
|
938
937
|
stroke: "none",
|
|
@@ -948,13 +947,13 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
948
947
|
t.$slots.source ? (u(), v("div", {
|
|
949
948
|
key: 7,
|
|
950
949
|
ref_key: "source",
|
|
951
|
-
ref:
|
|
950
|
+
ref: Re,
|
|
952
951
|
dir: "auto"
|
|
953
952
|
}, [
|
|
954
953
|
_(t.$slots, "source", {}, void 0, !0)
|
|
955
954
|
], 512)) : f("", !0),
|
|
956
|
-
J(s(
|
|
957
|
-
show:
|
|
955
|
+
J(s(mt), {
|
|
956
|
+
show: $.value.showTooltip && ge.value && A.value.length < b.dataset.length,
|
|
958
957
|
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
959
958
|
color: e.value.style.chart.tooltip.color,
|
|
960
959
|
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
@@ -979,28 +978,28 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
979
978
|
]),
|
|
980
979
|
_: 3
|
|
981
980
|
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
|
|
982
|
-
fe.value ? (u(), X(Ht(
|
|
981
|
+
fe.value ? (u(), X(Ht(ce.value.component), ct({ key: 8 }, ce.value.props, {
|
|
983
982
|
ref_key: "tableUnit",
|
|
984
983
|
ref: le,
|
|
985
|
-
onClose:
|
|
984
|
+
onClose: Ne
|
|
986
985
|
}), he({
|
|
987
986
|
content: m(() => [
|
|
988
987
|
n("div", {
|
|
989
988
|
ref_key: "tableContainer",
|
|
990
|
-
ref:
|
|
989
|
+
ref: Qe,
|
|
991
990
|
class: "vue-ui-vertical-bar-table atom-data-table",
|
|
992
|
-
style:
|
|
991
|
+
style: d(`${e.value.table.useDialog ? "" : "max-height: 300px; margin-top: 24px"}`)
|
|
993
992
|
}, [
|
|
994
|
-
n("div",
|
|
993
|
+
n("div", Ra, [
|
|
995
994
|
e.value.table.useDialog ? f("", !0) : (u(), v("div", {
|
|
996
995
|
key: 0,
|
|
997
996
|
role: "button",
|
|
998
997
|
tabindex: "0",
|
|
999
|
-
style:
|
|
1000
|
-
onClick:
|
|
1001
|
-
onKeypress:
|
|
998
|
+
style: d(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${e.value.table.th.backgroundColor};`),
|
|
999
|
+
onClick: Ne,
|
|
1000
|
+
onKeypress: jt(Ne, ["enter"])
|
|
1002
1001
|
}, [
|
|
1003
|
-
J(s(
|
|
1002
|
+
J(s(Me), {
|
|
1004
1003
|
name: "close",
|
|
1005
1004
|
stroke: e.value.table.th.color,
|
|
1006
1005
|
"stroke-width": 2
|
|
@@ -1008,112 +1007,112 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
1008
1007
|
], 36)),
|
|
1009
1008
|
n("div", {
|
|
1010
1009
|
style: { width: "100%", "container-type": "inline-size" },
|
|
1011
|
-
class: U({ "vue-ui-responsive":
|
|
1010
|
+
class: U({ "vue-ui-responsive": s(Et) })
|
|
1012
1011
|
}, [
|
|
1013
|
-
n("table",
|
|
1012
|
+
n("table", Ea, [
|
|
1014
1013
|
e.value.table.useDialog ? f("", !0) : (u(), v("caption", {
|
|
1015
1014
|
key: 0,
|
|
1016
|
-
style:
|
|
1015
|
+
style: d({ backgroundColor: e.value.table.th.backgroundColor, color: e.value.table.th.color, outline: e.value.table.th.outline }),
|
|
1017
1016
|
class: "vue-ui-data-table__caption"
|
|
1018
1017
|
}, [
|
|
1019
1018
|
dt(h(e.value.style.chart.title.text) + " ", 1),
|
|
1020
|
-
e.value.style.chart.title.subtitle.text ? (u(), v("span",
|
|
1019
|
+
e.value.style.chart.title.subtitle.text ? (u(), v("span", Ua, h(e.value.style.chart.title.subtitle.text), 1)) : f("", !0)
|
|
1021
1020
|
], 4)),
|
|
1022
1021
|
n("thead", null, [
|
|
1023
1022
|
n("tr", {
|
|
1024
1023
|
role: "row",
|
|
1025
|
-
style:
|
|
1024
|
+
style: d(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
|
|
1026
1025
|
}, [
|
|
1027
1026
|
(u(!0), v(ee, null, te(z.value.head, (a) => (u(), v("th", {
|
|
1028
|
-
style:
|
|
1027
|
+
style: d(`outline:${e.value.table.th.outline}`)
|
|
1029
1028
|
}, [
|
|
1030
|
-
n("div",
|
|
1029
|
+
n("div", Xa, h(a), 1)
|
|
1031
1030
|
], 4))), 256))
|
|
1032
1031
|
], 4),
|
|
1033
1032
|
n("tr", null, [
|
|
1034
1033
|
n("th", {
|
|
1035
|
-
style:
|
|
1034
|
+
style: d(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
|
|
1036
1035
|
}, null, 4),
|
|
1037
1036
|
n("th", {
|
|
1038
|
-
style:
|
|
1037
|
+
style: d(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)
|
|
1039
1038
|
}, "∑ " + h(e.value.table.td.prefix) + h(isNaN(V.value) ? "" : V.value.toFixed(e.value.table.td.roundingValue)) + h(e.value.table.td.suffix), 5),
|
|
1040
1039
|
n("th", {
|
|
1041
|
-
style:
|
|
1040
|
+
style: d(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)
|
|
1042
1041
|
}, "100%", 4),
|
|
1043
1042
|
n("th", {
|
|
1044
|
-
style:
|
|
1043
|
+
style: d(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
|
|
1045
1044
|
}, null, 4),
|
|
1046
1045
|
n("th", {
|
|
1047
|
-
style:
|
|
1046
|
+
style: d(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
|
|
1048
1047
|
}, null, 4),
|
|
1049
1048
|
n("th", {
|
|
1050
|
-
style:
|
|
1049
|
+
style: d(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
|
|
1051
1050
|
}, null, 4),
|
|
1052
1051
|
n("th", {
|
|
1053
|
-
style:
|
|
1052
|
+
style: d(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
|
|
1054
1053
|
}, null, 4)
|
|
1055
1054
|
])
|
|
1056
1055
|
]),
|
|
1057
1056
|
n("tbody", null, [
|
|
1058
1057
|
(u(!0), v(ee, null, te(z.value.body, (a, o) => (u(), v("tr", {
|
|
1059
1058
|
class: U({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": o % 2 === 0, "vue-ui-data-table__tbody__row-odd": o % 2 !== 0 }),
|
|
1060
|
-
style:
|
|
1059
|
+
style: d(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
|
|
1061
1060
|
}, [
|
|
1062
1061
|
n("td", {
|
|
1063
1062
|
class: "vue-ui-data-table__tbody__td",
|
|
1064
|
-
style:
|
|
1063
|
+
style: d(`outline:${e.value.table.td.outline};font-variant-numeric: tabular-nums;`),
|
|
1065
1064
|
"data-cell": z.value.head[0] ?? ""
|
|
1066
1065
|
}, [
|
|
1067
|
-
n("div",
|
|
1066
|
+
n("div", Ga, [
|
|
1068
1067
|
a.color ? (u(), v("span", {
|
|
1069
1068
|
key: 0,
|
|
1070
|
-
style:
|
|
1069
|
+
style: d(`color:${a.color};margin-right:3px`)
|
|
1071
1070
|
}, "⬤", 4)) : f("", !0),
|
|
1072
1071
|
n("span", null, h(a.parentName), 1)
|
|
1073
1072
|
])
|
|
1074
|
-
], 12,
|
|
1073
|
+
], 12, Wa),
|
|
1075
1074
|
n("td", {
|
|
1076
1075
|
class: "vue-ui-data-table__tbody__td",
|
|
1077
|
-
style:
|
|
1076
|
+
style: d(`outline:${e.value.table.td.outline}`),
|
|
1078
1077
|
"data-cell": z.value.head[1] ?? ""
|
|
1079
1078
|
}, [
|
|
1080
|
-
n("div",
|
|
1081
|
-
], 12,
|
|
1079
|
+
n("div", ja, h(e.value.table.td.prefix) + h(["", NaN, void 0].includes(a.parentValue) ? "" : a.parentValue.toFixed(e.value.table.td.roundingValue)) + h(e.value.table.td.suffix), 1)
|
|
1080
|
+
], 12, Ha),
|
|
1082
1081
|
n("td", {
|
|
1083
1082
|
class: "vue-ui-data-table__tbody__td",
|
|
1084
|
-
style:
|
|
1083
|
+
style: d(`outline:${e.value.table.td.outline}`),
|
|
1085
1084
|
"data-cell": z.value.head[2] ?? ""
|
|
1086
1085
|
}, [
|
|
1087
|
-
n("div",
|
|
1088
|
-
], 12,
|
|
1086
|
+
n("div", Ya, h(["", NaN, void 0].includes(a.percentageToTotal) ? "" : `${(a.percentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
|
|
1087
|
+
], 12, qa),
|
|
1089
1088
|
n("td", {
|
|
1090
1089
|
class: "vue-ui-data-table__tbody__td",
|
|
1091
|
-
style:
|
|
1090
|
+
style: d(`outline:${e.value.table.td.outline}`),
|
|
1092
1091
|
"data-cell": z.value.head[3] ?? ""
|
|
1093
1092
|
}, [
|
|
1094
|
-
n("div",
|
|
1095
|
-
], 12,
|
|
1093
|
+
n("div", Ja, h(a.childName), 1)
|
|
1094
|
+
], 12, Ka),
|
|
1096
1095
|
n("td", {
|
|
1097
1096
|
class: "vue-ui-data-table__tbody__td",
|
|
1098
|
-
style:
|
|
1097
|
+
style: d(`outline:${e.value.table.td.outline}`),
|
|
1099
1098
|
"data-cell": z.value.head[4] ?? ""
|
|
1100
1099
|
}, [
|
|
1101
|
-
n("div",
|
|
1102
|
-
], 12,
|
|
1100
|
+
n("div", Za, h(e.value.table.td.prefix) + h(["", NaN, void 0].includes(a.childValue) ? "" : a.childValue.toFixed(e.value.table.td.roundingValue)) + h(e.value.table.td.suffix), 1)
|
|
1101
|
+
], 12, Qa),
|
|
1103
1102
|
n("td", {
|
|
1104
1103
|
class: "vue-ui-data-table__tbody__td",
|
|
1105
|
-
style:
|
|
1104
|
+
style: d(`outline:${e.value.table.td.outline}`),
|
|
1106
1105
|
"data-cell": z.value.head[5] ?? ""
|
|
1107
1106
|
}, [
|
|
1108
|
-
n("div",
|
|
1109
|
-
], 12,
|
|
1107
|
+
n("div", tl, h(["", NaN, void 0].includes(a.childPercentageToParent) ? "" : `${(a.childPercentageToParent * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
|
|
1108
|
+
], 12, el),
|
|
1110
1109
|
n("td", {
|
|
1111
1110
|
class: "vue-ui-data-table__tbody__td",
|
|
1112
|
-
style:
|
|
1111
|
+
style: d(`outline:${e.value.table.td.outline}`),
|
|
1113
1112
|
"data-cell": z.value.head[6] ?? ""
|
|
1114
1113
|
}, [
|
|
1115
|
-
n("div",
|
|
1116
|
-
], 12,
|
|
1114
|
+
n("div", ll, h(["", NaN, void 0].includes(a.childPercentageToTotal) ? "" : `${(a.childPercentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
|
|
1115
|
+
], 12, al)
|
|
1117
1116
|
], 6))), 256))
|
|
1118
1117
|
])
|
|
1119
1118
|
])
|
|
@@ -1126,7 +1125,7 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
1126
1125
|
e.value.table.useDialog ? {
|
|
1127
1126
|
name: "title",
|
|
1128
1127
|
fn: m(() => [
|
|
1129
|
-
dt(h(
|
|
1128
|
+
dt(h(ce.value.title), 1)
|
|
1130
1129
|
]),
|
|
1131
1130
|
key: "0"
|
|
1132
1131
|
} : void 0,
|
|
@@ -1138,19 +1137,19 @@ const ya = ["id"], ba = ["onClick"], ma = ["xmlns", "viewBox"], ka = ["x", "widt
|
|
|
1138
1137
|
class: "vue-ui-user-options-button",
|
|
1139
1138
|
onClick: l[2] || (l[2] = (a) => Le(e.value.userOptions.callbacks.csv))
|
|
1140
1139
|
}, [
|
|
1141
|
-
J(s(
|
|
1140
|
+
J(s(Me), {
|
|
1142
1141
|
name: "excel",
|
|
1143
|
-
stroke:
|
|
1142
|
+
stroke: ce.value.props.color
|
|
1144
1143
|
}, null, 8, ["stroke"])
|
|
1145
1144
|
])
|
|
1146
1145
|
]),
|
|
1147
1146
|
key: "1"
|
|
1148
1147
|
} : void 0
|
|
1149
1148
|
]), 1040)) : f("", !0),
|
|
1150
|
-
s(
|
|
1151
|
-
], 46,
|
|
1149
|
+
s(Xe) ? (u(), X(ia, { key: 9 })) : f("", !0)
|
|
1150
|
+
], 46, ba));
|
|
1152
1151
|
}
|
|
1153
|
-
},
|
|
1152
|
+
}, kl = /* @__PURE__ */ ya(ol, [["__scopeId", "data-v-e20a4dff"]]);
|
|
1154
1153
|
export {
|
|
1155
|
-
|
|
1154
|
+
kl as default
|
|
1156
1155
|
};
|