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,871 +0,0 @@
1
- import { computed as b, ref as y, onMounted as vt, watch as Ue, createElementBlock as s, openBlock as o, unref as i, normalizeStyle as Q, normalizeClass as D, createBlock as N, createCommentVNode as c, renderSlot as S, createSlots as dt, withCtx as _, normalizeProps as G, guardReactiveProps as W, createVNode as ht, createElementVNode as C, Fragment as L, renderList as z, toDisplayString as p, createTextVNode as ie, nextTick as j } from "vue";
2
- import { u as yt, o as ft, e as Z, g as gt, c as Be, t as mt, p as ee, a as bt, C as Xe, b as pt, d as ce, H as xt, D as Ge, m as ve, X as kt, s as Y, E as _t, i as de, f as te, j as Ct, k as wt, n as We, q as $t, r as St, I as je, J as Lt } from "./index-BFzQMJda.js";
3
- import { _ as zt } from "./Title-CzaCeCOm.js";
4
- import { u as At, U as It } from "./usePrinter-C5bLp34h.js";
5
- import { D as Nt } from "./DataTable-Rajdtaf6.js";
6
- import { L as Dt } from "./Legend-BxtDQCIv.js";
7
- import Ft from "./vue-ui-skeleton-B_YI7Yuc.js";
8
- import { S as Ot } from "./Slicer-7qFdY-bT.js";
9
- import Pt from "./vue-ui-accordion-BUz4JIIX.js";
10
- import { u as Ye } from "./useNestedProp-v7KPpwuP.js";
11
- import { _ as Et } from "./PackageVersion-BjrblLPQ.js";
12
- import { _ as Tt } from "./PenAndPaper-BkP3J-Ft.js";
13
- import { u as Vt } from "./useUserOptionState-BIvW1Kz7.js";
14
- import { u as Ht } from "./useChartAccessibility-BWojgys7.js";
15
- import { B as Rt } from "./BaseDraggableDialog-Bzwlfmy1.js";
16
- import Mt from "./vue-ui-donut-WRUDvvZa.js";
17
- import { _ as Ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
- const Bt = ["id"], Xt = ["xmlns", "viewBox"], Gt = ["x", "y", "width", "height"], Wt = ["id"], jt = ["stop-color"], Yt = ["stop-color"], qt = ["id"], Jt = ["stop-color"], Kt = ["stop-color"], Qt = ["stop-color"], Zt = { key: 1 }, el = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], tl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ll = { key: 0 }, al = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ol = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], ul = ["x", "y", "font-size", "fill", "font-weight"], sl = {
19
- key: 3,
20
- class: /* @__PURE__ */ D({ "donut-opacity": !0 })
21
- }, nl = ["text-anchor", "font-size", "fill", "transform"], rl = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], il = { key: 1 }, cl = ["cx", "cy", "r", "fill"], vl = { key: 0 }, dl = { key: 0 }, hl = ["d", "stroke"], yl = ["text-anchor", "x", "y", "fill"], fl = ["cx", "cy", "r", "fill"], gl = { key: 0 }, ml = ["cx", "cy", "fill"], bl = { key: 1 }, pl = ["d", "fill", "stroke"], xl = { key: 2 }, kl = ["d", "fill", "stroke"], _l = ["x", "y", "font-size", "fill"], Cl = ["x", "y", "width", "height", "fill"], wl = ["x", "y", "width", "height", "onMouseenter", "onClick"], $l = {
22
- key: 5,
23
- class: "vue-data-ui-watermark"
24
- }, Sl = ["onClick"], Ll = { key: 0 }, zl = { key: 1 }, Al = {
25
- key: 9,
26
- ref: "source",
27
- dir: "auto"
28
- }, Il = { key: 0 }, Nl = { key: 1 }, Dl = {
29
- __name: "vue-ui-donut-evolution",
30
- props: {
31
- config: {
32
- type: Object,
33
- default() {
34
- return {};
35
- }
36
- },
37
- dataset: {
38
- type: Array,
39
- default() {
40
- return [];
41
- }
42
- }
43
- },
44
- emits: ["selectLegend"],
45
- setup(qe, { expose: Je, emit: Ke }) {
46
- const { vue_ui_donut_evolution: Qe } = yt(), m = qe, q = b(() => !!m.dataset && m.dataset.length), d = y({
47
- start: 0,
48
- end: Math.max(...m.dataset.map((t) => t.values.length))
49
- });
50
- function he() {
51
- ye();
52
- }
53
- const P = y(null);
54
- async function ye() {
55
- (e.value.style.chart.zoom.startIndex !== null || e.value.style.chart.zoom.endIndex !== null) && P.value ? (e.value.style.chart.zoom.startIndex !== null && (await j(), await j(), P.value && P.value.setStartValue(e.value.style.chart.zoom.startIndex)), e.value.style.chart.zoom.endIndex !== null && (await j(), await j(), P.value && P.value.setEndValue(Ze(e.value.style.chart.zoom.endIndex + 1)))) : (d.value = {
56
- start: 0,
57
- end: O.value
58
- }, be.value += 1);
59
- }
60
- function Ze(t) {
61
- const a = O.value;
62
- return t > a ? a : t < 0 || e.value.style.chart.zoom.startIndex !== null && t < e.value.style.chart.zoom.startIndex ? e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex + 1 : 1 : t;
63
- }
64
- vt(() => {
65
- fe();
66
- });
67
- function fe() {
68
- ft(m.dataset) ? Z({
69
- componentName: "VueUiDonutEvolution",
70
- type: "dataset"
71
- }) : m.dataset.length && m.dataset.forEach((t, a) => {
72
- gt({
73
- datasetObject: t,
74
- requiredAttributes: ["name", "values"]
75
- }).forEach((l) => {
76
- Z({
77
- componentName: "VueUiDonutEvolution",
78
- type: "datasetSerieAttribute",
79
- property: l,
80
- index: a
81
- });
82
- });
83
- }), ye();
84
- }
85
- const E = y(Be()), x = y([]), f = y(null), J = y(null), le = y(!1), T = y(null), ge = y(null), et = y(null), me = y(0), be = y(0), pe = y(0), xe = y(0), ke = y(0), _e = Ke, e = b({
86
- get: () => Se(),
87
- set: (t) => t
88
- }), { userOptionsVisible: ae, setUserOptionsVisibility: Ce, keepUserOptionState: we } = Vt({ config: e.value }), { svgRef: $e } = Ht({ config: e.value.style.chart.title });
89
- function Se() {
90
- const t = Ye({
91
- userConfig: m.config,
92
- defaultConfig: Qe
93
- });
94
- let a = {};
95
- return t.theme ? a = {
96
- ...Ye({
97
- userConfig: bt.vue_ui_donut_evolution[t.theme] || m.config,
98
- defaultConfig: t
99
- }),
100
- customPalette: mt[t.theme] || ee
101
- } : a = t, m.config && Xe(m.config, "style.chart.zoom.startIndex") ? a.style.chart.zoom.startIndex = m.config.style.chart.zoom.startIndex : a.style.chart.zoom.startIndex = null, m.config && Xe(m.config, "style.chart.zoom.endIndex") ? a.style.chart.zoom.endIndex = m.config.style.chart.zoom.endIndex : a.style.chart.zoom.endIndex = null, a;
102
- }
103
- Ue(() => m.config, (t) => {
104
- e.value = Se(), ae.value = !e.value.userOptions.showOnChartHover, fe(), pe.value += 1, xe.value += 1, ke.value += 1, M.value.showTable = e.value.table.show;
105
- }, { deep: !0 }), Ue(() => m.dataset, (t) => {
106
- he();
107
- }, { deep: !0 });
108
- const { isPrinting: Le, isImaging: ze, generatePdf: Ae, generateImage: Ie } = At({
109
- elementId: E.value,
110
- fileName: e.value.style.chart.title.text || "vue-ui-donut-evolution",
111
- options: e.value.userOptions.print
112
- }), tt = b(() => e.value.userOptions.show && !e.value.style.chart.title.text), lt = b(() => pt(e.value.customPalette)), M = y({
113
- showTable: e.value.table.show
114
- }), r = b(() => ({
115
- top: e.value.style.chart.layout.padding.top,
116
- right: e.value.style.chart.layout.padding.right,
117
- bottom: e.value.style.chart.layout.padding.bottom,
118
- left: e.value.style.chart.layout.padding.left
119
- })), v = b(() => {
120
- const t = e.value.style.chart.layout.height, a = e.value.style.chart.layout.width, l = t - r.value.top - r.value.bottom, n = a - r.value.left - r.value.right;
121
- return {
122
- absoluteHeight: t,
123
- absoluteWidth: a,
124
- centerX: r.value.left + n / 2,
125
- centerY: r.value.top + l / 2,
126
- height: l,
127
- width: n
128
- };
129
- }), F = b(() => (m.dataset.forEach((t, a) => {
130
- [null, void 0].includes(t.name) && Z({
131
- componentName: "VueUiDonutEvolution",
132
- type: "datasetSerieAttribute",
133
- property: "name",
134
- index: a
135
- }), [null, void 0].includes(t.values) && Z({
136
- componentName: "VueUiDonutEvolution",
137
- type: "datasetSerieAttribute",
138
- property: "values",
139
- index: a
140
- });
141
- }), m.dataset.map((t, a) => ({
142
- ...t,
143
- values: xt(t.values),
144
- color: ce(t.color) || lt.value[a] || ee[a] || ee[a % ee.length],
145
- length: (t.values || []).length,
146
- uid: Be()
147
- })))), U = b(() => F.value.filter((t) => !x.value.includes(t.uid)).map((t) => ({
148
- ...t,
149
- values: t.values.filter((a, l) => l >= d.value.start && l <= d.value.end)
150
- }))), O = b(() => Math.max(...U.value.map((t) => t.length))), w = b(() => v.value.width / (d.value.end - d.value.start)), k = b(() => {
151
- const t = [];
152
- for (let u = 0; u < d.value.end - d.value.start; u += 1) {
153
- const g = U.value.map((I) => I.values[u] ?? null), h = g.filter((I) => [void 0, null].includes(I)).length === g.length, A = g.reduce((I, $) => I + $, 0), re = g.map((I) => I / A), R = r.value.left + w.value * u + w.value / 2;
154
- t.push({
155
- index: u,
156
- percentages: re,
157
- subtotal: h || A < 0 ? null : A,
158
- values: g,
159
- x: R
160
- });
161
- }
162
- const a = 0, l = Math.max(...t.map((u) => u.subtotal)), n = t.length === 1 ? l * 2 : l;
163
- return t.map((u, g) => {
164
- const h = w.value / 2 * 0.7, A = h > v.value.width / 16 ? v.value.width / 16 : h, re = f.value === u.index ? v.value.width / 16 : A, R = t.length > 4 ? h * 2 : h * 2 > w.value / 2 * 0.7 ? w.value / 2 * 0.7 : h * 2, I = v.value.absoluteHeight - r.value.bottom - v.value.height * u.subtotal / Ge(a, n, e.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;
165
- return {
166
- ...u,
167
- y: I,
168
- radius: A,
169
- activeRadius: re,
170
- hoverRadius: R,
171
- donut: ve({
172
- series: U.value.map(($, Me) => ({
173
- color: $.color,
174
- name: $.name,
175
- value: $.values[g] ?? 0
176
- }))
177
- }, u.x, I, A, A, 1.99999, 2, 1, 360, 105.25, A / 2),
178
- donutHover: ve({
179
- series: U.value.map(($, Me) => ({
180
- color: $.color,
181
- name: $.name,
182
- value: $.values[g] ?? 0
183
- }))
184
- }, u.x, I, R, R, 1.99999, 2, 1, 360, 105.25, R / 2),
185
- donutFocus: ve({
186
- series: U.value.map(($, Me) => ({
187
- color: $.color,
188
- name: $.name,
189
- value: $.values[g] ?? 0
190
- }))
191
- }, v.value.centerX, v.value.centerY, v.value.height / 3.6, v.value.height / 3.6, 1.99999, 2, 1, 360, 105.25, v.value.height / 6)
192
- };
193
- });
194
- });
195
- function Ne(t, a, l) {
196
- return de(
197
- e.value.style.chart.layout.dataLabels.formatter,
198
- t,
199
- te({
200
- p: e.value.style.chart.layout.dataLabels.prefix,
201
- v: t,
202
- s: e.value.style.chart.layout.dataLabels.suffix,
203
- r: e.value.style.chart.layout.dataLabels.rounding
204
- }),
205
- { datapoint: a, index: l }
206
- );
207
- }
208
- const oe = b(() => ({
209
- max: Math.max(...k.value.map((t) => t.subtotal)),
210
- min: 0
211
- })), V = b(() => {
212
- const t = k.value.length === 1 ? oe.value.max * 2 : oe.value.max;
213
- return Ge(oe.value.min, t, e.value.style.chart.layout.grid.yAxis.dataLabels.steps);
214
- });
215
- function at(t) {
216
- return t / V.value.max;
217
- }
218
- const ot = b(() => V.value.ticks.map((t) => ({
219
- y: v.value.absoluteHeight - r.value.bottom - v.value.height * at(t),
220
- value: t
221
- })));
222
- function ut(t, a) {
223
- return isNaN(t.value / je(a, "value")) ? 0 : (t.value / je(a, "value") * 100).toFixed(0) + "%";
224
- }
225
- function De() {
226
- f.value = null, J.value = null;
227
- }
228
- function st(t) {
229
- f.value = t.index, J.value = t;
230
- }
231
- const B = y(null);
232
- function Fe(t, a) {
233
- !t.subtotal || !e.value.style.chart.dialog.show || (J.value = null, f.value = null, le.value = !0, T.value = t, ct(t), [null, void 0].includes(a) || (B.value = a));
234
- }
235
- const Oe = b(() => F.value.map((t, a) => ({
236
- name: t.name,
237
- value: t.values.slice(d.value.start, d.value.end).reduce((l, n) => l + n, 0),
238
- shape: "circle",
239
- uid: t.uid,
240
- color: t.color
241
- })).sort((t, a) => a.value - t.value).map((t) => ({
242
- ...t,
243
- opacity: x.value.includes(t.uid) ? 0.5 : 1,
244
- segregate: () => ue(t.uid),
245
- isSegregated: x.value.includes(t.uid)
246
- }))), Pe = b(() => k.value.map((t) => t.subtotal).reduce((t, a) => t + a, 0)), nt = b(() => ({
247
- cy: "donut-div-legend",
248
- backgroundColor: e.value.style.chart.legend.backgroundColor,
249
- color: e.value.style.chart.legend.color,
250
- fontSize: e.value.style.chart.legend.fontSize,
251
- paddingBottom: 12,
252
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
253
- }));
254
- function ue(t) {
255
- if (x.value.includes(t))
256
- x.value = x.value.filter((a) => a !== t), _e("selectLegend", null);
257
- else {
258
- if (x.value.length === F.value.length - 1) return;
259
- x.value.push(t), _e("selectLegend", F.value.find((a) => a.uid === t));
260
- }
261
- T.value && Fe(k.value.find((a, l) => l === B.value));
262
- }
263
- const H = b(() => {
264
- const t = [""].concat(F.value.filter((u) => !x.value.includes(u.uid)).map((u) => ({
265
- name: u.name,
266
- color: u.color
267
- }))).concat(["Σ"]);
268
- let a = [];
269
- for (let u = 0; u < O.value; u += 1) {
270
- const g = F.value.filter((h) => !x.value.includes(h.uid)).map((h) => h.values[u] ?? 0).reduce((h, A) => h + A, 0);
271
- a.push([e.value.style.chart.layout.grid.xAxis.dataLabels.values[u] ?? "-"].concat(F.value.filter((h) => !x.value.includes(h.uid)).map((h) => ({
272
- value: h.values[u] ?? 0,
273
- percentage: h.values[u] ? h.values[u] / g * 100 : 0
274
- }))).concat([`${e.value.style.chart.layout.dataLabels.prefix}${Number(g.toFixed(e.value.table.td.roundingValue))}${e.value.style.chart.layout.dataLabels.suffix}`]));
275
- }
276
- const l = {
277
- th: {
278
- backgroundColor: e.value.table.th.backgroundColor,
279
- color: e.value.table.th.color,
280
- outline: e.value.table.th.outline
281
- },
282
- td: {
283
- backgroundColor: e.value.table.td.backgroundColor,
284
- color: e.value.table.td.color,
285
- outline: e.value.table.td.outline
286
- },
287
- breakpoint: e.value.table.responsiveBreakpoint
288
- }, n = [
289
- e.value.table.columnNames.period
290
- ].concat(F.value.filter((u) => !x.value.includes(u.uid)).map((u) => u.name)).concat(e.value.table.columnNames.total);
291
- return { head: t, body: a, config: l, colNames: n };
292
- });
293
- function rt() {
294
- return F.value;
295
- }
296
- function Ee() {
297
- j(() => {
298
- const t = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], a = [...H.value.head.map((g) => g.name ?? g)], l = [...H.value.body.map((g) => g.map((h) => h.value ?? h))], n = t.concat([a]).concat(l), u = $t(n);
299
- St({ csvContent: u, title: e.value.style.chart.title.text || "vue-ui-donut-evolution" });
300
- });
301
- }
302
- const X = y(!1);
303
- function it(t) {
304
- X.value = t, me.value += 1;
305
- }
306
- function Te() {
307
- M.value.showTable = !M.value.showTable;
308
- }
309
- const K = y(!1);
310
- function se() {
311
- K.value = !K.value;
312
- }
313
- function Ve(t) {
314
- return t.proportion * 100 > e.value.style.chart.donuts.hover.hideLabelsUnderValue;
315
- }
316
- const He = y([]), Re = y({}), ne = y(null);
317
- function ct(t) {
318
- He.value = t.donut.map((a) => ({
319
- name: a.name,
320
- values: [a.value],
321
- color: a.color
322
- })), Re.value = Lt({
323
- ...e.value.style.chart.dialog.donutChart,
324
- responsive: !0,
325
- theme: e.value.theme
326
- }), ne.value && ne.value.open();
327
- }
328
- return Je({
329
- getData: rt,
330
- generatePdf: Ae,
331
- generateCsv: Ee,
332
- generateImage: Ie,
333
- toggleTable: Te,
334
- toggleAnnotator: se
335
- }), (t, a) => (o(), s("div", {
336
- ref_key: "donutEvolutionChart",
337
- ref: ge,
338
- class: D(`vue-ui-donut-evolution ${X.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
339
- style: Q(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
340
- id: E.value,
341
- onMouseenter: a[5] || (a[5] = () => i(Ce)(!0)),
342
- onMouseleave: a[6] || (a[6] = () => i(Ce)(!1))
343
- }, [
344
- e.value.userOptions.buttons.annotator ? (o(), N(Tt, {
345
- key: 0,
346
- svgRef: i($e),
347
- backgroundColor: e.value.style.chart.backgroundColor,
348
- color: e.value.style.chart.color,
349
- active: K.value,
350
- onClose: se
351
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : c("", !0),
352
- tt.value ? (o(), s("div", {
353
- key: 1,
354
- ref_key: "noTitle",
355
- ref: et,
356
- class: "vue-data-ui-no-title-space",
357
- style: "height:36px; width: 100%;background:transparent"
358
- }, null, 512)) : c("", !0),
359
- e.value.style.chart.title.text ? (o(), s("div", {
360
- key: 2,
361
- style: "width:100%;background:transparent;padding-bottom:24px",
362
- onMouseleave: De
363
- }, [
364
- (o(), N(zt, {
365
- key: `title_${pe.value}`,
366
- config: {
367
- title: {
368
- cy: "donut-evolution-div-title",
369
- ...e.value.style.chart.title
370
- },
371
- subtitle: {
372
- cy: "donut-evolution-div-subtitle",
373
- ...e.value.style.chart.title.subtitle
374
- }
375
- }
376
- }, null, 8, ["config"]))
377
- ], 32)) : c("", !0),
378
- e.value.userOptions.show && q.value && (i(we) || i(ae)) ? (o(), N(It, {
379
- ref: "details",
380
- key: `user_options_${me.value}`,
381
- backgroundColor: e.value.style.chart.backgroundColor,
382
- color: e.value.style.chart.color,
383
- isPrinting: i(Le),
384
- isImaging: i(ze),
385
- uid: E.value,
386
- hasPdf: e.value.userOptions.buttons.pdf,
387
- hasImg: e.value.userOptions.buttons.img,
388
- hasXls: e.value.userOptions.buttons.csv,
389
- hasTable: e.value.userOptions.buttons.table,
390
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
391
- isFullscreen: X.value,
392
- titles: { ...e.value.userOptions.buttonTitles },
393
- chartElement: ge.value,
394
- position: e.value.userOptions.position,
395
- hasAnnotator: e.value.userOptions.buttons.annotator,
396
- isAnnotation: K.value,
397
- onToggleFullscreen: it,
398
- onGeneratePdf: i(Ae),
399
- onGenerateCsv: Ee,
400
- onGenerateImage: i(Ie),
401
- onToggleTable: Te,
402
- onToggleAnnotator: se,
403
- style: Q({
404
- visibility: i(we) ? i(ae) ? "visible" : "hidden" : "visible"
405
- })
406
- }, dt({ _: 2 }, [
407
- t.$slots.menuIcon ? {
408
- name: "menuIcon",
409
- fn: _(({ isOpen: l, color: n }) => [
410
- S(t.$slots, "menuIcon", G(W({ isOpen: l, color: n })), void 0, !0)
411
- ]),
412
- key: "0"
413
- } : void 0,
414
- t.$slots.optionPdf ? {
415
- name: "optionPdf",
416
- fn: _(() => [
417
- S(t.$slots, "optionPdf", {}, void 0, !0)
418
- ]),
419
- key: "1"
420
- } : void 0,
421
- t.$slots.optionCsv ? {
422
- name: "optionCsv",
423
- fn: _(() => [
424
- S(t.$slots, "optionCsv", {}, void 0, !0)
425
- ]),
426
- key: "2"
427
- } : void 0,
428
- t.$slots.optionImg ? {
429
- name: "optionImg",
430
- fn: _(() => [
431
- S(t.$slots, "optionImg", {}, void 0, !0)
432
- ]),
433
- key: "3"
434
- } : void 0,
435
- t.$slots.optionTable ? {
436
- name: "optionTable",
437
- fn: _(() => [
438
- S(t.$slots, "optionTable", {}, void 0, !0)
439
- ]),
440
- key: "4"
441
- } : void 0,
442
- t.$slots.optionFullscreen ? {
443
- name: "optionFullscreen",
444
- fn: _(({ toggleFullscreen: l, isFullscreen: n }) => [
445
- S(t.$slots, "optionFullscreen", G(W({ toggleFullscreen: l, isFullscreen: n })), void 0, !0)
446
- ]),
447
- key: "5"
448
- } : void 0,
449
- t.$slots.optionAnnotator ? {
450
- name: "optionAnnotator",
451
- fn: _(({ toggleAnnotator: l, isAnnotator: n }) => [
452
- S(t.$slots, "optionAnnotator", G(W({ toggleAnnotator: l, isAnnotator: n })), void 0, !0)
453
- ]),
454
- key: "6"
455
- } : void 0
456
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage", "style"])) : c("", !0),
457
- q.value ? (o(), s("svg", {
458
- key: 4,
459
- ref_key: "svgRef",
460
- ref: $e,
461
- xmlns: i(kt),
462
- class: D({ "vue-data-ui-fullscreen--on": X.value, "vue-data-ui-fulscreen--off": !X.value }),
463
- viewBox: `0 0 ${v.value.absoluteWidth} ${v.value.absoluteHeight}`,
464
- style: Q(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};`)
465
- }, [
466
- ht(Et),
467
- t.$slots["chart-background"] ? (o(), s("foreignObject", {
468
- key: 0,
469
- x: r.value.left,
470
- y: r.value.top,
471
- width: v.value.width,
472
- height: v.value.height,
473
- style: {
474
- pointerEvents: "none"
475
- }
476
- }, [
477
- S(t.$slots, "chart-background", {}, void 0, !0)
478
- ], 8, Gt)) : c("", !0),
479
- C("defs", null, [
480
- C("linearGradient", {
481
- id: `hover_${E.value}`,
482
- x1: "0%",
483
- y1: "0%",
484
- x2: "0%",
485
- y2: "100%"
486
- }, [
487
- C("stop", {
488
- offset: "0%",
489
- "stop-color": i(Y)(e.value.style.chart.backgroundColor, e.value.style.chart.layout.highlighter.opacity)
490
- }, null, 8, jt),
491
- C("stop", {
492
- offset: "100%",
493
- "stop-color": i(Y)(e.value.style.chart.layout.highlighter.color, e.value.style.chart.layout.highlighter.opacity)
494
- }, null, 8, Yt)
495
- ], 8, Wt),
496
- C("radialGradient", {
497
- id: `focus_${E.value}`
498
- }, [
499
- C("stop", {
500
- offset: "0%",
501
- "stop-color": i(Y)(i(ce)(e.value.style.chart.backgroundColor), 0)
502
- }, null, 8, Jt),
503
- C("stop", {
504
- offset: "77%",
505
- "stop-color": i(Y)("#FFFFFF", 30)
506
- }, null, 8, Kt),
507
- C("stop", {
508
- offset: "100%",
509
- "stop-color": i(Y)(i(ce)(e.value.style.chart.backgroundColor), 0)
510
- }, null, 8, Qt)
511
- ], 8, qt)
512
- ]),
513
- e.value.style.chart.layout.grid.show ? (o(), s("g", Zt, [
514
- C("line", {
515
- x1: r.value.left,
516
- x2: r.value.left,
517
- y1: r.value.top,
518
- y2: r.value.top + v.value.height,
519
- stroke: e.value.style.chart.layout.grid.stroke,
520
- "stroke-width": e.value.style.chart.layout.grid.strokeWidth,
521
- "stroke-linecap": "round"
522
- }, null, 8, el),
523
- C("line", {
524
- x1: r.value.left,
525
- x2: v.value.absoluteWidth - r.value.right,
526
- y1: v.value.absoluteHeight - r.value.bottom,
527
- y2: v.value.absoluteHeight - r.value.bottom,
528
- stroke: e.value.style.chart.layout.grid.stroke,
529
- "stroke-width": e.value.style.chart.layout.grid.strokeWidth,
530
- "stroke-linecap": "round"
531
- }, null, 8, tl),
532
- e.value.style.chart.layout.grid.showVerticalLines ? (o(), s("g", ll, [
533
- (o(!0), s(L, null, z(d.value.end - d.value.start, (l, n) => (o(), s("line", {
534
- x1: r.value.left + (n + 1) * w.value,
535
- x2: r.value.left + (n + 1) * w.value,
536
- y1: r.value.top,
537
- y2: v.value.absoluteHeight - r.value.bottom,
538
- stroke: e.value.style.chart.layout.grid.stroke,
539
- "stroke-width": e.value.style.chart.layout.grid.strokeWidth,
540
- "stroke-linecap": "round"
541
- }, null, 8, al))), 256))
542
- ])) : c("", !0)
543
- ])) : c("", !0),
544
- e.value.style.chart.layout.grid.yAxis.dataLabels.show ? (o(), s("g", {
545
- key: 2,
546
- class: D({ "donut-opacity": !0, "donut-behind": f.value !== null })
547
- }, [
548
- (o(!0), s(L, null, z(ot.value, (l, n) => (o(), s("g", null, [
549
- l.value >= V.value.min && l.value <= V.value.max ? (o(), s("line", {
550
- key: 0,
551
- x1: r.value.left,
552
- x2: r.value.left - 5,
553
- y1: l.y,
554
- y2: l.y,
555
- stroke: e.value.style.chart.layout.grid.stroke,
556
- "stroke-width": e.value.style.chart.layout.grid.strokeWidth
557
- }, null, 8, ol)) : c("", !0),
558
- l.value >= V.value.min && l.value <= V.value.max ? (o(), s("text", {
559
- key: 1,
560
- x: r.value.left - 8 + e.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,
561
- y: l.y + e.value.style.chart.layout.grid.yAxis.dataLabels.fontSize / 3,
562
- "font-size": e.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,
563
- "text-anchor": "end",
564
- fill: e.value.style.chart.layout.grid.yAxis.dataLabels.color,
565
- "font-weight": e.value.style.chart.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
566
- }, p(i(_t)(l.value) ? i(de)(
567
- e.value.style.chart.layout.dataLabels.formatter,
568
- l.value,
569
- i(te)({
570
- p: e.value.style.chart.layout.dataLabels.prefix,
571
- v: l.value,
572
- s: e.value.style.chart.layout.dataLabels.suffix,
573
- r: e.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue
574
- }),
575
- { datapoint: l, seriesIndex: n }
576
- ) : ""), 9, ul)) : c("", !0)
577
- ]))), 256))
578
- ], 2)) : c("", !0),
579
- e.value.style.chart.layout.grid.xAxis.dataLabels.show ? (o(), s("g", sl, [
580
- (o(!0), s(L, null, z(d.value.end - d.value.start, (l, n) => (o(), s("g", null, [
581
- e.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast && (n === 0 || n === O.value - 1) || !e.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast ? (o(), s("text", {
582
- key: 0,
583
- "text-anchor": e.value.style.chart.layout.grid.xAxis.dataLabels.rotation > 0 ? "start" : e.value.style.chart.layout.grid.xAxis.dataLabels.rotation < 0 ? "end" : "middle",
584
- "font-size": e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
585
- fill: e.value.style.chart.layout.grid.xAxis.dataLabels.color,
586
- transform: `translate(${r.value.left + w.value * n + w.value / 2}, ${e.value.style.chart.layout.grid.xAxis.dataLabels.offsetY + v.value.absoluteHeight - r.value.bottom + e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize * 2}), rotate(${e.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`
587
- }, p(e.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(n) + Number(d.value.start)] ?? ""), 9, nl)) : c("", !0)
588
- ]))), 256))
589
- ])) : c("", !0),
590
- (o(!0), s(L, null, z(k.value, (l, n) => (o(), s("g", null, [
591
- e.value.style.chart.layout.line.show && n < k.value.length - 1 && ![l.subtotal, k.value[n + 1].subtotal].includes(null) ? (o(), s("line", {
592
- key: 0,
593
- class: D({ "donut-opacity": !0, "donut-behind": f.value !== null }),
594
- x1: l.x,
595
- y1: l.y,
596
- x2: k.value[n + 1].x,
597
- y2: k.value[n + 1].y,
598
- stroke: e.value.style.chart.layout.line.stroke,
599
- "stroke-width": e.value.style.chart.layout.line.strokeWidth,
600
- "stroke-linecap": "round",
601
- "stroke-linejoin": "round"
602
- }, null, 10, rl)) : c("", !0),
603
- l.subtotal !== null ? (o(), s("g", il, [
604
- l.subtotal ? (o(), s("circle", {
605
- key: 0,
606
- cx: l.x,
607
- cy: l.y,
608
- r: l.activeRadius,
609
- fill: e.value.style.chart.backgroundColor
610
- }, null, 8, cl)) : c("", !0)
611
- ])) : c("", !0)
612
- ]))), 256)),
613
- (o(!0), s(L, null, z(k.value, (l, n) => (o(), s("g", {
614
- class: D({ "donut-opacity": !0, "donut-behind": n !== f.value && f.value !== null })
615
- }, [
616
- l.subtotal ? (o(), s("g", vl, [
617
- f.value !== null && f.value === n ? (o(), s("g", dl, [
618
- (o(!0), s(L, null, z(l.donutHover, (u) => (o(), s("g", null, [
619
- Ve(u) ? (o(), s("path", {
620
- key: 0,
621
- d: i(Ct)(u, { x: u.center.endX, y: u.center.endY }, 12, 12, { x: l.x, y: l.y }, !1, 20),
622
- stroke: u.color,
623
- "stroke-width": "1",
624
- "stroke-linecap": "round",
625
- "stroke-linejoin": "round",
626
- fill: "none"
627
- }, null, 8, hl)) : c("", !0)
628
- ]))), 256)),
629
- (o(!0), s(L, null, z(l.donutHover, (u, g) => (o(), s("g", null, [
630
- Ve(u) ? (o(), s("text", {
631
- key: 0,
632
- "data-cy-hover-label": "",
633
- "text-anchor": i(We)(u, !0, 0).anchor,
634
- x: i(We)(u, !0, 9).x,
635
- y: i(wt)(u, 14, 10),
636
- fill: e.value.style.chart.layout.grid.yAxis.dataLabels.color,
637
- "font-size": 8,
638
- "font-weight": "bold"
639
- }, p(u.name) + ": " + p(ut(u, l.donut)) + " (" + p(u.value === null ? "-" : Ne(u.value, u, g)) + ") ", 9, yl)) : c("", !0)
640
- ]))), 256)),
641
- C("g", null, [
642
- C("circle", {
643
- cx: l.x,
644
- cy: l.y,
645
- r: l.hoverRadius,
646
- fill: e.value.style.chart.backgroundColor
647
- }, null, 8, fl)
648
- ])
649
- ])) : c("", !0)
650
- ])) : c("", !0)
651
- ], 2))), 256)),
652
- (o(!0), s(L, null, z(k.value, (l, n) => (o(), s("g", {
653
- class: D({ "donut-opacity": !0, "donut-behind": n !== f.value && f.value !== null })
654
- }, [
655
- l.subtotal !== null ? (o(), s("g", gl, [
656
- l.subtotal === 0 ? (o(), s("circle", {
657
- key: 0,
658
- cx: l.x,
659
- cy: l.y,
660
- r: 3,
661
- fill: e.value.style.chart.color
662
- }, null, 8, ml)) : f.value !== null && f.value === n ? (o(), s("g", bl, [
663
- (o(!0), s(L, null, z(l.donutHover, (u, g) => (o(), s("path", {
664
- d: u.arcSlice,
665
- fill: `${u.color}`,
666
- "stroke-width": 1,
667
- stroke: e.value.style.chart.backgroundColor
668
- }, null, 8, pl))), 256))
669
- ])) : (o(), s("g", xl, [
670
- (o(!0), s(L, null, z(l.donut, (u, g) => (o(), s("path", {
671
- d: u.arcSlice,
672
- fill: `${u.color}`,
673
- "stroke-width": 0.5,
674
- stroke: e.value.style.chart.backgroundColor
675
- }, null, 8, kl))), 256))
676
- ]))
677
- ])) : c("", !0)
678
- ], 2))), 256)),
679
- (o(!0), s(L, null, z(k.value, (l, n) => (o(), s("g", {
680
- class: D({ "donut-opacity": !0, "donut-behind": n !== f.value && f.value !== null || le.value && n !== T.value.index })
681
- }, [
682
- l.subtotal !== null && e.value.style.chart.layout.dataLabels.show ? (o(), s("text", {
683
- key: 0,
684
- "text-anchor": "middle",
685
- x: l.x,
686
- y: f.value === l.index && l.subtotal ? l.y + e.value.style.chart.layout.dataLabels.fontSize / 3 : l.y - l.radius - e.value.style.chart.layout.dataLabels.fontSize + e.value.style.chart.layout.dataLabels.offsetY,
687
- "font-size": e.value.style.chart.layout.dataLabels.fontSize,
688
- "font-weight": "bold",
689
- fill: e.value.style.chart.layout.dataLabels.color
690
- }, p(Ne(l.subtotal, l, n)), 9, _l)) : c("", !0)
691
- ], 2))), 256)),
692
- (o(!0), s(L, null, z(k.value, (l, n) => (o(), s("rect", {
693
- x: r.value.left + n * w.value,
694
- y: r.value.top,
695
- width: w.value,
696
- height: v.value.height,
697
- fill: [f.value, B.value].includes(l.index) ? `url(#hover_${E.value})` : "transparent",
698
- class: D({ "donut-hover": l.subtotal && [f.value, B.value].includes(l.index) }),
699
- style: {
700
- pointerEvents: "none"
701
- }
702
- }, null, 10, Cl))), 256)),
703
- (o(!0), s(L, null, z(k.value, (l, n) => (o(), s("rect", {
704
- "data-cy-trap": "",
705
- x: r.value.left + n * w.value,
706
- y: r.value.top,
707
- width: w.value,
708
- height: v.value.height,
709
- fill: "transparent",
710
- onMouseenter: (u) => st(l),
711
- onMouseleave: De,
712
- onClick: (u) => Fe(l, n),
713
- class: D({ "donut-hover": f.value === l.index && l.subtotal })
714
- }, null, 42, wl))), 256)),
715
- S(t.$slots, "svg", { svg: v.value }, void 0, !0)
716
- ], 14, Xt)) : c("", !0),
717
- t.$slots.watermark ? (o(), s("div", $l, [
718
- S(t.$slots, "watermark", G(W({ isPrinting: i(Le) || i(ze) })), void 0, !0)
719
- ])) : c("", !0),
720
- q.value ? c("", !0) : (o(), N(Ft, {
721
- key: 6,
722
- config: {
723
- type: "donutEvolution",
724
- style: {
725
- backgroundColor: e.value.style.chart.backgroundColor,
726
- donutEvolution: {
727
- axis: {
728
- color: "#CCCCCC"
729
- },
730
- donuts: {
731
- color: "#CCCCCC"
732
- }
733
- }
734
- }
735
- }
736
- }, null, 8, ["config"])),
737
- O.value > 1 && e.value.style.chart.zoom.show ? (o(), N(Ot, {
738
- ref_key: "slicerComponent",
739
- ref: P,
740
- key: `slicer_${be.value}`,
741
- background: e.value.style.chart.zoom.color,
742
- borderColor: e.value.style.chart.backgroundColor,
743
- fontSize: e.value.style.chart.zoom.fontSize,
744
- useResetSlot: e.value.style.chart.zoom.useResetSlot,
745
- labelLeft: e.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(d.value.start)] || "",
746
- labelRight: e.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(d.value.end) - 1] || "",
747
- textColor: e.value.style.chart.color,
748
- inputColor: e.value.style.chart.zoom.color,
749
- selectColor: e.value.style.chart.zoom.highlightColor,
750
- max: O.value,
751
- min: 0,
752
- valueStart: d.value.start,
753
- valueEnd: d.value.end,
754
- start: d.value.start,
755
- "onUpdate:start": a[0] || (a[0] = (l) => d.value.start = l),
756
- end: d.value.end,
757
- "onUpdate:end": a[1] || (a[1] = (l) => d.value.end = l),
758
- refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
759
- refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : O.value,
760
- enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
761
- enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
762
- onReset: he
763
- }, {
764
- "reset-action": _(({ reset: l }) => [
765
- S(t.$slots, "reset-action", G(W({ reset: l })), void 0, !0)
766
- ]),
767
- _: 3
768
- }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : c("", !0),
769
- e.value.style.chart.legend.show ? (o(), N(Dt, {
770
- key: `legend_${ke.value}`,
771
- legendSet: Oe.value,
772
- config: nt.value,
773
- onClickMarker: a[2] || (a[2] = ({ legend: l }) => ue(l.uid))
774
- }, {
775
- item: _(({ legend: l, index: n }) => [
776
- C("div", {
777
- onClick: (u) => ue(l.uid),
778
- style: Q(`opacity:${x.value.includes(l.uid) ? 0.5 : 1}`)
779
- }, [
780
- ie(p(l.name) + ": " + p(i(de)(
781
- e.value.style.chart.layout.dataLabels.formatter,
782
- l.value,
783
- i(te)({
784
- p: e.value.style.chart.layout.dataLabels.prefix,
785
- v: l.value,
786
- s: e.value.style.chart.layout.dataLabels.suffix,
787
- r: e.value.style.chart.legend.roundingValue
788
- }),
789
- { datapoint: l, seriesIndex: n }
790
- )) + " ", 1),
791
- x.value.includes(l.uid) ? (o(), s("span", zl, " ( - % ) ")) : (o(), s("span", Ll, " (" + p(isNaN(l.value / Pe.value) ? "-" : i(te)({
792
- v: l.value / Pe.value * 100,
793
- s: "%",
794
- r: e.value.style.chart.legend.roundingPercentage
795
- })) + ") ", 1))
796
- ], 12, Sl)
797
- ]),
798
- _: 1
799
- }, 8, ["legendSet", "config"])) : c("", !0),
800
- S(t.$slots, "legend", { legend: Oe.value }, void 0, !0),
801
- t.$slots.source ? (o(), s("div", Al, [
802
- S(t.$slots, "source", {}, void 0, !0)
803
- ], 512)) : c("", !0),
804
- q.value ? (o(), N(Pt, {
805
- key: 10,
806
- hideDetails: "",
807
- config: {
808
- open: M.value.showTable,
809
- maxHeight: 1e4,
810
- body: {
811
- backgroundColor: e.value.style.chart.backgroundColor,
812
- color: e.value.style.chart.color
813
- },
814
- head: {
815
- backgroundColor: e.value.style.chart.backgroundColor,
816
- color: e.value.style.chart.color
817
- }
818
- }
819
- }, {
820
- content: _(() => [
821
- (o(), N(Nt, {
822
- key: `table_${xe.value}`,
823
- colNames: H.value.colNames,
824
- head: H.value.head,
825
- body: H.value.body,
826
- config: H.value.config,
827
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
828
- onClose: a[3] || (a[3] = (l) => M.value.showTable = !1)
829
- }, {
830
- th: _(({ th: l }) => [
831
- ie(p(l.name ?? l), 1)
832
- ]),
833
- td: _(({ td: l }) => [
834
- l.value === null ? (o(), s("span", Il, "-")) : (o(), s("b", Nl, p(isNaN(l.value) ? "" : e.value.style.chart.layout.dataLabels.prefix) + p(!isNaN(l.value) && l.value !== null ? Number(l.value.toFixed(e.value.table.td.roundingValue)).toLocaleString() : l) + p(isNaN(l.value) ? "" : e.value.style.chart.layout.dataLabels.suffix), 1)),
835
- C("span", null, p(l.percentage && !isNaN(l.percentage) ? `(${Number(l.percentage.toFixed(e.value.table.td.roundingPercentage)).toLocaleString()}%)` : ""), 1)
836
- ]),
837
- _: 1
838
- }, 8, ["colNames", "head", "body", "config", "title"]))
839
- ]),
840
- _: 1
841
- }, 8, ["config"])) : c("", !0),
842
- e.value.style.chart.dialog.show ? (o(), N(Rt, {
843
- key: 11,
844
- ref_key: "dialog",
845
- ref: ne,
846
- onClose: a[4] || (a[4] = (l) => {
847
- T.value = null, le.value = !1, J.value = null, f.value = null, B.value = null;
848
- }),
849
- backgroundColor: e.value.style.chart.dialog.backgroundColor,
850
- color: e.value.style.chart.dialog.color,
851
- headerBg: e.value.style.chart.dialog.header.backgroundColor,
852
- headerColor: e.value.style.chart.dialog.header.color
853
- }, {
854
- title: _(() => [
855
- ie(p(e.value.style.chart.layout.grid.xAxis.dataLabels.values[Number(T.value.index) + Number(d.value.start)]), 1)
856
- ]),
857
- default: _(() => [
858
- T.value ? (o(), N(Mt, {
859
- key: 0,
860
- config: Re.value,
861
- dataset: He.value
862
- }, null, 8, ["config", "dataset"])) : c("", !0)
863
- ]),
864
- _: 1
865
- }, 8, ["backgroundColor", "color", "headerBg", "headerColor"])) : c("", !0)
866
- ], 46, Bt));
867
- }
868
- }, Jl = /* @__PURE__ */ Ut(Dl, [["__scopeId", "data-v-efec7be7"]]);
869
- export {
870
- Jl as default
871
- };