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,771 @@
|
|
|
1
|
+
import { computed as k, ref as d, onMounted as Me, onBeforeUnmount as Be, watch as Ue, openBlock as u, createElementBlock as n, normalizeClass as O, normalizeStyle as le, createVNode as ae, createCommentVNode as y, createBlock as W, unref as c, createSlots as Ee, withCtx as m, renderSlot as C, normalizeProps as oe, guardReactiveProps as se, createElementVNode as b, Fragment as x, renderList as $, toDisplayString as N, createTextVNode as H, nextTick as Re, pushScopeId as Ge, popScopeId as Xe } from "vue";
|
|
2
|
+
import { u as Ye, c as We, t as He, a as qe, p as q, o as je, e as P, b as Je, d as Ke, m as ke, f as T, X as Qe, E as Ze, j as A, k as ue, v as $e, w as et, n as tt, q as lt } from "./index-uOtklCCx.js";
|
|
3
|
+
import { t as at, u as ot } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
+
import { _ as st } from "./Title-2iks1ziC.js";
|
|
5
|
+
import { u as ut, U as nt } from "./usePrinter-B6xQCyL-.js";
|
|
6
|
+
import { D as rt } from "./DataTable-CwaOlAsy.js";
|
|
7
|
+
import { _ as it } from "./Tooltip-C3phqKuU.js";
|
|
8
|
+
import { L as dt } from "./Legend-CxvJTjEm.js";
|
|
9
|
+
import ct from "./vue-ui-skeleton-BM9rwmxY.js";
|
|
10
|
+
import vt from "./vue-ui-accordion-HJPf7My0.js";
|
|
11
|
+
import { u as Ce } from "./useNestedProp-BgWkUab_.js";
|
|
12
|
+
import { _ as ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
const ne = (V) => (Ge("data-v-fbefb973"), V = V(), Xe(), V), ft = ["id"], yt = ["xmlns", "viewBox"], bt = ["id", "fr"], pt = /* @__PURE__ */ ne(() => /* @__PURE__ */ b("stop", {
|
|
14
|
+
offset: "0%",
|
|
15
|
+
"stop-color": "#FFFFFF",
|
|
16
|
+
"stop-opacity": "0"
|
|
17
|
+
}, null, -1)), gt = ["offset", "stop-opacity"], mt = /* @__PURE__ */ ne(() => /* @__PURE__ */ b("stop", {
|
|
18
|
+
offset: "100%",
|
|
19
|
+
"stop-color": "#FFFFFF",
|
|
20
|
+
"stop-opacity": "0"
|
|
21
|
+
}, null, -1)), xt = ["id"], wt = ["id"], _t = /* @__PURE__ */ ne(() => /* @__PURE__ */ b("feColorMatrix", {
|
|
22
|
+
type: "saturate",
|
|
23
|
+
values: "0"
|
|
24
|
+
}, null, -1)), kt = ["id"], $t = ["flood-color"], Ct = ["cx", "cy", "r", "fill", "filter"], Lt = ["d", "fill", "stroke", "stroke-width", "filter"], St = { key: 0 }, Ft = ["d", "fill"], Nt = { key: 1 }, Tt = ["x", "y", "font-size", "font-weight", "fill"], It = { key: 2 }, Dt = ["filter"], zt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Ot = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Pt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], At = ["d", "fill", "onMouseenter", "onClick"], Vt = {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: "vue-ui-nested-donuts-legend-title"
|
|
27
|
+
}, Mt = ["onClick"], Bt = ["innerHTML"], Ut = {
|
|
28
|
+
__name: "vue-ui-nested-donuts",
|
|
29
|
+
props: {
|
|
30
|
+
config: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default() {
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
dataset: {
|
|
37
|
+
type: Array,
|
|
38
|
+
default() {
|
|
39
|
+
return [];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
emits: ["selectLegend", "selectDatapoint"],
|
|
44
|
+
setup(V, { expose: Le, emit: re }) {
|
|
45
|
+
const D = V, { vue_ui_nested_donuts: Se } = Ye(), E = k(() => !!D.dataset && D.dataset.length), p = d(We()), j = d(!1), J = d(""), Fe = d(null), ie = d(0), M = d(null), de = d(null), K = d(null), B = d(!1);
|
|
46
|
+
function Ne(t) {
|
|
47
|
+
B.value = t, ie.value += 1;
|
|
48
|
+
}
|
|
49
|
+
const e = k(() => {
|
|
50
|
+
const t = Ce({
|
|
51
|
+
userConfig: D.config,
|
|
52
|
+
defaultConfig: Se
|
|
53
|
+
});
|
|
54
|
+
return t.theme ? {
|
|
55
|
+
...Ce({
|
|
56
|
+
userConfig: He.vue_ui_nested_donuts[t.theme] || D.config,
|
|
57
|
+
defaultConfig: t
|
|
58
|
+
}),
|
|
59
|
+
customPalette: qe[t.theme] || q
|
|
60
|
+
} : t;
|
|
61
|
+
}), R = d(null);
|
|
62
|
+
Me(() => {
|
|
63
|
+
if (je(D.dataset) && P({
|
|
64
|
+
componentName: "VueUiNestedDonuts",
|
|
65
|
+
type: "dataset"
|
|
66
|
+
}), e.value.responsive) {
|
|
67
|
+
const t = at(() => {
|
|
68
|
+
const { width: s, height: l } = ot({
|
|
69
|
+
chart: M.value,
|
|
70
|
+
title: e.value.style.chart.title.text ? de.value : null,
|
|
71
|
+
legend: e.value.style.chart.legend.show ? K.value : null
|
|
72
|
+
});
|
|
73
|
+
v.value.width = s, v.value.height = l;
|
|
74
|
+
});
|
|
75
|
+
R.value = new ResizeObserver(t), R.value.observe(M.value.parentNode);
|
|
76
|
+
}
|
|
77
|
+
}), Be(() => {
|
|
78
|
+
R.value && R.value.disconnect();
|
|
79
|
+
});
|
|
80
|
+
const { isPrinting: Te, isImaging: Ie, generatePdf: ce, generateImage: ve } = ut({
|
|
81
|
+
elementId: `nested_donuts_${p.value}`,
|
|
82
|
+
fileName: e.value.style.chart.title.text || "vue-ui-nested-donuts"
|
|
83
|
+
}), De = k(() => Je(e.value.customPalette)), w = d({
|
|
84
|
+
dataLabels: {
|
|
85
|
+
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
86
|
+
},
|
|
87
|
+
showTable: e.value.table.show,
|
|
88
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
89
|
+
}), v = d({
|
|
90
|
+
height: 512,
|
|
91
|
+
width: 512
|
|
92
|
+
});
|
|
93
|
+
function ze({ datapoint: t, index: s }) {
|
|
94
|
+
re("selectDatapoint", { datapoint: t, index: s });
|
|
95
|
+
}
|
|
96
|
+
const f = d([]), L = k(() => (D.dataset.forEach((t, s) => {
|
|
97
|
+
[null, void 0].includes(t.name) && P({
|
|
98
|
+
componentName: "VueUiNestedDonuts",
|
|
99
|
+
type: "datasetSerieAttribute",
|
|
100
|
+
property: "name",
|
|
101
|
+
index: s
|
|
102
|
+
}), [null, void 0].includes(t.series) ? P({
|
|
103
|
+
componentName: "VueUiNestedDonuts",
|
|
104
|
+
type: "datasetSerieAttribute",
|
|
105
|
+
property: "series",
|
|
106
|
+
index: s
|
|
107
|
+
}) : t.series.length === 0 ? P({
|
|
108
|
+
componentName: "VueUiNestedDonuts",
|
|
109
|
+
type: "datasetAttributeEmpty",
|
|
110
|
+
property: `series at index ${s}`
|
|
111
|
+
}) : t.series.forEach((l, a) => {
|
|
112
|
+
[null, void 0].includes(l.name) && P({
|
|
113
|
+
componentName: "VueUiNestedDonuts",
|
|
114
|
+
type: "datasetSerieAttribute",
|
|
115
|
+
property: "name",
|
|
116
|
+
index: a,
|
|
117
|
+
key: "serie"
|
|
118
|
+
}), [null, void 0].includes(l.values) && P({
|
|
119
|
+
componentName: "VueUiNestedDonuts",
|
|
120
|
+
type: "datasetSerieAttribute",
|
|
121
|
+
property: "values",
|
|
122
|
+
index: a,
|
|
123
|
+
key: "serie"
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
}), D.dataset.map((t, s) => ({
|
|
127
|
+
...t,
|
|
128
|
+
total: t.series.filter((l) => !f.value.includes(l.id)).map((l) => (l.values || []).reduce((a, o) => a + o, 0)).reduce((l, a) => l + a, 0),
|
|
129
|
+
datasetIndex: s,
|
|
130
|
+
id: `${p.value}_${s}`,
|
|
131
|
+
series: t.series.map((l, a) => ({
|
|
132
|
+
name: l.name,
|
|
133
|
+
arcOf: t.name,
|
|
134
|
+
arcOfId: `${p.value}_${s}`,
|
|
135
|
+
id: `${p.value}_${s}_${a}`,
|
|
136
|
+
seriesIndex: a,
|
|
137
|
+
datasetIndex: s,
|
|
138
|
+
color: Ke(l.color) || De.value[a] || q[a] || q[a % q.length],
|
|
139
|
+
value: (l.values || []).reduce((o, r) => o + r, 0),
|
|
140
|
+
absoluteValues: l.values || []
|
|
141
|
+
}))
|
|
142
|
+
}))));
|
|
143
|
+
d(e.value.style.chart.layout.donut.strokeWidth);
|
|
144
|
+
const S = k(() => Math.min(v.value.height, v.value.width) * (e.value.style.chart.layout.donut.strokeWidth / 512)), he = k(() => [...L.value].map((t, s) => {
|
|
145
|
+
const l = t.series.filter((a) => !f.value.includes(a.id)).map((a) => a.value).reduce((a, o) => a + o, 0);
|
|
146
|
+
return {
|
|
147
|
+
...t,
|
|
148
|
+
total: l,
|
|
149
|
+
series: t.series.filter((a) => !f.value.includes(a.id)).map((a) => ({
|
|
150
|
+
...a,
|
|
151
|
+
proportion: a.value / l
|
|
152
|
+
}))
|
|
153
|
+
};
|
|
154
|
+
}));
|
|
155
|
+
function Oe(t, s, l) {
|
|
156
|
+
let a = 0;
|
|
157
|
+
for (let o = 0; o < t.length; o += 1)
|
|
158
|
+
l.includes(t[o]) && (a += 1);
|
|
159
|
+
return a < s;
|
|
160
|
+
}
|
|
161
|
+
const h = d(he.value);
|
|
162
|
+
Ue(() => he.value, (t) => h.value = t);
|
|
163
|
+
const fe = d(null), ye = d(null);
|
|
164
|
+
function Q(t) {
|
|
165
|
+
re("selectLegend", t);
|
|
166
|
+
const s = L.value.flatMap((i) => i.series).find((i) => i.id === t.id), l = h.value.flatMap((i) => i.series).find((i) => i.id === t.id);
|
|
167
|
+
let o = l ? l.value : 0;
|
|
168
|
+
const r = L.value.find((i) => i.id === s.arcOfId).series.map((i) => i.id), g = Oe(r, r.length - 1, f.value);
|
|
169
|
+
if (f.value.includes(t.id)) {
|
|
170
|
+
let i = function() {
|
|
171
|
+
o > s.value ? (cancelAnimationFrame(fe.value), h.value = h.value.map((_) => ({
|
|
172
|
+
..._,
|
|
173
|
+
series: _.series.map((F) => F.id == t.id ? {
|
|
174
|
+
...F,
|
|
175
|
+
value: s.value
|
|
176
|
+
} : F)
|
|
177
|
+
}))) : (o += s.value * 0.025, h.value = h.value.map((_) => ({
|
|
178
|
+
..._,
|
|
179
|
+
series: _.series.map((F) => F.id === t.id ? {
|
|
180
|
+
...F,
|
|
181
|
+
value: o
|
|
182
|
+
} : F)
|
|
183
|
+
})), fe.value = requestAnimationFrame(i));
|
|
184
|
+
};
|
|
185
|
+
f.value = f.value.filter((_) => _ !== t.id), i();
|
|
186
|
+
} else if (g) {
|
|
187
|
+
let i = function() {
|
|
188
|
+
o < 0.1 ? (cancelAnimationFrame(ye.value), f.value.push(t.id), h.value = h.value.map((_, F) => ({
|
|
189
|
+
..._,
|
|
190
|
+
series: _.series.map((z) => z.id === t.id ? {
|
|
191
|
+
...z,
|
|
192
|
+
value: 0
|
|
193
|
+
} : z)
|
|
194
|
+
}))) : (o /= 1.1, h.value = h.value.map((_, F) => ({
|
|
195
|
+
..._,
|
|
196
|
+
series: _.series.map((z) => z.id === t.id ? {
|
|
197
|
+
...z,
|
|
198
|
+
value: o
|
|
199
|
+
} : z)
|
|
200
|
+
})), ye.value = requestAnimationFrame(i));
|
|
201
|
+
};
|
|
202
|
+
i();
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
const U = k(() => h.value.map((t, s) => {
|
|
206
|
+
const l = s * S.value / L.value.length;
|
|
207
|
+
return {
|
|
208
|
+
...t,
|
|
209
|
+
radius: S.value - l,
|
|
210
|
+
donut: ke(
|
|
211
|
+
{ series: t.series },
|
|
212
|
+
v.value.width / 2,
|
|
213
|
+
v.value.height / 2,
|
|
214
|
+
S.value - l,
|
|
215
|
+
S.value - l,
|
|
216
|
+
1.99999,
|
|
217
|
+
2,
|
|
218
|
+
1,
|
|
219
|
+
360,
|
|
220
|
+
105.25,
|
|
221
|
+
S.value / L.value.length * e.value.style.chart.layout.donut.spacingRatio
|
|
222
|
+
)
|
|
223
|
+
};
|
|
224
|
+
})), be = k(() => [...L.value].map((t, s) => {
|
|
225
|
+
const l = s * S.value / L.value.length;
|
|
226
|
+
return {
|
|
227
|
+
sizeRatio: l,
|
|
228
|
+
donut: ke(
|
|
229
|
+
{ series: [{ value: 1 }] },
|
|
230
|
+
v.value.width / 2,
|
|
231
|
+
v.value.height / 2,
|
|
232
|
+
S.value - l,
|
|
233
|
+
S.value - l,
|
|
234
|
+
1.99999,
|
|
235
|
+
2,
|
|
236
|
+
1,
|
|
237
|
+
360,
|
|
238
|
+
105.25,
|
|
239
|
+
S.value / L.value.length * e.value.style.chart.layout.donut.spacingRatio
|
|
240
|
+
)[0]
|
|
241
|
+
};
|
|
242
|
+
})), pe = d(null), G = d(null), X = d(null), Z = d(null);
|
|
243
|
+
function Pe({ datapoint: t, _relativeIndex: s, seriesIndex: l }) {
|
|
244
|
+
pe.value = t.arcOfId, G.value = t.id, X.value = l, Z.value = {
|
|
245
|
+
datapoint: t,
|
|
246
|
+
seriesIndex: l,
|
|
247
|
+
series: h.value,
|
|
248
|
+
config: e.value
|
|
249
|
+
};
|
|
250
|
+
const a = e.value.style.chart.tooltip.customFormat;
|
|
251
|
+
if ($e(a) && et(() => a({
|
|
252
|
+
seriesIndex: l,
|
|
253
|
+
datapoint: t,
|
|
254
|
+
series: h.value,
|
|
255
|
+
config: e.value
|
|
256
|
+
})))
|
|
257
|
+
J.value = a({
|
|
258
|
+
seriesIndex: l,
|
|
259
|
+
datapoint: t,
|
|
260
|
+
series: h.value,
|
|
261
|
+
config: e.value
|
|
262
|
+
});
|
|
263
|
+
else {
|
|
264
|
+
let o = "";
|
|
265
|
+
if (e.value.style.chart.tooltip.showAllItemsAtIndex && f.value.length === 0) {
|
|
266
|
+
const r = h.value.map((g) => g.series.find((i) => i.seriesIndex === l));
|
|
267
|
+
r.forEach((g, i) => {
|
|
268
|
+
if (!g) return "";
|
|
269
|
+
o += `
|
|
270
|
+
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i < r.length - 1 ? `border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor}` : ""}">
|
|
271
|
+
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
272
|
+
<svg viewBox="0 0 20 20" height="${e.value.style.chart.tooltip.fontSize}" width="${e.value.style.chart.tooltip.fontSize}">
|
|
273
|
+
<circle cx="10" cy="10" r="10" fill="${g.color}"/>
|
|
274
|
+
</svg>
|
|
275
|
+
<span>
|
|
276
|
+
${g.arcOf ?? ""} - ${g.name}
|
|
277
|
+
</span>
|
|
278
|
+
</div>
|
|
279
|
+
<span>
|
|
280
|
+
${e.value.style.chart.tooltip.showValue ? `<b>${T({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: t.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.tooltip.roundingValue })}</b>` : ""}
|
|
281
|
+
${e.value.style.chart.tooltip.showPercentage ? `(${T({ v: g.proportion * 100, s: "%", r: e.value.style.chart.tooltip.roundingPercentage })})` : ""}
|
|
282
|
+
</span>
|
|
283
|
+
</div>
|
|
284
|
+
`;
|
|
285
|
+
});
|
|
286
|
+
} else
|
|
287
|
+
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.arcOf ?? ""} - ${t.name}</div>`, o += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`, e.value.style.chart.tooltip.showValue && (o += `<b>${T({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: t.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.tooltip.roundingValue })}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? o += `<span>(${(t.proportion * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}%)</span></div>` : o += `<b>${(t.proportion * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}%</b></div>`);
|
|
288
|
+
J.value = `<div style="font-size:${e.value.style.chart.tooltip.fontSize}px">${o}</div>`;
|
|
289
|
+
}
|
|
290
|
+
j.value = !0;
|
|
291
|
+
}
|
|
292
|
+
function ee(t) {
|
|
293
|
+
return t.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
|
|
294
|
+
}
|
|
295
|
+
function ge(t, s) {
|
|
296
|
+
if (!e.value.useBlurOnHover)
|
|
297
|
+
return "";
|
|
298
|
+
if (e.value.style.chart.tooltip.showAllItemsAtIndex && f.value.length === 0)
|
|
299
|
+
return [null, void 0].includes(X.value) || X.value === s ? "" : `url(#blur_${p.value})`;
|
|
300
|
+
if (!e.value.style.chart.tooltip.showAllItemsAtIndex || f.value.length)
|
|
301
|
+
return [null, void 0].includes(G.value) || G.value === t.id ? "" : `url(#blur_${p.value})`;
|
|
302
|
+
}
|
|
303
|
+
const te = k(() => L.value.map((t, s) => t.series.map((l, a) => ({
|
|
304
|
+
name: l.name,
|
|
305
|
+
color: l.color,
|
|
306
|
+
value: l.value,
|
|
307
|
+
shape: "circle",
|
|
308
|
+
arcOf: l.arcOf,
|
|
309
|
+
id: l.id,
|
|
310
|
+
seriesIndex: a,
|
|
311
|
+
datasetIndex: s,
|
|
312
|
+
total: t.series.filter((o) => !f.value.includes(o.id)).map((o) => o.value).reduce((o, r) => o + r, 0)
|
|
313
|
+
})).map((l) => ({
|
|
314
|
+
...l,
|
|
315
|
+
opacity: f.value.includes(l.id) ? 0.5 : 1,
|
|
316
|
+
segregate: () => Q(l),
|
|
317
|
+
isSegregated: f.value.includes(l.id)
|
|
318
|
+
})))), Ae = k(() => ({
|
|
319
|
+
cy: "nested-donuts-legend",
|
|
320
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
321
|
+
color: e.value.style.chart.legend.color,
|
|
322
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
323
|
+
paddingBottom: 12,
|
|
324
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
325
|
+
})), I = k(() => {
|
|
326
|
+
const t = h.value.flatMap((l) => l.series.map((a) => ({
|
|
327
|
+
name: `${l.name} - ${a.name}`,
|
|
328
|
+
color: a.color,
|
|
329
|
+
total: l.total
|
|
330
|
+
}))), s = h.value.flatMap((l) => l.series.map((a) => a.value));
|
|
331
|
+
return { head: t, body: s };
|
|
332
|
+
});
|
|
333
|
+
function me() {
|
|
334
|
+
Re(() => {
|
|
335
|
+
const t = I.value.head.map((a, o) => [[
|
|
336
|
+
a.name
|
|
337
|
+
], [I.value.body[o]], [isNaN(I.value.body[o] / a.total) ? "-" : I.value.body[o] / a.total * 100]]), s = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), l = tt(s);
|
|
338
|
+
lt({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-nested-donuts" });
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
const Y = k(() => {
|
|
342
|
+
const t = [
|
|
343
|
+
e.value.table.columnNames.series,
|
|
344
|
+
e.value.table.columnNames.value,
|
|
345
|
+
e.value.table.columnNames.percentage
|
|
346
|
+
], s = I.value.head.map((o, r) => {
|
|
347
|
+
const g = T({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: I.value.body[r], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue });
|
|
348
|
+
return [
|
|
349
|
+
{
|
|
350
|
+
color: o.color,
|
|
351
|
+
name: o.name
|
|
352
|
+
},
|
|
353
|
+
g,
|
|
354
|
+
isNaN(I.value.body[r] / o.total) ? "-" : (I.value.body[r] / o.total * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
|
|
355
|
+
];
|
|
356
|
+
}), l = {
|
|
357
|
+
th: {
|
|
358
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
359
|
+
color: e.value.table.th.color,
|
|
360
|
+
outline: e.value.table.th.outline
|
|
361
|
+
},
|
|
362
|
+
td: {
|
|
363
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
364
|
+
color: e.value.table.td.color,
|
|
365
|
+
outline: e.value.table.td.outline
|
|
366
|
+
},
|
|
367
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
368
|
+
};
|
|
369
|
+
return {
|
|
370
|
+
colNames: [
|
|
371
|
+
e.value.table.columnNames.series,
|
|
372
|
+
e.value.table.columnNames.value,
|
|
373
|
+
e.value.table.columnNames.percentage
|
|
374
|
+
],
|
|
375
|
+
head: t,
|
|
376
|
+
body: s,
|
|
377
|
+
config: l
|
|
378
|
+
};
|
|
379
|
+
});
|
|
380
|
+
function Ve() {
|
|
381
|
+
return L.value;
|
|
382
|
+
}
|
|
383
|
+
function xe() {
|
|
384
|
+
w.value.showTable = !w.value.showTable;
|
|
385
|
+
}
|
|
386
|
+
function we() {
|
|
387
|
+
w.value.dataLabels.show = !w.value.dataLabels.show;
|
|
388
|
+
}
|
|
389
|
+
function _e() {
|
|
390
|
+
w.value.showTooltip = !w.value.showTooltip;
|
|
391
|
+
}
|
|
392
|
+
return Le({
|
|
393
|
+
getData: Ve,
|
|
394
|
+
generatePdf: ce,
|
|
395
|
+
generateCsv: me,
|
|
396
|
+
generateImage: ve,
|
|
397
|
+
toggleTable: xe,
|
|
398
|
+
toggleLabels: we,
|
|
399
|
+
toggleTooltip: _e
|
|
400
|
+
}), (t, s) => (u(), n("div", {
|
|
401
|
+
ref_key: "nestedDonutsChart",
|
|
402
|
+
ref: M,
|
|
403
|
+
class: O(`vue-ui-nested-donuts ${B.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
404
|
+
style: le(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${!e.value.style.chart.title.text && e.value.userOptions.show ? "padding-top:36px" : ""};background:${e.value.style.chart.backgroundColor}`),
|
|
405
|
+
id: `nested_donuts_${p.value}`
|
|
406
|
+
}, [
|
|
407
|
+
e.value.style.chart.title.text ? (u(), n("div", {
|
|
408
|
+
key: 0,
|
|
409
|
+
ref_key: "chartTitle",
|
|
410
|
+
ref: de
|
|
411
|
+
}, [
|
|
412
|
+
ae(st, {
|
|
413
|
+
config: {
|
|
414
|
+
title: {
|
|
415
|
+
cy: "donut-div-title",
|
|
416
|
+
...e.value.style.chart.title
|
|
417
|
+
},
|
|
418
|
+
subtitle: {
|
|
419
|
+
cy: "donut-div-subtitle",
|
|
420
|
+
...e.value.style.chart.title.subtitle
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}, null, 8, ["config"])
|
|
424
|
+
], 512)) : y("", !0),
|
|
425
|
+
e.value.userOptions.show && E.value ? (u(), W(nt, {
|
|
426
|
+
ref: "details",
|
|
427
|
+
key: `user_option_${ie.value}`,
|
|
428
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
429
|
+
color: e.value.style.chart.color,
|
|
430
|
+
isPrinting: c(Te),
|
|
431
|
+
isImaging: c(Ie),
|
|
432
|
+
uid: p.value,
|
|
433
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
434
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
435
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
436
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
437
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
438
|
+
hasLabel: e.value.userOptions.buttons.labels,
|
|
439
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
440
|
+
isFullscreen: B.value,
|
|
441
|
+
isTooltip: w.value.showTooltip,
|
|
442
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
443
|
+
chartElement: M.value,
|
|
444
|
+
onToggleFullscreen: Ne,
|
|
445
|
+
onGeneratePdf: c(ce),
|
|
446
|
+
onGenerateCsv: me,
|
|
447
|
+
onGenerateImage: c(ve),
|
|
448
|
+
onToggleTable: xe,
|
|
449
|
+
onToggleLabels: we,
|
|
450
|
+
onToggleTooltip: _e
|
|
451
|
+
}, Ee({ _: 2 }, [
|
|
452
|
+
t.$slots.optionTooltip ? {
|
|
453
|
+
name: "optionTooltip",
|
|
454
|
+
fn: m(() => [
|
|
455
|
+
C(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
456
|
+
]),
|
|
457
|
+
key: "0"
|
|
458
|
+
} : void 0,
|
|
459
|
+
t.$slots.optionPdf ? {
|
|
460
|
+
name: "optionPdf",
|
|
461
|
+
fn: m(() => [
|
|
462
|
+
C(t.$slots, "optionPdf", {}, void 0, !0)
|
|
463
|
+
]),
|
|
464
|
+
key: "1"
|
|
465
|
+
} : void 0,
|
|
466
|
+
t.$slots.optionCsv ? {
|
|
467
|
+
name: "optionCsv",
|
|
468
|
+
fn: m(() => [
|
|
469
|
+
C(t.$slots, "optionCsv", {}, void 0, !0)
|
|
470
|
+
]),
|
|
471
|
+
key: "2"
|
|
472
|
+
} : void 0,
|
|
473
|
+
t.$slots.optionImg ? {
|
|
474
|
+
name: "optionImg",
|
|
475
|
+
fn: m(() => [
|
|
476
|
+
C(t.$slots, "optionImg", {}, void 0, !0)
|
|
477
|
+
]),
|
|
478
|
+
key: "3"
|
|
479
|
+
} : void 0,
|
|
480
|
+
t.$slots.optionTable ? {
|
|
481
|
+
name: "optionTable",
|
|
482
|
+
fn: m(() => [
|
|
483
|
+
C(t.$slots, "optionTable", {}, void 0, !0)
|
|
484
|
+
]),
|
|
485
|
+
key: "4"
|
|
486
|
+
} : void 0,
|
|
487
|
+
t.$slots.optionLabels ? {
|
|
488
|
+
name: "optionLabels",
|
|
489
|
+
fn: m(() => [
|
|
490
|
+
C(t.$slots, "optionLabels", {}, void 0, !0)
|
|
491
|
+
]),
|
|
492
|
+
key: "5"
|
|
493
|
+
} : void 0,
|
|
494
|
+
t.$slots.optionFullscreen ? {
|
|
495
|
+
name: "optionFullscreen",
|
|
496
|
+
fn: m(({ toggleFullscreen: l, isFullscreen: a }) => [
|
|
497
|
+
C(t.$slots, "optionFullscreen", oe(se({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
|
|
498
|
+
]),
|
|
499
|
+
key: "6"
|
|
500
|
+
} : void 0
|
|
501
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : y("", !0),
|
|
502
|
+
E.value ? (u(), n("svg", {
|
|
503
|
+
key: 2,
|
|
504
|
+
xmlns: c(Qe),
|
|
505
|
+
class: O({ "vue-data-ui-fullscreen--on": B.value, "vue-data-ui-fulscreen--off": !B.value }),
|
|
506
|
+
viewBox: `0 0 ${v.value.width <= 0 ? 1e-3 : v.value.width} ${v.value.height < 0 ? 1e-3 : v.value.height}`,
|
|
507
|
+
style: le(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
508
|
+
}, [
|
|
509
|
+
b("defs", null, [
|
|
510
|
+
(u(!0), n(x, null, $(be.value, (l, a) => (u(), n("radialGradient", {
|
|
511
|
+
id: `radial_${p.value}_${a}`,
|
|
512
|
+
cx: "50%",
|
|
513
|
+
cy: "50%",
|
|
514
|
+
r: "50%",
|
|
515
|
+
fr: 30 - 1 * (a + 1) + "%"
|
|
516
|
+
}, [
|
|
517
|
+
pt,
|
|
518
|
+
b("stop", {
|
|
519
|
+
offset: 70 - 20 * a + "%",
|
|
520
|
+
"stop-color": "#FFFFFF",
|
|
521
|
+
"stop-opacity": e.value.style.chart.gradientIntensity / 100
|
|
522
|
+
}, null, 8, gt),
|
|
523
|
+
mt
|
|
524
|
+
], 8, bt))), 256))
|
|
525
|
+
]),
|
|
526
|
+
b("defs", null, [
|
|
527
|
+
b("filter", {
|
|
528
|
+
id: `blur_${p.value}`,
|
|
529
|
+
x: "-50%",
|
|
530
|
+
y: "-50%",
|
|
531
|
+
width: "200%",
|
|
532
|
+
height: "200%"
|
|
533
|
+
}, [
|
|
534
|
+
b("feGaussianBlur", {
|
|
535
|
+
in: "SourceGraphic",
|
|
536
|
+
stdDeviation: 2,
|
|
537
|
+
id: `blur_std_${p.value}`
|
|
538
|
+
}, null, 8, wt),
|
|
539
|
+
_t
|
|
540
|
+
], 8, xt),
|
|
541
|
+
b("filter", {
|
|
542
|
+
id: `shadow_${p.value}`,
|
|
543
|
+
"color-interpolation-filters": "sRGB"
|
|
544
|
+
}, [
|
|
545
|
+
b("feDropShadow", {
|
|
546
|
+
dx: "0",
|
|
547
|
+
dy: "0",
|
|
548
|
+
stdDeviation: "10",
|
|
549
|
+
"flood-opacity": "0.5",
|
|
550
|
+
"flood-color": e.value.style.chart.layout.donut.shadowColor
|
|
551
|
+
}, null, 8, $t)
|
|
552
|
+
], 8, kt)
|
|
553
|
+
]),
|
|
554
|
+
(u(!0), n(x, null, $(U.value, (l) => (u(), n("circle", {
|
|
555
|
+
cx: v.value.width / 2,
|
|
556
|
+
cy: v.value.height / 2,
|
|
557
|
+
r: l.radius < 0 ? 1e-5 : l.radius,
|
|
558
|
+
fill: e.value.style.chart.backgroundColor,
|
|
559
|
+
filter: e.value.style.chart.layout.donut.useShadow ? `url(#shadow_${p.value})` : ""
|
|
560
|
+
}, null, 8, Ct))), 256)),
|
|
561
|
+
(u(!0), n(x, null, $(U.value, (l, a) => (u(), n("g", null, [
|
|
562
|
+
(u(!0), n(x, null, $(l.donut, (o, r) => (u(), n("g", null, [
|
|
563
|
+
b("path", {
|
|
564
|
+
class: "vue-ui-donut-arc-path",
|
|
565
|
+
d: o.arcSlice,
|
|
566
|
+
fill: `${o.color}CC`,
|
|
567
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
568
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
569
|
+
filter: ge(o, r)
|
|
570
|
+
}, null, 8, Lt)
|
|
571
|
+
]))), 256))
|
|
572
|
+
]))), 256)),
|
|
573
|
+
e.value.style.chart.useGradient ? (u(), n("g", St, [
|
|
574
|
+
(u(!0), n(x, null, $(be.value, (l, a) => (u(), n("g", null, [
|
|
575
|
+
b("path", {
|
|
576
|
+
d: l.donut.arcSlice,
|
|
577
|
+
fill: `url(#radial_${p.value}_${a})`,
|
|
578
|
+
stroke: "transparent",
|
|
579
|
+
"stroke-width": "0"
|
|
580
|
+
}, null, 8, Ft)
|
|
581
|
+
]))), 256))
|
|
582
|
+
])) : y("", !0),
|
|
583
|
+
e.value.style.chart.layout.labels.dataLabels.showDonutName ? (u(), n("g", Nt, [
|
|
584
|
+
(u(!0), n(x, null, $(U.value, (l, a) => (u(), n("g", null, [
|
|
585
|
+
(u(!0), n(x, null, $(l.donut, (o, r) => (u(), n("g", null, [
|
|
586
|
+
r === 0 && v.value.width && v.value.height ? (u(), n("text", {
|
|
587
|
+
key: 0,
|
|
588
|
+
class: O({ animated: e.value.useCssAnimation }),
|
|
589
|
+
x: v.value.width / 2,
|
|
590
|
+
y: o.startY - e.value.style.chart.layout.labels.dataLabels.fontSize + e.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,
|
|
591
|
+
"text-anchor": "middle",
|
|
592
|
+
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
593
|
+
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldDonutName ? "bold" : "normal",
|
|
594
|
+
fill: e.value.style.chart.layout.labels.dataLabels.color
|
|
595
|
+
}, N(e.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? c(Ze)({ source: l.name, length: e.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize }) : l.name), 11, Tt)) : y("", !0)
|
|
596
|
+
]))), 256))
|
|
597
|
+
]))), 256))
|
|
598
|
+
])) : y("", !0),
|
|
599
|
+
e.value.style.chart.layout.labels.dataLabels.show ? (u(), n("g", It, [
|
|
600
|
+
(u(!0), n(x, null, $(U.value, (l, a) => (u(), n("g", null, [
|
|
601
|
+
(u(!0), n(x, null, $(l.donut, (o, r) => (u(), n("g", {
|
|
602
|
+
filter: ge(o, r)
|
|
603
|
+
}, [
|
|
604
|
+
ee(o) && w.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage ? (u(), n("text", {
|
|
605
|
+
key: 0,
|
|
606
|
+
class: O({ animated: e.value.useCssAnimation }),
|
|
607
|
+
"text-anchor": c(A)(o, !0).anchor,
|
|
608
|
+
x: c(A)(o, !1, e.value.style.chart.layout.labels.dataLabels.offsetX).x || 0,
|
|
609
|
+
y: c(ue)(o, e.value.style.chart.layout.labels.dataLabels.offsetY, e.value.style.chart.layout.labels.dataLabels.offsetY),
|
|
610
|
+
fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? o.color : e.value.style.chart.layout.labels.dataLabels.color,
|
|
611
|
+
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
612
|
+
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldPercentage ? "bold" : "normal"
|
|
613
|
+
}, N(c(T)({ v: o.proportion * 100, s: "%", r: e.value.style.chart.layout.labels.dataLabels.roundingPercentage })), 11, zt)) : y("", !0),
|
|
614
|
+
ee(o) && w.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue ? (u(), n("text", {
|
|
615
|
+
key: 1,
|
|
616
|
+
class: O({ animated: e.value.useCssAnimation }),
|
|
617
|
+
"text-anchor": c(A)(o, !0).anchor,
|
|
618
|
+
x: c(A)(o, !1, e.value.style.chart.layout.labels.dataLabels.offsetX).x || 0,
|
|
619
|
+
y: c(ue)(o, e.value.style.chart.layout.labels.dataLabels.offsetY, e.value.style.chart.layout.labels.dataLabels.offsetY) + e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
620
|
+
fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? o.color : e.value.style.chart.layout.labels.dataLabels.color,
|
|
621
|
+
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
622
|
+
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
|
|
623
|
+
}, " (" + N(c(T)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: o.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.layout.labels.dataLabels.roundingValue })) + ") ", 11, Ot)) : y("", !0),
|
|
624
|
+
ee(o) && w.value.dataLabels.show && !e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue ? (u(), n("text", {
|
|
625
|
+
key: 2,
|
|
626
|
+
class: O({ animated: e.value.useCssAnimation }),
|
|
627
|
+
"text-anchor": c(A)(o, !0).anchor,
|
|
628
|
+
x: c(A)(o, !1, e.value.style.chart.layout.labels.dataLabels.offsetX).x || 0,
|
|
629
|
+
y: c(ue)(o, e.value.style.chart.layout.labels.dataLabels.offsetY, e.value.style.chart.layout.labels.dataLabels.offsetY),
|
|
630
|
+
fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? o.color : e.value.style.chart.layout.labels.dataLabels.color,
|
|
631
|
+
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
632
|
+
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
|
|
633
|
+
}, N(c(T)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: o.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.layout.labels.dataLabels.roundingValue })), 11, Pt)) : y("", !0)
|
|
634
|
+
], 8, Dt))), 256))
|
|
635
|
+
]))), 256))
|
|
636
|
+
])) : y("", !0),
|
|
637
|
+
(u(!0), n(x, null, $(U.value, (l, a) => (u(), n("g", null, [
|
|
638
|
+
(u(!0), n(x, null, $(l.donut, (o, r) => (u(), n("g", null, [
|
|
639
|
+
b("path", {
|
|
640
|
+
"data-cy-donut-trap": "",
|
|
641
|
+
d: o.arcSlice,
|
|
642
|
+
fill: Fe.value === a ? "rgba(0,0,0,0.1)" : "transparent",
|
|
643
|
+
onMouseenter: (g) => Pe({
|
|
644
|
+
datapoint: o,
|
|
645
|
+
relativeIndex: a,
|
|
646
|
+
seriesIndex: o.seriesIndex
|
|
647
|
+
}),
|
|
648
|
+
onClick: (g) => ze({ datapoint: o, index: r }),
|
|
649
|
+
onMouseleave: s[0] || (s[0] = (g) => {
|
|
650
|
+
j.value = !1, pe.value = null, G.value = null, X.value = null;
|
|
651
|
+
})
|
|
652
|
+
}, null, 40, At)
|
|
653
|
+
]))), 256))
|
|
654
|
+
]))), 256)),
|
|
655
|
+
C(t.$slots, "svg", { svg: v.value }, void 0, !0)
|
|
656
|
+
], 14, yt)) : y("", !0),
|
|
657
|
+
E.value ? y("", !0) : (u(), W(ct, {
|
|
658
|
+
key: 3,
|
|
659
|
+
config: {
|
|
660
|
+
type: "donut",
|
|
661
|
+
style: {
|
|
662
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
663
|
+
donut: {
|
|
664
|
+
color: "#CCCCCC"
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
}, null, 8, ["config"])),
|
|
669
|
+
ae(it, {
|
|
670
|
+
show: w.value.showTooltip && j.value,
|
|
671
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
672
|
+
color: e.value.style.chart.tooltip.color,
|
|
673
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
674
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
675
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
676
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
677
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
678
|
+
parent: M.value,
|
|
679
|
+
content: J.value,
|
|
680
|
+
isCustom: c($e)(e.value.style.chart.tooltip.customFormat)
|
|
681
|
+
}, {
|
|
682
|
+
"tooltip-before": m(() => [
|
|
683
|
+
C(t.$slots, "tooltip-before", oe(se({ ...Z.value })), void 0, !0)
|
|
684
|
+
]),
|
|
685
|
+
"tooltip-after": m(() => [
|
|
686
|
+
C(t.$slots, "tooltip-after", oe(se({ ...Z.value })), void 0, !0)
|
|
687
|
+
]),
|
|
688
|
+
_: 3
|
|
689
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
|
|
690
|
+
e.value.style.chart.legend.show ? (u(), n("div", {
|
|
691
|
+
key: 4,
|
|
692
|
+
ref_key: "chartLegend",
|
|
693
|
+
ref: K,
|
|
694
|
+
class: O({ "vue-ui-nested-donuts-legend": te.value.length > 1 })
|
|
695
|
+
}, [
|
|
696
|
+
(u(!0), n(x, null, $(te.value, (l) => (u(), W(dt, {
|
|
697
|
+
legendSet: l,
|
|
698
|
+
config: Ae.value,
|
|
699
|
+
onClickMarker: s[1] || (s[1] = ({ legend: a }) => Q(a))
|
|
700
|
+
}, {
|
|
701
|
+
legendTitle: m(({ titleSet: a }) => [
|
|
702
|
+
a[0].arcOf ? (u(), n("div", Vt, N(a[0].arcOf), 1)) : y("", !0)
|
|
703
|
+
]),
|
|
704
|
+
item: m(({ legend: a, index: o }) => [
|
|
705
|
+
b("div", {
|
|
706
|
+
onClick: (r) => Q(a),
|
|
707
|
+
style: le(`opacity:${f.value.includes(a.id) ? 0.5 : 1}`)
|
|
708
|
+
}, [
|
|
709
|
+
H(N(a.name) + ": " + N(c(T)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: a.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.legend.roundingValue })) + " ", 1),
|
|
710
|
+
f.value.includes(a.id) ? (u(), n(x, { key: 1 }, [
|
|
711
|
+
H(" ( - % ) ")
|
|
712
|
+
], 64)) : (u(), n(x, { key: 0 }, [
|
|
713
|
+
H(" (" + N(isNaN(a.value / a.total) ? "-" : c(T)({ v: a.value / a.total * 100, s: "%", r: e.value.style.chart.legend.roundingPercentage })) + ") ", 1)
|
|
714
|
+
], 64))
|
|
715
|
+
], 12, Mt)
|
|
716
|
+
]),
|
|
717
|
+
_: 2
|
|
718
|
+
}, 1032, ["legendSet", "config"]))), 256))
|
|
719
|
+
], 2)) : y("", !0),
|
|
720
|
+
e.value.style.chart.legend.show ? y("", !0) : (u(), n("div", {
|
|
721
|
+
key: 5,
|
|
722
|
+
ref_key: "chartLegend",
|
|
723
|
+
ref: K
|
|
724
|
+
}, [
|
|
725
|
+
C(t.$slots, "legend", { legend: te.value }, void 0, !0)
|
|
726
|
+
], 512)),
|
|
727
|
+
E.value ? (u(), W(vt, {
|
|
728
|
+
key: 6,
|
|
729
|
+
hideDetails: "",
|
|
730
|
+
config: {
|
|
731
|
+
open: w.value.showTable,
|
|
732
|
+
maxHeight: 1e4,
|
|
733
|
+
body: {
|
|
734
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
735
|
+
color: e.value.style.chart.color
|
|
736
|
+
},
|
|
737
|
+
head: {
|
|
738
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
739
|
+
color: e.value.style.chart.color
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}, {
|
|
743
|
+
content: m(() => [
|
|
744
|
+
ae(rt, {
|
|
745
|
+
colNames: Y.value.colNames,
|
|
746
|
+
head: Y.value.head,
|
|
747
|
+
body: Y.value.body,
|
|
748
|
+
config: Y.value.config,
|
|
749
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
750
|
+
onClose: s[2] || (s[2] = (l) => w.value.showTable = !1)
|
|
751
|
+
}, {
|
|
752
|
+
th: m(({ th: l }) => [
|
|
753
|
+
b("div", {
|
|
754
|
+
innerHTML: l,
|
|
755
|
+
style: { display: "flex", "align-items": "center" }
|
|
756
|
+
}, null, 8, Bt)
|
|
757
|
+
]),
|
|
758
|
+
td: m(({ td: l }) => [
|
|
759
|
+
H(N(l.name || l), 1)
|
|
760
|
+
]),
|
|
761
|
+
_: 1
|
|
762
|
+
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
763
|
+
]),
|
|
764
|
+
_: 1
|
|
765
|
+
}, 8, ["config"])) : y("", !0)
|
|
766
|
+
], 14, ft));
|
|
767
|
+
}
|
|
768
|
+
}, Zt = /* @__PURE__ */ ht(Ut, [["__scopeId", "data-v-fbefb973"]]);
|
|
769
|
+
export {
|
|
770
|
+
Zt as default
|
|
771
|
+
};
|