vue-data-ui 3.25.7 → 3.25.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BaseScanner-DZvpgOjM.js → BaseScanner-Dzc8VT3j.js} +6 -3
- package/dist/{PackageVersion-UfoQuPMf.js → PackageVersion-KBMdaOXg.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{package-B-3S5q00.js → package-BL27Ev_h.js} +1 -1
- package/dist/{render-common-CAXK7ycr.js → render-common-By8J0AE-.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +2 -0
- package/dist/{useConfig-CIQZ6_r7.js → useConfig-D32D002m.js} +2 -0
- package/dist/{useObjectBindings---mHNfbS.js → useObjectBindings-Cd_WuYIn.js} +1 -1
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-DlWT702n.js → vue-data-ui-CBWuUAXT.js} +69 -69
- package/dist/vue-data-ui.js +70 -70
- package/dist/{vue-ui-3d-bar-DbOk2kpM.js → vue-ui-3d-bar-BSbq90H3.js} +3 -3
- package/dist/{vue-ui-accordion-BSmBUjwZ.js → vue-ui-accordion-DmkL8A59.js} +1 -1
- package/dist/{vue-ui-age-pyramid-C7_mGIRk.js → vue-ui-age-pyramid-CrXl71iC.js} +263 -251
- package/dist/{vue-ui-annotator-CTQHAPho.js → vue-ui-annotator-BO5ihHOB.js} +2 -2
- package/dist/{vue-ui-bullet-CDy_dkYz.js → vue-ui-bullet-B2Y3Wqh9.js} +3 -3
- package/dist/{vue-ui-bump-DP24leiD.js → vue-ui-bump-DXvvjG4I.js} +3 -3
- package/dist/{vue-ui-candlestick-kJLmYaR7.js → vue-ui-candlestick-CFqR6W56.js} +453 -441
- package/dist/{vue-ui-carousel-table-BQzAQDw6.js → vue-ui-carousel-table-D-ZkPRta.js} +2 -2
- package/dist/{vue-ui-chestnut-DnnRp3Kl.js → vue-ui-chestnut-CyW3IoYC.js} +3 -3
- package/dist/{vue-ui-chord-DO15ZDCS.js → vue-ui-chord-DS0jni9A.js} +3 -3
- package/dist/{vue-ui-circle-pack-DYTllMPV.js → vue-ui-circle-pack-j2ChgLWr.js} +494 -482
- package/dist/{vue-ui-cursor-CtViSjNp.js → vue-ui-cursor-qOONOtcv.js} +2 -2
- package/dist/{vue-ui-dag-NXtGYzqg.js → vue-ui-dag-CmeFsKhR.js} +3 -3
- package/dist/{vue-ui-dashboard-D3_4QohV.js → vue-ui-dashboard-C7Z5BTN4.js} +65 -65
- package/dist/{vue-ui-digits-CB09pLQx.js → vue-ui-digits-Bf68x6fb.js} +2 -2
- package/dist/{vue-ui-donut-yTE6D8yV.js → vue-ui-donut-CkBPJW_T.js} +837 -825
- package/dist/{vue-ui-donut-eysaEyTy.js → vue-ui-donut-DzDSYgVp.js} +2 -2
- package/dist/{vue-ui-donut-evolution-DhrtxvAd.js → vue-ui-donut-evolution-CDJumo0t.js} +3 -3
- package/dist/{vue-ui-dumbbell-CmGIeULQ.js → vue-ui-dumbbell-Cr__26dN.js} +3 -3
- package/dist/vue-ui-flow-Cz6WRi2c.js +1229 -0
- package/dist/{vue-ui-funnel-CLAii4wi.js → vue-ui-funnel-BlC7KxS6.js} +2 -2
- package/dist/vue-ui-galaxy-Bg2smlcI.js +1097 -0
- package/dist/{vue-ui-gauge-D76-4Z_0.js → vue-ui-gauge-BHsaent1.js} +3 -3
- package/dist/{vue-ui-geo-BQ7-UnuG.js → vue-ui-geo-CE3Cr0or.js} +407 -395
- package/dist/{vue-ui-gizmo-C47zjcs-.js → vue-ui-gizmo-DqFUBEai.js} +3 -3
- package/dist/{vue-ui-heatmap-XJef60IZ.js → vue-ui-heatmap-DXqj9ial.js} +478 -446
- package/dist/{vue-ui-hill-D5BYGPXB.js → vue-ui-hill-B3fPAfhL.js} +2 -2
- package/dist/vue-ui-history-plot-CrnTnpaM.js +1710 -0
- package/dist/{vue-ui-horizontal-bar-BgFHi6_7.js → vue-ui-horizontal-bar-DqvN3imH.js} +432 -420
- package/dist/{vue-ui-kpi-Cb8QJeaj.js → vue-ui-kpi-Mf318HvK.js} +2 -2
- package/dist/{vue-ui-label-ClMQ5Gez.js → vue-ui-label-C1UAzvAu.js} +1 -1
- package/dist/{vue-ui-mini-loader-DtPOVIkK.js → vue-ui-mini-loader-wGeACd-Y.js} +1 -1
- package/dist/{vue-ui-molecule-BzwMl-in.js → vue-ui-molecule-CaLReo4h.js} +346 -334
- package/dist/{vue-ui-mood-radar-BUR_YCcr.js → vue-ui-mood-radar-jkE2ENX5.js} +3 -3
- package/dist/{vue-ui-nested-donuts-BEB4nfsD.js → vue-ui-nested-donuts-BgMOKjil.js} +360 -348
- package/dist/vue-ui-onion-DBN3Ev4j.js +1247 -0
- package/dist/{vue-ui-parallel-coordinate-plot-CSO4johj.js → vue-ui-parallel-coordinate-plot-BcJzEGJ-.js} +387 -375
- package/dist/{vue-ui-quadrant-CKav0I6g.js → vue-ui-quadrant-BvoVlxTI.js} +418 -406
- package/dist/{vue-ui-quick-chart-BAQNS9_2.js → vue-ui-quick-chart-2hn8-F_C.js} +550 -538
- package/dist/{vue-ui-radar-ClPAgf5I.js → vue-ui-radar-O3AjGrc-.js} +330 -318
- package/dist/{vue-ui-rating-CWFMoYpE.js → vue-ui-rating-Criq0ofQ.js} +1 -1
- package/dist/{vue-ui-relation-circle-Da2MhrVe.js → vue-ui-relation-circle-CRnH2ikm.js} +3 -3
- package/dist/{vue-ui-ridgeline-D7gFs8yR.js → vue-ui-ridgeline-Blejn8LY.js} +3 -3
- package/dist/{vue-ui-rings-DkDJ0k5b.js → vue-ui-rings-C1U38Bp0.js} +321 -309
- package/dist/{vue-ui-scatter-yv4JzJID.js → vue-ui-scatter-DTsCc9hg.js} +584 -572
- package/dist/{vue-ui-skeleton-oFnh5zWs.js → vue-ui-skeleton-BPr3u7IL.js} +2 -2
- package/dist/{vue-ui-smiley-DJVusLnp.js → vue-ui-smiley-BIjAIpJ9.js} +1 -1
- package/dist/{vue-ui-spark-trend-IqZWPvSB.js → vue-ui-spark-trend-B7w4Mg8O.js} +3 -3
- package/dist/{vue-ui-sparkbar-_FW47iYj.js → vue-ui-sparkbar-lVDnYEYA.js} +3 -3
- package/dist/{vue-ui-sparkgauge--2vk2Y23.js → vue-ui-sparkgauge-BryoGCoc.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-CFEIPa5n.js → vue-ui-sparkhistogram-BdNoLb9L.js} +3 -3
- package/dist/{vue-ui-sparkline-Cs9CJR6W.js → vue-ui-sparkline-CNFD5K6z.js} +3 -3
- package/dist/vue-ui-sparkstackbar-CZ4tGL-_.js +750 -0
- package/dist/vue-ui-stackbar-DfsgaZy7.js +2369 -0
- package/dist/vue-ui-stackline-Cx7q2sGF.js +2483 -0
- package/dist/vue-ui-strip-plot-BcYhLPHM.js +1752 -0
- package/dist/{vue-ui-table-CiccGbRB.js → vue-ui-table-BzF75YjN.js} +3 -3
- package/dist/{vue-ui-table-heatmap-DnP3pzh2.js → vue-ui-table-heatmap-BSUab4fG.js} +1 -1
- package/dist/{vue-ui-table-sparkline-Bp7RiZh4.js → vue-ui-table-sparkline-B9ICTtoE.js} +2 -2
- package/dist/{vue-ui-thermometer-CawumQKP.js → vue-ui-thermometer-Am7llqdI.js} +3 -3
- package/dist/{vue-ui-timer-CXinMW7q.js → vue-ui-timer-D6EvkM31.js} +2 -2
- package/dist/{vue-ui-tiremarks-BnI2uhki.js → vue-ui-tiremarks-DiQJu8Em.js} +3 -3
- package/dist/{vue-ui-treemap-DTlFbfD6.js → vue-ui-treemap-wUZpijpr.js} +310 -298
- package/dist/vue-ui-waffle-6hO0flDT.js +1633 -0
- package/dist/{vue-ui-wheel-B02tiG0p.js → vue-ui-wheel-DnyCE0CK.js} +3 -3
- package/dist/{vue-ui-word-cloud-BZnCOMHx.js → vue-ui-word-cloud-D_MZ3gCS.js} +385 -372
- package/dist/{vue-ui-world-DO2VZ-T-.js → vue-ui-world-QNGY2WPz.js} +474 -462
- package/dist/{vue-ui-xy-CD6BiP_g.js → vue-ui-xy-BD-ighya.js} +2 -2
- package/dist/{vue-ui-xy-BC9GVdWE.js → vue-ui-xy-Ctcwn7Rk.js} +1447 -1432
- package/dist/{vue-ui-xy-canvas-DANPuyf4.js → vue-ui-xy-canvas-DUeglcdP.js} +523 -511
- package/package.json +1 -1
- package/dist/vue-ui-flow-qYAq3Rmn.js +0 -1217
- package/dist/vue-ui-galaxy-BVX-o2f-.js +0 -1085
- package/dist/vue-ui-history-plot-D-d-1ZiM.js +0 -1698
- package/dist/vue-ui-onion-CG6myK7a.js +0 -1235
- package/dist/vue-ui-sparkstackbar-Cvbue77A.js +0 -738
- package/dist/vue-ui-stackbar-C5ANS2hd.js +0 -2355
- package/dist/vue-ui-stackline-7yajJFW4.js +0 -2469
- package/dist/vue-ui-strip-plot-BT6Eqhup.js +0 -1740
- package/dist/vue-ui-waffle-CjgRkQAp.js +0 -1621
|
@@ -0,0 +1,1752 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, Ct as n, D as r, G as i, Lt as a, Pt as o, S as s, X as c, Xt as ee, Y as l, Yt as te, Z as ne, Zt as re, _ as ie, b as ae, en as oe, ht as se, i as ce, jt as le, lt as ue, nt as de, q as fe, t as pe, v as me, w as he, x as ge } from "./lib-Dql7cqyA.js";
|
|
3
|
+
import { n as _e, t as ve } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as ye } from "./useConfig-D32D002m.js";
|
|
5
|
+
import { t as be } from "./usePrinter-DISD7q5m.js";
|
|
6
|
+
import { n as xe, t as Se } from "./BaseScanner-Dzc8VT3j.js";
|
|
7
|
+
import { t as Ce } from "./useNestedProp-Chvyfpl-.js";
|
|
8
|
+
import { t as we } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as Te } from "./useChartExport-iwOqiIWX.js";
|
|
10
|
+
import { t as Ee } from "./useTransitions-g_zBREk2.js";
|
|
11
|
+
import { t as De } from "./useTimeLabelCollider-AEcY4Ioe.js";
|
|
12
|
+
import { t as Oe } from "./img-DhGApYG0.js";
|
|
13
|
+
import { n as ke } from "./Title-CPHi-evi.js";
|
|
14
|
+
import { t as Ae } from "./Shape-CIqU-p2F.js";
|
|
15
|
+
import { t as je } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
16
|
+
import { l as Me, t as Ne } from "./useResponsive-ZtArZtUf.js";
|
|
17
|
+
import { t as Pe } from "./DefGrad-DVBqDjhO.js";
|
|
18
|
+
import { t as Fe } from "./A11yDataTable-DdRsVULz.js";
|
|
19
|
+
import { t as Ie } from "./useUserOptionState-DK-_1ddE.js";
|
|
20
|
+
import { t as Le } from "./useChartAccessibility-DYqac8yF.js";
|
|
21
|
+
import { t as Re } from "./vue_ui_strip_plot-BaHbnnwN.js";
|
|
22
|
+
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createSlots as ze, createTextVNode as Be, createVNode as Ve, defineAsyncComponent as g, guardReactiveProps as _, mergeProps as He, nextTick as Ue, normalizeClass as We, normalizeProps as v, normalizeStyle as y, onBeforeUnmount as Ge, onMounted as Ke, openBlock as b, ref as x, renderList as S, renderSlot as C, resolveDynamicComponent as qe, shallowRef as Je, toDisplayString as w, toRefs as Ye, unref as T, watch as Xe, watchEffect as Ze, withCtx as E } from "vue";
|
|
23
|
+
//#region src/components/vue-ui-strip-plot.vue
|
|
24
|
+
var Qe = /* @__PURE__ */ e({ default: () => At }), $e = ["id"], et = ["id"], tt = { style: { position: "relative" } }, nt = [
|
|
25
|
+
"xmlns",
|
|
26
|
+
"viewBox",
|
|
27
|
+
"aria-describedby"
|
|
28
|
+
], rt = [
|
|
29
|
+
"x",
|
|
30
|
+
"y",
|
|
31
|
+
"width",
|
|
32
|
+
"height"
|
|
33
|
+
], it = { key: 1 }, at = { key: 0 }, ot = [
|
|
34
|
+
"x1",
|
|
35
|
+
"x2",
|
|
36
|
+
"y1",
|
|
37
|
+
"y2",
|
|
38
|
+
"stroke",
|
|
39
|
+
"stroke-width",
|
|
40
|
+
"stroke-dasharray"
|
|
41
|
+
], st = { key: 1 }, ct = [
|
|
42
|
+
"x1",
|
|
43
|
+
"x2",
|
|
44
|
+
"y1",
|
|
45
|
+
"y2",
|
|
46
|
+
"stroke",
|
|
47
|
+
"stroke-width",
|
|
48
|
+
"stroke-dasharray"
|
|
49
|
+
], lt = [
|
|
50
|
+
"x1",
|
|
51
|
+
"x2",
|
|
52
|
+
"y1",
|
|
53
|
+
"y2",
|
|
54
|
+
"stroke",
|
|
55
|
+
"stroke-width"
|
|
56
|
+
], ut = [
|
|
57
|
+
"x1",
|
|
58
|
+
"x2",
|
|
59
|
+
"y1",
|
|
60
|
+
"y2",
|
|
61
|
+
"stroke",
|
|
62
|
+
"stroke-width"
|
|
63
|
+
], dt = [
|
|
64
|
+
"transform",
|
|
65
|
+
"fill",
|
|
66
|
+
"font-size"
|
|
67
|
+
], ft = [
|
|
68
|
+
"transform",
|
|
69
|
+
"font-size",
|
|
70
|
+
"fill",
|
|
71
|
+
"text-anchor"
|
|
72
|
+
], pt = [
|
|
73
|
+
"transform",
|
|
74
|
+
"font-size",
|
|
75
|
+
"fill",
|
|
76
|
+
"text-anchor",
|
|
77
|
+
"innerHTML"
|
|
78
|
+
], mt = [
|
|
79
|
+
"fill",
|
|
80
|
+
"font-size",
|
|
81
|
+
"transform"
|
|
82
|
+
], ht = [
|
|
83
|
+
"fill",
|
|
84
|
+
"font-size",
|
|
85
|
+
"x",
|
|
86
|
+
"y"
|
|
87
|
+
], gt = [
|
|
88
|
+
"x1",
|
|
89
|
+
"x2",
|
|
90
|
+
"y1",
|
|
91
|
+
"y2",
|
|
92
|
+
"stroke"
|
|
93
|
+
], _t = [
|
|
94
|
+
"cx",
|
|
95
|
+
"cy",
|
|
96
|
+
"fill"
|
|
97
|
+
], vt = [
|
|
98
|
+
"cx",
|
|
99
|
+
"cy",
|
|
100
|
+
"fill"
|
|
101
|
+
], yt = [
|
|
102
|
+
"d",
|
|
103
|
+
"fill",
|
|
104
|
+
"stroke",
|
|
105
|
+
"fill-opacity",
|
|
106
|
+
"stroke-opacity",
|
|
107
|
+
"stroke-width",
|
|
108
|
+
"onMouseenter"
|
|
109
|
+
], bt = [
|
|
110
|
+
"x1",
|
|
111
|
+
"x2",
|
|
112
|
+
"y1",
|
|
113
|
+
"y2",
|
|
114
|
+
"stroke",
|
|
115
|
+
"stroke-opacity",
|
|
116
|
+
"stroke-width"
|
|
117
|
+
], xt = ["onMouseenter"], St = [
|
|
118
|
+
"x1",
|
|
119
|
+
"x2",
|
|
120
|
+
"y1",
|
|
121
|
+
"y2",
|
|
122
|
+
"stroke",
|
|
123
|
+
"stroke-width"
|
|
124
|
+
], Ct = [
|
|
125
|
+
"x",
|
|
126
|
+
"y",
|
|
127
|
+
"width",
|
|
128
|
+
"height",
|
|
129
|
+
"fill",
|
|
130
|
+
"stroke",
|
|
131
|
+
"stroke-width",
|
|
132
|
+
"rx"
|
|
133
|
+
], wt = [
|
|
134
|
+
"cx",
|
|
135
|
+
"cy",
|
|
136
|
+
"r",
|
|
137
|
+
"fill",
|
|
138
|
+
"stroke"
|
|
139
|
+
], Tt = { key: 1 }, Et = [
|
|
140
|
+
"x",
|
|
141
|
+
"y",
|
|
142
|
+
"font-size",
|
|
143
|
+
"fill"
|
|
144
|
+
], Dt = {
|
|
145
|
+
key: 0,
|
|
146
|
+
style: {
|
|
147
|
+
position: "absolute",
|
|
148
|
+
top: "100%",
|
|
149
|
+
left: "0",
|
|
150
|
+
width: "100%"
|
|
151
|
+
},
|
|
152
|
+
"data-dom-to-png-ignore": "",
|
|
153
|
+
"aria-hidden": "true"
|
|
154
|
+
}, Ot = {
|
|
155
|
+
key: 5,
|
|
156
|
+
class: "vue-data-ui-watermark"
|
|
157
|
+
}, kt = { style: {
|
|
158
|
+
display: "flex",
|
|
159
|
+
"align-items": "center"
|
|
160
|
+
} }, At = /*#__PURE__*/ je({
|
|
161
|
+
__name: "vue-ui-strip-plot",
|
|
162
|
+
props: {
|
|
163
|
+
config: {
|
|
164
|
+
type: Object,
|
|
165
|
+
default() {
|
|
166
|
+
return {};
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
dataset: {
|
|
170
|
+
type: Array,
|
|
171
|
+
default() {
|
|
172
|
+
return [];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
emits: ["selectDatapoint", "copyAlt"],
|
|
177
|
+
setup(e, { expose: je, emit: Qe }) {
|
|
178
|
+
let At = g(() => import("./Tooltip-hhrkQ3Lk.js")), jt = g(() => import("./BaseIcon-D8R6_sKH.js").then((e) => e.n)), Mt = g(() => import("./vue-ui-accordion-DmkL8A59.js").then((e) => e.n)), Nt = g(() => import("./DataTable-oiM9uWrQ.js")), Pt = g(() => import("./UserOptions-2x4VklMW.js").then((e) => e.n)), Ft = g(() => import("./PenAndPaper-KFzKlvbi.js").then((e) => e.t)), It = g(() => import("./PackageVersion-KBMdaOXg.js").then((e) => e.t)), Lt = g(() => import("./BaseDraggableDialog-Gm4Q30j0.js").then((e) => e.n)), Rt = [
|
|
179
|
+
"classic",
|
|
180
|
+
"scatter",
|
|
181
|
+
"violin"
|
|
182
|
+
], { vue_ui_strip_plot: zt } = ye(), { isThemeValid: Bt, warnInvalidTheme: Vt } = we(), D = e, Ht = Qe, Ut = d({
|
|
183
|
+
get() {
|
|
184
|
+
return !!D.dataset && D.dataset.length;
|
|
185
|
+
},
|
|
186
|
+
set(e) {
|
|
187
|
+
return e;
|
|
188
|
+
}
|
|
189
|
+
}), Wt = x(fe()), Gt = x(0), Kt = x(!1), qt = x(""), O = x(null), Jt = x(null), Yt = x(null), Xt = x(null), Zt = x(!1), Qt = x(0), $t = x(0), en = x(null), tn = x(null), nn = x(null), rn = x(null), an = x(null), on = x(null), sn = x(null), cn = x(null), k = x("pointer"), ln = x({
|
|
190
|
+
x: 0,
|
|
191
|
+
y: 0
|
|
192
|
+
}), un = x(!1), A = x(bn()), j = d(() => A.value.userOptions), M = d(() => A.value.style.chart.tooltip), N = d(() => A.value.style.chart.labels), P = d(() => A.value.style.chart.violin), F = d(() => A.value.style.chart.grid), I = d(() => A.value.style.chart);
|
|
193
|
+
_e({
|
|
194
|
+
config: () => A.value,
|
|
195
|
+
dataset: () => D.dataset,
|
|
196
|
+
component: "VueUiStripPlot",
|
|
197
|
+
rules: [ve.emptyArray, {
|
|
198
|
+
test: (e) => e.length > 12,
|
|
199
|
+
message: [
|
|
200
|
+
"👀 The number of series is > 12. Consider:",
|
|
201
|
+
"",
|
|
202
|
+
"▶️ Using filters to let users choose a maximum number of series to display.",
|
|
203
|
+
"",
|
|
204
|
+
"▶️ Using multiple instances of the chart to display related series."
|
|
205
|
+
]
|
|
206
|
+
}]
|
|
207
|
+
});
|
|
208
|
+
let { transitionEnabled: dn } = Ee({
|
|
209
|
+
config: () => A.value.transitions,
|
|
210
|
+
dataset: () => D.dataset
|
|
211
|
+
}), fn = d(() => xn(A.value.type)), L = d(() => A.value.userOptions.useCursorPointer), pn = d(() => re({
|
|
212
|
+
defaultConfig: {
|
|
213
|
+
userOptions: { show: !1 },
|
|
214
|
+
table: { show: !1 },
|
|
215
|
+
style: { chart: {
|
|
216
|
+
backgroundColor: "#99999930",
|
|
217
|
+
padding: {
|
|
218
|
+
top: 24,
|
|
219
|
+
left: 24,
|
|
220
|
+
right: 24,
|
|
221
|
+
bottom: 24
|
|
222
|
+
},
|
|
223
|
+
grid: {
|
|
224
|
+
stroke: "#6A6A6A",
|
|
225
|
+
horizontalGrid: { stroke: "#6A6A6A" },
|
|
226
|
+
verticalGrid: { stroke: "#6A6A6A" }
|
|
227
|
+
},
|
|
228
|
+
plots: { stroke: "#6A6A6A" },
|
|
229
|
+
labels: {
|
|
230
|
+
bestPlotLabel: { show: !1 },
|
|
231
|
+
axis: {
|
|
232
|
+
xLabel: "",
|
|
233
|
+
yLabel: ""
|
|
234
|
+
},
|
|
235
|
+
xAxisLabels: { show: !1 },
|
|
236
|
+
yAxisLabels: { show: !1 }
|
|
237
|
+
}
|
|
238
|
+
} }
|
|
239
|
+
},
|
|
240
|
+
userConfig: A.value.skeletonConfig ?? {}
|
|
241
|
+
})), { loading: mn, FINAL_DATASET: hn, manualLoading: gn } = xe({
|
|
242
|
+
...Ye(D),
|
|
243
|
+
FINAL_CONFIG: A,
|
|
244
|
+
prepareConfig: bn,
|
|
245
|
+
skeletonDataset: D.config?.skeletonDataset ?? [
|
|
246
|
+
{
|
|
247
|
+
name: "_",
|
|
248
|
+
color: "#DBDBDB",
|
|
249
|
+
plots: [
|
|
250
|
+
{
|
|
251
|
+
name: "_",
|
|
252
|
+
value: 1
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: "_",
|
|
256
|
+
value: 2
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
name: "_",
|
|
260
|
+
value: 3
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
name: "_",
|
|
266
|
+
color: "#C4C4C4",
|
|
267
|
+
plots: [
|
|
268
|
+
{
|
|
269
|
+
name: "_",
|
|
270
|
+
value: 3
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
name: "_",
|
|
274
|
+
value: 5
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: "_",
|
|
278
|
+
value: 8
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
name: "_",
|
|
284
|
+
color: "#ADADAD",
|
|
285
|
+
plots: [
|
|
286
|
+
{
|
|
287
|
+
name: "_",
|
|
288
|
+
value: 8
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: "_",
|
|
292
|
+
value: 13
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
name: "_",
|
|
296
|
+
value: 21
|
|
297
|
+
}
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: "_",
|
|
302
|
+
color: "#969696",
|
|
303
|
+
plots: [
|
|
304
|
+
{
|
|
305
|
+
name: "_",
|
|
306
|
+
value: 21
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
name: "_",
|
|
310
|
+
value: 34
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
name: "_",
|
|
314
|
+
value: 55
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
name: "_",
|
|
320
|
+
color: "#808080",
|
|
321
|
+
plots: [
|
|
322
|
+
{
|
|
323
|
+
name: "_",
|
|
324
|
+
value: 55
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
name: "_",
|
|
328
|
+
value: 89
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
name: "_",
|
|
332
|
+
value: 144
|
|
333
|
+
}
|
|
334
|
+
]
|
|
335
|
+
}
|
|
336
|
+
],
|
|
337
|
+
skeletonConfig: re({
|
|
338
|
+
defaultConfig: A.value,
|
|
339
|
+
userConfig: pn.value
|
|
340
|
+
})
|
|
341
|
+
}), { userOptionsVisible: _n, setUserOptionsVisibility: vn, keepUserOptionState: yn } = Ie({ config: A.value }), { svgRef: R } = Le({ config: I.value.title });
|
|
342
|
+
function bn() {
|
|
343
|
+
let e = Ce({
|
|
344
|
+
userConfig: D.config,
|
|
345
|
+
defaultConfig: zt
|
|
346
|
+
}), t = e.theme;
|
|
347
|
+
if (!t) return e;
|
|
348
|
+
if (!Bt.value(e)) return Vt(e), e;
|
|
349
|
+
let n = Ce({
|
|
350
|
+
userConfig: Re[t] || D.config,
|
|
351
|
+
defaultConfig: e
|
|
352
|
+
}), r = Ce({
|
|
353
|
+
userConfig: D.config,
|
|
354
|
+
defaultConfig: n
|
|
355
|
+
});
|
|
356
|
+
return {
|
|
357
|
+
...r,
|
|
358
|
+
customPalette: r.customPalette.length ? r.customPalette : te[t] || a
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
function xn(e) {
|
|
362
|
+
return Rt.includes(e) ? e : "classic";
|
|
363
|
+
}
|
|
364
|
+
function Sn(e) {
|
|
365
|
+
let t = ne(e);
|
|
366
|
+
return t?.style?.chart && delete t.style.chart.tooltip, JSON.stringify(t);
|
|
367
|
+
}
|
|
368
|
+
let Cn = Sn(D.config);
|
|
369
|
+
Xe(() => D.config, async (e, t) => {
|
|
370
|
+
let n = Sn(e), r = n !== Cn;
|
|
371
|
+
Cn = n;
|
|
372
|
+
let i = bn();
|
|
373
|
+
if (!r) {
|
|
374
|
+
A.value.style.chart.tooltip = i.style.chart.tooltip, U.value.showTooltip = A.value.style.chart.tooltip.show;
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
mn.value || (A.value = i), _n.value = !A.value.userOptions.showOnChartHover, Tn(), Qt.value += 1, $t.value += 1, U.value.dataLabels.show = N.value.bestPlotLabel.show, U.value.showTable = A.value.table.show, U.value.showTooltip = M.value.show, V.value = I.value.width, H.value = I.value.height, Fn.value = I.value.plots.radius;
|
|
378
|
+
}, { deep: !0 }), Xe(() => D.dataset, (e) => {
|
|
379
|
+
Array.isArray(e) && e.length > 0 && (gn.value = !1);
|
|
380
|
+
}, { deep: !0 });
|
|
381
|
+
let z = Je(null), B = Je(null);
|
|
382
|
+
Ke(() => {
|
|
383
|
+
Tn();
|
|
384
|
+
});
|
|
385
|
+
let wn = d(() => A.value.debug);
|
|
386
|
+
function Tn() {
|
|
387
|
+
if (o(D.dataset) ? (de({
|
|
388
|
+
componentName: "VueUiStripPlot",
|
|
389
|
+
type: "dataset",
|
|
390
|
+
debug: wn.value
|
|
391
|
+
}), gn.value = !0) : D.dataset.forEach((e, t) => {
|
|
392
|
+
se({
|
|
393
|
+
datasetObject: e,
|
|
394
|
+
requiredAttributes: ["name", "plots"]
|
|
395
|
+
}).forEach((e) => {
|
|
396
|
+
Ut.value = !1, de({
|
|
397
|
+
componentName: "VueUiStripPlot",
|
|
398
|
+
type: "datasetSerieAttribute",
|
|
399
|
+
property: e,
|
|
400
|
+
index: t,
|
|
401
|
+
debug: wn.value
|
|
402
|
+
});
|
|
403
|
+
}), e.plots && e.plots.forEach((e, n) => {
|
|
404
|
+
se({
|
|
405
|
+
datasetObject: e,
|
|
406
|
+
requiredAttributes: ["name", "value"]
|
|
407
|
+
}).forEach((e) => {
|
|
408
|
+
Ut.value = !1, de({
|
|
409
|
+
componentName: "VueUiStripPlot",
|
|
410
|
+
type: "datasetSerieAttribute",
|
|
411
|
+
property: e,
|
|
412
|
+
index: `${t},${n}`,
|
|
413
|
+
debug: wn.value
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
});
|
|
417
|
+
}), o(D.dataset) || (gn.value = A.value.loading), A.value.responsive) {
|
|
418
|
+
let e = Me(() => {
|
|
419
|
+
let { width: e, height: t } = Ne({
|
|
420
|
+
chart: O.value,
|
|
421
|
+
title: I.value.title.text ? Jt.value : null,
|
|
422
|
+
source: Yt.value,
|
|
423
|
+
noTitle: Xt.value
|
|
424
|
+
});
|
|
425
|
+
requestAnimationFrame(() => {
|
|
426
|
+
Pn.value = t, V.value = Math.max(.1, e), H.value = Math.max(.1, t - 12), A.value.responsiveProportionalSizing ? Fn.value = ee({
|
|
427
|
+
relator: Math.min(t, e),
|
|
428
|
+
adjuster: 600,
|
|
429
|
+
source: I.value.plots.radius,
|
|
430
|
+
threshold: 6,
|
|
431
|
+
fallback: 6
|
|
432
|
+
}) : Fn.value = I.value.plots.radius;
|
|
433
|
+
});
|
|
434
|
+
});
|
|
435
|
+
z.value && (B.value && z.value.unobserve(B.value), z.value.disconnect()), z.value = new ResizeObserver(e), B.value = O.value.parentNode, z.value.observe(B.value);
|
|
436
|
+
}
|
|
437
|
+
Zt.value = !0, setTimeout(() => {
|
|
438
|
+
Mn.value = !1;
|
|
439
|
+
}, Un.value * 50);
|
|
440
|
+
}
|
|
441
|
+
Ge(() => {
|
|
442
|
+
z.value && (B.value && z.value.unobserve(B.value), z.value.disconnect());
|
|
443
|
+
});
|
|
444
|
+
let { isPrinting: En, isImaging: Dn, generatePdf: On, generateImage: kn } = be({
|
|
445
|
+
elementId: `strip-plot_${Wt.value}`,
|
|
446
|
+
fileName: I.value.title.text || "vue-ui-strip-plot",
|
|
447
|
+
options: A.value.userOptions.print
|
|
448
|
+
}), An = d(() => A.value.userOptions.show && !I.value.title.text), jn = d(() => he(A.value.customPalette)), Mn = x(A.value.useCssAnimation), Nn = x({
|
|
449
|
+
top: I.value.padding.top,
|
|
450
|
+
bottom: I.value.padding.bottom,
|
|
451
|
+
left: I.value.padding.left,
|
|
452
|
+
right: I.value.padding.right
|
|
453
|
+
}), V = x(I.value.width), H = x(I.value.height), Pn = x(I.value.height), Fn = x(I.value.plots.radius), U = x({
|
|
454
|
+
showTable: A.value.table.show,
|
|
455
|
+
dataLabels: { show: N.value.bestPlotLabel.show },
|
|
456
|
+
showTooltip: M.value.show
|
|
457
|
+
});
|
|
458
|
+
Xe(A, () => {
|
|
459
|
+
U.value = {
|
|
460
|
+
showTable: A.value.table.show,
|
|
461
|
+
dataLabels: { show: N.value.bestPlotLabel.show },
|
|
462
|
+
showTooltip: M.value.show
|
|
463
|
+
}, V.value = I.value.width, H.value = I.value.height, Fn.value = I.value.plots.radius;
|
|
464
|
+
}, { immediate: !0 });
|
|
465
|
+
let W = d(() => Math.min(Fn.value, K.value.stripWidth / 2 * .9));
|
|
466
|
+
function G(e) {
|
|
467
|
+
return Number.isFinite(e) ? Number(e.toFixed(2)) : 0;
|
|
468
|
+
}
|
|
469
|
+
function In() {
|
|
470
|
+
return Math.max(0, (K.value.stripWidth / 2 - W.value * 1.8) * .86) * Math.min(1, P.value.widthRatio);
|
|
471
|
+
}
|
|
472
|
+
function Ln() {
|
|
473
|
+
let e = 0;
|
|
474
|
+
on.value && (e = Array.from(on.value.querySelectorAll("text")).reduce((e, t) => {
|
|
475
|
+
let n = t.getComputedTextLength();
|
|
476
|
+
return n > e ? n : e;
|
|
477
|
+
}, 0));
|
|
478
|
+
let t = rn.value ? rn.value.getBoundingClientRect().width : 0;
|
|
479
|
+
return e + t + (t ? 24 : 0);
|
|
480
|
+
}
|
|
481
|
+
let Rn = x(0), zn = Me((e) => {
|
|
482
|
+
Rn.value = e;
|
|
483
|
+
}, 100);
|
|
484
|
+
Ze((e) => {
|
|
485
|
+
let t = an.value;
|
|
486
|
+
if (!t) return;
|
|
487
|
+
let n = new ResizeObserver((e) => {
|
|
488
|
+
zn(e[0].contentRect.height);
|
|
489
|
+
});
|
|
490
|
+
n.observe(t), e(() => n.disconnect());
|
|
491
|
+
}), Ge(() => {
|
|
492
|
+
Rn.value = 0;
|
|
493
|
+
});
|
|
494
|
+
let Bn = d(() => {
|
|
495
|
+
let e = 0;
|
|
496
|
+
nn.value && (e = nn.value.getBBox().height + N.value.axis.fontSize / 3 + 12 + N.value.axis.xLabelOffsetY);
|
|
497
|
+
let t = 0;
|
|
498
|
+
return an.value && (t = Rn.value + 12), e + t;
|
|
499
|
+
}), K = d(() => {
|
|
500
|
+
let e = Ln(), t = Nn.value.left + e + N.value.axis.yLabelOffsetX + 5, n = V.value - Nn.value.right, r = Math.max(0, n - t), i = Nn.value.top + I.value.plots.radius + N.value.bestPlotLabel.fontSize, a = H.value - Nn.value.bottom - Bn.value, o = Math.max(0, a - i), s = Array.isArray(hn.value) ? hn.value.length : 0;
|
|
501
|
+
return {
|
|
502
|
+
left: t,
|
|
503
|
+
right: n,
|
|
504
|
+
top: i,
|
|
505
|
+
bottom: a,
|
|
506
|
+
width: r,
|
|
507
|
+
height: o,
|
|
508
|
+
stripWidth: s > 0 ? r / s : 0,
|
|
509
|
+
absoluteHeight: H.value
|
|
510
|
+
};
|
|
511
|
+
});
|
|
512
|
+
function Vn(e) {
|
|
513
|
+
return K.value.left + (e + 1) * K.value.stripWidth - K.value.stripWidth / 2;
|
|
514
|
+
}
|
|
515
|
+
let Hn = d(() => hn.value.map((e, t) => {
|
|
516
|
+
let n = fe();
|
|
517
|
+
return {
|
|
518
|
+
...e,
|
|
519
|
+
id: n,
|
|
520
|
+
color: e.color ? s(e.color) : jn.value[t] || a[t] || a[t % a.length],
|
|
521
|
+
plots: e.plots.map((r, i) => ({
|
|
522
|
+
...r,
|
|
523
|
+
value: ae(r.value),
|
|
524
|
+
parentId: n,
|
|
525
|
+
parentName: e.name,
|
|
526
|
+
parentIndex: t,
|
|
527
|
+
plotIndex: i,
|
|
528
|
+
color: e.color ? s(e.color) : jn.value[t] || a[t] || a[t % a.length],
|
|
529
|
+
id: fe()
|
|
530
|
+
})).sort((e, t) => e.value - t.value)
|
|
531
|
+
};
|
|
532
|
+
})), q = d(() => (Hn.value || []).map((e, t) => ({
|
|
533
|
+
...e,
|
|
534
|
+
plots: e.plots.map((e) => ({
|
|
535
|
+
...e,
|
|
536
|
+
x: Vn(t)
|
|
537
|
+
}))
|
|
538
|
+
}))), Un = d(() => Math.max(...q.value.map((e) => e.plots.length))), Wn = d(() => {
|
|
539
|
+
let e = q.value.flatMap((e) => e.plots.map((e) => e.value));
|
|
540
|
+
return {
|
|
541
|
+
max: Math.max(...e),
|
|
542
|
+
min: Math.min(...e)
|
|
543
|
+
};
|
|
544
|
+
}), Gn = d(() => {
|
|
545
|
+
let e = F.value.scaleMin, t = F.value.scaleMax, n = Math.max(2, F.value.scaleSteps), r = Wn.value.min < 0 ? Wn.value.min : 0, i = Wn.value.max;
|
|
546
|
+
if (e === null && t === null) return ie(r, i, n);
|
|
547
|
+
if (e !== null && t !== null) return me(e, t, n);
|
|
548
|
+
let a = ie(e === null ? r : e, t === null ? i : t, n);
|
|
549
|
+
return me(e === null ? a.min : e, t === null ? a.max : t, n);
|
|
550
|
+
});
|
|
551
|
+
function J(e) {
|
|
552
|
+
let t = Gn.value.max - Gn.value.min;
|
|
553
|
+
return t ? K.value.bottom - (e - Gn.value.min) / t * K.value.height : K.value.bottom;
|
|
554
|
+
}
|
|
555
|
+
let Y = d(() => (q.value || []).map((e, t) => {
|
|
556
|
+
let n = e.plots.map((e) => ({
|
|
557
|
+
...e,
|
|
558
|
+
y: J(e.value)
|
|
559
|
+
})), r = fn.value === "classic" ? n.map(() => 0) : Xn(n);
|
|
560
|
+
return {
|
|
561
|
+
...e,
|
|
562
|
+
plots: n.map((e, t) => ({
|
|
563
|
+
...e,
|
|
564
|
+
x: e.x + r[t]
|
|
565
|
+
}))
|
|
566
|
+
};
|
|
567
|
+
})), X = d(() => fn.value === "violin" && !!P.value?.boxPlot?.show);
|
|
568
|
+
function Kn(e, t) {
|
|
569
|
+
if (!e.length) return 0;
|
|
570
|
+
if (e.length === 1) return e[0];
|
|
571
|
+
let n = (e.length - 1) * t, r = Math.floor(n), i = n - r, a = e[r + 1];
|
|
572
|
+
return a === void 0 ? e[r] : e[r] + i * (a - e[r]);
|
|
573
|
+
}
|
|
574
|
+
let qn = d(() => X.value ? Y.value.map((e, t) => {
|
|
575
|
+
let n = e.plots.map((e) => e.value).sort((e, t) => e - t), r = Kn(n, .25), i = Kn(n, .5), a = Kn(n, .75), o = a - r, s = r - o * 1.5, c = a + o * 1.5, ee = n.find((e) => e >= s), l = n.slice().reverse().find((e) => e <= c), te = Vn(t), ne = Math.max(W.value * 2.8, Math.min(In() * .32, K.value.stripWidth * .12)) * Math.min(1.5, P.value.boxPlot.widthRatio);
|
|
576
|
+
return {
|
|
577
|
+
id: e.id,
|
|
578
|
+
boxPlotColor: P.value.boxPlot.useSerieColor ? e.color : P.value.boxPlot.color,
|
|
579
|
+
color: e.color,
|
|
580
|
+
name: e.name,
|
|
581
|
+
count: n.length,
|
|
582
|
+
lowerAdjacent: ee ?? n[0],
|
|
583
|
+
q1: r,
|
|
584
|
+
median: i,
|
|
585
|
+
q3: a,
|
|
586
|
+
upperAdjacent: l ?? n[n.length - 1],
|
|
587
|
+
iqr: o,
|
|
588
|
+
lowerFence: s,
|
|
589
|
+
upperFence: c,
|
|
590
|
+
centerX: te,
|
|
591
|
+
boxLeft: te - ne / 2,
|
|
592
|
+
boxWidth: ne,
|
|
593
|
+
q1Y: J(r),
|
|
594
|
+
medianY: J(i),
|
|
595
|
+
q3Y: J(a),
|
|
596
|
+
lowerY: J(ee ?? n[0]),
|
|
597
|
+
upperY: J(l ?? n[n.length - 1])
|
|
598
|
+
};
|
|
599
|
+
}) : []), Jn = d(() => [
|
|
600
|
+
A.value.table.columnNames.series,
|
|
601
|
+
P.value.tooltipLabels.lowerAdjacent,
|
|
602
|
+
P.value.tooltipLabels.q1,
|
|
603
|
+
P.value.tooltipLabels.median,
|
|
604
|
+
P.value.tooltipLabels.q3,
|
|
605
|
+
P.value.tooltipLabels.upperAdjacent,
|
|
606
|
+
P.value.tooltipLabels.iqr,
|
|
607
|
+
P.value.tooltipLabels.count
|
|
608
|
+
]);
|
|
609
|
+
function Yn(e) {
|
|
610
|
+
return c({
|
|
611
|
+
p: N.value.prefix,
|
|
612
|
+
v: e,
|
|
613
|
+
s: N.value.suffix,
|
|
614
|
+
r: A.value.table.td.roundingValue
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
function Xn(e) {
|
|
618
|
+
let t = fn.value === "violin" ? Math.max(0, In() - W.value * 1.15) : Math.max(0, K.value.stripWidth / 2 - W.value * 1.5);
|
|
619
|
+
if (!e.length || !t) return e.map(() => 0);
|
|
620
|
+
let n = e.map(() => 0), r = W.value * 2.1, i = Math.min(t, r), a = [0];
|
|
621
|
+
for (let e = i; e <= t + i / 2; e += i) a.push(-Math.min(e, t)), a.push(Math.min(e, t));
|
|
622
|
+
let o = [];
|
|
623
|
+
return e.forEach((e, t) => {
|
|
624
|
+
let i = a.find((t) => o.every((n) => {
|
|
625
|
+
let i = t - n.offset, a = e.y - n.y;
|
|
626
|
+
return Math.hypot(i, a) >= r;
|
|
627
|
+
})) ?? 0;
|
|
628
|
+
n[t] = i, o.push({
|
|
629
|
+
y: e.y,
|
|
630
|
+
offset: i
|
|
631
|
+
});
|
|
632
|
+
}), n;
|
|
633
|
+
}
|
|
634
|
+
let Zn = d(() => fn.value === "violin" ? Y.value.map((e, t) => ({
|
|
635
|
+
id: e.id,
|
|
636
|
+
color: P.value.useSerieColor ? e.color : P.value.stroke,
|
|
637
|
+
fill: P.value.useSerieColor ? e.color : P.value.fill,
|
|
638
|
+
path: Qn(e.plots, t),
|
|
639
|
+
connectors: $n(e.plots, t)
|
|
640
|
+
})) : []);
|
|
641
|
+
function Qn(e, t) {
|
|
642
|
+
let n = In();
|
|
643
|
+
if (!e.length || !K.value.height || !n) return "";
|
|
644
|
+
let r = Vn(t), i = e.map((e) => e.y), a = Z(i), o = tr({
|
|
645
|
+
yValues: i,
|
|
646
|
+
bandwidth: a
|
|
647
|
+
});
|
|
648
|
+
return o.length > 1 ? o.map((e) => rr({
|
|
649
|
+
yValues: e,
|
|
650
|
+
centerX: r,
|
|
651
|
+
maxWidth: er({
|
|
652
|
+
clusterLength: e.length,
|
|
653
|
+
totalLength: i.length,
|
|
654
|
+
maxWidth: n
|
|
655
|
+
}),
|
|
656
|
+
bandwidth: Z(e)
|
|
657
|
+
})).join(" ") : rr({
|
|
658
|
+
yValues: i,
|
|
659
|
+
centerX: r,
|
|
660
|
+
maxWidth: n,
|
|
661
|
+
bandwidth: a
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
function $n(e, t) {
|
|
665
|
+
if (!e.length) return [];
|
|
666
|
+
let n = Vn(t), r = e.map((e) => e.y), i = tr({
|
|
667
|
+
yValues: r,
|
|
668
|
+
bandwidth: Z(r)
|
|
669
|
+
});
|
|
670
|
+
return i.length < 2 ? [] : i.slice(1).map((e, t) => {
|
|
671
|
+
let r = i[t], a = Z(r), o = Z(e), s = ge(Math.max(...r) + a * 2.35, K.value.top, K.value.bottom), c = ge(Math.min(...e) - o * 2.35, K.value.top, K.value.bottom);
|
|
672
|
+
return {
|
|
673
|
+
x: G(n),
|
|
674
|
+
y1: G(s),
|
|
675
|
+
y2: G(c)
|
|
676
|
+
};
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
function er({ clusterLength: e, totalLength: t, maxWidth: n }) {
|
|
680
|
+
let r = (e / t) ** .6, i = e <= 2 ? .72 : 1;
|
|
681
|
+
return Math.max(W.value * 2.2, n * ge(r * i, .18, 1));
|
|
682
|
+
}
|
|
683
|
+
function Z(e) {
|
|
684
|
+
let t = e.reduce((e, t) => e + t, 0) / Math.max(1, e.length), n = e.reduce((e, n) => e + (n - t) ** 2, 0) / Math.max(1, e.length), r = Math.sqrt(n), i = e.length < 2 ? Math.max(W.value * 2.6, K.value.height / 48) : W.value * 2.1;
|
|
685
|
+
return ge(1.06 * r * e.length ** -.2, i, K.value.height / 5);
|
|
686
|
+
}
|
|
687
|
+
function tr({ yValues: e, bandwidth: t }) {
|
|
688
|
+
if (e.length < 2) return [e];
|
|
689
|
+
let n = [...e].sort((e, t) => e - t), r = Math.max(t * 1.45, W.value * 5), i = [], a = [n[0]];
|
|
690
|
+
for (let e = 1; e < n.length; e += 1) Math.abs(n[e] - n[e - 1]) > r ? (i.push(a), a = [n[e]]) : a.push(n[e]);
|
|
691
|
+
return i.push(a), nr(i);
|
|
692
|
+
}
|
|
693
|
+
function nr(e) {
|
|
694
|
+
return e.reduce((e, t) => {
|
|
695
|
+
let n = e[e.length - 1];
|
|
696
|
+
if (!n) return e.push(t), e;
|
|
697
|
+
let r = Z(n), i = Z(t);
|
|
698
|
+
return Math.max(...n) + r * 2.35 >= Math.min(...t) - i * 2.35 ? n.push(...t) : e.push(t), e;
|
|
699
|
+
}, []);
|
|
700
|
+
}
|
|
701
|
+
function rr({ yValues: e, centerX: t, maxWidth: n, bandwidth: r }) {
|
|
702
|
+
let i = ge(Math.min(...e) - r * 2.35, K.value.top, K.value.bottom), a = ge(Math.max(...e) + r * 2.35, K.value.top, K.value.bottom), o = Math.max(48, Math.min(120, Math.round((a - i) / Math.max(1, r / 4)))), s = Array.from({ length: o }, (t, n) => {
|
|
703
|
+
let s = i + (a - i) * n / Math.max(1, o - 1);
|
|
704
|
+
return {
|
|
705
|
+
y: s,
|
|
706
|
+
density: e.reduce((e, t) => {
|
|
707
|
+
let n = (s - t) / r;
|
|
708
|
+
return e + Math.exp(-.5 * n * n);
|
|
709
|
+
}, 0)
|
|
710
|
+
};
|
|
711
|
+
}), c = Math.max(...s.map((e) => e.density));
|
|
712
|
+
if (!c) return "";
|
|
713
|
+
let ee = s.map((e, t) => {
|
|
714
|
+
let r = t === 0 || t === s.length - 1 ? 0 : e.density / c * n;
|
|
715
|
+
return {
|
|
716
|
+
y: G(e.y),
|
|
717
|
+
width: G(r)
|
|
718
|
+
};
|
|
719
|
+
}), l = ee.map((e) => ({
|
|
720
|
+
x: G(t - e.width),
|
|
721
|
+
y: e.y
|
|
722
|
+
})), te = ee.slice(0, -1).reverse().map((e) => ({
|
|
723
|
+
x: G(t + e.width),
|
|
724
|
+
y: e.y
|
|
725
|
+
}));
|
|
726
|
+
return `${ir([...l, ...te])} Z`;
|
|
727
|
+
}
|
|
728
|
+
function ir(e) {
|
|
729
|
+
if (!e.length) return "";
|
|
730
|
+
if (e.length === 1) return `M ${e[0].x} ${e[0].y}`;
|
|
731
|
+
let t = `M ${e[0].x} ${e[0].y}`;
|
|
732
|
+
for (let n = 1; n < e.length - 1; n += 1) {
|
|
733
|
+
let r = e[n], i = e[n + 1], a = G((r.x + i.x) / 2), o = G((r.y + i.y) / 2);
|
|
734
|
+
t += ` Q ${r.x} ${r.y} ${a} ${o}`;
|
|
735
|
+
}
|
|
736
|
+
let n = e[e.length - 1];
|
|
737
|
+
return `${t} L ${n.x} ${n.y}`;
|
|
738
|
+
}
|
|
739
|
+
let ar = d(() => Gn.value.ticks.map((e) => ({
|
|
740
|
+
y: J(e),
|
|
741
|
+
x1: K.value.left,
|
|
742
|
+
x2: K.value.right,
|
|
743
|
+
value: e
|
|
744
|
+
}))), or = x(null), Q = x(null);
|
|
745
|
+
function sr({ datapoint: e, seriesIndex: t }) {
|
|
746
|
+
k.value !== "keyboard" && (Kt.value = !1, Q.value = null, A.value.events.datapointLeave && A.value.events.datapointLeave({
|
|
747
|
+
datapoint: e,
|
|
748
|
+
seriesIndex: t
|
|
749
|
+
}));
|
|
750
|
+
}
|
|
751
|
+
function cr({ datapoint: e, seriesIndex: t }) {
|
|
752
|
+
Ht("selectDatapoint", e), A.value.events.datapointClick && A.value.events.datapointClick({
|
|
753
|
+
datapoint: e,
|
|
754
|
+
seriesIndex: t
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
function lr(e, t = {}) {
|
|
758
|
+
return ce(N.value.formatter, e, c({
|
|
759
|
+
p: N.value.prefix,
|
|
760
|
+
v: e,
|
|
761
|
+
s: N.value.suffix,
|
|
762
|
+
r: M.value.roundingValue
|
|
763
|
+
}), t);
|
|
764
|
+
}
|
|
765
|
+
function ur({ datapoint: e, seriesIndex: t, triggerMode: r = "pointer" }) {
|
|
766
|
+
A.value.events.datapointEnter && A.value.events.datapointEnter({
|
|
767
|
+
datapoint: e,
|
|
768
|
+
seriesIndex: t
|
|
769
|
+
}), k.value = r, or.value = {
|
|
770
|
+
datapoint: e,
|
|
771
|
+
seriesIndex: t,
|
|
772
|
+
config: A.value,
|
|
773
|
+
series: Hn.value
|
|
774
|
+
}, Kt.value = !0, Q.value = e;
|
|
775
|
+
let i = M.value.customFormat;
|
|
776
|
+
if (n(i) && ue(() => i({
|
|
777
|
+
seriesIndex: t,
|
|
778
|
+
datapoint: e,
|
|
779
|
+
series: Hn.value,
|
|
780
|
+
config: A.value
|
|
781
|
+
}))) qt.value = i({
|
|
782
|
+
seriesIndex: t,
|
|
783
|
+
datapoint: e,
|
|
784
|
+
series: Hn.value,
|
|
785
|
+
config: A.value
|
|
786
|
+
});
|
|
787
|
+
else {
|
|
788
|
+
let n = "";
|
|
789
|
+
n += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${I.value.plots.gradient.show ? `url(#${e.parentId})` : e.color}"/></svg>${e.name}</div>`, n += `<div>${lr(e.value, {
|
|
790
|
+
datapoint: e,
|
|
791
|
+
seriesIndex: t
|
|
792
|
+
})}</div>`, qt.value = `<div>${n}</div>`;
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
function dr() {
|
|
796
|
+
k.value !== "keyboard" && (Kt.value = !1, Q.value = null);
|
|
797
|
+
}
|
|
798
|
+
function fr({ boxPlot: e, seriesIndex: t, triggerMode: r = "pointer" }) {
|
|
799
|
+
k.value = r, Q.value = null, Kt.value = !0, or.value = {
|
|
800
|
+
boxPlot: e,
|
|
801
|
+
seriesIndex: t,
|
|
802
|
+
config: A.value,
|
|
803
|
+
series: Hn.value
|
|
804
|
+
};
|
|
805
|
+
let i = M.value.customFormat;
|
|
806
|
+
if (n(i)) try {
|
|
807
|
+
let n = {
|
|
808
|
+
boxPlot: e,
|
|
809
|
+
seriesIndex: t,
|
|
810
|
+
series: Hn.value,
|
|
811
|
+
config: A.value
|
|
812
|
+
};
|
|
813
|
+
if (ue(() => i(n))) {
|
|
814
|
+
qt.value = i(n);
|
|
815
|
+
return;
|
|
816
|
+
}
|
|
817
|
+
} catch {}
|
|
818
|
+
let a = [
|
|
819
|
+
[P.value.tooltipLabels.upperAdjacent, e.upperAdjacent],
|
|
820
|
+
[P.value.tooltipLabels.q3, e.q3],
|
|
821
|
+
[P.value.tooltipLabels.median, e.median],
|
|
822
|
+
[P.value.tooltipLabels.q1, e.q1],
|
|
823
|
+
[P.value.tooltipLabels.lowerAdjacent, e.lowerAdjacent],
|
|
824
|
+
[P.value.tooltipLabels.iqr, e.iqr]
|
|
825
|
+
], o = `<svg viewBox="0 0 12 12" height="14" width="14"><rect x="1" y="1" width="10" height="10" rx="2" stroke="none" fill="${e.color}"/></svg>`, s = a.map(([n, r]) => `<div style="display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:space-between;"><span>${n}</span><b>${lr(r, {
|
|
826
|
+
boxPlot: e,
|
|
827
|
+
seriesIndex: t
|
|
828
|
+
})}</b></div>`).join("");
|
|
829
|
+
qt.value = `<div style="min-width:160px;"><div style="display:flex;flex-direction:row;gap:6px;align-items:center;margin-bottom:6px;">${o}${e.name}</div>` + s + `<div style="display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:space-between;margin-top:6px;"><span>${P.value.tooltipLabels.count}</span><b>${e.count}</b></div></div>`;
|
|
830
|
+
}
|
|
831
|
+
let pr = d(() => ({
|
|
832
|
+
head: q.value.flatMap((e) => JSON.parse(JSON.stringify(e.plots)).sort((e, t) => t.value - e.value).map((t) => ({
|
|
833
|
+
name: `${e.name} - ${t.name}`,
|
|
834
|
+
color: t.color
|
|
835
|
+
}))),
|
|
836
|
+
body: q.value.flatMap((e) => JSON.parse(JSON.stringify(e.plots)).sort((e, t) => t.value - e.value).map((e) => e.value))
|
|
837
|
+
}));
|
|
838
|
+
function mr(e = null) {
|
|
839
|
+
Ue(() => {
|
|
840
|
+
let n = [], i = [A.value.table.columnNames.series, A.value.table.columnNames.value];
|
|
841
|
+
X.value ? (i = Jn.value, n = qn.value.map((e) => [
|
|
842
|
+
[e.name],
|
|
843
|
+
[e.lowerAdjacent],
|
|
844
|
+
[e.q1],
|
|
845
|
+
[e.median],
|
|
846
|
+
[e.q3],
|
|
847
|
+
[e.upperAdjacent],
|
|
848
|
+
[e.iqr],
|
|
849
|
+
[e.count]
|
|
850
|
+
])) : n = pr.value.head.map((e, t) => [[e.name], [pr.value.body[t]]]);
|
|
851
|
+
let a = [
|
|
852
|
+
[I.value.title.text],
|
|
853
|
+
[I.value.title.subtitle.text],
|
|
854
|
+
i.map((e) => [e])
|
|
855
|
+
].concat(n), o = r(a);
|
|
856
|
+
e ? e(o) : t({
|
|
857
|
+
csvContent: o,
|
|
858
|
+
title: I.value.title.text || "vue-ui-strip-plot"
|
|
859
|
+
});
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
let hr = d(() => {
|
|
863
|
+
if (X.value) {
|
|
864
|
+
let e = Jn.value;
|
|
865
|
+
return {
|
|
866
|
+
colNames: e,
|
|
867
|
+
head: e,
|
|
868
|
+
body: qn.value.map((e) => [
|
|
869
|
+
{
|
|
870
|
+
color: e.color,
|
|
871
|
+
name: e.name
|
|
872
|
+
},
|
|
873
|
+
Yn(e.lowerAdjacent),
|
|
874
|
+
Yn(e.q1),
|
|
875
|
+
Yn(e.median),
|
|
876
|
+
Yn(e.q3),
|
|
877
|
+
Yn(e.upperAdjacent),
|
|
878
|
+
Yn(e.iqr),
|
|
879
|
+
e.count
|
|
880
|
+
]),
|
|
881
|
+
config: {
|
|
882
|
+
th: {
|
|
883
|
+
backgroundColor: A.value.table.th.backgroundColor,
|
|
884
|
+
color: A.value.table.th.color,
|
|
885
|
+
outline: A.value.table.th.outline
|
|
886
|
+
},
|
|
887
|
+
td: {
|
|
888
|
+
backgroundColor: A.value.table.td.backgroundColor,
|
|
889
|
+
color: A.value.table.td.color,
|
|
890
|
+
outline: A.value.table.td.outline
|
|
891
|
+
},
|
|
892
|
+
breakpoint: A.value.table.responsiveBreakpoint
|
|
893
|
+
}
|
|
894
|
+
};
|
|
895
|
+
}
|
|
896
|
+
let e = [A.value.table.columnNames.series, A.value.table.columnNames.value], t = pr.value.head.map((e, t) => {
|
|
897
|
+
let n = c({
|
|
898
|
+
p: N.value.prefix,
|
|
899
|
+
v: pr.value.body[t],
|
|
900
|
+
s: N.value.suffix,
|
|
901
|
+
r: A.value.table.td.roundingValue
|
|
902
|
+
});
|
|
903
|
+
return [{
|
|
904
|
+
color: e.color,
|
|
905
|
+
name: e.name
|
|
906
|
+
}, n];
|
|
907
|
+
}), n = {
|
|
908
|
+
th: {
|
|
909
|
+
backgroundColor: A.value.table.th.backgroundColor,
|
|
910
|
+
color: A.value.table.th.color,
|
|
911
|
+
outline: A.value.table.th.outline
|
|
912
|
+
},
|
|
913
|
+
td: {
|
|
914
|
+
backgroundColor: A.value.table.td.backgroundColor,
|
|
915
|
+
color: A.value.table.td.color,
|
|
916
|
+
outline: A.value.table.td.outline
|
|
917
|
+
},
|
|
918
|
+
breakpoint: A.value.table.responsiveBreakpoint
|
|
919
|
+
};
|
|
920
|
+
return {
|
|
921
|
+
colNames: [A.value.table.columnNames.series, A.value.table.columnNames.value],
|
|
922
|
+
head: e,
|
|
923
|
+
body: t,
|
|
924
|
+
config: n
|
|
925
|
+
};
|
|
926
|
+
}), $ = x(!1);
|
|
927
|
+
function gr(e) {
|
|
928
|
+
$.value = e, Gt.value += 1;
|
|
929
|
+
}
|
|
930
|
+
function _r() {
|
|
931
|
+
return q.value;
|
|
932
|
+
}
|
|
933
|
+
function vr() {
|
|
934
|
+
U.value.showTable = !U.value.showTable;
|
|
935
|
+
}
|
|
936
|
+
function yr() {
|
|
937
|
+
U.value.dataLabels.show = !U.value.dataLabels.show;
|
|
938
|
+
}
|
|
939
|
+
function br() {
|
|
940
|
+
U.value.showTooltip = !U.value.showTooltip;
|
|
941
|
+
}
|
|
942
|
+
let xr = x(!1);
|
|
943
|
+
function Sr() {
|
|
944
|
+
xr.value = !xr.value;
|
|
945
|
+
}
|
|
946
|
+
async function Cr({ scale: e = 2 } = {}) {
|
|
947
|
+
if (!O.value) return;
|
|
948
|
+
let { width: t, height: n } = O.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await Oe({
|
|
949
|
+
domElement: O.value,
|
|
950
|
+
base64: !0,
|
|
951
|
+
img: !0,
|
|
952
|
+
scale: e
|
|
953
|
+
});
|
|
954
|
+
return {
|
|
955
|
+
imageUri: i,
|
|
956
|
+
base64: a,
|
|
957
|
+
title: I.value.title.text,
|
|
958
|
+
width: t,
|
|
959
|
+
height: n,
|
|
960
|
+
aspectRatio: r
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
let wr = d(() => q.value.map((e) => e.name)), Tr = x({
|
|
964
|
+
start: 0,
|
|
965
|
+
end: q.value.length
|
|
966
|
+
});
|
|
967
|
+
De({
|
|
968
|
+
timeLabelsEls: an,
|
|
969
|
+
timeLabels: wr,
|
|
970
|
+
slicer: Tr,
|
|
971
|
+
configRef: A,
|
|
972
|
+
rotationPath: [
|
|
973
|
+
"style",
|
|
974
|
+
"chart",
|
|
975
|
+
"labels",
|
|
976
|
+
"xAxisLabels",
|
|
977
|
+
"rotation"
|
|
978
|
+
],
|
|
979
|
+
autoRotatePath: [
|
|
980
|
+
"style",
|
|
981
|
+
"chart",
|
|
982
|
+
"labels",
|
|
983
|
+
"xAxisLabels",
|
|
984
|
+
"autoRotate",
|
|
985
|
+
"enable"
|
|
986
|
+
],
|
|
987
|
+
isAutoSize: !1,
|
|
988
|
+
width: V,
|
|
989
|
+
height: H,
|
|
990
|
+
targetClass: ".vue-ui-strip-plot-category-name",
|
|
991
|
+
rotation: N.value.xAxisLabels.autoRotate.angle
|
|
992
|
+
});
|
|
993
|
+
let Er = d(() => {
|
|
994
|
+
let e = A.value.table.useDialog && !A.value.table.show, t = U.value.showTable;
|
|
995
|
+
return {
|
|
996
|
+
component: e ? Lt : Mt,
|
|
997
|
+
title: `${I.value.title.text}${I.value.title.subtitle.text ? `: ${I.value.title.subtitle.text}` : ""}`,
|
|
998
|
+
props: e ? {
|
|
999
|
+
backgroundColor: A.value.table.th.backgroundColor,
|
|
1000
|
+
color: A.value.table.th.color,
|
|
1001
|
+
headerColor: A.value.table.th.color,
|
|
1002
|
+
headerBg: A.value.table.th.backgroundColor,
|
|
1003
|
+
isFullscreen: $.value,
|
|
1004
|
+
fullscreenParent: O.value,
|
|
1005
|
+
forcedWidth: Math.min(800, window.innerWidth * .8),
|
|
1006
|
+
isCursorPointer: L.value
|
|
1007
|
+
} : {
|
|
1008
|
+
hideDetails: !0,
|
|
1009
|
+
config: {
|
|
1010
|
+
open: t,
|
|
1011
|
+
maxHeight: 1e4,
|
|
1012
|
+
body: {
|
|
1013
|
+
backgroundColor: I.value.backgroundColor,
|
|
1014
|
+
color: I.value.color
|
|
1015
|
+
},
|
|
1016
|
+
head: {
|
|
1017
|
+
backgroundColor: I.value.backgroundColor,
|
|
1018
|
+
color: I.value.color
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
};
|
|
1023
|
+
});
|
|
1024
|
+
Xe(() => U.value.showTable, (e) => {
|
|
1025
|
+
A.value.table.show || (e && A.value.table.useDialog && en.value ? en.value.open() : "close" in en.value && en.value.close());
|
|
1026
|
+
});
|
|
1027
|
+
function Dr() {
|
|
1028
|
+
U.value.showTable = !1, tn.value && tn.value.setTableIconState(!1);
|
|
1029
|
+
}
|
|
1030
|
+
let Or = d(() => I.value.backgroundColor), kr = d(() => I.value.title), { isCallbackImaging: Ar, isCallbackSvg: jr, generateSvg: Mr, onGenerateImage: Nr } = Te({
|
|
1031
|
+
svg: R,
|
|
1032
|
+
title: kr,
|
|
1033
|
+
legend: null,
|
|
1034
|
+
legendItems: null,
|
|
1035
|
+
backgroundColor: Or,
|
|
1036
|
+
getSvgCallback: () => A.value.userOptions.callbacks.svg,
|
|
1037
|
+
generateImage: kn
|
|
1038
|
+
});
|
|
1039
|
+
async function Pr() {
|
|
1040
|
+
if (Ht("copyAlt", {
|
|
1041
|
+
config: A.value,
|
|
1042
|
+
dataset: Y.value
|
|
1043
|
+
}), !A.value.userOptions.callbacks.altCopy) {
|
|
1044
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
1045
|
+
return;
|
|
1046
|
+
}
|
|
1047
|
+
await Promise.resolve(A.value.userOptions.callbacks.altCopy({
|
|
1048
|
+
config: A.value,
|
|
1049
|
+
dataset: Y.value
|
|
1050
|
+
}));
|
|
1051
|
+
}
|
|
1052
|
+
function Fr() {
|
|
1053
|
+
return Y.value.length;
|
|
1054
|
+
}
|
|
1055
|
+
function Ir(e) {
|
|
1056
|
+
return Y.value[e]?.plots ?? [];
|
|
1057
|
+
}
|
|
1058
|
+
function Lr(e = sn.value, t = cn.value) {
|
|
1059
|
+
return !Number.isInteger(e) || !Number.isInteger(t) ? null : Ir(e)[t] ?? null;
|
|
1060
|
+
}
|
|
1061
|
+
function Rr() {
|
|
1062
|
+
sn.value = null, cn.value = null, k.value = "pointer", Kt.value = !1, Q.value = null;
|
|
1063
|
+
}
|
|
1064
|
+
function zr(e) {
|
|
1065
|
+
if (!e || !R.value) return;
|
|
1066
|
+
let t = R.value.getBoundingClientRect();
|
|
1067
|
+
ln.value = {
|
|
1068
|
+
x: t.left + e.x / V.value * t.width,
|
|
1069
|
+
y: t.top + e.y / H.value * t.height
|
|
1070
|
+
};
|
|
1071
|
+
}
|
|
1072
|
+
function Br(e, t) {
|
|
1073
|
+
let n = Lr(e, t);
|
|
1074
|
+
n && (sn.value = e, cn.value = t, k.value = "keyboard", zr(n), ur({
|
|
1075
|
+
datapoint: n,
|
|
1076
|
+
seriesIndex: e,
|
|
1077
|
+
triggerMode: "keyboard"
|
|
1078
|
+
}));
|
|
1079
|
+
}
|
|
1080
|
+
function Vr() {
|
|
1081
|
+
un.value = !0, sn.value = null, cn.value = null;
|
|
1082
|
+
}
|
|
1083
|
+
function Hr() {
|
|
1084
|
+
un.value = !1, Rr();
|
|
1085
|
+
}
|
|
1086
|
+
function Ur(e) {
|
|
1087
|
+
if (!R.value || xr.value || document.activeElement !== R.value || !Fr()) return;
|
|
1088
|
+
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "ArrowUp", i = e.key === "ArrowDown", a = e.key === "Enter" || e.key === " ", o = e.key === "Escape";
|
|
1089
|
+
if (!t && !n && !r && !i && !a && !o) return;
|
|
1090
|
+
if (e.preventDefault(), e.stopPropagation(), o) {
|
|
1091
|
+
Rr();
|
|
1092
|
+
return;
|
|
1093
|
+
}
|
|
1094
|
+
let s = sn.value, c = cn.value;
|
|
1095
|
+
if (s === null || c === null) s = 0, c = 0;
|
|
1096
|
+
else if (t || n) {
|
|
1097
|
+
let e = Fr();
|
|
1098
|
+
s = n ? (s + 1) % e : (s - 1 + e) % e;
|
|
1099
|
+
let t = Ir(s);
|
|
1100
|
+
if (!t.length) return;
|
|
1101
|
+
c = Math.min(c, t.length - 1);
|
|
1102
|
+
} else if (r || i) {
|
|
1103
|
+
let e = Ir(s);
|
|
1104
|
+
if (!e.length) return;
|
|
1105
|
+
c = r ? (c + 1) % e.length : (c - 1 + e.length) % e.length;
|
|
1106
|
+
}
|
|
1107
|
+
if (a) {
|
|
1108
|
+
let e = Lr();
|
|
1109
|
+
if (!e) return;
|
|
1110
|
+
cr({
|
|
1111
|
+
datapoint: e,
|
|
1112
|
+
seriesIndex: sn.value
|
|
1113
|
+
});
|
|
1114
|
+
return;
|
|
1115
|
+
}
|
|
1116
|
+
Br(s, c);
|
|
1117
|
+
}
|
|
1118
|
+
let Wr = d(() => ({
|
|
1119
|
+
headers: hr.value?.colNames ?? [],
|
|
1120
|
+
rows: hr.value?.body?.map((e) => e.map((e) => e && typeof e == "object" && "name" in e ? e.name : e)) ?? []
|
|
1121
|
+
}));
|
|
1122
|
+
return je({
|
|
1123
|
+
getData: _r,
|
|
1124
|
+
getImage: Cr,
|
|
1125
|
+
generatePdf: On,
|
|
1126
|
+
generateCsv: mr,
|
|
1127
|
+
generateImage: kn,
|
|
1128
|
+
generateSvg: Mr,
|
|
1129
|
+
toggleTable: vr,
|
|
1130
|
+
toggleLabels: yr,
|
|
1131
|
+
toggleTooltip: br,
|
|
1132
|
+
toggleAnnotator: Sr,
|
|
1133
|
+
toggleFullscreen: gr,
|
|
1134
|
+
copyAlt: Pr
|
|
1135
|
+
}), (e, t) => (b(), m("div", {
|
|
1136
|
+
ref_key: "stripPlotChart",
|
|
1137
|
+
ref: O,
|
|
1138
|
+
class: We(`vue-data-ui-component vue-ui-strip-plot ${$.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${A.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
1139
|
+
style: y(`font-family:${A.value.style.fontFamily};width:100%; text-align:center;background:${I.value.backgroundColor};${A.value.responsive ? "height:100%" : ""}`),
|
|
1140
|
+
id: `strip-plot_${Wt.value}`,
|
|
1141
|
+
onMouseenter: t[2] ||= () => T(vn)(!0),
|
|
1142
|
+
onMouseleave: t[3] ||= () => T(vn)(!1)
|
|
1143
|
+
}, [
|
|
1144
|
+
h("div", {
|
|
1145
|
+
id: `chart-instructions-${Wt.value}`,
|
|
1146
|
+
class: "sr-only"
|
|
1147
|
+
}, [h("p", null, w(A.value.a11y.translations.keyboardNavigation), 1)], 8, et),
|
|
1148
|
+
Wr.value?.rows?.length ? (b(), f(Fe, {
|
|
1149
|
+
key: 0,
|
|
1150
|
+
uid: Wt.value,
|
|
1151
|
+
head: Wr.value.headers,
|
|
1152
|
+
body: Wr.value.rows,
|
|
1153
|
+
notice: A.value.a11y.translations.tableAvailable,
|
|
1154
|
+
caption: A.value.a11y.translations.tableCaption
|
|
1155
|
+
}, null, 8, [
|
|
1156
|
+
"uid",
|
|
1157
|
+
"head",
|
|
1158
|
+
"body",
|
|
1159
|
+
"notice",
|
|
1160
|
+
"caption"
|
|
1161
|
+
])) : p("", !0),
|
|
1162
|
+
j.value.buttons.annotator ? (b(), f(T(Ft), {
|
|
1163
|
+
key: 1,
|
|
1164
|
+
svgRef: T(R),
|
|
1165
|
+
backgroundColor: I.value.backgroundColor,
|
|
1166
|
+
color: I.value.color,
|
|
1167
|
+
active: xr.value,
|
|
1168
|
+
isCursorPointer: L.value,
|
|
1169
|
+
palette: j.value.annotatorPalette,
|
|
1170
|
+
onClose: Sr
|
|
1171
|
+
}, {
|
|
1172
|
+
"annotator-action-close": E(() => [C(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1173
|
+
"annotator-action-color": E(({ color: t }) => [C(e.$slots, "annotator-action-color", v(_({ color: t })), void 0, !0)]),
|
|
1174
|
+
"annotator-action-draw": E(({ mode: t }) => [C(e.$slots, "annotator-action-draw", v(_({ mode: t })), void 0, !0)]),
|
|
1175
|
+
"annotator-action-undo": E(({ disabled: t }) => [C(e.$slots, "annotator-action-undo", v(_({ disabled: t })), void 0, !0)]),
|
|
1176
|
+
"annotator-action-redo": E(({ disabled: t }) => [C(e.$slots, "annotator-action-redo", v(_({ disabled: t })), void 0, !0)]),
|
|
1177
|
+
"annotator-action-delete": E(({ disabled: t }) => [C(e.$slots, "annotator-action-delete", v(_({ disabled: t })), void 0, !0)]),
|
|
1178
|
+
_: 3
|
|
1179
|
+
}, 8, [
|
|
1180
|
+
"svgRef",
|
|
1181
|
+
"backgroundColor",
|
|
1182
|
+
"color",
|
|
1183
|
+
"active",
|
|
1184
|
+
"isCursorPointer",
|
|
1185
|
+
"palette"
|
|
1186
|
+
])) : p("", !0),
|
|
1187
|
+
An.value ? (b(), m("div", {
|
|
1188
|
+
key: 2,
|
|
1189
|
+
ref_key: "noTitle",
|
|
1190
|
+
ref: Xt,
|
|
1191
|
+
class: "vue-data-ui-no-title-space",
|
|
1192
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1193
|
+
}, null, 512)) : p("", !0),
|
|
1194
|
+
I.value.title.text ? (b(), m("div", {
|
|
1195
|
+
key: 3,
|
|
1196
|
+
ref_key: "chartTitle",
|
|
1197
|
+
ref: Jt,
|
|
1198
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
1199
|
+
}, [(b(), f(ke, {
|
|
1200
|
+
key: `title_${Qt.value}`,
|
|
1201
|
+
config: {
|
|
1202
|
+
title: {
|
|
1203
|
+
cy: "donut-div-title",
|
|
1204
|
+
...I.value.title
|
|
1205
|
+
},
|
|
1206
|
+
subtitle: {
|
|
1207
|
+
cy: "donut-div-subtitle",
|
|
1208
|
+
...I.value.title.subtitle
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
}, null, 8, ["config"]))], 512)) : p("", !0),
|
|
1212
|
+
j.value.show && Ut.value && (T(yn) || T(_n)) ? (b(), f(T(Pt), {
|
|
1213
|
+
ref_key: "userOptionsRef",
|
|
1214
|
+
ref: tn,
|
|
1215
|
+
key: `user_option_${Gt.value}`,
|
|
1216
|
+
backgroundColor: I.value.backgroundColor,
|
|
1217
|
+
color: I.value.color,
|
|
1218
|
+
isPrinting: T(En),
|
|
1219
|
+
isImaging: T(Dn),
|
|
1220
|
+
uid: Wt.value,
|
|
1221
|
+
hasTooltip: j.value.buttons.tooltip && M.value.show,
|
|
1222
|
+
hasPdf: j.value.buttons.pdf,
|
|
1223
|
+
hasXls: j.value.buttons.csv,
|
|
1224
|
+
hasImg: j.value.buttons.img,
|
|
1225
|
+
hasSvg: j.value.buttons.svg,
|
|
1226
|
+
hasTable: j.value.buttons.table,
|
|
1227
|
+
hasLabel: j.value.buttons.labels && A.value.type !== "violin",
|
|
1228
|
+
hasFullscreen: j.value.buttons.fullscreen,
|
|
1229
|
+
hasAltCopy: j.value.buttons.altCopy,
|
|
1230
|
+
isTooltip: U.value.showTooltip,
|
|
1231
|
+
isFullscreen: $.value,
|
|
1232
|
+
titles: { ...j.value.buttonTitles },
|
|
1233
|
+
chartElement: O.value,
|
|
1234
|
+
position: j.value.position,
|
|
1235
|
+
hasAnnotator: j.value.buttons.annotator,
|
|
1236
|
+
isAnnotation: xr.value,
|
|
1237
|
+
callbacks: j.value.callbacks,
|
|
1238
|
+
printScale: j.value.print.scale,
|
|
1239
|
+
tableDialog: A.value.table.useDialog,
|
|
1240
|
+
isCursorPointer: L.value,
|
|
1241
|
+
onToggleFullscreen: gr,
|
|
1242
|
+
onGeneratePdf: T(On),
|
|
1243
|
+
onGenerateCsv: mr,
|
|
1244
|
+
onGenerateImage: T(Nr),
|
|
1245
|
+
onGenerateSvg: T(Mr),
|
|
1246
|
+
onToggleTable: vr,
|
|
1247
|
+
onToggleLabels: yr,
|
|
1248
|
+
onToggleTooltip: br,
|
|
1249
|
+
onToggleAnnotator: Sr,
|
|
1250
|
+
onCopyAlt: Pr,
|
|
1251
|
+
style: y({ visibility: T(yn) ? T(_n) ? "visible" : "hidden" : "visible" })
|
|
1252
|
+
}, ze({ _: 2 }, [
|
|
1253
|
+
e.$slots.menuIcon ? {
|
|
1254
|
+
name: "menuIcon",
|
|
1255
|
+
fn: E(({ isOpen: t, color: n }) => [C(e.$slots, "menuIcon", v(_({
|
|
1256
|
+
isOpen: t,
|
|
1257
|
+
color: n
|
|
1258
|
+
})), void 0, !0)]),
|
|
1259
|
+
key: "0"
|
|
1260
|
+
} : void 0,
|
|
1261
|
+
e.$slots.optionTooltip ? {
|
|
1262
|
+
name: "optionTooltip",
|
|
1263
|
+
fn: E(() => [C(e.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1264
|
+
key: "1"
|
|
1265
|
+
} : void 0,
|
|
1266
|
+
e.$slots.optionPdf ? {
|
|
1267
|
+
name: "optionPdf",
|
|
1268
|
+
fn: E(() => [C(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1269
|
+
key: "2"
|
|
1270
|
+
} : void 0,
|
|
1271
|
+
e.$slots.optionCsv ? {
|
|
1272
|
+
name: "optionCsv",
|
|
1273
|
+
fn: E(() => [C(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1274
|
+
key: "3"
|
|
1275
|
+
} : void 0,
|
|
1276
|
+
e.$slots.optionImg ? {
|
|
1277
|
+
name: "optionImg",
|
|
1278
|
+
fn: E(() => [C(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1279
|
+
key: "4"
|
|
1280
|
+
} : void 0,
|
|
1281
|
+
e.$slots.optionSvg ? {
|
|
1282
|
+
name: "optionSvg",
|
|
1283
|
+
fn: E(() => [C(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1284
|
+
key: "5"
|
|
1285
|
+
} : void 0,
|
|
1286
|
+
e.$slots.optionTable ? {
|
|
1287
|
+
name: "optionTable",
|
|
1288
|
+
fn: E(() => [C(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1289
|
+
key: "6"
|
|
1290
|
+
} : void 0,
|
|
1291
|
+
e.$slots.optionLabels ? {
|
|
1292
|
+
name: "optionLabels",
|
|
1293
|
+
fn: E(() => [C(e.$slots, "optionLabels", {}, void 0, !0)]),
|
|
1294
|
+
key: "7"
|
|
1295
|
+
} : void 0,
|
|
1296
|
+
e.$slots.optionFullscreen ? {
|
|
1297
|
+
name: "optionFullscreen",
|
|
1298
|
+
fn: E(({ toggleFullscreen: t, isFullscreen: n }) => [C(e.$slots, "optionFullscreen", v(_({
|
|
1299
|
+
toggleFullscreen: t,
|
|
1300
|
+
isFullscreen: n
|
|
1301
|
+
})), void 0, !0)]),
|
|
1302
|
+
key: "8"
|
|
1303
|
+
} : void 0,
|
|
1304
|
+
e.$slots.optionAnnotator ? {
|
|
1305
|
+
name: "optionAnnotator",
|
|
1306
|
+
fn: E(({ toggleAnnotator: t, isAnnotator: n }) => [C(e.$slots, "optionAnnotator", v(_({
|
|
1307
|
+
toggleAnnotator: t,
|
|
1308
|
+
isAnnotator: n
|
|
1309
|
+
})), void 0, !0)]),
|
|
1310
|
+
key: "9"
|
|
1311
|
+
} : void 0,
|
|
1312
|
+
e.$slots.optionAltCopy ? {
|
|
1313
|
+
name: "optionAltCopy",
|
|
1314
|
+
fn: E(({ altCopy: t }) => [C(e.$slots, "optionAltCopy", v(_({ altCopy: t })), void 0, !0)]),
|
|
1315
|
+
key: "10"
|
|
1316
|
+
} : void 0,
|
|
1317
|
+
e.$slots["custom-menu-before"] ? {
|
|
1318
|
+
name: "custom-menu-before",
|
|
1319
|
+
fn: E(() => [C(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1320
|
+
key: "11"
|
|
1321
|
+
} : void 0,
|
|
1322
|
+
e.$slots["custom-menu-after"] ? {
|
|
1323
|
+
name: "custom-menu-after",
|
|
1324
|
+
fn: E(() => [C(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1325
|
+
key: "12"
|
|
1326
|
+
} : void 0
|
|
1327
|
+
]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasLabel.hasFullscreen.hasAltCopy.isTooltip.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style".split("."))) : p("", !0),
|
|
1328
|
+
h("div", tt, [(b(), m("svg", {
|
|
1329
|
+
ref_key: "svgRef",
|
|
1330
|
+
ref: R,
|
|
1331
|
+
xmlns: T(pe),
|
|
1332
|
+
class: We({
|
|
1333
|
+
"vue-data-ui-fullscreen--on": $.value,
|
|
1334
|
+
"vue-data-ui-fulscreen--off": !$.value,
|
|
1335
|
+
"vue-data-ui-no-transition": !T(dn)
|
|
1336
|
+
}),
|
|
1337
|
+
viewBox: `0 0 ${V.value} ${H.value}`,
|
|
1338
|
+
style: y(`max-width:100%; overflow: visible; background:transparent;color:${I.value.color};`),
|
|
1339
|
+
"aria-describedby": `chart-instructions-${Wt.value}`,
|
|
1340
|
+
tabindex: "0",
|
|
1341
|
+
onFocus: Vr,
|
|
1342
|
+
onBlur: Hr,
|
|
1343
|
+
onKeydown: Ur
|
|
1344
|
+
}, [
|
|
1345
|
+
Ve(T(It)),
|
|
1346
|
+
e.$slots["chart-background"] ? (b(), m("foreignObject", {
|
|
1347
|
+
key: 0,
|
|
1348
|
+
x: K.value.left,
|
|
1349
|
+
y: K.value.top,
|
|
1350
|
+
width: Math.max(.1, K.value.width),
|
|
1351
|
+
height: Math.max(.1, K.value.height),
|
|
1352
|
+
style: { pointerEvents: "none" }
|
|
1353
|
+
}, [C(e.$slots, "chart-background", {}, void 0, !0)], 8, rt)) : p("", !0),
|
|
1354
|
+
F.value.show ? (b(), m("g", it, [
|
|
1355
|
+
F.value.horizontalGrid.show ? (b(), m("g", at, [(b(!0), m(u, null, S(ar.value, (e) => (b(), m("line", {
|
|
1356
|
+
x1: e.x1,
|
|
1357
|
+
x2: e.x2,
|
|
1358
|
+
y1: e.y,
|
|
1359
|
+
y2: e.y,
|
|
1360
|
+
stroke: F.value.horizontalGrid.stroke,
|
|
1361
|
+
"stroke-width": F.value.horizontalGrid.strokeWidth,
|
|
1362
|
+
"stroke-dasharray": F.value.horizontalGrid.strokeDasharray,
|
|
1363
|
+
"stroke-linecap": "round"
|
|
1364
|
+
}, null, 8, ot))), 256))])) : p("", !0),
|
|
1365
|
+
F.value.verticalGrid.show ? (b(), m("g", st, [(b(!0), m(u, null, S(q.value, (e, t) => (b(), m("line", {
|
|
1366
|
+
x1: K.value.left + (t + 1) * K.value.stripWidth,
|
|
1367
|
+
x2: K.value.left + (t + 1) * K.value.stripWidth,
|
|
1368
|
+
y1: K.value.top,
|
|
1369
|
+
y2: K.value.bottom,
|
|
1370
|
+
stroke: F.value.verticalGrid.stroke,
|
|
1371
|
+
"stroke-width": F.value.verticalGrid.strokeWidth,
|
|
1372
|
+
"stroke-dasharray": F.value.verticalGrid.strokeDasharray,
|
|
1373
|
+
"stroke-linecap": "round"
|
|
1374
|
+
}, null, 8, ct))), 256))])) : p("", !0),
|
|
1375
|
+
h("line", {
|
|
1376
|
+
x1: K.value.left,
|
|
1377
|
+
x2: K.value.left,
|
|
1378
|
+
y1: K.value.top,
|
|
1379
|
+
y2: K.value.bottom,
|
|
1380
|
+
stroke: F.value.stroke,
|
|
1381
|
+
"stroke-width": F.value.strokeWidth,
|
|
1382
|
+
"stroke-linecap": "round"
|
|
1383
|
+
}, null, 8, lt),
|
|
1384
|
+
h("line", {
|
|
1385
|
+
x1: K.value.left,
|
|
1386
|
+
x2: K.value.right,
|
|
1387
|
+
y1: K.value.bottom,
|
|
1388
|
+
y2: K.value.bottom,
|
|
1389
|
+
stroke: F.value.stroke,
|
|
1390
|
+
"stroke-width": F.value.strokeWidth,
|
|
1391
|
+
"stroke-linecap": "round"
|
|
1392
|
+
}, null, 8, ut)
|
|
1393
|
+
])) : p("", !0),
|
|
1394
|
+
N.value.yAxisLabels.show ? (b(), m("g", {
|
|
1395
|
+
key: 2,
|
|
1396
|
+
ref_key: "scaleLabels",
|
|
1397
|
+
ref: on
|
|
1398
|
+
}, [(b(!0), m(u, null, S(ar.value, (e, t) => (b(), m("text", {
|
|
1399
|
+
class: We({ "vue-data-ui-transition": T(dn) }),
|
|
1400
|
+
key: `sl_${t}`,
|
|
1401
|
+
transform: `translate(${e.x1 + N.value.yAxisLabels.offsetX - 5}, ${e.y + N.value.yAxisLabels.fontSize / 3})`,
|
|
1402
|
+
fill: N.value.yAxisLabels.color,
|
|
1403
|
+
"font-size": N.value.yAxisLabels.fontSize,
|
|
1404
|
+
"text-anchor": "end"
|
|
1405
|
+
}, w(T(ce)(N.value.formatter, e.value, T(c)({
|
|
1406
|
+
p: N.value.prefix,
|
|
1407
|
+
v: e.value,
|
|
1408
|
+
s: N.value.suffix,
|
|
1409
|
+
r: N.value.yAxisLabels.rounding
|
|
1410
|
+
}), {
|
|
1411
|
+
datapoint: e,
|
|
1412
|
+
seriesIndex: t
|
|
1413
|
+
})), 11, dt))), 128))], 512)) : p("", !0),
|
|
1414
|
+
N.value.xAxisLabels.show ? (b(), m("g", {
|
|
1415
|
+
key: 3,
|
|
1416
|
+
ref_key: "timeLabelsEls",
|
|
1417
|
+
ref: an
|
|
1418
|
+
}, [(b(!0), m(u, null, S(wr.value, (e, t) => (b(), m("g", null, [String(e).includes("\n") ? (b(), m("text", {
|
|
1419
|
+
key: 1,
|
|
1420
|
+
class: "vue-ui-strip-plot-category-name",
|
|
1421
|
+
transform: `translate(${K.value.left + (t + 1) * K.value.stripWidth - K.value.stripWidth / 2}, ${K.value.bottom + N.value.xAxisLabels.fontSize * 2 + N.value.xAxisLabels.offsetY}), rotate(${N.value.xAxisLabels.rotation})`,
|
|
1422
|
+
"font-size": N.value.xAxisLabels.fontSize,
|
|
1423
|
+
fill: N.value.xAxisLabels.color,
|
|
1424
|
+
"text-anchor": N.value.xAxisLabels.rotation > 0 ? "start" : N.value.xAxisLabels.rotation < 0 ? "end" : "middle",
|
|
1425
|
+
innerHTML: T(i)({
|
|
1426
|
+
content: T(oe)(String(e)),
|
|
1427
|
+
fontSize: N.value.xAxisLabels.fontSize,
|
|
1428
|
+
fill: N.value.xAxisLabels.color,
|
|
1429
|
+
x: 0,
|
|
1430
|
+
y: 0
|
|
1431
|
+
})
|
|
1432
|
+
}, null, 8, pt)) : (b(), m("text", {
|
|
1433
|
+
key: 0,
|
|
1434
|
+
class: "vue-ui-strip-plot-category-name",
|
|
1435
|
+
transform: `translate(${K.value.left + (t + 1) * K.value.stripWidth - K.value.stripWidth / 2}, ${K.value.bottom + N.value.xAxisLabels.fontSize * 2 + N.value.xAxisLabels.offsetY}), rotate(${N.value.xAxisLabels.rotation})`,
|
|
1436
|
+
"font-size": N.value.xAxisLabels.fontSize,
|
|
1437
|
+
fill: N.value.xAxisLabels.color,
|
|
1438
|
+
"text-anchor": N.value.xAxisLabels.rotation > 0 ? "start" : N.value.xAxisLabels.rotation < 0 ? "end" : "middle"
|
|
1439
|
+
}, w(String(e)), 9, ft))]))), 256))], 512)) : p("", !0),
|
|
1440
|
+
N.value.axis.yLabel ? (b(), m("text", {
|
|
1441
|
+
key: 4,
|
|
1442
|
+
ref_key: "yAxisLabel",
|
|
1443
|
+
ref: rn,
|
|
1444
|
+
fill: N.value.axis.color,
|
|
1445
|
+
"font-size": N.value.axis.fontSize,
|
|
1446
|
+
transform: `translate(${N.value.axis.fontSize}, ${K.value.top + K.value.height / 2}) rotate(-90)`,
|
|
1447
|
+
"text-anchor": "middle"
|
|
1448
|
+
}, w(N.value.axis.yLabel), 9, mt)) : p("", !0),
|
|
1449
|
+
N.value.axis.xLabel ? (b(), m("text", {
|
|
1450
|
+
key: 5,
|
|
1451
|
+
ref_key: "xAxisLabel",
|
|
1452
|
+
ref: nn,
|
|
1453
|
+
fill: N.value.axis.color,
|
|
1454
|
+
"font-size": N.value.axis.fontSize,
|
|
1455
|
+
x: K.value.left + K.value.width / 2,
|
|
1456
|
+
y: H.value - N.value.axis.fontSize / 3,
|
|
1457
|
+
"text-anchor": "middle"
|
|
1458
|
+
}, w(N.value.axis.xLabel), 9, ht)) : p("", !0),
|
|
1459
|
+
Q.value ? (b(), m(u, { key: 6 }, [
|
|
1460
|
+
h("line", {
|
|
1461
|
+
x1: K.value.left,
|
|
1462
|
+
x2: K.value.right,
|
|
1463
|
+
y1: Q.value.y,
|
|
1464
|
+
y2: Q.value.y,
|
|
1465
|
+
stroke: Q.value.color,
|
|
1466
|
+
"stroke-width": 1,
|
|
1467
|
+
class: We({ "select-circle": A.value.useCssAnimation })
|
|
1468
|
+
}, null, 10, gt),
|
|
1469
|
+
h("circle", {
|
|
1470
|
+
cx: K.value.left,
|
|
1471
|
+
cy: Q.value.y,
|
|
1472
|
+
r: 3,
|
|
1473
|
+
fill: Q.value.color,
|
|
1474
|
+
class: We({ "select-circle": A.value.useCssAnimation })
|
|
1475
|
+
}, null, 10, _t),
|
|
1476
|
+
h("circle", {
|
|
1477
|
+
cx: K.value.right,
|
|
1478
|
+
cy: Q.value.y,
|
|
1479
|
+
r: 3,
|
|
1480
|
+
fill: Q.value.color,
|
|
1481
|
+
class: We({ "select-circle": A.value.useCssAnimation })
|
|
1482
|
+
}, null, 10, vt)
|
|
1483
|
+
], 64)) : p("", !0),
|
|
1484
|
+
h("defs", null, [(b(!0), m(u, null, S(q.value, (e) => (b(), f(Pe, {
|
|
1485
|
+
t: "radial",
|
|
1486
|
+
id: e.id,
|
|
1487
|
+
key: `r_${e.id}`,
|
|
1488
|
+
fy: "30%",
|
|
1489
|
+
stops: [
|
|
1490
|
+
[
|
|
1491
|
+
"10%",
|
|
1492
|
+
T(le)(e.color, I.value.plots.gradient.intensity / 100),
|
|
1493
|
+
1
|
|
1494
|
+
],
|
|
1495
|
+
[
|
|
1496
|
+
"90%",
|
|
1497
|
+
T(l)(e.color, .1),
|
|
1498
|
+
1
|
|
1499
|
+
],
|
|
1500
|
+
[
|
|
1501
|
+
"100%",
|
|
1502
|
+
e.color,
|
|
1503
|
+
1
|
|
1504
|
+
]
|
|
1505
|
+
]
|
|
1506
|
+
}, null, 8, ["id", "stops"]))), 128))]),
|
|
1507
|
+
(b(!0), m(u, null, S(Zn.value, (e, n) => (b(), m(u, { key: e.id }, [e.path ? (b(), m("path", {
|
|
1508
|
+
key: 0,
|
|
1509
|
+
d: e.path,
|
|
1510
|
+
fill: e.fill,
|
|
1511
|
+
stroke: e.color,
|
|
1512
|
+
"fill-opacity": P.value.opacity,
|
|
1513
|
+
"stroke-opacity": P.value.strokeOpacity,
|
|
1514
|
+
"stroke-width": P.value.strokeWidth,
|
|
1515
|
+
style: y({
|
|
1516
|
+
pointerEvents: X.value ? "auto" : "none",
|
|
1517
|
+
cursor: X.value && L.value ? "pointer" : "default"
|
|
1518
|
+
}),
|
|
1519
|
+
onMouseenter: (e) => X.value && qn.value[n] && fr({
|
|
1520
|
+
boxPlot: qn.value[n],
|
|
1521
|
+
seriesIndex: n,
|
|
1522
|
+
triggerMode: "pointer"
|
|
1523
|
+
}),
|
|
1524
|
+
onMouseleave: t[0] ||= (e) => X.value && dr()
|
|
1525
|
+
}, null, 44, yt)) : p("", !0), (b(!0), m(u, null, S(e.connectors, (t, n) => (b(), m("line", {
|
|
1526
|
+
key: `violin_connector_${e.id}_${n}`,
|
|
1527
|
+
x1: t.x,
|
|
1528
|
+
x2: t.x,
|
|
1529
|
+
y1: t.y1,
|
|
1530
|
+
y2: t.y2,
|
|
1531
|
+
stroke: e.color,
|
|
1532
|
+
"stroke-opacity": P.value.strokeOpacity,
|
|
1533
|
+
"stroke-width": P.value.strokeWidth,
|
|
1534
|
+
"stroke-linecap": "round",
|
|
1535
|
+
style: { "pointer-events": "none" }
|
|
1536
|
+
}, null, 8, bt))), 128))], 64))), 128)),
|
|
1537
|
+
(b(!0), m(u, null, S(qn.value, (e, t) => (b(), m("g", {
|
|
1538
|
+
key: `boxplot_${e.id}`,
|
|
1539
|
+
style: y({ cursor: L.value ? "pointer" : "default" }),
|
|
1540
|
+
onMouseenter: (n) => fr({
|
|
1541
|
+
boxPlot: e,
|
|
1542
|
+
seriesIndex: t,
|
|
1543
|
+
triggerMode: "pointer"
|
|
1544
|
+
}),
|
|
1545
|
+
onMouseleave: dr
|
|
1546
|
+
}, [
|
|
1547
|
+
h("line", {
|
|
1548
|
+
x1: e.centerX,
|
|
1549
|
+
x2: e.centerX,
|
|
1550
|
+
y1: e.upperY,
|
|
1551
|
+
y2: e.lowerY,
|
|
1552
|
+
stroke: T(l)(e.boxPlotColor, .2),
|
|
1553
|
+
"stroke-width": Math.max(1, P.value.strokeWidth),
|
|
1554
|
+
"stroke-linecap": "round"
|
|
1555
|
+
}, null, 8, St),
|
|
1556
|
+
h("rect", {
|
|
1557
|
+
x: e.boxLeft,
|
|
1558
|
+
y: Math.min(e.q1Y, e.q3Y),
|
|
1559
|
+
width: e.boxWidth,
|
|
1560
|
+
height: Math.max(1, Math.abs(e.q3Y - e.q1Y)),
|
|
1561
|
+
fill: e.boxPlotColor,
|
|
1562
|
+
stroke: T(l)(e.boxPlotColor, .2),
|
|
1563
|
+
"stroke-width": Math.max(1, P.value.strokeWidth),
|
|
1564
|
+
rx: e.boxWidth / 20
|
|
1565
|
+
}, null, 8, Ct),
|
|
1566
|
+
h("circle", {
|
|
1567
|
+
cx: e.boxLeft + e.boxWidth / 2,
|
|
1568
|
+
cy: e.medianY,
|
|
1569
|
+
r: e.boxWidth / 3 * Math.min(1, P.value.boxPlot.medianCircleRadiusRatio),
|
|
1570
|
+
fill: P.value.boxPlot.medianCircleFill,
|
|
1571
|
+
stroke: T(l)(e.boxPlotColor, .2)
|
|
1572
|
+
}, null, 8, wt)
|
|
1573
|
+
], 44, xt))), 128)),
|
|
1574
|
+
(b(!0), m(u, null, S(Y.value, (t, n) => (b(), m(u, null, [X.value ? p("", !0) : (b(!0), m(u, { key: 0 }, S(t.plots, (n, r) => (b(), f(Ae, He({ ref_for: !0 }, e.$attrs, {
|
|
1575
|
+
plot: {
|
|
1576
|
+
x: n.x,
|
|
1577
|
+
y: Zt.value ? n.y : K.value.top
|
|
1578
|
+
},
|
|
1579
|
+
radius: Q.value && Q.value.id === n.id ? W.value * 1.5 : W.value,
|
|
1580
|
+
shape: I.value.plots.shape,
|
|
1581
|
+
stroke: I.value.plots.stroke,
|
|
1582
|
+
strokeWidth: I.value.plots.strokeWidth,
|
|
1583
|
+
color: I.value.plots.gradient.show ? `url(#${t.id})` : t.color,
|
|
1584
|
+
style: `transition: all 0.2s ease-in-out; opacity:${Q.value ? Q.value.id === n.id ? 1 : .2 : I.value.plots.opacity};${Mn.value ? `transition-delay:${r * 50}ms` : ""}`,
|
|
1585
|
+
class: {
|
|
1586
|
+
"vue-ui-strip-plot-animated": A.value.useCssAnimation && Mn.value && !T(mn),
|
|
1587
|
+
"vue-ui-strip-plot-select-circle": A.value.useCssAnimation && !Mn.value
|
|
1588
|
+
},
|
|
1589
|
+
onMouseenter: (e) => ur({
|
|
1590
|
+
datapoint: n,
|
|
1591
|
+
seriesIndex: r,
|
|
1592
|
+
triggerMode: "pointer"
|
|
1593
|
+
}),
|
|
1594
|
+
onMouseleave: (e) => sr({
|
|
1595
|
+
datapoint: n,
|
|
1596
|
+
seriesIndex: r
|
|
1597
|
+
}),
|
|
1598
|
+
onClick: (e) => cr({
|
|
1599
|
+
datapoint: n,
|
|
1600
|
+
seriesIndex: r
|
|
1601
|
+
})
|
|
1602
|
+
}), null, 16, [
|
|
1603
|
+
"plot",
|
|
1604
|
+
"radius",
|
|
1605
|
+
"shape",
|
|
1606
|
+
"stroke",
|
|
1607
|
+
"strokeWidth",
|
|
1608
|
+
"color",
|
|
1609
|
+
"style",
|
|
1610
|
+
"class",
|
|
1611
|
+
"onMouseenter",
|
|
1612
|
+
"onMouseleave",
|
|
1613
|
+
"onClick"
|
|
1614
|
+
]))), 256)), U.value.dataLabels.show && !X.value ? (b(), m("g", Tt, [(b(!0), m(u, null, S(t.plots, (e, n) => (b(), m(u, null, [n === t.plots.length - 1 || Q.value && Q.value.id === e.id && !U.value.showTooltip ? (b(), m("text", {
|
|
1615
|
+
key: 0,
|
|
1616
|
+
x: e.x,
|
|
1617
|
+
y: e.y + N.value.bestPlotLabel.offsetY - W.value * (Q.value && Q.value.id === e.id && !U.value.showTooltip ? 2 : 1.5),
|
|
1618
|
+
"font-size": N.value.bestPlotLabel.fontSize,
|
|
1619
|
+
fill: N.value.bestPlotLabel.color,
|
|
1620
|
+
"text-anchor": "middle",
|
|
1621
|
+
style: y(`opacity:${A.value.useCssAnimation ? +!Mn.value : 1};transition:opacity 0.2s ease-in;`)
|
|
1622
|
+
}, w(e.name) + " " + w(N.value.bestPlotLabel.showValue ? T(ce)(N.value.formatter, e.value, T(c)({
|
|
1623
|
+
p: `(${N.value.prefix}`,
|
|
1624
|
+
v: e.value,
|
|
1625
|
+
s: `${N.value.suffix})`,
|
|
1626
|
+
r: I.value.labels.bestPlotLabel.rounding
|
|
1627
|
+
}), {
|
|
1628
|
+
datapoint: e,
|
|
1629
|
+
seriesIndex: n
|
|
1630
|
+
}) : ""), 13, Et)) : p("", !0)], 64))), 256))])) : p("", !0)], 64))), 256)),
|
|
1631
|
+
C(e.$slots, "svg", { svg: {
|
|
1632
|
+
...K.value,
|
|
1633
|
+
isPrintingImg: T(En) || T(Dn) || T(Ar),
|
|
1634
|
+
isPrintingSvg: T(jr),
|
|
1635
|
+
boxPlotSummaries: qn.value,
|
|
1636
|
+
series: q.value
|
|
1637
|
+
} }, void 0, !0)
|
|
1638
|
+
], 46, nt)), e.$slots.hint ? (b(), m("div", Dt, [C(e.$slots, "hint", v(_({
|
|
1639
|
+
hint: A.value.a11y.translations.keyboardNavigation,
|
|
1640
|
+
isVisible: un.value
|
|
1641
|
+
})), void 0, !0)])) : p("", !0)]),
|
|
1642
|
+
e.$slots.watermark ? (b(), m("div", Ot, [C(e.$slots, "watermark", v(_({ isPrinting: T(En) || T(Dn) || T(Ar) || T(jr) })), void 0, !0)])) : p("", !0),
|
|
1643
|
+
e.$slots.source ? (b(), m("div", {
|
|
1644
|
+
key: 6,
|
|
1645
|
+
ref_key: "source",
|
|
1646
|
+
ref: Yt,
|
|
1647
|
+
dir: "auto"
|
|
1648
|
+
}, [C(e.$slots, "source", {}, void 0, !0)], 512)) : p("", !0),
|
|
1649
|
+
Ve(T(At), {
|
|
1650
|
+
teleportTo: M.value.teleportTo,
|
|
1651
|
+
show: U.value.showTooltip && Kt.value,
|
|
1652
|
+
backgroundColor: M.value.backgroundColor,
|
|
1653
|
+
color: M.value.color,
|
|
1654
|
+
borderRadius: M.value.borderRadius,
|
|
1655
|
+
borderColor: M.value.borderColor,
|
|
1656
|
+
borderWidth: M.value.borderWidth,
|
|
1657
|
+
fontSize: M.value.fontSize,
|
|
1658
|
+
backgroundOpacity: M.value.backgroundOpacity,
|
|
1659
|
+
position: M.value.position,
|
|
1660
|
+
offsetX: M.value.offsetX,
|
|
1661
|
+
offsetY: M.value.offsetY,
|
|
1662
|
+
parent: O.value,
|
|
1663
|
+
content: qt.value,
|
|
1664
|
+
isFullscreen: $.value,
|
|
1665
|
+
isCustom: T(n)(M.value.customFormat),
|
|
1666
|
+
smooth: M.value.smooth,
|
|
1667
|
+
backdropFilter: M.value.backdropFilter,
|
|
1668
|
+
smoothForce: M.value.smoothForce,
|
|
1669
|
+
smoothSnapThreshold: M.value.smoothSnapThreshold,
|
|
1670
|
+
isA11yMode: k.value === "keyboard",
|
|
1671
|
+
a11yPosition: ln.value
|
|
1672
|
+
}, {
|
|
1673
|
+
"tooltip-before": E(() => [C(e.$slots, "tooltip-before", v(_({ ...or.value })), void 0, !0)]),
|
|
1674
|
+
tooltip: E(() => [C(e.$slots, "tooltip", v(_({ ...or.value })), void 0, !0)]),
|
|
1675
|
+
"tooltip-after": E(() => [C(e.$slots, "tooltip-after", v(_({ ...or.value })), void 0, !0)]),
|
|
1676
|
+
_: 3
|
|
1677
|
+
}, 8, [
|
|
1678
|
+
"teleportTo",
|
|
1679
|
+
"show",
|
|
1680
|
+
"backgroundColor",
|
|
1681
|
+
"color",
|
|
1682
|
+
"borderRadius",
|
|
1683
|
+
"borderColor",
|
|
1684
|
+
"borderWidth",
|
|
1685
|
+
"fontSize",
|
|
1686
|
+
"backgroundOpacity",
|
|
1687
|
+
"position",
|
|
1688
|
+
"offsetX",
|
|
1689
|
+
"offsetY",
|
|
1690
|
+
"parent",
|
|
1691
|
+
"content",
|
|
1692
|
+
"isFullscreen",
|
|
1693
|
+
"isCustom",
|
|
1694
|
+
"smooth",
|
|
1695
|
+
"backdropFilter",
|
|
1696
|
+
"smoothForce",
|
|
1697
|
+
"smoothSnapThreshold",
|
|
1698
|
+
"isA11yMode",
|
|
1699
|
+
"a11yPosition"
|
|
1700
|
+
]),
|
|
1701
|
+
Ut.value && j.value.buttons.table ? (b(), f(qe(Er.value.component), He({ key: 7 }, Er.value.props, {
|
|
1702
|
+
ref_key: "tableUnit",
|
|
1703
|
+
ref: en,
|
|
1704
|
+
onClose: Dr
|
|
1705
|
+
}), ze({
|
|
1706
|
+
content: E(() => [(b(), f(T(Nt), {
|
|
1707
|
+
key: `table_${$t.value}`,
|
|
1708
|
+
colNames: hr.value.colNames,
|
|
1709
|
+
head: hr.value.head,
|
|
1710
|
+
body: hr.value.body,
|
|
1711
|
+
config: hr.value.config,
|
|
1712
|
+
title: A.value.table.useDialog ? "" : Er.value.title,
|
|
1713
|
+
withCloseButton: !A.value.table.useDialog,
|
|
1714
|
+
isCursorPointer: L.value,
|
|
1715
|
+
onClose: Dr
|
|
1716
|
+
}, {
|
|
1717
|
+
th: E(({ th: e }) => [h("div", kt, w(e), 1)]),
|
|
1718
|
+
td: E(({ td: e }) => [Be(w(e.name || e), 1)]),
|
|
1719
|
+
_: 1
|
|
1720
|
+
}, 8, [
|
|
1721
|
+
"colNames",
|
|
1722
|
+
"head",
|
|
1723
|
+
"body",
|
|
1724
|
+
"config",
|
|
1725
|
+
"title",
|
|
1726
|
+
"withCloseButton",
|
|
1727
|
+
"isCursorPointer"
|
|
1728
|
+
]))]),
|
|
1729
|
+
_: 2
|
|
1730
|
+
}, [A.value.table.useDialog ? {
|
|
1731
|
+
name: "title",
|
|
1732
|
+
fn: E(() => [Be(w(Er.value.title), 1)]),
|
|
1733
|
+
key: "0"
|
|
1734
|
+
} : void 0, A.value.table.useDialog ? {
|
|
1735
|
+
name: "actions",
|
|
1736
|
+
fn: E(() => [h("button", {
|
|
1737
|
+
tabindex: "0",
|
|
1738
|
+
class: "vue-ui-user-options-button",
|
|
1739
|
+
onClick: t[1] ||= (e) => mr(j.value.callbacks.csv),
|
|
1740
|
+
style: y({ cursor: L.value ? "pointer" : "default" })
|
|
1741
|
+
}, [Ve(T(jt), {
|
|
1742
|
+
name: "fileCsv",
|
|
1743
|
+
stroke: Er.value.props.color
|
|
1744
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
1745
|
+
key: "1"
|
|
1746
|
+
} : void 0]), 1040)) : p("", !0),
|
|
1747
|
+
C(e.$slots, "skeleton", {}, () => [T(mn) ? (b(), f(Se, { key: 0 })) : p("", !0)], !0)
|
|
1748
|
+
], 46, $e));
|
|
1749
|
+
}
|
|
1750
|
+
}, [["__scopeId", "data-v-e8da9344"]]);
|
|
1751
|
+
//#endregion
|
|
1752
|
+
export { Qe as n, At as t };
|