vue-data-ui 3.0.0-next.6 → 3.0.0-next.7
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-Ul64M9UV.js → Arrow-Bl8urcli.js} +1 -1
- package/dist/{BaseDraggableDialog-Q2ajCztp.js → BaseDraggableDialog-CyhpaZU5.js} +2 -2
- package/dist/{BaseIcon-BKR7AGeP.js → BaseIcon-BCZfTCeM.js} +1 -1
- package/dist/{ColorPicker-BagIs8-K.js → ColorPicker-CSJf42vx.js} +2 -2
- package/dist/{DataTable-CDwApkI_.js → DataTable-mQ6Wd-rR.js} +2 -2
- package/dist/{Legend-BSLj7tYc.js → Legend-B2hrDh4G.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DjJe5fXu.js → NonSvgPenAndPaper-DQ8KsK4W.js} +3 -3
- package/dist/{PackageVersion-BsKpz6KS.js → PackageVersion-CeEYZfaH.js} +1 -1
- package/dist/{PenAndPaper-BYRk8xrS.js → PenAndPaper-DhSxfUrQ.js} +3 -3
- package/dist/{Shape-DK7zYTKa.js → Shape-C2qH26wh.js} +1 -1
- package/dist/{Slicer-B_Hb6qSk.js → Slicer-BD8Z8VCW.js} +2 -2
- package/dist/{SparkTooltip-Dy2sVTb_.js → SparkTooltip-BcHgW6YX.js} +1 -1
- package/dist/{Title-Cednydse.js → Title-B7Xb3YuE.js} +1 -1
- package/dist/{Tooltip-DJlwW-XP.js → Tooltip-BidRoM5E.js} +1 -1
- package/dist/{UserOptions-DxIzWere.js → UserOptions-0tvMM8PF.js} +2 -2
- package/dist/{dom-to-png-lZcM-YfK.js → dom-to-png-CTrlbKHr.js} +1 -1
- package/dist/{img-DqlIAUF6.js → img-D72yZNUg.js} +1 -1
- package/dist/{index-BQcLOx39.js → index-Cg-RjxqH.js} +486 -483
- package/dist/{pdf-CjIXhsyg.js → pdf-DgX01_wu.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-DefBVltl.js → useNestedProp-C_G5E08Y.js} +1 -1
- package/dist/{usePrinter-BRY5saEA.js → usePrinter-BUzmyQf9.js} +2 -2
- package/dist/{vue-data-ui-CWRlSsiN.js → vue-data-ui-DpO93ey5.js} +64 -64
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CJMZqDo1.js → vue-ui-3d-bar-D8imUwEz.js} +6 -6
- package/dist/{vue-ui-accordion-Df-5BRRg.js → vue-ui-accordion-CRomxzaL.js} +3 -3
- package/dist/{vue-ui-age-pyramid-B6WAMtPk.js → vue-ui-age-pyramid-CV7gtFOC.js} +6 -6
- package/dist/{vue-ui-annotator-BxC5dcIv.js → vue-ui-annotator-BAOxPiFx.js} +2 -2
- package/dist/{vue-ui-bullet-NmtltFbU.js → vue-ui-bullet-BtuMMBF7.js} +7 -7
- package/dist/{vue-ui-candlestick-BzqQtynP.js → vue-ui-candlestick-BsRtXKrv.js} +7 -7
- package/dist/{vue-ui-carousel-table-NTDzafWQ.js → vue-ui-carousel-table-DVGlPZIa.js} +4 -4
- package/dist/{vue-ui-chestnut-k21Qqjjq.js → vue-ui-chestnut-P1v4ffD0.js} +5 -5
- package/dist/{vue-ui-chord-BVoA6nfI.js → vue-ui-chord-CIuzYmpM.js} +8 -8
- package/dist/{vue-ui-circle-pack-CEBgImRX.js → vue-ui-circle-pack-FXmemXgl.js} +6 -6
- package/dist/{vue-ui-cursor-BQcz8xw2.js → vue-ui-cursor-CdvMgIrP.js} +2 -2
- package/dist/{vue-ui-dashboard-CyzEpJoI.js → vue-ui-dashboard-Vke0452J.js} +62 -62
- package/dist/{vue-ui-digits-Dafw1UsT.js → vue-ui-digits-BVhyYqCs.js} +2 -2
- package/dist/{vue-ui-donut-DKfux8XT.js → vue-ui-donut-BpIivKcf.js} +8 -8
- package/dist/{vue-ui-donut-evolution-D7cNk_6l.js → vue-ui-donut-evolution-BRlsCA4U.js} +8 -8
- package/dist/{vue-ui-dumbbell--H80zebk.js → vue-ui-dumbbell-D87Dumjh.js} +7 -7
- package/dist/{vue-ui-flow-lk_HU5NB.js → vue-ui-flow-D_L_xssL.js} +7 -7
- package/dist/{vue-ui-funnel-CuN8HWwP.js → vue-ui-funnel-BbFmbsft.js} +6 -6
- package/dist/{vue-ui-galaxy-BHCLFlmy.js → vue-ui-galaxy-Cn6vHbaw.js} +5 -5
- package/dist/{vue-ui-gauge-DWlCh2_B.js → vue-ui-gauge-Ds4terqY.js} +6 -6
- package/dist/{vue-ui-gizmo-DHEEfdp9.js → vue-ui-gizmo-BTncpI62.js} +3 -3
- package/dist/{vue-ui-heatmap-BK6BNOY_.js → vue-ui-heatmap-B6GpjeWC.js} +7 -7
- package/dist/{vue-ui-history-plot-CGF6lE-7.js → vue-ui-history-plot-DTDzEeGq.js} +7 -7
- package/dist/{vue-ui-kpi-C4i2w_Yd.js → vue-ui-kpi-jN_yMnLj.js} +3 -3
- package/dist/{vue-ui-mini-loader-BeetGv_m.js → vue-ui-mini-loader-rYr76x8g.js} +2 -2
- package/dist/{vue-ui-molecule-F_gDXjJr.js → vue-ui-molecule-BWZHOQLi.js} +5 -5
- package/dist/{vue-ui-mood-radar-BJMOEqlu.js → vue-ui-mood-radar-CPfS6f1L.js} +7 -7
- package/dist/{vue-ui-nested-donuts-BX0Z0rb1.js → vue-ui-nested-donuts-Bsd2kGoJ.js} +7 -7
- package/dist/{vue-ui-onion-BhjUET_W.js → vue-ui-onion-BQ4nISXW.js} +7 -7
- package/dist/{vue-ui-parallel-coordinate-plot-n7QPVLrW.js → vue-ui-parallel-coordinate-plot-BoHgVgbn.js} +8 -8
- package/dist/{vue-ui-quadrant-DTyRC1_v.js → vue-ui-quadrant-BFFzfDw3.js} +8 -8
- package/dist/{vue-ui-quick-chart-5xX-yBIY.js → vue-ui-quick-chart-oNMTeOAL.js} +6 -6
- package/dist/{vue-ui-radar-De2iznwo.js → vue-ui-radar-98mXFZe-.js} +7 -7
- package/dist/{vue-ui-rating-CarXXyD-.js → vue-ui-rating-BAauyqTn.js} +2 -2
- package/dist/{vue-ui-relation-circle-CKkK9D4E.js → vue-ui-relation-circle-6oDCSxkO.js} +6 -6
- package/dist/{vue-ui-ridgeline-DQ8RQf3E.js → vue-ui-ridgeline-CugMGjOU.js} +8 -8
- package/dist/{vue-ui-rings-Cze6OsmO.js → vue-ui-rings-bsGXaD2m.js} +8 -8
- package/dist/{vue-ui-scatter-CwI3_Dn7.js → vue-ui-scatter-7ssLliGg.js} +8 -8
- package/dist/{vue-ui-skeleton-C7maR60-.js → vue-ui-skeleton-CUOhCY4p.js} +3 -3
- package/dist/{vue-ui-smiley-DzCCn5Oc.js → vue-ui-smiley-B6SqWMov.js} +2 -2
- package/dist/{vue-ui-spark-trend-Db-Fnp8C.js → vue-ui-spark-trend-jauInkkN.js} +3 -3
- package/dist/{vue-ui-sparkbar-C6wsNMMO.js → vue-ui-sparkbar-DXByIxQH.js} +3 -3
- package/dist/{vue-ui-sparkgauge-DAQ4zozy.js → vue-ui-sparkgauge-BMrV2gDi.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-CMEaO0CW.js → vue-ui-sparkhistogram-CoNM4G7o.js} +4 -4
- package/dist/{vue-ui-sparkline-R7pfxRWN.js → vue-ui-sparkline-DrN3_wS0.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-DV_XqJQ2.js → vue-ui-sparkstackbar-W1a0JQi9.js} +3 -3
- package/dist/{vue-ui-stackbar-gReSujA_.js → vue-ui-stackbar-D1-gbUgE.js} +9 -9
- package/dist/{vue-ui-strip-plot-8fsm3nn2.js → vue-ui-strip-plot-KhfvrVuN.js} +7 -7
- package/dist/{vue-ui-table-Dck8Pyg9.js → vue-ui-table-Dwjl3L0p.js} +3 -3
- package/dist/{vue-ui-table-heatmap-DknIGf9_.js → vue-ui-table-heatmap-DazTE3fa.js} +5 -5
- package/dist/{vue-ui-table-sparkline-G4HAzUt6.js → vue-ui-table-sparkline-BXMPUEpN.js} +4 -4
- package/dist/{vue-ui-thermometer-BIkXa4hY.js → vue-ui-thermometer-Cn6lJRs3.js} +6 -6
- package/dist/{vue-ui-timer-Dmr-HCSc.js → vue-ui-timer-yLvNAZL_.js} +5 -5
- package/dist/{vue-ui-tiremarks-YWbRk0dm.js → vue-ui-tiremarks-BYsWePfK.js} +6 -6
- package/dist/{vue-ui-treemap-D2OnG3Fh.js → vue-ui-treemap-Ce7RVFG3.js} +8 -8
- package/dist/{vue-ui-vertical-bar--QFtoFje.js → vue-ui-vertical-bar-BrYCoVym.js} +299 -285
- package/dist/{vue-ui-waffle-BdaCXuWc.js → vue-ui-waffle-CCrR2T1G.js} +8 -8
- package/dist/{vue-ui-wheel-Bw3XSa8N.js → vue-ui-wheel-BuxjnrDN.js} +6 -6
- package/dist/{vue-ui-word-cloud-BH8UZH_J.js → vue-ui-word-cloud-C6fawHJE.js} +6 -6
- package/dist/{vue-ui-world-BcK_brDq.js → vue-ui-world-B4Dqrk4l.js} +6 -6
- package/dist/{vue-ui-xy-canvas--88oKdGN.js → vue-ui-xy-canvas-D7fL36kT.js} +8 -8
- package/dist/{vue-ui-xy-Be--zwe9.js → vue-ui-xy-ubRnv9iJ.js} +8 -8
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { useCssVars as
|
|
2
|
-
import { u as
|
|
3
|
-
import { t as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { _ as
|
|
12
|
-
import
|
|
13
|
-
import { u as
|
|
14
|
-
import { _ as
|
|
15
|
-
const
|
|
1
|
+
import { useCssVars as Ft, defineAsyncComponent as ae, useSlots as Bt, computed as b, ref as i, toRefs as Rt, watch as nt, shallowRef as ut, onMounted as Te, nextTick as ve, onBeforeUnmount as Et, createElementBlock as v, openBlock as u, unref as s, normalizeStyle as h, normalizeClass as D, createBlock as X, createCommentVNode as y, renderSlot as x, createVNode as le, createSlots as Se, withCtx as w, normalizeProps as Y, guardReactiveProps as K, createElementVNode as n, toDisplayString as p, Fragment as J, renderList as Q, mergeProps as Dt, withKeys as Xt, createTextVNode as Ut } from "vue";
|
|
2
|
+
import { u as Gt, c as Wt, A as Ht, t as jt, p as U, a as qt, C as Le, b as Yt, v as L, o as Pe, e as oe, d as Ne, i as de, f as G, X as Kt, s as Ae, w as Jt, q as Qt, r as Zt, x as ea, y as ta } from "./index-Cg-RjxqH.js";
|
|
3
|
+
import { t as aa, u as la } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as st } from "./useNestedProp-C_G5E08Y.js";
|
|
5
|
+
import { u as oa } from "./usePrinter-BUzmyQf9.js";
|
|
6
|
+
import { u as na } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
|
+
import { u as ua } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
+
import sa from "./vue-ui-accordion-CRomxzaL.js";
|
|
9
|
+
import rt from "./Legend-B2hrDh4G.js";
|
|
10
|
+
import ra from "./Title-B7Xb3YuE.js";
|
|
11
|
+
import { _ as it } from "./Shape-C2qH26wh.js";
|
|
12
|
+
import ia from "./img-D72yZNUg.js";
|
|
13
|
+
import { u as va, B as da } from "./useLoading-Bt5Doa8m.js";
|
|
14
|
+
import { _ as ca } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
|
+
const ha = ["id"], pa = ["onClick"], fa = ["xmlns", "viewBox"], ya = ["x", "width", "height"], ga = ["id"], ba = ["stop-color"], ma = ["stop-color"], ka = { key: 1 }, xa = ["x", "y", "width", "height", "fill", "rx"], _a = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], wa = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], $a = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ca = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ta = { class: "vue-ui-horizontal-bar-child-label" }, Sa = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], La = ["x", "y", "font-size", "fill", "font-weight"], Pa = { class: "vue-ui-horizontal-bar-parent-label" }, Na = ["x", "y", "font-size", "fill", "font-weight"], Aa = ["x", "y", "font-size", "fill", "font-weight"], za = ["x", "y", "width", "height", "fill", "onMouseenter", "onMouseleave", "onClick"], Va = {
|
|
16
16
|
key: 5,
|
|
17
17
|
class: "vue-data-ui-watermark"
|
|
18
|
-
},
|
|
18
|
+
}, Ia = ["onClick"], Oa = { style: "width:100%;padding-top: 36px;position:relative" }, Ma = { class: "vue-ui-data-table" }, Fa = { key: 0 }, Ba = { style: { width: "100%" } }, Ra = ["data-cell"], Ea = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Da = ["data-cell"], Xa = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ua = ["data-cell"], Ga = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Wa = ["data-cell"], Ha = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, ja = ["data-cell"], qa = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ya = ["data-cell"], Ka = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ja = ["data-cell"], Qa = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Za = {
|
|
19
19
|
__name: "vue-ui-vertical-bar",
|
|
20
20
|
props: {
|
|
21
21
|
config: {
|
|
@@ -32,35 +32,35 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
emits: ["selectLegend"],
|
|
35
|
-
setup(
|
|
36
|
-
|
|
37
|
-
"
|
|
35
|
+
setup(vt, { expose: dt, emit: ct }) {
|
|
36
|
+
Ft((t) => ({
|
|
37
|
+
"3328a5b3": t.tdo
|
|
38
38
|
}));
|
|
39
|
-
const
|
|
39
|
+
const ht = ae(() => import("./BaseIcon-BCZfTCeM.js")), pt = ae(() => import("./PackageVersion-CeEYZfaH.js")), ft = ae(() => import("./PenAndPaper-DhSxfUrQ.js")), yt = ae(() => import("./Tooltip-BidRoM5E.js")), gt = ae(() => import("./UserOptions-0tvMM8PF.js")), { vue_ui_vertical_bar: bt } = Gt(), mt = Bt(), g = vt, ce = b({
|
|
40
40
|
get() {
|
|
41
|
-
return !!
|
|
41
|
+
return !!g.dataset && g.dataset.length;
|
|
42
42
|
},
|
|
43
43
|
set(t) {
|
|
44
44
|
return t;
|
|
45
45
|
}
|
|
46
|
-
}), S = i(
|
|
46
|
+
}), S = i(Wt()), kt = i(null), he = i(!1), pe = i(""), Z = i(0), xt = i(null), ze = i(0), z = i(null), Ve = i(null), fe = i(null), Ie = i(null), Oe = i(null), Me = i(0), ye = i(0), ne = i(null), _t = ct, e = i(xe()), wt = b(() => [
|
|
47
47
|
{ name: "", value: 6, color: "#d9d9d9" },
|
|
48
48
|
{ name: "", value: 5, color: "#d9d9d9" },
|
|
49
49
|
{ name: "", value: 4, color: "#d9d9d9" },
|
|
50
50
|
{ name: "", value: 3, color: "#d9d9d9" },
|
|
51
51
|
{ name: "", value: 2, color: "#d9d9d9" },
|
|
52
52
|
{ name: "", value: 1, color: "#d9d9d9" }
|
|
53
|
-
]), { loading:
|
|
54
|
-
...
|
|
53
|
+
]), { loading: ge, FINAL_DATASET: be, manualLoading: me } = va({
|
|
54
|
+
...Rt(g),
|
|
55
55
|
FINAL_CONFIG: e,
|
|
56
56
|
prepareConfig: xe,
|
|
57
57
|
callback: () => {
|
|
58
58
|
Promise.resolve().then(async () => {
|
|
59
|
-
|
|
59
|
+
H(), await O();
|
|
60
60
|
});
|
|
61
61
|
},
|
|
62
|
-
skeletonDataset:
|
|
63
|
-
skeletonConfig:
|
|
62
|
+
skeletonDataset: wt.value,
|
|
63
|
+
skeletonConfig: Ht({
|
|
64
64
|
defaultConfig: e.value,
|
|
65
65
|
userConfig: {
|
|
66
66
|
useCssAnimation: !1,
|
|
@@ -106,52 +106,52 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
})
|
|
109
|
-
}), { userOptionsVisible: ke, setUserOptionsVisibility:
|
|
109
|
+
}), { userOptionsVisible: ke, setUserOptionsVisibility: Fe, keepUserOptionState: Be } = na({ config: e.value }), { svgRef: Re } = ua({ config: e.value.style.chart.title });
|
|
110
110
|
function xe() {
|
|
111
|
-
const t =
|
|
112
|
-
userConfig:
|
|
113
|
-
defaultConfig:
|
|
111
|
+
const t = st({
|
|
112
|
+
userConfig: g.config,
|
|
113
|
+
defaultConfig: bt
|
|
114
114
|
});
|
|
115
115
|
let l = {};
|
|
116
116
|
return t.theme ? l = {
|
|
117
|
-
...
|
|
118
|
-
userConfig:
|
|
117
|
+
...st({
|
|
118
|
+
userConfig: qt.vue_ui_vertical_bar[t.theme] || g.config,
|
|
119
119
|
defaultConfig: t
|
|
120
120
|
}),
|
|
121
|
-
customPalette:
|
|
122
|
-
} : l = t,
|
|
121
|
+
customPalette: jt[t.theme] || U
|
|
122
|
+
} : l = t, g.config && Le(g.config, "events.datapointEnter") ? l.events.datapointEnter = g.config.events.datapointEnter : l.events.datapointEnter = null, g.config && Le(g.config, "events.datapointLeave") ? l.events.datapointLeave = g.config.events.datapointLeave : l.events.datapointLeave = null, g.config && Le(g.config, "events.datapointClick") ? l.events.datapointClick = g.config.events.datapointClick : l.events.datapointClick = null, l;
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}, { deep: !0 }),
|
|
127
|
-
Array.isArray(t) && t.length > 0 && (me.value = !1),
|
|
124
|
+
nt(() => g.config, (t) => {
|
|
125
|
+
ge.value || (e.value = xe()), ke.value = !e.value.userOptions.showOnChartHover, qe(), Me.value += 1, ye.value += 1, c.value = e.value.style.chart.layout.bars.height, m.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;
|
|
126
|
+
}, { deep: !0 }), nt(() => g.dataset, (t) => {
|
|
127
|
+
Array.isArray(t) && t.length > 0 && (me.value = !1), H();
|
|
128
128
|
}, { deep: !0 });
|
|
129
|
-
const { isPrinting: Ee, isImaging:
|
|
129
|
+
const { isPrinting: Ee, isImaging: De, generatePdf: Xe, generateImage: Ue } = oa({
|
|
130
130
|
elementId: `vue-ui-vertical-bar_${S.value}`,
|
|
131
131
|
fileName: e.value.style.chart.title.text || "vue-ui-vertical-bar",
|
|
132
132
|
options: e.value.userOptions.print
|
|
133
|
-
}),
|
|
133
|
+
}), $t = b(() => e.value.userOptions.show && !e.value.style.chart.title.text), Ge = b(() => Yt(e.value.customPalette)), We = i(null), He = i(!1), Ct = b(() => e.value.table.responsiveBreakpoint), I = ut(null), W = ut(null), ue = i("0 0 10 10"), P = b(() => {
|
|
134
134
|
const [t, l, a, o] = ue.value.split(" ").map(Number);
|
|
135
135
|
return { x: t, y: l, width: a, height: o };
|
|
136
136
|
});
|
|
137
|
-
|
|
138
|
-
await ve(),
|
|
137
|
+
Te(async () => {
|
|
138
|
+
await ve(), qe(), O();
|
|
139
139
|
});
|
|
140
|
-
async function
|
|
140
|
+
async function O() {
|
|
141
141
|
if (ue.value = `0 0 ${C.value.width} ${r.value.fullHeight}`, !e.value.autoSize) return;
|
|
142
142
|
const t = ne.value.querySelectorAll(".vue-ui-horizontal-bar-parent-label"), l = ne.value.querySelectorAll(".vue-ui-horizontal-bar-child-label");
|
|
143
143
|
if (t.length) {
|
|
144
144
|
const f = Math.max(...Array.from(t).flatMap((d) => {
|
|
145
145
|
const k = d.querySelectorAll("text");
|
|
146
|
-
return k.length ? Array.from(k).map((
|
|
146
|
+
return k.length ? Array.from(k).map((q) => q.getBBox().width) : 0;
|
|
147
147
|
})), _ = Math.max(...Array.from(l).flatMap((d) => {
|
|
148
148
|
const k = d.querySelectorAll("text");
|
|
149
|
-
return k.length ? Array.from(k).map((
|
|
149
|
+
return k.length ? Array.from(k).map((q) => q.getBBox().width) : 0;
|
|
150
150
|
}));
|
|
151
151
|
Array.from(t).forEach((d) => {
|
|
152
152
|
const k = d.querySelectorAll("text");
|
|
153
|
-
Array.from(k).forEach(async (
|
|
154
|
-
|
|
153
|
+
Array.from(k).forEach(async (q) => {
|
|
154
|
+
q.setAttribute("x", 0), q.setAttribute("x", L(-f - _));
|
|
155
155
|
});
|
|
156
156
|
});
|
|
157
157
|
}
|
|
@@ -164,52 +164,66 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
164
164
|
r.value.fullHeight
|
|
165
165
|
].join(" ");
|
|
166
166
|
}
|
|
167
|
+
let je;
|
|
168
|
+
Te(() => {
|
|
169
|
+
z.value && (je = new ResizeObserver((t) => {
|
|
170
|
+
for (const l of t) {
|
|
171
|
+
const { width: a, height: o } = l.contentRect;
|
|
172
|
+
if (a > 0 && o > 0) {
|
|
173
|
+
Promise.resolve().then(async () => {
|
|
174
|
+
H(), await O();
|
|
175
|
+
});
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}), je.observe(z.value.parentElement));
|
|
180
|
+
});
|
|
167
181
|
const se = b(() => !!e.value.debug), _e = i(0);
|
|
168
|
-
function
|
|
169
|
-
if (
|
|
182
|
+
function qe() {
|
|
183
|
+
if (Pe(g.dataset) && (oe({
|
|
170
184
|
componentName: "VueUiVerticalBar",
|
|
171
185
|
type: "dataset",
|
|
172
186
|
debug: se.value
|
|
173
|
-
}), ce.value = !1, me.value = !0),
|
|
174
|
-
const t =
|
|
175
|
-
const { width: l, height: a } =
|
|
176
|
-
chart:
|
|
177
|
-
title: e.value.style.chart.title.text ?
|
|
187
|
+
}), ce.value = !1, me.value = !0), Z.value = be.value.flatMap((t) => t.children && t.children.length > 0 ? t.children.length : 1).reduce((t, l) => t + l, 0), Tt(), Pe(g.dataset) || (me.value = e.value.loading), e.value.responsive) {
|
|
188
|
+
const t = aa(() => {
|
|
189
|
+
const { width: l, height: a } = la({
|
|
190
|
+
chart: z.value,
|
|
191
|
+
title: e.value.style.chart.title.text ? Ve.value : null,
|
|
178
192
|
legend: e.value.style.chart.legend.show ? fe.value : null,
|
|
179
|
-
source:
|
|
180
|
-
noTitle:
|
|
193
|
+
source: Ie.value,
|
|
194
|
+
noTitle: Oe.value
|
|
181
195
|
});
|
|
182
196
|
_e.value = a / 3, requestAnimationFrame(async () => {
|
|
183
|
-
|
|
184
|
-
const o = m.value * (
|
|
185
|
-
c.value = (a - o) /
|
|
197
|
+
Je.value = l;
|
|
198
|
+
const o = m.value * (Z.value - 1);
|
|
199
|
+
c.value = (a - o) / Z.value, await ve(), O();
|
|
186
200
|
});
|
|
187
201
|
});
|
|
188
|
-
I.value && (W.value && I.value.unobserve(W.value), I.value.disconnect()), I.value = new ResizeObserver(t), W.value =
|
|
202
|
+
I.value && (W.value && I.value.unobserve(W.value), I.value.disconnect()), I.value = new ResizeObserver(t), W.value = z.value.parentNode, I.value.observe(W.value), e.value.autoSize && O();
|
|
189
203
|
}
|
|
190
204
|
}
|
|
191
205
|
Et(() => {
|
|
192
206
|
I.value && (W.value && I.value.unobserve(W.value), I.value.disconnect());
|
|
193
207
|
});
|
|
194
|
-
function
|
|
195
|
-
if (
|
|
208
|
+
function Tt() {
|
|
209
|
+
if (ge.value) return;
|
|
196
210
|
new ResizeObserver((l) => {
|
|
197
211
|
l.forEach((a) => {
|
|
198
|
-
|
|
212
|
+
He.value = a.contentRect.width < Ct.value;
|
|
199
213
|
});
|
|
200
|
-
}).observe(
|
|
214
|
+
}).observe(We.value);
|
|
201
215
|
}
|
|
202
216
|
const $ = i({
|
|
203
217
|
showTable: e.value.table.show,
|
|
204
218
|
sortDesc: e.value.style.chart.layout.bars.sort === "desc",
|
|
205
219
|
showTooltip: e.value.style.chart.tooltip.show
|
|
206
|
-
}),
|
|
220
|
+
}), Ye = b(() => $.value.sortDesc), M = b(() => (be.value.forEach((t, l) => {
|
|
207
221
|
!t.value && !t.children && oe({
|
|
208
222
|
componentName: "VueUiVerticalBar",
|
|
209
223
|
type: "datasetAttributeEmpty",
|
|
210
224
|
property: `value (index ${l})`,
|
|
211
225
|
debug: se.value
|
|
212
|
-
}), t.children && (
|
|
226
|
+
}), t.children && (Pe(t.children) ? oe({
|
|
213
227
|
componentName: "VueUiVerticalBar",
|
|
214
228
|
type: "datasetAttributeEmpty",
|
|
215
229
|
property: `children (index ${l})`,
|
|
@@ -231,15 +245,15 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
231
245
|
id: a,
|
|
232
246
|
absoluteIndex: l,
|
|
233
247
|
shape: "square",
|
|
234
|
-
opacity:
|
|
248
|
+
opacity: N.value.includes(a) ? 0.5 : 1,
|
|
235
249
|
value: Math.abs(f),
|
|
236
250
|
sign: _,
|
|
237
251
|
hasChildren: o,
|
|
238
252
|
isChild: !1,
|
|
239
253
|
segregate: () => ee(a),
|
|
240
|
-
isSegregated:
|
|
241
|
-
color: Ne(t.color) ||
|
|
242
|
-
children: !t.children || !t.children.length ? [] : t.children.toSorted(re.value ? () => 0 : (d, k) =>
|
|
254
|
+
isSegregated: N.value.includes(a),
|
|
255
|
+
color: Ne(t.color) || Ge.value[l] || U[l] || U[l % U.length],
|
|
256
|
+
children: !t.children || !t.children.length ? [] : t.children.toSorted(re.value ? () => 0 : (d, k) => Ye.value ? k.value - d.value : d.value - k.value).map((d, k) => ({
|
|
243
257
|
...d,
|
|
244
258
|
value: L(Math.abs(d.value)),
|
|
245
259
|
absoluteIndex: l,
|
|
@@ -251,23 +265,23 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
251
265
|
parentSign: _,
|
|
252
266
|
id: `vertical_child_${l}_${k}_${S.value}`,
|
|
253
267
|
childIndex: k,
|
|
254
|
-
color: Ne(d.color) || Ne(t.color) ||
|
|
268
|
+
color: Ne(d.color) || Ne(t.color) || Ge.value[l] || U[l] || U[l % U.length]
|
|
255
269
|
})).map((d, k) => ({
|
|
256
270
|
...d,
|
|
257
271
|
isFirstChild: k === 0,
|
|
258
272
|
isLastChild: k === t.children.length - 1
|
|
259
273
|
}))
|
|
260
274
|
};
|
|
261
|
-
}).toSorted(re.value ? () => 0 : (t, l) =>
|
|
275
|
+
}).toSorted(re.value ? () => 0 : (t, l) => Ye.value ? l.value - t.value : t.value - l.value))), Ke = b(() => ({
|
|
262
276
|
cy: "vertical-bar-div-legend",
|
|
263
277
|
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
264
278
|
color: e.value.style.chart.legend.color,
|
|
265
279
|
fontSize: e.value.style.chart.legend.fontSize,
|
|
266
280
|
paddingBottom: 12,
|
|
267
281
|
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
268
|
-
})), c = i(e.value.style.chart.layout.bars.height), m = i(e.value.style.chart.layout.bars.gap),
|
|
269
|
-
width:
|
|
270
|
-
height:
|
|
282
|
+
})), c = i(e.value.style.chart.layout.bars.height), m = i(e.value.style.chart.layout.bars.gap), St = b(() => (c.value + m.value) * Z.value), Je = i(512), C = b(() => ({
|
|
283
|
+
width: Je.value,
|
|
284
|
+
height: St.value,
|
|
271
285
|
padding: {
|
|
272
286
|
top: 12,
|
|
273
287
|
left: (e.value.autoSize ? 0 : 128) + e.value.style.chart.layout.bars.offsetX,
|
|
@@ -282,33 +296,33 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
282
296
|
bottom: C.value.padding.top + C.value.height,
|
|
283
297
|
width: C.value.width - (C.value.padding.left + C.value.padding.right)
|
|
284
298
|
}));
|
|
285
|
-
async function
|
|
286
|
-
|
|
299
|
+
async function H() {
|
|
300
|
+
Z.value = B.value.flatMap((t) => t.children && t.children.length > 0 ? t.children.length : 1).reduce((t, l) => t + l, 0), e.value.autoSize && await O();
|
|
287
301
|
}
|
|
288
|
-
const
|
|
302
|
+
const N = i([]);
|
|
289
303
|
async function ee(t) {
|
|
290
|
-
if (
|
|
291
|
-
|
|
304
|
+
if (N.value.includes(t))
|
|
305
|
+
N.value = N.value.filter((l) => l !== t);
|
|
292
306
|
else {
|
|
293
|
-
if (
|
|
294
|
-
|
|
307
|
+
if (N.value.length === M.value.length - 1) return;
|
|
308
|
+
N.value.push(t);
|
|
295
309
|
}
|
|
296
|
-
|
|
310
|
+
H(), await ve(), e.value.autoSize && O(), _t("selectLegend", B.value);
|
|
297
311
|
}
|
|
298
|
-
const B = b(() =>
|
|
299
|
-
function
|
|
312
|
+
const B = b(() => M.value.filter((t) => !N.value.includes(t.id))), V = b(() => B.value.map((t) => Math.abs(t.value)).reduce((t, l) => t + l, 0));
|
|
313
|
+
function Qe(t, l = !1, a = 0) {
|
|
300
314
|
return l ? G({
|
|
301
|
-
v: L(Math.abs(t) /
|
|
315
|
+
v: L(Math.abs(t) / V.value * 100),
|
|
302
316
|
s: "%",
|
|
303
317
|
r: a
|
|
304
|
-
}) : Math.abs(t) /
|
|
318
|
+
}) : Math.abs(t) / V.value;
|
|
305
319
|
}
|
|
306
|
-
const
|
|
320
|
+
const R = b(() => B.value.flatMap((t) => t.hasChildren ? t.children : t)), E = b(() => R.value.map((t) => t.sign).includes(-1)), Lt = b(() => Math.max(...B.value.flatMap((t) => t.children && t.children.length ? Math.max(...t.children.map((l) => l.value)) : t.value)));
|
|
307
321
|
function T(t) {
|
|
308
|
-
const l = t /
|
|
309
|
-
return r.value.width / (
|
|
322
|
+
const l = t / Lt.value;
|
|
323
|
+
return r.value.width / (E.value ? 2 : 1) * l;
|
|
310
324
|
}
|
|
311
|
-
function
|
|
325
|
+
function Pt(t) {
|
|
312
326
|
return T(t) + r.value.left;
|
|
313
327
|
}
|
|
314
328
|
function te(t, l) {
|
|
@@ -317,7 +331,7 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
317
331
|
y: o + f / 2 - e.value.style.chart.layout.bars.parentLabels.fontSize,
|
|
318
332
|
name: a.name,
|
|
319
333
|
value: [void 0, NaN, null].includes(a.value) ? "" : a.sign === 1 ? a.value : -a.value,
|
|
320
|
-
percentageToTotal: isNaN(a.value /
|
|
334
|
+
percentageToTotal: isNaN(a.value / V.value) ? "" : Qe(a.value, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),
|
|
321
335
|
sign: a.sign
|
|
322
336
|
};
|
|
323
337
|
}
|
|
@@ -325,33 +339,33 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
325
339
|
return B.value;
|
|
326
340
|
}
|
|
327
341
|
const we = i(null), $e = i(null);
|
|
328
|
-
function
|
|
342
|
+
function At({ datapoint: t, seriesIndex: l }) {
|
|
329
343
|
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: l });
|
|
330
344
|
}
|
|
331
|
-
function
|
|
332
|
-
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: l }),
|
|
345
|
+
function zt({ datapoint: t, seriesIndex: l }) {
|
|
346
|
+
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: l }), xt.value = null, he.value = !1, we.value = null;
|
|
333
347
|
}
|
|
334
|
-
function
|
|
348
|
+
function Vt(t, l) {
|
|
335
349
|
e.value.events.datapointEnter && e.value.events.datapointEnter({ datpoint: t, seriesIndex: l }), $e.value = {
|
|
336
350
|
datapoint: t,
|
|
337
351
|
seriesIndex: l,
|
|
338
|
-
series:
|
|
352
|
+
series: M.value,
|
|
339
353
|
config: e.value
|
|
340
354
|
}, he.value = !0, we.value = t.id;
|
|
341
355
|
let a = "";
|
|
342
356
|
const o = t.isChild ? t.parentName : t.name, f = t.isChild ? t.name : "", _ = e.value.style.chart.tooltip.customFormat;
|
|
343
|
-
|
|
357
|
+
ea(_) && ta(() => _({
|
|
344
358
|
datapoint: t,
|
|
345
|
-
series:
|
|
359
|
+
series: M.value,
|
|
346
360
|
config: e.value,
|
|
347
361
|
seriesIndex: l
|
|
348
362
|
})) ? pe.value = _({
|
|
349
363
|
datapoint: t,
|
|
350
|
-
series:
|
|
364
|
+
series: M.value,
|
|
351
365
|
config: e.value,
|
|
352
366
|
seriesIndex: l
|
|
353
367
|
}) : (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;">
|
|
354
|
-
<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}"/>${
|
|
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}"/>${mt.pattern ? `<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${S.value}_${t.absoluteIndex})"/>` : ""}</svg> ${o}</div>
|
|
355
369
|
${f ? `<div>${f}</div>` : ""}
|
|
356
370
|
</div>`, e.value.style.chart.tooltip.showValue && (a += `<div>${e.value.translations.value}: <b>${de(
|
|
357
371
|
e.value.style.chart.layout.bars.dataLabels.value.formatter,
|
|
@@ -364,7 +378,7 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
364
378
|
}),
|
|
365
379
|
{ datapoint: t, seriesIndex: l }
|
|
366
380
|
)}</b></div>`), e.value.style.chart.tooltip.showPercentage && (a += `<div>${e.value.translations.percentageToTotal} : <b>${G({
|
|
367
|
-
v: Math.abs(t.value) /
|
|
381
|
+
v: Math.abs(t.value) / V.value * 100,
|
|
368
382
|
s: "%",
|
|
369
383
|
r: e.value.style.chart.tooltip.roundingPercentage
|
|
370
384
|
})}</b></div>`, t.isChild && (a += `<div>${e.value.translations.percentageToSerie}: <b>${G({
|
|
@@ -373,7 +387,7 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
373
387
|
r: e.value.style.chart.tooltip.roundingPercentage
|
|
374
388
|
})}</b></div>`)), pe.value = `<div style="text-align:left">${a}</div>`);
|
|
375
389
|
}
|
|
376
|
-
function
|
|
390
|
+
function Ze(t, l, a, o) {
|
|
377
391
|
if (!e.value.style.chart.layout.bars.dataLabels.value.show)
|
|
378
392
|
return "";
|
|
379
393
|
const f = de(
|
|
@@ -386,7 +400,7 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
386
400
|
r: e.value.style.chart.layout.bars.dataLabels.value.roundingValue
|
|
387
401
|
}),
|
|
388
402
|
{ datapoint: l, seriesIndex: a }
|
|
389
|
-
), _ = `(${
|
|
403
|
+
), _ = `(${Qe(t, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;
|
|
390
404
|
return `${f}${e.value.style.chart.layout.bars.dataLabels.percentage.show ? ` ${_}` : ""}`;
|
|
391
405
|
}
|
|
392
406
|
const A = b(() => {
|
|
@@ -398,15 +412,15 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
398
412
|
e.value.translations.value,
|
|
399
413
|
e.value.translations.percentageToSerie,
|
|
400
414
|
e.value.translations.percentageToTotal
|
|
401
|
-
], l =
|
|
415
|
+
], l = R.value.map((a) => a.isChild ? a.isFirstChild ? {
|
|
402
416
|
color: a.color,
|
|
403
417
|
parentName: a.parentName,
|
|
404
418
|
parentValue: a.parentValue,
|
|
405
|
-
percentageToTotal: a.parentValue /
|
|
419
|
+
percentageToTotal: a.parentValue / V.value,
|
|
406
420
|
childName: a.name,
|
|
407
421
|
childValue: a.sign === 1 ? a.value : -a.value,
|
|
408
422
|
childPercentageToParent: Math.abs(a.value) / Math.abs(a.parentValue),
|
|
409
|
-
childPercentageToTotal: Math.abs(a.value) /
|
|
423
|
+
childPercentageToTotal: Math.abs(a.value) / V.value
|
|
410
424
|
} : {
|
|
411
425
|
color: "",
|
|
412
426
|
parentName: "",
|
|
@@ -415,12 +429,12 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
415
429
|
childName: a.name,
|
|
416
430
|
childValue: a.sign === 1 ? a.value : -a.value,
|
|
417
431
|
childPercentageToParent: Math.abs(a.value) / Math.abs(a.parentValue),
|
|
418
|
-
childPercentageToTotal: Math.abs(a.value) /
|
|
432
|
+
childPercentageToTotal: Math.abs(a.value) / V.value
|
|
419
433
|
} : {
|
|
420
434
|
color: a.color,
|
|
421
435
|
parentName: a.name,
|
|
422
436
|
parentValue: a.sign === 1 ? a.value : -a.value,
|
|
423
|
-
percentageToTotal: Math.abs(a.value) /
|
|
437
|
+
percentageToTotal: Math.abs(a.value) / V.value,
|
|
424
438
|
childName: "",
|
|
425
439
|
childValue: "",
|
|
426
440
|
childPercentageToParent: "",
|
|
@@ -428,7 +442,7 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
428
442
|
});
|
|
429
443
|
return { head: t, body: l };
|
|
430
444
|
});
|
|
431
|
-
function
|
|
445
|
+
function et(t = null) {
|
|
432
446
|
const l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], a = A.value.head, o = A.value.body.map((d) => [
|
|
433
447
|
d.parentName,
|
|
434
448
|
d.parentValue,
|
|
@@ -437,45 +451,45 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
437
451
|
d.childValue,
|
|
438
452
|
d.childPercentageToParent,
|
|
439
453
|
d.childPercentageToTotal
|
|
440
|
-
]), f = l.concat([a]).concat(o), _ =
|
|
441
|
-
t ? t(_) :
|
|
454
|
+
]), f = l.concat([a]).concat(o), _ = Qt(f);
|
|
455
|
+
t ? t(_) : Zt({ csvContent: _, title: e.value.style.chart.title.text || "vue-ui-vertical-bar" });
|
|
442
456
|
}
|
|
443
|
-
const
|
|
444
|
-
function
|
|
445
|
-
|
|
457
|
+
const j = i(!1);
|
|
458
|
+
function tt(t) {
|
|
459
|
+
j.value = t, ze.value += 1;
|
|
446
460
|
}
|
|
447
|
-
function
|
|
461
|
+
function at() {
|
|
448
462
|
$.value.showTable = !$.value.showTable;
|
|
449
463
|
}
|
|
450
|
-
const
|
|
464
|
+
const It = i({
|
|
451
465
|
none: 0,
|
|
452
466
|
asc: 1,
|
|
453
467
|
desc: 2
|
|
454
|
-
}),
|
|
455
|
-
|
|
468
|
+
}), F = i(0), re = i(!1);
|
|
469
|
+
Te(() => {
|
|
456
470
|
["none", "asc", "desc"].includes(e.value.style.chart.layout.bars.sort) || oe({
|
|
457
471
|
componentName: "VueUiVerticalBar",
|
|
458
472
|
type: "attributeWrongValue",
|
|
459
473
|
property: "style.chart.layout.bars.sort",
|
|
460
474
|
key: e.value.style.chart.layout.bars.sort
|
|
461
|
-
}),
|
|
475
|
+
}), F.value = It.value[e.value.style.chart.layout.bars.sort], $.value.sortDesc = F.value === 2, re.value = F.value === 0;
|
|
462
476
|
});
|
|
463
|
-
function
|
|
464
|
-
|
|
477
|
+
function Ot() {
|
|
478
|
+
F.value += 1, F.value > 2 && (F.value = 0);
|
|
465
479
|
}
|
|
466
|
-
function
|
|
467
|
-
|
|
480
|
+
function lt() {
|
|
481
|
+
Ot(), $.value.sortDesc = F.value === 2, re.value = F.value === 0, H();
|
|
468
482
|
}
|
|
469
|
-
function
|
|
483
|
+
function ot() {
|
|
470
484
|
$.value.showTooltip = !$.value.showTooltip;
|
|
471
485
|
}
|
|
472
486
|
const ie = i(!1);
|
|
473
487
|
function Ce() {
|
|
474
488
|
ie.value = !ie.value;
|
|
475
489
|
}
|
|
476
|
-
async function
|
|
477
|
-
if (!
|
|
478
|
-
const { width: l, height: a } =
|
|
490
|
+
async function Mt({ scale: t = 2 } = {}) {
|
|
491
|
+
if (!z.value) return;
|
|
492
|
+
const { width: l, height: a } = z.value.getBoundingClientRect(), o = l / a, { imageUri: f, base64: _ } = await ia({ domElement: z.value, base64: !0, img: !0, scale: t });
|
|
479
493
|
return {
|
|
480
494
|
imageUri: f,
|
|
481
495
|
base64: _,
|
|
@@ -485,52 +499,52 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
485
499
|
aspectRatio: o
|
|
486
500
|
};
|
|
487
501
|
}
|
|
488
|
-
return
|
|
489
|
-
autoSize:
|
|
502
|
+
return dt({
|
|
503
|
+
autoSize: O,
|
|
490
504
|
// v3
|
|
491
505
|
getData: Nt,
|
|
492
|
-
getImage:
|
|
493
|
-
recalculateHeight:
|
|
494
|
-
generatePdf:
|
|
495
|
-
generateCsv:
|
|
496
|
-
generateImage:
|
|
497
|
-
toggleTable:
|
|
498
|
-
toggleSort:
|
|
499
|
-
toggleTooltip:
|
|
506
|
+
getImage: Mt,
|
|
507
|
+
recalculateHeight: H,
|
|
508
|
+
generatePdf: Xe,
|
|
509
|
+
generateCsv: et,
|
|
510
|
+
generateImage: Ue,
|
|
511
|
+
toggleTable: at,
|
|
512
|
+
toggleSort: lt,
|
|
513
|
+
toggleTooltip: ot,
|
|
500
514
|
toggleAnnotator: Ce,
|
|
501
|
-
toggleFullscreen:
|
|
515
|
+
toggleFullscreen: tt
|
|
502
516
|
}), (t, l) => (u(), v("div", {
|
|
503
|
-
class: D(`vue-ui-vertical-bar ${
|
|
517
|
+
class: D(`vue-ui-vertical-bar ${j.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"} ${e.value.responsive && e.value.autoSize ? "vue-ui-vertical-bar-autosize" : ""}`),
|
|
504
518
|
ref_key: "verticalBarChart",
|
|
505
|
-
ref:
|
|
519
|
+
ref: z,
|
|
506
520
|
id: `vue-ui-vertical-bar_${S.value}`,
|
|
507
521
|
style: h(`margin-top:${e.value.responsive && e.value.autoSize ? `${_e.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% - ${_e.value}px` : "height: 100%" : ""}`),
|
|
508
|
-
onMouseenter: l[4] || (l[4] = () => s(
|
|
509
|
-
onMouseleave: l[5] || (l[5] = () => s(
|
|
522
|
+
onMouseenter: l[4] || (l[4] = () => s(Fe)(!0)),
|
|
523
|
+
onMouseleave: l[5] || (l[5] = () => s(Fe)(!1))
|
|
510
524
|
}, [
|
|
511
|
-
e.value.userOptions.buttons.annotator ? (u(), X(s(
|
|
525
|
+
e.value.userOptions.buttons.annotator ? (u(), X(s(ft), {
|
|
512
526
|
key: 0,
|
|
513
|
-
svgRef: s(
|
|
527
|
+
svgRef: s(Re),
|
|
514
528
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
515
529
|
color: e.value.style.chart.color,
|
|
516
530
|
active: ie.value,
|
|
517
531
|
onClose: Ce
|
|
518
|
-
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) :
|
|
519
|
-
|
|
532
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : y("", !0),
|
|
533
|
+
$t.value ? (u(), v("div", {
|
|
520
534
|
key: 1,
|
|
521
535
|
ref_key: "noTitle",
|
|
522
|
-
ref:
|
|
536
|
+
ref: Oe,
|
|
523
537
|
class: "vue-data-ui-no-title-space",
|
|
524
538
|
style: "height:36px; width: 100%;background:transparent"
|
|
525
|
-
}, null, 512)) :
|
|
539
|
+
}, null, 512)) : y("", !0),
|
|
526
540
|
e.value.style.chart.title.text ? (u(), v("div", {
|
|
527
541
|
key: 2,
|
|
528
542
|
ref_key: "chartTitle",
|
|
529
|
-
ref:
|
|
543
|
+
ref: Ve,
|
|
530
544
|
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
531
545
|
}, [
|
|
532
|
-
(u(), X(
|
|
533
|
-
key: `title_${
|
|
546
|
+
(u(), X(ra, {
|
|
547
|
+
key: `title_${Me.value}`,
|
|
534
548
|
config: {
|
|
535
549
|
title: {
|
|
536
550
|
cy: "vertical-bar-div-title",
|
|
@@ -542,14 +556,14 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
542
556
|
}
|
|
543
557
|
}
|
|
544
558
|
}, null, 8, ["config"]))
|
|
545
|
-
], 512)) :
|
|
546
|
-
e.value.userOptions.show && ce.value && (s(
|
|
559
|
+
], 512)) : y("", !0),
|
|
560
|
+
e.value.userOptions.show && ce.value && (s(Be) || s(ke)) ? (u(), X(s(gt), {
|
|
547
561
|
ref_key: "details",
|
|
548
|
-
ref:
|
|
549
|
-
key: `user_options_${
|
|
562
|
+
ref: kt,
|
|
563
|
+
key: `user_options_${ze.value}`,
|
|
550
564
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
551
565
|
color: e.value.style.chart.color,
|
|
552
|
-
isImaging: s(
|
|
566
|
+
isImaging: s(De),
|
|
553
567
|
isPrinting: s(Ee),
|
|
554
568
|
uid: S.value,
|
|
555
569
|
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
@@ -559,31 +573,31 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
559
573
|
hasTable: e.value.userOptions.buttons.table,
|
|
560
574
|
hasSort: e.value.userOptions.buttons.sort,
|
|
561
575
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
562
|
-
isFullscreen:
|
|
576
|
+
isFullscreen: j.value,
|
|
563
577
|
isTooltip: $.value.showTooltip,
|
|
564
578
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
565
|
-
chartElement:
|
|
579
|
+
chartElement: z.value,
|
|
566
580
|
position: e.value.userOptions.position,
|
|
567
581
|
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
568
582
|
isAnnotation: ie.value,
|
|
569
583
|
callbacks: e.value.userOptions.callbacks,
|
|
570
584
|
printScale: e.value.userOptions.print.scale,
|
|
571
|
-
onToggleFullscreen:
|
|
572
|
-
onGeneratePdf: s(
|
|
573
|
-
onGenerateCsv:
|
|
574
|
-
onGenerateImage: s(
|
|
575
|
-
onToggleTable:
|
|
576
|
-
onToggleSort:
|
|
577
|
-
onToggleTooltip:
|
|
585
|
+
onToggleFullscreen: tt,
|
|
586
|
+
onGeneratePdf: s(Xe),
|
|
587
|
+
onGenerateCsv: et,
|
|
588
|
+
onGenerateImage: s(Ue),
|
|
589
|
+
onToggleTable: at,
|
|
590
|
+
onToggleSort: lt,
|
|
591
|
+
onToggleTooltip: ot,
|
|
578
592
|
onToggleAnnotator: Ce,
|
|
579
593
|
style: h({
|
|
580
|
-
visibility: s(
|
|
594
|
+
visibility: s(Be) ? s(ke) ? "visible" : "hidden" : "visible"
|
|
581
595
|
})
|
|
582
|
-
},
|
|
596
|
+
}, Se({ _: 2 }, [
|
|
583
597
|
t.$slots.menuIcon ? {
|
|
584
598
|
name: "menuIcon",
|
|
585
599
|
fn: w(({ isOpen: a, color: o }) => [
|
|
586
|
-
x(t.$slots, "menuIcon",
|
|
600
|
+
x(t.$slots, "menuIcon", Y(K({ isOpen: a, color: o })), void 0, !0)
|
|
587
601
|
]),
|
|
588
602
|
key: "0"
|
|
589
603
|
} : void 0,
|
|
@@ -639,33 +653,33 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
639
653
|
t.$slots.optionFullscreen ? {
|
|
640
654
|
name: "optionFullscreen",
|
|
641
655
|
fn: w(({ toggleFullscreen: a, isFullscreen: o }) => [
|
|
642
|
-
x(t.$slots, "optionFullscreen",
|
|
656
|
+
x(t.$slots, "optionFullscreen", Y(K({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
|
|
643
657
|
]),
|
|
644
658
|
key: "8"
|
|
645
659
|
} : void 0,
|
|
646
660
|
t.$slots.optionAnnotator ? {
|
|
647
661
|
name: "optionAnnotator",
|
|
648
662
|
fn: w(({ toggleAnnotator: a, isAnnotator: o }) => [
|
|
649
|
-
x(t.$slots, "optionAnnotator",
|
|
663
|
+
x(t.$slots, "optionAnnotator", Y(K({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
|
|
650
664
|
]),
|
|
651
665
|
key: "9"
|
|
652
666
|
} : void 0
|
|
653
|
-
]), 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"])) :
|
|
667
|
+
]), 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"])) : y("", !0),
|
|
654
668
|
e.value.style.chart.legend.show && e.value.style.chart.legend.position === "top" ? (u(), v("div", {
|
|
655
669
|
key: 4,
|
|
656
670
|
ref_key: "chartLegend",
|
|
657
671
|
ref: fe
|
|
658
672
|
}, [
|
|
659
|
-
(u(), X(
|
|
660
|
-
key: `legend_top_${
|
|
661
|
-
legendSet:
|
|
662
|
-
config:
|
|
673
|
+
(u(), X(rt, {
|
|
674
|
+
key: `legend_top_${ye.value}`,
|
|
675
|
+
legendSet: M.value,
|
|
676
|
+
config: Ke.value,
|
|
663
677
|
onClickMarker: l[0] || (l[0] = ({ legend: a }) => ee(a.id))
|
|
664
|
-
},
|
|
678
|
+
}, Se({
|
|
665
679
|
item: w(({ legend: a, index: o }) => [
|
|
666
680
|
n("div", {
|
|
667
681
|
onClick: (f) => ee(a.id),
|
|
668
|
-
style: h(`opacity:${
|
|
682
|
+
style: h(`opacity:${N.value.includes(a.id) ? 0.5 : 1}`)
|
|
669
683
|
}, p(a.name) + ": " + p(s(de)(
|
|
670
684
|
e.value.style.chart.layout.bars.dataLabels.value.formatter,
|
|
671
685
|
a.value,
|
|
@@ -676,14 +690,14 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
676
690
|
r: e.value.style.chart.legend.roundingValue
|
|
677
691
|
}),
|
|
678
692
|
{ datapoint: a, seriesIndex: o }
|
|
679
|
-
)), 13,
|
|
693
|
+
)), 13, pa)
|
|
680
694
|
]),
|
|
681
695
|
_: 2
|
|
682
696
|
}, [
|
|
683
697
|
t.$slots.pattern ? {
|
|
684
698
|
name: "legend-pattern",
|
|
685
699
|
fn: w(({ legend: a, index: o }) => [
|
|
686
|
-
le(
|
|
700
|
+
le(it, {
|
|
687
701
|
shape: a.shape,
|
|
688
702
|
radius: 30,
|
|
689
703
|
stroke: "none",
|
|
@@ -694,12 +708,12 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
694
708
|
key: "0"
|
|
695
709
|
} : void 0
|
|
696
710
|
]), 1032, ["legendSet", "config"]))
|
|
697
|
-
], 512)) :
|
|
711
|
+
], 512)) : y("", !0),
|
|
698
712
|
(u(), v("svg", {
|
|
699
713
|
ref_key: "svgRef",
|
|
700
|
-
ref:
|
|
701
|
-
xmlns: s(
|
|
702
|
-
class: D({ "vue-data-ui-fullscreen--on":
|
|
714
|
+
ref: Re,
|
|
715
|
+
xmlns: s(Kt),
|
|
716
|
+
class: D({ "vue-data-ui-fullscreen--on": j.value, "vue-data-ui-fulscreen--off": !j.value }),
|
|
703
717
|
viewBox: ue.value,
|
|
704
718
|
style: h(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
705
719
|
}, [
|
|
@@ -708,20 +722,20 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
708
722
|
ref: ne,
|
|
709
723
|
class: "vue-data-ui-g"
|
|
710
724
|
}, [
|
|
711
|
-
le(s(
|
|
725
|
+
le(s(pt)),
|
|
712
726
|
t.$slots["chart-background"] ? (u(), v("foreignObject", {
|
|
713
727
|
key: 0,
|
|
714
|
-
x:
|
|
728
|
+
x: P.value.x,
|
|
715
729
|
y: 0,
|
|
716
|
-
width:
|
|
717
|
-
height:
|
|
730
|
+
width: P.value.width,
|
|
731
|
+
height: P.value.height,
|
|
718
732
|
style: {
|
|
719
733
|
pointerEvents: "none"
|
|
720
734
|
}
|
|
721
735
|
}, [
|
|
722
736
|
x(t.$slots, "chart-background", {}, void 0, !0)
|
|
723
|
-
], 8,
|
|
724
|
-
(u(!0), v(
|
|
737
|
+
], 8, ya)) : y("", !0),
|
|
738
|
+
(u(!0), v(J, null, Q(R.value, (a, o) => (u(), v("linearGradient", {
|
|
725
739
|
x1: "0%",
|
|
726
740
|
y1: "0%",
|
|
727
741
|
x2: "100%",
|
|
@@ -731,43 +745,43 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
731
745
|
n("stop", {
|
|
732
746
|
offset: "0%",
|
|
733
747
|
"stop-color": a.color
|
|
734
|
-
}, null, 8,
|
|
748
|
+
}, null, 8, ba),
|
|
735
749
|
n("stop", {
|
|
736
750
|
offset: "100%",
|
|
737
|
-
"stop-color": s(
|
|
738
|
-
}, null, 8,
|
|
751
|
+
"stop-color": s(Ae)(s(Jt)(a.color, 0.03), 100 - e.value.style.chart.layout.bars.gradientIntensity)
|
|
752
|
+
}, null, 8, ma)
|
|
739
753
|
], 8, ga))), 256)),
|
|
740
|
-
t.$slots.pattern ? (u(), v("g",
|
|
741
|
-
(u(!0), v(
|
|
742
|
-
x(t.$slots, "pattern",
|
|
754
|
+
t.$slots.pattern ? (u(), v("g", ka, [
|
|
755
|
+
(u(!0), v(J, null, Q(R.value, (a) => (u(), v("defs", null, [
|
|
756
|
+
x(t.$slots, "pattern", Dt({ ref_for: !0 }, { seriesIndex: a.absoluteIndex, patternId: `pattern_${S.value}_${a.absoluteIndex}` }), void 0, !0)
|
|
743
757
|
]))), 256))
|
|
744
|
-
])) :
|
|
745
|
-
(u(!0), v(
|
|
758
|
+
])) : y("", !0),
|
|
759
|
+
(u(!0), v(J, null, Q(R.value, (a, o) => (u(), v("g", null, [
|
|
746
760
|
n("rect", {
|
|
747
|
-
x: s(L)(
|
|
761
|
+
x: s(L)(E.value ? r.value.left + r.value.width / 2 - (a.sign === 1 ? 0 : T(a.value) <= 0 ? 1e-4 : T(a.value)) : r.value.left),
|
|
748
762
|
y: r.value.top + (m.value + c.value) * o,
|
|
749
763
|
width: s(L)(T(a.value) <= 0 ? 1e-4 : T(a.value)),
|
|
750
764
|
height: c.value <= 0 ? 1e-4 : c.value,
|
|
751
765
|
fill: e.value.style.chart.layout.bars.underlayerColor,
|
|
752
766
|
rx: e.value.style.chart.layout.bars.borderRadius,
|
|
753
767
|
class: D({ animated: e.value.useCssAnimation })
|
|
754
|
-
}, null, 10,
|
|
768
|
+
}, null, 10, xa)
|
|
755
769
|
]))), 256)),
|
|
756
|
-
(u(!0), v(
|
|
770
|
+
(u(!0), v(J, null, Q(R.value, (a, o) => (u(), v("g", null, [
|
|
757
771
|
n("rect", {
|
|
758
|
-
x: s(L)(
|
|
772
|
+
x: s(L)(E.value ? r.value.left + r.value.width / 2 - (a.sign === 1 ? 0 : T(a.value) <= 0 ? 1e-4 : T(a.value)) : r.value.left),
|
|
759
773
|
y: r.value.top + (m.value + c.value) * o,
|
|
760
774
|
width: s(L)(T(a.value) <= 0 ? 1e-4 : T(a.value)),
|
|
761
775
|
height: c.value <= 0 ? 1e-4 : c.value,
|
|
762
|
-
fill: e.value.style.chart.layout.bars.useGradient ? `url(#vertical_bar_gradient_${S.value}_${o})` : s(
|
|
776
|
+
fill: e.value.style.chart.layout.bars.useGradient ? `url(#vertical_bar_gradient_${S.value}_${o})` : s(Ae)(a.color, e.value.style.chart.layout.bars.fillOpacity),
|
|
763
777
|
rx: e.value.style.chart.layout.bars.borderRadius,
|
|
764
778
|
stroke: e.value.style.chart.layout.bars.useStroke ? a.color : "none",
|
|
765
779
|
"stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
|
|
766
780
|
class: D({ animated: e.value.useCssAnimation })
|
|
767
|
-
}, null, 10,
|
|
781
|
+
}, null, 10, _a),
|
|
768
782
|
t.$slots.pattern ? (u(), v("rect", {
|
|
769
783
|
key: 0,
|
|
770
|
-
x: s(L)(
|
|
784
|
+
x: s(L)(E.value ? r.value.left + r.value.width / 2 - (a.sign === 1 ? 0 : T(a.value) <= 0 ? 1e-4 : T(a.value)) : r.value.left),
|
|
771
785
|
y: r.value.top + (m.value + c.value) * o,
|
|
772
786
|
width: s(L)(T(a.value) <= 0 ? 1e-4 : T(a.value)),
|
|
773
787
|
height: c.value <= 0 ? 1e-4 : c.value,
|
|
@@ -776,19 +790,19 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
776
790
|
stroke: e.value.style.chart.layout.bars.useStroke ? a.color : "none",
|
|
777
791
|
"stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
|
|
778
792
|
class: D({ animated: e.value.useCssAnimation })
|
|
779
|
-
}, null, 10,
|
|
780
|
-
(!a.isChild || a.isLastChild) && e.value.style.chart.layout.separators.show && o !==
|
|
793
|
+
}, null, 10, wa)) : y("", !0),
|
|
794
|
+
(!a.isChild || a.isLastChild) && e.value.style.chart.layout.separators.show && o !== R.value.length - 1 ? (u(), v("line", {
|
|
781
795
|
key: 1,
|
|
782
|
-
x1:
|
|
783
|
-
x2: e.value.style.chart.layout.separators.fullWidth ?
|
|
796
|
+
x1: P.value.x,
|
|
797
|
+
x2: e.value.style.chart.layout.separators.fullWidth ? P.value.width - Math.abs(P.value.x) : r.value.left,
|
|
784
798
|
y1: c.value + m.value / 2 + r.value.top + (m.value + c.value) * o,
|
|
785
799
|
y2: c.value + m.value / 2 + r.value.top + (m.value + c.value) * o,
|
|
786
800
|
stroke: e.value.style.chart.layout.separators.color,
|
|
787
801
|
"stroke-width": e.value.style.chart.layout.separators.strokeWidth,
|
|
788
802
|
"stroke-linecap": "round",
|
|
789
803
|
style: { transition: "none !important", animation: "none !important" }
|
|
790
|
-
}, null, 8,
|
|
791
|
-
|
|
804
|
+
}, null, 8, $a)) : y("", !0),
|
|
805
|
+
E.value && e.value.style.chart.layout.separators.show ? (u(), v("line", {
|
|
792
806
|
key: 2,
|
|
793
807
|
x1: r.value.left + r.value.width / 2,
|
|
794
808
|
x2: r.value.left + r.value.width / 2,
|
|
@@ -797,16 +811,16 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
797
811
|
stroke: e.value.style.chart.layout.separators.color,
|
|
798
812
|
"stroke-width": e.value.style.chart.layout.separators.strokeWidth,
|
|
799
813
|
"stroke-linecap": "round"
|
|
800
|
-
}, null, 8,
|
|
801
|
-
n("g",
|
|
814
|
+
}, null, 8, Ca)) : y("", !0),
|
|
815
|
+
n("g", Ta, [
|
|
802
816
|
n("text", {
|
|
803
|
-
x:
|
|
817
|
+
x: E.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) : Pt(a.value) + 3 + e.value.style.chart.layout.bars.dataLabels.offsetX,
|
|
804
818
|
y: r.value.top + (m.value + c.value) * o + c.value / 2 + e.value.style.chart.layout.bars.dataLabels.fontSize / 2,
|
|
805
|
-
"text-anchor": !
|
|
819
|
+
"text-anchor": !E.value || a.sign === -1 ? "start" : "end",
|
|
806
820
|
"font-size": e.value.style.chart.layout.bars.dataLabels.fontSize,
|
|
807
821
|
fill: e.value.style.chart.layout.bars.dataLabels.color,
|
|
808
822
|
"font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal"
|
|
809
|
-
}, p(
|
|
823
|
+
}, p(Ze(a.value, a, o, a.sign)), 9, Sa),
|
|
810
824
|
(a.isChild || !a.hasChildren) && e.value.style.chart.layout.bars.nameLabels.show ? (u(), v("text", {
|
|
811
825
|
key: 0,
|
|
812
826
|
"text-anchor": "end",
|
|
@@ -815,60 +829,60 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
815
829
|
"font-size": e.value.style.chart.layout.bars.nameLabels.fontSize,
|
|
816
830
|
fill: e.value.style.chart.layout.bars.nameLabels.color,
|
|
817
831
|
"font-weight": e.value.style.chart.layout.bars.nameLabels.bold ? "bold" : "normal"
|
|
818
|
-
}, p(a.name), 9,
|
|
832
|
+
}, p(a.name), 9, La)) : y("", !0)
|
|
819
833
|
]),
|
|
820
|
-
n("g",
|
|
834
|
+
n("g", Pa, [
|
|
821
835
|
a.isChild && a.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (u(), v("text", {
|
|
822
836
|
key: 0,
|
|
823
|
-
x: e.value.autoSize ? void 0 :
|
|
837
|
+
x: e.value.autoSize ? void 0 : P.value.x + e.value.style.chart.layout.bars.parentLabels.offsetX,
|
|
824
838
|
y: te(a, o).y,
|
|
825
839
|
"font-size": e.value.style.chart.layout.bars.parentLabels.fontSize,
|
|
826
840
|
fill: e.value.style.chart.layout.bars.parentLabels.color,
|
|
827
841
|
"font-weight": e.value.style.chart.layout.bars.parentLabels.bold ? "bold" : "normal",
|
|
828
842
|
"text-anchor": "start"
|
|
829
|
-
}, p(te(a, o).name), 9, Na)) :
|
|
843
|
+
}, p(te(a, o).name), 9, Na)) : y("", !0),
|
|
830
844
|
a.isChild && a.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (u(), v("text", {
|
|
831
845
|
key: 1,
|
|
832
|
-
x: e.value.autoSize ? void 0 :
|
|
846
|
+
x: e.value.autoSize ? void 0 : P.value.x + e.value.style.chart.layout.bars.parentLabels.offsetX,
|
|
833
847
|
y: te(a, o).y + e.value.style.chart.layout.bars.parentLabels.fontSize + 6,
|
|
834
848
|
"font-size": e.value.style.chart.layout.bars.parentLabels.fontSize,
|
|
835
849
|
fill: e.value.style.chart.layout.bars.parentLabels.color,
|
|
836
850
|
"font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal",
|
|
837
851
|
"text-anchor": "start"
|
|
838
|
-
}, p(
|
|
852
|
+
}, p(Ze(te(a, o).value), te(a, o), o, a.parentSign || a.sign), 9, Aa)) : y("", !0)
|
|
839
853
|
]),
|
|
840
854
|
n("rect", {
|
|
841
|
-
x:
|
|
855
|
+
x: P.value.x,
|
|
842
856
|
y: r.value.top + (m.value + c.value) * o - m.value / 2,
|
|
843
|
-
width:
|
|
857
|
+
width: P.value.width,
|
|
844
858
|
height: c.value + m.value <= 0 ? 1e-4 : c.value + m.value,
|
|
845
|
-
fill: we.value === a.id ? s(
|
|
846
|
-
onMouseenter: (f) =>
|
|
847
|
-
onMouseleave: (f) =>
|
|
848
|
-
onClick: (f) =>
|
|
849
|
-
}, null, 40,
|
|
859
|
+
fill: we.value === a.id ? s(Ae)(e.value.style.chart.layout.highlighter.color, e.value.style.chart.layout.highlighter.opacity) : "transparent",
|
|
860
|
+
onMouseenter: (f) => Vt(a, o),
|
|
861
|
+
onMouseleave: (f) => zt({ datapoint: a, seriesIndex: o }),
|
|
862
|
+
onClick: (f) => At({ datapoint: a, seriesIndex: o })
|
|
863
|
+
}, null, 40, za)
|
|
850
864
|
]))), 256)),
|
|
851
|
-
x(t.$slots, "svg", { svg:
|
|
865
|
+
x(t.$slots, "svg", { svg: P.value }, void 0, !0)
|
|
852
866
|
], 512)
|
|
853
|
-
], 14,
|
|
854
|
-
t.$slots.watermark ? (u(), v("div",
|
|
855
|
-
x(t.$slots, "watermark",
|
|
856
|
-
])) :
|
|
867
|
+
], 14, fa)),
|
|
868
|
+
t.$slots.watermark ? (u(), v("div", Va, [
|
|
869
|
+
x(t.$slots, "watermark", Y(K({ isPrinting: s(Ee) || s(De) })), void 0, !0)
|
|
870
|
+
])) : y("", !0),
|
|
857
871
|
e.value.style.chart.legend.show && e.value.style.chart.legend.position === "bottom" ? (u(), v("div", {
|
|
858
872
|
key: 6,
|
|
859
873
|
ref_key: "chartLegend",
|
|
860
874
|
ref: fe
|
|
861
875
|
}, [
|
|
862
|
-
(u(), X(
|
|
863
|
-
key: `legend_bottom_${
|
|
864
|
-
legendSet:
|
|
865
|
-
config:
|
|
876
|
+
(u(), X(rt, {
|
|
877
|
+
key: `legend_bottom_${ye.value}`,
|
|
878
|
+
legendSet: M.value,
|
|
879
|
+
config: Ke.value,
|
|
866
880
|
onClickMarker: l[1] || (l[1] = ({ legend: a }) => ee(a.id))
|
|
867
|
-
},
|
|
881
|
+
}, Se({
|
|
868
882
|
item: w(({ legend: a, index: o }) => [
|
|
869
883
|
n("div", {
|
|
870
884
|
onClick: (f) => ee(a.id),
|
|
871
|
-
style: h(`opacity:${
|
|
885
|
+
style: h(`opacity:${N.value.includes(a.id) ? 0.5 : 1}`)
|
|
872
886
|
}, p(a.name) + ": " + p(s(de)(
|
|
873
887
|
e.value.style.chart.layout.bars.dataLabels.value.formatter,
|
|
874
888
|
a.value,
|
|
@@ -879,14 +893,14 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
879
893
|
r: e.value.style.chart.legend.roundingValue
|
|
880
894
|
}),
|
|
881
895
|
{ datapoint: a, seriesIndex: o }
|
|
882
|
-
)), 13,
|
|
896
|
+
)), 13, Ia)
|
|
883
897
|
]),
|
|
884
898
|
_: 2
|
|
885
899
|
}, [
|
|
886
900
|
t.$slots.pattern ? {
|
|
887
901
|
name: "legend-pattern",
|
|
888
902
|
fn: w(({ legend: a, index: o }) => [
|
|
889
|
-
le(
|
|
903
|
+
le(it, {
|
|
890
904
|
shape: a.shape,
|
|
891
905
|
radius: 30,
|
|
892
906
|
stroke: "none",
|
|
@@ -897,18 +911,18 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
897
911
|
key: "0"
|
|
898
912
|
} : void 0
|
|
899
913
|
]), 1032, ["legendSet", "config"]))
|
|
900
|
-
], 512)) :
|
|
901
|
-
x(t.$slots, "legend", { legend:
|
|
914
|
+
], 512)) : y("", !0),
|
|
915
|
+
x(t.$slots, "legend", { legend: M.value }, void 0, !0),
|
|
902
916
|
t.$slots.source ? (u(), v("div", {
|
|
903
917
|
key: 7,
|
|
904
918
|
ref_key: "source",
|
|
905
|
-
ref:
|
|
919
|
+
ref: Ie,
|
|
906
920
|
dir: "auto"
|
|
907
921
|
}, [
|
|
908
922
|
x(t.$slots, "source", {}, void 0, !0)
|
|
909
|
-
], 512)) :
|
|
910
|
-
le(s(
|
|
911
|
-
show: $.value.showTooltip && he.value &&
|
|
923
|
+
], 512)) : y("", !0),
|
|
924
|
+
le(s(yt), {
|
|
925
|
+
show: $.value.showTooltip && he.value && N.value.length < g.dataset.length,
|
|
912
926
|
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
913
927
|
color: e.value.style.chart.tooltip.color,
|
|
914
928
|
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
@@ -918,20 +932,20 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
918
932
|
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
919
933
|
position: e.value.style.chart.tooltip.position,
|
|
920
934
|
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
921
|
-
parent:
|
|
935
|
+
parent: z.value,
|
|
922
936
|
content: pe.value,
|
|
923
|
-
isFullscreen:
|
|
937
|
+
isFullscreen: j.value,
|
|
924
938
|
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
|
|
925
939
|
}, {
|
|
926
940
|
"tooltip-before": w(() => [
|
|
927
|
-
x(t.$slots, "tooltip-before",
|
|
941
|
+
x(t.$slots, "tooltip-before", Y(K({ ...$e.value })), void 0, !0)
|
|
928
942
|
]),
|
|
929
943
|
"tooltip-after": w(() => [
|
|
930
|
-
x(t.$slots, "tooltip-after",
|
|
944
|
+
x(t.$slots, "tooltip-after", Y(K({ ...$e.value })), void 0, !0)
|
|
931
945
|
]),
|
|
932
946
|
_: 3
|
|
933
947
|
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
|
|
934
|
-
ce.value ? (u(), X(
|
|
948
|
+
ce.value ? (u(), X(sa, {
|
|
935
949
|
key: 8,
|
|
936
950
|
hideDetails: "",
|
|
937
951
|
config: {
|
|
@@ -950,18 +964,18 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
950
964
|
content: w(() => [
|
|
951
965
|
n("div", {
|
|
952
966
|
ref_key: "tableContainer",
|
|
953
|
-
ref:
|
|
967
|
+
ref: We,
|
|
954
968
|
class: "vue-ui-vertical-bar-table atom-data-table"
|
|
955
969
|
}, [
|
|
956
|
-
n("div",
|
|
970
|
+
n("div", Oa, [
|
|
957
971
|
n("div", {
|
|
958
972
|
role: "button",
|
|
959
973
|
tabindex: "0",
|
|
960
974
|
style: h(`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};`),
|
|
961
975
|
onClick: l[2] || (l[2] = (a) => $.value.showTable = !1),
|
|
962
|
-
onKeypress: l[3] || (l[3] =
|
|
976
|
+
onKeypress: l[3] || (l[3] = Xt((a) => $.value.showTable = !1, ["enter"]))
|
|
963
977
|
}, [
|
|
964
|
-
le(s(
|
|
978
|
+
le(s(ht), {
|
|
965
979
|
name: "close",
|
|
966
980
|
stroke: e.value.table.th.color,
|
|
967
981
|
"stroke-width": 2
|
|
@@ -969,25 +983,25 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
969
983
|
], 36),
|
|
970
984
|
n("div", {
|
|
971
985
|
style: { width: "100%", "container-type": "inline-size" },
|
|
972
|
-
class: D({ "vue-ui-responsive":
|
|
986
|
+
class: D({ "vue-ui-responsive": He.value })
|
|
973
987
|
}, [
|
|
974
|
-
n("table",
|
|
988
|
+
n("table", Ma, [
|
|
975
989
|
n("caption", {
|
|
976
990
|
style: h({ backgroundColor: e.value.table.th.backgroundColor, color: e.value.table.th.color, outline: e.value.table.th.outline }),
|
|
977
991
|
class: "vue-ui-data-table__caption"
|
|
978
992
|
}, [
|
|
979
|
-
|
|
980
|
-
e.value.style.chart.title.subtitle.text ? (u(), v("span",
|
|
993
|
+
Ut(p(e.value.style.chart.title.text) + " ", 1),
|
|
994
|
+
e.value.style.chart.title.subtitle.text ? (u(), v("span", Fa, p(e.value.style.chart.title.subtitle.text), 1)) : y("", !0)
|
|
981
995
|
], 4),
|
|
982
996
|
n("thead", null, [
|
|
983
997
|
n("tr", {
|
|
984
998
|
role: "row",
|
|
985
999
|
style: h(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
|
|
986
1000
|
}, [
|
|
987
|
-
(u(!0), v(
|
|
1001
|
+
(u(!0), v(J, null, Q(A.value.head, (a) => (u(), v("th", {
|
|
988
1002
|
style: h(`outline:${e.value.table.th.outline}`)
|
|
989
1003
|
}, [
|
|
990
|
-
n("div",
|
|
1004
|
+
n("div", Ba, p(a), 1)
|
|
991
1005
|
], 4))), 256))
|
|
992
1006
|
], 4),
|
|
993
1007
|
n("tr", null, [
|
|
@@ -996,7 +1010,7 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
996
1010
|
}, null, 4),
|
|
997
1011
|
n("th", {
|
|
998
1012
|
style: h(`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`)
|
|
999
|
-
}, "∑ " + p(e.value.table.td.prefix) + p(isNaN(
|
|
1013
|
+
}, "∑ " + p(e.value.table.td.prefix) + p(isNaN(V.value) ? "" : V.value.toFixed(e.value.table.td.roundingValue)) + p(e.value.table.td.suffix), 5),
|
|
1000
1014
|
n("th", {
|
|
1001
1015
|
style: h(`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`)
|
|
1002
1016
|
}, "100%", 4),
|
|
@@ -1015,7 +1029,7 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
1015
1029
|
])
|
|
1016
1030
|
]),
|
|
1017
1031
|
n("tbody", null, [
|
|
1018
|
-
(u(!0), v(
|
|
1032
|
+
(u(!0), v(J, null, Q(A.value.body, (a, o) => (u(), v("tr", {
|
|
1019
1033
|
class: D({ "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 }),
|
|
1020
1034
|
style: h(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
|
|
1021
1035
|
}, [
|
|
@@ -1028,52 +1042,52 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
1028
1042
|
a.color ? (u(), v("span", {
|
|
1029
1043
|
key: 0,
|
|
1030
1044
|
style: h(`color:${a.color};margin-right:3px`)
|
|
1031
|
-
}, "⬤", 4)) :
|
|
1045
|
+
}, "⬤", 4)) : y("", !0),
|
|
1032
1046
|
n("span", null, p(a.parentName), 1)
|
|
1033
1047
|
])
|
|
1034
|
-
], 12,
|
|
1048
|
+
], 12, Ra),
|
|
1035
1049
|
n("td", {
|
|
1036
1050
|
class: "vue-ui-data-table__tbody__td",
|
|
1037
1051
|
style: h(`outline:${e.value.table.td.outline}`),
|
|
1038
1052
|
"data-cell": A.value.head[1] ?? ""
|
|
1039
1053
|
}, [
|
|
1040
|
-
n("div",
|
|
1041
|
-
], 12,
|
|
1054
|
+
n("div", Xa, p(e.value.table.td.prefix) + p(["", NaN, void 0].includes(a.parentValue) ? "" : a.parentValue.toFixed(e.value.table.td.roundingValue)) + p(e.value.table.td.suffix), 1)
|
|
1055
|
+
], 12, Da),
|
|
1042
1056
|
n("td", {
|
|
1043
1057
|
class: "vue-ui-data-table__tbody__td",
|
|
1044
1058
|
style: h(`outline:${e.value.table.td.outline}`),
|
|
1045
1059
|
"data-cell": A.value.head[2] ?? ""
|
|
1046
1060
|
}, [
|
|
1047
|
-
n("div",
|
|
1048
|
-
], 12,
|
|
1061
|
+
n("div", Ga, p(["", NaN, void 0].includes(a.percentageToTotal) ? "" : `${(a.percentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
|
|
1062
|
+
], 12, Ua),
|
|
1049
1063
|
n("td", {
|
|
1050
1064
|
class: "vue-ui-data-table__tbody__td",
|
|
1051
1065
|
style: h(`outline:${e.value.table.td.outline}`),
|
|
1052
1066
|
"data-cell": A.value.head[3] ?? ""
|
|
1053
1067
|
}, [
|
|
1054
|
-
n("div",
|
|
1055
|
-
], 12,
|
|
1068
|
+
n("div", Ha, p(a.childName), 1)
|
|
1069
|
+
], 12, Wa),
|
|
1056
1070
|
n("td", {
|
|
1057
1071
|
class: "vue-ui-data-table__tbody__td",
|
|
1058
1072
|
style: h(`outline:${e.value.table.td.outline}`),
|
|
1059
1073
|
"data-cell": A.value.head[4] ?? ""
|
|
1060
1074
|
}, [
|
|
1061
|
-
n("div",
|
|
1062
|
-
], 12,
|
|
1075
|
+
n("div", qa, p(e.value.table.td.prefix) + p(["", NaN, void 0].includes(a.childValue) ? "" : a.childValue.toFixed(e.value.table.td.roundingValue)) + p(e.value.table.td.suffix), 1)
|
|
1076
|
+
], 12, ja),
|
|
1063
1077
|
n("td", {
|
|
1064
1078
|
class: "vue-ui-data-table__tbody__td",
|
|
1065
1079
|
style: h(`outline:${e.value.table.td.outline}`),
|
|
1066
1080
|
"data-cell": A.value.head[5] ?? ""
|
|
1067
1081
|
}, [
|
|
1068
|
-
n("div",
|
|
1069
|
-
], 12,
|
|
1082
|
+
n("div", Ka, p(["", NaN, void 0].includes(a.childPercentageToParent) ? "" : `${(a.childPercentageToParent * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
|
|
1083
|
+
], 12, Ya),
|
|
1070
1084
|
n("td", {
|
|
1071
1085
|
class: "vue-ui-data-table__tbody__td",
|
|
1072
1086
|
style: h(`outline:${e.value.table.td.outline}`),
|
|
1073
1087
|
"data-cell": A.value.head[6] ?? ""
|
|
1074
1088
|
}, [
|
|
1075
|
-
n("div",
|
|
1076
|
-
], 12,
|
|
1089
|
+
n("div", Qa, p(["", NaN, void 0].includes(a.childPercentageToTotal) ? "" : `${(a.childPercentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
|
|
1090
|
+
], 12, Ja)
|
|
1077
1091
|
], 6))), 256))
|
|
1078
1092
|
])
|
|
1079
1093
|
])
|
|
@@ -1082,11 +1096,11 @@ const ca = ["id"], ha = ["onClick"], pa = ["xmlns", "viewBox"], fa = ["x", "widt
|
|
|
1082
1096
|
], 512)
|
|
1083
1097
|
]),
|
|
1084
1098
|
_: 1
|
|
1085
|
-
}, 8, ["config"])) :
|
|
1086
|
-
s(
|
|
1087
|
-
], 46,
|
|
1099
|
+
}, 8, ["config"])) : y("", !0),
|
|
1100
|
+
s(ge) ? (u(), X(da, { key: 9 })) : y("", !0)
|
|
1101
|
+
], 46, ha));
|
|
1088
1102
|
}
|
|
1089
|
-
},
|
|
1103
|
+
}, pl = /* @__PURE__ */ ca(Za, [["__scopeId", "data-v-a356d4a4"]]);
|
|
1090
1104
|
export {
|
|
1091
|
-
|
|
1105
|
+
pl as default
|
|
1092
1106
|
};
|