vue-data-ui 2.4.40 → 2.4.42
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-DkayNE_-.js → Arrow-DE71uBJZ.js} +1 -1
- package/dist/{Arrow-Bg4pmMHf.cjs → Arrow-DTscDttD.cjs} +1 -1
- package/dist/{BaseIcon-DpYqpYmv.js → BaseIcon-C8XxmpRq.js} +1 -1
- package/dist/{BaseIcon-zXh1vLYa.cjs → BaseIcon-COOfxsl_.cjs} +1 -1
- package/dist/{DataTable-BB87HJ5b.cjs → DataTable-DEdQvqB1.cjs} +1 -1
- package/dist/{DataTable-BuiPd6c1.js → DataTable-D_w08xos.js} +2 -2
- package/dist/{Legend-BRVDmlwW.js → Legend-BWDoQii_.js} +1 -1
- package/dist/{Legend-D2Yi-COI.cjs → Legend-C4rlR-Ge.cjs} +1 -1
- package/dist/{PackageVersion-BT4zkGPO.js → PackageVersion-CH6MCx6T.js} +1 -1
- package/dist/{PackageVersion-rf9gXZ-Q.cjs → PackageVersion-DKyD7D76.cjs} +1 -1
- package/dist/{PenAndPaper-BFq1cFfJ.js → PenAndPaper-BWTR3U2d.js} +3 -3
- package/dist/{PenAndPaper-DS7gA4X0.cjs → PenAndPaper-Dc2zn4C0.cjs} +1 -1
- package/dist/{Shape-DVggzfpA.cjs → Shape-BLS-KzBD.cjs} +1 -1
- package/dist/{Shape-Dwxh0EWa.js → Shape-xrlfL_v4.js} +1 -1
- package/dist/Slicer-8gKX0l4Q.cjs +1 -0
- package/dist/Slicer-DIYseEL1.js +423 -0
- package/dist/{Title-RB80eFiD.cjs → Title-B-xkTfi8.cjs} +1 -1
- package/dist/{Title-BFvWnqI4.js → Title-Cnl9ySNH.js} +1 -1
- package/dist/Tooltip-Brbj6DqX.cjs +1 -0
- package/dist/{Tooltip-RHI1EGzy.js → Tooltip-DEAOBZ8h.js} +33 -25
- package/dist/index-B68kzBN9.cjs +9 -0
- package/dist/{index-DY8hDTi7.js → index-DnukYspq.js} +56 -43
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +13 -0
- package/dist/types/vue-data-ui.d.ts +13 -0
- package/dist/{useNestedProp-lhL30X68.js → useNestedProp-CVOQGx-X.js} +1 -1
- package/dist/{useNestedProp-DLJc0s53.cjs → useNestedProp-es9bVqY_.cjs} +1 -1
- package/dist/{usePrinter-BfuqGrO4.cjs → usePrinter-C9yUesCc.cjs} +1 -1
- package/dist/{usePrinter-DjAQofRy.js → usePrinter-DVIALk5e.js} +1 -1
- package/dist/{vue-data-ui-BjixO_L4.js → vue-data-ui-BmmjmNbb.js} +60 -60
- package/dist/{vue-data-ui-DYb5l8_5.cjs → vue-data-ui-LA94HAVo.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +3 -3
- package/dist/{vue-ui-3d-bar-CkYhOmXF.js → vue-ui-3d-bar-CnVJAgFO.js} +9 -9
- package/dist/{vue-ui-3d-bar-BEjtuA39.cjs → vue-ui-3d-bar-DYswbvC_.cjs} +1 -1
- package/dist/{vue-ui-accordion-ClQObElI.cjs → vue-ui-accordion-D_K9gNUR.cjs} +1 -1
- package/dist/{vue-ui-accordion-xK9e3wkz.js → vue-ui-accordion-f9NTID9e.js} +3 -3
- package/dist/{vue-ui-age-pyramid-x5CjkABf.cjs → vue-ui-age-pyramid-Bj9K08ws.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DtQAo1-2.js → vue-ui-age-pyramid-CL0RB7mU.js} +42 -41
- package/dist/{vue-ui-annotator-Yt34insl.js → vue-ui-annotator-C82vEb7R.js} +1 -1
- package/dist/{vue-ui-annotator-DqDELeOR.cjs → vue-ui-annotator-DhwUZ4WB.cjs} +1 -1
- package/dist/{vue-ui-bullet-CCvwPwji.js → vue-ui-bullet-BxYYiFnu.js} +15 -15
- package/dist/{vue-ui-bullet-DSPQ5yWt.cjs → vue-ui-bullet-D6KC5yoe.cjs} +1 -1
- package/dist/vue-ui-candlestick-Duf3yfwR.js +740 -0
- package/dist/vue-ui-candlestick-lunuQ9Ka.cjs +2 -0
- package/dist/{vue-ui-carousel-table-CkJngi1u.cjs → vue-ui-carousel-table-4z9ZACSk.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-IqZRrbo_.js → vue-ui-carousel-table-DQymYeK0.js} +4 -4
- package/dist/{vue-ui-chestnut-Dt3GLx3U.js → vue-ui-chestnut-DDNLUSav.js} +8 -8
- package/dist/{vue-ui-chestnut-ojvaZyue.cjs → vue-ui-chestnut-iRODkXaw.cjs} +1 -1
- package/dist/{vue-ui-cursor-D24bAdi0.js → vue-ui-cursor-Bdud_Fxg.js} +2 -2
- package/dist/{vue-ui-cursor-Cbi7OUiE.cjs → vue-ui-cursor-Bt_SieMc.cjs} +1 -1
- package/dist/{vue-ui-dashboard-DVf1sULB.cjs → vue-ui-dashboard-BzRR9Ra7.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CB_W7yvi.js → vue-ui-dashboard-CeVkJPeG.js} +2 -2
- package/dist/{vue-ui-digits-CVAyG4kM.cjs → vue-ui-digits-DF3oLaaR.cjs} +1 -1
- package/dist/{vue-ui-digits-Qn4l0R5o.js → vue-ui-digits-DtNvb8lM.js} +2 -2
- package/dist/{vue-ui-donut-t688YqqL.js → vue-ui-donut-C028OlzU.js} +99 -98
- package/dist/vue-ui-donut-evolution-2vQPsBFq.cjs +1 -0
- package/dist/vue-ui-donut-evolution-CprYApXF.js +908 -0
- package/dist/{vue-ui-donut-Cgvksx9U.cjs → vue-ui-donut-o09QqVJO.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-CS5kvI8A.js → vue-ui-dumbbell-BV2LN5qt.js} +10 -10
- package/dist/{vue-ui-dumbbell-DxMZm_Xi.cjs → vue-ui-dumbbell-CS8pY-mj.cjs} +1 -1
- package/dist/{vue-ui-flow-4sSoYnJt.js → vue-ui-flow-QRimZUXT.js} +46 -46
- package/dist/{vue-ui-flow-In-tHpYL.cjs → vue-ui-flow-iNWWhp7U.cjs} +1 -1
- package/dist/{vue-ui-funnel-MXYMVu1G.cjs → vue-ui-funnel-BL8vtmsw.cjs} +1 -1
- package/dist/{vue-ui-funnel-MD4lrv0t.js → vue-ui-funnel-CBymVSdd.js} +19 -19
- package/dist/{vue-ui-galaxy-B9KiEfI4.cjs → vue-ui-galaxy-DSJrMBzj.cjs} +1 -1
- package/dist/{vue-ui-galaxy-K09M9SgI.js → vue-ui-galaxy-KP3A9HVX.js} +53 -52
- package/dist/{vue-ui-gauge-Bg2V5WNl.js → vue-ui-gauge-BuU0DDG0.js} +7 -7
- package/dist/{vue-ui-gauge-DaR_viLn.cjs → vue-ui-gauge-H9j8Dq5h.cjs} +1 -1
- package/dist/{vue-ui-gizmo-7Hv-0fsh.cjs → vue-ui-gizmo-Bl9JoMk1.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CdLxfJUw.js → vue-ui-gizmo-M7RalwJ6.js} +3 -3
- package/dist/{vue-ui-heatmap-DhgJ3LO9.cjs → vue-ui-heatmap-BXWWh4iN.cjs} +1 -1
- package/dist/{vue-ui-heatmap-CNPjaHGJ.js → vue-ui-heatmap-DSkfyl8j.js} +60 -59
- package/dist/{vue-ui-history-plot-DZOYwPTh.cjs → vue-ui-history-plot-BUoUHKx6.cjs} +1 -1
- package/dist/{vue-ui-history-plot-DRwX7quj.js → vue-ui-history-plot-CYSDr-GH.js} +60 -59
- package/dist/{vue-ui-kpi-Cnrfv2vn.cjs → vue-ui-kpi-BXe7HQIh.cjs} +1 -1
- package/dist/{vue-ui-kpi-C-5_TwY8.js → vue-ui-kpi-BvUaC7JA.js} +3 -3
- package/dist/{vue-ui-mini-loader-fZawewEF.js → vue-ui-mini-loader-DM8ShcKo.js} +2 -2
- package/dist/{vue-ui-mini-loader-uBFny7gt.cjs → vue-ui-mini-loader-zbjxzJTp.cjs} +1 -1
- package/dist/{vue-ui-molecule-BOClRlY3.cjs → vue-ui-molecule-BdIRpOM9.cjs} +1 -1
- package/dist/{vue-ui-molecule-pO5l42Vf.js → vue-ui-molecule-CZi84tUl.js} +26 -25
- package/dist/{vue-ui-mood-radar-jbYjFZID.js → vue-ui-mood-radar-DDnbuNdv.js} +11 -11
- package/dist/{vue-ui-mood-radar-CiMiQJuS.cjs → vue-ui-mood-radar-DipV_UPN.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-Bb5otIw_.js → vue-ui-nested-donuts-Chuuvtu-.js} +78 -77
- package/dist/{vue-ui-nested-donuts-IArnFfHY.cjs → vue-ui-nested-donuts-DuxVLzDH.cjs} +2 -2
- package/dist/{vue-ui-onion-BvQLUPjh.js → vue-ui-onion-CIRGvycb.js} +49 -48
- package/dist/{vue-ui-onion-SKVqk7rN.cjs → vue-ui-onion-CvlwZgpu.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-CeqeyIHj.cjs → vue-ui-parallel-coordinate-plot-eJMnJ_u2.cjs} +3 -3
- package/dist/{vue-ui-parallel-coordinate-plot-_LH1iK_w.js → vue-ui-parallel-coordinate-plot-jv7L5_x8.js} +70 -69
- package/dist/{vue-ui-quadrant-BiWyF1fA.js → vue-ui-quadrant-CjjXU43-.js} +55 -54
- package/dist/{vue-ui-quadrant-7jB46g4Z.cjs → vue-ui-quadrant-ks_4yK85.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-C1398EYu.js → vue-ui-quick-chart-BAVQ2SJ2.js} +637 -622
- package/dist/vue-ui-quick-chart-Br2gTOPk.cjs +15 -0
- package/dist/{vue-ui-radar-BvWCcL2b.js → vue-ui-radar-CXXAYowO.js} +38 -37
- package/dist/{vue-ui-radar-BYk3bLkt.cjs → vue-ui-radar-kjh9y4cm.cjs} +1 -1
- package/dist/{vue-ui-rating-CyGmfYEU.js → vue-ui-rating-DOqMciYJ.js} +2 -2
- package/dist/{vue-ui-rating-jKjMQHRN.cjs → vue-ui-rating-EEIqiBgY.cjs} +1 -1
- package/dist/vue-ui-relation-circle-BEv568py.cjs +1 -0
- package/dist/vue-ui-relation-circle-CR3iWQV_.js +492 -0
- package/dist/{vue-ui-rings-DEwuDHW2.js → vue-ui-rings-B--CFaNX.js} +49 -48
- package/dist/vue-ui-rings-CgvWaw5N.cjs +2 -0
- package/dist/{vue-ui-scatter-BYL4iitb.js → vue-ui-scatter-C-RD4h73.js} +26 -25
- package/dist/{vue-ui-scatter-BfI6xftp.cjs → vue-ui-scatter-ChWlgb1L.cjs} +1 -1
- package/dist/{vue-ui-screenshot-D4aNIcHd.js → vue-ui-screenshot-C6-MOj7h.js} +1 -1
- package/dist/{vue-ui-screenshot-Cf8g-RjG.cjs → vue-ui-screenshot-CtjCOun0.cjs} +1 -1
- package/dist/{vue-ui-skeleton-FCpm0_eE.js → vue-ui-skeleton-CXdyOF4T.js} +3 -3
- package/dist/{vue-ui-skeleton-BGfzzQdU.cjs → vue-ui-skeleton-DGCkWrND.cjs} +1 -1
- package/dist/{vue-ui-smiley-mjxS_13E.cjs → vue-ui-smiley-AYBZK1EE.cjs} +1 -1
- package/dist/{vue-ui-smiley-BFXulKpd.js → vue-ui-smiley-CHXnJeLu.js} +2 -2
- package/dist/{vue-ui-spark-trend-B2SOk378.cjs → vue-ui-spark-trend-D2wIBOvT.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-D-13-kV6.js → vue-ui-spark-trend-DO5rDGRm.js} +5 -5
- package/dist/{vue-ui-sparkbar-BlA1rgRo.cjs → vue-ui-sparkbar-COUcdDjn.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-C8cjDKBy.js → vue-ui-sparkbar-CU3UNgHm.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DRBVe3tu.js → vue-ui-sparkgauge-0810df6b.js} +4 -4
- package/dist/{vue-ui-sparkgauge-C4sFc7nb.cjs → vue-ui-sparkgauge-DrJzwEAh.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-iMRsSDvC.js → vue-ui-sparkhistogram-CENPsEeO.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-CkqzLBYq.cjs → vue-ui-sparkhistogram-j7MGEYYJ.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DIkUaObR.js → vue-ui-sparkline-BOYreaxT.js} +4 -4
- package/dist/{vue-ui-sparkline-C0JZ7Xq1.cjs → vue-ui-sparkline-CXMea9Ki.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DJbWCqs3.cjs → vue-ui-sparkstackbar-BJIo5y1n.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DJW1lBGU.js → vue-ui-sparkstackbar-JvKmnoEy.js} +5 -5
- package/dist/vue-ui-stackbar-BOAmp-no.cjs +6 -0
- package/dist/{vue-ui-stackbar-BGUXEdZi.js → vue-ui-stackbar-C3-hx7VM.js} +390 -377
- package/dist/{vue-ui-strip-plot-hn1U9cvT.js → vue-ui-strip-plot-8MxOeTM_.js} +71 -70
- package/dist/{vue-ui-strip-plot-DJTQ8r5H.cjs → vue-ui-strip-plot-CmIS1Osx.cjs} +1 -1
- package/dist/{vue-ui-table-7A1eCPQd.js → vue-ui-table-CS-NSZjj.js} +1 -1
- package/dist/{vue-ui-table-DFvOQzJu.cjs → vue-ui-table-hVmeT8wY.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-DqZsXcsO.js → vue-ui-table-heatmap-CGHYZFJy.js} +9 -9
- package/dist/{vue-ui-table-heatmap-ZnkAoAkQ.cjs → vue-ui-table-heatmap-k9e_RrhC.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-CV8o-yV6.js → vue-ui-table-sparkline-CRnJVQmO.js} +5 -5
- package/dist/{vue-ui-table-sparkline-5mX0B27t.cjs → vue-ui-table-sparkline-DiMZ_mh6.cjs} +1 -1
- package/dist/{vue-ui-thermometer-BwLTfi7y.cjs → vue-ui-thermometer-43jmlgFC.cjs} +1 -1
- package/dist/{vue-ui-thermometer-M6QwKOld.js → vue-ui-thermometer-D2BUcsvF.js} +7 -7
- package/dist/{vue-ui-timer-QypGImgW.cjs → vue-ui-timer-BO9Ipy0W.cjs} +1 -1
- package/dist/{vue-ui-timer-CoYF7LEU.js → vue-ui-timer-Dc6zOjxq.js} +9 -9
- package/dist/{vue-ui-tiremarks-DAFNYvB1.cjs → vue-ui-tiremarks-CMUTe1vY.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CzLOyhXF.js → vue-ui-tiremarks-ejt0fqPg.js} +7 -7
- package/dist/{vue-ui-treemap-DF5BIKs-.js → vue-ui-treemap-DD8tFk9R.js} +98 -97
- package/dist/{vue-ui-treemap-CutiBRIN.cjs → vue-ui-treemap-DqSHqaJK.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-bDcCcUy8.js → vue-ui-vertical-bar-CxydSPHF.js} +58 -57
- package/dist/{vue-ui-vertical-bar-D-ZZAU0r.cjs → vue-ui-vertical-bar-D4dYglan.cjs} +2 -2
- package/dist/{vue-ui-waffle-CCO3ZHyo.cjs → vue-ui-waffle-CHWAepdl.cjs} +1 -1
- package/dist/{vue-ui-waffle-BR_HwmLy.js → vue-ui-waffle-DYdcFM17.js} +79 -78
- package/dist/{vue-ui-wheel-DuO0nc0d.js → vue-ui-wheel-CxtgGGpt.js} +7 -7
- package/dist/{vue-ui-wheel-Cvcfc6o1.cjs → vue-ui-wheel-_ynSyF3l.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-Cv5bXF2B.js → vue-ui-word-cloud-B0AhPT0k.js} +10 -10
- package/dist/{vue-ui-word-cloud-BknJQRiM.cjs → vue-ui-word-cloud-Ct16Xxaw.cjs} +1 -1
- package/dist/{vue-ui-xy-Clf_sTRI.js → vue-ui-xy-B3346TfB.js} +195 -185
- package/dist/vue-ui-xy-DHYbKvBg.cjs +3 -0
- package/dist/vue-ui-xy-canvas-DtPqmu7B.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-BOJGw4H7.js → vue-ui-xy-canvas-W7YGqG7f.js} +378 -365
- package/package.json +1 -1
- package/dist/Slicer-BXHFpzP5.cjs +0 -1
- package/dist/Slicer-D7x1gyjP.js +0 -400
- package/dist/Tooltip-BC1YZMi2.cjs +0 -1
- package/dist/index--lHmCKjC.cjs +0 -9
- package/dist/vue-ui-candlestick-CVJB9WMH.js +0 -725
- package/dist/vue-ui-candlestick-Cb7CgmeV.cjs +0 -2
- package/dist/vue-ui-donut-evolution-DWdf8MKP.cjs +0 -1
- package/dist/vue-ui-donut-evolution-KdVsB3m_.js +0 -895
- package/dist/vue-ui-quick-chart-79l8Uv8o.cjs +0 -15
- package/dist/vue-ui-relation-circle-B3Df8yCi.js +0 -366
- package/dist/vue-ui-relation-circle-CZomraV2.cjs +0 -1
- package/dist/vue-ui-rings-L8pGRQbs.cjs +0 -2
- package/dist/vue-ui-stackbar-BtOrW2Ml.cjs +0 -6
- package/dist/vue-ui-xy-Cqb73yZ3.cjs +0 -3
- package/dist/vue-ui-xy-canvas-7OwcP1-L.cjs +0 -9
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index--lHmCKjC.cjs"),we=require("./useResponsive-BJ7DTGpm.cjs"),re=require("./BaseIcon-zXh1vLYa.cjs"),De=require("./Tooltip-BC1YZMi2.cjs"),Ee=require("./usePrinter-BfuqGrO4.cjs"),Me=require("./Slicer-BXHFpzP5.cjs"),Ue=require("./vue-ui-skeleton-BGfzzQdU.cjs"),Ae=require("./useNestedProp-DLJc0s53.cjs"),qe=require("./PackageVersion-rf9gXZ-Q.cjs"),We=require("./PenAndPaper-DS7gA4X0.cjs"),je=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Ge=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function He({dataset:s,barLineSwitch:B=6}){let h=null,L=null,z=0;if((typeof s=="number"||typeof s=="string")&&console.warn(`The provided dataset (${s}) is not sufficient to build a chart`),Q(s)&&(P(s)&&(s.length<B?h=S.BAR:h=S.LINE,L=s,z=s.length),ie(s))){if(!Ye(s))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const U=Object.keys(s[0]),j=Object.values(s[0]);if(!U.some(E=>Ze(E)))return console.warn("The data type of the dataset objects in the array must contain one of the following keys: DATA, SERIES, VALUE, VALUES, NUM. Casing is not important."),!1;Le(j,E=>typeof E=="number")&&(h=S.DONUT,L=s),Le(j,E=>Array.isArray(E)&&P(E))&&(_e(s)>B?h=S.LINE:h=S.BAR,z=_e(s),L=s.map(E=>({...E,data:Je(E,$=>P($))}))),s=s.map(E=>Ce(E)),L=L.map(E=>Ce(E))}return Q(s)&&[...new Set(s.flatMap(U=>Array.isArray(U)))][0],{dataset:s,type:h,usableDataset:L,maxSeriesLength:z}}function Ne(s){return!s||Q(s)&&!s.length}function Q(s){return Array.isArray(s)}function P(s){if(!Q(s)||Ne(s))return!1;const B=s.map(h=>Number(h));return![...new Set(B.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function ie(s){return!Q(s)||Ne(s)||!![...new Set(s.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!s.map(h=>Object.keys(h).length>0).includes(!1)}function Xe(s,B){const h=Object.keys(s).sort(),L=Object.keys(B).sort();if(h.length!==L.length)return!1;for(let z=0;z<h.length;z+=1){const V=h[z],M=L[z];if(V!==M||typeof s[V]!=typeof B[M])return!1}return!0}function Ye(s){if(s.length<=1)return!0;for(let B=0;B<s.length;B+=1)for(let h=B+1;h<s.length;h+=1)if(!Xe(s[B],s[h]))return!1;return!0}function Ze(s){return Ge.includes(s.toUpperCase())}function Le(s,B){let h=[];for(let L=0;L<s.length;L+=1)h.push(B(s[L]));return h.includes(!0)}function _e(s){return Math.max(...[...s].flatMap(B=>Object.values(B).filter(h=>P(h)).map(h=>h.length)))}function Je(s,B){return Object.values(s).filter(h=>B(h))[0]}function Ce(s){const B={};for(let h in s)s.hasOwnProperty(h)&&(B[h.toUpperCase()]=s[h]);return B}const ze=s=>(e.pushScopeId("data-v-7397d9b6"),s=s(),e.popScopeId(),s),Qe=["id"],Ke=["xmlns","viewBox"],et=["id"],tt=["id"],lt=ze(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),at=["id"],ot=["flood-color"],nt={key:0,class:"donut-label-connectors"},rt=["d","stroke","stroke-width","filter"],it=["cx","cy","r","fill","filter"],ut={class:"donut"},st=["d","fill","stroke","stroke-width","filter"],ct=["d","onMouseenter","onClick"],dt={key:1,class:"donut-labels quick-animation"},vt=["cx","cy","fill","stroke","filter"],mt=["text-anchor","x","y","fill","font-size","filter"],ht=["text-anchor","x","y","fill","font-size","filter"],pt={key:2,class:"donut-hollow quick-animation"},ft=["x","y","font-size","fill"],kt=["x","y","font-size","fill"],gt={key:0,class:"line-grid"},yt=["x1","x2","y1","y2","stroke","stroke-width"],xt=["x1","x2","y1","y2","stroke","stroke-width"],St={key:1,class:"line-axis"},bt=["x1","x2","y1","y2","stroke","stroke-width"],Bt=["x1","x2","y1","y2","stroke","stroke-width"],wt={key:2,class:"yLabels"},Et=["x1","x2","y1","y2","stroke","stroke-width"],At=["x","y","font-size","fill"],Lt={key:3,class:"periodLabels"},_t=["x1","x2","y1","y2","stroke","stroke-width"],Ct=["font-size","text-anchor","fill","transform"],Nt={class:"plots"},zt={class:"line-plot-series"},Vt=["d","stroke","stroke-width"],Ft=["d","stroke","stroke-width"],$t=["d","stroke","stroke-width"],Pt=["d","stroke","stroke-width"],Tt=["cx","cy","fill","stroke"],Rt={key:4,class:"dataLabels"},It=["font-size","fill","x","y"],Ot={class:"tooltip-traps"},Dt=["x","y","height","width","fill","onMouseenter","onClick"],Mt={key:0,class:"line-grid"},Ut=["x1","x2","y1","y2","stroke","stroke-width"],qt=["x1","x2","y1","y2","stroke","stroke-width"],Wt={key:1,class:"line-axis"},jt=["x1","x2","y1","y2","stroke","stroke-width"],Gt=["x1","x2","y1","y2","stroke","stroke-width"],Ht={key:2,class:"yLabels"},Xt=["x1","x2","y1","y2","stroke","stroke-width"],Yt=["x","y","font-size","fill"],Zt={key:3,class:"periodLabels"},Jt=["x1","x2","y1","y2","stroke","stroke-width"],Qt=["font-size","text-anchor","transform","fill"],Kt={class:"plots"},el=["x","width","height","y","fill","stroke","stroke-width"],tl=["to"],ll=["from","to"],al={key:4,class:"dataLabels"},ol=["x","y","font-size","fill"],nl={class:"tooltip-traps"},rl=["x","y","height","width","fill","onMouseenter","onClick"],il={key:3,class:"axis-labels"},ul={key:0},sl=["font-size","fill","x","y"],cl={key:1},dl=["font-size","fill","x","y"],vl={key:2},ml=["font-size","fill","transform"],hl={key:3},pl=["font-size","fill","transform"],fl={key:6,class:"vue-data-ui-watermark"},kl=["onClick"],gl=["onClick"],yl=["onClick"],xl={key:1,class:"vue-ui-quick-chart-not-processable"},Sl=ze(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),bl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(s,{expose:B,emit:h}){const L=s,{vue_ui_quick_chart:z}=u.useConfig(),V=e.ref(null),M=e.ref(null),U=e.ref(null),j=e.ref(null),E=e.ref(u.createUid()),$=e.ref(!1),G=e.ref(null),R=e.ref(""),F=e.ref(null),de=e.ref(null),ve=e.ref(null),x=e.ref([]),me=e.ref(0),K=e.ref(0),t=e.computed({get:()=>he(),set:n=>n});function he(){const n=Ae.useNestedProp({userConfig:L.config,defaultConfig:z});return n.theme?{...Ae.useNestedProp({userConfig:u.themes.vue_ui_quick_chart[n.theme]||L.config,defaultConfig:n}),customPalette:u.themePalettes[n.theme]||u.palette}:n}e.watch(()=>L.config,n=>{t.value=he(),y.value.width=t.value.width,y.value.height=t.value.height,ke()},{deep:!0}),e.watch(()=>L.dataset,n=>{f.value=X.value,k.value.start=0,k.value.end=f.value.maxSeriesLength,K.value+=1},{deep:!0});const H=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),X=e.computed(()=>{const n=He({dataset:u.sanitizeArray(L.dataset,["serie","series","data","value","values","num"]),barLineSwitch:t.value.chartIsBarUnderDatasetLength});return n||console.error("VueUiQuickChart : Dataset is not processable"),n}),f=e.ref(X.value),Ve=e.computed(()=>!!f.value),b=e.computed(()=>f.value?f.value.type:null);e.watch(()=>b.value,n=>{n||u.error({componentName:"VueUiQuickChart",type:"dataset"})},{immediate:!0});const{isPrinting:ee,isImaging:te,generatePdf:pe,generateImage:fe}=Ee.usePrinter({elementId:`${b.value}_${E.value}`,fileName:t.value.title||b.value}),Fe=e.computed(()=>t.value.showUserOptions&&!t.value.title),y=e.ref({width:t.value.width,height:t.value.height}),le=e.ref({showTooltip:t.value.showTooltip}),ae=e.ref(null);e.onMounted(()=>{ke()});function ke(){if(t.value.responsive){const n=we.throttle(()=>{const{width:v,height:l}=we.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&&f.value.maxSeriesLength>1?j.value:null,source:de.value,noTitle:ve.value});y.value.width=v,y.value.height=l});ae.value=new ResizeObserver(n),ae.value.observe(V.value.parentNode)}}e.onBeforeUnmount(()=>{ae.value&&ae.value.disconnect()});const $e=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 ge(n){return[...n].map(v=>v.value).reduce((v,l)=>v+l,0)}function Y(n){return t.value.blurOnHover&&![null,void 0].includes(F.value)&&F.value!==n?`url(#blur_${E.value})`:""}function ye(n,v){x.value.includes(n)?x.value=x.value.filter(l=>l!==n):x.value.length<v&&x.value.push(n)}const xe=e.ref(null),Se=e.ref(null),oe=e.ref(!1);function Pe(n,v){oe.value=!0;let l=n.value;if(x.value.includes(n.id)){let i=function(){l>r?(oe.value=!1,cancelAnimationFrame(Se.value),f.value={...f.value,dataset:f.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:r,VALUE:r}:m)}):(l+=r*.025,f.value={...f.value,dataset:f.value.dataset.map((m,_)=>n.id===`donut_${_}`?{...m,value:l,VALUE:l}:m)},Se.value=requestAnimationFrame(i))};x.value=x.value.filter(m=>m!==n.id);const r=X.value.dataset.find((m,_)=>n.id===`donut_${_}`).VALUE;i()}else if(v.length>1){let r=function(){l<.1?(oe.value=!1,cancelAnimationFrame(xe.value),x.value.push(n.id),f.value={...f.value,dataset:f.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:0,VALUE:0}:i)}):(l/=1.1,f.value={...f.value,dataset:f.value.dataset.map((i,m)=>n.id===`donut_${m}`?{...i,value:l,VALUE:l}:i)},xe.value=requestAnimationFrame(r))};r()}}const T=e.ref(null);function Te(n){T.value=n}const be=e.computed(()=>t.value.donutThicknessRatio<.15?.15:t.value.donutThicknessRatio>.4?.4:t.value.donutThicknessRatio),w=e.computed(()=>{if(b.value!==S.DONUT)return null;const n=f.value.dataset.map((a,o)=>({...a,value:a.VALUE||a.DATA||a.SERIE||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`donut_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],immutableValue:a.value}));function v(a,o){return u.dataLabel({v:isNaN(a.value/ge(o))?0:a.value/ge(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function r(a,o){const g=X.value.dataset.find((A,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})))R.value=g({datapoint:a,seriesIndex:o,series:n,config:t.value});else{let p="";p+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,p+=`<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>`,p+=`<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>`,p+=`<span>(${u.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,R.value=`<div>${p}</div>`}$.value=!0}function m(){$.value=!1,F.value=null,T.value=null}const _={centerX:y.value.width/2,centerY:y.value.height/2},N=n.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),q=n.map((a,o)=>({...a,proportion:(a.value||0)/N,value:a.value||0,absoluteValue:X.value.dataset.find((g,p)=>`donut_${p}`===a.id).VALUE})),I=y.value.width/2,W=y.value.height/2,O=y.value.height*t.value.donutRadiusRatio;return{dataset:q.filter(a=>!x.value.includes(a.id)),legend:q,drawingArea:_,displayArcPercentage:v,isArcBigEnough:l,useTooltip:i,killTooltip:m,getSpaces:r,total:N,cx:I,cy:W,radius:O,chart:u.makeDonut({series:n.filter(a=>!x.value.includes(a.id))},I,W,O,O,1.99999,2,1,360,105.25,y.value.height*be.value)}}),k=e.ref({start:0,end:f.value.maxSeriesLength});function Re(){k.value={start:0,end:f.value.maxSeriesLength},K.value+=1}const Ie=e.computed(()=>{if(!t.value.zoomMinimap.show||b.value===S.DONUT)return[];let n=[];P(f.value.dataset)&&(n=f.value.dataset),ie(f.value.dataset)&&(n=f.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 v=P(n)?n.length:Math.max(...n.map(i=>i.values.length));let l=[];if(P(n))l=n;else for(let i=0;i<v;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))}),d=e.computed(()=>{if(b.value!==S.LINE)return null;const n={height:y.value.height,width:y.value.width},v={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(f.value.dataset)&&(l=[{values:f.value.dataset.slice(k.value.start,k.value.end),absoluteIndices:f.value.dataset.map((a,o)=>o).slice(k.value.start,k.value.end),name:t.value.title,color:H.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"line_0"}]),ie(f.value.dataset)&&(l=f.value.dataset.map((a,o)=>({...a,values:a.VALUE||a.DATA||a.SERIE||a.SERIES||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`line_${o}`})).map((a,o)=>({...a,color:a.COLOR?u.convertColorToHex(a.COLOR):H.value[o+t.value.paletteStartIndex]||u.palette[o+t.value.paletteStartIndex]||u.palette[(o+t.value.paletteStartIndex)%u.palette.length],values:a.values.slice(k.value.start,k.value.end),absoluteIndices:a.values.map((g,p)=>p).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?v.top:v.bottom-m/(i.max+m)*v.height,N=v.width/r.maxSeries,q=i.ticks.map(a=>({y:v.bottom-v.height*((a+m)/(i.max+m)),x:v.left-8,value:a})),I=l.map((a,o)=>({...a,coordinates:a.values.map((g,p)=>({x:v.left+N*(p+1)-N/2,y:v.bottom-(g+m)/(i.max+m)*v.height,value:g}))})).map(a=>{let o=[];return a.coordinates.forEach(g=>{o.push(`${g.x},${g.y} `)}),{...a,linePath:o.join(" ")}});function W(a){F.value=a,T.value=a;const o=l.map(p=>({...p,value:p.values[a],absoluteIndex:p.absoluteIndices[a]})).filter(p=>!x.value.includes(p.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})))R.value=g({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let p="";t.value.xyPeriods[o[0].absoluteIndex]&&(p+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[o[0].absoluteIndex]}</div>`),o.forEach((A,C)=>{p+=`
|
|
2
|
-
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
3
|
-
<svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${A.color}"/></svg>
|
|
4
|
-
<span>${A.name}:</span>
|
|
5
|
-
<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:C})}
|
|
6
|
-
</b>
|
|
7
|
-
</div>
|
|
8
|
-
`}),R.value=p}$.value=!0}function O(){F.value=null,$.value=!1}return{absoluteZero:_,dataset:I.filter(a=>!x.value.includes(a.id)),legend:I,drawingArea:v,extremes:r,slotSize:N,yLabels:q,useTooltip:W,killTooltip:O}}),c=e.computed(()=>{if(b.value!==S.BAR)return null;const n={height:y.value.height,width:y.value.width},v={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(f.value.dataset)&&(l=[{values:f.value.dataset.slice(k.value.start,k.value.end),absoluteIndices:f.value.dataset.map((o,g)=>g).slice(k.value.start,k.value.end),name:t.value.title,color:H.value[t.value.paletteStartIndex]||u.palette[t.value.paletteStartIndex],id:"bar_0"}]),ie(f.value.dataset)&&(l=f.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?u.convertColorToHex(o.COLOR):H.value[g+t.value.paletteStartIndex]||u.palette[g+t.value.paletteStartIndex]||u.palette[(g+t.value.paletteStartIndex)%u.palette.length],values:o.values.slice(k.value.start,k.value.end),absoluteIndices:o.values.map((p,A)=>A).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))},i=u.calculateNiceScale(r.min<0?r.min:0,r.max,t.value.xyScaleSegments),m=i.min<0?Math.abs(i.min):0,_=v.bottom-m/(i.max+m)*v.height,N=v.width/r.maxSeries,q=i.ticks.map(o=>({y:v.bottom-v.height*((o+m)/(i.max+m)),x:v.left-8,value:o})),I=l.map((o,g)=>({...o,coordinates:o.values.map((p,A)=>{const C=(p+m)/(r.max+m)*v.height,Z=Math.abs(p)/Math.abs(r.min)*(v.height-_),ce=m/(r.max+m)*v.height,J=N/l.filter(D=>!x.value.includes(D.id)).length-t.value.barGap/l.filter(D=>!x.value.includes(D.id)).length;return{x:v.left+N*A+J*g+t.value.barGap/2,y:p>0?v.bottom-C:_,height:p>0?C-ce:Z,value:p,width:J}})})),W=l.filter(o=>!x.value.includes(o.id)).map((o,g)=>({...o,coordinates:o.values.map((p,A)=>{const C=(p+m)/(r.max+m)*v.height,Z=Math.abs(p)/(r.max+m)*v.height,ce=m/(r.max+m)*v.height,J=N/l.filter(D=>!x.value.includes(D.id)).length-t.value.barGap/l.filter(D=>!x.value.includes(D.id)).length;return{x:v.left+N*A+J*g+t.value.barGap/2,y:p>0?v.bottom-C:_,height:p>0?C-ce:Z,value:p,width:J}})}));function O(o){F.value=o,T.value=o;const g=l.map(A=>({...A,value:A.values[o],absoluteIndex:A.absoluteIndices[o]})).filter(A=>!x.value.includes(A.id));G.value={datapoint:g,seriesIndex:o,config:t.value,dataset:l};const p=t.value.tooltipCustomFormat;if(u.isFunction(p)&&u.functionReturnsString(()=>p({datapoint:g,seriesIndex:o,series:l,config:t.value})))R.value=p({point:g,seriesIndex:o,series:l,config:t.value});else{let A="";t.value.xyPeriods[g[0].absoluteIndex]&&(A+=`<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,Z)=>{A+=`
|
|
9
|
-
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
10
|
-
<svg viewBox="0 0 12 12" height="14" width="12"><rect x=0 y="0" width="12" height="12" rx="1" stroke="none" fill="${C.color}"/></svg>
|
|
11
|
-
<span>${C.name}:</span>
|
|
12
|
-
<b>${u.applyDataLabel(t.value.formatter,C.value,u.dataLabel({p:t.value.valuePrefix,v:C.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:C,seriesIndex:Z})}
|
|
13
|
-
</b>
|
|
14
|
-
</div>
|
|
15
|
-
`}),R.value=A}$.value=!0}function a(){$.value=!1,F.value=null,T.value=null}return{absoluteZero:_,dataset:W.filter(o=>!x.value.includes(o.id)),legend:I,drawingArea:v,extremes:r,slotSize:N,yLabels:q,useTooltip:O,killTooltip:a}}),ue=e.ref(!1);function Oe(n){ue.value=n,me.value+=1}function Be(){le.value.showTooltip=!le.value.showTooltip}const ne=e.ref(!1);function se(){ne.value=!ne.value}return B({generatePdf:pe,generateImage:fe,toggleTooltip:Be,toggleAnnotator:se}),(n,v)=>Ve.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${b.value}_${E.value}`,ref_key:"quickChart",ref:V,class:e.normalizeClass({"vue-ui-quick-chart":!0,"vue-data-ui-wrapper-fullscreen":ue.value}),style:e.normalizeStyle(`background:${t.value.backgroundColor};color:${t.value.color};font-family:${t.value.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[t.value.userOptionsButtons.annotator?(e.openBlock(),e.createBlock(We.PenAndPaper,{key:0,parent:V.value,backgroundColor:t.value.backgroundColor,color:t.value.color,active:ne.value,onClose:se},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),Fe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:ve,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.showUserOptions?(e.openBlock(),e.createBlock(Ee.UserOptions,{ref:"details",key:`user_option_${me.value}`,backgroundColor:t.value.backgroundColor,color:t.value.color,isPrinting:e.unref(ee),isImaging:e.unref(te),uid:E.value,hasTooltip:t.value.userOptionsButtons.tooltip&&t.value.showTooltip,hasPdf:t.value.userOptionsButtons.pdf,hasImg:t.value.userOptionsButtons.img,hasFullscreen:t.value.userOptionsButtons.fullscreen,hasXls:!1,isTooltip:le.value.showTooltip,isFullscreen:ue.value,titles:{...t.value.userOptionsButtonTitles},chartElement:V.value,position:t.value.userOptionsPosition,hasAnnotator:t.value.userOptionsButtons.annotator,isAnnotation:ne.value,onToggleFullscreen:Oe,onGeneratePdf:e.unref(pe),onGenerateImage:e.unref(fe),onToggleTooltip:Be,onToggleAnnotator:se},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"])):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:$e.value,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.color}`)},[e.createVNode(qe._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${E.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${E.value}`},null,8,tt),lt],8,et),e.createElementVNode("filter",{id:`shadow_${E.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.donutShadowColor},null,8,ot)],8,at)]),b.value===S.DONUT?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(u.calcNutArrowPath)(l,{x:y.value.width/2,y:y.value.height/2},16,16,!1,!1,y.value.height*be.value),stroke:l.color,"stroke-width":t.value.donutLabelMarkerStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:Y(l.id)},null,8,rt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("circle",{cx:w.value.cx,cy:w.value.cy,r:w.value.radius,fill:t.value.backgroundColor,filter:t.value.donutUseShadow?`url(#shadow_${E.value})`:""},null,8,it),e.createElementVNode("g",ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.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:Y(l.id)},null,8,st))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:"transparent",onMouseenter:i=>w.value.useTooltip({datapoint:l,seriesIndex:r}),onMouseout:v[0]||(v[0]=i=>w.value.killTooltip()),onClick:i=>h("selectDatapoint",l)},null,40,ct))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value.chart,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(u.calcMarkerOffsetX)(l).x,cy:e.unref(u.calcMarkerOffsetY)(l)-3.7,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":1,r:3,filter:Y(l.id)},null,8,vt)):e.createCommentVNode("",!0),w.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(u.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(u.calcMarkerOffsetX)(l,!0).x,y:e.unref(u.calcMarkerOffsetY)(l),fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:Y(l.id)},e.toDisplayString(w.value.displayArcPercentage(l,w.value.chart))+" ("+e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r}))+") ",9,mt)):e.createCommentVNode("",!0),w.value.isArcBigEnough(l,!0,20)?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(u.calcMarkerOffsetX)(l).anchor,x:e.unref(u.calcMarkerOffsetX)(l,!0).x,y:e.unref(u.calcMarkerOffsetY)(l)+t.value.dataLabelFontSize,fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:Y(l.id)},e.toDisplayString(l.name),9,ht)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.donutShowTotal?(e.openBlock(),e.createElementBlock("g",pt,[e.createElementVNode("text",{"text-anchor":"middle",x:w.value.drawingArea.centerX,y:w.value.drawingArea.centerY-t.value.donutTotalLabelFontSize/2,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(t.value.donutTotalLabelText),9,ft),e.createElementVNode("text",{"text-anchor":"middle",x:w.value.drawingArea.centerX,y:w.value.drawingArea.centerY+t.value.donutTotalLabelFontSize,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.dataLabel)({p:t.value.valuePrefix,v:w.value.total,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,kt)])):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",gt,[(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,xt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",St,[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,bt),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,Bt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",wt,[(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,Et)):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,At)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",Lt,[(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,_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(${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})`},e.toDisplayString(l),9,Ct))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,r)=>(e.openBlock(),e.createElementBlock("g",zt,[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,Vt),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,Ft)],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,$t),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,Pt)],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,Tt))),256))]))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Rt,[(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",{"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,It))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Ot,[(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,T.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:i=>d.value.useTooltip(r),onMouseleave:v[1]||(v[1]=i=>d.value.killTooltip()),onClick:i=>h("selectDatapoint",d.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,Dt))),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",Mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.yLabels,l=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:l.y,y2:l.y,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Ut)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries+1,(l,r)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*r,x2:c.value.drawingArea.left+c.value.slotSize*r,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,qt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",Wt,[e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.left,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,jt),e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:isNaN(c.value.absoluteZero)?c.value.drawingArea.bottom:c.value.absoluteZero,y2:isNaN(c.value.absoluteZero)?c.value.drawingArea.bottom:c.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Gt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",Ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.yLabels,(l,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:c.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Xt)):e.createCommentVNode("",!0),l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x,y:l.y+t.value.xyLabelsYFontSize/3,"text-anchor":"end","font-size":t.value.xyLabelsYFontSize,fill:t.value.color},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.formatter,l.value,e.unref(u.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:r})),9,Yt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",Zt,[(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:c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2,x2:c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2,y1:c.value.drawingArea.bottom,y2:c.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Jt))),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(${c.value.drawingArea.left+c.value.slotSize*(r+1)-c.value.slotSize/2}, ${c.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}) rotate(${t.value.xyPeriodLabelsRotation})`,fill:t.value.color},e.toDisplayString(l),9,Qt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Kt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.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(ee)&&!e.unref(te)?(e.openBlock(),e.createElementBlock("animate",{key:0,attributeName:"height",from:0,to:i.height,dur:"0.5s"},null,8,tl)):e.createCommentVNode("",!0),t.value.barAnimated&&i.value>0&&!e.unref(ee)&&!e.unref(te)?(e.openBlock(),e.createElementBlock("animate",{key:1,attributeName:"y",from:c.value.absoluteZero,to:c.value.absoluteZero-i.height,dur:"0.5s"},null,8,ll)):e.createCommentVNode("",!0)],10,el))),256))],64))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.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,ol))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries,(l,r)=>(e.openBlock(),e.createElementBlock("rect",{x:c.value.drawingArea.left+r*c.value.slotSize,y:c.value.drawingArea.top,height:c.value.drawingArea.height<=0?1e-5:c.value.drawingArea.height,width:c.value.slotSize<=0?1e-5:c.value.slotSize,fill:[F.value,T.value].includes(r)?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:i=>c.value.useTooltip(r),onMouseleave:v[2]||(v[2]=i=>c.value.killTooltip()),onClick:i=>h("selectDatapoint",c.value.dataset.map(m=>({...m,value:m.values[r]})))},null,44,rl))),256))])],64)):e.createCommentVNode("",!0),[S.LINE,S.BAR].includes(b.value)?(e.openBlock(),e.createElementBlock("g",il,[t.value.xAxisLabel&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("g",ul,[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,sl)])):e.createCommentVNode("",!0),t.value.xAxisLabel&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("g",cl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:c.value.drawingArea.left+c.value.drawingArea.width/2,y:y.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,dl)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&b.value===S.LINE?(e.openBlock(),e.createElementBlock("g",vl,[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,ml)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&b.value===S.BAR?(e.openBlock(),e.createElementBlock("g",hl,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,transform:`translate(${t.value.axisLabelsFontSize}, ${c.value.drawingArea.top+c.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.yAxisLabel),9,pl)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],12,Ke)):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ue.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",fl,[e.renderSlot(n.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),[S.BAR,S.LINE].includes(b.value)&&t.value.zoomXy&&f.value.maxSeriesLength>1?(e.openBlock(),e.createElementBlock("div",{key:`slicer_${K.value}`,ref_key:"quickChartSlicer",ref:j},[(e.openBlock(),e.createBlock(Me.Slicer,{key:`slicer_${K.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:f.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:Ie.value,minimapIndicatorColor:t.value.zoomMinimap.indicatorColor,minimapSelectedIndex:T.value,start:k.value.start,"onUpdate:start":v[3]||(v[3]=l=>k.value.start=l),end:k.value.end,"onUpdate:end":v[4]||(v[4]=l=>k.value.end=l),onReset:Re,onTrapMouse:Te},{"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"]))])):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(w.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{Pe(l,w.value.dataset),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${w.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(re.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)):oe.value?(e.openBlock(),e.createElementBlock("span",{key:1,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)}," ( - % ) ",4)):(e.openBlock(),e.createElementBlock("span",{key:2,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)}," ("+e.toDisplayString(e.unref(u.dataLabel)({v:l.value/w.value.total*100,s:"%",r:t.value.dataLabelRoundingPercentage}))+") ",5))],64))],12,kl))),256)):e.createCommentVNode("",!0),b.value===S.LINE?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{ye(l.id,d.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${d.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(re.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,gl))),256)):e.createCommentVNode("",!0),b.value===S.BAR?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(c.value.legend,(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:i=>{ye(l.id,c.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${c.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(n.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(re.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,yl))),256)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),n.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:de,dir:"auto"},[e.renderSlot(n.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(De._sfc_main,{show:le.value.showTooltip&&$.value,backgroundColor:t.value.backgroundColor,color:t.value.color,borderRadius:t.value.tooltipBorderRadius,borderColor:t.value.tooltipBorderColor,borderWidth:t.value.tooltipBorderWidth,fontSize:t.value.tooltipFontSize,backgroundOpacity:t.value.tooltipBackgroundOpacity,position:t.value.tooltipPosition,offsetY:t.value.tooltipOffsetY,parent:V.value,content:R.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","isCustom"])],14,Qe)):(e.openBlock(),e.createElementBlock("div",xl,[e.createVNode(re.default,{name:"circleCancel",stroke:"red"}),Sl]))}},Bl=je._export_sfc(bl,[["__scopeId","data-v-7397d9b6"]]);exports.default=Bl;
|
|
@@ -1,366 +0,0 @@
|
|
|
1
|
-
import { useCssVars as xe, computed as c, ref as a, watch as be, onMounted as Ae, onBeforeUnmount as Oe, openBlock as n, createElementBlock as i, normalizeStyle as C, createBlock as A, createCommentVNode as f, unref as y, createSlots as Pe, withCtx as O, renderSlot as m, normalizeProps as N, guardReactiveProps as S, normalizeClass as R, createVNode as Ie, createElementVNode as Fe, Fragment as P, renderList as I, toDisplayString as Te } from "vue";
|
|
2
|
-
import { u as Ee, c as ze, t as Le, a as Ne, p as ne, b as Se, o as Re, e as re, g as Me, X as je } from "./index-DY8hDTi7.js";
|
|
3
|
-
import { t as Be, u as Ge } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as Ue } from "./Title-BFvWnqI4.js";
|
|
5
|
-
import { u as De, U as Ve } from "./usePrinter-DjAQofRy.js";
|
|
6
|
-
import We from "./vue-ui-skeleton-FCpm0_eE.js";
|
|
7
|
-
import { u as se } from "./useNestedProp-lhL30X68.js";
|
|
8
|
-
import { _ as Xe } from "./PackageVersion-BT4zkGPO.js";
|
|
9
|
-
import { P as Ye } from "./PenAndPaper-BFq1cFfJ.js";
|
|
10
|
-
import { _ as qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
-
const He = ["id"], Je = ["xmlns", "viewBox"], Ke = ["cx", "cy", "r", "stroke", "stroke-width"], Qe = { key: 0 }, Ze = ["stroke", "d", "stroke-width"], et = { key: 1 }, tt = ["stroke", "x1", "x2", "y1", "y2"], lt = ["text-anchor", "transform", "x", "y", "onClick", "font-weight", "font-size", "fill"], nt = ["cx", "cy", "fill", "onClick", "r"], rt = {
|
|
12
|
-
key: 5,
|
|
13
|
-
class: "vue-data-ui-watermark"
|
|
14
|
-
}, st = {
|
|
15
|
-
__name: "vue-ui-relation-circle",
|
|
16
|
-
props: {
|
|
17
|
-
dataset: {
|
|
18
|
-
type: Array,
|
|
19
|
-
default() {
|
|
20
|
-
return [];
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
config: {
|
|
24
|
-
type: Object,
|
|
25
|
-
default() {
|
|
26
|
-
return {};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
setup(ae, { expose: ie }) {
|
|
31
|
-
const d = ae;
|
|
32
|
-
xe((e) => ({
|
|
33
|
-
"47419f48": fe.value,
|
|
34
|
-
"77774d27": ve.value,
|
|
35
|
-
df46026e: ge.value
|
|
36
|
-
}));
|
|
37
|
-
const { vue_ui_relation_circle: oe } = Ee(), F = c(() => !!d.dataset && Object.keys(d.dataset).length), k = a(ze()), M = a(0), _ = a(null), j = a(null), B = a(null), G = a(null), U = a(0), l = c({
|
|
38
|
-
get: () => D(),
|
|
39
|
-
set: (e) => e
|
|
40
|
-
});
|
|
41
|
-
function D() {
|
|
42
|
-
const e = se({
|
|
43
|
-
userConfig: d.config,
|
|
44
|
-
defaultConfig: oe
|
|
45
|
-
});
|
|
46
|
-
return e.theme ? {
|
|
47
|
-
...se({
|
|
48
|
-
userConfig: Le.vue_ui_relation_circle[e.theme] || d.config,
|
|
49
|
-
defaultConfig: e
|
|
50
|
-
}),
|
|
51
|
-
customPalette: Ne[e.theme] || ne
|
|
52
|
-
} : e;
|
|
53
|
-
}
|
|
54
|
-
be(() => d.config, (e) => {
|
|
55
|
-
l.value = D(), H(), U.value += 1;
|
|
56
|
-
}, { deep: !0 });
|
|
57
|
-
const { isPrinting: V, isImaging: W, generatePdf: X, generateImage: Y } = De({
|
|
58
|
-
elementId: `relation_circle_${k.value}`,
|
|
59
|
-
fileName: l.value.style.title.text || "vue-ui-relation-circle"
|
|
60
|
-
}), ue = c(() => l.value.userOptions.show && !l.value.style.title.text), q = c(() => Se(l.value.customPalette)), g = a([]), p = a([]), o = a({}), v = a([]), ce = a(0), T = c(() => d.dataset.slice(0, l.value.style.limit)), E = a(l.value.style.size), u = a({
|
|
61
|
-
height: l.value.style.size,
|
|
62
|
-
width: l.value.style.size
|
|
63
|
-
}), h = c({
|
|
64
|
-
get() {
|
|
65
|
-
return E.value * l.value.style.circle.radiusProportion;
|
|
66
|
-
},
|
|
67
|
-
set(e) {
|
|
68
|
-
return e;
|
|
69
|
-
}
|
|
70
|
-
}), de = c(() => l.value.style.links.curved), ve = c(() => `${l.value.style.animation.speedMs}ms`), fe = c(() => h.value * 2), ge = c(() => h.value * 4), w = a(null);
|
|
71
|
-
Ae(() => {
|
|
72
|
-
H(), document.getElementById(`relation_circle_${k.value}`).addEventListener("click", J);
|
|
73
|
-
});
|
|
74
|
-
function H() {
|
|
75
|
-
if (Re(d.dataset) ? re({
|
|
76
|
-
componentName: "VueUiRelationCircle",
|
|
77
|
-
type: "dataset"
|
|
78
|
-
}) : d.dataset.forEach((e, r) => {
|
|
79
|
-
Me({
|
|
80
|
-
datasetObject: e,
|
|
81
|
-
requiredAttributes: ["id", "label", "relations", "weights"]
|
|
82
|
-
}).forEach((t) => {
|
|
83
|
-
re({
|
|
84
|
-
componentName: "VueUiRelationCircle",
|
|
85
|
-
type: "datasetSerieAttribute",
|
|
86
|
-
property: t,
|
|
87
|
-
index: r
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
}), l.value.responsive) {
|
|
91
|
-
const e = Be(() => {
|
|
92
|
-
const { width: r, height: t } = Ge({
|
|
93
|
-
chart: _.value,
|
|
94
|
-
title: l.value.style.title.text ? j.value : null,
|
|
95
|
-
source: B.value,
|
|
96
|
-
noTitle: G.value
|
|
97
|
-
});
|
|
98
|
-
E.value = Math.min(r, t), u.value.width = r, u.value.height = t, h.value = E.value * l.value.style.circle.radiusProportion, g.value = [], p.value = [], K(), Q();
|
|
99
|
-
});
|
|
100
|
-
w.value = new ResizeObserver(e), w.value.observe(_.value.parentNode);
|
|
101
|
-
} else
|
|
102
|
-
g.value = [], p.value = [], K(), Q();
|
|
103
|
-
}
|
|
104
|
-
Oe(() => {
|
|
105
|
-
document.getElementById(`relation_circle_${k.value}`).removeEventListener("click", J), w.value && w.value.disconnect();
|
|
106
|
-
});
|
|
107
|
-
function J(e) {
|
|
108
|
-
const r = e.target;
|
|
109
|
-
r && Array.from(r.classList).includes("vue-ui-user-options") || r && Array.from(r.classList).includes("vue-ui-user-options-summary") || r && Array.from(r.classList).includes("vue-data-ui-button") || r && Array.from(r.classList).includes("vue-ui-relation-circle-legend") || (o.value = {}, v.value = []);
|
|
110
|
-
}
|
|
111
|
-
function K() {
|
|
112
|
-
const e = 6.28319 / T.value.length, r = 360 / T.value.length;
|
|
113
|
-
let t = 0, s = 0;
|
|
114
|
-
T.value.forEach(($, L) => {
|
|
115
|
-
const Ce = h.value * Math.cos(t) + u.value.width / 2, we = h.value * Math.sin(t) + u.value.height / 2 + l.value.style.circle.offsetY;
|
|
116
|
-
g.value.push({ x: Ce, y: we, ...$, color: $.color ? $.color : q.value[L] ? q.value[L] : ne[L], regAngle: s }), t += e, s += r;
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
function Q() {
|
|
120
|
-
g.value.forEach((e) => {
|
|
121
|
-
g.value.filter((t) => t.relations.includes(e.id)).forEach((t, s) => {
|
|
122
|
-
p.value.push({
|
|
123
|
-
weight: e.weights && e.weights[s] ? e.weights[s] : 1,
|
|
124
|
-
relationId: `${e.id}_${t.id}`,
|
|
125
|
-
x1: e.x,
|
|
126
|
-
y1: e.y,
|
|
127
|
-
x2: t.x,
|
|
128
|
-
y2: t.y,
|
|
129
|
-
colorSource: e.color,
|
|
130
|
-
colorTarget: t.color,
|
|
131
|
-
...e
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
const he = c(() => Math.max(...p.value.map((e) => e.weight)));
|
|
137
|
-
function ye(e) {
|
|
138
|
-
return Object.hasOwn(o.value, "x") ? v.value.includes(e.id) ? "opacity:1" : "opacity:0.1" : "opacity:1";
|
|
139
|
-
}
|
|
140
|
-
function Z(e) {
|
|
141
|
-
return Object.hasOwn(o.value, "x") ? e.colorTarget : e.colorSource;
|
|
142
|
-
}
|
|
143
|
-
function ee(e) {
|
|
144
|
-
return Object.hasOwn(o.value, "x") ? v.value.includes(e.id) && e.relationId === `${e.id}_${o.value.id}` || e.relationId === `${o.value.id}_${e.id}` ? `opacity:1;stroke-width:${le(e)}` : "opacity: 0" : "opacity: 1";
|
|
145
|
-
}
|
|
146
|
-
function me(e) {
|
|
147
|
-
return e.regAngle > 90 && e.regAngle < 270 ? "end" : "start";
|
|
148
|
-
}
|
|
149
|
-
function pe(e) {
|
|
150
|
-
return e.regAngle > 90 && e.regAngle < 270 ? e.x - 5 : e.x + 5;
|
|
151
|
-
}
|
|
152
|
-
function ke(e) {
|
|
153
|
-
return Object.hasOwn(o.value, "x") ? o.value.id === e.id || v.value.includes(e.id) ? "opacity:1" : "opacity:0.2" : "opacity:1";
|
|
154
|
-
}
|
|
155
|
-
function _e(e) {
|
|
156
|
-
return e.regAngle > 90 && e.regAngle < 270 ? `rotate(${e.regAngle + 180},${e.x},${e.y})` : `rotate(${e.regAngle},${e.x},${e.y})`;
|
|
157
|
-
}
|
|
158
|
-
function te(e) {
|
|
159
|
-
ce.value = 360 - e.regAngle, o.value.id && e.id === o.value.id ? (o.value = {}, v.value = []) : (o.value = e, v.value = [...e.relations]);
|
|
160
|
-
}
|
|
161
|
-
function le(e) {
|
|
162
|
-
return e.weight / he.value * l.value.style.links.maxWidth;
|
|
163
|
-
}
|
|
164
|
-
const x = a(!1);
|
|
165
|
-
function $e(e) {
|
|
166
|
-
x.value = e, M.value += 1;
|
|
167
|
-
}
|
|
168
|
-
const b = a(!1);
|
|
169
|
-
function z() {
|
|
170
|
-
b.value = !b.value;
|
|
171
|
-
}
|
|
172
|
-
return ie({
|
|
173
|
-
generatePdf: X,
|
|
174
|
-
generateImage: Y,
|
|
175
|
-
toggleAnnotator: z
|
|
176
|
-
}), (e, r) => (n(), i("div", {
|
|
177
|
-
ref_key: "relationCircleChart",
|
|
178
|
-
ref: _,
|
|
179
|
-
class: "vue-ui-relation-circle",
|
|
180
|
-
style: C(`width:100%;background:${l.value.style.backgroundColor};text-align:center;${l.value.responsive ? "height: 100%" : ""}`),
|
|
181
|
-
id: `relation_circle_${k.value}`
|
|
182
|
-
}, [
|
|
183
|
-
l.value.userOptions.buttons.annotator ? (n(), A(Ye, {
|
|
184
|
-
key: 0,
|
|
185
|
-
parent: _.value,
|
|
186
|
-
backgroundColor: l.value.style.backgroundColor,
|
|
187
|
-
color: l.value.style.color,
|
|
188
|
-
active: b.value,
|
|
189
|
-
onClose: z
|
|
190
|
-
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : f("", !0),
|
|
191
|
-
ue.value ? (n(), i("div", {
|
|
192
|
-
key: 1,
|
|
193
|
-
ref_key: "noTitle",
|
|
194
|
-
ref: G,
|
|
195
|
-
class: "vue-data-ui-no-title-space",
|
|
196
|
-
style: "height:36px; width: 100%;background:transparent"
|
|
197
|
-
}, null, 512)) : f("", !0),
|
|
198
|
-
l.value.style.title.text ? (n(), i("div", {
|
|
199
|
-
key: 2,
|
|
200
|
-
ref_key: "chartTitle",
|
|
201
|
-
ref: j,
|
|
202
|
-
style: "width:100%;background:transparent"
|
|
203
|
-
}, [
|
|
204
|
-
(n(), A(Ue, {
|
|
205
|
-
key: `title_${U.value}`,
|
|
206
|
-
config: {
|
|
207
|
-
title: {
|
|
208
|
-
cy: "relation-div-title",
|
|
209
|
-
...l.value.style.title
|
|
210
|
-
},
|
|
211
|
-
subtitle: {
|
|
212
|
-
cy: "relation-div-subtitle",
|
|
213
|
-
...l.value.style.title.subtitle
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}, null, 8, ["config"]))
|
|
217
|
-
], 512)) : f("", !0),
|
|
218
|
-
l.value.userOptions.show && F.value ? (n(), A(Ve, {
|
|
219
|
-
ref: "details",
|
|
220
|
-
key: `user_options_${M.value}`,
|
|
221
|
-
backgroundColor: l.value.style.backgroundColor,
|
|
222
|
-
color: l.value.style.color,
|
|
223
|
-
isPrinting: y(V),
|
|
224
|
-
isImaging: y(W),
|
|
225
|
-
uid: k.value,
|
|
226
|
-
hasPdf: l.value.userOptions.buttons.pdf,
|
|
227
|
-
hasImg: l.value.userOptions.buttons.img,
|
|
228
|
-
hasFullscreen: l.value.userOptions.buttons.img,
|
|
229
|
-
hasXls: !1,
|
|
230
|
-
isFullscreen: x.value,
|
|
231
|
-
titles: { ...l.value.userOptions.buttonTitles },
|
|
232
|
-
chartElement: _.value,
|
|
233
|
-
position: l.value.userOptions.position,
|
|
234
|
-
hasAnnotator: l.value.userOptions.buttons.annotator,
|
|
235
|
-
isAnnotation: b.value,
|
|
236
|
-
onToggleFullscreen: $e,
|
|
237
|
-
onGeneratePdf: y(X),
|
|
238
|
-
onGenerateImage: y(Y),
|
|
239
|
-
onToggleAnnotator: z
|
|
240
|
-
}, Pe({ _: 2 }, [
|
|
241
|
-
e.$slots.optionPdf ? {
|
|
242
|
-
name: "optionPdf",
|
|
243
|
-
fn: O(() => [
|
|
244
|
-
m(e.$slots, "optionPdf", {}, void 0, !0)
|
|
245
|
-
]),
|
|
246
|
-
key: "0"
|
|
247
|
-
} : void 0,
|
|
248
|
-
e.$slots.optionImg ? {
|
|
249
|
-
name: "optionImg",
|
|
250
|
-
fn: O(() => [
|
|
251
|
-
m(e.$slots, "optionImg", {}, void 0, !0)
|
|
252
|
-
]),
|
|
253
|
-
key: "1"
|
|
254
|
-
} : void 0,
|
|
255
|
-
e.$slots.optionFullscreen ? {
|
|
256
|
-
name: "optionFullscreen",
|
|
257
|
-
fn: O(({ toggleFullscreen: t, isFullscreen: s }) => [
|
|
258
|
-
m(e.$slots, "optionFullscreen", N(S({ toggleFullscreen: t, isFullscreen: s })), void 0, !0)
|
|
259
|
-
]),
|
|
260
|
-
key: "2"
|
|
261
|
-
} : void 0,
|
|
262
|
-
e.$slots.optionAnnotator ? {
|
|
263
|
-
name: "optionAnnotator",
|
|
264
|
-
fn: O(({ toggleAnnotator: t, isAnnotator: s }) => [
|
|
265
|
-
m(e.$slots, "optionAnnotator", N(S({ toggleAnnotator: t, isAnnotator: s })), void 0, !0)
|
|
266
|
-
]),
|
|
267
|
-
key: "3"
|
|
268
|
-
} : void 0
|
|
269
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : f("", !0),
|
|
270
|
-
F.value ? (n(), i("svg", {
|
|
271
|
-
key: 4,
|
|
272
|
-
xmlns: y(je),
|
|
273
|
-
class: R([{ "vue-data-ui-fullscreen--on": x.value, "vue-data-ui-fulscreen--off": !x.value }, "relation-circle"]),
|
|
274
|
-
viewBox: `0 0 ${u.value.width <= 0 ? 10 : u.value.width} ${u.value.height <= 0 ? 10 : u.value.height}`,
|
|
275
|
-
width: "100%",
|
|
276
|
-
style: "user-select:none; background:transparent"
|
|
277
|
-
}, [
|
|
278
|
-
Ie(Xe),
|
|
279
|
-
Fe("circle", {
|
|
280
|
-
cx: (u.value.width <= 0 ? 1e-4 : u.value.width) / 2,
|
|
281
|
-
cy: (u.value.height <= 0 ? 1e-4 : u.value.height) / 2 + l.value.style.circle.offsetY,
|
|
282
|
-
r: h.value <= 0 ? 1e-4 : h.value,
|
|
283
|
-
stroke: l.value.style.circle.stroke,
|
|
284
|
-
"stroke-width": l.value.style.circle.strokeWidth,
|
|
285
|
-
fill: "transparent",
|
|
286
|
-
class: "main-circle"
|
|
287
|
-
}, null, 8, Ke),
|
|
288
|
-
de.value ? (n(), i("g", Qe, [
|
|
289
|
-
(n(!0), i(P, null, I(p.value, (t, s) => (n(), i("path", {
|
|
290
|
-
key: `relation_${s}`,
|
|
291
|
-
style: C(ee(t)),
|
|
292
|
-
stroke: Z(t),
|
|
293
|
-
class: R(["relation", { "vue-ui-relation-circle-selected": o.value.hasOwnProperty("id") && v.value.includes(t.id) }]),
|
|
294
|
-
d: `M${t.x1},${t.y1} C${t.x1},${t.y1} ${u.value.width / 2},${u.value.height / 2 + l.value.style.circle.offsetY} ${t.x2},${t.y2}`,
|
|
295
|
-
fill: "none",
|
|
296
|
-
"stroke-width": le(t),
|
|
297
|
-
"stroke-linecap": "round"
|
|
298
|
-
}, null, 14, Ze))), 128))
|
|
299
|
-
])) : (n(), i("g", et, [
|
|
300
|
-
(n(!0), i(P, null, I(p.value, (t, s) => (n(), i("line", {
|
|
301
|
-
key: `relation_${s}`,
|
|
302
|
-
stroke: Z(t),
|
|
303
|
-
style: C(ee(t)),
|
|
304
|
-
x1: t.x1,
|
|
305
|
-
x2: t.x2,
|
|
306
|
-
y1: t.y1,
|
|
307
|
-
y2: t.y2,
|
|
308
|
-
class: R({ "vue-ui-relation-circle-selected": o.value.hasOwnProperty("id") && v.value.includes(t.id) }),
|
|
309
|
-
"stroke-linecap": "round"
|
|
310
|
-
}, null, 14, tt))), 128))
|
|
311
|
-
])),
|
|
312
|
-
(n(!0), i(P, null, I(g.value, (t, s) => (n(), i("text", {
|
|
313
|
-
key: `plot_text_${s}`,
|
|
314
|
-
"text-anchor": me(t),
|
|
315
|
-
transform: _e(t),
|
|
316
|
-
x: pe(t),
|
|
317
|
-
y: t.y + 5,
|
|
318
|
-
onClick: ($) => te(t),
|
|
319
|
-
class: "vue-ui-relation-circle-legend",
|
|
320
|
-
"transform-origin": "start",
|
|
321
|
-
"font-weight": o.value.id === t.id ? "900" : "400",
|
|
322
|
-
style: C(`font-family:${l.value.style.fontFamily};${ke(t)}`),
|
|
323
|
-
"font-size": l.value.style.labels.fontSize,
|
|
324
|
-
fill: l.value.style.labels.color
|
|
325
|
-
}, Te(t.label), 13, lt))), 128)),
|
|
326
|
-
(n(!0), i(P, null, I(g.value, (t, s) => (n(), i("circle", {
|
|
327
|
-
cx: t.x,
|
|
328
|
-
cy: t.y,
|
|
329
|
-
key: `plot_${s}`,
|
|
330
|
-
style: C(ye(t)),
|
|
331
|
-
class: "vue-ui-relation-circle-plot",
|
|
332
|
-
fill: l.value.style.plot.color,
|
|
333
|
-
onClick: ($) => te(t),
|
|
334
|
-
r: l.value.style.plot.radius
|
|
335
|
-
}, null, 12, nt))), 128)),
|
|
336
|
-
m(e.$slots, "svg", { svg: u.value }, void 0, !0)
|
|
337
|
-
], 10, Je)) : f("", !0),
|
|
338
|
-
e.$slots.watermark ? (n(), i("div", rt, [
|
|
339
|
-
m(e.$slots, "watermark", N(S({ isPrinting: y(V) || y(W) })), void 0, !0)
|
|
340
|
-
])) : f("", !0),
|
|
341
|
-
e.$slots.source ? (n(), i("div", {
|
|
342
|
-
key: 6,
|
|
343
|
-
ref_key: "source",
|
|
344
|
-
ref: B,
|
|
345
|
-
dir: "auto"
|
|
346
|
-
}, [
|
|
347
|
-
m(e.$slots, "source", {}, void 0, !0)
|
|
348
|
-
], 512)) : f("", !0),
|
|
349
|
-
F.value ? f("", !0) : (n(), A(We, {
|
|
350
|
-
key: 7,
|
|
351
|
-
config: {
|
|
352
|
-
type: "relationCircle",
|
|
353
|
-
style: {
|
|
354
|
-
backgroundColor: l.value.style.backgroundColor,
|
|
355
|
-
relationCircle: {
|
|
356
|
-
color: "#CCCCCC"
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}, null, 8, ["config"]))
|
|
361
|
-
], 12, He));
|
|
362
|
-
}
|
|
363
|
-
}, yt = /* @__PURE__ */ qe(st, [["__scopeId", "data-v-a4837ff7"]]);
|
|
364
|
-
export {
|
|
365
|
-
yt as default
|
|
366
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index--lHmCKjC.cjs"),U=require("./useResponsive-BJ7DTGpm.cjs"),de=require("./Title-RB80eFiD.cjs"),D=require("./usePrinter-BfuqGrO4.cjs"),ve=require("./vue-ui-skeleton-BGfzzQdU.cjs"),W=require("./useNestedProp-DLJc0s53.cjs"),fe=require("./PackageVersion-rf9gXZ-Q.cjs"),ge=require("./PenAndPaper-DS7gA4X0.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ye=["id"],he=["xmlns","viewBox"],ke=["cx","cy","r","stroke","stroke-width"],pe={key:0},Ce=["stroke","d","stroke-width"],_e={key:1},$e=["stroke","x1","x2","y1","y2"],xe=["text-anchor","transform","x","y","onClick","font-weight","font-size","fill"],we=["cx","cy","fill","onClick","r"],Be={key:5,class:"vue-data-ui-watermark"},be={__name:"vue-ui-relation-circle",props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},setup(X,{expose:Y}){const u=X;e.useCssVars(t=>({"47419f48":ee.value,"77774d27":Z.value,df46026e:te.value}));const{vue_ui_relation_circle:H}=i.useConfig(),C=e.computed(()=>!!u.dataset&&Object.keys(u.dataset).length),g=e.ref(i.createUid()),B=e.ref(0),m=e.ref(null),b=e.ref(null),P=e.ref(null),A=e.ref(null),O=e.ref(0),n=e.computed({get:()=>E(),set:t=>t});function E(){const t=W.useNestedProp({userConfig:u.config,defaultConfig:H});return t.theme?{...W.useNestedProp({userConfig:i.themes.vue_ui_relation_circle[t.theme]||u.config,defaultConfig:t}),customPalette:i.themePalettes[t.theme]||i.palette}:t}e.watch(()=>u.config,t=>{n.value=E(),T(),O.value+=1},{deep:!0});const{isPrinting:S,isImaging:I,generatePdf:N,generateImage:z}=D.usePrinter({elementId:`relation_circle_${g.value}`,fileName:n.value.style.title.text||"vue-ui-relation-circle"}),J=e.computed(()=>n.value.userOptions.show&&!n.value.style.title.text),F=e.computed(()=>i.convertCustomPalette(n.value.customPalette)),d=e.ref([]),f=e.ref([]),a=e.ref({}),c=e.ref([]),K=e.ref(0),_=e.computed(()=>u.dataset.slice(0,n.value.style.limit)),$=e.ref(n.value.style.size),s=e.ref({height:n.value.style.size,width:n.value.style.size}),v=e.computed({get(){return $.value*n.value.style.circle.radiusProportion},set(t){return t}}),Q=e.computed(()=>n.value.style.links.curved),Z=e.computed(()=>`${n.value.style.animation.speedMs}ms`),ee=e.computed(()=>v.value*2),te=e.computed(()=>v.value*4),h=e.ref(null);e.onMounted(()=>{T(),document.getElementById(`relation_circle_${g.value}`).addEventListener("click",L)});function T(){if(i.objectIsEmpty(u.dataset)?i.error({componentName:"VueUiRelationCircle",type:"dataset"}):u.dataset.forEach((t,r)=>{i.getMissingDatasetAttributes({datasetObject:t,requiredAttributes:["id","label","relations","weights"]}).forEach(l=>{i.error({componentName:"VueUiRelationCircle",type:"datasetSerieAttribute",property:l,index:r})})}),n.value.responsive){const t=U.throttle(()=>{const{width:r,height:l}=U.useResponsive({chart:m.value,title:n.value.style.title.text?b.value:null,source:P.value,noTitle:A.value});$.value=Math.min(r,l),s.value.width=r,s.value.height=l,v.value=$.value*n.value.style.circle.radiusProportion,d.value=[],f.value=[],V(),R()});h.value=new ResizeObserver(t),h.value.observe(m.value.parentNode)}else d.value=[],f.value=[],V(),R()}e.onBeforeUnmount(()=>{document.getElementById(`relation_circle_${g.value}`).removeEventListener("click",L),h.value&&h.value.disconnect()});function L(t){const r=t.target;r&&Array.from(r.classList).includes("vue-ui-user-options")||r&&Array.from(r.classList).includes("vue-ui-user-options-summary")||r&&Array.from(r.classList).includes("vue-data-ui-button")||r&&Array.from(r.classList).includes("vue-ui-relation-circle-legend")||(a.value={},c.value=[])}function V(){const t=6.28319/_.value.length,r=360/_.value.length;let l=0,o=0;_.value.forEach((y,w)=>{const ue=v.value*Math.cos(l)+s.value.width/2,ce=v.value*Math.sin(l)+s.value.height/2+n.value.style.circle.offsetY;d.value.push({x:ue,y:ce,...y,color:y.color?y.color:F.value[w]?F.value[w]:i.palette[w],regAngle:o}),l+=t,o+=r})}function R(){d.value.forEach(t=>{d.value.filter(l=>l.relations.includes(t.id)).forEach((l,o)=>{f.value.push({weight:t.weights&&t.weights[o]?t.weights[o]:1,relationId:`${t.id}_${l.id}`,x1:t.x,y1:t.y,x2:l.x,y2:l.y,colorSource:t.color,colorTarget:l.color,...t})})})}const le=e.computed(()=>Math.max(...f.value.map(t=>t.weight)));function ne(t){return Object.hasOwn(a.value,"x")?c.value.includes(t.id)?"opacity:1":"opacity:0.1":"opacity:1"}function q(t){return Object.hasOwn(a.value,"x")?t.colorTarget:t.colorSource}function M(t){return Object.hasOwn(a.value,"x")?c.value.includes(t.id)&&t.relationId===`${t.id}_${a.value.id}`||t.relationId===`${a.value.id}_${t.id}`?`opacity:1;stroke-width:${G(t)}`:"opacity: 0":"opacity: 1"}function re(t){return t.regAngle>90&&t.regAngle<270?"end":"start"}function oe(t){return t.regAngle>90&&t.regAngle<270?t.x-5:t.x+5}function ae(t){return Object.hasOwn(a.value,"x")?a.value.id===t.id||c.value.includes(t.id)?"opacity:1":"opacity:0.2":"opacity:1"}function se(t){return t.regAngle>90&&t.regAngle<270?`rotate(${t.regAngle+180},${t.x},${t.y})`:`rotate(${t.regAngle},${t.x},${t.y})`}function j(t){K.value=360-t.regAngle,a.value.id&&t.id===a.value.id?(a.value={},c.value=[]):(a.value=t,c.value=[...t.relations])}function G(t){return t.weight/le.value*n.value.style.links.maxWidth}const k=e.ref(!1);function ie(t){k.value=t,B.value+=1}const p=e.ref(!1);function x(){p.value=!p.value}return Y({generatePdf:N,generateImage:z,toggleAnnotator:x}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"relationCircleChart",ref:m,class:"vue-ui-relation-circle",style:e.normalizeStyle(`width:100%;background:${n.value.style.backgroundColor};text-align:center;${n.value.responsive?"height: 100%":""}`),id:`relation_circle_${g.value}`},[n.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ge.PenAndPaper,{key:0,parent:m.value,backgroundColor:n.value.style.backgroundColor,color:n.value.style.color,active:p.value,onClose:x},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),J.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:A,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),n.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:b,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(de._sfc_main,{key:`title_${O.value}`,config:{title:{cy:"relation-div-title",...n.value.style.title},subtitle:{cy:"relation-div-subtitle",...n.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),n.value.userOptions.show&&C.value?(e.openBlock(),e.createBlock(D.UserOptions,{ref:"details",key:`user_options_${B.value}`,backgroundColor:n.value.style.backgroundColor,color:n.value.style.color,isPrinting:e.unref(S),isImaging:e.unref(I),uid:g.value,hasPdf:n.value.userOptions.buttons.pdf,hasImg:n.value.userOptions.buttons.img,hasFullscreen:n.value.userOptions.buttons.img,hasXls:!1,isFullscreen:k.value,titles:{...n.value.userOptions.buttonTitles},chartElement:m.value,position:n.value.userOptions.position,hasAnnotator:n.value.userOptions.buttons.annotator,isAnnotation:p.value,onToggleFullscreen:ie,onGeneratePdf:e.unref(N),onGenerateImage:e.unref(z),onToggleAnnotator:x},e.createSlots({_:2},[t.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,t.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"optionImg",{},void 0,!0)]),key:"1"}:void 0,t.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:o})=>[e.renderSlot(t.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:o})),void 0,!0)]),key:"2"}:void 0,t.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:o})=>[e.renderSlot(t.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:o})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(i.XMLNS),class:e.normalizeClass([{"vue-data-ui-fullscreen--on":k.value,"vue-data-ui-fulscreen--off":!k.value},"relation-circle"]),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,width:"100%",style:"user-select:none; background:transparent"},[e.createVNode(fe._sfc_main),e.createElementVNode("circle",{cx:(s.value.width<=0?1e-4:s.value.width)/2,cy:(s.value.height<=0?1e-4:s.value.height)/2+n.value.style.circle.offsetY,r:v.value<=0?1e-4:v.value,stroke:n.value.style.circle.stroke,"stroke-width":n.value.style.circle.strokeWidth,fill:"transparent",class:"main-circle"},null,8,ke),Q.value?(e.openBlock(),e.createElementBlock("g",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("path",{key:`relation_${o}`,style:e.normalizeStyle(M(l)),stroke:q(l),class:e.normalizeClass(["relation",{"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&c.value.includes(l.id)}]),d:`M${l.x1},${l.y1} C${l.x1},${l.y1} ${s.value.width/2},${s.value.height/2+n.value.style.circle.offsetY} ${l.x2},${l.y2}`,fill:"none","stroke-width":G(l),"stroke-linecap":"round"},null,14,Ce))),128))])):(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(l,o)=>(e.openBlock(),e.createElementBlock("line",{key:`relation_${o}`,stroke:q(l),style:e.normalizeStyle(M(l)),x1:l.x1,x2:l.x2,y1:l.y1,y2:l.y2,class:e.normalizeClass({"vue-ui-relation-circle-selected":a.value.hasOwnProperty("id")&&c.value.includes(l.id)}),"stroke-linecap":"round"},null,14,$e))),128))])),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("text",{key:`plot_text_${o}`,"text-anchor":re(l),transform:se(l),x:oe(l),y:l.y+5,onClick:y=>j(l),class:"vue-ui-relation-circle-legend","transform-origin":"start","font-weight":a.value.id===l.id?"900":"400",style:e.normalizeStyle(`font-family:${n.value.style.fontFamily};${ae(l)}`),"font-size":n.value.style.labels.fontSize,fill:n.value.style.labels.color},e.toDisplayString(l.label),13,xe))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(l,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,key:`plot_${o}`,style:e.normalizeStyle(ne(l)),class:"vue-ui-relation-circle-plot",fill:n.value.style.plot.color,onClick:y=>j(l),r:n.value.style.plot.radius},null,12,we))),128)),e.renderSlot(t.$slots,"svg",{svg:s.value},void 0,!0)],10,he)):e.createCommentVNode("",!0),t.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(t.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(S)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),t.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:6,ref_key:"source",ref:P,dir:"auto"},[e.renderSlot(t.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ve.default,{key:7,config:{type:"relationCircle",style:{backgroundColor:n.value.style.backgroundColor,relationCircle:{color:"#CCCCCC"}}}},null,8,["config"]))],12,ye))}},Pe=me._export_sfc(be,[["__scopeId","data-v-a4837ff7"]]);exports.default=Pe;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index--lHmCKjC.cjs"),Z=require("./useResponsive-BJ7DTGpm.cjs"),ge=require("./Title-RB80eFiD.cjs"),ee=require("./usePrinter-BfuqGrO4.cjs"),fe=require("./Tooltip-BC1YZMi2.cjs"),me=require("./DataTable-BB87HJ5b.cjs"),ye=require("./Legend-D2Yi-COI.cjs"),be=require("./vue-ui-skeleton-BGfzzQdU.cjs"),ke=require("./vue-ui-accordion-ClQObElI.cjs"),te=require("./useNestedProp-DLJc0s53.cjs"),Ce=require("./PackageVersion-rf9gXZ-Q.cjs"),we=require("./PenAndPaper-DS7gA4X0.cjs"),Te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),xe=["id"],Ne=["xmlns","viewBox"],$e=["id"],Se=["stop-color"],Be=["stop-color"],Pe=["stroke","cx","cy","r","fill"],_e=["stroke","stroke-width","cx","cy","r","fill"],Le=["cx","cy","r","onMouseenter"],Ve={key:5,class:"vue-data-ui-watermark"},Ee=["onClick"],Ae={key:0},Oe={key:1},ze=["innerHTML"],Fe={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(oe,{expose:le,emit:ae}){const v=oe,{vue_ui_rings:re}=r.useConfig(),b=e.ref(!1),T=e.computed(()=>!!v.dataset&&v.dataset.length),k=e.ref(r.createUid()),ne=e.ref(null),x=e.ref(!1),P=e.ref(""),m=e.ref(null),E=e.ref(0),y=e.ref(null),A=e.ref(null),O=e.ref(null),z=e.ref(null),F=e.ref(null),I=e.ref(0),R=e.ref(0),M=e.ref(0),t=e.computed({get:()=>q(),set:o=>o});function q(){const o=te.useNestedProp({userConfig:v.config,defaultConfig:re});return o.theme?{...te.useNestedProp({userConfig:r.themes.vue_ui_rings[o.theme]||v.config,defaultConfig:o}),customPalette:r.themePalettes[o.theme]||r.palette}:o}e.watch(()=>v.config,o=>{t.value=q(),D(),I.value+=1,R.value+=1,M.value+=1},{deep:!0});const N=e.ref(null);e.onMounted(()=>{D()});function D(){if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((o,a)=>{o.values.length||r.error({componentName:"VueUiRings",type:"dataset"}),r.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values"]}).forEach(l=>{r.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:l,index:a})})}),t.value.responsive){const o=Z.throttle(()=>{const{width:a,height:l}=Z.useResponsive({chart:y.value,title:t.value.style.chart.title.text?A.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:z.value,noTitle:F.value});s.value.width=a,s.value.height=l});N.value=new ResizeObserver(o),N.value.observe(y.value.parentNode)}setTimeout(()=>{b.value=!0},600)}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:U,isImaging:H,generatePdf:W,generateImage:G}=ee.usePrinter({elementId:`rings_${k.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),ue=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),j=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),se=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function _(o){i.value.includes(o)?i.value=i.value.filter(a=>a!==o):i.value.push(o),ae("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const ie=e.computed(()=>Math.max(...$.value.filter(o=>!i.value.includes(o.uid)).map(({value:o})=>o)));function X(o){return o/ie.value}const $=e.computed(()=>v.dataset.map(({values:o,name:a,color:l=null},n)=>{const u=r.sanitizeArray(o).reduce((h,w)=>h+w,0);return{name:a,color:l||r.convertColorToHex(l)||j.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,he)=>w+he,0)).reduce((h,w)=>h+w,0),uid:r.createUid()}})),Y=e.computed(()=>$.value.map(o=>({...o,shape:"circle",opacity:i.value.includes(o.uid)?.5:1,segregate:()=>_(o.uid),isSegregated:i.value.includes(o.uid)})).toSorted((o,a)=>a.value-o.value)),ce=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>$.value.filter(o=>!i.value.includes(o.uid)).map(({value:o})=>o).reduce((o,a)=>o+a,0)),c=e.computed(()=>$.value.filter(o=>!i.value.includes(o.uid)).map(({name:o,value:a,color:l=null,uid:n},u)=>({uid:n,name:o,color:l||r.convertColorToHex(l)||j.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:a,proportion:X(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*X(a)})).toSorted((o,a)=>a.value-o.value));function de(){return c.value.map(({name:o,color:a,value:l,absoluteValues:n,percentage:u})=>({name:o,color:a,value:l,absoluteValues:n,percentage:u}))}const d=e.computed(()=>se.value-t.value.style.chart.layout.rings.strokeWidth*2),L=e.ref(null);function ve(o,a){if(i.value.length===v.dataset.length)return;L.value={datapoint:a,seriesIndex:o,series:c.value,config:t.value},m.value=o;const l=c.value[o],n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:a,series:c.value,config:t.value})))P.value=n({seriesIndex:o,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:o})}
|
|
2
|
-
</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:l.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:l.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),P.value=u}x.value=!0}const f=e.computed(()=>{const o=c.value.map(l=>({name:l.name,color:l.color})),a=c.value.map(l=>l.value);return{head:o,body:a}}),S=e.computed(()=>{const o=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),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},n=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:o,body:a,config:l,colNames:n}});function J(){e.nextTick(()=>{const o=f.value.head.map((n,u)=>[[n.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(o),l=r.createCsvContent(a);r.downloadCsv({csvContent:l,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function pe(o){C.value=o,E.value+=1}function K(){g.value.showTable=!g.value.showTable}function Q(){g.value.showTooltip=!g.value.showTooltip}const B=e.ref(!1);function V(){B.value=!B.value}return le({getData:de,generatePdf:W,generateCsv:J,generateImage:G,toggleTable:K,toggleTooltip:Q,toggleAnnotator:V}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:y,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${k.value}`,onMouseleave:a[3]||(a[3]=l=>{m.value=null,x.value=!1})},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(we.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:B.value,onClose:V},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ue.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:F,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:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(ge._sfc_main,{key:`title_${I.value}`,config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&T.value?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:ne,key:`user_options_${E.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(U),isImaging:e.unref(H),uid:k.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:pe,onGeneratePdf:e.unref(W),onGenerateCsv:J,onGenerateImage:e.unref(G),onToggleTable:K,onToggleTooltip:Q,onToggleAnnotator:V},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:n})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,o.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(o.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ce._sfc_main),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${k.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(l.color,.05),100-t.value.style.chart.layout.rings.gradient.intensity)},null,8,Se),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Be)],8,$e))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*l.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*l.proportion/2*.9<=0?1e-4:d.value*l.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,Pe),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":b.value&&t.value.useCssAnimation,"vue-rings-item-onload":!b.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":l.strokeWidth<.5?.5:l.strokeWidth,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*l.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*l.proportion/2*.9<=0?1e-4:d.value*l.proportion/2*.9),fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${k.value}_${n})`:l.color},null,14,_e),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*l.proportion/2-2*(n+1),r:e.unref(r.checkNaN)(d.value*l.proportion/2*.9<=0?1e-4:d.value*l.proportion/2*.9),fill:"transparent",onMouseenter:u=>ve(n,l),onMouseleave:a[0]||(a[0]=u=>{m.value=null,x.value=!1})},null,40,Le)]))),256)),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,Ne)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ve,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(U)||e.unref(H)})),void 0,!0)])):e.createCommentVNode("",!0),T.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(be.default,{key:6,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ye.Legend,{key:`legend_${M.value}`,legendSet:Y.value,config:ce.value,onClickMarker:a[1]||(a[1]=({legend:l})=>_(l.uid))},{item:e.withCtx(({legend:l,index:n})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>_(l.uid),style:e.normalizeStyle(`opacity:${i.value.includes(l.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:l,seriesIndex:n}))+" ",1),i.value.includes(l.uid)?(e.openBlock(),e.createElementBlock("span",Oe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Ae," ("+e.toDisplayString(isNaN(l.value/p.value)?"-":e.unref(r.dataLabel)({v:l.value/p.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ee)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:Y.value},void 0,!0)],512),o.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:z,dir:"auto"},[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(fe._sfc_main,{show:g.value.showTooltip&&x.value&&i.value.length<v.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:y.value,content:P.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({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),T.value?(e.openBlock(),e.createBlock(ke.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(me.DataTable,{key:`table_${R.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>g.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createElementVNode("div",{innerHTML:l,style:{display:"flex","align-items":"center"}},null,8,ze)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l.name||l),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,xe))}},Ie=Te._export_sfc(Fe,[["__scopeId","data-v-2a4f4cb4"]]);exports.default=Ie;
|