vue-data-ui 2.3.60 → 2.3.62
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-BJ47KXjY.js → Arrow-Dho8ylDy.js} +1 -1
- package/dist/{Arrow-VxZlHkwt.cjs → Arrow-ov-EIAPu.cjs} +1 -1
- package/dist/{BaseIcon-Bv5uh10R.cjs → BaseIcon-B6v-Txn-.cjs} +1 -1
- package/dist/{BaseIcon-Fm7sUbd2.js → BaseIcon-BNStcP8c.js} +1 -1
- package/dist/{DataTable-1VV0us-8.js → DataTable-luIjNnne.js} +2 -2
- package/dist/{DataTable-CPAt686N.cjs → DataTable-yf_eyv8c.cjs} +1 -1
- package/dist/{Legend-BJ2Mynop.cjs → Legend-6JY5pUsT.cjs} +1 -1
- package/dist/{Legend-DB6v_LvZ.js → Legend-B9dawQa7.js} +1 -1
- package/dist/{Shape-DWZSJJ6-.cjs → Shape-BoXM3HKY.cjs} +1 -1
- package/dist/{Shape-B_f1_6Ob.js → Shape-BsAETTif.js} +1 -1
- package/dist/Slicer-DoMAeSUY.cjs +1 -0
- package/dist/{Slicer-CHiUxRAh.js → Slicer-iGmqxtRQ.js} +51 -54
- package/dist/{Title-CR-JDJwq.cjs → Title-CBcoQe02.cjs} +1 -1
- package/dist/{Title-xP0rAF4q.js → Title-fb3BzoXj.js} +1 -1
- package/dist/{Tooltip-B4DNihSF.cjs → Tooltip-BhuD1Kc5.cjs} +1 -1
- package/dist/{Tooltip-DfBa_7Ur.js → Tooltip-CBugtvWB.js} +5 -5
- package/dist/{index-CpHoINpJ.js → index-BshV7sX1.js} +538 -515
- package/dist/{index-CDK3omwG.cjs → index-D2ZScauW.cjs} +4 -4
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-BOjw3Yqn.js → useNestedProp-B235bkr5.js} +1 -1
- package/dist/{useNestedProp-CaaW8JIS.cjs → useNestedProp-BU7yyXFA.cjs} +1 -1
- package/dist/{usePrinter-BHy-mfVg.js → usePrinter-Culo-aKo.js} +1 -1
- package/dist/{usePrinter-vQu-8tRD.cjs → usePrinter-eqT4IYET.cjs} +1 -1
- package/dist/{vue-data-ui-Ccdrn4OV.cjs → vue-data-ui-B7ebF4_E.cjs} +1 -1
- package/dist/{vue-data-ui-Dcg7DPMn.js → vue-data-ui-aJ6K70wA.js} +57 -57
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +7 -7
- package/dist/{vue-ui-3d-bar-BqtnNU7h.js → vue-ui-3d-bar-BYgxIW27.js} +7 -7
- package/dist/{vue-ui-3d-bar-DdBlV5AX.cjs → vue-ui-3d-bar-DFv8qpsI.cjs} +1 -1
- package/dist/{vue-ui-accordion-BZloYo0L.js → vue-ui-accordion-B6AxEnAr.js} +3 -3
- package/dist/{vue-ui-accordion-EVAolVkD.cjs → vue-ui-accordion-BhCJcWDd.cjs} +1 -1
- package/dist/vue-ui-age-pyramid-BBRjCRtS.cjs +1 -0
- package/dist/{vue-ui-age-pyramid-CTxkOn4v.js → vue-ui-age-pyramid-yZrvdnPP.js} +226 -226
- package/dist/{vue-ui-annotator-D_AK0JCi.cjs → vue-ui-annotator-CEVmAufb.cjs} +1 -1
- package/dist/{vue-ui-annotator-BDWKiQ6S.js → vue-ui-annotator-ZKUlOqUq.js} +1 -1
- package/dist/{vue-ui-candlestick-CIKgu0F2.cjs → vue-ui-candlestick-CUNLZRIM.cjs} +2 -2
- package/dist/{vue-ui-candlestick-ByA9FGZb.js → vue-ui-candlestick-De4WgpPk.js} +158 -158
- package/dist/{vue-ui-carousel-table-ez9gbOZ7.cjs → vue-ui-carousel-table-C968uL6J.cjs} +1 -1
- package/dist/{vue-ui-carousel-table-BnYxbq5A.js → vue-ui-carousel-table-DJ0AWPea.js} +4 -4
- package/dist/{vue-ui-chestnut-BumsSmCv.js → vue-ui-chestnut-Cl0UKWsI.js} +65 -64
- package/dist/{vue-ui-chestnut-CnYqa2Fx.cjs → vue-ui-chestnut-DmjmL02K.cjs} +3 -3
- package/dist/{vue-ui-cursor-D-4-MMw7.js → vue-ui-cursor-BWyE3tgm.js} +2 -2
- package/dist/{vue-ui-cursor-Drl8jibt.cjs → vue-ui-cursor-D5XEblLW.cjs} +1 -1
- package/dist/{vue-ui-dashboard-CX0jA181.cjs → vue-ui-dashboard-BJLi81kg.cjs} +1 -1
- package/dist/{vue-ui-dashboard-B_iV-3hq.js → vue-ui-dashboard-D9dQIIti.js} +2 -2
- package/dist/{vue-ui-digits-DMhl9plv.js → vue-ui-digits-DkYpomD9.js} +2 -2
- package/dist/{vue-ui-digits-RAZl_4Kb.cjs → vue-ui-digits-IIiSTczs.cjs} +1 -1
- package/dist/{vue-ui-donut-BG28U01c.cjs → vue-ui-donut-Bq66xmG0.cjs} +1 -1
- package/dist/{vue-ui-donut-evolution-DPU-Nd8y.js → vue-ui-donut-evolution-Bto1ZaWx.js} +95 -95
- package/dist/vue-ui-donut-evolution-CNVUtEEk.cjs +1 -0
- package/dist/{vue-ui-donut-BpQC9-Uz.js → vue-ui-donut-uujhj36t.js} +42 -42
- package/dist/vue-ui-dumbbell-CLNVYG0j.cjs +9 -0
- package/dist/{vue-ui-dumbbell-C4JnuC1b.js → vue-ui-dumbbell-D6Xyfvff.js} +72 -72
- package/dist/vue-ui-flow-BwrqexSU.cjs +1 -0
- package/dist/vue-ui-flow-Cg4oKZz8.js +469 -0
- package/dist/{vue-ui-galaxy-148JtEdK.js → vue-ui-galaxy-D_s9dfYN.js} +91 -91
- package/dist/vue-ui-galaxy-DixlciaO.cjs +1 -0
- package/dist/{vue-ui-gauge-DOJ98R_N.js → vue-ui-gauge-DGQVW6UO.js} +84 -84
- package/dist/vue-ui-gauge-Jse5ZYyj.cjs +1 -0
- package/dist/{vue-ui-gizmo-KeWvd226.js → vue-ui-gizmo-DDTaLaSI.js} +2 -2
- package/dist/{vue-ui-gizmo-a6WNWyf7.cjs → vue-ui-gizmo-sgq75uBG.cjs} +1 -1
- package/dist/vue-ui-heatmap-4-gnNgQ_.cjs +1 -0
- package/dist/{vue-ui-heatmap-BGsSOTPJ.js → vue-ui-heatmap-Dvd5ZGVw.js} +257 -239
- package/dist/{vue-ui-kpi-Dhah6Fgx.cjs → vue-ui-kpi-Co1WqN3k.cjs} +1 -1
- package/dist/{vue-ui-kpi-Leb1rK38.js → vue-ui-kpi-aLwUkIjv.js} +3 -3
- package/dist/{vue-ui-mini-loader-BLH4ncUB.js → vue-ui-mini-loader-Bm2xpTIh.js} +2 -2
- package/dist/{vue-ui-mini-loader-Dpa9uYkn.cjs → vue-ui-mini-loader-D98KCpoT.cjs} +1 -1
- package/dist/{vue-ui-molecule-DjvOvDUa.cjs → vue-ui-molecule-C3-9ojnv.cjs} +1 -1
- package/dist/{vue-ui-molecule-DuPAOQcj.js → vue-ui-molecule-Dv4hYPVd.js} +20 -20
- package/dist/{vue-ui-mood-radar-AOHK6R10.cjs → vue-ui-mood-radar-Dh3Q2NiI.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-BmcIz0JR.js → vue-ui-mood-radar-DsIPsXTh.js} +9 -9
- package/dist/{vue-ui-nested-donuts-CMmcmAd9.cjs → vue-ui-nested-donuts-CFC8tyGY.cjs} +2 -2
- package/dist/{vue-ui-nested-donuts-BYLc86qs.js → vue-ui-nested-donuts-CZ9vcclX.js} +120 -120
- package/dist/{vue-ui-onion-BjG8xbMh.cjs → vue-ui-onion-BLV33CBr.cjs} +1 -1
- package/dist/{vue-ui-onion-shZ4g9mJ.js → vue-ui-onion-CI9ARfRM.js} +9 -9
- package/dist/{vue-ui-parallel-coordinate-plot-O7lS6u2q.cjs → vue-ui-parallel-coordinate-plot-CIhpHeCI.cjs} +1 -1
- package/dist/{vue-ui-parallel-coordinate-plot-wv0O9t7U.js → vue-ui-parallel-coordinate-plot-CxzFJuza.js} +69 -69
- package/dist/{vue-ui-quadrant-CuB8sYgF.cjs → vue-ui-quadrant-CS3LAiCu.cjs} +1 -1
- package/dist/{vue-ui-quadrant-BRF5Czj4.js → vue-ui-quadrant-DenUcNcS.js} +36 -36
- package/dist/{vue-ui-quick-chart-BQdUHrm2.js → vue-ui-quick-chart-BdpKv0ES.js} +549 -515
- package/dist/vue-ui-quick-chart-UxaO0jzI.cjs +15 -0
- package/dist/vue-ui-radar-CQ-LymAS.cjs +1 -0
- package/dist/{vue-ui-radar-CLUs0tD9.js → vue-ui-radar-Dd24aGwh.js} +59 -59
- package/dist/{vue-ui-rating-Dcy1l1PB.js → vue-ui-rating-CQWK2lk1.js} +9 -9
- package/dist/{vue-ui-rating-CA25nHJe.cjs → vue-ui-rating-DTuDjrt8.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-DC-RFa9X.js → vue-ui-relation-circle-BcOzK8Iz.js} +5 -5
- package/dist/{vue-ui-relation-circle-Drr6Gdnq.cjs → vue-ui-relation-circle-DMhNCwpg.cjs} +1 -1
- package/dist/vue-ui-rings--pu1fIcl.cjs +2 -0
- package/dist/{vue-ui-rings-DbPbelCU.js → vue-ui-rings-yyFx2W1b.js} +188 -185
- package/dist/{vue-ui-scatter-D2jYZ4Wu.js → vue-ui-scatter-BV4sXNqz.js} +378 -375
- package/dist/{vue-ui-scatter-xyLvaw0d.cjs → vue-ui-scatter-CrmsJjjl.cjs} +1 -1
- package/dist/{vue-ui-screenshot-DXCBzrPZ.js → vue-ui-screenshot-C6wYv3cc.js} +6 -6
- package/dist/{vue-ui-screenshot-DGqjaE1x.cjs → vue-ui-screenshot-eoAWixSo.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DuM6yey6.js → vue-ui-skeleton-7qakoAGH.js} +23 -23
- package/dist/{vue-ui-skeleton-DRDC3yxK.cjs → vue-ui-skeleton-BLhbQje-.cjs} +1 -1
- package/dist/{vue-ui-smiley-DQrvx_S9.js → vue-ui-smiley-DG3_ORXA.js} +2 -2
- package/dist/{vue-ui-smiley-BCmY1siL.cjs → vue-ui-smiley-sS92V85O.cjs} +1 -1
- package/dist/vue-ui-spark-trend-C9Ii4Ue5.cjs +1 -0
- package/dist/vue-ui-spark-trend-D8_rEspZ.js +251 -0
- package/dist/{vue-ui-sparkbar-C_vNsxM_.cjs → vue-ui-sparkbar-CQz9GWxh.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-DiU5Yt-V.js → vue-ui-sparkbar-DuNNnbs9.js} +3 -3
- package/dist/{vue-ui-sparkgauge-BnF9Vbs0.js → vue-ui-sparkgauge-Buo2ms6b.js} +64 -64
- package/dist/vue-ui-sparkgauge-Dxsnkehz.cjs +1 -0
- package/dist/{vue-ui-sparkhistogram-BUBwn9A4.cjs → vue-ui-sparkhistogram-Cw-w_Rhv.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CsOfCo_3.js → vue-ui-sparkhistogram-edeeQ1HN.js} +4 -4
- package/dist/{vue-ui-sparkline-CoUeD8Np.cjs → vue-ui-sparkline-Cyddej9t.cjs} +1 -1
- package/dist/{vue-ui-sparkline-B628G3Nl.js → vue-ui-sparkline-DGIqGoR2.js} +25 -25
- package/dist/{vue-ui-sparkstackbar-Cr-Q7uDo.cjs → vue-ui-sparkstackbar-DN0XiDpQ.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-DIHGbrF5.js → vue-ui-sparkstackbar-G7Ojd39B.js} +3 -3
- package/dist/{vue-ui-stackbar-DCbJhdZy.js → vue-ui-stackbar-CfK9lv_E.js} +35 -35
- package/dist/{vue-ui-stackbar-DMyP3IRK.cjs → vue-ui-stackbar-kiZ9J1eh.cjs} +1 -1
- package/dist/vue-ui-strip-plot-Bd4NwUia.cjs +1 -0
- package/dist/{vue-ui-strip-plot-CNb3VtYF.js → vue-ui-strip-plot-d-bNHZDG.js} +64 -64
- package/dist/{vue-ui-table-CjuXpy2d.cjs → vue-ui-table-ChORiy2h.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-D6px_Z1a.cjs → vue-ui-table-heatmap-BcA1TmV1.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-nbBDuSiw.js → vue-ui-table-heatmap-BcPqaYXz.js} +26 -26
- package/dist/{vue-ui-table-BqcI8E7E.js → vue-ui-table-ipCsGZPx.js} +1 -1
- package/dist/{vue-ui-table-sparkline-Blbaz2zX.js → vue-ui-table-sparkline-BwwiWOX_.js} +13 -13
- package/dist/{vue-ui-table-sparkline-CqNPx5Zw.cjs → vue-ui-table-sparkline-dXyBTv6X.cjs} +1 -1
- package/dist/vue-ui-thermometer-DpWtOskJ.cjs +1 -0
- package/dist/{vue-ui-thermometer-BCGHbgj9.js → vue-ui-thermometer-U5IIot6j.js} +116 -116
- package/dist/{vue-ui-timer-BjqbxjQO.cjs → vue-ui-timer-DqVQjRdU.cjs} +1 -1
- package/dist/{vue-ui-timer-DhpBvc_5.js → vue-ui-timer-cCfNkOpe.js} +4 -4
- package/dist/{vue-ui-tiremarks-CNhB7Iqe.js → vue-ui-tiremarks-BcXrnO0N.js} +71 -71
- package/dist/vue-ui-tiremarks-C8pNPR_E.cjs +1 -0
- package/dist/vue-ui-treemap-24TuOX-H.cjs +1 -0
- package/dist/{vue-ui-treemap-C4memkYu.js → vue-ui-treemap-CVCaxcwW.js} +89 -82
- package/dist/{vue-ui-vertical-bar-LZ-GMZ2T.js → vue-ui-vertical-bar-Cuz2Qxi6.js} +246 -242
- package/dist/vue-ui-vertical-bar-kZxc3vG5.cjs +4 -0
- package/dist/{vue-ui-waffle-Cd4IU62n.js → vue-ui-waffle-BVFZf7mm.js} +44 -44
- package/dist/{vue-ui-waffle-CtY5CSX9.cjs → vue-ui-waffle-X-mNfs6F.cjs} +1 -1
- package/dist/{vue-ui-wheel-Do3pWPFB.cjs → vue-ui-wheel-CWOh-9CT.cjs} +1 -1
- package/dist/{vue-ui-wheel-CaEAQhJt.js → vue-ui-wheel-SUtbKs4l.js} +5 -5
- package/dist/vue-ui-word-cloud-BE_jkp2h.cjs +1 -0
- package/dist/{vue-ui-word-cloud-BSalPYqO.js → vue-ui-word-cloud-DAa0far7.js} +68 -65
- package/dist/vue-ui-xy-BTocPMsA.cjs +3 -0
- package/dist/{vue-ui-xy-C7tpVpGu.js → vue-ui-xy-B_dmMYPU.js} +82 -82
- package/dist/vue-ui-xy-canvas-BtuD8xjy.cjs +9 -0
- package/dist/{vue-ui-xy-canvas-rHcYmvec.js → vue-ui-xy-canvas-jq1j84oA.js} +122 -121
- package/package.json +1 -1
- package/dist/Slicer-PPS43jOo.cjs +0 -1
- package/dist/vue-ui-age-pyramid-Ce3DbeqC.cjs +0 -1
- package/dist/vue-ui-donut-evolution-BWvrYKlH.cjs +0 -1
- package/dist/vue-ui-dumbbell-2Lsks-8o.cjs +0 -9
- package/dist/vue-ui-flow-DBhdVKxF.cjs +0 -1
- package/dist/vue-ui-flow-DSdWqWgh.js +0 -465
- package/dist/vue-ui-galaxy-BMsdd9Rh.cjs +0 -1
- package/dist/vue-ui-gauge-fVk9B_1W.cjs +0 -1
- package/dist/vue-ui-heatmap-DFpSo2gr.cjs +0 -1
- package/dist/vue-ui-quick-chart-DsVFRO68.cjs +0 -15
- package/dist/vue-ui-radar-lcS6n5TC.cjs +0 -1
- package/dist/vue-ui-rings-DxqSAs9h.cjs +0 -2
- package/dist/vue-ui-spark-trend-B9PR0wxN.js +0 -251
- package/dist/vue-ui-spark-trend-Kj1bJmBL.cjs +0 -1
- package/dist/vue-ui-sparkgauge-SlYA1lqc.cjs +0 -1
- package/dist/vue-ui-strip-plot-Da_TQpOq.cjs +0 -1
- package/dist/vue-ui-thermometer-coTC0T6k.cjs +0 -1
- package/dist/vue-ui-tiremarks-DgbTo_Cb.cjs +0 -1
- package/dist/vue-ui-treemap-B5moKzuO.cjs +0 -1
- package/dist/vue-ui-vertical-bar-DtkGW5Tk.cjs +0 -4
- package/dist/vue-ui-word-cloud-pzaBe3Et.cjs +0 -1
- package/dist/vue-ui-xy-BgLF5ZNP.cjs +0 -3
- package/dist/vue-ui-xy-canvas-OuDGiOOW.cjs +0 -9
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-CDK3omwG.cjs"),pe=require("./useResponsive-B3TrDDIG.cjs"),ae=require("./BaseIcon-Bv5uh10R.cjs"),ze=require("./Tooltip-B4DNihSF.cjs"),ke=require("./usePrinter-vQu-8tRD.cjs"),Ne=require("./Slicer-PPS43jOo.cjs"),ge=require("./useNestedProp-CaaW8JIS.cjs"),Ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),S={LINE:"LINE",BAR:"BAR",DONUT:"DONUT"},Fe=["SERIE","SERIES","DATA","VALUE","VALUES","NUM"];function $e({dataset:u,barLineSwitch:b=6}){let h=null,_=null,N=0;if((typeof u=="number"||typeof u=="string")&&console.warn(`The provided dataset (${u}) is not sufficient to build a chart`),Z(u)&&(P(u)&&(u.length<b?h=S.BAR:h=S.LINE,_=u,N=u.length),oe(u))){if(!Te(u))return console.warn("The objects in the dataset array have a different data structure. Either keys or value types are different."),!1;const M=Object.keys(u[0]),W=Object.values(u[0]);if(!M.some(w=>Re(w)))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;ye(W,w=>typeof w=="number")&&(h=S.DONUT,_=u),ye(W,w=>Array.isArray(w)&&P(w))&&(xe(u)>b?h=S.LINE:h=S.BAR,N=xe(u),_=u.map(w=>({...w,data:Oe(w,$=>P($))}))),u=u.map(w=>Se(w)),_=_.map(w=>Se(w))}return Z(u)&&[...new Set(u.flatMap(M=>Array.isArray(M)))][0],{dataset:u,type:h,usableDataset:_,maxSeriesLength:N}}function be(u){return!u||Z(u)&&!u.length}function Z(u){return Array.isArray(u)}function P(u){if(!Z(u)||be(u))return!1;const b=u.map(h=>Number(h));return![...new Set(b.flatMap(h=>typeof h=="number"&&!isNaN(h)))].includes(!1)}function oe(u){return!Z(u)||be(u)||!![...new Set(u.flatMap(h=>typeof h=="object"&&!Array.isArray(h)))].includes(!1)?!1:!u.map(h=>Object.keys(h).length>0).includes(!1)}function Pe(u,b){const h=Object.keys(u).sort(),_=Object.keys(b).sort();if(h.length!==_.length)return!1;for(let N=0;N<h.length;N+=1){const F=h[N],I=_[N];if(F!==I||typeof u[F]!=typeof b[I])return!1}return!0}function Te(u){if(u.length<=1)return!0;for(let b=0;b<u.length;b+=1)for(let h=b+1;h<u.length;h+=1)if(!Pe(u[b],u[h]))return!1;return!0}function Re(u){return Fe.includes(u.toUpperCase())}function ye(u,b){let h=[];for(let _=0;_<u.length;_+=1)h.push(b(u[_]));return h.includes(!0)}function xe(u){return Math.max(...[...u].flatMap(b=>Object.values(b).filter(h=>P(h)).map(h=>h.length)))}function Oe(u,b){return Object.values(u).filter(h=>b(h))[0]}function Se(u){const b={};for(let h in u)u.hasOwnProperty(h)&&(b[h.toUpperCase()]=u[h]);return b}const Be=u=>(e.pushScopeId("data-v-522703e1"),u=u(),e.popScopeId(),u),De=["id"],Ie=["xmlns","viewBox"],Me=["id"],Ue=["id"],qe=Be(()=>e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1)),We=["id"],je=["flood-color"],Ge={key:0,class:"donut-label-connectors"},He=["d","stroke","stroke-width","filter"],Xe=["cx","cy","r","fill"],Ye=["cx","cy","r","fill","filter"],Ze={class:"donut"},Je=["d","fill","stroke","stroke-width","filter"],Ke=["d","onMouseenter","onClick"],Qe={key:1,class:"donut-labels quick-animation"},et=["cx","cy","fill","filter"],tt=["text-anchor","x","y","fill","font-size","filter"],lt=["text-anchor","x","y","fill","font-size","filter"],at={key:2,class:"donut-hollow quick-animation"},ot=["x","y","font-size","fill"],nt=["x","y","font-size","fill"],rt={key:0,class:"line-grid"},it=["x1","x2","y1","y2","stroke","stroke-width"],ut=["x1","x2","y1","y2","stroke","stroke-width"],st={key:1,class:"line-axis"},ct=["x1","x2","y1","y2","stroke","stroke-width"],dt=["x1","x2","y1","y2","stroke","stroke-width"],vt={key:2,class:"yLabels"},mt=["x1","x2","y1","y2","stroke","stroke-width"],ht=["x","y","font-size","fill"],ft={key:3,class:"periodLabels"},pt=["x1","x2","y1","y2","stroke","stroke-width"],kt=["font-size","text-anchor","fill","transform"],gt={class:"plots"},yt={class:"line-plot-series"},xt=["d","stroke","stroke-width"],St=["d","stroke","stroke-width"],bt=["d","stroke","stroke-width"],Bt=["d","stroke","stroke-width"],wt=["cx","cy","fill","stroke"],Et={key:4,class:"dataLabels"},Lt=["font-size","fill","x","y"],_t={class:"tooltip-traps"},At=["x","y","height","width","fill","onMouseenter","onClick"],Ct={key:0,class:"line-grid"},zt=["x1","x2","y1","y2","stroke","stroke-width"],Nt=["x1","x2","y1","y2","stroke","stroke-width"],Vt={key:1,class:"line-axis"},Ft=["x1","x2","y1","y2","stroke","stroke-width"],$t=["x1","x2","y1","y2","stroke","stroke-width"],Pt={key:2,class:"yLabels"},Tt=["x1","x2","y1","y2","stroke","stroke-width"],Rt=["x","y","font-size","fill"],Ot={key:3,class:"periodLabels"},Dt=["x1","x2","y1","y2","stroke","stroke-width"],It=["font-size","text-anchor","transform","fill"],Mt={class:"plots"},Ut=["x","width","height","y","fill","stroke","stroke-width"],qt=["to"],Wt=["from","to"],jt={key:4,class:"dataLabels"},Gt=["x","y","font-size","fill"],Ht={class:"tooltip-traps"},Xt=["x","y","height","width","fill","onMouseenter","onClick"],Yt={key:3,class:"axis-labels"},Zt={key:0},Jt=["font-size","fill","x","y"],Kt={key:1},Qt=["font-size","fill","x","y"],el={key:2},tl=["font-size","fill","transform"],ll={key:3},al=["font-size","fill","transform"],ol={key:2,class:"vue-data-ui-watermark"},nl=["onClick"],rl=["onClick"],il=["onClick"],ul={key:1,class:"vue-ui-quick-chart-not-processable"},sl=Be(()=>e.createElementVNode("span",null,"Dataset is not processable",-1)),cl={__name:"vue-ui-quick-chart",props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}}},emits:["selectDatapoint","selectLegend"],setup(u,{expose:b,emit:h}){const _=u,{vue_ui_quick_chart:N}=s.useConfig(),F=e.ref(null),I=e.ref(null),M=e.ref(null),W=e.ref(null),w=e.ref(s.createUid()),$=e.ref(!1),j=e.ref(null),T=e.ref(""),V=e.ref(null),x=e.ref([]),ue=e.ref(0),ne=e.ref(0),t=e.computed(()=>{const i=ge.useNestedProp({userConfig:_.config,defaultConfig:N});return i.theme?{...ge.useNestedProp({userConfig:s.themes.vue_ui_quick_chart[i.theme]||_.config,defaultConfig:i}),customPalette:s.themePalettes[i.theme]||s.palette}:i}),G=e.computed(()=>s.convertCustomPalette(t.value.customPalette)),J=e.computed(()=>{const i=$e({dataset:_.dataset,barLineSwitch:t.value.chartIsBarUnderDatasetLength});return i||console.error("VueUiQuickChart : Dataset is not processable"),i}),k=e.ref(J.value),we=e.computed(()=>!!k.value),E=e.computed(()=>k.value?k.value.type:null),{isPrinting:K,isImaging:Q,generatePdf:se,generateImage:ce}=ke.usePrinter({elementId:`${E.value}_${w.value}`,fileName:t.value.title||E.value}),g=e.ref({width:t.value.width,height:t.value.height}),ee=e.ref({showTooltip:t.value.showTooltip}),te=e.ref(null);e.onMounted(()=>{if(t.value.responsive){const i=pe.throttle(()=>{const{width:v,height:l}=pe.useResponsive({chart:F.value,title:t.value.title?I.value:null,legend:t.value.showLegend?M.value:null,slicer:[S.BAR,S.LINE].includes(E.value)&&t.value.zoomXy&&k.value.maxSeriesLength>1?W.value:null});g.value.width=v,g.value.height=l});te.value=new ResizeObserver(i),te.value.observe(F.value.parentNode)}}),e.onBeforeUnmount(()=>{te.value&&te.value.disconnect()});const Ee=e.computed(()=>{switch(E.value){case S.LINE:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;case S.BAR:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;case S.DONUT:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`;default:return`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`}});function de(i){return[...i].map(v=>v.value).reduce((v,l)=>v+l,0)}function H(i){return t.value.blurOnHover&&![null,void 0].includes(V.value)&&V.value!==i?`url(#blur_${w.value})`:""}function ve(i,v){x.value.includes(i)?x.value=x.value.filter(l=>l!==i):x.value.length<v&&x.value.push(i)}const me=e.ref(null),he=e.ref(null),le=e.ref(!1);function Le(i,v){le.value=!0;let l=i.value;if(x.value.includes(i.id)){let r=function(){l>n?(le.value=!1,cancelAnimationFrame(he.value),k.value={...k.value,dataset:k.value.dataset.map((m,A)=>i.id===`donut_${A}`?{...m,value:n,VALUE:n}:m)}):(l+=n*.025,k.value={...k.value,dataset:k.value.dataset.map((m,A)=>i.id===`donut_${A}`?{...m,value:l,VALUE:l}:m)},he.value=requestAnimationFrame(r))};x.value=x.value.filter(m=>m!==i.id);const n=J.value.dataset.find((m,A)=>i.id===`donut_${A}`).VALUE;r()}else if(v.length>1){let n=function(){l<.1?(le.value=!1,cancelAnimationFrame(me.value),x.value.push(i.id),k.value={...k.value,dataset:k.value.dataset.map((r,m)=>i.id===`donut_${m}`?{...r,value:0,VALUE:0}:r)}):(l/=1.1,k.value={...k.value,dataset:k.value.dataset.map((r,m)=>i.id===`donut_${m}`?{...r,value:l,VALUE:l}:r)},me.value=requestAnimationFrame(n))};n()}}const B=e.computed(()=>{if(E.value!==S.DONUT)return null;const i=k.value.dataset.map((a,o)=>({...a,value:a.VALUE||a.DATA||a.SERIE||a.VALUES||a.NUM||0,name:a.NAME||a.DESCRIPTION||a.TITLE||a.LABEL||`Serie ${o}`,id:`donut_${o}`})).map((a,o)=>({...a,color:a.COLOR?s.convertColorToHex(a.COLOR):G.value[o+t.value.paletteStartIndex]||s.palette[o+t.value.paletteStartIndex]||s.palette[(o+t.value.paletteStartIndex)%s.palette.length],immutableValue:a.value}));function v(a,o){return s.dataLabel({v:isNaN(a.value/de(o))?0:a.value/de(o)*100,s:"%",r:t.value.dataLabelRoundingPercentage})}function l(a){return a.proportion*100>t.value.donutHideLabelUnderPercentage}function n(a,o){const p=J.value.dataset.find((L,C)=>`donut_${C}`===a).VALUE;return Math.abs(String(Number(p.toFixed(0))).length-String(Number(o.toFixed(0))).length)}function r({datapoint:a,seriesIndex:o}){j.value={datapoint:a,seriesIndex:o,config:t.value,dataset:i},V.value=a.id;const p=t.value.tooltipCustomFormat;if(s.isFunction(p)&&s.functionReturnsString(()=>p({datapoint:a,seriesIndex:o,series:i,config:t.value})))T.value=p({datapoint:a,seriesIndex:o,series:i,config:t.value});else{let f="";f+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${a.name}</div>`,f+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${a.color}"/></svg>`,f+=`<b>${s.applyDataLabel(t.value.formatter,a.value,s.dataLabel({p:t.value.valuePrefix,v:a.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:a,seriesIndex:o})}</b>`,f+=`<span>(${s.dataLabel({v:a.proportion*100,s:"%",r:t.value.dataLabelRoundingPercentage})})</span></div>`,T.value=`<div>${f}</div>`}$.value=!0}function m(){$.value=!1,V.value=null}const A={centerX:g.value.width/2,centerY:g.value.height/2},z=i.filter(a=>!x.value.includes(a.id)).map(a=>a.value||0).reduce((a,o)=>a+o,0),U=i.map((a,o)=>({...a,proportion:(a.value||0)/z,value:a.value||0,absoluteValue:J.value.dataset.find((p,f)=>`donut_${f}`===a.id).VALUE})),R=g.value.width/2,q=g.value.height/2,O=g.value.height*t.value.donutRadiusRatio;return{dataset:U.filter(a=>!x.value.includes(a.id)),legend:U,drawingArea:A,displayArcPercentage:v,isArcBigEnough:l,useTooltip:r,killTooltip:m,getSpaces:n,total:z,cx:R,cy:q,radius:O,chart:s.makeDonut({series:i.filter(a=>!x.value.includes(a.id))},R,q,O,O,1.99999,2,1,360,105.25,g.value.height*t.value.donutThicknessRatio)}}),y=e.ref({start:0,end:k.value.maxSeriesLength});function _e(){y.value={start:0,end:k.value.maxSeriesLength},ne.value+=1}const Ae=e.computed(()=>{if(!t.value.zoomMinimap.show||E.value===S.DONUT)return[];let i=[];P(k.value.dataset)&&(i=k.value.dataset),oe(k.value.dataset)&&(i=k.value.dataset.map((r,m)=>({values:r.VALUE||r.DATA||r.SERIE||r.VALUES||r.NUM||0,id:E.value===S.LINE?`line_${m}`:`bar_${m}`})).filter(r=>!x.value.includes(r.id)));const v=P(i)?i.length:Math.max(...i.map(r=>r.values.length));let l=[];if(P(i))l=i;else for(let r=0;r<v;r+=1)l.push(i.map(m=>m.values[r]||0).reduce((m,A)=>(m||0)+(A||0),0));const n=Math.min(...l);return l.map(r=>r+(n<0?Math.abs(n):0))}),d=e.computed(()=>{if(E.value!==S.LINE)return null;const i={height:g.value.height,width:g.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:i.width-t.value.xyPaddingRight,bottom:i.height-t.value.xyPaddingBottom,width:i.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:i.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(k.value.dataset)&&(l=[{values:k.value.dataset.slice(y.value.start,y.value.end),absoluteIndices:k.value.dataset.map((a,o)=>o).slice(y.value.start,y.value.end),name:t.value.title,color:G.value[t.value.paletteStartIndex]||s.palette[t.value.paletteStartIndex],id:"line_0"}]),oe(k.value.dataset)&&(l=k.value.dataset.map((a,o)=>({...a,values:a.VALUE||a.DATA||a.SERIE||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?s.convertColorToHex(a.COLOR):G.value[o+t.value.paletteStartIndex]||s.palette[o+t.value.paletteStartIndex]||s.palette[(o+t.value.paletteStartIndex)%s.palette.length],values:a.values.slice(y.value.start,y.value.end),absoluteIndices:a.values.map((p,f)=>f).slice(y.value.start,y.value.end)})));const n={max:Math.max(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),min:Math.min(...l.filter(a=>!x.value.includes(a.id)).flatMap(a=>a.values)),maxSeries:Math.max(...l.map(a=>a.values.length))},r=s.calculateNiceScale(n.min<0?n.min:0,n.max<0?0:n.max,t.value.xyScaleSegments),m=n.min<0?Math.abs(n.min):0,A=n.max<0?v.top:v.bottom-m/(r.max+m)*v.height,z=v.width/n.maxSeries,U=r.ticks.map(a=>({y:v.bottom-v.height*((a+m)/(r.max+m)),x:v.left-8,value:a})),R=l.map((a,o)=>({...a,coordinates:a.values.map((p,f)=>({x:v.left+z*(f+1)-z/2,y:v.bottom-(p+m)/(r.max+m)*v.height,value:p}))})).map(a=>{let o=[];return a.coordinates.forEach(p=>{o.push(`${p.x},${p.y} `)}),{...a,linePath:o.join(" ")}});function q(a){V.value=a;const o=l.map(f=>({...f,value:f.values[a],absoluteIndex:f.absoluteIndices[a]})).filter(f=>!x.value.includes(f.id));j.value={datapoint:o,seriesIndex:a,config:t.value,dataset:l};const p=t.value.tooltipCustomFormat;if(s.isFunction(p)&&s.functionReturnsString(()=>p({datapoint:o,seriesIndex:a,series:l,config:t.value})))T.value=p({datapoint:o,seriesIndex:a,series:l,config:t.value});else{let f="";t.value.xyPeriods[o[0].absoluteIndex]&&(f+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[o[0].absoluteIndex]}</div>`),o.forEach((L,C)=>{f+=`
|
|
2
|
-
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
3
|
-
<svg viewBox="0 0 12 12" height="14" width="12"><circle cx="6" cy="6" r="6" stroke="none" fill="${L.color}"/></svg>
|
|
4
|
-
<span>${L.name}:</span>
|
|
5
|
-
<b>${s.applyDataLabel(t.value.formatter,L.value,s.dataLabel({p:t.value.valuePrefix,v:L.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:L,seriesIndex:C})}
|
|
6
|
-
</b>
|
|
7
|
-
</div>
|
|
8
|
-
`}),T.value=f}$.value=!0}function O(){V.value=null,$.value=!1}return{absoluteZero:A,dataset:R.filter(a=>!x.value.includes(a.id)),legend:R,drawingArea:v,extremes:n,slotSize:z,yLabels:U,useTooltip:q,killTooltip:O}}),c=e.computed(()=>{if(E.value!==S.BAR)return null;const i={height:g.value.height,width:g.value.width},v={left:t.value.xyPaddingLeft,top:t.value.xyPaddingTop,right:i.width-t.value.xyPaddingRight,bottom:i.height-t.value.xyPaddingBottom,width:i.width-t.value.xyPaddingLeft-t.value.xyPaddingRight,height:i.height-t.value.xyPaddingTop-t.value.xyPaddingBottom};let l=[];P(k.value.dataset)&&(l=[{values:k.value.dataset.slice(y.value.start,y.value.end),absoluteIndices:k.value.dataset.map((o,p)=>p).slice(y.value.start,y.value.end),name:t.value.title,color:G.value[t.value.paletteStartIndex]||s.palette[t.value.paletteStartIndex],id:"bar_0"}]),oe(k.value.dataset)&&(l=k.value.dataset.map((o,p)=>({...o,values:o.VALUE||o.DATA||o.SERIE||o.VALUES||o.NUM||0,name:o.NAME||o.DESCRIPTION||o.TITLE||o.LABEL||`Serie ${p}`,id:`bar_${p}`})).map((o,p)=>({...o,color:o.COLOR?s.convertColorToHex(o.COLOR):G.value[p+t.value.paletteStartIndex]||s.palette[p+t.value.paletteStartIndex]||s.palette[(p+t.value.paletteStartIndex)%s.palette.length],values:o.values.slice(y.value.start,y.value.end),absoluteIndices:o.values.map((f,L)=>L).slice(y.value.start,y.value.end)})));const n={max:Math.max(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values))<0?0:Math.max(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),min:Math.min(...l.filter(o=>!x.value.includes(o.id)).flatMap(o=>o.values)),maxSeries:Math.max(...l.filter(o=>!x.value.includes(o.id)).map(o=>o.values.length))},r=s.calculateNiceScale(n.min<0?n.min:0,n.max,t.value.xyScaleSegments),m=r.min<0?Math.abs(r.min):0,A=v.bottom-m/(r.max+m)*v.height,z=v.width/n.maxSeries,U=r.ticks.map(o=>({y:v.bottom-v.height*((o+m)/(r.max+m)),x:v.left-8,value:o})),R=l.map((o,p)=>({...o,coordinates:o.values.map((f,L)=>{const C=(f+m)/(n.max+m)*v.height,X=Math.abs(f)/Math.abs(n.min)*(v.height-A),ie=m/(n.max+m)*v.height,Y=z/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+z*L+Y*p+t.value.barGap/2,y:f>0?v.bottom-C:A,height:f>0?C-ie:X,value:f,width:Y}})})),q=l.filter(o=>!x.value.includes(o.id)).map((o,p)=>({...o,coordinates:o.values.map((f,L)=>{const C=(f+m)/(n.max+m)*v.height,X=Math.abs(f)/(n.max+m)*v.height,ie=m/(n.max+m)*v.height,Y=z/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+z*L+Y*p+t.value.barGap/2,y:f>0?v.bottom-C:A,height:f>0?C-ie:X,value:f,width:Y}})}));function O(o){V.value=o;const p=l.map(L=>({...L,value:L.values[o],absoluteIndex:L.absoluteIndices[o]})).filter(L=>!x.value.includes(L.id));j.value={datapoint:p,seriesIndex:o,config:t.value,dataset:l};const f=t.value.tooltipCustomFormat;if(s.isFunction(f)&&s.functionReturnsString(()=>f({datapoint:p,seriesIndex:o,series:l,config:t.value})))T.value=f({point:p,seriesIndex:o,series:l,config:t.value});else{let L="";t.value.xyPeriods[p[0].absoluteIndex]&&(L+=`<div style="border-bottom:1px solid ${t.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.value.xyPeriods[p[0].absoluteIndex]}</div>`),p.forEach((C,X)=>{L+=`
|
|
9
|
-
<div style="display:flex; flex-wrap: wrap; align-items:center; gap:3px;">
|
|
10
|
-
<svg viewBox="0 0 12 12" height="14" width="12"><rect x=0 y="0" width="12" height="12" rx="1" stroke="none" fill="${C.color}"/></svg>
|
|
11
|
-
<span>${C.name}:</span>
|
|
12
|
-
<b>${s.applyDataLabel(t.value.formatter,C.value,s.dataLabel({p:t.value.valuePrefix,v:C.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:C,seriesIndex:X})}
|
|
13
|
-
</b>
|
|
14
|
-
</div>
|
|
15
|
-
`}),T.value=L}$.value=!0}function a(){$.value=!1,V.value=null}return{absoluteZero:A,dataset:q.filter(o=>!x.value.includes(o.id)),legend:R,drawingArea:v,extremes:n,slotSize:z,yLabels:U,useTooltip:O,killTooltip:a}}),re=e.ref(!1);function Ce(i){re.value=i,ue.value+=1}function fe(){ee.value.showTooltip=!ee.value.showTooltip}return b({generatePdf:se,generateImage:ce,toggleTooltip:fe}),(i,v)=>we.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:`${E.value}_${w.value}`,ref_key:"quickChart",ref:F,class:e.normalizeClass({"vue-ui-quick-chart":!0,"vue-data-ui-wrapper-fullscreen":re.value}),style:e.normalizeStyle(`background:${t.value.backgroundColor};color:${t.value.color};font-family:${t.value.fontFamily}; position: relative; ${t.value.responsive?"height: 100%":""}`)},[t.value.showUserOptions?(e.openBlock(),e.createBlock(ke.UserOptions,{ref:"details",key:`user_option_${ue.value}`,backgroundColor:t.value.backgroundColor,color:t.value.color,isPrinting:e.unref(K),isImaging:e.unref(Q),uid:w.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:ee.value.showTooltip,isFullscreen:re.value,titles:{...t.value.userOptionsButtonTitles},chartElement:F.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(se),onGenerateImage:e.unref(ce),onToggleTooltip:fe},e.createSlots({_:2},[i.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(i.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,i.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(i.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,i.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(i.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,i.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(i.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"3"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasImg","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),t.value.title?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"quickChartTitle",ref:I,class:"vue-ui-quick-chart-title",style:e.normalizeStyle(`background:${t.value.backgroundColor};color:${t.value.color};font-size:${t.value.titleFontSize}px;font-weight:${t.value.titleBold?"bold":"normal"};text-align:${t.value.titleTextAlign}`)},e.toDisplayString(t.value.title),5)):e.createCommentVNode("",!0),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(s.XMLNS),viewBox:Ee.value,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.backgroundColor};color:${t.value.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${w.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${w.value}`},null,8,Ue),qe],8,Me),e.createElementVNode("filter",{id:`shadow_${w.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,je)],8,We)]),E.value===S.DONUT?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.chart,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[B.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(s.calcNutArrowPath)(l,{x:(t.value.width||g.value.width)/2,y:(t.value.height||g.value.height)/2},16,16,!1,!1,t.value.donutLabelMarkerStrokeWidth),stroke:l.color,"stroke-width":t.value.donutLabelMarkerStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",filter:H(l.id)},null,8,He)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("circle",{class:"donut-hollow",cx:(t.value.width||g.value.width)/2,cy:(t.value.height||g.value.height)/2,r:(t.value.height||g.value.height)*t.value.donutRadiusRatio,fill:t.value.backgroundColor},null,8,Xe),e.createElementVNode("circle",{cx:B.value.cx,cy:B.value.cy,r:B.value.radius,fill:t.value.backgroundColor,filter:t.value.donutUseShadow?`url(#shadow_${w.value})`:""},null,8,Ye),e.createElementVNode("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.chart,(l,n)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.donutStrokeWidth,filter:H(l.id)},null,8,Je))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.chart,(l,n)=>(e.openBlock(),e.createElementBlock("path",{d:l.arcSlice,fill:"transparent",onMouseenter:r=>B.value.useTooltip({datapoint:l,seriesIndex:n}),onMouseout:v[0]||(v[0]=r=>B.value.killTooltip()),onClick:r=>h("selectDatapoint",l)},null,40,Ke))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Qe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value.chart,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[B.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("circle",{key:0,cx:e.unref(s.calcMarkerOffsetX)(l).x,cy:e.unref(s.calcMarkerOffsetY)(l)-3.7,fill:l.color,r:3,filter:H(l.id)},null,8,et)):e.createCommentVNode("",!0),B.value.isArcBigEnough(l)?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":e.unref(s.calcMarkerOffsetX)(l,!0,20).anchor,x:e.unref(s.calcMarkerOffsetX)(l,!0).x,y:e.unref(s.calcMarkerOffsetY)(l),fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:H(l.id)},e.toDisplayString(B.value.displayArcPercentage(l,B.value.chart))+" ("+e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,l.value,e.unref(s.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:n}))+") ",9,tt)):e.createCommentVNode("",!0),B.value.isArcBigEnough(l,!0,20)?(e.openBlock(),e.createElementBlock("text",{key:2,"text-anchor":e.unref(s.calcMarkerOffsetX)(l).anchor,x:e.unref(s.calcMarkerOffsetX)(l,!0).x,y:e.unref(s.calcMarkerOffsetY)(l)+t.value.dataLabelFontSize,fill:t.value.color,"font-size":t.value.dataLabelFontSize,filter:H(l.id)},e.toDisplayString(l.name),9,lt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.donutShowTotal?(e.openBlock(),e.createElementBlock("g",at,[e.createElementVNode("text",{"text-anchor":"middle",x:B.value.drawingArea.centerX,y:B.value.drawingArea.centerY-t.value.donutTotalLabelFontSize/2,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(t.value.donutTotalLabelText),9,ot),e.createElementVNode("text",{"text-anchor":"middle",x:B.value.drawingArea.centerX,y:B.value.drawingArea.centerY+t.value.donutTotalLabelFontSize,"font-size":t.value.donutTotalLabelFontSize,fill:t.value.color},e.toDisplayString(e.unref(s.dataLabel)({p:t.value.valuePrefix,v:B.value.total,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue})),9,nt)])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),E.value===S.LINE?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",rt,[(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,it)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries+1,(l,n)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*n,x2:d.value.drawingArea.left+d.value.slotSize*n,y1:d.value.drawingArea.top,y2:d.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,ut))),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,ct),e.createElementVNode("line",{x1:d.value.drawingArea.left,x2:d.value.drawingArea.right,y1:d.value.absoluteZero,y2:d.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,dt)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.yLabels,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=d.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:d.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,mt)):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(s.applyDataLabel)(t.value.formatter,l.value,e.unref(s.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:n})),9,ht)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",ft,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(y.value.start,y.value.end),(l,n)=>(e.openBlock(),e.createElementBlock("line",{x1:d.value.drawingArea.left+d.value.slotSize*(n+1)-d.value.slotSize/2,x2:d.value.drawingArea.left+d.value.slotSize*(n+1)-d.value.slotSize/2,y1:d.value.drawingArea.bottom,y2:d.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,pt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(y.value.start,y.value.end),(l,n)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.xyLabelsXFontSize,"text-anchor":t.value.xyPeriodLabelsRotation>0?"start":t.value.xyPeriodLabelsRotation<0?"end":"middle",fill:t.value.color,transform:`translate(${d.value.drawingArea.left+d.value.slotSize*(n+1)-d.value.slotSize/2}, ${d.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}), rotate(${t.value.xyPeriodLabelsRotation})`},e.toDisplayString(l),9,kt))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,n)=>(e.openBlock(),e.createElementBlock("g",yt,[t.value.lineSmooth?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("path",{d:`M ${e.unref(s.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,xt),e.createElementVNode("path",{d:`M ${e.unref(s.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,St)],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,bt),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,Bt)],64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(r,m)=>(e.openBlock(),e.createElementBlock("circle",{cx:r.x,cy:r.y,r:3,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":"0.5",class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},null,8,wt))),256))]))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",Et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.dataset,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(r,m)=>(e.openBlock(),e.createElementBlock("text",{"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,x:r.x,y:r.y-t.value.dataLabelFontSize/2,class:"quick-animation",style:{transition:"all 0.3s ease-in-out"}},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,r.value,e.unref(s.dataLabel)({p:t.value.valuePrefix,v:r.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:r,seriesIndex:m})),9,Lt))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",_t,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value.extremes.maxSeries,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:d.value.drawingArea.left+n*d.value.slotSize,y:d.value.drawingArea.top,height:d.value.drawingArea.height<=0?1e-5:d.value.drawingArea.height,width:d.value.slotSize<=0?1e-5:d.value.slotSize,fill:V.value===n?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:r=>d.value.useTooltip(n),onMouseleave:v[1]||(v[1]=r=>d.value.killTooltip()),onClick:r=>h("selectDatapoint",d.value.dataset.map(m=>({...m,value:m.values[n]})))},null,44,At))),256))])],64)):e.createCommentVNode("",!0),E.value===S.BAR?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.value.xyShowGrid?(e.openBlock(),e.createElementBlock("g",Ct,[(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,zt)):e.createCommentVNode("",!0)],64))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries+1,(l,n)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*n,x2:c.value.drawingArea.left+c.value.slotSize*n,y1:c.value.drawingArea.top,y2:c.value.drawingArea.bottom,stroke:t.value.xyGridStroke,"stroke-width":t.value.xyGridStrokeWidth,"stroke-linecap":"round"},null,8,Nt))),256))])):e.createCommentVNode("",!0),t.value.xyShowAxis?(e.openBlock(),e.createElementBlock("g",Vt,[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,Ft),e.createElementVNode("line",{x1:c.value.drawingArea.left,x2:c.value.drawingArea.right,y1:c.value.absoluteZero,y2:c.value.absoluteZero,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,$t)])):e.createCommentVNode("",!0),t.value.xyShowScale?(e.openBlock(),e.createElementBlock("g",Pt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.yLabels,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[l.y<=c.value.drawingArea.bottom?(e.openBlock(),e.createElementBlock("line",{key:0,x1:l.x+4,x2:c.value.drawingArea.left,y1:l.y,y2:l.y,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Tt)):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(s.applyDataLabel)(t.value.formatter,l.value,e.unref(s.dataLabel)({p:t.value.valuePrefix,v:l.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:n})),9,Rt)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.xyShowScale&&t.value.xyPeriods.length?(e.openBlock(),e.createElementBlock("g",Ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(y.value.start,y.value.end),(l,n)=>(e.openBlock(),e.createElementBlock("line",{x1:c.value.drawingArea.left+c.value.slotSize*(n+1)-c.value.slotSize/2,x2:c.value.drawingArea.left+c.value.slotSize*(n+1)-c.value.slotSize/2,y1:c.value.drawingArea.bottom,y2:c.value.drawingArea.bottom+4,stroke:t.value.xyAxisStroke,"stroke-width":t.value.xyAxisStrokeWidth,"stroke-linecap":"round"},null,8,Dt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value.xyPeriods.slice(y.value.start,y.value.end),(l,n)=>(e.openBlock(),e.createElementBlock("text",{"font-size":t.value.xyLabelsXFontSize,"text-anchor":t.value.xyPeriodLabelsRotation>0?"start":t.value.xyPeriodLabelsRotation<0?"end":"middle",transform:`translate(${c.value.drawingArea.left+c.value.slotSize*(n+1)-c.value.slotSize/2}, ${c.value.drawingArea.bottom+t.value.xyLabelsXFontSize+6}) rotate(${t.value.xyPeriodLabelsRotation})`,fill:t.value.color},e.toDisplayString(l),9,It))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Mt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(r,m)=>(e.openBlock(),e.createElementBlock("rect",{x:r.x,width:r.width<=0?1e-5:r.width,height:r.height<=0?1e-5:r.height,y:r.y,fill:l.color,stroke:t.value.backgroundColor,"stroke-width":t.value.barStrokeWidth,"stroke-linecap":"round",class:e.normalizeClass({"vue-data-ui-bar-animated":t.value.barAnimated&&r.value<0})},[t.value.barAnimated&&r.value>0&&!e.unref(K)&&!e.unref(Q)?(e.openBlock(),e.createElementBlock("animate",{key:0,attributeName:"height",from:0,to:r.height,dur:"0.5s"},null,8,qt)):e.createCommentVNode("",!0),t.value.barAnimated&&r.value>0&&!e.unref(K)&&!e.unref(Q)?(e.openBlock(),e.createElementBlock("animate",{key:1,attributeName:"y",from:c.value.absoluteZero,to:c.value.absoluteZero-r.height,dur:"0.5s"},null,8,Wt)):e.createCommentVNode("",!0)],10,Ut))),256))],64))),256))]),t.value.showDataLabels?(e.openBlock(),e.createElementBlock("g",jt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.dataset,(l,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.coordinates,(r,m)=>(e.openBlock(),e.createElementBlock("text",{x:r.x+r.width/2,y:r.y-t.value.dataLabelFontSize/2,"text-anchor":"middle","font-size":t.value.dataLabelFontSize,fill:l.color,class:"quick-animation"},e.toDisplayString(e.unref(s.applyDataLabel)(t.value.formatter,r.value,e.unref(s.dataLabel)({p:t.value.valuePrefix,v:r.value,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:r,seriesIndex:m})),9,Gt))),256))],64))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",Ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.extremes.maxSeries,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:c.value.drawingArea.left+n*c.value.slotSize,y:c.value.drawingArea.top,height:c.value.drawingArea.height<=0?1e-5:c.value.drawingArea.height,width:c.value.slotSize<=0?1e-5:c.value.slotSize,fill:V.value===n?t.value.xyHighlighterColor:"transparent",style:e.normalizeStyle(`opacity:${t.value.xyHighlighterOpacity}`),onMouseenter:r=>c.value.useTooltip(n),onMouseleave:v[2]||(v[2]=r=>c.value.killTooltip()),onClick:r=>h("selectDatapoint",c.value.dataset.map(m=>({...m,value:m.values[n]})))},null,44,Xt))),256))])],64)):e.createCommentVNode("",!0),[S.LINE,S.BAR].includes(E.value)?(e.openBlock(),e.createElementBlock("g",Yt,[t.value.xAxisLabel&&E.value===S.LINE?(e.openBlock(),e.createElementBlock("g",Zt,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:d.value.drawingArea.left+d.value.drawingArea.width/2,y:g.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,Jt)])):e.createCommentVNode("",!0),t.value.xAxisLabel&&E.value===S.BAR?(e.openBlock(),e.createElementBlock("g",Kt,[e.createElementVNode("text",{"font-size":t.value.axisLabelsFontSize,fill:t.value.color,"text-anchor":"middle",x:c.value.drawingArea.left+c.value.drawingArea.width/2,y:g.value.height-t.value.axisLabelsFontSize/3},e.toDisplayString(t.value.xAxisLabel),9,Qt)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&E.value===S.LINE?(e.openBlock(),e.createElementBlock("g",el,[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,tl)])):e.createCommentVNode("",!0),t.value.yAxisLabel&&E.value===S.BAR?(e.openBlock(),e.createElementBlock("g",ll,[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,al)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],12,Ie)),i.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ol,[e.renderSlot(i.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(K)||e.unref(Q)})),void 0,!0)])):e.createCommentVNode("",!0),[S.BAR,S.LINE].includes(E.value)&&t.value.zoomXy&&k.value.maxSeriesLength>1?(e.openBlock(),e.createElementBlock("div",{key:`slicer_${ne.value}`,ref_key:"quickChartSlicer",ref:W},[(e.openBlock(),e.createBlock(Ne.Slicer,{key:`slicer_${ne.value}`,background:t.value.zoomColor,borderColor:t.value.backgroundColor,fontSize:t.value.zoomFontSize,useResetSlot:t.value.zoomUseResetSlot,labelLeft:t.value.xyPeriods[y.value.start]?t.value.xyPeriods[y.value.start]:"",labelRight:t.value.xyPeriods[y.value.end-1]?t.value.xyPeriods[y.value.end-1]:"",textColor:t.value.color,inputColor:t.value.zoomColor,selectColor:t.value.zoomHighlightColor,max:k.value.maxSeriesLength,min:0,valueStart:y.value.start,valueEnd:y.value.end,smoothMinimap:t.value.zoomMinimap.smooth,minimapSelectedColor:t.value.zoomMinimap.selectedColor,minimapSelectedColorOpacity:t.value.zoomMinimap.selectedColorOpacity,minimapSelectionRadius:t.value.zoomMinimap.selectionRadius,minimapLineColor:t.value.zoomMinimap.lineColor,minimap:Ae.value,start:y.value.start,"onUpdate:start":v[3]||(v[3]=l=>y.value.start=l),end:y.value.end,"onUpdate:end":v[4]||(v[4]=l=>y.value.end=l),onReset:_e},{"reset-action":e.withCtx(({reset:l})=>[e.renderSlot(i.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:l})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","smoothMinimap","minimapSelectedColor","minimapSelectedColorOpacity","minimapSelectionRadius","minimapLineColor","minimap","start","end"]))])):e.createCommentVNode("",!0),t.value.showLegend?(e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"quickChartLegend",ref:M,class:"vue-ui-quick-chart-legend",style:e.normalizeStyle(`background:${t.value.backgroundColor};color:${t.value.color}`)},[E.value===S.DONUT?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(B.value.legend,(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:r=>{Le(l,B.value.dataset),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${B.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(i.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ae.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(s.applyDataLabel)(t.value.formatter,l.absoluteValue,e.unref(s.dataLabel)({p:t.value.valuePrefix,v:l.absoluteValue,s:t.value.valueSuffix,r:t.value.dataLabelRoundingValue}),{datapoint:l,seriesIndex:n})),5),x.value.includes(l.id)?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`font-size:${t.value.legendFontSize}px`)}," ( - % ) ",4)):le.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(s.dataLabel)({v:l.value/B.value.total*100,s:"%",r:t.value.dataLabelRoundingPercentage}))+") ",5))],64))],12,nl))),256)):e.createCommentVNode("",!0),E.value===S.LINE?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(d.value.legend,(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:r=>{ve(l.id,d.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${d.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(i.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ae.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,rl))),256)):e.createCommentVNode("",!0),E.value===S.BAR?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(c.value.legend,(l,n)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-quick-chart-legend-item",onClick:r=>{ve(l.id,c.value.legend.length-1),h("selectLegend",l)},style:e.normalizeStyle(`cursor: ${c.value.legend.length>1?"pointer":"default"}; opacity:${x.value.includes(l.id)?"0.5":"1"}`)},[t.value.useCustomLegend?e.renderSlot(i.$slots,"legend",e.normalizeProps(e.mergeProps({key:0},{legend:l})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(ae.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,il))),256)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:ee.value.showTooltip&&$.value,backgroundColor:t.value.backgroundColor,color:t.value.color,borderRadius:t.value.tooltipBorderRadius,borderColor:t.value.tooltipBorderColor,borderWidth:t.value.tooltipBorderWidth,fontSize:t.value.tooltipFontSize,backgroundOpacity:t.value.tooltipBackgroundOpacity,position:t.value.tooltipPosition,offsetY:t.value.tooltipOffsetY,parent:F.value,content:T.value,isCustom:e.unref(s.isFunction)(t.value.tooltipCustomFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(i.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(i.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...j.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"])],14,De)):(e.openBlock(),e.createElementBlock("div",ul,[e.createVNode(ae.default,{name:"circleCancel",stroke:"red"}),sl]))}},dl=Ve._export_sfc(cl,[["__scopeId","data-v-522703e1"]]);exports.default=dl;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CDK3omwG.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),ie=require("./Title-CR-JDJwq.cjs"),Y=require("./usePrinter-vQu-8tRD.cjs"),ce=require("./Tooltip-B4DNihSF.cjs"),de=require("./vue-ui-sparkbar-C_vNsxM_.cjs"),ve=require("./Legend-BJ2Mynop.cjs"),pe=require("./DataTable-CPAt686N.cjs"),he=require("./vue-ui-skeleton-DRDC3yxK.cjs"),ge=require("./vue-ui-accordion-EVAolVkD.cjs"),J=require("./useNestedProp-CaaW8JIS.cjs"),me=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],ye=["xmlns","viewBox"],ke=["id"],be=["stop-color"],Ce=["stop-color"],we={key:0},Be=["x1","y1","x2","y2","stroke","stroke-width"],_e={key:0},xe=["d","stroke","stroke-width"],Pe=["d","stroke","stroke-width"],$e={key:1},Ne=["x","y","text-anchor","font-size","fill","onMouseenter"],Te=["points","stroke","stroke-width"],Se=["points","stroke","stroke-width","fill"],Ee={key:2},Ve=["cx","cy","fill","r","stroke"],Fe={key:3,class:"vue-data-ui-watermark"},Le=["onClick"],ze={key:0,style:{"max-width":"200px",margin:"0 auto"}},Oe={__name:"vue-ui-radar",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["selectLegend"],setup(K,{expose:Q,emit:Z}){const d=K,{vue_ui_radar:ee}=n.useConfig(),k=e.computed(()=>!!d.dataset&&Object.keys(d.dataset).length),m=e.ref(n.createUid()),te=e.ref(null),P=e.ref(!1),$=e.ref(""),F=e.ref(0),b=e.ref(null),L=e.ref(null),z=e.ref(null),t=e.computed(()=>{const o=J.useNestedProp({userConfig:d.config,defaultConfig:ee});return o.theme?{...J.useNestedProp({userConfig:n.themes.vue_ui_radar[o.theme]||d.config,defaultConfig:o}),customPalette:n.themePalettes[o.theme]||n.palette}:o}),B=e.ref(null);e.onMounted(()=>{if(n.objectIsEmpty(d.dataset)&&n.error({componentName:"VueUiRadar",type:"dataset"}),t.value.responsive){const o=j.throttle(()=>{const{width:a,height:l}=j.useResponsive({chart:b.value,title:t.value.style.chart.title.text?L.value:null,legend:t.value.style.chart.legend.show?z.value:null});s.value.width=a,s.value.height=l});B.value=new ResizeObserver(o),B.value.observe(b.value.parentNode)}}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:O,isImaging:A,generatePdf:I,generateImage:R}=Y.usePrinter({elementId:`vue-ui-radar_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-radar"}),D=e.computed(()=>n.convertCustomPalette(t.value.customPalette)),h=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),oe=e.computed(()=>({style:{backgroundColor:t.value.style.chart.tooltip.backgroundColor,animation:{show:t.value.style.chart.tooltip.animation.show,animationFrames:t.value.style.chart.tooltip.animation.animationFrames},labels:{fontSize:t.value.style.chart.tooltip.fontSize,name:{color:t.value.style.chart.tooltip.color}},gutter:{backgroundColor:"#CCCCCC",opacity:30}}})),s=e.ref({height:312,width:512}),i=e.ref([]),C=e.ref(null),f=e.ref(!1);function M(o){f.value=!0,i.value.includes(o)?(C.value=o,i.value=i.value.filter(a=>a!==o),setTimeout(()=>{f.value=!1,C.value=null},500)):(i.value.push(o),setTimeout(()=>{f.value=!1},500)),Z("selectLegend",y.value.filter((a,l)=>!i.value.includes(l)).map(a=>({name:a.name,color:a.color,proportion:a.totalProportion})))}function ae(){return y.value.map(o=>({name:o.name,color:o.color,proportion:o.totalProportion}))}const v=e.computed(()=>[null,void 0].includes(d.dataset.categories)?(n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"categories ({ name: string; prefix?: string; suffix?: string}[])"}),[]):(d.dataset.categories.length===0?n.error({componentName:"VueUiRadar",type:"datasetAttributeEmpty",property:"categories"}):d.dataset.categories.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:`category.${l} at index ${a}`,index:a})})}),[null,void 0].includes(d.dataset.series)?n.error({componentName:"VueUiRadar",type:"datasetAttribute",property:"series ({ name: string; values: number[]; color?: string; target: number}[])"}):d.dataset.series.forEach((o,a)=>{n.getMissingDatasetAttributes({datasetObject:o,requiredAttributes:["name","values","target"]}).forEach(l=>{n.error({componentName:"VueUiRadar",type:"datasetSerieAttribute",key:"series",property:l,index:a})})}),d.dataset.categories.map((o,a)=>({name:o.name,categoryId:`radar_category_${m.value}_${a}`,color:n.convertColorToHex(o.color)||D.value[a]||n.palette[a]||n.palette[a%n.palette.length],prefix:o.prefix??"",suffix:o.suffix??""})))),p=e.computed(()=>k.value?d.dataset.series.map((o,a)=>({...o,color:n.convertColorToHex(o.color)||D.value[a]||n.palette[a]||n.palette[a%n.palette.length],serieId:`radar_serie_${m.value}_${a}`,formatter:o.formatter||null})):[]),q=e.computed(()=>Math.max(...p.value.flatMap(o=>o.values))),U=e.computed(()=>p.value.length),N=e.computed(()=>Math.min(s.value.width,s.value.height)/3),G=e.computed(()=>n.createPolygonPath({plot:{x:s.value.width/2,y:s.value.height/2},radius:N.value,sides:U.value,rotation:0})),le=e.computed(()=>{const o=[];for(let a=0;a<N.value;a+=N.value/t.value.style.chart.layout.grid.graduations)o.push(a);return o}),g=e.computed(()=>G.value.coordinates.map((o,a)=>{const l=p.value[a].values.map(r=>re({centerX:s.value.width/2,centerY:s.value.height/2,apexX:o.x,apexY:o.y,proportion:r/(p.value[a].target||q.value)}));return{...o,...p.value[a],plots:l}}));function T({x:o,y:a}){let l="middle";return o=Math.round(o),a=Math.round(a),o>s.value.width/2&&(o+=12,l="start"),o<s.value.width/2&&(o-=12,l="end"),a>s.value.height/2&&(a+=20),a<s.value.height/2&&(a-=12),a===s.value.height/2&&(a+=4),{x:o,y:a,anchor:l}}function re({centerX:o,centerY:a,apexX:l,apexY:r,proportion:u}){return{x:o+(l-o)*u,y:a+(r-a)*u}}const y=e.computed(()=>{const o=p.value.map((a,l)=>a.values.map(r=>r/(a.target||q.value)));return v.value.map((a,l)=>({...a,totalProportion:o.map(r=>r[l]).reduce((r,u)=>r+u,0)/p.value.length,shape:"circle",opacity:i.value.includes(l)?.5:1,segregate:()=>M(l),isSegregated:i.value.includes(l)}))}),ne=e.computed(()=>({cy:"radar-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),_=e.computed(()=>{const o=[{name:t.value.translations.datapoint,color:""},{name:t.value.translations.target,color:""},...y.value],a=d.dataset.series.map(r=>[r.name,n.applyDataLabel(r.formatter,r.target,n.dataLabel({p:r.prefix,v:r.target,s:r.suffix,r:t.value.table.td.roundingValue})),...r.values.map((u,c)=>`${n.applyDataLabel(r.formatter,u,n.dataLabel({p:v.value[c].prefix,v:u,s:v.value[c].suffix,r:t.value.table.td.roundingValue}))} (${isNaN(u/r.target)?"":n.dataLabel({v:u/r.target*100,s:"%",r:t.value.table.td.roundingPercentage})})`)]),l={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:o,body:a,config:l,colNames:o}}),x=e.ref(null),S=e.ref([]),E=e.ref(null);function ue(o,a){S.value=[],x.value=a,P.value=!0;let l="";E.value={datapoint:o,seriesIndex:a,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value};const r=t.value.style.chart.tooltip.customFormat;if(n.isFunction(r)&&n.functionReturnsString(()=>r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value})))$.value=r({seriesIndex:a,datapoint:o,series:{categories:v.value,datapoints:p.value,radar:g.value},config:t.value});else{l+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`;for(let u=0;u<o.values.length;u+=1)i.value.includes(u)||S.value.push({name:v.value[u].name,value:o.values[u]/o.target*100,color:v.value[u].color,suffix:"%)",prefix:`${n.dataLabel({p:v.value[u].prefix??"",v:o.values[u],s:v.value[u].suffix??"",r:t.value.style.chart.tooltip.roundingValue})} (`,rounding:t.value.style.chart.tooltip.roundingPercentage,formatter:o.formatter});$.value=l}}function W(){e.nextTick(()=>{const o=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],a=[[""],[t.value.translations.target],...y.value.flatMap(c=>[[c.name],["%"]])],l=d.dataset.series.map((c,Ie)=>[c.name,c.target,...c.values.flatMap(V=>[V,isNaN(V/c.target)?"":V/c.target*100])]),r=o.concat([a]).concat(l),u=n.createCsvContent(r);n.downloadCsv({csvContent:u,title:t.value.style.chart.title.text||"vue-ui-radar"})})}const w=e.ref(!1);function se(o){w.value=o,F.value+=1}function H(){h.value.showTable=!h.value.showTable}function X(){h.value.showTooltip=!h.value.showTooltip}return Q({getData:ae,generatePdf:I,generateCsv:W,generateImage:R,toggleTable:H,toggleTooltip:X}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-radar ${w.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"radarChart",ref:b,id:`vue-ui-radar_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`)},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:L,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(ie._sfc_main,{config:{title:{cy:"radar-div-title",...t.value.style.chart.title},subtitle:{cy:"radar-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&k.value?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:te,key:`user_options_${F.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(A),isPrinting:e.unref(O),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:w.value,isTooltip:h.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:se,onGeneratePdf:e.unref(I),onGenerateCsv:W,onGenerateImage:e.unref(R),onToggleTable:H,onToggleTooltip:X},e.createSlots({_:2},[o.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:r})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:r})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),k.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(n.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":w.value,"vue-data-ui-fulscreen--off":!w.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`radar_gradient_${m.value}_${r}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(n.shiftHue)(l.color,.05)}${e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]}`},null,8,be),e.createElementVNode("stop",{offset:"100%","stop-color":l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity]},null,8,Ce)],8,ke))),256))]),t.value.style.chart.layout.grid.show?(e.openBlock(),e.createElementBlock("g",we,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,l=>(e.openBlock(),e.createElementBlock("line",{x1:s.value.width/2,y1:s.value.height/2,x2:l.x,y2:l.y,stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,Be))),256)),t.value.style.chart.layout.grid.graduations>0?(e.openBlock(),e.createElementBlock("g",_e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,l=>(e.openBlock(),e.createElementBlock("path",{d:e.unref(n.createPolygonPath)({plot:{x:s.value.width/2,y:s.value.height/2},radius:l,sides:U.value,rotation:0}).path,fill:"none",stroke:t.value.style.chart.layout.grid.stroke,"stroke-width":t.value.style.chart.layout.grid.strokeWidth},null,8,xe))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("path",{d:G.value.path,fill:"none",stroke:t.value.style.chart.layout.outerPolygon.stroke,"stroke-width":t.value.style.chart.layout.outerPolygon.strokeWidth,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,Pe),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("text",{x:T(l).x,y:T(l).y,"text-anchor":T(l).anchor,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.color,onMouseenter:u=>ue(l,r),onMouseleave:a[0]||(a[0]=u=>{P.value=!1,x.value=null})},e.toDisplayString(l.name),41,Ne))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("g",null,[t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:0,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.plots[r]),!1,!0),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth+1,fill:"none",class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Te)):e.createCommentVNode("",!0),t.value.useCssAnimation||!t.value.useCssAnimation&&!i.value.includes(r)?(e.openBlock(),e.createElementBlock("polygon",{key:1,"data-cy-radar-path":"",points:e.unref(n.makePath)(g.value.map(u=>u.plots[r]),!1,!0),stroke:l.color,"stroke-width":t.value.style.chart.layout.dataPolygon.strokeWidth,fill:t.value.style.chart.layout.dataPolygon.transparent?"transparent":t.value.style.chart.layout.dataPolygon.useGradient?`url(#radar_gradient_${m.value}_${r})`:l.color+e.unref(n.opacity)[t.value.style.chart.layout.dataPolygon.opacity],class:e.normalizeClass({"animated-out":i.value.includes(r)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===r&&t.value.useCssAnimation})},null,10,Se)):e.createCommentVNode("",!0)])]))),256)),t.value.style.chart.layout.plots.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(l,r)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.plots,(u,c)=>(e.openBlock(),e.createElementBlock("circle",{cx:u.x,cy:u.y,fill:i.value.includes(c)?"transparent":v.value[c].color,r:x.value!==null&&x.value===r?t.value.style.chart.layout.plots.radius*1.6:t.value.style.chart.layout.plots.radius,stroke:i.value.includes(c)?"transparent":t.value.style.chart.backgroundColor,"stroke-width":.5,class:e.normalizeClass({"animated-out":i.value.includes(c)&&t.value.useCssAnimation,"animated-in":f.value&&C.value===c&&t.value.useCssAnimation})},null,10,Ve))),256))]))),256))])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"svg",{svg:s.value},void 0,!0)],14,ye)):e.createCommentVNode("",!0),o.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Fe,[e.renderSlot(o.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(O)||e.unref(A)})),void 0,!0)])):e.createCommentVNode("",!0),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(he.default,{key:4,config:{type:"radar",style:{backgroundColor:t.value.style.chart.backgroundColor,radar:{grid:{color:t.value.style.chart.layout.outerPolygon.stroke},shapes:{color:t.value.style.chart.layout.outerPolygon.stroke}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:z},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(ve.Legend,{key:0,legendSet:y.value,config:ne.value,onClickMarker:a[1]||(a[1]=({i:l})=>M(l))},{item:e.withCtx(({legend:l,index:r})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>l.segregate(),style:e.normalizeStyle(`opacity:${i.value.includes(r)?.5:1}`)},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(n.dataLabel)({v:l.totalProportion*100,s:"%",r:t.value.style.chart.legend.roundingPercentage})),13,Le)]),_:1},8,["legendSet","config"])):e.renderSlot(o.$slots,"legend",{key:1,legend:y.value},void 0,!0)],512),e.createVNode(ce._sfc_main,{show:h.value.showTooltip&&P.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,fontSize:t.value.style.chart.tooltip.fontSize,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:$.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(o.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[["function"].includes(typeof t.value.style.chart.tooltip.customFormat)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ze,[e.createVNode(de.default,{dataset:S.value,config:oe.value,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity},null,8,["dataset","config","backgroundOpacity"])])),e.renderSlot(o.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...E.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","backgroundOpacity","fontSize","position","offsetY","parent","content","isCustom"]),k.value?(e.openBlock(),e.createBlock(ge.default,{key:5,hideDetails:"",config:{open:h.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(pe.DataTable,{colNames:_.value.colNames,head:_.value.head,body:_.value.body,config:_.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=l=>h.value.showTable=!1)},{th:e.withCtx(({th:l})=>[e.createTextVNode(e.toDisplayString(l.name),1)]),td:e.withCtx(({td:l})=>[e.createTextVNode(e.toDisplayString(l),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,fe))}},Ae=me._export_sfc(Oe,[["__scopeId","data-v-614f05d5"]]);exports.default=Ae;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CDK3omwG.cjs"),H=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-CR-JDJwq.cjs"),W=require("./usePrinter-vQu-8tRD.cjs"),ne=require("./Tooltip-B4DNihSF.cjs"),ue=require("./DataTable-CPAt686N.cjs"),se=require("./Legend-BJ2Mynop.cjs"),ie=require("./vue-ui-skeleton-DRDC3yxK.cjs"),ce=require("./vue-ui-accordion-EVAolVkD.cjs"),G=require("./useNestedProp-CaaW8JIS.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ve=["id"],pe=["xmlns","viewBox"],he=["id"],ge=["stop-color"],fe=["stop-color"],me=["stroke","cx","cy","r","fill"],ye=["stroke","stroke-width","cx","cy","r","fill"],be=["cx","cy","r","onMouseenter"],ke={key:3,class:"vue-data-ui-watermark"},Ce=["onClick"],we={key:0},xe={key:1},Te=["innerHTML"],$e={__name:"vue-ui-rings",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(j,{expose:X,emit:Y}){const v=j,{vue_ui_rings:J}=r.useConfig(),y=e.ref(!1),x=e.computed(()=>!!v.dataset&&v.dataset.length),b=e.ref(r.createUid()),K=e.ref(null),T=e.ref(!1),_=e.ref(""),m=e.ref(null),L=e.ref(0),k=e.ref(null),V=e.ref(null),E=e.ref(null),t=e.computed(()=>{const l=G.useNestedProp({userConfig:v.config,defaultConfig:J});return l.theme?{...G.useNestedProp({userConfig:r.themes.vue_ui_rings[l.theme]||v.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}),$=e.ref(null);e.onMounted(()=>{if(r.objectIsEmpty(v.dataset)?r.error({componentName:"VueUiRings",type:"dataset"}):v.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiRings",type:"datasetSerieAttribute",property:o,index:a})})}),t.value.responsive){const l=H.throttle(()=>{const{width:a,height:o}=H.useResponsive({chart:k.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?E.value:null});s.value.width=a,s.value.height=o});$.value=new ResizeObserver(l),$.value.observe(k.value.parentNode)}setTimeout(()=>{y.value=!0},600)}),e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:z,isImaging:F,generatePdf:I,generateImage:O}=W.usePrinter({elementId:`rings_${b.value}`,fileName:t.value.style.chart.title.text||"vue-ui-rings"}),M=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),g=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),s=e.ref({height:360,width:360}),Q=e.computed(()=>Math.min(s.value.height,s.value.width)),i=e.ref([]);function P(l){i.value.includes(l)?i.value=i.value.filter(a=>a!==l):i.value.push(l),Y("selectLegend",c.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const Z=e.computed(()=>Math.max(...N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l)));function R(l){return l/Z.value}const N=e.computed(()=>v.dataset.map(({values:l,name:a,color:o=null},n)=>{const u=(l||[]).reduce((h,w)=>h+w,0);return{name:a,color:o||r.convertColorToHex(o)||M.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:u,proportion:u/v.dataset.map(h=>(h.values||[]).reduce((w,ae)=>w+ae,0)).reduce((h,w)=>h+w,0),uid:r.createUid()}})),D=e.computed(()=>N.value.map(l=>({...l,shape:"circle",opacity:i.value.includes(l.uid)?.5:1,segregate:()=>P(l.uid),isSegregated:i.value.includes(l.uid)})).toSorted((l,a)=>a.value-l.value)),ee=e.computed(()=>({cy:"rings-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({value:l})=>l).reduce((l,a)=>l+a,0)),c=e.computed(()=>N.value.filter(l=>!i.value.includes(l.uid)).map(({name:l,value:a,color:o=null,uid:n},u)=>({uid:n,name:l,color:o||r.convertColorToHex(o)||M.value[u]||r.palette[u]||r.palette[u%r.palette.length],value:a,proportion:R(a),percentage:a/p.value*100,strokeWidth:t.value.style.chart.layout.rings.strokeWidth*R(a)})).toSorted((l,a)=>a.value-l.value));function te(){return c.value.map(({name:l,color:a,value:o,absoluteValues:n,percentage:u})=>({name:l,color:a,value:o,absoluteValues:n,percentage:u}))}const d=e.computed(()=>Q.value-t.value.style.chart.layout.rings.strokeWidth*2),B=e.ref(null);function le(l,a){if(i.value.length===v.dataset.length)return;B.value={datapoint:a,seriesIndex:l,series:c.value,config:t.value},m.value=l;const o=c.value[l],n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:l,datapoint:a,series:c.value,config:t.value})))_.value=n({seriesIndex:l,datapoint:a,series:c.value,config:t.value});else{let u="";u+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`,u+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${o.color}" /></svg>`,t.value.style.chart.tooltip.showValue&&(u+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:a,seriesIndex:l})}
|
|
2
|
-
</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?u+=`<span>(${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:u+=`<b>${r.dataLabel({v:o.value/p.value*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),_.value=u}T.value=!0}const f=e.computed(()=>{const l=c.value.map(o=>({name:o.name,color:o.color})),a=c.value.map(o=>o.value);return{head:l,body:a}}),S=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=f.value.head.map((u,h)=>[{color:u.color,name:u.name},r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:f.value.body[h],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),isNaN(f.value.body[h]/p.value)?"-":(f.value.body[h]/p.value*100).toFixed(t.value.table.td.roundingPercentage)+"%"]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},n=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage];return{head:l,body:a,config:o,colNames:n}});function q(){e.nextTick(()=>{const l=f.value.head.map((n,u)=>[[n.name],[f.value.body[u]],[isNaN(f.value.body[u]/p.value)?"-":f.value.body[u]/p.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-rings"})})}const C=e.ref(!1);function oe(l){C.value=l,L.value+=1}function A(){g.value.showTable=!g.value.showTable}function U(){g.value.showTooltip=!g.value.showTooltip}return X({getData:te,generatePdf:I,generateCsv:q,generateImage:O,toggleTable:A,toggleTooltip:U}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"ringsChart",ref:k,class:e.normalizeClass(`vue-ui-rings ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};text-align:center;width:100%;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height: 100%":""}`),id:`rings_${b.value}`,onMouseleave:a[3]||(a[3]=o=>{m.value=null,T.value=!1})},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:V,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor}`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"rings-div-title",...t.value.style.chart.title},subtitle:{cy:"rings-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value?(e.openBlock(),e.createBlock(W.UserOptions,{ref_key:"details",ref:K,key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(z),isImaging:e.unref(F),uid:b.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:g.value.showTooltip,isFullscreen:C.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,onToggleFullscreen:oe,onGeneratePdf:e.unref(I),onGenerateCsv:q,onGenerateImage:e.unref(O),onToggleTable:A,onToggleTooltip:U},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${s.value.width<=0?10:s.value.width} ${s.value.height<=0?10:s.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"30%",r:"50%",fx:"50%",fy:"50%",id:`gradient_${b.value}_${n}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(r.shiftHue)(o.color,.05)}${e.unref(r.opacity)[100-t.value.style.chart.layout.rings.gradient.intensity]}`},null,8,ge),e.createElementVNode("stop",{offset:"100%","stop-color":o.color},null,8,fe)],8,he))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-opacity":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:t.value.style.chart.layout.rings.gradient.underlayerColor},null,14,me),e.createElementVNode("circle",{class:e.normalizeClass({"vue-ui-rings-item":y.value&&t.value.useCssAnimation,"vue-rings-item-onload":!y.value&&t.value.useCssAnimation,"vue-ui-rings-shadow":t.value.style.chart.layout.rings.useShadow,"vue-ui-rings-blur":m.value!==null&&m.value!==n}),style:e.normalizeStyle(`animation-delay:${n*100}ms`),stroke:t.value.style.chart.layout.rings.stroke,"stroke-width":o.strokeWidth<.5?.5:o.strokeWidth,cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:t.value.style.chart.layout.rings.gradient.show?`url(#gradient_${b.value}_${n})`:o.color},null,14,ye),e.createElementVNode("circle",{"data-cy-trap":"",stroke:"none",cx:s.value.width/2,cy:n===0?s.value.height/2:s.value.height/2+d.value*c.value[0].proportion/2-d.value*o.proportion/2-2*(n+1),r:d.value*o.proportion/2*.9<=0?1e-4:d.value*o.proportion/2*.9,fill:"transparent",onMouseenter:u=>le(n,o),onMouseleave:a[0]||(a[0]=u=>{m.value=null,T.value=!1})},null,40,be)]))),256)),e.renderSlot(l.$slots,"svg",{svg:s.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ke,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(z)||e.unref(F)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:4,config:{type:"rings",style:{backgroundColor:t.value.style.chart.backgroundColor,rings:{color:"#CCCCCC"}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:E},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(se.Legend,{key:0,legendSet:D.value,config:ee.value,onClickMarker:a[1]||(a[1]=({legend:o})=>P(o.uid))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:u=>P(o.uid),style:e.normalizeStyle(`opacity:${i.value.includes(o.uid)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),i.value.includes(o.uid)?(e.openBlock(),e.createElementBlock("span",xe," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",we," ("+e.toDisplayString(isNaN(o.value/p.value)?"-":e.unref(r.dataLabel)({v:o.value/p.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ce)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:D.value},void 0,!0)],512),e.createVNode(ne._sfc_main,{show:g.value.showTooltip&&T.value&&i.value.length<v.dataset.length,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:k.value,content:_.value,isCustom:t.value.style.chart.tooltip.customFormat&&typeof t.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...B.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),x.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:g.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ue.DataTable,{colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>g.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Te)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,ve))}},Ne=de._export_sfc($e,[["__scopeId","data-v-747e43da"]]);exports.default=Ne;
|
|
@@ -1,251 +0,0 @@
|
|
|
1
|
-
import { computed as u, ref as p, onMounted as R, openBlock as n, createElementBlock as i, normalizeStyle as j, createBlock as w, unref as y, createElementVNode as g, createCommentVNode as v, toDisplayString as A } from "vue";
|
|
2
|
-
import { u as W, c as X, t as Z, o as H, e as J, R as K, X as Q, v as z, N as I, f as B, i as Y } from "./index-CpHoINpJ.js";
|
|
3
|
-
import { u as D } from "./useNestedProp-BOjw3Yqn.js";
|
|
4
|
-
import N from "./BaseIcon-Fm7sUbd2.js";
|
|
5
|
-
import ee from "./vue-ui-skeleton-DuM6yey6.js";
|
|
6
|
-
import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
const le = ["id"], ae = ["xmlns", "viewBox"], ne = ["id"], oe = ["stop-color"], se = ["stop-color"], ue = { key: 0 }, re = ["d", "fill"], ie = ["d", "fill"], de = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], ve = ["d", "stroke", "stroke-width", "stroke-linecap", "stroke-linejoin"], ye = ["height", "width", "x"], ce = { style: { width: "100%" } }, he = ["x", "y", "fill", "font-size", "font-weight"], fe = ["stroke", "cx", "cy", "fill"], pe = ["x", "y", "font-size", "fill", "font-weight"], ge = {
|
|
8
|
-
__name: "vue-ui-spark-trend",
|
|
9
|
-
props: {
|
|
10
|
-
config: {
|
|
11
|
-
type: Object,
|
|
12
|
-
default() {
|
|
13
|
-
return {};
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
dataset: {
|
|
17
|
-
type: Array,
|
|
18
|
-
default() {
|
|
19
|
-
return [];
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
setup(E) {
|
|
24
|
-
const s = E, { vue_ui_spark_trend: V } = W(), G = u(() => !!s.dataset && s.dataset.length), m = p(X()), e = u(() => {
|
|
25
|
-
const t = D({
|
|
26
|
-
userConfig: s.config,
|
|
27
|
-
defaultConfig: V
|
|
28
|
-
});
|
|
29
|
-
return t.theme ? {
|
|
30
|
-
...D({
|
|
31
|
-
userConfig: Z.vue_ui_spark_trend[t.theme] || s.config,
|
|
32
|
-
defaultConfig: t
|
|
33
|
-
})
|
|
34
|
-
} : t;
|
|
35
|
-
});
|
|
36
|
-
function C(t) {
|
|
37
|
-
return t.map((o) => [void 0].includes(o) ? null : o);
|
|
38
|
-
}
|
|
39
|
-
const k = p(s.dataset.map((t) => e.value.style.animation.show || [void 0].includes(t) ? null : t)), f = p(!1), L = p(null);
|
|
40
|
-
R(() => {
|
|
41
|
-
H(s.dataset) && J({
|
|
42
|
-
componentName: "VueUiTrendPill",
|
|
43
|
-
type: "dataset"
|
|
44
|
-
});
|
|
45
|
-
let o = 1e3 / e.value.style.animation.animationFrames, d = performance.now();
|
|
46
|
-
if (e.value.style.animation.show && e.value.style.animation.animationFrames && s.dataset.length > 1) {
|
|
47
|
-
let T = function() {
|
|
48
|
-
f.value = !0;
|
|
49
|
-
let S = performance.now(), F = S - d;
|
|
50
|
-
F > o ? (d = S - F % o, h < s.dataset.length ? (k.value.push(s.dataset[h]), h += 1, L.value = requestAnimationFrame(T)) : (cancelAnimationFrame(L.value), k.value = C(s.dataset), f.value = !1)) : L.value = requestAnimationFrame(T);
|
|
51
|
-
};
|
|
52
|
-
k.value = [];
|
|
53
|
-
let h = 0;
|
|
54
|
-
T();
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
const a = p({
|
|
58
|
-
height: 80,
|
|
59
|
-
width: 300
|
|
60
|
-
}), c = u(() => ({
|
|
61
|
-
top: e.value.style.padding.top,
|
|
62
|
-
left: e.value.style.padding.left,
|
|
63
|
-
right: a.value.width - e.value.style.padding.right,
|
|
64
|
-
bottom: a.value.height - e.value.style.padding.bottom,
|
|
65
|
-
height: a.value.height - (e.value.style.padding.top + e.value.style.padding.bottom) - (e.value.style.dataLabel.show ? e.value.style.dataLabel.fontSize : 0),
|
|
66
|
-
width: a.value.width - (e.value.style.padding.left + e.value.style.padding.right)
|
|
67
|
-
})), $ = u(() => {
|
|
68
|
-
const t = C(s.dataset);
|
|
69
|
-
return {
|
|
70
|
-
max: Math.max(...t),
|
|
71
|
-
min: Math.min(...t)
|
|
72
|
-
};
|
|
73
|
-
}), _ = u(() => {
|
|
74
|
-
const t = $.value.min >= 0 ? 0 : $.value.min;
|
|
75
|
-
return Math.abs(t);
|
|
76
|
-
}), O = u(() => $.value.max + _.value);
|
|
77
|
-
function M(t) {
|
|
78
|
-
return t / O.value;
|
|
79
|
-
}
|
|
80
|
-
const U = u(() => s.dataset.length), l = u(() => k.value.map((t, o) => {
|
|
81
|
-
const d = isNaN(t) || [void 0, null, "NaN", NaN, 1 / 0, -1 / 0].includes(t) ? 0 : t || 0;
|
|
82
|
-
return {
|
|
83
|
-
value: t,
|
|
84
|
-
absoluteValue: d,
|
|
85
|
-
plotValue: d + _.value,
|
|
86
|
-
toMax: M(d + _.value),
|
|
87
|
-
x: c.value.left + o * (c.value.width / (U.value - 1)) - e.value.style.padding.right,
|
|
88
|
-
y: c.value.bottom - c.value.height * M(d + _.value)
|
|
89
|
-
};
|
|
90
|
-
})), b = u(() => {
|
|
91
|
-
const t = C(s.dataset);
|
|
92
|
-
return e.value.style.trendLabel.trendType === "global" ? K(t) : e.value.style.trendLabel.trendType === "n-1" && t.length > 1 ? (t.at(-1) / t.at(-2) - 1) * 100 : e.value.style.trendLabel.trendType === "lastToFirst" ? (t.at(-1) / t[0] - 1) * 100 : 0;
|
|
93
|
-
}), x = u(() => f.value || b.value === 0 ? "neutral" : b.value > 0 ? "positive" : "negative"), r = u(() => e.value.style.arrow.colors[x.value]), P = u(() => {
|
|
94
|
-
const t = { x: l.value[0].x, y: a.value.height - 6 }, o = { x: l.value[l.value.length - 1].x, y: a.value.height - 6 }, d = [];
|
|
95
|
-
return l.value.forEach((h) => {
|
|
96
|
-
d.push(`${h.x},${h.y} `);
|
|
97
|
-
}), [t.x, t.y, ...d, o.x, o.y].toString();
|
|
98
|
-
}), q = u(() => {
|
|
99
|
-
let t = [];
|
|
100
|
-
return l.value.forEach((o) => {
|
|
101
|
-
t.push(`${o.x},${o.y} `);
|
|
102
|
-
}), `M ${t.toString()}`;
|
|
103
|
-
});
|
|
104
|
-
return (t, o) => (n(), i("div", {
|
|
105
|
-
class: "vue-ui-spark-trend",
|
|
106
|
-
id: m.value,
|
|
107
|
-
style: j(`width:100%;font-family:${e.value.style.fontFamily};backgroundColor:${e.value.style.backgroundColor}`)
|
|
108
|
-
}, [
|
|
109
|
-
G.value ? (n(), i("svg", {
|
|
110
|
-
key: 1,
|
|
111
|
-
xmlns: y(Q),
|
|
112
|
-
viewBox: `0 0 ${a.value.width} ${a.value.height}`,
|
|
113
|
-
style: j(`width:100%;background:${e.value.style.backgroundColor};overflow:visible`)
|
|
114
|
-
}, [
|
|
115
|
-
g("defs", null, [
|
|
116
|
-
g("linearGradient", {
|
|
117
|
-
x1: "0%",
|
|
118
|
-
y1: "0%",
|
|
119
|
-
x2: "0%",
|
|
120
|
-
y2: "100%",
|
|
121
|
-
id: `pill_gradient_${m.value}`
|
|
122
|
-
}, [
|
|
123
|
-
g("stop", {
|
|
124
|
-
offset: "0%",
|
|
125
|
-
"stop-color": (e.value.style.line.useColorTrend ? r.value : e.value.style.line.stroke) + y(z)[e.value.style.area.opacity]
|
|
126
|
-
}, null, 8, oe),
|
|
127
|
-
g("stop", {
|
|
128
|
-
offset: "100%",
|
|
129
|
-
"stop-color": e.value.style.backgroundColor
|
|
130
|
-
}, null, 8, se)
|
|
131
|
-
], 8, ne)
|
|
132
|
-
]),
|
|
133
|
-
e.value.style.area.show && l.value[0] ? (n(), i("g", ue, [
|
|
134
|
-
e.value.style.line.smooth ? (n(), i("path", {
|
|
135
|
-
key: 0,
|
|
136
|
-
d: `M ${l.value[0].x},${c.value.bottom} ${y(I)(l.value)} L ${l.value.at(-1).x},${c.value.bottom} Z`,
|
|
137
|
-
fill: e.value.style.area.useGradient ? `url(#pill_gradient_${m.value})` : `${e.value.style.line.useColorTrend ? r.value : e.value.style.line.stroke}${y(z)[e.value.style.area.opacity]}`,
|
|
138
|
-
stroke: "none"
|
|
139
|
-
}, null, 8, re)) : (n(), i("path", {
|
|
140
|
-
key: 1,
|
|
141
|
-
d: `M${P.value}Z`,
|
|
142
|
-
fill: e.value.style.area.useGradient ? `url(#pill_gradient_${m.value})` : `${e.value.style.line.useColorTrend ? r.value : e.value.style.line.stroke}${y(z)[e.value.style.area.opacity]}`,
|
|
143
|
-
stroke: "none"
|
|
144
|
-
}, null, 8, ie))
|
|
145
|
-
])) : v("", !0),
|
|
146
|
-
e.value.style.line.smooth && l.value.length ? (n(), i("path", {
|
|
147
|
-
key: 1,
|
|
148
|
-
d: `M ${y(I)(l.value)}`,
|
|
149
|
-
stroke: e.value.style.line.useColorTrend ? r.value : e.value.style.line.stroke,
|
|
150
|
-
fill: "none",
|
|
151
|
-
"stroke-width": e.value.style.line.strokeWidth,
|
|
152
|
-
"stroke-linecap": e.value.style.line.strokeLinecap,
|
|
153
|
-
"stroke-linejoin": e.value.style.line.strokeLinejoin
|
|
154
|
-
}, null, 8, de)) : v("", !0),
|
|
155
|
-
!e.value.style.line.smooth && l.value.length ? (n(), i("path", {
|
|
156
|
-
key: 2,
|
|
157
|
-
d: q.value,
|
|
158
|
-
stroke: e.value.style.line.useColorTrend ? r.value : e.value.style.line.stroke,
|
|
159
|
-
fill: "none",
|
|
160
|
-
"stroke-width": e.value.style.line.strokeWidth,
|
|
161
|
-
"stroke-linecap": e.value.style.line.strokeLinecap,
|
|
162
|
-
"stroke-linejoin": e.value.style.line.strokeLinejoin
|
|
163
|
-
}, null, 8, ve)) : v("", !0),
|
|
164
|
-
f.value ? v("", !0) : (n(), i("foreignObject", {
|
|
165
|
-
key: 3,
|
|
166
|
-
height: a.value.height / 2,
|
|
167
|
-
width: a.value.height / 2,
|
|
168
|
-
x: a.value.height / 5,
|
|
169
|
-
y: 8
|
|
170
|
-
}, [
|
|
171
|
-
g("div", ce, [
|
|
172
|
-
x.value === "positive" ? (n(), w(N, {
|
|
173
|
-
key: 0,
|
|
174
|
-
stroke: r.value,
|
|
175
|
-
name: "arrowTop",
|
|
176
|
-
size: a.value.height / 2
|
|
177
|
-
}, null, 8, ["stroke", "size"])) : v("", !0),
|
|
178
|
-
x.value === "negative" ? (n(), w(N, {
|
|
179
|
-
key: 1,
|
|
180
|
-
stroke: r.value,
|
|
181
|
-
name: "arrowBottom",
|
|
182
|
-
size: a.value.height / 2
|
|
183
|
-
}, null, 8, ["stroke", "size"])) : v("", !0),
|
|
184
|
-
x.value === "neutral" ? (n(), w(N, {
|
|
185
|
-
key: 2,
|
|
186
|
-
stroke: r.value,
|
|
187
|
-
name: "arrowRight",
|
|
188
|
-
size: a.value.height / 2
|
|
189
|
-
}, null, 8, ["stroke", "size"])) : v("", !0)
|
|
190
|
-
])
|
|
191
|
-
], 8, ye)),
|
|
192
|
-
f.value ? v("", !0) : (n(), i("text", {
|
|
193
|
-
key: 4,
|
|
194
|
-
x: a.value.height / 2 - a.value.height / 20,
|
|
195
|
-
y: c.value.bottom,
|
|
196
|
-
"text-anchor": "middle",
|
|
197
|
-
fill: e.value.style.trendLabel.useColorTrend ? r.value : e.value.style.trendLabel.color,
|
|
198
|
-
"font-size": e.value.style.trendLabel.fontSize,
|
|
199
|
-
"font-weight": e.value.style.trendLabel.bold ? "bold" : "normal"
|
|
200
|
-
}, A(y(B)({
|
|
201
|
-
p: b.value > 0 ? "+" : "",
|
|
202
|
-
v: b.value,
|
|
203
|
-
s: "%",
|
|
204
|
-
r: e.value.style.trendLabel.rounding
|
|
205
|
-
})), 9, he)),
|
|
206
|
-
l.value.length && l.value.at(-1).x !== void 0 ? (n(), i("circle", {
|
|
207
|
-
key: 5,
|
|
208
|
-
stroke: e.value.style.backgroundColor,
|
|
209
|
-
"stroke-width": 2,
|
|
210
|
-
cx: l.value.at(-1).x,
|
|
211
|
-
cy: l.value.at(-1).y,
|
|
212
|
-
r: 4,
|
|
213
|
-
fill: r.value
|
|
214
|
-
}, null, 8, fe)) : v("", !0),
|
|
215
|
-
l.value.length && l.value.at(-1).x !== void 0 && e.value.style.dataLabel.show ? (n(), i("text", {
|
|
216
|
-
key: 6,
|
|
217
|
-
"text-anchor": "middle",
|
|
218
|
-
x: l.value.at(-1).x,
|
|
219
|
-
y: l.value.at(-1).y - e.value.style.dataLabel.fontSize / 1.5,
|
|
220
|
-
"font-size": e.value.style.dataLabel.fontSize,
|
|
221
|
-
fill: e.value.style.dataLabel.useColorTrend ? r.value : e.value.style.dataLabel.color,
|
|
222
|
-
"font-weight": e.value.style.dataLabel.bold ? "bold" : "normal"
|
|
223
|
-
}, A(y(Y)(
|
|
224
|
-
e.value.style.dataLabel.formatter,
|
|
225
|
-
l.value.at(-1).value,
|
|
226
|
-
y(B)({
|
|
227
|
-
p: e.value.style.dataLabel.prefix,
|
|
228
|
-
v: l.value.at(-1).value,
|
|
229
|
-
s: e.value.style.dataLabel.suffix,
|
|
230
|
-
r: e.value.style.dataLabel.rounding
|
|
231
|
-
}),
|
|
232
|
-
{ datapoint: l.value.at(-1) }
|
|
233
|
-
)), 9, pe)) : v("", !0)
|
|
234
|
-
], 12, ae)) : (n(), w(ee, {
|
|
235
|
-
key: 0,
|
|
236
|
-
config: {
|
|
237
|
-
type: "sparkline",
|
|
238
|
-
style: {
|
|
239
|
-
backgroundColor: e.value.style.backgroundColor,
|
|
240
|
-
sparkline: {
|
|
241
|
-
color: "#CCCCCC"
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}, null, 8, ["config"]))
|
|
246
|
-
], 12, le));
|
|
247
|
-
}
|
|
248
|
-
}, Ce = /* @__PURE__ */ te(ge, [["__scopeId", "data-v-e9fd1997"]]);
|
|
249
|
-
export {
|
|
250
|
-
Ce as default
|
|
251
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("./index-CDK3omwG.cjs"),L=require("./useNestedProp-CaaW8JIS.cjs"),x=require("./BaseIcon-Bv5uh10R.cjs"),M=require("./vue-ui-skeleton-DRDC3yxK.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),j=["id"],q=["xmlns","viewBox"],A=["id"],I=["stop-color"],D=["stop-color"],P={key:0},G=["d","fill"],O=["d","fill"],U=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],W=["d","stroke","stroke-width","stroke-linecap","stroke-linejoin"],Z=["height","width","x"],H={style:{width:"100%"}},R=["x","y","fill","font-size","font-weight"],X=["stroke","cx","cy","fill"],J=["x","y","font-size","fill","font-weight"],K={__name:"vue-ui-spark-trend",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(N){const r=N,{vue_ui_spark_trend:$}=n.useConfig(),E=e.computed(()=>!!r.dataset&&r.dataset.length),y=e.ref(n.createUid()),t=e.computed(()=>{const l=L.useNestedProp({userConfig:r.config,defaultConfig:$});return l.theme?{...L.useNestedProp({userConfig:n.themes.vue_ui_spark_trend[l.theme]||r.config,defaultConfig:l})}:l});function k(l){return l.map(u=>[void 0].includes(u)?null:u)}const h=e.ref(r.dataset.map(l=>t.value.style.animation.show||[void 0].includes(l)?null:l)),v=e.ref(!1),g=e.ref(null);e.onMounted(()=>{n.objectIsEmpty(r.dataset)&&n.error({componentName:"VueUiTrendPill",type:"dataset"});let u=1e3/t.value.style.animation.animationFrames,i=performance.now();if(t.value.style.animation.show&&t.value.style.animation.animationFrames&&r.dataset.length>1){let b=function(){v.value=!0;let w=performance.now(),B=w-i;B>u?(i=w-B%u,c<r.dataset.length?(h.value.push(r.dataset[c]),c+=1,g.value=requestAnimationFrame(b)):(cancelAnimationFrame(g.value),h.value=k(r.dataset),v.value=!1)):g.value=requestAnimationFrame(b)};h.value=[];let c=0;b()}});const o=e.ref({height:80,width:300}),d=e.computed(()=>({top:t.value.style.padding.top,left:t.value.style.padding.left,right:o.value.width-t.value.style.padding.right,bottom:o.value.height-t.value.style.padding.bottom,height:o.value.height-(t.value.style.padding.top+t.value.style.padding.bottom)-(t.value.style.dataLabel.show?t.value.style.dataLabel.fontSize:0),width:o.value.width-(t.value.style.padding.left+t.value.style.padding.right)})),_=e.computed(()=>{const l=k(r.dataset);return{max:Math.max(...l),min:Math.min(...l)}}),p=e.computed(()=>{const l=_.value.min>=0?0:_.value.min;return Math.abs(l)}),V=e.computed(()=>_.value.max+p.value);function C(l){return l/V.value}const T=e.computed(()=>r.dataset.length),a=e.computed(()=>h.value.map((l,u)=>{const i=isNaN(l)||[void 0,null,"NaN",NaN,1/0,-1/0].includes(l)?0:l||0;return{value:l,absoluteValue:i,plotValue:i+p.value,toMax:C(i+p.value),x:d.value.left+u*(d.value.width/(T.value-1))-t.value.style.padding.right,y:d.value.bottom-d.value.height*C(i+p.value)}})),m=e.computed(()=>{const l=k(r.dataset);return t.value.style.trendLabel.trendType==="global"?n.calcTrend(l):t.value.style.trendLabel.trendType==="n-1"&&l.length>1?(l.at(-1)/l.at(-2)-1)*100:t.value.style.trendLabel.trendType==="lastToFirst"?(l.at(-1)/l[0]-1)*100:0}),f=e.computed(()=>v.value||m.value===0?"neutral":m.value>0?"positive":"negative"),s=e.computed(()=>t.value.style.arrow.colors[f.value]),z=e.computed(()=>{const l={x:a.value[0].x,y:o.value.height-6},u={x:a.value[a.value.length-1].x,y:o.value.height-6},i=[];return a.value.forEach(c=>{i.push(`${c.x},${c.y} `)}),[l.x,l.y,...i,u.x,u.y].toString()}),S=e.computed(()=>{let l=[];return a.value.forEach(u=>{l.push(`${u.x},${u.y} `)}),`M ${l.toString()}`});return(l,u)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-spark-trend",id:y.value,style:e.normalizeStyle(`width:100%;font-family:${t.value.style.fontFamily};backgroundColor:${t.value.style.backgroundColor}`)},[E.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(n.XMLNS),viewBox:`0 0 ${o.value.width} ${o.value.height}`,style:e.normalizeStyle(`width:100%;background:${t.value.style.backgroundColor};overflow:visible`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{x1:"0%",y1:"0%",x2:"0%",y2:"100%",id:`pill_gradient_${y.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":(t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke)+e.unref(n.opacity)[t.value.style.area.opacity]},null,8,I),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.backgroundColor},null,8,D)],8,A)]),t.value.style.area.show&&a.value[0]?(e.openBlock(),e.createElementBlock("g",P,[t.value.style.line.smooth?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${a.value[0].x},${d.value.bottom} ${e.unref(n.createSmoothPath)(a.value)} L ${a.value.at(-1).x},${d.value.bottom} Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:`${t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke}${e.unref(n.opacity)[t.value.style.area.opacity]}`,stroke:"none"},null,8,G)):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M${z.value}Z`,fill:t.value.style.area.useGradient?`url(#pill_gradient_${y.value})`:`${t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke}${e.unref(n.opacity)[t.value.style.area.opacity]}`,stroke:"none"},null,8,O))])):e.createCommentVNode("",!0),t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${e.unref(n.createSmoothPath)(a.value)}`,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,U)):e.createCommentVNode("",!0),!t.value.style.line.smooth&&a.value.length?(e.openBlock(),e.createElementBlock("path",{key:2,d:S.value,stroke:t.value.style.line.useColorTrend?s.value:t.value.style.line.stroke,fill:"none","stroke-width":t.value.style.line.strokeWidth,"stroke-linecap":t.value.style.line.strokeLinecap,"stroke-linejoin":t.value.style.line.strokeLinejoin},null,8,W)):e.createCommentVNode("",!0),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("foreignObject",{key:3,height:o.value.height/2,width:o.value.height/2,x:o.value.height/5,y:8},[e.createElementVNode("div",H,[f.value==="positive"?(e.openBlock(),e.createBlock(x.default,{key:0,stroke:s.value,name:"arrowTop",size:o.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),f.value==="negative"?(e.openBlock(),e.createBlock(x.default,{key:1,stroke:s.value,name:"arrowBottom",size:o.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0),f.value==="neutral"?(e.openBlock(),e.createBlock(x.default,{key:2,stroke:s.value,name:"arrowRight",size:o.value.height/2},null,8,["stroke","size"])):e.createCommentVNode("",!0)])],8,Z)),v.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:4,x:o.value.height/2-o.value.height/20,y:d.value.bottom,"text-anchor":"middle",fill:t.value.style.trendLabel.useColorTrend?s.value:t.value.style.trendLabel.color,"font-size":t.value.style.trendLabel.fontSize,"font-weight":t.value.style.trendLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(n.dataLabel)({p:m.value>0?"+":"",v:m.value,s:"%",r:t.value.style.trendLabel.rounding})),9,R)),a.value.length&&a.value.at(-1).x!==void 0?(e.openBlock(),e.createElementBlock("circle",{key:5,stroke:t.value.style.backgroundColor,"stroke-width":2,cx:a.value.at(-1).x,cy:a.value.at(-1).y,r:4,fill:s.value},null,8,X)):e.createCommentVNode("",!0),a.value.length&&a.value.at(-1).x!==void 0&&t.value.style.dataLabel.show?(e.openBlock(),e.createElementBlock("text",{key:6,"text-anchor":"middle",x:a.value.at(-1).x,y:a.value.at(-1).y-t.value.style.dataLabel.fontSize/1.5,"font-size":t.value.style.dataLabel.fontSize,fill:t.value.style.dataLabel.useColorTrend?s.value:t.value.style.dataLabel.color,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(n.applyDataLabel)(t.value.style.dataLabel.formatter,a.value.at(-1).value,e.unref(n.dataLabel)({p:t.value.style.dataLabel.prefix,v:a.value.at(-1).value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:a.value.at(-1)})),9,J)):e.createCommentVNode("",!0)],12,q)):(e.openBlock(),e.createBlock(M.default,{key:0,config:{type:"sparkline",style:{backgroundColor:t.value.style.backgroundColor,sparkline:{color:"#CCCCCC"}}}},null,8,["config"]))],12,j))}},Q=F._export_sfc(K,[["__scopeId","data-v-e9fd1997"]]);exports.default=Q;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-CDK3omwG.cjs"),g=require("./useNestedProp-CaaW8JIS.cjs"),C=require("./vue-ui-skeleton-DRDC3yxK.cjs"),$=["xmlns","viewBox"],w=["id"],N=["stop-color"],S=["stop-color"],L=["d","stroke","stroke-linecap"],B=["d","stroke","stroke-linecap","stroke-dashoffset"],E=["x","y","font-size","fill","font-weight"],z={__name:"vue-ui-sparkgauge",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(k){const a=k,{vue_ui_sparkgauge:b}=u.useConfig(),c=e.computed(()=>!!a.dataset&&Object.keys(a.dataset).length);e.onMounted(()=>{u.objectIsEmpty(a.dataset)?u.error({componentName:"VueUiSparkgauge",type:"dataset"}):u.getMissingDatasetAttributes({datasetObject:a.dataset,requiredAttributes:["value","min","max"]}).forEach(s=>{u.error({componentName:"VueUiSparkgauge",type:"datasetAttribute",property:s})})});const v=e.ref(u.createUid()),t=e.computed(()=>{const s=g.useNestedProp({userConfig:a.config,defaultConfig:b});return s.theme?{...g.useNestedProp({userConfig:u.themes.vue_ui_sparkgauge[s.theme]||a.config,defaultConfig:s})}:s}),n=e.computed(()=>({height:t.value.style.height,width:128,base:t.value.style.basePosition})),l=e.computed(()=>{const s=a.dataset.min??0,i=a.dataset.max??0,_=i-s;return{min:s,max:i,diff:_}}),o=e.ref(t.value.style.animation.show?l.value.min:a.dataset.value);e.watch(()=>a.dataset.value,()=>{o.value=e.ref(t.value.style.animation.show?l.value.min:a.dataset.value),m()});const d=e.computed(()=>o.value>l.value.max?l.value.max:o.value<l.value.min?l.value.min:o.value),h=e.computed(()=>l.value.diff/t.value.style.animation.speedMs);e.onMounted(()=>{m()});function m(){function s(){o.value+=h.value,o.value<a.dataset.value?requestAnimationFrame(s):o.value=a.dataset.value}t.value.style.animation.show&&(o.value=l.value.min,s())}const r=e.computed(()=>a.dataset.title??""),y=e.computed(()=>o.value>=0?(d.value-l.value.min)/l.value.diff:(Math.abs(l.value.min)-Math.abs(d.value))/l.value.diff),f=e.computed(()=>u.interpolateColorHex(t.value.style.colors.min,t.value.style.colors.max,l.value.min,l.value.max,o.value)),p=e.computed(()=>t.value.style.dataLabel.autoColor?f.value:t.value.style.dataLabel.color),x=e.computed(()=>t.value.style.track.autoColor?f.value:t.value.style.track.color);return(s,i)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width: 100%; background:${t.value.style.background}`)},[t.value.style.title.show&&r.value&&t.value.style.title.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(r.value),5)):e.createCommentVNode("",!0),c.value?(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(u.XMLNS),viewBox:`0 0 ${n.value.width} ${n.value.height}`,style:e.normalizeStyle(`overflow: visible; background:${t.value.style.background}; width:100%;`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`gradient_${v.value}`,x1:"-10%",y1:"100%",x2:"110%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.colors.min},null,8,N),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.colors.max},null,8,S)],8,w)]),e.createElementVNode("path",{d:`M10 ${n.value.base} A 1 1 0 1 1 118 ${n.value.base}`,stroke:t.value.style.gutter.color,"stroke-width":8,"stroke-linecap":t.value.style.gutter.strokeLinecap,fill:"none"},null,8,L),y.value!==0?(e.openBlock(),e.createElementBlock("path",{key:0,d:`M10 ${n.value.base} A 1 1 0 1 1 118 ${n.value.base}`,stroke:t.value.style.colors.showGradient?`url(#gradient_${v.value})`:x.value,"stroke-width":8,"stroke-linecap":t.value.style.track.strokeLinecap,fill:"none","stroke-dasharray":169.5,"stroke-dashoffset":169.5-169.5*y.value,class:e.normalizeClass({"vue-ui-sparkgauge-track":t.value.style.animation.show}),style:e.normalizeStyle(t.value.style.animation.show?`animation: vue-ui-sparkgauge-animation ${t.value.style.animation.speedMs}ms ease-in;`:"")},null,14,B)):e.createCommentVNode("",!0),e.createElementVNode("text",{"text-anchor":"middle",x:n.value.width/2,y:n.value.base+6+t.value.style.dataLabel.offsetY,"font-size":t.value.style.dataLabel.fontSize,fill:p.value,"font-weight":t.value.style.dataLabel.bold?"bold":"normal"},e.toDisplayString(e.unref(u.applyDataLabel)(t.value.style.dataLabel.formatter,o.value,e.unref(u.dataLabel)({p:t.value.style.dataLabel.prefix,v:o.value,s:t.value.style.dataLabel.suffix,r:t.value.style.dataLabel.rounding}),{datapoint:o.value,color:p.value})),9,E)],12,$)):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(C.default,{key:2,config:{type:"gauge",style:{backgroundColor:t.value.style.background,gauge:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.title.show&&r.value&&t.value.style.title.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:3,class:"vue-data-ui-sparkgauge-label",style:e.normalizeStyle(`font-size:${t.value.style.title.fontSize}px;text-align:${t.value.style.title.textAlign};font-weight:${t.value.style.title.bold?"bold":"normal"};font-weight:${t.value.style.title.bold?"bold":"normal"};color:${t.value.style.title.color}`)},e.toDisplayString(r.value),5)):e.createCommentVNode("",!0)],4))}};exports.default=z;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-CDK3omwG.cjs"),j=require("./useResponsive-B3TrDDIG.cjs"),re=require("./Title-CR-JDJwq.cjs"),X=require("./usePrinter-vQu-8tRD.cjs"),se=require("./Tooltip-B4DNihSF.cjs"),ne=require("./DataTable-CPAt686N.cjs"),ue=require("./vue-ui-skeleton-DRDC3yxK.cjs"),ie=require("./Shape-DWZSJJ6-.cjs"),ce=require("./vue-ui-accordion-EVAolVkD.cjs"),Y=require("./useNestedProp-CaaW8JIS.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),de=["id"],he=["xmlns","viewBox"],pe={key:0},me={key:0},ye=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],fe={key:1},be=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],ge=["x1","x2","y1","y2","stroke","stroke-width"],ke=["x1","x2","y1","y2","stroke","stroke-width"],xe=["x","y","fill","font-size"],Ce=["x","y","font-size","fill"],we=["fill","font-size","transform"],Be=["fill","font-size","x","y"],_e=["x1","x2","y1","y2","stroke"],$e=["cx","cy","fill"],Ne=["cx","cy","fill"],Se=["id"],Le=["stop-color"],Te=["stop-color"],Pe=["stop-color"],Ee={key:0},ze=["x","y","font-size","fill"],Ve={key:3,class:"vue-data-ui-watermark"},Ae=["innerHTML"],Fe={__name:"vue-ui-strip-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectDatapoint"],setup(J,{expose:K,emit:Q}){const d=J,{vue_ui_strip_plot:Z}=o.useConfig(),p=e.computed({get(){return!!d.dataset&&d.dataset.length},set(l){return l}}),L=e.ref(o.createUid()),V=e.ref(0),T=e.ref(!1),P=e.ref(""),b=e.ref(null),A=e.ref(null),F=e.ref(!1),t=e.computed(()=>{const l=Y.useNestedProp({userConfig:d.config,defaultConfig:Z});return l.theme?{...Y.useNestedProp({userConfig:o.themes.vue_ui_strip_plot[l.theme]||d.config,defaultConfig:l}),customPalette:o.themePalettes[l.theme]||o.palette}:l}),C=e.ref(null);e.onMounted(()=>{if(o.objectIsEmpty(d.dataset)?o.error({componentName:"VueUiStripPlot",type:"dataset"}):d.dataset.forEach((l,s)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","plots"]}).forEach(a=>{p.value=!1,o.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:a,index:s})}),l.plots&&l.plots.forEach((a,n)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","value"]}).forEach(u=>{p.value=!1,o.error({componentName:"VueUiStripPlot",type:"datasetSerieAttribute",property:u,index:`${s},${n}`})})})}),t.value.responsive){const l=j.throttle(()=>{const{width:s,height:a}=j.useResponsive({chart:b.value,title:t.value.style.chart.title.text?A.value:null});w.value=a,f.value.width=s,f.value.height=a,k.value=(s-v.value.left-v.value.right)/d.dataset.length,B.value=o.translateSize({relator:Math.min(a,s),adjuster:600,source:t.value.style.chart.plots.radius,threshold:6,fallback:6})});C.value=new ResizeObserver(l),C.value.observe(b.value.parentNode)}F.value=!0,setTimeout(()=>{g.value=!1},ee.value*50)}),e.onBeforeUnmount(()=>{C.value&&C.value.disconnect()});const{isPrinting:D,isImaging:O,generatePdf:M,generateImage:W}=X.usePrinter({elementId:`strip-plot_${L.value}`,fileName:t.value.style.chart.title.text||"vue-ui-strip-plot"}),I=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),g=e.ref(t.value.useCssAnimation),c=e.ref({showTable:t.value.table.show,dataLabels:{show:t.value.style.chart.labels.bestPlotLabel.show},showTooltip:t.value.style.chart.tooltip.show}),v=e.ref({top:t.value.style.chart.padding.top,bottom:t.value.style.chart.padding.bottom,left:t.value.style.chart.padding.left,right:t.value.style.chart.padding.right}),k=e.ref(t.value.style.chart.stripWidth),w=e.ref(t.value.style.chart.height),B=e.ref(t.value.style.chart.plots.radius),f=e.ref({width:k.value*d.dataset.length+v.value.left+v.value.right,height:t.value.style.chart.height}),r=e.computed(()=>{const l=k.value*d.dataset.length+v.value.left+v.value.right;return{left:v.value.left,right:l-v.value.right,top:v.value.top,bottom:w.value-v.value.bottom,width:k.value*d.dataset.length,height:w.value-v.value.top-v.value.bottom,stripWidth:k.value,absoluteHeight:w.value,absoluteWidth:l}}),_=e.computed(()=>p.value?d.dataset.map((l,s)=>{const a=o.createUid();return{...l,id:a,color:l.color?o.convertColorToHex(l.color):I.value[s]||o.palette[s]||o.palette[s%o.palette.length],plots:l.plots.map(n=>({...n,parentId:a,color:l.color?o.convertColorToHex(l.color):I.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:o.createUid()})).sort((n,u)=>n.value-u.value)}}):null),h=e.computed(()=>(_.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,x:r.value.left+(s+1)*r.value.stripWidth-r.value.stripWidth/2}))}))),ee=e.computed(()=>Math.max(...h.value.map(l=>l.plots.length))),E=e.computed(()=>{const l=h.value.flatMap(s=>s.plots.map(a=>a.value));return{max:Math.max(...l),min:Math.min(...l)}}),m=e.computed(()=>o.calculateNiceScale(E.value.min<0?E.value.min:0,E.value.max,t.value.style.chart.grid.scaleSteps)),te=e.computed(()=>(h.value||[]).map((l,s)=>({...l,plots:l.plots.map(a=>({...a,y:r.value.bottom-(a.value+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))*r.value.height}))}))),G=e.computed(()=>m.value.ticks.map(l=>({y:r.value.bottom-r.value.height*((l+Math.abs(m.value.min))/(m.value.max+Math.abs(m.value.min))),x1:r.value.left,x2:r.value.right,value:l}))),z=e.ref(null),i=e.ref(null);function le({datapoint:l,seriesIndex:s}){z.value={datapoint:l,seriesIndex:s,config:t.value,series:_.value},T.value=!0,i.value=l;const a=t.value.style.chart.tooltip.customFormat;if(o.isFunction(a)&&o.functionReturnsString(()=>a({seriesIndex:s,datapoint:l,series:_.value,config:t.value})))P.value=a({seriesIndex:s,datapoint:l,series:_.value,config:t.value});else{let n="";n+=`<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="${t.value.style.chart.plots.gradient.show?`url(#${l.parentId})`:l.color}"/></svg>${l.name}</div>`,n+=`<div>${o.applyDataLabel(t.value.style.chart.labels.formatter,l.value,o.dataLabel({p:t.value.style.chart.labels.prefix,v:l.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:s})}</div>`,P.value=`<div>${n}</div>`}}const $=e.computed(()=>{const l=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>({name:`${a.name} - ${n.name}`,color:n.color}))),s=h.value.flatMap(a=>JSON.parse(JSON.stringify(a.plots)).sort((n,u)=>u.value-n.value).map(n=>n.value));return{head:l,body:s}});function q(){e.nextTick(()=>{const l=$.value.head.map((n,u)=>[[n.name],[$.value.body[u]]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[t.value.table.columnNames.series],[t.value.table.columnNames.value]]].concat(l),a=o.createCsvContent(s);o.downloadCsv({csvContent:a,title:t.value.style.chart.title.text||"vue-ui-strip-plot"})})}const N=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value],s=$.value.head.map((u,y)=>{const S=o.dataLabel({p:t.value.style.chart.labels.prefix,v:$.value.body[y],s:t.value.style.chart.labels.suffix,r:t.value.table.td.roundingValue});return[{color:u.color,name:u.name},S]}),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value],head:l,body:s,config:a}}),x=e.ref(!1);function ae(l){x.value=l,V.value+=1}function oe(){return h.value}function R(){c.value.showTable=!c.value.showTable}function U(){c.value.dataLabels.show=!c.value.dataLabels.show}function H(){c.value.showTooltip=!c.value.showTooltip}return K({getData:oe,generatePdf:M,generateCsv:q,generateImage:W,toggleTable:R,toggleLabels:U,toggleTooltip:H}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"stripPlotChart",ref:b,class:e.normalizeClass(`vue-ui-strip-plot ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`strip-plot_${L.value}`},[t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:e.normalizeStyle(`width:100%;background:${t.value.style.chart.backgroundColor};padding-bottom:24px`)},[e.createVNode(re._sfc_main,{config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),t.value.userOptions.show&&p.value?(e.openBlock(),e.createBlock(X.UserOptions,{ref:"details",key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(D),isImaging:e.unref(O),uid:L.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,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:c.value.showTooltip,isFullscreen:x.value,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,onToggleFullscreen:ae,onGeneratePdf:e.unref(M),onGenerateCsv:q,onGenerateImage:e.unref(W),onToggleTable:R,onToggleLabels:U,onToggleTooltip:H},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${f.value.width<=0?10:f.value.width} ${f.value.height<=0?10:f.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:${t.value.style.chart.backgroundColor};color:${t.value.style.chart.color};`)},[t.value.style.chart.grid.show?(e.openBlock(),e.createElementBlock("g",pe,[t.value.style.chart.grid.horizontalGrid.show?(e.openBlock(),e.createElementBlock("g",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G.value,a=>(e.openBlock(),e.createElementBlock("line",{x1:a.x1,x2:a.x2,y1:a.y,y2:a.y,stroke:t.value.style.chart.grid.horizontalGrid.stroke,"stroke-width":t.value.style.chart.grid.horizontalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.horizontalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,ye))),256))])):e.createCommentVNode("",!0),t.value.style.chart.grid.verticalGrid.show?(e.openBlock(),e.createElementBlock("g",fe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("line",{x1:r.value.left+(n+1)*r.value.stripWidth,x2:r.value.left+(n+1)*r.value.stripWidth,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.verticalGrid.stroke,"stroke-width":t.value.style.chart.grid.verticalGrid.strokeWidth,"stroke-dasharray":t.value.style.chart.grid.verticalGrid.strokeDasharray,"stroke-linecap":"round"},null,8,be))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:r.value.left,x2:r.value.left,y1:r.value.top,y2:r.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,ge),e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:r.value.bottom,y2:r.value.bottom,stroke:t.value.style.chart.grid.stroke,"stroke-width":t.value.style.chart.grid.strokeWidth,"stroke-linecap":"round"},null,8,ke)])):e.createCommentVNode("",!0),t.value.style.chart.labels.yAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(G.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:a.x1-t.value.style.chart.labels.yAxisLabels.fontSize/2+t.value.style.chart.labels.yAxisLabels.offsetX,y:a.y+t.value.style.chart.labels.yAxisLabels.fontSize/3,fill:t.value.style.chart.labels.yAxisLabels.color,"font-size":t.value.style.chart.labels.yAxisLabels.fontSize,"text-anchor":"end"},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.labels.formatter,a.value,e.unref(o.dataLabel)({p:t.value.style.chart.labels.prefix,v:a.value,s:t.value.style.chart.labels.suffix,r:t.value.style.chart.labels.yAxisLabels.rounding}),{datapoint:a,seriesIndex:n})),9,xe))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.xAxisLabels.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(h.value,(a,n)=>(e.openBlock(),e.createElementBlock("text",{x:r.value.left+(n+1)*r.value.stripWidth-r.value.stripWidth/2,y:r.value.bottom+t.value.style.chart.labels.xAxisLabels.fontSize*2+t.value.style.chart.labels.xAxisLabels.offsetY,"font-size":t.value.style.chart.labels.xAxisLabels.fontSize,fill:t.value.style.chart.labels.xAxisLabels.color,"text-anchor":"middle"},e.toDisplayString(a.name),9,Ce))),256)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.yLabel?(e.openBlock(),e.createElementBlock("text",{key:3,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,transform:`translate(${t.value.style.chart.labels.axis.fontSize+t.value.style.chart.labels.axis.yLabelOffsetX}, ${r.value.top+r.value.height/2}) rotate(-90)`,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.yLabel),9,we)):e.createCommentVNode("",!0),t.value.style.chart.labels.axis.xLabel?(e.openBlock(),e.createElementBlock("text",{key:4,fill:t.value.style.chart.labels.axis.color,"font-size":t.value.style.chart.labels.axis.fontSize,x:r.value.left+r.value.width/2,y:r.value.absoluteHeight,"text-anchor":"middle"},e.toDisplayString(t.value.style.chart.labels.axis.xLabel),9,Be)):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("line",{x1:r.value.left,x2:r.value.right,y1:i.value.y,y2:i.value.y,stroke:i.value.color,"stroke-width":1,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,_e),e.createElementVNode("circle",{cx:r.value.left,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,$e),e.createElementVNode("circle",{cx:r.value.right,cy:i.value.y,r:3,fill:i.value.color,class:e.normalizeClass({"select-circle":t.value.useCssAnimation})},null,10,Ne)],64)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,a=>(e.openBlock(),e.createElementBlock("radialGradient",{id:a.id,fy:"30%"},[e.createElementVNode("stop",{offset:"10%","stop-color":e.unref(o.lightenHexColor)(a.color,t.value.style.chart.plots.gradient.intensity/100)},null,8,Le),e.createElementVNode("stop",{offset:"90%","stop-color":e.unref(o.darkenHexColor)(a.color,.1)},null,8,Te),e.createElementVNode("stop",{offset:"100%","stop-color":a.color},null,8,Pe)],8,Se))),256))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,y)=>(e.openBlock(),e.createBlock(ie._sfc_main,e.mergeProps({plot:{x:u.x,y:F.value?u.y:r.value.top},radius:i.value&&i.value.id===u.id?B.value*1.5:B.value,shape:t.value.style.chart.plots.shape,stroke:t.value.style.chart.plots.stroke,strokeWidth:t.value.style.chart.plots.strokeWidth,color:t.value.style.chart.plots.gradient.show?`url(#${a.id})`:a.color,onMouseenter:S=>le({datapoint:u,seriesIndex:y}),onMouseleave:s[0]||(s[0]=S=>{T.value=!1,i.value=null}),onClick:S=>Q("selectDatapoint",u),style:`transition: all 0.2s ease-in-out; opacity:${i.value?i.value.id===u.id?1:.2:t.value.style.chart.plots.opacity};${g.value?`transition-delay:${y*50}ms`:""}`,class:{"vue-ui-strip-plot-animated":t.value.useCssAnimation&&g.value,"vue-ui-strip-plot-select-circle":t.value.useCssAnimation&&!g.value}},l.$attrs),null,16,["plot","radius","shape","stroke","strokeWidth","color","onMouseenter","onClick","style","class"]))),256)),c.value.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.plots,(u,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[y===a.plots.length-1||i.value&&i.value.id===u.id&&!c.value.showTooltip?(e.openBlock(),e.createElementBlock("text",{key:0,x:u.x,y:u.y+t.value.style.chart.labels.bestPlotLabel.offsetY-B.value*(i.value&&i.value.id===u.id&&!c.value.showTooltip?2:1.5),"font-size":t.value.style.chart.labels.bestPlotLabel.fontSize,fill:t.value.style.chart.labels.bestPlotLabel.color,"text-anchor":"middle",style:e.normalizeStyle(`opacity:${t.value.useCssAnimation&&g.value?0:1};transition:opacity 0.2s ease-in;`)},e.toDisplayString(u.name)+" "+e.toDisplayString(t.value.style.chart.labels.bestPlotLabel.showValue?e.unref(o.applyDataLabel)(t.value.style.chart.labels.formatter,u.value,e.unref(o.dataLabel)({p:`(${t.value.style.chart.labels.prefix}`,v:u.value,s:`${t.value.style.chart.labels.suffix})`,r:t.value.style.chart.labels.bestPlotLabel.rounding}),{datapoint:u,seriesIndex:y}):""),13,ze)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0)],64))),256)),e.renderSlot(l.$slots,"svg",{svg:r.value},void 0,!0)],14,he)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ve,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(D)||e.unref(O)})),void 0,!0)])):e.createCommentVNode("",!0),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:4,config:{type:"stripPlot",style:{backgroundColor:t.value.style.chart.backgroundColor,stripPlot:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(se._sfc_main,{show:c.value.showTooltip&&T.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,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:b.value,content:P.value,isCustom:e.unref(o.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...z.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),p.value?(e.openBlock(),e.createBlock(ce.default,{key:5,hideDetails:"",config:{open:c.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createVNode(ne.DataTable,{colNames:N.value.colNames,head:N.value.head,body:N.value.body,config:N.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[1]||(s[1]=a=>c.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a,style:{display:"flex","align-items":"center"}},null,8,Ae)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a.name||a),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,de))}},De=ve._export_sfc(Fe,[["__scopeId","data-v-22897da0"]]);exports.default=De;
|