vue-data-ui 3.0.0-next.1 → 3.0.0-next.11

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