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