vue-data-ui 2.17.0 → 2.17.2

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