vue-data-ui 2.3.2 → 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-BoVO5twe.js → index.es-YufTdp0y.js} +1 -1
- package/dist/{index.es-w_iDpZ-o.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-C6KVJkgd.cjs +0 -843
- package/dist/index-bDBuMYfe.js +0 -57303
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { computed as v, ref as f, watch as Q, onMounted as W, openBlock as n, createElementBlock as h, normalizeClass as O, normalizeStyle as S, createVNode as Z, createCommentVNode as $, createBlock as L, unref as k, createSlots as ee, withCtx as A, renderSlot as I, normalizeProps as te, guardReactiveProps as ae, Fragment as T, renderList as V, toDisplayString as le } from "vue";
|
|
2
|
+
import { u as X } from "./useNestedProp-BgWkUab_.js";
|
|
3
|
+
import { u as oe, c as re, t as se, o as ne, e as ue, s as M, X as ie } from "./index-uOtklCCx.js";
|
|
4
|
+
import { _ as ce } from "./Title-2iks1ziC.js";
|
|
5
|
+
import { u as ve, U as he } from "./usePrinter-B6xQCyL-.js";
|
|
6
|
+
import de from "./vue-ui-skeleton-BM9rwmxY.js";
|
|
7
|
+
import { _ as ge } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const ye = ["id"], me = ["xmlns", "viewBox"], fe = { key: 0 }, pe = ["d", "stroke-width", "stroke"], ke = { key: 1 }, be = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], _e = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], Ce = {
|
|
9
|
+
__name: "vue-ui-tiremarks",
|
|
10
|
+
props: {
|
|
11
|
+
config: {
|
|
12
|
+
type: Object,
|
|
13
|
+
default() {
|
|
14
|
+
return {};
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
dataset: {
|
|
18
|
+
type: Object,
|
|
19
|
+
default() {
|
|
20
|
+
return {};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
setup(D, { expose: H }) {
|
|
25
|
+
const u = D, { vue_ui_tiremarks: R } = oe(), F = v(() => !!u.dataset && Object.keys(u.dataset).length), z = f(re()), N = f(null), G = f(0), e = v(() => {
|
|
26
|
+
const t = X({
|
|
27
|
+
userConfig: u.config,
|
|
28
|
+
defaultConfig: R
|
|
29
|
+
});
|
|
30
|
+
return t.theme ? {
|
|
31
|
+
...X({
|
|
32
|
+
userConfig: se.vue_ui_tiremarks[t.theme] || u.config,
|
|
33
|
+
defaultConfig: t
|
|
34
|
+
})
|
|
35
|
+
} : t;
|
|
36
|
+
}), { isPrinting: Y, isImaging: q, generatePdf: U, generateImage: j } = ve({
|
|
37
|
+
elementId: z.value,
|
|
38
|
+
fileName: e.value.style.chart.title.text || "vue-ui-tiremarks"
|
|
39
|
+
}), c = f(e.value.style.chart.animation.use ? 0 : u.dataset.percentage);
|
|
40
|
+
Q(() => u.dataset.percentage, () => {
|
|
41
|
+
c.value = f(e.value.style.chart.animation.use ? 0 : u.dataset.percentage), B();
|
|
42
|
+
}), W(() => {
|
|
43
|
+
ne(u.dataset) && ue({
|
|
44
|
+
componentName: "VueUiTiremarks",
|
|
45
|
+
type: "dataset"
|
|
46
|
+
}), B();
|
|
47
|
+
});
|
|
48
|
+
function B() {
|
|
49
|
+
let t = 0, s = e.value.style.chart.animation.speed, a = 5e-3 * e.value.style.chart.animation.acceleration;
|
|
50
|
+
function o() {
|
|
51
|
+
c.value += s + t, t += a, c.value < u.dataset.percentage ? requestAnimationFrame(o) : c.value = u.dataset.percentage;
|
|
52
|
+
}
|
|
53
|
+
e.value.style.chart.animation.use && (c.value = 0, o());
|
|
54
|
+
}
|
|
55
|
+
const p = v(() => e.value.style.chart.layout.display === "vertical"), r = v(() => {
|
|
56
|
+
const t = {
|
|
57
|
+
top: 48,
|
|
58
|
+
left: 64,
|
|
59
|
+
right: 64,
|
|
60
|
+
bottom: 48
|
|
61
|
+
};
|
|
62
|
+
return p.value ? {
|
|
63
|
+
top: e.value.style.chart.percentage.verticalPosition === "top" ? t.top : 3,
|
|
64
|
+
left: 3,
|
|
65
|
+
right: 3,
|
|
66
|
+
bottom: e.value.style.chart.percentage.verticalPosition === "bottom" ? t.bottom : 3
|
|
67
|
+
} : {
|
|
68
|
+
top: 0,
|
|
69
|
+
bottom: 0,
|
|
70
|
+
left: e.value.style.chart.percentage.horizontalPosition === "left" ? t.left : 3,
|
|
71
|
+
right: e.value.style.chart.percentage.horizontalPosition === "right" ? t.right : 10
|
|
72
|
+
};
|
|
73
|
+
}), w = v(() => Object.values(r.value).reduce((t, s) => t + s, 0)), l = v(() => ({
|
|
74
|
+
height: p.value ? 312 : 56,
|
|
75
|
+
width: p.value ? 56 : 312
|
|
76
|
+
})), J = f(100);
|
|
77
|
+
v(() => u.dataset.percentage / J.value);
|
|
78
|
+
const i = v(() => p.value ? {
|
|
79
|
+
mark: (l.value.height - w.value) / 100 * 0.5,
|
|
80
|
+
space: (l.value.height - w.value) / 100 * 0.5
|
|
81
|
+
} : {
|
|
82
|
+
mark: (l.value.width - w.value) / 100 * 0.5,
|
|
83
|
+
space: (l.value.width - w.value) / 100 * 0.5
|
|
84
|
+
}), E = v(() => {
|
|
85
|
+
const t = [];
|
|
86
|
+
for (let a = 0; a < 100; a += 1) {
|
|
87
|
+
const o = e.value.style.chart.layout.ticks.gradient.show ? M(e.value.style.chart.layout.activeColor, a / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.activeColor;
|
|
88
|
+
if (p.value) {
|
|
89
|
+
const _ = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.width - r.value.left - r.value.right) / 100 / 3 : 0, d = r.value.left + 4 + _, g = l.value.width - r.value.right - 4 - _, y = l.value.height - r.value.bottom - a * i.value.mark - a * i.value.space - i.value.mark, m = l.value.height - r.value.bottom - a * i.value.mark - a * i.value.space - i.value.mark, C = (g - d) / e.value.style.chart.layout.curveAngleX, x = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100);
|
|
90
|
+
t.push({
|
|
91
|
+
x1: d,
|
|
92
|
+
x2: g,
|
|
93
|
+
y1: y,
|
|
94
|
+
y2: m,
|
|
95
|
+
curve: `M ${d} ${y} C ${d + C} ${y - x}, ${g - C} ${m - x}, ${g} ${m}`,
|
|
96
|
+
color: o
|
|
97
|
+
});
|
|
98
|
+
} else {
|
|
99
|
+
const _ = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.height - r.value.top - r.value.bottom) / 100 / 3 : 0, d = r.value.left + a * i.value.mark + a * i.value.space - i.value.mark, g = d, y = r.value.top + 4 + _, m = l.value.height - r.value.bottom - 4 - _, C = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100), x = (m - y) / e.value.style.chart.layout.curveAngleX;
|
|
100
|
+
t.push({
|
|
101
|
+
x1: d,
|
|
102
|
+
x2: g,
|
|
103
|
+
y1: y,
|
|
104
|
+
y2: m,
|
|
105
|
+
curve: `M ${d} ${y} C ${d + C} ${y + x}, ${g + C} ${m - x}, ${g} ${m}`,
|
|
106
|
+
color: o
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return t;
|
|
111
|
+
}), b = v(() => {
|
|
112
|
+
let t, s, a;
|
|
113
|
+
const o = e.value.style.chart.percentage.fontSize / 3;
|
|
114
|
+
return p.value ? e.value.style.chart.percentage.verticalPosition === "top" ? (t = l.value.width / 2, s = r.value.top / 2, a = "middle") : e.value.style.chart.percentage.verticalPosition === "bottom" && (t = l.value.width / 2, s = l.value.height - r.value.bottom / 2 + o, a = "middle") : e.value.style.chart.percentage.horizontalPosition === "left" ? (t = 4, s = l.value.height / 2 + o, a = "start") : e.value.style.chart.percentage.horizontalPosition === "right" && (t = l.value.width - r.value.right + 8, s = l.value.height / 2 + o, a = "start"), {
|
|
115
|
+
x: t,
|
|
116
|
+
y: s,
|
|
117
|
+
textAnchor: a,
|
|
118
|
+
bold: e.value.style.chart.percentage.bold,
|
|
119
|
+
fontSize: e.value.style.chart.percentage.fontSize,
|
|
120
|
+
fill: e.value.style.chart.percentage.color
|
|
121
|
+
};
|
|
122
|
+
}), P = f(!1);
|
|
123
|
+
function K(t) {
|
|
124
|
+
P.value = t, G.value += 1;
|
|
125
|
+
}
|
|
126
|
+
return H({
|
|
127
|
+
generatePdf: U,
|
|
128
|
+
generateImage: j
|
|
129
|
+
}), (t, s) => (n(), h("div", {
|
|
130
|
+
ref_key: "tiremarksChart",
|
|
131
|
+
ref: N,
|
|
132
|
+
class: O(`vue-ui-tiremarks ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
133
|
+
style: S(`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}`),
|
|
134
|
+
id: z.value
|
|
135
|
+
}, [
|
|
136
|
+
e.value.style.chart.title.text ? (n(), h("div", {
|
|
137
|
+
key: 0,
|
|
138
|
+
style: S(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px`)
|
|
139
|
+
}, [
|
|
140
|
+
Z(ce, {
|
|
141
|
+
config: {
|
|
142
|
+
title: {
|
|
143
|
+
cy: "wheel-title",
|
|
144
|
+
...e.value.style.chart.title
|
|
145
|
+
},
|
|
146
|
+
subtitle: {
|
|
147
|
+
cy: "wheel-subtitle",
|
|
148
|
+
...e.value.style.chart.title.subtitle
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}, null, 8, ["config"])
|
|
152
|
+
], 4)) : $("", !0),
|
|
153
|
+
e.value.userOptions.show && F.value ? (n(), L(he, {
|
|
154
|
+
ref: "details",
|
|
155
|
+
key: `user_options_${G.value}`,
|
|
156
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
157
|
+
color: e.value.style.chart.color,
|
|
158
|
+
isPrinting: k(Y),
|
|
159
|
+
isImaging: k(q),
|
|
160
|
+
uid: z.value,
|
|
161
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
162
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
163
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
164
|
+
hasXls: !1,
|
|
165
|
+
isFullscreen: P.value,
|
|
166
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
167
|
+
chartElement: N.value,
|
|
168
|
+
onToggleFullscreen: K,
|
|
169
|
+
onGeneratePdf: k(U),
|
|
170
|
+
onGenerateImage: k(j)
|
|
171
|
+
}, ee({ _: 2 }, [
|
|
172
|
+
t.$slots.optionPdf ? {
|
|
173
|
+
name: "optionPdf",
|
|
174
|
+
fn: A(() => [
|
|
175
|
+
I(t.$slots, "optionPdf", {}, void 0, !0)
|
|
176
|
+
]),
|
|
177
|
+
key: "0"
|
|
178
|
+
} : void 0,
|
|
179
|
+
t.$slots.optionImg ? {
|
|
180
|
+
name: "optionImg",
|
|
181
|
+
fn: A(() => [
|
|
182
|
+
I(t.$slots, "optionImg", {}, void 0, !0)
|
|
183
|
+
]),
|
|
184
|
+
key: "1"
|
|
185
|
+
} : void 0,
|
|
186
|
+
t.$slots.optionFullscreen ? {
|
|
187
|
+
name: "optionFullscreen",
|
|
188
|
+
fn: A(({ toggleFullscreen: a, isFullscreen: o }) => [
|
|
189
|
+
I(t.$slots, "optionFullscreen", te(ae({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
|
|
190
|
+
]),
|
|
191
|
+
key: "2"
|
|
192
|
+
} : void 0
|
|
193
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : $("", !0),
|
|
194
|
+
F.value ? (n(), h("svg", {
|
|
195
|
+
key: 2,
|
|
196
|
+
xmlns: k(ie),
|
|
197
|
+
class: O({ "vue-data-ui-fullscreen--on": P.value, "vue-data-ui-fulscreen--off": !P.value }),
|
|
198
|
+
viewBox: `0 0 ${l.value.width} ${l.value.height}`,
|
|
199
|
+
style: S(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
200
|
+
}, [
|
|
201
|
+
e.value.style.chart.layout.curved ? (n(), h("g", fe, [
|
|
202
|
+
(n(!0), h(T, null, V(E.value, (a, o) => (n(), h("path", {
|
|
203
|
+
d: a.curve,
|
|
204
|
+
"stroke-width": i.value.mark,
|
|
205
|
+
stroke: c.value >= o ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
206
|
+
"stroke-linecap": "round",
|
|
207
|
+
fill: "none",
|
|
208
|
+
class: O({ "vue-ui-tick-animated": e.value.style.chart.animation.use && o <= c.value })
|
|
209
|
+
}, null, 10, pe))), 256))
|
|
210
|
+
])) : (n(), h("g", ke, [
|
|
211
|
+
(n(!0), h(T, null, V(E.value, (a, o) => (n(), h("line", {
|
|
212
|
+
x1: a.x1,
|
|
213
|
+
y1: a.y1,
|
|
214
|
+
x2: a.x2,
|
|
215
|
+
y2: a.y2,
|
|
216
|
+
"stroke-width": i.value.mark,
|
|
217
|
+
stroke: c.value >= o ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
218
|
+
"stroke-linecap": "round"
|
|
219
|
+
}, null, 8, be))), 256))
|
|
220
|
+
])),
|
|
221
|
+
e.value.style.chart.percentage.show ? (n(), h("text", {
|
|
222
|
+
key: 2,
|
|
223
|
+
x: b.value.x,
|
|
224
|
+
y: b.value.y,
|
|
225
|
+
"font-size": b.value.fontSize,
|
|
226
|
+
fill: e.value.style.chart.layout.ticks.gradient.show && e.value.style.chart.percentage.useGradientColor ? k(M)(e.value.style.chart.layout.activeColor, c.value / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.percentage.color,
|
|
227
|
+
"font-weight": b.value.bold ? "bold" : "normal",
|
|
228
|
+
"text-anchor": b.value.textAnchor
|
|
229
|
+
}, le(c.value.toFixed(e.value.style.chart.percentage.rounding) + "%"), 9, _e)) : $("", !0),
|
|
230
|
+
I(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
231
|
+
], 14, me)) : $("", !0),
|
|
232
|
+
F.value ? $("", !0) : (n(), L(de, {
|
|
233
|
+
key: 3,
|
|
234
|
+
config: {
|
|
235
|
+
type: "tiremarks",
|
|
236
|
+
style: {
|
|
237
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
238
|
+
tiremarks: {
|
|
239
|
+
color: "#CCCCCC"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}, null, 8, ["config"]))
|
|
244
|
+
], 14, ye));
|
|
245
|
+
}
|
|
246
|
+
}, Oe = /* @__PURE__ */ ge(Ce, [["__scopeId", "data-v-1bbd1baf"]]);
|
|
247
|
+
export {
|
|
248
|
+
Oe as default
|
|
249
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-p5gfZSvB.cjs"),ke=require("./Title-Bb-A5OSV.cjs"),ne=require("./usePrinter-fZlsJid8.cjs"),Ce=require("./Tooltip-C_UE6y-E.cjs"),we=require("./Legend-D59FIuMs.cjs"),xe=require("./vue-ui-skeleton-sjfOtCZr.cjs"),Te=require("./DataTable-Rm9II-m2.cjs"),$e=require("./vue-ui-accordion-C_pwrAJl.cjs"),re=require("./useResponsive-B3TrDDIG.cjs"),ue=require("./useNestedProp-2kIU-7On.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function se(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,i=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>i&&(i=p),v+=p}return Math.max(d**2*i/v**2,v**2/(d**2*u))}}function ie(n){const{xOffset:d,yOffset:s,width:u,height:i}=n;return{x0:d,y0:s,x1:d+u,y1:s+i}}function Ne(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),i=se(n,s),v=se(u,s);return i>=v}}function _e(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const i=n[u],v=i.length;for(let h=0;h<v;h+=1)d.push(i[h])}return d}function Be(n,d){const s={...d,children:n};return de(s)}function ze(n){return(n.x1-n.x0)*(n.y1-n.y0)}function ce(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(d),h=n.length,f=n.map(m=>m.normalizedValue||0).reduce((m,k)=>m+k,0),p=f/u,C=f/s;let b=i,w=v;const g=[];if(s>=u){for(let m=0;m<h;m+=1){const k=n[m],x=w+k.normalizedValue/p,t={x0:b,y0:w,x1:b+p,y1:x},S=Object.assign({},k,t);w=x,g.push(S)}return g}else{for(let m=0;m<h;m+=1){const k=n[m],x=b+k.normalizedValue/C,t={x0:b,y0:w,x1:x,y1:w+C},S=Object.assign({},k,t);b=x,g.push(S)}return g}}function Oe(n){const d=W(n),s=d.width,u=d.height;return Math.min(s,u)}function Pe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),i=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(i||0)}),v.push(h);return v}function W(n){const{x0:d,y0:s,x1:u,y1:i}=n;return{xOffset:d,yOffset:s,width:u-d,height:i-s}}function Ve(n,d,s,u){let i=n,v=d,h=s,f=u;for(;;){const p=i.length;if(p===0){const g=ce(v,h);return f.concat(g)}const C=Oe(h),b=i[0],w=i.slice(1,p);if(Ne(v,b,C)){const g=v.concat(b);i=w,v=g,h=h,f=f}else{const g=v.length;let m=0;for(let S=0;S<g;S+=1)m+=v[S].normalizedValue;const k=Ee(h,m),x=ce(v,h),t=f.concat(x);i=i,v=[],h=k,f=t}}}function de(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=Pe(n.children,ze(n)),s=Ve(d,[],n,[]),u=s.length,i=[];for(let h=0;h<u;h+=1)i.push(de(s[h]));return _e(i)}}function Ee(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=W(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:i+h,yOffset:v,width:f,height:u};return ie(p)}else{const h=d/s,f=u-h,p={xOffset:i,yOffset:v+h,width:s,height:f};return ie(p)}}const Fe=n=>(e.pushScopeId("data-v-7489c985"),n=n(),e.popScopeId(),n),Re=["id"],Ie=["xmlns","viewBox"],Le={key:0},De=["id"],qe=["stop-color"],Ae=["stop-color"],He=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Me=["x","y","height","width"],We={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},Ue=Fe(()=>e.createElementVNode("br",null,null,-1)),Ge=["onClick"],je={key:0},Xe={key:1},Ye=["innerHTML"],Ze={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:i}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),g=e.ref([]),m=e.ref(null),k=e.ref(null),x=e.ref(null),t=e.computed(()=>{const o=ue.useNestedProp({userConfig:u.config,defaultConfig:i});return o.theme?{...ue.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}),{isPrinting:S,isImaging:ve,generatePdf:U,generateImage:G}=ne.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),L=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),N=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),_=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),z=e.computed(()=>({bottom:_.value.height-t.value.style.chart.padding.bottom,height:_.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:_.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:_.value.height,vbWidth:_.value.width,width:_.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function j(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||L.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(c=>{c.parentId=a.id,c.color=a.color}),j(a.children))})}const O=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),j(O.value),t.value.responsive){const o=re.throttle(()=>{const{width:a,height:l}=re.useResponsive({chart:m.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});_.value.width=a,_.value.height=l});D.value=new ResizeObserver(o),D.value.observe(m.value.parentNode)}}),e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const H=e.ref(O.value),R=e.computed(()=>H.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||L.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!g.value.includes(o.id))),E=e.computed(()=>O.value.filter(o=>!g.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),X=e.computed({get(){let o=[...R.value];return t.value.style.chart.layout.sorted&&(o=[...R.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function Y(o,a){return o.value/a}function he(o,a,l){const c=t.value.style.chart.layout.rects.colorRatio-Y(a,l);return r.lightenHexColor(o,c<0?0:c)}function Z(o,a,l,c){return o.map((y,V)=>{const A=he(r.convertColorToHex(a)||L.value[V]||r.palette[V]||r.palette[V%r.palette.length],y,c),be=Y(y,c);return{...y,color:A,proportion:be,parentName:l,children:y.children?Z(y.children,A,y.name,c):void 0}})}const I=e.computed(()=>Be(X.value.map((o,a)=>{const l=o.children?o.children.reduce((c,y)=>c+y.value,0):o.value;return{value:o.value,id:o.id,children:o.children?Z(o.children.sort((c,y)=>y.value-c.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:z.value.left*2,y0:z.value.top,x1:z.value.width,y1:z.value.height}));function J({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function K({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function P(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function pe(o){b.value=o,w.value+=1}const F=e.computed(()=>({startX:0,startY:0,width:z.value.vbWidth,height:z.value.vbHeight})),T=e.ref(!1);function Q(o,a=O.value){for(const l of a){if(l.id===o)return l;if(l.children){const c=Q(o,l.children);if(c)return c}}return null}function fe(o){T.value?(s("selectDatapoint",void 0),H.value=O.value):(s("selectDatapoint",o),H.value=[Q(o.parentId)]),T.value=!T.value}const $=e.ref(null),ee=e.computed(()=>O.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||L.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/O.value.map(l=>l.value).reduce((l,c)=>l+c,0),opacity:g.value.includes(o.id)?.5:1}))),ge=e.computed(()=>({cy:"treemap-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""}));function te(o){T.value=!1,$.value=null,g.value.includes(o.id)?g.value=g.value.filter(a=>a!==o.id):g.value.length<u.dataset.length-1&&g.value.push(o.id),s("selectLegend",X.value)}const M=e.ref(null);function me({datapoint:o,seriesIndex:a}){$.value=o,M.value={datapoint:o,seriesIndex:a,config:t.value,series:R.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:R.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:R.value,config:t.value});else{let c="";c+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,c+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${o.color}"/></svg>`,c+=`<b>${r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`,C.value=`<div>${c}</div>`}p.value=!0}const B=e.computed(()=>{const o=I.value.map(l=>({name:l.name,color:l.color})),a=I.value.map(l=>l.value);return{head:o,body:a}});function oe(){e.nextTick(()=>{const o=B.value.head.map((c,y)=>[[c.name],[B.value.body[y]],[isNaN(B.value.body[y]/E.value)?"-":B.value.body[y]/E.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=B.value.head.map((y,V)=>{const A=r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:B.value.body[V],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue});return[{color:y.color,name:y.name,shape:"square"},A,isNaN(B.value.body[V]/E.value)?"-":(B.value.body[V]/E.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]}),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}});function ye(){return I.value}function le(){N.value.showTable=!N.value.showTable}function ae(){N.value.showTooltip=!N.value.showTooltip}return d({getData:ye,generateCsv:oe,generateImage:G,generatePdf:U,toggleTable:le,toggleTooltip:ae}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:m,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[e.createVNode(ke._sfc_main,{config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(ne.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(S),isImaging:e.unref(ve),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:N.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(U),onGenerateCsv:oe,onGenerateImage:e.unref(G),onToggleTable:le,onToggleTooltip:ae},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:c})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:c})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!T.value,"vue-data-ui-zoom-minus":T.value}),viewBox:`${F.value.startX} ${F.value.startY} ${F.value.width<=0?10:F.value.width} ${F.value.height<=0?10:F.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",Le,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ae)],8,De)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(l,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:J(l),width:K(l),fill:h.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":$.value&&$.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>fe(l),onMouseenter:()=>me({datapoint:l,seriesIndex:c}),onMouseleave:a[0]||(a[0]=y=>{$.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${$.value?$.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,He),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:J(l),width:K(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",We,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${P(l)/1.5}px);text-align:left;line-height:${P(l)<14?14:P(l)}px;padding:${P(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${P(l)}px;`)},e.toDisplayString(l.name),5),Ue,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${P(l)}px;`)},e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value,fontSize:P(l),isZoom:T.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,Me))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:z.value,isZoom:T.value,rect:$.value,config:t.value})),void 0,!0)],14,Ie)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:3,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(we.Legend,{key:0,legendSet:ee.value,config:ge.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>te(l))},{item:e.withCtx(({legend:l,index:c})=>[e.createElementVNode("div",{onClick:y=>te(l),style:e.normalizeStyle(`opacity:${g.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",Xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",je," ("+e.toDisplayString(isNaN(l.value/E.value)?"-":(l.value/E.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,Ge)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:ee.value},void 0,!0)],512),e.createVNode(Ce._sfc_main,{show:N.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:m.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...M.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","parent","content","isCustom"]),v.value?(e.openBlock(),e.createBlock($e.default,{key:4,hideDetails:"",config:{open:N.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(Te.DataTable,{colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>N.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,Ye)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Re))}},Je=Se._export_sfc(Ze,[["__scopeId","data-v-7489c985"]]);exports.default=Je;
|