vue-data-ui 3.0.7 → 3.0.9
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-BZRmraR1.js → Arrow-eK2oy8B1.js} +1 -1
- package/dist/{BaseDraggableDialog-BdrogsDa.js → BaseDraggableDialog-BQCwl13o.js} +2 -2
- package/dist/{BaseIcon-BkcnpqIi.js → BaseIcon-D7MUshWc.js} +1 -1
- package/dist/{ColorPicker-BpkLwvQo.js → ColorPicker-CdvkJs6k.js} +2 -2
- package/dist/{DataTable-C6tKzvDk.js → DataTable-B8UVP1Zs.js} +2 -2
- package/dist/{Legend-SO9DUwca.js → Legend-C_Y_KoET.js} +2 -2
- package/dist/{NonSvgPenAndPaper-ydwZCvBB.js → NonSvgPenAndPaper-Djn37Q5i.js} +3 -3
- package/dist/{PackageVersion-CvDEwhqw.js → PackageVersion-B41ckMZ5.js} +1 -1
- package/dist/{PenAndPaper-CK0i-_WG.js → PenAndPaper-DvCT4_pU.js} +3 -3
- package/dist/{Shape-DNSjpQA9.js → Shape-CgLS-jjS.js} +1 -1
- package/dist/{Slicer-BCwIdbth.js → Slicer-DV6pguSb.js} +2 -2
- package/dist/{SparkTooltip--GJjZ38c.js → SparkTooltip-BRE4xOKw.js} +1 -1
- package/dist/{Title-pwfhlClh.js → Title-BtszELyl.js} +1 -1
- package/dist/{Tooltip-DLU3yWUJ.js → Tooltip-jD12ACaX.js} +1 -1
- package/dist/{UserOptions-hQcfD5wC.js → UserOptions-iyx7fMVX.js} +2 -2
- package/dist/{dom-to-png-C9CPYmoW.js → dom-to-png-D6nJ9OnT.js} +1 -1
- package/dist/{img-CPlo7hfi.js → img-a3q3hL6s.js} +1 -1
- package/dist/{index-X9QjRsk0.js → index-RzZlAwgs.js} +76 -56
- package/dist/{pdf-TMCTkZTN.js → pdf-C5MhxJqP.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +26 -0
- package/dist/types/vue-data-ui.d.ts +26 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-Dd2F3rJF.js → useAutoSizeLabelsInsideViewbox-D1jOfrnv.js} +1 -1
- package/dist/{useNestedProp-BlGOG6Rv.js → useNestedProp-CvSy848k.js} +1 -1
- package/dist/{usePrinter-UBjM9siG.js → usePrinter-DwzphPSr.js} +2 -2
- package/dist/{useTimeLabels-DkzmKfZn.js → useTimeLabels-4la0yDx0.js} +2 -0
- package/dist/{vue-data-ui-CCY7uFJq.js → vue-data-ui-CmXJirzy.js} +64 -64
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-8gsivSLU.js → vue-ui-3d-bar-DPJGWpMk.js} +6 -6
- package/dist/{vue-ui-accordion-CAB71G5L.js → vue-ui-accordion-D-05FmPg.js} +3 -3
- package/dist/{vue-ui-age-pyramid-CSkZ6Ua7.js → vue-ui-age-pyramid-bYJh_gdN.js} +6 -6
- package/dist/{vue-ui-annotator-QoSiZY9-.js → vue-ui-annotator--HjJ0nnA.js} +2 -2
- package/dist/{vue-ui-bullet-BBnNRqVS.js → vue-ui-bullet-BakG4v0M.js} +7 -7
- package/dist/{vue-ui-candlestick-pEmkavlN.js → vue-ui-candlestick-DpHxsFKp.js} +8 -8
- package/dist/{vue-ui-carousel-table-BMSJwhTI.js → vue-ui-carousel-table-Cnh-x96B.js} +4 -4
- package/dist/{vue-ui-chestnut-DOEN_lW9.js → vue-ui-chestnut-C4yzxtNW.js} +5 -5
- package/dist/{vue-ui-chord-DP6ejN3_.js → vue-ui-chord-Da_s1s5v.js} +8 -8
- package/dist/{vue-ui-circle-pack-D7o9RWUg.js → vue-ui-circle-pack-BS_8acV4.js} +6 -6
- package/dist/{vue-ui-cursor-BGCO9EXx.js → vue-ui-cursor-BHR7dQhh.js} +2 -2
- package/dist/{vue-ui-dashboard-B8jJfBT8.js → vue-ui-dashboard-CPS0AXsu.js} +62 -62
- package/dist/{vue-ui-digits-CNzQjtvo.js → vue-ui-digits-DRsjxlbt.js} +2 -2
- package/dist/{vue-ui-donut-B5W9UNxG.js → vue-ui-donut-BZD3eIXM.js} +8 -8
- package/dist/{vue-ui-donut-evolution-C9VWqv0X.js → vue-ui-donut-evolution-DplwdwWn.js} +9 -9
- package/dist/{vue-ui-dumbbell-CjAjuZOC.js → vue-ui-dumbbell-DfgDicdE.js} +7 -7
- package/dist/{vue-ui-flow-DPL2-zGO.js → vue-ui-flow-jS4A0Rg2.js} +7 -7
- package/dist/{vue-ui-funnel-CazDK5_K.js → vue-ui-funnel-Ck0G-d89.js} +6 -6
- package/dist/{vue-ui-galaxy-DzHIe_GL.js → vue-ui-galaxy-D87Ilk1Z.js} +5 -5
- package/dist/{vue-ui-gauge-D-FH7KFb.js → vue-ui-gauge-C-Lz3jKI.js} +7 -7
- package/dist/{vue-ui-gizmo-CiWDSmw3.js → vue-ui-gizmo-D-3SJfaT.js} +3 -3
- package/dist/{vue-ui-heatmap-BRjd34ZG.js → vue-ui-heatmap-DFBZsBso.js} +8 -8
- package/dist/{vue-ui-history-plot-D2U7a7h5.js → vue-ui-history-plot-B4Kj1Cz0.js} +7 -7
- package/dist/{vue-ui-kpi-5Gsv9ny8.js → vue-ui-kpi-DvgMXWRC.js} +3 -3
- package/dist/{vue-ui-mini-loader-3cTXDL4W.js → vue-ui-mini-loader-C_SBglnn.js} +2 -2
- package/dist/{vue-ui-molecule-ZFYcriLZ.js → vue-ui-molecule-DACRB8iS.js} +5 -5
- package/dist/{vue-ui-mood-radar-B2_06p65.js → vue-ui-mood-radar-CHJtxrST.js} +7 -7
- package/dist/{vue-ui-nested-donuts-DzDl68ll.js → vue-ui-nested-donuts-BW80a6fb.js} +7 -7
- package/dist/{vue-ui-onion-BFLjpr5J.js → vue-ui-onion-CKp4vGk1.js} +8 -8
- package/dist/{vue-ui-parallel-coordinate-plot-C4TZzF54.js → vue-ui-parallel-coordinate-plot-AaREBsNM.js} +8 -8
- package/dist/{vue-ui-quadrant-4PhgLNCs.js → vue-ui-quadrant-BOyL7WF5.js} +8 -8
- package/dist/{vue-ui-quick-chart-B32psfnY.js → vue-ui-quick-chart-CuikXmRB.js} +7 -7
- package/dist/{vue-ui-radar-DUUNLml-.js → vue-ui-radar-DXKlqh05.js} +8 -8
- package/dist/{vue-ui-rating-BAVqgA09.js → vue-ui-rating-DrODuqDQ.js} +2 -2
- package/dist/{vue-ui-relation-circle-ke3sj18W.js → vue-ui-relation-circle-BMccrEs2.js} +7 -7
- package/dist/{vue-ui-ridgeline-DaGjIQqX.js → vue-ui-ridgeline-BEymauSK.js} +9 -9
- package/dist/{vue-ui-rings-mJVJ-F7L.js → vue-ui-rings-Xik7UK1M.js} +8 -8
- package/dist/vue-ui-scatter-Dx7Oh4kk.js +1288 -0
- package/dist/{vue-ui-skeleton-BSXjLnfB.js → vue-ui-skeleton-CgW5zCcl.js} +3 -3
- package/dist/{vue-ui-smiley-bDakIWEZ.js → vue-ui-smiley-BCEYj7NC.js} +2 -2
- package/dist/{vue-ui-spark-trend-ChIma8EU.js → vue-ui-spark-trend-13kyH7zR.js} +3 -3
- package/dist/{vue-ui-sparkbar-CxrCU2R9.js → vue-ui-sparkbar-1sPyzdmB.js} +3 -3
- package/dist/{vue-ui-sparkgauge-Dq9AE7z6.js → vue-ui-sparkgauge-B2k5zdJX.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-BYe8Ugtg.js → vue-ui-sparkhistogram-FxZUDvAo.js} +4 -4
- package/dist/{vue-ui-sparkline-BIShtqVB.js → vue-ui-sparkline-Bo_N7TaM.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-BwlNPK-F.js → vue-ui-sparkstackbar-BxuX9LCx.js} +3 -3
- package/dist/{vue-ui-stackbar-DP8xLhDL.js → vue-ui-stackbar-DB5UpLT1.js} +10 -10
- package/dist/{vue-ui-strip-plot-BaLfhaq2.js → vue-ui-strip-plot-BmUBEwxC.js} +7 -7
- package/dist/{vue-ui-table-DVgHFZen.js → vue-ui-table-C9j5v7EZ.js} +3 -3
- package/dist/{vue-ui-table-heatmap-CUvoaF7m.js → vue-ui-table-heatmap-BlLfQGy0.js} +5 -5
- package/dist/{vue-ui-table-sparkline-CgODT4oZ.js → vue-ui-table-sparkline-BPYO4H8G.js} +4 -4
- package/dist/{vue-ui-thermometer-Cneb68tl.js → vue-ui-thermometer-rdyvqQZa.js} +7 -7
- package/dist/{vue-ui-timer-DtbJrKKv.js → vue-ui-timer-Dt95KyE-.js} +5 -5
- package/dist/{vue-ui-tiremarks-Ci0IPa1a.js → vue-ui-tiremarks-C-u2jSJg.js} +6 -6
- package/dist/{vue-ui-treemap-Cr30jnpe.js → vue-ui-treemap-qiJhg_-j.js} +8 -8
- package/dist/{vue-ui-vertical-bar-B0iGUN2i.js → vue-ui-vertical-bar-DCzJmtw4.js} +9 -9
- package/dist/{vue-ui-waffle-BiEWuwjg.js → vue-ui-waffle-DNPABrrV.js} +8 -8
- package/dist/{vue-ui-wheel-WVGrA4A6.js → vue-ui-wheel-0rAslR-w.js} +6 -6
- package/dist/{vue-ui-word-cloud-DZSVMHcA.js → vue-ui-word-cloud-CSzvZRwT.js} +6 -6
- package/dist/{vue-ui-world-CJmuqZE1.js → vue-ui-world-n-I3npew.js} +6 -6
- package/dist/vue-ui-xy-CE9NoAoF.js +4004 -0
- package/dist/{vue-ui-xy-canvas-D0kxBtNF.js → vue-ui-xy-canvas-iDNKYbpb.js} +9 -9
- package/package.json +1 -1
- package/dist/vue-ui-scatter-BJC6eHcD.js +0 -1189
- package/dist/vue-ui-xy-CjDYvhnu.js +0 -3920
|
@@ -1,1189 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as de, computed as T, ref as m, toRefs as Dt, watch as Ee, shallowRef as gt, onMounted as Rt, onBeforeUnmount as jt, createElementBlock as i, openBlock as u, unref as n, normalizeStyle as oe, normalizeClass as mt, createBlock as K, createCommentVNode as g, createElementVNode as b, createVNode as Fe, createSlots as Vt, withCtx as N, renderSlot as E, normalizeProps as he, guardReactiveProps as fe, Fragment as q, renderList as Q, toDisplayString as Y, Teleport as Ut, createTextVNode as Gt, nextTick as qt } from "vue";
|
|
2
|
-
import { u as Ht, c as Zt, t as Jt, a as Kt, p as ie, b as Qt, o as xt, f as Ie, d as el, g as bt, Y as tl, e as We, a3 as ll, V as al, X as ol, s as Xe, Z as sl, k as se, h as D, i as H, v as ul, w as nl, y as il, z as rl } from "./index-X9QjRsk0.js";
|
|
3
|
-
import { t as vl, u as yl } from "./useResponsive-DfdjqQps.js";
|
|
4
|
-
import { u as cl, B as dl } from "./useLoading-D7YHNtLX.js";
|
|
5
|
-
import { u as hl } from "./usePrinter-UBjM9siG.js";
|
|
6
|
-
import { u as kt } from "./useNestedProp-BlGOG6Rv.js";
|
|
7
|
-
import { u as fl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
8
|
-
import { u as pl } from "./useChartAccessibility-9icAAmYg.js";
|
|
9
|
-
import gl from "./Legend-SO9DUwca.js";
|
|
10
|
-
import ml from "./Title-pwfhlClh.js";
|
|
11
|
-
import { _ as wt } from "./Shape-DNSjpQA9.js";
|
|
12
|
-
import xl from "./img-CPlo7hfi.js";
|
|
13
|
-
import { _ as bl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
-
const kl = ["id"], wl = ["id"], _l = ["xmlns", "viewBox"], $l = ["width", "height"], Ml = { key: 1 }, Al = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Cl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Sl = { key: 2 }, Ll = ["points", "fill", "stroke-width", "stroke-dasharray", "stroke"], zl = { key: 0 }, Tl = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseover", "onMouseleave", "onClick"], Bl = { key: 1 }, Pl = { key: 3 }, Ol = ["id"], Nl = ["stop-color"], El = ["stop-color"], Fl = ["id"], Il = ["stop-color"], Wl = ["stop-color"], Xl = ["x", "y", "width", "height", "fill", "stroke", "stroke-width", "rx"], Yl = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], Dl = { key: 0 }, Rl = ["d", "stroke", "stroke-width"], jl = ["d", "stroke", "stroke-width"], Vl = ["d", "stroke", "stroke-width"], Ul = ["d", "stroke", "stroke-width"], Gl = {
|
|
15
|
-
key: 4,
|
|
16
|
-
style: { "pointer-events": "none !important" }
|
|
17
|
-
}, ql = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Hl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], Zl = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], Jl = ["x", "y", "font-size", "fill", "font-weight"], Kl = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Ql = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], ea = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], ta = ["id", "transform", "font-size", "font-weight", "fill"], la = ["font-size", "fill", "transform"], aa = ["transform", "font-size", "fill"], oa = ["x", "y", "font-size", "fill"], sa = ["x", "y", "font-size", "fill"], ua = ["font-size", "font-weight", "fill", "x", "y"], na = ["id"], ia = ["x", "y", "width", "height"], ra = {
|
|
18
|
-
key: 9,
|
|
19
|
-
style: { pointerEvents: "none" }
|
|
20
|
-
}, va = ["x1", "x2", "y1", "y2", "stroke-dasharray", "stroke", "stroke-width", "clip-path"], ya = ["x", "y", "fill", "font-size", "font-weight"], ca = {
|
|
21
|
-
key: 4,
|
|
22
|
-
class: "vue-data-ui-watermark"
|
|
23
|
-
}, da = ["id"], ha = ["onClick"], fa = {
|
|
24
|
-
key: 0,
|
|
25
|
-
style: { width: "100%", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
26
|
-
}, pa = {
|
|
27
|
-
viewBox: "0 0 20 20",
|
|
28
|
-
height: "20",
|
|
29
|
-
width: "20",
|
|
30
|
-
style: { overflow: "hidden", background: "transparent" }
|
|
31
|
-
}, ga = { key: 0 }, ma = ["innerHTML"], xa = {
|
|
32
|
-
__name: "vue-ui-scatter",
|
|
33
|
-
props: {
|
|
34
|
-
config: {
|
|
35
|
-
type: Object,
|
|
36
|
-
default() {
|
|
37
|
-
return {};
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
dataset: {
|
|
41
|
-
type: Array,
|
|
42
|
-
default() {
|
|
43
|
-
return [];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
setup(_t, { expose: $t }) {
|
|
48
|
-
const Mt = de(() => import("./vue-ui-accordion-CAB71G5L.js")), At = de(() => import("./DataTable-C6tKzvDk.js")), Ct = de(() => import("./PackageVersion-CvDEwhqw.js")), St = de(() => import("./PenAndPaper-CK0i-_WG.js")), Lt = de(() => import("./Tooltip-DLU3yWUJ.js")), zt = de(() => import("./UserOptions-hQcfD5wC.js")), { vue_ui_scatter: Tt } = Ht(), Z = _t, Ye = T(() => !!Z.dataset && Z.dataset.length), B = m(Zt()), Bt = m(null), _e = m(!1), $e = m(""), De = m(0), ee = m(null), Re = m(null), je = m(null), Ve = m(null), Ue = m(null), Ge = m(0), qe = m(0), He = m(0), L = m([]), Ze = m(!1), Me = m(null), Pt = m(null), Ot = m(null), Ae = m(null), e = m(ze());
|
|
49
|
-
function Nt(l = 100, s = 0.8, t = {}) {
|
|
50
|
-
const { meanX: a = 0, sdX: o = 1, meanY: r = 0, sdY: h = 1, seed: C } = t;
|
|
51
|
-
let S = (C ?? Math.floor(Math.random() * 2 ** 31)) >>> 0;
|
|
52
|
-
const P = () => (S = S * 1664525 + 1013904223 >>> 0, S / 2 ** 32), F = () => {
|
|
53
|
-
let y = 0, M = 0;
|
|
54
|
-
for (; y === 0; ) y = P();
|
|
55
|
-
for (; M === 0; ) M = P();
|
|
56
|
-
return Math.sqrt(-2 * Math.log(y)) * Math.cos(2 * Math.PI * M);
|
|
57
|
-
}, d = l / 2, k = Array.from({ length: d }, F), X = Array.from({ length: d }, F), w = (y) => y.reduce((M, me) => M + me, 0) / y.length, I = w(k), J = w(X);
|
|
58
|
-
for (let y = 0; y < d; y += 1)
|
|
59
|
-
k[y] -= I, X[y] -= J;
|
|
60
|
-
const _ = (y, M) => y.reduce((me, we, Ne) => me + we * M[Ne], 0), p = (y) => _(y, y), v = _(X, k) / p(k), x = X.map((y, M) => y - v * k[M]), W = p(k) / d, U = p(x) / d, ae = Math.sqrt((1 - s * s) * W / U), O = k.map((y, M) => s * y + ae * x[M]), ne = k.concat(k.map((y) => -y)), Oe = O.concat(O.map((y) => -y)), pe = (y) => Math.sqrt(p(y) / y.length), ye = (y, M, me) => {
|
|
61
|
-
const we = pe(y);
|
|
62
|
-
return y.map((Ne) => me + (we ? Ne / we * M : 0));
|
|
63
|
-
}, ce = ye(ne, o, a), ge = ye(Oe, h, r);
|
|
64
|
-
for (let y = ce.length - 1; y > 0; y -= 1) {
|
|
65
|
-
const M = Math.floor(P() * (y + 1));
|
|
66
|
-
[ce[y], ce[M]] = [ce[M], ce[y]], [ge[y], ge[M]] = [ge[M], ge[y]];
|
|
67
|
-
}
|
|
68
|
-
return ce.map((y, M) => ({ x: y, y: ge[M] }));
|
|
69
|
-
}
|
|
70
|
-
const { loading: Je, FINAL_DATASET: Ce, manualLoading: Se } = cl({
|
|
71
|
-
...Dt(Z),
|
|
72
|
-
FINAL_CONFIG: e,
|
|
73
|
-
prepareConfig: ze,
|
|
74
|
-
skeletonDataset: [
|
|
75
|
-
{
|
|
76
|
-
name: "",
|
|
77
|
-
color: "#999999",
|
|
78
|
-
values: Nt(100, 0.5, { seed: 42 })
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
skeletonConfig: Jt({
|
|
82
|
-
defaultConfig: e.value,
|
|
83
|
-
userConfig: {
|
|
84
|
-
userOptions: { show: !1 },
|
|
85
|
-
table: { show: !1 },
|
|
86
|
-
useCssAnimation: !1,
|
|
87
|
-
style: {
|
|
88
|
-
backgroundColor: "#99999930",
|
|
89
|
-
layout: {
|
|
90
|
-
axis: {
|
|
91
|
-
stroke: "#6A6A6A"
|
|
92
|
-
},
|
|
93
|
-
correlation: {
|
|
94
|
-
label: { show: !1 }
|
|
95
|
-
},
|
|
96
|
-
dataLabels: {
|
|
97
|
-
xAxis: { show: !1 },
|
|
98
|
-
yAxis: { show: !1 }
|
|
99
|
-
},
|
|
100
|
-
marginalBars: {
|
|
101
|
-
fill: "#99999960"
|
|
102
|
-
},
|
|
103
|
-
padding: { top: 12, right: 12, bottom: 12, left: 12 },
|
|
104
|
-
plots: {
|
|
105
|
-
stroke: "#6A6A6A"
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
legend: {
|
|
109
|
-
backgroundColor: "transparent"
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
})
|
|
114
|
-
}), { userOptionsVisible: Le, setUserOptionsVisibility: Ke, keepUserOptionState: Qe } = fl({ config: e.value }), { svgRef: et } = pl({ config: e.value.style.title });
|
|
115
|
-
function ze() {
|
|
116
|
-
const l = kt({
|
|
117
|
-
userConfig: Z.config,
|
|
118
|
-
defaultConfig: Tt
|
|
119
|
-
});
|
|
120
|
-
return l.theme ? {
|
|
121
|
-
...kt({
|
|
122
|
-
userConfig: Qt.vue_ui_scatter[l.theme] || Z.config,
|
|
123
|
-
defaultConfig: l
|
|
124
|
-
}),
|
|
125
|
-
customPalette: Kt[l.theme] || ie
|
|
126
|
-
} : l;
|
|
127
|
-
}
|
|
128
|
-
Ee(() => Z.config, (l) => {
|
|
129
|
-
Je.value || (e.value = ze()), Le.value = !e.value.userOptions.showOnChartHover, tt(), Ge.value += 1, qe.value += 1, He.value += 1, R.value.showTable = e.value.table.show, R.value.showTooltip = e.value.style.tooltip.show;
|
|
130
|
-
}, { deep: !0 }), Ee(() => Z.dataset, (l) => {
|
|
131
|
-
Array.isArray(l) && l.length > 0 && (Se.value = !1);
|
|
132
|
-
}, { deep: !0 });
|
|
133
|
-
const te = gt(null), re = gt(null);
|
|
134
|
-
Rt(() => {
|
|
135
|
-
Ze.value = !0, tt();
|
|
136
|
-
});
|
|
137
|
-
const Et = T(() => !!e.value.debug);
|
|
138
|
-
function tt() {
|
|
139
|
-
if (xt(Z.dataset) && (Ie({
|
|
140
|
-
componentName: "VueUiScatter",
|
|
141
|
-
type: "dataset",
|
|
142
|
-
debug: Et.value
|
|
143
|
-
}), Se.value = !0), xt(Z.dataset) || (Se.value = e.value.loading), e.value.responsive) {
|
|
144
|
-
const l = vl(() => {
|
|
145
|
-
const { width: s, height: t } = yl({
|
|
146
|
-
chart: ee.value,
|
|
147
|
-
title: e.value.style.title.text ? Re.value : null,
|
|
148
|
-
legend: e.value.style.legend.show ? je.value : null,
|
|
149
|
-
source: Ve.value,
|
|
150
|
-
noTitle: Ue.value
|
|
151
|
-
});
|
|
152
|
-
requestAnimationFrame(() => {
|
|
153
|
-
z.value.width = s, z.value.height = t;
|
|
154
|
-
});
|
|
155
|
-
});
|
|
156
|
-
te.value && (re.value && te.value.unobserve(re.value), te.value.disconnect()), te.value = new ResizeObserver(l), re.value = ee.value.parentNode, te.value.observe(re.value);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
jt(() => {
|
|
160
|
-
te.value && (re.value && te.value.unobserve(re.value), te.value.disconnect());
|
|
161
|
-
});
|
|
162
|
-
const { isPrinting: lt, isImaging: at, generatePdf: ot, generateImage: st } = hl({
|
|
163
|
-
elementId: `vue-ui-scatter_${B.value}`,
|
|
164
|
-
fileName: e.value.style.title.text || "vue-ui-scatter",
|
|
165
|
-
options: e.value.userOptions.print
|
|
166
|
-
}), Ft = T(() => e.value.userOptions.show && !e.value.style.title.text), ut = T(() => el(e.value.customPalette)), R = m({
|
|
167
|
-
showTable: e.value.table.show,
|
|
168
|
-
showTooltip: e.value.style.tooltip.show
|
|
169
|
-
});
|
|
170
|
-
Ee(e, () => {
|
|
171
|
-
R.value = {
|
|
172
|
-
showTable: e.value.table.show,
|
|
173
|
-
showTooltip: e.value.style.tooltip.show
|
|
174
|
-
};
|
|
175
|
-
}, { immediate: !0 });
|
|
176
|
-
const z = m({
|
|
177
|
-
height: e.value.style.layout.height,
|
|
178
|
-
width: e.value.style.layout.width
|
|
179
|
-
}), xe = T(() => e.value.style.layout.marginalBars.show ? e.value.style.layout.marginalBars.size + e.value.style.layout.marginalBars.offset : 0), c = T(() => {
|
|
180
|
-
let l = 0, s = 0;
|
|
181
|
-
return Me.value && (l = Me.value.getBBox().width + 6), Ae.value && (s = Ae.value.getBBox().height + 6), {
|
|
182
|
-
top: e.value.style.layout.padding.top + xe.value + e.value.style.layout.dataLabels.yAxis.fontSize * 2,
|
|
183
|
-
right: z.value.width - e.value.style.layout.padding.right - xe.value - 6,
|
|
184
|
-
bottom: z.value.height - e.value.style.layout.padding.bottom - s,
|
|
185
|
-
left: e.value.style.layout.padding.left + l,
|
|
186
|
-
height: z.value.height - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom - xe.value - s - e.value.style.layout.dataLabels.yAxis.fontSize * 2,
|
|
187
|
-
width: z.value.width - e.value.style.layout.padding.left - e.value.style.layout.padding.right - xe.value - l - 6
|
|
188
|
-
};
|
|
189
|
-
}), $ = T(() => {
|
|
190
|
-
Ce.value.forEach((o, r) => {
|
|
191
|
-
bt({
|
|
192
|
-
datasetObject: o,
|
|
193
|
-
requiredAttributes: ["values"]
|
|
194
|
-
}).forEach((h) => {
|
|
195
|
-
Ie({
|
|
196
|
-
componentName: "VueUiScatter",
|
|
197
|
-
type: "datasetSerieAttribute",
|
|
198
|
-
property: h,
|
|
199
|
-
index: r
|
|
200
|
-
});
|
|
201
|
-
}), o.values && o.values.forEach((h, C) => {
|
|
202
|
-
bt({
|
|
203
|
-
datasetObject: h,
|
|
204
|
-
requiredAttributes: ["x", "y"]
|
|
205
|
-
}).forEach((S) => {
|
|
206
|
-
Ie({
|
|
207
|
-
componentName: "VueUiScatter",
|
|
208
|
-
type: "datasetSerieAttribute",
|
|
209
|
-
property: `values.${S}`,
|
|
210
|
-
index: `${r} - ${C}`
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
});
|
|
214
|
-
});
|
|
215
|
-
const l = Math.min(...ue.value.filter((o) => !L.value.includes(o.id)).flatMap((o) => o.values.map((r) => r.x))), s = Math.max(...ue.value.filter((o) => !L.value.includes(o.id)).flatMap((o) => o.values.map((r) => r.x))), t = Math.min(...ue.value.filter((o) => !L.value.includes(o.id)).flatMap((o) => o.values.map((r) => r.y))), a = Math.max(...ue.value.filter((o) => !L.value.includes(o.id)).flatMap((o) => o.values.map((r) => r.y)));
|
|
216
|
-
return { xMin: l >= 0 ? 0 : l, xMax: s, yMin: t >= 0 ? 0 : t, yMax: a };
|
|
217
|
-
}), A = T(() => ({
|
|
218
|
-
x: c.value.left + Math.abs($.value.xMin) / ($.value.xMax + Math.abs($.value.xMin)) * c.value.width,
|
|
219
|
-
y: c.value.bottom - Math.abs($.value.yMin) / ($.value.yMax + Math.abs($.value.yMin)) * c.value.height
|
|
220
|
-
})), ue = T(() => Ce.value.map((l, s) => {
|
|
221
|
-
const t = `cluster_${B.value}_${s}`;
|
|
222
|
-
return {
|
|
223
|
-
...l,
|
|
224
|
-
values: tl({
|
|
225
|
-
data: l.values,
|
|
226
|
-
threshold: e.value.downsample.threshold
|
|
227
|
-
}),
|
|
228
|
-
id: t,
|
|
229
|
-
color: l.color ? l.color : ut.value[s] || ie[s] || ie[s % ie.length],
|
|
230
|
-
opacity: L.value.includes(t) ? 0.5 : 1,
|
|
231
|
-
shape: l.shape ?? "circle",
|
|
232
|
-
segregate: () => ct(t),
|
|
233
|
-
isSegregated: L.value.includes(t)
|
|
234
|
-
};
|
|
235
|
-
})), It = T(() => ({
|
|
236
|
-
cy: "scatter-div-legend",
|
|
237
|
-
backgroundColor: e.value.style.legend.backgroundColor,
|
|
238
|
-
color: e.value.style.legend.color,
|
|
239
|
-
fontSize: e.value.style.legend.fontSize,
|
|
240
|
-
paddingBottom: 12,
|
|
241
|
-
fontWeight: e.value.style.legend.bold ? "bold" : ""
|
|
242
|
-
})), Te = T(() => ue.value.map((l, s) => ({
|
|
243
|
-
...l,
|
|
244
|
-
plots: l.values.map((t) => ({
|
|
245
|
-
x: c.value.left + (t.x + Math.abs($.value.xMin)) / ($.value.xMax + Math.abs($.value.xMin)) * c.value.width,
|
|
246
|
-
y: c.value.bottom - (t.y + Math.abs($.value.yMin)) / ($.value.yMax + Math.abs($.value.yMin)) * c.value.height,
|
|
247
|
-
v: {
|
|
248
|
-
...t,
|
|
249
|
-
name: t.name || ""
|
|
250
|
-
},
|
|
251
|
-
clusterName: l.name,
|
|
252
|
-
color: l.color ? l.color : ut.value[s] || ie[s] || ie[s % ie.length],
|
|
253
|
-
id: `plot_${B.value}_${Math.random()}`,
|
|
254
|
-
weight: t.weight ?? e.value.style.layout.plots.radius
|
|
255
|
-
}))
|
|
256
|
-
})).filter((l) => !L.value.includes(l.id))), j = T(() => {
|
|
257
|
-
const s = ({ m: t, b: a, rect: o, verticalX: r = null }) => {
|
|
258
|
-
const { left: h, right: C, top: S, bottom: P } = o, F = [], d = (p, v) => {
|
|
259
|
-
Number.isFinite(p) && Number.isFinite(v) && F.push({ x: p, y: v });
|
|
260
|
-
}, k = ({ x: p, y: v }) => p >= h - 1e-9 && p <= C + 1e-9 && v >= S - 1e-9 && v <= P + 1e-9;
|
|
261
|
-
r !== null ? r >= h - 1e-9 && r <= C + 1e-9 && (d(r, S), d(r, P)) : Number.isFinite(t) && (d(h, t * h + a), d(C, t * C + a), Math.abs(t) > 1e-9 ? (d((S - a) / t, S), d((P - a) / t, P)) : a >= S - 1e-9 && a <= P + 1e-9 && (d(h, a), d(C, a)));
|
|
262
|
-
const X = F.filter(k), w = [];
|
|
263
|
-
for (const p of X)
|
|
264
|
-
w.some((v) => Math.abs(v.x - p.x) < 1e-6 && Math.abs(v.y - p.y) < 1e-6) || w.push(p);
|
|
265
|
-
if (w.length < 2) return null;
|
|
266
|
-
let I = w[0], J = w[1], _ = 0;
|
|
267
|
-
for (let p = 0; p < w.length; p += 1)
|
|
268
|
-
for (let v = p + 1; v < w.length; v += 1) {
|
|
269
|
-
const x = w[p].x - w[v].x, W = w[p].y - w[v].y, U = x * x + W * W;
|
|
270
|
-
U > _ && (_ = U, I = w[p], J = w[v]);
|
|
271
|
-
}
|
|
272
|
-
return { x1: I.x, y1: I.y, x2: J.x, y2: J.y };
|
|
273
|
-
};
|
|
274
|
-
return Te.value.map((t) => {
|
|
275
|
-
const a = t.plots.length, o = t.plots.reduce((v, x) => v + x.x, 0) / a, r = t.plots.reduce((v, x) => v + x.y, 0) / a;
|
|
276
|
-
let h = 0, C = 0;
|
|
277
|
-
for (const v of t.plots) {
|
|
278
|
-
const x = v.x - o, W = v.y - r;
|
|
279
|
-
h += x * W, C += x * x;
|
|
280
|
-
}
|
|
281
|
-
let S, P, F = null;
|
|
282
|
-
C < 1e-9 ? (F = o, S = 1 / 0, P = null) : (S = h / C, P = r - S * o);
|
|
283
|
-
let d, k;
|
|
284
|
-
F !== null ? (d = 1 / 0, k = null) : (d = S, k = P);
|
|
285
|
-
const X = t.plots.every((v) => v.v && typeof v.v.x == "number" && typeof v.v.y == "number");
|
|
286
|
-
let w = NaN;
|
|
287
|
-
if (a >= 2) {
|
|
288
|
-
let v = 0, x = 0;
|
|
289
|
-
X ? (v = t.plots.reduce((O, ne) => O + ne.v.x, 0) / a, x = t.plots.reduce((O, ne) => O + ne.v.y, 0) / a) : (v = o, x = -r);
|
|
290
|
-
let W = 0, U = 0, ae = 0;
|
|
291
|
-
for (const O of t.plots) {
|
|
292
|
-
const ne = X ? O.v.x : O.x, Oe = X ? O.v.y : -O.y, pe = ne - v, ye = Oe - x;
|
|
293
|
-
W += pe * ye, U += pe * pe, ae += ye * ye;
|
|
294
|
-
}
|
|
295
|
-
if (U >= 1e-9 && ae >= 1e-9) {
|
|
296
|
-
const O = W / Math.sqrt(U * ae);
|
|
297
|
-
w = Math.max(-1, Math.min(1, O));
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
const I = s({ m: d, b: k, rect: c.value, verticalX: F });
|
|
301
|
-
if (!I)
|
|
302
|
-
return {
|
|
303
|
-
...t,
|
|
304
|
-
correlation: null,
|
|
305
|
-
label: null,
|
|
306
|
-
plots: t.plots.map((v) => ({
|
|
307
|
-
...v,
|
|
308
|
-
deviation: 0,
|
|
309
|
-
shape: t.shape,
|
|
310
|
-
color: We(t.color)
|
|
311
|
-
}))
|
|
312
|
-
};
|
|
313
|
-
const J = (I.x1 + I.x2) / 2, _ = (I.y1 + I.y2) / 2, p = { x: J, y: _ };
|
|
314
|
-
return {
|
|
315
|
-
...t,
|
|
316
|
-
color: We(t.color),
|
|
317
|
-
correlation: {
|
|
318
|
-
...I,
|
|
319
|
-
coefficient: w
|
|
320
|
-
},
|
|
321
|
-
label: p,
|
|
322
|
-
plots: t.plots.map((v) => {
|
|
323
|
-
let x, W;
|
|
324
|
-
F !== null ? (x = F, W = v.y) : Math.abs(d) < 1e-9 ? (x = v.x, W = k) : (x = (v.x + d * v.y - d * k) / (1 + d * d), W = (d * v.x + d * d * v.y + k) / (1 + d * d));
|
|
325
|
-
const U = v.x - x, ae = v.y - W, O = Math.sqrt(U * U + ae * ae);
|
|
326
|
-
return {
|
|
327
|
-
...v,
|
|
328
|
-
deviation: O,
|
|
329
|
-
shape: t.shape,
|
|
330
|
-
color: We(t.color)
|
|
331
|
-
};
|
|
332
|
-
})
|
|
333
|
-
};
|
|
334
|
-
});
|
|
335
|
-
}), nt = T(() => Math.max(...j.value.flatMap((l) => l.plots.map((s) => Math.abs(s.deviation)))));
|
|
336
|
-
function Wt() {
|
|
337
|
-
return j.value;
|
|
338
|
-
}
|
|
339
|
-
function it(l, s) {
|
|
340
|
-
const t = Array.isArray(l) ? l.flatMap((_) => _.plots.map((p) => ({
|
|
341
|
-
x: p.x,
|
|
342
|
-
y: p.y
|
|
343
|
-
}))) : l.plots.map((_) => ({
|
|
344
|
-
x: _.x,
|
|
345
|
-
y: _.y
|
|
346
|
-
}));
|
|
347
|
-
let a = 1 / 0, o = -1 / 0, r = 1 / 0, h = -1 / 0;
|
|
348
|
-
t.forEach(({ x: _, y: p }) => {
|
|
349
|
-
a = Math.min(a, _), o = Math.max(o, _), r = Math.min(r, p), h = Math.max(h, p);
|
|
350
|
-
});
|
|
351
|
-
const C = o - a, S = h - r, P = C / s, F = S / s, d = Array(s).fill(0), k = Array(s).fill(0);
|
|
352
|
-
t.forEach(({ x: _, y: p }) => {
|
|
353
|
-
const v = Math.floor((_ - a) / P), x = Math.floor((p - r) / F);
|
|
354
|
-
d[v] || (d[v] = 0), k[x] || (k[x] = 0), d[v] += 1, k[x] += 1;
|
|
355
|
-
});
|
|
356
|
-
const X = [], w = [];
|
|
357
|
-
for (let _ = 0; _ < s; _ += 1)
|
|
358
|
-
X.push(a + (_ + 0.5) * P), w.push(r + (_ + 0.5) * F);
|
|
359
|
-
const I = Math.max(...d), J = Math.max(...k);
|
|
360
|
-
return { x: d, y: k, avgX: X, avgY: w, maxX: I, maxY: J };
|
|
361
|
-
}
|
|
362
|
-
const le = T(() => e.value.style.layout.marginalBars.tranches), V = T(() => it(Te.value, le.value)), Xt = T(() => {
|
|
363
|
-
const l = c.value.top - e.value.style.layout.marginalBars.offset, s = c.value.right + e.value.style.layout.marginalBars.offset;
|
|
364
|
-
return Te.value.map((t) => {
|
|
365
|
-
const a = it(t, le.value);
|
|
366
|
-
return {
|
|
367
|
-
coords: a,
|
|
368
|
-
dX: al(a.avgX.map((o, r) => ({
|
|
369
|
-
x: o,
|
|
370
|
-
y: l - a.x[r] / a.maxX * e.value.style.layout.marginalBars.size
|
|
371
|
-
}))),
|
|
372
|
-
dY: ll(a.avgY.map((o, r) => ({
|
|
373
|
-
y: o,
|
|
374
|
-
x: s + e.value.style.layout.marginalBars.size * a.y[r] / a.maxY
|
|
375
|
-
}))),
|
|
376
|
-
color: t.color,
|
|
377
|
-
id: t.id
|
|
378
|
-
};
|
|
379
|
-
});
|
|
380
|
-
}), G = m(void 0), f = m(null), Be = m(null);
|
|
381
|
-
function rt(l, s) {
|
|
382
|
-
G.value = l.id, f.value = l;
|
|
383
|
-
let t = "";
|
|
384
|
-
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: l, seriesIndex: s }), Be.value = {
|
|
385
|
-
datapoint: l,
|
|
386
|
-
seriesIndex: s,
|
|
387
|
-
series: j.value,
|
|
388
|
-
config: e.value
|
|
389
|
-
};
|
|
390
|
-
const a = e.value.style.tooltip.customFormat;
|
|
391
|
-
il(a) && rl(() => a({
|
|
392
|
-
datapoint: l,
|
|
393
|
-
seriesIndex: s,
|
|
394
|
-
series: j.value,
|
|
395
|
-
config: e.value
|
|
396
|
-
})) ? $e.value = a({
|
|
397
|
-
datapoint: l,
|
|
398
|
-
seriesIndex: s,
|
|
399
|
-
series: j.value,
|
|
400
|
-
config: e.value
|
|
401
|
-
}) : (l.clusterName && (t += `<div style="display:flex;gap:3px;align-items:center">${l.clusterName}</div>`), l.v.name && (t += `<div>${l.v.name}</div>`), t += `<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor}">`, t += `<div>${e.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(l.v.x) ? "-" : se(
|
|
402
|
-
e.value.style.layout.plots.selectors.labels.x.formatter,
|
|
403
|
-
l.v.x,
|
|
404
|
-
H({
|
|
405
|
-
p: e.value.style.tooltip.prefix,
|
|
406
|
-
v: l.v.x,
|
|
407
|
-
s: e.value.style.tooltip.suffix,
|
|
408
|
-
r: e.value.style.tooltip.roundingValue
|
|
409
|
-
}),
|
|
410
|
-
{ datapoint: l, seriesIndex: s }
|
|
411
|
-
)}</b></div>`, t += `<div>${e.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(l.v.y) ? "-" : se(
|
|
412
|
-
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
413
|
-
l.v.y,
|
|
414
|
-
H({
|
|
415
|
-
p: e.value.style.tooltip.prefix,
|
|
416
|
-
v: l.v.y,
|
|
417
|
-
s: e.value.style.tooltip.suffix,
|
|
418
|
-
r: e.value.style.tooltip.roundingValue
|
|
419
|
-
}),
|
|
420
|
-
{ datapoint: l, seriesIndex: s }
|
|
421
|
-
)}</b></div>`, t += `${e.value.style.layout.plots.deviation.translation}: <b>${H({
|
|
422
|
-
v: l.deviation,
|
|
423
|
-
r: e.value.style.layout.plots.deviation.roundingValue
|
|
424
|
-
})}</b>`, t += "</div>", $e.value = `<div>${t}</div>`), _e.value = !0;
|
|
425
|
-
}
|
|
426
|
-
function vt(l, s) {
|
|
427
|
-
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: s }), _e.value = !1, G.value = void 0, f.value = null;
|
|
428
|
-
}
|
|
429
|
-
function yt(l, s) {
|
|
430
|
-
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: s });
|
|
431
|
-
}
|
|
432
|
-
function ct(l) {
|
|
433
|
-
L.value.includes(l) ? L.value = L.value.filter((s) => s !== l) : L.value.length < Ce.value.length - 1 && L.value.push(l);
|
|
434
|
-
}
|
|
435
|
-
function dt(l = null) {
|
|
436
|
-
qt(() => {
|
|
437
|
-
const s = ["", e.value.table.translations.correlationCoefficient, e.value.table.translations.nbrPlots, `${e.value.style.layout.dataLabels.xAxis.name} ${e.value.table.translations.average}`, `${e.value.style.layout.dataLabels.yAxis.name} ${e.value.table.translations.average}`], t = j.value.map((r) => [
|
|
438
|
-
r.name,
|
|
439
|
-
r.correlation.coefficient,
|
|
440
|
-
r.plots.length,
|
|
441
|
-
r.plots.map((h) => h.v.x).reduce((h, C) => h + C, 0) / r.plots.length,
|
|
442
|
-
r.plots.map((h) => h.v.y).reduce((h, C) => h + C, 0) / r.plots.length
|
|
443
|
-
]), a = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([s]).concat(t), o = ul(a);
|
|
444
|
-
l ? l(o) : nl({ csvContent: o, title: e.value.style.title.text || "vue-ui-heatmap" });
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
const be = T(() => {
|
|
448
|
-
const l = [
|
|
449
|
-
e.value.table.translations.series,
|
|
450
|
-
e.value.table.translations.correlationCoefficient,
|
|
451
|
-
e.value.table.translations.nbrPlots,
|
|
452
|
-
`${e.value.style.layout.dataLabels.xAxis.name} ${e.value.table.translations.average}`,
|
|
453
|
-
`${e.value.style.layout.dataLabels.yAxis.name} ${e.value.table.translations.average}`
|
|
454
|
-
], s = j.value.map((a) => [
|
|
455
|
-
{
|
|
456
|
-
shape: a.shape,
|
|
457
|
-
content: a.name,
|
|
458
|
-
color: a.color
|
|
459
|
-
},
|
|
460
|
-
Number((a.correlation.coefficient ?? 0).toFixed(e.value.table.td.roundingValue)).toLocaleString(),
|
|
461
|
-
a.plots.length.toLocaleString(),
|
|
462
|
-
Number((a.plots.map((o) => o.v.x ?? 0).reduce((o, r) => o + r, 0) / a.plots.length).toFixed(e.value.table.td.roundingAverage)).toLocaleString(),
|
|
463
|
-
Number((a.plots.map((o) => o.v.y ?? 0).reduce((o, r) => o + r, 0) / a.plots.length).toFixed(e.value.table.td.roundingAverage)).toLocaleString()
|
|
464
|
-
]), t = {
|
|
465
|
-
th: {
|
|
466
|
-
backgroundColor: e.value.table.th.backgroundColor,
|
|
467
|
-
color: e.value.table.th.color,
|
|
468
|
-
outline: e.value.table.th.outline
|
|
469
|
-
},
|
|
470
|
-
td: {
|
|
471
|
-
backgroundColor: e.value.table.td.backgroundColor,
|
|
472
|
-
color: e.value.table.td.color,
|
|
473
|
-
outline: e.value.table.td.outline
|
|
474
|
-
},
|
|
475
|
-
breakpoint: e.value.table.responsiveBreakpoint
|
|
476
|
-
};
|
|
477
|
-
return { head: l, body: s, config: t, colNames: l };
|
|
478
|
-
}), ve = m(!1);
|
|
479
|
-
function ht(l) {
|
|
480
|
-
ve.value = l, De.value += 1;
|
|
481
|
-
}
|
|
482
|
-
function ft() {
|
|
483
|
-
R.value.showTable = !R.value.showTable;
|
|
484
|
-
}
|
|
485
|
-
function pt() {
|
|
486
|
-
R.value.showTooltip = !R.value.showTooltip;
|
|
487
|
-
}
|
|
488
|
-
const ke = m(!1);
|
|
489
|
-
function Pe() {
|
|
490
|
-
ke.value = !ke.value;
|
|
491
|
-
}
|
|
492
|
-
async function Yt({ scale: l = 2 } = {}) {
|
|
493
|
-
if (!ee.value) return;
|
|
494
|
-
const { width: s, height: t } = ee.value.getBoundingClientRect(), a = s / t, { imageUri: o, base64: r } = await xl({ domElement: ee.value, base64: !0, img: !0, scale: l });
|
|
495
|
-
return {
|
|
496
|
-
imageUri: o,
|
|
497
|
-
base64: r,
|
|
498
|
-
title: e.value.style.title.text,
|
|
499
|
-
width: s,
|
|
500
|
-
height: t,
|
|
501
|
-
aspectRatio: a
|
|
502
|
-
};
|
|
503
|
-
}
|
|
504
|
-
return $t({
|
|
505
|
-
getData: Wt,
|
|
506
|
-
getImage: Yt,
|
|
507
|
-
generatePdf: ot,
|
|
508
|
-
generateCsv: dt,
|
|
509
|
-
generateImage: st,
|
|
510
|
-
toggleTable: ft,
|
|
511
|
-
toggleTooltip: pt,
|
|
512
|
-
toggleAnnotator: Pe,
|
|
513
|
-
toggleFullscreen: ht
|
|
514
|
-
}), (l, s) => (u(), i("div", {
|
|
515
|
-
class: mt(`vue-ui-scatter ${ve.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
516
|
-
ref_key: "scatterChart",
|
|
517
|
-
ref: ee,
|
|
518
|
-
id: `vue-ui-scatter_${B.value}`,
|
|
519
|
-
style: oe(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
|
|
520
|
-
onMouseenter: s[2] || (s[2] = () => n(Ke)(!0)),
|
|
521
|
-
onMouseleave: s[3] || (s[3] = () => n(Ke)(!1))
|
|
522
|
-
}, [
|
|
523
|
-
e.value.userOptions.buttons.annotator ? (u(), K(n(St), {
|
|
524
|
-
key: 0,
|
|
525
|
-
svgRef: n(et),
|
|
526
|
-
backgroundColor: e.value.style.backgroundColor,
|
|
527
|
-
color: e.value.style.color,
|
|
528
|
-
active: ke.value,
|
|
529
|
-
onClose: Pe
|
|
530
|
-
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : g("", !0),
|
|
531
|
-
Ft.value ? (u(), i("div", {
|
|
532
|
-
key: 1,
|
|
533
|
-
ref_key: "noTitle",
|
|
534
|
-
ref: Ue,
|
|
535
|
-
class: "vue-data-ui-no-title-space",
|
|
536
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
537
|
-
}, null, 512)) : g("", !0),
|
|
538
|
-
e.value.style.title.text ? (u(), i("div", {
|
|
539
|
-
key: 2,
|
|
540
|
-
ref_key: "chartTitle",
|
|
541
|
-
ref: Re,
|
|
542
|
-
style: "width:100%;background:transparent"
|
|
543
|
-
}, [
|
|
544
|
-
(u(), K(ml, {
|
|
545
|
-
key: `title_${Ge.value}`,
|
|
546
|
-
config: {
|
|
547
|
-
title: {
|
|
548
|
-
cy: "scatter-div-title",
|
|
549
|
-
...e.value.style.title
|
|
550
|
-
},
|
|
551
|
-
subtitle: {
|
|
552
|
-
cy: "scatter-div-subtitle",
|
|
553
|
-
...e.value.style.title.subtitle
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
}, null, 8, ["config"]))
|
|
557
|
-
], 512)) : g("", !0),
|
|
558
|
-
b("div", {
|
|
559
|
-
id: `legend-top-${B.value}`
|
|
560
|
-
}, null, 8, wl),
|
|
561
|
-
e.value.userOptions.show && Ye.value && (n(Qe) || n(Le)) ? (u(), K(n(zt), {
|
|
562
|
-
ref_key: "details",
|
|
563
|
-
ref: Bt,
|
|
564
|
-
key: `user_options_${De.value}`,
|
|
565
|
-
backgroundColor: e.value.style.backgroundColor,
|
|
566
|
-
color: e.value.style.color,
|
|
567
|
-
isImaging: n(at),
|
|
568
|
-
isPrinting: n(lt),
|
|
569
|
-
uid: B.value,
|
|
570
|
-
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
|
|
571
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
572
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
573
|
-
hasXls: e.value.userOptions.buttons.csv,
|
|
574
|
-
hasTable: e.value.userOptions.buttons.table,
|
|
575
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
576
|
-
isTooltip: R.value.showTooltip,
|
|
577
|
-
isFullscreen: ve.value,
|
|
578
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
579
|
-
chartElement: ee.value,
|
|
580
|
-
position: e.value.userOptions.position,
|
|
581
|
-
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
582
|
-
isAnnotation: ke.value,
|
|
583
|
-
callbacks: e.value.userOptions.callbacks,
|
|
584
|
-
printScale: e.value.userOptions.print.scale,
|
|
585
|
-
onToggleFullscreen: ht,
|
|
586
|
-
onGeneratePdf: n(ot),
|
|
587
|
-
onGenerateCsv: dt,
|
|
588
|
-
onGenerateImage: n(st),
|
|
589
|
-
onToggleTable: ft,
|
|
590
|
-
onToggleTooltip: pt,
|
|
591
|
-
onToggleAnnotator: Pe,
|
|
592
|
-
style: oe({
|
|
593
|
-
visibility: n(Qe) ? n(Le) ? "visible" : "hidden" : "visible"
|
|
594
|
-
})
|
|
595
|
-
}, Vt({ _: 2 }, [
|
|
596
|
-
l.$slots.menuIcon ? {
|
|
597
|
-
name: "menuIcon",
|
|
598
|
-
fn: N(({ isOpen: t, color: a }) => [
|
|
599
|
-
E(l.$slots, "menuIcon", he(fe({ isOpen: t, color: a })), void 0, !0)
|
|
600
|
-
]),
|
|
601
|
-
key: "0"
|
|
602
|
-
} : void 0,
|
|
603
|
-
l.$slots.optionTooltip ? {
|
|
604
|
-
name: "optionTooltip",
|
|
605
|
-
fn: N(() => [
|
|
606
|
-
E(l.$slots, "optionTooltip", {}, void 0, !0)
|
|
607
|
-
]),
|
|
608
|
-
key: "1"
|
|
609
|
-
} : void 0,
|
|
610
|
-
l.$slots.optionPdf ? {
|
|
611
|
-
name: "optionPdf",
|
|
612
|
-
fn: N(() => [
|
|
613
|
-
E(l.$slots, "optionPdf", {}, void 0, !0)
|
|
614
|
-
]),
|
|
615
|
-
key: "2"
|
|
616
|
-
} : void 0,
|
|
617
|
-
l.$slots.optionCsv ? {
|
|
618
|
-
name: "optionCsv",
|
|
619
|
-
fn: N(() => [
|
|
620
|
-
E(l.$slots, "optionCsv", {}, void 0, !0)
|
|
621
|
-
]),
|
|
622
|
-
key: "3"
|
|
623
|
-
} : void 0,
|
|
624
|
-
l.$slots.optionImg ? {
|
|
625
|
-
name: "optionImg",
|
|
626
|
-
fn: N(() => [
|
|
627
|
-
E(l.$slots, "optionImg", {}, void 0, !0)
|
|
628
|
-
]),
|
|
629
|
-
key: "4"
|
|
630
|
-
} : void 0,
|
|
631
|
-
l.$slots.optionTable ? {
|
|
632
|
-
name: "optionTable",
|
|
633
|
-
fn: N(() => [
|
|
634
|
-
E(l.$slots, "optionTable", {}, void 0, !0)
|
|
635
|
-
]),
|
|
636
|
-
key: "5"
|
|
637
|
-
} : void 0,
|
|
638
|
-
l.$slots.optionFullscreen ? {
|
|
639
|
-
name: "optionFullscreen",
|
|
640
|
-
fn: N(({ toggleFullscreen: t, isFullscreen: a }) => [
|
|
641
|
-
E(l.$slots, "optionFullscreen", he(fe({ toggleFullscreen: t, isFullscreen: a })), void 0, !0)
|
|
642
|
-
]),
|
|
643
|
-
key: "6"
|
|
644
|
-
} : void 0,
|
|
645
|
-
l.$slots.optionAnnotator ? {
|
|
646
|
-
name: "optionAnnotator",
|
|
647
|
-
fn: N(({ toggleAnnotator: t, isAnnotator: a }) => [
|
|
648
|
-
E(l.$slots, "optionAnnotator", he(fe({ toggleAnnotator: t, isAnnotator: a })), void 0, !0)
|
|
649
|
-
]),
|
|
650
|
-
key: "7"
|
|
651
|
-
} : void 0
|
|
652
|
-
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : g("", !0),
|
|
653
|
-
(u(), i("svg", {
|
|
654
|
-
ref_key: "svgRef",
|
|
655
|
-
ref: et,
|
|
656
|
-
xmlns: n(ol),
|
|
657
|
-
class: mt({ "vue-data-ui-fullscreen--on": ve.value, "vue-data-ui-fulscreen--off": !ve.value, animated: e.value.useCssAnimation }),
|
|
658
|
-
viewBox: `0 0 ${z.value.width <= 0 ? 10 : z.value.width} ${z.value.height <= 0 ? 10 : z.value.height}`,
|
|
659
|
-
style: oe(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`)
|
|
660
|
-
}, [
|
|
661
|
-
Fe(n(Ct)),
|
|
662
|
-
l.$slots["chart-background"] ? (u(), i("foreignObject", {
|
|
663
|
-
key: 0,
|
|
664
|
-
x: 0,
|
|
665
|
-
y: 0,
|
|
666
|
-
width: z.value.width <= 0 ? 10 : z.value.width,
|
|
667
|
-
height: z.value.height <= 0 ? 10 : z.value.height,
|
|
668
|
-
style: {
|
|
669
|
-
pointerEvents: "none"
|
|
670
|
-
}
|
|
671
|
-
}, [
|
|
672
|
-
E(l.$slots, "chart-background", {}, void 0, !0)
|
|
673
|
-
], 8, $l)) : g("", !0),
|
|
674
|
-
e.value.style.layout.axis.show ? (u(), i("g", Ml, [
|
|
675
|
-
b("line", {
|
|
676
|
-
x1: A.value.x,
|
|
677
|
-
x2: A.value.x,
|
|
678
|
-
y1: c.value.top,
|
|
679
|
-
y2: c.value.bottom,
|
|
680
|
-
stroke: e.value.style.layout.axis.stroke,
|
|
681
|
-
"stroke-width": e.value.style.layout.axis.strokeWidth,
|
|
682
|
-
"stroke-linecap": "round"
|
|
683
|
-
}, null, 8, Al),
|
|
684
|
-
b("line", {
|
|
685
|
-
x1: c.value.left,
|
|
686
|
-
x2: c.value.right,
|
|
687
|
-
y1: A.value.y,
|
|
688
|
-
y2: A.value.y,
|
|
689
|
-
stroke: e.value.style.layout.axis.stroke,
|
|
690
|
-
"stroke-width": e.value.style.layout.axis.strokeWidth,
|
|
691
|
-
"stroke-linecap": "round"
|
|
692
|
-
}, null, 8, Cl)
|
|
693
|
-
])) : g("", !0),
|
|
694
|
-
e.value.style.layout.plots.giftWrap.show ? (u(), i("g", Sl, [
|
|
695
|
-
(u(!0), i(q, null, Q(j.value, (t, a) => (u(), i("g", null, [
|
|
696
|
-
t.plots.length > 2 ? (u(), i("polygon", {
|
|
697
|
-
key: 0,
|
|
698
|
-
points: n(sl)({ series: t.plots }),
|
|
699
|
-
fill: n(Xe)(t.color, e.value.style.layout.plots.giftWrap.fillOpacity * 100),
|
|
700
|
-
"stroke-width": e.value.style.layout.plots.giftWrap.strokeWidth,
|
|
701
|
-
"stroke-dasharray": e.value.style.layout.plots.giftWrap.strokeDasharray,
|
|
702
|
-
stroke: t.color,
|
|
703
|
-
"stroke-linejoin": "round",
|
|
704
|
-
"stroke-linecap": "round"
|
|
705
|
-
}, null, 8, Ll)) : g("", !0)
|
|
706
|
-
]))), 256))
|
|
707
|
-
])) : g("", !0),
|
|
708
|
-
(u(!0), i(q, null, Q(j.value, (t, a) => (u(), i("g", null, [
|
|
709
|
-
!t.shape || t.shape === "circle" ? (u(), i("g", zl, [
|
|
710
|
-
(u(!0), i(q, null, Q(t.plots, (o, r) => (u(), i("circle", {
|
|
711
|
-
cx: o.x,
|
|
712
|
-
cy: o.y,
|
|
713
|
-
r: G.value && G.value === o.id ? o.weight * 2 : o.weight,
|
|
714
|
-
fill: n(Xe)(t.color, e.value.style.layout.plots.opacity * 100),
|
|
715
|
-
stroke: e.value.style.layout.plots.stroke,
|
|
716
|
-
"stroke-width": e.value.style.layout.plots.strokeWidth,
|
|
717
|
-
style: oe(`opacity:${G.value && G.value === o.id ? 1 : e.value.style.layout.plots.significance.useDistanceOpacity ? 1 - Math.abs(o.deviation) / nt.value : e.value.style.layout.plots.significance.show && Math.abs(o.deviation) > e.value.style.layout.plots.significance.deviationThreshold ? e.value.style.layout.plots.significance.opacity : 1}`),
|
|
718
|
-
onMouseover: (h) => rt(o, a),
|
|
719
|
-
onMouseleave: (h) => vt(o, a),
|
|
720
|
-
onClick: (h) => yt(o, a)
|
|
721
|
-
}, null, 44, Tl))), 256))
|
|
722
|
-
])) : (u(), i("g", Bl, [
|
|
723
|
-
(u(!0), i(q, null, Q(t.plots, (o, r) => (u(), K(wt, {
|
|
724
|
-
plot: { x: o.x, y: o.y },
|
|
725
|
-
radius: G.value && G.value === o.id ? o.weight * 2 : o.weight,
|
|
726
|
-
shape: t.shape,
|
|
727
|
-
color: n(Xe)(t.color, e.value.style.layout.plots.opacity * 100),
|
|
728
|
-
stroke: e.value.style.layout.plots.stroke,
|
|
729
|
-
strokeWidth: e.value.style.layout.plots.strokeWidth,
|
|
730
|
-
style: oe(`opacity:${G.value && G.value === o.id ? 1 : e.value.style.layout.plots.significance.useDistanceOpacity ? 1 - Math.abs(o.deviation) / nt.value : e.value.style.layout.plots.significance.show && Math.abs(o.deviation) > e.value.style.layout.plots.significance.deviationThreshold ? e.value.style.layout.plots.significance.opacity : 1}`),
|
|
731
|
-
onMouseover: (h) => rt(o, a),
|
|
732
|
-
onMouseleave: (h) => vt(o, a),
|
|
733
|
-
onClick: (h) => yt(o, a)
|
|
734
|
-
}, null, 8, ["plot", "radius", "shape", "color", "stroke", "strokeWidth", "style", "onMouseover", "onMouseleave", "onClick"]))), 256))
|
|
735
|
-
]))
|
|
736
|
-
]))), 256)),
|
|
737
|
-
e.value.style.layout.marginalBars.show ? (u(), i("g", Pl, [
|
|
738
|
-
b("defs", null, [
|
|
739
|
-
b("linearGradient", {
|
|
740
|
-
id: `marginal_x_${B.value}`,
|
|
741
|
-
x1: "0%",
|
|
742
|
-
y1: "0%",
|
|
743
|
-
x2: "0%",
|
|
744
|
-
y2: "100%"
|
|
745
|
-
}, [
|
|
746
|
-
b("stop", {
|
|
747
|
-
offset: "0%",
|
|
748
|
-
"stop-color": e.value.style.layout.marginalBars.fill
|
|
749
|
-
}, null, 8, Nl),
|
|
750
|
-
b("stop", {
|
|
751
|
-
offset: "100%",
|
|
752
|
-
"stop-color": e.value.style.backgroundColor
|
|
753
|
-
}, null, 8, El)
|
|
754
|
-
], 8, Ol),
|
|
755
|
-
b("linearGradient", {
|
|
756
|
-
id: `marginal_y_${B.value}`,
|
|
757
|
-
x1: "0%",
|
|
758
|
-
x2: "100%",
|
|
759
|
-
y1: "0%",
|
|
760
|
-
y2: "0%"
|
|
761
|
-
}, [
|
|
762
|
-
b("stop", {
|
|
763
|
-
offset: "0%",
|
|
764
|
-
"stop-color": e.value.style.backgroundColor
|
|
765
|
-
}, null, 8, Il),
|
|
766
|
-
b("stop", {
|
|
767
|
-
offset: "100%",
|
|
768
|
-
"stop-color": e.value.style.layout.marginalBars.fill
|
|
769
|
-
}, null, 8, Wl)
|
|
770
|
-
], 8, Fl)
|
|
771
|
-
]),
|
|
772
|
-
(u(!0), i(q, null, Q(V.value.x, (t, a) => (u(), i("g", null, [
|
|
773
|
-
t && V.value.avgX[a] ? (u(), i("rect", {
|
|
774
|
-
key: 0,
|
|
775
|
-
x: V.value.avgX[a] - c.value.width / le.value / 2,
|
|
776
|
-
y: c.value.top - e.value.style.layout.marginalBars.offset - t / V.value.maxX * e.value.style.layout.marginalBars.size,
|
|
777
|
-
width: c.value.width / le.value <= 0 ? 1e-4 : c.value.width / le.value,
|
|
778
|
-
height: t / V.value.maxX * e.value.style.layout.marginalBars.size <= 0 ? 1e-4 : t / V.value.maxX * e.value.style.layout.marginalBars.size,
|
|
779
|
-
fill: e.value.style.layout.marginalBars.useGradient ? `url(#marginal_x_${B.value})` : e.value.style.layout.marginalBars.fill,
|
|
780
|
-
style: oe(`opacity:${e.value.style.layout.marginalBars.opacity}`),
|
|
781
|
-
stroke: e.value.style.backgroundColor,
|
|
782
|
-
"stroke-width": e.value.style.layout.marginalBars.strokeWidth,
|
|
783
|
-
rx: e.value.style.layout.marginalBars.borderRadius
|
|
784
|
-
}, null, 12, Xl)) : g("", !0)
|
|
785
|
-
]))), 256)),
|
|
786
|
-
(u(!0), i(q, null, Q(V.value.y, (t, a) => (u(), i("g", null, [
|
|
787
|
-
t && V.value.avgY[a] ? (u(), i("rect", {
|
|
788
|
-
key: 0,
|
|
789
|
-
x: c.value.right + e.value.style.layout.marginalBars.offset,
|
|
790
|
-
y: V.value.avgY[a] - c.value.height / le.value / 2,
|
|
791
|
-
height: c.value.height / le.value <= 0 ? 1e-4 : c.value.height / le.value,
|
|
792
|
-
width: t / V.value.maxY * e.value.style.layout.marginalBars.size <= 0 ? 1e-4 : t / V.value.maxY * e.value.style.layout.marginalBars.size,
|
|
793
|
-
fill: e.value.style.layout.marginalBars.useGradient ? `url(#marginal_y_${B.value})` : e.value.style.layout.marginalBars.fill,
|
|
794
|
-
style: oe(`opacity:${e.value.style.layout.marginalBars.opacity}`),
|
|
795
|
-
stroke: e.value.style.backgroundColor,
|
|
796
|
-
"stroke-width": e.value.style.layout.marginalBars.strokeWidth,
|
|
797
|
-
rx: e.value.style.layout.marginalBars.borderRadius
|
|
798
|
-
}, null, 12, Yl)) : g("", !0)
|
|
799
|
-
]))), 256)),
|
|
800
|
-
e.value.style.layout.marginalBars.showLines ? (u(), i("g", Dl, [
|
|
801
|
-
(u(!0), i(q, null, Q(Xt.value, (t) => (u(), i(q, null, [
|
|
802
|
-
L.value.includes(t.id) ? g("", !0) : (u(), i("path", {
|
|
803
|
-
key: 0,
|
|
804
|
-
d: `M ${t.dX}`,
|
|
805
|
-
stroke: e.value.style.backgroundColor,
|
|
806
|
-
"stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth + 1,
|
|
807
|
-
"stroke-linecap": "round",
|
|
808
|
-
"stroke-linejoin": "round",
|
|
809
|
-
fill: "none"
|
|
810
|
-
}, null, 8, Rl)),
|
|
811
|
-
L.value.includes(t.id) ? g("", !0) : (u(), i("path", {
|
|
812
|
-
key: 1,
|
|
813
|
-
d: `M ${t.dX}`,
|
|
814
|
-
stroke: t.color,
|
|
815
|
-
"stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth,
|
|
816
|
-
"stroke-linecap": "round",
|
|
817
|
-
"stroke-linejoin": "round",
|
|
818
|
-
fill: "none"
|
|
819
|
-
}, null, 8, jl)),
|
|
820
|
-
L.value.includes(t.id) ? g("", !0) : (u(), i("path", {
|
|
821
|
-
key: 2,
|
|
822
|
-
d: `M ${t.dY}`,
|
|
823
|
-
stroke: e.value.style.backgroundColor,
|
|
824
|
-
"stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth + 1,
|
|
825
|
-
"stroke-linecap": "round",
|
|
826
|
-
"stroke-linejoin": "round",
|
|
827
|
-
fill: "none"
|
|
828
|
-
}, null, 8, Vl)),
|
|
829
|
-
L.value.includes(t.id) ? g("", !0) : (u(), i("path", {
|
|
830
|
-
key: 3,
|
|
831
|
-
d: `M ${t.dY}`,
|
|
832
|
-
stroke: t.color,
|
|
833
|
-
"stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth,
|
|
834
|
-
"stroke-linecap": "round",
|
|
835
|
-
"stroke-linejoin": "round",
|
|
836
|
-
fill: "none"
|
|
837
|
-
}, null, 8, Ul))
|
|
838
|
-
], 64))), 256))
|
|
839
|
-
])) : g("", !0)
|
|
840
|
-
])) : g("", !0),
|
|
841
|
-
f.value && e.value.style.layout.plots.selectors.show ? (u(), i("g", Gl, [
|
|
842
|
-
b("line", {
|
|
843
|
-
x1: A.value.x,
|
|
844
|
-
x2: f.value.x,
|
|
845
|
-
y1: f.value.y,
|
|
846
|
-
y2: f.value.y,
|
|
847
|
-
stroke: e.value.style.layout.plots.selectors.stroke,
|
|
848
|
-
"stroke-width": e.value.style.layout.plots.selectors.strokeWidth,
|
|
849
|
-
"stroke-dasharray": e.value.style.layout.plots.selectors.strokeDasharray,
|
|
850
|
-
"stroke-linecap": "round",
|
|
851
|
-
class: "line-pointer"
|
|
852
|
-
}, null, 8, ql),
|
|
853
|
-
b("line", {
|
|
854
|
-
x1: f.value.x,
|
|
855
|
-
x2: f.value.x,
|
|
856
|
-
y1: A.value.y,
|
|
857
|
-
y2: f.value.y,
|
|
858
|
-
stroke: e.value.style.layout.plots.selectors.stroke,
|
|
859
|
-
"stroke-width": e.value.style.layout.plots.selectors.strokeWidth,
|
|
860
|
-
"stroke-dasharray": e.value.style.layout.plots.selectors.strokeDasharray,
|
|
861
|
-
"stroke-linecap": "round",
|
|
862
|
-
class: "line-pointer"
|
|
863
|
-
}, null, 8, Hl),
|
|
864
|
-
b("text", {
|
|
865
|
-
x: A.value.x + (f.value.x > A.value.x ? -6 : 6),
|
|
866
|
-
y: f.value.y + e.value.style.layout.plots.selectors.labels.fontSize / 3,
|
|
867
|
-
"font-size": e.value.style.layout.plots.selectors.labels.fontSize,
|
|
868
|
-
fill: e.value.style.layout.plots.selectors.labels.color,
|
|
869
|
-
"font-weight": e.value.style.layout.plots.selectors.labels.bold ? "bold" : "normal",
|
|
870
|
-
"text-anchor": f.value.x > A.value.x ? "end" : "start"
|
|
871
|
-
}, Y(n(se)(
|
|
872
|
-
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
873
|
-
n(D)(f.value.v.y),
|
|
874
|
-
n(H)({
|
|
875
|
-
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
876
|
-
v: n(D)(f.value.v.y),
|
|
877
|
-
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
878
|
-
r: e.value.style.layout.plots.selectors.labels.rounding
|
|
879
|
-
}),
|
|
880
|
-
{ datapoint: f.value }
|
|
881
|
-
)), 9, Zl),
|
|
882
|
-
b("text", {
|
|
883
|
-
x: f.value.x,
|
|
884
|
-
y: A.value.y + (f.value.y > A.value.y ? -6 : e.value.style.layout.plots.selectors.labels.fontSize + 6),
|
|
885
|
-
"font-size": e.value.style.layout.plots.selectors.labels.fontSize,
|
|
886
|
-
fill: e.value.style.layout.plots.selectors.labels.color,
|
|
887
|
-
"font-weight": e.value.style.layout.plots.selectors.labels.bold ? "bold" : "normal",
|
|
888
|
-
"text-anchor": "middle"
|
|
889
|
-
}, Y(n(se)(
|
|
890
|
-
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
891
|
-
n(D)(f.value.v.x),
|
|
892
|
-
n(H)({
|
|
893
|
-
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
894
|
-
v: n(D)(f.value.v.x),
|
|
895
|
-
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
896
|
-
r: e.value.style.layout.plots.selectors.labels.rounding
|
|
897
|
-
}),
|
|
898
|
-
{ datapoint: f.value }
|
|
899
|
-
)), 9, Jl),
|
|
900
|
-
b("circle", {
|
|
901
|
-
cx: A.value.x,
|
|
902
|
-
cy: f.value.y,
|
|
903
|
-
r: e.value.style.layout.plots.selectors.markers.radius,
|
|
904
|
-
fill: e.value.style.layout.plots.selectors.markers.fill,
|
|
905
|
-
stroke: e.value.style.layout.plots.selectors.markers.stroke,
|
|
906
|
-
"stroke-width": e.value.style.layout.plots.selectors.markers.strokeWidth,
|
|
907
|
-
class: "line-pointer"
|
|
908
|
-
}, null, 8, Kl),
|
|
909
|
-
b("circle", {
|
|
910
|
-
cx: f.value.x,
|
|
911
|
-
cy: A.value.y,
|
|
912
|
-
r: e.value.style.layout.plots.selectors.markers.radius,
|
|
913
|
-
fill: e.value.style.layout.plots.selectors.markers.fill,
|
|
914
|
-
stroke: e.value.style.layout.plots.selectors.markers.stroke,
|
|
915
|
-
"stroke-width": e.value.style.layout.plots.selectors.markers.strokeWidth,
|
|
916
|
-
class: "line-pointer"
|
|
917
|
-
}, null, 8, Ql),
|
|
918
|
-
e.value.style.layout.plots.selectors.labels.showName ? (u(), i("text", {
|
|
919
|
-
key: 0,
|
|
920
|
-
x: f.value.x,
|
|
921
|
-
y: f.value.y + (f.value.y < A.value.y ? -e.value.style.layout.plots.selectors.labels.fontSize / 2 : e.value.style.layout.plots.selectors.labels.fontSize),
|
|
922
|
-
"font-size": e.value.style.layout.plots.selectors.labels.fontSize,
|
|
923
|
-
fill: e.value.style.layout.plots.selectors.labels.color,
|
|
924
|
-
"font-weight": e.value.style.layout.plots.selectors.labels.bold ? "bold" : "normal",
|
|
925
|
-
"text-anchor": f.value.x < c.value.left + 100 ? "start" : f.value.x > c.value.right - 100 ? "end" : f.value.x > A.value.x ? "start" : "end"
|
|
926
|
-
}, Y(f.value.v.name), 9, ea)) : g("", !0)
|
|
927
|
-
])) : g("", !0),
|
|
928
|
-
e.value.style.layout.dataLabels.xAxis.show ? (u(), i("g", {
|
|
929
|
-
key: 5,
|
|
930
|
-
ref_key: "xAxisLabelLeft",
|
|
931
|
-
ref: Me
|
|
932
|
-
}, [
|
|
933
|
-
b("text", {
|
|
934
|
-
id: `vue-ui-scatter-xAxis-label-${B.value}`,
|
|
935
|
-
transform: `translate(${e.value.style.layout.dataLabels.xAxis.fontSize}, ${c.value.top + c.value.height / 2}), rotate(-90)`,
|
|
936
|
-
"text-anchor": "middle",
|
|
937
|
-
"font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
|
|
938
|
-
"font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal",
|
|
939
|
-
fill: e.value.style.layout.dataLabels.xAxis.color
|
|
940
|
-
}, Y(e.value.style.layout.dataLabels.xAxis.name), 9, ta),
|
|
941
|
-
b("text", {
|
|
942
|
-
"text-anchor": "middle",
|
|
943
|
-
"font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
|
|
944
|
-
fill: e.value.style.layout.dataLabels.xAxis.color,
|
|
945
|
-
transform: `translate(${e.value.style.layout.dataLabels.xAxis.name ? e.value.style.layout.dataLabels.xAxis.fontSize * 3 : 0}, ${A.value.y + e.value.style.layout.dataLabels.xAxis.fontSize / 3}), rotate(-90)`
|
|
946
|
-
}, Y(n(se)(
|
|
947
|
-
e.value.style.layout.plots.selectors.labels.x.formatter,
|
|
948
|
-
n(D)($.value.xMin),
|
|
949
|
-
n(H)({
|
|
950
|
-
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
951
|
-
v: n(D)($.value.xMin),
|
|
952
|
-
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
953
|
-
r: e.value.style.layout.dataLabels.xAxis.rounding
|
|
954
|
-
})
|
|
955
|
-
)), 9, la)
|
|
956
|
-
], 512)) : g("", !0),
|
|
957
|
-
e.value.style.layout.dataLabels.xAxis.show ? (u(), i("text", {
|
|
958
|
-
key: 6,
|
|
959
|
-
ref_key: "xAxisLabelRight",
|
|
960
|
-
ref: Pt,
|
|
961
|
-
"text-anchor": "middle",
|
|
962
|
-
transform: `translate(${c.value.right + e.value.style.layout.padding.right + 6}, ${A.value.y + e.value.style.layout.dataLabels.xAxis.fontSize / 3}), rotate(-90)`,
|
|
963
|
-
"font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
|
|
964
|
-
fill: e.value.style.layout.dataLabels.xAxis.color
|
|
965
|
-
}, Y(n(se)(
|
|
966
|
-
e.value.style.layout.plots.selectors.labels.x.formatter,
|
|
967
|
-
n(D)($.value.xMax),
|
|
968
|
-
n(H)({
|
|
969
|
-
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
970
|
-
v: n(D)($.value.xMax),
|
|
971
|
-
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
972
|
-
r: e.value.style.layout.dataLabels.xAxis.rounding
|
|
973
|
-
})
|
|
974
|
-
)), 9, aa)) : g("", !0),
|
|
975
|
-
e.value.style.layout.dataLabels.yAxis.show ? (u(), i("text", {
|
|
976
|
-
key: 7,
|
|
977
|
-
ref_key: "yAxisLabelTop",
|
|
978
|
-
ref: Ot,
|
|
979
|
-
x: A.value.x,
|
|
980
|
-
y: c.value.top - e.value.style.layout.dataLabels.yAxis.fontSize,
|
|
981
|
-
"text-anchor": "middle",
|
|
982
|
-
"font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
|
|
983
|
-
fill: e.value.style.layout.dataLabels.yAxis.color
|
|
984
|
-
}, Y(n(se)(
|
|
985
|
-
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
986
|
-
n(D)($.value.yMax),
|
|
987
|
-
n(H)({
|
|
988
|
-
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
989
|
-
v: n(D)($.value.yMax),
|
|
990
|
-
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
991
|
-
r: e.value.style.layout.dataLabels.yAxis.rounding
|
|
992
|
-
})
|
|
993
|
-
)), 9, oa)) : g("", !0),
|
|
994
|
-
e.value.style.layout.dataLabels.yAxis.show ? (u(), i("g", {
|
|
995
|
-
key: 8,
|
|
996
|
-
ref_key: "yAxisLabelBottom",
|
|
997
|
-
ref: Ae
|
|
998
|
-
}, [
|
|
999
|
-
b("text", {
|
|
1000
|
-
x: A.value.x,
|
|
1001
|
-
y: z.value.height - e.value.style.layout.dataLabels.yAxis.fontSize * 2,
|
|
1002
|
-
"text-anchor": "middle",
|
|
1003
|
-
"font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
|
|
1004
|
-
fill: e.value.style.layout.dataLabels.yAxis.color
|
|
1005
|
-
}, Y(n(se)(
|
|
1006
|
-
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
1007
|
-
n(D)($.value.yMin),
|
|
1008
|
-
n(H)({
|
|
1009
|
-
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
1010
|
-
v: n(D)($.value.yMin),
|
|
1011
|
-
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
1012
|
-
r: e.value.style.layout.dataLabels.yAxis.rounding
|
|
1013
|
-
})
|
|
1014
|
-
)), 9, sa),
|
|
1015
|
-
b("text", {
|
|
1016
|
-
"text-anchor": "middle",
|
|
1017
|
-
"font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
|
|
1018
|
-
"font-weight": e.value.style.layout.dataLabels.yAxis.bold ? "bold" : "normal",
|
|
1019
|
-
fill: e.value.style.layout.dataLabels.yAxis.color,
|
|
1020
|
-
x: c.value.left + c.value.width / 2,
|
|
1021
|
-
y: z.value.height
|
|
1022
|
-
}, Y(e.value.style.layout.dataLabels.yAxis.name), 9, ua)
|
|
1023
|
-
], 512)) : g("", !0),
|
|
1024
|
-
b("clipPath", {
|
|
1025
|
-
id: `clip_path_${B.value}`
|
|
1026
|
-
}, [
|
|
1027
|
-
b("rect", {
|
|
1028
|
-
x: c.value.left,
|
|
1029
|
-
y: c.value.top,
|
|
1030
|
-
width: c.value.width <= 0 ? 1e-4 : c.value.width,
|
|
1031
|
-
height: c.value.height <= 0 ? 1e-4 : c.value.height
|
|
1032
|
-
}, null, 8, ia)
|
|
1033
|
-
], 8, na),
|
|
1034
|
-
e.value.style.layout.correlation.show ? (u(), i("g", ra, [
|
|
1035
|
-
(u(!0), i(q, null, Q(j.value, (t, a) => (u(), i("line", {
|
|
1036
|
-
x1: t.correlation.x1,
|
|
1037
|
-
x2: t.correlation.x2,
|
|
1038
|
-
y1: t.correlation.y1,
|
|
1039
|
-
y2: t.correlation.y2,
|
|
1040
|
-
"stroke-dasharray": e.value.style.layout.correlation.strokeDasharray,
|
|
1041
|
-
stroke: t.color,
|
|
1042
|
-
"stroke-width": e.value.style.layout.correlation.strokeWidth,
|
|
1043
|
-
"clip-path": `url(#clip_path_${B.value})`
|
|
1044
|
-
}, null, 8, va))), 256)),
|
|
1045
|
-
(u(!0), i(q, null, Q(j.value, (t, a) => (u(), i("g", null, [
|
|
1046
|
-
e.value.style.layout.correlation.label.show ? (u(), i("text", {
|
|
1047
|
-
key: 0,
|
|
1048
|
-
x: t.correlation.x2,
|
|
1049
|
-
y: t.correlation.y2,
|
|
1050
|
-
fill: e.value.style.layout.correlation.label.useSerieColor ? t.color : e.value.style.layout.correlation.label.color,
|
|
1051
|
-
"text-anchor": "end",
|
|
1052
|
-
"font-size": e.value.style.layout.correlation.label.fontSize,
|
|
1053
|
-
"font-weight": e.value.style.layout.correlation.label.bold ? "bold" : "normal"
|
|
1054
|
-
}, Y(n(H)({
|
|
1055
|
-
v: n(D)(t.correlation.coefficient),
|
|
1056
|
-
r: e.value.style.layout.correlation.label.roundingValue
|
|
1057
|
-
})), 9, ya)) : g("", !0)
|
|
1058
|
-
]))), 256))
|
|
1059
|
-
])) : g("", !0),
|
|
1060
|
-
E(l.$slots, "svg", { svg: z.value }, void 0, !0)
|
|
1061
|
-
], 14, _l)),
|
|
1062
|
-
l.$slots.watermark ? (u(), i("div", ca, [
|
|
1063
|
-
E(l.$slots, "watermark", he(fe({ isPrinting: n(lt) || n(at) })), void 0, !0)
|
|
1064
|
-
])) : g("", !0),
|
|
1065
|
-
b("div", {
|
|
1066
|
-
id: `legend-bottom-${B.value}`
|
|
1067
|
-
}, null, 8, da),
|
|
1068
|
-
Ze.value ? (u(), K(Ut, {
|
|
1069
|
-
key: 5,
|
|
1070
|
-
to: e.value.style.legend.position === "top" ? `#legend-top-${B.value}` : `#legend-bottom-${B.value}`
|
|
1071
|
-
}, [
|
|
1072
|
-
b("div", {
|
|
1073
|
-
ref_key: "chartLegend",
|
|
1074
|
-
ref: je
|
|
1075
|
-
}, [
|
|
1076
|
-
e.value.style.legend.show ? (u(), K(gl, {
|
|
1077
|
-
key: `legend_${He.value}`,
|
|
1078
|
-
legendSet: ue.value,
|
|
1079
|
-
config: It.value,
|
|
1080
|
-
onClickMarker: s[0] || (s[0] = ({ legend: t }) => ct(t.id))
|
|
1081
|
-
}, {
|
|
1082
|
-
item: N(({ legend: t }) => [
|
|
1083
|
-
b("div", {
|
|
1084
|
-
onClick: (a) => t.segregate(),
|
|
1085
|
-
style: oe(`opacity:${L.value.includes(t.id) ? 0.5 : 1}`)
|
|
1086
|
-
}, Y(t.name), 13, ha)
|
|
1087
|
-
]),
|
|
1088
|
-
_: 1
|
|
1089
|
-
}, 8, ["legendSet", "config"])) : E(l.$slots, "legend", {
|
|
1090
|
-
key: 1,
|
|
1091
|
-
legend: ue.value
|
|
1092
|
-
}, void 0, !0)
|
|
1093
|
-
], 512)
|
|
1094
|
-
], 8, ["to"])) : g("", !0),
|
|
1095
|
-
l.$slots.source ? (u(), i("div", {
|
|
1096
|
-
key: 6,
|
|
1097
|
-
ref_key: "source",
|
|
1098
|
-
ref: Ve,
|
|
1099
|
-
dir: "auto"
|
|
1100
|
-
}, [
|
|
1101
|
-
E(l.$slots, "source", {}, void 0, !0)
|
|
1102
|
-
], 512)) : g("", !0),
|
|
1103
|
-
Fe(n(Lt), {
|
|
1104
|
-
show: R.value.showTooltip && _e.value,
|
|
1105
|
-
backgroundColor: e.value.style.tooltip.backgroundColor,
|
|
1106
|
-
color: e.value.style.tooltip.color,
|
|
1107
|
-
borderRadius: e.value.style.tooltip.borderRadius,
|
|
1108
|
-
borderColor: e.value.style.tooltip.borderColor,
|
|
1109
|
-
borderWidth: e.value.style.tooltip.borderWidth,
|
|
1110
|
-
fontSize: e.value.style.tooltip.fontSize,
|
|
1111
|
-
backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
|
|
1112
|
-
position: e.value.style.tooltip.position,
|
|
1113
|
-
offsetY: e.value.style.tooltip.offsetY,
|
|
1114
|
-
parent: ee.value,
|
|
1115
|
-
content: $e.value,
|
|
1116
|
-
isFullscreen: ve.value,
|
|
1117
|
-
isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function",
|
|
1118
|
-
smooth: e.value.style.tooltip.smooth,
|
|
1119
|
-
backdropFilter: e.value.style.tooltip.backdropFilter
|
|
1120
|
-
}, {
|
|
1121
|
-
"tooltip-before": N(() => [
|
|
1122
|
-
E(l.$slots, "tooltip-before", he(fe({ ...Be.value })), void 0, !0)
|
|
1123
|
-
]),
|
|
1124
|
-
"tooltip-after": N(() => [
|
|
1125
|
-
E(l.$slots, "tooltip-after", he(fe({ ...Be.value })), void 0, !0)
|
|
1126
|
-
]),
|
|
1127
|
-
default: N(() => [
|
|
1128
|
-
e.value.style.tooltip.showShape ? (u(), i("div", fa, [
|
|
1129
|
-
(u(), i("svg", pa, [
|
|
1130
|
-
Fe(wt, {
|
|
1131
|
-
shape: f.value.shape,
|
|
1132
|
-
color: f.value.color,
|
|
1133
|
-
plot: { x: 10, y: 10 },
|
|
1134
|
-
radius: 7
|
|
1135
|
-
}, null, 8, ["shape", "color"])
|
|
1136
|
-
]))
|
|
1137
|
-
])) : g("", !0)
|
|
1138
|
-
]),
|
|
1139
|
-
_: 3
|
|
1140
|
-
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
|
|
1141
|
-
Ye.value ? (u(), K(n(Mt), {
|
|
1142
|
-
key: 7,
|
|
1143
|
-
hideDetails: "",
|
|
1144
|
-
config: {
|
|
1145
|
-
open: R.value.showTable,
|
|
1146
|
-
maxHeight: 1e4,
|
|
1147
|
-
body: {
|
|
1148
|
-
backgroundColor: e.value.style.backgroundColor,
|
|
1149
|
-
color: e.value.style.color
|
|
1150
|
-
},
|
|
1151
|
-
head: {
|
|
1152
|
-
backgroundColor: e.value.style.backgroundColor,
|
|
1153
|
-
color: e.value.style.color
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
}, {
|
|
1157
|
-
content: N(() => [
|
|
1158
|
-
(u(), K(n(At), {
|
|
1159
|
-
key: `table_${qe.value}`,
|
|
1160
|
-
colNames: be.value.colNames,
|
|
1161
|
-
head: be.value.head,
|
|
1162
|
-
body: be.value.body,
|
|
1163
|
-
config: be.value.config,
|
|
1164
|
-
title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? ` : ${e.value.style.title.subtitle.text}` : ""}`,
|
|
1165
|
-
onClose: s[1] || (s[1] = (t) => R.value.showTable = !1)
|
|
1166
|
-
}, {
|
|
1167
|
-
th: N(({ th: t }) => [
|
|
1168
|
-
Gt(Y(t), 1)
|
|
1169
|
-
]),
|
|
1170
|
-
td: N(({ td: t }) => [
|
|
1171
|
-
t.shape ? (u(), i("div", ga, [
|
|
1172
|
-
b("span", null, Y(t.content), 1)
|
|
1173
|
-
])) : (u(), i("div", {
|
|
1174
|
-
key: 1,
|
|
1175
|
-
innerHTML: t
|
|
1176
|
-
}, null, 8, ma))
|
|
1177
|
-
]),
|
|
1178
|
-
_: 1
|
|
1179
|
-
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
1180
|
-
]),
|
|
1181
|
-
_: 1
|
|
1182
|
-
}, 8, ["config"])) : g("", !0),
|
|
1183
|
-
n(Je) ? (u(), K(dl, { key: 8 })) : g("", !0)
|
|
1184
|
-
], 46, kl));
|
|
1185
|
-
}
|
|
1186
|
-
}, Pa = /* @__PURE__ */ bl(xa, [["__scopeId", "data-v-5baae5ec"]]);
|
|
1187
|
-
export {
|
|
1188
|
-
Pa as default
|
|
1189
|
-
};
|