vue-data-ui 2.3.3 → 2.3.4
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-B6gJebT9.js +101 -0
- package/dist/Arrow-C5yj6zwY.cjs +1 -0
- package/dist/BaseIcon-7_g11dRj.js +174 -0
- package/dist/BaseIcon-JtWoVorZ.cjs +1 -0
- package/dist/DataTable-CwaOlAsy.js +127 -0
- package/dist/DataTable-Rm9II-m2.cjs +1 -0
- package/dist/Legend-CxvJTjEm.js +62 -0
- package/dist/Legend-D59FIuMs.cjs +1 -0
- package/dist/Shape-CVItL3vh.cjs +1 -0
- package/dist/Shape-CjLV0scA.js +107 -0
- package/dist/Slicer-Bxg5niHl.js +156 -0
- package/dist/Slicer-Cdss5Rus.cjs +1 -0
- package/dist/Title-2iks1ziC.js +46 -0
- package/dist/Title-Bb-A5OSV.cjs +1 -0
- package/dist/Tooltip-C3phqKuU.js +94 -0
- package/dist/Tooltip-C_UE6y-E.cjs +1 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
- package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
- package/dist/index-p5gfZSvB.cjs +4 -0
- package/dist/index-uOtklCCx.js +10268 -0
- package/dist/{index.es-ypwniJN8.js → index.es-YufTdp0y.js} +1 -1
- package/dist/{index.es-Dnua3tHc.cjs → index.es-uyeSCnWE.cjs} +1 -1
- package/dist/jspdf.es.min-C660YX78.js +8038 -0
- package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
- package/dist/pdf-97UbtKC2.js +44 -0
- package/dist/pdf-Cz3729tZ.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/useNestedProp-2kIU-7On.cjs +1 -0
- package/dist/useNestedProp-BgWkUab_.js +13 -0
- package/dist/usePrinter-B6xQCyL-.js +464 -0
- package/dist/usePrinter-fZlsJid8.cjs +1 -0
- package/dist/useResponsive-B3TrDDIG.cjs +1 -0
- package/dist/useResponsive-NZB-WLRF.js +187 -0
- package/dist/vue-data-ui-Be0rgmbA.cjs +9 -0
- package/dist/vue-data-ui-Ccy6rBZN.js +246 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +62 -61
- package/dist/vue-ui-3d-bar-BKMPFDi2.js +1085 -0
- package/dist/vue-ui-3d-bar-CKa4UXq4.cjs +19 -0
- package/dist/vue-ui-accordion-C_pwrAJl.cjs +1 -0
- package/dist/vue-ui-accordion-HJPf7My0.js +77 -0
- package/dist/vue-ui-age-pyramid-CE1xnA-8.cjs +1 -0
- package/dist/vue-ui-age-pyramid-DB_CL-gu.js +596 -0
- package/dist/vue-ui-annotator-BAMZcPlH.cjs +371 -0
- package/dist/vue-ui-annotator-DQsAL-nZ.js +2177 -0
- package/dist/vue-ui-candlestick-DCl8fpNu.js +657 -0
- package/dist/vue-ui-candlestick-Duv6oG79.cjs +2 -0
- package/dist/vue-ui-chestnut-BYHA6MT4.js +1051 -0
- package/dist/vue-ui-chestnut-mIZ4-ZEM.cjs +6 -0
- package/dist/vue-ui-cursor-C96IChA3.js +229 -0
- package/dist/vue-ui-cursor-De7dy4Mo.cjs +1 -0
- package/dist/vue-ui-dashboard-B2Yz41yO.js +232 -0
- package/dist/vue-ui-dashboard-BMGwKr0K.cjs +1 -0
- package/dist/vue-ui-digits-BnxLp7zQ.js +153 -0
- package/dist/vue-ui-digits-DSWyL-5K.cjs +1 -0
- package/dist/vue-ui-donut-1kei9ws5.cjs +1 -0
- package/dist/vue-ui-donut-B9iXisHK.js +743 -0
- package/dist/vue-ui-donut-evolution-B7Sun8sw.js +799 -0
- package/dist/vue-ui-donut-evolution-yv17DnGy.cjs +1 -0
- package/dist/vue-ui-dumbbell-BJEf_JEq.cjs +9 -0
- package/dist/vue-ui-dumbbell-DIsDnD1d.js +624 -0
- package/dist/vue-ui-flow-BTivYoGd.js +454 -0
- package/dist/vue-ui-flow-DOxJa8di.cjs +1 -0
- package/dist/vue-ui-galaxy-BEmywfFB.js +485 -0
- package/dist/vue-ui-galaxy-CHGOwCwM.cjs +1 -0
- package/dist/vue-ui-gauge-QAfMl-8t.cjs +1 -0
- package/dist/vue-ui-gauge-o4rDOqF3.js +466 -0
- package/dist/vue-ui-heatmap-BS4EzedX.cjs +1 -0
- package/dist/vue-ui-heatmap-DwqQqEsk.js +598 -0
- package/dist/vue-ui-kpi-F4qkJ_U-.cjs +1 -0
- package/dist/vue-ui-kpi-h8elYTcA.js +54 -0
- package/dist/vue-ui-mini-loader-C_8B2Pm6.cjs +1 -0
- package/dist/vue-ui-mini-loader-Cgoi9rhH.js +131 -0
- package/dist/vue-ui-molecule-Bmv76SWz.js +750 -0
- package/dist/vue-ui-molecule-C5CY_YYc.cjs +1 -0
- package/dist/vue-ui-mood-radar-BN0dzlfp.cjs +1 -0
- package/dist/vue-ui-mood-radar-DeMouUIe.js +548 -0
- package/dist/vue-ui-nested-donuts-ZyFoV-Zn.cjs +16 -0
- package/dist/vue-ui-nested-donuts-wOUkSVyZ.js +771 -0
- package/dist/vue-ui-onion-DCOKG2wG.js +554 -0
- package/dist/vue-ui-onion-VmTUo7TR.cjs +1 -0
- package/dist/vue-ui-parallel-coordinate-plot-BGtO2P4a.js +651 -0
- package/dist/vue-ui-parallel-coordinate-plot-BziXRF8E.cjs +8 -0
- package/dist/vue-ui-quadrant--JOTjPZh.js +1178 -0
- package/dist/vue-ui-quadrant-DawUUrur.cjs +1 -0
- package/dist/vue-ui-quick-chart-LXKfaJgS.js +1310 -0
- package/dist/vue-ui-quick-chart-jFlFtiNV.cjs +13 -0
- package/dist/vue-ui-radar-CWNIqvcA.js +614 -0
- package/dist/vue-ui-radar-VGH-lhaT.cjs +1 -0
- package/dist/vue-ui-rating-BNrIoJHN.js +271 -0
- package/dist/vue-ui-rating-Dtu6pwGx.cjs +1 -0
- package/dist/vue-ui-relation-circle-B3NKudOy.js +304 -0
- package/dist/vue-ui-relation-circle-Dwpx9o18.cjs +1 -0
- package/dist/vue-ui-rings-CsUngX_F.js +510 -0
- package/dist/vue-ui-rings-D9_OG--0.cjs +1 -0
- package/dist/vue-ui-scatter-DUsuh7bd.cjs +1 -0
- package/dist/vue-ui-scatter-DgxTz4Jx.js +874 -0
- package/dist/vue-ui-screenshot-51H_VrYY.js +160 -0
- package/dist/vue-ui-screenshot-C2Dz7CAe.cjs +3 -0
- package/dist/vue-ui-skeleton-BM9rwmxY.js +2064 -0
- package/dist/vue-ui-skeleton-sjfOtCZr.cjs +41 -0
- package/dist/vue-ui-smiley-DNnBtHht.cjs +2 -0
- package/dist/vue-ui-smiley-H5rSN-1B.js +763 -0
- package/dist/vue-ui-spark-trend-CLXZDYlk.js +246 -0
- package/dist/vue-ui-spark-trend-R4JJvfry.cjs +1 -0
- package/dist/vue-ui-sparkbar-C0k4ah-7.js +242 -0
- package/dist/vue-ui-sparkbar-CEUDIw0A.cjs +1 -0
- package/dist/vue-ui-sparkgauge-BHj00A07.js +157 -0
- package/dist/vue-ui-sparkgauge-CaEw6nmI.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-B6GuavEu.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-DbMLYKqE.js +244 -0
- package/dist/vue-ui-sparkline-CJydanLS.cjs +1 -0
- package/dist/vue-ui-sparkline-CYova9x3.js +333 -0
- package/dist/vue-ui-sparkstackbar-Df__yM5b.cjs +1 -0
- package/dist/vue-ui-sparkstackbar-N5rVBM2h.js +244 -0
- package/dist/vue-ui-strip-plot-DJJ1vEWz.js +618 -0
- package/dist/vue-ui-strip-plot-b5lhB35d.cjs +1 -0
- package/dist/vue-ui-table-NHhOVDbs.cjs +14 -0
- package/dist/vue-ui-table-heatmap-Cro2etCY.js +237 -0
- package/dist/vue-ui-table-heatmap-DlL2nCqz.cjs +1 -0
- package/dist/vue-ui-table-sparkline-Bw2Gc_ur.cjs +1 -0
- package/dist/vue-ui-table-sparkline-DppMitqF.js +420 -0
- package/dist/vue-ui-table-xSvwJIa7.js +1430 -0
- package/dist/vue-ui-thermometer-M2kdp1x5.js +385 -0
- package/dist/vue-ui-thermometer-Q_3PX2V3.cjs +1 -0
- package/dist/vue-ui-timer-BtSDeIRp.cjs +64 -0
- package/dist/vue-ui-timer-CAaQ-QD6.js +453 -0
- package/dist/vue-ui-tiremarks-CbGOSEvD.cjs +1 -0
- package/dist/vue-ui-tiremarks-JFv4JLP0.js +249 -0
- package/dist/vue-ui-treemap-BqDX-bPf.cjs +1 -0
- package/dist/vue-ui-treemap-DCnv-xYr.js +722 -0
- package/dist/vue-ui-vertical-bar-CEbApJZl.js +737 -0
- package/dist/vue-ui-vertical-bar-CJB_KXyr.cjs +4 -0
- package/dist/vue-ui-waffle-CTS6C7gu.js +638 -0
- package/dist/vue-ui-waffle-IMEbGe-b.cjs +1 -0
- package/dist/vue-ui-wheel-CuOmEWMQ.cjs +1 -0
- package/dist/vue-ui-wheel-_zyCdFiI.js +227 -0
- package/dist/vue-ui-word-cloud-RDlXBEAN.js +346 -0
- package/dist/vue-ui-word-cloud-Y7Yk7uUJ.cjs +1 -0
- package/dist/vue-ui-xy-BZJQBKnU.cjs +3 -0
- package/dist/vue-ui-xy-DsvN9EIQ.js +2064 -0
- package/dist/vue-ui-xy-canvas-D_dnbyFS.cjs +9 -0
- package/dist/vue-ui-xy-canvas-Dbcw8-9Q.js +1006 -0
- package/package.json +1 -1
- package/dist/index-BcMihqI4.cjs +0 -843
- package/dist/index-C7FeCQ7K.js +0 -57303
|
@@ -0,0 +1,737 @@
|
|
|
1
|
+
import { useCssVars as De, computed as f, ref as v, onMounted as Re, onBeforeUnmount as Me, openBlock as d, createElementBlock as h, normalizeClass as S, normalizeStyle as i, createVNode as D, createCommentVNode as b, createBlock as J, unref as T, createSlots as Ue, withCtx as m, renderSlot as x, normalizeProps as Q, guardReactiveProps as Y, createElementVNode as o, toDisplayString as u, Fragment as R, renderList as M, withKeys as Xe, createTextVNode as Ae } from "vue";
|
|
2
|
+
import { u as Ee, c as Ge, t as He, a as We, p as V, b as je, o as be, e as Z, d as ee, X as qe, s as Ke, r as te, v as Je, w as Qe, f as Ye, n as Ze, q as et } from "./index-uOtklCCx.js";
|
|
3
|
+
import { t as tt, u as lt } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
+
import { _ as at } from "./Title-2iks1ziC.js";
|
|
5
|
+
import { u as ot, U as nt } from "./usePrinter-B6xQCyL-.js";
|
|
6
|
+
import { _ as ut } from "./Tooltip-C3phqKuU.js";
|
|
7
|
+
import { L as me } from "./Legend-CxvJTjEm.js";
|
|
8
|
+
import rt from "./vue-ui-skeleton-BM9rwmxY.js";
|
|
9
|
+
import st from "./BaseIcon-7_g11dRj.js";
|
|
10
|
+
import it from "./vue-ui-accordion-HJPf7My0.js";
|
|
11
|
+
import { u as _e } from "./useNestedProp-BgWkUab_.js";
|
|
12
|
+
import { _ as dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
const ct = ["id"], vt = ["onClick"], ht = ["xmlns", "viewBox"], pt = ["id"], gt = ["stop-color"], yt = ["stop-color"], ft = ["x", "y", "width", "height", "fill", "rx"], bt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], mt = ["x2", "y1", "y2", "stroke", "stroke-width"], _t = ["x", "y", "font-size", "fill", "font-weight"], xt = ["x", "y", "font-size", "fill", "font-weight"], $t = ["x", "y", "font-size", "fill", "font-weight"], kt = ["x", "y", "font-size", "fill", "font-weight"], Ct = ["y", "width", "height", "fill", "onMouseenter"], wt = ["onClick"], Tt = { style: "width:100%;padding-top: 36px;position:relative" }, Nt = { class: "vue-ui-data-table" }, Lt = { key: 0 }, Pt = { style: { width: "100%" } }, Vt = ["data-cell"], St = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ft = ["data-cell"], zt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Bt = ["data-cell"], It = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ot = ["data-cell"], Dt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Rt = ["data-cell"], Mt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Ut = ["data-cell"], Xt = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, At = ["data-cell"], Et = { style: { display: "flex", "align-items": "center", gap: "5px", "justify-content": "flex-end", width: "100%", "padding-right": "3px" } }, Gt = {
|
|
14
|
+
__name: "vue-ui-vertical-bar",
|
|
15
|
+
props: {
|
|
16
|
+
config: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default() {
|
|
19
|
+
return {};
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
dataset: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default() {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
emits: ["selectLegend"],
|
|
30
|
+
setup(xe, { expose: $e, emit: ke }) {
|
|
31
|
+
const w = xe;
|
|
32
|
+
De((t) => ({
|
|
33
|
+
"7410f552": t.tdo
|
|
34
|
+
}));
|
|
35
|
+
const { vue_ui_vertical_bar: Ce } = Ee(), U = f(() => !!w.dataset && w.dataset.length), N = v(Ge()), we = v(null), G = v(!1), H = v(""), X = v(0), Te = v(null), le = v(0), F = v(null), ae = v(null), W = v(null), e = f(() => {
|
|
36
|
+
const t = _e({
|
|
37
|
+
userConfig: w.config,
|
|
38
|
+
defaultConfig: Ce
|
|
39
|
+
});
|
|
40
|
+
return t.theme ? {
|
|
41
|
+
..._e({
|
|
42
|
+
userConfig: He.vue_ui_vertical_bar[t.theme] || w.config,
|
|
43
|
+
defaultConfig: t
|
|
44
|
+
}),
|
|
45
|
+
customPalette: We[t.theme] || V
|
|
46
|
+
} : t;
|
|
47
|
+
}), { isPrinting: Ne, isImaging: Le, generatePdf: oe, generateImage: ne } = ot({
|
|
48
|
+
elementId: `vue-ui-vertical-bar_${N.value}`,
|
|
49
|
+
fileName: e.value.style.chart.title.text || "vue-ui-vertical-bar"
|
|
50
|
+
}), ue = f(() => je(e.value.customPalette)), re = v(null), se = v(!1), Pe = f(() => e.value.table.responsiveBreakpoint), A = v(null);
|
|
51
|
+
Re(() => {
|
|
52
|
+
if (be(w.dataset) && Z({
|
|
53
|
+
componentName: "VueUiVerticalBar",
|
|
54
|
+
type: "dataset"
|
|
55
|
+
}), X.value = w.dataset.flatMap((t) => t.children && t.children.length > 0 ? t.children.length : 1).reduce((t, a) => t + a, 0), Ve(), e.value.responsive) {
|
|
56
|
+
const t = tt(() => {
|
|
57
|
+
const { width: a, height: l } = lt({
|
|
58
|
+
chart: F.value,
|
|
59
|
+
title: e.value.style.chart.title.text ? ae.value : null,
|
|
60
|
+
legend: e.value.style.chart.legend.show ? W.value : null
|
|
61
|
+
});
|
|
62
|
+
ce.value = a, c.value = l / X.value - g.value * 2;
|
|
63
|
+
});
|
|
64
|
+
A.value = new ResizeObserver(t), A.value.observe(F.value.parentNode);
|
|
65
|
+
}
|
|
66
|
+
}), Me(() => {
|
|
67
|
+
A.value && A.value.disconnect();
|
|
68
|
+
});
|
|
69
|
+
function Ve() {
|
|
70
|
+
new ResizeObserver((a) => {
|
|
71
|
+
a.forEach((l) => {
|
|
72
|
+
se.value = l.contentRect.width < Pe.value;
|
|
73
|
+
});
|
|
74
|
+
}).observe(re.value);
|
|
75
|
+
}
|
|
76
|
+
const _ = v({
|
|
77
|
+
showTable: e.value.table.show,
|
|
78
|
+
sortDesc: e.value.style.chart.layout.bars.sort === "desc",
|
|
79
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
80
|
+
}), ie = f(() => _.value.sortDesc), L = f(() => (w.dataset.forEach((t, a) => {
|
|
81
|
+
t.children && (be(t.children) ? Z({
|
|
82
|
+
componentName: "VueUiVerticalBar",
|
|
83
|
+
type: "datasetAttributeEmpty",
|
|
84
|
+
property: `children (index ${a})`
|
|
85
|
+
}) : t.children.forEach((l, n) => {
|
|
86
|
+
[null, void 0].includes(l.name) && Z({
|
|
87
|
+
componentName: "VueUiVerticalBar",
|
|
88
|
+
type: "datasetSerieAttribute",
|
|
89
|
+
property: "name",
|
|
90
|
+
key: "children",
|
|
91
|
+
index: n
|
|
92
|
+
});
|
|
93
|
+
}));
|
|
94
|
+
}), w.dataset.map((t, a) => {
|
|
95
|
+
const l = `vertical_parent_${a}_${N.value}`, n = !!t.children && t.children.length > 0;
|
|
96
|
+
return ![null, void 0].includes(t.value) && t.value < 0 && console.warn(`VueUiVerticalBar is not designed to graph negative values. ${t.name || "serie at index" + a} has the following value: ${t.value}`), {
|
|
97
|
+
...t,
|
|
98
|
+
id: l,
|
|
99
|
+
shape: "square",
|
|
100
|
+
opacity: C.value.includes(l) ? 0.5 : 1,
|
|
101
|
+
value: n ? t.children.map((r) => r.value || 0).reduce((r, s) => r + s, 0) : t.value || 0,
|
|
102
|
+
hasChildren: n,
|
|
103
|
+
isChild: !1,
|
|
104
|
+
segregate: () => z(l),
|
|
105
|
+
isSegregated: C.value.includes(l),
|
|
106
|
+
color: ee(t.color) || ue.value[a] || V[a] || V[a % V.length],
|
|
107
|
+
children: !t.children || !t.children.length ? [] : t.children.toSorted((r, s) => ie.value ? s.value - r.value : r.value - s.value).map((r, s) => (![null, void 0].includes(r.value) && r.value < 0 && console.warn(`VueUiVerticalBar is not designed to graph negative values. ${r.name + " child serie" || "child serie at index" + a + ", " + s} has the following value: ${r.value}`), {
|
|
108
|
+
...r,
|
|
109
|
+
value: r.value || 0,
|
|
110
|
+
isChild: !0,
|
|
111
|
+
parentId: l,
|
|
112
|
+
parentName: t.name,
|
|
113
|
+
parentValue: t.value,
|
|
114
|
+
id: `vertical_child_${a}_${s}_${N.value}`,
|
|
115
|
+
childIndex: s,
|
|
116
|
+
color: ee(r.color) || ee(t.color) || ue.value[a] || V[a] || V[a % V.length]
|
|
117
|
+
})).map((r, s) => ({
|
|
118
|
+
...r,
|
|
119
|
+
isFirstChild: s === 0,
|
|
120
|
+
isLastChild: s === t.children.length - 1
|
|
121
|
+
}))
|
|
122
|
+
};
|
|
123
|
+
}).toSorted((t, a) => ie.value ? a.value - t.value : t.value - a.value))), de = f(() => ({
|
|
124
|
+
cy: "vertical-bar-div-legend",
|
|
125
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
126
|
+
color: e.value.style.chart.legend.color,
|
|
127
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
128
|
+
paddingBottom: 12,
|
|
129
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
130
|
+
})), c = v(e.value.style.chart.layout.bars.height), g = v(e.value.style.chart.layout.bars.gap), Se = f(() => (c.value + g.value) * X.value), ce = v(512), p = f(() => ({
|
|
131
|
+
width: ce.value,
|
|
132
|
+
height: Se.value,
|
|
133
|
+
padding: {
|
|
134
|
+
top: 12,
|
|
135
|
+
left: 128 + e.value.style.chart.layout.bars.offsetX,
|
|
136
|
+
right: 64 + e.value.style.chart.layout.bars.paddingRight,
|
|
137
|
+
bottom: 12
|
|
138
|
+
}
|
|
139
|
+
})), y = f(() => ({
|
|
140
|
+
fullHeight: p.value.padding.top + p.value.padding.bottom + p.value.height,
|
|
141
|
+
top: p.value.padding.top,
|
|
142
|
+
left: p.value.padding.left,
|
|
143
|
+
right: p.value.width - p.value.padding.right,
|
|
144
|
+
bottom: p.value.padding.top + p.value.height,
|
|
145
|
+
width: p.value.width - (p.value.padding.left + p.value.padding.right)
|
|
146
|
+
}));
|
|
147
|
+
function j() {
|
|
148
|
+
X.value = P.value.flatMap((t) => t.children && t.children.length > 0 ? t.children.length : 1).reduce((t, a) => t + a, 0);
|
|
149
|
+
}
|
|
150
|
+
const C = v([]);
|
|
151
|
+
function z(t) {
|
|
152
|
+
C.value.includes(t) ? C.value = C.value.filter((a) => a !== t) : C.value.push(t), j(), ke("selectLegend", P.value);
|
|
153
|
+
}
|
|
154
|
+
const P = f(() => L.value.filter((t) => !C.value.includes(t.id))), $ = f(() => P.value.map((t) => t.value).reduce((t, a) => t + a));
|
|
155
|
+
function ve(t, a = !1, l = 0) {
|
|
156
|
+
return a ? (t / $.value * 100).toFixed(l) + "%" : t / $.value;
|
|
157
|
+
}
|
|
158
|
+
const B = f(() => P.value.flatMap((t) => t.hasChildren ? t.children : t)), Fe = f(() => Math.max(...P.value.flatMap((t) => t.children && t.children.length ? Math.max(...t.children.map((a) => a.value)) : t.value)));
|
|
159
|
+
function I(t) {
|
|
160
|
+
const a = t / Fe.value;
|
|
161
|
+
return y.value.width * a;
|
|
162
|
+
}
|
|
163
|
+
function ze(t) {
|
|
164
|
+
return I(t) + y.value.left;
|
|
165
|
+
}
|
|
166
|
+
function E(t, a) {
|
|
167
|
+
const l = P.value.find((s) => s.id === t.parentId), n = y.value.top + (g.value + c.value) * a, r = l.children.length * (g.value + c.value);
|
|
168
|
+
return {
|
|
169
|
+
y: n + r / 2 - e.value.style.chart.layout.bars.parentLabels.fontSize,
|
|
170
|
+
name: l.name,
|
|
171
|
+
value: [void 0, NaN, null].includes(l.value) ? "" : l.value.toFixed(e.value.style.chart.layout.bars.dataLabels.value.roundingValue),
|
|
172
|
+
percentageToTotal: isNaN(l.value / $.value) ? "" : ve(l.value, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
function Be() {
|
|
176
|
+
return P.value;
|
|
177
|
+
}
|
|
178
|
+
const q = v(null), K = v(null);
|
|
179
|
+
function Ie(t, a) {
|
|
180
|
+
K.value = {
|
|
181
|
+
datapoint: t,
|
|
182
|
+
seriesIndex: a,
|
|
183
|
+
series: L.value,
|
|
184
|
+
config: e.value
|
|
185
|
+
}, G.value = !0, q.value = t.id;
|
|
186
|
+
let l = "";
|
|
187
|
+
const n = t.isChild ? t.parentName : t.name, r = t.isChild ? t.name : "", s = e.value.style.chart.tooltip.customFormat;
|
|
188
|
+
Je(s) && Qe(() => s({
|
|
189
|
+
datapoint: t,
|
|
190
|
+
series: L.value,
|
|
191
|
+
config: e.value,
|
|
192
|
+
seriesIndex: a
|
|
193
|
+
})) ? H.value = s({
|
|
194
|
+
datapoint: t,
|
|
195
|
+
series: L.value,
|
|
196
|
+
config: e.value,
|
|
197
|
+
seriesIndex: a
|
|
198
|
+
}) : (l += `<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;">
|
|
199
|
+
<div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" rx="2" stroke="none" fill="${t.color}"/></svg> ${n}</div>
|
|
200
|
+
${r ? `<div>${r}</div>` : ""}
|
|
201
|
+
</div>`, e.value.style.chart.tooltip.showValue && (l += `<div>${e.value.translations.value}: <b>${e.value.style.chart.tooltip.prefix}${[void 0, NaN, null].includes(t.value) ? "-" : t.value.toFixed(e.value.style.chart.tooltip.roundingValue)}${e.value.style.chart.tooltip.suffix}</b></div>`), e.value.style.chart.tooltip.showPercentage && (l += `<div>${e.value.translations.percentageToTotal} : <b>${isNaN(t.value / $.value) ? "-" : `${(t.value / $.value * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}`}%</b></div>`, t.isChild && (l += `<div>${e.value.translations.percentageToSerie}: <b>${isNaN(t.value / t.parentValue) ? "-" : `${(t.value / t.parentValue * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}`}%</b></div>`)), H.value = `<div style="text-align:left">${l}</div>`);
|
|
202
|
+
}
|
|
203
|
+
function he(t) {
|
|
204
|
+
if (isNaN(t) || !e.value.style.chart.layout.bars.dataLabels.value.show)
|
|
205
|
+
return "";
|
|
206
|
+
const a = Ye({
|
|
207
|
+
p: e.value.style.chart.layout.bars.dataLabels.value.prefix,
|
|
208
|
+
v: t,
|
|
209
|
+
s: e.value.style.chart.layout.bars.dataLabels.value.suffix,
|
|
210
|
+
r: e.value.style.chart.layout.bars.dataLabels.value.roundingValue
|
|
211
|
+
}), l = `(${ve(t, !0, e.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;
|
|
212
|
+
return `${a}${e.value.style.chart.layout.bars.dataLabels.percentage.show ? ` ${l}` : ""}`;
|
|
213
|
+
}
|
|
214
|
+
const k = f(() => {
|
|
215
|
+
const t = [
|
|
216
|
+
e.value.translations.parentName,
|
|
217
|
+
e.value.translations.value,
|
|
218
|
+
e.value.translations.percentageToTotal,
|
|
219
|
+
e.value.translations.childName,
|
|
220
|
+
e.value.translations.value,
|
|
221
|
+
e.value.translations.percentageToSerie,
|
|
222
|
+
e.value.translations.percentageToTotal
|
|
223
|
+
], a = B.value.map((l) => l.isChild ? l.isFirstChild ? {
|
|
224
|
+
color: l.color,
|
|
225
|
+
parentName: l.parentName,
|
|
226
|
+
parentValue: l.parentValue,
|
|
227
|
+
percentageToTotal: l.parentValue / $.value,
|
|
228
|
+
childName: l.name,
|
|
229
|
+
childValue: l.value,
|
|
230
|
+
childPercentageToParent: l.value / l.parentValue,
|
|
231
|
+
childPercentageToTotal: l.value / $.value
|
|
232
|
+
} : {
|
|
233
|
+
color: "",
|
|
234
|
+
parentName: "",
|
|
235
|
+
parentValue: "",
|
|
236
|
+
percentageToTotal: "",
|
|
237
|
+
childName: l.name,
|
|
238
|
+
childValue: l.value,
|
|
239
|
+
childPercentageToParent: l.value / l.parentValue,
|
|
240
|
+
childPercentageToTotal: l.value / $.value
|
|
241
|
+
} : {
|
|
242
|
+
color: l.color,
|
|
243
|
+
parentName: l.name,
|
|
244
|
+
parentValue: l.value,
|
|
245
|
+
percentageToTotal: l.value / $.value,
|
|
246
|
+
childName: "",
|
|
247
|
+
childValue: "",
|
|
248
|
+
childPercentageToParent: "",
|
|
249
|
+
childPercentageToTotal: ""
|
|
250
|
+
});
|
|
251
|
+
return { head: t, body: a };
|
|
252
|
+
});
|
|
253
|
+
function pe() {
|
|
254
|
+
const t = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], a = k.value.head, l = k.value.body.map((s) => [
|
|
255
|
+
s.parentName,
|
|
256
|
+
s.parentValue,
|
|
257
|
+
s.percentageToTotal,
|
|
258
|
+
s.childName,
|
|
259
|
+
s.childValue,
|
|
260
|
+
s.childPercentageToParent,
|
|
261
|
+
s.childPercentageToTotal
|
|
262
|
+
]), n = t.concat([a]).concat(l), r = Ze(n);
|
|
263
|
+
et({ csvContent: r, title: e.value.style.chart.title.text || "vue-ui-vertical-bar" });
|
|
264
|
+
}
|
|
265
|
+
const O = v(!1);
|
|
266
|
+
function Oe(t) {
|
|
267
|
+
O.value = t, le.value += 1;
|
|
268
|
+
}
|
|
269
|
+
function ge() {
|
|
270
|
+
_.value.showTable = !_.value.showTable;
|
|
271
|
+
}
|
|
272
|
+
function ye() {
|
|
273
|
+
_.value.sortDesc = !_.value.sortDesc, j();
|
|
274
|
+
}
|
|
275
|
+
function fe() {
|
|
276
|
+
_.value.showTooltip = !_.value.showTooltip;
|
|
277
|
+
}
|
|
278
|
+
return $e({
|
|
279
|
+
getData: Be,
|
|
280
|
+
recalculateHeight: j,
|
|
281
|
+
generatePdf: oe,
|
|
282
|
+
generateCsv: pe,
|
|
283
|
+
generateImage: ne,
|
|
284
|
+
toggleTable: ge,
|
|
285
|
+
toggleSort: ye,
|
|
286
|
+
toggleTooltip: fe
|
|
287
|
+
}), (t, a) => (d(), h("div", {
|
|
288
|
+
class: S(`vue-ui-vertical-bar ${O.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
289
|
+
ref_key: "verticalBarChart",
|
|
290
|
+
ref: F,
|
|
291
|
+
id: `vue-ui-vertical-bar_${N.value}`,
|
|
292
|
+
style: i(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`)
|
|
293
|
+
}, [
|
|
294
|
+
e.value.style.chart.title.text ? (d(), h("div", {
|
|
295
|
+
key: 0,
|
|
296
|
+
ref_key: "chartTitle",
|
|
297
|
+
ref: ae,
|
|
298
|
+
style: i(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px`)
|
|
299
|
+
}, [
|
|
300
|
+
D(at, {
|
|
301
|
+
config: {
|
|
302
|
+
title: {
|
|
303
|
+
cy: "vertical-bar-div-title",
|
|
304
|
+
...e.value.style.chart.title
|
|
305
|
+
},
|
|
306
|
+
subtitle: {
|
|
307
|
+
cy: "vertical-bar-div-subtitle",
|
|
308
|
+
...e.value.style.chart.title.subtitle
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}, null, 8, ["config"])
|
|
312
|
+
], 4)) : b("", !0),
|
|
313
|
+
e.value.userOptions.show && U.value ? (d(), J(nt, {
|
|
314
|
+
ref_key: "details",
|
|
315
|
+
ref: we,
|
|
316
|
+
key: `user_options_${le.value}`,
|
|
317
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
318
|
+
color: e.value.style.chart.color,
|
|
319
|
+
isImaging: T(Le),
|
|
320
|
+
isPrinting: T(Ne),
|
|
321
|
+
uid: N.value,
|
|
322
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
323
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
324
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
325
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
326
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
327
|
+
hasSort: e.value.userOptions.buttons.sort,
|
|
328
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
329
|
+
isFullscreen: O.value,
|
|
330
|
+
isTooltip: _.value.showTooltip,
|
|
331
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
332
|
+
chartElement: F.value,
|
|
333
|
+
onToggleFullscreen: Oe,
|
|
334
|
+
onGeneratePdf: T(oe),
|
|
335
|
+
onGenerateCsv: pe,
|
|
336
|
+
onGenerateImage: T(ne),
|
|
337
|
+
onToggleTable: ge,
|
|
338
|
+
onToggleSort: ye,
|
|
339
|
+
onToggleTooltip: fe
|
|
340
|
+
}, Ue({ _: 2 }, [
|
|
341
|
+
t.$slots.optionTooltip ? {
|
|
342
|
+
name: "optionTooltip",
|
|
343
|
+
fn: m(() => [
|
|
344
|
+
x(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
345
|
+
]),
|
|
346
|
+
key: "0"
|
|
347
|
+
} : void 0,
|
|
348
|
+
t.$slots.optionPdf ? {
|
|
349
|
+
name: "optionPdf",
|
|
350
|
+
fn: m(() => [
|
|
351
|
+
x(t.$slots, "optionPdf", {}, void 0, !0)
|
|
352
|
+
]),
|
|
353
|
+
key: "1"
|
|
354
|
+
} : void 0,
|
|
355
|
+
t.$slots.optionCsv ? {
|
|
356
|
+
name: "optionCsv",
|
|
357
|
+
fn: m(() => [
|
|
358
|
+
x(t.$slots, "optionCsv", {}, void 0, !0)
|
|
359
|
+
]),
|
|
360
|
+
key: "2"
|
|
361
|
+
} : void 0,
|
|
362
|
+
t.$slots.optionImg ? {
|
|
363
|
+
name: "optionImg",
|
|
364
|
+
fn: m(() => [
|
|
365
|
+
x(t.$slots, "optionImg", {}, void 0, !0)
|
|
366
|
+
]),
|
|
367
|
+
key: "3"
|
|
368
|
+
} : void 0,
|
|
369
|
+
t.$slots.optionTable ? {
|
|
370
|
+
name: "optionTable",
|
|
371
|
+
fn: m(() => [
|
|
372
|
+
x(t.$slots, "optionTable", {}, void 0, !0)
|
|
373
|
+
]),
|
|
374
|
+
key: "4"
|
|
375
|
+
} : void 0,
|
|
376
|
+
t.$slots.optionLabels ? {
|
|
377
|
+
name: "optionLabels",
|
|
378
|
+
fn: m(() => [
|
|
379
|
+
x(t.$slots, "optionLabels", {}, void 0, !0)
|
|
380
|
+
]),
|
|
381
|
+
key: "5"
|
|
382
|
+
} : void 0,
|
|
383
|
+
t.$slots.optionSort ? {
|
|
384
|
+
name: "optionSort",
|
|
385
|
+
fn: m(() => [
|
|
386
|
+
x(t.$slots, "optionSort", {}, void 0, !0)
|
|
387
|
+
]),
|
|
388
|
+
key: "6"
|
|
389
|
+
} : void 0,
|
|
390
|
+
t.$slots.optionFullscreen ? {
|
|
391
|
+
name: "optionFullscreen",
|
|
392
|
+
fn: m(({ toggleFullscreen: l, isFullscreen: n }) => [
|
|
393
|
+
x(t.$slots, "optionFullscreen", Q(Y({ toggleFullscreen: l, isFullscreen: n })), void 0, !0)
|
|
394
|
+
]),
|
|
395
|
+
key: "7"
|
|
396
|
+
} : void 0
|
|
397
|
+
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasSort", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : b("", !0),
|
|
398
|
+
e.value.style.chart.legend.show && e.value.style.chart.legend.position === "top" ? (d(), h("div", {
|
|
399
|
+
key: 2,
|
|
400
|
+
ref_key: "chartLegend",
|
|
401
|
+
ref: W
|
|
402
|
+
}, [
|
|
403
|
+
D(me, {
|
|
404
|
+
legendSet: L.value,
|
|
405
|
+
config: de.value,
|
|
406
|
+
onClickMarker: a[0] || (a[0] = ({ legend: l }) => z(l.id))
|
|
407
|
+
}, {
|
|
408
|
+
item: m(({ legend: l }) => [
|
|
409
|
+
o("div", {
|
|
410
|
+
"data-cy-legend-item": "",
|
|
411
|
+
onClick: (n) => z(l.id),
|
|
412
|
+
style: i(`opacity:${C.value.includes(l.id) ? 0.5 : 1}`)
|
|
413
|
+
}, u(l.name) + ": " + u(e.value.style.chart.legend.prefix) + u(l.value.toFixed(e.value.style.chart.legend.roundingValue)) + u(e.value.style.chart.legend.suffix), 13, vt)
|
|
414
|
+
]),
|
|
415
|
+
_: 1
|
|
416
|
+
}, 8, ["legendSet", "config"])
|
|
417
|
+
], 512)) : b("", !0),
|
|
418
|
+
U.value ? (d(), h("svg", {
|
|
419
|
+
key: 3,
|
|
420
|
+
xmlns: T(qe),
|
|
421
|
+
class: S({ "vue-data-ui-fullscreen--on": O.value, "vue-data-ui-fulscreen--off": !O.value }),
|
|
422
|
+
viewBox: `0 0 ${p.value.width <= 0 ? 10 : p.value.width} ${y.value.fullHeight <= 0 ? 10 : y.value.fullHeight}`,
|
|
423
|
+
style: i(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
424
|
+
}, [
|
|
425
|
+
(d(!0), h(R, null, M(B.value, (l, n) => (d(), h("linearGradient", {
|
|
426
|
+
x1: "0%",
|
|
427
|
+
y1: "0%",
|
|
428
|
+
x2: "100%",
|
|
429
|
+
y2: "0%",
|
|
430
|
+
id: `vertical_bar_gradient_${N.value}_${n}`
|
|
431
|
+
}, [
|
|
432
|
+
o("stop", {
|
|
433
|
+
offset: "0%",
|
|
434
|
+
"stop-color": l.color
|
|
435
|
+
}, null, 8, gt),
|
|
436
|
+
o("stop", {
|
|
437
|
+
offset: "100%",
|
|
438
|
+
"stop-color": `${T(Ke)(l.color, 0.03)}${T(te)[100 - e.value.style.chart.layout.bars.gradientIntensity]}`
|
|
439
|
+
}, null, 8, yt)
|
|
440
|
+
], 8, pt))), 256)),
|
|
441
|
+
(d(!0), h(R, null, M(B.value, (l, n) => (d(), h("g", null, [
|
|
442
|
+
o("rect", {
|
|
443
|
+
x: y.value.left,
|
|
444
|
+
y: y.value.top + (g.value + c.value) * n,
|
|
445
|
+
width: I(l.value) <= 0 ? 1e-4 : I(l.value),
|
|
446
|
+
height: c.value <= 0 ? 1e-4 : c.value,
|
|
447
|
+
fill: e.value.style.chart.layout.bars.underlayerColor,
|
|
448
|
+
rx: e.value.style.chart.layout.bars.borderRadius,
|
|
449
|
+
class: S({ animated: e.value.useCssAnimation })
|
|
450
|
+
}, null, 10, ft)
|
|
451
|
+
]))), 256)),
|
|
452
|
+
(d(!0), h(R, null, M(B.value, (l, n) => (d(), h("g", null, [
|
|
453
|
+
o("rect", {
|
|
454
|
+
x: y.value.left,
|
|
455
|
+
y: y.value.top + (g.value + c.value) * n,
|
|
456
|
+
width: I(l.value) <= 0 ? 1e-4 : I(l.value),
|
|
457
|
+
height: c.value <= 0 ? 1e-4 : c.value,
|
|
458
|
+
fill: e.value.style.chart.layout.bars.useGradient ? `url(#vertical_bar_gradient_${N.value}_${n})` : `${l.color}${T(te)[e.value.style.chart.layout.bars.fillOpacity]}`,
|
|
459
|
+
rx: e.value.style.chart.layout.bars.borderRadius,
|
|
460
|
+
stroke: e.value.style.chart.layout.bars.useStroke ? l.color : "none",
|
|
461
|
+
"stroke-width": e.value.style.chart.layout.bars.useStroke ? e.value.style.chart.layout.bars.strokeWidth : 0,
|
|
462
|
+
class: S({ animated: e.value.useCssAnimation })
|
|
463
|
+
}, null, 10, bt),
|
|
464
|
+
(!l.isChild || l.isLastChild) && e.value.style.chart.layout.separators.show && n !== B.value.length - 1 ? (d(), h("line", {
|
|
465
|
+
key: 0,
|
|
466
|
+
x1: 0,
|
|
467
|
+
x2: y.value.left,
|
|
468
|
+
y1: c.value + g.value / 2 + y.value.top + (g.value + c.value) * n,
|
|
469
|
+
y2: c.value + g.value / 2 + y.value.top + (g.value + c.value) * n,
|
|
470
|
+
stroke: e.value.style.chart.layout.separators.color,
|
|
471
|
+
"stroke-width": e.value.style.chart.layout.separators.strokeWidth,
|
|
472
|
+
"stroke-linecap": "round"
|
|
473
|
+
}, null, 8, mt)) : b("", !0),
|
|
474
|
+
o("text", {
|
|
475
|
+
x: ze(l.value) + 3 + e.value.style.chart.layout.bars.dataLabels.offsetX,
|
|
476
|
+
y: y.value.top + (g.value + c.value) * n + c.value / 2 + e.value.style.chart.layout.bars.dataLabels.fontSize / 2,
|
|
477
|
+
"text-anchor": "start",
|
|
478
|
+
"font-size": e.value.style.chart.layout.bars.dataLabels.fontSize,
|
|
479
|
+
fill: e.value.style.chart.layout.bars.dataLabels.color,
|
|
480
|
+
"font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal"
|
|
481
|
+
}, u(he(l.value)), 9, _t),
|
|
482
|
+
(l.isChild || !l.hasChildren) && e.value.style.chart.layout.bars.nameLabels.show ? (d(), h("text", {
|
|
483
|
+
key: 1,
|
|
484
|
+
"text-anchor": "end",
|
|
485
|
+
x: y.value.left - 3 + e.value.style.chart.layout.bars.nameLabels.offsetX,
|
|
486
|
+
y: y.value.top + (g.value + c.value) * n + c.value / 2 + e.value.style.chart.layout.bars.nameLabels.fontSize / 2,
|
|
487
|
+
"font-size": e.value.style.chart.layout.bars.nameLabels.fontSize,
|
|
488
|
+
fill: e.value.style.chart.layout.bars.nameLabels.color,
|
|
489
|
+
"font-weight": e.value.style.chart.layout.bars.nameLabels.bold ? "bold" : "normal"
|
|
490
|
+
}, u(l.name), 9, xt)) : b("", !0),
|
|
491
|
+
l.isChild && l.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (d(), h("text", {
|
|
492
|
+
key: 2,
|
|
493
|
+
x: 3 + e.value.style.chart.layout.bars.parentLabels.offsetX,
|
|
494
|
+
y: E(l, n).y,
|
|
495
|
+
"font-size": e.value.style.chart.layout.bars.parentLabels.fontSize,
|
|
496
|
+
fill: e.value.style.chart.layout.bars.parentLabels.color,
|
|
497
|
+
"font-weight": e.value.style.chart.layout.bars.parentLabels.bold ? "bold" : "normal",
|
|
498
|
+
"text-anchor": "start"
|
|
499
|
+
}, u(E(l, n).name), 9, $t)) : b("", !0),
|
|
500
|
+
l.isChild && l.childIndex === 0 && e.value.style.chart.layout.bars.parentLabels.show ? (d(), h("text", {
|
|
501
|
+
key: 3,
|
|
502
|
+
x: 3 + e.value.style.chart.layout.bars.parentLabels.offsetX,
|
|
503
|
+
y: E(l, n).y + e.value.style.chart.layout.bars.parentLabels.fontSize + 6,
|
|
504
|
+
"font-size": e.value.style.chart.layout.bars.parentLabels.fontSize,
|
|
505
|
+
fill: e.value.style.chart.layout.bars.parentLabels.color,
|
|
506
|
+
"font-weight": e.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal",
|
|
507
|
+
"text-anchor": "start"
|
|
508
|
+
}, u(he(E(l, n).value)), 9, kt)) : b("", !0),
|
|
509
|
+
o("rect", {
|
|
510
|
+
"data-cy-trap": "",
|
|
511
|
+
x: 0,
|
|
512
|
+
y: y.value.top + (g.value + c.value) * n - g.value / 2,
|
|
513
|
+
width: p.value.width <= 0 ? 1e-4 : p.value.width,
|
|
514
|
+
height: c.value + g.value <= 0 ? 1e-4 : c.value + g.value,
|
|
515
|
+
fill: q.value === l.id ? `${e.value.style.chart.layout.highlighter.color}${T(te)[e.value.style.chart.layout.highlighter.opacity]}` : "transparent",
|
|
516
|
+
onMouseenter: (r) => Ie(l, n),
|
|
517
|
+
onMouseleave: a[1] || (a[1] = (r) => {
|
|
518
|
+
Te.value = null, G.value = !1, q.value = null;
|
|
519
|
+
})
|
|
520
|
+
}, null, 40, Ct)
|
|
521
|
+
]))), 256)),
|
|
522
|
+
x(t.$slots, "svg", { svg: p.value }, void 0, !0)
|
|
523
|
+
], 14, ht)) : b("", !0),
|
|
524
|
+
U.value ? b("", !0) : (d(), J(rt, {
|
|
525
|
+
key: 4,
|
|
526
|
+
config: {
|
|
527
|
+
type: "verticalBar",
|
|
528
|
+
style: {
|
|
529
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
530
|
+
verticalBar: {
|
|
531
|
+
axis: {
|
|
532
|
+
color: "#CCCCCC"
|
|
533
|
+
},
|
|
534
|
+
color: "#CCCCCC"
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}, null, 8, ["config"])),
|
|
539
|
+
e.value.style.chart.legend.show && e.value.style.chart.legend.position === "bottom" ? (d(), h("div", {
|
|
540
|
+
key: 5,
|
|
541
|
+
ref_key: "chartLegend",
|
|
542
|
+
ref: W
|
|
543
|
+
}, [
|
|
544
|
+
D(me, {
|
|
545
|
+
legendSet: L.value,
|
|
546
|
+
config: de.value,
|
|
547
|
+
onClickMarker: a[2] || (a[2] = ({ legend: l }) => z(l.id))
|
|
548
|
+
}, {
|
|
549
|
+
item: m(({ legend: l }) => [
|
|
550
|
+
o("div", {
|
|
551
|
+
onClick: (n) => z(l.id),
|
|
552
|
+
style: i(`opacity:${C.value.includes(l.id) ? 0.5 : 1}`)
|
|
553
|
+
}, u(l.name) + " : " + u(e.value.style.chart.legend.prefix) + u(l.value.toFixed(e.value.style.chart.legend.roundingValue)) + u(e.value.style.chart.legend.suffix), 13, wt)
|
|
554
|
+
]),
|
|
555
|
+
_: 1
|
|
556
|
+
}, 8, ["legendSet", "config"])
|
|
557
|
+
], 512)) : b("", !0),
|
|
558
|
+
x(t.$slots, "legend", { legend: L.value }, void 0, !0),
|
|
559
|
+
D(ut, {
|
|
560
|
+
show: _.value.showTooltip && G.value && C.value.length < w.dataset.length,
|
|
561
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
562
|
+
color: e.value.style.chart.tooltip.color,
|
|
563
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
564
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
565
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
566
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
567
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
568
|
+
parent: F.value,
|
|
569
|
+
content: H.value,
|
|
570
|
+
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
|
|
571
|
+
}, {
|
|
572
|
+
"tooltip-before": m(() => [
|
|
573
|
+
x(t.$slots, "tooltip-before", Q(Y({ ...K.value })), void 0, !0)
|
|
574
|
+
]),
|
|
575
|
+
"tooltip-after": m(() => [
|
|
576
|
+
x(t.$slots, "tooltip-after", Q(Y({ ...K.value })), void 0, !0)
|
|
577
|
+
]),
|
|
578
|
+
_: 3
|
|
579
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
|
|
580
|
+
U.value ? (d(), J(it, {
|
|
581
|
+
key: 6,
|
|
582
|
+
hideDetails: "",
|
|
583
|
+
config: {
|
|
584
|
+
open: _.value.showTable,
|
|
585
|
+
maxHeight: 1e4,
|
|
586
|
+
body: {
|
|
587
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
588
|
+
color: e.value.style.chart.color
|
|
589
|
+
},
|
|
590
|
+
head: {
|
|
591
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
592
|
+
color: e.value.style.chart.color
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}, {
|
|
596
|
+
content: m(() => [
|
|
597
|
+
o("div", {
|
|
598
|
+
ref_key: "tableContainer",
|
|
599
|
+
ref: re,
|
|
600
|
+
class: "vue-ui-vertical-bar-table"
|
|
601
|
+
}, [
|
|
602
|
+
o("div", Tt, [
|
|
603
|
+
o("div", {
|
|
604
|
+
role: "button",
|
|
605
|
+
tabindex: "0",
|
|
606
|
+
style: i(`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};`),
|
|
607
|
+
onClick: a[3] || (a[3] = (l) => _.value.showTable = !1),
|
|
608
|
+
onKeypress: a[4] || (a[4] = Xe((l) => _.value.showTable = !1, ["enter"]))
|
|
609
|
+
}, [
|
|
610
|
+
D(st, {
|
|
611
|
+
name: "close",
|
|
612
|
+
stroke: e.value.table.th.color,
|
|
613
|
+
"stroke-width": 2
|
|
614
|
+
}, null, 8, ["stroke"])
|
|
615
|
+
], 36),
|
|
616
|
+
o("div", {
|
|
617
|
+
style: { width: "100%", "container-type": "inline-size" },
|
|
618
|
+
class: S({ "vue-ui-responsive": se.value })
|
|
619
|
+
}, [
|
|
620
|
+
o("table", Nt, [
|
|
621
|
+
o("caption", {
|
|
622
|
+
style: i({ backgroundColor: e.value.table.th.backgroundColor, color: e.value.table.th.color, outline: e.value.table.th.outline }),
|
|
623
|
+
class: "vue-ui-data-table__caption"
|
|
624
|
+
}, [
|
|
625
|
+
Ae(u(e.value.style.chart.title.text) + " ", 1),
|
|
626
|
+
e.value.style.chart.title.subtitle.text ? (d(), h("span", Lt, u(e.value.style.chart.title.subtitle.text), 1)) : b("", !0)
|
|
627
|
+
], 4),
|
|
628
|
+
o("thead", null, [
|
|
629
|
+
o("tr", {
|
|
630
|
+
role: "row",
|
|
631
|
+
style: i(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color}`)
|
|
632
|
+
}, [
|
|
633
|
+
(d(!0), h(R, null, M(k.value.head, (l) => (d(), h("th", {
|
|
634
|
+
style: i(`outline:${e.value.table.th.outline}`)
|
|
635
|
+
}, [
|
|
636
|
+
o("div", Pt, u(l), 1)
|
|
637
|
+
], 4))), 256))
|
|
638
|
+
], 4),
|
|
639
|
+
o("tr", null, [
|
|
640
|
+
o("th", {
|
|
641
|
+
style: i(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
|
|
642
|
+
}, null, 4),
|
|
643
|
+
o("th", {
|
|
644
|
+
style: i(`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`)
|
|
645
|
+
}, "∑ " + u(e.value.table.td.prefix) + u(isNaN($.value) ? "" : $.value.toFixed(e.value.table.td.roundingValue)) + u(e.value.table.td.suffix), 5),
|
|
646
|
+
o("th", {
|
|
647
|
+
style: i(`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`)
|
|
648
|
+
}, "100%", 4),
|
|
649
|
+
o("th", {
|
|
650
|
+
style: i(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
|
|
651
|
+
}, null, 4),
|
|
652
|
+
o("th", {
|
|
653
|
+
style: i(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
|
|
654
|
+
}, null, 4),
|
|
655
|
+
o("th", {
|
|
656
|
+
style: i(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
|
|
657
|
+
}, null, 4),
|
|
658
|
+
o("th", {
|
|
659
|
+
style: i(`background:${e.value.table.th.backgroundColor};color:${e.value.table.th.color};outline:${e.value.table.th.outline}`)
|
|
660
|
+
}, null, 4)
|
|
661
|
+
])
|
|
662
|
+
]),
|
|
663
|
+
o("tbody", null, [
|
|
664
|
+
(d(!0), h(R, null, M(k.value.body, (l, n) => (d(), h("tr", {
|
|
665
|
+
class: S({ "vue-ui-data-table__tbody__row": !0, "vue-ui-data-table__tbody__row-even": n % 2 === 0, "vue-ui-data-table__tbody__row-odd": n % 2 !== 0 }),
|
|
666
|
+
style: i(`background:${e.value.table.td.backgroundColor};color:${e.value.table.td.color}`)
|
|
667
|
+
}, [
|
|
668
|
+
o("td", {
|
|
669
|
+
class: "vue-ui-data-table__tbody__td",
|
|
670
|
+
style: i(`outline:${e.value.table.td.outline};font-variant-numeric: tabular-nums;`),
|
|
671
|
+
"data-cell": k.value.head[0] ?? ""
|
|
672
|
+
}, [
|
|
673
|
+
o("div", St, [
|
|
674
|
+
l.color ? (d(), h("span", {
|
|
675
|
+
key: 0,
|
|
676
|
+
style: i(`color:${l.color};margin-right:3px`)
|
|
677
|
+
}, "⬤", 4)) : b("", !0),
|
|
678
|
+
o("span", null, u(l.parentName), 1)
|
|
679
|
+
])
|
|
680
|
+
], 12, Vt),
|
|
681
|
+
o("td", {
|
|
682
|
+
class: "vue-ui-data-table__tbody__td",
|
|
683
|
+
style: i(`outline:${e.value.table.td.outline}`),
|
|
684
|
+
"data-cell": k.value.head[1] ?? ""
|
|
685
|
+
}, [
|
|
686
|
+
o("div", zt, u(e.value.table.td.prefix) + u(["", NaN, void 0].includes(l.parentValue) ? "" : l.parentValue.toFixed(e.value.table.td.roundingValue)) + u(e.value.table.td.suffix), 1)
|
|
687
|
+
], 12, Ft),
|
|
688
|
+
o("td", {
|
|
689
|
+
class: "vue-ui-data-table__tbody__td",
|
|
690
|
+
style: i(`outline:${e.value.table.td.outline}`),
|
|
691
|
+
"data-cell": k.value.head[2] ?? ""
|
|
692
|
+
}, [
|
|
693
|
+
o("div", It, u(["", NaN, void 0].includes(l.percentageToTotal) ? "" : `${(l.percentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
|
|
694
|
+
], 12, Bt),
|
|
695
|
+
o("td", {
|
|
696
|
+
class: "vue-ui-data-table__tbody__td",
|
|
697
|
+
style: i(`outline:${e.value.table.td.outline}`),
|
|
698
|
+
"data-cell": k.value.head[3] ?? ""
|
|
699
|
+
}, [
|
|
700
|
+
o("div", Dt, u(l.childName), 1)
|
|
701
|
+
], 12, Ot),
|
|
702
|
+
o("td", {
|
|
703
|
+
class: "vue-ui-data-table__tbody__td",
|
|
704
|
+
style: i(`outline:${e.value.table.td.outline}`),
|
|
705
|
+
"data-cell": k.value.head[4] ?? ""
|
|
706
|
+
}, [
|
|
707
|
+
o("div", Mt, u(e.value.table.td.prefix) + u(["", NaN, void 0].includes(l.childValue) ? "" : l.childValue.toFixed(e.value.table.td.roundingValue)) + u(e.value.table.td.suffix), 1)
|
|
708
|
+
], 12, Rt),
|
|
709
|
+
o("td", {
|
|
710
|
+
class: "vue-ui-data-table__tbody__td",
|
|
711
|
+
style: i(`outline:${e.value.table.td.outline}`),
|
|
712
|
+
"data-cell": k.value.head[5] ?? ""
|
|
713
|
+
}, [
|
|
714
|
+
o("div", Xt, u(["", NaN, void 0].includes(l.childPercentageToParent) ? "" : `${(l.childPercentageToParent * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
|
|
715
|
+
], 12, Ut),
|
|
716
|
+
o("td", {
|
|
717
|
+
class: "vue-ui-data-table__tbody__td",
|
|
718
|
+
style: i(`outline:${e.value.table.td.outline}`),
|
|
719
|
+
"data-cell": k.value.head[6] ?? ""
|
|
720
|
+
}, [
|
|
721
|
+
o("div", Et, u(["", NaN, void 0].includes(l.childPercentageToTotal) ? "" : `${(l.childPercentageToTotal * 100).toFixed(e.value.table.td.roundingPercentage)}%`), 1)
|
|
722
|
+
], 12, At)
|
|
723
|
+
], 6))), 256))
|
|
724
|
+
])
|
|
725
|
+
])
|
|
726
|
+
], 2)
|
|
727
|
+
])
|
|
728
|
+
], 512)
|
|
729
|
+
]),
|
|
730
|
+
_: 1
|
|
731
|
+
}, 8, ["config"])) : b("", !0)
|
|
732
|
+
], 14, ct));
|
|
733
|
+
}
|
|
734
|
+
}, al = /* @__PURE__ */ dt(Gt, [["__scopeId", "data-v-22e85059"]]);
|
|
735
|
+
export {
|
|
736
|
+
al as default
|
|
737
|
+
};
|