vue-data-ui 3.0.0-next.67 → 3.0.0-next.68

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 (91) hide show
  1. package/dist/{Arrow--IpAC6zA.js → Arrow-BAykSDMq.js} +1 -1
  2. package/dist/{BaseDraggableDialog-BFyxDfXQ.js → BaseDraggableDialog-CW14dYAe.js} +2 -2
  3. package/dist/{BaseIcon-Cdvi-iBt.js → BaseIcon-CzfAiD8Q.js} +1 -1
  4. package/dist/{ColorPicker-CksI08Dk.js → ColorPicker-B9JhVNgd.js} +2 -2
  5. package/dist/{DataTable-Dm9n_hgl.js → DataTable-yFJiG46j.js} +2 -2
  6. package/dist/{Legend-C8iYgsQ8.js → Legend-BL5vo6lw.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DoOTPCi8.js → NonSvgPenAndPaper-Cq3mrd_T.js} +3 -3
  8. package/dist/{PackageVersion-DzLNBusm.js → PackageVersion-B7u_UQo2.js} +1 -1
  9. package/dist/{PenAndPaper-BsfhRXyF.js → PenAndPaper-C1coJhxH.js} +3 -3
  10. package/dist/{Shape-BHLKYLy2.js → Shape-DZVGaTt4.js} +1 -1
  11. package/dist/{Slicer-DUtsBqwT.js → Slicer-D5grTGFr.js} +2 -2
  12. package/dist/{SparkTooltip-DW5EM-X4.js → SparkTooltip-DBh_fq1U.js} +1 -1
  13. package/dist/{Title-KSMyq3wn.js → Title-BBZXpBnP.js} +1 -1
  14. package/dist/{Tooltip-DnEIs-sg.js → Tooltip-BZFesYE9.js} +1 -1
  15. package/dist/{UserOptions-BDt8OYJb.js → UserOptions-BkTKJa0i.js} +2 -2
  16. package/dist/{dom-to-png-hBxSbmYr.js → dom-to-png-Btyxq19q.js} +1 -1
  17. package/dist/{img-DNh0GOHm.js → img-CKRPNSjy.js} +1 -1
  18. package/dist/{index-DSzRUkFt.js → index-Bs8fEv7y.js} +672 -659
  19. package/dist/{pdf-CkDaIwJh.js → pdf-BEMvkY35.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +9 -0
  22. package/dist/types/vue-data-ui.d.ts +9 -0
  23. package/dist/{useAutoSizeLabelsInsideViewbox-DhQdKdBD.js → useAutoSizeLabelsInsideViewbox-CUSxIrSP.js} +1 -1
  24. package/dist/{useNestedProp-jGBTZAI0.js → useNestedProp-BJLiTmTx.js} +1 -1
  25. package/dist/{usePrinter-BVME5tnZ.js → usePrinter-q-k0Bt2r.js} +2 -2
  26. package/dist/{vue-data-ui-DG3WfzGA.js → vue-data-ui-CaXH0i5B.js} +64 -64
  27. package/dist/vue-data-ui.js +1 -1
  28. package/dist/{vue-ui-3d-bar-CTz1QNSR.js → vue-ui-3d-bar-xpXMmbEu.js} +6 -6
  29. package/dist/{vue-ui-accordion-CC84yjap.js → vue-ui-accordion-Ctx-gXOi.js} +3 -3
  30. package/dist/{vue-ui-age-pyramid-BniPj0Je.js → vue-ui-age-pyramid-CqALPbig.js} +6 -6
  31. package/dist/{vue-ui-annotator-BVKHKzvB.js → vue-ui-annotator-DRHVMTUB.js} +2 -2
  32. package/dist/{vue-ui-bullet-j-m1l7oC.js → vue-ui-bullet-C0Ub1vYY.js} +7 -7
  33. package/dist/{vue-ui-candlestick-CDacpOoa.js → vue-ui-candlestick-Ccw3PgIJ.js} +7 -7
  34. package/dist/{vue-ui-carousel-table-_Q_bBdvq.js → vue-ui-carousel-table-Ckv-iSmA.js} +4 -4
  35. package/dist/{vue-ui-chestnut-l888Vg6A.js → vue-ui-chestnut-ZqVT7ci-.js} +5 -5
  36. package/dist/{vue-ui-chord-ByYg0taA.js → vue-ui-chord-qtVPi5Xc.js} +8 -8
  37. package/dist/{vue-ui-circle-pack-vJwFi3dB.js → vue-ui-circle-pack-C5wOKvfw.js} +6 -6
  38. package/dist/{vue-ui-cursor-DVM0wbdO.js → vue-ui-cursor-BuziJXZZ.js} +2 -2
  39. package/dist/{vue-ui-dashboard-CYmQxOVl.js → vue-ui-dashboard-DbFOkEN3.js} +62 -62
  40. package/dist/{vue-ui-digits-SXPqFWSS.js → vue-ui-digits-DkodORPL.js} +2 -2
  41. package/dist/{vue-ui-donut-BKCbyy87.js → vue-ui-donut-DAGrKmeD.js} +8 -8
  42. package/dist/{vue-ui-donut-evolution-DbuTGQJ8.js → vue-ui-donut-evolution-Db0wUL_I.js} +8 -8
  43. package/dist/{vue-ui-dumbbell-CMkcLq8N.js → vue-ui-dumbbell-DPKhtBri.js} +7 -7
  44. package/dist/{vue-ui-flow-C5KS0_1Q.js → vue-ui-flow-Clx0F5LT.js} +7 -7
  45. package/dist/{vue-ui-funnel-C_EPa3Z6.js → vue-ui-funnel-B-By_uVq.js} +6 -6
  46. package/dist/{vue-ui-galaxy-Bv409liT.js → vue-ui-galaxy-hIHLZhzo.js} +5 -5
  47. package/dist/{vue-ui-gauge-C-jKjQBe.js → vue-ui-gauge-A3UVVjUE.js} +7 -7
  48. package/dist/{vue-ui-gizmo-Derp2Hfq.js → vue-ui-gizmo-BKFkgGl1.js} +3 -3
  49. package/dist/{vue-ui-heatmap-Cmr1fe03.js → vue-ui-heatmap-B08VbsZk.js} +7 -7
  50. package/dist/{vue-ui-history-plot-D-7W7WRj.js → vue-ui-history-plot-BvAaPM0b.js} +7 -7
  51. package/dist/{vue-ui-kpi-BjYv3G6b.js → vue-ui-kpi-BCli_Oat.js} +3 -3
  52. package/dist/{vue-ui-mini-loader-BfRTGqYM.js → vue-ui-mini-loader-CwBVf_Bc.js} +2 -2
  53. package/dist/{vue-ui-molecule-CLrm9jZX.js → vue-ui-molecule-DkJCfOEu.js} +5 -5
  54. package/dist/{vue-ui-mood-radar-BfZl-mJF.js → vue-ui-mood-radar-B-el5zcg.js} +7 -7
  55. package/dist/{vue-ui-nested-donuts-CHq-ki7S.js → vue-ui-nested-donuts-BgseQZD4.js} +9 -9
  56. package/dist/{vue-ui-onion-fSbsF3AE.js → vue-ui-onion-CdTDPPrC.js} +8 -8
  57. package/dist/{vue-ui-parallel-coordinate-plot-B1TwFB-x.js → vue-ui-parallel-coordinate-plot-DzY0c4Gr.js} +8 -8
  58. package/dist/{vue-ui-quadrant-Rb9aJbsM.js → vue-ui-quadrant-BYSI-5fs.js} +8 -8
  59. package/dist/{vue-ui-quick-chart-XhXLw_Lh.js → vue-ui-quick-chart-BC9sXwU2.js} +6 -6
  60. package/dist/vue-ui-radar-BvDfIQr6.js +796 -0
  61. package/dist/{vue-ui-rating-BiJN6mha.js → vue-ui-rating-DdeWSyH1.js} +2 -2
  62. package/dist/{vue-ui-relation-circle-CqeWZjwe.js → vue-ui-relation-circle-BD3adAYy.js} +7 -7
  63. package/dist/{vue-ui-ridgeline-DYi51pwG.js → vue-ui-ridgeline-FvrFbaO1.js} +8 -8
  64. package/dist/{vue-ui-rings-C7ObYFMH.js → vue-ui-rings-CGw0wv3g.js} +8 -8
  65. package/dist/{vue-ui-scatter-DzVxBntt.js → vue-ui-scatter-CALNRCTu.js} +8 -8
  66. package/dist/{vue-ui-skeleton-AWu-Lr7l.js → vue-ui-skeleton-vwEzXl55.js} +3 -3
  67. package/dist/{vue-ui-smiley-BtwxpYus.js → vue-ui-smiley-Beerz32J.js} +2 -2
  68. package/dist/{vue-ui-spark-trend-CidJd1aP.js → vue-ui-spark-trend-DQtO4pr7.js} +3 -3
  69. package/dist/{vue-ui-sparkbar-BUmriiHQ.js → vue-ui-sparkbar-Bz0ylQwC.js} +3 -3
  70. package/dist/{vue-ui-sparkgauge-xrrCkMmE.js → vue-ui-sparkgauge-D2Gi-TJt.js} +3 -3
  71. package/dist/{vue-ui-sparkhistogram-BM4W5qfl.js → vue-ui-sparkhistogram-tQsjnnAY.js} +4 -4
  72. package/dist/{vue-ui-sparkline-Kf3VEu2r.js → vue-ui-sparkline-B3NKERaF.js} +3 -3
  73. package/dist/{vue-ui-sparkstackbar-BzRWT_6S.js → vue-ui-sparkstackbar-DRO4XWDf.js} +3 -3
  74. package/dist/{vue-ui-stackbar-BEAjBPCI.js → vue-ui-stackbar-B8e360hP.js} +9 -9
  75. package/dist/{vue-ui-strip-plot-CpcZUO7A.js → vue-ui-strip-plot-B1238Nts.js} +7 -7
  76. package/dist/{vue-ui-table-7mco2z0H.js → vue-ui-table-WQeb2fx2.js} +3 -3
  77. package/dist/{vue-ui-table-heatmap-BPjfohgN.js → vue-ui-table-heatmap-FEL4AFQb.js} +5 -5
  78. package/dist/{vue-ui-table-sparkline-5-DnehDb.js → vue-ui-table-sparkline-BfsGsD6x.js} +4 -4
  79. package/dist/{vue-ui-thermometer-jd-Ba40e.js → vue-ui-thermometer-BbGs_pDh.js} +7 -7
  80. package/dist/{vue-ui-timer-BpSgPo2R.js → vue-ui-timer-CCfX_1k0.js} +5 -5
  81. package/dist/{vue-ui-tiremarks-NuCzPpfn.js → vue-ui-tiremarks-By2uVh5U.js} +6 -6
  82. package/dist/{vue-ui-treemap-C8MLPRUz.js → vue-ui-treemap-B4gglMFf.js} +8 -8
  83. package/dist/{vue-ui-vertical-bar-DohenEMX.js → vue-ui-vertical-bar-f6zgXB77.js} +9 -9
  84. package/dist/{vue-ui-waffle-BQLMULXv.js → vue-ui-waffle-ByX8Lgdr.js} +8 -8
  85. package/dist/{vue-ui-wheel-BwHQLQxI.js → vue-ui-wheel-CU7g4I0-.js} +6 -6
  86. package/dist/{vue-ui-word-cloud-bqR58sPB.js → vue-ui-word-cloud-Dw4RD-ND.js} +6 -6
  87. package/dist/{vue-ui-world-Bk1saLf-.js → vue-ui-world-BWR8i0Be.js} +6 -6
  88. package/dist/{vue-ui-xy-DMPIrN7g.js → vue-ui-xy-CwcULvEi.js} +9 -9
  89. package/dist/{vue-ui-xy-canvas-CQfiWuh5.js → vue-ui-xy-canvas-DmM07Man.js} +8 -8
  90. package/package.json +1 -1
  91. package/dist/vue-ui-radar-BPa4sMX-.js +0 -743
@@ -1,743 +0,0 @@
1
- import { defineAsyncComponent as _, computed as p, ref as c, watch as nt, shallowRef as Se, onMounted as ut, onBeforeUnmount as it, createElementBlock as u, openBlock as r, unref as n, normalizeStyle as H, normalizeClass as B, createBlock as x, createCommentVNode as d, createElementVNode as O, createVNode as oe, createSlots as ct, withCtx as f, renderSlot as g, normalizeProps as z, guardReactiveProps as M, Fragment as A, renderList as F, toDisplayString as D, createTextVNode as Ne, nextTick as dt } from "vue";
2
- import { u as vt, c as pt, a as ht, p as S, b as gt, o as ft, f as V, d as yt, g as Ie, e as Re, R as Le, h as mt, k as ze, i as G, X as bt, s as le, x as kt, S as Me, v as Ct, w as wt, y as $t, z as _t } from "./index-DSzRUkFt.js";
3
- import { t as Tt, u as Pt } from "./useResponsive-DfdjqQps.js";
4
- import { u as Ve } from "./useNestedProp-jGBTZAI0.js";
5
- import { u as xt } from "./usePrinter-BVME5tnZ.js";
6
- import { u as Ot } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as At } from "./useChartAccessibility-9icAAmYg.js";
8
- import Ft from "./Legend-C8iYgsQ8.js";
9
- import St from "./Title-KSMyq3wn.js";
10
- import Nt from "./img-DNh0GOHm.js";
11
- import { _ as It } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
- const Rt = ["id"], Lt = ["xmlns", "viewBox"], zt = ["width", "height"], Mt = ["id"], Vt = ["stop-color"], Ut = ["stop-color"], Et = { key: 1 }, Bt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Dt = { key: 0 }, Gt = ["d", "stroke", "stroke-width"], Wt = ["d", "stroke", "stroke-width"], Xt = { key: 2 }, jt = ["x", "y", "text-anchor", "font-size", "fill", "onMouseenter"], Ht = ["points", "stroke", "stroke-width"], Yt = ["points", "stroke", "stroke-width", "fill"], qt = { key: 3 }, Jt = ["cx", "cy", "fill", "r", "stroke"], Kt = {
13
- key: 5,
14
- class: "vue-data-ui-watermark"
15
- }, Qt = ["onClick"], Zt = {
16
- key: 0,
17
- style: { "max-width": "200px", margin: "0 auto" }
18
- }, ea = {
19
- __name: "vue-ui-radar",
20
- props: {
21
- config: {
22
- type: Object,
23
- default() {
24
- return {};
25
- }
26
- },
27
- dataset: {
28
- type: Object,
29
- default() {
30
- return {};
31
- }
32
- }
33
- },
34
- emits: ["selectLegend"],
35
- setup(Ue, { expose: Ee, emit: Be }) {
36
- const De = _(() => import("./DataTable-Dm9n_hgl.js")), Ge = _(() => import("./PenAndPaper-BsfhRXyF.js")), We = _(() => import("./vue-ui-accordion-CC84yjap.js")), Xe = _(() => import("./vue-ui-skeleton-AWu-Lr7l.js")), je = _(() => import("./Tooltip-DnEIs-sg.js")), He = _(() => import("./UserOptions-BDt8OYJb.js")), Ye = _(() => import("./PackageVersion-DzLNBusm.js")), qe = _(() => import("./vue-ui-sparkbar-BUmriiHQ.js")), { vue_ui_radar: Je } = vt(), h = Ue, U = p(() => !!h.dataset && Object.keys(h.dataset).length), T = c(pt()), Ke = c(null), Y = c(!1), q = c(""), re = c(0), C = c(null), se = c(null), ne = c(null), ue = c(null), ie = c(null), ce = c(0), de = c(0), ve = c(0), e = p({
37
- get: () => fe(),
38
- set: (t) => t
39
- }), { userOptionsVisible: J, setUserOptionsVisibility: pe, keepUserOptionState: he } = Ot({ config: e.value }), { svgRef: ge } = At({ config: e.value.style.chart.title });
40
- function fe() {
41
- const t = Ve({
42
- userConfig: h.config,
43
- defaultConfig: Je
44
- });
45
- return t.theme ? {
46
- ...Ve({
47
- userConfig: gt.vue_ui_radar[t.theme] || h.config,
48
- defaultConfig: t
49
- }),
50
- customPalette: ht[t.theme] || S
51
- } : t;
52
- }
53
- nt(() => h.config, (t) => {
54
- e.value = fe(), J.value = !e.value.userOptions.showOnChartHover, ye(), ce.value += 1, de.value += 1, ve.value += 1, b.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, b.value.showTable = e.value.table.show, b.value.showTooltip = e.value.style.chart.tootlip ? e.value.style.chart.tootlip.show : !1;
55
- }, { deep: !0 });
56
- const w = Se(null), N = Se(null);
57
- function ye() {
58
- if (ft(h.dataset) && V({
59
- componentName: "VueUiRadar",
60
- type: "dataset"
61
- }), e.value.responsive) {
62
- const t = Tt(() => {
63
- const { width: a, height: o } = Pt({
64
- chart: C.value,
65
- title: e.value.style.chart.title.text ? se.value : null,
66
- legend: e.value.style.chart.legend.show ? ne.value : null,
67
- source: ue.value,
68
- noTitle: ie.value
69
- });
70
- requestAnimationFrame(() => {
71
- i.value.width = a, i.value.height = o;
72
- });
73
- });
74
- w.value && (N.value && w.value.unobserve(N.value), w.value.disconnect()), w.value = new ResizeObserver(t), N.value = C.value.parentNode, w.value.observe(N.value);
75
- }
76
- }
77
- ut(() => {
78
- ye();
79
- }), it(() => {
80
- w.value && (N.value && w.value.unobserve(N.value), w.value.disconnect());
81
- });
82
- const { isPrinting: me, isImaging: be, generatePdf: ke, generateImage: Ce } = xt({
83
- elementId: `vue-ui-radar_${T.value}`,
84
- fileName: e.value.style.chart.title.text || "vue-ui-radar",
85
- options: e.value.userOptions.print
86
- }), Qe = p(() => e.value.userOptions.show && !e.value.style.chart.title.text), we = p(() => yt(e.value.customPalette)), b = c({
87
- dataLabels: {
88
- show: e.value.style.chart.layout.labels.dataLabels.show
89
- },
90
- showTable: e.value.table.show,
91
- showTooltip: e.value.style.chart.tooltip.show
92
- }), Ze = p(() => ({
93
- style: {
94
- backgroundColor: "#FFFFFF00",
95
- animation: {
96
- show: e.value.style.chart.tooltip.animation.show,
97
- animationFrames: e.value.style.chart.tooltip.animation.animationFrames
98
- },
99
- labels: {
100
- fontSize: e.value.style.chart.tooltip.fontSize,
101
- name: {
102
- color: e.value.style.chart.tooltip.color
103
- }
104
- },
105
- gutter: {
106
- backgroundColor: "#CCCCCC",
107
- opacity: 30
108
- }
109
- }
110
- })), i = c({
111
- height: 312,
112
- width: 512
113
- }), et = Be, v = c([]), E = c(null), I = c(!1);
114
- function $e(t) {
115
- I.value = !0, v.value.includes(t) ? (E.value = t, v.value = v.value.filter((a) => a !== t), setTimeout(() => {
116
- I.value = !1, E.value = null;
117
- }, 500)) : (v.value.push(t), setTimeout(() => {
118
- I.value = !1;
119
- }, 500)), et("selectLegend", R.value.filter((a, o) => !v.value.includes(o)).map((a) => ({
120
- name: a.name,
121
- color: a.color,
122
- proportion: a.totalProportion
123
- })));
124
- }
125
- function tt() {
126
- return R.value.map((t) => ({
127
- name: t.name,
128
- color: t.color,
129
- proportion: t.totalProportion
130
- }));
131
- }
132
- const y = p(() => [null, void 0].includes(h.dataset.categories) ? (V({
133
- componentName: "VueUiRadar",
134
- type: "datasetAttribute",
135
- property: "categories ({ name: string; prefix?: string; suffix?: string}[])"
136
- }), []) : (h.dataset.categories.length === 0 ? V({
137
- componentName: "VueUiRadar",
138
- type: "datasetAttributeEmpty",
139
- property: "categories"
140
- }) : h.dataset.categories.forEach((t, a) => {
141
- Ie({
142
- datasetObject: t,
143
- requiredAttributes: ["name"]
144
- }).forEach((o) => {
145
- V({
146
- componentName: "VueUiRadar",
147
- type: "datasetAttribute",
148
- property: `category.${o} at index ${a}`,
149
- index: a
150
- });
151
- });
152
- }), [null, void 0].includes(h.dataset.series) ? V({
153
- componentName: "VueUiRadar",
154
- type: "datasetAttribute",
155
- property: "series ({ name: string; values: number[]; color?: string; target: number}[])"
156
- }) : h.dataset.series.forEach((t, a) => {
157
- Ie({
158
- datasetObject: t,
159
- requiredAttributes: ["name", "values", "target"]
160
- }).forEach((o) => {
161
- V({
162
- componentName: "VueUiRadar",
163
- type: "datasetSerieAttribute",
164
- key: "series",
165
- property: o,
166
- index: a
167
- });
168
- });
169
- }), h.dataset.categories.map((t, a) => ({
170
- name: t.name,
171
- categoryId: `radar_category_${T.value}_${a}`,
172
- color: Re(t.color) || we.value[a] || S[a] || S[a % S.length],
173
- prefix: t.prefix ?? "",
174
- suffix: t.suffix ?? ""
175
- })))), k = p(() => U.value ? h.dataset.series.map((t, a) => ({
176
- ...t,
177
- color: Re(t.color) || we.value[a] || S[a] || S[a % S.length],
178
- serieId: `radar_serie_${T.value}_${a}`,
179
- formatter: t.formatter || null
180
- })) : []), _e = p(() => Math.max(...k.value.flatMap((t) => t.values))), Te = p(() => k.value.length), K = p(() => Math.min(i.value.width, i.value.height) / 3), Pe = p(() => Le({
181
- plot: { x: i.value.width / 2, y: i.value.height / 2 },
182
- radius: K.value,
183
- sides: Te.value,
184
- rotation: 0
185
- })), at = p(() => {
186
- const t = [];
187
- for (let a = 0; a < K.value; a += K.value / e.value.style.chart.layout.grid.graduations)
188
- t.push(a);
189
- return t;
190
- }), $ = p(() => Pe.value.coordinates.map((t, a) => {
191
- const o = k.value[a].values.map((l) => ot({
192
- centerX: i.value.width / 2,
193
- centerY: i.value.height / 2,
194
- apexX: t.x,
195
- apexY: t.y,
196
- proportion: l / (k.value[a].target || _e.value)
197
- }));
198
- return {
199
- ...t,
200
- ...k.value[a],
201
- plots: o
202
- };
203
- }));
204
- function Q({ x: t, y: a }) {
205
- let o = "middle";
206
- return t = Math.round(t), a = Math.round(a), t > i.value.width / 2 && (t += 12, o = "start"), t < i.value.width / 2 && (t -= 12, o = "end"), a > i.value.height / 2 && (a += 20), a < i.value.height / 2 && (a -= 12), a === i.value.height / 2 && (a += 4), { x: t, y: a, anchor: o };
207
- }
208
- function ot({ centerX: t, centerY: a, apexX: o, apexY: l, proportion: s }) {
209
- return {
210
- x: t + (o - t) * s,
211
- y: a + (l - a) * s
212
- };
213
- }
214
- const R = p(() => {
215
- const t = k.value.map((a, o) => a.values.map((l) => l / (a.target || _e.value)));
216
- return y.value.map((a, o) => ({
217
- ...a,
218
- totalProportion: mt(t.map((l) => l[o]).reduce((l, s) => l + s, 0) / k.value.length),
219
- shape: "circle",
220
- opacity: v.value.includes(o) ? 0.5 : 1,
221
- segregate: () => $e(o),
222
- isSegregated: v.value.includes(o)
223
- }));
224
- }), lt = p(() => ({
225
- cy: "radar-div-legend",
226
- backgroundColor: e.value.style.chart.legend.backgroundColor,
227
- color: e.value.style.chart.legend.color,
228
- fontSize: e.value.style.chart.legend.fontSize,
229
- paddingBottom: 12,
230
- fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
231
- })), W = p(() => {
232
- const t = [
233
- { name: e.value.translations.datapoint, color: "" },
234
- { name: e.value.translations.target, color: "" },
235
- ...R.value
236
- ], a = h.dataset.series.map((l) => [
237
- l.name,
238
- ze(
239
- l.formatter,
240
- l.target,
241
- G({
242
- p: l.prefix,
243
- v: l.target,
244
- s: l.suffix,
245
- r: e.value.table.td.roundingValue
246
- })
247
- ),
248
- ...l.values.map((s, m) => `${ze(
249
- l.formatter,
250
- s,
251
- G({ p: y.value[m].prefix, v: s, s: y.value[m].suffix, r: e.value.table.td.roundingValue })
252
- )} (${isNaN(s / l.target) ? "" : G({
253
- v: s / l.target * 100,
254
- s: "%",
255
- r: e.value.table.td.roundingPercentage
256
- })})`)
257
- ]), o = {
258
- th: {
259
- backgroundColor: e.value.table.th.backgroundColor,
260
- color: e.value.table.th.color,
261
- outline: e.value.table.th.outline
262
- },
263
- td: {
264
- backgroundColor: e.value.table.td.backgroundColor,
265
- color: e.value.table.td.color,
266
- outline: e.value.table.td.outline
267
- },
268
- breakpoint: e.value.table.responsiveBreakpoint
269
- };
270
- return { head: t, body: a, config: o, colNames: t };
271
- }), X = c(null), Z = c([]), ee = c(null);
272
- function rt(t, a) {
273
- Z.value = [], X.value = a, Y.value = !0;
274
- let o = "";
275
- ee.value = {
276
- datapoint: t,
277
- seriesIndex: a,
278
- series: {
279
- categories: y.value,
280
- datapoints: k.value,
281
- radar: $.value
282
- },
283
- config: e.value
284
- };
285
- const l = e.value.style.chart.tooltip.customFormat;
286
- if ($t(l) && _t(() => l({
287
- seriesIndex: a,
288
- datapoint: t,
289
- series: { categories: y.value, datapoints: k.value, radar: $.value },
290
- config: e.value
291
- })))
292
- q.value = l({
293
- seriesIndex: a,
294
- datapoint: t,
295
- series: { categories: y.value, datapoints: k.value, radar: $.value },
296
- config: e.value
297
- });
298
- else {
299
- 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.name}</div>`;
300
- for (let s = 0; s < t.values.length; s += 1)
301
- v.value.includes(s) || Z.value.push({
302
- name: y.value[s].name,
303
- value: t.values[s] / t.target * 100,
304
- color: y.value[s].color,
305
- suffix: "%)",
306
- prefix: `${G({ p: y.value[s].prefix ?? "", v: t.values[s], s: y.value[s].suffix ?? "", r: e.value.style.chart.tooltip.roundingValue })} (`,
307
- rounding: e.value.style.chart.tooltip.roundingPercentage,
308
- formatter: t.formatter
309
- });
310
- q.value = o;
311
- }
312
- }
313
- function xe(t = null) {
314
- dt(() => {
315
- const a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [""]], o = [[""], [e.value.translations.target], ...R.value.flatMap((P) => [[P.name], ["%"]])], l = h.dataset.series.map((P, ta) => [P.name, P.target, ...P.values.flatMap((ae) => [
316
- ae,
317
- isNaN(ae / P.target) ? "" : ae / P.target * 100
318
- ])]), s = a.concat([o]).concat(l), m = Ct(s);
319
- t ? t(m) : wt({ csvContent: m, title: e.value.style.chart.title.text || "vue-ui-radar" });
320
- });
321
- }
322
- const L = c(!1);
323
- function Oe(t) {
324
- L.value = t, re.value += 1;
325
- }
326
- function Ae() {
327
- b.value.showTable = !b.value.showTable;
328
- }
329
- function Fe() {
330
- b.value.showTooltip = !b.value.showTooltip;
331
- }
332
- const j = c(!1);
333
- function te() {
334
- j.value = !j.value;
335
- }
336
- async function st({ scale: t = 2 } = {}) {
337
- if (!C.value) return;
338
- const { width: a, height: o } = C.value.getBoundingClientRect(), l = a / o, { imageUri: s, base64: m } = await Nt({ domElement: C.value, base64: !0, img: !0, scale: t });
339
- return {
340
- imageUri: s,
341
- base64: m,
342
- title: e.value.style.chart.title.text,
343
- width: a,
344
- height: o,
345
- aspectRatio: l
346
- };
347
- }
348
- return Ee({
349
- getData: tt,
350
- getImage: st,
351
- generatePdf: ke,
352
- generateCsv: xe,
353
- generateImage: Ce,
354
- toggleTable: Ae,
355
- toggleTooltip: Fe,
356
- toggleAnnotator: te,
357
- toggleFullscreen: Oe
358
- }), (t, a) => (r(), u("div", {
359
- class: B(`vue-ui-radar ${L.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
360
- ref_key: "radarChart",
361
- ref: C,
362
- id: `vue-ui-radar_${T.value}`,
363
- style: H(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height: 100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
364
- onMouseenter: a[3] || (a[3] = () => n(pe)(!0)),
365
- onMouseleave: a[4] || (a[4] = () => n(pe)(!1))
366
- }, [
367
- e.value.userOptions.buttons.annotator ? (r(), x(n(Ge), {
368
- key: 0,
369
- svgRef: n(ge),
370
- backgroundColor: e.value.style.chart.backgroundColor,
371
- color: e.value.style.chart.color,
372
- active: j.value,
373
- onClose: te
374
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : d("", !0),
375
- Qe.value ? (r(), u("div", {
376
- key: 1,
377
- ref_key: "noTitle",
378
- ref: ie,
379
- class: "vue-data-ui-no-title-space",
380
- style: "height:36px; width: 100%;background:transparent"
381
- }, null, 512)) : d("", !0),
382
- e.value.style.chart.title.text ? (r(), u("div", {
383
- key: 2,
384
- ref_key: "chartTitle",
385
- ref: se,
386
- style: "width:100%;background:transparent;padding-bottom:12px"
387
- }, [
388
- (r(), x(St, {
389
- key: `title_${ce.value}`,
390
- config: {
391
- title: {
392
- cy: "radar-div-title",
393
- ...e.value.style.chart.title
394
- },
395
- subtitle: {
396
- cy: "radar-div-subtitle",
397
- ...e.value.style.chart.title.subtitle
398
- }
399
- }
400
- }, null, 8, ["config"]))
401
- ], 512)) : d("", !0),
402
- e.value.userOptions.show && U.value && (n(he) || n(J)) ? (r(), x(n(He), {
403
- ref_key: "details",
404
- ref: Ke,
405
- key: `user_options_${re.value}`,
406
- backgroundColor: e.value.style.chart.backgroundColor,
407
- color: e.value.style.chart.color,
408
- isImaging: n(be),
409
- isPrinting: n(me),
410
- uid: T.value,
411
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
412
- hasPdf: e.value.userOptions.buttons.pdf,
413
- hasImg: e.value.userOptions.buttons.img,
414
- hasXls: e.value.userOptions.buttons.csv,
415
- hasTable: e.value.userOptions.buttons.table,
416
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
417
- isFullscreen: L.value,
418
- isTooltip: b.value.showTooltip,
419
- titles: { ...e.value.userOptions.buttonTitles },
420
- chartElement: C.value,
421
- position: e.value.userOptions.position,
422
- hasAnnotator: e.value.userOptions.buttons.annotator,
423
- isAnnotation: j.value,
424
- callbacks: e.value.userOptions.callbacks,
425
- printScale: e.value.userOptions.print.scale,
426
- onToggleFullscreen: Oe,
427
- onGeneratePdf: n(ke),
428
- onGenerateCsv: xe,
429
- onGenerateImage: n(Ce),
430
- onToggleTable: Ae,
431
- onToggleTooltip: Fe,
432
- onToggleAnnotator: te,
433
- style: H({
434
- visibility: n(he) ? n(J) ? "visible" : "hidden" : "visible"
435
- })
436
- }, ct({ _: 2 }, [
437
- t.$slots.menuIcon ? {
438
- name: "menuIcon",
439
- fn: f(({ isOpen: o, color: l }) => [
440
- g(t.$slots, "menuIcon", z(M({ isOpen: o, color: l })), void 0, !0)
441
- ]),
442
- key: "0"
443
- } : void 0,
444
- t.$slots.optionTooltip ? {
445
- name: "optionTooltip",
446
- fn: f(() => [
447
- g(t.$slots, "optionTooltip", {}, void 0, !0)
448
- ]),
449
- key: "1"
450
- } : void 0,
451
- t.$slots.optionPdf ? {
452
- name: "optionPdf",
453
- fn: f(() => [
454
- g(t.$slots, "optionPdf", {}, void 0, !0)
455
- ]),
456
- key: "2"
457
- } : void 0,
458
- t.$slots.optionCsv ? {
459
- name: "optionCsv",
460
- fn: f(() => [
461
- g(t.$slots, "optionCsv", {}, void 0, !0)
462
- ]),
463
- key: "3"
464
- } : void 0,
465
- t.$slots.optionImg ? {
466
- name: "optionImg",
467
- fn: f(() => [
468
- g(t.$slots, "optionImg", {}, void 0, !0)
469
- ]),
470
- key: "4"
471
- } : void 0,
472
- t.$slots.optionTable ? {
473
- name: "optionTable",
474
- fn: f(() => [
475
- g(t.$slots, "optionTable", {}, void 0, !0)
476
- ]),
477
- key: "5"
478
- } : void 0,
479
- t.$slots.optionFullscreen ? {
480
- name: "optionFullscreen",
481
- fn: f(({ toggleFullscreen: o, isFullscreen: l }) => [
482
- g(t.$slots, "optionFullscreen", z(M({ toggleFullscreen: o, isFullscreen: l })), void 0, !0)
483
- ]),
484
- key: "6"
485
- } : void 0,
486
- t.$slots.optionAnnotator ? {
487
- name: "optionAnnotator",
488
- fn: f(({ toggleAnnotator: o, isAnnotator: l }) => [
489
- g(t.$slots, "optionAnnotator", z(M({ toggleAnnotator: o, isAnnotator: l })), void 0, !0)
490
- ]),
491
- key: "7"
492
- } : void 0
493
- ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : d("", !0),
494
- U.value ? (r(), u("svg", {
495
- key: 4,
496
- ref_key: "svgRef",
497
- ref: ge,
498
- xmlns: n(bt),
499
- class: B({ "vue-data-ui-fullscreen--on": L.value, "vue-data-ui-fulscreen--off": !L.value }),
500
- viewBox: `0 0 ${i.value.width <= 0 ? 10 : i.value.width} ${i.value.height <= 0 ? 10 : i.value.height}`,
501
- style: H(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
502
- }, [
503
- oe(n(Ye)),
504
- t.$slots["chart-background"] ? (r(), u("foreignObject", {
505
- key: 0,
506
- x: 0,
507
- y: 0,
508
- width: i.value.width <= 0 ? 10 : i.value.width,
509
- height: i.value.height <= 0 ? 10 : i.value.height,
510
- style: {
511
- pointerEvents: "none"
512
- }
513
- }, [
514
- g(t.$slots, "chart-background", {}, void 0, !0)
515
- ], 8, zt)) : d("", !0),
516
- O("defs", null, [
517
- (r(!0), u(A, null, F(y.value, (o, l) => (r(), u("radialGradient", {
518
- cx: "50%",
519
- cy: "50%",
520
- r: "50%",
521
- fx: "50%",
522
- fy: "50%",
523
- id: `radar_gradient_${T.value}_${l}`
524
- }, [
525
- O("stop", {
526
- offset: "0%",
527
- "stop-color": n(le)(n(kt)(o.color, 0.05), e.value.style.chart.layout.dataPolygon.opacity)
528
- }, null, 8, Vt),
529
- O("stop", {
530
- offset: "100%",
531
- "stop-color": n(le)(o.color, e.value.style.chart.layout.dataPolygon.opacity)
532
- }, null, 8, Ut)
533
- ], 8, Mt))), 256))
534
- ]),
535
- e.value.style.chart.layout.grid.show ? (r(), u("g", Et, [
536
- (r(!0), u(A, null, F($.value, (o) => (r(), u("line", {
537
- x1: i.value.width / 2,
538
- y1: i.value.height / 2,
539
- x2: o.x,
540
- y2: o.y,
541
- stroke: e.value.style.chart.layout.grid.stroke,
542
- "stroke-width": e.value.style.chart.layout.grid.strokeWidth
543
- }, null, 8, Bt))), 256)),
544
- e.value.style.chart.layout.grid.graduations > 0 ? (r(), u("g", Dt, [
545
- (r(!0), u(A, null, F(at.value, (o) => (r(), u("path", {
546
- d: n(Le)({
547
- plot: { x: i.value.width / 2, y: i.value.height / 2 },
548
- radius: o,
549
- sides: Te.value,
550
- rotation: 0
551
- }).path,
552
- fill: "none",
553
- stroke: e.value.style.chart.layout.grid.stroke,
554
- "stroke-width": e.value.style.chart.layout.grid.strokeWidth
555
- }, null, 8, Gt))), 256))
556
- ])) : d("", !0)
557
- ])) : d("", !0),
558
- O("path", {
559
- d: Pe.value.path,
560
- fill: "none",
561
- stroke: e.value.style.chart.layout.outerPolygon.stroke,
562
- "stroke-width": e.value.style.chart.layout.outerPolygon.strokeWidth,
563
- "stroke-linejoin": "round",
564
- "stroke-linecap": "round"
565
- }, null, 8, Wt),
566
- e.value.style.chart.layout.labels.dataLabels.show ? (r(), u("g", Xt, [
567
- (r(!0), u(A, null, F($.value, (o, l) => (r(), u("text", {
568
- x: Q(o).x,
569
- y: Q(o).y,
570
- "text-anchor": Q(o).anchor,
571
- "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
572
- fill: e.value.style.chart.layout.labels.dataLabels.color,
573
- onMouseenter: (s) => rt(o, l),
574
- onMouseleave: a[0] || (a[0] = (s) => {
575
- Y.value = !1, X.value = null;
576
- })
577
- }, D(o.name), 41, jt))), 256))
578
- ])) : d("", !0),
579
- (r(!0), u(A, null, F(y.value, (o, l) => (r(), u("g", null, [
580
- O("g", null, [
581
- e.value.useCssAnimation || !e.value.useCssAnimation && !v.value.includes(l) ? (r(), u("polygon", {
582
- key: 0,
583
- points: n(Me)($.value.map((s) => s.plots[l]), !1, !0),
584
- stroke: e.value.style.chart.backgroundColor,
585
- "stroke-width": e.value.style.chart.layout.dataPolygon.strokeWidth + 1,
586
- fill: "none",
587
- class: B({ "animated-out": v.value.includes(l) && e.value.useCssAnimation, "animated-in": I.value && E.value === l && e.value.useCssAnimation })
588
- }, null, 10, Ht)) : d("", !0),
589
- e.value.useCssAnimation || !e.value.useCssAnimation && !v.value.includes(l) ? (r(), u("polygon", {
590
- key: 1,
591
- points: n(Me)($.value.map((s) => s.plots[l]), !1, !0),
592
- stroke: o.color,
593
- "stroke-width": e.value.style.chart.layout.dataPolygon.strokeWidth,
594
- fill: e.value.style.chart.layout.dataPolygon.transparent ? "transparent" : e.value.style.chart.layout.dataPolygon.useGradient ? `url(#radar_gradient_${T.value}_${l})` : n(le)(o.color, e.value.style.chart.layout.dataPolygon.opacity),
595
- class: B({ "animated-out": v.value.includes(l) && e.value.useCssAnimation, "animated-in": I.value && E.value === l && e.value.useCssAnimation })
596
- }, null, 10, Yt)) : d("", !0)
597
- ])
598
- ]))), 256)),
599
- e.value.style.chart.layout.plots.show ? (r(), u("g", qt, [
600
- (r(!0), u(A, null, F($.value, (o, l) => (r(), u("g", null, [
601
- (r(!0), u(A, null, F(o.plots, (s, m) => (r(), u("circle", {
602
- cx: s.x,
603
- cy: s.y,
604
- fill: v.value.includes(m) ? "transparent" : y.value[m].color,
605
- r: X.value !== null && X.value === l ? e.value.style.chart.layout.plots.radius * 1.6 : e.value.style.chart.layout.plots.radius,
606
- stroke: v.value.includes(m) ? "transparent" : e.value.style.chart.backgroundColor,
607
- "stroke-width": 0.5,
608
- class: B({ "animated-out": v.value.includes(m) && e.value.useCssAnimation, "animated-in": I.value && E.value === m && e.value.useCssAnimation })
609
- }, null, 10, Jt))), 256))
610
- ]))), 256))
611
- ])) : d("", !0),
612
- g(t.$slots, "svg", { svg: i.value }, void 0, !0)
613
- ], 14, Lt)) : d("", !0),
614
- t.$slots.watermark ? (r(), u("div", Kt, [
615
- g(t.$slots, "watermark", z(M({ isPrinting: n(me) || n(be) })), void 0, !0)
616
- ])) : d("", !0),
617
- U.value ? d("", !0) : (r(), x(n(Xe), {
618
- key: 6,
619
- config: {
620
- type: "radar",
621
- style: {
622
- backgroundColor: e.value.style.chart.backgroundColor,
623
- radar: {
624
- grid: {
625
- color: e.value.style.chart.layout.outerPolygon.stroke
626
- },
627
- shapes: {
628
- color: e.value.style.chart.layout.outerPolygon.stroke
629
- }
630
- }
631
- }
632
- }
633
- }, null, 8, ["config"])),
634
- O("div", {
635
- ref_key: "chartLegend",
636
- ref: ne
637
- }, [
638
- e.value.style.chart.legend.show ? (r(), x(Ft, {
639
- key: `legend_${ve.value}`,
640
- legendSet: R.value,
641
- config: lt.value,
642
- onClickMarker: a[1] || (a[1] = ({ i: o }) => $e(o))
643
- }, {
644
- item: f(({ legend: o, index: l }) => [
645
- O("div", {
646
- onClick: (s) => o.segregate(),
647
- style: H(`opacity:${v.value.includes(l) ? 0.5 : 1}`)
648
- }, D(o.name) + ": " + D(n(G)({
649
- v: o.totalProportion * 100,
650
- s: "%",
651
- r: e.value.style.chart.legend.roundingPercentage
652
- })), 13, Qt)
653
- ]),
654
- _: 1
655
- }, 8, ["legendSet", "config"])) : g(t.$slots, "legend", {
656
- key: 1,
657
- legend: R.value
658
- }, void 0, !0)
659
- ], 512),
660
- t.$slots.source ? (r(), u("div", {
661
- key: 7,
662
- ref_key: "source",
663
- ref: ue,
664
- dir: "auto"
665
- }, [
666
- g(t.$slots, "source", {}, void 0, !0)
667
- ], 512)) : d("", !0),
668
- oe(n(je), {
669
- show: b.value.showTooltip && Y.value,
670
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
671
- color: e.value.style.chart.tooltip.color,
672
- borderRadius: e.value.style.chart.tooltip.borderRadius,
673
- borderColor: e.value.style.chart.tooltip.borderColor,
674
- borderWidth: e.value.style.chart.tooltip.borderWidth,
675
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
676
- fontSize: e.value.style.chart.tooltip.fontSize,
677
- position: e.value.style.chart.tooltip.position,
678
- offsetY: e.value.style.chart.tooltip.offsetY,
679
- parent: C.value,
680
- content: q.value,
681
- isFullscreen: L.value,
682
- isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
683
- smooth: e.value.style.chart.tooltip.smooth,
684
- backdropFilter: e.value.style.chart.tooltip.backdropFilter
685
- }, {
686
- "tooltip-before": f(() => [
687
- g(t.$slots, "tooltip-before", z(M({ ...ee.value })), void 0, !0)
688
- ]),
689
- "tooltip-after": f(() => [
690
- ["function"].includes(typeof e.value.style.chart.tooltip.customFormat) ? d("", !0) : (r(), u("div", Zt, [
691
- oe(n(qe), {
692
- dataset: Z.value,
693
- config: Ze.value,
694
- backgroundOpacity: 0
695
- }, null, 8, ["dataset", "config"])
696
- ])),
697
- g(t.$slots, "tooltip-after", z(M({ ...ee.value })), void 0, !0)
698
- ]),
699
- _: 3
700
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "fontSize", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
701
- U.value ? (r(), x(n(We), {
702
- key: 8,
703
- hideDetails: "",
704
- config: {
705
- open: b.value.showTable,
706
- maxHeight: 1e4,
707
- body: {
708
- backgroundColor: e.value.style.chart.backgroundColor,
709
- color: e.value.style.chart.color
710
- },
711
- head: {
712
- backgroundColor: e.value.style.chart.backgroundColor,
713
- color: e.value.style.chart.color
714
- }
715
- }
716
- }, {
717
- content: f(() => [
718
- (r(), x(n(De), {
719
- key: `table_${de.value}`,
720
- colNames: W.value.colNames,
721
- head: W.value.head,
722
- body: W.value.body,
723
- config: W.value.config,
724
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
725
- onClose: a[2] || (a[2] = (o) => b.value.showTable = !1)
726
- }, {
727
- th: f(({ th: o }) => [
728
- Ne(D(o.name), 1)
729
- ]),
730
- td: f(({ td: o }) => [
731
- Ne(D(o), 1)
732
- ]),
733
- _: 1
734
- }, 8, ["colNames", "head", "body", "config", "title"]))
735
- ]),
736
- _: 1
737
- }, 8, ["config"])) : d("", !0)
738
- ], 46, Rt));
739
- }
740
- }, pa = /* @__PURE__ */ It(ea, [["__scopeId", "data-v-b6b7719a"]]);
741
- export {
742
- pa as default
743
- };