vue-data-ui 2.3.75 → 2.3.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-BTG7M25z.js → Arrow-Dj2zuGLq.js} +1 -1
- package/dist/{Arrow-CZK77NmC.cjs → Arrow-VCEIU9wi.cjs} +1 -1
- package/dist/{BaseIcon--PMhZ3f-.cjs → BaseIcon-CP535rdy.cjs} +1 -1
- package/dist/{BaseIcon-BAOfPaXs.js → BaseIcon-Cbr8np30.js} +1 -1
- package/dist/{DataTable-DjQzrklZ.cjs → DataTable-CeHw-cqZ.cjs} +1 -1
- package/dist/{DataTable-CQANRZju.js → DataTable-OAUXdIYA.js} +2 -2
- package/dist/{Legend-DX1kv21U.js → Legend-BVByqGqZ.js} +1 -1
- package/dist/{Legend-CtbPB0Bo.cjs → Legend-DfU44fjz.cjs} +1 -1
- package/dist/{Shape-CadGs1Am.cjs → Shape-B6cEKeIN.cjs} +1 -1
- package/dist/{Shape-kqcyauhC.js → Shape-Clmb3iTX.js} +1 -1
- package/dist/{Slicer-yaJs-izT.js → Slicer-BlRQsQu0.js} +12 -12
- package/dist/{Slicer-i_oECHxH.cjs → Slicer-Dt9iqvAA.cjs} +1 -1
- package/dist/{Title-XBiDFYKD.cjs → Title-D9lSjLTg.cjs} +1 -1
- package/dist/{Title-C26I_HC3.js → Title-gvR5aS6q.js} +1 -1
- package/dist/{Tooltip-CH8GmDCG.js → Tooltip-BGmkuAK4.js} +23 -23
- package/dist/Tooltip-C0PSN8vf.cjs +1 -0
- package/dist/{index-Cm4Iry5c.js → index-0KN57HdM.js} +1147 -1145
- package/dist/index-TabZg_HV.cjs +4 -0
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-w7AMWWmz.cjs → useNestedProp-CoLyVvV9.cjs} +1 -1
- package/dist/{useNestedProp-CurQIHTa.js → useNestedProp-NeGalTYk.js} +1 -1
- package/dist/{usePrinter-ZlHxdaEz.cjs → usePrinter--7sLxlpn.cjs} +1 -1
- package/dist/{usePrinter-B8RnF8_q.js → usePrinter-BvKYEc1z.js} +1 -1
- package/dist/{vue-data-ui-B7amrpT-.cjs → vue-data-ui-CNZP_Hk4.cjs} +1 -1
- package/dist/{vue-data-ui-Bj6kEIpq.js → vue-data-ui-Du0OReJH.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +9 -9
- package/dist/vue-ui-3d-bar-AUSKibZS.cjs +19 -0
- package/dist/{vue-ui-3d-bar-Bg9IgVVc.js → vue-ui-3d-bar-Dasj0J9j.js} +342 -342
- package/dist/{vue-ui-accordion-1WxrfiCH.cjs → vue-ui-accordion-0uSZBHsp.cjs} +1 -1
- package/dist/{vue-ui-accordion-Cb6XBCbu.js → vue-ui-accordion-CczyfFaC.js} +3 -3
- package/dist/vue-ui-age-pyramid-CjBr4CXC.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-BhwmnQru.js → vue-ui-age-pyramid-DZ7vnojR.js} +22 -22
- package/dist/{vue-ui-annotator-BiHQvMdW.js → vue-ui-annotator-BWwxpp_v.js} +39 -39
- package/dist/{vue-ui-annotator-B22cdlhA.cjs → vue-ui-annotator-CyYSiELS.cjs} +2 -2
- package/dist/{vue-ui-candlestick-D7DjdYyw.cjs → vue-ui-candlestick-B9oSgBPN.cjs} +2 -2
- package/dist/{vue-ui-candlestick-Cl9dyh4l.js → vue-ui-candlestick-Dr9aS-Ku.js} +34 -34
- package/dist/vue-ui-carousel-table-CjDze14W.cjs +1 -0
- package/dist/{vue-ui-carousel-table-QsONwqNz.js → vue-ui-carousel-table-D2LK5a9p.js} +83 -81
- package/dist/{vue-ui-chestnut-Drb01WMC.js → vue-ui-chestnut-DIqR-vZo.js} +291 -288
- package/dist/vue-ui-chestnut-RhZaDeRG.cjs +6 -0
- package/dist/vue-ui-cursor-7QhVReKN.cjs +1 -0
- package/dist/{vue-ui-cursor-BP04_XbB.js → vue-ui-cursor-BxHK0bB7.js} +20 -20
- package/dist/{vue-ui-dashboard-Z63RE1XS.cjs → vue-ui-dashboard-DO-zVgDu.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BWdx5gjZ.js → vue-ui-dashboard-fYKECIc7.js} +2 -2
- package/dist/{vue-ui-digits-DUhkLcmd.js → vue-ui-digits-B8hAl2RW.js} +2 -2
- package/dist/{vue-ui-digits-CBQaHW6a.cjs → vue-ui-digits-CSsB4Zlr.cjs} +1 -1
- package/dist/{vue-ui-donut-DRPSwmGr.js → vue-ui-donut-D5DTvWXB.js} +60 -60
- package/dist/vue-ui-donut-D8evqk7g.cjs +1 -0
- package/dist/vue-ui-donut-evolution-BUdWXb-N.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-gRXAyxq8.js → vue-ui-donut-evolution-CPTiiUY6.js} +106 -106
- package/dist/{vue-ui-dumbbell-CQo5jqSK.js → vue-ui-dumbbell-CfeTfNTU.js} +17 -17
- package/dist/{vue-ui-dumbbell-DLfZcrXq.cjs → vue-ui-dumbbell-Fm-Bqc5W.cjs} +1 -1
- package/dist/{vue-ui-flow-BlX2-eEC.cjs → vue-ui-flow-24WIcZVL.cjs} +1 -1
- package/dist/{vue-ui-flow-BQ3UbMUb.js → vue-ui-flow-B2WWQo6P.js} +28 -28
- package/dist/{vue-ui-galaxy-Cax5o6Yl.cjs → vue-ui-galaxy-DkRizJxm.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BHWugUKG.js → vue-ui-galaxy-yfpv7Hky.js} +22 -22
- package/dist/vue-ui-gauge-BkB7BlNM.cjs +1 -0
- package/dist/{vue-ui-gauge-DG6_kvKh.js → vue-ui-gauge-CRVB3wlV.js} +99 -108
- package/dist/{vue-ui-gizmo-bV148qAf.js → vue-ui-gizmo-DJYOx_YH.js} +2 -2
- package/dist/{vue-ui-gizmo-D9Vh9Rmr.cjs → vue-ui-gizmo-Zyo15xm3.cjs} +1 -1
- package/dist/{vue-ui-heatmap-BZZUvnMa.js → vue-ui-heatmap-C6fDCc7O.js} +17 -17
- package/dist/{vue-ui-heatmap-B_ELXKKV.cjs → vue-ui-heatmap-uynT8kN9.cjs} +1 -1
- package/dist/{vue-ui-kpi-C5v7qQvZ.js → vue-ui-kpi-CGC4h9uF.js} +3 -3
- package/dist/{vue-ui-kpi-CwVAvTB2.cjs → vue-ui-kpi-CqEEFb04.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BdKizX_J.js → vue-ui-mini-loader-2A0YUUIB.js} +2 -2
- package/dist/{vue-ui-mini-loader-DZNY-3rr.cjs → vue-ui-mini-loader-ku9X16tx.cjs} +1 -1
- package/dist/{vue-ui-molecule-bva6OvPc.cjs → vue-ui-molecule-Bv1IBx1L.cjs} +1 -1
- package/dist/{vue-ui-molecule-MKyrhqqm.js → vue-ui-molecule-CwcUmg-k.js} +33 -33
- package/dist/vue-ui-mood-radar-Bf5g118s.cjs +1 -0
- package/dist/{vue-ui-mood-radar-BNIFFvq0.js → vue-ui-mood-radar-V04waMIM.js} +129 -132
- package/dist/{vue-ui-nested-donuts-CxdZC6JF.cjs → vue-ui-nested-donuts-DgVrAToy.cjs} +2 -2
- package/dist/{vue-ui-nested-donuts-BDAlZrMF.js → vue-ui-nested-donuts-DoFALZtp.js} +98 -98
- package/dist/{vue-ui-onion-Df7YcsVR.cjs → vue-ui-onion-BdZC2qt8.cjs} +1 -1
- package/dist/{vue-ui-onion-CFa4VD-w.js → vue-ui-onion-_GaJ78t_.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-D7Q2zfcR.cjs → vue-ui-parallel-coordinate-plot-BHYr1iqZ.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-DmqYXT-U.js → vue-ui-parallel-coordinate-plot-Eh0gXDVG.js} +24 -24
- package/dist/vue-ui-quadrant-BEhnCog2.cjs +1 -0
- package/dist/{vue-ui-quadrant-D5jHkq9g.js → vue-ui-quadrant-C4LHosyR.js} +35 -35
- package/dist/{vue-ui-quick-chart-BjXXSx7V.js → vue-ui-quick-chart-IqY67olA.js} +69 -69
- package/dist/{vue-ui-quick-chart-Dt9AsEU6.cjs → vue-ui-quick-chart-YFEmJP_6.cjs} +1 -1
- package/dist/{vue-ui-radar-CW8EKW4o.js → vue-ui-radar-BSsDvnVt.js} +39 -39
- package/dist/{vue-ui-radar-2EuZr7i2.cjs → vue-ui-radar-Cel3ZnfN.cjs} +1 -1
- package/dist/{vue-ui-rating-eSWsmJUU.js → vue-ui-rating-Bb1xXC_r.js} +6 -6
- package/dist/{vue-ui-rating-DrtLvVA0.cjs → vue-ui-rating-D-qBEM1w.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-DiUCpEqa.js → vue-ui-relation-circle-CSqi6DqF.js} +29 -29
- package/dist/vue-ui-relation-circle-fb8g1ms8.cjs +1 -0
- package/dist/{vue-ui-rings-CHq-a5ZS.cjs → vue-ui-rings-Bgb538Wa.cjs} +2 -2
- package/dist/{vue-ui-rings-BxhLbyG0.js → vue-ui-rings-ezoy9PIq.js} +31 -31
- package/dist/vue-ui-scatter-B7z6AOLU.cjs +1 -0
- package/dist/{vue-ui-scatter-DQchX_mM.js → vue-ui-scatter-Ci5l--xS.js} +95 -95
- package/dist/{vue-ui-screenshot-CLa9vMzM.js → vue-ui-screenshot-C2X1am1d.js} +4 -4
- package/dist/{vue-ui-screenshot-SLSIpqx2.cjs → vue-ui-screenshot-DLXQWgeo.cjs} +1 -1
- package/dist/vue-ui-skeleton-CYeXVNFu.cjs +41 -0
- package/dist/{vue-ui-skeleton-C1oUnz7R.js → vue-ui-skeleton-dgMXr8k9.js} +96 -96
- package/dist/{vue-ui-smiley-Daw8fPDy.cjs → vue-ui-smiley-CDhXPYa7.cjs} +1 -1
- package/dist/{vue-ui-smiley-CmWHSt1S.js → vue-ui-smiley-DXb5VqXk.js} +2 -2
- package/dist/vue-ui-spark-trend-1hcgCu8H.cjs +1 -0
- package/dist/{vue-ui-spark-trend-CO69Dg31.js → vue-ui-spark-trend-Bv1-LLRs.js} +21 -21
- package/dist/vue-ui-sparkbar-CWdFQTkx.cjs +1 -0
- package/dist/{vue-ui-sparkbar-BRlqpe4e.js → vue-ui-sparkbar-CbmzVXcW.js} +10 -10
- package/dist/{vue-ui-sparkgauge-CbuFESsM.js → vue-ui-sparkgauge-CHODK9jn.js} +8 -8
- package/dist/{vue-ui-sparkgauge-CCxKzDjT.cjs → vue-ui-sparkgauge-r7VEpPtv.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-B4-hrDHz.js → vue-ui-sparkhistogram-CKiO1LGI.js} +111 -101
- package/dist/vue-ui-sparkhistogram-Do5qTT2U.cjs +1 -0
- package/dist/vue-ui-sparkline-Bw3dw-vW.cjs +1 -0
- package/dist/{vue-ui-sparkline-DlXNmG6M.js → vue-ui-sparkline-DLU7hK0K.js} +34 -34
- package/dist/{vue-ui-sparkstackbar-J1YowQmP.js → vue-ui-sparkstackbar-B3TQVHlU.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-CDmZeXnq.cjs → vue-ui-sparkstackbar-CD-HZ4Rq.cjs} +1 -1
- package/dist/{vue-ui-stackbar-CXGWukoJ.cjs → vue-ui-stackbar-2WJh-QtY.cjs} +2 -2
- package/dist/{vue-ui-stackbar-CKIDqkkY.js → vue-ui-stackbar-BnIeIS12.js} +202 -200
- package/dist/{vue-ui-strip-plot-JVLwIy0j.js → vue-ui-strip-plot-CddHmHSX.js} +26 -26
- package/dist/{vue-ui-strip-plot-CvmoRcYN.cjs → vue-ui-strip-plot-DyL8FH29.cjs} +1 -1
- package/dist/{vue-ui-table-BSi_cHh7.js → vue-ui-table-BZ6yonvx.js} +1 -1
- package/dist/{vue-ui-table-Dqi64VE7.cjs → vue-ui-table-_Sxgp6iC.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CfvW3rcm.js → vue-ui-table-heatmap-CYOgunS2.js} +24 -24
- package/dist/{vue-ui-table-heatmap-BwghEh5t.cjs → vue-ui-table-heatmap-DGWhBhp0.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-Y6Lrrzxy.js → vue-ui-table-sparkline-D33NLyyx.js} +26 -26
- package/dist/{vue-ui-table-sparkline-bIy3kkHB.cjs → vue-ui-table-sparkline-IVMQG6tp.cjs} +1 -1
- package/dist/{vue-ui-thermometer-DDtxYr7w.cjs → vue-ui-thermometer-8XDaKLt5.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BPTs7Nxc.js → vue-ui-thermometer-DMwZ2O16.js} +40 -40
- package/dist/{vue-ui-timer-DRSSYxOX.cjs → vue-ui-timer-B3_-DhDj.cjs} +1 -1
- package/dist/{vue-ui-timer-CkB7eZaE.js → vue-ui-timer-D59VSia6.js} +8 -8
- package/dist/{vue-ui-tiremarks-BbOaoY8S.js → vue-ui-tiremarks-Bczw28td.js} +18 -18
- package/dist/{vue-ui-tiremarks-Bttwg3-p.cjs → vue-ui-tiremarks-Br_jF9bH.cjs} +1 -1
- package/dist/{vue-ui-treemap-CoaK3wBl.js → vue-ui-treemap-DGJNw2WX.js} +29 -29
- package/dist/{vue-ui-treemap-Chq0WQPe.cjs → vue-ui-treemap-DLHdaXss.cjs} +1 -1
- package/dist/vue-ui-vertical-bar-BGYrmyAK.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-BA43_uHV.js → vue-ui-vertical-bar-De0N4Ggo.js} +14 -14
- package/dist/{vue-ui-waffle-NBjY0mko.cjs → vue-ui-waffle-CJPVEDgC.cjs} +1 -1
- package/dist/{vue-ui-waffle-BoEf8CcG.js → vue-ui-waffle-CnXLf5xd.js} +84 -84
- package/dist/{vue-ui-wheel-Bgo2jpj0.js → vue-ui-wheel-Bciq0JM9.js} +24 -24
- package/dist/{vue-ui-wheel-t5bI4a-P.cjs → vue-ui-wheel-CAKYmn0b.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DPW_-Hzz.cjs → vue-ui-word-cloud-4ooTRM2O.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-Jd9_JUyi.js → vue-ui-word-cloud-CWm6r9Zf.js} +19 -19
- package/dist/{vue-ui-xy-BMBYAC4z.js → vue-ui-xy-B5nBhYgd.js} +351 -350
- package/dist/vue-ui-xy-Ch5hDEec.cjs +3 -0
- package/dist/{vue-ui-xy-canvas-LOsQ_DM-.js → vue-ui-xy-canvas-CzLTSmDS.js} +18 -18
- package/dist/vue-ui-xy-canvas-d-EE9_dN.cjs +9 -0
- package/package.json +1 -1
- package/dist/Tooltip-DxtWkIt5.cjs +0 -1
- package/dist/index-DYUBiaGS.cjs +0 -4
- package/dist/vue-ui-3d-bar-BAz41kL7.cjs +0 -19
- package/dist/vue-ui-age-pyramid-CHNvRXx8.cjs +0 -1
- package/dist/vue-ui-carousel-table-Do5cYRqN.cjs +0 -1
- package/dist/vue-ui-chestnut-CyE8MafY.cjs +0 -6
- package/dist/vue-ui-cursor-DZeTQBKz.cjs +0 -1
- package/dist/vue-ui-donut-D2YJYgOB.cjs +0 -1
- package/dist/vue-ui-donut-evolution-jAMVgNHQ.cjs +0 -1
- package/dist/vue-ui-gauge-DpGcv_00.cjs +0 -1
- package/dist/vue-ui-mood-radar-CzQOAyNI.cjs +0 -1
- package/dist/vue-ui-quadrant-ZqhcVYf5.cjs +0 -1
- package/dist/vue-ui-relation-circle-C60OTe88.cjs +0 -1
- package/dist/vue-ui-scatter-DZUZUbnk.cjs +0 -1
- package/dist/vue-ui-skeleton-ClpTCY1x.cjs +0 -41
- package/dist/vue-ui-spark-trend-DmDlv8ie.cjs +0 -1
- package/dist/vue-ui-sparkbar-BUGdi0BY.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-XtqX10_t.cjs +0 -1
- package/dist/vue-ui-sparkline-BZTEi9YC.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BLIUt-HT.cjs +0 -4
- package/dist/vue-ui-xy-CBHEBcZK.cjs +0 -3
- package/dist/vue-ui-xy-canvas-D5FqRF4p.cjs +0 -9
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useCssVars as _e, computed as c, ref as u, watch as pe, onMounted as $e, onBeforeUnmount as Ce, openBlock as s, createElementBlock as o, normalizeStyle as h, createBlock as E, createCommentVNode as p, unref as y, createSlots as xe, withCtx as z, renderSlot as $, normalizeProps as K, guardReactiveProps as Q, normalizeClass as L, createElementVNode as we, Fragment as b, renderList as O, toDisplayString as be } from "vue";
|
|
2
|
-
import { u as Oe, c as Pe, t as Ae, a as Ie, p as Z, b as Fe, o as Ee, e as ee, g as ze, X as Le } from "./index-
|
|
2
|
+
import { u as Oe, c as Pe, t as Ae, a as Ie, p as Z, b as Fe, o as Ee, e as ee, g as ze, X as Le } from "./index-0KN57HdM.js";
|
|
3
3
|
import { t as Se, u as Ne } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Re } from "./Title-
|
|
5
|
-
import { u as Te, U as Me } from "./usePrinter-
|
|
6
|
-
import je from "./vue-ui-skeleton-
|
|
7
|
-
import { u as te } from "./useNestedProp-
|
|
4
|
+
import { _ as Re } from "./Title-gvR5aS6q.js";
|
|
5
|
+
import { u as Te, U as Me } from "./usePrinter-BvKYEc1z.js";
|
|
6
|
+
import je from "./vue-ui-skeleton-dgMXr8k9.js";
|
|
7
|
+
import { u as te } from "./useNestedProp-NeGalTYk.js";
|
|
8
8
|
import { _ as Be } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "stroke-width"], Ve = { key: 0 }, We = ["stroke", "d", "stroke-width"], Xe = { key: 1 }, Ye = ["stroke", "x1", "x2", "y1", "y2"], qe = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], He = ["cx", "cy", "fill", "onClick", "r"], Je = {
|
|
10
10
|
key: 3,
|
|
@@ -28,9 +28,9 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
|
|
|
28
28
|
setup(le, { expose: re }) {
|
|
29
29
|
const d = le;
|
|
30
30
|
_e((e) => ({
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
31
|
+
"7995534c": ue.value,
|
|
32
|
+
"31095f2b": ie.value,
|
|
33
|
+
"7c93c1cd": oe.value
|
|
34
34
|
}));
|
|
35
35
|
const { vue_ui_relation_circle: se } = Oe(), P = c(() => !!d.dataset && Object.keys(d.dataset).length), k = u(Pe()), S = u(0), C = u(null), N = u(null), R = u(0), l = c({
|
|
36
36
|
get: () => T(),
|
|
@@ -55,7 +55,7 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
|
|
|
55
55
|
const { isPrinting: M, isImaging: j, generatePdf: B, generateImage: G } = Te({
|
|
56
56
|
elementId: `relation_circle_${k.value}`,
|
|
57
57
|
fileName: l.value.style.title.text || "vue-ui-relation-circle"
|
|
58
|
-
}), U = c(() => Fe(l.value.customPalette)), f = u([]), m = u([]),
|
|
58
|
+
}), U = c(() => Fe(l.value.customPalette)), f = u([]), m = u([]), n = u({}), v = u([]), ne = u(0), A = c(() => d.dataset.slice(0, l.value.style.limit)), I = u(l.value.style.size), a = u({
|
|
59
59
|
height: l.value.style.size,
|
|
60
60
|
width: l.value.style.size
|
|
61
61
|
}), g = c({
|
|
@@ -65,7 +65,7 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
|
|
|
65
65
|
set(e) {
|
|
66
66
|
return e;
|
|
67
67
|
}
|
|
68
|
-
}),
|
|
68
|
+
}), ae = c(() => l.value.style.links.curved), ie = c(() => `${l.value.style.animation.speedMs}ms`), ue = c(() => g.value * 2), oe = c(() => g.value * 4), x = u(null);
|
|
69
69
|
$e(() => {
|
|
70
70
|
D(), document.getElementById(`relation_circle_${k.value}`).addEventListener("click", V);
|
|
71
71
|
});
|
|
@@ -91,7 +91,7 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
|
|
|
91
91
|
chart: C.value,
|
|
92
92
|
title: l.value.style.title.text ? N.value : null
|
|
93
93
|
});
|
|
94
|
-
I.value = Math.min(r, t),
|
|
94
|
+
I.value = Math.min(r, t), a.value.width = r, a.value.height = t, g.value = I.value * l.value.style.circle.radiusProportion, f.value = [], m.value = [], W(), X();
|
|
95
95
|
});
|
|
96
96
|
x.value = new ResizeObserver(e), x.value.observe(C.value.parentNode);
|
|
97
97
|
} else
|
|
@@ -102,13 +102,13 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
|
|
|
102
102
|
});
|
|
103
103
|
function V(e) {
|
|
104
104
|
const r = e.target;
|
|
105
|
-
r && Array.from(r.classList).includes("vue-ui-user-options") || r && Array.from(r.classList).includes("vue-ui-user-options-summary") || r && Array.from(r.classList).includes("vue-data-ui-button") || r && Array.from(r.classList).includes("vue-ui-relation-circle-legend") || (
|
|
105
|
+
r && Array.from(r.classList).includes("vue-ui-user-options") || r && Array.from(r.classList).includes("vue-ui-user-options-summary") || r && Array.from(r.classList).includes("vue-data-ui-button") || r && Array.from(r.classList).includes("vue-ui-relation-circle-legend") || (n.value = {}, v.value = []);
|
|
106
106
|
}
|
|
107
107
|
function W() {
|
|
108
108
|
const e = 6.28319 / A.value.length, r = 360 / A.value.length;
|
|
109
109
|
let t = 0, i = 0;
|
|
110
110
|
A.value.forEach((_, F) => {
|
|
111
|
-
const me = g.value * Math.cos(t) +
|
|
111
|
+
const me = g.value * Math.cos(t) + a.value.width / 2, ke = g.value * Math.sin(t) + a.value.height / 2 + l.value.style.circle.offsetY;
|
|
112
112
|
f.value.push({ x: me, y: ke, ..._, color: _.color ? _.color : U.value[F] ? U.value[F] : Z[F], regAngle: i }), t += e, i += r;
|
|
113
113
|
});
|
|
114
114
|
}
|
|
@@ -131,13 +131,13 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
|
|
|
131
131
|
}
|
|
132
132
|
const ce = c(() => Math.max(...m.value.map((e) => e.weight)));
|
|
133
133
|
function de(e) {
|
|
134
|
-
return Object.hasOwn(
|
|
134
|
+
return Object.hasOwn(n.value, "x") ? v.value.includes(e.id) ? "opacity:1" : "opacity:0.1" : "opacity:1";
|
|
135
135
|
}
|
|
136
136
|
function Y(e) {
|
|
137
|
-
return Object.hasOwn(
|
|
137
|
+
return Object.hasOwn(n.value, "x") ? e.colorTarget : e.colorSource;
|
|
138
138
|
}
|
|
139
139
|
function q(e) {
|
|
140
|
-
return Object.hasOwn(
|
|
140
|
+
return Object.hasOwn(n.value, "x") ? v.value.includes(e.id) && e.relationId === `${e.id}_${n.value.id}` || e.relationId === `${n.value.id}_${e.id}` ? `opacity:1;stroke-width:${J(e)}` : "opacity: 0" : "opacity: 1";
|
|
141
141
|
}
|
|
142
142
|
function ve(e) {
|
|
143
143
|
return e.regAngle > 90 && e.regAngle < 270 ? "end" : "start";
|
|
@@ -146,13 +146,13 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
|
|
|
146
146
|
return e.regAngle > 90 && e.regAngle < 270 ? e.x - 5 : e.x + 5;
|
|
147
147
|
}
|
|
148
148
|
function ge(e) {
|
|
149
|
-
return Object.hasOwn(
|
|
149
|
+
return Object.hasOwn(n.value, "x") ? n.value.id === e.id || v.value.includes(e.id) ? "opacity:1" : "opacity:0.2" : "opacity:1";
|
|
150
150
|
}
|
|
151
151
|
function he(e) {
|
|
152
152
|
return e.regAngle > 90 && e.regAngle < 270 ? `rotate(${e.regAngle + 180},${e.x},${e.y})` : `rotate(${e.regAngle},${e.x},${e.y})`;
|
|
153
153
|
}
|
|
154
154
|
function H(e) {
|
|
155
|
-
|
|
155
|
+
ne.value = 360 - e.regAngle, n.value.id && e.id === n.value.id ? (n.value = {}, v.value = []) : (n.value = e, v.value = [...e.relations]);
|
|
156
156
|
}
|
|
157
157
|
function J(e) {
|
|
158
158
|
return e.weight / ce.value * l.value.style.links.maxWidth;
|
|
@@ -236,26 +236,26 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
|
|
|
236
236
|
key: 2,
|
|
237
237
|
xmlns: y(Le),
|
|
238
238
|
class: L([{ "vue-data-ui-fullscreen--on": w.value, "vue-data-ui-fulscreen--off": !w.value }, "relation-circle"]),
|
|
239
|
-
viewBox: `0 0 ${
|
|
239
|
+
viewBox: `0 0 ${a.value.width <= 0 ? 10 : a.value.width} ${a.value.height <= 0 ? 10 : a.value.height}`,
|
|
240
240
|
width: "100%",
|
|
241
241
|
style: h(`user-select:none; background:${l.value.style.backgroundColor}`)
|
|
242
242
|
}, [
|
|
243
243
|
we("circle", {
|
|
244
|
-
cx: (
|
|
245
|
-
cy: (
|
|
244
|
+
cx: (a.value.width <= 0 ? 1e-4 : a.value.width) / 2,
|
|
245
|
+
cy: (a.value.height <= 0 ? 1e-4 : a.value.height) / 2 + l.value.style.circle.offsetY,
|
|
246
246
|
r: g.value <= 0 ? 1e-4 : g.value,
|
|
247
247
|
stroke: l.value.style.circle.stroke,
|
|
248
248
|
"stroke-width": l.value.style.circle.strokeWidth,
|
|
249
249
|
fill: "transparent",
|
|
250
250
|
class: "main-circle"
|
|
251
251
|
}, null, 8, De),
|
|
252
|
-
|
|
252
|
+
ae.value ? (s(), o("g", Ve, [
|
|
253
253
|
(s(!0), o(b, null, O(m.value, (t, i) => (s(), o("path", {
|
|
254
254
|
key: `relation_${i}`,
|
|
255
255
|
style: h(q(t)),
|
|
256
256
|
stroke: Y(t),
|
|
257
|
-
class: L(["relation", { "vue-ui-relation-circle-selected":
|
|
258
|
-
d: `M${t.x1},${t.y1} C${t.x1},${t.y1} ${
|
|
257
|
+
class: L(["relation", { "vue-ui-relation-circle-selected": n.value.hasOwnProperty("id") && v.value.includes(t.id) }]),
|
|
258
|
+
d: `M${t.x1},${t.y1} C${t.x1},${t.y1} ${a.value.width / 2},${a.value.height / 2 + l.value.style.circle.offsetY} ${t.x2},${t.y2}`,
|
|
259
259
|
fill: "none",
|
|
260
260
|
"stroke-width": J(t),
|
|
261
261
|
"stroke-linecap": "round"
|
|
@@ -269,7 +269,7 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
|
|
|
269
269
|
x2: t.x2,
|
|
270
270
|
y1: t.y1,
|
|
271
271
|
y2: t.y2,
|
|
272
|
-
class: L({ "vue-ui-relation-circle-selected":
|
|
272
|
+
class: L({ "vue-ui-relation-circle-selected": n.value.hasOwnProperty("id") && v.value.includes(t.id) }),
|
|
273
273
|
"stroke-linecap": "round"
|
|
274
274
|
}, null, 14, Ye))), 128))
|
|
275
275
|
])),
|
|
@@ -282,7 +282,7 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
|
|
|
282
282
|
onClick: (_) => H(t),
|
|
283
283
|
class: "vue-ui-relation-circle-legend",
|
|
284
284
|
"transform-origin": "start",
|
|
285
|
-
"font-weight":
|
|
285
|
+
"font-weight": n.value.id === t.id ? "900" : "400",
|
|
286
286
|
style: h(`font-family:${l.value.style.fontFamily};${ge(t)}`),
|
|
287
287
|
"font-size": l.value.style.labels.fontSize,
|
|
288
288
|
fill: l.value.style.labels.color
|
|
@@ -297,7 +297,7 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
|
|
|
297
297
|
onClick: (_) => H(t),
|
|
298
298
|
r: l.value.style.plot.radius
|
|
299
299
|
}, null, 12, He))), 128)),
|
|
300
|
-
$(e.$slots, "svg", { svg:
|
|
300
|
+
$(e.$slots, "svg", { svg: a.value }, void 0, !0)
|
|
301
301
|
], 14, Ue)) : p("", !0),
|
|
302
302
|
e.$slots.watermark ? (s(), o("div", Je, [
|
|
303
303
|
$(e.$slots, "watermark", K(Q({ isPrinting: y(M) || y(j) })), void 0, !0)
|
|
@@ -316,7 +316,7 @@ const Ge = ["id"], Ue = ["xmlns", "viewBox"], De = ["cx", "cy", "r", "stroke", "
|
|
|
316
316
|
}, null, 8, ["config"]))
|
|
317
317
|
], 12, Ge));
|
|
318
318
|
}
|
|
319
|
-
},
|
|
319
|
+
}, at = /* @__PURE__ */ Be(Ke, [["__scopeId", "data-v-1d0ed086"]]);
|
|
320
320
|
export {
|
|
321
|
-
|
|
321
|
+
at as default
|
|
322
322
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-TabZg_HV.cjs"),V=require("./useResponsive-B3TrDDIG.cjs"),ae=require("./Title-D9lSjLTg.cjs"),j=require("./usePrinter--7sLxlpn.cjs"),oe=require("./vue-ui-skeleton-CYeXVNFu.cjs"),q=require("./useNestedProp-CoLyVvV9.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ue=["id"],ce=["xmlns","viewBox"],de=["cx","cy","r","stroke","stroke-width"],ve={key:0},fe=["stroke","d","stroke-width"],ge={key:1},me=["stroke","x1","x2","y1","y2"],ye=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],he=["cx","cy","fill","onClick","r"],ke={key:3,class:"vue-data-ui-watermark"},pe={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(G,{expose:U}){const u=G;e.useCssVars(t=>({"7995534c":H.value,"31095f2b":Y.value,"7c93c1cd":J.value}));const{vue_ui_relation_circle:D}=s.useConfig(),p=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),g=e.ref(s.createUid()),x=e.ref(0),y=e.ref(null),w=e.ref(null),b=e.ref(0),r=e.computed({get:()=>B(),set:t=>t});function B(){const t=q.useNestedProp({userConfig:u.config,defaultConfig:D});return t.theme?{...q.useNestedProp({userConfig:s.themes.vue_ui_relation_circle[t.theme]||u.config,defaultConfig:t}),customPalette:s.themePalettes[t.theme]||s.palette}:t}e.watch(()=>u.config,t=>{r.value=B(),z(),b.value+=1},{deep:!0});const{isPrinting:P,isImaging:O,generatePdf:E,generateImage:S}=j.usePrinter({elementId:`relation_circle_${g.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),A=e.computed(()=>s.convertCustomPalette(r.value.customPalette)),d=e.ref([]),f=e.ref([]),i=e.ref({}),c=e.ref([]),W=e.ref(0),_=e.computed(()=>u.dataset.slice(0,r.value.style.limit)),C=e.ref(r.value.style.size),a=e.ref({height:r.value.style.size,width:r.value.style.size}),v=e.computed({get(){return C.value*r.value.style.circle.radiusProportion},set(t){return t}}),X=e.computed(()=>r.value.style.links.curved),Y=e.computed(()=>`${r.value.style.animation.speedMs}ms`),H=e.computed(()=>v.value*2),J=e.computed(()=>v.value*4),h=e.ref(null);e.onMounted(()=>{z(),document.getElementById(`relation_circle_${g.value}`).addEventListener("click",I)});function z(){if(s.objectIsEmpty(u.dataset)?s.error({componentName:"VueUiRelationCircle",type:"dataset"}):u.dataset.forEach((t,n)=>{s.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{s.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:n})})}),r.value.responsive){const t=V.throttle(()=>{const{width:n,height:l}=V.useResponsive({chart:y.value,title:r.value.style.title.text?w.value:null});C.value=Math.min(n,l),a.value.width=n,a.value.height=l,v.value=C.value*r.value.style.circle.radiusProportion,d.value=[],f.value=[],F(),N()});h.value=new ResizeObserver(t),h.value.observe(y.value.parentNode)}else d.value=[],f.value=[],F(),N()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${g.value}`).removeEventListener("click",I),h.value&&h.value.disconnect()});function I(t){const n=t.target;n&&Array.from(n.classList).includes("vue-ui-user-options")||n&&Array.from(n.classList).includes("vue-ui-user-options-summary")||n&&Array.from(n.classList).includes("vue-data-ui-button")||n&&Array.from(n.classList).includes("vue-ui-relation-circle-legend")||(i.value={},c.value=[])}function F(){const t=6.28319/_.value.length,n=360/_.value.length;let l=0,o=0;_.value.forEach((m,$)=>{const ne=v.value*Math.cos(l)+a.value.width/2,ie=v.value*Math.sin(l)+a.value.height/2+r.value.style.circle.offsetY;d.value.push({x:ne,y:ie,...m,color:m.color?m.color:A.value[$]?A.value[$]:s.palette[$],regAngle:o}),l+=t,o+=n})}function N(){d.value.forEach(t=>{d.value.filter(l=>l.relations.includes(t.id)).forEach((l,o)=>{f.value.push({weight:t.weights&&t.weights[o]?t.weights[o]:1,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,...t})})})}const K=e.computed(()=>Math.max(...f.value.map(t=>t.weight)));function Q(t){return Object.hasOwn(i.value,"x")?c.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function L(t){return Object.hasOwn(i.value,"x")?t.colorTarget:t.colorSource}function R(t){return Object.hasOwn(i.value,"x")?c.value.includes(t.id)&&t.relationId===`${t.id}_${i.value.id}`||t.relationId===`${i.value.id}_${t.id}`?`opacity:1;stroke-width:${M(t)}`:"opacity: 0":"opacity: 1"}function Z(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function ee(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function te(t){return Object.hasOwn(i.value,"x")?i.value.id===t.id||c.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function le(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function T(t){W.value=360-t.regAngle,i.value.id&&t.id===i.value.id?(i.value={},c.value=[]):(i.value=t,c.value=[...t.relations])}function M(t){return t.weight/K.value*r.value.style.links.maxWidth}const k=e.ref(!1);function re(t){k.value=t,x.value+=1}return U({generatePdf:E,generateImage:S}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:y,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${g.value}`},[r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:w,style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor}`)},[(e.openBlock(),e.createBlock(ae._sfc_main,{key:`title_${b.value}`,config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),r.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${x.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(P),isImaging:e.unref(O),uid:g.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:k.value,titles:{...r.value.userOptions.buttonTitles},chartElement:y.value,onToggleFullscreen:re,onGeneratePdf:e.unref(E),onGenerateImage:e.unref(S)},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value},"relation-circle"]),viewBox:`0 0 ${a.value.width<=0?10:a.value.width} ${a.value.height<=0?10:a.value.height}`,width:"100%",style:e.normalizeStyle(`user-select:none; background:${r.value.style.backgroundColor}`)},[e.createElementVNode("circle",{cx:(a.value.width<=0?1e-4:a.value.width)/2,cy:(a.value.height<=0?1e-4:a.value.height)/2+r.value.style.circle.offsetY,r:v.value<=0?1e-4:v.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,de),X.value?(e.openBlock(),e.createElementBlock("g",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(R(l)),stroke:L(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&c.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${a.value.width/2},${a.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":M(l),"stroke-linecap":"round"},null,14,fe))),128))])):(e.openBlock(),e.createElementBlock("g",ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:L(l),style:e.normalizeStyle(R(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":i.value.hasOwnProperty("id")&&c.value.includes(l.id)}),"stroke-linecap":"round"},null,14,me))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":Z(l),transform:le(l),x:ee(l),y:l.y+5,onClick:m=>T(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":i.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${te(l)}`),"font-size":r.value.style.labels.fontSize,fill:r.value.style.labels.color},e.toDisplayString(l.label),13,ye))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${o}`,style:e.normalizeStyle(Q(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.color,onClick:m=>T(l),r:r.value.style.plot.radius},null,12,he))),128)),e.renderSlot(t.$slots,"svg",{svg:a.value},void 0,!0)],14,ce)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(P)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe.default,{key:4,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,ue))}},_e=se._export_sfc(pe,[["__scopeId","data-v-1d0ed086"]]);exports.default=_e;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
2
|
-
</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),_.value=u}T.value=!0}const f=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},n=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:n}});function G(){e.nextTick(()=>{const l=f.value.head.map((n,u)=>[[n.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function se(l){C.value=l,L.value+=1}function j(){g.value.showTable=!g.value.showTable}function X(){g.value.showTooltip=!g.value.showTooltip}return Z({getData:ne,generatePdf:q,generateCsv:G,generateImage:A,toggleTable:j,toggleTooltip:X}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:k,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${b.value}`,onMouseleave:a[3]||(a[3]=o=>{m.value=null,T.value=!1})},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(J.UserOptions,{ref_key:"details",ref:le,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(M),isImaging:e.unref(D),uid:b.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:se,onGeneratePdf:e.unref(q),onGenerateCsv:G,onGenerateImage:e.unref(A),onToggleTable:j,onToggleTooltip:X},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(r.shiftHue)(o.color,.05)}${e.unref(r.opacity)[100-t.value.style.chart.layout.rings.gradient.intensity]}`},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,Ce)],8,be))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,we),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${b.value}_${n})`:o.color},null,14,xe),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:"transparent",onMouseenter:u=>ue(n,o),onMouseleave:a[0]||(a[0]=u=>{m.value=null,T.value=!1})},null,40,Te)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:4,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(pe.Legend,{key:`legend_${I.value}`,legendSet:W.value,config:re.value,onClickMarker:a[1]||(a[1]=({legend:o})=>B(o.uid))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>B(o.uid),style:e.normalizeStyle(`opacity:${i.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",_e," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Se," ("+e.toDisplayString(isNaN(o.value/p.value)?"-":e.unref(r.dataLabel)({v:o.value/p.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ne)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:W.value},void 0,!0)],512),e.createVNode(de._sfc_main,{show:g.value.showTooltip&&T.value&&i.value.length<v.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:_.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(ge.default,{key:5,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ve.DataTable,{key:`table_${F.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>g.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Be)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,me))}},Le=fe._export_sfc(Pe,[["__scopeId","data-v-2d607318"]]);exports.default=Le;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-TabZg_HV.cjs"),Y=require("./useResponsive-B3TrDDIG.cjs"),ce=require("./Title-D9lSjLTg.cjs"),J=require("./usePrinter--7sLxlpn.cjs"),de=require("./Tooltip-C0PSN8vf.cjs"),ve=require("./DataTable-CeHw-cqZ.cjs"),pe=require("./Legend-DfU44fjz.cjs"),he=require("./vue-ui-skeleton-CYeXVNFu.cjs"),ge=require("./vue-ui-accordion-0uSZBHsp.cjs"),K=require("./useNestedProp-CoLyVvV9.cjs"),fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),me=["id"],ye=["xmlns","viewBox"],be=["id"],ke=["stop-color"],Ce=["stop-color"],we=["stroke","cx","cy","r","fill"],xe=["stroke","stroke-width","cx","cy","r","fill"],Te=["cx","cy","r","onMouseenter"],$e={key:3,class:"vue-data-ui-watermark"},Ne=["onClick"],Se={key:0},_e={key:1},Be=["innerHTML"],Pe={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(Q,{expose:Z,emit:ee}){const v=Q,{vue_ui_rings:te}=r.useConfig(),y=e.ref(!1),x=e.computed(()=>!!v.dataset&&v.dataset.length),b=e.ref(r.createUid()),le=e.ref(null),T=e.ref(!1),_=e.ref(""),m=e.ref(null),L=e.ref(0),k=e.ref(null),V=e.ref(null),z=e.ref(null),E=e.ref(0),F=e.ref(0),I=e.ref(0),t=e.computed({get:()=>O(),set:l=>l});function O(){const l=K.useNestedProp({userConfig:v.config,defaultConfig:te});return l.theme?{...K.useNestedProp({userConfig:r.themes.vue_ui_rings[l.theme]||v.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>v.config,l=>{t.value=O(),R(),E.value+=1,F.value+=1,I.value+=1},{deep:!0});const $=e.ref(null);e.onMounted(()=>{R()});function R(){if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((l,a)=>{l.values.length||r.error({componentName:"VueUiRings",type:"dataset"}),r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=Y.throttle(()=>{const{width:a,height:o}=Y.useResponsive({chart:k.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?z.value:null});s.value.width=a,s.value.height=o});$.value=new ResizeObserver(l),$.value.observe(k.value.parentNode)}setTimeout(()=>{y.value=!0},600)}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:M,isImaging:D,generatePdf:q,generateImage:A}=J.usePrinter({elementId:`rings_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),U=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),oe=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function B(l){i.value.includes(l)?i.value=i.value.filter(a=>a!==l):i.value.push(l),ee("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const ae=e.computed(()=>Math.max(...N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function H(l){return l/ae.value}const N=e.computed(()=>v.dataset.map(({values:l,name:a,color:o=null},n)=>{const u=r.sanitizeArray(l).reduce((h,w)=>h+w,0);return{name:a,color:o||r.convertColorToHex(o)||U.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,ie)=>w+ie,0)).reduce((h,w)=>h+w,0),uid:r.createUid()}})),W=e.computed(()=>N.value.map(l=>({...l,shape:"circle",opacity:i.value.includes(l.uid)?.5:1,segregate:()=>B(l.uid),isSegregated:i.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),re=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:n},u)=>({uid:n,name:l,color:o||r.convertColorToHex(o)||U.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:a,proportion:H(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*H(a)})).toSorted((l,a)=>a.value-l.value));function ne(){return c.value.map(({name:l,color:a,value:o,absoluteValues:n,percentage:u})=>({name:l,color:a,value:o,absoluteValues:n,percentage:u}))}const d=e.computed(()=>oe.value-t.value.style.chart.layout.rings.strokeWidth*2),P=e.ref(null);function ue(l,a){if(i.value.length===v.dataset.length)return;P.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=n({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
|
|
2
|
+
</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),_.value=u}T.value=!0}const f=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},n=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:n}});function G(){e.nextTick(()=>{const l=f.value.head.map((n,u)=>[[n.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function se(l){C.value=l,L.value+=1}function j(){g.value.showTable=!g.value.showTable}function X(){g.value.showTooltip=!g.value.showTooltip}return Z({getData:ne,generatePdf:q,generateCsv:G,generateImage:A,toggleTable:j,toggleTooltip:X}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:k,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${b.value}`,onMouseleave:a[3]||(a[3]=o=>{m.value=null,T.value=!1})},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(J.UserOptions,{ref_key:"details",ref:le,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(M),isImaging:e.unref(D),uid:b.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:se,onGeneratePdf:e.unref(q),onGenerateCsv:G,onGenerateImage:e.unref(A),onToggleTable:j,onToggleTooltip:X},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(o.color,.05),100-t.value.style.chart.layout.rings.gradient.intensity)},null,8,ke),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,Ce)],8,be))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,we),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${b.value}_${n})`:o.color},null,14,xe),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:"transparent",onMouseenter:u=>ue(n,o),onMouseleave:a[0]||(a[0]=u=>{m.value=null,T.value=!1})},null,40,Te)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",$e,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(D)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:4,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(pe.Legend,{key:`legend_${I.value}`,legendSet:W.value,config:re.value,onClickMarker:a[1]||(a[1]=({legend:o})=>B(o.uid))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>B(o.uid),style:e.normalizeStyle(`opacity:${i.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",_e," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Se," ("+e.toDisplayString(isNaN(o.value/p.value)?"-":e.unref(r.dataLabel)({v:o.value/p.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ne)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:W.value},void 0,!0)],512),e.createVNode(de._sfc_main,{show:g.value.showTooltip&&T.value&&i.value.length<v.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:_.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(ge.default,{key:5,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ve.DataTable,{key:`table_${F.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>g.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Be)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,me))}},Le=fe._export_sfc(Pe,[["__scopeId","data-v-25f2c1f6"]]);exports.default=Le;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ref as u, computed as d, watch as Fe, onMounted as Ie, onBeforeUnmount as Oe, openBlock as n, createElementBlock as m, normalizeClass as B, normalizeStyle as x, createBlock as N, createCommentVNode as P, unref as i, createSlots as Me, withCtx as p, renderSlot as f, normalizeProps as D, guardReactiveProps as
|
|
2
|
-
import { u as Re, c as ge, t as Ve, a as Be, p as T, o as De, e as X, g as
|
|
1
|
+
import { ref as u, computed as d, watch as Fe, onMounted as Ie, onBeforeUnmount as Oe, openBlock as n, createElementBlock as m, normalizeClass as B, normalizeStyle as x, createBlock as N, createCommentVNode as P, unref as i, createSlots as Me, withCtx as p, renderSlot as f, normalizeProps as D, guardReactiveProps as G, Fragment as de, renderList as he, createElementVNode as w, createTextVNode as pe, toDisplayString as U, createVNode as ze, nextTick as Ae } from "vue";
|
|
2
|
+
import { u as Re, c as ge, t as Ve, a as Be, p as T, o as De, e as X, g as Ge, b as Ue, G as We, d as fe, f as _, X as Ee, s as He, w as Xe, v as j, i as ye, x as je, y as Ye, q as qe, r as Je } from "./index-0KN57HdM.js";
|
|
3
3
|
import { t as Ke, u as Qe } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Ze } from "./Title-
|
|
5
|
-
import { u as et, U as tt } from "./usePrinter-
|
|
6
|
-
import { _ as lt } from "./Tooltip-
|
|
7
|
-
import { D as at } from "./DataTable-
|
|
8
|
-
import { L as ot } from "./Legend-
|
|
9
|
-
import st from "./vue-ui-skeleton-
|
|
10
|
-
import ut from "./vue-ui-accordion-
|
|
11
|
-
import { u as me } from "./useNestedProp-
|
|
4
|
+
import { _ as Ze } from "./Title-gvR5aS6q.js";
|
|
5
|
+
import { u as et, U as tt } from "./usePrinter-BvKYEc1z.js";
|
|
6
|
+
import { _ as lt } from "./Tooltip-BGmkuAK4.js";
|
|
7
|
+
import { D as at } from "./DataTable-OAUXdIYA.js";
|
|
8
|
+
import { L as ot } from "./Legend-BVByqGqZ.js";
|
|
9
|
+
import st from "./vue-ui-skeleton-dgMXr8k9.js";
|
|
10
|
+
import ut from "./vue-ui-accordion-CczyfFaC.js";
|
|
11
|
+
import { u as me } from "./useNestedProp-NeGalTYk.js";
|
|
12
12
|
import { _ as rt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"], dt = ["stop-color"], ht = ["stroke", "cx", "cy", "r", "fill"], pt = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], gt = ["cx", "cy", "r", "onMouseenter"], ft = {
|
|
14
14
|
key: 3,
|
|
@@ -31,7 +31,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
31
31
|
},
|
|
32
32
|
emits: ["selectLegend"],
|
|
33
33
|
setup(be, { expose: ke, emit: Ce }) {
|
|
34
|
-
const g = be, { vue_ui_rings: we } = Re(), L = u(!1), M = d(() => !!g.dataset && g.dataset.length), S = u(ge()), $e = u(null), z = u(!1),
|
|
34
|
+
const g = be, { vue_ui_rings: we } = Re(), L = u(!1), M = d(() => !!g.dataset && g.dataset.length), S = u(ge()), $e = u(null), z = u(!1), W = u(""), $ = u(null), Y = u(0), F = u(null), q = u(null), J = u(null), K = u(0), Q = u(0), Z = u(0), e = d({
|
|
35
35
|
get: () => ee(),
|
|
36
36
|
set: (t) => t
|
|
37
37
|
});
|
|
@@ -63,7 +63,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
63
63
|
t.values.length || X({
|
|
64
64
|
componentName: "VueUiRings",
|
|
65
65
|
type: "dataset"
|
|
66
|
-
}),
|
|
66
|
+
}), Ge({
|
|
67
67
|
datasetObject: t,
|
|
68
68
|
requiredAttributes: ["name", "values"]
|
|
69
69
|
}).forEach((l) => {
|
|
@@ -95,14 +95,14 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
95
95
|
const { isPrinting: le, isImaging: ae, generatePdf: oe, generateImage: se } = et({
|
|
96
96
|
elementId: `rings_${S.value}`,
|
|
97
97
|
fileName: e.value.style.chart.title.text || "vue-ui-rings"
|
|
98
|
-
}), ue = d(() =>
|
|
98
|
+
}), ue = d(() => Ue(e.value.customPalette)), k = u({
|
|
99
99
|
showTable: e.value.table.show,
|
|
100
100
|
showTooltip: e.value.style.chart.tooltip.show
|
|
101
101
|
}), r = u({
|
|
102
102
|
height: 360,
|
|
103
103
|
width: 360
|
|
104
104
|
}), Te = d(() => Math.min(r.value.height, r.value.width)), v = u([]);
|
|
105
|
-
function
|
|
105
|
+
function E(t) {
|
|
106
106
|
v.value.includes(t) ? v.value = v.value.filter((a) => a !== t) : v.value.push(t), Ce("selectLegend", c.value.map((a) => ({
|
|
107
107
|
name: a.name,
|
|
108
108
|
color: a.color,
|
|
@@ -116,7 +116,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
116
116
|
return t / _e.value;
|
|
117
117
|
}
|
|
118
118
|
const R = d(() => g.dataset.map(({ values: t, name: a, color: l = null }, o) => {
|
|
119
|
-
const s =
|
|
119
|
+
const s = We(t).reduce((b, O) => b + O, 0);
|
|
120
120
|
return {
|
|
121
121
|
name: a,
|
|
122
122
|
color: l || fe(l) || ue.value[o] || T[o] || T[o % T.length],
|
|
@@ -128,7 +128,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
128
128
|
...t,
|
|
129
129
|
shape: "circle",
|
|
130
130
|
opacity: v.value.includes(t.uid) ? 0.5 : 1,
|
|
131
|
-
segregate: () =>
|
|
131
|
+
segregate: () => E(t.uid),
|
|
132
132
|
isSegregated: v.value.includes(t.uid)
|
|
133
133
|
})).toSorted((t, a) => a.value - t.value)), xe = d(() => ({
|
|
134
134
|
cy: "rings-div-legend",
|
|
@@ -173,7 +173,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
173
173
|
series: c.value,
|
|
174
174
|
config: e.value
|
|
175
175
|
})))
|
|
176
|
-
|
|
176
|
+
W.value = o({
|
|
177
177
|
seriesIndex: t,
|
|
178
178
|
datapoint: a,
|
|
179
179
|
series: c.value,
|
|
@@ -200,7 +200,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
200
200
|
v: l.value / y.value * 100,
|
|
201
201
|
s: "%",
|
|
202
202
|
r: e.value.style.chart.tooltip.roundingPercentage
|
|
203
|
-
})}</b></div>`),
|
|
203
|
+
})}</b></div>`), W.value = s;
|
|
204
204
|
}
|
|
205
205
|
z.value = !0;
|
|
206
206
|
}
|
|
@@ -365,14 +365,14 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
365
365
|
t.$slots.optionFullscreen ? {
|
|
366
366
|
name: "optionFullscreen",
|
|
367
367
|
fn: p(({ toggleFullscreen: l, isFullscreen: o }) => [
|
|
368
|
-
f(t.$slots, "optionFullscreen", D(
|
|
368
|
+
f(t.$slots, "optionFullscreen", D(G({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
|
|
369
369
|
]),
|
|
370
370
|
key: "5"
|
|
371
371
|
} : void 0
|
|
372
372
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasFullscreen", "isTooltip", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : P("", !0),
|
|
373
373
|
M.value ? (n(), m("svg", {
|
|
374
374
|
key: 2,
|
|
375
|
-
xmlns: i(
|
|
375
|
+
xmlns: i(Ee),
|
|
376
376
|
class: B({ "vue-data-ui-fullscreen--on": I.value, "vue-data-ui-fulscreen--off": !I.value }),
|
|
377
377
|
viewBox: `0 0 ${r.value.width <= 0 ? 10 : r.value.width} ${r.value.height <= 0 ? 10 : r.value.height}`,
|
|
378
378
|
style: x(`max-width:100%;overflow:visible;background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
@@ -387,7 +387,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
387
387
|
}, [
|
|
388
388
|
w("stop", {
|
|
389
389
|
offset: "0%",
|
|
390
|
-
"stop-color":
|
|
390
|
+
"stop-color": i(He)(i(Xe)(l.color, 0.05), 100 - e.value.style.chart.layout.rings.gradient.intensity)
|
|
391
391
|
}, null, 8, ct),
|
|
392
392
|
w("stop", {
|
|
393
393
|
offset: "100%",
|
|
@@ -439,7 +439,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
439
439
|
f(t.$slots, "svg", { svg: r.value }, void 0, !0)
|
|
440
440
|
], 14, it)) : P("", !0),
|
|
441
441
|
t.$slots.watermark ? (n(), m("div", ft, [
|
|
442
|
-
f(t.$slots, "watermark", D(
|
|
442
|
+
f(t.$slots, "watermark", D(G({ isPrinting: i(le) || i(ae) })), void 0, !0)
|
|
443
443
|
])) : P("", !0),
|
|
444
444
|
M.value ? P("", !0) : (n(), N(st, {
|
|
445
445
|
key: 4,
|
|
@@ -461,15 +461,15 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
461
461
|
key: `legend_${Z.value}`,
|
|
462
462
|
legendSet: ne.value,
|
|
463
463
|
config: xe.value,
|
|
464
|
-
onClickMarker: a[1] || (a[1] = ({ legend: l }) =>
|
|
464
|
+
onClickMarker: a[1] || (a[1] = ({ legend: l }) => E(l.uid))
|
|
465
465
|
}, {
|
|
466
466
|
item: p(({ legend: l, index: o }) => [
|
|
467
467
|
w("div", {
|
|
468
468
|
"data-cy-legend-item": "",
|
|
469
|
-
onClick: (s) =>
|
|
469
|
+
onClick: (s) => E(l.uid),
|
|
470
470
|
style: x(`opacity:${v.value.includes(l.uid) ? 0.5 : 1}`)
|
|
471
471
|
}, [
|
|
472
|
-
pe(
|
|
472
|
+
pe(U(l.name) + ": " + U(i(ye)(
|
|
473
473
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
474
474
|
l.value,
|
|
475
475
|
i(_)({
|
|
@@ -480,7 +480,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
480
480
|
}),
|
|
481
481
|
{ datapoint: l, seriesIndex: o }
|
|
482
482
|
)) + " ", 1),
|
|
483
|
-
v.value.includes(l.uid) ? (n(), m("span", bt, " ( - % ) ")) : (n(), m("span", mt, " (" +
|
|
483
|
+
v.value.includes(l.uid) ? (n(), m("span", bt, " ( - % ) ")) : (n(), m("span", mt, " (" + U(isNaN(l.value / y.value) ? "-" : i(_)({
|
|
484
484
|
v: l.value / y.value * 100,
|
|
485
485
|
s: "%",
|
|
486
486
|
r: e.value.style.chart.legend.roundingPercentage
|
|
@@ -505,14 +505,14 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
505
505
|
position: e.value.style.chart.tooltip.position,
|
|
506
506
|
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
507
507
|
parent: F.value,
|
|
508
|
-
content:
|
|
508
|
+
content: W.value,
|
|
509
509
|
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function"
|
|
510
510
|
}, {
|
|
511
511
|
"tooltip-before": p(() => [
|
|
512
|
-
f(t.$slots, "tooltip-before", D(
|
|
512
|
+
f(t.$slots, "tooltip-before", D(G({ ...H.value })), void 0, !0)
|
|
513
513
|
]),
|
|
514
514
|
"tooltip-after": p(() => [
|
|
515
|
-
f(t.$slots, "tooltip-after", D(
|
|
515
|
+
f(t.$slots, "tooltip-after", D(G({ ...H.value })), void 0, !0)
|
|
516
516
|
]),
|
|
517
517
|
_: 3
|
|
518
518
|
}, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom"]),
|
|
@@ -549,7 +549,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
549
549
|
}, null, 8, kt)
|
|
550
550
|
]),
|
|
551
551
|
td: p(({ td: l }) => [
|
|
552
|
-
pe(
|
|
552
|
+
pe(U(l.name || l), 1)
|
|
553
553
|
]),
|
|
554
554
|
_: 1
|
|
555
555
|
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
@@ -558,7 +558,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
558
558
|
}, 8, ["config"])) : P("", !0)
|
|
559
559
|
], 46, nt));
|
|
560
560
|
}
|
|
561
|
-
}, Mt = /* @__PURE__ */ rt(Ct, [["__scopeId", "data-v-
|
|
561
|
+
}, Mt = /* @__PURE__ */ rt(Ct, [["__scopeId", "data-v-25f2c1f6"]]);
|
|
562
562
|
export {
|
|
563
563
|
Mt as default
|
|
564
564
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-TabZg_HV.cjs"),he=require("./useResponsive-B3TrDDIG.cjs"),Me=require("./Title-D9lSjLTg.cjs"),fe=require("./usePrinter--7sLxlpn.cjs"),Se=require("./Tooltip-C0PSN8vf.cjs"),$e=require("./Legend-DfU44fjz.cjs"),me=require("./Shape-B6cEKeIN.cjs"),Ee=require("./DataTable-CeHw-cqZ.cjs"),Le=require("./vue-ui-skeleton-CYeXVNFu.cjs"),ze=require("./vue-ui-accordion-0uSZBHsp.cjs"),ge=require("./useNestedProp-CoLyVvV9.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ae=["id"],Te=["xmlns","viewBox"],De={key:0},Pe=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],We={key:1},Oe=["points","fill","stroke-width","stroke-dasharray","stroke"],qe={key:0},Ie=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],Xe={key:1},Ye={key:2},je=["id"],Re=["stop-color"],Ge=["stop-color"],Ue=["id"],He=["stop-color"],Je=["stop-color"],Ke=["x","y","width","height","fill","stroke","stroke-width","rx"],Qe=["x","y","height","width","fill","stroke","stroke-width","rx"],Ze={key:0},et=["d","stroke","stroke-width"],tt=["d","stroke","stroke-width"],lt=["d","stroke","stroke-width"],at=["d","stroke","stroke-width"],ot={key:3,style:{"pointer-events":"none !important"}},st=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],rt=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],nt=["x","y","font-size","fill","font-weight","text-anchor"],ut=["x","y","font-size","fill","font-weight"],it=["cx","cy","r","fill","stroke","stroke-width"],ct=["cx","cy","r","fill","stroke","stroke-width"],yt=["x","y","font-size","fill","font-weight","text-anchor"],vt={key:4},dt=["x","y","font-size","fill"],pt=["x","y","font-size","fill"],ht=["id","transform","font-size","font-weight","fill"],ft={key:5},mt=["x","y","font-size","fill"],gt=["x","y","font-size","fill"],kt=["font-size","font-weight","fill","x","y"],xt=["id"],bt=["x","y","width","height"],wt={key:6},Bt=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],_t=["x","y","fill","font-size","font-weight"],Ct={key:3,class:"vue-data-ui-watermark"},Nt=["onClick"],Mt={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},St={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},$t={key:0},Et=["innerHTML"],Lt={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(ke,{expose:xe}){const C=ke,{vue_ui_scatter:be}=s.useConfig(),D=e.computed(()=>!!C.dataset&&C.dataset.length),g=e.ref(s.createUid()),we=e.ref(null),q=e.ref(!1),I=e.ref(""),U=e.ref(0),A=e.ref(null),H=e.ref(null),J=e.ref(null),K=e.ref(0),Q=e.ref(0),Z=e.ref(0),t=e.computed({get:()=>ee(),set:a=>a});function ee(){const a=ge.useNestedProp({userConfig:C.config,defaultConfig:be});return a.theme?{...ge.useNestedProp({userConfig:s.themes.vue_ui_scatter[a.theme]||C.config,defaultConfig:a}),customPalette:s.themePalettes[a.theme]||s.palette}:a}e.watch(()=>C.config,a=>{t.value=ee(),te(),K.value+=1,Q.value+=1,Z.value+=1},{deep:!0});const P=e.ref(null);e.onMounted(()=>{te()});function te(){if(s.objectIsEmpty(C.dataset)&&s.error({componentName:"VueUiScatter",type:"dataset"}),t.value.responsive){const a=he.throttle(()=>{const{width:u,height:l}=he.useResponsive({chart:A.value,title:t.value.style.title.text?H.value:null,legend:t.value.style.legend.show?J.value:null});k.value.width=u,k.value.height=l});P.value=new ResizeObserver(a),P.value.observe(A.value.parentNode)}}e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});const{isPrinting:le,isImaging:ae,generatePdf:oe,generateImage:se}=fe.usePrinter({elementId:`vue-ui-scatter_${g.value}`,fileName:t.value.style.title.text||"vue-ui-scatter"}),re=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),M=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),k=e.ref({height:t.value.style.layout.height,width:t.value.style.layout.width}),F=e.computed(()=>t.value.style.layout.marginalBars.show?t.value.style.layout.marginalBars.size+t.value.style.layout.marginalBars.offset:0),n=e.computed(()=>({top:t.value.style.layout.padding.top+F.value,right:k.value.width-t.value.style.layout.padding.right-F.value,bottom:k.value.height-t.value.style.layout.padding.bottom,left:t.value.style.layout.padding.left,height:k.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom-F.value,width:k.value.width-t.value.style.layout.padding.left-t.value.style.layout.padding.right-F.value})),y=e.computed(()=>{C.dataset.forEach((o,i)=>{s.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["values"]}).forEach(h=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:h,index:i})}),o.values&&o.values.forEach((h,E)=>{s.getMissingDatasetAttributes({datasetObject:h,requiredAttributes:["x","y"]}).forEach(V=>{s.error({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${V}`,index:`${i} - ${E}`})})})});const a=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),u=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.x))),l=Math.min(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y))),r=Math.max(...$.value.filter(o=>!p.value.includes(o.id)).flatMap(o=>o.values.map(i=>i.y)));return{xMin:a>=0?0:a,xMax:u,yMin:l>=0?0:l,yMax:r}}),v=e.computed(()=>({x:n.value.left+Math.abs(y.value.xMin)/(y.value.xMax+Math.abs(y.value.xMin))*n.value.width,y:n.value.bottom-Math.abs(y.value.yMin)/(y.value.yMax+Math.abs(y.value.yMin))*n.value.height})),$=e.computed(()=>C.dataset.map((a,u)=>{const l=`cluster_${g.value}_${u}`;return{...a,id:l,color:a.color?a.color:re.value[u]||s.palette[u]||s.palette[u%s.palette.length],opacity:p.value.includes(l)?.5:1,shape:a.shape??"circle",segregate:()=>ye(l),isSegregated:p.value.includes(l)}})),Be=e.computed(()=>({cy:"scatter-div-legend",backgroundColor:t.value.style.legend.backgroundColor,color:t.value.style.legend.color,fontSize:t.value.style.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.legend.bold?"bold":""})),X=e.computed(()=>$.value.map((a,u)=>({...a,plots:a.values.map(l=>({x:n.value.left+(l.x+Math.abs(y.value.xMin))/(y.value.xMax+Math.abs(y.value.xMin))*n.value.width,y:n.value.bottom-(l.y+Math.abs(y.value.yMin))/(y.value.yMax+Math.abs(y.value.yMin))*n.value.height,v:{...l,name:l.name||""},clusterName:a.name,color:a.color?a.color:re.value[u]||s.palette[u]||s.palette[u%s.palette.length],id:`plot_${g.value}_${Math.random()}`,weight:l.weight??t.value.style.layout.plots.radius}))})).filter(a=>!p.value.includes(a.id))),x=e.computed(()=>X.value.map(a=>{const u=a.plots.reduce((d,L)=>d+L.x,0)/a.plots.length,l=a.plots.reduce((d,L)=>d+L.y,0)/a.plots.length;let r=0,o=0,i=0;for(const d of a.plots)r+=(d.x-u)*(d.y-l),o+=(d.x-u)**2,i+=(d.y-l)**2;const h=r/Math.sqrt(o*i),E=h*(Math.sqrt(i)/Math.sqrt(o)),V=l-E*u,_={x1:n.value.left,x2:n.value.right,y1:E*n.value.left+V,y2:E*n.value.right+V,coefficient:h},m=(_.y2-_.y1)/(_.x2-_.x1),w=_.y1-m*_.x1,N=Math.min(k.value.width-t.value.style.layout.padding.right,Math.max(t.value.style.layout.padding.left,(n.value.top-w)/m)),O={x:N,y:m*N+w<=t.value.style.layout.padding.top?n.value.top:m*N+w};return{...a,correlation:_,label:O,plots:a.plots.map(d=>{const L=(d.x+m*d.y-m*w)/(1+Math.pow(m,2)),j=(m*d.x+Math.pow(m,2)*d.y+w)/(1+Math.pow(m,2)),f=Math.sqrt(Math.pow(d.x-L,2)+Math.pow(d.y-j,2));return{...d,deviation:f,shape:a.shape,color:a.color}})}})),ne=e.computed(()=>Math.max(...x.value.flatMap(a=>a.plots.map(u=>Math.abs(u.deviation)))));function _e(){return x.value}function ue(a,u){const l=Array.isArray(a)?a.flatMap(f=>f.plots.map(z=>({x:z.x,y:z.y}))):a.plots.map(f=>({x:f.x,y:f.y}));let r=1/0,o=-1/0,i=1/0,h=-1/0;l.forEach(({x:f,y:z})=>{r=Math.min(r,f),o=Math.max(o,f),i=Math.min(i,z),h=Math.max(h,z)});const E=o-r,V=h-i,_=E/u,m=V/u,w=Array(u).fill(0),N=Array(u).fill(0);l.forEach(({x:f,y:z})=>{const R=Math.floor((f-r)/_),G=Math.floor((z-i)/m);w[R]||(w[R]=0),N[G]||(N[G]=0),w[R]+=1,N[G]+=1});const O=[],d=[];for(let f=0;f<u;f+=1)O.push(r+(f+.5)*_),d.push(i+(f+.5)*m);const L=Math.max(...w),j=Math.max(...N);return{x:w,y:N,avgX:O,avgY:d,maxX:L,maxY:j}}const S=e.computed(()=>t.value.style.layout.marginalBars.tranches),b=e.computed(()=>ue(X.value,S.value)),Ce=e.computed(()=>{const a=n.value.top-t.value.style.layout.marginalBars.offset,u=n.value.right+t.value.style.layout.marginalBars.offset;return X.value.map(l=>{const r=ue(l,S.value);return{coords:r,dX:s.createSmoothPath(r.avgX.map((o,i)=>({x:o,y:a-r.x[i]/r.maxX*t.value.style.layout.marginalBars.size}))),dY:s.createSmoothPath(r.avgY.map((o,i)=>({y:o,x:u+t.value.style.layout.marginalBars.size*r.y[i]/r.maxY}))),color:l.color,id:l.id}})}),B=e.ref(void 0),c=e.ref(null),Y=e.ref(null);function ie(a,u){B.value=a.id,c.value=a;let l="";Y.value={datapoint:a,seriesIndex:u,series:x.value,config:t.value};const r=t.value.style.tooltip.customFormat;s.isFunction(r)&&s.functionReturnsString(()=>r({datapoint:a,seriesIndex:u,series:x.value,config:t.value}))?I.value=r({datapoint:a,seriesIndex:u,series:x.value,config:t.value}):(a.clusterName&&(l+=`<div style="display:flex;gap:3px;align-items:center">${a.clusterName}</div>`),a.v.name&&(l+=`<div>${a.v.name}</div>`),l+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,l+=`<div>${t.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(a.v.x)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.x.formatter,a.v.x,s.dataLabel({p:t.value.style.tooltip.prefix,v:a.v.x,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:a,seriesIndex:u})}</b></div>`,l+=`<div>${t.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(a.v.y)?"-":s.applyDataLabel(t.value.style.layout.plots.selectors.labels.y.formatter,a.v.y,s.dataLabel({p:t.value.style.tooltip.prefix,v:a.v.y,s:t.value.style.tooltip.suffix,r:t.value.style.tooltip.roundingValue}),{datapoint:a,seriesIndex:u})}</b></div>`,l+=`${t.value.style.layout.plots.deviation.translation}: <b>${s.dataLabel({v:a.deviation,r:t.value.style.layout.plots.deviation.roundingValue})}</b>`,l+="</div>",I.value=`<div>${l}</div>`),q.value=!0}function ce(){q.value=!1,B.value=void 0,c.value=null}const p=e.ref([]);function ye(a){p.value.includes(a)?p.value=p.value.filter(u=>u!==a):p.value.length<C.dataset.length-1&&p.value.push(a)}function ve(){e.nextTick(()=>{const a=["",t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],u=x.value.map(o=>[o.name,o.correlation.coefficient,o.plots.length,o.plots.map(i=>i.v.x).reduce((i,h)=>i+h,0)/o.plots.length,o.plots.map(i=>i.v.y).reduce((i,h)=>i+h,0)/o.plots.length]),l=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([a]).concat(u),r=s.createCsvContent(l);s.downloadCsv({csvContent:r,title:t.value.style.title.text||"vue-ui-heatmap"})})}const W=e.computed(()=>{const a=[t.value.table.translations.series,t.value.table.translations.correlationCoefficient,t.value.table.translations.nbrPlots,`${t.value.style.layout.dataLabels.xAxis.name} ${t.value.table.translations.average}`,`${t.value.style.layout.dataLabels.yAxis.name} ${t.value.table.translations.average}`],u=x.value.map(r=>[{shape:r.shape,content:r.name,color:r.color},Number((r.correlation.coefficient??0).toFixed(t.value.table.td.roundingValue)).toLocaleString(),r.plots.length.toLocaleString(),Number((r.plots.map(o=>o.v.x??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString(),Number((r.plots.map(o=>o.v.y??0).reduce((o,i)=>o+i,0)/r.plots.length).toFixed(t.value.table.td.roundingAverage)).toLocaleString()]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:a,body:u,config:l,colNames:a}}),T=e.ref(!1);function Ne(a){T.value=a,U.value+=1}function de(){M.value.showTable=!M.value.showTable}function pe(){M.value.showTooltip=!M.value.showTooltip}return xe({getData:_e,generatePdf:oe,generateCsv:ve,generateImage:se,toggleTable:de,toggleTooltip:pe}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${T.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref:A,id:`vue-ui-scatter_${g.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.title.text?"":"padding-top:36px"};background:${t.value.style.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:H,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor}`)},[(e.openBlock(),e.createBlock(Me._sfc_main,{key:`title_${K.value}`,config:{title:{cy:"scatter-div-title",...t.value.style.title},subtitle:{cy:"scatter-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&D.value?(e.openBlock(),e.createBlock(fe.UserOptions,{ref_key:"details",ref:we,key:`user_options_${U.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(ae),isPrinting:e.unref(le),uid:g.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:M.value.showTooltip,isFullscreen:T.value,titles:{...t.value.userOptions.buttonTitles},chartElement:A.value,onToggleFullscreen:Ne,onGeneratePdf:e.unref(oe),onGenerateCsv:ve,onGenerateImage:e.unref(se),onToggleTable:de,onToggleTooltip:pe},e.createSlots({_:2},[a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),D.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(s.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),viewBox:`0 0 ${k.value.width<=0?10:k.value.width} ${k.value.height<=0?10:k.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.backgroundColor};color:${t.value.style.color}`)},[t.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",De,[e.createElementVNode("line",{x1:v.value.x,x2:v.value.x,y1:n.value.top,y2:n.value.bottom,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Pe),e.createElementVNode("line",{x1:n.value.left,x2:n.value.right,y1:v.value.y,y2:v.value.y,stroke:t.value.style.layout.axis.stroke,"stroke-width":t.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,Fe)])):e.createCommentVNode("",!0),t.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",We,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(s.giftWrap)({series:l.plots}),fill:e.unref(s.setOpacity)(l.color,t.value.style.layout.plots.giftWrap.fillOpacity*100),"stroke-width":t.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.giftWrap.strokeDasharray,stroke:l.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Oe)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[!l.shape||l.shape==="circle"?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(o,i)=>(e.openBlock(),e.createElementBlock("circle",{cx:o.x,cy:o.y,r:B.value&&B.value===o.id?o.weight*2:o.weight,fill:e.unref(s.setOpacity)(l.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,"stroke-width":t.value.style.layout.plots.strokeWidth,onMouseover:h=>ie(o,r),onMouseleave:ce,style:e.normalizeStyle(`opacity:${B.value&&B.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/ne.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,44,Ie))),256))])):(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(o,i)=>(e.openBlock(),e.createBlock(me._sfc_main,{plot:{x:o.x,y:o.y},radius:B.value&&B.value===o.id?o.weight*2:o.weight,shape:l.shape,color:e.unref(s.setOpacity)(l.color,t.value.style.layout.plots.opacity*100),stroke:t.value.style.layout.plots.stroke,strokeWidth:t.value.style.layout.plots.strokeWidth,onMouseover:h=>ie(o,r),onMouseleave:ce,style:e.normalizeStyle(`opacity:${B.value&&B.value===o.id?1:t.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(o.deviation)/ne.value:t.value.style.layout.plots.significance.show&&Math.abs(o.deviation)>t.value.style.layout.plots.significance.deviationThreshold?t.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),t.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",Ye,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`marginal_x_${g.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.marginalBars.fill},null,8,Re),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,Ge)],8,je),e.createElementVNode("linearGradient",{id:`marginal_y_${g.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.backgroundColor},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.marginalBars.fill},null,8,Je)],8,Ue)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.x,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgX[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:b.value.avgX[r]-n.value.width/S.value/2,y:n.value.top-t.value.style.layout.marginalBars.offset-l/b.value.maxX*t.value.style.layout.marginalBars.size,width:n.value.width/S.value<=0?1e-4:n.value.width/S.value,height:l/b.value.maxX*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxX*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,Ke)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value.y,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[l&&b.value.avgY[r]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:n.value.right+t.value.style.layout.marginalBars.offset,y:b.value.avgY[r]-n.value.height/S.value/2,height:n.value.height/S.value<=0?1e-4:n.value.height/S.value,width:l/b.value.maxY*t.value.style.layout.marginalBars.size<=0?1e-4:l/b.value.maxY*t.value.style.layout.marginalBars.size,fill:t.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${g.value})`:t.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${t.value.style.layout.marginalBars.opacity}`),stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.strokeWidth,rx:t.value.style.layout.marginalBars.borderRadius},null,12,Qe)):e.createCommentVNode("",!0)]))),256)),t.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Ce.value,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${l.dX}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,et)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${l.dX}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,tt)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${l.dY}`,stroke:t.value.style.backgroundColor,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,lt)),p.value.includes(l.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${l.dY}`,stroke:l.color,"stroke-width":t.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,at))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),c.value&&t.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",ot,[e.createElementVNode("line",{x1:v.value.x,x2:c.value.x,y1:c.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,st),e.createElementVNode("line",{x1:c.value.x,x2:c.value.x,y1:v.value.y,y2:c.value.y,stroke:t.value.style.layout.plots.selectors.stroke,"stroke-width":t.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":t.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,rt),e.createElementVNode("text",{x:v.value.x+(c.value.x>v.value.x?-6:6),y:c.value.y+t.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x>v.value.x?"end":"start"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.y),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.y),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,nt),e.createElementVNode("text",{x:c.value.x,y:v.value.y+(c.value.y>v.value.y?-6:t.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(c.value.v.x),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(c.value.v.x),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.plots.selectors.labels.rounding}),{datapoint:c.value})),9,ut),e.createElementVNode("circle",{cx:v.value.x,cy:c.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,it),e.createElementVNode("circle",{cx:c.value.x,cy:v.value.y,r:t.value.style.layout.plots.selectors.markers.radius,fill:t.value.style.layout.plots.selectors.markers.fill,stroke:t.value.style.layout.plots.selectors.markers.stroke,"stroke-width":t.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,ct),t.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:c.value.x,y:c.value.y+(c.value.y<v.value.y?-t.value.style.layout.plots.selectors.labels.fontSize/2:t.value.style.layout.plots.selectors.labels.fontSize),"font-size":t.value.style.layout.plots.selectors.labels.fontSize,fill:t.value.style.layout.plots.selectors.labels.color,"font-weight":t.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":c.value.x<n.value.left+100?"start":c.value.x>n.value.right-100?"end":c.value.x>v.value.x?"start":"end"},e.toDisplayString(c.value.v.name),9,yt)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",vt,[e.createElementVNode("text",{x:n.value.left-5,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,dt),e.createElementVNode("text",{x:n.value.right+3,y:v.value.y+t.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.x.formatter,e.unref(s.checkNaN)(y.value.xMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.xMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.xAxis.rounding}))),9,pt),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${g.value}`,transform:`translate(${t.value.style.layout.dataLabels.xAxis.fontSize*2}, ${n.value.top+n.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.name),9,ht)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",ft,[e.createElementVNode("text",{x:v.value.x,y:n.value.bottom+t.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMin),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMin),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,mt),e.createElementVNode("text",{x:v.value.x,y:n.value.top-t.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.style.layout.plots.selectors.labels.y.formatter,e.unref(s.checkNaN)(y.value.yMax),e.unref(s.dataLabel)({p:t.value.style.layout.plots.selectors.labels.prefix,v:e.unref(s.checkNaN)(y.value.yMax),s:t.value.style.layout.plots.selectors.labels.suffix,r:t.value.style.layout.dataLabels.yAxis.rounding}))),9,gt),e.createElementVNode("text",{"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:t.value.style.layout.dataLabels.yAxis.color,x:n.value.left+n.value.width/2,y:n.value.bottom+8+t.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(t.value.style.layout.dataLabels.yAxis.name),9,kt)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${g.value}`},[e.createElementVNode("rect",{x:n.value.left,y:n.value.top,width:n.value.width<=0?1e-4:n.value.width,height:n.value.height<=0?1e-4:n.value.height},null,8,bt)],8,xt),t.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:l.correlation.x1,x2:l.correlation.x2,y1:l.correlation.y1,y2:l.correlation.y2,"stroke-dasharray":t.value.style.layout.correlation.strokeDasharray,stroke:l.color,"stroke-width":t.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${g.value})`},null,8,Bt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.label.x,y:l.label.y,fill:t.value.style.layout.correlation.label.useSerieColor?l.color:t.value.style.layout.correlation.label.color,"font-size":t.value.style.layout.correlation.label.fontSize,"font-weight":t.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(e.unref(s.dataLabel)({v:e.unref(s.checkNaN)(l.correlation.coefficient),r:t.value.style.layout.correlation.label.roundingValue})),9,_t)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:k.value},void 0,!0)],14,Te)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ct,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),D.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Le.default,{key:4,config:{type:"quadrant",style:{backgroundColor:t.value.style.backgroundColor,quadrant:{grid:{color:t.value.style.layout.axis.stroke},plots:{color:t.value.style.layout.axis.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:J},[t.value.style.legend.show?(e.openBlock(),e.createBlock($e.Legend,{key:`legend_${Z.value}`,legendSet:$.value,config:Be.value,onClickMarker:u[0]||(u[0]=({legend:l})=>ye(l.id))},{item:e.withCtx(({legend:l})=>[e.createElementVNode("div",{onClick:r=>l.segregate(),style:e.normalizeStyle(`opacity:${p.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name),13,Nt)]),_:1},8,["legendSet","config"])):e.renderSlot(a.$slots,"legend",{key:1,legend:$.value},void 0,!0)],512),e.createVNode(Se._sfc_main,{show:M.value.showTooltip&&q.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:A.value,content:I.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...Y.value})),void 0,!0)]),default:e.withCtx(()=>[t.value.style.tooltip.showShape?(e.openBlock(),e.createElementBlock("div",Mt,[(e.openBlock(),e.createElementBlock("svg",St,[e.createVNode(me._sfc_main,{shape:c.value.shape,color:c.value.color,plot:{x:10,y:10},radius:7},null,8,["shape","color"])]))])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),D.value?(e.openBlock(),e.createBlock(ze.default,{key:5,hideDetails:"",config:{open:M.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ee.DataTable,{key:`table_${Q.value}`,colNames:W.value.colNames,head:W.value.head,body:W.value.body,config:W.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:u[1]||(u[1]=l=>M.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),td:e.withCtx(({td:l})=>[l.shape?(e.openBlock(),e.createElementBlock("div",$t,[e.createElementVNode("span",null,e.toDisplayString(l.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:l},null,8,Et))]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ae))}},zt=Ve._export_sfc(Lt,[["__scopeId","data-v-1c5d942b"]]);exports.default=zt;
|