vue-data-ui 2.3.2 → 2.3.4
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-B6gJebT9.js +101 -0
- package/dist/Arrow-C5yj6zwY.cjs +1 -0
- package/dist/BaseIcon-7_g11dRj.js +174 -0
- package/dist/BaseIcon-JtWoVorZ.cjs +1 -0
- package/dist/DataTable-CwaOlAsy.js +127 -0
- package/dist/DataTable-Rm9II-m2.cjs +1 -0
- package/dist/Legend-CxvJTjEm.js +62 -0
- package/dist/Legend-D59FIuMs.cjs +1 -0
- package/dist/Shape-CVItL3vh.cjs +1 -0
- package/dist/Shape-CjLV0scA.js +107 -0
- package/dist/Slicer-Bxg5niHl.js +156 -0
- package/dist/Slicer-Cdss5Rus.cjs +1 -0
- package/dist/Title-2iks1ziC.js +46 -0
- package/dist/Title-Bb-A5OSV.cjs +1 -0
- package/dist/Tooltip-C3phqKuU.js +94 -0
- package/dist/Tooltip-C_UE6y-E.cjs +1 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
- package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
- package/dist/index-p5gfZSvB.cjs +4 -0
- package/dist/index-uOtklCCx.js +10268 -0
- package/dist/{index.es-BoVO5twe.js → index.es-YufTdp0y.js} +1 -1
- package/dist/{index.es-w_iDpZ-o.cjs → index.es-uyeSCnWE.cjs} +1 -1
- package/dist/jspdf.es.min-C660YX78.js +8038 -0
- package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
- package/dist/pdf-97UbtKC2.js +44 -0
- package/dist/pdf-Cz3729tZ.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/useNestedProp-2kIU-7On.cjs +1 -0
- package/dist/useNestedProp-BgWkUab_.js +13 -0
- package/dist/usePrinter-B6xQCyL-.js +464 -0
- package/dist/usePrinter-fZlsJid8.cjs +1 -0
- package/dist/useResponsive-B3TrDDIG.cjs +1 -0
- package/dist/useResponsive-NZB-WLRF.js +187 -0
- package/dist/vue-data-ui-Be0rgmbA.cjs +9 -0
- package/dist/vue-data-ui-Ccy6rBZN.js +246 -0
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +62 -61
- package/dist/vue-ui-3d-bar-BKMPFDi2.js +1085 -0
- package/dist/vue-ui-3d-bar-CKa4UXq4.cjs +19 -0
- package/dist/vue-ui-accordion-C_pwrAJl.cjs +1 -0
- package/dist/vue-ui-accordion-HJPf7My0.js +77 -0
- package/dist/vue-ui-age-pyramid-CE1xnA-8.cjs +1 -0
- package/dist/vue-ui-age-pyramid-DB_CL-gu.js +596 -0
- package/dist/vue-ui-annotator-BAMZcPlH.cjs +371 -0
- package/dist/vue-ui-annotator-DQsAL-nZ.js +2177 -0
- package/dist/vue-ui-candlestick-DCl8fpNu.js +657 -0
- package/dist/vue-ui-candlestick-Duv6oG79.cjs +2 -0
- package/dist/vue-ui-chestnut-BYHA6MT4.js +1051 -0
- package/dist/vue-ui-chestnut-mIZ4-ZEM.cjs +6 -0
- package/dist/vue-ui-cursor-C96IChA3.js +229 -0
- package/dist/vue-ui-cursor-De7dy4Mo.cjs +1 -0
- package/dist/vue-ui-dashboard-B2Yz41yO.js +232 -0
- package/dist/vue-ui-dashboard-BMGwKr0K.cjs +1 -0
- package/dist/vue-ui-digits-BnxLp7zQ.js +153 -0
- package/dist/vue-ui-digits-DSWyL-5K.cjs +1 -0
- package/dist/vue-ui-donut-1kei9ws5.cjs +1 -0
- package/dist/vue-ui-donut-B9iXisHK.js +743 -0
- package/dist/vue-ui-donut-evolution-B7Sun8sw.js +799 -0
- package/dist/vue-ui-donut-evolution-yv17DnGy.cjs +1 -0
- package/dist/vue-ui-dumbbell-BJEf_JEq.cjs +9 -0
- package/dist/vue-ui-dumbbell-DIsDnD1d.js +624 -0
- package/dist/vue-ui-flow-BTivYoGd.js +454 -0
- package/dist/vue-ui-flow-DOxJa8di.cjs +1 -0
- package/dist/vue-ui-galaxy-BEmywfFB.js +485 -0
- package/dist/vue-ui-galaxy-CHGOwCwM.cjs +1 -0
- package/dist/vue-ui-gauge-QAfMl-8t.cjs +1 -0
- package/dist/vue-ui-gauge-o4rDOqF3.js +466 -0
- package/dist/vue-ui-heatmap-BS4EzedX.cjs +1 -0
- package/dist/vue-ui-heatmap-DwqQqEsk.js +598 -0
- package/dist/vue-ui-kpi-F4qkJ_U-.cjs +1 -0
- package/dist/vue-ui-kpi-h8elYTcA.js +54 -0
- package/dist/vue-ui-mini-loader-C_8B2Pm6.cjs +1 -0
- package/dist/vue-ui-mini-loader-Cgoi9rhH.js +131 -0
- package/dist/vue-ui-molecule-Bmv76SWz.js +750 -0
- package/dist/vue-ui-molecule-C5CY_YYc.cjs +1 -0
- package/dist/vue-ui-mood-radar-BN0dzlfp.cjs +1 -0
- package/dist/vue-ui-mood-radar-DeMouUIe.js +548 -0
- package/dist/vue-ui-nested-donuts-ZyFoV-Zn.cjs +16 -0
- package/dist/vue-ui-nested-donuts-wOUkSVyZ.js +771 -0
- package/dist/vue-ui-onion-DCOKG2wG.js +554 -0
- package/dist/vue-ui-onion-VmTUo7TR.cjs +1 -0
- package/dist/vue-ui-parallel-coordinate-plot-BGtO2P4a.js +651 -0
- package/dist/vue-ui-parallel-coordinate-plot-BziXRF8E.cjs +8 -0
- package/dist/vue-ui-quadrant--JOTjPZh.js +1178 -0
- package/dist/vue-ui-quadrant-DawUUrur.cjs +1 -0
- package/dist/vue-ui-quick-chart-LXKfaJgS.js +1310 -0
- package/dist/vue-ui-quick-chart-jFlFtiNV.cjs +13 -0
- package/dist/vue-ui-radar-CWNIqvcA.js +614 -0
- package/dist/vue-ui-radar-VGH-lhaT.cjs +1 -0
- package/dist/vue-ui-rating-BNrIoJHN.js +271 -0
- package/dist/vue-ui-rating-Dtu6pwGx.cjs +1 -0
- package/dist/vue-ui-relation-circle-B3NKudOy.js +304 -0
- package/dist/vue-ui-relation-circle-Dwpx9o18.cjs +1 -0
- package/dist/vue-ui-rings-CsUngX_F.js +510 -0
- package/dist/vue-ui-rings-D9_OG--0.cjs +1 -0
- package/dist/vue-ui-scatter-DUsuh7bd.cjs +1 -0
- package/dist/vue-ui-scatter-DgxTz4Jx.js +874 -0
- package/dist/vue-ui-screenshot-51H_VrYY.js +160 -0
- package/dist/vue-ui-screenshot-C2Dz7CAe.cjs +3 -0
- package/dist/vue-ui-skeleton-BM9rwmxY.js +2064 -0
- package/dist/vue-ui-skeleton-sjfOtCZr.cjs +41 -0
- package/dist/vue-ui-smiley-DNnBtHht.cjs +2 -0
- package/dist/vue-ui-smiley-H5rSN-1B.js +763 -0
- package/dist/vue-ui-spark-trend-CLXZDYlk.js +246 -0
- package/dist/vue-ui-spark-trend-R4JJvfry.cjs +1 -0
- package/dist/vue-ui-sparkbar-C0k4ah-7.js +242 -0
- package/dist/vue-ui-sparkbar-CEUDIw0A.cjs +1 -0
- package/dist/vue-ui-sparkgauge-BHj00A07.js +157 -0
- package/dist/vue-ui-sparkgauge-CaEw6nmI.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-B6GuavEu.cjs +1 -0
- package/dist/vue-ui-sparkhistogram-DbMLYKqE.js +244 -0
- package/dist/vue-ui-sparkline-CJydanLS.cjs +1 -0
- package/dist/vue-ui-sparkline-CYova9x3.js +333 -0
- package/dist/vue-ui-sparkstackbar-Df__yM5b.cjs +1 -0
- package/dist/vue-ui-sparkstackbar-N5rVBM2h.js +244 -0
- package/dist/vue-ui-strip-plot-DJJ1vEWz.js +618 -0
- package/dist/vue-ui-strip-plot-b5lhB35d.cjs +1 -0
- package/dist/vue-ui-table-NHhOVDbs.cjs +14 -0
- package/dist/vue-ui-table-heatmap-Cro2etCY.js +237 -0
- package/dist/vue-ui-table-heatmap-DlL2nCqz.cjs +1 -0
- package/dist/vue-ui-table-sparkline-Bw2Gc_ur.cjs +1 -0
- package/dist/vue-ui-table-sparkline-DppMitqF.js +420 -0
- package/dist/vue-ui-table-xSvwJIa7.js +1430 -0
- package/dist/vue-ui-thermometer-M2kdp1x5.js +385 -0
- package/dist/vue-ui-thermometer-Q_3PX2V3.cjs +1 -0
- package/dist/vue-ui-timer-BtSDeIRp.cjs +64 -0
- package/dist/vue-ui-timer-CAaQ-QD6.js +453 -0
- package/dist/vue-ui-tiremarks-CbGOSEvD.cjs +1 -0
- package/dist/vue-ui-tiremarks-JFv4JLP0.js +249 -0
- package/dist/vue-ui-treemap-BqDX-bPf.cjs +1 -0
- package/dist/vue-ui-treemap-DCnv-xYr.js +722 -0
- package/dist/vue-ui-vertical-bar-CEbApJZl.js +737 -0
- package/dist/vue-ui-vertical-bar-CJB_KXyr.cjs +4 -0
- package/dist/vue-ui-waffle-CTS6C7gu.js +638 -0
- package/dist/vue-ui-waffle-IMEbGe-b.cjs +1 -0
- package/dist/vue-ui-wheel-CuOmEWMQ.cjs +1 -0
- package/dist/vue-ui-wheel-_zyCdFiI.js +227 -0
- package/dist/vue-ui-word-cloud-RDlXBEAN.js +346 -0
- package/dist/vue-ui-word-cloud-Y7Yk7uUJ.cjs +1 -0
- package/dist/vue-ui-xy-BZJQBKnU.cjs +3 -0
- package/dist/vue-ui-xy-DsvN9EIQ.js +2064 -0
- package/dist/vue-ui-xy-canvas-D_dnbyFS.cjs +9 -0
- package/dist/vue-ui-xy-canvas-Dbcw8-9Q.js +1006 -0
- package/package.json +1 -1
- package/dist/index-C6KVJkgd.cjs +0 -843
- package/dist/index-bDBuMYfe.js +0 -57303
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
import { ref as n, computed as v, onMounted as xe, onBeforeUnmount as _e, openBlock as c, createElementBlock as m, normalizeClass as R, normalizeStyle as x, createVNode as U, createCommentVNode as S, createBlock as V, unref as C, createSlots as Ne, withCtx as h, renderSlot as f, normalizeProps as H, guardReactiveProps as X, Fragment as ae, renderList as se, createElementVNode as w, createTextVNode as ue, toDisplayString as B, nextTick as Fe } from "vue";
|
|
2
|
+
import { u as Pe, c as ne, t as Le, a as Se, p as T, o as Ie, e as re, g as Oe, b as Me, d as ie, f as D, X as ze, s as Ae, r as Re, v as Ve, w as Be, n as De, q as We } from "./index-uOtklCCx.js";
|
|
3
|
+
import { t as Ee, u as Ge } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
+
import { _ as Ue } from "./Title-2iks1ziC.js";
|
|
5
|
+
import { u as He, U as Xe } from "./usePrinter-B6xQCyL-.js";
|
|
6
|
+
import { _ as je } from "./Tooltip-C3phqKuU.js";
|
|
7
|
+
import { D as qe } from "./DataTable-CwaOlAsy.js";
|
|
8
|
+
import { L as Je } from "./Legend-CxvJTjEm.js";
|
|
9
|
+
import Ke from "./vue-ui-skeleton-BM9rwmxY.js";
|
|
10
|
+
import Qe from "./vue-ui-accordion-HJPf7My0.js";
|
|
11
|
+
import { u as ve } from "./useNestedProp-BgWkUab_.js";
|
|
12
|
+
import { _ as Ye } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
|
+
const Ze = ["id"], et = ["xmlns", "viewBox"], tt = ["id"], lt = ["stop-color"], ot = ["stop-color"], at = ["stroke", "cx", "cy", "r", "fill"], st = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], ut = ["cx", "cy", "r", "onMouseenter"], nt = ["onClick"], rt = { key: 0 }, it = { key: 1 }, vt = ["innerHTML"], ct = {
|
|
14
|
+
__name: "vue-ui-rings",
|
|
15
|
+
props: {
|
|
16
|
+
config: {
|
|
17
|
+
type: Object,
|
|
18
|
+
default() {
|
|
19
|
+
return {};
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
dataset: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default() {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
emits: ["selectLegend"],
|
|
30
|
+
setup(ce, { expose: de, emit: he }) {
|
|
31
|
+
const p = ce, { vue_ui_rings: pe } = Pe(), _ = n(!1), I = v(() => !!p.dataset && p.dataset.length), N = n(ne()), ge = n(null), O = n(!1), W = n(""), $ = n(null), j = n(0), F = n(null), q = n(null), J = n(null), e = v(() => {
|
|
32
|
+
const t = ve({
|
|
33
|
+
userConfig: p.config,
|
|
34
|
+
defaultConfig: pe
|
|
35
|
+
});
|
|
36
|
+
return t.theme ? {
|
|
37
|
+
...ve({
|
|
38
|
+
userConfig: Le.vue_ui_rings[t.theme] || p.config,
|
|
39
|
+
defaultConfig: t
|
|
40
|
+
}),
|
|
41
|
+
customPalette: Se[t.theme] || T
|
|
42
|
+
} : t;
|
|
43
|
+
}), M = n(null);
|
|
44
|
+
xe(() => {
|
|
45
|
+
if (Ie(p.dataset) ? re({
|
|
46
|
+
componentName: "VueUiRings",
|
|
47
|
+
type: "dataset"
|
|
48
|
+
}) : p.dataset.forEach((t, o) => {
|
|
49
|
+
Oe({
|
|
50
|
+
datasetObject: t,
|
|
51
|
+
requiredAttributes: ["name", "values"]
|
|
52
|
+
}).forEach((l) => {
|
|
53
|
+
re({
|
|
54
|
+
componentName: "VueUiRings",
|
|
55
|
+
type: "datasetSerieAttribute",
|
|
56
|
+
property: l,
|
|
57
|
+
index: o
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}), e.value.responsive) {
|
|
61
|
+
const t = Ee(() => {
|
|
62
|
+
const { width: o, height: l } = Ge({
|
|
63
|
+
chart: F.value,
|
|
64
|
+
title: e.value.style.chart.title.text ? q.value : null,
|
|
65
|
+
legend: e.value.style.chart.legend.show ? J.value : null
|
|
66
|
+
});
|
|
67
|
+
u.value.width = o, u.value.height = l;
|
|
68
|
+
});
|
|
69
|
+
M.value = new ResizeObserver(t), M.value.observe(F.value.parentNode);
|
|
70
|
+
}
|
|
71
|
+
setTimeout(() => {
|
|
72
|
+
_.value = !0;
|
|
73
|
+
}, 600);
|
|
74
|
+
}), _e(() => {
|
|
75
|
+
M.value && M.value.disconnect();
|
|
76
|
+
});
|
|
77
|
+
const { isPrinting: fe, isImaging: ye, generatePdf: K, generateImage: Q } = He({
|
|
78
|
+
elementId: `rings_${N.value}`,
|
|
79
|
+
fileName: e.value.style.chart.title.text || "vue-ui-rings"
|
|
80
|
+
}), Y = v(() => Me(e.value.customPalette)), b = n({
|
|
81
|
+
showTable: e.value.table.show,
|
|
82
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
83
|
+
}), u = n({
|
|
84
|
+
height: 360,
|
|
85
|
+
width: 360
|
|
86
|
+
}), me = v(() => Math.min(u.value.height, u.value.width)), r = n([]);
|
|
87
|
+
function E(t) {
|
|
88
|
+
r.value.includes(t) ? r.value = r.value.filter((o) => o !== t) : r.value.push(t), he("selectLegend", i.value.map((o) => ({
|
|
89
|
+
name: o.name,
|
|
90
|
+
color: o.color,
|
|
91
|
+
value: o.value
|
|
92
|
+
})));
|
|
93
|
+
}
|
|
94
|
+
const be = v(() => Math.max(
|
|
95
|
+
...z.value.filter((t) => !r.value.includes(t.uid)).map(({ value: t }) => t)
|
|
96
|
+
));
|
|
97
|
+
function Z(t) {
|
|
98
|
+
return t / be.value;
|
|
99
|
+
}
|
|
100
|
+
const z = v(() => p.dataset.map(({ values: t, name: o, color: l = null }, a) => {
|
|
101
|
+
const s = (t || []).reduce((y, L) => y + L, 0);
|
|
102
|
+
return {
|
|
103
|
+
name: o,
|
|
104
|
+
color: l || ie(l) || Y.value[a] || T[a] || T[a % T.length],
|
|
105
|
+
value: s,
|
|
106
|
+
proportion: s / p.dataset.map((y) => (y.values || []).reduce((L, Te) => L + Te, 0)).reduce((y, L) => y + L, 0),
|
|
107
|
+
uid: ne()
|
|
108
|
+
};
|
|
109
|
+
})), ee = v(() => z.value.map((t) => ({
|
|
110
|
+
...t,
|
|
111
|
+
shape: "circle",
|
|
112
|
+
opacity: r.value.includes(t.uid) ? 0.5 : 1,
|
|
113
|
+
segregate: () => E(t.uid),
|
|
114
|
+
isSegregated: r.value.includes(t.uid)
|
|
115
|
+
})).toSorted((t, o) => o.value - t.value)), ke = v(() => ({
|
|
116
|
+
cy: "rings-div-legend",
|
|
117
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
118
|
+
color: e.value.style.chart.legend.color,
|
|
119
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
120
|
+
paddingBottom: 12,
|
|
121
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
122
|
+
})), g = v(() => z.value.filter((t) => !r.value.includes(t.uid)).map(({ value: t }) => t).reduce((t, o) => t + o, 0)), i = v(() => z.value.filter((t) => !r.value.includes(t.uid)).map(({ name: t, value: o, color: l = null, uid: a }, s) => ({
|
|
123
|
+
uid: a,
|
|
124
|
+
name: t,
|
|
125
|
+
color: l || ie(l) || Y.value[s] || T[s] || T[s % T.length],
|
|
126
|
+
value: o,
|
|
127
|
+
proportion: Z(o),
|
|
128
|
+
percentage: o / g.value * 100,
|
|
129
|
+
strokeWidth: e.value.style.chart.layout.rings.strokeWidth * Z(o)
|
|
130
|
+
})).toSorted((t, o) => o.value - t.value));
|
|
131
|
+
function Ce() {
|
|
132
|
+
return i.value.map(
|
|
133
|
+
({ name: t, color: o, value: l, absoluteValues: a, percentage: s }) => ({
|
|
134
|
+
name: t,
|
|
135
|
+
color: o,
|
|
136
|
+
value: l,
|
|
137
|
+
absoluteValues: a,
|
|
138
|
+
percentage: s
|
|
139
|
+
})
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
const d = v(() => me.value - e.value.style.chart.layout.rings.strokeWidth * 2), G = n(null);
|
|
143
|
+
function we(t, o) {
|
|
144
|
+
if (r.value.length === p.dataset.length) return;
|
|
145
|
+
G.value = {
|
|
146
|
+
datapoint: o,
|
|
147
|
+
seriesIndex: t,
|
|
148
|
+
series: i.value,
|
|
149
|
+
config: e.value
|
|
150
|
+
}, $.value = t;
|
|
151
|
+
const l = i.value[t], a = e.value.style.chart.tooltip.customFormat;
|
|
152
|
+
if (Ve(a) && Be(() => a({
|
|
153
|
+
seriesIndex: t,
|
|
154
|
+
datapoint: o,
|
|
155
|
+
series: i.value,
|
|
156
|
+
config: e.value
|
|
157
|
+
})))
|
|
158
|
+
W.value = a({
|
|
159
|
+
seriesIndex: t,
|
|
160
|
+
datapoint: o,
|
|
161
|
+
series: i.value,
|
|
162
|
+
config: e.value
|
|
163
|
+
});
|
|
164
|
+
else {
|
|
165
|
+
let s = "";
|
|
166
|
+
s += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, s += `<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="${l.color}" /></svg>`, e.value.style.chart.tooltip.showValue && (s += `<b>${D({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: l.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.tooltip.roundingValue })}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? s += `<span>(${(l.value / g.value * 100).toFixed(
|
|
167
|
+
e.value.style.chart.tooltip.roundingPercentage
|
|
168
|
+
)}%)</span></div>` : s += `<b>${(l.value / g.value * 100).toFixed(
|
|
169
|
+
e.value.style.chart.tooltip.roundingPercentage
|
|
170
|
+
)}%</b></div>`), W.value = s;
|
|
171
|
+
}
|
|
172
|
+
O.value = !0;
|
|
173
|
+
}
|
|
174
|
+
const k = v(() => {
|
|
175
|
+
const t = i.value.map((l) => ({
|
|
176
|
+
name: l.name,
|
|
177
|
+
color: l.color
|
|
178
|
+
})), o = i.value.map((l) => l.value);
|
|
179
|
+
return { head: t, body: o };
|
|
180
|
+
}), A = v(() => {
|
|
181
|
+
const t = [
|
|
182
|
+
' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
|
|
183
|
+
D({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: g.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
184
|
+
"100%"
|
|
185
|
+
], o = k.value.head.map((s, y) => [
|
|
186
|
+
{
|
|
187
|
+
color: s.color,
|
|
188
|
+
name: s.name
|
|
189
|
+
},
|
|
190
|
+
D({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: k.value.body[y], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
191
|
+
isNaN(k.value.body[y] / g.value) ? "-" : (k.value.body[y] / g.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
|
|
192
|
+
]), l = {
|
|
193
|
+
th: {
|
|
194
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
195
|
+
color: e.value.table.th.color,
|
|
196
|
+
outline: e.value.table.th.outline
|
|
197
|
+
},
|
|
198
|
+
td: {
|
|
199
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
200
|
+
color: e.value.table.td.color,
|
|
201
|
+
outline: e.value.table.td.outline
|
|
202
|
+
},
|
|
203
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
204
|
+
}, a = [
|
|
205
|
+
e.value.table.columnNames.series,
|
|
206
|
+
e.value.table.columnNames.value,
|
|
207
|
+
e.value.table.columnNames.percentage
|
|
208
|
+
];
|
|
209
|
+
return {
|
|
210
|
+
head: t,
|
|
211
|
+
body: o,
|
|
212
|
+
config: l,
|
|
213
|
+
colNames: a
|
|
214
|
+
};
|
|
215
|
+
});
|
|
216
|
+
function te() {
|
|
217
|
+
Fe(() => {
|
|
218
|
+
const t = k.value.head.map((a, s) => [[
|
|
219
|
+
a.name
|
|
220
|
+
], [k.value.body[s]], [isNaN(k.value.body[s] / g.value) ? "-" : k.value.body[s] / g.value * 100]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), l = De(o);
|
|
221
|
+
We({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-rings" });
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
const P = n(!1);
|
|
225
|
+
function $e(t) {
|
|
226
|
+
P.value = t, j.value += 1;
|
|
227
|
+
}
|
|
228
|
+
function le() {
|
|
229
|
+
b.value.showTable = !b.value.showTable;
|
|
230
|
+
}
|
|
231
|
+
function oe() {
|
|
232
|
+
b.value.showTooltip = !b.value.showTooltip;
|
|
233
|
+
}
|
|
234
|
+
return de({
|
|
235
|
+
getData: Ce,
|
|
236
|
+
generatePdf: K,
|
|
237
|
+
generateCsv: te,
|
|
238
|
+
generateImage: Q,
|
|
239
|
+
toggleTable: le,
|
|
240
|
+
toggleTooltip: oe
|
|
241
|
+
}), (t, o) => (c(), m("div", {
|
|
242
|
+
ref_key: "ringsChart",
|
|
243
|
+
ref: F,
|
|
244
|
+
class: R(`vue-ui-rings ${P.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
245
|
+
style: x(`font-family:${e.value.style.fontFamily};text-align:center;width:100%;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
|
|
246
|
+
id: `rings_${N.value}`,
|
|
247
|
+
onMouseleave: o[3] || (o[3] = (l) => {
|
|
248
|
+
$.value = null, O.value = !1;
|
|
249
|
+
})
|
|
250
|
+
}, [
|
|
251
|
+
e.value.style.chart.title.text ? (c(), m("div", {
|
|
252
|
+
key: 0,
|
|
253
|
+
ref_key: "chartTitle",
|
|
254
|
+
ref: q,
|
|
255
|
+
style: x(`width:100%;background:${e.value.style.chart.backgroundColor}`)
|
|
256
|
+
}, [
|
|
257
|
+
U(Ue, {
|
|
258
|
+
config: {
|
|
259
|
+
title: {
|
|
260
|
+
cy: "rings-div-title",
|
|
261
|
+
...e.value.style.chart.title
|
|
262
|
+
},
|
|
263
|
+
subtitle: {
|
|
264
|
+
cy: "rings-div-subtitle",
|
|
265
|
+
...e.value.style.chart.title.subtitle
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}, null, 8, ["config"])
|
|
269
|
+
], 4)) : S("", !0),
|
|
270
|
+
e.value.userOptions.show && I.value ? (c(), V(Xe, {
|
|
271
|
+
ref_key: "details",
|
|
272
|
+
ref: ge,
|
|
273
|
+
key: `user_options_${j.value}`,
|
|
274
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
275
|
+
color: e.value.style.chart.color,
|
|
276
|
+
isPrinting: C(fe),
|
|
277
|
+
isImaging: C(ye),
|
|
278
|
+
uid: N.value,
|
|
279
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
280
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
281
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
282
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
283
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
284
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
285
|
+
isTooltip: b.value.showTooltip,
|
|
286
|
+
isFullscreen: P.value,
|
|
287
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
288
|
+
chartElement: F.value,
|
|
289
|
+
onToggleFullscreen: $e,
|
|
290
|
+
onGeneratePdf: C(K),
|
|
291
|
+
onGenerateCsv: te,
|
|
292
|
+
onGenerateImage: C(Q),
|
|
293
|
+
onToggleTable: le,
|
|
294
|
+
onToggleTooltip: oe
|
|
295
|
+
}, Ne({ _: 2 }, [
|
|
296
|
+
t.$slots.optionTooltip ? {
|
|
297
|
+
name: "optionTooltip",
|
|
298
|
+
fn: h(() => [
|
|
299
|
+
f(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
300
|
+
]),
|
|
301
|
+
key: "0"
|
|
302
|
+
} : void 0,
|
|
303
|
+
t.$slots.optionPdf ? {
|
|
304
|
+
name: "optionPdf",
|
|
305
|
+
fn: h(() => [
|
|
306
|
+
f(t.$slots, "optionPdf", {}, void 0, !0)
|
|
307
|
+
]),
|
|
308
|
+
key: "1"
|
|
309
|
+
} : void 0,
|
|
310
|
+
t.$slots.optionCsv ? {
|
|
311
|
+
name: "optionCsv",
|
|
312
|
+
fn: h(() => [
|
|
313
|
+
f(t.$slots, "optionCsv", {}, void 0, !0)
|
|
314
|
+
]),
|
|
315
|
+
key: "2"
|
|
316
|
+
} : void 0,
|
|
317
|
+
t.$slots.optionImg ? {
|
|
318
|
+
name: "optionImg",
|
|
319
|
+
fn: h(() => [
|
|
320
|
+
f(t.$slots, "optionImg", {}, void 0, !0)
|
|
321
|
+
]),
|
|
322
|
+
key: "3"
|
|
323
|
+
} : void 0,
|
|
324
|
+
t.$slots.optionTable ? {
|
|
325
|
+
name: "optionTable",
|
|
326
|
+
fn: h(() => [
|
|
327
|
+
f(t.$slots, "optionTable", {}, void 0, !0)
|
|
328
|
+
]),
|
|
329
|
+
key: "4"
|
|
330
|
+
} : void 0,
|
|
331
|
+
t.$slots.optionFullscreen ? {
|
|
332
|
+
name: "optionFullscreen",
|
|
333
|
+
fn: h(({ toggleFullscreen: l, isFullscreen: a }) => [
|
|
334
|
+
f(t.$slots, "optionFullscreen", H(X({ toggleFullscreen: l, isFullscreen: a })), void 0, !0)
|
|
335
|
+
]),
|
|
336
|
+
key: "5"
|
|
337
|
+
} : void 0
|
|
338
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : S("", !0),
|
|
339
|
+
I.value ? (c(), m("svg", {
|
|
340
|
+
key: 2,
|
|
341
|
+
xmlns: C(ze),
|
|
342
|
+
class: R({ "vue-data-ui-fullscreen--on": P.value, "vue-data-ui-fulscreen--off": !P.value }),
|
|
343
|
+
viewBox: `0 0 ${u.value.width <= 0 ? 10 : u.value.width} ${u.value.height <= 0 ? 10 : u.value.height}`,
|
|
344
|
+
style: x(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
345
|
+
}, [
|
|
346
|
+
(c(!0), m(ae, null, se(i.value, (l, a) => (c(), m("radialGradient", {
|
|
347
|
+
cx: "50%",
|
|
348
|
+
cy: "30%",
|
|
349
|
+
r: "50%",
|
|
350
|
+
fx: "50%",
|
|
351
|
+
fy: "50%",
|
|
352
|
+
id: `gradient_${N.value}_${a}`
|
|
353
|
+
}, [
|
|
354
|
+
w("stop", {
|
|
355
|
+
offset: "0%",
|
|
356
|
+
"stop-color": `${C(Ae)(l.color, 0.05)}${C(Re)[100 - e.value.style.chart.layout.rings.gradient.intensity]}`
|
|
357
|
+
}, null, 8, lt),
|
|
358
|
+
w("stop", {
|
|
359
|
+
offset: "100%",
|
|
360
|
+
"stop-color": l.color
|
|
361
|
+
}, null, 8, ot)
|
|
362
|
+
], 8, tt))), 256)),
|
|
363
|
+
(c(!0), m(ae, null, se(i.value, (l, a) => (c(), m("g", null, [
|
|
364
|
+
w("circle", {
|
|
365
|
+
class: R({
|
|
366
|
+
"vue-ui-rings-item": _.value && e.value.useCssAnimation,
|
|
367
|
+
"vue-rings-item-onload": !_.value && e.value.useCssAnimation,
|
|
368
|
+
"vue-ui-rings-opacity": $.value !== null && $.value !== a
|
|
369
|
+
}),
|
|
370
|
+
style: x(`animation-delay:${a * 100}ms`),
|
|
371
|
+
stroke: e.value.style.chart.layout.rings.stroke,
|
|
372
|
+
cx: u.value.width / 2,
|
|
373
|
+
cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + d.value * i.value[0].proportion / 2 - d.value * l.proportion / 2 - 2 * (a + 1),
|
|
374
|
+
r: d.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : d.value * l.proportion / 2 * 0.9,
|
|
375
|
+
fill: e.value.style.chart.layout.rings.gradient.underlayerColor
|
|
376
|
+
}, null, 14, at),
|
|
377
|
+
w("circle", {
|
|
378
|
+
class: R({
|
|
379
|
+
"vue-ui-rings-item": _.value && e.value.useCssAnimation,
|
|
380
|
+
"vue-rings-item-onload": !_.value && e.value.useCssAnimation,
|
|
381
|
+
"vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
|
|
382
|
+
"vue-ui-rings-blur": $.value !== null && $.value !== a
|
|
383
|
+
}),
|
|
384
|
+
style: x(`animation-delay:${a * 100}ms`),
|
|
385
|
+
stroke: e.value.style.chart.layout.rings.stroke,
|
|
386
|
+
"stroke-width": l.strokeWidth < 0.5 ? 0.5 : l.strokeWidth,
|
|
387
|
+
cx: u.value.width / 2,
|
|
388
|
+
cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + d.value * i.value[0].proportion / 2 - d.value * l.proportion / 2 - 2 * (a + 1),
|
|
389
|
+
r: d.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : d.value * l.proportion / 2 * 0.9,
|
|
390
|
+
fill: e.value.style.chart.layout.rings.gradient.show ? `url(#gradient_${N.value}_${a})` : l.color
|
|
391
|
+
}, null, 14, st),
|
|
392
|
+
w("circle", {
|
|
393
|
+
"data-cy-trap": "",
|
|
394
|
+
stroke: "none",
|
|
395
|
+
cx: u.value.width / 2,
|
|
396
|
+
cy: a === 0 ? u.value.height / 2 : u.value.height / 2 + d.value * i.value[0].proportion / 2 - d.value * l.proportion / 2 - 2 * (a + 1),
|
|
397
|
+
r: d.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : d.value * l.proportion / 2 * 0.9,
|
|
398
|
+
fill: "transparent",
|
|
399
|
+
onMouseenter: (s) => we(a, l),
|
|
400
|
+
onMouseleave: o[0] || (o[0] = (s) => {
|
|
401
|
+
$.value = null, O.value = !1;
|
|
402
|
+
})
|
|
403
|
+
}, null, 40, ut)
|
|
404
|
+
]))), 256)),
|
|
405
|
+
f(t.$slots, "svg", { svg: u.value }, void 0, !0)
|
|
406
|
+
], 14, et)) : S("", !0),
|
|
407
|
+
I.value ? S("", !0) : (c(), V(Ke, {
|
|
408
|
+
key: 3,
|
|
409
|
+
config: {
|
|
410
|
+
type: "rings",
|
|
411
|
+
style: {
|
|
412
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
413
|
+
rings: {
|
|
414
|
+
color: "#CCCCCC"
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}, null, 8, ["config"])),
|
|
419
|
+
w("div", {
|
|
420
|
+
ref_key: "chartLegend",
|
|
421
|
+
ref: J
|
|
422
|
+
}, [
|
|
423
|
+
e.value.style.chart.legend.show ? (c(), V(Je, {
|
|
424
|
+
key: 0,
|
|
425
|
+
legendSet: ee.value,
|
|
426
|
+
config: ke.value,
|
|
427
|
+
onClickMarker: o[1] || (o[1] = ({ legend: l }) => E(l.uid))
|
|
428
|
+
}, {
|
|
429
|
+
item: h(({ legend: l }) => [
|
|
430
|
+
w("div", {
|
|
431
|
+
"data-cy-legend-item": "",
|
|
432
|
+
onClick: (a) => E(l.uid),
|
|
433
|
+
style: x(`opacity:${r.value.includes(l.uid) ? 0.5 : 1}`)
|
|
434
|
+
}, [
|
|
435
|
+
ue(B(l.name) + ": " + B(C(D)({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: l.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.style.chart.legend.roundingValue })) + " ", 1),
|
|
436
|
+
r.value.includes(l.uid) ? (c(), m("span", it, " ( - % ) ")) : (c(), m("span", rt, " (" + B(isNaN(l.value / g.value) ? "-" : (l.value / g.value * 100).toFixed(e.value.style.chart.legend.roundingPercentage)) + "%) ", 1))
|
|
437
|
+
], 12, nt)
|
|
438
|
+
]),
|
|
439
|
+
_: 1
|
|
440
|
+
}, 8, ["legendSet", "config"])) : f(t.$slots, "legend", {
|
|
441
|
+
key: 1,
|
|
442
|
+
legend: ee.value
|
|
443
|
+
}, void 0, !0)
|
|
444
|
+
], 512),
|
|
445
|
+
U(je, {
|
|
446
|
+
show: b.value.showTooltip && O.value && r.value.length < p.dataset.length,
|
|
447
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
448
|
+
color: e.value.style.chart.tooltip.color,
|
|
449
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
450
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
451
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
452
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
453
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
454
|
+
parent: F.value,
|
|
455
|
+
content: W.value,
|
|
456
|
+
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
|
|
457
|
+
}, {
|
|
458
|
+
"tooltip-before": h(() => [
|
|
459
|
+
f(t.$slots, "tooltip-before", H(X({ ...G.value })), void 0, !0)
|
|
460
|
+
]),
|
|
461
|
+
"tooltip-after": h(() => [
|
|
462
|
+
f(t.$slots, "tooltip-after", H(X({ ...G.value })), void 0, !0)
|
|
463
|
+
]),
|
|
464
|
+
_: 3
|
|
465
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "parent", "content", "isCustom"]),
|
|
466
|
+
I.value ? (c(), V(Qe, {
|
|
467
|
+
key: 4,
|
|
468
|
+
hideDetails: "",
|
|
469
|
+
config: {
|
|
470
|
+
open: b.value.showTable,
|
|
471
|
+
maxHeight: 1e4,
|
|
472
|
+
body: {
|
|
473
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
474
|
+
color: e.value.style.chart.color
|
|
475
|
+
},
|
|
476
|
+
head: {
|
|
477
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
478
|
+
color: e.value.style.chart.color
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}, {
|
|
482
|
+
content: h(() => [
|
|
483
|
+
U(qe, {
|
|
484
|
+
colNames: A.value.colNames,
|
|
485
|
+
head: A.value.head,
|
|
486
|
+
body: A.value.body,
|
|
487
|
+
config: A.value.config,
|
|
488
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
489
|
+
onClose: o[2] || (o[2] = (l) => b.value.showTable = !1)
|
|
490
|
+
}, {
|
|
491
|
+
th: h(({ th: l }) => [
|
|
492
|
+
w("div", {
|
|
493
|
+
innerHTML: l,
|
|
494
|
+
style: { display: "flex", "align-items": "center" }
|
|
495
|
+
}, null, 8, vt)
|
|
496
|
+
]),
|
|
497
|
+
td: h(({ td: l }) => [
|
|
498
|
+
ue(B(l.name || l), 1)
|
|
499
|
+
]),
|
|
500
|
+
_: 1
|
|
501
|
+
}, 8, ["colNames", "head", "body", "config", "title"])
|
|
502
|
+
]),
|
|
503
|
+
_: 1
|
|
504
|
+
}, 8, ["config"])) : S("", !0)
|
|
505
|
+
], 46, Ze));
|
|
506
|
+
}
|
|
507
|
+
}, Tt = /* @__PURE__ */ Ye(ct, [["__scopeId", "data-v-c7da9220"]]);
|
|
508
|
+
export {
|
|
509
|
+
Tt as default
|
|
510
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-p5gfZSvB.cjs"),D=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-Bb-A5OSV.cjs"),U=require("./usePrinter-fZlsJid8.cjs"),ne=require("./Tooltip-C_UE6y-E.cjs"),ue=require("./DataTable-Rm9II-m2.cjs"),se=require("./Legend-D59FIuMs.cjs"),ie=require("./vue-ui-skeleton-sjfOtCZr.cjs"),ce=require("./vue-ui-accordion-C_pwrAJl.cjs"),H=require("./useNestedProp-2kIU-7On.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],pe=["xmlns","viewBox"],he=["id"],ge=["stop-color"],fe=["stop-color"],me=["stroke","cx","cy","r","fill"],ye=["stroke","stroke-width","cx","cy","r","fill"],be=["cx","cy","r","onMouseenter"],ke=["onClick"],Ce={key:0},we={key:1},xe=["innerHTML"],Te={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(W,{expose:G,emit:j}){const v=W,{vue_ui_rings:X}=n.useConfig(),y=e.ref(!1),x=e.computed(()=>!!v.dataset&&v.dataset.length),b=e.ref(n.createUid()),J=e.ref(null),T=e.ref(!1),_=e.ref(""),m=e.ref(null),V=e.ref(0),k=e.ref(null),F=e.ref(null),L=e.ref(null),t=e.computed(()=>{const l=H.useNestedProp({userConfig:v.config,defaultConfig:X});return l.theme?{...H.useNestedProp({userConfig:n.themes.vue_ui_rings[l.theme]||v.config,defaultConfig:l}),customPalette:n.themePalettes[l.theme]||n.palette}:l}),$=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(v.dataset)?n.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((l,a)=>{n.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{n.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=D.throttle(()=>{const{width:a,height:o}=D.useResponsive({chart:k.value,title:t.value.style.chart.title.text?F.value:null,legend:t.value.style.chart.legend.show?L.value:null});s.value.width=a,s.value.height=o});$.value=new ResizeObserver(l),$.value.observe(k.value.parentNode)}setTimeout(()=>{y.value=!0},600)}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:K,isImaging:Q,generatePdf:E,generateImage:z}=U.usePrinter({elementId:`rings_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),I=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),Y=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function B(l){i.value.includes(l)?i.value=i.value.filter(a=>a!==l):i.value.push(l),j("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const Z=e.computed(()=>Math.max(...N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function O(l){return l/Z.value}const N=e.computed(()=>v.dataset.map(({values:l,name:a,color:o=null},r)=>{const u=(l||[]).reduce((h,w)=>h+w,0);return{name:a,color:o||n.convertColorToHex(o)||I.value[r]||n.palette[r]||n.palette[r%n.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,ae)=>w+ae,0)).reduce((h,w)=>h+w,0),uid:n.createUid()}})),M=e.computed(()=>N.value.map(l=>({...l,shape:"circle",opacity:i.value.includes(l.uid)?.5:1,segregate:()=>B(l.uid),isSegregated:i.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),ee=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:r},u)=>({uid:r,name:l,color:o||n.convertColorToHex(o)||I.value[u]||n.palette[u]||n.palette[u%n.palette.length],value:a,proportion:O(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*O(a)})).toSorted((l,a)=>a.value-l.value));function te(){return c.value.map(({name:l,color:a,value:o,absoluteValues:r,percentage:u})=>({name:l,color:a,value:o,absoluteValues:r,percentage:u}))}const d=e.computed(()=>Y.value-t.value.style.chart.layout.rings.strokeWidth*2),P=e.ref(null);function le(l,a){if(i.value.length===v.dataset.length)return;P.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=r({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<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="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${(o.value/p.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%)</span></div>`:u+=`<b>${(o.value/p.value*100).toFixed(t.value.style.chart.tooltip.roundingPercentage)}%</b></div>`),_.value=u}T.value=!0}const f=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},n.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},r=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:r}});function R(){e.nextTick(()=>{const l=f.value.head.map((r,u)=>[[r.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=n.createCsvContent(a);n.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function oe(l){C.value=l,V.value+=1}function q(){g.value.showTable=!g.value.showTable}function A(){g.value.showTooltip=!g.value.showTooltip}return G({getData:te,generatePdf:E,generateCsv:R,generateImage:z,toggleTable:q,toggleTooltip:A}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:k,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${b.value}`,onMouseleave:a[3]||(a[3]=o=>{m.value=null,T.value=!1})},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:F,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(U.UserOptions,{ref_key:"details",ref:J,key:`user_options_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(K),isImaging:e.unref(Q),uid:b.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:oe,onGeneratePdf:e.unref(E),onGenerateCsv:R,onGenerateImage:e.unref(z),onToggleTable:q,onToggleTooltip:A},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:r})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(o.color,.05)}${e.unref(n.opacity)[100-t.value.style.chart.layout.rings.gradient.intensity]}`},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,fe)],8,he))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(r+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,me),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==r}),style:e.normalizeStyle(`animation-delay:${r*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(r+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${b.value}_${r})`:o.color},null,14,ye),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:r===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(r+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:"transparent",onMouseenter:u=>le(r,o),onMouseleave:a[0]||(a[0]=u=>{m.value=null,T.value=!1})},null,40,be)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:3,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:L},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(se.Legend,{key:0,legendSet:M.value,config:ee.value,onClickMarker:a[1]||(a[1]=({legend:o})=>B(o.uid))},{item:e.withCtx(({legend:o})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:r=>B(o.uid),style:e.normalizeStyle(`opacity:${i.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}))+" ",1),i.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",we," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ce," ("+e.toDisplayString(isNaN(o.value/p.value)?"-":(o.value/p.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ke)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:M.value},void 0,!0)],512),e.createVNode(ne._sfc_main,{show:g.value.showTooltip&&T.value&&i.value.length<v.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,parent:k.value,content:_.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(ce.default,{key:4,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ue.DataTable,{colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>g.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,xe)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ve))}},$e=de._export_sfc(Te,[["__scopeId","data-v-c7da9220"]]);exports.default=$e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-p5gfZSvB.cjs"),ue=require("./useResponsive-B3TrDDIG.cjs"),we=require("./Title-Bb-A5OSV.cjs"),ie=require("./usePrinter-fZlsJid8.cjs"),_e=require("./Tooltip-C_UE6y-E.cjs"),Be=require("./Legend-D59FIuMs.cjs"),ce=require("./Shape-CVItL3vh.cjs"),Ce=require("./DataTable-Rm9II-m2.cjs"),Se=require("./vue-ui-skeleton-sjfOtCZr.cjs"),Me=require("./vue-ui-accordion-C_pwrAJl.cjs"),ye=require("./useNestedProp-2kIU-7On.cjs"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),$e=["id"],Ee=["xmlns","viewBox"],ze={key:0},Le=["x1","x2","y1","y2","stroke","stroke-width"],Ve=["x1","x2","y1","y2","stroke","stroke-width"],Ae={key:1},Te=["points","fill","stroke-width","stroke-dasharray","stroke"],Fe={key:0},Pe=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],De={key:1},We={key:2},Ie=["id"],Oe=["stop-color"],qe=["stop-color"],Xe=["id"],je=["stop-color"],Ye=["stop-color"],Re=["x","y","width","height","fill","stroke","stroke-width","rx"],Ge=["x","y","height","width","fill","stroke","stroke-width","rx"],Ue={key:0},He=["d","stroke","stroke-width"],Je=["d","stroke","stroke-width"],Ke=["d","stroke","stroke-width"],Qe=["d","stroke","stroke-width"],Ze={key:3,style:{"pointer-events":"none !important"}},et=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],tt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],lt=["x","y","font-size","fill","font-weight","text-anchor"],ot=["x","y","font-size","fill","font-weight"],at=["cx","cy","r","fill","stroke","stroke-width"],st=["cx","cy","r","fill","stroke","stroke-width"],rt=["x","y","font-size","fill","font-weight","text-anchor"],nt={key:4},ut=["x","y","font-size","fill"],it=["x","y","font-size","fill"],ct=["id","transform","font-size","font-weight","fill"],yt={key:5},dt=["x","y","font-size","fill"],vt=["x","y","font-size","fill"],pt=["font-size","font-weight","fill","x","y"],ht=["id"],mt=["x","y","width","height"],ft={key:6},gt=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],kt=["x","y","fill","font-size","font-weight"],xt=["onClick"],bt={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},wt={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},_t={key:0},Bt=["innerHTML"],Ct={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(de,{expose:ve}){const S=de,{vue_ui_scatter:pe}=i.useConfig(),F=e.computed(()=>!!S.dataset&&S.dataset.length),g=e.ref(i.createUid()),he=e.ref(null),O=e.ref(!1),q=e.ref(""),U=e.ref(0),A=e.ref(null),H=e.ref(null),J=e.ref(null),t=e.computed(()=>{const o=ye.useNestedProp({userConfig:S.config,defaultConfig:pe});return o.theme?{...ye.useNestedProp({userConfig:i.themes.vue_ui_scatter[o.theme]||S.config,defaultConfig:o}),customPalette:i.themePalettes[o.theme]||i.palette}:o}),P=e.ref(null);e.onMounted(()=>{if(i.objectIsEmpty(S.dataset)&&i.error({componentName:"VueUiScatter",type:"dataset"}),t.value.responsive){const o=ue.throttle(()=>{const{width:n,height:l}=ue.useResponsive({chart:A.value,title:t.value.style.title.text?H.value:null,legend:t.value.style.legend.show?J.value:null});k.value.width=n,k.value.height=l});P.value=new ResizeObserver(o),P.value.observe(A.value.parentNode)}}),e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});const{isPrinting:me,isImaging:fe,generatePdf:K,generateImage:Q}=ie.usePrinter({elementId:`vue-ui-scatter_${g.value}`,fileName:t.value.style.title.text||"vue-ui-scatter"}),Z=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),M=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),k=e.ref({height:t.value.style.layout.height,width:t.value.style.layout.width}),D=e.computed(()=>t.value.style.layout.marginalBars.show?t.value.style.layout.marginalBars.size+t.value.style.layout.marginalBars.offset:0),r=e.computed(()=>({top:t.value.style.layout.padding.top+D.value,right:k.value.width-t.value.style.layout.padding.right-D.value,bottom:k.value.height-t.value.style.layout.padding.bottom,left:t.value.style.layout.padding.left,height:k.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom-D.value,width:k.value.width-t.value.style.layout.padding.left-t.value.style.layout.padding.right-D.value})),p=e.computed(()=>{S.dataset.forEach((a,u)=>{i.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["values"]}).forEach(h=>{i.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:h,index:u})}),a.values&&a.values.forEach((h,E)=>{i.getMissingDatasetAttributes({datasetObject:h,requiredAttributes:["x","y"]}).forEach(V=>{i.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${V}`,index:`${u} - ${E}`})})})});const o=Math.min(...$.value.filter(a=>!v.value.includes(a.id)).flatMap(a=>a.values.map(u=>u.x))),n=Math.max(...$.value.filter(a=>!v.value.includes(a.id)).flatMap(a=>a.values.map(u=>u.x))),l=Math.min(...$.value.filter(a=>!v.value.includes(a.id)).flatMap(a=>a.values.map(u=>u.y))),s=Math.max(...$.value.filter(a=>!v.value.includes(a.id)).flatMap(a=>a.values.map(u=>u.y)));return{xMin:o>=0?0:o,xMax:n,yMin:l>=0?0:l,yMax:s}}),y=e.computed(()=>({x:r.value.left+Math.abs(p.value.xMin)/(p.value.xMax+Math.abs(p.value.xMin))*r.value.width,y:r.value.bottom-Math.abs(p.value.yMin)/(p.value.yMax+Math.abs(p.value.yMin))*r.value.height})),$=e.computed(()=>S.dataset.map((o,n)=>{const l=`cluster_${g.value}_${n}`;return{...o,id:l,color:o.color?o.color:Z.value[n]||i.palette[n]||i.palette[n%i.palette.length],opacity:v.value.includes(l)?.5:1,shape:o.shape??"circle",segregate:()=>ae(l),isSegregated:v.value.includes(l)}})),ge=e.computed(()=>({cy:"scatter-div-legend",backgroundColor:t.value.style.legend.backgroundColor,color:t.value.style.legend.color,fontSize:t.value.style.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.legend.bold?"bold":""})),X=e.computed(()=>$.value.map((o,n)=>({...o,plots:o.values.map(l=>({x:r.value.left+(l.x+Math.abs(p.value.xMin))/(p.value.xMax+Math.abs(p.value.xMin))*r.value.width,y:r.value.bottom-(l.y+Math.abs(p.value.yMin))/(p.value.yMax+Math.abs(p.value.yMin))*r.value.height,v:{...l,name:l.name||""},clusterName:o.name,color:o.color?o.color:Z.value[n]||i.palette[n]||i.palette[n%i.palette.length],id:`plot_${g.value}_${Math.random()}`,weight:l.weight??t.value.style.layout.plots.radius}))})).filter(o=>!v.value.includes(o.id))),x=e.computed(()=>X.value.map(o=>{const n=o.plots.reduce((d,z)=>d+z.x,0)/o.plots.length,l=o.plots.reduce((d,z)=>d+z.y,0)/o.plots.length;let s=0,a=0,u=0;for(const d of o.plots)s+=(d.x-n)*(d.y-l),a+=(d.x-n)**2,u+=(d.y-l)**2;const h=s/Math.sqrt(a*u),E=h*(Math.sqrt(u)/Math.sqrt(a)),V=l-E*n,B={x1:r.value.left,x2:r.value.right,y1:E*r.value.left+V,y2:E*r.value.right+V,coefficient:h},f=(B.y2-B.y1)/(B.x2-B.x1),w=B.y1-f*B.x1,C=Math.min(k.value.width-t.value.style.layout.padding.right,Math.max(t.value.style.layout.padding.left,(r.value.top-w)/f)),I={x:C,y:f*C+w<=t.value.style.layout.padding.top?r.value.top:f*C+w};return{...o,correlation:B,label:I,plots:o.plots.map(d=>{const z=(d.x+f*d.y-f*w)/(1+Math.pow(f,2)),Y=(f*d.x+Math.pow(f,2)*d.y+w)/(1+Math.pow(f,2)),m=Math.sqrt(Math.pow(d.x-z,2)+Math.pow(d.y-Y,2));return{...d,deviation:m,shape:o.shape,color:o.color}})}})),ee=e.computed(()=>Math.max(...x.value.flatMap(o=>o.plots.map(n=>Math.abs(n.deviation)))));function ke(){return x.value}function te(o,n){const l=Array.isArray(o)?o.flatMap(m=>m.plots.map(L=>({x:L.x,y:L.y}))):o.plots.map(m=>({x:m.x,y:m.y}));let s=1/0,a=-1/0,u=1/0,h=-1/0;l.forEach(({x:m,y:L})=>{s=Math.min(s,m),a=Math.max(a,m),u=Math.min(u,L),h=Math.max(h,L)});const E=a-s,V=h-u,B=E/n,f=V/n,w=Array(n).fill(0),C=Array(n).fill(0);l.forEach(({x:m,y:L})=>{const R=Math.floor((m-s)/B),G=Math.floor((L-u)/f);w[R]||(w[R]=0),C[G]||(C[G]=0),w[R]+=1,C[G]+=1});const I=[],d=[];for(let m=0;m<n;m+=1)I.push(s+(m+.5)*B),d.push(u+(m+.5)*f);const z=Math.max(...w),Y=Math.max(...C);return{x:w,y:C,avgX:I,avgY:d,maxX:z,maxY:Y}}const N=e.computed(()=>t.value.style.layout.marginalBars.tranches),b=e.computed(()=>te(X.value,N.value)),xe=e.computed(()=>{const o=r.value.top-t.value.style.layout.marginalBars.offset,n=r.value.right+t.value.style.layout.marginalBars.offset;return X.value.map(l=>{const s=te(l,N.value);return{coords:s,dX:i.createSmoothPath(s.avgX.map((a,u)=>({x:a,y:o-s.x[u]/s.maxX*t.value.style.layout.marginalBars.size}))),dY:i.createSmoothPath(s.avgY.map((a,u)=>({y:a,x:n+t.value.style.layout.marginalBars.size*s.y[u]/s.maxY}))),color:l.color,id:l.id}})}),_=e.ref(void 0),c=e.ref(null),j=e.ref(null);function le(o,n){_.value=o.id,c.value=o;let l="";j.value={datapoint:o,seriesIndex:n,series:x.value,config:t.value};const s=t.value.style.tooltip.customFormat;i.isFunction(s)&&i.functionReturnsString(()=>s({datapoint:o,seriesIndex:n,series:x.value,config:t.value}))?q.value=s({datapoint:o,seriesIndex:n,series:x.value,config:t.value}):(o.clusterName&&(l+=`<div style="display:flex;gap:3px;align-items:center">${o.clusterName}</div>`),o.v.name&&(l+=`<div>${o.v.name}</div>`),l+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,l+=`<div>${t.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(o.v.x)?"-":i.dataLabel({p:t.value.style.tooltip.prefix,v:o.v.x,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue})}</b></div>`,l+=`<div>${t.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(o.v.y)?"-":i.dataLabel({p:t.value.style.tooltip.prefix,v:o.v.y,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue})}</b></div>`,l+=`${t.value.style.layout.plots.deviation.translation}: <b>${i.dataLabel({v:o.deviation,r:t.value.style.layout.plots.deviation.roundingValue})}</b>`,l+="</div>",q.value=`<div>${l}</div>`),O.value=!0}function oe(){O.value=!1,_.value=void 0,c.value=null}const v=e.ref([]);function ae(o){v.value.includes(o)?v.value=v.value.filter(n=>n!==o):v.value.length<S.dataset.length-1&&v.value.push(o)}function se(){e.nextTick(()=>{const o=["",t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],n=x.value.map(a=>[a.name,a.correlation.coefficient,a.plots.length,a.plots.map(u=>u.v.x).reduce((u,h)=>u+h,0)/a.plots.length,a.plots.map(u=>u.v.y).reduce((u,h)=>u+h,0)/a.plots.length]),l=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([o]).concat(n),s=i.createCsvContent(l);i.downloadCsv({csvContent:s,title:t.value.style.title.text||"vue-ui-heatmap"})})}const W=e.computed(()=>{const o=[t.value.table.translations.series,t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],n=x.value.map(s=>[{shape:s.shape,content:s.name,color:s.color},Number((s.correlation.coefficient??0).toFixed(t.value.table.td.roundingValue)).toLocaleString(),s.plots.length.toLocaleString(),Number((s.plots.map(a=>a.v.x??0).reduce((a,u)=>a+u,0)/s.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString(),Number((s.plots.map(a=>a.v.y??0).reduce((a,u)=>a+u,0)/s.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString()]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:n,config:l,colNames:o}}),T=e.ref(!1);function be(o){T.value=o,U.value+=1}function re(){M.value.showTable=!M.value.showTable}function ne(){M.value.showTooltip=!M.value.showTooltip}return ve({getData:ke,generatePdf:K,generateCsv:se,generateImage:Q,toggleTable:re,toggleTooltip:ne}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${T.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref:A,id:`vue-ui-scatter_${g.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:H,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[e.createVNode(we._sfc_main,{config:{title:{cy:"scatter-div-title",...t.value.style.title},subtitle:{cy:"scatter-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&F.value?(e.openBlock(),e.createBlock(ie.UserOptions,{ref_key:"details",ref:he,key:`user_options_${U.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(fe),isPrinting:e.unref(me),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:M.value.showTooltip,isFullscreen:T.value,titles:{...t.value.userOptions.buttonTitles},chartElement:A.value,onToggleFullscreen:be,onGeneratePdf:e.unref(K),onGenerateCsv:se,onGenerateImage:e.unref(Q),onToggleTable:re,onToggleTooltip:ne},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:s})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:s})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),F.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),viewBox:`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[t.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("line",{x1:y.value.x,x2:y.value.x,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Le),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:y.value.y,y2:y.value.y,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Ve)])):e.createCommentVNode("",!0),t.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",Ae,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(i.giftWrap)({series:l.plots}),fill:`${l.color}${e.unref(i.opacity)[t.value.style.layout.plots.giftWrap.fillOpacity*100]}`,"stroke-width":t.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.giftWrap.strokeDasharray,stroke:l.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Te)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[!l.shape||l.shape==="circle"?(e.openBlock(),e.createElementBlock("g",Fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(a,u)=>(e.openBlock(),e.createElementBlock("circle",{cx:a.x,cy:a.y,r:_.value&&_.value===a.id?a.weight*2:a.weight,fill:`${l.color}${e.unref(i.opacity)[t.value.style.layout.plots.opacity*100]}`,stroke:t.value.style.layout.plots.stroke,"stroke-width":t.value.style.layout.plots.strokeWidth,onMouseover:h=>le(a,s),onMouseleave:oe,style:e.normalizeStyle(`opacity:${_.value&&_.value===a.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(a.deviation)/ee.value:t.value.style.layout.plots.significance.show&&Math.abs(a.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,44,Pe))),256))])):(e.openBlock(),e.createElementBlock("g",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(a,u)=>(e.openBlock(),e.createBlock(ce._sfc_main,{plot:{x:a.x,y:a.y},radius:_.value&&_.value===a.id?a.weight*2:a.weight,shape:l.shape,color:`${l.color}${e.unref(i.opacity)[t.value.style.layout.plots.opacity*100]}`,stroke:t.value.style.layout.plots.stroke,strokeWidth:t.value.style.layout.plots.strokeWidth,onMouseover:h=>le(a,s),onMouseleave:oe,style:e.normalizeStyle(`opacity:${_.value&&_.value===a.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(a.deviation)/ee.value:t.value.style.layout.plots.significance.show&&Math.abs(a.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),t.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`marginal_x_${g.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.marginalBars.fill},null,8,Oe),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,qe)],8,Ie),e.createElementVNode("linearGradient",{id:`marginal_y_${g.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.backgroundColor},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.marginalBars.fill},null,8,Ye)],8,Xe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.x,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgX[s]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:b.value.avgX[s]-r.value.width/N.value/2,y:r.value.top-t.value.style.layout.marginalBars.offset-l/b.value.maxX*t.value.style.layout.marginalBars.size,width:r.value.width/N.value<=0?1e-4:r.value.width/N.value,height:l/b.value.maxX*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxX*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,Re)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.y,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgY[s]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:r.value.right+t.value.style.layout.marginalBars.offset,y:b.value.avgY[s]-r.value.height/N.value/2,height:r.value.height/N.value<=0?1e-4:r.value.height/N.value,width:l/b.value.maxY*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxY*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,Ge)):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(xe.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[v.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${l.dX}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,He)),v.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${l.dX}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Je)),v.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${l.dY}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Ke)),v.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${l.dY}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,Qe))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&t.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",Ze,[e.createElementVNode("line",{x1:y.value.x,x2:c.value.x,y1:c.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,et),e.createElementVNode("line",{x1:c.value.x,x2:c.value.x,y1:y.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,tt),e.createElementVNode("text",{x:y.value.x+(c.value.x>y.value.x?-6:6),y:c.value.y+t.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x>y.value.x?"end":"start"},e.toDisplayString(e.unref(i.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:c.value.v.y,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding})),9,lt),e.createElementVNode("text",{x:c.value.x,y:y.value.y+(c.value.y>y.value.y?-6:t.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(i.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:c.value.v.x,s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding})),9,ot),e.createElementVNode("circle",{cx:y.value.x,cy:c.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,at),e.createElementVNode("circle",{cx:c.value.x,cy:y.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,st),t.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.x,y:c.value.y+(c.value.y<y.value.y?-t.value.style.layout.plots.selectors.labels.fontSize/2:t.value.style.layout.plots.selectors.labels.fontSize),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x<r.value.left+100?"start":c.value.x>r.value.right-100?"end":c.value.x>y.value.x?"start":"end"},e.toDisplayString(c.value.v.name),9,rt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",nt,[e.createElementVNode("text",{x:r.value.left-5,y:y.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(Number(p.value.xMin.toFixed(t.value.style.layout.dataLabels.xAxis.rounding)).toLocaleString()),9,ut),e.createElementVNode("text",{x:r.value.right+3,y:y.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(Number(p.value.xMax.toFixed(t.value.style.layout.dataLabels.xAxis.rounding)).toLocaleString()),9,it),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${g.value}`,transform:`translate(${t.value.style.layout.dataLabels.xAxis.fontSize*2}, ${r.value.top+r.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.name),9,ct)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",yt,[e.createElementVNode("text",{x:y.value.x,y:r.value.bottom+t.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(Number(p.value.yMin.toFixed(t.value.style.layout.dataLabels.yAxis.rounding)).toLocaleString()),9,dt),e.createElementVNode("text",{x:y.value.x,y:r.value.top-t.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(Number(p.value.yMax.toFixed(t.value.style.layout.dataLabels.yAxis.rounding)).toLocaleString()),9,vt),e.createElementVNode("text",{"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.yAxis.color,x:r.value.left+r.value.width/2,y:r.value.bottom+8+t.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(t.value.style.layout.dataLabels.yAxis.name),9,pt)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${g.value}`},[e.createElementVNode("rect",{x:r.value.left,y:r.value.top,width:r.value.width<=0?1e-4:r.value.width,height:r.value.height<=0?1e-4:r.value.height},null,8,mt)],8,ht),t.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("line",{x1:l.correlation.x1,x2:l.correlation.x2,y1:l.correlation.y1,y2:l.correlation.y2,"stroke-dasharray":t.value.style.layout.correlation.strokeDasharray,stroke:l.color,"stroke-width":t.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${g.value})`},null,8,gt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,s)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.label.x,y:l.label.y,fill:t.value.style.layout.correlation.label.useSerieColor?l.color:t.value.style.layout.correlation.label.color,"font-size":t.value.style.layout.correlation.label.fontSize,"font-weight":t.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(Number(l.correlation.coefficient.toFixed(t.value.style.layout.correlation.label.roundingValue)).toLocaleString()),9,kt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:k.value},void 0,!0)],14,Ee)):e.createCommentVNode("",!0),F.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Se.default,{key:3,config:{type:"quadrant",style:{backgroundColor:t.value.style.backgroundColor,quadrant:{grid:{color:t.value.style.layout.axis.stroke},plots:{color:t.value.style.layout.axis.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:J},[t.value.style.legend.show?(e.openBlock(),e.createBlock(Be.Legend,{key:0,legendSet:$.value,config:ge.value,onClickMarker:n[0]||(n[0]=({legend:l})=>ae(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{onClick:s=>l.segregate(),style:e.normalizeStyle(`opacity:${v.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name),13,xt)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),e.createVNode(_e._sfc_main,{show:M.value.showTooltip&&O.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,parent:A.value,content:q.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),default:e.withCtx(()=>[t.value.style.tooltip.showShape?(e.openBlock(),e.createElementBlock("div",bt,[(e.openBlock(),e.createElementBlock("svg",wt,[e.createVNode(ce._sfc_main,{shape:c.value.shape,color:c.value.color,plot:{x:10,y:10},radius:7},null,8,["shape","color"])]))])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),F.value?(e.openBlock(),e.createBlock(Me.default,{key:4,hideDetails:"",config:{open:M.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[e.createVNode(Ce.DataTable,{colNames:W.value.colNames,head:W.value.head,body:W.value.body,config:W.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:n[1]||(n[1]=l=>M.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[l.shape?(e.openBlock(),e.createElementBlock("div",_t,[e.createElementVNode("span",null,e.toDisplayString(l.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:l},null,8,Bt))]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,$e))}},St=Ne._export_sfc(Ct,[["__scopeId","data-v-134a7dfd"]]);exports.default=St;
|