vue-data-ui 3.0.0-next.9 → 3.0.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 (144) hide show
  1. package/README.md +32 -30
  2. package/dist/{Arrow-B6OlqyCG.js → Arrow-r2f8Bpd-.js} +1 -1
  3. package/dist/{BaseDraggableDialog-CA8QOk7L.js → BaseDraggableDialog-CGGcf8d8.js} +4 -4
  4. package/dist/{BaseIcon-DxUUKVlt.js → BaseIcon-CXtL10fo.js} +1 -1
  5. package/dist/{ColorPicker-Bh1dfgXt.js → ColorPicker-H91bBsqM.js} +2 -2
  6. package/dist/{DataTable--paavNqF.js → DataTable-BSSXpM7w.js} +2 -2
  7. package/dist/{Legend-BZ06qU55.js → Legend-BUk0WvWJ.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-DN9XjEHv.js → NonSvgPenAndPaper-DQDgPoW8.js} +3 -3
  9. package/dist/{PackageVersion-2QvaZf9_.js → PackageVersion-CJ6Vd7V5.js} +3 -3
  10. package/dist/{PenAndPaper-hGgW0EHz.js → PenAndPaper-D3zudcNI.js} +32 -32
  11. package/dist/{RecursiveCircles-Dn3TGoL6.js → RecursiveCircles-BcLb1aRS.js} +15 -13
  12. package/dist/RecursiveLabels-Bgcv0pzu.js +50 -0
  13. package/dist/{RecursiveLinks-ld_gDZH4.js → RecursiveLinks-00zGWPf9.js} +20 -18
  14. package/dist/{Shape-Mr1eIp_G.js → Shape-BRzOzubn.js} +43 -37
  15. package/dist/Slicer-MID8pgT3.js +602 -0
  16. package/dist/{SparkTooltip-Czhz446b.js → SparkTooltip-DATI1fGZ.js} +7 -7
  17. package/dist/{Title-B2dA6-uH.js → Title-BGu6gEd2.js} +1 -1
  18. package/dist/{Tooltip-O_hCvqgF.js → Tooltip-Bh2zYSoM.js} +23 -19
  19. package/dist/{UserOptions-Bk03FRqW.js → UserOptions-Ck8fz9f4.js} +2 -2
  20. package/dist/{dom-to-png-Bt5F9TXw.js → dom-to-png-DhIh24Ti.js} +1 -1
  21. package/dist/{img-C_9wps3s.js → img-DrR839Ot.js} +1 -1
  22. package/dist/{index-CgShIRes.js → index-BtNwOUja.js} +2885 -2010
  23. package/dist/{pdf-CXdbjyRJ.js → pdf-DoShrdT5.js} +1 -1
  24. package/dist/style.css +1 -1
  25. package/dist/types/vue-data-ui.d.cts +753 -65
  26. package/dist/types/vue-data-ui.d.ts +753 -65
  27. package/dist/useAutoSizeLabelsInsideViewbox-FmDQyX4z.js +81 -0
  28. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  29. package/dist/useLoading-D7YHNtLX.js +29 -0
  30. package/dist/useNestedProp-f2H3m6Yj.js +13 -0
  31. package/dist/usePanZoom-BVca3eMk.js +122 -0
  32. package/dist/{usePrinter-rIrqBbbm.js → usePrinter-DUNjpQNe.js} +2 -2
  33. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  34. package/dist/{useTimeLabels-DG97x2hL.js → useTimeLabels-DkzmKfZn.js} +208 -156
  35. package/dist/{vue-data-ui-DiwfJSwC.js → vue-data-ui-D7QVxNhO.js} +105 -100
  36. package/dist/vue-data-ui.js +26 -25
  37. package/dist/vue-ui-3d-bar-ITaF-6Kn.js +1323 -0
  38. package/dist/{vue-ui-accordion-hlzscmAS.js → vue-ui-accordion-BKUrAowe.js} +3 -3
  39. package/dist/vue-ui-age-pyramid-DxsuDr6o.js +835 -0
  40. package/dist/{vue-ui-annotator-BHwBUNRO.js → vue-ui-annotator-B06QtxgJ.js} +12 -12
  41. package/dist/vue-ui-bullet-B7Fy45tA.js +571 -0
  42. package/dist/vue-ui-candlestick-Dw0U4uIQ.js +1000 -0
  43. package/dist/{vue-ui-carousel-table-6MTDYf-H.js → vue-ui-carousel-table-DGz0nw28.js} +29 -29
  44. package/dist/{vue-ui-chestnut-Cr6dK21e.js → vue-ui-chestnut-CFfKYm9i.js} +664 -536
  45. package/dist/vue-ui-chord-EhlQhMSs.js +1038 -0
  46. package/dist/vue-ui-circle-pack-BHrrEUUd.js +709 -0
  47. package/dist/{vue-ui-cursor-Ch5yUxNn.js → vue-ui-cursor-Dd-HtWzG.js} +2 -2
  48. package/dist/{vue-ui-dashboard-tVZ9aEHo.js → vue-ui-dashboard-6R8udDY3.js} +64 -64
  49. package/dist/{vue-ui-digits-BOlYLluF.js → vue-ui-digits-zKn3uhGN.js} +2 -2
  50. package/dist/{vue-ui-donut-BKwAnTKA.js → vue-ui-donut-BtnIwS_E.js} +431 -422
  51. package/dist/vue-ui-donut-evolution-DHo1MuMM.js +1076 -0
  52. package/dist/vue-ui-dumbbell-Czi9r9Na.js +1120 -0
  53. package/dist/vue-ui-flow-jOfM0RZY.js +841 -0
  54. package/dist/{vue-ui-funnel-CAV6A--C.js → vue-ui-funnel-tBvVpdhy.js} +16 -16
  55. package/dist/vue-ui-galaxy-IdoY2oqG.js +680 -0
  56. package/dist/vue-ui-gauge-DR6Xm_Hz.js +791 -0
  57. package/dist/vue-ui-gizmo-Dto73UsB.js +210 -0
  58. package/dist/vue-ui-heatmap-zmFv-0z1.js +1078 -0
  59. package/dist/vue-ui-history-plot-ILemyyYw.js +1074 -0
  60. package/dist/{vue-ui-kpi-DjHXc1Z9.js → vue-ui-kpi-hmqSCvxr.js} +26 -26
  61. package/dist/{vue-ui-mini-loader-C68r9wbr.js → vue-ui-mini-loader-CbD-E8ci.js} +2 -2
  62. package/dist/vue-ui-molecule-mTy6YIm6.js +656 -0
  63. package/dist/vue-ui-mood-radar-BEnSYV3Q.js +785 -0
  64. package/dist/vue-ui-nested-donuts-CGE9dmJK.js +1284 -0
  65. package/dist/vue-ui-onion-Dh2J9GV0.js +776 -0
  66. package/dist/vue-ui-parallel-coordinate-plot-xsgmMIJK.js +916 -0
  67. package/dist/{vue-ui-quadrant-ULvVhjjq.js → vue-ui-quadrant-DA0Kw6eq.js} +512 -459
  68. package/dist/vue-ui-quick-chart-DKbxF5Yt.js +1762 -0
  69. package/dist/vue-ui-radar-BFY9bN_h.js +796 -0
  70. package/dist/{vue-ui-rating-CkdVnYpj.js → vue-ui-rating-Bh35aujf.js} +2 -2
  71. package/dist/vue-ui-relation-circle-B-05kQ_l.js +598 -0
  72. package/dist/vue-ui-ridgeline-CuGfF83t.js +1157 -0
  73. package/dist/vue-ui-rings-DrQXXzAM.js +728 -0
  74. package/dist/vue-ui-scatter-CWn9c7e9.js +1178 -0
  75. package/dist/{vue-ui-skeleton-BsBaCvoE.js → vue-ui-skeleton-oG4Bm5nL.js} +13 -13
  76. package/dist/{vue-ui-smiley-B2sBY2Q-.js → vue-ui-smiley-Cnwba_gV.js} +46 -46
  77. package/dist/vue-ui-spark-trend-D9iNCf4o.js +315 -0
  78. package/dist/vue-ui-sparkbar-iJkiubZC.js +351 -0
  79. package/dist/vue-ui-sparkgauge-BH3uA5rh.js +232 -0
  80. package/dist/vue-ui-sparkhistogram-B3kR62pf.js +380 -0
  81. package/dist/vue-ui-sparkline-DczR2ZAf.js +513 -0
  82. package/dist/vue-ui-sparkstackbar-Cg0ItRGH.js +421 -0
  83. package/dist/vue-ui-stackbar-d4PrzcGS.js +1371 -0
  84. package/dist/vue-ui-strip-plot-BXBpN5rl.js +916 -0
  85. package/dist/{vue-ui-table-DaE8lQuo.js → vue-ui-table-BXOLZXuz.js} +17 -17
  86. package/dist/{vue-ui-table-heatmap--dSEG8cU.js → vue-ui-table-heatmap-7YT7VF2H.js} +5 -5
  87. package/dist/{vue-ui-table-sparkline-D4DkGvDP.js → vue-ui-table-sparkline-BfgqajJ2.js} +19 -16
  88. package/dist/vue-ui-thermometer-C7Tg6HLz.js +541 -0
  89. package/dist/{vue-ui-timer-CYXTAh6x.js → vue-ui-timer-Ch5JP1pQ.js} +5 -5
  90. package/dist/vue-ui-tiremarks-fY-4pWAK.js +406 -0
  91. package/dist/vue-ui-treemap-DTSX6suB.js +1035 -0
  92. package/dist/{vue-ui-vertical-bar-CO9eR1ty.js → vue-ui-vertical-bar-C-i2dRnU.js} +104 -102
  93. package/dist/vue-ui-waffle-BbgLlhGH.js +910 -0
  94. package/dist/vue-ui-wheel-waZf462K.js +379 -0
  95. package/dist/vue-ui-word-cloud-DtLK91Dk.js +765 -0
  96. package/dist/{vue-ui-world-P45Plcqw.js → vue-ui-world-Cx4uuwTY.js} +364 -327
  97. package/dist/vue-ui-xy-DDOT8cyx.js +3808 -0
  98. package/dist/{vue-ui-xy-canvas-DgNBgUak.js → vue-ui-xy-canvas-CUCsC8vD.js} +265 -264
  99. package/package.json +4 -4
  100. package/dist/RecursiveLabels-NTMB9w5C.js +0 -49
  101. package/dist/Slicer-3t0HimeE.js +0 -577
  102. package/dist/useLoading-Bt5Doa8m.js +0 -28
  103. package/dist/useNestedProp-BC4Ciblw.js +0 -13
  104. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  105. package/dist/vue-ui-3d-bar-BqmzX9u4.js +0 -1227
  106. package/dist/vue-ui-age-pyramid-eRPt0BJb.js +0 -746
  107. package/dist/vue-ui-bullet-BSnF2gql.js +0 -513
  108. package/dist/vue-ui-candlestick-kMbNnoYe.js +0 -873
  109. package/dist/vue-ui-chord-Dxy_bfIE.js +0 -949
  110. package/dist/vue-ui-circle-pack-I_p4FPiW.js +0 -673
  111. package/dist/vue-ui-donut-evolution-DQhZJ4Sa.js +0 -903
  112. package/dist/vue-ui-dumbbell-DdN-7b3g.js +0 -753
  113. package/dist/vue-ui-flow-MvORTthN.js +0 -765
  114. package/dist/vue-ui-galaxy-B0PLMAn8.js +0 -617
  115. package/dist/vue-ui-gauge-C4FTzDFt.js +0 -738
  116. package/dist/vue-ui-gizmo-Dl5FHFb4.js +0 -192
  117. package/dist/vue-ui-heatmap-C3dee43W.js +0 -877
  118. package/dist/vue-ui-history-plot-dqv4u1Oa.js +0 -924
  119. package/dist/vue-ui-molecule-DtRAlfhC.js +0 -597
  120. package/dist/vue-ui-mood-radar-BZj2G0zE.js +0 -670
  121. package/dist/vue-ui-nested-donuts-OqJTwMb2.js +0 -1212
  122. package/dist/vue-ui-onion-DXLokGec.js +0 -701
  123. package/dist/vue-ui-parallel-coordinate-plot-tg7QhtIE.js +0 -807
  124. package/dist/vue-ui-quick-chart-4EODniQ3.js +0 -1612
  125. package/dist/vue-ui-radar-Dt5p5oSy.js +0 -741
  126. package/dist/vue-ui-relation-circle-_SysXj9T.js +0 -542
  127. package/dist/vue-ui-ridgeline-Cs5UihNN.js +0 -969
  128. package/dist/vue-ui-rings-Duay-EmS.js +0 -685
  129. package/dist/vue-ui-scatter-C6oGQcbL.js +0 -1045
  130. package/dist/vue-ui-spark-trend-CEAqGu3d.js +0 -291
  131. package/dist/vue-ui-sparkbar-ByPUDc6x.js +0 -301
  132. package/dist/vue-ui-sparkgauge-C-GKwevJ.js +0 -201
  133. package/dist/vue-ui-sparkhistogram-Dz0DdaVW.js +0 -313
  134. package/dist/vue-ui-sparkline-BULntz_U.js +0 -459
  135. package/dist/vue-ui-sparkstackbar-DXjHOeeU.js +0 -381
  136. package/dist/vue-ui-stackbar-CeP9n7zy.js +0 -1207
  137. package/dist/vue-ui-strip-plot-CaFQkWV8.js +0 -761
  138. package/dist/vue-ui-thermometer-BXf14CYH.js +0 -495
  139. package/dist/vue-ui-tiremarks-D6hJ1cd4.js +0 -358
  140. package/dist/vue-ui-treemap-tBurCrdn.js +0 -965
  141. package/dist/vue-ui-waffle-BNzs_BxY.js +0 -863
  142. package/dist/vue-ui-wheel-tydUATi8.js +0 -352
  143. package/dist/vue-ui-word-cloud-DUUc_tj6.js +0 -659
  144. package/dist/vue-ui-xy--HToGdle.js +0 -2982
@@ -1,903 +0,0 @@
1
- import { defineAsyncComponent as T, computed as m, ref as h, onMounted as Ct, watch as Xe, createElementBlock as n, openBlock as o, unref as r, normalizeStyle as te, normalizeClass as F, createBlock as P, createCommentVNode as c, renderSlot as A, createSlots as _t, withCtx as w, normalizeProps as Y, guardReactiveProps as q, createVNode as wt, createElementVNode as S, Fragment as z, renderList as I, toDisplayString as p, createTextVNode as Ge, nextTick as J } from "vue";
2
- import { u as St, o as Lt, e as le, g as $t, c as We, t as At, p as ae, a as zt, C as je, b as It, d as de, G as Nt, D as Ye, m as he, X as Pt, s as K, H as Ft, i as ye, f as oe, I as Dt, j as Ot, k as Tt, n as qe, q as Et, r as Vt, J as Je, K as Ht } from "./index-CgShIRes.js";
3
- import { u as Rt } from "./useChartAccessibility-9icAAmYg.js";
4
- import { u as Ke } from "./useNestedProp-BC4Ciblw.js";
5
- import { u as Mt } from "./usePrinter-rIrqBbbm.js";
6
- import { u as Ut } from "./useTimeLabels-DG97x2hL.js";
7
- import { u as Bt } from "./useUserOptionState-BIvW1Kz7.js";
8
- import Xt from "./Legend-BZ06qU55.js";
9
- import { S as Gt } from "./Slicer-3t0HimeE.js";
10
- import Wt from "./Title-B2dA6-uH.js";
11
- import jt from "./img-C_9wps3s.js";
12
- import { _ as Yt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
- const qt = ["id"], Jt = ["xmlns", "viewBox"], Kt = ["x", "y", "width", "height"], Qt = ["id"], Zt = ["stop-color"], el = ["stop-color"], tl = ["id"], ll = ["stop-color"], al = ["stop-color"], ol = ["stop-color"], ul = { key: 1 }, nl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], sl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], rl = { key: 0 }, il = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], cl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], vl = ["x", "y", "font-size", "fill", "font-weight"], dl = {
14
- key: 3,
15
- class: /* @__PURE__ */ F({ "donut-opacity": !0 })
16
- }, hl = { key: 0 }, yl = ["text-anchor", "font-size", "fill", "transform"], gl = ["text-anchor", "font-size", "fill", "transform", "innerHTML"], fl = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], ml = { key: 1 }, bl = ["cx", "cy", "r", "fill"], pl = { key: 0 }, xl = { key: 0 }, kl = ["d", "stroke"], Cl = ["text-anchor", "x", "y", "fill"], _l = ["cx", "cy", "r", "fill"], wl = { key: 0 }, Sl = ["cx", "cy", "fill"], Ll = { key: 1 }, $l = ["d", "fill", "stroke"], Al = { key: 2 }, zl = ["d", "fill", "stroke"], Il = ["x", "y", "font-size", "fill"], Nl = ["x", "y", "width", "height", "fill"], Pl = ["x", "y", "width", "height", "onMouseenter", "onClick"], Fl = {
17
- key: 5,
18
- class: "vue-data-ui-watermark"
19
- }, Dl = ["onClick"], Ol = {
20
- key: 9,
21
- ref: "source",
22
- dir: "auto"
23
- }, Tl = { key: 0 }, El = { key: 1 }, Vl = {
24
- __name: "vue-ui-donut-evolution",
25
- props: {
26
- config: {
27
- type: Object,
28
- default() {
29
- return {};
30
- }
31
- },
32
- dataset: {
33
- type: Array,
34
- default() {
35
- return [];
36
- }
37
- }
38
- },
39
- emits: ["selectLegend"],
40
- setup(Qe, { expose: Ze, emit: et }) {
41
- const tt = T(() => import("./vue-ui-accordion-hlzscmAS.js")), lt = T(() => import("./BaseDraggableDialog-CA8QOk7L.js")), at = T(() => import("./DataTable--paavNqF.js")), ot = T(() => import("./PackageVersion-2QvaZf9_.js")), ut = T(() => import("./PenAndPaper-hGgW0EHz.js")), nt = T(() => import("./vue-ui-skeleton-BsBaCvoE.js")), st = T(() => import("./UserOptions-Bk03FRqW.js")), rt = T(() => import("./vue-ui-donut-BKwAnTKA.js")), { vue_ui_donut_evolution: it } = St(), b = Qe, Q = m(() => !!b.dataset && b.dataset.length), y = h({
42
- start: 0,
43
- end: Math.max(...b.dataset.map((t) => t.values.length))
44
- });
45
- function ge() {
46
- fe();
47
- }
48
- const V = h(null);
49
- async function fe() {
50
- (e.value.style.chart.zoom.startIndex !== null || e.value.style.chart.zoom.endIndex !== null) && V.value ? (e.value.style.chart.zoom.startIndex !== null && (await J(), await J(), V.value && V.value.setStartValue(e.value.style.chart.zoom.startIndex)), e.value.style.chart.zoom.endIndex !== null && (await J(), await J(), V.value && V.value.setEndValue(ct(e.value.style.chart.zoom.endIndex + 1)))) : (y.value = {
51
- start: 0,
52
- end: O.value
53
- }, pe.value += 1);
54
- }
55
- function ct(t) {
56
- const a = O.value;
57
- 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;
58
- }
59
- Ct(() => {
60
- me();
61
- });
62
- function me() {
63
- Lt(b.dataset) ? le({
64
- componentName: "VueUiDonutEvolution",
65
- type: "dataset"
66
- }) : b.dataset.length && b.dataset.forEach((t, a) => {
67
- $t({
68
- datasetObject: t,
69
- requiredAttributes: ["name", "values"]
70
- }).forEach((l) => {
71
- le({
72
- componentName: "VueUiDonutEvolution",
73
- type: "datasetSerieAttribute",
74
- property: l,
75
- index: a
76
- });
77
- });
78
- }), fe();
79
- }
80
- const H = h(We()), k = h([]), g = h(null), Z = h(null), ue = h(!1), E = h(null), R = h(null), vt = h(null), be = h(0), pe = h(0), xe = h(0), ke = h(0), Ce = h(0), _e = et, e = m({
81
- get: () => $e(),
82
- set: (t) => t
83
- }), { userOptionsVisible: ne, setUserOptionsVisibility: we, keepUserOptionState: Se } = Bt({ config: e.value }), { svgRef: Le } = Rt({ config: e.value.style.chart.title });
84
- function $e() {
85
- const t = Ke({
86
- userConfig: b.config,
87
- defaultConfig: it
88
- });
89
- let a = {};
90
- return t.theme ? a = {
91
- ...Ke({
92
- userConfig: zt.vue_ui_donut_evolution[t.theme] || b.config,
93
- defaultConfig: t
94
- }),
95
- customPalette: At[t.theme] || ae
96
- } : a = t, b.config && je(b.config, "style.chart.zoom.startIndex") ? a.style.chart.zoom.startIndex = b.config.style.chart.zoom.startIndex : a.style.chart.zoom.startIndex = null, b.config && je(b.config, "style.chart.zoom.endIndex") ? a.style.chart.zoom.endIndex = b.config.style.chart.zoom.endIndex : a.style.chart.zoom.endIndex = null, a;
97
- }
98
- Xe(() => b.config, (t) => {
99
- e.value = $e(), ne.value = !e.value.userOptions.showOnChartHover, me(), xe.value += 1, ke.value += 1, Ce.value += 1, G.value.showTable = e.value.table.show;
100
- }, { deep: !0 }), Xe(() => b.dataset, (t) => {
101
- ge();
102
- }, { deep: !0 });
103
- const { isPrinting: Ae, isImaging: ze, generatePdf: Ie, generateImage: Ne } = Mt({
104
- elementId: H.value,
105
- fileName: e.value.style.chart.title.text || "vue-ui-donut-evolution",
106
- options: e.value.userOptions.print
107
- }), dt = m(() => e.value.userOptions.show && !e.value.style.chart.title.text), ht = m(() => It(e.value.customPalette)), G = h({
108
- showTable: e.value.table.show
109
- }), i = m(() => ({
110
- top: e.value.style.chart.layout.padding.top,
111
- right: e.value.style.chart.layout.padding.right,
112
- bottom: e.value.style.chart.layout.padding.bottom,
113
- left: e.value.style.chart.layout.padding.left
114
- })), v = m(() => {
115
- const t = e.value.style.chart.layout.height, a = e.value.style.chart.layout.width, l = t - i.value.top - i.value.bottom, s = a - i.value.left - i.value.right;
116
- return {
117
- absoluteHeight: t,
118
- absoluteWidth: a,
119
- centerX: i.value.left + s / 2,
120
- centerY: i.value.top + l / 2,
121
- height: l,
122
- width: s
123
- };
124
- }), D = m(() => (b.dataset.forEach((t, a) => {
125
- [null, void 0].includes(t.name) && le({
126
- componentName: "VueUiDonutEvolution",
127
- type: "datasetSerieAttribute",
128
- property: "name",
129
- index: a
130
- }), [null, void 0].includes(t.values) && le({
131
- componentName: "VueUiDonutEvolution",
132
- type: "datasetSerieAttribute",
133
- property: "values",
134
- index: a
135
- });
136
- }), b.dataset.map((t, a) => ({
137
- ...t,
138
- values: Nt(t.values),
139
- color: de(t.color) || ht.value[a] || ae[a] || ae[a % ae.length],
140
- length: (t.values || []).length,
141
- uid: We()
142
- })))), W = m(() => D.value.filter((t) => !k.value.includes(t.uid)).map((t) => ({
143
- ...t,
144
- values: t.values.filter((a, l) => l >= y.value.start && l <= y.value.end)
145
- }))), O = m(() => Math.max(...W.value.map((t) => t.length))), L = m(() => Ut({
146
- values: e.value.style.chart.layout.grid.xAxis.dataLabels.values,
147
- maxDatapoints: O.value,
148
- formatter: e.value.style.chart.layout.grid.xAxis.dataLabels.datetimeFormatter,
149
- start: y.value.start,
150
- end: y.value.end
151
- })), x = m(() => v.value.width / (y.value.end - y.value.start)), C = m(() => {
152
- const t = [];
153
- for (let u = 0; u < y.value.end - y.value.start; u += 1) {
154
- const f = W.value.map((N) => N.values[u] ?? null), d = f.filter((N) => [void 0, null].includes(N)).length === f.length, _ = f.reduce((N, $) => N + $, 0), ve = f.map((N) => N / _), X = i.value.left + x.value * u + x.value / 2;
155
- t.push({
156
- index: u,
157
- percentages: ve,
158
- subtotal: d || _ < 0 ? null : _,
159
- values: f,
160
- x: X
161
- });
162
- }
163
- const a = 0, l = Math.max(...t.map((u) => u.subtotal)), s = t.length === 1 ? l * 2 : l;
164
- return t.map((u, f) => {
165
- const d = x.value / 2 * 0.7, _ = d > v.value.width / 16 ? v.value.width / 16 : d, ve = g.value === u.index ? v.value.width / 16 : _, X = t.length > 4 ? d * 2 : d * 2 > x.value / 2 * 0.7 ? x.value / 2 * 0.7 : d * 2, N = v.value.absoluteHeight - i.value.bottom - v.value.height * u.subtotal / Ye(a, s, e.value.style.chart.layout.grid.yAxis.dataLabels.steps).max;
166
- return {
167
- ...u,
168
- y: N,
169
- radius: _,
170
- activeRadius: ve,
171
- hoverRadius: X,
172
- donut: he({
173
- series: W.value.map(($, Be) => ({
174
- color: $.color,
175
- name: $.name,
176
- value: $.values[f] ?? 0
177
- }))
178
- }, u.x, N, _, _, 1.99999, 2, 1, 360, 105.25, _ / 2),
179
- donutHover: he({
180
- series: W.value.map(($, Be) => ({
181
- color: $.color,
182
- name: $.name,
183
- value: $.values[f] ?? 0
184
- }))
185
- }, u.x, N, X, X, 1.99999, 2, 1, 360, 105.25, X / 2),
186
- donutFocus: he({
187
- series: W.value.map(($, Be) => ({
188
- color: $.color,
189
- name: $.name,
190
- value: $.values[f] ?? 0
191
- }))
192
- }, 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)
193
- };
194
- });
195
- });
196
- function Pe(t, a, l) {
197
- return ye(
198
- e.value.style.chart.layout.dataLabels.formatter,
199
- t,
200
- oe({
201
- p: e.value.style.chart.layout.dataLabels.prefix,
202
- v: t,
203
- s: e.value.style.chart.layout.dataLabels.suffix,
204
- r: e.value.style.chart.layout.dataLabels.rounding
205
- }),
206
- { datapoint: a, index: l }
207
- );
208
- }
209
- const se = m(() => ({
210
- max: Math.max(...C.value.map((t) => t.subtotal)),
211
- min: 0
212
- })), M = m(() => {
213
- const t = C.value.length === 1 ? se.value.max * 2 : se.value.max;
214
- return Ye(se.value.min, t, e.value.style.chart.layout.grid.yAxis.dataLabels.steps);
215
- });
216
- function yt(t) {
217
- return t / M.value.max;
218
- }
219
- const gt = m(() => M.value.ticks.map((t) => ({
220
- y: v.value.absoluteHeight - i.value.bottom - v.value.height * yt(t),
221
- value: t
222
- })));
223
- function ft(t, a) {
224
- return isNaN(t.value / Je(a, "value")) ? 0 : (t.value / Je(a, "value") * 100).toFixed(0) + "%";
225
- }
226
- function Fe() {
227
- g.value = null, Z.value = null;
228
- }
229
- function mt(t) {
230
- g.value = t.index, Z.value = t;
231
- }
232
- const j = h(null);
233
- function De(t, a) {
234
- !t.subtotal || !e.value.style.chart.dialog.show || (Z.value = null, g.value = null, ue.value = !0, E.value = t, xt(t), [null, void 0].includes(a) || (j.value = a));
235
- }
236
- const Oe = m(() => D.value.map((t, a) => ({
237
- name: t.name,
238
- value: t.values.slice(y.value.start, y.value.end).reduce((l, s) => l + s, 0),
239
- shape: "circle",
240
- uid: t.uid,
241
- color: t.color
242
- })).sort((t, a) => a.value - t.value).map((t) => ({
243
- ...t,
244
- opacity: k.value.includes(t.uid) ? 0.5 : 1,
245
- segregate: () => re(t.uid),
246
- isSegregated: k.value.includes(t.uid)
247
- }))), Te = m(() => C.value.map((t) => t.subtotal).reduce((t, a) => t + a, 0)), bt = m(() => ({
248
- cy: "donut-div-legend",
249
- backgroundColor: e.value.style.chart.legend.backgroundColor,
250
- color: e.value.style.chart.legend.color,
251
- fontSize: e.value.style.chart.legend.fontSize,
252
- paddingBottom: 12,
253
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
254
- }));
255
- function re(t) {
256
- if (k.value.includes(t))
257
- k.value = k.value.filter((a) => a !== t), _e("selectLegend", null);
258
- else {
259
- if (k.value.length === D.value.length - 1) return;
260
- k.value.push(t), _e("selectLegend", D.value.find((a) => a.uid === t));
261
- }
262
- E.value && De(C.value.find((a, l) => l === j.value));
263
- }
264
- const U = m(() => {
265
- const t = [""].concat(D.value.filter((u) => !k.value.includes(u.uid)).map((u) => ({
266
- name: u.name,
267
- color: u.color
268
- }))).concat(["Σ"]);
269
- let a = [];
270
- for (let u = 0; u < O.value; u += 1) {
271
- const f = D.value.filter((d) => !k.value.includes(d.uid)).map((d) => d.values[u] ?? 0).reduce((d, _) => d + _, 0);
272
- a.push([L[u] ? L[u].text : "-"].concat(D.value.filter((d) => !k.value.includes(d.uid)).map((d) => ({
273
- value: d.values[u] ?? 0,
274
- percentage: d.values[u] ? d.values[u] / f * 100 : 0
275
- }))).concat([`${e.value.style.chart.layout.dataLabels.prefix}${Number(f.toFixed(e.value.table.td.roundingValue))}${e.value.style.chart.layout.dataLabels.suffix}`]));
276
- }
277
- const l = {
278
- th: {
279
- backgroundColor: e.value.table.th.backgroundColor,
280
- color: e.value.table.th.color,
281
- outline: e.value.table.th.outline
282
- },
283
- td: {
284
- backgroundColor: e.value.table.td.backgroundColor,
285
- color: e.value.table.td.color,
286
- outline: e.value.table.td.outline
287
- },
288
- breakpoint: e.value.table.responsiveBreakpoint
289
- }, s = [
290
- e.value.table.columnNames.period
291
- ].concat(D.value.filter((u) => !k.value.includes(u.uid)).map((u) => u.name)).concat(e.value.table.columnNames.total);
292
- return { head: t, body: a, config: l, colNames: s };
293
- });
294
- function pt() {
295
- return D.value;
296
- }
297
- function Ee(t = null) {
298
- J(() => {
299
- const a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], l = [...U.value.head.map((d) => d.name ?? d)], s = [...U.value.body.map((d) => d.map((_) => _.value ?? _))], u = a.concat([l]).concat(s), f = Et(u);
300
- t ? t(f) : Vt({ csvContent: f, title: e.value.style.chart.title.text || "vue-ui-donut-evolution" });
301
- });
302
- }
303
- const B = h(!1);
304
- function Ve(t) {
305
- B.value = t, be.value += 1;
306
- }
307
- function He() {
308
- G.value.showTable = !G.value.showTable;
309
- }
310
- const ee = h(!1);
311
- function ie() {
312
- ee.value = !ee.value;
313
- }
314
- function Re(t) {
315
- return t.proportion * 100 > e.value.style.chart.donuts.hover.hideLabelsUnderValue;
316
- }
317
- const Me = h([]), Ue = h({}), ce = h(null);
318
- function xt(t) {
319
- Me.value = t.donut.map((a) => ({
320
- name: a.name,
321
- values: [a.value],
322
- color: a.color
323
- })), Ue.value = Ht({
324
- ...e.value.style.chart.dialog.donutChart,
325
- responsive: !0,
326
- theme: e.value.theme
327
- }), ce.value && ce.value.open();
328
- }
329
- async function kt({ scale: t = 2 } = {}) {
330
- if (!R.value) return;
331
- const { width: a, height: l } = R.value.getBoundingClientRect(), s = a / l, { imageUri: u, base64: f } = await jt({ domElement: R.value, base64: !0, img: !0, scale: t });
332
- return {
333
- imageUri: u,
334
- base64: f,
335
- title: e.value.style.chart.title.text,
336
- width: a,
337
- height: l,
338
- aspectRatio: s
339
- };
340
- }
341
- return Ze({
342
- getData: pt,
343
- getImage: kt,
344
- generatePdf: Ie,
345
- generateCsv: Ee,
346
- generateImage: Ne,
347
- toggleTable: He,
348
- toggleAnnotator: ie,
349
- toggleFullscreen: Ve
350
- }), (t, a) => (o(), n("div", {
351
- ref_key: "donutEvolutionChart",
352
- ref: R,
353
- class: F(`vue-ui-donut-evolution ${B.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
354
- style: te(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
355
- id: H.value,
356
- onMouseenter: a[5] || (a[5] = () => r(we)(!0)),
357
- onMouseleave: a[6] || (a[6] = () => r(we)(!1))
358
- }, [
359
- e.value.userOptions.buttons.annotator ? (o(), P(r(ut), {
360
- key: 0,
361
- svgRef: r(Le),
362
- backgroundColor: e.value.style.chart.backgroundColor,
363
- color: e.value.style.chart.color,
364
- active: ee.value,
365
- onClose: ie
366
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : c("", !0),
367
- dt.value ? (o(), n("div", {
368
- key: 1,
369
- ref_key: "noTitle",
370
- ref: vt,
371
- class: "vue-data-ui-no-title-space",
372
- style: "height:36px; width: 100%;background:transparent"
373
- }, null, 512)) : c("", !0),
374
- e.value.style.chart.title.text ? (o(), n("div", {
375
- key: 2,
376
- style: "width:100%;background:transparent;padding-bottom:24px",
377
- onMouseleave: Fe
378
- }, [
379
- (o(), P(Wt, {
380
- key: `title_${xe.value}`,
381
- config: {
382
- title: {
383
- cy: "donut-evolution-div-title",
384
- ...e.value.style.chart.title
385
- },
386
- subtitle: {
387
- cy: "donut-evolution-div-subtitle",
388
- ...e.value.style.chart.title.subtitle
389
- }
390
- }
391
- }, null, 8, ["config"]))
392
- ], 32)) : c("", !0),
393
- e.value.userOptions.show && Q.value && (r(Se) || r(ne)) ? (o(), P(r(st), {
394
- ref: "details",
395
- key: `user_options_${be.value}`,
396
- backgroundColor: e.value.style.chart.backgroundColor,
397
- color: e.value.style.chart.color,
398
- isPrinting: r(Ae),
399
- isImaging: r(ze),
400
- uid: H.value,
401
- hasPdf: e.value.userOptions.buttons.pdf,
402
- hasImg: e.value.userOptions.buttons.img,
403
- hasXls: e.value.userOptions.buttons.csv,
404
- hasTable: e.value.userOptions.buttons.table,
405
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
406
- isFullscreen: B.value,
407
- titles: { ...e.value.userOptions.buttonTitles },
408
- chartElement: R.value,
409
- position: e.value.userOptions.position,
410
- hasAnnotator: e.value.userOptions.buttons.annotator,
411
- isAnnotation: ee.value,
412
- callbacks: e.value.userOptions.callbacks,
413
- printScale: e.value.userOptions.print.scale,
414
- onToggleFullscreen: Ve,
415
- onGeneratePdf: r(Ie),
416
- onGenerateCsv: Ee,
417
- onGenerateImage: r(Ne),
418
- onToggleTable: He,
419
- onToggleAnnotator: ie,
420
- style: te({
421
- visibility: r(Se) ? r(ne) ? "visible" : "hidden" : "visible"
422
- })
423
- }, _t({ _: 2 }, [
424
- t.$slots.menuIcon ? {
425
- name: "menuIcon",
426
- fn: w(({ isOpen: l, color: s }) => [
427
- A(t.$slots, "menuIcon", Y(q({ isOpen: l, color: s })), void 0, !0)
428
- ]),
429
- key: "0"
430
- } : void 0,
431
- t.$slots.optionPdf ? {
432
- name: "optionPdf",
433
- fn: w(() => [
434
- A(t.$slots, "optionPdf", {}, void 0, !0)
435
- ]),
436
- key: "1"
437
- } : void 0,
438
- t.$slots.optionCsv ? {
439
- name: "optionCsv",
440
- fn: w(() => [
441
- A(t.$slots, "optionCsv", {}, void 0, !0)
442
- ]),
443
- key: "2"
444
- } : void 0,
445
- t.$slots.optionImg ? {
446
- name: "optionImg",
447
- fn: w(() => [
448
- A(t.$slots, "optionImg", {}, void 0, !0)
449
- ]),
450
- key: "3"
451
- } : void 0,
452
- t.$slots.optionTable ? {
453
- name: "optionTable",
454
- fn: w(() => [
455
- A(t.$slots, "optionTable", {}, void 0, !0)
456
- ]),
457
- key: "4"
458
- } : void 0,
459
- t.$slots.optionFullscreen ? {
460
- name: "optionFullscreen",
461
- fn: w(({ toggleFullscreen: l, isFullscreen: s }) => [
462
- A(t.$slots, "optionFullscreen", Y(q({ toggleFullscreen: l, isFullscreen: s })), void 0, !0)
463
- ]),
464
- key: "5"
465
- } : void 0,
466
- t.$slots.optionAnnotator ? {
467
- name: "optionAnnotator",
468
- fn: w(({ toggleAnnotator: l, isAnnotator: s }) => [
469
- A(t.$slots, "optionAnnotator", Y(q({ toggleAnnotator: l, isAnnotator: s })), void 0, !0)
470
- ]),
471
- key: "6"
472
- } : void 0
473
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : c("", !0),
474
- Q.value ? (o(), n("svg", {
475
- key: 4,
476
- ref_key: "svgRef",
477
- ref: Le,
478
- xmlns: r(Pt),
479
- class: F({ "vue-data-ui-fullscreen--on": B.value, "vue-data-ui-fulscreen--off": !B.value }),
480
- viewBox: `0 0 ${v.value.absoluteWidth} ${v.value.absoluteHeight}`,
481
- style: te(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};`)
482
- }, [
483
- wt(r(ot)),
484
- t.$slots["chart-background"] ? (o(), n("foreignObject", {
485
- key: 0,
486
- x: i.value.left,
487
- y: i.value.top,
488
- width: v.value.width,
489
- height: v.value.height,
490
- style: {
491
- pointerEvents: "none"
492
- }
493
- }, [
494
- A(t.$slots, "chart-background", {}, void 0, !0)
495
- ], 8, Kt)) : c("", !0),
496
- S("defs", null, [
497
- S("linearGradient", {
498
- id: `hover_${H.value}`,
499
- x1: "0%",
500
- y1: "0%",
501
- x2: "0%",
502
- y2: "100%"
503
- }, [
504
- S("stop", {
505
- offset: "0%",
506
- "stop-color": r(K)(e.value.style.chart.backgroundColor, e.value.style.chart.layout.highlighter.opacity)
507
- }, null, 8, Zt),
508
- S("stop", {
509
- offset: "100%",
510
- "stop-color": r(K)(e.value.style.chart.layout.highlighter.color, e.value.style.chart.layout.highlighter.opacity)
511
- }, null, 8, el)
512
- ], 8, Qt),
513
- S("radialGradient", {
514
- id: `focus_${H.value}`
515
- }, [
516
- S("stop", {
517
- offset: "0%",
518
- "stop-color": r(K)(r(de)(e.value.style.chart.backgroundColor), 0)
519
- }, null, 8, ll),
520
- S("stop", {
521
- offset: "77%",
522
- "stop-color": r(K)("#FFFFFF", 30)
523
- }, null, 8, al),
524
- S("stop", {
525
- offset: "100%",
526
- "stop-color": r(K)(r(de)(e.value.style.chart.backgroundColor), 0)
527
- }, null, 8, ol)
528
- ], 8, tl)
529
- ]),
530
- e.value.style.chart.layout.grid.show ? (o(), n("g", ul, [
531
- S("line", {
532
- x1: i.value.left,
533
- x2: i.value.left,
534
- y1: i.value.top,
535
- y2: i.value.top + v.value.height,
536
- stroke: e.value.style.chart.layout.grid.stroke,
537
- "stroke-width": e.value.style.chart.layout.grid.strokeWidth,
538
- "stroke-linecap": "round"
539
- }, null, 8, nl),
540
- S("line", {
541
- x1: i.value.left,
542
- x2: v.value.absoluteWidth - i.value.right,
543
- y1: v.value.absoluteHeight - i.value.bottom,
544
- y2: v.value.absoluteHeight - i.value.bottom,
545
- stroke: e.value.style.chart.layout.grid.stroke,
546
- "stroke-width": e.value.style.chart.layout.grid.strokeWidth,
547
- "stroke-linecap": "round"
548
- }, null, 8, sl),
549
- e.value.style.chart.layout.grid.showVerticalLines ? (o(), n("g", rl, [
550
- (o(!0), n(z, null, I(y.value.end - y.value.start, (l, s) => (o(), n("line", {
551
- x1: i.value.left + (s + 1) * x.value,
552
- x2: i.value.left + (s + 1) * x.value,
553
- y1: i.value.top,
554
- y2: v.value.absoluteHeight - i.value.bottom,
555
- stroke: e.value.style.chart.layout.grid.stroke,
556
- "stroke-width": e.value.style.chart.layout.grid.strokeWidth,
557
- "stroke-linecap": "round"
558
- }, null, 8, il))), 256))
559
- ])) : c("", !0)
560
- ])) : c("", !0),
561
- e.value.style.chart.layout.grid.yAxis.dataLabels.show ? (o(), n("g", {
562
- key: 2,
563
- class: F({ "donut-opacity": !0, "donut-behind": g.value !== null })
564
- }, [
565
- (o(!0), n(z, null, I(gt.value, (l, s) => (o(), n("g", null, [
566
- l.value >= M.value.min && l.value <= M.value.max ? (o(), n("line", {
567
- key: 0,
568
- x1: i.value.left,
569
- x2: i.value.left - 5,
570
- y1: l.y,
571
- y2: l.y,
572
- stroke: e.value.style.chart.layout.grid.stroke,
573
- "stroke-width": e.value.style.chart.layout.grid.strokeWidth
574
- }, null, 8, cl)) : c("", !0),
575
- l.value >= M.value.min && l.value <= M.value.max ? (o(), n("text", {
576
- key: 1,
577
- x: i.value.left - 8 + e.value.style.chart.layout.grid.yAxis.dataLabels.offsetX,
578
- y: l.y + e.value.style.chart.layout.grid.yAxis.dataLabels.fontSize / 3,
579
- "font-size": e.value.style.chart.layout.grid.yAxis.dataLabels.fontSize,
580
- "text-anchor": "end",
581
- fill: e.value.style.chart.layout.grid.yAxis.dataLabels.color,
582
- "font-weight": e.value.style.chart.layout.grid.yAxis.dataLabels.bold ? "bold" : "normal"
583
- }, p(r(Ft)(l.value) ? r(ye)(
584
- e.value.style.chart.layout.dataLabels.formatter,
585
- l.value,
586
- r(oe)({
587
- p: e.value.style.chart.layout.dataLabels.prefix,
588
- v: l.value,
589
- s: e.value.style.chart.layout.dataLabels.suffix,
590
- r: e.value.style.chart.layout.grid.yAxis.dataLabels.roundingValue
591
- }),
592
- { datapoint: l, seriesIndex: s }
593
- ) : ""), 9, vl)) : c("", !0)
594
- ]))), 256))
595
- ], 2)) : c("", !0),
596
- e.value.style.chart.layout.grid.xAxis.dataLabels.show ? (o(), n("g", dl, [
597
- (o(!0), n(z, null, I(y.value.end - y.value.start, (l, s) => (o(), n("g", null, [
598
- (e.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast && (s === 0 || s === O.value - 1) || !e.value.style.chart.layout.grid.xAxis.dataLabels.showOnlyFirstAndLast) && L.value[s] && L.value[s].text ? (o(), n("g", hl, [
599
- String(L.value[s].text).includes(`
600
- `) ? (o(), n("text", {
601
- key: 1,
602
- "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",
603
- "font-size": e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
604
- fill: e.value.style.chart.layout.grid.xAxis.dataLabels.color,
605
- transform: `translate(${i.value.left + x.value * s + x.value / 2}, ${e.value.style.chart.layout.grid.xAxis.dataLabels.offsetY + v.value.absoluteHeight - i.value.bottom + e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize * 2}), rotate(${e.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`,
606
- innerHTML: r(Dt)({
607
- content: String(L.value[s].text),
608
- fontSize: e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
609
- fill: e.value.style.chart.layout.grid.xAxis.dataLabels.color,
610
- x: 0,
611
- y: 0
612
- })
613
- }, null, 8, gl)) : (o(), n("text", {
614
- key: 0,
615
- "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",
616
- "font-size": e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize,
617
- fill: e.value.style.chart.layout.grid.xAxis.dataLabels.color,
618
- transform: `translate(${i.value.left + x.value * s + x.value / 2}, ${e.value.style.chart.layout.grid.xAxis.dataLabels.offsetY + v.value.absoluteHeight - i.value.bottom + e.value.style.chart.layout.grid.xAxis.dataLabels.fontSize * 2}), rotate(${e.value.style.chart.layout.grid.xAxis.dataLabels.rotation})`
619
- }, p(L.value[s].text), 9, yl))
620
- ])) : c("", !0)
621
- ]))), 256))
622
- ])) : c("", !0),
623
- (o(!0), n(z, null, I(C.value, (l, s) => (o(), n("g", null, [
624
- e.value.style.chart.layout.line.show && s < C.value.length - 1 && ![l.subtotal, C.value[s + 1].subtotal].includes(null) ? (o(), n("line", {
625
- key: 0,
626
- class: F({ "donut-opacity": !0, "donut-behind": g.value !== null }),
627
- x1: l.x,
628
- y1: l.y,
629
- x2: C.value[s + 1].x,
630
- y2: C.value[s + 1].y,
631
- stroke: e.value.style.chart.layout.line.stroke,
632
- "stroke-width": e.value.style.chart.layout.line.strokeWidth,
633
- "stroke-linecap": "round",
634
- "stroke-linejoin": "round"
635
- }, null, 10, fl)) : c("", !0),
636
- l.subtotal !== null ? (o(), n("g", ml, [
637
- l.subtotal ? (o(), n("circle", {
638
- key: 0,
639
- cx: l.x,
640
- cy: l.y,
641
- r: l.activeRadius,
642
- fill: e.value.style.chart.backgroundColor
643
- }, null, 8, bl)) : c("", !0)
644
- ])) : c("", !0)
645
- ]))), 256)),
646
- (o(!0), n(z, null, I(C.value, (l, s) => (o(), n("g", {
647
- class: F({ "donut-opacity": !0, "donut-behind": s !== g.value && g.value !== null })
648
- }, [
649
- l.subtotal ? (o(), n("g", pl, [
650
- g.value !== null && g.value === s ? (o(), n("g", xl, [
651
- (o(!0), n(z, null, I(l.donutHover, (u) => (o(), n("g", null, [
652
- Re(u) ? (o(), n("path", {
653
- key: 0,
654
- d: r(Ot)(u, { x: u.center.endX, y: u.center.endY }, 12, 12, { x: l.x, y: l.y }, !1, 20),
655
- stroke: u.color,
656
- "stroke-width": "1",
657
- "stroke-linecap": "round",
658
- "stroke-linejoin": "round",
659
- fill: "none"
660
- }, null, 8, kl)) : c("", !0)
661
- ]))), 256)),
662
- (o(!0), n(z, null, I(l.donutHover, (u, f) => (o(), n("g", null, [
663
- Re(u) ? (o(), n("text", {
664
- key: 0,
665
- "data-cy-hover-label": "",
666
- "text-anchor": r(qe)(u, !0, 0).anchor,
667
- x: r(qe)(u, !0, 9).x,
668
- y: r(Tt)(u, 14, 10),
669
- fill: e.value.style.chart.layout.grid.yAxis.dataLabels.color,
670
- "font-size": 8,
671
- "font-weight": "bold"
672
- }, p(u.name) + ": " + p(ft(u, l.donut)) + " (" + p(u.value === null ? "-" : Pe(u.value, u, f)) + ") ", 9, Cl)) : c("", !0)
673
- ]))), 256)),
674
- S("g", null, [
675
- S("circle", {
676
- cx: l.x,
677
- cy: l.y,
678
- r: l.hoverRadius,
679
- fill: e.value.style.chart.backgroundColor
680
- }, null, 8, _l)
681
- ])
682
- ])) : c("", !0)
683
- ])) : c("", !0)
684
- ], 2))), 256)),
685
- (o(!0), n(z, null, I(C.value, (l, s) => (o(), n("g", {
686
- class: F({ "donut-opacity": !0, "donut-behind": s !== g.value && g.value !== null })
687
- }, [
688
- l.subtotal !== null ? (o(), n("g", wl, [
689
- l.subtotal === 0 ? (o(), n("circle", {
690
- key: 0,
691
- cx: l.x,
692
- cy: l.y,
693
- r: 3,
694
- fill: e.value.style.chart.color
695
- }, null, 8, Sl)) : g.value !== null && g.value === s ? (o(), n("g", Ll, [
696
- (o(!0), n(z, null, I(l.donutHover, (u, f) => (o(), n("path", {
697
- d: u.arcSlice,
698
- fill: `${u.color}`,
699
- "stroke-width": 1,
700
- stroke: e.value.style.chart.backgroundColor
701
- }, null, 8, $l))), 256))
702
- ])) : (o(), n("g", Al, [
703
- (o(!0), n(z, null, I(l.donut, (u, f) => (o(), n("path", {
704
- d: u.arcSlice,
705
- fill: `${u.color}`,
706
- "stroke-width": 0.5,
707
- stroke: e.value.style.chart.backgroundColor
708
- }, null, 8, zl))), 256))
709
- ]))
710
- ])) : c("", !0)
711
- ], 2))), 256)),
712
- (o(!0), n(z, null, I(C.value, (l, s) => (o(), n("g", {
713
- class: F({ "donut-opacity": !0, "donut-behind": s !== g.value && g.value !== null || ue.value && s !== E.value.index })
714
- }, [
715
- l.subtotal !== null && e.value.style.chart.layout.dataLabels.show ? (o(), n("text", {
716
- key: 0,
717
- "text-anchor": "middle",
718
- x: l.x,
719
- y: g.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,
720
- "font-size": e.value.style.chart.layout.dataLabels.fontSize,
721
- "font-weight": "bold",
722
- fill: e.value.style.chart.layout.dataLabels.color
723
- }, p(Pe(l.subtotal, l, s)), 9, Il)) : c("", !0)
724
- ], 2))), 256)),
725
- (o(!0), n(z, null, I(C.value, (l, s) => (o(), n("rect", {
726
- x: i.value.left + s * x.value,
727
- y: i.value.top,
728
- width: x.value,
729
- height: v.value.height,
730
- fill: [g.value, j.value].includes(l.index) ? `url(#hover_${H.value})` : "transparent",
731
- class: F({ "donut-hover": l.subtotal && [g.value, j.value].includes(l.index) }),
732
- style: {
733
- pointerEvents: "none"
734
- }
735
- }, null, 10, Nl))), 256)),
736
- (o(!0), n(z, null, I(C.value, (l, s) => (o(), n("rect", {
737
- "data-cy-trap": "",
738
- x: i.value.left + s * x.value,
739
- y: i.value.top,
740
- width: x.value,
741
- height: v.value.height,
742
- fill: "transparent",
743
- onMouseenter: (u) => mt(l),
744
- onMouseleave: Fe,
745
- onClick: (u) => De(l, s),
746
- class: F({ "donut-hover": g.value === l.index && l.subtotal })
747
- }, null, 42, Pl))), 256)),
748
- A(t.$slots, "svg", { svg: v.value }, void 0, !0)
749
- ], 14, Jt)) : c("", !0),
750
- t.$slots.watermark ? (o(), n("div", Fl, [
751
- A(t.$slots, "watermark", Y(q({ isPrinting: r(Ae) || r(ze) })), void 0, !0)
752
- ])) : c("", !0),
753
- Q.value ? c("", !0) : (o(), P(r(nt), {
754
- key: 6,
755
- config: {
756
- type: "donutEvolution",
757
- style: {
758
- backgroundColor: e.value.style.chart.backgroundColor,
759
- donutEvolution: {
760
- axis: {
761
- color: "#CCCCCC"
762
- },
763
- donuts: {
764
- color: "#CCCCCC"
765
- }
766
- }
767
- }
768
- }
769
- }, null, 8, ["config"])),
770
- O.value > 1 && e.value.style.chart.zoom.show ? (o(), P(Gt, {
771
- ref_key: "slicerComponent",
772
- ref: V,
773
- key: `slicer_${pe.value}`,
774
- background: e.value.style.chart.zoom.color,
775
- borderColor: e.value.style.chart.backgroundColor,
776
- fontSize: e.value.style.chart.zoom.fontSize,
777
- useResetSlot: e.value.style.chart.zoom.useResetSlot,
778
- labelLeft: L.value[0] ? L.value[0].text : "",
779
- labelRight: L.value.at(-1) ? L.value.at(-1).text : "",
780
- textColor: e.value.style.chart.color,
781
- inputColor: e.value.style.chart.zoom.color,
782
- selectColor: e.value.style.chart.zoom.highlightColor,
783
- max: O.value,
784
- min: 0,
785
- valueStart: y.value.start,
786
- valueEnd: y.value.end,
787
- start: y.value.start,
788
- "onUpdate:start": a[0] || (a[0] = (l) => y.value.start = l),
789
- end: y.value.end,
790
- "onUpdate:end": a[1] || (a[1] = (l) => y.value.end = l),
791
- refreshStartPoint: e.value.style.chart.zoom.startIndex !== null ? e.value.style.chart.zoom.startIndex : 0,
792
- refreshEndPoint: e.value.style.chart.zoom.endIndex !== null ? e.value.style.chart.zoom.endIndex + 1 : O.value,
793
- enableRangeHandles: e.value.style.chart.zoom.enableRangeHandles,
794
- enableSelectionDrag: e.value.style.chart.zoom.enableSelectionDrag,
795
- onReset: ge
796
- }, {
797
- "reset-action": w(({ reset: l }) => [
798
- A(t.$slots, "reset-action", Y(q({ reset: l })), void 0, !0)
799
- ]),
800
- _: 3
801
- }, 8, ["background", "borderColor", "fontSize", "useResetSlot", "labelLeft", "labelRight", "textColor", "inputColor", "selectColor", "max", "valueStart", "valueEnd", "start", "end", "refreshStartPoint", "refreshEndPoint", "enableRangeHandles", "enableSelectionDrag"])) : c("", !0),
802
- e.value.style.chart.legend.show ? (o(), P(Xt, {
803
- key: `legend_${Ce.value}`,
804
- legendSet: Oe.value,
805
- config: bt.value,
806
- onClickMarker: a[2] || (a[2] = ({ legend: l }) => re(l.uid))
807
- }, {
808
- item: w(({ legend: l, index: s }) => [
809
- S("div", {
810
- onClick: (u) => re(l.uid),
811
- style: te(`opacity:${k.value.includes(l.uid) ? 0.5 : 1}`)
812
- }, p(l.name) + p(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + p(e.value.style.chart.legend.showValue ? r(ye)(
813
- e.value.style.chart.layout.dataLabels.formatter,
814
- l.value,
815
- r(oe)({
816
- p: e.value.style.chart.layout.dataLabels.prefix,
817
- v: l.value,
818
- s: e.value.style.chart.layout.dataLabels.suffix,
819
- r: e.value.style.chart.legend.roundingValue
820
- }),
821
- { datapoint: l, seriesIndex: s }
822
- ) : "") + " " + p(e.value.style.chart.legend.showPercentage ? k.value.includes(l.uid) ? `${e.value.style.chart.legend.showValue ? "(" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? "(" : ""}${isNaN(l.value / Te.value) ? "-" : r(oe)({
823
- v: l.value / Te.value * 100,
824
- s: "%",
825
- r: e.value.style.chart.legend.roundingPercentage
826
- })}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, Dl)
827
- ]),
828
- _: 1
829
- }, 8, ["legendSet", "config"])) : c("", !0),
830
- A(t.$slots, "legend", { legend: Oe.value }, void 0, !0),
831
- t.$slots.source ? (o(), n("div", Ol, [
832
- A(t.$slots, "source", {}, void 0, !0)
833
- ], 512)) : c("", !0),
834
- Q.value ? (o(), P(r(tt), {
835
- key: 10,
836
- hideDetails: "",
837
- config: {
838
- open: G.value.showTable,
839
- maxHeight: 1e4,
840
- body: {
841
- backgroundColor: e.value.style.chart.backgroundColor,
842
- color: e.value.style.chart.color
843
- },
844
- head: {
845
- backgroundColor: e.value.style.chart.backgroundColor,
846
- color: e.value.style.chart.color
847
- }
848
- }
849
- }, {
850
- content: w(() => [
851
- (o(), P(r(at), {
852
- key: `table_${ke.value}`,
853
- colNames: U.value.colNames,
854
- head: U.value.head,
855
- body: U.value.body,
856
- config: U.value.config,
857
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
858
- onClose: a[3] || (a[3] = (l) => G.value.showTable = !1)
859
- }, {
860
- th: w(({ th: l }) => [
861
- Ge(p(l.name ?? l), 1)
862
- ]),
863
- td: w(({ td: l }) => [
864
- l.value === null ? (o(), n("span", Tl, "-")) : (o(), n("b", El, 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)),
865
- S("span", null, p(l.percentage && !isNaN(l.percentage) ? `(${Number(l.percentage.toFixed(e.value.table.td.roundingPercentage)).toLocaleString()}%)` : ""), 1)
866
- ]),
867
- _: 1
868
- }, 8, ["colNames", "head", "body", "config", "title"]))
869
- ]),
870
- _: 1
871
- }, 8, ["config"])) : c("", !0),
872
- e.value.style.chart.dialog.show ? (o(), P(r(lt), {
873
- key: 11,
874
- ref_key: "dialog",
875
- ref: ce,
876
- onClose: a[4] || (a[4] = (l) => {
877
- E.value = null, ue.value = !1, Z.value = null, g.value = null, j.value = null;
878
- }),
879
- backgroundColor: e.value.style.chart.dialog.backgroundColor,
880
- color: e.value.style.chart.dialog.color,
881
- headerBg: e.value.style.chart.dialog.header.backgroundColor,
882
- headerColor: e.value.style.chart.dialog.header.color,
883
- isFullscreen: B.value,
884
- fullscreenParent: R.value
885
- }, {
886
- title: w(() => [
887
- Ge(p(L.value[Number(E.value.index)] ? L.value[Number(E.value.index)].text : ""), 1)
888
- ]),
889
- default: w(() => [
890
- E.value ? (o(), P(r(rt), {
891
- key: 0,
892
- config: Ue.value,
893
- dataset: Me.value
894
- }, null, 8, ["config", "dataset"])) : c("", !0)
895
- ]),
896
- _: 1
897
- }, 8, ["backgroundColor", "color", "headerBg", "headerColor", "isFullscreen", "fullscreenParent"])) : c("", !0)
898
- ], 46, qt));
899
- }
900
- }, Kl = /* @__PURE__ */ Yt(Vl, [["__scopeId", "data-v-014a9c31"]]);
901
- export {
902
- Kl as default
903
- };