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,768 +0,0 @@
1
- import { computed as k, ref as d, onMounted as Me, onBeforeUnmount as Be, watch as Ue, openBlock as u, createElementBlock as n, normalizeClass as O, normalizeStyle as le, createVNode as ae, createCommentVNode as y, createBlock as W, unref as c, createSlots as Re, withCtx as m, renderSlot as C, normalizeProps as oe, guardReactiveProps as se, createElementVNode as b, Fragment as x, renderList as $, toDisplayString as N, createTextVNode as H, nextTick as Ee, pushScopeId as Ge, popScopeId as Xe } from "vue";
2
- import { _ as Ye, e as We, f as He, p as q, i as qe, j as P, g as je, h as Je, m as ke, n as T, X as Ke, H as Qe, s as A, u as ue, y as $e, D as Ze, z as et, v as tt, w as lt } from "./data-table-d-VcuH-r.js";
3
- import { t as at, u as ot } from "./vue-ui-age-pyramid-4hcuKpFY.js";
4
- import { t as st } from "./themes-lgjsYHsH.js";
5
- import { u as Ce, _ as ut } from "./title-BF-9Qcni.js";
6
- import { U as nt } from "./user-options-DZgCz8UA.js";
7
- import { _ as rt } from "./tooltip-D85WEOKi.js";
8
- import { L as it } from "./legend-DJCYLsl_.js";
9
- import { u as dt, a as ct, S as vt, A as ht } from "./vue-ui-3d-bar-DW7kGJSz.js";
10
- const ne = (V) => (Ge("data-v-fbefb973"), V = V(), Xe(), V), ft = ["id"], yt = ["xmlns", "viewBox"], bt = ["id", "fr"], pt = /* @__PURE__ */ ne(() => /* @__PURE__ */ b("stop", {
11
- offset: "0%",
12
- "stop-color": "#FFFFFF",
13
- "stop-opacity": "0"
14
- }, null, -1)), gt = ["offset", "stop-opacity"], mt = /* @__PURE__ */ ne(() => /* @__PURE__ */ b("stop", {
15
- offset: "100%",
16
- "stop-color": "#FFFFFF",
17
- "stop-opacity": "0"
18
- }, null, -1)), xt = ["id"], wt = ["id"], _t = /* @__PURE__ */ ne(() => /* @__PURE__ */ b("feColorMatrix", {
19
- type: "saturate",
20
- values: "0"
21
- }, null, -1)), kt = ["id"], $t = ["flood-color"], Ct = ["cx", "cy", "r", "fill", "filter"], Lt = ["d", "fill", "stroke", "stroke-width", "filter"], St = { key: 0 }, Ft = ["d", "fill"], Nt = { key: 1 }, Tt = ["x", "y", "font-size", "font-weight", "fill"], It = { key: 2 }, zt = ["filter"], Dt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Ot = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Pt = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], At = ["d", "fill", "onMouseenter", "onClick"], Vt = {
22
- key: 0,
23
- class: "vue-ui-nested-donuts-legend-title"
24
- }, Mt = ["onClick"], Bt = ["innerHTML"], Ut = {
25
- __name: "vue-ui-nested-donuts",
26
- props: {
27
- config: {
28
- type: Object,
29
- default() {
30
- return {};
31
- }
32
- },
33
- dataset: {
34
- type: Array,
35
- default() {
36
- return [];
37
- }
38
- }
39
- },
40
- emits: ["selectLegend", "selectDatapoint"],
41
- setup(V, { expose: Le, emit: re }) {
42
- const z = V, { vue_ui_nested_donuts: Se } = dt(), R = k(() => !!z.dataset && z.dataset.length), p = d(We()), j = d(!1), J = d(""), Fe = d(null), ie = d(0), M = d(null), de = d(null), K = d(null), B = d(!1);
43
- function Ne(t) {
44
- B.value = t, ie.value += 1;
45
- }
46
- const e = k(() => {
47
- const t = Ce({
48
- userConfig: z.config,
49
- defaultConfig: Se
50
- });
51
- return t.theme ? {
52
- ...Ce({
53
- userConfig: st.vue_ui_nested_donuts[t.theme] || z.config,
54
- defaultConfig: t
55
- }),
56
- customPalette: He[t.theme] || q
57
- } : t;
58
- }), E = d(null);
59
- Me(() => {
60
- if (qe(z.dataset) && P({
61
- componentName: "VueUiNestedDonuts",
62
- type: "dataset"
63
- }), e.value.responsive) {
64
- const t = at(() => {
65
- const { width: s, height: l } = ot({
66
- chart: M.value,
67
- title: e.value.style.chart.title.text ? de.value : null,
68
- legend: e.value.style.chart.legend.show ? K.value : null
69
- });
70
- v.value.width = s, v.value.height = l;
71
- });
72
- E.value = new ResizeObserver(t), E.value.observe(M.value.parentNode);
73
- }
74
- }), Be(() => {
75
- E.value && E.value.disconnect();
76
- });
77
- const { isPrinting: Te, isImaging: Ie, generatePdf: ce, generateImage: ve } = ct({
78
- elementId: `nested_donuts_${p.value}`,
79
- fileName: e.value.style.chart.title.text || "vue-ui-nested-donuts"
80
- }), ze = k(() => je(e.value.customPalette)), w = d({
81
- dataLabels: {
82
- show: e.value.style.chart.layout.labels.dataLabels.show
83
- },
84
- showTable: e.value.table.show,
85
- showTooltip: e.value.style.chart.tooltip.show
86
- }), v = d({
87
- height: 512,
88
- width: 512
89
- });
90
- function De({ datapoint: t, index: s }) {
91
- re("selectDatapoint", { datapoint: t, index: s });
92
- }
93
- const f = d([]), L = k(() => (z.dataset.forEach((t, s) => {
94
- [null, void 0].includes(t.name) && P({
95
- componentName: "VueUiNestedDonuts",
96
- type: "datasetSerieAttribute",
97
- property: "name",
98
- index: s
99
- }), [null, void 0].includes(t.series) ? P({
100
- componentName: "VueUiNestedDonuts",
101
- type: "datasetSerieAttribute",
102
- property: "series",
103
- index: s
104
- }) : t.series.length === 0 ? P({
105
- componentName: "VueUiNestedDonuts",
106
- type: "datasetAttributeEmpty",
107
- property: `series at index ${s}`
108
- }) : t.series.forEach((l, a) => {
109
- [null, void 0].includes(l.name) && P({
110
- componentName: "VueUiNestedDonuts",
111
- type: "datasetSerieAttribute",
112
- property: "name",
113
- index: a,
114
- key: "serie"
115
- }), [null, void 0].includes(l.values) && P({
116
- componentName: "VueUiNestedDonuts",
117
- type: "datasetSerieAttribute",
118
- property: "values",
119
- index: a,
120
- key: "serie"
121
- });
122
- });
123
- }), z.dataset.map((t, s) => ({
124
- ...t,
125
- total: t.series.filter((l) => !f.value.includes(l.id)).map((l) => (l.values || []).reduce((a, o) => a + o, 0)).reduce((l, a) => l + a, 0),
126
- datasetIndex: s,
127
- id: `${p.value}_${s}`,
128
- series: t.series.map((l, a) => ({
129
- name: l.name,
130
- arcOf: t.name,
131
- arcOfId: `${p.value}_${s}`,
132
- id: `${p.value}_${s}_${a}`,
133
- seriesIndex: a,
134
- datasetIndex: s,
135
- color: Je(l.color) || ze.value[a] || q[a] || q[a % q.length],
136
- value: (l.values || []).reduce((o, r) => o + r, 0),
137
- absoluteValues: l.values || []
138
- }))
139
- }))));
140
- d(e.value.style.chart.layout.donut.strokeWidth);
141
- const S = k(() => Math.min(v.value.height, v.value.width) * (e.value.style.chart.layout.donut.strokeWidth / 512)), he = k(() => [...L.value].map((t, s) => {
142
- const l = t.series.filter((a) => !f.value.includes(a.id)).map((a) => a.value).reduce((a, o) => a + o, 0);
143
- return {
144
- ...t,
145
- total: l,
146
- series: t.series.filter((a) => !f.value.includes(a.id)).map((a) => ({
147
- ...a,
148
- proportion: a.value / l
149
- }))
150
- };
151
- }));
152
- function Oe(t, s, l) {
153
- let a = 0;
154
- for (let o = 0; o < t.length; o += 1)
155
- l.includes(t[o]) && (a += 1);
156
- return a < s;
157
- }
158
- const h = d(he.value);
159
- Ue(() => he.value, (t) => h.value = t);
160
- const fe = d(null), ye = d(null);
161
- function Q(t) {
162
- re("selectLegend", t);
163
- const s = L.value.flatMap((i) => i.series).find((i) => i.id === t.id), l = h.value.flatMap((i) => i.series).find((i) => i.id === t.id);
164
- let o = l ? l.value : 0;
165
- const r = L.value.find((i) => i.id === s.arcOfId).series.map((i) => i.id), g = Oe(r, r.length - 1, f.value);
166
- if (f.value.includes(t.id)) {
167
- let i = function() {
168
- o > s.value ? (cancelAnimationFrame(fe.value), h.value = h.value.map((_) => ({
169
- ..._,
170
- series: _.series.map((F) => F.id == t.id ? {
171
- ...F,
172
- value: s.value
173
- } : F)
174
- }))) : (o += s.value * 0.025, h.value = h.value.map((_) => ({
175
- ..._,
176
- series: _.series.map((F) => F.id === t.id ? {
177
- ...F,
178
- value: o
179
- } : F)
180
- })), fe.value = requestAnimationFrame(i));
181
- };
182
- f.value = f.value.filter((_) => _ !== t.id), i();
183
- } else if (g) {
184
- let i = function() {
185
- o < 0.1 ? (cancelAnimationFrame(ye.value), f.value.push(t.id), h.value = h.value.map((_, F) => ({
186
- ..._,
187
- series: _.series.map((D) => D.id === t.id ? {
188
- ...D,
189
- value: 0
190
- } : D)
191
- }))) : (o /= 1.1, h.value = h.value.map((_, F) => ({
192
- ..._,
193
- series: _.series.map((D) => D.id === t.id ? {
194
- ...D,
195
- value: o
196
- } : D)
197
- })), ye.value = requestAnimationFrame(i));
198
- };
199
- i();
200
- }
201
- }
202
- const U = k(() => h.value.map((t, s) => {
203
- const l = s * S.value / L.value.length;
204
- return {
205
- ...t,
206
- radius: S.value - l,
207
- donut: ke(
208
- { series: t.series },
209
- v.value.width / 2,
210
- v.value.height / 2,
211
- S.value - l,
212
- S.value - l,
213
- 1.99999,
214
- 2,
215
- 1,
216
- 360,
217
- 105.25,
218
- S.value / L.value.length * e.value.style.chart.layout.donut.spacingRatio
219
- )
220
- };
221
- })), be = k(() => [...L.value].map((t, s) => {
222
- const l = s * S.value / L.value.length;
223
- return {
224
- sizeRatio: l,
225
- donut: ke(
226
- { series: [{ value: 1 }] },
227
- v.value.width / 2,
228
- v.value.height / 2,
229
- S.value - l,
230
- S.value - l,
231
- 1.99999,
232
- 2,
233
- 1,
234
- 360,
235
- 105.25,
236
- S.value / L.value.length * e.value.style.chart.layout.donut.spacingRatio
237
- )[0]
238
- };
239
- })), pe = d(null), G = d(null), X = d(null), Z = d(null);
240
- function Pe({ datapoint: t, _relativeIndex: s, seriesIndex: l }) {
241
- pe.value = t.arcOfId, G.value = t.id, X.value = l, Z.value = {
242
- datapoint: t,
243
- seriesIndex: l,
244
- series: h.value,
245
- config: e.value
246
- };
247
- const a = e.value.style.chart.tooltip.customFormat;
248
- if ($e(a) && et(() => a({
249
- seriesIndex: l,
250
- datapoint: t,
251
- series: h.value,
252
- config: e.value
253
- })))
254
- J.value = a({
255
- seriesIndex: l,
256
- datapoint: t,
257
- series: h.value,
258
- config: e.value
259
- });
260
- else {
261
- let o = "";
262
- if (e.value.style.chart.tooltip.showAllItemsAtIndex && f.value.length === 0) {
263
- const r = h.value.map((g) => g.series.find((i) => i.seriesIndex === l));
264
- r.forEach((g, i) => {
265
- if (!g) return "";
266
- o += `
267
- <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i < r.length - 1 ? `border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor}` : ""}">
268
- <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
269
- <svg viewBox="0 0 20 20" height="${e.value.style.chart.tooltip.fontSize}" width="${e.value.style.chart.tooltip.fontSize}">
270
- <circle cx="10" cy="10" r="10" fill="${g.color}"/>
271
- </svg>
272
- <span>
273
- ${g.arcOf ?? ""} - ${g.name}
274
- </span>
275
- </div>
276
- <span>
277
- ${e.value.style.chart.tooltip.showValue ? `<b>${T({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: t.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.tooltip.roundingValue })}</b>` : ""}
278
- ${e.value.style.chart.tooltip.showPercentage ? `(${T({ v: g.proportion * 100, s: "%", r: e.value.style.chart.tooltip.roundingPercentage })})` : ""}
279
- </span>
280
- </div>
281
- `;
282
- });
283
- } else
284
- o += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.arcOf ?? ""} - ${t.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"><circle cx="6" cy="6" r="6" stroke="none" fill="${t.color}"/></svg>`, e.value.style.chart.tooltip.showValue && (o += `<b>${T({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: t.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>(${(t.proportion * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}%)</span></div>` : o += `<b>${(t.proportion * 100).toFixed(e.value.style.chart.tooltip.roundingPercentage)}%</b></div>`);
285
- J.value = `<div style="font-size:${e.value.style.chart.tooltip.fontSize}px">${o}</div>`;
286
- }
287
- j.value = !0;
288
- }
289
- function ee(t) {
290
- return t.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
291
- }
292
- function ge(t, s) {
293
- if (!e.value.useBlurOnHover)
294
- return "";
295
- if (e.value.style.chart.tooltip.showAllItemsAtIndex && f.value.length === 0)
296
- return [null, void 0].includes(X.value) || X.value === s ? "" : `url(#blur_${p.value})`;
297
- if (!e.value.style.chart.tooltip.showAllItemsAtIndex || f.value.length)
298
- return [null, void 0].includes(G.value) || G.value === t.id ? "" : `url(#blur_${p.value})`;
299
- }
300
- const te = k(() => L.value.map((t, s) => t.series.map((l, a) => ({
301
- name: l.name,
302
- color: l.color,
303
- value: l.value,
304
- shape: "circle",
305
- arcOf: l.arcOf,
306
- id: l.id,
307
- seriesIndex: a,
308
- datasetIndex: s,
309
- total: t.series.filter((o) => !f.value.includes(o.id)).map((o) => o.value).reduce((o, r) => o + r, 0)
310
- })).map((l) => ({
311
- ...l,
312
- opacity: f.value.includes(l.id) ? 0.5 : 1,
313
- segregate: () => Q(l),
314
- isSegregated: f.value.includes(l.id)
315
- })))), Ae = k(() => ({
316
- cy: "nested-donuts-legend",
317
- backgroundColor: e.value.style.chart.legend.backgroundColor,
318
- color: e.value.style.chart.legend.color,
319
- fontSize: e.value.style.chart.legend.fontSize,
320
- paddingBottom: 12,
321
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
322
- })), I = k(() => {
323
- const t = h.value.flatMap((l) => l.series.map((a) => ({
324
- name: `${l.name} - ${a.name}`,
325
- color: a.color,
326
- total: l.total
327
- }))), s = h.value.flatMap((l) => l.series.map((a) => a.value));
328
- return { head: t, body: s };
329
- });
330
- function me() {
331
- Ee(() => {
332
- const t = I.value.head.map((a, o) => [[
333
- a.name
334
- ], [I.value.body[o]], [isNaN(I.value.body[o] / a.total) ? "-" : I.value.body[o] / a.total * 100]]), s = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), l = tt(s);
335
- lt({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-nested-donuts" });
336
- });
337
- }
338
- const Y = k(() => {
339
- const t = [
340
- e.value.table.columnNames.series,
341
- e.value.table.columnNames.value,
342
- e.value.table.columnNames.percentage
343
- ], s = I.value.head.map((o, r) => {
344
- const g = T({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: I.value.body[r], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue });
345
- return [
346
- {
347
- color: o.color,
348
- name: o.name
349
- },
350
- g,
351
- isNaN(I.value.body[r] / o.total) ? "-" : (I.value.body[r] / o.total * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
352
- ];
353
- }), l = {
354
- th: {
355
- backgroundColor: e.value.table.th.backgroundColor,
356
- color: e.value.table.th.color,
357
- outline: e.value.table.th.outline
358
- },
359
- td: {
360
- backgroundColor: e.value.table.td.backgroundColor,
361
- color: e.value.table.td.color,
362
- outline: e.value.table.td.outline
363
- },
364
- breakpoint: e.value.table.responsiveBreakpoint
365
- };
366
- return {
367
- colNames: [
368
- e.value.table.columnNames.series,
369
- e.value.table.columnNames.value,
370
- e.value.table.columnNames.percentage
371
- ],
372
- head: t,
373
- body: s,
374
- config: l
375
- };
376
- });
377
- function Ve() {
378
- return L.value;
379
- }
380
- function xe() {
381
- w.value.showTable = !w.value.showTable;
382
- }
383
- function we() {
384
- w.value.dataLabels.show = !w.value.dataLabels.show;
385
- }
386
- function _e() {
387
- w.value.showTooltip = !w.value.showTooltip;
388
- }
389
- return Le({
390
- getData: Ve,
391
- generatePdf: ce,
392
- generateCsv: me,
393
- generateImage: ve,
394
- toggleTable: xe,
395
- toggleLabels: we,
396
- toggleTooltip: _e
397
- }), (t, s) => (u(), n("div", {
398
- ref_key: "nestedDonutsChart",
399
- ref: M,
400
- class: O(`vue-ui-nested-donuts ${B.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
401
- style: le(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${!e.value.style.chart.title.text && e.value.userOptions.show ? "padding-top:36px" : ""};background:${e.value.style.chart.backgroundColor}`),
402
- id: `nested_donuts_${p.value}`
403
- }, [
404
- e.value.style.chart.title.text ? (u(), n("div", {
405
- key: 0,
406
- ref_key: "chartTitle",
407
- ref: de
408
- }, [
409
- ae(ut, {
410
- config: {
411
- title: {
412
- cy: "donut-div-title",
413
- ...e.value.style.chart.title
414
- },
415
- subtitle: {
416
- cy: "donut-div-subtitle",
417
- ...e.value.style.chart.title.subtitle
418
- }
419
- }
420
- }, null, 8, ["config"])
421
- ], 512)) : y("", !0),
422
- e.value.userOptions.show && R.value ? (u(), W(nt, {
423
- ref: "details",
424
- key: `user_option_${ie.value}`,
425
- backgroundColor: e.value.style.chart.backgroundColor,
426
- color: e.value.style.chart.color,
427
- isPrinting: c(Te),
428
- isImaging: c(Ie),
429
- uid: p.value,
430
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
431
- hasPdf: e.value.userOptions.buttons.pdf,
432
- hasXls: e.value.userOptions.buttons.csv,
433
- hasImg: e.value.userOptions.buttons.img,
434
- hasTable: e.value.userOptions.buttons.table,
435
- hasLabel: e.value.userOptions.buttons.labels,
436
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
437
- isFullscreen: B.value,
438
- isTooltip: w.value.showTooltip,
439
- titles: { ...e.value.userOptions.buttonTitles },
440
- chartElement: M.value,
441
- onToggleFullscreen: Ne,
442
- onGeneratePdf: c(ce),
443
- onGenerateCsv: me,
444
- onGenerateImage: c(ve),
445
- onToggleTable: xe,
446
- onToggleLabels: we,
447
- onToggleTooltip: _e
448
- }, Re({ _: 2 }, [
449
- t.$slots.optionTooltip ? {
450
- name: "optionTooltip",
451
- fn: m(() => [
452
- C(t.$slots, "optionTooltip", {}, void 0, !0)
453
- ]),
454
- key: "0"
455
- } : void 0,
456
- t.$slots.optionPdf ? {
457
- name: "optionPdf",
458
- fn: m(() => [
459
- C(t.$slots, "optionPdf", {}, void 0, !0)
460
- ]),
461
- key: "1"
462
- } : void 0,
463
- t.$slots.optionCsv ? {
464
- name: "optionCsv",
465
- fn: m(() => [
466
- C(t.$slots, "optionCsv", {}, void 0, !0)
467
- ]),
468
- key: "2"
469
- } : void 0,
470
- t.$slots.optionImg ? {
471
- name: "optionImg",
472
- fn: m(() => [
473
- C(t.$slots, "optionImg", {}, void 0, !0)
474
- ]),
475
- key: "3"
476
- } : void 0,
477
- t.$slots.optionTable ? {
478
- name: "optionTable",
479
- fn: m(() => [
480
- C(t.$slots, "optionTable", {}, void 0, !0)
481
- ]),
482
- key: "4"
483
- } : void 0,
484
- t.$slots.optionLabels ? {
485
- name: "optionLabels",
486
- fn: m(() => [
487
- C(t.$slots, "optionLabels", {}, void 0, !0)
488
- ]),
489
- key: "5"
490
- } : void 0,
491
- t.$slots.optionFullscreen ? {
492
- name: "optionFullscreen",
493
- fn: m(({ toggleFullscreen: l, isFullscreen: a }) => [
494
- C(t.$slots, "optionFullscreen", oe(se({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
495
- ]),
496
- key: "6"
497
- } : void 0
498
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : y("", !0),
499
- R.value ? (u(), n("svg", {
500
- key: 2,
501
- xmlns: c(Ke),
502
- class: O({ "vue-data-ui-fullscreen--on": B.value, "vue-data-ui-fulscreen--off": !B.value }),
503
- viewBox: `0 0 ${v.value.width <= 0 ? 1e-3 : v.value.width} ${v.value.height < 0 ? 1e-3 : v.value.height}`,
504
- style: le(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
505
- }, [
506
- b("defs", null, [
507
- (u(!0), n(x, null, $(be.value, (l, a) => (u(), n("radialGradient", {
508
- id: `radial_${p.value}_${a}`,
509
- cx: "50%",
510
- cy: "50%",
511
- r: "50%",
512
- fr: 30 - 1 * (a + 1) + "%"
513
- }, [
514
- pt,
515
- b("stop", {
516
- offset: 70 - 20 * a + "%",
517
- "stop-color": "#FFFFFF",
518
- "stop-opacity": e.value.style.chart.gradientIntensity / 100
519
- }, null, 8, gt),
520
- mt
521
- ], 8, bt))), 256))
522
- ]),
523
- b("defs", null, [
524
- b("filter", {
525
- id: `blur_${p.value}`,
526
- x: "-50%",
527
- y: "-50%",
528
- width: "200%",
529
- height: "200%"
530
- }, [
531
- b("feGaussianBlur", {
532
- in: "SourceGraphic",
533
- stdDeviation: 2,
534
- id: `blur_std_${p.value}`
535
- }, null, 8, wt),
536
- _t
537
- ], 8, xt),
538
- b("filter", {
539
- id: `shadow_${p.value}`,
540
- "color-interpolation-filters": "sRGB"
541
- }, [
542
- b("feDropShadow", {
543
- dx: "0",
544
- dy: "0",
545
- stdDeviation: "10",
546
- "flood-opacity": "0.5",
547
- "flood-color": e.value.style.chart.layout.donut.shadowColor
548
- }, null, 8, $t)
549
- ], 8, kt)
550
- ]),
551
- (u(!0), n(x, null, $(U.value, (l) => (u(), n("circle", {
552
- cx: v.value.width / 2,
553
- cy: v.value.height / 2,
554
- r: l.radius < 0 ? 1e-5 : l.radius,
555
- fill: e.value.style.chart.backgroundColor,
556
- filter: e.value.style.chart.layout.donut.useShadow ? `url(#shadow_${p.value})` : ""
557
- }, null, 8, Ct))), 256)),
558
- (u(!0), n(x, null, $(U.value, (l, a) => (u(), n("g", null, [
559
- (u(!0), n(x, null, $(l.donut, (o, r) => (u(), n("g", null, [
560
- b("path", {
561
- class: "vue-ui-donut-arc-path",
562
- d: o.arcSlice,
563
- fill: `${o.color}CC`,
564
- stroke: e.value.style.chart.backgroundColor,
565
- "stroke-width": e.value.style.chart.layout.donut.borderWidth,
566
- filter: ge(o, r)
567
- }, null, 8, Lt)
568
- ]))), 256))
569
- ]))), 256)),
570
- e.value.style.chart.useGradient ? (u(), n("g", St, [
571
- (u(!0), n(x, null, $(be.value, (l, a) => (u(), n("g", null, [
572
- b("path", {
573
- d: l.donut.arcSlice,
574
- fill: `url(#radial_${p.value}_${a})`,
575
- stroke: "transparent",
576
- "stroke-width": "0"
577
- }, null, 8, Ft)
578
- ]))), 256))
579
- ])) : y("", !0),
580
- e.value.style.chart.layout.labels.dataLabels.showDonutName ? (u(), n("g", Nt, [
581
- (u(!0), n(x, null, $(U.value, (l, a) => (u(), n("g", null, [
582
- (u(!0), n(x, null, $(l.donut, (o, r) => (u(), n("g", null, [
583
- r === 0 && v.value.width && v.value.height ? (u(), n("text", {
584
- key: 0,
585
- class: O({ animated: e.value.useCssAnimation }),
586
- x: v.value.width / 2,
587
- y: o.startY - e.value.style.chart.layout.labels.dataLabels.fontSize + e.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,
588
- "text-anchor": "middle",
589
- "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
590
- "font-weight": e.value.style.chart.layout.labels.dataLabels.boldDonutName ? "bold" : "normal",
591
- fill: e.value.style.chart.layout.labels.dataLabels.color
592
- }, N(e.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? c(Qe)({ source: l.name, length: e.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize }) : l.name), 11, Tt)) : y("", !0)
593
- ]))), 256))
594
- ]))), 256))
595
- ])) : y("", !0),
596
- e.value.style.chart.layout.labels.dataLabels.show ? (u(), n("g", It, [
597
- (u(!0), n(x, null, $(U.value, (l, a) => (u(), n("g", null, [
598
- (u(!0), n(x, null, $(l.donut, (o, r) => (u(), n("g", {
599
- filter: ge(o, r)
600
- }, [
601
- ee(o) && w.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage ? (u(), n("text", {
602
- key: 0,
603
- class: O({ animated: e.value.useCssAnimation }),
604
- "text-anchor": c(A)(o, !0).anchor,
605
- x: c(A)(o, !1, e.value.style.chart.layout.labels.dataLabels.offsetX).x || 0,
606
- y: c(ue)(o, e.value.style.chart.layout.labels.dataLabels.offsetY, e.value.style.chart.layout.labels.dataLabels.offsetY),
607
- fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? o.color : e.value.style.chart.layout.labels.dataLabels.color,
608
- "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
609
- "font-weight": e.value.style.chart.layout.labels.dataLabels.boldPercentage ? "bold" : "normal"
610
- }, N(c(T)({ v: o.proportion * 100, s: "%", r: e.value.style.chart.layout.labels.dataLabels.roundingPercentage })), 11, Dt)) : y("", !0),
611
- ee(o) && w.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue ? (u(), n("text", {
612
- key: 1,
613
- class: O({ animated: e.value.useCssAnimation }),
614
- "text-anchor": c(A)(o, !0).anchor,
615
- x: c(A)(o, !1, e.value.style.chart.layout.labels.dataLabels.offsetX).x || 0,
616
- y: c(ue)(o, e.value.style.chart.layout.labels.dataLabels.offsetY, e.value.style.chart.layout.labels.dataLabels.offsetY) + e.value.style.chart.layout.labels.dataLabels.fontSize,
617
- fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? o.color : e.value.style.chart.layout.labels.dataLabels.color,
618
- "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
619
- "font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
620
- }, " (" + N(c(T)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: o.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.layout.labels.dataLabels.roundingValue })) + ") ", 11, Ot)) : y("", !0),
621
- ee(o) && w.value.dataLabels.show && !e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue ? (u(), n("text", {
622
- key: 2,
623
- class: O({ animated: e.value.useCssAnimation }),
624
- "text-anchor": c(A)(o, !0).anchor,
625
- x: c(A)(o, !1, e.value.style.chart.layout.labels.dataLabels.offsetX).x || 0,
626
- y: c(ue)(o, e.value.style.chart.layout.labels.dataLabels.offsetY, e.value.style.chart.layout.labels.dataLabels.offsetY),
627
- fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? o.color : e.value.style.chart.layout.labels.dataLabels.color,
628
- "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
629
- "font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
630
- }, N(c(T)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: o.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.layout.labels.dataLabels.roundingValue })), 11, Pt)) : y("", !0)
631
- ], 8, zt))), 256))
632
- ]))), 256))
633
- ])) : y("", !0),
634
- (u(!0), n(x, null, $(U.value, (l, a) => (u(), n("g", null, [
635
- (u(!0), n(x, null, $(l.donut, (o, r) => (u(), n("g", null, [
636
- b("path", {
637
- "data-cy-donut-trap": "",
638
- d: o.arcSlice,
639
- fill: Fe.value === a ? "rgba(0,0,0,0.1)" : "transparent",
640
- onMouseenter: (g) => Pe({
641
- datapoint: o,
642
- relativeIndex: a,
643
- seriesIndex: o.seriesIndex
644
- }),
645
- onClick: (g) => De({ datapoint: o, index: r }),
646
- onMouseleave: s[0] || (s[0] = (g) => {
647
- j.value = !1, pe.value = null, G.value = null, X.value = null;
648
- })
649
- }, null, 40, At)
650
- ]))), 256))
651
- ]))), 256)),
652
- C(t.$slots, "svg", { svg: v.value }, void 0, !0)
653
- ], 14, yt)) : y("", !0),
654
- R.value ? y("", !0) : (u(), W(vt, {
655
- key: 3,
656
- config: {
657
- type: "donut",
658
- style: {
659
- backgroundColor: e.value.style.chart.backgroundColor,
660
- donut: {
661
- color: "#CCCCCC"
662
- }
663
- }
664
- }
665
- }, null, 8, ["config"])),
666
- ae(rt, {
667
- show: w.value.showTooltip && j.value,
668
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
669
- color: e.value.style.chart.tooltip.color,
670
- borderRadius: e.value.style.chart.tooltip.borderRadius,
671
- borderColor: e.value.style.chart.tooltip.borderColor,
672
- borderWidth: e.value.style.chart.tooltip.borderWidth,
673
- fontSize: e.value.style.chart.tooltip.fontSize,
674
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
675
- parent: M.value,
676
- content: J.value,
677
- isCustom: c($e)(e.value.style.chart.tooltip.customFormat)
678
- }, {
679
- "tooltip-before": m(() => [
680
- C(t.$slots, "tooltip-before", oe(se({ ...Z.value })), void 0, !0)
681
- ]),
682
- "tooltip-after": m(() => [
683
- C(t.$slots, "tooltip-after", oe(se({ ...Z.value })), void 0, !0)
684
- ]),
685
- _: 3
686
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
687
- e.value.style.chart.legend.show ? (u(), n("div", {
688
- key: 4,
689
- ref_key: "chartLegend",
690
- ref: K,
691
- class: O({ "vue-ui-nested-donuts-legend": te.value.length > 1 })
692
- }, [
693
- (u(!0), n(x, null, $(te.value, (l) => (u(), W(it, {
694
- legendSet: l,
695
- config: Ae.value,
696
- onClickMarker: s[1] || (s[1] = ({ legend: a }) => Q(a))
697
- }, {
698
- legendTitle: m(({ titleSet: a }) => [
699
- a[0].arcOf ? (u(), n("div", Vt, N(a[0].arcOf), 1)) : y("", !0)
700
- ]),
701
- item: m(({ legend: a, index: o }) => [
702
- b("div", {
703
- onClick: (r) => Q(a),
704
- style: le(`opacity:${f.value.includes(a.id) ? 0.5 : 1}`)
705
- }, [
706
- H(N(a.name) + ": " + N(c(T)({ 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.legend.roundingValue })) + " ", 1),
707
- f.value.includes(a.id) ? (u(), n(x, { key: 1 }, [
708
- H(" ( - % ) ")
709
- ], 64)) : (u(), n(x, { key: 0 }, [
710
- H(" (" + N(isNaN(a.value / a.total) ? "-" : c(T)({ v: a.value / a.total * 100, s: "%", r: e.value.style.chart.legend.roundingPercentage })) + ") ", 1)
711
- ], 64))
712
- ], 12, Mt)
713
- ]),
714
- _: 2
715
- }, 1032, ["legendSet", "config"]))), 256))
716
- ], 2)) : y("", !0),
717
- e.value.style.chart.legend.show ? y("", !0) : (u(), n("div", {
718
- key: 5,
719
- ref_key: "chartLegend",
720
- ref: K
721
- }, [
722
- C(t.$slots, "legend", { legend: te.value }, void 0, !0)
723
- ], 512)),
724
- R.value ? (u(), W(ht, {
725
- key: 6,
726
- hideDetails: "",
727
- config: {
728
- open: w.value.showTable,
729
- maxHeight: 1e4,
730
- body: {
731
- backgroundColor: e.value.style.chart.backgroundColor,
732
- color: e.value.style.chart.color
733
- },
734
- head: {
735
- backgroundColor: e.value.style.chart.backgroundColor,
736
- color: e.value.style.chart.color
737
- }
738
- }
739
- }, {
740
- content: m(() => [
741
- ae(Ze, {
742
- colNames: Y.value.colNames,
743
- head: Y.value.head,
744
- body: Y.value.body,
745
- config: Y.value.config,
746
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
747
- onClose: s[2] || (s[2] = (l) => w.value.showTable = !1)
748
- }, {
749
- th: m(({ th: l }) => [
750
- b("div", {
751
- innerHTML: l,
752
- style: { display: "flex", "align-items": "center" }
753
- }, null, 8, Bt)
754
- ]),
755
- td: m(({ td: l }) => [
756
- H(N(l.name || l), 1)
757
- ]),
758
- _: 1
759
- }, 8, ["colNames", "head", "body", "config", "title"])
760
- ]),
761
- _: 1
762
- }, 8, ["config"])) : y("", !0)
763
- ], 14, ft));
764
- }
765
- }, Jt = /* @__PURE__ */ Ye(Ut, [["__scopeId", "data-v-fbefb973"]]);
766
- export {
767
- Jt as default
768
- };