vue-data-ui 2.3.90 → 2.3.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/{Arrow-C_Fnn6al.js → Arrow-16rQhq4i.js} +1 -1
- package/dist/{Arrow-D1pymKl6.cjs → Arrow-CdJD01md.cjs} +1 -1
- package/dist/{BaseIcon-BMfi5PnL.js → BaseIcon-CAmYNoaf.js} +1 -1
- package/dist/{BaseIcon-CnFXP_n9.cjs → BaseIcon-dYWMubrH.cjs} +1 -1
- package/dist/{DataTable-Cmbf3abv.js → DataTable-BXnbua0J.js} +2 -2
- package/dist/{DataTable-cOEA6Z37.cjs → DataTable-oa0Srfuc.cjs} +1 -1
- package/dist/{Legend-CCq0mNRg.js → Legend-Cr1hulgT.js} +1 -1
- package/dist/{Legend-XqP6-7Ac.cjs → Legend-Dhm9_peB.cjs} +1 -1
- package/dist/PackageVersion-BVZfgDqm.js +10 -0
- package/dist/PackageVersion-BkgJVmj1.cjs +1 -0
- package/dist/{Shape-BNocET8E.js → Shape-D75m5xWM.js} +1 -1
- package/dist/{Shape-B51JGReT.cjs → Shape-hGbEoQOv.cjs} +1 -1
- package/dist/{Slicer-Bc7OWCcl.cjs → Slicer-B7ya0m2Q.cjs} +1 -1
- package/dist/{Slicer-BKszZXjM.js → Slicer-Bx8AozB8.js} +2 -2
- package/dist/{Title-DlBwa3-X.js → Title-1Sw6EmHy.js} +1 -1
- package/dist/{Title-BaR4XyXa.cjs → Title-Bjrh7khe.cjs} +1 -1
- package/dist/{Tooltip-CX57w9Q9.cjs → Tooltip-CPATjuur.cjs} +1 -1
- package/dist/{Tooltip-w32n-8sY.js → Tooltip-EJf3VBPR.js} +1 -1
- package/dist/documentation/installation.md +1 -1
- package/dist/index-D09qCApg.cjs +4 -0
- package/dist/{index-DQl1TFXa.js → index-DhJby8wL.js} +8 -3
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +16 -0
- package/dist/types/vue-data-ui.d.ts +16 -0
- package/dist/{useNestedProp-DlCe_zZz.cjs → useNestedProp-Bwd7mK1Z.cjs} +1 -1
- package/dist/{useNestedProp-lmeFt-ev.js → useNestedProp-CrHvyupb.js} +1 -1
- package/dist/{usePrinter-DgKGVvJC.js → usePrinter-Bwm8J3RQ.js} +1 -1
- package/dist/{usePrinter-BmXrEJ99.cjs → usePrinter-DdsPm5a4.cjs} +1 -1
- package/dist/{vue-data-ui-Byrb_Y3k.js → vue-data-ui-CLxne31S.js} +57 -57
- package/dist/{vue-data-ui-DQurgvN8.cjs → vue-data-ui-ZitCqVgG.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-DAv5cYGJ.cjs +19 -0
- package/dist/{vue-ui-3d-bar-CM_usP2U.js → vue-ui-3d-bar-Dg87_AAm.js} +148 -146
- package/dist/{vue-ui-accordion-DRI-fN6I.cjs → vue-ui-accordion-BAHX7KzB.cjs} +1 -1
- package/dist/{vue-ui-accordion-CroZrm7T.js → vue-ui-accordion-Cn5Jbplg.js} +3 -3
- package/dist/vue-ui-age-pyramid-GzHwQzsH.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-BZU-WI_a.js → vue-ui-age-pyramid-PlamQWqC.js} +83 -81
- package/dist/{vue-ui-annotator-BpzM25VY.cjs → vue-ui-annotator-DGgQwl-K.cjs} +1 -1
- package/dist/{vue-ui-annotator-CsfYgmrC.js → vue-ui-annotator-Dd5KF_cy.js} +1 -1
- package/dist/vue-ui-candlestick-BIEB2J1w.cjs +2 -0
- package/dist/{vue-ui-candlestick-BPi7aBEf.js → vue-ui-candlestick-DTzwPhV5.js} +113 -111
- package/dist/{vue-ui-carousel-table-CpodLcgX.cjs → vue-ui-carousel-table-HNTf5AYY.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-tbviS8Fo.js → vue-ui-carousel-table-YEfvPESA.js} +4 -4
- package/dist/vue-ui-chestnut-DzjdAYsT.cjs +6 -0
- package/dist/{vue-ui-chestnut-ql9yEs6j.js → vue-ui-chestnut-PzMOM7mp.js} +161 -159
- package/dist/{vue-ui-cursor-B3w0SgJP.cjs → vue-ui-cursor-C5rsiCdn.cjs} +1 -1
- package/dist/{vue-ui-cursor-Dw7_R_Pd.js → vue-ui-cursor-DWea2yXV.js} +2 -2
- package/dist/{vue-ui-dashboard-enrB5B3P.cjs → vue-ui-dashboard-BqXhoS8m.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DAY0cdat.js → vue-ui-dashboard-CVespiTo.js} +2 -2
- package/dist/{vue-ui-digits-DN6CRpXc.js → vue-ui-digits-gNKgZqYU.js} +2 -2
- package/dist/{vue-ui-digits-3Q6uZCzD.cjs → vue-ui-digits-wmDN7Vkf.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-CzBvVRKG.js → vue-ui-donut-evolution-Ch6HH0ja.js} +102 -100
- package/dist/vue-ui-donut-evolution-DhDxLZ1J.cjs +1 -0
- package/dist/vue-ui-donut-n37BZPxr.cjs +1 -0
- package/dist/{vue-ui-donut-B3yDJvZI.js → vue-ui-donut-sQunZI1L.js} +118 -116
- package/dist/vue-ui-dumbbell-B9Z_pjnG.cjs +9 -0
- package/dist/{vue-ui-dumbbell-vQ5YRGwJ.js → vue-ui-dumbbell-lFlZX8Yi.js} +88 -86
- package/dist/vue-ui-flow-BaFpUJg-.cjs +1 -0
- package/dist/{vue-ui-flow-DAOKURA6.js → vue-ui-flow-CSIOC-JR.js} +65 -63
- package/dist/vue-ui-galaxy-BIR5GxIc.cjs +1 -0
- package/dist/{vue-ui-galaxy-B86BK1JM.js → vue-ui-galaxy-DL2mnel_.js} +82 -80
- package/dist/{vue-ui-gauge-n8TilFo9.js → vue-ui-gauge-BMq7KT3t.js} +56 -54
- package/dist/vue-ui-gauge-r_qvpwE7.cjs +1 -0
- package/dist/vue-ui-gizmo-DBas_Sw_.cjs +1 -0
- package/dist/{vue-ui-gizmo-CFIBlG4V.js → vue-ui-gizmo-Dj7zvNI1.js} +32 -30
- package/dist/{vue-ui-heatmap-ZkmD9EAg.js → vue-ui-heatmap-pqBYIrxm.js} +99 -97
- package/dist/vue-ui-heatmap-qPgEhAzc.cjs +1 -0
- package/dist/{vue-ui-kpi-D6Myg0y1.cjs → vue-ui-kpi-Cmo9J7wp.cjs} +1 -1
- package/dist/{vue-ui-kpi-CtJ3t6GX.js → vue-ui-kpi-ZPBinMiF.js} +3 -3
- package/dist/{vue-ui-mini-loader-BjJ_YYZj.cjs → vue-ui-mini-loader-Ce-jbgMT.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-Cosy9XjR.js → vue-ui-mini-loader-DOTWhLi9.js} +2 -2
- package/dist/vue-ui-molecule-D429iwPP.cjs +1 -0
- package/dist/{vue-ui-molecule-DTFOBjgC.js → vue-ui-molecule-RDpgNrHQ.js} +77 -75
- package/dist/{vue-ui-mood-radar-J_dI9m_i.js → vue-ui-mood-radar-CD5L8WCU.js} +76 -74
- package/dist/vue-ui-mood-radar-CdLJxrkT.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-CtqU4xxu.js → vue-ui-nested-donuts-A-tid5cQ.js} +112 -110
- package/dist/vue-ui-nested-donuts-DyM3uc7x.cjs +17 -0
- package/dist/vue-ui-onion-BKql8oal.cjs +5 -0
- package/dist/{vue-ui-onion-BMo0Ye54.js → vue-ui-onion-Cap01Ehu.js} +82 -80
- package/dist/vue-ui-parallel-coordinate-plot-B0zMgtnq.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-yKLZbDS5.js → vue-ui-parallel-coordinate-plot-CcDKe4L0.js} +91 -89
- package/dist/{vue-ui-quadrant-BrRasVaj.js → vue-ui-quadrant-BDEfAeyJ.js} +141 -139
- package/dist/vue-ui-quadrant-CZzdpeQ2.cjs +1 -0
- package/dist/{vue-ui-quick-chart-uH33UIjX.js → vue-ui-quick-chart-DlAUYg5u.js} +166 -164
- package/dist/vue-ui-quick-chart-DpGYUyhq.cjs +15 -0
- package/dist/{vue-ui-radar-BJ3qMHP4.js → vue-ui-radar-CbTln7gs.js} +89 -87
- package/dist/vue-ui-radar-oBeaHlpT.cjs +1 -0
- package/dist/{vue-ui-rating-BEWaQMBR.cjs → vue-ui-rating-BU7-F3_e.cjs} +1 -1
- package/dist/{vue-ui-rating-BFskhiyh.js → vue-ui-rating-BkDncqow.js} +2 -2
- package/dist/{vue-ui-relation-circle-DdK4qk0P.js → vue-ui-relation-circle-C5B6UNGd.js} +54 -52
- package/dist/vue-ui-relation-circle-IWiJWgcB.cjs +1 -0
- package/dist/{vue-ui-rings-BqHSq6Wt.js → vue-ui-rings-BujVUJ90.js} +97 -93
- package/dist/{vue-ui-rings-D_T_D6AS.cjs → vue-ui-rings-Df2cRgD8.cjs} +2 -2
- package/dist/{vue-ui-scatter-C0gfF6NJ.js → vue-ui-scatter-D6yqZJ7s.js} +132 -130
- package/dist/vue-ui-scatter-jFTeM2hW.cjs +1 -0
- package/dist/{vue-ui-screenshot-6tOLntj9.js → vue-ui-screenshot-CHAySwpv.js} +1 -1
- package/dist/{vue-ui-screenshot-CbvIYfYU.cjs → vue-ui-screenshot-CVu8IM33.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BVJGmYjj.js → vue-ui-skeleton-ASX40MGk.js} +423 -388
- package/dist/vue-ui-skeleton-CAlTn_Cg.cjs +41 -0
- package/dist/{vue-ui-smiley-2EoxEmXW.js → vue-ui-smiley-DGVzhza2.js} +2 -2
- package/dist/{vue-ui-smiley-CUgH2tnV.cjs → vue-ui-smiley-dwCqhB0r.cjs} +1 -1
- package/dist/vue-ui-spark-trend-A1EHFK_r.cjs +1 -0
- package/dist/{vue-ui-spark-trend-DjNPMOkN.js → vue-ui-spark-trend-B7XhDvTj.js} +42 -40
- package/dist/{vue-ui-sparkbar-BBm3DE1P.js → vue-ui-sparkbar-BuNcvi66.js} +53 -51
- package/dist/vue-ui-sparkbar-CwNjHOjD.cjs +1 -0
- package/dist/vue-ui-sparkgauge-ISu154lS.cjs +1 -0
- package/dist/{vue-ui-sparkgauge-IIW24eJQ.js → vue-ui-sparkgauge-JY2kB9WX.js} +31 -29
- package/dist/vue-ui-sparkhistogram-C8zyC-ii.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-DVXxA6ji.js → vue-ui-sparkhistogram-DyEPWxkP.js} +69 -67
- package/dist/vue-ui-sparkline-DL3Thtc4.cjs +1 -0
- package/dist/{vue-ui-sparkline-CH89kcaa.js → vue-ui-sparkline-DYC3sdvQ.js} +65 -63
- package/dist/{vue-ui-sparkstackbar-Bcod5yu_.js → vue-ui-sparkstackbar-7TmtP3WR.js} +46 -44
- package/dist/vue-ui-sparkstackbar-ChIM9bn2.cjs +1 -0
- package/dist/{vue-ui-stackbar-Djjcgtyg.js → vue-ui-stackbar-CP5C6Gb_.js} +128 -126
- package/dist/vue-ui-stackbar-DrtiSaNc.cjs +6 -0
- package/dist/vue-ui-strip-plot-BMYMIHGu.cjs +1 -0
- package/dist/{vue-ui-strip-plot-ByPCQ4xk.js → vue-ui-strip-plot-DJQCq_KE.js} +78 -76
- package/dist/{vue-ui-table-B6Kpda3o.cjs → vue-ui-table-D6hvgMif.cjs} +1 -1
- package/dist/{vue-ui-table-D8Sm2fzX.js → vue-ui-table-IJi0xaVg.js} +1 -1
- package/dist/{vue-ui-table-heatmap-DjEN0l12.cjs → vue-ui-table-heatmap-BZNKXZNs.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-mlq_J56h.js → vue-ui-table-heatmap-Ls8_xq0D.js} +4 -4
- package/dist/{vue-ui-table-sparkline-DByva7rj.cjs → vue-ui-table-sparkline-BQFK30H1.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DF29_qZk.js → vue-ui-table-sparkline-BeuvdssX.js} +5 -5
- package/dist/vue-ui-thermometer-DKm8SXlE.cjs +1 -0
- package/dist/{vue-ui-thermometer-BKf-rGuS.js → vue-ui-thermometer-DPWIvG92.js} +80 -78
- package/dist/{vue-ui-timer-B8jW8M60.js → vue-ui-timer-CEzDvZf7.js} +62 -60
- package/dist/vue-ui-timer-n6lv7oTx.cjs +64 -0
- package/dist/vue-ui-tiremarks-B33mHXZN.cjs +1 -0
- package/dist/{vue-ui-tiremarks-riEfve5q.js → vue-ui-tiremarks-BUGoY22W.js} +51 -49
- package/dist/vue-ui-treemap-DPxBZUUr.cjs +1 -0
- package/dist/{vue-ui-treemap-5F0ynBnb.js → vue-ui-treemap-DmOYjJ_F.js} +93 -91
- package/dist/vue-ui-vertical-bar-BJMYX8t4.cjs +4 -0
- package/dist/{vue-ui-vertical-bar-CxRBvHZy.js → vue-ui-vertical-bar-BpVKdSY5.js} +110 -108
- package/dist/vue-ui-waffle-DGcueccy.cjs +1 -0
- package/dist/{vue-ui-waffle-B8G4i5WH.js → vue-ui-waffle-ULg6SwPx.js} +72 -70
- package/dist/vue-ui-wheel-CWKq-CFW.cjs +1 -0
- package/dist/{vue-ui-wheel-DmzkGeCY.js → vue-ui-wheel-DlmgZd-_.js} +43 -41
- package/dist/vue-ui-word-cloud-BhHWdmqP.cjs +1 -0
- package/dist/vue-ui-word-cloud-DWyboczt.js +574 -0
- package/dist/vue-ui-xy-Cz81fw_E.cjs +3 -0
- package/dist/{vue-ui-xy-iUQyB_PL.js → vue-ui-xy-V13Ns1gv.js} +507 -504
- package/dist/{vue-ui-xy-canvas-nraUv13Y.js → vue-ui-xy-canvas-B9cRe5gT.js} +10 -10
- package/dist/{vue-ui-xy-canvas-CCwtKYgd.cjs → vue-ui-xy-canvas-GiuHOyj5.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-B8EMsnjU.cjs +0 -4
- package/dist/vue-ui-3d-bar-Ce-Re50D.cjs +0 -19
- package/dist/vue-ui-age-pyramid-C08rTXJn.cjs +0 -1
- package/dist/vue-ui-candlestick-m8fjxbj-.cjs +0 -2
- package/dist/vue-ui-chestnut-Y0gQvbbf.cjs +0 -6
- package/dist/vue-ui-donut-CCm7GJsm.cjs +0 -1
- package/dist/vue-ui-donut-evolution-DiN8Jm0n.cjs +0 -1
- package/dist/vue-ui-dumbbell-lb72j7bY.cjs +0 -9
- package/dist/vue-ui-flow-B5Gxaqvl.cjs +0 -1
- package/dist/vue-ui-galaxy-Ck5cPkrh.cjs +0 -1
- package/dist/vue-ui-gauge-BwIhwSUw.cjs +0 -1
- package/dist/vue-ui-gizmo-DrGaoiM_.cjs +0 -1
- package/dist/vue-ui-heatmap-BLc6thGZ.cjs +0 -1
- package/dist/vue-ui-molecule-CAj1HFit.cjs +0 -1
- package/dist/vue-ui-mood-radar-CV2in2wO.cjs +0 -1
- package/dist/vue-ui-nested-donuts-4vO23n9z.cjs +0 -17
- package/dist/vue-ui-onion-B3mtn6xf.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-DFMbhLY9.cjs +0 -8
- package/dist/vue-ui-quadrant-CpJX1Jwa.cjs +0 -1
- package/dist/vue-ui-quick-chart-CTxsI2tk.cjs +0 -15
- package/dist/vue-ui-radar-DFjsXmJ3.cjs +0 -1
- package/dist/vue-ui-relation-circle-DXuKdCih.cjs +0 -1
- package/dist/vue-ui-scatter-DPByFMNL.cjs +0 -1
- package/dist/vue-ui-skeleton-Bli7jLZ7.cjs +0 -41
- package/dist/vue-ui-spark-trend-sfgUJ32Q.cjs +0 -1
- package/dist/vue-ui-sparkbar-CKWYzriN.cjs +0 -1
- package/dist/vue-ui-sparkgauge-D0q9F9Nz.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-CywhBkm2.cjs +0 -1
- package/dist/vue-ui-sparkline-Besp8Ffy.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-qXm8Ozzm.cjs +0 -1
- package/dist/vue-ui-stackbar-D0fGVkCR.cjs +0 -6
- package/dist/vue-ui-strip-plot-XDj8rL9m.cjs +0 -1
- package/dist/vue-ui-thermometer-C3T56ras.cjs +0 -1
- package/dist/vue-ui-timer-B_ZvV1ON.cjs +0 -64
- package/dist/vue-ui-tiremarks-DRbSpTgq.cjs +0 -1
- package/dist/vue-ui-treemap-CtKUTs2G.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BBIWdeXH.cjs +0 -4
- package/dist/vue-ui-waffle-9a3C4Nj-.cjs +0 -1
- package/dist/vue-ui-wheel-CErxlmqw.cjs +0 -1
- package/dist/vue-ui-word-cloud-dMBTVGVk.js +0 -513
- package/dist/vue-ui-word-cloud-nmx846H2.cjs +0 -1
- package/dist/vue-ui-xy-CLYgZk3Y.cjs +0 -3
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { ref as u, computed as d, watch as
|
|
2
|
-
import { u as Re, c as
|
|
1
|
+
import { ref as u, computed as d, watch as Ie, onMounted as Oe, onBeforeUnmount as Me, openBlock as n, createElementBlock as m, normalizeClass as B, normalizeStyle as O, createBlock as x, createCommentVNode as N, unref as i, createSlots as ze, withCtx as h, renderSlot as f, normalizeProps as D, guardReactiveProps as G, createVNode as de, createElementVNode as k, Fragment as pe, renderList as he, createTextVNode as ge, toDisplayString as U, nextTick as Ae } from "vue";
|
|
2
|
+
import { u as Re, c as fe, 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 ye, f as _, X as Ee, s as He, w as Xe, v as j, i as me, x as je, y as Ye, q as qe, r as Je } from "./index-DhJby8wL.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
|
|
12
|
-
import { _ as rt } from "./
|
|
13
|
-
|
|
4
|
+
import { _ as Ze } from "./Title-1Sw6EmHy.js";
|
|
5
|
+
import { u as et, U as tt } from "./usePrinter-Bwm8J3RQ.js";
|
|
6
|
+
import { _ as lt } from "./Tooltip-EJf3VBPR.js";
|
|
7
|
+
import { D as at } from "./DataTable-BXnbua0J.js";
|
|
8
|
+
import { L as ot } from "./Legend-Cr1hulgT.js";
|
|
9
|
+
import st from "./vue-ui-skeleton-ASX40MGk.js";
|
|
10
|
+
import ut from "./vue-ui-accordion-Cn5Jbplg.js";
|
|
11
|
+
import { u as be } from "./useNestedProp-CrHvyupb.js";
|
|
12
|
+
import { _ as rt } from "./PackageVersion-BVZfgDqm.js";
|
|
13
|
+
import { _ as nt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const it = ["id"], vt = ["xmlns", "viewBox"], ct = ["id"], dt = ["stop-color"], pt = ["stop-color"], ht = ["stroke", "cx", "cy", "r", "fill"], gt = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], ft = ["cx", "cy", "r", "onMouseenter"], yt = {
|
|
14
15
|
key: 3,
|
|
15
16
|
class: "vue-data-ui-watermark"
|
|
16
|
-
},
|
|
17
|
+
}, mt = ["onClick"], bt = { key: 0 }, kt = { key: 1 }, Ct = ["innerHTML"], wt = {
|
|
17
18
|
__name: "vue-ui-rings",
|
|
18
19
|
props: {
|
|
19
20
|
config: {
|
|
@@ -30,29 +31,29 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
emits: ["selectLegend"],
|
|
33
|
-
setup(
|
|
34
|
-
const g =
|
|
34
|
+
setup(ke, { expose: Ce, emit: we }) {
|
|
35
|
+
const g = ke, { vue_ui_rings: $e } = Re(), P = u(!1), M = d(() => !!g.dataset && g.dataset.length), L = u(fe()), Te = u(null), z = u(!1), W = u(""), $ = u(null), Y = u(0), S = u(null), q = u(null), J = u(null), K = u(0), Q = u(0), Z = u(0), e = d({
|
|
35
36
|
get: () => ee(),
|
|
36
37
|
set: (t) => t
|
|
37
38
|
});
|
|
38
39
|
function ee() {
|
|
39
|
-
const t =
|
|
40
|
+
const t = be({
|
|
40
41
|
userConfig: g.config,
|
|
41
|
-
defaultConfig:
|
|
42
|
+
defaultConfig: $e
|
|
42
43
|
});
|
|
43
44
|
return t.theme ? {
|
|
44
|
-
...
|
|
45
|
+
...be({
|
|
45
46
|
userConfig: Ve.vue_ui_rings[t.theme] || g.config,
|
|
46
47
|
defaultConfig: t
|
|
47
48
|
}),
|
|
48
49
|
customPalette: Be[t.theme] || T
|
|
49
50
|
} : t;
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
+
Ie(() => g.config, (t) => {
|
|
52
53
|
e.value = ee(), te(), K.value += 1, Q.value += 1, Z.value += 1;
|
|
53
54
|
}, { deep: !0 });
|
|
54
55
|
const A = u(null);
|
|
55
|
-
|
|
56
|
+
Oe(() => {
|
|
56
57
|
te();
|
|
57
58
|
});
|
|
58
59
|
function te() {
|
|
@@ -89,40 +90,40 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
89
90
|
P.value = !0;
|
|
90
91
|
}, 600);
|
|
91
92
|
}
|
|
92
|
-
|
|
93
|
+
Me(() => {
|
|
93
94
|
A.value && A.value.disconnect();
|
|
94
95
|
});
|
|
95
96
|
const { isPrinting: le, isImaging: ae, generatePdf: oe, generateImage: se } = et({
|
|
96
97
|
elementId: `rings_${L.value}`,
|
|
97
98
|
fileName: e.value.style.chart.title.text || "vue-ui-rings"
|
|
98
|
-
}), ue = d(() => Ue(e.value.customPalette)),
|
|
99
|
+
}), ue = d(() => Ue(e.value.customPalette)), C = u({
|
|
99
100
|
showTable: e.value.table.show,
|
|
100
101
|
showTooltip: e.value.style.chart.tooltip.show
|
|
101
102
|
}), r = u({
|
|
102
103
|
height: 360,
|
|
103
104
|
width: 360
|
|
104
|
-
}),
|
|
105
|
+
}), _e = d(() => Math.min(r.value.height, r.value.width)), v = u([]);
|
|
105
106
|
function E(t) {
|
|
106
|
-
v.value.includes(t) ? v.value = v.value.filter((a) => a !== t) : v.value.push(t),
|
|
107
|
+
v.value.includes(t) ? v.value = v.value.filter((a) => a !== t) : v.value.push(t), we("selectLegend", c.value.map((a) => ({
|
|
107
108
|
name: a.name,
|
|
108
109
|
color: a.color,
|
|
109
110
|
value: a.value
|
|
110
111
|
})));
|
|
111
112
|
}
|
|
112
|
-
const
|
|
113
|
+
const xe = d(() => Math.max(
|
|
113
114
|
...R.value.filter((t) => !v.value.includes(t.uid)).map(({ value: t }) => t)
|
|
114
115
|
));
|
|
115
116
|
function re(t) {
|
|
116
|
-
return t /
|
|
117
|
+
return t / xe.value;
|
|
117
118
|
}
|
|
118
119
|
const R = d(() => g.dataset.map(({ values: t, name: a, color: l = null }, o) => {
|
|
119
120
|
const s = We(t).reduce((b, I) => b + I, 0);
|
|
120
121
|
return {
|
|
121
122
|
name: a,
|
|
122
|
-
color: l ||
|
|
123
|
+
color: l || ye(l) || ue.value[o] || T[o] || T[o % T.length],
|
|
123
124
|
value: s,
|
|
124
|
-
proportion: s / g.dataset.map((b) => (b.values || []).reduce((I,
|
|
125
|
-
uid:
|
|
125
|
+
proportion: s / g.dataset.map((b) => (b.values || []).reduce((I, Fe) => I + Fe, 0)).reduce((b, I) => b + I, 0),
|
|
126
|
+
uid: fe()
|
|
126
127
|
};
|
|
127
128
|
})), ne = d(() => R.value.map((t) => ({
|
|
128
129
|
...t,
|
|
@@ -130,7 +131,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
130
131
|
opacity: v.value.includes(t.uid) ? 0.5 : 1,
|
|
131
132
|
segregate: () => E(t.uid),
|
|
132
133
|
isSegregated: v.value.includes(t.uid)
|
|
133
|
-
})).toSorted((t, a) => a.value - t.value)),
|
|
134
|
+
})).toSorted((t, a) => a.value - t.value)), Ne = d(() => ({
|
|
134
135
|
cy: "rings-div-legend",
|
|
135
136
|
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
136
137
|
color: e.value.style.chart.legend.color,
|
|
@@ -140,13 +141,13 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
140
141
|
})), y = d(() => R.value.filter((t) => !v.value.includes(t.uid)).map(({ value: t }) => t).reduce((t, a) => t + a, 0)), c = d(() => R.value.filter((t) => !v.value.includes(t.uid)).map(({ name: t, value: a, color: l = null, uid: o }, s) => ({
|
|
141
142
|
uid: o,
|
|
142
143
|
name: t,
|
|
143
|
-
color: l ||
|
|
144
|
+
color: l || ye(l) || ue.value[s] || T[s] || T[s % T.length],
|
|
144
145
|
value: a,
|
|
145
146
|
proportion: re(a),
|
|
146
147
|
percentage: a / y.value * 100,
|
|
147
148
|
strokeWidth: e.value.style.chart.layout.rings.strokeWidth * re(a)
|
|
148
149
|
})).toSorted((t, a) => a.value - t.value));
|
|
149
|
-
function
|
|
150
|
+
function Pe() {
|
|
150
151
|
return c.value.map(
|
|
151
152
|
({ name: t, color: a, value: l, absoluteValues: o, percentage: s }) => ({
|
|
152
153
|
name: t,
|
|
@@ -157,8 +158,8 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
157
158
|
})
|
|
158
159
|
);
|
|
159
160
|
}
|
|
160
|
-
const p = d(() =>
|
|
161
|
-
function
|
|
161
|
+
const p = d(() => _e.value - e.value.style.chart.layout.rings.strokeWidth * 2), H = u(null);
|
|
162
|
+
function Le(t, a) {
|
|
162
163
|
if (v.value.length === g.dataset.length) return;
|
|
163
164
|
H.value = {
|
|
164
165
|
datapoint: a,
|
|
@@ -181,7 +182,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
181
182
|
});
|
|
182
183
|
else {
|
|
183
184
|
let s = "";
|
|
184
|
-
s += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, s += `<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="${l.color}" /></svg>`, e.value.style.chart.tooltip.showValue && (s += `<b>${
|
|
185
|
+
s += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`, s += `<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="${l.color}" /></svg>`, e.value.style.chart.tooltip.showValue && (s += `<b>${me(
|
|
185
186
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
186
187
|
l.value,
|
|
187
188
|
_({
|
|
@@ -204,7 +205,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
204
205
|
}
|
|
205
206
|
z.value = !0;
|
|
206
207
|
}
|
|
207
|
-
const
|
|
208
|
+
const w = d(() => {
|
|
208
209
|
const t = c.value.map((l) => ({
|
|
209
210
|
name: l.name,
|
|
210
211
|
color: l.color
|
|
@@ -215,13 +216,13 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
215
216
|
' <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>',
|
|
216
217
|
_({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: y.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
217
218
|
"100%"
|
|
218
|
-
], a =
|
|
219
|
+
], a = w.value.head.map((s, b) => [
|
|
219
220
|
{
|
|
220
221
|
color: s.color,
|
|
221
222
|
name: s.name
|
|
222
223
|
},
|
|
223
|
-
_({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v:
|
|
224
|
-
isNaN(
|
|
224
|
+
_({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: w.value.body[b], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
225
|
+
isNaN(w.value.body[b] / y.value) ? "-" : (w.value.body[b] / y.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
|
|
225
226
|
]), l = {
|
|
226
227
|
th: {
|
|
227
228
|
backgroundColor: e.value.table.th.backgroundColor,
|
|
@@ -248,24 +249,24 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
248
249
|
});
|
|
249
250
|
function ie() {
|
|
250
251
|
Ae(() => {
|
|
251
|
-
const t =
|
|
252
|
+
const t = w.value.head.map((o, s) => [[
|
|
252
253
|
o.name
|
|
253
|
-
], [
|
|
254
|
+
], [w.value.body[s]], [isNaN(w.value.body[s] / y.value) ? "-" : w.value.body[s] / y.value * 100]]), a = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(t), l = qe(a);
|
|
254
255
|
Je({ csvContent: l, title: e.value.style.chart.title.text || "vue-ui-rings" });
|
|
255
256
|
});
|
|
256
257
|
}
|
|
257
258
|
const F = u(!1);
|
|
258
|
-
function
|
|
259
|
+
function Se(t) {
|
|
259
260
|
F.value = t, Y.value += 1;
|
|
260
261
|
}
|
|
261
262
|
function ve() {
|
|
262
|
-
|
|
263
|
+
C.value.showTable = !C.value.showTable;
|
|
263
264
|
}
|
|
264
265
|
function ce() {
|
|
265
|
-
|
|
266
|
+
C.value.showTooltip = !C.value.showTooltip;
|
|
266
267
|
}
|
|
267
|
-
return
|
|
268
|
-
getData:
|
|
268
|
+
return Ce({
|
|
269
|
+
getData: Pe,
|
|
269
270
|
generatePdf: oe,
|
|
270
271
|
generateCsv: ie,
|
|
271
272
|
generateImage: se,
|
|
@@ -303,7 +304,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
303
304
|
], 512)) : N("", !0),
|
|
304
305
|
e.value.userOptions.show && M.value ? (n(), x(tt, {
|
|
305
306
|
ref_key: "details",
|
|
306
|
-
ref:
|
|
307
|
+
ref: Te,
|
|
307
308
|
key: `user_options_${Y.value}`,
|
|
308
309
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
309
310
|
color: e.value.style.chart.color,
|
|
@@ -316,18 +317,18 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
316
317
|
hasImg: e.value.userOptions.buttons.img,
|
|
317
318
|
hasTable: e.value.userOptions.buttons.table,
|
|
318
319
|
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
319
|
-
isTooltip:
|
|
320
|
+
isTooltip: C.value.showTooltip,
|
|
320
321
|
isFullscreen: F.value,
|
|
321
322
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
322
323
|
chartElement: S.value,
|
|
323
324
|
position: e.value.userOptions.position,
|
|
324
|
-
onToggleFullscreen:
|
|
325
|
+
onToggleFullscreen: Se,
|
|
325
326
|
onGeneratePdf: i(oe),
|
|
326
327
|
onGenerateCsv: ie,
|
|
327
328
|
onGenerateImage: i(se),
|
|
328
329
|
onToggleTable: ve,
|
|
329
330
|
onToggleTooltip: ce
|
|
330
|
-
},
|
|
331
|
+
}, ze({ _: 2 }, [
|
|
331
332
|
t.$slots.optionTooltip ? {
|
|
332
333
|
name: "optionTooltip",
|
|
333
334
|
fn: h(() => [
|
|
@@ -378,25 +379,28 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
378
379
|
viewBox: `0 0 ${r.value.width <= 0 ? 10 : r.value.width} ${r.value.height <= 0 ? 10 : r.value.height}`,
|
|
379
380
|
style: O(`max-width:100%;overflow:visible;background:transparent;color:${e.value.style.chart.color}`)
|
|
380
381
|
}, [
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
"stop
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
"stop
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
382
|
+
de(rt),
|
|
383
|
+
k("defs", null, [
|
|
384
|
+
(n(!0), m(pe, null, he(c.value, (l, o) => (n(), m("radialGradient", {
|
|
385
|
+
cx: "50%",
|
|
386
|
+
cy: "30%",
|
|
387
|
+
r: "50%",
|
|
388
|
+
fx: "50%",
|
|
389
|
+
fy: "50%",
|
|
390
|
+
id: `gradient_${L.value}_${o}`
|
|
391
|
+
}, [
|
|
392
|
+
k("stop", {
|
|
393
|
+
offset: "0%",
|
|
394
|
+
"stop-color": i(He)(i(Xe)(l.color, 0.05), 100 - e.value.style.chart.layout.rings.gradient.intensity)
|
|
395
|
+
}, null, 8, dt),
|
|
396
|
+
k("stop", {
|
|
397
|
+
offset: "100%",
|
|
398
|
+
"stop-color": l.color
|
|
399
|
+
}, null, 8, pt)
|
|
400
|
+
], 8, ct))), 256))
|
|
401
|
+
]),
|
|
402
|
+
(n(!0), m(pe, null, he(c.value, (l, o) => (n(), m("g", null, [
|
|
403
|
+
k("circle", {
|
|
400
404
|
class: B({
|
|
401
405
|
"vue-ui-rings-item": P.value && e.value.useCssAnimation,
|
|
402
406
|
"vue-rings-item-onload": !P.value && e.value.useCssAnimation,
|
|
@@ -408,8 +412,8 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
408
412
|
cy: o === 0 ? r.value.height / 2 : r.value.height / 2 + p.value * c.value[0].proportion / 2 - p.value * l.proportion / 2 - 2 * (o + 1),
|
|
409
413
|
r: i(j)(p.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : p.value * l.proportion / 2 * 0.9),
|
|
410
414
|
fill: e.value.style.chart.layout.rings.gradient.underlayerColor
|
|
411
|
-
}, null, 14,
|
|
412
|
-
|
|
415
|
+
}, null, 14, ht),
|
|
416
|
+
k("circle", {
|
|
413
417
|
class: B({
|
|
414
418
|
"vue-ui-rings-item": P.value && e.value.useCssAnimation,
|
|
415
419
|
"vue-rings-item-onload": !P.value && e.value.useCssAnimation,
|
|
@@ -423,23 +427,23 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
423
427
|
cy: o === 0 ? r.value.height / 2 : r.value.height / 2 + p.value * c.value[0].proportion / 2 - p.value * l.proportion / 2 - 2 * (o + 1),
|
|
424
428
|
r: i(j)(p.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : p.value * l.proportion / 2 * 0.9),
|
|
425
429
|
fill: e.value.style.chart.layout.rings.gradient.show ? `url(#gradient_${L.value}_${o})` : l.color
|
|
426
|
-
}, null, 14,
|
|
427
|
-
|
|
430
|
+
}, null, 14, gt),
|
|
431
|
+
k("circle", {
|
|
428
432
|
"data-cy-trap": "",
|
|
429
433
|
stroke: "none",
|
|
430
434
|
cx: r.value.width / 2,
|
|
431
435
|
cy: o === 0 ? r.value.height / 2 : r.value.height / 2 + p.value * c.value[0].proportion / 2 - p.value * l.proportion / 2 - 2 * (o + 1),
|
|
432
436
|
r: i(j)(p.value * l.proportion / 2 * 0.9 <= 0 ? 1e-4 : p.value * l.proportion / 2 * 0.9),
|
|
433
437
|
fill: "transparent",
|
|
434
|
-
onMouseenter: (s) =>
|
|
438
|
+
onMouseenter: (s) => Le(o, l),
|
|
435
439
|
onMouseleave: a[0] || (a[0] = (s) => {
|
|
436
440
|
$.value = null, z.value = !1;
|
|
437
441
|
})
|
|
438
|
-
}, null, 40,
|
|
442
|
+
}, null, 40, ft)
|
|
439
443
|
]))), 256)),
|
|
440
444
|
f(t.$slots, "svg", { svg: r.value }, void 0, !0)
|
|
441
|
-
], 14,
|
|
442
|
-
t.$slots.watermark ? (n(), m("div",
|
|
445
|
+
], 14, vt)) : N("", !0),
|
|
446
|
+
t.$slots.watermark ? (n(), m("div", yt, [
|
|
443
447
|
f(t.$slots, "watermark", D(G({ isPrinting: i(le) || i(ae) })), void 0, !0)
|
|
444
448
|
])) : N("", !0),
|
|
445
449
|
M.value ? N("", !0) : (n(), x(st, {
|
|
@@ -454,23 +458,23 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
454
458
|
}
|
|
455
459
|
}
|
|
456
460
|
}, null, 8, ["config"])),
|
|
457
|
-
|
|
461
|
+
k("div", {
|
|
458
462
|
ref_key: "chartLegend",
|
|
459
463
|
ref: J
|
|
460
464
|
}, [
|
|
461
465
|
e.value.style.chart.legend.show ? (n(), x(ot, {
|
|
462
466
|
key: `legend_${Z.value}`,
|
|
463
467
|
legendSet: ne.value,
|
|
464
|
-
config:
|
|
468
|
+
config: Ne.value,
|
|
465
469
|
onClickMarker: a[1] || (a[1] = ({ legend: l }) => E(l.uid))
|
|
466
470
|
}, {
|
|
467
471
|
item: h(({ legend: l, index: o }) => [
|
|
468
|
-
|
|
472
|
+
k("div", {
|
|
469
473
|
"data-cy-legend-item": "",
|
|
470
474
|
onClick: (s) => E(l.uid),
|
|
471
475
|
style: O(`opacity:${v.value.includes(l.uid) ? 0.5 : 1}`)
|
|
472
476
|
}, [
|
|
473
|
-
|
|
477
|
+
ge(U(l.name) + ": " + U(i(me)(
|
|
474
478
|
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
475
479
|
l.value,
|
|
476
480
|
i(_)({
|
|
@@ -481,12 +485,12 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
481
485
|
}),
|
|
482
486
|
{ datapoint: l, seriesIndex: o }
|
|
483
487
|
)) + " ", 1),
|
|
484
|
-
v.value.includes(l.uid) ? (n(), m("span",
|
|
488
|
+
v.value.includes(l.uid) ? (n(), m("span", kt, " ( - % ) ")) : (n(), m("span", bt, " (" + U(isNaN(l.value / y.value) ? "-" : i(_)({
|
|
485
489
|
v: l.value / y.value * 100,
|
|
486
490
|
s: "%",
|
|
487
491
|
r: e.value.style.chart.legend.roundingPercentage
|
|
488
492
|
})) + ") ", 1))
|
|
489
|
-
], 12,
|
|
493
|
+
], 12, mt)
|
|
490
494
|
]),
|
|
491
495
|
_: 1
|
|
492
496
|
}, 8, ["legendSet", "config"])) : f(t.$slots, "legend", {
|
|
@@ -494,8 +498,8 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
494
498
|
legend: ne.value
|
|
495
499
|
}, void 0, !0)
|
|
496
500
|
], 512),
|
|
497
|
-
|
|
498
|
-
show:
|
|
501
|
+
de(lt, {
|
|
502
|
+
show: C.value.showTooltip && z.value && v.value.length < g.dataset.length,
|
|
499
503
|
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
500
504
|
color: e.value.style.chart.tooltip.color,
|
|
501
505
|
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
@@ -521,7 +525,7 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
521
525
|
key: 5,
|
|
522
526
|
hideDetails: "",
|
|
523
527
|
config: {
|
|
524
|
-
open:
|
|
528
|
+
open: C.value.showTable,
|
|
525
529
|
maxHeight: 1e4,
|
|
526
530
|
body: {
|
|
527
531
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
@@ -541,25 +545,25 @@ const nt = ["id"], it = ["xmlns", "viewBox"], vt = ["id"], ct = ["stop-color"],
|
|
|
541
545
|
body: V.value.body,
|
|
542
546
|
config: V.value.config,
|
|
543
547
|
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
544
|
-
onClose: a[2] || (a[2] = (l) =>
|
|
548
|
+
onClose: a[2] || (a[2] = (l) => C.value.showTable = !1)
|
|
545
549
|
}, {
|
|
546
550
|
th: h(({ th: l }) => [
|
|
547
|
-
|
|
551
|
+
k("div", {
|
|
548
552
|
innerHTML: l,
|
|
549
553
|
style: { display: "flex", "align-items": "center" }
|
|
550
|
-
}, null, 8,
|
|
554
|
+
}, null, 8, Ct)
|
|
551
555
|
]),
|
|
552
556
|
td: h(({ td: l }) => [
|
|
553
|
-
|
|
557
|
+
ge(U(l.name || l), 1)
|
|
554
558
|
]),
|
|
555
559
|
_: 1
|
|
556
560
|
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
557
561
|
]),
|
|
558
562
|
_: 1
|
|
559
563
|
}, 8, ["config"])) : N("", !0)
|
|
560
|
-
], 46,
|
|
564
|
+
], 46, it));
|
|
561
565
|
}
|
|
562
|
-
},
|
|
566
|
+
}, At = /* @__PURE__ */ nt(wt, [["__scopeId", "data-v-08656179"]]);
|
|
563
567
|
export {
|
|
564
|
-
|
|
568
|
+
At as default
|
|
565
569
|
};
|
|
@@ -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:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${z.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"]))],512)):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,position:t.value.userOptions.position,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","position","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:transparent;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",Ne,[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:E},[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,$e)]),_: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-1e4b06ff"]]);exports.default=Le;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-D09qCApg.cjs"),Y=require("./useResponsive-B3TrDDIG.cjs"),ce=require("./Title-Bjrh7khe.cjs"),J=require("./usePrinter-DdsPm5a4.cjs"),de=require("./Tooltip-CPATjuur.cjs"),ve=require("./DataTable-oa0Srfuc.cjs"),pe=require("./Legend-Dhm9_peB.cjs"),he=require("./vue-ui-skeleton-CAlTn_Cg.cjs"),ge=require("./vue-ui-accordion-BAHX7KzB.cjs"),K=require("./useNestedProp-Bwd7mK1Z.cjs"),fe=require("./PackageVersion-BkgJVmj1.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],be=["xmlns","viewBox"],ke=["id"],Ce=["stop-color"],we=["stop-color"],xe=["stroke","cx","cy","r","fill"],Te=["stroke","stroke-width","cx","cy","r","fill"],Ne=["cx","cy","r","onMouseenter"],$e={key:3,class:"vue-data-ui-watermark"},_e=["onClick"],Se={key:0},Be={key:1},Pe=["innerHTML"],Le={__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),S=e.ref(""),m=e.ref(null),L=e.ref(0),k=e.ref(null),V=e.ref(null),E=e.ref(null),z=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(),z.value+=1,F.value+=1,I.value+=1},{deep:!0});const N=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?E.value:null});s.value.width=a,s.value.height=o});N.value=new ResizeObserver(l),N.value.observe(k.value.parentNode)}setTimeout(()=>{y.value=!0},600)}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:M,isImaging:q,generatePdf:D,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(...$.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function H(l){return l/ae.value}const $=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(()=>$.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(()=>$.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>$.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})))S.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>`),S.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}}),_=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:D,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:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ce._sfc_main,{key:`title_${z.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"]))],512)):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(q),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,position:t.value.userOptions.position,onToggleFullscreen:se,onGeneratePdf:e.unref(D),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","position","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:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(fe._sfc_main),e.createElementVNode("defs",null,[(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,Ce),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,we)],8,ke))),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,xe),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,Te),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,Ne)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,be)):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(q)})),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:E},[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",Be," ( - % ) ")):(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,_e)]),_: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:S.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:_.value.colNames,head:_.value.head,body:_.value.body,config:_.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,Pe)]),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,ye))}},Ve=me._export_sfc(Le,[["__scopeId","data-v-08656179"]]);exports.default=Ve;
|