vue-data-ui 3.0.0-next.9 → 3.0.1

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 (144) hide show
  1. package/README.md +32 -30
  2. package/dist/{Arrow-B6OlqyCG.js → Arrow-DQoWnUfD.js} +1 -1
  3. package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-DEw6oieL.js} +4 -4
  4. package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-DEl03NUZ.js} +1 -1
  5. package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-CrivFZqC.js} +2 -2
  6. package/dist/{DataTable--paavNqF.js → DataTable-ClgCsiJA.js} +2 -2
  7. package/dist/{Legend-BZ06qU55.js → Legend-CMvJ6X5j.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-B2Wvbl3p.js} +3 -3
  9. package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CD5VH_Al.js} +3 -3
  10. package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3WRn-G2.js} +32 -32
  11. package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
  12. package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
  13. package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
  14. package/dist/{Shape-Mr1eIp_G.js → Shape-Adi9i_-f.js} +43 -37
  15. package/dist/Slicer-t6e1t2iM.js +602 -0
  16. package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-B8OnBSvk.js} +7 -7
  17. package/dist/{Title-B2dA6-uH.js → Title-xTWR-Vil.js} +1 -1
  18. package/dist/{Tooltip-O_hCvqgF.js → Tooltip-BH3CiANh.js} +23 -19
  19. package/dist/{UserOptions-Bk03FRqW.js → UserOptions-CKKPgDLV.js} +2 -2
  20. package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-C4hj491O.js} +1 -1
  21. package/dist/{img-C_9wps3s.js → img-Vb4QHAHI.js} +1 -1
  22. package/dist/{index-CgShIRes.js → index-Dzc2Gi60.js} +2885 -2010
  23. package/dist/{pdf-CXdbjyRJ.js → pdf-ddpqw-dt.js} +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +753 -65
  26. package/dist/types/vue-data-ui.d.ts +753 -65
  27. package/dist/useAutoSizeLabelsInsideViewbox-CN_Jh8Hr.js +81 -0
  28. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  29. package/dist/useLoading-D7YHNtLX.js +29 -0
  30. package/dist/useNestedProp-CjnS13nF.js +13 -0
  31. package/dist/usePanZoom-BVca3eMk.js +122 -0
  32. package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DBRh8ZvS.js} +2 -2
  33. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  34. package/dist/{useTimeLabels-DG97x2hL.js → useTimeLabels-DkzmKfZn.js} +208 -156
  35. package/dist/{vue-data-ui-DiwfJSwC.js → vue-data-ui-B7ztqj9-.js} +105 -100
  36. package/dist/vue-data-ui.js +26 -25
  37. package/dist/vue-ui-3d-bar-DUmYPtHl.js +1323 -0
  38. package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-CPk8wAuj.js} +3 -3
  39. package/dist/vue-ui-age-pyramid-Bv5HmeXj.js +835 -0
  40. package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-KXWlIhtd.js} +12 -12
  41. package/dist/vue-ui-bullet-B4N4mBk9.js +571 -0
  42. package/dist/vue-ui-candlestick-DENvPnUO.js +1000 -0
  43. package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-vC2bHBaY.js} +29 -29
  44. package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-2nS0StrY.js} +664 -536
  45. package/dist/vue-ui-chord-CyfS6vNM.js +1038 -0
  46. package/dist/vue-ui-circle-pack-C4JR-0fx.js +709 -0
  47. package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-BgeSDtQh.js} +2 -2
  48. package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-9DWUBJ-I.js} +64 -64
  49. package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-BQO7IBFA.js} +2 -2
  50. package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-C-ZJXJ74.js} +431 -422
  51. package/dist/vue-ui-donut-evolution-B870IrQA.js +1076 -0
  52. package/dist/vue-ui-dumbbell-Cfs2Uotx.js +1120 -0
  53. package/dist/vue-ui-flow-DnaUVVAD.js +841 -0
  54. package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-B9s-H5ZG.js} +16 -16
  55. package/dist/vue-ui-galaxy-BoJOczdh.js +680 -0
  56. package/dist/vue-ui-gauge-qjm4BqZR.js +791 -0
  57. package/dist/vue-ui-gizmo-fn7ZaMTI.js +210 -0
  58. package/dist/vue-ui-heatmap-CIBDKhh8.js +1078 -0
  59. package/dist/vue-ui-history-plot-bbNxldYG.js +1074 -0
  60. package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-BX-2jhLx.js} +26 -26
  61. package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-Bn1Bb8-J.js} +2 -2
  62. package/dist/vue-ui-molecule-DQ3qFtBq.js +656 -0
  63. package/dist/vue-ui-mood-radar-Cf-ehIo1.js +785 -0
  64. package/dist/vue-ui-nested-donuts-CWg5BEi-.js +1284 -0
  65. package/dist/vue-ui-onion-sHgQTYfa.js +776 -0
  66. package/dist/vue-ui-parallel-coordinate-plot-Ki3ITp_s.js +916 -0
  67. package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-BIVqW7U7.js} +512 -459
  68. package/dist/vue-ui-quick-chart-C_hvHc1b.js +1762 -0
  69. package/dist/vue-ui-radar-RZUPyPwB.js +796 -0
  70. package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-BI8Vk7dO.js} +2 -2
  71. package/dist/vue-ui-relation-circle-TVMUEtxK.js +598 -0
  72. package/dist/vue-ui-ridgeline-DQeXHQG4.js +1157 -0
  73. package/dist/vue-ui-rings-BH81WmMS.js +728 -0
  74. package/dist/vue-ui-scatter-Cy7Tz_An.js +1178 -0
  75. package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-CF50qQxr.js} +13 -13
  76. package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-CrFXEbJs.js} +46 -46
  77. package/dist/vue-ui-spark-trend-DtHArnot.js +315 -0
  78. package/dist/vue-ui-sparkbar-CIOwFFgA.js +351 -0
  79. package/dist/vue-ui-sparkgauge-E0DdGotz.js +232 -0
  80. package/dist/vue-ui-sparkhistogram-Dm7WoyjY.js +380 -0
  81. package/dist/vue-ui-sparkline-DoW6DDKT.js +513 -0
  82. package/dist/vue-ui-sparkstackbar-BJnPUWY4.js +421 -0
  83. package/dist/vue-ui-stackbar-Du42smPs.js +1371 -0
  84. package/dist/vue-ui-strip-plot-DnenGI-d.js +916 -0
  85. package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BQOQVlHr.js} +17 -17
  86. package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-BzK4_gsP.js} +5 -5
  87. package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-B-IwcT8I.js} +19 -16
  88. package/dist/vue-ui-thermometer-06ao_Pj5.js +541 -0
  89. package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-CxQq4roK.js} +5 -5
  90. package/dist/vue-ui-tiremarks-CuTxkByj.js +406 -0
  91. package/dist/vue-ui-treemap-BgHhRpiV.js +1035 -0
  92. package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-CAcsUUCo.js} +104 -102
  93. package/dist/vue-ui-waffle-Ct3Upw3m.js +910 -0
  94. package/dist/vue-ui-wheel-oz06Kt-p.js +379 -0
  95. package/dist/vue-ui-word-cloud-BRy7fg4S.js +765 -0
  96. package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-CTV-YfFN.js} +364 -327
  97. package/dist/vue-ui-xy-DqCy9dpa.js +3808 -0
  98. package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-BZdhKUIp.js} +265 -264
  99. package/package.json +4 -4
  100. package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
  101. package/dist/Slicer-3t0HimeE.js +0 -577
  102. package/dist/useLoading-Bt5Doa8m.js +0 -28
  103. package/dist/useNestedProp-BC4Ciblw.js +0 -13
  104. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  105. package/dist/vue-ui-3d-bar-BqmzX9u4.js +0 -1227
  106. package/dist/vue-ui-age-pyramid-eRPt0BJb.js +0 -746
  107. package/dist/vue-ui-bullet-BSnF2gql.js +0 -513
  108. package/dist/vue-ui-candlestick-kMbNnoYe.js +0 -873
  109. package/dist/vue-ui-chord-Dxy_bfIE.js +0 -949
  110. package/dist/vue-ui-circle-pack-I_p4FPiW.js +0 -673
  111. package/dist/vue-ui-donut-evolution-DQhZJ4Sa.js +0 -903
  112. package/dist/vue-ui-dumbbell-DdN-7b3g.js +0 -753
  113. package/dist/vue-ui-flow-MvORTthN.js +0 -765
  114. package/dist/vue-ui-galaxy-B0PLMAn8.js +0 -617
  115. package/dist/vue-ui-gauge-C4FTzDFt.js +0 -738
  116. package/dist/vue-ui-gizmo-Dl5FHFb4.js +0 -192
  117. package/dist/vue-ui-heatmap-C3dee43W.js +0 -877
  118. package/dist/vue-ui-history-plot-dqv4u1Oa.js +0 -924
  119. package/dist/vue-ui-molecule-DtRAlfhC.js +0 -597
  120. package/dist/vue-ui-mood-radar-BZj2G0zE.js +0 -670
  121. package/dist/vue-ui-nested-donuts-OqJTwMb2.js +0 -1212
  122. package/dist/vue-ui-onion-DXLokGec.js +0 -701
  123. package/dist/vue-ui-parallel-coordinate-plot-tg7QhtIE.js +0 -807
  124. package/dist/vue-ui-quick-chart-4EODniQ3.js +0 -1612
  125. package/dist/vue-ui-radar-Dt5p5oSy.js +0 -741
  126. package/dist/vue-ui-relation-circle-_SysXj9T.js +0 -542
  127. package/dist/vue-ui-ridgeline-Cs5UihNN.js +0 -969
  128. package/dist/vue-ui-rings-Duay-EmS.js +0 -685
  129. package/dist/vue-ui-scatter-C6oGQcbL.js +0 -1045
  130. package/dist/vue-ui-spark-trend-CEAqGu3d.js +0 -291
  131. package/dist/vue-ui-sparkbar-ByPUDc6x.js +0 -301
  132. package/dist/vue-ui-sparkgauge-C-GKwevJ.js +0 -201
  133. package/dist/vue-ui-sparkhistogram-Dz0DdaVW.js +0 -313
  134. package/dist/vue-ui-sparkline-BULntz_U.js +0 -459
  135. package/dist/vue-ui-sparkstackbar-DXjHOeeU.js +0 -381
  136. package/dist/vue-ui-stackbar-CeP9n7zy.js +0 -1207
  137. package/dist/vue-ui-strip-plot-CaFQkWV8.js +0 -761
  138. package/dist/vue-ui-thermometer-BXf14CYH.js +0 -495
  139. package/dist/vue-ui-tiremarks-D6hJ1cd4.js +0 -358
  140. package/dist/vue-ui-treemap-tBurCrdn.js +0 -965
  141. package/dist/vue-ui-waffle-BNzs_BxY.js +0 -863
  142. package/dist/vue-ui-wheel-tydUATi8.js +0 -352
  143. package/dist/vue-ui-word-cloud-DUUc_tj6.js +0 -659
  144. package/dist/vue-ui-xy--HToGdle.js +0 -2982
@@ -1,1212 +0,0 @@
1
- import { defineAsyncComponent as R, computed as L, ref as h, watch as ot, onMounted as st, nextTick as ut, shallowRef as nt, onBeforeUnmount as Et, createElementBlock as r, openBlock as n, unref as i, normalizeStyle as ne, normalizeClass as D, createBlock as U, createCommentVNode as w, createVNode as rt, createSlots as Rt, withCtx as x, renderSlot as C, normalizeProps as W, guardReactiveProps as q, createElementVNode as y, Fragment as T, renderList as N, toDisplayString as S, withDirectives as it, vShow as dt, createTextVNode as Ut } from "vue";
2
- import { u as Gt, c as Yt, t as Xt, p as Te, a as Wt, G as M, o as qt, e as H, b as Ht, d as Jt, m as Ne, f as O, X as Kt, s as Qt, L as ct, k as Ae, n as J, i as Q, x as vt, q as Zt, r as jt, y as el, v as Oe, T as ht } from "./index-CgShIRes.js";
3
- import { t as tl, u as ll } from "./useResponsive-DfdjqQps.js";
4
- import { u as ft } from "./useNestedProp-BC4Ciblw.js";
5
- import { u as al } from "./usePrinter-rIrqBbbm.js";
6
- import { u as ol } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as sl } from "./useChartAccessibility-9icAAmYg.js";
8
- import ul from "./Title-B2dA6-uH.js";
9
- import nl from "./Legend-BZ06qU55.js";
10
- import rl from "./img-C_9wps3s.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"], yl = ["offset", "stop-opacity"], pl = ["id"], bl = ["id"], gl = ["id"], ml = ["flood-color"], wl = ["id", "d"], $l = ["d", "fill", "stroke", "stroke-width", "filter"], kl = ["d", "fill", "stroke", "stroke-width"], Ll = { key: 1 }, xl = ["d", "fill"], Cl = { key: 2 }, _l = ["font-size", "font-weight", "fill", "dy"], Tl = ["href"], Nl = ["x", "y", "font-size", "font-weight", "fill"], Al = { key: 3 }, Ol = ["filter"], Sl = ["opacity", "text-anchor", "x", "y", "fill", "font-size", "font-weight"], Fl = ["opacity", "text-anchor", "x", "y", "fill", "font-size", "font-weight"], Il = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Vl = ["d", "fill", "onMouseenter", "onClick"], Pl = {
13
- key: 5,
14
- class: "vue-data-ui-watermark"
15
- }, zl = {
16
- key: 0,
17
- class: "vue-ui-nested-donuts-legend-title"
18
- }, Dl = ["onClick"], Ml = ["innerHTML"], Bl = {
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(yt, { expose: pt, emit: bt }) {
36
- const gt = R(() => import("./vue-ui-accordion-hlzscmAS.js")), mt = R(() => import("./DataTable--paavNqF.js")), wt = R(() => import("./PackageVersion-2QvaZf9_.js")), $t = R(() => import("./PenAndPaper-hGgW0EHz.js")), kt = R(() => import("./vue-ui-skeleton-BsBaCvoE.js")), Lt = R(() => import("./Tooltip-O_hCvqgF.js")), xt = R(() => import("./UserOptions-Bk03FRqW.js")), { vue_ui_nested_donuts: Ct } = Gt(), _ = yt, Z = L(() => !!_.dataset && _.dataset.length), p = h(Yt()), re = h(!1), ie = h(""), de = h(null), Se = h(0), V = h(null), Fe = h(null), ce = h(null), Ie = h(null), Ve = h(null), Pe = h(0), ze = h(0), De = h(0), B = h(!0), E = h([]), K = h([]), G = h(!1);
37
- function Me(l) {
38
- G.value = l, Se.value += 1;
39
- }
40
- const e = L({
41
- get: () => Re(),
42
- set: (l) => l
43
- }), { userOptionsVisible: ve, setUserOptionsVisibility: Be, keepUserOptionState: Ee } = ol({ config: e.value }), { svgRef: j } = sl({
44
- config: e.value.style.chart.title
45
- });
46
- function Re() {
47
- const l = ft({
48
- userConfig: _.config,
49
- defaultConfig: Ct
50
- });
51
- return l.theme ? {
52
- ...ft({
53
- userConfig: Wt.vue_ui_nested_donuts[l.theme] || _.config,
54
- defaultConfig: l
55
- }),
56
- customPalette: Xt[l.theme] || Te
57
- } : l;
58
- }
59
- ot(
60
- () => _.config,
61
- (l) => {
62
- e.value = Re(), ve.value = !e.value.userOptions.showOnChartHover, he(), Pe.value += 1, ze.value += 1, De.value += 1, k.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, k.value.showTable = e.value.table.show, k.value.showTooltip = e.value.style.chart.tooltip.show, v.value.width = e.value.style.chart.width, v.value.height = e.value.style.chart.height;
63
- },
64
- { deep: !0 }
65
- );
66
- const Ue = L(() => {
67
- const { top: l, right: s, bottom: o, left: a } = e.value.style.chart.padding;
68
- return {
69
- css: `padding:${l}px ${s}px ${o}px ${a}px`,
70
- top: l,
71
- right: s,
72
- bottom: o,
73
- left: a
74
- };
75
- });
76
- function _t(l, s = 1e3, o = 50) {
77
- return new Promise((a) => {
78
- const t = l.length;
79
- E.value = Array(t).fill(0), K.value = [];
80
- let u = 0;
81
- l.forEach((c, f) => {
82
- setTimeout(() => {
83
- const m = performance.now();
84
- function d(b) {
85
- const A = Math.min((b - m) / s, 1), we = ht(A), $e = c * we;
86
- E.value[f] = $e, E.value = [...E.value];
87
- const se = [];
88
- let ke = 0;
89
- _.dataset.forEach((ue, Le) => {
90
- const zt = Oe(ue.series.reduce(
91
- (Ce, _e) => Ce + Oe(M(_e.values).reduce((Mt, Bt) => Mt + Bt, 0)),
92
- 0
93
- )), Dt = Oe(E.value.slice(ke, ke + ue.series.length).reduce((Ce, _e) => Ce + _e, 0)), xe = zt - Dt;
94
- xe > Number.MIN_VALUE && se.push({
95
- name: "__ghost__",
96
- arcOf: ue.name,
97
- arcOfId: `${p.value}_${Le}`,
98
- id: `ghost_${p.value}_${Le}`,
99
- seriesIndex: -1,
100
- datasetIndex: Le,
101
- color: "transparent",
102
- value: xe,
103
- fullValue: xe,
104
- absoluteValues: [],
105
- ghost: !0
106
- }), ke += ue.series.length;
107
- }), K.value = se, A < 1 ? requestAnimationFrame(d) : (u += 1, u === t && a());
108
- }
109
- requestAnimationFrame(d);
110
- }, f * o);
111
- });
112
- });
113
- }
114
- st(async () => {
115
- if (he(), e.value.startAnimation?.show) {
116
- const s = _.dataset.flatMap((o) => o.series).map(
117
- (o) => M(o.values).reduce((a, t) => a + t, 0)
118
- );
119
- E.value = s.map(() => 0), B.value = !0, K.value = _.dataset.map((o, a) => {
120
- const t = o.series.reduce(
121
- (u, c) => u + M(c.values).reduce((f, m) => f + m, 0),
122
- 0
123
- );
124
- return {
125
- name: "__ghost__",
126
- arcOf: o.name,
127
- arcOfId: `${p.value}_${a}`,
128
- id: `ghost_${p.value}_${a}`,
129
- seriesIndex: -1,
130
- datasetIndex: a,
131
- color: "transparent",
132
- value: t,
133
- fullValue: t,
134
- absoluteValues: [],
135
- ghost: !0
136
- };
137
- }), await ut(), _t(
138
- s,
139
- e.value.startAnimation.durationMs,
140
- e.value.startAnimation.staggerMs
141
- ).then(() => {
142
- B.value = !1, K.value = [];
143
- });
144
- } else
145
- B.value = !1;
146
- });
147
- const P = nt(null), Y = nt(null);
148
- st(() => {
149
- he();
150
- });
151
- function he() {
152
- if (qt(_.dataset) && H({
153
- componentName: "VueUiNestedDonuts",
154
- type: "dataset"
155
- }), e.value.responsive) {
156
- const l = tl(() => {
157
- const { width: s, height: o } = ll({
158
- chart: V.value,
159
- title: e.value.style.chart.title.text ? Fe.value : null,
160
- legend: e.value.style.chart.legend.show ? ce.value : null,
161
- source: Ie.value,
162
- noTitle: Ve.value,
163
- padding: Ue.value
164
- });
165
- requestAnimationFrame(() => {
166
- v.value.width = s, v.value.height = o;
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
- Et(() => {
173
- P.value && (Y.value && P.value.unobserve(Y.value), P.value.disconnect());
174
- });
175
- const { isPrinting: Ge, isImaging: Ye, generatePdf: Xe, generateImage: We } = al({
176
- elementId: `nested_donuts_${p.value}`,
177
- fileName: e.value.style.chart.title.text || "vue-ui-nested-donuts",
178
- options: e.value.userOptions.print
179
- }), Tt = L(() => e.value.userOptions.show && !e.value.style.chart.title.text), Nt = L(() => Ht(e.value.customPalette)), k = 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
- }), v = h({
186
- width: e.value.style.chart.width,
187
- height: e.value.style.chart.height
188
- }), qe = bt;
189
- function At({ datapoint: l, index: s }) {
190
- qe("selectDatapoint", { datapoint: l, index: s });
191
- }
192
- function He({
193
- from: l,
194
- to: s,
195
- duration: o,
196
- onUpdate: a,
197
- onDone: t,
198
- easing: u = ht
199
- }) {
200
- const c = performance.now();
201
- function f(m) {
202
- const d = Math.min((m - c) / o, 1), b = u(d), A = l + (s - l) * b;
203
- a(A, d), d < 1 ? requestAnimationFrame(f) : (a(s, 1), t && t());
204
- }
205
- requestAnimationFrame(f);
206
- }
207
- const $ = h([]), F = L(() => {
208
- _.dataset.forEach((s, o) => {
209
- [null, void 0].includes(s.name) && H({
210
- componentName: "VueUiNestedDonuts",
211
- type: "datasetSerieAttribute",
212
- property: "name",
213
- index: o
214
- }), [null, void 0].includes(s.series) ? H({
215
- componentName: "VueUiNestedDonuts",
216
- type: "datasetSerieAttribute",
217
- property: "series",
218
- index: o
219
- }) : s.series.length === 0 ? H({
220
- componentName: "VueUiNestedDonuts",
221
- type: "datasetAttributeEmpty",
222
- property: `series at index ${o}`
223
- }) : s.series.forEach((a, t) => {
224
- [null, void 0].includes(a.name) && H({
225
- componentName: "VueUiNestedDonuts",
226
- type: "datasetSerieAttribute",
227
- property: "name",
228
- index: t,
229
- key: "serie"
230
- }), [null, void 0].includes(a.values) && H({
231
- componentName: "VueUiNestedDonuts",
232
- type: "datasetSerieAttribute",
233
- property: "values",
234
- index: t,
235
- key: "serie"
236
- });
237
- });
238
- });
239
- let l = 0;
240
- return _.dataset.map((s, o) => ({
241
- ...s,
242
- total: s.series.filter((a) => !$.value.includes(a.id)).map((a) => M(a.values).reduce((t, u) => t + u, 0)).reduce((a, t) => a + t, 0),
243
- datasetIndex: o,
244
- id: `${p.value}_${o}`,
245
- series: s.series.map((a, t) => {
246
- const u = M(a.values).reduce((c, f) => c + f, 0);
247
- return {
248
- name: a.name,
249
- arcOf: s.name,
250
- arcOfId: `${p.value}_${o}`,
251
- id: `${p.value}_${o}_${t}`,
252
- seriesIndex: t,
253
- datasetIndex: o,
254
- color: Jt(a.color) || Nt.value[t] || Te[t % Te.length],
255
- value: B.value ? E.value[l++] ?? 0 : u,
256
- absoluteValues: a.values || []
257
- };
258
- })
259
- }));
260
- }), I = L(() => Math.min(v.value.height, v.value.width) * (e.value.style.chart.layout.donut.strokeWidth / 512)), Je = L(() => [...F.value].map((l, s) => {
261
- const o = l.series.filter((a) => !$.value.includes(a.id)).map((a) => a.value).reduce((a, t) => a + t, 0);
262
- return {
263
- ...l,
264
- total: o,
265
- series: l.series.filter((a) => !$.value.includes(a.id)).map((a) => ({
266
- ...a,
267
- proportion: a.value / o
268
- }))
269
- };
270
- }));
271
- function Ot(l, s, o) {
272
- let a = 0;
273
- for (let t = 0; t < l.length; t += 1)
274
- o.includes(l[t]) && (a += 1);
275
- return a < s;
276
- }
277
- const g = h(Je.value);
278
- ot(
279
- () => Je.value,
280
- (l) => g.value = l
281
- );
282
- function fe(l) {
283
- qe("selectLegend", l);
284
- const s = _.dataset.flatMap(
285
- (d, b) => d.series.map((A, we) => ({
286
- value: M(A.values).reduce(($e, se) => $e + se, 0),
287
- id: `${p.value}_${b}_${we}`,
288
- arcOfId: `${p.value}_${b}`
289
- }))
290
- ).find((d) => d.id === l.id);
291
- if (!s) return;
292
- const o = F.value.flatMap((d) => d.series).find((d) => d.id === l.id)?.value ?? 0, a = g.value.flatMap((d) => d.series).find((d) => d.id === l.id);
293
- let u = a ? a.value : 0;
294
- const c = F.value.find(
295
- (d) => d.id === s.arcOfId
296
- );
297
- if (!c) return;
298
- const f = c.series.map((d) => d.id), m = Ot(
299
- f,
300
- f.length - 1,
301
- $.value
302
- );
303
- $.value.includes(l.id) ? ($.value = $.value.filter((d) => d !== l.id), e.value.serieToggleAnimation.show ? He({
304
- from: u,
305
- to: o,
306
- duration: e.value.serieToggleAnimation.durationMs,
307
- onUpdate: (d) => {
308
- g.value = g.value.map((b) => ({
309
- ...b,
310
- series: b.series.map((A) => A.id === l.id ? { ...A, value: d } : A)
311
- }));
312
- }
313
- }) : g.value = g.value.map((d) => ({
314
- ...d,
315
- series: d.series.map((b) => b.id === l.id ? { ...b, value: o } : b)
316
- }))) : m && (e.value.serieToggleAnimation.show ? He({
317
- from: u,
318
- to: 0,
319
- duration: e.value.serieToggleAnimation.durationMs,
320
- onUpdate: (d) => {
321
- g.value = g.value.map((b) => ({
322
- ...b,
323
- series: b.series.map((A) => A.id === l.id ? { ...A, value: d } : A)
324
- }));
325
- },
326
- onDone: () => {
327
- $.value.push(l.id);
328
- }
329
- }) : (g.value = g.value.map((d) => ({
330
- ...d,
331
- series: d.series.map((b) => b.id === l.id ? { ...b, value: 0 } : b)
332
- })), $.value.push(l.id)));
333
- }
334
- const ee = L(() => I.value / F.value.length * e.value.style.chart.layout.donut.spacingRatio), Ke = L(() => g.value.map((l, s) => I.value - s * I.value / F.value.length)), X = L(() => g.value.map((l, s) => {
335
- const o = Math.abs(l.series.map((m) => m.value).reduce((m, d) => m + d, 0)) > 0, a = I.value - s * I.value / g.value.length, t = B.value ? K.value.find((m) => m.datasetIndex === s) : null, u = [...l.series, ...t ? [t] : []].map((m) => ({
336
- ...m,
337
- value: m.value < 1e-11 ? Number.MIN_VALUE : m.value
338
- })), c = Ne(
339
- { series: [
340
- { name: "_", color: e.value.style.chart.layout.donut.emptyFill, value: 1 }
341
- ] },
342
- v.value.width / 2,
343
- v.value.height / 2,
344
- a,
345
- a,
346
- 1.99999,
347
- 2,
348
- 1,
349
- 360,
350
- 105.25,
351
- ee.value
352
- ), f = `M ${v.value.width / 2},${v.value.height / 2 + a}
353
- a ${a},${a} 0 1,1 0,${-2 * a}
354
- a ${a},${a} 0 1,1 0,${2 * a}`;
355
- return {
356
- ...l,
357
- hasData: o,
358
- radius: a,
359
- skeleton: c,
360
- fullCirclePath: f,
361
- donut: Ne(
362
- { series: u },
363
- v.value.width / 2,
364
- v.value.height / 2,
365
- a,
366
- a,
367
- 1.99999,
368
- 2,
369
- 1,
370
- 360,
371
- 105.25,
372
- ee.value
373
- )
374
- };
375
- })), Qe = L(() => [...F.value].map((l, s) => {
376
- const o = s * I.value / F.value.length;
377
- return {
378
- sizeRatio: o,
379
- donut: Ne(
380
- { series: [{ value: 1 }] },
381
- v.value.width / 2,
382
- v.value.height / 2,
383
- I.value - o,
384
- I.value - o,
385
- 1.99999,
386
- 2,
387
- 1,
388
- 360,
389
- 105.25,
390
- I.value / F.value.length * e.value.style.chart.layout.donut.spacingRatio
391
- )[0]
392
- };
393
- })), Ze = h(null), te = h(null), le = h(null), ye = h(null);
394
- function St({ datapoint: l, _relativeIndex: s, seriesIndex: o }) {
395
- Ze.value = l.arcOfId, te.value = l.id, le.value = o, de.value = l.id, ye.value = {
396
- datapoint: l,
397
- seriesIndex: o,
398
- series: g.value,
399
- config: e.value
400
- };
401
- const a = e.value.style.chart.tooltip.customFormat;
402
- if (vt(a) && el(
403
- () => a({
404
- seriesIndex: o,
405
- datapoint: l,
406
- series: g.value,
407
- config: e.value
408
- })
409
- ))
410
- ie.value = a({
411
- seriesIndex: o,
412
- datapoint: l,
413
- series: g.value,
414
- config: e.value
415
- });
416
- else {
417
- let t = "";
418
- if (e.value.style.chart.tooltip.showAllItemsAtIndex && $.value.length === 0) {
419
- const u = g.value.map((c) => c.series.find((f) => f.seriesIndex === o));
420
- u.forEach((c, f) => {
421
- if (!c) return "";
422
- t += `
423
- <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${f < u.length - 1 ? `border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor}` : ""}">
424
- <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
425
- <svg viewBox="0 0 20 20" height="${e.value.style.chart.tooltip.fontSize}" width="${e.value.style.chart.tooltip.fontSize}">
426
- <circle cx="10" cy="10" r="10" fill="${c.color}"/>
427
- </svg>
428
- <span>
429
- ${c.arcOf ?? ""} - ${c.name}
430
- </span>
431
- </div>
432
- <span>
433
- ${e.value.style.chart.tooltip.showValue ? `<b>${Q(
434
- e.value.style.chart.layout.labels.dataLabels.formatter,
435
- l.value,
436
- O({
437
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
438
- v: l.value,
439
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
440
- r: e.value.style.chart.tooltip.roundingValue
441
- }),
442
- { datapoint: l, seriesIndex: o }
443
- )}
444
- </b>` : ""}
445
- ${e.value.style.chart.tooltip.showPercentage ? `(${O({
446
- v: c.proportion * 100,
447
- s: "%",
448
- r: e.value.style.chart.tooltip.roundingPercentage
449
- })})` : ""}
450
- </span>
451
- </div>
452
- `;
453
- });
454
- } else
455
- 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>${Q(
456
- e.value.style.chart.layout.labels.dataLabels.formatter,
457
- l.value,
458
- O({
459
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
460
- v: l.value,
461
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
462
- r: e.value.style.chart.tooltip.roundingValue
463
- }),
464
- { datapoint: l, seriesIndex: o }
465
- )}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? t += `<span>(${O({
466
- v: l.proportion * 100,
467
- s: "%",
468
- r: e.value.style.chart.tooltip.roundingPercentage
469
- })})</span></div>` : t += `<b>${O({
470
- v: l.proportion * 100,
471
- s: "%",
472
- r: e.value.style.chart.tooltip.roundingPercentage
473
- })}</b></div>`);
474
- ie.value = `<div style="font-size:${e.value.style.chart.tooltip.fontSize}px">${t}</div>`;
475
- }
476
- re.value = !0;
477
- }
478
- function pe(l) {
479
- return l.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
480
- }
481
- function je(l, s) {
482
- if (!e.value.useBlurOnHover)
483
- return "";
484
- if (e.value.style.chart.tooltip.showAllItemsAtIndex && $.value.length === 0)
485
- return [null, void 0].includes(le.value) || le.value === s ? "" : `url(#blur_${p.value})`;
486
- if (!e.value.style.chart.tooltip.showAllItemsAtIndex || $.value.length)
487
- return [null, void 0].includes(te.value) || te.value === l.id ? "" : `url(#blur_${p.value})`;
488
- }
489
- const be = L(() => F.value.map((l, s) => {
490
- const o = l.series.filter(
491
- (t) => !$.value.includes(t.id)
492
- ), a = B.value ? o.map((t) => {
493
- const u = _.dataset[s].series.findIndex(
494
- (c) => c.name === t.name
495
- );
496
- return M(
497
- _.dataset[s].series[u].values
498
- ).reduce((c, f) => c + f, 0);
499
- }).reduce((t, u) => t + u, 0) : o.map((t) => t.value).reduce((t, u) => t + u, 0);
500
- return l.series.map((t, u) => {
501
- const c = M(_.dataset[s].series[u].values).reduce(
502
- (m, d) => m + d,
503
- 0
504
- ), f = B.value ? c : t.value;
505
- return {
506
- name: t.name,
507
- color: t.color,
508
- value: f,
509
- shape: "circle",
510
- arcOf: t.arcOf,
511
- id: t.id,
512
- seriesIndex: u,
513
- datasetIndex: s,
514
- total: a,
515
- opacity: $.value.includes(t.id) ? 0.5 : 1,
516
- segregate: () => fe(t),
517
- isSegregated: $.value.includes(t.id)
518
- };
519
- });
520
- })), Ft = L(() => ({
521
- cy: "nested-donuts-legend",
522
- backgroundColor: e.value.style.chart.legend.backgroundColor,
523
- color: e.value.style.chart.legend.color,
524
- fontSize: e.value.style.chart.legend.fontSize,
525
- paddingBottom: 12,
526
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
527
- })), z = L(() => {
528
- const l = g.value.flatMap((o) => o.series.map((a) => ({
529
- name: `${o.name} - ${a.name}`,
530
- color: a.color,
531
- total: o.total
532
- }))), s = g.value.flatMap((o) => o.series.map((a) => a.value));
533
- return { head: l, body: s };
534
- });
535
- function et(l = null) {
536
- ut(() => {
537
- const s = z.value.head.map((t, u) => [
538
- [t.name],
539
- [z.value.body[u]],
540
- [
541
- isNaN(z.value.body[u] / t.total) ? "-" : z.value.body[u] / t.total * 100
542
- ]
543
- ]), o = [
544
- [e.value.style.chart.title.text],
545
- [e.value.style.chart.title.subtitle.text],
546
- [[""], ["val"], ["%"]]
547
- ].concat(s), a = Zt(o);
548
- l ? l(a) : jt({
549
- csvContent: a,
550
- title: e.value.style.chart.title.text || "vue-ui-nested-donuts"
551
- });
552
- });
553
- }
554
- const ae = L(() => {
555
- const l = [
556
- e.value.table.columnNames.series,
557
- e.value.table.columnNames.value,
558
- e.value.table.columnNames.percentage
559
- ], s = z.value.head.map((t, u) => {
560
- const c = O({
561
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
562
- v: z.value.body[u],
563
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
564
- r: e.value.table.td.roundingValue
565
- });
566
- return [
567
- {
568
- color: t.color,
569
- name: t.name
570
- },
571
- c,
572
- isNaN(z.value.body[u] / t.total) ? "-" : O({
573
- v: z.value.body[u] / t.total * 100,
574
- s: "%",
575
- r: e.value.table.td.roundingPercentage
576
- })
577
- ];
578
- }), o = {
579
- th: {
580
- backgroundColor: e.value.table.th.backgroundColor,
581
- color: e.value.table.th.color,
582
- outline: e.value.table.th.outline
583
- },
584
- td: {
585
- backgroundColor: e.value.table.td.backgroundColor,
586
- color: e.value.table.td.color,
587
- outline: e.value.table.td.outline
588
- },
589
- breakpoint: e.value.table.responsiveBreakpoint
590
- };
591
- return {
592
- colNames: [
593
- e.value.table.columnNames.series,
594
- e.value.table.columnNames.value,
595
- e.value.table.columnNames.percentage
596
- ],
597
- head: l,
598
- body: s,
599
- config: o
600
- };
601
- });
602
- function It() {
603
- return F.value;
604
- }
605
- function tt() {
606
- k.value.showTable = !k.value.showTable;
607
- }
608
- function lt() {
609
- k.value.dataLabels.show = !k.value.dataLabels.show;
610
- }
611
- function at() {
612
- k.value.showTooltip = !k.value.showTooltip;
613
- }
614
- const oe = h(!1);
615
- function ge() {
616
- oe.value = !oe.value;
617
- }
618
- async function Vt({ scale: l = 2 } = {}) {
619
- if (!V.value) return;
620
- const { width: s, height: o } = V.value.getBoundingClientRect(), a = s / o, { imageUri: t, base64: u } = await rl({ domElement: V.value, base64: !0, img: !0, scale: l });
621
- return {
622
- imageUri: t,
623
- base64: u,
624
- title: e.value.style.chart.title.text,
625
- width: s,
626
- height: o,
627
- aspectRatio: a
628
- };
629
- }
630
- const me = h(null);
631
- function Pt() {
632
- if (!me.value) return;
633
- const { x: l, y: s, width: o, height: a } = me.value.getBBox();
634
- j.value && j.value.setAttribute("viewBox", `${l} ${s} ${o + Math.min(0, l)} ${a + Math.min(0, s)}`);
635
- }
636
- return pt({
637
- autoSize: Pt,
638
- getData: It,
639
- getImage: Vt,
640
- generatePdf: Xe,
641
- generateCsv: et,
642
- generateImage: We,
643
- toggleTable: tt,
644
- toggleLabels: lt,
645
- toggleTooltip: at,
646
- toggleAnnotator: ge,
647
- toggleFullscreen: Me
648
- }), (l, s) => (n(), r("div", {
649
- ref_key: "nestedDonutsChart",
650
- ref: V,
651
- class: D(`vue-ui-nested-donuts ${G.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
652
- style: ne(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
653
- id: `nested_donuts_${p.value}`,
654
- onMouseenter: s[3] || (s[3] = () => i(Be)(!0)),
655
- onMouseleave: s[4] || (s[4] = () => i(Be)(!1))
656
- }, [
657
- e.value.userOptions.buttons.annotator ? (n(), U(i($t), {
658
- key: 0,
659
- svgRef: i(j),
660
- backgroundColor: e.value.style.chart.backgroundColor,
661
- color: e.value.style.chart.color,
662
- active: oe.value,
663
- onClose: ge
664
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : w("", !0),
665
- Tt.value ? (n(), r("div", {
666
- key: 1,
667
- ref_key: "noTitle",
668
- ref: Ve,
669
- class: "vue-data-ui-no-title-space",
670
- style: "height:36px; width: 100%;background:transparent"
671
- }, null, 512)) : w("", !0),
672
- e.value.style.chart.title.text ? (n(), r("div", {
673
- key: 2,
674
- ref_key: "chartTitle",
675
- ref: Fe
676
- }, [
677
- (n(), U(ul, {
678
- key: `title_${Pe.value}`,
679
- config: {
680
- title: {
681
- cy: "donut-div-title",
682
- ...e.value.style.chart.title
683
- },
684
- subtitle: {
685
- cy: "donut-div-subtitle",
686
- ...e.value.style.chart.title.subtitle
687
- }
688
- }
689
- }, null, 8, ["config"]))
690
- ], 512)) : w("", !0),
691
- e.value.userOptions.show && Z.value && (i(Ee) || i(ve)) ? (n(), U(i(xt), {
692
- ref: "details",
693
- key: `user_option_${Se.value}`,
694
- backgroundColor: e.value.style.chart.backgroundColor,
695
- color: e.value.style.chart.color,
696
- isPrinting: i(Ge),
697
- isImaging: i(Ye),
698
- uid: p.value,
699
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
700
- hasPdf: e.value.userOptions.buttons.pdf,
701
- hasXls: e.value.userOptions.buttons.csv,
702
- hasImg: e.value.userOptions.buttons.img,
703
- hasTable: e.value.userOptions.buttons.table,
704
- hasLabel: e.value.userOptions.buttons.labels,
705
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
706
- isFullscreen: G.value,
707
- isTooltip: k.value.showTooltip,
708
- titles: { ...e.value.userOptions.buttonTitles },
709
- chartElement: V.value,
710
- position: e.value.userOptions.position,
711
- hasAnnotator: e.value.userOptions.buttons.annotator,
712
- isAnnotation: oe.value,
713
- callbacks: e.value.userOptions.callbacks,
714
- printScale: e.value.userOptions.print.scale,
715
- onToggleFullscreen: Me,
716
- onGeneratePdf: i(Xe),
717
- onGenerateCsv: et,
718
- onGenerateImage: i(We),
719
- onToggleTable: tt,
720
- onToggleLabels: lt,
721
- onToggleTooltip: at,
722
- onToggleAnnotator: ge,
723
- style: ne({
724
- visibility: i(Ee) ? i(ve) ? "visible" : "hidden" : "visible"
725
- })
726
- }, Rt({ _: 2 }, [
727
- l.$slots.menuIcon ? {
728
- name: "menuIcon",
729
- fn: x(({ isOpen: o, color: a }) => [
730
- C(l.$slots, "menuIcon", W(q({ isOpen: o, color: a })), void 0, !0)
731
- ]),
732
- key: "0"
733
- } : void 0,
734
- l.$slots.optionTooltip ? {
735
- name: "optionTooltip",
736
- fn: x(() => [
737
- C(l.$slots, "optionTooltip", {}, void 0, !0)
738
- ]),
739
- key: "1"
740
- } : void 0,
741
- l.$slots.optionPdf ? {
742
- name: "optionPdf",
743
- fn: x(() => [
744
- C(l.$slots, "optionPdf", {}, void 0, !0)
745
- ]),
746
- key: "2"
747
- } : void 0,
748
- l.$slots.optionCsv ? {
749
- name: "optionCsv",
750
- fn: x(() => [
751
- C(l.$slots, "optionCsv", {}, void 0, !0)
752
- ]),
753
- key: "3"
754
- } : void 0,
755
- l.$slots.optionImg ? {
756
- name: "optionImg",
757
- fn: x(() => [
758
- C(l.$slots, "optionImg", {}, void 0, !0)
759
- ]),
760
- key: "4"
761
- } : void 0,
762
- l.$slots.optionTable ? {
763
- name: "optionTable",
764
- fn: x(() => [
765
- C(l.$slots, "optionTable", {}, void 0, !0)
766
- ]),
767
- key: "5"
768
- } : void 0,
769
- l.$slots.optionLabels ? {
770
- name: "optionLabels",
771
- fn: x(() => [
772
- C(l.$slots, "optionLabels", {}, void 0, !0)
773
- ]),
774
- key: "6"
775
- } : void 0,
776
- l.$slots.optionFullscreen ? {
777
- name: "optionFullscreen",
778
- fn: x(({ toggleFullscreen: o, isFullscreen: a }) => [
779
- C(l.$slots, "optionFullscreen", W(q({ toggleFullscreen: o, isFullscreen: a })), void 0, !0)
780
- ]),
781
- key: "7"
782
- } : void 0,
783
- l.$slots.optionAnnotator ? {
784
- name: "optionAnnotator",
785
- fn: x(({ toggleAnnotator: o, isAnnotator: a }) => [
786
- C(l.$slots, "optionAnnotator", W(q({ toggleAnnotator: o, isAnnotator: a })), void 0, !0)
787
- ]),
788
- key: "8"
789
- } : void 0
790
- ]), 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"])) : w("", !0),
791
- Z.value ? (n(), r("svg", {
792
- key: 4,
793
- ref_key: "svgRef",
794
- ref: j,
795
- xmlns: i(Kt),
796
- class: D({
797
- "vue-data-ui-fullscreen--on": G.value,
798
- "vue-data-ui-fulscreen--off": !G.value,
799
- "vue-data-ui-svg": !0
800
- }),
801
- viewBox: `0 0 ${v.value.width <= 0 ? 1e-3 : v.value.width} ${v.value.height < 0 ? 1e-3 : v.value.height}`,
802
- style: ne(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${Ue.value.css}`)
803
- }, [
804
- y("g", {
805
- ref_key: "G",
806
- ref: me,
807
- class: "vue-data-ui-g"
808
- }, [
809
- rt(i(wt)),
810
- l.$slots["chart-background"] ? (n(), r("foreignObject", {
811
- key: 0,
812
- x: 0,
813
- y: 0,
814
- width: v.value.width <= 0 ? 1e-3 : v.value.width,
815
- height: v.value.height < 0 ? 1e-3 : v.value.height,
816
- style: {
817
- pointerEvents: "none"
818
- }
819
- }, [
820
- C(l.$slots, "chart-background", {}, void 0, !0)
821
- ], 8, vl)) : w("", !0),
822
- y("defs", null, [
823
- (n(!0), r(T, null, N(Qe.value, (o, a) => (n(), r("radialGradient", {
824
- id: `radial_${p.value}_${a}`
825
- }, [
826
- s[5] || (s[5] = y("stop", {
827
- offset: "0%",
828
- "stop-color": "#FFFFFF",
829
- "stop-opacity": "0"
830
- }, null, -1)),
831
- y("stop", {
832
- offset: `${(1 - ee.value / Ke.value[a]) * 100}%`,
833
- "stop-color": i(Qt)("#FFFFFF", 0),
834
- "stop-opacity": "0"
835
- }, null, 8, fl),
836
- y("stop", {
837
- offset: `${(1 - ee.value / Ke.value[a] / 2) * 100}%`,
838
- "stop-color": "#FFFFFF",
839
- "stop-opacity": e.value.style.chart.gradientIntensity / 100
840
- }, null, 8, yl),
841
- s[6] || (s[6] = y("stop", {
842
- offset: "100%",
843
- "stop-color": "#FFFFFF",
844
- "stop-opacity": "0"
845
- }, null, -1))
846
- ], 8, hl))), 256))
847
- ]),
848
- y("defs", null, [
849
- y("filter", {
850
- id: `blur_${p.value}`,
851
- x: "-50%",
852
- y: "-50%",
853
- width: "200%",
854
- height: "200%"
855
- }, [
856
- y("feGaussianBlur", {
857
- in: "SourceGraphic",
858
- stdDeviation: 2,
859
- id: `blur_std_${p.value}`
860
- }, null, 8, bl),
861
- s[7] || (s[7] = y("feColorMatrix", {
862
- type: "saturate",
863
- values: "0"
864
- }, null, -1))
865
- ], 8, pl),
866
- y("filter", {
867
- id: `shadow_${p.value}`,
868
- "color-interpolation-filters": "sRGB"
869
- }, [
870
- y("feDropShadow", {
871
- dx: "0",
872
- dy: "0",
873
- stdDeviation: "10",
874
- "flood-opacity": "0.5",
875
- "flood-color": e.value.style.chart.layout.donut.shadowColor
876
- }, null, 8, ml)
877
- ], 8, gl)
878
- ]),
879
- y("defs", null, [
880
- (n(!0), r(T, null, N(X.value, (o, a) => (n(), r("path", {
881
- key: `path-full-${a}`,
882
- id: `path-full-${a}-${p.value}`,
883
- d: o.fullCirclePath,
884
- fill: "none"
885
- }, null, 8, wl))), 128))
886
- ]),
887
- (n(!0), r(T, null, N(X.value, (o, a) => (n(), r("g", null, [
888
- o.hasData ? (n(!0), r(T, { key: 0 }, N(o.donut.filter((t) => !t.ghost), (t, u) => (n(), r("g", null, [
889
- y("path", {
890
- class: "vue-ui-donut-arc-path",
891
- d: t.arcSlice,
892
- fill: t.color,
893
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
894
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
895
- filter: je(t, u)
896
- }, null, 8, $l)
897
- ]))), 256)) : (n(!0), r(T, { key: 1 }, N(o.skeleton, (t, u) => (n(), r("g", null, [
898
- y("path", {
899
- class: "vue-ui-donut-arc-path",
900
- d: t.arcSlice,
901
- fill: t.color,
902
- stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
903
- "stroke-width": e.value.style.chart.layout.donut.borderWidth
904
- }, null, 8, kl)
905
- ]))), 256))
906
- ]))), 256)),
907
- e.value.style.chart.useGradient ? (n(), r("g", Ll, [
908
- (n(!0), r(T, null, N(Qe.value, (o, a) => (n(), r("g", null, [
909
- y("path", {
910
- d: o.donut.arcSlice,
911
- fill: `url(#radial_${p.value}_${a})`,
912
- stroke: "transparent",
913
- "stroke-width": "0"
914
- }, null, 8, xl)
915
- ]))), 256))
916
- ])) : w("", !0),
917
- e.value.style.chart.layout.labels.dataLabels.showDonutName ? (n(), r("g", Cl, [
918
- e.value.style.chart.layout.labels.dataLabels.curvedDonutName ? (n(!0), r(T, { key: 0 }, N(X.value, (o, a) => (n(), r("g", null, [
919
- (n(!0), r(T, null, N(o.donut, (t, u) => (n(), r("g", null, [
920
- u === 0 && v.value.width && v.value.height ? (n(), r("text", {
921
- key: 0,
922
- class: D({ animated: e.value.useCssAnimation }),
923
- "text-anchor": "middle",
924
- "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
925
- "font-weight": e.value.style.chart.layout.labels.dataLabels.boldDonutName ? "bold" : "normal",
926
- fill: e.value.style.chart.layout.labels.dataLabels.color,
927
- dy: e.value.style.chart.layout.labels.dataLabels.donutNameOffsetY
928
- }, [
929
- y("textPath", {
930
- href: `#path-full-${a}-${p.value}`,
931
- startOffset: "50%",
932
- "text-anchor": "middle",
933
- method: "align",
934
- spacing: "auto",
935
- side: "right"
936
- }, S(e.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? i(ct)({
937
- source: o.name,
938
- length: e.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize
939
- }) : o.name), 9, Tl)
940
- ], 10, _l)) : w("", !0)
941
- ]))), 256))
942
- ]))), 256)) : (n(!0), r(T, { key: 1 }, N(X.value, (o, a) => (n(), r("g", null, [
943
- (n(!0), r(T, null, N(o.donut, (t, u) => (n(), r("g", null, [
944
- u === 0 && v.value.width && v.value.height ? (n(), r("text", {
945
- key: 0,
946
- class: D({ animated: e.value.useCssAnimation }),
947
- x: v.value.width / 2,
948
- y: t.startY - e.value.style.chart.layout.labels.dataLabels.fontSize + e.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,
949
- "text-anchor": "middle",
950
- "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
951
- "font-weight": e.value.style.chart.layout.labels.dataLabels.boldDonutName ? "bold" : "normal",
952
- fill: e.value.style.chart.layout.labels.dataLabels.color
953
- }, S(e.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? i(ct)({
954
- source: o.name,
955
- length: e.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize
956
- }) : o.name), 11, Nl)) : w("", !0)
957
- ]))), 256))
958
- ]))), 256))
959
- ])) : w("", !0),
960
- e.value.style.chart.layout.labels.dataLabels.show ? (n(), r("g", Al, [
961
- (n(!0), r(T, null, N(X.value, (o, a) => (n(), r("g", null, [
962
- (n(!0), r(T, null, N(o.donut.filter((t) => !t.ghost), (t, u) => (n(), r("g", {
963
- filter: je(t, u)
964
- }, [
965
- it(y("text", {
966
- class: D({ animated: e.value.useCssAnimation }),
967
- opacity: pe(t) ? 1 : 0,
968
- "text-anchor": i(J)(t, !0).anchor,
969
- x: i(J)(
970
- t,
971
- !1,
972
- e.value.style.chart.layout.labels.dataLabels.offsetX
973
- ).x || 0,
974
- y: i(Ae)(
975
- t,
976
- e.value.style.chart.layout.labels.dataLabels.offsetY,
977
- e.value.style.chart.layout.labels.dataLabels.offsetY
978
- ),
979
- fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
980
- "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
981
- "font-weight": e.value.style.chart.layout.labels.dataLabels.boldPercentage ? "bold" : "normal"
982
- }, S(i(O)({
983
- v: t.proportion * 100,
984
- s: "%",
985
- r: e.value.style.chart.layout.labels.dataLabels.roundingPercentage
986
- })), 11, Sl), [
987
- [
988
- dt,
989
- k.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage
990
- ]
991
- ]),
992
- it(y("text", {
993
- class: D({ animated: e.value.useCssAnimation }),
994
- opacity: pe(t) ? 1 : 0,
995
- "text-anchor": i(J)(t, !0).anchor,
996
- x: i(J)(
997
- t,
998
- !1,
999
- e.value.style.chart.layout.labels.dataLabels.offsetX
1000
- ).x || 0,
1001
- y: i(Ae)(
1002
- t,
1003
- e.value.style.chart.layout.labels.dataLabels.offsetY,
1004
- e.value.style.chart.layout.labels.dataLabels.offsetY
1005
- ) + e.value.style.chart.layout.labels.dataLabels.fontSize,
1006
- fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
1007
- "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
1008
- "font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
1009
- }, " (" + S(i(Q)(
1010
- e.value.style.chart.layout.labels.dataLabels.formatter,
1011
- t.value,
1012
- i(O)({
1013
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
1014
- v: t.value,
1015
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
1016
- r: e.value.style.chart.layout.labels.dataLabels.roundingValue
1017
- }),
1018
- { datapoint: t, seriesIndex: a, datapointIndex: u }
1019
- )) + ") ", 11, Fl), [
1020
- [
1021
- dt,
1022
- k.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue
1023
- ]
1024
- ]),
1025
- pe(t) && k.value.dataLabels.show && !e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue ? (n(), r("text", {
1026
- key: 0,
1027
- class: D({ animated: e.value.useCssAnimation }),
1028
- "text-anchor": i(J)(t, !0).anchor,
1029
- x: i(J)(
1030
- t,
1031
- !1,
1032
- e.value.style.chart.layout.labels.dataLabels.offsetX
1033
- ).x || 0,
1034
- y: i(Ae)(
1035
- t,
1036
- e.value.style.chart.layout.labels.dataLabels.offsetY,
1037
- e.value.style.chart.layout.labels.dataLabels.offsetY
1038
- ),
1039
- fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
1040
- "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
1041
- "font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
1042
- }, S(i(Q)(
1043
- e.value.style.chart.layout.labels.dataLabels.formatter,
1044
- t.value,
1045
- i(O)({
1046
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
1047
- v: t.value,
1048
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
1049
- r: e.value.style.chart.layout.labels.dataLabels.roundingValue
1050
- }),
1051
- { datapoint: t, seriesIndex: a, datapointIndex: u }
1052
- )), 11, Il)) : w("", !0)
1053
- ], 8, Ol))), 256))
1054
- ]))), 256))
1055
- ])) : w("", !0),
1056
- (n(!0), r(T, null, N(X.value, (o, a) => (n(), r("g", null, [
1057
- (n(!0), r(T, null, N(o.donut, (t, u) => (n(), r("g", null, [
1058
- y("path", {
1059
- d: t.arcSlice,
1060
- fill: de.value === t.id ? e.value.style.chart.layout.donut.selectedColor : "transparent",
1061
- onMouseenter: (c) => St({
1062
- datapoint: t,
1063
- seriesIndex: t.seriesIndex
1064
- }),
1065
- onClick: (c) => At({ datapoint: t, index: u }),
1066
- onMouseleave: s[0] || (s[0] = (c) => {
1067
- re.value = !1, Ze.value = null, te.value = null, le.value = null, de.value = null;
1068
- })
1069
- }, null, 40, Vl)
1070
- ]))), 256))
1071
- ]))), 256)),
1072
- C(l.$slots, "svg", { svg: v.value }, void 0, !0)
1073
- ], 512)
1074
- ], 14, cl)) : w("", !0),
1075
- l.$slots.watermark ? (n(), r("div", Pl, [
1076
- C(l.$slots, "watermark", W(q({ isPrinting: i(Ge) || i(Ye) })), void 0, !0)
1077
- ])) : w("", !0),
1078
- Z.value ? w("", !0) : (n(), U(i(kt), {
1079
- key: 6,
1080
- config: {
1081
- type: "donut",
1082
- style: {
1083
- backgroundColor: e.value.style.chart.backgroundColor,
1084
- donut: {
1085
- color: "#CCCCCC"
1086
- }
1087
- }
1088
- }
1089
- }, null, 8, ["config"])),
1090
- rt(i(Lt), {
1091
- show: k.value.showTooltip && re.value,
1092
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1093
- color: e.value.style.chart.tooltip.color,
1094
- borderRadius: e.value.style.chart.tooltip.borderRadius,
1095
- borderColor: e.value.style.chart.tooltip.borderColor,
1096
- borderWidth: e.value.style.chart.tooltip.borderWidth,
1097
- fontSize: e.value.style.chart.tooltip.fontSize,
1098
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1099
- position: e.value.style.chart.tooltip.position,
1100
- offsetY: e.value.style.chart.tooltip.offsetY,
1101
- parent: V.value,
1102
- content: ie.value,
1103
- isFullscreen: G.value,
1104
- isCustom: i(vt)(e.value.style.chart.tooltip.customFormat)
1105
- }, {
1106
- "tooltip-before": x(() => [
1107
- C(l.$slots, "tooltip-before", W(q({ ...ye.value })), void 0, !0)
1108
- ]),
1109
- "tooltip-after": x(() => [
1110
- C(l.$slots, "tooltip-after", W(q({ ...ye.value })), void 0, !0)
1111
- ]),
1112
- _: 3
1113
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
1114
- e.value.style.chart.legend.show ? (n(), r("div", {
1115
- key: 7,
1116
- ref_key: "chartLegend",
1117
- ref: ce,
1118
- class: D({ "vue-ui-nested-donuts-legend": be.value.length > 1 })
1119
- }, [
1120
- (n(!0), r(T, null, N(be.value, (o, a) => (n(), U(nl, {
1121
- key: `legend_${a}_${De.value}`,
1122
- legendSet: o,
1123
- config: Ft.value,
1124
- onClickMarker: s[1] || (s[1] = ({ legend: t }) => fe(t))
1125
- }, {
1126
- legendTitle: x(({ titleSet: t }) => [
1127
- t[0] && t[0].arcOf ? (n(), r("div", zl, S(t[0].arcOf), 1)) : w("", !0)
1128
- ]),
1129
- item: x(({ legend: t, index: u }) => [
1130
- y("div", {
1131
- onClick: (c) => fe(t),
1132
- style: ne(`opacity:${$.value.includes(t.id) ? 0.5 : 1}`)
1133
- }, S(t.name) + S(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + S(e.value.style.chart.legend.showValue ? i(Q)(
1134
- e.value.style.chart.layout.labels.dataLabels.formatter,
1135
- t.value,
1136
- i(O)({
1137
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
1138
- v: t.value,
1139
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
1140
- r: e.value.style.chart.legend.roundingValue
1141
- }),
1142
- { datapoint: t, seriesIndex: u }
1143
- ) : "") + " " + S(e.value.style.chart.legend.showPercentage ? $.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) ? "-" : i(O)({
1144
- v: t.value / t.total * 100,
1145
- s: "%",
1146
- r: e.value.style.chart.legend.roundingPercentage
1147
- })}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, Dl)
1148
- ]),
1149
- _: 2
1150
- }, 1032, ["legendSet", "config"]))), 128))
1151
- ], 2)) : w("", !0),
1152
- e.value.style.chart.legend.show ? w("", !0) : (n(), r("div", {
1153
- key: 8,
1154
- ref_key: "chartLegend",
1155
- ref: ce
1156
- }, [
1157
- C(l.$slots, "legend", { legend: be.value }, void 0, !0)
1158
- ], 512)),
1159
- l.$slots.source ? (n(), r("div", {
1160
- key: 9,
1161
- ref_key: "source",
1162
- ref: Ie,
1163
- dir: "auto"
1164
- }, [
1165
- C(l.$slots, "source", {}, void 0, !0)
1166
- ], 512)) : w("", !0),
1167
- Z.value ? (n(), U(i(gt), {
1168
- key: 10,
1169
- hideDetails: "",
1170
- config: {
1171
- open: k.value.showTable,
1172
- maxHeight: 1e4,
1173
- body: {
1174
- backgroundColor: e.value.style.chart.backgroundColor,
1175
- color: e.value.style.chart.color
1176
- },
1177
- head: {
1178
- backgroundColor: e.value.style.chart.backgroundColor,
1179
- color: e.value.style.chart.color
1180
- }
1181
- }
1182
- }, {
1183
- content: x(() => [
1184
- (n(), U(i(mt), {
1185
- key: `table_${ze.value}`,
1186
- colNames: ae.value.colNames,
1187
- head: ae.value.head,
1188
- body: ae.value.body,
1189
- config: ae.value.config,
1190
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
1191
- onClose: s[2] || (s[2] = (o) => k.value.showTable = !1)
1192
- }, {
1193
- th: x(({ th: o }) => [
1194
- y("div", {
1195
- innerHTML: o,
1196
- style: { display: "flex", "align-items": "center" }
1197
- }, null, 8, Ml)
1198
- ]),
1199
- td: x(({ td: o }) => [
1200
- Ut(S(o.name || o), 1)
1201
- ]),
1202
- _: 1
1203
- }, 8, ["colNames", "head", "body", "config", "title"]))
1204
- ]),
1205
- _: 1
1206
- }, 8, ["config"])) : w("", !0)
1207
- ], 46, dl));
1208
- }
1209
- }, Ql = /* @__PURE__ */ il(Bl, [["__scopeId", "data-v-bb5bf10a"]]);
1210
- export {
1211
- Ql as default
1212
- };