vue-data-ui 3.0.0-next.7 → 3.0.0-next.70

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.
Files changed (136) hide show
  1. package/dist/{Arrow-Bl8urcli.js → Arrow-fzydFjfE.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-BwazM8ka.js} +2 -2
  3. package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BnbvQjs5.js} +1 -1
  4. package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-DR1Yr4kR.js} +2 -2
  5. package/dist/{DataTable-mQ6Wd-rR.js → DataTable-CKpA_OA_.js} +2 -2
  6. package/dist/{Legend-B2hrDh4G.js → Legend-ChXhJNzd.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-CPOpM7Os.js} +3 -3
  8. package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-CBHvscRY.js} +1 -1
  9. package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-BCcfYvgR.js} +3 -3
  10. package/dist/{Shape-C2qH26wh.js → Shape-C1rNfsMY.js} +43 -37
  11. package/dist/Slicer-D8a4Wv1q.js +602 -0
  12. package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-BUdf02cs.js} +1 -1
  13. package/dist/{Title-B7Xb3YuE.js → Title-feqCv0Si.js} +1 -1
  14. package/dist/{Tooltip-BidRoM5E.js → Tooltip-DQbksria.js} +23 -19
  15. package/dist/{UserOptions-0tvMM8PF.js → UserOptions-CGnAZpYs.js} +2 -2
  16. package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-DTPmkDTK.js} +1 -1
  17. package/dist/{img-D72yZNUg.js → img-_RMhslMZ.js} +1 -1
  18. package/dist/{index-Cg-RjxqH.js → index-CnY41r21.js} +2103 -1411
  19. package/dist/{pdf-DgX01_wu.js → pdf-C02XBmhm.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +600 -22
  22. package/dist/types/vue-data-ui.d.ts +600 -22
  23. package/dist/useAutoSizeLabelsInsideViewbox-DVYZBwNc.js +81 -0
  24. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  25. package/dist/useLoading-D7YHNtLX.js +29 -0
  26. package/dist/useNestedProp-DtUATNAU.js +13 -0
  27. package/dist/usePanZoom-BVca3eMk.js +122 -0
  28. package/dist/{usePrinter-BUzmyQf9.js → usePrinter-CJ1uZx0D.js} +2 -2
  29. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  30. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  31. package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-DDBabVWX.js} +105 -100
  32. package/dist/vue-data-ui.js +23 -22
  33. package/dist/vue-ui-3d-bar-CtPXePUa.js +1323 -0
  34. package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-CnLY8CrQ.js} +3 -3
  35. package/dist/vue-ui-age-pyramid-CvrNLE47.js +834 -0
  36. package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-NuSwWka4.js} +2 -2
  37. package/dist/vue-ui-bullet-CpIVgkPB.js +571 -0
  38. package/dist/vue-ui-candlestick-DGWKUeJp.js +999 -0
  39. package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DWbQS8F3.js} +29 -29
  40. package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-K4-oOYff.js} +5 -5
  41. package/dist/vue-ui-chord-DqmP8yTR.js +1038 -0
  42. package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-D_ufubH5.js} +24 -24
  43. package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-B0tP4woK.js} +2 -2
  44. package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-D_7qyx3P.js} +62 -62
  45. package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-pUQErY07.js} +2 -2
  46. package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-Dl__PVfq.js} +320 -308
  47. package/dist/vue-ui-donut-evolution-BCGGTZZI.js +1075 -0
  48. package/dist/vue-ui-dumbbell-KzCa3k9g.js +1119 -0
  49. package/dist/vue-ui-flow-B1AOqk14.js +841 -0
  50. package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-DCl9v71X.js} +16 -16
  51. package/dist/{vue-ui-galaxy-Cn6vHbaw.js → vue-ui-galaxy-0rAzDHe5.js} +60 -58
  52. package/dist/vue-ui-gauge-Cg4qAOEf.js +791 -0
  53. package/dist/vue-ui-gizmo-CQmMkODw.js +210 -0
  54. package/dist/vue-ui-heatmap-CgkgUDI0.js +1078 -0
  55. package/dist/vue-ui-history-plot-CYvkTszV.js +1073 -0
  56. package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-BDuOZbc2.js} +26 -26
  57. package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-BZaU_YD-.js} +2 -2
  58. package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-HYjHgVuN.js} +53 -51
  59. package/dist/vue-ui-mood-radar-4pYtL93A.js +785 -0
  60. package/dist/vue-ui-nested-donuts-BVbvVm19.js +1286 -0
  61. package/dist/vue-ui-onion-DQg97Dwm.js +776 -0
  62. package/dist/vue-ui-parallel-coordinate-plot-KQ4FTUda.js +915 -0
  63. package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-D8OU7TFs.js} +512 -459
  64. package/dist/vue-ui-quick-chart-BOKDoHdK.js +1761 -0
  65. package/dist/vue-ui-radar-2hTf-Qrf.js +796 -0
  66. package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-QriKDSO7.js} +2 -2
  67. package/dist/vue-ui-relation-circle-DqLiKEHw.js +598 -0
  68. package/dist/vue-ui-ridgeline-CvFlsavM.js +1153 -0
  69. package/dist/vue-ui-rings-B2ges9Ud.js +728 -0
  70. package/dist/vue-ui-scatter-DQJeFlv4.js +1178 -0
  71. package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-Bghm5obp.js} +3 -3
  72. package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-C3SkDNoz.js} +26 -26
  73. package/dist/vue-ui-spark-trend-dd8h3N7H.js +315 -0
  74. package/dist/vue-ui-sparkbar-BTj8M7fY.js +351 -0
  75. package/dist/vue-ui-sparkgauge-BBQAo-W1.js +232 -0
  76. package/dist/vue-ui-sparkhistogram-C4ZEcb8S.js +380 -0
  77. package/dist/vue-ui-sparkline-Bm3GpqJx.js +489 -0
  78. package/dist/vue-ui-sparkstackbar-Dde4iayd.js +421 -0
  79. package/dist/vue-ui-stackbar-DPvfNjwH.js +1370 -0
  80. package/dist/vue-ui-strip-plot-iZIN9U90.js +915 -0
  81. package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-C4EoviSd.js} +11 -11
  82. package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-D-eqO3LU.js} +5 -5
  83. package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-CD7IH49g.js} +14 -14
  84. package/dist/vue-ui-thermometer-BKEFH2Xt.js +541 -0
  85. package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-hhKj1gPp.js} +5 -5
  86. package/dist/vue-ui-tiremarks-CmNwCnVC.js +406 -0
  87. package/dist/vue-ui-treemap-BL7T8x_B.js +1035 -0
  88. package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-CGn_OX3P.js} +71 -69
  89. package/dist/vue-ui-waffle-qfT-wDhI.js +910 -0
  90. package/dist/vue-ui-wheel-B8J8C3AN.js +379 -0
  91. package/dist/vue-ui-word-cloud-B6oHFfEK.js +765 -0
  92. package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-BEv_oTrC.js} +11 -9
  93. package/dist/vue-ui-xy-DPBrciAR.js +3771 -0
  94. package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-BXT3mXj5.js} +265 -264
  95. package/package.json +1 -1
  96. package/dist/Slicer-BD8Z8VCW.js +0 -577
  97. package/dist/useLoading-Bt5Doa8m.js +0 -28
  98. package/dist/useNestedProp-C_G5E08Y.js +0 -13
  99. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  100. package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
  101. package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
  102. package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
  103. package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
  104. package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
  105. package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
  106. package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
  107. package/dist/vue-ui-flow-D_L_xssL.js +0 -765
  108. package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
  109. package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
  110. package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
  111. package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
  112. package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
  113. package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
  114. package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
  115. package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
  116. package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
  117. package/dist/vue-ui-radar-98mXFZe-.js +0 -741
  118. package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
  119. package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
  120. package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
  121. package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
  122. package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
  123. package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
  124. package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
  125. package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
  126. package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
  127. package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
  128. package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
  129. package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
  130. package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
  131. package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
  132. package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
  133. package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
  134. package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
  135. package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
  136. package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
@@ -1,1045 +0,0 @@
1
- import { defineAsyncComponent as Z, computed as b, ref as h, watch as ht, shallowRef as Ge, onMounted as pt, onBeforeUnmount as ft, createElementBlock as r, openBlock as s, unref as u, normalizeStyle as j, normalizeClass as qe, createBlock as E, createCommentVNode as c, createElementVNode as d, createVNode as ge, createSlots as gt, withCtx as _, renderSlot as M, normalizeProps as te, guardReactiveProps as le, Fragment as W, renderList as Y, toDisplayString as C, createTextVNode as mt, nextTick as xt } from "vue";
2
- import { u as bt, c as kt, t as wt, p as J, a as _t, o as Mt, e as me, b as $t, g as He, Y as Ct, a4 as At, V as St, X as zt, s as xe, Z as Tt, i as U, v as A, f as F, q as Lt, r as Bt, x as Ot, y as Nt } from "./index-Cg-RjxqH.js";
3
- import { t as Pt, u as Wt } from "./useResponsive-DfdjqQps.js";
4
- import { u as Ze } from "./useNestedProp-C_G5E08Y.js";
5
- import { u as Ft } from "./usePrinter-BUzmyQf9.js";
6
- import { u as It } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as Xt } from "./useChartAccessibility-9icAAmYg.js";
8
- import Yt from "./Legend-B2hrDh4G.js";
9
- import Dt from "./Title-B7Xb3YuE.js";
10
- import { _ as Je } from "./Shape-C2qH26wh.js";
11
- import Rt from "./img-D72yZNUg.js";
12
- import { _ as Vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
- const jt = ["id"], Et = ["xmlns", "viewBox"], Ut = ["width", "height"], Gt = { key: 1 }, qt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Ht = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Zt = { key: 2 }, Jt = ["points", "fill", "stroke-width", "stroke-dasharray", "stroke"], Kt = { key: 0 }, Qt = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseover"], el = { key: 1 }, tl = { key: 3 }, ll = ["id"], al = ["stop-color"], ol = ["stop-color"], sl = ["id"], ul = ["stop-color"], il = ["stop-color"], rl = ["x", "y", "width", "height", "fill", "stroke", "stroke-width", "rx"], nl = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "rx"], vl = { key: 0 }, yl = ["d", "stroke", "stroke-width"], cl = ["d", "stroke", "stroke-width"], dl = ["d", "stroke", "stroke-width"], hl = ["d", "stroke", "stroke-width"], pl = {
14
- key: 4,
15
- style: { "pointer-events": "none !important" }
16
- }, fl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], gl = ["x1", "x2", "y1", "y2", "stroke", "stroke-width", "stroke-dasharray"], ml = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], xl = ["x", "y", "font-size", "fill", "font-weight"], bl = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], kl = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], wl = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], _l = { key: 5 }, Ml = ["x", "y", "font-size", "fill"], $l = ["x", "y", "font-size", "fill"], Cl = ["id", "transform", "font-size", "font-weight", "fill"], Al = { key: 6 }, Sl = ["x", "y", "font-size", "fill"], zl = ["x", "y", "font-size", "fill"], Tl = ["font-size", "font-weight", "fill", "x", "y"], Ll = ["id"], Bl = ["x", "y", "width", "height"], Ol = { key: 7 }, Nl = ["x1", "x2", "y1", "y2", "stroke-dasharray", "stroke", "stroke-width", "clip-path"], Pl = ["x", "y", "fill", "font-size", "font-weight"], Wl = {
17
- key: 5,
18
- class: "vue-data-ui-watermark"
19
- }, Fl = ["onClick"], Il = {
20
- key: 0,
21
- style: { width: "100%", display: "flex", "align-items": "center", "justify-content": "center" }
22
- }, Xl = {
23
- viewBox: "0 0 20 20",
24
- height: "20",
25
- width: "20",
26
- style: { overflow: "hidden", background: "transparent" }
27
- }, Yl = { key: 0 }, Dl = ["innerHTML"], Rl = {
28
- __name: "vue-ui-scatter",
29
- props: {
30
- config: {
31
- type: Object,
32
- default() {
33
- return {};
34
- }
35
- },
36
- dataset: {
37
- type: Array,
38
- default() {
39
- return [];
40
- }
41
- }
42
- },
43
- setup(Ke, { expose: Qe }) {
44
- const et = Z(() => import("./vue-ui-accordion-CRomxzaL.js")), tt = Z(() => import("./DataTable-mQ6Wd-rR.js")), lt = Z(() => import("./PackageVersion-CeEYZfaH.js")), at = Z(() => import("./PenAndPaper-DhSxfUrQ.js")), ot = Z(() => import("./vue-ui-skeleton-CUOhCY4p.js")), st = Z(() => import("./Tooltip-BidRoM5E.js")), ut = Z(() => import("./UserOptions-0tvMM8PF.js")), { vue_ui_scatter: it } = bt(), I = Ke, ae = b(() => !!I.dataset && I.dataset.length), S = h(kt()), rt = h(null), re = h(!1), ne = h(""), be = h(0), D = h(null), ke = h(null), we = h(null), _e = h(null), Me = h(null), $e = h(0), Ce = h(0), Ae = h(0), x = h([]), e = b({
45
- get: () => Le(),
46
- set: (t) => t
47
- }), { userOptionsVisible: ve, setUserOptionsVisibility: Se, keepUserOptionState: ze } = It({ config: e.value }), { svgRef: Te } = Xt({ config: e.value.style.title });
48
- function Le() {
49
- const t = Ze({
50
- userConfig: I.config,
51
- defaultConfig: it
52
- });
53
- return t.theme ? {
54
- ...Ze({
55
- userConfig: _t.vue_ui_scatter[t.theme] || I.config,
56
- defaultConfig: t
57
- }),
58
- customPalette: wt[t.theme] || J
59
- } : t;
60
- }
61
- ht(() => I.config, (t) => {
62
- e.value = Le(), ve.value = !e.value.userOptions.showOnChartHover, Be(), $e.value += 1, Ce.value += 1, Ae.value += 1, O.value.showTable = e.value.table.show, O.value.showTooltip = e.value.style.tooltip.show;
63
- }, { deep: !0 });
64
- const R = Ge(null), K = Ge(null);
65
- pt(() => {
66
- Be();
67
- });
68
- function Be() {
69
- if (Mt(I.dataset) && me({
70
- componentName: "VueUiScatter",
71
- type: "dataset"
72
- }), e.value.responsive) {
73
- const t = Pt(() => {
74
- const { width: i, height: l } = Wt({
75
- chart: D.value,
76
- title: e.value.style.title.text ? ke.value : null,
77
- legend: e.value.style.legend.show ? we.value : null,
78
- source: _e.value,
79
- noTitle: Me.value
80
- });
81
- requestAnimationFrame(() => {
82
- k.value.width = i, k.value.height = l;
83
- });
84
- });
85
- R.value && (K.value && R.value.unobserve(K.value), R.value.disconnect()), R.value = new ResizeObserver(t), K.value = D.value.parentNode, R.value.observe(K.value);
86
- }
87
- }
88
- ft(() => {
89
- R.value && (K.value && R.value.unobserve(K.value), R.value.disconnect());
90
- });
91
- const { isPrinting: Oe, isImaging: Ne, generatePdf: Pe, generateImage: We } = Ft({
92
- elementId: `vue-ui-scatter_${S.value}`,
93
- fileName: e.value.style.title.text || "vue-ui-scatter",
94
- options: e.value.userOptions.print
95
- }), nt = b(() => e.value.userOptions.show && !e.value.style.title.text), Fe = b(() => $t(e.value.customPalette)), O = h({
96
- showTable: e.value.table.show,
97
- showTooltip: e.value.style.tooltip.show
98
- }), k = h({
99
- height: e.value.style.layout.height,
100
- width: e.value.style.layout.width
101
- }), oe = b(() => e.value.style.layout.marginalBars.show ? e.value.style.layout.marginalBars.size + e.value.style.layout.marginalBars.offset : 0), n = b(() => ({
102
- top: e.value.style.layout.padding.top + oe.value,
103
- right: k.value.width - e.value.style.layout.padding.right - oe.value,
104
- bottom: k.value.height - e.value.style.layout.padding.bottom,
105
- left: e.value.style.layout.padding.left,
106
- height: k.value.height - e.value.style.layout.padding.top - e.value.style.layout.padding.bottom - oe.value,
107
- width: k.value.width - e.value.style.layout.padding.left - e.value.style.layout.padding.right - oe.value
108
- })), p = b(() => {
109
- I.dataset.forEach((a, v) => {
110
- He({
111
- datasetObject: a,
112
- requiredAttributes: ["values"]
113
- }).forEach((f) => {
114
- me({
115
- componentName: "VueUiScatter",
116
- type: "datasetSerieAttribute",
117
- property: f,
118
- index: v
119
- });
120
- }), a.values && a.values.forEach((f, L) => {
121
- He({
122
- datasetObject: f,
123
- requiredAttributes: ["x", "y"]
124
- }).forEach((ee) => {
125
- me({
126
- componentName: "VueUiScatter",
127
- type: "datasetSerieAttribute",
128
- property: `values.${ee}`,
129
- index: `${v} - ${L}`
130
- });
131
- });
132
- });
133
- });
134
- const t = Math.min(...G.value.filter((a) => !x.value.includes(a.id)).flatMap((a) => a.values.map((v) => v.x))), i = Math.max(...G.value.filter((a) => !x.value.includes(a.id)).flatMap((a) => a.values.map((v) => v.x))), l = Math.min(...G.value.filter((a) => !x.value.includes(a.id)).flatMap((a) => a.values.map((v) => v.y))), o = Math.max(...G.value.filter((a) => !x.value.includes(a.id)).flatMap((a) => a.values.map((v) => v.y)));
135
- return { xMin: t >= 0 ? 0 : t, xMax: i, yMin: l >= 0 ? 0 : l, yMax: o };
136
- }), g = b(() => ({
137
- x: n.value.left + Math.abs(p.value.xMin) / (p.value.xMax + Math.abs(p.value.xMin)) * n.value.width,
138
- y: n.value.bottom - Math.abs(p.value.yMin) / (p.value.yMax + Math.abs(p.value.yMin)) * n.value.height
139
- })), G = b(() => I.dataset.map((t, i) => {
140
- const l = `cluster_${S.value}_${i}`;
141
- return {
142
- ...t,
143
- values: Ct({
144
- data: t.values,
145
- threshold: e.value.downsample.threshold
146
- }),
147
- id: l,
148
- color: t.color ? t.color : Fe.value[i] || J[i] || J[i % J.length],
149
- opacity: x.value.includes(l) ? 0.5 : 1,
150
- shape: t.shape ?? "circle",
151
- segregate: () => Re(l),
152
- isSegregated: x.value.includes(l)
153
- };
154
- })), vt = b(() => ({
155
- cy: "scatter-div-legend",
156
- backgroundColor: e.value.style.legend.backgroundColor,
157
- color: e.value.style.legend.color,
158
- fontSize: e.value.style.legend.fontSize,
159
- paddingBottom: 12,
160
- fontWeight: e.value.style.legend.bold ? "bold" : ""
161
- })), ye = b(() => G.value.map((t, i) => ({
162
- ...t,
163
- plots: t.values.map((l) => ({
164
- x: n.value.left + (l.x + Math.abs(p.value.xMin)) / (p.value.xMax + Math.abs(p.value.xMin)) * n.value.width,
165
- y: n.value.bottom - (l.y + Math.abs(p.value.yMin)) / (p.value.yMax + Math.abs(p.value.yMin)) * n.value.height,
166
- v: {
167
- ...l,
168
- name: l.name || ""
169
- },
170
- clusterName: t.name,
171
- color: t.color ? t.color : Fe.value[i] || J[i] || J[i % J.length],
172
- id: `plot_${S.value}_${Math.random()}`,
173
- weight: l.weight ?? e.value.style.layout.plots.radius
174
- }))
175
- })).filter((t) => !x.value.includes(t.id))), z = b(() => ye.value.map((t) => {
176
- const i = t.plots.reduce((m, q) => m + q.x, 0) / t.plots.length, l = t.plots.reduce((m, q) => m + q.y, 0) / t.plots.length;
177
- let o = 0, a = 0, v = 0;
178
- for (const m of t.plots)
179
- o += (m.x - i) * (m.y - l), a += (m.x - i) ** 2, v += (m.y - l) ** 2;
180
- const f = o / Math.sqrt(a * v), L = f * (Math.sqrt(v) / Math.sqrt(a)), ee = l - L * i, P = {
181
- x1: n.value.left,
182
- x2: n.value.right,
183
- y1: L * n.value.left + ee,
184
- y2: L * n.value.right + ee,
185
- coefficient: f
186
- }, $ = (P.y2 - P.y1) / (P.x2 - P.x1), B = P.y1 - $ * P.x1, X = Math.min(k.value.width - e.value.style.layout.padding.right, Math.max(e.value.style.layout.padding.left, (n.value.top - B) / $)), ie = {
187
- x: X,
188
- y: $ * X + B <= e.value.style.layout.padding.top ? n.value.top : $ * X + B
189
- };
190
- return {
191
- ...t,
192
- correlation: P,
193
- label: ie,
194
- plots: t.plots.map((m) => {
195
- const q = (m.x + $ * m.y - $ * B) / (1 + Math.pow($, 2)), he = ($ * m.x + Math.pow($, 2) * m.y + B) / (1 + Math.pow($, 2)), w = Math.sqrt(Math.pow(m.x - q, 2) + Math.pow(m.y - he, 2));
196
- return {
197
- ...m,
198
- deviation: w,
199
- shape: t.shape,
200
- color: t.color
201
- };
202
- })
203
- };
204
- })), Ie = b(() => Math.max(...z.value.flatMap((t) => t.plots.map((i) => Math.abs(i.deviation)))));
205
- function yt() {
206
- return z.value;
207
- }
208
- function Xe(t, i) {
209
- const l = Array.isArray(t) ? t.flatMap((w) => w.plots.map((H) => ({
210
- x: H.x,
211
- y: H.y
212
- }))) : t.plots.map((w) => ({
213
- x: w.x,
214
- y: w.y
215
- }));
216
- let o = 1 / 0, a = -1 / 0, v = 1 / 0, f = -1 / 0;
217
- l.forEach(({ x: w, y: H }) => {
218
- o = Math.min(o, w), a = Math.max(a, w), v = Math.min(v, H), f = Math.max(f, H);
219
- });
220
- const L = a - o, ee = f - v, P = L / i, $ = ee / i, B = Array(i).fill(0), X = Array(i).fill(0);
221
- l.forEach(({ x: w, y: H }) => {
222
- const pe = Math.floor((w - o) / P), fe = Math.floor((H - v) / $);
223
- B[pe] || (B[pe] = 0), X[fe] || (X[fe] = 0), B[pe] += 1, X[fe] += 1;
224
- });
225
- const ie = [], m = [];
226
- for (let w = 0; w < i; w += 1)
227
- ie.push(o + (w + 0.5) * P), m.push(v + (w + 0.5) * $);
228
- const q = Math.max(...B), he = Math.max(...X);
229
- return { x: B, y: X, avgX: ie, avgY: m, maxX: q, maxY: he };
230
- }
231
- const V = b(() => e.value.style.layout.marginalBars.tranches), T = b(() => Xe(ye.value, V.value)), ct = b(() => {
232
- const t = n.value.top - e.value.style.layout.marginalBars.offset, i = n.value.right + e.value.style.layout.marginalBars.offset;
233
- return ye.value.map((l) => {
234
- const o = Xe(l, V.value);
235
- return {
236
- coords: o,
237
- dX: St(o.avgX.map((a, v) => ({
238
- x: a,
239
- y: t - o.x[v] / o.maxX * e.value.style.layout.marginalBars.size
240
- }))),
241
- dY: At(o.avgY.map((a, v) => ({
242
- y: a,
243
- x: i + e.value.style.layout.marginalBars.size * o.y[v] / o.maxY
244
- }))),
245
- color: l.color,
246
- id: l.id
247
- };
248
- });
249
- }), N = h(void 0), y = h(null), ce = h(null);
250
- function Ye(t, i) {
251
- N.value = t.id, y.value = t;
252
- let l = "";
253
- ce.value = {
254
- datapoint: t,
255
- seriesIndex: i,
256
- series: z.value,
257
- config: e.value
258
- };
259
- const o = e.value.style.tooltip.customFormat;
260
- Ot(o) && Nt(() => o({
261
- datapoint: t,
262
- seriesIndex: i,
263
- series: z.value,
264
- config: e.value
265
- })) ? ne.value = o({
266
- datapoint: t,
267
- seriesIndex: i,
268
- series: z.value,
269
- config: e.value
270
- }) : (t.clusterName && (l += `<div style="display:flex;gap:3px;align-items:center">${t.clusterName}</div>`), t.v.name && (l += `<div>${t.v.name}</div>`), l += `<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${e.value.style.tooltip.borderColor}">`, l += `<div>${e.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(t.v.x) ? "-" : U(
271
- e.value.style.layout.plots.selectors.labels.x.formatter,
272
- t.v.x,
273
- F({
274
- p: e.value.style.tooltip.prefix,
275
- v: t.v.x,
276
- s: e.value.style.tooltip.suffix,
277
- r: e.value.style.tooltip.roundingValue
278
- }),
279
- { datapoint: t, seriesIndex: i }
280
- )}</b></div>`, l += `<div>${e.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(t.v.y) ? "-" : U(
281
- e.value.style.layout.plots.selectors.labels.y.formatter,
282
- t.v.y,
283
- F({
284
- p: e.value.style.tooltip.prefix,
285
- v: t.v.y,
286
- s: e.value.style.tooltip.suffix,
287
- r: e.value.style.tooltip.roundingValue
288
- }),
289
- { datapoint: t, seriesIndex: i }
290
- )}</b></div>`, l += `${e.value.style.layout.plots.deviation.translation}: <b>${F({
291
- v: t.deviation,
292
- r: e.value.style.layout.plots.deviation.roundingValue
293
- })}</b>`, l += "</div>", ne.value = `<div>${l}</div>`), re.value = !0;
294
- }
295
- function De() {
296
- re.value = !1, N.value = void 0, y.value = null;
297
- }
298
- function Re(t) {
299
- x.value.includes(t) ? x.value = x.value.filter((i) => i !== t) : x.value.length < I.dataset.length - 1 && x.value.push(t);
300
- }
301
- function Ve(t = null) {
302
- xt(() => {
303
- const i = ["", 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 = z.value.map((v) => [
304
- v.name,
305
- v.correlation.coefficient,
306
- v.plots.length,
307
- v.plots.map((f) => f.v.x).reduce((f, L) => f + L, 0) / v.plots.length,
308
- v.plots.map((f) => f.v.y).reduce((f, L) => f + L, 0) / v.plots.length
309
- ]), o = [[e.value.style.title.text], [e.value.style.title.subtitle.text], [[""], [""], [""]]].concat([i]).concat(l), a = Lt(o);
310
- t ? t(a) : Bt({ csvContent: a, title: e.value.style.title.text || "vue-ui-heatmap" });
311
- });
312
- }
313
- const se = b(() => {
314
- const t = [
315
- e.value.table.translations.series,
316
- e.value.table.translations.correlationCoefficient,
317
- e.value.table.translations.nbrPlots,
318
- `${e.value.style.layout.dataLabels.xAxis.name} ${e.value.table.translations.average}`,
319
- `${e.value.style.layout.dataLabels.yAxis.name} ${e.value.table.translations.average}`
320
- ], i = z.value.map((o) => [
321
- {
322
- shape: o.shape,
323
- content: o.name,
324
- color: o.color
325
- },
326
- Number((o.correlation.coefficient ?? 0).toFixed(e.value.table.td.roundingValue)).toLocaleString(),
327
- o.plots.length.toLocaleString(),
328
- Number((o.plots.map((a) => a.v.x ?? 0).reduce((a, v) => a + v, 0) / o.plots.length).toFixed(e.value.table.td.roundingAverage)).toLocaleString(),
329
- Number((o.plots.map((a) => a.v.y ?? 0).reduce((a, v) => a + v, 0) / o.plots.length).toFixed(e.value.table.td.roundingAverage)).toLocaleString()
330
- ]), l = {
331
- th: {
332
- backgroundColor: e.value.table.th.backgroundColor,
333
- color: e.value.table.th.color,
334
- outline: e.value.table.th.outline
335
- },
336
- td: {
337
- backgroundColor: e.value.table.td.backgroundColor,
338
- color: e.value.table.td.color,
339
- outline: e.value.table.td.outline
340
- },
341
- breakpoint: e.value.table.responsiveBreakpoint
342
- };
343
- return { head: t, body: i, config: l, colNames: t };
344
- }), Q = h(!1);
345
- function je(t) {
346
- Q.value = t, be.value += 1;
347
- }
348
- function Ee() {
349
- O.value.showTable = !O.value.showTable;
350
- }
351
- function Ue() {
352
- O.value.showTooltip = !O.value.showTooltip;
353
- }
354
- const ue = h(!1);
355
- function de() {
356
- ue.value = !ue.value;
357
- }
358
- async function dt({ scale: t = 2 } = {}) {
359
- if (!D.value) return;
360
- const { width: i, height: l } = D.value.getBoundingClientRect(), o = i / l, { imageUri: a, base64: v } = await Rt({ domElement: D.value, base64: !0, img: !0, scale: t });
361
- return {
362
- imageUri: a,
363
- base64: v,
364
- title: e.value.style.title.text,
365
- width: i,
366
- height: l,
367
- aspectRatio: o
368
- };
369
- }
370
- return Qe({
371
- getData: yt,
372
- getImage: dt,
373
- generatePdf: Pe,
374
- generateCsv: Ve,
375
- generateImage: We,
376
- toggleTable: Ee,
377
- toggleTooltip: Ue,
378
- toggleAnnotator: de,
379
- toggleFullscreen: je
380
- }), (t, i) => (s(), r("div", {
381
- class: qe(`vue-ui-scatter ${Q.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
382
- ref_key: "scatterChart",
383
- ref: D,
384
- id: `vue-ui-scatter_${S.value}`,
385
- style: j(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
386
- onMouseenter: i[2] || (i[2] = () => u(Se)(!0)),
387
- onMouseleave: i[3] || (i[3] = () => u(Se)(!1))
388
- }, [
389
- e.value.userOptions.buttons.annotator ? (s(), E(u(at), {
390
- key: 0,
391
- svgRef: u(Te),
392
- backgroundColor: e.value.style.backgroundColor,
393
- color: e.value.style.color,
394
- active: ue.value,
395
- onClose: de
396
- }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : c("", !0),
397
- nt.value ? (s(), r("div", {
398
- key: 1,
399
- ref_key: "noTitle",
400
- ref: Me,
401
- class: "vue-data-ui-no-title-space",
402
- style: "height:36px; width: 100%;background:transparent"
403
- }, null, 512)) : c("", !0),
404
- e.value.style.title.text ? (s(), r("div", {
405
- key: 2,
406
- ref_key: "chartTitle",
407
- ref: ke,
408
- style: "width:100%;background:transparent"
409
- }, [
410
- (s(), E(Dt, {
411
- key: `title_${$e.value}`,
412
- config: {
413
- title: {
414
- cy: "scatter-div-title",
415
- ...e.value.style.title
416
- },
417
- subtitle: {
418
- cy: "scatter-div-subtitle",
419
- ...e.value.style.title.subtitle
420
- }
421
- }
422
- }, null, 8, ["config"]))
423
- ], 512)) : c("", !0),
424
- e.value.userOptions.show && ae.value && (u(ze) || u(ve)) ? (s(), E(u(ut), {
425
- ref_key: "details",
426
- ref: rt,
427
- key: `user_options_${be.value}`,
428
- backgroundColor: e.value.style.backgroundColor,
429
- color: e.value.style.color,
430
- isImaging: u(Ne),
431
- isPrinting: u(Oe),
432
- uid: S.value,
433
- hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.tooltip.show,
434
- hasPdf: e.value.userOptions.buttons.pdf,
435
- hasImg: e.value.userOptions.buttons.img,
436
- hasXls: e.value.userOptions.buttons.csv,
437
- hasTable: e.value.userOptions.buttons.table,
438
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
439
- isTooltip: O.value.showTooltip,
440
- isFullscreen: Q.value,
441
- titles: { ...e.value.userOptions.buttonTitles },
442
- chartElement: D.value,
443
- position: e.value.userOptions.position,
444
- hasAnnotator: e.value.userOptions.buttons.annotator,
445
- isAnnotation: ue.value,
446
- callbacks: e.value.userOptions.callbacks,
447
- printScale: e.value.userOptions.print.scale,
448
- onToggleFullscreen: je,
449
- onGeneratePdf: u(Pe),
450
- onGenerateCsv: Ve,
451
- onGenerateImage: u(We),
452
- onToggleTable: Ee,
453
- onToggleTooltip: Ue,
454
- onToggleAnnotator: de,
455
- style: j({
456
- visibility: u(ze) ? u(ve) ? "visible" : "hidden" : "visible"
457
- })
458
- }, gt({ _: 2 }, [
459
- t.$slots.menuIcon ? {
460
- name: "menuIcon",
461
- fn: _(({ isOpen: l, color: o }) => [
462
- M(t.$slots, "menuIcon", te(le({ isOpen: l, color: o })), void 0, !0)
463
- ]),
464
- key: "0"
465
- } : void 0,
466
- t.$slots.optionTooltip ? {
467
- name: "optionTooltip",
468
- fn: _(() => [
469
- M(t.$slots, "optionTooltip", {}, void 0, !0)
470
- ]),
471
- key: "1"
472
- } : void 0,
473
- t.$slots.optionPdf ? {
474
- name: "optionPdf",
475
- fn: _(() => [
476
- M(t.$slots, "optionPdf", {}, void 0, !0)
477
- ]),
478
- key: "2"
479
- } : void 0,
480
- t.$slots.optionCsv ? {
481
- name: "optionCsv",
482
- fn: _(() => [
483
- M(t.$slots, "optionCsv", {}, void 0, !0)
484
- ]),
485
- key: "3"
486
- } : void 0,
487
- t.$slots.optionImg ? {
488
- name: "optionImg",
489
- fn: _(() => [
490
- M(t.$slots, "optionImg", {}, void 0, !0)
491
- ]),
492
- key: "4"
493
- } : void 0,
494
- t.$slots.optionTable ? {
495
- name: "optionTable",
496
- fn: _(() => [
497
- M(t.$slots, "optionTable", {}, void 0, !0)
498
- ]),
499
- key: "5"
500
- } : void 0,
501
- t.$slots.optionFullscreen ? {
502
- name: "optionFullscreen",
503
- fn: _(({ toggleFullscreen: l, isFullscreen: o }) => [
504
- M(t.$slots, "optionFullscreen", te(le({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
505
- ]),
506
- key: "6"
507
- } : void 0,
508
- t.$slots.optionAnnotator ? {
509
- name: "optionAnnotator",
510
- fn: _(({ toggleAnnotator: l, isAnnotator: o }) => [
511
- M(t.$slots, "optionAnnotator", te(le({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
512
- ]),
513
- key: "7"
514
- } : void 0
515
- ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasTooltip", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : c("", !0),
516
- ae.value ? (s(), r("svg", {
517
- key: 4,
518
- ref_key: "svgRef",
519
- ref: Te,
520
- xmlns: u(zt),
521
- class: qe({ "vue-data-ui-fullscreen--on": Q.value, "vue-data-ui-fulscreen--off": !Q.value }),
522
- viewBox: `0 0 ${k.value.width <= 0 ? 10 : k.value.width} ${k.value.height <= 0 ? 10 : k.value.height}`,
523
- style: j(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.color}`)
524
- }, [
525
- ge(u(lt)),
526
- t.$slots["chart-background"] ? (s(), r("foreignObject", {
527
- key: 0,
528
- x: 0,
529
- y: 0,
530
- width: k.value.width <= 0 ? 10 : k.value.width,
531
- height: k.value.height <= 0 ? 10 : k.value.height,
532
- style: {
533
- pointerEvents: "none"
534
- }
535
- }, [
536
- M(t.$slots, "chart-background", {}, void 0, !0)
537
- ], 8, Ut)) : c("", !0),
538
- e.value.style.layout.axis.show ? (s(), r("g", Gt, [
539
- d("line", {
540
- x1: g.value.x,
541
- x2: g.value.x,
542
- y1: n.value.top,
543
- y2: n.value.bottom,
544
- stroke: e.value.style.layout.axis.stroke,
545
- "stroke-width": e.value.style.layout.axis.strokeWidth,
546
- "stroke-linecap": "round"
547
- }, null, 8, qt),
548
- d("line", {
549
- x1: n.value.left,
550
- x2: n.value.right,
551
- y1: g.value.y,
552
- y2: g.value.y,
553
- stroke: e.value.style.layout.axis.stroke,
554
- "stroke-width": e.value.style.layout.axis.strokeWidth,
555
- "stroke-linecap": "round"
556
- }, null, 8, Ht)
557
- ])) : c("", !0),
558
- e.value.style.layout.plots.giftWrap.show ? (s(), r("g", Zt, [
559
- (s(!0), r(W, null, Y(z.value, (l, o) => (s(), r("g", null, [
560
- l.plots.length > 2 ? (s(), r("polygon", {
561
- key: 0,
562
- points: u(Tt)({ series: l.plots }),
563
- fill: u(xe)(l.color, e.value.style.layout.plots.giftWrap.fillOpacity * 100),
564
- "stroke-width": e.value.style.layout.plots.giftWrap.strokeWidth,
565
- "stroke-dasharray": e.value.style.layout.plots.giftWrap.strokeDasharray,
566
- stroke: l.color,
567
- "stroke-linejoin": "round",
568
- "stroke-linecap": "round"
569
- }, null, 8, Jt)) : c("", !0)
570
- ]))), 256))
571
- ])) : c("", !0),
572
- (s(!0), r(W, null, Y(z.value, (l, o) => (s(), r("g", null, [
573
- !l.shape || l.shape === "circle" ? (s(), r("g", Kt, [
574
- (s(!0), r(W, null, Y(l.plots, (a, v) => (s(), r("circle", {
575
- cx: a.x,
576
- cy: a.y,
577
- r: N.value && N.value === a.id ? a.weight * 2 : a.weight,
578
- fill: u(xe)(l.color, e.value.style.layout.plots.opacity * 100),
579
- stroke: e.value.style.layout.plots.stroke,
580
- "stroke-width": e.value.style.layout.plots.strokeWidth,
581
- onMouseover: (f) => Ye(a, o),
582
- onMouseleave: De,
583
- style: j(`opacity:${N.value && N.value === a.id ? 1 : e.value.style.layout.plots.significance.useDistanceOpacity ? 1 - Math.abs(a.deviation) / Ie.value : e.value.style.layout.plots.significance.show && Math.abs(a.deviation) > e.value.style.layout.plots.significance.deviationThreshold ? e.value.style.layout.plots.significance.opacity : 1}`)
584
- }, null, 44, Qt))), 256))
585
- ])) : (s(), r("g", el, [
586
- (s(!0), r(W, null, Y(l.plots, (a, v) => (s(), E(Je, {
587
- plot: { x: a.x, y: a.y },
588
- radius: N.value && N.value === a.id ? a.weight * 2 : a.weight,
589
- shape: l.shape,
590
- color: u(xe)(l.color, e.value.style.layout.plots.opacity * 100),
591
- stroke: e.value.style.layout.plots.stroke,
592
- strokeWidth: e.value.style.layout.plots.strokeWidth,
593
- onMouseover: (f) => Ye(a, o),
594
- onMouseleave: De,
595
- style: j(`opacity:${N.value && N.value === a.id ? 1 : e.value.style.layout.plots.significance.useDistanceOpacity ? 1 - Math.abs(a.deviation) / Ie.value : e.value.style.layout.plots.significance.show && Math.abs(a.deviation) > e.value.style.layout.plots.significance.deviationThreshold ? e.value.style.layout.plots.significance.opacity : 1}`)
596
- }, null, 8, ["plot", "radius", "shape", "color", "stroke", "strokeWidth", "onMouseover", "style"]))), 256))
597
- ]))
598
- ]))), 256)),
599
- e.value.style.layout.marginalBars.show ? (s(), r("g", tl, [
600
- d("defs", null, [
601
- d("linearGradient", {
602
- id: `marginal_x_${S.value}`,
603
- x1: "0%",
604
- y1: "0%",
605
- x2: "0%",
606
- y2: "100%"
607
- }, [
608
- d("stop", {
609
- offset: "0%",
610
- "stop-color": e.value.style.layout.marginalBars.fill
611
- }, null, 8, al),
612
- d("stop", {
613
- offset: "100%",
614
- "stop-color": e.value.style.backgroundColor
615
- }, null, 8, ol)
616
- ], 8, ll),
617
- d("linearGradient", {
618
- id: `marginal_y_${S.value}`,
619
- x1: "0%",
620
- x2: "100%",
621
- y1: "0%",
622
- y2: "0%"
623
- }, [
624
- d("stop", {
625
- offset: "0%",
626
- "stop-color": e.value.style.backgroundColor
627
- }, null, 8, ul),
628
- d("stop", {
629
- offset: "100%",
630
- "stop-color": e.value.style.layout.marginalBars.fill
631
- }, null, 8, il)
632
- ], 8, sl)
633
- ]),
634
- (s(!0), r(W, null, Y(T.value.x, (l, o) => (s(), r("g", null, [
635
- l && T.value.avgX[o] ? (s(), r("rect", {
636
- key: 0,
637
- x: T.value.avgX[o] - n.value.width / V.value / 2,
638
- y: n.value.top - e.value.style.layout.marginalBars.offset - l / T.value.maxX * e.value.style.layout.marginalBars.size,
639
- width: n.value.width / V.value <= 0 ? 1e-4 : n.value.width / V.value,
640
- height: l / T.value.maxX * e.value.style.layout.marginalBars.size <= 0 ? 1e-4 : l / T.value.maxX * e.value.style.layout.marginalBars.size,
641
- fill: e.value.style.layout.marginalBars.useGradient ? `url(#marginal_x_${S.value})` : e.value.style.layout.marginalBars.fill,
642
- style: j(`opacity:${e.value.style.layout.marginalBars.opacity}`),
643
- stroke: e.value.style.backgroundColor,
644
- "stroke-width": e.value.style.layout.marginalBars.strokeWidth,
645
- rx: e.value.style.layout.marginalBars.borderRadius
646
- }, null, 12, rl)) : c("", !0)
647
- ]))), 256)),
648
- (s(!0), r(W, null, Y(T.value.y, (l, o) => (s(), r("g", null, [
649
- l && T.value.avgY[o] ? (s(), r("rect", {
650
- key: 0,
651
- x: n.value.right + e.value.style.layout.marginalBars.offset,
652
- y: T.value.avgY[o] - n.value.height / V.value / 2,
653
- height: n.value.height / V.value <= 0 ? 1e-4 : n.value.height / V.value,
654
- width: l / T.value.maxY * e.value.style.layout.marginalBars.size <= 0 ? 1e-4 : l / T.value.maxY * e.value.style.layout.marginalBars.size,
655
- fill: e.value.style.layout.marginalBars.useGradient ? `url(#marginal_y_${S.value})` : e.value.style.layout.marginalBars.fill,
656
- style: j(`opacity:${e.value.style.layout.marginalBars.opacity}`),
657
- stroke: e.value.style.backgroundColor,
658
- "stroke-width": e.value.style.layout.marginalBars.strokeWidth,
659
- rx: e.value.style.layout.marginalBars.borderRadius
660
- }, null, 12, nl)) : c("", !0)
661
- ]))), 256)),
662
- e.value.style.layout.marginalBars.showLines ? (s(), r("g", vl, [
663
- (s(!0), r(W, null, Y(ct.value, (l) => (s(), r(W, null, [
664
- x.value.includes(l.id) ? c("", !0) : (s(), r("path", {
665
- key: 0,
666
- d: `M ${l.dX}`,
667
- stroke: e.value.style.backgroundColor,
668
- "stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth + 1,
669
- "stroke-linecap": "round",
670
- "stroke-linejoin": "round",
671
- fill: "none"
672
- }, null, 8, yl)),
673
- x.value.includes(l.id) ? c("", !0) : (s(), r("path", {
674
- key: 1,
675
- d: `M ${l.dX}`,
676
- stroke: l.color,
677
- "stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth,
678
- "stroke-linecap": "round",
679
- "stroke-linejoin": "round",
680
- fill: "none"
681
- }, null, 8, cl)),
682
- x.value.includes(l.id) ? c("", !0) : (s(), r("path", {
683
- key: 2,
684
- d: `M ${l.dY}`,
685
- stroke: e.value.style.backgroundColor,
686
- "stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth + 1,
687
- "stroke-linecap": "round",
688
- "stroke-linejoin": "round",
689
- fill: "none"
690
- }, null, 8, dl)),
691
- x.value.includes(l.id) ? c("", !0) : (s(), r("path", {
692
- key: 3,
693
- d: `M ${l.dY}`,
694
- stroke: l.color,
695
- "stroke-width": e.value.style.layout.marginalBars.linesStrokeWidth,
696
- "stroke-linecap": "round",
697
- "stroke-linejoin": "round",
698
- fill: "none"
699
- }, null, 8, hl))
700
- ], 64))), 256))
701
- ])) : c("", !0)
702
- ])) : c("", !0),
703
- y.value && e.value.style.layout.plots.selectors.show ? (s(), r("g", pl, [
704
- d("line", {
705
- x1: g.value.x,
706
- x2: y.value.x,
707
- y1: y.value.y,
708
- y2: y.value.y,
709
- stroke: e.value.style.layout.plots.selectors.stroke,
710
- "stroke-width": e.value.style.layout.plots.selectors.strokeWidth,
711
- "stroke-dasharray": e.value.style.layout.plots.selectors.strokeDasharray,
712
- "stroke-linecap": "round",
713
- class: "line-pointer"
714
- }, null, 8, fl),
715
- d("line", {
716
- x1: y.value.x,
717
- x2: y.value.x,
718
- y1: g.value.y,
719
- y2: y.value.y,
720
- stroke: e.value.style.layout.plots.selectors.stroke,
721
- "stroke-width": e.value.style.layout.plots.selectors.strokeWidth,
722
- "stroke-dasharray": e.value.style.layout.plots.selectors.strokeDasharray,
723
- "stroke-linecap": "round",
724
- class: "line-pointer"
725
- }, null, 8, gl),
726
- d("text", {
727
- x: g.value.x + (y.value.x > g.value.x ? -6 : 6),
728
- y: y.value.y + e.value.style.layout.plots.selectors.labels.fontSize / 3,
729
- "font-size": e.value.style.layout.plots.selectors.labels.fontSize,
730
- fill: e.value.style.layout.plots.selectors.labels.color,
731
- "font-weight": e.value.style.layout.plots.selectors.labels.bold ? "bold" : "normal",
732
- "text-anchor": y.value.x > g.value.x ? "end" : "start"
733
- }, C(u(U)(
734
- e.value.style.layout.plots.selectors.labels.y.formatter,
735
- u(A)(y.value.v.y),
736
- u(F)({
737
- p: e.value.style.layout.plots.selectors.labels.prefix,
738
- v: u(A)(y.value.v.y),
739
- s: e.value.style.layout.plots.selectors.labels.suffix,
740
- r: e.value.style.layout.plots.selectors.labels.rounding
741
- }),
742
- { datapoint: y.value }
743
- )), 9, ml),
744
- d("text", {
745
- x: y.value.x,
746
- y: g.value.y + (y.value.y > g.value.y ? -6 : e.value.style.layout.plots.selectors.labels.fontSize + 6),
747
- "font-size": e.value.style.layout.plots.selectors.labels.fontSize,
748
- fill: e.value.style.layout.plots.selectors.labels.color,
749
- "font-weight": e.value.style.layout.plots.selectors.labels.bold ? "bold" : "normal",
750
- "text-anchor": "middle"
751
- }, C(u(U)(
752
- e.value.style.layout.plots.selectors.labels.y.formatter,
753
- u(A)(y.value.v.x),
754
- u(F)({
755
- p: e.value.style.layout.plots.selectors.labels.prefix,
756
- v: u(A)(y.value.v.x),
757
- s: e.value.style.layout.plots.selectors.labels.suffix,
758
- r: e.value.style.layout.plots.selectors.labels.rounding
759
- }),
760
- { datapoint: y.value }
761
- )), 9, xl),
762
- d("circle", {
763
- cx: g.value.x,
764
- cy: y.value.y,
765
- r: e.value.style.layout.plots.selectors.markers.radius,
766
- fill: e.value.style.layout.plots.selectors.markers.fill,
767
- stroke: e.value.style.layout.plots.selectors.markers.stroke,
768
- "stroke-width": e.value.style.layout.plots.selectors.markers.strokeWidth,
769
- class: "line-pointer"
770
- }, null, 8, bl),
771
- d("circle", {
772
- cx: y.value.x,
773
- cy: g.value.y,
774
- r: e.value.style.layout.plots.selectors.markers.radius,
775
- fill: e.value.style.layout.plots.selectors.markers.fill,
776
- stroke: e.value.style.layout.plots.selectors.markers.stroke,
777
- "stroke-width": e.value.style.layout.plots.selectors.markers.strokeWidth,
778
- class: "line-pointer"
779
- }, null, 8, kl),
780
- e.value.style.layout.plots.selectors.labels.showName ? (s(), r("text", {
781
- key: 0,
782
- x: y.value.x,
783
- y: y.value.y + (y.value.y < g.value.y ? -e.value.style.layout.plots.selectors.labels.fontSize / 2 : e.value.style.layout.plots.selectors.labels.fontSize),
784
- "font-size": e.value.style.layout.plots.selectors.labels.fontSize,
785
- fill: e.value.style.layout.plots.selectors.labels.color,
786
- "font-weight": e.value.style.layout.plots.selectors.labels.bold ? "bold" : "normal",
787
- "text-anchor": y.value.x < n.value.left + 100 ? "start" : y.value.x > n.value.right - 100 ? "end" : y.value.x > g.value.x ? "start" : "end"
788
- }, C(y.value.v.name), 9, wl)) : c("", !0)
789
- ])) : c("", !0),
790
- e.value.style.layout.dataLabels.xAxis.show ? (s(), r("g", _l, [
791
- d("text", {
792
- x: n.value.left - 5,
793
- y: g.value.y + e.value.style.layout.dataLabels.xAxis.fontSize / 3,
794
- "text-anchor": "end",
795
- "font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
796
- fill: e.value.style.layout.dataLabels.xAxis.color
797
- }, C(u(U)(
798
- e.value.style.layout.plots.selectors.labels.x.formatter,
799
- u(A)(p.value.xMin),
800
- u(F)({
801
- p: e.value.style.layout.plots.selectors.labels.prefix,
802
- v: u(A)(p.value.xMin),
803
- s: e.value.style.layout.plots.selectors.labels.suffix,
804
- r: e.value.style.layout.dataLabels.xAxis.rounding
805
- })
806
- )), 9, Ml),
807
- d("text", {
808
- x: n.value.right + 3,
809
- y: g.value.y + e.value.style.layout.dataLabels.xAxis.fontSize / 3,
810
- "text-anchor": "start",
811
- "font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
812
- fill: e.value.style.layout.dataLabels.xAxis.color
813
- }, C(u(U)(
814
- e.value.style.layout.plots.selectors.labels.x.formatter,
815
- u(A)(p.value.xMax),
816
- u(F)({
817
- p: e.value.style.layout.plots.selectors.labels.prefix,
818
- v: u(A)(p.value.xMax),
819
- s: e.value.style.layout.plots.selectors.labels.suffix,
820
- r: e.value.style.layout.dataLabels.xAxis.rounding
821
- })
822
- )), 9, $l),
823
- d("text", {
824
- id: `vue-ui-scatter-xAxis-label-${S.value}`,
825
- transform: `translate(${e.value.style.layout.dataLabels.xAxis.fontSize * 2}, ${n.value.top + n.value.height / 2}), rotate(-90)`,
826
- "text-anchor": "middle",
827
- "font-size": e.value.style.layout.dataLabels.xAxis.fontSize,
828
- "font-weight": e.value.style.layout.dataLabels.xAxis.bold ? "bold" : "normal",
829
- fill: e.value.style.layout.dataLabels.xAxis.color
830
- }, C(e.value.style.layout.dataLabels.xAxis.name), 9, Cl)
831
- ])) : c("", !0),
832
- e.value.style.layout.dataLabels.yAxis.show ? (s(), r("g", Al, [
833
- d("text", {
834
- x: g.value.x,
835
- y: n.value.bottom + e.value.style.layout.dataLabels.yAxis.fontSize + 3,
836
- "text-anchor": "middle",
837
- "font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
838
- fill: e.value.style.layout.dataLabels.yAxis.color
839
- }, C(u(U)(
840
- e.value.style.layout.plots.selectors.labels.y.formatter,
841
- u(A)(p.value.yMin),
842
- u(F)({
843
- p: e.value.style.layout.plots.selectors.labels.prefix,
844
- v: u(A)(p.value.yMin),
845
- s: e.value.style.layout.plots.selectors.labels.suffix,
846
- r: e.value.style.layout.dataLabels.yAxis.rounding
847
- })
848
- )), 9, Sl),
849
- d("text", {
850
- x: g.value.x,
851
- y: n.value.top - e.value.style.layout.dataLabels.yAxis.fontSize / 2,
852
- "text-anchor": "middle",
853
- "font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
854
- fill: e.value.style.layout.dataLabels.yAxis.color
855
- }, C(u(U)(
856
- e.value.style.layout.plots.selectors.labels.y.formatter,
857
- u(A)(p.value.yMax),
858
- u(F)({
859
- p: e.value.style.layout.plots.selectors.labels.prefix,
860
- v: u(A)(p.value.yMax),
861
- s: e.value.style.layout.plots.selectors.labels.suffix,
862
- r: e.value.style.layout.dataLabels.yAxis.rounding
863
- })
864
- )), 9, zl),
865
- d("text", {
866
- "text-anchor": "middle",
867
- "font-size": e.value.style.layout.dataLabels.yAxis.fontSize,
868
- "font-weight": e.value.style.layout.dataLabels.yAxis.bold ? "bold" : "normal",
869
- fill: e.value.style.layout.dataLabels.yAxis.color,
870
- x: n.value.left + n.value.width / 2,
871
- y: n.value.bottom + 8 + e.value.style.layout.dataLabels.yAxis.fontSize * 2
872
- }, C(e.value.style.layout.dataLabels.yAxis.name), 9, Tl)
873
- ])) : c("", !0),
874
- d("clipPath", {
875
- id: `clip_path_${S.value}`
876
- }, [
877
- d("rect", {
878
- x: n.value.left,
879
- y: n.value.top,
880
- width: n.value.width <= 0 ? 1e-4 : n.value.width,
881
- height: n.value.height <= 0 ? 1e-4 : n.value.height
882
- }, null, 8, Bl)
883
- ], 8, Ll),
884
- e.value.style.layout.correlation.show ? (s(), r("g", Ol, [
885
- (s(!0), r(W, null, Y(z.value, (l, o) => (s(), r("line", {
886
- x1: l.correlation.x1,
887
- x2: l.correlation.x2,
888
- y1: l.correlation.y1,
889
- y2: l.correlation.y2,
890
- "stroke-dasharray": e.value.style.layout.correlation.strokeDasharray,
891
- stroke: l.color,
892
- "stroke-width": e.value.style.layout.correlation.strokeWidth,
893
- "clip-path": `url(#clip_path_${S.value})`
894
- }, null, 8, Nl))), 256)),
895
- (s(!0), r(W, null, Y(z.value, (l, o) => (s(), r("g", null, [
896
- e.value.style.layout.correlation.label.show ? (s(), r("text", {
897
- key: 0,
898
- x: l.label.x,
899
- y: l.label.y,
900
- fill: e.value.style.layout.correlation.label.useSerieColor ? l.color : e.value.style.layout.correlation.label.color,
901
- "font-size": e.value.style.layout.correlation.label.fontSize,
902
- "font-weight": e.value.style.layout.correlation.label.bold ? "bold" : "normal"
903
- }, C(u(F)({
904
- v: u(A)(l.correlation.coefficient),
905
- r: e.value.style.layout.correlation.label.roundingValue
906
- })), 9, Pl)) : c("", !0)
907
- ]))), 256))
908
- ])) : c("", !0),
909
- M(t.$slots, "svg", { svg: k.value }, void 0, !0)
910
- ], 14, Et)) : c("", !0),
911
- t.$slots.watermark ? (s(), r("div", Wl, [
912
- M(t.$slots, "watermark", te(le({ isPrinting: u(Oe) || u(Ne) })), void 0, !0)
913
- ])) : c("", !0),
914
- ae.value ? c("", !0) : (s(), E(u(ot), {
915
- key: 6,
916
- config: {
917
- type: "quadrant",
918
- style: {
919
- backgroundColor: e.value.style.backgroundColor,
920
- quadrant: {
921
- grid: {
922
- color: e.value.style.layout.axis.stroke
923
- },
924
- plots: {
925
- color: e.value.style.layout.axis.stroke,
926
- radius: 1
927
- }
928
- }
929
- }
930
- }
931
- }, null, 8, ["config"])),
932
- d("div", {
933
- ref_key: "chartLegend",
934
- ref: we
935
- }, [
936
- e.value.style.legend.show ? (s(), E(Yt, {
937
- key: `legend_${Ae.value}`,
938
- legendSet: G.value,
939
- config: vt.value,
940
- onClickMarker: i[0] || (i[0] = ({ legend: l }) => Re(l.id))
941
- }, {
942
- item: _(({ legend: l }) => [
943
- d("div", {
944
- onClick: (o) => l.segregate(),
945
- style: j(`opacity:${x.value.includes(l.id) ? 0.5 : 1}`)
946
- }, C(l.name), 13, Fl)
947
- ]),
948
- _: 1
949
- }, 8, ["legendSet", "config"])) : M(t.$slots, "legend", {
950
- key: 1,
951
- legend: G.value
952
- }, void 0, !0)
953
- ], 512),
954
- t.$slots.source ? (s(), r("div", {
955
- key: 7,
956
- ref_key: "source",
957
- ref: _e,
958
- dir: "auto"
959
- }, [
960
- M(t.$slots, "source", {}, void 0, !0)
961
- ], 512)) : c("", !0),
962
- ge(u(st), {
963
- show: O.value.showTooltip && re.value,
964
- backgroundColor: e.value.style.tooltip.backgroundColor,
965
- color: e.value.style.tooltip.color,
966
- borderRadius: e.value.style.tooltip.borderRadius,
967
- borderColor: e.value.style.tooltip.borderColor,
968
- borderWidth: e.value.style.tooltip.borderWidth,
969
- fontSize: e.value.style.tooltip.fontSize,
970
- backgroundOpacity: e.value.style.tooltip.backgroundOpacity,
971
- position: e.value.style.tooltip.position,
972
- offsetY: e.value.style.tooltip.offsetY,
973
- parent: D.value,
974
- content: ne.value,
975
- isFullscreen: Q.value,
976
- isCustom: e.value.style.tooltip.customFormat && typeof e.value.style.tooltip.customFormat == "function"
977
- }, {
978
- "tooltip-before": _(() => [
979
- M(t.$slots, "tooltip-before", te(le({ ...ce.value })), void 0, !0)
980
- ]),
981
- "tooltip-after": _(() => [
982
- M(t.$slots, "tooltip-after", te(le({ ...ce.value })), void 0, !0)
983
- ]),
984
- default: _(() => [
985
- e.value.style.tooltip.showShape ? (s(), r("div", Il, [
986
- (s(), r("svg", Xl, [
987
- ge(Je, {
988
- shape: y.value.shape,
989
- color: y.value.color,
990
- plot: { x: 10, y: 10 },
991
- radius: 7
992
- }, null, 8, ["shape", "color"])
993
- ]))
994
- ])) : c("", !0)
995
- ]),
996
- _: 3
997
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
998
- ae.value ? (s(), E(u(et), {
999
- key: 8,
1000
- hideDetails: "",
1001
- config: {
1002
- open: O.value.showTable,
1003
- maxHeight: 1e4,
1004
- body: {
1005
- backgroundColor: e.value.style.backgroundColor,
1006
- color: e.value.style.color
1007
- },
1008
- head: {
1009
- backgroundColor: e.value.style.backgroundColor,
1010
- color: e.value.style.color
1011
- }
1012
- }
1013
- }, {
1014
- content: _(() => [
1015
- (s(), E(u(tt), {
1016
- key: `table_${Ce.value}`,
1017
- colNames: se.value.colNames,
1018
- head: se.value.head,
1019
- body: se.value.body,
1020
- config: se.value.config,
1021
- title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? ` : ${e.value.style.title.subtitle.text}` : ""}`,
1022
- onClose: i[1] || (i[1] = (l) => O.value.showTable = !1)
1023
- }, {
1024
- th: _(({ th: l }) => [
1025
- mt(C(l), 1)
1026
- ]),
1027
- td: _(({ td: l }) => [
1028
- l.shape ? (s(), r("div", Yl, [
1029
- d("span", null, C(l.content), 1)
1030
- ])) : (s(), r("div", {
1031
- key: 1,
1032
- innerHTML: l
1033
- }, null, 8, Dl))
1034
- ]),
1035
- _: 1
1036
- }, 8, ["colNames", "head", "body", "config", "title"]))
1037
- ]),
1038
- _: 1
1039
- }, 8, ["config"])) : c("", !0)
1040
- ], 46, jt));
1041
- }
1042
- }, ta = /* @__PURE__ */ Vt(Rl, [["__scopeId", "data-v-3b36f62b"]]);
1043
- export {
1044
- ta as default
1045
- };