vue-data-ui 3.0.20 → 3.0.22
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-C1fRvh9g.js → Arrow-C3_2GkYQ.js} +1 -1
- package/dist/{BaseDraggableDialog-DMhsV373.js → BaseDraggableDialog-BhxUDwEm.js} +2 -2
- package/dist/{BaseIcon-DWAJ7jwb.js → BaseIcon-B717hnWR.js} +1 -1
- package/dist/{ColorPicker-CyexdZFM.js → ColorPicker-CH5_RNaK.js} +2 -2
- package/dist/{DataTable-DQiJu93V.js → DataTable-Y5T9UxMO.js} +2 -2
- package/dist/{Legend-D8Remudy.js → Legend-DkU3at-b.js} +4 -4
- package/dist/{NonSvgPenAndPaper-mtcA1nKZ.js → NonSvgPenAndPaper-DCJGSteM.js} +3 -3
- package/dist/{PackageVersion-DumR2qGe.js → PackageVersion-CE7HSich.js} +1 -1
- package/dist/{PenAndPaper-Cu6GxtQ6.js → PenAndPaper-BMHsOtT8.js} +3 -3
- package/dist/{Shape-DdBsBent.js → Shape-C3J8aKNH.js} +1 -1
- package/dist/{Slicer-DljgQEsA.js → Slicer-BEBDljWA.js} +2 -2
- package/dist/{SparkTooltip-QUBOYZxA.js → SparkTooltip-CVSZQtoP.js} +1 -1
- package/dist/{Title-D7x4zGG0.js → Title-BL-IjQmj.js} +1 -1
- package/dist/{Tooltip-Bsa6EuEm.js → Tooltip-CCnDaboi.js} +1 -1
- package/dist/{UserOptions-DPUL9riB.js → UserOptions-BWMV0_Ze.js} +2 -2
- package/dist/{dom-to-png-tvYSu_tu.js → dom-to-png-DwUGURhV.js} +1 -1
- package/dist/{img-0hGxF-z_.js → img-DsVqerdt.js} +1 -1
- package/dist/{index-DfF9BVIH.js → index-BHb_mcWF.js} +2 -1
- package/dist/{pdf-B0KxeNiX.js → pdf-Ckt8JtYf.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -0
- package/dist/types/vue-data-ui.d.ts +1 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-DL5z_5Cd.js → useAutoSizeLabelsInsideViewbox-Cy946l1e.js} +1 -1
- package/dist/{useNestedProp-hio_vSDF.js → useNestedProp-aC9S6EFJ.js} +1 -1
- package/dist/{usePrinter-GwUP6s4H.js → usePrinter-B7rhbRrT.js} +2 -2
- package/dist/{useTimeLabels-4la0yDx0.js → useTimeLabels-BGFjWgrv.js} +140 -137
- package/dist/{vue-data-ui-CG0uc0kR.js → vue-data-ui-Bu7qDtf0.js} +64 -64
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CnXwUZIv.js → vue-ui-3d-bar-CBfQ3Pcb.js} +6 -6
- package/dist/{vue-ui-accordion-CAS1QxHB.js → vue-ui-accordion-DsnF0JuK.js} +3 -3
- package/dist/{vue-ui-age-pyramid-Dk4PsM4Q.js → vue-ui-age-pyramid-s8xyb3Gf.js} +6 -6
- package/dist/{vue-ui-annotator-C5cJH_OI.js → vue-ui-annotator-DRacM62z.js} +2 -2
- package/dist/{vue-ui-bullet-C4U_ylLQ.js → vue-ui-bullet-DdDrdyOJ.js} +7 -7
- package/dist/{vue-ui-candlestick-CxhAiN5U.js → vue-ui-candlestick-BsNnInNt.js} +8 -8
- package/dist/{vue-ui-carousel-table-DnAiljh3.js → vue-ui-carousel-table-Ci9mrUBd.js} +4 -4
- package/dist/{vue-ui-chestnut-Buv0yvKE.js → vue-ui-chestnut-fHfJNK0V.js} +5 -5
- package/dist/{vue-ui-chord-T67meiPg.js → vue-ui-chord-0wf798ls.js} +8 -8
- package/dist/{vue-ui-circle-pack-D_3lpfLF.js → vue-ui-circle-pack-CuRHG8gr.js} +6 -6
- package/dist/{vue-ui-cursor-BzvPug-A.js → vue-ui-cursor-Bk5LHg5V.js} +2 -2
- package/dist/{vue-ui-dashboard-CL_F4ps9.js → vue-ui-dashboard-CjZMEYs6.js} +62 -62
- package/dist/{vue-ui-digits-hoiK52LV.js → vue-ui-digits-nDIvHyRB.js} +2 -2
- package/dist/{vue-ui-donut-CklK_gWu.js → vue-ui-donut-CF9FdxfC.js} +8 -8
- package/dist/{vue-ui-donut-evolution-DSv3vrSC.js → vue-ui-donut-evolution-f5k-Yu3N.js} +9 -9
- package/dist/{vue-ui-dumbbell-D_x6uKYA.js → vue-ui-dumbbell-Dm3gsrzi.js} +7 -7
- package/dist/{vue-ui-flow-CY-eyF-t.js → vue-ui-flow-K7UBguES.js} +7 -7
- package/dist/{vue-ui-funnel-D2dFWf96.js → vue-ui-funnel-DoDZbsTp.js} +6 -6
- package/dist/{vue-ui-galaxy-dQ4w5UnI.js → vue-ui-galaxy-BsDlHxzE.js} +5 -5
- package/dist/{vue-ui-gauge-qG0d7loE.js → vue-ui-gauge-DkDpUAN7.js} +7 -7
- package/dist/{vue-ui-gizmo-sFJNS_ns.js → vue-ui-gizmo-BD5fLs8r.js} +3 -3
- package/dist/{vue-ui-heatmap-CJf7_Qfe.js → vue-ui-heatmap-DOT2tBy_.js} +8 -8
- package/dist/{vue-ui-history-plot-B0_y082J.js → vue-ui-history-plot-ICoBBO-y.js} +7 -7
- package/dist/{vue-ui-kpi-DoMswQpf.js → vue-ui-kpi-Dp2M2EFo.js} +3 -3
- package/dist/{vue-ui-mini-loader-C7OePX97.js → vue-ui-mini-loader-C5672jjA.js} +2 -2
- package/dist/{vue-ui-molecule-XdL--dz7.js → vue-ui-molecule-DgqVh2k0.js} +5 -5
- package/dist/{vue-ui-mood-radar-CT7IXgK2.js → vue-ui-mood-radar-B-qhYUcB.js} +7 -7
- package/dist/{vue-ui-nested-donuts-c4oPkcOR.js → vue-ui-nested-donuts-V6BvP3pF.js} +7 -7
- package/dist/{vue-ui-onion-D4i0uoIa.js → vue-ui-onion-BKqqbWbg.js} +8 -8
- package/dist/{vue-ui-parallel-coordinate-plot-COuSaI6B.js → vue-ui-parallel-coordinate-plot-BZf24Zur.js} +8 -8
- package/dist/{vue-ui-quadrant-CchBt_6l.js → vue-ui-quadrant-S58B2LrQ.js} +8 -8
- package/dist/{vue-ui-quick-chart-pPlw-TwN.js → vue-ui-quick-chart-BVZSdQeT.js} +7 -7
- package/dist/{vue-ui-radar-9_-UIzMY.js → vue-ui-radar-Dh67mQ9E.js} +8 -8
- package/dist/{vue-ui-rating-B--qyFQ8.js → vue-ui-rating-CncrxDCY.js} +2 -2
- package/dist/{vue-ui-relation-circle-DD-aKvk_.js → vue-ui-relation-circle-VYM1dclx.js} +7 -7
- package/dist/{vue-ui-ridgeline-JGphxcie.js → vue-ui-ridgeline-CsByERvm.js} +9 -9
- package/dist/{vue-ui-rings-DaaFARfn.js → vue-ui-rings-CR2UfgnV.js} +8 -8
- package/dist/vue-ui-scatter-D2b-u5dv.js +1466 -0
- package/dist/{vue-ui-skeleton-xXOE_R9a.js → vue-ui-skeleton-BTuBaaE_.js} +3 -3
- package/dist/{vue-ui-smiley-OJsMggd0.js → vue-ui-smiley-D1UxJNbV.js} +2 -2
- package/dist/{vue-ui-spark-trend-CMKd6oRL.js → vue-ui-spark-trend-BCP0BWMI.js} +3 -3
- package/dist/{vue-ui-sparkbar-By1vDh2m.js → vue-ui-sparkbar-eBo-RSvE.js} +3 -3
- package/dist/{vue-ui-sparkgauge-BkHnYufn.js → vue-ui-sparkgauge-DberOXWX.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-BjG050oU.js → vue-ui-sparkhistogram-CoKQGG5X.js} +4 -4
- package/dist/{vue-ui-sparkline-BZEmzwg5.js → vue-ui-sparkline-B_L4UNES.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-DiZ7159Z.js → vue-ui-sparkstackbar-iAaRIyqb.js} +3 -3
- package/dist/{vue-ui-stackbar-CkMdwfRB.js → vue-ui-stackbar-B_0PJ7R2.js} +10 -10
- package/dist/{vue-ui-strip-plot-EwBZVApZ.js → vue-ui-strip-plot-CWkA4l9P.js} +7 -7
- package/dist/{vue-ui-table-Da7sMO5S.js → vue-ui-table-CILVy7YP.js} +3 -3
- package/dist/{vue-ui-table-heatmap-DJD02Ieo.js → vue-ui-table-heatmap-DL2n2Z7p.js} +5 -5
- package/dist/{vue-ui-table-sparkline-d1MqvDFW.js → vue-ui-table-sparkline-DOt2EKpe.js} +4 -4
- package/dist/{vue-ui-thermometer-BYfo5PLX.js → vue-ui-thermometer-BTP1ic_T.js} +7 -7
- package/dist/{vue-ui-timer-DN72cEDC.js → vue-ui-timer-Bc-zJH9j.js} +5 -5
- package/dist/{vue-ui-tiremarks-DS33hTNC.js → vue-ui-tiremarks-B9n528e1.js} +6 -6
- package/dist/{vue-ui-treemap-C4picIe4.js → vue-ui-treemap-Cl9qo9O-.js} +8 -8
- package/dist/{vue-ui-vertical-bar-C3aCwokO.js → vue-ui-vertical-bar-CK2j09gJ.js} +9 -9
- package/dist/{vue-ui-waffle-DTWUwzDT.js → vue-ui-waffle-DJkqgqlR.js} +8 -8
- package/dist/{vue-ui-wheel-DbBGjZE0.js → vue-ui-wheel-CcbgpIUr.js} +6 -6
- package/dist/{vue-ui-word-cloud-Bk0aUw0d.js → vue-ui-word-cloud-CZ_TRf4o.js} +6 -6
- package/dist/{vue-ui-world-Ca5HZWlH.js → vue-ui-world-DLmB_Z96.js} +6 -6
- package/dist/{vue-ui-xy-hT-KqQhJ.js → vue-ui-xy-KmrNT6qh.js} +10 -10
- package/dist/{vue-ui-xy-canvas-BgGFyKhz.js → vue-ui-xy-canvas-6VYNyX6a.js} +9 -9
- package/package.json +1 -1
- package/dist/vue-ui-scatter-BEuy8BPA.js +0 -1288
|
@@ -0,0 +1,1466 @@
|
|
|
1
|
+
import { defineAsyncComponent as he, computed as W, ref as A, toRefs as tl, watch as Ue, shallowRef as Mt, onMounted as ll, onBeforeUnmount as al, createElementBlock as y, openBlock as r, unref as c, normalizeStyle as se, normalizeClass as At, createBlock as te, createCommentVNode as x, createElementVNode as w, createVNode as Ce, createSlots as ol, withCtx as R, renderSlot as V, normalizeProps as fe, guardReactiveProps as pe, Fragment as H, renderList as K, toDisplayString as G, Teleport as sl, createTextVNode as nl, nextTick as ul } from "vue";
|
|
2
|
+
import { u as il, c as rl, t as vl, a as yl, p as re, b as cl, o as Ct, f as Ge, d as dl, g as St, Y as hl, e as qe, a3 as fl, V as pl, s as Se, X as gl, Z as ml, k as ne, h as q, i as Q, v as xl, w as kl, y as bl, z as wl } from "./index-BHb_mcWF.js";
|
|
3
|
+
import { t as _l, u as $l } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Ml, B as Al } from "./useLoading-D7YHNtLX.js";
|
|
5
|
+
import { u as Cl } from "./usePrinter-B7rhbRrT.js";
|
|
6
|
+
import { u as Lt } from "./useNestedProp-aC9S6EFJ.js";
|
|
7
|
+
import { u as Sl } from "./useUserOptionState-BIvW1Kz7.js";
|
|
8
|
+
import { u as Ll } from "./useChartAccessibility-9icAAmYg.js";
|
|
9
|
+
import Bl from "./Legend-DkU3at-b.js";
|
|
10
|
+
import zl from "./Title-BL-IjQmj.js";
|
|
11
|
+
import { _ as He } from "./Shape-C3J8aKNH.js";
|
|
12
|
+
import Tl from "./img-DsVqerdt.js";
|
|
13
|
+
import { _ as Pl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const El = ["id"], Ol = ["id"], Nl = ["xmlns", "viewBox"], Wl = ["width", "height"], Fl = { key: 1 }, Il = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Xl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Yl = { key: 2 }, Dl = ["id"], Rl = ["stop-color"], Vl = ["stop-color"], jl = ["id"], Ul = ["stop-color"], Gl = ["stop-color"], ql = ["x", "y", "width", "height", "fill", "stroke", "stroke-width", "rx"], Hl = ["x", "y", "width", "height", "onMouseenter"], Zl = {
|
|
15
|
+
key: 2,
|
|
16
|
+
style: { "pointer-events": "none" }
|
|
17
|
+
}, Jl = ["x", "y", "width", "height", "fill", "fill-opacity"], Kl = ["x1", "x2", "y2", "stroke", "stroke-dasharray", "stroke-width"], Ql = ["x1", "x2", "y2", "stroke", "stroke-dasharray", "stroke-width"], ea = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], ta = ["x", "y", "width", "height", "onMouseenter"], la = {
|
|
18
|
+
key: 2,
|
|
19
|
+
style: { "pointer-events": "none" }
|
|
20
|
+
}, aa = ["x", "y", "width", "height", "fill", "fill-opacity"], oa = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], sa = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], na = {
|
|
21
|
+
key: 0,
|
|
22
|
+
style: { "pointer-events": "none" }
|
|
23
|
+
}, ua = ["d", "stroke", "stroke-width"], ia = ["d", "stroke", "stroke-width"], ra = ["d", "stroke", "stroke-width"], va = ["d", "stroke", "stroke-width"], ya = { key: 3 }, ca = ["points", "fill", "stroke-width", "stroke-dasharray", "stroke"], da = { key: 0 }, ha = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseover", "onMouseleave", "onClick"], fa = { key: 1 }, pa = ["clip-path"], ga = ["d", "fill", "stroke", "stroke-width", "stroke-opacity"], ma = {
|
|
24
|
+
key: 0,
|
|
25
|
+
style: { "pointer-events": "none" }
|
|
26
|
+
}, xa = ["x", "y", "width", "height"], ka = {
|
|
27
|
+
key: 6,
|
|
28
|
+
style: { "pointer-events": "none !important" }
|
|
29
|
+
}, ba = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], wa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], _a = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], $a = ["x", "y", "font-size", "fill", "font-weight"], Ma = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Aa = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Ca = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], Sa = ["id", "transform", "font-size", "font-weight", "fill"], La = ["font-size", "fill", "transform"], Ba = ["transform", "font-size", "fill"], za = ["x", "y", "font-size", "fill"], Ta = ["x", "y", "font-size", "fill"], Pa = ["font-size", "font-weight", "fill", "x", "y"], Ea = ["id"], Oa = ["x", "y", "width", "height"], Na = {
|
|
30
|
+
key: 11,
|
|
31
|
+
style: { pointerEvents: "none" }
|
|
32
|
+
}, Wa = ["x1", "x2", "y1", "y2", "stroke-dasharray", "stroke", "stroke-width", "clip-path"], Fa = ["x", "y", "fill", "font-size", "font-weight"], Ia = {
|
|
33
|
+
key: 4,
|
|
34
|
+
class: "vue-data-ui-watermark"
|
|
35
|
+
}, Xa = ["id"], Ya = ["onClick"], Da = {
|
|
36
|
+
key: 0,
|
|
37
|
+
style: { width: "100%", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
38
|
+
}, Ra = {
|
|
39
|
+
viewBox: "0 0 20 20",
|
|
40
|
+
height: "20",
|
|
41
|
+
width: "20",
|
|
42
|
+
style: { overflow: "hidden", background: "transparent" }
|
|
43
|
+
}, Va = { key: 0 }, ja = ["innerHTML"], Ua = {
|
|
44
|
+
__name: "vue-ui-scatter",
|
|
45
|
+
props: {
|
|
46
|
+
config: {
|
|
47
|
+
type: Object,
|
|
48
|
+
default() {
|
|
49
|
+
return {};
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
dataset: {
|
|
53
|
+
type: Array,
|
|
54
|
+
default() {
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
setup(Bt, { expose: zt }) {
|
|
60
|
+
const Tt = he(() => import("./vue-ui-accordion-DsnF0JuK.js")), Pt = he(() => import("./DataTable-Y5T9UxMO.js")), Et = he(() => import("./PackageVersion-CE7HSich.js")), Ot = he(() => import("./PenAndPaper-BMHsOtT8.js")), Nt = he(() => import("./Tooltip-CCnDaboi.js")), Wt = he(() => import("./UserOptions-BWMV0_Ze.js")), { vue_ui_scatter: Ft } = il(), ee = Bt, Ze = W(() => !!ee.dataset && ee.dataset.length), F = A(rl()), It = A(null), Le = A(!1), Be = A(""), Je = A(0), le = A(null), Ke = A(null), Qe = A(null), et = A(null), tt = A(null), lt = A(0), at = A(0), ot = A(0), I = A([]), st = A(!1), ge = A(null), me = A(null), ze = A(null), Xt = A(null), Yt = A(null), Te = A(null), e = A(We());
|
|
61
|
+
function Dt(l = 100, s = 0.8, t = {}) {
|
|
62
|
+
const { meanX: o = 0, sdX: a = 1, meanY: u = 0, sdY: i = 1, seed: f } = t;
|
|
63
|
+
let v = (f ?? Math.floor(Math.random() * 2 ** 31)) >>> 0;
|
|
64
|
+
const g = () => (v = v * 1664525 + 1013904223 >>> 0, v / 2 ** 32), L = () => {
|
|
65
|
+
let m = 0, E = 0;
|
|
66
|
+
for (; m === 0; ) m = g();
|
|
67
|
+
for (; E === 0; ) E = g();
|
|
68
|
+
return Math.sqrt(-2 * Math.log(m)) * Math.cos(2 * Math.PI * E);
|
|
69
|
+
}, d = l / 2, $ = Array.from({ length: d }, L), P = Array.from({ length: d }, L), M = (m) => m.reduce((E, be) => E + be, 0) / m.length, z = M($), X = M(P);
|
|
70
|
+
for (let m = 0; m < d; m += 1)
|
|
71
|
+
$[m] -= z, P[m] -= X;
|
|
72
|
+
const B = (m, E) => m.reduce((be, Ae, je) => be + Ae * E[je], 0), _ = (m) => B(m, m), h = B(P, $) / _($), S = P.map((m, E) => m - h * $[E]), U = _($) / d, J = _(S) / d, oe = Math.sqrt((1 - s * s) * U / J), D = $.map((m, E) => s * m + oe * S[E]), ie = $.concat($.map((m) => -m)), Ve = D.concat(D.map((m) => -m)), xe = (m) => Math.sqrt(_(m) / m.length), ce = (m, E, be) => {
|
|
73
|
+
const Ae = xe(m);
|
|
74
|
+
return m.map((je) => be + (Ae ? je / Ae * E : 0));
|
|
75
|
+
}, de = ce(ie, a, o), ke = ce(Ve, i, u);
|
|
76
|
+
for (let m = de.length - 1; m > 0; m -= 1) {
|
|
77
|
+
const E = Math.floor(g() * (m + 1));
|
|
78
|
+
[de[m], de[E]] = [de[E], de[m]], [ke[m], ke[E]] = [ke[E], ke[m]];
|
|
79
|
+
}
|
|
80
|
+
return de.map((m, E) => ({ x: m, y: ke[E] }));
|
|
81
|
+
}
|
|
82
|
+
const { loading: nt, FINAL_DATASET: Pe, manualLoading: Ee } = Ml({
|
|
83
|
+
...tl(ee),
|
|
84
|
+
FINAL_CONFIG: e,
|
|
85
|
+
prepareConfig: We,
|
|
86
|
+
skeletonDataset: [
|
|
87
|
+
{
|
|
88
|
+
name: "",
|
|
89
|
+
color: "#999999",
|
|
90
|
+
values: Dt(100, 0.5, { seed: 42 })
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
skeletonConfig: vl({
|
|
94
|
+
defaultConfig: e.value,
|
|
95
|
+
userConfig: {
|
|
96
|
+
userOptions: { show: !1 },
|
|
97
|
+
table: { show: !1 },
|
|
98
|
+
useCssAnimation: !1,
|
|
99
|
+
style: {
|
|
100
|
+
backgroundColor: "#99999930",
|
|
101
|
+
layout: {
|
|
102
|
+
axis: {
|
|
103
|
+
stroke: "#6A6A6A"
|
|
104
|
+
},
|
|
105
|
+
correlation: {
|
|
106
|
+
label: { show: !1 }
|
|
107
|
+
},
|
|
108
|
+
dataLabels: {
|
|
109
|
+
xAxis: { show: !1 },
|
|
110
|
+
yAxis: { show: !1 }
|
|
111
|
+
},
|
|
112
|
+
marginalBars: {
|
|
113
|
+
fill: "#99999960"
|
|
114
|
+
},
|
|
115
|
+
padding: { top: 12, right: 12, bottom: 12, left: 12 },
|
|
116
|
+
plots: {
|
|
117
|
+
stroke: "#6A6A6A"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
legend: {
|
|
121
|
+
backgroundColor: "transparent"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
})
|
|
126
|
+
}), { userOptionsVisible: Oe, setUserOptionsVisibility: ut, keepUserOptionState: it } = Sl({ config: e.value }), { svgRef: Ne } = Ll({ config: e.value.style.title });
|
|
127
|
+
function We() {
|
|
128
|
+
const l = Lt({
|
|
129
|
+
userConfig: ee.config,
|
|
130
|
+
defaultConfig: Ft
|
|
131
|
+
});
|
|
132
|
+
return l.theme ? {
|
|
133
|
+
...Lt({
|
|
134
|
+
userConfig: cl.vue_ui_scatter[l.theme] || ee.config,
|
|
135
|
+
defaultConfig: l
|
|
136
|
+
}),
|
|
137
|
+
customPalette: yl[l.theme] || re
|
|
138
|
+
} : l;
|
|
139
|
+
}
|
|
140
|
+
Ue(() => ee.config, (l) => {
|
|
141
|
+
nt.value || (e.value = We()), Oe.value = !e.value.userOptions.showOnChartHover, vt(), lt.value += 1, at.value += 1, ot.value += 1, Z.value.showTable = e.value.table.show, Z.value.showTooltip = e.value.style.tooltip.show, rt.value && e.value.usePerformanceMode && console.warn(`VueUiScatter : You are using performance mode
|
|
142
|
+
|
|
143
|
+
- downsampling is disabled in this mode, all plots are rendered
|
|
144
|
+
|
|
145
|
+
- plot significance is not active in this mode (all plots have the same opacity)
|
|
146
|
+
|
|
147
|
+
- Depending on plot density, shapes might not display a border (stroke) to avoid fuzziness
|
|
148
|
+
|
|
149
|
+
ℹ️ To remove this warning, set config.debug to false.`);
|
|
150
|
+
}, { deep: !0 }), Ue(() => ee.dataset, (l) => {
|
|
151
|
+
Array.isArray(l) && l.length > 0 && (Ee.value = !1);
|
|
152
|
+
}, { deep: !0 });
|
|
153
|
+
const ae = Mt(null), ve = Mt(null);
|
|
154
|
+
ll(() => {
|
|
155
|
+
st.value = !0, vt();
|
|
156
|
+
});
|
|
157
|
+
const rt = W(() => !!e.value.debug);
|
|
158
|
+
function vt() {
|
|
159
|
+
if (Ct(ee.dataset) && (Ge({
|
|
160
|
+
componentName: "VueUiScatter",
|
|
161
|
+
type: "dataset",
|
|
162
|
+
debug: rt.value
|
|
163
|
+
}), Ee.value = !0), Ct(ee.dataset) || (Ee.value = e.value.loading), e.value.responsive) {
|
|
164
|
+
const l = _l(() => {
|
|
165
|
+
const { width: s, height: t } = $l({
|
|
166
|
+
chart: le.value,
|
|
167
|
+
title: e.value.style.title.text ? Ke.value : null,
|
|
168
|
+
legend: e.value.style.legend.show ? Qe.value : null,
|
|
169
|
+
source: et.value,
|
|
170
|
+
noTitle: tt.value
|
|
171
|
+
});
|
|
172
|
+
requestAnimationFrame(() => {
|
|
173
|
+
O.value.width = s, O.value.height = t;
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
ae.value && (ve.value && ae.value.unobserve(ve.value), ae.value.disconnect()), ae.value = new ResizeObserver(l), ve.value = le.value.parentNode, ae.value.observe(ve.value);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
al(() => {
|
|
180
|
+
ae.value && (ve.value && ae.value.unobserve(ve.value), ae.value.disconnect());
|
|
181
|
+
});
|
|
182
|
+
const { isPrinting: yt, isImaging: ct, generatePdf: dt, generateImage: ht } = Cl({
|
|
183
|
+
elementId: `vue-ui-scatter_${F.value}`,
|
|
184
|
+
fileName: e.value.style.title.text || "vue-ui-scatter",
|
|
185
|
+
options: e.value.userOptions.print
|
|
186
|
+
}), Rt = W(() => e.value.userOptions.show && !e.value.style.title.text), ft = W(() => dl(e.value.customPalette)), Z = A({
|
|
187
|
+
showTable: e.value.table.show,
|
|
188
|
+
showTooltip: e.value.style.tooltip.show
|
|
189
|
+
});
|
|
190
|
+
Ue(e, () => {
|
|
191
|
+
Z.value = {
|
|
192
|
+
showTable: e.value.table.show,
|
|
193
|
+
showTooltip: e.value.style.tooltip.show
|
|
194
|
+
};
|
|
195
|
+
}, { immediate: !0 });
|
|
196
|
+
const O = A({
|
|
197
|
+
height: e.value.style.layout.height,
|
|
198
|
+
width: e.value.style.layout.width
|
|
199
|
+
}), we = W(() => e.value.style.layout.marginalBars.show ? e.value.style.layout.marginalBars.size + e.value.style.layout.marginalBars.offset : 0), n = W(() => {
|
|
200
|
+
let l = 0, s = 0;
|
|
201
|
+
return ze.value && (l = ze.value.getBBox().width + 6), Te.value && (s = Te.value.getBBox().height + 6), {
|
|
202
|
+
top: e.value.style.layout.padding.top + we.value + e.value.style.layout.dataLabels.yAxis.fontSize * 2,
|
|
203
|
+
right: O.value.width - e.value.style.layout.padding.right - we.value - 6,
|
|
204
|
+
bottom: O.value.height - e.value.style.layout.padding.bottom - s,
|
|
205
|
+
left: e.value.style.layout.padding.left + l,
|
|
206
|
+
height: O.value.height - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom - we.value - s - e.value.style.layout.dataLabels.yAxis.fontSize * 2,
|
|
207
|
+
width: O.value.width - e.value.style.layout.padding.left - e.value.style.layout.padding.right - we.value - l - 6
|
|
208
|
+
};
|
|
209
|
+
}), T = W(() => {
|
|
210
|
+
Pe.value.forEach((a, u) => {
|
|
211
|
+
St({
|
|
212
|
+
datasetObject: a,
|
|
213
|
+
requiredAttributes: ["values"]
|
|
214
|
+
}).forEach((i) => {
|
|
215
|
+
Ge({
|
|
216
|
+
componentName: "VueUiScatter",
|
|
217
|
+
type: "datasetSerieAttribute",
|
|
218
|
+
property: i,
|
|
219
|
+
index: u
|
|
220
|
+
});
|
|
221
|
+
}), a.values && a.values.forEach((i, f) => {
|
|
222
|
+
St({
|
|
223
|
+
datasetObject: i,
|
|
224
|
+
requiredAttributes: ["x", "y"]
|
|
225
|
+
}).forEach((v) => {
|
|
226
|
+
Ge({
|
|
227
|
+
componentName: "VueUiScatter",
|
|
228
|
+
type: "datasetSerieAttribute",
|
|
229
|
+
property: `values.${v}`,
|
|
230
|
+
index: `${u} - ${f}`
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
const l = Math.min(...ue.value.filter((a) => !I.value.includes(a.id)).flatMap((a) => a.values.map((u) => u.x))), s = Math.max(...ue.value.filter((a) => !I.value.includes(a.id)).flatMap((a) => a.values.map((u) => u.x))), t = Math.min(...ue.value.filter((a) => !I.value.includes(a.id)).flatMap((a) => a.values.map((u) => u.y))), o = Math.max(...ue.value.filter((a) => !I.value.includes(a.id)).flatMap((a) => a.values.map((u) => u.y)));
|
|
236
|
+
return { xMin: l >= 0 ? 0 : l, xMax: s, yMin: t >= 0 ? 0 : t, yMax: o };
|
|
237
|
+
}), N = W(() => ({
|
|
238
|
+
x: n.value.left + Math.abs(T.value.xMin) / (T.value.xMax + Math.abs(T.value.xMin)) * n.value.width,
|
|
239
|
+
y: n.value.bottom - Math.abs(T.value.yMin) / (T.value.yMax + Math.abs(T.value.yMin)) * n.value.height
|
|
240
|
+
})), ue = W(() => Pe.value.map((l, s) => {
|
|
241
|
+
const t = `cluster_${F.value}_${s}`;
|
|
242
|
+
return {
|
|
243
|
+
...l,
|
|
244
|
+
values: hl({
|
|
245
|
+
data: l.values,
|
|
246
|
+
threshold: e.value.usePerformanceMode ? l.values.length + 1 : e.value.downsample.threshold
|
|
247
|
+
}),
|
|
248
|
+
id: t,
|
|
249
|
+
color: l.color ? l.color : ft.value[s] || re[s] || re[s % re.length],
|
|
250
|
+
opacity: I.value.includes(t) ? 0.5 : 1,
|
|
251
|
+
shape: l.shape ?? "circle",
|
|
252
|
+
segregate: () => mt(t),
|
|
253
|
+
isSegregated: I.value.includes(t)
|
|
254
|
+
};
|
|
255
|
+
})), Vt = W(() => ({
|
|
256
|
+
cy: "scatter-div-legend",
|
|
257
|
+
backgroundColor: e.value.style.legend.backgroundColor,
|
|
258
|
+
color: e.value.style.legend.color,
|
|
259
|
+
fontSize: e.value.style.legend.fontSize,
|
|
260
|
+
paddingBottom: 12,
|
|
261
|
+
fontWeight: e.value.style.legend.bold ? "bold" : ""
|
|
262
|
+
})), Fe = W(() => ue.value.map((l, s) => ({
|
|
263
|
+
...l,
|
|
264
|
+
plots: l.values.map((t) => ({
|
|
265
|
+
x: n.value.left + (t.x + Math.abs(T.value.xMin)) / (T.value.xMax + Math.abs(T.value.xMin)) * n.value.width,
|
|
266
|
+
y: n.value.bottom - (t.y + Math.abs(T.value.yMin)) / (T.value.yMax + Math.abs(T.value.yMin)) * n.value.height,
|
|
267
|
+
v: {
|
|
268
|
+
...t,
|
|
269
|
+
name: t.name || ""
|
|
270
|
+
},
|
|
271
|
+
clusterName: l.name,
|
|
272
|
+
color: l.color ? l.color : ft.value[s] || re[s] || re[s % re.length],
|
|
273
|
+
id: `plot_${F.value}_${Math.random()}`,
|
|
274
|
+
weight: t.weight ?? e.value.style.layout.plots.radius
|
|
275
|
+
}))
|
|
276
|
+
})).filter((l) => !I.value.includes(l.id))), j = W(() => {
|
|
277
|
+
const s = ({ m: t, b: o, rect: a, verticalX: u = null }) => {
|
|
278
|
+
const { left: i, right: f, top: v, bottom: g } = a, L = [], d = (_, h) => {
|
|
279
|
+
Number.isFinite(_) && Number.isFinite(h) && L.push({ x: _, y: h });
|
|
280
|
+
}, $ = ({ x: _, y: h }) => _ >= i - 1e-9 && _ <= f + 1e-9 && h >= v - 1e-9 && h <= g + 1e-9;
|
|
281
|
+
u !== null ? u >= i - 1e-9 && u <= f + 1e-9 && (d(u, v), d(u, g)) : Number.isFinite(t) && (d(i, t * i + o), d(f, t * f + o), Math.abs(t) > 1e-9 ? (d((v - o) / t, v), d((g - o) / t, g)) : o >= v - 1e-9 && o <= g + 1e-9 && (d(i, o), d(f, o)));
|
|
282
|
+
const P = L.filter($), M = [];
|
|
283
|
+
for (const _ of P)
|
|
284
|
+
M.some((h) => Math.abs(h.x - _.x) < 1e-6 && Math.abs(h.y - _.y) < 1e-6) || M.push(_);
|
|
285
|
+
if (M.length < 2) return null;
|
|
286
|
+
let z = M[0], X = M[1], B = 0;
|
|
287
|
+
for (let _ = 0; _ < M.length; _ += 1)
|
|
288
|
+
for (let h = _ + 1; h < M.length; h += 1) {
|
|
289
|
+
const S = M[_].x - M[h].x, U = M[_].y - M[h].y, J = S * S + U * U;
|
|
290
|
+
J > B && (B = J, z = M[_], X = M[h]);
|
|
291
|
+
}
|
|
292
|
+
return { x1: z.x, y1: z.y, x2: X.x, y2: X.y };
|
|
293
|
+
};
|
|
294
|
+
return Fe.value.map((t) => {
|
|
295
|
+
const o = t.plots.length, a = t.plots.reduce((h, S) => h + S.x, 0) / o, u = t.plots.reduce((h, S) => h + S.y, 0) / o;
|
|
296
|
+
let i = 0, f = 0;
|
|
297
|
+
for (const h of t.plots) {
|
|
298
|
+
const S = h.x - a, U = h.y - u;
|
|
299
|
+
i += S * U, f += S * S;
|
|
300
|
+
}
|
|
301
|
+
let v, g, L = null;
|
|
302
|
+
f < 1e-9 ? (L = a, v = 1 / 0, g = null) : (v = i / f, g = u - v * a);
|
|
303
|
+
let d, $;
|
|
304
|
+
L !== null ? (d = 1 / 0, $ = null) : (d = v, $ = g);
|
|
305
|
+
const P = t.plots.every((h) => h.v && typeof h.v.x == "number" && typeof h.v.y == "number");
|
|
306
|
+
let M = NaN;
|
|
307
|
+
if (o >= 2) {
|
|
308
|
+
let h = 0, S = 0;
|
|
309
|
+
P ? (h = t.plots.reduce((D, ie) => D + ie.v.x, 0) / o, S = t.plots.reduce((D, ie) => D + ie.v.y, 0) / o) : (h = a, S = -u);
|
|
310
|
+
let U = 0, J = 0, oe = 0;
|
|
311
|
+
for (const D of t.plots) {
|
|
312
|
+
const ie = P ? D.v.x : D.x, Ve = P ? D.v.y : -D.y, xe = ie - h, ce = Ve - S;
|
|
313
|
+
U += xe * ce, J += xe * xe, oe += ce * ce;
|
|
314
|
+
}
|
|
315
|
+
if (J >= 1e-9 && oe >= 1e-9) {
|
|
316
|
+
const D = U / Math.sqrt(J * oe);
|
|
317
|
+
M = Math.max(-1, Math.min(1, D));
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
const z = s({ m: d, b: $, rect: n.value, verticalX: L });
|
|
321
|
+
if (!z)
|
|
322
|
+
return {
|
|
323
|
+
...t,
|
|
324
|
+
correlation: null,
|
|
325
|
+
label: null,
|
|
326
|
+
plots: t.plots.map((h) => ({
|
|
327
|
+
...h,
|
|
328
|
+
deviation: 0,
|
|
329
|
+
shape: t.shape,
|
|
330
|
+
color: qe(t.color)
|
|
331
|
+
}))
|
|
332
|
+
};
|
|
333
|
+
const X = (z.x1 + z.x2) / 2, B = (z.y1 + z.y2) / 2, _ = { x: X, y: B };
|
|
334
|
+
return {
|
|
335
|
+
...t,
|
|
336
|
+
color: qe(t.color),
|
|
337
|
+
correlation: {
|
|
338
|
+
...z,
|
|
339
|
+
coefficient: M
|
|
340
|
+
},
|
|
341
|
+
label: _,
|
|
342
|
+
plots: t.plots.map((h) => {
|
|
343
|
+
let S, U;
|
|
344
|
+
L !== null ? (S = L, U = h.y) : Math.abs(d) < 1e-9 ? (S = h.x, U = $) : (S = (h.x + d * h.y - d * $) / (1 + d * d), U = (d * h.x + d * d * h.y + $) / (1 + d * d));
|
|
345
|
+
const J = h.x - S, oe = h.y - U, D = Math.sqrt(J * J + oe * oe);
|
|
346
|
+
return {
|
|
347
|
+
...h,
|
|
348
|
+
deviation: D,
|
|
349
|
+
shape: t.shape,
|
|
350
|
+
color: qe(t.color)
|
|
351
|
+
};
|
|
352
|
+
})
|
|
353
|
+
};
|
|
354
|
+
});
|
|
355
|
+
}), pt = W(() => Math.max(...j.value.flatMap((l) => l.plots.map((s) => Math.abs(s.deviation)))));
|
|
356
|
+
function jt() {
|
|
357
|
+
return j.value;
|
|
358
|
+
}
|
|
359
|
+
function gt(l, s) {
|
|
360
|
+
const t = Array.isArray(l) ? l.flatMap((B) => B.plots.map((_) => ({
|
|
361
|
+
x: _.x,
|
|
362
|
+
y: _.y
|
|
363
|
+
}))) : l.plots.map((B) => ({
|
|
364
|
+
x: B.x,
|
|
365
|
+
y: B.y
|
|
366
|
+
}));
|
|
367
|
+
let o = 1 / 0, a = -1 / 0, u = 1 / 0, i = -1 / 0;
|
|
368
|
+
t.forEach(({ x: B, y: _ }) => {
|
|
369
|
+
o = Math.min(o, B), a = Math.max(a, B), u = Math.min(u, _), i = Math.max(i, _);
|
|
370
|
+
});
|
|
371
|
+
const f = a - o, v = i - u, g = f / s, L = v / s, d = Array(s).fill(0), $ = Array(s).fill(0);
|
|
372
|
+
t.forEach(({ x: B, y: _ }) => {
|
|
373
|
+
const h = Math.floor((B - o) / g), S = Math.floor((_ - u) / L);
|
|
374
|
+
d[h] || (d[h] = 0), $[S] || ($[S] = 0), d[h] += 1, $[S] += 1;
|
|
375
|
+
});
|
|
376
|
+
const P = [], M = [];
|
|
377
|
+
for (let B = 0; B < s; B += 1)
|
|
378
|
+
P.push(o + (B + 0.5) * g), M.push(u + (B + 0.5) * L);
|
|
379
|
+
const z = Math.max(...d), X = Math.max(...$);
|
|
380
|
+
return { x: d, y: $, avgX: P, avgY: M, maxX: z, maxY: X };
|
|
381
|
+
}
|
|
382
|
+
const k = W(() => e.value.style.layout.marginalBars.tranches), C = W(() => gt(Fe.value, k.value)), Ut = W(() => {
|
|
383
|
+
const l = n.value.top - e.value.style.layout.marginalBars.offset, s = n.value.right + e.value.style.layout.marginalBars.offset;
|
|
384
|
+
return Fe.value.map((t) => {
|
|
385
|
+
const o = gt(t, k.value);
|
|
386
|
+
return {
|
|
387
|
+
coords: o,
|
|
388
|
+
dX: pl(o.avgX.map((a, u) => ({
|
|
389
|
+
x: a,
|
|
390
|
+
y: l - o.x[u] / o.maxX * e.value.style.layout.marginalBars.size
|
|
391
|
+
}))),
|
|
392
|
+
dY: fl(o.avgY.map((a, u) => ({
|
|
393
|
+
y: a,
|
|
394
|
+
x: s + e.value.style.layout.marginalBars.size * o.y[u] / o.maxY
|
|
395
|
+
}))),
|
|
396
|
+
color: t.color,
|
|
397
|
+
id: t.id
|
|
398
|
+
};
|
|
399
|
+
});
|
|
400
|
+
}), Y = A(void 0), p = A(null), Ie = A(null);
|
|
401
|
+
function Xe(l, s) {
|
|
402
|
+
Y.value = l.id, p.value = l;
|
|
403
|
+
let t = "";
|
|
404
|
+
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: l, seriesIndex: s }), Ie.value = {
|
|
405
|
+
datapoint: l,
|
|
406
|
+
seriesIndex: s,
|
|
407
|
+
series: j.value,
|
|
408
|
+
config: e.value
|
|
409
|
+
};
|
|
410
|
+
const o = e.value.style.tooltip.customFormat;
|
|
411
|
+
bl(o) && wl(() => o({
|
|
412
|
+
datapoint: l,
|
|
413
|
+
seriesIndex: s,
|
|
414
|
+
series: j.value,
|
|
415
|
+
config: e.value
|
|
416
|
+
})) ? Be.value = o({
|
|
417
|
+
datapoint: l,
|
|
418
|
+
seriesIndex: s,
|
|
419
|
+
series: j.value,
|
|
420
|
+
config: e.value
|
|
421
|
+
}) : (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) ? "-" : ne(
|
|
422
|
+
e.value.style.layout.plots.selectors.labels.x.formatter,
|
|
423
|
+
l.v.x,
|
|
424
|
+
Q({
|
|
425
|
+
p: e.value.style.tooltip.prefix,
|
|
426
|
+
v: l.v.x,
|
|
427
|
+
s: e.value.style.tooltip.suffix,
|
|
428
|
+
r: e.value.style.tooltip.roundingValue
|
|
429
|
+
}),
|
|
430
|
+
{ datapoint: l, seriesIndex: s }
|
|
431
|
+
)}</b></div>`, t += `<div>${e.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(l.v.y) ? "-" : ne(
|
|
432
|
+
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
433
|
+
l.v.y,
|
|
434
|
+
Q({
|
|
435
|
+
p: e.value.style.tooltip.prefix,
|
|
436
|
+
v: l.v.y,
|
|
437
|
+
s: e.value.style.tooltip.suffix,
|
|
438
|
+
r: e.value.style.tooltip.roundingValue
|
|
439
|
+
}),
|
|
440
|
+
{ datapoint: l, seriesIndex: s }
|
|
441
|
+
)}</b></div>`, t += `${e.value.style.layout.plots.deviation.translation}: <b>${Q({
|
|
442
|
+
v: l.deviation,
|
|
443
|
+
r: e.value.style.layout.plots.deviation.roundingValue
|
|
444
|
+
})}</b>`, t += "</div>", Be.value = `<div>${t}</div>`), Le.value = !0;
|
|
445
|
+
}
|
|
446
|
+
function _e(l, s) {
|
|
447
|
+
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: s }), Le.value = !1, Y.value = void 0, p.value = null;
|
|
448
|
+
}
|
|
449
|
+
function Ye(l, s) {
|
|
450
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: s });
|
|
451
|
+
}
|
|
452
|
+
function mt(l) {
|
|
453
|
+
I.value.includes(l) ? I.value = I.value.filter((s) => s !== l) : I.value.length < Pe.value.length - 1 && I.value.push(l);
|
|
454
|
+
}
|
|
455
|
+
function xt(l = null) {
|
|
456
|
+
ul(() => {
|
|
457
|
+
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((u) => [
|
|
458
|
+
u.name,
|
|
459
|
+
u.correlation.coefficient,
|
|
460
|
+
u.plots.length,
|
|
461
|
+
u.plots.map((i) => i.v.x).reduce((i, f) => i + f, 0) / u.plots.length,
|
|
462
|
+
u.plots.map((i) => i.v.y).reduce((i, f) => i + f, 0) / u.plots.length
|
|
463
|
+
]), o = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([s]).concat(t), a = xl(o);
|
|
464
|
+
l ? l(a) : kl({ csvContent: a, title: e.value.style.title.text || "vue-ui-heatmap" });
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
const $e = W(() => {
|
|
468
|
+
const l = [
|
|
469
|
+
e.value.table.translations.series,
|
|
470
|
+
e.value.table.translations.correlationCoefficient,
|
|
471
|
+
e.value.table.translations.nbrPlots,
|
|
472
|
+
`${e.value.style.layout.dataLabels.xAxis.name} ${e.value.table.translations.average}`,
|
|
473
|
+
`${e.value.style.layout.dataLabels.yAxis.name} ${e.value.table.translations.average}`
|
|
474
|
+
], s = j.value.map((o) => [
|
|
475
|
+
{
|
|
476
|
+
shape: o.shape,
|
|
477
|
+
content: o.name,
|
|
478
|
+
color: o.color
|
|
479
|
+
},
|
|
480
|
+
Number((o.correlation.coefficient ?? 0).toFixed(e.value.table.td.roundingValue)).toLocaleString(),
|
|
481
|
+
o.plots.length.toLocaleString(),
|
|
482
|
+
Number((o.plots.map((a) => a.v.x ?? 0).reduce((a, u) => a + u, 0) / o.plots.length).toFixed(e.value.table.td.roundingAverage)).toLocaleString(),
|
|
483
|
+
Number((o.plots.map((a) => a.v.y ?? 0).reduce((a, u) => a + u, 0) / o.plots.length).toFixed(e.value.table.td.roundingAverage)).toLocaleString()
|
|
484
|
+
]), t = {
|
|
485
|
+
th: {
|
|
486
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
487
|
+
color: e.value.table.th.color,
|
|
488
|
+
outline: e.value.table.th.outline
|
|
489
|
+
},
|
|
490
|
+
td: {
|
|
491
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
492
|
+
color: e.value.table.td.color,
|
|
493
|
+
outline: e.value.table.td.outline
|
|
494
|
+
},
|
|
495
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
496
|
+
};
|
|
497
|
+
return { head: l, body: s, config: t, colNames: l };
|
|
498
|
+
}), ye = A(!1);
|
|
499
|
+
function kt(l) {
|
|
500
|
+
ye.value = l, Je.value += 1;
|
|
501
|
+
}
|
|
502
|
+
function bt() {
|
|
503
|
+
Z.value.showTable = !Z.value.showTable;
|
|
504
|
+
}
|
|
505
|
+
function wt() {
|
|
506
|
+
Z.value.showTooltip = !Z.value.showTooltip;
|
|
507
|
+
}
|
|
508
|
+
const Me = A(!1);
|
|
509
|
+
function De() {
|
|
510
|
+
Me.value = !Me.value;
|
|
511
|
+
}
|
|
512
|
+
async function Gt({ scale: l = 2 } = {}) {
|
|
513
|
+
if (!le.value) return;
|
|
514
|
+
const { width: s, height: t } = le.value.getBoundingClientRect(), o = s / t, { imageUri: a, base64: u } = await Tl({ domElement: le.value, base64: !0, img: !0, scale: l });
|
|
515
|
+
return {
|
|
516
|
+
imageUri: a,
|
|
517
|
+
base64: u,
|
|
518
|
+
title: e.value.style.title.text,
|
|
519
|
+
width: s,
|
|
520
|
+
height: t,
|
|
521
|
+
aspectRatio: o
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
function qt(l) {
|
|
525
|
+
ge.value = l, e.value.style.layout.marginalBars.highlighter.highlightBothAxes && (me.value = C.value.y.length - 2 - l);
|
|
526
|
+
}
|
|
527
|
+
function Ht(l) {
|
|
528
|
+
me.value = l, e.value.style.layout.marginalBars.highlighter.highlightBothAxes && (ge.value = l);
|
|
529
|
+
}
|
|
530
|
+
function Re() {
|
|
531
|
+
ge.value = null, me.value = null;
|
|
532
|
+
}
|
|
533
|
+
const _t = {
|
|
534
|
+
circle: 1,
|
|
535
|
+
square: 1,
|
|
536
|
+
diamond: 1,
|
|
537
|
+
triangle: 1.2,
|
|
538
|
+
star: 1.3,
|
|
539
|
+
pentagon: 1.3,
|
|
540
|
+
hexagon: 1.3
|
|
541
|
+
}, b = (l) => l.toFixed(3);
|
|
542
|
+
function Zt({ shape: l = "circle", cx: s, cy: t, r: o }) {
|
|
543
|
+
if (!e.value.usePerformanceMode) return "";
|
|
544
|
+
const a = _t[l] * o;
|
|
545
|
+
switch (l) {
|
|
546
|
+
case "circle": {
|
|
547
|
+
const u = b(s - a), i = b(t), f = b(s + a), v = b(a);
|
|
548
|
+
return `M ${u} ${i} A ${v} ${v} 0 1 0 ${f} ${i} A ${v} ${v} 0 1 0 ${u} ${i} Z`;
|
|
549
|
+
}
|
|
550
|
+
case "square": {
|
|
551
|
+
const u = b(s - a), i = b(t - a), f = b(s + a), v = b(t + a);
|
|
552
|
+
return `M ${u} ${i} L ${f} ${i} L ${f} ${v} L ${u} ${v} Z`;
|
|
553
|
+
}
|
|
554
|
+
case "diamond": {
|
|
555
|
+
const u = b(s), i = b(t);
|
|
556
|
+
return `M ${u} ${b(t - a)} L ${b(s + a)} ${i} L ${u} ${b(t + a)} L ${b(s - a)} ${i} Z`;
|
|
557
|
+
}
|
|
558
|
+
case "triangle": {
|
|
559
|
+
const u = a * Math.sqrt(3), i = s, f = t - 2 / 3 * u, v = s - a, g = t + 1 / 3 * u, L = s + a, d = g;
|
|
560
|
+
return `M ${b(i)} ${b(f)} L ${b(v)} ${b(g)} L ${b(L)} ${b(d)} Z`;
|
|
561
|
+
}
|
|
562
|
+
case "star": {
|
|
563
|
+
const u = a, i = a * 0.5, f = [];
|
|
564
|
+
for (let g = 0; g < 10; g += 1) {
|
|
565
|
+
const L = (-90 + g * 36) * Math.PI / 180, d = g % 2 === 0 ? u : i;
|
|
566
|
+
f.push([s + d * Math.cos(L), t + d * Math.sin(L)]);
|
|
567
|
+
}
|
|
568
|
+
let v = `M ${b(f[0][0])} ${b(f[0][1])}`;
|
|
569
|
+
for (let g = 1; g < f.length; g += 1)
|
|
570
|
+
v += ` L ${b(f[g][0])} ${b(f[g][1])}`;
|
|
571
|
+
return v + " Z";
|
|
572
|
+
}
|
|
573
|
+
case "pentagon": {
|
|
574
|
+
const i = [];
|
|
575
|
+
for (let v = 0; v < 5; v += 1) {
|
|
576
|
+
const g = (-90 + v * 72) * Math.PI / 180;
|
|
577
|
+
i.push([s + a * Math.cos(g), t + a * Math.sin(g)]);
|
|
578
|
+
}
|
|
579
|
+
let f = `M ${b(i[0][0])} ${b(i[0][1])}`;
|
|
580
|
+
for (let v = 1; v < 5; v += 1) f += ` L ${b(i[v][0])} ${b(i[v][1])}`;
|
|
581
|
+
return f + " Z";
|
|
582
|
+
}
|
|
583
|
+
case "hexagon": {
|
|
584
|
+
const i = [];
|
|
585
|
+
for (let v = 0; v < 6; v += 1) {
|
|
586
|
+
const g = (-60 + v * 60) * Math.PI / 180;
|
|
587
|
+
i.push([s + a * Math.cos(g), t + a * Math.sin(g)]);
|
|
588
|
+
}
|
|
589
|
+
let f = `M ${b(i[0][0])} ${b(i[0][1])}`;
|
|
590
|
+
for (let v = 1; v < 6; v += 1) f += ` L ${b(i[v][0])} ${b(i[v][1])}`;
|
|
591
|
+
return f + " Z";
|
|
592
|
+
}
|
|
593
|
+
default: {
|
|
594
|
+
const u = b(s - a), i = b(t), f = b(s + a), v = b(a);
|
|
595
|
+
return `M ${u} ${i} A ${v} ${v} 0 1 0 ${f} ${i} A ${v} ${v} 0 1 0 ${u} ${i} Z`;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
const Jt = W(() => {
|
|
600
|
+
if (!e.value.usePerformanceMode) return [""];
|
|
601
|
+
const { left: l, right: s, top: t, bottom: o } = n.value, a = Math.max(1, (s - l) * (o - t)), u = (d) => d / a * 1e4, i = 2.5, f = 1e3, v = e.value.style.layout.plots.stroke, g = e.value.style.layout.plots.strokeWidth, L = e.value.style.layout.plots.opacity;
|
|
602
|
+
return j.value.map((d) => {
|
|
603
|
+
const $ = [];
|
|
604
|
+
for (const M of d.plots) {
|
|
605
|
+
const z = M.x, X = M.y;
|
|
606
|
+
if (z < l || z > s || X < t || X > o) continue;
|
|
607
|
+
const B = Math.max(e.value.style.layout.plots.radius, M.weight);
|
|
608
|
+
$.push(Zt({
|
|
609
|
+
shape: d.shape || "circle",
|
|
610
|
+
cx: z,
|
|
611
|
+
cy: X,
|
|
612
|
+
r: B
|
|
613
|
+
}));
|
|
614
|
+
}
|
|
615
|
+
if (!$.length) return null;
|
|
616
|
+
const P = u(d.plots.length) > i || d.plots.length > f;
|
|
617
|
+
return {
|
|
618
|
+
id: d.id,
|
|
619
|
+
d: $.join(""),
|
|
620
|
+
fill: Se(d.color, L * 100),
|
|
621
|
+
stroke: P ? "none" : v,
|
|
622
|
+
strokeWidth: P ? 0 : g,
|
|
623
|
+
strokeOpacity: 1
|
|
624
|
+
};
|
|
625
|
+
}).filter(Boolean);
|
|
626
|
+
});
|
|
627
|
+
function Kt() {
|
|
628
|
+
return e.value.usePerformanceMode ? (l) => {
|
|
629
|
+
const s = Ne.value;
|
|
630
|
+
if (!s) return;
|
|
631
|
+
const t = s.createSVGPoint();
|
|
632
|
+
t.x = l.clientX, t.y = l.clientY;
|
|
633
|
+
const o = s.getScreenCTM();
|
|
634
|
+
if (!o) return;
|
|
635
|
+
const a = o.inverse(), u = t.matrixTransform(a), i = 8, f = i * i;
|
|
636
|
+
let v = null, g = 1 / 0, L = -1;
|
|
637
|
+
if (j.value.forEach((d, $) => {
|
|
638
|
+
d.plots.forEach((P) => {
|
|
639
|
+
const M = P.x - u.x, z = P.y - u.y, X = M * M + z * z;
|
|
640
|
+
X <= f && X < g && (g = X, v = P, L = $);
|
|
641
|
+
});
|
|
642
|
+
}), v)
|
|
643
|
+
Y.value !== v.id && (Y.value = v.id, Xe(v, L));
|
|
644
|
+
else if (Y.value) {
|
|
645
|
+
const d = p.value;
|
|
646
|
+
Y.value = void 0, _e(d, L);
|
|
647
|
+
}
|
|
648
|
+
} : () => null;
|
|
649
|
+
}
|
|
650
|
+
const $t = Kt();
|
|
651
|
+
function Qt() {
|
|
652
|
+
if (Y.value) {
|
|
653
|
+
const l = p.value;
|
|
654
|
+
Y.value = void 0, _e(l, null);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
function el(l) {
|
|
658
|
+
const s = p.value;
|
|
659
|
+
if (s) {
|
|
660
|
+
const t = j.value.findIndex((o) => o.id === s.clusterId);
|
|
661
|
+
Ye(s, t >= 0 ? t : 0);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
return zt({
|
|
665
|
+
getData: jt,
|
|
666
|
+
getImage: Gt,
|
|
667
|
+
generatePdf: dt,
|
|
668
|
+
generateCsv: xt,
|
|
669
|
+
generateImage: ht,
|
|
670
|
+
toggleTable: bt,
|
|
671
|
+
toggleTooltip: wt,
|
|
672
|
+
toggleAnnotator: De,
|
|
673
|
+
toggleFullscreen: kt
|
|
674
|
+
}), (l, s) => (r(), y("div", {
|
|
675
|
+
class: At(`vue-ui-scatter ${ye.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
676
|
+
ref_key: "scatterChart",
|
|
677
|
+
ref: le,
|
|
678
|
+
id: `vue-ui-scatter_${F.value}`,
|
|
679
|
+
style: se(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
|
|
680
|
+
onMouseenter: s[5] || (s[5] = () => c(ut)(!0)),
|
|
681
|
+
onMouseleave: s[6] || (s[6] = () => c(ut)(!1))
|
|
682
|
+
}, [
|
|
683
|
+
e.value.userOptions.buttons.annotator ? (r(), te(c(Ot), {
|
|
684
|
+
key: 0,
|
|
685
|
+
svgRef: c(Ne),
|
|
686
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
687
|
+
color: e.value.style.color,
|
|
688
|
+
active: Me.value,
|
|
689
|
+
onClose: De
|
|
690
|
+
}, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : x("", !0),
|
|
691
|
+
Rt.value ? (r(), y("div", {
|
|
692
|
+
key: 1,
|
|
693
|
+
ref_key: "noTitle",
|
|
694
|
+
ref: tt,
|
|
695
|
+
class: "vue-data-ui-no-title-space",
|
|
696
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
697
|
+
}, null, 512)) : x("", !0),
|
|
698
|
+
e.value.style.title.text ? (r(), y("div", {
|
|
699
|
+
key: 2,
|
|
700
|
+
ref_key: "chartTitle",
|
|
701
|
+
ref: Ke,
|
|
702
|
+
style: "width:100%;background:transparent"
|
|
703
|
+
}, [
|
|
704
|
+
(r(), te(zl, {
|
|
705
|
+
key: `title_${lt.value}`,
|
|
706
|
+
config: {
|
|
707
|
+
title: {
|
|
708
|
+
cy: "scatter-div-title",
|
|
709
|
+
...e.value.style.title
|
|
710
|
+
},
|
|
711
|
+
subtitle: {
|
|
712
|
+
cy: "scatter-div-subtitle",
|
|
713
|
+
...e.value.style.title.subtitle
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}, null, 8, ["config"]))
|
|
717
|
+
], 512)) : x("", !0),
|
|
718
|
+
w("div", {
|
|
719
|
+
id: `legend-top-${F.value}`
|
|
720
|
+
}, null, 8, Ol),
|
|
721
|
+
e.value.userOptions.show && Ze.value && (c(it) || c(Oe)) ? (r(), te(c(Wt), {
|
|
722
|
+
ref_key: "details",
|
|
723
|
+
ref: It,
|
|
724
|
+
key: `user_options_${Je.value}`,
|
|
725
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
726
|
+
color: e.value.style.color,
|
|
727
|
+
isImaging: c(ct),
|
|
728
|
+
isPrinting: c(yt),
|
|
729
|
+
uid: F.value,
|
|
730
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
|
|
731
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
732
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
733
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
734
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
735
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
736
|
+
isTooltip: Z.value.showTooltip,
|
|
737
|
+
isFullscreen: ye.value,
|
|
738
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
739
|
+
chartElement: le.value,
|
|
740
|
+
position: e.value.userOptions.position,
|
|
741
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
742
|
+
isAnnotation: Me.value,
|
|
743
|
+
callbacks: e.value.userOptions.callbacks,
|
|
744
|
+
printScale: e.value.userOptions.print.scale,
|
|
745
|
+
onToggleFullscreen: kt,
|
|
746
|
+
onGeneratePdf: c(dt),
|
|
747
|
+
onGenerateCsv: xt,
|
|
748
|
+
onGenerateImage: c(ht),
|
|
749
|
+
onToggleTable: bt,
|
|
750
|
+
onToggleTooltip: wt,
|
|
751
|
+
onToggleAnnotator: De,
|
|
752
|
+
style: se({
|
|
753
|
+
visibility: c(it) ? c(Oe) ? "visible" : "hidden" : "visible"
|
|
754
|
+
})
|
|
755
|
+
}, ol({ _: 2 }, [
|
|
756
|
+
l.$slots.menuIcon ? {
|
|
757
|
+
name: "menuIcon",
|
|
758
|
+
fn: R(({ isOpen: t, color: o }) => [
|
|
759
|
+
V(l.$slots, "menuIcon", fe(pe({ isOpen: t, color: o })), void 0, !0)
|
|
760
|
+
]),
|
|
761
|
+
key: "0"
|
|
762
|
+
} : void 0,
|
|
763
|
+
l.$slots.optionTooltip ? {
|
|
764
|
+
name: "optionTooltip",
|
|
765
|
+
fn: R(() => [
|
|
766
|
+
V(l.$slots, "optionTooltip", {}, void 0, !0)
|
|
767
|
+
]),
|
|
768
|
+
key: "1"
|
|
769
|
+
} : void 0,
|
|
770
|
+
l.$slots.optionPdf ? {
|
|
771
|
+
name: "optionPdf",
|
|
772
|
+
fn: R(() => [
|
|
773
|
+
V(l.$slots, "optionPdf", {}, void 0, !0)
|
|
774
|
+
]),
|
|
775
|
+
key: "2"
|
|
776
|
+
} : void 0,
|
|
777
|
+
l.$slots.optionCsv ? {
|
|
778
|
+
name: "optionCsv",
|
|
779
|
+
fn: R(() => [
|
|
780
|
+
V(l.$slots, "optionCsv", {}, void 0, !0)
|
|
781
|
+
]),
|
|
782
|
+
key: "3"
|
|
783
|
+
} : void 0,
|
|
784
|
+
l.$slots.optionImg ? {
|
|
785
|
+
name: "optionImg",
|
|
786
|
+
fn: R(() => [
|
|
787
|
+
V(l.$slots, "optionImg", {}, void 0, !0)
|
|
788
|
+
]),
|
|
789
|
+
key: "4"
|
|
790
|
+
} : void 0,
|
|
791
|
+
l.$slots.optionTable ? {
|
|
792
|
+
name: "optionTable",
|
|
793
|
+
fn: R(() => [
|
|
794
|
+
V(l.$slots, "optionTable", {}, void 0, !0)
|
|
795
|
+
]),
|
|
796
|
+
key: "5"
|
|
797
|
+
} : void 0,
|
|
798
|
+
l.$slots.optionFullscreen ? {
|
|
799
|
+
name: "optionFullscreen",
|
|
800
|
+
fn: R(({ toggleFullscreen: t, isFullscreen: o }) => [
|
|
801
|
+
V(l.$slots, "optionFullscreen", fe(pe({ toggleFullscreen: t, isFullscreen: o })), void 0, !0)
|
|
802
|
+
]),
|
|
803
|
+
key: "6"
|
|
804
|
+
} : void 0,
|
|
805
|
+
l.$slots.optionAnnotator ? {
|
|
806
|
+
name: "optionAnnotator",
|
|
807
|
+
fn: R(({ toggleAnnotator: t, isAnnotator: o }) => [
|
|
808
|
+
V(l.$slots, "optionAnnotator", fe(pe({ toggleAnnotator: t, isAnnotator: o })), void 0, !0)
|
|
809
|
+
]),
|
|
810
|
+
key: "7"
|
|
811
|
+
} : void 0
|
|
812
|
+
]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : x("", !0),
|
|
813
|
+
(r(), y("svg", {
|
|
814
|
+
ref_key: "svgRef",
|
|
815
|
+
ref: Ne,
|
|
816
|
+
xmlns: c(gl),
|
|
817
|
+
class: At({ "vue-data-ui-fullscreen--on": ye.value, "vue-data-ui-fulscreen--off": !ye.value, animated: e.value.useCssAnimation }),
|
|
818
|
+
viewBox: `0 0 ${O.value.width <= 0 ? 10 : O.value.width} ${O.value.height <= 0 ? 10 : O.value.height}`,
|
|
819
|
+
style: se(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`),
|
|
820
|
+
onMouseleave: Re
|
|
821
|
+
}, [
|
|
822
|
+
Ce(c(Et)),
|
|
823
|
+
l.$slots["chart-background"] ? (r(), y("foreignObject", {
|
|
824
|
+
key: 0,
|
|
825
|
+
x: 0,
|
|
826
|
+
y: 0,
|
|
827
|
+
width: O.value.width <= 0 ? 10 : O.value.width,
|
|
828
|
+
height: O.value.height <= 0 ? 10 : O.value.height,
|
|
829
|
+
style: {
|
|
830
|
+
pointerEvents: "none"
|
|
831
|
+
}
|
|
832
|
+
}, [
|
|
833
|
+
V(l.$slots, "chart-background", {}, void 0, !0)
|
|
834
|
+
], 8, Wl)) : x("", !0),
|
|
835
|
+
e.value.style.layout.axis.show ? (r(), y("g", Fl, [
|
|
836
|
+
w("line", {
|
|
837
|
+
x1: N.value.x,
|
|
838
|
+
x2: N.value.x,
|
|
839
|
+
y1: n.value.top,
|
|
840
|
+
y2: n.value.bottom,
|
|
841
|
+
stroke: e.value.style.layout.axis.stroke,
|
|
842
|
+
"stroke-width": e.value.style.layout.axis.strokeWidth,
|
|
843
|
+
"stroke-linecap": "round"
|
|
844
|
+
}, null, 8, Il),
|
|
845
|
+
w("line", {
|
|
846
|
+
x1: n.value.left,
|
|
847
|
+
x2: n.value.right,
|
|
848
|
+
y1: N.value.y,
|
|
849
|
+
y2: N.value.y,
|
|
850
|
+
stroke: e.value.style.layout.axis.stroke,
|
|
851
|
+
"stroke-width": e.value.style.layout.axis.strokeWidth,
|
|
852
|
+
"stroke-linecap": "round"
|
|
853
|
+
}, null, 8, Xl)
|
|
854
|
+
])) : x("", !0),
|
|
855
|
+
e.value.style.layout.marginalBars.show ? (r(), y("g", Yl, [
|
|
856
|
+
w("defs", null, [
|
|
857
|
+
w("linearGradient", {
|
|
858
|
+
id: `marginal_x_${F.value}`,
|
|
859
|
+
x1: "0%",
|
|
860
|
+
y1: "0%",
|
|
861
|
+
x2: "0%",
|
|
862
|
+
y2: "100%"
|
|
863
|
+
}, [
|
|
864
|
+
w("stop", {
|
|
865
|
+
offset: "0%",
|
|
866
|
+
"stop-color": e.value.style.layout.marginalBars.fill
|
|
867
|
+
}, null, 8, Rl),
|
|
868
|
+
w("stop", {
|
|
869
|
+
offset: "100%",
|
|
870
|
+
"stop-color": e.value.style.backgroundColor
|
|
871
|
+
}, null, 8, Vl)
|
|
872
|
+
], 8, Dl),
|
|
873
|
+
w("linearGradient", {
|
|
874
|
+
id: `marginal_y_${F.value}`,
|
|
875
|
+
x1: "0%",
|
|
876
|
+
x2: "100%",
|
|
877
|
+
y1: "0%",
|
|
878
|
+
y2: "0%"
|
|
879
|
+
}, [
|
|
880
|
+
w("stop", {
|
|
881
|
+
offset: "0%",
|
|
882
|
+
"stop-color": e.value.style.backgroundColor
|
|
883
|
+
}, null, 8, Ul),
|
|
884
|
+
w("stop", {
|
|
885
|
+
offset: "100%",
|
|
886
|
+
"stop-color": e.value.style.layout.marginalBars.fill
|
|
887
|
+
}, null, 8, Gl)
|
|
888
|
+
], 8, jl)
|
|
889
|
+
]),
|
|
890
|
+
(r(!0), y(H, null, K(C.value.x, (t, o) => (r(), y("g", null, [
|
|
891
|
+
t && C.value.avgX[o] ? (r(), y("rect", {
|
|
892
|
+
key: 0,
|
|
893
|
+
x: C.value.avgX[o] - n.value.width / k.value / 2,
|
|
894
|
+
y: n.value.top - e.value.style.layout.marginalBars.offset - t / C.value.maxX * e.value.style.layout.marginalBars.size,
|
|
895
|
+
width: n.value.width / k.value <= 0 ? 1e-4 : n.value.width / k.value,
|
|
896
|
+
height: t / C.value.maxX * e.value.style.layout.marginalBars.size <= 0 ? 1e-4 : t / C.value.maxX * e.value.style.layout.marginalBars.size,
|
|
897
|
+
fill: e.value.style.layout.marginalBars.useGradient ? `url(#marginal_x_${F.value})` : e.value.style.layout.marginalBars.fill,
|
|
898
|
+
style: se([`opacity:${e.value.style.layout.marginalBars.opacity}`, { "pointer-events": "none" }]),
|
|
899
|
+
stroke: e.value.style.backgroundColor,
|
|
900
|
+
"stroke-width": e.value.style.layout.marginalBars.strokeWidth,
|
|
901
|
+
rx: e.value.style.layout.marginalBars.borderRadius
|
|
902
|
+
}, null, 12, ql)) : x("", !0),
|
|
903
|
+
C.value.avgX[o] ? (r(), y("rect", {
|
|
904
|
+
key: 1,
|
|
905
|
+
x: C.value.avgX[o] - n.value.width / k.value / 2,
|
|
906
|
+
y: n.value.top - e.value.style.layout.marginalBars.offset - e.value.style.layout.marginalBars.size,
|
|
907
|
+
width: n.value.width / k.value <= 0 ? 1e-4 : n.value.width / k.value,
|
|
908
|
+
height: Math.max(0.1, e.value.style.layout.marginalBars.size),
|
|
909
|
+
fill: "transparent",
|
|
910
|
+
onMouseenter: (a) => qt(o),
|
|
911
|
+
onMouseleave: s[0] || (s[0] = (a) => Re())
|
|
912
|
+
}, null, 40, Hl)) : x("", !0),
|
|
913
|
+
C.value.avgX[o] && ge.value != null && ge.value === o ? (r(), y("g", Zl, [
|
|
914
|
+
w("rect", {
|
|
915
|
+
x: C.value.avgX[o] - n.value.width / k.value / 2,
|
|
916
|
+
y: n.value.top,
|
|
917
|
+
width: n.value.width / k.value <= 0 ? 1e-4 : n.value.width / k.value,
|
|
918
|
+
height: n.value.height,
|
|
919
|
+
fill: e.value.style.layout.marginalBars.highlighter.color,
|
|
920
|
+
"fill-opacity": e.value.style.layout.marginalBars.highlighter.opacity
|
|
921
|
+
}, null, 8, Jl),
|
|
922
|
+
w("line", {
|
|
923
|
+
x1: C.value.avgX[o] - n.value.width / k.value / 2,
|
|
924
|
+
x2: C.value.avgX[o] - n.value.width / k.value / 2,
|
|
925
|
+
y1: 0,
|
|
926
|
+
y2: n.value.top + n.value.height,
|
|
927
|
+
stroke: e.value.style.layout.marginalBars.highlighter.stroke,
|
|
928
|
+
"stroke-dasharray": e.value.style.layout.marginalBars.highlighter.strokeDasharray,
|
|
929
|
+
"stroke-width": e.value.style.layout.marginalBars.highlighter.strokeWidth,
|
|
930
|
+
style: { transition: "none !important", animation: "none !important" }
|
|
931
|
+
}, null, 8, Kl),
|
|
932
|
+
w("line", {
|
|
933
|
+
x1: C.value.avgX[o] - n.value.width / k.value / 2 + (n.value.width / k.value <= 0 ? 1e-4 : n.value.width / k.value),
|
|
934
|
+
x2: C.value.avgX[o] - n.value.width / k.value / 2 + (n.value.width / k.value <= 0 ? 1e-4 : n.value.width / k.value),
|
|
935
|
+
y1: 0,
|
|
936
|
+
y2: n.value.top + n.value.height,
|
|
937
|
+
stroke: e.value.style.layout.marginalBars.highlighter.stroke,
|
|
938
|
+
"stroke-dasharray": e.value.style.layout.marginalBars.highlighter.strokeDasharray,
|
|
939
|
+
"stroke-width": e.value.style.layout.marginalBars.highlighter.strokeWidth,
|
|
940
|
+
style: { transition: "none !important", animation: "none !important" }
|
|
941
|
+
}, null, 8, Ql)
|
|
942
|
+
])) : x("", !0)
|
|
943
|
+
]))), 256)),
|
|
944
|
+
(r(!0), y(H, null, K(C.value.y, (t, o) => (r(), y("g", null, [
|
|
945
|
+
t && C.value.avgY[o] ? (r(), y("rect", {
|
|
946
|
+
key: 0,
|
|
947
|
+
x: n.value.right + e.value.style.layout.marginalBars.offset,
|
|
948
|
+
y: C.value.avgY[o] - n.value.height / k.value / 2,
|
|
949
|
+
height: n.value.height / k.value <= 0 ? 1e-4 : n.value.height / k.value,
|
|
950
|
+
width: t / C.value.maxY * e.value.style.layout.marginalBars.size <= 0 ? 1e-4 : t / C.value.maxY * e.value.style.layout.marginalBars.size,
|
|
951
|
+
fill: e.value.style.layout.marginalBars.useGradient ? `url(#marginal_y_${F.value})` : e.value.style.layout.marginalBars.fill,
|
|
952
|
+
style: se([`opacity:${e.value.style.layout.marginalBars.opacity}`, { "pointer-events": "none" }]),
|
|
953
|
+
stroke: e.value.style.backgroundColor,
|
|
954
|
+
"stroke-width": e.value.style.layout.marginalBars.strokeWidth,
|
|
955
|
+
rx: e.value.style.layout.marginalBars.borderRadius
|
|
956
|
+
}, null, 12, ea)) : x("", !0),
|
|
957
|
+
C.value.avgY[o] ? (r(), y("rect", {
|
|
958
|
+
key: 1,
|
|
959
|
+
x: n.value.right + e.value.style.layout.marginalBars.offset,
|
|
960
|
+
y: C.value.avgY[o] - n.value.height / k.value / 2,
|
|
961
|
+
width: Math.max(0.1, e.value.style.layout.marginalBars.size),
|
|
962
|
+
height: n.value.height / k.value <= 0 ? 1e-4 : n.value.height / k.value,
|
|
963
|
+
fill: "transparent",
|
|
964
|
+
onMouseenter: (a) => Ht(o),
|
|
965
|
+
onMouseleave: s[1] || (s[1] = (a) => Re())
|
|
966
|
+
}, null, 40, ta)) : x("", !0),
|
|
967
|
+
C.value.avgY[o] && me.value != null && me.value === o ? (r(), y("g", la, [
|
|
968
|
+
w("rect", {
|
|
969
|
+
x: n.value.left,
|
|
970
|
+
y: C.value.avgY[o] - n.value.height / k.value / 2,
|
|
971
|
+
width: n.value.width,
|
|
972
|
+
height: n.value.height / k.value <= 0 ? 1e-4 : n.value.height / k.value,
|
|
973
|
+
fill: e.value.style.layout.marginalBars.highlighter.color,
|
|
974
|
+
"fill-opacity": e.value.style.layout.marginalBars.highlighter.opacity
|
|
975
|
+
}, null, 8, aa),
|
|
976
|
+
w("line", {
|
|
977
|
+
x1: n.value.left,
|
|
978
|
+
x2: O.value.width,
|
|
979
|
+
y1: C.value.avgY[o] - n.value.height / k.value / 2,
|
|
980
|
+
y2: C.value.avgY[o] - n.value.height / k.value / 2,
|
|
981
|
+
stroke: e.value.style.layout.marginalBars.highlighter.stroke,
|
|
982
|
+
"stroke-dasharray": e.value.style.layout.marginalBars.highlighter.strokeDasharray,
|
|
983
|
+
"stroke-width": e.value.style.layout.marginalBars.highlighter.strokeWidth,
|
|
984
|
+
style: { transition: "none !important", animation: "none !important" }
|
|
985
|
+
}, null, 8, oa),
|
|
986
|
+
w("line", {
|
|
987
|
+
x1: n.value.left,
|
|
988
|
+
x2: O.value.width,
|
|
989
|
+
y1: C.value.avgY[o] - n.value.height / k.value / 2 + (n.value.height / k.value <= 0 ? 1e-4 : n.value.height / k.value),
|
|
990
|
+
y2: C.value.avgY[o] - n.value.height / k.value / 2 + (n.value.height / k.value <= 0 ? 1e-4 : n.value.height / k.value),
|
|
991
|
+
stroke: e.value.style.layout.marginalBars.highlighter.stroke,
|
|
992
|
+
"stroke-dasharray": e.value.style.layout.marginalBars.highlighter.strokeDasharray,
|
|
993
|
+
"stroke-width": e.value.style.layout.marginalBars.highlighter.strokeWidth,
|
|
994
|
+
style: { transition: "none !important", animation: "none !important" }
|
|
995
|
+
}, null, 8, sa)
|
|
996
|
+
])) : x("", !0)
|
|
997
|
+
]))), 256)),
|
|
998
|
+
e.value.style.layout.marginalBars.showLines ? (r(), y("g", na, [
|
|
999
|
+
(r(!0), y(H, null, K(Ut.value, (t) => (r(), y(H, null, [
|
|
1000
|
+
I.value.includes(t.id) ? x("", !0) : (r(), y("path", {
|
|
1001
|
+
key: 0,
|
|
1002
|
+
d: `M ${t.dX}`,
|
|
1003
|
+
stroke: e.value.style.backgroundColor,
|
|
1004
|
+
"stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth + 1,
|
|
1005
|
+
"stroke-linecap": "round",
|
|
1006
|
+
"stroke-linejoin": "round",
|
|
1007
|
+
fill: "none"
|
|
1008
|
+
}, null, 8, ua)),
|
|
1009
|
+
I.value.includes(t.id) ? x("", !0) : (r(), y("path", {
|
|
1010
|
+
key: 1,
|
|
1011
|
+
d: `M ${t.dX}`,
|
|
1012
|
+
stroke: t.color,
|
|
1013
|
+
"stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth,
|
|
1014
|
+
"stroke-linecap": "round",
|
|
1015
|
+
"stroke-linejoin": "round",
|
|
1016
|
+
fill: "none"
|
|
1017
|
+
}, null, 8, ia)),
|
|
1018
|
+
I.value.includes(t.id) ? x("", !0) : (r(), y("path", {
|
|
1019
|
+
key: 2,
|
|
1020
|
+
d: `M ${t.dY}`,
|
|
1021
|
+
stroke: e.value.style.backgroundColor,
|
|
1022
|
+
"stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth + 1,
|
|
1023
|
+
"stroke-linecap": "round",
|
|
1024
|
+
"stroke-linejoin": "round",
|
|
1025
|
+
fill: "none"
|
|
1026
|
+
}, null, 8, ra)),
|
|
1027
|
+
I.value.includes(t.id) ? x("", !0) : (r(), y("path", {
|
|
1028
|
+
key: 3,
|
|
1029
|
+
d: `M ${t.dY}`,
|
|
1030
|
+
stroke: t.color,
|
|
1031
|
+
"stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth,
|
|
1032
|
+
"stroke-linecap": "round",
|
|
1033
|
+
"stroke-linejoin": "round",
|
|
1034
|
+
fill: "none"
|
|
1035
|
+
}, null, 8, va))
|
|
1036
|
+
], 64))), 256))
|
|
1037
|
+
])) : x("", !0)
|
|
1038
|
+
])) : x("", !0),
|
|
1039
|
+
e.value.style.layout.plots.giftWrap.show ? (r(), y("g", ya, [
|
|
1040
|
+
(r(!0), y(H, null, K(j.value, (t, o) => (r(), y("g", null, [
|
|
1041
|
+
t.plots.length > 2 ? (r(), y("polygon", {
|
|
1042
|
+
key: 0,
|
|
1043
|
+
points: c(ml)({ series: t.plots }),
|
|
1044
|
+
fill: c(Se)(t.color, e.value.style.layout.plots.giftWrap.fillOpacity * 100),
|
|
1045
|
+
"stroke-width": e.value.style.layout.plots.giftWrap.strokeWidth,
|
|
1046
|
+
"stroke-dasharray": e.value.style.layout.plots.giftWrap.strokeDasharray,
|
|
1047
|
+
stroke: t.color,
|
|
1048
|
+
"stroke-linejoin": "round",
|
|
1049
|
+
"stroke-linecap": "round"
|
|
1050
|
+
}, null, 8, ca)) : x("", !0)
|
|
1051
|
+
]))), 256))
|
|
1052
|
+
])) : x("", !0),
|
|
1053
|
+
e.value.usePerformanceMode ? x("", !0) : (r(!0), y(H, { key: 4 }, K(j.value, (t, o) => (r(), y("g", null, [
|
|
1054
|
+
!t.shape || t.shape === "circle" ? (r(), y("g", da, [
|
|
1055
|
+
(r(!0), y(H, null, K(t.plots, (a, u) => (r(), y("circle", {
|
|
1056
|
+
cx: a.x,
|
|
1057
|
+
cy: a.y,
|
|
1058
|
+
r: Y.value && Y.value === a.id ? a.weight * 2 : a.weight,
|
|
1059
|
+
fill: c(Se)(t.color, e.value.style.layout.plots.opacity * 100),
|
|
1060
|
+
stroke: e.value.style.layout.plots.stroke,
|
|
1061
|
+
"stroke-width": e.value.style.layout.plots.strokeWidth,
|
|
1062
|
+
style: se(`opacity:${Y.value && Y.value === a.id ? 1 : e.value.style.layout.plots.significance.useDistanceOpacity ? 1 - Math.abs(a.deviation) / pt.value : e.value.style.layout.plots.significance.show && Math.abs(a.deviation) > e.value.style.layout.plots.significance.deviationThreshold ? e.value.style.layout.plots.significance.opacity : 1}`),
|
|
1063
|
+
onMouseover: (i) => Xe(a, o),
|
|
1064
|
+
onMouseleave: (i) => _e(a, o),
|
|
1065
|
+
onClick: (i) => Ye(a, o)
|
|
1066
|
+
}, null, 44, ha))), 256))
|
|
1067
|
+
])) : (r(), y("g", fa, [
|
|
1068
|
+
(r(!0), y(H, null, K(t.plots, (a, u) => (r(), te(He, {
|
|
1069
|
+
plot: { x: a.x, y: a.y },
|
|
1070
|
+
radius: Y.value && Y.value === a.id ? a.weight * 2 : a.weight,
|
|
1071
|
+
shape: t.shape,
|
|
1072
|
+
color: c(Se)(t.color, e.value.style.layout.plots.opacity * 100),
|
|
1073
|
+
stroke: e.value.style.layout.plots.stroke,
|
|
1074
|
+
strokeWidth: e.value.style.layout.plots.strokeWidth,
|
|
1075
|
+
style: se(`opacity:${Y.value && Y.value === a.id ? 1 : e.value.style.layout.plots.significance.useDistanceOpacity ? 1 - Math.abs(a.deviation) / pt.value : e.value.style.layout.plots.significance.show && Math.abs(a.deviation) > e.value.style.layout.plots.significance.deviationThreshold ? e.value.style.layout.plots.significance.opacity : 1}`),
|
|
1076
|
+
onMouseover: (i) => Xe(a, o),
|
|
1077
|
+
onMouseleave: (i) => _e(a, o),
|
|
1078
|
+
onClick: (i) => Ye(a, o)
|
|
1079
|
+
}, null, 8, ["plot", "radius", "shape", "color", "stroke", "strokeWidth", "style", "onMouseover", "onMouseleave", "onClick"]))), 256))
|
|
1080
|
+
]))
|
|
1081
|
+
]))), 256)),
|
|
1082
|
+
e.value.usePerformanceMode ? (r(), y(H, { key: 5 }, [
|
|
1083
|
+
w("g", {
|
|
1084
|
+
"clip-path": `url(#clip_path_${F.value})`
|
|
1085
|
+
}, [
|
|
1086
|
+
(r(!0), y(H, null, K(Jt.value, (t) => (r(), y("path", {
|
|
1087
|
+
key: t.id,
|
|
1088
|
+
d: t.d,
|
|
1089
|
+
fill: t.fill,
|
|
1090
|
+
stroke: t.stroke,
|
|
1091
|
+
"stroke-width": t.strokeWidth,
|
|
1092
|
+
"stroke-opacity": t.strokeOpacity,
|
|
1093
|
+
"vector-effect": "non-scaling-stroke",
|
|
1094
|
+
"paint-order": "fill"
|
|
1095
|
+
}, null, 8, ga))), 128))
|
|
1096
|
+
], 8, pa),
|
|
1097
|
+
p.value && e.value.style.layout.plots.selectors.show ? (r(), y("g", ma, [
|
|
1098
|
+
Ce(He, {
|
|
1099
|
+
shape: p.value.shape || "circle",
|
|
1100
|
+
color: p.value.color,
|
|
1101
|
+
plot: { x: p.value.x, y: p.value.y },
|
|
1102
|
+
radius: Math.max(4 * _t[p.value.shape || "circle"], p.value.weight * 2),
|
|
1103
|
+
stroke: e.value.style.layout.plots.stroke,
|
|
1104
|
+
strokeWidth: e.value.style.layout.plots.strokeWidth
|
|
1105
|
+
}, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])
|
|
1106
|
+
])) : x("", !0),
|
|
1107
|
+
w("rect", {
|
|
1108
|
+
x: n.value.left,
|
|
1109
|
+
y: n.value.top,
|
|
1110
|
+
width: Math.max(1e-4, n.value.width),
|
|
1111
|
+
height: Math.max(1e-4, n.value.height),
|
|
1112
|
+
fill: "transparent",
|
|
1113
|
+
onMousemove: s[2] || (s[2] = (...t) => c($t) && c($t)(...t)),
|
|
1114
|
+
onMouseleave: Qt,
|
|
1115
|
+
onClick: el
|
|
1116
|
+
}, null, 40, xa)
|
|
1117
|
+
], 64)) : x("", !0),
|
|
1118
|
+
p.value && e.value.style.layout.plots.selectors.show ? (r(), y("g", ka, [
|
|
1119
|
+
w("line", {
|
|
1120
|
+
x1: N.value.x,
|
|
1121
|
+
x2: p.value.x,
|
|
1122
|
+
y1: p.value.y,
|
|
1123
|
+
y2: p.value.y,
|
|
1124
|
+
stroke: e.value.style.layout.plots.selectors.stroke,
|
|
1125
|
+
"stroke-width": e.value.style.layout.plots.selectors.strokeWidth,
|
|
1126
|
+
"stroke-dasharray": e.value.style.layout.plots.selectors.strokeDasharray,
|
|
1127
|
+
"stroke-linecap": "round",
|
|
1128
|
+
class: "line-pointer"
|
|
1129
|
+
}, null, 8, ba),
|
|
1130
|
+
w("line", {
|
|
1131
|
+
x1: p.value.x,
|
|
1132
|
+
x2: p.value.x,
|
|
1133
|
+
y1: N.value.y,
|
|
1134
|
+
y2: p.value.y,
|
|
1135
|
+
stroke: e.value.style.layout.plots.selectors.stroke,
|
|
1136
|
+
"stroke-width": e.value.style.layout.plots.selectors.strokeWidth,
|
|
1137
|
+
"stroke-dasharray": e.value.style.layout.plots.selectors.strokeDasharray,
|
|
1138
|
+
"stroke-linecap": "round",
|
|
1139
|
+
class: "line-pointer"
|
|
1140
|
+
}, null, 8, wa),
|
|
1141
|
+
w("text", {
|
|
1142
|
+
x: N.value.x + (p.value.x > N.value.x ? -6 : 6),
|
|
1143
|
+
y: p.value.y + e.value.style.layout.plots.selectors.labels.fontSize / 3,
|
|
1144
|
+
"font-size": e.value.style.layout.plots.selectors.labels.fontSize,
|
|
1145
|
+
fill: e.value.style.layout.plots.selectors.labels.color,
|
|
1146
|
+
"font-weight": e.value.style.layout.plots.selectors.labels.bold ? "bold" : "normal",
|
|
1147
|
+
"text-anchor": p.value.x > N.value.x ? "end" : "start"
|
|
1148
|
+
}, G(c(ne)(
|
|
1149
|
+
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
1150
|
+
c(q)(p.value.v.y),
|
|
1151
|
+
c(Q)({
|
|
1152
|
+
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
1153
|
+
v: c(q)(p.value.v.y),
|
|
1154
|
+
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
1155
|
+
r: e.value.style.layout.plots.selectors.labels.rounding
|
|
1156
|
+
}),
|
|
1157
|
+
{ datapoint: p.value }
|
|
1158
|
+
)), 9, _a),
|
|
1159
|
+
w("text", {
|
|
1160
|
+
x: p.value.x,
|
|
1161
|
+
y: N.value.y + (p.value.y > N.value.y ? -6 : e.value.style.layout.plots.selectors.labels.fontSize + 6),
|
|
1162
|
+
"font-size": e.value.style.layout.plots.selectors.labels.fontSize,
|
|
1163
|
+
fill: e.value.style.layout.plots.selectors.labels.color,
|
|
1164
|
+
"font-weight": e.value.style.layout.plots.selectors.labels.bold ? "bold" : "normal",
|
|
1165
|
+
"text-anchor": "middle"
|
|
1166
|
+
}, G(c(ne)(
|
|
1167
|
+
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
1168
|
+
c(q)(p.value.v.x),
|
|
1169
|
+
c(Q)({
|
|
1170
|
+
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
1171
|
+
v: c(q)(p.value.v.x),
|
|
1172
|
+
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
1173
|
+
r: e.value.style.layout.plots.selectors.labels.rounding
|
|
1174
|
+
}),
|
|
1175
|
+
{ datapoint: p.value }
|
|
1176
|
+
)), 9, $a),
|
|
1177
|
+
w("circle", {
|
|
1178
|
+
cx: N.value.x,
|
|
1179
|
+
cy: p.value.y,
|
|
1180
|
+
r: e.value.style.layout.plots.selectors.markers.radius,
|
|
1181
|
+
fill: e.value.style.layout.plots.selectors.markers.fill,
|
|
1182
|
+
stroke: e.value.style.layout.plots.selectors.markers.stroke,
|
|
1183
|
+
"stroke-width": e.value.style.layout.plots.selectors.markers.strokeWidth,
|
|
1184
|
+
class: "line-pointer"
|
|
1185
|
+
}, null, 8, Ma),
|
|
1186
|
+
w("circle", {
|
|
1187
|
+
cx: p.value.x,
|
|
1188
|
+
cy: N.value.y,
|
|
1189
|
+
r: e.value.style.layout.plots.selectors.markers.radius,
|
|
1190
|
+
fill: e.value.style.layout.plots.selectors.markers.fill,
|
|
1191
|
+
stroke: e.value.style.layout.plots.selectors.markers.stroke,
|
|
1192
|
+
"stroke-width": e.value.style.layout.plots.selectors.markers.strokeWidth,
|
|
1193
|
+
class: "line-pointer"
|
|
1194
|
+
}, null, 8, Aa),
|
|
1195
|
+
e.value.style.layout.plots.selectors.labels.showName ? (r(), y("text", {
|
|
1196
|
+
key: 0,
|
|
1197
|
+
x: p.value.x,
|
|
1198
|
+
y: p.value.y + (p.value.y < N.value.y ? -e.value.style.layout.plots.selectors.labels.fontSize / 2 : e.value.style.layout.plots.selectors.labels.fontSize),
|
|
1199
|
+
"font-size": e.value.style.layout.plots.selectors.labels.fontSize,
|
|
1200
|
+
fill: e.value.style.layout.plots.selectors.labels.color,
|
|
1201
|
+
"font-weight": e.value.style.layout.plots.selectors.labels.bold ? "bold" : "normal",
|
|
1202
|
+
"text-anchor": p.value.x < n.value.left + 100 ? "start" : p.value.x > n.value.right - 100 ? "end" : p.value.x > N.value.x ? "start" : "end"
|
|
1203
|
+
}, G(p.value.v.name), 9, Ca)) : x("", !0)
|
|
1204
|
+
])) : x("", !0),
|
|
1205
|
+
e.value.style.layout.dataLabels.xAxis.show ? (r(), y("g", {
|
|
1206
|
+
key: 7,
|
|
1207
|
+
ref_key: "xAxisLabelLeft",
|
|
1208
|
+
ref: ze
|
|
1209
|
+
}, [
|
|
1210
|
+
w("text", {
|
|
1211
|
+
id: `vue-ui-scatter-xAxis-label-${F.value}`,
|
|
1212
|
+
transform: `translate(${e.value.style.layout.dataLabels.xAxis.fontSize}, ${n.value.top + n.value.height / 2}), rotate(-90)`,
|
|
1213
|
+
"text-anchor": "middle",
|
|
1214
|
+
"font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
|
|
1215
|
+
"font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal",
|
|
1216
|
+
fill: e.value.style.layout.dataLabels.xAxis.color
|
|
1217
|
+
}, G(e.value.style.layout.dataLabels.xAxis.name), 9, Sa),
|
|
1218
|
+
w("text", {
|
|
1219
|
+
"text-anchor": "middle",
|
|
1220
|
+
"font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
|
|
1221
|
+
fill: e.value.style.layout.dataLabels.xAxis.color,
|
|
1222
|
+
transform: `translate(${e.value.style.layout.dataLabels.xAxis.name ? e.value.style.layout.dataLabels.xAxis.fontSize * 3 : 0}, ${N.value.y + e.value.style.layout.dataLabels.xAxis.fontSize / 3}), rotate(-90)`
|
|
1223
|
+
}, G(c(ne)(
|
|
1224
|
+
e.value.style.layout.plots.selectors.labels.x.formatter,
|
|
1225
|
+
c(q)(T.value.xMin),
|
|
1226
|
+
c(Q)({
|
|
1227
|
+
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
1228
|
+
v: c(q)(T.value.xMin),
|
|
1229
|
+
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
1230
|
+
r: e.value.style.layout.dataLabels.xAxis.rounding
|
|
1231
|
+
})
|
|
1232
|
+
)), 9, La)
|
|
1233
|
+
], 512)) : x("", !0),
|
|
1234
|
+
e.value.style.layout.dataLabels.xAxis.show ? (r(), y("text", {
|
|
1235
|
+
key: 8,
|
|
1236
|
+
ref_key: "xAxisLabelRight",
|
|
1237
|
+
ref: Xt,
|
|
1238
|
+
"text-anchor": "middle",
|
|
1239
|
+
transform: `translate(${n.value.right + e.value.style.layout.padding.right + 6}, ${N.value.y + e.value.style.layout.dataLabels.xAxis.fontSize / 3}), rotate(-90)`,
|
|
1240
|
+
"font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
|
|
1241
|
+
fill: e.value.style.layout.dataLabels.xAxis.color
|
|
1242
|
+
}, G(c(ne)(
|
|
1243
|
+
e.value.style.layout.plots.selectors.labels.x.formatter,
|
|
1244
|
+
c(q)(T.value.xMax),
|
|
1245
|
+
c(Q)({
|
|
1246
|
+
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
1247
|
+
v: c(q)(T.value.xMax),
|
|
1248
|
+
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
1249
|
+
r: e.value.style.layout.dataLabels.xAxis.rounding
|
|
1250
|
+
})
|
|
1251
|
+
)), 9, Ba)) : x("", !0),
|
|
1252
|
+
e.value.style.layout.dataLabels.yAxis.show ? (r(), y("text", {
|
|
1253
|
+
key: 9,
|
|
1254
|
+
ref_key: "yAxisLabelTop",
|
|
1255
|
+
ref: Yt,
|
|
1256
|
+
x: N.value.x,
|
|
1257
|
+
y: n.value.top - e.value.style.layout.dataLabels.yAxis.fontSize,
|
|
1258
|
+
"text-anchor": "middle",
|
|
1259
|
+
"font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
|
|
1260
|
+
fill: e.value.style.layout.dataLabels.yAxis.color
|
|
1261
|
+
}, G(c(ne)(
|
|
1262
|
+
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
1263
|
+
c(q)(T.value.yMax),
|
|
1264
|
+
c(Q)({
|
|
1265
|
+
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
1266
|
+
v: c(q)(T.value.yMax),
|
|
1267
|
+
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
1268
|
+
r: e.value.style.layout.dataLabels.yAxis.rounding
|
|
1269
|
+
})
|
|
1270
|
+
)), 9, za)) : x("", !0),
|
|
1271
|
+
e.value.style.layout.dataLabels.yAxis.show ? (r(), y("g", {
|
|
1272
|
+
key: 10,
|
|
1273
|
+
ref_key: "yAxisLabelBottom",
|
|
1274
|
+
ref: Te
|
|
1275
|
+
}, [
|
|
1276
|
+
w("text", {
|
|
1277
|
+
x: N.value.x,
|
|
1278
|
+
y: O.value.height - e.value.style.layout.dataLabels.yAxis.fontSize * 2,
|
|
1279
|
+
"text-anchor": "middle",
|
|
1280
|
+
"font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
|
|
1281
|
+
fill: e.value.style.layout.dataLabels.yAxis.color
|
|
1282
|
+
}, G(c(ne)(
|
|
1283
|
+
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
1284
|
+
c(q)(T.value.yMin),
|
|
1285
|
+
c(Q)({
|
|
1286
|
+
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
1287
|
+
v: c(q)(T.value.yMin),
|
|
1288
|
+
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
1289
|
+
r: e.value.style.layout.dataLabels.yAxis.rounding
|
|
1290
|
+
})
|
|
1291
|
+
)), 9, Ta),
|
|
1292
|
+
w("text", {
|
|
1293
|
+
"text-anchor": "middle",
|
|
1294
|
+
"font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
|
|
1295
|
+
"font-weight": e.value.style.layout.dataLabels.yAxis.bold ? "bold" : "normal",
|
|
1296
|
+
fill: e.value.style.layout.dataLabels.yAxis.color,
|
|
1297
|
+
x: n.value.left + n.value.width / 2,
|
|
1298
|
+
y: O.value.height
|
|
1299
|
+
}, G(e.value.style.layout.dataLabels.yAxis.name), 9, Pa)
|
|
1300
|
+
], 512)) : x("", !0),
|
|
1301
|
+
w("clipPath", {
|
|
1302
|
+
id: `clip_path_${F.value}`
|
|
1303
|
+
}, [
|
|
1304
|
+
w("rect", {
|
|
1305
|
+
x: n.value.left,
|
|
1306
|
+
y: n.value.top,
|
|
1307
|
+
width: n.value.width <= 0 ? 1e-4 : n.value.width,
|
|
1308
|
+
height: n.value.height <= 0 ? 1e-4 : n.value.height
|
|
1309
|
+
}, null, 8, Oa)
|
|
1310
|
+
], 8, Ea),
|
|
1311
|
+
e.value.style.layout.correlation.show ? (r(), y("g", Na, [
|
|
1312
|
+
(r(!0), y(H, null, K(j.value, (t, o) => (r(), y("line", {
|
|
1313
|
+
x1: t.correlation.x1,
|
|
1314
|
+
x2: t.correlation.x2,
|
|
1315
|
+
y1: t.correlation.y1,
|
|
1316
|
+
y2: t.correlation.y2,
|
|
1317
|
+
"stroke-dasharray": e.value.style.layout.correlation.strokeDasharray,
|
|
1318
|
+
stroke: t.color,
|
|
1319
|
+
"stroke-width": e.value.style.layout.correlation.strokeWidth,
|
|
1320
|
+
"clip-path": `url(#clip_path_${F.value})`
|
|
1321
|
+
}, null, 8, Wa))), 256)),
|
|
1322
|
+
(r(!0), y(H, null, K(j.value, (t, o) => (r(), y("g", null, [
|
|
1323
|
+
e.value.style.layout.correlation.label.show ? (r(), y("text", {
|
|
1324
|
+
key: 0,
|
|
1325
|
+
x: t.correlation.x2,
|
|
1326
|
+
y: t.correlation.y2,
|
|
1327
|
+
fill: e.value.style.layout.correlation.label.useSerieColor ? t.color : e.value.style.layout.correlation.label.color,
|
|
1328
|
+
"text-anchor": "end",
|
|
1329
|
+
"font-size": e.value.style.layout.correlation.label.fontSize,
|
|
1330
|
+
"font-weight": e.value.style.layout.correlation.label.bold ? "bold" : "normal"
|
|
1331
|
+
}, G(c(Q)({
|
|
1332
|
+
v: c(q)(t.correlation.coefficient),
|
|
1333
|
+
r: e.value.style.layout.correlation.label.roundingValue
|
|
1334
|
+
})), 9, Fa)) : x("", !0)
|
|
1335
|
+
]))), 256))
|
|
1336
|
+
])) : x("", !0),
|
|
1337
|
+
V(l.$slots, "svg", { svg: O.value }, void 0, !0)
|
|
1338
|
+
], 46, Nl)),
|
|
1339
|
+
l.$slots.watermark ? (r(), y("div", Ia, [
|
|
1340
|
+
V(l.$slots, "watermark", fe(pe({ isPrinting: c(yt) || c(ct) })), void 0, !0)
|
|
1341
|
+
])) : x("", !0),
|
|
1342
|
+
w("div", {
|
|
1343
|
+
id: `legend-bottom-${F.value}`
|
|
1344
|
+
}, null, 8, Xa),
|
|
1345
|
+
st.value ? (r(), te(sl, {
|
|
1346
|
+
key: 5,
|
|
1347
|
+
to: e.value.style.legend.position === "top" ? `#legend-top-${F.value}` : `#legend-bottom-${F.value}`
|
|
1348
|
+
}, [
|
|
1349
|
+
w("div", {
|
|
1350
|
+
ref_key: "chartLegend",
|
|
1351
|
+
ref: Qe
|
|
1352
|
+
}, [
|
|
1353
|
+
e.value.style.legend.show ? (r(), te(Bl, {
|
|
1354
|
+
key: `legend_${ot.value}`,
|
|
1355
|
+
legendSet: ue.value,
|
|
1356
|
+
config: Vt.value,
|
|
1357
|
+
onClickMarker: s[3] || (s[3] = ({ legend: t }) => mt(t.id))
|
|
1358
|
+
}, {
|
|
1359
|
+
item: R(({ legend: t }) => [
|
|
1360
|
+
w("div", {
|
|
1361
|
+
onClick: (o) => t.segregate(),
|
|
1362
|
+
style: se(`opacity:${I.value.includes(t.id) ? 0.5 : 1}`)
|
|
1363
|
+
}, G(t.name), 13, Ya)
|
|
1364
|
+
]),
|
|
1365
|
+
_: 1
|
|
1366
|
+
}, 8, ["legendSet", "config"])) : V(l.$slots, "legend", {
|
|
1367
|
+
key: 1,
|
|
1368
|
+
legend: ue.value
|
|
1369
|
+
}, void 0, !0)
|
|
1370
|
+
], 512)
|
|
1371
|
+
], 8, ["to"])) : x("", !0),
|
|
1372
|
+
l.$slots.source ? (r(), y("div", {
|
|
1373
|
+
key: 6,
|
|
1374
|
+
ref_key: "source",
|
|
1375
|
+
ref: et,
|
|
1376
|
+
dir: "auto"
|
|
1377
|
+
}, [
|
|
1378
|
+
V(l.$slots, "source", {}, void 0, !0)
|
|
1379
|
+
], 512)) : x("", !0),
|
|
1380
|
+
Ce(c(Nt), {
|
|
1381
|
+
show: Z.value.showTooltip && Le.value,
|
|
1382
|
+
backgroundColor: e.value.style.tooltip.backgroundColor,
|
|
1383
|
+
color: e.value.style.tooltip.color,
|
|
1384
|
+
borderRadius: e.value.style.tooltip.borderRadius,
|
|
1385
|
+
borderColor: e.value.style.tooltip.borderColor,
|
|
1386
|
+
borderWidth: e.value.style.tooltip.borderWidth,
|
|
1387
|
+
fontSize: e.value.style.tooltip.fontSize,
|
|
1388
|
+
backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
|
|
1389
|
+
position: e.value.style.tooltip.position,
|
|
1390
|
+
offsetY: e.value.style.tooltip.offsetY,
|
|
1391
|
+
parent: le.value,
|
|
1392
|
+
content: Be.value,
|
|
1393
|
+
isFullscreen: ye.value,
|
|
1394
|
+
isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function",
|
|
1395
|
+
smooth: e.value.style.tooltip.smooth,
|
|
1396
|
+
backdropFilter: e.value.style.tooltip.backdropFilter
|
|
1397
|
+
}, {
|
|
1398
|
+
"tooltip-before": R(() => [
|
|
1399
|
+
V(l.$slots, "tooltip-before", fe(pe({ ...Ie.value })), void 0, !0)
|
|
1400
|
+
]),
|
|
1401
|
+
"tooltip-after": R(() => [
|
|
1402
|
+
V(l.$slots, "tooltip-after", fe(pe({ ...Ie.value })), void 0, !0)
|
|
1403
|
+
]),
|
|
1404
|
+
default: R(() => [
|
|
1405
|
+
e.value.style.tooltip.showShape ? (r(), y("div", Da, [
|
|
1406
|
+
(r(), y("svg", Ra, [
|
|
1407
|
+
Ce(He, {
|
|
1408
|
+
shape: p.value.shape,
|
|
1409
|
+
color: p.value.color,
|
|
1410
|
+
plot: { x: 10, y: 10 },
|
|
1411
|
+
radius: 7
|
|
1412
|
+
}, null, 8, ["shape", "color"])
|
|
1413
|
+
]))
|
|
1414
|
+
])) : x("", !0)
|
|
1415
|
+
]),
|
|
1416
|
+
_: 3
|
|
1417
|
+
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
|
|
1418
|
+
Ze.value ? (r(), te(c(Tt), {
|
|
1419
|
+
key: 7,
|
|
1420
|
+
hideDetails: "",
|
|
1421
|
+
config: {
|
|
1422
|
+
open: Z.value.showTable,
|
|
1423
|
+
maxHeight: 1e4,
|
|
1424
|
+
body: {
|
|
1425
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
1426
|
+
color: e.value.style.color
|
|
1427
|
+
},
|
|
1428
|
+
head: {
|
|
1429
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
1430
|
+
color: e.value.style.color
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
}, {
|
|
1434
|
+
content: R(() => [
|
|
1435
|
+
(r(), te(c(Pt), {
|
|
1436
|
+
key: `table_${at.value}`,
|
|
1437
|
+
colNames: $e.value.colNames,
|
|
1438
|
+
head: $e.value.head,
|
|
1439
|
+
body: $e.value.body,
|
|
1440
|
+
config: $e.value.config,
|
|
1441
|
+
title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? ` : ${e.value.style.title.subtitle.text}` : ""}`,
|
|
1442
|
+
onClose: s[4] || (s[4] = (t) => Z.value.showTable = !1)
|
|
1443
|
+
}, {
|
|
1444
|
+
th: R(({ th: t }) => [
|
|
1445
|
+
nl(G(t), 1)
|
|
1446
|
+
]),
|
|
1447
|
+
td: R(({ td: t }) => [
|
|
1448
|
+
t.shape ? (r(), y("div", Va, [
|
|
1449
|
+
w("span", null, G(t.content), 1)
|
|
1450
|
+
])) : (r(), y("div", {
|
|
1451
|
+
key: 1,
|
|
1452
|
+
innerHTML: t
|
|
1453
|
+
}, null, 8, ja))
|
|
1454
|
+
]),
|
|
1455
|
+
_: 1
|
|
1456
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
1457
|
+
]),
|
|
1458
|
+
_: 1
|
|
1459
|
+
}, 8, ["config"])) : x("", !0),
|
|
1460
|
+
c(nt) ? (r(), te(Al, { key: 8 })) : x("", !0)
|
|
1461
|
+
], 46, El));
|
|
1462
|
+
}
|
|
1463
|
+
}, no = /* @__PURE__ */ Pl(Ua, [["__scopeId", "data-v-e6424ed5"]]);
|
|
1464
|
+
export {
|
|
1465
|
+
no as default
|
|
1466
|
+
};
|