vue-data-ui 3.0.0-next.7 → 3.0.0-next.71

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 (137) hide show
  1. package/dist/{Arrow-Bl8urcli.js → Arrow-BZNpld6u.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-kg-eVvXZ.js} +2 -2
  3. package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BdOEhJar.js} +1 -1
  4. package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-CWvXlPxS.js} +2 -2
  5. package/dist/{DataTable-mQ6Wd-rR.js → DataTable-B3yakHEM.js} +2 -2
  6. package/dist/{Legend-B2hrDh4G.js → Legend-DiGLrlzP.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-C-ZjpJQd.js} +3 -3
  8. package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-6s4eI8W7.js} +1 -1
  9. package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-JoUN7Ink.js} +3 -3
  10. package/dist/{Shape-C2qH26wh.js → Shape-CWIa2nta.js} +43 -37
  11. package/dist/Slicer-DYuvPkEM.js +602 -0
  12. package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-C_fUmbP7.js} +1 -1
  13. package/dist/{Title-B7Xb3YuE.js → Title-VLWyIYrj.js} +1 -1
  14. package/dist/{Tooltip-BidRoM5E.js → Tooltip-BS5naLS2.js} +23 -19
  15. package/dist/{UserOptions-0tvMM8PF.js → UserOptions-BV_xM-sB.js} +2 -2
  16. package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-PUk0ukSG.js} +1 -1
  17. package/dist/{img-D72yZNUg.js → img-DD_2wgY3.js} +1 -1
  18. package/dist/{index-Cg-RjxqH.js → index-DKpp7RIH.js} +2236 -1505
  19. package/dist/{pdf-DgX01_wu.js → pdf-0TQQyXWM.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +610 -22
  22. package/dist/types/vue-data-ui.d.ts +610 -22
  23. package/dist/useAutoSizeLabelsInsideViewbox-Qhry5WvH.js +81 -0
  24. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  25. package/dist/useLoading-D7YHNtLX.js +29 -0
  26. package/dist/useNestedProp-D-8c0o4p.js +13 -0
  27. package/dist/usePanZoom-BVca3eMk.js +122 -0
  28. package/dist/{usePrinter-BUzmyQf9.js → usePrinter-NUeckmCX.js} +2 -2
  29. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  30. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  31. package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-BIXXEsFZ.js} +105 -100
  32. package/dist/vue-data-ui.js +23 -22
  33. package/dist/vue-ui-3d-bar-CVUfj12F.js +1323 -0
  34. package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-Cpovz3RE.js} +3 -3
  35. package/dist/vue-ui-age-pyramid-CQWFaHLV.js +834 -0
  36. package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-C49Xw5Mh.js} +2 -2
  37. package/dist/vue-ui-bullet-DED2SuIa.js +571 -0
  38. package/dist/vue-ui-candlestick-DGgbevy6.js +999 -0
  39. package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DKIgSB1T.js} +29 -29
  40. package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-D1bEM91d.js} +5 -5
  41. package/dist/vue-ui-chord-CBLSqtEP.js +1038 -0
  42. package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-g2ts9NTG.js} +24 -24
  43. package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-DSxmPUD8.js} +2 -2
  44. package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-B6FfoNjQ.js} +62 -62
  45. package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-DKffQVgr.js} +2 -2
  46. package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-CJrWc4-g.js} +320 -308
  47. package/dist/vue-ui-donut-evolution-Bys6cs-D.js +1075 -0
  48. package/dist/vue-ui-dumbbell-Cb_I__qC.js +1119 -0
  49. package/dist/vue-ui-flow-BzuT3ij5.js +841 -0
  50. package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-Ctp7GDiN.js} +16 -16
  51. package/dist/vue-ui-galaxy-CRBy0aio.js +680 -0
  52. package/dist/vue-ui-gauge-NcQq5UFr.js +791 -0
  53. package/dist/vue-ui-gizmo-Cwfb8c-0.js +210 -0
  54. package/dist/vue-ui-heatmap-DElqpFVY.js +1078 -0
  55. package/dist/vue-ui-history-plot-De1Dvnhw.js +1073 -0
  56. package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-_bLScmgO.js} +26 -26
  57. package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-PsHE_2Wy.js} +2 -2
  58. package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-CgiahnC6.js} +53 -51
  59. package/dist/vue-ui-mood-radar-dXVOOrhl.js +785 -0
  60. package/dist/vue-ui-nested-donuts-C0X6BetT.js +1286 -0
  61. package/dist/vue-ui-onion-C7sxQzk_.js +776 -0
  62. package/dist/vue-ui-parallel-coordinate-plot-jwtnNX59.js +915 -0
  63. package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-DguDE91h.js} +512 -459
  64. package/dist/vue-ui-quick-chart-BpEDS08U.js +1761 -0
  65. package/dist/vue-ui-radar-lFrqTRqo.js +796 -0
  66. package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-BHghXziv.js} +2 -2
  67. package/dist/vue-ui-relation-circle-C5W6NFOb.js +598 -0
  68. package/dist/vue-ui-ridgeline-A2DuFEDS.js +1153 -0
  69. package/dist/vue-ui-rings-BgJAm9_b.js +728 -0
  70. package/dist/vue-ui-scatter-COfpLChz.js +1178 -0
  71. package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-DMLCBUtZ.js} +3 -3
  72. package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-ZopESYc_.js} +26 -26
  73. package/dist/vue-ui-spark-trend-CuSQ03fQ.js +315 -0
  74. package/dist/vue-ui-sparkbar-BCsX9M4q.js +351 -0
  75. package/dist/vue-ui-sparkgauge-DdyZLA0T.js +232 -0
  76. package/dist/vue-ui-sparkhistogram-CUxFgIcE.js +380 -0
  77. package/dist/vue-ui-sparkline-DOkofsLL.js +489 -0
  78. package/dist/vue-ui-sparkstackbar-Bq9PZzmH.js +421 -0
  79. package/dist/vue-ui-stackbar-B7ceoT0V.js +1370 -0
  80. package/dist/vue-ui-strip-plot-DYh-NGQN.js +915 -0
  81. package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-BVTb1xuA.js} +5 -5
  82. package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-pESH5KAJ.js} +11 -11
  83. package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-Bw-6l9lA.js} +14 -14
  84. package/dist/vue-ui-thermometer-BqqfmS-B.js +541 -0
  85. package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-CVisMxLS.js} +5 -5
  86. package/dist/vue-ui-tiremarks-K1dcCdpj.js +406 -0
  87. package/dist/vue-ui-treemap-Bz3c68s4.js +1035 -0
  88. package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-BvtXpCjw.js} +71 -69
  89. package/dist/vue-ui-waffle-CYO7bIf1.js +910 -0
  90. package/dist/vue-ui-wheel-De1spwLh.js +379 -0
  91. package/dist/vue-ui-word-cloud-BMmVrx_T.js +765 -0
  92. package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-Ccpr00nJ.js} +11 -9
  93. package/dist/vue-ui-xy-D4jaRKe3.js +3771 -0
  94. package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-DE-Uu5oq.js} +265 -264
  95. package/package.json +1 -1
  96. package/dist/Slicer-BD8Z8VCW.js +0 -577
  97. package/dist/useLoading-Bt5Doa8m.js +0 -28
  98. package/dist/useNestedProp-C_G5E08Y.js +0 -13
  99. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  100. package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
  101. package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
  102. package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
  103. package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
  104. package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
  105. package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
  106. package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
  107. package/dist/vue-ui-flow-D_L_xssL.js +0 -765
  108. package/dist/vue-ui-galaxy-Cn6vHbaw.js +0 -617
  109. package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
  110. package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
  111. package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
  112. package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
  113. package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
  114. package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
  115. package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
  116. package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
  117. package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
  118. package/dist/vue-ui-radar-98mXFZe-.js +0 -741
  119. package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
  120. package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
  121. package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
  122. package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
  123. package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
  124. package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
  125. package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
  126. package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
  127. package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
  128. package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
  129. package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
  130. package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
  131. package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
  132. package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
  133. package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
  134. package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
  135. package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
  136. package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
  137. package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
@@ -1,863 +0,0 @@
1
- import { defineAsyncComponent as B, useSlots as pt, computed as d, ref as c, watch as Re, shallowRef as De, onMounted as ft, onBeforeUnmount as yt, createElementBlock as v, openBlock as s, unref as r, normalizeStyle as K, normalizeClass as Ue, createBlock as M, createCommentVNode as f, createElementVNode as x, createVNode as ve, createSlots as Ee, withCtx as m, renderSlot as g, normalizeProps as W, guardReactiveProps as q, Fragment as $, renderList as z, mergeProps as Ge, toDisplayString as A, createTextVNode as gt, nextTick as mt } from "vue";
2
- import { u as bt, c as wt, t as kt, p as R, a as xt, o as Ct, e as ce, g as $t, b as _t, i as H, f as _, X as It, s as Tt, w as St, F as Pt, L as Ot, d as At, q as Ft, r as Lt, x as zt, y as Nt } from "./index-Cg-RjxqH.js";
3
- import { t as Vt, u as Bt } from "./useResponsive-DfdjqQps.js";
4
- import { u as je } from "./useNestedProp-C_G5E08Y.js";
5
- import { u as Mt } from "./usePrinter-BUzmyQf9.js";
6
- import { u as Rt } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as Dt } from "./useChartAccessibility-9icAAmYg.js";
8
- import Ut from "./Title-B7Xb3YuE.js";
9
- import Et from "./Legend-B2hrDh4G.js";
10
- import { _ as Gt } from "./Shape-C2qH26wh.js";
11
- import jt from "./img-D72yZNUg.js";
12
- import { _ as Wt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
- const qt = ["id"], Ht = ["xmlns", "viewBox"], Xt = ["id"], Yt = ["stop-color"], Jt = ["stop-color"], Kt = ["id"], Qt = ["x", "y", "height", "width"], Zt = ["height", "width"], el = { key: 0 }, tl = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], ll = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], al = { key: 1 }, ol = ["rx", "x", "y", "height", "width", "fill", "filter"], ul = ["x", "y", "height", "width", "filter"], sl = { key: 0 }, rl = { key: 1 }, nl = { key: 2 }, il = { key: 3 }, vl = ["onMouseover", "x", "y", "height", "width"], cl = {
14
- key: 5,
15
- class: "vue-data-ui-watermark"
16
- }, dl = ["onClick"], hl = ["innerHTML"], pl = {
17
- __name: "vue-ui-waffle",
18
- props: {
19
- config: {
20
- type: Object,
21
- default() {
22
- return {};
23
- }
24
- },
25
- dataset: {
26
- type: Array,
27
- default() {
28
- return [];
29
- }
30
- }
31
- },
32
- emits: ["selectLegend"],
33
- setup(We, { expose: qe, emit: He }) {
34
- const Xe = B(() => import("./DataTable-mQ6Wd-rR.js")), Ye = B(() => import("./PenAndPaper-DhSxfUrQ.js")), Je = B(() => import("./vue-ui-accordion-CRomxzaL.js")), Ke = B(() => import("./vue-ui-skeleton-CUOhCY4p.js")), Qe = B(() => import("./Tooltip-BidRoM5E.js")), Ze = B(() => import("./UserOptions-0tvMM8PF.js")), et = B(() => import("./PackageVersion-CeEYZfaH.js")), { vue_ui_waffle: tt } = bt(), b = We, lt = pt(), Q = d(() => !!b.dataset && b.dataset.length), k = c(wt()), at = c(null), ae = c(!1), oe = c(""), D = c(null), de = c(0), F = c(null), he = c(null), pe = c(null), fe = c(null), ye = c(null), ge = c(0), me = c(0), be = c(0), e = d({
35
- get: () => Ce(),
36
- set: (t) => t
37
- }), { userOptionsVisible: ue, setUserOptionsVisibility: we, keepUserOptionState: ke } = Rt({ config: e.value }), { svgRef: xe } = Dt({ config: e.value.style.chart.title });
38
- function Ce() {
39
- const t = je({
40
- userConfig: b.config,
41
- defaultConfig: tt
42
- });
43
- return t.theme ? {
44
- ...je({
45
- userConfig: xt.vue_ui_waffle[t.theme] || b.config,
46
- defaultConfig: t
47
- }),
48
- customPalette: kt[t.theme] || R
49
- } : t;
50
- }
51
- Re(() => b.config, (t) => {
52
- e.value = Ce(), ue.value = !e.value.userOptions.showOnChartHover, $e(), ge.value += 1, me.value += 1, be.value += 1, C.value.showTable = e.value.table.show, C.value.showTooltip = e.value.style.chart.tooltip.show;
53
- }, { deep: !0 });
54
- const L = De(null), U = De(null);
55
- function $e() {
56
- if (Ct(b.dataset) ? ce({
57
- componentName: "VueUiWaffle",
58
- type: "dataset"
59
- }) : b.dataset.forEach((t, a) => {
60
- $t({
61
- datasetObject: t,
62
- requiredAttributes: ["name", "values"]
63
- }).forEach((l) => {
64
- ce({
65
- componentName: "VueUiWaffle",
66
- type: "datasetSerieAttribute",
67
- property: l,
68
- index: a
69
- });
70
- });
71
- }), e.value.responsive) {
72
- const t = Vt(() => {
73
- const { width: a, height: l } = Bt({
74
- chart: F.value,
75
- title: e.value.style.chart.title.text ? he.value : null,
76
- legend: e.value.style.chart.legend.show ? pe.value : null,
77
- source: fe.value,
78
- noTitle: ye.value
79
- });
80
- requestAnimationFrame(() => {
81
- N.value.width = a, N.value.height = l, I.value.width = a, I.value.height = l;
82
- });
83
- });
84
- L.value && (U.value && L.value.unobserve(U.value), L.value.disconnect()), L.value = new ResizeObserver(t), U.value = F.value.parentNode, L.value.observe(U.value);
85
- }
86
- }
87
- ft(() => {
88
- $e();
89
- }), yt(() => {
90
- L.value && (U.value && L.value.unobserve(U.value), L.value.disconnect());
91
- });
92
- const { isPrinting: _e, isImaging: Ie, generatePdf: Te, generateImage: Se } = Mt({
93
- elementId: `vue-ui-waffle_${k.value}`,
94
- fileName: e.value.style.chart.title.text || "vue-ui-waffle",
95
- options: e.value.userOptions.print
96
- }), ot = d(() => e.value.userOptions.show && !e.value.style.chart.title.text), Pe = d(() => _t(e.value.customPalette)), C = c({
97
- showTable: e.value.table.show,
98
- showTooltip: e.value.style.chart.tooltip.show
99
- }), N = c({
100
- height: 512,
101
- width: 512
102
- }), I = c({
103
- top: 0,
104
- left: 0,
105
- height: 512,
106
- width: 512
107
- }), T = d(() => (I.value.width - e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.spaceBetween) / e.value.style.chart.layout.grid.size), S = d(() => (I.value.height - e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.spaceBetween) / e.value.style.chart.layout.grid.size), X = d(() => I.value.width / e.value.style.chart.layout.grid.size), Z = d(() => I.value.height / e.value.style.chart.layout.grid.size);
108
- function Oe(t) {
109
- const a = e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.size, l = t.reduce((w, ie) => w + ie, 0), o = t.map((w) => w / l * a), u = o.map(Math.floor), i = o.map((w) => w % 1);
110
- let y = a - u.reduce((w, ie) => w + ie, 0);
111
- for (; y > 0; ) {
112
- let w = i.indexOf(Math.max(...i));
113
- u[w] += 1, i[w] = 0, y -= 1;
114
- }
115
- return u;
116
- }
117
- const Y = c(!1);
118
- function Ae() {
119
- return Y.value = b.dataset.flatMap((t) => t.values.reduce((a, l) => a + l, 0)).reduce((t, a) => t + a, 0) === 0, b.dataset.map((t, a) => ({
120
- ...t,
121
- color: At(t.color) || Pe.value[a] || R[a] || R[a % R.length],
122
- uid: `serie_${a}`,
123
- absoluteIndex: a
124
- }));
125
- }
126
- const se = d(() => Ae()), h = c(se.value);
127
- Re(() => b.dataset, (t) => {
128
- h.value = Ae();
129
- }, { deep: !0 });
130
- const ut = d(() => {
131
- const t = h.value.filter((a, l) => !p.value.includes(a.uid)).map((a, l) => Y.value ? 1 : (a.values || []).reduce((o, u) => o + u, 0));
132
- return Oe(t);
133
- }), st = d(() => {
134
- const t = h.value.map((a, l) => Y.value ? 1 : (a.values || []).reduce((o, u) => o + u));
135
- return Oe(t);
136
- }), J = d(() => (b.dataset.forEach((t, a) => {
137
- [null, void 0].includes(t.values) && ce({
138
- componentName: "VueUiWaffle",
139
- type: "datasetSerieAttribute",
140
- property: "values (number[])",
141
- index: a
142
- });
143
- }), h.value.filter((t, a) => !p.value.includes(t.uid)).map((t, a) => ({
144
- absoluteIndex: t.absoluteIndex,
145
- uid: t.uid,
146
- name: t.name,
147
- color: t.color,
148
- value: (t.values || []).reduce((l, o) => l + o, 0),
149
- absoluteValues: t.values || [],
150
- proportion: ut.value[a]
151
- })))), rt = d(() => h.value.map((t, a) => ({
152
- absoluteIndex: t.absoluteIndex,
153
- uid: t.uid,
154
- name: t.name,
155
- color: t.color,
156
- value: (t.values || []).reduce((l, o) => l + o, 0),
157
- absoluteValues: t.values || [],
158
- proportion: st.value[a]
159
- })));
160
- function nt() {
161
- return rt.value.map((t) => ({
162
- name: t.name,
163
- color: t.color,
164
- value: t.value,
165
- proportion: t.proportion
166
- }));
167
- }
168
- const it = d(() => {
169
- let t = 0;
170
- return J.value.map((a, l) => {
171
- const o = t, u = o + a.proportion, i = [];
172
- for (let y = Math.floor(o); y < Math.floor(u); y += 1)
173
- i.push(y);
174
- return t = u, {
175
- ...a,
176
- start: o,
177
- rects: i
178
- };
179
- });
180
- }), n = d(() => it.value.flatMap((t, a) => t.rects.map((l, o) => ({
181
- isFirst: o === 0,
182
- isLongEnough: l.length > 2,
183
- name: t.name,
184
- color: t.color,
185
- value: t.value,
186
- serieIndex: a,
187
- absoluteStartIndex: o < 3,
188
- serieId: t.uid,
189
- ...t
190
- }))).map((t, a) => ({
191
- ...t,
192
- isAbsoluteFirst: a % e.value.style.chart.layout.grid.size === 0
193
- }))), E = d(() => {
194
- const t = [];
195
- for (let a = 0; a < e.value.style.chart.layout.grid.size; a += 1)
196
- for (let l = 0; l < e.value.style.chart.layout.grid.size; l += 1)
197
- t.push({
198
- isStartOfLine: l === 0,
199
- position: e.value.style.chart.layout.grid.vertical ? a : l,
200
- x: (e.value.style.chart.layout.grid.vertical ? a : l) * (T.value + e.value.style.chart.layout.grid.spaceBetween),
201
- y: (e.value.style.chart.layout.grid.vertical ? l : a) * (S.value + e.value.style.chart.layout.grid.spaceBetween) + I.value.top
202
- });
203
- return t;
204
- }), p = c([]), V = c(!1), Fe = c(null), Le = c(null);
205
- function ze(t) {
206
- if (Y.value) return;
207
- if (!e.value.useAnimation) {
208
- p.value.includes(t) ? p.value = p.value.filter((u) => u !== t) : p.value.length < G.value.length - 1 && G.value.length > 1 && p.value.push(t);
209
- return;
210
- }
211
- const a = se.value.find((u) => u.uid === t).values.reduce((u, i) => u + i, 0), l = h.value.find((u) => u.uid === t).values.reduce((u, i) => u + i, 0);
212
- let o = l;
213
- if (!(l === 0 && a === 0)) {
214
- if (p.value.includes(t)) {
215
- let i = function() {
216
- o > u ? (cancelAnimationFrame(Fe.value), h.value = h.value.map((y, w) => y.uid === t ? {
217
- ...y,
218
- values: [u]
219
- } : y), V.value = !1) : (V.value = !0, o += u * 0.025, h.value = h.value.map((y, w) => y.uid === t ? {
220
- ...y,
221
- values: [o]
222
- } : y), Fe.value = requestAnimationFrame(i));
223
- };
224
- p.value = p.value.filter((y) => y !== t);
225
- const u = a;
226
- i();
227
- } else if (p.value.length < G.value.length - 1 && G.value.length > 1) {
228
- let u = function() {
229
- o < l / 100 ? (cancelAnimationFrame(Le.value), p.value.push(t), h.value = h.value.map((i, y) => i.uid === t ? {
230
- ...i,
231
- values: [0]
232
- } : i), V.value = !1) : (V.value = !0, o /= 1.15, h.value = h.value.map((i) => i.uid === t ? {
233
- ...i,
234
- values: [o]
235
- } : i), Le.value = requestAnimationFrame(u));
236
- };
237
- u();
238
- }
239
- dt("selectLegend", J.value.map((u) => ({
240
- name: u.name,
241
- color: u.color,
242
- value: u.value,
243
- proportion: u.proportion / Math.pow(e.value.style.chart.layout.grid.size, 2)
244
- })));
245
- }
246
- }
247
- const G = d(() => h.value.map((t, a) => ({
248
- name: t.name,
249
- color: t.color || Pe[a] || R[a] || R[a % R.length],
250
- value: (t.values || []).reduce((l, o) => l + o, 0),
251
- uid: t.uid,
252
- shape: "square"
253
- })).map((t) => ({
254
- ...t,
255
- proportion: t.value / h.value.map((a) => (a.values || []).reduce((l, o) => l + o, 0)).reduce((a, l) => a + l, 0),
256
- opacity: p.value.includes(t.uid) ? 0.5 : 1,
257
- segregate: () => ze(t.uid),
258
- isSegregated: p.value.includes(t.uid)
259
- }))), vt = d(() => ({
260
- cy: "waffle-div-legend",
261
- backgroundColor: e.value.style.chart.legend.backgroundColor,
262
- color: e.value.style.chart.legend.color,
263
- fontSize: e.value.style.chart.legend.fontSize,
264
- paddingBottom: 12,
265
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
266
- })), P = d(() => J.value.map((t) => t.value).reduce((t, a) => t + a, 0)), re = c(null);
267
- function ct(t) {
268
- if (p.value.length === b.dataset.length) return;
269
- const a = n.value[t];
270
- re.value = {
271
- datapoint: a,
272
- seriesIndex: a.absoluteIndex,
273
- series: h.value,
274
- config: e.value
275
- }, ae.value = !0, D.value = n.value[t].serieIndex;
276
- const l = e.value.style.chart.tooltip.customFormat;
277
- if (zt(l) && Nt(() => l({
278
- seriesIndex: n.value[t].absoluteIndex,
279
- datapoint: a,
280
- series: h.value,
281
- config: e.value
282
- })))
283
- oe.value = l({
284
- seriesIndex: n.value[t].absoluteIndex,
285
- datapoint: a,
286
- series: h.value,
287
- config: e.value
288
- });
289
- else {
290
- let o = "";
291
- if (o += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`, o += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" stroke="none" rx="1" fill="${a.color}" />${lt.pattern ? `<rect x="0" y="0" height="60" width="60" stroke="none" rx="1" stroke="none" fill="url(#pattern_${k.value}_${a.absoluteIndex})"/>` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (o += `<b>${H(
292
- e.value.style.chart.layout.labels.dataLabels.formatter,
293
- a.value,
294
- _({
295
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
296
- v: a.value,
297
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
298
- r: e.value.style.chart.tooltip.roundingValue
299
- }),
300
- {
301
- datapoint: a,
302
- seriesIndex: n.value[t].absoluteIndex,
303
- series: h.value
304
- }
305
- )}</b>`), e.value.style.chart.tooltip.showPercentage) {
306
- const u = _({
307
- v: Y.value ? 1 / b.dataset.length * 100 : a.value / P.value * 100,
308
- s: "%",
309
- r: e.value.style.chart.tooltip.roundingPercentage
310
- });
311
- e.value.style.chart.tooltip.showValue ? o += `<span>(${u})</span></div>` : o += `<b>${u}%</b></div>`;
312
- }
313
- oe.value = o;
314
- }
315
- }
316
- const dt = He, O = d(() => {
317
- const t = J.value.map((l) => ({
318
- name: l.name,
319
- color: l.color
320
- })), a = J.value.map((l) => l.value);
321
- return { head: t, body: a };
322
- });
323
- function ee(t) {
324
- return e.value.useBlurOnHover && ![null, void 0].includes(D.value) && D.value !== t ? `url(#blur_${k.value})` : "";
325
- }
326
- function Ne(t = null) {
327
- mt(() => {
328
- const a = O.value.head.map((u, i) => [[
329
- u.name
330
- ], [O.value.body[i]], [isNaN(O.value.body[i] / P.value) ? "-" : O.value.body[i] / P.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(a), o = Ft(l);
331
- t ? t(o) : Lt({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-waffle" });
332
- });
333
- }
334
- const te = d(() => {
335
- const t = [
336
- ' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
337
- H(
338
- e.value.style.chart.layout.labels.dataLabels.formatter,
339
- P.value,
340
- _({
341
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
342
- v: P.value,
343
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
344
- r: e.value.table.td.roundingValue
345
- })
346
- ),
347
- "100%"
348
- ], a = O.value.head.map((u, i) => [
349
- {
350
- color: u.color,
351
- name: u.name
352
- },
353
- H(
354
- e.value.style.chart.layout.labels.dataLabels.formatter,
355
- O.value.body[i],
356
- _({
357
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
358
- v: O.value.body[i],
359
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
360
- r: e.value.table.td.roundingValue
361
- })
362
- ),
363
- isNaN(O.value.body[i] / P.value) ? "-" : _({
364
- v: O.value.body[i] / P.value * 100,
365
- s: "%",
366
- r: e.value.table.td.roundingPercentage
367
- })
368
- ]), l = {
369
- th: {
370
- backgroundColor: e.value.table.th.backgroundColor,
371
- color: e.value.table.th.color,
372
- outline: e.value.table.th.outline
373
- },
374
- td: {
375
- backgroundColor: e.value.table.td.backgroundColor,
376
- color: e.value.table.td.color,
377
- outline: e.value.table.td.outline
378
- },
379
- shape: "square",
380
- breakpoint: e.value.table.responsiveBreakpoint
381
- }, o = [
382
- e.value.table.columnNames.series,
383
- e.value.table.columnNames.value,
384
- e.value.table.columnNames.percentage
385
- ];
386
- return {
387
- head: t,
388
- body: a,
389
- config: l,
390
- colNames: o
391
- };
392
- }), j = c(!1);
393
- function Ve(t) {
394
- j.value = t, de.value += 1;
395
- }
396
- function Be() {
397
- C.value.showTable = !C.value.showTable;
398
- }
399
- function Me() {
400
- C.value.showTooltip = !C.value.showTooltip;
401
- }
402
- const le = c(!1);
403
- function ne() {
404
- le.value = !le.value;
405
- }
406
- async function ht({ scale: t = 2 } = {}) {
407
- if (!F.value) return;
408
- const { width: a, height: l } = F.value.getBoundingClientRect(), o = a / l, { imageUri: u, base64: i } = await jt({ domElement: F.value, base64: !0, img: !0, scale: t });
409
- return {
410
- imageUri: u,
411
- base64: i,
412
- title: e.value.style.chart.title.text,
413
- width: a,
414
- height: l,
415
- aspectRatio: o
416
- };
417
- }
418
- return qe({
419
- getData: nt,
420
- getImage: ht,
421
- generatePdf: Te,
422
- generateCsv: Ne,
423
- generateImage: Se,
424
- toggleTable: Be,
425
- toggleTooltip: Me,
426
- toggleAnnotator: ne,
427
- toggleFullscreen: Ve
428
- }), (t, a) => (s(), v("div", {
429
- class: Ue(`vue-ui-waffle ${j.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
430
- ref_key: "waffleChart",
431
- ref: F,
432
- id: `vue-ui-waffle_${k.value}`,
433
- style: K(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
434
- onMouseenter: a[3] || (a[3] = () => r(we)(!0)),
435
- onMouseleave: a[4] || (a[4] = () => r(we)(!1))
436
- }, [
437
- e.value.userOptions.buttons.annotator ? (s(), M(r(Ye), {
438
- key: 0,
439
- svgRef: r(xe),
440
- backgroundColor: e.value.style.chart.backgroundColor,
441
- color: e.value.style.chart.color,
442
- active: le.value,
443
- onClose: ne
444
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : f("", !0),
445
- ot.value ? (s(), v("div", {
446
- key: 1,
447
- ref_key: "noTitle",
448
- ref: ye,
449
- class: "vue-data-ui-no-title-space",
450
- style: "height:36px; width: 100%;background:transparent"
451
- }, null, 512)) : f("", !0),
452
- e.value.style.chart.title.text ? (s(), v("div", {
453
- key: 2,
454
- ref_key: "chartTitle",
455
- ref: he,
456
- style: "width:100%;background:transparent;padding-bottom:12px"
457
- }, [
458
- (s(), M(Ut, {
459
- key: `title_${ge.value}`,
460
- config: {
461
- title: {
462
- cy: "waffle-title",
463
- ...e.value.style.chart.title
464
- },
465
- subtitle: {
466
- cy: "waffle-subtitle",
467
- ...e.value.style.chart.title.subtitle
468
- }
469
- }
470
- }, null, 8, ["config"]))
471
- ], 512)) : f("", !0),
472
- e.value.userOptions.show && Q.value && (r(ke) || r(ue)) ? (s(), M(r(Ze), {
473
- ref_key: "details",
474
- ref: at,
475
- key: `user_options_${de.value}`,
476
- backgroundColor: e.value.style.chart.backgroundColor,
477
- color: e.value.style.chart.color,
478
- isPrinting: r(_e),
479
- isImaging: r(Ie),
480
- uid: k.value,
481
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
482
- hasPdf: e.value.userOptions.buttons.pdf,
483
- hasImg: e.value.userOptions.buttons.img,
484
- hasXls: e.value.userOptions.buttons.csv,
485
- hasTable: e.value.userOptions.buttons.table,
486
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
487
- isFullscreen: j.value,
488
- isTooltip: C.value.showTooltip,
489
- titles: { ...e.value.userOptions.buttonTitles },
490
- chartElement: F.value,
491
- position: e.value.userOptions.position,
492
- hasAnnotator: e.value.userOptions.buttons.annotator,
493
- isAnnotation: le.value,
494
- callbacks: e.value.userOptions.callbacks,
495
- printScale: e.value.userOptions.print.scale,
496
- onToggleFullscreen: Ve,
497
- onGeneratePdf: r(Te),
498
- onGenerateCsv: Ne,
499
- onGenerateImage: r(Se),
500
- onToggleTable: Be,
501
- onToggleTooltip: Me,
502
- onToggleAnnotator: ne,
503
- style: K({
504
- visibility: r(ke) ? r(ue) ? "visible" : "hidden" : "visible"
505
- })
506
- }, Ee({ _: 2 }, [
507
- t.$slots.menuIcon ? {
508
- name: "menuIcon",
509
- fn: m(({ isOpen: l, color: o }) => [
510
- g(t.$slots, "menuIcon", W(q({ isOpen: l, color: o })), void 0, !0)
511
- ]),
512
- key: "0"
513
- } : void 0,
514
- t.$slots.optionTooltip ? {
515
- name: "optionTooltip",
516
- fn: m(() => [
517
- g(t.$slots, "optionTooltip", {}, void 0, !0)
518
- ]),
519
- key: "1"
520
- } : void 0,
521
- t.$slots.optionPdf ? {
522
- name: "optionPdf",
523
- fn: m(() => [
524
- g(t.$slots, "optionPdf", {}, void 0, !0)
525
- ]),
526
- key: "2"
527
- } : void 0,
528
- t.$slots.optionCsv ? {
529
- name: "optionCsv",
530
- fn: m(() => [
531
- g(t.$slots, "optionCsv", {}, void 0, !0)
532
- ]),
533
- key: "3"
534
- } : void 0,
535
- t.$slots.optionImg ? {
536
- name: "optionImg",
537
- fn: m(() => [
538
- g(t.$slots, "optionImg", {}, void 0, !0)
539
- ]),
540
- key: "4"
541
- } : void 0,
542
- t.$slots.optionTable ? {
543
- name: "optionTable",
544
- fn: m(() => [
545
- g(t.$slots, "optionTable", {}, void 0, !0)
546
- ]),
547
- key: "5"
548
- } : void 0,
549
- t.$slots.optionFullscreen ? {
550
- name: "optionFullscreen",
551
- fn: m(({ toggleFullscreen: l, isFullscreen: o }) => [
552
- g(t.$slots, "optionFullscreen", W(q({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
553
- ]),
554
- key: "6"
555
- } : void 0,
556
- t.$slots.optionAnnotator ? {
557
- name: "optionAnnotator",
558
- fn: m(({ toggleAnnotator: l, isAnnotator: o }) => [
559
- g(t.$slots, "optionAnnotator", W(q({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
560
- ]),
561
- key: "7"
562
- } : void 0
563
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : f("", !0),
564
- Q.value ? (s(), v("svg", {
565
- key: 4,
566
- ref_key: "svgRef",
567
- ref: xe,
568
- xmlns: r(It),
569
- class: Ue({ "vue-data-ui-fullscreen--on": j.value, "vue-data-ui-fulscreen--off": !j.value }),
570
- viewBox: `0 0 ${N.value.width <= 0 ? 10 : N.value.width} ${N.value.height <= 0 ? 10 : N.value.height}`,
571
- style: K(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
572
- }, [
573
- ve(r(et)),
574
- x("defs", null, [
575
- (s(!0), v($, null, z(n.value, (l, o) => (s(), v("radialGradient", {
576
- cx: "50%",
577
- cy: "50%",
578
- r: "50%",
579
- fx: "50%",
580
- fy: "50%",
581
- id: `gradient_${k.value}_${o}`
582
- }, [
583
- x("stop", {
584
- offset: "0%",
585
- "stop-color": r(Tt)(r(St)(l.color, 0.05), 100 - e.value.style.chart.layout.rect.gradientIntensity)
586
- }, null, 8, Yt),
587
- x("stop", {
588
- offset: "100%",
589
- "stop-color": l.color
590
- }, null, 8, Jt)
591
- ], 8, Xt))), 256))
592
- ]),
593
- x("defs", null, [
594
- x("filter", {
595
- id: `blur_${k.value}`,
596
- x: "-50%",
597
- y: "-50%",
598
- width: "200%",
599
- height: "200%"
600
- }, a[5] || (a[5] = [
601
- x("feGaussianBlur", {
602
- in: "SourceGraphic",
603
- stdDeviation: 2
604
- }, null, -1),
605
- x("feColorMatrix", {
606
- type: "saturate",
607
- values: "0"
608
- }, null, -1)
609
- ]), 8, Kt)
610
- ]),
611
- e.value.useCustomCells && n.value.length ? (s(!0), v($, { key: 0 }, z(E.value, (l, o) => (s(), v("foreignObject", {
612
- x: l.x,
613
- y: l.y,
614
- height: S.value <= 0 ? 1e-4 : S.value,
615
- width: T.value <= 0 ? 1e-4 : T.value,
616
- class: "vue-ui-waffle-custom-cell-foreignObject"
617
- }, [
618
- g(t.$slots, "cell", Ge({ ref_for: !0 }, { cell: { ...l, color: n.value[o].color, ...n.value[o] }, isSelected: [null, void 0].includes(D.value) ? !0 : n.value[o].serieIndex === D.value }), void 0, !0)
619
- ], 8, Qt))), 256)) : f("", !0),
620
- !n.value.length && !e.value.useCustomCells ? (s(), v("rect", {
621
- key: 1,
622
- x: 12,
623
- y: 12,
624
- height: I.value.height - 24,
625
- width: I.value.width - 24,
626
- rx: 3,
627
- fill: "none",
628
- stroke: "black"
629
- }, null, 8, Zt)) : n.value.length && !e.value.useCustomCells ? (s(), v($, { key: 2 }, [
630
- t.$slots.pattern ? (s(), v("g", el, [
631
- (s(!0), v($, null, z(se.value, (l) => (s(), v("defs", null, [
632
- g(t.$slots, "pattern", Ge({ ref_for: !0 }, { seriesIndex: l.absoluteIndex, patternId: `pattern_${k.value}_${l.absoluteIndex}` }), void 0, !0)
633
- ]))), 256))
634
- ])) : f("", !0),
635
- (s(!0), v($, null, z(E.value, (l, o) => (s(), v("rect", {
636
- rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
637
- x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
638
- y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
639
- height: S.value <= 0 ? 1e-4 : S.value,
640
- width: T.value <= 0 ? 1e-4 : T.value,
641
- fill: "white",
642
- stroke: e.value.style.chart.layout.rect.stroke,
643
- "stroke-width": e.value.style.chart.layout.rect.strokeWidth,
644
- filter: ee(n.value[o].serieIndex)
645
- }, null, 8, tl))), 256)),
646
- (s(!0), v($, null, z(E.value, (l, o) => (s(), v("rect", {
647
- rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
648
- x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
649
- y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
650
- height: S.value <= 0 ? 1e-4 : S.value,
651
- width: T.value <= 0 ? 1e-4 : T.value,
652
- fill: e.value.style.chart.layout.rect.useGradient && e.value.style.chart.layout.rect.gradientIntensity > 0 ? `url(#gradient_${k.value}_${o})` : n.value[o].color,
653
- stroke: e.value.style.chart.layout.rect.stroke,
654
- "stroke-width": e.value.style.chart.layout.rect.strokeWidth,
655
- filter: ee(n.value[o].serieIndex)
656
- }, null, 8, ll))), 256)),
657
- t.$slots.pattern ? (s(), v("g", al, [
658
- (s(!0), v($, null, z(E.value, (l, o) => (s(), v("rect", {
659
- rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
660
- x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
661
- y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
662
- height: S.value <= 0 ? 1e-4 : S.value,
663
- width: T.value <= 0 ? 1e-4 : T.value,
664
- fill: `url(#pattern_${k.value}_${n.value[o].absoluteIndex})`,
665
- stroke: "none",
666
- filter: ee(n.value[o].serieIndex)
667
- }, null, 8, ol))), 256))
668
- ])) : f("", !0)
669
- ], 64)) : f("", !0),
670
- (s(!0), v($, null, z(E.value, (l, o) => (s(), v($, null, [
671
- n.value.length && !V.value && !e.value.style.chart.layout.grid.vertical && e.value.style.chart.layout.labels.captions.show && (n.value[o].isFirst && l.position < e.value.style.chart.layout.grid.size - 2 || n.value[o].isAbsoluteFirst && o % e.value.style.chart.layout.grid.size === 0 && n.value[o].absoluteStartIndex) ? (s(), v("foreignObject", {
672
- key: 0,
673
- x: l.x + e.value.style.chart.layout.labels.captions.offsetX + e.value.style.chart.layout.grid.spaceBetween / 2,
674
- y: l.y + e.value.style.chart.layout.labels.captions.offsetY + e.value.style.chart.layout.grid.spaceBetween / 2,
675
- height: Z.value <= 0 ? 1e-4 : Z.value,
676
- width: X.value * e.value.style.chart.layout.grid.size <= 0 ? 1e-4 : X.value * e.value.style.chart.layout.grid.size,
677
- filter: ee(n.value[o].serieIndex)
678
- }, [
679
- x("div", {
680
- class: "vue-ui-waffle-caption",
681
- style: K(`height: 100%; width: 100%; font-size:${e.value.style.chart.layout.labels.captions.fontSize}px;display:flex;align-items:center;justify-content:flex-start;padding: 0 ${X.value / 12}px;color:${r(Pt)(n.value[o].color)};gap:2px`)
682
- }, [
683
- e.value.style.chart.layout.labels.captions.showSerieName ? (s(), v("span", sl, A(e.value.style.chart.layout.labels.captions.serieNameAbbreviation ? r(Ot)({ source: n.value[o].name, length: e.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize }) : n.value[o].name) + ": ", 1)) : f("", !0),
684
- e.value.style.chart.layout.labels.captions.showPercentage ? (s(), v("span", rl, A(r(_)({ v: n.value[o].proportion, s: "%", r: e.value.style.chart.layout.labels.captions.roundingPercentage })), 1)) : f("", !0),
685
- e.value.style.chart.layout.labels.captions.showPercentage && e.value.style.chart.layout.labels.captions.showValue ? (s(), v("span", nl, " (" + A(r(H)(
686
- e.value.style.chart.layout.labels.dataLabels.formatter,
687
- n.value[o].value,
688
- r(_)({
689
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
690
- v: n.value[o].value,
691
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
692
- r: e.value.style.chart.layout.labels.captions.roundingValue
693
- }),
694
- { datapoint: n.value[o], position: l }
695
- )) + ") ", 1)) : f("", !0),
696
- !e.value.style.chart.layout.labels.captions.showPercentage && e.value.style.chart.layout.labels.captions.showValue ? (s(), v("span", il, A(r(H)(
697
- e.value.style.chart.layout.labels.dataLabels.formatter,
698
- n.value[o].value,
699
- r(_)({
700
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
701
- v: n.value[o].value,
702
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
703
- r: e.value.style.chart.layout.labels.captions.roundingValue
704
- }),
705
- { datapoint: n.value[o], position: l }
706
- )), 1)) : f("", !0)
707
- ], 4)
708
- ], 8, ul)) : f("", !0)
709
- ], 64))), 256)),
710
- (s(!0), v($, null, z(E.value, (l, o) => (s(), v("rect", {
711
- onMouseover: (u) => ct(o),
712
- onMouseleave: a[0] || (a[0] = (u) => {
713
- ae.value = !1, D.value = null;
714
- }),
715
- x: l.x + e.value.style.chart.layout.grid.spaceBetween / 2,
716
- y: l.y + e.value.style.chart.layout.grid.spaceBetween / 2,
717
- height: Z.value <= 0 ? 1e-4 : Z.value,
718
- width: X.value <= 0 ? 1e-4 : X.value,
719
- fill: "transparent",
720
- stroke: "none"
721
- }, null, 40, vl))), 256)),
722
- g(t.$slots, "svg", { svg: N.value }, void 0, !0)
723
- ], 14, Ht)) : f("", !0),
724
- t.$slots.watermark ? (s(), v("div", cl, [
725
- g(t.$slots, "watermark", W(q({ isPrinting: r(_e) || r(Ie) })), void 0, !0)
726
- ])) : f("", !0),
727
- Q.value ? f("", !0) : (s(), M(r(Ke), {
728
- key: 6,
729
- config: {
730
- type: "waffle",
731
- style: {
732
- backgroundColor: e.value.style.chart.backgroundColor,
733
- waffle: {
734
- color: "#CCCCCC"
735
- }
736
- }
737
- }
738
- }, null, 8, ["config"])),
739
- x("div", {
740
- ref_key: "chartLegend",
741
- ref: pe
742
- }, [
743
- e.value.style.chart.legend.show ? (s(), M(Et, {
744
- key: `legend_${be.value}`,
745
- legendSet: G.value,
746
- config: vt.value,
747
- onClickMarker: a[1] || (a[1] = ({ legend: l }) => ze(l.uid))
748
- }, Ee({
749
- item: m(({ legend: l }) => [
750
- x("div", {
751
- onClick: (o) => l.segregate(),
752
- style: K(`opacity:${p.value.includes(l.uid) ? 0.5 : 1}`)
753
- }, A(l.name) + A(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + A(e.value.style.chart.legend.showValue ? r(H)(
754
- e.value.style.chart.layout.labels.dataLabels.formatter,
755
- l.value,
756
- r(_)({
757
- p: e.value.style.chart.layout.labels.dataLabels.prefix,
758
- v: l.value,
759
- s: e.value.style.chart.layout.labels.dataLabels.suffix,
760
- r: e.value.style.chart.legend.roundingValue,
761
- isAnimating: V.value
762
- }),
763
- { datapoint: l }
764
- ) : "") + " " + A(e.value.style.chart.legend.showPercentage ? p.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 / P.value) ? "-" : r(_)({ v: l.value / P.value * 100, s: "%", r: e.value.style.chart.legend.roundingPercentage, isAnimating: V.value })}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, dl)
765
- ]),
766
- _: 2
767
- }, [
768
- t.$slots.pattern ? {
769
- name: "legend-pattern",
770
- fn: m(({ legend: l, index: o }) => [
771
- ve(Gt, {
772
- shape: l.shape,
773
- radius: 30,
774
- stroke: "none",
775
- plot: { x: 30, y: 30 },
776
- fill: `url(#pattern_${k.value}_${o})`
777
- }, null, 8, ["shape", "fill"])
778
- ]),
779
- key: "0"
780
- } : void 0
781
- ]), 1032, ["legendSet", "config"])) : g(t.$slots, "legend", {
782
- key: 1,
783
- legend: G.value
784
- }, void 0, !0)
785
- ], 512),
786
- t.$slots.source ? (s(), v("div", {
787
- key: 7,
788
- ref_key: "source",
789
- ref: fe,
790
- dir: "auto"
791
- }, [
792
- g(t.$slots, "source", {}, void 0, !0)
793
- ], 512)) : f("", !0),
794
- ve(r(Qe), {
795
- show: C.value.showTooltip && ae.value && p.value.length < b.dataset.length,
796
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
797
- color: e.value.style.chart.tooltip.color,
798
- borderRadius: e.value.style.chart.tooltip.borderRadius,
799
- borderColor: e.value.style.chart.tooltip.borderColor,
800
- borderWidth: e.value.style.chart.tooltip.borderWidth,
801
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
802
- position: e.value.style.chart.tooltip.position,
803
- offsetY: e.value.style.chart.tooltip.offsetY,
804
- parent: F.value,
805
- content: oe.value,
806
- isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
807
- fontSize: e.value.style.chart.tooltip.fontSize,
808
- isFullscreen: j.value
809
- }, {
810
- "tooltip-before": m(() => [
811
- g(t.$slots, "tooltip-before", W(q({ ...re.value })), void 0, !0)
812
- ]),
813
- "tooltip-after": m(() => [
814
- g(t.$slots, "tooltip-after", W(q({ ...re.value })), void 0, !0)
815
- ]),
816
- _: 3
817
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "fontSize", "isFullscreen"]),
818
- Q.value ? (s(), M(r(Je), {
819
- key: 8,
820
- hideDetails: "",
821
- config: {
822
- open: C.value.showTable,
823
- maxHeight: 1e4,
824
- body: {
825
- backgroundColor: e.value.style.chart.backgroundColor,
826
- color: e.value.style.chart.color
827
- },
828
- head: {
829
- backgroundColor: e.value.style.chart.backgroundColor,
830
- color: e.value.style.chart.color
831
- }
832
- }
833
- }, {
834
- content: m(() => [
835
- (s(), M(r(Xe), {
836
- key: `table_${me.value}`,
837
- colNames: te.value.colNames,
838
- head: te.value.head,
839
- body: te.value.body,
840
- config: te.value.config,
841
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
842
- onClose: a[2] || (a[2] = (l) => C.value.showTable = !1)
843
- }, {
844
- th: m(({ th: l }) => [
845
- x("div", {
846
- innerHTML: l,
847
- style: { display: "flex", "align-items": "center" }
848
- }, null, 8, hl)
849
- ]),
850
- td: m(({ td: l }) => [
851
- gt(A(l.name || l), 1)
852
- ]),
853
- _: 1
854
- }, 8, ["colNames", "head", "body", "config", "title"]))
855
- ]),
856
- _: 1
857
- }, 8, ["config"])) : f("", !0)
858
- ], 46, qt));
859
- }
860
- }, Tl = /* @__PURE__ */ Wt(pl, [["__scopeId", "data-v-501a7164"]]);
861
- export {
862
- Tl as default
863
- };