vue-data-ui 3.0.0-next.1 → 3.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/dist/{Arrow-BKKETqRi.js → Arrow-Dck2Ea5K.js} +1 -1
- package/dist/{BaseDraggableDialog-Duz4Bd3A.js → BaseDraggableDialog-CatHZ1ns.js} +2 -2
- package/dist/{BaseIcon-BAHAKjob.js → BaseIcon-BmZ4MREl.js} +1 -1
- package/dist/{ColorPicker-oPTO1J9Q.js → ColorPicker-C1MXyD9Q.js} +2 -2
- package/dist/{DataTable-vByThHdN.js → DataTable-CgL0Rz0x.js} +2 -2
- package/dist/{Legend-CIElSUHU.js → Legend-CYbP3Kfg.js} +19 -18
- package/dist/{NonSvgPenAndPaper-CsY6Bf4e.js → NonSvgPenAndPaper-CcbcJm_U.js} +3 -3
- package/dist/{PackageVersion-B0wGS6pw.js → PackageVersion-CAkNkiIG.js} +1 -1
- package/dist/{PenAndPaper-7o0xS-d4.js → PenAndPaper-Cx1-5zdD.js} +3 -3
- package/dist/{Shape-Blrp5ZfP.js → Shape-DBXkGxKt.js} +1 -1
- package/dist/{Slicer-CcM8hzCn.js → Slicer-nrMi5hzj.js} +2 -2
- package/dist/{SparkTooltip-iaouYun8.js → SparkTooltip-fNzL4pIU.js} +1 -1
- package/dist/{Title-CWxjC3bE.js → Title-pVYRzQXY.js} +1 -1
- package/dist/Tooltip-NwATo4ZJ.js +157 -0
- package/dist/{UserOptions-BEBaPSlU.js → UserOptions-DAsRxxrf.js} +2 -2
- package/dist/{dom-to-png-CrAOuxmd.js → dom-to-png-BF_4H_6u.js} +1 -1
- package/dist/{img-D3JvqNF8.js → img-ku4zevVD.js} +1 -1
- package/dist/{index-BSa4GlHG.js → index-BzfnuLnw.js} +1170 -1128
- package/dist/{pdf-DROWzopj.js → pdf-CguiIsUc.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +33 -51
- package/dist/types/vue-data-ui.d.ts +33 -51
- package/dist/useLoading-Bt5Doa8m.js +28 -0
- package/dist/{useNestedProp-uR74_CFG.js → useNestedProp-DorElw91.js} +1 -1
- package/dist/{usePrinter-j3g1L2nh.js → usePrinter-C9qkgv0r.js} +2 -2
- package/dist/{vue-data-ui-BzMRz9Un.js → vue-data-ui-DQef_oFO.js} +63 -63
- package/dist/vue-data-ui.js +13 -13
- package/dist/{vue-ui-3d-bar-BAOGEe-m.js → vue-ui-3d-bar-DPSamIA-.js} +6 -6
- package/dist/{vue-ui-accordion-DzF-SPaZ.js → vue-ui-accordion-DgZK-qDz.js} +3 -3
- package/dist/{vue-ui-age-pyramid-BRdQ44O4.js → vue-ui-age-pyramid-DVeGKvf9.js} +6 -6
- package/dist/{vue-ui-annotator-mjIKrhYa.js → vue-ui-annotator-6ikkK-FK.js} +2 -2
- package/dist/{vue-ui-bullet-CLYmLvSB.js → vue-ui-bullet-Bg4hfFk2.js} +7 -7
- package/dist/{vue-ui-candlestick-BFLmoEEN.js → vue-ui-candlestick-Bi59FGXn.js} +7 -7
- package/dist/{vue-ui-carousel-table-V89TMa5p.js → vue-ui-carousel-table-DitKhrFT.js} +4 -4
- package/dist/{vue-ui-chestnut-C7eNjkFo.js → vue-ui-chestnut-D8wGAZod.js} +6 -6
- package/dist/{vue-ui-chord-BuYDLE7K.js → vue-ui-chord-C-uTVCDP.js} +8 -8
- package/dist/{vue-ui-circle-pack-CCMbsOpk.js → vue-ui-circle-pack-CPy6xcxv.js} +26 -26
- package/dist/{vue-ui-cursor-BrKIImfp.js → vue-ui-cursor-Dd7vUd0q.js} +2 -2
- package/dist/{vue-ui-dashboard-WMKjx3iE.js → vue-ui-dashboard-CKurbu8M.js} +62 -62
- package/dist/{vue-ui-digits-BoYPIuXn.js → vue-ui-digits-DfdZI11G.js} +2 -2
- package/dist/{vue-ui-donut-evolution-DSG8NUG0.js → vue-ui-donut-evolution-CKbLO8yR.js} +8 -8
- package/dist/vue-ui-donut-tECBFvud.js +1532 -0
- package/dist/{vue-ui-dumbbell-BMveoLd_.js → vue-ui-dumbbell-DI5Lj3r_.js} +7 -7
- package/dist/{vue-ui-flow-Dnsik-8f.js → vue-ui-flow-CjU48s9z.js} +7 -7
- package/dist/{vue-ui-funnel-CQ0nHCvy.js → vue-ui-funnel-DM_5vHZ4.js} +6 -6
- package/dist/{vue-ui-galaxy-D5L31IXm.js → vue-ui-galaxy-ocvZgZJx.js} +5 -5
- package/dist/{vue-ui-gauge-BnuDe4Wj.js → vue-ui-gauge-DajNoY-D.js} +6 -6
- package/dist/{vue-ui-gizmo-DYYw-JEs.js → vue-ui-gizmo-DTnzeQbm.js} +3 -3
- package/dist/{vue-ui-heatmap-9KJYiKzE.js → vue-ui-heatmap-CfBS8jQe.js} +7 -7
- package/dist/{vue-ui-history-plot-QOaVWh5L.js → vue-ui-history-plot-BuOPWQoP.js} +7 -7
- package/dist/{vue-ui-kpi-EtTBwHGS.js → vue-ui-kpi-DLGHOIRj.js} +3 -3
- package/dist/{vue-ui-mini-loader-CRnUCpsm.js → vue-ui-mini-loader-CHAHi4c9.js} +2 -2
- package/dist/{vue-ui-molecule-Bfk3Vhbi.js → vue-ui-molecule-R5-oDFeW.js} +5 -5
- package/dist/{vue-ui-mood-radar-BfRkWvgp.js → vue-ui-mood-radar-Ddf2gaES.js} +7 -7
- package/dist/{vue-ui-nested-donuts-Ck9Zm1UU.js → vue-ui-nested-donuts-CksklV83.js} +269 -269
- package/dist/{vue-ui-onion-DF7Z21x-.js → vue-ui-onion-D2n4zUkV.js} +7 -7
- package/dist/{vue-ui-parallel-coordinate-plot-JVogg7k5.js → vue-ui-parallel-coordinate-plot-CNWQqlxf.js} +8 -8
- package/dist/{vue-ui-quadrant-DpFjMZoK.js → vue-ui-quadrant-CxNj2FEx.js} +8 -8
- package/dist/{vue-ui-quick-chart-NfXEFkoL.js → vue-ui-quick-chart-Bm_VmhJR.js} +6 -6
- package/dist/{vue-ui-radar-Dg8UovnR.js → vue-ui-radar-DSYMQJ6K.js} +7 -7
- package/dist/{vue-ui-rating-D3cpdLRt.js → vue-ui-rating-BiQpwXnc.js} +2 -2
- package/dist/{vue-ui-relation-circle-BZTTPLCi.js → vue-ui-relation-circle-Cdxe78Bm.js} +6 -6
- package/dist/{vue-ui-ridgeline-CtY_J3hk.js → vue-ui-ridgeline-DpeM2hRi.js} +8 -8
- package/dist/{vue-ui-rings-BiA-bRgU.js → vue-ui-rings-BenmQHKv.js} +8 -8
- package/dist/{vue-ui-scatter-C3sCChYD.js → vue-ui-scatter-mDMY1H6U.js} +8 -8
- package/dist/{vue-ui-skeleton-DY48gQ96.js → vue-ui-skeleton-Ch_XkFuP.js} +3 -3
- package/dist/{vue-ui-smiley-DopwmgcY.js → vue-ui-smiley-DTig5lTU.js} +2 -2
- package/dist/{vue-ui-spark-trend-DO7P-2x8.js → vue-ui-spark-trend-BkDsp8E0.js} +3 -3
- package/dist/{vue-ui-sparkbar-mqLbTvAg.js → vue-ui-sparkbar-CgqoyBOm.js} +3 -3
- package/dist/{vue-ui-sparkgauge-CdfZYUAZ.js → vue-ui-sparkgauge-B4jR_Y62.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-DAy--kFA.js → vue-ui-sparkhistogram-DfxjglLy.js} +4 -4
- package/dist/{vue-ui-sparkline-KkG0FnmI.js → vue-ui-sparkline-M3QR8xJE.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-LDRannBB.js → vue-ui-sparkstackbar-B2Ls-Mb8.js} +3 -3
- package/dist/{vue-ui-stackbar-Bys4yWs_.js → vue-ui-stackbar-DIHkn6__.js} +9 -9
- package/dist/{vue-ui-strip-plot-DUBqioS2.js → vue-ui-strip-plot-B_ZLbu2D.js} +7 -7
- package/dist/{vue-ui-table-CPWgP-71.js → vue-ui-table-BhymhDOh.js} +3 -3
- package/dist/{vue-ui-table-heatmap-DfrMVDEE.js → vue-ui-table-heatmap-DokRh4dS.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CNC7Lp0t.js → vue-ui-table-sparkline-DxBZGKZJ.js} +4 -4
- package/dist/{vue-ui-thermometer-Bby5nWIi.js → vue-ui-thermometer-e2L6IdF-.js} +6 -6
- package/dist/{vue-ui-timer-ym9etXUy.js → vue-ui-timer-BG2EwK3o.js} +5 -5
- package/dist/{vue-ui-tiremarks-C0V_XedF.js → vue-ui-tiremarks-nzQH7woJ.js} +6 -6
- package/dist/{vue-ui-treemap-B5k0NEO3.js → vue-ui-treemap-CZxyi6fl.js} +8 -8
- package/dist/{vue-ui-vertical-bar-DRmHFEMu.js → vue-ui-vertical-bar-DahdX1Sn.js} +279 -273
- package/dist/{vue-ui-waffle-DrEQsTIO.js → vue-ui-waffle-D399D4UE.js} +8 -8
- package/dist/{vue-ui-wheel-BOTBLBOr.js → vue-ui-wheel-DtcwtHzJ.js} +6 -6
- package/dist/{vue-ui-word-cloud-Btay9XOs.js → vue-ui-word-cloud-CTDceQsf.js} +6 -6
- package/dist/{vue-ui-world-zBvIXrWH.js → vue-ui-world-BjNSbqMZ.js} +6 -6
- package/dist/vue-ui-xy-BkTP-JpK.js +2958 -0
- package/dist/{vue-ui-xy-canvas-CDjYeEkq.js → vue-ui-xy-canvas-BKAowbe0.js} +8 -8
- package/package.json +2 -2
- package/dist/Tooltip-Cq9HywcX.js +0 -149
- package/dist/useMouse-AicQS8Vf.js +0 -13
- package/dist/vue-ui-donut-DJVqqXEb.js +0 -1338
- package/dist/vue-ui-xy-C7uPPKm9.js +0 -3149
|
@@ -0,0 +1,1532 @@
|
|
|
1
|
+
import { defineAsyncComponent as ce, useSlots as sl, computed as y, shallowRef as U, ref as p, onMounted as ul, onBeforeUnmount as nl, toRefs as rl, watch as ge, createElementBlock as r, openBlock as n, normalizeStyle as $, normalizeClass as Xe, createBlock as ae, createCommentVNode as v, renderSlot as w, createElementVNode as h, createVNode as De, unref as u, createSlots as wt, withCtx as A, normalizeProps as he, guardReactiveProps as ye, Fragment as b, renderList as F, mergeProps as kt, toDisplayString as I, withDirectives as xt, createTextVNode as Be, vShow as _t, nextTick as il } from "vue";
|
|
2
|
+
import { u as vl, o as $t, e as Ve, g as dl, c as cl, A as hl, b as yl, v as fl, d as Ct, p as oe, m as At, $ as pl, f as N, X as gl, s as Ce, w as ml, j as bl, N as P, i as V, k as fe, n as x, a0 as Tt, a1 as wl, a2 as kl, t as xl, a as _l, C as Ee, q as $l, r as Cl, x as Al, T as St } from "./index-BzfnuLnw.js";
|
|
3
|
+
import { t as Tl, u as Sl } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Pt } from "./useNestedProp-DorElw91.js";
|
|
5
|
+
import { u as Pl } from "./usePrinter-C9qkgv0r.js";
|
|
6
|
+
import { u as Fl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
|
+
import { u as Ll } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
+
import Il from "./Legend-CYbP3Kfg.js";
|
|
9
|
+
import Ml from "./Title-pVYRzQXY.js";
|
|
10
|
+
import { _ as zl } from "./Shape-DBXkGxKt.js";
|
|
11
|
+
import { u as Ol, B as Nl } from "./useLoading-Bt5Doa8m.js";
|
|
12
|
+
import Yl from "./img-ku4zevVD.js";
|
|
13
|
+
import { _ as Xl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const Dl = ["id"], Bl = ["xmlns", "viewBox"], Vl = ["width", "height"], El = { key: 1 }, Gl = ["id"], Rl = ["stop-color"], ql = ["offset", "stop-color"], Wl = ["offset", "stop-color"], Ul = ["stop-color"], Hl = { key: 2 }, jl = ["id", "cx", "cy"], Jl = ["stop-color", "stop-opacity"], Kl = ["stop-color"], Ql = ["id"], Zl = ["id"], ea = ["id"], ta = ["flood-color"], la = ["id"], aa = ["flood-color"], oa = ["d", "stroke", "filter"], sa = ["d", "stroke", "filter"], ua = ["cx", "cy", "r", "fill", "filter"], na = { key: 6 }, ra = ["stroke", "d"], ia = ["d", "fill", "stroke", "stroke-width", "filter"], va = { key: 0 }, da = ["d", "fill", "stroke", "stroke-width", "filter"], ca = { key: 0 }, ha = ["stroke", "d"], ya = { key: 0 }, fa = ["d", "stroke", "stroke-width", "filter"], pa = { key: 1 }, ga = ["d", "fill", "stroke", "stroke-width", "filter"], ma = ["d", "fill", "stroke", "stroke-width", "filter"], ba = { key: 1 }, wa = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ka = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], xa = { key: 0 }, _a = ["d", "fill", "stroke", "stroke-width"], $a = ["cx", "cy", "r", "stroke"], Ca = ["cx", "cy", "r", "fill"], Aa = ["cx", "cy", "r"], Ta = { key: 0 }, Sa = ["d", "stroke", "fill", "onMouseenter", "onMouseleave", "onClick"], Pa = { key: 1 }, Fa = ["cx", "cy", "r"], La = ["x", "y", "fill", "font-size"], Ia = ["x", "y", "fill", "font-size"], Ma = ["x", "y", "fill", "font-size"], za = ["x", "y", "fill", "font-size"], Oa = ["filter"], Na = { key: 0 }, Ya = ["x", "y"], Xa = { key: 1 }, Da = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], Ba = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], Va = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], Ea = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "innerHTML"], Ga = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], Ra = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "innerHTML"], qa = { key: 2 }, Wa = ["x", "y", "width"], Ua = ["x", "y", "width"], Ha = {
|
|
15
|
+
key: 4,
|
|
16
|
+
class: "vue-data-ui-watermark"
|
|
17
|
+
}, ja = ["onClick"], Ja = ["innerHTML"], Ka = {
|
|
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(Ge, { expose: Ft, emit: Lt }) {
|
|
35
|
+
const It = ce(() => import("./vue-ui-accordion-DgZK-qDz.js")), Mt = ce(() => import("./DataTable-CgL0Rz0x.js")), zt = ce(() => import("./PackageVersion-CAkNkiIG.js")), Ot = ce(() => import("./PenAndPaper-Cx1-5zdD.js")), Nt = ce(() => import("./Tooltip-NwATo4ZJ.js")), Yt = ce(() => import("./UserOptions-DAsRxxrf.js")), { vue_ui_donut: Xt } = vl(), Dt = sl(), k = Ge, me = y({
|
|
36
|
+
get() {
|
|
37
|
+
return !!k.dataset && k.dataset.length;
|
|
38
|
+
},
|
|
39
|
+
set(l) {
|
|
40
|
+
return l;
|
|
41
|
+
}
|
|
42
|
+
}), H = U(null), be = p(null), Ae = p(null), Te = p(null), Re = U(null), qe = U(null), j = U(null), se = U(null), We = U(null), Ue = U(null), He = p(0), je = p(0), Je = p(0), we = y({
|
|
43
|
+
get: () => e.value.style.chart.layout.labels.percentage.fontSize,
|
|
44
|
+
set: (l) => l
|
|
45
|
+
}), J = y({
|
|
46
|
+
get: () => e.value.style.chart.layout.labels.name.fontSize,
|
|
47
|
+
set: (l) => l
|
|
48
|
+
});
|
|
49
|
+
let Se = !1;
|
|
50
|
+
const G = () => {
|
|
51
|
+
!e.value.autoSize || Se || (Se = !0, requestAnimationFrame(() => {
|
|
52
|
+
Se = !1;
|
|
53
|
+
const l = e.value, o = be.value, t = ne.value;
|
|
54
|
+
if (!l.autoSize || !o || !t) return;
|
|
55
|
+
const [a, i, c, m] = t.getAttribute("viewBox").split(" ").map(Number), C = { x: a, y: i, width: c, height: m }, z = [
|
|
56
|
+
{
|
|
57
|
+
selector: ".vue-data-ui-datalabel-value",
|
|
58
|
+
baseSize: l.style.chart.layout.labels.percentage.fontSize,
|
|
59
|
+
minSize: l.style.chart.layout.labels.percentage.minFontSize,
|
|
60
|
+
sizeRef: we
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
selector: ".vue-data-ui-datalabel-name",
|
|
64
|
+
baseSize: l.style.chart.layout.labels.name.fontSize,
|
|
65
|
+
minSize: l.style.chart.layout.labels.name.minFontSize,
|
|
66
|
+
sizeRef: J
|
|
67
|
+
}
|
|
68
|
+
];
|
|
69
|
+
z.map((B) => o.querySelectorAll(B.selector).length).reduce((B, Z) => B + Z, 0) !== 0 && (z.forEach(({ selector: B, baseSize: Z, minSize: Ye, sizeRef: ll }) => {
|
|
70
|
+
o.querySelectorAll(B).forEach((al) => {
|
|
71
|
+
const ol = wl({
|
|
72
|
+
el: al,
|
|
73
|
+
bounds: C,
|
|
74
|
+
currentFontSize: Z,
|
|
75
|
+
minFontSize: Ye,
|
|
76
|
+
attempts: 200,
|
|
77
|
+
padding: 1
|
|
78
|
+
});
|
|
79
|
+
ll.value = ol;
|
|
80
|
+
});
|
|
81
|
+
}), e.value.autoSize && Ae.value && Te.value && kl({
|
|
82
|
+
el: Ae.value,
|
|
83
|
+
container: Te.value
|
|
84
|
+
}));
|
|
85
|
+
}));
|
|
86
|
+
};
|
|
87
|
+
ul(async () => {
|
|
88
|
+
Ke(), requestAnimationFrame(G);
|
|
89
|
+
}), nl(() => {
|
|
90
|
+
j.value && (se.value && j.value.unobserve(se.value), j.value.disconnect());
|
|
91
|
+
});
|
|
92
|
+
const Pe = y(() => !!e.value.debug);
|
|
93
|
+
function Ke() {
|
|
94
|
+
if ($t(k.dataset) ? (Ve({
|
|
95
|
+
componentName: "VueUiDonut",
|
|
96
|
+
type: "dataset",
|
|
97
|
+
debug: Pe.value
|
|
98
|
+
}), me.value = !1, xe.value = !0) : (k.dataset.forEach((l, o) => {
|
|
99
|
+
dl({
|
|
100
|
+
datasetObject: l,
|
|
101
|
+
requiredAttributes: ["name", "values"]
|
|
102
|
+
}).forEach((t) => {
|
|
103
|
+
me.value = !1, xe.value = !0, Ve({
|
|
104
|
+
componentName: "VueUiDonut",
|
|
105
|
+
type: "datasetSerieAttribute",
|
|
106
|
+
property: t,
|
|
107
|
+
index: o,
|
|
108
|
+
debug: Pe.value
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
}), k.dataset.forEach((l, o) => {
|
|
112
|
+
(!l.name || l.name === "") && Ve({
|
|
113
|
+
componentName: "VueUiDonut",
|
|
114
|
+
type: "datasetAttributeEmpty",
|
|
115
|
+
property: "name",
|
|
116
|
+
index: o,
|
|
117
|
+
debug: Pe.value
|
|
118
|
+
});
|
|
119
|
+
})), $t(k.dataset) || (xe.value = e.value.loading), e.value.responsive) {
|
|
120
|
+
const l = Tl(() => {
|
|
121
|
+
const { width: o, height: t } = Sl({
|
|
122
|
+
chart: H.value,
|
|
123
|
+
title: e.value.style.chart.title.text ? Re.value : null,
|
|
124
|
+
legend: e.value.style.chart.legend.show ? qe.value : null,
|
|
125
|
+
source: We.value,
|
|
126
|
+
noTitle: Ue.value,
|
|
127
|
+
padding: e.value.autoSize ? void 0 : lt.value
|
|
128
|
+
});
|
|
129
|
+
requestAnimationFrame(() => {
|
|
130
|
+
s.value.width = o, s.value.height = t, G();
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
j.value && (se.value && j.value.unobserve(se.value), j.value.disconnect()), j.value = new ResizeObserver(l), se.value = H.value.parentNode, j.value.observe(se.value);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
const g = p(cl()), Bt = p(null), Fe = p(!1), Le = p(""), Y = p(null), Qe = p(0);
|
|
137
|
+
function Ie() {
|
|
138
|
+
const l = Pt({
|
|
139
|
+
userConfig: k.config,
|
|
140
|
+
defaultConfig: Xt
|
|
141
|
+
});
|
|
142
|
+
let o = {};
|
|
143
|
+
return l.theme ? o = {
|
|
144
|
+
...Pt({
|
|
145
|
+
userConfig: _l.vue_ui_donut[l.theme] || k.config,
|
|
146
|
+
defaultConfig: l
|
|
147
|
+
}),
|
|
148
|
+
customPalette: xl[l.theme] || oe
|
|
149
|
+
} : o = l, k.config && Ee(k.config, "events.datapointEnter") ? o.events.datapointEnter = k.config.events.datapointEnter : o.events.datapointEnter = null, k.config && Ee(k.config, "events.datapointLeave") ? o.events.datapointLeave = k.config.events.datapointLeave : o.events.datapointLeave = null, k.config && Ee(k.config, "events.datapointClick") ? o.events.datapointClick = k.config.events.datapointClick : o.events.datapointClick = null, o;
|
|
150
|
+
}
|
|
151
|
+
const e = p(Ie()), { loading: ke, FINAL_DATASET: ue, manualLoading: xe, skeletonDataset: Vt } = Ol({
|
|
152
|
+
...rl(k),
|
|
153
|
+
FINAL_CONFIG: e,
|
|
154
|
+
prepareConfig: Ie,
|
|
155
|
+
skeletonDataset: [
|
|
156
|
+
{
|
|
157
|
+
name: "",
|
|
158
|
+
values: [3],
|
|
159
|
+
color: "#BABABA"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: "",
|
|
163
|
+
values: [2],
|
|
164
|
+
color: "#AAAAAA"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: "",
|
|
168
|
+
values: [1],
|
|
169
|
+
color: "#CACACA"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
skeletonConfig: hl({
|
|
173
|
+
defaultConfig: e.value,
|
|
174
|
+
userConfig: {
|
|
175
|
+
useCssAnimation: !1,
|
|
176
|
+
startAnimation: {
|
|
177
|
+
show: !1
|
|
178
|
+
},
|
|
179
|
+
userOptions: { show: !1 },
|
|
180
|
+
style: {
|
|
181
|
+
chart: {
|
|
182
|
+
backgroundColor: "#999999",
|
|
183
|
+
layout: {
|
|
184
|
+
labels: {
|
|
185
|
+
dataLabels: { show: !1 },
|
|
186
|
+
hollow: {
|
|
187
|
+
average: { show: !1 },
|
|
188
|
+
total: { show: !1 }
|
|
189
|
+
},
|
|
190
|
+
value: { show: !1 }
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
legend: {
|
|
194
|
+
backgroundColor: "#999999",
|
|
195
|
+
showValue: !1,
|
|
196
|
+
showPercentage: !1
|
|
197
|
+
},
|
|
198
|
+
title: {
|
|
199
|
+
color: "#1A1A1A",
|
|
200
|
+
subtitle: {
|
|
201
|
+
color: "#5A5A5A"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
})
|
|
208
|
+
}), T = p(!0), R = U([]);
|
|
209
|
+
function Et(l, o = 1e3, t = 50) {
|
|
210
|
+
return new Promise((a) => {
|
|
211
|
+
const i = l.length;
|
|
212
|
+
R.value = Array(i).fill(0);
|
|
213
|
+
let c = 0;
|
|
214
|
+
l.forEach((m, C) => {
|
|
215
|
+
setTimeout(() => {
|
|
216
|
+
const z = performance.now();
|
|
217
|
+
function O(B) {
|
|
218
|
+
const Z = Math.min((B - z) / o, 1), Ye = St(Z);
|
|
219
|
+
R.value[C] = m * Ye, R.value = [...R.value], Z < 1 ? (requestAnimationFrame(O), requestAnimationFrame(G)) : (R.value[C] = m, R.value = [...R.value], c += 1, c === i && a(), requestAnimationFrame(G));
|
|
220
|
+
}
|
|
221
|
+
requestAnimationFrame(O);
|
|
222
|
+
}, C * t);
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
const Ze = p(!1);
|
|
227
|
+
ge(
|
|
228
|
+
() => ke.value,
|
|
229
|
+
async (l) => {
|
|
230
|
+
if (l || Ze.value) return;
|
|
231
|
+
const o = ue.value === Vt, t = e.value.startAnimation?.show;
|
|
232
|
+
if (!o && t) {
|
|
233
|
+
Ze.value = !0;
|
|
234
|
+
const a = ue.value.map(
|
|
235
|
+
(i) => i.values.reduce((c, m) => c + m, 0)
|
|
236
|
+
);
|
|
237
|
+
await Et(
|
|
238
|
+
a,
|
|
239
|
+
e.value.startAnimation.durationMs,
|
|
240
|
+
e.value.startAnimation.staggerMs
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
T.value = !1;
|
|
244
|
+
},
|
|
245
|
+
{ immediate: !0 }
|
|
246
|
+
);
|
|
247
|
+
const { userOptionsVisible: Me, setUserOptionsVisibility: et, keepUserOptionState: tt } = Fl({ config: e.value }), { svgRef: ne } = Ll({ config: e.value.style.chart.title });
|
|
248
|
+
function Gt() {
|
|
249
|
+
et(!0);
|
|
250
|
+
}
|
|
251
|
+
function Rt() {
|
|
252
|
+
et(!1);
|
|
253
|
+
}
|
|
254
|
+
ge(() => k.config, (l) => {
|
|
255
|
+
ke.value || (e.value = Ie()), Me.value = !e.value.userOptions.showOnChartHover, Ke(), He.value += 1, je.value += 1, Je.value += 1, f.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, f.value.showTable = e.value.table.show, f.value.showTooltip = e.value.style.chart.tooltip.show, s.value.height = e.value.style.chart.height, s.value.width = e.value.style.chart.width;
|
|
256
|
+
}, { deep: !0 });
|
|
257
|
+
const lt = y(() => {
|
|
258
|
+
const { top: l, right: o, bottom: t, left: a } = e.value.style.chart.padding;
|
|
259
|
+
return {
|
|
260
|
+
css: `padding:${l}px ${o}px ${t}px ${a}px`,
|
|
261
|
+
top: l,
|
|
262
|
+
right: o,
|
|
263
|
+
bottom: t,
|
|
264
|
+
left: a
|
|
265
|
+
};
|
|
266
|
+
}), { isPrinting: at, isImaging: ot, generatePdf: st, generateImage: ut } = Pl({
|
|
267
|
+
elementId: `donut__${g.value}`,
|
|
268
|
+
fileName: e.value.style.chart.title.text || "vue-ui-donut",
|
|
269
|
+
options: e.value.userOptions.print
|
|
270
|
+
}), qt = y(() => e.value.userOptions.show && !e.value.style.chart.title.text), nt = y(() => yl(e.value.customPalette)), f = p({
|
|
271
|
+
dataLabels: {
|
|
272
|
+
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
273
|
+
},
|
|
274
|
+
showTable: e.value.table.show,
|
|
275
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
276
|
+
});
|
|
277
|
+
ge(e, () => {
|
|
278
|
+
f.value = {
|
|
279
|
+
dataLabels: {
|
|
280
|
+
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
281
|
+
},
|
|
282
|
+
showTable: e.value.table.show,
|
|
283
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
284
|
+
};
|
|
285
|
+
}, { immediate: !0 });
|
|
286
|
+
const s = p({
|
|
287
|
+
height: e.value.style.chart.height,
|
|
288
|
+
width: e.value.style.chart.width
|
|
289
|
+
}), ee = y(() => {
|
|
290
|
+
if (e.value.pie)
|
|
291
|
+
return _.value;
|
|
292
|
+
const l = e.value.style.chart.layout.donut.strokeWidth / 512, o = Math.min(s.value.width, s.value.height) * l, t = o > _.value ? _.value : o;
|
|
293
|
+
return Math.max(t, 12 * (1 + l));
|
|
294
|
+
}), rt = Lt, q = y(() => ue.value.map((l, o) => ({
|
|
295
|
+
name: l.name,
|
|
296
|
+
color: Ct(l.color) || nt.value[o] || oe[o] || oe[o % oe.length],
|
|
297
|
+
value: fl(l.values.reduce((t, a) => t + a, 0)),
|
|
298
|
+
absoluteValues: l.values,
|
|
299
|
+
comment: l.comment || "",
|
|
300
|
+
patternIndex: o,
|
|
301
|
+
seriesIndex: o,
|
|
302
|
+
ghost: !1,
|
|
303
|
+
pattern: `pattern_${g.value}_${o}`
|
|
304
|
+
})));
|
|
305
|
+
ge(() => k.dataset, (l) => {
|
|
306
|
+
Array.isArray(l) && l.length > 0 && (xe.value = !1);
|
|
307
|
+
}, { immediate: !0 });
|
|
308
|
+
const M = U(q.value);
|
|
309
|
+
ge(() => q.value, (l) => {
|
|
310
|
+
M.value = l, requestAnimationFrame(G);
|
|
311
|
+
});
|
|
312
|
+
function Wt() {
|
|
313
|
+
return q.value.map((l) => ({
|
|
314
|
+
name: l.name,
|
|
315
|
+
color: l.color,
|
|
316
|
+
value: l.value
|
|
317
|
+
}));
|
|
318
|
+
}
|
|
319
|
+
const E = p([]), te = p(!1);
|
|
320
|
+
function it({ from: l, to: o, duration: t, onUpdate: a, onDone: i, easing: c = St }) {
|
|
321
|
+
const m = performance.now();
|
|
322
|
+
function C(z) {
|
|
323
|
+
const O = Math.min((z - m) / t, 1), B = c(O), Z = l + (o - l) * B;
|
|
324
|
+
a(Z, O), O < 1 ? requestAnimationFrame(C) : (a(o, 1), i && i());
|
|
325
|
+
}
|
|
326
|
+
requestAnimationFrame(C);
|
|
327
|
+
}
|
|
328
|
+
function vt(l) {
|
|
329
|
+
const o = q.value.find((i, c) => c === l);
|
|
330
|
+
let a = M.value.find((i, c) => c === l).value;
|
|
331
|
+
if (E.value.includes(l)) {
|
|
332
|
+
let c = function() {
|
|
333
|
+
M.value = M.value.map(
|
|
334
|
+
(C, z) => l === z ? { ...C, value: i } : C
|
|
335
|
+
);
|
|
336
|
+
}, m = function() {
|
|
337
|
+
te.value = !0, it({
|
|
338
|
+
from: a,
|
|
339
|
+
to: i,
|
|
340
|
+
duration: e.value.serieToggleAnimation.durationMs,
|
|
341
|
+
onUpdate: (C, z) => {
|
|
342
|
+
M.value = M.value.map(
|
|
343
|
+
(O, B) => l === B ? { ...O, value: C } : O
|
|
344
|
+
), requestAnimationFrame(G);
|
|
345
|
+
},
|
|
346
|
+
onDone: () => {
|
|
347
|
+
c(), te.value = !1;
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
};
|
|
351
|
+
E.value = E.value.filter((C) => C !== l);
|
|
352
|
+
const i = o.value;
|
|
353
|
+
e.value.serieToggleAnimation.show && e.value.type === "classic" ? m() : (c(), requestAnimationFrame(G));
|
|
354
|
+
} else if (E.value.length < q.value.length - 1) {
|
|
355
|
+
let i = function() {
|
|
356
|
+
E.value.push(l), M.value = M.value.map(
|
|
357
|
+
(m, C) => l === C ? { ...m, value: 0 } : m
|
|
358
|
+
);
|
|
359
|
+
}, c = function() {
|
|
360
|
+
te.value = !0, it({
|
|
361
|
+
from: a,
|
|
362
|
+
to: 0,
|
|
363
|
+
duration: e.value.serieToggleAnimation.durationMs,
|
|
364
|
+
onUpdate: (m, C) => {
|
|
365
|
+
M.value = M.value.map(
|
|
366
|
+
(z, O) => l === O ? { ...z, value: m } : z
|
|
367
|
+
), requestAnimationFrame(G);
|
|
368
|
+
},
|
|
369
|
+
onDone: () => {
|
|
370
|
+
i(), requestAnimationFrame(G), te.value = !1;
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
};
|
|
374
|
+
e.value.serieToggleAnimation.show && e.value.type === "classic" ? c() : i();
|
|
375
|
+
}
|
|
376
|
+
rt("selectLegend", W.value.map((i) => ({
|
|
377
|
+
name: i.name,
|
|
378
|
+
color: i.color,
|
|
379
|
+
value: i.value
|
|
380
|
+
})));
|
|
381
|
+
}
|
|
382
|
+
const Ut = y(() => ue.value.reduce((l, o) => l + o.values.reduce((t, a) => t + a, 0), 0)), W = y(() => {
|
|
383
|
+
if (T.value && !ke.value) {
|
|
384
|
+
const l = R.value.map((t, a) => ({
|
|
385
|
+
...q.value[a],
|
|
386
|
+
value: t,
|
|
387
|
+
color: q.value[a].color,
|
|
388
|
+
ghost: !1
|
|
389
|
+
})), o = Ut.value - R.value.reduce((t, a) => t + a, 0);
|
|
390
|
+
return o > 0 && l.push({
|
|
391
|
+
name: "__ghost__",
|
|
392
|
+
value: o,
|
|
393
|
+
color: "transparent",
|
|
394
|
+
ghost: !0
|
|
395
|
+
}), l;
|
|
396
|
+
} else
|
|
397
|
+
return M.value.forEach((l, o) => {
|
|
398
|
+
if ([null, void 0].includes(l.values))
|
|
399
|
+
return {
|
|
400
|
+
...l,
|
|
401
|
+
values: []
|
|
402
|
+
};
|
|
403
|
+
}), M.value.map((l, o) => ({
|
|
404
|
+
...l,
|
|
405
|
+
seriesIndex: o
|
|
406
|
+
})).filter((l, o) => !E.value.includes(o));
|
|
407
|
+
}), dt = y(() => ue.value.map((l, o) => ({
|
|
408
|
+
name: l.name,
|
|
409
|
+
color: Ct(l.color) || nt.value[o] || oe[o] || oe[o % oe.length],
|
|
410
|
+
value: (l.values || []).reduce((t, a) => t + a, 0),
|
|
411
|
+
shape: "circle",
|
|
412
|
+
patternIndex: o
|
|
413
|
+
})).map((l, o) => ({
|
|
414
|
+
...l,
|
|
415
|
+
proportion: l.value / ue.value.map((t) => (t.values || []).reduce((a, i) => a + i, 0)).reduce((t, a) => t + a, 0),
|
|
416
|
+
opacity: E.value.includes(o) ? 0.5 : 1,
|
|
417
|
+
segregate: () => !te.value && vt(o),
|
|
418
|
+
isSegregated: E.value.includes(o)
|
|
419
|
+
}))), Ht = y(() => ({
|
|
420
|
+
cy: "donut-div-legend",
|
|
421
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
422
|
+
color: e.value.style.chart.legend.color,
|
|
423
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
424
|
+
paddingBottom: 12,
|
|
425
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
426
|
+
})), _ = y(() => {
|
|
427
|
+
const l = Math.min(s.value.width / 3, s.value.height / 3);
|
|
428
|
+
return l < 12 ? 12 : l;
|
|
429
|
+
}), S = y(() => At({ series: W.value }, s.value.width / 2, s.value.height / 2, _.value, _.value, 1.99999, 2, 1, 360, 105.25, ee.value)), jt = y(() => Math.abs(W.value.map((l) => l.value).reduce((l, o) => l + o, 0)) > 0), Jt = y(() => At({
|
|
430
|
+
series: [
|
|
431
|
+
{
|
|
432
|
+
value: 1,
|
|
433
|
+
color: e.value.style.chart.layout.donut.emptyFill,
|
|
434
|
+
name: "_",
|
|
435
|
+
seriesIndex: 0,
|
|
436
|
+
patternIndex: -1,
|
|
437
|
+
ghost: !1,
|
|
438
|
+
absoluteValues: [1]
|
|
439
|
+
}
|
|
440
|
+
]
|
|
441
|
+
}, s.value.width / 2, s.value.height / 2, _.value, _.value, 1.99999, 2, 1, 360, 105.25, ee.value)), X = y(() => S.value.filter((l) => !l.ghost)), d = y(() => {
|
|
442
|
+
const l = Math.max(...W.value.map((t) => t.value)), o = W.value.map((t) => t.value / l);
|
|
443
|
+
return pl({
|
|
444
|
+
series: o,
|
|
445
|
+
center: {
|
|
446
|
+
x: s.value.width / 2,
|
|
447
|
+
y: s.value.height / 2
|
|
448
|
+
},
|
|
449
|
+
maxRadius: Math.min(s.value.width, s.value.height) / 3,
|
|
450
|
+
hasGhost: T.value
|
|
451
|
+
});
|
|
452
|
+
});
|
|
453
|
+
function re(l) {
|
|
454
|
+
return l.x > s.value.width / 2 + 6 ? "start" : l.x < s.value.width / 2 - 6 ? "end" : "middle";
|
|
455
|
+
}
|
|
456
|
+
function Kt(l) {
|
|
457
|
+
return l.middlePoint.y > s.value.height / 2 ? P({ initX: l.middlePoint.x, initY: l.middlePoint.y, offset: 100, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y : P({ initX: l.middlePoint.x, initY: l.middlePoint.y, offset: 0, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y - 100;
|
|
458
|
+
}
|
|
459
|
+
function D(l) {
|
|
460
|
+
return l.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
|
|
461
|
+
}
|
|
462
|
+
function ze(l, o) {
|
|
463
|
+
const t = l.value / Qt(o);
|
|
464
|
+
return isNaN(t) ? 0 : V(
|
|
465
|
+
e.value.style.chart.layout.labels.percentage.formatter,
|
|
466
|
+
t * 100,
|
|
467
|
+
N({
|
|
468
|
+
v: t * 100,
|
|
469
|
+
s: "%",
|
|
470
|
+
r: e.value.style.chart.layout.labels.percentage.rounding
|
|
471
|
+
}),
|
|
472
|
+
{ datapoint: l }
|
|
473
|
+
);
|
|
474
|
+
}
|
|
475
|
+
function Qt(l) {
|
|
476
|
+
return [...l].map((o) => o.value).reduce((o, t) => o + t, 0);
|
|
477
|
+
}
|
|
478
|
+
const L = y(() => W.value.map((l) => l.value).reduce((l, o) => l + o, 0)), ct = y(() => L.value / W.value.length), ht = y(() => (l) => te.value ? l.proportion * 100 : l.value / L.value * 100), Oe = p(null), pe = p(!1);
|
|
479
|
+
function ie({ datapoint: l, seriesIndex: o }) {
|
|
480
|
+
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: o }), Fe.value = !1, Y.value = null;
|
|
481
|
+
}
|
|
482
|
+
function ve({ datapoint: l, relativeIndex: o, seriesIndex: t, show: a = !1 }) {
|
|
483
|
+
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: l, seriesIndex: t }), Oe.value = { datapoint: l, seriesIndex: t, config: e.value, series: q.value }, Fe.value = a, Y.value = o;
|
|
484
|
+
let i = "";
|
|
485
|
+
const c = e.value.style.chart.tooltip.customFormat;
|
|
486
|
+
if (pe.value = !1, Al(c))
|
|
487
|
+
try {
|
|
488
|
+
const m = c({
|
|
489
|
+
seriesIndex: t,
|
|
490
|
+
datapoint: l,
|
|
491
|
+
series: q.value,
|
|
492
|
+
config: e.value
|
|
493
|
+
});
|
|
494
|
+
typeof m == "string" && (Le.value = m, pe.value = !0);
|
|
495
|
+
} catch {
|
|
496
|
+
console.warn("Custom format cannot be applied."), pe.value = !1;
|
|
497
|
+
}
|
|
498
|
+
if (!pe.value) {
|
|
499
|
+
if (i += `<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>`, i += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${l.color}"/>${Dt.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${g.value}_${t})"/>` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (i += `<b>${V(
|
|
500
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
501
|
+
l.value,
|
|
502
|
+
N({
|
|
503
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
504
|
+
v: l.value,
|
|
505
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
506
|
+
r: e.value.style.chart.tooltip.roundingValue
|
|
507
|
+
}),
|
|
508
|
+
{
|
|
509
|
+
datapoint: l,
|
|
510
|
+
relativeIndex: o,
|
|
511
|
+
seriesIndex: t
|
|
512
|
+
}
|
|
513
|
+
)}</b>`), e.value.style.chart.tooltip.showPercentage) {
|
|
514
|
+
const m = V(
|
|
515
|
+
e.value.style.chart.layout.labels.percentage.formatter,
|
|
516
|
+
l.proportion * 100,
|
|
517
|
+
N({
|
|
518
|
+
v: l.proportion * 100,
|
|
519
|
+
s: "%",
|
|
520
|
+
r: e.value.style.chart.tooltip.roundingPercentage
|
|
521
|
+
}),
|
|
522
|
+
{
|
|
523
|
+
datapoint: l,
|
|
524
|
+
relativeIndex: o,
|
|
525
|
+
seriesIndex: t
|
|
526
|
+
}
|
|
527
|
+
);
|
|
528
|
+
e.value.style.chart.tooltip.showValue ? i += `<span>(${m})</span></div>` : i += `<b>${m}</b></div>`;
|
|
529
|
+
}
|
|
530
|
+
e.value.style.chart.comments.showInTooltip && l.comment && (i += `<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>`), Le.value = `<div>${i}</div>`;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
function le(l) {
|
|
534
|
+
return e.value.useBlurOnHover && ![null, void 0].includes(Y.value) && Y.value !== l ? `url(#blur_${g.value})` : "";
|
|
535
|
+
}
|
|
536
|
+
const K = y(() => {
|
|
537
|
+
const l = W.value.map((t) => ({
|
|
538
|
+
name: t.name,
|
|
539
|
+
color: t.color
|
|
540
|
+
})), o = W.value.map((t) => t.value);
|
|
541
|
+
return { head: l, body: o };
|
|
542
|
+
});
|
|
543
|
+
function yt(l = null) {
|
|
544
|
+
il(() => {
|
|
545
|
+
const o = K.value.head.map((i, c) => [[
|
|
546
|
+
i.name
|
|
547
|
+
], [K.value.body[c]], [isNaN(K.value.body[c] / L.value) ? "-" : K.value.body[c] / L.value * 100]]), t = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(o), a = $l(t);
|
|
548
|
+
l ? l(a) : Cl({ csvContent: a, title: e.value.style.chart.title.text || "vue-ui-donut" });
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
const _e = y(() => {
|
|
552
|
+
const l = [
|
|
553
|
+
' <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>',
|
|
554
|
+
N({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: L.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
555
|
+
"100%"
|
|
556
|
+
], o = K.value.head.map((i, c) => [
|
|
557
|
+
{
|
|
558
|
+
color: i.color,
|
|
559
|
+
name: i.name || "-"
|
|
560
|
+
},
|
|
561
|
+
K.value.body[c],
|
|
562
|
+
isNaN(K.value.body[c] / L.value) ? "-" : (K.value.body[c] / L.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
|
|
563
|
+
]), t = {
|
|
564
|
+
th: {
|
|
565
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
566
|
+
color: e.value.table.th.color,
|
|
567
|
+
outline: e.value.table.th.outline
|
|
568
|
+
},
|
|
569
|
+
td: {
|
|
570
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
571
|
+
color: e.value.table.td.color,
|
|
572
|
+
outline: e.value.table.td.outline
|
|
573
|
+
},
|
|
574
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
575
|
+
};
|
|
576
|
+
return {
|
|
577
|
+
colNames: [
|
|
578
|
+
e.value.table.columnNames.series,
|
|
579
|
+
e.value.table.columnNames.value,
|
|
580
|
+
e.value.table.columnNames.percentage
|
|
581
|
+
],
|
|
582
|
+
head: l,
|
|
583
|
+
body: o,
|
|
584
|
+
config: t
|
|
585
|
+
};
|
|
586
|
+
}), de = p(!1);
|
|
587
|
+
function ft(l) {
|
|
588
|
+
de.value = l, Qe.value += 1;
|
|
589
|
+
}
|
|
590
|
+
const pt = y(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
|
|
591
|
+
function Zt(l) {
|
|
592
|
+
return l.toFixed(e.value.style.chart.legend.roundingPercentage).split("").map((o) => "-").join("");
|
|
593
|
+
}
|
|
594
|
+
function Q(l, o) {
|
|
595
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: l.seriesIndex }), rt("selectDatapoint", { datapoint: l, index: o });
|
|
596
|
+
}
|
|
597
|
+
function gt() {
|
|
598
|
+
f.value.showTable = !f.value.showTable;
|
|
599
|
+
}
|
|
600
|
+
function mt() {
|
|
601
|
+
f.value.dataLabels.show = !f.value.dataLabels.show;
|
|
602
|
+
}
|
|
603
|
+
function bt() {
|
|
604
|
+
f.value.showTooltip = !f.value.showTooltip;
|
|
605
|
+
}
|
|
606
|
+
const $e = p(!1);
|
|
607
|
+
function Ne() {
|
|
608
|
+
$e.value = !$e.value;
|
|
609
|
+
}
|
|
610
|
+
async function el({ scale: l = 2 } = {}) {
|
|
611
|
+
if (!H.value) return;
|
|
612
|
+
const { width: o, height: t } = H.value.getBoundingClientRect(), a = o / t, { imageUri: i, base64: c } = await Yl({ domElement: H.value, base64: !0, img: !0, scale: l });
|
|
613
|
+
return {
|
|
614
|
+
imageUri: i,
|
|
615
|
+
base64: c,
|
|
616
|
+
title: e.value.style.chart.title.text,
|
|
617
|
+
width: o,
|
|
618
|
+
height: t,
|
|
619
|
+
aspectRatio: a
|
|
620
|
+
};
|
|
621
|
+
}
|
|
622
|
+
function tl() {
|
|
623
|
+
if (!be.value) return;
|
|
624
|
+
const { x: l, y: o, width: t, height: a } = be.value.getBBox();
|
|
625
|
+
ne.value && ne.value.setAttribute("viewBox", `${l} ${o} ${t + Math.min(0, l)} ${a + Math.min(0, o)}`);
|
|
626
|
+
}
|
|
627
|
+
return Ft({
|
|
628
|
+
autoSize: tl,
|
|
629
|
+
getData: Wt,
|
|
630
|
+
getImage: el,
|
|
631
|
+
generatePdf: st,
|
|
632
|
+
generateCsv: yt,
|
|
633
|
+
generateImage: ut,
|
|
634
|
+
toggleTable: gt,
|
|
635
|
+
toggleLabels: mt,
|
|
636
|
+
toggleTooltip: bt,
|
|
637
|
+
toggleAnnotator: Ne,
|
|
638
|
+
toggleFullscreen: ft
|
|
639
|
+
}), (l, o) => (n(), r("div", {
|
|
640
|
+
ref_key: "donutChart",
|
|
641
|
+
ref: H,
|
|
642
|
+
class: Xe(`vue-ui-donut ${de.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
643
|
+
style: $(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height:100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
644
|
+
id: `donut__${g.value}`,
|
|
645
|
+
onMouseenter: Gt,
|
|
646
|
+
onMouseleave: Rt
|
|
647
|
+
}, [
|
|
648
|
+
e.value.userOptions.buttons.annotator && u(ne) ? (n(), ae(u(Ot), {
|
|
649
|
+
key: 0,
|
|
650
|
+
color: e.value.style.chart.color,
|
|
651
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
652
|
+
active: $e.value,
|
|
653
|
+
svgRef: u(ne),
|
|
654
|
+
onClose: Ne
|
|
655
|
+
}, null, 8, ["color", "backgroundColor", "active", "svgRef"])) : v("", !0),
|
|
656
|
+
w(l.$slots, "userConfig", {}, void 0, !0),
|
|
657
|
+
qt.value ? (n(), r("div", {
|
|
658
|
+
key: 1,
|
|
659
|
+
ref_key: "noTitle",
|
|
660
|
+
ref: Ue,
|
|
661
|
+
class: "vue-data-ui-no-title-space",
|
|
662
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
663
|
+
}, null, 512)) : v("", !0),
|
|
664
|
+
e.value.style.chart.title.text ? (n(), r("div", {
|
|
665
|
+
key: 2,
|
|
666
|
+
ref_key: "chartTitle",
|
|
667
|
+
ref: Re,
|
|
668
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
669
|
+
}, [
|
|
670
|
+
(n(), ae(Ml, {
|
|
671
|
+
key: `title_${He.value}`,
|
|
672
|
+
config: {
|
|
673
|
+
title: {
|
|
674
|
+
cy: "donut-div-title",
|
|
675
|
+
...e.value.style.chart.title
|
|
676
|
+
},
|
|
677
|
+
subtitle: {
|
|
678
|
+
cy: "donut-div-subtitle",
|
|
679
|
+
...e.value.style.chart.title.subtitle
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}, null, 8, ["config"]))
|
|
683
|
+
], 512)) : v("", !0),
|
|
684
|
+
e.value.userOptions.show && me.value && (u(tt) || u(Me)) ? (n(), ae(u(Yt), {
|
|
685
|
+
ref_key: "details",
|
|
686
|
+
ref: Bt,
|
|
687
|
+
key: `user_option_${Qe.value}`,
|
|
688
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
689
|
+
color: e.value.style.chart.color,
|
|
690
|
+
isPrinting: u(at),
|
|
691
|
+
isImaging: u(ot),
|
|
692
|
+
uid: g.value,
|
|
693
|
+
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
694
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
695
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
696
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
697
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
698
|
+
hasLabel: e.value.userOptions.buttons.labels,
|
|
699
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
700
|
+
isFullscreen: de.value,
|
|
701
|
+
chartElement: H.value,
|
|
702
|
+
position: e.value.userOptions.position,
|
|
703
|
+
callbacks: e.value.userOptions.callbacks,
|
|
704
|
+
isTooltip: f.value.showTooltip,
|
|
705
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
706
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
707
|
+
isAnnotation: $e.value,
|
|
708
|
+
printScale: e.value.userOptions.print.scale,
|
|
709
|
+
onToggleFullscreen: ft,
|
|
710
|
+
onGeneratePdf: u(st),
|
|
711
|
+
onGenerateCsv: yt,
|
|
712
|
+
onGenerateImage: u(ut),
|
|
713
|
+
onToggleTable: gt,
|
|
714
|
+
onToggleLabels: mt,
|
|
715
|
+
onToggleTooltip: bt,
|
|
716
|
+
onToggleAnnotator: Ne,
|
|
717
|
+
style: $({
|
|
718
|
+
visibility: u(tt) ? u(Me) ? "visible" : "hidden" : "visible"
|
|
719
|
+
})
|
|
720
|
+
}, wt({ _: 2 }, [
|
|
721
|
+
l.$slots.menuIcon ? {
|
|
722
|
+
name: "menuIcon",
|
|
723
|
+
fn: A(({ isOpen: t, color: a }) => [
|
|
724
|
+
w(l.$slots, "menuIcon", he(ye({ isOpen: t, color: a })), void 0, !0)
|
|
725
|
+
]),
|
|
726
|
+
key: "0"
|
|
727
|
+
} : void 0,
|
|
728
|
+
l.$slots.optionTooltip ? {
|
|
729
|
+
name: "optionTooltip",
|
|
730
|
+
fn: A(() => [
|
|
731
|
+
w(l.$slots, "optionTooltip", {}, void 0, !0)
|
|
732
|
+
]),
|
|
733
|
+
key: "1"
|
|
734
|
+
} : void 0,
|
|
735
|
+
l.$slots.optionPdf ? {
|
|
736
|
+
name: "optionPdf",
|
|
737
|
+
fn: A(() => [
|
|
738
|
+
w(l.$slots, "optionPdf", {}, void 0, !0)
|
|
739
|
+
]),
|
|
740
|
+
key: "2"
|
|
741
|
+
} : void 0,
|
|
742
|
+
l.$slots.optionCsv ? {
|
|
743
|
+
name: "optionCsv",
|
|
744
|
+
fn: A(() => [
|
|
745
|
+
w(l.$slots, "optionCsv", {}, void 0, !0)
|
|
746
|
+
]),
|
|
747
|
+
key: "3"
|
|
748
|
+
} : void 0,
|
|
749
|
+
l.$slots.optionImg ? {
|
|
750
|
+
name: "optionImg",
|
|
751
|
+
fn: A(() => [
|
|
752
|
+
w(l.$slots, "optionImg", {}, void 0, !0)
|
|
753
|
+
]),
|
|
754
|
+
key: "4"
|
|
755
|
+
} : void 0,
|
|
756
|
+
l.$slots.optionTable ? {
|
|
757
|
+
name: "optionTable",
|
|
758
|
+
fn: A(() => [
|
|
759
|
+
w(l.$slots, "optionTable", {}, void 0, !0)
|
|
760
|
+
]),
|
|
761
|
+
key: "5"
|
|
762
|
+
} : void 0,
|
|
763
|
+
l.$slots.optionLabels ? {
|
|
764
|
+
name: "optionLabels",
|
|
765
|
+
fn: A(() => [
|
|
766
|
+
w(l.$slots, "optionLabels", {}, void 0, !0)
|
|
767
|
+
]),
|
|
768
|
+
key: "6"
|
|
769
|
+
} : void 0,
|
|
770
|
+
l.$slots.optionFullscreen ? {
|
|
771
|
+
name: "optionFullscreen",
|
|
772
|
+
fn: A(({ toggleFullscreen: t, isFullscreen: a }) => [
|
|
773
|
+
w(l.$slots, "optionFullscreen", he(ye({ toggleFullscreen: t, isFullscreen: a })), void 0, !0)
|
|
774
|
+
]),
|
|
775
|
+
key: "7"
|
|
776
|
+
} : void 0,
|
|
777
|
+
l.$slots.optionAnnotator ? {
|
|
778
|
+
name: "optionAnnotator",
|
|
779
|
+
fn: A(({ toggleAnnotator: t, isAnnotator: a }) => [
|
|
780
|
+
w(l.$slots, "optionAnnotator", he(ye({ toggleAnnotator: t, isAnnotator: a })), void 0, !0)
|
|
781
|
+
]),
|
|
782
|
+
key: "8"
|
|
783
|
+
} : void 0
|
|
784
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "callbacks", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : v("", !0),
|
|
785
|
+
(n(), r("svg", {
|
|
786
|
+
ref_key: "svgRef",
|
|
787
|
+
ref: ne,
|
|
788
|
+
xmlns: u(gl),
|
|
789
|
+
class: Xe({ "vue-data-ui-fullscreen--on": de.value, "vue-data-ui-fulscreen--off": !de.value, "vue-data-ui-svg": !0 }),
|
|
790
|
+
viewBox: `0 0 ${s.value.width <= 0 ? 10 : s.value.width} ${s.value.height <= 0 ? 10 : s.value.height}`,
|
|
791
|
+
style: $(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${lt.value.css}`)
|
|
792
|
+
}, [
|
|
793
|
+
h("g", {
|
|
794
|
+
ref_key: "G",
|
|
795
|
+
ref: be,
|
|
796
|
+
class: "vue-data-ui-g"
|
|
797
|
+
}, [
|
|
798
|
+
De(u(zt)),
|
|
799
|
+
l.$slots["chart-background"] ? (n(), r("foreignObject", {
|
|
800
|
+
key: 0,
|
|
801
|
+
x: 0,
|
|
802
|
+
y: 0,
|
|
803
|
+
width: s.value.width <= 0 ? 10 : s.value.width,
|
|
804
|
+
height: s.value.height <= 0 ? 10 : s.value.height,
|
|
805
|
+
style: {
|
|
806
|
+
pointerEvents: "none"
|
|
807
|
+
}
|
|
808
|
+
}, [
|
|
809
|
+
w(l.$slots, "chart-background", {}, void 0, !0)
|
|
810
|
+
], 8, Vl)) : v("", !0),
|
|
811
|
+
e.value.type === "classic" && !isNaN(ee.value / _.value) ? (n(), r("defs", El, [
|
|
812
|
+
e.value.style.chart.useGradient ? (n(), r("radialGradient", {
|
|
813
|
+
key: 0,
|
|
814
|
+
id: `gradient_${g.value}`
|
|
815
|
+
}, [
|
|
816
|
+
h("stop", {
|
|
817
|
+
offset: "0%",
|
|
818
|
+
"stop-color": u(Ce)(e.value.style.chart.backgroundColor, 0),
|
|
819
|
+
"stop-opacity": "0"
|
|
820
|
+
}, null, 8, Rl),
|
|
821
|
+
h("stop", {
|
|
822
|
+
offset: `${(1 - ee.value / _.value) * 100}%`,
|
|
823
|
+
"stop-color": u(Ce)("#FFFFFF", 0),
|
|
824
|
+
"stop-opacity": "0"
|
|
825
|
+
}, null, 8, ql),
|
|
826
|
+
h("stop", {
|
|
827
|
+
offset: `${(1 - ee.value / _.value / 2) * 100}%`,
|
|
828
|
+
"stop-color": u(Ce)("#FFFFFF", e.value.style.chart.gradientIntensity)
|
|
829
|
+
}, null, 8, Wl),
|
|
830
|
+
h("stop", {
|
|
831
|
+
offset: "100%",
|
|
832
|
+
"stop-color": u(Ce)(e.value.style.chart.backgroundColor, 0),
|
|
833
|
+
"stop-opacity": "0"
|
|
834
|
+
}, null, 8, Ul)
|
|
835
|
+
], 8, Gl)) : v("", !0)
|
|
836
|
+
])) : v("", !0),
|
|
837
|
+
e.value.type === "polar" ? (n(), r("defs", Hl, [
|
|
838
|
+
(n(!0), r(b, null, F(d.value, (t, a) => (n(), r("radialGradient", {
|
|
839
|
+
id: `polar_gradient_${a}_${g.value}`,
|
|
840
|
+
cx: (isNaN(t.middlePoint.x / s.value.width * 100) ? 0 : t.middlePoint.x / s.value.width * 100) + "%",
|
|
841
|
+
cy: (isNaN(t.middlePoint.y / s.value.height * 100) ? 0 : t.middlePoint.y / s.value.height * 100) + "%",
|
|
842
|
+
r: "62%"
|
|
843
|
+
}, [
|
|
844
|
+
h("stop", {
|
|
845
|
+
offset: "0%",
|
|
846
|
+
"stop-color": u(ml)(S.value[a].color, 0.05),
|
|
847
|
+
"stop-opacity": e.value.style.chart.gradientIntensity / 100
|
|
848
|
+
}, null, 8, Jl),
|
|
849
|
+
h("stop", {
|
|
850
|
+
offset: "100%",
|
|
851
|
+
"stop-color": S.value[a].color
|
|
852
|
+
}, null, 8, Kl)
|
|
853
|
+
], 8, jl))), 256))
|
|
854
|
+
])) : v("", !0),
|
|
855
|
+
h("defs", null, [
|
|
856
|
+
h("filter", {
|
|
857
|
+
id: `blur_${g.value}`,
|
|
858
|
+
x: "-50%",
|
|
859
|
+
y: "-50%",
|
|
860
|
+
width: "200%",
|
|
861
|
+
height: "200%"
|
|
862
|
+
}, [
|
|
863
|
+
h("feGaussianBlur", {
|
|
864
|
+
in: "SourceGraphic",
|
|
865
|
+
stdDeviation: 2,
|
|
866
|
+
id: `blur_std_${g.value}`
|
|
867
|
+
}, null, 8, Zl),
|
|
868
|
+
o[5] || (o[5] = h("feColorMatrix", {
|
|
869
|
+
type: "saturate",
|
|
870
|
+
values: "0"
|
|
871
|
+
}, null, -1))
|
|
872
|
+
], 8, Ql),
|
|
873
|
+
h("filter", {
|
|
874
|
+
id: `shadow_${g.value}`,
|
|
875
|
+
"color-interpolation-filters": "sRGB"
|
|
876
|
+
}, [
|
|
877
|
+
h("feDropShadow", {
|
|
878
|
+
dx: "0",
|
|
879
|
+
dy: "0",
|
|
880
|
+
stdDeviation: "10",
|
|
881
|
+
"flood-opacity": "0.5",
|
|
882
|
+
"flood-color": e.value.style.chart.layout.donut.shadowColor
|
|
883
|
+
}, null, 8, ta)
|
|
884
|
+
], 8, ea),
|
|
885
|
+
h("filter", {
|
|
886
|
+
id: `drop_shadow_${g.value}`,
|
|
887
|
+
"color-interpolation-filters": "sRGB",
|
|
888
|
+
x: "-50%",
|
|
889
|
+
y: "-50%",
|
|
890
|
+
width: "200%",
|
|
891
|
+
height: "200%"
|
|
892
|
+
}, [
|
|
893
|
+
h("feDropShadow", {
|
|
894
|
+
dx: "0",
|
|
895
|
+
dy: "0",
|
|
896
|
+
stdDeviation: "3",
|
|
897
|
+
"flood-opacity": "1",
|
|
898
|
+
"flood-color": e.value.style.chart.layout.donut.shadowColor
|
|
899
|
+
}, null, 8, aa)
|
|
900
|
+
], 8, la)
|
|
901
|
+
]),
|
|
902
|
+
e.value.type === "classic" ? (n(!0), r(b, { key: 3 }, F(S.value.filter((t) => !t.ghost), (t, a) => (n(), r("g", null, [
|
|
903
|
+
D(t) && f.value.dataLabels.show ? (n(), r("path", {
|
|
904
|
+
key: 0,
|
|
905
|
+
d: u(bl)(t, { x: s.value.width / 2, y: s.value.height / 2 }, 16, 16, !1, !1, ee.value, 12, e.value.style.chart.layout.curvedMarkers),
|
|
906
|
+
stroke: t.color,
|
|
907
|
+
"stroke-width": "1",
|
|
908
|
+
"stroke-linecap": "round",
|
|
909
|
+
"stroke-linejoin": "round",
|
|
910
|
+
fill: "none",
|
|
911
|
+
filter: le(a)
|
|
912
|
+
}, null, 8, oa)) : v("", !0)
|
|
913
|
+
]))), 256)) : v("", !0),
|
|
914
|
+
e.value.type === "polar" ? (n(!0), r(b, { key: 4 }, F(S.value.filter((t) => !t.ghost), (t, a) => (n(), r("g", null, [
|
|
915
|
+
D(t) && f.value.dataLabels.show ? (n(), r("path", {
|
|
916
|
+
key: 0,
|
|
917
|
+
d: `M ${u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x},${u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y} ${d.value[a].middlePoint.x},${d.value[a].middlePoint.y}`,
|
|
918
|
+
stroke: t.color,
|
|
919
|
+
"stroke-width": "1",
|
|
920
|
+
"stroke-linecap": "round",
|
|
921
|
+
"stroke-linejoin": "round",
|
|
922
|
+
fill: "none",
|
|
923
|
+
filter: le(a),
|
|
924
|
+
style: $({
|
|
925
|
+
transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
926
|
+
})
|
|
927
|
+
}, null, 12, sa)) : v("", !0)
|
|
928
|
+
]))), 256)) : v("", !0),
|
|
929
|
+
e.value.type === "classic" && e.value.style.chart.layout.donut.useShadow ? (n(), r("circle", {
|
|
930
|
+
key: 5,
|
|
931
|
+
cx: s.value.width / 2,
|
|
932
|
+
cy: s.value.height / 2,
|
|
933
|
+
r: _.value <= 0 ? 10 : _.value,
|
|
934
|
+
fill: e.value.style.chart.backgroundColor,
|
|
935
|
+
filter: `url(#shadow_${g.value})`
|
|
936
|
+
}, null, 8, ua)) : v("", !0),
|
|
937
|
+
l.$slots.pattern ? (n(), r("g", na, [
|
|
938
|
+
(n(!0), r(b, null, F(Ge.dataset, (t, a) => (n(), r("defs", {
|
|
939
|
+
key: `pattern-${t.patternIndex}`
|
|
940
|
+
}, [
|
|
941
|
+
w(l.$slots, "pattern", kt({ ref_for: !0 }, { seriesIndex: a, patternId: `pattern_${g.value}_${a}` }), void 0, !0)
|
|
942
|
+
]))), 128))
|
|
943
|
+
])) : v("", !0),
|
|
944
|
+
L.value && e.value.type === "classic" ? (n(), r(b, { key: 7 }, [
|
|
945
|
+
(n(!0), r(b, null, F(X.value, (t, a) => (n(), r("path", {
|
|
946
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
947
|
+
d: t.arcSlice,
|
|
948
|
+
fill: "#FFFFFF"
|
|
949
|
+
}, null, 8, ra))), 256)),
|
|
950
|
+
(n(!0), r(b, null, F(X.value, (t, a) => (n(), r("path", {
|
|
951
|
+
class: "vue-ui-donut-arc-path",
|
|
952
|
+
d: t.arcSlice,
|
|
953
|
+
fill: t.color,
|
|
954
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
955
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
956
|
+
filter: le(a)
|
|
957
|
+
}, null, 8, ia))), 256)),
|
|
958
|
+
l.$slots.pattern ? (n(), r("g", va, [
|
|
959
|
+
(n(!0), r(b, null, F(X.value, (t, a) => (n(), r("path", {
|
|
960
|
+
class: "vue-ui-donut-arc-path",
|
|
961
|
+
d: t.arcSlice,
|
|
962
|
+
fill: `url(#${t.pattern})`,
|
|
963
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
964
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
965
|
+
filter: le(a)
|
|
966
|
+
}, null, 8, da))), 256))
|
|
967
|
+
])) : v("", !0)
|
|
968
|
+
], 64)) : v("", !0),
|
|
969
|
+
L.value && e.value.type === "polar" ? (n(), r(b, { key: 8 }, [
|
|
970
|
+
S.value.length > 1 ? (n(), r("g", ca, [
|
|
971
|
+
(n(!0), r(b, null, F(X.value, (t, a) => (n(), r("path", {
|
|
972
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
973
|
+
d: d.value[a].path,
|
|
974
|
+
fill: "#FFFFFF",
|
|
975
|
+
style: $({
|
|
976
|
+
transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
977
|
+
})
|
|
978
|
+
}, null, 12, ha))), 256)),
|
|
979
|
+
e.value.style.chart.layout.donut.useShadow ? (n(), r("g", ya, [
|
|
980
|
+
(n(!0), r(b, null, F(X.value, (t, a) => (n(), r("path", {
|
|
981
|
+
class: "vue-ui-donut-arc-path",
|
|
982
|
+
d: d.value[a].path,
|
|
983
|
+
fill: "transparent",
|
|
984
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
985
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
986
|
+
filter: `url(#drop_shadow_${g.value})`,
|
|
987
|
+
style: $({
|
|
988
|
+
transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
989
|
+
})
|
|
990
|
+
}, null, 12, fa))), 256))
|
|
991
|
+
])) : v("", !0),
|
|
992
|
+
l.$slots.pattern ? (n(), r("g", pa, [
|
|
993
|
+
(n(!0), r(b, null, F(X.value, (t, a) => (n(), r("path", {
|
|
994
|
+
class: "vue-ui-donut-arc-path",
|
|
995
|
+
d: d.value[a].path,
|
|
996
|
+
fill: `url(#${t.pattern})`,
|
|
997
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
998
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
999
|
+
filter: le(a),
|
|
1000
|
+
style: $({
|
|
1001
|
+
transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
1002
|
+
transformOrigin: "center"
|
|
1003
|
+
})
|
|
1004
|
+
}, null, 12, ga))), 256))
|
|
1005
|
+
])) : v("", !0),
|
|
1006
|
+
(n(!0), r(b, null, F(X.value, (t, a) => (n(), r("path", {
|
|
1007
|
+
class: "vue-ui-donut-arc-path",
|
|
1008
|
+
d: d.value[a].path,
|
|
1009
|
+
fill: e.value.style.chart.useGradient ? `url(#polar_gradient_${a}_${g.value})` : t.color,
|
|
1010
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1011
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
1012
|
+
filter: le(a),
|
|
1013
|
+
style: $({
|
|
1014
|
+
transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
1015
|
+
})
|
|
1016
|
+
}, null, 12, ma))), 256))
|
|
1017
|
+
])) : (n(), r("g", ba, [
|
|
1018
|
+
l.$slots.pattern ? (n(), r("circle", {
|
|
1019
|
+
key: 0,
|
|
1020
|
+
cx: s.value.width / 2,
|
|
1021
|
+
cy: s.value.height / 2,
|
|
1022
|
+
r: _.value,
|
|
1023
|
+
fill: `url(#pattern_${g.value}_${S.value[0].patternIndex})`,
|
|
1024
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1025
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth
|
|
1026
|
+
}, null, 8, wa)) : v("", !0),
|
|
1027
|
+
h("circle", {
|
|
1028
|
+
cx: s.value.width / 2,
|
|
1029
|
+
cy: s.value.height / 2,
|
|
1030
|
+
r: _.value,
|
|
1031
|
+
fill: e.value.style.chart.useGradient ? `url(#polar_gradient_0_${g.value})` : S.value[0].color,
|
|
1032
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1033
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth
|
|
1034
|
+
}, null, 8, ka)
|
|
1035
|
+
]))
|
|
1036
|
+
], 64)) : (n(), r(b, { key: 9 }, [
|
|
1037
|
+
e.value.type === "classic" && !jt.value ? (n(), r("g", xa, [
|
|
1038
|
+
(n(!0), r(b, null, F(Jt.value, (t, a) => (n(), r("path", {
|
|
1039
|
+
class: "vue-ui-donut-arc-path",
|
|
1040
|
+
d: t.arcSlice,
|
|
1041
|
+
fill: t.color,
|
|
1042
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1043
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth
|
|
1044
|
+
}, null, 8, _a))), 256))
|
|
1045
|
+
])) : v("", !0),
|
|
1046
|
+
h("circle", {
|
|
1047
|
+
cx: s.value.width / 2,
|
|
1048
|
+
cy: s.value.height / 2,
|
|
1049
|
+
r: _.value <= 0 ? 10 : _.value,
|
|
1050
|
+
fill: "transparent",
|
|
1051
|
+
stroke: e.value.style.chart.backgroundColor
|
|
1052
|
+
}, null, 8, $a)
|
|
1053
|
+
], 64)),
|
|
1054
|
+
e.value.style.chart.useGradient && e.value.type === "classic" ? (n(), r("circle", {
|
|
1055
|
+
key: 10,
|
|
1056
|
+
cx: s.value.width / 2,
|
|
1057
|
+
cy: s.value.height / 2,
|
|
1058
|
+
r: (
|
|
1059
|
+
/* This might require adjustments */
|
|
1060
|
+
_.value <= 0 ? 10 : _.value
|
|
1061
|
+
),
|
|
1062
|
+
fill: `url(#gradient_${g.value})`
|
|
1063
|
+
}, null, 8, Ca)) : v("", !0),
|
|
1064
|
+
h("circle", {
|
|
1065
|
+
ref_key: "circle_hollow",
|
|
1066
|
+
ref: Te,
|
|
1067
|
+
style: { pointerEvents: "none" },
|
|
1068
|
+
fill: "none",
|
|
1069
|
+
cx: s.value.width / 2,
|
|
1070
|
+
cy: s.value.height / 2,
|
|
1071
|
+
r: Math.max(0.1, ee.value * 1.7)
|
|
1072
|
+
}, null, 8, Aa),
|
|
1073
|
+
L.value ? (n(), r(b, { key: 11 }, [
|
|
1074
|
+
S.value.length > 1 || e.value.type === "classic" ? (n(), r("g", Ta, [
|
|
1075
|
+
(n(!0), r(b, null, F(S.value.filter((t) => !t.ghost), (t, a) => (n(), r("path", {
|
|
1076
|
+
d: e.value.type === "classic" ? t.arcSlice : d.value[a].path,
|
|
1077
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1078
|
+
fill: Y.value === a ? e.value.style.chart.layout.donut.selectedColor : "transparent",
|
|
1079
|
+
onMouseenter: (i) => ve({
|
|
1080
|
+
datapoint: t,
|
|
1081
|
+
relativeIndex: a,
|
|
1082
|
+
seriesIndex: t.seriesIndex,
|
|
1083
|
+
show: !0
|
|
1084
|
+
}),
|
|
1085
|
+
onMouseleave: (i) => ie({ datapoint: t, seriesIndex: t.seriesIndex }),
|
|
1086
|
+
onClick: (i) => Q(t, a)
|
|
1087
|
+
}, null, 40, Sa))), 256))
|
|
1088
|
+
])) : (n(), r("g", Pa, [
|
|
1089
|
+
h("circle", {
|
|
1090
|
+
cx: s.value.width / 2,
|
|
1091
|
+
cy: s.value.height / 2,
|
|
1092
|
+
r: _.value,
|
|
1093
|
+
fill: "transparent",
|
|
1094
|
+
onMouseenter: o[0] || (o[0] = (t) => ve({
|
|
1095
|
+
datapoint: S.value[0],
|
|
1096
|
+
relativeIndex: 0,
|
|
1097
|
+
seriesIndex: S.value[0].seriesIndex,
|
|
1098
|
+
show: !0
|
|
1099
|
+
})),
|
|
1100
|
+
onMouseleave: o[1] || (o[1] = (t) => ie({ datapoint: S.value[0], seriesIndex: S.value[0].seriesIndex })),
|
|
1101
|
+
onClick: o[2] || (o[2] = (t) => Q(S.value[0], l.i))
|
|
1102
|
+
}, null, 40, Fa)
|
|
1103
|
+
]))
|
|
1104
|
+
], 64)) : v("", !0),
|
|
1105
|
+
e.value.type === "classic" ? (n(), r("g", {
|
|
1106
|
+
key: 12,
|
|
1107
|
+
ref_key: "G_hollow",
|
|
1108
|
+
ref: Ae,
|
|
1109
|
+
class: "vue-data-ui-donut-hollow-labels"
|
|
1110
|
+
}, [
|
|
1111
|
+
e.value.style.chart.layout.labels.hollow.total.show ? (n(), r("text", {
|
|
1112
|
+
key: 0,
|
|
1113
|
+
"text-anchor": "middle",
|
|
1114
|
+
x: s.value.width / 2,
|
|
1115
|
+
y: s.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,
|
|
1116
|
+
fill: e.value.style.chart.layout.labels.hollow.total.color,
|
|
1117
|
+
"font-size": e.value.style.chart.layout.labels.hollow.total.fontSize,
|
|
1118
|
+
style: $(`font-weight:${e.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
|
|
1119
|
+
}, I(e.value.style.chart.layout.labels.hollow.total.text), 13, La)) : v("", !0),
|
|
1120
|
+
e.value.style.chart.layout.labels.hollow.total.show ? (n(), r("text", {
|
|
1121
|
+
key: 1,
|
|
1122
|
+
"text-anchor": "middle",
|
|
1123
|
+
x: s.value.width / 2,
|
|
1124
|
+
y: s.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,
|
|
1125
|
+
fill: e.value.style.chart.layout.labels.hollow.total.value.color,
|
|
1126
|
+
"font-size": e.value.style.chart.layout.labels.hollow.total.value.fontSize,
|
|
1127
|
+
style: $(`font-weight:${e.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
|
|
1128
|
+
}, I(u(V)(
|
|
1129
|
+
e.value.style.chart.layout.labels.hollow.total.value.formatter,
|
|
1130
|
+
L.value,
|
|
1131
|
+
u(N)({
|
|
1132
|
+
p: e.value.style.chart.layout.labels.hollow.total.value.prefix,
|
|
1133
|
+
v: L.value,
|
|
1134
|
+
s: e.value.style.chart.layout.labels.hollow.total.value.suffix
|
|
1135
|
+
})
|
|
1136
|
+
)), 13, Ia)) : v("", !0),
|
|
1137
|
+
e.value.style.chart.layout.labels.hollow.average.show ? (n(), r("text", {
|
|
1138
|
+
key: 2,
|
|
1139
|
+
"text-anchor": "middle",
|
|
1140
|
+
x: s.value.width / 2,
|
|
1141
|
+
y: s.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,
|
|
1142
|
+
fill: e.value.style.chart.layout.labels.hollow.average.color,
|
|
1143
|
+
"font-size": e.value.style.chart.layout.labels.hollow.average.fontSize,
|
|
1144
|
+
style: $(`font-weight:${e.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
|
|
1145
|
+
}, I(e.value.style.chart.layout.labels.hollow.average.text), 13, Ma)) : v("", !0),
|
|
1146
|
+
e.value.style.chart.layout.labels.hollow.average.show ? (n(), r("text", {
|
|
1147
|
+
key: 3,
|
|
1148
|
+
"text-anchor": "middle",
|
|
1149
|
+
x: s.value.width / 2,
|
|
1150
|
+
y: s.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,
|
|
1151
|
+
fill: e.value.style.chart.layout.labels.hollow.average.value.color,
|
|
1152
|
+
"font-size": e.value.style.chart.layout.labels.hollow.average.value.fontSize,
|
|
1153
|
+
style: $(`font-weight:${e.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
|
|
1154
|
+
}, I(te.value || T.value ? "--" : u(V)(
|
|
1155
|
+
e.value.style.chart.layout.labels.hollow.average.value.formatter,
|
|
1156
|
+
ct.value,
|
|
1157
|
+
u(N)({
|
|
1158
|
+
p: e.value.style.chart.layout.labels.hollow.average.value.prefix,
|
|
1159
|
+
v: ct.value,
|
|
1160
|
+
s: e.value.style.chart.layout.labels.hollow.average.value.suffix,
|
|
1161
|
+
r: e.value.style.chart.layout.labels.hollow.average.value.rounding
|
|
1162
|
+
})
|
|
1163
|
+
)), 13, za)) : v("", !0)
|
|
1164
|
+
], 512)) : v("", !0),
|
|
1165
|
+
(n(!0), r(b, null, F(X.value.filter((t) => !t.ghost), (t, a) => (n(), r("g", {
|
|
1166
|
+
filter: le(a),
|
|
1167
|
+
class: Xe({ animated: e.value.useCssAnimation }),
|
|
1168
|
+
key: t.seriesIndex
|
|
1169
|
+
}, [
|
|
1170
|
+
e.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (n(), r("g", Na, [
|
|
1171
|
+
(n(), r("foreignObject", {
|
|
1172
|
+
x: u(x)(t, !0).anchor === "end" ? u(x)(t).x - 120 : u(x)(t, !0).anchor === "middle" ? u(x)(t).x - 60 : u(x)(t).x,
|
|
1173
|
+
y: u(fe)(t) - (pt.value ? 20 : 0),
|
|
1174
|
+
width: "120",
|
|
1175
|
+
height: "60",
|
|
1176
|
+
style: { overflow: "visible" }
|
|
1177
|
+
}, [
|
|
1178
|
+
h("div", null, [
|
|
1179
|
+
w(l.$slots, "dataLabel", kt({ ref_for: !0 }, {
|
|
1180
|
+
datapoint: t,
|
|
1181
|
+
isBlur: !e.value.useBlurOnHover || [null, void 0].includes(Y.value) || Y.value === a,
|
|
1182
|
+
isSafari: pt.value,
|
|
1183
|
+
isVisible: D(t) && f.value.dataLabels.show,
|
|
1184
|
+
textAlign: u(x)(t, !0, 16, !0).anchor,
|
|
1185
|
+
flexAlign: u(x)(t, !0, 16).anchor,
|
|
1186
|
+
percentage: ze(t, X.value)
|
|
1187
|
+
}), void 0, !0)
|
|
1188
|
+
])
|
|
1189
|
+
], 8, Ya))
|
|
1190
|
+
])) : (n(), r("g", Xa, [
|
|
1191
|
+
e.value.type === "classic" ? (n(), r(b, { key: 0 }, [
|
|
1192
|
+
D(t) && f.value.dataLabels.show ? (n(), r("circle", {
|
|
1193
|
+
key: 0,
|
|
1194
|
+
cx: u(x)(t).x,
|
|
1195
|
+
cy: u(fe)(t) - 3.5,
|
|
1196
|
+
fill: t.color,
|
|
1197
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1198
|
+
"stroke-width": 1,
|
|
1199
|
+
r: 3,
|
|
1200
|
+
filter: !e.value.useBlurOnHover || [null, void 0].includes(Y.value) || Y.value === a ? "" : `url(#blur_${g.value})`,
|
|
1201
|
+
onClick: (i) => Q(t, a),
|
|
1202
|
+
onMouseenter: (i) => ve({
|
|
1203
|
+
datapoint: t,
|
|
1204
|
+
relativeIndex: a,
|
|
1205
|
+
seriesIndex: t.seriesIndex,
|
|
1206
|
+
show: !0
|
|
1207
|
+
}),
|
|
1208
|
+
onMouseleave: (i) => ie({ datapoint: t, seriesIndex: t.seriesIndex })
|
|
1209
|
+
}, null, 40, Da)) : v("", !0)
|
|
1210
|
+
], 64)) : v("", !0),
|
|
1211
|
+
e.value.type === "polar" ? (n(), r(b, { key: 1 }, [
|
|
1212
|
+
D(t) && f.value.dataLabels.show ? (n(), r("circle", {
|
|
1213
|
+
key: 0,
|
|
1214
|
+
cx: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x,
|
|
1215
|
+
cy: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 24, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y,
|
|
1216
|
+
fill: t.color,
|
|
1217
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1218
|
+
"stroke-width": 1,
|
|
1219
|
+
r: 3,
|
|
1220
|
+
filter: !e.value.useBlurOnHover || [null, void 0].includes(Y.value) || Y.value === a ? "" : `url(#blur_${g.value})`,
|
|
1221
|
+
onClick: (i) => Q(t, a),
|
|
1222
|
+
onMouseenter: (i) => ve({
|
|
1223
|
+
datapoint: t,
|
|
1224
|
+
relativeIndex: a,
|
|
1225
|
+
seriesIndex: t.seriesIndex,
|
|
1226
|
+
show: !0
|
|
1227
|
+
}),
|
|
1228
|
+
onMouseleave: (i) => ie({ datapoint: t, seriesIndex: t.seriesIndex }),
|
|
1229
|
+
style: $({
|
|
1230
|
+
transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
1231
|
+
})
|
|
1232
|
+
}, null, 44, Ba)) : v("", !0)
|
|
1233
|
+
], 64)) : v("", !0),
|
|
1234
|
+
e.value.type === "classic" ? (n(), r(b, { key: 2 }, [
|
|
1235
|
+
xt(h("text", {
|
|
1236
|
+
class: "vue-data-ui-datalabel-value",
|
|
1237
|
+
"text-anchor": u(x)(t, !0, 12).anchor,
|
|
1238
|
+
x: u(x)(t, !0, 12).x,
|
|
1239
|
+
y: u(fe)(t),
|
|
1240
|
+
fill: e.value.style.chart.layout.labels.percentage.color,
|
|
1241
|
+
"font-size": we.value + "px",
|
|
1242
|
+
style: $(`font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
|
|
1243
|
+
onClick: (i) => Q(t, a),
|
|
1244
|
+
onMouseenter: (i) => ve({
|
|
1245
|
+
datapoint: t,
|
|
1246
|
+
relativeIndex: a,
|
|
1247
|
+
seriesIndex: t.seriesIndex,
|
|
1248
|
+
show: !0
|
|
1249
|
+
}),
|
|
1250
|
+
onMouseleave: (i) => ie({ datapoint: t, seriesIndex: t.seriesIndex })
|
|
1251
|
+
}, I(ze(t, X.value)) + " " + I(e.value.style.chart.layout.labels.value.show ? `(${u(V)(
|
|
1252
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
1253
|
+
t.value,
|
|
1254
|
+
u(N)({
|
|
1255
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1256
|
+
v: t.value,
|
|
1257
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1258
|
+
r: e.value.style.chart.layout.labels.value.rounding
|
|
1259
|
+
}),
|
|
1260
|
+
{ datapoint: t }
|
|
1261
|
+
)})` : ""), 45, Va), [
|
|
1262
|
+
[_t, D(t) && f.value.dataLabels.show]
|
|
1263
|
+
]),
|
|
1264
|
+
xt(h("text", {
|
|
1265
|
+
class: "vue-data-ui-datalabel-name",
|
|
1266
|
+
"text-anchor": u(x)(t).anchor,
|
|
1267
|
+
x: u(x)(t, !0, 12).x,
|
|
1268
|
+
y: u(fe)(t) + J.value * 1.2,
|
|
1269
|
+
fill: e.value.style.chart.layout.labels.name.color,
|
|
1270
|
+
"font-size": J.value + "px",
|
|
1271
|
+
style: $(`font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
|
|
1272
|
+
onClick: (i) => Q(t, a),
|
|
1273
|
+
innerHTML: u(Tt)({
|
|
1274
|
+
content: t.name,
|
|
1275
|
+
fontSize: J.value,
|
|
1276
|
+
fill: e.value.style.chart.layout.labels.name.color,
|
|
1277
|
+
x: u(x)(t, !0, 12).x,
|
|
1278
|
+
y: u(fe)(t) + J.value
|
|
1279
|
+
})
|
|
1280
|
+
}, null, 12, Ea), [
|
|
1281
|
+
[_t, D(t) && f.value.dataLabels.show]
|
|
1282
|
+
]),
|
|
1283
|
+
o[6] || (o[6] = Be(' @mouseenter="useTooltip({ datapoint: arc, relativeIndex: i, seriesIndex: arc.seriesIndex, show: true })" @mouseleave="handleDatapointLeave({ datapoint: arc, seriesIndex: arc.seriesIndex })" /> '))
|
|
1284
|
+
], 64)) : v("", !0),
|
|
1285
|
+
e.value.type === "polar" ? (n(), r(b, { key: 3 }, [
|
|
1286
|
+
D(t) && f.value.dataLabels.show ? (n(), r("text", {
|
|
1287
|
+
key: 0,
|
|
1288
|
+
class: "vue-data-ui-datalabel-value",
|
|
1289
|
+
"text-anchor": re(d.value[a].middlePoint),
|
|
1290
|
+
x: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x,
|
|
1291
|
+
y: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y,
|
|
1292
|
+
fill: e.value.style.chart.layout.labels.percentage.color,
|
|
1293
|
+
"font-size": we.value,
|
|
1294
|
+
style: $({
|
|
1295
|
+
transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
1296
|
+
fontWeight: e.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
|
|
1297
|
+
}),
|
|
1298
|
+
onClick: (i) => Q(t, a),
|
|
1299
|
+
onMouseenter: (i) => ve({
|
|
1300
|
+
datapoint: t,
|
|
1301
|
+
relativeIndex: a,
|
|
1302
|
+
seriesIndex: t.seriesIndex,
|
|
1303
|
+
show: !0
|
|
1304
|
+
}),
|
|
1305
|
+
onMouseleave: (i) => ie({ datapoint: t, seriesIndex: t.seriesIndex })
|
|
1306
|
+
}, I(ze(t, X.value)) + " " + I(e.value.style.chart.layout.labels.value.show ? `(${u(V)(
|
|
1307
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
1308
|
+
t.value,
|
|
1309
|
+
u(N)({
|
|
1310
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1311
|
+
v: t.value,
|
|
1312
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1313
|
+
r: e.value.style.chart.layout.labels.value.rounding
|
|
1314
|
+
}),
|
|
1315
|
+
{ datapoint: t }
|
|
1316
|
+
)})` : ""), 45, Ga)) : v("", !0),
|
|
1317
|
+
D(t) && f.value.dataLabels.show ? (n(), r("text", {
|
|
1318
|
+
key: 1,
|
|
1319
|
+
class: "vue-data-ui-datalabel-name",
|
|
1320
|
+
"text-anchor": re(d.value[a].middlePoint),
|
|
1321
|
+
x: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x,
|
|
1322
|
+
y: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y + J.value * 1.2,
|
|
1323
|
+
fill: e.value.style.chart.layout.labels.name.color,
|
|
1324
|
+
"font-size": J.value,
|
|
1325
|
+
style: $({
|
|
1326
|
+
transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
1327
|
+
fontWeight: e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
|
|
1328
|
+
}),
|
|
1329
|
+
onClick: (i) => Q(t, a),
|
|
1330
|
+
innerHTML: u(Tt)({
|
|
1331
|
+
content: t.name,
|
|
1332
|
+
fontSize: we.value,
|
|
1333
|
+
fill: e.value.style.chart.layout.labels.name.color,
|
|
1334
|
+
x: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x,
|
|
1335
|
+
y: u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).y + J.value * 1.2
|
|
1336
|
+
})
|
|
1337
|
+
}, null, 12, Ra)) : v("", !0),
|
|
1338
|
+
o[7] || (o[7] = Be(' @mouseenter="useTooltip({ datapoint: arc, relativeIndex: i, seriesIndex: arc.seriesIndex, show: true })" @mouseleave="handleDatapointLeave({ datapoint: arc, seriesIndex: arc.seriesIndex })" /> '))
|
|
1339
|
+
], 64)) : v("", !0)
|
|
1340
|
+
])),
|
|
1341
|
+
f.value.dataLabels.show && e.value.style.chart.comments.show && t.comment ? (n(), r("g", qa, [
|
|
1342
|
+
D(t) && e.value.type === "classic" ? (n(), r("foreignObject", {
|
|
1343
|
+
key: 0,
|
|
1344
|
+
x: e.value.style.chart.comments.offsetX + (u(x)(t, !0).anchor === "end" ? u(x)(t).x - e.value.style.chart.comments.width : u(x)(t, !0).anchor === "middle" ? u(x)(t).x - e.value.style.chart.comments.width / 2 : u(x)(t).x),
|
|
1345
|
+
y: u(fe)(t) + 24 + e.value.style.chart.comments.offsetY,
|
|
1346
|
+
width: e.value.style.chart.comments.width,
|
|
1347
|
+
height: "200",
|
|
1348
|
+
style: { overflow: "visible", "pointer-events": "none" }
|
|
1349
|
+
}, [
|
|
1350
|
+
h("div", null, [
|
|
1351
|
+
w(l.$slots, "plot-comment", {
|
|
1352
|
+
plot: { ...t, textAlign: u(x)(t, !0, 16, !0).anchor, flexAlign: u(x)(t, !0, 16).anchor, isFirstLoad: T.value }
|
|
1353
|
+
}, void 0, !0)
|
|
1354
|
+
])
|
|
1355
|
+
], 8, Wa)) : v("", !0),
|
|
1356
|
+
D(t) && e.value.type === "polar" ? (n(), r("foreignObject", {
|
|
1357
|
+
key: 1,
|
|
1358
|
+
x: e.value.style.chart.comments.offsetX + (re(d.value[a].middlePoint) === "end" ? u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x - e.value.style.chart.comments.width : re(d.value[a].middlePoint) === "middle" ? u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x - e.value.style.chart.comments.width / 2 : u(P)({ initX: d.value[a].middlePoint.x, initY: d.value[a].middlePoint.y, offset: 42, centerX: s.value.width / 2, centerY: s.value.height / 2 }).x),
|
|
1359
|
+
y: Kt(d.value[a]) + e.value.style.chart.comments.offsetY,
|
|
1360
|
+
width: e.value.style.chart.comments.width,
|
|
1361
|
+
height: "200",
|
|
1362
|
+
style: $({
|
|
1363
|
+
transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
1364
|
+
overflow: "visible",
|
|
1365
|
+
pointerEvents: "none"
|
|
1366
|
+
})
|
|
1367
|
+
}, [
|
|
1368
|
+
h("div", null, [
|
|
1369
|
+
w(l.$slots, "plot-comment", {
|
|
1370
|
+
plot: { ...t, textAlign: re(d.value[a].middlePoint), flexAlign: re(d.value[a].middlePoint), isFirstLoad: T.value }
|
|
1371
|
+
}, void 0, !0)
|
|
1372
|
+
])
|
|
1373
|
+
], 12, Ua)) : v("", !0)
|
|
1374
|
+
])) : v("", !0)
|
|
1375
|
+
], 10, Oa))), 128)),
|
|
1376
|
+
w(l.$slots, "svg", { svg: s.value }, void 0, !0)
|
|
1377
|
+
], 512)
|
|
1378
|
+
], 14, Bl)),
|
|
1379
|
+
l.$slots.watermark ? (n(), r("div", Ha, [
|
|
1380
|
+
w(l.$slots, "watermark", he(ye({ isPrinting: u(at) || u(ot) })), void 0, !0)
|
|
1381
|
+
])) : v("", !0),
|
|
1382
|
+
h("div", {
|
|
1383
|
+
ref_key: "chartLegend",
|
|
1384
|
+
ref: qe
|
|
1385
|
+
}, [
|
|
1386
|
+
e.value.style.chart.legend.show ? (n(), ae(Il, {
|
|
1387
|
+
key: `legend_${Je.value}`,
|
|
1388
|
+
legendSet: dt.value,
|
|
1389
|
+
config: Ht.value,
|
|
1390
|
+
onClickMarker: o[3] || (o[3] = ({ i: t }) => vt(t))
|
|
1391
|
+
}, wt({
|
|
1392
|
+
item: A(({ legend: t, index: a }) => [
|
|
1393
|
+
h("div", {
|
|
1394
|
+
style: $(`opacity:${E.value.includes(a) ? 0.5 : 1}`),
|
|
1395
|
+
onClick: (i) => t.segregate()
|
|
1396
|
+
}, I(t.name) + I(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + I(e.value.style.chart.legend.showValue ? u(V)(
|
|
1397
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
1398
|
+
t.value,
|
|
1399
|
+
u(N)({
|
|
1400
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1401
|
+
v: t.value,
|
|
1402
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1403
|
+
r: e.value.style.chart.legend.roundingValue
|
|
1404
|
+
}),
|
|
1405
|
+
{
|
|
1406
|
+
datapoint: t,
|
|
1407
|
+
index: a
|
|
1408
|
+
}
|
|
1409
|
+
) : "") + " " + I(e.value.style.chart.legend.showPercentage ? E.value.includes(a) ? `${e.value.style.chart.legend.showValue ? "(" : ""}${Zt(t.proportion * 100)}%${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? "(" : ""}${isNaN(t.value / L.value) ? "-" : u(V)(
|
|
1410
|
+
e.value.style.chart.layout.labels.percentage.formatter,
|
|
1411
|
+
ht.value(t),
|
|
1412
|
+
u(N)({
|
|
1413
|
+
v: ht.value(t),
|
|
1414
|
+
s: "%",
|
|
1415
|
+
r: e.value.style.chart.legend.roundingPercentage
|
|
1416
|
+
})
|
|
1417
|
+
)}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, ja)
|
|
1418
|
+
]),
|
|
1419
|
+
_: 2
|
|
1420
|
+
}, [
|
|
1421
|
+
l.$slots.pattern ? {
|
|
1422
|
+
name: "legend-pattern",
|
|
1423
|
+
fn: A(({ legend: t, index: a }) => [
|
|
1424
|
+
De(zl, {
|
|
1425
|
+
shape: t.shape,
|
|
1426
|
+
radius: 30,
|
|
1427
|
+
stroke: "none",
|
|
1428
|
+
plot: { x: 30, y: 30 },
|
|
1429
|
+
fill: `url(#pattern_${g.value}_${a})`
|
|
1430
|
+
}, null, 8, ["shape", "fill"])
|
|
1431
|
+
]),
|
|
1432
|
+
key: "0"
|
|
1433
|
+
} : void 0
|
|
1434
|
+
]), 1032, ["legendSet", "config"])) : v("", !0),
|
|
1435
|
+
w(l.$slots, "legend", { legend: dt.value }, void 0, !0)
|
|
1436
|
+
], 512),
|
|
1437
|
+
l.$slots.source ? (n(), r("div", {
|
|
1438
|
+
key: 5,
|
|
1439
|
+
ref_key: "source",
|
|
1440
|
+
ref: We,
|
|
1441
|
+
dir: "auto"
|
|
1442
|
+
}, [
|
|
1443
|
+
w(l.$slots, "source", {}, void 0, !0)
|
|
1444
|
+
], 512)) : v("", !0),
|
|
1445
|
+
De(u(Nt), {
|
|
1446
|
+
show: f.value.showTooltip && Fe.value,
|
|
1447
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
1448
|
+
color: e.value.style.chart.tooltip.color,
|
|
1449
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
1450
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
1451
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
1452
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
1453
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
1454
|
+
position: e.value.style.chart.tooltip.position,
|
|
1455
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
1456
|
+
parent: H.value,
|
|
1457
|
+
content: Le.value,
|
|
1458
|
+
isCustom: pe.value,
|
|
1459
|
+
isFullscreen: de.value
|
|
1460
|
+
}, {
|
|
1461
|
+
"tooltip-before": A(() => [
|
|
1462
|
+
w(l.$slots, "tooltip-before", he(ye({ ...Oe.value })), void 0, !0)
|
|
1463
|
+
]),
|
|
1464
|
+
"tooltip-after": A(() => [
|
|
1465
|
+
w(l.$slots, "tooltip-after", he(ye({ ...Oe.value })), void 0, !0)
|
|
1466
|
+
]),
|
|
1467
|
+
_: 3
|
|
1468
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen"]),
|
|
1469
|
+
me.value ? (n(), ae(u(It), {
|
|
1470
|
+
key: 6,
|
|
1471
|
+
hideDetails: "",
|
|
1472
|
+
config: {
|
|
1473
|
+
open: f.value.showTable,
|
|
1474
|
+
maxHeight: 1e4,
|
|
1475
|
+
body: {
|
|
1476
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1477
|
+
color: e.value.style.chart.color
|
|
1478
|
+
},
|
|
1479
|
+
head: {
|
|
1480
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
1481
|
+
color: e.value.style.chart.color
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
}, {
|
|
1485
|
+
content: A(() => [
|
|
1486
|
+
(n(), ae(u(Mt), {
|
|
1487
|
+
key: `table_${je.value}`,
|
|
1488
|
+
colNames: _e.value.colNames,
|
|
1489
|
+
head: _e.value.head,
|
|
1490
|
+
body: _e.value.body,
|
|
1491
|
+
config: _e.value.config,
|
|
1492
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1493
|
+
onClose: o[4] || (o[4] = (t) => f.value.showTable = !1)
|
|
1494
|
+
}, {
|
|
1495
|
+
th: A(({ th: t }) => [
|
|
1496
|
+
h("div", {
|
|
1497
|
+
innerHTML: t,
|
|
1498
|
+
style: { display: "flex", "align-items": "center" }
|
|
1499
|
+
}, null, 8, Ja)
|
|
1500
|
+
]),
|
|
1501
|
+
td: A(({ td: t }) => [
|
|
1502
|
+
Be(I(t.name ? t.name : isNaN(Number(t)) ? t.includes("%") ? t : u(V)(
|
|
1503
|
+
e.value.style.chart.layout.labels.percentage.formatter,
|
|
1504
|
+
t,
|
|
1505
|
+
u(N)({
|
|
1506
|
+
v: t,
|
|
1507
|
+
s: "%",
|
|
1508
|
+
r: e.value.style.chart.layout.labels.percentage.rounding
|
|
1509
|
+
})
|
|
1510
|
+
) : u(V)(
|
|
1511
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
1512
|
+
t,
|
|
1513
|
+
u(N)({
|
|
1514
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1515
|
+
v: t,
|
|
1516
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1517
|
+
r: e.value.style.chart.layout.labels.value.rounding
|
|
1518
|
+
})
|
|
1519
|
+
)), 1)
|
|
1520
|
+
]),
|
|
1521
|
+
_: 1
|
|
1522
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
1523
|
+
]),
|
|
1524
|
+
_: 1
|
|
1525
|
+
}, 8, ["config"])) : v("", !0),
|
|
1526
|
+
u(ke) ? (n(), ae(Nl, { key: 7 })) : v("", !0)
|
|
1527
|
+
], 46, Dl));
|
|
1528
|
+
}
|
|
1529
|
+
}, co = /* @__PURE__ */ Xl(Ka, [["__scopeId", "data-v-fdce44b0"]]);
|
|
1530
|
+
export {
|
|
1531
|
+
co as default
|
|
1532
|
+
};
|