vue-data-ui 2.12.6 → 2.12.7-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/dist/{Arrow-Bd9ZVBnX.js → Arrow-CmqjRRUl.js} +1 -1
  2. package/dist/BaseDraggableDialog-BMlyvt7E.js +180 -0
  3. package/dist/{BaseIcon-CNbwMh_-.js → BaseIcon-CZdMutjs.js} +1 -1
  4. package/dist/{ColorPicker-B_FoQwtO.js → ColorPicker-DvVKgyAl.js} +23 -24
  5. package/dist/{DataTable-Rajdtaf6.js → DataTable-Cv9CIz-a.js} +11 -11
  6. package/dist/{Legend-BxtDQCIv.js → Legend-DFunFf8i.js} +8 -8
  7. package/dist/NonSvgPenAndPaper-pVuHj6_A.js +467 -0
  8. package/dist/PackageVersion-CLY-udAA.js +10 -0
  9. package/dist/{PenAndPaper-BkP3J-Ft.js → PenAndPaper-B9na2mbr.js} +8 -10
  10. package/dist/RecursiveCircles-Dn3TGoL6.js +96 -0
  11. package/dist/RecursiveLabels-NTMB9w5C.js +49 -0
  12. package/dist/RecursiveLinks-ld_gDZH4.js +64 -0
  13. package/dist/{Shape-C69a0f29.js → Shape-D3w9qas1.js} +2 -2
  14. package/dist/{Slicer-7qFdY-bT.js → Slicer-ncY8krrM.js} +2 -2
  15. package/dist/SparkTooltip-CwThutH2.js +68 -0
  16. package/dist/{Title-CzaCeCOm.js → Title-B5qqUI3M.js} +2 -2
  17. package/dist/Tooltip-C9rxJ-Ru.js +149 -0
  18. package/dist/{usePrinter-C5bLp34h.js → UserOptions-Ddy6CuLC.js} +172 -231
  19. package/dist/{dom-to-png-Bm0D0yPL.js → dom-to-png-DDlooC9r.js} +1 -1
  20. package/dist/{img-BN9AzqUr.js → img-m9g7lR5d.js} +1 -1
  21. package/dist/{index-BFzQMJda.js → index-BiHmNd1-.js} +21 -21
  22. package/dist/{pdf-uTbs813M.js → pdf-BqM953uL.js} +1 -1
  23. package/dist/style.css +1 -1
  24. package/dist/useChartAccessibility-9icAAmYg.js +12 -0
  25. package/dist/useMouse-AicQS8Vf.js +13 -0
  26. package/dist/{useNestedProp-v7KPpwuP.js → useNestedProp-tRqS0ZAM.js} +1 -1
  27. package/dist/{usePanZoom-CUkkqW81.js → usePanZoom-BQMvRXEQ.js} +16 -17
  28. package/dist/usePrinter-CRCbl1WG.js +53 -0
  29. package/dist/vClickOutside-C6WiFswA.js +13 -0
  30. package/dist/{vue-data-ui-D1k8FeRp.js → vue-data-ui-D9uTDt73.js} +63 -63
  31. package/dist/vue-data-ui.js +19 -19
  32. package/dist/{vue-ui-3d-bar-DoklA4DT.js → vue-ui-3d-bar-rtuSc8FS.js} +397 -402
  33. package/dist/{vue-ui-accordion-BUz4JIIX.js → vue-ui-accordion-CmCs2yR2.js} +3 -3
  34. package/dist/{vue-ui-age-pyramid-4kyBq-Dy.js → vue-ui-age-pyramid-BrzMSiyu.js} +215 -218
  35. package/dist/{vue-ui-annotator-Bq1ZeFfb.js → vue-ui-annotator-CYxmTpf6.js} +2 -2
  36. package/dist/{vue-ui-bullet-DU10avvA.js → vue-ui-bullet-D25qNQfb.js} +137 -140
  37. package/dist/{vue-ui-candlestick-BI1t3flz.js → vue-ui-candlestick-BuerNa-r.js} +265 -271
  38. package/dist/{vue-ui-carousel-table-VowLf_oc.js → vue-ui-carousel-table-aN0HLsOO.js} +137 -137
  39. package/dist/{vue-ui-chestnut-BHjV3d94.js → vue-ui-chestnut-oUj2ocsZ.js} +397 -400
  40. package/dist/{vue-ui-chord-CPr7r-2_.js → vue-ui-chord-C4evlXYB.js} +356 -365
  41. package/dist/vue-ui-circle-pack-CWrNiKTY.js +656 -0
  42. package/dist/{vue-ui-cursor-C9teAbVI.js → vue-ui-cursor-DgpSttlt.js} +2 -2
  43. package/dist/{vue-ui-dashboard-CwDYB8tP.js → vue-ui-dashboard-BN2ha1Eh.js} +62 -62
  44. package/dist/{vue-ui-digits-CHmkL0hn.js → vue-ui-digits-BhjAxXgm.js} +2 -2
  45. package/dist/vue-ui-donut-D3_z61HI.js +1291 -0
  46. package/dist/vue-ui-donut-evolution-oKtmZPx4.js +864 -0
  47. package/dist/{vue-ui-dumbbell-DTKLLd1N.js → vue-ui-dumbbell-C8Lokx-F.js} +265 -270
  48. package/dist/{vue-ui-flow-BLBhsU2n.js → vue-ui-flow-BVRkH0PS.js} +291 -300
  49. package/dist/{vue-ui-funnel-CIrWdeBk.js → vue-ui-funnel-DFxcmAB5.js} +216 -219
  50. package/dist/{vue-ui-galaxy-ByhKyIV4.js → vue-ui-galaxy-CGE0hlBC.js} +227 -235
  51. package/dist/{vue-ui-gauge-BbfBMpng.js → vue-ui-gauge-B48eMvOR.js} +240 -243
  52. package/dist/{vue-ui-gizmo-BM-_QfHM.js → vue-ui-gizmo-zTKNpjvv.js} +57 -58
  53. package/dist/{vue-ui-heatmap-BA4z4hsw.js → vue-ui-heatmap-UNfTt8SM.js} +239 -242
  54. package/dist/{vue-ui-history-plot-8vM_IUy8.js → vue-ui-history-plot-CbCWmvtg.js} +257 -262
  55. package/dist/{vue-ui-kpi-D57QLK6A.js → vue-ui-kpi-Drf_lrlh.js} +29 -30
  56. package/dist/{vue-ui-mini-loader-CR4c-xJQ.js → vue-ui-mini-loader-DU3G6BVs.js} +2 -2
  57. package/dist/vue-ui-molecule-B5MOXYEA.js +580 -0
  58. package/dist/{vue-ui-mood-radar-Brc9cxoD.js → vue-ui-mood-radar-CC_CVLvn.js} +180 -186
  59. package/dist/{vue-ui-nested-donuts-W3Z5F--L.js → vue-ui-nested-donuts-D_H962kk.js} +366 -374
  60. package/dist/{vue-ui-onion-BNBlGNlF.js → vue-ui-onion-P8k6T724.js} +252 -258
  61. package/dist/{vue-ui-parallel-coordinate-plot-B5G3jyvg.js → vue-ui-parallel-coordinate-plot-B5Los0vX.js} +296 -303
  62. package/dist/{vue-ui-quadrant-CUy9mVIA.js → vue-ui-quadrant-B3wzCTxK.js} +402 -409
  63. package/dist/{vue-ui-quick-chart-D4_8mRXU.js → vue-ui-quick-chart-oucj6hXk.js} +611 -616
  64. package/dist/{vue-ui-radar-BUk56jGL.js → vue-ui-radar-Cjqlyu6d.js} +270 -277
  65. package/dist/{vue-ui-rating-B9TQl5KP.js → vue-ui-rating-gryk_h_6.js} +2 -2
  66. package/dist/vue-ui-relation-circle-ielvWC-1.js +525 -0
  67. package/dist/{vue-ui-ridgeline-Cl06bGom.js → vue-ui-ridgeline-Dydqo68b.js} +321 -326
  68. package/dist/{vue-ui-rings-B6bpFlFp.js → vue-ui-rings-BRBXektJ.js} +262 -269
  69. package/dist/{vue-ui-scatter--WUuVw5G.js → vue-ui-scatter-Df-BM7Ts.js} +372 -379
  70. package/dist/{vue-ui-skeleton-B_YI7Yuc.js → vue-ui-skeleton-CbYQYRvD.js} +19 -19
  71. package/dist/{vue-ui-smiley-Bbam2fDz.js → vue-ui-smiley-BfHaQMaW.js} +2 -2
  72. package/dist/{vue-ui-spark-trend-DavXuwGt.js → vue-ui-spark-trend-z3fUChs_.js} +114 -117
  73. package/dist/{vue-ui-sparkbar-9N1FU9-J.js → vue-ui-sparkbar-ChtFIugH.js} +104 -106
  74. package/dist/{vue-ui-sparkgauge-_9ntq4EK.js → vue-ui-sparkgauge-DtpODCww.js} +72 -74
  75. package/dist/{vue-ui-sparkhistogram-BEzOV4HV.js → vue-ui-sparkhistogram-C3XnYiXI.js} +83 -86
  76. package/dist/vue-ui-sparkline-CoL8jiX8.js +459 -0
  77. package/dist/{vue-ui-sparkstackbar-BSWcs3v0.js → vue-ui-sparkstackbar-CYk3mZJH.js} +102 -105
  78. package/dist/{vue-ui-stackbar-gG5BLlAr.js → vue-ui-stackbar-D9LGbuG5.js} +433 -437
  79. package/dist/{vue-ui-strip-plot-BJouRmxh.js → vue-ui-strip-plot-C5r1Ee2R.js} +245 -252
  80. package/dist/{vue-ui-table-D9Ry8s4N.js → vue-ui-table-DBaT_TfA.js} +3 -3
  81. package/dist/{vue-ui-table-heatmap-Bizzpi31.js → vue-ui-table-heatmap-CYW4YfKN.js} +93 -94
  82. package/dist/{vue-ui-table-sparkline-Dg54Ovs2.js → vue-ui-table-sparkline-Di0MYR4p.js} +212 -212
  83. package/dist/{vue-ui-thermometer-6MSdF_Gm.js → vue-ui-thermometer-BF1btHY2.js} +154 -157
  84. package/dist/{vue-ui-timer-ByaKokk8.js → vue-ui-timer-D9FfRWN5.js} +180 -181
  85. package/dist/vue-ui-tiremarks-CQ0lk8fJ.js +341 -0
  86. package/dist/vue-ui-treemap-1Lx7YRtc.js +947 -0
  87. package/dist/{vue-ui-vertical-bar-CE4oBwBv.js → vue-ui-vertical-bar-DdVVQ1ED.js} +397 -403
  88. package/dist/{vue-ui-waffle-DNEEnY_G.js → vue-ui-waffle-BhnuPiRD.js} +317 -324
  89. package/dist/vue-ui-wheel-BIjJ0fg8.js +335 -0
  90. package/dist/vue-ui-word-cloud-3-r8HwO_.js +642 -0
  91. package/dist/{vue-ui-world-Brhq17TE.js → vue-ui-world-CPIGEswq.js} +430 -442
  92. package/dist/{vue-ui-xy-K2G7QQxG.js → vue-ui-xy-9e_epIN4.js} +845 -846
  93. package/dist/vue-ui-xy-canvas-DcGgQ7s4.js +1206 -0
  94. package/package.json +6 -6
  95. package/dist/BaseDraggableDialog-Bzwlfmy1.js +0 -186
  96. package/dist/PackageVersion-BjrblLPQ.js +0 -10
  97. package/dist/Tooltip-CWmRmhJr.js +0 -158
  98. package/dist/useChartAccessibility-BWojgys7.js +0 -13
  99. package/dist/vue-ui-circle-pack-D_jYpsuD.js +0 -659
  100. package/dist/vue-ui-donut-WRUDvvZa.js +0 -1292
  101. package/dist/vue-ui-donut-evolution-BQxV5D_L.js +0 -871
  102. package/dist/vue-ui-molecule-Bq69N7rC.js +0 -782
  103. package/dist/vue-ui-relation-circle-T6aTibIU.js +0 -528
  104. package/dist/vue-ui-sparkline-D__GCUAz.js +0 -519
  105. package/dist/vue-ui-tiremarks-Z8pjUT1g.js +0 -344
  106. package/dist/vue-ui-treemap-pRJ3be5l.js +0 -956
  107. package/dist/vue-ui-wheel-DWPYZxdT.js +0 -338
  108. package/dist/vue-ui-word-cloud-DAR7R8F8.js +0 -648
  109. package/dist/vue-ui-xy-canvas-ml44sPHS.js +0 -1673
@@ -1,1292 +0,0 @@
1
- import { useSlots as _t, computed as g, ref as d, onMounted as Qe, onBeforeUnmount as $t, watch as Ze, createElementBlock as n, openBlock as s, unref as r, normalizeStyle as w, normalizeClass as be, createBlock as q, createCommentVNode as i, renderSlot as p, createElementVNode as f, createVNode as we, createSlots as et, withCtx as C, normalizeProps as ee, guardReactiveProps as te, Fragment as m, renderList as L, mergeProps as tt, toDisplayString as P, createTextVNode as lt, nextTick as xt } from "vue";
2
- import { u as Ct, o as Tt, e as at, g as Pt, c as At, b as Ft, d as ot, p as J, m as St, _ as Lt, f as N, X as zt, s as ue, w as Ot, j as Mt, M as z, i as D, k as ne, n as k, t as Nt, a as Yt, q as Xt, r as It, x as Dt, S as st } from "./index-BFzQMJda.js";
3
- import { t as Vt, u as Bt } from "./useResponsive-JZ9xq-JV.js";
4
- import { _ as Gt } from "./Title-CzaCeCOm.js";
5
- import { u as Wt, U as Rt } from "./usePrinter-C5bLp34h.js";
6
- import { D as Ut } from "./DataTable-Rajdtaf6.js";
7
- import { _ as jt } from "./Tooltip-CWmRmhJr.js";
8
- import { L as Et } from "./Legend-BxtDQCIv.js";
9
- import Ht from "./vue-ui-skeleton-B_YI7Yuc.js";
10
- import qt from "./vue-ui-accordion-BUz4JIIX.js";
11
- import { u as ut } from "./useNestedProp-v7KPpwuP.js";
12
- import { _ as Jt } from "./PackageVersion-BjrblLPQ.js";
13
- import { _ as Kt } from "./PenAndPaper-BkP3J-Ft.js";
14
- import { u as Qt } from "./useUserOptionState-BIvW1Kz7.js";
15
- import { _ as Zt } from "./Shape-C69a0f29.js";
16
- import { u as el } from "./useChartAccessibility-BWojgys7.js";
17
- import { _ as tl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
- const ll = ["id"], al = ["xmlns", "viewBox"], ol = ["width", "height"], sl = { key: 1 }, ul = ["id"], nl = ["stop-color"], rl = ["offset", "stop-color"], il = ["offset", "stop-color"], vl = ["stop-color"], cl = { key: 2 }, dl = ["id", "cx", "cy"], hl = ["stop-color", "stop-opacity"], yl = ["stop-color"], fl = ["id"], gl = ["id"], pl = ["id"], ml = ["flood-color"], bl = ["id"], wl = ["flood-color"], kl = ["d", "stroke", "filter"], _l = ["d", "stroke", "filter"], $l = ["cx", "cy", "r", "fill", "filter"], xl = { key: 6 }, Cl = ["stroke", "d"], Tl = { key: 0 }, Pl = ["d", "fill", "stroke", "stroke-width", "filter"], Al = ["d", "fill", "stroke", "stroke-width", "filter"], Fl = { key: 0 }, Sl = ["stroke", "d"], Ll = { key: 0 }, zl = ["d", "stroke", "stroke-width", "filter"], Ol = { key: 1 }, Ml = ["d", "fill", "stroke", "stroke-width", "filter"], Nl = ["d", "fill", "stroke", "stroke-width", "filter"], Yl = { key: 1 }, Xl = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Il = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Dl = ["cx", "cy", "r", "stroke"], Vl = ["cx", "cy", "r", "fill"], Bl = { key: 0 }, Gl = ["d", "fill", "onMouseenter", "onClick"], Wl = { key: 1 }, Rl = ["cx", "cy", "r", "fill"], Ul = ["x", "y", "fill", "font-size"], jl = ["x", "y", "fill", "font-size"], El = ["x", "y", "fill", "font-size"], Hl = ["x", "y", "fill", "font-size"], ql = ["filter"], Jl = { key: 0 }, Kl = ["x", "y"], Ql = { key: 1 }, Zl = ["cx", "cy", "fill", "stroke", "filter", "onClick"], ea = ["cx", "cy", "fill", "stroke", "filter", "onClick"], ta = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], la = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], aa = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], oa = ["text-anchor", "x", "y", "fill", "font-size", "onClick"], sa = { key: 2 }, ua = ["x", "y", "width"], na = ["x", "y", "width"], ra = {
19
- key: 5,
20
- class: "vue-data-ui-watermark"
21
- }, ia = ["onClick"], va = {
22
- key: 0,
23
- style: { "font-variant-numeric": "tabular-nums" }
24
- }, ca = { key: 1 }, da = ["innerHTML"], ha = {
25
- __name: "vue-ui-donut",
26
- props: {
27
- config: {
28
- type: Object,
29
- default() {
30
- return {};
31
- }
32
- },
33
- dataset: {
34
- type: Array,
35
- default() {
36
- return [];
37
- }
38
- }
39
- },
40
- emits: ["selectLegend", "selectDatapoint"],
41
- setup(ke, { expose: nt, emit: rt }) {
42
- const { vue_ui_donut: it } = Ct(), vt = _t(), O = ke, le = g({
43
- get() {
44
- return !!O.dataset && O.dataset.length;
45
- },
46
- set(l) {
47
- return l;
48
- }
49
- }), ae = d(null), _e = d(null), $e = d(null), re = d(null), xe = d(null), Ce = d(null), Te = d(0), Pe = d(0), Ae = d(0);
50
- Qe(() => {
51
- Fe();
52
- }), $t(() => {
53
- re.value && re.value.disconnect();
54
- });
55
- function Fe() {
56
- if (Tt(O.dataset) ? at({
57
- componentName: "VueUiDonut",
58
- type: "dataset"
59
- }) : O.dataset.forEach((l, o) => {
60
- Pt({
61
- datasetObject: l,
62
- requiredAttributes: ["name", "values"]
63
- }).forEach((t) => {
64
- le.value = !1, at({
65
- componentName: "VueUiDonut",
66
- type: "datasetSerieAttribute",
67
- property: t,
68
- index: o
69
- });
70
- });
71
- }), e.value.responsive) {
72
- const l = Vt(() => {
73
- const { width: o, height: t } = Bt({
74
- chart: ae.value,
75
- title: e.value.style.chart.title.text ? _e.value : null,
76
- legend: e.value.style.chart.legend.show ? $e.value : null,
77
- source: xe.value,
78
- noTitle: Ce.value,
79
- padding: Me.value
80
- });
81
- requestAnimationFrame(() => {
82
- u.value.width = o, u.value.height = t;
83
- });
84
- });
85
- re.value = new ResizeObserver(l), re.value.observe(ae.value.parentNode);
86
- }
87
- }
88
- const y = d(At()), ct = d(null), ie = d(!1), he = d(""), A = d(null), Se = d(0);
89
- function Le() {
90
- const l = ut({
91
- userConfig: O.config,
92
- defaultConfig: it
93
- });
94
- return l.theme ? {
95
- ...ut({
96
- userConfig: Yt.vue_ui_donut[l.theme] || O.config,
97
- defaultConfig: l
98
- }),
99
- customPalette: Nt[l.theme] || J
100
- } : l;
101
- }
102
- const e = g({
103
- get: () => Le(),
104
- set: (l) => l
105
- }), T = d(!0), B = d([]);
106
- function dt(l, o = 1e3, t = 50) {
107
- return new Promise((a) => {
108
- const v = l.length;
109
- B.value = Array(v).fill(0);
110
- let b = 0;
111
- l.forEach((_, x) => {
112
- setTimeout(() => {
113
- const W = performance.now();
114
- function I(se) {
115
- const de = Math.min((se - W) / o, 1), kt = st(de);
116
- B.value[x] = _ * kt, B.value = [...B.value], de < 1 ? requestAnimationFrame(I) : (B.value[x] = _, B.value = [...B.value], b += 1, b === v && a());
117
- }
118
- requestAnimationFrame(I);
119
- }, x * t);
120
- });
121
- });
122
- }
123
- Qe(async () => {
124
- const l = O.dataset.map((o) => o.values.reduce((t, a) => t + a, 0));
125
- e.value.startAnimation.show && await dt(
126
- l,
127
- e.value.startAnimation.durationMs,
128
- e.value.startAnimation.staggerMs
129
- ), T.value = !1;
130
- });
131
- const { userOptionsVisible: ye, setUserOptionsVisibility: ze, keepUserOptionState: Oe } = Qt({ config: e.value }), { svgRef: fe } = el({ config: e.value.style.chart.title });
132
- Ze(() => O.config, (l) => {
133
- e.value = Le(), ye.value = !e.value.userOptions.showOnChartHover, Fe(), Te.value += 1, Pe.value += 1, Ae.value += 1, h.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, h.value.showTable = e.value.table.show, h.value.showTooltip = e.value.style.chart.tooltip.show;
134
- }, { deep: !0 });
135
- const Me = g(() => {
136
- const { top: l, right: o, bottom: t, left: a } = e.value.style.chart.padding;
137
- return {
138
- css: `padding:${l}px ${o}px ${t}px ${a}px`,
139
- top: l,
140
- right: o,
141
- bottom: t,
142
- left: a
143
- };
144
- }), { isPrinting: Ne, isImaging: Ye, generatePdf: Xe, generateImage: Ie } = Wt({
145
- elementId: `donut__${y.value}`,
146
- fileName: e.value.style.chart.title.text || "vue-ui-donut",
147
- options: e.value.userOptions.print
148
- }), ht = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), De = g(() => Ft(e.value.customPalette)), h = d({
149
- dataLabels: {
150
- show: e.value.style.chart.layout.labels.dataLabels.show
151
- },
152
- showTable: e.value.table.show,
153
- showTooltip: e.value.style.chart.tooltip.show
154
- }), u = d({
155
- height: 360,
156
- width: 512
157
- }), K = g(() => {
158
- const l = e.value.style.chart.layout.donut.strokeWidth / 512, o = Math.min(u.value.width, u.value.height) * l, t = o > $.value ? $.value : o;
159
- return Math.max(t, 3);
160
- }), Ve = rt, G = g(() => O.dataset.map((l, o) => ({
161
- name: l.name,
162
- color: ot(l.color) || De.value[o] || J[o] || J[o % J.length],
163
- value: l.values.reduce((t, a) => t + a, 0),
164
- absoluteValues: l.values,
165
- comment: l.comment || "",
166
- patternIndex: o,
167
- seriesIndex: o,
168
- ghost: !1,
169
- pattern: `pattern_${y.value}_${o}`
170
- }))), M = d(G.value);
171
- Ze(() => G.value, (l) => M.value = l);
172
- function yt() {
173
- return G.value.map((l) => ({
174
- name: l.name,
175
- color: l.color,
176
- value: l.value
177
- }));
178
- }
179
- const V = d([]), E = d(!1);
180
- function Be({ from: l, to: o, duration: t, onUpdate: a, onDone: v, easing: b = st }) {
181
- const _ = performance.now();
182
- function x(W) {
183
- const I = Math.min((W - _) / t, 1), se = b(I), de = l + (o - l) * se;
184
- a(de, I), I < 1 ? requestAnimationFrame(x) : (a(o, 1), v && v());
185
- }
186
- requestAnimationFrame(x);
187
- }
188
- function Ge(l) {
189
- const o = G.value.find((v, b) => b === l);
190
- let a = M.value.find((v, b) => b === l).value;
191
- if (V.value.includes(l)) {
192
- let b = function() {
193
- M.value = M.value.map(
194
- (x, W) => l === W ? { ...x, value: v } : x
195
- );
196
- }, _ = function() {
197
- E.value = !0, Be({
198
- from: a,
199
- to: v,
200
- duration: e.value.serieToggleAnimation.durationMs,
201
- onUpdate: (x, W) => {
202
- M.value = M.value.map(
203
- (I, se) => l === se ? { ...I, value: x } : I
204
- );
205
- },
206
- onDone: () => {
207
- b(), E.value = !1;
208
- }
209
- });
210
- };
211
- V.value = V.value.filter((x) => x !== l);
212
- const v = o.value;
213
- e.value.serieToggleAnimation.show && e.value.type === "classic" ? _() : b();
214
- } else if (V.value.length < G.value.length - 1) {
215
- let v = function() {
216
- V.value.push(l), M.value = M.value.map(
217
- (_, x) => l === x ? { ..._, value: 0 } : _
218
- );
219
- }, b = function() {
220
- E.value = !0, Be({
221
- from: a,
222
- to: 0,
223
- duration: e.value.serieToggleAnimation.durationMs,
224
- onUpdate: (_, x) => {
225
- M.value = M.value.map(
226
- (W, I) => l === I ? { ...W, value: _ } : W
227
- );
228
- },
229
- onDone: () => {
230
- v(), E.value = !1;
231
- }
232
- });
233
- };
234
- e.value.serieToggleAnimation.show && e.value.type === "classic" ? b() : v();
235
- }
236
- Ve("selectLegend", R.value.map((v) => ({
237
- name: v.name,
238
- color: v.color,
239
- value: v.value
240
- })));
241
- }
242
- const ft = g(() => O.dataset.reduce((l, o) => l + o.values.reduce((t, a) => t + a, 0), 0)), R = g(() => {
243
- if (T.value) {
244
- const l = B.value.map((t, a) => ({
245
- ...G.value[a],
246
- value: t,
247
- color: G.value[a].color,
248
- ghost: !1
249
- })), o = ft.value - B.value.reduce((t, a) => t + a, 0);
250
- return o > 0 && l.push({
251
- name: "__ghost__",
252
- value: o,
253
- color: "transparent",
254
- ghost: !0
255
- }), l;
256
- } else
257
- return M.value.forEach((l, o) => {
258
- if ([null, void 0].includes(l.values))
259
- return {
260
- ...l,
261
- values: []
262
- };
263
- }), M.value.map((l, o) => ({
264
- ...l,
265
- seriesIndex: o
266
- })).filter((l, o) => !V.value.includes(o));
267
- }), We = g(() => O.dataset.map((l, o) => ({
268
- name: l.name,
269
- color: ot(l.color) || De.value[o] || J[o] || J[o % J.length],
270
- value: (l.values || []).reduce((t, a) => t + a, 0),
271
- shape: "circle",
272
- patternIndex: o
273
- })).map((l, o) => ({
274
- ...l,
275
- proportion: l.value / O.dataset.map((t) => (t.values || []).reduce((a, v) => a + v, 0)).reduce((t, a) => t + a, 0),
276
- opacity: V.value.includes(o) ? 0.5 : 1,
277
- segregate: () => !E.value && Ge(o),
278
- isSegregated: V.value.includes(o)
279
- }))), gt = g(() => ({
280
- cy: "donut-div-legend",
281
- backgroundColor: e.value.style.chart.legend.backgroundColor,
282
- color: e.value.style.chart.legend.color,
283
- fontSize: e.value.style.chart.legend.fontSize,
284
- paddingBottom: 12,
285
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
286
- })), $ = g(() => {
287
- const l = Math.min(u.value.width / 3, u.value.height / 3);
288
- return l < 55 ? 55 : l;
289
- }), F = g(() => St({ series: R.value }, u.value.width / 2, u.value.height / 2, $.value, $.value, 1.99999, 2, 1, 360, 105.25, K.value)), Y = g(() => F.value.filter((l) => !l.ghost)), c = g(() => {
290
- const l = Math.max(...R.value.map((t) => t.value)), o = R.value.map((t) => t.value / l);
291
- return Lt({
292
- series: o,
293
- center: {
294
- x: u.value.width / 2,
295
- y: u.value.height / 2
296
- },
297
- maxRadius: Math.min(u.value.width, u.value.height) / 3,
298
- hasGhost: T.value
299
- });
300
- });
301
- function Q(l) {
302
- return l.x > u.value.width / 2 + 6 ? "start" : l.x < u.value.width / 2 - 6 ? "end" : "middle";
303
- }
304
- function pt(l) {
305
- return l.middlePoint.y > u.value.height / 2 ? z({ initX: l.middlePoint.x, initY: l.middlePoint.y, offset: 100, centerX: u.value.width / 2, centerY: u.value.height / 2 }).y : z({ initX: l.middlePoint.x, initY: l.middlePoint.y, offset: 0, centerX: u.value.width / 2, centerY: u.value.height / 2 }).y - 100;
306
- }
307
- function X(l) {
308
- return l.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
309
- }
310
- function ge(l, o) {
311
- const t = l.value / mt(o);
312
- return isNaN(t) ? 0 : D(
313
- e.value.style.chart.layout.labels.percentage.formatter,
314
- t * 100,
315
- N({
316
- v: t * 100,
317
- s: "%",
318
- r: e.value.style.chart.layout.labels.percentage.rounding
319
- }),
320
- { datapoint: l }
321
- );
322
- }
323
- function mt(l) {
324
- return [...l].map((o) => o.value).reduce((o, t) => o + t, 0);
325
- }
326
- const S = g(() => R.value.map((l) => l.value).reduce((l, o) => l + o, 0)), Re = g(() => S.value / R.value.length), Ue = g(() => (l) => E.value ? l.proportion * 100 : l.value / S.value * 100), pe = d(null), oe = d(!1);
327
- function je({ datapoint: l, relativeIndex: o, seriesIndex: t, show: a = !1 }) {
328
- pe.value = { datapoint: l, seriesIndex: t, config: e.value, series: G.value }, ie.value = a, A.value = o;
329
- let v = "";
330
- const b = e.value.style.chart.tooltip.customFormat;
331
- if (oe.value = !1, Dt(b))
332
- try {
333
- const _ = b({
334
- seriesIndex: t,
335
- datapoint: l,
336
- series: G.value,
337
- config: e.value
338
- });
339
- typeof _ == "string" && (he.value = _, oe.value = !0);
340
- } catch {
341
- console.warn("Custom format cannot be applied."), oe.value = !1;
342
- }
343
- if (!oe.value) {
344
- if (v += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, v += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${l.color}"/>${vt.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${y.value}_${t})"/>` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (v += `<b>${D(
345
- e.value.style.chart.layout.labels.value.formatter,
346
- l.value,
347
- N({
348
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
349
- v: l.value,
350
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
351
- r: e.value.style.chart.tooltip.roundingValue
352
- }),
353
- {
354
- datapoint: l,
355
- relativeIndex: o,
356
- seriesIndex: t
357
- }
358
- )}</b>`), e.value.style.chart.tooltip.showPercentage) {
359
- const _ = D(
360
- e.value.style.chart.layout.labels.percentage.formatter,
361
- l.proportion * 100,
362
- N({
363
- v: l.proportion * 100,
364
- s: "%",
365
- r: e.value.style.chart.tooltip.roundingPercentage
366
- }),
367
- {
368
- datapoint: l,
369
- relativeIndex: o,
370
- seriesIndex: t
371
- }
372
- );
373
- e.value.style.chart.tooltip.showValue ? v += `<span>(${_})</span></div>` : v += `<b>${_}</b></div>`;
374
- }
375
- e.value.style.chart.comments.showInTooltip && l.comment && (v += `<div class="vue-data-ui-tooltip-comment" style="background:${l.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${l.color}">${l.comment}</div>`), he.value = `<div>${v}</div>`;
376
- }
377
- }
378
- function H(l) {
379
- return e.value.useBlurOnHover && ![null, void 0].includes(A.value) && A.value !== l ? `url(#blur_${y.value})` : "";
380
- }
381
- const U = g(() => {
382
- const l = R.value.map((t) => ({
383
- name: t.name,
384
- color: t.color
385
- })), o = R.value.map((t) => t.value);
386
- return { head: l, body: o };
387
- });
388
- function Ee() {
389
- xt(() => {
390
- const l = U.value.head.map((a, v) => [[
391
- a.name
392
- ], [U.value.body[v]], [isNaN(U.value.body[v] / S.value) ? "-" : U.value.body[v] / S.value * 100]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(l), t = Xt(o);
393
- It({ csvContent: t, title: e.value.style.chart.title.text || "vue-ui-donut" });
394
- });
395
- }
396
- const ve = g(() => {
397
- const l = [
398
- ' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
399
- N({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: S.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
400
- "100%"
401
- ], o = U.value.head.map((v, b) => [
402
- {
403
- color: v.color,
404
- name: v.name
405
- },
406
- U.value.body[b],
407
- isNaN(U.value.body[b] / S.value) ? "-" : (U.value.body[b] / S.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
408
- ]), t = {
409
- th: {
410
- backgroundColor: e.value.table.th.backgroundColor,
411
- color: e.value.table.th.color,
412
- outline: e.value.table.th.outline
413
- },
414
- td: {
415
- backgroundColor: e.value.table.td.backgroundColor,
416
- color: e.value.table.td.color,
417
- outline: e.value.table.td.outline
418
- },
419
- breakpoint: e.value.table.responsiveBreakpoint
420
- };
421
- return {
422
- colNames: [
423
- e.value.table.columnNames.series,
424
- e.value.table.columnNames.value,
425
- e.value.table.columnNames.percentage
426
- ],
427
- head: l,
428
- body: o,
429
- config: t
430
- };
431
- }), Z = d(!1);
432
- function bt(l) {
433
- Z.value = l, Se.value += 1;
434
- }
435
- const He = g(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
436
- function wt(l) {
437
- return l.toFixed(e.value.style.chart.legend.roundingPercentage).split("").map((o) => "-").join("");
438
- }
439
- function j(l, o) {
440
- Ve("selectDatapoint", { datapoint: l, index: o });
441
- }
442
- function qe() {
443
- h.value.showTable = !h.value.showTable;
444
- }
445
- function Je() {
446
- h.value.dataLabels.show = !h.value.dataLabels.show;
447
- }
448
- function Ke() {
449
- h.value.showTooltip = !h.value.showTooltip;
450
- }
451
- const ce = d(!1);
452
- function me() {
453
- ce.value = !ce.value;
454
- }
455
- return nt({
456
- getData: yt,
457
- generatePdf: Xe,
458
- generateCsv: Ee,
459
- generateImage: Ie,
460
- toggleTable: qe,
461
- toggleLabels: Je,
462
- toggleTooltip: Ke,
463
- toggleAnnotator: me
464
- }), (l, o) => (s(), n("div", {
465
- ref_key: "donutChart",
466
- ref: ae,
467
- class: be(`vue-ui-donut ${Z.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
468
- style: w(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height:100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
469
- id: `donut__${y.value}`,
470
- onMouseenter: o[6] || (o[6] = () => r(ze)(!0)),
471
- onMouseleave: o[7] || (o[7] = () => r(ze)(!1))
472
- }, [
473
- e.value.userOptions.buttons.annotator && r(fe) ? (s(), q(Kt, {
474
- key: 0,
475
- color: e.value.style.chart.color,
476
- backgroundColor: e.value.style.chart.backgroundColor,
477
- active: ce.value,
478
- svgRef: r(fe),
479
- onClose: me
480
- }, null, 8, ["color", "backgroundColor", "active", "svgRef"])) : i("", !0),
481
- p(l.$slots, "userConfig", {}, void 0, !0),
482
- ht.value ? (s(), n("div", {
483
- key: 1,
484
- ref_key: "noTitle",
485
- ref: Ce,
486
- class: "vue-data-ui-no-title-space",
487
- style: "height:36px; width: 100%;background:transparent"
488
- }, null, 512)) : i("", !0),
489
- e.value.style.chart.title.text ? (s(), n("div", {
490
- key: 2,
491
- ref_key: "chartTitle",
492
- ref: _e,
493
- style: "width:100%;background:transparent;padding-bottom:24px"
494
- }, [
495
- (s(), q(Gt, {
496
- key: `title_${Te.value}`,
497
- config: {
498
- title: {
499
- cy: "donut-div-title",
500
- ...e.value.style.chart.title
501
- },
502
- subtitle: {
503
- cy: "donut-div-subtitle",
504
- ...e.value.style.chart.title.subtitle
505
- }
506
- }
507
- }, null, 8, ["config"]))
508
- ], 512)) : i("", !0),
509
- e.value.userOptions.show && le.value && (r(Oe) || r(ye)) ? (s(), q(Rt, {
510
- ref_key: "details",
511
- ref: ct,
512
- key: `user_option_${Se.value}`,
513
- backgroundColor: e.value.style.chart.backgroundColor,
514
- color: e.value.style.chart.color,
515
- isPrinting: r(Ne),
516
- isImaging: r(Ye),
517
- uid: y.value,
518
- hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
519
- hasPdf: e.value.userOptions.buttons.pdf,
520
- hasImg: e.value.userOptions.buttons.img,
521
- hasXls: e.value.userOptions.buttons.csv,
522
- hasTable: e.value.userOptions.buttons.table,
523
- hasLabel: e.value.userOptions.buttons.labels,
524
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
525
- isFullscreen: Z.value,
526
- chartElement: ae.value,
527
- position: e.value.userOptions.position,
528
- isTooltip: h.value.showTooltip,
529
- titles: { ...e.value.userOptions.buttonTitles },
530
- hasAnnotator: e.value.userOptions.buttons.annotator,
531
- isAnnotation: ce.value,
532
- onToggleFullscreen: bt,
533
- onGeneratePdf: r(Xe),
534
- onGenerateCsv: Ee,
535
- onGenerateImage: r(Ie),
536
- onToggleTable: qe,
537
- onToggleLabels: Je,
538
- onToggleTooltip: Ke,
539
- onToggleAnnotator: me,
540
- style: w({
541
- visibility: r(Oe) ? r(ye) ? "visible" : "hidden" : "visible"
542
- })
543
- }, et({ _: 2 }, [
544
- l.$slots.menuIcon ? {
545
- name: "menuIcon",
546
- fn: C(({ isOpen: t, color: a }) => [
547
- p(l.$slots, "menuIcon", ee(te({ isOpen: t, color: a })), void 0, !0)
548
- ]),
549
- key: "0"
550
- } : void 0,
551
- l.$slots.optionTooltip ? {
552
- name: "optionTooltip",
553
- fn: C(() => [
554
- p(l.$slots, "optionTooltip", {}, void 0, !0)
555
- ]),
556
- key: "1"
557
- } : void 0,
558
- l.$slots.optionPdf ? {
559
- name: "optionPdf",
560
- fn: C(() => [
561
- p(l.$slots, "optionPdf", {}, void 0, !0)
562
- ]),
563
- key: "2"
564
- } : void 0,
565
- l.$slots.optionCsv ? {
566
- name: "optionCsv",
567
- fn: C(() => [
568
- p(l.$slots, "optionCsv", {}, void 0, !0)
569
- ]),
570
- key: "3"
571
- } : void 0,
572
- l.$slots.optionImg ? {
573
- name: "optionImg",
574
- fn: C(() => [
575
- p(l.$slots, "optionImg", {}, void 0, !0)
576
- ]),
577
- key: "4"
578
- } : void 0,
579
- l.$slots.optionTable ? {
580
- name: "optionTable",
581
- fn: C(() => [
582
- p(l.$slots, "optionTable", {}, void 0, !0)
583
- ]),
584
- key: "5"
585
- } : void 0,
586
- l.$slots.optionLabels ? {
587
- name: "optionLabels",
588
- fn: C(() => [
589
- p(l.$slots, "optionLabels", {}, void 0, !0)
590
- ]),
591
- key: "6"
592
- } : void 0,
593
- l.$slots.optionFullscreen ? {
594
- name: "optionFullscreen",
595
- fn: C(({ toggleFullscreen: t, isFullscreen: a }) => [
596
- p(l.$slots, "optionFullscreen", ee(te({ toggleFullscreen: t, isFullscreen: a })), void 0, !0)
597
- ]),
598
- key: "7"
599
- } : void 0,
600
- l.$slots.optionAnnotator ? {
601
- name: "optionAnnotator",
602
- fn: C(({ toggleAnnotator: t, isAnnotator: a }) => [
603
- p(l.$slots, "optionAnnotator", ee(te({ toggleAnnotator: t, isAnnotator: a })), void 0, !0)
604
- ]),
605
- key: "8"
606
- } : void 0
607
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : i("", !0),
608
- le.value ? (s(), n("svg", {
609
- key: 4,
610
- ref_key: "svgRef",
611
- ref: fe,
612
- xmlns: r(zt),
613
- class: be({ "vue-data-ui-fullscreen--on": Z.value, "vue-data-ui-fulscreen--off": !Z.value }),
614
- viewBox: `0 0 ${u.value.width <= 0 ? 10 : u.value.width} ${u.value.height <= 0 ? 10 : u.value.height}`,
615
- style: w(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${Me.value.css}`)
616
- }, [
617
- we(Jt),
618
- l.$slots["chart-background"] ? (s(), n("foreignObject", {
619
- key: 0,
620
- x: 0,
621
- y: 0,
622
- width: u.value.width <= 0 ? 10 : u.value.width,
623
- height: u.value.height <= 0 ? 10 : u.value.height,
624
- style: {
625
- pointerEvents: "none"
626
- }
627
- }, [
628
- p(l.$slots, "chart-background", {}, void 0, !0)
629
- ], 8, ol)) : i("", !0),
630
- e.value.type === "classic" && !isNaN(K.value / $.value) ? (s(), n("defs", sl, [
631
- e.value.style.chart.useGradient ? (s(), n("radialGradient", {
632
- key: 0,
633
- id: `gradient_${y.value}`
634
- }, [
635
- f("stop", {
636
- offset: "0%",
637
- "stop-color": r(ue)(e.value.style.chart.backgroundColor, 0),
638
- "stop-opacity": "0"
639
- }, null, 8, nl),
640
- f("stop", {
641
- offset: `${(1 - K.value / $.value) * 100}%`,
642
- "stop-color": r(ue)("#FFFFFF", 0),
643
- "stop-opacity": "0"
644
- }, null, 8, rl),
645
- f("stop", {
646
- offset: `${(1 - K.value / $.value / 2) * 100}%`,
647
- "stop-color": r(ue)("#FFFFFF", e.value.style.chart.gradientIntensity)
648
- }, null, 8, il),
649
- f("stop", {
650
- offset: "100%",
651
- "stop-color": r(ue)(e.value.style.chart.backgroundColor, 0),
652
- "stop-opacity": "0"
653
- }, null, 8, vl)
654
- ], 8, ul)) : i("", !0)
655
- ])) : i("", !0),
656
- e.value.type === "polar" ? (s(), n("defs", cl, [
657
- (s(!0), n(m, null, L(c.value, (t, a) => (s(), n("radialGradient", {
658
- id: `polar_gradient_${a}_${y.value}`,
659
- cx: (isNaN(t.middlePoint.x / u.value.width * 100) ? 0 : t.middlePoint.x / u.value.width * 100) + "%",
660
- cy: (isNaN(t.middlePoint.y / u.value.height * 100) ? 0 : t.middlePoint.y / u.value.height * 100) + "%",
661
- r: "62%"
662
- }, [
663
- f("stop", {
664
- offset: "0%",
665
- "stop-color": r(Ot)(F.value[a].color, 0.05),
666
- "stop-opacity": e.value.style.chart.gradientIntensity / 100
667
- }, null, 8, hl),
668
- f("stop", {
669
- offset: "100%",
670
- "stop-color": F.value[a].color
671
- }, null, 8, yl)
672
- ], 8, dl))), 256))
673
- ])) : i("", !0),
674
- f("defs", null, [
675
- f("filter", {
676
- id: `blur_${y.value}`,
677
- x: "-50%",
678
- y: "-50%",
679
- width: "200%",
680
- height: "200%"
681
- }, [
682
- f("feGaussianBlur", {
683
- in: "SourceGraphic",
684
- stdDeviation: 2,
685
- id: `blur_std_${y.value}`
686
- }, null, 8, gl),
687
- o[8] || (o[8] = f("feColorMatrix", {
688
- type: "saturate",
689
- values: "0"
690
- }, null, -1))
691
- ], 8, fl),
692
- f("filter", {
693
- id: `shadow_${y.value}`,
694
- "color-interpolation-filters": "sRGB"
695
- }, [
696
- f("feDropShadow", {
697
- dx: "0",
698
- dy: "0",
699
- stdDeviation: "10",
700
- "flood-opacity": "0.5",
701
- "flood-color": e.value.style.chart.layout.donut.shadowColor
702
- }, null, 8, ml)
703
- ], 8, pl),
704
- f("filter", {
705
- id: `drop_shadow_${y.value}`,
706
- "color-interpolation-filters": "sRGB",
707
- x: "-50%",
708
- y: "-50%",
709
- width: "200%",
710
- height: "200%"
711
- }, [
712
- f("feDropShadow", {
713
- dx: "0",
714
- dy: "0",
715
- stdDeviation: "3",
716
- "flood-opacity": "1",
717
- "flood-color": e.value.style.chart.layout.donut.shadowColor
718
- }, null, 8, wl)
719
- ], 8, bl)
720
- ]),
721
- e.value.type === "classic" ? (s(!0), n(m, { key: 3 }, L(F.value.filter((t) => !t.ghost), (t, a) => (s(), n("g", null, [
722
- X(t) && h.value.dataLabels.show ? (s(), n("path", {
723
- key: 0,
724
- d: r(Mt)(t, { x: u.value.width / 2, y: u.value.height / 2 }, 16, 16, !1, !1, K.value, 12, e.value.style.chart.layout.curvedMarkers),
725
- stroke: t.color,
726
- "stroke-width": "1",
727
- "stroke-linecap": "round",
728
- "stroke-linejoin": "round",
729
- fill: "none",
730
- filter: H(a)
731
- }, null, 8, kl)) : i("", !0)
732
- ]))), 256)) : i("", !0),
733
- e.value.type === "polar" ? (s(!0), n(m, { key: 4 }, L(F.value.filter((t) => !t.ghost), (t, a) => (s(), n("g", null, [
734
- X(t) && h.value.dataLabels.show ? (s(), n("path", {
735
- key: 0,
736
- d: `M ${r(z)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 24, centerX: u.value.width / 2, centerY: u.value.height / 2 }).x},${r(z)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 24, centerX: u.value.width / 2, centerY: u.value.height / 2 }).y} ${c.value[a].middlePoint.x},${c.value[a].middlePoint.y}`,
737
- stroke: t.color,
738
- "stroke-width": "1",
739
- "stroke-linecap": "round",
740
- "stroke-linejoin": "round",
741
- fill: "none",
742
- filter: H(a),
743
- style: w({
744
- transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
745
- })
746
- }, null, 12, _l)) : i("", !0)
747
- ]))), 256)) : i("", !0),
748
- e.value.type === "classic" && e.value.style.chart.layout.donut.useShadow ? (s(), n("circle", {
749
- key: 5,
750
- cx: u.value.width / 2,
751
- cy: u.value.height / 2,
752
- r: $.value <= 0 ? 10 : $.value,
753
- fill: e.value.style.chart.backgroundColor,
754
- filter: `url(#shadow_${y.value})`
755
- }, null, 8, $l)) : i("", !0),
756
- l.$slots.pattern ? (s(), n("g", xl, [
757
- (s(!0), n(m, null, L(ke.dataset, (t, a) => (s(), n("defs", {
758
- key: `pattern-${t.patternIndex}`
759
- }, [
760
- p(l.$slots, "pattern", tt({ ref_for: !0 }, { seriesIndex: a, patternId: `pattern_${y.value}_${a}` }), void 0, !0)
761
- ]))), 128))
762
- ])) : i("", !0),
763
- S.value && e.value.type === "classic" ? (s(), n(m, { key: 7 }, [
764
- (s(!0), n(m, null, L(Y.value, (t, a) => (s(), n("path", {
765
- stroke: e.value.style.chart.backgroundColor,
766
- d: t.arcSlice,
767
- fill: "#FFFFFF"
768
- }, null, 8, Cl))), 256)),
769
- l.$slots.pattern ? (s(), n("g", Tl, [
770
- (s(!0), n(m, null, L(Y.value, (t, a) => (s(), n("path", {
771
- class: "vue-ui-donut-arc-path",
772
- d: t.arcSlice,
773
- fill: `url(#${t.pattern})`,
774
- stroke: e.value.style.chart.backgroundColor,
775
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
776
- filter: H(a)
777
- }, null, 8, Pl))), 256))
778
- ])) : i("", !0),
779
- (s(!0), n(m, null, L(Y.value, (t, a) => (s(), n("path", {
780
- class: "vue-ui-donut-arc-path",
781
- d: t.arcSlice,
782
- fill: r(ue)(t.color, 80),
783
- stroke: e.value.style.chart.backgroundColor,
784
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
785
- filter: H(a)
786
- }, null, 8, Al))), 256))
787
- ], 64)) : i("", !0),
788
- S.value && e.value.type === "polar" ? (s(), n(m, { key: 8 }, [
789
- F.value.length > 1 ? (s(), n("g", Fl, [
790
- (s(!0), n(m, null, L(Y.value, (t, a) => (s(), n("path", {
791
- stroke: e.value.style.chart.backgroundColor,
792
- d: c.value[a].path,
793
- fill: "#FFFFFF",
794
- style: w({
795
- transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
796
- })
797
- }, null, 12, Sl))), 256)),
798
- e.value.style.chart.layout.donut.useShadow ? (s(), n("g", Ll, [
799
- (s(!0), n(m, null, L(Y.value, (t, a) => (s(), n("path", {
800
- class: "vue-ui-donut-arc-path",
801
- d: c.value[a].path,
802
- fill: "transparent",
803
- stroke: e.value.style.chart.backgroundColor,
804
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
805
- filter: `url(#drop_shadow_${y.value})`,
806
- style: w({
807
- transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
808
- })
809
- }, null, 12, zl))), 256))
810
- ])) : i("", !0),
811
- l.$slots.pattern ? (s(), n("g", Ol, [
812
- (s(!0), n(m, null, L(Y.value, (t, a) => (s(), n("path", {
813
- class: "vue-ui-donut-arc-path",
814
- d: c.value[a].path,
815
- fill: `url(#${t.pattern})`,
816
- stroke: e.value.style.chart.backgroundColor,
817
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
818
- filter: H(a),
819
- style: w({
820
- transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
821
- })
822
- }, null, 12, Ml))), 256))
823
- ])) : i("", !0),
824
- (s(!0), n(m, null, L(Y.value, (t, a) => (s(), n("path", {
825
- class: "vue-ui-donut-arc-path",
826
- d: c.value[a].path,
827
- fill: e.value.style.chart.useGradient ? `url(#polar_gradient_${a}_${y.value})` : t.color,
828
- stroke: e.value.style.chart.backgroundColor,
829
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
830
- filter: H(a),
831
- style: w({
832
- transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
833
- })
834
- }, null, 12, Nl))), 256))
835
- ])) : (s(), n("g", Yl, [
836
- l.$slots.pattern ? (s(), n("circle", {
837
- key: 0,
838
- cx: u.value.width / 2,
839
- cy: u.value.height / 2,
840
- r: $.value,
841
- fill: `url(#pattern_${y.value}_${F.value[0].patternIndex})`,
842
- stroke: e.value.style.chart.backgroundColor,
843
- "stroke-width": e.value.style.chart.layout.donut.borderWidth
844
- }, null, 8, Xl)) : i("", !0),
845
- f("circle", {
846
- cx: u.value.width / 2,
847
- cy: u.value.height / 2,
848
- r: $.value,
849
- fill: e.value.style.chart.useGradient ? `url(#polar_gradient_0_${y.value})` : F.value[0].color,
850
- stroke: e.value.style.chart.backgroundColor,
851
- "stroke-width": e.value.style.chart.layout.donut.borderWidth
852
- }, null, 8, Il)
853
- ]))
854
- ], 64)) : (s(), n("circle", {
855
- key: 9,
856
- cx: u.value.width / 2,
857
- cy: u.value.height / 2,
858
- r: $.value <= 0 ? 10 : $.value,
859
- fill: "transparent",
860
- stroke: e.value.style.chart.backgroundColor
861
- }, null, 8, Dl)),
862
- e.value.style.chart.useGradient && e.value.type === "classic" ? (s(), n("circle", {
863
- key: 10,
864
- cx: u.value.width / 2,
865
- cy: u.value.height / 2,
866
- r: (
867
- /* This might require adjustments */
868
- $.value <= 0 ? 10 : $.value
869
- ),
870
- fill: `url(#gradient_${y.value})`
871
- }, null, 8, Vl)) : i("", !0),
872
- S.value ? (s(), n(m, { key: 11 }, [
873
- F.value.length > 1 || e.value.type === "classic" ? (s(), n("g", Bl, [
874
- (s(!0), n(m, null, L(F.value.filter((t) => !t.ghost), (t, a) => (s(), n("path", {
875
- d: e.value.type === "classic" ? t.arcSlice : c.value[a].path,
876
- fill: A.value === a ? "rgba(0,0,0,0.1)" : "transparent",
877
- onMouseenter: (v) => je({
878
- datapoint: t,
879
- relativeIndex: a,
880
- seriesIndex: t.seriesIndex,
881
- show: !0
882
- }),
883
- onMouseleave: o[0] || (o[0] = (v) => {
884
- ie.value = !1, A.value = null;
885
- }),
886
- onClick: (v) => j(t, a)
887
- }, null, 40, Gl))), 256))
888
- ])) : (s(), n("g", Wl, [
889
- f("circle", {
890
- cx: u.value.width / 2,
891
- cy: u.value.height / 2,
892
- r: $.value,
893
- fill: A.value === l.i ? "rgba(0,0,0,0.1)" : "transparent",
894
- onMouseenter: o[1] || (o[1] = (t) => je({
895
- datapoint: F.value[0],
896
- relativeIndex: 0,
897
- seriesIndex: F.value[0].seriesIndex,
898
- show: !0
899
- })),
900
- onMouseleave: o[2] || (o[2] = (t) => {
901
- ie.value = !1, A.value = null;
902
- }),
903
- onClick: o[3] || (o[3] = (t) => j(F.value[0], l.i))
904
- }, null, 40, Rl)
905
- ]))
906
- ], 64)) : i("", !0),
907
- e.value.type === "classic" ? (s(), n(m, { key: 12 }, [
908
- e.value.style.chart.layout.labels.hollow.total.show ? (s(), n("text", {
909
- key: 0,
910
- "text-anchor": "middle",
911
- x: u.value.width / 2,
912
- y: u.value.height / 2 - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.offsetY,
913
- fill: e.value.style.chart.layout.labels.hollow.total.color,
914
- "font-size": e.value.style.chart.layout.labels.hollow.total.fontSize,
915
- style: w(`font-weight:${e.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
916
- }, P(e.value.style.chart.layout.labels.hollow.total.text), 13, Ul)) : i("", !0),
917
- e.value.style.chart.layout.labels.hollow.total.show ? (s(), n("text", {
918
- key: 1,
919
- "text-anchor": "middle",
920
- x: u.value.width / 2,
921
- y: u.value.height / 2 + e.value.style.chart.layout.labels.hollow.total.fontSize - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.value.offsetY,
922
- fill: e.value.style.chart.layout.labels.hollow.total.value.color,
923
- "font-size": e.value.style.chart.layout.labels.hollow.total.value.fontSize,
924
- style: w(`font-weight:${e.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
925
- }, P(r(D)(
926
- e.value.style.chart.layout.labels.hollow.total.value.formatter,
927
- S.value,
928
- r(N)({
929
- p: e.value.style.chart.layout.labels.hollow.total.value.prefix,
930
- v: S.value,
931
- s: e.value.style.chart.layout.labels.hollow.total.value.suffix
932
- })
933
- )), 13, jl)) : i("", !0),
934
- e.value.style.chart.layout.labels.hollow.average.show ? (s(), n("text", {
935
- key: 2,
936
- "text-anchor": "middle",
937
- x: u.value.width / 2,
938
- y: u.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.offsetY,
939
- fill: e.value.style.chart.layout.labels.hollow.average.color,
940
- "font-size": e.value.style.chart.layout.labels.hollow.average.fontSize,
941
- style: w(`font-weight:${e.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
942
- }, P(e.value.style.chart.layout.labels.hollow.average.text), 13, El)) : i("", !0),
943
- e.value.style.chart.layout.labels.hollow.average.show ? (s(), n("text", {
944
- key: 3,
945
- "text-anchor": "middle",
946
- x: u.value.width / 2,
947
- y: u.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.fontSize + e.value.style.chart.layout.labels.hollow.average.value.offsetY,
948
- fill: e.value.style.chart.layout.labels.hollow.average.value.color,
949
- "font-size": e.value.style.chart.layout.labels.hollow.average.value.fontSize,
950
- style: w(`font-weight:${e.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
951
- }, P(E.value || T.value ? "--" : r(D)(
952
- e.value.style.chart.layout.labels.hollow.average.value.formatter,
953
- Re.value,
954
- r(N)({
955
- p: e.value.style.chart.layout.labels.hollow.average.value.prefix,
956
- v: Re.value,
957
- s: e.value.style.chart.layout.labels.hollow.average.value.suffix,
958
- r: e.value.style.chart.layout.labels.hollow.average.value.rounding
959
- })
960
- )), 13, Hl)) : i("", !0)
961
- ], 64)) : i("", !0),
962
- (s(!0), n(m, null, L(Y.value.filter((t) => !t.ghost), (t, a) => (s(), n("g", {
963
- filter: H(a),
964
- class: be({ animated: e.value.useCssAnimation })
965
- }, [
966
- e.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (s(), n("g", Jl, [
967
- (s(), n("foreignObject", {
968
- x: r(k)(t, !0).anchor === "end" ? r(k)(t).x - 120 : r(k)(t, !0).anchor === "middle" ? r(k)(t).x - 60 : r(k)(t).x,
969
- y: r(ne)(t) - (He.value ? 20 : 0),
970
- width: "120",
971
- height: "60",
972
- style: { overflow: "visible" }
973
- }, [
974
- f("div", null, [
975
- p(l.$slots, "dataLabel", tt({ ref_for: !0 }, {
976
- datapoint: t,
977
- isBlur: !e.value.useBlurOnHover || [null, void 0].includes(A.value) || A.value === a,
978
- isSafari: He.value,
979
- isVisible: X(t) && h.value.dataLabels.show,
980
- textAlign: r(k)(t, !0, 16, !0).anchor,
981
- flexAlign: r(k)(t, !0, 16).anchor,
982
- percentage: ge(t, Y.value)
983
- }), void 0, !0)
984
- ])
985
- ], 8, Kl))
986
- ])) : (s(), n("g", Ql, [
987
- e.value.type === "classic" ? (s(), n(m, { key: 0 }, [
988
- X(t) && h.value.dataLabels.show ? (s(), n("circle", {
989
- key: 0,
990
- cx: r(k)(t).x,
991
- cy: r(ne)(t) - 3.5,
992
- fill: t.color,
993
- stroke: e.value.style.chart.backgroundColor,
994
- "stroke-width": 1,
995
- r: 3,
996
- filter: !e.value.useBlurOnHover || [null, void 0].includes(A.value) || A.value === a ? "" : `url(#blur_${y.value})`,
997
- onClick: (v) => j(t, a)
998
- }, null, 8, Zl)) : i("", !0)
999
- ], 64)) : i("", !0),
1000
- e.value.type === "polar" ? (s(), n(m, { key: 1 }, [
1001
- X(t) && h.value.dataLabels.show ? (s(), n("circle", {
1002
- key: 0,
1003
- cx: r(z)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 24, centerX: u.value.width / 2, centerY: u.value.height / 2 }).x,
1004
- cy: r(z)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 24, centerX: u.value.width / 2, centerY: u.value.height / 2 }).y,
1005
- fill: t.color,
1006
- stroke: e.value.style.chart.backgroundColor,
1007
- "stroke-width": 1,
1008
- r: 3,
1009
- filter: !e.value.useBlurOnHover || [null, void 0].includes(A.value) || A.value === a ? "" : `url(#blur_${y.value})`,
1010
- onClick: (v) => j(t, a),
1011
- style: w({
1012
- transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
1013
- })
1014
- }, null, 12, ea)) : i("", !0)
1015
- ], 64)) : i("", !0),
1016
- e.value.type === "classic" ? (s(), n(m, { key: 2 }, [
1017
- X(t) && h.value.dataLabels.show ? (s(), n("text", {
1018
- key: 0,
1019
- "text-anchor": r(k)(t, !0, 12).anchor,
1020
- x: r(k)(t, !0, 12).x,
1021
- y: r(ne)(t),
1022
- fill: e.value.style.chart.layout.labels.percentage.color,
1023
- "font-size": e.value.style.chart.layout.labels.percentage.fontSize,
1024
- style: w(`font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
1025
- onClick: (v) => j(t, a)
1026
- }, P(ge(t, Y.value)) + " " + P(e.value.style.chart.layout.labels.value.show ? `(${r(D)(
1027
- e.value.style.chart.layout.labels.value.formatter,
1028
- t.value,
1029
- r(N)({
1030
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
1031
- v: t.value,
1032
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
1033
- r: e.value.style.chart.layout.labels.value.rounding
1034
- }),
1035
- { datapoint: t }
1036
- )})` : ""), 13, ta)) : i("", !0),
1037
- X(t) && h.value.dataLabels.show ? (s(), n("text", {
1038
- key: 1,
1039
- "text-anchor": r(k)(t).anchor,
1040
- x: r(k)(t, !0, 12).x,
1041
- y: r(ne)(t) + e.value.style.chart.layout.labels.percentage.fontSize,
1042
- fill: e.value.style.chart.layout.labels.name.color,
1043
- "font-size": e.value.style.chart.layout.labels.name.fontSize,
1044
- style: w(`font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
1045
- onClick: (v) => j(t, a)
1046
- }, P(t.name), 13, la)) : i("", !0)
1047
- ], 64)) : i("", !0),
1048
- e.value.type === "polar" ? (s(), n(m, { key: 3 }, [
1049
- X(t) && h.value.dataLabels.show ? (s(), n("text", {
1050
- key: 0,
1051
- "text-anchor": Q(c.value[a].middlePoint),
1052
- x: r(z)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: u.value.width / 2, centerY: u.value.height / 2 }).x,
1053
- y: r(z)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: u.value.width / 2, centerY: u.value.height / 2 }).y,
1054
- fill: e.value.style.chart.layout.labels.percentage.color,
1055
- "font-size": e.value.style.chart.layout.labels.percentage.fontSize,
1056
- style: w({
1057
- transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1058
- fontWeight: e.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
1059
- }),
1060
- onClick: (v) => j(t, a)
1061
- }, P(ge(t, Y.value)) + " " + P(e.value.style.chart.layout.labels.value.show ? `(${r(D)(
1062
- e.value.style.chart.layout.labels.value.formatter,
1063
- t.value,
1064
- r(N)({
1065
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
1066
- v: t.value,
1067
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
1068
- r: e.value.style.chart.layout.labels.value.rounding
1069
- }),
1070
- { datapoint: t }
1071
- )})` : ""), 13, aa)) : i("", !0),
1072
- X(t) && h.value.dataLabels.show ? (s(), n("text", {
1073
- key: 1,
1074
- "text-anchor": Q(c.value[a].middlePoint),
1075
- x: r(z)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: u.value.width / 2, centerY: u.value.height / 2 }).x,
1076
- y: r(z)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: u.value.width / 2, centerY: u.value.height / 2 }).y + e.value.style.chart.layout.labels.percentage.fontSize,
1077
- fill: e.value.style.chart.layout.labels.name.color,
1078
- "font-size": e.value.style.chart.layout.labels.name.fontSize,
1079
- style: w({
1080
- transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1081
- fontWeight: e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
1082
- }),
1083
- onClick: (v) => j(t, a)
1084
- }, P(t.name), 13, oa)) : i("", !0)
1085
- ], 64)) : i("", !0)
1086
- ])),
1087
- h.value.dataLabels.show && e.value.style.chart.comments.show && t.comment ? (s(), n("g", sa, [
1088
- X(t) && e.value.type === "classic" ? (s(), n("foreignObject", {
1089
- key: 0,
1090
- x: e.value.style.chart.comments.offsetX + (r(k)(t, !0).anchor === "end" ? r(k)(t).x - e.value.style.chart.comments.width : r(k)(t, !0).anchor === "middle" ? r(k)(t).x - e.value.style.chart.comments.width / 2 : r(k)(t).x),
1091
- y: r(ne)(t) + 24 + e.value.style.chart.comments.offsetY,
1092
- width: e.value.style.chart.comments.width,
1093
- height: "200",
1094
- style: { overflow: "visible", "pointer-events": "none" }
1095
- }, [
1096
- f("div", null, [
1097
- p(l.$slots, "plot-comment", {
1098
- plot: { ...t, textAlign: r(k)(t, !0, 16, !0).anchor, flexAlign: r(k)(t, !0, 16).anchor, isFirstLoad: T.value }
1099
- }, void 0, !0)
1100
- ])
1101
- ], 8, ua)) : i("", !0),
1102
- X(t) && e.value.type === "polar" ? (s(), n("foreignObject", {
1103
- key: 1,
1104
- x: e.value.style.chart.comments.offsetX + (Q(c.value[a].middlePoint) === "end" ? r(z)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: u.value.width / 2, centerY: u.value.height / 2 }).x - e.value.style.chart.comments.width : Q(c.value[a].middlePoint) === "middle" ? r(z)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: u.value.width / 2, centerY: u.value.height / 2 }).x - e.value.style.chart.comments.width / 2 : r(z)({ initX: c.value[a].middlePoint.x, initY: c.value[a].middlePoint.y, offset: 42, centerX: u.value.width / 2, centerY: u.value.height / 2 }).x),
1105
- y: pt(c.value[a]) + e.value.style.chart.comments.offsetY,
1106
- width: e.value.style.chart.comments.width,
1107
- height: "200",
1108
- style: w({
1109
- transition: T.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
1110
- overflow: "visible",
1111
- pointerEvents: "none"
1112
- })
1113
- }, [
1114
- f("div", null, [
1115
- p(l.$slots, "plot-comment", {
1116
- plot: { ...t, textAlign: Q(c.value[a].middlePoint), flexAlign: Q(c.value[a].middlePoint), isFirstLoad: T.value }
1117
- }, void 0, !0)
1118
- ])
1119
- ], 12, na)) : i("", !0)
1120
- ])) : i("", !0)
1121
- ], 10, ql))), 256)),
1122
- p(l.$slots, "svg", { svg: u.value }, void 0, !0)
1123
- ], 14, al)) : i("", !0),
1124
- l.$slots.watermark ? (s(), n("div", ra, [
1125
- p(l.$slots, "watermark", ee(te({ isPrinting: r(Ne) || r(Ye) })), void 0, !0)
1126
- ])) : i("", !0),
1127
- le.value ? i("", !0) : (s(), q(Ht, {
1128
- key: 6,
1129
- config: {
1130
- type: "donut",
1131
- style: {
1132
- backgroundColor: e.value.style.chart.backgroundColor,
1133
- donut: {
1134
- color: "#CCCCCC",
1135
- strokeWidth: K.value * 0.8
1136
- }
1137
- }
1138
- }
1139
- }, null, 8, ["config"])),
1140
- f("div", {
1141
- ref_key: "chartLegend",
1142
- ref: $e
1143
- }, [
1144
- e.value.style.chart.legend.show ? (s(), q(Et, {
1145
- key: `legend_${Ae.value}`,
1146
- legendSet: We.value,
1147
- config: gt.value,
1148
- onClickMarker: o[4] || (o[4] = ({ i: t }) => Ge(t))
1149
- }, et({
1150
- item: C(({ legend: t, index: a }) => [
1151
- f("div", {
1152
- style: w(`opacity:${V.value.includes(a) ? 0.5 : 1}`),
1153
- onClick: (v) => t.segregate()
1154
- }, [
1155
- lt(P(t.name) + ": " + P(r(D)(
1156
- e.value.style.chart.layout.labels.value.formatter,
1157
- t.value,
1158
- r(N)({
1159
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
1160
- v: t.value,
1161
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
1162
- r: e.value.style.chart.legend.roundingValue
1163
- }),
1164
- {
1165
- datapoint: t,
1166
- index: a
1167
- }
1168
- )) + " ", 1),
1169
- V.value.includes(a) ? (s(), n("span", ca, " ( " + P(wt(t.proportion * 100)) + " % ) ", 1)) : (s(), n("span", va, " (" + P(isNaN(t.value / S.value) ? "-" : r(D)(
1170
- e.value.style.chart.layout.labels.percentage.formatter,
1171
- Ue.value(t),
1172
- r(N)({
1173
- v: Ue.value(t),
1174
- s: "%",
1175
- r: e.value.style.chart.legend.roundingPercentage
1176
- })
1177
- )) + ") ", 1))
1178
- ], 12, ia)
1179
- ]),
1180
- _: 2
1181
- }, [
1182
- l.$slots.pattern ? {
1183
- name: "legend-pattern",
1184
- fn: C(({ legend: t, index: a }) => [
1185
- we(Zt, {
1186
- shape: t.shape,
1187
- radius: 30,
1188
- stroke: "none",
1189
- plot: { x: 30, y: 30 },
1190
- fill: `url(#pattern_${y.value}_${a})`
1191
- }, null, 8, ["shape", "fill"])
1192
- ]),
1193
- key: "0"
1194
- } : void 0
1195
- ]), 1032, ["legendSet", "config"])) : i("", !0),
1196
- p(l.$slots, "legend", { legend: We.value }, void 0, !0)
1197
- ], 512),
1198
- l.$slots.source ? (s(), n("div", {
1199
- key: 7,
1200
- ref_key: "source",
1201
- ref: xe,
1202
- dir: "auto"
1203
- }, [
1204
- p(l.$slots, "source", {}, void 0, !0)
1205
- ], 512)) : i("", !0),
1206
- we(jt, {
1207
- show: h.value.showTooltip && ie.value,
1208
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1209
- color: e.value.style.chart.tooltip.color,
1210
- fontSize: e.value.style.chart.tooltip.fontSize,
1211
- borderRadius: e.value.style.chart.tooltip.borderRadius,
1212
- borderColor: e.value.style.chart.tooltip.borderColor,
1213
- borderWidth: e.value.style.chart.tooltip.borderWidth,
1214
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1215
- position: e.value.style.chart.tooltip.position,
1216
- offsetY: e.value.style.chart.tooltip.offsetY,
1217
- parent: ae.value,
1218
- content: he.value,
1219
- isCustom: oe.value,
1220
- isFullscreen: Z.value
1221
- }, {
1222
- "tooltip-before": C(() => [
1223
- p(l.$slots, "tooltip-before", ee(te({ ...pe.value })), void 0, !0)
1224
- ]),
1225
- "tooltip-after": C(() => [
1226
- p(l.$slots, "tooltip-after", ee(te({ ...pe.value })), void 0, !0)
1227
- ]),
1228
- _: 3
1229
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen"]),
1230
- le.value ? (s(), q(qt, {
1231
- key: 8,
1232
- hideDetails: "",
1233
- config: {
1234
- open: h.value.showTable,
1235
- maxHeight: 1e4,
1236
- body: {
1237
- backgroundColor: e.value.style.chart.backgroundColor,
1238
- color: e.value.style.chart.color
1239
- },
1240
- head: {
1241
- backgroundColor: e.value.style.chart.backgroundColor,
1242
- color: e.value.style.chart.color
1243
- }
1244
- }
1245
- }, {
1246
- content: C(() => [
1247
- (s(), q(Ut, {
1248
- key: `table_${Pe.value}`,
1249
- colNames: ve.value.colNames,
1250
- head: ve.value.head,
1251
- body: ve.value.body,
1252
- config: ve.value.config,
1253
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
1254
- onClose: o[5] || (o[5] = (t) => h.value.showTable = !1)
1255
- }, {
1256
- th: C(({ th: t }) => [
1257
- f("div", {
1258
- innerHTML: t,
1259
- style: { display: "flex", "align-items": "center" }
1260
- }, null, 8, da)
1261
- ]),
1262
- td: C(({ td: t }) => [
1263
- lt(P(t.name ? t.name : isNaN(Number(t)) ? t.includes("%") ? t : r(D)(
1264
- e.value.style.chart.layout.labels.percentage.formatter,
1265
- t,
1266
- r(N)({
1267
- v: t,
1268
- s: "%",
1269
- r: e.value.style.chart.layout.labels.percentage.rounding
1270
- })
1271
- ) : r(D)(
1272
- e.value.style.chart.layout.labels.value.formatter,
1273
- t,
1274
- r(N)({
1275
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
1276
- v: t,
1277
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
1278
- r: e.value.style.chart.layout.labels.value.rounding
1279
- })
1280
- )), 1)
1281
- ]),
1282
- _: 1
1283
- }, 8, ["colNames", "head", "body", "config", "title"]))
1284
- ]),
1285
- _: 1
1286
- }, 8, ["config"])) : i("", !0)
1287
- ], 46, ll));
1288
- }
1289
- }, La = /* @__PURE__ */ tl(ha, [["__scopeId", "data-v-69ca377d"]]);
1290
- export {
1291
- La as default
1292
- };