vue-data-ui 2.3.73 → 2.3.75
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-B9ZuNkP-.js → Arrow-BTG7M25z.js} +1 -1
- package/dist/{Arrow-B8nZeqNJ.cjs → Arrow-CZK77NmC.cjs} +1 -1
- package/dist/{BaseIcon-CXbZK6D-.cjs → BaseIcon--PMhZ3f-.cjs} +1 -1
- package/dist/{BaseIcon-_V_BEdy8.js → BaseIcon-BAOfPaXs.js} +1 -1
- package/dist/{DataTable-BOdJVZzF.js → DataTable-CQANRZju.js} +2 -2
- package/dist/{DataTable-wmKwMbsJ.cjs → DataTable-DjQzrklZ.cjs} +1 -1
- package/dist/{Legend-DdndVhHV.cjs → Legend-CtbPB0Bo.cjs} +1 -1
- package/dist/{Legend-CHd5QFPM.js → Legend-DX1kv21U.js} +1 -1
- package/dist/{Shape-CLRxBhyM.cjs → Shape-CadGs1Am.cjs} +1 -1
- package/dist/{Shape-DNbJlwSU.js → Shape-kqcyauhC.js} +1 -1
- package/dist/{Slicer-Dts-BToH.cjs → Slicer-i_oECHxH.cjs} +1 -1
- package/dist/{Slicer-8Gg45iGX.js → Slicer-yaJs-izT.js} +2 -2
- package/dist/{Title-Ngy9HNqO.js → Title-C26I_HC3.js} +1 -1
- package/dist/{Title-CujodUjt.cjs → Title-XBiDFYKD.cjs} +1 -1
- package/dist/{Tooltip-BCtg7xYX.js → Tooltip-CH8GmDCG.js} +1 -1
- package/dist/{Tooltip-DsmWz8gF.cjs → Tooltip-DxtWkIt5.cjs} +1 -1
- package/dist/{index-Dvs5Ra-u.js → index-Cm4Iry5c.js} +1 -1
- package/dist/{index-sFjJ2dIj.cjs → index-DYUBiaGS.cjs} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-UohhCyBz.js → useNestedProp-CurQIHTa.js} +1 -1
- package/dist/{useNestedProp-ir0jEo5M.cjs → useNestedProp-w7AMWWmz.cjs} +1 -1
- package/dist/{usePrinter-B8-keRMa.js → usePrinter-B8RnF8_q.js} +1 -1
- package/dist/{usePrinter-DSMMs1w9.cjs → usePrinter-ZlHxdaEz.cjs} +1 -1
- package/dist/{vue-data-ui-NvV5qa--.cjs → vue-data-ui-B7amrpT-.cjs} +1 -1
- package/dist/{vue-data-ui-Bgo6YUhl.js → vue-data-ui-Bj6kEIpq.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-BAz41kL7.cjs +19 -0
- package/dist/{vue-ui-3d-bar-DckNIYgA.js → vue-ui-3d-bar-Bg9IgVVc.js} +499 -486
- package/dist/{vue-ui-accordion-RuCkf_li.cjs → vue-ui-accordion-1WxrfiCH.cjs} +1 -1
- package/dist/{vue-ui-accordion-C-qAry7P.js → vue-ui-accordion-Cb6XBCbu.js} +3 -3
- package/dist/{vue-ui-age-pyramid-CamjaXUw.js → vue-ui-age-pyramid-BhwmnQru.js} +182 -169
- package/dist/vue-ui-age-pyramid-CHNvRXx8.cjs +1 -0
- package/dist/{vue-ui-annotator-D0kYZ56C.cjs → vue-ui-annotator-B22cdlhA.cjs} +1 -1
- package/dist/{vue-ui-annotator-DMmdqorj.js → vue-ui-annotator-BiHQvMdW.js} +1 -1
- package/dist/{vue-ui-candlestick-DRi8lDTn.js → vue-ui-candlestick-Cl9dyh4l.js} +295 -279
- package/dist/vue-ui-candlestick-D7DjdYyw.cjs +2 -0
- package/dist/vue-ui-carousel-table-Do5cYRqN.cjs +1 -0
- package/dist/{vue-ui-carousel-table-u5OoOMr1.js → vue-ui-carousel-table-QsONwqNz.js} +106 -91
- package/dist/vue-ui-chestnut-CyE8MafY.cjs +6 -0
- package/dist/{vue-ui-chestnut-D5a4OH1D.js → vue-ui-chestnut-Drb01WMC.js} +215 -204
- package/dist/{vue-ui-cursor-Bp_PHbz4.js → vue-ui-cursor-BP04_XbB.js} +2 -2
- package/dist/{vue-ui-cursor-DpBsZNEE.cjs → vue-ui-cursor-DZeTQBKz.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BwBYH8V_.js → vue-ui-dashboard-BWdx5gjZ.js} +2 -2
- package/dist/{vue-ui-dashboard--kjU0uMc.cjs → vue-ui-dashboard-Z63RE1XS.cjs} +1 -1
- package/dist/{vue-ui-digits-CIV9J3SW.cjs → vue-ui-digits-CBQaHW6a.cjs} +1 -1
- package/dist/{vue-ui-digits-t2G4B6uD.js → vue-ui-digits-DUhkLcmd.js} +2 -2
- package/dist/vue-ui-donut-D2YJYgOB.cjs +1 -0
- package/dist/{vue-ui-donut-BTug2gsP.js → vue-ui-donut-DRPSwmGr.js} +376 -362
- package/dist/{vue-ui-donut-evolution-DTD0Hfgh.js → vue-ui-donut-evolution-gRXAyxq8.js} +270 -255
- package/dist/vue-ui-donut-evolution-jAMVgNHQ.cjs +1 -0
- package/dist/{vue-ui-dumbbell-BZw7lntE.js → vue-ui-dumbbell-CQo5jqSK.js} +232 -213
- package/dist/vue-ui-dumbbell-DLfZcrXq.cjs +9 -0
- package/dist/vue-ui-flow-BQ3UbMUb.js +481 -0
- package/dist/vue-ui-flow-BlX2-eEC.cjs +1 -0
- package/dist/{vue-ui-galaxy-Bjlm3WtB.js → vue-ui-galaxy-BHWugUKG.js} +175 -162
- package/dist/vue-ui-galaxy-Cax5o6Yl.cjs +1 -0
- package/dist/vue-ui-gauge-DG6_kvKh.js +500 -0
- package/dist/vue-ui-gauge-DpGcv_00.cjs +1 -0
- package/dist/vue-ui-gizmo-D9Vh9Rmr.cjs +1 -0
- package/dist/{vue-ui-gizmo-CiutQM-A.js → vue-ui-gizmo-bV148qAf.js} +66 -53
- package/dist/{vue-ui-heatmap-C933pQPU.js → vue-ui-heatmap-BZZUvnMa.js} +157 -143
- package/dist/vue-ui-heatmap-B_ELXKKV.cjs +1 -0
- package/dist/vue-ui-kpi-C5v7qQvZ.js +98 -0
- package/dist/vue-ui-kpi-CwVAvTB2.cjs +1 -0
- package/dist/{vue-ui-mini-loader-B5XG2gKd.js → vue-ui-mini-loader-BdKizX_J.js} +2 -2
- package/dist/{vue-ui-mini-loader-C67Z1C6r.cjs → vue-ui-mini-loader-DZNY-3rr.cjs} +1 -1
- package/dist/{vue-ui-molecule-DzIeuL8t.js → vue-ui-molecule-MKyrhqqm.js} +177 -167
- package/dist/vue-ui-molecule-bva6OvPc.cjs +1 -0
- package/dist/{vue-ui-mood-radar-02L4M-n_.js → vue-ui-mood-radar-BNIFFvq0.js} +172 -161
- package/dist/vue-ui-mood-radar-CzQOAyNI.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-BY50trfJ.js → vue-ui-nested-donuts-BDAlZrMF.js} +377 -364
- package/dist/vue-ui-nested-donuts-CxdZC6JF.cjs +17 -0
- package/dist/{vue-ui-onion-BmQ7B9xY.js → vue-ui-onion-CFa4VD-w.js} +191 -177
- package/dist/vue-ui-onion-Df7YcsVR.cjs +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-D7Q2zfcR.cjs +8 -0
- package/dist/{vue-ui-parallel-coordinate-plot-BdfcqlfT.js → vue-ui-parallel-coordinate-plot-DmqYXT-U.js} +298 -284
- package/dist/{vue-ui-quadrant-CLimyRoA.js → vue-ui-quadrant-D5jHkq9g.js} +347 -334
- package/dist/vue-ui-quadrant-ZqhcVYf5.cjs +1 -0
- package/dist/{vue-ui-quick-chart-CX8Kas-o.js → vue-ui-quick-chart-BjXXSx7V.js} +483 -469
- package/dist/vue-ui-quick-chart-Dt9AsEU6.cjs +15 -0
- package/dist/vue-ui-radar-2EuZr7i2.cjs +1 -0
- package/dist/{vue-ui-radar-CK0PB5oY.js → vue-ui-radar-CW8EKW4o.js} +202 -189
- package/dist/{vue-ui-rating-Ceu3pXmF.cjs → vue-ui-rating-DrtLvVA0.cjs} +1 -1
- package/dist/{vue-ui-rating-BnqWN2ui.js → vue-ui-rating-eSWsmJUU.js} +2 -2
- package/dist/vue-ui-relation-circle-C60OTe88.cjs +1 -0
- package/dist/vue-ui-relation-circle-DiUCpEqa.js +322 -0
- package/dist/{vue-ui-rings-CYthauSM.js → vue-ui-rings-BxhLbyG0.js} +203 -189
- package/dist/vue-ui-rings-CHq-a5ZS.cjs +2 -0
- package/dist/{vue-ui-scatter-Cxr9eymz.js → vue-ui-scatter-DQchX_mM.js} +284 -270
- package/dist/vue-ui-scatter-DZUZUbnk.cjs +1 -0
- package/dist/{vue-ui-screenshot-CVWC5rbJ.js → vue-ui-screenshot-CLa9vMzM.js} +1 -1
- package/dist/{vue-ui-screenshot-sBd8-Oyh.cjs → vue-ui-screenshot-SLSIpqx2.cjs} +1 -1
- package/dist/{vue-ui-skeleton-CAvlIcgk.js → vue-ui-skeleton-C1oUnz7R.js} +2 -2
- package/dist/{vue-ui-skeleton-CqF0NJ4g.cjs → vue-ui-skeleton-ClpTCY1x.cjs} +1 -1
- package/dist/{vue-ui-smiley-CXbipVsb.js → vue-ui-smiley-CmWHSt1S.js} +2 -2
- package/dist/{vue-ui-smiley-c_I60YOy.cjs → vue-ui-smiley-Daw8fPDy.cjs} +1 -1
- package/dist/vue-ui-spark-trend-CO69Dg31.js +263 -0
- package/dist/vue-ui-spark-trend-DmDlv8ie.cjs +1 -0
- package/dist/{vue-ui-sparkbar-Dm-2_5Ef.js → vue-ui-sparkbar-BRlqpe4e.js} +95 -87
- package/dist/vue-ui-sparkbar-BUGdi0BY.cjs +1 -0
- package/dist/vue-ui-sparkgauge-CCxKzDjT.cjs +1 -0
- package/dist/vue-ui-sparkgauge-CbuFESsM.js +178 -0
- package/dist/{vue-ui-sparkhistogram-qf87TXA-.js → vue-ui-sparkhistogram-B4-hrDHz.js} +79 -68
- package/dist/vue-ui-sparkhistogram-XtqX10_t.cjs +1 -0
- package/dist/vue-ui-sparkline-BZTEi9YC.cjs +1 -0
- package/dist/{vue-ui-sparkline-CZBgvY1A.js → vue-ui-sparkline-DlXNmG6M.js} +142 -123
- package/dist/vue-ui-sparkstackbar-CDmZeXnq.cjs +1 -0
- package/dist/{vue-ui-sparkstackbar-GtkDZDXZ.js → vue-ui-sparkstackbar-J1YowQmP.js} +120 -104
- package/dist/{vue-ui-stackbar-D_Ui7xec.js → vue-ui-stackbar-CKIDqkkY.js} +235 -222
- package/dist/vue-ui-stackbar-CXGWukoJ.cjs +6 -0
- package/dist/vue-ui-strip-plot-CvmoRcYN.cjs +1 -0
- package/dist/{vue-ui-strip-plot--VJ3f5UV.js → vue-ui-strip-plot-JVLwIy0j.js} +246 -232
- package/dist/{vue-ui-table-BCQ7voEV.js → vue-ui-table-BSi_cHh7.js} +1 -1
- package/dist/{vue-ui-table-B_6N0VOD.cjs → vue-ui-table-Dqi64VE7.cjs} +1 -1
- package/dist/vue-ui-table-heatmap-BwghEh5t.cjs +1 -0
- package/dist/{vue-ui-table-heatmap-UwpQQMHB.js → vue-ui-table-heatmap-CfvW3rcm.js} +106 -95
- package/dist/{vue-ui-table-sparkline-Bzqs2Hcp.js → vue-ui-table-sparkline-Y6Lrrzxy.js} +151 -138
- package/dist/vue-ui-table-sparkline-bIy3kkHB.cjs +1 -0
- package/dist/{vue-ui-thermometer-BQbYzsSV.js → vue-ui-thermometer-BPTs7Nxc.js} +116 -104
- package/dist/vue-ui-thermometer-DDtxYr7w.cjs +1 -0
- package/dist/{vue-ui-timer-KGEswANF.js → vue-ui-timer-CkB7eZaE.js} +191 -176
- package/dist/vue-ui-timer-DRSSYxOX.cjs +64 -0
- package/dist/{vue-ui-tiremarks-BSkMCIu1.js → vue-ui-tiremarks-BbOaoY8S.js} +115 -103
- package/dist/vue-ui-tiremarks-Bttwg3-p.cjs +1 -0
- package/dist/vue-ui-treemap-Chq0WQPe.cjs +1 -0
- package/dist/{vue-ui-treemap-DIWveOrq.js → vue-ui-treemap-CoaK3wBl.js} +251 -237
- package/dist/{vue-ui-vertical-bar-Dx6wReOw.js → vue-ui-vertical-bar-BA43_uHV.js} +374 -358
- package/dist/vue-ui-vertical-bar-BLIUt-HT.cjs +4 -0
- package/dist/{vue-ui-waffle-D3jMPOd3.js → vue-ui-waffle-BoEf8CcG.js} +285 -265
- package/dist/vue-ui-waffle-NBjY0mko.cjs +1 -0
- package/dist/vue-ui-wheel-Bgo2jpj0.js +255 -0
- package/dist/vue-ui-wheel-t5bI4a-P.cjs +1 -0
- package/dist/vue-ui-word-cloud-DPW_-Hzz.cjs +1 -0
- package/dist/vue-ui-word-cloud-Jd9_JUyi.js +512 -0
- package/dist/{vue-ui-xy-9_2IHEOX.js → vue-ui-xy-BMBYAC4z.js} +300 -274
- package/dist/vue-ui-xy-CBHEBcZK.cjs +3 -0
- package/dist/vue-ui-xy-canvas-D5FqRF4p.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-DGuGy69l.js → vue-ui-xy-canvas-LOsQ_DM-.js} +345 -327
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-DhzN0gd4.cjs +0 -19
- package/dist/vue-ui-age-pyramid-CfUUEeKt.cjs +0 -1
- package/dist/vue-ui-candlestick-DJIJnnI_.cjs +0 -2
- package/dist/vue-ui-carousel-table-uYt1zVjx.cjs +0 -1
- package/dist/vue-ui-chestnut-CG5krVO-.cjs +0 -6
- package/dist/vue-ui-donut-D6SrEIEJ.cjs +0 -1
- package/dist/vue-ui-donut-evolution-Cb45erSA.cjs +0 -1
- package/dist/vue-ui-dumbbell-DVabaAYH.cjs +0 -9
- package/dist/vue-ui-flow-Bn1EP9Z1.cjs +0 -1
- package/dist/vue-ui-flow-Cz_xaLAs.js +0 -469
- package/dist/vue-ui-galaxy-Drnhlmmw.cjs +0 -1
- package/dist/vue-ui-gauge-CxIVYnG2.js +0 -488
- package/dist/vue-ui-gauge-D2reVZ-b.cjs +0 -1
- package/dist/vue-ui-gizmo-B6ZwXwFY.cjs +0 -1
- package/dist/vue-ui-heatmap-ClFm7qUu.cjs +0 -1
- package/dist/vue-ui-kpi-CdPFWSHA.cjs +0 -1
- package/dist/vue-ui-kpi-ClreiT4V.js +0 -84
- package/dist/vue-ui-molecule-JJQ3af-R.cjs +0 -1
- package/dist/vue-ui-mood-radar-DT4JU_6B.cjs +0 -1
- package/dist/vue-ui-nested-donuts-D6Dihmne.cjs +0 -17
- package/dist/vue-ui-onion-DoNDCpth.cjs +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-CJMjEDXR.cjs +0 -8
- package/dist/vue-ui-quadrant-DWqmU3-5.cjs +0 -1
- package/dist/vue-ui-quick-chart-CB5VelG0.cjs +0 -15
- package/dist/vue-ui-radar-aTceo-HQ.cjs +0 -1
- package/dist/vue-ui-relation-circle-D1z8MBVH.js +0 -310
- package/dist/vue-ui-relation-circle-DWGtziD_.cjs +0 -1
- package/dist/vue-ui-rings-gp0sEMy6.cjs +0 -2
- package/dist/vue-ui-scatter-BKl2fUIR.cjs +0 -1
- package/dist/vue-ui-spark-trend-C3sBXu8D.js +0 -251
- package/dist/vue-ui-spark-trend-CXkkMK6N.cjs +0 -1
- package/dist/vue-ui-sparkbar-BkN5iTUq.cjs +0 -1
- package/dist/vue-ui-sparkgauge-D4EqU3x3.cjs +0 -1
- package/dist/vue-ui-sparkgauge-FKTXvE7e.js +0 -167
- package/dist/vue-ui-sparkhistogram-BkJz2dBD.cjs +0 -1
- package/dist/vue-ui-sparkline-TPkuvKtA.cjs +0 -1
- package/dist/vue-ui-sparkstackbar-CzzfnPDS.cjs +0 -1
- package/dist/vue-ui-stackbar-NHgsl2-Z.cjs +0 -6
- package/dist/vue-ui-strip-plot-CU6OtKt7.cjs +0 -1
- package/dist/vue-ui-table-heatmap-DFMF1RZ0.cjs +0 -1
- package/dist/vue-ui-table-sparkline-DWvOKdPb.cjs +0 -1
- package/dist/vue-ui-thermometer-BOuuVWuf.cjs +0 -1
- package/dist/vue-ui-timer-BCiMjXdm.cjs +0 -64
- package/dist/vue-ui-tiremarks-DuEz8cO5.cjs +0 -1
- package/dist/vue-ui-treemap-BO8gKQ4O.cjs +0 -1
- package/dist/vue-ui-vertical-bar-Dpzyha_P.cjs +0 -4
- package/dist/vue-ui-waffle-C0-IVDjk.cjs +0 -1
- package/dist/vue-ui-wheel-B10kCoLD.js +0 -242
- package/dist/vue-ui-wheel-mWdIHlXV.cjs +0 -1
- package/dist/vue-ui-word-cloud-CYtRxpdV.cjs +0 -1
- package/dist/vue-ui-word-cloud-rhrsHes4.js +0 -498
- package/dist/vue-ui-xy-CFqs5rtd.cjs +0 -3
- package/dist/vue-ui-xy-canvas-sLH0pM-i.cjs +0 -9
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-sFjJ2dIj.cjs"),ke=require("./useResponsive-B3TrDDIG.cjs"),oe=require("./BaseIcon-CXbZK6D-.cjs"),Ve=require("./Tooltip-DsmWz8gF.cjs"),ge=require("./usePrinter-DSMMs1w9.cjs"),Fe=require("./Slicer-Dts-BToH.cjs"),$e=require("./vue-ui-skeleton-CqF0NJ4g.cjs"),ye=require("./useNestedProp-ir0jEo5M.cjs"),Pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Te=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function Re({dataset:s,barLineSwitch:B=6}){let h=null,_=null,z=0;if((typeof s=="number"||typeof s=="string")&&console.warn(`The provided dataset (${s}) is not sufficient to build a chart`),J(s)&&(P(s)&&(s.length<B?h=S.BAR:h=S.LINE,_=s,z=s.length),ne(s))){if(!Me(s))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(s[0]),j=Object.values(s[0]);if(!U.some(E=>Oe(E)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;xe(j,E=>typeof E=="number")&&(h=S.DONUT,_=s),xe(j,E=>Array.isArray(E)&&P(E))&&(Se(s)>B?h=S.LINE:h=S.BAR,z=Se(s),_=s.map(E=>({...E,data:De(E,$=>P($))}))),s=s.map(E=>be(E)),_=_.map(E=>be(E))}return J(s)&&[...new Set(s.flatMap(U=>Array.isArray(U)))][0],{dataset:s,type:h,usableDataset:_,maxSeriesLength:z}}function Be(s){return!s||J(s)&&!s.length}function J(s){return Array.isArray(s)}function P(s){if(!J(s)||Be(s))return!1;const B=s.map(h=>Number(h));return![...new Set(B.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function ne(s){return!J(s)||Be(s)||!![...new Set(s.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!s.map(h=>Object.keys(h).length>0).includes(!1)}function Ie(s,B){const h=Object.keys(s).sort(),_=Object.keys(B).sort();if(h.length!==_.length)return!1;for(let z=0;z<h.length;z+=1){const F=h[z],D=_[z];if(F!==D||typeof s[F]!=typeof B[D])return!1}return!0}function Me(s){if(s.length<=1)return!0;for(let B=0;B<s.length;B+=1)for(let h=B+1;h<s.length;h+=1)if(!Ie(s[B],s[h]))return!1;return!0}function Oe(s){return Te.includes(s.toUpperCase())}function xe(s,B){let h=[];for(let _=0;_<s.length;_+=1)h.push(B(s[_]));return h.includes(!0)}function Se(s){return Math.max(...[...s].flatMap(B=>Object.values(B).filter(h=>P(h)).map(h=>h.length)))}function De(s,B){return Object.values(s).filter(h=>B(h))[0]}function be(s){const B={};for(let h in s)s.hasOwnProperty(h)&&(B[h.toUpperCase()]=s[h]);return B}const we=s=>(e.pushScopeId("data-v-bf59d888"),s=s(),e.popScopeId(),s),Ue=["id"],qe=["xmlns","viewBox"],We=["id"],je=["id"],Ge=we(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),He=["id"],Xe=["flood-color"],Ye={key:0,class:"donut-label-connectors"},Ze=["d","stroke","stroke-width","filter"],Je=["cx","cy","r","fill"],Qe=["cx","cy","r","fill","filter"],Ke={class:"donut"},et=["d","fill","stroke","stroke-width","filter"],tt=["d","onMouseenter","onClick"],lt={key:1,class:"donut-labels quick-animation"},at=["cx","cy","fill","filter"],ot=["text-anchor","x","y","fill","font-size","filter"],nt=["text-anchor","x","y","fill","font-size","filter"],rt={key:2,class:"donut-hollow quick-animation"},it=["x","y","font-size","fill"],ut=["x","y","font-size","fill"],st={key:0,class:"line-grid"},ct=["x1","x2","y1","y2","stroke","stroke-width"],dt=["x1","x2","y1","y2","stroke","stroke-width"],vt={key:1,class:"line-axis"},mt=["x1","x2","y1","y2","stroke","stroke-width"],ht=["x1","x2","y1","y2","stroke","stroke-width"],ft={key:2,class:"yLabels"},pt=["x1","x2","y1","y2","stroke","stroke-width"],kt=["x","y","font-size","fill"],gt={key:3,class:"periodLabels"},yt=["x1","x2","y1","y2","stroke","stroke-width"],xt=["font-size","text-anchor","fill","transform"],St={class:"plots"},bt={class:"line-plot-series"},Bt=["d","stroke","stroke-width"],wt=["d","stroke","stroke-width"],Et=["d","stroke","stroke-width"],Lt=["d","stroke","stroke-width"],_t=["cx","cy","fill","stroke"],At={key:4,class:"dataLabels"},Ct=["font-size","fill","x","y"],Nt={class:"tooltip-traps"},zt=["x","y","height","width","fill","onMouseenter","onClick"],Vt={key:0,class:"line-grid"},Ft=["x1","x2","y1","y2","stroke","stroke-width"],$t=["x1","x2","y1","y2","stroke","stroke-width"],Pt={key:1,class:"line-axis"},Tt=["x1","x2","y1","y2","stroke","stroke-width"],Rt=["x1","x2","y1","y2","stroke","stroke-width"],It={key:2,class:"yLabels"},Mt=["x1","x2","y1","y2","stroke","stroke-width"],Ot=["x","y","font-size","fill"],Dt={key:3,class:"periodLabels"},Ut=["x1","x2","y1","y2","stroke","stroke-width"],qt=["font-size","text-anchor","transform","fill"],Wt={class:"plots"},jt=["x","width","height","y","fill","stroke","stroke-width"],Gt=["to"],Ht=["from","to"],Xt={key:4,class:"dataLabels"},Yt=["x","y","font-size","fill"],Zt={class:"tooltip-traps"},Jt=["x","y","height","width","fill","onMouseenter","onClick"],Qt={key:3,class:"axis-labels"},Kt={key:0},el=["font-size","fill","x","y"],tl={key:1},ll=["font-size","fill","x","y"],al={key:2},ol=["font-size","fill","transform"],nl={key:3},rl=["font-size","fill","transform"],il={key:4,class:"vue-data-ui-watermark"},ul=["onClick"],sl=["onClick"],cl=["onClick"],dl={key:1,class:"vue-ui-quick-chart-not-processable"},vl=we(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),ml={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(s,{expose:B,emit:h}){const _=s,{vue_ui_quick_chart:z}=u.useConfig(),F=e.ref(null),D=e.ref(null),U=e.ref(null),j=e.ref(null),E=e.ref(u.createUid()),$=e.ref(!1),G=e.ref(null),R=e.ref(""),V=e.ref(null),x=e.ref([]),se=e.ref(0),re=e.ref(0),t=e.computed(()=>{const i=ye.useNestedProp({userConfig:_.config,defaultConfig:z});return i.theme?{...ye.useNestedProp({userConfig:u.themes.vue_ui_quick_chart[i.theme]||_.config,defaultConfig:i}),customPalette:u.themePalettes[i.theme]||u.palette}:i}),H=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),Q=e.computed(()=>{const i=Re({dataset:u.sanitizeArray(_.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return i||console.error("VueUiQuickChart : Dataset is not processable"),i}),k=e.ref(Q.value),Ee=e.computed(()=>!!k.value),b=e.computed(()=>k.value?k.value.type:null);e.watch(()=>b.value,i=>{i||u.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:K,isImaging:ee,generatePdf:ce,generateImage:de}=ge.usePrinter({elementId:`${b.value}_${E.value}`,fileName:t.value.title||b.value}),g=e.ref({width:t.value.width,height:t.value.height}),te=e.ref({showTooltip:t.value.showTooltip}),le=e.ref(null);e.onMounted(()=>{if(t.value.responsive){const i=ke.throttle(()=>{const{width:v,height:l}=ke.useResponsive({chart:F.value,title:t.value.title?D.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&k.value.maxSeriesLength>1?j.value:null});g.value.width=v,g.value.height=l});le.value=new ResizeObserver(i),le.value.observe(F.value.parentNode)}}),e.onBeforeUnmount(()=>{le.value&&le.value.disconnect()});const Le=e.computed(()=>{switch(b.value){case S.LINE:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;case S.BAR:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;case S.DONUT:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;default:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`}});function ve(i){return[...i].map(v=>v.value).reduce((v,l)=>v+l,0)}function X(i){return t.value.blurOnHover&&![null,void 0].includes(V.value)&&V.value!==i?`url(#blur_${E.value})`:""}function me(i,v){x.value.includes(i)?x.value=x.value.filter(l=>l!==i):x.value.length<v&&x.value.push(i)}const he=e.ref(null),fe=e.ref(null),ae=e.ref(!1);function _e(i,v){ae.value=!0;let l=i.value;if(x.value.includes(i.id)){let r=function(){l>n?(ae.value=!1,cancelAnimationFrame(fe.value),k.value={...k.value,dataset:k.value.dataset.map((m,A)=>i.id===`donut_${A}`?{...m,value:n,VALUE:n}:m)}):(l+=n*.025,k.value={...k.value,dataset:k.value.dataset.map((m,A)=>i.id===`donut_${A}`?{...m,value:l,VALUE:l}:m)},fe.value=requestAnimationFrame(r))};x.value=x.value.filter(m=>m!==i.id);const n=Q.value.dataset.find((m,A)=>i.id===`donut_${A}`).VALUE;r()}else if(v.length>1){let n=function(){l<.1?(ae.value=!1,cancelAnimationFrame(he.value),x.value.push(i.id),k.value={...k.value,dataset:k.value.dataset.map((r,m)=>i.id===`donut_${m}`?{...r,value:0,VALUE:0}:r)}):(l/=1.1,k.value={...k.value,dataset:k.value.dataset.map((r,m)=>i.id===`donut_${m}`?{...r,value:l,VALUE:l}:r)},he.value=requestAnimationFrame(n))};n()}}const T=e.ref(null);function Ae(i){T.value=i}const w=e.computed(()=>{if(b.value!==S.DONUT)return null;const i=k.value.dataset.map((a,o)=>({...a,value:a.VALUE||a.DATA||a.SERIE||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`donut_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],immutableValue:a.value}));function v(a,o){return u.dataLabel({v:isNaN(a.value/ve(o))?0:a.value/ve(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function n(a,o){const p=Q.value.dataset.find((L,C)=>`donut_${C}`===a).VALUE;return Math.abs(String(Number(p.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function r({datapoint:a,seriesIndex:o}){G.value={datapoint:a,seriesIndex:o,config:t.value,dataset:i},V.value=a.id;const p=t.value.tooltipCustomFormat;if(u.isFunction(p)&&u.functionReturnsString(()=>p({datapoint:a,seriesIndex:o,series:i,config:t.value})))R.value=p({datapoint:a,seriesIndex:o,series:i,config:t.value});else{let f="";f+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,f+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${a.color}"/></svg>`,f+=`<b>${u.applyDataLabel(t.value.formatter,a.value,u.dataLabel({p:t.value.valuePrefix,v:a.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:a,seriesIndex:o})}</b>`,f+=`<span>(${u.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,R.value=`<div>${f}</div>`}$.value=!0}function m(){$.value=!1,V.value=null,T.value=null}const A={centerX:g.value.width/2,centerY:g.value.height/2},N=i.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),q=i.map((a,o)=>({...a,proportion:(a.value||0)/N,value:a.value||0,absoluteValue:Q.value.dataset.find((p,f)=>`donut_${f}`===a.id).VALUE})),I=g.value.width/2,W=g.value.height/2,M=g.value.height*t.value.donutRadiusRatio;return{dataset:q.filter(a=>!x.value.includes(a.id)),legend:q,drawingArea:A,displayArcPercentage:v,isArcBigEnough:l,useTooltip:r,killTooltip:m,getSpaces:n,total:N,cx:I,cy:W,radius:M,chart:u.makeDonut({series:i.filter(a=>!x.value.includes(a.id))},I,W,M,M,1.99999,2,1,360,105.25,g.value.height*t.value.donutThicknessRatio)}}),y=e.ref({start:0,end:k.value.maxSeriesLength});function Ce(){y.value={start:0,end:k.value.maxSeriesLength},re.value+=1}const Ne=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let i=[];P(k.value.dataset)&&(i=k.value.dataset),ne(k.value.dataset)&&(i=k.value.dataset.map((r,m)=>({values:r.VALUE||r.DATA||r.SERIE||r.SERIES||r.VALUES||r.NUM||0,id:b.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(r=>!x.value.includes(r.id)));const v=P(i)?i.length:Math.max(...i.map(r=>r.values.length));let l=[];if(P(i))l=i;else for(let r=0;r<v;r+=1)l.push(i.map(m=>m.values[r]||0).reduce((m,A)=>(m||0)+(A||0),0));const n=Math.min(...l);return l.map(r=>r+(n<0?Math.abs(n):0))}),d=e.computed(()=>{if(b.value!==S.LINE)return null;const i={height:g.value.height,width:g.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:i.width-t.value.xyPaddingRight,bottom:i.height-t.value.xyPaddingBottom,width:i.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:i.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(k.value.dataset)&&(l=[{values:k.value.dataset.slice(y.value.start,y.value.end),absoluteIndices:k.value.dataset.map((a,o)=>o).slice(y.value.start,y.value.end),name:t.value.title,color:H.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"line_0"}]),ne(k.value.dataset)&&(l=k.value.dataset.map((a,o)=>({...a,values:a.VALUE||a.DATA||a.SERIE||a.SERIES||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`line_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],values:a.values.slice(y.value.start,y.value.end),absoluteIndices:a.values.map((p,f)=>f).slice(y.value.start,y.value.end)})));const n={max:Math.max(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),min:Math.min(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),maxSeries:Math.max(...l.map(a=>a.values.length))},r=u.calculateNiceScale(n.min<0?n.min:0,n.max<0?0:n.max,t.value.xyScaleSegments),m=n.min<0?Math.abs(n.min):0,A=n.max<0?v.top:v.bottom-m/(r.max+m)*v.height,N=v.width/n.maxSeries,q=r.ticks.map(a=>({y:v.bottom-v.height*((a+m)/(r.max+m)),x:v.left-8,value:a})),I=l.map((a,o)=>({...a,coordinates:a.values.map((p,f)=>({x:v.left+N*(f+1)-N/2,y:v.bottom-(p+m)/(r.max+m)*v.height,value:p}))})).map(a=>{let o=[];return a.coordinates.forEach(p=>{o.push(`${p.x},${p.y} `)}),{...a,linePath:o.join(" ")}});function W(a){V.value=a,T.value=a;const o=l.map(f=>({...f,value:f.values[a],absoluteIndex:f.absoluteIndices[a]})).filter(f=>!x.value.includes(f.id));G.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const p=t.value.tooltipCustomFormat;if(u.isFunction(p)&&u.functionReturnsString(()=>p({datapoint:o,seriesIndex:a,series:l,config:t.value})))R.value=p({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let f="";t.value.xyPeriods[o[0].absoluteIndex]&&(f+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[o[0].absoluteIndex]}</div>`),o.forEach((L,C)=>{f+=`
|
|
2
|
-
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
3
|
-
<svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${L.color}"/></svg>
|
|
4
|
-
<span>${L.name}:</span>
|
|
5
|
-
<b>${u.applyDataLabel(t.value.formatter,L.value,u.dataLabel({p:t.value.valuePrefix,v:L.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:L,seriesIndex:C})}
|
|
6
|
-
</b>
|
|
7
|
-
</div>
|
|
8
|
-
`}),R.value=f}$.value=!0}function M(){V.value=null,$.value=!1}return{absoluteZero:A,dataset:I.filter(a=>!x.value.includes(a.id)),legend:I,drawingArea:v,extremes:n,slotSize:N,yLabels:q,useTooltip:W,killTooltip:M}}),c=e.computed(()=>{if(b.value!==S.BAR)return null;const i={height:g.value.height,width:g.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:i.width-t.value.xyPaddingRight,bottom:i.height-t.value.xyPaddingBottom,width:i.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:i.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(k.value.dataset)&&(l=[{values:k.value.dataset.slice(y.value.start,y.value.end),absoluteIndices:k.value.dataset.map((o,p)=>p).slice(y.value.start,y.value.end),name:t.value.title,color:H.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"bar_0"}]),ne(k.value.dataset)&&(l=k.value.dataset.map((o,p)=>({...o,values:o.VALUE||o.DATA||o.SERIE||o.SERIES||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${p}`,id:`bar_${p}`})).map((o,p)=>({...o,color:o.COLOR?u.convertColorToHex(o.COLOR):H.value[p+t.value.paletteStartIndex]||u.palette[p+t.value.paletteStartIndex]||u.palette[(p+t.value.paletteStartIndex)%u.palette.length],values:o.values.slice(y.value.start,y.value.end),absoluteIndices:o.values.map((f,L)=>L).slice(y.value.start,y.value.end)})));const n={max:Math.max(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values))<0?0:Math.max(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),min:Math.min(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),maxSeries:Math.max(...l.filter(o=>!x.value.includes(o.id)).map(o=>o.values.length))},r=u.calculateNiceScale(n.min<0?n.min:0,n.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,A=v.bottom-m/(r.max+m)*v.height,N=v.width/n.maxSeries,q=r.ticks.map(o=>({y:v.bottom-v.height*((o+m)/(r.max+m)),x:v.left-8,value:o})),I=l.map((o,p)=>({...o,coordinates:o.values.map((f,L)=>{const C=(f+m)/(n.max+m)*v.height,Y=Math.abs(f)/Math.abs(n.min)*(v.height-A),ue=m/(n.max+m)*v.height,Z=N/l.filter(O=>!x.value.includes(O.id)).length-t.value.barGap/l.filter(O=>!x.value.includes(O.id)).length;return{x:v.left+N*L+Z*p+t.value.barGap/2,y:f>0?v.bottom-C:A,height:f>0?C-ue:Y,value:f,width:Z}})})),W=l.filter(o=>!x.value.includes(o.id)).map((o,p)=>({...o,coordinates:o.values.map((f,L)=>{const C=(f+m)/(n.max+m)*v.height,Y=Math.abs(f)/(n.max+m)*v.height,ue=m/(n.max+m)*v.height,Z=N/l.filter(O=>!x.value.includes(O.id)).length-t.value.barGap/l.filter(O=>!x.value.includes(O.id)).length;return{x:v.left+N*L+Z*p+t.value.barGap/2,y:f>0?v.bottom-C:A,height:f>0?C-ue:Y,value:f,width:Z}})}));function M(o){V.value=o,T.value=o;const p=l.map(L=>({...L,value:L.values[o],absoluteIndex:L.absoluteIndices[o]})).filter(L=>!x.value.includes(L.id));G.value={datapoint:p,seriesIndex:o,config:t.value,dataset:l};const f=t.value.tooltipCustomFormat;if(u.isFunction(f)&&u.functionReturnsString(()=>f({datapoint:p,seriesIndex:o,series:l,config:t.value})))R.value=f({point:p,seriesIndex:o,series:l,config:t.value});else{let L="";t.value.xyPeriods[p[0].absoluteIndex]&&(L+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[p[0].absoluteIndex]}</div>`),p.forEach((C,Y)=>{L+=`
|
|
9
|
-
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
10
|
-
<svg viewBox="0 0 12 12" height="14" width="12"><rect x=0 y="0" width="12" height="12" rx="1" stroke="none" fill="${C.color}"/></svg>
|
|
11
|
-
<span>${C.name}:</span>
|
|
12
|
-
<b>${u.applyDataLabel(t.value.formatter,C.value,u.dataLabel({p:t.value.valuePrefix,v:C.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:C,seriesIndex:Y})}
|
|
13
|
-
</b>
|
|
14
|
-
</div>
|
|
15
|
-
`}),R.value=L}$.value=!0}function a(){$.value=!1,V.value=null,T.value=null}return{absoluteZero:A,dataset:W.filter(o=>!x.value.includes(o.id)),legend:I,drawingArea:v,extremes:n,slotSize:N,yLabels:q,useTooltip:M,killTooltip:a}}),ie=e.ref(!1);function ze(i){ie.value=i,se.value+=1}function pe(){te.value.showTooltip=!te.value.showTooltip}return B({generatePdf:ce,generateImage:de,toggleTooltip:pe}),(i,v)=>Ee.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${b.value}_${E.value}`,ref_key:"quickChart",ref:F,class:e.normalizeClass({"vue-ui-quick-chart":!0,"vue-data-ui-wrapper-fullscreen":ie.value}),style:e.normalizeStyle(`background:${t.value.backgroundColor};color:${t.value.color};font-family:${t.value.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[t.value.showUserOptions?(e.openBlock(),e.createBlock(ge.UserOptions,{ref:"details",key:`user_option_${se.value}`,backgroundColor:t.value.backgroundColor,color:t.value.color,isPrinting:e.unref(K),isImaging:e.unref(ee),uid:E.value,hasTooltip:t.value.userOptionsButtons.tooltip&&t.value.showTooltip,hasPdf:t.value.userOptionsButtons.pdf,hasImg:t.value.userOptionsButtons.img,hasFullscreen:t.value.userOptionsButtons.fullscreen,hasXls:!1,isTooltip:te.value.showTooltip,isFullscreen:ie.value,titles:{...t.value.userOptionsButtonTitles},chartElement:F.value,onToggleFullscreen:ze,onGeneratePdf:e.unref(ce),onGenerateImage:e.unref(de),onToggleTooltip:pe},e.createSlots({_:2},[i.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(i.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,i.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(i.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,i.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(i.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,i.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(i.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),t.value.title?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"quickChartTitle",ref:D,class:"vue-ui-quick-chart-title",style:e.normalizeStyle(`background:${t.value.backgroundColor};color:${t.value.color};font-size:${t.value.titleFontSize}px;font-weight:${t.value.titleBold?"bold":"normal"};text-align:${t.value.titleTextAlign}`)},e.toDisplayString(t.value.title),5)):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(u.XMLNS),viewBox:Le.value,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.backgroundColor};color:${t.value.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${E.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${E.value}`},null,8,je),Ge],8,We),e.createElementVNode("filter",{id:`shadow_${E.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.donutShadowColor},null,8,Xe)],8,He)]),b.value===S.DONUT?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(u.calcNutArrowPath)(l,{x:(t.value.width||g.value.width)/2,y:(t.value.height||g.value.height)/2},16,16,!1,!1,t.value.donutLabelMarkerStrokeWidth),stroke:l.color,"stroke-width":t.value.donutLabelMarkerStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:X(l.id)},null,8,Ze)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("circle",{class:"donut-hollow",cx:(t.value.width||g.value.width)/2,cy:(t.value.height||g.value.height)/2,r:(t.value.height||g.value.height)*t.value.donutRadiusRatio,fill:t.value.backgroundColor},null,8,Je),e.createElementVNode("circle",{cx:w.value.cx,cy:w.value.cy,r:w.value.radius,fill:t.value.backgroundColor,filter:t.value.donutUseShadow?`url(#shadow_${E.value})`:""},null,8,Qe),e.createElementVNode("g",Ke,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,n)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.donutStrokeWidth,filter:X(l.id)},null,8,et))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,n)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:"transparent",onMouseenter:r=>w.value.useTooltip({datapoint:l,seriesIndex:n}),onMouseout:v[0]||(v[0]=r=>w.value.killTooltip()),onClick:r=>h("selectDatapoint",l)},null,40,tt))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(u.calcMarkerOffsetX)(l).x,cy:e.unref(u.calcMarkerOffsetY)(l)-3.7,fill:l.color,r:3,filter:X(l.id)},null,8,at)):e.createCommentVNode("",!0),w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(u.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(u.calcMarkerOffsetX)(l,!0).x,y:e.unref(u.calcMarkerOffsetY)(l),fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:X(l.id)},e.toDisplayString(w.value.displayArcPercentage(l,w.value.chart))+" ("+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:n}))+") ",9,ot)):e.createCommentVNode("",!0),w.value.isArcBigEnough(l,!0,20)?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(u.calcMarkerOffsetX)(l).anchor,x:e.unref(u.calcMarkerOffsetX)(l,!0).x,y:e.unref(u.calcMarkerOffsetY)(l)+t.value.dataLabelFontSize,fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:X(l.id)},e.toDisplayString(l.name),9,nt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.donutShowTotal?(e.openBlock(),e.createElementBlock("g",rt,[e.createElementVNode("text",{"text-anchor":"middle",x:w.value.drawingArea.centerX,y:w.value.drawingArea.centerY-t.value.donutTotalLabelFontSize/2,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(t.value.donutTotalLabelText),9,it),e.createElementVNode("text",{"text-anchor":"middle",x:w.value.drawingArea.centerX,y:w.value.drawingArea.centerY+t.value.donutTotalLabelFontSize,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.dataLabel)({p:t.value.valuePrefix,v:w.value.total,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,ut)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),b.value===S.LINE?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",st,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:d.value.drawingArea.left,x2:d.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,ct)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries+1,(l,n)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*n,x2:d.value.drawingArea.left+d.value.slotSize*n,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,dt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",vt,[e.createElementVNode("line",{x1:d.value.drawingArea.left,x2:d.value.drawingArea.left,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,mt),e.createElementVNode("line",{x1:d.value.drawingArea.left,x2:d.value.drawingArea.right,y1:isNaN(d.value.absoluteZero)?d.value.drawingArea.bottom:d.value.absoluteZero,y2:isNaN(d.value.absoluteZero)?d.value.drawingArea.bottom:d.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,ht)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:d.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,pt)):e.createCommentVNode("",!0),l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x,y:l.y+t.value.xyLabelsYFontSize/3,"text-anchor":"end","font-size":t.value.xyLabelsYFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:n})),9,kt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(y.value.start,y.value.end),(l,n)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*(n+1)-d.value.slotSize/2,x2:d.value.drawingArea.left+d.value.slotSize*(n+1)-d.value.slotSize/2,y1:d.value.drawingArea.bottom,y2:d.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,yt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(y.value.start,y.value.end),(l,n)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.xyLabelsXFontSize,"text-anchor":t.value.xyPeriodLabelsRotation>0?"start":t.value.xyPeriodLabelsRotation<0?"end":"middle",fill:t.value.color,transform:`translate(${d.value.drawingArea.left+d.value.slotSize*(n+1)-d.value.slotSize/2}, ${d.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}), rotate(${t.value.xyPeriodLabelsRotation})`},e.toDisplayString(l),9,xt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",St,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,n)=>(e.openBlock(),e.createElementBlock("g",bt,[t.value.lineSmooth?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("path",{d:`M ${e.unref(u.createSmoothPath)(l.coordinates)}`,stroke:t.value.backgroundColor,"stroke-width":t.value.lineStrokeWidth+1,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Bt),e.createElementVNode("path",{d:`M ${e.unref(u.createSmoothPath)(l.coordinates)}`,stroke:l.color,"stroke-width":t.value.lineStrokeWidth,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,wt)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("path",{d:`M ${l.linePath}`,stroke:t.value.backgroundColor,"stroke-width":t.value.lineStrokeWidth+1,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Et),e.createElementVNode("path",{d:`M ${l.linePath}`,stroke:l.color,"stroke-width":t.value.lineStrokeWidth,"stroke-linecap":"round",fill:"none",class:e.normalizeClass({"quick-animation":!0,"vue-data-ui-line-animated":t.value.lineAnimated}),style:{transition:"all 0.3s ease-in-out"}},null,10,Lt)],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(r,m)=>(e.openBlock(),e.createElementBlock("circle",{cx:r.x,cy:e.unref(u.checkNaN)(r.y),r:3,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":"0.5",class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},null,8,_t))),256))]))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",At,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(r,m)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,x:r.x,y:e.unref(u.checkNaN)(r.y)-t.value.dataLabelFontSize/2,class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,e.unref(u.checkNaN)(r.value),e.unref(u.dataLabel)({p:t.value.valuePrefix,v:e.unref(u.checkNaN)(r.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:r,seriesIndex:m})),9,Ct))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:d.value.drawingArea.left+n*d.value.slotSize,y:d.value.drawingArea.top,height:d.value.drawingArea.height<=0?1e-5:d.value.drawingArea.height,width:d.value.slotSize<=0?1e-5:d.value.slotSize,fill:[V.value,T.value].includes(n)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:r=>d.value.useTooltip(n),onMouseleave:v[1]||(v[1]=r=>d.value.killTooltip()),onClick:r=>h("selectDatapoint",d.value.dataset.map(m=>({...m,value:m.values[n]})))},null,44,zt))),256))])],64)):e.createCommentVNode("",!0),b.value===S.BAR?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Ft)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries+1,(l,n)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*n,x2:c.value.drawingArea.left+c.value.slotSize*n,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,$t))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",Pt,[e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.left,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Tt),e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:isNaN(c.value.absoluteZero)?c.value.drawingArea.bottom:c.value.absoluteZero,y2:isNaN(c.value.absoluteZero)?c.value.drawingArea.bottom:c.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Rt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",It,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.yLabels,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:c.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Mt)):e.createCommentVNode("",!0),l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x,y:l.y+t.value.xyLabelsYFontSize/3,"text-anchor":"end","font-size":t.value.xyLabelsYFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:n})),9,Ot)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",Dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(y.value.start,y.value.end),(l,n)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*(n+1)-c.value.slotSize/2,x2:c.value.drawingArea.left+c.value.slotSize*(n+1)-c.value.slotSize/2,y1:c.value.drawingArea.bottom,y2:c.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Ut))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(y.value.start,y.value.end),(l,n)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.xyLabelsXFontSize,"text-anchor":t.value.xyPeriodLabelsRotation>0?"start":t.value.xyPeriodLabelsRotation<0?"end":"middle",transform:`translate(${c.value.drawingArea.left+c.value.slotSize*(n+1)-c.value.slotSize/2}, ${c.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}) rotate(${t.value.xyPeriodLabelsRotation})`,fill:t.value.color},e.toDisplayString(l),9,qt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(r,m)=>(e.openBlock(),e.createElementBlock("rect",{x:r.x,width:r.width<=0?1e-5:r.width,height:e.unref(u.checkNaN)(r.height<=0?1e-5:r.height),y:e.unref(u.checkNaN)(r.y),fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.barStrokeWidth,"stroke-linecap":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.barAnimated&&r.value<0})},[t.value.barAnimated&&r.value>0&&!e.unref(K)&&!e.unref(ee)?(e.openBlock(),e.createElementBlock("animate",{key:0,attributeName:"height",from:0,to:r.height,dur:"0.5s"},null,8,Gt)):e.createCommentVNode("",!0),t.value.barAnimated&&r.value>0&&!e.unref(K)&&!e.unref(ee)?(e.openBlock(),e.createElementBlock("animate",{key:1,attributeName:"y",from:c.value.absoluteZero,to:c.value.absoluteZero-r.height,dur:"0.5s"},null,8,Ht)):e.createCommentVNode("",!0)],10,jt))),256))],64))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(r,m)=>(e.openBlock(),e.createElementBlock("text",{x:r.x+r.width/2,y:e.unref(u.checkNaN)(r.y)-t.value.dataLabelFontSize/2,"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,class:"quick-animation"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,e.unref(u.checkNaN)(r.value),e.unref(u.dataLabel)({p:t.value.valuePrefix,v:e.unref(u.checkNaN)(r.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:r,seriesIndex:m})),9,Yt))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Zt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:c.value.drawingArea.left+n*c.value.slotSize,y:c.value.drawingArea.top,height:c.value.drawingArea.height<=0?1e-5:c.value.drawingArea.height,width:c.value.slotSize<=0?1e-5:c.value.slotSize,fill:[V.value,T.value].includes(n)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:r=>c.value.useTooltip(n),onMouseleave:v[2]||(v[2]=r=>c.value.killTooltip()),onClick:r=>h("selectDatapoint",c.value.dataset.map(m=>({...m,value:m.values[n]})))},null,44,Jt))),256))])],64)):e.createCommentVNode("",!0),[S.LINE,S.BAR].includes(b.value)?(e.openBlock(),e.createElementBlock("g",Qt,[t.value.xAxisLabel&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("g",Kt,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:d.value.drawingArea.left+d.value.drawingArea.width/2,y:g.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,el)])):e.createCommentVNode("",!0),t.value.xAxisLabel&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("g",tl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:c.value.drawingArea.left+c.value.drawingArea.width/2,y:g.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,ll)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("g",al,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${d.value.drawingArea.top+d.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,ol)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("g",nl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${c.value.drawingArea.top+c.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,rl)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],12,qe)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($e.default,{key:3,config:{type:"line",style:{backgroundColor:t.value.backgroundColor,line:{axis:{color:t.value.xyAxisStroke},path:{color:t.value.xyAxisStroke,strokeWidth:.5}}}}},null,8,["config"])),i.$slots.watermark?(e.openBlock(),e.createElementBlock("div",il,[e.renderSlot(i.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(ee)})),void 0,!0)])):e.createCommentVNode("",!0),[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&k.value.maxSeriesLength>1?(e.openBlock(),e.createElementBlock("div",{key:`slicer_${re.value}`,ref_key:"quickChartSlicer",ref:j},[(e.openBlock(),e.createBlock(Fe.Slicer,{key:`slicer_${re.value}`,background:t.value.zoomColor,borderColor:t.value.backgroundColor,fontSize:t.value.zoomFontSize,useResetSlot:t.value.zoomUseResetSlot,labelLeft:t.value.xyPeriods[y.value.start]?t.value.xyPeriods[y.value.start]:"",labelRight:t.value.xyPeriods[y.value.end-1]?t.value.xyPeriods[y.value.end-1]:"",textColor:t.value.color,inputColor:t.value.zoomColor,selectColor:t.value.zoomHighlightColor,max:k.value.maxSeriesLength,min:0,valueStart:y.value.start,valueEnd:y.value.end,smoothMinimap:t.value.zoomMinimap.smooth,minimapSelectedColor:t.value.zoomMinimap.selectedColor,minimapSelectedColorOpacity:t.value.zoomMinimap.selectedColorOpacity,minimapSelectionRadius:t.value.zoomMinimap.selectionRadius,minimapLineColor:t.value.zoomMinimap.lineColor,minimap:Ne.value,minimapIndicatorColor:t.value.zoomMinimap.indicatorColor,minimapSelectedIndex:T.value,start:y.value.start,"onUpdate:start":v[3]||(v[3]=l=>y.value.start=l),end:y.value.end,"onUpdate:end":v[4]||(v[4]=l=>y.value.end=l),onReset:Ce,onTrapMouse:Ae},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(i.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","smoothMinimap","minimapSelectedColor","minimapSelectedColorOpacity","minimapSelectionRadius","minimapLineColor","minimap","minimapIndicatorColor","minimapSelectedIndex","start","end"]))])):e.createCommentVNode("",!0),t.value.showLegend?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"quickChartLegend",ref:U,class:"vue-ui-quick-chart-legend",style:e.normalizeStyle(`background:${t.value.backgroundColor};color:${t.value.color}`)},[b.value===S.DONUT?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(w.value.legend,(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:r=>{_e(l,w.value.dataset),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${w.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(i.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(oe.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px;font-variant-numeric:tabular-nums`)},e.toDisplayString(x.value.includes(l.id)?"-":e.unref(u.applyDataLabel)(t.value.formatter,l.absoluteValue,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.absoluteValue,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:n})),5),x.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)}," ( - % ) ",4)):ae.value?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)}," ( - % ) ",4)):(e.openBlock(),e.createElementBlock("span",{key:2,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)}," ("+e.toDisplayString(e.unref(u.dataLabel)({v:l.value/w.value.total*100,s:"%",r:t.value.dataLabelRoundingPercentage}))+") ",5))],64))],12,ul))),256)):e.createCommentVNode("",!0),b.value===S.LINE?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value.legend,(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:r=>{me(l.id,d.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${d.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(i.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(oe.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5)],64))],12,sl))),256)):e.createCommentVNode("",!0),b.value===S.BAR?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(c.value.legend,(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:r=>{me(l.id,c.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${c.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(i.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(oe.default,{name:t.value.legendIcon,stroke:l.color,size:t.value.legendIconSize},null,8,["name","stroke","size"]),e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)},e.toDisplayString(l.name),5)],64))],12,cl))),256)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createVNode(Ve._sfc_main,{show:te.value.showTooltip&&$.value,backgroundColor:t.value.backgroundColor,color:t.value.color,borderRadius:t.value.tooltipBorderRadius,borderColor:t.value.tooltipBorderColor,borderWidth:t.value.tooltipBorderWidth,fontSize:t.value.tooltipFontSize,backgroundOpacity:t.value.tooltipBackgroundOpacity,position:t.value.tooltipPosition,offsetY:t.value.tooltipOffsetY,parent:F.value,content:R.value,isCustom:e.unref(u.isFunction)(t.value.tooltipCustomFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(i.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(i.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"])],14,Ue)):(e.openBlock(),e.createElementBlock("div",dl,[e.createVNode(oe.default,{name:"circleCancel",stroke:"red"}),vl]))}},hl=Pe._export_sfc(ml,[["__scopeId","data-v-bf59d888"]]);exports.default=hl;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-sFjJ2dIj.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-CujodUjt.cjs"),Y=require("./usePrinter-DSMMs1w9.cjs"),ce=require("./Tooltip-DsmWz8gF.cjs"),de=require("./vue-ui-sparkbar-BkN5iTUq.cjs"),ve=require("./Legend-DdndVhHV.cjs"),pe=require("./DataTable-wmKwMbsJ.cjs"),he=require("./vue-ui-skeleton-CqF0NJ4g.cjs"),ge=require("./vue-ui-accordion-RuCkf_li.cjs"),J=require("./useNestedProp-ir0jEo5M.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ye=["xmlns","viewBox"],ke=["id"],be=["stop-color"],Ce=["stop-color"],we={key:0},Be=["x1","y1","x2","y2","stroke","stroke-width"],_e={key:0},xe=["d","stroke","stroke-width"],Pe=["d","stroke","stroke-width"],$e={key:1},Ne=["x","y","text-anchor","font-size","fill","onMouseenter"],Te=["points","stroke","stroke-width"],Se=["points","stroke","stroke-width","fill"],Ee={key:2},Ve=["cx","cy","fill","r","stroke"],Fe={key:3,class:"vue-data-ui-watermark"},Le=["onClick"],ze={key:0,style:{"max-width":"200px",margin:"0 auto"}},Oe={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(K,{expose:Q,emit:Z}){const d=K,{vue_ui_radar:ee}=n.useConfig(),k=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),te=e.ref(null),P=e.ref(!1),$=e.ref(""),F=e.ref(0),b=e.ref(null),L=e.ref(null),z=e.ref(null),t=e.computed(()=>{const o=J.useNestedProp({userConfig:d.config,defaultConfig:ee});return o.theme?{...J.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}),B=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=j.throttle(()=>{const{width:a,height:l}=j.useResponsive({chart:b.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(b.value.parentNode)}}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:O,isImaging:A,generatePdf:I,generateImage:R}=Y.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),D=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),oe=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),f=e.ref(!1);function M(o){f.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{f.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{f.value=!1},500)),Z("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ae(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||D.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>k.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||D.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),q=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),U=e.computed(()=>p.value.length),N=e.computed(()=>Math.min(s.value.width,s.value.height)/3),G=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:N.value,sides:U.value,rotation:0})),le=e.computed(()=>{const o=[];for(let a=0;a<N.value;a+=N.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>G.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>re({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||q.value)}));return{...o,...p.value[a],plots:l}}));function T({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function re({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const y=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||q.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>M(l),isSegregated:i.value.includes(l)}))}),ne=e.computed(()=>({cy:"radar-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":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*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{head:o,body:a,config:l,colNames:o}}),x=e.ref(null),S=e.ref([]),E=e.ref(null);function ue(o,a){S.value=[],x.value=a,P.value=!0;let l="";E.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value})))$.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value});else{l+=`<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>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||S.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});$.value=l}}function W(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Ie)=>[c.name,c.target,...c.values.flatMap(V=>[V,isNaN(V/c.target)?"":V/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function se(o){w.value=o,F.value+=1}function H(){h.value.showTable=!h.value.showTable}function X(){h.value.showTooltip=!h.value.showTooltip}return Q({getData:ae,generatePdf:I,generateCsv:W,generateImage:R,toggleTable:H,toggleTooltip:X}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:b,id:`vue-ui-radar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:L,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(ie._sfc_main,{config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:te,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(A),isPrinting:e.unref(O),uid:m.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,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:se,onGeneratePdf:e.unref(I),onGenerateCsv:W,onGenerateImage:e.unref(R),onToggleTable:H,onToggleTooltip:X},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(l.color,.05)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Ce)],8,ke))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Be))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:U.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,xe))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:G.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Pe),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:T(l).x,y:T(l).y,"text-anchor":T(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>ue(l,r),onMouseleave:a[0]||(a[0]=u=>{P.value=!1,x.value=null})},e.toDisplayString(l.name),41,Ne))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Te)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity],class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Se)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:x.value!==null&&x.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ve))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(A)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ve.Legend,{key:0,legendSet:y.value,config:ne.value,onClickMarker:a[1]||(a[1]=({i:l})=>M(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,Le)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),e.createVNode(ce._sfc_main,{show:h.value.showTooltip&&P.value,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,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:$.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(de.default,{dataset:S.value,config:oe.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),k.value?(e.openBlock(),e.createBlock(ge.default,{key:5,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.createVNode(pe.DataTable,{colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>h.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Ae=me._export_sfc(Oe,[["__scopeId","data-v-11516433"]]);exports.default=Ae;
|
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
import { useCssVars as ye, computed as c, ref as o, onMounted as me, onBeforeUnmount as ke, openBlock as a, createElementBlock as u, normalizeStyle as g, createVNode as _e, createCommentVNode as $, createBlock as Y, unref as h, createSlots as $e, withCtx as E, renderSlot as p, normalizeProps as q, guardReactiveProps as H, normalizeClass as z, createElementVNode as pe, Fragment as b, renderList as O, toDisplayString as xe } from "vue";
|
|
2
|
-
import { u as Ce, c as we, t as be, a as Oe, p as J, b as Pe, o as Ae, e as K, g as Ie, X as Fe } from "./index-Dvs5Ra-u.js";
|
|
3
|
-
import { t as Ee, u as ze } from "./useResponsive-NZB-WLRF.js";
|
|
4
|
-
import { _ as Le } from "./Title-Ngy9HNqO.js";
|
|
5
|
-
import { u as Ne, U as Re } from "./usePrinter-B8-keRMa.js";
|
|
6
|
-
import Se from "./vue-ui-skeleton-CAvlIcgk.js";
|
|
7
|
-
import { u as Q } from "./useNestedProp-UohhCyBz.js";
|
|
8
|
-
import { _ as Te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
-
const Me = ["id"], je = ["xmlns", "viewBox"], Be = ["cx", "cy", "r", "stroke", "stroke-width"], Ge = { key: 0 }, Ue = ["stroke", "d", "stroke-width"], De = { key: 1 }, Ve = ["stroke", "x1", "x2", "y1", "y2"], We = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], Xe = ["cx", "cy", "fill", "onClick", "r"], Ye = {
|
|
10
|
-
key: 3,
|
|
11
|
-
class: "vue-data-ui-watermark"
|
|
12
|
-
}, qe = {
|
|
13
|
-
__name: "vue-ui-relation-circle",
|
|
14
|
-
props: {
|
|
15
|
-
dataset: {
|
|
16
|
-
type: Array,
|
|
17
|
-
default() {
|
|
18
|
-
return [];
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
config: {
|
|
22
|
-
type: Object,
|
|
23
|
-
default() {
|
|
24
|
-
return {};
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
setup(Z, { expose: ee }) {
|
|
29
|
-
const v = Z;
|
|
30
|
-
ye((e) => ({
|
|
31
|
-
"6c440314": ae.value,
|
|
32
|
-
"6c6a2a1a": se.value,
|
|
33
|
-
"7e559f95": ie.value
|
|
34
|
-
}));
|
|
35
|
-
const { vue_ui_relation_circle: te } = Ce(), P = c(() => !!v.dataset && Object.keys(v.dataset).length), m = o(we()), L = o(0), x = o(null), N = o(null), l = c(() => {
|
|
36
|
-
const e = Q({
|
|
37
|
-
userConfig: v.config,
|
|
38
|
-
defaultConfig: te
|
|
39
|
-
});
|
|
40
|
-
return e.theme ? {
|
|
41
|
-
...Q({
|
|
42
|
-
userConfig: be.vue_ui_relation_circle[e.theme] || v.config,
|
|
43
|
-
defaultConfig: e
|
|
44
|
-
}),
|
|
45
|
-
customPalette: Oe[e.theme] || J
|
|
46
|
-
} : e;
|
|
47
|
-
}), { isPrinting: R, isImaging: S, generatePdf: T, generateImage: M } = Ne({
|
|
48
|
-
elementId: `relation_circle_${m.value}`,
|
|
49
|
-
fileName: l.value.style.title.text || "vue-ui-relation-circle"
|
|
50
|
-
}), j = c(() => Pe(l.value.customPalette)), y = o([]), k = o([]), i = o({}), d = o([]), le = o(0), A = c(() => v.dataset.slice(0, l.value.style.limit)), I = o(l.value.style.size), n = o({
|
|
51
|
-
height: l.value.style.size,
|
|
52
|
-
width: l.value.style.size
|
|
53
|
-
}), f = c({
|
|
54
|
-
get() {
|
|
55
|
-
return I.value * l.value.style.circle.radiusProportion;
|
|
56
|
-
},
|
|
57
|
-
set(e) {
|
|
58
|
-
return e;
|
|
59
|
-
}
|
|
60
|
-
}), re = c(() => l.value.style.links.curved), se = c(() => `${l.value.style.animation.speedMs}ms`), ae = c(() => f.value * 2), ie = c(() => f.value * 4), C = o(null);
|
|
61
|
-
me(() => {
|
|
62
|
-
if (Ae(v.dataset) ? K({
|
|
63
|
-
componentName: "VueUiRelationCircle",
|
|
64
|
-
type: "dataset"
|
|
65
|
-
}) : v.dataset.forEach((s, t) => {
|
|
66
|
-
Ie({
|
|
67
|
-
datasetObject: s,
|
|
68
|
-
requiredAttributes: ["id", "label", "relations", "weights"]
|
|
69
|
-
}).forEach((r) => {
|
|
70
|
-
K({
|
|
71
|
-
componentName: "VueUiRelationCircle",
|
|
72
|
-
type: "datasetSerieAttribute",
|
|
73
|
-
property: r,
|
|
74
|
-
index: t
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
}), l.value.responsive) {
|
|
78
|
-
const s = Ee(() => {
|
|
79
|
-
const { width: t, height: r } = ze({
|
|
80
|
-
chart: x.value,
|
|
81
|
-
title: l.value.style.title.text ? N.value : null
|
|
82
|
-
});
|
|
83
|
-
I.value = Math.min(t, r), n.value.width = t, n.value.height = r, f.value = I.value * l.value.style.circle.radiusProportion, y.value = [], k.value = [], G(), U();
|
|
84
|
-
});
|
|
85
|
-
C.value = new ResizeObserver(s), C.value.observe(x.value.parentNode);
|
|
86
|
-
} else
|
|
87
|
-
G(), U();
|
|
88
|
-
document.getElementById(`relation_circle_${m.value}`).addEventListener("click", B);
|
|
89
|
-
}), ke(() => {
|
|
90
|
-
document.getElementById(`relation_circle_${m.value}`).removeEventListener("click", B), C.value && C.value.disconnect();
|
|
91
|
-
});
|
|
92
|
-
function B(e) {
|
|
93
|
-
const s = e.target;
|
|
94
|
-
s && Array.from(s.classList).includes("vue-ui-user-options") || s && Array.from(s.classList).includes("vue-ui-user-options-summary") || s && Array.from(s.classList).includes("vue-data-ui-button") || s && Array.from(s.classList).includes("vue-ui-relation-circle-legend") || (i.value = {}, d.value = []);
|
|
95
|
-
}
|
|
96
|
-
function G() {
|
|
97
|
-
const e = 6.28319 / A.value.length, s = 360 / A.value.length;
|
|
98
|
-
let t = 0, r = 0;
|
|
99
|
-
A.value.forEach((_, F) => {
|
|
100
|
-
const ge = f.value * Math.cos(t) + n.value.width / 2, he = f.value * Math.sin(t) + n.value.height / 2 + l.value.style.circle.offsetY;
|
|
101
|
-
y.value.push({ x: ge, y: he, ..._, color: _.color ? _.color : j.value[F] ? j.value[F] : J[F], regAngle: r }), t += e, r += s;
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
function U() {
|
|
105
|
-
y.value.forEach((e) => {
|
|
106
|
-
y.value.filter((t) => t.relations.includes(e.id)).forEach((t, r) => {
|
|
107
|
-
k.value.push({
|
|
108
|
-
weight: e.weights && e.weights[r] ? e.weights[r] : 1,
|
|
109
|
-
relationId: `${e.id}_${t.id}`,
|
|
110
|
-
x1: e.x,
|
|
111
|
-
y1: e.y,
|
|
112
|
-
x2: t.x,
|
|
113
|
-
y2: t.y,
|
|
114
|
-
colorSource: e.color,
|
|
115
|
-
colorTarget: t.color,
|
|
116
|
-
...e
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
const ne = c(() => Math.max(...k.value.map((e) => e.weight)));
|
|
122
|
-
function ue(e) {
|
|
123
|
-
return Object.hasOwn(i.value, "x") ? d.value.includes(e.id) ? "opacity:1" : "opacity:0.1" : "opacity:1";
|
|
124
|
-
}
|
|
125
|
-
function D(e) {
|
|
126
|
-
return Object.hasOwn(i.value, "x") ? e.colorTarget : e.colorSource;
|
|
127
|
-
}
|
|
128
|
-
function V(e) {
|
|
129
|
-
return Object.hasOwn(i.value, "x") ? d.value.includes(e.id) && e.relationId === `${e.id}_${i.value.id}` || e.relationId === `${i.value.id}_${e.id}` ? `opacity:1;stroke-width:${X(e)}` : "opacity: 0" : "opacity: 1";
|
|
130
|
-
}
|
|
131
|
-
function oe(e) {
|
|
132
|
-
return e.regAngle > 90 && e.regAngle < 270 ? "end" : "start";
|
|
133
|
-
}
|
|
134
|
-
function ce(e) {
|
|
135
|
-
return e.regAngle > 90 && e.regAngle < 270 ? e.x - 5 : e.x + 5;
|
|
136
|
-
}
|
|
137
|
-
function de(e) {
|
|
138
|
-
return Object.hasOwn(i.value, "x") ? i.value.id === e.id || d.value.includes(e.id) ? "opacity:1" : "opacity:0.2" : "opacity:1";
|
|
139
|
-
}
|
|
140
|
-
function ve(e) {
|
|
141
|
-
return e.regAngle > 90 && e.regAngle < 270 ? `rotate(${e.regAngle + 180},${e.x},${e.y})` : `rotate(${e.regAngle},${e.x},${e.y})`;
|
|
142
|
-
}
|
|
143
|
-
function W(e) {
|
|
144
|
-
le.value = 360 - e.regAngle, i.value.id && e.id === i.value.id ? (i.value = {}, d.value = []) : (i.value = e, d.value = [...e.relations]);
|
|
145
|
-
}
|
|
146
|
-
function X(e) {
|
|
147
|
-
return e.weight / ne.value * l.value.style.links.maxWidth;
|
|
148
|
-
}
|
|
149
|
-
const w = o(!1);
|
|
150
|
-
function fe(e) {
|
|
151
|
-
w.value = e, L.value += 1;
|
|
152
|
-
}
|
|
153
|
-
return ee({
|
|
154
|
-
generatePdf: T,
|
|
155
|
-
generateImage: M
|
|
156
|
-
}), (e, s) => (a(), u("div", {
|
|
157
|
-
ref_key: "relationCircleChart",
|
|
158
|
-
ref: x,
|
|
159
|
-
class: "vue-ui-relation-circle",
|
|
160
|
-
style: g(`width:100%;background:${l.value.style.backgroundColor};text-align:center;${l.value.responsive ? "height: 100%" : ""}`),
|
|
161
|
-
id: `relation_circle_${m.value}`
|
|
162
|
-
}, [
|
|
163
|
-
l.value.style.title.text ? (a(), u("div", {
|
|
164
|
-
key: 0,
|
|
165
|
-
ref_key: "chartTitle",
|
|
166
|
-
ref: N,
|
|
167
|
-
style: g(`width:100%;background:${l.value.style.backgroundColor}`)
|
|
168
|
-
}, [
|
|
169
|
-
_e(Le, {
|
|
170
|
-
config: {
|
|
171
|
-
title: {
|
|
172
|
-
cy: "relation-div-title",
|
|
173
|
-
...l.value.style.title
|
|
174
|
-
},
|
|
175
|
-
subtitle: {
|
|
176
|
-
cy: "relation-div-subtitle",
|
|
177
|
-
...l.value.style.title.subtitle
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}, null, 8, ["config"])
|
|
181
|
-
], 4)) : $("", !0),
|
|
182
|
-
l.value.userOptions.show && P.value ? (a(), Y(Re, {
|
|
183
|
-
ref: "details",
|
|
184
|
-
key: `user_options_${L.value}`,
|
|
185
|
-
backgroundColor: l.value.style.backgroundColor,
|
|
186
|
-
color: l.value.style.color,
|
|
187
|
-
isPrinting: h(R),
|
|
188
|
-
isImaging: h(S),
|
|
189
|
-
uid: m.value,
|
|
190
|
-
hasPdf: l.value.userOptions.buttons.pdf,
|
|
191
|
-
hasImg: l.value.userOptions.buttons.img,
|
|
192
|
-
hasFullscreen: l.value.userOptions.buttons.img,
|
|
193
|
-
hasXls: !1,
|
|
194
|
-
isFullscreen: w.value,
|
|
195
|
-
titles: { ...l.value.userOptions.buttonTitles },
|
|
196
|
-
chartElement: x.value,
|
|
197
|
-
onToggleFullscreen: fe,
|
|
198
|
-
onGeneratePdf: h(T),
|
|
199
|
-
onGenerateImage: h(M)
|
|
200
|
-
}, $e({ _: 2 }, [
|
|
201
|
-
e.$slots.optionPdf ? {
|
|
202
|
-
name: "optionPdf",
|
|
203
|
-
fn: E(() => [
|
|
204
|
-
p(e.$slots, "optionPdf", {}, void 0, !0)
|
|
205
|
-
]),
|
|
206
|
-
key: "0"
|
|
207
|
-
} : void 0,
|
|
208
|
-
e.$slots.optionImg ? {
|
|
209
|
-
name: "optionImg",
|
|
210
|
-
fn: E(() => [
|
|
211
|
-
p(e.$slots, "optionImg", {}, void 0, !0)
|
|
212
|
-
]),
|
|
213
|
-
key: "1"
|
|
214
|
-
} : void 0,
|
|
215
|
-
e.$slots.optionFullscreen ? {
|
|
216
|
-
name: "optionFullscreen",
|
|
217
|
-
fn: E(({ toggleFullscreen: t, isFullscreen: r }) => [
|
|
218
|
-
p(e.$slots, "optionFullscreen", q(H({ toggleFullscreen: t, isFullscreen: r })), void 0, !0)
|
|
219
|
-
]),
|
|
220
|
-
key: "2"
|
|
221
|
-
} : void 0
|
|
222
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "onGeneratePdf", "onGenerateImage"])) : $("", !0),
|
|
223
|
-
P.value ? (a(), u("svg", {
|
|
224
|
-
key: 2,
|
|
225
|
-
xmlns: h(Fe),
|
|
226
|
-
class: z([{ "vue-data-ui-fullscreen--on": w.value, "vue-data-ui-fulscreen--off": !w.value }, "relation-circle"]),
|
|
227
|
-
viewBox: `0 0 ${n.value.width <= 0 ? 10 : n.value.width} ${n.value.height <= 0 ? 10 : n.value.height}`,
|
|
228
|
-
width: "100%",
|
|
229
|
-
style: g(`user-select:none; background:${l.value.style.backgroundColor}`)
|
|
230
|
-
}, [
|
|
231
|
-
pe("circle", {
|
|
232
|
-
cx: (n.value.width <= 0 ? 1e-4 : n.value.width) / 2,
|
|
233
|
-
cy: (n.value.height <= 0 ? 1e-4 : n.value.height) / 2 + l.value.style.circle.offsetY,
|
|
234
|
-
r: f.value <= 0 ? 1e-4 : f.value,
|
|
235
|
-
stroke: l.value.style.circle.stroke,
|
|
236
|
-
"stroke-width": l.value.style.circle.strokeWidth,
|
|
237
|
-
fill: "transparent",
|
|
238
|
-
class: "main-circle"
|
|
239
|
-
}, null, 8, Be),
|
|
240
|
-
re.value ? (a(), u("g", Ge, [
|
|
241
|
-
(a(!0), u(b, null, O(k.value, (t, r) => (a(), u("path", {
|
|
242
|
-
key: `relation_${r}`,
|
|
243
|
-
style: g(V(t)),
|
|
244
|
-
stroke: D(t),
|
|
245
|
-
class: z(["relation", { "vue-ui-relation-circle-selected": i.value.hasOwnProperty("id") && d.value.includes(t.id) }]),
|
|
246
|
-
d: `M${t.x1},${t.y1} C${t.x1},${t.y1} ${n.value.width / 2},${n.value.height / 2 + l.value.style.circle.offsetY} ${t.x2},${t.y2}`,
|
|
247
|
-
fill: "none",
|
|
248
|
-
"stroke-width": X(t),
|
|
249
|
-
"stroke-linecap": "round"
|
|
250
|
-
}, null, 14, Ue))), 128))
|
|
251
|
-
])) : (a(), u("g", De, [
|
|
252
|
-
(a(!0), u(b, null, O(k.value, (t, r) => (a(), u("line", {
|
|
253
|
-
key: `relation_${r}`,
|
|
254
|
-
stroke: D(t),
|
|
255
|
-
style: g(V(t)),
|
|
256
|
-
x1: t.x1,
|
|
257
|
-
x2: t.x2,
|
|
258
|
-
y1: t.y1,
|
|
259
|
-
y2: t.y2,
|
|
260
|
-
class: z({ "vue-ui-relation-circle-selected": i.value.hasOwnProperty("id") && d.value.includes(t.id) }),
|
|
261
|
-
"stroke-linecap": "round"
|
|
262
|
-
}, null, 14, Ve))), 128))
|
|
263
|
-
])),
|
|
264
|
-
(a(!0), u(b, null, O(y.value, (t, r) => (a(), u("text", {
|
|
265
|
-
key: `plot_text_${r}`,
|
|
266
|
-
"text-anchor": oe(t),
|
|
267
|
-
transform: ve(t),
|
|
268
|
-
x: ce(t),
|
|
269
|
-
y: t.y + 5,
|
|
270
|
-
onClick: (_) => W(t),
|
|
271
|
-
class: "vue-ui-relation-circle-legend",
|
|
272
|
-
"transform-origin": "start",
|
|
273
|
-
"font-weight": i.value.id === t.id ? "900" : "400",
|
|
274
|
-
style: g(`font-family:${l.value.style.fontFamily};${de(t)}`),
|
|
275
|
-
"font-size": l.value.style.labels.fontSize,
|
|
276
|
-
fill: l.value.style.labels.color
|
|
277
|
-
}, xe(t.label), 13, We))), 128)),
|
|
278
|
-
(a(!0), u(b, null, O(y.value, (t, r) => (a(), u("circle", {
|
|
279
|
-
cx: t.x,
|
|
280
|
-
cy: t.y,
|
|
281
|
-
key: `plot_${r}`,
|
|
282
|
-
style: g(ue(t)),
|
|
283
|
-
class: "vue-ui-relation-circle-plot",
|
|
284
|
-
fill: l.value.style.plot.color,
|
|
285
|
-
onClick: (_) => W(t),
|
|
286
|
-
r: l.value.style.plot.radius
|
|
287
|
-
}, null, 12, Xe))), 128)),
|
|
288
|
-
p(e.$slots, "svg", { svg: n.value }, void 0, !0)
|
|
289
|
-
], 14, je)) : $("", !0),
|
|
290
|
-
e.$slots.watermark ? (a(), u("div", Ye, [
|
|
291
|
-
p(e.$slots, "watermark", q(H({ isPrinting: h(R) || h(S) })), void 0, !0)
|
|
292
|
-
])) : $("", !0),
|
|
293
|
-
P.value ? $("", !0) : (a(), Y(Se, {
|
|
294
|
-
key: 4,
|
|
295
|
-
config: {
|
|
296
|
-
type: "relationCircle",
|
|
297
|
-
style: {
|
|
298
|
-
backgroundColor: l.value.style.backgroundColor,
|
|
299
|
-
relationCircle: {
|
|
300
|
-
color: "#CCCCCC"
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}, null, 8, ["config"]))
|
|
305
|
-
], 12, Me));
|
|
306
|
-
}
|
|
307
|
-
}, rt = /* @__PURE__ */ Te(qe, [["__scopeId", "data-v-2352f00b"]]);
|
|
308
|
-
export {
|
|
309
|
-
rt as default
|
|
310
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-sFjJ2dIj.cjs"),R=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-CujodUjt.cjs"),T=require("./usePrinter-DSMMs1w9.cjs"),ne=require("./vue-ui-skeleton-CqF0NJ4g.cjs"),V=require("./useNestedProp-ir0jEo5M.cjs"),ie=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],se=["xmlns","viewBox"],oe=["cx","cy","r","stroke","stroke-width"],ue={key:0},ce=["stroke","d","stroke-width"],de={key:1},ve=["stroke","x1","x2","y1","y2"],fe=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],ge=["cx","cy","fill","onClick","r"],me={key:3,class:"vue-data-ui-watermark"},ye={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(M,{expose:j}){const c=M;e.useCssVars(t=>({"6c440314":W.value,"6c6a2a1a":D.value,"7e559f95":X.value}));const{vue_ui_relation_circle:q}=o.useConfig(),p=e.computed(()=>!!c.dataset&&Object.keys(c.dataset).length),f=e.ref(o.createUid()),x=e.ref(0),y=e.ref(null),w=e.ref(null),r=e.computed(()=>{const t=V.useNestedProp({userConfig:c.config,defaultConfig:q});return t.theme?{...V.useNestedProp({userConfig:o.themes.vue_ui_relation_circle[t.theme]||c.config,defaultConfig:t}),customPalette:o.themePalettes[t.theme]||o.palette}:t}),{isPrinting:b,isImaging:B,generatePdf:P,generateImage:O}=T.usePrinter({elementId:`relation_circle_${f.value}`,fileName:r.value.style.title.text||"vue-ui-relation-circle"}),E=e.computed(()=>o.convertCustomPalette(r.value.customPalette)),v=e.ref([]),g=e.ref([]),a=e.ref({}),u=e.ref([]),G=e.ref(0),_=e.computed(()=>c.dataset.slice(0,r.value.style.limit)),C=e.ref(r.value.style.size),s=e.ref({height:r.value.style.size,width:r.value.style.size}),d=e.computed({get(){return C.value*r.value.style.circle.radiusProportion},set(t){return t}}),U=e.computed(()=>r.value.style.links.curved),D=e.computed(()=>`${r.value.style.animation.speedMs}ms`),W=e.computed(()=>d.value*2),X=e.computed(()=>d.value*4),h=e.ref(null);e.onMounted(()=>{if(o.objectIsEmpty(c.dataset)?o.error({componentName:"VueUiRelationCircle",type:"dataset"}):c.dataset.forEach((i,l)=>{o.getMissingDatasetAttributes({datasetObject:i,requiredAttributes:["id","label","relations","weights"]}).forEach(n=>{o.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:n,index:l})})}),r.value.responsive){const i=R.throttle(()=>{const{width:l,height:n}=R.useResponsive({chart:y.value,title:r.value.style.title.text?w.value:null});C.value=Math.min(l,n),s.value.width=l,s.value.height=n,d.value=C.value*r.value.style.circle.radiusProportion,v.value=[],g.value=[],S(),z()});h.value=new ResizeObserver(i),h.value.observe(y.value.parentNode)}else S(),z();document.getElementById(`relation_circle_${f.value}`).addEventListener("click",A)}),e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${f.value}`).removeEventListener("click",A),h.value&&h.value.disconnect()});function A(t){const i=t.target;i&&Array.from(i.classList).includes("vue-ui-user-options")||i&&Array.from(i.classList).includes("vue-ui-user-options-summary")||i&&Array.from(i.classList).includes("vue-data-ui-button")||i&&Array.from(i.classList).includes("vue-ui-relation-circle-legend")||(a.value={},u.value=[])}function S(){const t=6.28319/_.value.length,i=360/_.value.length;let l=0,n=0;_.value.forEach((m,$)=>{const te=d.value*Math.cos(l)+s.value.width/2,le=d.value*Math.sin(l)+s.value.height/2+r.value.style.circle.offsetY;v.value.push({x:te,y:le,...m,color:m.color?m.color:E.value[$]?E.value[$]:o.palette[$],regAngle:n}),l+=t,n+=i})}function z(){v.value.forEach(t=>{v.value.filter(l=>l.relations.includes(t.id)).forEach((l,n)=>{g.value.push({weight:t.weights&&t.weights[n]?t.weights[n]:1,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,...t})})})}const Y=e.computed(()=>Math.max(...g.value.map(t=>t.weight)));function H(t){return Object.hasOwn(a.value,"x")?u.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function I(t){return Object.hasOwn(a.value,"x")?t.colorTarget:t.colorSource}function F(t){return Object.hasOwn(a.value,"x")?u.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`?`opacity:1;stroke-width:${L(t)}`:"opacity: 0":"opacity: 1"}function J(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function K(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function Q(t){return Object.hasOwn(a.value,"x")?a.value.id===t.id||u.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function Z(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function N(t){G.value=360-t.regAngle,a.value.id&&t.id===a.value.id?(a.value={},u.value=[]):(a.value=t,u.value=[...t.relations])}function L(t){return t.weight/Y.value*r.value.style.links.maxWidth}const k=e.ref(!1);function ee(t){k.value=t,x.value+=1}return j({generatePdf:P,generateImage:O}),(t,i)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:y,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor};text-align:center;${r.value.responsive?"height: 100%":""}`),id:`relation_circle_${f.value}`},[r.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:w,style:e.normalizeStyle(`width:100%;background:${r.value.style.backgroundColor}`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"relation-div-title",...r.value.style.title},subtitle:{cy:"relation-div-subtitle",...r.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),r.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(T.UserOptions,{ref:"details",key:`user_options_${x.value}`,backgroundColor:r.value.style.backgroundColor,color:r.value.style.color,isPrinting:e.unref(b),isImaging:e.unref(B),uid:f.value,hasPdf:r.value.userOptions.buttons.pdf,hasImg:r.value.userOptions.buttons.img,hasFullscreen:r.value.userOptions.buttons.img,hasXls:!1,isFullscreen:k.value,titles:{...r.value.userOptions.buttonTitles},chartElement:y.value,onToggleFullscreen:ee,onGeneratePdf:e.unref(P),onGenerateImage:e.unref(O)},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"2"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value},"relation-circle"]),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,width:"100%",style:e.normalizeStyle(`user-select:none; background:${r.value.style.backgroundColor}`)},[e.createElementVNode("circle",{cx:(s.value.width<=0?1e-4:s.value.width)/2,cy:(s.value.height<=0?1e-4:s.value.height)/2+r.value.style.circle.offsetY,r:d.value<=0?1e-4:d.value,stroke:r.value.style.circle.stroke,"stroke-width":r.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,oe),U.value?(e.openBlock(),e.createElementBlock("g",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,n)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${n}`,style:e.normalizeStyle(F(l)),stroke:I(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&u.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${s.value.width/2},${s.value.height/2+r.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":L(l),"stroke-linecap":"round"},null,14,ce))),128))])):(e.openBlock(),e.createElementBlock("g",de,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,n)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${n}`,stroke:I(l),style:e.normalizeStyle(F(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&u.value.includes(l.id)}),"stroke-linecap":"round"},null,14,ve))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${n}`,"text-anchor":J(l),transform:Z(l),x:K(l),y:l.y+5,onClick:m=>N(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":a.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${r.value.style.fontFamily};${Q(l)}`),"font-size":r.value.style.labels.fontSize,fill:r.value.style.labels.color},e.toDisplayString(l.label),13,fe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,n)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${n}`,style:e.normalizeStyle(H(l)),class:"vue-ui-relation-circle-plot",fill:r.value.style.plot.color,onClick:m=>N(l),r:r.value.style.plot.radius},null,12,ge))),128)),e.renderSlot(t.$slots,"svg",{svg:s.value},void 0,!0)],14,se)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(b)||e.unref(B)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ne.default,{key:4,config:{type:"relationCircle",style:{backgroundColor:r.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,ae))}},he=ie._export_sfc(ye,[["__scopeId","data-v-2352f00b"]]);exports.default=he;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-sFjJ2dIj.cjs"),H=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-CujodUjt.cjs"),W=require("./usePrinter-DSMMs1w9.cjs"),ne=require("./Tooltip-DsmWz8gF.cjs"),ue=require("./DataTable-wmKwMbsJ.cjs"),se=require("./Legend-DdndVhHV.cjs"),ie=require("./vue-ui-skeleton-CqF0NJ4g.cjs"),ce=require("./vue-ui-accordion-RuCkf_li.cjs"),G=require("./useNestedProp-ir0jEo5M.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],pe=["xmlns","viewBox"],he=["id"],ge=["stop-color"],fe=["stop-color"],me=["stroke","cx","cy","r","fill"],ye=["stroke","stroke-width","cx","cy","r","fill"],be=["cx","cy","r","onMouseenter"],ke={key:3,class:"vue-data-ui-watermark"},Ce=["onClick"],we={key:0},xe={key:1},Te=["innerHTML"],Ne={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(j,{expose:X,emit:Y}){const v=j,{vue_ui_rings:J}=r.useConfig(),y=e.ref(!1),x=e.computed(()=>!!v.dataset&&v.dataset.length),b=e.ref(r.createUid()),K=e.ref(null),T=e.ref(!1),_=e.ref(""),m=e.ref(null),L=e.ref(0),k=e.ref(null),V=e.ref(null),z=e.ref(null),t=e.computed(()=>{const l=G.useNestedProp({userConfig:v.config,defaultConfig:J});return l.theme?{...G.useNestedProp({userConfig:r.themes.vue_ui_rings[l.theme]||v.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),N=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((l,a)=>{l.values.length||r.error({componentName:"VueUiRings",type:"dataset"}),r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=H.throttle(()=>{const{width:a,height:o}=H.useResponsive({chart:k.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?z.value:null});s.value.width=a,s.value.height=o});N.value=new ResizeObserver(l),N.value.observe(k.value.parentNode)}setTimeout(()=>{y.value=!0},600)}),e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:E,isImaging:F,generatePdf:I,generateImage:O}=W.usePrinter({elementId:`rings_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),R=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),Q=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function P(l){i.value.includes(l)?i.value=i.value.filter(a=>a!==l):i.value.push(l),Y("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const Z=e.computed(()=>Math.max(...$.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function M(l){return l/Z.value}const $=e.computed(()=>v.dataset.map(({values:l,name:a,color:o=null},n)=>{const u=r.sanitizeArray(l).reduce((h,w)=>h+w,0);return{name:a,color:o||r.convertColorToHex(o)||R.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,ae)=>w+ae,0)).reduce((h,w)=>h+w,0),uid:r.createUid()}})),D=e.computed(()=>$.value.map(l=>({...l,shape:"circle",opacity:i.value.includes(l.uid)?.5:1,segregate:()=>P(l.uid),isSegregated:i.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),ee=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>$.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>$.value.filter(l=>!i.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:n},u)=>({uid:n,name:l,color:o||r.convertColorToHex(o)||R.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:a,proportion:M(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*M(a)})).toSorted((l,a)=>a.value-l.value));function te(){return c.value.map(({name:l,color:a,value:o,absoluteValues:n,percentage:u})=>({name:l,color:a,value:o,absoluteValues:n,percentage:u}))}const d=e.computed(()=>Q.value-t.value.style.chart.layout.rings.strokeWidth*2),B=e.ref(null);function le(l,a){if(i.value.length===v.dataset.length)return;B.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=n({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
|
|
2
|
-
</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),_.value=u}T.value=!0}const f=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},n=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:n}});function q(){e.nextTick(()=>{const l=f.value.head.map((n,u)=>[[n.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function oe(l){C.value=l,L.value+=1}function A(){g.value.showTable=!g.value.showTable}function U(){g.value.showTooltip=!g.value.showTooltip}return X({getData:te,generatePdf:I,generateCsv:q,generateImage:O,toggleTable:A,toggleTooltip:U}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:k,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${b.value}`,onMouseleave:a[3]||(a[3]=o=>{m.value=null,T.value=!1})},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref_key:"details",ref:K,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(E),isImaging:e.unref(F),uid:b.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:oe,onGeneratePdf:e.unref(I),onGenerateCsv:q,onGenerateImage:e.unref(O),onToggleTable:A,onToggleTooltip:U},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(r.shiftHue)(o.color,.05)}${e.unref(r.opacity)[100-t.value.style.chart.layout.rings.gradient.intensity]}`},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,fe)],8,he))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,me),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${b.value}_${n})`:o.color},null,14,ye),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9),fill:"transparent",onMouseenter:u=>le(n,o),onMouseleave:a[0]||(a[0]=u=>{m.value=null,T.value=!1})},null,40,be)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(E)||e.unref(F)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:4,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(se.Legend,{key:0,legendSet:D.value,config:ee.value,onClickMarker:a[1]||(a[1]=({legend:o})=>P(o.uid))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>P(o.uid),style:e.normalizeStyle(`opacity:${i.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",we," ("+e.toDisplayString(isNaN(o.value/p.value)?"-":e.unref(r.dataLabel)({v:o.value/p.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ce)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:D.value},void 0,!0)],512),e.createVNode(ne._sfc_main,{show:g.value.showTooltip&&T.value&&i.value.length<v.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:_.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ue.DataTable,{colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>g.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Te)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ve))}},$e=de._export_sfc(Ne,[["__scopeId","data-v-30253e49"]]);exports.default=$e;
|