vue-data-ui 3.0.0-next.7 → 3.0.0-next.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-Bl8urcli.js → Arrow-BZNpld6u.js} +1 -1
- package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-kg-eVvXZ.js} +2 -2
- package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BdOEhJar.js} +1 -1
- package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-CWvXlPxS.js} +2 -2
- package/dist/{DataTable-mQ6Wd-rR.js → DataTable-B3yakHEM.js} +2 -2
- package/dist/{Legend-B2hrDh4G.js → Legend-DiGLrlzP.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-C-ZjpJQd.js} +3 -3
- package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-6s4eI8W7.js} +1 -1
- package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-JoUN7Ink.js} +3 -3
- package/dist/{Shape-C2qH26wh.js → Shape-CWIa2nta.js} +43 -37
- package/dist/Slicer-DYuvPkEM.js +602 -0
- package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-C_fUmbP7.js} +1 -1
- package/dist/{Title-B7Xb3YuE.js → Title-VLWyIYrj.js} +1 -1
- package/dist/{Tooltip-BidRoM5E.js → Tooltip-BS5naLS2.js} +23 -19
- package/dist/{UserOptions-0tvMM8PF.js → UserOptions-BV_xM-sB.js} +2 -2
- package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-PUk0ukSG.js} +1 -1
- package/dist/{img-D72yZNUg.js → img-DD_2wgY3.js} +1 -1
- package/dist/{index-Cg-RjxqH.js → index-DKpp7RIH.js} +2236 -1505
- package/dist/{pdf-DgX01_wu.js → pdf-0TQQyXWM.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +610 -22
- package/dist/types/vue-data-ui.d.ts +610 -22
- package/dist/useAutoSizeLabelsInsideViewbox-Qhry5WvH.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-D-8c0o4p.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-BUzmyQf9.js → usePrinter-NUeckmCX.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
- package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-BIXXEsFZ.js} +105 -100
- package/dist/vue-data-ui.js +23 -22
- package/dist/vue-ui-3d-bar-CVUfj12F.js +1323 -0
- package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-Cpovz3RE.js} +3 -3
- package/dist/vue-ui-age-pyramid-CQWFaHLV.js +834 -0
- package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-C49Xw5Mh.js} +2 -2
- package/dist/vue-ui-bullet-DED2SuIa.js +571 -0
- package/dist/vue-ui-candlestick-DGgbevy6.js +999 -0
- package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DKIgSB1T.js} +29 -29
- package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-D1bEM91d.js} +5 -5
- package/dist/vue-ui-chord-CBLSqtEP.js +1038 -0
- package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-g2ts9NTG.js} +24 -24
- package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-DSxmPUD8.js} +2 -2
- package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-B6FfoNjQ.js} +62 -62
- package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-DKffQVgr.js} +2 -2
- package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-CJrWc4-g.js} +320 -308
- package/dist/vue-ui-donut-evolution-Bys6cs-D.js +1075 -0
- package/dist/vue-ui-dumbbell-Cb_I__qC.js +1119 -0
- package/dist/vue-ui-flow-BzuT3ij5.js +841 -0
- package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-Ctp7GDiN.js} +16 -16
- package/dist/vue-ui-galaxy-CRBy0aio.js +680 -0
- package/dist/vue-ui-gauge-NcQq5UFr.js +791 -0
- package/dist/vue-ui-gizmo-Cwfb8c-0.js +210 -0
- package/dist/vue-ui-heatmap-DElqpFVY.js +1078 -0
- package/dist/vue-ui-history-plot-De1Dvnhw.js +1073 -0
- package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-_bLScmgO.js} +26 -26
- package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-PsHE_2Wy.js} +2 -2
- package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-CgiahnC6.js} +53 -51
- package/dist/vue-ui-mood-radar-dXVOOrhl.js +785 -0
- package/dist/vue-ui-nested-donuts-C0X6BetT.js +1286 -0
- package/dist/vue-ui-onion-C7sxQzk_.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-jwtnNX59.js +915 -0
- package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-DguDE91h.js} +512 -459
- package/dist/vue-ui-quick-chart-BpEDS08U.js +1761 -0
- package/dist/vue-ui-radar-lFrqTRqo.js +796 -0
- package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-BHghXziv.js} +2 -2
- package/dist/vue-ui-relation-circle-C5W6NFOb.js +598 -0
- package/dist/vue-ui-ridgeline-A2DuFEDS.js +1153 -0
- package/dist/vue-ui-rings-BgJAm9_b.js +728 -0
- package/dist/vue-ui-scatter-COfpLChz.js +1178 -0
- package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-DMLCBUtZ.js} +3 -3
- package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-ZopESYc_.js} +26 -26
- package/dist/vue-ui-spark-trend-CuSQ03fQ.js +315 -0
- package/dist/vue-ui-sparkbar-BCsX9M4q.js +351 -0
- package/dist/vue-ui-sparkgauge-DdyZLA0T.js +232 -0
- package/dist/vue-ui-sparkhistogram-CUxFgIcE.js +380 -0
- package/dist/vue-ui-sparkline-DOkofsLL.js +489 -0
- package/dist/vue-ui-sparkstackbar-Bq9PZzmH.js +421 -0
- package/dist/vue-ui-stackbar-B7ceoT0V.js +1370 -0
- package/dist/vue-ui-strip-plot-DYh-NGQN.js +915 -0
- package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-BVTb1xuA.js} +5 -5
- package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-pESH5KAJ.js} +11 -11
- package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-Bw-6l9lA.js} +14 -14
- package/dist/vue-ui-thermometer-BqqfmS-B.js +541 -0
- package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-CVisMxLS.js} +5 -5
- package/dist/vue-ui-tiremarks-K1dcCdpj.js +406 -0
- package/dist/vue-ui-treemap-Bz3c68s4.js +1035 -0
- package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-BvtXpCjw.js} +71 -69
- package/dist/vue-ui-waffle-CYO7bIf1.js +910 -0
- package/dist/vue-ui-wheel-De1spwLh.js +379 -0
- package/dist/vue-ui-word-cloud-BMmVrx_T.js +765 -0
- package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-Ccpr00nJ.js} +11 -9
- package/dist/vue-ui-xy-D4jaRKe3.js +3771 -0
- package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-DE-Uu5oq.js} +265 -264
- package/package.json +1 -1
- package/dist/Slicer-BD8Z8VCW.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-C_G5E08Y.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
- package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
- package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
- package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
- package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
- package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
- package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
- package/dist/vue-ui-flow-D_L_xssL.js +0 -765
- package/dist/vue-ui-galaxy-Cn6vHbaw.js +0 -617
- package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
- package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
- package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
- package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
- package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
- package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
- package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
- package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
- package/dist/vue-ui-radar-98mXFZe-.js +0 -741
- package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
- package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
- package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
- package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
- package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
- package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
- package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
- package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
- package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
- package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
- package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
- package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
- package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
- package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
- package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
- package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
- package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
- package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
- package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
|
@@ -1,1177 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as E, computed as k, ref as h, watch as ot, onMounted as st, nextTick as ut, shallowRef as nt, onBeforeUnmount as Bt, createElementBlock as i, openBlock as n, unref as r, normalizeStyle as ne, normalizeClass as R, createBlock as U, createCommentVNode as m, createVNode as rt, createSlots as Et, withCtx as C, renderSlot as x, normalizeProps as X, guardReactiveProps as W, createElementVNode as p, Fragment as T, renderList as A, toDisplayString as S, withDirectives as it, vShow as dt, createTextVNode as Rt } from "vue";
|
|
2
|
-
import { u as Ut, c as Gt, t as Yt, p as Te, a as Xt, G as z, o as Wt, e as q, b as qt, d as Ht, m as Ae, f as O, X as Jt, s as Kt, L as Qt, k as Oe, n as H, i as K, x as ct, q as Zt, r as jt, y as el, v as Fe, T as vt } from "./index-Cg-RjxqH.js";
|
|
3
|
-
import { t as tl, u as ll } from "./useResponsive-DfdjqQps.js";
|
|
4
|
-
import { u as ht } from "./useNestedProp-C_G5E08Y.js";
|
|
5
|
-
import { u as al } from "./usePrinter-BUzmyQf9.js";
|
|
6
|
-
import { u as ol } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
|
-
import { u as sl } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
-
import ul from "./Title-B7Xb3YuE.js";
|
|
9
|
-
import nl from "./Legend-B2hrDh4G.js";
|
|
10
|
-
import rl from "./img-D72yZNUg.js";
|
|
11
|
-
import { _ as il } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
-
const dl = ["id"], cl = ["xmlns", "viewBox"], vl = ["width", "height"], hl = ["id"], fl = ["offset", "stop-color"], yl = ["offset", "stop-opacity"], pl = ["id"], bl = ["id"], gl = ["id"], ml = ["flood-color"], wl = ["d", "fill", "stroke", "stroke-width", "filter"], $l = ["d", "fill", "stroke", "stroke-width"], kl = { key: 1 }, Cl = ["d", "fill"], xl = { key: 2 }, Ll = ["x", "y", "font-size", "font-weight", "fill"], _l = { key: 3 }, Tl = ["filter"], Al = ["opacity", "text-anchor", "x", "y", "fill", "font-size", "font-weight"], Ol = ["opacity", "text-anchor", "x", "y", "fill", "font-size", "font-weight"], Fl = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Nl = ["d", "fill", "onMouseenter", "onClick"], Sl = {
|
|
13
|
-
key: 5,
|
|
14
|
-
class: "vue-data-ui-watermark"
|
|
15
|
-
}, Il = {
|
|
16
|
-
key: 0,
|
|
17
|
-
class: "vue-ui-nested-donuts-legend-title"
|
|
18
|
-
}, Vl = ["onClick"], Pl = ["innerHTML"], Dl = {
|
|
19
|
-
__name: "vue-ui-nested-donuts",
|
|
20
|
-
props: {
|
|
21
|
-
config: {
|
|
22
|
-
type: Object,
|
|
23
|
-
default() {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
dataset: {
|
|
28
|
-
type: Array,
|
|
29
|
-
default() {
|
|
30
|
-
return [];
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
emits: ["selectLegend", "selectDatapoint"],
|
|
35
|
-
setup(ft, { expose: yt, emit: pt }) {
|
|
36
|
-
const bt = E(() => import("./vue-ui-accordion-CRomxzaL.js")), gt = E(() => import("./DataTable-mQ6Wd-rR.js")), mt = E(() => import("./PackageVersion-CeEYZfaH.js")), wt = E(() => import("./PenAndPaper-DhSxfUrQ.js")), $t = E(() => import("./vue-ui-skeleton-CUOhCY4p.js")), kt = E(() => import("./Tooltip-BidRoM5E.js")), Ct = E(() => import("./UserOptions-0tvMM8PF.js")), { vue_ui_nested_donuts: xt } = Ut(), L = ft, Q = k(() => !!L.dataset && L.dataset.length), b = h(Gt()), re = h(!1), ie = h(""), de = h(null), Ne = h(0), V = h(null), Se = h(null), ce = h(null), Ie = h(null), Ve = h(null), Pe = h(0), De = h(0), ze = h(0), M = h(!0), B = h([]), J = h([]), G = h(!1);
|
|
37
|
-
function Me(l) {
|
|
38
|
-
G.value = l, Ne.value += 1;
|
|
39
|
-
}
|
|
40
|
-
const e = k({
|
|
41
|
-
get: () => Re(),
|
|
42
|
-
set: (l) => l
|
|
43
|
-
}), { userOptionsVisible: ve, setUserOptionsVisibility: Be, keepUserOptionState: Ee } = ol({ config: e.value }), { svgRef: Z } = sl({
|
|
44
|
-
config: e.value.style.chart.title
|
|
45
|
-
});
|
|
46
|
-
function Re() {
|
|
47
|
-
const l = ht({
|
|
48
|
-
userConfig: L.config,
|
|
49
|
-
defaultConfig: xt
|
|
50
|
-
});
|
|
51
|
-
return l.theme ? {
|
|
52
|
-
...ht({
|
|
53
|
-
userConfig: Xt.vue_ui_nested_donuts[l.theme] || L.config,
|
|
54
|
-
defaultConfig: l
|
|
55
|
-
}),
|
|
56
|
-
customPalette: Yt[l.theme] || Te
|
|
57
|
-
} : l;
|
|
58
|
-
}
|
|
59
|
-
ot(
|
|
60
|
-
() => L.config,
|
|
61
|
-
(l) => {
|
|
62
|
-
e.value = Re(), ve.value = !e.value.userOptions.showOnChartHover, he(), Pe.value += 1, De.value += 1, ze.value += 1, $.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, $.value.showTable = e.value.table.show, $.value.showTooltip = e.value.style.chart.tooltip.show, f.value.width = e.value.style.chart.width, f.value.height = e.value.style.chart.height;
|
|
63
|
-
},
|
|
64
|
-
{ deep: !0 }
|
|
65
|
-
);
|
|
66
|
-
const Ue = k(() => {
|
|
67
|
-
const { top: l, right: s, bottom: a, left: o } = e.value.style.chart.padding;
|
|
68
|
-
return {
|
|
69
|
-
css: `padding:${l}px ${s}px ${a}px ${o}px`,
|
|
70
|
-
top: l,
|
|
71
|
-
right: s,
|
|
72
|
-
bottom: a,
|
|
73
|
-
left: o
|
|
74
|
-
};
|
|
75
|
-
});
|
|
76
|
-
function Lt(l, s = 1e3, a = 50) {
|
|
77
|
-
return new Promise((o) => {
|
|
78
|
-
const t = l.length;
|
|
79
|
-
B.value = Array(t).fill(0), J.value = [];
|
|
80
|
-
let u = 0;
|
|
81
|
-
l.forEach((c, v) => {
|
|
82
|
-
setTimeout(() => {
|
|
83
|
-
const F = performance.now();
|
|
84
|
-
function d(y) {
|
|
85
|
-
const _ = Math.min((y - F) / s, 1), we = vt(_), $e = c * we;
|
|
86
|
-
B.value[v] = $e, B.value = [...B.value];
|
|
87
|
-
const se = [];
|
|
88
|
-
let ke = 0;
|
|
89
|
-
L.dataset.forEach((ue, Ce) => {
|
|
90
|
-
const Pt = Fe(ue.series.reduce(
|
|
91
|
-
(Le, _e) => Le + Fe(z(_e.values).reduce((zt, Mt) => zt + Mt, 0)),
|
|
92
|
-
0
|
|
93
|
-
)), Dt = Fe(B.value.slice(ke, ke + ue.series.length).reduce((Le, _e) => Le + _e, 0)), xe = Pt - Dt;
|
|
94
|
-
xe > Number.MIN_VALUE && se.push({
|
|
95
|
-
name: "__ghost__",
|
|
96
|
-
arcOf: ue.name,
|
|
97
|
-
arcOfId: `${b.value}_${Ce}`,
|
|
98
|
-
id: `ghost_${b.value}_${Ce}`,
|
|
99
|
-
seriesIndex: -1,
|
|
100
|
-
datasetIndex: Ce,
|
|
101
|
-
color: "transparent",
|
|
102
|
-
value: xe,
|
|
103
|
-
fullValue: xe,
|
|
104
|
-
absoluteValues: [],
|
|
105
|
-
ghost: !0
|
|
106
|
-
}), ke += ue.series.length;
|
|
107
|
-
}), J.value = se, _ < 1 ? requestAnimationFrame(d) : (u += 1, u === t && o());
|
|
108
|
-
}
|
|
109
|
-
requestAnimationFrame(d);
|
|
110
|
-
}, v * a);
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
st(async () => {
|
|
115
|
-
if (he(), e.value.startAnimation?.show) {
|
|
116
|
-
const s = L.dataset.flatMap((a) => a.series).map(
|
|
117
|
-
(a) => z(a.values).reduce((o, t) => o + t, 0)
|
|
118
|
-
);
|
|
119
|
-
B.value = s.map(() => 0), M.value = !0, J.value = L.dataset.map((a, o) => {
|
|
120
|
-
const t = a.series.reduce(
|
|
121
|
-
(u, c) => u + z(c.values).reduce((v, F) => v + F, 0),
|
|
122
|
-
0
|
|
123
|
-
);
|
|
124
|
-
return {
|
|
125
|
-
name: "__ghost__",
|
|
126
|
-
arcOf: a.name,
|
|
127
|
-
arcOfId: `${b.value}_${o}`,
|
|
128
|
-
id: `ghost_${b.value}_${o}`,
|
|
129
|
-
seriesIndex: -1,
|
|
130
|
-
datasetIndex: o,
|
|
131
|
-
color: "transparent",
|
|
132
|
-
value: t,
|
|
133
|
-
fullValue: t,
|
|
134
|
-
absoluteValues: [],
|
|
135
|
-
ghost: !0
|
|
136
|
-
};
|
|
137
|
-
}), await ut(), Lt(
|
|
138
|
-
s,
|
|
139
|
-
e.value.startAnimation.durationMs,
|
|
140
|
-
e.value.startAnimation.staggerMs
|
|
141
|
-
).then(() => {
|
|
142
|
-
M.value = !1, J.value = [];
|
|
143
|
-
});
|
|
144
|
-
} else
|
|
145
|
-
M.value = !1;
|
|
146
|
-
});
|
|
147
|
-
const P = nt(null), Y = nt(null);
|
|
148
|
-
st(() => {
|
|
149
|
-
he();
|
|
150
|
-
});
|
|
151
|
-
function he() {
|
|
152
|
-
if (Wt(L.dataset) && q({
|
|
153
|
-
componentName: "VueUiNestedDonuts",
|
|
154
|
-
type: "dataset"
|
|
155
|
-
}), e.value.responsive) {
|
|
156
|
-
const l = tl(() => {
|
|
157
|
-
const { width: s, height: a } = ll({
|
|
158
|
-
chart: V.value,
|
|
159
|
-
title: e.value.style.chart.title.text ? Se.value : null,
|
|
160
|
-
legend: e.value.style.chart.legend.show ? ce.value : null,
|
|
161
|
-
source: Ie.value,
|
|
162
|
-
noTitle: Ve.value,
|
|
163
|
-
padding: Ue.value
|
|
164
|
-
});
|
|
165
|
-
requestAnimationFrame(() => {
|
|
166
|
-
f.value.width = s, f.value.height = a;
|
|
167
|
-
});
|
|
168
|
-
});
|
|
169
|
-
P.value && (Y.value && P.value.unobserve(Y.value), P.value.disconnect()), P.value = new ResizeObserver(l), Y.value = V.value.parentNode, P.value.observe(Y.value);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
Bt(() => {
|
|
173
|
-
P.value && (Y.value && P.value.unobserve(Y.value), P.value.disconnect());
|
|
174
|
-
});
|
|
175
|
-
const { isPrinting: Ge, isImaging: Ye, generatePdf: Xe, generateImage: We } = al({
|
|
176
|
-
elementId: `nested_donuts_${b.value}`,
|
|
177
|
-
fileName: e.value.style.chart.title.text || "vue-ui-nested-donuts",
|
|
178
|
-
options: e.value.userOptions.print
|
|
179
|
-
}), _t = k(() => e.value.userOptions.show && !e.value.style.chart.title.text), Tt = k(() => qt(e.value.customPalette)), $ = h({
|
|
180
|
-
dataLabels: {
|
|
181
|
-
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
182
|
-
},
|
|
183
|
-
showTable: e.value.table.show,
|
|
184
|
-
showTooltip: e.value.style.chart.tooltip.show
|
|
185
|
-
}), f = h({
|
|
186
|
-
width: e.value.style.chart.width,
|
|
187
|
-
height: e.value.style.chart.height
|
|
188
|
-
}), qe = pt;
|
|
189
|
-
function At({ datapoint: l, index: s }) {
|
|
190
|
-
qe("selectDatapoint", { datapoint: l, index: s });
|
|
191
|
-
}
|
|
192
|
-
function He({
|
|
193
|
-
from: l,
|
|
194
|
-
to: s,
|
|
195
|
-
duration: a,
|
|
196
|
-
onUpdate: o,
|
|
197
|
-
onDone: t,
|
|
198
|
-
easing: u = vt
|
|
199
|
-
}) {
|
|
200
|
-
const c = performance.now();
|
|
201
|
-
function v(F) {
|
|
202
|
-
const d = Math.min((F - c) / a, 1), y = u(d), _ = l + (s - l) * y;
|
|
203
|
-
o(_, d), d < 1 ? requestAnimationFrame(v) : (o(s, 1), t && t());
|
|
204
|
-
}
|
|
205
|
-
requestAnimationFrame(v);
|
|
206
|
-
}
|
|
207
|
-
const w = h([]), N = k(() => {
|
|
208
|
-
L.dataset.forEach((s, a) => {
|
|
209
|
-
[null, void 0].includes(s.name) && q({
|
|
210
|
-
componentName: "VueUiNestedDonuts",
|
|
211
|
-
type: "datasetSerieAttribute",
|
|
212
|
-
property: "name",
|
|
213
|
-
index: a
|
|
214
|
-
}), [null, void 0].includes(s.series) ? q({
|
|
215
|
-
componentName: "VueUiNestedDonuts",
|
|
216
|
-
type: "datasetSerieAttribute",
|
|
217
|
-
property: "series",
|
|
218
|
-
index: a
|
|
219
|
-
}) : s.series.length === 0 ? q({
|
|
220
|
-
componentName: "VueUiNestedDonuts",
|
|
221
|
-
type: "datasetAttributeEmpty",
|
|
222
|
-
property: `series at index ${a}`
|
|
223
|
-
}) : s.series.forEach((o, t) => {
|
|
224
|
-
[null, void 0].includes(o.name) && q({
|
|
225
|
-
componentName: "VueUiNestedDonuts",
|
|
226
|
-
type: "datasetSerieAttribute",
|
|
227
|
-
property: "name",
|
|
228
|
-
index: t,
|
|
229
|
-
key: "serie"
|
|
230
|
-
}), [null, void 0].includes(o.values) && q({
|
|
231
|
-
componentName: "VueUiNestedDonuts",
|
|
232
|
-
type: "datasetSerieAttribute",
|
|
233
|
-
property: "values",
|
|
234
|
-
index: t,
|
|
235
|
-
key: "serie"
|
|
236
|
-
});
|
|
237
|
-
});
|
|
238
|
-
});
|
|
239
|
-
let l = 0;
|
|
240
|
-
return L.dataset.map((s, a) => ({
|
|
241
|
-
...s,
|
|
242
|
-
total: s.series.filter((o) => !w.value.includes(o.id)).map((o) => z(o.values).reduce((t, u) => t + u, 0)).reduce((o, t) => o + t, 0),
|
|
243
|
-
datasetIndex: a,
|
|
244
|
-
id: `${b.value}_${a}`,
|
|
245
|
-
series: s.series.map((o, t) => {
|
|
246
|
-
const u = z(o.values).reduce((c, v) => c + v, 0);
|
|
247
|
-
return {
|
|
248
|
-
name: o.name,
|
|
249
|
-
arcOf: s.name,
|
|
250
|
-
arcOfId: `${b.value}_${a}`,
|
|
251
|
-
id: `${b.value}_${a}_${t}`,
|
|
252
|
-
seriesIndex: t,
|
|
253
|
-
datasetIndex: a,
|
|
254
|
-
color: Ht(o.color) || Tt.value[t] || Te[t % Te.length],
|
|
255
|
-
value: M.value ? B.value[l++] ?? 0 : u,
|
|
256
|
-
absoluteValues: o.values || []
|
|
257
|
-
};
|
|
258
|
-
})
|
|
259
|
-
}));
|
|
260
|
-
}), I = k(() => Math.min(f.value.height, f.value.width) * (e.value.style.chart.layout.donut.strokeWidth / 512)), Je = k(() => [...N.value].map((l, s) => {
|
|
261
|
-
const a = l.series.filter((o) => !w.value.includes(o.id)).map((o) => o.value).reduce((o, t) => o + t, 0);
|
|
262
|
-
return {
|
|
263
|
-
...l,
|
|
264
|
-
total: a,
|
|
265
|
-
series: l.series.filter((o) => !w.value.includes(o.id)).map((o) => ({
|
|
266
|
-
...o,
|
|
267
|
-
proportion: o.value / a
|
|
268
|
-
}))
|
|
269
|
-
};
|
|
270
|
-
}));
|
|
271
|
-
function Ot(l, s, a) {
|
|
272
|
-
let o = 0;
|
|
273
|
-
for (let t = 0; t < l.length; t += 1)
|
|
274
|
-
a.includes(l[t]) && (o += 1);
|
|
275
|
-
return o < s;
|
|
276
|
-
}
|
|
277
|
-
const g = h(Je.value);
|
|
278
|
-
ot(
|
|
279
|
-
() => Je.value,
|
|
280
|
-
(l) => g.value = l
|
|
281
|
-
);
|
|
282
|
-
function fe(l) {
|
|
283
|
-
qe("selectLegend", l);
|
|
284
|
-
const s = L.dataset.flatMap(
|
|
285
|
-
(d, y) => d.series.map((_, we) => ({
|
|
286
|
-
value: z(_.values).reduce(($e, se) => $e + se, 0),
|
|
287
|
-
id: `${b.value}_${y}_${we}`,
|
|
288
|
-
arcOfId: `${b.value}_${y}`
|
|
289
|
-
}))
|
|
290
|
-
).find((d) => d.id === l.id);
|
|
291
|
-
if (!s) return;
|
|
292
|
-
const a = N.value.flatMap((d) => d.series).find((d) => d.id === l.id)?.value ?? 0, o = g.value.flatMap((d) => d.series).find((d) => d.id === l.id);
|
|
293
|
-
let u = o ? o.value : 0;
|
|
294
|
-
const c = N.value.find(
|
|
295
|
-
(d) => d.id === s.arcOfId
|
|
296
|
-
);
|
|
297
|
-
if (!c) return;
|
|
298
|
-
const v = c.series.map((d) => d.id), F = Ot(
|
|
299
|
-
v,
|
|
300
|
-
v.length - 1,
|
|
301
|
-
w.value
|
|
302
|
-
);
|
|
303
|
-
w.value.includes(l.id) ? (w.value = w.value.filter((d) => d !== l.id), e.value.serieToggleAnimation.show ? He({
|
|
304
|
-
from: u,
|
|
305
|
-
to: a,
|
|
306
|
-
duration: e.value.serieToggleAnimation.durationMs,
|
|
307
|
-
onUpdate: (d) => {
|
|
308
|
-
g.value = g.value.map((y) => ({
|
|
309
|
-
...y,
|
|
310
|
-
series: y.series.map((_) => _.id === l.id ? { ..._, value: d } : _)
|
|
311
|
-
}));
|
|
312
|
-
}
|
|
313
|
-
}) : g.value = g.value.map((d) => ({
|
|
314
|
-
...d,
|
|
315
|
-
series: d.series.map((y) => y.id === l.id ? { ...y, value: a } : y)
|
|
316
|
-
}))) : F && (e.value.serieToggleAnimation.show ? He({
|
|
317
|
-
from: u,
|
|
318
|
-
to: 0,
|
|
319
|
-
duration: e.value.serieToggleAnimation.durationMs,
|
|
320
|
-
onUpdate: (d) => {
|
|
321
|
-
g.value = g.value.map((y) => ({
|
|
322
|
-
...y,
|
|
323
|
-
series: y.series.map((_) => _.id === l.id ? { ..._, value: d } : _)
|
|
324
|
-
}));
|
|
325
|
-
},
|
|
326
|
-
onDone: () => {
|
|
327
|
-
w.value.push(l.id);
|
|
328
|
-
}
|
|
329
|
-
}) : (g.value = g.value.map((d) => ({
|
|
330
|
-
...d,
|
|
331
|
-
series: d.series.map((y) => y.id === l.id ? { ...y, value: 0 } : y)
|
|
332
|
-
})), w.value.push(l.id)));
|
|
333
|
-
}
|
|
334
|
-
const j = k(() => I.value / N.value.length * e.value.style.chart.layout.donut.spacingRatio), Ke = k(() => g.value.map((l, s) => I.value - s * I.value / N.value.length)), ee = k(() => g.value.map((l, s) => {
|
|
335
|
-
const a = Math.abs(l.series.map((v) => v.value).reduce((v, F) => v + F, 0)) > 0, o = I.value - s * I.value / g.value.length, t = M.value ? J.value.find((v) => v.datasetIndex === s) : null, u = [...l.series, ...t ? [t] : []].map((v) => ({
|
|
336
|
-
...v,
|
|
337
|
-
value: v.value < 1e-11 ? Number.MIN_VALUE : v.value
|
|
338
|
-
})), c = Ae(
|
|
339
|
-
{ series: [
|
|
340
|
-
{ name: "_", color: e.value.style.chart.layout.donut.emptyFill, value: 1 }
|
|
341
|
-
] },
|
|
342
|
-
f.value.width / 2,
|
|
343
|
-
f.value.height / 2,
|
|
344
|
-
o,
|
|
345
|
-
o,
|
|
346
|
-
1.99999,
|
|
347
|
-
2,
|
|
348
|
-
1,
|
|
349
|
-
360,
|
|
350
|
-
105.25,
|
|
351
|
-
j.value
|
|
352
|
-
);
|
|
353
|
-
return {
|
|
354
|
-
...l,
|
|
355
|
-
hasData: a,
|
|
356
|
-
radius: o,
|
|
357
|
-
skeleton: c,
|
|
358
|
-
donut: Ae(
|
|
359
|
-
{ series: u },
|
|
360
|
-
f.value.width / 2,
|
|
361
|
-
f.value.height / 2,
|
|
362
|
-
o,
|
|
363
|
-
o,
|
|
364
|
-
1.99999,
|
|
365
|
-
2,
|
|
366
|
-
1,
|
|
367
|
-
360,
|
|
368
|
-
105.25,
|
|
369
|
-
j.value
|
|
370
|
-
)
|
|
371
|
-
};
|
|
372
|
-
})), Qe = k(() => [...N.value].map((l, s) => {
|
|
373
|
-
const a = s * I.value / N.value.length;
|
|
374
|
-
return {
|
|
375
|
-
sizeRatio: a,
|
|
376
|
-
donut: Ae(
|
|
377
|
-
{ series: [{ value: 1 }] },
|
|
378
|
-
f.value.width / 2,
|
|
379
|
-
f.value.height / 2,
|
|
380
|
-
I.value - a,
|
|
381
|
-
I.value - a,
|
|
382
|
-
1.99999,
|
|
383
|
-
2,
|
|
384
|
-
1,
|
|
385
|
-
360,
|
|
386
|
-
105.25,
|
|
387
|
-
I.value / N.value.length * e.value.style.chart.layout.donut.spacingRatio
|
|
388
|
-
)[0]
|
|
389
|
-
};
|
|
390
|
-
})), Ze = h(null), te = h(null), le = h(null), ye = h(null);
|
|
391
|
-
function Ft({ datapoint: l, _relativeIndex: s, seriesIndex: a }) {
|
|
392
|
-
Ze.value = l.arcOfId, te.value = l.id, le.value = a, de.value = l.id, ye.value = {
|
|
393
|
-
datapoint: l,
|
|
394
|
-
seriesIndex: a,
|
|
395
|
-
series: g.value,
|
|
396
|
-
config: e.value
|
|
397
|
-
};
|
|
398
|
-
const o = e.value.style.chart.tooltip.customFormat;
|
|
399
|
-
if (ct(o) && el(
|
|
400
|
-
() => o({
|
|
401
|
-
seriesIndex: a,
|
|
402
|
-
datapoint: l,
|
|
403
|
-
series: g.value,
|
|
404
|
-
config: e.value
|
|
405
|
-
})
|
|
406
|
-
))
|
|
407
|
-
ie.value = o({
|
|
408
|
-
seriesIndex: a,
|
|
409
|
-
datapoint: l,
|
|
410
|
-
series: g.value,
|
|
411
|
-
config: e.value
|
|
412
|
-
});
|
|
413
|
-
else {
|
|
414
|
-
let t = "";
|
|
415
|
-
if (e.value.style.chart.tooltip.showAllItemsAtIndex && w.value.length === 0) {
|
|
416
|
-
const u = g.value.map((c) => c.series.find((v) => v.seriesIndex === a));
|
|
417
|
-
u.forEach((c, v) => {
|
|
418
|
-
if (!c) return "";
|
|
419
|
-
t += `
|
|
420
|
-
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${v < u.length - 1 ? `border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor}` : ""}">
|
|
421
|
-
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
422
|
-
<svg viewBox="0 0 20 20" height="${e.value.style.chart.tooltip.fontSize}" width="${e.value.style.chart.tooltip.fontSize}">
|
|
423
|
-
<circle cx="10" cy="10" r="10" fill="${c.color}"/>
|
|
424
|
-
</svg>
|
|
425
|
-
<span>
|
|
426
|
-
${c.arcOf ?? ""} - ${c.name}
|
|
427
|
-
</span>
|
|
428
|
-
</div>
|
|
429
|
-
<span>
|
|
430
|
-
${e.value.style.chart.tooltip.showValue ? `<b>${K(
|
|
431
|
-
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
432
|
-
l.value,
|
|
433
|
-
O({
|
|
434
|
-
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
435
|
-
v: l.value,
|
|
436
|
-
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
437
|
-
r: e.value.style.chart.tooltip.roundingValue
|
|
438
|
-
}),
|
|
439
|
-
{ datapoint: l, seriesIndex: a }
|
|
440
|
-
)}
|
|
441
|
-
</b>` : ""}
|
|
442
|
-
${e.value.style.chart.tooltip.showPercentage ? `(${O({
|
|
443
|
-
v: c.proportion * 100,
|
|
444
|
-
s: "%",
|
|
445
|
-
r: e.value.style.chart.tooltip.roundingPercentage
|
|
446
|
-
})})` : ""}
|
|
447
|
-
</span>
|
|
448
|
-
</div>
|
|
449
|
-
`;
|
|
450
|
-
});
|
|
451
|
-
} else
|
|
452
|
-
t += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf ?? ""} - ${l.name}</div>`, t += `<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 && (t += `<b>${K(
|
|
453
|
-
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
454
|
-
l.value,
|
|
455
|
-
O({
|
|
456
|
-
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
457
|
-
v: l.value,
|
|
458
|
-
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
459
|
-
r: e.value.style.chart.tooltip.roundingValue
|
|
460
|
-
}),
|
|
461
|
-
{ datapoint: l, seriesIndex: a }
|
|
462
|
-
)}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? t += `<span>(${O({
|
|
463
|
-
v: l.proportion * 100,
|
|
464
|
-
s: "%",
|
|
465
|
-
r: e.value.style.chart.tooltip.roundingPercentage
|
|
466
|
-
})})</span></div>` : t += `<b>${O({
|
|
467
|
-
v: l.proportion * 100,
|
|
468
|
-
s: "%",
|
|
469
|
-
r: e.value.style.chart.tooltip.roundingPercentage
|
|
470
|
-
})}</b></div>`);
|
|
471
|
-
ie.value = `<div style="font-size:${e.value.style.chart.tooltip.fontSize}px">${t}</div>`;
|
|
472
|
-
}
|
|
473
|
-
re.value = !0;
|
|
474
|
-
}
|
|
475
|
-
function pe(l) {
|
|
476
|
-
return l.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
|
|
477
|
-
}
|
|
478
|
-
function je(l, s) {
|
|
479
|
-
if (!e.value.useBlurOnHover)
|
|
480
|
-
return "";
|
|
481
|
-
if (e.value.style.chart.tooltip.showAllItemsAtIndex && w.value.length === 0)
|
|
482
|
-
return [null, void 0].includes(le.value) || le.value === s ? "" : `url(#blur_${b.value})`;
|
|
483
|
-
if (!e.value.style.chart.tooltip.showAllItemsAtIndex || w.value.length)
|
|
484
|
-
return [null, void 0].includes(te.value) || te.value === l.id ? "" : `url(#blur_${b.value})`;
|
|
485
|
-
}
|
|
486
|
-
const be = k(() => N.value.map((l, s) => {
|
|
487
|
-
const a = l.series.filter(
|
|
488
|
-
(t) => !w.value.includes(t.id)
|
|
489
|
-
), o = M.value ? a.map((t) => {
|
|
490
|
-
const u = L.dataset[s].series.findIndex(
|
|
491
|
-
(c) => c.name === t.name
|
|
492
|
-
);
|
|
493
|
-
return z(
|
|
494
|
-
L.dataset[s].series[u].values
|
|
495
|
-
).reduce((c, v) => c + v, 0);
|
|
496
|
-
}).reduce((t, u) => t + u, 0) : a.map((t) => t.value).reduce((t, u) => t + u, 0);
|
|
497
|
-
return l.series.map((t, u) => {
|
|
498
|
-
const c = z(L.dataset[s].series[u].values).reduce(
|
|
499
|
-
(F, d) => F + d,
|
|
500
|
-
0
|
|
501
|
-
), v = M.value ? c : t.value;
|
|
502
|
-
return {
|
|
503
|
-
name: t.name,
|
|
504
|
-
color: t.color,
|
|
505
|
-
value: v,
|
|
506
|
-
shape: "circle",
|
|
507
|
-
arcOf: t.arcOf,
|
|
508
|
-
id: t.id,
|
|
509
|
-
seriesIndex: u,
|
|
510
|
-
datasetIndex: s,
|
|
511
|
-
total: o,
|
|
512
|
-
opacity: w.value.includes(t.id) ? 0.5 : 1,
|
|
513
|
-
segregate: () => fe(t),
|
|
514
|
-
isSegregated: w.value.includes(t.id)
|
|
515
|
-
};
|
|
516
|
-
});
|
|
517
|
-
})), Nt = k(() => ({
|
|
518
|
-
cy: "nested-donuts-legend",
|
|
519
|
-
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
520
|
-
color: e.value.style.chart.legend.color,
|
|
521
|
-
fontSize: e.value.style.chart.legend.fontSize,
|
|
522
|
-
paddingBottom: 12,
|
|
523
|
-
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
524
|
-
})), D = k(() => {
|
|
525
|
-
const l = g.value.flatMap((a) => a.series.map((o) => ({
|
|
526
|
-
name: `${a.name} - ${o.name}`,
|
|
527
|
-
color: o.color,
|
|
528
|
-
total: a.total
|
|
529
|
-
}))), s = g.value.flatMap((a) => a.series.map((o) => o.value));
|
|
530
|
-
return { head: l, body: s };
|
|
531
|
-
});
|
|
532
|
-
function et(l = null) {
|
|
533
|
-
ut(() => {
|
|
534
|
-
const s = D.value.head.map((t, u) => [
|
|
535
|
-
[t.name],
|
|
536
|
-
[D.value.body[u]],
|
|
537
|
-
[
|
|
538
|
-
isNaN(D.value.body[u] / t.total) ? "-" : D.value.body[u] / t.total * 100
|
|
539
|
-
]
|
|
540
|
-
]), a = [
|
|
541
|
-
[e.value.style.chart.title.text],
|
|
542
|
-
[e.value.style.chart.title.subtitle.text],
|
|
543
|
-
[[""], ["val"], ["%"]]
|
|
544
|
-
].concat(s), o = Zt(a);
|
|
545
|
-
l ? l(o) : jt({
|
|
546
|
-
csvContent: o,
|
|
547
|
-
title: e.value.style.chart.title.text || "vue-ui-nested-donuts"
|
|
548
|
-
});
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
const ae = k(() => {
|
|
552
|
-
const l = [
|
|
553
|
-
e.value.table.columnNames.series,
|
|
554
|
-
e.value.table.columnNames.value,
|
|
555
|
-
e.value.table.columnNames.percentage
|
|
556
|
-
], s = D.value.head.map((t, u) => {
|
|
557
|
-
const c = O({
|
|
558
|
-
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
559
|
-
v: D.value.body[u],
|
|
560
|
-
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
561
|
-
r: e.value.table.td.roundingValue
|
|
562
|
-
});
|
|
563
|
-
return [
|
|
564
|
-
{
|
|
565
|
-
color: t.color,
|
|
566
|
-
name: t.name
|
|
567
|
-
},
|
|
568
|
-
c,
|
|
569
|
-
isNaN(D.value.body[u] / t.total) ? "-" : O({
|
|
570
|
-
v: D.value.body[u] / t.total * 100,
|
|
571
|
-
s: "%",
|
|
572
|
-
r: e.value.table.td.roundingPercentage
|
|
573
|
-
})
|
|
574
|
-
];
|
|
575
|
-
}), a = {
|
|
576
|
-
th: {
|
|
577
|
-
backgroundColor: e.value.table.th.backgroundColor,
|
|
578
|
-
color: e.value.table.th.color,
|
|
579
|
-
outline: e.value.table.th.outline
|
|
580
|
-
},
|
|
581
|
-
td: {
|
|
582
|
-
backgroundColor: e.value.table.td.backgroundColor,
|
|
583
|
-
color: e.value.table.td.color,
|
|
584
|
-
outline: e.value.table.td.outline
|
|
585
|
-
},
|
|
586
|
-
breakpoint: e.value.table.responsiveBreakpoint
|
|
587
|
-
};
|
|
588
|
-
return {
|
|
589
|
-
colNames: [
|
|
590
|
-
e.value.table.columnNames.series,
|
|
591
|
-
e.value.table.columnNames.value,
|
|
592
|
-
e.value.table.columnNames.percentage
|
|
593
|
-
],
|
|
594
|
-
head: l,
|
|
595
|
-
body: s,
|
|
596
|
-
config: a
|
|
597
|
-
};
|
|
598
|
-
});
|
|
599
|
-
function St() {
|
|
600
|
-
return N.value;
|
|
601
|
-
}
|
|
602
|
-
function tt() {
|
|
603
|
-
$.value.showTable = !$.value.showTable;
|
|
604
|
-
}
|
|
605
|
-
function lt() {
|
|
606
|
-
$.value.dataLabels.show = !$.value.dataLabels.show;
|
|
607
|
-
}
|
|
608
|
-
function at() {
|
|
609
|
-
$.value.showTooltip = !$.value.showTooltip;
|
|
610
|
-
}
|
|
611
|
-
const oe = h(!1);
|
|
612
|
-
function ge() {
|
|
613
|
-
oe.value = !oe.value;
|
|
614
|
-
}
|
|
615
|
-
async function It({ scale: l = 2 } = {}) {
|
|
616
|
-
if (!V.value) return;
|
|
617
|
-
const { width: s, height: a } = V.value.getBoundingClientRect(), o = s / a, { imageUri: t, base64: u } = await rl({ domElement: V.value, base64: !0, img: !0, scale: l });
|
|
618
|
-
return {
|
|
619
|
-
imageUri: t,
|
|
620
|
-
base64: u,
|
|
621
|
-
title: e.value.style.chart.title.text,
|
|
622
|
-
width: s,
|
|
623
|
-
height: a,
|
|
624
|
-
aspectRatio: o
|
|
625
|
-
};
|
|
626
|
-
}
|
|
627
|
-
const me = h(null);
|
|
628
|
-
function Vt() {
|
|
629
|
-
if (!me.value) return;
|
|
630
|
-
const { x: l, y: s, width: a, height: o } = me.value.getBBox();
|
|
631
|
-
Z.value && Z.value.setAttribute("viewBox", `${l} ${s} ${a + Math.min(0, l)} ${o + Math.min(0, s)}`);
|
|
632
|
-
}
|
|
633
|
-
return yt({
|
|
634
|
-
autoSize: Vt,
|
|
635
|
-
getData: St,
|
|
636
|
-
getImage: It,
|
|
637
|
-
generatePdf: Xe,
|
|
638
|
-
generateCsv: et,
|
|
639
|
-
generateImage: We,
|
|
640
|
-
toggleTable: tt,
|
|
641
|
-
toggleLabels: lt,
|
|
642
|
-
toggleTooltip: at,
|
|
643
|
-
toggleAnnotator: ge,
|
|
644
|
-
toggleFullscreen: Me
|
|
645
|
-
}), (l, s) => (n(), i("div", {
|
|
646
|
-
ref_key: "nestedDonutsChart",
|
|
647
|
-
ref: V,
|
|
648
|
-
class: R(`vue-ui-nested-donuts ${G.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
649
|
-
style: ne(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
650
|
-
id: `nested_donuts_${b.value}`,
|
|
651
|
-
onMouseenter: s[3] || (s[3] = () => r(Be)(!0)),
|
|
652
|
-
onMouseleave: s[4] || (s[4] = () => r(Be)(!1))
|
|
653
|
-
}, [
|
|
654
|
-
e.value.userOptions.buttons.annotator ? (n(), U(r(wt), {
|
|
655
|
-
key: 0,
|
|
656
|
-
svgRef: r(Z),
|
|
657
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
658
|
-
color: e.value.style.chart.color,
|
|
659
|
-
active: oe.value,
|
|
660
|
-
onClose: ge
|
|
661
|
-
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : m("", !0),
|
|
662
|
-
_t.value ? (n(), i("div", {
|
|
663
|
-
key: 1,
|
|
664
|
-
ref_key: "noTitle",
|
|
665
|
-
ref: Ve,
|
|
666
|
-
class: "vue-data-ui-no-title-space",
|
|
667
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
668
|
-
}, null, 512)) : m("", !0),
|
|
669
|
-
e.value.style.chart.title.text ? (n(), i("div", {
|
|
670
|
-
key: 2,
|
|
671
|
-
ref_key: "chartTitle",
|
|
672
|
-
ref: Se
|
|
673
|
-
}, [
|
|
674
|
-
(n(), U(ul, {
|
|
675
|
-
key: `title_${Pe.value}`,
|
|
676
|
-
config: {
|
|
677
|
-
title: {
|
|
678
|
-
cy: "donut-div-title",
|
|
679
|
-
...e.value.style.chart.title
|
|
680
|
-
},
|
|
681
|
-
subtitle: {
|
|
682
|
-
cy: "donut-div-subtitle",
|
|
683
|
-
...e.value.style.chart.title.subtitle
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
}, null, 8, ["config"]))
|
|
687
|
-
], 512)) : m("", !0),
|
|
688
|
-
e.value.userOptions.show && Q.value && (r(Ee) || r(ve)) ? (n(), U(r(Ct), {
|
|
689
|
-
ref: "details",
|
|
690
|
-
key: `user_option_${Ne.value}`,
|
|
691
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
692
|
-
color: e.value.style.chart.color,
|
|
693
|
-
isPrinting: r(Ge),
|
|
694
|
-
isImaging: r(Ye),
|
|
695
|
-
uid: b.value,
|
|
696
|
-
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
697
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
698
|
-
hasXls: e.value.userOptions.buttons.csv,
|
|
699
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
700
|
-
hasTable: e.value.userOptions.buttons.table,
|
|
701
|
-
hasLabel: e.value.userOptions.buttons.labels,
|
|
702
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
703
|
-
isFullscreen: G.value,
|
|
704
|
-
isTooltip: $.value.showTooltip,
|
|
705
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
706
|
-
chartElement: V.value,
|
|
707
|
-
position: e.value.userOptions.position,
|
|
708
|
-
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
709
|
-
isAnnotation: oe.value,
|
|
710
|
-
callbacks: e.value.userOptions.callbacks,
|
|
711
|
-
printScale: e.value.userOptions.print.scale,
|
|
712
|
-
onToggleFullscreen: Me,
|
|
713
|
-
onGeneratePdf: r(Xe),
|
|
714
|
-
onGenerateCsv: et,
|
|
715
|
-
onGenerateImage: r(We),
|
|
716
|
-
onToggleTable: tt,
|
|
717
|
-
onToggleLabels: lt,
|
|
718
|
-
onToggleTooltip: at,
|
|
719
|
-
onToggleAnnotator: ge,
|
|
720
|
-
style: ne({
|
|
721
|
-
visibility: r(Ee) ? r(ve) ? "visible" : "hidden" : "visible"
|
|
722
|
-
})
|
|
723
|
-
}, Et({ _: 2 }, [
|
|
724
|
-
l.$slots.menuIcon ? {
|
|
725
|
-
name: "menuIcon",
|
|
726
|
-
fn: C(({ isOpen: a, color: o }) => [
|
|
727
|
-
x(l.$slots, "menuIcon", X(W({ isOpen: a, color: o })), void 0, !0)
|
|
728
|
-
]),
|
|
729
|
-
key: "0"
|
|
730
|
-
} : void 0,
|
|
731
|
-
l.$slots.optionTooltip ? {
|
|
732
|
-
name: "optionTooltip",
|
|
733
|
-
fn: C(() => [
|
|
734
|
-
x(l.$slots, "optionTooltip", {}, void 0, !0)
|
|
735
|
-
]),
|
|
736
|
-
key: "1"
|
|
737
|
-
} : void 0,
|
|
738
|
-
l.$slots.optionPdf ? {
|
|
739
|
-
name: "optionPdf",
|
|
740
|
-
fn: C(() => [
|
|
741
|
-
x(l.$slots, "optionPdf", {}, void 0, !0)
|
|
742
|
-
]),
|
|
743
|
-
key: "2"
|
|
744
|
-
} : void 0,
|
|
745
|
-
l.$slots.optionCsv ? {
|
|
746
|
-
name: "optionCsv",
|
|
747
|
-
fn: C(() => [
|
|
748
|
-
x(l.$slots, "optionCsv", {}, void 0, !0)
|
|
749
|
-
]),
|
|
750
|
-
key: "3"
|
|
751
|
-
} : void 0,
|
|
752
|
-
l.$slots.optionImg ? {
|
|
753
|
-
name: "optionImg",
|
|
754
|
-
fn: C(() => [
|
|
755
|
-
x(l.$slots, "optionImg", {}, void 0, !0)
|
|
756
|
-
]),
|
|
757
|
-
key: "4"
|
|
758
|
-
} : void 0,
|
|
759
|
-
l.$slots.optionTable ? {
|
|
760
|
-
name: "optionTable",
|
|
761
|
-
fn: C(() => [
|
|
762
|
-
x(l.$slots, "optionTable", {}, void 0, !0)
|
|
763
|
-
]),
|
|
764
|
-
key: "5"
|
|
765
|
-
} : void 0,
|
|
766
|
-
l.$slots.optionLabels ? {
|
|
767
|
-
name: "optionLabels",
|
|
768
|
-
fn: C(() => [
|
|
769
|
-
x(l.$slots, "optionLabels", {}, void 0, !0)
|
|
770
|
-
]),
|
|
771
|
-
key: "6"
|
|
772
|
-
} : void 0,
|
|
773
|
-
l.$slots.optionFullscreen ? {
|
|
774
|
-
name: "optionFullscreen",
|
|
775
|
-
fn: C(({ toggleFullscreen: a, isFullscreen: o }) => [
|
|
776
|
-
x(l.$slots, "optionFullscreen", X(W({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
|
|
777
|
-
]),
|
|
778
|
-
key: "7"
|
|
779
|
-
} : void 0,
|
|
780
|
-
l.$slots.optionAnnotator ? {
|
|
781
|
-
name: "optionAnnotator",
|
|
782
|
-
fn: C(({ toggleAnnotator: a, isAnnotator: o }) => [
|
|
783
|
-
x(l.$slots, "optionAnnotator", X(W({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
|
|
784
|
-
]),
|
|
785
|
-
key: "8"
|
|
786
|
-
} : void 0
|
|
787
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : m("", !0),
|
|
788
|
-
Q.value ? (n(), i("svg", {
|
|
789
|
-
key: 4,
|
|
790
|
-
ref_key: "svgRef",
|
|
791
|
-
ref: Z,
|
|
792
|
-
xmlns: r(Jt),
|
|
793
|
-
class: R({
|
|
794
|
-
"vue-data-ui-fullscreen--on": G.value,
|
|
795
|
-
"vue-data-ui-fulscreen--off": !G.value,
|
|
796
|
-
"vue-data-ui-svg": !0
|
|
797
|
-
}),
|
|
798
|
-
viewBox: `0 0 ${f.value.width <= 0 ? 1e-3 : f.value.width} ${f.value.height < 0 ? 1e-3 : f.value.height}`,
|
|
799
|
-
style: ne(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${Ue.value.css}`)
|
|
800
|
-
}, [
|
|
801
|
-
p("g", {
|
|
802
|
-
ref_key: "G",
|
|
803
|
-
ref: me,
|
|
804
|
-
class: "vue-data-ui-g"
|
|
805
|
-
}, [
|
|
806
|
-
rt(r(mt)),
|
|
807
|
-
l.$slots["chart-background"] ? (n(), i("foreignObject", {
|
|
808
|
-
key: 0,
|
|
809
|
-
x: 0,
|
|
810
|
-
y: 0,
|
|
811
|
-
width: f.value.width <= 0 ? 1e-3 : f.value.width,
|
|
812
|
-
height: f.value.height < 0 ? 1e-3 : f.value.height,
|
|
813
|
-
style: {
|
|
814
|
-
pointerEvents: "none"
|
|
815
|
-
}
|
|
816
|
-
}, [
|
|
817
|
-
x(l.$slots, "chart-background", {}, void 0, !0)
|
|
818
|
-
], 8, vl)) : m("", !0),
|
|
819
|
-
p("defs", null, [
|
|
820
|
-
(n(!0), i(T, null, A(Qe.value, (a, o) => (n(), i("radialGradient", {
|
|
821
|
-
id: `radial_${b.value}_${o}`
|
|
822
|
-
}, [
|
|
823
|
-
s[5] || (s[5] = p("stop", {
|
|
824
|
-
offset: "0%",
|
|
825
|
-
"stop-color": "#FFFFFF",
|
|
826
|
-
"stop-opacity": "0"
|
|
827
|
-
}, null, -1)),
|
|
828
|
-
p("stop", {
|
|
829
|
-
offset: `${(1 - j.value / Ke.value[o]) * 100}%`,
|
|
830
|
-
"stop-color": r(Kt)("#FFFFFF", 0),
|
|
831
|
-
"stop-opacity": "0"
|
|
832
|
-
}, null, 8, fl),
|
|
833
|
-
p("stop", {
|
|
834
|
-
offset: `${(1 - j.value / Ke.value[o] / 2) * 100}%`,
|
|
835
|
-
"stop-color": "#FFFFFF",
|
|
836
|
-
"stop-opacity": e.value.style.chart.gradientIntensity / 100
|
|
837
|
-
}, null, 8, yl),
|
|
838
|
-
s[6] || (s[6] = p("stop", {
|
|
839
|
-
offset: "100%",
|
|
840
|
-
"stop-color": "#FFFFFF",
|
|
841
|
-
"stop-opacity": "0"
|
|
842
|
-
}, null, -1))
|
|
843
|
-
], 8, hl))), 256))
|
|
844
|
-
]),
|
|
845
|
-
p("defs", null, [
|
|
846
|
-
p("filter", {
|
|
847
|
-
id: `blur_${b.value}`,
|
|
848
|
-
x: "-50%",
|
|
849
|
-
y: "-50%",
|
|
850
|
-
width: "200%",
|
|
851
|
-
height: "200%"
|
|
852
|
-
}, [
|
|
853
|
-
p("feGaussianBlur", {
|
|
854
|
-
in: "SourceGraphic",
|
|
855
|
-
stdDeviation: 2,
|
|
856
|
-
id: `blur_std_${b.value}`
|
|
857
|
-
}, null, 8, bl),
|
|
858
|
-
s[7] || (s[7] = p("feColorMatrix", {
|
|
859
|
-
type: "saturate",
|
|
860
|
-
values: "0"
|
|
861
|
-
}, null, -1))
|
|
862
|
-
], 8, pl),
|
|
863
|
-
p("filter", {
|
|
864
|
-
id: `shadow_${b.value}`,
|
|
865
|
-
"color-interpolation-filters": "sRGB"
|
|
866
|
-
}, [
|
|
867
|
-
p("feDropShadow", {
|
|
868
|
-
dx: "0",
|
|
869
|
-
dy: "0",
|
|
870
|
-
stdDeviation: "10",
|
|
871
|
-
"flood-opacity": "0.5",
|
|
872
|
-
"flood-color": e.value.style.chart.layout.donut.shadowColor
|
|
873
|
-
}, null, 8, ml)
|
|
874
|
-
], 8, gl)
|
|
875
|
-
]),
|
|
876
|
-
(n(!0), i(T, null, A(ee.value, (a, o) => (n(), i("g", null, [
|
|
877
|
-
a.hasData ? (n(!0), i(T, { key: 0 }, A(a.donut.filter((t) => !t.ghost), (t, u) => (n(), i("g", null, [
|
|
878
|
-
p("path", {
|
|
879
|
-
class: "vue-ui-donut-arc-path",
|
|
880
|
-
d: t.arcSlice,
|
|
881
|
-
fill: t.color,
|
|
882
|
-
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
883
|
-
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
884
|
-
filter: je(t, u)
|
|
885
|
-
}, null, 8, wl)
|
|
886
|
-
]))), 256)) : (n(!0), i(T, { key: 1 }, A(a.skeleton, (t, u) => (n(), i("g", null, [
|
|
887
|
-
p("path", {
|
|
888
|
-
class: "vue-ui-donut-arc-path",
|
|
889
|
-
d: t.arcSlice,
|
|
890
|
-
fill: t.color,
|
|
891
|
-
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
892
|
-
"stroke-width": e.value.style.chart.layout.donut.borderWidth
|
|
893
|
-
}, null, 8, $l)
|
|
894
|
-
]))), 256))
|
|
895
|
-
]))), 256)),
|
|
896
|
-
e.value.style.chart.useGradient ? (n(), i("g", kl, [
|
|
897
|
-
(n(!0), i(T, null, A(Qe.value, (a, o) => (n(), i("g", null, [
|
|
898
|
-
p("path", {
|
|
899
|
-
d: a.donut.arcSlice,
|
|
900
|
-
fill: `url(#radial_${b.value}_${o})`,
|
|
901
|
-
stroke: "transparent",
|
|
902
|
-
"stroke-width": "0"
|
|
903
|
-
}, null, 8, Cl)
|
|
904
|
-
]))), 256))
|
|
905
|
-
])) : m("", !0),
|
|
906
|
-
e.value.style.chart.layout.labels.dataLabels.showDonutName ? (n(), i("g", xl, [
|
|
907
|
-
(n(!0), i(T, null, A(ee.value, (a, o) => (n(), i("g", null, [
|
|
908
|
-
(n(!0), i(T, null, A(a.donut, (t, u) => (n(), i("g", null, [
|
|
909
|
-
u === 0 && f.value.width && f.value.height ? (n(), i("text", {
|
|
910
|
-
key: 0,
|
|
911
|
-
class: R({ animated: e.value.useCssAnimation }),
|
|
912
|
-
x: f.value.width / 2,
|
|
913
|
-
y: t.startY - e.value.style.chart.layout.labels.dataLabels.fontSize + e.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,
|
|
914
|
-
"text-anchor": "middle",
|
|
915
|
-
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
916
|
-
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldDonutName ? "bold" : "normal",
|
|
917
|
-
fill: e.value.style.chart.layout.labels.dataLabels.color
|
|
918
|
-
}, S(e.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? r(Qt)({
|
|
919
|
-
source: a.name,
|
|
920
|
-
length: e.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize
|
|
921
|
-
}) : a.name), 11, Ll)) : m("", !0)
|
|
922
|
-
]))), 256))
|
|
923
|
-
]))), 256))
|
|
924
|
-
])) : m("", !0),
|
|
925
|
-
e.value.style.chart.layout.labels.dataLabels.show ? (n(), i("g", _l, [
|
|
926
|
-
(n(!0), i(T, null, A(ee.value, (a, o) => (n(), i("g", null, [
|
|
927
|
-
(n(!0), i(T, null, A(a.donut.filter((t) => !t.ghost), (t, u) => (n(), i("g", {
|
|
928
|
-
filter: je(t, u)
|
|
929
|
-
}, [
|
|
930
|
-
it(p("text", {
|
|
931
|
-
class: R({ animated: e.value.useCssAnimation }),
|
|
932
|
-
opacity: pe(t) ? 1 : 0,
|
|
933
|
-
"text-anchor": r(H)(t, !0).anchor,
|
|
934
|
-
x: r(H)(
|
|
935
|
-
t,
|
|
936
|
-
!1,
|
|
937
|
-
e.value.style.chart.layout.labels.dataLabels.offsetX
|
|
938
|
-
).x || 0,
|
|
939
|
-
y: r(Oe)(
|
|
940
|
-
t,
|
|
941
|
-
e.value.style.chart.layout.labels.dataLabels.offsetY,
|
|
942
|
-
e.value.style.chart.layout.labels.dataLabels.offsetY
|
|
943
|
-
),
|
|
944
|
-
fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
|
|
945
|
-
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
946
|
-
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldPercentage ? "bold" : "normal"
|
|
947
|
-
}, S(r(O)({
|
|
948
|
-
v: t.proportion * 100,
|
|
949
|
-
s: "%",
|
|
950
|
-
r: e.value.style.chart.layout.labels.dataLabels.roundingPercentage
|
|
951
|
-
})), 11, Al), [
|
|
952
|
-
[
|
|
953
|
-
dt,
|
|
954
|
-
$.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage
|
|
955
|
-
]
|
|
956
|
-
]),
|
|
957
|
-
it(p("text", {
|
|
958
|
-
class: R({ animated: e.value.useCssAnimation }),
|
|
959
|
-
opacity: pe(t) ? 1 : 0,
|
|
960
|
-
"text-anchor": r(H)(t, !0).anchor,
|
|
961
|
-
x: r(H)(
|
|
962
|
-
t,
|
|
963
|
-
!1,
|
|
964
|
-
e.value.style.chart.layout.labels.dataLabels.offsetX
|
|
965
|
-
).x || 0,
|
|
966
|
-
y: r(Oe)(
|
|
967
|
-
t,
|
|
968
|
-
e.value.style.chart.layout.labels.dataLabels.offsetY,
|
|
969
|
-
e.value.style.chart.layout.labels.dataLabels.offsetY
|
|
970
|
-
) + e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
971
|
-
fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
|
|
972
|
-
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
973
|
-
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
|
|
974
|
-
}, " (" + S(r(K)(
|
|
975
|
-
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
976
|
-
t.value,
|
|
977
|
-
r(O)({
|
|
978
|
-
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
979
|
-
v: t.value,
|
|
980
|
-
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
981
|
-
r: e.value.style.chart.layout.labels.dataLabels.roundingValue
|
|
982
|
-
}),
|
|
983
|
-
{ datapoint: t, seriesIndex: o, datapointIndex: u }
|
|
984
|
-
)) + ") ", 11, Ol), [
|
|
985
|
-
[
|
|
986
|
-
dt,
|
|
987
|
-
$.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue
|
|
988
|
-
]
|
|
989
|
-
]),
|
|
990
|
-
pe(t) && $.value.dataLabels.show && !e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue ? (n(), i("text", {
|
|
991
|
-
key: 0,
|
|
992
|
-
class: R({ animated: e.value.useCssAnimation }),
|
|
993
|
-
"text-anchor": r(H)(t, !0).anchor,
|
|
994
|
-
x: r(H)(
|
|
995
|
-
t,
|
|
996
|
-
!1,
|
|
997
|
-
e.value.style.chart.layout.labels.dataLabels.offsetX
|
|
998
|
-
).x || 0,
|
|
999
|
-
y: r(Oe)(
|
|
1000
|
-
t,
|
|
1001
|
-
e.value.style.chart.layout.labels.dataLabels.offsetY,
|
|
1002
|
-
e.value.style.chart.layout.labels.dataLabels.offsetY
|
|
1003
|
-
),
|
|
1004
|
-
fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
|
|
1005
|
-
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
1006
|
-
"font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
|
|
1007
|
-
}, S(r(K)(
|
|
1008
|
-
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
1009
|
-
t.value,
|
|
1010
|
-
r(O)({
|
|
1011
|
-
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1012
|
-
v: t.value,
|
|
1013
|
-
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1014
|
-
r: e.value.style.chart.layout.labels.dataLabels.roundingValue
|
|
1015
|
-
}),
|
|
1016
|
-
{ datapoint: t, seriesIndex: o, datapointIndex: u }
|
|
1017
|
-
)), 11, Fl)) : m("", !0)
|
|
1018
|
-
], 8, Tl))), 256))
|
|
1019
|
-
]))), 256))
|
|
1020
|
-
])) : m("", !0),
|
|
1021
|
-
(n(!0), i(T, null, A(ee.value, (a, o) => (n(), i("g", null, [
|
|
1022
|
-
(n(!0), i(T, null, A(a.donut, (t, u) => (n(), i("g", null, [
|
|
1023
|
-
p("path", {
|
|
1024
|
-
d: t.arcSlice,
|
|
1025
|
-
fill: de.value === t.id ? e.value.style.chart.layout.donut.selectedColor : "transparent",
|
|
1026
|
-
onMouseenter: (c) => Ft({
|
|
1027
|
-
datapoint: t,
|
|
1028
|
-
seriesIndex: t.seriesIndex
|
|
1029
|
-
}),
|
|
1030
|
-
onClick: (c) => At({ datapoint: t, index: u }),
|
|
1031
|
-
onMouseleave: s[0] || (s[0] = (c) => {
|
|
1032
|
-
re.value = !1, Ze.value = null, te.value = null, le.value = null, de.value = null;
|
|
1033
|
-
})
|
|
1034
|
-
}, null, 40, Nl)
|
|
1035
|
-
]))), 256))
|
|
1036
|
-
]))), 256)),
|
|
1037
|
-
x(l.$slots, "svg", { svg: f.value }, void 0, !0)
|
|
1038
|
-
], 512)
|
|
1039
|
-
], 14, cl)) : m("", !0),
|
|
1040
|
-
l.$slots.watermark ? (n(), i("div", Sl, [
|
|
1041
|
-
x(l.$slots, "watermark", X(W({ isPrinting: r(Ge) || r(Ye) })), void 0, !0)
|
|
1042
|
-
])) : m("", !0),
|
|
1043
|
-
Q.value ? m("", !0) : (n(), U(r($t), {
|
|
1044
|
-
key: 6,
|
|
1045
|
-
config: {
|
|
1046
|
-
type: "donut",
|
|
1047
|
-
style: {
|
|
1048
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1049
|
-
donut: {
|
|
1050
|
-
color: "#CCCCCC"
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
}, null, 8, ["config"])),
|
|
1055
|
-
rt(r(kt), {
|
|
1056
|
-
show: $.value.showTooltip && re.value,
|
|
1057
|
-
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
1058
|
-
color: e.value.style.chart.tooltip.color,
|
|
1059
|
-
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
1060
|
-
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
1061
|
-
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
1062
|
-
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
1063
|
-
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
1064
|
-
position: e.value.style.chart.tooltip.position,
|
|
1065
|
-
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
1066
|
-
parent: V.value,
|
|
1067
|
-
content: ie.value,
|
|
1068
|
-
isFullscreen: G.value,
|
|
1069
|
-
isCustom: r(ct)(e.value.style.chart.tooltip.customFormat)
|
|
1070
|
-
}, {
|
|
1071
|
-
"tooltip-before": C(() => [
|
|
1072
|
-
x(l.$slots, "tooltip-before", X(W({ ...ye.value })), void 0, !0)
|
|
1073
|
-
]),
|
|
1074
|
-
"tooltip-after": C(() => [
|
|
1075
|
-
x(l.$slots, "tooltip-after", X(W({ ...ye.value })), void 0, !0)
|
|
1076
|
-
]),
|
|
1077
|
-
_: 3
|
|
1078
|
-
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
|
|
1079
|
-
e.value.style.chart.legend.show ? (n(), i("div", {
|
|
1080
|
-
key: 7,
|
|
1081
|
-
ref_key: "chartLegend",
|
|
1082
|
-
ref: ce,
|
|
1083
|
-
class: R({ "vue-ui-nested-donuts-legend": be.value.length > 1 })
|
|
1084
|
-
}, [
|
|
1085
|
-
(n(!0), i(T, null, A(be.value, (a, o) => (n(), U(nl, {
|
|
1086
|
-
key: `legend_${o}_${ze.value}`,
|
|
1087
|
-
legendSet: a,
|
|
1088
|
-
config: Nt.value,
|
|
1089
|
-
onClickMarker: s[1] || (s[1] = ({ legend: t }) => fe(t))
|
|
1090
|
-
}, {
|
|
1091
|
-
legendTitle: C(({ titleSet: t }) => [
|
|
1092
|
-
t[0] && t[0].arcOf ? (n(), i("div", Il, S(t[0].arcOf), 1)) : m("", !0)
|
|
1093
|
-
]),
|
|
1094
|
-
item: C(({ legend: t, index: u }) => [
|
|
1095
|
-
p("div", {
|
|
1096
|
-
onClick: (c) => fe(t),
|
|
1097
|
-
style: ne(`opacity:${w.value.includes(t.id) ? 0.5 : 1}`)
|
|
1098
|
-
}, S(t.name) + S(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + S(e.value.style.chart.legend.showValue ? r(K)(
|
|
1099
|
-
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
1100
|
-
t.value,
|
|
1101
|
-
r(O)({
|
|
1102
|
-
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1103
|
-
v: t.value,
|
|
1104
|
-
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1105
|
-
r: e.value.style.chart.legend.roundingValue
|
|
1106
|
-
}),
|
|
1107
|
-
{ datapoint: t, seriesIndex: u }
|
|
1108
|
-
) : "") + " " + S(e.value.style.chart.legend.showPercentage ? w.value.includes(t.id) ? `${e.value.style.chart.legend.showValue ? "(" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? "(" : ""}${isNaN(t.value / t.total) ? "-" : r(O)({
|
|
1109
|
-
v: t.value / t.total * 100,
|
|
1110
|
-
s: "%",
|
|
1111
|
-
r: e.value.style.chart.legend.roundingPercentage
|
|
1112
|
-
})}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, Vl)
|
|
1113
|
-
]),
|
|
1114
|
-
_: 2
|
|
1115
|
-
}, 1032, ["legendSet", "config"]))), 128))
|
|
1116
|
-
], 2)) : m("", !0),
|
|
1117
|
-
e.value.style.chart.legend.show ? m("", !0) : (n(), i("div", {
|
|
1118
|
-
key: 8,
|
|
1119
|
-
ref_key: "chartLegend",
|
|
1120
|
-
ref: ce
|
|
1121
|
-
}, [
|
|
1122
|
-
x(l.$slots, "legend", { legend: be.value }, void 0, !0)
|
|
1123
|
-
], 512)),
|
|
1124
|
-
l.$slots.source ? (n(), i("div", {
|
|
1125
|
-
key: 9,
|
|
1126
|
-
ref_key: "source",
|
|
1127
|
-
ref: Ie,
|
|
1128
|
-
dir: "auto"
|
|
1129
|
-
}, [
|
|
1130
|
-
x(l.$slots, "source", {}, void 0, !0)
|
|
1131
|
-
], 512)) : m("", !0),
|
|
1132
|
-
Q.value ? (n(), U(r(bt), {
|
|
1133
|
-
key: 10,
|
|
1134
|
-
hideDetails: "",
|
|
1135
|
-
config: {
|
|
1136
|
-
open: $.value.showTable,
|
|
1137
|
-
maxHeight: 1e4,
|
|
1138
|
-
body: {
|
|
1139
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1140
|
-
color: e.value.style.chart.color
|
|
1141
|
-
},
|
|
1142
|
-
head: {
|
|
1143
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1144
|
-
color: e.value.style.chart.color
|
|
1145
|
-
}
|
|
1146
|
-
}
|
|
1147
|
-
}, {
|
|
1148
|
-
content: C(() => [
|
|
1149
|
-
(n(), U(r(gt), {
|
|
1150
|
-
key: `table_${De.value}`,
|
|
1151
|
-
colNames: ae.value.colNames,
|
|
1152
|
-
head: ae.value.head,
|
|
1153
|
-
body: ae.value.body,
|
|
1154
|
-
config: ae.value.config,
|
|
1155
|
-
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1156
|
-
onClose: s[2] || (s[2] = (a) => $.value.showTable = !1)
|
|
1157
|
-
}, {
|
|
1158
|
-
th: C(({ th: a }) => [
|
|
1159
|
-
p("div", {
|
|
1160
|
-
innerHTML: a,
|
|
1161
|
-
style: { display: "flex", "align-items": "center" }
|
|
1162
|
-
}, null, 8, Pl)
|
|
1163
|
-
]),
|
|
1164
|
-
td: C(({ td: a }) => [
|
|
1165
|
-
Rt(S(a.name || a), 1)
|
|
1166
|
-
]),
|
|
1167
|
-
_: 1
|
|
1168
|
-
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
1169
|
-
]),
|
|
1170
|
-
_: 1
|
|
1171
|
-
}, 8, ["config"])) : m("", !0)
|
|
1172
|
-
], 46, dl));
|
|
1173
|
-
}
|
|
1174
|
-
}, Hl = /* @__PURE__ */ il(Dl, [["__scopeId", "data-v-89767698"]]);
|
|
1175
|
-
export {
|
|
1176
|
-
Hl as default
|
|
1177
|
-
};
|