vue-data-ui 2.3.74 → 2.3.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-DK6F5Fq3.cjs → Arrow-D7M4-bW7.cjs} +1 -1
- package/dist/{Arrow-CYCrAySW.js → Arrow-DY9RKUmG.js} +1 -1
- package/dist/{BaseIcon-DBHVtm3A.cjs → BaseIcon-DB7Apwv_.cjs} +1 -1
- package/dist/{BaseIcon-kBIAYqUO.js → BaseIcon-rwm-10Hu.js} +1 -1
- package/dist/{DataTable-BNFSPjhv.cjs → DataTable-CsNozyz7.cjs} +1 -1
- package/dist/{DataTable-CKdV-L0e.js → DataTable-e2fnfjXV.js} +2 -2
- package/dist/{Legend-Cj7T-DqJ.js → Legend-5cQ0xZjK.js} +1 -1
- package/dist/{Legend-Do2kcWFT.cjs → Legend-DgFd-O0m.cjs} +1 -1
- package/dist/{Shape-Bo8ZjViG.js → Shape-CiTElr_0.js} +1 -1
- package/dist/{Shape-DRDUAe_o.cjs → Shape-yPECDLiP.cjs} +1 -1
- package/dist/{Slicer-D8jHSP7U.cjs → Slicer-DaZgCKV7.cjs} +1 -1
- package/dist/{Slicer-4nGKvUYF.js → Slicer-DwBBu3kB.js} +2 -2
- package/dist/{Title-D5cATWsL.cjs → Title-3EduyW4p.cjs} +1 -1
- package/dist/{Title-DZjnxQdN.js → Title-gUz6GDA3.js} +1 -1
- package/dist/{Tooltip-B8yLaegk.cjs → Tooltip-DScSrYXJ.cjs} +1 -1
- package/dist/{Tooltip--kgFEVZs.js → Tooltip-DfSM1mNP.js} +1 -1
- package/dist/{index-D_32ZGWd.cjs → index-BTgtr0F8.cjs} +1 -1
- package/dist/{index-C8SH0f2u.js → index-CaV1s-yZ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BvvH633N.cjs → useNestedProp-CisbRRo_.cjs} +1 -1
- package/dist/{useNestedProp-lS_T5lM3.js → useNestedProp-tWCzZrLx.js} +1 -1
- package/dist/{usePrinter-BouFNHWR.cjs → usePrinter-DzTaA1eh.cjs} +1 -1
- package/dist/{usePrinter-Dj50NAxo.js → usePrinter-rvJyT65A.js} +1 -1
- package/dist/{vue-data-ui-v_BbbLtJ.cjs → vue-data-ui-BGkWRPUY.cjs} +1 -1
- package/dist/{vue-data-ui-DoXqU7xC.js → vue-data-ui-BO89gTtq.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CnoPOJHm.js → vue-ui-3d-bar-CcTMIHiB.js} +499 -486
- package/dist/vue-ui-3d-bar-DzmcGuqh.cjs +19 -0
- package/dist/{vue-ui-accordion-Cka6b_Up.cjs → vue-ui-accordion-7e4Myhcg.cjs} +1 -1
- package/dist/{vue-ui-accordion-YHleIgkV.js → vue-ui-accordion-CpzGQ63y.js} +3 -3
- package/dist/vue-ui-age-pyramid-C7qr9EwB.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CENg8fDg.js → vue-ui-age-pyramid-D71ZLkVV.js} +182 -169
- package/dist/{vue-ui-annotator-VJOLUkqJ.js → vue-ui-annotator-B8Iu6cYt.js} +1 -1
- package/dist/{vue-ui-annotator-ByYg6QMs.cjs → vue-ui-annotator-BKQrweqm.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CHsGD3bx.js → vue-ui-candlestick-Bx4QVkY0.js} +295 -279
- package/dist/vue-ui-candlestick-DAc1FQ-i.cjs +2 -0
- package/dist/vue-ui-carousel-table-uFRqkghO.cjs +1 -0
- package/dist/{vue-ui-carousel-table-RAtX3VBu.js → vue-ui-carousel-table-xuQG6bcH.js} +146 -129
- package/dist/{vue-ui-chestnut-B5GQX0J_.js → vue-ui-chestnut-Bo6rDcU7.js} +215 -204
- package/dist/vue-ui-chestnut-DJkm72oD.cjs +6 -0
- package/dist/{vue-ui-cursor-DnZqLj21.cjs → vue-ui-cursor-BQbeuW-k.cjs} +1 -1
- package/dist/{vue-ui-cursor-CMm7XSSG.js → vue-ui-cursor-C0KOqEOq.js} +2 -2
- package/dist/{vue-ui-dashboard-DgEQJnLr.cjs → vue-ui-dashboard-0Hsjx-bO.cjs} +1 -1
- package/dist/{vue-ui-dashboard-Ck_5L3eu.js → vue-ui-dashboard-BT71xS7P.js} +2 -2
- package/dist/{vue-ui-digits--ULH35um.js → vue-ui-digits-BRqpKYvD.js} +2 -2
- package/dist/{vue-ui-digits-UvwUdi6U.cjs → vue-ui-digits-C2ReH6w0.cjs} +1 -1
- package/dist/{vue-ui-donut-QQ1fWWvc.js → vue-ui-donut-NQW-3prf.js} +376 -362
- package/dist/vue-ui-donut-evolution-DOe-cwLi.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-Cx8kBB_7.js → vue-ui-donut-evolution-jbXQQGTc.js} +270 -255
- package/dist/vue-ui-donut-v81suIOX.cjs +1 -0
- package/dist/vue-ui-dumbbell-DXQSg6wa.cjs +9 -0
- package/dist/{vue-ui-dumbbell-BYvwHpU8.js → vue-ui-dumbbell-Dyz8xdtC.js} +232 -213
- package/dist/vue-ui-flow-BL3JWW1m.js +481 -0
- package/dist/vue-ui-flow-UqSNwH9d.cjs +1 -0
- package/dist/vue-ui-galaxy-DTQWGvRH.cjs +1 -0
- package/dist/{vue-ui-galaxy-B0L57aec.js → vue-ui-galaxy-Dx9nsOuM.js} +175 -162
- package/dist/vue-ui-gauge-BUB7H0qA.cjs +1 -0
- package/dist/vue-ui-gauge-CLaKGi0-.js +500 -0
- package/dist/vue-ui-gizmo-Kitfqu0J.cjs +1 -0
- package/dist/{vue-ui-gizmo-D2RfM55X.js → vue-ui-gizmo-of-4s5HG.js} +66 -53
- package/dist/{vue-ui-heatmap-DKM0DH41.js → vue-ui-heatmap-BIzjOMXO.js} +157 -143
- package/dist/vue-ui-heatmap-DUw2350O.cjs +1 -0
- package/dist/vue-ui-kpi-By3YPwgo.js +98 -0
- package/dist/vue-ui-kpi-DyL2Hcz-.cjs +1 -0
- package/dist/{vue-ui-mini-loader-CLP19Txv.cjs → vue-ui-mini-loader-C048-8Kd.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-MywnWlYI.js → vue-ui-mini-loader-DnK3V2z2.js} +2 -2
- package/dist/{vue-ui-molecule-CLI9iTRE.js → vue-ui-molecule-BfhbIqa5.js} +177 -167
- package/dist/vue-ui-molecule-D-ahly6R.cjs +1 -0
- package/dist/vue-ui-mood-radar-DD8R9BpJ.cjs +1 -0
- package/dist/{vue-ui-mood-radar-O30wZo9a.js → vue-ui-mood-radar-DXxEKr3x.js} +172 -161
- package/dist/{vue-ui-nested-donuts-D8o4TqTt.js → vue-ui-nested-donuts-BdUdHFd-.js} +377 -364
- package/dist/vue-ui-nested-donuts-C7qM_FRw.cjs +17 -0
- package/dist/{vue-ui-onion-Hmcke6xB.js → vue-ui-onion-D0vF5jBt.js} +191 -177
- package/dist/vue-ui-onion-DX3gofXZ.cjs +5 -0
- package/dist/{vue-ui-parallel-coordinate-plot-CyChE3NP.js → vue-ui-parallel-coordinate-plot-CTZY-pY8.js} +298 -284
- package/dist/vue-ui-parallel-coordinate-plot-DEx5kFYd.cjs +8 -0
- package/dist/{vue-ui-quadrant-DimTQdAj.js → vue-ui-quadrant-ByY8GP3y.js} +347 -334
- package/dist/vue-ui-quadrant-CgApzie6.cjs +1 -0
- package/dist/{vue-ui-quick-chart-DxJvENid.js → vue-ui-quick-chart-DTxJ__7j.js} +483 -469
- package/dist/vue-ui-quick-chart-DWZEgUJF.cjs +15 -0
- package/dist/{vue-ui-radar-D_FieunT.js → vue-ui-radar-5UBmAU6W.js} +202 -189
- package/dist/vue-ui-radar-DEED0rTz.cjs +1 -0
- package/dist/{vue-ui-rating-BHW2Onru.cjs → vue-ui-rating-Ce_Ewqtl.cjs} +1 -1
- package/dist/{vue-ui-rating-DF1BpH4E.js → vue-ui-rating-Dr6jquxh.js} +2 -2
- package/dist/vue-ui-relation-circle-BU8i2miI.js +322 -0
- package/dist/vue-ui-relation-circle-CRcQ6Zcy.cjs +1 -0
- package/dist/{vue-ui-rings-BqS-iece.js → vue-ui-rings-Ctl3Jywh.js} +203 -189
- package/dist/vue-ui-rings-OQ8a1Ruw.cjs +2 -0
- package/dist/vue-ui-scatter-B8StSjt8.cjs +1 -0
- package/dist/{vue-ui-scatter-Dns49Nht.js → vue-ui-scatter-BwJ_koWT.js} +284 -270
- package/dist/{vue-ui-screenshot-5Gsnd0Wr.js → vue-ui-screenshot-BS3L5vhN.js} +1 -1
- package/dist/{vue-ui-screenshot---q062Kd.cjs → vue-ui-screenshot-bAVk3EPl.cjs} +1 -1
- package/dist/{vue-ui-skeleton-fVPw-oIR.cjs → vue-ui-skeleton-CMQzFTs9.cjs} +1 -1
- package/dist/{vue-ui-skeleton-B4eWLjH3.js → vue-ui-skeleton-CvFX_ExX.js} +2 -2
- package/dist/{vue-ui-smiley-B8Tyunn3.js → vue-ui-smiley-CGYZpNt9.js} +2 -2
- package/dist/{vue-ui-smiley-YfHmv0rQ.cjs → vue-ui-smiley-sF8QIso1.cjs} +1 -1
- package/dist/vue-ui-spark-trend-B4XSSKl9.js +263 -0
- package/dist/vue-ui-spark-trend-CdIoxaqb.cjs +1 -0
- package/dist/{vue-ui-sparkbar-9DBvdYn7.js → vue-ui-sparkbar-BbsJGDMZ.js} +95 -87
- package/dist/vue-ui-sparkbar-C3i1K7hi.cjs +1 -0
- package/dist/vue-ui-sparkgauge-BKyQoI7C.cjs +1 -0
- package/dist/vue-ui-sparkgauge-D4w_i_QJ.js +178 -0
- package/dist/{vue-ui-sparkhistogram-BBUVmco4.js → vue-ui-sparkhistogram-CYybrW-6.js} +79 -68
- package/dist/vue-ui-sparkhistogram-CvTYEmbz.cjs +1 -0
- package/dist/vue-ui-sparkline-CDowaDRS.cjs +1 -0
- package/dist/{vue-ui-sparkline-CeqNV6Re.js → vue-ui-sparkline-DjN1SVdO.js} +142 -123
- package/dist/{vue-ui-sparkstackbar-C3GMC1eW.js → vue-ui-sparkstackbar-BLMhJxaN.js} +120 -104
- package/dist/vue-ui-sparkstackbar-BZ2bESBi.cjs +1 -0
- package/dist/{vue-ui-stackbar-DyGPrFxi.js → vue-ui-stackbar-BTKOHUYc.js} +235 -222
- package/dist/vue-ui-stackbar-DRHaJFR8.cjs +6 -0
- package/dist/vue-ui-strip-plot-DxQxFbWg.cjs +1 -0
- package/dist/{vue-ui-strip-plot-y1AnVJmq.js → vue-ui-strip-plot-o6GTsGAT.js} +246 -232
- package/dist/{vue-ui-table-xWvAQS-s.cjs → vue-ui-table-BFIj1Rgh.cjs} +1 -1
- package/dist/{vue-ui-table-B4kfykAO.js → vue-ui-table-CnquiTpr.js} +1 -1
- package/dist/vue-ui-table-heatmap-CCGK12Fa.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-YZRSzwRM.js → vue-ui-table-heatmap-CZRIwv-Q.js} +106 -95
- package/dist/{vue-ui-table-sparkline-C0v2r4Kf.js → vue-ui-table-sparkline-B3zEeq6Z.js} +151 -138
- package/dist/vue-ui-table-sparkline-DYmgfHz4.cjs +1 -0
- package/dist/{vue-ui-thermometer-D5qurIy7.js → vue-ui-thermometer-BopiohUh.js} +116 -104
- package/dist/vue-ui-thermometer-CzPRBt6c.cjs +1 -0
- package/dist/vue-ui-timer-Bonw69Lt.cjs +64 -0
- package/dist/{vue-ui-timer-VWjovnKL.js → vue-ui-timer-C7WkW8hK.js} +191 -176
- package/dist/{vue-ui-tiremarks-jH6cdQOJ.js → vue-ui-tiremarks-BurRtFv4.js} +115 -103
- package/dist/vue-ui-tiremarks-DkIGfq8t.cjs +1 -0
- package/dist/vue-ui-treemap-CalhJmnp.cjs +1 -0
- package/dist/{vue-ui-treemap-BCc5sQLB.js → vue-ui-treemap-DWy4voIr.js} +251 -237
- package/dist/{vue-ui-vertical-bar-2In_g5iC.js → vue-ui-vertical-bar-CJW1YhtY.js} +314 -299
- package/dist/vue-ui-vertical-bar-rwWp-sai.cjs +4 -0
- package/dist/{vue-ui-waffle-OzU830VX.js → vue-ui-waffle-DB7X6nTS.js} +285 -265
- package/dist/vue-ui-waffle-faQMBYNx.cjs +1 -0
- package/dist/vue-ui-wheel-BzjbGP6a.cjs +1 -0
- package/dist/vue-ui-wheel-CryKap2E.js +255 -0
- package/dist/vue-ui-word-cloud-COqUkvei.js +512 -0
- package/dist/vue-ui-word-cloud-DJN9I4q4.cjs +1 -0
- package/dist/vue-ui-xy-BmA0tspd.cjs +3 -0
- package/dist/{vue-ui-xy-DuJtYXKl.js → vue-ui-xy-b1Z_HPsx.js} +300 -274
- package/dist/{vue-ui-xy-canvas-CKibMJHh.js → vue-ui-xy-canvas-BgbLnY5B.js} +345 -327
- package/dist/vue-ui-xy-canvas-DOM2Kq_s.cjs +9 -0
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-CwCEoPX-.cjs +0 -19
- package/dist/vue-ui-age-pyramid-GqCNpd_h.cjs +0 -1
- package/dist/vue-ui-candlestick-TdNVq_FX.cjs +0 -2
- package/dist/vue-ui-carousel-table-yXUSFk2u.cjs +0 -1
- package/dist/vue-ui-chestnut-EJj-dQSY.cjs +0 -6
- package/dist/vue-ui-donut-BqUBysA_.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BXtEnop4.cjs +0 -1
- package/dist/vue-ui-dumbbell-CjIh7KTm.cjs +0 -9
- package/dist/vue-ui-flow-hp0Hpuhn.js +0 -469
- package/dist/vue-ui-flow-u29zqSQj.cjs +0 -1
- package/dist/vue-ui-galaxy-DE1HbBi-.cjs +0 -1
- package/dist/vue-ui-gauge-B_IZrsfj.cjs +0 -1
- package/dist/vue-ui-gauge-CPyyn7cL.js +0 -488
- package/dist/vue-ui-gizmo-DR4gacOL.cjs +0 -1
- package/dist/vue-ui-heatmap-DMB_eUpA.cjs +0 -1
- package/dist/vue-ui-kpi-BAxAY13T.js +0 -84
- package/dist/vue-ui-kpi-BD21xshi.cjs +0 -1
- package/dist/vue-ui-molecule-BNsWckH-.cjs +0 -1
- package/dist/vue-ui-mood-radar-BsWE1f8R.cjs +0 -1
- package/dist/vue-ui-nested-donuts-CYyUtXs2.cjs +0 -17
- package/dist/vue-ui-onion-D7TXJu5w.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-BqZB7xKn.cjs +0 -8
- package/dist/vue-ui-quadrant-BPDTvxlT.cjs +0 -1
- package/dist/vue-ui-quick-chart-C_-ut0if.cjs +0 -15
- package/dist/vue-ui-radar-C5Kq19hg.cjs +0 -1
- package/dist/vue-ui-relation-circle-4kIYttRI.js +0 -310
- package/dist/vue-ui-relation-circle-DHMHHsqY.cjs +0 -1
- package/dist/vue-ui-rings-BqPS8NKl.cjs +0 -2
- package/dist/vue-ui-scatter-BLVcdf3d.cjs +0 -1
- package/dist/vue-ui-spark-trend-Dpv6am0Z.cjs +0 -1
- package/dist/vue-ui-spark-trend-Em9OqYyG.js +0 -251
- package/dist/vue-ui-sparkbar-BuSuwQYl.cjs +0 -1
- package/dist/vue-ui-sparkgauge-BN5feBzp.js +0 -167
- package/dist/vue-ui-sparkgauge-DKtUZMv1.cjs +0 -1
- package/dist/vue-ui-sparkhistogram-BmuusW02.cjs +0 -1
- package/dist/vue-ui-sparkline-Blzv-tIQ.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-D__WDEMv.cjs +0 -1
- package/dist/vue-ui-stackbar-DFqJ5K_q.cjs +0 -6
- package/dist/vue-ui-strip-plot-z9fjJ6Dj.cjs +0 -1
- package/dist/vue-ui-table-heatmap-CGKecjtm.cjs +0 -1
- package/dist/vue-ui-table-sparkline-CHFZG3Tg.cjs +0 -1
- package/dist/vue-ui-thermometer-DoOxxVW1.cjs +0 -1
- package/dist/vue-ui-timer-D63zHe-I.cjs +0 -64
- package/dist/vue-ui-tiremarks-Cp8YEmXh.cjs +0 -1
- package/dist/vue-ui-treemap-DJrdEFW5.cjs +0 -1
- package/dist/vue-ui-vertical-bar-BfJJqN_z.cjs +0 -4
- package/dist/vue-ui-waffle-A2gmRbq0.cjs +0 -1
- package/dist/vue-ui-wheel-C9QXzWu1.js +0 -242
- package/dist/vue-ui-wheel-DGSh9VKq.cjs +0 -1
- package/dist/vue-ui-word-cloud-C2ZaVlfO.js +0 -498
- package/dist/vue-ui-word-cloud-DPFB1MYk.cjs +0 -1
- package/dist/vue-ui-xy-C-2-aijE.cjs +0 -3
- package/dist/vue-ui-xy-canvas-D7wf3xab.cjs +0 -9
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { u as
|
|
3
|
-
import { u as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { u as
|
|
6
|
-
import
|
|
7
|
-
import { _ as
|
|
8
|
-
const
|
|
1
|
+
import { computed as h, ref as p, watch as R, onMounted as le, openBlock as n, createElementBlock as c, normalizeClass as O, normalizeStyle as S, createBlock as A, createCommentVNode as b, unref as d, createSlots as oe, withCtx as N, renderSlot as w, normalizeProps as Y, guardReactiveProps as q, Fragment as J, renderList as K, toDisplayString as re } from "vue";
|
|
2
|
+
import { u as Q } from "./useNestedProp-tWCzZrLx.js";
|
|
3
|
+
import { u as se, c as ne, t as ue, s as ie, o as ce, e as ve, v as W, X as he, i as de, f as ge } from "./index-CaV1s-yZ.js";
|
|
4
|
+
import { _ as me } from "./Title-gUz6GDA3.js";
|
|
5
|
+
import { u as ye, U as fe } from "./usePrinter-rvJyT65A.js";
|
|
6
|
+
import pe from "./vue-ui-skeleton-CvFX_ExX.js";
|
|
7
|
+
import { _ as ke } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
const be = ["id"], _e = ["xmlns", "viewBox"], Ce = { key: 0 }, $e = ["d", "stroke-width", "stroke"], xe = { key: 1 }, we = ["x1", "y1", "x2", "y2", "stroke-width", "stroke"], Pe = ["x", "y", "font-size", "fill", "font-weight", "text-anchor"], Ie = {
|
|
9
9
|
key: 3,
|
|
10
10
|
class: "vue-data-ui-watermark"
|
|
11
|
-
},
|
|
11
|
+
}, Fe = {
|
|
12
12
|
__name: "vue-ui-tiremarks",
|
|
13
13
|
props: {
|
|
14
14
|
config: {
|
|
@@ -24,46 +24,57 @@ const pe = ["id"], ke = ["xmlns", "viewBox"], be = { key: 0 }, _e = ["d", "strok
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
setup(Z, { expose: V }) {
|
|
28
|
+
const v = Z, { vue_ui_tiremarks: ee } = se(), F = h(() => !!v.dataset && Object.keys(v.dataset).length), z = p(ne()), G = p(null), L = p(0), M = p(0), e = h({
|
|
29
|
+
get: () => U(),
|
|
30
|
+
set: (t) => t
|
|
31
|
+
});
|
|
32
|
+
function U() {
|
|
33
|
+
const t = Q({
|
|
34
|
+
userConfig: v.config,
|
|
35
|
+
defaultConfig: ee
|
|
32
36
|
});
|
|
33
37
|
return t.theme ? {
|
|
34
|
-
...
|
|
35
|
-
userConfig:
|
|
38
|
+
...Q({
|
|
39
|
+
userConfig: ue.vue_ui_tiremarks[t.theme] || v.config,
|
|
36
40
|
defaultConfig: t
|
|
37
41
|
})
|
|
38
42
|
} : t;
|
|
39
|
-
}
|
|
43
|
+
}
|
|
44
|
+
R(() => v.config, (t) => {
|
|
45
|
+
e.value = U(), D(), M.value += 1;
|
|
46
|
+
}, { deep: !0 });
|
|
47
|
+
const { isPrinting: j, isImaging: B, generatePdf: E, generateImage: T } = ye({
|
|
40
48
|
elementId: z.value,
|
|
41
49
|
fileName: e.value.style.chart.title.text || "vue-ui-tiremarks"
|
|
42
|
-
}),
|
|
43
|
-
|
|
44
|
-
e.value.style.chart.animation.use ?
|
|
45
|
-
}, { deep: !0 }),
|
|
46
|
-
|
|
47
|
-
componentName: "VueUiTiremarks",
|
|
48
|
-
type: "dataset"
|
|
49
|
-
}), B(d.dataset.percentage || 0);
|
|
50
|
+
}), r = p(e.value.style.chart.animation.use ? 0 : ie(v.dataset.percentage));
|
|
51
|
+
R(() => v.dataset, (t) => {
|
|
52
|
+
e.value.style.chart.animation.use ? X(t.percentage) : r.value = t.percentage || 0;
|
|
53
|
+
}, { deep: !0 }), le(() => {
|
|
54
|
+
D();
|
|
50
55
|
});
|
|
51
|
-
function
|
|
52
|
-
let
|
|
53
|
-
const a = Math.abs(t -
|
|
56
|
+
function X(t) {
|
|
57
|
+
let u = e.value.style.chart.animation.speed;
|
|
58
|
+
const a = Math.abs(t - r.value) / (u * 120);
|
|
54
59
|
function o() {
|
|
55
|
-
|
|
60
|
+
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);
|
|
56
61
|
}
|
|
57
62
|
o();
|
|
58
63
|
}
|
|
59
|
-
|
|
64
|
+
function D() {
|
|
65
|
+
ce(v.dataset) && ve({
|
|
66
|
+
componentName: "VueUiTiremarks",
|
|
67
|
+
type: "dataset"
|
|
68
|
+
}), X(v.dataset.percentage || 0);
|
|
69
|
+
}
|
|
70
|
+
const k = h(() => e.value.style.chart.layout.display === "vertical"), s = h(() => {
|
|
60
71
|
const t = {
|
|
61
72
|
top: 48,
|
|
62
73
|
left: 64,
|
|
63
74
|
right: 64,
|
|
64
75
|
bottom: 48
|
|
65
76
|
};
|
|
66
|
-
return
|
|
77
|
+
return k.value ? {
|
|
67
78
|
top: e.value.style.chart.percentage.verticalPosition === "top" ? t.top : 3,
|
|
68
79
|
left: 3,
|
|
69
80
|
right: 3,
|
|
@@ -74,74 +85,75 @@ const pe = ["id"], ke = ["xmlns", "viewBox"], be = { key: 0 }, _e = ["d", "strok
|
|
|
74
85
|
left: e.value.style.chart.percentage.horizontalPosition === "left" ? t.left : 3,
|
|
75
86
|
right: e.value.style.chart.percentage.horizontalPosition === "right" ? t.right : 10
|
|
76
87
|
};
|
|
77
|
-
}), P =
|
|
78
|
-
height:
|
|
79
|
-
width:
|
|
80
|
-
})),
|
|
81
|
-
|
|
82
|
-
const i =
|
|
88
|
+
}), P = h(() => Object.values(s.value).reduce((t, u) => t + u, 0)), l = h(() => ({
|
|
89
|
+
height: k.value ? 312 : 56,
|
|
90
|
+
width: k.value ? 56 : 312
|
|
91
|
+
})), te = p(100);
|
|
92
|
+
h(() => v.dataset.percentage / te.value);
|
|
93
|
+
const i = h(() => k.value ? {
|
|
83
94
|
mark: (l.value.height - P.value) / 100 * 0.5,
|
|
84
95
|
space: (l.value.height - P.value) / 100 * 0.5
|
|
85
96
|
} : {
|
|
86
97
|
mark: (l.value.width - P.value) / 100 * 0.5,
|
|
87
98
|
space: (l.value.width - P.value) / 100 * 0.5
|
|
88
|
-
}),
|
|
99
|
+
}), H = h(() => {
|
|
89
100
|
const t = [];
|
|
90
101
|
for (let a = 0; a < 100; a += 1) {
|
|
91
|
-
const o = e.value.style.chart.layout.ticks.gradient.show ?
|
|
92
|
-
if (
|
|
93
|
-
const C = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.width -
|
|
102
|
+
const o = e.value.style.chart.layout.ticks.gradient.show ? W(e.value.style.chart.layout.activeColor, a / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.layout.activeColor;
|
|
103
|
+
if (k.value) {
|
|
104
|
+
const C = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.width - s.value.left - s.value.right) / 100 / 3 : 0, g = s.value.left + 4 + C, m = l.value.width - s.value.right - 4 - C, y = l.value.height - s.value.bottom - a * i.value.mark - a * i.value.space - i.value.mark, f = l.value.height - s.value.bottom - a * i.value.mark - a * i.value.space - i.value.mark, $ = (m - g) / e.value.style.chart.layout.curveAngleX, x = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100);
|
|
94
105
|
t.push({
|
|
95
|
-
x1:
|
|
96
|
-
x2:
|
|
97
|
-
y1:
|
|
106
|
+
x1: g,
|
|
107
|
+
x2: m,
|
|
108
|
+
y1: y,
|
|
98
109
|
y2: f,
|
|
99
|
-
curve: `M ${
|
|
110
|
+
curve: `M ${g} ${y} C ${g + $} ${y - x}, ${m - $} ${f - x}, ${m} ${f}`,
|
|
100
111
|
color: o
|
|
101
112
|
});
|
|
102
113
|
} else {
|
|
103
|
-
const C = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.height -
|
|
114
|
+
const C = e.value.style.chart.layout.crescendo ? (100 - a) * (l.value.height - s.value.top - s.value.bottom) / 100 / 3 : 0, g = s.value.left + a * i.value.mark + a * i.value.space - i.value.mark, m = g, y = s.value.top + 4 + C, f = l.value.height - s.value.bottom - 4 - C, $ = e.value.style.chart.layout.curveAngleY * ((1 + a) / 100), x = (f - y) / e.value.style.chart.layout.curveAngleX;
|
|
104
115
|
t.push({
|
|
105
|
-
x1:
|
|
106
|
-
x2:
|
|
107
|
-
y1:
|
|
116
|
+
x1: g,
|
|
117
|
+
x2: m,
|
|
118
|
+
y1: y,
|
|
108
119
|
y2: f,
|
|
109
|
-
curve: `M ${
|
|
120
|
+
curve: `M ${g} ${y} C ${g + $} ${y + x}, ${m + $} ${f - x}, ${m} ${f}`,
|
|
110
121
|
color: o
|
|
111
122
|
});
|
|
112
123
|
}
|
|
113
124
|
}
|
|
114
125
|
return t;
|
|
115
|
-
}), _ =
|
|
116
|
-
let t,
|
|
126
|
+
}), _ = h(() => {
|
|
127
|
+
let t, u, a;
|
|
117
128
|
const o = e.value.style.chart.percentage.fontSize / 3;
|
|
118
|
-
return
|
|
129
|
+
return k.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"), {
|
|
119
130
|
x: t,
|
|
120
|
-
y:
|
|
131
|
+
y: u,
|
|
121
132
|
textAnchor: a,
|
|
122
133
|
bold: e.value.style.chart.percentage.bold,
|
|
123
134
|
fontSize: e.value.style.chart.percentage.fontSize,
|
|
124
135
|
fill: e.value.style.chart.percentage.color
|
|
125
136
|
};
|
|
126
|
-
}), I =
|
|
127
|
-
function
|
|
128
|
-
I.value = t,
|
|
137
|
+
}), I = p(!1);
|
|
138
|
+
function ae(t) {
|
|
139
|
+
I.value = t, L.value += 1;
|
|
129
140
|
}
|
|
130
|
-
return
|
|
131
|
-
generatePdf:
|
|
132
|
-
generateImage:
|
|
133
|
-
}), (t,
|
|
141
|
+
return V({
|
|
142
|
+
generatePdf: E,
|
|
143
|
+
generateImage: T
|
|
144
|
+
}), (t, u) => (n(), c("div", {
|
|
134
145
|
ref_key: "tiremarksChart",
|
|
135
|
-
ref:
|
|
146
|
+
ref: G,
|
|
136
147
|
class: O(`vue-ui-tiremarks ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
137
148
|
style: S(`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}`),
|
|
138
149
|
id: z.value
|
|
139
150
|
}, [
|
|
140
|
-
e.value.style.chart.title.text ? (
|
|
151
|
+
e.value.style.chart.title.text ? (n(), c("div", {
|
|
141
152
|
key: 0,
|
|
142
153
|
style: S(`width:100%;background:${e.value.style.chart.backgroundColor};padding-bottom:12px`)
|
|
143
154
|
}, [
|
|
144
|
-
|
|
155
|
+
(n(), A(me, {
|
|
156
|
+
key: `title_${M.value}`,
|
|
145
157
|
config: {
|
|
146
158
|
title: {
|
|
147
159
|
cy: "wheel-title",
|
|
@@ -152,15 +164,15 @@ const pe = ["id"], ke = ["xmlns", "viewBox"], be = { key: 0 }, _e = ["d", "strok
|
|
|
152
164
|
...e.value.style.chart.title.subtitle
|
|
153
165
|
}
|
|
154
166
|
}
|
|
155
|
-
}, null, 8, ["config"])
|
|
167
|
+
}, null, 8, ["config"]))
|
|
156
168
|
], 4)) : b("", !0),
|
|
157
|
-
e.value.userOptions.show && F.value ? (
|
|
169
|
+
e.value.userOptions.show && F.value ? (n(), A(fe, {
|
|
158
170
|
ref: "details",
|
|
159
|
-
key: `user_options_${
|
|
171
|
+
key: `user_options_${L.value}`,
|
|
160
172
|
backgroundColor: e.value.style.chart.backgroundColor,
|
|
161
173
|
color: e.value.style.chart.color,
|
|
162
|
-
isPrinting:
|
|
163
|
-
isImaging:
|
|
174
|
+
isPrinting: d(j),
|
|
175
|
+
isImaging: d(B),
|
|
164
176
|
uid: z.value,
|
|
165
177
|
hasPdf: e.value.userOptions.buttons.pdf,
|
|
166
178
|
hasImg: e.value.userOptions.buttons.img,
|
|
@@ -168,83 +180,83 @@ const pe = ["id"], ke = ["xmlns", "viewBox"], be = { key: 0 }, _e = ["d", "strok
|
|
|
168
180
|
hasXls: !1,
|
|
169
181
|
isFullscreen: I.value,
|
|
170
182
|
titles: { ...e.value.userOptions.buttonTitles },
|
|
171
|
-
chartElement:
|
|
172
|
-
onToggleFullscreen:
|
|
173
|
-
onGeneratePdf:
|
|
174
|
-
onGenerateImage:
|
|
175
|
-
},
|
|
183
|
+
chartElement: G.value,
|
|
184
|
+
onToggleFullscreen: ae,
|
|
185
|
+
onGeneratePdf: d(E),
|
|
186
|
+
onGenerateImage: d(T)
|
|
187
|
+
}, oe({ _: 2 }, [
|
|
176
188
|
t.$slots.optionPdf ? {
|
|
177
189
|
name: "optionPdf",
|
|
178
|
-
fn:
|
|
190
|
+
fn: N(() => [
|
|
179
191
|
w(t.$slots, "optionPdf", {}, void 0, !0)
|
|
180
192
|
]),
|
|
181
193
|
key: "0"
|
|
182
194
|
} : void 0,
|
|
183
195
|
t.$slots.optionImg ? {
|
|
184
196
|
name: "optionImg",
|
|
185
|
-
fn:
|
|
197
|
+
fn: N(() => [
|
|
186
198
|
w(t.$slots, "optionImg", {}, void 0, !0)
|
|
187
199
|
]),
|
|
188
200
|
key: "1"
|
|
189
201
|
} : void 0,
|
|
190
202
|
t.$slots.optionFullscreen ? {
|
|
191
203
|
name: "optionFullscreen",
|
|
192
|
-
fn:
|
|
193
|
-
w(t.$slots, "optionFullscreen",
|
|
204
|
+
fn: N(({ toggleFullscreen: a, isFullscreen: o }) => [
|
|
205
|
+
w(t.$slots, "optionFullscreen", Y(q({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
|
|
194
206
|
]),
|
|
195
207
|
key: "2"
|
|
196
208
|
} : void 0
|
|
197
209
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : b("", !0),
|
|
198
|
-
F.value ? (
|
|
210
|
+
F.value ? (n(), c("svg", {
|
|
199
211
|
key: 2,
|
|
200
|
-
xmlns:
|
|
212
|
+
xmlns: d(he),
|
|
201
213
|
class: O({ "vue-data-ui-fullscreen--on": I.value, "vue-data-ui-fulscreen--off": !I.value }),
|
|
202
214
|
viewBox: `0 0 ${l.value.width} ${l.value.height}`,
|
|
203
215
|
style: S(`max-width:100%; overflow: visible; background:${e.value.style.chart.backgroundColor};color:${e.value.style.chart.color}`)
|
|
204
216
|
}, [
|
|
205
|
-
e.value.style.chart.layout.curved ? (
|
|
206
|
-
(
|
|
217
|
+
e.value.style.chart.layout.curved ? (n(), c("g", Ce, [
|
|
218
|
+
(n(!0), c(J, null, K(H.value, (a, o) => (n(), c("path", {
|
|
207
219
|
d: a.curve,
|
|
208
220
|
"stroke-width": i.value.mark,
|
|
209
|
-
stroke:
|
|
221
|
+
stroke: r.value >= o ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
210
222
|
"stroke-linecap": "round",
|
|
211
223
|
fill: "none",
|
|
212
|
-
class: O({ "vue-ui-tick-animated": e.value.style.chart.animation.use && o <=
|
|
213
|
-
}, null, 10,
|
|
214
|
-
])) : (
|
|
215
|
-
(
|
|
224
|
+
class: O({ "vue-ui-tick-animated": e.value.style.chart.animation.use && o <= r.value })
|
|
225
|
+
}, null, 10, $e))), 256))
|
|
226
|
+
])) : (n(), c("g", xe, [
|
|
227
|
+
(n(!0), c(J, null, K(H.value, (a, o) => (n(), c("line", {
|
|
216
228
|
x1: a.x1,
|
|
217
229
|
y1: a.y1,
|
|
218
230
|
x2: a.x2,
|
|
219
231
|
y2: a.y2,
|
|
220
232
|
"stroke-width": i.value.mark,
|
|
221
|
-
stroke:
|
|
233
|
+
stroke: r.value >= o ? a.color : e.value.style.chart.layout.inactiveColor,
|
|
222
234
|
"stroke-linecap": "round"
|
|
223
|
-
}, null, 8,
|
|
235
|
+
}, null, 8, we))), 256))
|
|
224
236
|
])),
|
|
225
|
-
e.value.style.chart.percentage.show ? (
|
|
237
|
+
e.value.style.chart.percentage.show ? (n(), c("text", {
|
|
226
238
|
key: 2,
|
|
227
239
|
x: _.value.x,
|
|
228
240
|
y: _.value.y,
|
|
229
241
|
"font-size": _.value.fontSize,
|
|
230
|
-
fill: e.value.style.chart.layout.ticks.gradient.show && e.value.style.chart.percentage.useGradientColor ?
|
|
242
|
+
fill: e.value.style.chart.layout.ticks.gradient.show && e.value.style.chart.percentage.useGradientColor ? d(W)(e.value.style.chart.layout.activeColor, r.value / 100 * (e.value.style.chart.layout.ticks.gradient.shiftHueIntensity / 100)) : e.value.style.chart.percentage.color,
|
|
231
243
|
"font-weight": _.value.bold ? "bold" : "normal",
|
|
232
244
|
"text-anchor": _.value.textAnchor
|
|
233
|
-
},
|
|
245
|
+
}, re(d(de)(
|
|
234
246
|
e.value.style.chart.percentage.formatter,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
v:
|
|
247
|
+
r.value,
|
|
248
|
+
d(ge)({
|
|
249
|
+
v: r.value,
|
|
238
250
|
s: "%",
|
|
239
251
|
r: e.value.style.chart.percentage.rounding
|
|
240
252
|
})
|
|
241
|
-
)), 9,
|
|
253
|
+
)), 9, Pe)) : b("", !0),
|
|
242
254
|
w(t.$slots, "svg", { svg: l.value }, void 0, !0)
|
|
243
|
-
], 14,
|
|
244
|
-
t.$slots.watermark ? (
|
|
245
|
-
w(t.$slots, "watermark",
|
|
255
|
+
], 14, _e)) : b("", !0),
|
|
256
|
+
t.$slots.watermark ? (n(), c("div", Ie, [
|
|
257
|
+
w(t.$slots, "watermark", Y(q({ isPrinting: d(j) || d(B) })), void 0, !0)
|
|
246
258
|
])) : b("", !0),
|
|
247
|
-
F.value ? b("", !0) : (
|
|
259
|
+
F.value ? b("", !0) : (n(), A(pe, {
|
|
248
260
|
key: 4,
|
|
249
261
|
config: {
|
|
250
262
|
type: "tiremarks",
|
|
@@ -256,9 +268,9 @@ const pe = ["id"], ke = ["xmlns", "viewBox"], be = { key: 0 }, _e = ["d", "strok
|
|
|
256
268
|
}
|
|
257
269
|
}
|
|
258
270
|
}, null, 8, ["config"]))
|
|
259
|
-
], 14,
|
|
271
|
+
], 14, be));
|
|
260
272
|
}
|
|
261
|
-
},
|
|
273
|
+
}, Me = /* @__PURE__ */ ke(Fe, [["__scopeId", "data-v-be6232b0"]]);
|
|
262
274
|
export {
|
|
263
|
-
|
|
275
|
+
Me as default
|
|
264
276
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),q=require("./useNestedProp-CisbRRo_.cjs"),c=require("./index-BTgtr0F8.cjs"),H=require("./Title-3EduyW4p.cjs"),L=require("./usePrinter-DzTaA1eh.cjs"),V=require("./vue-ui-skeleton-CMQzFTs9.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),X=["id"],R=["xmlns","viewBox"],Y={key:0},J=["d","stroke-width","stroke"],K={key:1},Q=["x1","y1","x2","y2","stroke-width","stroke"],W=["x","y","font-size","fill","font-weight","text-anchor"],Z={key:3,class:"vue-data-ui-watermark"},ee={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(M,{expose:G}){const v=M,{vue_ui_tiremarks:T}=c.useConfig(),x=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),w=e.ref(c.createUid()),$=e.ref(null),P=e.ref(0),B=e.ref(0),t=e.computed({get:()=>z(),set:a=>a});function z(){const a=q.useNestedProp({userConfig:v.config,defaultConfig:T});return a.theme?{...q.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[a.theme]||v.config,defaultConfig:a})}:a}e.watch(()=>v.config,a=>{t.value=z(),O(),B.value+=1},{deep:!0});const{isPrinting:S,isImaging:I,generatePdf:F,generateImage:N}=L.usePrinter({elementId:w.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),n=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,a=>{t.value.style.chart.animation.use?E(a.percentage):n.value=a.percentage||0},{deep:!0}),e.onMounted(()=>{O()});function E(a){let u=t.value.style.chart.animation.speed;const l=Math.abs(a-n.value)/(u*120);function r(){n.value<a?n.value=Math.min(n.value+l,a):n.value>a&&(n.value=Math.max(n.value-l,a)),n.value!==a&&requestAnimationFrame(r)}r()}function O(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),E(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),s=e.computed(()=>{const a={top:48,left:64,right:64,bottom:48};return f.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?a.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?a.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?a.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?a.right:10}}),C=e.computed(()=>Object.values(s.value).reduce((a,u)=>a+u,0)),o=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),j=e.ref(100);e.computed(()=>v.dataset.percentage/j.value);const i=e.computed(()=>f.value?{mark:(o.value.height-C.value)/100*.5,space:(o.value.height-C.value)/100*.5}:{mark:(o.value.width-C.value)/100*.5,space:(o.value.width-C.value)/100*.5}),A=e.computed(()=>{const a=[];for(let l=0;l<100;l+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,l/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.layout.activeColor;if(f.value){const y=t.value.style.chart.layout.crescendo?(100-l)*(o.value.width-s.value.left-s.value.right)/100/3:0,d=s.value.left+4+y,h=o.value.width-s.value.right-4-y,m=o.value.height-s.value.bottom-l*i.value.mark-l*i.value.space-i.value.mark,p=o.value.height-s.value.bottom-l*i.value.mark-l*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+l)/100);a.push({x1:d,x2:h,y1:m,y2:p,curve:`M ${d} ${m} C ${d+k} ${m-b}, ${h-k} ${p-b}, ${h} ${p}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-l)*(o.value.height-s.value.top-s.value.bottom)/100/3:0,d=s.value.left+l*i.value.mark+l*i.value.space-i.value.mark,h=d,m=s.value.top+4+y,p=o.value.height-s.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+l)/100),b=(p-m)/t.value.style.chart.layout.curveAngleX;a.push({x1:d,x2:h,y1:m,y2:p,curve:`M ${d} ${m} C ${d+k} ${m+b}, ${h+k} ${p-b}, ${h} ${p}`,color:r})}}return a}),g=e.computed(()=>{let a,u,l;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(a=o.value.width/2,u=s.value.top/2,l="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(a=o.value.width/2,u=o.value.height-s.value.bottom/2+r,l="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(a=4,u=o.value.height/2+r,l="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(a=o.value.width-s.value.right+8,u=o.value.height/2+r,l="start"),{x:a,y:u,textAnchor:l,bold:t.value.style.chart.percentage.bold,fontSize:t.value.style.chart.percentage.fontSize,fill:t.value.style.chart.percentage.color}}),_=e.ref(!1);function U(a){_.value=a,P.value+=1}return G({generatePdf:F,generateImage:N}),(a,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:$,class:e.normalizeClass(`vue-ui-tiremarks ${t.value.useCssAnimation?"":"vue-ui-dna"}`),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}`),id:w.value},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[(e.openBlock(),e.createBlock(H._sfc_main,{key:`title_${B.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(L.UserOptions,{ref:"details",key:`user_options_${P.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(S),isImaging:e.unref(I),uid:w.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:_.value,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,onToggleFullscreen:U,onGeneratePdf:e.unref(F),onGenerateImage:e.unref(N)},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"1"}: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:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",Y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.curve,"stroke-width":i.value.mark,stroke:n.value>=r?l.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"vue-ui-tick-animated":t.value.style.chart.animation.use&&r<=n.value})},null,10,J))),256))])):(e.openBlock(),e.createElementBlock("g",K,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,"stroke-width":i.value.mark,stroke:n.value>=r?l.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,Q))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:g.value.x,y:g.value.y,"font-size":g.value.fontSize,fill:t.value.style.chart.layout.ticks.gradient.show&&t.value.style.chart.percentage.useGradientColor?e.unref(c.shiftHue)(t.value.style.chart.layout.activeColor,n.value/100*(t.value.style.chart.layout.ticks.gradient.shiftHueIntensity/100)):t.value.style.chart.percentage.color,"font-weight":g.value.bold?"bold":"normal","text-anchor":g.value.textAnchor},e.toDisplayString(e.unref(c.applyDataLabel)(t.value.style.chart.percentage.formatter,n.value,e.unref(c.dataLabel)({v:n.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,W)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"svg",{svg:o.value},void 0,!0)],14,R)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Z,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(V.default,{key:4,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],14,X))}},te=D._export_sfc(ee,[["__scopeId","data-v-be6232b0"]]);exports.default=te;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BTgtr0F8.cjs"),Te=require("./Title-3EduyW4p.cjs"),ce=require("./usePrinter-DzTaA1eh.cjs"),Se=require("./Tooltip-DScSrYXJ.cjs"),Ne=require("./Legend-DgFd-O0m.cjs"),Be=require("./vue-ui-skeleton-CMQzFTs9.cjs"),_e=require("./DataTable-CsNozyz7.cjs"),ze=require("./vue-ui-accordion-7e4Myhcg.cjs"),de=require("./useResponsive-B3TrDDIG.cjs"),ve=require("./useNestedProp-CisbRRo_.cjs"),Pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function he(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,i=-1/0,v=0;for(let f=0;f<s;f+=1){const p=n[f].normalizedValue;p<u&&(u=p),p>i&&(i=p),v+=p}return Math.max(d**2*i/v**2,v**2/(d**2*u))}}function pe(n){const{xOffset:d,yOffset:s,width:u,height:i}=n;return{x0:d,y0:s,x1:d+u,y1:s+i}}function Oe(n,d,s){if(n.length===0)return!0;{const u=n.concat(d),i=he(n,s),v=he(u,s);return i>=v}}function Ee(n){const d=[],s=n.length;for(let u=0;u<s;u+=1){const i=n[u],v=i.length;for(let h=0;h<v;h+=1)d.push(i[h])}return d}function Ve(n,d){const s={...d,children:n};return ge(s)}function Le(n){return(n.x1-n.x0)*(n.y1-n.y0)}function fe(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=G(d),h=n.length,f=n.map(m=>m.normalizedValue||0).reduce((m,k)=>m+k,0),p=f/u,C=f/s;let b=i,w=v;const g=[];if(s>=u){for(let m=0;m<h;m+=1){const k=n[m],x=w+k.normalizedValue/p,B={x0:b,y0:w,x1:b+p,y1:x},$=Object.assign({},k,B);w=x,g.push($)}return g}else{for(let m=0;m<h;m+=1){const k=n[m],x=b+k.normalizedValue/C,B={x0:b,y0:w,x1:x,y1:w+C},$=Object.assign({},k,B);b=x,g.push($)}return g}}function Re(n){const d=G(n),s=d.width,u=d.height;return Math.min(s,u)}function Fe(n,d){const s=n.length,u=n.map(p=>p.value??0).reduce((p,C)=>p+C,0),i=d/u,v=[];let h,f;for(let p=0;p<s;p+=1)f=n[p],h=Object.assign({},f,{normalizedValue:f.value*(i||0)}),v.push(h);return v}function G(n){const{x0:d,y0:s,x1:u,y1:i}=n;return{xOffset:d,yOffset:s,width:u-d,height:i-s}}function Ie(n,d,s,u){let i=n,v=d,h=s,f=u;for(;;){const p=i.length;if(p===0){const g=fe(v,h);return f.concat(g)}const C=Re(h),b=i[0],w=i.slice(1,p);if(Oe(v,b,C)){const g=v.concat(b);i=w,v=g,h=h,f=f}else{const g=v.length;let m=0;for(let $=0;$<g;$+=1)m+=v[$].normalizedValue;const k=De(h,m),x=fe(v,h),B=f.concat(x);i=i,v=[],h=k,f=B}}}function ge(n){if(typeof n.children>"u"||!n.children.length)return[n];{const d=Fe(n.children,Le(n)),s=Ie(d,[],n,[]),u=s.length,i=[];for(let h=0;h<u;h+=1)i.push(ge(s[h]));return Ee(i)}}function De(n,d){const{width:s,height:u,xOffset:i,yOffset:v}=G(n);if(s>=u){const h=d/u,f=s-h,p={xOffset:i+h,yOffset:v,width:f,height:u};return pe(p)}else{const h=d/s,f=u-h,p={xOffset:i,yOffset:v+h,width:s,height:f};return pe(p)}}const qe=n=>(e.pushScopeId("data-v-440c85e2"),n=n(),e.popScopeId(),n),Ae=["id"],He=["xmlns","viewBox"],Me={key:0},We=["id"],Ue=["stop-color"],Ge=["stop-color"],je=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],Xe=["x","y","height","width"],Ye={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},Ze=qe(()=>e.createElementVNode("br",null,null,-1)),Je={key:3,class:"vue-data-ui-watermark"},Ke=["onClick"],Qe={key:0},et={key:1},tt=["innerHTML"],lt={__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:i}=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),g=e.ref([]),m=e.ref(null),k=e.ref(null),x=e.ref(null),B=e.ref(0),$=e.ref(0),j=e.ref(0),t=e.computed({get:()=>X(),set:l=>l});function X(){const l=ve.useNestedProp({userConfig:u.config,defaultConfig:i});return l.theme?{...ve.useNestedProp({userConfig:r.themes.vue_ui_treemap[l.theme]||u.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>u.config,l=>{t.value=X(),B.value+=1,$.value+=1,j.value+=1},{deep:!0});const{isPrinting:Y,isImaging:Z,generatePdf:J,generateImage:K}=ce.usePrinter({elementId:`treemap_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),D=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),_=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),z=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width}),O=e.computed(()=>({bottom:z.value.height-t.value.style.chart.padding.bottom,height:z.value.height-t.value.style.chart.padding.top-t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:z.value.width-t.value.style.chart.padding.right,top:t.value.style.chart.padding.top,vbHeight:z.value.height,vbWidth:z.value.width,width:z.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right}));function Q(l){l.forEach((a,o)=>{a.id=r.createUid(),a.color=r.convertColorToHex(a.color)||D.value[o]||r.palette[o]||r.palette[o%r.palette.length],a.children&&(a.children.forEach(c=>{c.parentId=a.id,c.color=a.color}),Q(a.children))})}const E=e.ref(u.dataset),q=e.ref(null);e.onMounted(()=>{me()});function me(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),Q(E.value),t.value.responsive){const l=de.throttle(()=>{const{width:a,height:o}=de.useResponsive({chart:m.value,title:t.value.style.chart.title.text?k.value:null,legend:t.value.style.chart.legend.show?x.value:null});z.value.width=a,z.value.height=o});q.value=new ResizeObserver(l),q.value.observe(m.value.parentNode)}}e.onBeforeUnmount(()=>{q.value&&q.value.disconnect()});const M=e.ref(E.value),F=e.computed(()=>M.value.map((l,a)=>({...l,color:r.convertColorToHex(l.color)||D.value[a]||r.palette[a]||r.palette[a%r.palette.length]})).filter(l=>!g.value.includes(l.id))),L=e.computed(()=>E.value.filter(l=>!g.value.includes(l.id)).map(l=>l.value||0).reduce((l,a)=>l+a,0)),ee=e.computed({get(){let l=[...F.value];return t.value.style.chart.layout.sorted&&(l=[...F.value].sort((a,o)=>o.value-a.value)),l.map(a=>({...a}))},set(l){return l}});function te(l,a){return l.value/a}function ye(l,a,o){const c=t.value.style.chart.layout.rects.colorRatio-te(a,o);return r.lightenHexColor(l,c<0?0:c)}function le(l,a,o,c){return l.map((y,P)=>{const H=ye(r.convertColorToHex(a)||D.value[P]||r.palette[P]||r.palette[P%r.palette.length],y,c),$e=te(y,c);return{...y,color:H,proportion:$e,parentName:o,children:y.children?le(y.children,H,y.name,c):void 0}})}const I=e.computed(()=>Ve(ee.value.map((l,a)=>{const o=l.children?l.children.reduce((c,y)=>c+y.value,0):l.value;return{value:l.value,id:l.id,children:l.children?le(l.children.sort((c,y)=>y.value-c.value),l.color,l.name,o):void 0,color:l.color,name:l.name}}),{x0:O.value.left*2,y0:O.value.top,x1:O.value.width,y1:O.value.height}));function oe({y0:l,y1:a}){return a-l<=0?1e-4:a-l}function ae({x0:l,x1:a}){return a-l<=0?1e-4:a-l}function V(l){const a=t.value.style.chart.layout.labels.fontSize*(l.proportion*2>1?1:l.proportion*2);return a<t.value.style.chart.layout.labels.minFontSize?t.value.style.chart.layout.labels.minFontSize:a}function be(l){b.value=l,w.value+=1}const R=e.computed(()=>({startX:0,startY:0,width:O.value.vbWidth,height:O.value.vbHeight})),T=e.ref(!1);function W(l,a=E.value){for(const o of a){if(o.id===l)return o;if(o.children){const c=W(l,o.children);if(c)return c}}return null}function ke(l){if(T.value)s("selectDatapoint",void 0),M.value=E.value;else{if(s("selectDatapoint",l),!W(l.parentId))return;M.value=[W(l.parentId)]}T.value=!T.value}const S=e.ref(null),ne=e.computed(()=>E.value.map((l,a)=>({...l,color:r.convertColorToHex(l.color)||D.value[a]||r.palette[a]||r.palette[a%r.palette.length],shape:"square"})).sort((l,a)=>a.value-l.value).map((l,a)=>({...l,proportion:l.value/E.value.map(o=>o.value).reduce((o,c)=>o+c,0),opacity:g.value.includes(l.id)?.5:1}))),Ce=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 re(l){T.value=!1,S.value=null,g.value.includes(l.id)?g.value=g.value.filter(a=>a!==l.id):g.value.length<u.dataset.length-1&&g.value.push(l.id),s("selectLegend",ee.value)}const U=e.ref(null);function we({datapoint:l,seriesIndex:a}){S.value=l,U.value={datapoint:l,seriesIndex:a,config:t.value,series:F.value};const o=t.value.style.chart.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:a,datapoint:l,series:F.value,config:t.value})))C.value=o({seriesIndex:a,datapoint:l,series:F.value,config:t.value});else{let c="";c+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,c+=`<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="${l.color}"/></svg>`,c+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.formatter,l.value,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.tooltip.roundingValue}),{datapoint:l,seriesIndex:a})}</b>`,C.value=`<div>${c}</div>`}p.value=!0}const N=e.computed(()=>{const l=I.value.map(o=>({name:o.name,color:o.color})),a=I.value.map(o=>o.value);return{head:l,body:a}});function ue(){e.nextTick(()=>{const l=N.value.head.map((c,y)=>[[c.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(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-treemap"})})}const A=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],a=N.value.head.map((y,P)=>{const H=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,N.value.body[P],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:N.value.body[P],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:y.color,name:y.name,shape:"square"},H,isNaN(N.value.body[P]/L.value)?"-":r.dataLabel({v:N.value.body[P]/L.value*100,s:"%",r: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};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:a,config:o}});function xe(){return I.value}function se(){_.value.showTable=!_.value.showTable}function ie(){_.value.showTooltip=!_.value.showTooltip}return d({getData:xe,generateCsv:ue,generateImage:K,generatePdf:J,toggleTable:se,toggleTooltip:ie}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:m,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.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:k,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Te._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(ce.UserOptions,{ref:"details",key:`user_option_${w.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(Y),isImaging:e.unref(Z),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:m.value,onToggleFullscreen:be,onGeneratePdf:e.unref(J),onGenerateCsv:ue,onGenerateImage:e.unref(K),onToggleTable:se,onToggleTooltip:ie},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:c})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:c})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("svg",{key:2,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:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(o,c)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",Me,[e.createElementVNode("radialGradient",{id:`tgrad_${o.id}`,gradientTransform:"translate(-1, -1.000001) scale(2, 2)"},[e.createElementVNode("stop",{offset:"18%","stop-color":o.color},null,8,Ue),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(o.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,Ge)],8,We)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.value,(o,c)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.x0,y:o.y0,height:oe(o),width:ae(o),fill:h.value?o.color:t.value.style.chart.layout.rects.gradient.show?`url(#tgrad_${o.id})`:o.color,rx:t.value.style.chart.layout.rects.borderRadius,stroke:S.value&&S.value.id===o.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":S.value&&S.value.id===o.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:y=>ke(o),onMouseenter:()=>we({datapoint:o,seriesIndex:c}),onMouseleave:a[0]||(a[0]=y=>{S.value=null,p.value=!1}),style:e.normalizeStyle(`opacity:${S.value?S.value.id===o.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:o.x0,y:o.y0,height:oe(o),width:ae(o),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",Ye,[t.value.style.chart.layout.labels.showDefaultLabels&&(o.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% - ${V(o)/1.5}px);text-align:left;line-height:${V(o)<14?14:V(o)}px;padding:${V(o)/3}px; color:${e.unref(r.adaptColorToBackground)(o.color)}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${V(o)}px;`)},e.toDisplayString(o.name),5),Ze,e.createElementVNode("span",{style:e.normalizeStyle(`width:100%;font-size:${V(o)}px;`)},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,o.value,e.unref(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.layout.labels.rounding}),{datapoint:o})),5)],4)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"rect",e.normalizeProps(e.guardReactiveProps({rect:o,shouldShow:o.proportion>t.value.style.chart.layout.labels.hideUnderProportion||T.value,fontSize:V(o),isZoom:T.value,textColor:e.unref(r.adaptColorToBackground)(o.color)})),void 0,!0)])],8,Xe))]))),256)),e.renderSlot(l.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:O.value,isZoom:T.value,rect:S.value,config:t.value})),void 0,!0)],14,He)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Je,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(Z)})),void 0,!0)])):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Be.default,{key:4,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(Ne.Legend,{key:`legend_${j.value}`,legendSet:ne.value,config:Ce.value,id:`treemap_legend_${f.value}`,onClickMarker:a[1]||(a[1]=({legend:o})=>re(o))},{item:e.withCtx(({legend:o,index:c})=>[e.createElementVNode("div",{onClick:y=>re(o),style:e.normalizeStyle(`opacity:${g.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.formatter,o.value,e.unref(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.legend.roundingValue}),{datapoint:o}))+" ",1),g.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",et," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Qe," ("+e.toDisplayString(isNaN(o.value/L.value)?"-":(o.value/L.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,Ke)]),_:1},8,["legendSet","config","id"])):e.renderSlot(l.$slots,"legend",{key:1,legend:ne.value},void 0,!0)],512),e.createVNode(Se._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:m.value,content:C.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...U.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...U.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(ze.default,{key:5,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(_e.DataTable,{key:`table_${$.value}`,colNames:A.value.colNames,head:A.value.head,body:A.value.body,config:A.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=>_.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,tt)]),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)],14,Ae))}},ot=Pe._export_sfc(lt,[["__scopeId","data-v-440c85e2"]]);exports.default=ot;
|