vue-data-ui 3.28.8 → 3.28.10
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/{PackageVersion-Bczw6rsP.js → PackageVersion-DKSNC-YP.js} +1 -1
- package/dist/StackChartTable-CZteRybF.js +1 -0
- package/dist/UserOptions-B9EyfU9n.js +1 -0
- package/dist/{XyAnalysisOptions-U4UJx51x.js → XyAnalysisOptions-CV22ga_a.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-graph.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/package-CXaebsLV.js +1 -0
- package/dist/{render-common-DY4sNXDz.js → render-common-Cy1X2PzP.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{useConfig-By3Vb5kz.js → useConfig-C3FbHv4N.js} +1 -1
- package/dist/{useObjectBindings-0vvvimYP.js → useObjectBindings-C_70Czuj.js} +1 -1
- package/dist/{userOptionsSlots-DYuo-E5m.js → userOptionsSlots-CWtXN5Q6.js} +1 -1
- package/dist/utils.js +1 -1
- package/dist/vue-data-ui-O-w339Ac.js +1 -0
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-CcFFARyq.js +19 -0
- package/dist/{vue-ui-accordion-DFxSW8ET.js → vue-ui-accordion-E8TJfFeK.js} +1 -1
- package/dist/vue-ui-age-pyramid-Di6fKV6f.js +1 -0
- package/dist/vue-ui-annotator-sBGtsgcb.js +331 -0
- package/dist/vue-ui-bullet-BZLa1xj7.js +34 -0
- package/dist/vue-ui-bump-BSdpAH0l.js +8 -0
- package/dist/vue-ui-candlestick-BKZASgq9.js +22 -0
- package/dist/vue-ui-carousel-table-B20E2K8A.js +1 -0
- package/dist/vue-ui-chestnut-DavvzmiQ.js +1 -0
- package/dist/vue-ui-chord-D2Hn54i7.js +21 -0
- package/dist/vue-ui-circle-pack-BKaS-zWo.js +13 -0
- package/dist/{vue-ui-cursor-DRQc_V2R.js → vue-ui-cursor-BUOHKNmb.js} +1 -1
- package/dist/vue-ui-dag-SLYPxbGo.js +9 -0
- package/dist/vue-ui-dashboard-Bgt7VLv0.js +1 -0
- package/dist/{vue-ui-digits-CfdB0vaP.js → vue-ui-digits-DbxT72mM.js} +1 -1
- package/dist/{vue-ui-donut-Dy4j7B9b.js → vue-ui-donut-8ZWyXEVs.js} +1 -1
- package/dist/vue-ui-donut-DBcB8Ym1.js +47 -0
- package/dist/vue-ui-donut-evolution-D3lo74Ce.js +2 -0
- package/dist/vue-ui-dumbbell-CdarkL8Z.js +9 -0
- package/dist/vue-ui-flow-B0dYxGWT.js +3 -0
- package/dist/vue-ui-funnel-C0Cl9jMd.js +1 -0
- package/dist/vue-ui-galaxy-C_UWOQn4.js +1 -0
- package/dist/vue-ui-gauge-B94ToHlW.js +1 -0
- package/dist/vue-ui-geo-V-JmJgKS.js +1 -0
- package/dist/{vue-ui-gizmo-D0QjzIGt.js → vue-ui-gizmo-BvVDEnNu.js} +1 -1
- package/dist/{vue-ui-graph-DScVnTzu.js → vue-ui-graph-9YSKwYhC.js} +1 -1
- package/dist/vue-ui-heatmap-DWtbocz5.js +1 -0
- package/dist/vue-ui-hill-BH_lYm5G.js +1 -0
- package/dist/vue-ui-history-plot-DkWvta0h.js +2 -0
- package/dist/vue-ui-horizontal-bar-DbJ1DFjG.js +4 -0
- package/dist/{vue-ui-kpi-CF7pAl08.js → vue-ui-kpi-BxW6DctE.js} +1 -1
- package/dist/{vue-ui-label-W0oz08pp.js → vue-ui-label-rxuzmeyD.js} +1 -1
- package/dist/{vue-ui-mini-loader-OLYDdN3T.js → vue-ui-mini-loader-DpAYrTYb.js} +1 -1
- package/dist/vue-ui-molecule-BrG8K2Tm.js +1 -0
- package/dist/vue-ui-mood-radar-DEpFpfiW.js +1 -0
- package/dist/vue-ui-nested-donuts-CZetOzaq.js +19 -0
- package/dist/vue-ui-onion-DvyAxUSj.js +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-Bdakcv3w.js +9 -0
- package/dist/vue-ui-quadrant-CWZeQjHE.js +2 -0
- package/dist/vue-ui-quick-chart-BULxPrPs.js +16 -0
- package/dist/vue-ui-radar-CJ_5G0QP.js +1 -0
- package/dist/{vue-ui-rating-B9HeTCLa.js → vue-ui-rating-QcJoab0i.js} +1 -1
- package/dist/vue-ui-relation-circle-Vetly6f0.js +1 -0
- package/dist/vue-ui-ridgeline-5a87TiQf.js +2 -0
- package/dist/vue-ui-rings-CKuFf5vA.js +1 -0
- package/dist/vue-ui-scatter-C2hNg3ED.js +9 -0
- package/dist/{vue-ui-skeleton-an0peDis.js → vue-ui-skeleton-SlYTmirP.js} +1 -1
- package/dist/{vue-ui-smiley-Cht1imV-.js → vue-ui-smiley-DZVFOGfv.js} +1 -1
- package/dist/{vue-ui-spark-trend-DCP7blHB.js → vue-ui-spark-trend-D155vscB.js} +1 -1
- package/dist/{vue-ui-sparkbar-DT3sDgda.js → vue-ui-sparkbar-DFShNanl.js} +1 -1
- package/dist/{vue-ui-sparkgauge-AQt2L5dI.js → vue-ui-sparkgauge-CFj0wLj5.js} +1 -1
- package/dist/{vue-ui-sparkhistogram-a_jc2Dv2.js → vue-ui-sparkhistogram-DwDcqqEj.js} +1 -1
- package/dist/{vue-ui-sparkline-D2-KcHAU.js → vue-ui-sparkline-kxl5wQGY.js} +1 -1
- package/dist/{vue-ui-sparkstackbar-CBI4S5cu.js → vue-ui-sparkstackbar-CHjaAWVJ.js} +1 -1
- package/dist/vue-ui-stackbar-BrtUg-Mb.js +29 -0
- package/dist/vue-ui-stackline-CU2UkEJU.js +39 -0
- package/dist/vue-ui-strip-plot-BmEpoIoU.js +2 -0
- package/dist/vue-ui-table-Ddg209i0.js +14 -0
- package/dist/vue-ui-table-heatmap-B8AdX6Nq.js +1 -0
- package/dist/{vue-ui-table-sparkline-By319cB8.js → vue-ui-table-sparkline-B62l_ODH.js} +1 -1
- package/dist/vue-ui-thermometer-CvxyfTWE.js +1 -0
- package/dist/{vue-ui-timer-C6Pevf4N.js → vue-ui-timer-BkNtid9A.js} +2 -2
- package/dist/vue-ui-tiremarks-BE0nbuHp.js +1 -0
- package/dist/vue-ui-treemap-B9wAoh5g.js +1 -0
- package/dist/vue-ui-waffle-DqeBiuY3.js +1 -0
- package/dist/vue-ui-wheel---NZaS40.js +1 -0
- package/dist/vue-ui-word-cloud-DRFGFVmf.js +4 -0
- package/dist/vue-ui-world-D5gKzypf.js +19 -0
- package/dist/{vue-ui-xy-Df5gIADT.js → vue-ui-xy-Caj8jz6D.js} +1 -1
- package/dist/vue-ui-xy-CcVIXfL_.js +27 -0
- package/dist/vue-ui-xy-canvas-BceSG3AO.js +9 -0
- package/package.json +1 -1
- package/dist/UserOptions-DW84OKKr.js +0 -1
- package/dist/package-CNWVs68D.js +0 -1
- package/dist/vue-data-ui-BWqplouA.js +0 -1
- package/dist/vue-ui-3d-bar-DmRrbXjK.js +0 -19
- package/dist/vue-ui-age-pyramid-CJJIp5gY.js +0 -1
- package/dist/vue-ui-annotator-BnR2XnsL.js +0 -331
- package/dist/vue-ui-bullet-Br7H7FSM.js +0 -34
- package/dist/vue-ui-bump-DCDHNvWE.js +0 -8
- package/dist/vue-ui-candlestick-C_swW8gM.js +0 -22
- package/dist/vue-ui-carousel-table-BP_yVdDm.js +0 -1
- package/dist/vue-ui-chestnut-CIGNqBsT.js +0 -1
- package/dist/vue-ui-chord-DZRFBkRJ.js +0 -21
- package/dist/vue-ui-circle-pack-CtdPeMsY.js +0 -13
- package/dist/vue-ui-dag-Cj0CcntI.js +0 -9
- package/dist/vue-ui-dashboard-HyzHqAtX.js +0 -1
- package/dist/vue-ui-donut-Cv-bYyBN.js +0 -47
- package/dist/vue-ui-donut-evolution-DL112anx.js +0 -2
- package/dist/vue-ui-dumbbell-owG24VsQ.js +0 -9
- package/dist/vue-ui-flow-BMNIydqI.js +0 -3
- package/dist/vue-ui-funnel-BsVS3vuI.js +0 -1
- package/dist/vue-ui-galaxy-B8HgdBjc.js +0 -1
- package/dist/vue-ui-gauge-B1A_NFY6.js +0 -1
- package/dist/vue-ui-geo-_TG4jaV9.js +0 -1
- package/dist/vue-ui-heatmap-BbQseEbM.js +0 -1
- package/dist/vue-ui-hill-D3V84h_t.js +0 -1
- package/dist/vue-ui-history-plot-Bx4WYG6U.js +0 -2
- package/dist/vue-ui-horizontal-bar-Do0HJy4f.js +0 -4
- package/dist/vue-ui-molecule-bAMGCA2Y.js +0 -1
- package/dist/vue-ui-mood-radar-CFpgxjuR.js +0 -1
- package/dist/vue-ui-nested-donuts-CWY26iKX.js +0 -19
- package/dist/vue-ui-onion-DsBUqL_c.js +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-BF3gO85b.js +0 -9
- package/dist/vue-ui-quadrant-BkNG2LGm.js +0 -2
- package/dist/vue-ui-quick-chart-CYxvgVpD.js +0 -17
- package/dist/vue-ui-radar-0H8CiLmc.js +0 -1
- package/dist/vue-ui-relation-circle-B0BM4xf8.js +0 -1
- package/dist/vue-ui-ridgeline-D-fDuE3y.js +0 -2
- package/dist/vue-ui-rings-UtlBiaZZ.js +0 -1
- package/dist/vue-ui-scatter-CduaARRt.js +0 -9
- package/dist/vue-ui-stackbar-DS_31-a3.js +0 -29
- package/dist/vue-ui-stackline-CuxohB0U.js +0 -39
- package/dist/vue-ui-strip-plot-bYGhsPA5.js +0 -2
- package/dist/vue-ui-table-heatmap-D6gpmHg8.js +0 -1
- package/dist/vue-ui-table-lzolsJ_n.js +0 -14
- package/dist/vue-ui-thermometer-B3Uv3aWc.js +0 -1
- package/dist/vue-ui-tiremarks-DeNdCFVD.js +0 -1
- package/dist/vue-ui-treemap-Ck9_llHA.js +0 -1
- package/dist/vue-ui-waffle-BW2SacnV.js +0 -1
- package/dist/vue-ui-wheel-BXDhx5bf.js +0 -1
- package/dist/vue-ui-word-cloud-DKPtoruY.js +0 -4
- package/dist/vue-ui-world-D9vpDbN7.js +0 -19
- package/dist/vue-ui-xy-CMckdUft.js +0 -27
- package/dist/vue-ui-xy-canvas-CBrKi3nN.js +0 -9
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Dt as ee,Ht as te,S as ne,X as re,Zt as ie,at as ae,i as oe,in as se,nt as ce,pt as le,t as ue,w as de,zt as fe}from"./lib-rPeBMZrn.js";import{n as pe,t as me}from"./BaseScanner-8NdoBs7B.js";import{n as he,t as ge}from"./useHints-C-TwxM0Y.js";import{t as _e}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ve}from"./resolveChartConfig-CIhClE5R.js";import{t as ye}from"./chartImage-DPGnEuYM.js";import{n as be}from"./Title-BliHuXfT.js";import{t as xe}from"./useChartExport-BZts4KFb.js";import{n as Se,t as Ce}from"./tableIntegration-CNoJ1CIY.js";import{n as we,t as Te}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ee}from"./usePrinter-DVf3YcG5.js";import{t as De}from"./useTransitions-ChGGrtrv.js";import{c as Oe}from"./canvas-lib-22VpOI4_.js";import{t as ke}from"./useResponsive-CENUxfEL.js";import{t as Ae}from"./BaseLegendToggle-BIzyyI1h.js";import{t as je}from"./A11yDataTable-DWNlWXzs.js";import{t as Me}from"./useUserOptionState-CXlFnwPv.js";import{t as Ne}from"./useChartAccessibility-DOMuYJfm.js";import{t as Pe}from"./labelUtils-CdtU-yB_.js";import{t as Fe}from"./Legend-DM0ClX3D.js";import{t as Ie}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Le}from"./vue_ui_onion-C9BedU_-.js";import{Fragment as s,Teleport as Re,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as ze,createTextVNode as Be,createVNode as Ve,defineAsyncComponent as p,guardReactiveProps as m,mergeProps as He,nextTick as Ue,normalizeClass as h,normalizeProps as g,normalizeStyle as We,onBeforeUnmount as Ge,onMounted as Ke,openBlock as _,ref as v,renderList as y,renderSlot as b,resolveDynamicComponent as qe,shallowRef as Je,toDisplayString as Ye,toRefs as Xe,unref as x,watch as Ze,withCtx as S}from"vue";var Qe=/* @__PURE__ */ e({default:()=>bt}),$e=[`id`],et=[`id`],tt=[`id`],nt={style:{position:`relative`}},rt=[`xmlns`,`aria-describedby`,`viewBox`],it=[`width`,`height`],at=[`cx`,`cy`,`r`,`stroke`,`stroke-width`,`stroke-dasharray`,`stroke-dashoffset`],ot=[`cx`,`cy`,`r`,`stroke`,`stroke-width`,`stroke-dasharray`,`stroke-dashoffset`],st=[`id`],ct=[`stdDeviation`],lt=[`filter`],ut=[`cx`,`cy`,`r`,`stroke-width`,`stroke-dasharray`,`stroke-dashoffset`],dt=[`cx`,`cy`,`r`,`stroke-width`,`stroke-dasharray`,`stroke-dashoffset`,`onMouseenter`,`onMouseleave`,`onClick`],ft={key:2},pt=[`onMouseenter`,`onMouseleave`,`onClick`],mt=[`transform`,`font-size`,`fill`,`font-weight`],ht={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},gt={key:5,class:`vue-data-ui-watermark`},_t=[`id`],vt=[`onClick`],yt=[`innerHTML`],bt=/*#__PURE__*/ _e({__name:`vue-ui-onion`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:_e,emit:Qe}){let bt=p(()=>import(`./Tooltip-C1q0Qoh7.js`)),xt=p(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),St=p(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Ct=p(()=>import(`./DataTable-Dof6yhO7.js`)),wt=p(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),Tt=p(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Et=p(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),Dt=p(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_onion:Ot}=i(),C=e,kt=c(()=>!!C.dataset&&C.dataset.length),w=v(re()),At=v(null),jt=v(0),T=v(!1),Mt=v(``),E=v([]),D=v(null),Nt=v(null),Pt=v(null),Ft=v(null),It=v(null),Lt=v(0),Rt=v(0),zt=v(0),O=v(!1),Bt=v(!1),Vt=v(null),k=v(null),Ht=v({x:0,y:0}),Ut=v(`pointer`),Wt=v(!1),A=v(Zt()),j=c(()=>A.value.userOptions),M=c(()=>A.value.style.chart.layout.labels),N=c(()=>A.value.style.chart.layout),P=c(()=>A.value.style.chart.tooltip),F=c(()=>A.value.style.chart);he({config:()=>A.value,dataset:()=>C.dataset,component:`VueUiOnion`,rules:[ge.emptyArray,{test:e=>e.length>8,message:[`👀 The number of series is > 8. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let{transitionEnabled:I}=De({config:()=>A.value.transitions,dataset:()=>C.dataset}),L=c(()=>A.value.userOptions.useCursorPointer),Gt=c(()=>se({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{gutter:{color:`#99999950`},labels:{show:!1}},legend:{backgroundColor:`transparent`}}}},userConfig:A.value.skeletonConfig??{}})),{loading:R,FINAL_DATASET:Kt,manualLoading:qt}=pe({...Xe(C),FINAL_CONFIG:A,prepareConfig:Zt,callback:()=>{Promise.resolve().then(async()=>{await Ue(),xn()})},skeletonDataset:C.config?.skeletonDataset??[{name:`_`,percentage:50,value:1,color:`#DBDBDB`},{name:`_`,percentage:50,value:1,color:`#C4C4C4`},{name:`_`,percentage:50,value:1,color:`#ADADAD`},{name:`_`,percentage:50,value:1,color:`#969696`}],skeletonConfig:se({defaultConfig:A.value,userConfig:Gt.value})}),{userOptionsVisible:Jt,setUserOptionsVisibility:Yt,keepUserOptionState:Xt}=Me({config:A.value}),{svgRef:z}=Ne({config:F.value.title});function Zt(){return ve(C.config,Ot,Le)}let Qt=ie(C.config);Ze(()=>C.config,(e,t)=>{let n=ie(e),r=n!==Qt;Qt=n;let i=Zt();r?(R.value||(A.value=i),Jt.value=!A.value.userOptions.showOnChartHover,mn(),Lt.value+=1,Rt.value+=1,zt.value+=1,B.value.showTable=A.value.table.show,B.value.showTooltip=P.value.show):(A.value.style.chart.tooltip=i.style.chart.tooltip,B.value.showTooltip=A.value.style.chart.tooltip.show)},{deep:!0});let{isPrinting:$t,isImaging:en,generatePdf:tn,generateImage:nn}=Ee({elementId:`vue-ui-onion_${w.value}`,fileName:F.value.title.text||`vue-ui-onion`,options:A.value.userOptions.print}),rn=c(()=>A.value.userOptions.show&&!F.value.title.text),an=c(()=>de(A.value.customPalette)),B=v({showTable:A.value.table.show,showTooltip:P.value.show});Ze(A,()=>{B.value={showTable:A.value.table.show,showTooltip:P.value.show}},{immediate:!0});let V=v({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),H=Je(null),U=Je(null);Ke(()=>{Bt.value=!0,mn()});let{autoSizeLabels:on}=Ie({svgRef:z,fontSize:()=>M.value.fontSize,minFontSize:()=>M.value.minFontSize,labelClass:`.vue-ui-onion-label`}),W=null,G=null,K=0;function sn(){W!==null&&(cancelAnimationFrame(W),W=null),G!==null&&(clearTimeout(G),G=null)}function cn(e){return String(e).split(`,`).map(e=>{let t=e.trim(),n=Number.parseFloat(t);return Number.isFinite(n)?t.endsWith(`ms`)?n:n*1e3:0})}function ln(){return typeof window>`u`||!I.value||O.value||R.value||!z.value?0:Array.from(z.value.querySelectorAll(`.vue-ui-onion-label.vue-data-ui-transition`)).reduce((e,t)=>{let n=window.getComputedStyle(t);if(n.transitionProperty===`none`)return e;let r=cn(n.transitionDuration),i=cn(n.transitionDelay),a=Math.max(r.length,i.length),o=Array.from({length:a},(e,t)=>(r[t%r.length]??0)+(i[t%i.length]??0)).reduce((e,t)=>Math.max(e,t),0);return Math.max(e,o)},0)}function un(){typeof window<`u`&&(W=requestAnimationFrame(()=>{W=null,on()}))}function dn(){if(typeof window>`u`)return;let e=++K;sn(),Ue(()=>{e===K&&(W=requestAnimationFrame(()=>{if(W=null,e!==K)return;let t=ln();t<=0?un():G=setTimeout(()=>{G=null,e===K&&un()},t+34)}))})}let fn=c(()=>A.value.debug),pn=null;function mn(){if(fe(C.dataset)&&(ae({componentName:`VueUiOnion`,type:`dataset`,debug:fn.value}),qt.value=!0),fe(C.dataset)||(qt.value=A.value.loading),A.value.responsive){let e=64/512,t=Oe(()=>{pn&&clearTimeout(pn),O.value=!0;let{width:t,height:n}=ke({chart:D.value,title:F.value.title.text?Nt.value:null,legend:F.value.legend.show?Pt.value:null,source:Ft.value,noTitle:It.value});n-=12,requestAnimationFrame(async()=>{V.value.width=t,V.value.height=n,V.value.padding.top=Math.max(t,n)*e,V.value.padding.right=Math.max(t,n)*e,V.value.padding.bottom=Math.max(t,n)*e,V.value.padding.left=Math.max(t,n)*e,V.value.minRadius=Math.min(t,n)*e,pn=setTimeout(()=>{O.value=!1,dn()},0)})});H.value&&(U.value&&H.value.unobserve(U.value),H.value.disconnect()),H.value=new ResizeObserver(t),U.value=D.value.parentNode,H.value.observe(U.value)}dn()}Ge(()=>{K+=1,sn(),H.value&&(U.value&&H.value.unobserve(U.value),H.value.disconnect())});let q=c(()=>({top:V.value.padding.top,left:V.value.padding.left,right:V.value.width-V.value.padding.right,bottom:V.value.height-V.value.padding.bottom,centerX:V.value.width/2,centerY:V.value.height/2,width:V.value.width-V.value.padding.right-V.value.padding.left,height:V.value.height-V.value.padding.bottom-V.value.padding.top,minRadius:V.value.minRadius,maxRadius:Math.min(V.value.width,V.value.height)-V.value.padding.top*2})),J=c(()=>(fn.value&&Kt.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&ae({componentName:`VueUiOnion`,type:`datasetSerieAttribute`,property:`name`,index:t}),[void 0].includes(e.percentage)&&ae({componentName:`VueUiOnion`,type:`datasetSerieAttribute`,property:`percentage`,index:t})}),Kt.value.map((e,t)=>{let n=`onion_serie_${t}_${w.value}`;return{...e,percentage:e.percentage||0,targetPercentage:e.percentage||0,color:ne(e.color)||an.value[t]||te[t],id:n,shape:`circle`,opacity:E.value.includes(n)?.5:1,absoluteIndex:t,segregate:()=>Dn(n),isSegregated:E.value.includes(n)}}))),hn=c(()=>J.value.map((e,t)=>{let n=F.value.legend.showValue,r=F.value.legend.showPercentage,i=Ln({showVal:n,showPercentage:r,val:oe(M.value.value.formatter,e.value,a({p:e.prefix||``,v:e.value,s:e.suffix||``,r:F.value.legend.roundingValue})),percentage:a({v:e.percentage??0,s:`%`,r:F.value.legend.roundingPercentage}),config:F.value.legend});return{...e,display:`${e.name}${n||r?`: `:``}${i}`}})),gn=v(J.value),_n=c(()=>A.value.useStartAnimation),vn=v(null),yn=c(()=>Math.max(...J.value.map(e=>e.percentage))),bn=v(!1);Ze(()=>J.value,xn,{immediate:!0,deep:!0}),Ze(()=>C.dataset,e=>{Array.isArray(e)&&e.length>0&&(qt.value=!1),dn()},{deep:!0,flush:`post`});function xn(){if(_n.value&&!bn.value&&!R.value){gn.value=J.value.map(e=>({...e,percentage:0}));let e=0;function t(){e>=yn.value?(cancelAnimationFrame(vn.value),gn.value=J.value,bn.value=!0):(gn.value=J.value.map(t=>({...t,percentage:e<t.targetPercentage?e:t.targetPercentage})),e+=1,requestAnimationFrame(t),bn.value=!0)}t()}else gn.value=J.value}let Sn=c(()=>({cy:`onion-div-legend`,backgroundColor:F.value.legend.backgroundColor,color:F.value.legend.color,fontSize:F.value.legend.fontSize,paddingBottom:12,fontWeight:F.value.legend.bold?`bold`:``})),Cn=c(()=>J.value.filter(e=>!E.value.includes(e.id)).length),Y=c(()=>{let e=Math.min(q.value.width,q.value.height)/2/J.value.length;return{gutter:(e>N.value.maxThickness?N.value.maxThickness:e)*N.value.gutter.width,track:(e>N.value.maxThickness?N.value.maxThickness:e)*N.value.track.width}}),X=c(()=>gn.value.filter(e=>!E.value.includes(e.id)).map((e,t)=>{let n=(q.value.maxRadius-Y.value.track)/Cn.value/2*(1+t),r=q.value.centerY-n;return{percentage:e.percentage||0,...e,labelY:r,radius:n,path:wn(n,e.percentage||0)}}));function wn(e,t){let n=2*Math.PI*e,r=n*.75,i=`${r} ${n}`,a=r*(1-t/100);return{bgDashArray:`${r} ${n}`,bgDashOffset:0,dashArray:i,dashOffset:a,fullOffset:0,active:`
|
|
2
|
-
M ${q.value.centerX},${q.value.centerY-e}
|
|
3
|
-
A ${e},${e} 0 1 1
|
|
4
|
-
${q.value.centerX+e*Math.cos(Math.PI*3/4)},${q.value.centerY+e*Math.sin(Math.PI*3/4)}
|
|
5
|
-
`.trim()}}let Tn=Qe;function En(){E.value.length?E.value=[]:hn.value.forEach(e=>{E.value.push(e.id)}),dn(),Tn(`selectLegend`,X.value)}function Dn(e){if(E.value.includes(e))E.value=E.value.filter(t=>t!==e);else{if(E.value.length===J.value.length-1)return;E.value.push(e)}dn(),Tn(`selectLegend`,X.value)}function On(e){return J.value.length?J.value.find(t=>t.name===e)||(fn.value&&console.warn(`VueUiOnion - Series name not found "${e}"`),null):(fn.value&&console.warn(`VueUiOnion - There are no series to show.`),null)}function kn(e){let t=On(e);t!==null&&E.value.includes(t.id)&&Dn(t.id)}function An(e){let t=On(e);t!==null&&(E.value.includes(t.id)||Dn(t.id))}function jn(){return X.value}let Mn=c(()=>({head:[A.value.table.translations.serie,A.value.table.translations.percentage,A.value.table.translations.value],body:X.value.map(e=>[e.name,e.percentage,e.value])})),Z=c(()=>{let e=Mn.value.head;return{head:e,body:X.value.map(e=>[`<span style="color:${e.color}" aria-hidden="true">⬤</span> ${e.name}`,`${Number(e.percentage??0).toFixed(A.value.table.td.roundingPercentage).toLocaleString()}%`,`${e.prefix||``}${[null,void 0,NaN,`NaN`].includes(e.value)?`-`:e.value.toFixed(A.value.table.td.roundingValue).toLocaleString()}${e.suffix||``}`]),config:{th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint},colNames:e}});function Nn(e=null){Ue(()=>{let t=[[F.value.title.text],[F.value.title.subtitle.text],[``]],n=Mn.value.head,r=Mn.value.body,i=t.concat([n]).concat(r),a=o(i);e?e(a):ce({csvContent:a,title:F.value.title.text||`vue-ui-onion`})})}let Q=v(void 0),$=v(!1);function Pn(e){$.value=e,jt.value+=1}function Fn({datapoint:e}){A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:e,seriesIndex:e.absoluteIndex})}function In({datapoint:e}){Q.value=void 0,T.value=!1,k.value=null,Ut.value=`pointer`,A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:e,seriesIndex:e.absoluteIndex})}function Ln({val:e,percentage:t,showVal:n,showPercentage:r,config:i}){return Pe({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Rn(e,t){let n=M.value.value.show,r=M.value.percentage.show,i=Ln({config:M.value,showVal:n,showPercentage:r,val:oe(M.value.value.formatter,e.value,a({p:e.prefix||``,v:e.value||0,s:e.suffix||``,r:M.value.roundingValue}),{datapoint:e,seriesIndex:t}),percentage:a({v:e.percentage,s:`%`,r:M.value.roundingPercentage})});return`${e.name}${n||r?`: `:``}${i}`}let zn=v(null);function Bn({datapoint:e,seriesIndex:t,show:n=!0,triggerMode:r=`pointer`}){A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:e,seriesIndex:e.absoluteIndex}),Ut.value=r,k.value=t;let i=e.absoluteIndex;Q.value=t,zn.value={datapoint:e,seriesIndex:i,series:J.value,config:A.value},T.value=n;let o=``,te=P.value.customFormat;if(ee(te)&&le(()=>te({seriesIndex:i,datapoint:e,series:J.value,config:A.value})))Mt.value=te({seriesIndex:i,datapoint:e,series:J.value,config:A.value});else{let n=P.value.showPercentage,r=P.value.showValue;o+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`,o+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${e.color}"/></svg>`,o+=`<b>${Ln({config:P.value,showVal:r,showPercentage:n,val:`<span>${oe(M.value.value.formatter,e.value,a({p:e.prefix||``,v:e.value,s:e.suffix||``,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}</span>`,percentage:a({v:e.percentage,s:`%`,r:P.value.roundingPercentage})})}</b></div>`,Mt.value=`<div>${o}</div>`}}function Vn(){B.value.showTable=!B.value.showTable}function Hn(){B.value.showTooltip=!B.value.showTooltip}let Un=v(!1);function Wn(){Un.value=!Un.value}let Gn=ye(D,()=>F.value.title.text),Kn=c(()=>Ce({config:A,style:F,mutableConfig:B,dialog:Dt,accordion:St,isFullscreen:$,parent:D,maxWidth:600,isCursorPointer:L}));Ze(()=>B.value.showTable,e=>Se(e,A,Vt));let qn=c(()=>hn.value.map(e=>({...e,name:e.display}))),Jn=c(()=>F.value.backgroundColor),Yn=c(()=>F.value.legend),Xn=c(()=>F.value.title),{isCallbackImaging:Zn,isCallbackSvg:Qn,generateSvg:$n,onGenerateImage:er}=xe({svg:z,title:Xn,legend:Yn,legendItems:qn,backgroundColor:Jn,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:nn});async function tr(){Tn(`copyAlt`,{config:A.value,dataset:X.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:X.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function nr(){k.value=null,Wt.value=!0}function rr(){k.value=null,Ut.value=`pointer`,T.value=!1,Q.value=void 0,Wt.value=!1}function ir(e){if(!z.value||Un.value||document.activeElement!==z.value||!X.value.length)return;let t=[`ArrowLeft`,`ArrowDown`].includes(e.key),n=[`ArrowRight`,`ArrowUp`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){k.value=null,Ut.value=`pointer`,T.value=!1,Q.value=void 0;return}if(r){if(k.value===null)return;let e=X.value[k.value];if(!e)return;Fn({datapoint:e});return}let a=k.value;a===null||a<0||a>=X.value.length?a=n?0:X.value.length-1:n?(a+=1,a>=X.value.length&&(a=0)):t&&(--a,a<0&&(a=X.value.length-1));let o=X.value[a];o&&(ar(a),Bn({datapoint:o,seriesIndex:a,show:!0,triggerMode:`keyboard`}))}function ar(e){if(!Number.isFinite(e)||!z.value)return;let t=X.value[e];if(!t)return;let n=t.radius,r=Math.PI*7/4,i=q.value.centerX+n*Math.cos(r),a=q.value.centerY+n*Math.sin(r),o=z.value.getBoundingClientRect();Ht.value={x:o.left+i/V.value.width*o.width,y:o.top+a/V.value.height*o.height}}let or=c(()=>({headers:Z.value?.colNames??[],rows:Z.value?.body??[]}));return _e({getData:jn,getImage:Gn,generatePdf:tn,generateCsv:Nn,generateImage:nn,generateSvg:$n,hideSeries:An,showSeries:kn,toggleTable:Vn,toggleTooltip:Hn,toggleAnnotator:Wn,toggleFullscreen:Pn,copyAlt:tr}),(e,i)=>(_(),d(`div`,{class:h(`vue-data-ui-component vue-ui-onion ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`onionChart`,ref:D,id:`vue-ui-onion_${w.value}`,style:We(`font-family:${A.value.style.fontFamily};width:100%; ${A.value.responsive?`height: 100%;`:``} text-align:center;background:${F.value.backgroundColor}`),onMouseenter:i[4]||=()=>x(Yt)(!0),onMouseleave:i[5]||=()=>x(Yt)(!1)},[f(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[f(`p`,null,Ye(A.value.a11y.translations.keyboardNavigation),1)],8,et),or.value?.rows?.length?(_(),l(je,{key:0,uid:w.value,head:or.value.headers,body:or.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):u(``,!0),j.value.buttons.annotator?(_(),l(x(Tt),He({key:1},x(n)(j.value.annotator),{svgRef:x(z),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Un.value,isCursorPointer:L.value,palette:j.value.annotatorPalette,onClose:Wn}),ze({_:2},[y(x(r),n=>({name:n,fn:S(r=>[b(e.$slots,n,g(m(x(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):u(``,!0),rn.value?(_(),d(`div`,{key:2,ref_key:`noTitle`,ref:It,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):u(``,!0),F.value.title.text?(_(),d(`div`,{key:3,ref_key:`chartTitle`,ref:Nt,style:`width:100%;background:transparent`},[(_(),l(be,{key:`title_${Lt.value}`,config:{title:{cy:`onion-div-title`,...F.value.title},subtitle:{cy:`onion-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):u(``,!0),f(`div`,{id:`legend-top-${w.value}`},null,8,tt),j.value.show&&kt.value&&(x(Xt)||x(Jt))?(_(),l(x(wt),{ref_key:`details`,ref:At,key:`user_options${jt.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isImaging:x(en),isPrinting:x($t),uid:w.value,hasTooltip:j.value.buttons.tooltip&&P.value.show,hasPdf:j.value.buttons.pdf,hasImg:j.value.buttons.img,hasSvg:j.value.buttons.svg,hasXls:j.value.buttons.csv,hasTable:j.value.buttons.table,hasFullscreen:j.value.buttons.fullscreen,hasAltCopy:j.value.buttons.altCopy,isFullscreen:$.value,isTooltip:B.value.showTooltip,titles:{...j.value.buttonTitles},chartElement:D.value,position:j.value.position,hasAnnotator:j.value.buttons.annotator,isAnnotation:Un.value,callbacks:j.value.callbacks,printScale:j.value.print.scale,tableDialog:A.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:Pn,onGeneratePdf:x(tn),onGenerateCsv:Nn,onGenerateImage:x(er),onGenerateSvg:x($n),onToggleTable:Vn,onToggleTooltip:Hn,onToggleAnnotator:Wn,onCopyAlt:tr,style:We({visibility:x(Xt)?x(Jt)?`visible`:`hidden`:`visible`})},ze({_:2},[y(x(we)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[b(e.$slots,t,g(m(x(Te)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):u(``,!0),f(`div`,nt,[(_(),d(`svg`,{ref_key:`svgRef`,ref:z,xmlns:x(ue),"aria-describedby":`chart-instructions-${w.value}`,class:h({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value,resizing:O.value,"vue-data-ui-no-transition":!x(I)||O.value||x(R)}),viewBox:`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`,style:We(`max-width:100%;overflow:visible;background:transparent;color:${F.value.color}`),tabindex:`0`,onFocus:nr,onBlur:rr,onKeydown:ir},[Ve(x(Et)),b(e.$slots,`svg-underlayer`,{svg:{...V.value,drawingArea:q.value,isPrintingImg:x($t)||x(en)||x(Zn),isPrintingSvg:x(Qn)}},void 0,!0),e.$slots[`chart-background`]?(_(),d(`foreignObject`,{key:0,x:0,y:0,width:V.value.width<=0?10:V.value.width,height:V.value.height<=0?10:V.value.height,style:{pointerEvents:`none`}},[b(e.$slots,`chart-background`,{},void 0,!0)],8,it)):u(``,!0),(_(!0),d(s,null,y(X.value,(e,t)=>(_(),d(`circle`,{cx:q.value.centerX,cy:q.value.centerY,r:e.radius<=0?1e-4:e.radius,stroke:N.value.gutter.color,"stroke-width":Y.value.gutter,fill:`none`,"stroke-dasharray":e.path.bgDashArray,"stroke-dashoffset":e.path.fullOffset,"stroke-linecap":`round`,class:h({"vue-ui-onion-path":!0,"vue-ui-onion-blur":A.value.useBlurOnHover&&![null,void 0].includes(Q.value)&&Q.value!==t,"vue-data-ui-transition":x(I)}),style:{transform:`rotate(-90deg)`,transformOrigin:`50% 50%`}},null,10,at))),256)),(_(!0),d(s,null,y(X.value,(e,t)=>(_(),d(`circle`,{cx:q.value.centerX,cy:q.value.centerY,r:e.radius<0?1e-4:e.radius,stroke:`${e.color}`,"stroke-width":Y.value.track,fill:`none`,"stroke-dasharray":e.path.dashArray,"stroke-dashoffset":e.path.dashOffset,class:h({"vue-ui-onion-path":!0,"vue-ui-onion-blur":A.value.useBlurOnHover&&![null,void 0].includes(Q.value)&&Q.value!==t,"vue-data-ui-transition":x(I)}),"stroke-linecap":`round`,style:{transform:`rotate(-90deg)`,transformOrigin:`50% 50%`}},null,10,ot))),256)),f(`defs`,null,[f(`filter`,{id:`blur_${w.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[f(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:100/F.value.gradientIntensity},null,8,ct)],8,st)]),F.value.useGradient?(_(),d(`g`,{key:1,filter:`url(#blur_${w.value})`},[(_(!0),d(s,null,y(X.value,(e,t)=>(_(),d(`circle`,{cx:q.value.centerX,cy:q.value.centerY,r:e.radius<=0?1e-4:e.radius,stroke:`white`,"stroke-width":Y.value.track/3,fill:`none`,"stroke-linecap":`round`,"stroke-dasharray":e.path.dashArray,"stroke-dashoffset":e.path.dashOffset,style:{transform:`rotate(-90deg)`,transformOrigin:`50% 50%`},class:h({"vue-data-ui-transition":x(I)})},null,10,ut))),256))],8,lt)):u(``,!0),(_(!0),d(s,null,y(X.value,(e,t)=>(_(),d(`circle`,{cx:q.value.centerX,cy:q.value.centerY,r:e.radius<=0?1e-4:e.radius,stroke:`transparent`,"stroke-width":Math.max(Y.value.track,Y.value.gutter),fill:`none`,"stroke-dasharray":e.path.bgDashArray,"stroke-dashoffset":e.path.fullOffset,"stroke-linecap":`round`,class:`vue-ui-onion-path`,style:{transform:`rotate(-90deg)`,transformOrigin:`50% 50%`},onMouseenter:n=>Bn({datapoint:e,show:!0,seriesIndex:t,triggerMode:`pointer`}),onMouseleave:t=>In({datapoint:e}),onClick:t=>Fn({datapoint:e})},null,40,dt))),256)),M.value.show?(_(),d(`g`,ft,[(_(!0),d(s,null,y(X.value,(e,t)=>(_(),d(`g`,{key:`dl_${e.id}`,onMouseenter:n=>Bn({datapoint:e,show:!0,seriesIndex:t,triggerMode:`pointer`}),onMouseleave:t=>In({datapoint:e}),onClick:t=>Fn({datapoint:e})},[E.value.includes(e.id)?u(``,!0):(_(),d(`text`,{key:0,class:h([`vue-ui-onion-label`,{"vue-data-ui-transition":x(I)}]),transform:`translate(${V.value.width/2-Y.value.gutter*.8+M.value.offsetX},${e.labelY+M.value.offsetY})`,"text-anchor":`end`,"font-size":M.value.fontSize,fill:A.value.useBlurOnHover&&![null,void 0].includes(Q.value)&&Q.value===t?e.color:M.value.color,"font-weight":M.value.bold?`bold`:`normal`},Ye(Rn(e,t)),11,mt))],40,pt))),128))])):u(``,!0),b(e.$slots,`svg`,{svg:{...V.value,drawingArea:q.value,isPrintingImg:x($t)||x(en)||x(Zn),isPrintingSvg:x(Qn)}},void 0,!0)],46,rt)),e.$slots.hint?(_(),d(`div`,ht,[b(e.$slots,`hint`,g(m({hint:A.value.a11y.translations.keyboardNavigation,isVisible:Wt.value})),void 0,!0)])):u(``,!0)]),e.$slots.watermark?(_(),d(`div`,gt,[b(e.$slots,`watermark`,g(m({isPrinting:x($t)||x(en)||x(Zn)||x(Qn)})),void 0,!0)])):u(``,!0),f(`div`,{id:`legend-bottom-${w.value}`},null,8,_t),Bt.value&&(F.value.legend.show||e.$slots.legend)?(_(),l(Re,{key:6,to:F.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[f(`div`,{ref_key:`chartLegend`,ref:Pt},[b(e.$slots,`legend`,{legend:hn.value},()=>[F.value.legend.show?(_(),l(Fe,{key:`legend_${zt.value}`,legendSet:hn.value,config:Sn.value,isCursorPointer:L.value,onClickMarker:i[0]||=({legend:e})=>Dn(e.id)},{item:S(({legend:e})=>[x(R)?u(``,!0):(_(),d(`div`,{key:0,"data-cy-legend-item":``,onClick:t=>e.segregate(),style:We(`opacity:${E.value.includes(e.id)?.5:1}`)},Ye(e.display),13,vt))]),legendToggle:S(()=>[hn.value.length>2&&F.value.legend.selectAllToggle.show&&!x(R)?(_(),l(Ae,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:E.value.length>0,isCursorPointer:L.value,onToggle:En},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):u(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):u(``,!0)],!0)],512)],8,[`to`])):u(``,!0),e.$slots.source?(_(),d(`div`,{key:7,ref_key:`source`,ref:Ft,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),Ve(x(bt),{teleportTo:P.value.teleportTo,show:B.value.showTooltip&&T.value,backgroundColor:P.value.backgroundColor,color:P.value.color,borderRadius:P.value.borderRadius,borderColor:P.value.borderColor,borderWidth:P.value.borderWidth,fontSize:P.value.fontSize,backgroundOpacity:P.value.backgroundOpacity,position:P.value.position,offsetX:P.value.offsetX,offsetY:P.value.offsetY,parent:D.value,content:Mt.value,isFullscreen:$.value,isCustom:x(ee)(P.value.customFormat),smooth:P.value.smooth,backdropFilter:P.value.backdropFilter,smoothForce:P.value.smoothForce,smoothSnapThreshold:P.value.smoothSnapThreshold,isA11yMode:Ut.value===`keyboard`,a11yPosition:Ht.value},{"tooltip-before":S(()=>[b(e.$slots,`tooltip-before`,g(m({...zn.value})),void 0,!0)]),tooltip:S(()=>[b(e.$slots,`tooltip`,g(m({...zn.value})),void 0,!0)]),"tooltip-after":S(()=>[b(e.$slots,`tooltip-after`,g(m({...zn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),kt.value&&j.value.buttons.table?(_(),l(qe(Kn.value.component),He({key:8},Kn.value.props,{ref_key:`tableUnit`,ref:Vt,onClose:i[3]||=e=>B.value.showTable=!1}),ze({content:S(()=>[(_(),l(x(Ct),{key:`table_${Rt.value}`,colNames:Z.value.colNames,head:Z.value.head,body:Z.value.body,config:Z.value.config,title:A.value.table.useDialog?``:Kn.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:L.value,onClose:i[2]||=e=>B.value.showTable=!1},{th:S(({th:e})=>[Be(Ye(e),1)]),td:S(({td:e})=>[f(`div`,{innerHTML:e},null,8,yt)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[A.value.table.useDialog?{name:`title`,fn:S(()=>[Be(Ye(Kn.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:S(()=>[f(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Nn(j.value.callbacks.csv),style:We({cursor:L.value?`pointer`:`default`})},[Ve(x(xt),{name:`fileCsv`,stroke:Kn.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):u(``,!0),b(e.$slots,`skeleton`,{},()=>[x(R)?(_(),l(me,{key:0})):u(``,!0)],!0)],46,$e))}},[[`__scopeId`,`data-v-51d1b5f6`]]);export{Qe as n,bt as t};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Dt as ee,Ht as te,J as s,Jt as ne,P as re,S as ie,U as ae,X as oe,Zt as se,_ as ce,at as le,i as ue,in as de,nt as fe,pt as pe,rn as me,t as he,tn as ge,w as _e,xt as ve,yt as ye,zt as be}from"./lib-rPeBMZrn.js";import{n as xe,t as Se}from"./BaseScanner-8NdoBs7B.js";import{n as Ce,t as we}from"./useHints-C-TwxM0Y.js";import{t as Te}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as Ee}from"./resolveChartConfig-CIhClE5R.js";import{t as De}from"./chartImage-DPGnEuYM.js";import{n as Oe}from"./Title-BliHuXfT.js";import{t as ke}from"./useChartExport-BZts4KFb.js";import{n as Ae,t as je}from"./tableIntegration-CNoJ1CIY.js";import{n as Me,t as Ne}from"./userOptionsSlots-DYuo-E5m.js";import{t as Pe}from"./usePrinter-DVf3YcG5.js";import{t as Fe}from"./useTransitions-ChGGrtrv.js";import{t as Ie}from"./useSvgLabelLayout-42Kats14.js";import{t as Le}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Re}from"./Shape-CRe8woTu.js";import{t as ze}from"./useResponsive-CENUxfEL.js";import{t as Be}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Ve}from"./A11yDataTable-DWNlWXzs.js";import{t as He}from"./useUserOptionState-CXlFnwPv.js";import{t as Ue}from"./useChartAccessibility-DOMuYJfm.js";import{t as We}from"./Legend-DM0ClX3D.js";import{t as Ge}from"./vue_ui_parallel_coordinate_plot-Cs_xXAG5.js";import{Fragment as c,Teleport as Ke,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as qe,createTextVNode as Je,createVNode as Ye,defineAsyncComponent as m,guardReactiveProps as h,mergeProps as Xe,nextTick as Ze,normalizeClass as g,normalizeProps as _,normalizeStyle as v,onBeforeUnmount as Qe,onMounted as $e,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as et,shallowRef as tt,toDisplayString as C,toRefs as nt,unref as w,watch as rt,withCtx as T}from"vue";var it=/* @__PURE__ */ e({default:()=>kt}),at=[`id`],ot=[`id`],st=[`id`],ct={style:{position:`relative`}},lt=[`xmlns`,`aria-describedby`,`viewBox`],ut=[`x`,`y`,`width`,`height`],dt={style:{"pointer-events":`none`}},ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt=[`d`,`stroke`,`stroke-width`],mt={key:0},ht=[`transform`,`fill`,`font-size`,`font-weight`],gt=[`fill`,`font-size`,`font-weight`,`text-anchor`,`transform`],_t=[`fill`,`font-size`,`font-weight`,`text-anchor`,`transform`,`innerHTML`],vt={key:0},yt=[`x`,`y`,`font-size`,`fill`],bt=[`width`,`x`,`y`],xt={style:{width:`100%`}},St=[`d`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],Ct=[`d`,`onMouseenter`,`onMouseleave`,`onClick`],wt=[`transform`,`fill`,`font-weight`,`font-size`,`stroke`,`onMouseenter`,`onMouseleave`,`onClick`],Tt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Et={key:5,class:`vue-data-ui-watermark`},Dt=[`id`],Ot=[`onClick`],kt=/*#__PURE__*/ Te({__name:`vue-ui-parallel-coordinate-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:Te,emit:it}){let kt=m(()=>import(`./Tooltip-C1q0Qoh7.js`)),At=m(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),jt=m(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Mt=m(()=>import(`./DataTable-Dof6yhO7.js`)),Nt=m(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Pt=m(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),Ft=m(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),It=m(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_parallel_coordinate_plot:Lt}=i(),E=e,Rt=l({get(){return!!E.dataset&&E.dataset.length},set(e){return e}}),zt=b(0),D=b(null),Bt=b(null),Vt=b(null),Ht=b(null),Ut=b(null),Wt=b(0),Gt=b(0),Kt=b(0),qt=b(!1),Jt=b(null),Yt=b(null),Xt=b(null),O=b(null),Zt=b({x:0,y:0}),Qt=b(`pointer`),$t=b(!1),k=b(oe()),A=b(!1);function en(e){A.value=e,zt.value+=1}let j=b(ln()),M=l(()=>j.value.userOptions),N=l(()=>j.value.style.chart.yAxis.labels),P=l(()=>j.value.style.chart.tooltip),F=l(()=>j.value.style.chart),{transitionEnabled:I}=Fe({config:()=>j.value.transitions,dataset:()=>E.dataset});Ce({config:()=>j.value,dataset:()=>E.dataset,component:`VueUiParallelCoordinatePlot`,rules:[we.emptyArray,{test:e=>e.length>10,message:[`👀 There are > 10 series. Consider:`,``,`▶️ Using filters, to show less series at the same time and make the chart more readable.`]},{test:e=>e.some(e=>(e?.series??[]).some(e=>(e?.values??[]).length>15)),message:[`👀 There are > 15 axes, which can make the chart hard to read. Consider:`,``,`▶️ Using filters, to allow users to select a maximum set of metrics.`]},{test:e=>e.some(e=>e?.series?.length>5),message:[`👀 Some series have > 5 datapoints. Consider:`,``,`▶️ Using filters, to allow users to select a maximum set of metrics.`]}]});let L=l(()=>j.value.userOptions.useCursorPointer),tn=l(()=>de({defaultConfig:{useCssAnimation:!1,userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,legend:{show:!0,backgroundColor:`transparent`},yAxis:{stroke:`#6A6A6A`,labels:{showAxisNames:!1,axisNames:[],ticks:{color:`#6A6A6A`}}}}}},userConfig:j.value.skeletonConfig??{}})),{loading:nn,FINAL_DATASET:rn,manualLoading:an}=xe({...nt(E),FINAL_CONFIG:j,prepareConfig:ln,callback:()=>{Promise.resolve().then(async()=>{await Ze(),W.value.showTable=j.value.table.show})},skeletonDataset:E.config?.skeletonDataset??[{name:``,shape:`circle`,color:`transparent`,series:[{name:``,values:[1,10,100,1e3]}]},{name:``,shape:`circle`,color:`#CACACA`,series:[{name:``,values:[.2,3,50,800]}]},{name:``,shape:`circle`,color:`transparent`,series:[{name:``,values:[0,0,0,0]}]}],skeletonConfig:de({defaultConfig:j.value,userConfig:tn.value})}),{userOptionsVisible:on,setUserOptionsVisibility:sn,keepUserOptionState:cn}=He({config:j.value}),{svgRef:R}=Ue({config:F.value.title});function ln(){return Ee(E.config,Lt,Ge)}let un=se(E.config);rt(()=>E.config,(e,t)=>{let n=se(e),r=n!==un;un=n;let i=ln();r?(nn.value||(j.value=i),on.value=!j.value.userOptions.showOnChartHover,mn(),Wt.value+=1,Kt.value+=1,Gt.value+=1,W.value.dataLabels.show=N.value.datapoints.show,W.value.showTable=j.value.table.show,W.value.showTooltip=P.value.show):(j.value.style.chart.tooltip=i.style.chart.tooltip,W.value.showTooltip=j.value.style.chart.tooltip.show)},{deep:!0}),rt(()=>E.dataset,e=>{Array.isArray(e)&&e.length>0&&(an.value=!1)},{deep:!0});let z=tt(null),B=tt(null),dn=b(!1),fn=0;$e(()=>{qt.value=!0,mn()});let pn=l(()=>j.value.debug);function mn(){be(E.dataset)?(le({componentName:`VueUiParallelCoordinatePlot`,type:`dataset`,debug:pn.value}),an.value=!0):E.dataset.forEach((e,t)=>{ye({datasetObject:e,requiredAttributes:[`name`,`series`]}).forEach(e=>{Rt.value=!1,le({componentName:`VueUiParallelCoordinatePlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:pn.value})})}),be(E.dataset)||(an.value=j.value.loading),j.value.responsive&&(z.value&&(B.value&&z.value.unobserve(B.value),z.value.disconnect()),z.value=new ResizeObserver(()=>{let{width:e,height:t}=ze({chart:D.value,title:F.value.title.text?Bt.value:null,legend:F.value.legend.show?Vt.value:null,source:Ht.value,noTitle:Ut.value});cancelAnimationFrame(fn),fn=requestAnimationFrame(()=>{V.value.width=e,V.value.height=t-12,dn.value=!0,j.value.responsiveProportionalSizing?(V.value.plotSize=me({relator:Math.min(e,t),adjuster:600,source:F.value.plots.radius,threshold:2,fallback:2}),V.value.ticksFontSize=me({relator:Math.min(e,t),adjuster:600,source:N.value.ticks.fontSize,threshold:10,fallback:10}),V.value.datapointFontSize=me({relator:Math.min(e,t),adjuster:600,source:N.value.datapoints.fontSize,threshold:10,fallback:10}),V.value.axisNameFontSize=me({relator:Math.min(e,t),adjuster:600,source:N.value.axisNamesFontSize,threshold:12,fallback:12})):(V.value.plotSize=F.value.plots.radius,V.value.ticksFontSize=N.value.ticks.fontSize,V.value.datapointFontSize=N.value.datapoints.fontSize,V.value.axisNameFontSize=N.value.axisNamesFontSize)})}),B.value=D.value.parentNode,z.value.observe(B.value))}Qe(()=>{cancelAnimationFrame(fn),z.value&&(B.value&&z.value.unobserve(B.value),z.value.disconnect())});let{isPrinting:hn,isImaging:gn,generatePdf:_n,generateImage:vn}=Pe({elementId:`pcp_${k.value}`,fileName:F.value.title.text||`vue-ui-parallel-coordinate-plot`,options:j.value.userOptions.print}),yn=l(()=>j.value.userOptions.show&&!F.value.title.text),V=b({height:F.value.height,width:F.value.width,plotSize:F.value.plots.radius,ticksFontSize:N.value.ticks.fontSize,datapointFontSize:N.value.datapoints.fontSize,axisNameFontSize:N.value.axisNamesFontSize}),bn=l(()=>V.value.width),xn=l(()=>V.value.height),{metrics:Sn,ready:Cn,settling:H,update:wn}=Ie({svgRef:R,canMeasure:()=>!j.value.responsive||dn.value,initialMetrics:{top:0},measure:e=>({top:e(Xt.value).height})}),Tn=l(()=>Sn.value.top),U=l(()=>{let{top:e,right:t,bottom:n,left:r}=F.value.padding,i=xn.value,a=bn.value;return{chartHeight:Math.max(.001,i),chartWidth:Math.max(.001,a),height:Math.max(.001,i-e-n-Tn.value-V.value.datapointFontSize*2),width:Math.max(.001,a-r-t),top:e+Tn.value+V.value.datapointFontSize,left:r,right:a-t,bottom:i-n-V.value.datapointFontSize}}),En=l(()=>_e(j.value.customPalette)),W=b({dataLabels:{show:N.value.datapoints.show},showTable:j.value.table.show,showTooltip:P.value.show});rt(j,()=>{W.value={dataLabels:{show:N.value.datapoints.show},showTable:j.value.table.show,showTooltip:P.value.show}},{immediate:!0});let G=b([]);function Dn(){G.value.length?G.value=[]:Mn.value.forEach(e=>{G.value.push(e.id)}),Kn(`selectLegend`,Fn.value)}function On(e){G.value.includes(e)?G.value=G.value.filter(t=>t!==e):G.value.push(e),Kn(`selectLegend`,Fn.value)}let K=l(()=>rn.value.map((e,t)=>{let n=ie(e.color)||En.value[t]||te[t]||te[t%te.length];return{...e,series:e.series.map(e=>({...e,id:oe(),color:n})),seriesIndex:t,color:n,id:oe(),shape:e.shape||`circle`}}));function kn(e){return K.value.length?K.value.find(t=>t.name===e)||(pn.value&&console.warn(`VueUiParallelCoordinatePlot - Series name not found "${e}"`),null):(pn.value&&console.warn(`VueUiParallelCoordinatePlot - There are no series to show.`),null)}function An(e){let t=kn(e);t!==null&&G.value.includes(t.id)&&On(t.id)}function jn(e){let t=kn(e);t!==null&&(G.value.includes(t.id)||On(t.id))}let Mn=l(()=>K.value.map(e=>({...e,opacity:G.value.includes(e.id)?.5:1,segregate:()=>On(e.id),isSegregated:G.value.includes(e.id),shape:e.shape||`circle`}))),Nn=l(()=>({cy:`pcp-div-legend`,backgroundColor:F.value.legend.backgroundColor,color:F.value.legend.color,fontSize:F.value.legend.fontSize,paddingBottom:12,fontWeight:F.value.legend.bold?`bold`:``})),Pn=l(()=>Math.max(...K.value.filter(e=>!G.value.includes(e.id)).map(e=>Math.max(...e.series.flatMap(e=>e.values.length))))),q=l(()=>U.value.width/Pn.value),Fn=l(()=>K.value.filter(e=>!G.value.includes(e.id))),J=l(()=>{let e=[];for(let t=0;t<Pn.value;t+=1){let n=Math.min(...Fn.value.flatMap(e=>e.series.map(e=>e.values[t]||0)||0)),r=Math.max(...Fn.value.flatMap(e=>e.series.map(e=>e.values[t]||0)||0)),i=r===n?n/4:n,a=r===n?r*2:r,o=ce(i,a,F.value.yAxis.scaleTicks),ee=o.ticks.map((e,n)=>{let r=o.min<0?e+Math.abs(o.min):e-Math.abs(o.min),i=o.min<0?o.max+Math.abs(o.min):o.max-Math.abs(o.min);return{y:U.value.bottom-U.value.height*(r/i),x:U.value.left+q.value*t+q.value/2,value:e}});e.push({scale:o,ticks:ee,name:N.value.axisNames[t]||`Y-${t+1}`})}return e}),Y=l(()=>Fn.value.map((e,t)=>({...e,series:e.series.map((n,r)=>({...n,datapoints:n.values.map((i,a)=>{let o=J.value[a].scale.min<0?(i||0)+Math.abs(J.value[a].scale.min):(i||0)-Math.abs(J.value[a].scale.min),ee=J.value[a].scale.min<0?J.value[a].scale.max+Math.abs(J.value[a].scale.min):J.value[a].scale.max-Math.abs(J.value[a].scale.min);return{name:n.name,seriesName:e.name,axisIndex:a,datapointIndex:r,seriesIndex:t,value:i||0,x:U.value.left+q.value*a+q.value/2,y:U.value.bottom-U.value.height*(o/ee),comment:n.comments&&n.comments[a]||``}})}))})).map(e=>({...e,series:e.series.map(e=>{let t=ae(e.datapoints),n=re(e.datapoints,.12),r=ve(F.value.lines.smooth?`M ${n}`:`M ${t}`);return{...e,smoothPath:n,straightPath:t,pathLength:r}})}))),X=l(()=>Y.value.flatMap((e,t)=>e.series.map((n,r)=>({shape:e.shape,serieName:e.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex,S:t,key:`${t}_${r}`}))));function In({value:e,index:t,datapoint:n}){return ue(N.value.formatters[t]||null,e,a({p:N.value.prefixes[t]||``,v:e,s:N.value.suffixes[t]||``,r:N.value.roundings[t]||0}),{datapoint:n,seriesIndex:t})}let Z=b(null),Ln=b(null),Rn=b(!1),zn=b(``);function Bn({shape:e,serie:t,S:n}){j.value.events.datapointLeave&&j.value.events.datapointLeave({datapoint:{...t,shape:e},seriesIndex:n});let r=O.value===null?null:X.value[O.value];Qt.value===`keyboard`&&r&&r.serie.id===t.id||(Z.value=null,Rn.value=!1)}function Vn(e){if(!R.value||!e?.datapoints?.length)return;let t=e.datapoints[Math.floor(e.datapoints.length/2)];if(!t)return;let n=ge(t.x,t.y,R.value);n&&(Zt.value=n)}function Hn({shape:e,serieName:t,serie:n,relativeIndex:r,seriesIndex:i,S:o,triggerMode:te=`pointer`}){j.value.events.datapointEnter&&j.value.events.datapointEnter({datapoint:{...n,shape:e},seriesIndex:o}),Qt.value=te,Ln.value={config:j.value,datapoint:n,serie:n,relativeIndex:r,seriesIndex:i,series:K.value,scales:J.value},Rn.value=!0,Z.value=n.id;let s=``,re=P.value.customFormat;ee(re)&&pe(()=>re({serie:n,seriesIndex:n.seriesIndex,series:K.value,config:j.value,scales:J.value}))?zn.value=re({serie:n,seriesIndex:n.seriesIndex,series:K.value,config:j.value,scales:J.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${t?t+` - `:``}${n.name}</div>`,J.value.map(e=>e.name).forEach((e,t)=>{s+=`
|
|
2
|
-
<div class="vue-ui-tooltip-item" style="text-align:left">
|
|
3
|
-
<span>${e}: </span>
|
|
4
|
-
<span>
|
|
5
|
-
${ue(N.value.formatters[t]||null,n.datapoints[t].value,a({p:N.value.prefixes[t]||``,v:n.datapoints[t].value,s:N.value.suffixes[t]||``,r:N.value.roundings[t]||``}),{datapoint:n.datapoints[t],seriesIndex:t})}
|
|
6
|
-
</span>
|
|
7
|
-
</div>
|
|
8
|
-
`,F.value.comments.showInTooltip&&n.datapoints[t].comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${ne(n.color,12.5)}; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${n.color}">${n.datapoints[t].comment}</div>`)}),zn.value=`<div>${s}</div>`),te===`keyboard`&&Ze(()=>{Vn(n)})}function Un(){return K.value}let Q=l(()=>{let e=[j.value.table.columnNames.series,j.value.table.columnNames.item].concat(J.value.map(e=>e.name));return{body:Y.value.flatMap((e,t)=>e.series.map(t=>[e.name,t.name].concat(t.values))),head:e,config:{th:{backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline},td:{backgroundColor:j.value.table.td.backgroundColor,color:j.value.table.td.color,outline:j.value.table.td.outline},breakpoint:j.value.table.responsiveBreakpoint},colNames:[j.value.table.columnNames.series,j.value.table.columnNames.item].concat(J.value.map(e=>e.name))}}),Wn=l(()=>Y.value.length===0?{head:[],body:[],config:{},columnNames:[]}:{head:Q.value.head,body:Q.value.body});function Gn(e=null){let t=[[F.value.title.text],[F.value.title.subtitle.text],[``]],n=Wn.value.head,r=Wn.value.body,i=t.concat([n]).concat(r),a=o(i);e?e(a):fe({csvContent:a,title:F.value.title.text||`vue-ui-parallel-coordinate-plot`})}let Kn=it;function qn({serie:e,shape:t,S:n}){j.value.events.datapointClick&&j.value.events.datapointClick({datapoint:{...e,shape:t},seriesIndex:n}),Kn(`selectDatapoint`,e)}function Jn(){W.value.showTable=!W.value.showTable}function Yn(){W.value.dataLabels.show=!W.value.dataLabels.show}function Xn(){W.value.showTooltip=!W.value.showTooltip}let Zn=b(!1);function Qn(){Zn.value=!Zn.value}let $n=De(D,()=>F.value.title.text),er=b({start:0,end:1}),tr=l(()=>J.value.map(e=>e.name));Le({timeLabelsEls:Xt,timeLabels:tr,slicer:er,configRef:j,rotationPath:[`style`,`chart`,`yAxis`,`labels`,`axisNamesRotation`],autoRotatePath:[`style`,`chart`,`yAxis`,`labels`,`axisNamesAutoRotate`,`enable`],isAutoSize:!1,width:bn,height:xn,targetClass:`.vue-ui-parallel-coordinate-plot-x-label`,rotation:N.value.axisNamesAutoRotate.angle});let nr=l(()=>je({config:j,style:F,mutableConfig:W,dialog:It,accordion:jt,isFullscreen:A,parent:D,maxWidth:800,isCursorPointer:L}));rt(()=>W.value.showTable,e=>Ae(e,j,Jt));function rr(){W.value.showTable=!1,Yt.value&&Yt.value.setTableIconState(!1)}let ir=l(()=>F.value.backgroundColor),ar=l(()=>F.value.legend),or=l(()=>F.value.title),{isCallbackImaging:sr,isCallbackSvg:cr,generateSvg:lr,onGenerateImage:ur}=ke({svg:R,title:or,legend:ar,legendItems:Mn,backgroundColor:ir,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:vn});async function dr(){Kn(`copyAlt`,{config:j.value,dataset:Y.value}),j.value.userOptions.callbacks.altCopy?await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function fr(e){let t=X.value.length;return t?(e%t+t)%t:null}function pr(){if(O.value!==null){let e=X.value[O.value];e&&Bn({shape:e.shape,serie:e.serie,S:e.S})}O.value=null,Qt.value=`pointer`,Z.value=null,Rn.value=!1}function mr(){O.value=null,$t.value=!0}function hr(){pr(),$t.value=!1}function gr(e){if(!R.value||Zn.value||document.activeElement!==R.value||!X.value.length)return;let t=[`ArrowUp`,`ArrowLeft`].includes(e.key),n=[`ArrowDown`,`ArrowRight`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){pr();return}if(r){if(O.value===null)return;let e=X.value[O.value];if(!e)return;qn({serie:e.serie,shape:e.shape,S:e.S});return}let a=O.value;a=a===null?n?0:X.value.length-1:fr(a+(n?1:-1));let o=X.value[a];o&&(O.value=a,Hn({shape:o.shape,serieName:o.serieName,serie:o.serie,relativeIndex:o.relativeIndex,seriesIndex:o.seriesIndex,S:o.S,triggerMode:`keyboard`}))}let $=l(()=>({head:Q.value.head,body:Q.value.body.map(e=>[e[0]??``,e[1]??``,...e.slice(2)]),caption:j.value.a11y.translations.tableCaption,notice:j.value.a11y.translations.tableAvailable}));return Te({getData:Un,getImage:$n,generateCsv:Gn,generatePdf:_n,generateImage:vn,generateSvg:lr,hideSeries:jn,showSeries:An,toggleTable:Jn,toggleLabels:Yn,toggleTooltip:Xn,toggleAnnotator:Qn,toggleFullscreen:en,copyAlt:dr}),rt(()=>[V.value,N.value,Xt.value,E.dataset,G.value,dn.value,j.value.style.fontFamily],wn,{flush:`post`,deep:!0}),(e,i)=>(y(),f(`div`,{ref_key:`pcpChart`,ref:D,class:g(`vue-data-ui-component vue-ui-pcp ${A.value?`vue-data-ui-wrapper-fullscreen`:``} ${j.value.useCssAnimation?``:`vue-ui-dna`}`),style:v(`font-family:${j.value.style.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor};${j.value.responsive?`height:100%`:``}`),id:`pcp_${k.value}`,onMouseenter:i[2]||=()=>w(sn)(!0),onMouseleave:i[3]||=()=>w(sn)(!1)},[p(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[p(`p`,null,C(j.value.a11y.translations.keyboardNavigation),1)],8,ot),$.value.body.length?(y(),u(Ve,{key:0,uid:k.value,head:$.value.head,body:$.value.body,caption:$.value.caption,notice:$.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):d(``,!0),M.value.buttons.annotator?(y(),u(w(Nt),Xe({key:1},w(n)(M.value.annotator),{svgRef:w(R),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Zn.value,isCursorPointer:L.value,palette:M.value.annotatorPalette,onClose:Qn}),qe({_:2},[x(w(r),n=>({name:n,fn:T(r=>[S(e.$slots,n,_(h(w(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):d(``,!0),yn.value?(y(),f(`div`,{key:2,ref_key:`noTitle`,ref:Ut,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):d(``,!0),F.value.title.text?(y(),f(`div`,{key:3,ref_key:`chartTitle`,ref:Bt,style:`width:100%;background:transparent;padding-bottom:24px`},[(y(),u(Oe,{key:`title_${Wt.value}`,config:{title:{cy:`pcp-div-title`,...F.value.title},subtitle:{cy:`pcp-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):d(``,!0),p(`div`,{id:`legend-top-${k.value}`},null,8,st),M.value.show&&Rt.value&&(w(cn)||w(on))?(y(),u(w(Pt),{ref_key:`userOptionsRef`,ref:Yt,key:`user_options_${zt.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:w(hn),isImaging:w(gn),uid:k.value,hasTooltip:M.value.buttons.tooltip&&P.value.show,hasPdf:M.value.buttons.pdf,hasXls:M.value.buttons.csv,hasImg:M.value.buttons.img,hasSvg:M.value.buttons.svg,hasTable:M.value.buttons.table,hasLabel:M.value.buttons.labels,hasFullscreen:M.value.buttons.fullscreen,hasAltCopy:M.value.buttons.altCopy,isFullscreen:A.value,isTooltip:W.value.showTooltip,titles:{...M.value.buttonTitles},chartElement:D.value,position:M.value.position,hasAnnotator:M.value.buttons.annotator,isAnnotation:Zn.value,callbacks:M.value.callbacks,printScale:M.value.print.scale,tableDialog:j.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:en,onGeneratePdf:w(_n),onGenerateCsv:Gn,onGenerateImage:w(ur),onGenerateSvg:w(lr),onToggleTable:Jn,onToggleLabels:Yn,onToggleTooltip:Xn,onToggleAnnotator:Qn,onCopyAlt:dr,style:v({visibility:w(cn)?w(on)?`visible`:`hidden`:`visible`})},qe({_:2},[x(w(Me)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,_(h(w(Ne)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):d(``,!0),p(`div`,ct,[(y(),f(`svg`,{ref_key:`svgRef`,ref:R,xmlns:w(he),"aria-describedby":`chart-instructions-${k.value}`,class:g({"vue-data-ui-fullscreen--on":A.value,"vue-data-ui-fulscreen--off":!A.value,"vue-data-ui-no-transition":!w(I)||w(H)}),viewBox:`0 0 ${U.value.chartWidth<=0?10:U.value.chartWidth} ${U.value.chartHeight<=0?10:U.value.chartHeight}`,style:v(`max-width:100%; overflow: visible; background:transparent;color:${F.value.color};visibility:${w(Cn)?`visible`:`hidden`}`),tabindex:`0`,onFocus:mr,onBlur:hr,onKeydown:gr},[Ye(w(Ft)),S(e.$slots,`svg-underlayer`,{svg:{...U.value,isPrintingImg:w(hn)||w(gn)||w(sr),isPrintingSvg:w(cr)}},void 0,!0),e.$slots[`chart-background`]?(y(),f(`foreignObject`,{key:0,x:U.value.left,y:U.value.top,width:U.value.width,height:U.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,ut)):d(``,!0),(y(!0),f(c,null,x(J.value,(e,t)=>(y(),f(`g`,dt,[p(`line`,{x1:U.value.left+q.value*t+q.value/2,x2:U.value.left+q.value*t+q.value/2,y1:U.value.top,y2:U.value.bottom,stroke:F.value.yAxis.stroke,"stroke-width":F.value.yAxis.strokeWidth},null,8,ft),N.value.ticks.show?(y(),f(c,{key:0},[(y(!0),f(c,null,x(e.ticks,(t,n)=>(y(),f(`path`,{class:g({"vue-data-ui-transition":w(I)&&!w(H)}),key:`tick_${e.name}_${n}`,d:`M${t.x},${t.y} ${t.x-10},${t.y}`,stroke:F.value.yAxis.stroke,"stroke-width":F.value.yAxis.strokeWidth,style:v(`opacity:${Z.value&&!W.value.showTooltip?.2:1}`)},null,14,pt))),128)),w(nn)?d(``,!0):(y(),f(`g`,mt,[(y(!0),f(c,null,x(e.ticks,(n,r)=>(y(),f(`text`,{key:`tl_${e.name}_${r}`,class:g({"vue-data-ui-transition":w(I)&&!w(H)}),transform:`translate(${n.x-12+N.value.ticks.offsetX}, ${n.y+N.value.ticks.offsetY+V.value.ticksFontSize/3})`,fill:N.value.ticks.color,"text-anchor":`end`,"font-size":V.value.ticksFontSize,"font-weight":N.value.ticks.bold?`bold`:`normal`,style:v(`opacity:${Z.value&&!W.value.showTooltip?.2:1}`)},C(In({value:n.value,index:t,datapoint:n})),15,ht))),128))]))],64)):d(``,!0)]))),256)),N.value.showAxisNames?(y(),f(`g`,{key:1,ref_key:`xAxisLabels`,ref:Xt},[(y(!0),f(c,null,x(J.value,(e,t)=>(y(),f(c,null,[String(e.name).includes(`
|
|
9
|
-
`)?(y(),f(`text`,{key:1,class:`vue-ui-parallel-coordinate-plot-x-label`,fill:N.value.axisNamesColor,"font-size":V.value.axisNameFontSize,"font-weight":N.value.axisNamesBold?`bold`:``,"text-anchor":N.value.axisNamesRotation===0?`middle`:N.value.axisNamesRotation<0?`start`:`end`,transform:`translate(${U.value.left+q.value*t+q.value/2}, ${Tn.value-V.value.axisNameFontSize}), rotate(${N.value.axisNamesRotation})`,innerHTML:w(s)({content:String(e.name),fontSize:V.value.axisNameFontSize,fill:N.value.axisNamesColor,x:0,y:0})},null,8,_t)):(y(),f(`text`,{key:0,class:`vue-ui-parallel-coordinate-plot-x-label`,fill:N.value.axisNamesColor,"font-size":V.value.axisNameFontSize,"font-weight":N.value.axisNamesBold?`bold`:``,"text-anchor":N.value.axisNamesRotation===0?`middle`:N.value.axisNamesRotation<0?`start`:`end`,transform:`translate(${U.value.left+q.value*t+q.value/2}, ${Tn.value-V.value.axisNameFontSize}), rotate(${N.value.axisNamesRotation})`},C(e.name),9,gt))],64))),256))],512)):d(``,!0),(y(!0),f(c,null,x(Y.value,(t,n)=>(y(),f(`g`,null,[(y(!0),f(c,null,x(t.series,(r,i)=>(y(),f(`g`,null,[F.value.plots.show?(y(),f(`g`,vt,[(y(!0),f(c,null,x(r.datapoints,(e,a)=>(y(),u(Re,{plot:{x:e.x,y:e.y},color:t.color,shape:t.shape,radius:t.shape===`triangle`?V.value.plotSize*1.2:V.value.plotSize,stroke:F.value.backgroundColor,strokeWidth:.5,onMouseenter:e=>Hn({shape:t.shape,serieName:t.name,serie:r,relativeIndex:i,seriesIndex:r.seriesIndex,S:n,triggerMode:`pointer`}),onMouseleave:e=>Bn({serie:r,shape:t.shape,S:n}),style:v(`opacity:${Z.value?Z.value===r.id?F.value.plots.opacity:.2:F.value.plots.opacity}`),onClick:()=>qn({serie:r,shape:t.shape,S:n})},null,8,[`plot`,`color`,`shape`,`radius`,`stroke`,`onMouseenter`,`onMouseleave`,`style`,`onClick`]))),256)),W.value.showTooltip?d(``,!0):(y(),f(c,{key:0},[Z.value&&Z.value===r.id&&r.datapoints.length?(y(),f(`text`,{key:0,x:r.datapoints[0].x-V.value.ticksFontSize,y:r.datapoints[0].y+V.value.ticksFontSize/3,"text-anchor":`end`,"font-size":V.value.ticksFontSize,fill:t.color,"font-weight":`bold`},C(r.name),9,yt)):d(``,!0)],64)),F.value.comments.show?(y(!0),f(c,{key:1},x(r.datapoints,n=>(y(),f(`g`,null,[n.comment?(y(),f(`foreignObject`,{key:0,style:{overflow:`visible`},height:`12`,width:F.value.comments.width,x:n.x-F.value.comments.width/2+F.value.comments.offsetX,y:n.y+F.value.comments.offsetY+6},[p(`div`,xt,[S(e.$slots,`plot-comment`,{plot:{...n,color:t.color}},void 0,!0)])],8,bt)):d(``,!0)]))),256)):d(``,!0)])):d(``,!0),p(`path`,{d:`M${F.value.lines.smooth?r.smoothPath:r.straightPath}`,stroke:t.color,"stroke-width":F.value.lines.strokeWidth,fill:`none`,class:g({"vue-ui-pcp-animated vue-data-ui-line-animated":j.value.useCssAnimation,"vue-data-ui-transition":w(I)&&!w(H)}),onMouseenter:e=>Hn({shape:t.shape,serieName:t.name,serie:r,relativeIndex:i,seriesIndex:r.seriesIndex,S:n,triggerMode:`pointer`}),onMouseleave:e=>Bn({serie:r,shape:t.shape,S:n}),onClick:()=>qn({serie:r,shape:t.shape,S:n}),style:v(`opacity:${Z.value?Z.value===r.id?F.value.lines.opacity:.2:F.value.lines.opacity}; stroke-dasharray:${r.pathLength}; stroke-dashoffset: ${j.value.useCssAnimation?r.pathLength:0}`)},null,46,St),W.value.showTooltip?(y(),f(`path`,{key:1,d:`M${F.value.lines.smooth?r.smoothPath:r.straightPath}`,stroke:`transparent`,"stroke-width":12,fill:`none`,class:g({"vue-ui-pcp-animated vue-data-ui-line-animated":j.value.useCssAnimation,"vue-data-ui-transition":w(I)&&!w(H)}),onMouseenter:e=>Hn({shape:t.shape,serieName:t.name,serie:r,relativeIndex:i,seriesIndex:r.seriesIndex,S:n,triggerMode:`pointer`}),onMouseleave:e=>Bn({serie:r,shape:t.shape,S:n}),onClick:()=>qn({serie:r,shape:t.shape,S:n}),style:{opacity:`0`}},null,42,Ct)):d(``,!0)]))),256))]))),256)),(y(!0),f(c,null,x(Y.value,(e,t)=>(y(),f(`g`,null,[(y(!0),f(c,null,x(e.series,(n,r)=>(y(),f(`g`,null,[!w(nn)&&(W.value.dataLabels.show||Z.value&&Z.value===n.id)?(y(!0),f(c,{key:0},x(n.datapoints,(i,a)=>(y(),f(`text`,{key:`pl_${n.id}_${a}`,transform:`translate(${i.x+12+N.value.datapoints.offsetX}, ${i.y+N.value.datapoints.offsetY+V.value.datapointFontSize/3})`,fill:N.value.datapoints.useSerieColor?e.color:N.value.datapoints.color,"text-anchor":`start`,"font-weight":N.value.datapoints.bold?`bold`:`normal`,class:g({"vue-ui-pcp-plot-label":!0,"vue-data-ui-transition":w(I)&&!w(H)}),"font-size":V.value.datapointFontSize,stroke:F.value.backgroundColor,"stroke-width":3,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`,onMouseenter:i=>Hn({shape:e.shape,serieName:e.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex,S:t,triggerMode:`pointer`}),onMouseleave:r=>Bn({serie:n,shape:e.shape,S:t}),onClick:()=>qn({serie:n,shape:e.shape,S:t}),style:v(`opacity:${Z.value?Z.value===n.id?1:.2:1}`)},C(In({value:i.value,index:a,datapoint:i})),47,wt))),128)):d(``,!0)]))),256))]))),256)),S(e.$slots,`svg`,{svg:{...U.value,isPrintingImg:w(hn)||w(gn)||w(sr),isPrintingSvg:w(cr)}},void 0,!0)],46,lt)),e.$slots.hint?(y(),f(`div`,Tt,[S(e.$slots,`hint`,_(h({hint:j.value.a11y.translations.keyboardNavigation,isVisible:$t.value})),void 0,!0)])):d(``,!0)]),e.$slots.watermark?(y(),f(`div`,Et,[S(e.$slots,`watermark`,_(h({isPrinting:w(hn)||w(gn)||w(sr)||w(cr)})),void 0,!0)])):d(``,!0),p(`div`,{id:`legend-bottom-${k.value}`},null,8,Dt),qt.value&&(F.value.legend.show||e.$slots.legend)?(y(),u(Ke,{key:6,to:F.value.legend.position===`top`?`#legend-top-${k.value}`:`#legend-bottom-${k.value}`},[p(`div`,{ref_key:`chartLegend`,ref:Vt},[S(e.$slots,`legend`,{legend:Mn.value},()=>[F.value.legend.show&&Rt.value?(y(),u(We,{key:`legend_${Gt.value}`,legendSet:Mn.value,config:Nn.value,isCursorPointer:L.value,onClickMarker:i[0]||=({legend:e})=>{On(e.id)}},{item:T(({legend:e,index:t})=>[p(`div`,{onClick:t=>e.segregate(),style:v(`opacity:${G.value.includes(e.id)?.5:1}`)},C(e.name),13,Ot)]),legendToggle:T(()=>[Mn.value.length>2&&F.value.legend.selectAllToggle.show&&!w(nn)?(y(),u(Be,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:G.value.length>0,isCursorPointer:L.value,onToggle:Dn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):d(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):d(``,!0)],!0)],512)],8,[`to`])):d(``,!0),e.$slots.source?(y(),f(`div`,{key:7,ref_key:`source`,ref:Ht,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):d(``,!0),Ye(w(kt),{teleportTo:P.value.teleportTo,show:W.value.showTooltip&&Rn.value,backgroundColor:P.value.backgroundColor,color:P.value.color,fontSize:P.value.fontSize,borderRadius:P.value.borderRadius,borderColor:P.value.borderColor,borderWidth:P.value.borderWidth,backgroundOpacity:P.value.backgroundOpacity,position:P.value.position,offsetX:P.value.offsetX,offsetY:P.value.offsetY,parent:D.value,content:zn.value,isFullscreen:A.value,isCustom:w(ee)(P.value.customFormat),smooth:P.value.smooth,backdropFilter:P.value.backdropFilter,smoothForce:P.value.smoothForce,smoothSnapThreshold:P.value.smoothSnapThreshold,isA11yMode:Qt.value===`keyboard`,a11yPosition:Zt.value},{"tooltip-before":T(()=>[S(e.$slots,`tooltip-before`,_(h({...Ln.value})),void 0,!0)]),tooltip:T(()=>[S(e.$slots,`tooltip`,_(h({...Ln.value})),void 0,!0)]),"tooltip-after":T(()=>[S(e.$slots,`tooltip-after`,_(h({...Ln.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Rt.value&&M.value.buttons.table?(y(),u(et(nr.value.component),Xe({key:8},nr.value.props,{ref_key:`tableUnit`,ref:Jt,onClose:rr}),qe({content:T(()=>[(y(),u(w(Mt),{key:`table_${Kt.value}`,colNames:Q.value.colNames,head:Q.value.head,body:Q.value.body,config:Q.value.config,title:j.value.table.useDialog?``:nr.value.title,withCloseButton:!j.value.table.useDialog,isCursorPointer:L.value,onClose:rr},{th:T(({th:e})=>[p(`div`,null,C(e),1)]),td:T(({td:e})=>[Je(C(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[j.value.table.useDialog?{name:`title`,fn:T(()=>[Je(C(nr.value.title),1)]),key:`0`}:void 0,j.value.table.useDialog?{name:`actions`,fn:T(()=>[p(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Gn(M.value.callbacks.csv),style:v({cursor:L.value?`pointer`:`default`})},[Ye(w(At),{name:`fileCsv`,stroke:nr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):d(``,!0),S(e.$slots,`skeleton`,{},()=>[w(nn)?(y(),u(Se,{key:0})):d(``,!0)],!0)],46,at))}},[[`__scopeId`,`data-v-80e31642`]]);export{it as n,kt as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,Ct as o,D as ee,Dt as te,Ht as ne,J as re,Jt as ie,S as ae,X as oe,Yt as se,Zt as ce,at as le,i as s,in as ue,jt as de,nt as fe,pt as pe,r as me,t as he,w as ge,zt as _e}from"./lib-rPeBMZrn.js";import{n as ve,t as ye}from"./BaseScanner-8NdoBs7B.js";import{n as be,t as xe}from"./useHints-C-TwxM0Y.js";import{t as Se}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as Ce}from"./resolveChartConfig-CIhClE5R.js";import{t as we}from"./chartImage-DPGnEuYM.js";import{n as Te}from"./Title-BliHuXfT.js";import{t as Ee}from"./useChartExport-BZts4KFb.js";import{n as De,t as Oe}from"./tableIntegration-CNoJ1CIY.js";import{n as ke,t as Ae}from"./userOptionsSlots-DYuo-E5m.js";import{t as je}from"./usePrinter-DVf3YcG5.js";import{t as Me}from"./Shape-CRe8woTu.js";import{c as Ne}from"./canvas-lib-22VpOI4_.js";import{t as Pe}from"./useResponsive-CENUxfEL.js";import{t as Fe}from"./DefGrad-DKMq1REY.js";import{t as Ie}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Le}from"./A11yDataTable-DWNlWXzs.js";import{t as Re}from"./useUserOptionState-CXlFnwPv.js";import{t as ze}from"./useChartAccessibility-DOMuYJfm.js";import{t as Be}from"./Legend-DM0ClX3D.js";import{t as Ve}from"./vue_ui_quadrant-BUv-SqzP.js";import{Fragment as c,Teleport as He,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as Ue,createTextVNode as We,createVNode as Ge,defineAsyncComponent as m,guardReactiveProps as h,mergeProps as Ke,nextTick as qe,normalizeClass as g,normalizeProps as _,normalizeStyle as v,onBeforeUnmount as Je,onMounted as Ye,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as Xe,shallowRef as Ze,toDisplayString as C,toRefs as Qe,unref as w,watch as $e,withCtx as T}from"vue";var et=/* @__PURE__ */ e({default:()=>ln}),tt=[`id`],nt=[`id`],rt=[`id`],it={style:{position:`relative`}},at=[`xmlns`,`aria-describedby`,`viewBox`,`id`],ot=[`x`,`y`,`width`,`height`],st={key:1},ct=[`fill`,`x`,`y`,`height`,`width`,`stroke-width`,`stroke`,`rx`],lt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],ut=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],dt={key:2},ft=[`points`,`fill`],pt=[`points`,`fill`],mt=[`points`,`fill`],ht=[`points`,`fill`],gt={key:3},_t=[`y`,`fill`,`font-size`],vt=[`x`,`y`,`fill`,`font-size`],yt=[`x`,`y`,`fill`,`font-size`],bt=[`y`,`fill`,`font-size`],xt={key:4},St=[`x`,`y`,`font-size`,`fill`],Ct=[`x`,`y`,`font-size`,`fill`],wt=[`x`,`y`,`font-size`,`fill`],Tt=[`id`,`font-size`,`transform`,`fill`],Et=[`id`,`font-size`,`transform`,`fill`],Dt=[`id`,`font-size`,`transform`,`fill`],Ot={key:5},kt=[`fill`,`points`],At=[`x`,`y`,`width`,`height`],jt=[`x`,`y`,`width`,`height`],Mt=[`x`,`y`,`width`,`height`],Nt=[`x`,`y`,`width`,`height`],Pt=[`x`,`y`,`onMouseenter`,`onMouseleave`,`onClick`],Ft=[`data-a11y-plot-id`,`cx`,`cy`,`r`],It=[`data-a11y-plot-id`,`cx`,`cy`,`r`],Lt={key:0,style:{"pointer-events":`none`}},Rt=[`x`,`y`,`font-size`,`fill`],zt=[`x`,`y`,`font-size`,`fill`,`innerHTML`],Bt={key:0},Vt=[`x`,`y`,`onMouseover`,`onMouseleave`,`onClick`],Ht={key:8,class:`vue-ui-dna`},Ut=[`points`,`fill`],Wt=[`points`,`fill`],Gt=[`points`,`fill`],Kt=[`points`,`fill`],qt={key:9},Jt=[`x`,`y`,`font-size`,`fill`,`font-weight`],Yt={key:10},Xt=[`x`,`y`,`fill`],Zt=[`x`,`y`,`fill`],Qt=[`x`,`y`,`fill`],$t=[`x`,`y`,`fill`],en=[`stroke`,`d`],tn=[`stroke`,`d`],nn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},rn={key:5,class:`vue-data-ui-watermark`},an=[`id`],on=[`onClick`],sn={key:0,height:`14`,width:`14`,viewBox:`0 0 20 20`},cn=[`innerHTML`],ln=/*#__PURE__*/ Se({__name:`vue-ui-quadrant`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectPlot`,`selectSide`,`selectLegend`,`copyAlt`],setup(e,{expose:Se,emit:et}){let ln=m(()=>import(`./Tooltip-C1q0Qoh7.js`)),un=m(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),dn=m(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),fn=m(()=>import(`./DataTable-Dof6yhO7.js`)),pn=m(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),mn=m(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),hn=m(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),gn=m(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_quadrant:_n}=i(),E=e,vn=l(()=>!!E.dataset&&E.dataset.length),D=b(oe()),yn=et,bn=b(!1),xn=b(``),Sn=b(0),O=b(!1),k=b(null),Cn=b(null),wn=b(null),Tn=b(null),En=b(null),Dn=b(0),On=b(0),kn=b(0),An=b(!1),jn=b(null),Mn=b(null),Nn=b(null),Pn=b(null),Fn=b({x:0,y:0}),In=b(`pointer`),Ln=b(!1),A=b(Wn()),j=l(()=>A.value.userOptions),M=l(()=>A.value.style.chart.layout.grid),N=l(()=>A.value.style.chart.layout.labels),P=l(()=>A.value.style.chart.tooltip),F=l(()=>A.value.style.chart);be({config:()=>A.value,dataset:()=>E.dataset,component:`VueUiQuadrant`,rules:[xe.emptyArray,xe.noHint]});let I=l(()=>A.value.userOptions.useCursorPointer),Rn=l(()=>({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A`,graduations:{stroke:`#6A6A6A`,color:`#6A6A6A90`},xAxis:{auto:!0},yAxis:{auto:!0}},labels:{quadrantLabels:{show:!1},plotLabels:{show:!1},axisLabels:{show:!1}},plots:{outlineColor:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:A.value.skeletonConfig??{}})),{loading:zn,FINAL_DATASET:Bn}=ve({...Qe(E),FINAL_CONFIG:A,prepareConfig:Wn,callback:()=>{Promise.resolve().then(async()=>{await qe(),z.value.showTable=A.value.table.show})},skeletonDataset:E.config?.skeletonDataset??[{name:`_`,shape:`circle`,color:`#CACACA`,series:[{name:`_`,x:-6,y:-4},{name:`_`,x:-5,y:-2},{name:`_`,x:-4,y:-1},{name:`_`,x:-3,y:-.5},{name:`_`,x:-2,y:-.25},{name:`_`,x:-1,y:-.135},{name:`_`,x:0,y:0},{name:`_`,x:1,y:.135},{name:`_`,x:2,y:.25},{name:`_`,x:3,y:.5},{name:`_`,x:4,y:1},{name:`_`,x:5,y:2},{name:`_`,x:6,y:4}]}],skeletonConfig:ue({defaultConfig:A.value,userConfig:Rn.value})}),{userOptionsVisible:Vn,setUserOptionsVisibility:Hn,keepUserOptionState:Un}=Re({config:A.value}),{svgRef:L}=ze({config:F.value.title});function Wn(){return Ce(E.config,_n,Ve)}let Gn=ce(E.config);$e(()=>E.config,(e,t)=>{let n=ce(e),r=n!==Gn;Gn=n;let i=Wn();r?(A.value=i,Vn.value=!A.value.userOptions.showOnChartHover,Jn(),Dn.value+=1,On.value+=1,kn.value+=1,z.value.plotLabels.show=N.value.plotLabels.show,z.value.showTable=A.value.table.show,z.value.showTooltip=P.value.show):(A.value.style.chart.tooltip=i.style.chart.tooltip,z.value.showTooltip=A.value.style.chart.tooltip.show)},{deep:!0});let R=Ze(null),Kn=Ze(null),qn=l(()=>A.value.debug);function Jn(){if(_e(E.dataset)?le({componentName:`VueUiQuadrant`,type:`dataset`,debug:qn.value}):qn.value&&E.dataset.forEach((e,t)=>{[null,void 0].includes(e.name)&&le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.series)?le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`series`,index:t}):e.series.forEach((e,t)=>{[null,void 0].includes(e.name)&&le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,key:`series`,index:t})})}),A.value.responsive){let e=Ne(()=>{let{width:e,height:t}=Pe({chart:k.value,title:F.value.title.text?Cn.value:null,legend:F.value.legend.show?wn.value:null,source:Tn.value,noTitle:En.value});B.value=48,requestAnimationFrame(()=>{V.value.height=t,V.value.usableHeight=t-B.value*2,V.value.width=e,V.value.usableWidth=e-B.value*2,V.value.top=B.value,V.value.left=B.value,V.value.right=e-B.value,V.value.bottom=t-B.value,V.value.centerX=e/2,V.value.centerY=t-t/2,V.value.padding=B.value})});R.value&&(Kn.value&&R.value.unobserve(Kn.value),R.value.disconnect()),R.value=new ResizeObserver(e),Kn.value=k.value.parentNode,R.value.observe(Kn.value)}}Ye(()=>{An.value=!0,Jn()}),Je(()=>{R.value&&(Kn.value&&R.value.unobserve(Kn.value),R.value.disconnect())});let{isPrinting:Yn,isImaging:Xn,generatePdf:Zn,generateImage:Qn}=je({elementId:`vue-ui-quadrant_${D.value}`,fileName:F.value.title.text||`vue-ui-quadrant`,options:A.value.userOptions.print}),$n=l(()=>A.value.userOptions.show&&!F.value.title.text),er=l(()=>ge(A.value.customPalette)),z=b({plotLabels:{show:N.value.plotLabels.show},showTable:A.value.table.show,showTooltip:P.value.show}),B=b(48),V=b({height:F.value.height,usableHeight:F.value.height-B.value*2,width:F.value.width,usableWidth:F.value.width-B.value*2,top:B.value,left:B.value,right:F.value.width-B.value,bottom:F.value.height-B.value,centerX:F.value.width/2,centerY:F.value.height-F.value.height/2,padding:B.value}),H=b({...JSON.parse(JSON.stringify(V.value)),startX:0,startY:0});$e(()=>V.value,e=>{e&&(H.value={...JSON.parse(JSON.stringify(V.value)),startX:0,startY:0})},{deep:!0});let U=b(null),W=l(()=>{switch(U.value){case`TL`:return{x:H.value.startX+H.value.width/2,y:H.value.height,text:N.value.quadrantLabels.tl.text||`Top Left`,fontSize:N.value.quadrantLabels.tl.fontSize,fill:N.value.quadrantLabels.tl.color,bold:N.value.quadrantLabels.tl.bold};case`TR`:return{x:H.value.startX+H.value.width/2,y:H.value.height,text:N.value.quadrantLabels.tr.text||`Top Right`,fontSize:N.value.quadrantLabels.tr.fontSize,fill:N.value.quadrantLabels.tr.color,bold:N.value.quadrantLabels.tr.bold};case`BR`:return{x:H.value.startX+H.value.width/2,y:H.value.height*1.678,text:N.value.quadrantLabels.br.text||`Bottom Right`,fontSize:N.value.quadrantLabels.br.fontSize,fill:N.value.quadrantLabels.br.color,bold:N.value.quadrantLabels.br.bold};case`BL`:return{x:H.value.startX+H.value.width/2,y:H.value.height*1.678,text:N.value.quadrantLabels.bl.text||`Bottom Left`,fontSize:N.value.quadrantLabels.bl.fontSize,fill:N.value.quadrantLabels.bl.color,bold:N.value.quadrantLabels.bl.bold};default:return{x:0,y:0,text:``,fontSize:0,fill:`none`,bold:!1}}}),tr=b(null),nr=b(!1);function rr({targetX:e,targetY:t,targetW:n,targetH:r,side:i}){U.value&&Er(i);let a={x:e-H.value.startX,y:t-H.value.startY,w:n-H.value.width,h:r-H.value.height},o=A.value.zoomAnimationFrames,ee=0;function te(){nr.value=!0,H.value.startX+=a.x/o,H.value.startY+=a.y/o,H.value.width+=a.w/o,H.value.height+=a.h/o,ee+=1,ee<o?tr.value=requestAnimationFrame(te):nr.value=!1}te()}let G=l(()=>A.value.zoomEnabled);function K(e){if(G.value&&!nr.value){if(O.value&&U.value===e)rr({targetX:0,targetY:0,targetW:V.value.width,targetH:V.value.height}),U.value=null,O.value=!1;else{switch(U.value=e,e){case`TL`:rr({targetX:0,targetY:0,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:`tl`});break;case`TR`:rr({targetX:V.value.width/2-V.value.left,targetY:0,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:`tr`});break;case`BR`:rr({targetX:V.value.width/2-V.value.left,targetY:V.value.height/2-V.value.top,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:`br`});break;case`BL`:rr({targetX:0,targetY:V.value.height/2-V.value.top,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:`bl`});break;default:H.value.startX=0,H.value.startY=0,H.value.width=V.value.width,H.value.height=V.value.height}O.value=!0}}}let ir=l(()=>{let e=M.value.graduations.steps,t=V.value.usableWidth/(e*2),n=V.value.top,r=[];for(let i=0;i<e;i+=1)r.push({x:V.value.padding+t*i,y:n+V.value.usableHeight*(i/e/2),height:V.value.usableHeight*(1-i/e),width:V.value.usableWidth*(1-i/e),opacity:Math.round((i+1)/e*20)});return r}),q=l(()=>{let e=M.value.xAxis.max,t=M.value.xAxis.min,n=M.value.yAxis.max,r=M.value.yAxis.min;return M.value.xAxis.auto&&(e=Math.max(...ar.value.flatMap(e=>e.series.map(e=>e.x))),t=Math.min(...ar.value.flatMap(e=>e.series.map(e=>e.x)))),M.value.yAxis.auto&&(n=Math.max(...ar.value.flatMap(e=>e.series.map(e=>e.y))),r=Math.min(...ar.value.flatMap(e=>e.series.map(e=>e.y)))),{x:{max:e,min:t},y:{max:n,min:r}}}),J=b([]),ar=l(()=>Bn.value.map((e,t)=>({...e,series:de({data:e.series,threshold:A.value.downsample.threshold}),id:`cat_${t}_${D.value}`,color:ae(e.color)||er.value[t]||ne[t]}))),or=l(()=>ar.value.filter(e=>!J.value.includes(e.id))),sr=l(()=>ar.value.map((e,t)=>({...e,shape:e.shape||`circle`,series:e.series.map(t=>({...t,x:cr(t.x),y:lr(t.y),xValue:t.x,yValue:t.y,quadrantSide:vr({x:t.x,y:t.y}),categoryName:e.name,category:e,shape:e.shape,color:e.color}))}))),Y=l(()=>(qn.value&&Bn.value.forEach((e,t)=>{e.series.forEach((e,t)=>{[null,void 0].includes(e.x)&&le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`x`,key:`series`,index:t}),[null,void 0].includes(e.y)&&le({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`y`,key:`series`,index:t})})}),or.value.map((e,t)=>({...e,shape:e.shape||`circle`,color:e.color||er.value[t]||ne[t],series:e.series.map(t=>({...t,category:e,x:cr(t.x),y:lr(t.y),xValue:t.x,yValue:t.y,quadrantSide:vr({x:t.x,y:t.y}),categoryName:e.name,shape:e.shape,color:e.color,uid:oe()}))}))));function cr(e){if(e>=0){let t=e/q.value.x.max;return V.value.centerX+V.value.usableWidth/2*t}{let t=Math.abs(e)/Math.abs(q.value.x.min);return V.value.centerX-V.value.usableWidth/2*t}}function lr(e){if(e>=0){let t=e/q.value.y.max;return V.value.centerY+(1-V.value.usableHeight/2*t)}{let t=Math.abs(e)/Math.abs(q.value.y.min);return V.value.centerY-(1-V.value.usableHeight/2*t)}}let ur=l(()=>{let e=Y.value.flatMap(e=>e.series.map(t=>({x:t.xValue,y:t.yValue,name:t.name,category:t.categoryName,quadrantSide:t.quadrantSide,sideName:N.value.quadrantLabels[t.quadrantSide].text,color:e.color,shape:e.shape}))),t=M.value.xAxis.name||`x`,n=M.value.yAxis.name||`y`;return{head:[A.value.translations.category,A.value.translations.item,t,n,A.value.translations.side],body:e.map(e=>[e.category,e.name,e.x,e.y,e.sideName||e.quadrantSide]),itsShapes:e.map(e=>({shape:e.shape,color:e.color})),tableData:e}}),dr=l(()=>{let e=ur.value.head,t=ur.value.tableData.map(e=>[{shape:e.shape,color:e.color,name:e.category},e.name,s(N.value.plotLabels.x.formatter,e.x,a({v:e.x,r:N.value.plotLabels.rounding})),s(N.value.plotLabels.y.formatter,e.y,a({v:e.y,r:N.value.plotLabels.rounding})),e.sideName||e.quadrantSide]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name??``:e)),config:{th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint},colNames:e}});function fr(){J.value.length?J.value=[]:X.value.forEach(e=>{J.value.push(e.id)}),yn(`selectLegend`,Dr())}function pr(e){J.value.includes(e)?J.value=J.value.filter(t=>t!==e):J.value.push(e),yn(`selectLegend`,Dr())}let X=l(()=>sr.value.map(e=>({name:e.name,shape:e.shape,color:e.color,id:e.id,opacity:J.value.includes(e.id)?.5:1,segregate:()=>pr(e.id),isSegregated:J.value.includes(e.id)})));function mr(e){return X.value.length?X.value.find(t=>t.name===e)||(qn.value&&console.warn(`VueUiQuadrant - Series name not found "${e}"`),null):(qn.value&&console.warn(`VueUiQuadrant - There are no series to show.`),null)}function hr(e){let t=mr(e);t!==null&&J.value.includes(t.id)&&pr(t.id)}function gr(e){let t=mr(e);t!==null&&(J.value.includes(t.id)||pr(t.id))}let _r=l(()=>({cy:`quadrant-div-legend`,backgroundColor:F.value.legend.backgroundColor,color:F.value.legend.color,fontSize:F.value.legend.fontSize,paddingBottom:12,fontWeight:F.value.legend.bold?`bold`:``}));function vr(e){switch(!0){case e.x>=0&&e.y>=0:return`tr`;case e.x>=0&&e.y<0:return`br`;case e.x<0&&e.y<0:return`bl`;case e.x<0&&e.y>=0:return`tl`;default:return``}}let Z=b(null),yr=b(null),br=b(null);function xr(){Z.value=null,yr.value=null,Nn.value=null,Pn.value=null,bn.value=!1}function Sr(e){if(!L.value||!e)return;let t=`[data-a11y-plot-id="${e}"]`,n=L.value.querySelector(t);if(!n)return;let r=n.getBoundingClientRect();Fn.value={x:r.left+r.width/2,y:r.top+r.height/2}}function Cr(e,t,n,r=`pointer`,i=null){A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:t,seriesIndex:n}),Z.value=t.uid,yr.value={color:e.color,shape:e.shape},In.value=r,Nn.value=i,Pn.value=t.uid,br.value={datapoint:t,seriesIndex:n,series:Y.value,config:A.value};let o=P.value.customFormat;if(te(o)&&pe(()=>o({seriesIndex:n,datapoint:t,series:Y.value,config:A.value})))xn.value=o({seriesIndex:n,datapoint:t,series:Y.value,config:A.value});else{let r=``;t.quadrantSide&&(r+=`<div style="color:${N.value.quadrantLabels[t.quadrantSide].color};font-weight:${N.value.quadrantLabels[t.quadrantSide].bold?`bold`:`400`}">${N.value.quadrantLabels[t.quadrantSide].text}</div>`),r+=`<div>${e.name}</div>`,r+=`<div style="padding-bottom:6px;border-bottom:1px solid ${P.value.borderColor};margin-bottom:3px">${t.name}</div>`,r+=`<div>${M.value.xAxis.name?M.value.xAxis.name:`x`}: <b>${s(N.value.plotLabels.x.formatter,t.xValue,a({v:t.xValue,r:P.value.roundingValue}),{datapoint:t,category:e,categoryIndex:n})}</b></div>`,r+=`<div>${M.value.yAxis.name?M.value.yAxis.name:`y`}: <b>${s(N.value.plotLabels.y.formatter,t.yValue,a({v:t.yValue,r:P.value.roundingValue}),{datapoint:t,category:e,categoryIndex:n})}</b></div>`,xn.value=`<div style="text-align:left;font-size:${P.value.fontSize}px">${r}</div>`}r===`keyboard`&&qe(()=>{Sr(t.uid)}),bn.value=!0}function wr(e,t){A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(Pn.value!==e.uid||In.value!==`keyboard`)&&(bn.value=!1,Z.value=null,yr.value=null)}function Tr(e,t,n){A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:t,seriesIndex:n});let r={category:e.name,shape:e.shape,itemName:t.name,x:t.xValue,y:t.yValue,quadrantSide:t.quadrantSide,sideName:N.value.quadrantLabels[t.quadrantSide].text};yn(`selectPlot`,r)}function Er(e){if(!e)return;let t=Y.value.flatMap(t=>t.series.filter(t=>t.quadrantSide===e).map(e=>({category:e.categoryName,itemName:e.name,x:e.xValue,y:e.yValue}))),n={quadrantSide:e,sideName:N.value.quadrantLabels[e].text,items:[...t]};yn(`selectSide`,n)}let Q=l(()=>({TL:{tl:{x:V.value.left+V.value.usableWidth/4-20,y:0,fill:N.value.quadrantLabels.tl.color},tr:{x:V.value.left+V.value.usableWidth/4,y:0,fill:N.value.quadrantLabels.tr.color},br:{x:V.value.left+V.value.usableWidth/4,y:20,fill:N.value.quadrantLabels.br.color},bl:{x:V.value.left+V.value.usableWidth/4-20,y:20,fill:N.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${V.value.left+V.value.usableWidth/4-20},20 ${V.value.left+V.value.usableWidth/4+20},20`,vertical:`M ${V.value.left+V.value.usableWidth/4},0 ${V.value.left+V.value.usableWidth/4},40`}},TR:{tl:{x:V.value.centerX+V.value.usableWidth/4-20,y:0,fill:N.value.quadrantLabels.tl.color},tr:{x:V.value.centerX+V.value.usableWidth/4,y:0,fill:N.value.quadrantLabels.tr.color},br:{x:V.value.centerX+V.value.usableWidth/4,y:20,fill:N.value.quadrantLabels.br.color},bl:{x:V.value.centerX+V.value.usableWidth/4-20,y:20,fill:N.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${V.value.centerX+V.value.usableWidth/4-20},20 ${V.value.centerX+V.value.usableWidth/4+20},20`,vertical:`M ${V.value.centerX+V.value.usableWidth/4},0 ${V.value.centerX+V.value.usableWidth/4},40`}},BR:{tl:{x:V.value.centerX+V.value.usableWidth/4-20,y:V.value.centerY-48,fill:N.value.quadrantLabels.tl.color},tr:{x:V.value.centerX+V.value.usableWidth/4,y:V.value.centerY-48,fill:N.value.quadrantLabels.tr.color},br:{x:V.value.centerX+V.value.usableWidth/4,y:V.value.centerY-28,fill:N.value.quadrantLabels.br.color},bl:{x:V.value.centerX+V.value.usableWidth/4-20,y:V.value.centerY-28,fill:N.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${V.value.centerX+V.value.usableWidth/4-20},${V.value.centerY-28} ${V.value.centerX+V.value.usableWidth/4+20},${V.value.centerY-28}`,vertical:`M ${V.value.centerX+V.value.usableWidth/4},${V.value.centerY-48} ${V.value.centerX+V.value.usableWidth/4},${V.value.centerY-8}`}},BL:{tl:{x:V.value.left+V.value.usableWidth/4-20,y:V.value.centerY-48,fill:N.value.quadrantLabels.tl.color},tr:{x:V.value.left+V.value.usableWidth/4,y:V.value.centerY-48,fill:N.value.quadrantLabels.tr.color},br:{x:V.value.left+V.value.usableWidth/4,y:V.value.centerY-28,fill:N.value.quadrantLabels.br.color},bl:{x:V.value.left+V.value.usableWidth/4-20,y:V.value.centerY-28,fill:N.value.quadrantLabels.bl.color},crosshairs:{horizontal:`M ${V.value.left+V.value.usableWidth/4-20},${V.value.centerY-28} ${V.value.left+V.value.usableWidth/4+20},${V.value.centerY-28}`,vertical:`M ${V.value.left+V.value.usableWidth/4},${V.value.centerY-48} ${V.value.left+V.value.usableWidth/4},${V.value.centerY-8}`}}}));function Dr(){return Y.value.map(e=>({color:e.color,name:e.name,shape:e.shape,series:e.series.map(e=>({name:e.name,x:e.xValue,y:e.yValue,quadrantSide:e.quadrantSide,sideName:N.value.quadrantLabels[e.quadrantSide].text}))}))}function Or(e=null){qe(()=>{let t=[[F.value.title.text],[F.value.title.subtitle.text],[``]],n=ur.value.head,r=ur.value.body,i=t.concat([n]).concat(r),a=ee(i);e?e(a):fe({csvContent:a,title:F.value.title.text||`vue-ui-quadrant`})})}let kr=b(!1);function Ar(e){kr.value=e,Sn.value+=1}function jr(){z.value.showTable=!z.value.showTable}function Mr(){z.value.plotLabels.show=!z.value.plotLabels.show}function Nr(){z.value.showTooltip=!z.value.showTooltip}let Pr=b(!1);function Fr(){Pr.value=!Pr.value}let Ir=we(k,()=>F.value.title.text),Lr=l(()=>Oe({config:A,style:F,mutableConfig:z,dialog:gn,accordion:dn,isFullscreen:kr,parent:k,maxWidth:800,isCursorPointer:I}));$e(()=>z.value.showTable,e=>De(e,A,jn));function Rr(){z.value.showTable=!1,Mn.value&&Mn.value.setTableIconState(!1)}let zr=l(()=>F.value.backgroundColor),Br=l(()=>F.value.legend),Vr=l(()=>F.value.title),{isCallbackImaging:Hr,isCallbackSvg:Ur,generateSvg:Wr,onGenerateImage:Gr}=Ee({svg:L,title:Vr,legend:Br,legendItems:X,backgroundColor:zr,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:Qn});async function Kr(){yn(`copyAlt`,{config:A.value,dataset:or.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:or.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function qr(){Nn.value=null,Pn.value=null,Ln.value=!0}function Jr(){xr(),Ln.value=!1}function Yr(e){if(!L.value||Pr.value||document.activeElement!==L.value||!$.value.length)return;let t=e.key===`ArrowLeft`||e.key===`ArrowUp`,n=e.key===`ArrowRight`||e.key===`ArrowDown`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){xr();return}if(r){if(Nn.value===null)return;let e=$.value[Nn.value];if(!e)return;Tr(e.category,e.plot,e.categoryIndex);return}let a=Nn.value,o=Z.value?$.value.findIndex(e=>e.plot.uid===Z.value):null,ee=a!==null&&a>=0&&a<$.value.length,te=o!==null&&o>=0&&o<$.value.length;ee?(a+=n?1:-1,a<0&&(a=$.value.length-1),a>=$.value.length&&(a=0)):te?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let ne=$.value[a];ne&&Cr(ne.category,ne.plot,ne.categoryIndex,`keyboard`,a)}let Xr=l(()=>({headers:dr.value?.colNames??[],rows:dr.value?.a11yBody??[]})),$=l(()=>Y.value.flatMap((e,t)=>e.series.map(n=>({category:e,plot:n,categoryIndex:t}))));return Se({getData:Dr,getImage:Ir,generatePdf:Zn,generateCsv:Or,generateImage:Qn,generateSvg:Wr,hideSeries:gr,showSeries:hr,toggleTable:jr,toggleLabels:Mr,toggleTooltip:Nr,toggleAnnotator:Fr,toggleFullscreen:Ar,copyAlt:Kr}),(e,i)=>(y(),f(`div`,{class:g(`vue-data-ui-component vue-ui-quadrant ${kr.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`quadrantChart`,ref:k,id:`vue-ui-quadrant_${D.value}`,style:v(`font-family:${A.value.style.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor};${A.value.responsive?`height: 100%`:``}`),onMouseenter:i[14]||=()=>w(Hn)(!0),onMouseleave:i[15]||=()=>{w(Hn)(!1),Ln.value||xr()}},[p(`div`,{id:`chart-instructions-${D.value}`,class:`sr-only`},[p(`p`,null,C(A.value.a11y.translations.keyboardNavigation),1)],8,nt),Xr.value?.rows?.length?(y(),u(Le,{key:0,uid:D.value,head:Xr.value.headers,body:Xr.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):d(``,!0),j.value.buttons.annotator?(y(),u(w(pn),Ke({key:1},w(n)(j.value.annotator),{svgRef:w(L),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Pr.value,isCursorPointer:I.value,palette:j.value.annotatorPalette,onClose:Fr}),Ue({_:2},[x(w(r),n=>({name:n,fn:T(r=>[S(e.$slots,n,_(h(w(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):d(``,!0),$n.value?(y(),f(`div`,{key:2,ref_key:`noTitle`,ref:En,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):d(``,!0),F.value.title.text?(y(),f(`div`,{key:3,ref_key:`chartTitle`,ref:Cn,style:`width:100%;background:transparent;padding-bottom:12px`},[(y(),u(Te,{key:`table_${Dn.value}`,config:{title:{cy:`quadrant-title`,...F.value.title},subtitle:{cy:`quadrant-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):d(``,!0),p(`div`,{id:`legend-top-${D.value}`},null,8,rt),j.value.show&&vn.value&&(w(Un)||w(Vn))?(y(),u(w(mn),{ref_key:`userOptionsRef`,ref:Mn,key:`user_options_${Sn.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isImaging:w(Xn),isPrinting:w(Yn),uid:D.value,hasTooltip:j.value.buttons.tooltip&&P.value.show,hasPdf:j.value.buttons.pdf,hasImg:j.value.buttons.img,hasSvg:j.value.buttons.svg,hasXls:j.value.buttons.csv,hasTable:j.value.buttons.table,hasLabel:j.value.buttons.labels,hasFullscreen:j.value.buttons.fullscreen,hasAltCopy:j.value.buttons.altCopy,isFullscreen:kr.value,isTooltip:z.value.showTooltip,titles:{...j.value.buttonTitles},chartElement:k.value,position:j.value.position,hasAnnotator:j.value.buttons.annotator,isAnnotation:Pr.value,callbacks:j.value.callbacks,printScale:j.value.print.scale,tableDialog:A.value.table.useDialog,isCursorPointer:I.value,onToggleFullscreen:Ar,onGeneratePdf:w(Zn),onGenerateCsv:Or,onGenerateImage:w(Gr),onGenerateSvg:w(Wr),onToggleTable:jr,onToggleLabels:Mr,onToggleTooltip:Nr,onToggleAnnotator:Fr,onCopyAlt:Kr,style:v({visibility:w(Un)?w(Vn)?`visible`:`hidden`:`visible`})},Ue({_:2},[x(w(ke)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,_(h(w(Ae)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):d(``,!0),p(`div`,it,[(y(),f(`svg`,{ref_key:`svgRef`,ref:L,xmlns:w(he),"aria-describedby":`chart-instructions-${D.value}`,class:g({"vue-data-ui-fullscreen--on":kr.value,"vue-data-ui-fulscreen--off":!kr.value}),viewBox:`${H.value.startX} ${H.value.startY} ${H.value.width} ${H.value.height}`,style:v(`max-width:100%;overflow:hidden;background:transparent;color:${F.value.color}`),id:`svg_${D.value}`,tabindex:`0`,onFocus:qr,onBlur:Jr,onKeydown:Yr},[Ge(w(hn)),S(e.$slots,`svg-underlayer`,{svg:{...V.value,isPrintingImg:w(Yn)||w(Xn)||w(Hr),isPrintingSvg:w(Ur)}},void 0,!0),e.$slots[`chart-background`]?(y(),f(`foreignObject`,{key:0,x:H.value.startX,y:H.value.startY,width:H.value.width,height:H.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,ot)):d(``,!0),p(`defs`,null,[(y(!0),f(c,null,x(Y.value,(e,t)=>(y(),u(Fe,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`quadrant_gradient_${D.value}_${t}`,key:`quadrant_gradient_${D.value}_${t}`,stops:[[`0%`,w(ie)(w(se)(e.color,.05),F.value.layout.areas.opacity),1],[`100%`,w(ie)(e.color,F.value.layout.areas.opacity),1]]},null,8,[`id`,`stops`]))),128))]),M.value.graduations.show?(y(),f(`g`,st,[(y(!0),f(c,null,x(ir.value,e=>(y(),f(`rect`,{fill:M.value.graduations.fill?w(ie)(M.value.graduations.color,e.opacity):`none`,x:e.x,y:e.y,height:e.height<=0?.001:e.height,width:e.width<=0?.001:e.width,"stroke-width":M.value.graduations.strokeWidth,stroke:M.value.graduations.stroke,rx:M.value.graduations.roundingForce},null,8,ct))),256))])):d(``,!0),p(`line`,{x1:V.value.left,y1:V.value.centerY,x2:V.value.right,y2:V.value.centerY,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth},null,8,lt),p(`line`,{x1:V.value.centerX,y1:V.value.top,x2:V.value.centerX,y2:V.value.bottom,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth},null,8,ut),M.value.showArrows?(y(),f(`g`,dt,[p(`polygon`,{points:`${V.value.right-8},${V.value.centerY-6} ${V.value.right},${V.value.centerY} ${V.value.right-8},${V.value.centerY+6}`,fill:M.value.stroke,stroke:`none`},null,8,ft),p(`polygon`,{points:`${V.value.left+8},${V.value.centerY-6} ${V.value.left},${V.value.centerY} ${V.value.left+8},${V.value.centerY+6}`,fill:M.value.stroke,stroke:`none`},null,8,pt),p(`polygon`,{points:`${V.value.centerX-6},${V.value.top+8} ${V.value.centerX},${V.value.top} ${V.value.centerX+6},${V.value.top+8}`,fill:M.value.stroke,stroke:`none`},null,8,mt),p(`polygon`,{points:`${V.value.centerX-6},${V.value.bottom-8} ${V.value.centerX},${V.value.bottom} ${V.value.centerX+6},${V.value.bottom-8}`,fill:M.value.stroke,stroke:`none`},null,8,ht)])):d(``,!0),N.value.quadrantLabels.show&&!O.value?(y(),f(`g`,gt,[N.value.quadrantLabels.tl.text?(y(),f(`text`,{key:0,x:0,y:V.value.top-V.value.padding/2,"text-anchor":`start`,fill:N.value.quadrantLabels.tl.color,"font-size":N.value.quadrantLabels.tl.fontSize,style:v(`font-weight:${N.value.quadrantLabels.tl.bold?`bold`:``}`),onClick:i[0]||=e=>Er(`tl`)},C(N.value.quadrantLabels.tl.text),13,_t)):d(``,!0),N.value.quadrantLabels.tr.text?(y(),f(`text`,{key:1,x:V.value.width,y:V.value.top-V.value.padding/2,"text-anchor":`end`,fill:N.value.quadrantLabels.tr.color,"font-size":N.value.quadrantLabels.tr.fontSize,style:v(`font-weight:${N.value.quadrantLabels.tr.bold?`bold`:``}`),onClick:i[1]||=e=>Er(`tr`)},C(N.value.quadrantLabels.tr.text),13,vt)):d(``,!0),N.value.quadrantLabels.br.text?(y(),f(`text`,{key:2,x:V.value.width,y:V.value.bottom+V.value.padding*.7,"text-anchor":`end`,fill:N.value.quadrantLabels.br.color,"font-size":N.value.quadrantLabels.br.fontSize,style:v(`font-weight:${N.value.quadrantLabels.br.bold?`bold`:``}`),onClick:i[2]||=e=>Er(`br`)},C(N.value.quadrantLabels.br.text),13,yt)):d(``,!0),N.value.quadrantLabels.bl.text?(y(),f(`text`,{key:3,x:0,y:V.value.bottom+V.value.padding*.7,"text-anchor":`start`,fill:N.value.quadrantLabels.bl.color,"font-size":N.value.quadrantLabels.bl.fontSize,style:v(`font-weight:${N.value.quadrantLabels.bl.bold?`bold`:``}`),onClick:i[3]||=e=>Er(`bl`)},C(N.value.quadrantLabels.bl.text),13,bt)):d(``,!0)])):d(``,!0),N.value.axisLabels.show?(y(),f(`g`,xt,[M.value.yAxis.show?(y(),f(`text`,{key:0,x:V.value.centerX,y:V.value.top-V.value.padding/6,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,fill:N.value.axisLabels.color.positive},C(w(s)(N.value.plotLabels.y.formatter,q.value.y.max,w(a)({v:q.value.y.max,r:N.value.plotLabels.rounding}))),9,St)):d(``,!0),p(`text`,{x:V.value.centerX,y:V.value.top-V.value.padding/2,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,fill:N.value.axisLabels.color.positive},C(M.value.yAxis.name),9,Ct),M.value.yAxis.show?(y(),f(`text`,{key:1,x:V.value.centerX,y:V.value.bottom+V.value.padding*.35,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,fill:N.value.axisLabels.color.negative},C(w(s)(N.value.plotLabels.y.formatter,q.value.y.min,w(a)({v:q.value.y.min,r:N.value.plotLabels.rounding}))),9,wt)):d(``,!0),M.value.xAxis.show?(y(),f(`text`,{key:2,id:`xLabelMin_${D.value}`,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,transform:`translate(${V.value.padding-N.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(-90)`,fill:N.value.axisLabels.color.negative},C(w(s)(N.value.plotLabels.x.formatter,q.value.x.min,w(a)({v:q.value.x.min,r:N.value.plotLabels.rounding}))),9,Tt)):d(``,!0),M.value.xAxis.show?(y(),f(`text`,{key:3,id:`xLabelMax_${D.value}`,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,transform:`translate(${V.value.width-V.value.padding+N.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(90)`,fill:N.value.axisLabels.color.positive},C(w(s)(N.value.plotLabels.x.formatter,q.value.x.max,w(a)({v:q.value.x.max,r:N.value.plotLabels.rounding}))),9,Et)):d(``,!0),p(`text`,{id:`xLabelMaxName_${D.value}`,"text-anchor":`middle`,"font-size":N.value.axisLabels.fontSize,transform:`translate(${V.value.width-N.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(90)`,fill:N.value.axisLabels.color.positive},C(M.value.xAxis.name),9,Dt)])):d(``,!0),F.value.layout.areas.show?(y(),f(`g`,Ot,[(y(!0),f(c,null,x(Y.value,(e,t)=>(y(),f(`g`,null,[e.series.length>2?(y(),f(`polygon`,{key:0,"data-cy-quadrant-area":``,fill:F.value.layout.areas.useGradient?`url(#quadrant_gradient_${D.value}_${t})`:w(ie)(e.color,F.value.layout.areas.opacity),points:w(o)(e)},null,8,kt)):d(``,!0)]))),256))])):d(``,!0),p(`g`,null,[p(`rect`,{onClick:i[4]||=e=>K(`TL`),x:V.value.left,y:V.value.top,width:V.value.usableWidth/2<=0?.001:V.value.usableWidth/2,height:V.value.usableHeight/2<=0?.001:V.value.usableHeight/2,fill:`transparent`,class:g({"vue-data-ui-zoom-plus":!O.value&&G.value,"vue-data-ui-zoom-minus":O.value&&G.value})},null,10,At),p(`rect`,{onClick:i[5]||=e=>K(`TR`),x:V.value.centerX,y:V.value.top,width:V.value.usableWidth/2<=0?.001:V.value.usableWidth/2,height:V.value.usableHeight/2<=0?.001:V.value.usableHeight/2,fill:`transparent`,class:g({"vue-data-ui-zoom-plus":!O.value&&G.value,"vue-data-ui-zoom-minus":O.value&&G.value})},null,10,jt),p(`rect`,{onClick:i[6]||=e=>K(`BR`),x:V.value.centerX,y:V.value.centerY,width:V.value.usableWidth/2<=0?.001:V.value.usableWidth/2,height:V.value.usableHeight/2<=0?.001:V.value.usableHeight/2,fill:`transparent`,class:g({"vue-data-ui-zoom-plus":!O.value&&G.value,"vue-data-ui-zoom-minus":O.value&&G.value})},null,10,Mt),p(`rect`,{onClick:i[7]||=e=>K(`BL`),x:V.value.left,y:V.value.centerY,width:V.value.usableWidth/2<=0?.001:V.value.usableWidth/2,height:V.value.usableHeight/2<=0?.001:V.value.usableHeight/2,fill:`transparent`,class:g({"vue-data-ui-zoom-plus":!O.value&&G.value,"vue-data-ui-zoom-minus":O.value&&G.value})},null,10,Nt)]),N.value.plotLabels.showAsTag?(y(),f(c,{key:7},[z.value.plotLabels.show?(y(),f(`g`,Bt,[(y(!0),f(c,null,x(Y.value,(e,t)=>(y(),f(c,null,[(y(!0),f(c,null,x(e.series,n=>(y(),f(`foreignObject`,{style:{overflow:`visible`},height:`10`,width:`100`,x:n.x-50,y:n.y-N.value.plotLabels.fontSize,onMouseover:r=>Cr(e,n,t),onMouseleave:e=>wr(n,t),onClick:r=>Tr(e,n,t)},[p(`div`,{style:v(`color:${w(me)(e.color)};margin: 0 auto; font-size:${N.value.plotLabels.fontSize}px; text-align:center;background:${e.color}; padding: 2px 4px; border-radius: 12px; height: fit-content;`)},C(n.name),5)],40,Vt))),256))],64))),256))])):d(``,!0)],64)):(y(),f(c,{key:6},[(y(!0),f(c,null,x(Y.value,(t,n)=>(y(),f(`g`,null,[e.$slots.datapoint&&!w(zn)?(y(!0),f(c,{key:0},x(t.series,r=>(y(),f(`g`,{key:r.uid},[(y(),f(`foreignObject`,{x:r.x-1,y:r.y-1,width:`2`,height:`2`,style:{overflow:`visible`,"pointer-events":`none`},onMouseenter:e=>Cr(t,r,n),onMouseleave:e=>wr(r,n),onClick:e=>Tr(t,r,n)},[S(e.$slots,`datapoint`,Ke({ref_for:!0},{datapoint:{...r,onEnter:()=>Cr(t,r,n),onLeave:()=>wr(r,n),onClick:()=>Tr(t,r,n),isSelected:Z.value&&r.uid===Z.value}}),void 0,!0)],40,Pt)),p(`circle`,{"data-a11y-plot-id":r.uid,cx:r.x,cy:r.y,r:Math.max(F.value.layout.plots.radius/(O.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Ft)]))),128)):e.$slots.datapointSvg&&!w(zn)?(y(!0),f(c,{key:1},x(t.series,r=>(y(),f(`g`,{key:r.uid},[S(e.$slots,`datapointSvg`,Ke({ref_for:!0},{datapoint:{...r,onEnter:()=>Cr(t,r,n),onLeave:()=>wr(r,n),onClick:()=>Tr(t,r,n),isSelected:Z.value&&r.uid===Z.value}}),void 0,!0)]))),128)):(y(!0),f(c,{key:2},x(t.series,(e,r)=>(y(),f(`g`,{key:e.uid},[Ge(Me,{color:t.color,isSelected:Z.value&&e.uid===Z.value,plot:e,radius:F.value.layout.plots.radius/(O.value?1.5:1),shape:t.shape,stroke:F.value.layout.plots.outline?F.value.layout.plots.outlineColor:`none`,strokeWidth:F.value.layout.plots.outlineWidth,onMouseenter:r=>Cr(t,e,n,`pointer`),onMouseleave:t=>wr(e,n),onClick:r=>Tr(t,e,n)},null,8,[`color`,`isSelected`,`plot`,`radius`,`shape`,`stroke`,`strokeWidth`,`onMouseenter`,`onMouseleave`,`onClick`]),p(`circle`,{"data-dom-to-png-ignore":``,"data-a11y-plot-id":e.uid,cx:e.x,cy:e.y,r:Math.max(F.value.layout.plots.radius/(O.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,It)]))),128))]))),256)),z.value.plotLabels.show?(y(),f(`g`,Lt,[(y(!0),f(c,null,x(Y.value,e=>(y(),f(`g`,null,[(y(!0),f(c,null,x(e.series,e=>(y(),f(`g`,null,[String(e.name).includes(`
|
|
2
|
-
`)?(y(),f(`text`,{key:1,x:e.x,y:e.y+N.value.plotLabels.offsetY+F.value.layout.plots.radius,"text-anchor":`middle`,"font-size":N.value.plotLabels.fontSize/(O.value?1.5:1),fill:N.value.plotLabels.color,innerHTML:w(re)({content:String(e.name),fontSize:F.value.layout.labels.plotLabels.fontSize/(O.value?1.5:1),fill:F.value.layout.labels.plotLabels.color,x:e.x,y:e.y+F.value.layout.labels.plotLabels.offsetY+F.value.layout.plots.radius})},null,8,zt)):(y(),f(`text`,{key:0,x:e.x,y:e.y+N.value.plotLabels.offsetY+F.value.layout.plots.radius,"text-anchor":`middle`,"font-size":N.value.plotLabels.fontSize/(O.value?1.5:1),fill:N.value.plotLabels.color},C(e.name),9,Rt))]))),256))]))),256))])):d(``,!0)],64)),O.value?(y(),f(`g`,Ht,[U.value===`TL`?(y(),f(`polygon`,{key:0,points:`${V.value.left-1},${V.value.centerY} ${V.value.centerX},${V.value.centerY} ${V.value.centerX},${V.value.top-1} ${V.value.right},${V.value.top-1} ${V.value.right},${V.value.bottom} ${V.value.left-1},${V.value.bottom} ${V.value.left-1},${V.value.centerY}`,fill:F.value.backgroundColor,style:{opacity:`1`}},null,8,Ut)):d(``,!0),U.value===`TR`?(y(),f(`polygon`,{key:1,points:`${V.value.left},${V.value.top-1} ${V.value.centerX},${V.value.top-1} ${V.value.centerX},${V.value.centerY} ${V.value.right+1},${V.value.centerY} ${V.value.right+1},${V.value.bottom} ${V.value.left},${V.value.bottom} ${V.value.left},${V.value.top-1}`,fill:F.value.backgroundColor,style:{opacity:`1`}},null,8,Wt)):d(``,!0),U.value===`BR`?(y(),f(`polygon`,{key:2,points:`${V.value.left},${V.value.top} ${V.value.right+1},${V.value.top} ${V.value.right+1},${V.value.centerY} ${V.value.centerX},${V.value.centerY} ${V.value.centerX},${V.value.bottom+1} ${V.value.left},${V.value.bottom+1} ${V.value.left},${V.value.top}`,fill:F.value.backgroundColor,style:{opacity:`1`}},null,8,Gt)):d(``,!0),U.value===`BL`?(y(),f(`polygon`,{key:3,points:`${V.value.left-1},${V.value.top} ${V.value.right},${V.value.top} ${V.value.right},${V.value.bottom+1} ${V.value.centerX},${V.value.bottom+1} ${V.value.centerX},${V.value.centerY} ${V.value.left-1},${V.value.centerY} ${V.value.left-1},${V.value.top}`,fill:F.value.backgroundColor,style:{opacity:`1`}},null,8,Kt)):d(``,!0)])):d(``,!0),U.value&&!nr.value?(y(),f(`g`,qt,[p(`text`,{x:W.value.x,y:W.value.y-W.value.fontSize/1.5,"font-size":W.value.fontSize/1.5,fill:W.value.fill,"text-anchor":`middle`,"font-weight":W.value.bold?`bold`:`normal`},C(W.value.text),9,Jt)])):d(``,!0),O.value&&U.value?(y(),f(`g`,Yt,[p(`rect`,{x:Q.value[U.value].tl.x,y:Q.value[U.value].tl.y,height:`20`,width:`20`,fill:Q.value[U.value].tl.fill,style:v(`cursor: ${I.value?`pointer`:`default`}; opacity: ${U.value===`TL`?1:.2}`),onClick:i[8]||=e=>K(`TL`),class:g({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":U.value!==`TL`})},null,14,Xt),p(`rect`,{x:Q.value[U.value].tr.x,y:Q.value[U.value].tr.y,height:`20`,width:`20`,fill:Q.value[U.value].tr.fill,style:v(`cursor: ${I.value?`pointer`:`default`}; opacity: ${U.value===`TR`?1:.2}`),onClick:i[9]||=e=>K(`TR`),class:g({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":U.value!==`TR`})},null,14,Zt),p(`rect`,{x:Q.value[U.value].br.x,y:Q.value[U.value].br.y,height:`20`,width:`20`,fill:Q.value[U.value].br.fill,style:v(`cursor: ${I.value?`pointer`:`default`}; opacity: ${U.value===`BR`?1:.2}`),onClick:i[10]||=e=>K(`BR`),class:g({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":U.value!==`BR`})},null,14,Qt),p(`rect`,{x:Q.value[U.value].bl.x,y:Q.value[U.value].bl.y,height:`20`,width:`20`,fill:Q.value[U.value].bl.fill,style:v(`cursor: ${I.value?`pointer`:`default`}; opacity: ${U.value===`BL`?1:.2}`),onClick:i[11]||=e=>K(`BL`),class:g({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":U.value!==`BL`})},null,14,$t),p(`path`,{class:`vue-ui-quadrant-minimap-crosshairs`,stroke:F.value.backgroundColor,"stroke-width":1,d:Q.value[U.value].crosshairs.horizontal},null,8,en),p(`path`,{class:`vue-ui-quadrant-minimap-crosshairs`,stroke:F.value.backgroundColor,"stroke-width":1,d:Q.value[U.value].crosshairs.vertical},null,8,tn)])):d(``,!0),S(e.$slots,`svg`,{svg:{...V.value,isPrintingImg:w(Yn)||w(Xn)||w(Hr),isPrintingSvg:w(Ur)}},void 0,!0)],46,at)),e.$slots.hint?(y(),f(`div`,nn,[S(e.$slots,`hint`,_(h({hint:A.value.a11y.translations.keyboardNavigation,isVisible:Ln.value})),void 0,!0)])):d(``,!0)]),e.$slots.watermark?(y(),f(`div`,rn,[S(e.$slots,`watermark`,_(h({isPrinting:w(Yn)||w(Xn)||w(Hr)||w(Ur)})),void 0,!0)])):d(``,!0),p(`div`,{id:`legend-bottom-${D.value}`},null,8,an),An.value&&(F.value.legend.show||e.$slots.legend)?(y(),u(He,{key:6,to:F.value.legend.position===`top`?`#legend-top-${D.value}`:`#legend-bottom-${D.value}`},[p(`div`,{ref_key:`chartLegend`,ref:wn},[S(e.$slots,`legend`,{legend:X.value},()=>[F.value.legend.show?(y(),u(Be,{key:`legend_${kn.value}`,legendSet:X.value,config:_r.value,isCursorPointer:I.value,onClickMarker:i[12]||=({legend:e})=>pr(e.id)},{item:T(({legend:e})=>[w(zn)?d(``,!0):(y(),f(`div`,{key:0,onClick:t=>pr(e.id),style:v(`opacity:${J.value.includes(e.id)?.5:1}`)},C(e.name),13,on))]),legendToggle:T(()=>[X.value.length>2&&F.value.legend.selectAllToggle.show&&!w(zn)?(y(),u(Ie,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:J.value.length>0,isCursorPointer:I.value,onToggle:fr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):d(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):d(``,!0)],!0)],512)],8,[`to`])):d(``,!0),e.$slots.source?(y(),f(`div`,{key:7,ref_key:`source`,ref:Tn,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):d(``,!0),Ge(w(ln),{teleportTo:P.value.teleportTo,show:z.value.showTooltip&&bn.value,backgroundColor:P.value.backgroundColor,color:P.value.color,borderRadius:P.value.borderRadius,borderColor:P.value.borderColor,borderWidth:P.value.borderWidth,fontSize:P.value.fontSize,backgroundOpacity:P.value.backgroundOpacity,position:P.value.position,offsetX:P.value.offsetX,offsetY:P.value.offsetY,parent:k.value,content:xn.value,isFullscreen:kr.value,isCustom:P.value.customFormat&&typeof P.value.customFormat==`function`,smooth:P.value.smooth,backdropFilter:P.value.backdropFilter,smoothForce:P.value.smoothForce,smoothSnapThreshold:P.value.smoothSnapThreshold,isA11yMode:In.value===`keyboard`,a11yPosition:Fn.value},{"tooltip-before":T(()=>[S(e.$slots,`tooltip-before`,_(h({...br.value})),void 0,!0)]),tooltip:T(()=>[S(e.$slots,`tooltip`,_(h({...br.value})),void 0,!0)]),"tooltip-after":T(()=>[S(e.$slots,`tooltip-after`,_(h({...br.value})),void 0,!0)]),default:T(()=>[P.value.showShape?(y(),f(`svg`,sn,[Ge(Me,{plot:{x:10,y:10},shape:yr.value.shape,color:yr.value.color,radius:8,stroke:F.value.layout.plots.outline?F.value.layout.plots.outlineColor:`none`,"stroke-width":F.value.layout.plots.outlineWidth},null,8,[`shape`,`color`,`stroke`,`stroke-width`])])):d(``,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),vn.value&&j.value.buttons.table?(y(),u(Xe(Lr.value.component),Ke({key:8},Lr.value.props,{ref_key:`tableUnit`,ref:jn,onClose:Rr}),Ue({content:T(()=>[(y(),u(w(fn),{key:`table_${On.value}`,colNames:dr.value.colNames,head:dr.value.head,body:dr.value.body,config:dr.value.config,title:A.value.table.useDialog?``:Lr.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:I.value,onClose:Rr},{th:T(({th:e})=>[We(C(e),1)]),td:T(({td:e})=>[p(`div`,{innerHTML:e.name||e},null,8,cn)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[A.value.table.useDialog?{name:`title`,fn:T(()=>[We(C(Lr.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:T(()=>[p(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[13]||=e=>Or(j.value.callbacks.csv),style:v({cursor:I.value?`pointer`:`default`})},[Ge(w(un),{name:`fileCsv`,stroke:Lr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):d(``,!0),S(e.$slots,`skeleton`,{},()=>[w(zn)?(y(),u(ye,{key:0})):d(``,!0)],!0)],46,tt))}},[[`__scopeId`,`data-v-1c2a6ea2`]]);export{et as n,ln as t};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,Dt as o,Ht as s,It as c,J as l,Kt as ee,P as u,S as te,X as ne,_ as re,at as ie,b as d,et as ae,f as oe,h as se,i as f,in as ce,nn as le,p as ue,pt as de,t as fe,w as pe,zt as me}from"./lib-rPeBMZrn.js";import{n as he,t as ge}from"./BaseScanner-8NdoBs7B.js";import{n as _e,t as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as be}from"./useNestedProp-DnGoh-XS.js";import{t as xe}from"./useThemeCheck-BKNRbGeC.js";import{t as Se}from"./img-D4RQwASc.js";import{t as Ce}from"./useChartExport-BZts4KFb.js";import{n as we,t as Te}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ee}from"./useTimeLabels-Das5O74F.js";import{t as De}from"./usePrinter-DVf3YcG5.js";import{t as Oe}from"./useTransitions-ChGGrtrv.js";import{t as ke}from"./useStableElementSize-CegFbRlF.js";import{t as Ae}from"./useSvgLabelLayout-42Kats14.js";import{t as je}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./SlicerPreview-ChKbdZSU.js";import{t as Pe}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Fe}from"./A11yDataTable-DWNlWXzs.js";import{t as Ie}from"./useChartAccessibility-DOMuYJfm.js";import{t as Le}from"./annotationViewport-X8fvs7pz.js";import{t as Re}from"./vue_ui_quick_chart-BRfcRW6Z.js";import{Fragment as p,Teleport as ze,computed as m,createBlock as Be,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createSlots as Ve,createVNode as He,defineAsyncComponent as Ue,guardReactiveProps as We,mergeProps as Ge,nextTick as Ke,normalizeClass as v,normalizeProps as qe,normalizeStyle as y,onBeforeUnmount as Je,onMounted as Ye,openBlock as b,ref as x,renderList as S,renderSlot as C,shallowRef as Xe,toDisplayString as w,toRefs as Ze,unref as T,watch as Qe,watchEffect as $e,withCtx as et}from"vue";var E={LINE:`LINE`,BAR:`BAR`,DONUT:`DONUT`},tt=[`SERIE`,`SERIES`,`DATA`,`VALUE`,`VALUES`,`NUM`];function nt({dataset:e,barLineSwitch:t=6,debug:n=!0}){let r=null,i=null,a=0;if((typeof e==`number`||typeof e==`string`)&&n&&console.warn(`The provided dataset (${e}) is not sufficient to build a chart`),it(e)&&(at(e)&&(r=e.length<t?E.BAR:E.LINE,i=e,a=e.length),ot(e))){if(!ct(e))return n&&console.warn(`The objects in the dataset array have a different data structure. Either keys or value types are different.`),!1;let o=Object.keys(e[0]),s=Object.values(e[0]);if(!o.some(e=>lt(e)))return n&&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;ut(s,e=>typeof e==`number`)&&(r=E.DONUT,i=e),ut(s,e=>Array.isArray(e)&&at(e))&&(r=dt(e)>t?E.LINE:E.BAR,a=dt(e),i=e.map(e=>({...e,data:ft(e,e=>at(e))}))),e=e.map(e=>D(e)),i=i.map(e=>D(e))}return{dataset:e,type:r,usableDataset:i,maxSeriesLength:a}}function rt(e){return!e||it(e)&&!e.length}function it(e){return Array.isArray(e)}function at(e){if(!it(e)||rt(e))return!1;let t=e.map(e=>Number(e));return![...new Set(t.flatMap(e=>typeof e==`number`&&!isNaN(e)))].includes(!1)}function ot(e){return!it(e)||rt(e)||[...new Set(e.flatMap(e=>typeof e==`object`&&!Array.isArray(e)))].includes(!1)?!1:!e.map(e=>Object.keys(e).length>0).includes(!1)}function st(e,t){let n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1){let a=n[i],o=r[i];if(a!==o||typeof e[a]!=typeof t[o])return!1}return!0}function ct(e){if(e.length<=1)return!0;for(let t=0;t<e.length;t+=1)for(let n=t+1;n<e.length;n+=1)if(!st(e[t],e[n]))return!1;return!0}function lt(e){return tt.includes(e.toUpperCase())}function ut(e,t){let n=[];for(let r=0;r<e.length;r+=1)n.push(t(e[r]));return n.includes(!0)}function dt(e){return Math.max(...[...e].flatMap(e=>Object.values(e).filter(e=>at(e)).map(e=>e.length)))}function ft(e,t){return Object.values(e).filter(e=>t(e))[0]}function D(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toUpperCase()]=e[n]);return t}var O=/* @__PURE__ */ e({default:()=>Bn}),pt=[`id`],mt=[`id`],ht=[`id`],gt={style:{position:`relative`}},_t=[`xmlns`,`aria-describedby`,`viewBox`],vt=[`x`,`y`,`width`,`height`],yt=[`x`,`y`,`width`,`height`],bt=[`width`,`height`],xt=[`id`],St=[`id`],Ct=[`id`],wt=[`flood-color`],Tt={key:0,class:`donut-label-connectors`},Et=[`d`,`stroke`,`stroke-width`,`filter`],Dt=[`cx`,`cy`,`r`,`fill`,`filter`],Ot={class:`donut`},kt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],At=[`d`,`onMouseenter`,`onMouseout`,`onClick`],jt={key:1,class:`donut-labels`},Mt=[`cx`,`cy`,`fill`,`stroke`,`filter`],Nt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`filter`],Pt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`filter`],Ft={key:2,class:`donut-hollow`},It=[`x`,`y`,`font-size`,`fill`],Lt=[`x`,`y`,`font-size`,`fill`],Rt={key:0,class:`line-grid`},zt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Bt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Vt={key:1,class:`line-axis`},Ht=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Wt=[`d`,`stroke`,`stroke-width`],Gt=[`transform`,`font-size`,`fill`],Kt={key:3,class:`periodLabels`},qt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Jt={key:0},Yt=[`font-size`,`text-anchor`,`fill`,`transform`],Xt=[`font-size`,`text-anchor`,`fill`,`transform`,`innerHTML`],Zt={class:`plots`},Qt=[`d`,`stroke`,`stroke-width`],$t=[`d`,`stroke`,`stroke-width`],en=[`d`,`stroke`,`stroke-width`],tn=[`d`,`stroke`,`stroke-width`],nn=[`cx`,`cy`,`fill`,`stroke`],rn={key:4,class:`dataLabels`},an=[`font-size`,`fill`,`transform`],on={key:5,class:`tooltip-traps`},sn=[`x`,`y`,`height`,`width`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],cn={key:0,class:`line-grid`},ln=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],un=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dn={key:1,class:`line-axis`},fn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pn=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],mn=[`d`,`stroke`,`stroke-width`],hn=[`transform`,`font-size`,`fill`],gn={key:3,class:`periodLabels`},_n=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],vn={key:0},yn=[`font-size`,`text-anchor`,`fill`,`transform`],bn=[`font-size`,`text-anchor`,`fill`,`transform`,`innerHTML`],xn={class:`plots`},Sn=[`x`,`width`,`height`,`y`,`fill`,`stroke`,`stroke-width`],Cn={key:4,class:`dataLabels`},wn=[`transform`,`font-size`,`fill`],Tn={key:5,class:`tooltip-traps`},En=[`x`,`y`,`height`,`width`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Dn={key:6,class:`axis-labels`},On=[`font-size`,`fill`,`x`,`y`],kn=[`font-size`,`fill`,`x`,`y`],An=[`font-size`,`fill`,`transform`],jn=[`font-size`,`fill`,`transform`],Mn=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],Nn={key:1,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Pn={key:5,class:`vue-data-ui-watermark`},Fn=[`id`],In=[`onClick`,`onKeydown`],Ln=[`onClick`,`onKeydown`],Rn=[`onClick`,`onKeydown`],zn={key:1,class:`vue-ui-quick-chart-not-processable`},Bn=/*#__PURE__*/ ye({__name:`vue-ui-quick-chart`,props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object,String,Number],default(){return null}},zoomState:{type:Object,default:null}},emits:[`selectDatapoint`,`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:ye,emit:tt}){let rt=Ue(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),it=Ue(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),st=Ue(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ct=Ue(()=>import(`./Tooltip-C1q0Qoh7.js`)),lt=Ue(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),{vue_ui_quick_chart:ut}=i(),{isThemeValid:dt,warnInvalidTheme:ft}=xe(),D=e,O=x(null),Bn=x(null),Vn=x(null),Hn=x(null),k=x(ne()),A=x(!1),Un=x(null),Wn=x(``),j=x(null),Gn=x(null),Kn=x(null),M=x([]),qn=x(0),Jn=x(0),Yn=x(!1),Xn=x(null),Zn=x(null),Qn=x(null),$n=x(null),er=x(null),tr=x(null),nr=Xe(null),rr=x(!1),ir=x(0),ar=x(0),or=x(!1);function sr(){nr.value=O.value?.parentNode??null}function cr(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function lr(){let e=++ar.value;rr.value=!1,await Ke(),await cr(),await cr(),e===ar.value&&(ir.value+=1,rr.value=!0)}function ur(){or.value||(or.value=!0,Ke(()=>{or.value=!1,sr(),lr()}))}let dr=ke({elementRef:nr,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{lr()}});x(`#FFFFFF`);let N=x(Tr());_e({config:()=>N.value,dataset:()=>D.dataset,component:`VueUiQuickChart`,rules:[ve.emptyArray,{test:()=>!0,message:[`👀 This is a swiss-knife component. If you need more control, consider using dedicated components:`,``,`▶️ VueUiXy for time series line and/or bars`,``,`▶️ VueUiDonut, VueUiWaffle, VueUiRings for proportions`]}]});let{transitionEnabled:P}=Oe({config:()=>N.value.transitions,dataset:()=>D.dataset}),fr=m(()=>N.value.debug),pr=m(()=>N.value.useCursorPointer),F=x(null),mr=x({x:0,y:0}),I=x(`pointer`),hr=x(!1),gr=m(()=>ce({dafaultConfig:{backgroundColor:`#99999930`,customPalette:[`#BABABA`],showDataLabels:!1,paletteStartIndex:0,showUserOptions:!1,showTooltip:!1,xAxisLabel:``,yAxisLabel:``,xyAxisStroke:`#999999`,xyGridStroke:`#99999950`,xyPeriods:[],xyShowScale:!1,xyPaddingLeft:6,xyPaddingBottom:12,zoomXy:!1,zoomStartIndex:null,zoomEndIndex:null},userConfig:N.value.skeletonConfig??{}})),{loading:_r,FINAL_DATASET:vr,manualLoading:yr}=he({...Ze(D),FINAL_CONFIG:N,prepareConfig:Tr,skeletonDataset:D.config?.skeletonDataset??[1,2,3,5,8,13,21,34,55,89],skeletonConfig:ce({defaultConfig:N.value,userConfig:gr.value})}),{svgRef:L}=Ie({config:{text:N.value.title}}),br=m(()=>N.value.showUserOptionsOnChartHover),xr=m(()=>N.value.keepUserOptionsStateOnChartLeave),Sr=x(!N.value.showUserOptionsOnChartHover),Cr=x(!1);function wr(e=!1){Cr.value=e,br.value&&(Sr.value=e)}function Tr(){let e=be({userConfig:D.config,defaultConfig:ut}),t={},n=e.theme;if(n){if(!dt.value(e))ft(e),t=e;else{let r=be({userConfig:Re[n]||D.config,defaultConfig:e});t={...be({userConfig:D.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:le[n]||s}}}else t=e;return t}function Er(e){let t=ae(e);return t?.tooltipPosition&&delete t.tooltipPosition,JSON.stringify(t)}let Dr=Er(D.config);Qe(()=>D.config,(e,t)=>{let n=Er(e),r=n!==Dr;Dr=n;let i=Tr();r?(_r.value||(N.value=i),N.value.responsive||(V.value.width=N.value.width,V.value.height=N.value.height),Sr.value=!N.value.showUserOptionsOnChartHover,Hr(),Rr.value.showTooltip=N.value.showTooltip):(N.value.tooltipPosition=i.tooltipPosition,Rr.value.showTooltip=N.value.showTooltip)},{deep:!0}),Qe(()=>D.dataset,e=>{Array.isArray(e)&&e.length>0&&(yr.value=!1)},{immediate:!0});let Or=m(()=>pe(N.value.customPalette)),R=tt,kr=m(()=>{let e=nt({debug:fr.value,dataset:ee(vr.value,[`serie`,`series`,`data`,`value`,`values`,`num`]),barLineSwitch:N.value.chartIsBarUnderDatasetLength});return!e&&fr.value&&console.error(`VueUiQuickChart : Dataset is not processable`),e}),z=x(kr.value),Ar=m(()=>!!z.value),B=m(()=>z.value?z.value.type:null),jr=m(()=>[E.BAR,E.LINE].includes(B.value)),Mr=m(()=>jr.value&&N.value.zoomXy&&Number(z.value?.maxSeriesLength??0)>1);Qe(()=>B.value,e=>{e||ie({componentName:`VueUiQuickChart`,type:`dataset`,debug:fr.value})},{immediate:!0});let{isPrinting:Nr,isImaging:Pr,generatePdf:Fr,generateImage:Ir}=De({elementId:`${B.value}_${k.value}`,fileName:N.value.title||B.value,options:N.value.userOptionsPrint}),Lr=m(()=>N.value.showUserOptions&&!N.value.title),V=x({width:N.value.width,height:N.value.height}),Rr=x({showTooltip:N.value.showTooltip});Qe(N,()=>{Rr.value={showTooltip:N.value.showTooltip}},{immediate:!0});let H=Xe(null),zr=Xe(null),Br=x(!1),Vr=0;Ye(()=>{Yn.value=!0,sr(),dr.start(),Hr(),lr()});function Hr(){me(D.dataset)||(yr.value=N.value.loading),N.value.responsive&&(H.value&&(zr.value&&H.value.unobserve(zr.value),H.value.disconnect()),H.value=new ResizeObserver(()=>{let{width:e,height:t}=Me({chart:O.value,title:N.value.title?Bn.value:null,legend:N.value.showLegend?Vn.value:null,slicer:Mr.value?Hn.value:null,source:Gn.value,noTitle:Kn.value});cancelAnimationFrame(Vr),Vr=requestAnimationFrame(()=>{V.value.width=e,V.value.height=t,Br.value=!0,ur()})}),zr.value=O.value.parentNode,H.value.observe(zr.value)),xi(),ur()}Je(()=>{cancelAnimationFrame(Vr),dr.stop(),hi(),Bi(),H.value&&(zr.value&&H.value.unobserve(zr.value),H.value.disconnect(),H.value=null,zr.value=null)});let Ur=m(()=>{switch(B.value){case E.LINE:return`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`;case E.BAR:return`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`;case E.DONUT:return`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`;default:return`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`}});function Wr(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}function Gr(e){return N.value.blurOnHover&&![null,void 0].includes(j.value)&&j.value!==e?`url(#blur_${k.value})`:``}function Kr(){M.value.length?M.value=[]:B.value===E.DONUT?W.value.legend.forEach(e=>{M.value.push(e.id)}):B.value===E.LINE?Z.value.legend.forEach(e=>{M.value.push(e.id)}):B.value===E.BAR&&Q.value.legend.forEach(e=>{M.value.push(e.id)}),B.value===E.DONUT?R(`selectLegend`,W.value.dataset):B.value===E.LINE?R(`selectLegend`,Z.value.dataset):B.value===E.BAR&&R(`selectLegend`,Q.value.dataset)}function qr(e,t){M.value.includes(e)?M.value=M.value.filter(t=>t!==e):M.value.length<t&&M.value.push(e)}let Jr=x(null),Yr=x(null),Xr=x(!1);function Zr(e,t){Xr.value=!0;let n=e.value,r=kr.value.dataset.find((t,n)=>e.id===`donut_${n}`).VALUE;if(M.value.includes(e.id)){M.value=M.value.filter(t=>t!==e.id);function t(){n>r?(Xr.value=!1,cancelAnimationFrame(Yr.value),z.value={...z.value,dataset:z.value.dataset.map((t,n)=>e.id===`donut_${n}`?{...t,value:r,VALUE:r}:t)},R(`selectLegend`,W.value.dataset)):(n+=r*.025,z.value={...z.value,dataset:z.value.dataset.map((t,r)=>e.id===`donut_${r}`?{...t,value:n,VALUE:n}:t)},Yr.value=requestAnimationFrame(t))}t()}else if(t.length>1){function t(){n<r/100?(Xr.value=!1,cancelAnimationFrame(Jr.value),M.value.push(e.id),z.value={...z.value,dataset:z.value.dataset.map((t,n)=>e.id===`donut_${n}`?{...t,value:0,VALUE:0}:t)},R(`selectLegend`,W.value.dataset)):(n/=1.1,z.value={...z.value,dataset:z.value.dataset.map((t,r)=>e.id===`donut_${r}`?{...t,value:n,VALUE:n}:t)},Jr.value=requestAnimationFrame(t))}t()}else R(`selectLegend`,W.value.dataset)}let U=x(null);function Qr(e){U.value=e}let $r=m(()=>N.value.donutThicknessRatio<.01?.01:N.value.donutThicknessRatio>.4?.4:N.value.donutThicknessRatio),W=m(()=>{if(B.value!==E.DONUT)return null;let e=z.value.dataset.map((e,t)=>({...e,value:e.VALUE||e.DATA||e.SERIE||e.VALUES||e.NUM||0,name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`donut_${t}`})).map((e,t)=>({...e,color:e.COLOR?te(e.COLOR):Or.value[t+N.value.paletteStartIndex]||s[t+N.value.paletteStartIndex]||s[(t+N.value.paletteStartIndex)%s.length],immutableValue:e.value}));function t(e,t){return a({v:isNaN(e.value/Wr(t))?0:e.value/Wr(t)*100,s:`%`,r:N.value.dataLabelRoundingPercentage})}function n(e){return e.proportion*100>N.value.donutHideLabelUnderPercentage}function r(e,t){let n=kr.value.dataset.find((t,n)=>`donut_${n}`===e).VALUE;return Math.abs(String(Number(n.toFixed(0))).length-String(Number(t.toFixed(0))).length)}function i({datapoint:t,seriesIndex:n,triggerMode:r=`pointer`}){Un.value={datapoint:t,seriesIndex:n,config:N.value,dataset:e},j.value=t.id,F.value=n,I.value=r;let i=N.value.tooltipCustomFormat;if(N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:t,seriesIndex:n}),o(i)&&de(()=>i({datapoint:t,seriesIndex:n,series:e,config:N.value})))Wn.value=i({datapoint:t,seriesIndex:n,series:e,config:N.value});else{let e=``;e+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${N.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`,e+=`<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.color}"/></svg>`,e+=`<b>${f(N.value.formatter,t.value,a({p:N.value.valuePrefix,v:t.value,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:n})}</b>`,e+=`<span>(${a({v:t.proportion*100,s:`%`,r:N.value.dataLabelRoundingPercentage})})</span></div>`,Wn.value=`<div>${e}</div>`}A.value=!0}function l({datapoint:e,seriesIndex:t}){N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:e,seriesIndex:t}),A.value=!1,j.value=null,U.value=null,F.value=null,I.value=`pointer`}function ee({datapoint:e,seriesIndex:t}){N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:e,seriesIndex:t}),R(`selectDatapoint`,e)}let u={centerX:V.value.width/2,centerY:V.value.height/2},ne=e.filter(e=>!M.value.includes(e.id)).map(e=>e.value||0).reduce((e,t)=>e+t,0),re=e.map((e,t)=>({...e,proportion:(e.value||0)/ne,value:e.value||0,absoluteValue:kr.value.dataset.find((t,n)=>`donut_${n}`===e.id).VALUE,shape:`circle`})),ie=V.value.width/2,d=V.value.height/2,ae=V.value.height*N.value.donutRadiusRatio;return{dataset:re.filter(e=>!M.value.includes(e.id)),legend:re,drawingArea:u,displayArcPercentage:t,isArcBigEnough:n,useTooltip:i,killTooltip:l,selectDatapoint:ee,getSpaces:r,total:ne,cx:ie,cy:d,radius:ae,chart:c({series:e.filter(e=>!M.value.includes(e.id))},ie,d,ae,ae,1.99999,2,1,360,105.25,V.value.height*$r.value)}}),G=x({start:0,end:z.value.maxSeriesLength}),ei=x({...G.value}),ti=x(null),K=x(!1),ni=x(!1),ri=x(!1),q=x(!1),ii=x(!1),ai=x(null),J=x(null),Y=x(null),oi=x(!1),si=x({time:0,x:0,y:0,pointerType:null}),ci={show:!1,selection:{fill:`#2D353C`,stroke:`transparent`,fillOpacity:.1,strokeOpacity:.5,strokeWidth:1,strokeDasharray:0}},li=m(()=>{let e=N.value.dragToZoom??{};return{...ci,...e,selection:{...ci.selection,...e.selection??{}}}}),ui=m(()=>jr.value&&li.value.show&&K.value&&gi()>1&&!_r.value),di=null,fi={};function pi(e,t=G.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function mi(e){let t=pi(e);t&&R(`update:zoomState`,t)}function hi(){di&&=(cancelAnimationFrame(di),null),fi={}}function gi(){let e=Number(z.value?.maxSeriesLength);return Number.isFinite(e)?Math.max(0,e):0}function _i(e,t=G.value.start){let n=gi();if(n<=0)return 0;let r=Math.max(0,Math.min(Number(t)||0,n-1)),i=Number(e);return Number.isFinite(i)?i>n?n:i<=r?Math.min(r+1,n):Math.max(0,i):Math.min(r+1,n)}function vi(){let e=gi();if(e<=0){G.value={start:0,end:0},ei.value={...G.value},ti.value&&ti.value.setRangeValues(0,0);return}let t=Number(G.value.start),n=Number(G.value.end);Number.isFinite(t)||(t=0),Number.isFinite(n)||(n=e),t=Math.max(0,Math.min(t,e-1)),n=Math.max(t+1,Math.min(n,e)),G.value={start:t,end:n},ei.value={start:t,end:n},ti.value&&ti.value.setRangeValues(t,n)}function yi(e){if(!jr.value)return null;let t=pi(e);return t?((t.start!==Number(G.value.start)||t.end!==Number(G.value.end))&&(hi(),G.value={start:t.start,end:t.end},ei.value={...G.value},vi(),ur()),{start:Number(G.value.start),end:Number(G.value.end)}):null}function bi(e){let t=yi(e);return t?(mi(t),t):null}async function xi({applyControlledZoom:e=!0}={}){if(!ni.value){if(!jr.value)K.value=!1;else{ni.value=!0;try{await Ke(),await Ke();let{zoomStartIndex:t,zoomEndIndex:n}=N.value,r=gi();if(r<=0){G.value={start:0,end:0},ei.value={...G.value},K.value=!1;return}let i=t==null?0:Number(t),a=n==null?r:_i(Number(n)+1,i);if(e&&pi(D.zoomState)){let e=pi(D.zoomState);i=e.start,a=e.end}ri.value=!0,G.value={start:i,end:a},ei.value={start:i,end:a},vi(),K.value=!0,await Ke(),ti.value&&ti.value.setRangeValues(G.value.start,G.value.end)}finally{queueMicrotask(()=>{ri.value=!1}),ni.value=!1,ur()}}}}async function Si({applyControlledZoom:e=!1,publish:t=!1}={}){hi(),await xi({applyControlledZoom:e}),t&&(mi({start:Number(G.value.start),end:Number(G.value.end)}),R(`zoomReset`))}function Ci(e){fi={...fi,...e},di&&cancelAnimationFrame(di),di=requestAnimationFrame(()=>{let e={...G.value,...fi};fi={},di=null,G.value=e,ei.value={...e},vi(),mi({start:Number(G.value.start),end:Number(G.value.end)}),ur()})}function wi(e){if(ni.value||ri.value)return;let t=Number(e);Number.isFinite(t)&&(R(`zoomStart`,{index:t,isZoom:t!==0}),(t!==G.value.start||fi.end!==void 0)&&Ci({start:t}))}function Ti(e){if(ni.value||ri.value)return;let t=fi.start===void 0?G.value.start:fi.start,n=_i(Number(e),t);R(`zoomEnd`,{index:n,isZoom:n!==gi()}),(n!==G.value.end||fi.start!==void 0)&&Ci({end:n})}Qe([()=>D.zoomState,jr,()=>Number(z.value?.maxSeriesLength??0)],async([e,t,n])=>{!t||n<=0||!e||(K.value?yi(e):await xi({applyControlledZoom:!0}))},{deep:!0,immediate:!0}),Qe(kr,async e=>{if(!e){K.value=!1;return}let t=z.value?.type,n=Number(z.value?.maxSeriesLength??0);z.value=e;let r=e.type,i=Number(e.maxSeriesLength??0);[E.BAR,E.LINE].includes(r)?(t!==r||n!==i?(hi(),K.value=!1,G.value={start:0,end:i},ei.value={...G.value},Jn.value+=1,await Ke(),await xi({applyControlledZoom:!0})):D.zoomState&&yi(D.zoomState),ur()):(hi(),K.value=!1,ur())},{deep:!0});let Ei=m(()=>{if(!N.value.zoomMinimap.show||B.value===E.DONUT)return[];let e=[];at(z.value.dataset)&&(e=z.value.dataset),ot(z.value.dataset)&&(e=z.value.dataset.map((e,t)=>({values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,id:B.value===E.LINE?`line_${t}`:`bar_${t}`})).filter(e=>!M.value.includes(e.id)));let t=at(e)?e.length:Math.max(...e.map(e=>e.values.length)),n=[];if(at(e))n=e;else for(let r=0;r<t;r+=1)n.push(e.map(e=>e.values[r]||0).reduce((e,t)=>(e||0)+(t||0),0));let r=Math.min(...n);return n.map(e=>e+(r<0?Math.abs(r):0))}),{metrics:Di,ready:Oi,settling:X,update:ki}=Ae({svgRef:L,canMeasure:()=>(!N.value.responsive||Br.value)&&(![E.LINE,E.BAR].includes(B.value)||$i.value),initialMetrics:{scale:0,bottom:0,leftOverhang:0},measure:e=>({scale:e($n.value).textWidth,bottom:e(Qn.value).height,leftOverhang:e(Qn.value).leftOverhang})});function Ai(){return Math.max(Di.value.scale+4,Di.value.leftOverhang-N.value.xyPaddingLeft)}let ji=m(()=>Di.value.bottom),Z=m(()=>{if(B.value!==E.LINE)return null;let e={height:V.value.height,width:V.value.width},t=Ai(),n={left:t+N.value.xyPaddingLeft,top:N.value.xyPaddingTop,right:e.width-N.value.xyPaddingRight,bottom:e.height-N.value.xyPaddingBottom-ji.value,width:Math.max(10,e.width-N.value.xyPaddingLeft-N.value.xyPaddingRight-t),height:Math.max(10,e.height-N.value.xyPaddingTop-N.value.xyPaddingBottom-ji.value)},r=[];at(z.value.dataset)&&(r=[{values:z.value.dataset.slice(G.value.start,G.value.end),absoluteValues:z.value.dataset,absoluteIndices:z.value.dataset.map((e,t)=>t).slice(G.value.start,G.value.end),name:N.value.title,color:Or.value[N.value.paletteStartIndex]||s[N.value.paletteStartIndex],id:`line_0`}]),ot(z.value.dataset)&&(r=z.value.dataset.map((e,t)=>({...e,values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`line_${t}`})).map((e,t)=>({...e,color:e.COLOR?te(e.COLOR):Or.value[t+N.value.paletteStartIndex]||s[t+N.value.paletteStartIndex]||s[(t+N.value.paletteStartIndex)%s.length],values:e.values.slice(G.value.start,G.value.end),absoluteValues:e.values,absoluteIndices:e.values.map((e,t)=>t).slice(G.value.start,G.value.end)})));let i={max:Math.max(...r.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values)),min:Math.min(...r.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values)),maxSeries:Math.max(...r.map(e=>e.values.length))},c=i.max===i.min?re(Math.min(i.min,0),i.min===0?1:Math.max(i.min,0),N.value.xyScaleSegments):re(i.min<0?i.min:0,i.max<0?0:i.max,N.value.xyScaleSegments),l=i.min<0?Math.abs(i.min):0,ee=i.max<0?n.top:n.bottom-l/(c.max+l)*n.height,u=n.width/i.maxSeries,ne=c.ticks.map(e=>({y:n.bottom-n.height*((e+l)/(c.max+l)),x:n.left-8,value:e})),ie=r.map((e,t)=>({...e,shape:`circle`,coordinates:e.values.map((e,t)=>({x:n.left+u*(t+1)-u/2,y:n.bottom-(e+l)/(c.max+l)*n.height,value:e}))})).map(e=>{let t=[];return e.coordinates.forEach(e=>{t.push(`${e.x},${e.y} `)}),{...e,linePath:t.join(` `)}});function d(e){return r.map(t=>({...t,value:t.values[e],absoluteIndex:t.absoluteIndices[e]})).filter(e=>!M.value.includes(e.id))}function ae(e,t=`pointer`){if(q.value&&t===`pointer`)return;j.value=e,U.value=e,F.value=e,I.value=t;let n=d(e);Un.value={datapoint:n,seriesIndex:e,config:N.value,dataset:r};let i=N.value.tooltipCustomFormat;if(N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:n,seriesIndex:e+G.value.start}),o(i)&&de(()=>i({datapoint:n,seriesIndex:e,series:r,config:N.value})))Wn.value=i({datapoint:n,seriesIndex:e,series:r,config:N.value});else{let e=``;$.value[n[0].absoluteIndex]&&(e+=`<div style="border-bottom:1px solid ${N.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${$.value[n[0].absoluteIndex].text}</div>`),n.forEach((t,n)=>{e+=`
|
|
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="${t.color}"/></svg>
|
|
4
|
-
<span>${t.name}:</span>
|
|
5
|
-
<b>${f(N.value.formatter,t.value,a({p:N.value.valuePrefix,v:t.value,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:n})}
|
|
6
|
-
</b>
|
|
7
|
-
</div>
|
|
8
|
-
`}),Wn.value=e}A.value=!0}function oe(e){let t=d(e);N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:t,seriesIndex:e+G.value.start}),j.value=null,U.value=null,A.value=!1,F.value=null,I.value=`pointer`}function se(e){let t=d(e);N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:t,seriesIndex:e+G.value.start}),R(`selectDatapoint`,t)}return{absoluteZero:ee,dataset:ie.filter(e=>!M.value.includes(e.id)),legend:ie,drawingArea:n,extremes:i,slotSize:u,yLabels:ne,useTooltip:ae,killTooltip:oe,selectDatapoint:se}}),Q=m(()=>{if(B.value!==E.BAR)return null;let e={height:V.value.height,width:V.value.width},t=Ai(),n={left:t+N.value.xyPaddingLeft,top:N.value.xyPaddingTop,right:e.width-N.value.xyPaddingRight,bottom:e.height-N.value.xyPaddingBottom-ji.value,width:Math.max(10,e.width-N.value.xyPaddingLeft-N.value.xyPaddingRight-t),height:Math.max(10,e.height-N.value.xyPaddingTop-N.value.xyPaddingBottom-ji.value)},r=[];at(z.value.dataset)&&(r=[{values:z.value.dataset.slice(G.value.start,G.value.end),absoluteValues:z.value.dataset,absoluteIndices:z.value.dataset.map((e,t)=>t).slice(G.value.start,G.value.end),name:N.value.title,color:Or.value[N.value.paletteStartIndex]||s[N.value.paletteStartIndex],id:`bar_0`}]),ot(z.value.dataset)&&(r=z.value.dataset.map((e,t)=>({...e,values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`bar_${t}`})).map((e,t)=>({...e,color:e.COLOR?te(e.COLOR):Or.value[t+N.value.paletteStartIndex]||s[t+N.value.paletteStartIndex]||s[(t+N.value.paletteStartIndex)%s.length],values:e.values.slice(G.value.start,G.value.end),absoluteValues:e.values,absoluteIndices:e.values.map((e,t)=>t).slice(G.value.start,G.value.end)})));let i={max:Math.max(...r.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values))<0?0:Math.max(...r.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values))??1,min:Math.min(...r.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values))??0,maxSeries:Math.max(...r.filter(e=>!M.value.includes(e.id)).map(e=>e.values.length))??0},c=i.min===i.max?re(Math.min(i.min,0),i.min===0?1:Math.max(i.min,0),N.value.xyScaleSegments):re(i.min<0?i.min:0,i.max,N.value.xyScaleSegments),l=c.min<0?Math.abs(c.min):0,ee=n.bottom-l/(c.max+l)*n.height,u=n.width/i.maxSeries,ne=c.ticks.map(e=>({y:n.bottom-n.height*((e+l)/(c.max+l)),x:n.left-8,value:e})),ie=r.map((e,t)=>({...e,shape:`square`,coordinates:e.values.map((e,a)=>{let o=(e+l)/(i.max+l)*n.height,s=Math.abs(e)/Math.abs(i.min)*(n.height-ee),c=l/(i.max+l)*n.height,te=u/r.filter(e=>!M.value.includes(e.id)).length-N.value.barGap/r.filter(e=>!M.value.includes(e.id)).length;return{x:n.left+u*a+te*t+N.value.barGap/2,y:e>0?n.bottom-o:ee,height:e>0?o-c:s,value:e,width:te}})})),d=r.filter(e=>!M.value.includes(e.id)).map((e,t)=>({...e,coordinates:e.values.map((e,a)=>{let o=(e+l)/(i.max+l)*n.height,s=Math.abs(e)/(i.max+l)*n.height,c=l/(i.max+l)*n.height,te=u/r.filter(e=>!M.value.includes(e.id)).length-N.value.barGap/r.filter(e=>!M.value.includes(e.id)).length;return{x:n.left+u*a+te*t+N.value.barGap/2,y:e>0?n.bottom-o:ee,height:e>0?o-c:s,value:e,width:te}})}));function ae(e){return r.map(t=>({...t,value:t.values[e],absoluteIndex:t.absoluteIndices[e]})).filter(e=>!M.value.includes(e.id))}function oe(e,t=`pointer`){if(q.value&&t===`pointer`)return;j.value=e,U.value=e,F.value=e,I.value=t;let n=ae(e);Un.value={datapoint:n,seriesIndex:e,config:N.value,dataset:r};let i=N.value.tooltipCustomFormat;if(N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:n,seriesIndex:e+G.value.start}),o(i)&&de(()=>i({datapoint:n,seriesIndex:e,series:r,config:N.value})))Wn.value=i({point:n,seriesIndex:e,series:r,config:N.value});else{let e=``;$.value[n[0].absoluteIndex]&&(e+=`<div style="border-bottom:1px solid ${N.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${$.value[n[0].absoluteIndex].text}</div>`),n.forEach((t,n)=>{e+=`
|
|
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="${t.color}"/></svg>
|
|
11
|
-
<span>${t.name}:</span>
|
|
12
|
-
<b>${f(N.value.formatter,t.value,a({p:N.value.valuePrefix,v:t.value,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:n})}
|
|
13
|
-
</b>
|
|
14
|
-
</div>
|
|
15
|
-
`}),Wn.value=e}A.value=!0}function se(e){let t=ae(e);N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:t,seriesIndex:e+G.value.start}),A.value=!1,j.value=null,U.value=null,F.value=null,I.value=`pointer`}function ce(e){let t=ae(e);N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:t,seriesIndex:e+G.value.start}),R(`selectDatapoint`,t)}return{absoluteZero:ee,dataset:d.filter(e=>!M.value.includes(e.id)),absoluteDataset:d,legend:ie,drawingArea:n,extremes:i,slotSize:u,yLabels:ne,useTooltip:oe,killTooltip:se,selectDatapoint:ce}}),Mi=m(()=>B.value===E.LINE?Z.value?.drawingArea??null:B.value===E.BAR?Q.value?.drawingArea??null:null),Ni=m(()=>B.value===E.LINE?Number(Z.value?.slotSize??0):B.value===E.BAR?Number(Q.value?.slotSize??0):0),Pi=m(()=>B.value===E.LINE?Number(Z.value?.extremes?.maxSeries??0):B.value===E.BAR?Number(Q.value?.extremes?.maxSeries??0):0),Fi=m(()=>{let e=Mi.value;return!e||!q.value||ai.value==null||J.value==null?null:{x:Math.min(ai.value,J.value),y:e.top,width:Math.abs(J.value-ai.value),height:e.height}}),Ii=m(()=>!K.value||!jr.value?!1:Number(G.value.start)!==0||Number(G.value.end)!==Number(gi()));function Li(e){let t=L.value;if(!t)return null;if(t.createSVGPoint&&t.getScreenCTM){let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(r){let e=n.matrixTransform(r.inverse());return{x:e.x,y:e.y}}}let n=t.getBoundingClientRect(),r=t.viewBox?.baseVal||{x:0,y:0,width:n.width,height:n.height},i=Math.min(n.width/r.width,n.height/r.height);if(!Number.isFinite(i)||i<=0)return null;let a=r.width*i,o=r.height*i,s=(n.width-a)/2,c=(n.height-o)/2;return{x:(e.clientX-n.left-s)/i+r.x,y:(e.clientY-n.top-c)/i+r.y}}function Ri(e){let t=Mi.value;return t?Math.min(Math.max(e,t.left),t.right):e}function zi(){F.value=null,I.value=`pointer`,A.value=!1,j.value=null,U.value=null}function Bi(e){let t=e?.pointerId==null?Y.value:e.pointerId;t!=null&&L.value?.hasPointerCapture?.(t)&&L.value.releasePointerCapture(t),q.value=!1,ai.value=null,J.value=null,Y.value=null}function Vi(){oi.value=!0,setTimeout(()=>{oi.value=!1},0)}function Hi(e){oi.value&&(oi.value=!1,e.preventDefault(),e.stopPropagation())}function Ui(e){if(!ui.value||!Ii.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=si.value,i=n===`touch`?450:350,a=n===`touch`?28:10,o=Math.hypot(e.clientX-r.x,e.clientY-r.y);return r.time>0&&r.pointerType===n&&t-r.time<=i&&o<=a?(si.value={time:0,x:0,y:0,pointerType:null},Vi(),Bi(e),zi(),Si({applyControlledZoom:!1,publish:!0}),!0):(si.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function Wi(e){let t=Mi.value,n=Ni.value,r=Pi.value;if(!t||r<=0||!Number.isFinite(n)||n<=0)return null;let i=Math.floor((Ri(e)-t.left)/n);return Math.max(0,Math.min(r-1,i))}function Gi(e,t){let n=Wi(e),r=Wi(t);if(n==null||r==null)return null;let i=Math.min(n,r),a=Math.max(n,r);return a<=i?null:{start:Number(G.value.start)+i,end:Number(G.value.start)+a+1}}function Ki(e){let t=bi(e);return t?(R(`zoomStart`,{index:t.start,isZoom:t.start!==0}),R(`zoomEnd`,{index:t.end,isZoom:t.end!==gi()}),t):null}function qi(e){if(!ui.value||aa.value||e.button!==void 0&&e.button!==0||Y.value!=null&&e.pointerId!==Y.value)return;let t=Mi.value,n=Li(e);if(!t||!n||n.x<t.left||n.x>t.right||n.y<t.top||n.y>t.bottom||Pi.value<=1)return;ii.value=!0,L.value?.focus?.({preventScroll:!0}),zi();let r=Ri(n.x);Y.value=e.pointerId,q.value=!0,ai.value=r,J.value=r}function Ji(e){if(!ui.value||!q.value||Y.value!=null&&e.pointerId!==Y.value)return;let t=Li(e);t&&(J.value=Ri(t.x),zi(),ai.value!=null&&Math.abs(J.value-ai.value)>=2&&!L.value?.hasPointerCapture?.(e.pointerId)&&L.value?.setPointerCapture?.(e.pointerId))}function Yi(e){if(!ui.value||!q.value||Y.value!=null&&e.pointerId!==Y.value)return;let t=Li(e);t&&(J.value=Ri(t.x));let n=ai.value,r=J.value,i=Mi.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,Number(i?.width??0)*.01)){if(Ui(e))return;Bi(e);return}let a=Gi(Math.min(n,r),Math.max(n,r));a?(Bi(e),Ki(a)&&(si.value={time:0,x:0,y:0,pointerType:null},zi(),Vi())):Bi(e)}let Xi=m(()=>{let e=Mi.value,t=V.value.width;return!e||t<=0||!N.value.zoomXyAutoFit?null:e.left/t}),Zi=m(()=>{let e=Mi.value,t=V.value.width;return!e||t<=0||!N.value.zoomXyAutoFit?null:(t-e.right)/t}),Qi=m(()=>{if(B.value===E.LINE)return Z.value.legend.map(e=>(Math.min(...e.absoluteValues.map(e=>e??0)),{...e,isVisible:!M.value.includes(e.id),type:`line`,series:e.absoluteValues}));if(B.value===E.BAR)return Q.value.legend.map(e=>(Math.min(...e.absoluteValues.map(e=>e??0)),{...e,isVisible:!M.value.includes(e.id),type:`bar`,series:e.absoluteValues}))}),$=x([]),$i=x(!1),ea=0;$e(()=>{let e=++ea;(async()=>{let t=await Ee({values:N.value.xyPeriods,maxDatapoints:z.value.maxSeriesLength,formatter:N.value.datetimeFormatter,start:G.value.start,end:G.value.end});e===ea&&($.value=t,$i.value=!0)})()});let ta=m(()=>{let e=N.value.xyPeriodsModulo;return N.value.xyPeriods.length?Math.min(e,[...new Set($.value.map(e=>e.text))].length):e}),na=x(!1);function ra(e){na.value=e,qn.value+=1}function ia(){Rr.value.showTooltip=!Rr.value.showTooltip}let aa=x(!1);function oa(){aa.value=!aa.value}async function sa({scale:e=2}={}){if(!O.value)return;let{width:t,height:n}=O.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await Se({domElement:O.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:N.value.title,width:t,height:n,aspectRatio:r}}let ca=m(()=>V.value.width),la=m(()=>V.value.height);je({timeLabelsEls:Qn,timeLabels:$,slicer:G,configRef:N,rotationPath:[`xyPeriodLabelsRotation`],autoRotatePath:[`xyPeriodLabelsAutoRotate`,`enable`],isAutoSize:!1,rotation:N.value.xyPeriodLabelsAutoRotate.angle,height:la.value,width:ca.value});let ua=m(()=>N.value.backgroundColor),da=m(()=>B.value===E.DONUT?W.value.legend:B.value===E.LINE?Z.value.legend:Q.value.legend),fa=m(()=>({show:N.value.showLegend,bold:!1,backgroundColor:N.value.backgroundColor,color:N.value.color,fontSize:N.value.legendFontSize,position:N.value.legendPosition})),pa=m(()=>({text:N.value.title,color:N.value.color,fontSize:N.value.titleFontSize,bold:N.value.titleBold,textAlign:N.value.titleTextAlign,subtitle:{text:``}})),{generateSvg:ma,onGenerateImage:ha}=Ce({svg:L,title:pa,legend:fa,legendItems:da,backgroundColor:ua,getSvgCallback:()=>N.value.userOptionsCallbacks.svg,generateImage:Ir});async function ga(){R(`copyAlt`,{config:N.value,dataset:{line:Z.value,bar:Q.value,donut:W.value}}),N.value.userOptionsCallbacks.altCopy?await Promise.resolve(N.value.userOptionsCallbacks.altCopy({config:N.value,dataset:{line:Z.value,bar:Q.value,donut:W.value}})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function _a(e,t){(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())}let va=m(()=>B.value===E.DONUT?W.value?.chart?.length??0:B.value===E.LINE?Z.value?.extremes?.maxSeries??0:B.value===E.BAR?Q.value?.extremes?.maxSeries??0:0);function ya(){F.value=null,hr.value=!0}function ba(){ii.value=!1,F.value=null,I.value=`pointer`,A.value=!1,j.value=null,U.value=null,hr.value=!1}function xa(e){if(!L.value||aa.value||document.activeElement!==L.value||(ii.value=!1,!va.value))return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){if(ui.value&&(Ii.value||q.value)){Bi(),zi(),Si({applyControlledZoom:!1,publish:!0});return}F.value=null,I.value=`pointer`,A.value=!1,j.value=null,U.value=null;return}if(r){if(F.value===null)return;if(B.value===E.DONUT){let e=W.value?.chart?.[F.value];if(!e)return;W.value.selectDatapoint({datapoint:e,seriesIndex:F.value});return}if(B.value===E.LINE){Z.value?.selectDatapoint(F.value);return}if(B.value===E.BAR){Q.value?.selectDatapoint(F.value);return}return}let a=F.value,o=U.value,s=a!==null&&a>=0&&a<va.value,c=o!==null&&o>=0&&o<va.value;if(s?n?(a+=1,a>=va.value&&(a=0)):t&&(--a,a<0&&(a=va.value-1)):c?(a=n?o+1:o-1,a>=va.value&&(a=0),a<0&&(a=va.value-1)):a=n?0:va.value-1,B.value===E.DONUT){let e=W.value?.chart?.[a];if(!e)return;Sa(a),W.value.useTooltip({datapoint:e,seriesIndex:a,triggerMode:`keyboard`})}else B.value===E.LINE?(Sa(a),Z.value?.useTooltip(a,`keyboard`)):B.value===E.BAR&&(Sa(a),Q.value?.useTooltip(a,`keyboard`))}function Sa(e){if(!Number.isFinite(e)||!L.value)return;let t=0,n=0;if(B.value===E.DONUT){let r=W.value?.chart?.[e];if(!r)return;t=oe(r,!0).x,n=ue(r)}if(B.value===E.LINE){let r=Z.value?.drawingArea,i=Z.value?.slotSize;if(!r||!i)return;t=r.left+i*(e+1)-i/2,n=r.top+r.height/2}if(B.value===E.BAR){let r=Q.value?.drawingArea,i=Q.value?.slotSize;if(!r||!i)return;t=r.left+i*(e+1)-i/2,n=r.top+r.height/2}let r=L.value.getBoundingClientRect();mr.value={x:r.left+t/V.value.width*r.width,y:r.top+n/V.value.height*r.height}}let Ca=m(()=>{if(B.value===E.DONUT)return{headers:[`Series`,`Value`,`Percentage`],rows:(W.value?.dataset??[]).map(e=>{let t=W.value?.total?a({v:e.value/W.value.total*100,s:`%`,r:N.value.dataLabelRoundingPercentage}):`0%`;return[e.name,f(N.value.formatter,e.value,a({p:N.value.valuePrefix,v:e.value,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue})),t]})};if(B.value===E.LINE||B.value===E.BAR){let e=B.value===E.LINE?Z.value?.dataset??[]:Q.value?.dataset??[],t=B.value===E.LINE?Z.value?.extremes?.maxSeries??0:Q.value?.extremes?.maxSeries??0;return{headers:[`Index`,...e.map(e=>e.name)],rows:Array.from({length:t},(t,n)=>[$.value?.[n+G.value.start]?.text??String(n+G.value.start),...e.map(e=>{let t=e.values?.[n];return f(N.value.formatter,t,a({p:N.value.valuePrefix,v:t,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}))})])}}return{headers:[],rows:[]}});ye({getImage:sa,generatePdf:Fr,generateImage:Ir,generateSvg:ma,toggleTooltip:ia,toggleAnnotator:oa,toggleFullscreen:ra,copyAlt:ga,resetZoom:()=>Si({applyControlledZoom:!1,publish:!0}),setZoomState:bi}),Qe(()=>[V.value.width,V.value.height,N.value,B.value,$.value,$i.value,$n.value,Qn.value,D.dataset,M.value,Br.value,N.value.fontFamily],ki,{flush:`post`,deep:!0});let wa=m(()=>{let e=B.value===E.LINE?Z.value:Q.value;return Le({enabled:N.value.userOptionsAnnotator?.followZoom,area:Mi.value,range:G.value,ticks:e?.yLabels??[]})});return(e,i)=>Ar.value?(b(),g(`div`,{key:0,id:`${B.value}_${k.value}`,ref_key:`quickChart`,ref:O,class:v({"vue-data-ui-component":!0,"vue-ui-quick-chart":!0,"vue-data-ui-wrapper-fullscreen":na.value}),style:y(`background:${N.value.backgroundColor};color:${N.value.color};font-family:${N.value.fontFamily}; position: relative; ${N.value.responsive?`height: 100%`:``}`),onMouseenter:i[1]||=()=>wr(!0),onMouseleave:i[2]||=()=>wr(!1)},[_(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[_(`p`,null,w(N.value.a11y.translations.keyboardNavigation),1)],8,mt),Ca.value.rows.length?(b(),Be(Fe,{key:0,uid:k.value,head:Ca.value.headers,body:Ca.value.rows,notice:N.value.a11y.translations.tableAvailable,caption:N.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):h(``,!0),N.value.userOptionsButtons.annotator?(b(),Be(T(st),Ge({key:1},T(n)(N.value.userOptionsAnnotator),{svgRef:T(L),followZoom:N.value.userOptionsAnnotator?.followZoom,annotationViewport:wa.value,backgroundColor:N.value.backgroundColor,color:N.value.color,active:aa.value,isCursorPointer:pr.value,palette:N.value.annotatorPalette,onClose:oa}),Ve({_:2},[S(T(r),n=>({name:n,fn:et(r=>[C(e.$slots,n,qe(We(T(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):h(``,!0),Lr.value?(b(),g(`div`,{key:2,ref_key:`noTitle`,ref:Kn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):h(``,!0),N.value.showUserOptions&&(xr.value||Sr.value)?(b(),Be(T(lt),{ref:`details`,key:`user_option_${qn.value}`,backgroundColor:N.value.backgroundColor,color:N.value.color,isPrinting:T(Nr),isImaging:T(Pr),uid:k.value,hasTooltip:N.value.userOptionsButtons.tooltip&&N.value.showTooltip,hasPdf:N.value.userOptionsButtons.pdf,hasImg:N.value.userOptionsButtons.img,hasSvg:N.value.userOptionsButtons.svg,hasFullscreen:N.value.userOptionsButtons.fullscreen,hasAltCopy:N.value.userOptionsButtons.altCopy,hasXls:!1,isTooltip:Rr.value.showTooltip,isFullscreen:na.value,titles:{...N.value.userOptionsButtonTitles},chartElement:O.value,position:N.value.userOptionsPosition,hasAnnotator:N.value.userOptionsButtons.annotator,isAnnotation:aa.value,callbacks:N.value.userOptionsCallbacks,printScale:N.value.userOptionsPrint.scale,isCursorPointer:pr.value,onToggleFullscreen:ra,onGeneratePdf:T(Fr),onGenerateImage:T(ha),onGenerateSvg:T(ma),onToggleTooltip:ia,onToggleAnnotator:oa,onCopyAlt:ga,style:y({visibility:xr.value?Sr.value?`visible`:`hidden`:`visible`})},Ve({_:2},[S(T(we)(e.$slots,`menuIcon optionTooltip optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:et(n=>[C(e.$slots,t,qe(We(T(Te)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isTooltip`,`isFullscreen`,`titles`,`chartElement`,`position`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):h(``,!0),N.value.title?(b(),g(`div`,{key:4,ref_key:`quickChartTitle`,ref:Bn,class:`vue-ui-quick-chart-title`,style:y(`background:transparent;color:${N.value.color};font-size:${N.value.titleFontSize}px;font-weight:${N.value.titleBold?`bold`:`normal`};text-align:${N.value.titleTextAlign}`)},w(N.value.title),5)):h(``,!0),_(`div`,{id:`legend-top-${k.value}`},null,8,ht),_(`div`,gt,[B.value?(b(),g(`svg`,{key:0,ref_key:`svgRef`,ref:L,xmlns:T(fe),"aria-describedby":`chart-instructions-${k.value}`,viewBox:Ur.value,style:y({maxWidth:`100%`,visibility:T(Oi)?`visible`:`hidden`,overflow:`visible`,background:`transparent`,color:N.value.color,cursor:ui.value?q.value?`col-resize`:`crosshair`:void 0,touchAction:ui.value?`pan-y`:void 0,userSelect:ui.value?`none`:void 0}),class:v({"vue-data-ui-no-transition":!T(P)||T(X),"vue-ui-quick-chart-zoom-pointer-focus":ui.value&&ii.value}),tabindex:`0`,onFocus:ya,onBlur:ba,onKeydown:xa,onPointerdown:qi,onPointermove:Ji,onPointerup:Yi,onPointercancel:Bi,onClickCapture:Hi},[He(T(it)),e.$slots[`chart-background`]&&B.value===E.BAR?(b(),g(`foreignObject`,{key:0,x:Q.value.drawingArea.left,y:Q.value.drawingArea.top,width:Q.value.drawingArea.width,height:Q.value.drawingArea.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,vt)):h(``,!0),e.$slots[`chart-background`]&&B.value===E.LINE?(b(),g(`foreignObject`,{key:1,x:Z.value.drawingArea.left,y:Z.value.drawingArea.top,width:Z.value.drawingArea.width,height:Z.value.drawingArea.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,yt)):h(``,!0),e.$slots[`chart-background`]&&B.value===E.DONUT?(b(),g(`foreignObject`,{key:2,x:0,y:0,width:V.value.width,height:V.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,bt)):h(``,!0),_(`defs`,null,[_(`filter`,{id:`blur_${k.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[_(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2,id:`blur_std_${k.value}`},null,8,St),i[3]||=_(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,xt),_(`filter`,{id:`shadow_${k.value}`,"color-interpolation-filters":`sRGB`},[_(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`10`,"flood-opacity":`0.5`,"flood-color":N.value.donutShadowColor},null,8,wt)],8,Ct)]),B.value===E.DONUT?(b(),g(p,{key:3},[N.value.showDataLabels?(b(),g(`g`,Tt,[(b(!0),g(p,null,S(W.value.chart,(e,t)=>(b(),g(p,null,[W.value.isArcBigEnough(e)?(b(),g(`path`,{key:0,d:T(se)(e,{x:V.value.width/2,y:V.value.height/2},16,16,!1,!1,V.value.height*$r.value,12,N.value.donutCurvedMarkers),stroke:e.color,"stroke-width":N.value.donutLabelMarkerStrokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:Gr(e.id)},null,8,Et)):h(``,!0)],64))),256))])):h(``,!0),_(`circle`,{cx:W.value.cx,cy:W.value.cy,r:W.value.radius,fill:N.value.backgroundColor,filter:N.value.donutUseShadow?`url(#shadow_${k.value})`:``},null,8,Dt),_(`g`,Ot,[(b(!0),g(p,null,S(W.value.chart,(e,t)=>(b(),g(`path`,{d:e.arcSlice,fill:e.color,stroke:N.value.donutStroke||N.value.backgroundColor,"stroke-width":N.value.donutStrokeWidth,filter:Gr(e.id)},null,8,kt))),256)),(b(!0),g(p,null,S(W.value.chart,(e,t)=>(b(),g(`path`,{d:e.arcSlice,fill:`transparent`,onMouseenter:n=>W.value.useTooltip({datapoint:e,seriesIndex:t,triggerMode:`pointer`}),onMouseout:n=>W.value.killTooltip({datapoint:e,seriesIndex:t}),onClick:n=>W.value.selectDatapoint({datapoint:e,seriesIndex:t})},null,40,At))),256))]),N.value.showDataLabels?(b(),g(`g`,jt,[(b(!0),g(p,null,S(W.value.chart,(e,t)=>(b(),g(p,null,[W.value.isArcBigEnough(e)?(b(),g(`circle`,{key:0,cx:T(oe)(e).x,cy:T(ue)(e)-3.7,fill:e.color,stroke:N.value.backgroundColor,"stroke-width":1,r:3,filter:Gr(e.id)},null,8,Mt)):h(``,!0),W.value.isArcBigEnough(e)?(b(),g(`text`,{key:1,"text-anchor":T(oe)(e,!0,20).anchor,x:T(oe)(e,!0).x,y:T(ue)(e),fill:N.value.color,"font-size":N.value.dataLabelFontSize,filter:Gr(e.id)},w(W.value.displayArcPercentage(e,W.value.chart))+` (`+w(T(f)(N.value.formatter,e.value,T(a)({p:N.value.valuePrefix,v:e.value,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:e,seriesIndex:t}))+`) `,9,Nt)):h(``,!0),W.value.isArcBigEnough(e,!0,20)?(b(),g(`text`,{key:2,"text-anchor":T(oe)(e).anchor,x:T(oe)(e,!0).x,y:T(ue)(e)+N.value.dataLabelFontSize,fill:N.value.color,"font-size":N.value.dataLabelFontSize,filter:Gr(e.id)},w(e.name),9,Pt)):h(``,!0)],64))),256))])):h(``,!0),N.value.donutShowTotal?(b(),g(`g`,Ft,[_(`text`,{"text-anchor":`middle`,x:W.value.drawingArea.centerX,y:W.value.drawingArea.centerY-N.value.donutTotalLabelFontSize/2,"font-size":N.value.donutTotalLabelFontSize,fill:N.value.color},w(N.value.donutTotalLabelText),9,It),_(`text`,{"text-anchor":`middle`,x:W.value.drawingArea.centerX,y:W.value.drawingArea.centerY+N.value.donutTotalLabelFontSize,"font-size":N.value.donutTotalLabelFontSize,fill:N.value.color},w(T(a)({p:N.value.valuePrefix,v:W.value.total,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue})),9,Lt)])):h(``,!0)],64)):h(``,!0),B.value===E.LINE?(b(),g(p,{key:4},[N.value.xyShowGrid?(b(),g(`g`,Rt,[(b(!0),g(p,null,S(Z.value.yLabels,e=>(b(),g(p,null,[e.y<=Z.value.drawingArea.bottom?(b(),g(`line`,{key:0,x1:Z.value.drawingArea.left,x2:Z.value.drawingArea.right,y1:e.y,y2:e.y,stroke:N.value.xyGridStroke,"stroke-width":N.value.xyGridStrokeWidth,"stroke-linecap":`round`},null,8,zt)):h(``,!0)],64))),256)),(b(!0),g(p,null,S(Z.value.extremes.maxSeries+1,(e,t)=>(b(),g(`line`,{x1:Z.value.drawingArea.left+Z.value.slotSize*t,x2:Z.value.drawingArea.left+Z.value.slotSize*t,y1:Z.value.drawingArea.top,y2:Z.value.drawingArea.bottom,stroke:N.value.xyGridStroke,"stroke-width":N.value.xyGridStrokeWidth,"stroke-linecap":`round`},null,8,Bt))),256))])):h(``,!0),N.value.xyShowAxis?(b(),g(`g`,Vt,[_(`line`,{x1:Z.value.drawingArea.left,x2:Z.value.drawingArea.left,y1:Z.value.drawingArea.top,y2:Z.value.drawingArea.bottom,stroke:N.value.xyAxisStroke,"stroke-width":N.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,8,Ht),_(`line`,{x1:Z.value.drawingArea.left,x2:Z.value.drawingArea.right,y1:isNaN(Z.value.absoluteZero)?Z.value.drawingArea.bottom:Z.value.absoluteZero,y2:isNaN(Z.value.absoluteZero)?Z.value.drawingArea.bottom:Z.value.absoluteZero,stroke:N.value.xyAxisStroke,"stroke-width":N.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,8,Ut)])):h(``,!0),N.value.xyShowScale?(b(),g(`g`,{key:2,class:`yLabels`,ref_key:`scaleLabels`,ref:$n},[(b(!0),g(p,null,S(Z.value.yLabels,(e,t)=>(b(),g(p,{key:`sl_${t}`},[e.y<=Z.value.drawingArea.bottom?(b(),g(`path`,{key:0,class:v({"vue-data-ui-transition":T(P)&&!T(X)}),d:`M${e.x+4},${e.y} ${Z.value.drawingArea.left},${e.y}`,stroke:N.value.xyAxisStroke,"stroke-width":N.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,10,Wt)):h(``,!0),e.y<=Z.value.drawingArea.bottom?(b(),g(`text`,{key:1,class:v({"vue-data-ui-transition":T(P)&&!T(X)}),transform:`translate(${e.x}, ${e.y+N.value.xyLabelsYFontSize/3})`,"text-anchor":`end`,"font-size":N.value.xyLabelsYFontSize,fill:N.value.color},w(T(f)(N.value.formatter,e.value,T(a)({p:N.value.valuePrefix,v:e.value,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:e,seriesIndex:t})),11,Gt)):h(``,!0)],64))),128))],512)):h(``,!0),N.value.xyShowScale&&N.value.xyPeriods.length?(b(),g(`g`,Kt,[(b(!0),g(p,null,S($.value.map(e=>e.text),(e,t)=>(b(),g(p,null,[!N.value.xyPeriodsShowOnlyAtModulo||N.value.xyPeriodsShowOnlyAtModulo&&t%Math.floor((G.value.end-G.value.start)/ta.value)===0||G.value.end-G.value.start<=ta.value?(b(),g(`line`,{key:0,x1:Z.value.drawingArea.left+Z.value.slotSize*(t+1)-Z.value.slotSize/2,x2:Z.value.drawingArea.left+Z.value.slotSize*(t+1)-Z.value.slotSize/2,y1:Z.value.drawingArea.bottom,y2:Z.value.drawingArea.bottom+4,stroke:N.value.xyAxisStroke,"stroke-width":N.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,8,qt)):h(``,!0)],64))),256)),_(`g`,{ref_key:`timeLabelsEls`,ref:Qn},[(b(!0),g(p,null,S($.value.map(e=>e.text),(e,t)=>(b(),g(p,null,[!N.value.xyPeriodsShowOnlyAtModulo||N.value.xyPeriodsShowOnlyAtModulo&&t%Math.floor((G.value.end-G.value.start)/ta.value)===0||G.value.end-G.value.start<=ta.value?(b(),g(`g`,Jt,[String(e).includes(`
|
|
16
|
-
`)?(b(),g(`text`,{key:1,class:`vue-data-ui-time-label`,"font-size":N.value.xyLabelsXFontSize,"text-anchor":N.value.xyPeriodLabelsRotation>0?`start`:N.value.xyPeriodLabelsRotation<0?`end`:`middle`,fill:N.value.color,transform:`translate(${Z.value.drawingArea.left+Z.value.slotSize*(t+1)-Z.value.slotSize/2}, ${Z.value.drawingArea.bottom+N.value.xyLabelsXFontSize+6}), rotate(${N.value.xyPeriodLabelsRotation})`,innerHTML:T(l)({content:String(e),fontSize:N.value.xyLabelsXFontSize,fill:N.value.color,x:0,y:0})},null,8,Xt)):(b(),g(`text`,{key:0,class:`vue-data-ui-time-label`,"font-size":N.value.xyLabelsXFontSize,"text-anchor":N.value.xyPeriodLabelsRotation>0?`start`:N.value.xyPeriodLabelsRotation<0?`end`:`middle`,fill:N.value.color,transform:`translate(${Z.value.drawingArea.left+Z.value.slotSize*(t+1)-Z.value.slotSize/2}, ${Z.value.drawingArea.bottom+N.value.xyLabelsXFontSize+6}), rotate(${N.value.xyPeriodLabelsRotation})`},w(e),9,Yt))])):h(``,!0)],64))),256))],512)])):h(``,!0),_(`g`,Zt,[(b(!0),g(p,null,S(Z.value.dataset,(e,t)=>(b(),g(`g`,{key:`serie_${e.id}`,class:`line-plot-series`},[N.value.lineSmooth?(b(),g(p,{key:0},[_(`path`,{ref_for:!0,ref_key:`pathWrapper`,ref:Xn,d:`M ${T(u)(e.coordinates)}`,stroke:N.value.backgroundColor,"stroke-width":N.value.lineStrokeWidth+1,"stroke-linecap":`round`,fill:`none`,class:v({"vue-data-ui-transition":T(P)&&!T(X)})},null,10,Qt),_(`path`,{ref_for:!0,ref_key:`pathTop`,ref:Zn,d:`M ${T(u)(e.coordinates)}`,stroke:e.color,"stroke-width":N.value.lineStrokeWidth,"stroke-linecap":`round`,fill:`none`,class:v({"vue-data-ui-transition":T(P)&&!T(X)}),style:y({transition:T(_r)?void 0:`all 0.2s ease-in-out`})},null,14,$t)],64)):(b(),g(p,{key:1},[_(`path`,{ref_for:!0,ref_key:`pathWrapper`,ref:Xn,d:`M ${e.linePath}`,stroke:N.value.backgroundColor,"stroke-width":N.value.lineStrokeWidth+1,"stroke-linecap":`round`,fill:`none`,class:v({"vue-data-ui-transition":T(P)&&!T(X)})},null,10,en),_(`path`,{ref_for:!0,ref_key:`pathTop`,ref:Zn,d:`M ${e.linePath}`,stroke:e.color,"stroke-width":N.value.lineStrokeWidth,"stroke-linecap":`round`,fill:`none`,class:v({"vue-data-ui-transition":T(P)&&!T(X)})},null,10,tn)],64)),(b(!0),g(p,null,S(e.coordinates,(t,n)=>(b(),g(`circle`,{key:`dp_${e.id}_${n+G.value.start}`,cx:t.x,cy:T(d)(t.y),r:3,fill:e.color,stroke:N.value.backgroundColor,"stroke-width":`0.5`,class:v({"vue-ui-quick-chart-plot":!0,"vue-data-ui-transition":T(P)&&!T(X)})},null,10,nn))),128))]))),128))]),N.value.showDataLabels?(b(),g(`g`,rn,[(b(!0),g(p,null,S(Z.value.dataset,(e,t)=>(b(),g(p,{key:`ds_${e.id}`},[(b(!0),g(p,null,S(e.coordinates,(t,n)=>(b(),g(`text`,{class:v([`vue-ui-quick-chart-label`,{"vue-data-ui-transition":T(P)&&!T(X)}]),key:`plot_${e.id}_${n+G.value.start}`,"text-anchor":`middle`,"font-size":N.value.dataLabelFontSize,fill:e.color,transform:`translate(${t.x}, ${T(d)(t.y)-N.value.dataLabelFontSize/2})`},w(T(f)(N.value.formatter,T(d)(t.value),T(a)({p:N.value.valuePrefix,v:T(d)(t.value),s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:n})),11,an))),128))],64))),128))])):h(``,!0),Cr.value?(b(),g(`g`,on,[(b(!0),g(p,null,S(Z.value.extremes.maxSeries,(e,t)=>(b(),g(`rect`,{x:Z.value.drawingArea.left+t*Z.value.slotSize,y:Z.value.drawingArea.top,height:Z.value.drawingArea.height<=0?1e-5:Z.value.drawingArea.height,width:Z.value.slotSize<=0?1e-5:Z.value.slotSize,fill:[j.value,U.value].includes(t)?N.value.xyHighlighterColor:`transparent`,style:y(`opacity:${N.value.xyHighlighterOpacity}`),onMouseenter:e=>Z.value.useTooltip(t,`pointer`),onMouseleave:e=>Z.value.killTooltip(t),onClick:e=>Z.value.selectDatapoint(t)},null,44,sn))),256))])):h(``,!0)],64)):h(``,!0),B.value===E.BAR?(b(),g(p,{key:5},[N.value.xyShowGrid?(b(),g(`g`,cn,[(b(!0),g(p,null,S(Q.value.yLabels,e=>(b(),g(p,null,[e.y<=Q.value.drawingArea.bottom?(b(),g(`line`,{key:0,x1:Q.value.drawingArea.left,x2:Q.value.drawingArea.right,y1:e.y,y2:e.y,stroke:N.value.xyGridStroke,"stroke-width":N.value.xyGridStrokeWidth,"stroke-linecap":`round`},null,8,ln)):h(``,!0)],64))),256)),M.value.length<Q.value.legend.length?(b(!0),g(p,{key:0},S(Q.value.extremes.maxSeries+1,(e,t)=>(b(),g(`line`,{x1:Q.value.drawingArea.left+Q.value.slotSize*t,x2:Q.value.drawingArea.left+Q.value.slotSize*t,y1:Q.value.drawingArea.top,y2:Q.value.drawingArea.bottom,stroke:N.value.xyGridStroke,"stroke-width":N.value.xyGridStrokeWidth,"stroke-linecap":`round`},null,8,un))),256)):h(``,!0)])):h(``,!0),N.value.xyShowAxis?(b(),g(`g`,dn,[_(`line`,{x1:Q.value.drawingArea.left,x2:Q.value.drawingArea.left,y1:Q.value.drawingArea.top,y2:Q.value.drawingArea.bottom,stroke:N.value.xyAxisStroke,"stroke-width":N.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,8,fn),_(`line`,{x1:Q.value.drawingArea.left,x2:Q.value.drawingArea.right,y1:isNaN(Q.value.absoluteZero)?Q.value.drawingArea.bottom:Q.value.absoluteZero,y2:isNaN(Q.value.absoluteZero)?Q.value.drawingArea.bottom:Q.value.absoluteZero,stroke:N.value.xyAxisStroke,"stroke-width":N.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,8,pn)])):h(``,!0),N.value.xyShowScale?(b(),g(`g`,{key:2,class:`yLabels`,ref_key:`scaleLabels`,ref:$n},[(b(!0),g(p,null,S(Q.value.yLabels,(e,t)=>(b(),g(p,{key:`sl_${t}`},[e.y<=Q.value.drawingArea.bottom?(b(),g(`path`,{key:0,class:v({"vue-data-ui-transition":T(P)&&!T(X)}),d:`M${e.x+4},${e.y} ${Q.value.drawingArea.left},${e.y}`,stroke:N.value.xyAxisStroke,"stroke-width":N.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,10,mn)):h(``,!0),e.y<=Q.value.drawingArea.bottom?(b(),g(`text`,{key:1,class:v({"vue-data-ui-transition":T(P)&&!T(X)}),transform:`translate(${e.x}, ${e.y+N.value.xyLabelsYFontSize/3})`,"text-anchor":`end`,"font-size":N.value.xyLabelsYFontSize,fill:N.value.color},w(T(f)(N.value.formatter,e.value,T(a)({p:N.value.valuePrefix,v:e.value,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:e,seriesIndex:t})),11,hn)):h(``,!0)],64))),128))],512)):h(``,!0),N.value.xyShowScale&&N.value.xyPeriods.length?(b(),g(`g`,gn,[(b(!0),g(p,null,S(N.value.xyPeriods.slice(G.value.start,G.value.end),(e,t)=>(b(),g(`line`,{x1:Q.value.drawingArea.left+Q.value.slotSize*(t+1)-Q.value.slotSize/2,x2:Q.value.drawingArea.left+Q.value.slotSize*(t+1)-Q.value.slotSize/2,y1:Q.value.drawingArea.bottom,y2:Q.value.drawingArea.bottom+4,stroke:N.value.xyAxisStroke,"stroke-width":N.value.xyAxisStrokeWidth,"stroke-linecap":`round`},null,8,_n))),256)),_(`g`,{ref_key:`timeLabelsEls`,ref:Qn},[(b(!0),g(p,null,S($.value.map(e=>e.text),(e,t)=>(b(),g(p,null,[!N.value.xyPeriodsShowOnlyAtModulo||N.value.xyPeriodsShowOnlyAtModulo&&t%Math.floor((G.value.end-G.value.start)/ta.value)===0||G.value.end-G.value.start<=ta.value?(b(),g(`g`,vn,[String(e).includes(`
|
|
17
|
-
`)?(b(),g(`text`,{key:1,class:`vue-data-ui-time-label`,"font-size":N.value.xyLabelsXFontSize,"text-anchor":N.value.xyPeriodLabelsRotation>0?`start`:N.value.xyPeriodLabelsRotation<0?`end`:`middle`,fill:N.value.color,transform:`translate(${Q.value.drawingArea.left+Q.value.slotSize*(t+1)-Q.value.slotSize/2}, ${Q.value.drawingArea.bottom+N.value.xyLabelsXFontSize+6}), rotate(${N.value.xyPeriodLabelsRotation})`,innerHTML:T(l)({content:String(e),fontSize:N.value.xyLabelsXFontSize,fill:N.value.color,x:0,y:0})},null,8,bn)):(b(),g(`text`,{key:0,class:`vue-data-ui-time-label`,"font-size":N.value.xyLabelsXFontSize,"text-anchor":N.value.xyPeriodLabelsRotation>0?`start`:N.value.xyPeriodLabelsRotation<0?`end`:`middle`,fill:N.value.color,transform:`translate(${Q.value.drawingArea.left+Q.value.slotSize*(t+1)-Q.value.slotSize/2}, ${Q.value.drawingArea.bottom+N.value.xyLabelsXFontSize+6}), rotate(${N.value.xyPeriodLabelsRotation})`},w(e),9,yn))])):h(``,!0)],64))),256))],512)])):h(``,!0),_(`g`,xn,[(b(!0),g(p,null,S(Q.value.dataset,(e,t)=>(b(),g(p,null,[(b(!0),g(p,null,S(e.coordinates,(t,n)=>(b(),g(`rect`,{x:t.x,width:t.width<=0?1e-5:t.width,height:T(d)(t.height<=0?1e-5:t.height),y:T(d)(t.y),fill:e.color,stroke:N.value.backgroundColor,"stroke-width":N.value.barStrokeWidth,"stroke-linecap":`round`,class:v({"vue-data-ui-transition":T(P)&&!T(X)})},null,10,Sn))),256))],64))),256))]),N.value.showDataLabels?(b(),g(`g`,Cn,[(b(!0),g(p,null,S(Q.value.dataset,(e,t)=>(b(),g(p,{key:`ds_${e.id}`},[(b(!0),g(p,null,S(e.coordinates,(t,n)=>(b(),g(`text`,{class:v({"vue-data-ui-transition":T(P)&&!T(X)}),key:`plot_${n+G.value.start}`,transform:`translate(${t.x+t.width/2}, ${T(d)(t.y)-N.value.dataLabelFontSize/2})`,"text-anchor":`middle`,"font-size":N.value.dataLabelFontSize,fill:e.color},w(T(f)(N.value.formatter,T(d)(t.value),T(a)({p:N.value.valuePrefix,v:T(d)(t.value),s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:n})),11,wn))),128))],64))),128))])):h(``,!0),Cr.value&&M.value.length<Q.value.legend.length?(b(),g(`g`,Tn,[(b(!0),g(p,null,S(Q.value.extremes.maxSeries,(e,t)=>(b(),g(`rect`,{x:Q.value.drawingArea.left+t*Q.value.slotSize,y:Q.value.drawingArea.top,height:Q.value.drawingArea.height<=0?1e-5:Q.value.drawingArea.height,width:Q.value.slotSize<=0?1e-5:Q.value.slotSize,fill:[j.value,U.value].includes(t)?N.value.xyHighlighterColor:`transparent`,style:y(`opacity:${N.value.xyHighlighterOpacity}`),onMouseenter:e=>Q.value.useTooltip(t,`pointer`),onMouseleave:e=>Q.value.killTooltip(t),onClick:e=>Q.value.selectDatapoint(t)},null,44,En))),256))])):h(``,!0)],64)):h(``,!0),[E.LINE,E.BAR].includes(B.value)?(b(),g(`g`,Dn,[N.value.xAxisLabel&&B.value===E.LINE?(b(),g(`g`,{key:0,ref_key:`xAxisLabel`,ref:er},[_(`text`,{"font-size":N.value.axisLabelsFontSize,fill:N.value.color,"text-anchor":`middle`,x:Z.value.drawingArea.left+Z.value.drawingArea.width/2,y:V.value.height-N.value.axisLabelsFontSize/3},w(N.value.xAxisLabel),9,On)],512)):h(``,!0),N.value.xAxisLabel&&B.value===E.BAR?(b(),g(`g`,{key:1,ref_key:`xAxisLabel`,ref:er},[_(`text`,{"font-size":N.value.axisLabelsFontSize,fill:N.value.color,"text-anchor":`middle`,x:Q.value.drawingArea.left+Q.value.drawingArea.width/2,y:V.value.height-N.value.axisLabelsFontSize/3},w(N.value.xAxisLabel),9,kn)],512)):h(``,!0),N.value.yAxisLabel&&B.value===E.LINE?(b(),g(`g`,{key:2,ref_key:`yAxisLabel`,ref:tr},[_(`text`,{"font-size":N.value.axisLabelsFontSize,fill:N.value.color,transform:`translate(${N.value.axisLabelsFontSize}, ${Z.value.drawingArea.top+Z.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":`middle`},w(N.value.yAxisLabel),9,An)],512)):h(``,!0),N.value.yAxisLabel&&B.value===E.BAR?(b(),g(`g`,{key:3,ref_key:`yAxisLabel`,ref:tr},[_(`text`,{"font-size":N.value.axisLabelsFontSize,fill:N.value.color,transform:`translate(${N.value.axisLabelsFontSize}, ${Q.value.drawingArea.top+Q.value.drawingArea.height/2}) rotate(-90)`,"text-anchor":`middle`},w(N.value.yAxisLabel),9,jn)],512)):h(``,!0)])):h(``,!0),Fi.value?(b(),g(`rect`,{key:7,x:Fi.value.x,y:Fi.value.y,width:Fi.value.width,height:Fi.value.height,fill:li.value.selection.fill,"fill-opacity":li.value.selection.fillOpacity,stroke:li.value.selection.stroke,"stroke-opacity":li.value.selection.strokeOpacity,"stroke-width":li.value.selection.strokeWidth,"stroke-dasharray":li.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,Mn)):h(``,!0)],46,_t)):h(``,!0),e.$slots.hint?(b(),g(`div`,Nn,[C(e.$slots,`hint`,qe(We({hint:N.value.a11y.translations.keyboardNavigation,isVisible:hr.value})),void 0,!0)])):h(``,!0)]),e.$slots.watermark?(b(),g(`div`,Pn,[C(e.$slots,`watermark`,qe(We({isPrinting:T(Nr)||T(Pr)})),void 0,!0)])):h(``,!0),Mr.value?(b(),g(`div`,{key:`slicer_${Jn.value}`,ref_key:`quickChartSlicer`,ref:Hn},[(b(),Be(Ne,{ref_key:`slicerComponent`,ref:ti,key:`slicer_${Jn.value}`,timeLabels:$.value,background:N.value.zoomColor,borderColor:N.value.backgroundColor,fontSize:N.value.zoomFontSize,useResetSlot:N.value.zoomUseResetSlot,textColor:N.value.color,inputColor:N.value.zoomColor,selectColor:N.value.zoomHighlightColor,max:z.value.maxSeriesLength,min:0,valueStart:G.value.start,valueEnd:G.value.end,smoothMinimap:N.value.zoomMinimap.smooth,minimapSelectedColor:N.value.zoomMinimap.selectedColor,minimapSelectedColorOpacity:N.value.zoomMinimap.selectedColorOpacity,minimapSelectionRadius:N.value.zoomMinimap.selectionRadius,minimapLineColor:N.value.zoomMinimap.lineColor,minimap:Ei.value,minimapIndicatorColor:N.value.zoomMinimap.indicatorColor,verticalHandles:N.value.zoomMinimap.verticalHandles,minimapSelectedIndex:U.value,"onUpdate:start":wi,"onUpdate:end":Ti,refreshStartPoint:N.value.zoomStartIndex===null?0:N.value.zoomStartIndex,refreshEndPoint:N.value.zoomEndIndex===null?z.value.maxSeriesLength:N.value.zoomEndIndex+1,enableRangeHandles:N.value.zoomEnableRangeHandles,enableSelectionDrag:N.value.zoomEnableSelectionDrag,minimapCompact:N.value.zoomMinimap.compact,minimapMerged:N.value.zoomMinimap.merged,allMinimaps:Qi.value,minimapFrameColor:N.value.zoomMinimap.frameColor,additionalMinimapHeight:N.value.zoomMinimap.additionalHeight,handleType:N.value.zoomMinimap.handleType,handleWidth:N.value.zoomMinimap.handleWidth,handleBorderWidth:N.value.zoomMinimap.handleBorderWidth,handleIconColor:N.value.zoomMinimap.handleIconColor,handleBorderColor:N.value.zoomMinimap.handleBorderColor,handleFill:N.value.zoomMinimap.handleFill,focusOnDrag:N.value.zoomFocusOnDrag,focusRangeRatio:N.value.zoomFocusRangeRatio,maxWidth:N.value.zoomMaxWidth,minimapLeftInsetRatio:Xi.value,minimapRightInsetRatio:Zi.value,onReset:i[0]||=()=>Si({applyControlledZoom:!1,publish:!0}),onTrapMouse:Qr},{"reset-action":et(({reset:t})=>[C(e.$slots,`reset-action`,qe(We({reset:t})),void 0,!0)]),_:3},8,/* @__PURE__ */ `timeLabels.background.borderColor.fontSize.useResetSlot.textColor.inputColor.selectColor.max.valueStart.valueEnd.smoothMinimap.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectionRadius.minimapLineColor.minimap.minimapIndicatorColor.verticalHandles.minimapSelectedIndex.refreshStartPoint.refreshEndPoint.enableRangeHandles.enableSelectionDrag.minimapCompact.minimapMerged.allMinimaps.minimapFrameColor.additionalMinimapHeight.handleType.handleWidth.handleBorderWidth.handleIconColor.handleBorderColor.handleFill.focusOnDrag.focusRangeRatio.maxWidth.minimapLeftInsetRatio.minimapRightInsetRatio`.split(`.`)))])):h(``,!0),_(`div`,{id:`legend-bottom-${k.value}`},null,8,Fn),Yn.value&&N.value.showLegend?(b(),Be(ze,{key:7,to:N.value.legendPosition===`top`?`#legend-top-${k.value}`:`#legend-bottom-${k.value}`},[N.value.showLegend?(b(),g(`div`,{key:0,ref_key:`quickChartLegend`,ref:Vn,class:`vue-ui-quick-chart-legend`,style:y(`background:transparent;color:${N.value.color}`)},[(W.value?.legend?.length>2||Z.value?.legend?.length>2||Q.value?.legend?.length>2)&&N.value.showLegendSelectAllToggle&&!T(_r)?(b(),Be(Pe,{key:0,backgroundColor:N.value.legendSelectAllToggleBackgroundColor,color:N.value.legendSelectAllToggleColor,fontSize:N.value.legendFontSize,checked:M.value.length>0,isCursorPointer:pr.value,onToggle:Kr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):h(``,!0),B.value===E.DONUT?(b(!0),g(p,{key:1},S(W.value.legend,(t,n)=>(b(),g(`div`,{class:`vue-ui-quick-chart-legend-item`,onClick:e=>Zr(t,W.value.dataset),style:y(`cursor: ${W.value.legend.length>1&&pr.value?`pointer`:`default`}; opacity:${M.value.includes(t.id)?`0.5`:`1`}`),role:`button`,tabindex:`0`,onKeydown:e=>{_a(e,()=>{Zr(t,W.value.dataset)})}},[N.value.useCustomLegend?C(e.$slots,`legend`,Ge({ref_for:!0},{legend:{...t,isSegregated:M.value.includes(t.id),segregate:()=>{Zr(t,W.value.dataset)}}}),void 0,!0,0):(b(),g(p,{key:1},[He(T(rt),{name:N.value.legendIcon,stroke:t.color,size:N.value.legendIconSize},null,8,[`name`,`stroke`,`size`]),_(`span`,{style:y(`font-size:${N.value.legendFontSize}px`)},w(t.name),5),_(`span`,{style:y(`font-size:${N.value.legendFontSize}px;font-variant-numeric:tabular-nums`)},w(M.value.includes(t.id)?`-`:T(f)(N.value.formatter,t.absoluteValue,T(a)({p:N.value.valuePrefix,v:t.absoluteValue,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:n})),5),M.value.includes(t.id)?(b(),g(`span`,{key:0,style:y(`font-size:${N.value.legendFontSize}px`)},` ( - % ) `,4)):Xr.value?(b(),g(`span`,{key:1,style:y(`font-size:${N.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)},` ( - % ) `,4)):(b(),g(`span`,{key:2,style:y(`font-size:${N.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)},` (`+w(T(a)({v:t.value/W.value.total*100,s:`%`,r:N.value.dataLabelRoundingPercentage}))+`) `,5))],64))],44,In))),256)):h(``,!0),B.value===E.LINE?(b(!0),g(p,{key:2},S(Z.value.legend,(t,n)=>(b(),g(`div`,{class:`vue-ui-quick-chart-legend-item`,onClick:e=>{qr(t.id,Z.value.legend.length-1),R(`selectLegend`,Z.value.dataset)},style:y(`cursor: ${Z.value.legend.length>1&&pr.value?`pointer`:`default`}; opacity:${M.value.includes(t.id)?`0.5`:`1`}`),role:`button`,tabindex:`0`,onKeydown:e=>{_a(e,()=>{qr(t.id,Z.value.legend.length-1),R(`selectLegend`,Z.value.dataset)})}},[N.value.useCustomLegend?C(e.$slots,`legend`,Ge({ref_for:!0},{legend:{...t,isSegregated:M.value.includes(t.id),segregate:()=>{qr(t.id,Z.value.legend.length-1),R(`selectLegend`,Z.value.dataset)}}}),void 0,!0,0):(b(),g(p,{key:1},[He(T(rt),{name:N.value.legendIcon,stroke:t.color,size:N.value.legendIconSize},null,8,[`name`,`stroke`,`size`]),_(`span`,{style:y(`font-size:${N.value.legendFontSize}px`)},w(t.name),5)],64))],44,Ln))),256)):h(``,!0),B.value===E.BAR?(b(!0),g(p,{key:3},S(Q.value.legend,(t,n)=>(b(),g(`div`,{class:`vue-ui-quick-chart-legend-item`,onClick:e=>{qr(t.id,Q.value.legend.length-1),R(`selectLegend`,Q.value.dataset)},style:y(`cursor: ${Q.value.legend.length>1&&pr.value?`pointer`:`default`}; opacity:${M.value.includes(t.id)?`0.5`:`1`}`),role:`button`,tabindex:`0`,onKeydown:e=>{_a(e,()=>{qr(t.id,Q.value.legend.length-1),R(`selectLegend`,Q.value.dataset)})}},[N.value.useCustomLegend?C(e.$slots,`legend`,Ge({ref_for:!0},{legend:{...t,isSegregated:M.value.includes(t.id),segregate:()=>{qr(t.id,Q.value.legend.length-1),R(`selectLegend`,Q.value.dataset)}}}),void 0,!0,0):(b(),g(p,{key:1},[He(T(rt),{name:N.value.legendIcon,stroke:t.color,size:N.value.legendIconSize},null,8,[`name`,`stroke`,`size`]),_(`span`,{style:y(`font-size:${N.value.legendFontSize}px`)},w(t.name),5)],64))],44,Rn))),256)):h(``,!0)],4)):h(``,!0)],8,[`to`])):h(``,!0),e.$slots.source?(b(),g(`div`,{key:8,ref_key:`source`,ref:Gn,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):h(``,!0),He(T(ct),{teleportTo:N.value.tooltipTeleportTo,show:Rr.value.showTooltip&&A.value,backgroundColor:N.value.backgroundColor,color:N.value.color,borderRadius:N.value.tooltipBorderRadius,borderColor:N.value.tooltipBorderColor,borderWidth:N.value.tooltipBorderWidth,fontSize:N.value.tooltipFontSize,backgroundOpacity:N.value.tooltipBackgroundOpacity,position:N.value.tooltipPosition,offsetX:N.value.tooltipOffsetX,offsetY:N.value.tooltipOffsetY,parent:O.value,content:Wn.value,isFullscreen:na.value,isCustom:T(o)(N.value.tooltipCustomFormat),smooth:N.value.tooltipSmooth,smoothForce:N.value.tooltipSmoothForce,smoothSnapThreshold:N.value.tooltipSmoothSnapThreshold,backdropFilter:N.value.tooltipBackdropFilter,isA11yMode:I.value===`keyboard`,a11yPosition:mr.value},{"tooltip-before":et(()=>[C(e.$slots,`tooltip-before`,qe(We({...Un.value})),void 0,!0)]),tooltip:et(()=>[C(e.$slots,`tooltip`,qe(We({...Un.value})),void 0,!0)]),"tooltip-after":et(()=>[C(e.$slots,`tooltip-after`,qe(We({...Un.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`smoothForce`,`smoothSnapThreshold`,`backdropFilter`,`isA11yMode`,`a11yPosition`]),C(e.$slots,`skeleton`,{},()=>[T(_r)?(b(),Be(ge,{key:0})):h(``,!0)],!0)],46,pt)):(b(),g(`div`,zn,[He(T(rt),{name:`circleCancel`,stroke:`red`}),i[4]||=_(`span`,null,`Dataset is not processable`,-1)]))}},[[`__scopeId`,`data-v-0f896f5d`]]);export{O as n,Bn as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-By3Vb5kz.js";import{$ as a,D as o,Dt as ee,Ht as s,Jt as c,Lt as te,M as ne,S as re,X as ie,Yt as ae,Zt as oe,at as l,b as se,i as ce,in as le,nn as ue,nt as de,pt as fe,t as pe,w as me,yt as he,zt as ge}from"./lib-rPeBMZrn.js";import{n as _e,t as ve}from"./BaseScanner-8NdoBs7B.js";import{n as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as xe}from"./useNestedProp-DnGoh-XS.js";import{t as Se}from"./useThemeCheck-BKNRbGeC.js";import{t as Ce}from"./chartImage-DPGnEuYM.js";import{n as we}from"./Title-BliHuXfT.js";import{t as Te}from"./useChartExport-BZts4KFb.js";import{n as Ee,t as De}from"./tableIntegration-CNoJ1CIY.js";import{n as Oe,t as ke}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ae}from"./usePrinter-DVf3YcG5.js";import{c as je}from"./canvas-lib-22VpOI4_.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./DefGrad-DKMq1REY.js";import{t as Pe}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Fe}from"./A11yDataTable-DWNlWXzs.js";import{t as Ie}from"./useUserOptionState-CXlFnwPv.js";import{t as Le}from"./useChartAccessibility-DOMuYJfm.js";import{t as Re}from"./Legend-DM0ClX3D.js";import{t as ze}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Be}from"./vue_ui_radar-68iK9Fam.js";import{Fragment as u,Teleport as Ve,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as He,createTextVNode as Ue,createVNode as We,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Ge,nextTick as Ke,normalizeClass as qe,normalizeProps as v,normalizeStyle as y,onBeforeUnmount as Je,onMounted as Ye,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as Xe,shallowRef as Ze,toDisplayString as w,toRefs as Qe,unref as T,watch as $e,withCtx as E}from"vue";var et=/* @__PURE__ */ e({default:()=>jt}),tt=[`id`],nt=[`id`],rt=[`id`],it={style:{position:`relative`}},at=[`xmlns`,`aria-describedby`,`viewBox`],ot=[`width`,`height`],st={key:1},ct=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],lt={key:0,style:{"pointer-events":`none`}},ut=[`d`,`stroke`,`stroke-width`],dt=[`d`,`stroke`,`stroke-width`],ft={key:2},pt=[`x`,`y`,`text-anchor`,`font-size`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],mt=[`points`,`stroke`,`stroke-width`],ht=[`points`,`stroke`,`stroke-width`,`fill`],gt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],_t={key:4},vt=[`onMouseenter`,`onMouseleave`,`onClick`],yt=[`cx`,`cy`,`r`],bt=[`cx`,`cy`,`fill`,`r`,`stroke`],xt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},St={key:5,class:`vue-data-ui-watermark`},Ct=[`id`],wt=[`onClick`],Tt={class:`vue-data-ui-legend-item`},Et=[`stroke`,`stroke-width`,`stroke-dasharray`],Dt={key:0,style:{"max-width":`200px`,margin:`0 auto`}},Ot={class:`vue-ui-radar-tooltip-datalabel`,style:{width:`100%`}},kt={class:`vue-ui-radar-tooltip-datalabel-name`},At={key:0},jt=/*#__PURE__*/ be({__name:`vue-ui-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:be,emit:et}){let jt=g(()=>import(`./Tooltip-C1q0Qoh7.js`)),Mt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Nt=g(()=>import(`./vue-ui-sparkbar-DT3sDgda.js`).then(e=>e.n)),Pt=g(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Ft=g(()=>import(`./DataTable-Dof6yhO7.js`)),It=g(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Lt=g(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),Rt=g(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),zt=g(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_radar:Bt}=i(),{isThemeValid:Vt,warnInvalidTheme:Ht}=Se(),D=e,Ut=d(()=>!!D.dataset&&Object.keys(D.dataset).length),O=x(ie()),Wt=x(!1),Gt=x(``),Kt=x(0),k=x(null),qt=x(null),Jt=x(null),Yt=x(null),Xt=x(null),Zt=x(0),Qt=x(0),$t=x(0),en=x(!1),tn=x(null),nn=x(null),A=x(null),rn=x({x:0,y:0}),an=x(`pointer`),on=x(!1),j=x(pn()),M=d(()=>j.value.userOptions),N=d(()=>j.value.style.chart.layout.labels),P=d(()=>j.value.style.chart.layout),F=d(()=>j.value.style.chart.tooltip),I=d(()=>j.value.style.chart);ye({config:()=>j.value,dataset:()=>D.dataset,component:`VueUiRadar`,rules:[{test:e=>e?.categories&&e.categories.length===0,message:[`👀 There are no categories in your dataset. Consider:`,``,`▶️ Adding categories...`]},{test:e=>e?.series&&e.series.length===0,message:[`👀 There are no series in your dataset. Consider:`,``,`▶️ Adding series...`]},{test:e=>e?.categories&&e.categories.length>3,message:[`👀 The number of categories > 3, the chart might become hard to read. Consider:`,``,`▶️ Using several instances of the component to display related categories.`,``,`▶️ Adding filters to allow users to choose a maximum number of categories.`]},{test:e=>e?.series&&e.series.length>12,message:[`👀 The number of series is > 12. Consider:`,``,`▶️ Using several instances of the component to distribute the series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``]}]});let L=d(()=>j.value.userOptions.useCursorPointer),sn=d(()=>le({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A90`},labels:{dataLabels:{show:!1}},outerPolygon:{stroke:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:j.value.skeletonConfig??{}})),{loading:cn,FINAL_DATASET:R}=_e({...Qe(D),FINAL_CONFIG:j,prepareConfig:pn,callback:()=>{Promise.resolve().then(async()=>{await Ke(),U.value.showTable=j.value.table.show})},skeletonDataset:D.config?.skeletonDataset??{categories:[{name:`_`,color:`#6A6A6A`}],series:[{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1},{name:`_`,values:[.6],target:1}]},skeletonConfig:le({defaultConfig:j.value,userConfig:sn.value})}),{userOptionsVisible:ln,setUserOptionsVisibility:un,keepUserOptionState:dn}=Ie({config:j.value}),{svgRef:z}=Le({config:I.value.title});function fn(e){return{...e,style:{...e.style,chart:{...e.style.chart,layout:{...e.style.chart.layout,grid:{rotate:0,...e.style.chart.layout.grid},labels:{...e.style.chart.layout.labels,dataLabels:{offset:0,...e.style.chart.layout.labels.dataLabels}}}}}}}function pn(){let e=fn(xe({userConfig:D.config,defaultConfig:Bt})),t=e.theme;if(!t)return e;if(!Vt.value(e))return Ht(e),e;let n=xe({userConfig:Be[t]||D.config,defaultConfig:e}),r=xe({userConfig:D.config,defaultConfig:n});return{...r,customPalette:r.customPalette.length?r.customPalette:ue[t]||s}}let mn=oe(D.config);$e(()=>D.config,(e,t)=>{let n=oe(e),r=n!==mn;mn=n;let i=pn();r?(j.value=i,ln.value=!j.value.userOptions.showOnChartHover,hn(),Zt.value+=1,Qt.value+=1,$t.value+=1,U.value.dataLabels.show=N.value.dataLabels.show,U.value.showTable=j.value.table.show,U.value.showTooltip=F.value?F.value.show:!1):(j.value.style.chart.tooltip=i.style.chart.tooltip,U.value.showTooltip=j.value.style.chart.tooltip.show)},{deep:!0});let B=Ze(null),V=Ze(null),H=d(()=>j.value.debug);function hn(){if(ge(D.dataset)&&l({componentName:`VueUiRadar`,type:`dataset`,debug:H.value}),j.value.responsive){let e=je(()=>{let{width:e,height:t}=Me({chart:k.value,title:I.value.title.text?qt.value:null,legend:I.value.legend.show?Jt.value:null,source:Yt.value,noTitle:Xt.value});requestAnimationFrame(()=>{W.value.width=e,W.value.height=t,Wn()})});B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect()),B.value=new ResizeObserver(e),V.value=k.value.parentNode,B.value.observe(V.value)}Wn()}Ye(()=>{en.value=!0,hn()}),Je(()=>{B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect())});let{isPrinting:gn,isImaging:_n,generatePdf:vn,generateImage:yn}=Ae({elementId:`vue-ui-radar_${O.value}`,fileName:I.value.title.text||`vue-ui-radar`,options:j.value.userOptions.print}),bn=d(()=>j.value.userOptions.show&&!I.value.title.text),xn=d(()=>me(j.value.customPalette)),U=x({dataLabels:{show:N.value.dataLabels.show},showTable:j.value.table.show,showTooltip:F.value.show}),Sn=d(()=>({style:{backgroundColor:`#FFFFFF00`,animation:{show:F.value.animation.show,animationFrames:F.value.animation.animationFrames},labels:{fontSize:F.value.fontSize,name:{color:F.value.color}},gutter:{backgroundColor:`#CCCCCC`,opacity:30}}})),W=x({height:312,width:512}),Cn=et,G=x([]),wn=x(null),K=x(!1);function Tn(){G.value.length?G.value=[]:X.value.forEach((e,t)=>{G.value.push(t)}),En()}function En(){Cn(`selectLegend`,X.value.filter((e,t)=>!G.value.includes(t)).map(e=>({name:e.name,color:e.color,proportion:e.totalProportion})))}function Dn(e){K.value=!0,G.value.includes(e)?(wn.value=e,G.value=G.value.filter(t=>t!==e),setTimeout(()=>{K.value=!1,wn.value=null},500)):(G.value.push(e),setTimeout(()=>{K.value=!1},500)),En()}function On(){return X.value.map(e=>({name:e.name,color:e.color,proportion:e.totalProportion}))}function kn(){let e=R.value;[null,void 0].includes(e?.categories)?(l({componentName:`VueUiRadar`,type:`dataset`,debug:H.value}),l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`categories ({ name: string; prefix?: string; suffix?: string}[])`,debug:H.value})):(e.categories.length===0?l({componentName:`VueUiRadar`,type:`datasetAttributeEmpty`,property:`categories`,debug:H.value}):H.value&&e.categories.forEach((e,t)=>{he({datasetObject:e,requiredAttributes:[`name`]}).forEach(e=>{l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`category.${e} at index ${t}`,index:t})})}),[null,void 0].includes(e?.series)?l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`series ({ name: string; values: number[]; color?: string; target: number}[])`,debug:H.value}):H.value&&e.series.forEach((e,t)=>{he({datasetObject:e,requiredAttributes:[`name`,`values`,`target`]}).forEach(e=>{l({componentName:`VueUiRadar`,type:`datasetSerieAttribute`,key:`series`,property:e,index:t})})}))}$e(()=>R.value,()=>kn(),{deep:!0,immediate:!0});let q=d(()=>{let e=Array.isArray(R.value?.categories)?R.value.categories:[],t=xn.value??s;return e.map((e,n)=>({name:e?.name??``,categoryId:`radar_category_${O.value}_${n}`,color:re(e?.color)||t[n]||s[n%s.length],prefix:e?.prefix??``,suffix:e?.suffix??``}))}),J=d(()=>R.value.series.map((e,t)=>({...e,color:re(e.color)||xn.value[t]||s[t]||s[t%s.length],serieId:`radar_serie_${O.value}_${t}`,formatter:e.formatter||null,absoluteIndex:t})));function An(e){return J.value.length?X.value.find(t=>t.name===e)||(H.value&&console.warn(`VueUiRadar - Series name not found "${e}"`),null):(H.value&&console.warn(`VueUiRadar - There are no series to show.`),null)}function jn(e){let t=An(e);t!==null&&G.value.includes(t.absoluteIndex)&&Dn(t.absoluteIndex)}function Mn(e){let t=An(e);t!==null&&(G.value.includes(t.absoluteIndex)||Dn(t.absoluteIndex))}let Nn=d(()=>Math.max(0,...J.value.flatMap(e=>e.values)));function Pn(e){return P.value.scaleToAxisMax?Math.max(1,e.target||0,...e.values):e.target||Nn.value||1}let Fn=d(()=>J.value.map((e,t)=>{let n=Bn.value.coordinates[t];return Gn({centerX:W.value.width/2,centerY:W.value.height/2,apexX:n.x,apexY:n.y,proportion:(e.target||0)/Pn(e)})})),In=d(()=>J.value.length),Ln=d(()=>Math.min(W.value.width,W.value.height)/3),Rn=d(()=>{let e=Number(P.value.plots.radius??0);return Math.max(Number.isFinite(e)?e*2.5:0,10)}),zn=d(()=>{let e=Number(P.value.grid.rotation??0);return Number.isFinite(e)?e*Math.PI/180:0}),Bn=d(()=>ne({plot:{x:W.value.width/2,y:W.value.height/2},radius:Ln.value,sides:In.value,rotation:zn.value})),Vn=d(()=>{let e=[];for(let t=0;t<Ln.value;t+=Ln.value/P.value.grid.graduations)e.push(t);return e}),Y=d(()=>Bn.value.coordinates.map((e,t)=>{let n=J.value[t],r=J.value[t].values.map(t=>Gn({centerX:W.value.width/2,centerY:W.value.height/2,apexX:e.x,apexY:e.y,proportion:t/Pn(n)}));return{...e,...n,plots:r}}).map(e=>({...e,labelX:Hn(e).x,labelY:Hn(e).y,labelAnchor:Hn(e).anchor})));function Hn({x:e,y:t}){let n=W.value.width/2,r=W.value.height/2,i=e-n,a=t-r,o=Math.hypot(i,a),ee=Number(N.value.dataLabels.offset??0),s=20+(Number.isFinite(ee)?ee:0);if(!o)return{x:e,y:t,anchor:`middle`};let c=i/o,te=a/o,ne=`middle`;return c>.01?ne=`start`:c<-.01&&(ne=`end`),{x:e+c*s,y:t+te*s,anchor:ne}}let Un=d({get:()=>N.value.dataLabels.fontSize,set:e=>e}),{autoSizeLabels:Wn}=ze({svgRef:z,fontSize:N.value.dataLabels.fontSize,minFontSize:6,sizeRef:Un,labelClass:`.vue-ui-radar-apex-label`});function Gn({centerX:e,centerY:t,apexX:n,apexY:r,proportion:i}){return{x:e+(n-e)*i,y:t+(r-t)*i}}let X=d(()=>{let e=J.value.map((e,t)=>e.values.map(t=>t/(e.target||Nn.value)));return q.value.map((t,n)=>{let r=se(e.map(e=>e[n]).reduce((e,t)=>e+t,0)/J.value.length);return{...t,absoluteIndex:n,totalProportion:r,shape:`circle`,opacity:G.value.includes(n)?.5:1,segregate:()=>Dn(n),isSegregated:G.value.includes(n),display:`${t.name}: ${a({v:(r??0)*100,s:`%`,r:I.value.legend.roundingPercentage})}`}})}),Kn=d(()=>({cy:`radar-div-legend`,backgroundColor:I.value.legend.backgroundColor,color:I.value.legend.color,fontSize:I.value.legend.fontSize,paddingBottom:12,fontWeight:I.value.legend.bold?`bold`:``})),Z=d(()=>{let e=[{name:j.value.translations.datapoint,color:``},{name:j.value.translations.target,color:``},...X.value];return{head:e,body:R.value.series.map(e=>[e.name,ce(e.formatter,e.target,a({p:e.prefix,v:e.target,s:e.suffix,r:j.value.table.td.roundingValue})),...e.values.map((t,n)=>`${ce(e.formatter,t,a({p:q.value[n]?.prefix??``,v:t,s:q.value[n]?.suffix??``,r:j.value.table.td.roundingValue}))} (${isNaN(t/e.target)?``:a({v:t/e.target*100,s:`%`,r:j.value.table.td.roundingPercentage})})`)]),config:{th:{backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline},td:{backgroundColor:j.value.table.td.backgroundColor,color:j.value.table.td.color,outline:j.value.table.td.outline},breakpoint:j.value.table.responsiveBreakpoint},colNames:e}}),Q=x(null),qn=x([]),Jn=x(null);function Yn(e,t){Wt.value=!1,Q.value=null,A.value=null,an.value=`pointer`,j.value.events.datapointLeave&&j.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function Xn(e,t){j.value.events.datapointClick&&j.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Zn(e,t,n=`pointer`){j.value.events.datapointEnter&&j.value.events.datapointEnter({datapoint:e,seriesIndex:t}),an.value=n,A.value=t;let r=q.value.slice();qn.value=[],Q.value=t,Wt.value=!0,Jn.value={datapoint:e,seriesIndex:t,series:{categories:r,datapoints:J.value,radar:Y.value},config:j.value};let i=F.value.customFormat;if(ee(i)&&fe(()=>i({seriesIndex:t,datapoint:e,series:{categories:r,datapoints:J.value,radar:Y.value},config:j.value})))Gt.value=i({seriesIndex:t,datapoint:e,series:{categories:r,datapoints:J.value,radar:Y.value},config:j.value});else{Gt.value=`<div style="width:100%;text-align:center;border-bottom:1px solid ${F.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`;for(let t=0;t<e.values.length;t+=1)if(!G.value.includes(t)){let n=r[t],i=e.values[t],o=isNaN(i/e.target)?0:i/e.target*100,ee=ce(e.formatter,i,a({p:q.value[t].prefix,v:i,s:q.value[t].suffix,r:F.value.roundingValue}),{datapoint:e}),s=a({v:o,s:`%`,r:F.value.roundingPercentage}),c=F.value.showValue&&F.value.showPercentage?`${ee} (${s})`:F.value.showValue&&!F.value.showPercentage?ee:!F.value.showValue&&F.value.showPercentage?`${s}`:``;qn.value.push({name:n?.name??`#${t+1}`,value:e.values[t]/e.target*100,color:n?.color,suffix:c,prefix:``,rounding:F.value.roundingPercentage,formatter:e.formatter})}}}function Qn(e=null){Ke(()=>{let t=[[I.value.title.text],[I.value.title.subtitle.text],[``]],n=[[``],[j.value.translations.target],...X.value.flatMap(e=>[[e.name],[`%`]])],r=R.value.series.map((e,t)=>[e.name,e.target,...e.values.flatMap(t=>[t,isNaN(t/e.target)?``:t/e.target*100])]),i=t.concat([n]).concat(r),a=o(i);e?e(a):de({csvContent:a,title:I.value.title.text||`vue-ui-radar`})})}let $=x(!1);function $n(e){$.value=e,Kt.value+=1}function er(){U.value.showTable=!U.value.showTable}function tr(){U.value.showTooltip=!U.value.showTooltip}let nr=x(!1);function rr(){nr.value=!nr.value}let ir=Ce(k,()=>I.value.title.text),ar=d(()=>De({config:j,style:I,mutableConfig:U,dialog:zt,accordion:Pt,isFullscreen:$,parent:k,maxWidth:800,isCursorPointer:L}));$e(()=>U.value.showTable,e=>Ee(e,j,tn));function or(){U.value.showTable=!1,nn.value&&nn.value.setTableIconState(!1)}let sr=d(()=>X.value.map(e=>({...e,name:e.display}))),cr=d(()=>I.value.backgroundColor),lr=d(()=>I.value.legend),ur=d(()=>I.value.title),{isCallbackImaging:dr,isCallbackSvg:fr,generateSvg:pr,onGenerateImage:mr}=Te({svg:z,title:ur,legend:lr,legendItems:sr,backgroundColor:cr,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:yn});async function hr(){Cn(`copyAlt`,{config:j.value,dataset:Y.value}),j.value.userOptions.callbacks.altCopy?await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function gr(){A.value=null,on.value=!0}function _r(){A.value=null,an.value=`pointer`,Wt.value=!1,Q.value=null,on.value=!1}function vr(e){if(!Number.isFinite(e)||!z.value)return;let t=Y.value[e];if(!t)return;let n=z.value.getBoundingClientRect();rn.value={x:n.left+t.labelX/W.value.width*n.width,y:n.top+t.labelY/W.value.height*n.height}}function yr(e){if(!z.value||nr.value||document.activeElement!==z.value||!Y.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){A.value=null,an.value=`pointer`,Wt.value=!1,Q.value=null;return}if(r){if(A.value===null)return;let e=Y.value[A.value];if(!e)return;Xn(e,A.value);return}let a=A.value;a===null||a<0||a>=Y.value.length?a=n?0:Y.value.length-1:n?(a+=1,a>=Y.value.length&&(a=0)):t&&(--a,a<0&&(a=Y.value.length-1));let o=Y.value[a];o&&(A.value=a,vr(a),Zn(o,a,`keyboard`))}let br=d(()=>({headers:Z.value?.colNames?.map(e=>e.name??e)??[],rows:Z.value?.body??[]}));return be({getData:On,getImage:ir,generatePdf:vn,generateCsv:Qn,generateImage:yn,generateSvg:pr,hideSeries:Mn,showSeries:jn,toggleTable:er,toggleTooltip:tr,toggleAnnotator:rr,toggleFullscreen:$n,copyAlt:hr}),(e,i)=>(b(),m(`div`,{class:qe(`vue-data-ui-component vue-ui-radar ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${j.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`radarChart`,ref:k,id:`vue-ui-radar_${O.value}`,style:y(`font-family:${j.value.style.fontFamily};width:100%; ${j.value.responsive?`height: 100%;`:``} text-align:center;background:${I.value.backgroundColor}`),onMouseenter:i[2]||=()=>T(un)(!0),onMouseleave:i[3]||=()=>T(un)(!1)},[h(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[h(`p`,null,w(j.value.a11y.translations.keyboardNavigation),1)],8,nt),br.value?.rows?.length?(b(),f(Fe,{key:0,uid:O.value,head:br.value.headers,body:br.value.rows,notice:j.value.a11y.translations.tableAvailable,caption:j.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),M.value.buttons.annotator?(b(),f(T(It),Ge({key:1},T(n)(M.value.annotator),{svgRef:T(z),backgroundColor:I.value.backgroundColor,color:I.value.color,active:nr.value,isCursorPointer:L.value,palette:M.value.annotatorPalette,onClose:rr}),He({_:2},[S(T(r),n=>({name:n,fn:E(r=>[C(e.$slots,n,v(_(T(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),bn.value?(b(),m(`div`,{key:2,ref_key:`noTitle`,ref:Xt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),I.value.title.text?(b(),m(`div`,{key:3,ref_key:`chartTitle`,ref:qt,style:`width:100%;background:transparent;padding-bottom:12px`},[(b(),f(we,{key:`title_${Zt.value}`,config:{title:{cy:`radar-div-title`,...I.value.title},subtitle:{cy:`radar-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),h(`div`,{id:`legend-top-${O.value}`},null,8,rt),M.value.show&&Ut.value&&(T(dn)||T(ln))?(b(),f(T(Lt),{ref_key:`userOptionsRef`,ref:nn,key:`user_options_${Kt.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isImaging:T(_n),isPrinting:T(gn),uid:O.value,hasTooltip:M.value.buttons.tooltip&&F.value.show,hasPdf:M.value.buttons.pdf,hasImg:M.value.buttons.img,hasSvg:M.value.buttons.svg,hasXls:M.value.buttons.csv,hasTable:M.value.buttons.table,hasFullscreen:M.value.buttons.fullscreen,hasAltCopy:M.value.buttons.altCopy,isFullscreen:$.value,isTooltip:U.value.showTooltip,titles:{...M.value.buttonTitles},chartElement:k.value,position:M.value.position,hasAnnotator:M.value.buttons.annotator,isAnnotation:nr.value,callbacks:M.value.callbacks,printScale:M.value.print.scale,tableDialog:j.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:$n,onGeneratePdf:T(vn),onGenerateCsv:Qn,onGenerateImage:T(mr),onGenerateSvg:T(pr),onToggleTable:er,onToggleTooltip:tr,onToggleAnnotator:rr,onCopyAlt:hr,style:y({visibility:T(dn)?T(ln)?`visible`:`hidden`:`visible`})},He({_:2},[S(T(Oe)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(_(T(ke)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):p(``,!0),h(`div`,it,[(b(),m(`svg`,{ref_key:`svgRef`,ref:z,xmlns:T(pe),"aria-describedby":`chart-instructions-${O.value}`,class:qe({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${W.value.width<=0?10:W.value.width} ${W.value.height<=0?10:W.value.height}`,style:y(`max-width:100%;overflow:visible;background:transparent;color:${I.value.color}`),tabindex:`0`,onFocus:gr,onBlur:_r,onKeydown:yr},[We(T(Rt)),C(e.$slots,`svg-underlayer`,{svg:{...W.value,outerPolygon:Bn.value,isPrintingImg:T(gn)||T(_n)||T(dr),isPrintingSvg:T(fr)}},void 0,!0),e.$slots[`chart-background`]?(b(),m(`foreignObject`,{key:0,x:0,y:0,width:W.value.width<=0?10:W.value.width,height:W.value.height<=0?10:W.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,ot)):p(``,!0),h(`defs`,null,[(b(!0),m(u,null,S(q.value,(e,t)=>(b(),f(Ne,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`radar_gradient_${O.value}_${t}`,key:`radar_gradient_${O.value}_${t}`,stops:[[`0%`,T(c)(T(ae)(e.color,.05),P.value.dataPolygon.opacity),1],[`100%`,T(c)(e.color,P.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`]))),128))]),P.value.grid.show?(b(),m(`g`,st,[(b(!0),m(u,null,S(Y.value,e=>(b(),m(`line`,{x1:W.value.width/2,y1:W.value.height/2,x2:e.x,y2:e.y,stroke:P.value.grid.stroke,"stroke-width":P.value.grid.strokeWidth,style:{"pointer-events":`none`}},null,8,ct))),256)),P.value.grid.graduations>0?(b(),m(`g`,lt,[(b(!0),m(u,null,S(Vn.value,e=>(b(),m(`path`,{d:T(ne)({plot:{x:W.value.width/2,y:W.value.height/2},radius:e,sides:In.value,rotation:zn.value}).path,fill:`none`,stroke:P.value.grid.stroke,"stroke-width":P.value.grid.strokeWidth},null,8,ut))),256))])):p(``,!0)])):p(``,!0),h(`path`,{d:Bn.value.path,fill:`none`,stroke:P.value.outerPolygon.stroke,"stroke-width":P.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,dt),N.value.dataLabels.show?(b(),m(`g`,ft,[(b(!0),m(u,null,S(Y.value,(e,t)=>(b(),m(`text`,{class:`vue-ui-radar-apex-label`,x:e.labelX,y:e.labelY,"text-anchor":e.labelAnchor,"dominant-baseline":`middle`,"font-size":N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,onMouseenter:n=>Zn(e,t,`pointer`),onMouseleave:n=>Yn(e,t),onClick:n=>Xn(e,t)},w(e.name),41,pt))),256))])):p(``,!0),(b(!0),m(u,null,S(q.value,(e,t)=>(b(),m(`g`,null,[h(`g`,null,[j.value.useCssAnimation||!j.value.useCssAnimation&&!G.value.includes(t)?(b(),m(`polygon`,{key:0,points:T(te)(Y.value.map(e=>e.plots[t]),!1,!0),stroke:I.value.backgroundColor,"stroke-width":P.value.dataPolygon.strokeWidth+1,fill:`none`,class:qe({"animated-out":G.value.includes(t)&&j.value.useCssAnimation,"animated-in":K.value&&wn.value===t&&j.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,mt)):p(``,!0),j.value.useCssAnimation||!j.value.useCssAnimation&&!G.value.includes(t)?(b(),m(`polygon`,{key:1,points:T(te)(Y.value.map(e=>e.plots[t]),!1,!0),stroke:e.color,"stroke-width":P.value.dataPolygon.strokeWidth,fill:P.value.dataPolygon.transparent?`transparent`:P.value.dataPolygon.useGradient?`url(#radar_gradient_${O.value}_${t})`:T(c)(e.color,P.value.dataPolygon.opacity),class:qe({"animated-out":G.value.includes(t)&&j.value.useCssAnimation,"animated-in":K.value&&wn.value===t&&j.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,ht)):p(``,!0)])]))),256)),P.value.targetReference.show?(b(),m(`path`,{key:3,class:`vue-ui-radar-target-polygon`,d:`M${T(te)(Fn.value,!1,!0)}Z`,fill:`none`,stroke:P.value.targetReference.stroke,"stroke-width":P.value.targetReference.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,"stroke-dasharray":P.value.targetReference.strokeDasharray,style:{"pointer-events":`none`}},null,8,gt)):p(``,!0),P.value.plots.show?(b(),m(`g`,_t,[(b(!0),m(u,null,S(Y.value,(e,t)=>(b(),m(`g`,{key:`radar-category-${t}`},[(b(!0),m(u,null,S(e.plots,(n,r)=>(b(),m(`g`,{key:`radar-plot-${t}-${r}`,onMouseenter:n=>!G.value.includes(r)&&Zn(e,t,`pointer`),onMouseleave:n=>!G.value.includes(r)&&Yn(e,t),onClick:n=>!G.value.includes(r)&&Xn(e,t)},[h(`circle`,{cx:n.x,cy:n.y,r:Rn.value,fill:`transparent`,stroke:`transparent`,style:y({pointerEvents:G.value.includes(r)?`none`:`all`})},null,12,yt),h(`circle`,{cx:n.x,cy:n.y,fill:G.value.includes(r)?`transparent`:q.value[r]?q.value[r].color:`transparent`,r:Q.value!==null&&Q.value===t?P.value.plots.radius*1.6:P.value.plots.radius,stroke:G.value.includes(r)?`transparent`:I.value.backgroundColor,"stroke-width":.5,class:qe({"animated-out":G.value.includes(r)&&j.value.useCssAnimation,"animated-in":K.value&&wn.value===r&&j.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,bt)],40,vt))),128))]))),128))])):p(``,!0),C(e.$slots,`svg`,{svg:{...W.value,outerPolygon:Bn.value,isPrintingImg:T(gn)||T(_n)||T(dr),isPrintingSvg:T(fr)}},void 0,!0)],46,at)),e.$slots.hint?(b(),m(`div`,xt,[C(e.$slots,`hint`,v(_({hint:j.value.a11y.translations.keyboardNavigation,isVisible:on.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(b(),m(`div`,St,[C(e.$slots,`watermark`,v(_({isPrinting:T(gn)||T(_n)||T(dr)||T(fr)})),void 0,!0)])):p(``,!0),h(`div`,{id:`legend-bottom-${O.value}`},null,8,Ct),en.value&&(I.value.legend.show||e.$slots.legend)?(b(),f(Ve,{key:6,to:I.value.legend.position===`top`?`#legend-top-${O.value}`:`#legend-bottom-${O.value}`},[h(`div`,{ref_key:`chartLegend`,ref:Jt},[C(e.$slots,`legend`,{legend:X.value},()=>[I.value.legend.show?(b(),f(Re,{key:`legend_${$t.value}`,legendSet:X.value,config:Kn.value,isCursorPointer:L.value,onClickMarker:i[0]||=({i:e})=>Dn(e)},He({item:E(({legend:e,index:t})=>[T(cn)?p(``,!0):(b(),m(`div`,{key:0,onClick:t=>e.segregate(),style:y(`opacity:${G.value.includes(t)?.5:1}`)},w(e.display),13,wt))]),legendToggle:E(()=>[X.value.length>2&&I.value.legend.selectAllToggle.show&&!T(cn)?(b(),f(Pe,{key:0,backgroundColor:I.value.legend.selectAllToggle.backgroundColor,color:I.value.legend.selectAllToggle.color,fontSize:I.value.legend.fontSize,checked:G.value.length>0,isCursorPointer:L.value,onToggle:Tn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:2},[P.value.targetReference.show&&P.value.targetReference.showInLegend?{name:`after`,fn:E(()=>[h(`div`,Tt,[h(`div`,{style:y({display:`flex`,height:I.value.legend.fontSize})},[(b(),m(`svg`,{style:y({width:I.value.legend.fontSize*2}),viewBox:`0 0 16 8`},[h(`line`,{x1:`0`,x2:`16`,y1:`4`,y2:`4`,stroke:P.value.targetReference.stroke,"stroke-width":P.value.targetReference.strokeWidth*.7,"stroke-dasharray":P.value.targetReference.strokeDasharray*.7,"stroke-linecap":`round`},null,8,Et)],4))],4),h(`span`,null,w(P.value.targetReference.legendLabel),1)])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512)],8,[`to`])):p(``,!0),e.$slots.source?(b(),m(`div`,{key:7,ref_key:`source`,ref:Yt,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),We(T(jt),{teleportTo:F.value.teleportTo,show:U.value.showTooltip&&Wt.value,backgroundColor:F.value.backgroundColor,color:F.value.color,borderRadius:F.value.borderRadius,borderColor:F.value.borderColor,borderWidth:F.value.borderWidth,backgroundOpacity:F.value.backgroundOpacity,fontSize:F.value.fontSize,position:F.value.position,offsetX:F.value.offsetX,offsetY:F.value.offsetY,parent:k.value,content:Gt.value,isFullscreen:$.value,isCustom:F.value.customFormat&&typeof F.value.customFormat==`function`,smooth:F.value.smooth,backdropFilter:F.value.backdropFilter,smoothForce:F.value.smoothForce,smoothSnapThreshold:F.value.smoothSnapThreshold,isA11yMode:an.value===`keyboard`,a11yPosition:rn.value},{"tooltip-before":E(()=>[C(e.$slots,`tooltip-before`,v(_({...Jn.value})),void 0,!0)]),tooltip:E(()=>[C(e.$slots,`tooltip`,v(_({...Jn.value})),void 0,!0)]),"tooltip-after":E(()=>[![`function`].includes(typeof F.value.customFormat)&&!e.$slots.tooltip?(b(),m(`div`,Dt,[We(T(Nt),{dataset:qn.value,config:Sn.value,backgroundOpacity:0},{"data-label":E(({bar:e})=>[h(`div`,Ot,[h(`span`,kt,w(e.name+(F.value.showValue||F.value.showPercentage?`:`:``)),1),F.value.showValue||F.value.showPercentage?(b(),m(`span`,At,w(e.suffix),1)):p(``,!0)])]),_:1},8,[`dataset`,`config`])])):p(``,!0),C(e.$slots,`tooltip-after`,v(_({...Jn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`fontSize`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Ut.value&&M.value.buttons.table?(b(),f(Xe(ar.value.component),Ge({key:8},ar.value.props,{ref_key:`tableUnit`,ref:tn,onClose:or}),He({content:E(()=>[(b(),f(T(Ft),{key:`table_${Qt.value}`,colNames:Z.value.colNames,head:Z.value.head,body:Z.value.body,config:Z.value.config,title:j.value.table.useDialog?``:ar.value.title,withCloseButton:!j.value.table.useDialog,isCursorPointer:L.value,onClose:or},{th:E(({th:e})=>[Ue(w(e.name),1)]),td:E(({td:e})=>[Ue(w(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[j.value.table.useDialog?{name:`title`,fn:E(()=>[Ue(w(ar.value.title),1)]),key:`0`}:void 0,j.value.table.useDialog?{name:`actions`,fn:E(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Qn(M.value.callbacks.csv),style:y({cursor:L.value?`pointer`:`default`})},[We(T(Mt),{name:`fileCsv`,stroke:ar.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),C(e.$slots,`skeleton`,{},()=>[T(cn)?(b(),f(ve,{key:0})):p(``,!0)],!0)],46,tt))}},[[`__scopeId`,`data-v-7693dabb`]]);export{et as n,jt as t};
|