vue-data-ui 3.0.0-next.66 → 3.0.0-next.68

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.
Files changed (92) hide show
  1. package/dist/{Arrow-Dr_mObjc.js → Arrow-BAykSDMq.js} +1 -1
  2. package/dist/{BaseDraggableDialog-Dlsos5JE.js → BaseDraggableDialog-CW14dYAe.js} +2 -2
  3. package/dist/{BaseIcon-BrSUZHhD.js → BaseIcon-CzfAiD8Q.js} +1 -1
  4. package/dist/{ColorPicker-T4hVxWCB.js → ColorPicker-B9JhVNgd.js} +2 -2
  5. package/dist/{DataTable-COXa-OUM.js → DataTable-yFJiG46j.js} +2 -2
  6. package/dist/{Legend-B4uyXKfG.js → Legend-BL5vo6lw.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DXjC2pBu.js → NonSvgPenAndPaper-Cq3mrd_T.js} +3 -3
  8. package/dist/{PackageVersion-CkCjIYtm.js → PackageVersion-B7u_UQo2.js} +1 -1
  9. package/dist/{PenAndPaper-Dh8MOFtt.js → PenAndPaper-C1coJhxH.js} +3 -3
  10. package/dist/{Shape-1KI-6QL_.js → Shape-DZVGaTt4.js} +1 -1
  11. package/dist/{Slicer-B6SeNiOU.js → Slicer-D5grTGFr.js} +2 -2
  12. package/dist/{SparkTooltip-BkDIxJ2K.js → SparkTooltip-DBh_fq1U.js} +1 -1
  13. package/dist/{Title-Bd726vHk.js → Title-BBZXpBnP.js} +1 -1
  14. package/dist/{Tooltip-BZDbn5Oq.js → Tooltip-BZFesYE9.js} +1 -1
  15. package/dist/{UserOptions-DwjhbLQc.js → UserOptions-BkTKJa0i.js} +2 -2
  16. package/dist/{dom-to-png-C4e-XXQB.js → dom-to-png-Btyxq19q.js} +1 -1
  17. package/dist/{img-BBKrPg3D.js → img-CKRPNSjy.js} +1 -1
  18. package/dist/{index-CeUkdATZ.js → index-Bs8fEv7y.js} +687 -661
  19. package/dist/{pdf-czWO0keu.js → pdf-BEMvkY35.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +51 -1
  22. package/dist/types/vue-data-ui.d.ts +51 -1
  23. package/dist/{useAutoSizeLabelsInsideViewbox-D7njD5tO.js → useAutoSizeLabelsInsideViewbox-CUSxIrSP.js} +1 -1
  24. package/dist/{useNestedProp-C3RxqPvb.js → useNestedProp-BJLiTmTx.js} +1 -1
  25. package/dist/{usePrinter-DIeBTduG.js → usePrinter-q-k0Bt2r.js} +2 -2
  26. package/dist/{vue-data-ui-we7Z11D2.js → vue-data-ui-CaXH0i5B.js} +64 -64
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-qSqna_im.js → vue-ui-3d-bar-xpXMmbEu.js} +6 -6
  29. package/dist/{vue-ui-accordion-DhuD9Hkv.js → vue-ui-accordion-Ctx-gXOi.js} +3 -3
  30. package/dist/{vue-ui-age-pyramid-DDGfjmtw.js → vue-ui-age-pyramid-CqALPbig.js} +6 -6
  31. package/dist/{vue-ui-annotator-BxduJwwT.js → vue-ui-annotator-DRHVMTUB.js} +2 -2
  32. package/dist/{vue-ui-bullet-U7QxhGr5.js → vue-ui-bullet-C0Ub1vYY.js} +7 -7
  33. package/dist/{vue-ui-candlestick-q-kNWnz1.js → vue-ui-candlestick-Ccw3PgIJ.js} +7 -7
  34. package/dist/{vue-ui-carousel-table-DZwSYJIw.js → vue-ui-carousel-table-Ckv-iSmA.js} +4 -4
  35. package/dist/{vue-ui-chestnut-B2d2Zdak.js → vue-ui-chestnut-ZqVT7ci-.js} +5 -5
  36. package/dist/vue-ui-chord-qtVPi5Xc.js +1038 -0
  37. package/dist/{vue-ui-circle-pack-BPoizyKh.js → vue-ui-circle-pack-C5wOKvfw.js} +6 -6
  38. package/dist/{vue-ui-cursor-Bn7_ABjJ.js → vue-ui-cursor-BuziJXZZ.js} +2 -2
  39. package/dist/{vue-ui-dashboard-91IDJQZf.js → vue-ui-dashboard-DbFOkEN3.js} +62 -62
  40. package/dist/{vue-ui-digits-CC_hQ2L6.js → vue-ui-digits-DkodORPL.js} +2 -2
  41. package/dist/{vue-ui-donut-BWtEAAPl.js → vue-ui-donut-DAGrKmeD.js} +8 -8
  42. package/dist/{vue-ui-donut-evolution-CjcLa5e4.js → vue-ui-donut-evolution-Db0wUL_I.js} +8 -8
  43. package/dist/{vue-ui-dumbbell-BwtOTFOn.js → vue-ui-dumbbell-DPKhtBri.js} +7 -7
  44. package/dist/{vue-ui-flow-DliOcJ1n.js → vue-ui-flow-Clx0F5LT.js} +7 -7
  45. package/dist/{vue-ui-funnel-DG7YU5hT.js → vue-ui-funnel-B-By_uVq.js} +6 -6
  46. package/dist/{vue-ui-galaxy-BHvdgeI-.js → vue-ui-galaxy-hIHLZhzo.js} +5 -5
  47. package/dist/{vue-ui-gauge-CSS3cObW.js → vue-ui-gauge-A3UVVjUE.js} +7 -7
  48. package/dist/{vue-ui-gizmo-Do2l3RQR.js → vue-ui-gizmo-BKFkgGl1.js} +3 -3
  49. package/dist/{vue-ui-heatmap-BOJYMJYJ.js → vue-ui-heatmap-B08VbsZk.js} +7 -7
  50. package/dist/{vue-ui-history-plot-5fuga4eO.js → vue-ui-history-plot-BvAaPM0b.js} +7 -7
  51. package/dist/{vue-ui-kpi-BOfQ0HWM.js → vue-ui-kpi-BCli_Oat.js} +3 -3
  52. package/dist/{vue-ui-mini-loader-CWOIUKzZ.js → vue-ui-mini-loader-CwBVf_Bc.js} +2 -2
  53. package/dist/{vue-ui-molecule-byfBNMP5.js → vue-ui-molecule-DkJCfOEu.js} +5 -5
  54. package/dist/{vue-ui-mood-radar-qRyQXd1k.js → vue-ui-mood-radar-B-el5zcg.js} +7 -7
  55. package/dist/{vue-ui-nested-donuts-CoKPr31d.js → vue-ui-nested-donuts-BgseQZD4.js} +9 -9
  56. package/dist/{vue-ui-onion-62S3aK6f.js → vue-ui-onion-CdTDPPrC.js} +8 -8
  57. package/dist/{vue-ui-parallel-coordinate-plot-Bf6qT_kb.js → vue-ui-parallel-coordinate-plot-DzY0c4Gr.js} +8 -8
  58. package/dist/{vue-ui-quadrant-nD_ehg0M.js → vue-ui-quadrant-BYSI-5fs.js} +8 -8
  59. package/dist/{vue-ui-quick-chart-D0Drg50D.js → vue-ui-quick-chart-BC9sXwU2.js} +6 -6
  60. package/dist/vue-ui-radar-BvDfIQr6.js +796 -0
  61. package/dist/{vue-ui-rating-CAP1uwSx.js → vue-ui-rating-DdeWSyH1.js} +2 -2
  62. package/dist/{vue-ui-relation-circle-DXUzlOqR.js → vue-ui-relation-circle-BD3adAYy.js} +7 -7
  63. package/dist/{vue-ui-ridgeline-Brn3KjVG.js → vue-ui-ridgeline-FvrFbaO1.js} +8 -8
  64. package/dist/{vue-ui-rings-DNiA3VM5.js → vue-ui-rings-CGw0wv3g.js} +8 -8
  65. package/dist/{vue-ui-scatter-slbhxje5.js → vue-ui-scatter-CALNRCTu.js} +8 -8
  66. package/dist/{vue-ui-skeleton-BPsgTTFC.js → vue-ui-skeleton-vwEzXl55.js} +3 -3
  67. package/dist/{vue-ui-smiley-BEV2e-0E.js → vue-ui-smiley-Beerz32J.js} +2 -2
  68. package/dist/{vue-ui-spark-trend-CcYGN8Yg.js → vue-ui-spark-trend-DQtO4pr7.js} +3 -3
  69. package/dist/{vue-ui-sparkbar-BL8L45qs.js → vue-ui-sparkbar-Bz0ylQwC.js} +3 -3
  70. package/dist/{vue-ui-sparkgauge-69sXKMW3.js → vue-ui-sparkgauge-D2Gi-TJt.js} +3 -3
  71. package/dist/{vue-ui-sparkhistogram-DB8v9HCa.js → vue-ui-sparkhistogram-tQsjnnAY.js} +4 -4
  72. package/dist/{vue-ui-sparkline-9_tQJPOw.js → vue-ui-sparkline-B3NKERaF.js} +3 -3
  73. package/dist/{vue-ui-sparkstackbar-BTLcoSfN.js → vue-ui-sparkstackbar-DRO4XWDf.js} +3 -3
  74. package/dist/{vue-ui-stackbar--Es9Wqt2.js → vue-ui-stackbar-B8e360hP.js} +9 -9
  75. package/dist/{vue-ui-strip-plot-DFC6Ae22.js → vue-ui-strip-plot-B1238Nts.js} +64 -64
  76. package/dist/{vue-ui-table-CutY766t.js → vue-ui-table-WQeb2fx2.js} +3 -3
  77. package/dist/{vue-ui-table-heatmap-Ba_JciDM.js → vue-ui-table-heatmap-FEL4AFQb.js} +5 -5
  78. package/dist/{vue-ui-table-sparkline-JNY1yztC.js → vue-ui-table-sparkline-BfsGsD6x.js} +4 -4
  79. package/dist/{vue-ui-thermometer-zZ7z0Y2Z.js → vue-ui-thermometer-BbGs_pDh.js} +7 -7
  80. package/dist/{vue-ui-timer-dF6lpfql.js → vue-ui-timer-CCfX_1k0.js} +5 -5
  81. package/dist/{vue-ui-tiremarks-Dk7uVoOR.js → vue-ui-tiremarks-By2uVh5U.js} +6 -6
  82. package/dist/{vue-ui-treemap-8W7QuTfU.js → vue-ui-treemap-B4gglMFf.js} +8 -8
  83. package/dist/{vue-ui-vertical-bar-DEy2JtQf.js → vue-ui-vertical-bar-f6zgXB77.js} +9 -9
  84. package/dist/{vue-ui-waffle-CFwkqhSG.js → vue-ui-waffle-ByX8Lgdr.js} +8 -8
  85. package/dist/{vue-ui-wheel-XqXjihC1.js → vue-ui-wheel-CU7g4I0-.js} +6 -6
  86. package/dist/{vue-ui-word-cloud-BnxT_WBR.js → vue-ui-word-cloud-Dw4RD-ND.js} +6 -6
  87. package/dist/{vue-ui-world-dqT_Hnw-.js → vue-ui-world-BWR8i0Be.js} +6 -6
  88. package/dist/{vue-ui-xy-CWt4Pnav.js → vue-ui-xy-CwcULvEi.js} +9 -9
  89. package/dist/{vue-ui-xy-canvas-BJKwoxcg.js → vue-ui-xy-canvas-DmM07Man.js} +8 -8
  90. package/package.json +1 -1
  91. package/dist/vue-ui-chord-19f8Fg5T.js +0 -949
  92. package/dist/vue-ui-radar-C4_LqHUJ.js +0 -743
@@ -1,949 +0,0 @@
1
- import { useCssVars as _t, defineAsyncComponent as Y, ref as h, shallowRef as He, computed as C, watch as St, onMounted as Qe, onBeforeUnmount as Ze, createElementBlock as i, openBlock as n, unref as d, normalizeStyle as F, normalizeClass as z, createBlock as G, createCommentVNode as v, renderSlot as $, createElementVNode as B, createSlots as Je, withCtx as _, normalizeProps as re, guardReactiveProps as ue, withModifiers as Ke, createVNode as he, Fragment as R, renderList as W, mergeProps as Tt, toDisplayString as D, createTextVNode as Ot, nextTick as Bt } from "vue";
2
- import { u as Lt, c as fe, a as Nt, p as ie, b as Et, o as Ft, f as et, g as zt, d as Rt, e as Xt, X as jt, F as Dt, i as ge, v as Ut, w as Vt, k as Yt } from "./index-CeUkdATZ.js";
3
- import { u as Gt } from "./useUserOptionState-BIvW1Kz7.js";
4
- import { u as tt } from "./useNestedProp-C3RxqPvb.js";
5
- import { u as Wt } from "./useChartAccessibility-9icAAmYg.js";
6
- import { u as qt } from "./usePrinter-DIeBTduG.js";
7
- import { t as Ht, u as Qt } from "./useResponsive-DfdjqQps.js";
8
- import Zt from "./Legend-B4uyXKfG.js";
9
- import Jt from "./Title-Bd726vHk.js";
10
- import { _ as Kt } from "./Shape-1KI-6QL_.js";
11
- import ea from "./img-BBKrPg3D.js";
12
- import { _ as ta } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
- const aa = ["id"], oa = ["xmlns", "viewBox"], la = ["width", "height"], sa = { key: 1 }, na = ["id", "d"], ra = { key: 2 }, ua = ["transform"], ia = ["d", "fill", "stroke", "stroke-width", "onMouseenter", "onClick"], ca = ["d", "fill", "stroke", "stroke-width"], da = ["d", "fill"], va = ["d", "fill", "stroke", "stroke-width", "onMouseenter", "onClick"], ha = ["d", "fill", "stroke", "stroke-width"], fa = ["d", "fill", "stroke", "stroke-width"], ga = ["d", "fill", "stroke", "stroke-width"], pa = { key: 0 }, ba = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], ma = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], ya = ["cx", "cy", "r", "stroke", "stroke-width", "fill"], ka = ["transform", "fill", "text-anchor", "font-size", "font-weight"], $a = { key: 1 }, wa = ["font-size", "font-weight", "fill"], Ca = ["href"], Ma = ["transform", "text-anchor", "font-size", "font-weight", "fill"], xa = {
14
- key: 5,
15
- class: "vue-data-ui-watermark"
16
- }, Ia = ["onClick"], Aa = {
17
- key: 8,
18
- "data-dom-to-png-ignore": "",
19
- class: "reset-wrapper"
20
- }, Pa = { style: { "text-align": "right", width: "100%" } }, _a = {
21
- __name: "vue-ui-chord",
22
- props: {
23
- dataset: {
24
- type: Object,
25
- default() {
26
- return {};
27
- }
28
- },
29
- config: {
30
- type: Object,
31
- default() {
32
- return {};
33
- }
34
- }
35
- },
36
- emits: ["selectLegend", "selectGroup", "selectRibbon"],
37
- setup(at, { expose: ot, emit: lt }) {
38
- _t((t) => ({
39
- "3518436d": t.slicerColor
40
- }));
41
- const st = Y(() => import("./vue-ui-accordion-DhuD9Hkv.js")), nt = Y(() => import("./BaseIcon-BrSUZHhD.js")), rt = Y(() => import("./DataTable-COXa-OUM.js")), ut = Y(() => import("./PackageVersion-CkCjIYtm.js")), it = Y(() => import("./PenAndPaper-Dh8MOFtt.js")), ct = Y(() => import("./vue-ui-skeleton-BPsgTTFC.js")), dt = Y(() => import("./UserOptions-DwjhbLQc.js")), { vue_ui_chord: vt } = Lt(), g = at, te = lt, L = h(!!g.dataset && Object.hasOwn(g.dataset, "matrix")), S = h(fe()), w = h(null), m = h(null), p = h(null), pe = h(0), N = h(null), be = h(null), me = h(null), ye = h(null), ke = h(null), $e = h(0), we = h(0), Ce = h(0), q = h(!1), X = He(null), H = He(null), a = C({
42
- get: () => Se(),
43
- set: (t) => t
44
- }), { userOptionsVisible: ce, setUserOptionsVisibility: Me, keepUserOptionState: xe } = Gt({ config: a.value }), { svgRef: Q } = Wt({ config: a.value.style.chart.title }), { isPrinting: Ie, isImaging: Ae, generatePdf: Pe, generateImage: _e } = qt({
45
- elementId: `chord_${S.value}`,
46
- fileName: a.value.style.chart.title.text || "vue-ui-chord",
47
- options: a.value.userOptions.print
48
- }), Z = h({
49
- showTable: a.value.table.show
50
- });
51
- function Se() {
52
- const t = tt({
53
- userConfig: g.config,
54
- defaultConfig: vt
55
- });
56
- return t.theme ? {
57
- ...tt({
58
- userConfig: Et.vue_ui_chord[t.theme] || g.config,
59
- defaultConfig: t
60
- }),
61
- customPalette: Nt[t.theme] || ie
62
- } : t;
63
- }
64
- St(() => g.config, (t) => {
65
- a.value = Se(), ce.value = !a.value.userOptions.showOnChartHover, Te(), $e.value += 1, we.value += 1, Ce.value += 1, x.value = a.value.initialRotation, Z.value.showTable = a.value.table.show;
66
- }, { deep: !0 });
67
- function Te() {
68
- if (Ft(g.dataset) ? et({
69
- componentName: "VueUiChord",
70
- type: "dataset"
71
- }) : zt({
72
- datasetObject: g.dataset,
73
- requiredAttributes: ["matrix"]
74
- }).forEach((t) => {
75
- L.value = !1, et({
76
- componentName: "VueUiChord",
77
- type: "datasetAttribute",
78
- property: t
79
- });
80
- }), L.value && Oe(), a.value.responsive) {
81
- const t = Ht(() => {
82
- const { width: o, height: e, heightNoTitle: l, heightSource: u, heightTitle: s, heightLegend: r } = Qt({
83
- chart: N.value,
84
- title: a.value.style.chart.title.text ? be.value : null,
85
- legend: a.value.style.chart.legend.show ? me.value : null,
86
- source: ye.value,
87
- noTitle: ke.value
88
- }), f = s + r + u + l;
89
- o < e ? N.value.style.width = "100%" : (N.value.style.height = "100%", Q.value.style.height = `calc(100% - ${f}px)`);
90
- }, 100);
91
- X.value && (H.value && X.value.unobserve(H.value), X.value.disconnect()), X.value = new ResizeObserver(t), H.value = N.value.parentNode, X.value.observe(H.value), t();
92
- }
93
- Be.value = setTimeout(() => {
94
- q.value = !0;
95
- }, 500);
96
- }
97
- function Oe() {
98
- if (!g.dataset || !Object.hasOwn(g.dataset, "matrix") || g.dataset.matrix.length < 2) {
99
- console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
100
-
101
- matrix:[
102
- [1, 1],
103
- [1, 1]
104
- ]`), L.value = !1;
105
- return;
106
- }
107
- g.dataset.matrix.forEach((t, o) => {
108
- t.length !== g.dataset.matrix.length && (console.warn(`VueUiChord - Invalid matrix: dataset.matrix at index ${o} has ${t.length} elements instead of the required ${g.dataset.matrix.length}
109
-
110
- dataset.matrix[${o}] = [${t.toString()}] has a length of ${t.length} but should have the same length as the matrix itself (${g.dataset.matrix.length})`), L.value = !1);
111
- });
112
- }
113
- const Be = h(null);
114
- Qe(() => {
115
- Te();
116
- });
117
- const T = h({
118
- height: 600,
119
- width: 600
120
- }), ht = C(() => a.value.userOptions.show && !a.value.style.chart.title.text), ft = C(() => Rt(a.value.customPalette)), b = C(() => ({
121
- inner: T.value.width * 0.3 * a.value.style.chart.arcs.innerRadiusRatio,
122
- outer: T.value.width * 0.34 * a.value.style.chart.arcs.outerRadiusRatio
123
- })), gt = C(() => a.value.style.chart.arcs.padAngle / 100), y = C(() => L.value ? {
124
- matrix: g.dataset.matrix ?? [[0]],
125
- labels: g.dataset.labels ?? [""],
126
- colors: g.dataset.colors && Array.isArray(g.dataset.colors) && g.dataset.colors.length ? g.dataset.colors.map((t) => Xt(t)) : g.dataset.matrix.map((t, o) => ft.value[o] || ie[o] || ie[o % ie.length])
127
- } : {
128
- matrix: [],
129
- labels: [],
130
- colors: []
131
- });
132
- function pt(t, o) {
133
- const e = t.length, l = b.value.inner, u = new Array(e).fill(0);
134
- let s = 0;
135
- for (let c = 0; c < e; c += 1)
136
- for (let k = 0; k < e; k += 1)
137
- u[c] += t[c][k], s += t[c][k];
138
- const r = (2 * Math.PI - o * e) / s, f = [];
139
- let I = 0;
140
- for (let c = 0; c < e; c += 1) {
141
- const k = I, P = k + u[c] * r;
142
- f.push({
143
- index: c,
144
- pattern: `pattern_${S.value}_${c}`,
145
- startAngle: k,
146
- endAngle: P,
147
- name: y.value.labels[c],
148
- id: fe(),
149
- color: y.value.colors[c],
150
- proportion: u[c] / s
151
- }), I = P + o;
152
- }
153
- const A = [];
154
- for (let c = 0; c < e; c += 1) {
155
- const k = t[c].map((O, j) => ({ j, v: O }));
156
- k.sort((O, j) => j.v - O.v);
157
- let P = f[c].startAngle;
158
- for (const { j: O, v: j } of k) {
159
- const V = P, ee = V + j * r;
160
- A.push({
161
- index: c,
162
- subIndex: O,
163
- pattern: `pattern_${S.value}_${c}`,
164
- startAngle: V,
165
- endAngle: ee,
166
- value: j,
167
- groupName: y.value.labels[c],
168
- groupId: f[c].id,
169
- groupColor: y.value.colors[c],
170
- midAngle: (V + ee) / 2,
171
- midBaseX: Math.cos((V + ee) / 2 - Math.PI / 2) * l,
172
- midBaseY: Math.sin((V + ee) / 2 - Math.PI / 2) * l
173
- }), P = ee;
174
- }
175
- }
176
- const E = [];
177
- for (const c of A) {
178
- const k = A.find(
179
- (P) => P.index === c.subIndex && P.subIndex === c.index
180
- );
181
- E.push({ source: c, target: k, id: fe() });
182
- }
183
- return { groups: f, chords: E };
184
- }
185
- const M = C(() => {
186
- const t = pt(y.value.matrix, gt.value);
187
- return Oe(), t.chords.sort(
188
- (o, e) => Math.max(e.source.value, e.target.value) - Math.max(o.source.value, o.target.value)
189
- ), t;
190
- }), bt = C(() => {
191
- const t = b.value.outer + a.value.style.chart.ribbons.labels.offset + 12, e = a.value.style.chart.ribbons.labels.fontSize * 0.6, l = [];
192
- if (m.value) {
193
- const s = m.value;
194
- if (s.source.value) {
195
- const r = String(s.source.value);
196
- l.push({
197
- id: s.id + "-src",
198
- theta: s.source.midAngle,
199
- w: r.length * e / t,
200
- midBaseX: s.source.midBaseX,
201
- midBaseY: s.source.midBaseY,
202
- groupColor: s.source.groupColor,
203
- value: s.source.value
204
- });
205
- }
206
- if (s.target && s.target.value && s.target.value !== s.source.value) {
207
- const r = String(s.target.value);
208
- l.push({
209
- id: s.id + "-tgt",
210
- theta: s.target.midAngle,
211
- w: r.length * e / t,
212
- midBaseX: s.target.midBaseX,
213
- midBaseY: s.target.midBaseY,
214
- groupColor: s.target.groupColor,
215
- value: s.target.value
216
- });
217
- }
218
- return l;
219
- }
220
- function u(s) {
221
- M.value.chords.filter((r) => r.source.groupId === s && r.source.value).forEach((r) => {
222
- {
223
- const f = String(r.source.value);
224
- l.push({
225
- id: r.id + "-src",
226
- theta: r.source.midAngle,
227
- w: f.length * e / t,
228
- midBaseX: r.source.midBaseX,
229
- midBaseY: r.source.midBaseY,
230
- groupColor: r.source.groupColor,
231
- value: r.source.value
232
- });
233
- }
234
- if (r.target && r.target.value && r.target.value !== r.source.value) {
235
- const f = String(r.target.value);
236
- l.push({
237
- id: r.id + "-tgt",
238
- theta: r.target.midAngle,
239
- w: f.length * e / t,
240
- midBaseX: r.target.midBaseX,
241
- midBaseY: r.target.midBaseY,
242
- groupColor: r.target.groupColor,
243
- value: r.target.value
244
- });
245
- }
246
- });
247
- }
248
- return p.value && u(p.value), w.value && u(w.value.id), l;
249
- }), mt = C(() => {
250
- const t = bt.value.map((u) => ({ ...u })).sort((u, s) => u.theta - s.theta), o = a.value.style.chart.ribbons.labels.minSeparationDeg * Math.PI / 180;
251
- let e = !0, l = 0;
252
- for (; e && l++ < 10; ) {
253
- e = !1;
254
- for (let f = 1; f < t.length; f += 1) {
255
- const I = t[f - 1], A = t[f], E = I.theta + I.w + o;
256
- A.theta < E && (A.theta = E, e = !0);
257
- }
258
- const u = t[0], s = t[t.length - 1], r = s.theta + s.w + o - 2 * Math.PI;
259
- u.theta < r && (u.theta = r, e = !0);
260
- }
261
- return t;
262
- });
263
- function Le(t, o, e, l) {
264
- const u = t - Math.PI / 2, s = o - Math.PI / 2, r = Math.cos(u) * e, f = Math.sin(u) * e, I = Math.cos(s) * e, A = Math.sin(s) * e, E = Math.cos(s) * l, c = Math.sin(s) * l, k = Math.cos(u) * l, P = Math.sin(u) * l, O = o - t > Math.PI ? 1 : 0;
265
- return `M${r},${f} A${e},${e} 0 ${O} 1 ${I},${A} L${E},${c} A${l},${l} 0 ${O} 0 ${k},${P} Z`;
266
- }
267
- function ae(t, o) {
268
- const e = b.value.inner, l = t.startAngle - Math.PI / 2, u = t.endAngle - Math.PI / 2, s = o.startAngle - Math.PI / 2, r = o.endAngle - Math.PI / 2, f = Math.cos(l) * e, I = Math.sin(l) * e, A = Math.cos(u) * e, E = Math.sin(u) * e, c = Math.cos(s) * e, k = Math.sin(s) * e, P = Math.cos(r) * e, O = Math.sin(r) * e, j = t.endAngle - t.startAngle > Math.PI ? 1 : 0, V = o.endAngle - o.startAngle > Math.PI ? 1 : 0;
269
- return `M${f},${I}A${e},${e} 0 ${j} 1 ${A},${E}Q0,0 ${c},${k}A${e},${e} 0 ${V} 1 ${P},${O}Q0,0 ${f},${I}Z`;
270
- }
271
- const Ne = C(() => x.value * Math.PI / 180);
272
- function yt(t) {
273
- return (t.startAngle + t.endAngle) / 2;
274
- }
275
- function kt(t) {
276
- return ((yt(t) + Ne.value) % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI);
277
- }
278
- function $t(t) {
279
- let o = t + Ne.value;
280
- return o = (o % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI), o > Math.PI ? "end" : "start";
281
- }
282
- function wt(t) {
283
- const o = t - Math.PI / 2, e = Math.cos(o) * (b.value.outer + a.value.style.chart.arcs.labels.offset + 24), l = Math.sin(o) * (b.value.outer + a.value.style.chart.arcs.labels.offset + 24);
284
- return `translate(${e},${l})`;
285
- }
286
- function Ct(t, o, e) {
287
- const l = t - Math.PI / 2, u = o - Math.PI / 2, s = Math.cos(l) * e, r = Math.sin(l) * e, f = Math.cos(u) * e, I = Math.sin(u) * e, A = o - t > Math.PI ? 1 : 0;
288
- return `M${s},${r} A${e},${e} 0 ${A} 1 ${f},${I}`;
289
- }
290
- const x = h(a.value.initialRotation), J = h(!1);
291
- let Ee = 0, Fe = 0;
292
- function ze(t) {
293
- const o = Q.value.getBoundingClientRect(), e = o.left + o.width / 2, l = o.top + o.height / 2, u = t.clientX ?? t.touches[0].clientX, s = t.clientY ?? t.touches[0].clientY;
294
- return Math.atan2(s - l, u - e);
295
- }
296
- function Re(t) {
297
- !a.value.enableRotation || K.value || (t.preventDefault(), J.value = !0, Ee = x.value, Fe = ze(t));
298
- }
299
- function oe(t) {
300
- if (!J.value) return;
301
- const o = ze(t);
302
- x.value = Ee + (o - Fe) * 180 / Math.PI;
303
- }
304
- function le() {
305
- J.value = !1;
306
- }
307
- function Xe(t) {
308
- return Yt(
309
- a.value.style.chart.ribbons.labels.formatter,
310
- t,
311
- ge({
312
- p: a.value.style.chart.ribbons.labels.prefix,
313
- v: t,
314
- s: a.value.style.chart.ribbons.labels.suffix,
315
- r: a.value.style.chart.ribbons.labels.rounding
316
- })
317
- );
318
- }
319
- Qe(() => {
320
- window.addEventListener("mousemove", oe), window.addEventListener("mouseup", le), window.addEventListener("touchmove", oe, { passive: !1 }), window.addEventListener("touchend", le);
321
- }), Ze(() => {
322
- window.removeEventListener("mousemove", oe), window.removeEventListener("mouseup", le), window.removeEventListener("touchmove", oe), window.removeEventListener("touchend", le), clearTimeout(Be.value), X.value && (H.value && X.value.unobserve(H.value), X.value.disconnect());
323
- });
324
- const de = h(!1);
325
- function je(t) {
326
- de.value = t, pe.value += 1;
327
- }
328
- function Mt(t) {
329
- p.value || (w.value = t);
330
- }
331
- function xt(t) {
332
- p.value || (m.value = t);
333
- }
334
- function De(t) {
335
- return !p.value && !w.value && !m.value ? 0.8 : (p.value ? p.value === t.source.groupId : w.value ? w.value.id === t.source.groupId : m.value?.id === t.id) ? 1 : 0.1;
336
- }
337
- function Ue(t) {
338
- return !p.value && !w.value && !m.value || (p.value ? p.value === t.id : w.value ? w.value.id === t.id : [m.value?.source.groupId, m.value?.target.groupId].includes(t.id)) ? 1 : 0.3;
339
- }
340
- const K = h(!1);
341
- function ve() {
342
- K.value = !K.value;
343
- }
344
- function Ve() {
345
- Z.value.showTable = !Z.value.showTable;
346
- }
347
- function It() {
348
- return M.value;
349
- }
350
- const U = h(null);
351
- function Ye() {
352
- const t = a.value.initialRotation;
353
- U.value !== null && cancelAnimationFrame(U.value);
354
- const o = () => {
355
- x.value += (t - x.value) * 0.05, Math.abs(x.value - t) < 0.1 ? (x.value = t, U.value = null) : U.value = requestAnimationFrame(o);
356
- };
357
- U.value = requestAnimationFrame(o);
358
- }
359
- Ze(() => {
360
- U.value !== null && cancelAnimationFrame(U.value);
361
- });
362
- function Ge(t) {
363
- t === p.value ? (p.value = null, te("selectLegend", null)) : (p.value = t, te("selectLegend", M.value.groups.find((o) => o.id === t)));
364
- }
365
- const We = C(() => M.value.groups.map((t, o) => ({
366
- name: t.name,
367
- color: t.color,
368
- shape: "circle",
369
- patternIndex: o,
370
- pattern: `pattern_${S.value}_${o}`,
371
- id: t.id,
372
- select: () => Ge(t.id),
373
- opacity: p.value ? p.value === t.id ? 1 : 0.3 : 1
374
- }))), At = C(() => ({
375
- cy: "chord-div-legend",
376
- backgroundColor: a.value.style.chart.legend.backgroundColor,
377
- color: a.value.style.chart.legend.color,
378
- fontSize: a.value.style.chart.legend.fontSize,
379
- paddingBottom: 12,
380
- fontWeight: a.value.style.chart.legend.bold ? "bold" : ""
381
- })), se = C(() => {
382
- const t = M.value.groups.map((e, l) => ({
383
- name: e.name || l,
384
- color: e.color
385
- })), o = y.value.matrix;
386
- return { head: t, body: o };
387
- }), ne = C(() => {
388
- const t = [{ name: "", color: null }, ...se.value.head], o = se.value.body.map((u, s) => [
389
- se.value.head[s],
390
- ...se.value.body[s]
391
- ]), e = {
392
- th: {
393
- backgroundColor: a.value.table.th.backgroundColor,
394
- color: a.value.table.th.color,
395
- outline: a.value.table.th.outline
396
- },
397
- td: {
398
- backgroundColor: a.value.table.td.backgroundColor,
399
- color: a.value.table.td.color,
400
- outline: a.value.table.td.outline
401
- },
402
- breakpoint: a.value.table.responsiveBreakpoint
403
- };
404
- return {
405
- colNames: t,
406
- head: t,
407
- body: o,
408
- config: e
409
- };
410
- });
411
- function qe(t = null) {
412
- Bt(() => {
413
- const o = y.value.matrix.map((u, s) => [
414
- [y.value.labels[s] || s],
415
- u
416
- ]), e = [
417
- [a.value.style.chart.title.text],
418
- [a.value.style.chart.title.subtitle.text],
419
- [
420
- [""],
421
- ...y.value.labels.map((u, s) => [u || s])
422
- ]
423
- ].concat(o), l = Ut(e);
424
- t ? t(l) : Vt({ csvContent: l, title: a.value.style.chart.title.text || "vue-ui-chord" });
425
- });
426
- }
427
- async function Pt({ scale: t = 2 } = {}) {
428
- if (!N.value) return;
429
- const { width: o, height: e } = N.value.getBoundingClientRect(), l = o / e, { imageUri: u, base64: s } = await ea({ domElement: N.value, base64: !0, img: !0, scale: t });
430
- return {
431
- imageUri: u,
432
- base64: s,
433
- title: a.value.style.chart.title.text,
434
- width: o,
435
- height: e,
436
- aspectRatio: l
437
- };
438
- }
439
- return ot({
440
- getData: It,
441
- getImage: Pt,
442
- generateCsv: qe,
443
- generateImage: _e,
444
- generatePdf: Pe,
445
- toggleAnnotator: ve,
446
- toggleTable: Ve,
447
- toggleFullscreen: je
448
- }), (t, o) => (n(), i("div", {
449
- ref_key: "chordChart",
450
- ref: N,
451
- class: z({
452
- "vue-ui-chord": !0,
453
- "vue-data-ui-wrapper-fullscreen": de.value,
454
- "vue-data-ui-responsive": a.value.responsive
455
- }),
456
- style: F(`font-family:${a.value.style.fontFamily};width:100%; text-align:center;background:${a.value.style.chart.backgroundColor}`),
457
- id: `chord_${S.value}`,
458
- onMouseenter: o[4] || (o[4] = () => d(Me)(!0)),
459
- onMouseleave: o[5] || (o[5] = () => d(Me)(!1))
460
- }, [
461
- a.value.userOptions.buttons.annotator && d(Q) ? (n(), G(d(it), {
462
- key: 0,
463
- color: a.value.style.chart.color,
464
- backgroundColor: a.value.style.chart.backgroundColor,
465
- active: K.value,
466
- svgRef: d(Q),
467
- onClose: ve
468
- }, null, 8, ["color", "backgroundColor", "active", "svgRef"])) : v("", !0),
469
- $(t.$slots, "userConfig", {}, void 0, !0),
470
- ht.value ? (n(), i("div", {
471
- key: 1,
472
- ref_key: "noTitle",
473
- ref: ke,
474
- class: "vue-data-ui-no-title-space",
475
- style: "height:36px; width: 100%;background:transparent"
476
- }, null, 512)) : v("", !0),
477
- a.value.style.chart.title.text ? (n(), i("div", {
478
- key: 2,
479
- ref_key: "chartTitle",
480
- ref: be,
481
- style: "width:100%;background:transparent;padding-bottom:24px"
482
- }, [
483
- (n(), G(Jt, {
484
- key: `title_${$e.value}`,
485
- config: {
486
- title: {
487
- cy: "chord-div-title",
488
- ...a.value.style.chart.title
489
- },
490
- subtitle: {
491
- cy: "chord-div-subtitle",
492
- ...a.value.style.chart.title.subtitle
493
- }
494
- }
495
- }, null, 8, ["config"]))
496
- ], 512)) : v("", !0),
497
- a.value.userOptions.show && L.value && (d(xe) || d(ce)) ? (n(), G(d(dt), {
498
- ref: "details",
499
- key: `user_option_${pe.value}`,
500
- backgroundColor: a.value.style.chart.backgroundColor,
501
- color: a.value.style.chart.color,
502
- isPrinting: d(Ie),
503
- isImaging: d(Ae),
504
- uid: S.value,
505
- hasTooltip: !1,
506
- hasPdf: a.value.userOptions.buttons.pdf,
507
- hasImg: a.value.userOptions.buttons.img,
508
- hasXls: a.value.userOptions.buttons.csv,
509
- hasTable: a.value.userOptions.buttons.table,
510
- hasLabel: !1,
511
- hasFullscreen: a.value.userOptions.buttons.fullscreen,
512
- isFullscreen: de.value,
513
- chartElement: N.value,
514
- position: a.value.userOptions.position,
515
- titles: { ...a.value.userOptions.buttonTitles },
516
- hasAnnotator: a.value.userOptions.buttons.annotator,
517
- isAnnotation: K.value,
518
- callbacks: a.value.userOptions.callbacks,
519
- printScale: a.value.userOptions.print.scale,
520
- onToggleFullscreen: je,
521
- onGeneratePdf: d(Pe),
522
- onGenerateCsv: qe,
523
- onGenerateImage: d(_e),
524
- onToggleTable: Ve,
525
- onToggleAnnotator: ve,
526
- style: F({
527
- visibility: d(xe) ? d(ce) ? "visible" : "hidden" : "visible"
528
- })
529
- }, Je({ _: 2 }, [
530
- t.$slots.menuIcon ? {
531
- name: "menuIcon",
532
- fn: _(({ isOpen: e, color: l }) => [
533
- $(t.$slots, "menuIcon", re(ue({ isOpen: e, color: l })), void 0, !0)
534
- ]),
535
- key: "0"
536
- } : void 0,
537
- t.$slots.optionPdf ? {
538
- name: "optionPdf",
539
- fn: _(() => [
540
- $(t.$slots, "optionPdf", {}, void 0, !0)
541
- ]),
542
- key: "1"
543
- } : void 0,
544
- t.$slots.optionCsv ? {
545
- name: "optionCsv",
546
- fn: _(() => [
547
- $(t.$slots, "optionCsv", {}, void 0, !0)
548
- ]),
549
- key: "2"
550
- } : void 0,
551
- t.$slots.optionImg ? {
552
- name: "optionImg",
553
- fn: _(() => [
554
- $(t.$slots, "optionImg", {}, void 0, !0)
555
- ]),
556
- key: "3"
557
- } : void 0,
558
- t.$slots.optionTable ? {
559
- name: "optionTable",
560
- fn: _(() => [
561
- $(t.$slots, "optionTable", {}, void 0, !0)
562
- ]),
563
- key: "4"
564
- } : void 0,
565
- t.$slots.optionFullscreen ? {
566
- name: "optionFullscreen",
567
- fn: _(({ toggleFullscreen: e, isFullscreen: l }) => [
568
- $(t.$slots, "optionFullscreen", re(ue({ toggleFullscreen: e, isFullscreen: l })), void 0, !0)
569
- ]),
570
- key: "5"
571
- } : void 0,
572
- t.$slots.optionAnnotator ? {
573
- name: "optionAnnotator",
574
- fn: _(({ toggleAnnotator: e, isAnnotator: l }) => [
575
- $(t.$slots, "optionAnnotator", re(ue({ toggleAnnotator: e, isAnnotator: l })), void 0, !0)
576
- ]),
577
- key: "6"
578
- } : void 0
579
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : v("", !0),
580
- L.value ? (n(), i("svg", {
581
- key: 4,
582
- xmlns: d(jt),
583
- ref_key: "svgRef",
584
- ref: Q,
585
- viewBox: `0 0 ${T.value.width} ${T.value.height}`,
586
- preserveAspectRatio: "xMidYMid meet",
587
- style: {
588
- overflow: "visible"
589
- },
590
- class: z({ "vue-ui-chord-rotating": J.value, "vue-ui-chord-idle": !J.value }),
591
- onMousedown: Ke(Re, ["prevent"]),
592
- onTouchstart: Ke(Re, ["prevent"])
593
- }, [
594
- he(d(ut)),
595
- t.$slots["chart-background"] ? (n(), i("foreignObject", {
596
- key: 0,
597
- x: 0,
598
- y: 0,
599
- width: T.value.width <= 0 ? 10 : T.value.width,
600
- height: T.value.height <= 0 ? 10 : T.value.height,
601
- style: {
602
- pointerEvents: "none"
603
- }
604
- }, [
605
- $(t.$slots, "chart-background", {}, void 0, !0)
606
- ], 8, la)) : v("", !0),
607
- a.value.style.chart.arcs.labels.curved ? (n(), i("defs", sa, [
608
- (n(!0), i(R, null, W(M.value.groups, (e, l) => (n(), i("path", {
609
- key: `labelPath-${l}`,
610
- id: `labelPath-${l}_${S.value}`,
611
- d: Ct(
612
- e.startAngle,
613
- e.endAngle,
614
- (b.value.inner + b.value.outer) / 2 + a.value.style.chart.arcs.labels.offset
615
- ),
616
- fill: "none"
617
- }, null, 8, na))), 128))
618
- ])) : v("", !0),
619
- t.$slots.pattern ? (n(), i("g", ra, [
620
- (n(!0), i(R, null, W(M.value.groups, (e, l) => (n(), i("defs", null, [
621
- $(t.$slots, "pattern", Tt({ ref_for: !0 }, { seriesIndex: e.index, patternId: `pattern_${S.value}_${l}` }), void 0, !0)
622
- ]))), 256))
623
- ])) : v("", !0),
624
- B("g", {
625
- transform: `translate(${T.value.width / 2}, ${T.value.height / 2}) rotate(${x.value})`
626
- }, [
627
- (n(!0), i(R, null, W(M.value.groups, (e, l) => (n(), i("g", null, [
628
- (n(), i("path", {
629
- class: z({ "vue-ui-chord-arc": !0, "vue-ui-chord-arc-animated": a.value.useCssAnimation && !q.value }),
630
- key: `arc-${l}`,
631
- d: Le(
632
- e.startAngle,
633
- e.endAngle,
634
- b.value.outer,
635
- b.value.inner
636
- ),
637
- fill: y.value.colors[l],
638
- stroke: a.value.style.chart.arcs.stroke,
639
- "stroke-width": a.value.style.chart.arcs.strokeWidth,
640
- "stroke-linecap": "round",
641
- "stroke-linejoin": "round",
642
- style: F({
643
- opacity: Ue(e)
644
- }),
645
- onMouseenter: () => Mt(e),
646
- onMouseleave: o[0] || (o[0] = (u) => w.value = null),
647
- onClick: (u) => te("selectGroup", e)
648
- }, null, 46, ia)),
649
- t.$slots.pattern ? (n(), i("path", {
650
- class: z({ "vue-ui-chord-arc": !0, "vue-ui-chord-arc-animated": a.value.useCssAnimation && !q.value }),
651
- key: `arc-${l}`,
652
- d: Le(
653
- e.startAngle,
654
- e.endAngle,
655
- b.value.outer,
656
- b.value.inner
657
- ),
658
- fill: `url(#${e.pattern})`,
659
- stroke: a.value.style.chart.arcs.stroke,
660
- "stroke-width": a.value.style.chart.arcs.strokeWidth,
661
- "stroke-linecap": "round",
662
- "stroke-linejoin": "round",
663
- style: F({
664
- opacity: Ue(e),
665
- pointerEvents: "none"
666
- })
667
- }, null, 14, ca)) : v("", !0)
668
- ]))), 256)),
669
- B("g", null, [
670
- (n(!0), i(R, null, W(w.value ? M.value.chords.filter((e) => e.source.groupId === w.value.id) : p.value ? M.value.chords.filter((e) => e.source.groupId === p.value) : M.value.chords, (e) => (n(), i(R, {
671
- key: `ribbon-${e.id}`
672
- }, [
673
- e.source.value ? (n(), i("path", {
674
- key: 0,
675
- class: z({ "vue-ui-chord-ribbon": !0, "vue-ui-chord-ribbon-animated": a.value.useCssAnimation && !q.value }),
676
- d: ae(e.source, e.target),
677
- fill: a.value.style.chart.backgroundColor,
678
- style: F({ opacity: a.value.style.chart.ribbons.underlayerOpacity })
679
- }, null, 14, da)) : v("", !0),
680
- e.source.value ? (n(), i("path", {
681
- key: 1,
682
- class: z({ "vue-ui-chord-ribbon": !0, "vue-ui-chord-ribbon-animated": a.value.useCssAnimation && !q.value }),
683
- d: ae(e.source, e.target),
684
- fill: y.value.colors[e.source.index],
685
- stroke: a.value.style.chart.ribbons.stroke,
686
- "stroke-width": a.value.style.chart.ribbons.strokeWidth,
687
- "stroke-linecap": "round",
688
- "stroke-linejoin": "round",
689
- style: F({ opacity: De(e) }),
690
- onMouseenter: () => xt({
691
- ...e,
692
- path: ae(e.source, e.target),
693
- color: y.value.colors[e.source.index]
694
- }),
695
- onClick: (l) => te("selectRibbon", {
696
- ...e,
697
- color: y.value.colors[e.source.index]
698
- }),
699
- onMouseleave: o[1] || (o[1] = (l) => m.value = null)
700
- }, null, 46, va)) : v("", !0),
701
- e.source.value && t.$slots.pattern ? (n(), i("path", {
702
- key: 2,
703
- class: z({ "vue-ui-chord-ribbon": !0, "vue-ui-chord-ribbon-animated": a.value.useCssAnimation && !q.value }),
704
- d: ae(e.source, e.target),
705
- fill: `url(#pattern_${S.value}_${e.source.index})`,
706
- stroke: a.value.style.chart.ribbons.stroke,
707
- "stroke-width": a.value.style.chart.ribbons.strokeWidth,
708
- "stroke-linecap": "round",
709
- "stroke-linejoin": "round",
710
- style: F({
711
- opacity: De(e),
712
- pointerEvents: "none"
713
- })
714
- }, null, 14, ha)) : v("", !0)
715
- ], 64))), 128)),
716
- m.value ? (n(), i("path", {
717
- key: 0,
718
- d: m.value.path,
719
- fill: m.value.color,
720
- stroke: a.value.style.chart.ribbons.stroke,
721
- "stroke-width": a.value.style.chart.ribbons.strokeWidth,
722
- "stroke-linecap": "round",
723
- "stroke-linejoin": "round",
724
- class: z({ "vue-ui-chord-ribbon": !0 }),
725
- style: {
726
- pointerEvents: "none"
727
- }
728
- }, null, 8, fa)) : v("", !0),
729
- m.value && t.$slots.pattern ? (n(), i("path", {
730
- key: 1,
731
- d: m.value.path,
732
- fill: `url(#${m.value.source.pattern})`,
733
- stroke: a.value.style.chart.ribbons.stroke,
734
- "stroke-width": a.value.style.chart.ribbons.strokeWidth,
735
- "stroke-linecap": "round",
736
- "stroke-linejoin": "round",
737
- class: z({ "vue-ui-chord-ribbon": !0 }),
738
- style: {
739
- pointerEvents: "none"
740
- }
741
- }, null, 8, ga)) : v("", !0)
742
- ]),
743
- (w.value || m.value || p.value) && a.value.style.chart.ribbons.labels.show ? (n(), i("g", pa, [
744
- (n(!0), i(R, null, W(mt.value, (e) => (n(), i(R, {
745
- key: e.id
746
- }, [
747
- B("line", {
748
- x1: e.midBaseX,
749
- y1: e.midBaseY,
750
- x2: Math.cos(e.theta - Math.PI / 2) * (b.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
751
- y2: Math.sin(e.theta - Math.PI / 2) * (b.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
752
- stroke: a.value.style.chart.backgroundColor,
753
- "stroke-width": a.value.style.chart.ribbons.labels.connector.strokeWidth * 3,
754
- "pointer-events": "none"
755
- }, null, 8, ba),
756
- B("line", {
757
- x1: e.midBaseX,
758
- y1: e.midBaseY,
759
- x2: Math.cos(e.theta - Math.PI / 2) * (b.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
760
- y2: Math.sin(e.theta - Math.PI / 2) * (b.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
761
- stroke: a.value.style.chart.ribbons.labels.connector.stroke,
762
- "stroke-width": a.value.style.chart.ribbons.labels.connector.strokeWidth,
763
- "pointer-events": "none"
764
- }, null, 8, ma),
765
- a.value.style.chart.ribbons.labels.marker.show ? (n(), i("circle", {
766
- key: 0,
767
- cx: Math.cos(e.theta - Math.PI / 2) * (b.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
768
- cy: Math.sin(e.theta - Math.PI / 2) * (b.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
769
- r: a.value.style.chart.ribbons.labels.marker.radius,
770
- stroke: a.value.style.chart.ribbons.labels.marker.stroke,
771
- "stroke-width": a.value.style.chart.ribbons.labels.marker.strokeWidth,
772
- fill: e.groupColor,
773
- "pointer-events": "none"
774
- }, null, 8, ya)) : v("", !0),
775
- B("text", {
776
- transform: `
777
- translate(
778
- ${Math.cos(e.theta - Math.PI / 2) * (b.value.outer + a.value.style.chart.ribbons.labels.offset + 24)},
779
- ${Math.sin(e.theta - Math.PI / 2) * (b.value.outer + a.value.style.chart.ribbons.labels.offset + 24)}
780
- ) rotate(${-x.value})
781
- `,
782
- fill: a.value.style.chart.ribbons.labels.useSerieColor ? e.groupColor : a.value.style.chart.ribbons.labels.color,
783
- "text-anchor": $t(e.theta),
784
- "font-size": a.value.style.chart.ribbons.labels.fontSize,
785
- "font-weight": a.value.style.chart.ribbons.labels.bold ? "bold" : "normal",
786
- dy: ".35em",
787
- "pointer-events": "none"
788
- }, D(Xe(e.value)), 9, ka)
789
- ], 64))), 128))
790
- ])) : v("", !0),
791
- a.value.style.chart.arcs.labels.show ? (n(), i("g", $a, [
792
- a.value.style.chart.arcs.labels.curved ? (n(!0), i(R, { key: 0 }, W(M.value.groups, (e, l) => (n(), i("text", {
793
- key: `curved-label-${l}`,
794
- "font-size": a.value.style.chart.arcs.labels.fontSize,
795
- "font-weight": a.value.style.chart.arcs.labels.bold ? "bold" : "normal",
796
- fill: a.value.style.chart.arcs.labels.adaptColorToBackground ? d(Dt)(y.value.colors[l]) : a.value.style.chart.arcs.labels.color
797
- }, [
798
- B("textPath", {
799
- href: `#labelPath-${l}_${S.value}`,
800
- startOffset: "50%",
801
- "text-anchor": "middle"
802
- }, D(y.value.labels[l]) + D(a.value.style.chart.arcs.labels.showPercentage ? d(ge)({
803
- p: " (",
804
- v: isNaN(e.proportion) ? 0 : e.proportion * 100,
805
- s: "%)",
806
- r: a.value.style.chart.arcs.labels.roundingPercentage
807
- }) : ""), 9, Ca)
808
- ], 8, wa))), 128)) : !w.value && !m.value && !p.value ? (n(!0), i(R, { key: 1 }, W(M.value.groups, (e, l) => (n(), i("text", {
809
- key: `label-${l}`,
810
- transform: `
811
- ${wt((e.startAngle + e.endAngle) / 2)}
812
- rotate(${-x.value})
813
- `,
814
- dy: ".35em",
815
- "text-anchor": kt(e) > Math.PI ? "end" : "start",
816
- "font-size": a.value.style.chart.arcs.labels.fontSize,
817
- "font-weight": a.value.style.chart.arcs.labels.bold ? "bold" : "normal",
818
- fill: a.value.style.chart.arcs.labels.color
819
- }, D(y.value.labels[l]) + D(a.value.style.chart.arcs.labels.showPercentage ? d(ge)({
820
- p: " (",
821
- v: isNaN(e.proportion) ? 0 : e.proportion * 100,
822
- s: "%)",
823
- r: a.value.style.chart.arcs.labels.roundingPercentage
824
- }) : ""), 9, Ma))), 128)) : v("", !0)
825
- ])) : v("", !0)
826
- ], 8, ua),
827
- $(t.$slots, "svg", { svg: { height: 600, width: 600 } }, void 0, !0)
828
- ], 42, oa)) : v("", !0),
829
- t.$slots.watermark ? (n(), i("div", xa, [
830
- $(t.$slots, "watermark", re(ue({ isPrinting: d(Ie) || d(Ae) })), void 0, !0)
831
- ])) : v("", !0),
832
- L.value ? v("", !0) : (n(), G(d(ct), {
833
- key: 6,
834
- config: {
835
- type: "chord",
836
- style: {
837
- backgroundColor: a.value.style.chart.backgroundColor,
838
- chord: {
839
- color: "#CCCCCC"
840
- }
841
- }
842
- }
843
- }, null, 8, ["config"])),
844
- B("div", {
845
- ref_key: "chartLegend",
846
- ref: me
847
- }, [
848
- a.value.style.chart.legend.show ? (n(), G(Zt, {
849
- key: `legend_${Ce.value}`,
850
- legendSet: We.value,
851
- config: At.value,
852
- onClickMarker: o[2] || (o[2] = ({ legend: e }) => Ge(e.id))
853
- }, Je({
854
- item: _(({ legend: e }) => [
855
- B("div", {
856
- style: F({
857
- opacity: p.value ? p.value === e.id ? 1 : 0.3 : 1
858
- }),
859
- onClick: (l) => e.select()
860
- }, D(e.name), 13, Ia)
861
- ]),
862
- _: 2
863
- }, [
864
- t.$slots.pattern ? {
865
- name: "legend-pattern",
866
- fn: _(({ legend: e, index: l }) => [
867
- he(Kt, {
868
- shape: e.shape,
869
- radius: 30,
870
- stroke: "none",
871
- plot: { x: 30, y: 30 },
872
- fill: `url(#pattern_${S.value}_${l})`
873
- }, null, 8, ["shape", "fill"])
874
- ]),
875
- key: "0"
876
- } : void 0
877
- ]), 1032, ["legendSet", "config"])) : v("", !0),
878
- $(t.$slots, "legend", { legend: We.value }, void 0, !0)
879
- ], 512),
880
- t.$slots.source ? (n(), i("div", {
881
- key: 7,
882
- ref_key: "source",
883
- ref: ye,
884
- dir: "auto"
885
- }, [
886
- $(t.$slots, "source", {}, void 0, !0)
887
- ], 512)) : v("", !0),
888
- x.value !== a.value.initialRotation ? (n(), i("div", Aa, [
889
- $(t.$slots, "reset-action", { reset: Ye }, () => [
890
- B("button", {
891
- "data-cy-reset": "",
892
- tabindex: "0",
893
- role: "button",
894
- class: "vue-data-ui-refresh-button",
895
- style: F({
896
- background: a.value.style.chart.backgroundColor
897
- }),
898
- onClick: Ye
899
- }, [
900
- he(d(nt), {
901
- name: "refresh",
902
- stroke: a.value.style.chart.color
903
- }, null, 8, ["stroke"])
904
- ], 4)
905
- ], !0)
906
- ])) : v("", !0),
907
- L.value ? (n(), G(d(st), {
908
- key: 9,
909
- hideDetails: "",
910
- config: {
911
- open: Z.value.showTable,
912
- maxHeight: 1e4,
913
- body: {
914
- backgroundColor: a.value.style.chart.backgroundColor,
915
- color: a.value.style.chart.color
916
- },
917
- head: {
918
- backgroundColor: a.value.style.chart.backgroundColor,
919
- color: a.value.style.chart.color
920
- }
921
- }
922
- }, {
923
- content: _(() => [
924
- (n(), G(d(rt), {
925
- key: `table_${we.value}`,
926
- colNames: ne.value.colNames,
927
- head: ne.value.head,
928
- body: ne.value.body,
929
- config: ne.value.config,
930
- title: `${a.value.style.chart.title.text}${a.value.style.chart.title.subtitle.text ? ` : ${a.value.style.chart.title.subtitle.text}` : ""}`,
931
- onClose: o[3] || (o[3] = (e) => Z.value.showTable = !1)
932
- }, {
933
- th: _(({ th: e }) => [
934
- Ot(D(e.name), 1)
935
- ]),
936
- td: _(({ td: e }) => [
937
- B("div", Pa, D(e.name ? e.name : Xe(e)), 1)
938
- ]),
939
- _: 1
940
- }, 8, ["colNames", "head", "body", "config", "title"]))
941
- ]),
942
- _: 1
943
- }, 8, ["config"])) : v("", !0)
944
- ], 46, aa));
945
- }
946
- }, Da = /* @__PURE__ */ ta(_a, [["__scopeId", "data-v-94fd68af"]]);
947
- export {
948
- Da as default
949
- };