vue-data-ui 2.3.3 → 2.3.5
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/README.md +19 -15
- package/dist/Arrow-BSOdhAJO.cjs +1 -0
- package/dist/Arrow-BjDVSrfA.js +101 -0
- package/dist/BaseIcon-BoKtpbrI.cjs +1 -0
- package/dist/BaseIcon-vmmfWlyR.js +174 -0
- package/dist/DataTable-CaB7GIwQ.js +127 -0
- package/dist/DataTable-ssrNbONo.cjs +1 -0
- package/dist/Legend-DHpoRTAE.js +62 -0
- package/dist/Legend-Dl5IYoxK.cjs +1 -0
- package/dist/Shape-CQT4S7N-.js +107 -0
- package/dist/Shape-CaF4pvOn.cjs +1 -0
- package/dist/Slicer-Bdb1BlrC.js +156 -0
- package/dist/Slicer-QC8nTm24.cjs +1 -0
- package/dist/Title-BNPZwnkp.js +46 -0
- package/dist/Title-Cj_xubjI.cjs +1 -0
- package/dist/Tooltip-CdJ5hegk.cjs +1 -0
- package/dist/Tooltip-ZnJAz6dl.js +94 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/documentation/installation.md +14 -13
- package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
- package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
- package/dist/index-BMCvLyab.js +10369 -0
- package/dist/index-BkomIE9L.cjs +4 -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/types/vue-data-ui.d.cts +105 -5
- package/dist/types/vue-data-ui.d.ts +105 -5
- package/dist/useNestedProp-BMxXyPbW.cjs +1 -0
- package/dist/useNestedProp-CkP8xhG_.js +13 -0
- package/dist/usePrinter-BuuBz5JR.js +513 -0
- package/dist/usePrinter-r6uHYEcR.cjs +1 -0
- package/dist/useResponsive-B3TrDDIG.cjs +1 -0
- package/dist/useResponsive-NZB-WLRF.js +187 -0
- package/dist/vue-data-ui-Bc5U1cOP.cjs +9 -0
- package/dist/vue-data-ui-DxeO0iaC.js +254 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +61 -59
- package/dist/vue-ui-3d-bar-32wM0tiX.js +1085 -0
- package/dist/vue-ui-3d-bar-CgB0fLQT.cjs +19 -0
- package/dist/vue-ui-accordion-CLlVxx3Q.js +77 -0
- package/dist/vue-ui-accordion-SXsobrUt.cjs +1 -0
- package/dist/vue-ui-age-pyramid-D_CY99xF.js +596 -0
- package/dist/vue-ui-age-pyramid-DqiwcOIr.cjs +1 -0
- package/dist/vue-ui-annotator-DvP-IxDm.js +2177 -0
- package/dist/vue-ui-annotator-mntqd3q_.cjs +371 -0
- package/dist/vue-ui-candlestick-C-5u3i-1.js +657 -0
- package/dist/vue-ui-candlestick-C_TvUQvH.cjs +2 -0
- package/dist/vue-ui-carousel-table-BCePqkuz.cjs +1 -0
- package/dist/vue-ui-carousel-table-CAqhsLVx.js +304 -0
- package/dist/vue-ui-chestnut-DhWlw2MD.cjs +6 -0
- package/dist/vue-ui-chestnut-DylSfYMB.js +1051 -0
- package/dist/vue-ui-cursor-B04HJQVl.cjs +1 -0
- package/dist/vue-ui-cursor-DTYEMgbU.js +229 -0
- package/dist/vue-ui-dashboard-Bd0-cmSZ.js +232 -0
- package/dist/vue-ui-dashboard-DFIYwP1s.cjs +1 -0
- package/dist/vue-ui-digits-CW5qNMIk.js +153 -0
- package/dist/vue-ui-digits-Ced5mBJZ.cjs +1 -0
- package/dist/vue-ui-donut-DIhhgvWp.cjs +1 -0
- package/dist/vue-ui-donut-EeVmrVJs.js +743 -0
- package/dist/vue-ui-donut-evolution-BN08Y2hy.js +799 -0
- package/dist/vue-ui-donut-evolution-Ct6KAzs-.cjs +1 -0
- package/dist/vue-ui-dumbbell-BMlxS1Nq.js +624 -0
- package/dist/vue-ui-dumbbell-pextarqH.cjs +9 -0
- package/dist/vue-ui-flow-BXVsbmyb.cjs +1 -0
- package/dist/vue-ui-flow-CHmkgfyb.js +454 -0
- package/dist/vue-ui-galaxy-D4xyd-J1.cjs +1 -0
- package/dist/vue-ui-galaxy-kiVOZOBz.js +485 -0
- package/dist/vue-ui-gauge-BcO-z97J.js +466 -0
- package/dist/vue-ui-gauge-DPFBsbFj.cjs +1 -0
- package/dist/vue-ui-heatmap-DBOKYaJz.cjs +1 -0
- package/dist/vue-ui-heatmap-DD-Bzddj.js +598 -0
- package/dist/vue-ui-kpi-BEgf5yDv.cjs +1 -0
- package/dist/vue-ui-kpi-BS0o7zb9.js +54 -0
- package/dist/vue-ui-mini-loader-Bm5EJxtG.cjs +1 -0
- package/dist/vue-ui-mini-loader-DJEvG6ju.js +131 -0
- package/dist/vue-ui-molecule-DdwnFEBJ.js +750 -0
- package/dist/vue-ui-molecule-DzUqcaxd.cjs +1 -0
- package/dist/vue-ui-mood-radar-B9Gczs_Z.js +548 -0
- package/dist/vue-ui-mood-radar-DbB7m4Ku.cjs +1 -0
- package/dist/vue-ui-nested-donuts-BSINf8hd.cjs +16 -0
- package/dist/vue-ui-nested-donuts-CVQ1CaXo.js +771 -0
- package/dist/vue-ui-onion-D3-6Tv4u.cjs +1 -0
- package/dist/vue-ui-onion-Ut75t7hB.js +554 -0
- package/dist/vue-ui-parallel-coordinate-plot-Bjo09ZTX.js +651 -0
- package/dist/vue-ui-parallel-coordinate-plot-CJGkoIgN.cjs +8 -0
- package/dist/vue-ui-quadrant-CzCvejGn.cjs +1 -0
- package/dist/vue-ui-quadrant-Du9PKvlO.js +1178 -0
- package/dist/vue-ui-quick-chart-BsxsPbjz.cjs +13 -0
- package/dist/vue-ui-quick-chart-u0cPmD3q.js +1310 -0
- package/dist/vue-ui-radar-CBrpuE5r.js +614 -0
- package/dist/vue-ui-radar-DIpCrj1h.cjs +1 -0
- package/dist/vue-ui-rating-CaeGGlCw.js +271 -0
- package/dist/vue-ui-rating-D8fJC8Yt.cjs +1 -0
- package/dist/vue-ui-relation-circle-5DNf880s.js +304 -0
- package/dist/vue-ui-relation-circle-Ky3nPk6S.cjs +1 -0
- package/dist/vue-ui-rings-CffZ4T2S.cjs +1 -0
- package/dist/vue-ui-rings-IE3IdNRF.js +510 -0
- package/dist/vue-ui-scatter-C4GCZm0V.js +874 -0
- package/dist/vue-ui-scatter-TsX5dW9l.cjs +1 -0
- package/dist/vue-ui-screenshot-Bl3oooKI.js +160 -0
- package/dist/vue-ui-screenshot-Bzpg6yof.cjs +3 -0
- package/dist/vue-ui-skeleton-BisWX1sO.js +2064 -0
- package/dist/vue-ui-skeleton-JmGp11-u.cjs +41 -0
- package/dist/vue-ui-smiley-BhSrt9f-.cjs +2 -0
- package/dist/vue-ui-smiley-Sth2pqG1.js +763 -0
- package/dist/vue-ui-spark-trend-C8NSz4l8.cjs +1 -0
- package/dist/vue-ui-spark-trend-DAqO0TW2.js +246 -0
- package/dist/vue-ui-sparkbar-B0zX7NU7.js +242 -0
- package/dist/vue-ui-sparkbar-hL1Q6ObK.cjs +1 -0
- package/dist/vue-ui-sparkgauge-CWR8zJnU.js +157 -0
- package/dist/vue-ui-sparkgauge-tbVqaLCK.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-Dv-lml4g.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-DxqCtDpw.js +244 -0
- package/dist/vue-ui-sparkline-B6pvaBY_.cjs +1 -0
- package/dist/vue-ui-sparkline-BpL1jn7F.js +333 -0
- package/dist/vue-ui-sparkstackbar-BzbuBNIV.js +244 -0
- package/dist/vue-ui-sparkstackbar-CQ2TEi4p.cjs +1 -0
- package/dist/vue-ui-strip-plot-DCC6F4VM.cjs +1 -0
- package/dist/vue-ui-strip-plot-DCcbD6UE.js +618 -0
- package/dist/vue-ui-table-CFqIWfxl.js +1430 -0
- package/dist/vue-ui-table-CseaFWgX.cjs +14 -0
- package/dist/vue-ui-table-heatmap-Bwut-V1D.cjs +1 -0
- package/dist/vue-ui-table-heatmap-Bz8KYDxr.js +237 -0
- package/dist/vue-ui-table-sparkline-CJBU3y8-.cjs +1 -0
- package/dist/vue-ui-table-sparkline-z29ND2lq.js +420 -0
- package/dist/vue-ui-thermometer-BNAITzJa.js +385 -0
- package/dist/vue-ui-thermometer-DM2IKhqN.cjs +1 -0
- package/dist/vue-ui-timer-DLfXuW8T.cjs +64 -0
- package/dist/vue-ui-timer-DV6lQVHU.js +453 -0
- package/dist/vue-ui-tiremarks-B1bd1jPf.cjs +1 -0
- package/dist/vue-ui-tiremarks-WyQPg7yo.js +249 -0
- package/dist/vue-ui-treemap-BZGmoDHb.cjs +1 -0
- package/dist/vue-ui-treemap-DKmBhzV-.js +722 -0
- package/dist/vue-ui-vertical-bar-Bi-0rRN3.cjs +4 -0
- package/dist/vue-ui-vertical-bar-C-ySfrhJ.js +737 -0
- package/dist/vue-ui-waffle-CGRWu-da.js +638 -0
- package/dist/vue-ui-waffle-VLYkR-YZ.cjs +1 -0
- package/dist/vue-ui-wheel-D2q5vy5V.cjs +1 -0
- package/dist/vue-ui-wheel-Pj9OPk9f.js +227 -0
- package/dist/vue-ui-word-cloud-8Vr-jo1p.js +346 -0
- package/dist/vue-ui-word-cloud-Ba4BjatU.cjs +1 -0
- package/dist/vue-ui-xy-C4QW5Lfl.cjs +3 -0
- package/dist/vue-ui-xy-canvas-Be-Da_0x.cjs +9 -0
- package/dist/vue-ui-xy-canvas-DnLWrf0e.js +1006 -0
- package/dist/vue-ui-xy-qToggEfh.js +2064 -0
- package/package.json +1 -1
- package/dist/index-BcMihqI4.cjs +0 -843
- package/dist/index-C7FeCQ7K.js +0 -57303
|
@@ -0,0 +1,638 @@
|
|
|
1
|
+
import { computed as c, ref as v, onMounted as Ve, onBeforeUnmount as Me, openBlock as s, createElementBlock as n, normalizeClass as ge, normalizeStyle as U, createVNode as te, createCommentVNode as w, createBlock as X, unref as f, createSlots as Be, withCtx as y, renderSlot as g, normalizeProps as Y, guardReactiveProps as J, createElementVNode as m, Fragment as $, renderList as M, toDisplayString as T, createTextVNode as me, nextTick as De, pushScopeId as Ee, popScopeId as Ge } from "vue";
|
|
2
|
+
import { u as Re, c as Ue, t as je, a as We, p as O, o as He, e as le, g as qe, b as Xe, d as Ye, f as I, X as Je, s as Ke, r as Qe, C as Ze, E as et, v as tt, w as lt, n as at, q as ot } from "./index-BMCvLyab.js";
|
|
3
|
+
import { t as ut, u as rt } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
+
import { _ as st } from "./Title-BNPZwnkp.js";
|
|
5
|
+
import { u as nt, U as it } from "./usePrinter-BuuBz5JR.js";
|
|
6
|
+
import { _ as ct } from "./Tooltip-ZnJAz6dl.js";
|
|
7
|
+
import { D as vt } from "./DataTable-CaB7GIwQ.js";
|
|
8
|
+
import { L as dt } from "./Legend-DHpoRTAE.js";
|
|
9
|
+
import ht from "./vue-ui-skeleton-BisWX1sO.js";
|
|
10
|
+
import pt from "./vue-ui-accordion-CLlVxx3Q.js";
|
|
11
|
+
import { u as be } from "./useNestedProp-CkP8xhG_.js";
|
|
12
|
+
import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
const we = (B) => (Ee("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = ["xmlns", "viewBox"], mt = ["id"], bt = ["stop-color"], wt = ["stop-color"], xt = ["id"], kt = /* @__PURE__ */ we(() => /* @__PURE__ */ m("feGaussianBlur", {
|
|
14
|
+
in: "SourceGraphic",
|
|
15
|
+
stdDeviation: 2
|
|
16
|
+
}, null, -1)), Ct = /* @__PURE__ */ we(() => /* @__PURE__ */ m("feColorMatrix", {
|
|
17
|
+
type: "saturate",
|
|
18
|
+
values: "0"
|
|
19
|
+
}, null, -1)), _t = [
|
|
20
|
+
kt,
|
|
21
|
+
Ct
|
|
22
|
+
], $t = ["x", "y", "height", "width"], Tt = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], It = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], St = ["x", "y", "height", "width", "filter"], Ft = { key: 0 }, zt = { key: 1 }, Pt = { key: 2 }, Nt = { key: 3 }, Lt = ["onMouseover", "x", "y", "height", "width"], Ot = ["onClick"], At = { key: 0 }, Vt = { key: 1 }, Mt = ["innerHTML"], Bt = {
|
|
23
|
+
__name: "vue-ui-waffle",
|
|
24
|
+
props: {
|
|
25
|
+
config: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default() {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
dataset: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default() {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
emits: ["selectLegend"],
|
|
39
|
+
setup(B, { expose: xe, emit: ke }) {
|
|
40
|
+
const b = B, { vue_ui_waffle: Ce } = Re(), j = c(() => !!b.dataset && b.dataset.length), S = v(Ue()), _e = v(null), K = v(!1), Q = v(""), A = v(null), ae = v(0), D = v(null), oe = v(null), ue = v(null), e = c(() => {
|
|
41
|
+
const t = be({
|
|
42
|
+
userConfig: b.config,
|
|
43
|
+
defaultConfig: Ce
|
|
44
|
+
});
|
|
45
|
+
return t.theme ? {
|
|
46
|
+
...be({
|
|
47
|
+
userConfig: je.vue_ui_waffle[t.theme] || b.config,
|
|
48
|
+
defaultConfig: t
|
|
49
|
+
}),
|
|
50
|
+
customPalette: We[t.theme] || O
|
|
51
|
+
} : t;
|
|
52
|
+
}), W = v(null);
|
|
53
|
+
Ve(() => {
|
|
54
|
+
if (He(b.dataset) ? le({
|
|
55
|
+
componentName: "VueUiWaffle",
|
|
56
|
+
type: "dataset"
|
|
57
|
+
}) : b.dataset.forEach((t, a) => {
|
|
58
|
+
qe({
|
|
59
|
+
datasetObject: t,
|
|
60
|
+
requiredAttributes: ["name", "values"]
|
|
61
|
+
}).forEach((l) => {
|
|
62
|
+
le({
|
|
63
|
+
componentName: "VueUiWaffle",
|
|
64
|
+
type: "datasetSerieAttribute",
|
|
65
|
+
property: l,
|
|
66
|
+
index: a
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
}), e.value.responsive) {
|
|
70
|
+
const t = ut(() => {
|
|
71
|
+
const { width: a, height: l } = rt({
|
|
72
|
+
chart: D.value,
|
|
73
|
+
title: e.value.style.chart.title.text ? oe.value : null,
|
|
74
|
+
legend: e.value.style.chart.legend.show ? ue.value : null
|
|
75
|
+
});
|
|
76
|
+
F.value.width = a, F.value.height = l, z.value.width = a, z.value.height = l;
|
|
77
|
+
});
|
|
78
|
+
W.value = new ResizeObserver(t), W.value.observe(D.value.parentNode);
|
|
79
|
+
}
|
|
80
|
+
}), Me(() => {
|
|
81
|
+
W.value && W.value.disconnect();
|
|
82
|
+
});
|
|
83
|
+
const { isPrinting: $e, isImaging: Te, generatePdf: re, generateImage: se } = nt({
|
|
84
|
+
elementId: `vue-ui-waffle_${S.value}`,
|
|
85
|
+
fileName: e.value.style.chart.title.text || "vue-ui-waffle"
|
|
86
|
+
}), ne = c(() => Xe(e.value.customPalette)), C = v({
|
|
87
|
+
showTable: e.value.table.show,
|
|
88
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
89
|
+
}), F = v({
|
|
90
|
+
height: 512,
|
|
91
|
+
width: 512
|
|
92
|
+
}), z = v({
|
|
93
|
+
top: 0,
|
|
94
|
+
left: 0,
|
|
95
|
+
height: 512,
|
|
96
|
+
width: 512
|
|
97
|
+
}), P = c(() => (z.value.width - e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.spaceBetween) / e.value.style.chart.layout.grid.size), N = c(() => (z.value.height - e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.spaceBetween) / e.value.style.chart.layout.grid.size), E = c(() => z.value.width / e.value.style.chart.layout.grid.size), H = c(() => z.value.height / e.value.style.chart.layout.grid.size);
|
|
98
|
+
function ie(t) {
|
|
99
|
+
const a = t.reduce((u, r) => u + r, 0), l = t.map((u) => Math.round(u / a * 100) / 100), o = l.reduce((u, r) => u + r, 0);
|
|
100
|
+
if (o !== 1) {
|
|
101
|
+
const u = l.length - 1;
|
|
102
|
+
l[u] += 1 - o, l[u] = Math.round(l[u] * 100) / 100;
|
|
103
|
+
}
|
|
104
|
+
return l;
|
|
105
|
+
}
|
|
106
|
+
const ce = c(() => b.dataset.map((t, a) => ({
|
|
107
|
+
...t,
|
|
108
|
+
color: Ye(t.color) || ne.value[a] || O[a] || O[a % O.length],
|
|
109
|
+
uid: `serie_${a}`,
|
|
110
|
+
absoluteIndex: a
|
|
111
|
+
}))), h = v(ce.value), Ie = c(() => {
|
|
112
|
+
const t = h.value.filter((a, l) => !p.value.includes(a.uid)).map((a, l) => (a.values || []).reduce((o, u) => o + u, 0));
|
|
113
|
+
return ie(t);
|
|
114
|
+
}), Se = c(() => {
|
|
115
|
+
const t = h.value.map((a, l) => (a.values || []).reduce((o, u) => o + u));
|
|
116
|
+
return ie(t);
|
|
117
|
+
}), x = c(() => (b.dataset.forEach((t, a) => {
|
|
118
|
+
[null, void 0].includes(t.values) && le({
|
|
119
|
+
componentName: "VueUiWaffle",
|
|
120
|
+
type: "datasetSerieAttribute",
|
|
121
|
+
property: "values (number[])",
|
|
122
|
+
index: a
|
|
123
|
+
});
|
|
124
|
+
}), h.value.filter((t, a) => !p.value.includes(t.uid)).map((t, a) => ({
|
|
125
|
+
absoluteIndex: t.absoluteIndex,
|
|
126
|
+
uid: t.uid,
|
|
127
|
+
name: t.name,
|
|
128
|
+
color: t.color,
|
|
129
|
+
value: (t.values || []).reduce((l, o) => l + o, 0),
|
|
130
|
+
absoluteValues: t.values || [],
|
|
131
|
+
proportion: Ie.value[a] * Math.pow(e.value.style.chart.layout.grid.size, 2)
|
|
132
|
+
})))), Fe = c(() => h.value.map((t, a) => ({
|
|
133
|
+
absoluteIndex: t.absoluteIndex,
|
|
134
|
+
uid: t.uid,
|
|
135
|
+
name: t.name,
|
|
136
|
+
color: t.color,
|
|
137
|
+
value: (t.values || []).reduce((l, o) => l + o, 0),
|
|
138
|
+
absoluteValues: t.values || [],
|
|
139
|
+
proportion: Se.value[a] * Math.pow(e.value.style.chart.layout.grid.size, 2)
|
|
140
|
+
})));
|
|
141
|
+
function ze() {
|
|
142
|
+
return Fe.value.map((t) => ({
|
|
143
|
+
name: t.name,
|
|
144
|
+
color: t.color,
|
|
145
|
+
value: t.value,
|
|
146
|
+
proportion: t.proportion / Math.pow(e.value.style.chart.layout.grid.size, 2)
|
|
147
|
+
}));
|
|
148
|
+
}
|
|
149
|
+
const Pe = c(() => x.value.map((t, a) => {
|
|
150
|
+
const l = a > 0 ? x.value.filter((r, d) => d < a).map((r) => r.proportion).reduce((r, d) => r + d) + t.proportion - x.value[a - 1].proportion : t.proportion - t.proportion, o = l + t.proportion, u = [];
|
|
151
|
+
for (let r = l; r <= o; r += 1)
|
|
152
|
+
u.push(r);
|
|
153
|
+
return {
|
|
154
|
+
...t,
|
|
155
|
+
start: a > 0 ? x.value.filter((r, d) => d < a).map((r) => r.proportion).reduce((r, d) => r + d) + t.proportion - x.value[a - 1].proportion : t.proportion - t.proportion,
|
|
156
|
+
rects: u
|
|
157
|
+
};
|
|
158
|
+
})), i = c(() => Pe.value.flatMap((t, a) => t.rects.map((l, o) => ({
|
|
159
|
+
isFirst: o === 0,
|
|
160
|
+
isLongEnough: l.length > 2,
|
|
161
|
+
name: t.name,
|
|
162
|
+
color: t.color,
|
|
163
|
+
value: t.value,
|
|
164
|
+
serieIndex: a,
|
|
165
|
+
absoluteStartIndex: o < 3,
|
|
166
|
+
serieId: t.uid,
|
|
167
|
+
...t
|
|
168
|
+
}))).map((t, a) => ({
|
|
169
|
+
...t,
|
|
170
|
+
isAbsoluteFirst: a % e.value.style.chart.layout.grid.size === 0
|
|
171
|
+
}))), G = c(() => {
|
|
172
|
+
const t = [];
|
|
173
|
+
for (let a = 0; a < e.value.style.chart.layout.grid.size; a += 1)
|
|
174
|
+
for (let l = 0; l < e.value.style.chart.layout.grid.size; l += 1)
|
|
175
|
+
t.push({
|
|
176
|
+
isStartOfLine: l === 0,
|
|
177
|
+
position: e.value.style.chart.layout.grid.vertical ? a : l,
|
|
178
|
+
x: (e.value.style.chart.layout.grid.vertical ? a : l) * (P.value + e.value.style.chart.layout.grid.spaceBetween),
|
|
179
|
+
y: (e.value.style.chart.layout.grid.vertical ? l : a) * (N.value + e.value.style.chart.layout.grid.spaceBetween) + z.value.top
|
|
180
|
+
});
|
|
181
|
+
return t;
|
|
182
|
+
}), p = v([]), L = v(!1), ve = v(null), de = v(null);
|
|
183
|
+
function he(t) {
|
|
184
|
+
if (!e.value.useAnimation) {
|
|
185
|
+
p.value.includes(t) ? p.value = p.value.filter((u) => u !== t) : p.value.length < V.value.length - 1 && V.value.length > 1 && p.value.push(t);
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
const a = ce.value.find((u) => u.uid === t).values.reduce((u, r) => u + r, 0);
|
|
189
|
+
let o = h.value.find((u) => u.uid === t).values.reduce((u, r) => u + r, 0);
|
|
190
|
+
if (p.value.includes(t)) {
|
|
191
|
+
let r = function() {
|
|
192
|
+
o > u ? (cancelAnimationFrame(ve.value), h.value = h.value.map((d, Ae) => d.uid === t ? {
|
|
193
|
+
...d,
|
|
194
|
+
values: [u]
|
|
195
|
+
} : d), L.value = !1) : (L.value = !0, o += u * 0.025, h.value = h.value.map((d, Ae) => d.uid === t ? {
|
|
196
|
+
...d,
|
|
197
|
+
values: [o]
|
|
198
|
+
} : d), ve.value = requestAnimationFrame(r));
|
|
199
|
+
};
|
|
200
|
+
p.value = p.value.filter((d) => d !== t);
|
|
201
|
+
const u = a;
|
|
202
|
+
r();
|
|
203
|
+
} else if (p.value.length < V.value.length - 1 && V.value.length > 1) {
|
|
204
|
+
let u = function() {
|
|
205
|
+
o < 0.1 ? (cancelAnimationFrame(de.value), p.value.push(t), h.value = h.value.map((r, d) => r.uid === t ? {
|
|
206
|
+
...r,
|
|
207
|
+
values: [0]
|
|
208
|
+
} : r), L.value = !1) : (L.value = !0, o /= 1.5, h.value = h.value.map((r, d) => r.uid === t ? {
|
|
209
|
+
...r,
|
|
210
|
+
values: [o]
|
|
211
|
+
} : r), de.value = requestAnimationFrame(u));
|
|
212
|
+
};
|
|
213
|
+
u();
|
|
214
|
+
}
|
|
215
|
+
ke("selectLegend", x.value.map((u) => ({
|
|
216
|
+
name: u.name,
|
|
217
|
+
color: u.color,
|
|
218
|
+
value: u.value,
|
|
219
|
+
proportion: u.proportion / Math.pow(e.value.style.chart.layout.grid.size, 2)
|
|
220
|
+
})));
|
|
221
|
+
}
|
|
222
|
+
const V = c(() => h.value.map((t, a) => ({
|
|
223
|
+
name: t.name,
|
|
224
|
+
color: t.color || ne[a] || O[a] || O[a % O.length],
|
|
225
|
+
value: (t.values || []).reduce((l, o) => l + o, 0),
|
|
226
|
+
uid: t.uid,
|
|
227
|
+
shape: "square"
|
|
228
|
+
})).map((t, a) => ({
|
|
229
|
+
...t,
|
|
230
|
+
proportion: t.value / h.value.map((l) => (l.values || []).reduce((o, u) => o + u, 0)).reduce((l, o) => l + o, 0),
|
|
231
|
+
opacity: p.value.includes(t.uid) ? 0.5 : 1,
|
|
232
|
+
segregate: () => he(t.uid),
|
|
233
|
+
isSegregated: p.value.includes(t.uid)
|
|
234
|
+
}))), Ne = c(() => ({
|
|
235
|
+
cy: "waffle-div-legend",
|
|
236
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
237
|
+
color: e.value.style.chart.legend.color,
|
|
238
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
239
|
+
paddingBottom: 12,
|
|
240
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
241
|
+
})), k = c(() => x.value.map((t) => t.value).reduce((t, a) => t + a, 0)), Z = v(null);
|
|
242
|
+
function Le(t) {
|
|
243
|
+
if (p.value.length === b.dataset.length) return;
|
|
244
|
+
const a = i.value[t];
|
|
245
|
+
Z.value = {
|
|
246
|
+
datapoint: a,
|
|
247
|
+
seriesIndex: a.absoluteIndex,
|
|
248
|
+
series: h.value,
|
|
249
|
+
config: e.value
|
|
250
|
+
}, K.value = !0, A.value = i.value[t].serieIndex;
|
|
251
|
+
const l = e.value.style.chart.tooltip.customFormat;
|
|
252
|
+
if (tt(l) && lt(() => l({
|
|
253
|
+
seriesIndex: i.value[t].absoluteIndex,
|
|
254
|
+
datapoint: a,
|
|
255
|
+
series: h.value,
|
|
256
|
+
config: e.value
|
|
257
|
+
})))
|
|
258
|
+
Q.value = l({
|
|
259
|
+
seriesIndex: i.value[t].absoluteIndex,
|
|
260
|
+
datapoint: a,
|
|
261
|
+
series: h.value,
|
|
262
|
+
config: e.value
|
|
263
|
+
});
|
|
264
|
+
else {
|
|
265
|
+
let o = "";
|
|
266
|
+
o += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${a.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"><rect x="0" y="0" height="12" width="12" stroke="none" rx="1" fill="${a.color}" /></svg>`, e.value.style.chart.tooltip.showValue && (o += `<b>${I({ 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.tooltip.roundingValue })}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? o += `<span>(${(a.value / k.value * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}%)</span></div>` : o += `<b>${(a.value / k.value * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}%</b></div>`), Q.value = o;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
const _ = c(() => {
|
|
270
|
+
const t = x.value.map((l) => ({
|
|
271
|
+
name: l.name,
|
|
272
|
+
color: l.color
|
|
273
|
+
})), a = x.value.map((l) => l.value);
|
|
274
|
+
return { head: t, body: a };
|
|
275
|
+
});
|
|
276
|
+
function ee(t) {
|
|
277
|
+
return e.value.useBlurOnHover && ![null, void 0].includes(A.value) && A.value !== t ? `url(#blur_${S.value})` : "";
|
|
278
|
+
}
|
|
279
|
+
function pe() {
|
|
280
|
+
De(() => {
|
|
281
|
+
const t = _.value.head.map((o, u) => [[
|
|
282
|
+
o.name
|
|
283
|
+
], [_.value.body[u]], [isNaN(_.value.body[u] / k.value) ? "-" : _.value.body[u] / k.value * 100]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), l = at(a);
|
|
284
|
+
ot({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-waffle" });
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
const q = c(() => {
|
|
288
|
+
const t = [
|
|
289
|
+
' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
|
|
290
|
+
I({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: k.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
291
|
+
"100%"
|
|
292
|
+
], a = _.value.head.map((u, r) => [
|
|
293
|
+
{
|
|
294
|
+
color: u.color,
|
|
295
|
+
name: u.name
|
|
296
|
+
},
|
|
297
|
+
I({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: _.value.body[r], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
298
|
+
isNaN(_.value.body[r] / k.value) ? "-" : (_.value.body[r] / k.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
|
|
299
|
+
]), l = {
|
|
300
|
+
th: {
|
|
301
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
302
|
+
color: e.value.table.th.color,
|
|
303
|
+
outline: e.value.table.th.outline
|
|
304
|
+
},
|
|
305
|
+
td: {
|
|
306
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
307
|
+
color: e.value.table.td.color,
|
|
308
|
+
outline: e.value.table.td.outline
|
|
309
|
+
},
|
|
310
|
+
shape: "square",
|
|
311
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
312
|
+
}, o = [
|
|
313
|
+
e.value.table.columnNames.series,
|
|
314
|
+
e.value.table.columnNames.value,
|
|
315
|
+
e.value.table.columnNames.percentage
|
|
316
|
+
];
|
|
317
|
+
return {
|
|
318
|
+
head: t,
|
|
319
|
+
body: a,
|
|
320
|
+
config: l,
|
|
321
|
+
colNames: o
|
|
322
|
+
};
|
|
323
|
+
}), R = v(!1);
|
|
324
|
+
function Oe(t) {
|
|
325
|
+
R.value = t, ae.value += 1;
|
|
326
|
+
}
|
|
327
|
+
function fe() {
|
|
328
|
+
C.value.showTable = !C.value.showTable;
|
|
329
|
+
}
|
|
330
|
+
function ye() {
|
|
331
|
+
C.value.showTooltip = !C.value.showTooltip;
|
|
332
|
+
}
|
|
333
|
+
return xe({
|
|
334
|
+
getData: ze,
|
|
335
|
+
generatePdf: re,
|
|
336
|
+
generateCsv: pe,
|
|
337
|
+
generateImage: se,
|
|
338
|
+
toggleTable: fe,
|
|
339
|
+
toggleTooltip: ye
|
|
340
|
+
}), (t, a) => (s(), n("div", {
|
|
341
|
+
class: ge(`vue-ui-waffle ${R.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
|
|
342
|
+
ref_key: "waffleChart",
|
|
343
|
+
ref: D,
|
|
344
|
+
id: `vue-ui-waffle_${S.value}`,
|
|
345
|
+
style: U(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`)
|
|
346
|
+
}, [
|
|
347
|
+
e.value.style.chart.title.text ? (s(), n("div", {
|
|
348
|
+
key: 0,
|
|
349
|
+
ref_key: "chartTitle",
|
|
350
|
+
ref: oe,
|
|
351
|
+
style: U(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px`)
|
|
352
|
+
}, [
|
|
353
|
+
te(st, {
|
|
354
|
+
config: {
|
|
355
|
+
title: {
|
|
356
|
+
cy: "waffle-title",
|
|
357
|
+
...e.value.style.chart.title
|
|
358
|
+
},
|
|
359
|
+
subtitle: {
|
|
360
|
+
cy: "waffle-subtitle",
|
|
361
|
+
...e.value.style.chart.title.subtitle
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}, null, 8, ["config"])
|
|
365
|
+
], 4)) : w("", !0),
|
|
366
|
+
e.value.userOptions.show && j.value ? (s(), X(it, {
|
|
367
|
+
ref_key: "details",
|
|
368
|
+
ref: _e,
|
|
369
|
+
key: `user_options_${ae.value}`,
|
|
370
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
371
|
+
color: e.value.style.chart.color,
|
|
372
|
+
isPrinting: f($e),
|
|
373
|
+
isImaging: f(Te),
|
|
374
|
+
uid: S.value,
|
|
375
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
376
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
377
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
378
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
379
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
380
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
381
|
+
isFullscreen: R.value,
|
|
382
|
+
isTooltip: C.value.showTooltip,
|
|
383
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
384
|
+
chartElement: D.value,
|
|
385
|
+
onToggleFullscreen: Oe,
|
|
386
|
+
onGeneratePdf: f(re),
|
|
387
|
+
onGenerateCsv: pe,
|
|
388
|
+
onGenerateImage: f(se),
|
|
389
|
+
onToggleTable: fe,
|
|
390
|
+
onToggleTooltip: ye
|
|
391
|
+
}, Be({ _: 2 }, [
|
|
392
|
+
t.$slots.optionTooltip ? {
|
|
393
|
+
name: "optionTooltip",
|
|
394
|
+
fn: y(() => [
|
|
395
|
+
g(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
396
|
+
]),
|
|
397
|
+
key: "0"
|
|
398
|
+
} : void 0,
|
|
399
|
+
t.$slots.optionPdf ? {
|
|
400
|
+
name: "optionPdf",
|
|
401
|
+
fn: y(() => [
|
|
402
|
+
g(t.$slots, "optionPdf", {}, void 0, !0)
|
|
403
|
+
]),
|
|
404
|
+
key: "1"
|
|
405
|
+
} : void 0,
|
|
406
|
+
t.$slots.optionCsv ? {
|
|
407
|
+
name: "optionCsv",
|
|
408
|
+
fn: y(() => [
|
|
409
|
+
g(t.$slots, "optionCsv", {}, void 0, !0)
|
|
410
|
+
]),
|
|
411
|
+
key: "2"
|
|
412
|
+
} : void 0,
|
|
413
|
+
t.$slots.optionImg ? {
|
|
414
|
+
name: "optionImg",
|
|
415
|
+
fn: y(() => [
|
|
416
|
+
g(t.$slots, "optionImg", {}, void 0, !0)
|
|
417
|
+
]),
|
|
418
|
+
key: "3"
|
|
419
|
+
} : void 0,
|
|
420
|
+
t.$slots.optionTable ? {
|
|
421
|
+
name: "optionTable",
|
|
422
|
+
fn: y(() => [
|
|
423
|
+
g(t.$slots, "optionTable", {}, void 0, !0)
|
|
424
|
+
]),
|
|
425
|
+
key: "4"
|
|
426
|
+
} : void 0,
|
|
427
|
+
t.$slots.optionFullscreen ? {
|
|
428
|
+
name: "optionFullscreen",
|
|
429
|
+
fn: y(({ toggleFullscreen: l, isFullscreen: o }) => [
|
|
430
|
+
g(t.$slots, "optionFullscreen", Y(J({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
|
|
431
|
+
]),
|
|
432
|
+
key: "5"
|
|
433
|
+
} : void 0
|
|
434
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : w("", !0),
|
|
435
|
+
j.value ? (s(), n("svg", {
|
|
436
|
+
key: 2,
|
|
437
|
+
xmlns: f(Je),
|
|
438
|
+
class: ge({ "vue-data-ui-fullscreen--on": R.value, "vue-data-ui-fulscreen--off": !R.value }),
|
|
439
|
+
viewBox: `0 0 ${F.value.width <= 0 ? 10 : F.value.width} ${F.value.height <= 0 ? 10 : F.value.height}`,
|
|
440
|
+
style: U(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
441
|
+
}, [
|
|
442
|
+
m("defs", null, [
|
|
443
|
+
(s(!0), n($, null, M(i.value, (l, o) => (s(), n("radialGradient", {
|
|
444
|
+
cx: "50%",
|
|
445
|
+
cy: "50%",
|
|
446
|
+
r: "50%",
|
|
447
|
+
fx: "50%",
|
|
448
|
+
fy: "50%",
|
|
449
|
+
id: `gradient_${S.value}_${o}`
|
|
450
|
+
}, [
|
|
451
|
+
m("stop", {
|
|
452
|
+
offset: "0%",
|
|
453
|
+
"stop-color": `${f(Ke)(l.color, 0.05)}${f(Qe)[100 - e.value.style.chart.layout.rect.gradientIntensity]}`
|
|
454
|
+
}, null, 8, bt),
|
|
455
|
+
m("stop", {
|
|
456
|
+
offset: "100%",
|
|
457
|
+
"stop-color": l.color
|
|
458
|
+
}, null, 8, wt)
|
|
459
|
+
], 8, mt))), 256))
|
|
460
|
+
]),
|
|
461
|
+
m("defs", null, [
|
|
462
|
+
m("filter", {
|
|
463
|
+
id: `blur_${S.value}`,
|
|
464
|
+
x: "-50%",
|
|
465
|
+
y: "-50%",
|
|
466
|
+
width: "200%",
|
|
467
|
+
height: "200%"
|
|
468
|
+
}, _t, 8, xt)
|
|
469
|
+
]),
|
|
470
|
+
e.value.useCustomCells ? (s(!0), n($, { key: 0 }, M(G.value, (l, o) => (s(), n("foreignObject", {
|
|
471
|
+
x: l.x,
|
|
472
|
+
y: l.y,
|
|
473
|
+
height: N.value <= 0 ? 1e-4 : N.value,
|
|
474
|
+
width: P.value <= 0 ? 1e-4 : P.value,
|
|
475
|
+
class: "vue-ui-waffle-custom-cell-foreignObject"
|
|
476
|
+
}, [
|
|
477
|
+
g(t.$slots, "cell", Y(J({ cell: { ...l, color: i.value[o].color, ...i.value[o] }, isSelected: [null, void 0].includes(A.value) ? !0 : i.value[o].serieIndex === A.value })), void 0, !0)
|
|
478
|
+
], 8, $t))), 256)) : (s(), n($, { key: 1 }, [
|
|
479
|
+
(s(!0), n($, null, M(G.value, (l, o) => (s(), n("rect", {
|
|
480
|
+
rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
|
|
481
|
+
x: l.x,
|
|
482
|
+
y: l.y,
|
|
483
|
+
height: N.value <= 0 ? 1e-4 : N.value,
|
|
484
|
+
width: P.value <= 0 ? 1e-4 : P.value,
|
|
485
|
+
fill: "white",
|
|
486
|
+
stroke: e.value.style.chart.layout.rect.stroke,
|
|
487
|
+
"stroke-width": e.value.style.chart.layout.rect.strokeWidth,
|
|
488
|
+
filter: ee(i.value[o].serieIndex)
|
|
489
|
+
}, null, 8, Tt))), 256)),
|
|
490
|
+
(s(!0), n($, null, M(G.value, (l, o) => (s(), n("rect", {
|
|
491
|
+
rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
|
|
492
|
+
x: l.x,
|
|
493
|
+
y: l.y,
|
|
494
|
+
height: N.value <= 0 ? 1e-4 : N.value,
|
|
495
|
+
width: P.value <= 0 ? 1e-4 : P.value,
|
|
496
|
+
fill: e.value.style.chart.layout.rect.useGradient && e.value.style.chart.layout.rect.gradientIntensity > 0 ? `url(#gradient_${S.value}_${o})` : i.value[o].color,
|
|
497
|
+
stroke: e.value.style.chart.layout.rect.stroke,
|
|
498
|
+
"stroke-width": e.value.style.chart.layout.rect.strokeWidth,
|
|
499
|
+
filter: ee(i.value[o].serieIndex)
|
|
500
|
+
}, null, 8, It))), 256))
|
|
501
|
+
], 64)),
|
|
502
|
+
(s(!0), n($, null, M(G.value, (l, o) => (s(), n($, null, [
|
|
503
|
+
!L.value && !e.value.style.chart.layout.grid.vertical && e.value.style.chart.layout.labels.captions.show && (i.value[o].isFirst && l.position < e.value.style.chart.layout.grid.size - 2 || i.value[o].isAbsoluteFirst && o % e.value.style.chart.layout.grid.size === 0 && i.value[o].absoluteStartIndex) ? (s(), n("foreignObject", {
|
|
504
|
+
key: 0,
|
|
505
|
+
x: l.x + e.value.style.chart.layout.labels.captions.offsetX,
|
|
506
|
+
y: l.y + e.value.style.chart.layout.labels.captions.offsetY,
|
|
507
|
+
height: H.value <= 0 ? 1e-4 : H.value,
|
|
508
|
+
width: E.value * e.value.style.chart.layout.grid.size <= 0 ? 1e-4 : E.value * e.value.style.chart.layout.grid.size,
|
|
509
|
+
filter: ee(i.value[o].serieIndex)
|
|
510
|
+
}, [
|
|
511
|
+
m("div", {
|
|
512
|
+
class: "vue-ui-waffle-caption",
|
|
513
|
+
style: U(`height: 100%; width: 100%; font-size:${e.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${E.value / 12}px;color:${f(Ze)(i.value[o].color)};gap:2px`)
|
|
514
|
+
}, [
|
|
515
|
+
e.value.style.chart.layout.labels.captions.showSerieName ? (s(), n("span", Ft, T(e.value.style.chart.layout.labels.captions.serieNameAbbreviation ? f(et)({ source: i.value[o].name, length: e.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize }) : i.value[o].name) + ": ", 1)) : w("", !0),
|
|
516
|
+
e.value.style.chart.layout.labels.captions.showPercentage ? (s(), n("span", zt, T(f(I)({ v: i.value[o].proportion, s: "%", r: e.value.style.chart.layout.labels.captions.roundingPercentage })), 1)) : w("", !0),
|
|
517
|
+
e.value.style.chart.layout.labels.captions.showPercentage && e.value.style.chart.layout.labels.captions.showValue ? (s(), n("span", Pt, " (" + T(f(I)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: i.value[o].value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.layout.labels.captions.roundingValue })) + ") ", 1)) : w("", !0),
|
|
518
|
+
!e.value.style.chart.layout.labels.captions.showPercentage && e.value.style.chart.layout.labels.captions.showValue ? (s(), n("span", Nt, T(f(I)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: i.value[o].value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.layout.labels.captions.roundingValue })), 1)) : w("", !0)
|
|
519
|
+
], 4)
|
|
520
|
+
], 8, St)) : w("", !0)
|
|
521
|
+
], 64))), 256)),
|
|
522
|
+
(s(!0), n($, null, M(G.value, (l, o) => (s(), n("rect", {
|
|
523
|
+
onMouseover: (u) => Le(o),
|
|
524
|
+
onMouseleave: a[0] || (a[0] = (u) => {
|
|
525
|
+
K.value = !1, A.value = null;
|
|
526
|
+
}),
|
|
527
|
+
x: l.x,
|
|
528
|
+
y: l.y,
|
|
529
|
+
height: H.value <= 0 ? 1e-4 : H.value,
|
|
530
|
+
width: E.value <= 0 ? 1e-4 : E.value,
|
|
531
|
+
fill: "transparent",
|
|
532
|
+
stroke: "none"
|
|
533
|
+
}, null, 40, Lt))), 256)),
|
|
534
|
+
g(t.$slots, "svg", { svg: F.value }, void 0, !0)
|
|
535
|
+
], 14, gt)) : w("", !0),
|
|
536
|
+
j.value ? w("", !0) : (s(), X(ht, {
|
|
537
|
+
key: 3,
|
|
538
|
+
config: {
|
|
539
|
+
type: "waffle",
|
|
540
|
+
style: {
|
|
541
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
542
|
+
waffle: {
|
|
543
|
+
color: "#CCCCCC"
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}, null, 8, ["config"])),
|
|
548
|
+
m("div", {
|
|
549
|
+
ref_key: "chartLegend",
|
|
550
|
+
ref: ue
|
|
551
|
+
}, [
|
|
552
|
+
e.value.style.chart.legend.show ? (s(), X(dt, {
|
|
553
|
+
key: 0,
|
|
554
|
+
legendSet: V.value,
|
|
555
|
+
config: Ne.value,
|
|
556
|
+
onClickMarker: a[1] || (a[1] = ({ legend: l }) => he(l.uid))
|
|
557
|
+
}, {
|
|
558
|
+
item: y(({ legend: l }) => [
|
|
559
|
+
m("div", {
|
|
560
|
+
onClick: (o) => l.segregate(),
|
|
561
|
+
style: U(`opacity:${p.value.includes(l.uid) ? 0.5 : 1}`)
|
|
562
|
+
}, [
|
|
563
|
+
me(T(l.name) + ": " + T(f(I)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: l.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.legend.roundingValue, isAnimating: L.value })) + " ", 1),
|
|
564
|
+
p.value.includes(l.uid) ? (s(), n("span", Vt, " ( - % ) ")) : (s(), n("span", At, " (" + T(isNaN(l.value / k.value) ? "-" : f(I)({ v: l.value / k.value * 100, s: "%", r: e.value.style.chart.legend.roundingPercentage, isAnimating: L.value })) + ") ", 1))
|
|
565
|
+
], 12, Ot)
|
|
566
|
+
]),
|
|
567
|
+
_: 1
|
|
568
|
+
}, 8, ["legendSet", "config"])) : g(t.$slots, "legend", {
|
|
569
|
+
key: 1,
|
|
570
|
+
legend: V.value
|
|
571
|
+
}, void 0, !0)
|
|
572
|
+
], 512),
|
|
573
|
+
te(ct, {
|
|
574
|
+
show: C.value.showTooltip && K.value && p.value.length < b.dataset.length,
|
|
575
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
576
|
+
color: e.value.style.chart.tooltip.color,
|
|
577
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
578
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
579
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
580
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
581
|
+
parent: D.value,
|
|
582
|
+
content: Q.value,
|
|
583
|
+
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
|
|
584
|
+
fontSize: e.value.style.chart.tooltip.fontSize
|
|
585
|
+
}, {
|
|
586
|
+
"tooltip-before": y(() => [
|
|
587
|
+
g(t.$slots, "tooltip-before", Y(J({ ...Z.value })), void 0, !0)
|
|
588
|
+
]),
|
|
589
|
+
"tooltip-after": y(() => [
|
|
590
|
+
g(t.$slots, "tooltip-after", Y(J({ ...Z.value })), void 0, !0)
|
|
591
|
+
]),
|
|
592
|
+
_: 3
|
|
593
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "parent", "content", "isCustom", "fontSize"]),
|
|
594
|
+
j.value ? (s(), X(pt, {
|
|
595
|
+
key: 4,
|
|
596
|
+
hideDetails: "",
|
|
597
|
+
config: {
|
|
598
|
+
open: C.value.showTable,
|
|
599
|
+
maxHeight: 1e4,
|
|
600
|
+
body: {
|
|
601
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
602
|
+
color: e.value.style.chart.color
|
|
603
|
+
},
|
|
604
|
+
head: {
|
|
605
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
606
|
+
color: e.value.style.chart.color
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
}, {
|
|
610
|
+
content: y(() => [
|
|
611
|
+
te(vt, {
|
|
612
|
+
colNames: q.value.colNames,
|
|
613
|
+
head: q.value.head,
|
|
614
|
+
body: q.value.body,
|
|
615
|
+
config: q.value.config,
|
|
616
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
617
|
+
onClose: a[2] || (a[2] = (l) => C.value.showTable = !1)
|
|
618
|
+
}, {
|
|
619
|
+
th: y(({ th: l }) => [
|
|
620
|
+
m("div", {
|
|
621
|
+
innerHTML: l,
|
|
622
|
+
style: { display: "flex", "align-items": "center" }
|
|
623
|
+
}, null, 8, Mt)
|
|
624
|
+
]),
|
|
625
|
+
td: y(({ td: l }) => [
|
|
626
|
+
me(T(l.name || l), 1)
|
|
627
|
+
]),
|
|
628
|
+
_: 1
|
|
629
|
+
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
630
|
+
]),
|
|
631
|
+
_: 1
|
|
632
|
+
}, 8, ["config"])) : w("", !0)
|
|
633
|
+
], 14, yt));
|
|
634
|
+
}
|
|
635
|
+
}, Kt = /* @__PURE__ */ ft(Bt, [["__scopeId", "data-v-e4e6d49b"]]);
|
|
636
|
+
export {
|
|
637
|
+
Kt as default
|
|
638
|
+
};
|