vue-data-ui 2.6.29 → 2.6.31
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-Cc5-mdWT.cjs → Arrow-DlzoZbyy.cjs} +1 -1
- package/dist/{Arrow-B0z5z_VO.js → Arrow-P8JQ180M.js} +1 -1
- package/dist/{BaseIcon-BdZtuovW.js → BaseIcon-AmoKryXo.js} +1 -1
- package/dist/{BaseIcon-5W5V7roT.cjs → BaseIcon-q0bEOOzl.cjs} +1 -1
- package/dist/{DataTable-C2vZFP5z.js → DataTable-B4YF6guk.js} +2 -2
- package/dist/{DataTable-BNWwFOV4.cjs → DataTable-DL8_xKlk.cjs} +1 -1
- package/dist/{Legend-DHq9W83h.js → Legend-BMXzxIhA.js} +2 -2
- package/dist/{Legend-Ctes5ppf.cjs → Legend-tU5gqFrZ.cjs} +1 -1
- package/dist/{PackageVersion-B0quzSF4.cjs → PackageVersion-DHtx9fnE.cjs} +1 -1
- package/dist/{PackageVersion-DNlw7bFD.js → PackageVersion-DcMafJMi.js} +1 -1
- package/dist/{PenAndPaper-DvHA5IKH.cjs → PenAndPaper-DPoMEHE6.cjs} +1 -1
- package/dist/{PenAndPaper-DyuAJ4h_.js → PenAndPaper-ljJaW1FE.js} +3 -3
- package/dist/{PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-DUjJeHez.cjs → PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-B-psJjxF.cjs} +1 -1
- package/dist/{PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-BiLXusIM.js → PenAndPaper.vue_vue_type_style_index_0_scoped_3cea7589_lang-CF1vjG1v.js} +3 -3
- package/dist/{Shape-CtNgK9wE.js → Shape-Bs9E3f4-.js} +1 -1
- package/dist/{Shape-BvU3Ai7c.cjs → Shape-C_rBdSHr.cjs} +1 -1
- package/dist/{Slicer-ydrXx0Yy.cjs → Slicer-9-SDSvre.cjs} +1 -1
- package/dist/{Slicer-ClPl3HhX.js → Slicer-qokIr-TL.js} +2 -2
- package/dist/{Title-BzpoFNbW.js → Title-BwZtefYd.js} +1 -1
- package/dist/{Title-CSIfEX6Y.cjs → Title-CsERtJKI.cjs} +1 -1
- package/dist/{Tooltip-BanSNN1E.cjs → Tooltip-C06-4zGf.cjs} +1 -1
- package/dist/{Tooltip-COsfmesa.js → Tooltip-eCCz9HFo.js} +1 -1
- package/dist/{index-MpPojsyO.js → index-CHWA6Lnw.js} +3 -1
- package/dist/index-_gyicZFE.cjs +9 -0
- package/dist/llms.txt +232 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +2 -0
- package/dist/types/vue-data-ui.d.ts +2 -0
- package/dist/{useNestedProp-C3k1eZp3.cjs → useNestedProp-BJQoarHp.cjs} +1 -1
- package/dist/{useNestedProp-COOh5VgD.js → useNestedProp-ByBiJC9_.js} +1 -1
- package/dist/{usePrinter-C3L9Sy8a.cjs → usePrinter-BRTNfg7r.cjs} +1 -1
- package/dist/{usePrinter-BRM9AtPW.js → usePrinter-DibtVl2x.js} +1 -1
- package/dist/{vue-data-ui-CbA9pJio.js → vue-data-ui-JGaDyjOa.js} +61 -61
- package/dist/{vue-data-ui-BMDZH4fq.cjs → vue-data-ui-NwBkWKwf.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CFxp2SCt.cjs → vue-ui-3d-bar-DbmbJ68T.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-Cnbv9qgI.js → vue-ui-3d-bar-nYsGYklC.js} +9 -9
- package/dist/{vue-ui-accordion-CfWb_o5i.cjs → vue-ui-accordion-8mzPx86h.cjs} +1 -1
- package/dist/{vue-ui-accordion-B-1aLe1z.js → vue-ui-accordion-gHGrRoVr.js} +3 -3
- package/dist/{vue-ui-age-pyramid-2aYW6XXy.js → vue-ui-age-pyramid-BpGOmhzz.js} +10 -10
- package/dist/{vue-ui-age-pyramid-CJSjvTq5.cjs → vue-ui-age-pyramid-DLRaoIRm.cjs} +1 -1
- package/dist/{vue-ui-annotator-B7zcrWte.js → vue-ui-annotator-CjM5ctaG.js} +1 -1
- package/dist/{vue-ui-annotator-_exQcPLw.cjs → vue-ui-annotator-DhJ0ivNn.cjs} +1 -1
- package/dist/{vue-ui-bullet-CsKr0Gbw.js → vue-ui-bullet-DJvBVKjg.js} +8 -8
- package/dist/{vue-ui-bullet-DDjwx0R3.cjs → vue-ui-bullet-R702Xv5R.cjs} +1 -1
- package/dist/{vue-ui-candlestick-z0N4X9fX.js → vue-ui-candlestick-5cmDQiwo.js} +11 -11
- package/dist/{vue-ui-candlestick-C-ye8ouC.cjs → vue-ui-candlestick-DCBBy4C8.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-CuBG9Mb1.cjs → vue-ui-carousel-table-CkGU0B6s.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BJOaMjAe.js → vue-ui-carousel-table-meUcOS-A.js} +4 -4
- package/dist/{vue-ui-chestnut-D-K1WM5o.cjs → vue-ui-chestnut-C-GeGI6H.cjs} +1 -1
- package/dist/{vue-ui-chestnut-BCo_Bu6L.js → vue-ui-chestnut-C6DlvXs9.js} +8 -8
- package/dist/{vue-ui-circle-pack-DPnaetJC.js → vue-ui-circle-pack-3zIDTUNF.js} +9 -9
- package/dist/{vue-ui-circle-pack-DtFpGGhw.cjs → vue-ui-circle-pack-mZPZZ3IN.cjs} +1 -1
- package/dist/{vue-ui-cursor-CjCbzS4O.js → vue-ui-cursor-B-mv_xEC.js} +2 -2
- package/dist/{vue-ui-cursor-D7wYByvs.cjs → vue-ui-cursor-DOTfG9P-.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DRUBWbuu.cjs → vue-ui-dashboard-BLKM20n8.cjs} +1 -1
- package/dist/{vue-ui-dashboard-C74rE5xX.js → vue-ui-dashboard-i5ysWN1s.js} +2 -2
- package/dist/{vue-ui-digits-DIRnB2Ma.cjs → vue-ui-digits-B-LNRFDc.cjs} +1 -1
- package/dist/{vue-ui-digits-DXaAZ6fS.js → vue-ui-digits-B8crXGKw.js} +2 -2
- package/dist/{vue-ui-donut-Ckx0tTPo.cjs → vue-ui-donut-CdhiYoyd.cjs} +1 -1
- package/dist/{vue-ui-donut-DWnpA8JM.js → vue-ui-donut-_RwrFzJe.js} +12 -12
- package/dist/{vue-ui-donut-evolution-D2xCEuZD.cjs → vue-ui-donut-evolution-Byaufydi.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-BBU5J-VI.js → vue-ui-donut-evolution-BynR7yrN.js} +11 -11
- package/dist/{vue-ui-dumbbell-B-InxxMw.cjs → vue-ui-dumbbell-B5z4t3b-.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-C2_W_ZGm.js → vue-ui-dumbbell-o86706ds.js} +10 -10
- package/dist/{vue-ui-flow-Br-2AaIC.js → vue-ui-flow-BkjQ5DxV.js} +9 -9
- package/dist/{vue-ui-flow-HQzOZx9P.cjs → vue-ui-flow-DepnWmwK.cjs} +1 -1
- package/dist/{vue-ui-funnel-CKf6Q1Rd.cjs → vue-ui-funnel-CoyfIA1Y.cjs} +1 -1
- package/dist/{vue-ui-funnel-CYX5THxQ.js → vue-ui-funnel-Dj7-Wzf2.js} +9 -9
- package/dist/{vue-ui-galaxy-DCzuNJZO.cjs → vue-ui-galaxy-DOzFYtp0.cjs} +1 -1
- package/dist/{vue-ui-galaxy-FmztrzLG.js → vue-ui-galaxy-n9zXvOd-.js} +11 -11
- package/dist/{vue-ui-gauge-DV2LKsLI.js → vue-ui-gauge-BPpaze3S.js} +7 -7
- package/dist/{vue-ui-gauge-x75Ovwuq.cjs → vue-ui-gauge-DrTs5UqB.cjs} +1 -1
- package/dist/{vue-ui-gizmo-Cbk4auek.js → vue-ui-gizmo-CTmN8V32.js} +3 -3
- package/dist/{vue-ui-gizmo-vOw8ZIwS.cjs → vue-ui-gizmo-DJxRFhVW.cjs} +1 -1
- package/dist/{vue-ui-heatmap-NEesMWIK.cjs → vue-ui-heatmap-JYG2Pn3A.cjs} +1 -1
- package/dist/{vue-ui-heatmap-CSEPwylo.js → vue-ui-heatmap-ljQkIdZn.js} +10 -10
- package/dist/{vue-ui-history-plot-Bveb3FiK.js → vue-ui-history-plot-CQx5XlN1.js} +11 -11
- package/dist/{vue-ui-history-plot-B0tCUQLV.cjs → vue-ui-history-plot-Ul0TT4Wf.cjs} +1 -1
- package/dist/{vue-ui-kpi-DKQTizBy.cjs → vue-ui-kpi--LMVG67F.cjs} +1 -1
- package/dist/{vue-ui-kpi-CnwUJjgc.js → vue-ui-kpi-BfCuGNby.js} +3 -3
- package/dist/{vue-ui-mini-loader-DeWB4l-Y.js → vue-ui-mini-loader-BqpELr7O.js} +2 -2
- package/dist/{vue-ui-mini-loader-Bxm4x_KC.cjs → vue-ui-mini-loader-cJg8IvUw.cjs} +1 -1
- package/dist/{vue-ui-molecule-Dfd4MZ59.js → vue-ui-molecule-Bv_Pe_8Q.js} +10 -10
- package/dist/{vue-ui-molecule-D_meQeUo.cjs → vue-ui-molecule-YDA7UdtF.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-Bl-wi7lG.js → vue-ui-mood-radar-CcykgM0n.js} +11 -11
- package/dist/{vue-ui-mood-radar-GpaM_WzS.cjs → vue-ui-mood-radar-hKh_tnq2.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-CLwBFkxI.js → vue-ui-nested-donuts-BWcLao-y.js} +11 -11
- package/dist/{vue-ui-nested-donuts-L6WdkRHD.cjs → vue-ui-nested-donuts-Cix5WlV9.cjs} +1 -1
- package/dist/{vue-ui-onion-DTAoZoGJ.cjs → vue-ui-onion-Cgo2ZVwO.cjs} +1 -1
- package/dist/{vue-ui-onion-Dr0DxYti.js → vue-ui-onion-D6iR8PW6.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-CWbYZRrB.cjs → vue-ui-parallel-coordinate-plot-Bm-oID-Y.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-mhDv1UOP.js → vue-ui-parallel-coordinate-plot-DEE9ou_Q.js} +12 -12
- package/dist/{vue-ui-quadrant-QYR0ptv-.js → vue-ui-quadrant-CZQJGEbA.js} +12 -12
- package/dist/{vue-ui-quadrant-WByWYKYR.cjs → vue-ui-quadrant-DhSD6jGf.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BWhOv1-7.js → vue-ui-quick-chart-BX3hOGEG.js} +383 -379
- package/dist/vue-ui-quick-chart-GTYfOv6C.cjs +15 -0
- package/dist/{vue-ui-radar-STKzXt8W.js → vue-ui-radar-BIGFuJe_.js} +12 -12
- package/dist/{vue-ui-radar-DzHmss2q.cjs → vue-ui-radar-CRhU6BWh.cjs} +1 -1
- package/dist/{vue-ui-rating-rDskdGOZ.cjs → vue-ui-rating-BSGT8Rew.cjs} +1 -1
- package/dist/{vue-ui-rating-DnuB79Hc.js → vue-ui-rating-CSR7_gV-.js} +2 -2
- package/dist/{vue-ui-relation-circle-BvUdpdUW.js → vue-ui-relation-circle-JEjpgv8I.js} +7 -7
- package/dist/{vue-ui-relation-circle-CT1tfb53.cjs → vue-ui-relation-circle-tZFvSMa1.cjs} +1 -1
- package/dist/{vue-ui-rings-Cdp3bA6k.cjs → vue-ui-rings-C-i8ANyb.cjs} +1 -1
- package/dist/{vue-ui-rings-CoRv8cLM.js → vue-ui-rings-DoNQjBvE.js} +12 -12
- package/dist/{vue-ui-scatter-BBLGN8Mn.js → vue-ui-scatter-CW2fwwda.js} +12 -12
- package/dist/{vue-ui-scatter-DgQjhowR.cjs → vue-ui-scatter-_WWbvZen.cjs} +1 -1
- package/dist/{vue-ui-screenshot-D73U26fC.js → vue-ui-screenshot-B95FU-Gc.js} +1 -1
- package/dist/{vue-ui-screenshot-C543ziE_.cjs → vue-ui-screenshot-DfIuMlBS.cjs} +1 -1
- package/dist/{vue-ui-skeleton-BSd6A4gJ.js → vue-ui-skeleton-BSUFPx4a.js} +3 -3
- package/dist/{vue-ui-skeleton-BmVoWkYO.cjs → vue-ui-skeleton-KlT3Rmkn.cjs} +1 -1
- package/dist/{vue-ui-smiley-Dxros8A_.cjs → vue-ui-smiley-CfLGqmi5.cjs} +1 -1
- package/dist/{vue-ui-smiley-DemPwemd.js → vue-ui-smiley-qDBRPyDQ.js} +2 -2
- package/dist/{vue-ui-spark-trend-C1H2ajOo.js → vue-ui-spark-trend-BSpnjX1o.js} +5 -5
- package/dist/{vue-ui-spark-trend-BKLGQ8Dc.cjs → vue-ui-spark-trend-S4a2SDhB.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-CNp03-qo.cjs → vue-ui-sparkbar-CTLSRwph.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-B4GPU-C-.js → vue-ui-sparkbar-CrTC1o2D.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DEt750g5.cjs → vue-ui-sparkgauge-CEOGh__Q.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-D0sL36kf.js → vue-ui-sparkgauge-CXN-HNq2.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-B7cSzNt6.js → vue-ui-sparkhistogram-B_lhpWvH.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-R3o5VB6i.cjs → vue-ui-sparkhistogram-p7VmC6Jh.cjs} +1 -1
- package/dist/{vue-ui-sparkline-xon0fyhV.js → vue-ui-sparkline-D9ETPDKl.js} +4 -4
- package/dist/{vue-ui-sparkline-CS37nAVb.cjs → vue-ui-sparkline-FWL-fTwQ.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-CbFhWrCb.cjs → vue-ui-sparkstackbar-DtWHuAGZ.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BJwj_BTC.js → vue-ui-sparkstackbar-QxbvlLet.js} +5 -5
- package/dist/{vue-ui-stackbar-D6Hg9U89.cjs → vue-ui-stackbar-CnXEfFH0.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DMIcmwUS.js → vue-ui-stackbar-lsjnigfJ.js} +13 -13
- package/dist/{vue-ui-strip-plot-BEheY0-i.cjs → vue-ui-strip-plot-D-wDSHF4.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-DDH7HHeb.js → vue-ui-strip-plot-D39kSpeQ.js} +11 -11
- package/dist/{vue-ui-table-DKyhJldD.cjs → vue-ui-table-C4ViP9oJ.cjs} +1 -1
- package/dist/{vue-ui-table-BpayQH5c.js → vue-ui-table-h-SNgy2Q.js} +1 -1
- package/dist/{vue-ui-table-heatmap-D3xHOMd7.cjs → vue-ui-table-heatmap-CeEQjHdT.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-B7n9HGmF.js → vue-ui-table-heatmap-ClhJSmyw.js} +4 -4
- package/dist/{vue-ui-table-sparkline-CZh90m4f.cjs → vue-ui-table-sparkline-DLt4efL6.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CbYMkzFo.js → vue-ui-table-sparkline-RFOlGtum.js} +5 -5
- package/dist/{vue-ui-thermometer-DpwibDz-.cjs → vue-ui-thermometer-C9H37a-g.cjs} +1 -1
- package/dist/{vue-ui-thermometer-jEknhXqX.js → vue-ui-thermometer-CE6mLojO.js} +7 -7
- package/dist/{vue-ui-timer-DZyyNhPm.cjs → vue-ui-timer-BCnbpogm.cjs} +1 -1
- package/dist/{vue-ui-timer-DExfJT7b.js → vue-ui-timer-Bdq6_32v.js} +5 -5
- package/dist/{vue-ui-tiremarks-djpykwxW.js → vue-ui-tiremarks-CaqziySq.js} +7 -7
- package/dist/{vue-ui-tiremarks-DRpjUX74.cjs → vue-ui-tiremarks-CdOzGAzN.cjs} +1 -1
- package/dist/{vue-ui-treemap-Kpb_TUBo.cjs → vue-ui-treemap-BH7r2blb.cjs} +1 -1
- package/dist/{vue-ui-treemap-CnYfwkt5.js → vue-ui-treemap-fuhipZma.js} +11 -11
- package/dist/{vue-ui-vertical-bar-CbiVGX16.js → vue-ui-vertical-bar-ByHpElpA.js} +12 -12
- package/dist/{vue-ui-vertical-bar-C4q_SdFt.cjs → vue-ui-vertical-bar-DnUrxS2t.cjs} +1 -1
- package/dist/{vue-ui-waffle-Brix-cCW.cjs → vue-ui-waffle-CURVbAVs.cjs} +1 -1
- package/dist/{vue-ui-waffle-B2eqMbjr.js → vue-ui-waffle-D7Y55F5z.js} +12 -12
- package/dist/{vue-ui-wheel-BnscT7OQ.js → vue-ui-wheel-DjGKyAh5.js} +7 -7
- package/dist/{vue-ui-wheel-lRepxN2v.cjs → vue-ui-wheel-KCxiG6Xt.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-DTM-SssN.js → vue-ui-word-cloud-CVTb20DJ.js} +10 -10
- package/dist/{vue-ui-word-cloud-Dc2X3fT-.cjs → vue-ui-word-cloud-H0hw5gjm.cjs} +1 -1
- package/dist/{vue-ui-xy-DSn5UhO6.js → vue-ui-xy-C80BPN7E.js} +14 -14
- package/dist/{vue-ui-xy-CGnwcyVD.cjs → vue-ui-xy-DnsJUjcc.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-Do2Qiecs.js → vue-ui-xy-canvas-BEx7_7h7.js} +12 -12
- package/dist/{vue-ui-xy-canvas-C86uI-1X.cjs → vue-ui-xy-canvas-BcUjj3X8.cjs} +1 -1
- package/package.json +2 -2
- package/dist/index-CUVUtIL0.cjs +0 -9
- package/dist/vue-ui-quick-chart-15w_Vv7j.cjs +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-CUVUtIL0.cjs"),oe=require("./Title-CSIfEX6Y.cjs"),Y=require("./usePrinter-C3L9Sy8a.cjs"),re=require("./vue-ui-skeleton-BmVoWkYO.cjs"),z=require("./useNestedProp-C3k1eZp3.cjs"),le=require("./PackageVersion-B0quzSF4.cjs"),ae=require("./PenAndPaper-DvHA5IKH.cjs"),se=require("./useUserOptionState-BgepsfED.cjs"),ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},de={key:2,style:"width:100%"},he=["xmlns","viewBox"],ve=["width","height"],me={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},pe=["fill"],ye=["id"],fe=["stop-color"],ge=["stop-color"],ke=["stop-color"],be={"clip-path":"url(#vueUiPill)"},xe=["x","y","height","width"],Ce=["x","y","height","width","fill"],we=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Ee=["x1","x2","y1","y2","stroke-width","stroke"],$e=["x1","x2","y1","y2","stroke-width","stroke"],Fe=["x","y","height","width"],Oe=["y","x","fill","font-size","font-weight"],Ie={key:5,class:"vue-data-ui-watermark"},Se={key:6,ref:"source",dir:"auto"},qe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:L}){e.useCssVars(r=>({"81f57fe8":X.value,"0e444a02":D.value,"6100776f":j.value}));const{vue_ui_thermometer:G}=a.useConfig(),s=m,g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(r=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:r})})}const d=e.ref(a.createUid()),P=e.ref(null),V=e.ref(0),E=e.ref(0),t=e.computed({get:()=>I(),set:r=>r}),{userOptionsVisible:k,setUserOptionsVisibility:$,keepUserOptionState:F}=se.useUserOptionState({config:t.value}),{svgRef:O}=ne.useChartAccessibility({config:t.value.style.title});function I(){const r=z.useNestedProp({userConfig:s.config,defaultConfig:G});return r.theme?{...z.useNestedProp({userConfig:a.themes.vue_ui_thermometer[r.theme]||s.config,defaultConfig:r}),customPalette:a.themePalettes[r.theme]||a.palette}:r}e.watch(()=>s.config,r=>{t.value=I(),k.value=!t.value.userOptions.showOnChartHover,B(),E.value+=1},{deep:!0});const{isPrinting:S,isImaging:q,generatePdf:A,generateImage:T}=Y.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function y(r,n,o){const u=[],_=M(r),N=M(n);for(let v=0;v<o;v++){const Q=b(_.red,N.red,v,o),Z=b(_.green,N.green,v,o),ee=b(_.blue,N.blue,v,o),te=`#${x(Q)}${x(Z)}${x(ee)}`;u.push(te)}return u}function M(r){const n=r.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function b(r,n,o,u){return Math.round(r+(n-r)*o/u)}function x(r){return r.toString(16).padStart(2,"0")}const l=e.computed(()=>{const r=R.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:r,left:i.value.left,right:r-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>l.value),C=e.computed(()=>{const r=a.checkNaN(s.dataset.from)<0?Math.abs(a.checkNaN(s.dataset.from)):a.checkNaN(s.dataset.from),n=a.checkNaN(s.dataset.to)<0?Math.abs(a.checkNaN(s.dataset.to)):a.checkNaN(s.dataset.to);let o=0;return a.checkNaN(s.dataset.to)>0?o=r+n:r>n?o=r-n:o=n-r,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(l.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${C.value}px`),D=e.computed(()=>`${l.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),X=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),J=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return y(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return y(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return y(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),U=e.computed(()=>{const r=[];let n=0;const o=l.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)r.push({x:l.value.left,y:l.value.top+u,qYLess:l.value.top+u+o/c.value/4,halfY:l.value.top+u+o/c.value/2,qYMore:l.value.top+u+o/c.value/4*3,color:J.value[n],height:o/c.value}),n+=1;return r}),h=e.ref(!1);function K(r){h.value=r,V.value+=1}const f=e.ref(!1);function w(){f.value=!f.value}return L({generatePdf:A,generateImage:T,toggleAnnotator:w}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:P,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae.PenAndPaper,{key:0,svgRef:e.unref(O),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:w},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",ce,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&g.value&&(e.unref(F)||e.unref(k))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref:"details",key:`user_options_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:P.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:K,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(T),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[r.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(r.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(r.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:O,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),r.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,ve)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",me,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,pe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,fe),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ke)],8,ye))),256))]),e.createElementVNode("g",be,[e.createElementVNode("rect",{x:l.value.left,y:l.value.top,height:l.value.height-i.value.top-i.value.bottom,width:l.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,Ce),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,we)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,_e)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.value.right,x2:l.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ee)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,$e)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:l.value.left,y:l.value.top,height:C.value,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Fe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:C.value+l.value.top+t.value.style.chart.label.fontSize/3,x:l.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(a.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,Oe),e.renderSlot(r.$slots,"svg",{svg:W.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),r.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(r.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ie))}},Ae=ue._export_sfc(qe,[["__scopeId","data-v-b9d565e0"]]);exports.default=Ae;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-_gyicZFE.cjs"),oe=require("./Title-CsERtJKI.cjs"),Y=require("./usePrinter-BRTNfg7r.cjs"),re=require("./vue-ui-skeleton-KlT3Rmkn.cjs"),z=require("./useNestedProp-BJQoarHp.cjs"),le=require("./PackageVersion-DHtx9fnE.cjs"),ae=require("./PenAndPaper-DPoMEHE6.cjs"),se=require("./useUserOptionState-BgepsfED.cjs"),ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie=["id"],ce={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},de={key:2,style:"width:100%"},he=["xmlns","viewBox"],ve=["width","height"],me={id:"vueUiPill",clipPathUnits:"objectBoundingBox"},pe=["fill"],ye=["id"],fe=["stop-color"],ge=["stop-color"],ke=["stop-color"],be={"clip-path":"url(#vueUiPill)"},xe=["x","y","height","width"],Ce=["x","y","height","width","fill"],we=["x1","x2","y1","y2","stroke-width","stroke"],_e=["x1","x2","y1","y2","stroke-width","stroke"],Ne=["x1","x2","y1","y2","stroke-width","stroke"],Be=["x1","x2","y1","y2","stroke-width","stroke"],Pe=["x1","x2","y1","y2","stroke-width","stroke"],Ve=["x1","x2","y1","y2","stroke-width","stroke"],Ee=["x1","x2","y1","y2","stroke-width","stroke"],$e=["x1","x2","y1","y2","stroke-width","stroke"],Fe=["x","y","height","width"],Oe=["y","x","fill","font-size","font-weight"],Ie={key:5,class:"vue-data-ui-watermark"},Se={key:6,ref:"source",dir:"auto"},qe={__name:"vue-ui-thermometer",props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},setup(m,{expose:L}){e.useCssVars(r=>({"81f57fe8":X.value,"0e444a02":D.value,"6100776f":j.value}));const{vue_ui_thermometer:G}=a.useConfig(),s=m,g=e.computed(()=>!!s.dataset&&Object.keys(s.dataset).length);e.onMounted(()=>{B()});function B(){a.objectIsEmpty(s.dataset)?a.error({componentName:"VueUiThermometer",type:"dataset"}):a.getMissingDatasetAttributes({datasetObject:s.dataset,requiredAttributes:["value","from","to"]}).forEach(r=>{a.error({componentName:"VueUiThermometer",type:"datasetAttribute",property:r})})}const d=e.ref(a.createUid()),P=e.ref(null),V=e.ref(0),E=e.ref(0),t=e.computed({get:()=>I(),set:r=>r}),{userOptionsVisible:k,setUserOptionsVisibility:$,keepUserOptionState:F}=se.useUserOptionState({config:t.value}),{svgRef:O}=ne.useChartAccessibility({config:t.value.style.title});function I(){const r=z.useNestedProp({userConfig:s.config,defaultConfig:G});return r.theme?{...z.useNestedProp({userConfig:a.themes.vue_ui_thermometer[r.theme]||s.config,defaultConfig:r}),customPalette:a.themePalettes[r.theme]||a.palette}:r}e.watch(()=>s.config,r=>{t.value=I(),k.value=!t.value.userOptions.showOnChartHover,B(),E.value+=1},{deep:!0});const{isPrinting:S,isImaging:q,generatePdf:A,generateImage:T}=Y.usePrinter({elementId:`thermometer__${d.value}`,fileName:t.value.style.title.text||"vue-ui-thermometer"}),H=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.computed(()=>a.convertCustomPalette(t.value.customPalette)),R=e.computed(()=>t.value.style.chart.thermometer.width),c=e.computed(()=>s.dataset.steps||10),i=e.ref({top:t.value.style.chart.padding.top,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right,bottom:t.value.style.chart.padding.bottom});function y(r,n,o){const u=[],_=M(r),N=M(n);for(let v=0;v<o;v++){const Q=b(_.red,N.red,v,o),Z=b(_.green,N.green,v,o),ee=b(_.blue,N.blue,v,o),te=`#${x(Q)}${x(Z)}${x(ee)}`;u.push(te)}return u}function M(r){const n=r.slice(1);return{red:parseInt(n.slice(0,2),16),green:parseInt(n.slice(2,4),16),blue:parseInt(n.slice(4,6),16)}}function b(r,n,o,u){return Math.round(r+(n-r)*o/u)}function x(r){return r.toString(16).padStart(2,"0")}const l=e.computed(()=>{const r=R.value+i.value.left+i.value.right,n=t.value.style.chart.height;return{width:r,left:i.value.left,right:r-i.value.right,top:i.value.top,bottom:n-i.value.bottom,height:n}}),W=e.computed(()=>l.value),C=e.computed(()=>{const r=a.checkNaN(s.dataset.from)<0?Math.abs(a.checkNaN(s.dataset.from)):a.checkNaN(s.dataset.from),n=a.checkNaN(s.dataset.to)<0?Math.abs(a.checkNaN(s.dataset.to)):a.checkNaN(s.dataset.to);let o=0;return a.checkNaN(s.dataset.to)>0?o=r+n:r>n?o=r-n:o=n-r,(1-(Math.abs(a.checkNaN(s.dataset.from))+a.checkNaN(s.dataset.value))/o)*(l.value.height-i.value.top-i.value.bottom)}),j=e.computed(()=>`${C.value}px`),D=e.computed(()=>`${l.value.height-t.value.style.chart.padding.bottom-i.value.top}px`),X=e.computed(()=>`${t.value.style.chart.animation.speedMs}ms`),J=e.computed(()=>{if(s.dataset.colors){if(!s.dataset.colors.from)return y(p.value[0]||a.palette[0],a.convertColorToHex(s.dataset.colors.to),c.value||10);if(!s.dataset.colors.to)return y(a.convertColorToHex(s.dataset.colors.from),p.value[1]||a.palette[1],c.value||10)}else return y(p.value[1]||a.palette[1],p.value[0]||a.palette[0],c.value||10);return y(a.convertColorToHex(s.dataset.colors.from),a.convertColorToHex(s.dataset.colors.to),c.value||10)}),U=e.computed(()=>{const r=[];let n=0;const o=l.value.height-i.value.top-i.value.bottom;for(let u=0;u<o-1;u+=o/c.value)r.push({x:l.value.left,y:l.value.top+u,qYLess:l.value.top+u+o/c.value/4,halfY:l.value.top+u+o/c.value/2,qYMore:l.value.top+u+o/c.value/4*3,color:J.value[n],height:o/c.value}),n+=1;return r}),h=e.ref(!1);function K(r){h.value=r,V.value+=1}const f=e.ref(!1);function w(){f.value=!f.value}return L({generatePdf:A,generateImage:T,toggleAnnotator:w}),(r,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"thermoChart",ref:P,class:e.normalizeClass(`vue-ui-thermometer ${h.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};font-family:${t.value.style.fontFamily}`),id:`thermometer__${d.value}`,onMouseenter:n[0]||(n[0]=()=>e.unref($)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref($)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ae.PenAndPaper,{key:0,svgRef:e.unref(O),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:f.value,onClose:w},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),H.value?(e.openBlock(),e.createElementBlock("div",ce,null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"thermometer-div-title",...t.value.style.title},subtitle:{cy:"thermometer-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&g.value&&(e.unref(F)||e.unref(k))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref:"details",key:`user_options_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(q),isPrinting:e.unref(S),uid:d.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasFullscreen:t.value.userOptions.buttons.fullscreen,hasXls:!1,isFullscreen:h.value,titles:{...t.value.userOptions.buttonTitles},chartElement:P.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:f.value,onToggleFullscreen:K,onGeneratePdf:e.unref(A),onGenerateImage:e.unref(T),onToggleAnnotator:w,style:e.normalizeStyle({visibility:e.unref(F)?e.unref(k)?"visible":"hidden":"visible"})},e.createSlots({_:2},[r.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:u})=>[e.renderSlot(r.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:u})),void 0,!0)]),key:"0"}:void 0,r.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,r.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(r.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,r.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:u})=>[e.renderSlot(r.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:u})),void 0,!0)]),key:"3"}:void 0,r.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:u})=>[e.renderSlot(r.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:u})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:O,xmlns:e.unref(a.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":h.value,"vue-data-ui-fulscreen--off":!h.value}),width:"100%",viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:"background:transparent"},[e.createVNode(le._sfc_main),r.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(r.$slots,"chart-background",{},void 0,!0)],8,ve)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",me,[e.createElementVNode("rect",{x:"0",y:"0",width:"1",height:"1",rx:"0.5",ry:"0.07",fill:t.value.style.chart.backgroundColor},null,8,pe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("linearGradient",{id:`vueUiThermometerGradient_${u}_${d.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":o.color},null,8,fe),e.createElementVNode("stop",{offset:"50%","stop-color":e.unref(a.setOpacity)(o.color,100-t.value.style.chart.graduations.gradient.intensity)},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,ke)],8,ye))),256))]),e.createElementVNode("g",be,[e.createElementVNode("rect",{x:l.value.left,y:l.value.top,height:l.value.height-i.value.top-i.value.bottom,width:l.value.width-i.value.left-i.value.right,fill:"#FFFFFF"},null,8,xe),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,(o,u)=>(e.openBlock(),e.createElementBlock("g",{key:`graduation_${u}`},[e.createElementVNode("rect",{x:o.x,y:o.y,height:o.height,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:t.value.style.chart.graduations.gradient.show?`url(#vueUiThermometerGradient_${u}_${d.value})`:o.color,"shape-rendering":"crispEdges"},null,8,Ce),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,we)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x+5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,_e)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:o.x,x2:o.x+2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ne)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","left"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:o.x,x2:o.x+2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Be)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-10,y1:o.y,y2:o.y,"stroke-width":t.value.style.chart.graduations.strokeWidth,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Pe)):e.createCommentVNode("",!0),t.value.style.chart.graduations.showIntermediate?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.value.right,x2:l.value.right-5,y1:o.halfY,y2:o.halfY,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ve)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:1,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYLess,y2:o.qYLess,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,Ee)):e.createCommentVNode("",!0),t.value.style.chart.graduations.show&&["both","right"].includes(t.value.style.chart.graduations.sides)?(e.openBlock(),e.createElementBlock("line",{key:2,x1:l.value.right,x2:l.value.right-2.5,y1:o.qYMore,y2:o.qYMore,"stroke-width":t.value.style.chart.graduations.strokeWidth/2,stroke:t.value.style.chart.graduations.stroke,"stroke-linecap":"round"},null,8,$e)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("rect",{class:e.normalizeClass({"vue-ui-thermometer-temperature":t.value.style.chart.animation.use}),x:l.value.left,y:l.value.top,height:C.value,width:l.value.width-t.value.style.chart.padding.left-t.value.style.chart.padding.right,fill:"#FFFFFF66"},null,10,Fe)]),e.createElementVNode("text",{class:e.normalizeClass({"vue-ui-thermometer-temperature-value":t.value.style.chart.animation.use}),y:C.value+l.value.top+t.value.style.chart.label.fontSize/3,x:l.value.left-10,"text-anchor":"end",fill:t.value.style.chart.label.color,"font-size":t.value.style.chart.label.fontSize,"font-weight":t.value.style.chart.label.bold?"bold":"normal"},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.chart.label.formatter,m.dataset.value,e.unref(a.dataLabel)({p:t.value.style.chart.label.prefix,v:m.dataset.value,s:t.value.style.chart.label.suffix,r:t.value.style.chart.label.rounding}),{datapoint:m.dataset})),11,Oe),e.renderSlot(r.$slots,"svg",{svg:W.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),r.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ie,[e.renderSlot(r.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(q)})),void 0,!0)])):e.createCommentVNode("",!0),r.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(r.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re.default,{key:7,config:{type:"thermometer",style:{backgroundColor:t.value.style.chart.backgroundColor,thermometer:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ie))}},Ae=ue._export_sfc(qe,[["__scopeId","data-v-b9d565e0"]]);exports.default=Ae;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useCssVars as ke, computed as d, onMounted as be, ref as m, watch as xe, createElementBlock as u, openBlock as l, unref as h, normalizeStyle as te, normalizeClass as F, createBlock as I, createCommentVNode as i, createSlots as _e, withCtx as x, renderSlot as f, normalizeProps as O, guardReactiveProps as A, createVNode as we, createElementVNode as v, Fragment as M, renderList as se, toDisplayString as Ce } from "vue";
|
|
2
|
-
import { u as $e, o as Pe, e as oe, g as Fe, c as Ie, t as Oe, p as _, a as Ae, b as Me, v as g, d as U, X as Ue, s as Ye, i as Ne, f as Se } from "./index-
|
|
3
|
-
import { _ as Te } from "./Title-
|
|
4
|
-
import { u as qe, U as Le } from "./usePrinter-
|
|
5
|
-
import Ve from "./vue-ui-skeleton-
|
|
6
|
-
import { u as le } from "./useNestedProp-
|
|
7
|
-
import { _ as Ee } from "./PackageVersion-
|
|
8
|
-
import { P as Ge } from "./PenAndPaper-
|
|
2
|
+
import { u as $e, o as Pe, e as oe, g as Fe, c as Ie, t as Oe, p as _, a as Ae, b as Me, v as g, d as U, X as Ue, s as Ye, i as Ne, f as Se } from "./index-CHWA6Lnw.js";
|
|
3
|
+
import { _ as Te } from "./Title-BwZtefYd.js";
|
|
4
|
+
import { u as qe, U as Le } from "./usePrinter-DibtVl2x.js";
|
|
5
|
+
import Ve from "./vue-ui-skeleton-BSUFPx4a.js";
|
|
6
|
+
import { u as le } from "./useNestedProp-ByBiJC9_.js";
|
|
7
|
+
import { _ as Ee } from "./PackageVersion-DcMafJMi.js";
|
|
8
|
+
import { P as Ge } from "./PenAndPaper-ljJaW1FE.js";
|
|
9
9
|
import { u as We } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
10
|
import { u as je } from "./useChartAccessibility-BWojgys7.js";
|
|
11
11
|
import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./useNestedProp-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),j=require("./useNestedProp-BJQoarHp.cjs"),w=require("./index-_gyicZFE.cjs"),D=require("./useResponsive-N8jl0-aC.cjs"),B=require("./BaseIcon-q0bEOOzl.cjs"),O=require("./Title-CsERtJKI.cjs"),U=require("./PackageVersion-DHtx9fnE.cjs"),W=require("./useChartAccessibility-Cm7nkzTG.cjs"),G=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");class X{constructor(T,V,S,M=!0,h=!0){this.interval=V,this.elapsed=0,this.isPaused=!1;const g=`
|
|
2
2
|
let interval;
|
|
3
3
|
let elapsed = 0;
|
|
4
4
|
let paused = false;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ref as i, onMounted as Z, computed as z, onBeforeUnmount as ee, watch as te, createElementBlock as o, openBlock as l, normalizeStyle as p, createCommentVNode as d, createElementVNode as _, createBlock as ae, unref as se, createVNode as C, renderSlot as H, mergeProps as q, normalizeProps as W, guardReactiveProps as G, toDisplayString as le } from "vue";
|
|
2
|
-
import { u as oe } from "./useNestedProp-
|
|
3
|
-
import { u as re, c as ue, X as ie, F as V } from "./index-
|
|
2
|
+
import { u as oe } from "./useNestedProp-ByBiJC9_.js";
|
|
3
|
+
import { u as re, c as ue, X as ie, F as V } from "./index-CHWA6Lnw.js";
|
|
4
4
|
import { t as ne, u as ce } from "./useResponsive-vZgZwV-S.js";
|
|
5
|
-
import R from "./BaseIcon-
|
|
6
|
-
import { _ as de } from "./Title-
|
|
7
|
-
import { _ as he } from "./PackageVersion-
|
|
5
|
+
import R from "./BaseIcon-AmoKryXo.js";
|
|
6
|
+
import { _ as de } from "./Title-BwZtefYd.js";
|
|
7
|
+
import { _ as he } from "./PackageVersion-DcMafJMi.js";
|
|
8
8
|
import { u as ve } from "./useChartAccessibility-BWojgys7.js";
|
|
9
9
|
import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
class fe {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { computed as h, ref as b, watch as Z, onMounted as ce, createElementBlock as c, openBlock as s, unref as r, normalizeStyle as G, normalizeClass as L, createBlock as F, createCommentVNode as d, createSlots as ve, withCtx as x, renderSlot as y, normalizeProps as z, guardReactiveProps as S, createVNode as he, Fragment as ee, renderList as te, toDisplayString as de } from "vue";
|
|
2
|
-
import { u as ae } from "./useNestedProp-
|
|
3
|
-
import { u as fe, c as ge, a as ye, v as me, o as pe, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-
|
|
4
|
-
import { _ as $e } from "./Title-
|
|
5
|
-
import { u as we, U as Pe } from "./usePrinter-
|
|
6
|
-
import xe from "./vue-ui-skeleton-
|
|
7
|
-
import { _ as Oe } from "./PackageVersion-
|
|
8
|
-
import { P as Ae } from "./PenAndPaper-
|
|
2
|
+
import { u as ae } from "./useNestedProp-ByBiJC9_.js";
|
|
3
|
+
import { u as fe, c as ge, a as ye, v as me, o as pe, e as ke, w as oe, X as be, i as _e, f as Ce } from "./index-CHWA6Lnw.js";
|
|
4
|
+
import { _ as $e } from "./Title-BwZtefYd.js";
|
|
5
|
+
import { u as we, U as Pe } from "./usePrinter-DibtVl2x.js";
|
|
6
|
+
import xe from "./vue-ui-skeleton-BSUFPx4a.js";
|
|
7
|
+
import { _ as Oe } from "./PackageVersion-DcMafJMi.js";
|
|
8
|
+
import { P as Ae } from "./PenAndPaper-ljJaW1FE.js";
|
|
9
9
|
import { u as Ie } from "./useUserOptionState-BIvW1Kz7.js";
|
|
10
10
|
import { u as Fe } from "./useChartAccessibility-BWojgys7.js";
|
|
11
11
|
import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-C3k1eZp3.cjs"),c=require("./index-CUVUtIL0.cjs"),K=require("./Title-CSIfEX6Y.cjs"),j=require("./usePrinter-C3L9Sy8a.cjs"),Q=require("./vue-ui-skeleton-BmVoWkYO.cjs"),W=require("./PackageVersion-B0quzSF4.cjs"),Z=require("./PenAndPaper-DvHA5IKH.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:D}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),P=e.ref(c.createUid()),S=e.ref(null),X=e.ref(null),O=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:B,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value}),{svgRef:I}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),B.value=!t.value.userOptions.showOnChartHover,U(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:V,generatePdf:q,generateImage:T}=j.usePrinter({elementId:P.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?M(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{U()});function M(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function U(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),M(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return f.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),i=e.computed(()=>f.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),R=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/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-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,m=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${m-b}, ${h} ${m}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,m=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(m-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${m-b}, ${h} ${m}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,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 J(o){_.value=o,O.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:q,generateImage:T,toggleAnnotator:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:S,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;background:${t.value.style.chart.backgroundColor}`),id:P.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z.PenAndPaper,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(N)||e.unref(B))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${O.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(V),uid:P.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:S.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(T),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(B)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(W._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.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<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,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,s.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,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},me=oe._export_sfc(pe,[["__scopeId","data-v-0911c677"]]);exports.default=me;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),L=require("./useNestedProp-BJQoarHp.cjs"),c=require("./index-_gyicZFE.cjs"),K=require("./Title-CsERtJKI.cjs"),j=require("./usePrinter-BRTNfg7r.cjs"),Q=require("./vue-ui-skeleton-KlT3Rmkn.cjs"),W=require("./PackageVersion-DHtx9fnE.cjs"),Z=require("./PenAndPaper-DPoMEHE6.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./useChartAccessibility-Cm7nkzTG.cjs"),oe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:2,style:"width:100%;background:transparent;padding-bottom:12px"},re=["xmlns","viewBox"],ne=["width","height"],se={key:1},ue=["d","stroke-width","stroke"],ie={key:2},ce=["x1","y1","x2","y2","stroke-width","stroke"],ve=["x","y","font-size","fill","font-weight","text-anchor"],de={key:5,class:"vue-data-ui-watermark"},he={key:6,ref:"source",dir:"auto"},pe={__name:"vue-ui-tiremarks",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(G,{expose:H}){const{vue_ui_tiremarks:D}=c.useConfig(),v=G,$=e.computed(()=>!!v.dataset&&Object.keys(v.dataset).length),P=e.ref(c.createUid()),S=e.ref(null),X=e.ref(null),O=e.ref(0),A=e.ref(0),t=e.computed({get:()=>E(),set:o=>o}),{userOptionsVisible:B,setUserOptionsVisibility:z,keepUserOptionState:N}=ee.useUserOptionState({config:t.value}),{svgRef:I}=te.useChartAccessibility({config:t.value.style.chart.title});function E(){const o=L.useNestedProp({userConfig:v.config,defaultConfig:D});return o.theme?{...L.useNestedProp({userConfig:c.themes.vue_ui_tiremarks[o.theme]||v.config,defaultConfig:o})}:o}e.watch(()=>v.config,o=>{t.value=E(),B.value=!t.value.userOptions.showOnChartHover,U(),A.value+=1},{deep:!0});const{isPrinting:F,isImaging:V,generatePdf:q,generateImage:T}=j.usePrinter({elementId:P.value,fileName:t.value.style.chart.title.text||"vue-ui-tiremarks"}),Y=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),s=e.ref(t.value.style.chart.animation.use?0:c.checkNaN(v.dataset.percentage));e.watch(()=>v.dataset,o=>{t.value.style.chart.animation.use?M(o.percentage):s.value=o.percentage||0},{deep:!0}),e.onMounted(()=>{U()});function M(o){let n=t.value.style.chart.animation.speed;const a=Math.abs(o-s.value)/(n*120);function r(){s.value<o?s.value=Math.min(s.value+a,o):s.value>o&&(s.value=Math.max(s.value-a,o)),s.value!==o&&requestAnimationFrame(r)}r()}function U(){c.objectIsEmpty(v.dataset)&&c.error({componentName:"VueUiTiremarks",type:"dataset"}),M(v.dataset.percentage||0)}const f=e.computed(()=>t.value.style.chart.layout.display==="vertical"),u=e.computed(()=>{const o={top:48,left:64,right:64,bottom:48};return f.value?{top:t.value.style.chart.percentage.verticalPosition==="top"?o.top:3,left:3,right:3,bottom:t.value.style.chart.percentage.verticalPosition==="bottom"?o.bottom:3}:{top:0,bottom:0,left:t.value.style.chart.percentage.horizontalPosition==="left"?o.left:3,right:t.value.style.chart.percentage.horizontalPosition==="right"?o.right:10}}),C=e.computed(()=>Object.values(u.value).reduce((o,n)=>o+n,0)),l=e.computed(()=>({height:f.value?312:56,width:f.value?56:312})),i=e.computed(()=>f.value?{mark:(l.value.height-C.value)/100*.5,space:(l.value.height-C.value)/100*.5}:{mark:(l.value.width-C.value)/100*.5,space:(l.value.width-C.value)/100*.5}),R=e.computed(()=>{const o=[];for(let a=0;a<100;a+=1){const r=t.value.style.chart.layout.ticks.gradient.show?c.shiftHue(t.value.style.chart.layout.activeColor,a/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-a)*(l.value.width-u.value.left-u.value.right)/100/3:0,d=u.value.left+4+y,h=l.value.width-u.value.right-4-y,p=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,m=l.value.height-u.value.bottom-a*i.value.mark-a*i.value.space-i.value.mark,k=(h-d)/t.value.style.chart.layout.curveAngleX,b=t.value.style.chart.layout.curveAngleY*((1+a)/100);o.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p-b}, ${h-k} ${m-b}, ${h} ${m}`,color:r})}else{const y=t.value.style.chart.layout.crescendo?(100-a)*(l.value.height-u.value.top-u.value.bottom)/100/3:0,d=u.value.left+a*i.value.mark+a*i.value.space-i.value.mark,h=d,p=u.value.top+4+y,m=l.value.height-u.value.bottom-4-y,k=t.value.style.chart.layout.curveAngleY*((1+a)/100),b=(m-p)/t.value.style.chart.layout.curveAngleX;o.push({x1:d,x2:h,y1:p,y2:m,curve:`M ${d} ${p} C ${d+k} ${p+b}, ${h+k} ${m-b}, ${h} ${m}`,color:r})}}return o}),g=e.computed(()=>{let o,n,a;const r=t.value.style.chart.percentage.fontSize/3;return f.value?t.value.style.chart.percentage.verticalPosition==="top"?(o=l.value.width/2,n=u.value.top/2,a="middle"):t.value.style.chart.percentage.verticalPosition==="bottom"&&(o=l.value.width/2,n=l.value.height-u.value.bottom/2+r,a="middle"):t.value.style.chart.percentage.horizontalPosition==="left"?(o=4,n=l.value.height/2+r,a="start"):t.value.style.chart.percentage.horizontalPosition==="right"&&(o=l.value.width-u.value.right+8,n=l.value.height/2+r,a="start"),{x:o,y:n,textAnchor:a,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 J(o){_.value=o,O.value+=1}const w=e.ref(!1);function x(){w.value=!w.value}return H({generatePdf:q,generateImage:T,toggleAnnotator:x}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"tiremarksChart",ref:S,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;background:${t.value.style.chart.backgroundColor}`),id:P.value,onMouseenter:n[0]||(n[0]=()=>e.unref(z)(!0)),onMouseleave:n[1]||(n[1]=()=>e.unref(z)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Z.PenAndPaper,{key:0,svgRef:e.unref(I),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:x},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Y.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(),e.createBlock(K._sfc_main,{key:`title_${A.value}`,config:{title:{cy:"wheel-title",...t.value.style.chart.title},subtitle:{cy:"wheel-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&$.value&&(e.unref(N)||e.unref(B))?(e.openBlock(),e.createBlock(j.UserOptions,{ref:"details",key:`user_options_${O.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(V),uid:P.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:S.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:J,onGeneratePdf:e.unref(q),onGenerateImage:e.unref(T),onToggleAnnotator:x,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(B)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:r})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:r})),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.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),$.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:I,xmlns:e.unref(c.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":_.value,"vue-data-ui-fulscreen--off":!_.value}),viewBox:`0 0 ${l.value.width} ${l.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(W._sfc_main),o.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:l.value.width,height:l.value.height,style:{pointerEvents:"none"}},[e.renderSlot(o.$slots,"chart-background",{},void 0,!0)],8,ne)):e.createCommentVNode("",!0),t.value.style.chart.layout.curved?(e.openBlock(),e.createElementBlock("g",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("path",{d:a.curve,"stroke-width":i.value.mark,stroke:s.value>=r?a.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<=s.value})},null,10,ue))),256))])):(e.openBlock(),e.createElementBlock("g",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,(a,r)=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,y1:a.y1,x2:a.x2,y2:a.y2,"stroke-width":i.value.mark,stroke:s.value>=r?a.color:t.value.style.chart.layout.inactiveColor,"stroke-linecap":"round"},null,8,ce))),256))])),t.value.style.chart.percentage.show?(e.openBlock(),e.createElementBlock("text",{key:3,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,s.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,s.value,e.unref(c.dataLabel)({v:s.value,s:"%",r:t.value.style.chart.percentage.rounding}))),9,ve)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:l.value},void 0,!0)],14,re)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(V)})),void 0,!0)])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",he,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Q.default,{key:7,config:{type:"tiremarks",style:{backgroundColor:t.value.style.chart.backgroundColor,tiremarks:{color:"#CCCCCC"}}}},null,8,["config"]))],46,ae))}},me=oe._export_sfc(pe,[["__scopeId","data-v-0911c677"]]);exports.default=me;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CUVUtIL0.cjs"),Ae=require("./Title-CSIfEX6Y.cjs"),ke=require("./usePrinter-C3L9Sy8a.cjs"),Le=require("./Tooltip-BanSNN1E.cjs"),Fe=require("./Legend-Ctes5ppf.cjs"),Ie=require("./vue-ui-skeleton-BmVoWkYO.cjs"),De=require("./DataTable-BNWwFOV4.cjs"),qe=require("./vue-ui-accordion-CfWb_o5i.cjs"),Ce=require("./useResponsive-N8jl0-aC.cjs"),we=require("./useNestedProp-C3k1eZp3.cjs"),Me=require("./PackageVersion-B0quzSF4.cjs"),He=require("./PenAndPaper-DvHA5IKH.cjs"),Ue=require("./useUserOptionState-BgepsfED.cjs"),We=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function xe(n,c){const i=n.length;if(i===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let d=1/0,s=-1/0,h=0;for(let p=0;p<i;p+=1){const f=n[p].normalizedValue;f<d&&(d=f),f>s&&(s=f),h+=f}return Math.max(c**2*s/h**2,h**2/(c**2*d))}}function Te(n){const{xOffset:c,yOffset:i,width:d,height:s}=n;return{x0:c,y0:i,x1:c+d,y1:i+s}}function je(n,c,i){if(n.length===0)return!0;{const d=n.concat(c),s=xe(n,i),h=xe(d,i);return s>=h}}function Xe(n){const c=[],i=n.length;for(let d=0;d<i;d+=1){const s=n[d],h=s.length;for(let v=0;v<h;v+=1)c.push(s[v])}return c}function Ye(n,c){const i={...c,children:n};return Se(i)}function Ze(n){return(n.x1-n.x0)*(n.y1-n.y0)}function $e(n,c){const{width:i,height:d,xOffset:s,yOffset:h}=Y(c),v=n.length,p=n.map(y=>y.normalizedValue||0).reduce((y,g)=>y+g,0),f=p/d,w=p/i;let C=s,x=h;const b=[];if(i>=d){for(let y=0;y<v;y+=1){const g=n[y],k=x+g.normalizedValue/f,O={x0:C,y0:x,x1:C+f,y1:k},T=Object.assign({},g,O);x=k,b.push(T)}return b}else{for(let y=0;y<v;y+=1){const g=n[y],k=C+g.normalizedValue/w,O={x0:C,y0:x,x1:k,y1:x+w},T=Object.assign({},g,O);C=k,b.push(T)}return b}}function Je(n){const c=Y(n),i=c.width,d=c.height;return Math.min(i,d)}function Ke(n,c){const i=n.length,d=n.map(f=>f.value??0).reduce((f,w)=>f+w,0),s=c/d,h=[];let v,p;for(let f=0;f<i;f+=1)p=n[f],v=Object.assign({},p,{normalizedValue:p.value*(s||0)}),h.push(v);return h}function Y(n){const{x0:c,y0:i,x1:d,y1:s}=n;return{xOffset:c,yOffset:i,width:d-c,height:s-i}}function Qe(n,c,i,d){let s=n,h=c,v=i,p=d;for(;;){const f=s.length;if(f===0){const b=$e(h,v);return p.concat(b)}const w=Je(v),C=s[0],x=s.slice(1,f);if(je(h,C,w)){const b=h.concat(C);s=x,h=b,v=v,p=p}else{const b=h.length;let y=0;for(let T=0;T<b;T+=1)y+=h[T].normalizedValue;const g=et(v,y),k=$e(h,v),O=p.concat(k);s=s,h=[],v=g,p=O}}}function Se(n){if(typeof n.children>"u"||!n.children.length)return[n];{const c=Ke(n.children,Ze(n)),i=Qe(c,[],n,[]),d=i.length,s=[];for(let v=0;v<d;v+=1)s.push(Se(i[v]));return Xe(s)}}function et(n,c){const{width:i,height:d,xOffset:s,yOffset:h}=Y(n);if(i>=d){const v=c/d,p=i-v,f={xOffset:s+v,yOffset:h,width:p,height:d};return Te(f)}else{const v=c/i,p=d-v,f={xOffset:s,yOffset:h+v,width:i,height:p};return Te(f)}}const tt=["id"],ot=["xmlns","viewBox"],lt={key:0},at=["id"],nt=["stop-color"],rt=["stop-color"],st=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],ut=["x","y","height","width"],it={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},ct={key:5,class:"vue-data-ui-watermark"},dt=["onClick"],vt={key:0},ht={key:1},pt=["innerHTML"],ft={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:c,emit:i}){const{vue_ui_treemap:d}=r.useConfig(),s=n,h=i,v=e.useSlots();e.onMounted(()=>{v["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const p=e.computed(()=>!!s.dataset&&s.dataset.length),f=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),w=e.ref(r.createUid()),C=e.ref(!1),x=e.ref(""),b=e.ref(!1),y=e.ref(0),g=e.ref([]),k=e.ref(null),O=e.ref(null),T=e.ref(null),Z=e.ref(null),J=e.ref(null),K=e.ref(0),Q=e.ref(0),ee=e.ref(0),t=e.computed({get:()=>ae(),set:o=>o}),{userOptionsVisible:U,setUserOptionsVisibility:te,keepUserOptionState:oe}=Ue.useUserOptionState({config:t.value}),{svgRef:le}=We.useChartAccessibility({config:t.value.style.chart.title});function ae(){const o=we.useNestedProp({userConfig:s.config,defaultConfig:d});return o.theme?{...we.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||s.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>s.config,o=>{t.value=ae(),U.value=!t.value.userOptions.showOnChartHover,K.value+=1,Q.value+=1,ee.value+=1,$.value.showTable=t.value.table.show,$.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:ne,isImaging:re,generatePdf:se,generateImage:ue}=ke.usePrinter({elementId:`treemap_${w.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),Ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),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}),V=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 ie(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(u=>{u.parentId=a.id,u.color=a.color}),ie(a.children))})}const _=e.ref(s.dataset),D=e.ref(null);e.onMounted(()=>{Be()});function Be(){if(r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),ie(_.value),t.value.responsive){const o=Ce.throttle(()=>{const{width:a,height:l}=Ce.useResponsive({chart:k.value,title:t.value.style.chart.title.text?O.value:null,legend:t.value.style.chart.legend.show?T.value:null,source:Z.value,noTitle:J.value});requestAnimationFrame(()=>{P.value.width=a,P.value.height=l})});D.value=new ResizeObserver(o),D.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const W=e.ref(_.value),L=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=>!g.value.includes(o.id))),R=e.computed(()=>_.value.filter(o=>!g.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),ce=e.computed({get(){let o=[...L.value];return t.value.style.chart.layout.sorted&&(o=[...L.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function de(o,a){return o.value/a}function Oe(o,a,l){const u=t.value.style.chart.layout.rects.colorRatio-de(a,l);return r.lightenHexColor(o,u<0?0:u)}function ve(o,a,l,u){return o.map((m,z)=>{const H=Oe(r.convertColorToHex(a)||I.value[z]||r.palette[z]||r.palette[z%r.palette.length],m,u),Re=de(m,u);return{...m,color:H,proportion:Re,parentName:l,children:m.children?ve(m.children,H,m.name,u):void 0}})}const F=e.computed(()=>Ye(ce.value.map((o,a)=>{const l=o.children?o.children.reduce((u,m)=>u+m.value,0):o.value;return{value:o.value,id:o.id,children:o.children?ve(o.children.sort((u,m)=>m.value-u.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:V.value.left*2,y0:V.value.top,x1:V.value.width,y1:V.value.height}));function he({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function pe({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 Pe(o){b.value=o,y.value+=1}const A=e.computed(()=>({startX:0,startY:0,width:V.value.vbWidth,height:V.value.vbHeight})),S=e.ref(!1);function G(o,a=_.value){for(const l of a){if(l.id===o)return l;if(l.children){const u=G(o,l.children);if(u)return u}}return null}function ze(o){if(S.value)h("selectDatapoint",void 0),W.value=_.value;else{if(h("selectDatapoint",o),!G(o.parentId))return;W.value=[G(o.parentId)]}S.value=!S.value}const N=e.ref(null),fe=e.computed(()=>_.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/_.value.map(l=>l.value).reduce((l,u)=>l+u,0),opacity:g.value.includes(o.id)?.5:1}))),Ve=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 ge(o){S.value=!1,N.value=null,g.value.includes(o.id)?g.value=g.value.filter(a=>a!==o.id):g.value.length<s.dataset.length-1&&g.value.push(o.id),h("selectLegend",ce.value)}const j=e.ref(null);function _e({datapoint:o,seriesIndex:a}){N.value=o,j.value={datapoint:o,seriesIndex:a,config:t.value,series:L.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:L.value,config:t.value})))x.value=l({seriesIndex:a,datapoint:o,series:L.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${o.color}"/></svg>`,u+=`<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>`,x.value=`<div>${u}</div>`}C.value=!0}const B=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 me(){e.nextTick(()=>{const o=B.value.head.map((u,m)=>[[u.name],[B.value.body[m]],[isNaN(B.value.body[m]/R.value)?"-":B.value.body[m]/R.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=B.value.head.map((m,z)=>{const H=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,B.value.body[z],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:B.value.body[z],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:m.color,name:m.name,shape:"square"},H,isNaN(B.value.body[z]/R.value)?"-":r.dataLabel({v:B.value.body[z]/R.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 Ee(){return F.value}function ye(){$.value.showTable=!$.value.showTable}function be(){$.value.showTooltip=!$.value.showTooltip}const M=e.ref(!1);function X(){M.value=!M.value}return c({getData:Ee,generateCsv:me,generateImage:ue,generatePdf:se,toggleTable:ye,toggleTooltip:be,toggleAnnotator:X}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:k,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;background:${t.value.style.chart.backgroundColor}`),id:`treemap_${w.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(te)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(te)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(He.PenAndPaper,{key:0,svgRef:e.unref(le),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:M.value,onClose:X},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ne.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:J,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:O,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Ae._sfc_main,{key:`title_${K.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&&p.value&&(e.unref(oe)||e.unref(U))?(e.openBlock(),e.createBlock(ke.UserOptions,{ref:"details",key:`user_option_${y.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ne),isImaging:e.unref(re),uid:w.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:k.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:Pe,onGeneratePdf:e.unref(se),onGenerateCsv:me,onGenerateImage:e.unref(ue),onToggleTable:ye,onToggleTooltip:be,onToggleAnnotator:X,style:e.normalizeStyle({visibility:e.unref(oe)?e.unref(U)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:u})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:u})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:u})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:u})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:le,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":!S.value,"vue-data-ui-zoom-minus":S.value}),viewBox:`${A.value.startX} ${A.value.startY} ${A.value.width<=0?10:A.value.width} ${A.value.height<=0?10:A.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Me._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",lt,[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,nt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,rt)],8,at)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:he(l),width:pe(l),fill:f.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:N.value&&N.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":N.value&&N.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:m=>ze(l),onMouseenter:()=>_e({datapoint:l,seriesIndex:u}),onMouseleave:a[0]||(a[0]=m=>{N.value=null,C.value=!1}),style:e.normalizeStyle(`opacity:${N.value?N.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,st),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:he(l),width:pe(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",it,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||S.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),a[5]||(a[5]=e.createElementVNode("br",null,null,-1)),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.mergeProps({ref_for:!0},{rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||S.value,fontSize:E(l),isZoom:S.value,textColor:e.unref(r.adaptColorToBackground)(l.color)}),void 0,!0)])],8,ut))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:V.value,isZoom:S.value,rect:N.value,config:t.value})),void 0,!0)],14,ot)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ct,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ne)||e.unref(re)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ie.default,{key:6,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:T},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Fe.Legend,{key:`legend_${ee.value}`,legendSet:fe.value,config:Ve.value,id:`treemap_legend_${w.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ge(l))},{item:e.withCtx(({legend:l,index:u})=>[e.createElementVNode("div",{onClick:m=>ge(l),style:e.normalizeStyle(`opacity:${g.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),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",ht," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",vt," ("+e.toDisplayString(isNaN(l.value/R.value)?"-":(l.value/R.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,dt)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:fe.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:Z,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Le._sfc_main,{show:$.value.showTooltip&&C.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:k.value,content:x.value,isFullscreen:b.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({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),p.value?(e.openBlock(),e.createBlock(qe.default,{key:8,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(De.DataTable,{key:`table_${Q.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,pt)]),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)],46,tt))}},gt=Ge._export_sfc(ft,[["__scopeId","data-v-4d059d9f"]]);exports.default=gt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-_gyicZFE.cjs"),Ae=require("./Title-CsERtJKI.cjs"),ke=require("./usePrinter-BRTNfg7r.cjs"),Le=require("./Tooltip-C06-4zGf.cjs"),Fe=require("./Legend-tU5gqFrZ.cjs"),Ie=require("./vue-ui-skeleton-KlT3Rmkn.cjs"),De=require("./DataTable-DL8_xKlk.cjs"),qe=require("./vue-ui-accordion-8mzPx86h.cjs"),Ce=require("./useResponsive-N8jl0-aC.cjs"),we=require("./useNestedProp-BJQoarHp.cjs"),Me=require("./PackageVersion-DHtx9fnE.cjs"),He=require("./PenAndPaper-DPoMEHE6.cjs"),Ue=require("./useUserOptionState-BgepsfED.cjs"),We=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ge=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function xe(n,c){const i=n.length;if(i===0)throw new Error(`Max aspect ratio cannot be computed: ${n} is an empty array`);{let d=1/0,s=-1/0,h=0;for(let p=0;p<i;p+=1){const f=n[p].normalizedValue;f<d&&(d=f),f>s&&(s=f),h+=f}return Math.max(c**2*s/h**2,h**2/(c**2*d))}}function Te(n){const{xOffset:c,yOffset:i,width:d,height:s}=n;return{x0:c,y0:i,x1:c+d,y1:i+s}}function je(n,c,i){if(n.length===0)return!0;{const d=n.concat(c),s=xe(n,i),h=xe(d,i);return s>=h}}function Xe(n){const c=[],i=n.length;for(let d=0;d<i;d+=1){const s=n[d],h=s.length;for(let v=0;v<h;v+=1)c.push(s[v])}return c}function Ye(n,c){const i={...c,children:n};return Se(i)}function Ze(n){return(n.x1-n.x0)*(n.y1-n.y0)}function $e(n,c){const{width:i,height:d,xOffset:s,yOffset:h}=Y(c),v=n.length,p=n.map(y=>y.normalizedValue||0).reduce((y,g)=>y+g,0),f=p/d,w=p/i;let C=s,x=h;const b=[];if(i>=d){for(let y=0;y<v;y+=1){const g=n[y],k=x+g.normalizedValue/f,O={x0:C,y0:x,x1:C+f,y1:k},T=Object.assign({},g,O);x=k,b.push(T)}return b}else{for(let y=0;y<v;y+=1){const g=n[y],k=C+g.normalizedValue/w,O={x0:C,y0:x,x1:k,y1:x+w},T=Object.assign({},g,O);C=k,b.push(T)}return b}}function Je(n){const c=Y(n),i=c.width,d=c.height;return Math.min(i,d)}function Ke(n,c){const i=n.length,d=n.map(f=>f.value??0).reduce((f,w)=>f+w,0),s=c/d,h=[];let v,p;for(let f=0;f<i;f+=1)p=n[f],v=Object.assign({},p,{normalizedValue:p.value*(s||0)}),h.push(v);return h}function Y(n){const{x0:c,y0:i,x1:d,y1:s}=n;return{xOffset:c,yOffset:i,width:d-c,height:s-i}}function Qe(n,c,i,d){let s=n,h=c,v=i,p=d;for(;;){const f=s.length;if(f===0){const b=$e(h,v);return p.concat(b)}const w=Je(v),C=s[0],x=s.slice(1,f);if(je(h,C,w)){const b=h.concat(C);s=x,h=b,v=v,p=p}else{const b=h.length;let y=0;for(let T=0;T<b;T+=1)y+=h[T].normalizedValue;const g=et(v,y),k=$e(h,v),O=p.concat(k);s=s,h=[],v=g,p=O}}}function Se(n){if(typeof n.children>"u"||!n.children.length)return[n];{const c=Ke(n.children,Ze(n)),i=Qe(c,[],n,[]),d=i.length,s=[];for(let v=0;v<d;v+=1)s.push(Se(i[v]));return Xe(s)}}function et(n,c){const{width:i,height:d,xOffset:s,yOffset:h}=Y(n);if(i>=d){const v=c/d,p=i-v,f={xOffset:s+v,yOffset:h,width:p,height:d};return Te(f)}else{const v=c/i,p=d-v,f={xOffset:s,yOffset:h+v,width:i,height:p};return Te(f)}}const tt=["id"],ot=["xmlns","viewBox"],lt={key:0},at=["id"],nt=["stop-color"],rt=["stop-color"],st=["x","y","height","width","fill","rx","stroke","stroke-width","onClick","onMouseenter"],ut=["x","y","height","width"],it={style:{width:"100%",height:"100%"},class:"vue-ui-treemap-cell"},ct={key:5,class:"vue-data-ui-watermark"},dt=["onClick"],vt={key:0},ht={key:1},pt=["innerHTML"],ft={__name:"vue-ui-treemap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(n,{expose:c,emit:i}){const{vue_ui_treemap:d}=r.useConfig(),s=n,h=i,v=e.useSlots();e.onMounted(()=>{v["chart-background"]&&console.warn("VueUiTreemap does not support the #chart-background slot.")});const p=e.computed(()=>!!s.dataset&&s.dataset.length),f=e.computed(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),w=e.ref(r.createUid()),C=e.ref(!1),x=e.ref(""),b=e.ref(!1),y=e.ref(0),g=e.ref([]),k=e.ref(null),O=e.ref(null),T=e.ref(null),Z=e.ref(null),J=e.ref(null),K=e.ref(0),Q=e.ref(0),ee=e.ref(0),t=e.computed({get:()=>ae(),set:o=>o}),{userOptionsVisible:U,setUserOptionsVisibility:te,keepUserOptionState:oe}=Ue.useUserOptionState({config:t.value}),{svgRef:le}=We.useChartAccessibility({config:t.value.style.chart.title});function ae(){const o=we.useNestedProp({userConfig:s.config,defaultConfig:d});return o.theme?{...we.useNestedProp({userConfig:r.themes.vue_ui_treemap[o.theme]||s.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>s.config,o=>{t.value=ae(),U.value=!t.value.userOptions.showOnChartHover,K.value+=1,Q.value+=1,ee.value+=1,$.value.showTable=t.value.table.show,$.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:ne,isImaging:re,generatePdf:se,generateImage:ue}=ke.usePrinter({elementId:`treemap_${w.value}`,fileName:t.value.style.chart.title.text||"vue-ui-treemap"}),Ne=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),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}),V=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 ie(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(u=>{u.parentId=a.id,u.color=a.color}),ie(a.children))})}const _=e.ref(s.dataset),D=e.ref(null);e.onMounted(()=>{Be()});function Be(){if(r.objectIsEmpty(s.dataset)&&r.error({componentName:"VueUiTreemap",type:"dataset"}),ie(_.value),t.value.responsive){const o=Ce.throttle(()=>{const{width:a,height:l}=Ce.useResponsive({chart:k.value,title:t.value.style.chart.title.text?O.value:null,legend:t.value.style.chart.legend.show?T.value:null,source:Z.value,noTitle:J.value});requestAnimationFrame(()=>{P.value.width=a,P.value.height=l})});D.value=new ResizeObserver(o),D.value.observe(k.value.parentNode)}}e.onBeforeUnmount(()=>{D.value&&D.value.disconnect()});const W=e.ref(_.value),L=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=>!g.value.includes(o.id))),R=e.computed(()=>_.value.filter(o=>!g.value.includes(o.id)).map(o=>o.value||0).reduce((o,a)=>o+a,0)),ce=e.computed({get(){let o=[...L.value];return t.value.style.chart.layout.sorted&&(o=[...L.value].sort((a,l)=>l.value-a.value)),o.map(a=>({...a}))},set(o){return o}});function de(o,a){return o.value/a}function Oe(o,a,l){const u=t.value.style.chart.layout.rects.colorRatio-de(a,l);return r.lightenHexColor(o,u<0?0:u)}function ve(o,a,l,u){return o.map((m,z)=>{const H=Oe(r.convertColorToHex(a)||I.value[z]||r.palette[z]||r.palette[z%r.palette.length],m,u),Re=de(m,u);return{...m,color:H,proportion:Re,parentName:l,children:m.children?ve(m.children,H,m.name,u):void 0}})}const F=e.computed(()=>Ye(ce.value.map((o,a)=>{const l=o.children?o.children.reduce((u,m)=>u+m.value,0):o.value;return{value:o.value,id:o.id,children:o.children?ve(o.children.sort((u,m)=>m.value-u.value),o.color,o.name,l):void 0,color:o.color,name:o.name}}),{x0:V.value.left*2,y0:V.value.top,x1:V.value.width,y1:V.value.height}));function he({y0:o,y1:a}){return a-o<=0?1e-4:a-o}function pe({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 Pe(o){b.value=o,y.value+=1}const A=e.computed(()=>({startX:0,startY:0,width:V.value.vbWidth,height:V.value.vbHeight})),S=e.ref(!1);function G(o,a=_.value){for(const l of a){if(l.id===o)return l;if(l.children){const u=G(o,l.children);if(u)return u}}return null}function ze(o){if(S.value)h("selectDatapoint",void 0),W.value=_.value;else{if(h("selectDatapoint",o),!G(o.parentId))return;W.value=[G(o.parentId)]}S.value=!S.value}const N=e.ref(null),fe=e.computed(()=>_.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/_.value.map(l=>l.value).reduce((l,u)=>l+u,0),opacity:g.value.includes(o.id)?.5:1}))),Ve=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 ge(o){S.value=!1,N.value=null,g.value.includes(o.id)?g.value=g.value.filter(a=>a!==o.id):g.value.length<s.dataset.length-1&&g.value.push(o.id),h("selectLegend",ce.value)}const j=e.ref(null);function _e({datapoint:o,seriesIndex:a}){N.value=o,j.value={datapoint:o,seriesIndex:a,config:t.value,series:L.value};const l=t.value.style.chart.tooltip.customFormat;if(r.isFunction(l)&&r.functionReturnsString(()=>l({seriesIndex:a,datapoint:o,series:L.value,config:t.value})))x.value=l({seriesIndex:a,datapoint:o,series:L.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><rect x="0" y="0" height="12" width="12" stroke="none" fill="${o.color}"/></svg>`,u+=`<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>`,x.value=`<div>${u}</div>`}C.value=!0}const B=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 me(){e.nextTick(()=>{const o=B.value.head.map((u,m)=>[[u.name],[B.value.body[m]],[isNaN(B.value.body[m]/R.value)?"-":B.value.body[m]/R.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=B.value.head.map((m,z)=>{const H=r.applyDataLabel(t.value.style.chart.layout.labels.formatter,B.value.body[z],r.dataLabel({p:t.value.style.chart.layout.labels.prefix,v:B.value.body[z],s:t.value.style.chart.layout.labels.suffix,r:t.value.table.td.roundingValue}));return[{color:m.color,name:m.name,shape:"square"},H,isNaN(B.value.body[z]/R.value)?"-":r.dataLabel({v:B.value.body[z]/R.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 Ee(){return F.value}function ye(){$.value.showTable=!$.value.showTable}function be(){$.value.showTooltip=!$.value.showTooltip}const M=e.ref(!1);function X(){M.value=!M.value}return c({getData:Ee,generateCsv:me,generateImage:ue,generatePdf:se,toggleTable:ye,toggleTooltip:be,toggleAnnotator:X}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"treemapChart",ref:k,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;background:${t.value.style.chart.backgroundColor}`),id:`treemap_${w.value}`,onMouseenter:a[3]||(a[3]=()=>e.unref(te)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(te)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(He.PenAndPaper,{key:0,svgRef:e.unref(le),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:M.value,onClose:X},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Ne.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:J,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:O,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:6px`)},[(e.openBlock(),e.createBlock(Ae._sfc_main,{key:`title_${K.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&&p.value&&(e.unref(oe)||e.unref(U))?(e.openBlock(),e.createBlock(ke.UserOptions,{ref:"details",key:`user_option_${y.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ne),isImaging:e.unref(re),uid:w.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:k.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:M.value,onToggleFullscreen:Pe,onGeneratePdf:e.unref(se),onGenerateCsv:me,onGenerateImage:e.unref(ue),onToggleTable:ye,onToggleTooltip:be,onToggleAnnotator:X,style:e.normalizeStyle({visibility:e.unref(oe)?e.unref(U)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:u})=>[e.renderSlot(o.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:u})),void 0,!0)]),key:"0"}:void 0,o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:u})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:u})),void 0,!0)]),key:"6"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:u})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:u})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:le,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":!S.value,"vue-data-ui-zoom-minus":S.value}),viewBox:`${A.value.startX} ${A.value.startY} ${A.value.width<=0?10:A.value.width} ${A.value.height<=0?10:A.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: hidden; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Me._sfc_main),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.layout.rects.gradient.show?(e.openBlock(),e.createElementBlock("defs",lt,[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,nt),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.lightenHexColor)(l.color,t.value.style.chart.layout.rects.gradient.intensity/100)},null,8,rt)],8,at)])):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(l,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:l.x0,y:l.y0,height:he(l),width:pe(l),fill:f.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:N.value&&N.value.id===l.id?t.value.style.chart.layout.rects.selected.stroke:t.value.style.chart.layout.rects.stroke,"stroke-width":N.value&&N.value.id===l.id?t.value.style.chart.layout.rects.selected.strokeWidth:t.value.style.chart.layout.rects.strokeWidth,onClick:m=>ze(l),onMouseenter:()=>_e({datapoint:l,seriesIndex:u}),onMouseleave:a[0]||(a[0]=m=>{N.value=null,C.value=!1}),style:e.normalizeStyle(`opacity:${N.value?N.value.id===l.id?1:t.value.style.chart.layout.rects.selected.unselectedOpacity:1}`),class:"vue-ui-treemap-rect"},null,44,st),(e.openBlock(),e.createElementBlock("foreignObject",{x:l.x0,y:l.y0,height:he(l),width:pe(l),class:"vue-ui-treemap-cell-foreignObject"},[e.createElementVNode("div",it,[t.value.style.chart.layout.labels.showDefaultLabels&&(l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||S.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),a[5]||(a[5]=e.createElementVNode("br",null,null,-1)),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.mergeProps({ref_for:!0},{rect:l,shouldShow:l.proportion>t.value.style.chart.layout.labels.hideUnderProportion||S.value,fontSize:E(l),isZoom:S.value,textColor:e.unref(r.adaptColorToBackground)(l.color)}),void 0,!0)])],8,ut))]))),256)),e.renderSlot(o.$slots,"svg",e.normalizeProps(e.guardReactiveProps({svg:V.value,isZoom:S.value,rect:N.value,config:t.value})),void 0,!0)],14,ot)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ct,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ne)||e.unref(re)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ie.default,{key:6,config:{type:"treemap",style:{backgroundColor:t.value.style.chart.backgroundColor,treemap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:T},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(Fe.Legend,{key:`legend_${ee.value}`,legendSet:fe.value,config:Ve.value,id:`treemap_legend_${w.value}`,onClickMarker:a[1]||(a[1]=({legend:l})=>ge(l))},{item:e.withCtx(({legend:l,index:u})=>[e.createElementVNode("div",{onClick:m=>ge(l),style:e.normalizeStyle(`opacity:${g.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),g.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",ht," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",vt," ("+e.toDisplayString(isNaN(l.value/R.value)?"-":(l.value/R.value*100).toFixed(t.value.style.chart.legend.roundingPercentage))+"%) ",1))],12,dt)]),_:1},8,["legendSet","config","id"])):e.renderSlot(o.$slots,"legend",{key:1,legend:fe.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:Z,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Le._sfc_main,{show:$.value.showTooltip&&C.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:k.value,content:x.value,isFullscreen:b.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({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),p.value?(e.openBlock(),e.createBlock(qe.default,{key:8,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(De.DataTable,{key:`table_${Q.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,pt)]),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)],46,tt))}},gt=Ge._export_sfc(ft,[["__scopeId","data-v-4d059d9f"]]);exports.default=gt;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useSlots as st, onMounted as Le, computed as k, ref as f, watch as rt, onBeforeUnmount as ut, createElementBlock as C, openBlock as p, unref as g, normalizeStyle as D, normalizeClass as De, createBlock as E, createCommentVNode as P, createElementVNode as z, createVNode as Me, createSlots as it, withCtx as x, renderSlot as $, normalizeProps as G, guardReactiveProps as q, Fragment as Ve, renderList as Ue, toDisplayString as Y, mergeProps as ct, createTextVNode as Be, nextTick as dt } from "vue";
|
|
2
|
-
import { u as vt, c as He, t as ht, p as O, a as ft, b as pt, o as gt, e as yt, d as ae, i as ne, f as K, X as mt, l as We, G as Ee, x as Ge, q as bt, r as wt, y as kt } from "./index-
|
|
3
|
-
import { _ as Ct } from "./Title-
|
|
4
|
-
import { u as $t, U as xt } from "./usePrinter-
|
|
5
|
-
import { _ as Tt } from "./Tooltip-
|
|
6
|
-
import { L as Ot } from "./Legend-
|
|
7
|
-
import _t from "./vue-ui-skeleton-
|
|
8
|
-
import { D as St } from "./DataTable-
|
|
9
|
-
import Nt from "./vue-ui-accordion-
|
|
2
|
+
import { u as vt, c as He, t as ht, p as O, a as ft, b as pt, o as gt, e as yt, d as ae, i as ne, f as K, X as mt, l as We, G as Ee, x as Ge, q as bt, r as wt, y as kt } from "./index-CHWA6Lnw.js";
|
|
3
|
+
import { _ as Ct } from "./Title-BwZtefYd.js";
|
|
4
|
+
import { u as $t, U as xt } from "./usePrinter-DibtVl2x.js";
|
|
5
|
+
import { _ as Tt } from "./Tooltip-eCCz9HFo.js";
|
|
6
|
+
import { L as Ot } from "./Legend-BMXzxIhA.js";
|
|
7
|
+
import _t from "./vue-ui-skeleton-BSUFPx4a.js";
|
|
8
|
+
import { D as St } from "./DataTable-B4YF6guk.js";
|
|
9
|
+
import Nt from "./vue-ui-accordion-gHGrRoVr.js";
|
|
10
10
|
import { t as Pt, u as zt } from "./useResponsive-vZgZwV-S.js";
|
|
11
|
-
import { u as qe } from "./useNestedProp-
|
|
12
|
-
import { _ as At } from "./PackageVersion-
|
|
13
|
-
import { P as Ft } from "./PenAndPaper-
|
|
11
|
+
import { u as qe } from "./useNestedProp-ByBiJC9_.js";
|
|
12
|
+
import { _ as At } from "./PackageVersion-DcMafJMi.js";
|
|
13
|
+
import { P as Ft } from "./PenAndPaper-ljJaW1FE.js";
|
|
14
14
|
import { u as It } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { u as Rt } from "./useChartAccessibility-BWojgys7.js";
|
|
16
16
|
import { _ as Lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useCssVars as ct, useSlots as ht, computed as m, ref as i, watch as Ue, onMounted as Xe, onBeforeUnmount as pt, createElementBlock as r, openBlock as u, unref as d, normalizeStyle as c, normalizeClass as A, createBlock as B, createCommentVNode as p, renderSlot as b, createVNode as Y, createSlots as ce, withCtx as k, normalizeProps as X, guardReactiveProps as E, createElementVNode as n, toDisplayString as h, Fragment as H, renderList as W, mergeProps as yt, withKeys as gt, createTextVNode as ft } from "vue";
|
|
2
|
-
import { u as bt, c as mt, t as kt, p as R, a as _t, b as $t, o as Ee, e as K, v as N, d as he, i as le, f as D, X as wt, s as pe, w as xt, q as Ct, r as Tt, x as Lt, y as Nt } from "./index-
|
|
2
|
+
import { u as bt, c as mt, t as kt, p as R, a as _t, b as $t, o as Ee, e as K, v as N, d as he, i as le, f as D, X as wt, s as pe, w as xt, q as Ct, r as Tt, x as Lt, y as Nt } from "./index-CHWA6Lnw.js";
|
|
3
3
|
import { t as Pt, u as St } from "./useResponsive-vZgZwV-S.js";
|
|
4
|
-
import { _ as Vt } from "./Title-
|
|
5
|
-
import { u as It, U as Ot } from "./usePrinter-
|
|
6
|
-
import { _ as Ft } from "./Tooltip-
|
|
7
|
-
import { L as He } from "./Legend-
|
|
8
|
-
import Mt from "./vue-ui-skeleton-
|
|
9
|
-
import zt from "./BaseIcon-
|
|
10
|
-
import At from "./vue-ui-accordion-
|
|
11
|
-
import { u as We } from "./useNestedProp-
|
|
12
|
-
import { _ as Bt } from "./PackageVersion-
|
|
13
|
-
import { P as Rt } from "./PenAndPaper-
|
|
4
|
+
import { _ as Vt } from "./Title-BwZtefYd.js";
|
|
5
|
+
import { u as It, U as Ot } from "./usePrinter-DibtVl2x.js";
|
|
6
|
+
import { _ as Ft } from "./Tooltip-eCCz9HFo.js";
|
|
7
|
+
import { L as He } from "./Legend-BMXzxIhA.js";
|
|
8
|
+
import Mt from "./vue-ui-skeleton-BSUFPx4a.js";
|
|
9
|
+
import zt from "./BaseIcon-AmoKryXo.js";
|
|
10
|
+
import At from "./vue-ui-accordion-gHGrRoVr.js";
|
|
11
|
+
import { u as We } from "./useNestedProp-ByBiJC9_.js";
|
|
12
|
+
import { _ as Bt } from "./PackageVersion-DcMafJMi.js";
|
|
13
|
+
import { P as Rt } from "./PenAndPaper-ljJaW1FE.js";
|
|
14
14
|
import { u as Dt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
|
-
import { _ as Ge } from "./Shape-
|
|
15
|
+
import { _ as Ge } from "./Shape-Bs9E3f4-.js";
|
|
16
16
|
import { u as Ut } from "./useChartAccessibility-BWojgys7.js";
|
|
17
17
|
import { _ as Xt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
18
18
|
const Et = ["id"], Ht = ["onClick"], Wt = ["xmlns", "viewBox"], Gt = ["width", "height"], jt = ["id"], qt = ["stop-color"], Yt = ["stop-color"], Kt = { key: 1 }, Jt = ["x", "y", "width", "height", "fill", "rx"], Qt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], Zt = ["x", "y", "width", "height", "fill", "rx", "stroke", "stroke-width"], ea = ["x2", "y1", "y2", "stroke", "stroke-width"], ta = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], aa = ["x", "y", "text-anchor", "font-size", "fill", "font-weight"], la = ["x", "y", "font-size", "fill", "font-weight"], oa = ["x", "y", "font-size", "fill", "font-weight"], na = ["x", "y", "font-size", "fill", "font-weight"], ua = ["y", "width", "height", "fill", "onMouseenter"], sa = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-_gyicZFE.cjs"),ge=require("./useResponsive-N8jl0-aC.cjs"),Re=require("./Title-CsERtJKI.cjs"),me=require("./usePrinter-BRTNfg7r.cjs"),qe=require("./Tooltip-C06-4zGf.cjs"),be=require("./Legend-tU5gqFrZ.cjs"),Ue=require("./vue-ui-skeleton-KlT3Rmkn.cjs"),He=require("./BaseIcon-q0bEOOzl.cjs"),Xe=require("./vue-ui-accordion-8mzPx86h.cjs"),ke=require("./useNestedProp-BJQoarHp.cjs"),je=require("./PackageVersion-DHtx9fnE.cjs"),We=require("./PenAndPaper-DPoMEHE6.cjs"),Ge=require("./useUserOptionState-BgepsfED.cjs"),Ce=require("./Shape-C_rBdSHr.cjs"),Ye=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ke=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Je=["id"],Qe=["onClick"],Ze=["xmlns","viewBox"],et=["width","height"],tt=["id"],lt=["stop-color"],at=["stop-color"],ot={key:1},nt=["x","y","width","height","fill","rx"],rt=["x","y","width","height","fill","rx","stroke","stroke-width"],ut=["x","y","width","height","fill","rx","stroke","stroke-width"],st=["x2","y1","y2","stroke","stroke-width"],it=["x1","x2","y1","y2","stroke","stroke-width"],ct=["x","y","text-anchor","font-size","fill","font-weight"],dt=["x","y","font-size","fill","font-weight"],vt=["x","y","font-size","fill","font-weight"],ht=["x","y","font-size","fill","font-weight"],pt=["y","width","height","fill","onMouseenter"],yt={key:6,class:"vue-data-ui-watermark"},ft=["onClick"],gt={style:"width:100%;padding-top: 36px;position:relative"},mt={class:"vue-ui-data-table"},bt={key:0},kt={style:{width:"100%"}},Ct=["data-cell"],_t={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xt=["data-cell"],wt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nt=["data-cell"],$t={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},St=["data-cell"],Vt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Tt=["data-cell"],Bt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Et=["data-cell"],Lt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Pt=["data-cell"],zt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Dt={__name:"vue-ui-vertical-bar",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(_e,{expose:xe,emit:we}){e.useCssVars(a=>({e38fbd6e:a.tdo}));const{vue_ui_vertical_bar:Ne}=n.useConfig(),$e=e.useSlots(),g=_e,E=e.computed(()=>!!g.dataset&&g.dataset.length),f=e.ref(n.createUid()),Se=e.ref(null),I=e.ref(!1),O=e.ref(""),L=e.ref(0),Ve=e.ref(null),X=e.ref(0),V=e.ref(null),j=e.ref(null),M=e.ref(null),W=e.ref(null),G=e.ref(null),Y=e.ref(0),A=e.ref(0),Te=we,t=e.computed({get:()=>Z(),set:a=>a}),{userOptionsVisible:R,setUserOptionsVisibility:K,keepUserOptionState:J}=Ge.useUserOptionState({config:t.value}),{svgRef:Q}=Ye.useChartAccessibility({config:t.value.style.chart.title});function Z(){const a=ke.useNestedProp({userConfig:g.config,defaultConfig:Ne});return a.theme?{...ke.useNestedProp({userConfig:n.themes.vue_ui_vertical_bar[a.theme]||g.config,defaultConfig:a}),customPalette:n.themePalettes[a.theme]||n.palette}:a}e.watch(()=>g.config,a=>{t.value=Z(),R.value=!t.value.userOptions.showOnChartHover,ue(),Y.value+=1,A.value+=1,s.value=t.value.style.chart.layout.bars.height,c.value=t.value.style.chart.layout.bars.gap,h.value.showTable=t.value.table.show,h.value.sortDesc=t.value.style.chart.layout.bars.sort==="desc",h.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0}),e.watch(()=>g.dataset,z,{deep:!0});const{isPrinting:ee,isImaging:te,generatePdf:le,generateImage:ae}=me.usePrinter({elementId:`vue-ui-vertical-bar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-vertical-bar"}),Be=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),oe=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),ne=e.ref(null),re=e.ref(!1),Ee=e.computed(()=>t.value.table.responsiveBreakpoint),P=e.ref(null);e.onMounted(()=>{ue()});function ue(){if(n.objectIsEmpty(g.dataset)&&n.error({componentName:"VueUiVerticalBar",type:"dataset"}),L.value=g.dataset.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0),Le(),t.value.responsive){const a=ge.throttle(()=>{const{width:o,height:l}=ge.useResponsive({chart:V.value,title:t.value.style.chart.title.text?j.value:null,legend:t.value.style.chart.legend.show?M.value:null,source:W.value,noTitle:G.value});requestAnimationFrame(()=>{ce.value=o,s.value=l/L.value-c.value*2})});P.value=new ResizeObserver(a),P.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{P.value&&P.value.disconnect()});function Le(){new ResizeObserver(o=>{o.forEach(l=>{re.value=l.contentRect.width<Ee.value})}).observe(ne.value)}const h=e.ref({showTable:t.value.table.show,sortDesc:t.value.style.chart.layout.bars.sort==="desc",showTooltip:t.value.style.chart.tooltip.show}),se=e.computed(()=>h.value.sortDesc),x=e.computed(()=>(g.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})}))}),g.dataset.map((a,o)=>{const l=`vertical_parent_${o}_${f.value}`,r=a.children&&a.children.length>0,v=n.checkNaN(a.value?a.value:r?a.children.map(y=>y.value||0).reduce((y,C)=>y+C,0):0),d=v>=0?1:-1;return{...a,id:l,absoluteIndex:o,shape:"square",opacity:b.value.includes(l)?.5:1,value:Math.abs(v),sign:d,hasChildren:r,isChild:!1,segregate:()=>T(l),isSegregated:b.value.includes(l),color:n.convertColorToHex(a.color)||oe.value[o]||n.palette[o]||n.palette[o%n.palette.length],children:!a.children||!a.children.length?[]:a.children.toSorted(D.value?()=>0:(y,C)=>se.value?C.value-y.value:y.value-C.value).map((y,C)=>({...y,value:n.checkNaN(Math.abs(y.value)),absoluteIndex:o,sign:y.value>=0?1:-1,isChild:!0,parentId:l,parentName:a.name,parentValue:v,parentSign:d,id:`vertical_child_${o}_${C}_${f.value}`,childIndex:C,color:n.convertColorToHex(y.color)||n.convertColorToHex(a.color)||oe.value[o]||n.palette[o]||n.palette[o%n.palette.length]})).map((y,C)=>({...y,isFirstChild:C===0,isLastChild:C===a.children.length-1}))}}).toSorted(D.value?()=>0:(a,o)=>se.value?o.value-a.value:a.value-o.value))),ie=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),Pe=e.computed(()=>(s.value+c.value)*L.value),ce=e.ref(512),i=e.computed(()=>({width:ce.value,height:Pe.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:i.value.padding.top+i.value.padding.bottom+i.value.height,top:i.value.padding.top,left:i.value.padding.left,right:i.value.width-i.value.padding.right,bottom:i.value.padding.top+i.value.height,width:i.value.width-(i.value.padding.left+i.value.padding.right)}));function z(){L.value=w.value.flatMap(a=>a.children&&a.children.length>0?a.children.length:1).reduce((a,o)=>a+o,0)}const b=e.ref([]);function T(a){b.value.includes(a)?b.value=b.value.filter(o=>o!==a):b.value.push(a),z(),Te("selectLegend",w.value)}const w=e.computed(()=>x.value.filter(a=>!b.value.includes(a.id))),k=e.computed(()=>w.value.map(a=>Math.abs(a.value)).reduce((a,o)=>a+o,0));function de(a,o=!1,l=0){return o?n.dataLabel({v:n.checkNaN(Math.abs(a)/k.value*100),s:"%",r:l}):Math.abs(a)/k.value}const N=e.computed(()=>w.value.flatMap(a=>a.hasChildren?a.children:a)),$=e.computed(()=>N.value.map(a=>a.sign).includes(-1)),ze=e.computed(()=>Math.max(...w.value.flatMap(a=>a.children&&a.children.length?Math.max(...a.children.map(o=>o.value)):a.value)));function p(a){const o=a/ze.value;return u.value.width/($.value?2:1)*o}function De(a){return p(a)+u.value.left}function B(a,o){const l=w.value.find(d=>d.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/k.value)?"":de(l.value,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),sign:l.sign}}function Fe(){return w.value}const q=e.ref(null),U=e.ref(null);function Ie(a,o){U.value={datapoint:a,seriesIndex:o,series:x.value,config:t.value},I.value=!0,q.value=a.id;let l="";const r=a.isChild?a.parentName:a.name,v=a.isChild?a.name:"",d=t.value.style.chart.tooltip.customFormat;n.isFunction(d)&&n.functionReturnsString(()=>d({datapoint:a,series:x.value,config:t.value,seriesIndex:o}))?O.value=d({datapoint:a,series:x.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
2
|
<div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${a.color}"/>${$e.pattern?`<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${f.value}_${a.absoluteIndex})"/>`:""}</svg> ${r}</div>
|
|
3
3
|
${v?`<div>${v}</div>`:""}
|
|
4
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)/k.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>`)),O.value=`<div style="text-align:left">${l}</div>`)}function ve(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}),d=`(${de(a,!0,t.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${v}${t.value.style.chart.layout.bars.dataLabels.percentage.show?` ${d}`:""}`}const m=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=N.value.map(l=>l.isChild?l.isFirstChild?{color:l.color,parentName:l.parentName,parentValue:l.parentValue,percentageToTotal:l.parentValue/k.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)/k.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)/k.value}:{color:l.color,parentName:l.name,parentValue:l.sign===1?l.value:-l.value,percentageToTotal:Math.abs(l.value)/k.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:a,body:o}});function he(){const a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=m.value.head,l=m.value.body.map(d=>[d.parentName,d.parentValue,d.percentageToTotal,d.childName,d.childValue,d.childPercentageToParent,d.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 S=e.ref(!1);function Oe(a){S.value=a,X.value+=1}function pe(){h.value.showTable=!h.value.showTable}const Me=e.ref({none:0,asc:1,desc:2}),_=e.ref(0),D=e.ref(!1);e.onMounted(()=>{["none","asc","desc"].includes(t.value.style.chart.layout.bars.sort)||n.error({componentName:"VueUiVerticalBar",type:"attributeWrongValue",property:"style.chart.layout.bars.sort",key:t.value.style.chart.layout.bars.sort}),_.value=Me.value[t.value.style.chart.layout.bars.sort],h.value.sortDesc=_.value===2,D.value=_.value===0});function Ae(){_.value+=1,_.value>2&&(_.value=0)}function ye(){Ae(),h.value.sortDesc=_.value===2,D.value=_.value===0,z()}function fe(){h.value.showTooltip=!h.value.showTooltip}const F=e.ref(!1);function H(){F.value=!F.value}return xe({getData:Fe,recalculateHeight:z,generatePdf:le,generateCsv:he,generateImage:ae,toggleTable:pe,toggleSort:ye,toggleTooltip:fe,toggleAnnotator:H}),(a,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-vertical-bar ${S.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"verticalBarChart",ref:V,id:`vue-ui-vertical-bar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),onMouseenter:o[5]||(o[5]=()=>e.unref(K)(!0)),onMouseleave:o[6]||(o[6]=()=>e.unref(K)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(We.PenAndPaper,{key:0,svgRef:e.unref(Q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:F.value,onClose:H},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),Be.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:G,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:j,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(Re._sfc_main,{key:`title_${Y.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&&E.value&&(e.unref(J)||e.unref(R))?(e.openBlock(),e.createBlock(me.UserOptions,{ref_key:"details",ref:Se,key:`user_options_${X.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(te),isPrinting:e.unref(ee),uid:f.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:S.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:V.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:F.value,onToggleFullscreen:Oe,onGeneratePdf:e.unref(le),onGenerateCsv:he,onGenerateImage:e.unref(ae),onToggleTable:pe,onToggleSort:ye,onToggleTooltip:fe,onToggleAnnotator:H,style:e.normalizeStyle({visibility:e.unref(J)?e.unref(R)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:r})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:r})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,a.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,a.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionSort",{},void 0,!0)]),key:"7"}: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:"8"}: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:"9"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),t.value.style.chart.legend.show&&t.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(be.Legend,{key:`legend_top_${A.value}`,legendSet:x.value,config:ie.value,onClickMarker:o[0]||(o[0]=({legend:l})=>T(l.id))},e.createSlots({item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>T(l.id),style:e.normalizeStyle(`opacity:${b.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,Qe)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(Ce._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"]))],512)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createElementBlock("svg",{key:5,ref_key:"svgRef",ref:Q,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":S.value,"vue-data-ui-fulscreen--off":!S.value}),viewBox:`0 0 ${i.value.width<=0?10:i.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(je._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:i.value.width<=0?10:i.value.width,height:u.value.fullHeight<=0?10:u.value.fullHeight,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,et)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(l,r)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,lt),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,at)],8,tt))),256)),a.$slots.pattern?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,l=>(e.openBlock(),e.createElementBlock("defs",null,[e.renderSlot(a.$slots,"pattern",e.mergeProps({ref_for:!0},{seriesIndex:l.absoluteIndex,patternId:`pattern_${f.value}_${l.absoluteIndex}`}),void 0,!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.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:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(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,nt)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.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:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:t.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${f.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,rt),a.$slots.pattern?(e.openBlock(),e.createElementBlock("rect",{key:0,x:e.unref(n.checkNaN)($.value?u.value.left+u.value.width/2-(l.sign===1?0:p(l.value)<=0?1e-4:p(l.value)):u.value.left),y:u.value.top+(c.value+s.value)*r,width:e.unref(n.checkNaN)(p(l.value)<=0?1e-4:p(l.value)),height:s.value<=0?1e-4:s.value,fill:`url(#pattern_${f.value}_${l.absoluteIndex})`,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,ut)):e.createCommentVNode("",!0),(!l.isChild||l.isLastChild)&&t.value.style.chart.layout.separators.show&&r!==N.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:1,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,st)):e.createCommentVNode("",!0),$.value&&t.value.style.chart.layout.separators.show?(e.openBlock(),e.createElementBlock("line",{key:2,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,it)):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):De(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(ve(l.value,l,r,l.sign)),9,ct),(l.isChild||!l.hasChildren)&&t.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,"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,dt)):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:B(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(B(l,r).name),9,vt)):e.createCommentVNode("",!0),l.isChild&&l.childIndex===0&&t.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:5,x:3+t.value.style.chart.layout.bars.parentLabels.offsetX,y:B(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(ve(B(l,r).value),B(l,r),r,l.parentSign||l.sign),9,ht)):e.createCommentVNode("",!0),e.createElementVNode("rect",{x:0,y:u.value.top+(c.value+s.value)*r-c.value/2,width:i.value.width<=0?1e-4:i.value.width,height:s.value+c.value<=0?1e-4:s.value+c.value,fill:q.value===l.id?e.unref(n.setOpacity)(t.value.style.chart.layout.highlighter.color,t.value.style.chart.layout.highlighter.opacity):"transparent",onMouseenter:v=>Ie(l,r),onMouseleave:o[1]||(o[1]=v=>{Ve.value=null,I.value=!1,q.value=null})},null,40,pt)]))),256)),e.renderSlot(a.$slots,"svg",{svg:i.value},void 0,!0)],14,Ze)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",yt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue.default,{key:7,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:8,ref_key:"chartLegend",ref:M},[(e.openBlock(),e.createBlock(be.Legend,{key:`legend_bottom_${A.value}`,legendSet:x.value,config:ie.value,onClickMarker:o[2]||(o[2]=({legend:l})=>T(l.id))},e.createSlots({item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{onClick:v=>T(l.id),style:e.normalizeStyle(`opacity:${b.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,ft)]),_:2},[a.$slots.pattern?{name:"legend-pattern",fn:e.withCtx(({legend:l,index:r})=>[e.createVNode(Ce._sfc_main,{shape:l.shape,radius:30,stroke:"none",plot:{x:30,y:30},fill:`url(#pattern_${f.value}_${r})`},null,8,["shape","fill"])]),key:"0"}:void 0]),1032,["legendSet","config"]))],512)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"legend",{legend:x.value},void 0,!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:W,dir:"auto"},[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(qe._sfc_main,{show:h.value.showTooltip&&I.value&&b.value.length<g.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:V.value,content:O.value,isFullscreen:S.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({...U.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(a.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...U.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),E.value?(e.openBlock(),e.createBlock(Xe.default,{key:10,hideDetails:"",config:{open:h.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:ne,class:"vue-ui-vertical-bar-table atom-data-table"},[e.createElementVNode("div",gt,[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=>h.value.showTable=!1),onKeypress:o[4]||(o[4]=e.withKeys(l=>h.value.showTable=!1,["enter"]))},[e.createVNode(He.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":re.value})},[e.createElementVNode("table",mt,[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",bt,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(m.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},[e.createElementVNode("div",kt,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(k.value)?"":k.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(m.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":m.value.head[0]??""},[e.createElementVNode("div",_t,[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,Ct),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[1]??""},[e.createElementVNode("div",wt,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,xt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[2]??""},[e.createElementVNode("div",$t,e.toDisplayString(["",NaN,void 0].includes(l.percentageToTotal)?"":`${(l.percentageToTotal*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Nt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[3]??""},[e.createElementVNode("div",Vt,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":m.value.head[4]??""},[e.createElementVNode("div",Bt,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,Tt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[5]??""},[e.createElementVNode("div",Lt,e.toDisplayString(["",NaN,void 0].includes(l.childPercentageToParent)?"":`${(l.childPercentageToParent*100).toFixed(t.value.table.td.roundingPercentage)}%`),1)],12,Et),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":m.value.head[6]??""},[e.createElementVNode("div",zt,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)],46,Je))}},Ft=Ke._export_sfc(Dt,[["__scopeId","data-v-743d59c1"]]);exports.default=Ft;
|