vue-data-ui 2.4.54 → 2.4.56
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-B10uy-UU.cjs → Arrow-CjIZFibK.cjs} +1 -1
- package/dist/{Arrow-DeKmbj7B.js → Arrow-jPjUEWgL.js} +1 -1
- package/dist/{BaseIcon-Ca67-Cyv.js → BaseIcon-0DNmIdCs.js} +1 -1
- package/dist/{BaseIcon-DtUsvREa.cjs → BaseIcon-DF2Lg0Ky.cjs} +1 -1
- package/dist/{DataTable-BgiV2CfC.js → DataTable-CZSz7b1u.js} +2 -2
- package/dist/{DataTable-CwiudM8v.cjs → DataTable-osuWgmyP.cjs} +1 -1
- package/dist/{Legend-C1rLFGjN.js → Legend-CvXmxVoD.js} +1 -1
- package/dist/{Legend-TTzHdVeD.cjs → Legend-DecSHp0h.cjs} +1 -1
- package/dist/{PackageVersion-Bp3Bq9Jn.js → PackageVersion-CEkiDR72.js} +1 -1
- package/dist/{PackageVersion-B_ULr99C.cjs → PackageVersion-eTcMI7M3.cjs} +1 -1
- package/dist/{PenAndPaper-DFNDy1y9.cjs → PenAndPaper-BqcQLMi2.cjs} +1 -1
- package/dist/{PenAndPaper-Cu0Ae0MN.js → PenAndPaper-GjypzQvI.js} +3 -3
- package/dist/{Shape-B_GK3n6y.js → Shape-BejfTDlL.js} +1 -1
- package/dist/{Shape-GWT6Hhcc.cjs → Shape-Diaok0Bu.cjs} +1 -1
- package/dist/{Slicer-Bi4zZd-A.js → Slicer-9_ewSBRs.js} +2 -2
- package/dist/{Slicer-DyNqrpR4.cjs → Slicer-DFT7ePZ_.cjs} +1 -1
- package/dist/{Title-DPlURQtx.js → Title-BI9lg56g.js} +1 -1
- package/dist/{Title-Z93_y2gr.cjs → Title-Bw-FXFej.cjs} +1 -1
- package/dist/{Tooltip-DVfgJ6mM.cjs → Tooltip-98ospYeV.cjs} +1 -1
- package/dist/{Tooltip-C7wb_p0L.js → Tooltip-sBMzQa_B.js} +1 -1
- package/dist/{index-DH1CMY7m.js → index-ByVaKddw.js} +3 -1
- package/dist/index-Cvx5SntE.cjs +9 -0
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +1 -0
- package/dist/types/vue-data-ui.d.ts +1 -0
- package/dist/{useNestedProp-DDvMHRIf.cjs → useNestedProp-CSIVZXvp.cjs} +1 -1
- package/dist/{useNestedProp-DBnFzAfW.js → useNestedProp-GRBJXe5O.js} +1 -1
- package/dist/{usePrinter-C0N1CiBZ.js → usePrinter-BsXVX7vh.js} +1 -1
- package/dist/{usePrinter-DtSijS1B.cjs → usePrinter-BwruEydS.cjs} +1 -1
- package/dist/{vue-data-ui-CXxSOk_7.js → vue-data-ui-B7Y18Xdv.js} +60 -60
- package/dist/{vue-data-ui-ByVHf_kl.cjs → vue-data-ui-BqSfqfi4.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-B7WLQ4Xw.cjs → vue-ui-3d-bar-CXv6h_8o.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-CVe5jYPi.js → vue-ui-3d-bar-SA6SyIoT.js} +9 -9
- package/dist/{vue-ui-accordion-azKgDbn4.js → vue-ui-accordion-Dcf8tHzr.js} +3 -3
- package/dist/{vue-ui-accordion-Dm8myRhk.cjs → vue-ui-accordion-DfqTc4ro.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-BW4_XPjw.js → vue-ui-age-pyramid-BetdioWW.js} +10 -10
- package/dist/{vue-ui-age-pyramid-BLq5EYnh.cjs → vue-ui-age-pyramid-CG7IY2gE.cjs} +1 -1
- package/dist/{vue-ui-annotator-BIiP8tfh.cjs → vue-ui-annotator-Bcg6d-GE.cjs} +1 -1
- package/dist/{vue-ui-annotator-BXNCscLc.js → vue-ui-annotator-Qf_gPjWZ.js} +1 -1
- package/dist/{vue-ui-bullet-zqDSLDqP.js → vue-ui-bullet-CLRHVfB8.js} +8 -8
- package/dist/{vue-ui-bullet-oszrU2rQ.cjs → vue-ui-bullet-CPHavcOd.cjs} +1 -1
- package/dist/{vue-ui-candlestick-DlhrXggi.js → vue-ui-candlestick-DBnrOltA.js} +11 -11
- package/dist/{vue-ui-candlestick-EY9e1UXf.cjs → vue-ui-candlestick-exLvYnf4.cjs} +1 -1
- package/dist/vue-ui-carousel-table-Bz2XZAC4.js +396 -0
- package/dist/vue-ui-carousel-table-CHlCmI-_.cjs +1 -0
- package/dist/{vue-ui-chestnut-DUceRFNk.cjs → vue-ui-chestnut-BBhIDuhr.cjs} +1 -1
- package/dist/{vue-ui-chestnut-jHgtDbmU.js → vue-ui-chestnut-BE6RQkXd.js} +8 -8
- package/dist/{vue-ui-cursor-Cq1HIpIa.cjs → vue-ui-cursor-CpIr7R3C.cjs} +1 -1
- package/dist/{vue-ui-cursor-Dkndm06c.js → vue-ui-cursor-DLQVTUyz.js} +2 -2
- package/dist/{vue-ui-dashboard-NZKZnvIp.cjs → vue-ui-dashboard-YWLsOufT.cjs} +1 -1
- package/dist/{vue-ui-dashboard-B6_Xkd1u.js → vue-ui-dashboard-rKdg3soO.js} +2 -2
- package/dist/{vue-ui-digits-DHGYQ4mk.cjs → vue-ui-digits-DFNXL2VX.cjs} +1 -1
- package/dist/{vue-ui-digits-ZFMtrfsc.js → vue-ui-digits-XkrLdWX_.js} +2 -2
- package/dist/vue-ui-donut-8rW9LlEF.cjs +1 -0
- package/dist/{vue-ui-donut-D3Yw-xVC.js → vue-ui-donut-CDVHpIvX.js} +16 -16
- package/dist/{vue-ui-donut-evolution-CzQo7feu.cjs → vue-ui-donut-evolution-B1ahKhHv.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-kzFgoErC.js → vue-ui-donut-evolution-By2AYSZT.js} +11 -11
- package/dist/{vue-ui-dumbbell-LcWHXAvv.js → vue-ui-dumbbell-D1Htb6-R.js} +10 -10
- package/dist/{vue-ui-dumbbell-qBYKyZL0.cjs → vue-ui-dumbbell-DIHb9Grh.cjs} +1 -1
- package/dist/{vue-ui-flow-RQrUlBZx.cjs → vue-ui-flow-41QVXQeK.cjs} +1 -1
- package/dist/{vue-ui-flow-CM2CzG9l.js → vue-ui-flow-CCYyDy6C.js} +9 -9
- package/dist/{vue-ui-funnel-oJgYKMnU.js → vue-ui-funnel-BJ43m1vH.js} +8 -8
- package/dist/{vue-ui-funnel-CBZO8HbM.cjs → vue-ui-funnel-qPzrqllN.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BCVy8Fif.cjs → vue-ui-galaxy-D6dtMQ2A.cjs} +1 -1
- package/dist/{vue-ui-galaxy-C2Y_DDJB.js → vue-ui-galaxy-DMUq4sez.js} +11 -11
- package/dist/{vue-ui-gauge-DdCG-E2p.cjs → vue-ui-gauge-BdycQV3W.cjs} +1 -1
- package/dist/{vue-ui-gauge--Y59kiK4.js → vue-ui-gauge-KGflfPYM.js} +7 -7
- package/dist/{vue-ui-gizmo-g2JoyNcP.js → vue-ui-gizmo-CFRsYHo7.js} +3 -3
- package/dist/{vue-ui-gizmo-Rb4ZXTmW.cjs → vue-ui-gizmo-lKGGpbCe.cjs} +1 -1
- package/dist/{vue-ui-heatmap-CuhK1-fD.cjs → vue-ui-heatmap-DKxnmh08.cjs} +1 -1
- package/dist/{vue-ui-heatmap-CSW7Sckl.js → vue-ui-heatmap-Dj0A6LjZ.js} +10 -10
- package/dist/{vue-ui-history-plot-BUh8mFcS.js → vue-ui-history-plot-ClNqlBER.js} +11 -11
- package/dist/{vue-ui-history-plot-3I1ZczPE.cjs → vue-ui-history-plot-IWjqZb4c.cjs} +1 -1
- package/dist/{vue-ui-kpi-BokZ78tj.cjs → vue-ui-kpi-BRVPBhAp.cjs} +1 -1
- package/dist/{vue-ui-kpi-DqkHOwnT.js → vue-ui-kpi-BXRYqm31.js} +3 -3
- package/dist/{vue-ui-mini-loader-OgezY5bJ.js → vue-ui-mini-loader-Bm_4G8gx.js} +2 -2
- package/dist/{vue-ui-mini-loader-DgRUssIh.cjs → vue-ui-mini-loader-NicMq9t0.cjs} +1 -1
- package/dist/{vue-ui-molecule-DPme2DL7.js → vue-ui-molecule-BDFarbim.js} +11 -11
- package/dist/{vue-ui-molecule-BjZEWe-M.cjs → vue-ui-molecule-Bi9RT7M4.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-C3dVMbCW.js → vue-ui-mood-radar-DJnPeXpr.js} +11 -11
- package/dist/{vue-ui-mood-radar-qn-DhbDt.cjs → vue-ui-mood-radar-DlXCkePO.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Cz04Q0zc.cjs → vue-ui-nested-donuts-CYNh2xAI.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-B96zg3ew.js → vue-ui-nested-donuts-DLcFEPDy.js} +11 -11
- package/dist/{vue-ui-onion-CVXrJUcF.cjs → vue-ui-onion-UDlJJjud.cjs} +1 -1
- package/dist/{vue-ui-onion-DqtSzdyq.js → vue-ui-onion-jzYk1NeW.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-uPB5LMUG.js → vue-ui-parallel-coordinate-plot-BLLYkQEr.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-BSrrIy_u.cjs → vue-ui-parallel-coordinate-plot-BboIA_-E.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DZu-EjEj.cjs → vue-ui-quadrant-BSNtsyJ5.cjs} +1 -1
- package/dist/{vue-ui-quadrant-B4Xp90go.js → vue-ui-quadrant-C94HXwr8.js} +12 -12
- package/dist/{vue-ui-quick-chart-CmdJuhrV.js → vue-ui-quick-chart-6fxJ8oH3.js} +53 -54
- package/dist/{vue-ui-quick-chart-BbmneGkd.cjs → vue-ui-quick-chart-B9Xbkibp.cjs} +5 -5
- package/dist/{vue-ui-radar-C0fJVGMX.js → vue-ui-radar-CQrWi1aN.js} +12 -12
- package/dist/{vue-ui-radar-Uw9jHF-A.cjs → vue-ui-radar-Q6izz-u2.cjs} +1 -1
- package/dist/{vue-ui-rating-m1AvXMFo.js → vue-ui-rating-Ciyd3dSC.js} +2 -2
- package/dist/{vue-ui-rating--WDHkylh.cjs → vue-ui-rating-DgsUBjAC.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BnGSpsh3.js → vue-ui-relation-circle-BVgfKoJY.js} +7 -7
- package/dist/{vue-ui-relation-circle-46aZfLDY.cjs → vue-ui-relation-circle-CAC4jUA7.cjs} +1 -1
- package/dist/{vue-ui-rings-BvwB9Pgy.js → vue-ui-rings-DuQmTRbW.js} +11 -11
- package/dist/{vue-ui-rings-C5uc13Mz.cjs → vue-ui-rings-VNKEeLJq.cjs} +1 -1
- package/dist/{vue-ui-scatter-CoW5nT_m.js → vue-ui-scatter-BlLPdbYP.js} +12 -12
- package/dist/{vue-ui-scatter-BAxQgdPf.cjs → vue-ui-scatter-CWTRMe0w.cjs} +1 -1
- package/dist/{vue-ui-screenshot-CoBL8VvU.cjs → vue-ui-screenshot-C3nAs5FY.cjs} +1 -1
- package/dist/{vue-ui-screenshot-C_s7_D5X.js → vue-ui-screenshot-Cf9IZKQy.js} +1 -1
- package/dist/{vue-ui-skeleton-DBo32QSA.js → vue-ui-skeleton--uwo2sCb.js} +3 -3
- package/dist/{vue-ui-skeleton-Czl8iTZQ.cjs → vue-ui-skeleton-CcWKK9pd.cjs} +1 -1
- package/dist/{vue-ui-smiley-D-FU6RGS.cjs → vue-ui-smiley-BI7CkEhi.cjs} +1 -1
- package/dist/{vue-ui-smiley-BQisdetv.js → vue-ui-smiley-Bc53TV0r.js} +2 -2
- package/dist/{vue-ui-spark-trend-DMwCqGul.js → vue-ui-spark-trend-Byey6P0P.js} +5 -5
- package/dist/{vue-ui-spark-trend-C6d6P8_s.cjs → vue-ui-spark-trend-CKgcM09-.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-DHpoNSzN.js → vue-ui-sparkbar-C2Y0Foie.js} +4 -4
- package/dist/{vue-ui-sparkbar-CR3IzauM.cjs → vue-ui-sparkbar-FBEE4RyI.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-CC1Eglzs.js → vue-ui-sparkgauge-Czf3xG6u.js} +4 -4
- package/dist/{vue-ui-sparkgauge-CeXq_PnB.cjs → vue-ui-sparkgauge-DIQjrKUR.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-X9_zqOZb.cjs → vue-ui-sparkhistogram-CNQrhEr4.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-xIK7lFrl.js → vue-ui-sparkhistogram-MEdLzmyE.js} +5 -5
- package/dist/{vue-ui-sparkline-DgEXD0bt.js → vue-ui-sparkline-Cr2okEps.js} +4 -4
- package/dist/{vue-ui-sparkline-z8F4XzTG.cjs → vue-ui-sparkline-DNeX0Cst.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-wjQ7KHJm.cjs → vue-ui-sparkstackbar-CyvjXdi9.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-Co449w2-.js → vue-ui-sparkstackbar-Db83U8wn.js} +5 -5
- package/dist/{vue-ui-stackbar-BCjjWZUq.js → vue-ui-stackbar-CQT1OJCn.js} +12 -12
- package/dist/{vue-ui-stackbar-C9Q0eM4s.cjs → vue-ui-stackbar-CfmbbZzJ.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-D9nUWA5a.js → vue-ui-strip-plot-DOzB5USx.js} +11 -11
- package/dist/{vue-ui-strip-plot-SbdQQDJD.cjs → vue-ui-strip-plot-T8_5JEzy.cjs} +1 -1
- package/dist/{vue-ui-table-4Zx9e6xR.cjs → vue-ui-table-C3O3go3K.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CQAwn6-B.cjs → vue-ui-table-heatmap-iho4COZg.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-Dojf1B9-.js → vue-ui-table-heatmap-lftME_w3.js} +4 -4
- package/dist/{vue-ui-table-Df6cgK1g.js → vue-ui-table-ro63oB6Q.js} +1 -1
- package/dist/{vue-ui-table-sparkline-DLd74n0T.cjs → vue-ui-table-sparkline-Ce0sOUWt.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-WSmyQwR2.js → vue-ui-table-sparkline-P9DzADZw.js} +5 -5
- package/dist/{vue-ui-thermometer-9gklDJUj.cjs → vue-ui-thermometer-BRYN1bHx.cjs} +1 -1
- package/dist/{vue-ui-thermometer-El0SBOq3.js → vue-ui-thermometer-DI4pKvnk.js} +7 -7
- package/dist/{vue-ui-timer-BBg7_SOY.cjs → vue-ui-timer-CsV8Cuty.cjs} +1 -1
- package/dist/{vue-ui-timer-DDuXYQZM.js → vue-ui-timer-DTsTsm_i.js} +5 -5
- package/dist/{vue-ui-tiremarks-BfIV-QDF.js → vue-ui-tiremarks-CjY3b9ph.js} +7 -7
- package/dist/{vue-ui-tiremarks-BIyXvipR.cjs → vue-ui-tiremarks-od0aPD4a.cjs} +1 -1
- package/dist/{vue-ui-treemap-BXGSdZ7D.js → vue-ui-treemap-B36BRS00.js} +11 -11
- package/dist/{vue-ui-treemap-DpshmJwJ.cjs → vue-ui-treemap-B69tqCDo.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CKwjHdCp.cjs → vue-ui-vertical-bar-8QN9YXK-.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-CWCfyMLl.js → vue-ui-vertical-bar-CK1dtsFn.js} +11 -11
- package/dist/{vue-ui-waffle-qrwD0df7.js → vue-ui-waffle-CaJbFYrA.js} +19 -19
- package/dist/{vue-ui-waffle-IvkVZcab.cjs → vue-ui-waffle-CpcyWKuc.cjs} +1 -1
- package/dist/{vue-ui-wheel-DhwjPquK.cjs → vue-ui-wheel-DJQeNqbc.cjs} +1 -1
- package/dist/{vue-ui-wheel-BVzCac3i.js → vue-ui-wheel-WoHPA2Fp.js} +7 -7
- package/dist/{vue-ui-word-cloud-DNXgz7Aj.cjs → vue-ui-word-cloud-BfqeiAU8.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-CMibfjKu.js → vue-ui-word-cloud-D3h-mtSd.js} +10 -10
- package/dist/{vue-ui-xy-DRPrnIDh.js → vue-ui-xy-BTW5rwfL.js} +14 -14
- package/dist/{vue-ui-xy-canvas-DmhWHa44.js → vue-ui-xy-canvas-DTySv5nX.js} +11 -11
- package/dist/{vue-ui-xy-canvas-prkO7IV3.cjs → vue-ui-xy-canvas-DtnXa5hf.cjs} +1 -1
- package/dist/{vue-ui-xy-DPybwkIx.cjs → vue-ui-xy-iL-McDRN.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BdlNqn9B.cjs +0 -9
- package/dist/vue-ui-carousel-table-7w6OlJGJ.js +0 -379
- package/dist/vue-ui-carousel-table-DpN88ZNk.cjs +0 -1
- package/dist/vue-ui-donut-DFS8YDvi.cjs +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-BdlNqn9B.cjs"),Ce=require("./useResponsive-BJ7DTGpm.cjs"),se=require("./BaseIcon-DtUsvREa.cjs"),Ge=require("./Tooltip-DVfgJ6mM.cjs"),ze=require("./usePrinter-DtSijS1B.cjs"),Xe=require("./Slicer-DyNqrpR4.cjs"),Ye=require("./vue-ui-skeleton-Czl8iTZQ.cjs"),Ne=require("./useNestedProp-DDvMHRIf.cjs"),Ze=require("./PackageVersion-B_ULr99C.cjs"),Je=require("./PenAndPaper-DFNDy1y9.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Ke=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function et({dataset:c,barLineSwitch:w=6}){let f=null,b=null,N=0;if((typeof c=="number"||typeof c=="string")&&console.warn(`The provided dataset (${c}) is not sufficient to build a chart`),K(c)&&($(c)&&(c.length<w?f=S.BAR:f=S.LINE,b=c,N=c.length),ce(c))){if(!lt(c))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(c[0]),j=Object.values(c[0]);if(!U.some(A=>at(A)))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;Ve(j,A=>typeof A=="number")&&(f=S.DONUT,b=c),Ve(j,A=>Array.isArray(A)&&$(A))&&(Fe(c)>w?f=S.LINE:f=S.BAR,N=Fe(c),b=c.map(A=>({...A,data:ot(A,P=>$(P))}))),c=c.map(A=>Pe(A)),b=b.map(A=>Pe(A))}return K(c)&&[...new Set(c.flatMap(U=>Array.isArray(U)))][0],{dataset:c,type:f,usableDataset:b,maxSeriesLength:N}}function $e(c){return!c||K(c)&&!c.length}function K(c){return Array.isArray(c)}function $(c){if(!K(c)||$e(c))return!1;const w=c.map(f=>Number(f));return![...new Set(w.flatMap(f=>typeof f=="number"&&!isNaN(f)))].includes(!1)}function ce(c){return!K(c)||$e(c)||!![...new Set(c.flatMap(f=>typeof f=="object"&&!Array.isArray(f)))].includes(!1)?!1:!c.map(f=>Object.keys(f).length>0).includes(!1)}function tt(c,w){const f=Object.keys(c).sort(),b=Object.keys(w).sort();if(f.length!==b.length)return!1;for(let N=0;N<f.length;N+=1){const V=f[N],M=b[N];if(V!==M||typeof c[V]!=typeof w[M])return!1}return!0}function lt(c){if(c.length<=1)return!0;for(let w=0;w<c.length;w+=1)for(let f=w+1;f<c.length;f+=1)if(!tt(c[w],c[f]))return!1;return!0}function at(c){return Ke.includes(c.toUpperCase())}function Ve(c,w){let f=[];for(let b=0;b<c.length;b+=1)f.push(w(c[b]));return f.includes(!0)}function Fe(c){return Math.max(...[...c].flatMap(w=>Object.values(w).filter(f=>$(f)).map(f=>f.length)))}function ot(c,w){return Object.values(c).filter(f=>w(f))[0]}function Pe(c){const w={};for(let f in c)c.hasOwnProperty(f)&&(w[f.toUpperCase()]=c[f]);return w}const Ie=c=>(e.pushScopeId("data-v-c31c33da"),c=c(),e.popScopeId(),c),nt=["id"],rt=["xmlns","viewBox"],it=["id"],ut=["id"],st=Ie(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),ct=["id"],dt=["flood-color"],vt={key:0,class:"donut-label-connectors"},mt=["d","stroke","stroke-width","filter"],ft=["cx","cy","r","fill","filter"],pt={class:"donut"},ht=["d","fill","stroke","stroke-width","filter"],kt=["d","onMouseenter","onClick"],gt={key:1,class:"donut-labels quick-animation"},yt=["cx","cy","fill","stroke","filter"],xt=["text-anchor","x","y","fill","font-size","filter"],St=["text-anchor","x","y","fill","font-size","filter"],bt={key:2,class:"donut-hollow quick-animation"},Bt=["x","y","font-size","fill"],wt=["x","y","font-size","fill"],Et={key:0,class:"line-grid"},At=["x1","x2","y1","y2","stroke","stroke-width"],Lt=["x1","x2","y1","y2","stroke","stroke-width"],_t={key:1,class:"line-axis"},Ct=["x1","x2","y1","y2","stroke","stroke-width"],zt=["x1","x2","y1","y2","stroke","stroke-width"],Nt={key:2,class:"yLabels"},Vt=["x1","x2","y1","y2","stroke","stroke-width"],Ft=["x","y","font-size","fill"],Pt={key:3,class:"periodLabels"},$t=["x1","x2","y1","y2","stroke","stroke-width"],It=["font-size","text-anchor","fill","transform"],Tt={class:"plots"},Ot={class:"line-plot-series"},Rt=["d","stroke","stroke-width"],Dt=["d","stroke","stroke-width"],Mt=["d","stroke","stroke-width"],Ut=["d","stroke","stroke-width"],qt=["cx","cy","fill","stroke"],Wt={key:4,class:"dataLabels"},Ht=["font-size","fill","x","y"],jt={class:"tooltip-traps"},Gt=["x","y","height","width","fill","onMouseenter","onClick"],Xt={key:0,class:"line-grid"},Yt=["x1","x2","y1","y2","stroke","stroke-width"],Zt=["x1","x2","y1","y2","stroke","stroke-width"],Jt={key:1,class:"line-axis"},Qt=["x1","x2","y1","y2","stroke","stroke-width"],Kt=["x1","x2","y1","y2","stroke","stroke-width"],el={key:2,class:"yLabels"},tl=["x1","x2","y1","y2","stroke","stroke-width"],ll=["x","y","font-size","fill"],al={key:3,class:"periodLabels"},ol=["x1","x2","y1","y2","stroke","stroke-width"],nl=["font-size","text-anchor","transform","fill"],rl={class:"plots"},il=["x","width","height","y","fill","stroke","stroke-width"],ul=["to"],sl=["from","to"],cl={key:4,class:"dataLabels"},dl=["x","y","font-size","fill"],vl={class:"tooltip-traps"},ml=["x","y","height","width","fill","onMouseenter","onClick"],fl={key:3,class:"axis-labels"},pl={key:0},hl=["font-size","fill","x","y"],kl={key:1},gl=["font-size","fill","x","y"],yl={key:2},xl=["font-size","fill","transform"],Sl={key:3},bl=["font-size","fill","transform"],Bl={key:6,class:"vue-data-ui-watermark"},wl=["onClick"],El=["onClick"],Al=["onClick"],Ll={key:1,class:"vue-ui-quick-chart-not-processable"},_l=Ie(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),Cl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(c,{expose:w,emit:f}){const b=c,{vue_ui_quick_chart:N}=u.useConfig(),V=e.ref(null),M=e.ref(null),U=e.ref(null),j=e.ref(null),A=e.ref(u.createUid()),P=e.ref(!1),G=e.ref(null),T=e.ref(""),F=e.ref(null),me=e.ref(null),fe=e.ref(null),x=e.ref([]),pe=e.ref(0),ee=e.ref(0),t=e.computed({get:()=>ge(),set:n=>n}),Te=e.computed(()=>t.value.showUserOptionsOnChartHover),he=e.computed(()=>t.value.keepUserOptionsStateOnChartLeave),te=e.ref(!t.value.showUserOptionsOnChartHover);function ke(n=!1){Te.value&&(te.value=n)}function ge(){const n=Ne.useNestedProp({userConfig:b.config,defaultConfig:N});let s={};return n.theme?s={...Ne.useNestedProp({userConfig:u.themes.vue_ui_quick_chart[n.theme]||b.config,defaultConfig:n}),customPalette:u.themePalettes[n.theme]||u.palette}:s=n,b.config&&u.hasDeepProperty(b.config,"zoomStartIndex")?s.zoomStartIndex=b.config.zoomStartIndex:s.zoomStartIndex=null,b.config&&u.hasDeepProperty(b.config,"zoomEndIndex")?s.zoomEndIndex=b.config.zoomEndIndex:s.zoomEndIndex=null,s}e.watch(()=>b.config,n=>{t.value=ge(),y.value.width=t.value.width,y.value.height=t.value.height,te.value=!t.value.showUserOptionsOnChartHover,Se()},{deep:!0}),e.watch(()=>b.dataset,n=>{p.value=Y.value,k.value.start=0,k.value.end=p.value.maxSeriesLength,ee.value+=1},{deep:!0});const X=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),Y=e.computed(()=>{const n=et({dataset:u.sanitizeArray(b.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return n||console.error("VueUiQuickChart : Dataset is not processable"),n}),p=e.ref(Y.value),Oe=e.computed(()=>!!p.value),B=e.computed(()=>p.value?p.value.type:null);e.watch(()=>B.value,n=>{n||u.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:le,isImaging:ae,generatePdf:ye,generateImage:xe}=ze.usePrinter({elementId:`${B.value}_${A.value}`,fileName:t.value.title||B.value}),Re=e.computed(()=>t.value.showUserOptions&&!t.value.title),y=e.ref({width:t.value.width,height:t.value.height}),oe=e.ref({showTooltip:t.value.showTooltip}),ne=e.ref(null);e.onMounted(()=>{Se()});function Se(){if(t.value.responsive){const n=Ce.throttle(()=>{const{width:s,height:l}=Ce.useResponsive({chart:V.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(B.value)&&t.value.zoomXy&&p.value.maxSeriesLength>1?j.value:null,source:me.value,noTitle:fe.value});y.value.width=s,y.value.height=l});ne.value=new ResizeObserver(n),ne.value.observe(V.value.parentNode)}Le()}e.onBeforeUnmount(()=>{ne.value&&ne.value.disconnect()});const De=e.computed(()=>{switch(B.value){case S.LINE:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.BAR:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.DONUT:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;default:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`}});function be(n){return[...n].map(s=>s.value).reduce((s,l)=>s+l,0)}function Z(n){return t.value.blurOnHover&&![null,void 0].includes(F.value)&&F.value!==n?`url(#blur_${A.value})`:""}function Be(n,s){x.value.includes(n)?x.value=x.value.filter(l=>l!==n):x.value.length<s&&x.value.push(n)}const we=e.ref(null),Ee=e.ref(null),re=e.ref(!1);function Me(n,s){re.value=!0;let l=n.value;if(x.value.includes(n.id)){let i=function(){l>r?(re.value=!1,cancelAnimationFrame(Ee.value),p.value={...p.value,dataset:p.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,p.value={...p.value,dataset:p.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:l,VALUE:l}:m)},Ee.value=requestAnimationFrame(i))};x.value=x.value.filter(m=>m!==n.id);const r=Y.value.dataset.find((m,_)=>n.id===`donut_${_}`).VALUE;i()}else if(s.length>1){let r=function(){l<.1?(re.value=!1,cancelAnimationFrame(we.value),x.value.push(n.id),p.value={...p.value,dataset:p.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:0,VALUE:0}:i)}):(l/=1.1,p.value={...p.value,dataset:p.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:l,VALUE:l}:i)},we.value=requestAnimationFrame(r))};r()}}const I=e.ref(null);function Ue(n){I.value=n}const Ae=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),E=e.computed(()=>{if(B.value!==S.DONUT)return null;const n=p.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):X.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],immutableValue:a.value}));function s(a,o){return u.dataLabel({v:isNaN(a.value/be(o))?0:a.value/be(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function r(a,o){const g=Y.value.dataset.find((L,C)=>`donut_${C}`===a).VALUE;return Math.abs(String(Number(g.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function i({datapoint:a,seriesIndex:o}){G.value={datapoint:a,seriesIndex:o,config:t.value,dataset:n},F.value=a.id;const g=t.value.tooltipCustomFormat;if(u.isFunction(g)&&u.functionReturnsString(()=>g({datapoint:a,seriesIndex:o,series:n,config:t.value})))T.value=g({datapoint:a,seriesIndex:o,series:n,config:t.value});else{let h="";h+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,h+=`<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>`,h+=`<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>`,h+=`<span>(${u.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,T.value=`<div>${h}</div>`}P.value=!0}function m(){P.value=!1,F.value=null,I.value=null}const _={centerX:y.value.width/2,centerY:y.value.height/2},z=n.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),W=n.map((a,o)=>({...a,proportion:(a.value||0)/z,value:a.value||0,absoluteValue:Y.value.dataset.find((g,h)=>`donut_${h}`===a.id).VALUE})),O=y.value.width/2,H=y.value.height/2,R=y.value.height*t.value.donutRadiusRatio;return{dataset:W.filter(a=>!x.value.includes(a.id)),legend:W,drawingArea:_,displayArcPercentage:s,isArcBigEnough:l,useTooltip:i,killTooltip:m,getSpaces:r,total:z,cx:O,cy:H,radius:R,chart:u.makeDonut({series:n.filter(a=>!x.value.includes(a.id))},O,H,R,R,1.99999,2,1,360,105.25,y.value.height*Ae.value)}}),k=e.ref({start:0,end:p.value.maxSeriesLength});function qe(){Le()}const q=e.ref(null);async function Le(){(t.value.zoomStartIndex!==null||t.value.zoomEndIndex!==null)&&q.value?(t.value.zoomStartIndex!==null&&(await e.nextTick(),await e.nextTick(),q.value&&q.value.setStartValue(t.value.zoomStartIndex)),t.value.zoomEndIndex!==null&&(await e.nextTick(),await e.nextTick(),q.value&&q.value.setEndValue(We(t.value.zoomEndIndex+1)))):(k.value={start:0,end:p.value.maxSeriesLength},ee.value+=1)}function We(n){const s=p.value.maxSeriesLength;return n>s?s:n<0||t.value.zoomStartIndex!==null&&n<t.value.zoomStartIndex?t.value.zoomStartIndex!==null?t.value.zoomStartIndex+1:1:n}const He=e.computed(()=>{if(!t.value.zoomMinimap.show||B.value===S.DONUT)return[];let n=[];$(p.value.dataset)&&(n=p.value.dataset),ce(p.value.dataset)&&(n=p.value.dataset.map((i,m)=>({values:i.VALUE||i.DATA||i.SERIE||i.SERIES||i.VALUES||i.NUM||0,id:B.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(i=>!x.value.includes(i.id)));const s=$(n)?n.length:Math.max(...n.map(i=>i.values.length));let l=[];if($(n))l=n;else for(let i=0;i<s;i+=1)l.push(n.map(m=>m.values[i]||0).reduce((m,_)=>(m||0)+(_||0),0));const r=Math.min(...l);return l.map(i=>i+(r<0?Math.abs(r):0))}),v=e.computed(()=>{if(B.value!==S.LINE)return null;const n={height:y.value.height,width:y.value.width},s={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:n.width-t.value.xyPaddingRight,bottom:n.height-t.value.xyPaddingBottom,width:n.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:n.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];$(p.value.dataset)&&(l=[{values:p.value.dataset.slice(k.value.start,k.value.end),absoluteIndices:p.value.dataset.map((a,o)=>o).slice(k.value.start,k.value.end),name:t.value.title,color:X.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"line_0"}]),ce(p.value.dataset)&&(l=p.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):X.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],values:a.values.slice(k.value.start,k.value.end),absoluteIndices:a.values.map((g,h)=>h).slice(k.value.start,k.value.end)})));const r={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))},i=u.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,_=r.max<0?s.top:s.bottom-m/(i.max+m)*s.height,z=s.width/r.maxSeries,W=i.ticks.map(a=>({y:s.bottom-s.height*((a+m)/(i.max+m)),x:s.left-8,value:a})),O=l.map((a,o)=>({...a,coordinates:a.values.map((g,h)=>({x:s.left+z*(h+1)-z/2,y:s.bottom-(g+m)/(i.max+m)*s.height,value:g}))})).map(a=>{let o=[];return a.coordinates.forEach(g=>{o.push(`${g.x},${g.y} `)}),{...a,linePath:o.join(" ")}});function H(a){F.value=a,I.value=a;const o=l.map(h=>({...h,value:h.values[a],absoluteIndex:h.absoluteIndices[a]})).filter(h=>!x.value.includes(h.id));G.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const g=t.value.tooltipCustomFormat;if(u.isFunction(g)&&u.functionReturnsString(()=>g({datapoint:o,seriesIndex:a,series:l,config:t.value})))T.value=g({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let h="";t.value.xyPeriods[o[0].absoluteIndex]&&(h+=`<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)=>{h+=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-Cvx5SntE.cjs"),Ce=require("./useResponsive-BJ7DTGpm.cjs"),se=require("./BaseIcon-DF2Lg0Ky.cjs"),Ge=require("./Tooltip-98ospYeV.cjs"),ze=require("./usePrinter-BwruEydS.cjs"),Xe=require("./Slicer-DFT7ePZ_.cjs"),Ye=require("./vue-ui-skeleton-CcWKK9pd.cjs"),Ne=require("./useNestedProp-CSIVZXvp.cjs"),Ze=require("./PackageVersion-eTcMI7M3.cjs"),Je=require("./PenAndPaper-BqcQLMi2.cjs"),Qe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Ke=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function et({dataset:c,barLineSwitch:w=6}){let f=null,b=null,N=0;if((typeof c=="number"||typeof c=="string")&&console.warn(`The provided dataset (${c}) is not sufficient to build a chart`),K(c)&&($(c)&&(c.length<w?f=S.BAR:f=S.LINE,b=c,N=c.length),ce(c))){if(!lt(c))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(c[0]),j=Object.values(c[0]);if(!U.some(A=>at(A)))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;Ve(j,A=>typeof A=="number")&&(f=S.DONUT,b=c),Ve(j,A=>Array.isArray(A)&&$(A))&&(Fe(c)>w?f=S.LINE:f=S.BAR,N=Fe(c),b=c.map(A=>({...A,data:ot(A,P=>$(P))}))),c=c.map(A=>Pe(A)),b=b.map(A=>Pe(A))}return K(c)&&[...new Set(c.flatMap(U=>Array.isArray(U)))][0],{dataset:c,type:f,usableDataset:b,maxSeriesLength:N}}function $e(c){return!c||K(c)&&!c.length}function K(c){return Array.isArray(c)}function $(c){if(!K(c)||$e(c))return!1;const w=c.map(f=>Number(f));return![...new Set(w.flatMap(f=>typeof f=="number"&&!isNaN(f)))].includes(!1)}function ce(c){return!K(c)||$e(c)||!![...new Set(c.flatMap(f=>typeof f=="object"&&!Array.isArray(f)))].includes(!1)?!1:!c.map(f=>Object.keys(f).length>0).includes(!1)}function tt(c,w){const f=Object.keys(c).sort(),b=Object.keys(w).sort();if(f.length!==b.length)return!1;for(let N=0;N<f.length;N+=1){const V=f[N],M=b[N];if(V!==M||typeof c[V]!=typeof w[M])return!1}return!0}function lt(c){if(c.length<=1)return!0;for(let w=0;w<c.length;w+=1)for(let f=w+1;f<c.length;f+=1)if(!tt(c[w],c[f]))return!1;return!0}function at(c){return Ke.includes(c.toUpperCase())}function Ve(c,w){let f=[];for(let b=0;b<c.length;b+=1)f.push(w(c[b]));return f.includes(!0)}function Fe(c){return Math.max(...[...c].flatMap(w=>Object.values(w).filter(f=>$(f)).map(f=>f.length)))}function ot(c,w){return Object.values(c).filter(f=>w(f))[0]}function Pe(c){const w={};for(let f in c)c.hasOwnProperty(f)&&(w[f.toUpperCase()]=c[f]);return w}const Ie=c=>(e.pushScopeId("data-v-dbfac93e"),c=c(),e.popScopeId(),c),nt=["id"],rt=["xmlns","viewBox"],it=["id"],ut=["id"],st=Ie(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),ct=["id"],dt=["flood-color"],vt={key:0,class:"donut-label-connectors"},mt=["d","stroke","stroke-width","filter"],ft=["cx","cy","r","fill","filter"],pt={class:"donut"},ht=["d","fill","stroke","stroke-width","filter"],kt=["d","onMouseenter","onClick"],gt={key:1,class:"donut-labels quick-animation"},yt=["cx","cy","fill","stroke","filter"],xt=["text-anchor","x","y","fill","font-size","filter"],St=["text-anchor","x","y","fill","font-size","filter"],bt={key:2,class:"donut-hollow quick-animation"},Bt=["x","y","font-size","fill"],wt=["x","y","font-size","fill"],Et={key:0,class:"line-grid"},At=["x1","x2","y1","y2","stroke","stroke-width"],Lt=["x1","x2","y1","y2","stroke","stroke-width"],_t={key:1,class:"line-axis"},Ct=["x1","x2","y1","y2","stroke","stroke-width"],zt=["x1","x2","y1","y2","stroke","stroke-width"],Nt={key:2,class:"yLabels"},Vt=["x1","x2","y1","y2","stroke","stroke-width"],Ft=["x","y","font-size","fill"],Pt={key:3,class:"periodLabels"},$t=["x1","x2","y1","y2","stroke","stroke-width"],It=["font-size","text-anchor","fill","transform"],Tt={class:"plots"},Ot={class:"line-plot-series"},Rt=["d","stroke","stroke-width"],Dt=["d","stroke","stroke-width"],Mt=["d","stroke","stroke-width"],Ut=["d","stroke","stroke-width"],qt=["cx","cy","fill","stroke"],Wt={key:4,class:"dataLabels"},Ht=["font-size","fill","x","y"],jt={class:"tooltip-traps"},Gt=["x","y","height","width","fill","onMouseenter","onClick"],Xt={key:0,class:"line-grid"},Yt=["x1","x2","y1","y2","stroke","stroke-width"],Zt=["x1","x2","y1","y2","stroke","stroke-width"],Jt={key:1,class:"line-axis"},Qt=["x1","x2","y1","y2","stroke","stroke-width"],Kt=["x1","x2","y1","y2","stroke","stroke-width"],el={key:2,class:"yLabels"},tl=["x1","x2","y1","y2","stroke","stroke-width"],ll=["x","y","font-size","fill"],al={key:3,class:"periodLabels"},ol=["x1","x2","y1","y2","stroke","stroke-width"],nl=["font-size","text-anchor","transform","fill"],rl={class:"plots"},il=["x","width","height","y","fill","stroke","stroke-width"],ul=["to"],sl=["from","to"],cl={key:4,class:"dataLabels"},dl=["x","y","font-size","fill"],vl={class:"tooltip-traps"},ml=["x","y","height","width","fill","onMouseenter","onClick"],fl={key:3,class:"axis-labels"},pl={key:0},hl=["font-size","fill","x","y"],kl={key:1},gl=["font-size","fill","x","y"],yl={key:2},xl=["font-size","fill","transform"],Sl={key:3},bl=["font-size","fill","transform"],Bl={key:6,class:"vue-data-ui-watermark"},wl=["onClick"],El=["onClick"],Al=["onClick"],Ll={key:1,class:"vue-ui-quick-chart-not-processable"},_l=Ie(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),Cl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(c,{expose:w,emit:f}){const b=c,{vue_ui_quick_chart:N}=i.useConfig(),V=e.ref(null),M=e.ref(null),U=e.ref(null),j=e.ref(null),A=e.ref(i.createUid()),P=e.ref(!1),G=e.ref(null),T=e.ref(""),F=e.ref(null),me=e.ref(null),fe=e.ref(null),x=e.ref([]),pe=e.ref(0),ee=e.ref(0),t=e.computed({get:()=>ge(),set:n=>n}),Te=e.computed(()=>t.value.showUserOptionsOnChartHover),he=e.computed(()=>t.value.keepUserOptionsStateOnChartLeave),te=e.ref(!t.value.showUserOptionsOnChartHover);function ke(n=!1){Te.value&&(te.value=n)}function ge(){const n=Ne.useNestedProp({userConfig:b.config,defaultConfig:N});let s={};return n.theme?s={...Ne.useNestedProp({userConfig:i.themes.vue_ui_quick_chart[n.theme]||b.config,defaultConfig:n}),customPalette:i.themePalettes[n.theme]||i.palette}:s=n,b.config&&i.hasDeepProperty(b.config,"zoomStartIndex")?s.zoomStartIndex=b.config.zoomStartIndex:s.zoomStartIndex=null,b.config&&i.hasDeepProperty(b.config,"zoomEndIndex")?s.zoomEndIndex=b.config.zoomEndIndex:s.zoomEndIndex=null,s}e.watch(()=>b.config,n=>{t.value=ge(),y.value.width=t.value.width,y.value.height=t.value.height,te.value=!t.value.showUserOptionsOnChartHover,Se()},{deep:!0}),e.watch(()=>b.dataset,n=>{p.value=Y.value,k.value.start=0,k.value.end=p.value.maxSeriesLength,ee.value+=1},{deep:!0});const X=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),Y=e.computed(()=>{const n=et({dataset:i.sanitizeArray(b.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return n||console.error("VueUiQuickChart : Dataset is not processable"),n}),p=e.ref(Y.value),Oe=e.computed(()=>!!p.value),B=e.computed(()=>p.value?p.value.type:null);e.watch(()=>B.value,n=>{n||i.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:le,isImaging:ae,generatePdf:ye,generateImage:xe}=ze.usePrinter({elementId:`${B.value}_${A.value}`,fileName:t.value.title||B.value}),Re=e.computed(()=>t.value.showUserOptions&&!t.value.title),y=e.ref({width:t.value.width,height:t.value.height}),oe=e.ref({showTooltip:t.value.showTooltip}),ne=e.ref(null);e.onMounted(()=>{Se()});function Se(){if(t.value.responsive){const n=Ce.throttle(()=>{const{width:s,height:l}=Ce.useResponsive({chart:V.value,title:t.value.title?M.value:null,legend:t.value.showLegend?U.value:null,slicer:[S.BAR,S.LINE].includes(B.value)&&t.value.zoomXy&&p.value.maxSeriesLength>1?j.value:null,source:me.value,noTitle:fe.value});y.value.width=s,y.value.height=l});ne.value=new ResizeObserver(n),ne.value.observe(V.value.parentNode)}Le()}e.onBeforeUnmount(()=>{ne.value&&ne.value.disconnect()});const De=e.computed(()=>{switch(B.value){case S.LINE:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.BAR:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;case S.DONUT:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`;default:return`0 0 ${y.value.width<=0?10:y.value.width} ${y.value.height<=0?10:y.value.height}`}});function be(n){return[...n].map(s=>s.value).reduce((s,l)=>s+l,0)}function Z(n){return t.value.blurOnHover&&![null,void 0].includes(F.value)&&F.value!==n?`url(#blur_${A.value})`:""}function Be(n,s){x.value.includes(n)?x.value=x.value.filter(l=>l!==n):x.value.length<s&&x.value.push(n)}const we=e.ref(null),Ee=e.ref(null),re=e.ref(!1);function Me(n,s){re.value=!0;let l=n.value;const r=Y.value.dataset.find((u,m)=>n.id===`donut_${m}`).VALUE;if(x.value.includes(n.id)){let u=function(){l>r?(re.value=!1,cancelAnimationFrame(Ee.value),p.value={...p.value,dataset:p.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,p.value={...p.value,dataset:p.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:l,VALUE:l}:m)},Ee.value=requestAnimationFrame(u))};x.value=x.value.filter(m=>m!==n.id),u()}else if(s.length>1){let u=function(){l<r/100?(re.value=!1,cancelAnimationFrame(we.value),x.value.push(n.id),p.value={...p.value,dataset:p.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:0,VALUE:0}:m)}):(l/=1.1,p.value={...p.value,dataset:p.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:l,VALUE:l}:m)},we.value=requestAnimationFrame(u))};u()}}const I=e.ref(null);function Ue(n){I.value=n}const Ae=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),E=e.computed(()=>{if(B.value!==S.DONUT)return null;const n=p.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?i.convertColorToHex(a.COLOR):X.value[o+t.value.paletteStartIndex]||i.palette[o+t.value.paletteStartIndex]||i.palette[(o+t.value.paletteStartIndex)%i.palette.length],immutableValue:a.value}));function s(a,o){return i.dataLabel({v:isNaN(a.value/be(o))?0:a.value/be(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function r(a,o){const g=Y.value.dataset.find((L,C)=>`donut_${C}`===a).VALUE;return Math.abs(String(Number(g.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function u({datapoint:a,seriesIndex:o}){G.value={datapoint:a,seriesIndex:o,config:t.value,dataset:n},F.value=a.id;const g=t.value.tooltipCustomFormat;if(i.isFunction(g)&&i.functionReturnsString(()=>g({datapoint:a,seriesIndex:o,series:n,config:t.value})))T.value=g({datapoint:a,seriesIndex:o,series:n,config:t.value});else{let h="";h+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,h+=`<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>`,h+=`<b>${i.applyDataLabel(t.value.formatter,a.value,i.dataLabel({p:t.value.valuePrefix,v:a.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:a,seriesIndex:o})}</b>`,h+=`<span>(${i.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,T.value=`<div>${h}</div>`}P.value=!0}function m(){P.value=!1,F.value=null,I.value=null}const _={centerX:y.value.width/2,centerY:y.value.height/2},z=n.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),W=n.map((a,o)=>({...a,proportion:(a.value||0)/z,value:a.value||0,absoluteValue:Y.value.dataset.find((g,h)=>`donut_${h}`===a.id).VALUE})),O=y.value.width/2,H=y.value.height/2,R=y.value.height*t.value.donutRadiusRatio;return{dataset:W.filter(a=>!x.value.includes(a.id)),legend:W,drawingArea:_,displayArcPercentage:s,isArcBigEnough:l,useTooltip:u,killTooltip:m,getSpaces:r,total:z,cx:O,cy:H,radius:R,chart:i.makeDonut({series:n.filter(a=>!x.value.includes(a.id))},O,H,R,R,1.99999,2,1,360,105.25,y.value.height*Ae.value)}}),k=e.ref({start:0,end:p.value.maxSeriesLength});function qe(){Le()}const q=e.ref(null);async function Le(){(t.value.zoomStartIndex!==null||t.value.zoomEndIndex!==null)&&q.value?(t.value.zoomStartIndex!==null&&(await e.nextTick(),await e.nextTick(),q.value&&q.value.setStartValue(t.value.zoomStartIndex)),t.value.zoomEndIndex!==null&&(await e.nextTick(),await e.nextTick(),q.value&&q.value.setEndValue(We(t.value.zoomEndIndex+1)))):(k.value={start:0,end:p.value.maxSeriesLength},ee.value+=1)}function We(n){const s=p.value.maxSeriesLength;return n>s?s:n<0||t.value.zoomStartIndex!==null&&n<t.value.zoomStartIndex?t.value.zoomStartIndex!==null?t.value.zoomStartIndex+1:1:n}const He=e.computed(()=>{if(!t.value.zoomMinimap.show||B.value===S.DONUT)return[];let n=[];$(p.value.dataset)&&(n=p.value.dataset),ce(p.value.dataset)&&(n=p.value.dataset.map((u,m)=>({values:u.VALUE||u.DATA||u.SERIE||u.SERIES||u.VALUES||u.NUM||0,id:B.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(u=>!x.value.includes(u.id)));const s=$(n)?n.length:Math.max(...n.map(u=>u.values.length));let l=[];if($(n))l=n;else for(let u=0;u<s;u+=1)l.push(n.map(m=>m.values[u]||0).reduce((m,_)=>(m||0)+(_||0),0));const r=Math.min(...l);return l.map(u=>u+(r<0?Math.abs(r):0))}),v=e.computed(()=>{if(B.value!==S.LINE)return null;const n={height:y.value.height,width:y.value.width},s={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:n.width-t.value.xyPaddingRight,bottom:n.height-t.value.xyPaddingBottom,width:n.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:n.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];$(p.value.dataset)&&(l=[{values:p.value.dataset.slice(k.value.start,k.value.end),absoluteIndices:p.value.dataset.map((a,o)=>o).slice(k.value.start,k.value.end),name:t.value.title,color:X.value[t.value.paletteStartIndex]||i.palette[t.value.paletteStartIndex],id:"line_0"}]),ce(p.value.dataset)&&(l=p.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?i.convertColorToHex(a.COLOR):X.value[o+t.value.paletteStartIndex]||i.palette[o+t.value.paletteStartIndex]||i.palette[(o+t.value.paletteStartIndex)%i.palette.length],values:a.values.slice(k.value.start,k.value.end),absoluteIndices:a.values.map((g,h)=>h).slice(k.value.start,k.value.end)})));const r={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))},u=i.calculateNiceScale(r.min<0?r.min:0,r.max<0?0:r.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,_=r.max<0?s.top:s.bottom-m/(u.max+m)*s.height,z=s.width/r.maxSeries,W=u.ticks.map(a=>({y:s.bottom-s.height*((a+m)/(u.max+m)),x:s.left-8,value:a})),O=l.map((a,o)=>({...a,coordinates:a.values.map((g,h)=>({x:s.left+z*(h+1)-z/2,y:s.bottom-(g+m)/(u.max+m)*s.height,value:g}))})).map(a=>{let o=[];return a.coordinates.forEach(g=>{o.push(`${g.x},${g.y} `)}),{...a,linePath:o.join(" ")}});function H(a){F.value=a,I.value=a;const o=l.map(h=>({...h,value:h.values[a],absoluteIndex:h.absoluteIndices[a]})).filter(h=>!x.value.includes(h.id));G.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const g=t.value.tooltipCustomFormat;if(i.isFunction(g)&&i.functionReturnsString(()=>g({datapoint:o,seriesIndex:a,series:l,config:t.value})))T.value=g({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let h="";t.value.xyPeriods[o[0].absoluteIndex]&&(h+=`<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)=>{h+=`
|
|
2
2
|
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
3
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
4
|
<span>${L.name}:</span>
|
|
5
|
-
<b>${
|
|
5
|
+
<b>${i.applyDataLabel(t.value.formatter,L.value,i.dataLabel({p:t.value.valuePrefix,v:L.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:L,seriesIndex:C})}
|
|
6
6
|
</b>
|
|
7
7
|
</div>
|
|
8
|
-
`}),T.value=h}P.value=!0}function R(){F.value=null,P.value=!1}return{absoluteZero:_,dataset:O.filter(a=>!x.value.includes(a.id)),legend:O,drawingArea:s,extremes:r,slotSize:z,yLabels:W,useTooltip:H,killTooltip:R}}),d=e.computed(()=>{if(B.value!==S.BAR)return null;const n={height:y.value.height,width:y.value.width},s={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:n.width-t.value.xyPaddingRight,bottom:n.height-t.value.xyPaddingBottom,width:n.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:n.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];$(p.value.dataset)&&(l=[{values:p.value.dataset.slice(k.value.start,k.value.end),absoluteIndices:p.value.dataset.map((o,g)=>g).slice(k.value.start,k.value.end),name:t.value.title,color:X.value[t.value.paletteStartIndex]||
|
|
8
|
+
`}),T.value=h}P.value=!0}function R(){F.value=null,P.value=!1}return{absoluteZero:_,dataset:O.filter(a=>!x.value.includes(a.id)),legend:O,drawingArea:s,extremes:r,slotSize:z,yLabels:W,useTooltip:H,killTooltip:R}}),d=e.computed(()=>{if(B.value!==S.BAR)return null;const n={height:y.value.height,width:y.value.width},s={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:n.width-t.value.xyPaddingRight,bottom:n.height-t.value.xyPaddingBottom,width:n.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:n.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];$(p.value.dataset)&&(l=[{values:p.value.dataset.slice(k.value.start,k.value.end),absoluteIndices:p.value.dataset.map((o,g)=>g).slice(k.value.start,k.value.end),name:t.value.title,color:X.value[t.value.paletteStartIndex]||i.palette[t.value.paletteStartIndex],id:"bar_0"}]),ce(p.value.dataset)&&(l=p.value.dataset.map((o,g)=>({...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 ${g}`,id:`bar_${g}`})).map((o,g)=>({...o,color:o.COLOR?i.convertColorToHex(o.COLOR):X.value[g+t.value.paletteStartIndex]||i.palette[g+t.value.paletteStartIndex]||i.palette[(g+t.value.paletteStartIndex)%i.palette.length],values:o.values.slice(k.value.start,k.value.end),absoluteIndices:o.values.map((h,L)=>L).slice(k.value.start,k.value.end)})));const r={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))},u=i.calculateNiceScale(r.min<0?r.min:0,r.max,t.value.xyScaleSegments),m=u.min<0?Math.abs(u.min):0,_=s.bottom-m/(u.max+m)*s.height,z=s.width/r.maxSeries,W=u.ticks.map(o=>({y:s.bottom-s.height*((o+m)/(u.max+m)),x:s.left-8,value:o})),O=l.map((o,g)=>({...o,coordinates:o.values.map((h,L)=>{const C=(h+m)/(r.max+m)*s.height,J=Math.abs(h)/Math.abs(r.min)*(s.height-_),ve=m/(r.max+m)*s.height,Q=z/l.filter(D=>!x.value.includes(D.id)).length-t.value.barGap/l.filter(D=>!x.value.includes(D.id)).length;return{x:s.left+z*L+Q*g+t.value.barGap/2,y:h>0?s.bottom-C:_,height:h>0?C-ve:J,value:h,width:Q}})})),H=l.filter(o=>!x.value.includes(o.id)).map((o,g)=>({...o,coordinates:o.values.map((h,L)=>{const C=(h+m)/(r.max+m)*s.height,J=Math.abs(h)/(r.max+m)*s.height,ve=m/(r.max+m)*s.height,Q=z/l.filter(D=>!x.value.includes(D.id)).length-t.value.barGap/l.filter(D=>!x.value.includes(D.id)).length;return{x:s.left+z*L+Q*g+t.value.barGap/2,y:h>0?s.bottom-C:_,height:h>0?C-ve:J,value:h,width:Q}})}));function R(o){F.value=o,I.value=o;const g=l.map(L=>({...L,value:L.values[o],absoluteIndex:L.absoluteIndices[o]})).filter(L=>!x.value.includes(L.id));G.value={datapoint:g,seriesIndex:o,config:t.value,dataset:l};const h=t.value.tooltipCustomFormat;if(i.isFunction(h)&&i.functionReturnsString(()=>h({datapoint:g,seriesIndex:o,series:l,config:t.value})))T.value=h({point:g,seriesIndex:o,series:l,config:t.value});else{let L="";t.value.xyPeriods[g[0].absoluteIndex]&&(L+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[g[0].absoluteIndex]}</div>`),g.forEach((C,J)=>{L+=`
|
|
9
9
|
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
10
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
11
|
<span>${C.name}:</span>
|
|
12
|
-
<b>${
|
|
12
|
+
<b>${i.applyDataLabel(t.value.formatter,C.value,i.dataLabel({p:t.value.valuePrefix,v:C.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:C,seriesIndex:J})}
|
|
13
13
|
</b>
|
|
14
14
|
</div>
|
|
15
|
-
`}),T.value=L}P.value=!0}function a(){P.value=!1,F.value=null,I.value=null}return{absoluteZero:_,dataset:H.filter(o=>!x.value.includes(o.id)),legend:O,drawingArea:s,extremes:r,slotSize:z,yLabels:W,useTooltip:R,killTooltip:a}}),ie=e.ref(!1);function je(n){ie.value=n,pe.value+=1}function _e(){oe.value.showTooltip=!oe.value.showTooltip}const ue=e.ref(!1);function de(){ue.value=!ue.value}return w({generatePdf:ye,generateImage:xe,toggleTooltip:_e,toggleAnnotator:de}),(n,s)=>Oe.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${B.value}_${A.value}`,ref_key:"quickChart",ref:V,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%":""}`),onMouseenter:s[5]||(s[5]=()=>ke(!0)),onMouseleave:s[6]||(s[6]=()=>ke(!1))},[t.value.userOptionsButtons.annotator?(e.openBlock(),e.createBlock(Je.PenAndPaper,{key:0,parent:V.value,backgroundColor:t.value.backgroundColor,color:t.value.color,active:ue.value,onClose:de},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:fe,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.showUserOptions&&(he.value||te.value)?(e.openBlock(),e.createBlock(ze.UserOptions,{ref:"details",key:`user_option_${pe.value}`,backgroundColor:t.value.backgroundColor,color:t.value.color,isPrinting:e.unref(le),isImaging:e.unref(ae),uid:A.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:oe.value.showTooltip,isFullscreen:ie.value,titles:{...t.value.userOptionsButtonTitles},chartElement:V.value,position:t.value.userOptionsPosition,hasAnnotator:t.value.userOptionsButtons.annotator,isAnnotation:ue.value,onToggleFullscreen:je,onGeneratePdf:e.unref(ye),onGenerateImage:e.unref(xe),onToggleTooltip:_e,onToggleAnnotator:de,style:e.normalizeStyle({visibility:he.value?te.value?"visible":"hidden":"visible"})},e.createSlots({_:2},[n.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,n.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(n.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),t.value.title?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"quickChartTitle",ref:M,class:"vue-ui-quick-chart-title",style:e.normalizeStyle(`background:transparent;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:4,xmlns:e.unref(u.XMLNS),viewBox:De.value,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.color}`)},[e.createVNode(Ze._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${A.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${A.value}`},null,8,ut),st],8,it),e.createElementVNode("filter",{id:`shadow_${A.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,dt)],8,ct)]),B.value===S.DONUT?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[E.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(u.calcNutArrowPath)(l,{x:y.value.width/2,y:y.value.height/2},16,16,!1,!1,y.value.height*Ae.value),stroke:l.color,"stroke-width":t.value.donutLabelMarkerStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:Z(l.id)},null,8,mt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:E.value.cx,cy:E.value.cy,r:E.value.radius,fill:t.value.backgroundColor,filter:t.value.donutUseShadow?`url(#shadow_${A.value})`:""},null,8,ft),e.createElementVNode("g",pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.donutStrokeWidth,filter:Z(l.id)},null,8,ht))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:"transparent",onMouseenter:i=>E.value.useTooltip({datapoint:l,seriesIndex:r}),onMouseout:s[0]||(s[0]=i=>E.value.killTooltip()),onClick:i=>f("selectDatapoint",l)},null,40,kt))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[E.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,stroke:t.value.backgroundColor,"stroke-width":1,r:3,filter:Z(l.id)},null,8,yt)):e.createCommentVNode("",!0),E.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:Z(l.id)},e.toDisplayString(E.value.displayArcPercentage(l,E.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:r}))+") ",9,xt)):e.createCommentVNode("",!0),E.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:Z(l.id)},e.toDisplayString(l.name),9,St)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.donutShowTotal?(e.openBlock(),e.createElementBlock("g",bt,[e.createElementVNode("text",{"text-anchor":"middle",x:E.value.drawingArea.centerX,y:E.value.drawingArea.centerY-t.value.donutTotalLabelFontSize/2,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(t.value.donutTotalLabelText),9,Bt),e.createElementVNode("text",{"text-anchor":"middle",x:E.value.drawingArea.centerX,y:E.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:E.value.total,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,wt)])):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",Et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=v.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:v.value.drawingArea.left,x2:v.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,At)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:v.value.drawingArea.left+v.value.slotSize*r,x2:v.value.drawingArea.left+v.value.slotSize*r,y1:v.value.drawingArea.top,y2:v.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Lt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",_t,[e.createElementVNode("line",{x1:v.value.drawingArea.left,x2:v.value.drawingArea.left,y1:v.value.drawingArea.top,y2:v.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Ct),e.createElementVNode("line",{x1:v.value.drawingArea.left,x2:v.value.drawingArea.right,y1:isNaN(v.value.absoluteZero)?v.value.drawingArea.bottom:v.value.absoluteZero,y2:isNaN(v.value.absoluteZero)?v.value.drawingArea.bottom:v.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,zt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",Nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.yLabels,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=v.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:v.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Vt)):e.createCommentVNode("",!0),l.y<=v.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:r})),9,Ft)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:v.value.drawingArea.left+v.value.slotSize*(r+1)-v.value.slotSize/2,x2:v.value.drawingArea.left+v.value.slotSize*(r+1)-v.value.slotSize/2,y1:v.value.drawingArea.bottom,y2:v.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,$t))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(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(${v.value.drawingArea.left+v.value.slotSize*(r+1)-v.value.slotSize/2}, ${v.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}), rotate(${t.value.xyPeriodLabelsRotation})`},e.toDisplayString(l),9,It))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock("g",Ot,[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,Rt),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,Dt)],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,Mt),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,Ut)],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("circle",{cx:i.x,cy:e.unref(u.checkNaN)(i.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,qt))),256))]))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,x:i.x,y:e.unref(u.checkNaN)(i.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)(i.value),e.unref(u.dataLabel)({p:t.value.valuePrefix,v:e.unref(u.checkNaN)(i.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:i,seriesIndex:m})),9,Ht))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:v.value.drawingArea.left+r*v.value.slotSize,y:v.value.drawingArea.top,height:v.value.drawingArea.height<=0?1e-5:v.value.drawingArea.height,width:v.value.slotSize<=0?1e-5:v.value.slotSize,fill:[F.value,I.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:i=>v.value.useTooltip(r),onMouseleave:s[1]||(s[1]=i=>v.value.killTooltip()),onClick:i=>f("selectDatapoint",v.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,Gt))),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",Xt,[(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,Yt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*r,x2:d.value.drawingArea.left+d.value.slotSize*r,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Zt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",Jt,[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,Qt),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,Kt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",el,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,(l,r)=>(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,tl)):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:r})),9,ll)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2,x2:d.value.drawingArea.left+d.value.slotSize*(r+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,ol))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(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(${d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2}, ${d.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}) rotate(${t.value.xyPeriodLabelsRotation})`,fill:t.value.color},e.toDisplayString(l),9,nl))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",rl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("rect",{x:i.x,width:i.width<=0?1e-5:i.width,height:e.unref(u.checkNaN)(i.height<=0?1e-5:i.height),y:e.unref(u.checkNaN)(i.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&&i.value<0})},[t.value.barAnimated&&i.value>0&&!e.unref(le)&&!e.unref(ae)?(e.openBlock(),e.createElementBlock("animate",{key:0,attributeName:"height",from:0,to:i.height,dur:"0.5s"},null,8,ul)):e.createCommentVNode("",!0),t.value.barAnimated&&i.value>0&&!e.unref(le)&&!e.unref(ae)?(e.openBlock(),e.createElementBlock("animate",{key:1,attributeName:"y",from:d.value.absoluteZero,to:d.value.absoluteZero-i.height,dur:"0.5s"},null,8,sl)):e.createCommentVNode("",!0)],10,il))),256))],64))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(i,m)=>(e.openBlock(),e.createElementBlock("text",{x:i.x+i.width/2,y:e.unref(u.checkNaN)(i.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)(i.value),e.unref(u.dataLabel)({p:t.value.valuePrefix,v:e.unref(u.checkNaN)(i.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:i,seriesIndex:m})),9,dl))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",vl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:d.value.drawingArea.left+r*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:[F.value,I.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:i=>d.value.useTooltip(r),onMouseleave:s[2]||(s[2]=i=>d.value.killTooltip()),onClick:i=>f("selectDatapoint",d.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,ml))),256))])],64)):e.createCommentVNode("",!0),[S.LINE,S.BAR].includes(B.value)?(e.openBlock(),e.createElementBlock("g",fl,[t.value.xAxisLabel&&B.value===S.LINE?(e.openBlock(),e.createElementBlock("g",pl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:v.value.drawingArea.left+v.value.drawingArea.width/2,y:y.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,hl)])):e.createCommentVNode("",!0),t.value.xAxisLabel&&B.value===S.BAR?(e.openBlock(),e.createElementBlock("g",kl,[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:y.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,gl)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&B.value===S.LINE?(e.openBlock(),e.createElementBlock("g",yl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${v.value.drawingArea.top+v.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,xl)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&B.value===S.BAR?(e.openBlock(),e.createElementBlock("g",Sl,[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,bl)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],12,rt)):e.createCommentVNode("",!0),B.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ye.default,{key:5,config:{type:"line",style:{backgroundColor:t.value.backgroundColor,line:{axis:{color:t.value.xyAxisStroke},path:{color:t.value.xyAxisStroke,strokeWidth:.5}}}}},null,8,["config"])),n.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Bl,[e.renderSlot(n.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),[S.BAR,S.LINE].includes(B.value)&&t.value.zoomXy&&p.value.maxSeriesLength>1?(e.openBlock(),e.createElementBlock("div",{key:`slicer_${ee.value}`,ref_key:"quickChartSlicer",ref:j},[(e.openBlock(),e.createBlock(Xe.Slicer,{ref_key:"slicerComponent",ref:q,key:`slicer_${ee.value}`,background:t.value.zoomColor,borderColor:t.value.backgroundColor,fontSize:t.value.zoomFontSize,useResetSlot:t.value.zoomUseResetSlot,labelLeft:t.value.xyPeriods[k.value.start]?t.value.xyPeriods[k.value.start]:"",labelRight:t.value.xyPeriods[k.value.end-1]?t.value.xyPeriods[k.value.end-1]:"",textColor:t.value.color,inputColor:t.value.zoomColor,selectColor:t.value.zoomHighlightColor,max:p.value.maxSeriesLength,min:0,valueStart:k.value.start,valueEnd:k.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:He.value,minimapIndicatorColor:t.value.zoomMinimap.indicatorColor,minimapSelectedIndex:I.value,start:k.value.start,"onUpdate:start":s[3]||(s[3]=l=>k.value.start=l),end:k.value.end,"onUpdate:end":s[4]||(s[4]=l=>k.value.end=l),refreshStartPoint:t.value.zoomStartIndex!==null?t.value.zoomStartIndex:0,refreshEndPoint:t.value.zoomEndIndex!==null?t.value.zoomEndIndex+1:p.value.maxSeriesLength,onReset:qe,onTrapMouse:Ue},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(n.$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","refreshStartPoint","refreshEndPoint"]))])):e.createCommentVNode("",!0),t.value.showLegend?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"quickChartLegend",ref:U,class:"vue-ui-quick-chart-legend",style:e.normalizeStyle(`background:transparent;color:${t.value.color}`)},[B.value===S.DONUT?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(E.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{Me(l,E.value.dataset),f("selectLegend",l)},style:e.normalizeStyle(`cursor: ${E.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(se.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:r})),5),x.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)}," ( - % ) ",4)):re.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/E.value.total*100,s:"%",r:t.value.dataLabelRoundingPercentage}))+") ",5))],64))],12,wl))),256)):e.createCommentVNode("",!0),B.value===S.LINE?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(v.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{Be(l.id,v.value.legend.length-1),f("selectLegend",l)},style:e.normalizeStyle(`cursor: ${v.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(se.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,El))),256)):e.createCommentVNode("",!0),B.value===S.BAR?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{Be(l.id,d.value.legend.length-1),f("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(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(se.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,Al))),256)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),n.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:me,dir:"auto"},[e.renderSlot(n.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ge._sfc_main,{show:oe.value.showTooltip&&P.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:V.value,content:T.value,isFullscreen:ie.value,isCustom:e.unref(u.isFunction)(t.value.tooltipCustomFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(n.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(n.$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","isFullscreen","isCustom"])],46,nt)):(e.openBlock(),e.createElementBlock("div",Ll,[e.createVNode(se.default,{name:"circleCancel",stroke:"red"}),_l]))}},zl=Qe._export_sfc(Cl,[["__scopeId","data-v-c31c33da"]]);exports.default=zl;
|
|
15
|
+
`}),T.value=L}P.value=!0}function a(){P.value=!1,F.value=null,I.value=null}return{absoluteZero:_,dataset:H.filter(o=>!x.value.includes(o.id)),legend:O,drawingArea:s,extremes:r,slotSize:z,yLabels:W,useTooltip:R,killTooltip:a}}),ie=e.ref(!1);function je(n){ie.value=n,pe.value+=1}function _e(){oe.value.showTooltip=!oe.value.showTooltip}const ue=e.ref(!1);function de(){ue.value=!ue.value}return w({generatePdf:ye,generateImage:xe,toggleTooltip:_e,toggleAnnotator:de}),(n,s)=>Oe.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${B.value}_${A.value}`,ref_key:"quickChart",ref:V,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%":""}`),onMouseenter:s[5]||(s[5]=()=>ke(!0)),onMouseleave:s[6]||(s[6]=()=>ke(!1))},[t.value.userOptionsButtons.annotator?(e.openBlock(),e.createBlock(Je.PenAndPaper,{key:0,parent:V.value,backgroundColor:t.value.backgroundColor,color:t.value.color,active:ue.value,onClose:de},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Re.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:fe,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.showUserOptions&&(he.value||te.value)?(e.openBlock(),e.createBlock(ze.UserOptions,{ref:"details",key:`user_option_${pe.value}`,backgroundColor:t.value.backgroundColor,color:t.value.color,isPrinting:e.unref(le),isImaging:e.unref(ae),uid:A.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:oe.value.showTooltip,isFullscreen:ie.value,titles:{...t.value.userOptionsButtonTitles},chartElement:V.value,position:t.value.userOptionsPosition,hasAnnotator:t.value.userOptionsButtons.annotator,isAnnotation:ue.value,onToggleFullscreen:je,onGeneratePdf:e.unref(ye),onGenerateImage:e.unref(xe),onToggleTooltip:_e,onToggleAnnotator:de,style:e.normalizeStyle({visibility:he.value?te.value?"visible":"hidden":"visible"})},e.createSlots({_:2},[n.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,n.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,n.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,n.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(n.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"3"}:void 0,n.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(n.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),t.value.title?(e.openBlock(),e.createElementBlock("div",{key:3,ref_key:"quickChartTitle",ref:M,class:"vue-ui-quick-chart-title",style:e.normalizeStyle(`background:transparent;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:4,xmlns:e.unref(i.XMLNS),viewBox:De.value,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.color}`)},[e.createVNode(Ze._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${A.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${A.value}`},null,8,ut),st],8,it),e.createElementVNode("filter",{id:`shadow_${A.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,dt)],8,ct)]),B.value===S.DONUT?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[E.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(i.calcNutArrowPath)(l,{x:y.value.width/2,y:y.value.height/2},16,16,!1,!1,y.value.height*Ae.value),stroke:l.color,"stroke-width":t.value.donutLabelMarkerStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:Z(l.id)},null,8,mt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:E.value.cx,cy:E.value.cy,r:E.value.radius,fill:t.value.backgroundColor,filter:t.value.donutUseShadow?`url(#shadow_${A.value})`:""},null,8,ft),e.createElementVNode("g",pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.donutStrokeWidth,filter:Z(l.id)},null,8,ht))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:"transparent",onMouseenter:u=>E.value.useTooltip({datapoint:l,seriesIndex:r}),onMouseout:s[0]||(s[0]=u=>E.value.killTooltip()),onClick:u=>f("selectDatapoint",l)},null,40,kt))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[E.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(i.calcMarkerOffsetX)(l).x,cy:e.unref(i.calcMarkerOffsetY)(l)-3.7,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":1,r:3,filter:Z(l.id)},null,8,yt)):e.createCommentVNode("",!0),E.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(i.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(i.calcMarkerOffsetX)(l,!0).x,y:e.unref(i.calcMarkerOffsetY)(l),fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:Z(l.id)},e.toDisplayString(E.value.displayArcPercentage(l,E.value.chart))+" ("+e.toDisplayString(e.unref(i.applyDataLabel)(t.value.formatter,l.value,e.unref(i.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r}))+") ",9,xt)):e.createCommentVNode("",!0),E.value.isArcBigEnough(l,!0,20)?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(i.calcMarkerOffsetX)(l).anchor,x:e.unref(i.calcMarkerOffsetX)(l,!0).x,y:e.unref(i.calcMarkerOffsetY)(l)+t.value.dataLabelFontSize,fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:Z(l.id)},e.toDisplayString(l.name),9,St)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.donutShowTotal?(e.openBlock(),e.createElementBlock("g",bt,[e.createElementVNode("text",{"text-anchor":"middle",x:E.value.drawingArea.centerX,y:E.value.drawingArea.centerY-t.value.donutTotalLabelFontSize/2,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(t.value.donutTotalLabelText),9,Bt),e.createElementVNode("text",{"text-anchor":"middle",x:E.value.drawingArea.centerX,y:E.value.drawingArea.centerY+t.value.donutTotalLabelFontSize,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(e.unref(i.dataLabel)({p:t.value.valuePrefix,v:E.value.total,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,wt)])):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",Et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=v.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:v.value.drawingArea.left,x2:v.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,At)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:v.value.drawingArea.left+v.value.slotSize*r,x2:v.value.drawingArea.left+v.value.slotSize*r,y1:v.value.drawingArea.top,y2:v.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Lt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",_t,[e.createElementVNode("line",{x1:v.value.drawingArea.left,x2:v.value.drawingArea.left,y1:v.value.drawingArea.top,y2:v.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Ct),e.createElementVNode("line",{x1:v.value.drawingArea.left,x2:v.value.drawingArea.right,y1:isNaN(v.value.absoluteZero)?v.value.drawingArea.bottom:v.value.absoluteZero,y2:isNaN(v.value.absoluteZero)?v.value.drawingArea.bottom:v.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,zt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",Nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.yLabels,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=v.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:v.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Vt)):e.createCommentVNode("",!0),l.y<=v.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(i.applyDataLabel)(t.value.formatter,l.value,e.unref(i.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),9,Ft)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:v.value.drawingArea.left+v.value.slotSize*(r+1)-v.value.slotSize/2,x2:v.value.drawingArea.left+v.value.slotSize*(r+1)-v.value.slotSize/2,y1:v.value.drawingArea.bottom,y2:v.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,$t))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(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(${v.value.drawingArea.left+v.value.slotSize*(r+1)-v.value.slotSize/2}, ${v.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}), rotate(${t.value.xyPeriodLabelsRotation})`},e.toDisplayString(l),9,It))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Tt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock("g",Ot,[t.value.lineSmooth?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("path",{d:`M ${e.unref(i.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,Rt),e.createElementVNode("path",{d:`M ${e.unref(i.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,Dt)],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,Mt),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,Ut)],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(u,m)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:e.unref(i.checkNaN)(u.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,qt))),256))]))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(u,m)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,x:u.x,y:e.unref(i.checkNaN)(u.y)-t.value.dataLabelFontSize/2,class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},e.toDisplayString(e.unref(i.applyDataLabel)(t.value.formatter,e.unref(i.checkNaN)(u.value),e.unref(i.dataLabel)({p:t.value.valuePrefix,v:e.unref(i.checkNaN)(u.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:u,seriesIndex:m})),9,Ht))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:v.value.drawingArea.left+r*v.value.slotSize,y:v.value.drawingArea.top,height:v.value.drawingArea.height<=0?1e-5:v.value.drawingArea.height,width:v.value.slotSize<=0?1e-5:v.value.slotSize,fill:[F.value,I.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:u=>v.value.useTooltip(r),onMouseleave:s[1]||(s[1]=u=>v.value.killTooltip()),onClick:u=>f("selectDatapoint",v.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,Gt))),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",Xt,[(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,Yt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*r,x2:d.value.drawingArea.left+d.value.slotSize*r,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Zt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",Jt,[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,Qt),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,Kt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",el,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,(l,r)=>(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,tl)):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(i.applyDataLabel)(t.value.formatter,l.value,e.unref(i.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),9,ll)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2,x2:d.value.drawingArea.left+d.value.slotSize*(r+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,ol))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(k.value.start,k.value.end),(l,r)=>(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(${d.value.drawingArea.left+d.value.slotSize*(r+1)-d.value.slotSize/2}, ${d.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}) rotate(${t.value.xyPeriodLabelsRotation})`,fill:t.value.color},e.toDisplayString(l),9,nl))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",rl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(u,m)=>(e.openBlock(),e.createElementBlock("rect",{x:u.x,width:u.width<=0?1e-5:u.width,height:e.unref(i.checkNaN)(u.height<=0?1e-5:u.height),y:e.unref(i.checkNaN)(u.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&&u.value<0})},[t.value.barAnimated&&u.value>0&&!e.unref(le)&&!e.unref(ae)?(e.openBlock(),e.createElementBlock("animate",{key:0,attributeName:"height",from:0,to:u.height,dur:"0.5s"},null,8,ul)):e.createCommentVNode("",!0),t.value.barAnimated&&u.value>0&&!e.unref(le)&&!e.unref(ae)?(e.openBlock(),e.createElementBlock("animate",{key:1,attributeName:"y",from:d.value.absoluteZero,to:d.value.absoluteZero-u.height,dur:"0.5s"},null,8,sl)):e.createCommentVNode("",!0)],10,il))),256))],64))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(u,m)=>(e.openBlock(),e.createElementBlock("text",{x:u.x+u.width/2,y:e.unref(i.checkNaN)(u.y)-t.value.dataLabelFontSize/2,"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,class:"quick-animation"},e.toDisplayString(e.unref(i.applyDataLabel)(t.value.formatter,e.unref(i.checkNaN)(u.value),e.unref(i.dataLabel)({p:t.value.valuePrefix,v:e.unref(i.checkNaN)(u.value),s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:u,seriesIndex:m})),9,dl))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",vl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:d.value.drawingArea.left+r*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:[F.value,I.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:u=>d.value.useTooltip(r),onMouseleave:s[2]||(s[2]=u=>d.value.killTooltip()),onClick:u=>f("selectDatapoint",d.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,ml))),256))])],64)):e.createCommentVNode("",!0),[S.LINE,S.BAR].includes(B.value)?(e.openBlock(),e.createElementBlock("g",fl,[t.value.xAxisLabel&&B.value===S.LINE?(e.openBlock(),e.createElementBlock("g",pl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:v.value.drawingArea.left+v.value.drawingArea.width/2,y:y.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,hl)])):e.createCommentVNode("",!0),t.value.xAxisLabel&&B.value===S.BAR?(e.openBlock(),e.createElementBlock("g",kl,[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:y.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,gl)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&B.value===S.LINE?(e.openBlock(),e.createElementBlock("g",yl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${v.value.drawingArea.top+v.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,xl)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&B.value===S.BAR?(e.openBlock(),e.createElementBlock("g",Sl,[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,bl)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],12,rt)):e.createCommentVNode("",!0),B.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ye.default,{key:5,config:{type:"line",style:{backgroundColor:t.value.backgroundColor,line:{axis:{color:t.value.xyAxisStroke},path:{color:t.value.xyAxisStroke,strokeWidth:.5}}}}},null,8,["config"])),n.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Bl,[e.renderSlot(n.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(le)||e.unref(ae)})),void 0,!0)])):e.createCommentVNode("",!0),[S.BAR,S.LINE].includes(B.value)&&t.value.zoomXy&&p.value.maxSeriesLength>1?(e.openBlock(),e.createElementBlock("div",{key:`slicer_${ee.value}`,ref_key:"quickChartSlicer",ref:j},[(e.openBlock(),e.createBlock(Xe.Slicer,{ref_key:"slicerComponent",ref:q,key:`slicer_${ee.value}`,background:t.value.zoomColor,borderColor:t.value.backgroundColor,fontSize:t.value.zoomFontSize,useResetSlot:t.value.zoomUseResetSlot,labelLeft:t.value.xyPeriods[k.value.start]?t.value.xyPeriods[k.value.start]:"",labelRight:t.value.xyPeriods[k.value.end-1]?t.value.xyPeriods[k.value.end-1]:"",textColor:t.value.color,inputColor:t.value.zoomColor,selectColor:t.value.zoomHighlightColor,max:p.value.maxSeriesLength,min:0,valueStart:k.value.start,valueEnd:k.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:He.value,minimapIndicatorColor:t.value.zoomMinimap.indicatorColor,minimapSelectedIndex:I.value,start:k.value.start,"onUpdate:start":s[3]||(s[3]=l=>k.value.start=l),end:k.value.end,"onUpdate:end":s[4]||(s[4]=l=>k.value.end=l),refreshStartPoint:t.value.zoomStartIndex!==null?t.value.zoomStartIndex:0,refreshEndPoint:t.value.zoomEndIndex!==null?t.value.zoomEndIndex+1:p.value.maxSeriesLength,onReset:qe,onTrapMouse:Ue},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(n.$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","refreshStartPoint","refreshEndPoint"]))])):e.createCommentVNode("",!0),t.value.showLegend?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"quickChartLegend",ref:U,class:"vue-ui-quick-chart-legend",style:e.normalizeStyle(`background:transparent;color:${t.value.color}`)},[B.value===S.DONUT?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(E.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:u=>{Me(l,E.value.dataset),f("selectLegend",l)},style:e.normalizeStyle(`cursor: ${E.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(se.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(i.applyDataLabel)(t.value.formatter,l.absoluteValue,e.unref(i.dataLabel)({p:t.value.valuePrefix,v:l.absoluteValue,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),5),x.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)}," ( - % ) ",4)):re.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(i.dataLabel)({v:l.value/E.value.total*100,s:"%",r:t.value.dataLabelRoundingPercentage}))+") ",5))],64))],12,wl))),256)):e.createCommentVNode("",!0),B.value===S.LINE?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(v.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:u=>{Be(l.id,v.value.legend.length-1),f("selectLegend",l)},style:e.normalizeStyle(`cursor: ${v.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(se.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,El))),256)):e.createCommentVNode("",!0),B.value===S.BAR?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(d.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:u=>{Be(l.id,d.value.legend.length-1),f("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(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(se.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,Al))),256)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),n.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:me,dir:"auto"},[e.renderSlot(n.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ge._sfc_main,{show:oe.value.showTooltip&&P.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:V.value,content:T.value,isFullscreen:ie.value,isCustom:e.unref(i.isFunction)(t.value.tooltipCustomFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(n.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...G.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(n.$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","isFullscreen","isCustom"])],46,nt)):(e.openBlock(),e.createElementBlock("div",Ll,[e.createVNode(se.default,{name:"circleCancel",stroke:"red"}),_l]))}},zl=Qe._export_sfc(Cl,[["__scopeId","data-v-dbfac93e"]]);exports.default=zl;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { computed as p, ref as u, watch as He, onMounted as Ye, onBeforeUnmount as je, openBlock as r, createElementBlock as n, normalizeClass as z, normalizeStyle as W, unref as c, createBlock as _, createCommentVNode as h, createSlots as qe, withCtx as y, renderSlot as m, normalizeProps as M, guardReactiveProps as R, createVNode as ee, createElementVNode as $, Fragment as P, renderList as T, toDisplayString as U, createTextVNode as Te, nextTick as Je } from "vue";
|
|
2
|
-
import { u as Ke, c as Qe, t as Ze, a as et, p as x, o as tt, e as F, b as at, g as xe, d as Oe, O as Ae, v as ot, i as Ne, f as V, X as lt, s as te, w as rt, P as Se, x as st, y as nt, q as ut, r as it } from "./index-
|
|
2
|
+
import { u as Ke, c as Qe, t as Ze, a as et, p as x, o as tt, e as F, b as at, g as xe, d as Oe, O as Ae, v as ot, i as Ne, f as V, X as lt, s as te, w as rt, P as Se, x as st, y as nt, q as ut, r as it } from "./index-ByVaKddw.js";
|
|
3
3
|
import { t as ct, u as dt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as vt } from "./Title-
|
|
5
|
-
import { u as pt, U as ht } from "./usePrinter-
|
|
6
|
-
import { _ as gt } from "./Tooltip-
|
|
7
|
-
import ft from "./vue-ui-sparkbar-
|
|
8
|
-
import { L as yt } from "./Legend-
|
|
9
|
-
import { D as mt } from "./DataTable-
|
|
10
|
-
import bt from "./vue-ui-skeleton
|
|
11
|
-
import kt from "./vue-ui-accordion-
|
|
12
|
-
import { u as Fe } from "./useNestedProp-
|
|
13
|
-
import { _ as Ct } from "./PackageVersion-
|
|
14
|
-
import { P as wt } from "./PenAndPaper-
|
|
4
|
+
import { _ as vt } from "./Title-BI9lg56g.js";
|
|
5
|
+
import { u as pt, U as ht } from "./usePrinter-BsXVX7vh.js";
|
|
6
|
+
import { _ as gt } from "./Tooltip-sBMzQa_B.js";
|
|
7
|
+
import ft from "./vue-ui-sparkbar-C2Y0Foie.js";
|
|
8
|
+
import { L as yt } from "./Legend-CvXmxVoD.js";
|
|
9
|
+
import { D as mt } from "./DataTable-CZSz7b1u.js";
|
|
10
|
+
import bt from "./vue-ui-skeleton--uwo2sCb.js";
|
|
11
|
+
import kt from "./vue-ui-accordion-Dcf8tHzr.js";
|
|
12
|
+
import { u as Fe } from "./useNestedProp-GRBJXe5O.js";
|
|
13
|
+
import { _ as Ct } from "./PackageVersion-CEkiDR72.js";
|
|
14
|
+
import { P as wt } from "./PenAndPaper-GjypzQvI.js";
|
|
15
15
|
import { u as _t } from "./useUserOptionState-BIvW1Kz7.js";
|
|
16
16
|
import { _ as $t } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
17
17
|
const Pt = ["id"], Tt = ["xmlns", "viewBox"], xt = ["id"], Ot = ["stop-color"], At = ["stop-color"], Nt = { key: 0 }, St = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Ft = { key: 0 }, It = ["d", "stroke", "stroke-width"], Lt = ["d", "stroke", "stroke-width"], zt = { key: 1 }, Mt = ["x", "y", "text-anchor", "font-size", "fill", "onMouseenter"], Rt = ["points", "stroke", "stroke-width"], Ut = ["points", "stroke", "stroke-width", "fill"], Vt = { key: 2 }, Et = ["cx", "cy", "fill", "r", "stroke"], Bt = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-BdlNqn9B.cjs"),ne=require("./useResponsive-BJ7DTGpm.cjs"),we=require("./Title-Z93_y2gr.cjs"),se=require("./usePrinter-DtSijS1B.cjs"),Be=require("./Tooltip-DVfgJ6mM.cjs"),Pe=require("./vue-ui-sparkbar-CR3IzauM.cjs"),_e=require("./Legend-TTzHdVeD.cjs"),$e=require("./DataTable-CwiudM8v.cjs"),xe=require("./vue-ui-skeleton-Czl8iTZQ.cjs"),Ne=require("./vue-ui-accordion-Dm8myRhk.cjs"),ue=require("./useNestedProp-DDvMHRIf.cjs"),Te=require("./PackageVersion-B_ULr99C.cjs"),Se=require("./PenAndPaper-DFNDy1y9.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Oe=["id"],Ae=["xmlns","viewBox"],Fe=["id"],Le=["stop-color"],ze=["stop-color"],Ie={key:0},Re=["x1","y1","x2","y2","stroke","stroke-width"],qe={key:0},Me=["d","stroke","stroke-width"],Ue=["d","stroke","stroke-width"],De={key:1},Ge=["x","y","text-anchor","font-size","fill","onMouseenter"],We=["points","stroke","stroke-width"],He=["points","stroke","stroke-width","fill"],Xe={key:2},je=["cx","cy","fill","r","stroke"],Ye={key:5,class:"vue-data-ui-watermark"},Je=["onClick"],Ke={key:0,style:{"max-width":"200px",margin:"0 auto"}},Qe={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ie,{expose:ce,emit:de}){const d=ie,{vue_ui_radar:ve}=n.useConfig(),C=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),f=e.ref(n.createUid()),pe=e.ref(null),x=e.ref(!1),N=e.ref(""),L=e.ref(0),m=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(null),M=e.ref(0),U=e.ref(0),D=e.ref(0),t=e.computed({get:()=>H(),set:o=>o}),{userOptionsVisible:T,setUserOptionsVisibility:G,keepUserOptionState:W}=Ee.useUserOptionState({config:t.value});function H(){const o=ue.useNestedProp({userConfig:d.config,defaultConfig:ve});return o.theme?{...ue.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=H(),T.value=!t.value.showOnChartHover,X(),M.value+=1,U.value+=1,D.value+=1},{deep:!0});const B=e.ref(null);function X(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=ne.throttle(()=>{const{width:a,height:l}=ne.useResponsive({chart:m.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:R.value,noTitle:q.value});u.value.width=a,u.value.height=l});B.value=new ResizeObserver(o),B.value.observe(m.value.parentNode)}}e.onMounted(()=>{X()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:j,isImaging:Y,generatePdf:J,generateImage:K}=se.usePrinter({elementId:`vue-ui-radar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),ge=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Q=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),he=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}}})),u=e.ref({height:312,width:512}),i=e.ref([]),w=e.ref(null),y=e.ref(!1);function Z(o){y.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),de("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function fe(){return k.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_${f.value}_${a}`,color:n.convertColorToHex(o.color)||Q.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>C.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Q.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${f.value}_${a}`,formatter:o.formatter||null})):[]),ee=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),te=e.computed(()=>p.value.length),S=e.computed(()=>Math.min(u.value.width,u.value.height)/3),oe=e.computed(()=>n.createPolygonPath({plot:{x:u.value.width/2,y:u.value.height/2},radius:S.value,sides:te.value,rotation:0})),me=e.computed(()=>{const o=[];for(let a=0;a<S.value;a+=S.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),h=e.computed(()=>oe.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>ye({centerX:u.value.width/2,centerY:u.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||ee.value)}));return{...o,...p.value[a],plots:l}}));function E({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>u.value.width/2&&(o+=12,l="start"),o<u.value.width/2&&(o-=12,l="end"),a>u.value.height/2&&(a+=20),a<u.value.height/2&&(a-=12),a===u.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function ye({centerX:o,centerY:a,apexX:l,apexY:r,proportion:s}){return{x:o+(l-o)*s,y:a+(r-a)*s}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||ee.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,s)=>r+s,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>Z(l),isSegregated:i.value.includes(l)}))}),ke=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":""})),P=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.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((s,c)=>`${n.applyDataLabel(r.formatter,s,n.dataLabel({p:v.value[c].prefix,v:s,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(s/r.target)?"":n.dataLabel({v:s/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}}),_=e.ref(null),V=e.ref([]),O=e.ref(null);function be(o,a){V.value=[],_.value=a,x.value=!0;let l="";O.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:h.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:h.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.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 s=0;s<o.values.length;s+=1)i.value.includes(s)||V.value.push({name:v.value[s].name,value:o.values[s]/o.target*100,color:v.value[s].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[s].prefix??"",v:o.values[s],s:v.value[s].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function ae(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,et)=>[c.name,c.target,...c.values.flatMap(F=>[F,isNaN(F/c.target)?"":F/c.target*100])]),r=o.concat([a]).concat(l),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const b=e.ref(!1);function Ce(o){b.value=o,L.value+=1}function le(){g.value.showTable=!g.value.showTable}function re(){g.value.showTooltip=!g.value.showTooltip}const $=e.ref(!1);function A(){$.value=!$.value}return ce({getData:fe,generatePdf:J,generateCsv:ae,generateImage:K,toggleTable:le,toggleTooltip:re,toggleAnnotator:A}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:m,id:`vue-ui-radar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[3]||(a[3]=()=>e.unref(G)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Se.PenAndPaper,{key:0,parent:m.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:A},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${M.value}`,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"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value&&(e.unref(W)||e.unref(T))?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:pe,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Y),isPrinting:e.unref(j),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(J),onGenerateCsv:ae,onGenerateImage:e.unref(K),onToggleTable:le,onToggleTooltip:re,onToggleAnnotator:A,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(T)?"visible":"hidden":"visible"})},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,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Te._sfc_main),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_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ze)],8,Fe))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.width/2,y1:u.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,Re))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:u.value.width/2,y:u.value.height/2},radius:l,sides:te.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,Me))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:oe.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,Ue),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:E(l).x,y:E(l).y,"text-anchor":E(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:s=>be(l,r),onMouseleave:a[0]||(a[0]=s=>{x.value=!1,_.value=null})},e.toDisplayString(l.name),41,Ge))),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)(h.value.map(s=>s.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":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,We)):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)(h.value.map(s=>s.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_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,He)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(s,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:_.value!==null&&_.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":y.value&&w.value===c&&t.value.useCssAnimation})},null,10,je))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:6,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:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:`legend_${D.value}`,legendSet:k.value,config:ke.value,onClickMarker:a[1]||(a[1]=({i:l})=>Z(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:s=>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,Je)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:R,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:g.value.showTooltip&&x.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:m.value,content:N.value,isFullscreen:b.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({...O.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",Ke,[e.createVNode(Pe.default,{dataset:V.value,config:he.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),C.value?(e.openBlock(),e.createBlock(Ne.default,{key:8,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock($e.DataTable,{key:`table_${U.value}`,colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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=>g.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)],46,Oe))}},Ze=Ve._export_sfc(Qe,[["__scopeId","data-v-921087d8"]]);exports.default=Ze;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-Cvx5SntE.cjs"),ne=require("./useResponsive-BJ7DTGpm.cjs"),we=require("./Title-Bw-FXFej.cjs"),se=require("./usePrinter-BwruEydS.cjs"),Be=require("./Tooltip-98ospYeV.cjs"),Pe=require("./vue-ui-sparkbar-FBEE4RyI.cjs"),_e=require("./Legend-DecSHp0h.cjs"),$e=require("./DataTable-osuWgmyP.cjs"),xe=require("./vue-ui-skeleton-CcWKK9pd.cjs"),Ne=require("./vue-ui-accordion-DfqTc4ro.cjs"),ue=require("./useNestedProp-CSIVZXvp.cjs"),Te=require("./PackageVersion-eTcMI7M3.cjs"),Se=require("./PenAndPaper-BqcQLMi2.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Oe=["id"],Ae=["xmlns","viewBox"],Fe=["id"],Le=["stop-color"],ze=["stop-color"],Ie={key:0},Re=["x1","y1","x2","y2","stroke","stroke-width"],qe={key:0},Me=["d","stroke","stroke-width"],Ue=["d","stroke","stroke-width"],De={key:1},Ge=["x","y","text-anchor","font-size","fill","onMouseenter"],We=["points","stroke","stroke-width"],He=["points","stroke","stroke-width","fill"],Xe={key:2},je=["cx","cy","fill","r","stroke"],Ye={key:5,class:"vue-data-ui-watermark"},Je=["onClick"],Ke={key:0,style:{"max-width":"200px",margin:"0 auto"}},Qe={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(ie,{expose:ce,emit:de}){const d=ie,{vue_ui_radar:ve}=n.useConfig(),C=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),f=e.ref(n.createUid()),pe=e.ref(null),x=e.ref(!1),N=e.ref(""),L=e.ref(0),m=e.ref(null),z=e.ref(null),I=e.ref(null),R=e.ref(null),q=e.ref(null),M=e.ref(0),U=e.ref(0),D=e.ref(0),t=e.computed({get:()=>H(),set:o=>o}),{userOptionsVisible:T,setUserOptionsVisibility:G,keepUserOptionState:W}=Ee.useUserOptionState({config:t.value});function H(){const o=ue.useNestedProp({userConfig:d.config,defaultConfig:ve});return o.theme?{...ue.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}e.watch(()=>d.config,o=>{t.value=H(),T.value=!t.value.showOnChartHover,X(),M.value+=1,U.value+=1,D.value+=1},{deep:!0});const B=e.ref(null);function X(){if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=ne.throttle(()=>{const{width:a,height:l}=ne.useResponsive({chart:m.value,title:t.value.style.chart.title.text?z.value:null,legend:t.value.style.chart.legend.show?I.value:null,source:R.value,noTitle:q.value});u.value.width=a,u.value.height=l});B.value=new ResizeObserver(o),B.value.observe(m.value.parentNode)}}e.onMounted(()=>{X()}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:j,isImaging:Y,generatePdf:J,generateImage:K}=se.usePrinter({elementId:`vue-ui-radar_${f.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),ge=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Q=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),g=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),he=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}}})),u=e.ref({height:312,width:512}),i=e.ref([]),w=e.ref(null),y=e.ref(!1);function Z(o){y.value=!0,i.value.includes(o)?(w.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{y.value=!1,w.value=null},500)):(i.value.push(o),setTimeout(()=>{y.value=!1},500)),de("selectLegend",k.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function fe(){return k.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_${f.value}_${a}`,color:n.convertColorToHex(o.color)||Q.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>C.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||Q.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${f.value}_${a}`,formatter:o.formatter||null})):[]),ee=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),te=e.computed(()=>p.value.length),S=e.computed(()=>Math.min(u.value.width,u.value.height)/3),oe=e.computed(()=>n.createPolygonPath({plot:{x:u.value.width/2,y:u.value.height/2},radius:S.value,sides:te.value,rotation:0})),me=e.computed(()=>{const o=[];for(let a=0;a<S.value;a+=S.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),h=e.computed(()=>oe.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>ye({centerX:u.value.width/2,centerY:u.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||ee.value)}));return{...o,...p.value[a],plots:l}}));function E({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>u.value.width/2&&(o+=12,l="start"),o<u.value.width/2&&(o-=12,l="end"),a>u.value.height/2&&(a+=20),a<u.value.height/2&&(a-=12),a===u.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function ye({centerX:o,centerY:a,apexX:l,apexY:r,proportion:s}){return{x:o+(l-o)*s,y:a+(r-a)*s}}const k=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||ee.value)));return v.value.map((a,l)=>({...a,totalProportion:n.checkNaN(o.map(r=>r[l]).reduce((r,s)=>r+s,0)/p.value.length),shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>Z(l),isSegregated:i.value.includes(l)}))}),ke=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":""})),P=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...k.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((s,c)=>`${n.applyDataLabel(r.formatter,s,n.dataLabel({p:v.value[c].prefix,v:s,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(s/r.target)?"":n.dataLabel({v:s/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}}),_=e.ref(null),V=e.ref([]),O=e.ref(null);function be(o,a){V.value=[],_.value=a,x.value=!0;let l="";O.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:h.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:h.value},config:t.value})))N.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:h.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 s=0;s<o.values.length;s+=1)i.value.includes(s)||V.value.push({name:v.value[s].name,value:o.values[s]/o.target*100,color:v.value[s].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[s].prefix??"",v:o.values[s],s:v.value[s].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});N.value=l}}function ae(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...k.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,et)=>[c.name,c.target,...c.values.flatMap(F=>[F,isNaN(F/c.target)?"":F/c.target*100])]),r=o.concat([a]).concat(l),s=n.createCsvContent(r);n.downloadCsv({csvContent:s,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const b=e.ref(!1);function Ce(o){b.value=o,L.value+=1}function le(){g.value.showTable=!g.value.showTable}function re(){g.value.showTooltip=!g.value.showTooltip}const $=e.ref(!1);function A(){$.value=!$.value}return ce({getData:fe,generatePdf:J,generateCsv:ae,generateImage:K,toggleTable:le,toggleTooltip:re,toggleAnnotator:A}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${b.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:m,id:`vue-ui-radar_${f.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:a[3]||(a[3]=()=>e.unref(G)(!0)),onMouseleave:a[4]||(a[4]=()=>e.unref(G)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Se.PenAndPaper,{key:0,parent:m.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:A},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:z,style:"width:100%;background:transparent;padding-bottom:12px"},[(e.openBlock(),e.createBlock(we._sfc_main,{key:`title_${M.value}`,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"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value&&(e.unref(W)||e.unref(T))?(e.openBlock(),e.createBlock(se.UserOptions,{ref_key:"details",ref:pe,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(Y),isPrinting:e.unref(j),uid:f.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:b.value,isTooltip:g.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:m.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(J),onGenerateCsv:ae,onGenerateImage:e.unref(K),onToggleTable:le,onToggleTooltip:re,onToggleAnnotator:A,style:e.normalizeStyle({visibility:e.unref(W)?e.unref(T)?"visible":"hidden":"visible"})},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,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:r})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:r})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":b.value,"vue-data-ui-fulscreen--off":!b.value}),viewBox:`0 0 ${u.value.width<=0?10:u.value.width} ${u.value.height<=0?10:u.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Te._sfc_main),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_${f.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(n.setOpacity)(e.unref(n.shiftHue)(l.color,.05),t.value.style.chart.layout.dataPolygon.opacity)},null,8,Le),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity)},null,8,ze)],8,Fe))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:u.value.width/2,y1:u.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,Re))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:u.value.width/2,y:u.value.height/2},radius:l,sides:te.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,Me))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:oe.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,Ue),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",De,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:E(l).x,y:E(l).y,"text-anchor":E(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:s=>be(l,r),onMouseleave:a[0]||(a[0]=s=>{x.value=!1,_.value=null})},e.toDisplayString(l.name),41,Ge))),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)(h.value.map(s=>s.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":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,We)):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)(h.value.map(s=>s.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_${f.value}_${r})`:e.unref(n.setOpacity)(l.color,t.value.style.chart.layout.dataPolygon.opacity),class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":y.value&&w.value===r&&t.value.useCssAnimation})},null,10,He)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(s,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.x,cy:s.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:_.value!==null&&_.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":y.value&&w.value===c&&t.value.useCssAnimation})},null,10,je))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:u.value},void 0,!0)],14,Ae)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ye,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(j)||e.unref(Y)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(xe.default,{key:6,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:I},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(_e.Legend,{key:`legend_${D.value}`,legendSet:k.value,config:ke.value,onClickMarker:a[1]||(a[1]=({i:l})=>Z(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:s=>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,Je)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:R,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Be._sfc_main,{show:g.value.showTooltip&&x.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:m.value,content:N.value,isFullscreen:b.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({...O.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",Ke,[e.createVNode(Pe.default,{dataset:V.value,config:he.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...O.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isFullscreen","isCustom"]),C.value?(e.openBlock(),e.createBlock(Ne.default,{key:8,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock($e.DataTable,{key:`table_${U.value}`,colNames:P.value.colNames,head:P.value.head,body:P.value.body,config:P.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=>g.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)],46,Oe))}},Ze=Ve._export_sfc(Qe,[["__scopeId","data-v-921087d8"]]);exports.default=Ze;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as h, computed as x, watch as U, onMounted as K, openBlock as a, createElementBlock as i, normalizeStyle as o, createElementVNode as r, toDisplayString as g, createCommentVNode as d, unref as s, Fragment as T, renderList as H, withKeys as P } from "vue";
|
|
2
|
-
import { u as W, c as q, o as J, e as Q, i as $, f as _, X as k, w as R, V as F } from "./index-
|
|
3
|
-
import { u as Z } from "./useNestedProp-
|
|
2
|
+
import { u as W, c as q, o as J, e as Q, i as $, f as _, X as k, w as R, V as F } from "./index-ByVaKddw.js";
|
|
3
|
+
import { u as Z } from "./useNestedProp-GRBJXe5O.js";
|
|
4
4
|
import { _ as tt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const et = {
|
|
6
6
|
key: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-BdlNqn9B.cjs"),L=require("./useNestedProp-DDvMHRIf.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},A=["src","height","width"],R=["xmlns","height","width"],X=["id"],j=["stop-color"],F=["stop-color"],I=["points","fill","stroke","stroke-width"],O=["src","alt","height","width","id"],Y=["xmlns","viewBox","height","id"],G=["id"],q=["stop-color"],U=["stop-color"],H=["points","fill","stroke"],K=["xmlns","height"],P=["onClick","onMouseenter","onKeyup"],T=["onMouseenter"],W={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:_,emit:S}){const i=k,{vue_ui_rating:z}=a.useConfig(),d=e.ref(a.createUid()),f=e.ref(!1),s=e.ref(void 0),y=e.ref([]),t=e.computed({get:()=>g(),set:o=>o});function g(){return L.useNestedProp({userConfig:i.config,defaultConfig:z})}e.watch(()=>i.config,o=>{t.value=g(),h()},{deep:!0});const w=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?N(i.dataset.rating):i.dataset.rating),B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(w.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function N(o){let n=0,l=0;for(const u in o){const V=parseInt(u),b=o[u];n+=V*b,l+=b}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){a.objectIsEmpty(i.dataset)&&a.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)y.value.push(o)}function p(o,n=!1){return o>s.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function x(o,n=!1){const l=r.value-o,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function $(o){c.value||(r.value=o,S("rate",o))}function C(){return r.value}function E(o=!0){c.value=o}return _({getData:C,toggleReadonly:E}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[2]||(n[2]=l=>f.value=!0),onMouseleave:n[3]||(n[3]=l=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,A)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,F)],8,X)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,I)],8,R)),m.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,O)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,H)],8,Y)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>$(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>$(l),["enter"])},null,40,P)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,T)):e.createCommentVNode("",!0)],12,K)),t.value.style.tooltip.show&&B.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},J=D._export_sfc(W,[["__scopeId","data-v-d90e158f"]]);exports.default=J;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),a=require("./index-Cvx5SntE.cjs"),L=require("./useNestedProp-CSIVZXvp.cjs"),D=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),M={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},A=["src","height","width"],R=["xmlns","height","width"],X=["id"],j=["stop-color"],F=["stop-color"],I=["points","fill","stroke","stroke-width"],O=["src","alt","height","width","id"],Y=["xmlns","viewBox","height","id"],G=["id"],q=["stop-color"],U=["stop-color"],H=["points","fill","stroke"],K=["xmlns","height"],P=["onClick","onMouseenter","onKeyup"],T=["onMouseenter"],W={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(k,{expose:_,emit:S}){const i=k,{vue_ui_rating:z}=a.useConfig(),d=e.ref(a.createUid()),f=e.ref(!1),s=e.ref(void 0),y=e.ref([]),t=e.computed({get:()=>g(),set:o=>o});function g(){return L.useNestedProp({userConfig:i.config,defaultConfig:z})}e.watch(()=>i.config,o=>{t.value=g(),h()},{deep:!0});const w=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)?N(i.dataset.rating):i.dataset.rating),B=e.computed(()=>typeof i.dataset.rating=="object"&&!Array.isArray(i.dataset.rating)),r=e.ref(w.value),m=e.computed(()=>t.value.type==="image"),c=e.computed(()=>t.value.readonly);function N(o){let n=0,l=0;for(const u in o){const V=parseInt(u),b=o[u];n+=V*b,l+=b}if(l===0)return 0;const v=n/l;return Math.min(t.value.to,Math.max(t.value.from,v))}e.onMounted(()=>{h()});function h(){a.objectIsEmpty(i.dataset)&&a.error({componentName:"VueUiRating",type:"dataset"}),y.value=[];for(let o=t.value.from;o<=t.value.to;o+=1)y.value.push(o)}function p(o,n=!1){return o>s.value||c.value?n?t.value.style.image.inactiveOpacity:t.value.style.star.inactiveColor:n?1:t.value.style.star.useGradient?`url(#star_gradient_under_${d.value})`:t.value.style.star.activeColor}function x(o,n=!1){const l=r.value-o,v=n?1:100;switch(!0){case l<=0:return .001;case l>1:return 1*v;default:return l*v}}function $(o){c.value||(r.value=o,S("rate",o))}function C(){return r.value}function E(o=!0){c.value=o}return _({getData:C,toggleReadonly:E}),(o,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${t.value.style.backgroundColor};font-family:${t.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:n[2]||(n[2]=l=>f.value=!0),onMouseleave:n[3]||(n[3]=l=>{f.value=!1,s.value=void 0})},[t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${t.value.style.title.color};font-weight:${t.value.style.title.bold?"bold":"normal"};text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.offsetY}px;font-size:${t.value.style.title.fontSize}px`)},e.toDisplayString(t.value.style.title.text),5),t.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${t.value.style.title.subtitle.color};font-size:${t.value.style.title.subtitle.fontSize}px;text-align:${t.value.style.title.textAlign};margin-bottom:${t.value.style.title.subtitle.offsetY}px;font-weight:${t.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(t.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.value.style.rating.show&&t.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${t.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[t.value.style.rating.show&&t.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-right:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,v)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${t.value.style.itemSize}px;width:${t.value.style.itemSize}px`)},[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.value.style.image.src,height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(s.value)?t.value.style.image.inactiveOpacity:p(l,!0)}`)},null,12,A)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,width:t.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,j),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,F)],8,X)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:isNaN(s.value)?t.value.style.star.inactiveColor:p(l),stroke:t.value.style.star.borderColor?t.value.style.star.borderColor:s.value?p(l):t.value.style.star.inactiveColor,"stroke-width":t.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,I)],8,R)),m.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.value.style.image.src,alt:`${t.value.style.image.alt} ${l}`,height:t.value.style.itemSize,width:t.value.style.itemSize,id:`active_${d.value}_${l}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${x(v,!0)*t.value.style.itemSize}px,${t.value.style.itemSize}px,0px`)},null,12,O)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(a.XMLNS),viewBox:`0 0 ${x(v)} 100`,height:t.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${d.value}_${l}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${d.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(a.shiftHue)(t.value.style.star.activeColor,.05)}`},null,8,q),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.star.activeColor},null,8,U)],8,G)]),e.createElementVNode("polygon",{points:e.unref(a.createStar)({plot:{x:50,y:50},radius:30,apexes:t.value.style.star.apexes}),fill:t.value.style.star.useGradient?`url(#star_gradient_over_${d.value})`:t.value.style.star.activeColor,stroke:t.value.style.star.activeColor},null,8,H)],8,Y)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(a.XMLNS),viewBox:"0 0 100 100",height:t.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${c.value?"":"cursor:pointer"}`)},[c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:u=>$(l),onMouseenter:u=>s.value=l,onMouseleave:n[0]||(n[0]=u=>s.value=void 0),tabindex:"0",onKeyup:e.withKeys(u=>$(l),["enter"])},null,40,P)),c.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:u=>s.value=l,onMouseleave:n[1]||(n[1]=u=>s.value=void 0)},null,40,T)):e.createCommentVNode("",!0)],12,K)),t.value.style.tooltip.show&&B.value&&c.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${t.value.style.tooltip.borderColor};position:absolute;top:${-48+t.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${t.value.style.tooltip.backgroundColor};display:${s.value===l?"block":"none"};padding:2px 12px;border-radius:${t.value.style.tooltip.borderRadius}px;box-shadow:${t.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${t.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(l)+":",5),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${t.value.style.tooltip.bold?"bold":"normal"};font-size:${t.value.style.tooltip.fontSize}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.tooltip.formatter,i.dataset.rating[l],e.unref(a.dataLabel)({v:i.dataset.rating[l],r:t.value.style.tooltip.roundingValue}),t.value)),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${t.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),t.value.style.rating.show&&t.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};padding-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],4),t.value.style.rating.show&&t.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${t.value.style.rating.offsetY}px;font-size:${t.value.style.rating.fontSize}px;font-weight:${t.value.style.rating.bold?"bold":"normal"};margin-left:${t.value.style.rating.offsetX}px`)},e.toDisplayString(e.unref(a.applyDataLabel)(t.value.style.rating.formatter,r.value,e.unref(a.dataLabel)({v:r.value,r:t.value.style.rating.roundingValue}),t.value)),5)):e.createCommentVNode("",!0)],36))}},J=D._export_sfc(W,[["__scopeId","data-v-d90e158f"]]);exports.default=J;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCssVars as Ge, computed as f, ref as u, watch as Ve, onMounted as We, onBeforeUnmount as De, openBlock as i, createElementBlock as a, normalizeStyle as C, unref as r, createBlock as F, createCommentVNode as v, createSlots as Xe, withCtx as B, renderSlot as p, normalizeProps as A, guardReactiveProps as W, normalizeClass as D, createVNode as Ye, createElementVNode as qe, Fragment as P, renderList as L, mergeProps as ge, toDisplayString as T } from "vue";
|
|
2
|
-
import { u as He, c as Je, t as Ke, a as Qe, p as me, b as Ze, o as et, e as pe, g as tt, X as lt, G as ke, i as X, f as Y, F as q } from "./index-
|
|
2
|
+
import { u as He, c as Je, t as Ke, a as Qe, p as me, b as Ze, o as et, e as pe, g as tt, X as lt, G as ke, i as X, f as Y, F as q } from "./index-ByVaKddw.js";
|
|
3
3
|
import { t as st, u as it } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as at } from "./Title-
|
|
5
|
-
import { u as nt, U as rt } from "./usePrinter-
|
|
6
|
-
import ut from "./vue-ui-skeleton
|
|
7
|
-
import { u as xe } from "./useNestedProp-
|
|
8
|
-
import { _ as ot } from "./PackageVersion-
|
|
9
|
-
import { P as ct } from "./PenAndPaper-
|
|
4
|
+
import { _ as at } from "./Title-BI9lg56g.js";
|
|
5
|
+
import { u as nt, U as rt } from "./usePrinter-BsXVX7vh.js";
|
|
6
|
+
import ut from "./vue-ui-skeleton--uwo2sCb.js";
|
|
7
|
+
import { u as xe } from "./useNestedProp-GRBJXe5O.js";
|
|
8
|
+
import { _ as ot } from "./PackageVersion-CEkiDR72.js";
|
|
9
|
+
import { P as ct } from "./PenAndPaper-GjypzQvI.js";
|
|
10
10
|
import { u as dt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const yt = ["id"], ft = ["xmlns", "viewBox"], ht = ["cx", "cy", "r", "stroke", "stroke-width"], gt = { key: 0 }, mt = ["stroke", "d", "stroke-width"], pt = { style: { "pointer-events": "none" } }, kt = ["cx", "cy", "fill", "r", "stroke"], xt = ["x", "y", "fill", "font-size"], wt = { key: 1 }, bt = ["stroke", "stroke-width", "x1", "x2", "y1", "y2"], $t = { style: { "pointer-events": "none" } }, _t = ["cx", "cy", "fill", "r", "stroke"], Ct = ["x", "y", "fill", "font-size"], Pt = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], Lt = ["cx", "cy", "fill", "stroke", "onClick", "r"], Ot = {
|