vue-data-ui 2.4.2 → 2.4.4
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 -1
- package/dist/{Arrow-JuK2z9IB.js → Arrow-AxsI-FAh.js} +1 -1
- package/dist/{Arrow-DLTRnzcG.cjs → Arrow-W6XO2WVI.cjs} +1 -1
- package/dist/{BaseIcon-BGExhz6v.cjs → BaseIcon-BTn_oML7.cjs} +1 -1
- package/dist/{BaseIcon-rRli6Sfv.js → BaseIcon-BX3x6oa7.js} +1 -1
- package/dist/{DataTable-DTk7C4Pr.js → DataTable-BI1tjiA_.js} +2 -2
- package/dist/{DataTable-DJzhv96s.cjs → DataTable-RUQ1G_6L.cjs} +1 -1
- package/dist/{Legend-YZ7Hz3o1.cjs → Legend-B86sMXn7.cjs} +1 -1
- package/dist/{Legend-CYF2gpXG.js → Legend-CRMHjbGw.js} +1 -1
- package/dist/{PackageVersion-CvCRsT5_.js → PackageVersion-Clrfvyd8.js} +1 -1
- package/dist/{PackageVersion-DVZtsuy4.cjs → PackageVersion-CowXQ4IM.cjs} +1 -1
- package/dist/{PenAndPaper-Jb0pLt3G.js → PenAndPaper-BQzgk5kO.js} +2 -2
- package/dist/{PenAndPaper-CyXm-yVL.cjs → PenAndPaper-DBSxk9Xk.cjs} +1 -1
- package/dist/{Shape-BpPn4eWR.js → Shape-DYNtRer6.js} +1 -1
- package/dist/{Shape-X2F-QV_B.cjs → Shape-qK3MNdTg.cjs} +1 -1
- package/dist/{Slicer-CU7dRZR0.js → Slicer-DFPDip5U.js} +3 -3
- package/dist/{Slicer-CL0tP5a5.cjs → Slicer-NlxLkUso.cjs} +1 -1
- package/dist/{Title-5VmBwT4i.js → Title-710895ks.js} +1 -1
- package/dist/{Title-Co5jI5ed.cjs → Title-CUN1T6KC.cjs} +1 -1
- package/dist/{Tooltip-Bl6W8Zn7.cjs → Tooltip-BapDtYOM.cjs} +1 -1
- package/dist/{Tooltip-Cj4EF7v1.js → Tooltip-CPlG_yQU.js} +1 -1
- package/dist/index-CcykRspI.cjs +9 -0
- package/dist/{index-DnVHQ2xI.js → index-DCsPHn9C.js} +4 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +4 -1
- package/dist/types/vue-data-ui.d.ts +4 -1
- package/dist/{useNestedProp-Cox0K0Y5.js → useNestedProp-DdSlLeTW.js} +1 -1
- package/dist/{useNestedProp-q7byAAIJ.cjs → useNestedProp-XtPlFP9O.cjs} +1 -1
- package/dist/{usePrinter-BCAFeO_J.cjs → usePrinter-BcE45wW6.cjs} +1 -1
- package/dist/{usePrinter-BEeNAqS5.js → usePrinter-siG3sKWo.js} +1 -1
- package/dist/useResponsive-BJ7DTGpm.cjs +1 -0
- package/dist/useResponsive-CoxXLe23.js +189 -0
- package/dist/{vue-data-ui-CRLLZpt0.cjs → vue-data-ui-C0o1kZzC.cjs} +1 -1
- package/dist/{vue-data-ui-W7nnqn0v.js → vue-data-ui-D_MTGc8j.js} +58 -58
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BwBrUabe.js → vue-ui-3d-bar-BdzWvy4d.js} +41 -34
- package/dist/{vue-ui-3d-bar-bD_n6qL_.cjs → vue-ui-3d-bar-C298Bf3V.cjs} +2 -2
- package/dist/{vue-ui-accordion-xXgqfR2l.cjs → vue-ui-accordion-B7PTyFVk.cjs} +1 -1
- package/dist/{vue-ui-accordion-DspS4q3f.js → vue-ui-accordion-D4Er5Dy5.js} +3 -3
- package/dist/vue-ui-age-pyramid-BIcB5vtU.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CxBvm3uM.js → vue-ui-age-pyramid-CHEdFQb7.js} +185 -168
- package/dist/{vue-ui-annotator-BOofWpzv.js → vue-ui-annotator-CqM_1HlB.js} +1 -1
- package/dist/{vue-ui-annotator-C6T5_7ZV.cjs → vue-ui-annotator-eGtZcHeb.cjs} +1 -1
- package/dist/{vue-ui-bullet-DraC-oFu.js → vue-ui-bullet-DBk50kIe.js} +195 -158
- package/dist/vue-ui-bullet-DURgZGgp.cjs +34 -0
- package/dist/{vue-ui-candlestick-DQZ5eT1f.js → vue-ui-candlestick-Bo41qkGe.js} +263 -246
- package/dist/vue-ui-candlestick-CP4Z-29b.cjs +2 -0
- package/dist/{vue-ui-carousel-table-PdLjpH1p.js → vue-ui-carousel-table-CkNOqa9q.js} +76 -69
- package/dist/vue-ui-carousel-table-lMqx64wd.cjs +1 -0
- package/dist/{vue-ui-chestnut-ByI_O5hB.js → vue-ui-chestnut-CNWq-epB.js} +299 -286
- package/dist/vue-ui-chestnut-qxzF2ND7.cjs +6 -0
- package/dist/{vue-ui-cursor-BM74l93B.js → vue-ui-cursor-B4m30Gqz.js} +2 -2
- package/dist/{vue-ui-cursor-BvadpA2m.cjs → vue-ui-cursor-BEv39HVY.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CoANBhAM.js → vue-ui-dashboard-BL9IgDDx.js} +2 -2
- package/dist/{vue-ui-dashboard-OP51Gs8I.cjs → vue-ui-dashboard-DnoXstlp.cjs} +1 -1
- package/dist/{vue-ui-digits-DioaBnkB.js → vue-ui-digits-CVPDJ6tl.js} +2 -2
- package/dist/{vue-ui-digits-C7jJJg9k.cjs → vue-ui-digits-D1RaU4V-.cjs} +1 -1
- package/dist/{vue-ui-donut-ldqSm_JV.js → vue-ui-donut-C65SAJKb.js} +374 -357
- package/dist/vue-ui-donut-CMC92CXL.cjs +1 -0
- package/dist/vue-ui-donut-evolution-7gIM4bVk.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-DAb1xzNd.js → vue-ui-donut-evolution-BFbBlmBx.js} +240 -226
- package/dist/{vue-ui-dumbbell-Dg7PkiKJ.js → vue-ui-dumbbell-BnxRfvv0.js} +227 -210
- package/dist/vue-ui-dumbbell-OCo67ZKp.cjs +9 -0
- package/dist/vue-ui-flow-BPnpYrzb.cjs +1 -0
- package/dist/{vue-ui-flow-DKT7ZEnr.js → vue-ui-flow-Cra_F-tK.js} +150 -137
- package/dist/vue-ui-galaxy-3zTk9Pr1.cjs +1 -0
- package/dist/{vue-ui-galaxy-qAA9be3S.js → vue-ui-galaxy-DlJ7v0aD.js} +145 -132
- package/dist/{vue-ui-gauge-D8yVTIgP.js → vue-ui-gauge-CsqVvNxE.js} +210 -193
- package/dist/vue-ui-gauge-DcUNJZI1.cjs +1 -0
- package/dist/{vue-ui-gizmo-W6bTkg59.cjs → vue-ui-gizmo-BkkLoCyx.cjs} +1 -1
- package/dist/{vue-ui-gizmo-DC0uUwI3.js → vue-ui-gizmo-Peyy8li7.js} +3 -3
- package/dist/vue-ui-heatmap-DYb831An.cjs +1 -0
- package/dist/{vue-ui-heatmap-u1raIzBQ.js → vue-ui-heatmap-i4HFM04D.js} +203 -189
- package/dist/{vue-ui-kpi-DY_2WF7U.cjs → vue-ui-kpi-CCrdcv3r.cjs} +1 -1
- package/dist/{vue-ui-kpi-C-iTxMD2.js → vue-ui-kpi-gSKVVqZg.js} +3 -3
- package/dist/{vue-ui-mini-loader-Bfq2MNWu.cjs → vue-ui-mini-loader-CqutMcQI.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-C7x7S0hi.js → vue-ui-mini-loader-D7Jk1LJb.js} +2 -2
- package/dist/{vue-ui-molecule-BFnOIxxs.js → vue-ui-molecule-CgdepnhM.js} +164 -151
- package/dist/vue-ui-molecule-CwUObXAx.cjs +1 -0
- package/dist/{vue-ui-mood-radar-CR1v5v2x.js → vue-ui-mood-radar-Bxro4962.js} +217 -203
- package/dist/vue-ui-mood-radar-RQFKS7Br.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-DEiloQzq.js → vue-ui-nested-donuts-B7dXBejH.js} +342 -325
- package/dist/vue-ui-nested-donuts-D8ZGqIGC.cjs +17 -0
- package/dist/vue-ui-onion-Dtt0kw8E.cjs +5 -0
- package/dist/{vue-ui-onion-LsEhBe4x.js → vue-ui-onion-i52wztm0.js} +267 -250
- package/dist/vue-ui-parallel-coordinate-plot-DNK0BrBy.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-CTlIjJqG.js → vue-ui-parallel-coordinate-plot-DUssrm08.js} +241 -224
- package/dist/{vue-ui-quadrant-DKVVFufb.js → vue-ui-quadrant-BORPtgQO.js} +236 -219
- package/dist/vue-ui-quadrant-a_I5E71f.cjs +1 -0
- package/dist/vue-ui-quick-chart-BpPDfK78.cjs +15 -0
- package/dist/{vue-ui-quick-chart-8vJikiGH.js → vue-ui-quick-chart-yb1FzVdt.js} +469 -452
- package/dist/{vue-ui-radar-20QhOUer.js → vue-ui-radar-CoCbl19A.js} +198 -181
- package/dist/vue-ui-radar-DZMngiqq.cjs +1 -0
- package/dist/{vue-ui-rating-DRWJsve1.js → vue-ui-rating-D-zwuvLK.js} +2 -2
- package/dist/{vue-ui-rating-Bbzm5nUK.cjs → vue-ui-rating-nTJ8DDhG.cjs} +1 -1
- package/dist/vue-ui-relation-circle-CW9qozhJ.js +366 -0
- package/dist/vue-ui-relation-circle-Wj_yrVJc.cjs +1 -0
- package/dist/vue-ui-rings-BZaZIGEz.cjs +2 -0
- package/dist/{vue-ui-rings-DG8GCi3y.js → vue-ui-rings-Bx2GEh6d.js} +221 -204
- package/dist/{vue-ui-scatter-Hqu5-F2H.js → vue-ui-scatter-BARiPzro.js} +375 -358
- package/dist/vue-ui-scatter-C-i1NZgz.cjs +1 -0
- package/dist/{vue-ui-screenshot-cjiqbtLK.js → vue-ui-screenshot-CuiJqlfo.js} +1 -1
- package/dist/{vue-ui-screenshot-D8nxd5RV.cjs → vue-ui-screenshot-CwOoftGV.cjs} +1 -1
- package/dist/{vue-ui-skeleton-aZmkNzAe.js → vue-ui-skeleton-DNuwx6_y.js} +419 -379
- package/dist/vue-ui-skeleton-DpfJbsNA.cjs +41 -0
- package/dist/{vue-ui-smiley-ChNvxygm.js → vue-ui-smiley-BnX27B0k.js} +2 -2
- package/dist/{vue-ui-smiley-B1TA19Hv.cjs → vue-ui-smiley-DGE9NFBY.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-CQxELQcf.js → vue-ui-spark-trend-CgCLrMox.js} +86 -79
- package/dist/vue-ui-spark-trend-aW-de-rX.cjs +1 -0
- package/dist/vue-ui-sparkbar-BLUXUlTY.cjs +1 -0
- package/dist/{vue-ui-sparkbar-0ixbKZzf.js → vue-ui-sparkbar-BXku33sq.js} +90 -83
- package/dist/{vue-ui-sparkgauge-pdYb7OwH.js → vue-ui-sparkgauge-Doi0iu0L.js} +57 -50
- package/dist/vue-ui-sparkgauge-RTiKvSMp.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-N69h2q0U.js → vue-ui-sparkhistogram-BnMvXlAP.js} +74 -67
- package/dist/vue-ui-sparkhistogram-C6AgJH1C.cjs +1 -0
- package/dist/{vue-ui-sparkline-2BKYZMOb.js → vue-ui-sparkline-DI7fq_MR.js} +134 -125
- package/dist/vue-ui-sparkline-DpVCQ6W9.cjs +1 -0
- package/dist/vue-ui-sparkstackbar-Bvuq2sLW.cjs +1 -0
- package/dist/{vue-ui-sparkstackbar-sh03cuOU.js → vue-ui-sparkstackbar-oNnE5z1C.js} +84 -77
- package/dist/{vue-ui-stackbar-B1si-1RM.js → vue-ui-stackbar-6g7b3yyu.js} +205 -196
- package/dist/{vue-ui-stackbar-Dy_saeSe.cjs → vue-ui-stackbar-aWJDGIKV.cjs} +2 -2
- package/dist/{vue-ui-strip-plot-BYn-QrTQ.js → vue-ui-strip-plot-BFM8HIM8.js} +265 -248
- package/dist/vue-ui-strip-plot-GdjjVxMN.cjs +1 -0
- package/dist/{vue-ui-table-DQORPCDJ.js → vue-ui-table-Cw4Yz-IE.js} +1 -1
- package/dist/{vue-ui-table-Ce4waJaj.cjs → vue-ui-table-XOPmDCOB.cjs} +1 -1
- package/dist/vue-ui-table-heatmap-Bh48bMuU.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-Csp7Tx8N.js → vue-ui-table-heatmap-DeRCR8l6.js} +55 -48
- package/dist/vue-ui-table-sparkline-C25qj1w_.cjs +1 -0
- package/dist/{vue-ui-table-sparkline-DdwVrfUj.js → vue-ui-table-sparkline-w3H-od91.js} +88 -81
- package/dist/{vue-ui-thermometer-I6ZnlfAv.js → vue-ui-thermometer-BySEVhT8.js} +162 -149
- package/dist/vue-ui-thermometer-DZrusaGY.cjs +1 -0
- package/dist/{vue-ui-timer-COOXcn14.cjs → vue-ui-timer-1p6J6hTn.cjs} +1 -1
- package/dist/{vue-ui-timer-pi1SazTU.js → vue-ui-timer-BN-9a2lj.js} +6 -6
- package/dist/vue-ui-tiremarks-CvIJeWKE.cjs +1 -0
- package/dist/vue-ui-tiremarks-EzYdOMyf.js +317 -0
- package/dist/vue-ui-treemap-CzNOr1iR.cjs +1 -0
- package/dist/{vue-ui-treemap-3FNUlKxL.js → vue-ui-treemap-Da0f6vaF.js} +283 -266
- package/dist/vue-ui-vertical-bar-B9shdfqo.cjs +4 -0
- package/dist/vue-ui-vertical-bar-D1cBfu5p.js +869 -0
- package/dist/vue-ui-waffle-Cg-7Fazv.cjs +1 -0
- package/dist/{vue-ui-waffle-XecHJIc-.js → vue-ui-waffle-DM2LsEP7.js} +258 -241
- package/dist/vue-ui-wheel-B9cmixxi.js +299 -0
- package/dist/vue-ui-wheel-C-JukdTy.cjs +1 -0
- package/dist/vue-ui-word-cloud-BLMWYOPy.cjs +1 -0
- package/dist/{vue-ui-word-cloud-DnhXUn5x.js → vue-ui-word-cloud-Baz7RXN2.js} +192 -183
- package/dist/vue-ui-xy-BHeSkJQ3.cjs +3 -0
- package/dist/{vue-ui-xy-CqlRuFMc.js → vue-ui-xy-DVnzVSqE.js} +339 -319
- package/dist/{vue-ui-xy-canvas-C8c2X5fk.js → vue-ui-xy-canvas-A7PKnWBs.js} +255 -246
- package/dist/vue-ui-xy-canvas-DAd-B98z.cjs +9 -0
- package/package.json +1 -1
- package/dist/index-FfZRtJ6A.cjs +0 -9
- package/dist/useResponsive-B3TrDDIG.cjs +0 -1
- package/dist/useResponsive-NZB-WLRF.js +0 -187
- package/dist/vue-ui-age-pyramid-BZcAwcVQ.cjs +0 -1
- package/dist/vue-ui-bullet-ChaEgXvR.cjs +0 -23
- package/dist/vue-ui-candlestick--hPCfMFH.cjs +0 -2
- package/dist/vue-ui-carousel-table-DpRQklDZ.cjs +0 -1
- package/dist/vue-ui-chestnut-ae6x87wl.cjs +0 -6
- package/dist/vue-ui-donut-CplNylps.cjs +0 -1
- package/dist/vue-ui-donut-evolution-CQpr-6IS.cjs +0 -1
- package/dist/vue-ui-dumbbell-_ijaYr8W.cjs +0 -9
- package/dist/vue-ui-flow-BPt35d5K.cjs +0 -1
- package/dist/vue-ui-galaxy-e06PkTmp.cjs +0 -1
- package/dist/vue-ui-gauge-DiZVIU0D.cjs +0 -1
- package/dist/vue-ui-heatmap-CbZcv_2I.cjs +0 -1
- package/dist/vue-ui-molecule-CbKMLrDT.cjs +0 -1
- package/dist/vue-ui-mood-radar-6LmFXuiw.cjs +0 -1
- package/dist/vue-ui-nested-donuts-DS0fjiLi.cjs +0 -17
- package/dist/vue-ui-onion-CLvvu4Ku.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-BWg8OFqH.cjs +0 -8
- package/dist/vue-ui-quadrant-OM5J1mG3.cjs +0 -1
- package/dist/vue-ui-quick-chart-gG5Ar8-i.cjs +0 -15
- package/dist/vue-ui-radar-CAaHjDO7.cjs +0 -1
- package/dist/vue-ui-relation-circle-BoGAFXuS.cjs +0 -1
- package/dist/vue-ui-relation-circle-I45_Sk5l.js +0 -349
- package/dist/vue-ui-rings-B9WQ7S5m.cjs +0 -2
- package/dist/vue-ui-scatter-BZfg1YIN.cjs +0 -1
- package/dist/vue-ui-skeleton-Djv08J67.cjs +0 -41
- package/dist/vue-ui-spark-trend-BqrPr63O.cjs +0 -1
- package/dist/vue-ui-sparkbar-CrTEPTU5.cjs +0 -1
- package/dist/vue-ui-sparkgauge-BYxpe_WV.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-D21XDUH2.cjs +0 -1
- package/dist/vue-ui-sparkline-Cf4m-Fxo.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-dAS8XoJs.cjs +0 -1
- package/dist/vue-ui-strip-plot-D53LABpZ.cjs +0 -1
- package/dist/vue-ui-table-heatmap-EqHt-O7Y.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DONmVOMh.cjs +0 -1
- package/dist/vue-ui-thermometer-hQBkMa7u.cjs +0 -1
- package/dist/vue-ui-tiremarks-hdNqoGyd.cjs +0 -1
- package/dist/vue-ui-tiremarks-vdPQYiDp.js +0 -303
- package/dist/vue-ui-treemap-Cv0TSFQa.cjs +0 -1
- package/dist/vue-ui-vertical-bar-C--Ma0Dw.cjs +0 -4
- package/dist/vue-ui-vertical-bar-DwxpB46q.js +0 -852
- package/dist/vue-ui-waffle-CKM0QyJN.cjs +0 -1
- package/dist/vue-ui-wheel-Bbih5sSL.js +0 -282
- package/dist/vue-ui-wheel-C0dJrzOJ.cjs +0 -1
- package/dist/vue-ui-word-cloud-Cfd2wxsT.cjs +0 -1
- package/dist/vue-ui-xy-BDpqVzAq.cjs +0 -3
- package/dist/vue-ui-xy-canvas-Cansjd3L.cjs +0 -9
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
import { computed as h, ref as y, watch as J, onMounted as re, openBlock as n, createElementBlock as c, normalizeClass as L, normalizeStyle as K, createBlock as F, createCommentVNode as k, unref as d, createSlots as se, withCtx as z, renderSlot as b, normalizeProps as M, guardReactiveProps as T, createVNode as ne, Fragment as Q, renderList as V, toDisplayString as ue } from "vue";
|
|
2
|
-
import { u as W } from "./useNestedProp-Cox0K0Y5.js";
|
|
3
|
-
import { u as ie, c as ce, t as ve, v as he, o as de, e as me, w as Z, X as fe, i as ge, f as pe } from "./index-DnVHQ2xI.js";
|
|
4
|
-
import { _ as ye } from "./Title-5VmBwT4i.js";
|
|
5
|
-
import { u as ke, U as _e } from "./usePrinter-BEeNAqS5.js";
|
|
6
|
-
import be from "./vue-ui-skeleton-aZmkNzAe.js";
|
|
7
|
-
import { _ as Ce } from "./PackageVersion-CvCRsT5_.js";
|
|
8
|
-
import { P as $e } from "./PenAndPaper-Jb0pLt3G.js";
|
|
9
|
-
import { _ as we } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
-
const xe = ["id"], Pe = {
|
|
11
|
-
key: 1,
|
|
12
|
-
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
13
|
-
}, Ae = ["xmlns", "viewBox"], Ie = { key: 0 }, Fe = ["d", "stroke-width", "stroke"], ze = { key: 1 }, Oe = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], Se = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], Ne = {
|
|
14
|
-
key: 4,
|
|
15
|
-
class: "vue-data-ui-watermark"
|
|
16
|
-
}, Ge = {
|
|
17
|
-
__name: "vue-ui-tiremarks",
|
|
18
|
-
props: {
|
|
19
|
-
config: {
|
|
20
|
-
type: Object,
|
|
21
|
-
default() {
|
|
22
|
-
return {};
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
dataset: {
|
|
26
|
-
type: Object,
|
|
27
|
-
default() {
|
|
28
|
-
return {};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
setup(ee, { expose: te }) {
|
|
33
|
-
const v = ee, { vue_ui_tiremarks: ae } = ie(), O = h(() => !!v.dataset && Object.keys(v.dataset).length), S = y(ce()), N = y(null), U = y(0), j = y(0), e = h({
|
|
34
|
-
get: () => B(),
|
|
35
|
-
set: (t) => t
|
|
36
|
-
});
|
|
37
|
-
function B() {
|
|
38
|
-
const t = W({
|
|
39
|
-
userConfig: v.config,
|
|
40
|
-
defaultConfig: ae
|
|
41
|
-
});
|
|
42
|
-
return t.theme ? {
|
|
43
|
-
...W({
|
|
44
|
-
userConfig: ve.vue_ui_tiremarks[t.theme] || v.config,
|
|
45
|
-
defaultConfig: t
|
|
46
|
-
})
|
|
47
|
-
} : t;
|
|
48
|
-
}
|
|
49
|
-
J(() => v.config, (t) => {
|
|
50
|
-
e.value = B(), Y(), j.value += 1;
|
|
51
|
-
}, { deep: !0 });
|
|
52
|
-
const { isPrinting: E, isImaging: X, generatePdf: D, generateImage: H } = ke({
|
|
53
|
-
elementId: S.value,
|
|
54
|
-
fileName: e.value.style.chart.title.text || "vue-ui-tiremarks"
|
|
55
|
-
}), r = y(e.value.style.chart.animation.use ? 0 : he(v.dataset.percentage));
|
|
56
|
-
J(() => v.dataset, (t) => {
|
|
57
|
-
e.value.style.chart.animation.use ? R(t.percentage) : r.value = t.percentage || 0;
|
|
58
|
-
}, { deep: !0 }), re(() => {
|
|
59
|
-
Y();
|
|
60
|
-
});
|
|
61
|
-
function R(t) {
|
|
62
|
-
let u = e.value.style.chart.animation.speed;
|
|
63
|
-
const a = Math.abs(t - r.value) / (u * 120);
|
|
64
|
-
function o() {
|
|
65
|
-
r.value < t ? r.value = Math.min(r.value + a, t) : r.value > t && (r.value = Math.max(r.value - a, t)), r.value !== t && requestAnimationFrame(o);
|
|
66
|
-
}
|
|
67
|
-
o();
|
|
68
|
-
}
|
|
69
|
-
function Y() {
|
|
70
|
-
de(v.dataset) && me({
|
|
71
|
-
componentName: "VueUiTiremarks",
|
|
72
|
-
type: "dataset"
|
|
73
|
-
}), R(v.dataset.percentage || 0);
|
|
74
|
-
}
|
|
75
|
-
const _ = h(() => e.value.style.chart.layout.display === "vertical"), s = h(() => {
|
|
76
|
-
const t = {
|
|
77
|
-
top: 48,
|
|
78
|
-
left: 64,
|
|
79
|
-
right: 64,
|
|
80
|
-
bottom: 48
|
|
81
|
-
};
|
|
82
|
-
return _.value ? {
|
|
83
|
-
top: e.value.style.chart.percentage.verticalPosition === "top" ? t.top : 3,
|
|
84
|
-
left: 3,
|
|
85
|
-
right: 3,
|
|
86
|
-
bottom: e.value.style.chart.percentage.verticalPosition === "bottom" ? t.bottom : 3
|
|
87
|
-
} : {
|
|
88
|
-
top: 0,
|
|
89
|
-
bottom: 0,
|
|
90
|
-
left: e.value.style.chart.percentage.horizontalPosition === "left" ? t.left : 3,
|
|
91
|
-
right: e.value.style.chart.percentage.horizontalPosition === "right" ? t.right : 10
|
|
92
|
-
};
|
|
93
|
-
}), P = h(() => Object.values(s.value).reduce((t, u) => t + u, 0)), l = h(() => ({
|
|
94
|
-
height: _.value ? 312 : 56,
|
|
95
|
-
width: _.value ? 56 : 312
|
|
96
|
-
})), le = y(100);
|
|
97
|
-
h(() => v.dataset.percentage / le.value);
|
|
98
|
-
const i = h(() => _.value ? {
|
|
99
|
-
mark: (l.value.height - P.value) / 100 * 0.5,
|
|
100
|
-
space: (l.value.height - P.value) / 100 * 0.5
|
|
101
|
-
} : {
|
|
102
|
-
mark: (l.value.width - P.value) / 100 * 0.5,
|
|
103
|
-
space: (l.value.width - P.value) / 100 * 0.5
|
|
104
|
-
}), q = h(() => {
|
|
105
|
-
const t = [];
|
|
106
|
-
for (let a = 0; a < 100; a += 1) {
|
|
107
|
-
const o = e.value.style.chart.layout.ticks.gradient.show ? Z(e.value.style.chart.layout.activeColor, a / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.activeColor;
|
|
108
|
-
if (_.value) {
|
|
109
|
-
const $ = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.width - s.value.left - s.value.right) / 100 / 3 : 0, m = s.value.left + 4 + $, f = l.value.width - s.value.right - 4 - $, g = l.value.height - s.value.bottom - a * i.value.mark - a * i.value.space - i.value.mark, p = l.value.height - s.value.bottom - a * i.value.mark - a * i.value.space - i.value.mark, w = (f - m) / e.value.style.chart.layout.curveAngleX, x = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100);
|
|
110
|
-
t.push({
|
|
111
|
-
x1: m,
|
|
112
|
-
x2: f,
|
|
113
|
-
y1: g,
|
|
114
|
-
y2: p,
|
|
115
|
-
curve: `M ${m} ${g} C ${m + w} ${g - x}, ${f - w} ${p - x}, ${f} ${p}`,
|
|
116
|
-
color: o
|
|
117
|
-
});
|
|
118
|
-
} else {
|
|
119
|
-
const $ = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.height - s.value.top - s.value.bottom) / 100 / 3 : 0, m = s.value.left + a * i.value.mark + a * i.value.space - i.value.mark, f = m, g = s.value.top + 4 + $, p = l.value.height - s.value.bottom - 4 - $, w = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100), x = (p - g) / e.value.style.chart.layout.curveAngleX;
|
|
120
|
-
t.push({
|
|
121
|
-
x1: m,
|
|
122
|
-
x2: f,
|
|
123
|
-
y1: g,
|
|
124
|
-
y2: p,
|
|
125
|
-
curve: `M ${m} ${g} C ${m + w} ${g + x}, ${f + w} ${p - x}, ${f} ${p}`,
|
|
126
|
-
color: o
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return t;
|
|
131
|
-
}), C = h(() => {
|
|
132
|
-
let t, u, a;
|
|
133
|
-
const o = e.value.style.chart.percentage.fontSize / 3;
|
|
134
|
-
return _.value ? e.value.style.chart.percentage.verticalPosition === "top" ? (t = l.value.width / 2, u = s.value.top / 2, a = "middle") : e.value.style.chart.percentage.verticalPosition === "bottom" && (t = l.value.width / 2, u = l.value.height - s.value.bottom / 2 + o, a = "middle") : e.value.style.chart.percentage.horizontalPosition === "left" ? (t = 4, u = l.value.height / 2 + o, a = "start") : e.value.style.chart.percentage.horizontalPosition === "right" && (t = l.value.width - s.value.right + 8, u = l.value.height / 2 + o, a = "start"), {
|
|
135
|
-
x: t,
|
|
136
|
-
y: u,
|
|
137
|
-
textAnchor: a,
|
|
138
|
-
bold: e.value.style.chart.percentage.bold,
|
|
139
|
-
fontSize: e.value.style.chart.percentage.fontSize,
|
|
140
|
-
fill: e.value.style.chart.percentage.color
|
|
141
|
-
};
|
|
142
|
-
}), A = y(!1);
|
|
143
|
-
function oe(t) {
|
|
144
|
-
A.value = t, U.value += 1;
|
|
145
|
-
}
|
|
146
|
-
const I = y(!1);
|
|
147
|
-
function G() {
|
|
148
|
-
I.value = !I.value;
|
|
149
|
-
}
|
|
150
|
-
return te({
|
|
151
|
-
generatePdf: D,
|
|
152
|
-
generateImage: H,
|
|
153
|
-
toggleAnnotator: G
|
|
154
|
-
}), (t, u) => (n(), c("div", {
|
|
155
|
-
ref_key: "tiremarksChart",
|
|
156
|
-
ref: N,
|
|
157
|
-
class: L(`vue-ui-tiremarks ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
158
|
-
style: K(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;${e.value.style.chart.title.text ? "" : "padding-top:36px"};background:${e.value.style.chart.backgroundColor}`),
|
|
159
|
-
id: S.value
|
|
160
|
-
}, [
|
|
161
|
-
e.value.userOptions.buttons.annotator ? (n(), F($e, {
|
|
162
|
-
key: 0,
|
|
163
|
-
parent: N.value,
|
|
164
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
165
|
-
color: e.value.style.chart.color,
|
|
166
|
-
active: I.value,
|
|
167
|
-
onClose: G
|
|
168
|
-
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : k("", !0),
|
|
169
|
-
e.value.style.chart.title.text ? (n(), c("div", Pe, [
|
|
170
|
-
(n(), F(ye, {
|
|
171
|
-
key: `title_${j.value}`,
|
|
172
|
-
config: {
|
|
173
|
-
title: {
|
|
174
|
-
cy: "wheel-title",
|
|
175
|
-
...e.value.style.chart.title
|
|
176
|
-
},
|
|
177
|
-
subtitle: {
|
|
178
|
-
cy: "wheel-subtitle",
|
|
179
|
-
...e.value.style.chart.title.subtitle
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}, null, 8, ["config"]))
|
|
183
|
-
])) : k("", !0),
|
|
184
|
-
e.value.userOptions.show && O.value ? (n(), F(_e, {
|
|
185
|
-
ref: "details",
|
|
186
|
-
key: `user_options_${U.value}`,
|
|
187
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
188
|
-
color: e.value.style.chart.color,
|
|
189
|
-
isPrinting: d(E),
|
|
190
|
-
isImaging: d(X),
|
|
191
|
-
uid: S.value,
|
|
192
|
-
hasPdf: e.value.userOptions.buttons.pdf,
|
|
193
|
-
hasImg: e.value.userOptions.buttons.img,
|
|
194
|
-
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
195
|
-
hasXls: !1,
|
|
196
|
-
isFullscreen: A.value,
|
|
197
|
-
titles: { ...e.value.userOptions.buttonTitles },
|
|
198
|
-
chartElement: N.value,
|
|
199
|
-
position: e.value.userOptions.position,
|
|
200
|
-
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
201
|
-
isAnnotation: I.value,
|
|
202
|
-
onToggleFullscreen: oe,
|
|
203
|
-
onGeneratePdf: d(D),
|
|
204
|
-
onGenerateImage: d(H),
|
|
205
|
-
onToggleAnnotator: G
|
|
206
|
-
}, se({ _: 2 }, [
|
|
207
|
-
t.$slots.optionPdf ? {
|
|
208
|
-
name: "optionPdf",
|
|
209
|
-
fn: z(() => [
|
|
210
|
-
b(t.$slots, "optionPdf", {}, void 0, !0)
|
|
211
|
-
]),
|
|
212
|
-
key: "0"
|
|
213
|
-
} : void 0,
|
|
214
|
-
t.$slots.optionImg ? {
|
|
215
|
-
name: "optionImg",
|
|
216
|
-
fn: z(() => [
|
|
217
|
-
b(t.$slots, "optionImg", {}, void 0, !0)
|
|
218
|
-
]),
|
|
219
|
-
key: "1"
|
|
220
|
-
} : void 0,
|
|
221
|
-
t.$slots.optionFullscreen ? {
|
|
222
|
-
name: "optionFullscreen",
|
|
223
|
-
fn: z(({ toggleFullscreen: a, isFullscreen: o }) => [
|
|
224
|
-
b(t.$slots, "optionFullscreen", M(T({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
|
|
225
|
-
]),
|
|
226
|
-
key: "2"
|
|
227
|
-
} : void 0,
|
|
228
|
-
t.$slots.optionAnnotator ? {
|
|
229
|
-
name: "optionAnnotator",
|
|
230
|
-
fn: z(({ toggleAnnotator: a, isAnnotator: o }) => [
|
|
231
|
-
b(t.$slots, "optionAnnotator", M(T({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
|
|
232
|
-
]),
|
|
233
|
-
key: "3"
|
|
234
|
-
} : void 0
|
|
235
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : k("", !0),
|
|
236
|
-
O.value ? (n(), c("svg", {
|
|
237
|
-
key: 3,
|
|
238
|
-
xmlns: d(fe),
|
|
239
|
-
class: L({ "vue-data-ui-fullscreen--on": A.value, "vue-data-ui-fulscreen--off": !A.value }),
|
|
240
|
-
viewBox: `0 0 ${l.value.width} ${l.value.height}`,
|
|
241
|
-
style: K(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
242
|
-
}, [
|
|
243
|
-
ne(Ce),
|
|
244
|
-
e.value.style.chart.layout.curved ? (n(), c("g", Ie, [
|
|
245
|
-
(n(!0), c(Q, null, V(q.value, (a, o) => (n(), c("path", {
|
|
246
|
-
d: a.curve,
|
|
247
|
-
"stroke-width": i.value.mark,
|
|
248
|
-
stroke: r.value >= o ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
249
|
-
"stroke-linecap": "round",
|
|
250
|
-
fill: "none",
|
|
251
|
-
class: L({ "vue-ui-tick-animated": e.value.style.chart.animation.use && o <= r.value })
|
|
252
|
-
}, null, 10, Fe))), 256))
|
|
253
|
-
])) : (n(), c("g", ze, [
|
|
254
|
-
(n(!0), c(Q, null, V(q.value, (a, o) => (n(), c("line", {
|
|
255
|
-
x1: a.x1,
|
|
256
|
-
y1: a.y1,
|
|
257
|
-
x2: a.x2,
|
|
258
|
-
y2: a.y2,
|
|
259
|
-
"stroke-width": i.value.mark,
|
|
260
|
-
stroke: r.value >= o ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
261
|
-
"stroke-linecap": "round"
|
|
262
|
-
}, null, 8, Oe))), 256))
|
|
263
|
-
])),
|
|
264
|
-
e.value.style.chart.percentage.show ? (n(), c("text", {
|
|
265
|
-
key: 2,
|
|
266
|
-
x: C.value.x,
|
|
267
|
-
y: C.value.y,
|
|
268
|
-
"font-size": C.value.fontSize,
|
|
269
|
-
fill: e.value.style.chart.layout.ticks.gradient.show && e.value.style.chart.percentage.useGradientColor ? d(Z)(e.value.style.chart.layout.activeColor, r.value / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.percentage.color,
|
|
270
|
-
"font-weight": C.value.bold ? "bold" : "normal",
|
|
271
|
-
"text-anchor": C.value.textAnchor
|
|
272
|
-
}, ue(d(ge)(
|
|
273
|
-
e.value.style.chart.percentage.formatter,
|
|
274
|
-
r.value,
|
|
275
|
-
d(pe)({
|
|
276
|
-
v: r.value,
|
|
277
|
-
s: "%",
|
|
278
|
-
r: e.value.style.chart.percentage.rounding
|
|
279
|
-
})
|
|
280
|
-
)), 9, Se)) : k("", !0),
|
|
281
|
-
b(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
282
|
-
], 14, Ae)) : k("", !0),
|
|
283
|
-
t.$slots.watermark ? (n(), c("div", Ne, [
|
|
284
|
-
b(t.$slots, "watermark", M(T({ isPrinting: d(E) || d(X) })), void 0, !0)
|
|
285
|
-
])) : k("", !0),
|
|
286
|
-
O.value ? k("", !0) : (n(), F(be, {
|
|
287
|
-
key: 5,
|
|
288
|
-
config: {
|
|
289
|
-
type: "tiremarks",
|
|
290
|
-
style: {
|
|
291
|
-
backgroundColor: e.value.style.chart.backgroundColor,
|
|
292
|
-
tiremarks: {
|
|
293
|
-
color: "#CCCCCC"
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}, null, 8, ["config"]))
|
|
298
|
-
], 14, xe));
|
|
299
|
-
}
|
|
300
|
-
}, He = /* @__PURE__ */ we(Ge, [["__scopeId", "data-v-4a9028ce"]]);
|
|
301
|
-
export {
|
|
302
|
-
He as default
|
|
303
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-FfZRtJ6A.cjs"),Ne=require("./Title-Co5jI5ed.cjs"),ve=require("./usePrinter-BCAFeO_J.cjs"),Be=require("./Tooltip-Bl6W8Zn7.cjs"),_e=require("./Legend-YZ7Hz3o1.cjs"),Pe=require("./vue-ui-skeleton-Djv08J67.cjs"),ze=require("./DataTable-DJzhv96s.cjs"),Oe=require("./vue-ui-accordion-xXgqfR2l.cjs"),he=require("./useResponsive-B3TrDDIG.cjs"),pe=require("./useNestedProp-q7byAAIJ.cjs"),Ve=require("./PackageVersion-DVZtsuy4.cjs"),Ee=require("./PenAndPaper-CyXm-yVL.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function fe(n,d){const s=n.length;if(s===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let u=1/0,c=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>c&&(c=p),v+=p}return Math.max(d**2*c/v**2,v**2/(d**2*u))}}function ge(n){const{xOffset:d,yOffset:s,width:u,height:c}=n;return{x0:d,y0:s,x1:d+u,y1:s+c}}function Re(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),c=fe(n,s),v=fe(u,s);return c>=v}}function Ae(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const c=n[u],v=c.length;for(let h=0;h<v;h+=1)d.push(c[h])}return d}function Fe(n,d){const s={...d,children:n};return ye(s)}function Ie(n){return(n.x1-n.x0)*(n.y1-n.y0)}function me(n,d){const{width:s,height:u,xOffset:c,yOffset:v}=X(d),h=n.length,f=n.map(g=>g.normalizedValue||0).reduce((g,k)=>g+k,0),p=f/u,C=f/s;let b=c,w=v;const m=[];if(s>=u){for(let g=0;g<h;g+=1){const k=n[g],x=w+k.normalizedValue/p,B={x0:b,y0:w,x1:b+p,y1:x},$=Object.assign({},k,B);w=x,m.push($)}return m}else{for(let g=0;g<h;g+=1){const k=n[g],x=b+k.normalizedValue/C,B={x0:b,y0:w,x1:x,y1:w+C},$=Object.assign({},k,B);b=x,m.push($)}return m}}function De(n){const d=X(n),s=d.width,u=d.height;return Math.min(s,u)}function qe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),c=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(c||0)}),v.push(h);return v}function X(n){const{x0:d,y0:s,x1:u,y1:c}=n;return{xOffset:d,yOffset:s,width:u-d,height:c-s}}function He(n,d,s,u){let c=n,v=d,h=s,f=u;for(;;){const p=c.length;if(p===0){const m=me(v,h);return f.concat(m)}const C=De(h),b=c[0],w=c.slice(1,p);if(Re(v,b,C)){const m=v.concat(b);c=w,v=m,h=h,f=f}else{const m=v.length;let g=0;for(let $=0;$<m;$+=1)g+=v[$].normalizedValue;const k=Me(h,g),x=me(v,h),B=f.concat(x);c=c,v=[],h=k,f=B}}}function ye(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=qe(n.children,Ie(n)),s=He(d,[],n,[]),u=s.length,c=[];for(let h=0;h<u;h+=1)c.push(ye(s[h]));return Ae(c)}}function Me(n,d){const{width:s,height:u,xOffset:c,yOffset:v}=X(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:c+h,yOffset:v,width:f,height:u};return ge(p)}else{const h=d/s,f=u-h,p={xOffset:c,yOffset:v+h,width:s,height:f};return ge(p)}}const We=n=>(e.pushScopeId("data-v-3cef6fec"),n=n(),e.popScopeId(),n),Ue=["id"],Ge=["xmlns","viewBox"],je={key:0},Xe=["id"],Ye=["stop-color"],Ze=["stop-color"],Je=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Ke=["x","y","height","width"],Qe={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},et=We(()=>e.createElementVNode("br",null,null,-1)),tt={key:4,class:"vue-data-ui-watermark"},ot=["onClick"],lt={key:0},at={key:1},nt=["innerHTML"],rt={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:d,emit:s}){const u=n,{vue_ui_treemap:c}=r.useConfig(),v=e.computed(()=>!!u.dataset&&u.dataset.length),h=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),f=e.ref(r.createUid()),p=e.ref(!1),C=e.ref(""),b=e.ref(!1),w=e.ref(0),m=e.ref([]),g=e.ref(null),k=e.ref(null),x=e.ref(null),B=e.ref(0),$=e.ref(0),Y=e.ref(0),t=e.computed({get:()=>Z(),set:o=>o});function Z(){const o=pe.useNestedProp({userConfig:u.config,defaultConfig:c});return o.theme?{...pe.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||u.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>u.config,o=>{t.value=Z(),B.value+=1,$.value+=1,Y.value+=1},{deep:!0});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:ee}=ve.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),I=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),_=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),P=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),O=e.computed(()=>({bottom:P.value.height-t.value.style.chart.padding.bottom,height:P.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:P.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:P.value.height,vbWidth:P.value.width,width:P.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function te(o){o.forEach((a,l)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||I.value[l]||r.palette[l]||r.palette[l%r.palette.length],a.children&&(a.children.forEach(i=>{i.parentId=a.id,i.color=a.color}),te(a.children))})}const V=e.ref(u.dataset),D=e.ref(null);e.onMounted(()=>{be()});function be(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),te(V.value),t.value.responsive){const o=he.throttle(()=>{const{width:a,height:l}=he.useResponsive({chart:g.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});P.value.width=a,P.value.height=l});D.value=new ResizeObserver(o),D.value.observe(g.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const W=e.ref(V.value),A=e.computed(()=>W.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(o=>!m.value.includes(o.id))),L=e.computed(()=>V.value.filter(o=>!m.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),oe=e.computed({get(){let o=[...A.value];return t.value.style.chart.layout.sorted&&(o=[...A.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function le(o,a){return o.value/a}function ke(o,a,l){const i=t.value.style.chart.layout.rects.colorRatio-le(a,l);return r.lightenHexColor(o,i<0?0:i)}function ae(o,a,l,i){return o.map((y,z)=>{const M=ke(r.convertColorToHex(a)||I.value[z]||r.palette[z]||r.palette[z%r.palette.length],y,i),Se=le(y,i);return{...y,color:M,proportion:Se,parentName:l,children:y.children?ae(y.children,M,y.name,i):void 0}})}const F=e.computed(()=>Fe(oe.value.map((o,a)=>{const l=o.children?o.children.reduce((i,y)=>i+y.value,0):o.value;return{value:o.value,id:o.id,children:o.children?ae(o.children.sort((i,y)=>y.value-i.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:O.value.left*2,y0:O.value.top,x1:O.value.width,y1:O.value.height}));function ne({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function re({x0:o,x1:a}){return a-o<=0?1e-4:a-o}function E(o){const a=t.value.style.chart.layout.labels.fontSize*(o.proportion*2>1?1:o.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function Ce(o){b.value=o,w.value+=1}const R=e.computed(()=>({startX:0,startY:0,width:O.value.vbWidth,height:O.value.vbHeight})),T=e.ref(!1);function U(o,a=V.value){for(const l of a){if(l.id===o)return l;if(l.children){const i=U(o,l.children);if(i)return i}}return null}function we(o){if(T.value)s("selectDatapoint",void 0),W.value=V.value;else{if(s("selectDatapoint",o),!U(o.parentId))return;W.value=[U(o.parentId)]}T.value=!T.value}const S=e.ref(null),ue=e.computed(()=>V.value.map((o,a)=>({...o,color:r.convertColorToHex(o.color)||I.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((o,a)=>a.value-o.value).map((o,a)=>({...o,proportion:o.value/V.value.map(l=>l.value).reduce((l,i)=>l+i,0),opacity:m.value.includes(o.id)?.5:1}))),xe=e.computed(()=>({cy:"treemap-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":""}));function se(o){T.value=!1,S.value=null,m.value.includes(o.id)?m.value=m.value.filter(a=>a!==o.id):m.value.length<u.dataset.length-1&&m.value.push(o.id),s("selectLegend",oe.value)}const G=e.ref(null);function $e({datapoint:o,seriesIndex:a}){S.value=o,G.value={datapoint:o,seriesIndex:a,config:t.value,series:A.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:A.value,config:t.value})))C.value=l({seriesIndex:a,datapoint:o,series:A.value,config:t.value});else{let i="";i+=`<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>`,i+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${o.color}"/></svg>`,i+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:o.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:o,seriesIndex:a})}</b>`,C.value=`<div>${i}</div>`}p.value=!0}const N=e.computed(()=>{const o=F.value.map(l=>({name:l.name,color:l.color})),a=F.value.map(l=>l.value);return{head:o,body:a}});function ie(){e.nextTick(()=>{const o=N.value.head.map((i,y)=>[[i.name],[N.value.body[y]],[isNaN(N.value.body[y]/L.value)?"-":N.value.body[y]/L.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const q=e.computed(()=>{const o=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((y,z)=>{const M=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[z],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[z],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:y.color,name:y.name,shape:"square"},M,isNaN(N.value.body[z]/L.value)?"-":r.dataLabel({v:N.value.body[z]/L.value*100,s:"%",r:t.value.table.td.roundingPercentage})]}),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{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:o,body:a,config:l}});function Te(){return F.value}function ce(){_.value.showTable=!_.value.showTable}function de(){_.value.showTooltip=!_.value.showTooltip}const H=e.ref(!1);function j(){H.value=!H.value}return d({getData:Te,generateCsv:ie,generateImage:ee,generatePdf:Q,toggleTable:ce,toggleTooltip:de,toggleAnnotator:j}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:g,class:e.normalizeClass(`vue-ui-treemap ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`treemap_${f.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ee.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:H.value,onClose:j},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Ne._sfc_main,{key:`title_${B.value}`,config:{title:{cy:"treemap-div-title",...t.value.style.chart.title},subtitle:{cy:"treemap-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&v.value?(e.openBlock(),e.createBlock(ve.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(J),isImaging:e.unref(K),uid:f.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,isFullscreen:b.value,isTooltip:_.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:H.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(Q),onGenerateCsv:ie,onGenerateImage:e.unref(ee),onToggleTable:ce,onToggleTooltip:de,onToggleAnnotator:j},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:i})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:i})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:i})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value,"vue-data-ui-zoom-plus":!T.value,"vue-data-ui-zoom-minus":T.value}),viewBox:`${R.value.startX} ${R.value.startY} ${R.value.width<=0?10:R.value.width} ${R.value.height<=0?10:R.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ve._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",je,[e.createElementVNode("radialGradient",{id:`tgrad_${l.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":l.color},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ze)],8,Xe)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,i)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:ne(l),width:re(l),fill:h.value?l.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${l.id})`:l.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:S.value&&S.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":S.value&&S.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>we(l),onMouseenter:()=>$e({datapoint:l,seriesIndex:i}),onMouseleave:a[0]||(a[0]=y=>{S.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${S.value?S.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,Je),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:ne(l),width:re(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",Qe,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-ui-treemap-cell-default",style:e.normalizeStyle(`width:calc(100% - ${E(l)/1.5}px);text-align:left;line-height:${E(l)<14?14:E(l)}px;padding:${E(l)/3}px; color:${e.unref(r.adaptColorToBackground)(l.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(l.name),5),et,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${E(l)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.layout.labels.rounding}),{datapoint:l})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value,fontSize:E(l),isZoom:T.value,textColor:e.unref(r.adaptColorToBackground)(l.color)})),void 0,!0)])],8,Ke))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:O.value,isZoom:T.value,rect:S.value,config:t.value})),void 0,!0)],14,Ge)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",tt,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Pe.default,{key:5,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:x},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:`legend_${Y.value}`,legendSet:ue.value,config:xe.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>se(l))},{item:e.withCtx(({legend:l,index:i})=>[e.createElementVNode("div",{onClick:y=>se(l),style:e.normalizeStyle(`opacity:${m.value.includes(l.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.prefix,v:l.value,s:t.value.style.chart.layout.labels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l}))+" ",1),m.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",at," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",lt," ("+e.toDisplayString(isNaN(l.value/L.value)?"-":(l.value/L.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,ot)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:ue.value},void 0,!0)],512),e.createVNode(Be._sfc_main,{show:_.value.showTooltip&&p.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:g.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isCustom"]),v.value?(e.openBlock(),e.createBlock(Oe.default,{key:6,hideDetails:"",config:{open:_.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(ze.DataTable,{key:`table_${$.value}`,colNames:q.value.colNames,head:q.value.head,body:q.value.body,config:q.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]=l=>_.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,nt)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Ue))}},ut=Le._export_sfc(rt,[["__scopeId","data-v-3cef6fec"]]);exports.default=ut;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-FfZRtJ6A.cjs"),ie=require("./useResponsive-B3TrDDIG.cjs"),Se=require("./Title-Co5jI5ed.cjs"),ce=require("./usePrinter-BCAFeO_J.cjs"),Ve=require("./Tooltip-Bl6W8Zn7.cjs"),de=require("./Legend-YZ7Hz3o1.cjs"),Te=require("./vue-ui-skeleton-Djv08J67.cjs"),Be=require("./BaseIcon-BGExhz6v.cjs"),Ee=require("./vue-ui-accordion-xXgqfR2l.cjs"),ve=require("./useNestedProp-q7byAAIJ.cjs"),Le=require("./PackageVersion-DVZtsuy4.cjs"),Pe=require("./PenAndPaper-CyXm-yVL.cjs"),ze=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),De=["id"],Fe=["onClick"],Me=["xmlns","viewBox"],Oe=["id"],Ie=["stop-color"],Ae=["stop-color"],Re=["x","y","width","height","fill","rx"],qe=["x","y","width","height","fill","rx","stroke","stroke-width"],He=["x2","y1","y2","stroke","stroke-width"],Xe=["x1","x2","y1","y2","stroke","stroke-width"],Ue=["x","y","text-anchor","font-size","fill","font-weight"],je=["x","y","font-size","fill","font-weight"],Ge=["x","y","font-size","fill","font-weight"],We=["x","y","font-size","fill","font-weight"],Ye=["y","width","height","fill","onMouseenter"],Ke={key:5,class:"vue-data-ui-watermark"},Je=["onClick"],Qe={style:"width:100%;padding-top: 36px;position:relative"},Ze={class:"vue-ui-data-table"},et={key:0},tt={style:{width:"100%"}},lt=["data-cell"],at={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ot=["data-cell"],nt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},rt=["data-cell"],ut={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},st=["data-cell"],it={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ct=["data-cell"],dt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},vt=["data-cell"],ht={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},pt=["data-cell"],yt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},gt={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(he,{expose:pe,emit:ye}){const y=he;e.useCssVars(a=>({"19a6ca00":a.tdo}));const{vue_ui_vertical_bar:ge}=n.useConfig(),B=e.computed(()=>!!y.dataset&&y.dataset.length),C=e.ref(n.createUid()),fe=e.ref(null),D=e.ref(!1),F=e.ref(""),E=e.ref(0),be=e.ref(null),q=e.ref(0),N=e.ref(null),H=e.ref(null),M=e.ref(null),X=e.ref(0),O=e.ref(0),t=e.computed({get:()=>U(),set:a=>a});function U(){const a=ve.useNestedProp({userConfig:y.config,defaultConfig:ge});return a.theme?{...ve.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[a.theme]||y.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>y.config,a=>{t.value=U(),Z(),X.value+=1,O.value+=1,s.value=t.value.style.chart.layout.bars.height,c.value=t.value.style.chart.layout.bars.gap},{deep:!0}),e.watch(()=>y.dataset,P,{deep:!0});const{isPrinting:j,isImaging:G,generatePdf:W,generateImage:Y}=ce.usePrinter({elementId:`vue-ui-vertical-bar_${C.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),K=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),J=e.ref(null),Q=e.ref(!1),me=e.computed(()=>t.value.table.responsiveBreakpoint),L=e.ref(null);e.onMounted(()=>{Z()});function Z(){if(n.objectIsEmpty(y.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),E.value=y.dataset.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0),ke(),t.value.responsive){const a=ie.throttle(()=>{const{width:o,height:l}=ie.useResponsive({chart:N.value,title:t.value.style.chart.title.text?H.value:null,legend:t.value.style.chart.legend.show?M.value:null});le.value=o,s.value=l/E.value-c.value*2});L.value=new ResizeObserver(a),L.value.observe(N.value.parentNode)}}e.onBeforeUnmount(()=>{L.value&&L.value.disconnect()});function ke(){new ResizeObserver(o=>{o.forEach(l=>{Q.value=l.contentRect.width<me.value})}).observe(J.value)}const p=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),ee=e.computed(()=>p.value.sortDesc),_=e.computed(()=>(y.dataset.forEach((a,o)=>{!a.value&&!a.children&&n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`value (index ${o})`}),a.children&&(n.objectIsEmpty(a.children)?n.error({componentName:"VueUiVerticalBar",type:"datasetAttributeEmpty",property:`children (index ${o})`}):a.children.forEach((l,r)=>{[null,void 0].includes(l.name)&&n.error({componentName:"VueUiVerticalBar",type:"datasetSerieAttribute",property:"name",key:"children",index:r})}))}),y.dataset.map((a,o)=>{const l=`vertical_parent_${o}_${C.value}`,r=a.children&&a.children.length>0,v=n.checkNaN(a.value?a.value:r?a.children.map(h=>h.value||0).reduce((h,m)=>h+m,0):0),i=v>=0?1:-1;return{...a,id:l,shape:"square",opacity:f.value.includes(l)?.5:1,value:Math.abs(v),sign:i,hasChildren:r,isChild:!1,segregate:()=>S(l),isSegregated:f.value.includes(l),color:n.convertColorToHex(a.color)||K.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!a.children||!a.children.length?[]:a.children.toSorted((h,m)=>ee.value?m.value-h.value:h.value-m.value).map((h,m)=>({...h,value:n.checkNaN(Math.abs(h.value)),sign:h.value>=0?1:-1,isChild:!0,parentId:l,parentName:a.name,parentValue:v,parentSign:i,id:`vertical_child_${o}_${m}_${C.value}`,childIndex:m,color:n.convertColorToHex(h.color)||n.convertColorToHex(a.color)||K.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((h,m)=>({...h,isFirstChild:m===0,isLastChild:m===a.children.length-1}))}}).toSorted((a,o)=>ee.value?o.value-a.value:a.value-o.value))),te=e.computed(()=>({cy:"vertical-bar-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":""})),s=e.ref(t.value.style.chart.layout.bars.height),c=e.ref(t.value.style.chart.layout.bars.gap),Ce=e.computed(()=>(s.value+c.value)*E.value),le=e.ref(512),d=e.computed(()=>({width:le.value,height:Ce.value,padding:{top:12,left:128+t.value.style.chart.layout.bars.offsetX,right:64+t.value.style.chart.layout.bars.paddingRight,bottom:12}})),u=e.computed(()=>({fullHeight:d.value.padding.top+d.value.padding.bottom+d.value.height,top:d.value.padding.top,left:d.value.padding.left,right:d.value.width-d.value.padding.right,bottom:d.value.padding.top+d.value.height,width:d.value.width-(d.value.padding.left+d.value.padding.right)}));function P(){E.value=x.value.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0)}const f=e.ref([]);function S(a){f.value.includes(a)?f.value=f.value.filter(o=>o!==a):f.value.push(a),P(),ye("selectLegend",x.value)}const x=e.computed(()=>_.value.filter(a=>!f.value.includes(a.id))),b=e.computed(()=>x.value.map(a=>Math.abs(a.value)).reduce((a,o)=>a+o,0));function ae(a,o=!1,l=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(a)/b.value*100),s:"%",r:l}):Math.abs(a)/b.value}const w=e.computed(()=>x.value.flatMap(a=>a.hasChildren?a.children:a)),$=e.computed(()=>w.value.map(a=>a.sign).includes(-1)),_e=e.computed(()=>Math.max(...x.value.flatMap(a=>a.children&&a.children.length?Math.max(...a.children.map(o=>o.value)):a.value)));function k(a){const o=a/_e.value;return u.value.width/($.value?2:1)*o}function xe(a){return k(a)+u.value.left}function V(a,o){const l=x.value.find(i=>i.id===a.parentId),r=u.value.top+(c.value+s.value)*o,v=l.children.length*(c.value+s.value);return{y:r+v/2-t.value.style.chart.layout.bars.parentLabels.fontSize,name:l.name,value:[void 0,NaN,null].includes(l.value)?"":l.sign===1?l.value:-l.value,percentageToTotal:isNaN(l.value/b.value)?"":ae(l.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:l.sign}}function Ne(){return x.value}const I=e.ref(null),A=e.ref(null);function we(a,o){A.value={datapoint:a,seriesIndex:o,series:_.value,config:t.value},D.value=!0,I.value=a.id;let l="";const r=a.isChild?a.parentName:a.name,v=a.isChild?a.name:"",i=t.value.style.chart.tooltip.customFormat;n.isFunction(i)&&n.functionReturnsString(()=>i({datapoint:a,series:_.value,config:t.value,seriesIndex:o}))?F.value=i({datapoint:a,series:_.value,config:t.value,seriesIndex:o}):(l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
|
|
2
|
-
<div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" rx="2" stroke="none" fill="${a.color}"/></svg> ${r}</div>
|
|
3
|
-
${v?`<div>${v}</div>`:""}
|
|
4
|
-
</div>`,t.value.style.chart.tooltip.showValue&&(l+=`<div>${t.value.translations.value}: <b>${n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,a.sign===1?a.value:-a.value,n.dataLabel({p:t.value.style.chart.tooltip.prefix,v:a.sign===1?a.value:-a.value,s:t.value.style.chart.tooltip.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:o})}</b></div>`),t.value.style.chart.tooltip.showPercentage&&(l+=`<div>${t.value.translations.percentageToTotal} : <b>${n.dataLabel({v:Math.abs(a.value)/b.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`,a.isChild&&(l+=`<div>${t.value.translations.percentageToSerie}: <b>${n.dataLabel({v:Math.abs(a.value)/Math.abs(a.parentValue)*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`)),F.value=`<div style="text-align:left">${l}</div>`)}function oe(a,o,l,r){if(!t.value.style.chart.layout.bars.dataLabels.value.show)return"";const v=n.applyDataLabel(t.value.style.chart.layout.bars.dataLabels.value.formatter,n.checkNaN(r===-1&&a>=0?-a:a),n.dataLabel({p:t.value.style.chart.layout.bars.dataLabels.value.prefix,v:n.checkNaN(r===-1&&a>=0?-a:a),s:t.value.style.chart.layout.bars.dataLabels.value.suffix,r:t.value.style.chart.layout.bars.dataLabels.value.roundingValue}),{datapoint:o,seriesIndex:l}),i=`(${ae(a,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${v}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${i}`:""}`}const g=e.computed(()=>{const a=[t.value.translations.parentName,t.value.translations.value,t.value.translations.percentageToTotal,t.value.translations.childName,t.value.translations.value,t.value.translations.percentageToSerie,t.value.translations.percentageToTotal],o=w.value.map(l=>l.isChild?l.isFirstChild?{color:l.color,parentName:l.parentName,parentValue:l.parentValue,percentageToTotal:l.parentValue/b.value,childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/b.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:l.name,childValue:l.sign===1?l.value:-l.value,childPercentageToParent:Math.abs(l.value)/Math.abs(l.parentValue),childPercentageToTotal:Math.abs(l.value)/b.value}:{color:l.color,parentName:l.name,parentValue:l.sign===1?l.value:-l.value,percentageToTotal:Math.abs(l.value)/b.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:a,body:o}});function ne(){const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=g.value.head,l=g.value.body.map(i=>[i.parentName,i.parentValue,i.percentageToTotal,i.childName,i.childValue,i.childPercentageToParent,i.childPercentageToTotal]),r=a.concat([o]).concat(l),v=n.createCsvContent(r);n.downloadCsv({csvContent:v,title:t.value.style.chart.title.text||"vue-ui-vertical-bar"})}const T=e.ref(!1);function $e(a){T.value=a,q.value+=1}function re(){p.value.showTable=!p.value.showTable}function ue(){p.value.sortDesc=!p.value.sortDesc,P()}function se(){p.value.showTooltip=!p.value.showTooltip}const z=e.ref(!1);function R(){z.value=!z.value}return pe({getData:Ne,recalculateHeight:P,generatePdf:W,generateCsv:ne,generateImage:Y,toggleTable:re,toggleSort:ue,toggleTooltip:se,toggleAnnotator:R}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-vertical-bar ${T.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"verticalBarChart",ref:N,id:`vue-ui-vertical-bar_${C.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`)},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Pe.PenAndPaper,{key:0,parent:N.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:z.value,onClose:R},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"chartTitle",ref:H,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${X.value}`,config:{title:{cy:"vertical-bar-div-title",...t.value.style.chart.title},subtitle:{cy:"vertical-bar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&B.value?(e.openBlock(),e.createBlock(ce.UserOptions,{ref_key:"details",ref:fe,key:`user_options_${q.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(G),isPrinting:e.unref(j),uid:C.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.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,hasSort:t.value.userOptions.buttons.sort,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:T.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:N.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:z.value,onToggleFullscreen:$e,onGeneratePdf:e.unref(W),onGenerateCsv:ne,onGenerateImage:e.unref(Y),onToggleTable:re,onToggleSort:ue,onToggleTooltip:se,onToggleAnnotator:R},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.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionSort",{},void 0,!0)]),key:"6"}: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:"7"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(de.Legend,{key:`legend_top_${O.value}`,legendSet:_.value,config:te.value,onClickMarker:o[0]||(o[0]=({legend:l})=>S(l.id))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:v=>S(l.id),style:e.normalizeStyle(`opacity:${f.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,Fe)]),_:1},8,["legendSet","config"]))],512)):e.createCommentVNode("",!0),B.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":T.value,"vue-data-ui-fulscreen--off":!T.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${u.value.fullHeight<=0?10:u.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Le._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${C.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,Ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.03),100-t.value.style.chart.layout.bars.gradientIntensity)},null,8,Ae)],8,Oe))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:k(l.value)<=0?1e-4:k(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(k(l.value)<=0?1e-4:k(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.underlayerColor,rx:t.value.style.chart.layout.bars.borderRadius,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,Re)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:k(l.value)<=0?1e-4:k(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(k(l.value)<=0?1e-4:k(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${C.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.bars.fillOpacity),rx:t.value.style.chart.layout.bars.borderRadius,stroke:t.value.style.chart.layout.bars.useStroke?l.color:"none","stroke-width":t.value.style.chart.layout.bars.useStroke?t.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:t.value.useCssAnimation})},null,10,qe),(!l.isChild||l.isLastChild)&&t.value.style.chart.layout.separators.show&&r!==w.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:0,x2:u.value.left,y1:s.value+c.value/2+u.value.top+(c.value+s.value)*r,y2:s.value+c.value/2+u.value.top+(c.value+s.value)*r,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,He)):e.createCommentVNode("",!0),$.value&&t.value.style.chart.layout.separators.show?(e.openBlock(),e.createElementBlock("line",{key:1,x1:u.value.left+u.value.width/2,x2:u.value.left+u.value.width/2,y1:u.value.top,y2:u.value.bottom,stroke:t.value.style.chart.layout.separators.color,"stroke-width":t.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,Xe)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:$.value?u.value.left+u.value.width/2+(l.sign===1?-12:12)+(l.sign===1?-t.value.style.chart.layout.bars.dataLabels.offsetX:t.value.style.chart.layout.bars.dataLabels.offsetX):xe(l.value)+3+t.value.style.chart.layout.bars.dataLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":!$.value||l.sign===-1?"start":"end","font-size":t.value.style.chart.layout.bars.dataLabels.fontSize,fill:t.value.style.chart.layout.bars.dataLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal"},e.toDisplayString(oe(l.value,l,r,l.sign)),9,Ue),(l.isChild||!l.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":"end",x:u.value.left-3+t.value.style.chart.layout.bars.nameLabels.offsetX,y:u.value.top+(c.value+s.value)*r+s.value/2+t.value.style.chart.layout.bars.nameLabels.fontSize/2,"font-size":t.value.style.chart.layout.bars.nameLabels.fontSize,fill:t.value.style.chart.layout.bars.nameLabels.color,"font-weight":t.value.style.chart.layout.bars.nameLabels.bold?"bold":"normal"},e.toDisplayString(l.name),9,je)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:V(l,r).y,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.parentLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(V(l,r).name),9,Ge)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:4,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:V(l,r).y+t.value.style.chart.layout.bars.parentLabels.fontSize+6,"font-size":t.value.style.chart.layout.bars.parentLabels.fontSize,fill:t.value.style.chart.layout.bars.parentLabels.color,"font-weight":t.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(oe(V(l,r).value),V(l,r),r,l.parentSign||l.sign),9,We)):e.createCommentVNode("",!0),e.createElementVNode("rect",{"data-cy-trap":"",x:0,y:u.value.top+(c.value+s.value)*r-c.value/2,width:d.value.width<=0?1e-4:d.value.width,height:s.value+c.value<=0?1e-4:s.value+c.value,fill:I.value===l.id?e.unref(n.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity):"transparent",onMouseenter:v=>we(l,r),onMouseleave:o[1]||(o[1]=v=>{be.value=null,D.value=!1,I.value=null})},null,40,Ye)]))),256)),e.renderSlot(a.$slots,"svg",{svg:d.value},void 0,!0)],14,Me)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ke,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(G)})),void 0,!0)])):e.createCommentVNode("",!0),B.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Te.default,{key:6,config:{type:"verticalBar",style:{backgroundColor:t.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(de.Legend,{key:`legend_bottom_${O.value}`,legendSet:_.value,config:te.value,onClickMarker:o[2]||(o[2]=({legend:l})=>S(l.id))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>S(l.id),style:e.normalizeStyle(`opacity:${f.value.includes(l.id)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.chart.layout.bars.dataLabels.value.formatter,l.value,e.unref(n.dataLabel)({p:t.value.style.chart.legend.prefix,v:l.value,s:t.value.style.chart.legend.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:r})),13,Je)]),_:1},8,["legendSet","config"]))],512)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:_.value},void 0,!0),e.createVNode(Ve._sfc_main,{show:p.value.showTooltip&&D.value&&f.value.length<y.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:N.value,content:F.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),B.value?(e.openBlock(),e.createBlock(Ee.default,{key:8,hideDetails:"",config:{open:p.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.createElementVNode("div",{ref_key:"tableContainer",ref:J,class:"vue-ui-vertical-bar-table"},[e.createElementVNode("div",Qe,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:o[3]||(o[3]=l=>p.value.showTable=!1),onKeypress:o[4]||(o[4]=e.withKeys(l=>p.value.showTable=!1,["enter"]))},[e.createVNode(Be.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%","container-type":"inline-size"},class:e.normalizeClass({"vue-ui-responsive":Q.value})},[e.createElementVNode("table",Ze,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.title.text)+" ",1),t.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",et,e.toDisplayString(t.value.style.chart.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",tt,e.toDisplayString(l),1)],4))),256))],4),e.createElementVNode("tr",null,[e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"∑ "+e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(isNaN(b.value)?"":b.value.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),5),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"100%",4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color};outline:${t.value.table.th.outline}`)},null,4)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value.body,(l,r)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":r%2===0,"vue-ui-data-table__tbody__row-odd":r%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":g.value.head[0]??""},[e.createElementVNode("div",at,[l.color?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${l.color};margin-right:3px`)},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(l.parentName),1)])],12,lt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[1]??""},[e.createElementVNode("div",nt,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.parentValue)?"":l.parentValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,ot),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[2]??""},[e.createElementVNode("div",ut,e.toDisplayString(["",NaN,void 0].includes(l.percentageToTotal)?"":`${(l.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,rt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[3]??""},[e.createElementVNode("div",it,e.toDisplayString(l.childName),1)],12,st),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[4]??""},[e.createElementVNode("div",dt,e.toDisplayString(t.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(l.childValue)?"":l.childValue.toFixed(t.value.table.td.roundingValue))+e.toDisplayString(t.value.table.td.suffix),1)],12,ct),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[5]??""},[e.createElementVNode("div",ht,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToParent)?"":`${(l.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,vt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":g.value.head[6]??""},[e.createElementVNode("div",yt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToTotal)?"":`${(l.childPercentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,pt)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,De))}},ft=ze._export_sfc(gt,[["__scopeId","data-v-fdf1fdac"]]);exports.default=ft;
|