vue-data-ui 3.25.4 → 3.25.6
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/README.md +13 -13
- package/dist/{BaseDraggableDialog-BM_R41j8.js → BaseDraggableDialog-Gm4Q30j0.js} +1 -1
- package/dist/{BaseIcon-t83PDe9k.js → BaseIcon-D8R6_sKH.js} +5 -5
- package/dist/{BaseLegendToggle-__JnV08B.js → BaseLegendToggle-CXQrLjd-.js} +1 -1
- package/dist/{BaseZoomControls-Xo16vFa4.js → BaseZoomControls-BTzjVDPM.js} +1 -1
- package/dist/{ColorPicker-ZJrR3Olp.js → ColorPicker-CUy15T72.js} +102 -100
- package/dist/{DataTable-COIO9gi4.js → DataTable-oiM9uWrQ.js} +1 -1
- package/dist/{HillActions-Cl-dNBZR.js → HillActions-Dn8aKOVJ.js} +1 -1
- package/dist/{NonSvgPenAndPaper-DS84BAOx.js → NonSvgPenAndPaper-DFXjpRyl.js} +2 -2
- package/dist/{PackageVersion-5SWftabm.js → PackageVersion-ur6jKRL5.js} +1 -1
- package/dist/{PenAndPaper-B_SdRSKH.js → PenAndPaper-KFzKlvbi.js} +20 -4
- package/dist/{SlicerPreview-GvsdvE-h.js → SlicerPreview-B6iHOC9L.js} +1 -1
- package/dist/{UserOptions-f3Q0nqrj.js → UserOptions-2x4VklMW.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{package-DmsdiyeS.js → package-Dx7M6sYy.js} +1 -1
- package/dist/{render-common-zoPh9a78.js → render-common-DETHvNhl.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +80 -1
- package/dist/types/vue-ui-annotator.d.ts +58 -2
- package/dist/{useConfig-CyCVHo81.js → useConfig-CIQZ6_r7.js} +1339 -1313
- package/dist/{useObjectBindings-ByORl1rV.js → useObjectBindings---mHNfbS.js} +2 -2
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-DTj71yB7.js → vue-data-ui-Dh3_EsHb.js} +70 -70
- package/dist/vue-data-ui.js +71 -71
- package/dist/vue-ui-3d-bar-i1REAKnM.js +1831 -0
- package/dist/{vue-ui-accordion-D4zsdacF.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
- package/dist/vue-ui-age-pyramid-DuHblCNO.js +1293 -0
- package/dist/vue-ui-annotator-CTQHAPho.js +3325 -0
- package/dist/vue-ui-bullet-CYLnKrmM.js +702 -0
- package/dist/{vue-ui-bump-BkOtQNWe.js → vue-ui-bump-DhwySwgn.js} +382 -380
- package/dist/vue-ui-candlestick-BpiECaDj.js +1859 -0
- package/dist/{vue-ui-carousel-table-CRgbs7jR.js → vue-ui-carousel-table-D-T2yA7-.js} +2 -2
- package/dist/vue-ui-chestnut-1MsZ9Q3r.js +2016 -0
- package/dist/vue-ui-chord-QBQUSe7r.js +1347 -0
- package/dist/vue-ui-circle-pack-ZWEwtesD.js +1635 -0
- package/dist/{vue-ui-cursor-BHyXRadA.js → vue-ui-cursor-CHQcHAHQ.js} +2 -2
- package/dist/{vue-ui-dag-CyVqaLbF.js → vue-ui-dag-C_inEafb.js} +794 -792
- package/dist/{vue-ui-dashboard-7I-7wvCP.js → vue-ui-dashboard-Bs2mBur5.js} +74 -72
- package/dist/{vue-ui-digits-BBL8uERO.js → vue-ui-digits-DwE4MoXI.js} +2 -2
- package/dist/vue-ui-donut-BM9dMHXj.js +2415 -0
- package/dist/{vue-ui-donut-DcgUuefk.js → vue-ui-donut-CbOSJmRu.js} +2 -2
- package/dist/vue-ui-donut-evolution-C97_RHus.js +1552 -0
- package/dist/vue-ui-dumbbell-DwKa5EL5.js +1533 -0
- package/dist/vue-ui-flow-DTTr3YL9.js +1217 -0
- package/dist/vue-ui-funnel-C4pkBk3D.js +749 -0
- package/dist/vue-ui-galaxy-CuAPLOvX.js +1085 -0
- package/dist/vue-ui-gauge-DLDULH26.js +934 -0
- package/dist/{vue-ui-geo-jR4P4pbt.js → vue-ui-geo-DXIHhp-G.js} +431 -429
- package/dist/{vue-ui-gizmo-D6W86s9o.js → vue-ui-gizmo-PuURiePo.js} +2 -2
- package/dist/vue-ui-heatmap-mvWLKB99.js +1555 -0
- package/dist/{vue-ui-hill-fFq7pm-g.js → vue-ui-hill-DqsVJkmO.js} +472 -470
- package/dist/vue-ui-history-plot-BBVLgt9_.js +1698 -0
- package/dist/{vue-ui-horizontal-bar-D3Sft4kp.js → vue-ui-horizontal-bar-y8Q8PZwT.js} +513 -511
- package/dist/{vue-ui-kpi-fzLsKlyE.js → vue-ui-kpi-B2hf3kpp.js} +2 -2
- package/dist/{vue-ui-label-BSgLalWD.js → vue-ui-label-ClMQ5Gez.js} +1 -1
- package/dist/{vue-ui-mini-loader-BL2odRfu.js → vue-ui-mini-loader-DtPOVIkK.js} +1 -1
- package/dist/vue-ui-molecule-eeW1Pmg8.js +929 -0
- package/dist/{vue-ui-mood-radar-bvGx6XgG.js → vue-ui-mood-radar-Dd1qfUiu.js} +378 -376
- package/dist/vue-ui-nested-donuts-CUARCr6O.js +1503 -0
- package/dist/vue-ui-onion-NoxHP0cG.js +1235 -0
- package/dist/{vue-ui-parallel-coordinate-plot-B_QJ4N9o.js → vue-ui-parallel-coordinate-plot-Cp3pCyxK.js} +409 -407
- package/dist/vue-ui-quadrant-C3kQtaeX.js +1967 -0
- package/dist/{vue-ui-quick-chart-BFscCR59.js → vue-ui-quick-chart-BZq517pL.js} +8 -6
- package/dist/vue-ui-radar-DvNrl4uD.js +1374 -0
- package/dist/vue-ui-rating-CWFMoYpE.js +359 -0
- package/dist/vue-ui-relation-circle-1iS6C0xx.js +905 -0
- package/dist/vue-ui-ridgeline-B-EZiPCF.js +1630 -0
- package/dist/vue-ui-rings-BXuwrHos.js +1252 -0
- package/dist/vue-ui-scatter-ByL-ZZ3B.js +2405 -0
- package/dist/{vue-ui-skeleton-zmbcOVEf.js → vue-ui-skeleton-BcU1onF6.js} +698 -698
- package/dist/vue-ui-smiley-DJVusLnp.js +376 -0
- package/dist/vue-ui-spark-trend-DjS31avb.js +457 -0
- package/dist/vue-ui-sparkbar-1Al_TLw1.js +401 -0
- package/dist/vue-ui-sparkgauge-CwLo53Y8.js +268 -0
- package/dist/vue-ui-sparkhistogram-CGw6SThG.js +589 -0
- package/dist/{vue-ui-sparkline-Dv7XrEzO.js → vue-ui-sparkline-CSZGBFfI.js} +511 -511
- package/dist/vue-ui-sparkstackbar-B8dloLMp.js +738 -0
- package/dist/vue-ui-stackbar-FvNd77t1.js +2355 -0
- package/dist/vue-ui-stackline-CP7PkqiG.js +2469 -0
- package/dist/vue-ui-strip-plot-DSMlDkv1.js +1740 -0
- package/dist/{vue-ui-table-heatmap-Dv_ZKKm3.js → vue-ui-table-heatmap-DnP3pzh2.js} +2 -2
- package/dist/vue-ui-table-rwKtnJKt.js +1352 -0
- package/dist/vue-ui-table-sparkline-B6wyEAyC.js +738 -0
- package/dist/{vue-ui-thermometer-DytlLJ32.js → vue-ui-thermometer-D0_KsB-y.js} +194 -192
- package/dist/{vue-ui-timer-CvHP4HoW.js → vue-ui-timer-1Z2zginj.js} +153 -153
- package/dist/vue-ui-tiremarks-zbl7aooy.js +540 -0
- package/dist/vue-ui-treemap-Drs4gK6L.js +1733 -0
- package/dist/vue-ui-waffle-DqUVsVNE.js +1621 -0
- package/dist/vue-ui-wheel-DLCBPW9t.js +873 -0
- package/dist/vue-ui-word-cloud-8Agk9h6c.js +1710 -0
- package/dist/{vue-ui-world-D0_2upjg.js → vue-ui-world-BOBHo7-L.js} +526 -524
- package/dist/vue-ui-xy-CSTJzRkk.js +5283 -0
- package/dist/{vue-ui-xy-D_5FfaH-.js → vue-ui-xy-Dmk1gQkI.js} +2 -2
- package/dist/vue-ui-xy-canvas-DANPuyf4.js +1824 -0
- package/dist/{vue_ui_age_pyramid-BY6c-oX_.js → vue_ui_age_pyramid-B2R66DgQ.js} +15 -6
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-CH8SpxS2.js +0 -1829
- package/dist/vue-ui-age-pyramid-B9MUVi75.js +0 -1241
- package/dist/vue-ui-annotator-CmlcWPIm.js +0 -2886
- package/dist/vue-ui-bullet-n8KNnDwh.js +0 -700
- package/dist/vue-ui-candlestick-Bxlvqk49.js +0 -1857
- package/dist/vue-ui-chestnut-ByDKbkG9.js +0 -2014
- package/dist/vue-ui-chord-DQRBgVOx.js +0 -1345
- package/dist/vue-ui-circle-pack-CBBc0HOe.js +0 -1633
- package/dist/vue-ui-donut-DfiocufT.js +0 -2413
- package/dist/vue-ui-donut-evolution-BoqO8By2.js +0 -1550
- package/dist/vue-ui-dumbbell-7M_oUQdi.js +0 -1529
- package/dist/vue-ui-flow-CoylrfnO.js +0 -1215
- package/dist/vue-ui-funnel-DaBYHWIC.js +0 -747
- package/dist/vue-ui-galaxy-BIebStQ3.js +0 -1083
- package/dist/vue-ui-gauge-CwdTmiRP.js +0 -932
- package/dist/vue-ui-heatmap-DXYlGwqR.js +0 -1553
- package/dist/vue-ui-history-plot-CgIELoD2.js +0 -1696
- package/dist/vue-ui-molecule-DeHWkkhy.js +0 -929
- package/dist/vue-ui-nested-donuts-CeAV2xPk.js +0 -1501
- package/dist/vue-ui-onion-B7oFulsQ.js +0 -1233
- package/dist/vue-ui-quadrant-DrKnz37q.js +0 -1965
- package/dist/vue-ui-radar-Bzx69q8f.js +0 -1372
- package/dist/vue-ui-rating-CimC9FQ9.js +0 -359
- package/dist/vue-ui-relation-circle-DIQYyDGb.js +0 -903
- package/dist/vue-ui-ridgeline-CPEnM45x.js +0 -1621
- package/dist/vue-ui-rings-qPL5Iwji.js +0 -1250
- package/dist/vue-ui-scatter-BB0ClTsU.js +0 -2403
- package/dist/vue-ui-smiley-DzPkCMN-.js +0 -376
- package/dist/vue-ui-spark-trend-Ciq7-k_q.js +0 -457
- package/dist/vue-ui-sparkbar-D1M7-naP.js +0 -401
- package/dist/vue-ui-sparkgauge-rsqaeR_n.js +0 -268
- package/dist/vue-ui-sparkhistogram-C4WXt2Ni.js +0 -589
- package/dist/vue-ui-sparkstackbar-DDOXdeV-.js +0 -738
- package/dist/vue-ui-stackbar-C_hMnOLb.js +0 -2353
- package/dist/vue-ui-stackline-BHGi63lD.js +0 -2467
- package/dist/vue-ui-strip-plot-Cygpn-l8.js +0 -1738
- package/dist/vue-ui-table-BQna1wL6.js +0 -1352
- package/dist/vue-ui-table-sparkline-BCuimtk6.js +0 -738
- package/dist/vue-ui-tiremarks-BvjdZwgh.js +0 -538
- package/dist/vue-ui-treemap-C5OpqzSc.js +0 -1731
- package/dist/vue-ui-waffle-B7T_Zzan.js +0 -1619
- package/dist/vue-ui-wheel-D1B0k7IW.js +0 -871
- package/dist/vue-ui-word-cloud-C4pX6jop.js +0 -1708
- package/dist/vue-ui-xy-Ck41KYqF.js +0 -5281
- package/dist/vue-ui-xy-canvas-B_8Mu19r.js +0 -1824
|
@@ -0,0 +1,2405 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, Ct as n, D as r, Dt as i, F as a, Jt as o, Lt as s, P as c, Pt as l, S as u, Ut as d, X as f, Yt as p, Zt as m, _ as ee, b as h, ht as te, i as g, lt as ne, nt as re, q as ie, t as ae, v as oe, w as se, yt as ce } from "./lib-Dql7cqyA.js";
|
|
3
|
+
import { n as le, t as ue } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as de } from "./useConfig-CIQZ6_r7.js";
|
|
5
|
+
import { t as fe } from "./usePrinter-DISD7q5m.js";
|
|
6
|
+
import { n as pe, t as me } from "./BaseScanner-DZvpgOjM.js";
|
|
7
|
+
import { t as he } from "./useNestedProp-Chvyfpl-.js";
|
|
8
|
+
import { t as ge } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as _e } from "./useChartExport-iwOqiIWX.js";
|
|
10
|
+
import { t as ve } from "./useTransitions-g_zBREk2.js";
|
|
11
|
+
import { t as ye } from "./img-DhGApYG0.js";
|
|
12
|
+
import { n as be } from "./Title-CPHi-evi.js";
|
|
13
|
+
import { t as xe } from "./Shape-CIqU-p2F.js";
|
|
14
|
+
import { t as Se } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
15
|
+
import { l as Ce, t as we } from "./useResponsive-ZtArZtUf.js";
|
|
16
|
+
import { t as Te } from "./DefGrad-DVBqDjhO.js";
|
|
17
|
+
import { t as Ee } from "./BaseLegendToggle-CXQrLjd-.js";
|
|
18
|
+
import { t as De } from "./A11yDataTable-DdRsVULz.js";
|
|
19
|
+
import { t as Oe } from "./useUserOptionState-DK-_1ddE.js";
|
|
20
|
+
import { t as ke } from "./useChartAccessibility-DYqac8yF.js";
|
|
21
|
+
import { t as Ae } from "./Legend-X4kF4PvW.js";
|
|
22
|
+
import { t as je } from "./vue_ui_scatter-I0POnicu.js";
|
|
23
|
+
import { Fragment as _, Teleport as Me, computed as v, createBlock as Ne, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createSlots as Pe, createTextVNode as Fe, createVNode as Ie, defineAsyncComponent as Le, guardReactiveProps as S, mergeProps as Re, nextTick as ze, normalizeClass as Be, normalizeProps as C, normalizeStyle as Ve, onBeforeUnmount as He, onMounted as Ue, openBlock as w, ref as T, renderList as E, renderSlot as D, resolveDynamicComponent as We, shallowRef as Ge, toDisplayString as O, toRefs as Ke, unref as k, watch as qe, withCtx as A } from "vue";
|
|
24
|
+
//#region src/components/vue-ui-scatter.vue
|
|
25
|
+
var Je = /* @__PURE__ */ e({ default: () => yn }), Ye = ["id"], Xe = ["id"], Ze = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "sr-only",
|
|
28
|
+
"aria-live": "polite",
|
|
29
|
+
"aria-atomic": "true"
|
|
30
|
+
}, Qe = ["id"], $e = { style: { position: "relative" } }, et = [
|
|
31
|
+
"xmlns",
|
|
32
|
+
"aria-describedby",
|
|
33
|
+
"viewBox"
|
|
34
|
+
], tt = ["width", "height"], nt = { key: 1 }, rt = [
|
|
35
|
+
"x1",
|
|
36
|
+
"x2",
|
|
37
|
+
"y1",
|
|
38
|
+
"y2",
|
|
39
|
+
"stroke",
|
|
40
|
+
"stroke-width"
|
|
41
|
+
], it = [
|
|
42
|
+
"x1",
|
|
43
|
+
"x2",
|
|
44
|
+
"y1",
|
|
45
|
+
"y2",
|
|
46
|
+
"stroke",
|
|
47
|
+
"stroke-width"
|
|
48
|
+
], at = { key: 2 }, ot = [
|
|
49
|
+
"x1",
|
|
50
|
+
"x2",
|
|
51
|
+
"y1",
|
|
52
|
+
"y2",
|
|
53
|
+
"stroke",
|
|
54
|
+
"stroke-width"
|
|
55
|
+
], st = ["opacity"], ct = [
|
|
56
|
+
"stroke",
|
|
57
|
+
"stroke-width",
|
|
58
|
+
"d"
|
|
59
|
+
], lt = [
|
|
60
|
+
"transform",
|
|
61
|
+
"font-size",
|
|
62
|
+
"fill",
|
|
63
|
+
"stroke"
|
|
64
|
+
], ut = { key: 4 }, dt = [
|
|
65
|
+
"x1",
|
|
66
|
+
"x2",
|
|
67
|
+
"y1",
|
|
68
|
+
"y2",
|
|
69
|
+
"stroke",
|
|
70
|
+
"stroke-width"
|
|
71
|
+
], ft = ["opacity"], pt = [
|
|
72
|
+
"d",
|
|
73
|
+
"stroke",
|
|
74
|
+
"stroke-width"
|
|
75
|
+
], mt = [
|
|
76
|
+
"transform",
|
|
77
|
+
"font-size",
|
|
78
|
+
"fill",
|
|
79
|
+
"stroke"
|
|
80
|
+
], ht = { key: 6 }, gt = [
|
|
81
|
+
"x",
|
|
82
|
+
"y",
|
|
83
|
+
"width",
|
|
84
|
+
"height",
|
|
85
|
+
"fill",
|
|
86
|
+
"stroke",
|
|
87
|
+
"stroke-width",
|
|
88
|
+
"rx"
|
|
89
|
+
], _t = [
|
|
90
|
+
"x",
|
|
91
|
+
"y",
|
|
92
|
+
"width",
|
|
93
|
+
"height",
|
|
94
|
+
"onMouseenter"
|
|
95
|
+
], vt = {
|
|
96
|
+
key: 2,
|
|
97
|
+
style: { "pointer-events": "none" }
|
|
98
|
+
}, yt = [
|
|
99
|
+
"x",
|
|
100
|
+
"y",
|
|
101
|
+
"width",
|
|
102
|
+
"height",
|
|
103
|
+
"fill",
|
|
104
|
+
"fill-opacity"
|
|
105
|
+
], bt = [
|
|
106
|
+
"x1",
|
|
107
|
+
"x2",
|
|
108
|
+
"y2",
|
|
109
|
+
"stroke",
|
|
110
|
+
"stroke-dasharray",
|
|
111
|
+
"stroke-width"
|
|
112
|
+
], xt = [
|
|
113
|
+
"x1",
|
|
114
|
+
"x2",
|
|
115
|
+
"y2",
|
|
116
|
+
"stroke",
|
|
117
|
+
"stroke-dasharray",
|
|
118
|
+
"stroke-width"
|
|
119
|
+
], St = [
|
|
120
|
+
"x",
|
|
121
|
+
"y",
|
|
122
|
+
"height",
|
|
123
|
+
"width",
|
|
124
|
+
"fill",
|
|
125
|
+
"stroke",
|
|
126
|
+
"stroke-width",
|
|
127
|
+
"rx"
|
|
128
|
+
], Ct = [
|
|
129
|
+
"x",
|
|
130
|
+
"y",
|
|
131
|
+
"width",
|
|
132
|
+
"height",
|
|
133
|
+
"onMouseenter"
|
|
134
|
+
], wt = {
|
|
135
|
+
key: 2,
|
|
136
|
+
style: { "pointer-events": "none" }
|
|
137
|
+
}, Tt = [
|
|
138
|
+
"x",
|
|
139
|
+
"y",
|
|
140
|
+
"width",
|
|
141
|
+
"height",
|
|
142
|
+
"fill",
|
|
143
|
+
"fill-opacity"
|
|
144
|
+
], Et = [
|
|
145
|
+
"x1",
|
|
146
|
+
"x2",
|
|
147
|
+
"y1",
|
|
148
|
+
"y2",
|
|
149
|
+
"stroke",
|
|
150
|
+
"stroke-dasharray",
|
|
151
|
+
"stroke-width"
|
|
152
|
+
], Dt = [
|
|
153
|
+
"x1",
|
|
154
|
+
"x2",
|
|
155
|
+
"y1",
|
|
156
|
+
"y2",
|
|
157
|
+
"stroke",
|
|
158
|
+
"stroke-dasharray",
|
|
159
|
+
"stroke-width"
|
|
160
|
+
], Ot = {
|
|
161
|
+
key: 0,
|
|
162
|
+
style: { "pointer-events": "none" }
|
|
163
|
+
}, kt = [
|
|
164
|
+
"d",
|
|
165
|
+
"stroke",
|
|
166
|
+
"stroke-width"
|
|
167
|
+
], At = [
|
|
168
|
+
"d",
|
|
169
|
+
"stroke",
|
|
170
|
+
"stroke-width"
|
|
171
|
+
], jt = [
|
|
172
|
+
"d",
|
|
173
|
+
"stroke",
|
|
174
|
+
"stroke-width"
|
|
175
|
+
], Mt = [
|
|
176
|
+
"d",
|
|
177
|
+
"stroke",
|
|
178
|
+
"stroke-width"
|
|
179
|
+
], Nt = { key: 7 }, Pt = [
|
|
180
|
+
"points",
|
|
181
|
+
"fill",
|
|
182
|
+
"stroke-width",
|
|
183
|
+
"stroke-dasharray",
|
|
184
|
+
"stroke"
|
|
185
|
+
], Ft = {
|
|
186
|
+
key: 0,
|
|
187
|
+
class: "vue-ui-scatter-datapoint"
|
|
188
|
+
}, It = [
|
|
189
|
+
"cx",
|
|
190
|
+
"cy",
|
|
191
|
+
"r",
|
|
192
|
+
"fill",
|
|
193
|
+
"stroke",
|
|
194
|
+
"stroke-width",
|
|
195
|
+
"onMouseover",
|
|
196
|
+
"onMouseleave",
|
|
197
|
+
"onClick"
|
|
198
|
+
], Lt = { key: 1 }, Rt = [
|
|
199
|
+
"transform",
|
|
200
|
+
"font-size",
|
|
201
|
+
"fill",
|
|
202
|
+
"onMouseover",
|
|
203
|
+
"onMouseleave",
|
|
204
|
+
"onClick"
|
|
205
|
+
], zt = ["clip-path"], Bt = [
|
|
206
|
+
"d",
|
|
207
|
+
"fill",
|
|
208
|
+
"stroke",
|
|
209
|
+
"stroke-width",
|
|
210
|
+
"stroke-opacity"
|
|
211
|
+
], Vt = {
|
|
212
|
+
key: 0,
|
|
213
|
+
style: { "pointer-events": "none" }
|
|
214
|
+
}, Ht = [
|
|
215
|
+
"x",
|
|
216
|
+
"y",
|
|
217
|
+
"width",
|
|
218
|
+
"height"
|
|
219
|
+
], Ut = {
|
|
220
|
+
key: 0,
|
|
221
|
+
style: { "pointer-events": "none !important" }
|
|
222
|
+
}, Wt = [
|
|
223
|
+
"x1",
|
|
224
|
+
"x2",
|
|
225
|
+
"y1",
|
|
226
|
+
"y2",
|
|
227
|
+
"stroke",
|
|
228
|
+
"stroke-width",
|
|
229
|
+
"stroke-dasharray"
|
|
230
|
+
], Gt = [
|
|
231
|
+
"x1",
|
|
232
|
+
"x2",
|
|
233
|
+
"y1",
|
|
234
|
+
"y2",
|
|
235
|
+
"stroke",
|
|
236
|
+
"stroke-width",
|
|
237
|
+
"stroke-dasharray"
|
|
238
|
+
], Kt = [
|
|
239
|
+
"x",
|
|
240
|
+
"y",
|
|
241
|
+
"font-size",
|
|
242
|
+
"fill",
|
|
243
|
+
"font-weight",
|
|
244
|
+
"text-anchor"
|
|
245
|
+
], qt = [
|
|
246
|
+
"x",
|
|
247
|
+
"y",
|
|
248
|
+
"font-size",
|
|
249
|
+
"fill",
|
|
250
|
+
"font-weight"
|
|
251
|
+
], Jt = [
|
|
252
|
+
"x",
|
|
253
|
+
"y",
|
|
254
|
+
"font-size",
|
|
255
|
+
"fill"
|
|
256
|
+
], Yt = [
|
|
257
|
+
"x",
|
|
258
|
+
"y",
|
|
259
|
+
"font-size",
|
|
260
|
+
"fill"
|
|
261
|
+
], Xt = [
|
|
262
|
+
"cx",
|
|
263
|
+
"cy",
|
|
264
|
+
"r",
|
|
265
|
+
"fill",
|
|
266
|
+
"stroke",
|
|
267
|
+
"stroke-width"
|
|
268
|
+
], Zt = [
|
|
269
|
+
"cx",
|
|
270
|
+
"cy",
|
|
271
|
+
"r",
|
|
272
|
+
"fill",
|
|
273
|
+
"stroke",
|
|
274
|
+
"stroke-width"
|
|
275
|
+
], Qt = [
|
|
276
|
+
"x",
|
|
277
|
+
"y",
|
|
278
|
+
"font-size",
|
|
279
|
+
"fill",
|
|
280
|
+
"font-weight",
|
|
281
|
+
"text-anchor"
|
|
282
|
+
], $t = [
|
|
283
|
+
"id",
|
|
284
|
+
"transform",
|
|
285
|
+
"font-size",
|
|
286
|
+
"font-weight",
|
|
287
|
+
"fill"
|
|
288
|
+
], en = [
|
|
289
|
+
"font-size",
|
|
290
|
+
"fill",
|
|
291
|
+
"transform"
|
|
292
|
+
], tn = [
|
|
293
|
+
"transform",
|
|
294
|
+
"font-size",
|
|
295
|
+
"fill"
|
|
296
|
+
], nn = [
|
|
297
|
+
"x",
|
|
298
|
+
"y",
|
|
299
|
+
"font-size",
|
|
300
|
+
"fill"
|
|
301
|
+
], rn = [
|
|
302
|
+
"x",
|
|
303
|
+
"y",
|
|
304
|
+
"font-size",
|
|
305
|
+
"fill"
|
|
306
|
+
], an = [
|
|
307
|
+
"font-size",
|
|
308
|
+
"font-weight",
|
|
309
|
+
"fill",
|
|
310
|
+
"x",
|
|
311
|
+
"y"
|
|
312
|
+
], on = ["id"], sn = [
|
|
313
|
+
"x",
|
|
314
|
+
"y",
|
|
315
|
+
"width",
|
|
316
|
+
"height"
|
|
317
|
+
], cn = {
|
|
318
|
+
key: 14,
|
|
319
|
+
style: { pointerEvents: "none" }
|
|
320
|
+
}, ln = [
|
|
321
|
+
"x1",
|
|
322
|
+
"x2",
|
|
323
|
+
"y1",
|
|
324
|
+
"y2",
|
|
325
|
+
"stroke-dasharray",
|
|
326
|
+
"stroke",
|
|
327
|
+
"stroke-width",
|
|
328
|
+
"clip-path"
|
|
329
|
+
], un = [
|
|
330
|
+
"x",
|
|
331
|
+
"y",
|
|
332
|
+
"fill",
|
|
333
|
+
"font-size",
|
|
334
|
+
"font-weight"
|
|
335
|
+
], dn = {
|
|
336
|
+
key: 0,
|
|
337
|
+
style: {
|
|
338
|
+
position: "absolute",
|
|
339
|
+
top: "100%",
|
|
340
|
+
left: "0",
|
|
341
|
+
width: "100%"
|
|
342
|
+
},
|
|
343
|
+
"data-dom-to-png-ignore": "",
|
|
344
|
+
"aria-hidden": "true"
|
|
345
|
+
}, fn = {
|
|
346
|
+
key: 6,
|
|
347
|
+
class: "vue-data-ui-watermark"
|
|
348
|
+
}, pn = ["id"], mn = ["onClick"], hn = {
|
|
349
|
+
key: 0,
|
|
350
|
+
style: {
|
|
351
|
+
width: "100%",
|
|
352
|
+
display: "flex",
|
|
353
|
+
"align-items": "center",
|
|
354
|
+
"justify-content": "center"
|
|
355
|
+
}
|
|
356
|
+
}, gn = {
|
|
357
|
+
viewBox: "0 0 20 20",
|
|
358
|
+
height: "20",
|
|
359
|
+
width: "20",
|
|
360
|
+
style: {
|
|
361
|
+
overflow: "hidden",
|
|
362
|
+
background: "transparent"
|
|
363
|
+
}
|
|
364
|
+
}, _n = { key: 0 }, vn = ["innerHTML"], yn = /*#__PURE__*/ Se({
|
|
365
|
+
__name: "vue-ui-scatter",
|
|
366
|
+
props: {
|
|
367
|
+
config: {
|
|
368
|
+
type: Object,
|
|
369
|
+
default() {
|
|
370
|
+
return {};
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
dataset: {
|
|
374
|
+
type: Array,
|
|
375
|
+
default() {
|
|
376
|
+
return [];
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
emits: ["copyAlt", "selectLegend"],
|
|
381
|
+
setup(e, { expose: Se, emit: Je }) {
|
|
382
|
+
let yn = Le(() => import("./Tooltip-hhrkQ3Lk.js")), bn = Le(() => import("./BaseIcon-D8R6_sKH.js").then((e) => e.n)), xn = Le(() => import("./vue-ui-accordion-BSmBUjwZ.js").then((e) => e.n)), Sn = Le(() => import("./DataTable-oiM9uWrQ.js")), Cn = Le(() => import("./PenAndPaper-KFzKlvbi.js").then((e) => e.t)), wn = Le(() => import("./UserOptions-2x4VklMW.js").then((e) => e.n)), Tn = Le(() => import("./PackageVersion-ur6jKRL5.js").then((e) => e.t)), En = Le(() => import("./BaseDraggableDialog-Gm4Q30j0.js").then((e) => e.n)), { vue_ui_scatter: Dn } = de(), { isThemeValid: On, warnInvalidTheme: kn } = ge(), j = e, An = Je, jn = v(() => !!j.dataset && j.dataset.length), M = T(ie()), Mn = T(!1), Nn = T(""), Pn = T(0), Fn = T(null), In = T(null), Ln = T(null), Rn = T(null), zn = T(null), Bn = T(0), Vn = T(0), Hn = T(0), N = T([]), Un = T(!1), Wn = T(null), Gn = T(null), Kn = T(null), qn = T(null), Jn = T(null), Yn = T(null), Xn = T(null), Zn = T(null), Qn = T(null), $n = T(null), er = T(null), tr = T({
|
|
383
|
+
x: 0,
|
|
384
|
+
y: 0
|
|
385
|
+
}), nr = T("pointer"), rr = T(!1), ir = T(null), P = T(gr()), F = v(() => P.value.userOptions), I = v(() => P.value.style.layout.dataLabels.xAxis), L = v(() => P.value.style.layout.dataLabels.yAxis), R = v(() => P.value.style.layout.marginalBars), z = v(() => P.value.style.layout.plots), B = v(() => P.value.style.tooltip), V = v(() => P.value.style);
|
|
386
|
+
le({
|
|
387
|
+
config: () => P.value,
|
|
388
|
+
dataset: () => j.dataset,
|
|
389
|
+
component: "VueUiScatter",
|
|
390
|
+
rules: [ue.emptyArray, {
|
|
391
|
+
test: (e) => e.length > 6,
|
|
392
|
+
message: [
|
|
393
|
+
"👀 The number of series (clusters) is > 6. Consider:",
|
|
394
|
+
"",
|
|
395
|
+
"",
|
|
396
|
+
"▶️ Using filters to let users choose a maximum number of series (clusters) to display."
|
|
397
|
+
]
|
|
398
|
+
}]
|
|
399
|
+
});
|
|
400
|
+
let { transitionEnabled: ar } = ve({
|
|
401
|
+
config: () => P.value.transitions,
|
|
402
|
+
dataset: () => j.dataset
|
|
403
|
+
}), or = v(() => P.value.userOptions.useCursorPointer);
|
|
404
|
+
function sr(e = 100, t = .8, n = {}) {
|
|
405
|
+
let { meanX: r = 0, sdX: i = 1, meanY: a = 0, sdY: o = 1, seed: s } = n, c = (s ?? Math.floor(Math.random() * 2 ** 31)) >>> 0, l = () => (c = c * 1664525 + 1013904223 >>> 0, c / 2 ** 32), u = () => {
|
|
406
|
+
let e = 0, t = 0;
|
|
407
|
+
for (; e === 0;) e = l();
|
|
408
|
+
for (; t === 0;) t = l();
|
|
409
|
+
return Math.sqrt(-2 * Math.log(e)) * Math.cos(2 * Math.PI * t);
|
|
410
|
+
}, d = e / 2, f = Array.from({ length: d }, u), p = Array.from({ length: d }, u), m = (e) => e.reduce((e, t) => e + t, 0) / e.length, ee = m(f), h = m(p);
|
|
411
|
+
for (let e = 0; e < d; e += 1) f[e] -= ee, p[e] -= h;
|
|
412
|
+
let te = (e, t) => e.reduce((e, n, r) => e + n * t[r], 0), g = (e) => te(e, e), ne = te(p, f) / g(f), re = p.map((e, t) => e - ne * f[t]), ie = g(f) / d, ae = g(re) / d, oe = Math.sqrt((1 - t * t) * ie / ae), se = f.map((e, n) => t * e + oe * re[n]), ce = f.concat(f.map((e) => -e)), le = se.concat(se.map((e) => -e)), ue = (e) => Math.sqrt(g(e) / e.length), de = (e, t, n) => {
|
|
413
|
+
let r = ue(e);
|
|
414
|
+
return e.map((e) => n + (r ? e / r * t : 0));
|
|
415
|
+
}, fe = de(ce, i, r), pe = de(le, o, a);
|
|
416
|
+
for (let e = fe.length - 1; e > 0; --e) {
|
|
417
|
+
let t = Math.floor(l() * (e + 1));
|
|
418
|
+
[fe[e], fe[t]] = [fe[t], fe[e]], [pe[e], pe[t]] = [pe[t], pe[e]];
|
|
419
|
+
}
|
|
420
|
+
return fe.map((e, t) => ({
|
|
421
|
+
x: e,
|
|
422
|
+
y: pe[t]
|
|
423
|
+
}));
|
|
424
|
+
}
|
|
425
|
+
let cr = v(() => m({
|
|
426
|
+
defaultConfig: {
|
|
427
|
+
userOptions: { show: !1 },
|
|
428
|
+
table: { show: !1 },
|
|
429
|
+
useCssAnimation: !1,
|
|
430
|
+
style: {
|
|
431
|
+
backgroundColor: "#99999930",
|
|
432
|
+
layout: {
|
|
433
|
+
axis: { stroke: "#6A6A6A" },
|
|
434
|
+
correlation: { label: { show: !1 } },
|
|
435
|
+
dataLabels: {
|
|
436
|
+
xAxis: { show: !1 },
|
|
437
|
+
yAxis: { show: !1 }
|
|
438
|
+
},
|
|
439
|
+
marginalBars: { fill: "#99999960" },
|
|
440
|
+
padding: {
|
|
441
|
+
top: 12,
|
|
442
|
+
right: 12,
|
|
443
|
+
bottom: 12,
|
|
444
|
+
left: 12
|
|
445
|
+
},
|
|
446
|
+
plots: { stroke: "#6A6A6A" }
|
|
447
|
+
},
|
|
448
|
+
legend: { backgroundColor: "transparent" }
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
userConfig: P.value.skeletonConfig ?? {}
|
|
452
|
+
})), { loading: lr, FINAL_DATASET: ur, manualLoading: dr } = pe({
|
|
453
|
+
...Ke(j),
|
|
454
|
+
FINAL_CONFIG: P,
|
|
455
|
+
prepareConfig: gr,
|
|
456
|
+
skeletonDataset: j.config?.skeletonDataset ?? [{
|
|
457
|
+
name: "",
|
|
458
|
+
color: "#999999",
|
|
459
|
+
values: sr(100, .5, { seed: 42 })
|
|
460
|
+
}],
|
|
461
|
+
skeletonConfig: m({
|
|
462
|
+
defaultConfig: P.value,
|
|
463
|
+
userConfig: cr.value
|
|
464
|
+
})
|
|
465
|
+
}), { userOptionsVisible: fr, setUserOptionsVisibility: pr, keepUserOptionState: mr } = Oe({ config: P.value }), { svgRef: hr } = ke({ config: V.value.title });
|
|
466
|
+
function gr() {
|
|
467
|
+
let e = he({
|
|
468
|
+
userConfig: j.config,
|
|
469
|
+
defaultConfig: Dn
|
|
470
|
+
}), t = e.theme;
|
|
471
|
+
if (!t) return e;
|
|
472
|
+
if (!On.value(e)) return kn(e), e;
|
|
473
|
+
let n = he({
|
|
474
|
+
userConfig: je[t] || j.config,
|
|
475
|
+
defaultConfig: e
|
|
476
|
+
}), r = he({
|
|
477
|
+
userConfig: j.config,
|
|
478
|
+
defaultConfig: n
|
|
479
|
+
});
|
|
480
|
+
return {
|
|
481
|
+
...r,
|
|
482
|
+
customPalette: r.customPalette.length ? r.customPalette : p[t] || s
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
qe(() => j.config, (e) => {
|
|
486
|
+
lr.value || (P.value = gr()), fr.value = !P.value.userOptions.showOnChartHover, br(), Bn.value += 1, Vn.value += 1, Hn.value += 1, H.value.showTable = P.value.table.show, H.value.showTooltip = B.value.show, yr.value && P.value.usePerformanceMode && console.warn("VueUiScatter : You are using performance mode\n\n- downsampling is disabled in this mode, all plots are rendered\n\n- plot significance is not active in this mode (all plots have the same opacity) \n\n- Depending on plot density, shapes might not display a border (stroke) to avoid fuzziness \n\nℹ️ To remove this warning, set config.debug to false.");
|
|
487
|
+
}, { deep: !0 }), qe(() => j.dataset, (e) => {
|
|
488
|
+
Array.isArray(e) && e.length > 0 && (dr.value = !1);
|
|
489
|
+
}, { deep: !0 });
|
|
490
|
+
let _r = Ge(null), vr = Ge(null);
|
|
491
|
+
Ue(async () => {
|
|
492
|
+
br(), await ze(), Un.value = !0;
|
|
493
|
+
});
|
|
494
|
+
let yr = v(() => P.value.debug);
|
|
495
|
+
function br() {
|
|
496
|
+
if (l(j.dataset) && (re({
|
|
497
|
+
componentName: "VueUiScatter",
|
|
498
|
+
type: "dataset",
|
|
499
|
+
debug: yr.value
|
|
500
|
+
}), dr.value = !0), l(j.dataset) || (dr.value = P.value.loading), P.value.responsive) {
|
|
501
|
+
let e = Ce(() => {
|
|
502
|
+
let { width: e, height: t } = we({
|
|
503
|
+
chart: Fn.value,
|
|
504
|
+
title: V.value.title.text ? In.value : null,
|
|
505
|
+
legend: V.value.legend.show ? Ln.value : null,
|
|
506
|
+
source: Rn.value,
|
|
507
|
+
noTitle: zn.value
|
|
508
|
+
});
|
|
509
|
+
requestAnimationFrame(() => {
|
|
510
|
+
U.value.width = e, U.value.height = t;
|
|
511
|
+
});
|
|
512
|
+
});
|
|
513
|
+
_r.value && (vr.value && _r.value.unobserve(vr.value), _r.value.disconnect()), _r.value = new ResizeObserver(e), vr.value = Fn.value.parentNode, _r.value.observe(vr.value);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
He(() => {
|
|
517
|
+
_r.value && (vr.value && _r.value.unobserve(vr.value), _r.value.disconnect());
|
|
518
|
+
});
|
|
519
|
+
let { isPrinting: xr, isImaging: Sr, generatePdf: Cr, generateImage: wr } = fe({
|
|
520
|
+
elementId: `vue-ui-scatter_${M.value}`,
|
|
521
|
+
fileName: V.value.title.text || "vue-ui-scatter",
|
|
522
|
+
options: P.value.userOptions.print
|
|
523
|
+
}), Tr = v(() => P.value.userOptions.show && !V.value.title.text), Er = v(() => se(P.value.customPalette)), H = T({
|
|
524
|
+
showTable: P.value.table.show,
|
|
525
|
+
showTooltip: B.value.show
|
|
526
|
+
});
|
|
527
|
+
qe(P, () => {
|
|
528
|
+
H.value = {
|
|
529
|
+
showTable: P.value.table.show,
|
|
530
|
+
showTooltip: B.value.show
|
|
531
|
+
};
|
|
532
|
+
}, { immediate: !0 });
|
|
533
|
+
let U = T({
|
|
534
|
+
height: V.value.layout.height,
|
|
535
|
+
width: V.value.layout.width
|
|
536
|
+
}), Dr = v(() => R.value.show ? R.value.size + R.value.offset : 0);
|
|
537
|
+
function Or() {
|
|
538
|
+
let e = 0;
|
|
539
|
+
if (L.value.scales.show && Qn.value) try {
|
|
540
|
+
e = Array.from(Qn.value.querySelectorAll("text")).reduce((e, t) => {
|
|
541
|
+
let n = t.getComputedTextLength();
|
|
542
|
+
return n > e ? n : e;
|
|
543
|
+
}, 0);
|
|
544
|
+
} catch {
|
|
545
|
+
e = 0;
|
|
546
|
+
}
|
|
547
|
+
let t = 0;
|
|
548
|
+
if (Jn.value) try {
|
|
549
|
+
t = Jn.value.getBBox().width;
|
|
550
|
+
} catch {
|
|
551
|
+
t = 0;
|
|
552
|
+
}
|
|
553
|
+
return Math.max(t, e ? e + 12 : 0);
|
|
554
|
+
}
|
|
555
|
+
function kr() {
|
|
556
|
+
let e = 0;
|
|
557
|
+
if (Yn.value) try {
|
|
558
|
+
let t = Yn.value.getBBox(), n = t.x + t.width - U.value.width;
|
|
559
|
+
e = n > 0 ? n + 6 : 0;
|
|
560
|
+
} catch {
|
|
561
|
+
e = 0;
|
|
562
|
+
}
|
|
563
|
+
let t = 0;
|
|
564
|
+
if (I.value.scales.show && $n.value) try {
|
|
565
|
+
t = Array.from($n.value.querySelectorAll("text")).reduce((e, t) => {
|
|
566
|
+
let n = t.getBBox(), r = n.x + n.width - U.value.width, i = r > 0 ? r + 6 : 0;
|
|
567
|
+
return i > e ? i : e;
|
|
568
|
+
}, 0);
|
|
569
|
+
} catch {
|
|
570
|
+
t = 0;
|
|
571
|
+
}
|
|
572
|
+
return e > t ? e : t;
|
|
573
|
+
}
|
|
574
|
+
let W = v(() => {
|
|
575
|
+
let e = 0, t = 0, n = 0;
|
|
576
|
+
if (e = Or(), t = kr(), Zn.value) try {
|
|
577
|
+
n = Zn.value.getBBox().height + 6;
|
|
578
|
+
} catch {
|
|
579
|
+
n = 0;
|
|
580
|
+
}
|
|
581
|
+
return {
|
|
582
|
+
top: V.value.layout.padding.top + Dr.value + L.value.fontSize * 2,
|
|
583
|
+
right: U.value.width - V.value.layout.padding.right - Dr.value - 6 - t,
|
|
584
|
+
bottom: U.value.height - V.value.layout.padding.bottom - n,
|
|
585
|
+
left: V.value.layout.padding.left + e,
|
|
586
|
+
height: U.value.height - V.value.layout.padding.top - V.value.layout.padding.bottom - Dr.value - n - L.value.fontSize * 2,
|
|
587
|
+
width: U.value.width - V.value.layout.padding.left - V.value.layout.padding.right - Dr.value - e - t - 6
|
|
588
|
+
};
|
|
589
|
+
}), Ar = v(() => {
|
|
590
|
+
yr.value && ur.value.forEach((e, t) => {
|
|
591
|
+
te({
|
|
592
|
+
datasetObject: e,
|
|
593
|
+
requiredAttributes: ["values"]
|
|
594
|
+
}).forEach((e) => {
|
|
595
|
+
re({
|
|
596
|
+
componentName: "VueUiScatter",
|
|
597
|
+
type: "datasetSerieAttribute",
|
|
598
|
+
property: e,
|
|
599
|
+
index: t
|
|
600
|
+
});
|
|
601
|
+
}), e.values && e.values.forEach((e, n) => {
|
|
602
|
+
te({
|
|
603
|
+
datasetObject: e,
|
|
604
|
+
requiredAttributes: ["x", "y"]
|
|
605
|
+
}).forEach((e) => {
|
|
606
|
+
re({
|
|
607
|
+
componentName: "VueUiScatter",
|
|
608
|
+
type: "datasetSerieAttribute",
|
|
609
|
+
property: `values.${e}`,
|
|
610
|
+
index: `${t} - ${n}`
|
|
611
|
+
});
|
|
612
|
+
});
|
|
613
|
+
});
|
|
614
|
+
});
|
|
615
|
+
let e = Math.min(...Ur.value.filter((e) => !N.value.includes(e.id)).flatMap((e) => e.values.map((e) => e.x))), t = Math.max(...Ur.value.filter((e) => !N.value.includes(e.id)).flatMap((e) => e.values.map((e) => e.x))), n = Math.min(...Ur.value.filter((e) => !N.value.includes(e.id)).flatMap((e) => e.values.map((e) => e.y))), r = Math.max(...Ur.value.filter((e) => !N.value.includes(e.id)).flatMap((e) => e.values.map((e) => e.y)));
|
|
616
|
+
return {
|
|
617
|
+
xMin: e < 0 ? e : 0,
|
|
618
|
+
xMax: t,
|
|
619
|
+
yMin: n < 0 ? n : 0,
|
|
620
|
+
yMax: r
|
|
621
|
+
};
|
|
622
|
+
}), jr = v(() => {
|
|
623
|
+
let e = V.value.layout.axis;
|
|
624
|
+
return {
|
|
625
|
+
xMin: e.xMin !== null && e.xMin !== void 0 ? e.xMin : Ar.value.xMin,
|
|
626
|
+
xMax: e.xMax !== null && e.xMax !== void 0 ? e.xMax : Ar.value.xMax,
|
|
627
|
+
yMin: e.yMin !== null && e.yMin !== void 0 ? e.yMin : Ar.value.yMin,
|
|
628
|
+
yMax: e.yMax !== null && e.yMax !== void 0 ? e.yMax : Ar.value.yMax
|
|
629
|
+
};
|
|
630
|
+
});
|
|
631
|
+
function Mr(e) {
|
|
632
|
+
return Number.isFinite(e) ? e < 2 ? 2 : Math.trunc(e) : 5;
|
|
633
|
+
}
|
|
634
|
+
function Nr(e) {
|
|
635
|
+
return e.roundingValue !== void 0 && e.roundingValue !== null ? e.roundingValue : e.rounding !== void 0 && e.rounding !== null ? e.rounding : 0;
|
|
636
|
+
}
|
|
637
|
+
function Pr({ minimum: e, maximum: t, stepCount: n, useNiceScale: r }) {
|
|
638
|
+
let i = Mr(n);
|
|
639
|
+
if (e === t) {
|
|
640
|
+
let n = t + (e === 0 ? 1 : Math.abs(e) * .01);
|
|
641
|
+
return (r ? ee : oe)(e, n, i);
|
|
642
|
+
}
|
|
643
|
+
return (r ? ee : oe)(e, t, i);
|
|
644
|
+
}
|
|
645
|
+
let Fr = v(() => {
|
|
646
|
+
let e = I.value;
|
|
647
|
+
return Pr({
|
|
648
|
+
minimum: jr.value.xMin,
|
|
649
|
+
maximum: jr.value.xMax,
|
|
650
|
+
stepCount: e.scales.steps,
|
|
651
|
+
useNiceScale: e.scales.useNiceScale
|
|
652
|
+
});
|
|
653
|
+
}), Ir = v(() => {
|
|
654
|
+
let e = L.value;
|
|
655
|
+
return Pr({
|
|
656
|
+
minimum: jr.value.yMin,
|
|
657
|
+
maximum: jr.value.yMax,
|
|
658
|
+
stepCount: e.scales.steps,
|
|
659
|
+
useNiceScale: e.scales.useNiceScale
|
|
660
|
+
});
|
|
661
|
+
}), G = v(() => ({
|
|
662
|
+
xMin: Fr.value.min,
|
|
663
|
+
xMax: Fr.value.max,
|
|
664
|
+
yMin: Ir.value.min,
|
|
665
|
+
yMax: Ir.value.max
|
|
666
|
+
})), Lr = v(() => {
|
|
667
|
+
let e = I.value, t = e.scales.labels;
|
|
668
|
+
return Fr.value.ticks.map((n) => ({
|
|
669
|
+
value: n,
|
|
670
|
+
x: Vr(n),
|
|
671
|
+
label: g(t.formatter, h(n), f({
|
|
672
|
+
p: z.value.selectors.labels.prefix,
|
|
673
|
+
v: h(n),
|
|
674
|
+
s: z.value.selectors.labels.suffix,
|
|
675
|
+
r: Nr(e)
|
|
676
|
+
}))
|
|
677
|
+
}));
|
|
678
|
+
}), Rr = v(() => {
|
|
679
|
+
let e = L.value, t = e.scales.labels;
|
|
680
|
+
return Ir.value.ticks.map((n) => ({
|
|
681
|
+
value: n,
|
|
682
|
+
y: Hr(n),
|
|
683
|
+
label: g(t.formatter, h(n), f({
|
|
684
|
+
p: z.value.selectors.labels.prefix,
|
|
685
|
+
v: h(n),
|
|
686
|
+
s: z.value.selectors.labels.suffix,
|
|
687
|
+
r: Nr(e)
|
|
688
|
+
}))
|
|
689
|
+
}));
|
|
690
|
+
}), zr = v(() => ni.value.length > 0 && I.value.scales.show), Br = v(() => ni.value.length > 0 && L.value.scales.show);
|
|
691
|
+
function Vr(e) {
|
|
692
|
+
let t = G.value.xMax - G.value.xMin;
|
|
693
|
+
return t === 0 ? W.value.left : W.value.left + (e - G.value.xMin) / t * W.value.width;
|
|
694
|
+
}
|
|
695
|
+
function Hr(e) {
|
|
696
|
+
let t = G.value.yMax - G.value.yMin;
|
|
697
|
+
return t === 0 ? W.value.bottom : W.value.bottom - (e - G.value.yMin) / t * W.value.height;
|
|
698
|
+
}
|
|
699
|
+
let K = v(() => {
|
|
700
|
+
let { xMin: e, xMax: t, yMin: n, yMax: r } = G.value, i = e > 0 ? e : t < 0 ? t : 0, a = n > 0 ? n : r < 0 ? r : 0;
|
|
701
|
+
return {
|
|
702
|
+
x: Vr(i),
|
|
703
|
+
y: Hr(a)
|
|
704
|
+
};
|
|
705
|
+
}), Ur = v(() => ur.value.map((e, t) => {
|
|
706
|
+
let n = `cluster_${M.value}_${t}`;
|
|
707
|
+
return {
|
|
708
|
+
...e,
|
|
709
|
+
values: i({
|
|
710
|
+
data: e.values,
|
|
711
|
+
threshold: P.value.usePerformanceMode ? e.values.length + 1 : P.value.downsample.threshold
|
|
712
|
+
}),
|
|
713
|
+
id: n,
|
|
714
|
+
color: e.color ? e.color : Er.value[t] || s[t] || s[t % s.length],
|
|
715
|
+
opacity: N.value.includes(n) ? .5 : 1,
|
|
716
|
+
shape: e.shape ?? "circle",
|
|
717
|
+
segregate: () => li(n),
|
|
718
|
+
isSegregated: N.value.includes(n),
|
|
719
|
+
hasGroupSelection: !!Zr.value,
|
|
720
|
+
isGroupSelected: Zr.value === n,
|
|
721
|
+
onEnter: () => $r(n),
|
|
722
|
+
onLeave: () => ei()
|
|
723
|
+
};
|
|
724
|
+
})), Wr = v(() => ({
|
|
725
|
+
cy: "scatter-div-legend",
|
|
726
|
+
backgroundColor: V.value.legend.backgroundColor,
|
|
727
|
+
color: V.value.legend.color,
|
|
728
|
+
fontSize: V.value.legend.fontSize,
|
|
729
|
+
paddingBottom: 12,
|
|
730
|
+
fontWeight: V.value.legend.bold ? "bold" : ""
|
|
731
|
+
})), Gr = v(() => Ur.value.map((e, t) => ({
|
|
732
|
+
...e,
|
|
733
|
+
plots: e.values.map((n, r) => ({
|
|
734
|
+
x: Vr(n.x),
|
|
735
|
+
y: Hr(n.y),
|
|
736
|
+
v: {
|
|
737
|
+
...n,
|
|
738
|
+
name: n.name || ""
|
|
739
|
+
},
|
|
740
|
+
clusterName: e.name,
|
|
741
|
+
clusterId: e.id,
|
|
742
|
+
color: e.color ? e.color : Er.value[t] || s[t] || s[t % s.length],
|
|
743
|
+
id: `plot_${M.value}_${t}_${r}`,
|
|
744
|
+
weight: n.weight ?? z.value.radius
|
|
745
|
+
}))
|
|
746
|
+
})).filter((e) => !N.value.includes(e.id))), q = v(() => {
|
|
747
|
+
let e = 1e-9, t = ({ m: t, b: n, rect: r, verticalX: i = null }) => {
|
|
748
|
+
let { left: a, right: o, top: s, bottom: c } = r, l = [], u = (e, t) => {
|
|
749
|
+
Number.isFinite(e) && Number.isFinite(t) && l.push({
|
|
750
|
+
x: e,
|
|
751
|
+
y: t
|
|
752
|
+
});
|
|
753
|
+
}, d = ({ x: t, y: n }) => t >= a - e && t <= o + e && n >= s - e && n <= c + e;
|
|
754
|
+
i === null ? Number.isFinite(t) && (u(a, t * a + n), u(o, t * o + n), Math.abs(t) > e ? (u((s - n) / t, s), u((c - n) / t, c)) : n >= s - e && n <= c + e && (u(a, n), u(o, n))) : i >= a - e && i <= o + e && (u(i, s), u(i, c));
|
|
755
|
+
let f = l.filter(d), p = [];
|
|
756
|
+
for (let e of f) p.some((t) => Math.abs(t.x - e.x) < 1e-6 && Math.abs(t.y - e.y) < 1e-6) || p.push(e);
|
|
757
|
+
if (p.length < 2) return null;
|
|
758
|
+
let m = p[0], ee = p[1], h = 0;
|
|
759
|
+
for (let e = 0; e < p.length; e += 1) for (let t = e + 1; t < p.length; t += 1) {
|
|
760
|
+
let n = p[e].x - p[t].x, r = p[e].y - p[t].y, i = n * n + r * r;
|
|
761
|
+
i > h && (h = i, m = p[e], ee = p[t]);
|
|
762
|
+
}
|
|
763
|
+
return {
|
|
764
|
+
x1: m.x,
|
|
765
|
+
y1: m.y,
|
|
766
|
+
x2: ee.x,
|
|
767
|
+
y2: ee.y
|
|
768
|
+
};
|
|
769
|
+
};
|
|
770
|
+
return Gr.value.map((n) => {
|
|
771
|
+
let r = n.plots.length, i = n.plots.reduce((e, t) => e + t.x, 0) / r, a = n.plots.reduce((e, t) => e + t.y, 0) / r, o = 0, s = 0, c = 0;
|
|
772
|
+
for (let e of n.plots) {
|
|
773
|
+
let t = e.x - i, n = e.y - a;
|
|
774
|
+
o += t * n, s += t * t, c += n * n;
|
|
775
|
+
}
|
|
776
|
+
let l, d, f = null;
|
|
777
|
+
s < e ? (f = i, l = Infinity, d = null) : (l = o / s, d = a - l * i);
|
|
778
|
+
let p, m;
|
|
779
|
+
f === null ? (p = l, m = d) : (p = Infinity, m = null);
|
|
780
|
+
let ee = n.plots.every((e) => e.v && typeof e.v.x == "number" && typeof e.v.y == "number"), h = NaN;
|
|
781
|
+
if (r >= 2) {
|
|
782
|
+
let t = 0, o = 0;
|
|
783
|
+
ee ? (t = n.plots.reduce((e, t) => e + t.v.x, 0) / r, o = n.plots.reduce((e, t) => e + t.v.y, 0) / r) : (t = i, o = -a);
|
|
784
|
+
let s = 0, c = 0, l = 0;
|
|
785
|
+
for (let e of n.plots) {
|
|
786
|
+
let n = ee ? e.v.x : e.x, r = ee ? e.v.y : -e.y, i = n - t, a = r - o;
|
|
787
|
+
s += i * a, c += i * i, l += a * a;
|
|
788
|
+
}
|
|
789
|
+
if (c >= e && l >= e) {
|
|
790
|
+
let e = s / Math.sqrt(c * l);
|
|
791
|
+
h = Math.max(-1, Math.min(1, e));
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
let te = t({
|
|
795
|
+
m: p,
|
|
796
|
+
b: m,
|
|
797
|
+
rect: W.value,
|
|
798
|
+
verticalX: f
|
|
799
|
+
});
|
|
800
|
+
if (!te) return {
|
|
801
|
+
...n,
|
|
802
|
+
correlation: null,
|
|
803
|
+
label: null,
|
|
804
|
+
plots: n.plots.map((e) => ({
|
|
805
|
+
...e,
|
|
806
|
+
deviation: 0,
|
|
807
|
+
shape: n.shape,
|
|
808
|
+
color: u(n.color)
|
|
809
|
+
}))
|
|
810
|
+
};
|
|
811
|
+
let g = {
|
|
812
|
+
x: (te.x1 + te.x2) / 2,
|
|
813
|
+
y: (te.y1 + te.y2) / 2
|
|
814
|
+
};
|
|
815
|
+
return {
|
|
816
|
+
...n,
|
|
817
|
+
color: u(n.color),
|
|
818
|
+
correlation: {
|
|
819
|
+
...te,
|
|
820
|
+
coefficient: h
|
|
821
|
+
},
|
|
822
|
+
label: g,
|
|
823
|
+
plots: n.plots.map((t) => {
|
|
824
|
+
let r, i;
|
|
825
|
+
f === null ? Math.abs(p) < e ? (r = t.x, i = m) : (r = (t.x + p * t.y - p * m) / (1 + p * p), i = (p * t.x + p * p * t.y + m) / (1 + p * p)) : (r = f, i = t.y);
|
|
826
|
+
let a = t.x - r, o = t.y - i, s = Math.sqrt(a * a + o * o);
|
|
827
|
+
return {
|
|
828
|
+
...t,
|
|
829
|
+
deviation: s,
|
|
830
|
+
shape: n.shape,
|
|
831
|
+
color: u(n.color)
|
|
832
|
+
};
|
|
833
|
+
})
|
|
834
|
+
};
|
|
835
|
+
});
|
|
836
|
+
}), Kr = v(() => Math.max(...q.value.flatMap((e) => e.plots.map((e) => Math.abs(e.deviation)))));
|
|
837
|
+
function qr() {
|
|
838
|
+
return q.value;
|
|
839
|
+
}
|
|
840
|
+
function Jr(e, t) {
|
|
841
|
+
let n = Array.isArray(e) ? e.flatMap((e) => e.plots.map((e) => ({
|
|
842
|
+
x: e.x,
|
|
843
|
+
y: e.y
|
|
844
|
+
}))) : e.plots.map((e) => ({
|
|
845
|
+
x: e.x,
|
|
846
|
+
y: e.y
|
|
847
|
+
})), r = Infinity, i = -Infinity, a = Infinity, o = -Infinity;
|
|
848
|
+
n.forEach(({ x: e, y: t }) => {
|
|
849
|
+
r = Math.min(r, e), i = Math.max(i, e), a = Math.min(a, t), o = Math.max(o, t);
|
|
850
|
+
});
|
|
851
|
+
let s = i - r, c = o - a, l = s / t, u = c / t, d = Array(t).fill(0), f = Array(t).fill(0);
|
|
852
|
+
n.forEach(({ x: e, y: t }) => {
|
|
853
|
+
let n = Math.floor((e - r) / l), i = Math.floor((t - a) / u);
|
|
854
|
+
d[n] || (d[n] = 0), f[i] || (f[i] = 0), d[n] += 1, f[i] += 1;
|
|
855
|
+
});
|
|
856
|
+
let p = [], m = [];
|
|
857
|
+
for (let e = 0; e < t; e += 1) p.push(r + (e + .5) * l), m.push(a + (e + .5) * u);
|
|
858
|
+
return {
|
|
859
|
+
x: d,
|
|
860
|
+
y: f,
|
|
861
|
+
avgX: p,
|
|
862
|
+
avgY: m,
|
|
863
|
+
maxX: Math.max(...d),
|
|
864
|
+
maxY: Math.max(...f)
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
let J = v(() => R.value.tranches), Y = v(() => Jr(Gr.value, J.value)), Yr = v(() => {
|
|
868
|
+
let e = W.value.top - R.value.offset, t = W.value.right + R.value.offset;
|
|
869
|
+
return Gr.value.map((n) => {
|
|
870
|
+
let r = Jr(n, J.value);
|
|
871
|
+
return {
|
|
872
|
+
coords: r,
|
|
873
|
+
dX: c(r.avgX.map((t, n) => ({
|
|
874
|
+
x: t,
|
|
875
|
+
y: e - r.x[n] / r.maxX * R.value.size
|
|
876
|
+
}))),
|
|
877
|
+
dY: a(r.avgY.map((e, n) => ({
|
|
878
|
+
y: e,
|
|
879
|
+
x: t + R.value.size * r.y[n] / r.maxY
|
|
880
|
+
}))),
|
|
881
|
+
color: n.color,
|
|
882
|
+
id: n.id
|
|
883
|
+
};
|
|
884
|
+
});
|
|
885
|
+
}), X = T(void 0), Z = T(null), Q = T([]), Xr = T(null), Zr = T(void 0);
|
|
886
|
+
function Qr() {
|
|
887
|
+
Mn.value = !1, X.value = void 0, Q.value = [], Z.value = null, ir.value = null, er.value = null, Zr.value = void 0;
|
|
888
|
+
}
|
|
889
|
+
function $r(e) {
|
|
890
|
+
let t = q.value.find((t) => t.id === e);
|
|
891
|
+
if (!t) {
|
|
892
|
+
Q.value = [];
|
|
893
|
+
return;
|
|
894
|
+
}
|
|
895
|
+
Q.value = t.plots.map((e) => e.id), Zr.value = e;
|
|
896
|
+
}
|
|
897
|
+
function ei() {
|
|
898
|
+
Q.value = [], Zr.value = void 0;
|
|
899
|
+
}
|
|
900
|
+
function ti(e) {
|
|
901
|
+
if (!hr.value || !e) return;
|
|
902
|
+
let t = o(e.x, e.y, hr.value);
|
|
903
|
+
t && (tr.value = t);
|
|
904
|
+
}
|
|
905
|
+
let ni = v(() => Z.value ? [Z.value] : Q.value.length ? q.value.flatMap((e) => e.plots).filter((e) => Q.value.includes(e.id)) : []);
|
|
906
|
+
function ri(e) {
|
|
907
|
+
let t = I.value, n = t.scales.labels;
|
|
908
|
+
return g(n.formatter, h(e.v.x), f({
|
|
909
|
+
p: z.value.selectors.labels.prefix,
|
|
910
|
+
v: h(e.v.x),
|
|
911
|
+
s: z.value.selectors.labels.suffix,
|
|
912
|
+
r: Nr(t)
|
|
913
|
+
}), { datapoint: e });
|
|
914
|
+
}
|
|
915
|
+
function ii(e) {
|
|
916
|
+
let t = L.value, n = t.scales.labels;
|
|
917
|
+
return g(n.formatter, h(e.v.y), f({
|
|
918
|
+
p: z.value.selectors.labels.prefix,
|
|
919
|
+
v: h(e.v.y),
|
|
920
|
+
s: z.value.selectors.labels.suffix,
|
|
921
|
+
r: Nr(t)
|
|
922
|
+
}), { datapoint: e });
|
|
923
|
+
}
|
|
924
|
+
function ai(e, t, r = "pointer", i = null) {
|
|
925
|
+
X.value = e.id, Z.value = e, nr.value = r, ir.value = i, er.value = e.id;
|
|
926
|
+
let a = "";
|
|
927
|
+
P.value.events.datapointEnter && P.value.events.datapointEnter({
|
|
928
|
+
datapoint: e,
|
|
929
|
+
seriesIndex: t
|
|
930
|
+
}), Xr.value = {
|
|
931
|
+
datapoint: e,
|
|
932
|
+
seriesIndex: t,
|
|
933
|
+
series: q.value,
|
|
934
|
+
config: P.value
|
|
935
|
+
};
|
|
936
|
+
let o = B.value.customFormat;
|
|
937
|
+
n(o) && ne(() => o({
|
|
938
|
+
datapoint: e,
|
|
939
|
+
seriesIndex: t,
|
|
940
|
+
series: q.value,
|
|
941
|
+
config: P.value
|
|
942
|
+
})) ? Nn.value = o({
|
|
943
|
+
datapoint: e,
|
|
944
|
+
seriesIndex: t,
|
|
945
|
+
series: q.value,
|
|
946
|
+
config: P.value
|
|
947
|
+
}) : (e.clusterName && (a += `<div style="display:flex;gap:3px;align-items:center">${e.clusterName}</div>`), e.v.name && (a += `<div>${e.v.name}</div>`), a += `<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${B.value.borderColor}">`, a += `<div>${I.value.name}: <b>${isNaN(e.v.x) ? "-" : g(z.value.selectors.labels.x.formatter, e.v.x, f({
|
|
948
|
+
p: B.value.prefix,
|
|
949
|
+
v: e.v.x,
|
|
950
|
+
s: B.value.suffix,
|
|
951
|
+
r: B.value.roundingValue
|
|
952
|
+
}), {
|
|
953
|
+
datapoint: e,
|
|
954
|
+
seriesIndex: t
|
|
955
|
+
})}</b></div>`, a += `<div>${L.value.name}: <b>${isNaN(e.v.y) ? "-" : g(z.value.selectors.labels.y.formatter, e.v.y, f({
|
|
956
|
+
p: B.value.prefix,
|
|
957
|
+
v: e.v.y,
|
|
958
|
+
s: B.value.suffix,
|
|
959
|
+
r: B.value.roundingValue
|
|
960
|
+
}), {
|
|
961
|
+
datapoint: e,
|
|
962
|
+
seriesIndex: t
|
|
963
|
+
})}</b></div>`, a += `${z.value.deviation.translation}: <b>${f({
|
|
964
|
+
v: e.deviation,
|
|
965
|
+
r: z.value.deviation.roundingValue
|
|
966
|
+
})}</b>`, a += "</div>", Nn.value = `<div>${a}</div>`), Mn.value = !0, r === "keyboard" && ze(() => {
|
|
967
|
+
ti(e);
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
function oi(e, t) {
|
|
971
|
+
P.value.events.datapointLeave && P.value.events.datapointLeave({
|
|
972
|
+
datapoint: e,
|
|
973
|
+
seriesIndex: t
|
|
974
|
+
}), (nr.value !== "keyboard" || er.value !== e?.id) && (Mn.value = !1, X.value = void 0, Z.value = null);
|
|
975
|
+
}
|
|
976
|
+
function si(e, t) {
|
|
977
|
+
P.value.events.datapointClick && P.value.events.datapointClick({
|
|
978
|
+
datapoint: e,
|
|
979
|
+
seriesIndex: t
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
function ci() {
|
|
983
|
+
N.value.length ? N.value = [] : Ur.value.forEach((e) => {
|
|
984
|
+
N.value.push(e.id);
|
|
985
|
+
}), An("selectLegend", Gr.value);
|
|
986
|
+
}
|
|
987
|
+
function li(e) {
|
|
988
|
+
N.value.includes(e) ? N.value = N.value.filter((t) => t !== e) : N.value.length < ur.value.length - 1 && N.value.push(e), An("selectLegend", Gr.value);
|
|
989
|
+
}
|
|
990
|
+
function ui(e) {
|
|
991
|
+
return Ur.value.length ? Ur.value.find((t) => t.name === e) || (yr.value && console.warn(`VueUiScatter - Series name not found "${e}"`), null) : (yr.value && console.warn("VueUiScatter - There are no series to show."), null);
|
|
992
|
+
}
|
|
993
|
+
function di(e) {
|
|
994
|
+
let t = ui(e);
|
|
995
|
+
t !== null && N.value.includes(t.id) && li(t.id);
|
|
996
|
+
}
|
|
997
|
+
function fi(e) {
|
|
998
|
+
let t = ui(e);
|
|
999
|
+
t !== null && (N.value.includes(t.id) || li(t.id));
|
|
1000
|
+
}
|
|
1001
|
+
function pi(e = null) {
|
|
1002
|
+
ze(() => {
|
|
1003
|
+
let n = [
|
|
1004
|
+
"",
|
|
1005
|
+
P.value.table.translations.correlationCoefficient,
|
|
1006
|
+
P.value.table.translations.nbrPlots,
|
|
1007
|
+
`${I.value.name} ${P.value.table.translations.average}`,
|
|
1008
|
+
`${L.value.name} ${P.value.table.translations.average}`
|
|
1009
|
+
], i = q.value.map((e) => [
|
|
1010
|
+
e.name,
|
|
1011
|
+
e.correlation.coefficient,
|
|
1012
|
+
e.plots.length,
|
|
1013
|
+
e.plots.map((e) => e.v.x).reduce((e, t) => e + t, 0) / e.plots.length,
|
|
1014
|
+
e.plots.map((e) => e.v.y).reduce((e, t) => e + t, 0) / e.plots.length
|
|
1015
|
+
]), a = [
|
|
1016
|
+
[V.value.title.text],
|
|
1017
|
+
[V.value.title.subtitle.text],
|
|
1018
|
+
[
|
|
1019
|
+
[""],
|
|
1020
|
+
[""],
|
|
1021
|
+
[""]
|
|
1022
|
+
],
|
|
1023
|
+
n
|
|
1024
|
+
].concat(i), o = r(a);
|
|
1025
|
+
e ? e(o) : t({
|
|
1026
|
+
csvContent: o,
|
|
1027
|
+
title: V.value.title.text || "vue-ui-heatmap"
|
|
1028
|
+
});
|
|
1029
|
+
});
|
|
1030
|
+
}
|
|
1031
|
+
let mi = v(() => {
|
|
1032
|
+
let e = [
|
|
1033
|
+
P.value.table.translations.series,
|
|
1034
|
+
P.value.table.translations.correlationCoefficient,
|
|
1035
|
+
P.value.table.translations.nbrPlots,
|
|
1036
|
+
`${I.value.name} ${P.value.table.translations.average}`,
|
|
1037
|
+
`${L.value.name} ${P.value.table.translations.average}`
|
|
1038
|
+
], t = q.value.map((e) => [
|
|
1039
|
+
{
|
|
1040
|
+
shape: e.shape,
|
|
1041
|
+
content: e.name ?? "-",
|
|
1042
|
+
color: e.color
|
|
1043
|
+
},
|
|
1044
|
+
Number((e.correlation?.coefficient ?? 0).toFixed(P.value.table.td.roundingValue)).toLocaleString(),
|
|
1045
|
+
e.plots.length.toLocaleString(),
|
|
1046
|
+
Number((e.plots.map((e) => e.v.x ?? 0).reduce((e, t) => e + t, 0) / e.plots.length).toFixed(P.value.table.td.roundingAverage)).toLocaleString(),
|
|
1047
|
+
Number((e.plots.map((e) => e.v.y ?? 0).reduce((e, t) => e + t, 0) / e.plots.length).toFixed(P.value.table.td.roundingAverage)).toLocaleString()
|
|
1048
|
+
]);
|
|
1049
|
+
return {
|
|
1050
|
+
head: e,
|
|
1051
|
+
body: t,
|
|
1052
|
+
a11yBody: t.map((e) => e.map((e, t) => t === 0 ? e.content : e)),
|
|
1053
|
+
config: {
|
|
1054
|
+
th: {
|
|
1055
|
+
backgroundColor: P.value.table.th.backgroundColor,
|
|
1056
|
+
color: P.value.table.th.color,
|
|
1057
|
+
outline: P.value.table.th.outline
|
|
1058
|
+
},
|
|
1059
|
+
td: {
|
|
1060
|
+
backgroundColor: P.value.table.td.backgroundColor,
|
|
1061
|
+
color: P.value.table.td.color,
|
|
1062
|
+
outline: P.value.table.td.outline
|
|
1063
|
+
},
|
|
1064
|
+
breakpoint: P.value.table.responsiveBreakpoint
|
|
1065
|
+
},
|
|
1066
|
+
colNames: e
|
|
1067
|
+
};
|
|
1068
|
+
}), hi = T(!1);
|
|
1069
|
+
function gi(e) {
|
|
1070
|
+
hi.value = e, Pn.value += 1;
|
|
1071
|
+
}
|
|
1072
|
+
function _i() {
|
|
1073
|
+
H.value.showTable = !H.value.showTable;
|
|
1074
|
+
}
|
|
1075
|
+
function vi() {
|
|
1076
|
+
H.value.showTooltip = !H.value.showTooltip;
|
|
1077
|
+
}
|
|
1078
|
+
let yi = T(!1);
|
|
1079
|
+
function bi() {
|
|
1080
|
+
yi.value = !yi.value;
|
|
1081
|
+
}
|
|
1082
|
+
async function xi({ scale: e = 2 } = {}) {
|
|
1083
|
+
if (!Fn.value) return;
|
|
1084
|
+
let { width: t, height: n } = Fn.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await ye({
|
|
1085
|
+
domElement: Fn.value,
|
|
1086
|
+
base64: !0,
|
|
1087
|
+
img: !0,
|
|
1088
|
+
scale: e
|
|
1089
|
+
});
|
|
1090
|
+
return {
|
|
1091
|
+
imageUri: i,
|
|
1092
|
+
base64: a,
|
|
1093
|
+
title: V.value.title.text,
|
|
1094
|
+
width: t,
|
|
1095
|
+
height: n,
|
|
1096
|
+
aspectRatio: r
|
|
1097
|
+
};
|
|
1098
|
+
}
|
|
1099
|
+
function Si(e) {
|
|
1100
|
+
Wn.value = e, R.value.highlighter.highlightBothAxes && (Gn.value = Y.value.y.length - 2 - e);
|
|
1101
|
+
}
|
|
1102
|
+
function Ci(e) {
|
|
1103
|
+
Gn.value = e, R.value.highlighter.highlightBothAxes && (Wn.value = e);
|
|
1104
|
+
}
|
|
1105
|
+
function wi() {
|
|
1106
|
+
Wn.value = null, Gn.value = null;
|
|
1107
|
+
}
|
|
1108
|
+
let Ti = {
|
|
1109
|
+
circle: 1,
|
|
1110
|
+
square: 1,
|
|
1111
|
+
diamond: 1,
|
|
1112
|
+
triangle: 1.2,
|
|
1113
|
+
star: 1.3,
|
|
1114
|
+
pentagon: 1.3,
|
|
1115
|
+
hexagon: 1.3
|
|
1116
|
+
}, $ = (e) => e.toFixed(3);
|
|
1117
|
+
function Ei({ shape: e = "circle", cx: t, cy: n, r }) {
|
|
1118
|
+
if (!P.value.usePerformanceMode) return "";
|
|
1119
|
+
let i = Ti[e] * r;
|
|
1120
|
+
switch (e) {
|
|
1121
|
+
case "circle": {
|
|
1122
|
+
let e = $(t - i), r = $(n), a = $(t + i), o = $(i);
|
|
1123
|
+
return `M ${e} ${r} A ${o} ${o} 0 1 0 ${a} ${r} A ${o} ${o} 0 1 0 ${e} ${r} Z`;
|
|
1124
|
+
}
|
|
1125
|
+
case "square": {
|
|
1126
|
+
let e = $(t - i), r = $(n - i), a = $(t + i), o = $(n + i);
|
|
1127
|
+
return `M ${e} ${r} L ${a} ${r} L ${a} ${o} L ${e} ${o} Z`;
|
|
1128
|
+
}
|
|
1129
|
+
case "diamond": {
|
|
1130
|
+
let e = $(t), r = $(n);
|
|
1131
|
+
return `M ${e} ${$(n - i)} L ${$(t + i)} ${r} L ${e} ${$(n + i)} L ${$(t - i)} ${r} Z`;
|
|
1132
|
+
}
|
|
1133
|
+
case "triangle": {
|
|
1134
|
+
let e = i * Math.sqrt(3), r = t, a = n - 2 / 3 * e, o = t - i, s = n + 1 / 3 * e, c = t + i, l = s;
|
|
1135
|
+
return `M ${$(r)} ${$(a)} L ${$(o)} ${$(s)} L ${$(c)} ${$(l)} Z`;
|
|
1136
|
+
}
|
|
1137
|
+
case "star": {
|
|
1138
|
+
let e = i, r = i * .5, a = [];
|
|
1139
|
+
for (let i = 0; i < 10; i += 1) {
|
|
1140
|
+
let o = (-90 + i * 36) * Math.PI / 180, s = i % 2 == 0 ? e : r;
|
|
1141
|
+
a.push([t + s * Math.cos(o), n + s * Math.sin(o)]);
|
|
1142
|
+
}
|
|
1143
|
+
let o = `M ${$(a[0][0])} ${$(a[0][1])}`;
|
|
1144
|
+
for (let e = 1; e < a.length; e += 1) o += ` L ${$(a[e][0])} ${$(a[e][1])}`;
|
|
1145
|
+
return o + " Z";
|
|
1146
|
+
}
|
|
1147
|
+
case "pentagon": {
|
|
1148
|
+
let e = [];
|
|
1149
|
+
for (let r = 0; r < 5; r += 1) {
|
|
1150
|
+
let a = (-90 + r * 72) * Math.PI / 180;
|
|
1151
|
+
e.push([t + i * Math.cos(a), n + i * Math.sin(a)]);
|
|
1152
|
+
}
|
|
1153
|
+
let r = `M ${$(e[0][0])} ${$(e[0][1])}`;
|
|
1154
|
+
for (let t = 1; t < 5; t += 1) r += ` L ${$(e[t][0])} ${$(e[t][1])}`;
|
|
1155
|
+
return r + " Z";
|
|
1156
|
+
}
|
|
1157
|
+
case "hexagon": {
|
|
1158
|
+
let e = [];
|
|
1159
|
+
for (let r = 0; r < 6; r += 1) {
|
|
1160
|
+
let a = (-60 + r * 60) * Math.PI / 180;
|
|
1161
|
+
e.push([t + i * Math.cos(a), n + i * Math.sin(a)]);
|
|
1162
|
+
}
|
|
1163
|
+
let r = `M ${$(e[0][0])} ${$(e[0][1])}`;
|
|
1164
|
+
for (let t = 1; t < 6; t += 1) r += ` L ${$(e[t][0])} ${$(e[t][1])}`;
|
|
1165
|
+
return r + " Z";
|
|
1166
|
+
}
|
|
1167
|
+
default: {
|
|
1168
|
+
let e = $(t - i), r = $(n), a = $(t + i), o = $(i);
|
|
1169
|
+
return `M ${e} ${r} A ${o} ${o} 0 1 0 ${a} ${r} A ${o} ${o} 0 1 0 ${e} ${r} Z`;
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
let Di = v(() => {
|
|
1174
|
+
if (!P.value.usePerformanceMode) return [""];
|
|
1175
|
+
let { left: e, right: t, top: n, bottom: r } = W.value, i = Math.max(1, (t - e) * (r - n)), a = (e) => e / i * 1e4, o = z.value.stroke, s = z.value.strokeWidth, c = z.value.opacity;
|
|
1176
|
+
return q.value.map((i) => {
|
|
1177
|
+
let l = [];
|
|
1178
|
+
for (let a of i.plots) {
|
|
1179
|
+
let o = a.x, s = a.y;
|
|
1180
|
+
if (o < e || o > t || s < n || s > r) continue;
|
|
1181
|
+
let c = Math.max(z.value.radius, a.weight);
|
|
1182
|
+
l.push(Ei({
|
|
1183
|
+
shape: i.shape || "circle",
|
|
1184
|
+
cx: o,
|
|
1185
|
+
cy: s,
|
|
1186
|
+
r: c
|
|
1187
|
+
}));
|
|
1188
|
+
}
|
|
1189
|
+
if (!l.length) return null;
|
|
1190
|
+
let u = a(i.plots.length) > 2.5 || i.plots.length > 1e3;
|
|
1191
|
+
return {
|
|
1192
|
+
id: i.id,
|
|
1193
|
+
d: l.join(""),
|
|
1194
|
+
fill: d(i.color, c * 100),
|
|
1195
|
+
stroke: u ? "none" : o,
|
|
1196
|
+
strokeWidth: u ? 0 : s,
|
|
1197
|
+
strokeOpacity: 1
|
|
1198
|
+
};
|
|
1199
|
+
}).filter(Boolean);
|
|
1200
|
+
});
|
|
1201
|
+
function Oi() {
|
|
1202
|
+
return P.value.usePerformanceMode ? (e) => {
|
|
1203
|
+
let t = hr.value;
|
|
1204
|
+
if (!t) return;
|
|
1205
|
+
let n = t.createSVGPoint();
|
|
1206
|
+
n.x = e.clientX, n.y = e.clientY;
|
|
1207
|
+
let r = t.getScreenCTM();
|
|
1208
|
+
if (!r) return;
|
|
1209
|
+
let i = r.inverse(), a = n.matrixTransform(i), o = null, s = Infinity, c = -1;
|
|
1210
|
+
if (q.value.forEach((e, t) => {
|
|
1211
|
+
e.plots.forEach((e) => {
|
|
1212
|
+
let n = e.x - a.x, r = e.y - a.y, i = n * n + r * r;
|
|
1213
|
+
i <= 64 && i < s && (s = i, o = e, c = t);
|
|
1214
|
+
});
|
|
1215
|
+
}), o) X.value !== o.id && (X.value = o.id, ai(o, c, "pointer", Ji.value.get(o.id) ?? null));
|
|
1216
|
+
else if (X.value) {
|
|
1217
|
+
let e = Z.value;
|
|
1218
|
+
X.value = void 0, oi(e, c);
|
|
1219
|
+
}
|
|
1220
|
+
} : () => null;
|
|
1221
|
+
}
|
|
1222
|
+
let ki = Oi();
|
|
1223
|
+
function Ai() {
|
|
1224
|
+
if (X.value) {
|
|
1225
|
+
let e = Z.value;
|
|
1226
|
+
X.value = void 0, oi(e, null);
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
function ji(e) {
|
|
1230
|
+
let t = Z.value;
|
|
1231
|
+
if (t) {
|
|
1232
|
+
let e = q.value.findIndex((e) => e.id === t.clusterId);
|
|
1233
|
+
si(t, e >= 0 ? e : 0);
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
let Mi = v(() => {
|
|
1237
|
+
let e = P.value.table.useDialog && !P.value.table.show, t = H.value.showTable;
|
|
1238
|
+
return {
|
|
1239
|
+
component: e ? En : xn,
|
|
1240
|
+
title: `${V.value.title.text}${V.value.title.subtitle.text ? `: ${V.value.title.subtitle.text}` : ""}`,
|
|
1241
|
+
props: e ? {
|
|
1242
|
+
backgroundColor: P.value.table.th.backgroundColor,
|
|
1243
|
+
color: P.value.table.th.color,
|
|
1244
|
+
headerColor: P.value.table.th.color,
|
|
1245
|
+
headerBg: P.value.table.th.backgroundColor,
|
|
1246
|
+
isFullscreen: hi.value,
|
|
1247
|
+
fullscreenParent: Fn.value,
|
|
1248
|
+
forcedWidth: Math.min(800, window.innerWidth * .8),
|
|
1249
|
+
isCursorPointer: or.value
|
|
1250
|
+
} : {
|
|
1251
|
+
hideDetails: !0,
|
|
1252
|
+
config: {
|
|
1253
|
+
open: t,
|
|
1254
|
+
maxHeight: 1e4,
|
|
1255
|
+
body: {
|
|
1256
|
+
backgroundColor: V.value.backgroundColor,
|
|
1257
|
+
color: V.value.color
|
|
1258
|
+
},
|
|
1259
|
+
head: {
|
|
1260
|
+
backgroundColor: V.value.backgroundColor,
|
|
1261
|
+
color: V.value.color
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
};
|
|
1266
|
+
});
|
|
1267
|
+
qe(() => H.value.showTable, (e) => {
|
|
1268
|
+
P.value.table.show || (e && P.value.table.useDialog && Kn.value ? Kn.value.open() : "close" in Kn.value && Kn.value.close());
|
|
1269
|
+
});
|
|
1270
|
+
function Ni() {
|
|
1271
|
+
H.value.showTable = !1, qn.value && qn.value.setTableIconState(!1);
|
|
1272
|
+
}
|
|
1273
|
+
let Pi = v(() => V.value.backgroundColor), Fi = v(() => V.value.legend), Ii = v(() => V.value.title), { isCallbackImaging: Li, isCallbackSvg: Ri, generateSvg: zi, onGenerateImage: Bi } = _e({
|
|
1274
|
+
svg: hr,
|
|
1275
|
+
title: Ii,
|
|
1276
|
+
legend: Fi,
|
|
1277
|
+
legendItems: Ur,
|
|
1278
|
+
backgroundColor: Pi,
|
|
1279
|
+
getSvgCallback: () => P.value.userOptions.callbacks.svg,
|
|
1280
|
+
generateImage: wr
|
|
1281
|
+
});
|
|
1282
|
+
async function Vi() {
|
|
1283
|
+
if (An("copyAlt", {
|
|
1284
|
+
config: P.value,
|
|
1285
|
+
dataset: Gr.value
|
|
1286
|
+
}), !P.value.userOptions.callbacks.altCopy) {
|
|
1287
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1288
|
+
return;
|
|
1289
|
+
}
|
|
1290
|
+
await Promise.resolve(P.value.userOptions.callbacks.altCopy({
|
|
1291
|
+
config: P.value,
|
|
1292
|
+
dataset: Gr.value
|
|
1293
|
+
}));
|
|
1294
|
+
}
|
|
1295
|
+
function Hi(e, t) {
|
|
1296
|
+
let n = qi.value.filter((t) => t.id !== e.id);
|
|
1297
|
+
if (!n.length) return null;
|
|
1298
|
+
let r = ((n) => {
|
|
1299
|
+
if (!n.length) return null;
|
|
1300
|
+
let r = null, i = Infinity;
|
|
1301
|
+
return n.forEach((n) => {
|
|
1302
|
+
let a = n.x - e.x, o = n.y - e.y, s = 0, c = 0;
|
|
1303
|
+
t === "right" || t === "left" ? (s = Math.abs(a), c = Math.abs(o)) : (s = Math.abs(o), c = Math.abs(a));
|
|
1304
|
+
let l = s * 1e3 + c;
|
|
1305
|
+
l < i && (r = n, i = l);
|
|
1306
|
+
}), r;
|
|
1307
|
+
})(n.filter((n) => t === "right" ? n.x > e.x : t === "left" ? n.x < e.x : t === "down" ? n.y > e.y : t === "up" && n.y < e.y));
|
|
1308
|
+
if (r) return r;
|
|
1309
|
+
let i = [];
|
|
1310
|
+
if (t === "right") {
|
|
1311
|
+
let e = Math.min(...n.map((e) => e.x));
|
|
1312
|
+
i = n.filter((t) => t.x === e);
|
|
1313
|
+
}
|
|
1314
|
+
if (t === "left") {
|
|
1315
|
+
let e = Math.max(...n.map((e) => e.x));
|
|
1316
|
+
i = n.filter((t) => t.x === e);
|
|
1317
|
+
}
|
|
1318
|
+
if (t === "down") {
|
|
1319
|
+
let e = Math.min(...n.map((e) => e.y));
|
|
1320
|
+
i = n.filter((t) => t.y === e);
|
|
1321
|
+
}
|
|
1322
|
+
if (t === "up") {
|
|
1323
|
+
let e = Math.max(...n.map((e) => e.y));
|
|
1324
|
+
i = n.filter((t) => t.y === e);
|
|
1325
|
+
}
|
|
1326
|
+
return i.length ? i.reduce((n, r) => {
|
|
1327
|
+
if (!n) return r;
|
|
1328
|
+
let i = Math.abs(t === "right" || t === "left" ? n.y - e.y : n.x - e.x);
|
|
1329
|
+
return Math.abs(t === "right" || t === "left" ? r.y - e.y : r.x - e.x) < i ? r : n;
|
|
1330
|
+
}, null) : null;
|
|
1331
|
+
}
|
|
1332
|
+
function Ui() {
|
|
1333
|
+
ir.value = null, er.value = null, rr.value = !0;
|
|
1334
|
+
}
|
|
1335
|
+
function Wi() {
|
|
1336
|
+
Qr(), nr.value = "pointer", rr.value = !1;
|
|
1337
|
+
}
|
|
1338
|
+
function Gi(e) {
|
|
1339
|
+
if (!hr.value || yi.value || document.activeElement !== hr.value || !qi.value.length) return;
|
|
1340
|
+
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "ArrowUp", i = e.key === "ArrowDown", a = e.key === "Enter" || e.key === " ", o = e.key === "Escape";
|
|
1341
|
+
if (!t && !n && !r && !i && !a && !o) return;
|
|
1342
|
+
if (e.preventDefault(), e.stopPropagation(), o) {
|
|
1343
|
+
Qr(), nr.value = "pointer";
|
|
1344
|
+
return;
|
|
1345
|
+
}
|
|
1346
|
+
if (a) {
|
|
1347
|
+
if (ir.value === null) return;
|
|
1348
|
+
let e = qi.value[ir.value];
|
|
1349
|
+
if (!e) return;
|
|
1350
|
+
si(e, e.seriesIndex);
|
|
1351
|
+
return;
|
|
1352
|
+
}
|
|
1353
|
+
let s = null;
|
|
1354
|
+
if (n && (s = "right"), t && (s = "left"), i && (s = "down"), r && (s = "up"), er.value === null) {
|
|
1355
|
+
let e = Z.value;
|
|
1356
|
+
if (e && e.id) {
|
|
1357
|
+
let t = Hi(e, s);
|
|
1358
|
+
if (!t) {
|
|
1359
|
+
let t = Ji.value.get(e.id);
|
|
1360
|
+
if (t === void 0) return;
|
|
1361
|
+
ai(e, e.seriesIndex, "keyboard", t);
|
|
1362
|
+
return;
|
|
1363
|
+
}
|
|
1364
|
+
let n = Ji.value.get(t.id);
|
|
1365
|
+
if (n === void 0) return;
|
|
1366
|
+
ai(t, t.seriesIndex, "keyboard", n);
|
|
1367
|
+
return;
|
|
1368
|
+
}
|
|
1369
|
+
let t = qi.value[0];
|
|
1370
|
+
if (!t) return;
|
|
1371
|
+
let n = Ji.value.get(t.id) ?? 0;
|
|
1372
|
+
ai(t, t.seriesIndex, "keyboard", n);
|
|
1373
|
+
return;
|
|
1374
|
+
}
|
|
1375
|
+
let c = Ji.value.get(er.value);
|
|
1376
|
+
if (c === void 0) return;
|
|
1377
|
+
let l = qi.value[c];
|
|
1378
|
+
if (!l) return;
|
|
1379
|
+
let u = Hi(l, s);
|
|
1380
|
+
if (!u) return;
|
|
1381
|
+
let d = Ji.value.get(u.id);
|
|
1382
|
+
d !== void 0 && ai(u, u.seriesIndex, "keyboard", d);
|
|
1383
|
+
}
|
|
1384
|
+
let Ki = v(() => {
|
|
1385
|
+
if (!Z.value) return "";
|
|
1386
|
+
let e = Z.value, t = isNaN(e.v.x) ? "-" : g(z.value.selectors.labels.x.formatter, e.v.x, f({
|
|
1387
|
+
p: B.value.prefix,
|
|
1388
|
+
v: e.v.x,
|
|
1389
|
+
s: B.value.suffix,
|
|
1390
|
+
r: B.value.roundingValue
|
|
1391
|
+
}), {
|
|
1392
|
+
datapoint: e,
|
|
1393
|
+
seriesIndex: e.seriesIndex
|
|
1394
|
+
}), n = isNaN(e.v.y) ? "-" : g(z.value.selectors.labels.y.formatter, e.v.y, f({
|
|
1395
|
+
p: B.value.prefix,
|
|
1396
|
+
v: e.v.y,
|
|
1397
|
+
s: B.value.suffix,
|
|
1398
|
+
r: B.value.roundingValue
|
|
1399
|
+
}), {
|
|
1400
|
+
datapoint: e,
|
|
1401
|
+
seriesIndex: e.seriesIndex
|
|
1402
|
+
});
|
|
1403
|
+
return [
|
|
1404
|
+
e.clusterName || "",
|
|
1405
|
+
e.v.name || "",
|
|
1406
|
+
`${I.value.name}: ${t}`,
|
|
1407
|
+
`${L.value.name}: ${n}`
|
|
1408
|
+
].filter(Boolean).join(". ");
|
|
1409
|
+
}), qi = v(() => q.value.flatMap((e, t) => e.plots.map((n) => ({
|
|
1410
|
+
...n,
|
|
1411
|
+
seriesIndex: t,
|
|
1412
|
+
seriesId: e.id,
|
|
1413
|
+
seriesName: e.name,
|
|
1414
|
+
shape: e.shape || "circle",
|
|
1415
|
+
color: e.color
|
|
1416
|
+
})))), Ji = v(() => {
|
|
1417
|
+
let e = /* @__PURE__ */ new Map();
|
|
1418
|
+
return qi.value.forEach((t, n) => {
|
|
1419
|
+
e.set(t.id, n);
|
|
1420
|
+
}), e;
|
|
1421
|
+
}), Yi = v(() => ({
|
|
1422
|
+
headers: mi.value?.colNames ?? [],
|
|
1423
|
+
rows: mi.value?.a11yBody ?? []
|
|
1424
|
+
}));
|
|
1425
|
+
return Se({
|
|
1426
|
+
getData: qr,
|
|
1427
|
+
getImage: xi,
|
|
1428
|
+
generatePdf: Cr,
|
|
1429
|
+
generateCsv: pi,
|
|
1430
|
+
generateImage: wr,
|
|
1431
|
+
generateSvg: zi,
|
|
1432
|
+
hideSeries: fi,
|
|
1433
|
+
showSeries: di,
|
|
1434
|
+
toggleTable: _i,
|
|
1435
|
+
toggleTooltip: vi,
|
|
1436
|
+
toggleAnnotator: bi,
|
|
1437
|
+
toggleFullscreen: gi,
|
|
1438
|
+
copyAlt: Vi
|
|
1439
|
+
}), (e, t) => (w(), b("div", {
|
|
1440
|
+
class: Be(`vue-data-ui-component vue-ui-scatter ${hi.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${P.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1441
|
+
ref_key: "scatterChart",
|
|
1442
|
+
ref: Fn,
|
|
1443
|
+
id: `vue-ui-scatter_${M.value}`,
|
|
1444
|
+
style: Ve(`font-family:${V.value.fontFamily};width:100%; text-align:center;background:${V.value.backgroundColor};${P.value.responsive ? "height: 100%" : ""}`),
|
|
1445
|
+
onMouseenter: t[5] ||= () => k(pr)(!0),
|
|
1446
|
+
onMouseleave: t[6] ||= () => {
|
|
1447
|
+
k(pr)(!1), rr.value || Qr();
|
|
1448
|
+
}
|
|
1449
|
+
}, [
|
|
1450
|
+
x("div", {
|
|
1451
|
+
id: `chart-instructions-${M.value}`,
|
|
1452
|
+
class: "sr-only"
|
|
1453
|
+
}, [x("p", null, O(P.value.a11y.translations.keyboardNavigation), 1)], 8, Xe),
|
|
1454
|
+
H.value.showTooltip ? y("", !0) : (w(), b("div", Ze, O(Ki.value), 1)),
|
|
1455
|
+
Yi.value?.rows?.length && jn.value ? (w(), Ne(De, {
|
|
1456
|
+
key: 1,
|
|
1457
|
+
uid: M.value,
|
|
1458
|
+
head: Yi.value.headers,
|
|
1459
|
+
body: Yi.value.rows,
|
|
1460
|
+
notice: P.value.a11y.translations.tableAvailable,
|
|
1461
|
+
caption: P.value.a11y.translations.tableCaption
|
|
1462
|
+
}, null, 8, [
|
|
1463
|
+
"uid",
|
|
1464
|
+
"head",
|
|
1465
|
+
"body",
|
|
1466
|
+
"notice",
|
|
1467
|
+
"caption"
|
|
1468
|
+
])) : y("", !0),
|
|
1469
|
+
F.value.buttons.annotator ? (w(), Ne(k(Cn), {
|
|
1470
|
+
key: 2,
|
|
1471
|
+
svgRef: k(hr),
|
|
1472
|
+
backgroundColor: V.value.backgroundColor,
|
|
1473
|
+
color: V.value.color,
|
|
1474
|
+
active: yi.value,
|
|
1475
|
+
isCursorPointer: or.value,
|
|
1476
|
+
palette: F.value.annotatorPalette,
|
|
1477
|
+
onClose: bi
|
|
1478
|
+
}, {
|
|
1479
|
+
"annotator-action-close": A(() => [D(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1480
|
+
"annotator-action-color": A(({ color: t }) => [D(e.$slots, "annotator-action-color", C(S({ color: t })), void 0, !0)]),
|
|
1481
|
+
"annotator-action-draw": A(({ mode: t }) => [D(e.$slots, "annotator-action-draw", C(S({ mode: t })), void 0, !0)]),
|
|
1482
|
+
"annotator-action-undo": A(({ disabled: t }) => [D(e.$slots, "annotator-action-undo", C(S({ disabled: t })), void 0, !0)]),
|
|
1483
|
+
"annotator-action-redo": A(({ disabled: t }) => [D(e.$slots, "annotator-action-redo", C(S({ disabled: t })), void 0, !0)]),
|
|
1484
|
+
"annotator-action-delete": A(({ disabled: t }) => [D(e.$slots, "annotator-action-delete", C(S({ disabled: t })), void 0, !0)]),
|
|
1485
|
+
_: 3
|
|
1486
|
+
}, 8, [
|
|
1487
|
+
"svgRef",
|
|
1488
|
+
"backgroundColor",
|
|
1489
|
+
"color",
|
|
1490
|
+
"active",
|
|
1491
|
+
"isCursorPointer",
|
|
1492
|
+
"palette"
|
|
1493
|
+
])) : y("", !0),
|
|
1494
|
+
Tr.value ? (w(), b("div", {
|
|
1495
|
+
key: 3,
|
|
1496
|
+
ref_key: "noTitle",
|
|
1497
|
+
ref: zn,
|
|
1498
|
+
class: "vue-data-ui-no-title-space",
|
|
1499
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1500
|
+
}, null, 512)) : y("", !0),
|
|
1501
|
+
V.value.title.text ? (w(), b("div", {
|
|
1502
|
+
key: 4,
|
|
1503
|
+
ref_key: "chartTitle",
|
|
1504
|
+
ref: In,
|
|
1505
|
+
style: "width:100%;background:transparent"
|
|
1506
|
+
}, [(w(), Ne(be, {
|
|
1507
|
+
key: `title_${Bn.value}`,
|
|
1508
|
+
config: {
|
|
1509
|
+
title: {
|
|
1510
|
+
cy: "scatter-div-title",
|
|
1511
|
+
...V.value.title
|
|
1512
|
+
},
|
|
1513
|
+
subtitle: {
|
|
1514
|
+
cy: "scatter-div-subtitle",
|
|
1515
|
+
...V.value.title.subtitle
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
}, null, 8, ["config"]))], 512)) : y("", !0),
|
|
1519
|
+
x("div", { id: `legend-top-${M.value}` }, null, 8, Qe),
|
|
1520
|
+
F.value.show && jn.value && (k(mr) || k(fr)) ? (w(), Ne(k(wn), {
|
|
1521
|
+
ref_key: "userOptionsRef",
|
|
1522
|
+
ref: qn,
|
|
1523
|
+
key: `user_options_${Pn.value}`,
|
|
1524
|
+
backgroundColor: V.value.backgroundColor,
|
|
1525
|
+
color: V.value.color,
|
|
1526
|
+
isImaging: k(Sr),
|
|
1527
|
+
isPrinting: k(xr),
|
|
1528
|
+
uid: M.value,
|
|
1529
|
+
hasTooltip: F.value.buttons.tooltip && B.value.show,
|
|
1530
|
+
hasPdf: F.value.buttons.pdf,
|
|
1531
|
+
hasImg: F.value.buttons.img,
|
|
1532
|
+
hasSvg: F.value.buttons.svg,
|
|
1533
|
+
hasXls: F.value.buttons.csv,
|
|
1534
|
+
hasTable: F.value.buttons.table,
|
|
1535
|
+
hasFullscreen: F.value.buttons.fullscreen,
|
|
1536
|
+
hasAltCopy: F.value.buttons.altCopy,
|
|
1537
|
+
isTooltip: H.value.showTooltip,
|
|
1538
|
+
isFullscreen: hi.value,
|
|
1539
|
+
titles: { ...F.value.buttonTitles },
|
|
1540
|
+
chartElement: Fn.value,
|
|
1541
|
+
position: F.value.position,
|
|
1542
|
+
hasAnnotator: F.value.buttons.annotator,
|
|
1543
|
+
isAnnotation: yi.value,
|
|
1544
|
+
callbacks: F.value.callbacks,
|
|
1545
|
+
printScale: F.value.print.scale,
|
|
1546
|
+
tableDialog: P.value.table.useDialog,
|
|
1547
|
+
isCursorPointer: or.value,
|
|
1548
|
+
onToggleFullscreen: gi,
|
|
1549
|
+
onGeneratePdf: k(Cr),
|
|
1550
|
+
onGenerateCsv: pi,
|
|
1551
|
+
onGenerateImage: k(Bi),
|
|
1552
|
+
onGenerateSvg: k(zi),
|
|
1553
|
+
onToggleTable: _i,
|
|
1554
|
+
onToggleTooltip: vi,
|
|
1555
|
+
onToggleAnnotator: bi,
|
|
1556
|
+
onCopyAlt: Vi,
|
|
1557
|
+
style: Ve({ visibility: k(mr) ? k(fr) ? "visible" : "hidden" : "visible" })
|
|
1558
|
+
}, Pe({ _: 2 }, [
|
|
1559
|
+
e.$slots.menuIcon ? {
|
|
1560
|
+
name: "menuIcon",
|
|
1561
|
+
fn: A(({ isOpen: t, color: n }) => [D(e.$slots, "menuIcon", C(S({
|
|
1562
|
+
isOpen: t,
|
|
1563
|
+
color: n
|
|
1564
|
+
})), void 0, !0)]),
|
|
1565
|
+
key: "0"
|
|
1566
|
+
} : void 0,
|
|
1567
|
+
e.$slots.optionTooltip ? {
|
|
1568
|
+
name: "optionTooltip",
|
|
1569
|
+
fn: A(() => [D(e.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1570
|
+
key: "1"
|
|
1571
|
+
} : void 0,
|
|
1572
|
+
e.$slots.optionPdf ? {
|
|
1573
|
+
name: "optionPdf",
|
|
1574
|
+
fn: A(() => [D(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1575
|
+
key: "2"
|
|
1576
|
+
} : void 0,
|
|
1577
|
+
e.$slots.optionCsv ? {
|
|
1578
|
+
name: "optionCsv",
|
|
1579
|
+
fn: A(() => [D(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1580
|
+
key: "3"
|
|
1581
|
+
} : void 0,
|
|
1582
|
+
e.$slots.optionImg ? {
|
|
1583
|
+
name: "optionImg",
|
|
1584
|
+
fn: A(() => [D(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1585
|
+
key: "4"
|
|
1586
|
+
} : void 0,
|
|
1587
|
+
e.$slots.optionSvg ? {
|
|
1588
|
+
name: "optionSvg",
|
|
1589
|
+
fn: A(() => [D(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1590
|
+
key: "5"
|
|
1591
|
+
} : void 0,
|
|
1592
|
+
e.$slots.optionTable ? {
|
|
1593
|
+
name: "optionTable",
|
|
1594
|
+
fn: A(() => [D(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1595
|
+
key: "6"
|
|
1596
|
+
} : void 0,
|
|
1597
|
+
e.$slots.optionFullscreen ? {
|
|
1598
|
+
name: "optionFullscreen",
|
|
1599
|
+
fn: A(({ toggleFullscreen: t, isFullscreen: n }) => [D(e.$slots, "optionFullscreen", C(S({
|
|
1600
|
+
toggleFullscreen: t,
|
|
1601
|
+
isFullscreen: n
|
|
1602
|
+
})), void 0, !0)]),
|
|
1603
|
+
key: "7"
|
|
1604
|
+
} : void 0,
|
|
1605
|
+
e.$slots.optionAnnotator ? {
|
|
1606
|
+
name: "optionAnnotator",
|
|
1607
|
+
fn: A(({ toggleAnnotator: t, isAnnotator: n }) => [D(e.$slots, "optionAnnotator", C(S({
|
|
1608
|
+
toggleAnnotator: t,
|
|
1609
|
+
isAnnotator: n
|
|
1610
|
+
})), void 0, !0)]),
|
|
1611
|
+
key: "8"
|
|
1612
|
+
} : void 0,
|
|
1613
|
+
e.$slots.optionAltCopy ? {
|
|
1614
|
+
name: "optionAltCopy",
|
|
1615
|
+
fn: A(({ altCopy: t }) => [D(e.$slots, "optionAltCopy", C(S({ altCopy: t })), void 0, !0)]),
|
|
1616
|
+
key: "9"
|
|
1617
|
+
} : void 0,
|
|
1618
|
+
e.$slots["custom-menu-before"] ? {
|
|
1619
|
+
name: "custom-menu-before",
|
|
1620
|
+
fn: A(() => [D(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1621
|
+
key: "10"
|
|
1622
|
+
} : void 0,
|
|
1623
|
+
e.$slots["custom-menu-after"] ? {
|
|
1624
|
+
name: "custom-menu-after",
|
|
1625
|
+
fn: A(() => [D(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1626
|
+
key: "11"
|
|
1627
|
+
} : void 0
|
|
1628
|
+
]), 1032, /* @__PURE__ */ "backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isTooltip.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : y("", !0),
|
|
1629
|
+
x("div", $e, [(w(), b("svg", {
|
|
1630
|
+
ref_key: "svgRef",
|
|
1631
|
+
ref: hr,
|
|
1632
|
+
xmlns: k(ae),
|
|
1633
|
+
"aria-describedby": `chart-instructions-${M.value}`,
|
|
1634
|
+
class: Be({
|
|
1635
|
+
"vue-data-ui-fullscreen--on": hi.value,
|
|
1636
|
+
"vue-data-ui-fulscreen--off": !hi.value,
|
|
1637
|
+
"vue-data-ui-no-transition": !k(ar)
|
|
1638
|
+
}),
|
|
1639
|
+
viewBox: `0 0 ${U.value.width <= 0 ? 10 : U.value.width} ${U.value.height <= 0 ? 10 : U.value.height}`,
|
|
1640
|
+
style: Ve(`max-width:100%;overflow:visible;background:transparent;color:${V.value.color}`),
|
|
1641
|
+
onMouseleave: wi,
|
|
1642
|
+
tabindex: "0",
|
|
1643
|
+
onFocus: Ui,
|
|
1644
|
+
onBlur: Wi,
|
|
1645
|
+
onKeydown: Gi
|
|
1646
|
+
}, [
|
|
1647
|
+
Ie(k(Tn)),
|
|
1648
|
+
e.$slots["chart-background"] ? (w(), b("foreignObject", {
|
|
1649
|
+
key: 0,
|
|
1650
|
+
x: 0,
|
|
1651
|
+
y: 0,
|
|
1652
|
+
width: U.value.width <= 0 ? 10 : U.value.width,
|
|
1653
|
+
height: U.value.height <= 0 ? 10 : U.value.height,
|
|
1654
|
+
style: { pointerEvents: "none" }
|
|
1655
|
+
}, [D(e.$slots, "chart-background", {}, void 0, !0)], 8, tt)) : y("", !0),
|
|
1656
|
+
V.value.layout.axis.show ? (w(), b("g", nt, [x("line", {
|
|
1657
|
+
x1: K.value.x,
|
|
1658
|
+
x2: K.value.x,
|
|
1659
|
+
y1: W.value.top,
|
|
1660
|
+
y2: W.value.bottom,
|
|
1661
|
+
stroke: V.value.layout.axis.stroke,
|
|
1662
|
+
"stroke-width": V.value.layout.axis.strokeWidth,
|
|
1663
|
+
"stroke-linecap": "round"
|
|
1664
|
+
}, null, 8, rt), x("line", {
|
|
1665
|
+
x1: W.value.left,
|
|
1666
|
+
x2: W.value.right,
|
|
1667
|
+
y1: K.value.y,
|
|
1668
|
+
y2: K.value.y,
|
|
1669
|
+
stroke: V.value.layout.axis.stroke,
|
|
1670
|
+
"stroke-width": V.value.layout.axis.strokeWidth,
|
|
1671
|
+
"stroke-linecap": "round"
|
|
1672
|
+
}, null, 8, it)])) : y("", !0),
|
|
1673
|
+
I.value.scales.verticalLines.show ? (w(), b("g", at, [(w(!0), b(_, null, E(Lr.value, (e, t) => (w(), b("line", {
|
|
1674
|
+
key: `scatter-x-scale-line-${M.value}-${t}`,
|
|
1675
|
+
x1: e.x,
|
|
1676
|
+
x2: e.x,
|
|
1677
|
+
y1: W.value.top,
|
|
1678
|
+
y2: W.value.bottom,
|
|
1679
|
+
stroke: I.value.scales.verticalLines.stroke,
|
|
1680
|
+
"stroke-width": I.value.scales.verticalLines.strokeWidth,
|
|
1681
|
+
"stroke-linecap": "round"
|
|
1682
|
+
}, null, 8, ot))), 128))])) : y("", !0),
|
|
1683
|
+
I.value.scales.show ? (w(), b("g", {
|
|
1684
|
+
key: 3,
|
|
1685
|
+
ref_key: "xAxisScaleLabels",
|
|
1686
|
+
ref: $n
|
|
1687
|
+
}, [(w(!0), b(_, null, E(Lr.value, (e, t) => (w(), b("g", {
|
|
1688
|
+
class: "vue-ui-scatter-scale-group",
|
|
1689
|
+
key: `scatter-x-scale-${M.value}-${t}`,
|
|
1690
|
+
opacity: +!zr.value
|
|
1691
|
+
}, [x("path", {
|
|
1692
|
+
class: Be({ "vue-data-ui-transition": k(ar) }),
|
|
1693
|
+
stroke: V.value.layout.axis.stroke,
|
|
1694
|
+
"stroke-width": V.value.layout.axis.strokeWidth,
|
|
1695
|
+
d: `M${e.x},${K.value.y - 4} ${e.x},${K.value.y + 4}`,
|
|
1696
|
+
"stroke-linecap": "round"
|
|
1697
|
+
}, null, 10, ct), x("text", {
|
|
1698
|
+
class: Be({ "vue-data-ui-transition": k(ar) }),
|
|
1699
|
+
transform: `translate(${e.x}, ${K.value.y + I.value.scales.labels.fontSize + 6 + I.value.scales.labels.offsetY})`,
|
|
1700
|
+
"text-anchor": "middle",
|
|
1701
|
+
"font-size": I.value.scales.labels.fontSize,
|
|
1702
|
+
fill: I.value.scales.labels.color,
|
|
1703
|
+
stroke: V.value.backgroundColor,
|
|
1704
|
+
"stroke-width": "2",
|
|
1705
|
+
"paint-order": "stroke"
|
|
1706
|
+
}, O(e.label), 11, lt)], 8, st))), 128))], 512)) : y("", !0),
|
|
1707
|
+
L.value.scales.horizontalLines.show ? (w(), b("g", ut, [(w(!0), b(_, null, E(Rr.value, (e, t) => (w(), b("line", {
|
|
1708
|
+
key: `scatter-y-scale-line-${M.value}-${t}`,
|
|
1709
|
+
x1: W.value.left,
|
|
1710
|
+
x2: W.value.right,
|
|
1711
|
+
y1: e.y,
|
|
1712
|
+
y2: e.y,
|
|
1713
|
+
stroke: L.value.scales.horizontalLines.stroke,
|
|
1714
|
+
"stroke-width": L.value.scales.horizontalLines.strokeWidth,
|
|
1715
|
+
"stroke-linecap": "round"
|
|
1716
|
+
}, null, 8, dt))), 128))])) : y("", !0),
|
|
1717
|
+
L.value.scales.show ? (w(), b("g", {
|
|
1718
|
+
key: 5,
|
|
1719
|
+
ref_key: "yAxisScaleLabels",
|
|
1720
|
+
ref: Qn,
|
|
1721
|
+
opacity: +!Br.value,
|
|
1722
|
+
style: { transition: "opacity 0.1s ease-in-out" },
|
|
1723
|
+
class: "vue-ui-scatter-scale-group"
|
|
1724
|
+
}, [(w(!0), b(_, null, E(Rr.value, (e, t) => (w(), b("g", { key: `scatter-y-scale-${M.value}-${t}` }, [x("path", {
|
|
1725
|
+
class: Be({ "vue-data-ui-transition": k(ar) }),
|
|
1726
|
+
d: `M${K.value.x - 4},${e.y} ${K.value.x + 4},${e.y}`,
|
|
1727
|
+
stroke: V.value.layout.axis.stroke,
|
|
1728
|
+
"stroke-width": V.value.layout.axis.strokeWidth,
|
|
1729
|
+
"stroke-linecap": "round"
|
|
1730
|
+
}, null, 10, pt), x("text", {
|
|
1731
|
+
class: Be({ "vue-data-ui-transition": k(ar) }),
|
|
1732
|
+
transform: `translate(${K.value.x - L.value.scales.labels.fontSize / 2 - 8 + L.value.scales.labels.offsetX}, ${e.y + L.value.scales.labels.fontSize / 3})`,
|
|
1733
|
+
"text-anchor": "end",
|
|
1734
|
+
"font-size": L.value.scales.labels.fontSize,
|
|
1735
|
+
fill: L.value.scales.labels.color,
|
|
1736
|
+
stroke: V.value.backgroundColor,
|
|
1737
|
+
"stroke-width": "2",
|
|
1738
|
+
"paint-order": "stroke"
|
|
1739
|
+
}, O(e.label), 11, mt)]))), 128))], 8, ft)) : y("", !0),
|
|
1740
|
+
R.value.show ? (w(), b("g", ht, [
|
|
1741
|
+
x("defs", null, [Ie(Te, {
|
|
1742
|
+
t: "linear",
|
|
1743
|
+
id: `marginal_x_${M.value}`,
|
|
1744
|
+
x1: "0%",
|
|
1745
|
+
y1: "0%",
|
|
1746
|
+
x2: "0%",
|
|
1747
|
+
y2: "100%",
|
|
1748
|
+
stops: [[
|
|
1749
|
+
"0%",
|
|
1750
|
+
R.value.fill,
|
|
1751
|
+
1
|
|
1752
|
+
], [
|
|
1753
|
+
"100%",
|
|
1754
|
+
V.value.backgroundColor,
|
|
1755
|
+
1
|
|
1756
|
+
]]
|
|
1757
|
+
}, null, 8, ["id", "stops"]), Ie(Te, {
|
|
1758
|
+
t: "linear",
|
|
1759
|
+
id: `marginal_y_${M.value}`,
|
|
1760
|
+
x1: "0%",
|
|
1761
|
+
x2: "100%",
|
|
1762
|
+
y1: "0%",
|
|
1763
|
+
y2: "0%",
|
|
1764
|
+
stops: [[
|
|
1765
|
+
"0%",
|
|
1766
|
+
V.value.backgroundColor,
|
|
1767
|
+
1
|
|
1768
|
+
], [
|
|
1769
|
+
"100%",
|
|
1770
|
+
R.value.fill,
|
|
1771
|
+
1
|
|
1772
|
+
]]
|
|
1773
|
+
}, null, 8, ["id", "stops"])]),
|
|
1774
|
+
(w(!0), b(_, null, E(Y.value.x, (e, n) => (w(), b("g", null, [
|
|
1775
|
+
e && Y.value.avgX[n] ? (w(), b("rect", {
|
|
1776
|
+
key: 0,
|
|
1777
|
+
x: Y.value.avgX[n] - W.value.width / J.value / 2,
|
|
1778
|
+
y: W.value.top - R.value.offset - e / Y.value.maxX * R.value.size,
|
|
1779
|
+
width: W.value.width / J.value <= 0 ? 1e-4 : W.value.width / J.value,
|
|
1780
|
+
height: e / Y.value.maxX * R.value.size <= 0 ? 1e-4 : e / Y.value.maxX * R.value.size,
|
|
1781
|
+
fill: R.value.useGradient ? `url(#marginal_x_${M.value})` : R.value.fill,
|
|
1782
|
+
style: Ve([`opacity:${R.value.opacity}`, { "pointer-events": "none" }]),
|
|
1783
|
+
stroke: V.value.backgroundColor,
|
|
1784
|
+
"stroke-width": R.value.strokeWidth,
|
|
1785
|
+
rx: R.value.borderRadius
|
|
1786
|
+
}, null, 12, gt)) : y("", !0),
|
|
1787
|
+
Y.value.avgX[n] ? (w(), b("rect", {
|
|
1788
|
+
key: 1,
|
|
1789
|
+
x: Y.value.avgX[n] - W.value.width / J.value / 2,
|
|
1790
|
+
y: W.value.top - R.value.offset - R.value.size,
|
|
1791
|
+
width: W.value.width / J.value <= 0 ? 1e-4 : W.value.width / J.value,
|
|
1792
|
+
height: Math.max(.1, R.value.size),
|
|
1793
|
+
fill: "transparent",
|
|
1794
|
+
onMouseenter: (e) => Si(n),
|
|
1795
|
+
onMouseleave: t[0] ||= (e) => wi()
|
|
1796
|
+
}, null, 40, _t)) : y("", !0),
|
|
1797
|
+
Y.value.avgX[n] && Wn.value != null && Wn.value === n ? (w(), b("g", vt, [
|
|
1798
|
+
x("rect", {
|
|
1799
|
+
x: Y.value.avgX[n] - W.value.width / J.value / 2,
|
|
1800
|
+
y: W.value.top,
|
|
1801
|
+
width: W.value.width / J.value <= 0 ? 1e-4 : W.value.width / J.value,
|
|
1802
|
+
height: W.value.height,
|
|
1803
|
+
fill: R.value.highlighter.color,
|
|
1804
|
+
"fill-opacity": R.value.highlighter.opacity
|
|
1805
|
+
}, null, 8, yt),
|
|
1806
|
+
x("line", {
|
|
1807
|
+
x1: Y.value.avgX[n] - W.value.width / J.value / 2,
|
|
1808
|
+
x2: Y.value.avgX[n] - W.value.width / J.value / 2,
|
|
1809
|
+
y1: 0,
|
|
1810
|
+
y2: W.value.top + W.value.height,
|
|
1811
|
+
stroke: R.value.highlighter.stroke,
|
|
1812
|
+
"stroke-dasharray": R.value.highlighter.strokeDasharray,
|
|
1813
|
+
"stroke-width": R.value.highlighter.strokeWidth,
|
|
1814
|
+
style: {
|
|
1815
|
+
transition: "none !important",
|
|
1816
|
+
animation: "none !important"
|
|
1817
|
+
}
|
|
1818
|
+
}, null, 8, bt),
|
|
1819
|
+
x("line", {
|
|
1820
|
+
x1: Y.value.avgX[n] - W.value.width / J.value / 2 + (W.value.width / J.value <= 0 ? 1e-4 : W.value.width / J.value),
|
|
1821
|
+
x2: Y.value.avgX[n] - W.value.width / J.value / 2 + (W.value.width / J.value <= 0 ? 1e-4 : W.value.width / J.value),
|
|
1822
|
+
y1: 0,
|
|
1823
|
+
y2: W.value.top + W.value.height,
|
|
1824
|
+
stroke: R.value.highlighter.stroke,
|
|
1825
|
+
"stroke-dasharray": R.value.highlighter.strokeDasharray,
|
|
1826
|
+
"stroke-width": R.value.highlighter.strokeWidth,
|
|
1827
|
+
style: {
|
|
1828
|
+
transition: "none !important",
|
|
1829
|
+
animation: "none !important"
|
|
1830
|
+
}
|
|
1831
|
+
}, null, 8, xt)
|
|
1832
|
+
])) : y("", !0)
|
|
1833
|
+
]))), 256)),
|
|
1834
|
+
(w(!0), b(_, null, E(Y.value.y, (e, n) => (w(), b("g", null, [
|
|
1835
|
+
e && Y.value.avgY[n] ? (w(), b("rect", {
|
|
1836
|
+
key: 0,
|
|
1837
|
+
x: W.value.right + R.value.offset,
|
|
1838
|
+
y: Y.value.avgY[n] - W.value.height / J.value / 2,
|
|
1839
|
+
height: W.value.height / J.value <= 0 ? 1e-4 : W.value.height / J.value,
|
|
1840
|
+
width: e / Y.value.maxY * R.value.size <= 0 ? 1e-4 : e / Y.value.maxY * R.value.size,
|
|
1841
|
+
fill: R.value.useGradient ? `url(#marginal_y_${M.value})` : R.value.fill,
|
|
1842
|
+
style: Ve([`opacity:${R.value.opacity}`, { "pointer-events": "none" }]),
|
|
1843
|
+
stroke: V.value.backgroundColor,
|
|
1844
|
+
"stroke-width": R.value.strokeWidth,
|
|
1845
|
+
rx: R.value.borderRadius
|
|
1846
|
+
}, null, 12, St)) : y("", !0),
|
|
1847
|
+
Y.value.avgY[n] ? (w(), b("rect", {
|
|
1848
|
+
key: 1,
|
|
1849
|
+
x: W.value.right + R.value.offset,
|
|
1850
|
+
y: Y.value.avgY[n] - W.value.height / J.value / 2,
|
|
1851
|
+
width: Math.max(.1, R.value.size),
|
|
1852
|
+
height: W.value.height / J.value <= 0 ? 1e-4 : W.value.height / J.value,
|
|
1853
|
+
fill: "transparent",
|
|
1854
|
+
onMouseenter: (e) => Ci(n),
|
|
1855
|
+
onMouseleave: t[1] ||= (e) => wi()
|
|
1856
|
+
}, null, 40, Ct)) : y("", !0),
|
|
1857
|
+
Y.value.avgY[n] && Gn.value != null && Gn.value === n ? (w(), b("g", wt, [
|
|
1858
|
+
x("rect", {
|
|
1859
|
+
x: W.value.left,
|
|
1860
|
+
y: Y.value.avgY[n] - W.value.height / J.value / 2,
|
|
1861
|
+
width: W.value.width,
|
|
1862
|
+
height: W.value.height / J.value <= 0 ? 1e-4 : W.value.height / J.value,
|
|
1863
|
+
fill: R.value.highlighter.color,
|
|
1864
|
+
"fill-opacity": R.value.highlighter.opacity
|
|
1865
|
+
}, null, 8, Tt),
|
|
1866
|
+
x("line", {
|
|
1867
|
+
x1: W.value.left,
|
|
1868
|
+
x2: U.value.width,
|
|
1869
|
+
y1: Y.value.avgY[n] - W.value.height / J.value / 2,
|
|
1870
|
+
y2: Y.value.avgY[n] - W.value.height / J.value / 2,
|
|
1871
|
+
stroke: R.value.highlighter.stroke,
|
|
1872
|
+
"stroke-dasharray": R.value.highlighter.strokeDasharray,
|
|
1873
|
+
"stroke-width": R.value.highlighter.strokeWidth,
|
|
1874
|
+
style: {
|
|
1875
|
+
transition: "none !important",
|
|
1876
|
+
animation: "none !important"
|
|
1877
|
+
}
|
|
1878
|
+
}, null, 8, Et),
|
|
1879
|
+
x("line", {
|
|
1880
|
+
x1: W.value.left,
|
|
1881
|
+
x2: U.value.width,
|
|
1882
|
+
y1: Y.value.avgY[n] - W.value.height / J.value / 2 + (W.value.height / J.value <= 0 ? 1e-4 : W.value.height / J.value),
|
|
1883
|
+
y2: Y.value.avgY[n] - W.value.height / J.value / 2 + (W.value.height / J.value <= 0 ? 1e-4 : W.value.height / J.value),
|
|
1884
|
+
stroke: R.value.highlighter.stroke,
|
|
1885
|
+
"stroke-dasharray": R.value.highlighter.strokeDasharray,
|
|
1886
|
+
"stroke-width": R.value.highlighter.strokeWidth,
|
|
1887
|
+
style: {
|
|
1888
|
+
transition: "none !important",
|
|
1889
|
+
animation: "none !important"
|
|
1890
|
+
}
|
|
1891
|
+
}, null, 8, Dt)
|
|
1892
|
+
])) : y("", !0)
|
|
1893
|
+
]))), 256)),
|
|
1894
|
+
R.value.showLines ? (w(), b("g", Ot, [(w(!0), b(_, null, E(Yr.value, (e) => (w(), b(_, null, [
|
|
1895
|
+
N.value.includes(e.id) ? y("", !0) : (w(), b("path", {
|
|
1896
|
+
key: 0,
|
|
1897
|
+
d: `M ${e.dX}`,
|
|
1898
|
+
stroke: V.value.backgroundColor,
|
|
1899
|
+
"stroke-width": R.value.linesStrokeWidth + 1,
|
|
1900
|
+
"stroke-linecap": "round",
|
|
1901
|
+
"stroke-linejoin": "round",
|
|
1902
|
+
fill: "none"
|
|
1903
|
+
}, null, 8, kt)),
|
|
1904
|
+
N.value.includes(e.id) ? y("", !0) : (w(), b("path", {
|
|
1905
|
+
key: 1,
|
|
1906
|
+
d: `M ${e.dX}`,
|
|
1907
|
+
stroke: e.color,
|
|
1908
|
+
"stroke-width": R.value.linesStrokeWidth,
|
|
1909
|
+
"stroke-linecap": "round",
|
|
1910
|
+
"stroke-linejoin": "round",
|
|
1911
|
+
fill: "none"
|
|
1912
|
+
}, null, 8, At)),
|
|
1913
|
+
N.value.includes(e.id) ? y("", !0) : (w(), b("path", {
|
|
1914
|
+
key: 2,
|
|
1915
|
+
d: `M ${e.dY}`,
|
|
1916
|
+
stroke: V.value.backgroundColor,
|
|
1917
|
+
"stroke-width": R.value.linesStrokeWidth + 1,
|
|
1918
|
+
"stroke-linecap": "round",
|
|
1919
|
+
"stroke-linejoin": "round",
|
|
1920
|
+
fill: "none"
|
|
1921
|
+
}, null, 8, jt)),
|
|
1922
|
+
N.value.includes(e.id) ? y("", !0) : (w(), b("path", {
|
|
1923
|
+
key: 3,
|
|
1924
|
+
d: `M ${e.dY}`,
|
|
1925
|
+
stroke: e.color,
|
|
1926
|
+
"stroke-width": R.value.linesStrokeWidth,
|
|
1927
|
+
"stroke-linecap": "round",
|
|
1928
|
+
"stroke-linejoin": "round",
|
|
1929
|
+
fill: "none"
|
|
1930
|
+
}, null, 8, Mt))
|
|
1931
|
+
], 64))), 256))])) : y("", !0)
|
|
1932
|
+
])) : y("", !0),
|
|
1933
|
+
z.value.giftWrap.show ? (w(), b("g", Nt, [(w(!0), b(_, null, E(q.value, (e, t) => (w(), b("g", null, [e.plots.length > 2 ? (w(), b("polygon", {
|
|
1934
|
+
key: 0,
|
|
1935
|
+
points: k(ce)({ series: e.plots }),
|
|
1936
|
+
fill: k(d)(e.color, z.value.giftWrap.fillOpacity * 100),
|
|
1937
|
+
"stroke-width": z.value.giftWrap.strokeWidth,
|
|
1938
|
+
"stroke-dasharray": z.value.giftWrap.strokeDasharray,
|
|
1939
|
+
stroke: e.color,
|
|
1940
|
+
"stroke-linejoin": "round",
|
|
1941
|
+
"stroke-linecap": "round"
|
|
1942
|
+
}, null, 8, Pt)) : y("", !0)]))), 256))])) : y("", !0),
|
|
1943
|
+
P.value.usePerformanceMode ? y("", !0) : (w(!0), b(_, { key: 8 }, E(q.value, (e, t) => (w(), b("g", { key: e.id }, [!e.shape || e.shape === "circle" ? (w(), b("g", Ft, [(w(!0), b(_, null, E(e.plots, (n, r) => (w(), b("circle", {
|
|
1944
|
+
key: n.id,
|
|
1945
|
+
cx: n.x,
|
|
1946
|
+
cy: n.y,
|
|
1947
|
+
r: X.value && X.value === n.id || Q.value.includes(n.id) ? n.weight * z.value.hoverRadiusRatio : n.weight,
|
|
1948
|
+
fill: k(d)(e.color, X.value && X.value !== n.id || Q.value.length && !Q.value.includes(n.id) ? z.value.opacityNotSelected * 100 : z.value.opacity * 100),
|
|
1949
|
+
stroke: z.value.stroke,
|
|
1950
|
+
"stroke-width": z.value.strokeWidth,
|
|
1951
|
+
style: Ve(`opacity:${X.value && X.value === n.id || Q.value.includes(n.id) ? 1 : z.value.significance.useDistanceOpacity ? 1 - Math.abs(n.deviation) / Kr.value : z.value.significance.show && Math.abs(n.deviation) > z.value.significance.deviationThreshold ? z.value.significance.opacity : 1}`),
|
|
1952
|
+
onMouseover: (e) => ai(n, t, "pointer", Ji.value.get(n.id)),
|
|
1953
|
+
onMouseleave: (e) => oi(n, t),
|
|
1954
|
+
onClick: (e) => si(n, t)
|
|
1955
|
+
}, null, 44, It))), 128))])) : (w(), b("g", Lt, [(w(!0), b(_, null, E(e.plots, (n, r) => (w(), Ne(xe, {
|
|
1956
|
+
class: "vue-ui-scatter-datapoint",
|
|
1957
|
+
plot: {
|
|
1958
|
+
x: n.x,
|
|
1959
|
+
y: n.y
|
|
1960
|
+
},
|
|
1961
|
+
radius: X.value && X.value === n.id || Q.value.includes(n.id) ? n.weight * z.value.hoverRadiusRatio : n.weight,
|
|
1962
|
+
shape: e.shape,
|
|
1963
|
+
color: k(d)(e.color, X.value && X.value !== n.id || Q.value.length && !Q.value.includes(n.id) ? z.value.opacityNotSelected * 100 : z.value.opacity * 100),
|
|
1964
|
+
stroke: z.value.stroke,
|
|
1965
|
+
strokeWidth: z.value.strokeWidth,
|
|
1966
|
+
style: Ve(`opacity:${X.value && X.value === n.id || Q.value.includes(n.id) ? 1 : z.value.significance.useDistanceOpacity ? 1 - Math.abs(n.deviation) / Kr.value : z.value.significance.show && Math.abs(n.deviation) > z.value.significance.deviationThreshold ? z.value.significance.opacity : 1}`),
|
|
1967
|
+
onMouseover: (e) => ai(n, t, "pointer", Ji.value.get(n.id)),
|
|
1968
|
+
onMouseleave: (e) => oi(n, t),
|
|
1969
|
+
onClick: (e) => si(n, t)
|
|
1970
|
+
}, null, 8, [
|
|
1971
|
+
"plot",
|
|
1972
|
+
"radius",
|
|
1973
|
+
"shape",
|
|
1974
|
+
"color",
|
|
1975
|
+
"stroke",
|
|
1976
|
+
"strokeWidth",
|
|
1977
|
+
"style",
|
|
1978
|
+
"onMouseover",
|
|
1979
|
+
"onMouseleave",
|
|
1980
|
+
"onClick"
|
|
1981
|
+
]))), 256))])), z.value.name.show ? (w(!0), b(_, { key: 2 }, E(e.plots, (e, n) => (w(), b("text", {
|
|
1982
|
+
class: "vue-ui-scatter-datapoint-label",
|
|
1983
|
+
key: `datalabel-${e.id}`,
|
|
1984
|
+
transform: `translate(${e.x}, ${e.y - e.weight - z.value.name.fontSize + z.value.name.offsetY})`,
|
|
1985
|
+
"text-anchor": "middle",
|
|
1986
|
+
"font-size": z.value.name.fontSize,
|
|
1987
|
+
fill: k(d)(z.value.name.color, X.value && X.value !== e.id || Q.value.length && !Q.value.includes(e.id) ? z.value.opacityNotSelected * 100 : 100),
|
|
1988
|
+
onMouseover: (n) => ai(e, t, "pointer", Ji.value.get(e.id)),
|
|
1989
|
+
onMouseleave: (n) => oi(e, t),
|
|
1990
|
+
onClick: (n) => si(e, t)
|
|
1991
|
+
}, O(e.clusterName), 41, Rt))), 128)) : y("", !0)]))), 128)),
|
|
1992
|
+
P.value.usePerformanceMode ? (w(), b(_, { key: 9 }, [
|
|
1993
|
+
x("g", { "clip-path": `url(#clip_path_${M.value})` }, [(w(!0), b(_, null, E(Di.value, (e) => (w(), b("path", {
|
|
1994
|
+
key: e.id,
|
|
1995
|
+
d: e.d,
|
|
1996
|
+
fill: e.fill,
|
|
1997
|
+
stroke: e.stroke,
|
|
1998
|
+
"stroke-width": e.strokeWidth,
|
|
1999
|
+
"stroke-opacity": e.strokeOpacity,
|
|
2000
|
+
"vector-effect": "non-scaling-stroke",
|
|
2001
|
+
"paint-order": "fill"
|
|
2002
|
+
}, null, 8, Bt))), 128))], 8, zt),
|
|
2003
|
+
Z.value && z.value.selectors.show ? (w(), b("g", Vt, [Ie(xe, {
|
|
2004
|
+
shape: Z.value.shape || "circle",
|
|
2005
|
+
color: Z.value.color,
|
|
2006
|
+
plot: {
|
|
2007
|
+
x: Z.value.x,
|
|
2008
|
+
y: Z.value.y
|
|
2009
|
+
},
|
|
2010
|
+
radius: Math.max(4 * Ti[Z.value.shape || "circle"], Z.value.weight * z.value.hoverRadiusRatio),
|
|
2011
|
+
stroke: z.value.stroke,
|
|
2012
|
+
strokeWidth: z.value.strokeWidth
|
|
2013
|
+
}, null, 8, [
|
|
2014
|
+
"shape",
|
|
2015
|
+
"color",
|
|
2016
|
+
"plot",
|
|
2017
|
+
"radius",
|
|
2018
|
+
"stroke",
|
|
2019
|
+
"strokeWidth"
|
|
2020
|
+
])])) : y("", !0),
|
|
2021
|
+
x("rect", {
|
|
2022
|
+
x: W.value.left,
|
|
2023
|
+
y: W.value.top,
|
|
2024
|
+
width: Math.max(1e-4, W.value.width),
|
|
2025
|
+
height: Math.max(1e-4, W.value.height),
|
|
2026
|
+
fill: "transparent",
|
|
2027
|
+
onMousemove: t[2] ||= (...e) => k(ki) && k(ki)(...e),
|
|
2028
|
+
onMouseleave: Ai,
|
|
2029
|
+
onClick: ji
|
|
2030
|
+
}, null, 40, Ht)
|
|
2031
|
+
], 64)) : y("", !0),
|
|
2032
|
+
(w(!0), b(_, null, E(ni.value, (e) => (w(), b(_, { key: `selector_${e.id}` }, [z.value.selectors.show ? (w(), b("g", Ut, [
|
|
2033
|
+
x("line", {
|
|
2034
|
+
x1: K.value.x,
|
|
2035
|
+
x2: e.x,
|
|
2036
|
+
y1: e.y,
|
|
2037
|
+
y2: e.y,
|
|
2038
|
+
stroke: z.value.selectors.stroke,
|
|
2039
|
+
"stroke-width": z.value.selectors.strokeWidth,
|
|
2040
|
+
"stroke-dasharray": z.value.selectors.strokeDasharray,
|
|
2041
|
+
"stroke-linecap": "round",
|
|
2042
|
+
class: "line-pointer"
|
|
2043
|
+
}, null, 8, Wt),
|
|
2044
|
+
x("line", {
|
|
2045
|
+
x1: e.x,
|
|
2046
|
+
x2: e.x,
|
|
2047
|
+
y1: K.value.y,
|
|
2048
|
+
y2: e.y,
|
|
2049
|
+
stroke: z.value.selectors.stroke,
|
|
2050
|
+
"stroke-width": z.value.selectors.strokeWidth,
|
|
2051
|
+
"stroke-dasharray": z.value.selectors.strokeDasharray,
|
|
2052
|
+
"stroke-linecap": "round",
|
|
2053
|
+
class: "line-pointer"
|
|
2054
|
+
}, null, 8, Gt),
|
|
2055
|
+
L.value.scales.show ? y("", !0) : (w(), b("text", {
|
|
2056
|
+
key: 0,
|
|
2057
|
+
x: K.value.x + (e.x > K.value.x ? -6 : 6),
|
|
2058
|
+
y: e.y + z.value.selectors.labels.fontSize / 3,
|
|
2059
|
+
"font-size": z.value.selectors.labels.fontSize,
|
|
2060
|
+
fill: z.value.selectors.labels.color,
|
|
2061
|
+
"font-weight": z.value.selectors.labels.bold ? "bold" : "normal",
|
|
2062
|
+
"text-anchor": e.x > K.value.x ? "end" : "start"
|
|
2063
|
+
}, O(k(g)(z.value.selectors.labels.y.formatter, k(h)(e.v.y), k(f)({
|
|
2064
|
+
p: z.value.selectors.labels.prefix,
|
|
2065
|
+
v: k(h)(e.v.y),
|
|
2066
|
+
s: z.value.selectors.labels.suffix,
|
|
2067
|
+
r: z.value.selectors.labels.rounding
|
|
2068
|
+
}), { datapoint: e })), 9, Kt)),
|
|
2069
|
+
I.value.scales.show ? y("", !0) : (w(), b("text", {
|
|
2070
|
+
key: 1,
|
|
2071
|
+
x: e.x,
|
|
2072
|
+
y: K.value.y + (e.y > K.value.y ? -6 : z.value.selectors.labels.fontSize + 6),
|
|
2073
|
+
"font-size": z.value.selectors.labels.fontSize,
|
|
2074
|
+
fill: z.value.selectors.labels.color,
|
|
2075
|
+
"font-weight": z.value.selectors.labels.bold ? "bold" : "normal",
|
|
2076
|
+
"text-anchor": "middle"
|
|
2077
|
+
}, O(k(g)(z.value.selectors.labels.y.formatter, k(h)(e.v.x), k(f)({
|
|
2078
|
+
p: z.value.selectors.labels.prefix,
|
|
2079
|
+
v: k(h)(e.v.x),
|
|
2080
|
+
s: z.value.selectors.labels.suffix,
|
|
2081
|
+
r: z.value.selectors.labels.rounding
|
|
2082
|
+
}), { datapoint: e })), 9, qt)),
|
|
2083
|
+
I.value.scales.show ? (w(), b("text", {
|
|
2084
|
+
key: 2,
|
|
2085
|
+
x: e.x,
|
|
2086
|
+
y: K.value.y + I.value.scales.labels.fontSize + 6 + I.value.scales.labels.offsetY,
|
|
2087
|
+
"text-anchor": "middle",
|
|
2088
|
+
"font-size": I.value.scales.labels.fontSize,
|
|
2089
|
+
fill: I.value.scales.labels.color
|
|
2090
|
+
}, O(ri(e)), 9, Jt)) : y("", !0),
|
|
2091
|
+
L.value.scales.show ? (w(), b("text", {
|
|
2092
|
+
key: 3,
|
|
2093
|
+
x: K.value.x - L.value.scales.labels.fontSize / 2 - 8 + L.value.scales.labels.offsetX,
|
|
2094
|
+
y: e.y + L.value.scales.labels.fontSize / 3,
|
|
2095
|
+
"text-anchor": "end",
|
|
2096
|
+
"font-size": L.value.scales.labels.fontSize,
|
|
2097
|
+
fill: L.value.scales.labels.color
|
|
2098
|
+
}, O(ii(e)), 9, Yt)) : y("", !0),
|
|
2099
|
+
x("circle", {
|
|
2100
|
+
cx: K.value.x,
|
|
2101
|
+
cy: e.y,
|
|
2102
|
+
r: z.value.selectors.markers.radius,
|
|
2103
|
+
fill: z.value.selectors.markers.fill,
|
|
2104
|
+
stroke: z.value.selectors.markers.stroke,
|
|
2105
|
+
"stroke-width": z.value.selectors.markers.strokeWidth,
|
|
2106
|
+
class: "line-pointer"
|
|
2107
|
+
}, null, 8, Xt),
|
|
2108
|
+
x("circle", {
|
|
2109
|
+
cx: e.x,
|
|
2110
|
+
cy: K.value.y,
|
|
2111
|
+
r: z.value.selectors.markers.radius,
|
|
2112
|
+
fill: z.value.selectors.markers.fill,
|
|
2113
|
+
stroke: z.value.selectors.markers.stroke,
|
|
2114
|
+
"stroke-width": z.value.selectors.markers.strokeWidth,
|
|
2115
|
+
class: "line-pointer"
|
|
2116
|
+
}, null, 8, Zt),
|
|
2117
|
+
z.value.selectors.labels.showName && !z.value.name.show ? (w(), b("text", {
|
|
2118
|
+
key: 4,
|
|
2119
|
+
x: e.x,
|
|
2120
|
+
y: e.y + (e.y < K.value.y ? -z.value.selectors.labels.fontSize / 2 : z.value.selectors.labels.fontSize),
|
|
2121
|
+
"font-size": z.value.selectors.labels.fontSize,
|
|
2122
|
+
fill: z.value.selectors.labels.color,
|
|
2123
|
+
"font-weight": z.value.selectors.labels.bold ? "bold" : "normal",
|
|
2124
|
+
"text-anchor": e.x < W.value.left + 100 ? "start" : e.x > W.value.right - 100 ? "end" : e.x > K.value.x ? "start" : "end"
|
|
2125
|
+
}, O(e.v.name), 9, Qt)) : y("", !0)
|
|
2126
|
+
])) : y("", !0)], 64))), 128)),
|
|
2127
|
+
I.value.show ? (w(), b("g", {
|
|
2128
|
+
key: 10,
|
|
2129
|
+
ref_key: "xAxisLabelLeft",
|
|
2130
|
+
ref: Jn
|
|
2131
|
+
}, [x("text", {
|
|
2132
|
+
id: `vue-ui-scatter-xAxis-label-${M.value}`,
|
|
2133
|
+
transform: `translate(${I.value.fontSize + (V.value.layout.dataLabels.reverseAxisLabels ? L.value.offsetX : I.value.offsetX)}, ${W.value.top + W.value.height / 2 + (V.value.layout.dataLabels.reverseAxisLabels ? L.value.offsetY : I.value.offsetY)}), rotate(-90)`,
|
|
2134
|
+
"text-anchor": "middle",
|
|
2135
|
+
"font-size": I.value.fontSize,
|
|
2136
|
+
"font-weight": I.value.bold ? "bold" : "normal",
|
|
2137
|
+
fill: I.value.color
|
|
2138
|
+
}, O(V.value.layout.dataLabels.reverseAxisLabels ? L.value.name : I.value.name), 9, $t), I.value.showValue ? (w(), b("text", {
|
|
2139
|
+
key: 0,
|
|
2140
|
+
"text-anchor": "middle",
|
|
2141
|
+
"font-size": I.value.fontSize,
|
|
2142
|
+
fill: I.value.color,
|
|
2143
|
+
transform: `translate(${I.value.name ? I.value.fontSize * 3 : 0}, ${K.value.y + I.value.fontSize / 3}), rotate(-90)`
|
|
2144
|
+
}, O(k(g)(z.value.selectors.labels.x.formatter, k(h)(G.value.xMin), k(f)({
|
|
2145
|
+
p: z.value.selectors.labels.prefix,
|
|
2146
|
+
v: k(h)(G.value.xMin),
|
|
2147
|
+
s: z.value.selectors.labels.suffix,
|
|
2148
|
+
r: V.value.layout.dataLabels.xAxis.rounding
|
|
2149
|
+
}))), 9, en)) : y("", !0)], 512)) : y("", !0),
|
|
2150
|
+
I.value.show && I.value.showValue ? (w(), b("text", {
|
|
2151
|
+
key: 11,
|
|
2152
|
+
ref_key: "xAxisLabelRight",
|
|
2153
|
+
ref: Yn,
|
|
2154
|
+
"text-anchor": "middle",
|
|
2155
|
+
transform: `translate(${W.value.right + V.value.layout.padding.right + 6}, ${K.value.y + I.value.fontSize / 3}), rotate(-90)`,
|
|
2156
|
+
"font-size": I.value.fontSize,
|
|
2157
|
+
fill: I.value.color
|
|
2158
|
+
}, O(k(g)(z.value.selectors.labels.x.formatter, k(h)(G.value.xMax), k(f)({
|
|
2159
|
+
p: z.value.selectors.labels.prefix,
|
|
2160
|
+
v: k(h)(G.value.xMax),
|
|
2161
|
+
s: z.value.selectors.labels.suffix,
|
|
2162
|
+
r: I.value.rounding
|
|
2163
|
+
}))), 9, tn)) : y("", !0),
|
|
2164
|
+
L.value.show && L.value.showValue ? (w(), b("text", {
|
|
2165
|
+
key: 12,
|
|
2166
|
+
ref_key: "yAxisLabelTop",
|
|
2167
|
+
ref: Xn,
|
|
2168
|
+
x: K.value.x,
|
|
2169
|
+
y: W.value.top - L.value.fontSize,
|
|
2170
|
+
"text-anchor": "middle",
|
|
2171
|
+
"font-size": L.value.fontSize,
|
|
2172
|
+
fill: L.value.color
|
|
2173
|
+
}, O(k(g)(z.value.selectors.labels.y.formatter, k(h)(G.value.yMax), k(f)({
|
|
2174
|
+
p: z.value.selectors.labels.prefix,
|
|
2175
|
+
v: k(h)(G.value.yMax),
|
|
2176
|
+
s: z.value.selectors.labels.suffix,
|
|
2177
|
+
r: L.value.rounding
|
|
2178
|
+
}))), 9, nn)) : y("", !0),
|
|
2179
|
+
L.value.show ? (w(), b("g", {
|
|
2180
|
+
key: 13,
|
|
2181
|
+
ref_key: "yAxisLabelBottom",
|
|
2182
|
+
ref: Zn
|
|
2183
|
+
}, [L.value.showValue ? (w(), b("text", {
|
|
2184
|
+
key: 0,
|
|
2185
|
+
x: K.value.x,
|
|
2186
|
+
y: U.value.height - L.value.fontSize * 2,
|
|
2187
|
+
"text-anchor": "middle",
|
|
2188
|
+
"font-size": L.value.fontSize,
|
|
2189
|
+
fill: L.value.color
|
|
2190
|
+
}, O(k(g)(z.value.selectors.labels.y.formatter, k(h)(G.value.yMin), k(f)({
|
|
2191
|
+
p: z.value.selectors.labels.prefix,
|
|
2192
|
+
v: k(h)(G.value.yMin),
|
|
2193
|
+
s: z.value.selectors.labels.suffix,
|
|
2194
|
+
r: V.value.layout.dataLabels.yAxis.rounding
|
|
2195
|
+
}))), 9, rn)) : y("", !0), x("text", {
|
|
2196
|
+
"text-anchor": "middle",
|
|
2197
|
+
"font-size": L.value.fontSize,
|
|
2198
|
+
"font-weight": L.value.bold ? "bold" : "normal",
|
|
2199
|
+
fill: L.value.color,
|
|
2200
|
+
x: W.value.left + W.value.width / 2 + (V.value.layout.dataLabels.reverseAxisLabels ? I.value.offsetX : L.value.offsetX),
|
|
2201
|
+
y: U.value.height + (V.value.layout.dataLabels.reverseAxisLabels ? I.value.offsetY : L.value.offsetY)
|
|
2202
|
+
}, O(V.value.layout.dataLabels.reverseAxisLabels ? I.value.name : L.value.name), 9, an)], 512)) : y("", !0),
|
|
2203
|
+
x("clipPath", { id: `clip_path_${M.value}` }, [x("rect", {
|
|
2204
|
+
x: W.value.left,
|
|
2205
|
+
y: W.value.top,
|
|
2206
|
+
width: W.value.width <= 0 ? 1e-4 : W.value.width,
|
|
2207
|
+
height: W.value.height <= 0 ? 1e-4 : W.value.height
|
|
2208
|
+
}, null, 8, sn)], 8, on),
|
|
2209
|
+
V.value.layout.correlation.show ? (w(), b("g", cn, [(w(!0), b(_, null, E(q.value.filter((e) => e.correlation), (e, t) => (w(), b("line", {
|
|
2210
|
+
x1: e.correlation.x1,
|
|
2211
|
+
x2: e.correlation.x2,
|
|
2212
|
+
y1: e.correlation.y1,
|
|
2213
|
+
y2: e.correlation.y2,
|
|
2214
|
+
"stroke-dasharray": V.value.layout.correlation.strokeDasharray,
|
|
2215
|
+
stroke: e.color,
|
|
2216
|
+
"stroke-width": V.value.layout.correlation.strokeWidth,
|
|
2217
|
+
"clip-path": `url(#clip_path_${M.value})`
|
|
2218
|
+
}, null, 8, ln))), 256)), (w(!0), b(_, null, E(q.value.filter((e) => e.correlation), (e, t) => (w(), b("g", null, [V.value.layout.correlation.label.show ? (w(), b("text", {
|
|
2219
|
+
key: 0,
|
|
2220
|
+
x: e.correlation.x2,
|
|
2221
|
+
y: e.correlation.y2,
|
|
2222
|
+
fill: V.value.layout.correlation.label.useSerieColor ? e.color : V.value.layout.correlation.label.color,
|
|
2223
|
+
"text-anchor": "end",
|
|
2224
|
+
"font-size": V.value.layout.correlation.label.fontSize,
|
|
2225
|
+
"font-weight": V.value.layout.correlation.label.bold ? "bold" : "normal"
|
|
2226
|
+
}, O(k(f)({
|
|
2227
|
+
v: k(h)(e.correlation?.coefficient ?? 0),
|
|
2228
|
+
r: V.value.layout.correlation.label.roundingValue
|
|
2229
|
+
})), 9, un)) : y("", !0)]))), 256))])) : y("", !0),
|
|
2230
|
+
D(e.$slots, "svg", { svg: {
|
|
2231
|
+
...U.value,
|
|
2232
|
+
drawingArea: {
|
|
2233
|
+
...W.value,
|
|
2234
|
+
zero: K.value
|
|
2235
|
+
},
|
|
2236
|
+
data: Gr.value,
|
|
2237
|
+
isPrintingImg: k(xr) || k(Sr) || k(Li),
|
|
2238
|
+
isPrintingSvg: k(Ri)
|
|
2239
|
+
} }, void 0, !0)
|
|
2240
|
+
], 46, et)), e.$slots.hint ? (w(), b("div", dn, [D(e.$slots, "hint", C(S({
|
|
2241
|
+
hint: P.value.a11y.translations.keyboardNavigation,
|
|
2242
|
+
isVisible: rr.value
|
|
2243
|
+
})), void 0, !0)])) : y("", !0)]),
|
|
2244
|
+
e.$slots.watermark ? (w(), b("div", fn, [D(e.$slots, "watermark", C(S({ isPrinting: k(xr) || k(Sr) || k(Li) || k(Ri) })), void 0, !0)])) : y("", !0),
|
|
2245
|
+
x("div", { id: `legend-bottom-${M.value}` }, null, 8, pn),
|
|
2246
|
+
jn.value && Un.value && (V.value.legend.show || e.$slots.legend) ? (w(), Ne(Me, {
|
|
2247
|
+
key: 7,
|
|
2248
|
+
to: V.value.legend.position === "top" ? `#legend-top-${M.value}` : `#legend-bottom-${M.value}`
|
|
2249
|
+
}, [x("div", {
|
|
2250
|
+
ref_key: "chartLegend",
|
|
2251
|
+
ref: Ln
|
|
2252
|
+
}, [D(e.$slots, "legend", { legend: Ur.value }, () => [V.value.legend.show ? (w(), Ne(Ae, {
|
|
2253
|
+
key: `legend_${Hn.value}`,
|
|
2254
|
+
legendSet: Ur.value,
|
|
2255
|
+
config: Wr.value,
|
|
2256
|
+
isCursorPointer: or.value,
|
|
2257
|
+
onClickMarker: t[3] ||= ({ legend: e }) => li(e.id)
|
|
2258
|
+
}, {
|
|
2259
|
+
item: A(({ legend: e }) => [x("div", {
|
|
2260
|
+
onClick: (t) => e.segregate(),
|
|
2261
|
+
style: Ve(`opacity:${N.value.includes(e.id) ? .5 : 1}`)
|
|
2262
|
+
}, O(e.name), 13, mn)]),
|
|
2263
|
+
legendToggle: A(() => [Ur.value.length > 2 && V.value.legend.selectAllToggle.show && !k(lr) ? (w(), Ne(Ee, {
|
|
2264
|
+
key: 0,
|
|
2265
|
+
backgroundColor: V.value.legend.selectAllToggle.backgroundColor,
|
|
2266
|
+
color: V.value.legend.selectAllToggle.color,
|
|
2267
|
+
fontSize: V.value.legend.fontSize,
|
|
2268
|
+
checked: N.value.length > 0,
|
|
2269
|
+
isCursorPointer: or.value,
|
|
2270
|
+
onToggle: ci
|
|
2271
|
+
}, null, 8, [
|
|
2272
|
+
"backgroundColor",
|
|
2273
|
+
"color",
|
|
2274
|
+
"fontSize",
|
|
2275
|
+
"checked",
|
|
2276
|
+
"isCursorPointer"
|
|
2277
|
+
])) : y("", !0)]),
|
|
2278
|
+
_: 1
|
|
2279
|
+
}, 8, [
|
|
2280
|
+
"legendSet",
|
|
2281
|
+
"config",
|
|
2282
|
+
"isCursorPointer"
|
|
2283
|
+
])) : y("", !0)], !0)], 512)], 8, ["to"])) : y("", !0),
|
|
2284
|
+
e.$slots.source ? (w(), b("div", {
|
|
2285
|
+
key: 8,
|
|
2286
|
+
ref_key: "source",
|
|
2287
|
+
ref: Rn,
|
|
2288
|
+
dir: "auto"
|
|
2289
|
+
}, [D(e.$slots, "source", {}, void 0, !0)], 512)) : y("", !0),
|
|
2290
|
+
Ie(k(yn), {
|
|
2291
|
+
teleportTo: B.value.teleportTo,
|
|
2292
|
+
show: H.value.showTooltip && Mn.value,
|
|
2293
|
+
backgroundColor: B.value.backgroundColor,
|
|
2294
|
+
color: B.value.color,
|
|
2295
|
+
borderRadius: B.value.borderRadius,
|
|
2296
|
+
borderColor: B.value.borderColor,
|
|
2297
|
+
borderWidth: B.value.borderWidth,
|
|
2298
|
+
fontSize: B.value.fontSize,
|
|
2299
|
+
backgroundOpacity: B.value.backgroundOpacity,
|
|
2300
|
+
position: B.value.position,
|
|
2301
|
+
offsetX: B.value.offsetX,
|
|
2302
|
+
offsetY: B.value.offsetY,
|
|
2303
|
+
parent: Fn.value,
|
|
2304
|
+
content: Nn.value,
|
|
2305
|
+
isFullscreen: hi.value,
|
|
2306
|
+
isCustom: B.value.customFormat && typeof B.value.customFormat == "function",
|
|
2307
|
+
smooth: B.value.smooth,
|
|
2308
|
+
backdropFilter: B.value.backdropFilter,
|
|
2309
|
+
smoothForce: B.value.smoothForce,
|
|
2310
|
+
smoothSnapThreshold: B.value.smoothSnapThreshold,
|
|
2311
|
+
isA11yMode: nr.value === "keyboard",
|
|
2312
|
+
a11yPosition: tr.value
|
|
2313
|
+
}, {
|
|
2314
|
+
"tooltip-before": A(() => [D(e.$slots, "tooltip-before", C(S({ ...Xr.value })), void 0, !0)]),
|
|
2315
|
+
tooltip: A(() => [D(e.$slots, "tooltip", C(S({ ...Xr.value })), void 0, !0)]),
|
|
2316
|
+
"tooltip-after": A(() => [D(e.$slots, "tooltip-after", C(S({ ...Xr.value })), void 0, !0)]),
|
|
2317
|
+
default: A(() => [B.value.showShape ? (w(), b("div", hn, [(w(), b("svg", gn, [Ie(xe, {
|
|
2318
|
+
shape: Z.value.shape,
|
|
2319
|
+
color: Z.value.color,
|
|
2320
|
+
plot: {
|
|
2321
|
+
x: 10,
|
|
2322
|
+
y: 10
|
|
2323
|
+
},
|
|
2324
|
+
radius: 7
|
|
2325
|
+
}, null, 8, ["shape", "color"])]))])) : y("", !0)]),
|
|
2326
|
+
_: 3
|
|
2327
|
+
}, 8, [
|
|
2328
|
+
"teleportTo",
|
|
2329
|
+
"show",
|
|
2330
|
+
"backgroundColor",
|
|
2331
|
+
"color",
|
|
2332
|
+
"borderRadius",
|
|
2333
|
+
"borderColor",
|
|
2334
|
+
"borderWidth",
|
|
2335
|
+
"fontSize",
|
|
2336
|
+
"backgroundOpacity",
|
|
2337
|
+
"position",
|
|
2338
|
+
"offsetX",
|
|
2339
|
+
"offsetY",
|
|
2340
|
+
"parent",
|
|
2341
|
+
"content",
|
|
2342
|
+
"isFullscreen",
|
|
2343
|
+
"isCustom",
|
|
2344
|
+
"smooth",
|
|
2345
|
+
"backdropFilter",
|
|
2346
|
+
"smoothForce",
|
|
2347
|
+
"smoothSnapThreshold",
|
|
2348
|
+
"isA11yMode",
|
|
2349
|
+
"a11yPosition"
|
|
2350
|
+
]),
|
|
2351
|
+
jn.value && F.value.buttons.table ? (w(), Ne(We(Mi.value.component), Re({ key: 9 }, Mi.value.props, {
|
|
2352
|
+
ref_key: "tableUnit",
|
|
2353
|
+
ref: Kn,
|
|
2354
|
+
onClose: Ni
|
|
2355
|
+
}), Pe({
|
|
2356
|
+
content: A(() => [(w(), Ne(k(Sn), {
|
|
2357
|
+
key: `table_${Vn.value}`,
|
|
2358
|
+
colNames: mi.value.colNames,
|
|
2359
|
+
head: mi.value.head,
|
|
2360
|
+
body: mi.value.body,
|
|
2361
|
+
config: mi.value.config,
|
|
2362
|
+
title: P.value.table.useDialog ? "" : Mi.value.title,
|
|
2363
|
+
withCloseButton: !P.value.table.useDialog,
|
|
2364
|
+
isCursorPointer: or.value,
|
|
2365
|
+
onClose: Ni
|
|
2366
|
+
}, {
|
|
2367
|
+
th: A(({ th: e }) => [Fe(O(e), 1)]),
|
|
2368
|
+
td: A(({ td: e }) => [e.shape ? (w(), b("div", _n, [x("span", null, O(e.content), 1)])) : (w(), b("div", {
|
|
2369
|
+
key: 1,
|
|
2370
|
+
innerHTML: e
|
|
2371
|
+
}, null, 8, vn))]),
|
|
2372
|
+
_: 1
|
|
2373
|
+
}, 8, [
|
|
2374
|
+
"colNames",
|
|
2375
|
+
"head",
|
|
2376
|
+
"body",
|
|
2377
|
+
"config",
|
|
2378
|
+
"title",
|
|
2379
|
+
"withCloseButton",
|
|
2380
|
+
"isCursorPointer"
|
|
2381
|
+
]))]),
|
|
2382
|
+
_: 2
|
|
2383
|
+
}, [P.value.table.useDialog ? {
|
|
2384
|
+
name: "title",
|
|
2385
|
+
fn: A(() => [Fe(O(Mi.value.title), 1)]),
|
|
2386
|
+
key: "0"
|
|
2387
|
+
} : void 0, P.value.table.useDialog ? {
|
|
2388
|
+
name: "actions",
|
|
2389
|
+
fn: A(() => [x("button", {
|
|
2390
|
+
tabindex: "0",
|
|
2391
|
+
class: "vue-ui-user-options-button",
|
|
2392
|
+
onClick: t[4] ||= (e) => pi(F.value.callbacks.csv),
|
|
2393
|
+
style: Ve({ cursor: or.value ? "pointer" : "default" })
|
|
2394
|
+
}, [Ie(k(bn), {
|
|
2395
|
+
name: "fileCsv",
|
|
2396
|
+
stroke: Mi.value.props.color
|
|
2397
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
2398
|
+
key: "1"
|
|
2399
|
+
} : void 0]), 1040)) : y("", !0),
|
|
2400
|
+
D(e.$slots, "skeleton", {}, () => [k(lr) ? (w(), Ne(me, { key: 0 })) : y("", !0)], !0)
|
|
2401
|
+
], 46, Ye));
|
|
2402
|
+
}
|
|
2403
|
+
}, [["__scopeId", "data-v-f6390da0"]]);
|
|
2404
|
+
//#endregion
|
|
2405
|
+
export { Je as n, yn as t };
|