vue-data-ui 3.28.12 → 3.29.0
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/BaseScanner-m6QR9rwD.js +1 -0
- package/dist/{PackageVersion-PdpqwkYX.js → PackageVersion-B9qiUJPH.js} +1 -1
- package/dist/SlicerPreview-Ks9FNVzh.js +1 -0
- package/dist/Tooltip-B432XpvC.js +1 -0
- package/dist/{XyAnalysisOptions-DmKfwSu6.js → XyAnalysisOptions-DKCLKOkA.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-graph.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/package-GInOA5jS.js +1 -0
- package/dist/{render-common-C9aE_Va1.js → render-common-DF3B4DW7.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 +56 -9
- package/dist/useAnimationFrame-D8gcRfnW.js +1 -0
- package/dist/useConfig-9oDGTWWG.js +1 -0
- package/dist/useLoading-BwiplGDB.js +1 -0
- package/dist/{useObjectBindings-D789Dz63.js → useObjectBindings-DlxSTJOa.js} +1 -1
- package/dist/usePanZoom-CTGk8aJt.js +1 -0
- package/dist/utils.js +1 -1
- package/dist/vue-data-ui-Bx6exT7_.js +1 -0
- package/dist/vue-data-ui.js +1 -1
- package/dist/vue-ui-3d-bar-DkehT0SI.js +10 -0
- package/dist/{vue-ui-accordion-DxGxf-Rm.js → vue-ui-accordion-CnAwFOgA.js} +1 -1
- package/dist/vue-ui-age-pyramid-DXEyySR3.js +1 -0
- package/dist/vue-ui-annotator-DqrdF7bH.js +259 -0
- package/dist/vue-ui-bullet-BNgmEm8g.js +11 -0
- package/dist/vue-ui-bump-nFpAoRy7.js +8 -0
- package/dist/vue-ui-candlestick-DvBj3KWq.js +22 -0
- package/dist/vue-ui-carousel-table-ChEpsK7w.js +1 -0
- package/dist/vue-ui-chestnut-C-_fkI6E.js +1 -0
- package/dist/vue-ui-chord-WqXXM4Qs.js +9 -0
- package/dist/vue-ui-circle-pack-Bti7Wq1h.js +13 -0
- package/dist/vue-ui-cursor-C_zzn7Ua.js +1 -0
- package/dist/vue-ui-dag-BevQ37Gp.js +7 -0
- package/dist/vue-ui-dashboard-ruhBa6cl.js +1 -0
- package/dist/vue-ui-digits-B9ksORds.js +1 -0
- package/dist/{vue-ui-donut-BqnLIKwZ.js → vue-ui-donut-DhrhMru7.js} +1 -1
- package/dist/vue-ui-donut-SbqIxWeM.js +23 -0
- package/dist/vue-ui-donut-evolution-BkuALrYS.js +2 -0
- package/dist/vue-ui-dumbbell-SOI5CdGX.js +9 -0
- package/dist/vue-ui-flow-DqVrfXJo.js +3 -0
- package/dist/vue-ui-funnel-Byx_0z_B.js +1 -0
- package/dist/vue-ui-galaxy-BYbvOTrG.js +1 -0
- package/dist/vue-ui-gauge-3_cwmDni.js +1 -0
- package/dist/vue-ui-geo-HaNxzfYO.js +1 -0
- package/dist/vue-ui-gizmo-C38WKy7L.js +1 -0
- package/dist/{vue-ui-graph-CBkbFJIA.js → vue-ui-graph-Dp5FNReE.js} +2 -2
- package/dist/vue-ui-heatmap-DM0tteNh.js +1 -0
- package/dist/{vue-ui-hill-8c-9u8eg.js → vue-ui-hill-Dr6Du4gm.js} +1 -1
- package/dist/vue-ui-history-plot-C7iVkeuY.js +2 -0
- package/dist/vue-ui-horizontal-bar-BP2tt9hA.js +4 -0
- package/dist/vue-ui-kpi-8BL_aylw.js +1 -0
- package/dist/{vue-ui-label-CBrMoFDG.js → vue-ui-label-D9tcQ8rR.js} +1 -1
- package/dist/{vue-ui-mini-loader-PsWZLMLF.js → vue-ui-mini-loader-D5-HI4Wi.js} +1 -1
- package/dist/vue-ui-molecule-Bg1GqvBM.js +1 -0
- package/dist/vue-ui-mood-radar-DIiMInOP.js +1 -0
- package/dist/vue-ui-nested-donuts-BCyX7Z7n.js +19 -0
- package/dist/vue-ui-onion-EkxCuuTI.js +5 -0
- package/dist/vue-ui-parallel-coordinate-plot-CE80aawg.js +9 -0
- package/dist/vue-ui-quadrant-DJIuGrF9.js +2 -0
- package/dist/vue-ui-quick-chart-BBsBw9K3.js +9 -0
- package/dist/vue-ui-radar-BMYyMdOg.js +1 -0
- package/dist/{vue-ui-rating-D0QvpD3V.js → vue-ui-rating--jhcSeor.js} +1 -1
- package/dist/vue-ui-relation-circle-BLeJaQJH.js +1 -0
- package/dist/vue-ui-ridgeline-w92zZqP2.js +2 -0
- package/dist/vue-ui-rings-DUEitXix.js +1 -0
- package/dist/vue-ui-scatter-D1XzJLsA.js +9 -0
- package/dist/{vue-ui-skeleton-CZMyXM-1.js → vue-ui-skeleton-Bpwe9ox7.js} +2 -2
- package/dist/{vue-ui-smiley-C00q-teB.js → vue-ui-smiley-AEw3JB0L.js} +1 -1
- package/dist/vue-ui-spark-trend-B3TKtyLN.js +1 -0
- package/dist/vue-ui-sparkbar-CjLLQ0Ja.js +1 -0
- package/dist/vue-ui-sparkgauge-9g7UUVWq.js +1 -0
- package/dist/vue-ui-sparkhistogram-B_rUkfjQ.js +1 -0
- package/dist/vue-ui-sparkline-BJj8LCeA.js +1 -0
- package/dist/vue-ui-sparkstackbar-B5rGYUUe.js +1 -0
- package/dist/vue-ui-stackbar-k0mVr3qM.js +29 -0
- package/dist/vue-ui-stackline-D1sDzsaB.js +17 -0
- package/dist/vue-ui-strip-plot-bZisAUWl.js +2 -0
- package/dist/vue-ui-table-YFjpQD5z.js +14 -0
- package/dist/vue-ui-table-heatmap-Bl_rGqXv.js +1 -0
- package/dist/{vue-ui-table-sparkline-39sKOqcp.js → vue-ui-table-sparkline-D-FHk6aF.js} +1 -1
- package/dist/vue-ui-thermometer-1gRm4qfW.js +1 -0
- package/dist/vue-ui-timer-Urv_5Bq7.js +65 -0
- package/dist/vue-ui-tiremarks-CUCnVEGx.js +1 -0
- package/dist/vue-ui-treemap-NgjoCq7g.js +1 -0
- package/dist/vue-ui-waffle-Cy9bR4eg.js +1 -0
- package/dist/vue-ui-wheel-DdwADpJ9.js +1 -0
- package/dist/vue-ui-word-cloud-I1lrCi6H.js +4 -0
- package/dist/vue-ui-world-CFZoRY_U.js +19 -0
- package/dist/vue-ui-xy-BjZ7rM8l.js +27 -0
- package/dist/vue-ui-xy-BqivEt9H.js +31 -0
- package/dist/{vue-ui-xy-canvas-CRSisgSA.js → vue-ui-xy-canvas-DGniRsGt.js} +2 -2
- package/dist/xyScaleTicks-DMX-D9Wd.js +1 -0
- package/dist/xyScales-Cb-Z9Qso.js +1 -0
- package/package.json +3 -3
- package/dist/BaseScanner-8NdoBs7B.js +0 -1
- package/dist/SlicerPreview-0m9E7Zh_.js +0 -1
- package/dist/Tooltip-C1q0Qoh7.js +0 -1
- package/dist/package-DWjs4THo.js +0 -1
- package/dist/useConfig-_JwRfIqE.js +0 -1
- package/dist/usePanZoom-CE6Ofyy8.js +0 -1
- package/dist/vue-data-ui-Da3HK_wb.js +0 -1
- package/dist/vue-ui-3d-bar-D1XfKXhp.js +0 -19
- package/dist/vue-ui-age-pyramid-CJqqtEIh.js +0 -1
- package/dist/vue-ui-annotator-D31LD4-s.js +0 -331
- package/dist/vue-ui-bullet-CxyL5Bdm.js +0 -34
- package/dist/vue-ui-bump-BWWMzAN_.js +0 -8
- package/dist/vue-ui-candlestick-CQXdyPEt.js +0 -22
- package/dist/vue-ui-carousel-table-DwsfnL_l.js +0 -1
- package/dist/vue-ui-chestnut-DV7XKL7g.js +0 -1
- package/dist/vue-ui-chord-DRNn_E6i.js +0 -21
- package/dist/vue-ui-circle-pack-BcA9ZxZS.js +0 -13
- package/dist/vue-ui-cursor-DSgVvP1L.js +0 -1
- package/dist/vue-ui-dag-CWpyU7AJ.js +0 -9
- package/dist/vue-ui-dashboard-Dh_Zi8oG.js +0 -1
- package/dist/vue-ui-digits-Cy3Y6qro.js +0 -42
- package/dist/vue-ui-donut-DasGeYdl.js +0 -47
- package/dist/vue-ui-donut-evolution-Bw7ilDYR.js +0 -2
- package/dist/vue-ui-dumbbell-BPvvKhag.js +0 -9
- package/dist/vue-ui-flow-XI5Y3qdk.js +0 -3
- package/dist/vue-ui-funnel-DqoQogQE.js +0 -1
- package/dist/vue-ui-galaxy-NRaBIHpn.js +0 -1
- package/dist/vue-ui-gauge-DX4SBIKS.js +0 -1
- package/dist/vue-ui-geo-C3e4J_kw.js +0 -1
- package/dist/vue-ui-gizmo-C9ls2b4h.js +0 -1
- package/dist/vue-ui-heatmap-D6KP1N8f.js +0 -1
- package/dist/vue-ui-history-plot-CowxWkEd.js +0 -2
- package/dist/vue-ui-horizontal-bar-CVP5jBNJ.js +0 -4
- package/dist/vue-ui-kpi-D1MUlURM.js +0 -1
- package/dist/vue-ui-molecule-BRB54XBD.js +0 -1
- package/dist/vue-ui-mood-radar-CkHJdUyF.js +0 -1
- package/dist/vue-ui-nested-donuts-C-7VZO11.js +0 -19
- package/dist/vue-ui-onion-erpKpDKg.js +0 -5
- package/dist/vue-ui-parallel-coordinate-plot-BDg0pRkN.js +0 -9
- package/dist/vue-ui-quadrant-CUdNxC6W.js +0 -2
- package/dist/vue-ui-quick-chart-DE5Zwioe.js +0 -16
- package/dist/vue-ui-radar-6y6er9ND.js +0 -1
- package/dist/vue-ui-relation-circle-CjnG9G7s.js +0 -1
- package/dist/vue-ui-ridgeline-B4qi2Ajl.js +0 -2
- package/dist/vue-ui-rings-EYfCkNB6.js +0 -1
- package/dist/vue-ui-scatter-Tw-5uRac.js +0 -9
- package/dist/vue-ui-spark-trend-Cmj4aWcQ.js +0 -1
- package/dist/vue-ui-sparkbar-Crq1Vui3.js +0 -1
- package/dist/vue-ui-sparkgauge-CN_9yenn.js +0 -1
- package/dist/vue-ui-sparkhistogram-CK7JmyCw.js +0 -1
- package/dist/vue-ui-sparkline-2_RlGrAT.js +0 -1
- package/dist/vue-ui-sparkstackbar-Dwdn2_9q.js +0 -1
- package/dist/vue-ui-stackbar-BVmQJn2b.js +0 -29
- package/dist/vue-ui-stackline-nvhui30B.js +0 -39
- package/dist/vue-ui-strip-plot-Dig2RljR.js +0 -2
- package/dist/vue-ui-table-_qSw3iGd.js +0 -14
- package/dist/vue-ui-table-heatmap-BwoRcqFD.js +0 -1
- package/dist/vue-ui-thermometer-CoVrrzHW.js +0 -1
- package/dist/vue-ui-timer-DoR5PqOa.js +0 -64
- package/dist/vue-ui-tiremarks-9tPPNGiq.js +0 -1
- package/dist/vue-ui-treemap-D3mZkT4P.js +0 -1
- package/dist/vue-ui-waffle-D2GfM_Se.js +0 -1
- package/dist/vue-ui-wheel-CYBaqHm6.js +0 -1
- package/dist/vue-ui-word-cloud-ClGL6iKL.js +0 -4
- package/dist/vue-ui-world-Dm7LSNB2.js +0 -19
- package/dist/vue-ui-xy-2VCMSzeE.js +0 -27
- package/dist/vue-ui-xy-DUlJcC9R.js +0 -31
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as ee}from"./tableIntegration-CNoJ1CIY.js";import{t as te}from"./chartImage-DPGnEuYM.js";import{n as ne}from"./resolveChartConfig-0IvbmIE_.js";import{$ as re,D as ie,Dt as ae,Ht as oe,J as se,Jt as ce,P as le,S as ue,U as de,X as fe,Zt as pe,_ as me,at as he,i as ge,in as _e,nt as ve,rn as ye,t as be,tn as xe,w as Se,xt as Ce,yt as we,zt as Te}from"./lib-rPeBMZrn.js";import{n as Ee,t as De}from"./useHints-C-TwxM0Y.js";import{t as Oe}from"./useConfig-9oDGTWWG.js";import{t as ke}from"./useSvgLabelLayout-42Kats14.js";import{t as Ae}from"./usePrinter-DVf3YcG5.js";import{t as je}from"./useLoading-BwiplGDB.js";import{t as Me}from"./useResponsive-CENUxfEL.js";import{t as Ne}from"./useChartExport-BZts4KFb.js";import{t as Pe}from"./useTransitions-ChGGrtrv.js";import{t as Fe}from"./useUserOptionState-CXlFnwPv.js";import{t as Ie}from"./useChartAccessibility-DOMuYJfm.js";import{t as Le}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Re}from"./vue_ui_parallel_coordinate_plot-Wb2Xmpjs.js";import{n as ze}from"./Title-BliHuXfT.js";import{t as Be}from"./Legend-W9YVYVX-.js";import{t as Ve}from"./Shape-CRe8woTu.js";import{t as He}from"./BaseScanner-m6QR9rwD.js";import{t as Ue}from"./A11yDataTable-DWNlWXzs.js";import{t as We}from"./BaseLegendToggle-VzX69MCo.js";import{t as Ge}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as c,Teleport as Ke,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as qe,createTextVNode as Je,createVNode as Ye,defineAsyncComponent as m,guardReactiveProps as h,mergeProps as Xe,nextTick as Ze,normalizeClass as g,normalizeProps as _,normalizeStyle as v,onBeforeUnmount as Qe,onMounted as $e,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as et,shallowRef as tt,toDisplayString as C,toRefs as nt,unref as w,watch as rt,withCtx as T}from"vue";var it=/* @__PURE__ */ e({default:()=>Ot}),at=[`id`],ot=[`id`],st=[`id`],ct={style:{position:`relative`}},lt=[`xmlns`,`aria-describedby`,`viewBox`],ut=[`x`,`y`,`width`,`height`],dt={style:{"pointer-events":`none`}},ft=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],pt=[`d`,`stroke`,`stroke-width`],mt={key:0},ht=[`transform`,`fill`,`font-size`,`font-weight`],gt=[`innerHTML`],_t={key:0},vt=[`x`,`y`,`font-size`,`fill`],yt=[`width`,`x`,`y`],bt={style:{width:`100%`}},xt=[`d`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],St=[`d`,`onMouseenter`,`onMouseleave`,`onClick`],Ct=[`transform`,`fill`,`font-weight`,`font-size`,`stroke`,`onMouseenter`,`onMouseleave`,`onClick`],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=/*#__PURE__*/ Ge({__name:`vue-ui-parallel-coordinate-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:Ge,emit:it}){let Ot=m(()=>import(`./Tooltip-B432XpvC.js`)),kt=m(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),At=m(()=>import(`./vue-ui-accordion-CnAwFOgA.js`).then(e=>e.n)),jt=m(()=>import(`./DataTable-KeuZB1JM.js`)),Mt=m(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Nt=m(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),Pt=m(()=>import(`./PackageVersion-B9qiUJPH.js`).then(e=>e.t)),Ft=m(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_parallel_coordinate_plot:It}=Oe(),E=e,Lt=l(()=>!!E.dataset?.length),Rt=b(0),D=b(null),zt=b(null),Bt=b(null),Vt=b(null),Ht=b(null),Ut=b(0),Wt=b(0),Gt=b(0),Kt=b(!1),qt=b(null),Jt=b(null),Yt=b(null),O=b(null),Xt=b({x:0,y:0}),k=b(`pointer`),Zt=b(!1),A=b(fe()),j=b(!1);function Qt(e){j.value=e,Rt.value+=1}let M=b(on()),N=l(()=>M.value.userOptions),P=l(()=>M.value.style.chart.yAxis.labels),F=l(()=>M.value.style.chart.tooltip),I=l(()=>M.value.style.chart),{transitionEnabled:L}=Pe({config:()=>M.value.transitions,dataset:()=>E.dataset});Ee({config:()=>M.value,dataset:()=>E.dataset,component:`VueUiParallelCoordinatePlot`,rules:[De.emptyArray,{test:e=>e.length>10,message:[`👀 There are > 10 series. Consider:`,``,`▶️ Using filters, to show less series at the same time and make the chart more readable.`]},{test:e=>e.some(e=>(e?.series??[]).some(e=>(e?.values??[]).length>15)),message:[`👀 There are > 15 axes, which can make the chart hard to read. Consider:`,``,`▶️ Using filters, to allow users to select a maximum set of metrics.`]},{test:e=>e.some(e=>e?.series?.length>5),message:[`👀 Some series have > 5 datapoints. Consider:`,``,`▶️ Using filters, to allow users to select a maximum set of metrics.`]}]});let R=l(()=>M.value.userOptions.useCursorPointer),$t=l(()=>_e({defaultConfig:{useCssAnimation:!1,userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,legend:{show:!0,backgroundColor:`transparent`},yAxis:{stroke:`#6A6A6A`,labels:{showAxisNames:!1,axisNames:[],ticks:{color:`#6A6A6A`}}}}}},userConfig:M.value.skeletonConfig??{}})),{loading:en,FINAL_DATASET:tn}=je({...nt(E),FINAL_CONFIG:M,prepareConfig:on,skeletonDataset:E.config?.skeletonDataset??[{name:``,shape:`circle`,color:`transparent`,series:[{name:``,values:[1,10,100,1e3]}]},{name:``,shape:`circle`,color:`#CACACA`,series:[{name:``,values:[.2,3,50,800]}]},{name:``,shape:`circle`,color:`transparent`,series:[{name:``,values:[0,0,0,0]}]}],skeletonConfig:_e({defaultConfig:M.value,userConfig:$t.value})}),{userOptionsVisible:nn,setUserOptionsVisibility:rn,keepUserOptionState:an}=Fe({config:M.value}),{svgRef:z}=Ie({config:I.value.title});function on(){return ne(E.config,It,Re)}let sn=pe(E.config);rt(()=>E.config,(e,t)=>{let n=pe(e),r=n!==sn;sn=n;let i=on();r?(en.value||(M.value=i),nn.value=!M.value.userOptions.showOnChartHover,Ut.value+=1,Gt.value+=1,Wt.value+=1,U.value.dataLabels.show=P.value.datapoints.show,U.value.showTable=M.value.table.show,U.value.showTooltip=F.value.show):(M.value.style.chart.tooltip=i.style.chart.tooltip,U.value.showTooltip=M.value.style.chart.tooltip.show)},{deep:!0});let cn=tt(null),ln=!1,un=b(!1),dn=0;$e(()=>{Kt.value=!0,pn()});let fn=l(()=>M.value.debug);function pn(){Te(E.dataset)?he({componentName:`VueUiParallelCoordinatePlot`,type:`dataset`,debug:fn.value}):E.dataset.forEach((e,t)=>{we({datasetObject:e,requiredAttributes:[`name`,`series`]}).forEach(e=>{he({componentName:`VueUiParallelCoordinatePlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:fn.value})})}),gn()}function mn(e=I.value.width,t=I.value.height,n=null){let r={width:e,height:t},i=[[`plotSize`,I.value.plots.radius,2],[`ticksFontSize`,P.value.ticks.fontSize,10],[`datapointFontSize`,P.value.datapoints.fontSize,10],[`axisNameFontSize`,P.value.axisNamesFontSize,12]];for(let[e,t,a]of i)r[e]=n!==null&&M.value.responsiveProportionalSizing?ye({relator:n,adjuster:600,source:t,threshold:a,fallback:a}):t;return r}function hn(){cancelAnimationFrame(dn),cn.value?.disconnect(),cn.value=null}function gn(){if(hn(),ln)return;if(un.value=!1,!M.value.responsive){B.value=mn();return}if(!D.value)return;let e=()=>{!ln&&M.value.responsive&&(cancelAnimationFrame(dn),dn=requestAnimationFrame(()=>{let{width:e,height:t}=Me({chart:D.value,title:I.value.title.text?zt.value:null,legend:I.value.legend.show?Bt.value:null,source:Vt.value,noTitle:Ht.value});B.value=mn(e,t-12,Math.min(e,t)),un.value=!0}))};cn.value=new ResizeObserver(e),cn.value.observe(D.value.parentNode),e()}Qe(()=>{ln=!0,hn()});let{isPrinting:_n,isImaging:vn,generatePdf:yn,generateImage:bn}=Ae({elementId:`pcp_${A.value}`,fileName:I.value.title.text||`vue-ui-parallel-coordinate-plot`,options:M.value.userOptions.print}),xn=l(()=>M.value.userOptions.show&&!I.value.title.text),B=b(mn()),Sn=l(()=>B.value.width),Cn=l(()=>B.value.height),{metrics:wn,ready:Tn,settling:V,update:En}=ke({svgRef:z,canMeasure:()=>!M.value.responsive||un.value,initialMetrics:{top:0},measure:e=>({top:e(Yt.value).height})}),Dn=l(()=>wn.value.top),H=l(()=>{let{top:e,right:t,bottom:n,left:r}=I.value.padding,i=Cn.value,a=Sn.value;return{chartHeight:Math.max(.001,i),chartWidth:Math.max(.001,a),height:Math.max(.001,i-e-n-Dn.value-B.value.datapointFontSize*2),width:Math.max(.001,a-r-t),top:e+Dn.value+B.value.datapointFontSize,left:r,right:a-t,bottom:i-n-B.value.datapointFontSize}}),On=l(()=>Se(M.value.customPalette)),U=b({dataLabels:{show:P.value.datapoints.show},showTable:M.value.table.show,showTooltip:F.value.show});rt(M,()=>{gn(),U.value={dataLabels:{show:P.value.datapoints.show},showTable:M.value.table.show,showTooltip:F.value.show}},{immediate:!0});let W=b([]);function kn(){W.value.length?W.value=[]:Pn.value.forEach(e=>{W.value.push(e.id)}),$n(`selectLegend`,In.value)}function An(e){W.value.includes(e)?W.value=W.value.filter(t=>t!==e):W.value.push(e),$n(`selectLegend`,In.value)}let G=l(()=>tn.value.map((e,t)=>{let n=ue(e.color)||On.value[t]||oe[t]||oe[t%oe.length];return{...e,series:(e.series||[]).map((r,i)=>({...r,id:`pcp_item_${A.value}_${e.id??t}_${r.id??i}`,color:n})),seriesIndex:t,color:n,id:`pcp_group_${A.value}_${e.id??t}`,shape:e.shape||`circle`}}));function jn(e){return G.value.length?G.value.find(t=>t.name===e)||(fn.value&&console.warn(`VueUiParallelCoordinatePlot - Series name not found "${e}"`),null):(fn.value&&console.warn(`VueUiParallelCoordinatePlot - There are no series to show.`),null)}function Mn(e){let t=jn(e);t!==null&&W.value.includes(t.id)&&An(t.id)}function Nn(e){let t=jn(e);t!==null&&(W.value.includes(t.id)||An(t.id))}let Pn=l(()=>G.value.map(e=>({...e,opacity:W.value.includes(e.id)?.5:1,segregate:()=>An(e.id),isSegregated:W.value.includes(e.id),shape:e.shape||`circle`}))),Fn=l(()=>({cy:`pcp-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`:``})),In=l(()=>G.value.filter(e=>!W.value.includes(e.id))),Ln=l(()=>In.value.flatMap(e=>e.series)),Rn=l(()=>Math.max(0,...Ln.value.map(e=>e.values.length))),K=l(()=>Rn.value?H.value.width/Rn.value:0);function zn(e,t){return H.value.bottom-H.value.height*((e-t.min)/(t.max-t.min))}function Bn(e){return H.value.left+K.value*e+K.value/2}function Vn(e,t){let n=e,r=t;return e===t&&(e>0?(n=e/4,r=t*2):e<0?(n=e*2,r=t/4):(n=0,r=1)),me(n,r,Math.max(2,I.value.yAxis.scaleTicks))}let q=l(()=>Array.from({length:Rn.value},(e,t)=>{let n=Ln.value.map(e=>e.values[t]||0),r=Vn(Math.min(...n),Math.max(...n));return{scale:r,ticks:r.ticks.map(e=>({y:zn(e,r),x:Bn(t),value:e})),name:P.value.axisNames[t]||`Y-${t+1}`}})),J=l(()=>In.value.map((e,t)=>({...e,series:e.series.map((n,r)=>{let i=n.values.map((i,a)=>({name:n.name,seriesName:e.name,axisIndex:a,datapointIndex:r,seriesIndex:t,value:i||0,x:Bn(a),y:zn(i||0,q.value[a].scale),comment:n.comments&&n.comments[a]||``})),a=de(i),o=le(i,.12);return{...n,datapoints:i,straightPath:a,smoothPath:o,pathLength:Ce(I.value.lines.smooth?`M ${o}`:`M ${a}`)}})}))),Y=l(()=>J.value.flatMap((e,t)=>e.series.map((n,r)=>({shape:e.shape,serieName:e.name,serie:n,relativeIndex:r,seriesIndex:e.seriesIndex,S:t,key:n.id})))),Hn=l(()=>new Map(Y.value.map(e=>[e.serie.id,e])));function X(e){return Hn.value.get(e.id)}function Un({value:e,index:t,datapoint:n}){return ge(P.value.formatters[t]||null,e,re({p:P.value.prefixes[t]||``,v:e,s:P.value.suffixes[t]||``,r:P.value.roundings[t]||0}),{datapoint:n,seriesIndex:t})}function Wn(e,t){let n=P.value;return{class:`vue-ui-parallel-coordinate-plot-x-label`,"data-cy":`pcp-axis-label`,fill:n.axisNamesColor,"font-size":B.value.axisNameFontSize,"font-weight":n.axisNamesBold?`bold`:``,"text-anchor":n.axisNamesRotation===0?`middle`:n.axisNamesRotation<0?`start`:`end`,transform:`translate(${Bn(t)}, ${Dn.value-B.value.axisNameFontSize}), rotate(${n.axisNamesRotation})`}}let Z=b(null),Gn=b(null),Kn=b(!1),qn=b(``);function Jn({shape:e,serie:t,S:n}){M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:{...t,shape:e},seriesIndex:n});let r=O.value===null?null:Y.value[O.value];k.value===`keyboard`&&r&&r.serie.id===t.id||(Z.value=null,Kn.value=!1)}function Yn(e){if(!z.value||!e?.datapoints?.length)return;let t=e.datapoints[Math.floor(e.datapoints.length/2)];if(!t)return;let n=xe(t.x,t.y,z.value);n&&(Xt.value=n)}function Q({shape:e,serieName:t,serie:n,relativeIndex:r,seriesIndex:i,S:a,triggerMode:o=`pointer`,notify:s=!0}){s&&M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:{...n,shape:e},seriesIndex:a}),k.value=o,Gn.value={config:M.value,datapoint:n,serie:n,relativeIndex:r,seriesIndex:i,series:G.value,scales:q.value},Kn.value=!0,Z.value=n.id;let ee=``,te=F.value.customFormat,ne=ae(te)?te({serie:n,seriesIndex:i,series:G.value,config:M.value,scales:q.value}):void 0;typeof ne==`string`?qn.value=ne:(ee+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${F.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${t?t+` - `:``}${n.name}</div>`,q.value.map(e=>e.name).forEach((e,t)=>{ee+=`
|
|
2
|
+
<div class="vue-ui-tooltip-item" style="text-align:left">
|
|
3
|
+
<span>${e}: </span>
|
|
4
|
+
<span>
|
|
5
|
+
${n.datapoints[t]?Un({value:n.datapoints[t].value,index:t,datapoint:n.datapoints[t]}):`-`}
|
|
6
|
+
</span>
|
|
7
|
+
</div>
|
|
8
|
+
`,I.value.comments.showInTooltip&&n.datapoints[t]?.comment&&(ee+=`<div class="vue-data-ui-tooltip-comment" style="background:${ce(n.color,12.5)}; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${n.color}">${n.datapoints[t].comment}</div>`)}),qn.value=`<div>${ee}</div>`),o===`keyboard`&&Ze(()=>{Yn(n)})}function Xn(){return G.value}let $=l(()=>{let e=[M.value.table.columnNames.series,M.value.table.columnNames.item].concat(q.value.map(e=>e.name));return{body:J.value.flatMap((e,t)=>e.series.map(t=>[e.name,t.name,...q.value.map((e,n)=>t.values[n]??`-`)])),head:e,config:{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},colNames:e}}),Zn=l(()=>J.value.length===0?{head:[],body:[],config:{},columnNames:[]}:{head:$.value.head,body:$.value.body});function Qn(e=null){let t=[[I.value.title.text],[I.value.title.subtitle.text],[``]],n=Zn.value.head,r=Zn.value.body,i=t.concat([n]).concat(r),a=ie(i);e?e(a):ve({csvContent:a,title:I.value.title.text||`vue-ui-parallel-coordinate-plot`})}let $n=it;function er({serie:e,shape:t,S:n}){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:{...e,shape:t},seriesIndex:n}),$n(`selectDatapoint`,e)}function tr(){U.value.showTable=!U.value.showTable}function nr(){U.value.dataLabels.show=!U.value.dataLabels.show}function rr(){U.value.showTooltip=!U.value.showTooltip}let ir=b(!1);function ar(){ir.value=!ir.value}let or=te(D,()=>I.value.title.text),sr=b({start:0,end:1}),cr=l(()=>q.value.map(e=>e.name));Le({timeLabelsEls:Yt,timeLabels:cr,slicer:sr,configRef:M,rotationPath:[`style`,`chart`,`yAxis`,`labels`,`axisNamesRotation`],autoRotatePath:[`style`,`chart`,`yAxis`,`labels`,`axisNamesAutoRotate`,`enable`],isAutoSize:!1,width:Sn,height:Cn,targetClass:`.vue-ui-parallel-coordinate-plot-x-label`,rotation:P.value.axisNamesAutoRotate.angle});let lr=l(()=>ee({config:M,style:I,mutableConfig:U,dialog:Ft,accordion:At,isFullscreen:j,parent:D,maxWidth:800,isCursorPointer:R}));rt(()=>U.value.showTable,e=>{qt.value&&s(e,M,qt)});function ur(){U.value.showTable=!1,Jt.value&&Jt.value.setTableIconState(!1)}let dr=l(()=>I.value.backgroundColor),fr=l(()=>I.value.legend),pr=l(()=>I.value.title),{isCallbackImaging:mr,isCallbackSvg:hr,generateSvg:gr,onGenerateImage:_r}=Ne({svg:z,title:pr,legend:fr,legendItems:Pn,backgroundColor:dr,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:bn});async function vr(){$n(`copyAlt`,{config:M.value,dataset:J.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:J.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function yr(e){let t=Y.value.length;return t?(e%t+t)%t:null}function br(){if(O.value!==null){let e=Y.value[O.value];e&&Jn({shape:e.shape,serie:e.serie,S:e.S})}O.value=null,k.value=`pointer`,Z.value=null,Kn.value=!1}function xr(){O.value=null,Zt.value=!0}function Sr(){br(),Zt.value=!1}function Cr(e){if(!z.value||ir.value||document.activeElement!==z.value||!Y.value.length)return;let t=[`ArrowUp`,`ArrowLeft`].includes(e.key),n=[`ArrowDown`,`ArrowRight`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){br();return}if(r){if(O.value===null)return;let e=Y.value[O.value];if(!e)return;er({serie:e.serie,shape:e.shape,S:e.S});return}let a=O.value;a=a===null?n?0:Y.value.length-1:yr(a+(n?1:-1));let o=Y.value[a];o&&(O.value=a,Q({shape:o.shape,serieName:o.serieName,serie:o.serie,relativeIndex:o.relativeIndex,seriesIndex:o.seriesIndex,S:o.S,triggerMode:`keyboard`}))}rt(Y,e=>{if(!Z.value)return;let t=e.findIndex(e=>e.serie.id===Z.value);t===-1?(O.value=null,k.value=`pointer`,Z.value=null,Kn.value=!1):(O.value!==null&&(O.value=t),Q({...e[t],triggerMode:k.value,notify:!1}))});let wr=l(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]??``,e[1]??``,...e.slice(2)]),caption:M.value.a11y.translations.tableCaption,notice:M.value.a11y.translations.tableAvailable}));return Ge({getData:Xn,getImage:or,generateCsv:Qn,generatePdf:yn,generateImage:bn,generateSvg:gr,hideSeries:Nn,showSeries:Mn,toggleTable:tr,toggleLabels:nr,toggleTooltip:rr,toggleAnnotator:ar,toggleFullscreen:Qt,copyAlt:vr}),rt(()=>[B.value,P.value,Yt.value,E.dataset,W.value,un.value,M.value.style.fontFamily],En,{flush:`post`,deep:!0}),(e,s)=>(y(),f(`div`,{ref_key:`pcpChart`,ref:D,class:g(`vue-data-ui-component vue-ui-pcp ${j.value?`vue-data-ui-wrapper-fullscreen`:``} ${M.value.useCssAnimation?``:`vue-ui-dna`}`),style:v(`font-family:${M.value.style.fontFamily};width:100%; text-align:center;background:${I.value.backgroundColor};${M.value.responsive?`height:100%`:``}`),id:`pcp_${A.value}`,onMouseenter:s[2]||=()=>w(rn)(!0),onMouseleave:s[3]||=()=>w(rn)(!1)},[p(`div`,{id:`chart-instructions-${A.value}`,class:`sr-only`},[p(`p`,null,C(M.value.a11y.translations.keyboardNavigation),1)],8,ot),M.value.a11y.includeTable&&wr.value.body.length?(y(),u(Ue,{key:0,uid:A.value,head:wr.value.head,body:wr.value.body,caption:wr.value.caption,notice:wr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):d(``,!0),N.value.buttons.annotator?(y(),u(w(Mt),Xe({key:1},w(a)(N.value.annotator),{svgRef:w(z),backgroundColor:I.value.backgroundColor,color:I.value.color,active:ir.value,isCursorPointer:R.value,palette:N.value.annotatorPalette,onClose:ar}),qe({_:2},[x(w(o),t=>({name:t,fn:T(n=>[S(e.$slots,t,_(h(w(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):d(``,!0),xn.value?(y(),f(`div`,{key:2,ref_key:`noTitle`,ref:Ht,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):d(``,!0),I.value.title.text?(y(),f(`div`,{key:3,ref_key:`chartTitle`,ref:zt,style:`width:100%;background:transparent;padding-bottom:24px`},[(y(),u(ze,{key:`title_${Ut.value}`,config:{title:{cy:`pcp-div-title`,...I.value.title},subtitle:{cy:`pcp-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))],512)):d(``,!0),p(`div`,{id:`legend-top-${A.value}`},null,8,st),N.value.show&&Lt.value&&(w(an)||w(nn))?(y(),u(w(Nt),Xe({ref_key:`userOptionsRef`,ref:Jt,key:`user_options_${Rt.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isPrinting:w(_n),isImaging:w(vn),uid:A.value,hasTooltip:N.value.buttons.tooltip&&F.value.show,isFullscreen:j.value,isTooltip:U.value.showTooltip,chartElement:D.value},w(n)(N.value,`pdf csv img svg labels table fullscreen altCopy annotator`),{isAnnotation:ir.value,tableDialog:M.value.table.useDialog,isCursorPointer:R.value,onToggleFullscreen:Qt,onGeneratePdf:w(yn),onGenerateCsv:Qn,onGenerateImage:w(_r),onGenerateSvg:w(gr),onToggleTable:tr,onToggleLabels:nr,onToggleTooltip:rr,onToggleAnnotator:ar,onCopyAlt:vr,style:{visibility:w(an)?w(nn)?`visible`:`hidden`:`visible`}}),qe({_:2},[x(w(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,_(h(w(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isFullscreen`,`isTooltip`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):d(``,!0),p(`div`,ct,[(y(),f(`svg`,{ref_key:`svgRef`,ref:z,xmlns:w(be),"aria-describedby":`chart-instructions-${A.value}`,class:g({"vue-data-ui-fullscreen--on":j.value,"vue-data-ui-fulscreen--off":!j.value,"vue-data-ui-no-transition":!w(L)||w(V)}),viewBox:`0 0 ${H.value.chartWidth<=0?10:H.value.chartWidth} ${H.value.chartHeight<=0?10:H.value.chartHeight}`,style:v(`max-width:100%; overflow: visible; background:transparent;color:${I.value.color};visibility:${w(Tn)?`visible`:`hidden`}`),tabindex:`0`,onFocus:xr,onBlur:Sr,onKeydown:Cr},[Ye(w(Pt)),S(e.$slots,`svg-underlayer`,{svg:{...H.value,isPrintingImg:w(_n)||w(vn)||w(mr),isPrintingSvg:w(hr)}},void 0,!0),e.$slots[`chart-background`]?(y(),f(`foreignObject`,{key:0,x:H.value.left,y:H.value.top,width:H.value.width,height:H.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,ut)):d(``,!0),(y(!0),f(c,null,x(q.value,(e,t)=>(y(),f(`g`,dt,[p(`line`,{x1:H.value.left+K.value*t+K.value/2,x2:H.value.left+K.value*t+K.value/2,y1:H.value.top,y2:H.value.bottom,stroke:I.value.yAxis.stroke,"stroke-width":I.value.yAxis.strokeWidth},null,8,ft),P.value.ticks.show?(y(),f(c,{key:0},[(y(!0),f(c,null,x(e.ticks,(t,n)=>(y(),f(`path`,{class:g({"vue-data-ui-transition":w(L)&&!w(V)}),key:`tick_${e.name}_${n}`,d:`M${t.x},${t.y} ${t.x-10},${t.y}`,stroke:I.value.yAxis.stroke,"stroke-width":I.value.yAxis.strokeWidth,style:v(`opacity:${Z.value&&!U.value.showTooltip?.2:1}`)},null,14,pt))),128)),w(en)?d(``,!0):(y(),f(`g`,mt,[(y(!0),f(c,null,x(e.ticks,(n,r)=>(y(),f(`text`,{key:`tl_${e.name}_${r}`,class:g({"vue-data-ui-transition":w(L)&&!w(V)}),transform:`translate(${n.x-12+P.value.ticks.offsetX}, ${n.y+P.value.ticks.offsetY+B.value.ticksFontSize/3})`,fill:P.value.ticks.color,"text-anchor":`end`,"font-size":B.value.ticksFontSize,"font-weight":P.value.ticks.bold?`bold`:`normal`,style:v(`opacity:${Z.value&&!U.value.showTooltip?.2:1}`)},C(Un({value:n.value,index:t,datapoint:n})),15,ht))),128))]))],64)):d(``,!0)]))),256)),P.value.showAxisNames?(y(),f(`g`,{key:1,ref_key:`xAxisLabels`,ref:Yt},[(y(!0),f(c,null,x(q.value,(e,t)=>(y(),f(c,null,[String(e.name).includes(`
|
|
9
|
+
`)?(y(),f(`text`,Xe({key:1,ref_for:!0},Wn(e,t),{innerHTML:w(se)({content:String(e.name),fontSize:B.value.axisNameFontSize,fill:P.value.axisNamesColor,x:0,y:0})}),null,16,gt)):(y(),f(`text`,Xe({key:0,ref_for:!0},Wn(e,t)),C(e.name),17))],64))),256))],512)):d(``,!0),(y(!0),f(c,null,x(J.value,(t,n)=>(y(),f(`g`,null,[(y(!0),f(c,null,x(t.series,(n,r)=>(y(),f(`g`,null,[I.value.plots.show?(y(),f(`g`,_t,[(y(!0),f(c,null,x(n.datapoints,(e,r)=>(y(),u(Ve,{plot:{x:e.x,y:e.y},color:t.color,shape:t.shape,radius:t.shape===`triangle`?B.value.plotSize*1.2:B.value.plotSize,stroke:I.value.backgroundColor,strokeWidth:.5,onMouseenter:e=>Q(X(n)),onMouseleave:e=>Jn(X(n)),style:v(`opacity:${Z.value?Z.value===n.id?I.value.plots.opacity:.2:I.value.plots.opacity}`),onClick:()=>er(X(n))},null,8,[`plot`,`color`,`shape`,`radius`,`stroke`,`onMouseenter`,`onMouseleave`,`style`,`onClick`]))),256)),U.value.showTooltip?d(``,!0):(y(),f(c,{key:0},[Z.value&&Z.value===n.id&&n.datapoints.length?(y(),f(`text`,{key:0,x:n.datapoints[0].x-B.value.ticksFontSize,y:n.datapoints[0].y+B.value.ticksFontSize/3,"text-anchor":`end`,"font-size":B.value.ticksFontSize,fill:t.color,"font-weight":`bold`},C(n.name),9,vt)):d(``,!0)],64)),I.value.comments.show?(y(!0),f(c,{key:1},x(n.datapoints,n=>(y(),f(`g`,null,[n.comment?(y(),f(`foreignObject`,{key:0,style:{overflow:`visible`},height:`12`,width:I.value.comments.width,x:n.x-I.value.comments.width/2+I.value.comments.offsetX,y:n.y+I.value.comments.offsetY+6},[p(`div`,bt,[S(e.$slots,`plot-comment`,{plot:{...n,color:t.color}},void 0,!0)])],8,yt)):d(``,!0)]))),256)):d(``,!0)])):d(``,!0),p(`path`,{d:`M${I.value.lines.smooth?n.smoothPath:n.straightPath}`,stroke:t.color,"stroke-width":I.value.lines.strokeWidth,fill:`none`,class:g({"vue-ui-pcp-animated vue-data-ui-line-animated":M.value.useCssAnimation,"vue-data-ui-transition":w(L)&&!w(V)}),onMouseenter:e=>Q(X(n)),onMouseleave:e=>Jn(X(n)),onClick:()=>er(X(n)),style:v(`opacity:${Z.value?Z.value===n.id?I.value.lines.opacity:.2:I.value.lines.opacity}; stroke-dasharray:${n.pathLength}; stroke-dashoffset: ${M.value.useCssAnimation?n.pathLength:0}`)},null,46,xt),U.value.showTooltip?(y(),f(`path`,{key:1,d:`M${I.value.lines.smooth?n.smoothPath:n.straightPath}`,stroke:`transparent`,"stroke-width":12,fill:`none`,class:g({"vue-ui-pcp-animated vue-data-ui-line-animated":M.value.useCssAnimation,"vue-data-ui-transition":w(L)&&!w(V)}),onMouseenter:e=>Q(X(n)),onMouseleave:e=>Jn(X(n)),onClick:()=>er(X(n)),style:{opacity:`0`}},null,42,St)):d(``,!0)]))),256))]))),256)),(y(!0),f(c,null,x(J.value,(e,t)=>(y(),f(`g`,null,[(y(!0),f(c,null,x(e.series,(t,n)=>(y(),f(`g`,null,[!w(en)&&(U.value.dataLabels.show||Z.value&&Z.value===t.id)?(y(!0),f(c,{key:0},x(t.datapoints,(n,r)=>(y(),f(`text`,{key:`pl_${t.id}_${r}`,transform:`translate(${n.x+12+P.value.datapoints.offsetX}, ${n.y+P.value.datapoints.offsetY+B.value.datapointFontSize/3})`,fill:P.value.datapoints.useSerieColor?e.color:P.value.datapoints.color,"text-anchor":`start`,"font-weight":P.value.datapoints.bold?`bold`:`normal`,class:g({"vue-ui-pcp-plot-label":!0,"vue-data-ui-transition":w(L)&&!w(V)}),"font-size":B.value.datapointFontSize,stroke:I.value.backgroundColor,"stroke-width":3,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`,onMouseenter:e=>Q(X(t)),onMouseleave:e=>Jn(X(t)),onClick:()=>er(X(t)),style:v(`opacity:${Z.value?Z.value===t.id?1:.2:1}`)},C(Un({value:n.value,index:r,datapoint:n})),47,Ct))),128)):d(``,!0)]))),256))]))),256)),S(e.$slots,`svg`,{svg:{...H.value,isPrintingImg:w(_n)||w(vn)||w(mr),isPrintingSvg:w(hr)}},void 0,!0)],46,lt)),e.$slots.hint?(y(),f(`div`,wt,[S(e.$slots,`hint`,_(h({hint:M.value.a11y.translations.keyboardNavigation,isVisible:Zt.value})),void 0,!0)])):d(``,!0)]),e.$slots.watermark?(y(),f(`div`,Tt,[S(e.$slots,`watermark`,_(h({isPrinting:w(_n)||w(vn)||w(mr)||w(hr)})),void 0,!0)])):d(``,!0),p(`div`,{id:`legend-bottom-${A.value}`},null,8,Et),Kt.value&&(I.value.legend.show||e.$slots.legend)?(y(),u(Ke,{key:6,to:I.value.legend.position===`top`?`#legend-top-${A.value}`:`#legend-bottom-${A.value}`},[p(`div`,{ref_key:`chartLegend`,ref:Bt},[S(e.$slots,`legend`,{legend:Pn.value},()=>[I.value.legend.show&&Lt.value?(y(),u(Be,{key:`legend_${Wt.value}`,legendSet:Pn.value,config:Fn.value,isCursorPointer:R.value,onClickMarker:s[0]||=({legend:e})=>{An(e.id)}},{item:T(({legend:e,index:t})=>[p(`div`,{onClick:t=>e.segregate(),style:v(`opacity:${W.value.includes(e.id)?.5:1}`)},C(e.name),13,Dt)]),legendToggle:T(()=>[Pn.value.length>2&&I.value.legend.selectAllToggle.show&&!w(en)?(y(),u(We,{key:0,backgroundColor:I.value.legend.selectAllToggle.backgroundColor,color:I.value.legend.selectAllToggle.color,fontSize:I.value.legend.fontSize,checked:W.value.length>0,isCursorPointer:R.value,onToggle:kn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):d(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):d(``,!0)],!0)],512)],8,[`to`])):d(``,!0),e.$slots.source?(y(),f(`div`,{key:7,ref_key:`source`,ref:Vt,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):d(``,!0),Ye(w(Ot),{teleportTo:F.value.teleportTo,show:U.value.showTooltip&&Kn.value,backgroundColor:F.value.backgroundColor,color:F.value.color,fontSize:F.value.fontSize,borderRadius:F.value.borderRadius,borderColor:F.value.borderColor,borderWidth:F.value.borderWidth,backgroundOpacity:F.value.backgroundOpacity,position:F.value.position,offsetX:F.value.offsetX,offsetY:F.value.offsetY,parent:D.value,content:qn.value,isFullscreen:j.value,isCustom:w(ae)(F.value.customFormat),smooth:F.value.smooth,backdropFilter:F.value.backdropFilter,smoothForce:F.value.smoothForce,smoothSnapThreshold:F.value.smoothSnapThreshold,isA11yMode:k.value===`keyboard`,a11yPosition:Xt.value},{"tooltip-before":T(()=>[S(e.$slots,`tooltip-before`,_(h({...Gn.value})),void 0,!0)]),tooltip:T(()=>[S(e.$slots,`tooltip`,_(h({...Gn.value})),void 0,!0)]),"tooltip-after":T(()=>[S(e.$slots,`tooltip-after`,_(h({...Gn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),Lt.value&&N.value.buttons.table?(y(),u(et(lr.value.component),Xe({key:8},lr.value.props,{ref_key:`tableUnit`,ref:qt,onClose:ur}),qe({content:T(()=>[(y(),u(w(jt),{key:`table_${Gt.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:M.value.table.useDialog?``:lr.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:R.value,onClose:ur},{th:T(({th:e})=>[p(`div`,null,C(e),1)]),td:T(({td:e})=>[Je(C(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:T(()=>[Je(C(lr.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:T(()=>[p(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[1]||=e=>Qn(N.value.callbacks.csv),style:v({cursor:R.value?`pointer`:`default`})},[Ye(w(kt),{name:`fileCsv`,stroke:lr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):d(``,!0),S(e.$slots,`skeleton`,{},()=>[w(en)?(y(),u(He,{key:0})):d(``,!0)],!0)],46,at))}},[[`__scopeId`,`data-v-d8e8257e`]]);export{it as n,Ot 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"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as c}from"./tableIntegration-CNoJ1CIY.js";import{t as l}from"./chartImage-DPGnEuYM.js";import{n as ee}from"./resolveChartConfig-0IvbmIE_.js";import{$ as te,Ct as ne,D as re,Dt as ie,Ht as ae,J as oe,Jt as se,S as ce,X as le,Yt as ue,Zt as de,at as fe,i as pe,in as me,jt as he,nt as ge,r as _e,t as ve,w as ye,zt as be}from"./lib-rPeBMZrn.js";import{n as xe,t as Se}from"./useHints-C-TwxM0Y.js";import{t as Ce}from"./useConfig-9oDGTWWG.js";import{t as we}from"./useLoading-BwiplGDB.js";import{t as Te}from"./usePrinter-DVf3YcG5.js";import{t as Ee}from"./useResponsive-CENUxfEL.js";import{t as De}from"./useChartExport-BZts4KFb.js";import{t as Oe}from"./useUserOptionState-CXlFnwPv.js";import{t as ke}from"./useChartAccessibility-DOMuYJfm.js";import{n as Ae}from"./Title-BliHuXfT.js";import{t as je}from"./Shape-CRe8woTu.js";import{t as Me}from"./vue_ui_quadrant-DbLNBD92.js";import{t as Ne}from"./Legend-W9YVYVX-.js";import{t as Pe}from"./BaseScanner-m6QR9rwD.js";import{t as Fe}from"./A11yDataTable-DWNlWXzs.js";import{t as Ie}from"./BaseLegendToggle-VzX69MCo.js";import{t as Le}from"./DefGrad-DKMq1REY.js";import{t as Re}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as u,Teleport as ze,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Be,createTextVNode as Ve,createVNode as He,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Ue,nextTick as We,normalizeClass as Ge,normalizeProps as v,normalizeStyle as y,onBeforeUnmount as Ke,onMounted as qe,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as Je,shallowRef as Ye,toDisplayString as w,toRefs as Xe,unref as T,watch as Ze,withCtx as E}from"vue";var Qe=/* @__PURE__ */ e({default:()=>qt}),$e=[`id`],et=[`id`],tt=[`id`],nt={style:{position:`relative`}},rt=[`xmlns`,`aria-describedby`,`viewBox`,`id`],it=[`x`,`y`,`width`,`height`],at={key:1},ot=[`fill`,`x`,`y`,`height`,`width`,`stroke-width`,`stroke`,`rx`],st=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],ct=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],lt={key:2},ut=[`points`,`fill`],dt=[`points`,`fill`],ft=[`points`,`fill`],pt=[`points`,`fill`],mt={key:3},ht=[`x`,`y`,`text-anchor`,`fill`,`font-size`,`onClick`],gt={key:4},_t=[`x`,`y`,`font-size`,`fill`],vt=[`x`,`y`,`font-size`,`fill`],yt=[`x`,`y`,`font-size`,`fill`],bt=[`id`,`font-size`,`transform`,`fill`],xt=[`id`,`font-size`,`transform`,`fill`],St=[`id`,`font-size`,`transform`,`fill`],Ct={key:5},wt=[`fill`,`points`],Tt=[`onClick`,`x`,`y`,`width`,`height`],Et=[`x`,`y`,`onMouseenter`,`onMouseleave`,`onClick`],Dt=[`data-a11y-plot-id`,`cx`,`cy`,`r`],Ot=[`data-a11y-plot-id`,`cx`,`cy`,`r`],kt={key:0,style:{"pointer-events":`none`}},At=[`innerHTML`],jt={key:0},Mt=[`x`,`y`,`onMouseover`,`onMouseleave`,`onClick`],Nt={key:8,class:`vue-ui-dna`},Pt=[`points`,`fill`],Ft={key:9},It=[`x`,`y`,`font-size`,`fill`,`font-weight`],Lt={key:10},Rt=[`x`,`y`,`fill`,`onClick`],zt=[`stroke`,`d`],Bt=[`stroke`,`d`],Vt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ht={key:5,class:`vue-data-ui-watermark`},Ut=[`id`],Wt=[`onClick`],Gt={key:0,height:`14`,width:`14`,viewBox:`0 0 20 20`},Kt=[`innerHTML`],qt=/*#__PURE__*/ Re({__name:`vue-ui-quadrant`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectPlot`,`selectSide`,`selectLegend`,`copyAlt`],setup(e,{expose:Re,emit:Qe}){let qt=g(()=>import(`./Tooltip-B432XpvC.js`)),Jt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Yt=g(()=>import(`./vue-ui-accordion-CnAwFOgA.js`).then(e=>e.n)),Xt=g(()=>import(`./DataTable-KeuZB1JM.js`)),Zt=g(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Qt=g(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),$t=g(()=>import(`./PackageVersion-B9qiUJPH.js`).then(e=>e.t)),en=g(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_quadrant:tn}=Ce(),D=e,nn=d(()=>!!D.dataset&&D.dataset.length),O=x(le()),rn=Qe,an=x(!1),on=x(``),sn=x(0),k=x(!1),A=x(null),cn=x(null),ln=x(null),un=x(null),dn=x(null),fn=x(0),pn=x(0),mn=x(0),hn=x(!1),gn=x(null),_n=x(null),j=x(null),vn=x(null),yn=x({x:0,y:0}),bn=x(`pointer`),xn=x(!1),M=x(On()),N=d(()=>M.value.userOptions),P=d(()=>M.value.style.chart.layout.grid),F=d(()=>M.value.style.chart.layout.labels),I=d(()=>M.value.style.chart.tooltip),L=d(()=>M.value.style.chart);xe({config:()=>M.value,dataset:()=>D.dataset,component:`VueUiQuadrant`,rules:[Se.emptyArray,Se.noHint]});let R=d(()=>M.value.userOptions.useCursorPointer),Sn=d(()=>({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A`,graduations:{stroke:`#6A6A6A`,color:`#6A6A6A90`},xAxis:{auto:!0},yAxis:{auto:!0}},labels:{quadrantLabels:{show:!1},plotLabels:{show:!1},axisLabels:{show:!1}},plots:{outlineColor:`#6A6A6A`}},legend:{backgroundColor:`transparent`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:Cn,FINAL_DATASET:wn}=we({...Xe(D),FINAL_CONFIG:M,prepareConfig:On,skeletonDataset:D.config?.skeletonDataset??[{name:`_`,shape:`circle`,color:`#CACACA`,series:[{name:`_`,x:-6,y:-4},{name:`_`,x:-5,y:-2},{name:`_`,x:-4,y:-1},{name:`_`,x:-3,y:-.5},{name:`_`,x:-2,y:-.25},{name:`_`,x:-1,y:-.135},{name:`_`,x:0,y:0},{name:`_`,x:1,y:.135},{name:`_`,x:2,y:.25},{name:`_`,x:3,y:.5},{name:`_`,x:4,y:1},{name:`_`,x:5,y:2},{name:`_`,x:6,y:4}]}],skeletonConfig:me({defaultConfig:M.value,userConfig:Sn.value})}),{userOptionsVisible:Tn,setUserOptionsVisibility:En,keepUserOptionState:Dn}=Oe({config:M.value}),{svgRef:z}=ke({config:L.value.title});function On(){return ee(D.config,tn,Me)}let kn=de(D.config);Ze(()=>D.config,(e,t)=>{let n=de(e),r=n!==kn;kn=n;let i=On();r?(Cn.value||(M.value=i),Tn.value=!M.value.userOptions.showOnChartHover,fn.value+=1,pn.value+=1,mn.value+=1,B.value.plotLabels.show=F.value.plotLabels.show,B.value.showTable=M.value.table.show,B.value.showTooltip=I.value.show):(M.value.style.chart.tooltip=i.style.chart.tooltip,B.value.showTooltip=M.value.style.chart.tooltip.show)},{deep:!0});let An=Ye(null),jn=!1,Mn=null,Nn=d(()=>M.value.debug);function Pn(){be(D.dataset)?fe({componentName:`VueUiQuadrant`,type:`dataset`,debug:Nn.value}):Nn.value&&D.dataset.forEach((e,t)=>{[null,void 0].includes(e.name)&&fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.series)?fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`series`,index:t}):e.series.forEach((e,t)=>{[null,void 0].includes(e.name)&&fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`name`,key:`series`,index:t})})}),In()}function Fn(){An.value?.disconnect(),An.value=null,Mn!==null&&cancelAnimationFrame(Mn),Mn=null}function In(){if(Fn(),jn)return;if(!M.value.responsive){Wn(L.value.width,L.value.height);return}if(!A.value)return;let e=()=>{!jn&&M.value.responsive&&Mn===null&&(Mn=requestAnimationFrame(()=>{Mn=null;let{width:e,height:t}=Ee({chart:A.value,title:L.value.title.text?cn.value:null,legend:L.value.legend.show?ln.value:null,source:un.value,noTitle:dn.value});Wn(e,t)}))};An.value=new ResizeObserver(e),An.value.observe(A.value.parentNode),e()}qe(()=>{hn.value=!0,Pn()}),Ke(()=>{jn=!0,Fn(),Yn()});let{isPrinting:Ln,isImaging:Rn,generatePdf:zn,generateImage:Bn}=Te({elementId:`vue-ui-quadrant_${O.value}`,fileName:L.value.title.text||`vue-ui-quadrant`,options:M.value.userOptions.print}),Vn=d(()=>M.value.userOptions.show&&!L.value.title.text),Hn=d(()=>ye(M.value.customPalette)),B=x({plotLabels:{show:F.value.plotLabels.show},showTable:M.value.table.show,showTooltip:I.value.show});function Un(e,t){return{height:t,usableHeight:t-96,width:e,usableWidth:e-96,top:48,left:48,right:e-48,bottom:t-48,centerX:e/2,centerY:t-t/2,padding:48}}let V=x(Un(L.value.width,L.value.height));function Wn(e,t){(V.value.width!==e||V.value.height!==t)&&(V.value=Un(e,t))}let H=x({...V.value,startX:0,startY:0}),U=x(null),Gn=x(null),Kn=x(!1),qn=0,Jn=d(()=>M.value.zoomEnabled),W=[{id:`TL`,key:`tl`,right:!1,bottom:!1,fallback:`Top Left`},{id:`TR`,key:`tr`,right:!0,bottom:!1,fallback:`Top Right`},{id:`BR`,key:`br`,right:!0,bottom:!0,fallback:`Bottom Right`},{id:`BL`,key:`bl`,right:!1,bottom:!0,fallback:`Bottom Left`}],G=d(()=>{let e=W.find(e=>e.id===U.value);if(!e)return{x:0,y:0,text:``,fontSize:0,fill:`none`,bold:!1};let t=F.value.quadrantLabels[e.key];return{x:H.value.startX+H.value.width/2,y:H.value.height*(e.bottom?1.678:1),text:t.text||e.fallback,fontSize:t.fontSize,fill:t.color,bold:t.bold}});function Yn(){qn+=1,Gn.value!==null&&cancelAnimationFrame(Gn.value),Gn.value=null,Kn.value=!1}function Xn(){Yn(),H.value={...V.value,startX:0,startY:0},U.value=null,k.value=!1}Ze(V,Xn,{deep:!0}),Ze(M,()=>{B.value={plotLabels:{show:F.value.plotLabels.show},showTable:M.value.table.show,showTooltip:I.value.show},In()},{flush:`post`});function Zn({targetX:e,targetY:t,targetW:n,targetH:r,side:i}){U.value&&Sr(i),Yn();let a=qn,o={...H.value},s=Number(M.value.zoomAnimationFrames),c=Number.isFinite(s)?Math.max(1,Math.trunc(s)):1,l=0;Kn.value=!0;function ee(){if(jn||a!==qn)return;l+=1;let i=l/c;Object.assign(H.value,{startX:l===c?e:o.startX+(e-o.startX)*i,startY:l===c?t:o.startY+(t-o.startY)*i,width:l===c?n:o.width+(n-o.width)*i,height:l===c?r:o.height+(r-o.height)*i}),l<c?Gn.value=requestAnimationFrame(ee):(Gn.value=null,Kn.value=!1)}ee()}function Qn(e){if(!Jn.value||Kn.value)return;let t=W.find(t=>t.id===e);t&&(k.value&&U.value===e?(Zn({targetX:0,targetY:0,targetW:V.value.width,targetH:V.value.height}),U.value=null,k.value=!1):(U.value=e,Zn({targetX:t.right?V.value.width/2-V.value.left:0,targetY:t.bottom?V.value.height/2-V.value.top:0,targetW:V.value.width/2+V.value.left,targetH:V.value.height/2+V.value.top,side:t.key}),k.value=!0))}let $n=d(()=>{let e=P.value.graduations.steps,t=V.value.usableWidth/(e*2),n=V.value.top,r=[];for(let i=0;i<e;i+=1)r.push({x:V.value.padding+t*i,y:n+V.value.usableHeight*(i/e/2),height:V.value.usableHeight*(1-i/e),width:V.value.usableWidth*(1-i/e),opacity:Math.round((i+1)/e*20)});return r}),K=d(()=>{let e=P.value.xAxis.max,t=P.value.xAxis.min,n=P.value.yAxis.max,r=P.value.yAxis.min;if(P.value.xAxis.auto||P.value.yAxis.auto){let i=1/0,a=-1/0,o=1/0,s=-1/0;for(let e of er.value)for(let t of e.series)i=Math.min(i,t.x),a=Math.max(a,t.x),o=Math.min(o,t.y),s=Math.max(s,t.y);P.value.xAxis.auto&&(t=i,e=a),P.value.yAxis.auto&&(r=o,n=s)}return{x:{max:e,min:t},y:{max:n,min:r}}}),q=x([]),er=d(()=>wn.value.map((e,t)=>({...e,series:he({data:e.series,threshold:M.value.downsample.threshold}),id:`cat_${t}_${O.value}`,color:ce(e.color)||Hn.value[t]||ae[t]}))),tr=d(()=>er.value.filter(e=>!q.value.includes(e.id))),J=d(()=>(Nn.value&&wn.value.forEach((e,t)=>{e.series.forEach((e,t)=>{[null,void 0].includes(e.x)&&fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`x`,key:`series`,index:t}),[null,void 0].includes(e.y)&&fe({componentName:`VueUiQuadrant`,type:`datasetSerieAttribute`,property:`y`,key:`series`,index:t})})}),tr.value.map((e,t)=>({...e,shape:e.shape||`circle`,color:e.color||Hn.value[t]||ae[t],series:e.series.map((t,n)=>({...t,category:e,x:nr(t.x),y:rr(t.y),xValue:t.x,yValue:t.y,quadrantSide:fr({x:t.x,y:t.y}),categoryName:e.name,shape:e.shape,color:e.color,uid:`plot_${e.id}_${t.id??n}`}))}))));function nr(e){if(e===0||(e>=0?K.value.x.max:K.value.x.min)===0)return V.value.centerX;if(e>=0){let t=e/K.value.x.max;return V.value.centerX+V.value.usableWidth/2*t}{let t=Math.abs(e)/Math.abs(K.value.x.min);return V.value.centerX-V.value.usableWidth/2*t}}function rr(e){if((e>=0?K.value.y.max:K.value.y.min)===0)return V.value.centerY;if(e>=0){let t=e/K.value.y.max;return V.value.centerY+(1-V.value.usableHeight/2*t)}{let t=Math.abs(e)/Math.abs(K.value.y.min);return V.value.centerY-(1-V.value.usableHeight/2*t)}}let ir=d(()=>{let e=J.value.flatMap(e=>e.series.map(t=>({x:t.xValue,y:t.yValue,name:t.name,category:t.categoryName,quadrantSide:t.quadrantSide,sideName:F.value.quadrantLabels[t.quadrantSide].text,color:e.color,shape:e.shape}))),t=P.value.xAxis.name||`x`,n=P.value.yAxis.name||`y`;return{head:[M.value.translations.category,M.value.translations.item,t,n,M.value.translations.side],body:e.map(e=>[e.category,e.name,e.x,e.y,e.sideName||e.quadrantSide]),tableData:e}});function Y(e,t,n,r){return pe(F.value.plotLabels[t].formatter,e,te({v:e,r:n}),r)}let ar=d(()=>{let e=ir.value.head,t=ir.value.tableData.map(e=>[{shape:e.shape,color:e.color,name:e.category},e.name,Y(e.x,`x`,F.value.plotLabels.rounding),Y(e.y,`y`,F.value.plotLabels.rounding),e.sideName||e.quadrantSide]);return{head:e,body:t,a11yBody:t.map(e=>e.map((e,t)=>t===0?e.name??``:e)),config:{th:{backgroundColor: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},colNames:e}});function or(){q.value.length?q.value=[]:X.value.forEach(e=>{q.value.push(e.id)}),rn(`selectLegend`,Tr())}function sr(e){q.value.includes(e)?q.value=q.value.filter(t=>t!==e):q.value.push(e),rn(`selectLegend`,Tr())}let X=d(()=>er.value.map(e=>({name:e.name,shape:e.shape||`circle`,color:e.color,id:e.id,opacity:q.value.includes(e.id)?.5:1,segregate:()=>sr(e.id),isSegregated:q.value.includes(e.id)})));function cr(e){return X.value.length?X.value.find(t=>t.name===e)||(Nn.value&&console.warn(`VueUiQuadrant - Series name not found "${e}"`),null):(Nn.value&&console.warn(`VueUiQuadrant - There are no series to show.`),null)}function lr(e){let t=cr(e);t!==null&&q.value.includes(t.id)&&sr(t.id)}function ur(e){let t=cr(e);t!==null&&(q.value.includes(t.id)||sr(t.id))}let dr=d(()=>({cy:`quadrant-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``}));function fr(e){switch(!0){case e.x>=0&&e.y>=0:return`tr`;case e.x>=0&&e.y<0:return`br`;case e.x<0&&e.y<0:return`bl`;case e.x<0&&e.y>=0:return`tl`;default:return``}}let Z=x(null),pr=x(null),mr=x(null);function hr(){Z.value=null,pr.value=null,j.value=null,vn.value=null,an.value=!1}function gr(e){if(!z.value||!e)return;let t=`[data-a11y-plot-id="${e}"]`,n=z.value.querySelector(t);if(!n)return;let r=n.getBoundingClientRect();yn.value={x:r.left+r.width/2,y:r.top+r.height/2}}function _r(e,t,n,r=`pointer`,i=null,a=!0){a&&M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:t,seriesIndex:n}),Z.value=t.uid,pr.value={color:e.color,shape:e.shape},bn.value=r,j.value=i,vn.value=t.uid,mr.value={datapoint:t,seriesIndex:n,series:J.value,config:M.value};let o=I.value.customFormat,s=ie(o)?o({seriesIndex:n,datapoint:t,series:J.value,config:M.value}):void 0;if(typeof s==`string`)on.value=s;else{let r=``;t.quadrantSide&&(r+=`<div style="color:${F.value.quadrantLabels[t.quadrantSide].color};font-weight:${F.value.quadrantLabels[t.quadrantSide].bold?`bold`:`400`}">${F.value.quadrantLabels[t.quadrantSide].text}</div>`),r+=`<div>${e.name}</div>`,r+=`<div style="padding-bottom:6px;border-bottom:1px solid ${I.value.borderColor};margin-bottom:3px">${t.name}</div>`,r+=`<div>${P.value.xAxis.name?P.value.xAxis.name:`x`}: <b>${Y(t.xValue,`x`,I.value.roundingValue,{datapoint:t,category:e,categoryIndex:n})}</b></div>`,r+=`<div>${P.value.yAxis.name?P.value.yAxis.name:`y`}: <b>${Y(t.yValue,`y`,I.value.roundingValue,{datapoint:t,category:e,categoryIndex:n})}</b></div>`,on.value=`<div style="text-align:left;font-size:${I.value.fontSize}px">${r}</div>`}r===`keyboard`&&We(()=>{gr(t.uid)}),an.value=!0}function vr(e,t,n){return{...t,onEnter:()=>_r(e,t,n),onLeave:()=>br(t,n),onClick:()=>xr(e,t,n),isSelected:Z.value&&t.uid===Z.value}}function yr(e){return{"data-cy":`plot-label`,x:e.x,y:e.y+F.value.plotLabels.offsetY+L.value.layout.plots.radius,"text-anchor":`middle`,"font-size":F.value.plotLabels.fontSize/(k.value?1.5:1),fill:F.value.plotLabels.color}}function br(e,t){M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(vn.value!==e.uid||bn.value!==`keyboard`)&&(an.value=!1,Z.value=null,pr.value=null)}function xr(e,t,n){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:t,seriesIndex:n});let r={category:e.name,shape:e.shape,itemName:t.name,x:t.xValue,y:t.yValue,quadrantSide:t.quadrantSide,sideName:F.value.quadrantLabels[t.quadrantSide].text};rn(`selectPlot`,r)}function Sr(e){if(!e)return;let t=J.value.flatMap(t=>t.series.filter(t=>t.quadrantSide===e).map(e=>({category:e.categoryName,itemName:e.name,x:e.xValue,y:e.yValue}))),n={quadrantSide:e,sideName:F.value.quadrantLabels[e].text,items:[...t]};rn(`selectSide`,n)}let Cr=d(()=>({TL:`${V.value.left-1},${V.value.centerY} ${V.value.centerX},${V.value.centerY} ${V.value.centerX},${V.value.top-1} ${V.value.right},${V.value.top-1} ${V.value.right},${V.value.bottom} ${V.value.left-1},${V.value.bottom} ${V.value.left-1},${V.value.centerY}`,TR:`${V.value.left},${V.value.top-1} ${V.value.centerX},${V.value.top-1} ${V.value.centerX},${V.value.centerY} ${V.value.right+1},${V.value.centerY} ${V.value.right+1},${V.value.bottom} ${V.value.left},${V.value.bottom} ${V.value.left},${V.value.top-1}`,BR:`${V.value.left},${V.value.top} ${V.value.right+1},${V.value.top} ${V.value.right+1},${V.value.centerY} ${V.value.centerX},${V.value.centerY} ${V.value.centerX},${V.value.bottom+1} ${V.value.left},${V.value.bottom+1} ${V.value.left},${V.value.top}`,BL:`${V.value.left-1},${V.value.top} ${V.value.right},${V.value.top} ${V.value.right},${V.value.bottom+1} ${V.value.centerX},${V.value.bottom+1} ${V.value.centerX},${V.value.centerY} ${V.value.left-1},${V.value.centerY} ${V.value.left-1},${V.value.top}`})[U.value]),wr=d(()=>Object.fromEntries(W.map(e=>{let t=(e.right?V.value.centerX:V.value.left)+V.value.usableWidth/4,n=e.bottom?V.value.centerY-48:0;return[e.id,{...Object.fromEntries(W.map(e=>[e.key,{x:t+(e.right?0:-20),y:n+(e.bottom?20:0),fill:F.value.quadrantLabels[e.key].color}])),crosshairs:{horizontal:`M ${t-20},${n+20} ${t+20},${n+20}`,vertical:`M ${t},${n} ${t},${n+40}`}}]})));function Tr(){return J.value.map(e=>({color:e.color,name:e.name,shape:e.shape,series:e.series.map(e=>({name:e.name,x:e.xValue,y:e.yValue,quadrantSide:e.quadrantSide,sideName:F.value.quadrantLabels[e.quadrantSide].text}))}))}function Er(e=null){We(()=>{let t=[[L.value.title.text],[L.value.title.subtitle.text],[``]],n=ir.value.head,r=ir.value.body,i=t.concat([n]).concat(r),a=re(i);e?e(a):ge({csvContent:a,title:L.value.title.text||`vue-ui-quadrant`})})}let Q=x(!1);function Dr(e){Q.value=e,sn.value+=1}function Or(){B.value.showTable=!B.value.showTable}function kr(){B.value.plotLabels.show=!B.value.plotLabels.show}function Ar(){B.value.showTooltip=!B.value.showTooltip}let jr=x(!1);function Mr(){jr.value=!jr.value}let Nr=l(A,()=>L.value.title.text),Pr=d(()=>c({config:M,style:L,mutableConfig:B,dialog:en,accordion:Yt,isFullscreen:Q,parent:A,maxWidth:800,isCursorPointer:R}));Ze(()=>B.value.showTable,e=>{gn.value&&s(e,M,gn)});function Fr(){B.value.showTable=!1,_n.value&&_n.value.setTableIconState(!1)}let Ir=d(()=>L.value.backgroundColor),Lr=d(()=>L.value.legend),Rr=d(()=>L.value.title),{isCallbackImaging:zr,isCallbackSvg:Br,generateSvg:Vr,onGenerateImage:Hr}=De({svg:z,title:Rr,legend:Lr,legendItems:X,backgroundColor:Ir,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:Bn});async function Ur(){rn(`copyAlt`,{config:M.value,dataset:tr.value}),M.value.userOptions.callbacks.altCopy?await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:tr.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Wr(){j.value=null,vn.value=null,xn.value=!0}function Gr(){hr(),xn.value=!1}function Kr(e){if(!z.value||jr.value||document.activeElement!==z.value||!$.value.length)return;let t=e.key===`ArrowLeft`||e.key===`ArrowUp`,n=e.key===`ArrowRight`||e.key===`ArrowDown`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){hr();return}if(r){if(j.value===null)return;let e=$.value[j.value];if(!e)return;xr(e.category,e.plot,e.categoryIndex);return}let a=j.value,o=Z.value?$.value.findIndex(e=>e.plot.uid===Z.value):null,s=a!==null&&a>=0&&a<$.value.length,c=o!==null&&o>=0&&o<$.value.length;s?(a+=n?1:-1,a<0&&(a=$.value.length-1),a>=$.value.length&&(a=0)):c?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let l=$.value[a];l&&_r(l.category,l.plot,l.categoryIndex,`keyboard`,a)}let qr=d(()=>({headers:ar.value?.colNames??[],rows:ar.value?.a11yBody??[]})),$=d(()=>J.value.flatMap((e,t)=>e.series.map(n=>({category:e,plot:n,categoryIndex:t}))));return Ze($,e=>{if(!Z.value)return;let t=e.findIndex(e=>e.plot.uid===Z.value);if(t===-1){hr();return}let n=e[t];_r(n.category,n.plot,n.categoryIndex,bn.value,j.value===null?null:t,!1)}),Re({getData:Tr,getImage:Nr,generatePdf:zn,generateCsv:Er,generateImage:Bn,generateSvg:Vr,hideSeries:ur,showSeries:lr,toggleTable:Or,toggleLabels:kr,toggleTooltip:Ar,toggleAnnotator:Mr,toggleFullscreen:Dr,copyAlt:Ur}),(e,s)=>(b(),m(`div`,{class:Ge(`vue-data-ui-component vue-ui-quadrant ${Q.value?`vue-data-ui-wrapper-fullscreen`:``} ${M.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`quadrantChart`,ref:A,id:`vue-ui-quadrant_${O.value}`,style:y(`font-family:${M.value.style.fontFamily};width:100%; text-align:center;background:${L.value.backgroundColor};${M.value.responsive?`height: 100%`:``}`),onMouseenter:s[2]||=()=>T(En)(!0),onMouseleave:s[3]||=()=>{T(En)(!1),xn.value||hr()}},[h(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[h(`p`,null,w(M.value.a11y.translations.keyboardNavigation),1)],8,et),M.value.a11y.includeTable&&qr.value?.rows?.length?(b(),f(Fe,{key:0,uid:O.value,head:qr.value.headers,body:qr.value.rows,notice:M.value.a11y.translations.tableAvailable,caption:M.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),N.value.buttons.annotator?(b(),f(T(Zt),Ue({key:1},T(a)(N.value.annotator),{svgRef:T(z),backgroundColor:L.value.backgroundColor,color:L.value.color,active:jr.value,isCursorPointer:R.value,palette:N.value.annotatorPalette,onClose:Mr}),Be({_:2},[S(T(o),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(_(T(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),Vn.value?(b(),m(`div`,{key:2,ref_key:`noTitle`,ref:dn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),L.value.title.text?(b(),m(`div`,{key:3,ref_key:`chartTitle`,ref:cn,style:`width:100%;background:transparent;padding-bottom:12px`},[(b(),f(Ae,{key:`table_${fn.value}`,config:{title:{cy:`quadrant-title`,...L.value.title},subtitle:{cy:`quadrant-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),h(`div`,{id:`legend-top-${O.value}`},null,8,tt),N.value.show&&nn.value&&(T(Dn)||T(Tn))?(b(),f(T(Qt),Ue({ref_key:`userOptionsRef`,ref:_n,key:`user_options_${sn.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isImaging:T(Rn),isPrinting:T(Ln),uid:O.value,hasTooltip:N.value.buttons.tooltip&&I.value.show,isFullscreen:Q.value,isTooltip:B.value.showTooltip,chartElement:A.value},T(n)(N.value,`pdf csv img svg labels table fullscreen altCopy annotator`),{isAnnotation:jr.value,tableDialog:M.value.table.useDialog,isCursorPointer:R.value,onToggleFullscreen:Dr,onGeneratePdf:T(zn),onGenerateCsv:Er,onGenerateImage:T(Hr),onGenerateSvg:T(Vr),onToggleTable:Or,onToggleLabels:kr,onToggleTooltip:Ar,onToggleAnnotator:Mr,onCopyAlt:Ur,style:{visibility:T(Dn)?T(Tn)?`visible`:`hidden`:`visible`}}),Be({_:2},[S(T(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,v(_(T(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`hasTooltip`,`isFullscreen`,`isTooltip`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):p(``,!0),h(`div`,nt,[(b(),m(`svg`,{ref_key:`svgRef`,ref:z,xmlns:T(ve),"aria-describedby":`chart-instructions-${O.value}`,class:Ge({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value}),viewBox:`${H.value.startX} ${H.value.startY} ${H.value.width} ${H.value.height}`,style:y(`max-width:100%;overflow:hidden;background:transparent;color:${L.value.color}`),id:`svg_${O.value}`,tabindex:`0`,onFocus:Wr,onBlur:Gr,onKeydown:Kr},[He(T($t)),C(e.$slots,`svg-underlayer`,{svg:{...V.value,isPrintingImg:T(Ln)||T(Rn)||T(zr),isPrintingSvg:T(Br)}},void 0,!0),e.$slots[`chart-background`]?(b(),m(`foreignObject`,{key:0,x:H.value.startX,y:H.value.startY,width:H.value.width,height:H.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,it)):p(``,!0),h(`defs`,null,[(b(!0),m(u,null,S(J.value,(e,t)=>(b(),f(Le,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`quadrant_gradient_${O.value}_${t}`,key:`quadrant_gradient_${O.value}_${t}`,stops:[[`0%`,T(se)(T(ue)(e.color,.05),L.value.layout.areas.opacity),1],[`100%`,T(se)(e.color,L.value.layout.areas.opacity),1]]},null,8,[`id`,`stops`]))),128))]),P.value.graduations.show?(b(),m(`g`,at,[(b(!0),m(u,null,S($n.value,e=>(b(),m(`rect`,{fill:P.value.graduations.fill?T(se)(P.value.graduations.color,e.opacity):`none`,x:e.x,y:e.y,height:e.height<=0?.001:e.height,width:e.width<=0?.001:e.width,"stroke-width":P.value.graduations.strokeWidth,stroke:P.value.graduations.stroke,rx:P.value.graduations.roundingForce},null,8,ot))),256))])):p(``,!0),h(`line`,{x1:V.value.left,y1:V.value.centerY,x2:V.value.right,y2:V.value.centerY,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth},null,8,st),h(`line`,{x1:V.value.centerX,y1:V.value.top,x2:V.value.centerX,y2:V.value.bottom,stroke:P.value.stroke,"stroke-width":P.value.strokeWidth},null,8,ct),P.value.showArrows?(b(),m(`g`,lt,[h(`polygon`,{points:`${V.value.right-8},${V.value.centerY-6} ${V.value.right},${V.value.centerY} ${V.value.right-8},${V.value.centerY+6}`,fill:P.value.stroke,stroke:`none`},null,8,ut),h(`polygon`,{points:`${V.value.left+8},${V.value.centerY-6} ${V.value.left},${V.value.centerY} ${V.value.left+8},${V.value.centerY+6}`,fill:P.value.stroke,stroke:`none`},null,8,dt),h(`polygon`,{points:`${V.value.centerX-6},${V.value.top+8} ${V.value.centerX},${V.value.top} ${V.value.centerX+6},${V.value.top+8}`,fill:P.value.stroke,stroke:`none`},null,8,ft),h(`polygon`,{points:`${V.value.centerX-6},${V.value.bottom-8} ${V.value.centerX},${V.value.bottom} ${V.value.centerX+6},${V.value.bottom-8}`,fill:P.value.stroke,stroke:`none`},null,8,pt)])):p(``,!0),F.value.quadrantLabels.show&&!k.value?(b(),m(`g`,mt,[(b(),m(u,null,S(W,e=>(b(),m(u,{key:e.id},[F.value.quadrantLabels[e.key].text?(b(),m(`text`,{key:0,x:e.right?V.value.width:0,y:e.bottom?V.value.bottom+V.value.padding*.7:V.value.top-V.value.padding/2,"text-anchor":e.right?`end`:`start`,fill:F.value.quadrantLabels[e.key].color,"font-size":F.value.quadrantLabels[e.key].fontSize,style:y(`font-weight:${F.value.quadrantLabels[e.key].bold?`bold`:``}`),onClick:t=>Sr(e.key)},w(F.value.quadrantLabels[e.key].text),13,ht)):p(``,!0)],64))),64))])):p(``,!0),F.value.axisLabels.show?(b(),m(`g`,gt,[P.value.yAxis.show?(b(),m(`text`,{key:0,x:V.value.centerX,y:V.value.top-V.value.padding/6,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,fill:F.value.axisLabels.color.positive},w(Y(K.value.y.max,`y`,F.value.plotLabels.rounding)),9,_t)):p(``,!0),h(`text`,{x:V.value.centerX,y:V.value.top-V.value.padding/2,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,fill:F.value.axisLabels.color.positive},w(P.value.yAxis.name),9,vt),P.value.yAxis.show?(b(),m(`text`,{key:1,x:V.value.centerX,y:V.value.bottom+V.value.padding*.35,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,fill:F.value.axisLabels.color.negative},w(Y(K.value.y.min,`y`,F.value.plotLabels.rounding)),9,yt)):p(``,!0),P.value.xAxis.show?(b(),m(`text`,{key:2,id:`xLabelMin_${O.value}`,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,transform:`translate(${V.value.padding-F.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(-90)`,fill:F.value.axisLabels.color.negative},w(Y(K.value.x.min,`x`,F.value.plotLabels.rounding)),9,bt)):p(``,!0),P.value.xAxis.show?(b(),m(`text`,{key:3,id:`xLabelMax_${O.value}`,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,transform:`translate(${V.value.width-V.value.padding+F.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(90)`,fill:F.value.axisLabels.color.positive},w(Y(K.value.x.max,`x`,F.value.plotLabels.rounding)),9,xt)):p(``,!0),h(`text`,{id:`xLabelMaxName_${O.value}`,"text-anchor":`middle`,"font-size":F.value.axisLabels.fontSize,transform:`translate(${V.value.width-F.value.axisLabels.fontSize}, ${V.value.height/2}), rotate(90)`,fill:F.value.axisLabels.color.positive},w(P.value.xAxis.name),9,St)])):p(``,!0),L.value.layout.areas.show?(b(),m(`g`,Ct,[(b(!0),m(u,null,S(J.value,(e,t)=>(b(),m(`g`,null,[e.series.length>2?(b(),m(`polygon`,{key:0,"data-cy-quadrant-area":``,fill:L.value.layout.areas.useGradient?`url(#quadrant_gradient_${O.value}_${t})`:T(se)(e.color,L.value.layout.areas.opacity),points:T(ne)(e)},null,8,wt)):p(``,!0)]))),256))])):p(``,!0),h(`g`,null,[(b(),m(u,null,S(W,e=>h(`rect`,{key:e.id,onClick:t=>Qn(e.id),x:e.right?V.value.centerX:V.value.left,y:e.bottom?V.value.centerY:V.value.top,width:Math.max(.001,V.value.usableWidth/2),height:Math.max(.001,V.value.usableHeight/2),fill:`transparent`,class:Ge({"vue-data-ui-zoom-plus":!k.value&&Jn.value,"vue-data-ui-zoom-minus":k.value&&Jn.value})},null,10,Tt)),64))]),F.value.plotLabels.showAsTag?(b(),m(u,{key:7},[B.value.plotLabels.show?(b(),m(`g`,jt,[(b(!0),m(u,null,S(J.value,(e,t)=>(b(),m(u,null,[(b(!0),m(u,null,S(e.series,n=>(b(),m(`foreignObject`,{style:{overflow:`visible`},height:`10`,width:`100`,x:n.x-50,y:n.y-F.value.plotLabels.fontSize,onMouseover:r=>_r(e,n,t),onMouseleave:e=>br(n,t),onClick:r=>xr(e,n,t)},[h(`div`,{style:y(`color:${T(_e)(e.color)};margin: 0 auto; font-size:${F.value.plotLabels.fontSize}px; text-align:center;background:${e.color}; padding: 2px 4px; border-radius: 12px; height: fit-content;`)},w(n.name),5)],40,Mt))),256))],64))),256))])):p(``,!0)],64)):(b(),m(u,{key:6},[(b(!0),m(u,null,S(J.value,(t,n)=>(b(),m(`g`,null,[e.$slots.datapoint&&!T(Cn)?(b(!0),m(u,{key:0},S(t.series,r=>(b(),m(`g`,{key:r.uid},[(b(),m(`foreignObject`,{x:r.x-1,y:r.y-1,width:`2`,height:`2`,style:{overflow:`visible`,"pointer-events":`none`},onMouseenter:e=>_r(t,r,n),onMouseleave:e=>br(r,n),onClick:e=>xr(t,r,n)},[C(e.$slots,`datapoint`,Ue({ref_for:!0},{datapoint:vr(t,r,n)}),void 0,!0)],40,Et)),h(`circle`,{"data-a11y-plot-id":r.uid,cx:r.x,cy:r.y,r:Math.max(L.value.layout.plots.radius/(k.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Dt)]))),128)):e.$slots.datapointSvg&&!T(Cn)?(b(!0),m(u,{key:1},S(t.series,r=>(b(),m(`g`,{key:r.uid},[C(e.$slots,`datapointSvg`,Ue({ref_for:!0},{datapoint:vr(t,r,n)}),void 0,!0)]))),128)):(b(!0),m(u,{key:2},S(t.series,(e,r)=>(b(),m(`g`,{key:e.uid},[He(je,{color:t.color,isSelected:Z.value&&e.uid===Z.value,plot:e,radius:L.value.layout.plots.radius/(k.value?1.5:1),shape:t.shape,stroke:L.value.layout.plots.outline?L.value.layout.plots.outlineColor:`none`,strokeWidth:L.value.layout.plots.outlineWidth,onMouseenter:r=>_r(t,e,n,`pointer`),onMouseleave:t=>br(e,n),onClick:r=>xr(t,e,n)},null,8,[`color`,`isSelected`,`plot`,`radius`,`shape`,`stroke`,`strokeWidth`,`onMouseenter`,`onMouseleave`,`onClick`]),h(`circle`,{"data-dom-to-png-ignore":``,"data-a11y-plot-id":e.uid,cx:e.x,cy:e.y,r:Math.max(L.value.layout.plots.radius/(k.value?1.5:1),10),fill:`transparent`,style:{"pointer-events":`none`}},null,8,Ot)]))),128))]))),256)),B.value.plotLabels.show?(b(),m(`g`,kt,[(b(!0),m(u,null,S(J.value,e=>(b(),m(`g`,null,[(b(!0),m(u,null,S(e.series,e=>(b(),m(`g`,null,[String(e.name).includes(`
|
|
2
|
+
`)?(b(),m(`text`,Ue({key:1,ref_for:!0},yr(e),{innerHTML:T(oe)({content:String(e.name),fontSize:F.value.plotLabels.fontSize/(k.value?1.5:1),fill:F.value.plotLabels.color,x:e.x,y:e.y+F.value.plotLabels.offsetY+L.value.layout.plots.radius})}),null,16,At)):(b(),m(`text`,Ue({key:0,ref_for:!0},yr(e)),w(e.name),17))]))),256))]))),256))])):p(``,!0)],64)),k.value?(b(),m(`g`,Nt,[Cr.value?(b(),m(`polygon`,{key:0,points:Cr.value,fill:L.value.backgroundColor,style:{opacity:`1`}},null,8,Pt)):p(``,!0)])):p(``,!0),U.value&&!Kn.value?(b(),m(`g`,Ft,[h(`text`,{x:G.value.x,y:G.value.y-G.value.fontSize/1.5,"font-size":G.value.fontSize/1.5,fill:G.value.fill,"text-anchor":`middle`,"font-weight":G.value.bold?`bold`:`normal`},w(G.value.text),9,It)])):p(``,!0),k.value&&U.value?(b(),m(`g`,Lt,[(b(),m(u,null,S(W,e=>h(`rect`,{key:e.id,x:wr.value[U.value][e.key].x,y:wr.value[U.value][e.key].y,width:`20`,height:`20`,fill:wr.value[U.value][e.key].fill,style:y(`cursor: ${R.value?`pointer`:`default`}; opacity: ${U.value===e.id?1:.2}`),onClick:t=>Qn(e.id),class:Ge({"vue-ui-quadrant-mini-map-cell":!0,"vue-ui-quadrant-mini-map-cell-selectable":U.value!==e.id})},null,14,Rt)),64)),h(`path`,{class:`vue-ui-quadrant-minimap-crosshairs`,stroke:L.value.backgroundColor,"stroke-width":1,d:wr.value[U.value].crosshairs.horizontal},null,8,zt),h(`path`,{class:`vue-ui-quadrant-minimap-crosshairs`,stroke:L.value.backgroundColor,"stroke-width":1,d:wr.value[U.value].crosshairs.vertical},null,8,Bt)])):p(``,!0),C(e.$slots,`svg`,{svg:{...V.value,isPrintingImg:T(Ln)||T(Rn)||T(zr),isPrintingSvg:T(Br)}},void 0,!0)],46,rt)),e.$slots.hint?(b(),m(`div`,Vt,[C(e.$slots,`hint`,v(_({hint:M.value.a11y.translations.keyboardNavigation,isVisible:xn.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(b(),m(`div`,Ht,[C(e.$slots,`watermark`,v(_({isPrinting:T(Ln)||T(Rn)||T(zr)||T(Br)})),void 0,!0)])):p(``,!0),h(`div`,{id:`legend-bottom-${O.value}`},null,8,Ut),hn.value&&(L.value.legend.show||e.$slots.legend)?(b(),f(ze,{key:6,to:L.value.legend.position===`top`?`#legend-top-${O.value}`:`#legend-bottom-${O.value}`},[h(`div`,{ref_key:`chartLegend`,ref:ln},[C(e.$slots,`legend`,{legend:X.value},()=>[L.value.legend.show?(b(),f(Ne,{key:`legend_${mn.value}`,legendSet:X.value,config:dr.value,isCursorPointer:R.value,onClickMarker:s[0]||=({legend:e})=>sr(e.id)},{item:E(({legend:e})=>[T(Cn)?p(``,!0):(b(),m(`div`,{key:0,onClick:t=>sr(e.id),style:y(`opacity:${q.value.includes(e.id)?.5:1}`)},w(e.name),13,Wt))]),legendToggle:E(()=>[X.value.length>2&&L.value.legend.selectAllToggle.show&&!T(Cn)?(b(),f(Ie,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:q.value.length>0,isCursorPointer:R.value,onToggle:or},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512)],8,[`to`])):p(``,!0),e.$slots.source?(b(),m(`div`,{key:7,ref_key:`source`,ref:un,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),He(T(qt),{teleportTo:I.value.teleportTo,show:B.value.showTooltip&&an.value,backgroundColor:I.value.backgroundColor,color:I.value.color,borderRadius:I.value.borderRadius,borderColor:I.value.borderColor,borderWidth:I.value.borderWidth,fontSize:I.value.fontSize,backgroundOpacity:I.value.backgroundOpacity,position:I.value.position,offsetX:I.value.offsetX,offsetY:I.value.offsetY,parent:A.value,content:on.value,isFullscreen:Q.value,isCustom:I.value.customFormat&&typeof I.value.customFormat==`function`,smooth:I.value.smooth,backdropFilter:I.value.backdropFilter,smoothForce:I.value.smoothForce,smoothSnapThreshold:I.value.smoothSnapThreshold,isA11yMode:bn.value===`keyboard`,a11yPosition:yn.value},{"tooltip-before":E(()=>[C(e.$slots,`tooltip-before`,v(_({...mr.value})),void 0,!0)]),tooltip:E(()=>[C(e.$slots,`tooltip`,v(_({...mr.value})),void 0,!0)]),"tooltip-after":E(()=>[C(e.$slots,`tooltip-after`,v(_({...mr.value})),void 0,!0)]),default:E(()=>[I.value.showShape?(b(),m(`svg`,Gt,[He(je,{plot:{x:10,y:10},shape:pr.value.shape,color:pr.value.color,radius:8,stroke:L.value.layout.plots.outline?L.value.layout.plots.outlineColor:`none`,"stroke-width":L.value.layout.plots.outlineWidth},null,8,[`shape`,`color`,`stroke`,`stroke-width`])])):p(``,!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`]),nn.value&&N.value.buttons.table?(b(),f(Je(Pr.value.component),Ue({key:8},Pr.value.props,{ref_key:`tableUnit`,ref:gn,onClose:Fr}),Be({content:E(()=>[(b(),f(T(Xt),{key:`table_${pn.value}`,colNames:ar.value.colNames,head:ar.value.head,body:ar.value.body,config:ar.value.config,title:M.value.table.useDialog?``:Pr.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:R.value,onClose:Fr},{th:E(({th:e})=>[Ve(w(e),1)]),td:E(({td:e})=>[h(`div`,{innerHTML:e.name||e},null,8,Kt)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:E(()=>[Ve(w(Pr.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:E(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[1]||=e=>Er(N.value.callbacks.csv),style:y({cursor:R.value?`pointer`:`default`})},[He(T(Jt),{name:`fileCsv`,stroke:Pr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),C(e.$slots,`skeleton`,{},()=>[T(Cn)?(b(),f(Pe,{key:0})):p(``,!0)],!0)],46,$e))}},[[`__scopeId`,`data-v-ea8b6084`]]);export{Qe as n,qt as t};
|
|
@@ -0,0 +1,9 @@
|
|
|
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"./annotationViewport-X8fvs7pz.js";import{n as a,t as o}from"./userOptionsSlots-CWtXN5Q6.js";import{$ as s,Dt as c,Ht as l,It as ee,J as te,Kt as ne,P as re,S as ie,X as ae,_ as oe,at as se,b as ce,et as le,f as ue,h as de,i as u,in as fe,p as pe,t as me,w as he}from"./lib-rPeBMZrn.js";import{n as ge,t as _e}from"./useHints-C-TwxM0Y.js";import{t as ve}from"./useConfig-9oDGTWWG.js";import{t as ye}from"./useSvgLabelLayout-42Kats14.js";import{t as be}from"./useLoading-BwiplGDB.js";import{t as xe}from"./usePrinter-DVf3YcG5.js";import{t as Se}from"./useResponsive-CENUxfEL.js";import{t as Ce}from"./useTimeLabels-Das5O74F.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{t as Te}from"./useTransitions-ChGGrtrv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{t as De}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Oe}from"./chartImage-DPGnEuYM.js";import{n as ke}from"./resolveChartConfig-0IvbmIE_.js";import{t as Ae}from"./SlicerPreview-Ks9FNVzh.js";import{t as je}from"./vue_ui_quick_chart-KljadV9E.js";import{t as Me}from"./BaseScanner-m6QR9rwD.js";import{t as Ne}from"./A11yDataTable-DWNlWXzs.js";import{t as Pe}from"./BaseLegendToggle-VzX69MCo.js";import{t as Fe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as d,Teleport as Ie,computed as f,createBlock as Le,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Re,createVNode as ze,defineAsyncComponent as Be,guardReactiveProps as g,mergeProps as Ve,nextTick as He,normalizeClass as _,normalizeProps as v,normalizeStyle as y,onBeforeUnmount as Ue,onMounted as We,openBlock as b,ref as x,renderList as S,renderSlot as C,shallowRef as Ge,toDisplayString as w,toRefs as Ke,unref as T,watch as qe,watchEffect as Je,withCtx as Ye}from"vue";var E={LINE:`LINE`,BAR:`BAR`,DONUT:`DONUT`},Xe=[`SERIE`,`SERIES`,`DATA`,`VALUE`,`VALUES`,`NUM`];function Ze({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`),$e(e)&&(D(e)&&(r=e.length<t?E.BAR:E.LINE,i=e,a=e.length),et(e))){if(!nt(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=>rt(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;it(s,e=>typeof e==`number`)&&(r=E.DONUT,i=e),it(s,e=>Array.isArray(e)&&D(e))&&(r=O(e)>t?E.LINE:E.BAR,a=O(e),i=e.map(e=>({...e,data:k(e,e=>D(e))}))),e=e.map(e=>at(e)),i=i.map(e=>at(e))}return{dataset:e,type:r,usableDataset:i,maxSeriesLength:a}}function Qe(e){return!e||$e(e)&&!e.length}function $e(e){return Array.isArray(e)}function D(e){if(!$e(e)||Qe(e))return!1;let t=e.map(e=>Number(e));return![...new Set(t.flatMap(e=>typeof e==`number`&&!isNaN(e)))].includes(!1)}function et(e){return!$e(e)||Qe(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 tt(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 nt(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(!tt(e[t],e[n]))return!1;return!0}function rt(e){return Xe.includes(e.toUpperCase())}function it(e,t){let n=[];for(let r=0;r<e.length;r+=1)n.push(t(e[r]));return n.includes(!0)}function O(e){return Math.max(...[...e].flatMap(e=>Object.values(e).filter(e=>D(e)).map(e=>e.length)))}function k(e,t){return Object.values(e).filter(e=>t(e))[0]}function at(e){let t={};for(let n in e)e.hasOwnProperty(n)&&(t[n.toUpperCase()]=e[n]);return t}var ot=/* @__PURE__ */ e({default:()=>fn}),st=[`id`],ct=[`id`],lt=[`id`],ut={style:{position:`relative`}},dt=[`xmlns`,`aria-describedby`,`viewBox`],ft=[`x`,`y`,`width`,`height`],pt=[`id`],mt=[`id`],ht=[`id`],gt=[`flood-color`],_t={key:0,class:`donut-label-connectors`},vt=[`d`,`stroke`,`stroke-width`,`filter`],yt=[`cx`,`cy`,`r`,`fill`,`filter`],bt={class:`donut`},xt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],St=[`d`,`onMouseenter`,`onMouseout`,`onClick`],Ct={key:1,class:`donut-labels`},wt=[`cx`,`cy`,`fill`,`stroke`,`filter`],Tt=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`filter`],Et=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`filter`],Dt={key:2,class:`donut-hollow`},Ot=[`x`,`y`,`font-size`,`fill`],kt=[`x`,`y`,`font-size`,`fill`],At={key:0,class:`line-grid`},jt=[`data-cy`,`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Mt=[`data-cy`,`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Nt={key:1,class:`line-axis`},Pt=[`data-cy`,`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ft=[`data-cy`,`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],It=[`data-cy`,`d`,`stroke`,`stroke-width`],Lt=[`data-cy`,`transform`,`font-size`,`fill`],Rt={key:3,class:`periodLabels`},zt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Bt={key:0},Vt=[`font-size`,`text-anchor`,`fill`,`transform`],Ht=[`font-size`,`text-anchor`,`fill`,`transform`,`innerHTML`],Ut={key:3,class:`plots`},Wt=[`d`,`stroke`,`stroke-width`],Gt=[`d`,`stroke`,`stroke-width`],Kt=[`cx`,`cy`,`fill`,`stroke`],qt={key:4,class:`plots`},Jt=[`x`,`width`,`height`,`y`,`fill`,`stroke`,`stroke-width`],Yt={key:0,class:`dataLabels`},Xt=[`font-size`,`fill`,`transform`],Zt={key:1,class:`tooltip-traps`},Qt=[`data-cy`,`x`,`y`,`height`,`width`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],$t={key:6,class:`axis-labels`},en={key:0},tn=[`font-size`,`fill`,`x`,`y`],nn={key:1},rn=[`font-size`,`fill`,`transform`],an=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],on={key:1,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},sn={key:5,class:`vue-data-ui-watermark`},cn=[`id`],ln=[`onClick`,`onKeydown`],un=[`onClick`,`onKeydown`],dn={key:1,class:`vue-ui-quick-chart-not-processable`},fn=/*#__PURE__*/ Fe({__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:Fe,emit:Xe}){let Qe=Be(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),$e=Be(()=>import(`./PackageVersion-B9qiUJPH.js`).then(e=>e.t)),tt=Be(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),nt=Be(()=>import(`./Tooltip-B432XpvC.js`)),rt=Be(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),{vue_ui_quick_chart:it}=ve(),O=e,k=x(null),at=x(null),ot=x(null),fn=x(null),A=x(ae()),pn=x(!1),mn=x(null),hn=x(``),j=x(null),gn=x(null),_n=x(null),M=x([]),vn=x(0),yn=x(0),bn=x(!1),xn=x(null),Sn=x(null),N=x(In());ge({config:()=>N.value,dataset:()=>O.dataset,component:`VueUiQuickChart`,rules:[_e.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}=Te({config:()=>N.value.transitions,dataset:()=>O.dataset}),Cn=f(()=>N.value.debug),wn=f(()=>N.value.useCursorPointer),F=x(null),Tn=x({x:0,y:0}),En=x(`pointer`),Dn=x(!1),On=f(()=>fe({defaultConfig:{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:kn,FINAL_DATASET:An}=be({...Ke(O),FINAL_CONFIG:N,prepareConfig:In,skeletonDataset:O.config?.skeletonDataset??[1,2,3,5,8,13,21,34,55,89],skeletonConfig:fe({defaultConfig:N.value,userConfig:On.value})}),{svgRef:I}=Ee({config:{text:N.value.title}}),jn=f(()=>N.value.showUserOptionsOnChartHover),Mn=f(()=>N.value.keepUserOptionsStateOnChartLeave),Nn=x(!N.value.showUserOptionsOnChartHover),Pn=x(!1);function Fn(e=!1){Pn.value=e,jn.value&&(Nn.value=e)}function In(){return ke(O.config,it,je)}function Ln(e){let t=le(e);return t?.tooltipPosition&&delete t.tooltipPosition,JSON.stringify(t)}let Rn=Ln(O.config);qe(()=>O.config,(e,t)=>{let n=Ln(e),r=n!==Rn;Rn=n;let i=In();r?(kn.value||(N.value=i),N.value.responsive||(B.value.width=N.value.width,B.value.height=N.value.height),Nn.value=!N.value.showUserOptionsOnChartHover,nr(),Yn.value.showTooltip=N.value.showTooltip):(N.value.tooltipPosition=i.tooltipPosition,Yn.value.showTooltip=N.value.showTooltip)},{deep:!0});let zn=f(()=>he(N.value.customPalette)),L=Xe,Bn=f(()=>{let e=Ze({debug:Cn.value,dataset:ne(An.value,[`serie`,`series`,`data`,`value`,`values`,`num`]),barLineSwitch:N.value.chartIsBarUnderDatasetLength});return!e?.type&&Cn.value&&console.error(`VueUiQuickChart : Dataset is not processable`),e?.type?e:null}),R=x(Bn.value),Vn=f(()=>!!R.value),z=f(()=>R.value?R.value.type:null),Hn=f(()=>[E.BAR,E.LINE].includes(z.value)),Un=f(()=>Hn.value&&N.value.zoomXy&&Number(R.value?.maxSeriesLength??0)>1);qe(()=>z.value,e=>{e||se({componentName:`VueUiQuickChart`,type:`dataset`,debug:Cn.value})},{immediate:!0});let{isPrinting:Wn,isImaging:Gn,generatePdf:Kn,generateImage:qn}=xe({elementId:`${z.value}_${A.value}`,fileName:N.value.title||z.value,options:N.value.userOptionsPrint}),Jn=f(()=>N.value.showUserOptions&&!N.value.title),B=x({width:N.value.width,height:N.value.height}),Yn=x({showTooltip:N.value.showTooltip});qe(N,()=>{Yn.value={showTooltip:N.value.showTooltip}},{immediate:!0});let Xn=Ge(null),Zn=!1,Qn=null;function $n(){cancelAnimationFrame(tr),Xn.value?.disconnect(),Xn.value=null}let er=x(!1),tr=0;We(()=>{bn.value=!0,nr()});function nr(){rr(),Pr()}function rr(){Zn||($n(),N.value.responsive&&k.value&&(Xn.value=new ResizeObserver(()=>{if(Zn||!N.value.responsive)return;let{width:e,height:t}=Se({chart:k.value,title:N.value.title?at.value:null,legend:N.value.showLegend?ot.value:null,slicer:Un.value?fn.value:null,source:gn.value,noTitle:_n.value});cancelAnimationFrame(tr),tr=requestAnimationFrame(()=>{B.value.width=e,B.value.height=t,er.value=!0})}),Xn.value.observe(k.value.parentNode)))}qe(k,rr,{flush:`post`}),Ue(()=>{Zn=!0,$n(),dr(),clearTimeout(Qn),xi+=1,Or(),si()});let ir=f(()=>`0 0 ${B.value.width<=0?10:B.value.width} ${B.value.height<=0?10:B.value.height}`);function ar(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}function or(e){return N.value.blurOnHover&&![null,void 0].includes(j.value)&&j.value!==e?`url(#blur_${A.value})`:``}function sr(){dr(),z.value===E.DONUT&&(R.value=Bn.value),M.value.length?M.value=[]:z.value===E.DONUT?H.value.legend.forEach(e=>{M.value.push(e.id)}):z.value===E.LINE?Yr.value.legend.forEach(e=>{M.value.push(e.id)}):z.value===E.BAR&&Xr.value.legend.forEach(e=>{M.value.push(e.id)}),z.value===E.DONUT?L(`selectLegend`,H.value.dataset):z.value===E.LINE?L(`selectLegend`,Yr.value.dataset):z.value===E.BAR&&L(`selectLegend`,Xr.value.dataset)}function cr(e,t){M.value.includes(e)?M.value=M.value.filter(t=>t!==e):M.value.length<t&&M.value.push(e)}let lr=/* @__PURE__ */ new Map,ur=x(!1);function dr(){for(let e of lr.values())cancelAnimationFrame(e.frame);lr.clear(),ur.value=!1}function fr(e){return e?.VALUE||e?.DATA||e?.SERIE||e?.VALUES||e?.NUM||0}function pr(e,t){R.value={...R.value,dataset:R.value.dataset.map((n,r)=>e===`donut_${r}`?{...n,value:t,VALUE:t}:n)}}function mr(e,t){if(lr.get(e.id))return;let n=M.value.includes(e.id);if(!n&&t.length<=1){L(`selectLegend`,H.value.dataset);return}let r=fr(Bn.value?.dataset.find((t,n)=>e.id===`donut_${n}`)),i=e.value;n&&(M.value=M.value.filter(t=>t!==e.id));let a={frame:null};lr.set(e.id,a),ur.value=!0;function o(){lr.get(e.id)===a&&(r===0||(n?i>r:i<r/100)?(pr(e.id,n?r:0),n||M.value.push(e.id),lr.delete(e.id),ur.value=lr.size>0,L(`selectLegend`,H.value.dataset)):(i=n?i+r*.025:i/1.1,pr(e.id,i),a.frame=requestAnimationFrame(o)))}o()}let V=x(null);function hr(e){V.value=e}let gr=f(()=>N.value.donutThicknessRatio<.01?.01:N.value.donutThicknessRatio>.4?.4:N.value.donutThicknessRatio),H=f(()=>{if(z.value!==E.DONUT)return null;let e=R.value.dataset.map((e,t)=>({...e,value:fr(e),name:e.NAME||e.DESCRIPTION||e.TITLE||e.LABEL||`Serie ${t}`,id:`donut_${t}`})).map((e,t)=>({...e,color:e.COLOR?ie(e.COLOR):zn.value[t+N.value.paletteStartIndex]||l[t+N.value.paletteStartIndex]||l[(t+N.value.paletteStartIndex)%l.length],immutableValue:e.value}));function t(e,t){return s({v:isNaN(e.value/ar(t))?0:e.value/ar(t)*100,s:`%`,r:N.value.dataLabelRoundingPercentage})}function n(e){return e.proportion*100>N.value.donutHideLabelUnderPercentage}function r(e,t){let n=fr(Bn.value.dataset.find((t,n)=>`donut_${n}`===e));return Math.abs(String(Number(n.toFixed(0))).length-String(Number(t.toFixed(0))).length)}function i({datapoint:t,seriesIndex:n,triggerMode:r=`pointer`}){mn.value={datapoint:t,seriesIndex:n,config:N.value,dataset:e},j.value=t.id,F.value=n,En.value=r;let i=N.value.tooltipCustomFormat;N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:t,seriesIndex:n});let a=c(i)?i({datapoint:t,seriesIndex:n,series:e,config:N.value}):void 0;if(typeof a==`string`)hn.value=a;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>${u(N.value.formatter,t.value,s({p:N.value.valuePrefix,v:t.value,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:n})}</b>`,e+=`<span>(${s({v:t.proportion*100,s:`%`,r:N.value.dataLabelRoundingPercentage})})</span></div>`,hn.value=`<div>${e}</div>`}pn.value=!0}function a({datapoint:e,seriesIndex:t}){N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:e,seriesIndex:t}),pn.value=!1,j.value=null,V.value=null,F.value=null,En.value=`pointer`}function o({datapoint:e,seriesIndex:t}){N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:e,seriesIndex:t}),L(`selectDatapoint`,e)}let te={centerX:B.value.width/2,centerY:B.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:fr(Bn.value.dataset.find((t,n)=>`donut_${n}`===e.id)),shape:`circle`})),ae=B.value.width/2,oe=B.value.height/2,se=B.value.height*N.value.donutRadiusRatio;return{dataset:re.filter(e=>!M.value.includes(e.id)),legend:re,drawingArea:te,displayArcPercentage:t,isArcBigEnough:n,useTooltip:i,killTooltip:a,selectDatapoint:o,getSpaces:r,total:ne,cx:ae,cy:oe,radius:se,chart:ee({series:e.filter(e=>!M.value.includes(e.id))},ae,oe,se,se,1.99999,2,1,360,105.25,B.value.height*gr.value)}}),U=x({start:0,end:R.value?.maxSeriesLength??0}),_r=x(null),W=x(!1),vr=x(!1),yr=x(!1),G=x(!1),br=x(!1),K=x(null),q=x(null),J=x(null),xr=x(!1),Sr=x({time:0,x:0,y:0,pointerType:null}),Cr={show:!1,selection:{fill:`#2D353C`,stroke:`transparent`,fillOpacity:.1,strokeOpacity:.5,strokeWidth:1,strokeDasharray:0}},wr=f(()=>{let e=N.value.dragToZoom??{};return{...Cr,...e,selection:{...Cr.selection,...e.selection??{}}}}),Y=f(()=>Hn.value&&wr.value.show&&W.value&&kr()>1&&!kn.value),Tr=null,X={};function Er(e,t=U.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 Dr(e){let t=Er(e);t&&L(`update:zoomState`,t)}function Or(){Tr&&=(cancelAnimationFrame(Tr),null),X={}}function kr(){let e=Number(R.value?.maxSeriesLength);return Number.isFinite(e)?Math.max(0,e):0}function Ar(e,t=U.value.start){let n=kr();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 jr(){let e=kr();if(e<=0){U.value={start:0,end:0},_r.value&&_r.value.setRangeValues(0,0);return}let t=Number(U.value.start),n=Number(U.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)),U.value={start:t,end:n},_r.value&&_r.value.setRangeValues(t,n)}function Mr(e){if(!Hn.value)return null;let t=Er(e);return t?((t.start!==Number(U.value.start)||t.end!==Number(U.value.end))&&(Or(),U.value={start:t.start,end:t.end},jr()),{start:Number(U.value.start),end:Number(U.value.end)}):null}function Nr(e){let t=Mr(e);return t?(Dr(t),t):null}async function Pr({applyControlledZoom:e=!0}={}){if(!(Zn||vr.value)){if(!Hn.value)W.value=!1;else{vr.value=!0;try{if(await He(),await He(),Zn||!Hn.value)return;let{zoomStartIndex:t,zoomEndIndex:n}=N.value,r=kr();if(r<=0){U.value={start:0,end:0},W.value=!1;return}let i=t==null?0:Number(t),a=n==null?r:Ar(Number(n)+1,i);if(e&&Er(O.zoomState)){let e=Er(O.zoomState);i=e.start,a=e.end}yr.value=!0,U.value={start:i,end:a},jr(),W.value=!0,await He(),_r.value&&_r.value.setRangeValues(U.value.start,U.value.end)}finally{queueMicrotask(()=>{Zn||(yr.value=!1)}),vr.value=!1}}}}async function Fr({applyControlledZoom:e=!1,publish:t=!1}={}){Or(),await Pr({applyControlledZoom:e}),t&&!Zn&&(Dr({start:Number(U.value.start),end:Number(U.value.end)}),L(`zoomReset`))}function Ir(e){X={...X,...e},Tr&&cancelAnimationFrame(Tr),Tr=requestAnimationFrame(()=>{let e={...U.value,...X};X={},Tr=null,U.value=e,jr(),Dr({start:Number(U.value.start),end:Number(U.value.end)})})}function Lr(e){if(vr.value||yr.value)return;let t=Number(e);Number.isFinite(t)&&(L(`zoomStart`,{index:t,isZoom:t!==0}),(t!==U.value.start||X.end!==void 0)&&Ir({start:t}))}function Rr(e){if(vr.value||yr.value)return;let t=X.start===void 0?U.value.start:X.start,n=Ar(Number(e),t);L(`zoomEnd`,{index:n,isZoom:n!==kr()}),(n!==U.value.end||X.start!==void 0)&&Ir({end:n})}qe([()=>O.zoomState,Hn,()=>Number(R.value?.maxSeriesLength??0)],async([e,t,n])=>{!t||n<=0||!e||(W.value?Mr(e):await Pr({applyControlledZoom:!0}))},{deep:!0,immediate:!0}),qe(Bn,async e=>{if(dr(),!e){R.value=null,Or(),oi(),si(),W.value=!1;return}let t=R.value?.type,n=Number(R.value?.maxSeriesLength??0);R.value=e;let r=e.type,i=Number(e.maxSeriesLength??0);[E.BAR,E.LINE].includes(r)?t!==r||n!==i?(Or(),W.value=!1,U.value={start:0,end:i},yn.value+=1,await He(),await Pr({applyControlledZoom:!0})):O.zoomState&&Mr(O.zoomState):(Or(),W.value=!1)},{deep:!0});let zr=f(()=>{if(!R.value||!N.value.zoomMinimap.show||z.value===E.DONUT)return[];let e=[];D(R.value.dataset)&&(e=R.value.dataset),et(R.value.dataset)&&(e=R.value.dataset.map((e,t)=>({values:e.VALUE||e.DATA||e.SERIE||e.SERIES||e.VALUES||e.NUM||0,id:z.value===E.LINE?`line_${t}`:`bar_${t}`})).filter(e=>!M.value.includes(e.id)));let t=D(e)?e.length:Math.max(...e.map(e=>e.values.length)),n=[];if(D(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:Br,ready:Vr,settling:Z,update:Hr}=ye({svgRef:I,canMeasure:()=>(!N.value.responsive||er.value)&&(![E.LINE,E.BAR].includes(z.value)||bi.value),initialMetrics:{scale:0,bottom:0,leftOverhang:0},measure:e=>({scale:e(Sn.value).textWidth,bottom:e(xn.value).height,leftOverhang:e(xn.value).leftOverhang})});function Ur(){return Math.max(Br.value.scale+4,Br.value.leftOverhang-N.value.xyPaddingLeft)}let Wr=f(()=>Br.value.bottom);function Gr(){let e={height:B.value.height,width:B.value.width},t=Ur();return{left:t+N.value.xyPaddingLeft,top:N.value.xyPaddingTop,right:e.width-N.value.xyPaddingRight,bottom:e.height-N.value.xyPaddingBottom-Wr.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-Wr.value)}}function Kr(e){let t=[];return D(R.value.dataset)&&(t=[{values:R.value.dataset.slice(U.value.start,U.value.end),absoluteValues:R.value.dataset,absoluteIndices:R.value.dataset.map((e,t)=>t).slice(U.value.start,U.value.end),name:N.value.title,color:zn.value[N.value.paletteStartIndex]||l[N.value.paletteStartIndex],id:`${e}_0`}]),et(R.value.dataset)&&(t=R.value.dataset.map((t,n)=>({...t,values:t.VALUE||t.DATA||t.SERIE||t.SERIES||t.VALUES||t.NUM||0,name:t.NAME||t.DESCRIPTION||t.TITLE||t.LABEL||`Serie ${n}`,id:`${e}_${n}`})).map((e,t)=>({...e,color:e.COLOR?ie(e.COLOR):zn.value[t+N.value.paletteStartIndex]||l[t+N.value.paletteStartIndex]||l[(t+N.value.paletteStartIndex)%l.length],values:e.values.slice(U.value.start,U.value.end),absoluteValues:e.values,absoluteIndices:e.values.map((e,t)=>t).slice(U.value.start,U.value.end)}))),t}function qr(e,t){function n(t){return e.map(e=>({...e,value:e.values[t],absoluteIndex:e.absoluteIndices[t]})).filter(e=>!M.value.includes(e.id))}function r(r,i=`pointer`){if(G.value&&i===`pointer`)return;j.value=r,V.value=r,F.value=r,En.value=i;let a=n(r);if(!a.length){oi();return}mn.value={datapoint:a,seriesIndex:r,config:N.value,dataset:e};let o=N.value.tooltipCustomFormat;N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:a,seriesIndex:r+U.value.start});let l={datapoint:a,seriesIndex:r,series:e,config:N.value};t===`bar`&&(l.point=a);let ee=c(o)?o(l):void 0;if(typeof ee==`string`)hn.value=ee;else{let e=``;$.value[r]&&(e+=`<div style="border-bottom:1px solid ${N.value.tooltipBorderColor};padding-bottom:6px;margin-bottom:3px;">${$.value[r].text}</div>`),a.forEach((n,r)=>{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">${t===`bar`?`<rect x=0 y="0" width="12" height="12" rx="1" stroke="none" fill="${n.color}"/>`:`<circle cx="6" cy="6" r="6" stroke="none" fill="${n.color}"/>`}</svg>
|
|
4
|
+
<span>${n.name}:</span>
|
|
5
|
+
<b>${u(N.value.formatter,n.value,s({p:N.value.valuePrefix,v:n.value,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:n,seriesIndex:r})}
|
|
6
|
+
</b>
|
|
7
|
+
</div>
|
|
8
|
+
`}),hn.value=e}pn.value=!0}function i(e){let t=n(e);N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:t,seriesIndex:e+U.value.start}),oi()}function a(e){let t=n(e);N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:t,seriesIndex:e+U.value.start}),L(`selectDatapoint`,t)}return{useTooltip:r,killTooltip:i,selectDatapoint:a}}function Jr(e){return`M ${N.value.lineSmooth?re(e.coordinates):e.linePath}`}let Yr=f(()=>{if(z.value!==E.LINE)return null;let e=Gr(),t=Kr(`line`),n=t.filter(e=>!M.value.includes(e.id)).flatMap(e=>e.values),r={max:Math.max(...n),min:Math.min(...n),maxSeries:Math.max(...t.map(e=>e.values.length))},i=r.max===r.min?oe(Math.min(r.min,0),r.min===0?1:Math.max(r.min,0),N.value.xyScaleSegments):oe(r.min<0?r.min:0,r.max<0?0:r.max,N.value.xyScaleSegments),a=r.min<0?Math.abs(r.min):0,o=r.max<0?e.top:e.bottom-a/(i.max+a)*e.height,s=e.width/r.maxSeries,c=i.ticks.map(t=>({y:e.bottom-e.height*((t+a)/(i.max+a)),x:e.left-8,value:t})),l=t.map((t,n)=>({...t,shape:`circle`,coordinates:t.values.map((t,n)=>({x:e.left+s*(n+1)-s/2,y:e.bottom-(t+a)/(i.max+a)*e.height,value:t}))})).map(e=>{let t=[];return e.coordinates.forEach(e=>{t.push(`${e.x},${e.y} `)}),{...e,linePath:t.join(` `)}}),{useTooltip:ee,killTooltip:te,selectDatapoint:ne}=qr(t,`line`);return{absoluteZero:o,dataset:l.filter(e=>!M.value.includes(e.id)),legend:l,drawingArea:e,extremes:r,slotSize:s,yLabels:c,useTooltip:ee,killTooltip:te,selectDatapoint:ne}}),Xr=f(()=>{if(z.value!==E.BAR)return null;let e=Gr(),t=Kr(`bar`),n=t.filter(e=>!M.value.includes(e.id)),r=n.flatMap(e=>e.values),i={max:Math.max(0,Math.max(...r)),min:Math.min(...r),maxSeries:Math.max(...n.map(e=>e.values.length))},a=i.min===i.max?oe(Math.min(i.min,0),i.min===0?1:Math.max(i.min,0),N.value.xyScaleSegments):oe(i.min<0?i.min:0,i.max,N.value.xyScaleSegments),o=a.min<0?Math.abs(a.min):0,s=e.bottom-o/(a.max+o)*e.height,c=e.width/i.maxSeries,l=a.ticks.map(t=>({y:e.bottom-e.height*((t+o)/(a.max+o)),x:e.left-8,value:t})),ee=c/n.length-N.value.barGap/n.length,te=o/(i.max+o)*e.height;function ne(t,n,r=!1){return t.map((t,a)=>{let l=(t+o)/(i.max+o)*e.height,ne=r?Math.abs(t)/Math.abs(i.min)*(e.height-s):Math.abs(t)/(i.max+o)*e.height;return{x:e.left+c*a+ee*n+N.value.barGap/2,y:t>0?e.bottom-l:s,height:t>0?l-te:ne,value:t,width:ee}})}let re=t.map((e,t)=>({...e,shape:`square`,coordinates:ne(e.values,t,!0)})),ie=n.map((e,t)=>({...e,coordinates:ne(e.values,t)})),{useTooltip:ae,killTooltip:se,selectDatapoint:ce}=qr(t,`bar`);return{absoluteZero:s,dataset:ie,absoluteDataset:ie,legend:re,drawingArea:e,extremes:i,slotSize:c,yLabels:l,useTooltip:ae,killTooltip:se,selectDatapoint:ce}}),Q=f(()=>z.value===E.LINE?Yr.value:z.value===E.BAR?Xr.value:null),Zr=f(()=>z.value===E.LINE?`line`:`bar`),Qr=f(()=>z.value===E.BAR?N.value.xyPeriods.slice(U.value.start,U.value.end):$.value),$r=f(()=>Q.value?.drawingArea??null),ei=f(()=>Number(Q.value?.slotSize??0)),ti=f(()=>Number(Q.value?.extremes?.maxSeries??0)),ni=f(()=>{let e=$r.value;return!e||!G.value||K.value==null||q.value==null?null:{x:Math.min(K.value,q.value),y:e.top,width:Math.abs(q.value-K.value),height:e.height}}),ri=f(()=>!W.value||!Hn.value?!1:Number(U.value.start)!==0||Number(U.value.end)!==Number(kr()));function ii(e){let t=I.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 ai(e){let t=$r.value;return t?Math.min(Math.max(e,t.left),t.right):e}function oi(){F.value=null,En.value=`pointer`,pn.value=!1,j.value=null,V.value=null}function si(e){let t=e?.pointerId==null?J.value:e.pointerId;t!=null&&I.value?.hasPointerCapture?.(t)&&I.value.releasePointerCapture(t),G.value=!1,K.value=null,q.value=null,J.value=null}function ci(){xr.value=!0,clearTimeout(Qn),Qn=setTimeout(()=>{xr.value=!1,Qn=null},0)}function li(e){xr.value&&(xr.value=!1,e.preventDefault(),e.stopPropagation())}function ui(e){if(!Y.value||!ri.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=Sr.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?(Sr.value={time:0,x:0,y:0,pointerType:null},ci(),si(e),oi(),Fr({applyControlledZoom:!1,publish:!0}),!0):(Sr.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function di(e){let t=$r.value,n=ei.value,r=ti.value;if(!t||r<=0||!Number.isFinite(n)||n<=0)return null;let i=Math.floor((ai(e)-t.left)/n);return Math.max(0,Math.min(r-1,i))}function fi(e,t){let n=di(e),r=di(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(U.value.start)+i,end:Number(U.value.start)+a+1}}function pi(e){let t=Nr(e);return t?(L(`zoomStart`,{index:t.start,isZoom:t.start!==0}),L(`zoomEnd`,{index:t.end,isZoom:t.end!==kr()}),t):null}function mi(e){if(!Y.value||Ei.value||e.button!==void 0&&e.button!==0||J.value!=null&&e.pointerId!==J.value)return;let t=$r.value,n=ii(e);if(!t||!n||n.x<t.left||n.x>t.right||n.y<t.top||n.y>t.bottom||ti.value<=1)return;br.value=!0,I.value?.focus?.({preventScroll:!0}),oi();let r=ai(n.x);J.value=e.pointerId,G.value=!0,K.value=r,q.value=r}function hi(e){if(!Y.value||!G.value||J.value!=null&&e.pointerId!==J.value)return;let t=ii(e);t&&(q.value=ai(t.x),oi(),K.value!=null&&Math.abs(q.value-K.value)>=2&&!I.value?.hasPointerCapture?.(e.pointerId)&&I.value?.setPointerCapture?.(e.pointerId))}function gi(e){if(!Y.value||!G.value||J.value!=null&&e.pointerId!==J.value)return;let t=ii(e);t&&(q.value=ai(t.x));let n=K.value,r=q.value,i=$r.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,Number(i?.width??0)*.01)){if(ui(e))return;si(e);return}let a=fi(Math.min(n,r),Math.max(n,r));a?(si(e),pi(a)&&(Sr.value={time:0,x:0,y:0,pointerType:null},oi(),ci())):si(e)}let _i=f(()=>{let e=$r.value,t=B.value.width;return!e||t<=0||!N.value.zoomXyAutoFit?null:e.left/t}),vi=f(()=>{let e=$r.value,t=B.value.width;return!e||t<=0||!N.value.zoomXyAutoFit?null:(t-e.right)/t}),yi=f(()=>Q.value?.legend.map(e=>({...e,isVisible:!M.value.includes(e.id),type:Zr.value,series:e.absoluteValues}))),$=x([]),bi=x(!1),xi=0;Je(()=>{let e=++xi;(async()=>{let t=await Ce({values:N.value.xyPeriods,maxDatapoints:R.value?.maxSeriesLength??0,formatter:N.value.datetimeFormatter,start:U.value.start,end:U.value.end});e===xi&&($.value=t,bi.value=!0)})()});let Si=f(()=>{let e=N.value.xyPeriodsModulo;return N.value.xyPeriods.length?Math.min(e,[...new Set($.value.map(e=>e.text))].length):e}),Ci=x(!1);function wi(e){Ci.value=e,vn.value+=1}function Ti(){Yn.value.showTooltip=!Yn.value.showTooltip}let Ei=x(!1);function Di(){Ei.value=!Ei.value}let Oi=Oe(k,()=>N.value.title),ki=f(()=>B.value.width),Ai=f(()=>B.value.height);De({timeLabelsEls:xn,timeLabels:$,slicer:U,configRef:N,rotationPath:[`xyPeriodLabelsRotation`],autoRotatePath:[`xyPeriodLabelsAutoRotate`,`enable`],isAutoSize:!1,rotation:N.value.xyPeriodLabelsAutoRotate.angle,height:Ai.value,width:ki.value});let ji=f(()=>N.value.backgroundColor),Mi=f(()=>H.value?.legend??Q.value?.legend??[]),Ni=f(()=>({show:N.value.showLegend,bold:!1,backgroundColor:N.value.backgroundColor,color:N.value.color,fontSize:N.value.legendFontSize,position:N.value.legendPosition})),Pi=f(()=>({text:N.value.title,color:N.value.color,fontSize:N.value.titleFontSize,bold:N.value.titleBold,textAlign:N.value.titleTextAlign,subtitle:{text:``}})),{generateSvg:Fi,onGenerateImage:Ii}=we({svg:I,title:Pi,legend:Ni,legendItems:Mi,backgroundColor:ji,getSvgCallback:()=>N.value.userOptionsCallbacks.svg,generateImage:qn});async function Li(){L(`copyAlt`,{config:N.value,dataset:{line:Yr.value,bar:Xr.value,donut:H.value}}),N.value.userOptionsCallbacks.altCopy?await Promise.resolve(N.value.userOptionsCallbacks.altCopy({config:N.value,dataset:{line:Yr.value,bar:Xr.value,donut:H.value}})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Ri(e,t){(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())}let zi=f(()=>z.value===E.DONUT?H.value?.chart?.length??0:Q.value?.extremes?.maxSeries??0);function Bi(){F.value=null,Dn.value=!0}function Vi(){br.value=!1,F.value=null,En.value=`pointer`,pn.value=!1,j.value=null,V.value=null,Dn.value=!1}function Hi(e){if(!I.value||Ei.value||document.activeElement!==I.value||(br.value=!1,!zi.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(Y.value&&(ri.value||G.value)){si(),oi(),Fr({applyControlledZoom:!1,publish:!0});return}F.value=null,En.value=`pointer`,pn.value=!1,j.value=null,V.value=null;return}if(r){if(F.value===null)return;if(z.value===E.DONUT){let e=H.value?.chart?.[F.value];if(!e)return;H.value.selectDatapoint({datapoint:e,seriesIndex:F.value});return}Q.value?.selectDatapoint(F.value);return}let a=F.value,o=V.value,s=a!==null&&a>=0&&a<zi.value,c=o!==null&&o>=0&&o<zi.value;if(s?n?(a+=1,a>=zi.value&&(a=0)):t&&(--a,a<0&&(a=zi.value-1)):c?(a=n?o+1:o-1,a>=zi.value&&(a=0),a<0&&(a=zi.value-1)):a=n?0:zi.value-1,z.value===E.DONUT){let e=H.value?.chart?.[a];if(!e)return;Ui(a),H.value.useTooltip({datapoint:e,seriesIndex:a,triggerMode:`keyboard`})}else Q.value&&(Ui(a),Q.value.useTooltip(a,`keyboard`))}function Ui(e){if(!Number.isFinite(e)||!I.value)return;let t=0,n=0;if(z.value===E.DONUT){let r=H.value?.chart?.[e];if(!r)return;t=ue(r,!0).x,n=pe(r)}if(Q.value){let{drawingArea:r,slotSize:i}=Q.value;if(!r||!i)return;t=r.left+i*(e+1)-i/2,n=r.top+r.height/2}let r=I.value.getBoundingClientRect();Tn.value={x:r.left+t/B.value.width*r.width,y:r.top+n/B.value.height*r.height}}let Wi=f(()=>{if(z.value===E.DONUT)return{headers:[`Series`,`Value`,`Percentage`],rows:(H.value?.dataset??[]).map(e=>{let t=H.value?.total?s({v:e.value/H.value.total*100,s:`%`,r:N.value.dataLabelRoundingPercentage}):`0%`;return[e.name,u(N.value.formatter,e.value,s({p:N.value.valuePrefix,v:e.value,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue})),t]})};if(z.value===E.LINE||z.value===E.BAR){let e=Q.value?.dataset??[],t=Q.value?.extremes?.maxSeries??0;return{headers:[`Index`,...e.map(e=>e.name)],rows:Array.from({length:t},(t,n)=>[$.value?.[n]?.text??String(n+U.value.start),...e.map(e=>{let t=e.values?.[n];return u(N.value.formatter,t,s({p:N.value.valuePrefix,v:t,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}))})])}}return{headers:[],rows:[]}});Fe({getImage:Oi,generatePdf:Kn,generateImage:qn,generateSvg:Fi,toggleTooltip:Ti,toggleAnnotator:Di,toggleFullscreen:wi,copyAlt:Li,resetZoom:()=>Fr({applyControlledZoom:!1,publish:!0}),setZoomState:Nr}),qe(()=>[B.value.width,B.value.height,N.value,z.value,$.value,bi.value,Sn.value,xn.value,O.dataset,M.value,er.value,N.value.fontFamily],Hr,{flush:`post`,deep:!0});let Gi=f(()=>{let e=Q.value;return i({enabled:N.value.userOptionsAnnotator?.followZoom,area:$r.value,range:U.value,ticks:e?.yLabels??[]})});return(e,i)=>Vn.value?(b(),m(`div`,{key:0,id:`${z.value}_${A.value}`,ref_key:`quickChart`,ref:k,class:_({"vue-data-ui-component":!0,"vue-ui-quick-chart":!0,"vue-data-ui-wrapper-fullscreen":Ci.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]||=()=>Fn(!0),onMouseleave:i[2]||=()=>Fn(!1)},[h(`div`,{id:`chart-instructions-${A.value}`,class:`sr-only`},[h(`p`,null,w(N.value.a11y.translations.keyboardNavigation),1)],8,ct),N.value.a11y.includeTable&&Wi.value.rows.length?(b(),Le(Ne,{key:0,uid:A.value,head:Wi.value.headers,body:Wi.value.rows,notice:N.value.a11y.translations.tableAvailable,caption:N.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),N.value.userOptionsButtons.annotator?(b(),Le(T(tt),Ve({key:1},T(n)(N.value.userOptionsAnnotator),{svgRef:T(I),followZoom:N.value.userOptionsAnnotator?.followZoom,annotationViewport:Gi.value,backgroundColor:N.value.backgroundColor,color:N.value.color,active:Ei.value,isCursorPointer:wn.value,palette:N.value.annotatorPalette,onClose:Di}),Re({_:2},[S(T(r),n=>({name:n,fn:Ye(r=>[C(e.$slots,n,v(g(T(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),Jn.value?(b(),m(`div`,{key:2,ref_key:`noTitle`,ref:_n,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),N.value.showUserOptions&&(Mn.value||Nn.value)?(b(),Le(T(rt),{ref:`details`,key:`user_option_${vn.value}`,backgroundColor:N.value.backgroundColor,color:N.value.color,isPrinting:T(Wn),isImaging:T(Gn),uid:A.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:Yn.value.showTooltip,isFullscreen:Ci.value,titles:{...N.value.userOptionsButtonTitles},chartElement:k.value,position:N.value.userOptionsPosition,hasAnnotator:N.value.userOptionsButtons.annotator,isAnnotation:Ei.value,callbacks:N.value.userOptionsCallbacks,printScale:N.value.userOptionsPrint.scale,isCursorPointer:wn.value,onToggleFullscreen:wi,onGeneratePdf:T(Kn),onGenerateImage:T(Ii),onGenerateSvg:T(Fi),onToggleTooltip:Ti,onToggleAnnotator:Di,onCopyAlt:Li,style:y({visibility:Mn.value?Nn.value?`visible`:`hidden`:`visible`})},Re({_:2},[S(T(a)(e.$slots,`menuIcon optionTooltip optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ye(n=>[C(e.$slots,t,v(g(T(o)(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`])):p(``,!0),N.value.title?(b(),m(`div`,{key:4,ref_key:`quickChartTitle`,ref:at,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)):p(``,!0),h(`div`,{id:`legend-top-${A.value}`},null,8,lt),h(`div`,ut,[z.value?(b(),m(`svg`,{key:0,ref_key:`svgRef`,ref:I,xmlns:T(me),"aria-describedby":`chart-instructions-${A.value}`,viewBox:ir.value,style:y({maxWidth:`100%`,visibility:T(Vr)?`visible`:`hidden`,overflow:`visible`,background:`transparent`,color:N.value.color,cursor:Y.value?G.value?`col-resize`:`crosshair`:void 0,touchAction:Y.value?`pan-y`:void 0,userSelect:Y.value?`none`:void 0}),class:_({"vue-data-ui-no-transition":!T(P)||T(Z),"vue-ui-quick-chart-zoom-pointer-focus":Y.value&&br.value}),tabindex:`0`,onFocus:Bi,onBlur:Vi,onKeydown:Hi,onPointerdown:mi,onPointermove:hi,onPointerup:gi,onPointercancel:si,onClickCapture:li},[ze(T($e)),e.$slots[`chart-background`]?(b(),m(`foreignObject`,{key:0,x:Q.value?.drawingArea.left??0,y:Q.value?.drawingArea.top??0,width:Q.value?.drawingArea.width??B.value.width,height:Q.value?.drawingArea.height??B.value.height,style:{"pointer-events":`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,ft)):p(``,!0),h(`defs`,null,[h(`filter`,{id:`blur_${A.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[h(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2,id:`blur_std_${A.value}`},null,8,mt),i[3]||=h(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,pt),h(`filter`,{id:`shadow_${A.value}`,"color-interpolation-filters":`sRGB`},[h(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`10`,"flood-opacity":`0.5`,"flood-color":N.value.donutShadowColor},null,8,gt)],8,ht)]),z.value===E.DONUT?(b(),m(d,{key:1},[N.value.showDataLabels?(b(),m(`g`,_t,[(b(!0),m(d,null,S(H.value.chart,(e,t)=>(b(),m(d,null,[H.value.isArcBigEnough(e)?(b(),m(`path`,{key:0,d:T(de)(e,{x:B.value.width/2,y:B.value.height/2},16,16,!1,!1,B.value.height*gr.value,12,N.value.donutCurvedMarkers),stroke:e.color,"stroke-width":N.value.donutLabelMarkerStrokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:or(e.id)},null,8,vt)):p(``,!0)],64))),256))])):p(``,!0),h(`circle`,{cx:H.value.cx,cy:H.value.cy,r:H.value.radius,fill:N.value.backgroundColor,filter:N.value.donutUseShadow?`url(#shadow_${A.value})`:``},null,8,yt),h(`g`,bt,[(b(!0),m(d,null,S(H.value.chart,(e,t)=>(b(),m(`path`,{d:e.arcSlice,fill:e.color,stroke:N.value.donutStroke||N.value.backgroundColor,"stroke-width":N.value.donutStrokeWidth,filter:or(e.id)},null,8,xt))),256)),(b(!0),m(d,null,S(H.value.chart,(e,t)=>(b(),m(`path`,{d:e.arcSlice,fill:`transparent`,onMouseenter:n=>H.value.useTooltip({datapoint:e,seriesIndex:t,triggerMode:`pointer`}),onMouseout:n=>H.value.killTooltip({datapoint:e,seriesIndex:t}),onClick:n=>H.value.selectDatapoint({datapoint:e,seriesIndex:t})},null,40,St))),256))]),N.value.showDataLabels?(b(),m(`g`,Ct,[(b(!0),m(d,null,S(H.value.chart,(e,t)=>(b(),m(d,null,[H.value.isArcBigEnough(e)?(b(),m(`circle`,{key:0,cx:T(ue)(e).x,cy:T(pe)(e)-3.7,fill:e.color,stroke:N.value.backgroundColor,"stroke-width":1,r:3,filter:or(e.id)},null,8,wt)):p(``,!0),H.value.isArcBigEnough(e)?(b(),m(`text`,{key:1,"text-anchor":T(ue)(e,!0,20).anchor,x:T(ue)(e,!0).x,y:T(pe)(e),fill:N.value.color,"font-size":N.value.dataLabelFontSize,filter:or(e.id)},w(H.value.displayArcPercentage(e,H.value.chart))+` (`+w(T(u)(N.value.formatter,e.value,T(s)({p:N.value.valuePrefix,v:e.value,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:e,seriesIndex:t}))+`) `,9,Tt)):p(``,!0),H.value.isArcBigEnough(e,!0,20)?(b(),m(`text`,{key:2,"text-anchor":T(ue)(e).anchor,x:T(ue)(e,!0).x,y:T(pe)(e)+N.value.dataLabelFontSize,fill:N.value.color,"font-size":N.value.dataLabelFontSize,filter:or(e.id)},w(e.name),9,Et)):p(``,!0)],64))),256))])):p(``,!0),N.value.donutShowTotal?(b(),m(`g`,Dt,[h(`text`,{"text-anchor":`middle`,x:H.value.drawingArea.centerX,y:H.value.drawingArea.centerY-N.value.donutTotalLabelFontSize/2,"font-size":N.value.donutTotalLabelFontSize,fill:N.value.color},w(N.value.donutTotalLabelText),9,Ot),h(`text`,{"text-anchor":`middle`,x:H.value.drawingArea.centerX,y:H.value.drawingArea.centerY+N.value.donutTotalLabelFontSize,"font-size":N.value.donutTotalLabelFontSize,fill:N.value.color},w(T(s)({p:N.value.valuePrefix,v:H.value.total,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue})),9,kt)])):p(``,!0)],64)):p(``,!0),Q.value?(b(),m(d,{key:2},[N.value.xyShowGrid?(b(),m(`g`,At,[(b(!0),m(d,null,S(Q.value.yLabels,e=>(b(),m(d,null,[e.y<=Q.value.drawingArea.bottom?(b(),m(`line`,{key:0,"data-cy":T(!1)?`grid-horizontal-line-`+Zr.value:void 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,jt)):p(``,!0)],64))),256)),z.value===E.LINE||M.value.length<Q.value.legend.length?(b(!0),m(d,{key:0},S(Q.value.extremes.maxSeries+1,(e,t)=>(b(),m(`line`,{"data-cy":T(!1)?`grid-vertical-line-`+Zr.value:void 0,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,Mt))),256)):p(``,!0)])):p(``,!0),N.value.xyShowAxis?(b(),m(`g`,Nt,[h(`line`,{"data-cy":T(!1)?Zr.value+`-y-axis`:void 0,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,Pt),h(`line`,{"data-cy":T(!1)?Zr.value+`-zero-axis`:void 0,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,Ft)])):p(``,!0),N.value.xyShowScale?(b(),m(`g`,{key:2,class:`yLabels`,ref_key:`scaleLabels`,ref:Sn},[(b(!0),m(d,null,S(Q.value.yLabels,(e,t)=>(b(),m(d,{key:`sl_${t}`},[e.y<=Q.value.drawingArea.bottom?(b(),m(`path`,{key:0,"data-cy":T(!1)?`scale-`+Zr.value+`-tick`:void 0,class:_({"vue-data-ui-transition":T(P)&&!T(Z)}),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,It)):p(``,!0),e.y<=Q.value.drawingArea.bottom?(b(),m(`text`,{key:1,class:_({"vue-data-ui-transition":T(P)&&!T(Z)}),"data-cy":T(!1)?`scale-`+Zr.value+`-label`:void 0,transform:`translate(${e.x}, ${e.y+N.value.xyLabelsYFontSize/3})`,"text-anchor":`end`,"font-size":N.value.xyLabelsYFontSize,fill:N.value.color},w(T(u)(N.value.formatter,e.value,T(s)({p:N.value.valuePrefix,v:e.value,s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:e,seriesIndex:t})),11,Lt)):p(``,!0)],64))),128))],512)):p(``,!0),N.value.xyShowScale&&N.value.xyPeriods.length?(b(),m(`g`,Rt,[(b(!0),m(d,null,S(Qr.value,(e,t)=>(b(),m(d,null,[z.value===E.BAR||!N.value.xyPeriodsShowOnlyAtModulo||N.value.xyPeriodsShowOnlyAtModulo&&t%Math.floor((U.value.end-U.value.start)/Si.value)===0||U.value.end-U.value.start<=Si.value?(b(),m(`line`,{key:0,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,zt)):p(``,!0)],64))),256)),h(`g`,{ref_key:`timeLabelsEls`,ref:xn},[(b(!0),m(d,null,S($.value.map(e=>e.text),(e,t)=>(b(),m(d,null,[!N.value.xyPeriodsShowOnlyAtModulo||N.value.xyPeriodsShowOnlyAtModulo&&t%Math.floor((U.value.end-U.value.start)/Si.value)===0||U.value.end-U.value.start<=Si.value?(b(),m(`g`,Bt,[String(e).includes(`
|
|
9
|
+
`)?(b(),m(`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(te)({content:String(e),fontSize:N.value.xyLabelsXFontSize,fill:N.value.color,x:0,y:0})},null,8,Ht)):(b(),m(`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,Vt))])):p(``,!0)],64))),256))],512)])):p(``,!0)],64)):p(``,!0),z.value===E.LINE?(b(),m(`g`,Ut,[(b(!0),m(d,null,S(Yr.value.dataset,(e,t)=>(b(),m(`g`,{key:`serie_${e.id}`,class:`line-plot-series`},[h(`path`,{d:Jr(e),stroke:N.value.backgroundColor,"stroke-width":N.value.lineStrokeWidth+1,"stroke-linecap":`round`,fill:`none`,class:_({"vue-data-ui-transition":T(P)&&!T(Z)})},null,10,Wt),h(`path`,{d:Jr(e),stroke:e.color,"stroke-width":N.value.lineStrokeWidth,"stroke-linecap":`round`,fill:`none`,class:_({"vue-data-ui-transition":T(P)&&!T(Z)}),style:y({transition:T(kn)||!N.value.lineSmooth?void 0:`all 0.2s ease-in-out`})},null,14,Gt),(b(!0),m(d,null,S(e.coordinates,(t,n)=>(b(),m(`circle`,{key:`dp_${e.id}_${n+U.value.start}`,cx:t.x,cy:T(ce)(t.y),r:3,fill:e.color,stroke:N.value.backgroundColor,"stroke-width":`0.5`,class:_({"vue-ui-quick-chart-plot":!0,"vue-data-ui-transition":T(P)&&!T(Z)})},null,10,Kt))),128))]))),128))])):p(``,!0),z.value===E.BAR?(b(),m(`g`,qt,[(b(!0),m(d,null,S(Xr.value.dataset,(e,t)=>(b(),m(d,null,[(b(!0),m(d,null,S(e.coordinates,(t,n)=>(b(),m(`rect`,{x:t.x,width:t.width<=0?1e-5:t.width,height:T(ce)(t.height<=0?1e-5:t.height),y:T(ce)(t.y),fill:e.color,stroke:N.value.backgroundColor,"stroke-width":N.value.barStrokeWidth,"stroke-linecap":`round`,class:_({"vue-data-ui-transition":T(P)&&!T(Z)})},null,10,Jt))),256))],64))),256))])):p(``,!0),Q.value?(b(),m(d,{key:5},[N.value.showDataLabels?(b(),m(`g`,Yt,[(b(!0),m(d,null,S(Q.value.dataset,(e,t)=>(b(),m(d,{key:`ds_${e.id}`},[(b(!0),m(d,null,S(e.coordinates,(t,n)=>(b(),m(`text`,{class:_({"vue-ui-quick-chart-label":z.value===E.LINE,"vue-data-ui-transition":T(P)&&!T(Z)}),key:z.value===E.LINE?`plot_${e.id}_${n+U.value.start}`:`plot_${n+U.value.start}`,"text-anchor":`middle`,"font-size":N.value.dataLabelFontSize,fill:e.color,transform:`translate(${z.value===E.BAR?t.x+t.width/2:t.x}, ${T(ce)(t.y)-N.value.dataLabelFontSize/2})`},w(T(u)(N.value.formatter,T(ce)(t.value),T(s)({p:N.value.valuePrefix,v:T(ce)(t.value),s:N.value.valueSuffix,r:N.value.dataLabelRoundingValue}),{datapoint:t,seriesIndex:n})),11,Xt))),128))],64))),128))])):p(``,!0),Pn.value&&(z.value===E.LINE||M.value.length<Q.value.legend.length)?(b(),m(`g`,Zt,[(b(!0),m(d,null,S(Q.value.extremes.maxSeries,(e,t)=>(b(),m(`rect`,{"data-cy":T(!1)?`tooltip-trap-`+Zr.value:void 0,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,V.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,Qt))),256))])):p(``,!0)],64)):p(``,!0),[E.LINE,E.BAR].includes(z.value)?(b(),m(`g`,$t,[N.value.xAxisLabel?(b(),m(`g`,en,[h(`text`,{"font-size":N.value.axisLabelsFontSize,fill:N.value.color,"text-anchor":`middle`,x:Q.value.drawingArea.left+Q.value.drawingArea.width/2,y:B.value.height-N.value.axisLabelsFontSize/3},w(N.value.xAxisLabel),9,tn)])):p(``,!0),N.value.yAxisLabel?(b(),m(`g`,nn,[h(`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,rn)])):p(``,!0)])):p(``,!0),ni.value?(b(),m(`rect`,{key:7,x:ni.value.x,y:ni.value.y,width:ni.value.width,height:ni.value.height,fill:wr.value.selection.fill,"fill-opacity":wr.value.selection.fillOpacity,stroke:wr.value.selection.stroke,"stroke-opacity":wr.value.selection.strokeOpacity,"stroke-width":wr.value.selection.strokeWidth,"stroke-dasharray":wr.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,an)):p(``,!0)],46,dt)):p(``,!0),e.$slots.hint?(b(),m(`div`,on,[C(e.$slots,`hint`,v(g({hint:N.value.a11y.translations.keyboardNavigation,isVisible:Dn.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(b(),m(`div`,sn,[C(e.$slots,`watermark`,v(g({isPrinting:T(Wn)||T(Gn)})),void 0,!0)])):p(``,!0),Un.value?(b(),m(`div`,{key:`slicer_${yn.value}`,ref_key:`quickChartSlicer`,ref:fn},[(b(),Le(Ae,{ref_key:`slicerComponent`,ref:_r,key:`slicer_${yn.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:R.value.maxSeriesLength,min:0,valueStart:U.value.start,valueEnd:U.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:zr.value,minimapIndicatorColor:N.value.zoomMinimap.indicatorColor,verticalHandles:N.value.zoomMinimap.verticalHandles,minimapSelectedIndex:V.value,"onUpdate:start":Lr,"onUpdate:end":Rr,refreshStartPoint:N.value.zoomStartIndex===null?0:N.value.zoomStartIndex,refreshEndPoint:N.value.zoomEndIndex===null?R.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:yi.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:_i.value,minimapRightInsetRatio:vi.value,onReset:i[0]||=()=>Fr({applyControlledZoom:!1,publish:!0}),onTrapMouse:hr},{"reset-action":Ye(({reset:t})=>[C(e.$slots,`reset-action`,v(g({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(`.`)))])):p(``,!0),h(`div`,{id:`legend-bottom-${A.value}`},null,8,cn),bn.value&&N.value.showLegend?(b(),Le(Ie,{key:7,to:N.value.legendPosition===`top`?`#legend-top-${A.value}`:`#legend-bottom-${A.value}`},[N.value.showLegend?(b(),m(`div`,{key:0,ref_key:`quickChartLegend`,ref:ot,class:`vue-ui-quick-chart-legend`,style:y(`background:transparent;color:${N.value.color}`)},[(H.value?.legend?.length>2||Yr.value?.legend?.length>2||Xr.value?.legend?.length>2)&&N.value.showLegendSelectAllToggle&&!T(kn)?(b(),Le(Pe,{key:0,backgroundColor:N.value.legendSelectAllToggleBackgroundColor,color:N.value.legendSelectAllToggleColor,fontSize:N.value.legendFontSize,checked:M.value.length>0,isCursorPointer:wn.value,onToggle:sr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0),z.value===E.DONUT?(b(!0),m(d,{key:1},S(H.value.legend,(t,n)=>(b(),m(`div`,{class:`vue-ui-quick-chart-legend-item`,onClick:e=>mr(t,H.value.dataset),style:y(`cursor: ${H.value.legend.length>1&&wn.value?`pointer`:`default`}; opacity:${M.value.includes(t.id)?`0.5`:`1`}`),role:`button`,tabindex:`0`,onKeydown:e=>{Ri(e,()=>{mr(t,H.value.dataset)})}},[N.value.useCustomLegend?C(e.$slots,`legend`,Ve({ref_for:!0},{legend:{...t,isSegregated:M.value.includes(t.id),segregate:()=>{mr(t,H.value.dataset)}}}),void 0,!0,0):(b(),m(d,{key:1},[ze(T(Qe),{name:N.value.legendIcon,stroke:t.color,size:N.value.legendIconSize},null,8,[`name`,`stroke`,`size`]),h(`span`,{style:y(`font-size:${N.value.legendFontSize}px`)},w(t.name),5),h(`span`,{style:y(`font-size:${N.value.legendFontSize}px;font-variant-numeric:tabular-nums`)},w(M.value.includes(t.id)?`-`:T(u)(N.value.formatter,t.absoluteValue,T(s)({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(),m(`span`,{key:0,style:y(`font-size:${N.value.legendFontSize}px`)},` ( - % ) `,4)):ur.value?(b(),m(`span`,{key:1,style:y(`font-size:${N.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)},` ( - % ) `,4)):(b(),m(`span`,{key:2,style:y(`font-size:${N.value.legendFontSize}px; font-variant-numeric: tabular-nums;`)},` (`+w(T(s)({v:t.value/H.value.total*100,s:`%`,r:N.value.dataLabelRoundingPercentage}))+`) `,5))],64))],44,ln))),256)):p(``,!0),Q.value?(b(!0),m(d,{key:2},S(Q.value.legend,(t,n)=>(b(),m(`div`,{class:`vue-ui-quick-chart-legend-item`,onClick:e=>{cr(t.id,Q.value.legend.length-1),L(`selectLegend`,Q.value.dataset)},style:y(`cursor: ${Q.value.legend.length>1&&wn.value?`pointer`:`default`}; opacity:${M.value.includes(t.id)?`0.5`:`1`}`),role:`button`,tabindex:`0`,onKeydown:e=>{Ri(e,()=>{cr(t.id,Q.value.legend.length-1),L(`selectLegend`,Q.value.dataset)})}},[N.value.useCustomLegend?C(e.$slots,`legend`,Ve({ref_for:!0},{legend:{...t,isSegregated:M.value.includes(t.id),segregate:()=>{cr(t.id,Q.value.legend.length-1),L(`selectLegend`,Q.value.dataset)}}}),void 0,!0,0):(b(),m(d,{key:1},[ze(T(Qe),{name:N.value.legendIcon,stroke:t.color,size:N.value.legendIconSize},null,8,[`name`,`stroke`,`size`]),h(`span`,{style:y(`font-size:${N.value.legendFontSize}px`)},w(t.name),5)],64))],44,un))),256)):p(``,!0)],4)):p(``,!0)],8,[`to`])):p(``,!0),e.$slots.source?(b(),m(`div`,{key:8,ref_key:`source`,ref:gn,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),ze(T(nt),{teleportTo:N.value.tooltipTeleportTo,show:Yn.value.showTooltip&&pn.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:k.value,content:hn.value,isFullscreen:Ci.value,isCustom:T(c)(N.value.tooltipCustomFormat),smooth:N.value.tooltipSmooth,smoothForce:N.value.tooltipSmoothForce,smoothSnapThreshold:N.value.tooltipSmoothSnapThreshold,backdropFilter:N.value.tooltipBackdropFilter,isA11yMode:En.value===`keyboard`,a11yPosition:Tn.value},{"tooltip-before":Ye(()=>[C(e.$slots,`tooltip-before`,v(g({...mn.value})),void 0,!0)]),tooltip:Ye(()=>[C(e.$slots,`tooltip`,v(g({...mn.value})),void 0,!0)]),"tooltip-after":Ye(()=>[C(e.$slots,`tooltip-after`,v(g({...mn.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(kn)?(b(),Le(Me,{key:0})):p(``,!0)],!0)],46,st)):(b(),m(`div`,dn,[ze(T(Qe),{name:`circleCancel`,stroke:`red`}),i[4]||=h(`span`,null,`Dataset is not processable`,-1)]))}},[[`__scopeId`,`data-v-6230ee4f`]]);export{ot as n,fn 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"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s,t as ee}from"./tableIntegration-CNoJ1CIY.js";import{t as te}from"./chartImage-DPGnEuYM.js";import{$ as c,D as ne,Dt as re,Ht as ie,Jt as ae,Lt as oe,M as se,S as ce,X as le,Yt as ue,at as l,b as de,i as fe,in as pe,nt as me,t as he,w as ge,yt as _e}from"./lib-rPeBMZrn.js";import{n as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./useConfig-9oDGTWWG.js";import{n as be}from"./resolveChartConfig-0IvbmIE_.js";import{t as xe}from"./usePrinter-DVf3YcG5.js";import{t as Se}from"./useResponsive-CENUxfEL.js";import{t as Ce}from"./useChartExport-BZts4KFb.js";import{t as we}from"./useChartAccessibility-DOMuYJfm.js";import{t as Te}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{n as Ee}from"./Title-BliHuXfT.js";import{t as De}from"./Legend-W9YVYVX-.js";import{t as Oe}from"./vue_ui_radar-Pd3xOzjc.js";import{t as ke}from"./BaseScanner-m6QR9rwD.js";import{t as Ae}from"./A11yDataTable-DWNlWXzs.js";import{t as je}from"./BaseLegendToggle-VzX69MCo.js";import{t as Me}from"./DefGrad-DKMq1REY.js";import{t as Ne}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as u,Teleport as Pe,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Fe,createTextVNode as Ie,createVNode as Le,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Re,nextTick as ze,normalizeClass as Be,normalizeProps as v,normalizeStyle as y,onBeforeUnmount as Ve,onMounted as He,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as Ue,shallowRef as We,toDisplayString as w,unref as T,watch as E,withCtx as D}from"vue";var Ge=/* @__PURE__ */ e({default:()=>St}),Ke=[`id`],qe=[`id`],Je=[`id`],Ye={style:{position:`relative`}},Xe=[`xmlns`,`aria-describedby`,`viewBox`],Ze=[`width`,`height`],Qe={key:1},$e=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],et={key:0,style:{"pointer-events":`none`}},tt=[`d`,`stroke`,`stroke-width`],nt=[`d`,`stroke`,`stroke-width`],rt={key:2},it=[`x`,`y`,`text-anchor`,`font-size`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],at=[`points`,`stroke`,`stroke-width`],ot=[`points`,`stroke`,`stroke-width`,`fill`],st=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ct={key:4},lt=[`onMouseenter`,`onMouseleave`,`onClick`],ut=[`cx`,`cy`,`r`],dt=[`cx`,`cy`,`fill`,`r`,`stroke`],ft={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},pt={key:5,class:`vue-data-ui-watermark`},mt=[`id`],ht=[`onClick`],gt={class:`vue-data-ui-legend-item`},_t=[`stroke`,`stroke-width`,`stroke-dasharray`],vt={key:0,style:{"max-width":`200px`,margin:`0 auto`}},yt={class:`vue-ui-radar-tooltip-datalabel`,style:{width:`100%`}},bt={class:`vue-ui-radar-tooltip-datalabel-name`},xt={key:0},St=/*#__PURE__*/ Ne({__name:`vue-ui-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`selectLegend`,`copyAlt`],setup(e,{expose:Ne,emit:Ge}){let St=g(()=>import(`./Tooltip-B432XpvC.js`)),Ct=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),wt=g(()=>import(`./vue-ui-sparkbar-CjLLQ0Ja.js`).then(e=>e.n)),Tt=g(()=>import(`./vue-ui-accordion-CnAwFOgA.js`).then(e=>e.n)),Et=g(()=>import(`./DataTable-KeuZB1JM.js`)),Dt=g(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),Ot=g(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),kt=g(()=>import(`./PackageVersion-B9qiUJPH.js`).then(e=>e.t)),At=g(()=>import(`./BaseDraggableDialog-DVstuNhT.js`).then(e=>e.n)),{vue_ui_radar:jt}=ye(),O=e,Mt=d(()=>Nt(O.dataset));function Nt(e){return Array.isArray(e?.categories)&&e.categories.length>0&&Array.from(e.categories,e=>e&&Object.keys(e).includes(`name`)).every(Boolean)&&Array.isArray(e.series)&&e.series.length>0&&Array.from(e.series,t=>t&&Object.keys(t).includes(`name`)&&Array.isArray(t.values)&&t.values.length===e.categories.length&&Array.from(t.values,Number.isFinite).every(Boolean)&&(t.target===void 0||Number.isFinite(t.target))).every(Boolean)}let k=x(le()),Pt=x(!1),Ft=x(``),It=x(0),A=x(null),Lt=x(null),Rt=x(null),zt=x(null),Bt=x(null),Vt=x(!1),Ht=x(null),Ut=x(null),j=x(null),Wt=x({x:0,y:0}),Gt=x(`pointer`),Kt=x(!1),M=x(Qt());E(()=>O.config,()=>{M.value=Qt()},{deep:!0});let N=d(()=>!!O.config.loading||!Mt.value),P=d(()=>N.value?pe({defaultConfig:M.value,userConfig:qt.value}):M.value),qt=d(()=>pe({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:M.value.skeletonConfig??{}})),F=d(()=>P.value.userOptions),I=d(()=>P.value.style.chart.layout.labels),L=d(()=>P.value.style.chart.layout),R=d(()=>P.value.style.chart.tooltip),z=d(()=>P.value.style.chart);ve({config:()=>P.value,dataset:()=>O.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 B=d(()=>P.value.userOptions.useCursorPointer),Jt=d(()=>N.value?Nt(O.config.skeletonDataset)?O.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}]}:O.dataset),Yt=x(!P.value.userOptions.showOnChartHover),Xt=d(()=>P.value.userOptions.keepStateOnChartLeave);function Zt(e=!1){P.value.userOptions.showOnChartHover&&(Yt.value=e)}E(()=>P.value.userOptions.showOnChartHover,e=>{Yt.value=!e});let{svgRef:V}=we({config:z.value.title});function Qt(){return be(O.config,jt,Oe)}let $t=We(null),en=We(null),H=null,tn=!1,U=d(()=>M.value.debug);function nn(){$t.value?.disconnect(),$t.value=null,H!==null&&cancelAnimationFrame(H),H=null}function rn(){if(nn(),en.value=null,!P.value.responsive||!A.value?.parentNode)return;let e=new ResizeObserver(t);function t(){tn||$t.value!==e||(H!==null&&cancelAnimationFrame(H),H=requestAnimationFrame(()=>{if(tn||$t.value!==e)return;H=null;let{width:t,height:n}=Se({chart:A.value,title:z.value.title.text?Lt.value:null,legend:z.value.legend.show?Rt.value:null,source:zt.value,noTitle:Bt.value});en.value={width:Math.max(.1,t),height:Math.max(.1,n)}}))}$t.value=e;for(let t of[A.value.parentNode,Lt.value,Rt.value,zt.value,Bt.value])t&&e.observe(t);t()}E([()=>P.value.responsive,Lt,Rt,zt,Bt,()=>z.value.title.text,()=>z.value.legend.show,()=>z.value.legend.position],rn,{flush:`post`}),He(()=>{Vt.value=!0,rn()}),Ve(()=>{tn=!0,nn(),bn()});let{isPrinting:an,isImaging:on,generatePdf:sn,generateImage:cn}=xe({elementId:`vue-ui-radar_${k.value}`,fileName:z.value.title.text||`vue-ui-radar`,options:P.value.userOptions.print}),ln=d(()=>P.value.userOptions.show&&!z.value.title.text),un=d(()=>ge(P.value.customPalette)),W=x({showTable:M.value.table.show,showTooltip:M.value.style.chart.tooltip.show});E(()=>M.value.table.show,e=>{W.value.showTable=e}),E(()=>M.value.style.chart.tooltip.show,e=>{W.value.showTooltip=e});let dn=d(()=>({style:{backgroundColor:`#FFFFFF00`,animation:{show:R.value.animation.show,animationFrames:R.value.animation.animationFrames},labels:{fontSize:R.value.fontSize,name:{color:R.value.color}},gutter:{backgroundColor:`#CCCCCC`,opacity:30}}})),G=d(()=>en.value??{height:312,width:512});function fn(e){let t=/* @__PURE__ */ new Map;return e.map(e=>{let n=e.name,r=t.get(n)??0;return t.set(n,r+1),JSON.stringify([n,r])})}let K=d(()=>fn(Y.value)),pn=d(()=>fn(X.value)),mn=Ge,q=x([]),J=d(()=>K.value.flatMap((e,t)=>q.value.includes(e)?[t]:[])),hn=x(null),gn=x(!1);function _n(){N.value||(bn(),q.value=J.value.length?[]:K.value.slice(),vn())}function vn(){mn(`selectLegend`,Q.value.filter((e,t)=>!J.value.includes(t)).map(e=>({name:e.name,color:e.color,proportion:e.totalProportion})))}let yn=null;function bn(){yn!==null&&clearTimeout(yn),yn=null,gn.value=!1,hn.value=null}function xn(e){if(N.value||!K.value[e])return;bn();let t=K.value[e],n=q.value.includes(t);q.value=n?q.value.filter(e=>e!==t):[...q.value,t],P.value.useCssAnimation&&(gn.value=!0,n&&(hn.value=e),yn=setTimeout(bn,500)),vn()}function Sn(){return Q.value.map(e=>({name:e.name,color:e.color,proportion:e.totalProportion}))}function Cn(){let e=O.dataset;[null,void 0].includes(e?.categories)?(l({componentName:`VueUiRadar`,type:`dataset`,debug:U.value}),l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`categories ({ name: string; prefix?: string; suffix?: string}[])`,debug:U.value})):(Array.isArray(e.categories)?e.categories.length===0?l({componentName:`VueUiRadar`,type:`datasetAttributeEmpty`,property:`categories`,debug:U.value}):U.value&&Array.from(e.categories).forEach((e,t)=>{_e({datasetObject:e??{},requiredAttributes:[`name`]}).forEach(e=>{l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`category.${e} at index ${t}`,index:t})})}):U.value&&console.warn(`VueUiRadar: dataset.categories must be an array.`),[null,void 0].includes(e?.series)?l({componentName:`VueUiRadar`,type:`datasetAttribute`,property:`series ({ name: string; values: number[]; color?: string; target?: number}[])`,debug:U.value}):Array.isArray(e.series)?(e.series.length===0&&l({componentName:`VueUiRadar`,type:`datasetAttributeEmpty`,property:`series`,debug:U.value}),U.value&&Array.from(e.series).forEach((t,n)=>{_e({datasetObject:t??{},requiredAttributes:[`name`,`values`]}).forEach(e=>{l({componentName:`VueUiRadar`,type:`datasetSerieAttribute`,key:`series`,property:e,index:n})}),Array.isArray(t?.values)?(t.values.length!==e.categories?.length&&console.warn(`VueUiRadar: dataset.series[${n}].values must contain one value per category.`),Array.from(t.values).forEach((e,t)=>{Number.isFinite(e)||console.warn(`VueUiRadar: dataset.series[${n}].values[${t}] must be a finite number.`)})):t&&Object.keys(t).includes(`values`)&&console.warn(`VueUiRadar: dataset.series[${n}].values must be an array.`),t?.target!==void 0&&!Number.isFinite(t.target)&&console.warn(`VueUiRadar: dataset.series[${n}].target must be a finite number.`)})):U.value&&console.warn(`VueUiRadar: dataset.series must be an array.`))}E([()=>O.dataset,U],()=>Cn(),{deep:!0,immediate:!0});let Y=d(()=>{let e=Array.isArray(Jt.value?.categories)?Jt.value.categories:[],t=un.value??ie;return e.map((e,n)=>({name:e?.name??``,categoryId:`radar_category_${k.value}_${n}`,color:ce(e?.color)||t[n]||ie[n%ie.length],prefix:e?.prefix??``,suffix:e?.suffix??``}))}),X=d(()=>Jt.value.series.map((e,t)=>({...e,color:ce(e.color)||un.value[t]||ie[t]||ie[t%ie.length],serieId:`radar_serie_${k.value}_${t}`,formatter:e.formatter||null,absoluteIndex:t})));E([K,()=>P.value.useCssAnimation],()=>{bn(),N.value||(q.value=q.value.filter(e=>K.value.includes(e)))});function wn(e){return X.value.length?Q.value.find(t=>t.name===e)||(U.value&&console.warn(`VueUiRadar - Series name not found "${e}"`),null):(U.value&&console.warn(`VueUiRadar - There are no series to show.`),null)}function Tn(e){let t=wn(e);t!==null&&J.value.includes(t.absoluteIndex)&&xn(t.absoluteIndex)}function En(e){let t=wn(e);t!==null&&(J.value.includes(t.absoluteIndex)||xn(t.absoluteIndex))}let Dn=d(()=>X.value.reduce((e,t)=>t.values.reduce((e,t)=>Math.max(e,t),e),0)),On=d(()=>X.value.map(e=>L.value.scaleToAxisMax?e.values.reduce((e,t)=>Math.max(e,t),Math.max(1,e.target||0)):e.target||Dn.value||1));function kn(e,t){let n=e/t;return Number.isFinite(n*100)?n:null}let An=d(()=>X.value.map((e,t)=>{let n=Fn.value.coordinates[t];return Bn({centerX:G.value.width/2,centerY:G.value.height/2,apexX:n.x,apexY:n.y,proportion:(e.target||0)/On.value[t]})})),jn=d(()=>X.value.length),Mn=d(()=>Math.min(G.value.width,G.value.height)/3),Nn=d(()=>{let e=Number(L.value.plots.radius??0);return Math.max(Number.isFinite(e)?e*2.5:0,10)}),Pn=d(()=>{let e=Number(L.value.grid.rotation??0);return Number.isFinite(e)?e*Math.PI/180:0}),Fn=d(()=>se({plot:{x:G.value.width/2,y:G.value.height/2},radius:Mn.value,sides:jn.value,rotation:Pn.value})),In=d(()=>{let e=[];if(!Number.isFinite(L.value.grid.graduations)||L.value.grid.graduations<=0)return e;for(let t=0;t<Mn.value;t+=Mn.value/L.value.grid.graduations)e.push(t);return e}),Z=d(()=>Fn.value.coordinates.map((e,t)=>{let n=X.value[t],r=X.value[t].values.map(n=>Bn({centerX:G.value.width/2,centerY:G.value.height/2,apexX:e.x,apexY:e.y,proportion:n/On.value[t]}));return{...e,...n,plots:r}}).map(e=>{let t=Ln(e);return{...e,labelX:t.x,labelY:t.y,labelAnchor:t.anchor}}));function Ln({x:e,y:t}){let n=G.value.width/2,r=G.value.height/2,i=e-n,a=t-r,o=Math.hypot(i,a),s=Number(I.value.dataLabels.offset??0),ee=20+(Number.isFinite(s)?s:0);if(!o)return{x:e,y:t,anchor:`middle`};let te=i/o,c=a/o,ne=`middle`;return te>.01?ne=`start`:te<-.01&&(ne=`end`),{x:e+te*ee,y:t+c*ee,anchor:ne}}let{autoSizeLabels:Rn}=Te({svgRef:V,fontSize:()=>I.value.dataLabels.fontSize,minFontSize:6,labelClass:`.vue-ui-radar-apex-label`});E([Z,()=>I.value.dataLabels.fontSize,()=>I.value.dataLabels.show],Rn,{flush:`post`}),He(Rn);let zn=d(()=>Y.value.map((e,t)=>oe(Z.value.map(e=>e.plots[t]),!1,!0)));function Bn({centerX:e,centerY:t,apexX:n,apexY:r,proportion:i}){return{x:e+(n-e)*i,y:t+(r-t)*i}}let Q=d(()=>{let e=X.value.map((e,t)=>e.values.map(t=>t/(e.target||Dn.value)));return Y.value.map((t,n)=>{let r=de(e.map(e=>e[n]).reduce((e,t)=>e+t,0)/X.value.length);return{...t,absoluteIndex:n,totalProportion:r,shape:`circle`,opacity:J.value.includes(n)?.5:1,segregate:()=>xn(n),isSegregated:J.value.includes(n),display:`${t.name}: ${c({v:(r??0)*100,s:`%`,r:z.value.legend.roundingPercentage})}`}})}),Vn=d(()=>({cy:`radar-div-legend`,backgroundColor:z.value.legend.backgroundColor,color:z.value.legend.color,fontSize:z.value.legend.fontSize,paddingBottom:12,fontWeight:z.value.legend.bold?`bold`:``})),Hn=d(()=>{let e=[{name:P.value.translations.datapoint,color:``},{name:P.value.translations.target,color:``},...Q.value];return{head:e,body:Jt.value.series.map(e=>[e.name,fe(e.formatter,e.target,c({p:e.prefix,v:e.target,s:e.suffix,r:P.value.table.td.roundingValue})),...e.values.map((t,n)=>`${fe(e.formatter,t,c({p:Y.value[n]?.prefix??``,v:t,s:Y.value[n]?.suffix??``,r:P.value.table.td.roundingValue}))} (${kn(t,e.target)===null?``:c({v:kn(t,e.target)*100,s:`%`,r:P.value.table.td.roundingPercentage})})`)]),config:{th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint},colNames:e}}),Un=x(null),Wn=x(null),Gn=x([]),Kn=x(null);function qn(){Pt.value=!1,Un.value=null,j.value=null,Wn.value=null,Gt.value=`pointer`,Kn.value=null,Gn.value=[],Ft.value=``}function Jn(e,t){N.value||(qn(),P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t}))}function Yn(e,t){N.value||P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Xn(e,t,n=`pointer`,r=!0){if(N.value)return;Wn.value=pn.value[t],r&&P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:t}),Gt.value=n,j.value=t;let i=Y.value.slice();Gn.value=[],Un.value=t,Pt.value=!0,Kn.value={datapoint:e,seriesIndex:t,series:{categories:i,datapoints:X.value,radar:Z.value},config:P.value};let a=R.value.customFormat;if(re(a)){let e=a(Kn.value);if(typeof e==`string`){Ft.value=e;return}}Ft.value=`<div style="width:100%;text-align:center;border-bottom:1px solid ${R.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`;for(let t=0;t<e.values.length;t+=1)if(!J.value.includes(t)){let n=i[t],r=e.values[t],a=(kn(r,e.target)??0)*100,o=fe(e.formatter,r,c({p:Y.value[t].prefix,v:r,s:Y.value[t].suffix,r:R.value.roundingValue}),{datapoint:e}),s=c({v:a,s:`%`,r:R.value.roundingPercentage}),ee=R.value.showValue&&R.value.showPercentage?`${o} (${s})`:R.value.showValue&&!R.value.showPercentage?o:!R.value.showValue&&R.value.showPercentage?`${s}`:``;Gn.value.push({name:n?.name??`#${t+1}`,value:a,color:n?.color,suffix:ee,prefix:``,rounding:R.value.roundingPercentage,formatter:e.formatter})}}function Zn(e=null){ze(()=>{let t=[[z.value.title.text],[z.value.title.subtitle.text],[``]],n=[[``],[P.value.translations.target],...Q.value.flatMap(e=>[[e.name],[`%`]])],r=Jt.value.series.map((e,t)=>[e.name,e.target,...e.values.flatMap(t=>[t,kn(t,e.target)===null?``:kn(t,e.target)*100])]),i=t.concat([n]).concat(r),a=ne(i);e?e(a):me({csvContent:a,title:z.value.title.text||`vue-ui-radar`})})}let $=x(!1);function Qn(e){$.value=e,It.value+=1}function $n(){W.value.showTable=!W.value.showTable}function er(){W.value.showTooltip=!W.value.showTooltip}let tr=x(!1);function nr(){tr.value=!tr.value}let rr=te(A,()=>z.value.title.text),ir=d(()=>ee({config:P,style:z,mutableConfig:W,dialog:At,accordion:Tt,isFullscreen:$,parent:A,maxWidth:800,isCursorPointer:B}));E([()=>W.value.showTable,Ht,()=>P.value.table.useDialog],([e])=>{Ht.value&&s(e,P,Ht)},{flush:`post`});function ar(){W.value.showTable=!1,Ut.value&&Ut.value.setTableIconState(!1)}let or=d(()=>Q.value.map(e=>({...e,name:e.display}))),sr=d(()=>z.value.backgroundColor),cr=d(()=>z.value.legend),lr=d(()=>z.value.title),{isCallbackImaging:ur,isCallbackSvg:dr,generateSvg:fr,onGenerateImage:pr}=Ce({svg:V,title:lr,legend:cr,legendItems:or,backgroundColor:sr,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:cn});async function mr(){mn(`copyAlt`,{config:P.value,dataset:Z.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:Z.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function hr(){qn(),Kt.value=!0}function gr(){qn(),Kt.value=!1}function _r(e){if(!Number.isFinite(e)||!V.value)return;let t=Z.value[e];if(!t)return;let n=V.value.getBoundingClientRect();Wt.value={x:n.left+t.labelX/G.value.width*n.width,y:n.top+t.labelY/G.value.height*n.height}}function vr(e){if(!V.value||tr.value||N.value||document.activeElement!==V.value||!Z.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){qn();return}if(r){if(j.value===null)return;let e=Z.value[j.value];if(!e)return;Yn(e,j.value);return}let a=j.value;a===null||a<0||a>=Z.value.length?a=n?0:Z.value.length-1:n?(a+=1,a>=Z.value.length&&(a=0)):t&&(--a,a<0&&(a=Z.value.length-1));let o=Z.value[a];o&&(j.value=a,_r(a),Xn(o,a,`keyboard`))}E([Z,pn,Y,J,R,()=>P.value],()=>{if(Wn.value===null)return;let e=pn.value.indexOf(Wn.value);N.value||e<0?qn():(Gt.value===`keyboard`&&_r(e),Xn(Z.value[e],e,Gt.value,!1))},{flush:`post`});let yr=d(()=>({headers:Hn.value?.colNames?.map(e=>e.name??e)??[],rows:Hn.value?.body??[]}));return Ne({getData:Sn,getImage:rr,generatePdf:sn,generateCsv:Zn,generateImage:cn,generateSvg:fr,hideSeries:En,showSeries:Tn,toggleTable:$n,toggleTooltip:er,toggleAnnotator:nr,toggleFullscreen:Qn,copyAlt:mr}),(e,s)=>(b(),m(`div`,{class:Be(`vue-data-ui-component vue-ui-radar ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${P.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`radarChart`,ref:A,id:`vue-ui-radar_${k.value}`,style:y(`font-family:${P.value.style.fontFamily};width:100%; ${P.value.responsive?`height: 100%;`:``} text-align:center;background:${z.value.backgroundColor}`),onMouseenter:s[2]||=()=>Zt(!0),onMouseleave:s[3]||=()=>Zt(!1)},[h(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[h(`p`,null,w(P.value.a11y.translations.keyboardNavigation),1)],8,qe),P.value.a11y.includeTable&&yr.value?.rows?.length?(b(),f(Ae,{key:0,uid:k.value,head:yr.value.headers,body:yr.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),F.value.buttons.annotator?(b(),f(T(Dt),Re({key:1},T(a)(F.value.annotator),{svgRef:T(V),backgroundColor:z.value.backgroundColor,color:z.value.color,active:tr.value,isCursorPointer:B.value,palette:F.value.annotatorPalette,onClose:nr}),Fe({_:2},[S(T(o),t=>({name:t,fn:D(n=>[C(e.$slots,t,v(_(T(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),ln.value?(b(),m(`div`,{key:2,ref_key:`noTitle`,ref:Bt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),z.value.title.text?(b(),m(`div`,{key:3,ref_key:`chartTitle`,ref:Lt,style:`width:100%;background:transparent;padding-bottom:12px`},[Le(Ee,{config:{title:{cy:`radar-div-title`,...z.value.title},subtitle:{cy:`radar-div-subtitle`,...z.value.title.subtitle}}},null,8,[`config`])],512)):p(``,!0),h(`div`,{id:`legend-top-${k.value}`},null,8,Je),F.value.show&&Mt.value&&(Xt.value||Yt.value)?(b(),f(T(Ot),Re({ref_key:`userOptionsRef`,ref:Ut,key:`user_options_${It.value}`,backgroundColor:z.value.backgroundColor,color:z.value.color,isImaging:T(on),isPrinting:T(an),uid:k.value,hasTooltip:F.value.buttons.tooltip&&R.value.show,isFullscreen:$.value,isTooltip:W.value.showTooltip,chartElement:A.value},T(n)(F.value,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:tr.value,tableDialog:P.value.table.useDialog,isCursorPointer:B.value,onToggleFullscreen:Qn,onGeneratePdf:T(sn),onGenerateCsv:Zn,onGenerateImage:T(pr),onGenerateSvg:T(fr),onToggleTable:$n,onToggleTooltip:er,onToggleAnnotator:nr,onCopyAlt:mr,style:{visibility:Xt.value?Yt.value?`visible`:`hidden`:`visible`}}),Fe({_:2},[S(T(t)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:D(n=>[C(e.$slots,t,v(_(T(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`hasTooltip`,`isFullscreen`,`isTooltip`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):p(``,!0),h(`div`,Ye,[(b(),m(`svg`,{ref_key:`svgRef`,ref:V,xmlns:T(he),"aria-describedby":`chart-instructions-${k.value}`,class:Be({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${G.value.width<=0?10:G.value.width} ${G.value.height<=0?10:G.value.height}`,style:y(`max-width:100%;overflow:visible;background:transparent;color:${z.value.color}`),tabindex:`0`,onFocus:hr,onBlur:gr,onKeydown:vr},[Le(T(kt)),C(e.$slots,`svg-underlayer`,{svg:{...G.value,outerPolygon:Fn.value,isPrintingImg:T(an)||T(on)||T(ur),isPrintingSvg:T(dr)}},void 0,!0),e.$slots[`chart-background`]?(b(),m(`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`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,Ze)):p(``,!0),h(`defs`,null,[(b(!0),m(u,null,S(Y.value,(e,t)=>(b(),f(Me,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`radar_gradient_${k.value}_${t}`,key:`radar_gradient_${k.value}_${t}`,stops:[[`0%`,T(ae)(T(ue)(e.color,.05),L.value.dataPolygon.opacity),1],[`100%`,T(ae)(e.color,L.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`]))),128))]),L.value.grid.show?(b(),m(`g`,Qe,[(b(!0),m(u,null,S(Z.value,e=>(b(),m(`line`,{x1:G.value.width/2,y1:G.value.height/2,x2:e.x,y2:e.y,stroke:L.value.grid.stroke,"stroke-width":L.value.grid.strokeWidth,style:{"pointer-events":`none`}},null,8,$e))),256)),L.value.grid.graduations>0?(b(),m(`g`,et,[(b(!0),m(u,null,S(In.value,e=>(b(),m(`path`,{d:T(se)({plot:{x:G.value.width/2,y:G.value.height/2},radius:e,sides:jn.value,rotation:Pn.value}).path,fill:`none`,stroke:L.value.grid.stroke,"stroke-width":L.value.grid.strokeWidth},null,8,tt))),256))])):p(``,!0)])):p(``,!0),h(`path`,{d:Fn.value.path,fill:`none`,stroke:L.value.outerPolygon.stroke,"stroke-width":L.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,style:{"pointer-events":`none`}},null,8,nt),I.value.dataLabels.show?(b(),m(`g`,rt,[(b(!0),m(u,null,S(Z.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":I.value.dataLabels.fontSize,fill:I.value.dataLabels.color,onMouseenter:n=>Xn(e,t,`pointer`),onMouseleave:n=>Jn(e,t),onClick:n=>Yn(e,t)},w(e.name),41,it))),256))])):p(``,!0),(b(!0),m(u,null,S(Y.value,(e,t)=>(b(),m(`g`,null,[h(`g`,null,[P.value.useCssAnimation||!P.value.useCssAnimation&&!J.value.includes(t)?(b(),m(`polygon`,{key:0,points:zn.value[t],stroke:z.value.backgroundColor,"stroke-width":L.value.dataPolygon.strokeWidth+1,fill:`none`,class:Be({"animated-out":J.value.includes(t)&&P.value.useCssAnimation,"animated-in":gn.value&&hn.value===t&&P.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,at)):p(``,!0),P.value.useCssAnimation||!P.value.useCssAnimation&&!J.value.includes(t)?(b(),m(`polygon`,{key:1,points:zn.value[t],stroke:e.color,"stroke-width":L.value.dataPolygon.strokeWidth,fill:L.value.dataPolygon.transparent?`transparent`:L.value.dataPolygon.useGradient?`url(#radar_gradient_${k.value}_${t})`:T(ae)(e.color,L.value.dataPolygon.opacity),class:Be({"animated-out":J.value.includes(t)&&P.value.useCssAnimation,"animated-in":gn.value&&hn.value===t&&P.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,ot)):p(``,!0)])]))),256)),L.value.targetReference.show?(b(),m(`path`,{key:3,class:`vue-ui-radar-target-polygon`,d:`M${T(oe)(An.value,!1,!0)}Z`,fill:`none`,stroke:L.value.targetReference.stroke,"stroke-width":L.value.targetReference.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,"stroke-dasharray":L.value.targetReference.strokeDasharray,style:{"pointer-events":`none`}},null,8,st)):p(``,!0),L.value.plots.show?(b(),m(`g`,ct,[(b(!0),m(u,null,S(Z.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=>!J.value.includes(r)&&Xn(e,t,`pointer`),onMouseleave:n=>!J.value.includes(r)&&Jn(e,t),onClick:n=>!J.value.includes(r)&&Yn(e,t)},[h(`circle`,{cx:n.x,cy:n.y,r:Nn.value,fill:`transparent`,stroke:`transparent`,style:y({pointerEvents:J.value.includes(r)?`none`:`all`})},null,12,ut),h(`circle`,{cx:n.x,cy:n.y,fill:J.value.includes(r)?`transparent`:Y.value[r]?Y.value[r].color:`transparent`,r:Un.value!==null&&Un.value===t?L.value.plots.radius*1.6:L.value.plots.radius,stroke:J.value.includes(r)?`transparent`:z.value.backgroundColor,"stroke-width":.5,class:Be({"animated-out":J.value.includes(r)&&P.value.useCssAnimation,"animated-in":gn.value&&hn.value===r&&P.value.useCssAnimation}),style:{"pointer-events":`none`}},null,10,dt)],40,lt))),128))]))),128))])):p(``,!0),C(e.$slots,`svg`,{svg:{...G.value,outerPolygon:Fn.value,isPrintingImg:T(an)||T(on)||T(ur),isPrintingSvg:T(dr)}},void 0,!0)],46,Xe)),e.$slots.hint?(b(),m(`div`,ft,[C(e.$slots,`hint`,v(_({hint:P.value.a11y.translations.keyboardNavigation,isVisible:Kt.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(b(),m(`div`,pt,[C(e.$slots,`watermark`,v(_({isPrinting:T(an)||T(on)||T(ur)||T(dr)})),void 0,!0)])):p(``,!0),h(`div`,{id:`legend-bottom-${k.value}`},null,8,mt),Vt.value&&(z.value.legend.show||e.$slots.legend)?(b(),f(Pe,{key:6,to:z.value.legend.position===`top`?`#legend-top-${k.value}`:`#legend-bottom-${k.value}`},[h(`div`,{ref_key:`chartLegend`,ref:Rt},[C(e.$slots,`legend`,{legend:Q.value},()=>[z.value.legend.show?(b(),f(De,{key:0,legendSet:Q.value,config:Vn.value,isCursorPointer:B.value,onClickMarker:s[0]||=({i:e})=>xn(e)},Fe({item:D(({legend:e,index:t})=>[N.value?p(``,!0):(b(),m(`div`,{key:0,onClick:t=>e.segregate(),style:y(`opacity:${J.value.includes(t)?.5:1}`)},w(e.display),13,ht))]),legendToggle:D(()=>[Q.value.length>2&&z.value.legend.selectAllToggle.show&&!N.value?(b(),f(je,{key:0,backgroundColor:z.value.legend.selectAllToggle.backgroundColor,color:z.value.legend.selectAllToggle.color,fontSize:z.value.legend.fontSize,checked:J.value.length>0,isCursorPointer:B.value,onToggle:_n},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:2},[L.value.targetReference.show&&L.value.targetReference.showInLegend?{name:`after`,fn:D(()=>[h(`div`,gt,[h(`div`,{style:y({display:`flex`,height:z.value.legend.fontSize})},[(b(),m(`svg`,{style:y({width:z.value.legend.fontSize*2}),viewBox:`0 0 16 8`},[h(`line`,{x1:`0`,x2:`16`,y1:`4`,y2:`4`,stroke:L.value.targetReference.stroke,"stroke-width":L.value.targetReference.strokeWidth*.7,"stroke-dasharray":L.value.targetReference.strokeDasharray*.7,"stroke-linecap":`round`},null,8,_t)],4))],4),h(`span`,null,w(L.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:zt,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),Le(T(St),{teleportTo:R.value.teleportTo,show:W.value.showTooltip&&Pt.value,backgroundColor:R.value.backgroundColor,color:R.value.color,borderRadius:R.value.borderRadius,borderColor:R.value.borderColor,borderWidth:R.value.borderWidth,backgroundOpacity:R.value.backgroundOpacity,fontSize:R.value.fontSize,position:R.value.position,offsetX:R.value.offsetX,offsetY:R.value.offsetY,parent:A.value,content:Ft.value,isFullscreen:$.value,isCustom:R.value.customFormat&&typeof R.value.customFormat==`function`,smooth:R.value.smooth,backdropFilter:R.value.backdropFilter,smoothForce:R.value.smoothForce,smoothSnapThreshold:R.value.smoothSnapThreshold,isA11yMode:Gt.value===`keyboard`,a11yPosition:Wt.value},{"tooltip-before":D(()=>[C(e.$slots,`tooltip-before`,v(_({...Kn.value})),void 0,!0)]),tooltip:D(()=>[C(e.$slots,`tooltip`,v(_({...Kn.value})),void 0,!0)]),"tooltip-after":D(()=>[![`function`].includes(typeof R.value.customFormat)&&!e.$slots.tooltip?(b(),m(`div`,vt,[Le(T(wt),{dataset:Gn.value,config:dn.value,backgroundOpacity:0},{"data-label":D(({bar:e})=>[h(`div`,yt,[h(`span`,bt,w(e.name+(R.value.showValue||R.value.showPercentage?`:`:``)),1),R.value.showValue||R.value.showPercentage?(b(),m(`span`,xt,w(e.suffix),1)):p(``,!0)])]),_:1},8,[`dataset`,`config`])])):p(``,!0),C(e.$slots,`tooltip-after`,v(_({...Kn.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`]),!N.value&&Mt.value&&F.value.buttons.table?(b(),f(Ue(ir.value.component),Re({key:8},ir.value.props,{ref_key:`tableUnit`,ref:Ht,onClose:ar}),Fe({content:D(()=>[Le(T(Et),{colNames:Hn.value.colNames,head:Hn.value.head,body:Hn.value.body,config:Hn.value.config,title:P.value.table.useDialog?``:ir.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:B.value,onClose:ar},{th:D(({th:e})=>[Ie(w(e.name),1)]),td:D(({td:e})=>[Ie(w(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[P.value.table.useDialog?{name:`title`,fn:D(()=>[Ie(w(ir.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:D(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:s[1]||=e=>Zn(F.value.callbacks.csv),style:y({cursor:B.value?`pointer`:`default`})},[Le(T(Ct),{name:`fileCsv`,stroke:ir.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),C(e.$slots,`skeleton`,{},()=>[N.value?(b(),f(ke,{key:0})):p(``,!0)],!0)],46,Ke))}},[[`__scopeId`,`data-v-968e4534`]]);export{Ge as n,St as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{$ as t,B as n,X as r,Yt as i,at as a,i as o,t as s,zt as c}from"./lib-rPeBMZrn.js";import{t as ee}from"./useNestedProp-DnGoh-XS.js";import{n as te,t as l}from"./useHints-C-TwxM0Y.js";import{t as u}from"./useConfig-
|
|
1
|
+
import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{$ as t,B as n,X as r,Yt as i,at as a,i as o,t as s,zt as c}from"./lib-rPeBMZrn.js";import{t as ee}from"./useNestedProp-DnGoh-XS.js";import{n as te,t as l}from"./useHints-C-TwxM0Y.js";import{t as u}from"./useConfig-9oDGTWWG.js";import{t as d}from"./DefGrad-DKMq1REY.js";import{t as f}from"./_plugin-vue_export-helper-BDNMzG2s.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__*/ f({__name:`vue-ui-rating`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`rate`],setup(e,{expose:f,emit:O}){let{vue_ui_rating:F}=u(),I=e,L=C(r()),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 ee({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`)||c(I.dataset))&&a({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 f({getData:_e,toggleReadonly:ve}),(e,r)=>(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:r[4]||=e=>R.value=!0,onMouseleave:r[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(o)(U.value.formatter,K.value,E(t)({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(o)(U.value.formatter,K.value,E(t)({v:K.value,r:U.value.roundingValue}),H.value)),5)):h(``,!0),(S(!0),g(p,null,ne(V.value,(a,c)=>(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:a,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:a,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(a,!0)}`)},null,12,N)):(S(),g(`svg`,{key:1,xmlns:E(s),viewBox:`0 0 100 100`,height:W.value.itemSize,width:W.value.itemSize,class:`vue-ui-rating-unit`},[_(`defs`,null,[v(d,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`star_gradient_under_${L.value}`,stops:[[`0%`,E(i)(W.value.star.activeColor,.05),1],[`100%`,W.value.star.activeColor,1]]},null,8,[`id`,`stops`])]),_(`polygon`,{points:E(n)({plot:{x:50,y:50},radius:30,apexes:W.value.star.apexes}),fill:isNaN(z.value)?W.value.star.inactiveColor:Z(a),stroke:W.value.star.borderColor?W.value.star.borderColor:z.value?Z(a):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} ${a}`,height:W.value.itemSize,width:W.value.itemSize,id:`active_${L.value}_${a}`,class:`vue-ui-rating-unit`,style:b(`position:absolute;top:0;left:0;clip:rect(0px,${Q(c,!0)*W.value.itemSize}px,${W.value.itemSize}px,0px`)},null,12,se)):(S(),g(`svg`,{key:3,xmlns:E(s),viewBox:`0 0 ${Q(c)} 100`,height:W.value.itemSize,class:`vue-ui-rating-unit`,id:`active_${L.value}_${a}`,style:{position:`absolute`,top:`0`,left:`0`}},[_(`defs`,null,[v(d,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`star_gradient_over_${L.value}`,stops:[[`0%`,E(i)(W.value.star.activeColor,.05),1],[`100%`,W.value.star.activeColor,1]]},null,8,[`id`,`stops`])]),_(`polygon`,{points:E(n)({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(s),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=>$(a),onMouseenter:e=>z.value=a,onMouseleave:r[0]||=e=>z.value=void 0,onFocus:e=>B.value=a,onBlur:r[1]||=e=>B.value=void 0,tabindex:`0`,onKeyup:D(e=>$(a),[`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=a,onMouseleave:r[2]||=e=>z.value=void 0,onFocus:e=>B.value=a,onBlur:r[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===a?`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(a)+`:`,5),_(`span`,{style:b(`font-weight:${W.value.tooltip.bold?`bold`:`normal`};font-size:${W.value.tooltip.fontSize}px`)},T(E(o)(W.value.tooltip.formatter,I.dataset.rating[a],E(t)({v:I.dataset.rating[a],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(o)(U.value.formatter,K.value,E(t)({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(o)(U.value.formatter,K.value,E(t)({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"./userOptionsSlots-CWtXN5Q6.js";import{n as i,r as a,t as o}from"./annotationSlots-OLiW25XN.js";import{n as s}from"./resolveChartConfig-0IvbmIE_.js";import{$ as c,Ht as ee,X as te,at as ne,i as re,in as ie,r as ae,rn as oe,t as se,w as ce,yt as le,zt as ue}from"./lib-rPeBMZrn.js";import{c as de}from"./canvas-lib-22VpOI4_.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./useConfig-9oDGTWWG.js";import{t as he}from"./useLoading-BwiplGDB.js";import{t as ge}from"./usePrinter-DVf3YcG5.js";import{t as _e}from"./useResponsive-CENUxfEL.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{t as ye}from"./useUserOptionState-CXlFnwPv.js";import{t as be}from"./useChartAccessibility-DOMuYJfm.js";import{t as xe}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Se}from"./img-D4RQwASc.js";import{n as Ce}from"./Title-BliHuXfT.js";import{t as we}from"./vue_ui_relation_circle-BLo4XQFQ.js";import{t as Te}from"./BaseScanner-m6QR9rwD.js";import{t as Ee}from"./A11yDataTable-DWNlWXzs.js";import{t as De}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Oe,createTextVNode as ke,createVNode as Ae,defineAsyncComponent as je,guardReactiveProps as h,mergeProps as Me,normalizeClass as Ne,normalizeProps as g,normalizeStyle as _,onBeforeUnmount as Pe,onMounted as Fe,openBlock as v,ref as y,renderList as b,renderSlot as x,shallowRef as Ie,toDisplayString as S,toRefs as Le,unref as C,useCssVars as Re,watch as ze,withCtx as Be}from"vue";var Ve=/* @__PURE__ */ e({default:()=>ct}),He=[`id`],Ue=[`id`],We={style:{position:`relative`}},Ge=[`xmlns`,`viewBox`,`aria-describedby`],Ke=[`width`,`height`],qe=[`cx`,`cy`,`r`,`stroke`,`stroke-width`],Je={key:1},Ye=[`stroke`,`d`,`stroke-width`],Xe={style:{"pointer-events":`none`}},Ze=[`cx`,`cy`,`fill`,`r`,`stroke`],Qe=[`x`,`y`,`fill`,`font-size`],$e={key:2},et=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],tt={style:{"pointer-events":`none`}},nt=[`cx`,`cy`,`fill`,`r`,`stroke`],rt=[`x`,`y`,`fill`,`font-size`],it=[`text-anchor`,`transform`,`x`,`y`,`font-weight`,`font-size`,`fill`,`text-decoration`,`onClick`,`onMouseenter`,`onMouseleave`],at=[`cx`,`cy`,`fill`,`stroke`,`r`,`onClick`,`onMouseenter`,`onMouseleave`],ot={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=/*#__PURE__*/ De({__name:`vue-ui-relation-circle`,props:{dataset:{type:Array,default(){return[]}},config:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:De,emit:Ve}){Re(e=>({d8b066be:Pt.value,c035b400:Nt.value,v5bed39e2:Ft.value}));let ct=je(()=>import(`./PenAndPaper-BV5ODysA.js`).then(e=>e.t)),lt=je(()=>import(`./UserOptions-K1N7zQRx.js`).then(e=>e.n)),ut=je(()=>import(`./PackageVersion-B9qiUJPH.js`).then(e=>e.t)),{vue_ui_relation_circle:dt}=me(),w=e,ft=Ve,pt=u(()=>!!w.dataset&&Object.keys(w.dataset).length),T=y(te()),mt=y(0),E=y(null),ht=y(null),gt=y(null),_t=y(null),vt=y(0),D=y(null),O=y(!1),k=y(Et()),A=u(()=>k.value.userOptions),j=u(()=>k.value.style.weightLabels),M=u(()=>k.value.style);fe({config:()=>k.value,dataset:()=>w.dataset,component:`VueUiRelationCircle`,rules:[pe.noHint]});let N=u(()=>k.value.userOptions.useCursorPointer),yt=u(()=>ie({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:k.value.skeletonConfig??{}})),{loading:bt,FINAL_DATASET:xt,manualLoading:St}=he({...Le(w),FINAL_CONFIG:k,prepareConfig:Et,skeletonDataset:w.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:ie({defaultConfig:k.value,userConfig:yt.value})}),{userOptionsVisible:Ct,setUserOptionsVisibility:wt,keepUserOptionState:Tt}=ye({config:k.value}),{svgRef:P}=be({config:M.value.title});function Et(){return s(w.config,dt,we)}ze(()=>w.config,e=>{k.value=Et(),Ct.value=!k.value.userOptions.showOnChartHover,H.value=M.value.size,U.value=j.value.size,W.value=M.value.plot.radius,G.value=M.value.labels.fontSize,K.value.height=M.value.size,K.value.width=M.value.size,Lt(),vt.value+=1},{deep:!0}),ze(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(St.value=!1)},{deep:!0});let{isPrinting:F,isImaging:I,generatePdf:Dt,generateImage:Ot}=ge({elementId:`relation_circle_${T.value}`,fileName:M.value.title.text||`vue-ui-relation-circle`,options:k.value.userOptions.print}),kt=u(()=>k.value.userOptions.show&&!M.value.title.text),At=u(()=>ce(k.value.customPalette)),L=y([]),R=y([]),z=y({}),B=y([]),jt=y(0),V=u(()=>xt.value.slice(0,M.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}}));ze(V,()=>{L.value=[],R.value=[],Bt(),Ht()});let H=y(M.value.size),U=y(j.value.size),W=y(M.value.plot.radius),G=y(M.value.labels.fontSize),K=y({height:M.value.size,width:M.value.size}),q=u({get(){return H.value*M.value.circle.radiusProportion},set(e){return e}}),Mt=u(()=>M.value.links.curved),Nt=u(()=>`${M.value.animation.speedMs}ms`),Pt=u(()=>q.value*2),Ft=u(()=>q.value*4),J=Ie(null),Y=Ie(null);Fe(()=>{Lt(),document.getElementById(`relation_circle_${T.value}`).addEventListener(`click`,zt)});let It=u(()=>k.value.debug);function Lt(){if(ue(w.dataset)?(ne({componentName:`VueUiRelationCircle`,type:`dataset`,debug:It.value}),St.value=!0):It.value&&w.dataset.forEach((e,t)=>{le({datasetObject:e,requiredAttributes:[`id`,`label`,`relations`,`weights`]}).forEach(e=>{ne({componentName:`VueUiRelationCircle`,type:`datasetSerieAttribute`,property:e,index:t})})}),ue(w.dataset)||(St.value=k.value.loading),k.value.responsive){let e=de(()=>{let{width:e,height:t}=_e({chart:E.value,title:M.value.title.text?ht.value:null,source:gt.value,noTitle:_t.value});requestAnimationFrame(()=>{H.value=Math.min(e,t),K.value.width=Math.max(.1,e),K.value.height=Math.max(.1,t-12),q.value=H.value*M.value.circle.radiusProportion,L.value=[],R.value=[],Bt(),Ht(),Rt(),k.value.responsiveProportionalSizing?(U.value=oe({relator:H.value,adjuster:M.value.size,source:j.value.size,threshold:6,fallback:6}),W.value=oe({relator:H.value,adjuster:M.value.size,source:M.value.plot.radius,threshold:1,fallback:1}),G.value=oe({relator:H.value,adjuster:M.value.size,source:M.value.labels.fontSize,threshold:6,fallback:6})):(U.value=j.value.size,W.value=M.value.plot.radius,G.value=M.value.labels.fontSize)})});J.value&&(Y.value&&J.value.unobserve(Y.value),J.value.disconnect()),J.value=new ResizeObserver(e),Y.value=E.value.parentNode,J.value.observe(Y.value)}else L.value=[],R.value=[],Bt(),Ht();Rt()}Pe(()=>{document.getElementById(`relation_circle_${T.value}`)?.removeEventListener(`click`,zt),J.value&&(Y.value&&J.value.unobserve(Y.value),J.value.disconnect())});let{autoSizeLabels:Rt}=xe({svgRef:P,fontSize:M.value.labels.fontSize,minFontSize:M.value.labels.minFontSize,sizeRef:G,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`)||(z.value={},B.value=[])}function Bt(){let e=6.28319/V.value.length,t=360/V.value.length,n=0,r=0;V.value.forEach((i,a)=>{let o=i.weights.reduce((e,t)=>e+t,0),s=q.value*Math.cos(n)+K.value.width/2,c=q.value*Math.sin(n)+K.value.height/2+M.value.circle.offsetY;L.value.push({x:s,y:c,...i,color:i.color?i.color:At.value[a]?At.value[a]:ee[a],regAngle:r,totalWeight:o}),n+=e,r+=t})}function Vt(e,t){return{x:(e.x+t.x)/2,y:(e.y+t.y)/2}}function Ht(){R.value=[],L.value.forEach(e=>{L.value.filter(t=>t.relations.includes(e.id)).forEach((t,n)=>{let r=t.relations.indexOf(e.id);R.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:K.value.width/2,y:K.value.height/2+M.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=u(()=>Math.max(...R.value.map(e=>e.weight)));function Gt(e){return Object.hasOwn(z.value,`x`)?B.value.includes(e.id)?`opacity:1`:`opacity:0.1`:`opacity:1`}function X(e){return e.colorSource}function Kt(e){return Object.hasOwn(z.value,`x`)?B.value.includes(e.id)&&e.relationId===`${e.id}_${z.value.id}`||e.relationId===`${z.value.id}_${e.id}`?`opacity:1;stroke-width:${tn(e)}`:`opacity: 0`:`opacity: 1`}function Z(e){return Object.hasOwn(z.value,`x`)?!!(B.value.includes(e.id)&&e.relationId===`${e.id}_${z.value.id}`||e.relationId===`${z.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(z.value,`x`)?z.value.id===e.id||B.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 Q=y(null);function Zt(e,t){Q.value=t,D.value=t,k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function Qt(e,t){Q.value=null,O.value||(D.value=null),k.value.events.datapointLeave&&k.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function $t(e,t){e&&(k.value.events.datapointClick&&k.value.events.datapointClick({datapoint:e,seriesIndex:t}),jt.value=360-e.regAngle,z.value.id&&e.id===z.value.id?(z.value={},B.value=[]):(z.value=e,B.value=[...e.relations]))}function en(e,t){D.value=t,$t(e,t)}function tn(e){let t=e.weight/Wt.value*M.value.links.maxWidth;return Math.max(.3,t)}let nn=y(!1);function rn(e){nn.value=e,mt.value+=1}let $=y(!1);function an(){$.value=!$.value}async function on({scale:e=2}={}){if(!E.value)return;let{width:t,height:n}=E.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await Se({domElement:E.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:M.value.title.text,width:t,height:n,aspectRatio:r}}let sn=u(()=>M.value.backgroundColor),cn=u(()=>M.value.title),{isCallbackImaging:ln,isCallbackSvg:un,generateSvg:dn,onGenerateImage:fn}=ve({svg:P,title:cn,legend:null,legendItems:null,backgroundColor:sn,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:Ot});async function pn(){ft(`copyAlt`,{config:k.value,dataset:V.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:V.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function mn(){O.value=!0,L.value.length&&D.value===null&&(D.value=0)}function hn(){O.value=!1,D.value=null}function gn(e){if(!P.value||$.value||document.activeElement!==P.value||!L.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){D.value=null,z.value={},B.value=[];return}if(r){if(D.value===null)return;let e=L.value[D.value];if(!e)return;$t(e,D.value);return}let a=D.value;a===null||a<0||a>=L.value.length?a=n?0:L.value.length-1:n?(a+=1,a>=L.value.length&&(a=0)):t&&(--a,a<0&&(a=L.value.length-1)),D.value=a,Q.value=a;let o=L.value[a];o&&k.value.events.datapointEnter&&k.value.events.datapointEnter({datapoint:o,seriesIndex:a})}let _n=u(()=>({headers:[`ID`,`Label`,`Total weight`,`Relations count`,`Relations`],rows:V.value.map(e=>{let t=e.relations.map(e=>V.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 De({getImage:on,generatePdf:Dt,generateSvg:dn,generateImage:Ot,toggleAnnotator:an,toggleFullscreen:rn,copyAlt:pn}),(e,s)=>(v(),p(`div`,{ref_key:`relationCircleChart`,ref:E,class:`vue-data-ui-component vue-ui-relation-circle`,style:_(`width:100%;background:${M.value.backgroundColor};text-align:center;${k.value.responsive?`height: 100%`:``}`),id:`relation_circle_${T.value}`,onMouseenter:s[0]||=()=>C(wt)(!0),onMouseleave:s[1]||=()=>C(wt)(!1)},[m(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[m(`p`,null,S(k.value.a11y.translations.keyboardNavigation),1)],8,Ue),k.value.a11y.includeTable&&_n.value?.rows?.length?(v(),d(Ee,{key:0,uid:T.value,head:_n.value.headers,body:_n.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),A.value.buttons.annotator?(v(),d(C(ct),Me({key:1},C(a)(A.value.annotator),{svgRef:C(P),backgroundColor:M.value.backgroundColor,color:M.value.color,active:$.value,isCursorPointer:N.value,palette:A.value.annotatorPalette,onClose:an}),Oe({_:2},[b(C(o),t=>({name:t,fn:Be(n=>[x(e.$slots,t,g(h(C(i)(t,n))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),kt.value?(v(),p(`div`,{key:2,ref_key:`noTitle`,ref:_t,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),M.value.title.text?(v(),p(`div`,{key:3,ref_key:`chartTitle`,ref:ht,style:`width:100%;background:transparent`},[(v(),d(Ce,{key:`title_${vt.value}`,config:{title:{cy:`relation-div-title`,...M.value.title},subtitle:{cy:`relation-div-subtitle`,...M.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),A.value.show&&pt.value&&(C(Tt)||C(Ct))?(v(),d(C(lt),Me({ref:`details`,key:`user_options_${mt.value}`,backgroundColor:M.value.backgroundColor,color:M.value.color,isPrinting:C(F),isImaging:C(I),uid:T.value,hasXls:!1,isFullscreen:nn.value,chartElement:E.value},C(n)(A.value,`pdf img svg fullscreen altCopy annotator`),{isAnnotation:$.value,isCursorPointer:N.value,onToggleFullscreen:rn,onGeneratePdf:C(Dt),onGenerateImage:C(fn),onGenerateSvg:C(dn),onToggleAnnotator:an,onCopyAlt:pn,style:{visibility:C(Tt)?C(Ct)?`visible`:`hidden`:`visible`}}),Oe({_:2},[b(C(t)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Be(n=>[x(e.$slots,t,g(h(C(r)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):f(``,!0),m(`div`,We,[(v(),p(`svg`,{ref_key:`svgRef`,ref:P,xmlns:C(se),class:Ne([{"vue-data-ui-fullscreen--on":nn.value,"vue-data-ui-fulscreen--off":!nn.value},`relation-circle`]),viewBox:`0 0 ${K.value.width<=0?10:K.value.width} ${K.value.height<=0?10:K.value.height}`,width:`100%`,style:`user-select:none; background:transparent`,"aria-describedby":`chart-instructions-${T.value}`,tabindex:`0`,onFocus:mn,onBlur:hn,onKeydown:gn},[Ae(C(ut)),x(e.$slots,`svg-underlayer`,{svg:{...K.value,isPrintingImg:C(F)||C(I)||C(ln),isPrintingSvg:C(un)}},void 0,!0),e.$slots[`chart-background`]?(v(),p(`foreignObject`,{key:0,x:0,y:0,width:K.value.width<=0?10:K.value.width,height:K.value.height<=0?10:K.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,Ke)):f(``,!0),m(`circle`,{cx:(K.value.width<=0?1e-4:K.value.width)/2,cy:(K.value.height<=0?1e-4:K.value.height)/2+M.value.circle.offsetY,r:q.value<=0?1e-4:q.value,stroke:M.value.circle.stroke,"stroke-width":M.value.circle.strokeWidth,fill:`transparent`,class:`main-circle`},null,8,qe),Mt.value?(v(),p(`g`,Je,[(v(!0),p(l,null,b(R.value,(e,t)=>(v(),p(`path`,{key:`relation_${t}`,style:_(Kt(e)),stroke:X(e),class:Ne([`relation`,{"vue-ui-relation-circle-selected":z.value.hasOwnProperty(`id`)&&B.value.includes(e.id)}]),d:`M${e.x1},${e.y1} C${e.x1},${e.y1} ${K.value.width/2},${K.value.height/2+M.value.circle.offsetY} ${e.x2},${e.y2}`,fill:`none`,"stroke-width":tn(e),"stroke-linecap":`round`},null,14,Ye))),128)),(v(!0),p(l,null,b(R.value,(t,n)=>(v(),p(`g`,Xe,[Z(t)?x(e.$slots,`dataLabel`,Me({ref_for:!0},{x:t.midPointBezier.x,y:t.midPointBezier.y,color:X(t),weight:t.weight,fontSize:U.value}),void 0,!0,0):f(``,!0),Z(t)&&!e.$slots.dataLabel?(v(),p(`circle`,{key:1,cx:t.midPointBezier.x,cy:t.midPointBezier.y,fill:X(t),r:U.value,stroke:M.value.backgroundColor,"stroke-width":`1`},null,8,Ze)):f(``,!0),Z(t)&&!e.$slots.dataLabel?(v(),p(`text`,{key:2,x:t.midPointBezier.x,y:t.midPointBezier.y+U.value/3,fill:C(ae)(X(t)),"text-anchor":`middle`,"font-size":U.value},S(C(re)(j.value.formatter,t.weight,C(c)({p:j.value.prefix,v:t.weight,s:j.value.suffix,r:j.value.rounding}),{...t})),9,Qe)):f(``,!0)]))),256))])):(v(),p(`g`,$e,[(v(!0),p(l,null,b(R.value,(e,t)=>(v(),p(`line`,{key:`relation_${t}`,stroke:X(e),"stroke-width":tn(e),style:_(Kt(e)),x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2,class:Ne({"vue-ui-relation-circle-selected":z.value.hasOwnProperty(`id`)&&B.value.includes(e.id)}),"stroke-linecap":`round`},null,14,et))),128)),(v(!0),p(l,null,b(R.value,(t,n)=>(v(),p(`g`,tt,[Z(t)?x(e.$slots,`dataLabel`,Me({ref_for:!0},{x:t.midPointLine.x,y:t.midPointLine.y,color:X(t),weight:t.weight,fontSize:U.value}),void 0,!0,0):f(``,!0),Z(t)&&!e.$slots.dataLabel&&j.value.show?(v(),p(`circle`,{key:1,cx:t.midPointLine.x,cy:t.midPointLine.y,fill:X(t),r:U.value,stroke:M.value.backgroundColor,"stroke-width":`1`},null,8,nt)):f(``,!0),Z(t)&&!e.$slots.dataLabel&&j.value.show?(v(),p(`text`,{key:2,x:t.midPointLine.x,y:t.midPointLine.y+U.value/3,fill:C(ae)(X(t)),"text-anchor":`middle`,"font-size":U.value},S(C(re)(j.value.formatter,t.weight,C(c)({p:j.value.prefix,v:t.weight,s:j.value.suffix,r:j.value.rounding}),{...t})),9,rt)):f(``,!0)]))),256))])),(v(!0),p(l,null,b(L.value,(e,t)=>(v(),p(`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":z.value.id===e.id?`900`:`400`,style:_(`font-family:${M.value.fontFamily};${Yt(e)};cursor:${N.value?`pointer`:`default`}`),"font-size":G.value,fill:M.value.labels.color,"text-decoration":t===Q.value||t===D.value?`underline`:void 0,onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},[C(bt)?(v(),p(l,{key:0},[ke(`--------`)],64)):(v(),p(l,{key:1},[ke(S(e.label)+` (`+S(C(re)(j.value.formatter,e.totalWeight,C(c)({p:j.value.prefix,v:e.totalWeight,s:j.value.suffix,r:j.value.rounding}),{...e}))+`) `,1)],64))],44,it))),128)),(v(!0),p(l,null,b(L.value,(e,t)=>(v(),p(`circle`,{cx:e.x,cy:e.y,key:`plot_${t}`,style:_(`${Gt(e)}; transition: r 0.2s ease-in-out; cursor:${N.value?`pointer`:`default`}`),class:`vue-ui-relation-circle-plot`,fill:M.value.plot.useSerieColor?e.color:M.value.plot.color,stroke:M.value.backgroundColor,"stroke-width":`1`,r:W.value*(t===Q.value||t===D.value?2:1),onClick:n=>en(e,t),onMouseenter:n=>Zt(e,t),onMouseleave:n=>Qt(e,t)},null,44,at))),128)),x(e.$slots,`svg`,{svg:{...K.value,isPrintingImg:C(F)||C(I)||C(ln),isPrintingSvg:C(un)}},void 0,!0)],42,Ge)),e.$slots.hint?(v(),p(`div`,ot,[x(e.$slots,`hint`,g(h({hint:k.value.a11y.translations.keyboardNavigation,isVisible:O.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(v(),p(`div`,st,[x(e.$slots,`watermark`,g(h({isPrinting:C(F)||C(I)||C(ln)||C(un)})),void 0,!0)])):f(``,!0),e.$slots.source?(v(),p(`div`,{key:6,ref_key:`source`,ref:gt,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),x(e.$slots,`skeleton`,{},()=>[C(bt)?(v(),d(Te,{key:0})):f(``,!0)],!0)],44,He))}},[[`__scopeId`,`data-v-dfb6df3b`]]);export{Ve as n,ct as t};
|