vue-data-ui 2.2.92 → 2.2.94
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/index-DZlxUin4.js +57288 -0
- package/dist/{index.es-Dc9Fd4o6.js → index.es-Cgqo-FBk.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/vue-data-ui.js +61 -455
- package/package.json +1 -1
- package/dist/data-table-d-VcuH-r.js +0 -1488
- package/dist/legend-DJCYLsl_.js +0 -61
- package/dist/themes-lgjsYHsH.js +0 -4967
- package/dist/title-BF-9Qcni.js +0 -56
- package/dist/tooltip-D85WEOKi.js +0 -94
- package/dist/user-options-DZgCz8UA.js +0 -415
- package/dist/vue-ui-3d-bar-DW7kGJSz.js +0 -20360
- package/dist/vue-ui-age-pyramid-4hcuKpFY.js +0 -781
- package/dist/vue-ui-annotator-C83FVvl8.js +0 -2175
- package/dist/vue-ui-candlestick-diclGj95.js +0 -807
- package/dist/vue-ui-chestnut-ACetHLdG.js +0 -1049
- package/dist/vue-ui-cursor-Rx7UNaYT.js +0 -229
- package/dist/vue-ui-dashboard-B3PlN0ks.js +0 -231
- package/dist/vue-ui-digits-CxMXID42.js +0 -154
- package/dist/vue-ui-donut-DMiwVXNd.js +0 -1534
- package/dist/vue-ui-dumbbell-B_X1T8TR.js +0 -621
- package/dist/vue-ui-flow-B72wzQ6V.js +0 -451
- package/dist/vue-ui-galaxy-DXX5yivT.js +0 -482
- package/dist/vue-ui-gauge-Cs9PDurH.js +0 -466
- package/dist/vue-ui-heatmap-PcoNSLdN.js +0 -581
- package/dist/vue-ui-kpi-DchEmPtB.js +0 -55
- package/dist/vue-ui-mini-loader-DltJLkqy.js +0 -131
- package/dist/vue-ui-molecule-CWvukBzs.js +0 -746
- package/dist/vue-ui-mood-radar-DEfdtIi8.js +0 -544
- package/dist/vue-ui-nested-donuts-9URpqgXE.js +0 -768
- package/dist/vue-ui-onion-C0eowUT6.js +0 -551
- package/dist/vue-ui-parallel-coordinate-plot-Bc_pAaPJ.js +0 -647
- package/dist/vue-ui-quadrant-_ddVAm9V.js +0 -1174
- package/dist/vue-ui-quick-chart-Cio0hDYO.js +0 -1310
- package/dist/vue-ui-radar-Dyg38i33.js +0 -853
- package/dist/vue-ui-rating-CE1Lmwd2.js +0 -271
- package/dist/vue-ui-relation-circle-BMlB3k3d.js +0 -303
- package/dist/vue-ui-rings-BuXeijvb.js +0 -507
- package/dist/vue-ui-scatter-B1hZfOua.js +0 -870
- package/dist/vue-ui-screenshot-0QXgxzGs.js +0 -160
- package/dist/vue-ui-smiley-B7kR7exr.js +0 -763
- package/dist/vue-ui-spark-trend-BmL2KiYL.js +0 -245
- package/dist/vue-ui-sparkgauge-BMzFv14L.js +0 -158
- package/dist/vue-ui-sparkhistogram-DWpOXqHm.js +0 -243
- package/dist/vue-ui-sparkstackbar-DB9VQXlc.js +0 -244
- package/dist/vue-ui-strip-plot-DyN6P0JO.js +0 -614
- package/dist/vue-ui-table-DM3zL89q.js +0 -2180
- package/dist/vue-ui-table-heatmap-gWx0Nslu.js +0 -237
- package/dist/vue-ui-thermometer-Bcqv5kd_.js +0 -384
- package/dist/vue-ui-timer-BIFxjujK.js +0 -451
- package/dist/vue-ui-tiremarks-zBwHpED_.js +0 -248
- package/dist/vue-ui-treemap-BaplVc_z.js +0 -719
- package/dist/vue-ui-vertical-bar-CdK6ZJPM.js +0 -734
- package/dist/vue-ui-waffle-COOzH7M3.js +0 -635
- package/dist/vue-ui-wheel-BEpuVTBk.js +0 -226
- package/dist/vue-ui-word-cloud-DNqxAAiX.js +0 -344
- package/dist/vue-ui-xy-_mHq-czW.js +0 -2058
- package/dist/vue-ui-xy-canvas-DqX8Gee5.js +0 -1003
|
@@ -1,1534 +0,0 @@
|
|
|
1
|
-
import { computed as $, ref as w, onMounted as Re, onBeforeUnmount as vt, watch as ct, openBlock as u, createElementBlock as n, normalizeClass as R, normalizeStyle as H, renderSlot as N, createVNode as we, createCommentVNode as p, createBlock as ee, unref as c, createSlots as Ue, withCtx as F, normalizeProps as ye, guardReactiveProps as fe, createElementVNode as b, Fragment as A, renderList as T, toDisplayString as x, createTextVNode as Ae, nextTick as je, pushScopeId as dt, popScopeId as ht, withKeys as yt } from "vue";
|
|
2
|
-
import { _ as Xe, i as Ye, j as ge, k as qe, e as Me, f as Ke, p as K, g as Je, h as re, m as ze, n as le, X as Qe, o as Ne, r as Ge, s as S, u as ne, y as We, D as Ze, z as ft, v as et, w as tt, A as He, C as gt, G as Be } from "./data-table-d-VcuH-r.js";
|
|
3
|
-
import { t as bt, u as pt } from "./vue-ui-age-pyramid-4hcuKpFY.js";
|
|
4
|
-
import { t as lt } from "./themes-lgjsYHsH.js";
|
|
5
|
-
import { u as Te, _ as at } from "./title-BF-9Qcni.js";
|
|
6
|
-
import { U as ot } from "./user-options-DZgCz8UA.js";
|
|
7
|
-
import { _ as mt } from "./tooltip-D85WEOKi.js";
|
|
8
|
-
import { L as ut } from "./legend-DJCYLsl_.js";
|
|
9
|
-
import { u as st, a as nt, S as rt, A as it } from "./vue-ui-3d-bar-DW7kGJSz.js";
|
|
10
|
-
import { S as xt } from "./vue-ui-candlestick-diclGj95.js";
|
|
11
|
-
const kt = (ae) => (dt("data-v-a76ecc28"), ae = ae(), ht(), ae), _t = ["id"], wt = ["xmlns", "viewBox"], $t = ["id"], Ct = ["stop-color"], Lt = ["stop-color"], St = ["stop-color"], Ft = ["id"], zt = ["id"], Nt = /* @__PURE__ */ kt(() => /* @__PURE__ */ b("feColorMatrix", {
|
|
12
|
-
type: "saturate",
|
|
13
|
-
values: "0"
|
|
14
|
-
}, null, -1)), At = ["id"], Tt = ["flood-color"], Pt = ["d", "stroke", "filter"], Ot = ["cx", "cy", "r", "fill", "filter"], It = ["stroke", "d"], Dt = ["d", "fill", "stroke", "stroke-width", "filter"], Vt = ["cx", "cy", "r", "fill"], Et = ["d", "fill", "onMouseenter", "onClick"], Mt = ["cx", "cy", "r", "fill"], Gt = ["x", "y", "fill", "font-size"], Wt = ["x", "y", "fill", "font-size"], Ht = ["x", "y", "fill", "font-size"], Bt = ["x", "y", "fill", "font-size"], Rt = ["filter"], Ut = { key: 0 }, jt = ["x", "y"], Xt = { key: 1 }, Yt = ["cx", "cy", "fill", "filter", "onClick"], qt = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], Kt = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], Jt = { key: 2 }, Qt = ["x", "y", "width"], Zt = ["onClick"], el = {
|
|
15
|
-
key: 0,
|
|
16
|
-
style: { "font-variant-numeric": "tabular-nums" }
|
|
17
|
-
}, tl = { key: 1 }, ll = ["innerHTML"], al = {
|
|
18
|
-
__name: "vue-ui-donut",
|
|
19
|
-
props: {
|
|
20
|
-
config: {
|
|
21
|
-
type: Object,
|
|
22
|
-
default() {
|
|
23
|
-
return {};
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
dataset: {
|
|
27
|
-
type: Array,
|
|
28
|
-
default() {
|
|
29
|
-
return [];
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
emits: ["selectLegend", "selectDatapoint"],
|
|
34
|
-
setup(ae, { expose: Pe, emit: be }) {
|
|
35
|
-
const P = ae, { vue_ui_donut: Oe } = st(), J = $({
|
|
36
|
-
get() {
|
|
37
|
-
return !!P.dataset && P.dataset.length;
|
|
38
|
-
},
|
|
39
|
-
set(l) {
|
|
40
|
-
return l;
|
|
41
|
-
}
|
|
42
|
-
}), C = w(null), $e = w(null), Q = w(null), O = w(null);
|
|
43
|
-
Re(() => {
|
|
44
|
-
if (Ye(P.dataset) ? ge({
|
|
45
|
-
componentName: "VueUiDonut",
|
|
46
|
-
type: "dataset"
|
|
47
|
-
}) : P.dataset.forEach((l, r) => {
|
|
48
|
-
qe({
|
|
49
|
-
datasetObject: l,
|
|
50
|
-
requiredAttributes: ["name", "values"]
|
|
51
|
-
}).forEach((o) => {
|
|
52
|
-
J.value = !1, ge({
|
|
53
|
-
componentName: "VueUiDonut",
|
|
54
|
-
type: "datasetSerieAttribute",
|
|
55
|
-
property: o,
|
|
56
|
-
index: r
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}), e.value.responsive) {
|
|
60
|
-
const l = bt(() => {
|
|
61
|
-
const { width: r, height: o } = pt({
|
|
62
|
-
chart: C.value,
|
|
63
|
-
title: e.value.style.chart.title.text ? $e.value : null,
|
|
64
|
-
legend: e.value.style.chart.legend.show ? Q.value : null
|
|
65
|
-
});
|
|
66
|
-
m.value.width = r, m.value.height = o;
|
|
67
|
-
});
|
|
68
|
-
O.value = new ResizeObserver(l), O.value.observe(C.value.parentNode);
|
|
69
|
-
}
|
|
70
|
-
}), vt(() => {
|
|
71
|
-
O.value && O.value.disconnect();
|
|
72
|
-
});
|
|
73
|
-
const k = w(Me()), pe = w(null), M = w(!1), W = w(""), U = w(null), me = w(0), e = $(() => {
|
|
74
|
-
const l = Te({
|
|
75
|
-
userConfig: P.config,
|
|
76
|
-
defaultConfig: Oe
|
|
77
|
-
});
|
|
78
|
-
return l.theme ? {
|
|
79
|
-
...Te({
|
|
80
|
-
userConfig: lt.vue_ui_donut[l.theme] || P.config,
|
|
81
|
-
defaultConfig: l
|
|
82
|
-
}),
|
|
83
|
-
customPalette: Ke[l.theme] || K
|
|
84
|
-
} : l;
|
|
85
|
-
}), { isPrinting: t, isImaging: Ie, generatePdf: Ce, generateImage: xe } = nt({
|
|
86
|
-
elementId: `donut__${k.value}`,
|
|
87
|
-
fileName: e.value.style.chart.title.text || "vue-ui-donut"
|
|
88
|
-
}), ke = $(() => Je(e.value.customPalette)), I = w({
|
|
89
|
-
dataLabels: {
|
|
90
|
-
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
91
|
-
},
|
|
92
|
-
showTable: e.value.table.show,
|
|
93
|
-
showTooltip: e.value.style.chart.tooltip.show
|
|
94
|
-
}), m = w({
|
|
95
|
-
height: 360,
|
|
96
|
-
width: 512
|
|
97
|
-
}), i = $(() => {
|
|
98
|
-
const l = e.value.style.chart.layout.donut.strokeWidth / 512, r = m.value.width * l;
|
|
99
|
-
return r > e.value.style.chart.layout.donut.strokeWidth ? e.value.style.chart.layout.donut.strokeWidth : r;
|
|
100
|
-
}), d = $(() => P.dataset.map((l, r) => ({
|
|
101
|
-
name: l.name,
|
|
102
|
-
color: re(l.color) || ke.value[r] || K[r] || K[r % K.length],
|
|
103
|
-
value: l.values.reduce((o, f) => o + f, 0),
|
|
104
|
-
absoluteValues: l.values,
|
|
105
|
-
comment: l.comment || ""
|
|
106
|
-
}))), z = w(d.value);
|
|
107
|
-
ct(() => d.value, (l) => z.value = l);
|
|
108
|
-
function oe() {
|
|
109
|
-
return d.value.map((l) => ({
|
|
110
|
-
name: l.name,
|
|
111
|
-
color: l.color,
|
|
112
|
-
value: l.value
|
|
113
|
-
}));
|
|
114
|
-
}
|
|
115
|
-
const V = w([]), E = w(null), D = w(null), X = w(!1);
|
|
116
|
-
function ie(l) {
|
|
117
|
-
const r = d.value.find((g, _) => _ === l);
|
|
118
|
-
let f = z.value.find((g, _) => _ === l).value;
|
|
119
|
-
if (V.value.includes(l)) {
|
|
120
|
-
let _ = function() {
|
|
121
|
-
f > g ? (cancelAnimationFrame(E.value), z.value = z.value.map((L, he) => l === he ? {
|
|
122
|
-
...L,
|
|
123
|
-
value: g
|
|
124
|
-
} : L), X.value = !1) : (X.value = !0, f += g * 0.025, z.value = z.value.map((L, he) => l === he ? {
|
|
125
|
-
...L,
|
|
126
|
-
value: f
|
|
127
|
-
} : L), E.value = requestAnimationFrame(_));
|
|
128
|
-
};
|
|
129
|
-
V.value = V.value.filter((L) => L !== l);
|
|
130
|
-
const g = r.value;
|
|
131
|
-
_();
|
|
132
|
-
} else if (V.value.length < d.value.length - 1) {
|
|
133
|
-
let g = function() {
|
|
134
|
-
f < 0.1 ? (cancelAnimationFrame(D.value), V.value.push(l), z.value = z.value.map((_, L) => l === L ? {
|
|
135
|
-
..._,
|
|
136
|
-
value: 0
|
|
137
|
-
} : _), X.value = !1) : (X.value = !0, f /= 1.1, z.value = z.value.map((_, L) => l === L ? {
|
|
138
|
-
..._,
|
|
139
|
-
value: f
|
|
140
|
-
} : _), D.value = requestAnimationFrame(g));
|
|
141
|
-
};
|
|
142
|
-
g();
|
|
143
|
-
}
|
|
144
|
-
be("selectLegend", B.value.map((g) => ({
|
|
145
|
-
name: g.name,
|
|
146
|
-
color: g.color,
|
|
147
|
-
value: g.value
|
|
148
|
-
})));
|
|
149
|
-
}
|
|
150
|
-
const B = $(() => (z.value.forEach((l, r) => {
|
|
151
|
-
if ([null, void 0].includes(l.values))
|
|
152
|
-
return {
|
|
153
|
-
...l,
|
|
154
|
-
values: []
|
|
155
|
-
};
|
|
156
|
-
}), z.value.map((l, r) => ({
|
|
157
|
-
...l,
|
|
158
|
-
seriesIndex: r
|
|
159
|
-
})).filter((l, r) => !V.value.includes(r)))), Le = $(() => P.dataset.map((l, r) => ({
|
|
160
|
-
name: l.name,
|
|
161
|
-
color: re(l.color) || ke.value[r] || K[r] || K[r % K.length],
|
|
162
|
-
value: (l.values || []).reduce((o, f) => o + f, 0),
|
|
163
|
-
shape: "circle"
|
|
164
|
-
})).map((l, r) => ({
|
|
165
|
-
...l,
|
|
166
|
-
proportion: l.value / P.dataset.map((o) => (o.values || []).reduce((f, g) => f + g, 0)).reduce((o, f) => o + f, 0),
|
|
167
|
-
opacity: V.value.includes(r) ? 0.5 : 1,
|
|
168
|
-
segregate: () => ie(r),
|
|
169
|
-
isSegregated: V.value.includes(r)
|
|
170
|
-
}))), De = $(() => ({
|
|
171
|
-
cy: "donut-div-legend",
|
|
172
|
-
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
173
|
-
color: e.value.style.chart.legend.color,
|
|
174
|
-
fontSize: e.value.style.chart.legend.fontSize,
|
|
175
|
-
paddingBottom: 12,
|
|
176
|
-
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
177
|
-
})), Y = $(() => {
|
|
178
|
-
const l = Math.min(m.value.width / 3, m.value.height / 3);
|
|
179
|
-
return l < 55 ? 55 : l;
|
|
180
|
-
}), Z = $(() => ze({ series: B.value }, m.value.width / 2, m.value.height / 2, Y.value, Y.value, 1.99999, 2, 1, 360, 105.25, i.value));
|
|
181
|
-
function te(l) {
|
|
182
|
-
return l.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
|
|
183
|
-
}
|
|
184
|
-
function ve(l, r) {
|
|
185
|
-
return isNaN(l.value / ce(r)) ? 0 : (l.value / ce(r) * 100).toFixed(0) + "%";
|
|
186
|
-
}
|
|
187
|
-
function ce(l) {
|
|
188
|
-
return [...l].map((r) => r.value).reduce((r, o) => r + o, 0);
|
|
189
|
-
}
|
|
190
|
-
const j = $(() => B.value.map((l) => l.value).reduce((l, r) => l + r, 0)), Se = $(() => j.value / B.value.length), de = w(null);
|
|
191
|
-
function Ve({ datapoint: l, relativeIndex: r, seriesIndex: o, show: f = !1 }) {
|
|
192
|
-
de.value = { datapoint: l, seriesIndex: o, config: e.value, series: d.value }, M.value = f, U.value = r;
|
|
193
|
-
let g = "";
|
|
194
|
-
const _ = e.value.style.chart.tooltip.customFormat;
|
|
195
|
-
We(_) && ft(() => _({
|
|
196
|
-
seriesIndex: o,
|
|
197
|
-
datapoint: l,
|
|
198
|
-
series: d.value,
|
|
199
|
-
config: e.value
|
|
200
|
-
})) ? W.value = _({
|
|
201
|
-
seriesIndex: o,
|
|
202
|
-
datapoint: l,
|
|
203
|
-
series: d.value,
|
|
204
|
-
config: e.value
|
|
205
|
-
}) : (g += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, g += `<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="${l.color}"/></svg>`, e.value.style.chart.tooltip.showValue && (g += `<b>${le({ 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.tooltip.roundingValue })}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? g += `<span>(${(l.proportion * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}%)</span></div>` : g += `<b>${(l.proportion * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}%</b></div>`), e.value.style.chart.comments.showInTooltip && l.comment && (g += `<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${l.color}">${l.comment}</div>`), W.value = `<div>${g}</div>`);
|
|
206
|
-
}
|
|
207
|
-
function ue(l) {
|
|
208
|
-
return e.value.useBlurOnHover && ![null, void 0].includes(U.value) && U.value !== l ? `url(#blur_${k.value})` : "";
|
|
209
|
-
}
|
|
210
|
-
const G = $(() => {
|
|
211
|
-
const l = B.value.map((o) => ({
|
|
212
|
-
name: o.name,
|
|
213
|
-
color: o.color
|
|
214
|
-
})), r = B.value.map((o) => o.value);
|
|
215
|
-
return { head: l, body: r };
|
|
216
|
-
});
|
|
217
|
-
function Fe() {
|
|
218
|
-
je(() => {
|
|
219
|
-
const l = G.value.head.map((f, g) => [[
|
|
220
|
-
f.name
|
|
221
|
-
], [G.value.body[g]], [isNaN(G.value.body[g] / j.value) ? "-" : G.value.body[g] / j.value * 100]]), r = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(l), o = et(r);
|
|
222
|
-
tt({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-donut" });
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
const se = $(() => {
|
|
226
|
-
const l = [
|
|
227
|
-
' <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>',
|
|
228
|
-
le({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: j.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
229
|
-
"100%"
|
|
230
|
-
], r = G.value.head.map((g, _) => {
|
|
231
|
-
const L = le({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: G.value.body[_], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue });
|
|
232
|
-
return [
|
|
233
|
-
{
|
|
234
|
-
color: g.color,
|
|
235
|
-
name: g.name
|
|
236
|
-
},
|
|
237
|
-
L,
|
|
238
|
-
isNaN(G.value.body[_] / j.value) ? "-" : (G.value.body[_] / j.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
|
|
239
|
-
];
|
|
240
|
-
}), o = {
|
|
241
|
-
th: {
|
|
242
|
-
backgroundColor: e.value.table.th.backgroundColor,
|
|
243
|
-
color: e.value.table.th.color,
|
|
244
|
-
outline: e.value.table.th.outline
|
|
245
|
-
},
|
|
246
|
-
td: {
|
|
247
|
-
backgroundColor: e.value.table.td.backgroundColor,
|
|
248
|
-
color: e.value.table.td.color,
|
|
249
|
-
outline: e.value.table.td.outline
|
|
250
|
-
},
|
|
251
|
-
breakpoint: e.value.table.responsiveBreakpoint
|
|
252
|
-
};
|
|
253
|
-
return {
|
|
254
|
-
colNames: [
|
|
255
|
-
e.value.table.columnNames.series,
|
|
256
|
-
e.value.table.columnNames.value,
|
|
257
|
-
e.value.table.columnNames.percentage
|
|
258
|
-
],
|
|
259
|
-
head: l,
|
|
260
|
-
body: r,
|
|
261
|
-
config: o
|
|
262
|
-
};
|
|
263
|
-
}), q = w(!1);
|
|
264
|
-
function Ee(l) {
|
|
265
|
-
q.value = l, me.value += 1;
|
|
266
|
-
}
|
|
267
|
-
const _e = $(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
|
|
268
|
-
function s(l) {
|
|
269
|
-
return l.toFixed(e.value.style.chart.legend.roundingPercentage).split("").map((r) => "-").join("");
|
|
270
|
-
}
|
|
271
|
-
function h(l, r) {
|
|
272
|
-
be("selectDatapoint", { datapoint: l, index: r });
|
|
273
|
-
}
|
|
274
|
-
function a() {
|
|
275
|
-
I.value.showTable = !I.value.showTable;
|
|
276
|
-
}
|
|
277
|
-
function y() {
|
|
278
|
-
I.value.dataLabels.show = !I.value.dataLabels.show;
|
|
279
|
-
}
|
|
280
|
-
function v() {
|
|
281
|
-
I.value.showTooltip = !I.value.showTooltip;
|
|
282
|
-
}
|
|
283
|
-
return Pe({
|
|
284
|
-
getData: oe,
|
|
285
|
-
generatePdf: Ce,
|
|
286
|
-
generateCsv: Fe,
|
|
287
|
-
generateImage: xe,
|
|
288
|
-
toggleTable: a,
|
|
289
|
-
toggleLabels: y,
|
|
290
|
-
toggleTooltip: v
|
|
291
|
-
}), (l, r) => (u(), n("div", {
|
|
292
|
-
ref_key: "donutChart",
|
|
293
|
-
ref: C,
|
|
294
|
-
class: R(`vue-ui-donut ${q.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
295
|
-
style: H(`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}`),
|
|
296
|
-
id: `donut__${k.value}`
|
|
297
|
-
}, [
|
|
298
|
-
N(l.$slots, "userConfig", {}, void 0, !0),
|
|
299
|
-
e.value.style.chart.title.text ? (u(), n("div", {
|
|
300
|
-
key: 0,
|
|
301
|
-
ref_key: "chartTitle",
|
|
302
|
-
ref: $e,
|
|
303
|
-
style: H(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:24px`)
|
|
304
|
-
}, [
|
|
305
|
-
we(at, {
|
|
306
|
-
config: {
|
|
307
|
-
title: {
|
|
308
|
-
cy: "donut-div-title",
|
|
309
|
-
...e.value.style.chart.title
|
|
310
|
-
},
|
|
311
|
-
subtitle: {
|
|
312
|
-
cy: "donut-div-subtitle",
|
|
313
|
-
...e.value.style.chart.title.subtitle
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}, null, 8, ["config"])
|
|
317
|
-
], 4)) : p("", !0),
|
|
318
|
-
e.value.userOptions.show && J.value ? (u(), ee(ot, {
|
|
319
|
-
ref_key: "details",
|
|
320
|
-
ref: pe,
|
|
321
|
-
key: `user_option_${me.value}`,
|
|
322
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
323
|
-
color: e.value.style.chart.color,
|
|
324
|
-
isPrinting: c(t),
|
|
325
|
-
isImaging: c(Ie),
|
|
326
|
-
uid: k.value,
|
|
327
|
-
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
328
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
329
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
330
|
-
hasXls: e.value.userOptions.buttons.csv,
|
|
331
|
-
hasTable: e.value.userOptions.buttons.table,
|
|
332
|
-
hasLabel: e.value.userOptions.buttons.labels,
|
|
333
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
334
|
-
isFullscreen: q.value,
|
|
335
|
-
chartElement: C.value,
|
|
336
|
-
isTooltip: I.value.showTooltip,
|
|
337
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
338
|
-
onToggleFullscreen: Ee,
|
|
339
|
-
onGeneratePdf: c(Ce),
|
|
340
|
-
onGenerateCsv: Fe,
|
|
341
|
-
onGenerateImage: c(xe),
|
|
342
|
-
onToggleTable: a,
|
|
343
|
-
onToggleLabels: y,
|
|
344
|
-
onToggleTooltip: v
|
|
345
|
-
}, Ue({ _: 2 }, [
|
|
346
|
-
l.$slots.optionTooltip ? {
|
|
347
|
-
name: "optionTooltip",
|
|
348
|
-
fn: F(() => [
|
|
349
|
-
N(l.$slots, "optionTooltip", {}, void 0, !0)
|
|
350
|
-
]),
|
|
351
|
-
key: "0"
|
|
352
|
-
} : void 0,
|
|
353
|
-
l.$slots.optionPdf ? {
|
|
354
|
-
name: "optionPdf",
|
|
355
|
-
fn: F(() => [
|
|
356
|
-
N(l.$slots, "optionPdf", {}, void 0, !0)
|
|
357
|
-
]),
|
|
358
|
-
key: "1"
|
|
359
|
-
} : void 0,
|
|
360
|
-
l.$slots.optionCsv ? {
|
|
361
|
-
name: "optionCsv",
|
|
362
|
-
fn: F(() => [
|
|
363
|
-
N(l.$slots, "optionCsv", {}, void 0, !0)
|
|
364
|
-
]),
|
|
365
|
-
key: "2"
|
|
366
|
-
} : void 0,
|
|
367
|
-
l.$slots.optionImg ? {
|
|
368
|
-
name: "optionImg",
|
|
369
|
-
fn: F(() => [
|
|
370
|
-
N(l.$slots, "optionImg", {}, void 0, !0)
|
|
371
|
-
]),
|
|
372
|
-
key: "3"
|
|
373
|
-
} : void 0,
|
|
374
|
-
l.$slots.optionTable ? {
|
|
375
|
-
name: "optionTable",
|
|
376
|
-
fn: F(() => [
|
|
377
|
-
N(l.$slots, "optionTable", {}, void 0, !0)
|
|
378
|
-
]),
|
|
379
|
-
key: "4"
|
|
380
|
-
} : void 0,
|
|
381
|
-
l.$slots.optionLabels ? {
|
|
382
|
-
name: "optionLabels",
|
|
383
|
-
fn: F(() => [
|
|
384
|
-
N(l.$slots, "optionLabels", {}, void 0, !0)
|
|
385
|
-
]),
|
|
386
|
-
key: "5"
|
|
387
|
-
} : void 0,
|
|
388
|
-
l.$slots.optionFullscreen ? {
|
|
389
|
-
name: "optionFullscreen",
|
|
390
|
-
fn: F(({ toggleFullscreen: o, isFullscreen: f }) => [
|
|
391
|
-
N(l.$slots, "optionFullscreen", ye(fe({ toggleFullscreen: o, isFullscreen: f })), void 0, !0)
|
|
392
|
-
]),
|
|
393
|
-
key: "6"
|
|
394
|
-
} : void 0
|
|
395
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "isTooltip", "titles", "onGeneratePdf", "onGenerateImage"])) : p("", !0),
|
|
396
|
-
J.value ? (u(), n("svg", {
|
|
397
|
-
key: 2,
|
|
398
|
-
xmlns: c(Qe),
|
|
399
|
-
class: R({ "vue-data-ui-fullscreen--on": q.value, "vue-data-ui-fulscreen--off": !q.value }),
|
|
400
|
-
viewBox: `0 0 ${m.value.width <= 0 ? 10 : m.value.width} ${m.value.height <= 0 ? 10 : m.value.height}`,
|
|
401
|
-
style: H(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
402
|
-
}, [
|
|
403
|
-
b("defs", null, [
|
|
404
|
-
e.value.style.chart.useGradient ? (u(), n("radialGradient", {
|
|
405
|
-
key: 0,
|
|
406
|
-
id: `gradient_${k.value}`
|
|
407
|
-
}, [
|
|
408
|
-
b("stop", {
|
|
409
|
-
offset: "0%",
|
|
410
|
-
"stop-color": `${c(re)(e.value.style.chart.backgroundColor)}00`
|
|
411
|
-
}, null, 8, Ct),
|
|
412
|
-
b("stop", {
|
|
413
|
-
offset: "77%",
|
|
414
|
-
"stop-color": "#FFFFFF" + c(Ne)[e.value.style.chart.gradientIntensity]
|
|
415
|
-
}, null, 8, Lt),
|
|
416
|
-
b("stop", {
|
|
417
|
-
offset: "100%",
|
|
418
|
-
"stop-color": `${c(re)(e.value.style.chart.backgroundColor)}00`
|
|
419
|
-
}, null, 8, St)
|
|
420
|
-
], 8, $t)) : p("", !0)
|
|
421
|
-
]),
|
|
422
|
-
b("defs", null, [
|
|
423
|
-
b("filter", {
|
|
424
|
-
id: `blur_${k.value}`,
|
|
425
|
-
x: "-50%",
|
|
426
|
-
y: "-50%",
|
|
427
|
-
width: "200%",
|
|
428
|
-
height: "200%"
|
|
429
|
-
}, [
|
|
430
|
-
b("feGaussianBlur", {
|
|
431
|
-
in: "SourceGraphic",
|
|
432
|
-
stdDeviation: 2,
|
|
433
|
-
id: `blur_std_${k.value}`
|
|
434
|
-
}, null, 8, zt),
|
|
435
|
-
Nt
|
|
436
|
-
], 8, Ft),
|
|
437
|
-
b("filter", {
|
|
438
|
-
id: `shadow_${k.value}`,
|
|
439
|
-
"color-interpolation-filters": "sRGB"
|
|
440
|
-
}, [
|
|
441
|
-
b("feDropShadow", {
|
|
442
|
-
dx: "0",
|
|
443
|
-
dy: "0",
|
|
444
|
-
stdDeviation: "10",
|
|
445
|
-
"flood-opacity": "0.5",
|
|
446
|
-
"flood-color": e.value.style.chart.layout.donut.shadowColor
|
|
447
|
-
}, null, 8, Tt)
|
|
448
|
-
], 8, At)
|
|
449
|
-
]),
|
|
450
|
-
(u(!0), n(A, null, T(Z.value, (o, f) => (u(), n("g", null, [
|
|
451
|
-
te(o) && I.value.dataLabels.show ? (u(), n("path", {
|
|
452
|
-
key: 0,
|
|
453
|
-
d: c(Ge)(o, { x: m.value.width / 2, y: m.value.height / 2 }, 16, 16, !1, !1, i.value),
|
|
454
|
-
stroke: o.color,
|
|
455
|
-
"stroke-width": "1",
|
|
456
|
-
"stroke-linecap": "round",
|
|
457
|
-
"stroke-linejoin": "round",
|
|
458
|
-
fill: "none",
|
|
459
|
-
filter: ue(f)
|
|
460
|
-
}, null, 8, Pt)) : p("", !0)
|
|
461
|
-
]))), 256)),
|
|
462
|
-
b("circle", {
|
|
463
|
-
cx: m.value.width / 2,
|
|
464
|
-
cy: m.value.height / 2,
|
|
465
|
-
r: Y.value <= 0 ? 10 : Y.value,
|
|
466
|
-
fill: e.value.style.chart.backgroundColor,
|
|
467
|
-
filter: e.value.style.chart.layout.donut.useShadow ? `url(#shadow_${k.value})` : ""
|
|
468
|
-
}, null, 8, Ot),
|
|
469
|
-
(u(!0), n(A, null, T(Z.value, (o, f) => (u(), n("path", {
|
|
470
|
-
stroke: e.value.style.chart.backgroundColor,
|
|
471
|
-
d: o.arcSlice,
|
|
472
|
-
fill: "#FFFFFF"
|
|
473
|
-
}, null, 8, It))), 256)),
|
|
474
|
-
(u(!0), n(A, null, T(Z.value, (o, f) => (u(), n("path", {
|
|
475
|
-
class: "vue-ui-donut-arc-path",
|
|
476
|
-
d: o.arcSlice,
|
|
477
|
-
fill: `${o.color}CC`,
|
|
478
|
-
stroke: e.value.style.chart.backgroundColor,
|
|
479
|
-
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
480
|
-
filter: ue(f)
|
|
481
|
-
}, null, 8, Dt))), 256)),
|
|
482
|
-
e.value.style.chart.useGradient ? (u(), n("circle", {
|
|
483
|
-
key: 0,
|
|
484
|
-
cx: m.value.width / 2,
|
|
485
|
-
cy: m.value.height / 2,
|
|
486
|
-
r: (
|
|
487
|
-
/* This might require adjustments */
|
|
488
|
-
Y.value <= 0 ? 10 : Y.value
|
|
489
|
-
),
|
|
490
|
-
fill: `url(#gradient_${k.value})`
|
|
491
|
-
}, null, 8, Vt)) : p("", !0),
|
|
492
|
-
(u(!0), n(A, null, T(Z.value, (o, f) => (u(), n("path", {
|
|
493
|
-
"data-cy-donut-trap": "",
|
|
494
|
-
d: o.arcSlice,
|
|
495
|
-
fill: U.value === f ? "rgba(0,0,0,0.1)" : "transparent",
|
|
496
|
-
onMouseenter: (g) => Ve({
|
|
497
|
-
datapoint: o,
|
|
498
|
-
relativeIndex: f,
|
|
499
|
-
seriesIndex: o.seriesIndex,
|
|
500
|
-
show: !0
|
|
501
|
-
}),
|
|
502
|
-
onMouseleave: r[0] || (r[0] = (g) => {
|
|
503
|
-
M.value = !1, U.value = null;
|
|
504
|
-
}),
|
|
505
|
-
onClick: (g) => h(o, f)
|
|
506
|
-
}, null, 40, Et))), 256)),
|
|
507
|
-
e.value.style.chart.layout.labels.hollow.show ? (u(), n("circle", {
|
|
508
|
-
key: 1,
|
|
509
|
-
cx: m.value.width / 2,
|
|
510
|
-
cy: m.value.height / 2,
|
|
511
|
-
r: (
|
|
512
|
-
/* This might require adjustments */
|
|
513
|
-
Y.value - i.value <= 0 ? 10 : Y.value - i.value
|
|
514
|
-
),
|
|
515
|
-
fill: e.value.style.chart.backgroundColor
|
|
516
|
-
}, null, 8, Mt)) : p("", !0),
|
|
517
|
-
e.value.style.chart.layout.labels.hollow.total.show ? (u(), n("text", {
|
|
518
|
-
key: 2,
|
|
519
|
-
"text-anchor": "middle",
|
|
520
|
-
x: m.value.width / 2,
|
|
521
|
-
y: m.value.height / 2 - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.offsetY,
|
|
522
|
-
fill: e.value.style.chart.layout.labels.hollow.total.color,
|
|
523
|
-
"font-size": e.value.style.chart.layout.labels.hollow.total.fontSize,
|
|
524
|
-
style: H(`font-weight:${e.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
|
|
525
|
-
}, x(e.value.style.chart.layout.labels.hollow.total.text), 13, Gt)) : p("", !0),
|
|
526
|
-
e.value.style.chart.layout.labels.hollow.total.show ? (u(), n("text", {
|
|
527
|
-
key: 3,
|
|
528
|
-
"text-anchor": "middle",
|
|
529
|
-
x: m.value.width / 2,
|
|
530
|
-
y: m.value.height / 2 + e.value.style.chart.layout.labels.hollow.total.fontSize - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.value.offsetY,
|
|
531
|
-
fill: e.value.style.chart.layout.labels.hollow.total.value.color,
|
|
532
|
-
"font-size": e.value.style.chart.layout.labels.hollow.total.value.fontSize,
|
|
533
|
-
style: H(`font-weight:${e.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
|
|
534
|
-
}, x(c(le)({
|
|
535
|
-
p: e.value.style.chart.layout.labels.hollow.total.value.prefix,
|
|
536
|
-
v: j.value,
|
|
537
|
-
s: e.value.style.chart.layout.labels.hollow.total.value.suffix
|
|
538
|
-
})), 13, Wt)) : p("", !0),
|
|
539
|
-
e.value.style.chart.layout.labels.hollow.average.show ? (u(), n("text", {
|
|
540
|
-
key: 4,
|
|
541
|
-
"text-anchor": "middle",
|
|
542
|
-
x: m.value.width / 2,
|
|
543
|
-
y: m.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.offsetY,
|
|
544
|
-
fill: e.value.style.chart.layout.labels.hollow.average.color,
|
|
545
|
-
"font-size": e.value.style.chart.layout.labels.hollow.average.fontSize,
|
|
546
|
-
style: H(`font-weight:${e.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
|
|
547
|
-
}, x(e.value.style.chart.layout.labels.hollow.average.text), 13, Ht)) : p("", !0),
|
|
548
|
-
e.value.style.chart.layout.labels.hollow.average.show ? (u(), n("text", {
|
|
549
|
-
key: 5,
|
|
550
|
-
"text-anchor": "middle",
|
|
551
|
-
x: m.value.width / 2,
|
|
552
|
-
y: m.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.fontSize + e.value.style.chart.layout.labels.hollow.average.value.offsetY,
|
|
553
|
-
fill: e.value.style.chart.layout.labels.hollow.average.value.color,
|
|
554
|
-
"font-size": e.value.style.chart.layout.labels.hollow.average.value.fontSize,
|
|
555
|
-
style: H(`font-weight:${e.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
|
|
556
|
-
}, x(X.value ? "--" : c(le)({
|
|
557
|
-
p: e.value.style.chart.layout.labels.hollow.average.value.prefix,
|
|
558
|
-
v: Se.value,
|
|
559
|
-
s: e.value.style.chart.layout.labels.hollow.average.value.suffix,
|
|
560
|
-
r: e.value.style.chart.layout.labels.hollow.average.value.rounding
|
|
561
|
-
})), 13, Bt)) : p("", !0),
|
|
562
|
-
(u(!0), n(A, null, T(Z.value, (o, f) => (u(), n("g", {
|
|
563
|
-
filter: ue(f),
|
|
564
|
-
class: R({ animated: e.value.useCssAnimation })
|
|
565
|
-
}, [
|
|
566
|
-
e.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (u(), n("g", Ut, [
|
|
567
|
-
(u(), n("foreignObject", {
|
|
568
|
-
x: c(S)(o, !0).anchor === "end" ? c(S)(o).x - 120 : c(S)(o, !0).anchor === "middle" ? c(S)(o).x - 60 : c(S)(o).x,
|
|
569
|
-
y: c(ne)(o) - (_e.value ? 20 : 0),
|
|
570
|
-
width: "120",
|
|
571
|
-
height: "60",
|
|
572
|
-
style: { overflow: "visible" }
|
|
573
|
-
}, [
|
|
574
|
-
b("div", null, [
|
|
575
|
-
N(l.$slots, "dataLabel", ye(fe({
|
|
576
|
-
datapoint: o,
|
|
577
|
-
isBlur: !e.value.useBlurOnHover || [null, void 0].includes(U.value) || U.value === f,
|
|
578
|
-
isSafari: _e.value,
|
|
579
|
-
isVisible: te(o) && I.value.dataLabels.show,
|
|
580
|
-
textAlign: c(S)(o, !0, 16, !0).anchor,
|
|
581
|
-
flexAlign: c(S)(o, !0, 16).anchor,
|
|
582
|
-
percentage: ve(o, Z.value)
|
|
583
|
-
})), void 0, !0)
|
|
584
|
-
])
|
|
585
|
-
], 8, jt))
|
|
586
|
-
])) : (u(), n("g", Xt, [
|
|
587
|
-
te(o) && I.value.dataLabels.show ? (u(), n("circle", {
|
|
588
|
-
key: 0,
|
|
589
|
-
cx: c(S)(o).x,
|
|
590
|
-
cy: c(ne)(o) - 3.5,
|
|
591
|
-
fill: o.color,
|
|
592
|
-
r: 3,
|
|
593
|
-
filter: !e.value.useBlurOnHover || [null, void 0].includes(U.value) || U.value === f ? "" : `url(#blur_${k.value})`,
|
|
594
|
-
onClick: (g) => h(o, f)
|
|
595
|
-
}, null, 8, Yt)) : p("", !0),
|
|
596
|
-
te(o) && I.value.dataLabels.show ? (u(), n("text", {
|
|
597
|
-
key: 1,
|
|
598
|
-
"text-anchor": c(S)(o, !0, 12).anchor,
|
|
599
|
-
x: c(S)(o, !0, 12).x,
|
|
600
|
-
y: c(ne)(o),
|
|
601
|
-
fill: e.value.style.chart.layout.labels.percentage.color,
|
|
602
|
-
"font-size": e.value.style.chart.layout.labels.percentage.fontSize,
|
|
603
|
-
style: H(`font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
|
|
604
|
-
onClick: (g) => h(o, f)
|
|
605
|
-
}, x(ve(o, Z.value)) + " " + x(e.value.style.chart.layout.labels.value.show ? `(${c(le)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: o.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, rounding: e.value.style.chart.layout.labels.value.rounding })})` : ""), 13, qt)) : p("", !0),
|
|
606
|
-
te(o) && I.value.dataLabels.show ? (u(), n("text", {
|
|
607
|
-
key: 2,
|
|
608
|
-
"text-anchor": c(S)(o).anchor,
|
|
609
|
-
x: c(S)(o, !0, 12).x,
|
|
610
|
-
y: c(ne)(o) + e.value.style.chart.layout.labels.percentage.fontSize,
|
|
611
|
-
fill: e.value.style.chart.layout.labels.name.color,
|
|
612
|
-
"font-size": e.value.style.chart.layout.labels.name.fontSize,
|
|
613
|
-
style: H(`font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
|
|
614
|
-
onClick: (g) => h(o, f)
|
|
615
|
-
}, x(o.name), 13, Kt)) : p("", !0)
|
|
616
|
-
])),
|
|
617
|
-
I.value.dataLabels.show && e.value.style.chart.comments.show && o.comment ? (u(), n("g", Jt, [
|
|
618
|
-
te(o) ? (u(), n("foreignObject", {
|
|
619
|
-
key: 0,
|
|
620
|
-
x: e.value.style.chart.comments.offsetX + (c(S)(o, !0).anchor === "end" ? c(S)(o).x - e.value.style.chart.comments.width : c(S)(o, !0).anchor === "middle" ? c(S)(o).x - e.value.style.chart.comments.width / 2 : c(S)(o).x),
|
|
621
|
-
y: c(ne)(o) + 24 + e.value.style.chart.comments.offsetY,
|
|
622
|
-
width: e.value.style.chart.comments.width,
|
|
623
|
-
height: "200",
|
|
624
|
-
style: { overflow: "visible", "pointer-events": "none" }
|
|
625
|
-
}, [
|
|
626
|
-
b("div", null, [
|
|
627
|
-
N(l.$slots, "plot-comment", {
|
|
628
|
-
plot: { ...o, textAlign: c(S)(o, !0, 16, !0).anchor, flexAlign: c(S)(o, !0, 16).anchor }
|
|
629
|
-
}, void 0, !0)
|
|
630
|
-
])
|
|
631
|
-
], 8, Qt)) : p("", !0)
|
|
632
|
-
])) : p("", !0)
|
|
633
|
-
], 10, Rt))), 256)),
|
|
634
|
-
N(l.$slots, "svg", { svg: m.value }, void 0, !0)
|
|
635
|
-
], 14, wt)) : p("", !0),
|
|
636
|
-
J.value ? p("", !0) : (u(), ee(rt, {
|
|
637
|
-
key: 3,
|
|
638
|
-
config: {
|
|
639
|
-
type: "donut",
|
|
640
|
-
style: {
|
|
641
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
642
|
-
donut: {
|
|
643
|
-
color: "#CCCCCC",
|
|
644
|
-
strokeWidth: i.value * 0.8
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
}, null, 8, ["config"])),
|
|
649
|
-
b("div", {
|
|
650
|
-
ref_key: "chartLegend",
|
|
651
|
-
ref: Q
|
|
652
|
-
}, [
|
|
653
|
-
e.value.style.chart.legend.show ? (u(), ee(ut, {
|
|
654
|
-
key: 0,
|
|
655
|
-
legendSet: Le.value,
|
|
656
|
-
config: De.value,
|
|
657
|
-
onClickMarker: r[1] || (r[1] = ({ i: o }) => ie(o))
|
|
658
|
-
}, {
|
|
659
|
-
item: F(({ legend: o, index: f }) => [
|
|
660
|
-
b("div", {
|
|
661
|
-
onClick: (g) => o.segregate(),
|
|
662
|
-
style: H(`opacity:${V.value.includes(f) ? 0.5 : 1}`)
|
|
663
|
-
}, [
|
|
664
|
-
Ae(x(o.name) + ": " + x(c(le)({ 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.legend.roundingValue })) + " ", 1),
|
|
665
|
-
V.value.includes(f) ? (u(), n("span", tl, " ( " + x(s(o.proportion * 100)) + " % ) ", 1)) : (u(), n("span", el, " (" + x(isNaN(o.value / j.value) ? "-" : c(le)({
|
|
666
|
-
v: X.value ? o.proportion * 100 : o.value / j.value * 100,
|
|
667
|
-
s: "%",
|
|
668
|
-
r: e.value.style.chart.legend.roundingPercentage
|
|
669
|
-
})) + ") ", 1))
|
|
670
|
-
], 12, Zt)
|
|
671
|
-
]),
|
|
672
|
-
_: 1
|
|
673
|
-
}, 8, ["legendSet", "config"])) : p("", !0),
|
|
674
|
-
N(l.$slots, "legend", { legend: Le.value }, void 0, !0)
|
|
675
|
-
], 512),
|
|
676
|
-
we(mt, {
|
|
677
|
-
show: I.value.showTooltip && M.value,
|
|
678
|
-
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
679
|
-
color: e.value.style.chart.tooltip.color,
|
|
680
|
-
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
681
|
-
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
682
|
-
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
683
|
-
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
684
|
-
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
685
|
-
parent: C.value,
|
|
686
|
-
content: W.value,
|
|
687
|
-
isCustom: c(We)(e.value.style.chart.tooltip.customFormat)
|
|
688
|
-
}, {
|
|
689
|
-
"tooltip-before": F(() => [
|
|
690
|
-
N(l.$slots, "tooltip-before", ye(fe({ ...de.value })), void 0, !0)
|
|
691
|
-
]),
|
|
692
|
-
"tooltip-after": F(() => [
|
|
693
|
-
N(l.$slots, "tooltip-after", ye(fe({ ...de.value })), void 0, !0)
|
|
694
|
-
]),
|
|
695
|
-
_: 3
|
|
696
|
-
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "parent", "content", "isCustom"]),
|
|
697
|
-
J.value ? (u(), ee(it, {
|
|
698
|
-
key: 4,
|
|
699
|
-
hideDetails: "",
|
|
700
|
-
config: {
|
|
701
|
-
open: I.value.showTable,
|
|
702
|
-
maxHeight: 1e4,
|
|
703
|
-
body: {
|
|
704
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
705
|
-
color: e.value.style.chart.color
|
|
706
|
-
},
|
|
707
|
-
head: {
|
|
708
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
709
|
-
color: e.value.style.chart.color
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
}, {
|
|
713
|
-
content: F(() => [
|
|
714
|
-
we(Ze, {
|
|
715
|
-
colNames: se.value.colNames,
|
|
716
|
-
head: se.value.head,
|
|
717
|
-
body: se.value.body,
|
|
718
|
-
config: se.value.config,
|
|
719
|
-
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
720
|
-
onClose: r[2] || (r[2] = (o) => I.value.showTable = !1)
|
|
721
|
-
}, {
|
|
722
|
-
th: F(({ th: o }) => [
|
|
723
|
-
b("div", {
|
|
724
|
-
innerHTML: o,
|
|
725
|
-
style: { display: "flex", "align-items": "center" }
|
|
726
|
-
}, null, 8, ll)
|
|
727
|
-
]),
|
|
728
|
-
td: F(({ td: o }) => [
|
|
729
|
-
Ae(x(o.name || o), 1)
|
|
730
|
-
]),
|
|
731
|
-
_: 1
|
|
732
|
-
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
733
|
-
]),
|
|
734
|
-
_: 1
|
|
735
|
-
}, 8, ["config"])) : p("", !0)
|
|
736
|
-
], 14, _t));
|
|
737
|
-
}
|
|
738
|
-
}, ol = /* @__PURE__ */ Xe(al, [["__scopeId", "data-v-a76ecc28"]]), ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
739
|
-
__proto__: null,
|
|
740
|
-
default: ol
|
|
741
|
-
}, Symbol.toStringTag, { value: "Module" })), ul = ["id"], sl = ["xmlns", "viewBox"], nl = ["id"], rl = ["stop-color"], il = ["stop-color"], vl = ["id"], cl = ["stop-color"], dl = ["stop-color"], hl = ["stop-color"], yl = { key: 0 }, fl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], gl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], bl = { key: 0 }, pl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ml = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], xl = ["x", "y", "font-size", "fill", "font-weight"], kl = ["text-anchor", "font-size", "fill", "transform"], _l = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], wl = { key: 1 }, $l = ["cx", "cy", "r", "fill"], Cl = { key: 0 }, Ll = { key: 0 }, Sl = ["d", "stroke"], Fl = ["text-anchor", "x", "y", "fill"], zl = ["cx", "cy", "r", "fill"], Nl = { key: 0 }, Al = ["cx", "cy", "fill"], Tl = { key: 1 }, Pl = ["d", "fill", "stroke"], Ol = { key: 2 }, Il = ["d", "fill", "stroke"], Dl = ["x", "y", "font-size", "fill"], Vl = ["x", "y", "width", "fill", "onClick"], El = ["x", "y", "width", "height", "onMouseenter", "onClick"], Ml = {
|
|
742
|
-
key: 3,
|
|
743
|
-
"data-cy-zoom": "",
|
|
744
|
-
class: "vue-ui-donut-evolution-dialog"
|
|
745
|
-
}, Gl = ["x", "y", "width", "height", "fill"], Wl = ["x1", "y1", "x2", "y2", "stroke"], Hl = ["x1", "y2", "x2", "y1", "stroke"], Bl = ["onKeypress", "cx", "cy", "r"], Rl = ["d", "stroke"], Ul = ["cx", "cy", "r", "fill"], jl = ["d", "fill", "stroke"], Xl = { class: "vue-ui-donut-evolution-focus" }, Yl = ["text-anchor", "x", "y", "fill"], ql = ["cx", "cy", "r", "fill"], Kl = ["cx", "cy", "r", "fill"], Jl = ["x", "y", "fill"], Ql = ["x", "y", "font-size", "fill"], Zl = ["onClick"], ea = { key: 0 }, ta = { key: 1 }, la = { key: 0 }, aa = { key: 1 }, oa = {
|
|
746
|
-
__name: "vue-ui-donut-evolution",
|
|
747
|
-
props: {
|
|
748
|
-
config: {
|
|
749
|
-
type: Object,
|
|
750
|
-
default() {
|
|
751
|
-
return {};
|
|
752
|
-
}
|
|
753
|
-
},
|
|
754
|
-
dataset: {
|
|
755
|
-
type: Array,
|
|
756
|
-
default() {
|
|
757
|
-
return [];
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
},
|
|
761
|
-
emits: ["selectLegend"],
|
|
762
|
-
setup(ae, { expose: Pe, emit: be }) {
|
|
763
|
-
const P = ae, { vue_ui_donut_evolution: Oe } = st(), J = $(() => !!P.dataset && P.dataset.length), C = w({
|
|
764
|
-
start: 0,
|
|
765
|
-
end: Math.max(...P.dataset.map((s) => s.values.length))
|
|
766
|
-
});
|
|
767
|
-
function $e() {
|
|
768
|
-
C.value = {
|
|
769
|
-
start: 0,
|
|
770
|
-
end: V.value
|
|
771
|
-
}, e.value += 1;
|
|
772
|
-
}
|
|
773
|
-
Re(() => {
|
|
774
|
-
Ye(P.dataset) ? ge({
|
|
775
|
-
componentName: "VueUiDonutEvolution",
|
|
776
|
-
type: "dataset"
|
|
777
|
-
}) : P.dataset.length && P.dataset.forEach((s, h) => {
|
|
778
|
-
qe({
|
|
779
|
-
datasetObject: s,
|
|
780
|
-
requiredAttributes: ["name", "values"]
|
|
781
|
-
}).forEach((a) => {
|
|
782
|
-
ge({
|
|
783
|
-
componentName: "VueUiDonutEvolution",
|
|
784
|
-
type: "datasetSerieAttribute",
|
|
785
|
-
property: a,
|
|
786
|
-
index: h
|
|
787
|
-
});
|
|
788
|
-
});
|
|
789
|
-
});
|
|
790
|
-
});
|
|
791
|
-
const Q = w(Me()), O = w([]), k = w(null), pe = w(null), M = w(!1), W = w(null), U = w(null), me = w(0), e = w(0), t = $(() => {
|
|
792
|
-
const s = Te({
|
|
793
|
-
userConfig: P.config,
|
|
794
|
-
defaultConfig: Oe
|
|
795
|
-
});
|
|
796
|
-
return s.theme ? {
|
|
797
|
-
...Te({
|
|
798
|
-
userConfig: lt.vue_ui_donut_evolution[s.theme] || P.config,
|
|
799
|
-
defaultConfig: s
|
|
800
|
-
}),
|
|
801
|
-
customPalette: Ke[s.theme] || K
|
|
802
|
-
} : s;
|
|
803
|
-
}), { isPrinting: Ie, isImaging: Ce, generatePdf: xe, generateImage: ke } = nt({
|
|
804
|
-
elementId: Q.value,
|
|
805
|
-
fileName: t.value.style.chart.title.text || "vue-ui-donut-evolution"
|
|
806
|
-
}), I = $(() => Je(t.value.customPalette)), m = w({
|
|
807
|
-
showTable: t.value.table.show
|
|
808
|
-
}), i = $(() => ({
|
|
809
|
-
top: t.value.style.chart.layout.padding.top,
|
|
810
|
-
right: t.value.style.chart.layout.padding.right,
|
|
811
|
-
bottom: t.value.style.chart.layout.padding.bottom,
|
|
812
|
-
left: t.value.style.chart.layout.padding.left
|
|
813
|
-
})), d = $(() => {
|
|
814
|
-
const s = t.value.style.chart.layout.height, h = t.value.style.chart.layout.width, a = s - i.value.top - i.value.bottom, y = h - i.value.left - i.value.right;
|
|
815
|
-
return {
|
|
816
|
-
absoluteHeight: s,
|
|
817
|
-
absoluteWidth: h,
|
|
818
|
-
centerX: i.value.left + y / 2,
|
|
819
|
-
centerY: i.value.top + a / 2,
|
|
820
|
-
height: a,
|
|
821
|
-
width: y
|
|
822
|
-
};
|
|
823
|
-
}), z = $(() => (P.dataset.forEach((s, h) => {
|
|
824
|
-
[null, void 0].includes(s.name) && ge({
|
|
825
|
-
componentName: "VueUiDonutEvolution",
|
|
826
|
-
type: "datasetSerieAttribute",
|
|
827
|
-
property: "name",
|
|
828
|
-
index: h
|
|
829
|
-
}), [null, void 0].includes(s.values) && ge({
|
|
830
|
-
componentName: "VueUiDonutEvolution",
|
|
831
|
-
type: "datasetSerieAttribute",
|
|
832
|
-
property: "values",
|
|
833
|
-
index: h
|
|
834
|
-
});
|
|
835
|
-
}), P.dataset.map((s, h) => ({
|
|
836
|
-
...s,
|
|
837
|
-
values: s.values || [],
|
|
838
|
-
color: re(s.color) || I.value[h] || K[h] || K[h % K.length],
|
|
839
|
-
length: (s.values || []).length,
|
|
840
|
-
uid: Me()
|
|
841
|
-
})))), oe = $(() => z.value.filter((s) => !O.value.includes(s.uid)).map((s) => ({
|
|
842
|
-
...s,
|
|
843
|
-
values: s.values.filter((h, a) => a >= C.value.start && a <= C.value.end)
|
|
844
|
-
}))), V = $(() => Math.max(...oe.value.map((s) => s.length))), E = $(() => d.value.width / (C.value.end - C.value.start)), D = $(() => {
|
|
845
|
-
const s = [];
|
|
846
|
-
for (let v = 0; v < C.value.end - C.value.start; v += 1) {
|
|
847
|
-
const l = oe.value.map((_) => _.values[v] ?? null), r = l.filter((_) => [void 0, null].includes(_)).length === l.length, o = l.reduce((_, L) => _ + L, 0), f = l.map((_) => _ / o), g = i.value.left + E.value * v + E.value / 2;
|
|
848
|
-
s.push({
|
|
849
|
-
index: v,
|
|
850
|
-
percentages: f,
|
|
851
|
-
subtotal: r || o < 0 ? null : o,
|
|
852
|
-
values: l,
|
|
853
|
-
x: g
|
|
854
|
-
});
|
|
855
|
-
}
|
|
856
|
-
const h = 0, a = Math.max(...s.map((v) => v.subtotal)), y = s.length === 1 ? a * 2 : a;
|
|
857
|
-
return s.map((v, l) => {
|
|
858
|
-
const r = E.value / 2 * 0.7, o = r > d.value.width / 16 ? d.value.width / 16 : r, f = k.value === v.index ? d.value.width / 16 : o, g = s.length > 4 ? r * 2 : r * 2 > E.value / 2 * 0.7 ? E.value / 2 * 0.7 : r * 2, _ = d.value.absoluteHeight - i.value.bottom - d.value.height * v.subtotal / He(h, y, t.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;
|
|
859
|
-
return {
|
|
860
|
-
...v,
|
|
861
|
-
y: _,
|
|
862
|
-
radius: o,
|
|
863
|
-
activeRadius: f,
|
|
864
|
-
hoverRadius: g,
|
|
865
|
-
donut: ze({
|
|
866
|
-
series: oe.value.map((L, he) => ({
|
|
867
|
-
color: L.color,
|
|
868
|
-
name: L.name,
|
|
869
|
-
value: L.values[l] ?? 0
|
|
870
|
-
}))
|
|
871
|
-
}, v.x, _, o, o, 1.99999, 2, 1, 360, 105.25, o / 2),
|
|
872
|
-
donutHover: ze({
|
|
873
|
-
series: oe.value.map((L, he) => ({
|
|
874
|
-
color: L.color,
|
|
875
|
-
name: L.name,
|
|
876
|
-
value: L.values[l] ?? 0
|
|
877
|
-
}))
|
|
878
|
-
}, v.x, _, g, g, 1.99999, 2, 1, 360, 105.25, g / 2),
|
|
879
|
-
donutFocus: ze({
|
|
880
|
-
series: oe.value.map((L, he) => ({
|
|
881
|
-
color: L.color,
|
|
882
|
-
name: L.name,
|
|
883
|
-
value: L.values[l] ?? 0
|
|
884
|
-
}))
|
|
885
|
-
}, d.value.centerX, d.value.centerY, d.value.height / 3.6, d.value.height / 3.6, 1.99999, 2, 1, 360, 105.25, d.value.height / 6)
|
|
886
|
-
};
|
|
887
|
-
});
|
|
888
|
-
});
|
|
889
|
-
function X(s) {
|
|
890
|
-
return `${t.value.style.chart.layout.dataLabels.prefix}${isNaN(s) ? "-" : Number(s.toFixed(t.value.style.chart.layout.dataLabels.rounding)).toLocaleString()}${t.value.style.chart.layout.dataLabels.suffix}`;
|
|
891
|
-
}
|
|
892
|
-
const ie = $(() => ({
|
|
893
|
-
max: Math.max(...D.value.map((s) => s.subtotal)),
|
|
894
|
-
min: 0
|
|
895
|
-
})), B = $(() => {
|
|
896
|
-
const s = D.value.length === 1 ? ie.value.max * 2 : ie.value.max;
|
|
897
|
-
return He(ie.value.min, s, t.value.style.chart.layout.grid.yAxis.dataLabels.steps);
|
|
898
|
-
});
|
|
899
|
-
function Le(s) {
|
|
900
|
-
return s / B.value.max;
|
|
901
|
-
}
|
|
902
|
-
const De = $(() => B.value.ticks.map((s) => ({
|
|
903
|
-
y: d.value.absoluteHeight - i.value.bottom - d.value.height * Le(s),
|
|
904
|
-
value: s
|
|
905
|
-
})));
|
|
906
|
-
function Y(s, h) {
|
|
907
|
-
return isNaN(s.value / Be(h, "value")) ? 0 : (s.value / Be(h, "value") * 100).toFixed(0) + "%";
|
|
908
|
-
}
|
|
909
|
-
function Z() {
|
|
910
|
-
M.value || (k.value = null, pe.value = null);
|
|
911
|
-
}
|
|
912
|
-
function te(s) {
|
|
913
|
-
M.value || (k.value = s.index, pe.value = s);
|
|
914
|
-
}
|
|
915
|
-
const ve = w(null);
|
|
916
|
-
function ce(s, h) {
|
|
917
|
-
s.subtotal && (pe.value = null, k.value = null, M.value = !0, W.value = s, [null, void 0].includes(h) || (ve.value = h));
|
|
918
|
-
}
|
|
919
|
-
function j() {
|
|
920
|
-
W.value = null, M.value = !1, ve.value = null;
|
|
921
|
-
}
|
|
922
|
-
const Se = $(() => z.value.map((s, h) => ({
|
|
923
|
-
name: s.name,
|
|
924
|
-
value: s.values.reduce((a, y) => a + y, 0),
|
|
925
|
-
shape: "circle",
|
|
926
|
-
uid: s.uid,
|
|
927
|
-
color: s.color
|
|
928
|
-
})).sort((s, h) => h.value - s.value).map((s) => ({
|
|
929
|
-
...s,
|
|
930
|
-
opacity: O.value.includes(s.uid) ? 0.5 : 1,
|
|
931
|
-
segregate: () => ue(s.uid),
|
|
932
|
-
isSegregated: O.value.includes(s.uid)
|
|
933
|
-
}))), de = $(() => D.value.map((s) => s.subtotal).reduce((s, h) => s + h, 0)), Ve = $(() => ({
|
|
934
|
-
cy: "donut-div-legend",
|
|
935
|
-
backgroundColor: t.value.style.chart.legend.backgroundColor,
|
|
936
|
-
color: t.value.style.chart.legend.color,
|
|
937
|
-
fontSize: t.value.style.chart.legend.fontSize,
|
|
938
|
-
paddingBottom: 12,
|
|
939
|
-
fontWeight: t.value.style.chart.legend.bold ? "bold" : ""
|
|
940
|
-
}));
|
|
941
|
-
function ue(s) {
|
|
942
|
-
if (O.value.includes(s))
|
|
943
|
-
O.value = O.value.filter((h) => h !== s), be("selectLegend", null);
|
|
944
|
-
else {
|
|
945
|
-
if (O.value.length === z.value.length - 1) return;
|
|
946
|
-
O.value.push(s), be("selectLegend", z.value.find((h) => h.uid === s));
|
|
947
|
-
}
|
|
948
|
-
W.value && ce(D.value.find((h, a) => a === ve.value));
|
|
949
|
-
}
|
|
950
|
-
const G = $(() => {
|
|
951
|
-
const s = [""].concat(z.value.filter((v) => !O.value.includes(v.uid)).map((v) => ({
|
|
952
|
-
name: v.name,
|
|
953
|
-
color: v.color
|
|
954
|
-
}))).concat(["Σ"]);
|
|
955
|
-
let h = [];
|
|
956
|
-
for (let v = 0; v < V.value; v += 1) {
|
|
957
|
-
const l = z.value.filter((r) => !O.value.includes(r.uid)).map((r) => r.values[v] ?? 0).reduce((r, o) => r + o, 0);
|
|
958
|
-
h.push([t.value.style.chart.layout.grid.xAxis.dataLabels.values[v] ?? "-"].concat(z.value.filter((r) => !O.value.includes(r.uid)).map((r) => ({
|
|
959
|
-
value: r.values[v] ?? 0,
|
|
960
|
-
percentage: r.values[v] ? r.values[v] / l * 100 : 0
|
|
961
|
-
}))).concat([`${t.value.style.chart.layout.dataLabels.prefix}${Number(l.toFixed(t.value.table.td.roundingValue))}${t.value.style.chart.layout.dataLabels.suffix}`]));
|
|
962
|
-
}
|
|
963
|
-
const a = {
|
|
964
|
-
th: {
|
|
965
|
-
backgroundColor: t.value.table.th.backgroundColor,
|
|
966
|
-
color: t.value.table.th.color,
|
|
967
|
-
outline: t.value.table.th.outline
|
|
968
|
-
},
|
|
969
|
-
td: {
|
|
970
|
-
backgroundColor: t.value.table.td.backgroundColor,
|
|
971
|
-
color: t.value.table.td.color,
|
|
972
|
-
outline: t.value.table.td.outline
|
|
973
|
-
},
|
|
974
|
-
breakpoint: t.value.table.responsiveBreakpoint
|
|
975
|
-
}, y = [
|
|
976
|
-
t.value.table.columnNames.period
|
|
977
|
-
].concat(z.value.filter((v) => !O.value.includes(v.uid)).map((v) => v.name)).concat(t.value.table.columnNames.total);
|
|
978
|
-
return { head: s, body: h, config: a, colNames: y };
|
|
979
|
-
});
|
|
980
|
-
function Fe() {
|
|
981
|
-
return z.value;
|
|
982
|
-
}
|
|
983
|
-
function se() {
|
|
984
|
-
je(() => {
|
|
985
|
-
const s = [[t.value.style.chart.title.text], [t.value.style.chart.title.subtitle.text], [""]], h = [...G.value.head.map((l) => l.name ?? l)], a = [...G.value.body.map((l) => l.map((r) => r.value ?? r))], y = s.concat([h]).concat(a), v = et(y);
|
|
986
|
-
tt({ csvContent: v, title: t.value.style.chart.title.text || "vue-ui-donut-evolution" });
|
|
987
|
-
});
|
|
988
|
-
}
|
|
989
|
-
const q = w(!1);
|
|
990
|
-
function Ee(s) {
|
|
991
|
-
q.value = s, me.value += 1;
|
|
992
|
-
}
|
|
993
|
-
function _e() {
|
|
994
|
-
m.value.showTable = !m.value.showTable;
|
|
995
|
-
}
|
|
996
|
-
return Pe({
|
|
997
|
-
getData: Fe,
|
|
998
|
-
generatePdf: xe,
|
|
999
|
-
generateCsv: se,
|
|
1000
|
-
generateImage: ke,
|
|
1001
|
-
toggleTable: _e
|
|
1002
|
-
}), (s, h) => (u(), n("div", {
|
|
1003
|
-
ref_key: "donutEvolutionChart",
|
|
1004
|
-
ref: U,
|
|
1005
|
-
class: R(`vue-ui-donut-evolution ${q.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${t.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1006
|
-
style: H(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text ? "" : "padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),
|
|
1007
|
-
id: Q.value
|
|
1008
|
-
}, [
|
|
1009
|
-
t.value.style.chart.title.text ? (u(), n("div", {
|
|
1010
|
-
key: 0,
|
|
1011
|
-
style: H(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`),
|
|
1012
|
-
onMouseleave: Z
|
|
1013
|
-
}, [
|
|
1014
|
-
we(at, {
|
|
1015
|
-
config: {
|
|
1016
|
-
title: {
|
|
1017
|
-
cy: "donut-evolution-div-title",
|
|
1018
|
-
...t.value.style.chart.title
|
|
1019
|
-
},
|
|
1020
|
-
subtitle: {
|
|
1021
|
-
cy: "donut-evolution-div-subtitle",
|
|
1022
|
-
...t.value.style.chart.title.subtitle
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
}, null, 8, ["config"])
|
|
1026
|
-
], 36)) : p("", !0),
|
|
1027
|
-
t.value.userOptions.show && J.value ? (u(), ee(ot, {
|
|
1028
|
-
ref: "details",
|
|
1029
|
-
key: `user_options_${me.value}`,
|
|
1030
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
1031
|
-
color: t.value.style.chart.color,
|
|
1032
|
-
isPrinting: c(Ie),
|
|
1033
|
-
isImaging: c(Ce),
|
|
1034
|
-
uid: Q.value,
|
|
1035
|
-
hasPdf: t.value.userOptions.buttons.pdf,
|
|
1036
|
-
hasImg: t.value.userOptions.buttons.img,
|
|
1037
|
-
hasXls: t.value.userOptions.buttons.csv,
|
|
1038
|
-
hasTable: t.value.userOptions.buttons.table,
|
|
1039
|
-
hasFullscreen: t.value.userOptions.buttons.fullscreen,
|
|
1040
|
-
isFullscreen: q.value,
|
|
1041
|
-
titles: { ...t.value.userOptions.buttonTitles },
|
|
1042
|
-
chartElement: U.value,
|
|
1043
|
-
onToggleFullscreen: Ee,
|
|
1044
|
-
onGeneratePdf: c(xe),
|
|
1045
|
-
onGenerateCsv: se,
|
|
1046
|
-
onGenerateImage: c(ke),
|
|
1047
|
-
onToggleTable: _e
|
|
1048
|
-
}, Ue({ _: 2 }, [
|
|
1049
|
-
s.$slots.optionPdf ? {
|
|
1050
|
-
name: "optionPdf",
|
|
1051
|
-
fn: F(() => [
|
|
1052
|
-
N(s.$slots, "optionPdf", {}, void 0, !0)
|
|
1053
|
-
]),
|
|
1054
|
-
key: "0"
|
|
1055
|
-
} : void 0,
|
|
1056
|
-
s.$slots.optionCsv ? {
|
|
1057
|
-
name: "optionCsv",
|
|
1058
|
-
fn: F(() => [
|
|
1059
|
-
N(s.$slots, "optionCsv", {}, void 0, !0)
|
|
1060
|
-
]),
|
|
1061
|
-
key: "1"
|
|
1062
|
-
} : void 0,
|
|
1063
|
-
s.$slots.optionImg ? {
|
|
1064
|
-
name: "optionImg",
|
|
1065
|
-
fn: F(() => [
|
|
1066
|
-
N(s.$slots, "optionImg", {}, void 0, !0)
|
|
1067
|
-
]),
|
|
1068
|
-
key: "2"
|
|
1069
|
-
} : void 0,
|
|
1070
|
-
s.$slots.optionTable ? {
|
|
1071
|
-
name: "optionTable",
|
|
1072
|
-
fn: F(() => [
|
|
1073
|
-
N(s.$slots, "optionTable", {}, void 0, !0)
|
|
1074
|
-
]),
|
|
1075
|
-
key: "3"
|
|
1076
|
-
} : void 0,
|
|
1077
|
-
s.$slots.optionFullscreen ? {
|
|
1078
|
-
name: "optionFullscreen",
|
|
1079
|
-
fn: F(({ toggleFullscreen: a, isFullscreen: y }) => [
|
|
1080
|
-
N(s.$slots, "optionFullscreen", ye(fe({ toggleFullscreen: a, isFullscreen: y })), void 0, !0)
|
|
1081
|
-
]),
|
|
1082
|
-
key: "4"
|
|
1083
|
-
} : void 0
|
|
1084
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : p("", !0),
|
|
1085
|
-
J.value ? (u(), n("svg", {
|
|
1086
|
-
key: 2,
|
|
1087
|
-
xmlns: c(Qe),
|
|
1088
|
-
class: R({ "vue-data-ui-fullscreen--on": q.value, "vue-data-ui-fulscreen--off": !q.value }),
|
|
1089
|
-
viewBox: `0 0 ${d.value.absoluteWidth} ${d.value.absoluteHeight}`,
|
|
1090
|
-
style: H(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)
|
|
1091
|
-
}, [
|
|
1092
|
-
b("defs", null, [
|
|
1093
|
-
b("linearGradient", {
|
|
1094
|
-
id: `hover_${Q.value}`,
|
|
1095
|
-
x1: "0%",
|
|
1096
|
-
y1: "0%",
|
|
1097
|
-
x2: "0%",
|
|
1098
|
-
y2: "100%"
|
|
1099
|
-
}, [
|
|
1100
|
-
b("stop", {
|
|
1101
|
-
offset: "0%",
|
|
1102
|
-
"stop-color": `${t.value.style.chart.backgroundColor}${c(Ne)[t.value.style.chart.layout.highlighter.opacity]}`
|
|
1103
|
-
}, null, 8, rl),
|
|
1104
|
-
b("stop", {
|
|
1105
|
-
offset: "100%",
|
|
1106
|
-
"stop-color": `${t.value.style.chart.layout.highlighter.color}${c(Ne)[t.value.style.chart.layout.highlighter.opacity]}`
|
|
1107
|
-
}, null, 8, il)
|
|
1108
|
-
], 8, nl),
|
|
1109
|
-
b("radialGradient", {
|
|
1110
|
-
id: `focus_${Q.value}`
|
|
1111
|
-
}, [
|
|
1112
|
-
b("stop", {
|
|
1113
|
-
offset: "0%",
|
|
1114
|
-
"stop-color": `${c(re)(t.value.style.chart.backgroundColor)}00`
|
|
1115
|
-
}, null, 8, cl),
|
|
1116
|
-
b("stop", {
|
|
1117
|
-
offset: "77%",
|
|
1118
|
-
"stop-color": "#FFFFFF" + c(Ne)[30]
|
|
1119
|
-
}, null, 8, dl),
|
|
1120
|
-
b("stop", {
|
|
1121
|
-
offset: "100%",
|
|
1122
|
-
"stop-color": `${c(re)(t.value.style.chart.backgroundColor)}00`
|
|
1123
|
-
}, null, 8, hl)
|
|
1124
|
-
], 8, vl)
|
|
1125
|
-
]),
|
|
1126
|
-
t.value.style.chart.layout.grid.show ? (u(), n("g", yl, [
|
|
1127
|
-
b("line", {
|
|
1128
|
-
x1: i.value.left,
|
|
1129
|
-
x2: i.value.left,
|
|
1130
|
-
y1: i.value.top,
|
|
1131
|
-
y2: i.value.top + d.value.height,
|
|
1132
|
-
stroke: t.value.style.chart.layout.grid.stroke,
|
|
1133
|
-
"stroke-width": t.value.style.chart.layout.grid.strokeWidth,
|
|
1134
|
-
"stroke-linecap": "round"
|
|
1135
|
-
}, null, 8, fl),
|
|
1136
|
-
b("line", {
|
|
1137
|
-
x1: i.value.left,
|
|
1138
|
-
x2: d.value.absoluteWidth - i.value.right,
|
|
1139
|
-
y1: d.value.absoluteHeight - i.value.bottom,
|
|
1140
|
-
y2: d.value.absoluteHeight - i.value.bottom,
|
|
1141
|
-
stroke: t.value.style.chart.layout.grid.stroke,
|
|
1142
|
-
"stroke-width": t.value.style.chart.layout.grid.strokeWidth,
|
|
1143
|
-
"stroke-linecap": "round"
|
|
1144
|
-
}, null, 8, gl),
|
|
1145
|
-
t.value.style.chart.layout.grid.showVerticalLines ? (u(), n("g", bl, [
|
|
1146
|
-
(u(!0), n(A, null, T(C.value.end - C.value.start, (a, y) => (u(), n("line", {
|
|
1147
|
-
x1: i.value.left + (y + 1) * E.value,
|
|
1148
|
-
x2: i.value.left + (y + 1) * E.value,
|
|
1149
|
-
y1: i.value.top,
|
|
1150
|
-
y2: d.value.absoluteHeight - i.value.bottom,
|
|
1151
|
-
stroke: t.value.style.chart.layout.grid.stroke,
|
|
1152
|
-
"stroke-width": t.value.style.chart.layout.grid.strokeWidth,
|
|
1153
|
-
"stroke-linecap": "round"
|
|
1154
|
-
}, null, 8, pl))), 256))
|
|
1155
|
-
])) : p("", !0)
|
|
1156
|
-
])) : p("", !0),
|
|
1157
|
-
t.value.style.chart.layout.grid.yAxis.dataLabels.show ? (u(), n("g", {
|
|
1158
|
-
key: 1,
|
|
1159
|
-
class: R({ "donut-opacity": !0, "donut-behind": k.value !== null || M.value })
|
|
1160
|
-
}, [
|
|
1161
|
-
(u(!0), n(A, null, T(De.value, (a, y) => (u(), n("g", null, [
|
|
1162
|
-
a.value >= B.value.min && a.value <= B.value.max ? (u(), n("line", {
|
|
1163
|
-
key: 0,
|
|
1164
|
-
x1: i.value.left,
|
|
1165
|
-
x2: i.value.left - 5,
|
|
1166
|
-
y1: a.y,
|
|
1167
|
-
y2: a.y,
|
|
1168
|
-
stroke: t.value.style.chart.layout.grid.stroke,
|
|
1169
|
-
"stroke-width": t.value.style.chart.layout.grid.strokeWidth
|
|
1170
|
-
}, null, 8, ml)) : p("", !0),
|
|
1171
|
-
a.value >= B.value.min && a.value <= B.value.max ? (u(), n("text", {
|
|
1172
|
-
key: 1,
|
|
1173
|
-
x: i.value.left - 8 + t.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,
|
|
1174
|
-
y: a.y + t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize / 3,
|
|
1175
|
-
"font-size": t.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,
|
|
1176
|
-
"text-anchor": "end",
|
|
1177
|
-
fill: t.value.style.chart.layout.grid.yAxis.dataLabels.color,
|
|
1178
|
-
"font-weight": t.value.style.chart.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
|
|
1179
|
-
}, x(t.value.style.chart.layout.dataLabels.prefix) + " " + x(c(gt)(a.value) ? a.value.toFixed(t.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue) : "") + " " + x(t.value.style.chart.layout.dataLabels.suffix), 9, xl)) : p("", !0)
|
|
1180
|
-
]))), 256))
|
|
1181
|
-
], 2)) : p("", !0),
|
|
1182
|
-
t.value.style.chart.layout.grid.xAxis.dataLabels.show ? (u(), n("g", {
|
|
1183
|
-
key: 2,
|
|
1184
|
-
class: R({ "donut-opacity": !0, "donut-behind": M.value })
|
|
1185
|
-
}, [
|
|
1186
|
-
(u(!0), n(A, null, T(C.value.end - C.value.start, (a, y) => (u(), n("g", null, [
|
|
1187
|
-
t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast && (y === 0 || y === V.value - 1) || !t.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast ? (u(), n("text", {
|
|
1188
|
-
key: 0,
|
|
1189
|
-
"text-anchor": t.value.style.chart.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : t.value.style.chart.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
|
|
1190
|
-
"font-size": t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
|
|
1191
|
-
fill: t.value.style.chart.layout.grid.xAxis.dataLabels.color,
|
|
1192
|
-
transform: `translate(${i.value.left + E.value * y + E.value / 2}, ${t.value.style.chart.layout.grid.xAxis.dataLabels.offsetY + d.value.absoluteHeight - i.value.bottom + t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize * 2}), rotate(${t.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`
|
|
1193
|
-
}, x(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(y) + Number(C.value.start)] ?? ""), 9, kl)) : p("", !0)
|
|
1194
|
-
]))), 256))
|
|
1195
|
-
], 2)) : p("", !0),
|
|
1196
|
-
(u(!0), n(A, null, T(D.value, (a, y) => (u(), n("g", null, [
|
|
1197
|
-
t.value.style.chart.layout.line.show && y < D.value.length - 1 && ![a.subtotal, D.value[y + 1].subtotal].includes(null) ? (u(), n("line", {
|
|
1198
|
-
key: 0,
|
|
1199
|
-
class: R({ "donut-opacity": !0, "donut-behind": k.value !== null || M.value }),
|
|
1200
|
-
x1: a.x,
|
|
1201
|
-
y1: a.y,
|
|
1202
|
-
x2: D.value[y + 1].x,
|
|
1203
|
-
y2: D.value[y + 1].y,
|
|
1204
|
-
stroke: t.value.style.chart.layout.line.stroke,
|
|
1205
|
-
"stroke-width": t.value.style.chart.layout.line.strokeWidth,
|
|
1206
|
-
"stroke-linecap": "round",
|
|
1207
|
-
"stroke-linejoin": "round"
|
|
1208
|
-
}, null, 10, _l)) : p("", !0),
|
|
1209
|
-
a.subtotal !== null ? (u(), n("g", wl, [
|
|
1210
|
-
a.subtotal ? (u(), n("circle", {
|
|
1211
|
-
key: 0,
|
|
1212
|
-
cx: a.x,
|
|
1213
|
-
cy: a.y,
|
|
1214
|
-
r: a.activeRadius,
|
|
1215
|
-
fill: t.value.style.chart.backgroundColor
|
|
1216
|
-
}, null, 8, $l)) : p("", !0)
|
|
1217
|
-
])) : p("", !0)
|
|
1218
|
-
]))), 256)),
|
|
1219
|
-
(u(!0), n(A, null, T(D.value, (a, y) => (u(), n("g", {
|
|
1220
|
-
class: R({ "donut-opacity": !0, "donut-behind": y !== k.value && k.value !== null || M.value })
|
|
1221
|
-
}, [
|
|
1222
|
-
a.subtotal ? (u(), n("g", Cl, [
|
|
1223
|
-
k.value !== null && k.value === y ? (u(), n("g", Ll, [
|
|
1224
|
-
(u(!0), n(A, null, T(a.donutHover, (v) => (u(), n("g", null, [
|
|
1225
|
-
b("path", {
|
|
1226
|
-
d: c(Ge)(v, { x: v.center.endX, y: v.center.endY }, 12, 12, { x: a.x, y: a.y }, !0),
|
|
1227
|
-
stroke: v.color,
|
|
1228
|
-
"stroke-width": "1",
|
|
1229
|
-
"stroke-linecap": "round",
|
|
1230
|
-
"stroke-linejoin": "round",
|
|
1231
|
-
fill: "none"
|
|
1232
|
-
}, null, 8, Sl)
|
|
1233
|
-
]))), 256)),
|
|
1234
|
-
(u(!0), n(A, null, T(a.donutHover, (v, l) => (u(), n("g", null, [
|
|
1235
|
-
b("text", {
|
|
1236
|
-
"data-cy-hover-label": "",
|
|
1237
|
-
"text-anchor": c(S)(v, !0, 0).anchor,
|
|
1238
|
-
x: c(S)(v, !0, 3).x,
|
|
1239
|
-
y: c(ne)(v),
|
|
1240
|
-
fill: t.value.style.chart.layout.grid.yAxis.dataLabels.color,
|
|
1241
|
-
"font-size": 8,
|
|
1242
|
-
"font-weight": "bold"
|
|
1243
|
-
}, x(v.name) + ": " + x(Y(v, a.donut)) + " (" + x(v.value === null ? "-" : X(v.value)) + ") ", 9, Fl)
|
|
1244
|
-
]))), 256)),
|
|
1245
|
-
b("g", null, [
|
|
1246
|
-
b("circle", {
|
|
1247
|
-
cx: a.x,
|
|
1248
|
-
cy: a.y,
|
|
1249
|
-
r: a.hoverRadius,
|
|
1250
|
-
fill: t.value.style.chart.backgroundColor
|
|
1251
|
-
}, null, 8, zl)
|
|
1252
|
-
])
|
|
1253
|
-
])) : p("", !0)
|
|
1254
|
-
])) : p("", !0)
|
|
1255
|
-
], 2))), 256)),
|
|
1256
|
-
(u(!0), n(A, null, T(D.value, (a, y) => (u(), n("g", {
|
|
1257
|
-
class: R({ "donut-opacity": !0, "donut-behind": y !== k.value && k.value !== null || M.value })
|
|
1258
|
-
}, [
|
|
1259
|
-
a.subtotal !== null ? (u(), n("g", Nl, [
|
|
1260
|
-
a.subtotal === 0 ? (u(), n("circle", {
|
|
1261
|
-
key: 0,
|
|
1262
|
-
cx: a.x,
|
|
1263
|
-
cy: a.y,
|
|
1264
|
-
r: 3,
|
|
1265
|
-
fill: t.value.style.chart.color
|
|
1266
|
-
}, null, 8, Al)) : k.value !== null && k.value === y ? (u(), n("g", Tl, [
|
|
1267
|
-
(u(!0), n(A, null, T(a.donutHover, (v, l) => (u(), n("path", {
|
|
1268
|
-
d: v.arcSlice,
|
|
1269
|
-
fill: `${v.color}`,
|
|
1270
|
-
"stroke-width": 1,
|
|
1271
|
-
stroke: t.value.style.chart.backgroundColor
|
|
1272
|
-
}, null, 8, Pl))), 256))
|
|
1273
|
-
])) : (u(), n("g", Ol, [
|
|
1274
|
-
(u(!0), n(A, null, T(a.donut, (v, l) => (u(), n("path", {
|
|
1275
|
-
d: v.arcSlice,
|
|
1276
|
-
fill: `${v.color}`,
|
|
1277
|
-
"stroke-width": 0.5,
|
|
1278
|
-
stroke: t.value.style.chart.backgroundColor
|
|
1279
|
-
}, null, 8, Il))), 256))
|
|
1280
|
-
]))
|
|
1281
|
-
])) : p("", !0)
|
|
1282
|
-
], 2))), 256)),
|
|
1283
|
-
(u(!0), n(A, null, T(D.value, (a, y) => (u(), n("g", {
|
|
1284
|
-
class: R({ "donut-opacity": !0, "donut-behind": y !== k.value && k.value !== null || M.value })
|
|
1285
|
-
}, [
|
|
1286
|
-
a.subtotal !== null && t.value.style.chart.layout.dataLabels.show ? (u(), n("text", {
|
|
1287
|
-
key: 0,
|
|
1288
|
-
"text-anchor": "middle",
|
|
1289
|
-
x: a.x,
|
|
1290
|
-
y: k.value === a.index && a.subtotal ? a.y + t.value.style.chart.layout.dataLabels.fontSize / 3 : a.y - a.radius - t.value.style.chart.layout.dataLabels.fontSize + t.value.style.chart.layout.dataLabels.offsetY,
|
|
1291
|
-
"font-size": t.value.style.chart.layout.dataLabels.fontSize,
|
|
1292
|
-
"font-weight": "bold",
|
|
1293
|
-
fill: t.value.style.chart.layout.dataLabels.color
|
|
1294
|
-
}, x(X(a.subtotal)), 9, Dl)) : p("", !0)
|
|
1295
|
-
], 2))), 256)),
|
|
1296
|
-
(u(!0), n(A, null, T(D.value, (a, y) => (u(), n("rect", {
|
|
1297
|
-
x: i.value.left + y * E.value,
|
|
1298
|
-
y: d.value.absoluteHeight - i.value.bottom - 10,
|
|
1299
|
-
width: E.value,
|
|
1300
|
-
height: 10,
|
|
1301
|
-
fill: k.value === a.index ? `url(#hover_${Q.value})` : "transparent",
|
|
1302
|
-
onClick: (v) => ce(a, y),
|
|
1303
|
-
class: R({ "donut-hover": k.value === a.index && a.subtotal })
|
|
1304
|
-
}, null, 10, Vl))), 256)),
|
|
1305
|
-
(u(!0), n(A, null, T(D.value, (a, y) => (u(), n("rect", {
|
|
1306
|
-
"data-cy-trap": "",
|
|
1307
|
-
x: i.value.left + y * E.value,
|
|
1308
|
-
y: i.value.top,
|
|
1309
|
-
width: E.value,
|
|
1310
|
-
height: d.value.height,
|
|
1311
|
-
fill: "transparent",
|
|
1312
|
-
onMouseenter: (v) => te(a),
|
|
1313
|
-
onMouseleave: Z,
|
|
1314
|
-
onClick: (v) => ce(a, y),
|
|
1315
|
-
class: R({ "donut-hover": k.value === a.index && a.subtotal })
|
|
1316
|
-
}, null, 42, El))), 256)),
|
|
1317
|
-
M.value ? (u(), n("g", Ml, [
|
|
1318
|
-
b("rect", {
|
|
1319
|
-
rx: 4,
|
|
1320
|
-
x: i.value.left,
|
|
1321
|
-
y: i.value.top,
|
|
1322
|
-
width: d.value.width,
|
|
1323
|
-
height: d.value.height,
|
|
1324
|
-
fill: t.value.style.chart.backgroundColor,
|
|
1325
|
-
style: { filter: "drop-shadow(0 12px 12px rgba(0,0,0,0.3))" }
|
|
1326
|
-
}, null, 8, Gl),
|
|
1327
|
-
b("line", {
|
|
1328
|
-
"data-html2canvas-ignore": "",
|
|
1329
|
-
x1: d.value.absoluteWidth - i.value.right - 15,
|
|
1330
|
-
y1: i.value.top + 5,
|
|
1331
|
-
x2: d.value.absoluteWidth - i.value.right - 4,
|
|
1332
|
-
y2: i.value.top + 15.5,
|
|
1333
|
-
"stroke-linecap": "round",
|
|
1334
|
-
stroke: t.value.style.chart.color,
|
|
1335
|
-
"stroke-width": "1.5"
|
|
1336
|
-
}, null, 8, Wl),
|
|
1337
|
-
b("line", {
|
|
1338
|
-
"data-html2canvas-ignore": "",
|
|
1339
|
-
x1: d.value.absoluteWidth - i.value.right - 15,
|
|
1340
|
-
y2: i.value.top + 5,
|
|
1341
|
-
x2: d.value.absoluteWidth - i.value.right - 4,
|
|
1342
|
-
y1: i.value.top + 15.5,
|
|
1343
|
-
"stroke-linecap": "round",
|
|
1344
|
-
stroke: t.value.style.chart.color,
|
|
1345
|
-
"stroke-width": "1.5"
|
|
1346
|
-
}, null, 8, Hl),
|
|
1347
|
-
b("circle", {
|
|
1348
|
-
"data-cy-close": "",
|
|
1349
|
-
onClick: j,
|
|
1350
|
-
onKeypress: yt(j, ["enter"]),
|
|
1351
|
-
cx: d.value.absoluteWidth - i.value.right - d.value.width / 40,
|
|
1352
|
-
cy: i.value.top + d.value.height / 30,
|
|
1353
|
-
r: d.value.height / 12,
|
|
1354
|
-
fill: "transparent",
|
|
1355
|
-
style: { cursor: "pointer" },
|
|
1356
|
-
tabindex: "0"
|
|
1357
|
-
}, null, 40, Bl),
|
|
1358
|
-
(u(!0), n(A, null, T(W.value.donutFocus, (a) => (u(), n("g", null, [
|
|
1359
|
-
b("path", {
|
|
1360
|
-
"data-cy-zoom-donut": "",
|
|
1361
|
-
d: c(Ge)(a, { x: d.value.centerX, y: d.value.centerY }, 12, 12, !1, !1, 1),
|
|
1362
|
-
stroke: a.color,
|
|
1363
|
-
"stroke-width": "1",
|
|
1364
|
-
"stroke-linecap": "round",
|
|
1365
|
-
"stroke-linejoin": "round",
|
|
1366
|
-
fill: "none",
|
|
1367
|
-
class: "vue-ui-donut-evolution-focus"
|
|
1368
|
-
}, null, 8, Rl)
|
|
1369
|
-
]))), 256)),
|
|
1370
|
-
b("circle", {
|
|
1371
|
-
cx: i.value.left + d.value.width / 2,
|
|
1372
|
-
cy: i.value.top + d.value.height / 2,
|
|
1373
|
-
r: d.value.height / 7,
|
|
1374
|
-
fill: t.value.style.chart.backgroundColor
|
|
1375
|
-
}, null, 8, Ul),
|
|
1376
|
-
(u(!0), n(A, null, T(W.value.donutFocus, (a, y) => (u(), n("path", {
|
|
1377
|
-
d: a.arcSlice,
|
|
1378
|
-
fill: `${a.color}`,
|
|
1379
|
-
"stroke-width": 1,
|
|
1380
|
-
stroke: t.value.style.chart.backgroundColor,
|
|
1381
|
-
class: "vue-ui-donut-evolution-focus"
|
|
1382
|
-
}, null, 8, jl))), 256)),
|
|
1383
|
-
(u(!0), n(A, null, T(W.value.donutFocus, (a, y) => (u(), n("g", Xl, [
|
|
1384
|
-
b("text", {
|
|
1385
|
-
"text-anchor": c(S)(a, !0, 20).anchor,
|
|
1386
|
-
x: c(S)(a, !0, 10).x,
|
|
1387
|
-
y: c(ne)(a),
|
|
1388
|
-
fill: t.value.style.chart.layout.grid.yAxis.dataLabels.color,
|
|
1389
|
-
"font-size": 10,
|
|
1390
|
-
"font-weight": "bold"
|
|
1391
|
-
}, x(a.name) + ": " + x(Y(a, W.value.donutFocus)) + " (" + x(a.value === null ? "-" : X(a.value)) + ") ", 9, Yl)
|
|
1392
|
-
]))), 256)),
|
|
1393
|
-
b("circle", {
|
|
1394
|
-
cx: i.value.left + d.value.width / 2,
|
|
1395
|
-
cy: i.value.top + d.value.height / 2,
|
|
1396
|
-
r: d.value.height / 3.8,
|
|
1397
|
-
fill: `url(#focus_${Q.value})`
|
|
1398
|
-
}, null, 8, ql),
|
|
1399
|
-
b("circle", {
|
|
1400
|
-
cx: i.value.left + d.value.width / 2,
|
|
1401
|
-
cy: i.value.top + d.value.height / 2,
|
|
1402
|
-
r: d.value.height / 7.7,
|
|
1403
|
-
fill: t.value.style.chart.backgroundColor
|
|
1404
|
-
}, null, 8, Kl),
|
|
1405
|
-
b("text", {
|
|
1406
|
-
"text-anchor": "middle",
|
|
1407
|
-
x: i.value.left + d.value.width / 2,
|
|
1408
|
-
y: i.value.top + d.value.height / 2 + 14 / 3,
|
|
1409
|
-
"font-size": 14,
|
|
1410
|
-
"font-weight": "bold",
|
|
1411
|
-
fill: t.value.style.chart.layout.dataLabels.color,
|
|
1412
|
-
class: "vue-ui-donut-evolution-focus"
|
|
1413
|
-
}, x(X(W.value.subtotal)), 9, Jl),
|
|
1414
|
-
t.value.style.chart.layout.grid.xAxis.dataLabels.values[W.value.index] ? (u(), n("text", {
|
|
1415
|
-
key: 0,
|
|
1416
|
-
x: i.value.left + 6,
|
|
1417
|
-
y: i.value.top + t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize * 2,
|
|
1418
|
-
"font-size": t.value.style.chart.layout.grid.xAxis.dataLabels.fontSize * 1.6,
|
|
1419
|
-
fill: t.value.style.chart.layout.dataLabels.color
|
|
1420
|
-
}, x(t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(W.value.index) + Number(C.value.start)]), 9, Ql)) : p("", !0)
|
|
1421
|
-
])) : p("", !0),
|
|
1422
|
-
N(s.$slots, "svg", { svg: d.value }, void 0, !0)
|
|
1423
|
-
], 14, sl)) : p("", !0),
|
|
1424
|
-
J.value ? p("", !0) : (u(), ee(rt, {
|
|
1425
|
-
key: 3,
|
|
1426
|
-
config: {
|
|
1427
|
-
type: "donutEvolution",
|
|
1428
|
-
style: {
|
|
1429
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
1430
|
-
donutEvolution: {
|
|
1431
|
-
axis: {
|
|
1432
|
-
color: "#CCCCCC"
|
|
1433
|
-
},
|
|
1434
|
-
donuts: {
|
|
1435
|
-
color: "#CCCCCC"
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
}, null, 8, ["config"])),
|
|
1441
|
-
V.value > 1 && t.value.style.chart.zoom.show ? (u(), ee(xt, {
|
|
1442
|
-
key: `slicer_${e.value}`,
|
|
1443
|
-
background: t.value.style.chart.zoom.color,
|
|
1444
|
-
borderColor: t.value.style.chart.backgroundColor,
|
|
1445
|
-
fontSize: t.value.style.chart.zoom.fontSize,
|
|
1446
|
-
useResetSlot: t.value.style.chart.zoom.useResetSlot,
|
|
1447
|
-
labelLeft: t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(C.value.start)] || "",
|
|
1448
|
-
labelRight: t.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(C.value.end) - 1] || "",
|
|
1449
|
-
textColor: t.value.style.chart.color,
|
|
1450
|
-
inputColor: t.value.style.chart.zoom.color,
|
|
1451
|
-
selectColor: t.value.style.chart.zoom.highlightColor,
|
|
1452
|
-
max: V.value,
|
|
1453
|
-
min: 0,
|
|
1454
|
-
valueStart: C.value.start,
|
|
1455
|
-
valueEnd: C.value.end,
|
|
1456
|
-
start: C.value.start,
|
|
1457
|
-
"onUpdate:start": h[0] || (h[0] = (a) => C.value.start = a),
|
|
1458
|
-
end: C.value.end,
|
|
1459
|
-
"onUpdate:end": h[1] || (h[1] = (a) => C.value.end = a),
|
|
1460
|
-
onReset: $e
|
|
1461
|
-
}, {
|
|
1462
|
-
"reset-action": F(({ reset: a }) => [
|
|
1463
|
-
N(s.$slots, "reset-action", ye(fe({ reset: a })), void 0, !0)
|
|
1464
|
-
]),
|
|
1465
|
-
_: 3
|
|
1466
|
-
}, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end"])) : p("", !0),
|
|
1467
|
-
t.value.style.chart.legend.show ? (u(), ee(ut, {
|
|
1468
|
-
key: 5,
|
|
1469
|
-
legendSet: Se.value,
|
|
1470
|
-
config: Ve.value,
|
|
1471
|
-
onClickMarker: h[2] || (h[2] = ({ legend: a }) => ue(a.uid))
|
|
1472
|
-
}, {
|
|
1473
|
-
item: F(({ legend: a, index: y }) => [
|
|
1474
|
-
b("div", {
|
|
1475
|
-
"data-cy-legend-item": "",
|
|
1476
|
-
onClick: (v) => ue(a.uid),
|
|
1477
|
-
style: H(`opacity:${O.value.includes(a.uid) ? 0.5 : 1}`)
|
|
1478
|
-
}, [
|
|
1479
|
-
Ae(x(a.name) + ": " + x(Number(a.value.toFixed(t.value.style.chart.legend.roundingValue)).toLocaleString()) + " ", 1),
|
|
1480
|
-
O.value.includes(a.uid) ? (u(), n("span", ta, " ( - % ) ")) : (u(), n("span", ea, " (" + x(isNaN(a.value / de.value) ? "-" : (a.value / de.value * 100).toFixed(t.value.style.chart.legend.roundingPercentage)) + "%) ", 1))
|
|
1481
|
-
], 12, Zl)
|
|
1482
|
-
]),
|
|
1483
|
-
_: 1
|
|
1484
|
-
}, 8, ["legendSet", "config"])) : p("", !0),
|
|
1485
|
-
N(s.$slots, "legend", { legend: Se.value }, void 0, !0),
|
|
1486
|
-
J.value ? (u(), ee(it, {
|
|
1487
|
-
key: 6,
|
|
1488
|
-
hideDetails: "",
|
|
1489
|
-
config: {
|
|
1490
|
-
open: m.value.showTable,
|
|
1491
|
-
maxHeight: 1e4,
|
|
1492
|
-
body: {
|
|
1493
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
1494
|
-
color: t.value.style.chart.color
|
|
1495
|
-
},
|
|
1496
|
-
head: {
|
|
1497
|
-
backgroundColor: t.value.style.chart.backgroundColor,
|
|
1498
|
-
color: t.value.style.chart.color
|
|
1499
|
-
}
|
|
1500
|
-
}
|
|
1501
|
-
}, {
|
|
1502
|
-
content: F(() => [
|
|
1503
|
-
we(Ze, {
|
|
1504
|
-
colNames: G.value.colNames,
|
|
1505
|
-
head: G.value.head,
|
|
1506
|
-
body: G.value.body,
|
|
1507
|
-
config: G.value.config,
|
|
1508
|
-
title: `${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text ? ` : ${t.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1509
|
-
onClose: h[3] || (h[3] = (a) => m.value.showTable = !1)
|
|
1510
|
-
}, {
|
|
1511
|
-
th: F(({ th: a }) => [
|
|
1512
|
-
Ae(x(a.name ?? a), 1)
|
|
1513
|
-
]),
|
|
1514
|
-
td: F(({ td: a }) => [
|
|
1515
|
-
a.value === null ? (u(), n("span", la, "-")) : (u(), n("b", aa, x(isNaN(a.value) ? "" : t.value.style.chart.layout.dataLabels.prefix) + x(!isNaN(a.value) && a.value !== null ? Number(a.value.toFixed(t.value.table.td.roundingValue)).toLocaleString() : a) + x(isNaN(a.value) ? "" : t.value.style.chart.layout.dataLabels.suffix), 1)),
|
|
1516
|
-
b("span", null, x(a.percentage && !isNaN(a.percentage) ? `(${Number(a.percentage.toFixed(t.value.table.td.roundingPercentage)).toLocaleString()}%)` : ""), 1)
|
|
1517
|
-
]),
|
|
1518
|
-
_: 1
|
|
1519
|
-
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
1520
|
-
]),
|
|
1521
|
-
_: 1
|
|
1522
|
-
}, 8, ["config"])) : p("", !0)
|
|
1523
|
-
], 14, ul));
|
|
1524
|
-
}
|
|
1525
|
-
}, ua = /* @__PURE__ */ Xe(oa, [["__scopeId", "data-v-1b8abb9d"]]), ba = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1526
|
-
__proto__: null,
|
|
1527
|
-
default: ua
|
|
1528
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
1529
|
-
export {
|
|
1530
|
-
ua as a,
|
|
1531
|
-
ga as b,
|
|
1532
|
-
ba as c,
|
|
1533
|
-
ol as v
|
|
1534
|
-
};
|