vue-data-ui 3.28.7 → 3.28.8
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/BaseDraggableDialog-BK7dj9O6.js +1 -0
- package/dist/BaseIcon-CoY0vuL3.js +1 -0
- package/dist/{BaseLegendToggle-aT9fOoGO.js → BaseLegendToggle-BIzyyI1h.js} +1 -1
- package/dist/{BaseZoomControls-1OdFWrHW.js → BaseZoomControls-JSk9zW3D.js} +1 -1
- package/dist/ColorPicker-CwYfNvwH.js +1 -0
- package/dist/{DataTable-5Ug6gMAX.js → DataTable-Dof6yhO7.js} +1 -1
- package/dist/{HillActions-C8am4I5c.js → HillActions-BMH9pSmQ.js} +1 -1
- package/dist/{NonSvgPenAndPaper-CawVDtNj.js → NonSvgPenAndPaper-DXdAh1Sz.js} +1 -1
- package/dist/{PackageVersion-CHQWwTik.js → PackageVersion-Bczw6rsP.js} +1 -1
- package/dist/PenAndPaper-DoNTA-SV.js +1 -0
- package/dist/{SlicerPreview-D7gm-OsZ.js → SlicerPreview-ChKbdZSU.js} +1 -1
- package/dist/UserOptions-DW84OKKr.js +1 -0
- package/dist/XyAnalysisOptions-U4UJx51x.js +1 -0
- package/dist/annotationSlots-OLiW25XN.js +1 -0
- 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-icon.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-CNWVs68D.js +1 -0
- package/dist/{render-common-_8VmVGgq.js → render-common-DY4sNXDz.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/types/vue-data-ui.d.ts +96 -0
- package/dist/types/vue-ui-xy.d.ts +4 -0
- package/dist/useConfig-By3Vb5kz.js +1 -0
- package/dist/{useObjectBindings-BCi3Az41.js → useObjectBindings-0vvvimYP.js} +1 -1
- package/dist/utils.js +1 -1
- package/dist/vue-data-ui-BWqplouA.js +1 -0
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-DmRrbXjK.js +19 -0
- package/dist/{vue-ui-accordion-D4FHxzsL.js → vue-ui-accordion-DFxSW8ET.js} +1 -1
- package/dist/vue-ui-age-pyramid-CJJIp5gY.js +1 -0
- package/dist/{vue-ui-annotator-DuAQovkf.js → vue-ui-annotator-BnR2XnsL.js} +1 -1
- package/dist/vue-ui-bullet-Br7H7FSM.js +34 -0
- package/dist/vue-ui-bump-DCDHNvWE.js +8 -0
- package/dist/vue-ui-candlestick-C_swW8gM.js +22 -0
- package/dist/{vue-ui-carousel-table-Uik-OwJI.js → vue-ui-carousel-table-BP_yVdDm.js} +1 -1
- package/dist/vue-ui-chestnut-CIGNqBsT.js +1 -0
- package/dist/vue-ui-chord-DZRFBkRJ.js +21 -0
- package/dist/vue-ui-circle-pack-CtdPeMsY.js +13 -0
- package/dist/{vue-ui-cursor-Cn4I6C1F.js → vue-ui-cursor-DRQc_V2R.js} +1 -1
- package/dist/vue-ui-dag-Cj0CcntI.js +9 -0
- package/dist/vue-ui-dashboard-HyzHqAtX.js +1 -0
- package/dist/{vue-ui-digits-DD5Ehw6Z.js → vue-ui-digits-CfdB0vaP.js} +1 -1
- package/dist/vue-ui-donut-Cv-bYyBN.js +47 -0
- package/dist/{vue-ui-donut-B4RYYl9y.js → vue-ui-donut-Dy4j7B9b.js} +1 -1
- package/dist/vue-ui-donut-evolution-DL112anx.js +2 -0
- package/dist/vue-ui-dumbbell-owG24VsQ.js +9 -0
- package/dist/vue-ui-flow-BMNIydqI.js +3 -0
- package/dist/vue-ui-funnel-BsVS3vuI.js +1 -0
- package/dist/vue-ui-galaxy-B8HgdBjc.js +1 -0
- package/dist/vue-ui-gauge-B1A_NFY6.js +1 -0
- package/dist/vue-ui-geo-_TG4jaV9.js +1 -0
- package/dist/{vue-ui-gizmo-ByT8Q0Mm.js → vue-ui-gizmo-D0QjzIGt.js} +1 -1
- package/dist/vue-ui-graph-DScVnTzu.js +7 -0
- package/dist/vue-ui-heatmap-BbQseEbM.js +1 -0
- package/dist/vue-ui-hill-D3V84h_t.js +1 -0
- package/dist/vue-ui-history-plot-Bx4WYG6U.js +2 -0
- package/dist/vue-ui-horizontal-bar-Do0HJy4f.js +4 -0
- package/dist/{vue-ui-kpi-w-6ZJ7A1.js → vue-ui-kpi-CF7pAl08.js} +1 -1
- package/dist/{vue-ui-label-0lSeoxvv.js → vue-ui-label-W0oz08pp.js} +1 -1
- package/dist/{vue-ui-mini-loader-C6vhrfx3.js → vue-ui-mini-loader-OLYDdN3T.js} +1 -1
- package/dist/vue-ui-molecule-bAMGCA2Y.js +1 -0
- package/dist/vue-ui-mood-radar-CFpgxjuR.js +1 -0
- package/dist/vue-ui-nested-donuts-CWY26iKX.js +19 -0
- package/dist/vue-ui-onion-DsBUqL_c.js +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-BF3gO85b.js +9 -0
- package/dist/vue-ui-quadrant-BkNG2LGm.js +2 -0
- package/dist/vue-ui-quick-chart-CYxvgVpD.js +17 -0
- package/dist/vue-ui-radar-0H8CiLmc.js +1 -0
- package/dist/{vue-ui-rating-7RAJA7I4.js → vue-ui-rating-B9HeTCLa.js} +1 -1
- package/dist/vue-ui-relation-circle-B0BM4xf8.js +1 -0
- package/dist/vue-ui-ridgeline-D-fDuE3y.js +2 -0
- package/dist/vue-ui-rings-UtlBiaZZ.js +1 -0
- package/dist/vue-ui-scatter-CduaARRt.js +9 -0
- package/dist/{vue-ui-skeleton-D7PLCXgR.js → vue-ui-skeleton-an0peDis.js} +1 -1
- package/dist/{vue-ui-smiley-BdhxsPGW.js → vue-ui-smiley-Cht1imV-.js} +1 -1
- package/dist/{vue-ui-spark-trend-DwiVMTjG.js → vue-ui-spark-trend-DCP7blHB.js} +1 -1
- package/dist/{vue-ui-sparkbar-DO5fcy40.js → vue-ui-sparkbar-DT3sDgda.js} +1 -1
- package/dist/{vue-ui-sparkgauge-jbsycjzU.js → vue-ui-sparkgauge-AQt2L5dI.js} +1 -1
- package/dist/{vue-ui-sparkhistogram-BXO6RMNA.js → vue-ui-sparkhistogram-a_jc2Dv2.js} +1 -1
- package/dist/{vue-ui-sparkline-BwiQOUi0.js → vue-ui-sparkline-D2-KcHAU.js} +1 -1
- package/dist/{vue-ui-sparkstackbar-3hDYCDkU.js → vue-ui-sparkstackbar-CBI4S5cu.js} +1 -1
- package/dist/vue-ui-stackbar-DS_31-a3.js +29 -0
- package/dist/vue-ui-stackline-CuxohB0U.js +39 -0
- package/dist/vue-ui-strip-plot-bYGhsPA5.js +2 -0
- package/dist/{vue-ui-table-heatmap-qU0Mk0US.js → vue-ui-table-heatmap-D6gpmHg8.js} +1 -1
- package/dist/{vue-ui-table-fYf1nuff.js → vue-ui-table-lzolsJ_n.js} +1 -1
- package/dist/{vue-ui-table-sparkline-EIvf8kjn.js → vue-ui-table-sparkline-By319cB8.js} +1 -1
- package/dist/vue-ui-thermometer-B3Uv3aWc.js +1 -0
- package/dist/{vue-ui-timer-Dw7ycl6H.js → vue-ui-timer-C6Pevf4N.js} +2 -2
- package/dist/vue-ui-tiremarks-DeNdCFVD.js +1 -0
- package/dist/vue-ui-treemap-Ck9_llHA.js +1 -0
- package/dist/vue-ui-waffle-BW2SacnV.js +1 -0
- package/dist/vue-ui-wheel-BXDhx5bf.js +1 -0
- package/dist/vue-ui-word-cloud-DKPtoruY.js +4 -0
- package/dist/vue-ui-world-D9vpDbN7.js +19 -0
- package/dist/vue-ui-xy-CMckdUft.js +27 -0
- package/dist/{vue-ui-xy-D4R3bhnl.js → vue-ui-xy-Df5gIADT.js} +1 -1
- package/dist/{vue-ui-xy-canvas-D3TCqFzz.js → vue-ui-xy-canvas-CBrKi3nN.js} +1 -1
- package/package.json +1 -1
- package/dist/BaseDraggableDialog-9d30Yx8c.js +0 -1
- package/dist/BaseIcon-fYK0iID8.js +0 -1
- package/dist/ColorPicker-DEJOjcmD.js +0 -1
- package/dist/PenAndPaper-r50tK3S4.js +0 -1
- package/dist/UserOptions-BUXg7qOC.js +0 -1
- package/dist/annotationSlots-RvQBEO9-.js +0 -1
- package/dist/package-Dbb7W156.js +0 -1
- package/dist/useConfig-D3ZfFSE5.js +0 -1
- package/dist/vue-data-ui-Bkohx9Cs.js +0 -1
- package/dist/vue-ui-3d-bar-CT0QhtL7.js +0 -19
- package/dist/vue-ui-age-pyramid-CkZqtIdC.js +0 -1
- package/dist/vue-ui-bullet-DEJJEz65.js +0 -34
- package/dist/vue-ui-bump-Bk4KKRas.js +0 -8
- package/dist/vue-ui-candlestick-CLB_sBqP.js +0 -22
- package/dist/vue-ui-chestnut-y3HrgMF1.js +0 -1
- package/dist/vue-ui-chord-B_N2fsWI.js +0 -21
- package/dist/vue-ui-circle-pack-D66Nfd--.js +0 -13
- package/dist/vue-ui-dag-CDDz8tXx.js +0 -9
- package/dist/vue-ui-dashboard-B3mEQdok.js +0 -1
- package/dist/vue-ui-donut-BD1mPA4G.js +0 -47
- package/dist/vue-ui-donut-evolution-B8SGQL4s.js +0 -2
- package/dist/vue-ui-dumbbell-BuvzG3Tl.js +0 -9
- package/dist/vue-ui-flow-IowFhHnI.js +0 -3
- package/dist/vue-ui-funnel-gYtcHX9x.js +0 -1
- package/dist/vue-ui-galaxy-CnCTZrbX.js +0 -1
- package/dist/vue-ui-gauge-BKrgEDiX.js +0 -1
- package/dist/vue-ui-geo-C-gc9jm2.js +0 -1
- package/dist/vue-ui-graph-C5p4Zie1.js +0 -7
- package/dist/vue-ui-heatmap-BEj47GVD.js +0 -1
- package/dist/vue-ui-hill-C10eL0jq.js +0 -1
- package/dist/vue-ui-history-plot-BgnJx2mW.js +0 -2
- package/dist/vue-ui-horizontal-bar-D1ko4Ir0.js +0 -4
- package/dist/vue-ui-molecule-C4xemEWm.js +0 -1
- package/dist/vue-ui-mood-radar-Db-Y54f9.js +0 -1
- package/dist/vue-ui-nested-donuts-rcZDqWJr.js +0 -19
- package/dist/vue-ui-onion-ChgJz_7Y.js +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-PI7nplGP.js +0 -9
- package/dist/vue-ui-quadrant-BJeocB2S.js +0 -2
- package/dist/vue-ui-quick-chart-C4d0hcRJ.js +0 -17
- package/dist/vue-ui-radar-gUERUZrP.js +0 -1
- package/dist/vue-ui-relation-circle-Ci_6Orcb.js +0 -1
- package/dist/vue-ui-ridgeline-9LPlODqi.js +0 -2
- package/dist/vue-ui-rings-Ccd4RdGu.js +0 -1
- package/dist/vue-ui-scatter-BsyczCTX.js +0 -9
- package/dist/vue-ui-stackbar-CPb7WvxK.js +0 -29
- package/dist/vue-ui-stackline-Dv2So8hb.js +0 -39
- package/dist/vue-ui-strip-plot-t6XVuFen.js +0 -2
- package/dist/vue-ui-thermometer-DrcMnnAa.js +0 -1
- package/dist/vue-ui-tiremarks-BHainFYD.js +0 -1
- package/dist/vue-ui-treemap-B8vm7e8w.js +0 -1
- package/dist/vue-ui-waffle-CyoTLAoh.js +0 -1
- package/dist/vue-ui-wheel-TN4hPSqT.js +0 -1
- package/dist/vue-ui-word-cloud-BOMaVinm.js +0 -4
- package/dist/vue-ui-world-BCzP1m1G.js +0 -19
- package/dist/vue-ui-xy-NkwuuQv8.js +0 -24
|
@@ -0,0 +1,17 @@
|
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{$ as n,B as r,X as i,Yt as a,at as o,i as s,t as c,zt as ee}from"./lib-rPeBMZrn.js";import{n as te,t as l}from"./useHints-C-TwxM0Y.js";import{t as u}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as d}from"./useNestedProp-DnGoh-XS.js";import{t as f}from"./DefGrad-DKMq1REY.js";import{Fragment as p,computed as m,createCommentVNode as h,createElementBlock as g,createElementVNode as _,createVNode as v,mergeProps as y,normalizeStyle as b,onMounted as x,openBlock as S,ref as C,renderList as ne,renderSlot as w,toDisplayString as T,unref as E,useSlots as re,watch as ie,withKeys as D}from"vue";var O=/* @__PURE__ */ e({default:()=>F}),k={key:0,class:`vue-ui-rating-title`,style:{width:`100%`}},A={key:0,style:{position:`relative`}},j={key:0,style:{position:`absolute`,top:`0`,left:`0`,width:`100%`,height:`100%`}},M={key:1,style:{position:`absolute`,top:`0`,left:`0`,width:`100%`,height:`100%`}},N=[`src`,`height`,`width`],ae=[`xmlns`,`height`,`width`],oe=[`points`,`fill`,`stroke`,`stroke-width`],se=[`src`,`alt`,`height`,`width`,`id`],ce=[`xmlns`,`viewBox`,`height`,`id`],le=[`points`,`fill`,`stroke`],ue=[`xmlns`,`height`],de=[`onClick`,`onMouseenter`,`onFocus`,`onKeyup`],P=[`onMouseenter`,`onFocus`],F=/*#__PURE__*/ u({__name:`vue-ui-rating`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`rate`],setup(e,{expose:u,emit:O}){let{vue_ui_rating:F}=t(),I=e,L=C(i()),R=C(!1),z=C(void 0),B=C(void 0),V=C([]),fe=re(),pe=O,H=m({get:()=>G(),set:e=>e}),U=m(()=>H.value.style.rating),W=m(()=>H.value.style);x(()=>{fe[`chart-background`]&&H.value.debug&&console.warn(`VueUiRating does not support the #chart-background slot.`)}),te({config:()=>H.value,dataset:()=>[],component:`VueUiRating`,rules:[l.noHint]});let me=m(()=>H.value.useCursorPointer);function G(){return d({userConfig:I.config,defaultConfig:F})}ie(()=>I.config,e=>{H.value=G(),X()},{deep:!0});let he=m(()=>typeof I.dataset.rating==`object`&&!Array.isArray(I.dataset.rating)?Y(I.dataset.rating):I.dataset.rating),ge=m(()=>typeof I.dataset.rating==`object`&&!Array.isArray(I.dataset.rating)),K=C(he.value),q=m(()=>H.value.type===`image`),J=m(()=>H.value.readonly);function Y(e){let t=0,n=0;for(let r in e){let i=parseInt(r),a=e[r];t+=i*a,n+=a}if(n===0)return 0;let r=t/n;return Math.min(H.value.to,Math.max(H.value.from,r))}x(()=>{X()});function X(){(!Object.hasOwn(I.dataset,`rating`)||ee(I.dataset))&&o({componentName:`VueUiRating`,type:`datasetAttribute`,property:`rating`,debug:H.value.debug}),V.value=[];for(let e=H.value.from;e<=H.value.to;e+=1)V.value.push(e)}function Z(e,t=!1){return e>z.value||J.value?t?W.value.image.inactiveOpacity:W.value.star.inactiveColor:t?1:W.value.star.useGradient?`url(#star_gradient_under_${L.value})`:W.value.star.activeColor}function Q(e,t=!1){let n=K.value-e,r=t?1:100;switch(!0){case n<=0:return .001;case n>1:return 1*r;default:return n*r}}function $(e){J.value||(K.value=e,pe(`rate`,e))}function _e(){return K.value}function ve(e=!0){J.value=e}return u({getData:_e,toggleReadonly:ve}),(e,t)=>(S(),g(`div`,{style:b(`background:${W.value.backgroundColor};font-family:${W.value.fontFamily};width:100%`),class:`vue-data-ui-component vue-ui-rating`,onMouseover:t[4]||=e=>R.value=!0,onMouseleave:t[5]||=e=>{R.value=!1,z.value=void 0}},[W.value.title.text?(S(),g(`div`,k,[_(`div`,{style:b(`color:${W.value.title.color};font-weight:${W.value.title.bold?`bold`:`normal`};text-align:${W.value.title.textAlign};margin-bottom:${W.value.title.offsetY}px;font-size:${W.value.title.fontSize}px`)},T(W.value.title.text),5),W.value.title.subtitle.text?(S(),g(`div`,{key:0,style:b(`color:${W.value.title.subtitle.color};font-size:${W.value.title.subtitle.fontSize}px;text-align:${W.value.title.textAlign};margin-bottom:${W.value.title.subtitle.offsetY}px;font-weight:${W.value.title.subtitle.bold?`bold`:`normal`}`)},T(W.value.title.subtitle.text),5)):h(``,!0)])):h(``,!0),U.value.show&&U.value.position===`top`?(S(),g(`div`,{key:1,style:b(`width:100%;text-align:center;margin-bottom:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};margin-left:${U.value.offsetX}px`)},T(E(s)(U.value.formatter,K.value,E(n)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0),_(`div`,{class:`vue-ui-rating-wrapper`,style:b(`height:${W.value.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[U.value.show&&U.value.position===`left`?(S(),g(`div`,{key:0,style:b(`width:fit-content;text-align:center;margin-bottom:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};padding-right:${U.value.offsetX}px`)},T(E(s)(U.value.formatter,K.value,E(n)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0),(S(!0),g(p,null,ne(V.value,(i,o)=>(S(),g(`div`,{class:`vue-ui-rating-unit-container`,style:b(`position:relative;height:${W.value.itemSize}px;width:${W.value.itemSize}px`)},[e.$slots[`layer-under`]||e.$slots[`layer-above`]?(S(),g(`div`,A,[e.$slots[`layer-under`]?(S(),g(`div`,j,[w(e.$slots,`layer-under`,y({ref_for:!0},{value:i,size:W.value.itemSize,hoveredValue:z.value,focusedValue:B.value}),void 0,!0)])):h(``,!0),e.$slots[`layer-above`]?(S(),g(`div`,M,[w(e.$slots,`layer-above`,y({ref_for:!0},{value:i,size:W.value.itemSize,hoveredValue:z.value,focusedValue:B.value}),void 0,!0)])):h(``,!0)])):(S(),g(p,{key:1},[q.value?(S(),g(`img`,{key:0,src:W.value.image.src,height:W.value.itemSize,width:W.value.itemSize,class:`vue-ui-rating-unit`,style:b(`position:absolute;top:0;left:0;opacity:${isNaN(z.value)?W.value.image.inactiveOpacity:Z(i,!0)}`)},null,12,N)):(S(),g(`svg`,{key:1,xmlns:E(c),viewBox:`0 0 100 100`,height:W.value.itemSize,width:W.value.itemSize,class:`vue-ui-rating-unit`},[_(`defs`,null,[v(f,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`star_gradient_under_${L.value}`,stops:[[`0%`,E(a)(W.value.star.activeColor,.05),1],[`100%`,W.value.star.activeColor,1]]},null,8,[`id`,`stops`])]),_(`polygon`,{points:E(r)({plot:{x:50,y:50},radius:30,apexes:W.value.star.apexes}),fill:isNaN(z.value)?W.value.star.inactiveColor:Z(i),stroke:W.value.star.borderColor?W.value.star.borderColor:z.value?Z(i):W.value.star.inactiveColor,"stroke-width":W.value.star.borderWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,oe)],8,ae)),q.value?(S(),g(`img`,{key:2,src:W.value.image.src,alt:`${W.value.image.alt} ${i}`,height:W.value.itemSize,width:W.value.itemSize,id:`active_${L.value}_${i}`,class:`vue-ui-rating-unit`,style:b(`position:absolute;top:0;left:0;clip:rect(0px,${Q(o,!0)*W.value.itemSize}px,${W.value.itemSize}px,0px`)},null,12,se)):(S(),g(`svg`,{key:3,xmlns:E(c),viewBox:`0 0 ${Q(o)} 100`,height:W.value.itemSize,class:`vue-ui-rating-unit`,id:`active_${L.value}_${i}`,style:{position:`absolute`,top:`0`,left:`0`}},[_(`defs`,null,[v(f,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`star_gradient_over_${L.value}`,stops:[[`0%`,E(a)(W.value.star.activeColor,.05),1],[`100%`,W.value.star.activeColor,1]]},null,8,[`id`,`stops`])]),_(`polygon`,{points:E(r)({plot:{x:50,y:50},radius:30,apexes:W.value.star.apexes}),fill:W.value.star.useGradient?`url(#star_gradient_over_${L.value})`:W.value.star.activeColor,stroke:W.value.star.activeColor},null,8,le)],8,ce))],64)),(S(),g(`svg`,{xmlns:E(c),viewBox:`0 0 100 100`,height:W.value.itemSize,class:`vue-ui-rating-unit`,style:b(`position:absolute;top:0;left:0;${J.value?``:me.value?`cursor:pointer`:``}`)},[J.value?h(``,!0):(S(),g(`rect`,{key:0,class:`vue-ui-rating-mouse-trap`,x:0,y:0,width:100,height:100,fill:`transparent`,onClick:e=>$(i),onMouseenter:e=>z.value=i,onMouseleave:t[0]||=e=>z.value=void 0,onFocus:e=>B.value=i,onBlur:t[1]||=e=>B.value=void 0,tabindex:`0`,onKeyup:D(e=>$(i),[`enter`])},null,40,de)),J.value?(S(),g(`rect`,{key:1,class:`vue-ui-rating-mouse-trap`,x:0,y:0,width:100,height:100,fill:`transparent`,onMouseenter:e=>z.value=i,onMouseleave:t[2]||=e=>z.value=void 0,onFocus:e=>B.value=i,onBlur:t[3]||=e=>B.value=void 0},null,40,P)):h(``,!0)],12,ue)),W.value.tooltip.show&&ge.value&&J.value?(S(),g(`div`,{key:2,class:`vue-ui-rating-tooltip`,style:b(`border:1px solid ${W.value.tooltip.borderColor};position:absolute;top:${-48+W.value.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${W.value.tooltip.backgroundColor};display:${z.value===i?`block`:`none`};padding:2px 12px;border-radius:${W.value.tooltip.borderRadius}px;box-shadow:${W.value.tooltip.boxShadow}`)},[_(`div`,{style:b(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${W.value.tooltip.color}`)},[_(`span`,{style:b(`font-size:${W.value.tooltip.fontSize}px`)},T(i)+`:`,5),_(`span`,{style:b(`font-weight:${W.value.tooltip.bold?`bold`:`normal`};font-size:${W.value.tooltip.fontSize}px`)},T(E(s)(W.value.tooltip.formatter,I.dataset.rating[i],E(n)({v:I.dataset.rating[i],r:W.value.tooltip.roundingValue}),H.value)),5),_(`div`,{style:b(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${W.value.tooltip.borderColor}`)},` ▼ `,4)],4)],4)):h(``,!0)],4))),256)),U.value.show&&U.value.position===`right`?(S(),g(`div`,{key:1,style:b(`width:fit-content;text-align:center;margin-bottom:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};padding-left:${U.value.offsetX}px`)},T(E(s)(U.value.formatter,K.value,E(n)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0)],4),U.value.show&&U.value.position===`bottom`?(S(),g(`div`,{key:2,style:b(`width:100%;text-align:center;margin-top:${U.value.offsetY}px;font-size:${U.value.fontSize}px;font-weight:${U.value.bold?`bold`:`normal`};margin-left:${U.value.offsetX}px`)},T(E(s)(U.value.formatter,K.value,E(n)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0)],36))}},[[`__scopeId`,`data-v-54940343`]]);export{O as n,F as t};
|
|
@@ -0,0 +1 @@
|
|
|
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,Ht as ee,X as te,at as ne,i as o,in as re,r as ie,rn as ae,t as oe,w as se,yt as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./BaseScanner-8NdoBs7B.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./img-D4RQwASc.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./userOptionsSlots-DYuo-E5m.js";import{t as xe}from"./usePrinter-DVf3YcG5.js";import{c as Se}from"./canvas-lib-22VpOI4_.js";import{t as Ce}from"./useResponsive-CENUxfEL.js";import{t as we}from"./A11yDataTable-DWNlWXzs.js";import{t as Te}from"./useUserOptionState-CXlFnwPv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{t as De}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Oe}from"./vue_ui_relation_circle-Dkv-cSB6.js";import{Fragment as s,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as ke,createTextVNode as Ae,createVNode as je,defineAsyncComponent as Me,guardReactiveProps as p,mergeProps as Ne,normalizeClass as Pe,normalizeProps as m,normalizeStyle as h,onBeforeUnmount as Fe,onMounted as Ie,openBlock as g,ref as _,renderList as v,renderSlot as y,shallowRef as Le,toDisplayString as b,toRefs as Re,unref as x,useCssVars as ze,watch as Be,withCtx as Ve}from"vue";var He=/* @__PURE__ */ e({default:()=>lt}),Ue=[`id`],We=[`id`],Ge={style:{position:`relative`}},Ke=[`xmlns`,`viewBox`,`aria-describedby`],qe=[`width`,`height`],Je=[`cx`,`cy`,`r`,`stroke`,`stroke-width`],Ye={key:1},Xe=[`stroke`,`d`,`stroke-width`],Ze={style:{"pointer-events":`none`}},Qe=[`cx`,`cy`,`fill`,`r`,`stroke`],$e=[`x`,`y`,`fill`,`font-size`],et={key:2},tt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],nt={style:{"pointer-events":`none`}},rt=[`cx`,`cy`,`fill`,`r`,`stroke`],it=[`x`,`y`,`fill`,`font-size`],at=[`text-anchor`,`transform`,`x`,`y`,`font-weight`,`font-size`,`fill`,`text-decoration`,`onClick`,`onMouseenter`,`onMouseleave`],ot=[`cx`,`cy`,`fill`,`stroke`,`r`,`onClick`,`onMouseenter`,`onMouseleave`],st={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},ct={key:5,class:`vue-data-ui-watermark`},lt=/*#__PURE__*/ me({__name:`vue-ui-relation-circle`,props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:me,emit:He}){ze(e=>({v6d4223c7:Pt.value,v2ed90bb4:Nt.value,v384e5f88:Ft.value}));let lt=Me(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ut=Me(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),dt=Me(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),{vue_ui_relation_circle:ft}=i(),S=e,pt=He,mt=c(()=>!!S.dataset&&Object.keys(S.dataset).length),C=_(te()),ht=_(0),w=_(null),gt=_(null),_t=_(null),vt=_(null),yt=_(0),T=_(null),E=_(!1),D=_(Et()),O=c(()=>D.value.userOptions),k=c(()=>D.value.style.weightLabels),A=c(()=>D.value.style);fe({config:()=>D.value,dataset:()=>S.dataset,component:`VueUiRelationCircle`,rules:[pe.noHint]});let j=c(()=>D.value.userOptions.useCursorPointer),bt=c(()=>re({defaultConfig:{userOptions:{show:!1},customPalette:Array(7).fill(`#CACACA`),style:{backgroundColor:`#99999930`,labels:{color:`#6A6A6A`},circle:{stroke:`#6A6A6A`},plot:{color:`#6A6A6A`,useSerieColor:!0},links:{maxWidth:2}}},userConfig:D.value.skeletonConfig??{}})),{loading:xt,FINAL_DATASET:St,manualLoading:Ct}=ue({...Re(S),FINAL_CONFIG:D,prepareConfig:Et,skeletonDataset:S.config?.skeletonDataset??[{id:`A`,label:`_`,relations:[`B`,`C`,`D`,`E`,`F`,`G`]},{id:`B`,label:`_`,relations:[`A`]},{id:`C`,label:`_`,relations:[`A`]},{id:`D`,label:`_`,relations:[`A`]},{id:`E`,label:`_`,relations:[`A`]},{id:`F`,label:`_`,relations:[`A`]},{id:`G`,label:`_`,relations:[`A`]}],skeletonConfig:re({defaultConfig:D.value,userConfig:bt.value})}),{userOptionsVisible:M,setUserOptionsVisibility:wt,keepUserOptionState:Tt}=Te({config:D.value}),{svgRef:N}=Ee({config:A.value.title});function Et(){return he(S.config,ft,Oe)}Be(()=>S.config,e=>{D.value=Et(),M.value=!D.value.userOptions.showOnChartHover,V.value=A.value.size,H.value=k.value.size,U.value=A.value.plot.radius,W.value=A.value.labels.fontSize,G.value.height=A.value.size,G.value.width=A.value.size,Lt(),yt.value+=1},{deep:!0}),Be(()=>S.dataset,e=>{Array.isArray(e)&&e.length>0&&(Ct.value=!1)},{deep:!0});let{isPrinting:P,isImaging:F,generatePdf:Dt,generateImage:Ot}=xe({elementId:`relation_circle_${C.value}`,fileName:A.value.title.text||`vue-ui-relation-circle`,options:D.value.userOptions.print}),kt=c(()=>D.value.userOptions.show&&!A.value.title.text),At=c(()=>se(D.value.customPalette)),I=_([]),L=_([]),R=_({}),z=_([]),jt=_(0),B=c(()=>St.value.slice(0,A.value.limit).map(e=>{let t=Array.isArray(e.relations)?e.relations:[];return{...e,weights:Array.isArray(e.weights)?e.weights:Array(t.length).fill(1),relations:t}}));Be(B,()=>{I.value=[],L.value=[],Bt(),Ht()});let V=_(A.value.size),H=_(k.value.size),U=_(A.value.plot.radius),W=_(A.value.labels.fontSize),G=_({height:A.value.size,width:A.value.size}),K=c({get(){return V.value*A.value.circle.radiusProportion},set(e){return e}}),Mt=c(()=>A.value.links.curved),Nt=c(()=>`${A.value.animation.speedMs}ms`),Pt=c(()=>K.value*2),Ft=c(()=>K.value*4),q=Le(null),J=Le(null);Ie(()=>{Lt(),document.getElementById(`relation_circle_${C.value}`).addEventListener(`click`,zt)});let It=c(()=>D.value.debug);function Lt(){if(le(S.dataset)?(ne({componentName:`VueUiRelationCircle`,type:`dataset`,debug:It.value}),Ct.value=!0):It.value&&S.dataset.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`id`,`label`,`relations`,`weights`]}).forEach(e=>{ne({componentName:`VueUiRelationCircle`,type:`datasetSerieAttribute`,property:e,index:t})})}),le(S.dataset)||(Ct.value=D.value.loading),D.value.responsive){let e=Se(()=>{let{width:e,height:t}=Ce({chart:w.value,title:A.value.title.text?gt.value:null,source:_t.value,noTitle:vt.value});requestAnimationFrame(()=>{V.value=Math.min(e,t),G.value.width=Math.max(.1,e),G.value.height=Math.max(.1,t-12),K.value=V.value*A.value.circle.radiusProportion,I.value=[],L.value=[],Bt(),Ht(),Rt(),D.value.responsiveProportionalSizing?(H.value=ae({relator:V.value,adjuster:A.value.size,source:k.value.size,threshold:6,fallback:6}),U.value=ae({relator:V.value,adjuster:A.value.size,source:A.value.plot.radius,threshold:1,fallback:1}),W.value=ae({relator:V.value,adjuster:A.value.size,source:A.value.labels.fontSize,threshold:6,fallback:6})):(H.value=k.value.size,U.value=A.value.plot.radius,W.value=A.value.labels.fontSize)})});q.value&&(J.value&&q.value.unobserve(J.value),q.value.disconnect()),q.value=new ResizeObserver(e),J.value=w.value.parentNode,q.value.observe(J.value)}else I.value=[],L.value=[],Bt(),Ht();Rt()}Fe(()=>{document.getElementById(`relation_circle_${C.value}`)?.removeEventListener(`click`,zt),q.value&&(J.value&&q.value.unobserve(J.value),q.value.disconnect())});let{autoSizeLabels:Rt}=De({svgRef:N,fontSize:A.value.labels.fontSize,minFontSize:A.value.labels.minFontSize,sizeRef:W,labelClass:`.vue-ui-relation-circle-legend`});function zt(e){let t=e.target;t&&Array.from(t.classList).includes(`vue-ui-user-options`)||t&&Array.from(t.classList).includes(`vue-ui-user-options-summary`)||t&&Array.from(t.classList).includes(`vue-data-ui-button`)||t&&Array.from(t.classList).includes(`vue-ui-relation-circle-legend`)||(R.value={},z.value=[])}function Bt(){let e=6.28319/B.value.length,t=360/B.value.length,n=0,r=0;B.value.forEach((i,a)=>{let te=i.weights.reduce((e,t)=>e+t,0),ne=K.value*Math.cos(n)+G.value.width/2,o=K.value*Math.sin(n)+G.value.height/2+A.value.circle.offsetY;I.value.push({x:ne,y:o,...i,color:i.color?i.color:At.value[a]?At.value[a]:ee[a],regAngle:r,totalWeight:te}),n+=e,r+=t})}function Vt(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function Ht(){L.value=[],I.value.forEach(e=>{I.value.filter(t=>t.relations.includes(e.id)).forEach((t,n)=>{let r=t.relations.indexOf(e.id);L.value.push({weight:t.weights[r]?t.weights[r]:0,relationId:`${e.id}_${t.id}`,x1:e.x,y1:e.y,x2:t.x,y2:t.y,colorSource:e.color,colorTarget:t.color,midPointLine:Vt({x:e.x,y:e.y},{x:t.x,y:t.y}),midPointBezier:Ut({x1:e.x,x2:t.x,y1:e.y,y2:t.y}),...e})})})}function Ut(e){let t={x:e.x1,y:e.y1},n={x:e.x2,y:e.y2},r={x:e.x1,y:e.y1},i={x:G.value.width/2,y:G.value.height/2+A.value.circle.offsetY},a=.5;return{x:.5**3*t.x+3*.5**2*a*r.x+1.5*a**2*i.x+a**3*n.x,y:.5**3*t.y+3*.5**2*a*r.y+1.5*a**2*i.y+a**3*n.y}}let Wt=c(()=>Math.max(...L.value.map(e=>e.weight)));function Gt(e){return Object.hasOwn(R.value,`x`)?z.value.includes(e.id)?`opacity:1`:`opacity:0.1`:`opacity:1`}function Y(e){return e.colorSource}function Kt(e){return Object.hasOwn(R.value,`x`)?z.value.includes(e.id)&&e.relationId===`${e.id}_${R.value.id}`||e.relationId===`${R.value.id}_${e.id}`?`opacity:1;stroke-width:${tn(e)}`:`opacity: 0`:`opacity: 1`}function X(e){return Object.hasOwn(R.value,`x`)?!!(z.value.includes(e.id)&&e.relationId===`${e.id}_${R.value.id}`||e.relationId===`${R.value.id}_${e.id}`):!1}function qt(e){return e.regAngle>90&&e.regAngle<270?`end`:`start`}function Jt(e){return e.regAngle>90&&e.regAngle<270?e.x-5:e.x+5}function Yt(e){return Object.hasOwn(R.value,`x`)?R.value.id===e.id||z.value.includes(e.id)?`opacity:1`:`opacity:0.2`:`opacity:1`}function Xt(e){return e.regAngle>90&&e.regAngle<270?`rotate(${e.regAngle+180},${e.x},${e.y})`:`rotate(${e.regAngle},${e.x},${e.y})`}let Z=_(null);function Zt(e,t){Z.value=t,T.value=t,D.value.events.datapointEnter&&D.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Qt(e,t){Z.value=null,E.value||(T.value=null),D.value.events.datapointLeave&&D.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function $t(e,t){e&&(D.value.events.datapointClick&&D.value.events.datapointClick({datapoint:e,seriesIndex:t}),jt.value=360-e.regAngle,R.value.id&&e.id===R.value.id?(R.value={},z.value=[]):(R.value=e,z.value=[...e.relations]))}function en(e,t){T.value=t,$t(e,t)}function tn(e){let t=e.weight/Wt.value*A.value.links.maxWidth;return Math.max(.3,t)}let Q=_(!1);function nn(e){Q.value=e,ht.value+=1}let $=_(!1);function rn(){$.value=!$.value}async function an({scale:e=2}={}){if(!w.value)return;let{width:t,height:n}=w.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await ge({domElement:w.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:A.value.title.text,width:t,height:n,aspectRatio:r}}let on=c(()=>A.value.backgroundColor),sn=c(()=>A.value.title),{isCallbackImaging:cn,isCallbackSvg:ln,generateSvg:un,onGenerateImage:dn}=ve({svg:N,title:sn,legend:null,legendItems:null,backgroundColor:on,getSvgCallback:()=>D.value.userOptions.callbacks.svg,generateImage:Ot});async function fn(){pt(`copyAlt`,{config:D.value,dataset:B.value}),D.value.userOptions.callbacks.altCopy?await Promise.resolve(D.value.userOptions.callbacks.altCopy({config:D.value,dataset:B.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function pn(){E.value=!0,I.value.length&&T.value===null&&(T.value=0)}function mn(){E.value=!1,T.value=null}function hn(e){if(!N.value||$.value||document.activeElement!==N.value||!I.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){T.value=null,R.value={},z.value=[];return}if(r){if(T.value===null)return;let e=I.value[T.value];if(!e)return;$t(e,T.value);return}let a=T.value;a===null||a<0||a>=I.value.length?a=n?0:I.value.length-1:n?(a+=1,a>=I.value.length&&(a=0)):t&&(--a,a<0&&(a=I.value.length-1)),T.value=a,Z.value=a;let ee=I.value[a];ee&&D.value.events.datapointEnter&&D.value.events.datapointEnter({datapoint:ee,seriesIndex:a})}let gn=c(()=>({headers:[`ID`,`Label`,`Total weight`,`Relations count`,`Relations`],rows:B.value.map(e=>{let t=e.relations.map(e=>B.value.find(t=>t.id===e)?.label||e).join(`, `),n=(e.weights||[]).reduce((e,t)=>e+Number(t||0),0);return[e.id,e.label,n,e.relations.length,t]})}));return me({getImage:an,generatePdf:Dt,generateSvg:un,generateImage:Ot,toggleAnnotator:rn,toggleFullscreen:nn,copyAlt:fn}),(e,i)=>(g(),d(`div`,{ref_key:`relationCircleChart`,ref:w,class:`vue-data-ui-component vue-ui-relation-circle`,style:h(`width:100%;background:${A.value.backgroundColor};text-align:center;${D.value.responsive?`height: 100%`:``}`),id:`relation_circle_${C.value}`,onMouseenter:i[0]||=()=>x(wt)(!0),onMouseleave:i[1]||=()=>x(wt)(!1)},[f(`div`,{id:`chart-instructions-${C.value}`,class:`sr-only`},[f(`p`,null,b(D.value.a11y.translations.keyboardNavigation),1)],8,We),gn.value?.rows?.length?(g(),l(we,{key:0,uid:C.value,head:gn.value.headers,body:gn.value.rows,notice:D.value.a11y.translations.tableAvailable,caption:D.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):u(``,!0),O.value.buttons.annotator?(g(),l(x(lt),Ne({key:1},x(n)(O.value.annotator),{svgRef:x(N),backgroundColor:A.value.backgroundColor,color:A.value.color,active:$.value,isCursorPointer:j.value,palette:O.value.annotatorPalette,onClose:rn}),ke({_:2},[v(x(r),n=>({name:n,fn:Ve(r=>[y(e.$slots,n,m(p(x(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):u(``,!0),kt.value?(g(),d(`div`,{key:2,ref_key:`noTitle`,ref:vt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):u(``,!0),A.value.title.text?(g(),d(`div`,{key:3,ref_key:`chartTitle`,ref:gt,style:`width:100%;background:transparent`},[(g(),l(_e,{key:`title_${yt.value}`,config:{title:{cy:`relation-div-title`,...A.value.title},subtitle:{cy:`relation-div-subtitle`,...A.value.title.subtitle}}},null,8,[`config`]))],512)):u(``,!0),O.value.show&&mt.value&&(x(Tt)||x(M))?(g(),l(x(ut),{ref:`details`,key:`user_options_${ht.value}`,backgroundColor:A.value.backgroundColor,color:A.value.color,isPrinting:x(P),isImaging:x(F),uid:C.value,hasPdf:O.value.buttons.pdf,hasImg:O.value.buttons.img,hasSvg:O.value.buttons.svg,hasFullscreen:O.value.buttons.fullscreen,hasAltCopy:O.value.buttons.altCopy,hasXls:!1,isFullscreen:Q.value,titles:{...O.value.buttonTitles},chartElement:w.value,position:O.value.position,hasAnnotator:O.value.buttons.annotator,isAnnotation:$.value,callbacks:O.value.callbacks,printScale:O.value.print.scale,isCursorPointer:j.value,onToggleFullscreen:nn,onGeneratePdf:x(Dt),onGenerateImage:x(dn),onGenerateSvg:x(un),onToggleAnnotator:rn,onCopyAlt:fn,style:h({visibility:x(Tt)?x(M)?`visible`:`hidden`:`visible`})},ke({_:2},[v(x(ye)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ve(n=>[y(e.$slots,t,m(p(x(be)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`position`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):u(``,!0),f(`div`,Ge,[(g(),d(`svg`,{ref_key:`svgRef`,ref:N,xmlns:x(oe),class:Pe([{"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value},`relation-circle`]),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${G.value.height<=0?10:G.value.height}`,width:`100%`,style:`user-select:none; background:transparent`,"aria-describedby":`chart-instructions-${C.value}`,tabindex:`0`,onFocus:pn,onBlur:mn,onKeydown:hn},[je(x(dt)),y(e.$slots,`svg-underlayer`,{svg:{...G.value,isPrintingImg:x(P)||x(F)||x(cn),isPrintingSvg:x(ln)}},void 0,!0),e.$slots[`chart-background`]?(g(),d(`foreignObject`,{key:0,x:0,y:0,width:G.value.width<=0?10:G.value.width,height:G.value.height<=0?10:G.value.height,style:{pointerEvents:`none`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,qe)):u(``,!0),f(`circle`,{cx:(G.value.width<=0?1e-4:G.value.width)/2,cy:(G.value.height<=0?1e-4:G.value.height)/2+A.value.circle.offsetY,r:K.value<=0?1e-4:K.value,stroke:A.value.circle.stroke,"stroke-width":A.value.circle.strokeWidth,fill:`transparent`,class:`main-circle`},null,8,Je),Mt.value?(g(),d(`g`,Ye,[(g(!0),d(s,null,v(L.value,(e,t)=>(g(),d(`path`,{key:`relation_${t}`,style:h(Kt(e)),stroke:Y(e),class:Pe([`relation`,{"vue-ui-relation-circle-selected":R.value.hasOwnProperty(`id`)&&z.value.includes(e.id)}]),d:`M${e.x1},${e.y1} C${e.x1},${e.y1} ${G.value.width/2},${G.value.height/2+A.value.circle.offsetY} ${e.x2},${e.y2}`,fill:`none`,"stroke-width":tn(e),"stroke-linecap":`round`},null,14,Xe))),128)),(g(!0),d(s,null,v(L.value,(t,n)=>(g(),d(`g`,Ze,[X(t)?y(e.$slots,`dataLabel`,Ne({ref_for:!0},{x:t.midPointBezier.x,y:t.midPointBezier.y,color:Y(t),weight:t.weight,fontSize:H.value}),void 0,!0,0):u(``,!0),X(t)&&!e.$slots.dataLabel?(g(),d(`circle`,{key:1,cx:t.midPointBezier.x,cy:t.midPointBezier.y,fill:Y(t),r:H.value,stroke:A.value.backgroundColor,"stroke-width":`1`},null,8,Qe)):u(``,!0),X(t)&&!e.$slots.dataLabel?(g(),d(`text`,{key:2,x:t.midPointBezier.x,y:t.midPointBezier.y+H.value/3,fill:x(ie)(Y(t)),"text-anchor":`middle`,"font-size":H.value},b(x(o)(k.value.formatter,t.weight,x(a)({p:k.value.prefix,v:t.weight,s:k.value.suffix,r:k.value.rounding}),{...t})),9,$e)):u(``,!0)]))),256))])):(g(),d(`g`,et,[(g(!0),d(s,null,v(L.value,(e,t)=>(g(),d(`line`,{key:`relation_${t}`,stroke:Y(e),"stroke-width":tn(e),style:h(Kt(e)),x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2,class:Pe({"vue-ui-relation-circle-selected":R.value.hasOwnProperty(`id`)&&z.value.includes(e.id)}),"stroke-linecap":`round`},null,14,tt))),128)),(g(!0),d(s,null,v(L.value,(t,n)=>(g(),d(`g`,nt,[X(t)?y(e.$slots,`dataLabel`,Ne({ref_for:!0},{x:t.midPointLine.x,y:t.midPointLine.y,color:Y(t),weight:t.weight,fontSize:H.value}),void 0,!0,0):u(``,!0),X(t)&&!e.$slots.dataLabel&&k.value.show?(g(),d(`circle`,{key:1,cx:t.midPointLine.x,cy:t.midPointLine.y,fill:Y(t),r:H.value,stroke:A.value.backgroundColor,"stroke-width":`1`},null,8,rt)):u(``,!0),X(t)&&!e.$slots.dataLabel&&k.value.show?(g(),d(`text`,{key:2,x:t.midPointLine.x,y:t.midPointLine.y+H.value/3,fill:x(ie)(Y(t)),"text-anchor":`middle`,"font-size":H.value},b(x(o)(k.value.formatter,t.weight,x(a)({p:k.value.prefix,v:t.weight,s:k.value.suffix,r:k.value.rounding}),{...t})),9,it)):u(``,!0)]))),256))])),(g(!0),d(s,null,v(I.value,(e,t)=>(g(),d(`text`,{key:`plot_text_${t}`,"text-anchor":qt(e),transform:Xt(e),x:Jt(e),y:e.y+5,class:`vue-ui-relation-circle-legend`,"transform-origin":`start`,"font-weight":R.value.id===e.id?`900`:`400`,style:h(`font-family:${A.value.fontFamily};${Yt(e)};cursor:${j.value?`pointer`:`default`}`),"font-size":W.value,fill:A.value.labels.color,"text-decoration":t===Z.value||t===T.value?`underline`:void 0,onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},[x(xt)?(g(),d(s,{key:0},[Ae(`--------`)],64)):(g(),d(s,{key:1},[Ae(b(e.label)+` (`+b(x(o)(k.value.formatter,e.totalWeight,x(a)({p:k.value.prefix,v:e.totalWeight,s:k.value.suffix,r:k.value.rounding}),{...e}))+`) `,1)],64))],44,at))),128)),(g(!0),d(s,null,v(I.value,(e,t)=>(g(),d(`circle`,{cx:e.x,cy:e.y,key:`plot_${t}`,style:h(`${Gt(e)}; transition: r 0.2s ease-in-out; cursor:${j.value?`pointer`:`default`}`),class:`vue-ui-relation-circle-plot`,fill:A.value.plot.useSerieColor?e.color:A.value.plot.color,stroke:A.value.backgroundColor,"stroke-width":`1`,r:U.value*(t===Z.value||t===T.value?2:1),onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},null,44,ot))),128)),y(e.$slots,`svg`,{svg:{...G.value,isPrintingImg:x(P)||x(F)||x(cn),isPrintingSvg:x(ln)}},void 0,!0)],42,Ke)),e.$slots.hint?(g(),d(`div`,st,[y(e.$slots,`hint`,m(p({hint:D.value.a11y.translations.keyboardNavigation,isVisible:E.value})),void 0,!0)])):u(``,!0)]),e.$slots.watermark?(g(),d(`div`,ct,[y(e.$slots,`watermark`,m(p({isPrinting:x(P)||x(F)||x(cn)||x(ln)})),void 0,!0)])):u(``,!0),e.$slots.source?(g(),d(`div`,{key:6,ref_key:`source`,ref:_t,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),y(e.$slots,`skeleton`,{},()=>[x(xt)?(g(),l(de,{key:0})):u(``,!0)],!0)],44,Ue))}},[[`__scopeId`,`data-v-28e8ae2b`]]);export{He as n,lt as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
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,Ht as s,J as c,N as ee,P as te,S as ne,U as re,X as ie,Xt as ae,at as oe,i as l,in as se,nt as ce,r as le,t as ue,tt as de,w as fe,xt as pe,yt as me,zt as he}from"./lib-rPeBMZrn.js";import{n as ge,t as _e}from"./BaseScanner-8NdoBs7B.js";import{n as ve,t as ye}from"./useHints-C-TwxM0Y.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as xe}from"./resolveChartConfig-CIhClE5R.js";import{t as Se}from"./chartImage-DPGnEuYM.js";import{n as Ce}from"./Title-BliHuXfT.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{n as Te,t as Ee}from"./tableIntegration-CNoJ1CIY.js";import{n as De,t as Oe}from"./userOptionsSlots-DYuo-E5m.js";import{t as ke}from"./useTimeLabels-Das5O74F.js";import{t as Ae}from"./usePrinter-DVf3YcG5.js";import{t as je}from"./useTimeLabelCollider-BTybMUFi.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_ridgeline-Di26JtQu.js";import{Fragment as u,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 Ge,mergeProps as Ke,nextTick as qe,normalizeClass as Je,normalizeProps as Ye,normalizeStyle as _,onBeforeUnmount as Xe,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as Ze,shallowRef as Qe,toDisplayString as S,toRefs as $e,unref as C,watch as et,watchEffect as tt,withCtx as w}from"vue";var nt=/* @__PURE__ */ e({default:()=>Tt}),rt=[`id`],it=[`id`],at={style:{position:`relative`}},ot=[`xmlns`,`aria-describedby`,`viewBox`],st={key:0},ct=[`fill`,`d`],lt=[`stroke`,`stroke-width`,`d`],ut=[`fill`,`d`],dt=[`stroke`,`stroke-dasharray`,`stroke-width`,`d`],ft=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],pt=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],mt=[`x`,`y`,`font-size`,`font-weight`,`fill`,`text-decoration`,`onMouseenter`,`onClick`],ht={key:0},gt=[`font-size`,`fill`,`stroke`,`font-weight`,`transform`,`text-anchor`],_t=[`font-size`,`fill`,`font-weight`,`transform`,`text-anchor`,`innerHTML`],vt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],yt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],bt=[`cx`,`cy`,`stroke`,`stroke-width`,`r`,`fill`],xt=[`x`,`y`,`stroke`,`text-anchor`,`font-size`,`fill`],St={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ct={key:5,class:`vue-data-ui-watermark`},wt=[`onClick`],Tt=/*#__PURE__*/ be({__name:`vue-ui-ridgeline`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`selectX`,`copyAlt`],setup(e,{expose:be,emit:nt}){let Tt=g(()=>import(`./vue-ui-xy-CMckdUft.js`).then(e=>e.n)),Et=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Dt=g(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Ot=g(()=>import(`./DataTable-Dof6yhO7.js`)),kt=g(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),At=g(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),jt=g(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),Mt=g(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_ridgeline:Nt}=i(),T=e,Pt=d({get(){return Array.isArray(B.value)&&B.value.length>0},set(e){return e}}),Ft=nt,E=y(null),It=y(null),Lt=y(null),D=Qe(null),O=Qe(null),Rt=y(null),zt=y(null),Bt=y(0),Vt=y(0),Ht=y(0),k=y(ie()),Ut=y(0),Wt=y(0),Gt=y(512),A=y(null),Kt=y(null),qt=y(null),Jt=y(0),Yt=y(null),Xt=y(null),Zt=y(null),j=y(null),Qt=y(!1);function $t(){return xe(T.config,Nt,Ve)}let M=y($t()),N=d(()=>M.value.userOptions),P=d(()=>M.value.style.chart.areas),F=d(()=>M.value.style.chart.selector),I=d(()=>M.value.style.chart.xAxis.labels),L=d(()=>M.value.style.chart.yAxis.labels),R=d(()=>M.value.style.chart);ve({config:()=>M.value,dataset:()=>T.dataset,component:`VueUiRidgeline`,rules:[ye.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display`,``,`▶️ Use several instances of the component to show related series`]},{test:e=>e.some(e=>e.datapoints.some(e=>e.values.length>200)),message:[`👀 Some series contain > 200 data points, which can affect performance. Consider if you really need this level of detail.`,``,`▶️ Use larger time scales, or aggregated values.`,``,`▶️ Filter the time range by adding date inputs in your UI.`]},{test:e=>e.length<6&&e.length>0,message:[`👀 The number of series < 6. Consider:`,``,`▶️ Using VueUiXy instead`]}]});let z=d(()=>M.value.userOptions.useCursorPointer),en=d(()=>se({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,areas:{maxPoint:{show:!1},opacity:.9,stroke:{useSerieColor:!0}},legend:{backgroundColor:`transparent`},padding:{right:-24,left:0},xAxis:{labels:{values:[]}},yAxis:{labels:{fontSize:0}},zeroLine:{show:!1}}}},userConfig:M.value.skeletonConfig??{}})),{loading:tn,FINAL_DATASET:B,manualLoading:nn}=ge({...$e(T),FINAL_CONFIG:M,prepareConfig:$t,skeletonDataset:T.config?.skeletonDataset??[{name:`_`,datapoints:[{name:`__`,color:`#999999`,values:[28.639,32.04,41.134,44.525,21.151,2.436,.218,.024,.002,0,0,0]},{name:`_`,color:`#CACACA`,values:[13.253,15.621,23.36,33.698,29.935,10.874,2.364,.561,.107,.02,.006,.004]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[10.851,13.195,21.617,36.556,42.292,21.006,3.398,.223,.013,.001,0,0]},{name:`_`,color:`#CACACA`,values:[3.171,4.115,8.108,18.248,31.641,29.063,12.031,2.742,.504,.102,.032,.021]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[1.731,2.334,5.125,13.626,29.911,38.524,24.168,7.646,1.575,.317,.097,.063]},{name:`_`,color:`#CACACA`,values:[.25,.367,1.026,3.944,13.635,28.891,30.149,15.419,4.714,1.246,.442,.299]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[.034,.054,.194,1.065,5.747,20.735,38.306,32.899,15.318,5.566,2.422,1.76]},{name:`_`,color:`#CACACA`,values:[.001,.002,.009,.095,1.124,8.342,27.115,35.08,21.449,9.093,4.243,3.143]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,.001,.004,.051,.567,3.322,14.215,44.783,40.351,20.377,9.866,7.378]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,.001,.11,4.136,27.498,43.24,29.807,17.345,13.678]}]},{name:`_`,datapoints:[{name:`_`,color:`#999999`,values:[0,0,0,0,.025,.598,3.886,10.645,54.479,45.953,30.814,24.55]},{name:`_`,color:`#CACACA`,values:[0,0,0,0,0,0,.007,1.655,26.63,52.017,45.192,39.651]}]}],skeletonConfig:se({defaultConfig:M.value,userConfig:en.value})}),V=y(Math.min(P.value.height,P.value.rowHeight)),{userOptionsVisible:rn,setUserOptionsVisibility:an,keepUserOptionState:on}=Re({config:M.value}),{svgRef:H}=ze({config:R.value.title}),sn=d(()=>M.value.debug);function cn(){let e=B.value||[];if(!Array.isArray(e)||e.length===0)oe({componentName:`VueUiRidgeline`,type:`dataset`,debug:sn.value}),nn.value=!0;else if(e.forEach((e,t)=>{me({datasetObject:e,requiredAttributes:[`name`,`datapoints`]}).forEach(e=>{Pt.value=!1,oe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:e,index:t,debug:sn.value})}),Array.isArray(e.datapoints)&&e.datapoints.length&&e.datapoints.forEach((e,n)=>{me({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{Pt.value=!1,oe({componentName:`VueUiRidgeline`,type:`datasetSerieAttribute`,property:`datapoint.${e}`,index:`${t}-${n}`,debug:sn.value})})})}),Wt.value=e.length,V.value=Math.min(P.value.height,P.value.rowHeight),he(T.dataset)||(nn.value=M.value.loading),M.value.responsive){let t=Ne(()=>{let{width:t,height:n}=Pe({chart:E.value,title:R.value.title.text?It.value:null,legend:R.value.legend.show?Lt.value:null,source:Rt.value,noTitle:zt.value,padding:R.value.padding});requestAnimationFrame(()=>{Gt.value=t,V.value=e.length?n/e.length:0,Jt.value=n-12})});D.value&&(O.value&&D.value.unobserve(O.value),D.value.disconnect()),D.value=new ResizeObserver(t),O.value=E.value?.parentNode||null,O.value&&D.value.observe(O.value)}}Xe(()=>{D.value&&(O.value&&D.value.unobserve(O.value),D.value.disconnect())});let{isPrinting:ln,isImaging:un,generatePdf:dn,generateImage:fn}=Ae({elementId:`vue-ui-ridgeline_${k.value}`,fileName:R.value.title.text||`vue-ui-ridgeline`,options:M.value.userOptions.print}),pn=d(()=>M.value.userOptions.show&&!R.value.title.text),mn=d(()=>fe(M.value.customPalette)),U=y({showTable:M.value.table.show});et(()=>B.value,async e=>{Array.isArray(e)&&e.length&&(rn.value=!M.value.userOptions.showOnChartHover,await qe(),cn(),Bt.value+=1,Ht.value+=1,U.value.showTable=M.value.table.show)},{deep:!0,immediate:!0}),et(()=>T.dataset,e=>{Array.isArray(e)&&e.length>0&&(nn.value=!1)},{deep:!0}),et(()=>tn.value,async e=>{e||(await qe(),cn())},{immediate:!0}),et(()=>T.config,()=>{M.value=$t(B.value||null),rn.value=!M.value.userOptions.showOnChartHover,V.value=Math.min(P.value.height,P.value.rowHeight),U.value.showTable=M.value.table.show,Bt.value+=1,Ht.value+=1},{deep:!0});let hn=d(()=>P.value.height/P.value.rowHeight);function gn(){X.value.length?X.value=[]:Z.value.forEach(e=>{X.value.push(e.id)}),Ft(`selectLegend`,Y.value)}function _n(e){X.value.includes(e)?X.value=X.value.filter(t=>t!==e):X.value.push(e),Ft(`selectLegend`,Y.value)}function vn(e){return Z.value.length?Z.value.find(t=>t.name===e)||(sn.value&&console.warn(`VueUiRidgeline - Series name not found "${e}"`),null):(sn.value&&console.warn(`VueUiRidgeline - There are no series to show.`),null)}function yn(e){let t=vn(e);t!==null&&X.value.includes(t.id)&&_n(t.id)}function bn(e){let t=vn(e);t!==null&&(X.value.includes(t.id)||_n(t.id))}let W=d(()=>Pt.value?(B.value||[]).map(e=>({...e,labelLen:Pn(e.name,L.value.fontSize),uid:ie(),datapoints:e.datapoints.map((e,t)=>{let n=e.color?ne(e.color):mn.value[t]||s[t]||s[t%s.length],r=ae(e.name);return{...e,color:n,id:r}})})):[]),xn=d(()=>R.value.padding.top+V.value*(B.value||[]).length+V.value*hn.value+R.value.padding.bottom),G=d(()=>{let e=R.value.padding;return{width:Gt.value,height:xn.value,padding:e}}),Sn=d(()=>G.value.width),Cn=d(()=>G.value.height),wn=y(0),Tn=Ne(e=>{wn.value=e},100);tt(e=>{let t=Yt.value;if(!t)return;let n=new ResizeObserver(e=>{Tn(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())}),Xe(()=>{wn.value=0});let K=d(()=>({fullHeight:G.value.height+wn.value,top:G.value.padding.top,left:G.value.padding.left,right:G.value.width-G.value.padding.right,bottom:G.value.height-R.value.padding.bottom,width:G.value.width-(G.value.padding.left+G.value.padding.right)})),En=d(()=>Math.max(...W.value.flatMap(e=>e.datapoints.map(e=>e.values.length)))),q=y([]),Dn=0;tt(()=>{let e=++Dn;(async()=>{let t=await ke({values:I.value.values,maxDatapoints:En.value,formatter:I.value.datetimeFormatter,start:0,end:I.value.values.length});e===Dn&&(q.value=t)})()});let J=d(()=>{let e=Math.max(...W.value.map(e=>e.labelLen)),t=G.value.padding.left+e+16+L.value.offsetX,n=(K.value.width-t)/En.value,r=[];for(let e=0;e<En.value;e+=1)r.push({selectorX:t+n*e,x:t+n*e-n/2,y:K.value.top,label:I.value.values[e]?q.value[e]?.text??``:``,index:e,width:n,height:xn.value});return r});function On(e){return W.value.map(t=>t.datapoints.map(t=>({dp:t,selected:t.values[e.index]})))}function kn(e){A.value=e;let t=On(e);M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:t,seriesIndex:e.index})}function An(e){A.value=null;let t=On(e);M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:t,seriesIndex:e.index})}function jn(e){let t=On(e);M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t,seriesIndex:e.index}),Ft(`selectX`,t)}function Mn(e,t){return e.length*t/2+t}function Nn(e,t,n){return e+Mn(t,n)>K.value.right}function Pn(e,t,n=`sans-serif`){let r=document.createElement(`canvas`).getContext(`2d`);return r.font=`${typeof t==`number`?`${t}px`:t} ${n}`,r.measureText(e).width}let Y=d(()=>{V.value;let e=Math.max(...W.value.map(e=>e.labelLen)),t=Math.max(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),n=Math.min(...W.value.flatMap(e=>e.datapoints.flatMap(e=>e.values))),r=G.value.padding.left+e+16+L.value.offsetX,i=(K.value.width-r)/En.value,a=Math.abs(Math.min(n,0)),o=t+a;function s(e){return isNaN(e/o)?0:e/o}return W.value.map((e,t)=>{let n=V.value*hn.value*(1-s(a)),o=K.value.top+V.value*t,c=K.value.top+o+n;return{...e,label:{x:r-L.value.fontSize,y:(L.value.centered?c-n/2:c)+L.value.offsetY},datapoints:e.datapoints.map(e=>{let t=e.values.map((t,n)=>{let ee=isNaN(t)||[void 0,null,`NaN`,NaN,1/0,-1/0].includes(t)?0:t||0;return{x:r+i*n,y:K.value.top+o+V.value*hn.value*(1-s(ee+a)),value:t,isMaxPoint:t===Math.max(...e.values),zero:c}}),n=`${ee(t,c,!1,!1)}`,ne=`M ${r},${c} ${re(t)} ${t.at(-1).x},${c}`,ae=`M ${r},${c} ${t.at(-1).x},${c}`,oe=`M ${te(t)}`,l=`M ${re(t)}`,se=pe(P.value.smooth?oe:l);return{...e,uid:ie(),plots:t,smoothPath:n,straightPath:ne,zeroPath:ae,pathLength:se,smoothPathRidge:oe,straightPathRidge:l}}).filter(e=>!X.value.includes(e.id))}})}),X=y([]);function Fn(e){let t=/* @__PURE__ */ new Map;return e.forEach(e=>{e.datapoints.forEach((e,n)=>{let r=ae(e.name);t.has(r)||t.set(r,{id:r,name:e.name,color:e.color,shape:`circle`,segregate:()=>_n(r),isSegregated:X.value.includes(r),opacity:X.value.includes(r)?.5:1})})}),Array.from(t.values())}let Z=d(()=>Fn(W.value)),In=d(()=>({cy:`donut-div-legend`,backgroundColor:R.value.legend.backgroundColor,color:R.value.legend.color,fontSize:R.value.legend.fontSize,paddingBottom:12,fontWeight:R.value.legend.bold?`bold`:``})),Q=y(!1);function Ln(e){Q.value=e,Ut.value+=1}let Rn=y({}),zn=y([]);function Bn(e){Ft(`selectDatapoint`,e),R.value.dialog.show&&(zn.value=e.datapoints.map(e=>({name:e.name,color:e.color,type:`line`,useArea:!0,smooth:P.value.smooth,series:e.values})),Kt.value=e,Rn.value=de({...R.value.dialog.xyChart,responsive:!0,chart:{...R.value.dialog.xyChart.chart,grid:{...R.value.dialog.xyChart.chart.grid,labels:{...R.value.dialog.xyChart.chart.grid.labels,xAxisLabels:{...R.value.dialog.xyChart.chart.grid.labels.xAxisLabels,values:I.value.values,autoRotate:{enable:!0,angle:R.value.dialog.xyChart.chart.grid.labels.xAxisLabels.autoRotate.angle},datetimeFormatter:I.value.datetimeFormatter}}},tooltip:{...R.value.dialog.xyChart.chart.tooltip,showTimeLabel:I.value.values.length>0},userOptions:{...R.value.dialog.xyChart.chart.userOptions,buttons:{...R.value.dialog.xyChart.chart.userOptions.buttons,altCopy:M.value.userOptions.buttons.altCopy},callbacks:{...R.value.dialog.xyChart.chart.userOptions.callbacks,altCopy:()=>{}},useCursorPointer:M.value.userOptions.useCursorPointer}}}),qt.value&&qt.value.open())}let Vn=y(null);function Hn(e){Vn.value=e}function Un(){Vn.value=null}let Wn=y(!1);function Gn(){Wn.value=!Wn.value}function Kn(){U.value.showTable=!U.value.showTable}let qn=d(()=>({body:Y.value.flatMap(e=>e.datapoints.flatMap(t=>({...t,rowName:`${e.name}: ${t.name}`}))).map(e=>[{name:e.rowName,color:e.color},...e.values])})),$=d(()=>{let e=[M.value.table.columnNames.series,...q.value.map(e=>e.text)],t={th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint};return{colNames:[M.value.table.columnNames.series,...q.value.map(e=>e.text)],head:e,body:qn.value.body,config:t}});function Jn(e=null){qe(()=>{let t=[[M.value.table.columnNames.series,...q.map(e=>[e.text])],...qn.value.body.map((e,t)=>[e[0].name,...e.slice(1)])],n=[[R.value.title.text],[R.value.title.subtitle.text]].concat(t),r=o(n);e?e(r):ce({csvContent:r,title:R.value.title.text||`vue-ui-ridgeline`})})}function Yn(){return Y.value}let Xn=Se(E,()=>R.value.title.text),Zn=d(()=>({min:0,max:En.value}));je({timeLabelsEls:Yt,timeLabels:q,slicer:Zn,configRef:M,rotationPath:[`style`,`chart`,`xAxis`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`xAxis`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:Sn,height:Cn,targetClass:`.vue-ui-ridgeline-x-axis-label`,angle:I.value.autoRotate.angle});let Qn=d(()=>Ee({config:M,style:R,mutableConfig:U,dialog:Mt,accordion:Dt,isFullscreen:Q,parent:E,maxWidth:800,isCursorPointer:z}));et(()=>U.value.showTable,e=>Te(e,M,Xt));function $n(){U.value.showTable=!1,Zt.value&&Zt.value.setTableIconState(!1)}let er=d(()=>R.value.backgroundColor),tr=d(()=>({...R.value.legend,position:`bottom`})),nr=d(()=>R.value.title),{isCallbackImaging:rr,isCallbackSvg:ir,generateSvg:ar,onGenerateImage:or}=we({svg:H,title:nr,legend:tr,legendItems:Z,backgroundColor:er,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:fn});function sr(e){cr(`xy-zoom`,e.dataset,e.config)}async function cr(e=`main-chart`,t=null,n=null){Ft(`copyAlt`,{source:e,config:e===`main-chart`?M.value:Rn.value,dataset:e===`main-chart`?Y.value:zn.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({source:e,config:e===`main-chart`?M.value:Rn.value,dataset:e===`main-chart`?Y.value:zn.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function lr(){j.value=null,Qt.value=!0}function ur(){mr(),Qt.value=!1}function dr(e){if(!H.value||Wn.value||document.activeElement!==H.value||!Y.value.length)return;let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,i=e.key===`ArrowRight`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){mr();return}if(a){if(j.value!==null){let e=Y.value[j.value];e&&Bn(e);return}A.value&&jn(A.value);return}if(t||n){let e=j.value;e=e===null?n?0:Y.value.length-1:fr(e+(n?1:-1)),j.value=e,Vn.value=e;return}if(!J.value.length)return;let s=A.value?.index??null;s=s===null?i?0:J.value.length-1:pr(s+(i?1:-1));let c=J.value[s];c&&kn(c)}function fr(e){let t=Y.value.length;return t?(e%t+t)%t:null}function pr(e){let t=J.value.length;return t?(e%t+t)%t:null}function mr(){j.value=null,Vn.value=null,A.value?An(A.value):A.value=null}let hr=d(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]?.name??``,...e.slice(1)]),caption:M.value.a11y.translations.tableCaption,notice:M.value.a11y.translations.tableAvailable}));return be({getData:Yn,getImage:Xn,generateImage:fn,generateSvg:ar,generatePdf:dn,generateCsv:Jn,hideSeries:bn,showSeries:yn,toggleAnnotator:Gn,toggleTable:Kn,toggleFullscreen:Ln,copyAlt:cr}),(e,i)=>(v(),m(`div`,{ref_key:`ridgelineChart`,ref:E,class:Je(`vue-data-ui-component vue-ui-ridgeline ${Q.value?`vue-data-ui-wrapper-fullscreen`:``}`),id:`vue-ui-ridgeline_${k.value}`,style:_({fontFamily:M.value.style.fontFamily,width:`100%`,textAlign:`center`,background:R.value.backgroundColor,height:M.value.responsive?`100%`:void 0}),onMouseenter:i[3]||=()=>C(an)(!0),onMouseleave:i[4]||=()=>C(an)(!1)},[h(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[h(`p`,null,S(M.value.a11y.translations.keyboardNavigation),1)],8,it),hr.value.body.length?(v(),f(Le,{key:0,uid:k.value,head:hr.value.head,body:hr.value.body,caption:hr.value.caption,notice:hr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):p(``,!0),N.value.buttons.annotator&&C(H)?(v(),f(C(kt),Ke({key:1},C(n)(N.value.annotator),{color:R.value.color,backgroundColor:R.value.backgroundColor,active:Wn.value,svgRef:C(H),isCursorPointer:z.value,onClose:Gn}),He({_:2},[b(C(r),n=>({name:n,fn:w(r=>[x(e.$slots,n,Ye(Ge(C(t)(n,r))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`])):p(``,!0),x(e.$slots,`userConfig`,{},void 0,!0),pn.value?(v(),m(`div`,{key:2,ref_key:`noTitle`,ref:zt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),R.value.title.text?(v(),m(`div`,{key:3,ref_key:`chartTitle`,ref:It,style:`width:100%;background:transparent;padding-bottom:24px`},[(v(),f(Ce,{key:`title_${Bt.value}`,config:{title:{cy:`ridgeline-div-title`,...R.value.title},subtitle:{cy:`ridgeline-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),N.value.show&&Pt.value&&(C(on)||C(rn))?(v(),f(C(At),{ref_key:`userOptionsRef`,ref:Zt,key:`user_option_${Ut.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:C(ln),isImaging:C(un),uid:k.value,hasTooltip:!1,callbacks:N.value.callbacks,hasPdf:N.value.buttons.pdf,hasImg:N.value.buttons.img,hasSvg:N.value.buttons.svg,hasXls:N.value.buttons.csv,hasTable:N.value.buttons.table,hasLabel:!1,hasFullscreen:N.value.buttons.fullscreen,hasAltCopy:N.value.buttons.altCopy,isFullscreen:Q.value,printScale:N.value.print.scale,chartElement:E.value,position:N.value.position,isTooltip:!1,titles:{...N.value.buttonTitles},hasAnnotator:N.value.buttons.annotator,isAnnotation:Wn.value,tableDialog:M.value.table.useDialog,style:_({visibility:C(on)?C(rn)?`visible`:`hidden`:`visible`}),isCursorPointer:z.value,onToggleFullscreen:Ln,onGeneratePdf:C(dn),onGenerateCsv:Jn,onGenerateImage:C(or),onGenerateSvg:C(ar),onToggleTable:Kn,onToggleAnnotator:Gn,onCopyAlt:cr},He({_:2},[b(C(De)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:w(n=>[x(e.$slots,t,Ye(Ge(C(Oe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.callbacks.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.printScale.chartElement.position.titles.hasAnnotator.isAnnotation.tableDialog.style.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg`.split(`.`))):p(``,!0),h(`div`,at,[(v(),m(`svg`,{ref_key:`svgRef`,ref:H,xmlns:C(ue),"aria-describedby":`chart-instructions-${k.value}`,class:Je({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value}),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${K.value.fullHeight<=0?10:K.value.fullHeight}`,style:_(`max-width:100%;overflow:visible;background:transparent;color:${R.value.color};${M.value.responsive?`height: ${Jt.value}px; width: 100%;`:``}`),tabindex:`0`,onFocus:lr,onBlur:ur,onKeydown:dr},[We(C(jt)),x(e.$slots,`svg-underlayer`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:C(ln)||C(un)||C(rr),isPrintingSvg:C(ir),data:Y.value}},void 0,!0),h(`defs`,null,[(v(!0),m(u,null,b(Z.value,(e,t)=>(v(),f(Fe,{t:`linear`,id:`gradient-${e.id}-${k.value}`,key:`gradient-${e.id}-${k.value}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128)),(v(!0),m(u,null,b(Y.value,(e,t)=>(v(),m(u,null,[(v(!0),m(u,null,b(e.datapoints,(e,t)=>(v(),f(Fe,{t:`linear`,key:`grad${e.id}`,id:`gradient-single-${k.value}-${e.uid}`,x1:`50%`,y1:`0%`,x2:`50%`,y2:`100%`,stops:[[`0%`,e.color,1],[`30%`,e.color,.7],[`70%`,e.color,.3],[`100%`,e.color,.1]]},null,8,[`id`,`stops`]))),128))],64))),256))]),(v(!0),m(u,null,b(Y.value,(t,n)=>(v(),m(`g`,{key:`ds-${n}`},[(v(!0),m(u,null,b(t.datapoints,(t,r)=>(v(),m(`g`,{key:t.id},[e.$slots.pattern?(v(),m(`g`,st,[h(`defs`,null,[x(e.$slots,`pattern`,Ke({ref_for:!0},{datapointIndex:n,seriesIndex:r,patternId:`pattern_${k.value}_${t.uid}`}),void 0,!0)])])):p(``,!0),h(`path`,{fill:e.$slots.pattern?`url(#pattern_${k.value}_${t.uid})`:R.value.backgroundColor,stroke:`none`,"stroke-linecap":`round`,d:P.value.smooth?t.smoothPath:t.straightPath,style:_({opacity:P.value.opacity})},null,12,ct),h(`path`,{fill:`none`,stroke:P.value.stroke.useSerieColor?t.color:P.value.stroke.color,"stroke-width":P.value.strokeWidth,d:P.value.smooth?t.smoothPathRidge:t.straightPathRidge,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,lt),h(`path`,{fill:P.value.useGradient?P.value.useCommonColor?`url(#gradient-${t.id}-${k.value})`:`url(#gradient-single-${k.value}-${t.uid})`:t.color,stroke:`none`,d:P.value.smooth?t.smoothPath:t.straightPath,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_({strokeDasharray:t.pathLength,strokeDashoffset:M.value.useCssAnimation?t.pathLength:0})},null,12,ut),R.value.zeroLine.show?(v(),m(`path`,{key:1,stroke:R.value.zeroLine.useSerieColor?t.color:R.value.zeroLine.stroke,"stroke-dasharray":R.value.zeroLine.strokeDasharray,"stroke-width":R.value.zeroLine.strokeWidth,d:t.zeroPath,"stroke-linecap":`round`},null,8,dt)):p(``,!0),P.value.maxPoint.show&&t.plots.length>1?(v(!0),m(u,{key:2},b(t.plots,e=>(v(),m(u,null,[e.isMaxPoint?(v(),m(`line`,{key:0,x1:e.x,y1:e.y,x2:e.x,y2:e.zero,stroke:P.value.maxPoint.adaptStrokeToBackground?C(le)(t.color):P.value.maxPoint.stroke,"stroke-width":P.value.maxPoint.strokeWidth,"stroke-linecap":`round`,"stroke-dasharray":P.value.maxPoint.strokeDasharray},null,8,ft)):p(``,!0)],64))),256)):p(``,!0),t.plots.length===1?(v(),m(`circle`,{key:3,cx:t.plots[0].x,cy:t.plots[0].y,stroke:F.value.dot.stroke,"stroke-width":F.value.dot.strokeWidth,r:F.value.dot.radius,fill:F.value.dot.useDatapointColor?t.color:F.value.dot.fill,style:{pointerEvents:`none`}},null,8,pt)):p(``,!0)]))),128)),h(`text`,{x:t.label.x,y:t.label.y,"text-anchor":`end`,"font-size":L.value.fontSize,"font-weight":L.value.bold?`bold`:`normal`,fill:L.value.color,style:_({cursor:R.value.dialog.show&&z.value?`pointer`:`default`}),"text-decoration":R.value.dialog.show&&(Vn.value===n||Kt.value&&t.uid===Kt.value.uid||j.value===n)?`underline`:``,"dominant-baseline":`middle`,onMouseenter:e=>Hn(n),onMouseleave:Un,onClick:e=>Bn(t)},S(t.name),45,mt)]))),128)),I.value.values.length?(v(),m(`g`,{key:0,ref_key:`timeLabelsEls`,ref:Yt},[(v(!0),m(u,null,b(J.value,(t,n)=>x(e.$slots,`time-label`,Ke({ref_for:!0},{show:t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&A.value&&A.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0,fontSize:I.value.fontSize,content:t.label,textAnchor:I.value.rotation>0?`start`:I.value.rotation<0?`end`:`middle`,fill:I.value.color,transform:`translate(${t.selectorX}, ${K.value.top+t.height+I.value.offsetY}), rotate(${I.value.rotation})`,x:t.selectorX,y:K.value.bottom+I.value.offsetY}),()=>[t&&!I.value.showOnlyFirstAndLast&&!I.value.showOnlyAtModulo||t&&I.value.showOnlyFirstAndLast&&(n===0||n===J.value.length-1)||t&&A.value&&A.value.index===n||t&&!I.value.showOnlyFirstAndLast&&I.value.showOnlyAtModulo&&n%Math.max(1,Math.floor(Number(R.value.xAxis.labels.modulo)||1))===0?(v(),m(`g`,ht,[String(t.label).includes(`
|
|
2
|
+
`)?(v(),m(`text`,{key:1,class:`vue-ui-ridgeline-x-axis-label`,"font-size":I.value.fontSize,fill:I.value.color,"font-weight":I.value.bold?`bold`:`normal`,transform:`translate(${t.selectorX}, ${K.value.bottom+I.value.offsetY}), rotate(${I.value.rotation})`,"text-anchor":I.value.rotation>0?`start`:R.value.xAxis.labels.rotation<0?`end`:`middle`,style:_({opacity:A.value?A.value.index===n?1:.2:1}),innerHTML:C(c)({content:String(t.label),fontSize:R.value.xAxis.labels.fontSize,fill:R.value.xAxis.labels.color,stroke:R.value.backgroundColor,x:0,y:0})},null,12,_t)):(v(),m(`text`,{key:0,class:`vue-ui-ridgeline-x-axis-label`,"font-size":I.value.fontSize,fill:I.value.color,stroke:R.value.backgroundColor,"stroke-width":`3`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`,"font-weight":I.value.bold?`bold`:`normal`,transform:`translate(${t.selectorX}, ${K.value.bottom+I.value.offsetY}), rotate(${I.value.rotation})`,"text-anchor":I.value.rotation>0?`start`:R.value.xAxis.labels.rotation<0?`end`:`middle`,style:_({opacity:A.value?A.value.index===n?1:.2:1})},S(t.label),13,gt))])):p(``,!0)],!0)),256))],512)):p(``,!0),h(`g`,null,[(v(!0),m(u,null,b(J.value,(e,t)=>(v(),m(`rect`,{x:e.x,y:e.y,width:e.width<0?.1:e.width,height:e.height<0?.1:e.height,fill:`transparent`,onMouseenter:t=>kn(e),onMouseleave:t=>An(e),onClick:()=>jn(e)},null,40,vt))),256)),F.value.show&&A.value?(v(),m(`line`,{key:0,x1:A.value.selectorX,x2:A.value.selectorX,y1:A.value.y,y2:A.value.y+A.value.height-V.value/2,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray,"stroke-linecap":`round`,style:{pointerEvents:`none`}},null,8,yt)):p(``,!0),A.value||F.value.labels.showLast?(v(!0),m(u,{key:1},b(Y.value,e=>(v(),m(u,null,[(v(!0),m(u,null,b(e.datapoints,e=>(v(),m(u,null,[(v(!0),m(u,null,b(e.plots,(t,n)=>(v(),m(u,null,[A.value&&A.value.index===n||!A.value&&n===e.plots.length-1&&R.value.selector.labels.showLast?(v(),m(`circle`,{key:0,cx:t.x,cy:t.y,stroke:F.value.dot.stroke,"stroke-width":F.value.dot.strokeWidth,r:F.value.dot.radius,fill:F.value.dot.useDatapointColor?e.color:R.value.selector.dot.fill,style:{pointerEvents:`none`}},null,8,bt)):p(``,!0),A.value&&A.value.index===n||!A.value&&n===e.plots.length-1&&R.value.selector.labels.showLast?(v(),m(`text`,{key:1,x:Nn(t.x,C(l)(R.value.selector.labels.formatter,t.value,C(a)({p:M.value.style.chart.xAxis.labels.prefix,v:t.value,s:M.value.style.chart.xAxis.labels.suffix,r:M.value.style.chart.selector.labels.rounding})),R.value.selector.labels.fontSize)?t.x-R.value.selector.labels.fontSize/2:t.x+R.value.selector.labels.fontSize/2,y:t.y,"dominant-baseline":`middle`,stroke:R.value.backgroundColor,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`3`,"paint-order":`stroke fill`,"text-anchor":Nn(t.x,C(l)(R.value.selector.labels.formatter,t.value,C(a)({p:M.value.style.chart.xAxis.labels.prefix,v:t.value,s:M.value.style.chart.xAxis.labels.suffix,r:M.value.style.chart.selector.labels.rounding})),R.value.selector.labels.fontSize)?`end`:`start`,"font-size":F.value.labels.fontSize,fill:F.value.labels.color,style:{pointerEvents:`none`}},S(C(l)(R.value.selector.labels.formatter,t.value,C(a)({p:R.value.xAxis.labels.prefix,v:t.value,s:R.value.xAxis.labels.suffix,r:R.value.selector.labels.rounding}))),9,xt)):p(``,!0)],64))),256))],64))),256))],64))),256)):p(``,!0)]),x(e.$slots,`svg`,{svg:{...G.value,drawingArea:K.value,isPrintingImg:C(ln)||C(un)||C(rr),isPrintingSvg:C(ir),data:Y.value}},void 0,!0)],46,ot)),e.$slots.hint?(v(),m(`div`,St,[x(e.$slots,`hint`,Ye(Ge({hint:M.value.a11y.translations.keyboardNavigation,isVisible:Qt.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(v(),m(`div`,Ct,[x(e.$slots,`watermark`,Ye(Ge({isPrinting:C(ln)||C(un)||C(rr)||C(ir)})),void 0,!0)])):p(``,!0),h(`div`,{ref_key:`chartLegend`,ref:Lt},[x(e.$slots,`legend`,{legend:Z.value},()=>[R.value.legend.show?(v(),f(Be,{key:`legend_${Ht.value}`,legendSet:Z.value,config:In.value,isCursorPointer:z.value,onClickMarker:i[0]||=({legend:e})=>_n(e.id)},He({item:w(({legend:e})=>[C(tn)?p(``,!0):(v(),m(`div`,{key:0,style:_(`opacity:${X.value.includes(e.id)?.5:1}`),onClick:t=>e.segregate()},S(e.name),13,wt))]),legendToggle:w(()=>[Z.value.length>2&&R.value.legend.selectAllToggle.show&&!C(tn)?(v(),f(Ie,{key:0,backgroundColor:R.value.legend.selectAllToggle.backgroundColor,color:R.value.legend.selectAllToggle.color,fontSize:R.value.legend.fontSize,checked:X.value.length>0,isCursorPointer:z.value,onToggle:gn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:w(({legend:e,index:t})=>[We(Me,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${k.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512),e.$slots.source?(v(),m(`div`,{key:6,ref_key:`source`,ref:Rt,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),Pt.value&&N.value.buttons.table?(v(),f(Ze(Qn.value.component),Ke({key:7},Qn.value.props,{ref_key:`tableUnit`,ref:Xt,onClose:$n}),He({content:w(()=>[(v(),f(C(Ot),{key:`table_${Vt.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:M.value.table.useDialog?``:Qn.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:z.value,onClose:$n},{th:w(({th:e})=>[h(`div`,null,S(e),1)]),td:w(({td:e})=>[Ue(S(e.name?e.name:C(l)(F.value.labels.formatter,e,C(a)({p:R.value.xAxis.labels.prefix,v:e,s:R.value.xAxis.labels.suffix,r:M.value.table.td.roundingValue}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:w(()=>[Ue(S(Qn.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:w(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Jn(N.value.callbacks.csv),style:_({cursor:z.value?`pointer`:`default`})},[We(C(Et),{name:`fileCsv`,stroke:Qn.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),R.value.dialog.show?(v(),f(C(Mt),{key:8,ref_key:`dialog`,ref:qt,onClose:i[2]||=e=>Kt.value=null,backgroundColor:R.value.dialog.backgroundColor,color:R.value.dialog.color,headerBg:R.value.dialog.header.backgroundColor,headerColor:R.value.dialog.header.color,isFullscreen:Q.value,fullscreenParent:E.value,isCursorPointer:z.value,withPadding:``},{title:w(()=>[Ue(S(Kt.value.name),1)]),content:w(()=>[Kt.value?(v(),f(C(Tt),{key:0,config:Rn.value,dataset:zn.value,onCopyAlt:sr},null,8,[`config`,`dataset`])):p(``,!0)]),_:1},8,[`backgroundColor`,`color`,`headerBg`,`headerColor`,`isFullscreen`,`fullscreenParent`,`isCursorPointer`])):p(``,!0),x(e.$slots,`skeleton`,{},()=>[C(tn)?(v(),f(_e,{key:0})):p(``,!0)],!0)],46,rt))}},[[`__scopeId`,`data-v-394193d9`]]);export{nt as n,Tt as t};
|
|
@@ -0,0 +1 @@
|
|
|
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 ee,Dt as te,Ht as o,J as ne,Jt as re,Kt as ie,S as ae,X as oe,Yt as se,Zt as ce,at as le,b as ue,i as de,in as fe,nn as pe,nt as me,pt as he,t as ge,w as _e,yt as ve,zt as ye}from"./lib-rPeBMZrn.js";import{n as be,t as xe}from"./BaseScanner-8NdoBs7B.js";import{n as Se,t as Ce}from"./useHints-C-TwxM0Y.js";import{t as we}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Te}from"./useNestedProp-DnGoh-XS.js";import{t as Ee}from"./useThemeCheck-BKNRbGeC.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"./Shape-CRe8woTu.js";import{c as Le}from"./canvas-lib-22VpOI4_.js";import{t as Re}from"./useResponsive-CENUxfEL.js";import{t as ze}from"./DefGrad-DKMq1REY.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"./labelUtils-CdtU-yB_.js";import{t as Ge}from"./Legend-DM0ClX3D.js";import{t as Ke}from"./vue_ui_rings-BcDDXHpQ.js";import{Fragment as qe,Teleport as Je,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as Ye,createTextVNode as Xe,createVNode as Ze,defineAsyncComponent as f,guardReactiveProps as p,mergeProps as Qe,nextTick as $e,normalizeClass as m,normalizeProps as h,normalizeStyle as g,onBeforeUnmount as et,onMounted as tt,openBlock as _,ref as v,renderList as nt,renderSlot as y,resolveDynamicComponent as rt,shallowRef as it,toDisplayString as at,toRefs as ot,unref as b,useSlots as st,watch as ct,withCtx as x}from"vue";var lt=/* @__PURE__ */ e({default:()=>At}),ut=[`id`],dt=[`id`],ft=[`id`],pt={style:{position:`relative`}},mt=[`xmlns`,`viewBox`,`aria-describedby`],ht=[`width`,`height`],gt={key:1},_t=[`stroke`,`cx`,`cy`,`r`,`fill`],vt=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],yt=[`stroke`,`stroke-width`,`cx`,`cy`,`r`,`fill`],bt=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],xt=[`x`,`y`,`width`,`height`,`fill`,`rx`],St=[`cx`,`cy`,`r`,`fill`,`stroke`],Ct=[`text-anchor`,`font-size`,`fill`,`font-weight`,`transform`,`onMouseenter`,`onMouseleave`,`onClick`,`innerHTML`],wt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Tt={key:5,class:`vue-data-ui-watermark`},Et=[`id`],Dt=[`onClick`],Ot={key:0},kt={key:1},At=/*#__PURE__*/ we({__name:`vue-ui-rings`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:we,emit:lt}){let At=f(()=>import(`./Tooltip-C1q0Qoh7.js`)),jt=f(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Mt=f(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Nt=f(()=>import(`./DataTable-Dof6yhO7.js`)),Pt=f(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Ft=f(()=>import(`./UserOptions-DW84OKKr.js`).then(e=>e.n)),It=f(()=>import(`./PackageVersion-Bczw6rsP.js`).then(e=>e.t)),Lt=f(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_rings:Rt}=i(),{isThemeValid:zt,warnInvalidTheme:Bt}=Ee(),Vt=st(),S=e,C=v(!1),Ht=s(()=>!!S.dataset&&S.dataset.length),w=v(oe()),T=v(!1),Ut=v(``),E=v(null),Wt=v(0),D=v(null),Gt=v(null),Kt=v(null),qt=v(null),Jt=v(null),Yt=v(0),Xt=v(0),Zt=v(0),Qt=v(!1),$t=v(!1),en=v(null),tn=v(null),O=v(null),nn=v({x:0,y:0}),k=v(`pointer`),rn=v(!1),A=v(dn()),j=s(()=>A.value.userOptions),M=s(()=>A.value.style.chart.layout.rings),N=s(()=>A.value.style.chart.layout.labels),P=s(()=>A.value.style.chart.tooltip),F=s(()=>A.value.style.chart);Se({config:()=>A.value,dataset:()=>S.dataset,component:`VueUiRings`,rules:[Ce.singleSeries,Ce.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. 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}=Fe({config:()=>A.value.transitions,dataset:()=>S.dataset}),L=s(()=>A.value.userOptions.useCursorPointer),an=s(()=>fe({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{rings:{stroke:`#6A6A6A`,gradient:{underlayerColor:`#FFFFFF`}},labels:{dataLabels:{show:!1}}},legend:{backgroundColor:`transparent`}}}},userConfig:A.value.skeletonConfig??{}})),{loading:R,FINAL_DATASET:on,manualLoading:sn}=be({...ot(S),FINAL_CONFIG:A,prepareConfig:dn,skeletonDataset:S.config?.skeletonDataset??[{name:`_`,values:[13],color:`#808080`},{name:`_`,values:[8],color:`#969696`},{name:`_`,values:[5],color:`#ADADAD`},{name:`_`,values:[3],color:`#C4C4C4`},{name:`_`,values:[2],color:`#DBDBDB`}],skeletonConfig:fe({defaultConfig:A.value,userConfig:an.value})}),{userOptionsVisible:cn,setUserOptionsVisibility:ln,keepUserOptionState:un}=He({config:A.value}),{svgRef:z}=Ue({config:F.value.title});function dn(){let e=Te({userConfig:S.config,defaultConfig:Rt}),t=e.theme;if(!t)return e;if(!zt.value(e))return Bt(e),e;let n=Te({userConfig:Ke[t]||S.config,defaultConfig:e});return{...Te({userConfig:S.config,defaultConfig:n}),customPalette:e.customPalette.length?e.customPalette:pe[e.theme]||o}}let fn=ce(S.config);ct(()=>S.config,(e,t)=>{let n=ce(e),r=n!==fn;fn=n;let i=dn();r?(R.value||(A.value=i),cn.value=!A.value.userOptions.showOnChartHover,hn(),Yt.value+=1,Xt.value+=1,Zt.value+=1,U.value.showTable=A.value.table.show,U.value.showTooltip=P.value.show,U.value.showLabels=N.value.dataLabels.show,W.value.width=F.value.size,W.value.height=F.value.size):(A.value.style.chart.tooltip=i.style.chart.tooltip,U.value.showTooltip=A.value.style.chart.tooltip.show)},{deep:!0});let pn=s(()=>{let{markers:e}=N.value.dataLabels,t=Y.value/2,n=U.value.showLabels?e.position===`left`?t:-t:0,r=U.value.showLabels?W.value.width/2-t:0,i=e.position===`left`?r:-r;return{x:A.value.responsive?i:n/F.value.size*W.value.width,y:0/F.value.size*W.value.height}}),B=s(()=>({x:W.value.width/2+pn.value.x,y:W.value.height/2+pn.value.y}));ct(()=>S.dataset,e=>{Array.isArray(e)&&e.length>0&&(sn.value=!1)},{deep:!0});let V=it(null),H=it(null);tt(()=>{$t.value=!0,hn()});let mn=s(()=>A.value.debug);function hn(){if(ye(S.dataset)?(le({componentName:`VueUiRings`,type:`dataset`,debug:mn.value}),sn.value=!0):S.dataset.forEach((e,t)=>{e.values.length||(le({componentName:`VueUiRings`,type:`dataset`,debug:mn.value}),sn.value=!0),ve({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{le({componentName:`VueUiRings`,type:`datasetSerieAttribute`,property:e,index:t,debug:mn.value})})}),ye(S.dataset)||(sn.value=A.value.loading),A.value.responsive){let e=Le(()=>{Qt.value=!0;let{width:e,height:t}=Re({chart:D.value,title:F.value.title.text?Gt.value:null,legend:F.value.legend.show?Kt.value:null,source:qt.value,noTitle:Jt.value});requestAnimationFrame(()=>{W.value.width=e,W.value.height=t-12,Qt.value=!1})});V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(e),H.value=D.value.parentNode,V.value.observe(H.value)}setTimeout(()=>{C.value=!0},600)}et(()=>{V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:gn,isImaging:_n,generatePdf:vn,generateImage:yn}=Pe({elementId:`rings_${w.value}`,fileName:F.value.title.text||`vue-ui-rings`,options:A.value.userOptions.print}),bn=s(()=>A.value.userOptions.show&&!F.value.title.text),xn=s(()=>_e(A.value.customPalette)),U=v({showTable:A.value.table.show,showTooltip:P.value.show,showLabels:N.value.dataLabels.show});ct(A,()=>{U.value={showTable:A.value.table.show,showTooltip:P.value.show,showLabels:N.value.dataLabels.show}},{immediate:!0});let W=v({height:F.value.size,width:F.value.size}),Sn=s(()=>Math.min(W.value.height,W.value.width)),Cn=lt,G=v([]);function wn(){G.value.length?G.value=[]:Mn.value.forEach(e=>{G.value.push(e.uid)}),Tn()}function Tn(){Cn(`selectLegend`,J.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function En(e){if(G.value.includes(e))G.value=G.value.filter(t=>t!==e);else{if(G.value.length===K.value.length-1)return;G.value.push(e)}Tn()}function Dn(e){return K.value.length?K.value.find(t=>t.name===e)||(mn.value&&console.warn(`VueUiRings - Series name not found "${e}"`),null):(mn.value&&console.warn(`VueUiRings - There are no series to show.`),null)}function On(e){let t=Dn(e);t!==null&&G.value.includes(t.uid)&&En(t.uid)}function kn(e){let t=Dn(e);t!==null&&(G.value.includes(t.uid)||En(t.uid))}let An=s(()=>Math.max(...K.value.filter(e=>!G.value.includes(e.uid)).map(({value:e})=>e)));function jn(e){return e/An.value}let K=s(()=>on.value.map(({values:e,name:t,color:n=null},r)=>{let i=ie(e).reduce((e,t)=>e+t,0);return{name:t,color:n||ae(n)||xn.value[r]||o[r]||o[r%o.length],value:i,proportion:i/on.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0),uid:oe(),absoluteIndex:r}})),Mn=s(()=>K.value.map((e,t)=>{let n=de(N.value.dataLabels.formatter,e.value,a({p:N.value.dataLabels.prefix,v:e.value,s:N.value.dataLabels.suffix,r:F.value.legend.roundingValue}),{datapoint:e,index:t}),r=isNaN(e.value/q.value)?`-`:a({v:e.value/q.value*100,s:`%`,r:F.value.legend.roundingPercentage}),i=Ln({showVal:F.value.legend.showValue,showPercentage:F.value.legend.showPercentage,val:n,percentage:G.value.includes(e.uid)?`-%`:r});return{...e,shape:`circle`,opacity:G.value.includes(e.uid)?.5:1,segregate:()=>En(e.uid),isSegregated:G.value.includes(e.uid),display:`${e.name}${F.value.legend.showPercentage||F.value.legend.showValue?`: `:``}${i}`}}).toSorted((e,t)=>t.value-e.value)),Nn=s(()=>({cy:`rings-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`:``})),q=s(()=>K.value.filter(e=>!G.value.includes(e.uid)).map(({value:e})=>e).reduce((e,t)=>e+t,0)),J=s(()=>K.value.filter(e=>!G.value.includes(e.uid)).map(({name:e,value:t,color:n=null,uid:r,absoluteIndex:i},a)=>({absoluteIndex:i,uid:r,name:e,color:n||ae(n)||xn.value[a]||o[a]||o[a%o.length],value:t,proportion:jn(t),percentage:t/q.value*100,strokeWidth:M.value.strokeWidth*jn(t)})).toSorted((e,t)=>t.value-e.value));function Pn(){return J.value.map(({name:e,color:t,value:n,absoluteValues:r,percentage:i})=>({name:e,color:t,value:n,absoluteValues:r,percentage:i}))}let Y=s(()=>Sn.value-M.value.strokeWidth*2);function Fn(e,t){A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:e,seriesIndex:t})}function In(e,t){E.value=null,T.value=!1,O.value=null,k.value=`pointer`,A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function Ln({val:e,percentage:t,showVal:n,showPercentage:r}){let i=N.value.dataLabels;return We({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Rn(e){let t=N.value.dataLabels,n=de(t.formatter,e.value,a({p:t.prefix,v:e.value,s:t.suffix,r:t.roundingValue})),r=a({v:e.percentage,s:`%`,r:t.roundingPercentage});return`${e.name}\n${Ln({val:n,percentage:r,showVal:t.showValue,showPercentage:t.showPercentage})}`}function zn(e){return ue(Y.value*e.proportion/2*.9<=0?1e-4:Y.value*e.proportion/2*.9)}function Bn(e,t){return t===0?B.value.y:B.value.y+Y.value*J.value[0].proportion/2-Y.value*e.proportion/2-2*(t+1)}function X(e,t){let n=N.value.dataLabels.markers.position===`left`?-(Y.value/2):Y.value/2;return{x:B.value.x+n,y:Bn(e,t)-zn(e)}}let Vn=v(null);function Hn(e,t,n=`pointer`){if(A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:e,seriesIndex:t}),G.value.length===S.dataset.length)return;Vn.value={datapoint:e,seriesIndex:t,series:J.value,config:A.value},E.value=t,O.value=t,k.value=n;let r=J.value[t],i=P.value.customFormat;if(te(i)&&he(()=>i({seriesIndex:t,datapoint:e,series:J.value,config:A.value})))Ut.value=i({seriesIndex:t,datapoint:e,series:J.value,config:A.value});else{let n=``;n+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${r.name}</div>`,n+=`<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="${r.color}" />${Vt.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${w.value}_${e.absoluteIndex})" />`:``}</svg>`,n+=`<b>${Ln({showVal:P.value.showValue,showPercentage:P.value.showPercentage,val:`<span>${de(N.value.dataLabels.formatter,r.value,a({p:N.value.dataLabels.prefix,v:r.value,s:N.value.dataLabels.suffix,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}</span>`,percentage:a({v:r.value/q.value*100,s:`%`,r:P.value.roundingPercentage})})}</b></div>`,Ut.value=n}T.value=!0}let Z=s(()=>({head:J.value.map(e=>({name:e.name,color:e.color})),body:J.value.map(e=>e.value)})),Q=s(()=>{let e=[`__SUM__`,a({p:N.value.dataLabels.prefix,v:q.value,s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),`100%`],t=Z.value.head.map((e,t)=>[{color:e.color,name:e.name},a({p:N.value.dataLabels.prefix,v:Z.value.body[t],s:N.value.dataLabels.suffix,r:A.value.table.td.roundingValue}),isNaN(Z.value.body[t]/q.value)?`-`:(Z.value.body[t]/q.value*100).toFixed(A.value.table.td.roundingPercentage)+`%`]);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:[A.value.table.columnNames.series,A.value.table.columnNames.value,A.value.table.columnNames.percentage]}});function Un(e=null){$e(()=>{let t=Z.value.head.map((e,t)=>[[e.name],[Z.value.body[t]],[isNaN(Z.value.body[t]/q.value)?`-`:Z.value.body[t]/q.value*100]]),n=[[F.value.title.text],[F.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=ee(n);e?e(r):me({csvContent:r,title:F.value.title.text||`vue-ui-rings`})})}let $=v(!1);function Wn(e){$.value=e,Wt.value+=1}function Gn(){U.value.showTable=!U.value.showTable}function Kn(){U.value.showTooltip=!U.value.showTooltip}function qn(){U.value.showLabels=!U.value.showLabels}let Jn=v(!1);function Yn(){Jn.value=!Jn.value}let Xn=De(D,()=>F.value.title.text),Zn=s(()=>je({config:A,style:F,mutableConfig:U,dialog:Lt,accordion:Mt,isFullscreen:$,parent:D,maxWidth:800,isCursorPointer:L}));ct(()=>U.value.showTable,e=>Ae(e,A,en));function Qn(){U.value.showTable=!1,tn.value&&tn.value.setTableIconState(!1)}let $n=s(()=>Mn.value.map(e=>({...e,name:e.display}))),er=s(()=>F.value.backgroundColor),tr=s(()=>F.value.legend),nr=s(()=>F.value.title),{isCallbackImaging:rr,isCallbackSvg:ir,generateSvg:ar,onGenerateImage:or}=ke({svg:z,title:nr,legend:tr,legendItems:$n,backgroundColor:er,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:yn});async function sr(){Cn(`copyAlt`,{config:A.value,dataset:J.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:J.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function cr(){O.value=null,rn.value=!0}function lr(){O.value=null,k.value=`pointer`,T.value=!1,E.value=null,rn.value=!1}function ur(e){if(!z.value||Jn.value||document.activeElement!==z.value||!J.value.length||G.value.length===S.dataset.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){O.value=null,k.value=`pointer`,T.value=!1,E.value=null;return}if(r){if(O.value===null)return;let e=J.value[O.value];if(!e)return;Fn(e,O.value);return}let a=O.value;a===null||a<0||a>=J.value.length?a=n?0:J.value.length-1:n?(a+=1,a>=J.value.length&&(a=0)):t&&(--a,a<0&&(a=J.value.length-1));let ee=J.value[a];ee&&(dr(a),Hn(ee,a,`keyboard`))}function dr(e){if(!Number.isFinite(e)||!z.value)return;let t=J.value[e];if(!t)return;let n=X(t,e),r=z.value.getBoundingClientRect();nn.value={x:r.left+n.x/W.value.width*r.width,y:r.top+n.y/W.value.height*r.height}}let fr=s(()=>({headers:Q.value?.colNames??[],rows:Q.value?.a11yBody??[]}));return we({getData:Pn,getImage:Xn,generatePdf:vn,generateCsv:Un,generateImage:yn,generateSvg:ar,hideSeries:kn,showSeries:On,toggleTable:Gn,toggleTooltip:Kn,toggleAnnotator:Yn,toggleFullscreen:Wn,toggleLabels:qn,copyAlt:sr}),(e,i)=>(_(),u(`div`,{ref_key:`ringsChart`,ref:D,class:m(`vue-data-ui-component vue-ui-rings ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),style:g(`font-family:${A.value.style.fontFamily};text-align:center;width:100%;background:${F.value.backgroundColor};${A.value.responsive?`height: 100%`:``}`),id:`rings_${w.value}`,onMouseleave:i[2]||=e=>{E.value=null,T.value=!1,b(ln)(!1)},onMouseenter:i[3]||=()=>b(ln)(!0)},[d(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[d(`p`,null,at(A.value.a11y.translations.keyboardNavigation),1)],8,dt),fr.value?.rows?.length?(_(),c(Ve,{key:0,uid:w.value,head:fr.value.headers,body:fr.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):l(``,!0),j.value.buttons.annotator?(_(),c(b(Pt),Qe({key:1},b(n)(j.value.annotator),{svgRef:b(z),backgroundColor:F.value.backgroundColor,color:F.value.color,active:Jn.value,isCursorPointer:L.value,palette:j.value.annotatorPalette,onClose:Yn}),Ye({_:2},[nt(b(r),n=>({name:n,fn:x(r=>[y(e.$slots,n,h(p(b(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):l(``,!0),bn.value?(_(),u(`div`,{key:2,ref_key:`noTitle`,ref:Jt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):l(``,!0),F.value.title.text?(_(),u(`div`,{key:3,ref_key:`chartTitle`,ref:Gt,style:`width:100%;background:transparent`},[(_(),c(Oe,{key:`title_${Yt.value}`,config:{title:{cy:`rings-div-title`,...F.value.title},subtitle:{cy:`rings-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):l(``,!0),d(`div`,{id:`legend-top-${w.value}`},null,8,ft),j.value.show&&Ht.value&&(b(un)||b(cn))?(_(),c(b(Ft),{ref_key:`userOptionsRef`,ref:tn,key:`user_options_${Wt.value}`,backgroundColor:F.value.backgroundColor,color:F.value.color,isPrinting:b(gn),isImaging:b(_n),uid:w.value,hasTooltip:j.value.buttons.tooltip&&P.value.show,hasPdf:j.value.buttons.pdf,hasXls:j.value.buttons.csv,hasImg:j.value.buttons.img,hasSvg:j.value.buttons.svg,hasTable:j.value.buttons.table,hasFullscreen:j.value.buttons.fullscreen,hasAltCopy:j.value.buttons.altCopy,hasLabel:j.value.buttons.labels,isTooltip:U.value.showTooltip,isFullscreen:$.value,titles:{...j.value.buttonTitles},chartElement:D.value,position:j.value.position,hasAnnotator:j.value.buttons.annotator,isAnnotation:Jn.value,callbacks:j.value.callbacks,printScale:j.value.print.scale,tableDialog:A.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:Wn,onGeneratePdf:b(vn),onGenerateCsv:Un,onGenerateImage:b(or),onGenerateSvg:b(ar),onToggleTable:Gn,onToggleTooltip:Kn,onToggleAnnotator:Yn,onToggleLabels:qn,onCopyAlt:sr,style:g({visibility:b(un)?b(cn)?`visible`:`hidden`:`visible`})},Ye({_:2},[nt(b(Me)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:x(n=>[y(e.$slots,t,h(p(b(Ne)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.hasLabel.isTooltip.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):l(``,!0),d(`div`,pt,[(_(),u(`svg`,{ref_key:`svgRef`,ref:z,xmlns:b(ge),class:m({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value,resizing:Qt.value||b(R),"vue-data-ui-no-transition":!b(I)}),viewBox:`0 0 ${W.value.width<=0?10:W.value.width} ${W.value.height<=0?10:W.value.height}`,style:g(`max-width:100%;overflow:hidden;background:transparent;color:${F.value.color}`),"aria-describedby":`chart-instructions-${w.value}`,tabindex:`0`,onFocus:cr,onBlur:lr,onKeydown:ur},[Ze(b(It)),y(e.$slots,`svg-underlayer`,{svg:{...W.value,isPrintingImg:b(gn)||b(_n)||b(rr),isPrintingSvg:b(ir)}},void 0,!0),e.$slots[`chart-background`]?(_(),u(`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`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,ht)):l(``,!0),d(`defs`,null,[(_(!0),u(qe,null,nt(J.value,(e,t)=>(_(),c(ze,{t:`radial`,cx:`50%`,cy:`30%`,r:`50%`,fx:`50%`,fy:`50%`,id:`gradient_${w.value}_${t}`,key:`gradient_${w.value}_${t}`,stops:[[`0%`,b(re)(b(se)(e.color,.05),100-M.value.gradient.intensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128))]),e.$slots.pattern?(_(),u(`g`,gt,[(_(!0),u(qe,null,nt(J.value,t=>(_(),u(`defs`,null,[y(e.$slots,`pattern`,Qe({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${w.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):l(``,!0),(_(!0),u(qe,null,nt(J.value,(t,n)=>(_(),u(`g`,{key:`r_${t.uid}`},[d(`circle`,{class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-opacity":E.value!==null&&E.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:M.value.gradient.underlayerColor},null,14,_t),d(`circle`,{class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:M.value.gradient.show?`url(#gradient_${w.value}_${n})`:t.color},null,14,vt),e.$slots.pattern?(_(),u(`circle`,{key:0,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n}),style:g(`animation-delay:${n*100}ms`),stroke:M.value.stroke,"stroke-width":t.strokeWidth<.5?.5:t.strokeWidth,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:`url(#pattern_${w.value}_${t.absoluteIndex})`},null,14,yt)):l(``,!0),d(`circle`,{stroke:`none`,cx:B.value.x,cy:Bn(t,n),r:zn(t),fill:`transparent`,onMouseenter:e=>Hn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n)},null,40,bt),U.value.showLabels?(_(),u(qe,{key:1},[d(`rect`,{x:N.value.dataLabels.markers.position===`left`?X(t,n).x:B.value.x,y:X(t,n).y-N.value.dataLabels.markers.strokeWidth/2,width:Math.abs(B.value.x-X(t,n).x),height:N.value.dataLabels.markers.strokeWidth,fill:N.value.dataLabels.markers.stroke,rx:N.value.dataLabels.markers.strokeWidth,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n})},null,10,xt),d(`circle`,{cx:X(t,n).x,cy:X(t,n).y,r:N.value.dataLabels.markers.radius,fill:t.color,stroke:F.value.backgroundColor,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n})},null,10,St),d(`text`,{"text-anchor":N.value.dataLabels.markers.position===`left`?`end`:`start`,"font-size":N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,"font-weight":N.value.dataLabels.bold?`bold`:`normal`,class:m({"vue-data-ui-transition":C.value&&b(I),"vue-rings-item-onload":!C.value&&A.value.useCssAnimation&&!b(R),"vue-ui-rings-shadow":M.value.useShadow,"vue-ui-rings-blur":E.value!==null&&E.value!==n}),transform:`translate(${X(t,n).x+(N.value.dataLabels.markers.position===`left`?-N.value.dataLabels.offsetX-14:N.value.dataLabels.offsetX)+6}, ${X(t,n).y+N.value.dataLabels.fontSize/3})`,onMouseenter:e=>Hn(t,n,`pointer`),onMouseleave:e=>In(t,n),onClick:e=>Fn(t,n),innerHTML:b(ne)({content:Rn(t),fontSize:N.value.dataLabels.fontSize,fill:N.value.dataLabels.color,x:0,y:0,translateY:!0})},null,42,Ct)],64)):l(``,!0)]))),128)),y(e.$slots,`svg`,{svg:{...W.value,isPrintingImg:b(gn)||b(_n)||b(rr),isPrintingSvg:b(ir)}},void 0,!0)],46,mt)),e.$slots.hint?(_(),u(`div`,wt,[y(e.$slots,`hint`,h(p({hint:A.value.a11y.translations.keyboardNavigation,isVisible:rn.value})),void 0,!0)])):l(``,!0)]),e.$slots.watermark?(_(),u(`div`,Tt,[y(e.$slots,`watermark`,h(p({isPrinting:b(gn)||b(_n)||b(rr)||b(ir)})),void 0,!0)])):l(``,!0),d(`div`,{id:`legend-bottom-${w.value}`},null,8,Et),$t.value&&(F.value.legend.show||e.$slots.legend)?(_(),c(Je,{key:6,to:F.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[d(`div`,{ref_key:`chartLegend`,ref:Kt},[y(e.$slots,`legend`,{legend:Mn.value},()=>[F.value.legend.show?(_(),c(Ge,{key:`legend_${Zt.value}`,legendSet:Mn.value,config:Nn.value,isCursorPointer:L.value,onClickMarker:i[0]||=({legend:e})=>En(e.uid)},Ye({item:x(({legend:e,index:t})=>[b(R)?l(``,!0):(_(),u(`div`,{key:0,onClick:t=>En(e.uid),style:g(`opacity:${G.value.includes(e.uid)?.5:1}`)},at(e.display),13,Dt))]),legendToggle:x(()=>[Mn.value.length>2&&F.value.legend.selectAllToggle.show&&!b(R)?(_(),c(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:wn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):l(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:x(({legend:e,index:t})=>[Ze(Ie,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${w.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):l(``,!0)],!0)],512)],8,[`to`])):l(``,!0),e.$slots.source?(_(),u(`div`,{key:7,ref_key:`source`,ref:qt,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0),Ze(b(At),{teleportTo:P.value.teleportTo,show:U.value.showTooltip&&T.value&&G.value.length<S.dataset.length,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:Ut.value,isFullscreen:$.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:k.value===`keyboard`,a11yPosition:nn.value},{"tooltip-before":x(()=>[y(e.$slots,`tooltip-before`,h(p({...Vn.value})),void 0,!0)]),tooltip:x(()=>[y(e.$slots,`tooltip`,h(p({...Vn.value})),void 0,!0)]),"tooltip-after":x(()=>[y(e.$slots,`tooltip-after`,h(p({...Vn.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`]),Ht.value&&j.value.buttons.table?(_(),c(rt(Zn.value.component),Qe({key:8},Zn.value.props,{ref_key:`tableUnit`,ref:en,onClose:Qn}),Ye({content:x(()=>[(_(),c(b(Nt),{key:`table_${Xt.value}`,colNames:Q.value.colNames,head:Q.value.head,body:Q.value.body,config:Q.value.config,title:A.value.table.useDialog?``:Zn.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:L.value,onClose:Qn},{th:x(({th:e})=>[e===`__SUM__`?(_(),u(`div`,Ot,[Ze(b(jt),{name:`sigma`,stroke:Q.value.config.th.color,size:16},null,8,[`stroke`])])):(_(),u(`div`,kt,at(e),1))]),td:x(({td:e})=>[Xe(at(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[A.value.table.useDialog?{name:`title`,fn:x(()=>[Xe(at(Zn.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:x(()=>[d(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Un(j.value.callbacks.csv),style:g({cursor:L.value?`pointer`:`default`})},[Ze(b(jt),{name:`fileCsv`,stroke:Zn.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):l(``,!0),y(e.$slots,`skeleton`,{},()=>[b(R)?(_(),c(xe,{key:0})):l(``,!0)],!0)],46,ut))}},[[`__scopeId`,`data-v-83abb35d`]]);export{lt as n,At as t};
|