vue-data-ui 2.2.92 → 2.2.94

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 (58) hide show
  1. package/dist/index-DZlxUin4.js +57288 -0
  2. package/dist/{index.es-Dc9Fd4o6.js → index.es-Cgqo-FBk.js} +1 -1
  3. package/dist/style.css +1 -1
  4. package/dist/vue-data-ui.js +61 -455
  5. package/package.json +1 -1
  6. package/dist/data-table-d-VcuH-r.js +0 -1488
  7. package/dist/legend-DJCYLsl_.js +0 -61
  8. package/dist/themes-lgjsYHsH.js +0 -4967
  9. package/dist/title-BF-9Qcni.js +0 -56
  10. package/dist/tooltip-D85WEOKi.js +0 -94
  11. package/dist/user-options-DZgCz8UA.js +0 -415
  12. package/dist/vue-ui-3d-bar-DW7kGJSz.js +0 -20360
  13. package/dist/vue-ui-age-pyramid-4hcuKpFY.js +0 -781
  14. package/dist/vue-ui-annotator-C83FVvl8.js +0 -2175
  15. package/dist/vue-ui-candlestick-diclGj95.js +0 -807
  16. package/dist/vue-ui-chestnut-ACetHLdG.js +0 -1049
  17. package/dist/vue-ui-cursor-Rx7UNaYT.js +0 -229
  18. package/dist/vue-ui-dashboard-B3PlN0ks.js +0 -231
  19. package/dist/vue-ui-digits-CxMXID42.js +0 -154
  20. package/dist/vue-ui-donut-DMiwVXNd.js +0 -1534
  21. package/dist/vue-ui-dumbbell-B_X1T8TR.js +0 -621
  22. package/dist/vue-ui-flow-B72wzQ6V.js +0 -451
  23. package/dist/vue-ui-galaxy-DXX5yivT.js +0 -482
  24. package/dist/vue-ui-gauge-Cs9PDurH.js +0 -466
  25. package/dist/vue-ui-heatmap-PcoNSLdN.js +0 -581
  26. package/dist/vue-ui-kpi-DchEmPtB.js +0 -55
  27. package/dist/vue-ui-mini-loader-DltJLkqy.js +0 -131
  28. package/dist/vue-ui-molecule-CWvukBzs.js +0 -746
  29. package/dist/vue-ui-mood-radar-DEfdtIi8.js +0 -544
  30. package/dist/vue-ui-nested-donuts-9URpqgXE.js +0 -768
  31. package/dist/vue-ui-onion-C0eowUT6.js +0 -551
  32. package/dist/vue-ui-parallel-coordinate-plot-Bc_pAaPJ.js +0 -647
  33. package/dist/vue-ui-quadrant-_ddVAm9V.js +0 -1174
  34. package/dist/vue-ui-quick-chart-Cio0hDYO.js +0 -1310
  35. package/dist/vue-ui-radar-Dyg38i33.js +0 -853
  36. package/dist/vue-ui-rating-CE1Lmwd2.js +0 -271
  37. package/dist/vue-ui-relation-circle-BMlB3k3d.js +0 -303
  38. package/dist/vue-ui-rings-BuXeijvb.js +0 -507
  39. package/dist/vue-ui-scatter-B1hZfOua.js +0 -870
  40. package/dist/vue-ui-screenshot-0QXgxzGs.js +0 -160
  41. package/dist/vue-ui-smiley-B7kR7exr.js +0 -763
  42. package/dist/vue-ui-spark-trend-BmL2KiYL.js +0 -245
  43. package/dist/vue-ui-sparkgauge-BMzFv14L.js +0 -158
  44. package/dist/vue-ui-sparkhistogram-DWpOXqHm.js +0 -243
  45. package/dist/vue-ui-sparkstackbar-DB9VQXlc.js +0 -244
  46. package/dist/vue-ui-strip-plot-DyN6P0JO.js +0 -614
  47. package/dist/vue-ui-table-DM3zL89q.js +0 -2180
  48. package/dist/vue-ui-table-heatmap-gWx0Nslu.js +0 -237
  49. package/dist/vue-ui-thermometer-Bcqv5kd_.js +0 -384
  50. package/dist/vue-ui-timer-BIFxjujK.js +0 -451
  51. package/dist/vue-ui-tiremarks-zBwHpED_.js +0 -248
  52. package/dist/vue-ui-treemap-BaplVc_z.js +0 -719
  53. package/dist/vue-ui-vertical-bar-CdK6ZJPM.js +0 -734
  54. package/dist/vue-ui-waffle-COOzH7M3.js +0 -635
  55. package/dist/vue-ui-wheel-BEpuVTBk.js +0 -226
  56. package/dist/vue-ui-word-cloud-DNqxAAiX.js +0 -344
  57. package/dist/vue-ui-xy-_mHq-czW.js +0 -2058
  58. package/dist/vue-ui-xy-canvas-DqX8Gee5.js +0 -1003
@@ -1,635 +0,0 @@
1
- import { computed as c, ref as v, onMounted as Ve, onBeforeUnmount as Me, openBlock as s, createElementBlock as n, normalizeClass as ge, normalizeStyle as U, createVNode as te, createCommentVNode as w, createBlock as q, unref as f, createSlots as Be, withCtx as y, renderSlot as g, normalizeProps as Y, guardReactiveProps as J, createElementVNode as b, Fragment as $, renderList as M, toDisplayString as T, createTextVNode as be, nextTick as De, pushScopeId as je, popScopeId as Ge } from "vue";
2
- import { _ as Re, e as Ue, f as Ee, p as O, i as We, j as le, k as He, g as Xe, h as qe, n as I, X as Ye, x as Je, o as Ke, F as Qe, H as Ze, D as et, y as tt, z as lt, v as at, w as ot } from "./data-table-d-VcuH-r.js";
3
- import { t as ut, u as rt } from "./vue-ui-age-pyramid-4hcuKpFY.js";
4
- import { t as st } from "./themes-lgjsYHsH.js";
5
- import { u as me, _ as nt } from "./title-BF-9Qcni.js";
6
- import { U as it } from "./user-options-DZgCz8UA.js";
7
- import { _ as ct } from "./tooltip-D85WEOKi.js";
8
- import { L as vt } from "./legend-DJCYLsl_.js";
9
- import { u as dt, a as ht, S as pt, A as ft } from "./vue-ui-3d-bar-DW7kGJSz.js";
10
- const we = (B) => (je("data-v-e4e6d49b"), B = B(), Ge(), B), yt = ["id"], gt = ["xmlns", "viewBox"], bt = ["id"], mt = ["stop-color"], wt = ["stop-color"], xt = ["id"], kt = /* @__PURE__ */ we(() => /* @__PURE__ */ b("feGaussianBlur", {
11
- in: "SourceGraphic",
12
- stdDeviation: 2
13
- }, null, -1)), Ct = /* @__PURE__ */ we(() => /* @__PURE__ */ b("feColorMatrix", {
14
- type: "saturate",
15
- values: "0"
16
- }, null, -1)), _t = [
17
- kt,
18
- Ct
19
- ], $t = ["x", "y", "height", "width"], Tt = ["rx", "x", "y", "height", "width", "stroke", "stroke-width", "filter"], It = ["rx", "x", "y", "height", "width", "fill", "stroke", "stroke-width", "filter"], St = ["x", "y", "height", "width", "filter"], Ft = { key: 0 }, zt = { key: 1 }, Pt = { key: 2 }, Nt = { key: 3 }, Lt = ["onMouseover", "x", "y", "height", "width"], Ot = ["onClick"], At = { key: 0 }, Vt = { key: 1 }, Mt = ["innerHTML"], Bt = {
20
- __name: "vue-ui-waffle",
21
- props: {
22
- config: {
23
- type: Object,
24
- default() {
25
- return {};
26
- }
27
- },
28
- dataset: {
29
- type: Array,
30
- default() {
31
- return [];
32
- }
33
- }
34
- },
35
- emits: ["selectLegend"],
36
- setup(B, { expose: xe, emit: ke }) {
37
- const m = B, { vue_ui_waffle: Ce } = dt(), E = c(() => !!m.dataset && m.dataset.length), S = v(Ue()), _e = v(null), K = v(!1), Q = v(""), A = v(null), ae = v(0), D = v(null), oe = v(null), ue = v(null), e = c(() => {
38
- const t = me({
39
- userConfig: m.config,
40
- defaultConfig: Ce
41
- });
42
- return t.theme ? {
43
- ...me({
44
- userConfig: st.vue_ui_waffle[t.theme] || m.config,
45
- defaultConfig: t
46
- }),
47
- customPalette: Ee[t.theme] || O
48
- } : t;
49
- }), W = v(null);
50
- Ve(() => {
51
- if (We(m.dataset) ? le({
52
- componentName: "VueUiWaffle",
53
- type: "dataset"
54
- }) : m.dataset.forEach((t, a) => {
55
- He({
56
- datasetObject: t,
57
- requiredAttributes: ["name", "values"]
58
- }).forEach((l) => {
59
- le({
60
- componentName: "VueUiWaffle",
61
- type: "datasetSerieAttribute",
62
- property: l,
63
- index: a
64
- });
65
- });
66
- }), e.value.responsive) {
67
- const t = ut(() => {
68
- const { width: a, height: l } = rt({
69
- chart: D.value,
70
- title: e.value.style.chart.title.text ? oe.value : null,
71
- legend: e.value.style.chart.legend.show ? ue.value : null
72
- });
73
- F.value.width = a, F.value.height = l, z.value.width = a, z.value.height = l;
74
- });
75
- W.value = new ResizeObserver(t), W.value.observe(D.value.parentNode);
76
- }
77
- }), Me(() => {
78
- W.value && W.value.disconnect();
79
- });
80
- const { isPrinting: $e, isImaging: Te, generatePdf: re, generateImage: se } = ht({
81
- elementId: `vue-ui-waffle_${S.value}`,
82
- fileName: e.value.style.chart.title.text || "vue-ui-waffle"
83
- }), ne = c(() => Xe(e.value.customPalette)), C = v({
84
- showTable: e.value.table.show,
85
- showTooltip: e.value.style.chart.tooltip.show
86
- }), F = v({
87
- height: 512,
88
- width: 512
89
- }), z = v({
90
- top: 0,
91
- left: 0,
92
- height: 512,
93
- width: 512
94
- }), P = c(() => (z.value.width - e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.spaceBetween) / e.value.style.chart.layout.grid.size), N = c(() => (z.value.height - e.value.style.chart.layout.grid.size * e.value.style.chart.layout.grid.spaceBetween) / e.value.style.chart.layout.grid.size), j = c(() => z.value.width / e.value.style.chart.layout.grid.size), H = c(() => z.value.height / e.value.style.chart.layout.grid.size);
95
- function ie(t) {
96
- const a = t.reduce((u, r) => u + r, 0), l = t.map((u) => Math.round(u / a * 100) / 100), o = l.reduce((u, r) => u + r, 0);
97
- if (o !== 1) {
98
- const u = l.length - 1;
99
- l[u] += 1 - o, l[u] = Math.round(l[u] * 100) / 100;
100
- }
101
- return l;
102
- }
103
- const ce = c(() => m.dataset.map((t, a) => ({
104
- ...t,
105
- color: qe(t.color) || ne.value[a] || O[a] || O[a % O.length],
106
- uid: `serie_${a}`,
107
- absoluteIndex: a
108
- }))), h = v(ce.value), Ie = c(() => {
109
- const t = h.value.filter((a, l) => !p.value.includes(a.uid)).map((a, l) => (a.values || []).reduce((o, u) => o + u, 0));
110
- return ie(t);
111
- }), Se = c(() => {
112
- const t = h.value.map((a, l) => (a.values || []).reduce((o, u) => o + u));
113
- return ie(t);
114
- }), x = c(() => (m.dataset.forEach((t, a) => {
115
- [null, void 0].includes(t.values) && le({
116
- componentName: "VueUiWaffle",
117
- type: "datasetSerieAttribute",
118
- property: "values (number[])",
119
- index: a
120
- });
121
- }), h.value.filter((t, a) => !p.value.includes(t.uid)).map((t, a) => ({
122
- absoluteIndex: t.absoluteIndex,
123
- uid: t.uid,
124
- name: t.name,
125
- color: t.color,
126
- value: (t.values || []).reduce((l, o) => l + o, 0),
127
- absoluteValues: t.values || [],
128
- proportion: Ie.value[a] * Math.pow(e.value.style.chart.layout.grid.size, 2)
129
- })))), Fe = c(() => h.value.map((t, a) => ({
130
- absoluteIndex: t.absoluteIndex,
131
- uid: t.uid,
132
- name: t.name,
133
- color: t.color,
134
- value: (t.values || []).reduce((l, o) => l + o, 0),
135
- absoluteValues: t.values || [],
136
- proportion: Se.value[a] * Math.pow(e.value.style.chart.layout.grid.size, 2)
137
- })));
138
- function ze() {
139
- return Fe.value.map((t) => ({
140
- name: t.name,
141
- color: t.color,
142
- value: t.value,
143
- proportion: t.proportion / Math.pow(e.value.style.chart.layout.grid.size, 2)
144
- }));
145
- }
146
- const Pe = c(() => x.value.map((t, a) => {
147
- const l = a > 0 ? x.value.filter((r, d) => d < a).map((r) => r.proportion).reduce((r, d) => r + d) + t.proportion - x.value[a - 1].proportion : t.proportion - t.proportion, o = l + t.proportion, u = [];
148
- for (let r = l; r <= o; r += 1)
149
- u.push(r);
150
- return {
151
- ...t,
152
- start: a > 0 ? x.value.filter((r, d) => d < a).map((r) => r.proportion).reduce((r, d) => r + d) + t.proportion - x.value[a - 1].proportion : t.proportion - t.proportion,
153
- rects: u
154
- };
155
- })), i = c(() => Pe.value.flatMap((t, a) => t.rects.map((l, o) => ({
156
- isFirst: o === 0,
157
- isLongEnough: l.length > 2,
158
- name: t.name,
159
- color: t.color,
160
- value: t.value,
161
- serieIndex: a,
162
- absoluteStartIndex: o < 3,
163
- serieId: t.uid,
164
- ...t
165
- }))).map((t, a) => ({
166
- ...t,
167
- isAbsoluteFirst: a % e.value.style.chart.layout.grid.size === 0
168
- }))), G = c(() => {
169
- const t = [];
170
- for (let a = 0; a < e.value.style.chart.layout.grid.size; a += 1)
171
- for (let l = 0; l < e.value.style.chart.layout.grid.size; l += 1)
172
- t.push({
173
- isStartOfLine: l === 0,
174
- position: e.value.style.chart.layout.grid.vertical ? a : l,
175
- x: (e.value.style.chart.layout.grid.vertical ? a : l) * (P.value + e.value.style.chart.layout.grid.spaceBetween),
176
- y: (e.value.style.chart.layout.grid.vertical ? l : a) * (N.value + e.value.style.chart.layout.grid.spaceBetween) + z.value.top
177
- });
178
- return t;
179
- }), p = v([]), L = v(!1), ve = v(null), de = v(null);
180
- function he(t) {
181
- if (!e.value.useAnimation) {
182
- p.value.includes(t) ? p.value = p.value.filter((u) => u !== t) : p.value.length < V.value.length - 1 && V.value.length > 1 && p.value.push(t);
183
- return;
184
- }
185
- const a = ce.value.find((u) => u.uid === t).values.reduce((u, r) => u + r, 0);
186
- let o = h.value.find((u) => u.uid === t).values.reduce((u, r) => u + r, 0);
187
- if (p.value.includes(t)) {
188
- let r = function() {
189
- o > u ? (cancelAnimationFrame(ve.value), h.value = h.value.map((d, Ae) => d.uid === t ? {
190
- ...d,
191
- values: [u]
192
- } : d), L.value = !1) : (L.value = !0, o += u * 0.025, h.value = h.value.map((d, Ae) => d.uid === t ? {
193
- ...d,
194
- values: [o]
195
- } : d), ve.value = requestAnimationFrame(r));
196
- };
197
- p.value = p.value.filter((d) => d !== t);
198
- const u = a;
199
- r();
200
- } else if (p.value.length < V.value.length - 1 && V.value.length > 1) {
201
- let u = function() {
202
- o < 0.1 ? (cancelAnimationFrame(de.value), p.value.push(t), h.value = h.value.map((r, d) => r.uid === t ? {
203
- ...r,
204
- values: [0]
205
- } : r), L.value = !1) : (L.value = !0, o /= 1.5, h.value = h.value.map((r, d) => r.uid === t ? {
206
- ...r,
207
- values: [o]
208
- } : r), de.value = requestAnimationFrame(u));
209
- };
210
- u();
211
- }
212
- ke("selectLegend", x.value.map((u) => ({
213
- name: u.name,
214
- color: u.color,
215
- value: u.value,
216
- proportion: u.proportion / Math.pow(e.value.style.chart.layout.grid.size, 2)
217
- })));
218
- }
219
- const V = c(() => h.value.map((t, a) => ({
220
- name: t.name,
221
- color: t.color || ne[a] || O[a] || O[a % O.length],
222
- value: (t.values || []).reduce((l, o) => l + o, 0),
223
- uid: t.uid,
224
- shape: "square"
225
- })).map((t, a) => ({
226
- ...t,
227
- proportion: t.value / h.value.map((l) => (l.values || []).reduce((o, u) => o + u, 0)).reduce((l, o) => l + o, 0),
228
- opacity: p.value.includes(t.uid) ? 0.5 : 1,
229
- segregate: () => he(t.uid),
230
- isSegregated: p.value.includes(t.uid)
231
- }))), Ne = c(() => ({
232
- cy: "waffle-div-legend",
233
- backgroundColor: e.value.style.chart.legend.backgroundColor,
234
- color: e.value.style.chart.legend.color,
235
- fontSize: e.value.style.chart.legend.fontSize,
236
- paddingBottom: 12,
237
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
238
- })), k = c(() => x.value.map((t) => t.value).reduce((t, a) => t + a, 0)), Z = v(null);
239
- function Le(t) {
240
- if (p.value.length === m.dataset.length) return;
241
- const a = i.value[t];
242
- Z.value = {
243
- datapoint: a,
244
- seriesIndex: a.absoluteIndex,
245
- series: h.value,
246
- config: e.value
247
- }, K.value = !0, A.value = i.value[t].serieIndex;
248
- const l = e.value.style.chart.tooltip.customFormat;
249
- if (tt(l) && lt(() => l({
250
- seriesIndex: i.value[t].absoluteIndex,
251
- datapoint: a,
252
- series: h.value,
253
- config: e.value
254
- })))
255
- Q.value = l({
256
- seriesIndex: i.value[t].absoluteIndex,
257
- datapoint: a,
258
- series: h.value,
259
- config: e.value
260
- });
261
- else {
262
- let o = "";
263
- 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 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" rx="1" fill="${a.color}" /></svg>`, e.value.style.chart.tooltip.showValue && (o += `<b>${I({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: a.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.tooltip.roundingValue })}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? o += `<span>(${(a.value / k.value * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}%)</span></div>` : o += `<b>${(a.value / k.value * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}%</b></div>`), Q.value = o;
264
- }
265
- }
266
- const _ = c(() => {
267
- const t = x.value.map((l) => ({
268
- name: l.name,
269
- color: l.color
270
- })), a = x.value.map((l) => l.value);
271
- return { head: t, body: a };
272
- });
273
- function ee(t) {
274
- return e.value.useBlurOnHover && ![null, void 0].includes(A.value) && A.value !== t ? `url(#blur_${S.value})` : "";
275
- }
276
- function pe() {
277
- De(() => {
278
- const t = _.value.head.map((o, u) => [[
279
- o.name
280
- ], [_.value.body[u]], [isNaN(_.value.body[u] / k.value) ? "-" : _.value.body[u] / k.value * 100]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), l = at(a);
281
- ot({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-waffle" });
282
- });
283
- }
284
- const X = c(() => {
285
- const t = [
286
- ' <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>',
287
- I({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: k.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
288
- "100%"
289
- ], a = _.value.head.map((u, r) => [
290
- {
291
- color: u.color,
292
- name: u.name
293
- },
294
- I({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: _.value.body[r], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
295
- isNaN(_.value.body[r] / k.value) ? "-" : (_.value.body[r] / k.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
296
- ]), l = {
297
- th: {
298
- backgroundColor: e.value.table.th.backgroundColor,
299
- color: e.value.table.th.color,
300
- outline: e.value.table.th.outline
301
- },
302
- td: {
303
- backgroundColor: e.value.table.td.backgroundColor,
304
- color: e.value.table.td.color,
305
- outline: e.value.table.td.outline
306
- },
307
- shape: "square",
308
- breakpoint: e.value.table.responsiveBreakpoint
309
- }, o = [
310
- e.value.table.columnNames.series,
311
- e.value.table.columnNames.value,
312
- e.value.table.columnNames.percentage
313
- ];
314
- return {
315
- head: t,
316
- body: a,
317
- config: l,
318
- colNames: o
319
- };
320
- }), R = v(!1);
321
- function Oe(t) {
322
- R.value = t, ae.value += 1;
323
- }
324
- function fe() {
325
- C.value.showTable = !C.value.showTable;
326
- }
327
- function ye() {
328
- C.value.showTooltip = !C.value.showTooltip;
329
- }
330
- return xe({
331
- getData: ze,
332
- generatePdf: re,
333
- generateCsv: pe,
334
- generateImage: se,
335
- toggleTable: fe,
336
- toggleTooltip: ye
337
- }), (t, a) => (s(), n("div", {
338
- class: ge(`vue-ui-waffle ${R.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
339
- ref_key: "waffleChart",
340
- ref: D,
341
- id: `vue-ui-waffle_${S.value}`,
342
- style: U(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`)
343
- }, [
344
- e.value.style.chart.title.text ? (s(), n("div", {
345
- key: 0,
346
- ref_key: "chartTitle",
347
- ref: oe,
348
- style: U(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px`)
349
- }, [
350
- te(nt, {
351
- config: {
352
- title: {
353
- cy: "waffle-title",
354
- ...e.value.style.chart.title
355
- },
356
- subtitle: {
357
- cy: "waffle-subtitle",
358
- ...e.value.style.chart.title.subtitle
359
- }
360
- }
361
- }, null, 8, ["config"])
362
- ], 4)) : w("", !0),
363
- e.value.userOptions.show && E.value ? (s(), q(it, {
364
- ref_key: "details",
365
- ref: _e,
366
- key: `user_options_${ae.value}`,
367
- backgroundColor: e.value.style.chart.backgroundColor,
368
- color: e.value.style.chart.color,
369
- isPrinting: f($e),
370
- isImaging: f(Te),
371
- uid: S.value,
372
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
373
- hasPdf: e.value.userOptions.buttons.pdf,
374
- hasImg: e.value.userOptions.buttons.img,
375
- hasXls: e.value.userOptions.buttons.csv,
376
- hasTable: e.value.userOptions.buttons.table,
377
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
378
- isFullscreen: R.value,
379
- isTooltip: C.value.showTooltip,
380
- titles: { ...e.value.userOptions.buttonTitles },
381
- chartElement: D.value,
382
- onToggleFullscreen: Oe,
383
- onGeneratePdf: f(re),
384
- onGenerateCsv: pe,
385
- onGenerateImage: f(se),
386
- onToggleTable: fe,
387
- onToggleTooltip: ye
388
- }, Be({ _: 2 }, [
389
- t.$slots.optionTooltip ? {
390
- name: "optionTooltip",
391
- fn: y(() => [
392
- g(t.$slots, "optionTooltip", {}, void 0, !0)
393
- ]),
394
- key: "0"
395
- } : void 0,
396
- t.$slots.optionPdf ? {
397
- name: "optionPdf",
398
- fn: y(() => [
399
- g(t.$slots, "optionPdf", {}, void 0, !0)
400
- ]),
401
- key: "1"
402
- } : void 0,
403
- t.$slots.optionCsv ? {
404
- name: "optionCsv",
405
- fn: y(() => [
406
- g(t.$slots, "optionCsv", {}, void 0, !0)
407
- ]),
408
- key: "2"
409
- } : void 0,
410
- t.$slots.optionImg ? {
411
- name: "optionImg",
412
- fn: y(() => [
413
- g(t.$slots, "optionImg", {}, void 0, !0)
414
- ]),
415
- key: "3"
416
- } : void 0,
417
- t.$slots.optionTable ? {
418
- name: "optionTable",
419
- fn: y(() => [
420
- g(t.$slots, "optionTable", {}, void 0, !0)
421
- ]),
422
- key: "4"
423
- } : void 0,
424
- t.$slots.optionFullscreen ? {
425
- name: "optionFullscreen",
426
- fn: y(({ toggleFullscreen: l, isFullscreen: o }) => [
427
- g(t.$slots, "optionFullscreen", Y(J({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
428
- ]),
429
- key: "5"
430
- } : void 0
431
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : w("", !0),
432
- E.value ? (s(), n("svg", {
433
- key: 2,
434
- xmlns: f(Ye),
435
- class: ge({ "vue-data-ui-fullscreen--on": R.value, "vue-data-ui-fulscreen--off": !R.value }),
436
- viewBox: `0 0 ${F.value.width <= 0 ? 10 : F.value.width} ${F.value.height <= 0 ? 10 : F.value.height}`,
437
- style: U(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
438
- }, [
439
- b("defs", null, [
440
- (s(!0), n($, null, M(i.value, (l, o) => (s(), n("radialGradient", {
441
- cx: "50%",
442
- cy: "50%",
443
- r: "50%",
444
- fx: "50%",
445
- fy: "50%",
446
- id: `gradient_${S.value}_${o}`
447
- }, [
448
- b("stop", {
449
- offset: "0%",
450
- "stop-color": `${f(Je)(l.color, 0.05)}${f(Ke)[100 - e.value.style.chart.layout.rect.gradientIntensity]}`
451
- }, null, 8, mt),
452
- b("stop", {
453
- offset: "100%",
454
- "stop-color": l.color
455
- }, null, 8, wt)
456
- ], 8, bt))), 256))
457
- ]),
458
- b("defs", null, [
459
- b("filter", {
460
- id: `blur_${S.value}`,
461
- x: "-50%",
462
- y: "-50%",
463
- width: "200%",
464
- height: "200%"
465
- }, _t, 8, xt)
466
- ]),
467
- e.value.useCustomCells ? (s(!0), n($, { key: 0 }, M(G.value, (l, o) => (s(), n("foreignObject", {
468
- x: l.x,
469
- y: l.y,
470
- height: N.value <= 0 ? 1e-4 : N.value,
471
- width: P.value <= 0 ? 1e-4 : P.value,
472
- class: "vue-ui-waffle-custom-cell-foreignObject"
473
- }, [
474
- g(t.$slots, "cell", Y(J({ cell: { ...l, color: i.value[o].color, ...i.value[o] }, isSelected: [null, void 0].includes(A.value) ? !0 : i.value[o].serieIndex === A.value })), void 0, !0)
475
- ], 8, $t))), 256)) : (s(), n($, { key: 1 }, [
476
- (s(!0), n($, null, M(G.value, (l, o) => (s(), n("rect", {
477
- rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
478
- x: l.x,
479
- y: l.y,
480
- height: N.value <= 0 ? 1e-4 : N.value,
481
- width: P.value <= 0 ? 1e-4 : P.value,
482
- fill: "white",
483
- stroke: e.value.style.chart.layout.rect.stroke,
484
- "stroke-width": e.value.style.chart.layout.rect.strokeWidth,
485
- filter: ee(i.value[o].serieIndex)
486
- }, null, 8, Tt))), 256)),
487
- (s(!0), n($, null, M(G.value, (l, o) => (s(), n("rect", {
488
- rx: e.value.style.chart.layout.rect.rounded ? e.value.style.chart.layout.rect.rounding : 0,
489
- x: l.x,
490
- y: l.y,
491
- height: N.value <= 0 ? 1e-4 : N.value,
492
- width: P.value <= 0 ? 1e-4 : P.value,
493
- fill: e.value.style.chart.layout.rect.useGradient && e.value.style.chart.layout.rect.gradientIntensity > 0 ? `url(#gradient_${S.value}_${o})` : i.value[o].color,
494
- stroke: e.value.style.chart.layout.rect.stroke,
495
- "stroke-width": e.value.style.chart.layout.rect.strokeWidth,
496
- filter: ee(i.value[o].serieIndex)
497
- }, null, 8, It))), 256))
498
- ], 64)),
499
- (s(!0), n($, null, M(G.value, (l, o) => (s(), n($, null, [
500
- !L.value && !e.value.style.chart.layout.grid.vertical && e.value.style.chart.layout.labels.captions.show && (i.value[o].isFirst && l.position < e.value.style.chart.layout.grid.size - 2 || i.value[o].isAbsoluteFirst && o % e.value.style.chart.layout.grid.size === 0 && i.value[o].absoluteStartIndex) ? (s(), n("foreignObject", {
501
- key: 0,
502
- x: l.x + e.value.style.chart.layout.labels.captions.offsetX,
503
- y: l.y + e.value.style.chart.layout.labels.captions.offsetY,
504
- height: H.value <= 0 ? 1e-4 : H.value,
505
- width: j.value * e.value.style.chart.layout.grid.size <= 0 ? 1e-4 : j.value * e.value.style.chart.layout.grid.size,
506
- filter: ee(i.value[o].serieIndex)
507
- }, [
508
- b("div", {
509
- class: "vue-ui-waffle-caption",
510
- style: U(`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 ${j.value / 12}px;color:${f(Qe)(i.value[o].color)};gap:2px`)
511
- }, [
512
- e.value.style.chart.layout.labels.captions.showSerieName ? (s(), n("span", Ft, T(e.value.style.chart.layout.labels.captions.serieNameAbbreviation ? f(Ze)({ source: i.value[o].name, length: e.value.style.chart.layout.labels.captions.serieNameMaxAbbreviationSize }) : i.value[o].name) + ": ", 1)) : w("", !0),
513
- e.value.style.chart.layout.labels.captions.showPercentage ? (s(), n("span", zt, T(f(I)({ v: i.value[o].proportion, s: "%", r: e.value.style.chart.layout.labels.captions.roundingPercentage })), 1)) : w("", !0),
514
- e.value.style.chart.layout.labels.captions.showPercentage && e.value.style.chart.layout.labels.captions.showValue ? (s(), n("span", Pt, " (" + T(f(I)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: i.value[o].value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.layout.labels.captions.roundingValue })) + ") ", 1)) : w("", !0),
515
- !e.value.style.chart.layout.labels.captions.showPercentage && e.value.style.chart.layout.labels.captions.showValue ? (s(), n("span", Nt, T(f(I)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: i.value[o].value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.layout.labels.captions.roundingValue })), 1)) : w("", !0)
516
- ], 4)
517
- ], 8, St)) : w("", !0)
518
- ], 64))), 256)),
519
- (s(!0), n($, null, M(G.value, (l, o) => (s(), n("rect", {
520
- onMouseover: (u) => Le(o),
521
- onMouseleave: a[0] || (a[0] = (u) => {
522
- K.value = !1, A.value = null;
523
- }),
524
- x: l.x,
525
- y: l.y,
526
- height: H.value <= 0 ? 1e-4 : H.value,
527
- width: j.value <= 0 ? 1e-4 : j.value,
528
- fill: "transparent",
529
- stroke: "none"
530
- }, null, 40, Lt))), 256)),
531
- g(t.$slots, "svg", { svg: F.value }, void 0, !0)
532
- ], 14, gt)) : w("", !0),
533
- E.value ? w("", !0) : (s(), q(pt, {
534
- key: 3,
535
- config: {
536
- type: "waffle",
537
- style: {
538
- backgroundColor: e.value.style.chart.backgroundColor,
539
- waffle: {
540
- color: "#CCCCCC"
541
- }
542
- }
543
- }
544
- }, null, 8, ["config"])),
545
- b("div", {
546
- ref_key: "chartLegend",
547
- ref: ue
548
- }, [
549
- e.value.style.chart.legend.show ? (s(), q(vt, {
550
- key: 0,
551
- legendSet: V.value,
552
- config: Ne.value,
553
- onClickMarker: a[1] || (a[1] = ({ legend: l }) => he(l.uid))
554
- }, {
555
- item: y(({ legend: l }) => [
556
- b("div", {
557
- onClick: (o) => l.segregate(),
558
- style: U(`opacity:${p.value.includes(l.uid) ? 0.5 : 1}`)
559
- }, [
560
- be(T(l.name) + ": " + T(f(I)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: l.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.legend.roundingValue, isAnimating: L.value })) + " ", 1),
561
- p.value.includes(l.uid) ? (s(), n("span", Vt, " ( - % ) ")) : (s(), n("span", At, " (" + T(isNaN(l.value / k.value) ? "-" : f(I)({ v: l.value / k.value * 100, s: "%", r: e.value.style.chart.legend.roundingPercentage, isAnimating: L.value })) + ") ", 1))
562
- ], 12, Ot)
563
- ]),
564
- _: 1
565
- }, 8, ["legendSet", "config"])) : g(t.$slots, "legend", {
566
- key: 1,
567
- legend: V.value
568
- }, void 0, !0)
569
- ], 512),
570
- te(ct, {
571
- show: C.value.showTooltip && K.value && p.value.length < m.dataset.length,
572
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
573
- color: e.value.style.chart.tooltip.color,
574
- borderRadius: e.value.style.chart.tooltip.borderRadius,
575
- borderColor: e.value.style.chart.tooltip.borderColor,
576
- borderWidth: e.value.style.chart.tooltip.borderWidth,
577
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
578
- parent: D.value,
579
- content: Q.value,
580
- isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
581
- fontSize: e.value.style.chart.tooltip.fontSize
582
- }, {
583
- "tooltip-before": y(() => [
584
- g(t.$slots, "tooltip-before", Y(J({ ...Z.value })), void 0, !0)
585
- ]),
586
- "tooltip-after": y(() => [
587
- g(t.$slots, "tooltip-after", Y(J({ ...Z.value })), void 0, !0)
588
- ]),
589
- _: 3
590
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "parent", "content", "isCustom", "fontSize"]),
591
- E.value ? (s(), q(ft, {
592
- key: 4,
593
- hideDetails: "",
594
- config: {
595
- open: C.value.showTable,
596
- maxHeight: 1e4,
597
- body: {
598
- backgroundColor: e.value.style.chart.backgroundColor,
599
- color: e.value.style.chart.color
600
- },
601
- head: {
602
- backgroundColor: e.value.style.chart.backgroundColor,
603
- color: e.value.style.chart.color
604
- }
605
- }
606
- }, {
607
- content: y(() => [
608
- te(et, {
609
- colNames: X.value.colNames,
610
- head: X.value.head,
611
- body: X.value.body,
612
- config: X.value.config,
613
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
614
- onClose: a[2] || (a[2] = (l) => C.value.showTable = !1)
615
- }, {
616
- th: y(({ th: l }) => [
617
- b("div", {
618
- innerHTML: l,
619
- style: { display: "flex", "align-items": "center" }
620
- }, null, 8, Mt)
621
- ]),
622
- td: y(({ td: l }) => [
623
- be(T(l.name || l), 1)
624
- ]),
625
- _: 1
626
- }, 8, ["colNames", "head", "body", "config", "title"])
627
- ]),
628
- _: 1
629
- }, 8, ["config"])) : w("", !0)
630
- ], 14, yt));
631
- }
632
- }, qt = /* @__PURE__ */ Re(Bt, [["__scopeId", "data-v-e4e6d49b"]]);
633
- export {
634
- qt as default
635
- };