vue-data-ui 3.15.12 → 3.16.1
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 +132 -59
- package/dist/A11yDataTable-KcVAX2cP.js +54 -0
- package/dist/{Arrow-DlPyR6HQ.js → Arrow-Bn-9n3bm.js} +1 -1
- package/dist/{BaseDraggableDialog-DSpKTn3R.js → BaseDraggableDialog-CIb-iD9g.js} +2 -2
- package/dist/{BaseIcon-CNx8Tzl5.js → BaseIcon-Cb3zzG6s.js} +1 -1
- package/dist/{BaseLegendToggle-Y61xahI4.js → BaseLegendToggle-BQVIawmA.js} +1 -1
- package/dist/{BaseZoomControls-CoFievy9.js → BaseZoomControls-DievbOeJ.js} +2 -2
- package/dist/ColorPicker-B0mV4xzu.js +255 -0
- package/dist/{DataTable-Bo1pmAqG.js → DataTable-DT2kIdQ6.js} +2 -2
- package/dist/Legend-CS7Xo5LK.js +101 -0
- package/dist/{NonSvgPenAndPaper-CGk_xThe.js → NonSvgPenAndPaper-VyJFyJ6X.js} +3 -3
- package/dist/{PackageVersion-DN9d0ME5.js → PackageVersion-DPO-OOVI.js} +1 -1
- package/dist/{PenAndPaper-DWV1FMIi.js → PenAndPaper-Ct3qJ4lA.js} +109 -101
- package/dist/{Shape-CSyWYgXc.js → Shape-BKRUOeKk.js} +1 -1
- package/dist/{Slicer-DZJA9IG-.js → Slicer-DUycDH_N.js} +2 -2
- package/dist/{SlicerPreview-I2J0UUF_.js → SlicerPreview-DTjwV0iY.js} +2 -2
- package/dist/{SparkTooltip-BiseJed3.js → SparkTooltip-BorBpltj.js} +1 -1
- package/dist/{Title-BfyrP-jp.js → Title-BeMKE1cj.js} +1 -1
- package/dist/{Tooltip-DL3QgjZf.js → Tooltip-Bf-kM3_A.js} +86 -68
- package/dist/{UserOptions-CrLqEimB.js → UserOptions-rW2fRf3V.js} +228 -222
- package/dist/components/arrow.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-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-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/{dom-to-png-BAqzNjb1.js → dom-to-png-CtxhhdWb.js} +1 -1
- package/dist/{exposedLib-H4lmBl1t.js → exposedLib-DlqmhBx3.js} +1 -1
- package/dist/{img-BYYzY_QU.js → img-LXxMLmCg.js} +1 -1
- package/dist/{labelUtils-CTXUc3V9.js → labelUtils-CqTHa20R.js} +1 -1
- package/dist/{lib-GwPnJSrY.js → lib-DBptbyyI.js} +106 -84
- package/dist/{pdf-z-YiJeJQ.js → pdf-B4tTdfvl.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +59 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-80fzdfxt.js → useAutoSizeLabelsInsideViewbox-DX7LdvFX.js} +1 -1
- package/dist/{useConfig-CIgyKZ6R.js → useConfig-DO94Aj5s.js} +953 -700
- package/dist/{useNestedProp-BBT0mbHh.js → useNestedProp-Bf5XFbs8.js} +1 -1
- package/dist/{useObjectBindings-BlXBVtRa.js → useObjectBindings-DQ8g8Jwi.js} +1 -1
- package/dist/usePrefersMotion-CUKm8_t8.js +15 -0
- package/dist/{usePrinter-DiK5R6k-.js → usePrinter-CEpYU3r5.js} +2 -2
- package/dist/utils.js +3 -3
- package/dist/{vue-data-ui-C2kPofmi.js → vue-data-ui-DXGkXRnC.js} +68 -68
- package/dist/vue-data-ui.js +72 -72
- package/dist/vue-ui-3d-bar-BaFpQnd5.js +1597 -0
- package/dist/{vue-ui-accordion-BGHTqIBt.js → vue-ui-accordion-nvggWcGN.js} +4 -4
- package/dist/vue-ui-age-pyramid-CRM498Pc.js +1069 -0
- package/dist/{vue-ui-annotator-B1GWVtPp.js → vue-ui-annotator-CkPi9moo.js} +7 -7
- package/dist/{vue-ui-bullet-DPoGGtaG.js → vue-ui-bullet-BBiwof3c.js} +158 -150
- package/dist/vue-ui-bump-Brxpu4xV.js +1147 -0
- package/dist/vue-ui-candlestick-DAnZv77-.js +1587 -0
- package/dist/{vue-ui-carousel-table-CmiHTJ8E.js → vue-ui-carousel-table-BHRZBYY0.js} +168 -160
- package/dist/vue-ui-chestnut-CbrYnRgm.js +1812 -0
- package/dist/vue-ui-chord-CaX_IUVs.js +1326 -0
- package/dist/vue-ui-circle-pack-CR3h53sc.js +988 -0
- package/dist/{vue-ui-cursor-B4mHR7QC.js → vue-ui-cursor-Cjfazw7Z.js} +4 -4
- package/dist/vue-ui-dag-B9vH3c66.js +3047 -0
- package/dist/{vue-ui-dashboard-Bo5FX73U.js → vue-ui-dashboard-DWll05qs.js} +70 -70
- package/dist/{vue-ui-digits-mpo2IcM5.js → vue-ui-digits-DcM67rMx.js} +76 -66
- package/dist/vue-ui-donut-Be5G38P5.js +2229 -0
- package/dist/vue-ui-donut-evolution-BLSesj3c.js +1358 -0
- package/dist/vue-ui-dumbbell-DIMiCY4r.js +1380 -0
- package/dist/vue-ui-flow-zvZylhgr.js +1202 -0
- package/dist/{vue-ui-funnel-BRkaEkBb.js → vue-ui-funnel-CSri-oWm.js} +7 -7
- package/dist/vue-ui-galaxy-CGykxsAI.js +1012 -0
- package/dist/{vue-ui-gauge-J2VYHsQe.js → vue-ui-gauge-D1MNB9Jq.js} +8 -8
- package/dist/vue-ui-geo-DdJDGhG2.js +1437 -0
- package/dist/{vue-ui-gizmo-DEec3-v9.js → vue-ui-gizmo-BZYRHGFm.js} +77 -68
- package/dist/vue-ui-heatmap-CryOx6XK.js +1500 -0
- package/dist/vue-ui-history-plot-C85iw9Kl.js +1449 -0
- package/dist/vue-ui-horizontal-bar-BoBZOybC.js +1637 -0
- package/dist/vue-ui-kpi-DHrolXw6.js +109 -0
- package/dist/{vue-ui-mini-loader-CoOHvZUk.js → vue-ui-mini-loader-Bc3fEQ9j.js} +3 -3
- package/dist/{vue-ui-molecule-Chq1qWDK.js → vue-ui-molecule-DJ_BQ4DK.js} +6 -6
- package/dist/vue-ui-mood-radar-CBE02TpQ.js +1086 -0
- package/dist/vue-ui-nested-donuts-YTFtb4CL.js +1595 -0
- package/dist/vue-ui-onion-B9l81-PS.js +1124 -0
- package/dist/vue-ui-parallel-coordinate-plot-C1e_rs8J.js +1252 -0
- package/dist/vue-ui-quadrant-C1qsLCRn.js +1759 -0
- package/dist/vue-ui-quick-chart-DFoz3WiA.js +2216 -0
- package/dist/vue-ui-radar-Cmo3p-UA.js +1139 -0
- package/dist/{vue-ui-rating-zV58MDQh.js → vue-ui-rating-BAHhYt_A.js} +3 -3
- package/dist/vue-ui-relation-circle-BqwznVwf.js +782 -0
- package/dist/vue-ui-ridgeline-CDk9eXJq.js +1473 -0
- package/dist/vue-ui-rings-BRkGoQdL.js +1156 -0
- package/dist/vue-ui-scatter-BxDtWASQ.js +1831 -0
- package/dist/{vue-ui-skeleton-CbqNz9IE.js → vue-ui-skeleton-D6kTb9aO.js} +4 -4
- package/dist/{vue-ui-smiley-BK5EKp9u.js → vue-ui-smiley-CzVaLlpB.js} +3 -3
- package/dist/vue-ui-spark-trend-D8Mf2A1w.js +378 -0
- package/dist/{vue-ui-sparkbar-DUDWvTo-.js → vue-ui-sparkbar-BbYj56c3.js} +86 -84
- package/dist/vue-ui-sparkgauge-DXzOSLRb.js +256 -0
- package/dist/vue-ui-sparkhistogram-DMfSx1iH.js +474 -0
- package/dist/vue-ui-sparkline-D-rQ9PsC.js +1327 -0
- package/dist/vue-ui-sparkstackbar-DK5n8IKP.js +621 -0
- package/dist/vue-ui-stackbar-BHthy6jf.js +2070 -0
- package/dist/vue-ui-stackline-C6-WNpKD.js +2164 -0
- package/dist/vue-ui-strip-plot-CHu-1ilI.js +1183 -0
- package/dist/{vue-ui-table-BHuXI4Eq.js → vue-ui-table-DW9JGsLq.js} +6 -6
- package/dist/{vue-ui-table-heatmap-y88sBfu3.js → vue-ui-table-heatmap-LYqoBit9.js} +6 -6
- package/dist/{vue-ui-table-sparkline-ClpLLKi2.js → vue-ui-table-sparkline-CXK1dFr-.js} +5 -5
- package/dist/{vue-ui-thermometer-sjruUGQx.js → vue-ui-thermometer-BN8tflOz.js} +272 -256
- package/dist/{vue-ui-timer-CgdgMKIc.js → vue-ui-timer-DGT0UBOF.js} +6 -6
- package/dist/{vue-ui-tiremarks-UBDpAIVr.js → vue-ui-tiremarks-BZ-osQqY.js} +204 -191
- package/dist/vue-ui-treemap-98KaVRyd.js +1723 -0
- package/dist/vue-ui-waffle-Cb7oJnIc.js +1321 -0
- package/dist/vue-ui-wheel-sfew1fjw.js +738 -0
- package/dist/vue-ui-word-cloud-vq1t9JHr.js +1548 -0
- package/dist/{vue-ui-world-D-3wgoTn.js → vue-ui-world-CN0f6elD.js} +8 -8
- package/dist/vue-ui-xy-BdzEiImZ.js +3877 -0
- package/dist/vue-ui-xy-canvas-CWQzUQzY.js +1810 -0
- package/package.json +2 -2
- package/dist/ColorPicker-j0ySewhI.js +0 -244
- package/dist/Legend-1LMMsPxL.js +0 -90
- package/dist/vue-ui-3d-bar-BhNgFaJA.js +0 -1484
- package/dist/vue-ui-age-pyramid-CuYRf5v-.js +0 -997
- package/dist/vue-ui-bump-C_fKharc.js +0 -1059
- package/dist/vue-ui-candlestick-BY-_E7eZ.js +0 -1487
- package/dist/vue-ui-chestnut-C-bQYaNI.js +0 -1557
- package/dist/vue-ui-chord-uQYQgyGM.js +0 -1220
- package/dist/vue-ui-circle-pack-CdbDcuDw.js +0 -907
- package/dist/vue-ui-dag-DsHUvjvm.js +0 -2885
- package/dist/vue-ui-donut-CzCgCVsx.js +0 -2139
- package/dist/vue-ui-donut-evolution-C_ck_TOR.js +0 -1297
- package/dist/vue-ui-dumbbell-CVSA90b2.js +0 -1293
- package/dist/vue-ui-flow-CsbSaFnu.js +0 -1075
- package/dist/vue-ui-galaxy-DWKHDciu.js +0 -914
- package/dist/vue-ui-geo-DykhEWVq.js +0 -1331
- package/dist/vue-ui-heatmap-BEDirv8T.js +0 -1334
- package/dist/vue-ui-history-plot-Bs96PebH.js +0 -1292
- package/dist/vue-ui-horizontal-bar-ClQcB9nL.js +0 -1522
- package/dist/vue-ui-kpi-DlUEHKuw.js +0 -101
- package/dist/vue-ui-mood-radar-A2LBLgUi.js +0 -967
- package/dist/vue-ui-nested-donuts-DFX251aT.js +0 -1513
- package/dist/vue-ui-onion-CW0YO9Ro.js +0 -1045
- package/dist/vue-ui-parallel-coordinate-plot-UFg10bHP.js +0 -1134
- package/dist/vue-ui-quadrant-C1pLW2zA.js +0 -1647
- package/dist/vue-ui-quick-chart-FaxttnJY.js +0 -2030
- package/dist/vue-ui-radar-DE70LPBZ.js +0 -1067
- package/dist/vue-ui-relation-circle-iuRXIyRU.js +0 -704
- package/dist/vue-ui-ridgeline-CwvDh5pG.js +0 -1385
- package/dist/vue-ui-rings-80ZUki42.js +0 -1083
- package/dist/vue-ui-scatter-FdAAYJOK.js +0 -1670
- package/dist/vue-ui-spark-trend-C68p8-Xp.js +0 -349
- package/dist/vue-ui-sparkgauge-DdRtHQDe.js +0 -245
- package/dist/vue-ui-sparkhistogram-C9DvzQae.js +0 -396
- package/dist/vue-ui-sparkline-B2RDrdiR.js +0 -1273
- package/dist/vue-ui-sparkstackbar-BsIOHUE5.js +0 -475
- package/dist/vue-ui-stackbar-BZl0kEkb.js +0 -2001
- package/dist/vue-ui-stackline-2VKxwFei.js +0 -2099
- package/dist/vue-ui-strip-plot-B9nBSRyY.js +0 -1080
- package/dist/vue-ui-treemap-BS5EilZf.js +0 -1645
- package/dist/vue-ui-waffle-CbX5K9Q2.js +0 -1211
- package/dist/vue-ui-wheel-BIJ09H5D.js +0 -723
- package/dist/vue-ui-word-cloud-DJmJ-oYT.js +0 -1466
- package/dist/vue-ui-xy-canvas-4auyhlTr.js +0 -1717
- package/dist/vue-ui-xy-f67V1xjd.js +0 -3713
|
@@ -0,0 +1,1831 @@
|
|
|
1
|
+
import { defineAsyncComponent as ye, computed as T, ref as w, toRefs as Ul, watch as Ue, shallowRef as Gt, onMounted as jl, onBeforeUnmount as Gl, openBlock as v, createElementBlock as c, unref as h, normalizeStyle as ue, normalizeClass as qt, createElementVNode as k, toDisplayString as V, createCommentVNode as x, createBlock as ae, withCtx as B, renderSlot as z, normalizeProps as H, guardReactiveProps as K, createSlots as Ht, createVNode as Oe, Fragment as Q, renderList as oe, Teleport as ql, resolveDynamicComponent as Hl, mergeProps as Kl, createTextVNode as Kt, nextTick as yt } from "vue";
|
|
2
|
+
import { j as Zl, t as Zt, m as Jl, p as ge, o as Jt, q as dt, n as Ql, r as Qt, ak as ea, s as ht, am as ta, c as la, u as je, k as se, l as ee, X as aa, al as oa, K as Z, a0 as sa, a1 as na, T as ua, U as ia, a3 as ra } from "./lib-DBptbyyI.js";
|
|
3
|
+
import { t as va, u as ca } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as ya } from "./useConfig-DO94Aj5s.js";
|
|
5
|
+
import { u as da, B as ha } from "./BaseScanner-BhhkKVoj.js";
|
|
6
|
+
import { u as fa } from "./usePrinter-CEpYU3r5.js";
|
|
7
|
+
import { u as pa } from "./useSvgExport-ByUukOZt.js";
|
|
8
|
+
import { u as ft } from "./useNestedProp-Bf5XFbs8.js";
|
|
9
|
+
import { u as ga } from "./useThemeCheck-D1ZYXUwG.js";
|
|
10
|
+
import { u as ma } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
|
+
import { u as xa } from "./useChartAccessibility-9icAAmYg.js";
|
|
12
|
+
import ba from "./img-LXxMLmCg.js";
|
|
13
|
+
import { _ as pt } from "./Shape-BKRUOeKk.js";
|
|
14
|
+
import ka from "./Title-BeMKE1cj.js";
|
|
15
|
+
import wa from "./vue_ui_scatter-CO5Iq9ai.js";
|
|
16
|
+
import $a from "./Legend-CS7Xo5LK.js";
|
|
17
|
+
import { A as Ma } from "./A11yDataTable-KcVAX2cP.js";
|
|
18
|
+
import { B as _a } from "./BaseLegendToggle-BQVIawmA.js";
|
|
19
|
+
import { _ as Ca } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
20
|
+
const Aa = ["id"], Sa = ["id"], Ta = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "sr-only",
|
|
23
|
+
"aria-live": "polite",
|
|
24
|
+
"aria-atomic": "true"
|
|
25
|
+
}, La = ["id"], Pa = { style: { position: "relative" } }, Ba = ["xmlns", "aria-describedby", "viewBox"], za = ["width", "height"], Ia = { key: 1 }, Oa = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Da = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ea = { key: 2 }, Na = ["id"], Fa = ["stop-color"], Wa = ["stop-color"], Xa = ["id"], Ya = ["stop-color"], Ra = ["stop-color"], Va = ["x", "y", "width", "height", "fill", "stroke", "stroke-width", "rx"], Ua = ["x", "y", "width", "height", "onMouseenter"], ja = {
|
|
26
|
+
key: 2,
|
|
27
|
+
style: { "pointer-events": "none" }
|
|
28
|
+
}, Ga = ["x", "y", "width", "height", "fill", "fill-opacity"], qa = ["x1", "x2", "y2", "stroke", "stroke-dasharray", "stroke-width"], Ha = ["x1", "x2", "y2", "stroke", "stroke-dasharray", "stroke-width"], Ka = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], Za = ["x", "y", "width", "height", "onMouseenter"], Ja = {
|
|
29
|
+
key: 2,
|
|
30
|
+
style: { "pointer-events": "none" }
|
|
31
|
+
}, Qa = ["x", "y", "width", "height", "fill", "fill-opacity"], eo = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], to = ["x1", "x2", "y1", "y2", "stroke", "stroke-dasharray", "stroke-width"], lo = {
|
|
32
|
+
key: 0,
|
|
33
|
+
style: { "pointer-events": "none" }
|
|
34
|
+
}, ao = ["d", "stroke", "stroke-width"], oo = ["d", "stroke", "stroke-width"], so = ["d", "stroke", "stroke-width"], no = ["d", "stroke", "stroke-width"], uo = { key: 3 }, io = ["points", "fill", "stroke-width", "stroke-dasharray", "stroke"], ro = { key: 0 }, vo = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseover", "onMouseleave", "onClick"], co = { key: 1 }, yo = ["clip-path"], ho = ["d", "fill", "stroke", "stroke-width", "stroke-opacity"], fo = {
|
|
35
|
+
key: 0,
|
|
36
|
+
style: { "pointer-events": "none" }
|
|
37
|
+
}, po = ["x", "y", "width", "height"], go = {
|
|
38
|
+
key: 6,
|
|
39
|
+
style: { "pointer-events": "none !important" }
|
|
40
|
+
}, mo = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], xo = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], bo = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], ko = ["x", "y", "font-size", "fill", "font-weight"], wo = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], $o = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Mo = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], _o = ["id", "transform", "font-size", "font-weight", "fill"], Co = ["font-size", "fill", "transform"], Ao = ["transform", "font-size", "fill"], So = ["x", "y", "font-size", "fill"], To = ["x", "y", "font-size", "fill"], Lo = ["font-size", "font-weight", "fill", "x", "y"], Po = ["id"], Bo = ["x", "y", "width", "height"], zo = {
|
|
41
|
+
key: 11,
|
|
42
|
+
style: { pointerEvents: "none" }
|
|
43
|
+
}, Io = ["x1", "x2", "y1", "y2", "stroke-dasharray", "stroke", "stroke-width", "clip-path"], Oo = ["x", "y", "fill", "font-size", "font-weight"], Do = {
|
|
44
|
+
key: 0,
|
|
45
|
+
style: { position: "absolute", top: "100%", left: "0", width: "100%" },
|
|
46
|
+
"data-dom-to-png-ignore": "",
|
|
47
|
+
"aria-hidden": "true"
|
|
48
|
+
}, Eo = {
|
|
49
|
+
key: 6,
|
|
50
|
+
class: "vue-data-ui-watermark"
|
|
51
|
+
}, No = ["id"], Fo = ["onClick"], Wo = {
|
|
52
|
+
key: 0,
|
|
53
|
+
style: { width: "100%", display: "flex", "align-items": "center", "justify-content": "center" }
|
|
54
|
+
}, Xo = {
|
|
55
|
+
viewBox: "0 0 20 20",
|
|
56
|
+
height: "20",
|
|
57
|
+
width: "20",
|
|
58
|
+
style: { overflow: "hidden", background: "transparent" }
|
|
59
|
+
}, Yo = { key: 0 }, Ro = ["innerHTML"], Vo = {
|
|
60
|
+
__name: "vue-ui-scatter",
|
|
61
|
+
props: {
|
|
62
|
+
config: {
|
|
63
|
+
type: Object,
|
|
64
|
+
default() {
|
|
65
|
+
return {};
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
dataset: {
|
|
69
|
+
type: Array,
|
|
70
|
+
default() {
|
|
71
|
+
return [];
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
emits: ["copyAlt"],
|
|
76
|
+
setup(el, { expose: tl, emit: ll }) {
|
|
77
|
+
const al = ye(() => import("./Tooltip-Bf-kM3_A.js")), ol = ye(() => import("./BaseIcon-Cb3zzG6s.js")), sl = ye(() => import("./vue-ui-accordion-nvggWcGN.js")), nl = ye(() => import("./DataTable-DT2kIdQ6.js")), ul = ye(() => import("./PenAndPaper-Ct3qJ4lA.js")), il = ye(() => import("./UserOptions-rW2fRf3V.js")), rl = ye(() => import("./PackageVersion-DPO-OOVI.js")), vl = ye(() => import("./BaseDraggableDialog-CIb-iD9g.js")), { vue_ui_scatter: cl } = ya(), { isThemeValid: yl, warnInvalidTheme: dl } = ga(), te = el, hl = ll, gt = T(() => !!te.dataset && te.dataset.length), N = w(Zl()), De = w(!1), Ge = w(""), mt = w(0), ne = w(null), xt = w(null), bt = w(null), kt = w(null), wt = w(null), $t = w(0), Mt = w(0), _t = w(0), I = w([]), Ct = w(!1), _e = w(null), Ce = w(null), Ae = w(null), qe = w(null), Ee = w(!1), Ne = w(!1), He = w(null), fl = w(null), pl = w(null), Ke = w(null), me = w(null), At = w({ x: 0, y: 0 }), Se = w("pointer"), Fe = w(!1), Te = w(null), e = w(tt()), de = T(() => e.value.userOptions.useCursorPointer);
|
|
78
|
+
function gl(t = 100, a = 0.8, l = {}) {
|
|
79
|
+
const { meanX: s = 0, sdX: o = 1, meanY: n = 0, sdY: i = 1, seed: y } = l;
|
|
80
|
+
let r = (y ?? Math.floor(Math.random() * 2 ** 31)) >>> 0;
|
|
81
|
+
const f = () => (r = r * 1664525 + 1013904223 >>> 0, r / 2 ** 32), A = () => {
|
|
82
|
+
let b = 0, X = 0;
|
|
83
|
+
for (; b === 0; ) b = f();
|
|
84
|
+
for (; X === 0; ) X = f();
|
|
85
|
+
return Math.sqrt(-2 * Math.log(b)) * Math.cos(2 * Math.PI * X);
|
|
86
|
+
}, d = t / 2, m = Array.from({ length: d }, A), E = Array.from({ length: d }, A), _ = (b) => b.reduce((X, Ie) => X + Ie, 0) / b.length, O = _(m), D = _(E);
|
|
87
|
+
for (let b = 0; b < d; b += 1)
|
|
88
|
+
m[b] -= O, E[b] -= D;
|
|
89
|
+
const L = (b, X) => b.reduce((Ie, Ve, ct) => Ie + Ve * X[ct], 0), C = (b) => L(b, b), p = L(E, m) / C(m), P = E.map((b, X) => b - p * m[X]), G = C(m) / d, le = C(P) / d, ce = Math.sqrt((1 - a * a) * G / le), j = m.map((b, X) => a * b + ce * P[X]), pe = m.concat(m.map((b) => -b)), vt = j.concat(j.map((b) => -b)), Be = (b) => Math.sqrt(C(b) / b.length), $e = (b, X, Ie) => {
|
|
90
|
+
const Ve = Be(b);
|
|
91
|
+
return b.map((ct) => Ie + (Ve ? ct / Ve * X : 0));
|
|
92
|
+
}, Me = $e(pe, o, s), ze = $e(vt, i, n);
|
|
93
|
+
for (let b = Me.length - 1; b > 0; b -= 1) {
|
|
94
|
+
const X = Math.floor(f() * (b + 1));
|
|
95
|
+
[Me[b], Me[X]] = [Me[X], Me[b]], [ze[b], ze[X]] = [ze[X], ze[b]];
|
|
96
|
+
}
|
|
97
|
+
return Me.map((b, X) => ({ x: b, y: ze[X] }));
|
|
98
|
+
}
|
|
99
|
+
const ml = T(() => Zt({
|
|
100
|
+
defaultConfig: {
|
|
101
|
+
userOptions: { show: !1 },
|
|
102
|
+
table: { show: !1 },
|
|
103
|
+
useCssAnimation: !1,
|
|
104
|
+
style: {
|
|
105
|
+
backgroundColor: "#99999930",
|
|
106
|
+
layout: {
|
|
107
|
+
axis: {
|
|
108
|
+
stroke: "#6A6A6A"
|
|
109
|
+
},
|
|
110
|
+
correlation: {
|
|
111
|
+
label: { show: !1 }
|
|
112
|
+
},
|
|
113
|
+
dataLabels: {
|
|
114
|
+
xAxis: { show: !1 },
|
|
115
|
+
yAxis: { show: !1 }
|
|
116
|
+
},
|
|
117
|
+
marginalBars: {
|
|
118
|
+
fill: "#99999960"
|
|
119
|
+
},
|
|
120
|
+
padding: { top: 12, right: 12, bottom: 12, left: 12 },
|
|
121
|
+
plots: {
|
|
122
|
+
stroke: "#6A6A6A"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
legend: {
|
|
126
|
+
backgroundColor: "transparent"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
userConfig: e.value.skeletonConfig ?? {}
|
|
131
|
+
})), { loading: Ze, FINAL_DATASET: Je, manualLoading: Qe } = da({
|
|
132
|
+
...Ul(te),
|
|
133
|
+
FINAL_CONFIG: e,
|
|
134
|
+
prepareConfig: tt,
|
|
135
|
+
skeletonDataset: te.config?.skeletonDataset ?? [
|
|
136
|
+
{
|
|
137
|
+
name: "",
|
|
138
|
+
color: "#999999",
|
|
139
|
+
values: gl(100, 0.5, { seed: 42 })
|
|
140
|
+
}
|
|
141
|
+
],
|
|
142
|
+
skeletonConfig: Zt({
|
|
143
|
+
defaultConfig: e.value,
|
|
144
|
+
userConfig: ml.value
|
|
145
|
+
})
|
|
146
|
+
}), { userOptionsVisible: et, setUserOptionsVisibility: St, keepUserOptionState: Tt } = ma({ config: e.value }), { svgRef: ie } = xa({ config: e.value.style.title });
|
|
147
|
+
function tt() {
|
|
148
|
+
const t = ft({
|
|
149
|
+
userConfig: te.config,
|
|
150
|
+
defaultConfig: cl
|
|
151
|
+
}), a = t.theme;
|
|
152
|
+
if (!a) return t;
|
|
153
|
+
if (!yl.value(t))
|
|
154
|
+
return dl(t), t;
|
|
155
|
+
const l = ft({
|
|
156
|
+
userConfig: wa[a] || te.config,
|
|
157
|
+
defaultConfig: t
|
|
158
|
+
}), s = ft({
|
|
159
|
+
userConfig: te.config,
|
|
160
|
+
defaultConfig: l
|
|
161
|
+
});
|
|
162
|
+
return {
|
|
163
|
+
...s,
|
|
164
|
+
customPalette: s.customPalette.length ? s.customPalette : Jl[a] || ge
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
Ue(() => te.config, (t) => {
|
|
168
|
+
Ze.value || (e.value = tt()), et.value = !e.value.userOptions.showOnChartHover, Pt(), $t.value += 1, Mt.value += 1, _t.value += 1, q.value.showTable = e.value.table.show, q.value.showTooltip = e.value.style.tooltip.show, Lt.value && e.value.usePerformanceMode && console.warn(`VueUiScatter : You are using performance mode
|
|
169
|
+
|
|
170
|
+
- downsampling is disabled in this mode, all plots are rendered
|
|
171
|
+
|
|
172
|
+
- plot significance is not active in this mode (all plots have the same opacity)
|
|
173
|
+
|
|
174
|
+
- Depending on plot density, shapes might not display a border (stroke) to avoid fuzziness
|
|
175
|
+
|
|
176
|
+
ℹ️ To remove this warning, set config.debug to false.`);
|
|
177
|
+
}, { deep: !0 }), Ue(() => te.dataset, (t) => {
|
|
178
|
+
Array.isArray(t) && t.length > 0 && (Qe.value = !1);
|
|
179
|
+
}, { deep: !0 });
|
|
180
|
+
const re = Gt(null), xe = Gt(null);
|
|
181
|
+
jl(() => {
|
|
182
|
+
Ct.value = !0, Pt();
|
|
183
|
+
});
|
|
184
|
+
const Lt = T(() => !!e.value.debug);
|
|
185
|
+
function Pt() {
|
|
186
|
+
if (Jt(te.dataset) && (dt({
|
|
187
|
+
componentName: "VueUiScatter",
|
|
188
|
+
type: "dataset",
|
|
189
|
+
debug: Lt.value
|
|
190
|
+
}), Qe.value = !0), Jt(te.dataset) || (Qe.value = e.value.loading), e.value.responsive) {
|
|
191
|
+
const t = va(() => {
|
|
192
|
+
const { width: a, height: l } = ca({
|
|
193
|
+
chart: ne.value,
|
|
194
|
+
title: e.value.style.title.text ? xt.value : null,
|
|
195
|
+
legend: e.value.style.legend.show ? bt.value : null,
|
|
196
|
+
source: kt.value,
|
|
197
|
+
noTitle: wt.value
|
|
198
|
+
});
|
|
199
|
+
requestAnimationFrame(() => {
|
|
200
|
+
Y.value.width = a, Y.value.height = l;
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
re.value && (xe.value && re.value.unobserve(xe.value), re.value.disconnect()), re.value = new ResizeObserver(t), xe.value = ne.value.parentNode, re.value.observe(xe.value);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
Gl(() => {
|
|
207
|
+
re.value && (xe.value && re.value.unobserve(xe.value), re.value.disconnect());
|
|
208
|
+
});
|
|
209
|
+
const { isPrinting: lt, isImaging: at, generatePdf: Bt, generateImage: zt } = fa({
|
|
210
|
+
elementId: `vue-ui-scatter_${N.value}`,
|
|
211
|
+
fileName: e.value.style.title.text || "vue-ui-scatter",
|
|
212
|
+
options: e.value.userOptions.print
|
|
213
|
+
}), xl = T(() => e.value.userOptions.show && !e.value.style.title.text), It = T(() => Ql(e.value.customPalette)), q = w({
|
|
214
|
+
showTable: e.value.table.show,
|
|
215
|
+
showTooltip: e.value.style.tooltip.show
|
|
216
|
+
});
|
|
217
|
+
Ue(e, () => {
|
|
218
|
+
q.value = {
|
|
219
|
+
showTable: e.value.table.show,
|
|
220
|
+
showTooltip: e.value.style.tooltip.show
|
|
221
|
+
};
|
|
222
|
+
}, { immediate: !0 });
|
|
223
|
+
const Y = w({
|
|
224
|
+
height: e.value.style.layout.height,
|
|
225
|
+
width: e.value.style.layout.width
|
|
226
|
+
}), We = T(() => e.value.style.layout.marginalBars.show ? e.value.style.layout.marginalBars.size + e.value.style.layout.marginalBars.offset : 0), u = T(() => {
|
|
227
|
+
let t = 0, a = 0;
|
|
228
|
+
return He.value && (t = He.value.getBBox().width + 6), Ke.value && (a = Ke.value.getBBox().height + 6), {
|
|
229
|
+
top: e.value.style.layout.padding.top + We.value + e.value.style.layout.dataLabels.yAxis.fontSize * 2,
|
|
230
|
+
right: Y.value.width - e.value.style.layout.padding.right - We.value - 6,
|
|
231
|
+
bottom: Y.value.height - e.value.style.layout.padding.bottom - a,
|
|
232
|
+
left: e.value.style.layout.padding.left + t,
|
|
233
|
+
height: Y.value.height - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom - We.value - a - e.value.style.layout.dataLabels.yAxis.fontSize * 2,
|
|
234
|
+
width: Y.value.width - e.value.style.layout.padding.left - e.value.style.layout.padding.right - We.value - t - 6
|
|
235
|
+
};
|
|
236
|
+
}), F = T(() => {
|
|
237
|
+
Je.value.forEach((o, n) => {
|
|
238
|
+
Qt({
|
|
239
|
+
datasetObject: o,
|
|
240
|
+
requiredAttributes: ["values"]
|
|
241
|
+
}).forEach((i) => {
|
|
242
|
+
dt({
|
|
243
|
+
componentName: "VueUiScatter",
|
|
244
|
+
type: "datasetSerieAttribute",
|
|
245
|
+
property: i,
|
|
246
|
+
index: n
|
|
247
|
+
});
|
|
248
|
+
}), o.values && o.values.forEach((i, y) => {
|
|
249
|
+
Qt({
|
|
250
|
+
datasetObject: i,
|
|
251
|
+
requiredAttributes: ["x", "y"]
|
|
252
|
+
}).forEach((r) => {
|
|
253
|
+
dt({
|
|
254
|
+
componentName: "VueUiScatter",
|
|
255
|
+
type: "datasetSerieAttribute",
|
|
256
|
+
property: `values.${r}`,
|
|
257
|
+
index: `${n} - ${y}`
|
|
258
|
+
});
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
const t = Math.min(...J.value.filter((o) => !I.value.includes(o.id)).flatMap((o) => o.values.map((n) => n.x))), a = Math.max(...J.value.filter((o) => !I.value.includes(o.id)).flatMap((o) => o.values.map((n) => n.x))), l = Math.min(...J.value.filter((o) => !I.value.includes(o.id)).flatMap((o) => o.values.map((n) => n.y))), s = Math.max(...J.value.filter((o) => !I.value.includes(o.id)).flatMap((o) => o.values.map((n) => n.y)));
|
|
263
|
+
return { xMin: t >= 0 ? 0 : t, xMax: a, yMin: l >= 0 ? 0 : l, yMax: s };
|
|
264
|
+
}), W = T(() => ({
|
|
265
|
+
x: u.value.left + Math.abs(F.value.xMin) / (F.value.xMax + Math.abs(F.value.xMin)) * u.value.width,
|
|
266
|
+
y: u.value.bottom - Math.abs(F.value.yMin) / (F.value.yMax + Math.abs(F.value.yMin)) * u.value.height
|
|
267
|
+
})), J = T(() => Je.value.map((t, a) => {
|
|
268
|
+
const l = `cluster_${N.value}_${a}`;
|
|
269
|
+
return {
|
|
270
|
+
...t,
|
|
271
|
+
values: ea({
|
|
272
|
+
data: t.values,
|
|
273
|
+
threshold: e.value.usePerformanceMode ? t.values.length + 1 : e.value.downsample.threshold
|
|
274
|
+
}),
|
|
275
|
+
id: l,
|
|
276
|
+
color: t.color ? t.color : It.value[a] || ge[a] || ge[a % ge.length],
|
|
277
|
+
opacity: I.value.includes(l) ? 0.5 : 1,
|
|
278
|
+
shape: t.shape ?? "circle",
|
|
279
|
+
segregate: () => Re(l),
|
|
280
|
+
isSegregated: I.value.includes(l)
|
|
281
|
+
};
|
|
282
|
+
})), bl = T(() => ({
|
|
283
|
+
cy: "scatter-div-legend",
|
|
284
|
+
backgroundColor: e.value.style.legend.backgroundColor,
|
|
285
|
+
color: e.value.style.legend.color,
|
|
286
|
+
fontSize: e.value.style.legend.fontSize,
|
|
287
|
+
paddingBottom: 12,
|
|
288
|
+
fontWeight: e.value.style.legend.bold ? "bold" : ""
|
|
289
|
+
})), be = T(() => J.value.map((t, a) => ({
|
|
290
|
+
...t,
|
|
291
|
+
plots: t.values.map((l) => ({
|
|
292
|
+
x: u.value.left + (l.x + Math.abs(F.value.xMin)) / (F.value.xMax + Math.abs(F.value.xMin)) * u.value.width,
|
|
293
|
+
y: u.value.bottom - (l.y + Math.abs(F.value.yMin)) / (F.value.yMax + Math.abs(F.value.yMin)) * u.value.height,
|
|
294
|
+
v: {
|
|
295
|
+
...l,
|
|
296
|
+
name: l.name || ""
|
|
297
|
+
},
|
|
298
|
+
clusterName: t.name,
|
|
299
|
+
clusterId: t.id,
|
|
300
|
+
color: t.color ? t.color : It.value[a] || ge[a] || ge[a % ge.length],
|
|
301
|
+
id: `plot_${N.value}_${Math.random()}`,
|
|
302
|
+
weight: l.weight ?? e.value.style.layout.plots.radius
|
|
303
|
+
}))
|
|
304
|
+
})).filter((t) => !I.value.includes(t.id))), U = T(() => {
|
|
305
|
+
const a = ({ m: l, b: s, rect: o, verticalX: n = null }) => {
|
|
306
|
+
const { left: i, right: y, top: r, bottom: f } = o, A = [], d = (C, p) => {
|
|
307
|
+
Number.isFinite(C) && Number.isFinite(p) && A.push({ x: C, y: p });
|
|
308
|
+
}, m = ({ x: C, y: p }) => C >= i - 1e-9 && C <= y + 1e-9 && p >= r - 1e-9 && p <= f + 1e-9;
|
|
309
|
+
n !== null ? n >= i - 1e-9 && n <= y + 1e-9 && (d(n, r), d(n, f)) : Number.isFinite(l) && (d(i, l * i + s), d(y, l * y + s), Math.abs(l) > 1e-9 ? (d((r - s) / l, r), d((f - s) / l, f)) : s >= r - 1e-9 && s <= f + 1e-9 && (d(i, s), d(y, s)));
|
|
310
|
+
const E = A.filter(m), _ = [];
|
|
311
|
+
for (const C of E)
|
|
312
|
+
_.some((p) => Math.abs(p.x - C.x) < 1e-6 && Math.abs(p.y - C.y) < 1e-6) || _.push(C);
|
|
313
|
+
if (_.length < 2) return null;
|
|
314
|
+
let O = _[0], D = _[1], L = 0;
|
|
315
|
+
for (let C = 0; C < _.length; C += 1)
|
|
316
|
+
for (let p = C + 1; p < _.length; p += 1) {
|
|
317
|
+
const P = _[C].x - _[p].x, G = _[C].y - _[p].y, le = P * P + G * G;
|
|
318
|
+
le > L && (L = le, O = _[C], D = _[p]);
|
|
319
|
+
}
|
|
320
|
+
return { x1: O.x, y1: O.y, x2: D.x, y2: D.y };
|
|
321
|
+
};
|
|
322
|
+
return be.value.map((l) => {
|
|
323
|
+
const s = l.plots.length, o = l.plots.reduce((p, P) => p + P.x, 0) / s, n = l.plots.reduce((p, P) => p + P.y, 0) / s;
|
|
324
|
+
let i = 0, y = 0;
|
|
325
|
+
for (const p of l.plots) {
|
|
326
|
+
const P = p.x - o, G = p.y - n;
|
|
327
|
+
i += P * G, y += P * P;
|
|
328
|
+
}
|
|
329
|
+
let r, f, A = null;
|
|
330
|
+
y < 1e-9 ? (A = o, r = 1 / 0, f = null) : (r = i / y, f = n - r * o);
|
|
331
|
+
let d, m;
|
|
332
|
+
A !== null ? (d = 1 / 0, m = null) : (d = r, m = f);
|
|
333
|
+
const E = l.plots.every((p) => p.v && typeof p.v.x == "number" && typeof p.v.y == "number");
|
|
334
|
+
let _ = NaN;
|
|
335
|
+
if (s >= 2) {
|
|
336
|
+
let p = 0, P = 0;
|
|
337
|
+
E ? (p = l.plots.reduce((j, pe) => j + pe.v.x, 0) / s, P = l.plots.reduce((j, pe) => j + pe.v.y, 0) / s) : (p = o, P = -n);
|
|
338
|
+
let G = 0, le = 0, ce = 0;
|
|
339
|
+
for (const j of l.plots) {
|
|
340
|
+
const pe = E ? j.v.x : j.x, vt = E ? j.v.y : -j.y, Be = pe - p, $e = vt - P;
|
|
341
|
+
G += Be * $e, le += Be * Be, ce += $e * $e;
|
|
342
|
+
}
|
|
343
|
+
if (le >= 1e-9 && ce >= 1e-9) {
|
|
344
|
+
const j = G / Math.sqrt(le * ce);
|
|
345
|
+
_ = Math.max(-1, Math.min(1, j));
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
const O = a({ m: d, b: m, rect: u.value, verticalX: A });
|
|
349
|
+
if (!O)
|
|
350
|
+
return {
|
|
351
|
+
...l,
|
|
352
|
+
correlation: null,
|
|
353
|
+
label: null,
|
|
354
|
+
plots: l.plots.map((p) => ({
|
|
355
|
+
...p,
|
|
356
|
+
deviation: 0,
|
|
357
|
+
shape: l.shape,
|
|
358
|
+
color: ht(l.color)
|
|
359
|
+
}))
|
|
360
|
+
};
|
|
361
|
+
const D = (O.x1 + O.x2) / 2, L = (O.y1 + O.y2) / 2, C = { x: D, y: L };
|
|
362
|
+
return {
|
|
363
|
+
...l,
|
|
364
|
+
color: ht(l.color),
|
|
365
|
+
correlation: {
|
|
366
|
+
...O,
|
|
367
|
+
coefficient: _
|
|
368
|
+
},
|
|
369
|
+
label: C,
|
|
370
|
+
plots: l.plots.map((p) => {
|
|
371
|
+
let P, G;
|
|
372
|
+
A !== null ? (P = A, G = p.y) : Math.abs(d) < 1e-9 ? (P = p.x, G = m) : (P = (p.x + d * p.y - d * m) / (1 + d * d), G = (d * p.x + d * d * p.y + m) / (1 + d * d));
|
|
373
|
+
const le = p.x - P, ce = p.y - G, j = Math.sqrt(le * le + ce * ce);
|
|
374
|
+
return {
|
|
375
|
+
...p,
|
|
376
|
+
deviation: j,
|
|
377
|
+
shape: l.shape,
|
|
378
|
+
color: ht(l.color)
|
|
379
|
+
};
|
|
380
|
+
})
|
|
381
|
+
};
|
|
382
|
+
});
|
|
383
|
+
}), Ot = T(() => Math.max(...U.value.flatMap((t) => t.plots.map((a) => Math.abs(a.deviation)))));
|
|
384
|
+
function kl() {
|
|
385
|
+
return U.value;
|
|
386
|
+
}
|
|
387
|
+
function Dt(t, a) {
|
|
388
|
+
const l = Array.isArray(t) ? t.flatMap((L) => L.plots.map((C) => ({
|
|
389
|
+
x: C.x,
|
|
390
|
+
y: C.y
|
|
391
|
+
}))) : t.plots.map((L) => ({
|
|
392
|
+
x: L.x,
|
|
393
|
+
y: L.y
|
|
394
|
+
}));
|
|
395
|
+
let s = 1 / 0, o = -1 / 0, n = 1 / 0, i = -1 / 0;
|
|
396
|
+
l.forEach(({ x: L, y: C }) => {
|
|
397
|
+
s = Math.min(s, L), o = Math.max(o, L), n = Math.min(n, C), i = Math.max(i, C);
|
|
398
|
+
});
|
|
399
|
+
const y = o - s, r = i - n, f = y / a, A = r / a, d = Array(a).fill(0), m = Array(a).fill(0);
|
|
400
|
+
l.forEach(({ x: L, y: C }) => {
|
|
401
|
+
const p = Math.floor((L - s) / f), P = Math.floor((C - n) / A);
|
|
402
|
+
d[p] || (d[p] = 0), m[P] || (m[P] = 0), d[p] += 1, m[P] += 1;
|
|
403
|
+
});
|
|
404
|
+
const E = [], _ = [];
|
|
405
|
+
for (let L = 0; L < a; L += 1)
|
|
406
|
+
E.push(s + (L + 0.5) * f), _.push(n + (L + 0.5) * A);
|
|
407
|
+
const O = Math.max(...d), D = Math.max(...m);
|
|
408
|
+
return { x: d, y: m, avgX: E, avgY: _, maxX: O, maxY: D };
|
|
409
|
+
}
|
|
410
|
+
const $ = T(() => e.value.style.layout.marginalBars.tranches), S = T(() => Dt(be.value, $.value)), wl = T(() => {
|
|
411
|
+
const t = u.value.top - e.value.style.layout.marginalBars.offset, a = u.value.right + e.value.style.layout.marginalBars.offset;
|
|
412
|
+
return be.value.map((l) => {
|
|
413
|
+
const s = Dt(l, $.value);
|
|
414
|
+
return {
|
|
415
|
+
coords: s,
|
|
416
|
+
dX: la(s.avgX.map((o, n) => ({
|
|
417
|
+
x: o,
|
|
418
|
+
y: t - s.x[n] / s.maxX * e.value.style.layout.marginalBars.size
|
|
419
|
+
}))),
|
|
420
|
+
dY: ta(s.avgY.map((o, n) => ({
|
|
421
|
+
y: o,
|
|
422
|
+
x: a + e.value.style.layout.marginalBars.size * s.y[n] / s.maxY
|
|
423
|
+
}))),
|
|
424
|
+
color: l.color,
|
|
425
|
+
id: l.id
|
|
426
|
+
};
|
|
427
|
+
});
|
|
428
|
+
}), R = w(void 0), g = w(null), ot = w(null);
|
|
429
|
+
function st() {
|
|
430
|
+
De.value = !1, R.value = void 0, g.value = null, Te.value = null, me.value = null;
|
|
431
|
+
}
|
|
432
|
+
function $l(t) {
|
|
433
|
+
if (!ie.value || !t) return;
|
|
434
|
+
const a = ra(t.x, t.y, ie.value);
|
|
435
|
+
a && (At.value = a);
|
|
436
|
+
}
|
|
437
|
+
function he(t, a, l = "pointer", s = null) {
|
|
438
|
+
R.value = t.id, g.value = t, Se.value = l, Te.value = s, me.value = t.id;
|
|
439
|
+
let o = "";
|
|
440
|
+
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: a }), ot.value = {
|
|
441
|
+
datapoint: t,
|
|
442
|
+
seriesIndex: a,
|
|
443
|
+
series: U.value,
|
|
444
|
+
config: e.value
|
|
445
|
+
};
|
|
446
|
+
const n = e.value.style.tooltip.customFormat;
|
|
447
|
+
ua(n) && ia(() => n({
|
|
448
|
+
datapoint: t,
|
|
449
|
+
seriesIndex: a,
|
|
450
|
+
series: U.value,
|
|
451
|
+
config: e.value
|
|
452
|
+
})) ? Ge.value = n({
|
|
453
|
+
datapoint: t,
|
|
454
|
+
seriesIndex: a,
|
|
455
|
+
series: U.value,
|
|
456
|
+
config: e.value
|
|
457
|
+
}) : (t.clusterName && (o += `<div style="display:flex;gap:3px;align-items:center">${t.clusterName}</div>`), t.v.name && (o += `<div>${t.v.name}</div>`), o += `<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor}">`, o += `<div>${e.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(t.v.x) ? "-" : se(
|
|
458
|
+
e.value.style.layout.plots.selectors.labels.x.formatter,
|
|
459
|
+
t.v.x,
|
|
460
|
+
ee({
|
|
461
|
+
p: e.value.style.tooltip.prefix,
|
|
462
|
+
v: t.v.x,
|
|
463
|
+
s: e.value.style.tooltip.suffix,
|
|
464
|
+
r: e.value.style.tooltip.roundingValue
|
|
465
|
+
}),
|
|
466
|
+
{ datapoint: t, seriesIndex: a }
|
|
467
|
+
)}</b></div>`, o += `<div>${e.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(t.v.y) ? "-" : se(
|
|
468
|
+
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
469
|
+
t.v.y,
|
|
470
|
+
ee({
|
|
471
|
+
p: e.value.style.tooltip.prefix,
|
|
472
|
+
v: t.v.y,
|
|
473
|
+
s: e.value.style.tooltip.suffix,
|
|
474
|
+
r: e.value.style.tooltip.roundingValue
|
|
475
|
+
}),
|
|
476
|
+
{ datapoint: t, seriesIndex: a }
|
|
477
|
+
)}</b></div>`, o += `${e.value.style.layout.plots.deviation.translation}: <b>${ee({
|
|
478
|
+
v: t.deviation,
|
|
479
|
+
r: e.value.style.layout.plots.deviation.roundingValue
|
|
480
|
+
})}</b>`, o += "</div>", Ge.value = `<div>${o}</div>`), De.value = !0, l === "keyboard" && yt(() => {
|
|
481
|
+
$l(t);
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
function Xe(t, a) {
|
|
485
|
+
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: a }), !(Se.value === "keyboard" && me.value === t?.id) && (De.value = !1, R.value = void 0, g.value = null);
|
|
486
|
+
}
|
|
487
|
+
function Ye(t, a) {
|
|
488
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: a });
|
|
489
|
+
}
|
|
490
|
+
function Ml() {
|
|
491
|
+
I.value.length ? I.value = [] : J.value.forEach((t) => {
|
|
492
|
+
I.value.push(t.id);
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
function Re(t) {
|
|
496
|
+
I.value.includes(t) ? I.value = I.value.filter((a) => a !== t) : I.value.length < Je.value.length - 1 && I.value.push(t);
|
|
497
|
+
}
|
|
498
|
+
function Et(t) {
|
|
499
|
+
if (!J.value.length)
|
|
500
|
+
return e.value.debug && console.warn("VueUiScatter - There are no series to show."), null;
|
|
501
|
+
const a = J.value.find((l) => l.name === t);
|
|
502
|
+
return a || (e.value.debug && console.warn(`VueUiScatter - Series name not found "${t}"`), null);
|
|
503
|
+
}
|
|
504
|
+
function _l(t) {
|
|
505
|
+
const a = Et(t);
|
|
506
|
+
a !== null && I.value.includes(a.id) && Re(a.id);
|
|
507
|
+
}
|
|
508
|
+
function Cl(t) {
|
|
509
|
+
const a = Et(t);
|
|
510
|
+
a !== null && (I.value.includes(a.id) || Re(a.id));
|
|
511
|
+
}
|
|
512
|
+
function nt(t = null) {
|
|
513
|
+
yt(() => {
|
|
514
|
+
const a = ["", e.value.table.translations.correlationCoefficient, e.value.table.translations.nbrPlots, `${e.value.style.layout.dataLabels.xAxis.name} ${e.value.table.translations.average}`, `${e.value.style.layout.dataLabels.yAxis.name} ${e.value.table.translations.average}`], l = U.value.map((n) => [
|
|
515
|
+
n.name,
|
|
516
|
+
n.correlation.coefficient,
|
|
517
|
+
n.plots.length,
|
|
518
|
+
n.plots.map((i) => i.v.x).reduce((i, y) => i + y, 0) / n.plots.length,
|
|
519
|
+
n.plots.map((i) => i.v.y).reduce((i, y) => i + y, 0) / n.plots.length
|
|
520
|
+
]), s = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([a]).concat(l), o = sa(s);
|
|
521
|
+
t ? t(o) : na({ csvContent: o, title: e.value.style.title.text || "vue-ui-heatmap" });
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
const ke = T(() => {
|
|
525
|
+
const t = [
|
|
526
|
+
e.value.table.translations.series,
|
|
527
|
+
e.value.table.translations.correlationCoefficient,
|
|
528
|
+
e.value.table.translations.nbrPlots,
|
|
529
|
+
`${e.value.style.layout.dataLabels.xAxis.name} ${e.value.table.translations.average}`,
|
|
530
|
+
`${e.value.style.layout.dataLabels.yAxis.name} ${e.value.table.translations.average}`
|
|
531
|
+
], a = U.value.map((o) => [
|
|
532
|
+
{
|
|
533
|
+
shape: o.shape,
|
|
534
|
+
content: o.name,
|
|
535
|
+
color: o.color
|
|
536
|
+
},
|
|
537
|
+
Number((o.correlation.coefficient ?? 0).toFixed(e.value.table.td.roundingValue)).toLocaleString(),
|
|
538
|
+
o.plots.length.toLocaleString(),
|
|
539
|
+
Number((o.plots.map((n) => n.v.x ?? 0).reduce((n, i) => n + i, 0) / o.plots.length).toFixed(e.value.table.td.roundingAverage)).toLocaleString(),
|
|
540
|
+
Number((o.plots.map((n) => n.v.y ?? 0).reduce((n, i) => n + i, 0) / o.plots.length).toFixed(e.value.table.td.roundingAverage)).toLocaleString()
|
|
541
|
+
]), l = a.map((o) => o.map((n, i) => i === 0 ? n.content : n)), s = {
|
|
542
|
+
th: {
|
|
543
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
544
|
+
color: e.value.table.th.color,
|
|
545
|
+
outline: e.value.table.th.outline
|
|
546
|
+
},
|
|
547
|
+
td: {
|
|
548
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
549
|
+
color: e.value.table.td.color,
|
|
550
|
+
outline: e.value.table.td.outline
|
|
551
|
+
},
|
|
552
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
553
|
+
};
|
|
554
|
+
return { head: t, body: a, a11yBody: l, config: s, colNames: t };
|
|
555
|
+
}), fe = w(!1);
|
|
556
|
+
function Nt(t) {
|
|
557
|
+
fe.value = t, mt.value += 1;
|
|
558
|
+
}
|
|
559
|
+
function Ft() {
|
|
560
|
+
q.value.showTable = !q.value.showTable;
|
|
561
|
+
}
|
|
562
|
+
function Wt() {
|
|
563
|
+
q.value.showTooltip = !q.value.showTooltip;
|
|
564
|
+
}
|
|
565
|
+
const Le = w(!1);
|
|
566
|
+
function ut() {
|
|
567
|
+
Le.value = !Le.value;
|
|
568
|
+
}
|
|
569
|
+
async function Al({ scale: t = 2 } = {}) {
|
|
570
|
+
if (!ne.value) return;
|
|
571
|
+
const { width: a, height: l } = ne.value.getBoundingClientRect(), s = a / l, { imageUri: o, base64: n } = await ba({ domElement: ne.value, base64: !0, img: !0, scale: t });
|
|
572
|
+
return {
|
|
573
|
+
imageUri: o,
|
|
574
|
+
base64: n,
|
|
575
|
+
title: e.value.style.title.text,
|
|
576
|
+
width: a,
|
|
577
|
+
height: l,
|
|
578
|
+
aspectRatio: s
|
|
579
|
+
};
|
|
580
|
+
}
|
|
581
|
+
function Sl(t) {
|
|
582
|
+
_e.value = t, e.value.style.layout.marginalBars.highlighter.highlightBothAxes && (Ce.value = S.value.y.length - 2 - t);
|
|
583
|
+
}
|
|
584
|
+
function Tl(t) {
|
|
585
|
+
Ce.value = t, e.value.style.layout.marginalBars.highlighter.highlightBothAxes && (_e.value = t);
|
|
586
|
+
}
|
|
587
|
+
function it() {
|
|
588
|
+
_e.value = null, Ce.value = null;
|
|
589
|
+
}
|
|
590
|
+
const Xt = {
|
|
591
|
+
circle: 1,
|
|
592
|
+
square: 1,
|
|
593
|
+
diamond: 1,
|
|
594
|
+
triangle: 1.2,
|
|
595
|
+
star: 1.3,
|
|
596
|
+
pentagon: 1.3,
|
|
597
|
+
hexagon: 1.3
|
|
598
|
+
}, M = (t) => t.toFixed(3);
|
|
599
|
+
function Ll({ shape: t = "circle", cx: a, cy: l, r: s }) {
|
|
600
|
+
if (!e.value.usePerformanceMode) return "";
|
|
601
|
+
const o = Xt[t] * s;
|
|
602
|
+
switch (t) {
|
|
603
|
+
case "circle": {
|
|
604
|
+
const n = M(a - o), i = M(l), y = M(a + o), r = M(o);
|
|
605
|
+
return `M ${n} ${i} A ${r} ${r} 0 1 0 ${y} ${i} A ${r} ${r} 0 1 0 ${n} ${i} Z`;
|
|
606
|
+
}
|
|
607
|
+
case "square": {
|
|
608
|
+
const n = M(a - o), i = M(l - o), y = M(a + o), r = M(l + o);
|
|
609
|
+
return `M ${n} ${i} L ${y} ${i} L ${y} ${r} L ${n} ${r} Z`;
|
|
610
|
+
}
|
|
611
|
+
case "diamond": {
|
|
612
|
+
const n = M(a), i = M(l);
|
|
613
|
+
return `M ${n} ${M(l - o)} L ${M(a + o)} ${i} L ${n} ${M(l + o)} L ${M(a - o)} ${i} Z`;
|
|
614
|
+
}
|
|
615
|
+
case "triangle": {
|
|
616
|
+
const n = o * Math.sqrt(3), i = a, y = l - 2 / 3 * n, r = a - o, f = l + 1 / 3 * n, A = a + o, d = f;
|
|
617
|
+
return `M ${M(i)} ${M(y)} L ${M(r)} ${M(f)} L ${M(A)} ${M(d)} Z`;
|
|
618
|
+
}
|
|
619
|
+
case "star": {
|
|
620
|
+
const n = o, i = o * 0.5, y = [];
|
|
621
|
+
for (let f = 0; f < 10; f += 1) {
|
|
622
|
+
const A = (-90 + f * 36) * Math.PI / 180, d = f % 2 === 0 ? n : i;
|
|
623
|
+
y.push([a + d * Math.cos(A), l + d * Math.sin(A)]);
|
|
624
|
+
}
|
|
625
|
+
let r = `M ${M(y[0][0])} ${M(y[0][1])}`;
|
|
626
|
+
for (let f = 1; f < y.length; f += 1)
|
|
627
|
+
r += ` L ${M(y[f][0])} ${M(y[f][1])}`;
|
|
628
|
+
return r + " Z";
|
|
629
|
+
}
|
|
630
|
+
case "pentagon": {
|
|
631
|
+
const i = [];
|
|
632
|
+
for (let r = 0; r < 5; r += 1) {
|
|
633
|
+
const f = (-90 + r * 72) * Math.PI / 180;
|
|
634
|
+
i.push([a + o * Math.cos(f), l + o * Math.sin(f)]);
|
|
635
|
+
}
|
|
636
|
+
let y = `M ${M(i[0][0])} ${M(i[0][1])}`;
|
|
637
|
+
for (let r = 1; r < 5; r += 1) y += ` L ${M(i[r][0])} ${M(i[r][1])}`;
|
|
638
|
+
return y + " Z";
|
|
639
|
+
}
|
|
640
|
+
case "hexagon": {
|
|
641
|
+
const i = [];
|
|
642
|
+
for (let r = 0; r < 6; r += 1) {
|
|
643
|
+
const f = (-60 + r * 60) * Math.PI / 180;
|
|
644
|
+
i.push([a + o * Math.cos(f), l + o * Math.sin(f)]);
|
|
645
|
+
}
|
|
646
|
+
let y = `M ${M(i[0][0])} ${M(i[0][1])}`;
|
|
647
|
+
for (let r = 1; r < 6; r += 1) y += ` L ${M(i[r][0])} ${M(i[r][1])}`;
|
|
648
|
+
return y + " Z";
|
|
649
|
+
}
|
|
650
|
+
default: {
|
|
651
|
+
const n = M(a - o), i = M(l), y = M(a + o), r = M(o);
|
|
652
|
+
return `M ${n} ${i} A ${r} ${r} 0 1 0 ${y} ${i} A ${r} ${r} 0 1 0 ${n} ${i} Z`;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
const Pl = T(() => {
|
|
657
|
+
if (!e.value.usePerformanceMode) return [""];
|
|
658
|
+
const { left: t, right: a, top: l, bottom: s } = u.value, o = Math.max(1, (a - t) * (s - l)), n = (d) => d / o * 1e4, i = 2.5, y = 1e3, r = e.value.style.layout.plots.stroke, f = e.value.style.layout.plots.strokeWidth, A = e.value.style.layout.plots.opacity;
|
|
659
|
+
return U.value.map((d) => {
|
|
660
|
+
const m = [];
|
|
661
|
+
for (const _ of d.plots) {
|
|
662
|
+
const O = _.x, D = _.y;
|
|
663
|
+
if (O < t || O > a || D < l || D > s) continue;
|
|
664
|
+
const L = Math.max(e.value.style.layout.plots.radius, _.weight);
|
|
665
|
+
m.push(Ll({
|
|
666
|
+
shape: d.shape || "circle",
|
|
667
|
+
cx: O,
|
|
668
|
+
cy: D,
|
|
669
|
+
r: L
|
|
670
|
+
}));
|
|
671
|
+
}
|
|
672
|
+
if (!m.length) return null;
|
|
673
|
+
const E = n(d.plots.length) > i || d.plots.length > y;
|
|
674
|
+
return {
|
|
675
|
+
id: d.id,
|
|
676
|
+
d: m.join(""),
|
|
677
|
+
fill: je(d.color, A * 100),
|
|
678
|
+
stroke: E ? "none" : r,
|
|
679
|
+
strokeWidth: E ? 0 : f,
|
|
680
|
+
strokeOpacity: 1
|
|
681
|
+
};
|
|
682
|
+
}).filter(Boolean);
|
|
683
|
+
});
|
|
684
|
+
function Bl() {
|
|
685
|
+
return e.value.usePerformanceMode ? (t) => {
|
|
686
|
+
const a = ie.value;
|
|
687
|
+
if (!a) return;
|
|
688
|
+
const l = a.createSVGPoint();
|
|
689
|
+
l.x = t.clientX, l.y = t.clientY;
|
|
690
|
+
const s = a.getScreenCTM();
|
|
691
|
+
if (!s) return;
|
|
692
|
+
const o = s.inverse(), n = l.matrixTransform(o), i = 8, y = i * i;
|
|
693
|
+
let r = null, f = 1 / 0, A = -1;
|
|
694
|
+
if (U.value.forEach((d, m) => {
|
|
695
|
+
d.plots.forEach((E) => {
|
|
696
|
+
const _ = E.x - n.x, O = E.y - n.y, D = _ * _ + O * O;
|
|
697
|
+
D <= y && D < f && (f = D, r = E, A = m);
|
|
698
|
+
});
|
|
699
|
+
}), r)
|
|
700
|
+
R.value !== r.id && (R.value = r.id, he(r, A, "pointer", ve.value.get(r.id) ?? null));
|
|
701
|
+
else if (R.value) {
|
|
702
|
+
const d = g.value;
|
|
703
|
+
R.value = void 0, Xe(d, A);
|
|
704
|
+
}
|
|
705
|
+
} : () => null;
|
|
706
|
+
}
|
|
707
|
+
const Yt = Bl();
|
|
708
|
+
function zl() {
|
|
709
|
+
if (R.value) {
|
|
710
|
+
const t = g.value;
|
|
711
|
+
R.value = void 0, Xe(t, null);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
function Il(t) {
|
|
715
|
+
const a = g.value;
|
|
716
|
+
if (a) {
|
|
717
|
+
const l = U.value.findIndex((s) => s.id === a.clusterId);
|
|
718
|
+
Ye(a, l >= 0 ? l : 0);
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
const Pe = T(() => {
|
|
722
|
+
const t = e.value.table.useDialog && !e.value.table.show, a = q.value.showTable;
|
|
723
|
+
return {
|
|
724
|
+
component: t ? vl : sl,
|
|
725
|
+
title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? `: ${e.value.style.title.subtitle.text}` : ""}`,
|
|
726
|
+
props: t ? {
|
|
727
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
728
|
+
color: e.value.table.th.color,
|
|
729
|
+
headerColor: e.value.table.th.color,
|
|
730
|
+
headerBg: e.value.table.th.backgroundColor,
|
|
731
|
+
isFullscreen: fe.value,
|
|
732
|
+
fullscreenParent: ne.value,
|
|
733
|
+
forcedWidth: Math.min(800, window.innerWidth * 0.8),
|
|
734
|
+
isCursorPointer: de.value
|
|
735
|
+
} : {
|
|
736
|
+
hideDetails: !0,
|
|
737
|
+
config: {
|
|
738
|
+
open: a,
|
|
739
|
+
maxHeight: 1e4,
|
|
740
|
+
body: {
|
|
741
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
742
|
+
color: e.value.style.color
|
|
743
|
+
},
|
|
744
|
+
head: {
|
|
745
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
746
|
+
color: e.value.style.color
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
};
|
|
751
|
+
});
|
|
752
|
+
Ue(() => q.value.showTable, (t) => {
|
|
753
|
+
e.value.table.show || (t && e.value.table.useDialog && Ae.value ? Ae.value.open() : "close" in Ae.value && Ae.value.close());
|
|
754
|
+
});
|
|
755
|
+
function Rt() {
|
|
756
|
+
q.value.showTable = !1, qe.value && qe.value.setTableIconState(!1);
|
|
757
|
+
}
|
|
758
|
+
const Ol = T(() => e.value.style.backgroundColor), Dl = T(() => e.value.style.legend), El = T(() => e.value.style.title), { exportSvg: Nl, getSvg: Fl } = pa({
|
|
759
|
+
svg: ie,
|
|
760
|
+
title: El,
|
|
761
|
+
legend: Dl,
|
|
762
|
+
legendItems: J,
|
|
763
|
+
backgroundColor: Ol
|
|
764
|
+
});
|
|
765
|
+
async function Vt({ isCb: t }) {
|
|
766
|
+
Ne.value = !0, await yt();
|
|
767
|
+
try {
|
|
768
|
+
if (t) {
|
|
769
|
+
const { blob: a, url: l, text: s, dataUrl: o } = await Fl();
|
|
770
|
+
await Promise.resolve(e.value.userOptions.callbacks.svg({ blob: a, url: l, text: s, dataUrl: o }));
|
|
771
|
+
} else
|
|
772
|
+
await Promise.resolve(Nl());
|
|
773
|
+
} finally {
|
|
774
|
+
Ne.value = !1;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
function Wl(t) {
|
|
778
|
+
if (t?.stage === "start") {
|
|
779
|
+
Ee.value = !0;
|
|
780
|
+
return;
|
|
781
|
+
}
|
|
782
|
+
if (t?.stage === "end") {
|
|
783
|
+
Ee.value = !1;
|
|
784
|
+
return;
|
|
785
|
+
}
|
|
786
|
+
zt();
|
|
787
|
+
}
|
|
788
|
+
async function Ut() {
|
|
789
|
+
if (hl("copyAlt", {
|
|
790
|
+
config: e.value,
|
|
791
|
+
dataset: be.value
|
|
792
|
+
}), !e.value.userOptions.callbacks.altCopy) {
|
|
793
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
794
|
+
return;
|
|
795
|
+
}
|
|
796
|
+
await Promise.resolve(e.value.userOptions.callbacks.altCopy({
|
|
797
|
+
config: e.value,
|
|
798
|
+
dataset: be.value
|
|
799
|
+
}));
|
|
800
|
+
}
|
|
801
|
+
function jt(t, a) {
|
|
802
|
+
const l = we.value.filter((n) => n.id === t.id ? !1 : a === "right" ? n.x > t.x : a === "left" ? n.x < t.x : a === "down" ? n.y > t.y : a === "up" ? n.y < t.y : !1);
|
|
803
|
+
if (!l.length) return null;
|
|
804
|
+
let s = null, o = 1 / 0;
|
|
805
|
+
return l.forEach((n) => {
|
|
806
|
+
const i = n.x - t.x, y = n.y - t.y;
|
|
807
|
+
let r = 0, f = 0;
|
|
808
|
+
a === "right" || a === "left" ? (r = Math.abs(i), f = Math.abs(y)) : (r = Math.abs(y), f = Math.abs(i));
|
|
809
|
+
const A = r * 1e3 + f;
|
|
810
|
+
A < o && (s = n, o = A);
|
|
811
|
+
}), s;
|
|
812
|
+
}
|
|
813
|
+
function Xl() {
|
|
814
|
+
Te.value = null, me.value = null, Fe.value = !0;
|
|
815
|
+
}
|
|
816
|
+
function Yl() {
|
|
817
|
+
st(), Se.value = "pointer", Fe.value = !1;
|
|
818
|
+
}
|
|
819
|
+
function Rl(t) {
|
|
820
|
+
if (!ie.value || Le.value || document.activeElement !== ie.value || !we.value.length) return;
|
|
821
|
+
const a = t.key === "ArrowLeft", l = t.key === "ArrowRight", s = t.key === "ArrowUp", o = t.key === "ArrowDown", n = t.key === "Enter" || t.key === " ", i = t.key === "Escape";
|
|
822
|
+
if (!a && !l && !s && !o && !n && !i) return;
|
|
823
|
+
if (t.preventDefault(), t.stopPropagation(), i) {
|
|
824
|
+
st(), Se.value = "pointer";
|
|
825
|
+
return;
|
|
826
|
+
}
|
|
827
|
+
if (n) {
|
|
828
|
+
if (Te.value === null) return;
|
|
829
|
+
const m = we.value[Te.value];
|
|
830
|
+
if (!m) return;
|
|
831
|
+
Ye(m, m.seriesIndex);
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
834
|
+
let y = null;
|
|
835
|
+
if (l && (y = "right"), a && (y = "left"), o && (y = "down"), s && (y = "up"), me.value === null) {
|
|
836
|
+
const m = g.value;
|
|
837
|
+
if (m && m.id) {
|
|
838
|
+
const D = jt(m, y);
|
|
839
|
+
if (!D) {
|
|
840
|
+
const C = ve.value.get(m.id);
|
|
841
|
+
if (C === void 0) return;
|
|
842
|
+
he(m, m.seriesIndex, "keyboard", C);
|
|
843
|
+
return;
|
|
844
|
+
}
|
|
845
|
+
const L = ve.value.get(D.id);
|
|
846
|
+
if (L === void 0) return;
|
|
847
|
+
he(D, D.seriesIndex, "keyboard", L);
|
|
848
|
+
return;
|
|
849
|
+
}
|
|
850
|
+
const _ = we.value[0];
|
|
851
|
+
if (!_) return;
|
|
852
|
+
const O = ve.value.get(_.id) ?? 0;
|
|
853
|
+
he(_, _.seriesIndex, "keyboard", O);
|
|
854
|
+
return;
|
|
855
|
+
}
|
|
856
|
+
const r = ve.value.get(me.value);
|
|
857
|
+
if (r === void 0) return;
|
|
858
|
+
const f = we.value[r];
|
|
859
|
+
if (!f) return;
|
|
860
|
+
const A = jt(f, y);
|
|
861
|
+
if (!A) return;
|
|
862
|
+
const d = ve.value.get(A.id);
|
|
863
|
+
d !== void 0 && he(A, A.seriesIndex, "keyboard", d);
|
|
864
|
+
}
|
|
865
|
+
const Vl = T(() => {
|
|
866
|
+
if (!g.value)
|
|
867
|
+
return "";
|
|
868
|
+
const t = g.value, a = isNaN(t.v.x) ? "-" : se(
|
|
869
|
+
e.value.style.layout.plots.selectors.labels.x.formatter,
|
|
870
|
+
t.v.x,
|
|
871
|
+
ee({
|
|
872
|
+
p: e.value.style.tooltip.prefix,
|
|
873
|
+
v: t.v.x,
|
|
874
|
+
s: e.value.style.tooltip.suffix,
|
|
875
|
+
r: e.value.style.tooltip.roundingValue
|
|
876
|
+
}),
|
|
877
|
+
{ datapoint: t, seriesIndex: t.seriesIndex }
|
|
878
|
+
), l = isNaN(t.v.y) ? "-" : se(
|
|
879
|
+
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
880
|
+
t.v.y,
|
|
881
|
+
ee({
|
|
882
|
+
p: e.value.style.tooltip.prefix,
|
|
883
|
+
v: t.v.y,
|
|
884
|
+
s: e.value.style.tooltip.suffix,
|
|
885
|
+
r: e.value.style.tooltip.roundingValue
|
|
886
|
+
}),
|
|
887
|
+
{ datapoint: t, seriesIndex: t.seriesIndex }
|
|
888
|
+
);
|
|
889
|
+
return [
|
|
890
|
+
t.clusterName || "",
|
|
891
|
+
t.v.name || "",
|
|
892
|
+
`${e.value.style.layout.dataLabels.xAxis.name}: ${a}`,
|
|
893
|
+
`${e.value.style.layout.dataLabels.yAxis.name}: ${l}`
|
|
894
|
+
].filter(Boolean).join(". ");
|
|
895
|
+
}), we = T(() => U.value.flatMap((t, a) => t.plots.map((l) => ({
|
|
896
|
+
...l,
|
|
897
|
+
seriesIndex: a,
|
|
898
|
+
seriesId: t.id,
|
|
899
|
+
seriesName: t.name,
|
|
900
|
+
shape: t.shape || "circle",
|
|
901
|
+
color: t.color
|
|
902
|
+
})))), ve = T(() => {
|
|
903
|
+
const t = /* @__PURE__ */ new Map();
|
|
904
|
+
return we.value.forEach((a, l) => {
|
|
905
|
+
t.set(a.id, l);
|
|
906
|
+
}), t;
|
|
907
|
+
}), rt = T(() => {
|
|
908
|
+
const t = ke.value?.colNames ?? [], a = ke.value?.a11yBody ?? [];
|
|
909
|
+
return { headers: t, rows: a };
|
|
910
|
+
});
|
|
911
|
+
return tl({
|
|
912
|
+
getData: kl,
|
|
913
|
+
getImage: Al,
|
|
914
|
+
generatePdf: Bt,
|
|
915
|
+
generateCsv: nt,
|
|
916
|
+
generateImage: zt,
|
|
917
|
+
generateSvg: Vt,
|
|
918
|
+
hideSeries: Cl,
|
|
919
|
+
showSeries: _l,
|
|
920
|
+
toggleTable: Ft,
|
|
921
|
+
toggleTooltip: Wt,
|
|
922
|
+
toggleAnnotator: ut,
|
|
923
|
+
toggleFullscreen: Nt,
|
|
924
|
+
copyAlt: Ut
|
|
925
|
+
}), (t, a) => (v(), c("div", {
|
|
926
|
+
class: qt(`vue-data-ui-component vue-ui-scatter ${fe.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
927
|
+
ref_key: "scatterChart",
|
|
928
|
+
ref: ne,
|
|
929
|
+
id: `vue-ui-scatter_${N.value}`,
|
|
930
|
+
style: ue(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
|
|
931
|
+
onMouseenter: a[5] || (a[5] = () => h(St)(!0)),
|
|
932
|
+
onMouseleave: a[6] || (a[6] = () => {
|
|
933
|
+
h(St)(!1), Fe.value || st();
|
|
934
|
+
})
|
|
935
|
+
}, [
|
|
936
|
+
k("div", {
|
|
937
|
+
id: `chart-instructions-${N.value}`,
|
|
938
|
+
class: "sr-only"
|
|
939
|
+
}, [
|
|
940
|
+
k("p", null, V(e.value.a11y.translations.keyboardNavigation), 1)
|
|
941
|
+
], 8, Sa),
|
|
942
|
+
q.value.showTooltip ? x("", !0) : (v(), c("div", Ta, V(Vl.value), 1)),
|
|
943
|
+
rt.value?.rows?.length ? (v(), ae(Ma, {
|
|
944
|
+
key: 1,
|
|
945
|
+
uid: N.value,
|
|
946
|
+
head: rt.value.headers,
|
|
947
|
+
body: rt.value.rows,
|
|
948
|
+
notice: e.value.a11y.translations.tableAvailable,
|
|
949
|
+
caption: e.value.a11y.translations.tableCaption
|
|
950
|
+
}, null, 8, ["uid", "head", "body", "notice", "caption"])) : x("", !0),
|
|
951
|
+
e.value.userOptions.buttons.annotator ? (v(), ae(h(ul), {
|
|
952
|
+
key: 2,
|
|
953
|
+
svgRef: h(ie),
|
|
954
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
955
|
+
color: e.value.style.color,
|
|
956
|
+
active: Le.value,
|
|
957
|
+
isCursorPointer: de.value,
|
|
958
|
+
onClose: ut
|
|
959
|
+
}, {
|
|
960
|
+
"annotator-action-close": B(() => [
|
|
961
|
+
z(t.$slots, "annotator-action-close", {}, void 0, !0)
|
|
962
|
+
]),
|
|
963
|
+
"annotator-action-color": B(({ color: l }) => [
|
|
964
|
+
z(t.$slots, "annotator-action-color", H(K({ color: l })), void 0, !0)
|
|
965
|
+
]),
|
|
966
|
+
"annotator-action-draw": B(({ mode: l }) => [
|
|
967
|
+
z(t.$slots, "annotator-action-draw", H(K({ mode: l })), void 0, !0)
|
|
968
|
+
]),
|
|
969
|
+
"annotator-action-undo": B(({ disabled: l }) => [
|
|
970
|
+
z(t.$slots, "annotator-action-undo", H(K({ disabled: l })), void 0, !0)
|
|
971
|
+
]),
|
|
972
|
+
"annotator-action-redo": B(({ disabled: l }) => [
|
|
973
|
+
z(t.$slots, "annotator-action-redo", H(K({ disabled: l })), void 0, !0)
|
|
974
|
+
]),
|
|
975
|
+
"annotator-action-delete": B(({ disabled: l }) => [
|
|
976
|
+
z(t.$slots, "annotator-action-delete", H(K({ disabled: l })), void 0, !0)
|
|
977
|
+
]),
|
|
978
|
+
_: 3
|
|
979
|
+
}, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : x("", !0),
|
|
980
|
+
xl.value ? (v(), c("div", {
|
|
981
|
+
key: 3,
|
|
982
|
+
ref_key: "noTitle",
|
|
983
|
+
ref: wt,
|
|
984
|
+
class: "vue-data-ui-no-title-space",
|
|
985
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
986
|
+
}, null, 512)) : x("", !0),
|
|
987
|
+
e.value.style.title.text ? (v(), c("div", {
|
|
988
|
+
key: 4,
|
|
989
|
+
ref_key: "chartTitle",
|
|
990
|
+
ref: xt,
|
|
991
|
+
style: "width:100%;background:transparent"
|
|
992
|
+
}, [
|
|
993
|
+
(v(), ae(ka, {
|
|
994
|
+
key: `title_${$t.value}`,
|
|
995
|
+
config: {
|
|
996
|
+
title: {
|
|
997
|
+
cy: "scatter-div-title",
|
|
998
|
+
...e.value.style.title
|
|
999
|
+
},
|
|
1000
|
+
subtitle: {
|
|
1001
|
+
cy: "scatter-div-subtitle",
|
|
1002
|
+
...e.value.style.title.subtitle
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
}, null, 8, ["config"]))
|
|
1006
|
+
], 512)) : x("", !0),
|
|
1007
|
+
k("div", {
|
|
1008
|
+
id: `legend-top-${N.value}`
|
|
1009
|
+
}, null, 8, La),
|
|
1010
|
+
e.value.userOptions.show && gt.value && (h(Tt) || h(et)) ? (v(), ae(h(il), {
|
|
1011
|
+
ref_key: "userOptionsRef",
|
|
1012
|
+
ref: qe,
|
|
1013
|
+
key: `user_options_${mt.value}`,
|
|
1014
|
+
backgroundColor: e.value.style.backgroundColor,
|
|
1015
|
+
color: e.value.style.color,
|
|
1016
|
+
isImaging: h(at),
|
|
1017
|
+
isPrinting: h(lt),
|
|
1018
|
+
uid: N.value,
|
|
1019
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
|
|
1020
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
1021
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
1022
|
+
hasSvg: e.value.userOptions.buttons.svg,
|
|
1023
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
1024
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
1025
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
1026
|
+
hasAltCopy: e.value.userOptions.buttons.altCopy,
|
|
1027
|
+
isTooltip: q.value.showTooltip,
|
|
1028
|
+
isFullscreen: fe.value,
|
|
1029
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
1030
|
+
chartElement: ne.value,
|
|
1031
|
+
position: e.value.userOptions.position,
|
|
1032
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
1033
|
+
isAnnotation: Le.value,
|
|
1034
|
+
callbacks: e.value.userOptions.callbacks,
|
|
1035
|
+
printScale: e.value.userOptions.print.scale,
|
|
1036
|
+
tableDialog: e.value.table.useDialog,
|
|
1037
|
+
isCursorPointer: de.value,
|
|
1038
|
+
onToggleFullscreen: Nt,
|
|
1039
|
+
onGeneratePdf: h(Bt),
|
|
1040
|
+
onGenerateCsv: nt,
|
|
1041
|
+
onGenerateImage: Wl,
|
|
1042
|
+
onGenerateSvg: Vt,
|
|
1043
|
+
onToggleTable: Ft,
|
|
1044
|
+
onToggleTooltip: Wt,
|
|
1045
|
+
onToggleAnnotator: ut,
|
|
1046
|
+
onCopyAlt: Ut,
|
|
1047
|
+
style: ue({
|
|
1048
|
+
visibility: h(Tt) ? h(et) ? "visible" : "hidden" : "visible"
|
|
1049
|
+
})
|
|
1050
|
+
}, Ht({ _: 2 }, [
|
|
1051
|
+
t.$slots.menuIcon ? {
|
|
1052
|
+
name: "menuIcon",
|
|
1053
|
+
fn: B(({ isOpen: l, color: s }) => [
|
|
1054
|
+
z(t.$slots, "menuIcon", H(K({ isOpen: l, color: s })), void 0, !0)
|
|
1055
|
+
]),
|
|
1056
|
+
key: "0"
|
|
1057
|
+
} : void 0,
|
|
1058
|
+
t.$slots.optionTooltip ? {
|
|
1059
|
+
name: "optionTooltip",
|
|
1060
|
+
fn: B(() => [
|
|
1061
|
+
z(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
1062
|
+
]),
|
|
1063
|
+
key: "1"
|
|
1064
|
+
} : void 0,
|
|
1065
|
+
t.$slots.optionPdf ? {
|
|
1066
|
+
name: "optionPdf",
|
|
1067
|
+
fn: B(() => [
|
|
1068
|
+
z(t.$slots, "optionPdf", {}, void 0, !0)
|
|
1069
|
+
]),
|
|
1070
|
+
key: "2"
|
|
1071
|
+
} : void 0,
|
|
1072
|
+
t.$slots.optionCsv ? {
|
|
1073
|
+
name: "optionCsv",
|
|
1074
|
+
fn: B(() => [
|
|
1075
|
+
z(t.$slots, "optionCsv", {}, void 0, !0)
|
|
1076
|
+
]),
|
|
1077
|
+
key: "3"
|
|
1078
|
+
} : void 0,
|
|
1079
|
+
t.$slots.optionImg ? {
|
|
1080
|
+
name: "optionImg",
|
|
1081
|
+
fn: B(() => [
|
|
1082
|
+
z(t.$slots, "optionImg", {}, void 0, !0)
|
|
1083
|
+
]),
|
|
1084
|
+
key: "4"
|
|
1085
|
+
} : void 0,
|
|
1086
|
+
t.$slots.optionSvg ? {
|
|
1087
|
+
name: "optionSvg",
|
|
1088
|
+
fn: B(() => [
|
|
1089
|
+
z(t.$slots, "optionSvg", {}, void 0, !0)
|
|
1090
|
+
]),
|
|
1091
|
+
key: "5"
|
|
1092
|
+
} : void 0,
|
|
1093
|
+
t.$slots.optionTable ? {
|
|
1094
|
+
name: "optionTable",
|
|
1095
|
+
fn: B(() => [
|
|
1096
|
+
z(t.$slots, "optionTable", {}, void 0, !0)
|
|
1097
|
+
]),
|
|
1098
|
+
key: "6"
|
|
1099
|
+
} : void 0,
|
|
1100
|
+
t.$slots.optionFullscreen ? {
|
|
1101
|
+
name: "optionFullscreen",
|
|
1102
|
+
fn: B(({ toggleFullscreen: l, isFullscreen: s }) => [
|
|
1103
|
+
z(t.$slots, "optionFullscreen", H(K({ toggleFullscreen: l, isFullscreen: s })), void 0, !0)
|
|
1104
|
+
]),
|
|
1105
|
+
key: "7"
|
|
1106
|
+
} : void 0,
|
|
1107
|
+
t.$slots.optionAnnotator ? {
|
|
1108
|
+
name: "optionAnnotator",
|
|
1109
|
+
fn: B(({ toggleAnnotator: l, isAnnotator: s }) => [
|
|
1110
|
+
z(t.$slots, "optionAnnotator", H(K({ toggleAnnotator: l, isAnnotator: s })), void 0, !0)
|
|
1111
|
+
]),
|
|
1112
|
+
key: "8"
|
|
1113
|
+
} : void 0,
|
|
1114
|
+
t.$slots.optionAltCopy ? {
|
|
1115
|
+
name: "optionAltCopy",
|
|
1116
|
+
fn: B(({ altCopy: l }) => [
|
|
1117
|
+
z(t.$slots, "optionAltCopy", H(K({ altCopy: l })), void 0, !0)
|
|
1118
|
+
]),
|
|
1119
|
+
key: "9"
|
|
1120
|
+
} : void 0
|
|
1121
|
+
]), 1032, ["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", "style"])) : x("", !0),
|
|
1122
|
+
k("div", Pa, [
|
|
1123
|
+
(v(), c("svg", {
|
|
1124
|
+
ref_key: "svgRef",
|
|
1125
|
+
ref: ie,
|
|
1126
|
+
xmlns: h(aa),
|
|
1127
|
+
"aria-describedby": `chart-instructions-${N.value}`,
|
|
1128
|
+
class: qt({ "vue-data-ui-fullscreen--on": fe.value, "vue-data-ui-fulscreen--off": !fe.value, animated: e.value.useCssAnimation }),
|
|
1129
|
+
viewBox: `0 0 ${Y.value.width <= 0 ? 10 : Y.value.width} ${Y.value.height <= 0 ? 10 : Y.value.height}`,
|
|
1130
|
+
style: ue(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`),
|
|
1131
|
+
onMouseleave: it,
|
|
1132
|
+
tabindex: "0",
|
|
1133
|
+
onFocus: Xl,
|
|
1134
|
+
onBlur: Yl,
|
|
1135
|
+
onKeydown: Rl
|
|
1136
|
+
}, [
|
|
1137
|
+
Oe(h(rl)),
|
|
1138
|
+
t.$slots["chart-background"] ? (v(), c("foreignObject", {
|
|
1139
|
+
key: 0,
|
|
1140
|
+
x: 0,
|
|
1141
|
+
y: 0,
|
|
1142
|
+
width: Y.value.width <= 0 ? 10 : Y.value.width,
|
|
1143
|
+
height: Y.value.height <= 0 ? 10 : Y.value.height,
|
|
1144
|
+
style: {
|
|
1145
|
+
pointerEvents: "none"
|
|
1146
|
+
}
|
|
1147
|
+
}, [
|
|
1148
|
+
z(t.$slots, "chart-background", {}, void 0, !0)
|
|
1149
|
+
], 8, za)) : x("", !0),
|
|
1150
|
+
e.value.style.layout.axis.show ? (v(), c("g", Ia, [
|
|
1151
|
+
k("line", {
|
|
1152
|
+
x1: W.value.x,
|
|
1153
|
+
x2: W.value.x,
|
|
1154
|
+
y1: u.value.top,
|
|
1155
|
+
y2: u.value.bottom,
|
|
1156
|
+
stroke: e.value.style.layout.axis.stroke,
|
|
1157
|
+
"stroke-width": e.value.style.layout.axis.strokeWidth,
|
|
1158
|
+
"stroke-linecap": "round"
|
|
1159
|
+
}, null, 8, Oa),
|
|
1160
|
+
k("line", {
|
|
1161
|
+
x1: u.value.left,
|
|
1162
|
+
x2: u.value.right,
|
|
1163
|
+
y1: W.value.y,
|
|
1164
|
+
y2: W.value.y,
|
|
1165
|
+
stroke: e.value.style.layout.axis.stroke,
|
|
1166
|
+
"stroke-width": e.value.style.layout.axis.strokeWidth,
|
|
1167
|
+
"stroke-linecap": "round"
|
|
1168
|
+
}, null, 8, Da)
|
|
1169
|
+
])) : x("", !0),
|
|
1170
|
+
e.value.style.layout.marginalBars.show ? (v(), c("g", Ea, [
|
|
1171
|
+
k("defs", null, [
|
|
1172
|
+
k("linearGradient", {
|
|
1173
|
+
id: `marginal_x_${N.value}`,
|
|
1174
|
+
x1: "0%",
|
|
1175
|
+
y1: "0%",
|
|
1176
|
+
x2: "0%",
|
|
1177
|
+
y2: "100%"
|
|
1178
|
+
}, [
|
|
1179
|
+
k("stop", {
|
|
1180
|
+
offset: "0%",
|
|
1181
|
+
"stop-color": e.value.style.layout.marginalBars.fill
|
|
1182
|
+
}, null, 8, Fa),
|
|
1183
|
+
k("stop", {
|
|
1184
|
+
offset: "100%",
|
|
1185
|
+
"stop-color": e.value.style.backgroundColor
|
|
1186
|
+
}, null, 8, Wa)
|
|
1187
|
+
], 8, Na),
|
|
1188
|
+
k("linearGradient", {
|
|
1189
|
+
id: `marginal_y_${N.value}`,
|
|
1190
|
+
x1: "0%",
|
|
1191
|
+
x2: "100%",
|
|
1192
|
+
y1: "0%",
|
|
1193
|
+
y2: "0%"
|
|
1194
|
+
}, [
|
|
1195
|
+
k("stop", {
|
|
1196
|
+
offset: "0%",
|
|
1197
|
+
"stop-color": e.value.style.backgroundColor
|
|
1198
|
+
}, null, 8, Ya),
|
|
1199
|
+
k("stop", {
|
|
1200
|
+
offset: "100%",
|
|
1201
|
+
"stop-color": e.value.style.layout.marginalBars.fill
|
|
1202
|
+
}, null, 8, Ra)
|
|
1203
|
+
], 8, Xa)
|
|
1204
|
+
]),
|
|
1205
|
+
(v(!0), c(Q, null, oe(S.value.x, (l, s) => (v(), c("g", null, [
|
|
1206
|
+
l && S.value.avgX[s] ? (v(), c("rect", {
|
|
1207
|
+
key: 0,
|
|
1208
|
+
x: S.value.avgX[s] - u.value.width / $.value / 2,
|
|
1209
|
+
y: u.value.top - e.value.style.layout.marginalBars.offset - l / S.value.maxX * e.value.style.layout.marginalBars.size,
|
|
1210
|
+
width: u.value.width / $.value <= 0 ? 1e-4 : u.value.width / $.value,
|
|
1211
|
+
height: l / S.value.maxX * e.value.style.layout.marginalBars.size <= 0 ? 1e-4 : l / S.value.maxX * e.value.style.layout.marginalBars.size,
|
|
1212
|
+
fill: e.value.style.layout.marginalBars.useGradient ? `url(#marginal_x_${N.value})` : e.value.style.layout.marginalBars.fill,
|
|
1213
|
+
style: ue([`opacity:${e.value.style.layout.marginalBars.opacity}`, { "pointer-events": "none" }]),
|
|
1214
|
+
stroke: e.value.style.backgroundColor,
|
|
1215
|
+
"stroke-width": e.value.style.layout.marginalBars.strokeWidth,
|
|
1216
|
+
rx: e.value.style.layout.marginalBars.borderRadius
|
|
1217
|
+
}, null, 12, Va)) : x("", !0),
|
|
1218
|
+
S.value.avgX[s] ? (v(), c("rect", {
|
|
1219
|
+
key: 1,
|
|
1220
|
+
x: S.value.avgX[s] - u.value.width / $.value / 2,
|
|
1221
|
+
y: u.value.top - e.value.style.layout.marginalBars.offset - e.value.style.layout.marginalBars.size,
|
|
1222
|
+
width: u.value.width / $.value <= 0 ? 1e-4 : u.value.width / $.value,
|
|
1223
|
+
height: Math.max(0.1, e.value.style.layout.marginalBars.size),
|
|
1224
|
+
fill: "transparent",
|
|
1225
|
+
onMouseenter: (o) => Sl(s),
|
|
1226
|
+
onMouseleave: a[0] || (a[0] = (o) => it())
|
|
1227
|
+
}, null, 40, Ua)) : x("", !0),
|
|
1228
|
+
S.value.avgX[s] && _e.value != null && _e.value === s ? (v(), c("g", ja, [
|
|
1229
|
+
k("rect", {
|
|
1230
|
+
x: S.value.avgX[s] - u.value.width / $.value / 2,
|
|
1231
|
+
y: u.value.top,
|
|
1232
|
+
width: u.value.width / $.value <= 0 ? 1e-4 : u.value.width / $.value,
|
|
1233
|
+
height: u.value.height,
|
|
1234
|
+
fill: e.value.style.layout.marginalBars.highlighter.color,
|
|
1235
|
+
"fill-opacity": e.value.style.layout.marginalBars.highlighter.opacity
|
|
1236
|
+
}, null, 8, Ga),
|
|
1237
|
+
k("line", {
|
|
1238
|
+
x1: S.value.avgX[s] - u.value.width / $.value / 2,
|
|
1239
|
+
x2: S.value.avgX[s] - u.value.width / $.value / 2,
|
|
1240
|
+
y1: 0,
|
|
1241
|
+
y2: u.value.top + u.value.height,
|
|
1242
|
+
stroke: e.value.style.layout.marginalBars.highlighter.stroke,
|
|
1243
|
+
"stroke-dasharray": e.value.style.layout.marginalBars.highlighter.strokeDasharray,
|
|
1244
|
+
"stroke-width": e.value.style.layout.marginalBars.highlighter.strokeWidth,
|
|
1245
|
+
style: { transition: "none !important", animation: "none !important" }
|
|
1246
|
+
}, null, 8, qa),
|
|
1247
|
+
k("line", {
|
|
1248
|
+
x1: S.value.avgX[s] - u.value.width / $.value / 2 + (u.value.width / $.value <= 0 ? 1e-4 : u.value.width / $.value),
|
|
1249
|
+
x2: S.value.avgX[s] - u.value.width / $.value / 2 + (u.value.width / $.value <= 0 ? 1e-4 : u.value.width / $.value),
|
|
1250
|
+
y1: 0,
|
|
1251
|
+
y2: u.value.top + u.value.height,
|
|
1252
|
+
stroke: e.value.style.layout.marginalBars.highlighter.stroke,
|
|
1253
|
+
"stroke-dasharray": e.value.style.layout.marginalBars.highlighter.strokeDasharray,
|
|
1254
|
+
"stroke-width": e.value.style.layout.marginalBars.highlighter.strokeWidth,
|
|
1255
|
+
style: { transition: "none !important", animation: "none !important" }
|
|
1256
|
+
}, null, 8, Ha)
|
|
1257
|
+
])) : x("", !0)
|
|
1258
|
+
]))), 256)),
|
|
1259
|
+
(v(!0), c(Q, null, oe(S.value.y, (l, s) => (v(), c("g", null, [
|
|
1260
|
+
l && S.value.avgY[s] ? (v(), c("rect", {
|
|
1261
|
+
key: 0,
|
|
1262
|
+
x: u.value.right + e.value.style.layout.marginalBars.offset,
|
|
1263
|
+
y: S.value.avgY[s] - u.value.height / $.value / 2,
|
|
1264
|
+
height: u.value.height / $.value <= 0 ? 1e-4 : u.value.height / $.value,
|
|
1265
|
+
width: l / S.value.maxY * e.value.style.layout.marginalBars.size <= 0 ? 1e-4 : l / S.value.maxY * e.value.style.layout.marginalBars.size,
|
|
1266
|
+
fill: e.value.style.layout.marginalBars.useGradient ? `url(#marginal_y_${N.value})` : e.value.style.layout.marginalBars.fill,
|
|
1267
|
+
style: ue([`opacity:${e.value.style.layout.marginalBars.opacity}`, { "pointer-events": "none" }]),
|
|
1268
|
+
stroke: e.value.style.backgroundColor,
|
|
1269
|
+
"stroke-width": e.value.style.layout.marginalBars.strokeWidth,
|
|
1270
|
+
rx: e.value.style.layout.marginalBars.borderRadius
|
|
1271
|
+
}, null, 12, Ka)) : x("", !0),
|
|
1272
|
+
S.value.avgY[s] ? (v(), c("rect", {
|
|
1273
|
+
key: 1,
|
|
1274
|
+
x: u.value.right + e.value.style.layout.marginalBars.offset,
|
|
1275
|
+
y: S.value.avgY[s] - u.value.height / $.value / 2,
|
|
1276
|
+
width: Math.max(0.1, e.value.style.layout.marginalBars.size),
|
|
1277
|
+
height: u.value.height / $.value <= 0 ? 1e-4 : u.value.height / $.value,
|
|
1278
|
+
fill: "transparent",
|
|
1279
|
+
onMouseenter: (o) => Tl(s),
|
|
1280
|
+
onMouseleave: a[1] || (a[1] = (o) => it())
|
|
1281
|
+
}, null, 40, Za)) : x("", !0),
|
|
1282
|
+
S.value.avgY[s] && Ce.value != null && Ce.value === s ? (v(), c("g", Ja, [
|
|
1283
|
+
k("rect", {
|
|
1284
|
+
x: u.value.left,
|
|
1285
|
+
y: S.value.avgY[s] - u.value.height / $.value / 2,
|
|
1286
|
+
width: u.value.width,
|
|
1287
|
+
height: u.value.height / $.value <= 0 ? 1e-4 : u.value.height / $.value,
|
|
1288
|
+
fill: e.value.style.layout.marginalBars.highlighter.color,
|
|
1289
|
+
"fill-opacity": e.value.style.layout.marginalBars.highlighter.opacity
|
|
1290
|
+
}, null, 8, Qa),
|
|
1291
|
+
k("line", {
|
|
1292
|
+
x1: u.value.left,
|
|
1293
|
+
x2: Y.value.width,
|
|
1294
|
+
y1: S.value.avgY[s] - u.value.height / $.value / 2,
|
|
1295
|
+
y2: S.value.avgY[s] - u.value.height / $.value / 2,
|
|
1296
|
+
stroke: e.value.style.layout.marginalBars.highlighter.stroke,
|
|
1297
|
+
"stroke-dasharray": e.value.style.layout.marginalBars.highlighter.strokeDasharray,
|
|
1298
|
+
"stroke-width": e.value.style.layout.marginalBars.highlighter.strokeWidth,
|
|
1299
|
+
style: { transition: "none !important", animation: "none !important" }
|
|
1300
|
+
}, null, 8, eo),
|
|
1301
|
+
k("line", {
|
|
1302
|
+
x1: u.value.left,
|
|
1303
|
+
x2: Y.value.width,
|
|
1304
|
+
y1: S.value.avgY[s] - u.value.height / $.value / 2 + (u.value.height / $.value <= 0 ? 1e-4 : u.value.height / $.value),
|
|
1305
|
+
y2: S.value.avgY[s] - u.value.height / $.value / 2 + (u.value.height / $.value <= 0 ? 1e-4 : u.value.height / $.value),
|
|
1306
|
+
stroke: e.value.style.layout.marginalBars.highlighter.stroke,
|
|
1307
|
+
"stroke-dasharray": e.value.style.layout.marginalBars.highlighter.strokeDasharray,
|
|
1308
|
+
"stroke-width": e.value.style.layout.marginalBars.highlighter.strokeWidth,
|
|
1309
|
+
style: { transition: "none !important", animation: "none !important" }
|
|
1310
|
+
}, null, 8, to)
|
|
1311
|
+
])) : x("", !0)
|
|
1312
|
+
]))), 256)),
|
|
1313
|
+
e.value.style.layout.marginalBars.showLines ? (v(), c("g", lo, [
|
|
1314
|
+
(v(!0), c(Q, null, oe(wl.value, (l) => (v(), c(Q, null, [
|
|
1315
|
+
I.value.includes(l.id) ? x("", !0) : (v(), c("path", {
|
|
1316
|
+
key: 0,
|
|
1317
|
+
d: `M ${l.dX}`,
|
|
1318
|
+
stroke: e.value.style.backgroundColor,
|
|
1319
|
+
"stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth + 1,
|
|
1320
|
+
"stroke-linecap": "round",
|
|
1321
|
+
"stroke-linejoin": "round",
|
|
1322
|
+
fill: "none"
|
|
1323
|
+
}, null, 8, ao)),
|
|
1324
|
+
I.value.includes(l.id) ? x("", !0) : (v(), c("path", {
|
|
1325
|
+
key: 1,
|
|
1326
|
+
d: `M ${l.dX}`,
|
|
1327
|
+
stroke: l.color,
|
|
1328
|
+
"stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth,
|
|
1329
|
+
"stroke-linecap": "round",
|
|
1330
|
+
"stroke-linejoin": "round",
|
|
1331
|
+
fill: "none"
|
|
1332
|
+
}, null, 8, oo)),
|
|
1333
|
+
I.value.includes(l.id) ? x("", !0) : (v(), c("path", {
|
|
1334
|
+
key: 2,
|
|
1335
|
+
d: `M ${l.dY}`,
|
|
1336
|
+
stroke: e.value.style.backgroundColor,
|
|
1337
|
+
"stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth + 1,
|
|
1338
|
+
"stroke-linecap": "round",
|
|
1339
|
+
"stroke-linejoin": "round",
|
|
1340
|
+
fill: "none"
|
|
1341
|
+
}, null, 8, so)),
|
|
1342
|
+
I.value.includes(l.id) ? x("", !0) : (v(), c("path", {
|
|
1343
|
+
key: 3,
|
|
1344
|
+
d: `M ${l.dY}`,
|
|
1345
|
+
stroke: l.color,
|
|
1346
|
+
"stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth,
|
|
1347
|
+
"stroke-linecap": "round",
|
|
1348
|
+
"stroke-linejoin": "round",
|
|
1349
|
+
fill: "none"
|
|
1350
|
+
}, null, 8, no))
|
|
1351
|
+
], 64))), 256))
|
|
1352
|
+
])) : x("", !0)
|
|
1353
|
+
])) : x("", !0),
|
|
1354
|
+
e.value.style.layout.plots.giftWrap.show ? (v(), c("g", uo, [
|
|
1355
|
+
(v(!0), c(Q, null, oe(U.value, (l, s) => (v(), c("g", null, [
|
|
1356
|
+
l.plots.length > 2 ? (v(), c("polygon", {
|
|
1357
|
+
key: 0,
|
|
1358
|
+
points: h(oa)({ series: l.plots }),
|
|
1359
|
+
fill: h(je)(l.color, e.value.style.layout.plots.giftWrap.fillOpacity * 100),
|
|
1360
|
+
"stroke-width": e.value.style.layout.plots.giftWrap.strokeWidth,
|
|
1361
|
+
"stroke-dasharray": e.value.style.layout.plots.giftWrap.strokeDasharray,
|
|
1362
|
+
stroke: l.color,
|
|
1363
|
+
"stroke-linejoin": "round",
|
|
1364
|
+
"stroke-linecap": "round"
|
|
1365
|
+
}, null, 8, io)) : x("", !0)
|
|
1366
|
+
]))), 256))
|
|
1367
|
+
])) : x("", !0),
|
|
1368
|
+
e.value.usePerformanceMode ? x("", !0) : (v(!0), c(Q, { key: 4 }, oe(U.value, (l, s) => (v(), c("g", null, [
|
|
1369
|
+
!l.shape || l.shape === "circle" ? (v(), c("g", ro, [
|
|
1370
|
+
(v(!0), c(Q, null, oe(l.plots, (o, n) => (v(), c("circle", {
|
|
1371
|
+
cx: o.x,
|
|
1372
|
+
cy: o.y,
|
|
1373
|
+
r: R.value && R.value === o.id ? o.weight * 2 : o.weight,
|
|
1374
|
+
fill: h(je)(l.color, e.value.style.layout.plots.opacity * 100),
|
|
1375
|
+
stroke: e.value.style.layout.plots.stroke,
|
|
1376
|
+
"stroke-width": e.value.style.layout.plots.strokeWidth,
|
|
1377
|
+
style: ue(`opacity:${R.value && R.value === o.id ? 1 : e.value.style.layout.plots.significance.useDistanceOpacity ? 1 - Math.abs(o.deviation) / Ot.value : e.value.style.layout.plots.significance.show && Math.abs(o.deviation) > e.value.style.layout.plots.significance.deviationThreshold ? e.value.style.layout.plots.significance.opacity : 1}`),
|
|
1378
|
+
onMouseover: (i) => he(o, s, "pointer", ve.value.get(o.id)),
|
|
1379
|
+
onMouseleave: (i) => Xe(o, s),
|
|
1380
|
+
onClick: (i) => Ye(o, s)
|
|
1381
|
+
}, null, 44, vo))), 256))
|
|
1382
|
+
])) : (v(), c("g", co, [
|
|
1383
|
+
(v(!0), c(Q, null, oe(l.plots, (o, n) => (v(), ae(pt, {
|
|
1384
|
+
plot: { x: o.x, y: o.y },
|
|
1385
|
+
radius: R.value && R.value === o.id ? o.weight * 2 : o.weight,
|
|
1386
|
+
shape: l.shape,
|
|
1387
|
+
color: h(je)(l.color, e.value.style.layout.plots.opacity * 100),
|
|
1388
|
+
stroke: e.value.style.layout.plots.stroke,
|
|
1389
|
+
strokeWidth: e.value.style.layout.plots.strokeWidth,
|
|
1390
|
+
style: ue(`opacity:${R.value && R.value === o.id ? 1 : e.value.style.layout.plots.significance.useDistanceOpacity ? 1 - Math.abs(o.deviation) / Ot.value : e.value.style.layout.plots.significance.show && Math.abs(o.deviation) > e.value.style.layout.plots.significance.deviationThreshold ? e.value.style.layout.plots.significance.opacity : 1}`),
|
|
1391
|
+
onMouseover: (i) => he(o, s, "pointer", ve.value.get(o.id)),
|
|
1392
|
+
onMouseleave: (i) => Xe(o, s),
|
|
1393
|
+
onClick: (i) => Ye(o, s)
|
|
1394
|
+
}, null, 8, ["plot", "radius", "shape", "color", "stroke", "strokeWidth", "style", "onMouseover", "onMouseleave", "onClick"]))), 256))
|
|
1395
|
+
]))
|
|
1396
|
+
]))), 256)),
|
|
1397
|
+
e.value.usePerformanceMode ? (v(), c(Q, { key: 5 }, [
|
|
1398
|
+
k("g", {
|
|
1399
|
+
"clip-path": `url(#clip_path_${N.value})`
|
|
1400
|
+
}, [
|
|
1401
|
+
(v(!0), c(Q, null, oe(Pl.value, (l) => (v(), c("path", {
|
|
1402
|
+
key: l.id,
|
|
1403
|
+
d: l.d,
|
|
1404
|
+
fill: l.fill,
|
|
1405
|
+
stroke: l.stroke,
|
|
1406
|
+
"stroke-width": l.strokeWidth,
|
|
1407
|
+
"stroke-opacity": l.strokeOpacity,
|
|
1408
|
+
"vector-effect": "non-scaling-stroke",
|
|
1409
|
+
"paint-order": "fill"
|
|
1410
|
+
}, null, 8, ho))), 128))
|
|
1411
|
+
], 8, yo),
|
|
1412
|
+
g.value && e.value.style.layout.plots.selectors.show ? (v(), c("g", fo, [
|
|
1413
|
+
Oe(pt, {
|
|
1414
|
+
shape: g.value.shape || "circle",
|
|
1415
|
+
color: g.value.color,
|
|
1416
|
+
plot: { x: g.value.x, y: g.value.y },
|
|
1417
|
+
radius: Math.max(4 * Xt[g.value.shape || "circle"], g.value.weight * 2),
|
|
1418
|
+
stroke: e.value.style.layout.plots.stroke,
|
|
1419
|
+
strokeWidth: e.value.style.layout.plots.strokeWidth
|
|
1420
|
+
}, null, 8, ["shape", "color", "plot", "radius", "stroke", "strokeWidth"])
|
|
1421
|
+
])) : x("", !0),
|
|
1422
|
+
k("rect", {
|
|
1423
|
+
x: u.value.left,
|
|
1424
|
+
y: u.value.top,
|
|
1425
|
+
width: Math.max(1e-4, u.value.width),
|
|
1426
|
+
height: Math.max(1e-4, u.value.height),
|
|
1427
|
+
fill: "transparent",
|
|
1428
|
+
onMousemove: a[2] || (a[2] = (...l) => h(Yt) && h(Yt)(...l)),
|
|
1429
|
+
onMouseleave: zl,
|
|
1430
|
+
onClick: Il
|
|
1431
|
+
}, null, 40, po)
|
|
1432
|
+
], 64)) : x("", !0),
|
|
1433
|
+
g.value && e.value.style.layout.plots.selectors.show ? (v(), c("g", go, [
|
|
1434
|
+
k("line", {
|
|
1435
|
+
x1: W.value.x,
|
|
1436
|
+
x2: g.value.x,
|
|
1437
|
+
y1: g.value.y,
|
|
1438
|
+
y2: g.value.y,
|
|
1439
|
+
stroke: e.value.style.layout.plots.selectors.stroke,
|
|
1440
|
+
"stroke-width": e.value.style.layout.plots.selectors.strokeWidth,
|
|
1441
|
+
"stroke-dasharray": e.value.style.layout.plots.selectors.strokeDasharray,
|
|
1442
|
+
"stroke-linecap": "round",
|
|
1443
|
+
class: "line-pointer"
|
|
1444
|
+
}, null, 8, mo),
|
|
1445
|
+
k("line", {
|
|
1446
|
+
x1: g.value.x,
|
|
1447
|
+
x2: g.value.x,
|
|
1448
|
+
y1: W.value.y,
|
|
1449
|
+
y2: g.value.y,
|
|
1450
|
+
stroke: e.value.style.layout.plots.selectors.stroke,
|
|
1451
|
+
"stroke-width": e.value.style.layout.plots.selectors.strokeWidth,
|
|
1452
|
+
"stroke-dasharray": e.value.style.layout.plots.selectors.strokeDasharray,
|
|
1453
|
+
"stroke-linecap": "round",
|
|
1454
|
+
class: "line-pointer"
|
|
1455
|
+
}, null, 8, xo),
|
|
1456
|
+
k("text", {
|
|
1457
|
+
x: W.value.x + (g.value.x > W.value.x ? -6 : 6),
|
|
1458
|
+
y: g.value.y + e.value.style.layout.plots.selectors.labels.fontSize / 3,
|
|
1459
|
+
"font-size": e.value.style.layout.plots.selectors.labels.fontSize,
|
|
1460
|
+
fill: e.value.style.layout.plots.selectors.labels.color,
|
|
1461
|
+
"font-weight": e.value.style.layout.plots.selectors.labels.bold ? "bold" : "normal",
|
|
1462
|
+
"text-anchor": g.value.x > W.value.x ? "end" : "start"
|
|
1463
|
+
}, V(h(se)(
|
|
1464
|
+
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
1465
|
+
h(Z)(g.value.v.y),
|
|
1466
|
+
h(ee)({
|
|
1467
|
+
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
1468
|
+
v: h(Z)(g.value.v.y),
|
|
1469
|
+
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
1470
|
+
r: e.value.style.layout.plots.selectors.labels.rounding
|
|
1471
|
+
}),
|
|
1472
|
+
{ datapoint: g.value }
|
|
1473
|
+
)), 9, bo),
|
|
1474
|
+
k("text", {
|
|
1475
|
+
x: g.value.x,
|
|
1476
|
+
y: W.value.y + (g.value.y > W.value.y ? -6 : e.value.style.layout.plots.selectors.labels.fontSize + 6),
|
|
1477
|
+
"font-size": e.value.style.layout.plots.selectors.labels.fontSize,
|
|
1478
|
+
fill: e.value.style.layout.plots.selectors.labels.color,
|
|
1479
|
+
"font-weight": e.value.style.layout.plots.selectors.labels.bold ? "bold" : "normal",
|
|
1480
|
+
"text-anchor": "middle"
|
|
1481
|
+
}, V(h(se)(
|
|
1482
|
+
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
1483
|
+
h(Z)(g.value.v.x),
|
|
1484
|
+
h(ee)({
|
|
1485
|
+
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
1486
|
+
v: h(Z)(g.value.v.x),
|
|
1487
|
+
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
1488
|
+
r: e.value.style.layout.plots.selectors.labels.rounding
|
|
1489
|
+
}),
|
|
1490
|
+
{ datapoint: g.value }
|
|
1491
|
+
)), 9, ko),
|
|
1492
|
+
k("circle", {
|
|
1493
|
+
cx: W.value.x,
|
|
1494
|
+
cy: g.value.y,
|
|
1495
|
+
r: e.value.style.layout.plots.selectors.markers.radius,
|
|
1496
|
+
fill: e.value.style.layout.plots.selectors.markers.fill,
|
|
1497
|
+
stroke: e.value.style.layout.plots.selectors.markers.stroke,
|
|
1498
|
+
"stroke-width": e.value.style.layout.plots.selectors.markers.strokeWidth,
|
|
1499
|
+
class: "line-pointer"
|
|
1500
|
+
}, null, 8, wo),
|
|
1501
|
+
k("circle", {
|
|
1502
|
+
cx: g.value.x,
|
|
1503
|
+
cy: W.value.y,
|
|
1504
|
+
r: e.value.style.layout.plots.selectors.markers.radius,
|
|
1505
|
+
fill: e.value.style.layout.plots.selectors.markers.fill,
|
|
1506
|
+
stroke: e.value.style.layout.plots.selectors.markers.stroke,
|
|
1507
|
+
"stroke-width": e.value.style.layout.plots.selectors.markers.strokeWidth,
|
|
1508
|
+
class: "line-pointer"
|
|
1509
|
+
}, null, 8, $o),
|
|
1510
|
+
e.value.style.layout.plots.selectors.labels.showName ? (v(), c("text", {
|
|
1511
|
+
key: 0,
|
|
1512
|
+
x: g.value.x,
|
|
1513
|
+
y: g.value.y + (g.value.y < W.value.y ? -e.value.style.layout.plots.selectors.labels.fontSize / 2 : e.value.style.layout.plots.selectors.labels.fontSize),
|
|
1514
|
+
"font-size": e.value.style.layout.plots.selectors.labels.fontSize,
|
|
1515
|
+
fill: e.value.style.layout.plots.selectors.labels.color,
|
|
1516
|
+
"font-weight": e.value.style.layout.plots.selectors.labels.bold ? "bold" : "normal",
|
|
1517
|
+
"text-anchor": g.value.x < u.value.left + 100 ? "start" : g.value.x > u.value.right - 100 ? "end" : g.value.x > W.value.x ? "start" : "end"
|
|
1518
|
+
}, V(g.value.v.name), 9, Mo)) : x("", !0)
|
|
1519
|
+
])) : x("", !0),
|
|
1520
|
+
e.value.style.layout.dataLabels.xAxis.show ? (v(), c("g", {
|
|
1521
|
+
key: 7,
|
|
1522
|
+
ref_key: "xAxisLabelLeft",
|
|
1523
|
+
ref: He
|
|
1524
|
+
}, [
|
|
1525
|
+
k("text", {
|
|
1526
|
+
id: `vue-ui-scatter-xAxis-label-${N.value}`,
|
|
1527
|
+
transform: `translate(${e.value.style.layout.dataLabels.xAxis.fontSize}, ${u.value.top + u.value.height / 2}), rotate(-90)`,
|
|
1528
|
+
"text-anchor": "middle",
|
|
1529
|
+
"font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
|
|
1530
|
+
"font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal",
|
|
1531
|
+
fill: e.value.style.layout.dataLabels.xAxis.color
|
|
1532
|
+
}, V(e.value.style.layout.dataLabels.xAxis.name), 9, _o),
|
|
1533
|
+
k("text", {
|
|
1534
|
+
"text-anchor": "middle",
|
|
1535
|
+
"font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
|
|
1536
|
+
fill: e.value.style.layout.dataLabels.xAxis.color,
|
|
1537
|
+
transform: `translate(${e.value.style.layout.dataLabels.xAxis.name ? e.value.style.layout.dataLabels.xAxis.fontSize * 3 : 0}, ${W.value.y + e.value.style.layout.dataLabels.xAxis.fontSize / 3}), rotate(-90)`
|
|
1538
|
+
}, V(h(se)(
|
|
1539
|
+
e.value.style.layout.plots.selectors.labels.x.formatter,
|
|
1540
|
+
h(Z)(F.value.xMin),
|
|
1541
|
+
h(ee)({
|
|
1542
|
+
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
1543
|
+
v: h(Z)(F.value.xMin),
|
|
1544
|
+
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
1545
|
+
r: e.value.style.layout.dataLabels.xAxis.rounding
|
|
1546
|
+
})
|
|
1547
|
+
)), 9, Co)
|
|
1548
|
+
], 512)) : x("", !0),
|
|
1549
|
+
e.value.style.layout.dataLabels.xAxis.show ? (v(), c("text", {
|
|
1550
|
+
key: 8,
|
|
1551
|
+
ref_key: "xAxisLabelRight",
|
|
1552
|
+
ref: fl,
|
|
1553
|
+
"text-anchor": "middle",
|
|
1554
|
+
transform: `translate(${u.value.right + e.value.style.layout.padding.right + 6}, ${W.value.y + e.value.style.layout.dataLabels.xAxis.fontSize / 3}), rotate(-90)`,
|
|
1555
|
+
"font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
|
|
1556
|
+
fill: e.value.style.layout.dataLabels.xAxis.color
|
|
1557
|
+
}, V(h(se)(
|
|
1558
|
+
e.value.style.layout.plots.selectors.labels.x.formatter,
|
|
1559
|
+
h(Z)(F.value.xMax),
|
|
1560
|
+
h(ee)({
|
|
1561
|
+
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
1562
|
+
v: h(Z)(F.value.xMax),
|
|
1563
|
+
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
1564
|
+
r: e.value.style.layout.dataLabels.xAxis.rounding
|
|
1565
|
+
})
|
|
1566
|
+
)), 9, Ao)) : x("", !0),
|
|
1567
|
+
e.value.style.layout.dataLabels.yAxis.show ? (v(), c("text", {
|
|
1568
|
+
key: 9,
|
|
1569
|
+
ref_key: "yAxisLabelTop",
|
|
1570
|
+
ref: pl,
|
|
1571
|
+
x: W.value.x,
|
|
1572
|
+
y: u.value.top - e.value.style.layout.dataLabels.yAxis.fontSize,
|
|
1573
|
+
"text-anchor": "middle",
|
|
1574
|
+
"font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
|
|
1575
|
+
fill: e.value.style.layout.dataLabels.yAxis.color
|
|
1576
|
+
}, V(h(se)(
|
|
1577
|
+
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
1578
|
+
h(Z)(F.value.yMax),
|
|
1579
|
+
h(ee)({
|
|
1580
|
+
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
1581
|
+
v: h(Z)(F.value.yMax),
|
|
1582
|
+
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
1583
|
+
r: e.value.style.layout.dataLabels.yAxis.rounding
|
|
1584
|
+
})
|
|
1585
|
+
)), 9, So)) : x("", !0),
|
|
1586
|
+
e.value.style.layout.dataLabels.yAxis.show ? (v(), c("g", {
|
|
1587
|
+
key: 10,
|
|
1588
|
+
ref_key: "yAxisLabelBottom",
|
|
1589
|
+
ref: Ke
|
|
1590
|
+
}, [
|
|
1591
|
+
k("text", {
|
|
1592
|
+
x: W.value.x,
|
|
1593
|
+
y: Y.value.height - e.value.style.layout.dataLabels.yAxis.fontSize * 2,
|
|
1594
|
+
"text-anchor": "middle",
|
|
1595
|
+
"font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
|
|
1596
|
+
fill: e.value.style.layout.dataLabels.yAxis.color
|
|
1597
|
+
}, V(h(se)(
|
|
1598
|
+
e.value.style.layout.plots.selectors.labels.y.formatter,
|
|
1599
|
+
h(Z)(F.value.yMin),
|
|
1600
|
+
h(ee)({
|
|
1601
|
+
p: e.value.style.layout.plots.selectors.labels.prefix,
|
|
1602
|
+
v: h(Z)(F.value.yMin),
|
|
1603
|
+
s: e.value.style.layout.plots.selectors.labels.suffix,
|
|
1604
|
+
r: e.value.style.layout.dataLabels.yAxis.rounding
|
|
1605
|
+
})
|
|
1606
|
+
)), 9, To),
|
|
1607
|
+
k("text", {
|
|
1608
|
+
"text-anchor": "middle",
|
|
1609
|
+
"font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
|
|
1610
|
+
"font-weight": e.value.style.layout.dataLabels.yAxis.bold ? "bold" : "normal",
|
|
1611
|
+
fill: e.value.style.layout.dataLabels.yAxis.color,
|
|
1612
|
+
x: u.value.left + u.value.width / 2,
|
|
1613
|
+
y: Y.value.height
|
|
1614
|
+
}, V(e.value.style.layout.dataLabels.yAxis.name), 9, Lo)
|
|
1615
|
+
], 512)) : x("", !0),
|
|
1616
|
+
k("clipPath", {
|
|
1617
|
+
id: `clip_path_${N.value}`
|
|
1618
|
+
}, [
|
|
1619
|
+
k("rect", {
|
|
1620
|
+
x: u.value.left,
|
|
1621
|
+
y: u.value.top,
|
|
1622
|
+
width: u.value.width <= 0 ? 1e-4 : u.value.width,
|
|
1623
|
+
height: u.value.height <= 0 ? 1e-4 : u.value.height
|
|
1624
|
+
}, null, 8, Bo)
|
|
1625
|
+
], 8, Po),
|
|
1626
|
+
e.value.style.layout.correlation.show ? (v(), c("g", zo, [
|
|
1627
|
+
(v(!0), c(Q, null, oe(U.value, (l, s) => (v(), c("line", {
|
|
1628
|
+
x1: l.correlation.x1,
|
|
1629
|
+
x2: l.correlation.x2,
|
|
1630
|
+
y1: l.correlation.y1,
|
|
1631
|
+
y2: l.correlation.y2,
|
|
1632
|
+
"stroke-dasharray": e.value.style.layout.correlation.strokeDasharray,
|
|
1633
|
+
stroke: l.color,
|
|
1634
|
+
"stroke-width": e.value.style.layout.correlation.strokeWidth,
|
|
1635
|
+
"clip-path": `url(#clip_path_${N.value})`
|
|
1636
|
+
}, null, 8, Io))), 256)),
|
|
1637
|
+
(v(!0), c(Q, null, oe(U.value, (l, s) => (v(), c("g", null, [
|
|
1638
|
+
e.value.style.layout.correlation.label.show ? (v(), c("text", {
|
|
1639
|
+
key: 0,
|
|
1640
|
+
x: l.correlation.x2,
|
|
1641
|
+
y: l.correlation.y2,
|
|
1642
|
+
fill: e.value.style.layout.correlation.label.useSerieColor ? l.color : e.value.style.layout.correlation.label.color,
|
|
1643
|
+
"text-anchor": "end",
|
|
1644
|
+
"font-size": e.value.style.layout.correlation.label.fontSize,
|
|
1645
|
+
"font-weight": e.value.style.layout.correlation.label.bold ? "bold" : "normal"
|
|
1646
|
+
}, V(h(ee)({
|
|
1647
|
+
v: h(Z)(l.correlation.coefficient),
|
|
1648
|
+
r: e.value.style.layout.correlation.label.roundingValue
|
|
1649
|
+
})), 9, Oo)) : x("", !0)
|
|
1650
|
+
]))), 256))
|
|
1651
|
+
])) : x("", !0),
|
|
1652
|
+
z(t.$slots, "svg", {
|
|
1653
|
+
svg: {
|
|
1654
|
+
...Y.value,
|
|
1655
|
+
drawingArea: {
|
|
1656
|
+
...u.value,
|
|
1657
|
+
zero: W.value
|
|
1658
|
+
},
|
|
1659
|
+
data: be.value,
|
|
1660
|
+
isPrintingImg: h(lt) | h(at) | Ee.value,
|
|
1661
|
+
isPrintingSvg: Ne.value
|
|
1662
|
+
}
|
|
1663
|
+
}, void 0, !0)
|
|
1664
|
+
], 46, Ba)),
|
|
1665
|
+
t.$slots.hint ? (v(), c("div", Do, [
|
|
1666
|
+
z(t.$slots, "hint", H(K({ hint: e.value.a11y.translations.keyboardNavigation, isVisible: Fe.value })), void 0, !0)
|
|
1667
|
+
])) : x("", !0)
|
|
1668
|
+
]),
|
|
1669
|
+
t.$slots.watermark ? (v(), c("div", Eo, [
|
|
1670
|
+
z(t.$slots, "watermark", H(K({ isPrinting: h(lt) || h(at) || Ee.value || Ne.value })), void 0, !0)
|
|
1671
|
+
])) : x("", !0),
|
|
1672
|
+
k("div", {
|
|
1673
|
+
id: `legend-bottom-${N.value}`
|
|
1674
|
+
}, null, 8, No),
|
|
1675
|
+
Ct.value ? (v(), ae(ql, {
|
|
1676
|
+
key: 7,
|
|
1677
|
+
to: e.value.style.legend.position === "top" ? `#legend-top-${N.value}` : `#legend-bottom-${N.value}`
|
|
1678
|
+
}, [
|
|
1679
|
+
k("div", {
|
|
1680
|
+
ref_key: "chartLegend",
|
|
1681
|
+
ref: bt
|
|
1682
|
+
}, [
|
|
1683
|
+
e.value.style.legend.show ? (v(), ae($a, {
|
|
1684
|
+
key: `legend_${_t.value}`,
|
|
1685
|
+
legendSet: J.value,
|
|
1686
|
+
config: bl.value,
|
|
1687
|
+
isCursorPointer: de.value,
|
|
1688
|
+
onClickMarker: a[3] || (a[3] = ({ legend: l }) => Re(l.id))
|
|
1689
|
+
}, {
|
|
1690
|
+
item: B(({ legend: l }) => [
|
|
1691
|
+
k("div", {
|
|
1692
|
+
onClick: (s) => l.segregate(),
|
|
1693
|
+
style: ue(`opacity:${I.value.includes(l.id) ? 0.5 : 1}`)
|
|
1694
|
+
}, V(l.name), 13, Fo)
|
|
1695
|
+
]),
|
|
1696
|
+
legendToggle: B(() => [
|
|
1697
|
+
J.value.length > 2 && e.value.style.legend.selectAllToggle.show && !h(Ze) ? (v(), ae(_a, {
|
|
1698
|
+
key: 0,
|
|
1699
|
+
backgroundColor: e.value.style.legend.selectAllToggle.backgroundColor,
|
|
1700
|
+
color: e.value.style.legend.selectAllToggle.color,
|
|
1701
|
+
fontSize: e.value.style.legend.fontSize,
|
|
1702
|
+
checked: I.value.length > 0,
|
|
1703
|
+
isCursorPointer: de.value,
|
|
1704
|
+
onToggle: Ml
|
|
1705
|
+
}, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : x("", !0)
|
|
1706
|
+
]),
|
|
1707
|
+
_: 1
|
|
1708
|
+
}, 8, ["legendSet", "config", "isCursorPointer"])) : z(t.$slots, "legend", {
|
|
1709
|
+
key: 1,
|
|
1710
|
+
legend: J.value
|
|
1711
|
+
}, void 0, !0)
|
|
1712
|
+
], 512)
|
|
1713
|
+
], 8, ["to"])) : x("", !0),
|
|
1714
|
+
t.$slots.source ? (v(), c("div", {
|
|
1715
|
+
key: 8,
|
|
1716
|
+
ref_key: "source",
|
|
1717
|
+
ref: kt,
|
|
1718
|
+
dir: "auto"
|
|
1719
|
+
}, [
|
|
1720
|
+
z(t.$slots, "source", {}, void 0, !0)
|
|
1721
|
+
], 512)) : x("", !0),
|
|
1722
|
+
Oe(h(al), {
|
|
1723
|
+
teleportTo: e.value.style.tooltip.teleportTo,
|
|
1724
|
+
show: q.value.showTooltip && De.value,
|
|
1725
|
+
backgroundColor: e.value.style.tooltip.backgroundColor,
|
|
1726
|
+
color: e.value.style.tooltip.color,
|
|
1727
|
+
borderRadius: e.value.style.tooltip.borderRadius,
|
|
1728
|
+
borderColor: e.value.style.tooltip.borderColor,
|
|
1729
|
+
borderWidth: e.value.style.tooltip.borderWidth,
|
|
1730
|
+
fontSize: e.value.style.tooltip.fontSize,
|
|
1731
|
+
backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
|
|
1732
|
+
position: e.value.style.tooltip.position,
|
|
1733
|
+
offsetY: e.value.style.tooltip.offsetY,
|
|
1734
|
+
parent: ne.value,
|
|
1735
|
+
content: Ge.value,
|
|
1736
|
+
isFullscreen: fe.value,
|
|
1737
|
+
isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function",
|
|
1738
|
+
smooth: e.value.style.tooltip.smooth,
|
|
1739
|
+
backdropFilter: e.value.style.tooltip.backdropFilter,
|
|
1740
|
+
smoothForce: e.value.style.tooltip.smoothForce,
|
|
1741
|
+
smoothSnapThreshold: e.value.style.tooltip.smoothSnapThreshold,
|
|
1742
|
+
isA11yMode: Se.value === "keyboard",
|
|
1743
|
+
a11yPosition: At.value
|
|
1744
|
+
}, {
|
|
1745
|
+
"tooltip-before": B(() => [
|
|
1746
|
+
z(t.$slots, "tooltip-before", H(K({ ...ot.value })), void 0, !0)
|
|
1747
|
+
]),
|
|
1748
|
+
"tooltip-after": B(() => [
|
|
1749
|
+
z(t.$slots, "tooltip-after", H(K({ ...ot.value })), void 0, !0)
|
|
1750
|
+
]),
|
|
1751
|
+
default: B(() => [
|
|
1752
|
+
e.value.style.tooltip.showShape ? (v(), c("div", Wo, [
|
|
1753
|
+
(v(), c("svg", Xo, [
|
|
1754
|
+
Oe(pt, {
|
|
1755
|
+
shape: g.value.shape,
|
|
1756
|
+
color: g.value.color,
|
|
1757
|
+
plot: { x: 10, y: 10 },
|
|
1758
|
+
radius: 7
|
|
1759
|
+
}, null, 8, ["shape", "color"])
|
|
1760
|
+
]))
|
|
1761
|
+
])) : x("", !0)
|
|
1762
|
+
]),
|
|
1763
|
+
_: 3
|
|
1764
|
+
}, 8, ["teleportTo", "show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold", "isA11yMode", "a11yPosition"]),
|
|
1765
|
+
gt.value && e.value.userOptions.buttons.table ? (v(), ae(Hl(Pe.value.component), Kl({ key: 9 }, Pe.value.props, {
|
|
1766
|
+
ref_key: "tableUnit",
|
|
1767
|
+
ref: Ae,
|
|
1768
|
+
onClose: Rt
|
|
1769
|
+
}), Ht({
|
|
1770
|
+
content: B(() => [
|
|
1771
|
+
(v(), ae(h(nl), {
|
|
1772
|
+
key: `table_${Mt.value}`,
|
|
1773
|
+
colNames: ke.value.colNames,
|
|
1774
|
+
head: ke.value.head,
|
|
1775
|
+
body: ke.value.body,
|
|
1776
|
+
config: ke.value.config,
|
|
1777
|
+
title: e.value.table.useDialog ? "" : Pe.value.title,
|
|
1778
|
+
withCloseButton: !e.value.table.useDialog,
|
|
1779
|
+
isCursorPointer: de.value,
|
|
1780
|
+
onClose: Rt
|
|
1781
|
+
}, {
|
|
1782
|
+
th: B(({ th: l }) => [
|
|
1783
|
+
Kt(V(l), 1)
|
|
1784
|
+
]),
|
|
1785
|
+
td: B(({ td: l }) => [
|
|
1786
|
+
l.shape ? (v(), c("div", Yo, [
|
|
1787
|
+
k("span", null, V(l.content), 1)
|
|
1788
|
+
])) : (v(), c("div", {
|
|
1789
|
+
key: 1,
|
|
1790
|
+
innerHTML: l
|
|
1791
|
+
}, null, 8, Ro))
|
|
1792
|
+
]),
|
|
1793
|
+
_: 1
|
|
1794
|
+
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"]))
|
|
1795
|
+
]),
|
|
1796
|
+
_: 2
|
|
1797
|
+
}, [
|
|
1798
|
+
e.value.table.useDialog ? {
|
|
1799
|
+
name: "title",
|
|
1800
|
+
fn: B(() => [
|
|
1801
|
+
Kt(V(Pe.value.title), 1)
|
|
1802
|
+
]),
|
|
1803
|
+
key: "0"
|
|
1804
|
+
} : void 0,
|
|
1805
|
+
e.value.table.useDialog ? {
|
|
1806
|
+
name: "actions",
|
|
1807
|
+
fn: B(() => [
|
|
1808
|
+
k("button", {
|
|
1809
|
+
tabindex: "0",
|
|
1810
|
+
class: "vue-ui-user-options-button",
|
|
1811
|
+
onClick: a[4] || (a[4] = (l) => nt(e.value.userOptions.callbacks.csv)),
|
|
1812
|
+
style: ue({ cursor: de.value ? "pointer" : "default" })
|
|
1813
|
+
}, [
|
|
1814
|
+
Oe(h(ol), {
|
|
1815
|
+
name: "fileCsv",
|
|
1816
|
+
stroke: Pe.value.props.color
|
|
1817
|
+
}, null, 8, ["stroke"])
|
|
1818
|
+
], 4)
|
|
1819
|
+
]),
|
|
1820
|
+
key: "1"
|
|
1821
|
+
} : void 0
|
|
1822
|
+
]), 1040)) : x("", !0),
|
|
1823
|
+
z(t.$slots, "skeleton", {}, () => [
|
|
1824
|
+
h(Ze) ? (v(), ae(ha, { key: 0 })) : x("", !0)
|
|
1825
|
+
], !0)
|
|
1826
|
+
], 46, Aa));
|
|
1827
|
+
}
|
|
1828
|
+
}, vs = /* @__PURE__ */ Ca(Vo, [["__scopeId", "data-v-cde737cf"]]);
|
|
1829
|
+
export {
|
|
1830
|
+
vs as default
|
|
1831
|
+
};
|