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,614 @@
|
|
|
1
|
+
import { computed as v, ref as i, onMounted as Ae, onBeforeUnmount as Se, openBlock as s, createElementBlock as n, normalizeClass as z, normalizeStyle as V, createVNode as E, createCommentVNode as p, createBlock as B, unref as y, createSlots as ze, withCtx as f, renderSlot as b, normalizeProps as J, guardReactiveProps as Y, createElementVNode as w, Fragment as $, renderList as x, toDisplayString as L, createTextVNode as de, nextTick as Le } from "vue";
|
|
2
|
+
import { u as Re, c as Me, t as Ue, a as Ve, p as P, o as Ee, e as N, b as Be, g as ve, d as he, I as ge, f as pe, X as De, s as Ge, r as K, J as ye, v as We, w as Xe, n as je, q as qe } from "./index-uOtklCCx.js";
|
|
3
|
+
import { t as He, u as Je } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
+
import { _ as Ye } from "./Title-2iks1ziC.js";
|
|
5
|
+
import { u as Ke, U as Qe } from "./usePrinter-B6xQCyL-.js";
|
|
6
|
+
import { _ as Ze } from "./Tooltip-C3phqKuU.js";
|
|
7
|
+
import et from "./vue-ui-sparkbar-C0k4ah-7.js";
|
|
8
|
+
import { L as tt } from "./Legend-CxvJTjEm.js";
|
|
9
|
+
import { D as at } from "./DataTable-CwaOlAsy.js";
|
|
10
|
+
import ot from "./vue-ui-skeleton-BM9rwmxY.js";
|
|
11
|
+
import lt from "./vue-ui-accordion-HJPf7My0.js";
|
|
12
|
+
import { u as fe } from "./useNestedProp-BgWkUab_.js";
|
|
13
|
+
import { _ as rt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const st = ["id"], nt = ["xmlns", "viewBox"], ut = ["id"], it = ["stop-color"], ct = ["stop-color"], dt = { key: 0 }, vt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], ht = { key: 0 }, gt = ["d", "stroke", "stroke-width"], pt = ["d", "stroke", "stroke-width"], yt = { key: 1 }, ft = ["x", "y", "text-anchor", "font-size", "fill", "onMouseenter"], mt = ["points", "stroke", "stroke-width"], bt = ["points", "stroke", "stroke-width", "fill"], kt = { key: 2 }, Ct = ["cx", "cy", "fill", "r", "stroke"], _t = ["onClick"], wt = {
|
|
15
|
+
key: 0,
|
|
16
|
+
style: { "max-width": "200px", margin: "0 auto" }
|
|
17
|
+
}, $t = {
|
|
18
|
+
__name: "vue-ui-radar",
|
|
19
|
+
props: {
|
|
20
|
+
config: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default() {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
dataset: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default() {
|
|
29
|
+
return {};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
emits: ["selectLegend"],
|
|
34
|
+
setup(me, { expose: be, emit: ke }) {
|
|
35
|
+
const h = me, { vue_ui_radar: Ce } = Re(), I = v(() => !!h.dataset && Object.keys(h.dataset).length), _ = i(Me()), _e = i(null), D = i(!1), G = i(""), Q = i(0), O = i(null), Z = i(null), ee = i(null), e = v(() => {
|
|
36
|
+
const t = fe({
|
|
37
|
+
userConfig: h.config,
|
|
38
|
+
defaultConfig: Ce
|
|
39
|
+
});
|
|
40
|
+
return t.theme ? {
|
|
41
|
+
...fe({
|
|
42
|
+
userConfig: Ue.vue_ui_radar[t.theme] || h.config,
|
|
43
|
+
defaultConfig: t
|
|
44
|
+
}),
|
|
45
|
+
customPalette: Ve[t.theme] || P
|
|
46
|
+
} : t;
|
|
47
|
+
}), R = i(null);
|
|
48
|
+
Ae(() => {
|
|
49
|
+
if (Ee(h.dataset) && N({
|
|
50
|
+
componentName: "VueUiRadar",
|
|
51
|
+
type: "dataset"
|
|
52
|
+
}), e.value.responsive) {
|
|
53
|
+
const t = He(() => {
|
|
54
|
+
const { width: a, height: o } = Je({
|
|
55
|
+
chart: O.value,
|
|
56
|
+
title: e.value.style.chart.title.text ? Z.value : null,
|
|
57
|
+
legend: e.value.style.chart.legend.show ? ee.value : null
|
|
58
|
+
});
|
|
59
|
+
u.value.width = a, u.value.height = o;
|
|
60
|
+
});
|
|
61
|
+
R.value = new ResizeObserver(t), R.value.observe(O.value.parentNode);
|
|
62
|
+
}
|
|
63
|
+
}), Se(() => {
|
|
64
|
+
R.value && R.value.disconnect();
|
|
65
|
+
});
|
|
66
|
+
const { isPrinting: we, isImaging: $e, generatePdf: te, generateImage: ae } = Ke({
|
|
67
|
+
elementId: `vue-ui-radar_${_.value}`,
|
|
68
|
+
fileName: e.value.style.chart.title.text || "vue-ui-radar"
|
|
69
|
+
}), oe = v(() => Be(e.value.customPalette)), k = i({
|
|
70
|
+
dataLabels: {
|
|
71
|
+
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
72
|
+
},
|
|
73
|
+
showTable: e.value.table.show,
|
|
74
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
75
|
+
}), xe = v(() => ({
|
|
76
|
+
style: {
|
|
77
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
78
|
+
animation: {
|
|
79
|
+
show: e.value.style.chart.tooltip.animation.show,
|
|
80
|
+
animationFrames: e.value.style.chart.tooltip.animation.animationFrames
|
|
81
|
+
},
|
|
82
|
+
labels: {
|
|
83
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
84
|
+
name: {
|
|
85
|
+
color: e.value.style.chart.tooltip.color
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
gutter: {
|
|
89
|
+
backgroundColor: "#CCCCCC",
|
|
90
|
+
opacity: 30
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
})), u = i({
|
|
94
|
+
height: 312,
|
|
95
|
+
width: 512
|
|
96
|
+
}), c = i([]), A = i(null), T = i(!1);
|
|
97
|
+
function le(t) {
|
|
98
|
+
T.value = !0, c.value.includes(t) ? (A.value = t, c.value = c.value.filter((a) => a !== t), setTimeout(() => {
|
|
99
|
+
T.value = !1, A.value = null;
|
|
100
|
+
}, 500)) : (c.value.push(t), setTimeout(() => {
|
|
101
|
+
T.value = !1;
|
|
102
|
+
}, 500)), ke("selectLegend", F.value.filter((a, o) => !c.value.includes(o)).map((a) => ({
|
|
103
|
+
name: a.name,
|
|
104
|
+
color: a.color,
|
|
105
|
+
proportion: a.totalProportion
|
|
106
|
+
})));
|
|
107
|
+
}
|
|
108
|
+
function Pe() {
|
|
109
|
+
return F.value.map((t) => ({
|
|
110
|
+
name: t.name,
|
|
111
|
+
color: t.color,
|
|
112
|
+
proportion: t.totalProportion
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
115
|
+
const g = v(() => [null, void 0].includes(h.dataset.categories) ? (N({
|
|
116
|
+
componentName: "VueUiRadar",
|
|
117
|
+
type: "datasetAttribute",
|
|
118
|
+
property: "categories ({ name: string; prefix?: string; suffix?: string}[])"
|
|
119
|
+
}), []) : (h.dataset.categories.length === 0 ? N({
|
|
120
|
+
componentName: "VueUiRadar",
|
|
121
|
+
type: "datasetAttributeEmpty",
|
|
122
|
+
property: "categories"
|
|
123
|
+
}) : h.dataset.categories.forEach((t, a) => {
|
|
124
|
+
ve({
|
|
125
|
+
datasetObject: t,
|
|
126
|
+
requiredAttributes: ["name"]
|
|
127
|
+
}).forEach((o) => {
|
|
128
|
+
N({
|
|
129
|
+
componentName: "VueUiRadar",
|
|
130
|
+
type: "datasetAttribute",
|
|
131
|
+
property: `category.${o} at index ${a}`,
|
|
132
|
+
index: a
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
}), [null, void 0].includes(h.dataset.series) ? N({
|
|
136
|
+
componentName: "VueUiRadar",
|
|
137
|
+
type: "datasetAttribute",
|
|
138
|
+
property: "series ({ name: string; values: number[]; color?: string; target: number}[])"
|
|
139
|
+
}) : h.dataset.series.forEach((t, a) => {
|
|
140
|
+
ve({
|
|
141
|
+
datasetObject: t,
|
|
142
|
+
requiredAttributes: ["name", "values", "target"]
|
|
143
|
+
}).forEach((o) => {
|
|
144
|
+
N({
|
|
145
|
+
componentName: "VueUiRadar",
|
|
146
|
+
type: "datasetSerieAttribute",
|
|
147
|
+
key: "series",
|
|
148
|
+
property: o,
|
|
149
|
+
index: a
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
}), h.dataset.categories.map((t, a) => ({
|
|
153
|
+
name: t.name,
|
|
154
|
+
categoryId: `radar_category_${_.value}_${a}`,
|
|
155
|
+
color: he(t.color) || oe.value[a] || P[a] || P[a % P.length],
|
|
156
|
+
prefix: t.prefix ?? "",
|
|
157
|
+
suffix: t.suffix ?? ""
|
|
158
|
+
})))), m = v(() => I.value ? h.dataset.series.map((t, a) => ({
|
|
159
|
+
...t,
|
|
160
|
+
color: he(t.color) || oe.value[a] || P[a] || P[a % P.length],
|
|
161
|
+
serieId: `radar_serie_${_.value}_${a}`
|
|
162
|
+
})) : []), re = v(() => Math.max(...m.value.flatMap((t) => t.values))), se = v(() => m.value.length), W = v(() => Math.min(u.value.width, u.value.height) / 3), ne = v(() => ge({
|
|
163
|
+
plot: { x: u.value.width / 2, y: u.value.height / 2 },
|
|
164
|
+
radius: W.value,
|
|
165
|
+
sides: se.value,
|
|
166
|
+
rotation: 0
|
|
167
|
+
})), Te = v(() => {
|
|
168
|
+
const t = [];
|
|
169
|
+
for (let a = 0; a < W.value; a += W.value / e.value.style.chart.layout.grid.graduations)
|
|
170
|
+
t.push(a);
|
|
171
|
+
return t;
|
|
172
|
+
}), C = v(() => ne.value.coordinates.map((t, a) => {
|
|
173
|
+
const o = m.value[a].values.map((l) => Fe({
|
|
174
|
+
centerX: u.value.width / 2,
|
|
175
|
+
centerY: u.value.height / 2,
|
|
176
|
+
apexX: t.x,
|
|
177
|
+
apexY: t.y,
|
|
178
|
+
proportion: l / (m.value[a].target || re.value)
|
|
179
|
+
}));
|
|
180
|
+
return {
|
|
181
|
+
...t,
|
|
182
|
+
...m.value[a],
|
|
183
|
+
plots: o
|
|
184
|
+
};
|
|
185
|
+
}));
|
|
186
|
+
function X({ x: t, y: a }) {
|
|
187
|
+
let o = "middle";
|
|
188
|
+
return t = Math.round(t), a = Math.round(a), t > u.value.width / 2 && (t += 12, o = "start"), t < u.value.width / 2 && (t -= 12, o = "end"), a > u.value.height / 2 && (a += 20), a < u.value.height / 2 && (a -= 12), a === u.value.height / 2 && (a += 4), { x: t, y: a, anchor: o };
|
|
189
|
+
}
|
|
190
|
+
function Fe({ centerX: t, centerY: a, apexX: o, apexY: l, proportion: r }) {
|
|
191
|
+
return {
|
|
192
|
+
x: t + (o - t) * r,
|
|
193
|
+
y: a + (l - a) * r
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
const F = v(() => {
|
|
197
|
+
const t = m.value.map((a, o) => a.values.map((l) => l / (a.target || re.value)));
|
|
198
|
+
return g.value.map((a, o) => ({
|
|
199
|
+
...a,
|
|
200
|
+
totalProportion: t.map((l) => l[o]).reduce((l, r) => l + r, 0) / m.value.length,
|
|
201
|
+
shape: "circle",
|
|
202
|
+
opacity: c.value.includes(o) ? 0.5 : 1,
|
|
203
|
+
segregate: () => le(o),
|
|
204
|
+
isSegregated: c.value.includes(o)
|
|
205
|
+
}));
|
|
206
|
+
}), Ne = v(() => ({
|
|
207
|
+
cy: "radar-div-legend",
|
|
208
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
209
|
+
color: e.value.style.chart.legend.color,
|
|
210
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
211
|
+
paddingBottom: 12,
|
|
212
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
213
|
+
})), M = v(() => {
|
|
214
|
+
const t = [
|
|
215
|
+
{ name: e.value.translations.datapoint, color: "" },
|
|
216
|
+
{ name: e.value.translations.target, color: "" },
|
|
217
|
+
...F.value
|
|
218
|
+
], a = h.dataset.series.map((l) => [
|
|
219
|
+
l.name,
|
|
220
|
+
l.target,
|
|
221
|
+
...l.values.map((r, d) => `${pe({ p: g.value[d].prefix, v: r, s: g.value[d].suffix, r: e.value.table.td.roundingValue })} (${isNaN(r / l.target) ? "" : (r / l.target * 100).toFixed(e.value.table.td.roundingPercentage)}%)`)
|
|
222
|
+
]), o = {
|
|
223
|
+
th: {
|
|
224
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
225
|
+
color: e.value.table.th.color,
|
|
226
|
+
outline: e.value.table.th.outline
|
|
227
|
+
},
|
|
228
|
+
td: {
|
|
229
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
230
|
+
color: e.value.table.td.color,
|
|
231
|
+
outline: e.value.table.td.outline
|
|
232
|
+
},
|
|
233
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
234
|
+
};
|
|
235
|
+
return { head: t, body: a, config: o, colNames: t };
|
|
236
|
+
}), U = i(null), j = i([]), q = i(null);
|
|
237
|
+
function Ie(t, a) {
|
|
238
|
+
j.value = [], U.value = a, D.value = !0;
|
|
239
|
+
let o = "";
|
|
240
|
+
q.value = {
|
|
241
|
+
datapoint: t,
|
|
242
|
+
seriesIndex: a,
|
|
243
|
+
series: {
|
|
244
|
+
categories: g.value,
|
|
245
|
+
datapoints: m.value,
|
|
246
|
+
radar: C.value
|
|
247
|
+
},
|
|
248
|
+
config: e.value
|
|
249
|
+
};
|
|
250
|
+
const l = e.value.style.chart.tooltip.customFormat;
|
|
251
|
+
if (We(l) && Xe(() => l({
|
|
252
|
+
seriesIndex: a,
|
|
253
|
+
datapoint: t,
|
|
254
|
+
series: { categories: g.value, datapoints: m.value, radar: C.value },
|
|
255
|
+
config: e.value
|
|
256
|
+
})))
|
|
257
|
+
G.value = l({
|
|
258
|
+
seriesIndex: a,
|
|
259
|
+
datapoint: t,
|
|
260
|
+
series: { categories: g.value, datapoints: m.value, radar: C.value },
|
|
261
|
+
config: e.value
|
|
262
|
+
});
|
|
263
|
+
else {
|
|
264
|
+
o += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`;
|
|
265
|
+
for (let r = 0; r < t.values.length; r += 1)
|
|
266
|
+
c.value.includes(r) || j.value.push({
|
|
267
|
+
name: g.value[r].name,
|
|
268
|
+
value: t.values[r] / t.target * 100,
|
|
269
|
+
color: g.value[r].color,
|
|
270
|
+
suffix: "%)",
|
|
271
|
+
prefix: `${pe({ p: g.value[r].prefix ?? "", v: t.values[r], s: g.value[r].suffix ?? "", r: e.value.style.chart.tooltip.roundingValue })} (`,
|
|
272
|
+
rounding: e.value.style.chart.tooltip.roundingPercentage
|
|
273
|
+
});
|
|
274
|
+
G.value = o;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
function ue() {
|
|
278
|
+
Le(() => {
|
|
279
|
+
const t = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], a = [[""], [e.value.translations.target], ...F.value.flatMap((d) => [[d.name], ["%"]])], o = h.dataset.series.map((d, xt) => [d.name, d.target, ...d.values.flatMap((H) => [
|
|
280
|
+
H,
|
|
281
|
+
isNaN(H / d.target) ? "" : H / d.target * 100
|
|
282
|
+
])]), l = t.concat([a]).concat(o), r = je(l);
|
|
283
|
+
qe({ csvContent: r, title: e.value.style.chart.title.text || "vue-ui-radar" });
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
const S = i(!1);
|
|
287
|
+
function Oe(t) {
|
|
288
|
+
S.value = t, Q.value += 1;
|
|
289
|
+
}
|
|
290
|
+
function ie() {
|
|
291
|
+
k.value.showTable = !k.value.showTable;
|
|
292
|
+
}
|
|
293
|
+
function ce() {
|
|
294
|
+
k.value.showTooltip = !k.value.showTooltip;
|
|
295
|
+
}
|
|
296
|
+
return be({
|
|
297
|
+
getData: Pe,
|
|
298
|
+
generatePdf: te,
|
|
299
|
+
generateCsv: ue,
|
|
300
|
+
generateImage: ae,
|
|
301
|
+
toggleTable: ie,
|
|
302
|
+
toggleTooltip: ce
|
|
303
|
+
}), (t, a) => (s(), n("div", {
|
|
304
|
+
class: z(`vue-ui-radar ${S.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
305
|
+
ref_key: "radarChart",
|
|
306
|
+
ref: O,
|
|
307
|
+
id: `vue-ui-radar_${_.value}`,
|
|
308
|
+
style: V(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height: 100%;" : ""} text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor}`)
|
|
309
|
+
}, [
|
|
310
|
+
e.value.style.chart.title.text ? (s(), n("div", {
|
|
311
|
+
key: 0,
|
|
312
|
+
ref_key: "chartTitle",
|
|
313
|
+
ref: Z,
|
|
314
|
+
style: V(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px`)
|
|
315
|
+
}, [
|
|
316
|
+
E(Ye, {
|
|
317
|
+
config: {
|
|
318
|
+
title: {
|
|
319
|
+
cy: "radar-div-title",
|
|
320
|
+
...e.value.style.chart.title
|
|
321
|
+
},
|
|
322
|
+
subtitle: {
|
|
323
|
+
cy: "radar-div-subtitle",
|
|
324
|
+
...e.value.style.chart.title.subtitle
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}, null, 8, ["config"])
|
|
328
|
+
], 4)) : p("", !0),
|
|
329
|
+
e.value.userOptions.show && I.value ? (s(), B(Qe, {
|
|
330
|
+
ref_key: "details",
|
|
331
|
+
ref: _e,
|
|
332
|
+
key: `user_options_${Q.value}`,
|
|
333
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
334
|
+
color: e.value.style.chart.color,
|
|
335
|
+
isImaging: y($e),
|
|
336
|
+
isPrinting: y(we),
|
|
337
|
+
uid: _.value,
|
|
338
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
339
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
340
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
341
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
342
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
343
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
344
|
+
isFullscreen: S.value,
|
|
345
|
+
isTooltip: k.value.showTooltip,
|
|
346
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
347
|
+
chartElement: O.value,
|
|
348
|
+
onToggleFullscreen: Oe,
|
|
349
|
+
onGeneratePdf: y(te),
|
|
350
|
+
onGenerateCsv: ue,
|
|
351
|
+
onGenerateImage: y(ae),
|
|
352
|
+
onToggleTable: ie,
|
|
353
|
+
onToggleTooltip: ce
|
|
354
|
+
}, ze({ _: 2 }, [
|
|
355
|
+
t.$slots.optionTooltip ? {
|
|
356
|
+
name: "optionTooltip",
|
|
357
|
+
fn: f(() => [
|
|
358
|
+
b(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
359
|
+
]),
|
|
360
|
+
key: "0"
|
|
361
|
+
} : void 0,
|
|
362
|
+
t.$slots.optionPdf ? {
|
|
363
|
+
name: "optionPdf",
|
|
364
|
+
fn: f(() => [
|
|
365
|
+
b(t.$slots, "optionPdf", {}, void 0, !0)
|
|
366
|
+
]),
|
|
367
|
+
key: "1"
|
|
368
|
+
} : void 0,
|
|
369
|
+
t.$slots.optionCsv ? {
|
|
370
|
+
name: "optionCsv",
|
|
371
|
+
fn: f(() => [
|
|
372
|
+
b(t.$slots, "optionCsv", {}, void 0, !0)
|
|
373
|
+
]),
|
|
374
|
+
key: "2"
|
|
375
|
+
} : void 0,
|
|
376
|
+
t.$slots.optionImg ? {
|
|
377
|
+
name: "optionImg",
|
|
378
|
+
fn: f(() => [
|
|
379
|
+
b(t.$slots, "optionImg", {}, void 0, !0)
|
|
380
|
+
]),
|
|
381
|
+
key: "3"
|
|
382
|
+
} : void 0,
|
|
383
|
+
t.$slots.optionTable ? {
|
|
384
|
+
name: "optionTable",
|
|
385
|
+
fn: f(() => [
|
|
386
|
+
b(t.$slots, "optionTable", {}, void 0, !0)
|
|
387
|
+
]),
|
|
388
|
+
key: "4"
|
|
389
|
+
} : void 0,
|
|
390
|
+
t.$slots.optionFullscreen ? {
|
|
391
|
+
name: "optionFullscreen",
|
|
392
|
+
fn: f(({ toggleFullscreen: o, isFullscreen: l }) => [
|
|
393
|
+
b(t.$slots, "optionFullscreen", J(Y({ toggleFullscreen: o, isFullscreen: l })), void 0, !0)
|
|
394
|
+
]),
|
|
395
|
+
key: "5"
|
|
396
|
+
} : void 0
|
|
397
|
+
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : p("", !0),
|
|
398
|
+
I.value ? (s(), n("svg", {
|
|
399
|
+
key: 2,
|
|
400
|
+
xmlns: y(De),
|
|
401
|
+
class: z({ "vue-data-ui-fullscreen--on": S.value, "vue-data-ui-fulscreen--off": !S.value }),
|
|
402
|
+
viewBox: `0 0 ${u.value.width <= 0 ? 10 : u.value.width} ${u.value.height <= 0 ? 10 : u.value.height}`,
|
|
403
|
+
style: V(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
404
|
+
}, [
|
|
405
|
+
w("defs", null, [
|
|
406
|
+
(s(!0), n($, null, x(g.value, (o, l) => (s(), n("radialGradient", {
|
|
407
|
+
cx: "50%",
|
|
408
|
+
cy: "50%",
|
|
409
|
+
r: "50%",
|
|
410
|
+
fx: "50%",
|
|
411
|
+
fy: "50%",
|
|
412
|
+
id: `radar_gradient_${_.value}_${l}`
|
|
413
|
+
}, [
|
|
414
|
+
w("stop", {
|
|
415
|
+
offset: "0%",
|
|
416
|
+
"stop-color": `${y(Ge)(o.color, 0.05)}${y(K)[e.value.style.chart.layout.dataPolygon.opacity]}`
|
|
417
|
+
}, null, 8, it),
|
|
418
|
+
w("stop", {
|
|
419
|
+
offset: "100%",
|
|
420
|
+
"stop-color": o.color + y(K)[e.value.style.chart.layout.dataPolygon.opacity]
|
|
421
|
+
}, null, 8, ct)
|
|
422
|
+
], 8, ut))), 256))
|
|
423
|
+
]),
|
|
424
|
+
e.value.style.chart.layout.grid.show ? (s(), n("g", dt, [
|
|
425
|
+
(s(!0), n($, null, x(C.value, (o) => (s(), n("line", {
|
|
426
|
+
x1: u.value.width / 2,
|
|
427
|
+
y1: u.value.height / 2,
|
|
428
|
+
x2: o.x,
|
|
429
|
+
y2: o.y,
|
|
430
|
+
stroke: e.value.style.chart.layout.grid.stroke,
|
|
431
|
+
"stroke-width": e.value.style.chart.layout.grid.strokeWidth
|
|
432
|
+
}, null, 8, vt))), 256)),
|
|
433
|
+
e.value.style.chart.layout.grid.graduations > 0 ? (s(), n("g", ht, [
|
|
434
|
+
(s(!0), n($, null, x(Te.value, (o) => (s(), n("path", {
|
|
435
|
+
d: y(ge)({
|
|
436
|
+
plot: { x: u.value.width / 2, y: u.value.height / 2 },
|
|
437
|
+
radius: o,
|
|
438
|
+
sides: se.value,
|
|
439
|
+
rotation: 0
|
|
440
|
+
}).path,
|
|
441
|
+
fill: "none",
|
|
442
|
+
stroke: e.value.style.chart.layout.grid.stroke,
|
|
443
|
+
"stroke-width": e.value.style.chart.layout.grid.strokeWidth
|
|
444
|
+
}, null, 8, gt))), 256))
|
|
445
|
+
])) : p("", !0)
|
|
446
|
+
])) : p("", !0),
|
|
447
|
+
w("path", {
|
|
448
|
+
d: ne.value.path,
|
|
449
|
+
fill: "none",
|
|
450
|
+
stroke: e.value.style.chart.layout.outerPolygon.stroke,
|
|
451
|
+
"stroke-width": e.value.style.chart.layout.outerPolygon.strokeWidth,
|
|
452
|
+
"stroke-linejoin": "round",
|
|
453
|
+
"stroke-linecap": "round"
|
|
454
|
+
}, null, 8, pt),
|
|
455
|
+
e.value.style.chart.layout.labels.dataLabels.show ? (s(), n("g", yt, [
|
|
456
|
+
(s(!0), n($, null, x(C.value, (o, l) => (s(), n("text", {
|
|
457
|
+
x: X(o).x,
|
|
458
|
+
y: X(o).y,
|
|
459
|
+
"text-anchor": X(o).anchor,
|
|
460
|
+
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
461
|
+
fill: e.value.style.chart.layout.labels.dataLabels.color,
|
|
462
|
+
onMouseenter: (r) => Ie(o, l),
|
|
463
|
+
onMouseleave: a[0] || (a[0] = (r) => {
|
|
464
|
+
D.value = !1, U.value = null;
|
|
465
|
+
})
|
|
466
|
+
}, L(o.name), 41, ft))), 256))
|
|
467
|
+
])) : p("", !0),
|
|
468
|
+
(s(!0), n($, null, x(g.value, (o, l) => (s(), n("g", null, [
|
|
469
|
+
w("g", null, [
|
|
470
|
+
e.value.useCssAnimation || !e.value.useCssAnimation && !c.value.includes(l) ? (s(), n("polygon", {
|
|
471
|
+
key: 0,
|
|
472
|
+
"data-cy-radar-path": "",
|
|
473
|
+
points: y(ye)(C.value.map((r) => r.plots[l]), !1, !0),
|
|
474
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
475
|
+
"stroke-width": e.value.style.chart.layout.dataPolygon.strokeWidth + 1,
|
|
476
|
+
fill: "none",
|
|
477
|
+
class: z({ "animated-out": c.value.includes(l) && e.value.useCssAnimation, "animated-in": T.value && A.value === l && e.value.useCssAnimation })
|
|
478
|
+
}, null, 10, mt)) : p("", !0),
|
|
479
|
+
e.value.useCssAnimation || !e.value.useCssAnimation && !c.value.includes(l) ? (s(), n("polygon", {
|
|
480
|
+
key: 1,
|
|
481
|
+
"data-cy-radar-path": "",
|
|
482
|
+
points: y(ye)(C.value.map((r) => r.plots[l]), !1, !0),
|
|
483
|
+
stroke: o.color,
|
|
484
|
+
"stroke-width": e.value.style.chart.layout.dataPolygon.strokeWidth,
|
|
485
|
+
fill: e.value.style.chart.layout.dataPolygon.transparent ? "transparent" : e.value.style.chart.layout.dataPolygon.useGradient ? `url(#radar_gradient_${_.value}_${l})` : o.color + y(K)[e.value.style.chart.layout.dataPolygon.opacity],
|
|
486
|
+
class: z({ "animated-out": c.value.includes(l) && e.value.useCssAnimation, "animated-in": T.value && A.value === l && e.value.useCssAnimation })
|
|
487
|
+
}, null, 10, bt)) : p("", !0)
|
|
488
|
+
])
|
|
489
|
+
]))), 256)),
|
|
490
|
+
e.value.style.chart.layout.plots.show ? (s(), n("g", kt, [
|
|
491
|
+
(s(!0), n($, null, x(C.value, (o, l) => (s(), n("g", null, [
|
|
492
|
+
(s(!0), n($, null, x(o.plots, (r, d) => (s(), n("circle", {
|
|
493
|
+
cx: r.x,
|
|
494
|
+
cy: r.y,
|
|
495
|
+
fill: c.value.includes(d) ? "transparent" : g.value[d].color,
|
|
496
|
+
r: U.value !== null && U.value === l ? e.value.style.chart.layout.plots.radius * 1.6 : e.value.style.chart.layout.plots.radius,
|
|
497
|
+
stroke: c.value.includes(d) ? "transparent" : e.value.style.chart.backgroundColor,
|
|
498
|
+
"stroke-width": 0.5,
|
|
499
|
+
class: z({ "animated-out": c.value.includes(d) && e.value.useCssAnimation, "animated-in": T.value && A.value === d && e.value.useCssAnimation })
|
|
500
|
+
}, null, 10, Ct))), 256))
|
|
501
|
+
]))), 256))
|
|
502
|
+
])) : p("", !0),
|
|
503
|
+
b(t.$slots, "svg", { svg: u.value }, void 0, !0)
|
|
504
|
+
], 14, nt)) : p("", !0),
|
|
505
|
+
I.value ? p("", !0) : (s(), B(ot, {
|
|
506
|
+
key: 3,
|
|
507
|
+
config: {
|
|
508
|
+
type: "radar",
|
|
509
|
+
style: {
|
|
510
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
511
|
+
radar: {
|
|
512
|
+
grid: {
|
|
513
|
+
color: e.value.style.chart.layout.outerPolygon.stroke
|
|
514
|
+
},
|
|
515
|
+
shapes: {
|
|
516
|
+
color: e.value.style.chart.layout.outerPolygon.stroke
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}, null, 8, ["config"])),
|
|
522
|
+
w("div", {
|
|
523
|
+
ref_key: "chartLegend",
|
|
524
|
+
ref: ee
|
|
525
|
+
}, [
|
|
526
|
+
e.value.style.chart.legend.show ? (s(), B(tt, {
|
|
527
|
+
key: 0,
|
|
528
|
+
legendSet: F.value,
|
|
529
|
+
config: Ne.value,
|
|
530
|
+
onClickMarker: a[1] || (a[1] = ({ i: o }) => le(o))
|
|
531
|
+
}, {
|
|
532
|
+
item: f(({ legend: o, index: l }) => [
|
|
533
|
+
w("div", {
|
|
534
|
+
"data-cy-legend-item": "",
|
|
535
|
+
onClick: (r) => o.segregate(),
|
|
536
|
+
style: V(`opacity:${c.value.includes(l) ? 0.5 : 1}`)
|
|
537
|
+
}, L(o.name) + ": " + L((o.totalProportion * 100).toFixed(e.value.style.chart.legend.roundingPercentage)) + "% ", 13, _t)
|
|
538
|
+
]),
|
|
539
|
+
_: 1
|
|
540
|
+
}, 8, ["legendSet", "config"])) : b(t.$slots, "legend", {
|
|
541
|
+
key: 1,
|
|
542
|
+
legend: F.value
|
|
543
|
+
}, void 0, !0)
|
|
544
|
+
], 512),
|
|
545
|
+
E(Ze, {
|
|
546
|
+
show: k.value.showTooltip && D.value,
|
|
547
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
548
|
+
color: e.value.style.chart.tooltip.color,
|
|
549
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
550
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
551
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
552
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
553
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
554
|
+
parent: O.value,
|
|
555
|
+
content: G.value,
|
|
556
|
+
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
|
|
557
|
+
}, {
|
|
558
|
+
"tooltip-before": f(() => [
|
|
559
|
+
b(t.$slots, "tooltip-before", J(Y({ ...q.value })), void 0, !0)
|
|
560
|
+
]),
|
|
561
|
+
"tooltip-after": f(() => [
|
|
562
|
+
["function"].includes(typeof e.value.style.chart.tooltip.customFormat) ? p("", !0) : (s(), n("div", wt, [
|
|
563
|
+
E(et, {
|
|
564
|
+
dataset: j.value,
|
|
565
|
+
config: xe.value,
|
|
566
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity
|
|
567
|
+
}, null, 8, ["dataset", "config", "backgroundOpacity"])
|
|
568
|
+
])),
|
|
569
|
+
b(t.$slots, "tooltip-after", J(Y({ ...q.value })), void 0, !0)
|
|
570
|
+
]),
|
|
571
|
+
_: 3
|
|
572
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "fontSize", "parent", "content", "isCustom"]),
|
|
573
|
+
I.value ? (s(), B(lt, {
|
|
574
|
+
key: 4,
|
|
575
|
+
hideDetails: "",
|
|
576
|
+
config: {
|
|
577
|
+
open: k.value.showTable,
|
|
578
|
+
maxHeight: 1e4,
|
|
579
|
+
body: {
|
|
580
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
581
|
+
color: e.value.style.chart.color
|
|
582
|
+
},
|
|
583
|
+
head: {
|
|
584
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
585
|
+
color: e.value.style.chart.color
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}, {
|
|
589
|
+
content: f(() => [
|
|
590
|
+
E(at, {
|
|
591
|
+
colNames: M.value.colNames,
|
|
592
|
+
head: M.value.head,
|
|
593
|
+
body: M.value.body,
|
|
594
|
+
config: M.value.config,
|
|
595
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
596
|
+
onClose: a[2] || (a[2] = (o) => k.value.showTable = !1)
|
|
597
|
+
}, {
|
|
598
|
+
th: f(({ th: o }) => [
|
|
599
|
+
de(L(o.name), 1)
|
|
600
|
+
]),
|
|
601
|
+
td: f(({ td: o }) => [
|
|
602
|
+
de(L(o), 1)
|
|
603
|
+
]),
|
|
604
|
+
_: 1
|
|
605
|
+
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
606
|
+
]),
|
|
607
|
+
_: 1
|
|
608
|
+
}, 8, ["config"])) : p("", !0)
|
|
609
|
+
], 14, st));
|
|
610
|
+
}
|
|
611
|
+
}, Vt = /* @__PURE__ */ rt($t, [["__scopeId", "data-v-f89a8c0a"]]);
|
|
612
|
+
export {
|
|
613
|
+
Vt as default
|
|
614
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-p5gfZSvB.cjs"),H=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-Bb-A5OSV.cjs"),X=require("./usePrinter-fZlsJid8.cjs"),ce=require("./Tooltip-C_UE6y-E.cjs"),de=require("./vue-ui-sparkbar-CEUDIw0A.cjs"),ve=require("./Legend-D59FIuMs.cjs"),pe=require("./DataTable-Rm9II-m2.cjs"),he=require("./vue-ui-skeleton-sjfOtCZr.cjs"),ge=require("./vue-ui-accordion-C_pwrAJl.cjs"),j=require("./useNestedProp-2kIU-7On.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],fe=["xmlns","viewBox"],ke=["id"],be=["stop-color"],Ce=["stop-color"],we={key:0},Be=["x1","y1","x2","y2","stroke","stroke-width"],_e={key:0},xe=["d","stroke","stroke-width"],$e=["d","stroke","stroke-width"],Pe={key:1},Te=["x","y","text-anchor","font-size","fill","onMouseenter"],Ne=["points","stroke","stroke-width"],Se=["points","stroke","stroke-width","fill"],Ee={key:2},Ve=["cx","cy","fill","r","stroke"],Fe=["onClick"],ze={key:0,style:{"max-width":"200px",margin:"0 auto"}},Oe={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(Y,{expose:J,emit:K}){const d=Y,{vue_ui_radar:Q}=n.useConfig(),k=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),Z=e.ref(null),$=e.ref(!1),P=e.ref(""),F=e.ref(0),b=e.ref(null),z=e.ref(null),O=e.ref(null),t=e.computed(()=>{const o=j.useNestedProp({userConfig:d.config,defaultConfig:Q});return o.theme?{...j.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}),B=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=H.throttle(()=>{const{width:a,height:l}=H.useResponsive({chart:b.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?O.value:null});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(b.value.parentNode)}}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:ee,isImaging:te,generatePdf:A,generateImage:I}=X.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),L=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),oe=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),y=e.ref(!1);function R(o){y.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),K("selectLegend",f.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ae(){return f.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||L.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>k.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||L.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`})):[]),M=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),q=e.computed(()=>p.value.length),T=e.computed(()=>Math.min(s.value.width,s.value.height)/3),D=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:T.value,sides:q.value,rotation:0})),le=e.computed(()=>{const o=[];for(let a=0;a<T.value;a+=T.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>D.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>re({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||M.value)}));return{...o,...p.value[a],plots:l}}));function N({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function re({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const f=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||M.value)));return v.value.map((a,l)=>({...a,totalProportion:o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length,shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>R(l),isSegregated:i.value.includes(l)}))}),ne=e.computed(()=>({cy:"radar-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":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...f.value],a=d.dataset.series.map(r=>[r.name,r.target,...r.values.map((u,c)=>`${n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue})} (${isNaN(u/r.target)?"":(u/r.target*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{head:o,body:a,config:l,colNames:o}}),x=e.ref(null),S=e.ref([]),E=e.ref(null);function ue(o,a){S.value=[],x.value=a,$.value=!0;let l="";E.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value})))P.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value});else{l+=`<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>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||S.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage});P.value=l}}function U(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...f.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Ie)=>[c.name,c.target,...c.values.flatMap(V=>[V,isNaN(V/c.target)?"":V/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function se(o){w.value=o,F.value+=1}function G(){h.value.showTable=!h.value.showTable}function W(){h.value.showTooltip=!h.value.showTooltip}return J({getData:ae,generatePdf:A,generateCsv:U,generateImage:I,toggleTable:G,toggleTooltip:W}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:b,id:`vue-ui-radar_${m.value}`,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}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:z,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(ie._sfc_main,{config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref_key:"details",ref:Z,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(te),isPrinting:e.unref(ee),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:se,onGeneratePdf:e.unref(A),onGenerateCsv:U,onGenerateImage:e.unref(I),onToggleTable:G,onToggleTooltip:W},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:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(l.color,.05)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Ce)],8,ke))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Be))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:q.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,xe))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:D.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,$e),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:N(l).x,y:N(l).y,"text-anchor":N(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>ue(l,r),onMouseleave:a[0]||(a[0]=u=>{$.value=!1,x.value=null})},e.toDisplayString(l.name),41,Te))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===r&&t.value.useCssAnimation})},null,10,Ne)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity],class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===r&&t.value.useCssAnimation})},null,10,Se)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:x.value!==null&&x.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":y.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ve))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,fe)):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:3,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ve.Legend,{key:0,legendSet:f.value,config:ne.value,onClickMarker:a[1]||(a[1]=({i:l})=>R(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString((l.totalProportion*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"% ",13,Fe)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:f.value},void 0,!0)],512),e.createVNode(ce._sfc_main,{show:h.value.showTooltip&&$.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,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,fontSize:t.value.style.chart.tooltip.fontSize,parent:b.value,content:P.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(de.default,{dataset:S.value,config:oe.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","parent","content","isCustom"]),k.value?(e.openBlock(),e.createBlock(ge.default,{key:4,hideDetails:"",config:{open:h.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(pe.DataTable,{colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.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=>h.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,ye))}},Ae=me._export_sfc(Oe,[["__scopeId","data-v-f89a8c0a"]]);exports.default=Ae;
|