vue-data-ui 3.0.0-next.8 → 3.0.0
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 +32 -30
- package/dist/{Arrow-BRtNjitS.js → Arrow-r2f8Bpd-.js} +1 -1
- package/dist/{BaseDraggableDialog-CO9ok1PR.js → BaseDraggableDialog-CGGcf8d8.js} +4 -4
- package/dist/{BaseIcon-BuOIF6t5.js → BaseIcon-CXtL10fo.js} +1 -1
- package/dist/{ColorPicker-FH6oc0mS.js → ColorPicker-H91bBsqM.js} +2 -2
- package/dist/{DataTable-D36ZRtpU.js → DataTable-BSSXpM7w.js} +2 -2
- package/dist/{Legend-DInM-hku.js → Legend-BUk0WvWJ.js} +2 -2
- package/dist/{NonSvgPenAndPaper-B60MxEaz.js → NonSvgPenAndPaper-DQDgPoW8.js} +3 -3
- package/dist/{PackageVersion-CGQlqnmq.js → PackageVersion-CJ6Vd7V5.js} +3 -3
- package/dist/{PenAndPaper-B5slIHlh.js → PenAndPaper-D3zudcNI.js} +32 -32
- package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
- package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
- package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
- package/dist/{Shape-BGr3dQKt.js → Shape-BRzOzubn.js} +43 -37
- package/dist/Slicer-MID8pgT3.js +602 -0
- package/dist/{SparkTooltip-BWA23VgJ.js → SparkTooltip-DATI1fGZ.js} +7 -7
- package/dist/{Title-BSlAPr_H.js → Title-BGu6gEd2.js} +1 -1
- package/dist/{Tooltip-lPcsweXz.js → Tooltip-Bh2zYSoM.js} +23 -19
- package/dist/{UserOptions-Dn5TCQxg.js → UserOptions-Ck8fz9f4.js} +2 -2
- package/dist/{dom-to-png-Br-eVhJZ.js → dom-to-png-DhIh24Ti.js} +1 -1
- package/dist/{img-CgMUOQnb.js → img-DrR839Ot.js} +1 -1
- package/dist/{index-Cfm5-hMQ.js → index-BtNwOUja.js} +2885 -2010
- package/dist/{pdf-BMVHBLq5.js → pdf-DoShrdT5.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +753 -65
- package/dist/types/vue-data-ui.d.ts +753 -65
- package/dist/useAutoSizeLabelsInsideViewbox-FmDQyX4z.js +81 -0
- package/dist/useFitSvgText-2crs6Fv5.js +69 -0
- package/dist/useLoading-D7YHNtLX.js +29 -0
- package/dist/useNestedProp-f2H3m6Yj.js +13 -0
- package/dist/usePanZoom-BVca3eMk.js +122 -0
- package/dist/{usePrinter-B1Hgs47c.js → usePrinter-DUNjpQNe.js} +2 -2
- package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
- package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
- package/dist/{vue-data-ui-CD674-M3.js → vue-data-ui-D7QVxNhO.js} +105 -100
- package/dist/vue-data-ui.js +26 -25
- package/dist/vue-ui-3d-bar-ITaF-6Kn.js +1323 -0
- package/dist/{vue-ui-accordion-CEDGlyKI.js → vue-ui-accordion-BKUrAowe.js} +3 -3
- package/dist/vue-ui-age-pyramid-DxsuDr6o.js +835 -0
- package/dist/{vue-ui-annotator-CosgP-Fl.js → vue-ui-annotator-B06QtxgJ.js} +12 -12
- package/dist/vue-ui-bullet-B7Fy45tA.js +571 -0
- package/dist/vue-ui-candlestick-Dw0U4uIQ.js +1000 -0
- package/dist/{vue-ui-carousel-table-BG1ItsAb.js → vue-ui-carousel-table-DGz0nw28.js} +29 -29
- package/dist/{vue-ui-chestnut-6uKesZW9.js → vue-ui-chestnut-CFfKYm9i.js} +664 -536
- package/dist/vue-ui-chord-EhlQhMSs.js +1038 -0
- package/dist/vue-ui-circle-pack-BHrrEUUd.js +709 -0
- package/dist/{vue-ui-cursor-CkVnNEGn.js → vue-ui-cursor-Dd-HtWzG.js} +2 -2
- package/dist/{vue-ui-dashboard-D07ivGS7.js → vue-ui-dashboard-6R8udDY3.js} +64 -64
- package/dist/{vue-ui-digits-Doidl3Lz.js → vue-ui-digits-zKn3uhGN.js} +2 -2
- package/dist/{vue-ui-donut-CWvzqAAa.js → vue-ui-donut-BtnIwS_E.js} +433 -424
- package/dist/vue-ui-donut-evolution-DHo1MuMM.js +1076 -0
- package/dist/vue-ui-dumbbell-Czi9r9Na.js +1120 -0
- package/dist/vue-ui-flow-jOfM0RZY.js +841 -0
- package/dist/{vue-ui-funnel-D1pFzjJa.js → vue-ui-funnel-tBvVpdhy.js} +16 -16
- package/dist/vue-ui-galaxy-IdoY2oqG.js +680 -0
- package/dist/vue-ui-gauge-DR6Xm_Hz.js +791 -0
- package/dist/vue-ui-gizmo-Dto73UsB.js +210 -0
- package/dist/vue-ui-heatmap-zmFv-0z1.js +1078 -0
- package/dist/vue-ui-history-plot-ILemyyYw.js +1074 -0
- package/dist/{vue-ui-kpi-DTeZbrJk.js → vue-ui-kpi-hmqSCvxr.js} +26 -26
- package/dist/{vue-ui-mini-loader-itpDcfZU.js → vue-ui-mini-loader-CbD-E8ci.js} +2 -2
- package/dist/vue-ui-molecule-mTy6YIm6.js +656 -0
- package/dist/vue-ui-mood-radar-BEnSYV3Q.js +785 -0
- package/dist/vue-ui-nested-donuts-CGE9dmJK.js +1284 -0
- package/dist/vue-ui-onion-Dh2J9GV0.js +776 -0
- package/dist/vue-ui-parallel-coordinate-plot-xsgmMIJK.js +916 -0
- package/dist/{vue-ui-quadrant-0milmSNS.js → vue-ui-quadrant-DA0Kw6eq.js} +512 -459
- package/dist/vue-ui-quick-chart-DKbxF5Yt.js +1762 -0
- package/dist/vue-ui-radar-BFY9bN_h.js +796 -0
- package/dist/{vue-ui-rating-C3QUdrMw.js → vue-ui-rating-Bh35aujf.js} +2 -2
- package/dist/vue-ui-relation-circle-B-05kQ_l.js +598 -0
- package/dist/vue-ui-ridgeline-CuGfF83t.js +1157 -0
- package/dist/vue-ui-rings-DrQXXzAM.js +728 -0
- package/dist/vue-ui-scatter-CWn9c7e9.js +1178 -0
- package/dist/{vue-ui-skeleton-P-1SRvsT.js → vue-ui-skeleton-oG4Bm5nL.js} +13 -13
- package/dist/{vue-ui-smiley-Cd1bhDuU.js → vue-ui-smiley-Cnwba_gV.js} +46 -46
- package/dist/vue-ui-spark-trend-D9iNCf4o.js +315 -0
- package/dist/vue-ui-sparkbar-iJkiubZC.js +351 -0
- package/dist/vue-ui-sparkgauge-BH3uA5rh.js +232 -0
- package/dist/vue-ui-sparkhistogram-B3kR62pf.js +380 -0
- package/dist/vue-ui-sparkline-DczR2ZAf.js +513 -0
- package/dist/vue-ui-sparkstackbar-Cg0ItRGH.js +421 -0
- package/dist/vue-ui-stackbar-d4PrzcGS.js +1371 -0
- package/dist/vue-ui-strip-plot-BXBpN5rl.js +916 -0
- package/dist/{vue-ui-table-B1tjuVi0.js → vue-ui-table-BXOLZXuz.js} +17 -17
- package/dist/{vue-ui-table-heatmap-BI8eIQG7.js → vue-ui-table-heatmap-7YT7VF2H.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CqBD7xhZ.js → vue-ui-table-sparkline-BfgqajJ2.js} +19 -16
- package/dist/vue-ui-thermometer-C7Tg6HLz.js +541 -0
- package/dist/{vue-ui-timer-sgO_Z6ja.js → vue-ui-timer-Ch5JP1pQ.js} +5 -5
- package/dist/vue-ui-tiremarks-fY-4pWAK.js +406 -0
- package/dist/vue-ui-treemap-DTSX6suB.js +1035 -0
- package/dist/{vue-ui-vertical-bar-BPay31_q.js → vue-ui-vertical-bar-C-i2dRnU.js} +107 -105
- package/dist/vue-ui-waffle-BbgLlhGH.js +910 -0
- package/dist/vue-ui-wheel-waZf462K.js +379 -0
- package/dist/vue-ui-word-cloud-DtLK91Dk.js +765 -0
- package/dist/{vue-ui-world-DWskeHfE.js → vue-ui-world-Cx4uuwTY.js} +364 -327
- package/dist/vue-ui-xy-DDOT8cyx.js +3808 -0
- package/dist/{vue-ui-xy-canvas-Dkmsguo1.js → vue-ui-xy-canvas-CUCsC8vD.js} +265 -264
- package/package.json +4 -4
- package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
- package/dist/Slicer-O07lQwRC.js +0 -577
- package/dist/useLoading-Bt5Doa8m.js +0 -28
- package/dist/useNestedProp-Hh7nGEjp.js +0 -13
- package/dist/usePanZoom-BQMvRXEQ.js +0 -115
- package/dist/vue-ui-3d-bar-DWtJoryQ.js +0 -1227
- package/dist/vue-ui-age-pyramid-DbrA1G0r.js +0 -746
- package/dist/vue-ui-bullet-9IB3mGon.js +0 -513
- package/dist/vue-ui-candlestick-CWqPF_zW.js +0 -873
- package/dist/vue-ui-chord-Crd3l1b6.js +0 -949
- package/dist/vue-ui-circle-pack-CAm2gxBi.js +0 -673
- package/dist/vue-ui-donut-evolution-Djp_eBqw.js +0 -903
- package/dist/vue-ui-dumbbell-B7GySnYf.js +0 -753
- package/dist/vue-ui-flow-XDpZAYWI.js +0 -765
- package/dist/vue-ui-galaxy-DBQy21se.js +0 -617
- package/dist/vue-ui-gauge-FBZaUrBD.js +0 -738
- package/dist/vue-ui-gizmo-CDbPxUzE.js +0 -192
- package/dist/vue-ui-heatmap-DsDWxYOS.js +0 -877
- package/dist/vue-ui-history-plot-CzO1Z1FH.js +0 -924
- package/dist/vue-ui-molecule-Ddd3FgID.js +0 -597
- package/dist/vue-ui-mood-radar-24XAq8mg.js +0 -670
- package/dist/vue-ui-nested-donuts-DjWASp62.js +0 -1212
- package/dist/vue-ui-onion-B9thdF_c.js +0 -701
- package/dist/vue-ui-parallel-coordinate-plot-DT-GhOaA.js +0 -807
- package/dist/vue-ui-quick-chart-D0DukVN6.js +0 -1612
- package/dist/vue-ui-radar-DY8y6oRc.js +0 -741
- package/dist/vue-ui-relation-circle-8Gd7_fxt.js +0 -542
- package/dist/vue-ui-ridgeline-iPtG1McW.js +0 -969
- package/dist/vue-ui-rings-BXPo4MMo.js +0 -685
- package/dist/vue-ui-scatter-26d0eebx.js +0 -1045
- package/dist/vue-ui-spark-trend-Dt3ctzpl.js +0 -291
- package/dist/vue-ui-sparkbar-RrxErqrU.js +0 -301
- package/dist/vue-ui-sparkgauge-CyNi1b0O.js +0 -201
- package/dist/vue-ui-sparkhistogram-DPpZCPuE.js +0 -313
- package/dist/vue-ui-sparkline-BMjQ_uYx.js +0 -459
- package/dist/vue-ui-sparkstackbar-CjO8pfE-.js +0 -381
- package/dist/vue-ui-stackbar-wgyvMlE6.js +0 -1207
- package/dist/vue-ui-strip-plot-BF1o8lvY.js +0 -761
- package/dist/vue-ui-thermometer-CtuxuYVt.js +0 -495
- package/dist/vue-ui-tiremarks-DOwj4ZE-.js +0 -358
- package/dist/vue-ui-treemap-C4LtyFug.js +0 -965
- package/dist/vue-ui-waffle-D8mzGTeo.js +0 -863
- package/dist/vue-ui-wheel-C6uAotal.js +0 -352
- package/dist/vue-ui-word-cloud-Bge2211V.js +0 -659
- package/dist/vue-ui-xy-UzQacbnA.js +0 -2982
|
@@ -0,0 +1,1038 @@
|
|
|
1
|
+
import { useCssVars as Ft, defineAsyncComponent as H, ref as d, shallowRef as Ke, toRefs as zt, watch as et, computed as C, onMounted as tt, onBeforeUnmount as at, createElementBlock as i, openBlock as r, unref as v, normalizeStyle as D, normalizeClass as F, createBlock as Y, createCommentVNode as h, renderSlot as k, createElementVNode as O, createSlots as ot, withCtx as P, normalizeProps as ie, guardReactiveProps as ce, withModifiers as lt, createVNode as ke, Fragment as z, renderList as G, mergeProps as Xt, toDisplayString as Q, createTextVNode as Ut, nextTick as Vt } from "vue";
|
|
2
|
+
import { u as jt, c as $e, t as Yt, a as Gt, p as ve, b as Wt, o as qt, f as st, g as Ht, d as Qt, e as Zt, X as Jt, F as Kt, i as we, a0 as ea, ab as ta, v as aa, w as oa, k as la } from "./index-BtNwOUja.js";
|
|
3
|
+
import { u as sa } from "./useUserOptionState-BIvW1Kz7.js";
|
|
4
|
+
import { u as nt } from "./useNestedProp-f2H3m6Yj.js";
|
|
5
|
+
import { u as na } from "./useChartAccessibility-9icAAmYg.js";
|
|
6
|
+
import { u as ra } from "./usePrinter-DUNjpQNe.js";
|
|
7
|
+
import { t as ua, u as ia } from "./useResponsive-DfdjqQps.js";
|
|
8
|
+
import ca from "./Legend-BUk0WvWJ.js";
|
|
9
|
+
import va from "./Title-BGu6gEd2.js";
|
|
10
|
+
import { _ as da } from "./Shape-BRzOzubn.js";
|
|
11
|
+
import ha from "./img-DrR839Ot.js";
|
|
12
|
+
import { u as fa, B as ga } from "./useLoading-D7YHNtLX.js";
|
|
13
|
+
import { _ as pa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const ba = ["id"], ma = ["xmlns", "viewBox"], ya = ["width", "height"], ka = { key: 1 }, $a = ["id", "d"], wa = { key: 2 }, Ca = ["transform"], Ma = ["d", "fill", "stroke", "stroke-width", "onMouseenter", "onMouseleave", "onClick"], xa = ["d", "fill", "stroke", "stroke-width"], Aa = ["d", "fill"], Ia = ["d", "fill", "stroke", "stroke-width", "onMouseenter", "onClick", "onMouseleave"], _a = ["d", "fill", "stroke", "stroke-width"], Pa = ["d", "fill", "stroke", "stroke-width"], Sa = ["d", "fill", "stroke", "stroke-width"], Ta = { key: 0 }, Ba = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], La = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Oa = ["cx", "cy", "r", "stroke", "stroke-width", "fill"], Ea = ["transform", "fill", "text-anchor", "font-size", "font-weight"], Na = { key: 1 }, Ra = ["font-size", "font-weight", "fill"], Da = ["href"], Fa = ["transform", "text-anchor", "font-size", "font-weight", "fill", "innerHTML"], za = {
|
|
15
|
+
key: 4,
|
|
16
|
+
class: "vue-data-ui-watermark"
|
|
17
|
+
}, Xa = ["onClick"], Ua = {
|
|
18
|
+
key: 6,
|
|
19
|
+
"data-dom-to-png-ignore": "",
|
|
20
|
+
class: "reset-wrapper"
|
|
21
|
+
}, Va = { style: { "text-align": "right", width: "100%" } }, ja = {
|
|
22
|
+
__name: "vue-ui-chord",
|
|
23
|
+
props: {
|
|
24
|
+
dataset: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default() {
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
config: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default() {
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
emits: ["selectLegend", "selectGroup", "selectRibbon"],
|
|
38
|
+
setup(rt, { expose: ut, emit: it }) {
|
|
39
|
+
Ft((e) => ({
|
|
40
|
+
"3d3f80fa": e.slicerColor
|
|
41
|
+
}));
|
|
42
|
+
const ct = H(() => import("./vue-ui-accordion-BKUrAowe.js")), vt = H(() => import("./BaseIcon-CXtL10fo.js")), dt = H(() => import("./DataTable-BSSXpM7w.js")), ht = H(() => import("./PackageVersion-CJ6Vd7V5.js")), ft = H(() => import("./PenAndPaper-D3zudcNI.js")), gt = H(() => import("./UserOptions-Ck8fz9f4.js")), { vue_ui_chord: pt } = jt(), T = rt, oe = it, E = d(!!T.dataset && Object.hasOwn(T.dataset, "matrix")), S = d($e()), $ = d(null), b = d(null), g = d(null), Ce = d(0), N = d(null), Me = d(null), xe = d(null), Ae = d(null), Ie = d(null), de = d(0), he = d(0), fe = d(0), W = d(!1), X = Ke(null), q = Ke(null), a = d(pe()), { loading: _e, FINAL_DATASET: w, manualLoading: Z } = fa({
|
|
43
|
+
...zt(T),
|
|
44
|
+
FINAL_CONFIG: a,
|
|
45
|
+
prepareConfig: pe,
|
|
46
|
+
skeletonDataset: {
|
|
47
|
+
matrix: [
|
|
48
|
+
[12e3, 6e3, 9e3, 3e3],
|
|
49
|
+
[2e3, 1e4, 2e3, 6001],
|
|
50
|
+
[8e3, 1600, 8e3, 8001],
|
|
51
|
+
[1e3, 1e3, 1e3, 7001]
|
|
52
|
+
],
|
|
53
|
+
labels: [],
|
|
54
|
+
colors: ["#DBDBDB", "#C4C4C4", "#ADADAD", "#969696"]
|
|
55
|
+
},
|
|
56
|
+
skeletonConfig: Yt({
|
|
57
|
+
defaultConfig: a.value,
|
|
58
|
+
userConfig: {
|
|
59
|
+
useCssAnimation: !1,
|
|
60
|
+
userOptions: { show: !1 },
|
|
61
|
+
table: { show: !1 },
|
|
62
|
+
style: {
|
|
63
|
+
chart: {
|
|
64
|
+
backgroundColor: "#99999930",
|
|
65
|
+
legend: {
|
|
66
|
+
backgroundColor: "transparent"
|
|
67
|
+
},
|
|
68
|
+
arcs: {
|
|
69
|
+
stroke: "#6A6A6A",
|
|
70
|
+
labels: {
|
|
71
|
+
show: !1
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
ribbons: {
|
|
75
|
+
stroke: "#6A6A6A",
|
|
76
|
+
underlayerOpacity: 0,
|
|
77
|
+
labels: {
|
|
78
|
+
show: !1
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
}), { userOptionsVisible: ge, setUserOptionsVisibility: Pe, keepUserOptionState: Se } = sa({ config: a.value }), { svgRef: J } = na({ config: a.value.style.chart.title }), { isPrinting: Te, isImaging: Be, generatePdf: Le, generateImage: Oe } = ra({
|
|
86
|
+
elementId: `chord_${S.value}`,
|
|
87
|
+
fileName: a.value.style.chart.title.text || "vue-ui-chord",
|
|
88
|
+
options: a.value.userOptions.print
|
|
89
|
+
}), K = d({
|
|
90
|
+
showTable: a.value.table.show
|
|
91
|
+
});
|
|
92
|
+
function pe() {
|
|
93
|
+
const e = nt({
|
|
94
|
+
userConfig: T.config,
|
|
95
|
+
defaultConfig: pt
|
|
96
|
+
});
|
|
97
|
+
return e.theme ? {
|
|
98
|
+
...nt({
|
|
99
|
+
userConfig: Wt.vue_ui_chord[e.theme] || T.config,
|
|
100
|
+
defaultConfig: e
|
|
101
|
+
}),
|
|
102
|
+
customPalette: Gt[e.theme] || ve
|
|
103
|
+
} : e;
|
|
104
|
+
}
|
|
105
|
+
et(() => T.config, (e) => {
|
|
106
|
+
_e.value || (a.value = pe()), ge.value = !a.value.userOptions.showOnChartHover, be(), de.value += 1, he.value += 1, fe.value += 1, x.value = a.value.initialRotation, K.value.showTable = a.value.table.show;
|
|
107
|
+
}, { deep: !0 });
|
|
108
|
+
const Ee = C(() => a.value.debug);
|
|
109
|
+
et(() => T.dataset, () => {
|
|
110
|
+
Ne(), be(), de.value += 1, he.value += 1, fe.value += 1;
|
|
111
|
+
});
|
|
112
|
+
function Ne() {
|
|
113
|
+
if (qt(T.dataset)) {
|
|
114
|
+
st({
|
|
115
|
+
componentName: "VueUiChord",
|
|
116
|
+
type: "dataset",
|
|
117
|
+
debug: Ee.value
|
|
118
|
+
}), E.value = !1, Z.value = !0;
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const e = Ht({
|
|
122
|
+
datasetObject: T.dataset,
|
|
123
|
+
requiredAttributes: ["matrix"]
|
|
124
|
+
});
|
|
125
|
+
if (e.length) {
|
|
126
|
+
e.forEach((n) => {
|
|
127
|
+
st({
|
|
128
|
+
componentName: "VueUiChord",
|
|
129
|
+
type: "datasetAttribute",
|
|
130
|
+
property: n,
|
|
131
|
+
debug: Ee.value
|
|
132
|
+
});
|
|
133
|
+
}), E.value = !1, Z.value = !0;
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const o = T.dataset.matrix;
|
|
137
|
+
if (!Array.isArray(o) || o.length < 2) {
|
|
138
|
+
console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
|
|
139
|
+
|
|
140
|
+
matrix:[
|
|
141
|
+
[1, 1],
|
|
142
|
+
[1, 1]
|
|
143
|
+
]`), E.value = !1, Z.value = !0;
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const t = o.length, l = o.findIndex((n) => !Array.isArray(n) || n.length !== t);
|
|
147
|
+
if (l !== -1) {
|
|
148
|
+
console.warn(
|
|
149
|
+
`VueUiChord - Invalid matrix: dataset.matrix at index ${l} has ${Array.isArray(o[l]) ? o[l].length : "NaN"} elements instead of the required ${t}
|
|
150
|
+
|
|
151
|
+
dataset.matrix[${l}] = [${Array.isArray(o[l]) ? o[l].toString() : "invalid"}]`
|
|
152
|
+
), E.value = !1, Z.value = !0;
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
E.value = !0, Z.value = !1;
|
|
156
|
+
}
|
|
157
|
+
function be() {
|
|
158
|
+
if (Ne(), a.value.responsive) {
|
|
159
|
+
const e = ua(() => {
|
|
160
|
+
const { width: o, height: t, heightNoTitle: l, heightSource: n, heightTitle: s, heightLegend: u } = ia({
|
|
161
|
+
chart: N.value,
|
|
162
|
+
title: a.value.style.chart.title.text ? Me.value : null,
|
|
163
|
+
legend: a.value.style.chart.legend.show ? xe.value : null,
|
|
164
|
+
source: Ae.value,
|
|
165
|
+
noTitle: Ie.value
|
|
166
|
+
}), f = s + u + n + l;
|
|
167
|
+
o < t ? N.value.style.width = "100%" : (N.value.style.height = "100%", J.value.style.height = `calc(100% - ${f}px)`);
|
|
168
|
+
}, 100);
|
|
169
|
+
X.value && (q.value && X.value.unobserve(q.value), X.value.disconnect()), X.value = new ResizeObserver(e), q.value = N.value.parentNode, X.value.observe(q.value), e();
|
|
170
|
+
}
|
|
171
|
+
Re.value = setTimeout(() => {
|
|
172
|
+
W.value = !0;
|
|
173
|
+
}, 500);
|
|
174
|
+
}
|
|
175
|
+
function bt() {
|
|
176
|
+
if (!w.value || !Object.hasOwn(w.value, "matrix") || w.value.matrix.length < 2) {
|
|
177
|
+
console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
|
|
178
|
+
|
|
179
|
+
matrix:[
|
|
180
|
+
[1, 1],
|
|
181
|
+
[1, 1]
|
|
182
|
+
]`), E.value = !1;
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
w.value.matrix.forEach((e, o) => {
|
|
186
|
+
e.length !== w.value.matrix.length && (console.warn(`VueUiChord - Invalid matrix: dataset.matrix at index ${o} has ${e.length} elements instead of the required ${w.value.matrix.length}
|
|
187
|
+
|
|
188
|
+
dataset.matrix[${o}] = [${e.toString()}] has a length of ${e.length} but should have the same length as the matrix itself (${w.value.matrix.length})`), E.value = !1);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
const Re = d(null);
|
|
192
|
+
tt(() => {
|
|
193
|
+
be();
|
|
194
|
+
});
|
|
195
|
+
const B = d({
|
|
196
|
+
height: 600,
|
|
197
|
+
width: 600
|
|
198
|
+
}), mt = C(() => a.value.userOptions.show && !a.value.style.chart.title.text), yt = C(() => Qt(a.value.customPalette)), p = C(() => ({
|
|
199
|
+
inner: B.value.width * 0.3 * a.value.style.chart.arcs.innerRadiusRatio,
|
|
200
|
+
outer: B.value.width * 0.34 * a.value.style.chart.arcs.outerRadiusRatio
|
|
201
|
+
})), kt = C(() => a.value.style.chart.arcs.padAngle / 100), m = C(() => ({
|
|
202
|
+
matrix: w.value.matrix ?? [[0]],
|
|
203
|
+
labels: w.value.labels ?? [""],
|
|
204
|
+
colors: w.value.colors && Array.isArray(w.value.colors) && w.value.colors.length ? w.value.colors.map((e) => Zt(e)) : w.value.matrix.map((e, o) => yt.value[o] || ve[o] || ve[o % ve.length])
|
|
205
|
+
}));
|
|
206
|
+
function $t(e, o) {
|
|
207
|
+
const t = e.length, l = p.value.inner, n = new Array(t).fill(0);
|
|
208
|
+
let s = 0;
|
|
209
|
+
for (let c = 0; c < t; c += 1)
|
|
210
|
+
for (let y = 0; y < t; y += 1)
|
|
211
|
+
n[c] += e[c][y], s += e[c][y];
|
|
212
|
+
const u = (2 * Math.PI - o * t) / s, f = [];
|
|
213
|
+
let A = 0;
|
|
214
|
+
for (let c = 0; c < t; c += 1) {
|
|
215
|
+
const y = A, _ = y + n[c] * u;
|
|
216
|
+
f.push({
|
|
217
|
+
index: c,
|
|
218
|
+
pattern: `pattern_${S.value}_${c}`,
|
|
219
|
+
startAngle: y,
|
|
220
|
+
endAngle: _,
|
|
221
|
+
name: m.value.labels[c],
|
|
222
|
+
id: $e(),
|
|
223
|
+
color: m.value.colors[c],
|
|
224
|
+
proportion: n[c] / s
|
|
225
|
+
}), A = _ + o;
|
|
226
|
+
}
|
|
227
|
+
const I = [];
|
|
228
|
+
for (let c = 0; c < t; c += 1) {
|
|
229
|
+
const y = e[c].map((L, U) => ({ j: U, v: L }));
|
|
230
|
+
y.sort((L, U) => U.v - L.v);
|
|
231
|
+
let _ = f[c].startAngle;
|
|
232
|
+
for (const { j: L, v: U } of y) {
|
|
233
|
+
const j = _, ae = j + U * u;
|
|
234
|
+
I.push({
|
|
235
|
+
index: c,
|
|
236
|
+
subIndex: L,
|
|
237
|
+
pattern: `pattern_${S.value}_${c}`,
|
|
238
|
+
startAngle: j,
|
|
239
|
+
endAngle: ae,
|
|
240
|
+
value: U,
|
|
241
|
+
groupName: m.value.labels[c],
|
|
242
|
+
groupId: f[c].id,
|
|
243
|
+
groupColor: m.value.colors[c],
|
|
244
|
+
midAngle: (j + ae) / 2,
|
|
245
|
+
midBaseX: Math.cos((j + ae) / 2 - Math.PI / 2) * l,
|
|
246
|
+
midBaseY: Math.sin((j + ae) / 2 - Math.PI / 2) * l
|
|
247
|
+
}), _ = ae;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
const R = [];
|
|
251
|
+
for (const c of I) {
|
|
252
|
+
const y = I.find(
|
|
253
|
+
(_) => _.index === c.subIndex && _.subIndex === c.index
|
|
254
|
+
);
|
|
255
|
+
R.push({ source: c, target: y, id: $e() });
|
|
256
|
+
}
|
|
257
|
+
return { groups: f, chords: R };
|
|
258
|
+
}
|
|
259
|
+
const M = C(() => {
|
|
260
|
+
const e = $t(m.value.matrix, kt.value);
|
|
261
|
+
return bt(), e.chords.sort(
|
|
262
|
+
(o, t) => Math.max(t.source.value, t.target.value) - Math.max(o.source.value, o.target.value)
|
|
263
|
+
), e;
|
|
264
|
+
}), wt = C(() => {
|
|
265
|
+
const e = p.value.outer + a.value.style.chart.ribbons.labels.offset + 12, t = a.value.style.chart.ribbons.labels.fontSize * 0.6, l = [];
|
|
266
|
+
if (b.value) {
|
|
267
|
+
const s = b.value;
|
|
268
|
+
if (s.source.value) {
|
|
269
|
+
const u = String(s.source.value);
|
|
270
|
+
l.push({
|
|
271
|
+
id: s.id + "-src",
|
|
272
|
+
theta: s.source.midAngle,
|
|
273
|
+
w: u.length * t / e,
|
|
274
|
+
midBaseX: s.source.midBaseX,
|
|
275
|
+
midBaseY: s.source.midBaseY,
|
|
276
|
+
groupColor: s.source.groupColor,
|
|
277
|
+
value: s.source.value
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
if (s.target && s.target.value && s.target.value !== s.source.value) {
|
|
281
|
+
const u = String(s.target.value);
|
|
282
|
+
l.push({
|
|
283
|
+
id: s.id + "-tgt",
|
|
284
|
+
theta: s.target.midAngle,
|
|
285
|
+
w: u.length * t / e,
|
|
286
|
+
midBaseX: s.target.midBaseX,
|
|
287
|
+
midBaseY: s.target.midBaseY,
|
|
288
|
+
groupColor: s.target.groupColor,
|
|
289
|
+
value: s.target.value
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
return l;
|
|
293
|
+
}
|
|
294
|
+
function n(s) {
|
|
295
|
+
M.value.chords.filter((u) => u.source.groupId === s && u.source.value).forEach((u) => {
|
|
296
|
+
{
|
|
297
|
+
const f = String(u.source.value);
|
|
298
|
+
l.push({
|
|
299
|
+
id: u.id + "-src",
|
|
300
|
+
theta: u.source.midAngle,
|
|
301
|
+
w: f.length * t / e,
|
|
302
|
+
midBaseX: u.source.midBaseX,
|
|
303
|
+
midBaseY: u.source.midBaseY,
|
|
304
|
+
groupColor: u.source.groupColor,
|
|
305
|
+
value: u.source.value
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
if (u.target && u.target.value && u.target.value !== u.source.value) {
|
|
309
|
+
const f = String(u.target.value);
|
|
310
|
+
l.push({
|
|
311
|
+
id: u.id + "-tgt",
|
|
312
|
+
theta: u.target.midAngle,
|
|
313
|
+
w: f.length * t / e,
|
|
314
|
+
midBaseX: u.target.midBaseX,
|
|
315
|
+
midBaseY: u.target.midBaseY,
|
|
316
|
+
groupColor: u.target.groupColor,
|
|
317
|
+
value: u.target.value
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
return g.value && n(g.value), $.value && n($.value.id), l;
|
|
323
|
+
}), Ct = C(() => {
|
|
324
|
+
const e = wt.value.map((n) => ({ ...n })).sort((n, s) => n.theta - s.theta), o = a.value.style.chart.ribbons.labels.minSeparationDeg * Math.PI / 180;
|
|
325
|
+
let t = !0, l = 0;
|
|
326
|
+
for (; t && l++ < 10; ) {
|
|
327
|
+
t = !1;
|
|
328
|
+
for (let f = 1; f < e.length; f += 1) {
|
|
329
|
+
const A = e[f - 1], I = e[f], R = A.theta + A.w + o;
|
|
330
|
+
I.theta < R && (I.theta = R, t = !0);
|
|
331
|
+
}
|
|
332
|
+
const n = e[0], s = e[e.length - 1], u = s.theta + s.w + o - 2 * Math.PI;
|
|
333
|
+
n.theta < u && (n.theta = u, t = !0);
|
|
334
|
+
}
|
|
335
|
+
return e;
|
|
336
|
+
});
|
|
337
|
+
function De(e, o, t, l) {
|
|
338
|
+
const n = e - Math.PI / 2, s = o - Math.PI / 2, u = Math.cos(n) * t, f = Math.sin(n) * t, A = Math.cos(s) * t, I = Math.sin(s) * t, R = Math.cos(s) * l, c = Math.sin(s) * l, y = Math.cos(n) * l, _ = Math.sin(n) * l, L = o - e > Math.PI ? 1 : 0;
|
|
339
|
+
return `M${u},${f} A${t},${t} 0 ${L} 1 ${A},${I} L${R},${c} A${l},${l} 0 ${L} 0 ${y},${_} Z`;
|
|
340
|
+
}
|
|
341
|
+
function le(e, o) {
|
|
342
|
+
const t = p.value.inner, l = e.startAngle - Math.PI / 2, n = e.endAngle - Math.PI / 2, s = o.startAngle - Math.PI / 2, u = o.endAngle - Math.PI / 2, f = Math.cos(l) * t, A = Math.sin(l) * t, I = Math.cos(n) * t, R = Math.sin(n) * t, c = Math.cos(s) * t, y = Math.sin(s) * t, _ = Math.cos(u) * t, L = Math.sin(u) * t, U = e.endAngle - e.startAngle > Math.PI ? 1 : 0, j = o.endAngle - o.startAngle > Math.PI ? 1 : 0;
|
|
343
|
+
return `M${f},${A}A${t},${t} 0 ${U} 1 ${I},${R}Q0,0 ${c},${y}A${t},${t} 0 ${j} 1 ${_},${L}Q0,0 ${f},${A}Z`;
|
|
344
|
+
}
|
|
345
|
+
const Fe = C(() => x.value * Math.PI / 180);
|
|
346
|
+
function Mt(e) {
|
|
347
|
+
return (e.startAngle + e.endAngle) / 2;
|
|
348
|
+
}
|
|
349
|
+
function xt(e) {
|
|
350
|
+
return ((Mt(e) + Fe.value) % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI);
|
|
351
|
+
}
|
|
352
|
+
function At(e) {
|
|
353
|
+
let o = e + Fe.value;
|
|
354
|
+
return o = (o % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI), o > Math.PI ? "end" : "start";
|
|
355
|
+
}
|
|
356
|
+
function It(e) {
|
|
357
|
+
const o = e - Math.PI / 2, t = Math.cos(o) * (p.value.outer + a.value.style.chart.arcs.labels.offset + 24), l = Math.sin(o) * (p.value.outer + a.value.style.chart.arcs.labels.offset + 24);
|
|
358
|
+
return `translate(${t},${l})`;
|
|
359
|
+
}
|
|
360
|
+
function _t(e, o, t) {
|
|
361
|
+
const l = e - Math.PI / 2, n = o - Math.PI / 2, s = Math.cos(l) * t, u = Math.sin(l) * t, f = Math.cos(n) * t, A = Math.sin(n) * t, I = o - e > Math.PI ? 1 : 0;
|
|
362
|
+
return `M${s},${u} A${t},${t} 0 ${I} 1 ${f},${A}`;
|
|
363
|
+
}
|
|
364
|
+
const x = d(a.value.initialRotation), ee = d(!1);
|
|
365
|
+
let ze = 0, Xe = 0;
|
|
366
|
+
function Ue(e) {
|
|
367
|
+
const o = J.value.getBoundingClientRect(), t = o.left + o.width / 2, l = o.top + o.height / 2, n = e.clientX ?? e.touches[0].clientX, s = e.clientY ?? e.touches[0].clientY;
|
|
368
|
+
return Math.atan2(s - l, n - t);
|
|
369
|
+
}
|
|
370
|
+
function Ve(e) {
|
|
371
|
+
!a.value.enableRotation || te.value || (e.preventDefault(), ee.value = !0, ze = x.value, Xe = Ue(e));
|
|
372
|
+
}
|
|
373
|
+
function se(e) {
|
|
374
|
+
if (!ee.value) return;
|
|
375
|
+
const o = Ue(e);
|
|
376
|
+
x.value = ze + (o - Xe) * 180 / Math.PI;
|
|
377
|
+
}
|
|
378
|
+
function ne() {
|
|
379
|
+
ee.value = !1;
|
|
380
|
+
}
|
|
381
|
+
function je(e) {
|
|
382
|
+
return la(
|
|
383
|
+
a.value.style.chart.ribbons.labels.formatter,
|
|
384
|
+
e,
|
|
385
|
+
we({
|
|
386
|
+
p: a.value.style.chart.ribbons.labels.prefix,
|
|
387
|
+
v: e,
|
|
388
|
+
s: a.value.style.chart.ribbons.labels.suffix,
|
|
389
|
+
r: a.value.style.chart.ribbons.labels.rounding
|
|
390
|
+
})
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
tt(() => {
|
|
394
|
+
window.addEventListener("mousemove", se), window.addEventListener("mouseup", ne), window.addEventListener("touchmove", se, { passive: !1 }), window.addEventListener("touchend", ne);
|
|
395
|
+
}), at(() => {
|
|
396
|
+
window.removeEventListener("mousemove", se), window.removeEventListener("mouseup", ne), window.removeEventListener("touchmove", se), window.removeEventListener("touchend", ne), clearTimeout(Re.value), X.value && (q.value && X.value.unobserve(q.value), X.value.disconnect());
|
|
397
|
+
});
|
|
398
|
+
const me = d(!1);
|
|
399
|
+
function Ye(e) {
|
|
400
|
+
me.value = e, Ce.value += 1;
|
|
401
|
+
}
|
|
402
|
+
function Pt(e, o) {
|
|
403
|
+
a.value.events.datapointEnter && a.value.events.datapointEnter({ datapoint: e, seriesIndex: o }), !g.value && ($.value = e);
|
|
404
|
+
}
|
|
405
|
+
function St(e, o) {
|
|
406
|
+
$.value = null, a.value.events.datapointLeave && a.value.events.datapointLeave({ datapoint: e, seriesIndex: o });
|
|
407
|
+
}
|
|
408
|
+
function Tt(e, o) {
|
|
409
|
+
oe("selectGroup", e), a.value.events.datapointClick && a.value.events.datapointClick({ datapoint: e, seriesIndex: o });
|
|
410
|
+
}
|
|
411
|
+
function Bt(e, o) {
|
|
412
|
+
a.value.events.datapointEnter && a.value.events.datapointEnter({ datapoint: e, seriesIndex: o }), !g.value && (b.value = e);
|
|
413
|
+
}
|
|
414
|
+
function Lt(e, o) {
|
|
415
|
+
b.value = null, a.value.events.datapointLeave && a.value.events.datapointLeave({ datapoint: e, seriesIndex: o });
|
|
416
|
+
}
|
|
417
|
+
function Ot(e, o) {
|
|
418
|
+
oe("selectRibbon", e), a.value.events.datapointClick && a.value.events.datapointClick({ datapoint: e, seriesIndex: o });
|
|
419
|
+
}
|
|
420
|
+
function Ge(e) {
|
|
421
|
+
return !g.value && !$.value && !b.value ? 0.8 : (g.value ? g.value === e.source.groupId : $.value ? $.value.id === e.source.groupId : b.value?.id === e.id) ? 1 : 0.1;
|
|
422
|
+
}
|
|
423
|
+
function We(e) {
|
|
424
|
+
return !g.value && !$.value && !b.value || (g.value ? g.value === e.id : $.value ? $.value.id === e.id : [b.value?.source.groupId, b.value?.target.groupId].includes(e.id)) ? 1 : 0.3;
|
|
425
|
+
}
|
|
426
|
+
const te = d(!1);
|
|
427
|
+
function ye() {
|
|
428
|
+
te.value = !te.value;
|
|
429
|
+
}
|
|
430
|
+
function qe() {
|
|
431
|
+
K.value.showTable = !K.value.showTable;
|
|
432
|
+
}
|
|
433
|
+
function Et() {
|
|
434
|
+
return M.value;
|
|
435
|
+
}
|
|
436
|
+
const V = d(null);
|
|
437
|
+
function He() {
|
|
438
|
+
const e = a.value.initialRotation;
|
|
439
|
+
V.value !== null && cancelAnimationFrame(V.value);
|
|
440
|
+
const o = () => {
|
|
441
|
+
x.value += (e - x.value) * 0.05, Math.abs(x.value - e) < 0.1 ? (x.value = e, V.value = null) : V.value = requestAnimationFrame(o);
|
|
442
|
+
};
|
|
443
|
+
V.value = requestAnimationFrame(o);
|
|
444
|
+
}
|
|
445
|
+
at(() => {
|
|
446
|
+
V.value !== null && cancelAnimationFrame(V.value);
|
|
447
|
+
});
|
|
448
|
+
function Qe(e) {
|
|
449
|
+
e === g.value ? (g.value = null, oe("selectLegend", null)) : (g.value = e, oe("selectLegend", M.value.groups.find((o) => o.id === e)));
|
|
450
|
+
}
|
|
451
|
+
const Ze = C(() => M.value.groups.map((e, o) => ({
|
|
452
|
+
name: e.name,
|
|
453
|
+
color: e.color,
|
|
454
|
+
shape: "circle",
|
|
455
|
+
patternIndex: o,
|
|
456
|
+
pattern: `pattern_${S.value}_${o}`,
|
|
457
|
+
id: e.id,
|
|
458
|
+
select: () => Qe(e.id),
|
|
459
|
+
opacity: g.value ? g.value === e.id ? 1 : 0.3 : 1
|
|
460
|
+
}))), Nt = C(() => ({
|
|
461
|
+
cy: "chord-div-legend",
|
|
462
|
+
backgroundColor: a.value.style.chart.legend.backgroundColor,
|
|
463
|
+
color: a.value.style.chart.legend.color,
|
|
464
|
+
fontSize: a.value.style.chart.legend.fontSize,
|
|
465
|
+
paddingBottom: 12,
|
|
466
|
+
fontWeight: a.value.style.chart.legend.bold ? "bold" : ""
|
|
467
|
+
})), re = C(() => {
|
|
468
|
+
const e = M.value.groups.map((t, l) => ({
|
|
469
|
+
name: t.name || l,
|
|
470
|
+
color: t.color
|
|
471
|
+
})), o = m.value.matrix;
|
|
472
|
+
return { head: e, body: o };
|
|
473
|
+
}), ue = C(() => {
|
|
474
|
+
const e = [{ name: "", color: null }, ...re.value.head], o = re.value.body.map((n, s) => [
|
|
475
|
+
re.value.head[s],
|
|
476
|
+
...re.value.body[s]
|
|
477
|
+
]), t = {
|
|
478
|
+
th: {
|
|
479
|
+
backgroundColor: a.value.table.th.backgroundColor,
|
|
480
|
+
color: a.value.table.th.color,
|
|
481
|
+
outline: a.value.table.th.outline
|
|
482
|
+
},
|
|
483
|
+
td: {
|
|
484
|
+
backgroundColor: a.value.table.td.backgroundColor,
|
|
485
|
+
color: a.value.table.td.color,
|
|
486
|
+
outline: a.value.table.td.outline
|
|
487
|
+
},
|
|
488
|
+
breakpoint: a.value.table.responsiveBreakpoint
|
|
489
|
+
};
|
|
490
|
+
return {
|
|
491
|
+
colNames: e,
|
|
492
|
+
head: e,
|
|
493
|
+
body: o,
|
|
494
|
+
config: t
|
|
495
|
+
};
|
|
496
|
+
});
|
|
497
|
+
function Je(e = null) {
|
|
498
|
+
Vt(() => {
|
|
499
|
+
const o = m.value.matrix.map((n, s) => [
|
|
500
|
+
[m.value.labels[s] || s],
|
|
501
|
+
n
|
|
502
|
+
]), t = [
|
|
503
|
+
[a.value.style.chart.title.text],
|
|
504
|
+
[a.value.style.chart.title.subtitle.text],
|
|
505
|
+
[
|
|
506
|
+
[""],
|
|
507
|
+
...m.value.labels.map((n, s) => [n || s])
|
|
508
|
+
]
|
|
509
|
+
].concat(o), l = aa(t);
|
|
510
|
+
e ? e(l) : oa({ csvContent: l, title: a.value.style.chart.title.text || "vue-ui-chord" });
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
async function Rt({ scale: e = 2 } = {}) {
|
|
514
|
+
if (!N.value) return;
|
|
515
|
+
const { width: o, height: t } = N.value.getBoundingClientRect(), l = o / t, { imageUri: n, base64: s } = await ha({ domElement: N.value, base64: !0, img: !0, scale: e });
|
|
516
|
+
return {
|
|
517
|
+
imageUri: n,
|
|
518
|
+
base64: s,
|
|
519
|
+
title: a.value.style.chart.title.text,
|
|
520
|
+
width: o,
|
|
521
|
+
height: t,
|
|
522
|
+
aspectRatio: l
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
function Dt(e, o) {
|
|
526
|
+
return `${m.value.labels[o]}${a.value.style.chart.arcs.labels.showPercentage ? we({
|
|
527
|
+
p: " (",
|
|
528
|
+
v: isNaN(e.proportion) ? 0 : e.proportion * 100,
|
|
529
|
+
s: "%)",
|
|
530
|
+
r: a.value.style.chart.arcs.labels.roundingPercentage
|
|
531
|
+
}) : ""}`;
|
|
532
|
+
}
|
|
533
|
+
return ut({
|
|
534
|
+
getData: Et,
|
|
535
|
+
getImage: Rt,
|
|
536
|
+
generateCsv: Je,
|
|
537
|
+
generateImage: Oe,
|
|
538
|
+
generatePdf: Le,
|
|
539
|
+
toggleAnnotator: ye,
|
|
540
|
+
toggleTable: qe,
|
|
541
|
+
toggleFullscreen: Ye
|
|
542
|
+
}), (e, o) => (r(), i("div", {
|
|
543
|
+
ref_key: "chordChart",
|
|
544
|
+
ref: N,
|
|
545
|
+
class: F({
|
|
546
|
+
"vue-ui-chord": !0,
|
|
547
|
+
"vue-data-ui-wrapper-fullscreen": me.value,
|
|
548
|
+
"vue-data-ui-responsive": a.value.responsive
|
|
549
|
+
}),
|
|
550
|
+
style: D(`font-family:${a.value.style.fontFamily};width:100%; text-align:center;background:${a.value.style.chart.backgroundColor}`),
|
|
551
|
+
id: `chord_${S.value}`,
|
|
552
|
+
onMouseenter: o[2] || (o[2] = () => v(Pe)(!0)),
|
|
553
|
+
onMouseleave: o[3] || (o[3] = () => v(Pe)(!1))
|
|
554
|
+
}, [
|
|
555
|
+
a.value.userOptions.buttons.annotator && v(J) ? (r(), Y(v(ft), {
|
|
556
|
+
key: 0,
|
|
557
|
+
color: a.value.style.chart.color,
|
|
558
|
+
backgroundColor: a.value.style.chart.backgroundColor,
|
|
559
|
+
active: te.value,
|
|
560
|
+
svgRef: v(J),
|
|
561
|
+
onClose: ye
|
|
562
|
+
}, null, 8, ["color", "backgroundColor", "active", "svgRef"])) : h("", !0),
|
|
563
|
+
k(e.$slots, "userConfig", {}, void 0, !0),
|
|
564
|
+
mt.value ? (r(), i("div", {
|
|
565
|
+
key: 1,
|
|
566
|
+
ref_key: "noTitle",
|
|
567
|
+
ref: Ie,
|
|
568
|
+
class: "vue-data-ui-no-title-space",
|
|
569
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
570
|
+
}, null, 512)) : h("", !0),
|
|
571
|
+
a.value.style.chart.title.text ? (r(), i("div", {
|
|
572
|
+
key: 2,
|
|
573
|
+
ref_key: "chartTitle",
|
|
574
|
+
ref: Me,
|
|
575
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
576
|
+
}, [
|
|
577
|
+
(r(), Y(va, {
|
|
578
|
+
key: `title_${de.value}`,
|
|
579
|
+
config: {
|
|
580
|
+
title: {
|
|
581
|
+
cy: "chord-div-title",
|
|
582
|
+
...a.value.style.chart.title
|
|
583
|
+
},
|
|
584
|
+
subtitle: {
|
|
585
|
+
cy: "chord-div-subtitle",
|
|
586
|
+
...a.value.style.chart.title.subtitle
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}, null, 8, ["config"]))
|
|
590
|
+
], 512)) : h("", !0),
|
|
591
|
+
a.value.userOptions.show && E.value && (v(Se) || v(ge)) ? (r(), Y(v(gt), {
|
|
592
|
+
ref: "details",
|
|
593
|
+
key: `user_option_${Ce.value}`,
|
|
594
|
+
backgroundColor: a.value.style.chart.backgroundColor,
|
|
595
|
+
color: a.value.style.chart.color,
|
|
596
|
+
isPrinting: v(Te),
|
|
597
|
+
isImaging: v(Be),
|
|
598
|
+
uid: S.value,
|
|
599
|
+
hasTooltip: !1,
|
|
600
|
+
hasPdf: a.value.userOptions.buttons.pdf,
|
|
601
|
+
hasImg: a.value.userOptions.buttons.img,
|
|
602
|
+
hasXls: a.value.userOptions.buttons.csv,
|
|
603
|
+
hasTable: a.value.userOptions.buttons.table,
|
|
604
|
+
hasLabel: !1,
|
|
605
|
+
hasFullscreen: a.value.userOptions.buttons.fullscreen,
|
|
606
|
+
isFullscreen: me.value,
|
|
607
|
+
chartElement: N.value,
|
|
608
|
+
position: a.value.userOptions.position,
|
|
609
|
+
titles: { ...a.value.userOptions.buttonTitles },
|
|
610
|
+
hasAnnotator: a.value.userOptions.buttons.annotator,
|
|
611
|
+
isAnnotation: te.value,
|
|
612
|
+
callbacks: a.value.userOptions.callbacks,
|
|
613
|
+
printScale: a.value.userOptions.print.scale,
|
|
614
|
+
onToggleFullscreen: Ye,
|
|
615
|
+
onGeneratePdf: v(Le),
|
|
616
|
+
onGenerateCsv: Je,
|
|
617
|
+
onGenerateImage: v(Oe),
|
|
618
|
+
onToggleTable: qe,
|
|
619
|
+
onToggleAnnotator: ye,
|
|
620
|
+
style: D({
|
|
621
|
+
visibility: v(Se) ? v(ge) ? "visible" : "hidden" : "visible"
|
|
622
|
+
})
|
|
623
|
+
}, ot({ _: 2 }, [
|
|
624
|
+
e.$slots.menuIcon ? {
|
|
625
|
+
name: "menuIcon",
|
|
626
|
+
fn: P(({ isOpen: t, color: l }) => [
|
|
627
|
+
k(e.$slots, "menuIcon", ie(ce({ isOpen: t, color: l })), void 0, !0)
|
|
628
|
+
]),
|
|
629
|
+
key: "0"
|
|
630
|
+
} : void 0,
|
|
631
|
+
e.$slots.optionPdf ? {
|
|
632
|
+
name: "optionPdf",
|
|
633
|
+
fn: P(() => [
|
|
634
|
+
k(e.$slots, "optionPdf", {}, void 0, !0)
|
|
635
|
+
]),
|
|
636
|
+
key: "1"
|
|
637
|
+
} : void 0,
|
|
638
|
+
e.$slots.optionCsv ? {
|
|
639
|
+
name: "optionCsv",
|
|
640
|
+
fn: P(() => [
|
|
641
|
+
k(e.$slots, "optionCsv", {}, void 0, !0)
|
|
642
|
+
]),
|
|
643
|
+
key: "2"
|
|
644
|
+
} : void 0,
|
|
645
|
+
e.$slots.optionImg ? {
|
|
646
|
+
name: "optionImg",
|
|
647
|
+
fn: P(() => [
|
|
648
|
+
k(e.$slots, "optionImg", {}, void 0, !0)
|
|
649
|
+
]),
|
|
650
|
+
key: "3"
|
|
651
|
+
} : void 0,
|
|
652
|
+
e.$slots.optionTable ? {
|
|
653
|
+
name: "optionTable",
|
|
654
|
+
fn: P(() => [
|
|
655
|
+
k(e.$slots, "optionTable", {}, void 0, !0)
|
|
656
|
+
]),
|
|
657
|
+
key: "4"
|
|
658
|
+
} : void 0,
|
|
659
|
+
e.$slots.optionFullscreen ? {
|
|
660
|
+
name: "optionFullscreen",
|
|
661
|
+
fn: P(({ toggleFullscreen: t, isFullscreen: l }) => [
|
|
662
|
+
k(e.$slots, "optionFullscreen", ie(ce({ toggleFullscreen: t, isFullscreen: l })), void 0, !0)
|
|
663
|
+
]),
|
|
664
|
+
key: "5"
|
|
665
|
+
} : void 0,
|
|
666
|
+
e.$slots.optionAnnotator ? {
|
|
667
|
+
name: "optionAnnotator",
|
|
668
|
+
fn: P(({ toggleAnnotator: t, isAnnotator: l }) => [
|
|
669
|
+
k(e.$slots, "optionAnnotator", ie(ce({ toggleAnnotator: t, isAnnotator: l })), void 0, !0)
|
|
670
|
+
]),
|
|
671
|
+
key: "6"
|
|
672
|
+
} : void 0
|
|
673
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : h("", !0),
|
|
674
|
+
(r(), i("svg", {
|
|
675
|
+
xmlns: v(Jt),
|
|
676
|
+
ref_key: "svgRef",
|
|
677
|
+
ref: J,
|
|
678
|
+
viewBox: `0 0 ${B.value.width} ${B.value.height}`,
|
|
679
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
680
|
+
style: {
|
|
681
|
+
overflow: "visible"
|
|
682
|
+
},
|
|
683
|
+
class: F({ "vue-ui-chord-rotating": ee.value, "vue-ui-chord-idle": !ee.value }),
|
|
684
|
+
onMousedown: lt(Ve, ["prevent"]),
|
|
685
|
+
onTouchstart: lt(Ve, ["prevent"])
|
|
686
|
+
}, [
|
|
687
|
+
ke(v(ht)),
|
|
688
|
+
e.$slots["chart-background"] ? (r(), i("foreignObject", {
|
|
689
|
+
key: 0,
|
|
690
|
+
x: 0,
|
|
691
|
+
y: 0,
|
|
692
|
+
width: B.value.width <= 0 ? 10 : B.value.width,
|
|
693
|
+
height: B.value.height <= 0 ? 10 : B.value.height,
|
|
694
|
+
style: {
|
|
695
|
+
pointerEvents: "none"
|
|
696
|
+
}
|
|
697
|
+
}, [
|
|
698
|
+
k(e.$slots, "chart-background", {}, void 0, !0)
|
|
699
|
+
], 8, ya)) : h("", !0),
|
|
700
|
+
a.value.style.chart.arcs.labels.curved ? (r(), i("defs", ka, [
|
|
701
|
+
(r(!0), i(z, null, G(M.value.groups, (t, l) => (r(), i("path", {
|
|
702
|
+
key: `labelPath-${l}`,
|
|
703
|
+
id: `labelPath-${l}_${S.value}`,
|
|
704
|
+
d: _t(
|
|
705
|
+
t.startAngle,
|
|
706
|
+
t.endAngle,
|
|
707
|
+
(p.value.inner + p.value.outer) / 2 + a.value.style.chart.arcs.labels.offset
|
|
708
|
+
),
|
|
709
|
+
fill: "none"
|
|
710
|
+
}, null, 8, $a))), 128))
|
|
711
|
+
])) : h("", !0),
|
|
712
|
+
e.$slots.pattern ? (r(), i("g", wa, [
|
|
713
|
+
(r(!0), i(z, null, G(M.value.groups, (t, l) => (r(), i("defs", null, [
|
|
714
|
+
k(e.$slots, "pattern", Xt({ ref_for: !0 }, { seriesIndex: t.index, patternId: `pattern_${S.value}_${l}` }), void 0, !0)
|
|
715
|
+
]))), 256))
|
|
716
|
+
])) : h("", !0),
|
|
717
|
+
O("g", {
|
|
718
|
+
transform: `translate(${B.value.width / 2}, ${B.value.height / 2}) rotate(${x.value})`
|
|
719
|
+
}, [
|
|
720
|
+
(r(!0), i(z, null, G(M.value.groups, (t, l) => (r(), i("g", null, [
|
|
721
|
+
(r(), i("path", {
|
|
722
|
+
class: F({ "vue-ui-chord-arc": !0, "vue-ui-chord-arc-animated": a.value.useCssAnimation && !W.value }),
|
|
723
|
+
key: `arc-${l}`,
|
|
724
|
+
d: De(
|
|
725
|
+
t.startAngle,
|
|
726
|
+
t.endAngle,
|
|
727
|
+
p.value.outer,
|
|
728
|
+
p.value.inner
|
|
729
|
+
),
|
|
730
|
+
fill: m.value.colors[l],
|
|
731
|
+
stroke: a.value.style.chart.arcs.stroke,
|
|
732
|
+
"stroke-width": a.value.style.chart.arcs.strokeWidth,
|
|
733
|
+
"stroke-linecap": "round",
|
|
734
|
+
"stroke-linejoin": "round",
|
|
735
|
+
style: D({
|
|
736
|
+
opacity: We(t)
|
|
737
|
+
}),
|
|
738
|
+
onMouseenter: (n) => Pt(t, l),
|
|
739
|
+
onMouseleave: (n) => St(t, l),
|
|
740
|
+
onClick: (n) => Tt(t, l)
|
|
741
|
+
}, null, 46, Ma)),
|
|
742
|
+
e.$slots.pattern ? (r(), i("path", {
|
|
743
|
+
class: F({ "vue-ui-chord-arc": !0, "vue-ui-chord-arc-animated": a.value.useCssAnimation && !W.value }),
|
|
744
|
+
key: `arc-${l}`,
|
|
745
|
+
d: De(
|
|
746
|
+
t.startAngle,
|
|
747
|
+
t.endAngle,
|
|
748
|
+
p.value.outer,
|
|
749
|
+
p.value.inner
|
|
750
|
+
),
|
|
751
|
+
fill: `url(#${t.pattern})`,
|
|
752
|
+
stroke: a.value.style.chart.arcs.stroke,
|
|
753
|
+
"stroke-width": a.value.style.chart.arcs.strokeWidth,
|
|
754
|
+
"stroke-linecap": "round",
|
|
755
|
+
"stroke-linejoin": "round",
|
|
756
|
+
style: D({
|
|
757
|
+
opacity: We(t),
|
|
758
|
+
pointerEvents: "none"
|
|
759
|
+
})
|
|
760
|
+
}, null, 14, xa)) : h("", !0)
|
|
761
|
+
]))), 256)),
|
|
762
|
+
O("g", null, [
|
|
763
|
+
(r(!0), i(z, null, G($.value ? M.value.chords.filter((t) => t.source.groupId === $.value.id) : g.value ? M.value.chords.filter((t) => t.source.groupId === g.value) : M.value.chords, (t, l) => (r(), i(z, {
|
|
764
|
+
key: `ribbon-${t.id}`
|
|
765
|
+
}, [
|
|
766
|
+
t.source.value ? (r(), i("path", {
|
|
767
|
+
key: 0,
|
|
768
|
+
class: F({ "vue-ui-chord-ribbon": !0, "vue-ui-chord-ribbon-animated": a.value.useCssAnimation && !W.value }),
|
|
769
|
+
d: le(t.source, t.target),
|
|
770
|
+
fill: a.value.style.chart.backgroundColor,
|
|
771
|
+
style: D({ opacity: a.value.style.chart.ribbons.underlayerOpacity })
|
|
772
|
+
}, null, 14, Aa)) : h("", !0),
|
|
773
|
+
t.source.value ? (r(), i("path", {
|
|
774
|
+
key: 1,
|
|
775
|
+
class: F({ "vue-ui-chord-ribbon": !0, "vue-ui-chord-ribbon-animated": a.value.useCssAnimation && !W.value }),
|
|
776
|
+
d: le(t.source, t.target),
|
|
777
|
+
fill: m.value.colors[t.source.index],
|
|
778
|
+
stroke: a.value.style.chart.ribbons.stroke,
|
|
779
|
+
"stroke-width": a.value.style.chart.ribbons.strokeWidth,
|
|
780
|
+
"stroke-linecap": "round",
|
|
781
|
+
"stroke-linejoin": "round",
|
|
782
|
+
style: D({ opacity: Ge(t) }),
|
|
783
|
+
onMouseenter: (n) => Bt({
|
|
784
|
+
...t,
|
|
785
|
+
path: le(t.source, t.target),
|
|
786
|
+
color: m.value.colors[t.source.index]
|
|
787
|
+
}, l),
|
|
788
|
+
onClick: (n) => Ot({
|
|
789
|
+
...t,
|
|
790
|
+
color: m.value.colors[t.source.index]
|
|
791
|
+
}, l),
|
|
792
|
+
onMouseleave: (n) => Lt({
|
|
793
|
+
...t,
|
|
794
|
+
color: m.value.colors[t.source.index]
|
|
795
|
+
}, l)
|
|
796
|
+
}, null, 46, Ia)) : h("", !0),
|
|
797
|
+
t.source.value && e.$slots.pattern ? (r(), i("path", {
|
|
798
|
+
key: 2,
|
|
799
|
+
class: F({ "vue-ui-chord-ribbon": !0, "vue-ui-chord-ribbon-animated": a.value.useCssAnimation && !W.value }),
|
|
800
|
+
d: le(t.source, t.target),
|
|
801
|
+
fill: `url(#pattern_${S.value}_${t.source.index})`,
|
|
802
|
+
stroke: a.value.style.chart.ribbons.stroke,
|
|
803
|
+
"stroke-width": a.value.style.chart.ribbons.strokeWidth,
|
|
804
|
+
"stroke-linecap": "round",
|
|
805
|
+
"stroke-linejoin": "round",
|
|
806
|
+
style: D({
|
|
807
|
+
opacity: Ge(t),
|
|
808
|
+
pointerEvents: "none"
|
|
809
|
+
})
|
|
810
|
+
}, null, 14, _a)) : h("", !0)
|
|
811
|
+
], 64))), 128)),
|
|
812
|
+
b.value ? (r(), i("path", {
|
|
813
|
+
key: 0,
|
|
814
|
+
d: b.value.path,
|
|
815
|
+
fill: b.value.color,
|
|
816
|
+
stroke: a.value.style.chart.ribbons.stroke,
|
|
817
|
+
"stroke-width": a.value.style.chart.ribbons.strokeWidth,
|
|
818
|
+
"stroke-linecap": "round",
|
|
819
|
+
"stroke-linejoin": "round",
|
|
820
|
+
class: F({ "vue-ui-chord-ribbon": !0 }),
|
|
821
|
+
style: {
|
|
822
|
+
pointerEvents: "none"
|
|
823
|
+
}
|
|
824
|
+
}, null, 8, Pa)) : h("", !0),
|
|
825
|
+
b.value && e.$slots.pattern ? (r(), i("path", {
|
|
826
|
+
key: 1,
|
|
827
|
+
d: b.value.path,
|
|
828
|
+
fill: `url(#${b.value.source.pattern})`,
|
|
829
|
+
stroke: a.value.style.chart.ribbons.stroke,
|
|
830
|
+
"stroke-width": a.value.style.chart.ribbons.strokeWidth,
|
|
831
|
+
"stroke-linecap": "round",
|
|
832
|
+
"stroke-linejoin": "round",
|
|
833
|
+
class: F({ "vue-ui-chord-ribbon": !0 }),
|
|
834
|
+
style: {
|
|
835
|
+
pointerEvents: "none"
|
|
836
|
+
}
|
|
837
|
+
}, null, 8, Sa)) : h("", !0)
|
|
838
|
+
]),
|
|
839
|
+
($.value || b.value || g.value) && a.value.style.chart.ribbons.labels.show ? (r(), i("g", Ta, [
|
|
840
|
+
(r(!0), i(z, null, G(Ct.value, (t) => (r(), i(z, {
|
|
841
|
+
key: t.id
|
|
842
|
+
}, [
|
|
843
|
+
O("line", {
|
|
844
|
+
x1: t.midBaseX,
|
|
845
|
+
y1: t.midBaseY,
|
|
846
|
+
x2: Math.cos(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
|
|
847
|
+
y2: Math.sin(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
|
|
848
|
+
stroke: a.value.style.chart.backgroundColor,
|
|
849
|
+
"stroke-width": a.value.style.chart.ribbons.labels.connector.strokeWidth * 3,
|
|
850
|
+
"pointer-events": "none"
|
|
851
|
+
}, null, 8, Ba),
|
|
852
|
+
O("line", {
|
|
853
|
+
x1: t.midBaseX,
|
|
854
|
+
y1: t.midBaseY,
|
|
855
|
+
x2: Math.cos(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
|
|
856
|
+
y2: Math.sin(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
|
|
857
|
+
stroke: a.value.style.chart.ribbons.labels.connector.stroke,
|
|
858
|
+
"stroke-width": a.value.style.chart.ribbons.labels.connector.strokeWidth,
|
|
859
|
+
"pointer-events": "none"
|
|
860
|
+
}, null, 8, La),
|
|
861
|
+
a.value.style.chart.ribbons.labels.marker.show ? (r(), i("circle", {
|
|
862
|
+
key: 0,
|
|
863
|
+
cx: Math.cos(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
|
|
864
|
+
cy: Math.sin(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
|
|
865
|
+
r: a.value.style.chart.ribbons.labels.marker.radius,
|
|
866
|
+
stroke: a.value.style.chart.ribbons.labels.marker.stroke,
|
|
867
|
+
"stroke-width": a.value.style.chart.ribbons.labels.marker.strokeWidth,
|
|
868
|
+
fill: t.groupColor,
|
|
869
|
+
"pointer-events": "none"
|
|
870
|
+
}, null, 8, Oa)) : h("", !0),
|
|
871
|
+
O("text", {
|
|
872
|
+
transform: `
|
|
873
|
+
translate(
|
|
874
|
+
${Math.cos(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 24)},
|
|
875
|
+
${Math.sin(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 24)}
|
|
876
|
+
) rotate(${-x.value})
|
|
877
|
+
`,
|
|
878
|
+
fill: a.value.style.chart.ribbons.labels.useSerieColor ? t.groupColor : a.value.style.chart.ribbons.labels.color,
|
|
879
|
+
"text-anchor": At(t.theta),
|
|
880
|
+
"font-size": a.value.style.chart.ribbons.labels.fontSize,
|
|
881
|
+
"font-weight": a.value.style.chart.ribbons.labels.bold ? "bold" : "normal",
|
|
882
|
+
dy: ".35em",
|
|
883
|
+
"pointer-events": "none"
|
|
884
|
+
}, Q(je(t.value)), 9, Ea)
|
|
885
|
+
], 64))), 128))
|
|
886
|
+
])) : h("", !0),
|
|
887
|
+
a.value.style.chart.arcs.labels.show ? (r(), i("g", Na, [
|
|
888
|
+
a.value.style.chart.arcs.labels.curved ? (r(!0), i(z, { key: 0 }, G(M.value.groups, (t, l) => (r(), i("text", {
|
|
889
|
+
class: "vue-ui-chord-label-curved",
|
|
890
|
+
key: `curved-label-${l}`,
|
|
891
|
+
"font-size": a.value.style.chart.arcs.labels.fontSize,
|
|
892
|
+
"font-weight": a.value.style.chart.arcs.labels.bold ? "bold" : "normal",
|
|
893
|
+
fill: a.value.style.chart.arcs.labels.adaptColorToBackground ? v(Kt)(m.value.colors[l]) : a.value.style.chart.arcs.labels.color
|
|
894
|
+
}, [
|
|
895
|
+
O("textPath", {
|
|
896
|
+
href: `#labelPath-${l}_${S.value}`,
|
|
897
|
+
startOffset: "50%",
|
|
898
|
+
"text-anchor": "middle"
|
|
899
|
+
}, Q(m.value.labels[l]) + Q(a.value.style.chart.arcs.labels.showPercentage ? v(we)({
|
|
900
|
+
p: " (",
|
|
901
|
+
v: isNaN(t.proportion) ? 0 : t.proportion * 100,
|
|
902
|
+
s: "%)",
|
|
903
|
+
r: a.value.style.chart.arcs.labels.roundingPercentage
|
|
904
|
+
}) : ""), 9, Da)
|
|
905
|
+
], 8, Ra))), 128)) : !$.value && !b.value && !g.value ? (r(!0), i(z, { key: 1 }, G(M.value.groups, (t, l) => (r(), i("text", {
|
|
906
|
+
class: "vue-ui-chord-label-straight",
|
|
907
|
+
key: `label-${l}`,
|
|
908
|
+
transform: `
|
|
909
|
+
${It((t.startAngle + t.endAngle) / 2)}
|
|
910
|
+
rotate(${-x.value})
|
|
911
|
+
`,
|
|
912
|
+
dy: ".35em",
|
|
913
|
+
"text-anchor": xt(t) > Math.PI ? "end" : "start",
|
|
914
|
+
"font-size": a.value.style.chart.arcs.labels.fontSize,
|
|
915
|
+
"font-weight": a.value.style.chart.arcs.labels.bold ? "bold" : "normal",
|
|
916
|
+
fill: a.value.style.chart.arcs.labels.color,
|
|
917
|
+
innerHTML: v(ea)({
|
|
918
|
+
content: v(ta)(Dt(t, l)),
|
|
919
|
+
fontSize: a.value.style.chart.arcs.labels.fontSize,
|
|
920
|
+
fill: a.value.style.chart.arcs.labels.color,
|
|
921
|
+
x: 0,
|
|
922
|
+
y: 0
|
|
923
|
+
})
|
|
924
|
+
}, null, 8, Fa))), 128)) : h("", !0)
|
|
925
|
+
])) : h("", !0)
|
|
926
|
+
], 8, Ca),
|
|
927
|
+
k(e.$slots, "svg", { svg: { height: 600, width: 600 } }, void 0, !0)
|
|
928
|
+
], 42, ma)),
|
|
929
|
+
e.$slots.watermark ? (r(), i("div", za, [
|
|
930
|
+
k(e.$slots, "watermark", ie(ce({ isPrinting: v(Te) || v(Be) })), void 0, !0)
|
|
931
|
+
])) : h("", !0),
|
|
932
|
+
O("div", {
|
|
933
|
+
ref_key: "chartLegend",
|
|
934
|
+
ref: xe
|
|
935
|
+
}, [
|
|
936
|
+
a.value.style.chart.legend.show ? (r(), Y(ca, {
|
|
937
|
+
key: `legend_${fe.value}`,
|
|
938
|
+
legendSet: Ze.value,
|
|
939
|
+
config: Nt.value,
|
|
940
|
+
onClickMarker: o[0] || (o[0] = ({ legend: t }) => Qe(t.id))
|
|
941
|
+
}, ot({
|
|
942
|
+
item: P(({ legend: t }) => [
|
|
943
|
+
O("div", {
|
|
944
|
+
style: D({
|
|
945
|
+
opacity: g.value ? g.value === t.id ? 1 : 0.3 : 1
|
|
946
|
+
}),
|
|
947
|
+
onClick: (l) => t.select()
|
|
948
|
+
}, Q(t.name), 13, Xa)
|
|
949
|
+
]),
|
|
950
|
+
_: 2
|
|
951
|
+
}, [
|
|
952
|
+
e.$slots.pattern ? {
|
|
953
|
+
name: "legend-pattern",
|
|
954
|
+
fn: P(({ legend: t, index: l }) => [
|
|
955
|
+
ke(da, {
|
|
956
|
+
shape: t.shape,
|
|
957
|
+
radius: 30,
|
|
958
|
+
stroke: "none",
|
|
959
|
+
plot: { x: 30, y: 30 },
|
|
960
|
+
fill: `url(#pattern_${S.value}_${l})`
|
|
961
|
+
}, null, 8, ["shape", "fill"])
|
|
962
|
+
]),
|
|
963
|
+
key: "0"
|
|
964
|
+
} : void 0
|
|
965
|
+
]), 1032, ["legendSet", "config"])) : h("", !0),
|
|
966
|
+
k(e.$slots, "legend", { legend: Ze.value }, void 0, !0)
|
|
967
|
+
], 512),
|
|
968
|
+
e.$slots.source ? (r(), i("div", {
|
|
969
|
+
key: 5,
|
|
970
|
+
ref_key: "source",
|
|
971
|
+
ref: Ae,
|
|
972
|
+
dir: "auto"
|
|
973
|
+
}, [
|
|
974
|
+
k(e.$slots, "source", {}, void 0, !0)
|
|
975
|
+
], 512)) : h("", !0),
|
|
976
|
+
x.value !== a.value.initialRotation ? (r(), i("div", Ua, [
|
|
977
|
+
k(e.$slots, "reset-action", { reset: He }, () => [
|
|
978
|
+
O("button", {
|
|
979
|
+
"data-cy-reset": "",
|
|
980
|
+
tabindex: "0",
|
|
981
|
+
role: "button",
|
|
982
|
+
class: "vue-data-ui-refresh-button",
|
|
983
|
+
style: D({
|
|
984
|
+
background: a.value.style.chart.backgroundColor
|
|
985
|
+
}),
|
|
986
|
+
onClick: He
|
|
987
|
+
}, [
|
|
988
|
+
ke(v(vt), {
|
|
989
|
+
name: "refresh",
|
|
990
|
+
stroke: a.value.style.chart.color
|
|
991
|
+
}, null, 8, ["stroke"])
|
|
992
|
+
], 4)
|
|
993
|
+
], !0)
|
|
994
|
+
])) : h("", !0),
|
|
995
|
+
E.value ? (r(), Y(v(ct), {
|
|
996
|
+
key: 7,
|
|
997
|
+
hideDetails: "",
|
|
998
|
+
config: {
|
|
999
|
+
open: K.value.showTable,
|
|
1000
|
+
maxHeight: 1e4,
|
|
1001
|
+
body: {
|
|
1002
|
+
backgroundColor: a.value.style.chart.backgroundColor,
|
|
1003
|
+
color: a.value.style.chart.color
|
|
1004
|
+
},
|
|
1005
|
+
head: {
|
|
1006
|
+
backgroundColor: a.value.style.chart.backgroundColor,
|
|
1007
|
+
color: a.value.style.chart.color
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
}, {
|
|
1011
|
+
content: P(() => [
|
|
1012
|
+
(r(), Y(v(dt), {
|
|
1013
|
+
key: `table_${he.value}`,
|
|
1014
|
+
colNames: ue.value.colNames,
|
|
1015
|
+
head: ue.value.head,
|
|
1016
|
+
body: ue.value.body,
|
|
1017
|
+
config: ue.value.config,
|
|
1018
|
+
title: `${a.value.style.chart.title.text}${a.value.style.chart.title.subtitle.text ? ` : ${a.value.style.chart.title.subtitle.text}` : ""}`,
|
|
1019
|
+
onClose: o[1] || (o[1] = (t) => K.value.showTable = !1)
|
|
1020
|
+
}, {
|
|
1021
|
+
th: P(({ th: t }) => [
|
|
1022
|
+
Ut(Q(t.name), 1)
|
|
1023
|
+
]),
|
|
1024
|
+
td: P(({ td: t }) => [
|
|
1025
|
+
O("div", Va, Q(t.name ? t.name : je(t)), 1)
|
|
1026
|
+
]),
|
|
1027
|
+
_: 1
|
|
1028
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
1029
|
+
]),
|
|
1030
|
+
_: 1
|
|
1031
|
+
}, 8, ["config"])) : h("", !0),
|
|
1032
|
+
v(_e) ? (r(), Y(ga, { key: 8 })) : h("", !0)
|
|
1033
|
+
], 46, ba));
|
|
1034
|
+
}
|
|
1035
|
+
}, lo = /* @__PURE__ */ pa(ja, [["__scopeId", "data-v-cea95e88"]]);
|
|
1036
|
+
export {
|
|
1037
|
+
lo as default
|
|
1038
|
+
};
|