vue-data-ui 3.0.0-next.71 → 3.0.0-next.73
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-BZNpld6u.js → Arrow-DSSjD4Ff.js} +1 -1
- package/dist/{BaseDraggableDialog-kg-eVvXZ.js → BaseDraggableDialog-B95qHlBZ.js} +2 -2
- package/dist/{BaseIcon-BdOEhJar.js → BaseIcon-D4UMFIS-.js} +1 -1
- package/dist/{ColorPicker-CWvXlPxS.js → ColorPicker-DFI3NleD.js} +2 -2
- package/dist/{DataTable-B3yakHEM.js → DataTable-CMMsXA0n.js} +2 -2
- package/dist/{Legend-DiGLrlzP.js → Legend-C5UNFNQQ.js} +2 -2
- package/dist/{NonSvgPenAndPaper-C-ZjpJQd.js → NonSvgPenAndPaper-DAR9-Zzo.js} +3 -3
- package/dist/{PackageVersion-6s4eI8W7.js → PackageVersion-B1daxzGa.js} +1 -1
- package/dist/{PenAndPaper-JoUN7Ink.js → PenAndPaper-CBpnHUIk.js} +3 -3
- package/dist/{Shape-CWIa2nta.js → Shape-BselAAXg.js} +1 -1
- package/dist/{Slicer-DYuvPkEM.js → Slicer-D3DQKDKt.js} +2 -2
- package/dist/{SparkTooltip-C_fUmbP7.js → SparkTooltip-Bp_VDs91.js} +1 -1
- package/dist/{Title-VLWyIYrj.js → Title-CP3JSAsP.js} +1 -1
- package/dist/{Tooltip-BS5naLS2.js → Tooltip-H-ElnGwO.js} +1 -1
- package/dist/{UserOptions-BV_xM-sB.js → UserOptions-HpTycUgM.js} +2 -2
- package/dist/{dom-to-png-PUk0ukSG.js → dom-to-png-CfQgUFBr.js} +1 -1
- package/dist/{img-DD_2wgY3.js → img-Bim7Y1-m.js} +1 -1
- package/dist/{index-DKpp7RIH.js → index-yC6NjpP_.js} +18 -1
- package/dist/{pdf-0TQQyXWM.js → pdf-DiKUcI4N.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +21 -9
- package/dist/types/vue-data-ui.d.ts +21 -9
- package/dist/{useAutoSizeLabelsInsideViewbox-Qhry5WvH.js → useAutoSizeLabelsInsideViewbox-CZnSPf_C.js} +1 -1
- package/dist/{useNestedProp-D-8c0o4p.js → useNestedProp-CF55-wsO.js} +1 -1
- package/dist/{usePrinter-NUeckmCX.js → usePrinter-DC8yU0M6.js} +2 -2
- package/dist/{vue-data-ui-BIXXEsFZ.js → vue-data-ui-D0AafFtx.js} +64 -64
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CVUfj12F.js → vue-ui-3d-bar-CvHFid3D.js} +6 -6
- package/dist/{vue-ui-accordion-Cpovz3RE.js → vue-ui-accordion-D1RDCQOF.js} +3 -3
- package/dist/{vue-ui-age-pyramid-CQWFaHLV.js → vue-ui-age-pyramid-BdyLeyYg.js} +6 -6
- package/dist/{vue-ui-annotator-C49Xw5Mh.js → vue-ui-annotator-C_bRFtcX.js} +2 -2
- package/dist/{vue-ui-bullet-DED2SuIa.js → vue-ui-bullet-DZUwoLaN.js} +7 -7
- package/dist/{vue-ui-candlestick-DGgbevy6.js → vue-ui-candlestick-CS7PhJFI.js} +7 -7
- package/dist/{vue-ui-carousel-table-DKIgSB1T.js → vue-ui-carousel-table-BALWOIi7.js} +4 -4
- package/dist/{vue-ui-chestnut-D1bEM91d.js → vue-ui-chestnut-ofw7Kv6_.js} +664 -536
- package/dist/{vue-ui-chord-CBLSqtEP.js → vue-ui-chord-D4COvMcc.js} +8 -8
- package/dist/vue-ui-circle-pack-CN8Y_fbd.js +709 -0
- package/dist/{vue-ui-cursor-DSxmPUD8.js → vue-ui-cursor-BZzYhn1r.js} +2 -2
- package/dist/{vue-ui-dashboard-B6FfoNjQ.js → vue-ui-dashboard-CL15hNdX.js} +62 -62
- package/dist/{vue-ui-digits-DKffQVgr.js → vue-ui-digits-BNgAR6Ty.js} +2 -2
- package/dist/{vue-ui-donut-evolution-Bys6cs-D.js → vue-ui-donut-evolution-BGmV-HK9.js} +8 -8
- package/dist/{vue-ui-donut-CJrWc4-g.js → vue-ui-donut-vjWFIVVT.js} +8 -8
- package/dist/{vue-ui-dumbbell-Cb_I__qC.js → vue-ui-dumbbell-0XOfrNz5.js} +7 -7
- package/dist/{vue-ui-flow-BzuT3ij5.js → vue-ui-flow-Br-wzIvL.js} +7 -7
- package/dist/{vue-ui-funnel-Ctp7GDiN.js → vue-ui-funnel-DzedRSBG.js} +6 -6
- package/dist/{vue-ui-galaxy-CRBy0aio.js → vue-ui-galaxy-CZ_yUdUc.js} +5 -5
- package/dist/{vue-ui-gauge-NcQq5UFr.js → vue-ui-gauge-uy-r5_ts.js} +7 -7
- package/dist/{vue-ui-gizmo-Cwfb8c-0.js → vue-ui-gizmo-BQhw5JEa.js} +3 -3
- package/dist/{vue-ui-heatmap-DElqpFVY.js → vue-ui-heatmap-Cp9MFC-v.js} +7 -7
- package/dist/{vue-ui-history-plot-De1Dvnhw.js → vue-ui-history-plot-Cf5Jb5bh.js} +7 -7
- package/dist/{vue-ui-kpi-_bLScmgO.js → vue-ui-kpi-Y1hL7GmA.js} +3 -3
- package/dist/{vue-ui-mini-loader-PsHE_2Wy.js → vue-ui-mini-loader-CtyAttV-.js} +2 -2
- package/dist/{vue-ui-molecule-CgiahnC6.js → vue-ui-molecule-CMIkxVGa.js} +5 -5
- package/dist/{vue-ui-mood-radar-dXVOOrhl.js → vue-ui-mood-radar-BWzqpz-S.js} +7 -7
- package/dist/{vue-ui-nested-donuts-C0X6BetT.js → vue-ui-nested-donuts-CDpwfAN2.js} +9 -9
- package/dist/{vue-ui-onion-C7sxQzk_.js → vue-ui-onion-DyKREw1v.js} +8 -8
- package/dist/{vue-ui-parallel-coordinate-plot-jwtnNX59.js → vue-ui-parallel-coordinate-plot-DNXNpjFr.js} +8 -8
- package/dist/{vue-ui-quadrant-DguDE91h.js → vue-ui-quadrant-CYBYnBGc.js} +8 -8
- package/dist/{vue-ui-quick-chart-BpEDS08U.js → vue-ui-quick-chart-BjdF07yD.js} +6 -6
- package/dist/{vue-ui-radar-lFrqTRqo.js → vue-ui-radar-Di-SJYfb.js} +8 -8
- package/dist/{vue-ui-rating-BHghXziv.js → vue-ui-rating-CU8NifYD.js} +2 -2
- package/dist/{vue-ui-relation-circle-C5W6NFOb.js → vue-ui-relation-circle-CAOK7rm3.js} +7 -7
- package/dist/{vue-ui-ridgeline-A2DuFEDS.js → vue-ui-ridgeline-GPu2Vvus.js} +8 -8
- package/dist/{vue-ui-rings-BgJAm9_b.js → vue-ui-rings-BdiWrA9u.js} +8 -8
- package/dist/{vue-ui-scatter-COfpLChz.js → vue-ui-scatter-DDkfRnEn.js} +8 -8
- package/dist/{vue-ui-skeleton-DMLCBUtZ.js → vue-ui-skeleton-B-hXFx8d.js} +3 -3
- package/dist/{vue-ui-smiley-ZopESYc_.js → vue-ui-smiley-BVY3aoLN.js} +2 -2
- package/dist/{vue-ui-spark-trend-CuSQ03fQ.js → vue-ui-spark-trend-9iJOtdiO.js} +3 -3
- package/dist/{vue-ui-sparkbar-BCsX9M4q.js → vue-ui-sparkbar-BUwb_Cai.js} +3 -3
- package/dist/{vue-ui-sparkgauge-DdyZLA0T.js → vue-ui-sparkgauge-zAH9pBNs.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-CUxFgIcE.js → vue-ui-sparkhistogram-DJNIVe8_.js} +4 -4
- package/dist/{vue-ui-sparkline-DOkofsLL.js → vue-ui-sparkline-CLNGpAWN.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-Bq9PZzmH.js → vue-ui-sparkstackbar-BaBWSDJQ.js} +3 -3
- package/dist/{vue-ui-stackbar-B7ceoT0V.js → vue-ui-stackbar-BeYObYAK.js} +9 -9
- package/dist/{vue-ui-strip-plot-DYh-NGQN.js → vue-ui-strip-plot-Bx_gFqdA.js} +7 -7
- package/dist/{vue-ui-table-pESH5KAJ.js → vue-ui-table-BYck0KzF.js} +3 -3
- package/dist/{vue-ui-table-heatmap-BVTb1xuA.js → vue-ui-table-heatmap-Bzmq-Cuf.js} +5 -5
- package/dist/{vue-ui-table-sparkline-Bw-6l9lA.js → vue-ui-table-sparkline-C3hqLejN.js} +4 -4
- package/dist/{vue-ui-thermometer-BqqfmS-B.js → vue-ui-thermometer-D-T8l96n.js} +7 -7
- package/dist/{vue-ui-timer-CVisMxLS.js → vue-ui-timer-Cemsg65D.js} +5 -5
- package/dist/{vue-ui-tiremarks-K1dcCdpj.js → vue-ui-tiremarks-Vpcrptou.js} +6 -6
- package/dist/{vue-ui-treemap-Bz3c68s4.js → vue-ui-treemap-pDBDb6YS.js} +8 -8
- package/dist/{vue-ui-vertical-bar-BvtXpCjw.js → vue-ui-vertical-bar-c3bZjEFp.js} +9 -9
- package/dist/{vue-ui-waffle-CYO7bIf1.js → vue-ui-waffle-BraVnSOA.js} +8 -8
- package/dist/{vue-ui-wheel-De1spwLh.js → vue-ui-wheel-C4nBwldq.js} +6 -6
- package/dist/{vue-ui-word-cloud-BMmVrx_T.js → vue-ui-word-cloud-CrUAfQVc.js} +6 -6
- package/dist/{vue-ui-world-Ccpr00nJ.js → vue-ui-world-CBvxCA9O.js} +6 -6
- package/dist/{vue-ui-xy-D4jaRKe3.js → vue-ui-xy-CvjDEG3I.js} +9 -9
- package/dist/{vue-ui-xy-canvas-DE-Uu5oq.js → vue-ui-xy-canvas-BQvj0rhW.js} +8 -8
- package/package.json +1 -1
- package/dist/vue-ui-circle-pack-g2ts9NTG.js +0 -673
|
@@ -0,0 +1,709 @@
|
|
|
1
|
+
import { useCssVars as rt, computed as _, defineAsyncComponent as X, ref as p, toRefs as it, watch as he, shallowRef as Ne, onMounted as ct, onBeforeUnmount as vt, watchEffect as dt, createElementBlock as b, openBlock as m, unref as i, normalizeStyle as ae, normalizeClass as Re, createBlock as B, createCommentVNode as w, renderSlot as k, createSlots as ht, withCtx as $, normalizeProps as Y, guardReactiveProps as Z, createVNode as ft, Fragment as le, renderList as mt, createElementVNode as z, mergeProps as De, toDisplayString as J, createTextVNode as yt, nextTick as Le } from "vue";
|
|
2
|
+
import { u as pt, c as Be, t as bt, a as fe, p as oe, b as gt, o as kt, f as xt, d as wt, e as Ct, j as Ve, i as me, X as _t, l as zt, F as K, al as $t, v as Tt, w as St, k as He } from "./index-yC6NjpP_.js";
|
|
3
|
+
import { t as Ft, u as Ot } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as It } from "./usePrinter-DC8yU0M6.js";
|
|
5
|
+
import { u as Pt, B as At } from "./useLoading-D7YHNtLX.js";
|
|
6
|
+
import { u as Ue } from "./useNestedProp-CF55-wsO.js";
|
|
7
|
+
import { u as Mt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
8
|
+
import { u as Et } from "./useChartAccessibility-9icAAmYg.js";
|
|
9
|
+
import Nt from "./img-Bim7Y1-m.js";
|
|
10
|
+
import Rt from "./Title-CP3JSAsP.js";
|
|
11
|
+
import { _ as Dt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
+
function je(r, v = 0) {
|
|
13
|
+
const f = r.reduce((o, { x: s, r: u }) => Math.min(o, s - u - v), 1 / 0), y = r.reduce((o, { x: s, r: u }) => Math.max(o, s + u + v), -1 / 0), d = r.reduce((o, { y: s, r: u }) => Math.min(o, s - u - v), 1 / 0), n = r.reduce((o, { y: s, r: u }) => Math.max(o, s + u + v), -1 / 0);
|
|
14
|
+
return [f, d, y - f, n - d];
|
|
15
|
+
}
|
|
16
|
+
function Lt(r, v, f) {
|
|
17
|
+
const y = r._, d = r.next._, n = y.r + d.r, o = (y.x * d.r + d.x * y.r) / n, s = (y.y * d.r + d.y * y.r) / n;
|
|
18
|
+
return Math.max(Math.abs(o * f), Math.abs(s * v));
|
|
19
|
+
}
|
|
20
|
+
function Ge(r, v, f) {
|
|
21
|
+
const y = Lt, d = r.length;
|
|
22
|
+
if (!d) return r;
|
|
23
|
+
let n, o, s;
|
|
24
|
+
if (n = r[0], n.x = 0, n.y = 0, !(d > 1) || (o = r[1], n.x = -o.r, o.x = n.r, o.y = 0, !(d > 2))) return r;
|
|
25
|
+
We(o, n, s = r[2]), n = new ne(n), o = new ne(o), s = new ne(s), n.next = s.previous = o, o.next = n.previous = s, s.next = o.previous = n;
|
|
26
|
+
e: for (let u = 3; u < d; ++u) {
|
|
27
|
+
We(n._, o._, s = r[u]), s = new ne(s);
|
|
28
|
+
let x = o.next, T = n.previous, V = o._.r, S = n._.r;
|
|
29
|
+
do
|
|
30
|
+
if (V <= S) {
|
|
31
|
+
if (qe(x._, s._)) {
|
|
32
|
+
o = x, n.next = o, o.previous = n, --u;
|
|
33
|
+
continue e;
|
|
34
|
+
}
|
|
35
|
+
V += x._.r, x = x.next;
|
|
36
|
+
} else {
|
|
37
|
+
if (qe(T._, s._)) {
|
|
38
|
+
n = T, n.next = o, o.previous = n, --u;
|
|
39
|
+
continue e;
|
|
40
|
+
}
|
|
41
|
+
S += T._.r, T = T.previous;
|
|
42
|
+
}
|
|
43
|
+
while (x !== T.next);
|
|
44
|
+
s.previous = n, s.next = o, n.next = o.previous = o = s;
|
|
45
|
+
let C = y(n, f, v), H;
|
|
46
|
+
for (; (s = s.next) !== o; )
|
|
47
|
+
(H = y(s, f, v)) < C && (n = s, C = H);
|
|
48
|
+
o = n.next;
|
|
49
|
+
}
|
|
50
|
+
return r;
|
|
51
|
+
}
|
|
52
|
+
function We(r, v, f) {
|
|
53
|
+
const y = r.x - v.x, d = r.y - v.y, n = y * y + d * d;
|
|
54
|
+
if (n) {
|
|
55
|
+
const o = (v.r + f.r) ** 2, s = (r.r + f.r) ** 2;
|
|
56
|
+
if (o > s) {
|
|
57
|
+
const u = (n + s - o) / (2 * n), x = Math.sqrt(Math.max(0, s / n - u * u));
|
|
58
|
+
f.x = r.x - u * y - x * d, f.y = r.y - u * d + x * y;
|
|
59
|
+
} else {
|
|
60
|
+
const u = (n + o - s) / (2 * n), x = Math.sqrt(Math.max(0, o / n - u * u));
|
|
61
|
+
f.x = v.x + u * y - x * d, f.y = v.y + u * d + x * y;
|
|
62
|
+
}
|
|
63
|
+
} else
|
|
64
|
+
f.x = v.x + f.r, f.y = v.y;
|
|
65
|
+
}
|
|
66
|
+
function qe(r, v) {
|
|
67
|
+
const f = r.r + v.r - 1e-6, y = v.x - r.x, d = v.y - r.y;
|
|
68
|
+
return f > 0 && f * f > y * y + d * d;
|
|
69
|
+
}
|
|
70
|
+
class ne {
|
|
71
|
+
constructor(v) {
|
|
72
|
+
this._ = v, this.next = null, this.previous = null;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
const Bt = ["id"], Vt = ["xmlns", "viewBox", "height", "width"], Ht = ["x", "y", "width", "height"], Ut = ["id"], jt = ["stop-color"], Gt = ["stop-color"], Wt = ["stop-color"], qt = { key: 0 }, Xt = ["x", "y", "width", "height", "stroke", "stroke-width", "fill", "rx", "onMouseenter", "onMouseout", "onClick"], Yt = ["x", "y", "width", "height", "stroke", "stroke-width", "fill", "rx"], Zt = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Jt = ["opacity", "x", "y", "font-size", "fill", "font-weight"], Kt = ["cx", "cy", "r", "opacity", "stroke", "stroke-width", "fill"], Qt = {
|
|
76
|
+
key: 0,
|
|
77
|
+
style: { pointerEvents: "none" }
|
|
78
|
+
}, ea = { key: 1 }, ta = ["opacity", "x", "y", "font-size", "fill", "font-weight"], aa = ["opacity", "x", "y", "font-size", "fill", "font-weight"], la = {
|
|
79
|
+
key: 4,
|
|
80
|
+
class: "vue-data-ui-watermark"
|
|
81
|
+
}, oa = ["innerHTML"], na = {
|
|
82
|
+
__name: "vue-ui-circle-pack",
|
|
83
|
+
props: {
|
|
84
|
+
config: {
|
|
85
|
+
type: Object,
|
|
86
|
+
default() {
|
|
87
|
+
return {};
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
dataset: {
|
|
91
|
+
type: Array,
|
|
92
|
+
default() {
|
|
93
|
+
return [];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
emits: ["selectDatapoint"],
|
|
98
|
+
setup(r, { expose: v, emit: f }) {
|
|
99
|
+
rt((t) => ({
|
|
100
|
+
"336045f2": L.value,
|
|
101
|
+
b72ba32a: ie.value
|
|
102
|
+
}));
|
|
103
|
+
const y = X(() => import("./vue-ui-accordion-D1RDCQOF.js")), d = X(() => import("./DataTable-CMMsXA0n.js")), n = X(() => import("./UserOptions-HpTycUgM.js")), o = X(() => import("./PenAndPaper-CBpnHUIk.js")), s = X(() => import("./PackageVersion-B1daxzGa.js")), u = r, x = f, { vue_ui_circle_pack: T } = pt(), V = _(() => !!u.dataset && u.dataset.length), S = p(Be()), C = p(null), H = p(null), ye = p(null), pe = p(0), be = p(0), ge = p(0), Xe = p(null), e = p(ue()), { loading: ke, FINAL_DATASET: xe } = Pt({
|
|
104
|
+
...it(u),
|
|
105
|
+
FINAL_CONFIG: e,
|
|
106
|
+
prepareConfig: ue,
|
|
107
|
+
skeletonDataset: [
|
|
108
|
+
{ name: "_", value: 13, color: "#F2F2F2" },
|
|
109
|
+
{ name: "_", value: 8, color: "#DBDBDB" },
|
|
110
|
+
{ name: "_", value: 5, color: "#ADADAD" },
|
|
111
|
+
{ name: "_", value: 3, color: "#969696" },
|
|
112
|
+
{ name: "_", value: 2, color: "#808080" },
|
|
113
|
+
{ name: "_", value: 1, color: "#696969" }
|
|
114
|
+
],
|
|
115
|
+
skeletonConfig: bt({
|
|
116
|
+
defaultConfig: e.value,
|
|
117
|
+
userConfig: {
|
|
118
|
+
userOptions: { show: !1 },
|
|
119
|
+
table: { show: !1 },
|
|
120
|
+
style: {
|
|
121
|
+
chart: {
|
|
122
|
+
backgroundColor: "#99999930",
|
|
123
|
+
circles: {
|
|
124
|
+
stroke: "#6A6A6A",
|
|
125
|
+
labels: {
|
|
126
|
+
name: { show: !1 },
|
|
127
|
+
value: { show: !1 }
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
}), { svgRef: we } = Et({ config: e.value.style.chart.title }), {
|
|
135
|
+
userOptionsVisible: se,
|
|
136
|
+
setUserOptionsVisibility: Ce,
|
|
137
|
+
keepUserOptionState: _e
|
|
138
|
+
} = Mt({ config: e.value });
|
|
139
|
+
function ue() {
|
|
140
|
+
const t = Ue({
|
|
141
|
+
userConfig: u.config,
|
|
142
|
+
defaultConfig: T
|
|
143
|
+
});
|
|
144
|
+
return t.theme ? {
|
|
145
|
+
...Ue({
|
|
146
|
+
userConfig: gt.vue_ui_circle_pack[t.theme] || u.config,
|
|
147
|
+
defaultConfig: t
|
|
148
|
+
}),
|
|
149
|
+
customPalette: fe[t.theme] || oe
|
|
150
|
+
} : t;
|
|
151
|
+
}
|
|
152
|
+
he(() => u.config, (t) => {
|
|
153
|
+
e.value = ue(), se.value = !e.value.userOptions.showOnChartHover, re(), pe.value += 1, be.value += 1, N.value.showTable = e.value.table.show;
|
|
154
|
+
}, { deep: !0 });
|
|
155
|
+
const { isPrinting: ze, isImaging: $e, generatePdf: Te, generateImage: Se } = It({
|
|
156
|
+
elementId: `vue-ui-circle-pack_${S.value}`,
|
|
157
|
+
fileName: e.value.style.chart.title.text || "vue-ui-circle-pack",
|
|
158
|
+
options: e.value.userOptions.print
|
|
159
|
+
}), Ye = _(() => e.value.userOptions.show && !e.value.style.chart.title.text), N = p({
|
|
160
|
+
showTable: e.value.table.show
|
|
161
|
+
});
|
|
162
|
+
he(e, () => {
|
|
163
|
+
N.value = {
|
|
164
|
+
showTable: e.value.table.show
|
|
165
|
+
};
|
|
166
|
+
}, { immediate: !0 });
|
|
167
|
+
const F = Ne(null), R = Ne(null), A = p({ h: 10, w: 10 }), Fe = p(0), M = p([0, 0, 100, 100]), U = p({ h: 0, w: 0 }), Ze = _(() => e.value.debug);
|
|
168
|
+
async function re() {
|
|
169
|
+
kt(u.dataset) && xt({
|
|
170
|
+
componentName: "VueUiCirclePack",
|
|
171
|
+
type: "dataset",
|
|
172
|
+
debug: Ze.value
|
|
173
|
+
}), A.value = { h: 10, w: 10 }, M.value = [0, 0, 100, 100], U.value = { h: 0, w: 0 }, D.value = await Ge(Q.value), O.value = je(D.value, 1).join(" "), U.value = Oe(C.value);
|
|
174
|
+
const t = Ft(() => {
|
|
175
|
+
const { width: l, height: a, heightTitle: c, heightNoTitle: g } = Ot({
|
|
176
|
+
chart: C.value,
|
|
177
|
+
title: H.value,
|
|
178
|
+
noTitle: ye.value
|
|
179
|
+
}), E = Math.max(10, l), de = Math.max(10, a - 12);
|
|
180
|
+
Fe.value = e.value.style.chart.title.text ? c : g, requestAnimationFrame(() => {
|
|
181
|
+
A.value.w = E, A.value.h = de - Fe.value, Le(async () => {
|
|
182
|
+
const st = Q.value.map((ut) => ({ ...ut }));
|
|
183
|
+
D.value = await Ge(st, A.value.h, A.value.w), M.value = je(D.value, 1), O.value = M.value.join(" "), U.value = Oe(C.value);
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
F.value && (R.value && F.value.unobserve(R.value), F.value.disconnect()), F.value = new ResizeObserver(t), R.value = C.value.parentNode, F.value.observe(R.value);
|
|
188
|
+
}
|
|
189
|
+
ct(re), vt(() => {
|
|
190
|
+
F.value && (R.value && F.value.unobserve(R.value), F.value.disconnect());
|
|
191
|
+
});
|
|
192
|
+
function Oe(t) {
|
|
193
|
+
if (!t || !t.parentElement)
|
|
194
|
+
return console.warn("Component or parent element is missing."), { w: 0, h: 0 };
|
|
195
|
+
const l = t.parentElement;
|
|
196
|
+
if (l.offsetWidth > 0 && l.offsetHeight > 0)
|
|
197
|
+
return { w: l.offsetWidth, h: l.offsetHeight };
|
|
198
|
+
const a = window.getComputedStyle(l), c = a.width, g = a.height;
|
|
199
|
+
return c !== "auto" && g !== "auto" && parseFloat(c) > 0 && parseFloat(g) > 0 ? { w: parseFloat(c), h: parseFloat(g) } : { w: 0, h: 0 };
|
|
200
|
+
}
|
|
201
|
+
he(() => xe.value, async (t) => {
|
|
202
|
+
await re();
|
|
203
|
+
}, { deep: !0 });
|
|
204
|
+
const Je = _(() => wt(e.value.customPalette)), Q = _(() => xe.value.map((t, l) => {
|
|
205
|
+
const a = Ct(t.color) || Je.value[l] || fe[e.value.theme || "default"][l % fe[e.value.theme || "default"].length] || oe[l] || oe[l % oe.length];
|
|
206
|
+
return {
|
|
207
|
+
...t,
|
|
208
|
+
r: t.value,
|
|
209
|
+
id: Be(),
|
|
210
|
+
color: a
|
|
211
|
+
};
|
|
212
|
+
}).filter((t) => ![null, void 0, 1 / 0, -1 / 0].includes(t.value))), D = p([]), O = p("0 0 100 100"), j = _(() => Math.max(...D.value.map((t) => t.r)));
|
|
213
|
+
function Ie(t, l) {
|
|
214
|
+
return l / j.value * t;
|
|
215
|
+
}
|
|
216
|
+
function Ke(t, l) {
|
|
217
|
+
h.value = null, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: l });
|
|
218
|
+
}
|
|
219
|
+
function Qe(t, l) {
|
|
220
|
+
x("selectDatapoint", t), e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: l });
|
|
221
|
+
}
|
|
222
|
+
function et(t, l) {
|
|
223
|
+
tt(t), e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: l });
|
|
224
|
+
}
|
|
225
|
+
const h = p(null);
|
|
226
|
+
function tt(t) {
|
|
227
|
+
e.value.style.chart.circles.zoom.show && (h.value = t);
|
|
228
|
+
}
|
|
229
|
+
const L = _(() => h.value ? h.value.r : 0), ie = _(() => P.value ? L.value : h.value ? h.value.r > M.value[3] / 6 * e.value.style.chart.circles.zoom.zoomRatio ? h.value.r : M.value[3] / 6 * e.value.style.chart.circles.zoom.zoomRatio : 0), I = p(0), at = _(() => ({
|
|
230
|
+
pointerEvents: "none",
|
|
231
|
+
opacity: I.value,
|
|
232
|
+
filter: `drop-shadow(0px 0px 6px ${Ve(h.value.color, e.value.style.chart.circles.zoom.shadowForce)})`
|
|
233
|
+
})), G = p(L.value);
|
|
234
|
+
dt(() => {
|
|
235
|
+
G.value = L.value, I.value = 0;
|
|
236
|
+
let t = null;
|
|
237
|
+
function l(a) {
|
|
238
|
+
t || (t = a);
|
|
239
|
+
const c = (a - t) / e.value.style.chart.circles.zoom.animationFrameMs;
|
|
240
|
+
c < 1 ? (G.value = L.value + (ie.value - L.value) * c, I.value = 0 + e.value.style.chart.circles.zoom.opacity * c, requestAnimationFrame(l)) : (G.value = ie.value, I.value = e.value.style.chart.circles.zoom.opacity);
|
|
241
|
+
}
|
|
242
|
+
requestAnimationFrame(l);
|
|
243
|
+
});
|
|
244
|
+
const W = _(() => ({
|
|
245
|
+
name: e.value.style.chart.circles.zoom.label.name.fontSize * M.value[3] / 300,
|
|
246
|
+
value: e.value.style.chart.circles.zoom.label.value.fontSize * M.value[3] / 300
|
|
247
|
+
}));
|
|
248
|
+
function ce(t) {
|
|
249
|
+
return He(
|
|
250
|
+
e.value.style.chart.circles.labels.value.formatter,
|
|
251
|
+
t.value,
|
|
252
|
+
me({
|
|
253
|
+
p: e.value.style.chart.circles.labels.value.prefix,
|
|
254
|
+
v: t.value,
|
|
255
|
+
s: e.value.style.chart.circles.labels.value.suffix,
|
|
256
|
+
r: e.value.style.chart.circles.labels.value.rounding
|
|
257
|
+
})
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
function lt() {
|
|
261
|
+
return He(
|
|
262
|
+
e.value.style.chart.circles.zoom.label.value.formatter,
|
|
263
|
+
h.value.value,
|
|
264
|
+
me({
|
|
265
|
+
p: e.value.style.chart.circles.zoom.label.value.prefix,
|
|
266
|
+
v: h.value.value,
|
|
267
|
+
s: e.value.style.chart.circles.zoom.label.value.suffix,
|
|
268
|
+
r: e.value.style.chart.circles.zoom.label.value.rounding
|
|
269
|
+
})
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
function Pe(t) {
|
|
273
|
+
if (!t)
|
|
274
|
+
return 0;
|
|
275
|
+
const l = t.r / ce(t).length * (ce(t).length === 1 ? 1 : 2);
|
|
276
|
+
return Math.min(t.r / 2.5, l);
|
|
277
|
+
}
|
|
278
|
+
const q = p(!1);
|
|
279
|
+
function Ae(t) {
|
|
280
|
+
q.value = t, ge.value += 1;
|
|
281
|
+
}
|
|
282
|
+
const P = p(!1);
|
|
283
|
+
function ve() {
|
|
284
|
+
P.value = !P.value;
|
|
285
|
+
}
|
|
286
|
+
const ee = _(() => {
|
|
287
|
+
const t = Q.value.map((a) => ({
|
|
288
|
+
name: a.name,
|
|
289
|
+
value: a.value,
|
|
290
|
+
color: a.color
|
|
291
|
+
})).toSorted((a, c) => c.value - a.value), l = t.map((a) => a.value);
|
|
292
|
+
return { head: t, body: l };
|
|
293
|
+
});
|
|
294
|
+
function Me(t = null) {
|
|
295
|
+
Le(() => {
|
|
296
|
+
const l = ee.value.head.map((g, E) => [[
|
|
297
|
+
g.name
|
|
298
|
+
], [ee.value.body[E]]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(l), c = Tt(a);
|
|
299
|
+
t ? t(c) : St({ csvContent: c, title: e.value.style.chart.title.text || "vue-ui-circle-pack" });
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
const te = _(() => {
|
|
303
|
+
const t = [
|
|
304
|
+
e.value.table.columnNames.datapoint,
|
|
305
|
+
e.value.table.columnNames.value
|
|
306
|
+
], l = ee.value.head.map((g, E) => {
|
|
307
|
+
const de = me({
|
|
308
|
+
p: e.value.style.chart.circles.labels.value.prefix,
|
|
309
|
+
v: ee.value.body[E],
|
|
310
|
+
s: e.value.style.chart.circles.labels.value.suffix,
|
|
311
|
+
r: e.value.style.chart.circles.labels.value.rounding
|
|
312
|
+
});
|
|
313
|
+
return [
|
|
314
|
+
{
|
|
315
|
+
color: g.color,
|
|
316
|
+
name: g.name
|
|
317
|
+
},
|
|
318
|
+
de
|
|
319
|
+
];
|
|
320
|
+
}), a = {
|
|
321
|
+
th: {
|
|
322
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
323
|
+
color: e.value.table.th.color,
|
|
324
|
+
outline: e.value.table.th.outline
|
|
325
|
+
},
|
|
326
|
+
td: {
|
|
327
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
328
|
+
color: e.value.table.td.color,
|
|
329
|
+
outline: e.value.table.td.outline
|
|
330
|
+
},
|
|
331
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
332
|
+
};
|
|
333
|
+
return {
|
|
334
|
+
colNames: [
|
|
335
|
+
e.value.table.columnNames.datapoint,
|
|
336
|
+
e.value.table.columnNames.value
|
|
337
|
+
],
|
|
338
|
+
head: t,
|
|
339
|
+
body: l,
|
|
340
|
+
config: a
|
|
341
|
+
};
|
|
342
|
+
});
|
|
343
|
+
function Ee() {
|
|
344
|
+
N.value.showTable = !N.value.showTable;
|
|
345
|
+
}
|
|
346
|
+
function ot() {
|
|
347
|
+
return Q.value;
|
|
348
|
+
}
|
|
349
|
+
async function nt({ scale: t = 2 } = {}) {
|
|
350
|
+
if (!C.value) return;
|
|
351
|
+
const { width: l, height: a } = C.value.getBoundingClientRect(), c = l / a, { imageUri: g, base64: E } = await Nt({ domElement: C.value, base64: !0, img: !0, scale: t });
|
|
352
|
+
return {
|
|
353
|
+
imageUri: g,
|
|
354
|
+
base64: E,
|
|
355
|
+
title: e.value.style.chart.title.text,
|
|
356
|
+
width: l,
|
|
357
|
+
height: a,
|
|
358
|
+
aspectRatio: c
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
return v({
|
|
362
|
+
getData: ot,
|
|
363
|
+
getImage: nt,
|
|
364
|
+
generateCsv: Me,
|
|
365
|
+
generatePdf: Te,
|
|
366
|
+
generateImage: Se,
|
|
367
|
+
toggleTable: Ee,
|
|
368
|
+
toggleAnnotator: ve,
|
|
369
|
+
toggleFullscreen: Ae
|
|
370
|
+
}), (t, l) => (m(), b("div", {
|
|
371
|
+
id: `vue-ui-circle-pack_${S.value}`,
|
|
372
|
+
class: Re(`vue-ui-circle-pack ${q.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${i(ke) ? "loading" : ""}`),
|
|
373
|
+
ref_key: "circlePackChart",
|
|
374
|
+
ref: C,
|
|
375
|
+
style: ae(`font-family:${e.value.style.fontFamily};text-align:center;background:${e.value.style.chart.backgroundColor}; height: ${U.value.h}px; width:${U.value.w}px`),
|
|
376
|
+
onMouseenter: l[1] || (l[1] = () => i(Ce)(!0)),
|
|
377
|
+
onMouseleave: l[2] || (l[2] = () => i(Ce)(!1))
|
|
378
|
+
}, [
|
|
379
|
+
e.value.userOptions.buttons.annotator ? (m(), B(i(o), {
|
|
380
|
+
key: 0,
|
|
381
|
+
svgRef: i(we),
|
|
382
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
383
|
+
color: e.value.style.chart.color,
|
|
384
|
+
active: P.value,
|
|
385
|
+
scale: j.value / 100,
|
|
386
|
+
onClose: ve
|
|
387
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active", "scale"])) : w("", !0),
|
|
388
|
+
k(t.$slots, "userConfig", {}, void 0, !0),
|
|
389
|
+
Ye.value ? (m(), b("div", {
|
|
390
|
+
key: 1,
|
|
391
|
+
ref_key: "noTitle",
|
|
392
|
+
ref: ye,
|
|
393
|
+
class: "vue-data-ui-no-title-space",
|
|
394
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
395
|
+
}, null, 512)) : w("", !0),
|
|
396
|
+
e.value.style.chart.title.text ? (m(), b("div", {
|
|
397
|
+
key: 2,
|
|
398
|
+
ref_key: "chartTitle",
|
|
399
|
+
ref: H,
|
|
400
|
+
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
401
|
+
}, [
|
|
402
|
+
(m(), B(Rt, {
|
|
403
|
+
key: `title_${pe.value}`,
|
|
404
|
+
config: {
|
|
405
|
+
title: {
|
|
406
|
+
cy: "donut-div-title",
|
|
407
|
+
...e.value.style.chart.title
|
|
408
|
+
},
|
|
409
|
+
subtitle: {
|
|
410
|
+
cy: "donut-div-subtitle",
|
|
411
|
+
...e.value.style.chart.title.subtitle
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}, null, 8, ["config"]))
|
|
415
|
+
], 512)) : w("", !0),
|
|
416
|
+
e.value.userOptions.show && V.value && (i(_e) || i(se)) ? (m(), B(i(n), {
|
|
417
|
+
ref: "details",
|
|
418
|
+
key: `user_option_${ge.value}`,
|
|
419
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
420
|
+
color: e.value.style.chart.color,
|
|
421
|
+
isPrinting: i(ze),
|
|
422
|
+
isImaging: i($e),
|
|
423
|
+
uid: S.value,
|
|
424
|
+
hasTooltip: !1,
|
|
425
|
+
hasLabel: !1,
|
|
426
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
427
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
428
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
429
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
430
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
431
|
+
isFullscreen: q.value,
|
|
432
|
+
chartElement: C.value,
|
|
433
|
+
position: e.value.userOptions.position,
|
|
434
|
+
callbacks: e.value.userOptions.callbacks,
|
|
435
|
+
printScale: e.value.userOptions.print.scale,
|
|
436
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
437
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
438
|
+
isAnnotation: P.value,
|
|
439
|
+
onToggleFullscreen: Ae,
|
|
440
|
+
onGeneratePdf: i(Te),
|
|
441
|
+
onGenerateCsv: Me,
|
|
442
|
+
onGenerateImage: i(Se),
|
|
443
|
+
onToggleTable: Ee,
|
|
444
|
+
onToggleAnnotator: ve,
|
|
445
|
+
style: ae({
|
|
446
|
+
visibility: i(_e) ? i(se) ? "visible" : "hidden" : "visible"
|
|
447
|
+
})
|
|
448
|
+
}, ht({ _: 2 }, [
|
|
449
|
+
t.$slots.menuIcon ? {
|
|
450
|
+
name: "menuIcon",
|
|
451
|
+
fn: $(({ isOpen: a, color: c }) => [
|
|
452
|
+
k(t.$slots, "menuIcon", Y(Z({ isOpen: a, color: c })), void 0, !0)
|
|
453
|
+
]),
|
|
454
|
+
key: "0"
|
|
455
|
+
} : void 0,
|
|
456
|
+
t.$slots.optionPdf ? {
|
|
457
|
+
name: "optionPdf",
|
|
458
|
+
fn: $(() => [
|
|
459
|
+
k(t.$slots, "optionPdf", {}, void 0, !0)
|
|
460
|
+
]),
|
|
461
|
+
key: "1"
|
|
462
|
+
} : void 0,
|
|
463
|
+
t.$slots.optionCsv ? {
|
|
464
|
+
name: "optionCsv",
|
|
465
|
+
fn: $(() => [
|
|
466
|
+
k(t.$slots, "optionCsv", {}, void 0, !0)
|
|
467
|
+
]),
|
|
468
|
+
key: "2"
|
|
469
|
+
} : void 0,
|
|
470
|
+
t.$slots.optionImg ? {
|
|
471
|
+
name: "optionImg",
|
|
472
|
+
fn: $(() => [
|
|
473
|
+
k(t.$slots, "optionImg", {}, void 0, !0)
|
|
474
|
+
]),
|
|
475
|
+
key: "3"
|
|
476
|
+
} : void 0,
|
|
477
|
+
t.$slots.optionTable ? {
|
|
478
|
+
name: "optionTable",
|
|
479
|
+
fn: $(() => [
|
|
480
|
+
k(t.$slots, "optionTable", {}, void 0, !0)
|
|
481
|
+
]),
|
|
482
|
+
key: "4"
|
|
483
|
+
} : void 0,
|
|
484
|
+
t.$slots.optionFullscreen ? {
|
|
485
|
+
name: "optionFullscreen",
|
|
486
|
+
fn: $(({ toggleFullscreen: a, isFullscreen: c }) => [
|
|
487
|
+
k(t.$slots, "optionFullscreen", Y(Z({ toggleFullscreen: a, isFullscreen: c })), void 0, !0)
|
|
488
|
+
]),
|
|
489
|
+
key: "5"
|
|
490
|
+
} : void 0,
|
|
491
|
+
t.$slots.optionAnnotator ? {
|
|
492
|
+
name: "optionAnnotator",
|
|
493
|
+
fn: $(({ toggleAnnotator: a, isAnnotator: c }) => [
|
|
494
|
+
k(t.$slots, "optionAnnotator", Y(Z({ toggleAnnotator: a, isAnnotator: c })), void 0, !0)
|
|
495
|
+
]),
|
|
496
|
+
key: "6"
|
|
497
|
+
} : void 0
|
|
498
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "chartElement", "position", "callbacks", "printScale", "titles", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : w("", !0),
|
|
499
|
+
(m(), b("svg", {
|
|
500
|
+
ref_key: "svgRef",
|
|
501
|
+
ref: we,
|
|
502
|
+
xmlns: i(_t),
|
|
503
|
+
viewBox: O.value,
|
|
504
|
+
height: Math.max(10, A.value.h),
|
|
505
|
+
width: Math.max(10, A.value.w),
|
|
506
|
+
class: Re({ "vue-data-ui-fullscreen--on": q.value, "vue-data-ui-fulscreen--off": !q.value }),
|
|
507
|
+
style: ae(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color};background:${e.value.style.chart.backgroundColor};`)
|
|
508
|
+
}, [
|
|
509
|
+
ft(i(s)),
|
|
510
|
+
t.$slots["chart-background"] ? (m(), b("foreignObject", {
|
|
511
|
+
key: 0,
|
|
512
|
+
x: O.value.x,
|
|
513
|
+
y: O.value.y,
|
|
514
|
+
width: O.value.width,
|
|
515
|
+
height: O.value.height,
|
|
516
|
+
style: {
|
|
517
|
+
pointerEvents: "none"
|
|
518
|
+
}
|
|
519
|
+
}, [
|
|
520
|
+
k(t.$slots, "chart-background", {}, void 0, !0)
|
|
521
|
+
], 8, Ht)) : w("", !0),
|
|
522
|
+
(m(!0), b(le, null, mt(D.value, (a, c) => (m(), b(le, null, [
|
|
523
|
+
z("defs", null, [
|
|
524
|
+
z("radialGradient", {
|
|
525
|
+
id: a.id,
|
|
526
|
+
fy: "30%"
|
|
527
|
+
}, [
|
|
528
|
+
z("stop", {
|
|
529
|
+
offset: "10%",
|
|
530
|
+
"stop-color": i(zt)(a.color, e.value.style.chart.circles.gradient.intensity / 100)
|
|
531
|
+
}, null, 8, jt),
|
|
532
|
+
z("stop", {
|
|
533
|
+
offset: "90%",
|
|
534
|
+
"stop-color": i(Ve)(a.color, 0.1)
|
|
535
|
+
}, null, 8, Gt),
|
|
536
|
+
z("stop", {
|
|
537
|
+
offset: "100%",
|
|
538
|
+
"stop-color": a.color
|
|
539
|
+
}, null, 8, Wt)
|
|
540
|
+
], 8, Ut)
|
|
541
|
+
]),
|
|
542
|
+
t.$slots.pattern ? (m(), b("g", qt, [
|
|
543
|
+
z("defs", null, [
|
|
544
|
+
k(t.$slots, "pattern", De({ ref_for: !0 }, { ...a, patternId: `pattern_${S.value}_${a.id}` }), void 0, !0)
|
|
545
|
+
])
|
|
546
|
+
])) : w("", !0),
|
|
547
|
+
z("rect", {
|
|
548
|
+
x: a.x - a.r,
|
|
549
|
+
y: a.y - a.r,
|
|
550
|
+
width: a.r * 2,
|
|
551
|
+
height: a.r * 2,
|
|
552
|
+
stroke: e.value.style.chart.circles.stroke,
|
|
553
|
+
"stroke-width": e.value.style.chart.circles.strokeWidth * j.value / 100,
|
|
554
|
+
fill: e.value.style.chart.circles.gradient.show ? `url(#${a.id})` : a.color,
|
|
555
|
+
rx: a.r,
|
|
556
|
+
onMouseenter: (g) => et(a, c),
|
|
557
|
+
onMouseout: (g) => Ke(a, c),
|
|
558
|
+
onClick: (g) => Qe(a, c)
|
|
559
|
+
}, null, 40, Xt),
|
|
560
|
+
t.$slots.pattern ? (m(), b("rect", {
|
|
561
|
+
key: 1,
|
|
562
|
+
x: a.x - a.r,
|
|
563
|
+
y: a.y - a.r,
|
|
564
|
+
width: a.r * 2,
|
|
565
|
+
height: a.r * 2,
|
|
566
|
+
stroke: e.value.style.chart.circles.stroke,
|
|
567
|
+
"stroke-width": e.value.style.chart.circles.strokeWidth * j.value / 100,
|
|
568
|
+
fill: `url(#pattern_${S.value}_${a.id})`,
|
|
569
|
+
rx: a.r,
|
|
570
|
+
style: {
|
|
571
|
+
pointerEvents: "none"
|
|
572
|
+
}
|
|
573
|
+
}, null, 8, Yt)) : w("", !0),
|
|
574
|
+
t.$slots["data-label"] ? k(t.$slots, "data-label", De({
|
|
575
|
+
key: 2,
|
|
576
|
+
ref_for: !0
|
|
577
|
+
}, { ...a, createTSpans: i($t), fontSize: { name: a.r / 3 * e.value.style.chart.circles.labels.name.fontSizeRatio, value: Pe(a) * e.value.style.chart.circles.labels.value.fontSizeRatio }, color: e.value.style.chart.circles.labels.name.color ? e.value.style.chart.circles.labels.name.color : i(K)(a.color) }), void 0, !0) : (m(), b(le, { key: 3 }, [
|
|
578
|
+
e.value.style.chart.circles.labels.name.show && a.name ? (m(), b("text", {
|
|
579
|
+
key: 0,
|
|
580
|
+
style: {
|
|
581
|
+
pointerEvents: "none",
|
|
582
|
+
transition: "opacity 0.2s ease-in-out"
|
|
583
|
+
},
|
|
584
|
+
opacity: h.value && !P.value ? 0.2 : 1,
|
|
585
|
+
x: a.x,
|
|
586
|
+
y: a.y + Ie(a.r, e.value.style.chart.circles.labels.name.offsetY) - a.r / 10,
|
|
587
|
+
"font-size": a.r / 3 * e.value.style.chart.circles.labels.name.fontSizeRatio,
|
|
588
|
+
fill: e.value.style.chart.circles.labels.name.color ? e.value.style.chart.circles.labels.name.color : i(K)(a.color),
|
|
589
|
+
"font-weight": e.value.style.chart.circles.labels.name.bold ? "bold" : "normal",
|
|
590
|
+
"text-anchor": "middle"
|
|
591
|
+
}, J(a.name), 9, Zt)) : w("", !0),
|
|
592
|
+
e.value.style.chart.circles.labels.value.show ? (m(), b("text", {
|
|
593
|
+
key: 1,
|
|
594
|
+
style: {
|
|
595
|
+
pointerEvents: "none",
|
|
596
|
+
transition: "opacity 0.2s ease-in-out"
|
|
597
|
+
},
|
|
598
|
+
opacity: h.value && !P.value ? 0.2 : 1,
|
|
599
|
+
x: a.x,
|
|
600
|
+
y: a.y + Ie(a.r, e.value.style.chart.circles.labels.value.offsetY) + a.r / 2.5,
|
|
601
|
+
"font-size": Pe(a) * e.value.style.chart.circles.labels.value.fontSizeRatio,
|
|
602
|
+
fill: e.value.style.chart.circles.labels.value.color ? e.value.style.chart.circles.labels.value.color : i(K)(a.color),
|
|
603
|
+
"font-weight": e.value.style.chart.circles.labels.value.bold ? "bold" : "normal",
|
|
604
|
+
"text-anchor": "middle"
|
|
605
|
+
}, J(ce(a)), 9, Jt)) : w("", !0)
|
|
606
|
+
], 64))
|
|
607
|
+
], 64))), 256)),
|
|
608
|
+
h.value && e.value.style.chart.circles.zoom.show && !P.value ? (m(), b(le, { key: 1 }, [
|
|
609
|
+
z("circle", {
|
|
610
|
+
style: ae(at.value),
|
|
611
|
+
cx: h.value.x,
|
|
612
|
+
cy: h.value.y,
|
|
613
|
+
r: G.value,
|
|
614
|
+
opacity: I.value,
|
|
615
|
+
stroke: e.value.style.chart.circles.stroke,
|
|
616
|
+
"stroke-width": e.value.style.chart.circles.strokeWidth * j.value / 100,
|
|
617
|
+
fill: e.value.style.chart.circles.gradient.show ? `url(#${h.value.id})` : h.value.color
|
|
618
|
+
}, null, 12, Kt),
|
|
619
|
+
t.$slots["zoom-label"] ? (m(), b("g", Qt, [
|
|
620
|
+
k(t.$slots, "zoom-label", Y(Z({ ...h.value, zoomOpacity: I.value, currentRadius: G.value, fontSize: W.value })), void 0, !0)
|
|
621
|
+
])) : (m(), b("g", ea, [
|
|
622
|
+
z("text", {
|
|
623
|
+
style: {
|
|
624
|
+
pointerEvents: "none"
|
|
625
|
+
},
|
|
626
|
+
opacity: I.value,
|
|
627
|
+
x: h.value.x,
|
|
628
|
+
y: h.value.y + e.value.style.chart.circles.zoom.label.name.offsetY - W.value.name / 4,
|
|
629
|
+
"text-anchor": "middle",
|
|
630
|
+
"font-size": W.value.name,
|
|
631
|
+
fill: e.value.style.chart.circles.zoom.label.name.color ? e.value.style.chart.circles.zoom.label.name.color : i(K)(h.value.color),
|
|
632
|
+
"font-weight": e.value.style.chart.circles.zoom.label.name.bold ? "bold" : "normal"
|
|
633
|
+
}, J(h.value.name), 9, ta),
|
|
634
|
+
z("text", {
|
|
635
|
+
style: {
|
|
636
|
+
pointerEvents: "none"
|
|
637
|
+
},
|
|
638
|
+
opacity: I.value,
|
|
639
|
+
x: h.value.x,
|
|
640
|
+
y: h.value.y + W.value.value + e.value.style.chart.circles.zoom.label.value.offsetY,
|
|
641
|
+
"text-anchor": "middle",
|
|
642
|
+
"font-size": W.value.value,
|
|
643
|
+
fill: e.value.style.chart.circles.zoom.label.value.color ? e.value.style.chart.circles.zoom.label.value.color : i(K)(h.value.color),
|
|
644
|
+
"font-weight": e.value.style.chart.circles.zoom.label.value.bold ? "bold" : "normal"
|
|
645
|
+
}, J(lt()), 9, aa)
|
|
646
|
+
]))
|
|
647
|
+
], 64)) : w("", !0),
|
|
648
|
+
k(t.$slots, "svg", {
|
|
649
|
+
svg: { ...O.value }
|
|
650
|
+
}, void 0, !0)
|
|
651
|
+
], 14, Vt)),
|
|
652
|
+
t.$slots.watermark ? (m(), b("div", la, [
|
|
653
|
+
k(t.$slots, "watermark", Y(Z({ isPrinting: i(ze) || i($e) })), void 0, !0)
|
|
654
|
+
])) : w("", !0),
|
|
655
|
+
t.$slots.source ? (m(), b("div", {
|
|
656
|
+
key: 5,
|
|
657
|
+
ref_key: "source",
|
|
658
|
+
ref: Xe,
|
|
659
|
+
dir: "auto"
|
|
660
|
+
}, [
|
|
661
|
+
k(t.$slots, "source", {}, void 0, !0)
|
|
662
|
+
], 512)) : w("", !0),
|
|
663
|
+
V.value ? (m(), B(i(y), {
|
|
664
|
+
key: 6,
|
|
665
|
+
hideDetails: "",
|
|
666
|
+
config: {
|
|
667
|
+
open: N.value.showTable,
|
|
668
|
+
maxHeight: 1e4,
|
|
669
|
+
body: {
|
|
670
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
671
|
+
color: e.value.style.chart.color
|
|
672
|
+
},
|
|
673
|
+
head: {
|
|
674
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
675
|
+
color: e.value.style.chart.color
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
}, {
|
|
679
|
+
content: $(() => [
|
|
680
|
+
(m(), B(i(d), {
|
|
681
|
+
key: `table_${be.value}`,
|
|
682
|
+
colNames: te.value.colNames,
|
|
683
|
+
head: te.value.head,
|
|
684
|
+
body: te.value.body,
|
|
685
|
+
config: te.value.config,
|
|
686
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
687
|
+
onClose: l[0] || (l[0] = (a) => N.value.showTable = !1)
|
|
688
|
+
}, {
|
|
689
|
+
th: $(({ th: a }) => [
|
|
690
|
+
z("div", {
|
|
691
|
+
innerHTML: a,
|
|
692
|
+
style: { display: "flex", "align-items": "center" }
|
|
693
|
+
}, null, 8, oa)
|
|
694
|
+
]),
|
|
695
|
+
td: $(({ td: a }) => [
|
|
696
|
+
yt(J(a.name || a), 1)
|
|
697
|
+
]),
|
|
698
|
+
_: 1
|
|
699
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
700
|
+
]),
|
|
701
|
+
_: 1
|
|
702
|
+
}, 8, ["config"])) : w("", !0),
|
|
703
|
+
i(ke) ? (m(), B(At, { key: 7 })) : w("", !0)
|
|
704
|
+
], 46, Bt));
|
|
705
|
+
}
|
|
706
|
+
}, pa = /* @__PURE__ */ Dt(na, [["__scopeId", "data-v-4906f000"]]);
|
|
707
|
+
export {
|
|
708
|
+
pa as default
|
|
709
|
+
};
|