vue-data-ui 3.0.0-next.43 → 3.0.0-next.45

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 (92) hide show
  1. package/dist/{Arrow-Bd6Ph2ch.js → Arrow-DgEzQzMT.js} +1 -1
  2. package/dist/{BaseDraggableDialog-C--SKjDO.js → BaseDraggableDialog-xCzNGVIr.js} +2 -2
  3. package/dist/{BaseIcon-D7epehwu.js → BaseIcon-CHz9WY7G.js} +1 -1
  4. package/dist/{ColorPicker-BH0rB6ld.js → ColorPicker--Tbj2qVg.js} +2 -2
  5. package/dist/{DataTable-BB8Wz165.js → DataTable-H7_j42qO.js} +2 -2
  6. package/dist/{Legend-vx12pxjd.js → Legend-Dfxs1-GD.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-BmmU-AcQ.js → NonSvgPenAndPaper-C9gTKP8G.js} +3 -3
  8. package/dist/{PackageVersion-D218wea-.js → PackageVersion-D0sIZGN2.js} +1 -1
  9. package/dist/{PenAndPaper-dIGZM-jo.js → PenAndPaper-BNUfeOLb.js} +3 -3
  10. package/dist/{Shape-DWkgkl1v.js → Shape-Cre3W1M8.js} +1 -1
  11. package/dist/Slicer-7n_Mlm0i.js +602 -0
  12. package/dist/{SparkTooltip-CCmYl6zn.js → SparkTooltip-BbxlUnOg.js} +1 -1
  13. package/dist/{Title-BYwMvy7Q.js → Title-ovZyH-bw.js} +1 -1
  14. package/dist/{Tooltip-CIqkHlwJ.js → Tooltip-ECEmqPxW.js} +1 -1
  15. package/dist/{UserOptions-BSMOmm78.js → UserOptions-CA02tiU5.js} +2 -2
  16. package/dist/{dom-to-png-C56Fv7JN.js → dom-to-png-BMnJicCF.js} +1 -1
  17. package/dist/{img-DdFXJwAG.js → img-0LqWW2Ex.js} +1 -1
  18. package/dist/{index-seTAwZa0.js → index-DUNyLppr.js} +31 -4
  19. package/dist/{pdf-Dl8ZF3y5.js → pdf-DqTTCU-h.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +17 -0
  22. package/dist/types/vue-data-ui.d.ts +17 -0
  23. package/dist/{useNestedProp-CU8l_fXF.js → useNestedProp-DhAyQ4OD.js} +1 -1
  24. package/dist/{usePrinter-Dk2fZbxG.js → usePrinter-BgLgX4pp.js} +2 -2
  25. package/dist/{vue-data-ui-DiluSkKR.js → vue-data-ui-DM9ESiFH.js} +64 -64
  26. package/dist/vue-data-ui.js +1 -1
  27. package/dist/{vue-ui-3d-bar-D9JzKCj3.js → vue-ui-3d-bar-Shd_FKOm.js} +6 -6
  28. package/dist/{vue-ui-accordion-BV8sqaEM.js → vue-ui-accordion-BaRXVy_w.js} +3 -3
  29. package/dist/{vue-ui-age-pyramid-ooNy9i5a.js → vue-ui-age-pyramid-BA5AoA6T.js} +6 -6
  30. package/dist/{vue-ui-annotator-C1isLUoY.js → vue-ui-annotator-GGdGlvgw.js} +2 -2
  31. package/dist/{vue-ui-bullet-BJEvtumk.js → vue-ui-bullet-DCvfW39D.js} +7 -7
  32. package/dist/{vue-ui-candlestick-7T6fVigp.js → vue-ui-candlestick-CU7cLFmN.js} +7 -7
  33. package/dist/{vue-ui-carousel-table-CHrwQJKm.js → vue-ui-carousel-table-BHi3YhW1.js} +4 -4
  34. package/dist/{vue-ui-chestnut-1dMZKU8l.js → vue-ui-chestnut-C4lh2sS7.js} +5 -5
  35. package/dist/{vue-ui-chord-BDMYLMI6.js → vue-ui-chord-Dek6mj60.js} +8 -8
  36. package/dist/{vue-ui-circle-pack-DBZ38AiG.js → vue-ui-circle-pack-D3CR4Awy.js} +6 -6
  37. package/dist/{vue-ui-cursor-cymBdQPf.js → vue-ui-cursor-DAeccmuy.js} +2 -2
  38. package/dist/{vue-ui-dashboard-p97MvAL1.js → vue-ui-dashboard-CqQyrQaK.js} +62 -62
  39. package/dist/{vue-ui-digits-DVP-mqGl.js → vue-ui-digits-B8beH3IH.js} +2 -2
  40. package/dist/{vue-ui-donut-DUuJbxDd.js → vue-ui-donut-BYA4b3rG.js} +8 -8
  41. package/dist/{vue-ui-donut-evolution-COL2Q6T8.js → vue-ui-donut-evolution-CqRnKnod.js} +8 -8
  42. package/dist/{vue-ui-dumbbell-CIjWYz3j.js → vue-ui-dumbbell-DWO524KW.js} +7 -7
  43. package/dist/{vue-ui-flow-D0DtQP8s.js → vue-ui-flow-CMTGI20f.js} +7 -7
  44. package/dist/{vue-ui-funnel-DjondOD5.js → vue-ui-funnel-DL89UvEA.js} +6 -6
  45. package/dist/{vue-ui-galaxy-TlGKc0Se.js → vue-ui-galaxy-FVeYk3Ru.js} +5 -5
  46. package/dist/{vue-ui-gauge-CEKh6wdN.js → vue-ui-gauge-D88yEkE-.js} +6 -6
  47. package/dist/{vue-ui-gizmo-KHlyl1I_.js → vue-ui-gizmo-Cij7bBzH.js} +3 -3
  48. package/dist/{vue-ui-heatmap-O-XLCBYP.js → vue-ui-heatmap-CzB7iKi6.js} +7 -7
  49. package/dist/{vue-ui-history-plot-BFRVky6o.js → vue-ui-history-plot-pSkrE5NB.js} +7 -7
  50. package/dist/{vue-ui-kpi-C4pD97vb.js → vue-ui-kpi-CKQLAW0k.js} +3 -3
  51. package/dist/{vue-ui-mini-loader-CFx2urSq.js → vue-ui-mini-loader-CHsEDrqu.js} +2 -2
  52. package/dist/{vue-ui-molecule-CzvTkkvk.js → vue-ui-molecule-C1uJN7Tq.js} +5 -5
  53. package/dist/{vue-ui-mood-radar-Bd1PtwHi.js → vue-ui-mood-radar-DzJ79aVN.js} +7 -7
  54. package/dist/{vue-ui-nested-donuts-D81ruw2p.js → vue-ui-nested-donuts-RQRhd3S9.js} +9 -9
  55. package/dist/{vue-ui-onion-_m4Fz3Zv.js → vue-ui-onion-DIyr7lAX.js} +7 -7
  56. package/dist/{vue-ui-parallel-coordinate-plot-BAsS-UhV.js → vue-ui-parallel-coordinate-plot-0pV8xmkI.js} +8 -8
  57. package/dist/{vue-ui-quadrant-EdLEsbQj.js → vue-ui-quadrant-BSZs47n-.js} +8 -8
  58. package/dist/{vue-ui-quick-chart-CvI_F1vi.js → vue-ui-quick-chart-BORR5gB-.js} +6 -6
  59. package/dist/{vue-ui-radar-ChHw9L0L.js → vue-ui-radar-CZdotZii.js} +7 -7
  60. package/dist/{vue-ui-rating-_759UJ0S.js → vue-ui-rating-BnyBBAi2.js} +2 -2
  61. package/dist/{vue-ui-relation-circle-BE7IyKPH.js → vue-ui-relation-circle-BxEz7R4c.js} +6 -6
  62. package/dist/{vue-ui-ridgeline-DDmQ0KEQ.js → vue-ui-ridgeline-BpXENB67.js} +8 -8
  63. package/dist/{vue-ui-rings-DYR2Zffo.js → vue-ui-rings-CgzrMaMS.js} +8 -8
  64. package/dist/vue-ui-scatter-BW2r6fZY.js +1178 -0
  65. package/dist/{vue-ui-skeleton-NmSoASV8.js → vue-ui-skeleton-_0yYISMA.js} +3 -3
  66. package/dist/{vue-ui-smiley-DD3AcPoa.js → vue-ui-smiley-6EoELJwf.js} +2 -2
  67. package/dist/{vue-ui-spark-trend-CRFIrsdc.js → vue-ui-spark-trend-Dr4-9tPB.js} +3 -3
  68. package/dist/{vue-ui-sparkbar-DYaUzFFQ.js → vue-ui-sparkbar-DBoFnnmf.js} +3 -3
  69. package/dist/{vue-ui-sparkgauge-DFFPfZpj.js → vue-ui-sparkgauge-ByNxRCxn.js} +3 -3
  70. package/dist/{vue-ui-sparkhistogram-DAXOYsKU.js → vue-ui-sparkhistogram-DTTlaprU.js} +4 -4
  71. package/dist/{vue-ui-sparkline-Dq98pgZo.js → vue-ui-sparkline-CHJ0zSWA.js} +3 -3
  72. package/dist/{vue-ui-sparkstackbar-DHm7zDFw.js → vue-ui-sparkstackbar-Dx3v_B_V.js} +3 -3
  73. package/dist/{vue-ui-stackbar-DGcjtz2t.js → vue-ui-stackbar-Cu4V8Rkq.js} +9 -9
  74. package/dist/{vue-ui-strip-plot-mg7SEjXG.js → vue-ui-strip-plot-DO6UPV5d.js} +7 -7
  75. package/dist/{vue-ui-table-ClPA8SKE.js → vue-ui-table-CCCZjmAo.js} +3 -3
  76. package/dist/{vue-ui-table-heatmap-B412nk-m.js → vue-ui-table-heatmap-Cd2mymaB.js} +5 -5
  77. package/dist/{vue-ui-table-sparkline-L_G0kf0u.js → vue-ui-table-sparkline-GdtNr8d3.js} +4 -4
  78. package/dist/{vue-ui-thermometer-CHa-MhGY.js → vue-ui-thermometer-B5N3wZgz.js} +6 -6
  79. package/dist/{vue-ui-timer-wVinu4ky.js → vue-ui-timer-BP5ZlzSE.js} +5 -5
  80. package/dist/{vue-ui-tiremarks-3Ku4fPPU.js → vue-ui-tiremarks-4haJ0VT4.js} +6 -6
  81. package/dist/vue-ui-treemap-Dkk846Tq.js +1035 -0
  82. package/dist/{vue-ui-vertical-bar-DLdtQziT.js → vue-ui-vertical-bar-CwFc2JaR.js} +9 -9
  83. package/dist/{vue-ui-waffle-CC71XEn9.js → vue-ui-waffle-CjgCVEN5.js} +8 -8
  84. package/dist/{vue-ui-wheel-CI_xJP2J.js → vue-ui-wheel-Bb1sXcqP.js} +6 -6
  85. package/dist/{vue-ui-word-cloud-76QvSUIu.js → vue-ui-word-cloud-BMZ3INRy.js} +6 -6
  86. package/dist/{vue-ui-world-BhDu6-N4.js → vue-ui-world-DZty9slh.js} +6 -6
  87. package/dist/{vue-ui-xy-BBqz-9hP.js → vue-ui-xy-Cze2MXJb.js} +1398 -1394
  88. package/dist/{vue-ui-xy-canvas-BEsL3iix.js → vue-ui-xy-canvas-DiXFRGFz.js} +8 -8
  89. package/package.json +1 -1
  90. package/dist/Slicer-LE0PTt3i.js +0 -588
  91. package/dist/vue-ui-scatter-ndISiTaO.js +0 -1047
  92. package/dist/vue-ui-treemap-B8sSc70D.js +0 -967
@@ -1,1047 +0,0 @@
1
- import { defineAsyncComponent as Z, computed as x, 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 F, renderList as Y, toDisplayString as C, createTextVNode as mt, nextTick as bt } from "vue";
2
- import { u as xt, 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 zt, X as St, s as be, Z as Tt, i as U, w as A, f as W, q as Lt, r as Bt, y as Ot, z as Nt } from "./index-seTAwZa0.js";
3
- import { t as Pt, u as Ft } from "./useResponsive-DfdjqQps.js";
4
- import { u as Ze } from "./useNestedProp-CU8l_fXF.js";
5
- import { u as Wt } from "./usePrinter-Dk2fZbxG.js";
6
- import { u as It } from "./useUserOptionState-BIvW1Kz7.js";
7
- import { u as Xt } from "./useChartAccessibility-9icAAmYg.js";
8
- import Yt from "./Legend-vx12pxjd.js";
9
- import Dt from "./Title-BYwMvy7Q.js";
10
- import { _ as Je } from "./Shape-DWkgkl1v.js";
11
- import Rt from "./img-DdFXJwAG.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"], bl = ["x", "y", "font-size", "fill", "font-weight"], xl = ["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 }, zl = ["x", "y", "font-size", "fill"], Sl = ["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"], Fl = {
17
- key: 5,
18
- class: "vue-data-ui-watermark"
19
- }, Wl = ["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-BV8sqaEM.js")), tt = Z(() => import("./DataTable-BB8Wz165.js")), lt = Z(() => import("./PackageVersion-D218wea-.js")), at = Z(() => import("./PenAndPaper-dIGZM-jo.js")), ot = Z(() => import("./vue-ui-skeleton-NmSoASV8.js")), st = Z(() => import("./Tooltip-CIqkHlwJ.js")), ut = Z(() => import("./UserOptions-BSMOmm78.js")), { vue_ui_scatter: it } = xt(), I = Ke, ae = x(() => !!I.dataset && I.dataset.length), z = h(kt()), rt = h(null), re = h(!1), ne = h(""), xe = 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), b = h([]), e = x({
45
- get: () => Le(),
46
- set: (t) => t
47
- }), { userOptionsVisible: ve, setUserOptionsVisibility: ze, keepUserOptionState: Se } = 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 } = Ft({
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: Fe } = Wt({
92
- elementId: `vue-ui-scatter_${z.value}`,
93
- fileName: e.value.style.title.text || "vue-ui-scatter",
94
- options: e.value.userOptions.print
95
- }), nt = x(() => e.value.userOptions.show && !e.value.style.title.text), We = x(() => $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 = x(() => e.value.style.layout.marginalBars.show ? e.value.style.layout.marginalBars.size + e.value.style.layout.marginalBars.offset : 0), n = x(() => ({
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 = x(() => {
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) => !b.value.includes(a.id)).flatMap((a) => a.values.map((v) => v.x))), i = Math.max(...G.value.filter((a) => !b.value.includes(a.id)).flatMap((a) => a.values.map((v) => v.x))), l = Math.min(...G.value.filter((a) => !b.value.includes(a.id)).flatMap((a) => a.values.map((v) => v.y))), o = Math.max(...G.value.filter((a) => !b.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 = x(() => ({
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 = x(() => I.dataset.map((t, i) => {
140
- const l = `cluster_${z.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 : We.value[i] || J[i] || J[i % J.length],
149
- opacity: b.value.includes(l) ? 0.5 : 1,
150
- shape: t.shape ?? "circle",
151
- segregate: () => Re(l),
152
- isSegregated: b.value.includes(l)
153
- };
154
- })), vt = x(() => ({
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 = x(() => 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 : We.value[i] || J[i] || J[i % J.length],
172
- id: `plot_${z.value}_${Math.random()}`,
173
- weight: l.weight ?? e.value.style.layout.plots.radius
174
- }))
175
- })).filter((t) => !b.value.includes(t.id))), S = x(() => 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 = x(() => Math.max(...S.value.flatMap((t) => t.plots.map((i) => Math.abs(i.deviation)))));
205
- function yt() {
206
- return S.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 = x(() => e.value.style.layout.marginalBars.tranches), T = x(() => Xe(ye.value, V.value)), ct = x(() => {
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: zt(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: S.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: S.value,
264
- config: e.value
265
- })) ? ne.value = o({
266
- datapoint: t,
267
- seriesIndex: i,
268
- series: S.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
- W({
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
- W({
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>${W({
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
- b.value.includes(t) ? b.value = b.value.filter((i) => i !== t) : b.value.length < I.dataset.length - 1 && b.value.push(t);
300
- }
301
- function Ve(t = null) {
302
- bt(() => {
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 = S.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 = x(() => {
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 = S.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, xe.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: Fe,
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_${z.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(ze)(!0)),
387
- onMouseleave: i[3] || (i[3] = () => u(ze)(!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(Se) || u(ve)) ? (s(), E(u(ut), {
425
- ref_key: "details",
426
- ref: rt,
427
- key: `user_options_${xe.value}`,
428
- backgroundColor: e.value.style.backgroundColor,
429
- color: e.value.style.color,
430
- isImaging: u(Ne),
431
- isPrinting: u(Oe),
432
- uid: z.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(Fe),
452
- onToggleTable: Ee,
453
- onToggleTooltip: Ue,
454
- onToggleAnnotator: de,
455
- style: j({
456
- visibility: u(Se) ? 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(St),
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(F, null, Y(S.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(be)(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(F, null, Y(S.value, (l, o) => (s(), r("g", null, [
573
- !l.shape || l.shape === "circle" ? (s(), r("g", Kt, [
574
- (s(!0), r(F, 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(be)(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(F, 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(be)(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_${z.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_${z.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(F, 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_${z.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(F, 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_${z.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(F, null, Y(ct.value, (l) => (s(), r(F, null, [
664
- b.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
- b.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
- b.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
- b.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(W)({
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(W)({
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, bl),
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, xl),
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(W)({
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(W)({
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-${z.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(W)({
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, zl),
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(W)({
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, Sl),
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_${z.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(F, null, Y(S.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_${z.value})`
894
- }, null, 8, Nl))), 256)),
895
- (s(!0), r(F, null, Y(S.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(W)({
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", Fl, [
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:${b.value.includes(l.id) ? 0.5 : 1}`)
946
- }, C(l.name), 13, Wl)
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
- smooth: e.value.style.tooltip.smooth,
978
- backdropFilter: e.value.style.tooltip.backdropFilter
979
- }, {
980
- "tooltip-before": _(() => [
981
- M(t.$slots, "tooltip-before", te(le({ ...ce.value })), void 0, !0)
982
- ]),
983
- "tooltip-after": _(() => [
984
- M(t.$slots, "tooltip-after", te(le({ ...ce.value })), void 0, !0)
985
- ]),
986
- default: _(() => [
987
- e.value.style.tooltip.showShape ? (s(), r("div", Il, [
988
- (s(), r("svg", Xl, [
989
- ge(Je, {
990
- shape: y.value.shape,
991
- color: y.value.color,
992
- plot: { x: 10, y: 10 },
993
- radius: 7
994
- }, null, 8, ["shape", "color"])
995
- ]))
996
- ])) : c("", !0)
997
- ]),
998
- _: 3
999
- }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter"]),
1000
- ae.value ? (s(), E(u(et), {
1001
- key: 8,
1002
- hideDetails: "",
1003
- config: {
1004
- open: O.value.showTable,
1005
- maxHeight: 1e4,
1006
- body: {
1007
- backgroundColor: e.value.style.backgroundColor,
1008
- color: e.value.style.color
1009
- },
1010
- head: {
1011
- backgroundColor: e.value.style.backgroundColor,
1012
- color: e.value.style.color
1013
- }
1014
- }
1015
- }, {
1016
- content: _(() => [
1017
- (s(), E(u(tt), {
1018
- key: `table_${Ce.value}`,
1019
- colNames: se.value.colNames,
1020
- head: se.value.head,
1021
- body: se.value.body,
1022
- config: se.value.config,
1023
- title: `${e.value.style.title.text}${e.value.style.title.subtitle.text ? ` : ${e.value.style.title.subtitle.text}` : ""}`,
1024
- onClose: i[1] || (i[1] = (l) => O.value.showTable = !1)
1025
- }, {
1026
- th: _(({ th: l }) => [
1027
- mt(C(l), 1)
1028
- ]),
1029
- td: _(({ td: l }) => [
1030
- l.shape ? (s(), r("div", Yl, [
1031
- d("span", null, C(l.content), 1)
1032
- ])) : (s(), r("div", {
1033
- key: 1,
1034
- innerHTML: l
1035
- }, null, 8, Dl))
1036
- ]),
1037
- _: 1
1038
- }, 8, ["colNames", "head", "body", "config", "title"]))
1039
- ]),
1040
- _: 1
1041
- }, 8, ["config"])) : c("", !0)
1042
- ], 46, jt));
1043
- }
1044
- }, ta = /* @__PURE__ */ Vt(Rl, [["__scopeId", "data-v-bd20363e"]]);
1045
- export {
1046
- ta as default
1047
- };