vue-data-ui 2.6.41 → 2.6.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-CzwnuhQC.js → Arrow-Bz8n6ycZ.js} +1 -1
- package/dist/{Arrow-j4Npojhv.cjs → Arrow-C0LFlY5e.cjs} +1 -1
- package/dist/{BaseIcon-lwGFy7CI.cjs → BaseIcon-Bolmn50v.cjs} +1 -1
- package/dist/{BaseIcon-DyOT6PYJ.js → BaseIcon-BySu2V3d.js} +1 -1
- package/dist/{ColorPicker-BiTtlEx1.cjs → ColorPicker-DUYztfXY.cjs} +1 -1
- package/dist/{ColorPicker-DHXRDP2o.js → ColorPicker-DxSpy5e2.js} +3 -3
- package/dist/{DataTable-B8Vnlflz.js → DataTable-C5EKEHsp.js} +2 -2
- package/dist/{DataTable-CX-Mdafj.cjs → DataTable-DLUrhKkw.cjs} +1 -1
- package/dist/{Legend-DgyuPw1G.cjs → Legend-CHEbsxt2.cjs} +1 -1
- package/dist/{Legend-Bw9vX_fW.js → Legend-DSzoXS-3.js} +2 -2
- package/dist/{PackageVersion-CvpIoiav.cjs → PackageVersion-B6sWtTA0.cjs} +1 -1
- package/dist/{PackageVersion-C6hdi5vE.js → PackageVersion-BtrpyUPC.js} +1 -1
- package/dist/{PenAndPaper-5L5c2K-j.cjs → PenAndPaper-DO7-xSYx.cjs} +1 -1
- package/dist/{PenAndPaper-DBNdemyU.js → PenAndPaper-zjBsZuuq.js} +3 -3
- package/dist/{Shape-CcQr04tT.js → Shape-DzIamXsi.js} +1 -1
- package/dist/{Shape-my_oX1r-.cjs → Shape-_vXgfvZP.cjs} +1 -1
- package/dist/{Slicer-CJT21pOl.js → Slicer-DfOxim5W.js} +2 -2
- package/dist/{Slicer-Dpuspld0.cjs → Slicer-oUyDkRff.cjs} +1 -1
- package/dist/{Title-Dfjx2pT6.js → Title-BS1zFx79.js} +1 -1
- package/dist/{Title-CnyZaLp0.cjs → Title-BuZQSd23.cjs} +1 -1
- package/dist/{Tooltip-C3kzKkai.js → Tooltip-BNOd4lK1.js} +1 -1
- package/dist/{Tooltip-V6vr6k8X.cjs → Tooltip-BiBcMMP3.cjs} +1 -1
- package/dist/{html2canvas.esm-D53btDlk.cjs → html2canvas.esm-BA_v9SIU.cjs} +2 -2
- package/dist/{html2canvas.esm-Dr4iCOK6.js → html2canvas.esm-DgdJBc_o.js} +196 -196
- package/dist/img-BIeSHu0f.js +15 -0
- package/dist/img-D6uvziU0.cjs +1 -0
- package/dist/{index-BAPUY6BW.js → index-CzjsUYng.js} +19 -2
- package/dist/index-Zf2fUMIO.cjs +9 -0
- package/dist/{index.es-RWt7DWPC.js → index.es-BloWY6jv.js} +1285 -1285
- package/dist/{index.es-DvaaoatM.cjs → index.es-HygMioe_.cjs} +6 -6
- package/dist/{jspdf.es.min-Rw70uifz.cjs → jspdf.es.min-C518mmma.cjs} +57 -57
- package/dist/{jspdf.es.min-eTA26cmm.js → jspdf.es.min-t_OLULUR.js} +3038 -3038
- package/dist/pdf-BpXLKlRx.cjs +1 -0
- package/dist/{pdf-DVWl3Adn.js → pdf-H8Iw_Wax.js} +6 -6
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +17 -0
- package/dist/types/vue-data-ui.d.ts +17 -0
- package/dist/{useNestedProp-Ch_Tbu0f.cjs → useNestedProp-BcSwG6N0.cjs} +1 -1
- package/dist/{useNestedProp-X5u-cjpn.js → useNestedProp-RC28MVml.js} +1 -1
- package/dist/{usePrinter-BJ8ChcXf.cjs → usePrinter-BGPa8G48.cjs} +1 -1
- package/dist/{usePrinter-BsXYrX84.js → usePrinter-CUsjlfpk.js} +125 -122
- package/dist/{vue-data-ui-CZG3ODq3.cjs → vue-data-ui-BjDb6Vux.cjs} +1 -1
- package/dist/{vue-data-ui-OBrcs0EY.js → vue-data-ui-UWKC8R6X.js} +61 -61
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-BRhfbpJd.js → vue-ui-3d-bar-5IdXbLb9.js} +55 -54
- package/dist/{vue-ui-3d-bar-BOUSglv4.cjs → vue-ui-3d-bar-WS8tL_FC.cjs} +8 -8
- package/dist/{vue-ui-accordion-BS_katXk.cjs → vue-ui-accordion-CnGQYWdI.cjs} +1 -1
- package/dist/{vue-ui-accordion-Dm7ZlylJ.js → vue-ui-accordion-ConQex-C.js} +3 -3
- package/dist/{vue-ui-age-pyramid-CBtPdObD.js → vue-ui-age-pyramid-CP6Fd6zD.js} +13 -12
- package/dist/vue-ui-age-pyramid-CehCcwLC.cjs +1 -0
- package/dist/{vue-ui-annotator-Rb7-Ig4d.js → vue-ui-annotator-C5NyXYkj.js} +3 -3
- package/dist/{vue-ui-annotator-B8HvCy1u.cjs → vue-ui-annotator-CZ1F-VY2.cjs} +1 -1
- package/dist/{vue-ui-bullet-C7ftUjYQ.js → vue-ui-bullet-DKqr4Rcd.js} +11 -10
- package/dist/vue-ui-bullet-Djg_HER0.cjs +34 -0
- package/dist/{vue-ui-candlestick-DY4EKJPX.cjs → vue-ui-candlestick-BU9MfLPt.cjs} +2 -2
- package/dist/{vue-ui-candlestick-D_osh2qN.js → vue-ui-candlestick-DtVpSOzB.js} +14 -13
- package/dist/{vue-ui-carousel-table-M72bzy85.js → vue-ui-carousel-table-CYcrhcdv.js} +7 -6
- package/dist/vue-ui-carousel-table-EhzhIcW2.cjs +1 -0
- package/dist/{vue-ui-chestnut-BdHd-Juu.cjs → vue-ui-chestnut-C3UVgMQo.cjs} +2 -2
- package/dist/{vue-ui-chestnut-i7EtBpLY.js → vue-ui-chestnut-D5LH5zdq.js} +37 -36
- package/dist/{vue-ui-circle-pack-BC1uScHe.js → vue-ui-circle-pack-BL753_Uo.js} +14 -13
- package/dist/vue-ui-circle-pack-CJNBxO1N.cjs +1 -0
- package/dist/{vue-ui-cursor-B06MWQUK.cjs → vue-ui-cursor-B2MxKYNM.cjs} +1 -1
- package/dist/{vue-ui-cursor-eJ2ExkFm.js → vue-ui-cursor-Fe70t9Bl.js} +2 -2
- package/dist/{vue-ui-dashboard-m-sB4TXH.cjs → vue-ui-dashboard-C11-dJEl.cjs} +1 -1
- package/dist/{vue-ui-dashboard-BAwwet8B.js → vue-ui-dashboard-QOSGNhC9.js} +3 -3
- package/dist/{vue-ui-digits-B6ivU7b9.js → vue-ui-digits-C5D_xk6r.js} +2 -2
- package/dist/{vue-ui-digits-C5jmpiTL.cjs → vue-ui-digits-H19fVeIu.cjs} +1 -1
- package/dist/{vue-ui-donut-DtZ-n8vd.js → vue-ui-donut-Bd1mIoux.js} +15 -14
- package/dist/vue-ui-donut-CwJg0emK.cjs +1 -0
- package/dist/{vue-ui-donut-evolution-VJpinb_g.js → vue-ui-donut-evolution-CFQ4lMWd.js} +45 -44
- package/dist/vue-ui-donut-evolution-DTjfMlNh.cjs +1 -0
- package/dist/vue-ui-dumbbell-CBsxNWVV.cjs +9 -0
- package/dist/{vue-ui-dumbbell-EoH10k2D.js → vue-ui-dumbbell-KJd6G5qD.js} +43 -42
- package/dist/vue-ui-flow-D3gtil-H.cjs +1 -0
- package/dist/{vue-ui-flow-B-xWkgVv.js → vue-ui-flow-DAxMQfhu.js} +53 -52
- package/dist/vue-ui-funnel-CkCNCQ1F.cjs +1 -0
- package/dist/{vue-ui-funnel-hdajl9CD.js → vue-ui-funnel-PvEDGsfj.js} +13 -12
- package/dist/{vue-ui-galaxy-CeqCjd4V.js → vue-ui-galaxy-DfAfjTDr.js} +31 -30
- package/dist/vue-ui-galaxy-DjeZUCuE.cjs +1 -0
- package/dist/vue-ui-gauge-BfDY3XHF.cjs +1 -0
- package/dist/{vue-ui-gauge-BSuGWZEY.js → vue-ui-gauge-DBGqwPZs.js} +36 -35
- package/dist/{vue-ui-gizmo-VFwChXXf.js → vue-ui-gizmo-BT0DknqD.js} +3 -3
- package/dist/{vue-ui-gizmo-D_J2R5JU.cjs → vue-ui-gizmo-yWBMeY1e.cjs} +1 -1
- package/dist/vue-ui-heatmap-Bkd2G7uW.cjs +1 -0
- package/dist/{vue-ui-heatmap-DAeCu-iM.js → vue-ui-heatmap-D_Tr1Hot.js} +73 -72
- package/dist/vue-ui-history-plot-B-VBGxRa.cjs +1 -0
- package/dist/{vue-ui-history-plot-Caty-SWt.js → vue-ui-history-plot-BG4nMlp7.js} +33 -32
- package/dist/{vue-ui-kpi-Bu24xnG8.cjs → vue-ui-kpi-LMze0lWI.cjs} +1 -1
- package/dist/{vue-ui-kpi-B2WcjLWP.js → vue-ui-kpi-WqBG4upX.js} +3 -3
- package/dist/{vue-ui-mini-loader-BgW5M00P.cjs → vue-ui-mini-loader-CoVSw6EU.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-B8QzxySW.js → vue-ui-mini-loader-eRXubESG.js} +2 -2
- package/dist/{vue-ui-molecule-Ds0uou9B.js → vue-ui-molecule-BcpPXHgo.js} +13 -12
- package/dist/vue-ui-molecule-Cu6_FpHD.cjs +1 -0
- package/dist/{vue-ui-mood-radar-DMrAwNQa.js → vue-ui-mood-radar-CBFN1PfU.js} +14 -13
- package/dist/vue-ui-mood-radar-DlTYq1OE.cjs +1 -0
- package/dist/{vue-ui-nested-donuts-FSCi4a9f.js → vue-ui-nested-donuts-Cq0PWd1N.js} +14 -13
- package/dist/{vue-ui-nested-donuts-3orKF1Fi.cjs → vue-ui-nested-donuts-c6Dc8R-H.cjs} +2 -2
- package/dist/{vue-ui-onion-YWVe7eaq.js → vue-ui-onion-BFDD4SN8.js} +14 -13
- package/dist/{vue-ui-onion-CiXgGubD.cjs → vue-ui-onion-Bd2D2Vld.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-DeZ2tt1O.cjs → vue-ui-parallel-coordinate-plot-BTCld26y.cjs} +2 -2
- package/dist/{vue-ui-parallel-coordinate-plot-C8vxLtTa.js → vue-ui-parallel-coordinate-plot-YF_ssmB7.js} +35 -34
- package/dist/vue-ui-quadrant-B659Q5iR.cjs +1 -0
- package/dist/{vue-ui-quadrant-DmDoysAq.js → vue-ui-quadrant-BeEBWrsG.js} +15 -14
- package/dist/{vue-ui-quick-chart-CwJe7rJt.js → vue-ui-quick-chart-Ba6-ZZk9.js} +12 -11
- package/dist/{vue-ui-quick-chart-BgSeWNxv.cjs → vue-ui-quick-chart-w0LaPcFd.cjs} +2 -2
- package/dist/vue-ui-radar-DAUGZC3X.cjs +1 -0
- package/dist/{vue-ui-radar-Bo9SbfBN.js → vue-ui-radar-Dgu656_F.js} +15 -14
- package/dist/{vue-ui-rating-DPs6BKf1.js → vue-ui-rating-BIk1Ip7B.js} +2 -2
- package/dist/{vue-ui-rating-CqY6A4WX.cjs → vue-ui-rating-BPgLpyoa.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-3Al_2yf1.js → vue-ui-relation-circle-CUU2Y66i.js} +13 -12
- package/dist/vue-ui-relation-circle-Dz_Du_5e.cjs +1 -0
- package/dist/{vue-ui-rings-DOlqslSN.cjs → vue-ui-rings-B7kPmx8M.cjs} +2 -2
- package/dist/{vue-ui-rings-D9_ClLdg.js → vue-ui-rings-DnZ3fSvL.js} +15 -14
- package/dist/{vue-ui-scatter-DFDHrRyc.js → vue-ui-scatter-Cej6ox0t.js} +15 -14
- package/dist/vue-ui-scatter-GfJALpzt.cjs +1 -0
- package/dist/{vue-ui-screenshot-R1IzXCqt.js → vue-ui-screenshot-B4HNd362.js} +2 -2
- package/dist/{vue-ui-screenshot-BWVTxKN_.cjs → vue-ui-screenshot-DkuLYple.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Dn9J8aVW.cjs → vue-ui-skeleton-CiGqKHDK.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DBfQG5lC.js → vue-ui-skeleton-XUKIcV-3.js} +3 -3
- package/dist/{vue-ui-smiley-CLv8dmnr.js → vue-ui-smiley-BUgxzenz.js} +2 -2
- package/dist/{vue-ui-smiley-DQ7I4CcQ.cjs → vue-ui-smiley-Dfo5zjHi.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-B0qbQaxj.js → vue-ui-spark-trend-CvsL1wxJ.js} +5 -5
- package/dist/{vue-ui-spark-trend-Drp1E7DH.cjs → vue-ui-spark-trend-EK-zZg4U.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-DYW_BgkY.cjs → vue-ui-sparkbar-CvWbFKnW.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-Bz_QHNKp.js → vue-ui-sparkbar-QL_FFOna.js} +4 -4
- package/dist/{vue-ui-sparkgauge-C6tB0nl4.cjs → vue-ui-sparkgauge-CX9L1CCZ.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-5EIHFUiW.js → vue-ui-sparkgauge-g51bSap-.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-KIw7nvKd.cjs → vue-ui-sparkhistogram-C_RkgtwV.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-COdCqBiI.js → vue-ui-sparkhistogram-TwShrJAd.js} +5 -5
- package/dist/{vue-ui-sparkline-CXIdKGso.cjs → vue-ui-sparkline-B-1mFAFf.cjs} +1 -1
- package/dist/{vue-ui-sparkline-DgUc7CMn.js → vue-ui-sparkline-PoXP19tk.js} +4 -4
- package/dist/{vue-ui-sparkstackbar-MrQzEVeh.cjs → vue-ui-sparkstackbar-BtOZ3Xvo.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BUqauQMd.js → vue-ui-sparkstackbar-C6K5d1a8.js} +5 -5
- package/dist/{vue-ui-stackbar-BUJpFyA3.cjs → vue-ui-stackbar-DP0kLFaZ.cjs} +2 -2
- package/dist/{vue-ui-stackbar-C-i36fcc.js → vue-ui-stackbar-DoAp1q1k.js} +16 -15
- package/dist/vue-ui-strip-plot-C6r7wmgw.cjs +1 -0
- package/dist/{vue-ui-strip-plot-Dc82V8Qo.js → vue-ui-strip-plot-DFyDRMeJ.js} +14 -13
- package/dist/{vue-ui-table-0E7zmWIW.cjs → vue-ui-table-BoFUMpxE.cjs} +2 -2
- package/dist/{vue-ui-table-DnAzCFyM.js → vue-ui-table-COQQvYVK.js} +1 -1
- package/dist/{vue-ui-table-heatmap-CzwyhRmp.js → vue-ui-table-heatmap-D1a4Jbfq.js} +9 -8
- package/dist/vue-ui-table-heatmap-DEmDa6Mg.cjs +1 -0
- package/dist/{vue-ui-table-sparkline-BU4he5wL.js → vue-ui-table-sparkline-CH1R9R6a.js} +9 -8
- package/dist/vue-ui-table-sparkline-bsEJsgny.cjs +1 -0
- package/dist/vue-ui-thermometer-1Gl2tpWy.cjs +1 -0
- package/dist/{vue-ui-thermometer-uShXro0_.js → vue-ui-thermometer-CZIBISGi.js} +26 -25
- package/dist/{vue-ui-timer-D6L29mt9.js → vue-ui-timer-CL0vPqGn.js} +5 -5
- package/dist/{vue-ui-timer-C8qXGSrQ.cjs → vue-ui-timer-DXZ_7lOR.cjs} +1 -1
- package/dist/vue-ui-tiremarks-D8rdzzQb.cjs +1 -0
- package/dist/{vue-ui-tiremarks-BcjGqJn-.js → vue-ui-tiremarks-DdwzlfZg.js} +20 -19
- package/dist/{vue-ui-treemap-BpB4ofIX.js → vue-ui-treemap-B3N6hzO2.js} +14 -13
- package/dist/vue-ui-treemap-CTcY1Qxh.cjs +1 -0
- package/dist/{vue-ui-vertical-bar-CEIg-_SG.js → vue-ui-vertical-bar-BOpex-Xq.js} +16 -15
- package/dist/{vue-ui-vertical-bar-Q5ArQTC0.cjs → vue-ui-vertical-bar-pwqVkPXV.cjs} +3 -3
- package/dist/vue-ui-waffle-Bd_6bbdt.cjs +1 -0
- package/dist/{vue-ui-waffle-h8UbPcuC.js → vue-ui-waffle-CW6THuE8.js} +15 -14
- package/dist/{vue-ui-wheel-BhLEyhW_.js → vue-ui-wheel-9xdDEq_q.js} +10 -9
- package/dist/vue-ui-wheel-BO3Xqux3.cjs +1 -0
- package/dist/vue-ui-word-cloud-CJjvWjsc.cjs +1 -0
- package/dist/{vue-ui-word-cloud-oa6Tnt3L.js → vue-ui-word-cloud-DAlBxzeY.js} +39 -38
- package/dist/vue-ui-xy-BIBSJN48.cjs +3 -0
- package/dist/{vue-ui-xy-CXY00bkP.js → vue-ui-xy-CDGKX79V.js} +21 -19
- package/dist/{vue-ui-xy-canvas-Ce4kC0Xz.cjs → vue-ui-xy-canvas-BN7OU1Ak.cjs} +2 -2
- package/dist/{vue-ui-xy-canvas-DapzRtyI.js → vue-ui-xy-canvas-C8YlVwjI.js} +111 -110
- package/package.json +2 -2
- package/dist/img-BPGizWpM.cjs +0 -1
- package/dist/img-itj0Vdmx.js +0 -15
- package/dist/index-CVZp-EFm.cjs +0 -9
- package/dist/pdf-DSkQT5iH.cjs +0 -1
- package/dist/vue-ui-age-pyramid-Bt_wuZiO.cjs +0 -1
- package/dist/vue-ui-bullet-BlYz0H5Q.cjs +0 -34
- package/dist/vue-ui-carousel-table-DHN5NuUS.cjs +0 -1
- package/dist/vue-ui-circle-pack-rf-DQQuM.cjs +0 -1
- package/dist/vue-ui-donut-GBs-eAbp.cjs +0 -1
- package/dist/vue-ui-donut-evolution-DdDVkeuH.cjs +0 -1
- package/dist/vue-ui-dumbbell-94nsg3t1.cjs +0 -9
- package/dist/vue-ui-flow-Ddn2S7NR.cjs +0 -1
- package/dist/vue-ui-funnel-Iawza5lZ.cjs +0 -1
- package/dist/vue-ui-galaxy-BoiBmzst.cjs +0 -1
- package/dist/vue-ui-gauge-B4aBDTfP.cjs +0 -1
- package/dist/vue-ui-heatmap-BNlBRWi1.cjs +0 -1
- package/dist/vue-ui-history-plot-BcjI3J96.cjs +0 -1
- package/dist/vue-ui-molecule-WPdx8i08.cjs +0 -1
- package/dist/vue-ui-mood-radar-D45uj8xo.cjs +0 -1
- package/dist/vue-ui-quadrant-LTIGWJiO.cjs +0 -1
- package/dist/vue-ui-radar-CblS9X1n.cjs +0 -1
- package/dist/vue-ui-relation-circle-COYe9dsQ.cjs +0 -1
- package/dist/vue-ui-scatter-DQhoY0TK.cjs +0 -1
- package/dist/vue-ui-strip-plot-BLECfP0D.cjs +0 -1
- package/dist/vue-ui-table-heatmap-BHSksmMn.cjs +0 -1
- package/dist/vue-ui-table-sparkline-BoVrzVok.cjs +0 -1
- package/dist/vue-ui-thermometer-DeJpqEix.cjs +0 -1
- package/dist/vue-ui-tiremarks-CQ4yESxv.cjs +0 -1
- package/dist/vue-ui-treemap-DbTCrAmK.cjs +0 -1
- package/dist/vue-ui-waffle-B61yE93N.cjs +0 -1
- package/dist/vue-ui-wheel-Chc9pVEu.cjs +0 -1
- package/dist/vue-ui-word-cloud-Cq6mmJVo.cjs +0 -1
- package/dist/vue-ui-xy-Brt11wmo.cjs +0 -3
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as w, ref as i, watch as Me, onMounted as ot, onBeforeUnmount as st, createElementBlock as n, openBlock as u, unref as r, normalizeStyle as K, normalizeClass as P, createBlock as D, createCommentVNode as f, createVNode as Ue, createSlots as ut, withCtx as b, renderSlot as g, normalizeProps as V, guardReactiveProps as M, createElementVNode as m, Fragment as C, renderList as F, toDisplayString as S, createTextVNode as Q, nextTick as nt } from "vue";
|
|
2
|
-
import { u as rt, c as it, t as dt, p as Z, a as vt, o as ct, e as U, b as ft, J as Re, d as ht, m as Be, f as x, X as yt, s as Ee, L as pt, k as ie, n as R, i as E, x as Ge, q as bt, r as gt, y as mt } from "./index-
|
|
2
|
+
import { u as rt, c as it, t as dt, p as Z, a as vt, o as ct, e as U, b as ft, J as Re, d as ht, m as Be, f as x, X as yt, s as Ee, L as pt, k as ie, n as R, i as E, x as Ge, q as bt, r as gt, y as mt } from "./index-CzjsUYng.js";
|
|
3
3
|
import { t as kt, u as wt } from "./useResponsive-vZgZwV-S.js";
|
|
4
|
-
import { _ as $t } from "./Title-
|
|
5
|
-
import { u as Lt, U as Ct } from "./usePrinter-
|
|
6
|
-
import { D as xt } from "./DataTable-
|
|
7
|
-
import { _ as _t } from "./Tooltip-
|
|
8
|
-
import { L as Tt } from "./Legend-
|
|
9
|
-
import Ft from "./vue-ui-skeleton-
|
|
10
|
-
import Nt from "./vue-ui-accordion-
|
|
11
|
-
import { u as Ye } from "./useNestedProp-
|
|
12
|
-
import { _ as St } from "./PackageVersion-
|
|
13
|
-
import { P as Ot } from "./PenAndPaper-
|
|
4
|
+
import { _ as $t } from "./Title-BS1zFx79.js";
|
|
5
|
+
import { u as Lt, U as Ct } from "./usePrinter-CUsjlfpk.js";
|
|
6
|
+
import { D as xt } from "./DataTable-C5EKEHsp.js";
|
|
7
|
+
import { _ as _t } from "./Tooltip-BNOd4lK1.js";
|
|
8
|
+
import { L as Tt } from "./Legend-DSzoXS-3.js";
|
|
9
|
+
import Ft from "./vue-ui-skeleton-XUKIcV-3.js";
|
|
10
|
+
import Nt from "./vue-ui-accordion-ConQex-C.js";
|
|
11
|
+
import { u as Ye } from "./useNestedProp-RC28MVml.js";
|
|
12
|
+
import { _ as St } from "./PackageVersion-BtrpyUPC.js";
|
|
13
|
+
import { P as Ot } from "./PenAndPaper-zjBsZuuq.js";
|
|
14
14
|
import { u as At } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { u as It } from "./useChartAccessibility-BWojgys7.js";
|
|
16
16
|
import { _ as Pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -91,7 +91,8 @@ const Dt = ["id"], zt = ["xmlns", "viewBox"], Vt = ["width", "height"], Mt = ["i
|
|
|
91
91
|
});
|
|
92
92
|
const { isPrinting: $e, isImaging: Le, generatePdf: Ce, generateImage: xe } = Lt({
|
|
93
93
|
elementId: `nested_donuts_${$.value}`,
|
|
94
|
-
fileName: e.value.style.chart.title.text || "vue-ui-nested-donuts"
|
|
94
|
+
fileName: e.value.style.chart.title.text || "vue-ui-nested-donuts",
|
|
95
|
+
options: e.value.userOptions.print
|
|
95
96
|
}), Qe = w(() => e.value.userOptions.show && !e.value.style.chart.title.text), Ze = w(() => ft(e.value.customPalette)), y = i({
|
|
96
97
|
dataLabels: {
|
|
97
98
|
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
@@ -920,7 +921,7 @@ const Dt = ["id"], zt = ["xmlns", "viewBox"], Vt = ["width", "height"], Mt = ["i
|
|
|
920
921
|
}, 8, ["config"])) : f("", !0)
|
|
921
922
|
], 46, Dt));
|
|
922
923
|
}
|
|
923
|
-
}, Ll = /* @__PURE__ */ Pt(ul, [["__scopeId", "data-v-
|
|
924
|
+
}, Ll = /* @__PURE__ */ Pt(ul, [["__scopeId", "data-v-8783db5e"]]);
|
|
924
925
|
export {
|
|
925
926
|
Ll as default
|
|
926
927
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-Zf2fUMIO.cjs"),ye=require("./useResponsive-N8jl0-aC.cjs"),Fe=require("./Title-BuZQSd23.cjs"),me=require("./usePrinter-BGPa8G48.cjs"),Te=require("./DataTable-DLUrhKkw.cjs"),Oe=require("./Tooltip-BiBcMMP3.cjs"),Pe=require("./Legend-CHEbsxt2.cjs"),ze=require("./vue-ui-skeleton-CiGqKHDK.cjs"),De=require("./vue-ui-accordion-CnGQYWdI.cjs"),be=require("./useNestedProp-BcSwG6N0.cjs"),Ae=require("./PackageVersion-B6sWtTA0.cjs"),Ie=require("./PenAndPaper-DO7-xSYx.cjs"),Me=require("./useUserOptionState-BgepsfED.cjs"),Re=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ue=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),qe=["id"],Ye=["xmlns","viewBox"],Xe=["width","height"],Ge=["id"],He=["offset","stop-color"],We=["offset","stop-opacity"],Je=["id"],Ke=["id"],Qe=["id"],Ze=["flood-color"],je=["d","fill","stroke","stroke-width","filter"],et={key:1},tt=["d","fill"],lt={key:2},at=["x","y","font-size","font-weight","fill"],ot={key:3},nt=["filter"],rt=["text-anchor","x","y","fill","font-size","font-weight"],st=["text-anchor","x","y","fill","font-size","font-weight"],ut=["text-anchor","x","y","fill","font-size","font-weight"],it=["d","fill","onMouseenter","onClick"],ct={key:5,class:"vue-data-ui-watermark"},dt={key:0,class:"vue-ui-nested-donuts-legend-title"},vt=["onClick"],ft=["innerHTML"],pt={__name:"vue-ui-nested-donuts",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(ge,{expose:ke,emit:Ce}){const{vue_ui_nested_donuts:we}=r.useConfig(),k=ge,x=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(r.createUid()),F=e.ref(!1),T=e.ref(""),Le=e.ref(null),U=e.ref(0),B=e.ref(null),q=e.ref(null),O=e.ref(null),Y=e.ref(null),X=e.ref(null),G=e.ref(0),H=e.ref(0),W=e.ref(0),L=e.ref(!1);function Be(l){L.value=l,U.value+=1}const t=e.computed({get:()=>Z(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:J,keepUserOptionState:K}=Me.useUserOptionState({config:t.value}),{svgRef:Q}=Re.useChartAccessibility({config:t.value.style.chart.title});function Z(){const l=be.useNestedProp({userConfig:k.config,defaultConfig:we});return l.theme?{...be.useNestedProp({userConfig:r.themes.vue_ui_nested_donuts[l.theme]||k.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>k.config,l=>{t.value=Z(),P.value=!t.value.userOptions.showOnChartHover,j(),G.value+=1,H.value+=1,W.value+=1,v.value.dataLabels.show=t.value.style.chart.layout.labels.dataLabels.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const $=e.ref(null);e.onMounted(()=>{j()});function j(){if(r.objectIsEmpty(k.dataset)&&r.error({componentName:"VueUiNestedDonuts",type:"dataset"}),t.value.responsive){const l=ye.throttle(()=>{const{width:s,height:o}=ye.useResponsive({chart:B.value,title:t.value.style.chart.title.text?q.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:Y.value,noTitle:X.value});requestAnimationFrame(()=>{c.value.width=s,c.value.height=o})});$.value=new ResizeObserver(l),$.value.observe(B.value.parentNode)}}e.onBeforeUnmount(()=>{$.value&&$.value.disconnect()});const{isPrinting:ee,isImaging:te,generatePdf:le,generateImage:ae}=me.usePrinter({elementId:`nested_donuts_${h.value}`,fileName:t.value.style.chart.title.text||"vue-ui-nested-donuts",options:t.value.userOptions.print}),xe=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),$e=e.computed(()=>r.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.layout.labels.dataLabels.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),c=e.ref({height:512,width:512}),oe=Ce;function Ne({datapoint:l,index:s}){oe("selectDatapoint",{datapoint:l,index:s})}const f=e.ref([]),m=e.computed(()=>(k.dataset.forEach((l,s)=>{[null,void 0].includes(l.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:s}),[null,void 0].includes(l.series)?r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"series",index:s}):l.series.length===0?r.error({componentName:"VueUiNestedDonuts",type:"datasetAttributeEmpty",property:`series at index ${s}`}):l.series.forEach((o,n)=>{[null,void 0].includes(o.name)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"name",index:n,key:"serie"}),[null,void 0].includes(o.values)&&r.error({componentName:"VueUiNestedDonuts",type:"datasetSerieAttribute",property:"values",index:n,key:"serie"})})}),k.dataset.map((l,s)=>({...l,total:l.series.filter(o=>!f.value.includes(o.id)).map(o=>r.sanitizeArray(o.values).reduce((n,a)=>n+a,0)).reduce((o,n)=>o+n,0),datasetIndex:s,id:`${h.value}_${s}`,series:l.series.map((o,n)=>({name:o.name,arcOf:l.name,arcOfId:`${h.value}_${s}`,id:`${h.value}_${s}_${n}`,seriesIndex:n,datasetIndex:s,color:r.convertColorToHex(o.color)||$e.value[n]||r.palette[n]||r.palette[n%r.palette.length],value:r.sanitizeArray(o.values).reduce((a,u)=>a+u,0),absoluteValues:o.values||[]}))})))),b=e.computed(()=>Math.min(c.value.height,c.value.width)*(t.value.style.chart.layout.donut.strokeWidth/512)),ne=e.computed(()=>[...m.value].map((l,s)=>{const o=l.series.filter(n=>!f.value.includes(n.id)).map(n=>n.value).reduce((n,a)=>n+a,0);return{...l,total:o,series:l.series.filter(n=>!f.value.includes(n.id)).map(n=>({...n,proportion:n.value/o}))}}));function Se(l,s,o){let n=0;for(let a=0;a<l.length;a+=1)o.includes(l[a])&&(n+=1);return n<s}const d=e.ref(ne.value);e.watch(()=>ne.value,l=>d.value=l);const re=e.ref(null),se=e.ref(null);function z(l){oe("selectLegend",l);const s=m.value.flatMap(i=>i.series).find(i=>i.id===l.id),o=d.value.flatMap(i=>i.series).find(i=>i.id===l.id);let a=o?o.value:0;const u=m.value.find(i=>i.id===s.arcOfId).series.map(i=>i.id),p=Se(u,u.length-1,f.value);if(f.value.includes(l.id)){let i=function(){a>s.value?(cancelAnimationFrame(re.value),d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id==l.id?{...g,value:s.value}:g)}))):(a+=s.value*.025,d.value=d.value.map(y=>({...y,series:y.series.map(g=>g.id===l.id?{...g,value:a}:g)})),re.value=requestAnimationFrame(i))};f.value=f.value.filter(y=>y!==l.id),i()}else if(p){let i=function(){a<.1?(cancelAnimationFrame(se.value),f.value.push(l.id),d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:0}:w)}))):(a/=1.1,d.value=d.value.map((y,g)=>({...y,series:y.series.map(w=>w.id===l.id?{...w,value:a}:w)})),se.value=requestAnimationFrame(i))};i()}}const D=e.computed(()=>b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio),ue=e.computed(()=>d.value.map((l,s)=>b.value-s*b.value/m.value.length)),N=e.computed(()=>d.value.map((l,s)=>{const o=s*b.value/m.value.length;return{...l,radius:b.value-o,donut:r.makeDonut({series:l.series},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,D.value)}})),ie=e.computed(()=>[...m.value].map((l,s)=>{const o=s*b.value/m.value.length;return{sizeRatio:o,donut:r.makeDonut({series:[{value:1}]},c.value.width/2,c.value.height/2,b.value-o,b.value-o,1.99999,2,1,360,105.25,b.value/m.value.length*t.value.style.chart.layout.donut.spacingRatio)[0]}})),ce=e.ref(null),S=e.ref(null),_=e.ref(null),A=e.ref(null);function _e({datapoint:l,_relativeIndex:s,seriesIndex:o}){ce.value=l.arcOfId,S.value=l.id,_.value=o,A.value={datapoint:l,seriesIndex:o,series:d.value,config:t.value};const n=t.value.style.chart.tooltip.customFormat;if(r.isFunction(n)&&r.functionReturnsString(()=>n({seriesIndex:o,datapoint:l,series:d.value,config:t.value})))T.value=n({seriesIndex:o,datapoint:l,series:d.value,config:t.value});else{let a="";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0){const u=d.value.map(p=>p.series.find(i=>i.seriesIndex===o));u.forEach((p,i)=>{if(!p)return"";a+=`
|
|
2
2
|
<div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${i<u.length-1?`border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor}`:""}">
|
|
3
3
|
<div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
|
|
4
4
|
<svg viewBox="0 0 20 20" height="${t.value.style.chart.tooltip.fontSize}" width="${t.value.style.chart.tooltip.fontSize}">
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
${t.value.style.chart.tooltip.showPercentage?`(${r.dataLabel({v:p.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})`:""}
|
|
15
15
|
</span>
|
|
16
16
|
</div>
|
|
17
|
-
`})}else a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf??""} - ${l.name}</div>`,a+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(a+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?a+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:a+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`);T.value=`<div style="font-size:${t.value.style.chart.tooltip.fontSize}px">${a}</div>`}F.value=!0}function I(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function de(l,s){if(!t.value.useBlurOnHover)return"";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0)return[null,void 0].includes(_.value)||_.value===s?"":`url(#blur_${h.value})`;if(!t.value.style.chart.tooltip.showAllItemsAtIndex||f.value.length)return[null,void 0].includes(S.value)||S.value===l.id?"":`url(#blur_${h.value})`}const M=e.computed(()=>m.value.map((l,s)=>l.series.map((o,n)=>({name:o.name,color:o.color,value:o.value,shape:"circle",arcOf:o.arcOf,id:o.id,seriesIndex:n,datasetIndex:s,total:l.series.filter(a=>!f.value.includes(a.id)).map(a=>a.value).reduce((a,u)=>a+u,0)})).map(o=>({...o,opacity:f.value.includes(o.id)?.5:1,segregate:()=>z(o),isSegregated:f.value.includes(o.id)})))),Ve=e.computed(()=>({cy:"nested-donuts-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),C=e.computed(()=>{const l=d.value.flatMap(o=>o.series.map(n=>({name:`${o.name} - ${n.name}`,color:n.color,total:o.total}))),s=d.value.flatMap(o=>o.series.map(n=>n.value));return{head:l,body:s}});function ve(){e.nextTick(()=>{const l=C.value.head.map((n,a)=>[[n.name],[C.value.body[a]],[isNaN(C.value.body[a]/n.total)?"-":C.value.body[a]/n.total*100]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-nested-donuts"})})}const V=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],s=C.value.head.map((a,u)=>{const p=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:C.value.body[u],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:a.color,name:a.name},p,isNaN(C.value.body[u]/a.total)?"-":r.dataLabel({v:C.value.body[u]/a.total*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:s,config:o}});function Ee(){return m.value}function fe(){v.value.showTable=!v.value.showTable}function pe(){v.value.dataLabels.show=!v.value.dataLabels.show}function he(){v.value.showTooltip=!v.value.showTooltip}const E=e.ref(!1);function R(){E.value=!E.value}return ke({getData:Ee,generatePdf:le,generateCsv:ve,generateImage:ae,toggleTable:fe,toggleLabels:pe,toggleTooltip:he,toggleAnnotator:R}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"nestedDonutsChart",ref:B,class:e.normalizeClass(`vue-ui-nested-donuts ${L.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`nested_donuts_${h.value}`,onMouseenter:s[3]||(s[3]=()=>e.unref(J)(!0)),onMouseleave:s[4]||(s[4]=()=>e.unref(J)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie.PenAndPaper,{key:0,svgRef:e.unref(Q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:E.value,onClose:R},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),xe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:q},[(e.openBlock(),e.createBlock(Fe._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value&&(e.unref(K)||e.unref(P))?(e.openBlock(),e.createBlock(me.UserOptions,{ref:"details",key:`user_option_${U.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ee),isImaging:e.unref(te),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:E.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(le),onGenerateCsv:ve,onGenerateImage:e.unref(ae),onToggleTable:fe,onToggleLabels:pe,onToggleTooltip:he,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(K)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"7"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:Q,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${c.value.width<=0?.001:c.value.width} ${c.value.height<0?.001:c.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ae._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:c.value.width<=0?.001:c.value.width,height:c.value.height<0?.001:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Xe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`radial_${h.value}_${n}`},[s[5]||(s[5]=e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),e.createElementVNode("stop",{offset:`${(1-D.value/ue.value[n])*100}%`,"stop-color":e.unref(r.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,He),e.createElementVNode("stop",{offset:`${(1-D.value/ue.value[n]/2)*100}%`,"stop-color":"#FFFFFF","stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,We),s[6]||(s[6]=e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1))],8,Ge))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${h.value}`},null,8,Ke),s[7]||(s[7]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,Je),e.createElementVNode("filter",{id:`shadow_${h.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Ze)],8,Qe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{class:"vue-ui-donut-arc-path",d:a.arcSlice,fill:e.unref(r.setOpacity)(a.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:de(a,u)},null,8,je)]))),256))]))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:o.donut.arcSlice,fill:`url(#radial_${h.value}_${n})`,stroke:"transparent","stroke-width":"0"},null,8,tt)]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.showDonutName?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[u===0&&c.value.width&&c.value.height?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),x:c.value.width/2,y:a.startY-t.value.style.chart.layout.labels.dataLabels.fontSize+t.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,"text-anchor":"middle","font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldDonutName?"bold":"normal",fill:t.value.style.chart.layout.labels.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):o.name),11,at)):e.createCommentVNode("",!0)]))),256))]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",{filter:de(a,u)},[I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldPercentage?"bold":"normal"},e.toDisplayString(e.unref(r.dataLabel)({v:a.proportion*100,s:"%",r:t.value.style.chart.layout.labels.dataLabels.roundingPercentage})),11,rt)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY)+t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"}," ("+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u}))+") ",11,st)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&!t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:2,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u})),11,ut)):e.createCommentVNode("",!0)],8,nt))),256))]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:a.arcSlice,fill:Le.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:p=>_e({datapoint:a,seriesIndex:a.seriesIndex}),onClick:p=>Ne({datapoint:a,index:u}),onMouseleave:s[0]||(s[0]=p=>{F.value=!1,ce.value=null,S.value=null,_.value=null})},null,40,it)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,Ye)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ct,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ze.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Oe._sfc_main,{show:v.value.showTooltip&&F.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:B.value,content:T.value,isFullscreen:L.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartLegend",ref:O,class:e.normalizeClass({"vue-ui-nested-donuts-legend":M.value.length>1})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,n)=>(e.openBlock(),e.createBlock(Pe.Legend,{key:`legend_${n}_${W.value}`,legendSet:o,config:Ve.value,onClickMarker:s[1]||(s[1]=({legend:a})=>z(a))},{legendTitle:e.withCtx(({titleSet:a})=>[a[0]&&a[0].arcOf?(e.openBlock(),e.createElementBlock("div",dt,e.toDisplayString(a[0].arcOf),1)):e.createCommentVNode("",!0)]),item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:p=>z(a),style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:u}))+" ",1),f.value.includes(a.id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ( - % ) ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" ("+e.toDisplayString(isNaN(a.value/a.total)?"-":e.unref(r.dataLabel)({v:a.value/a.total*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],64))],12,vt)]),_:2},1032,["legendSet","config"]))),128))],2)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"chartLegend",ref:O},[e.renderSlot(l.$slots,"legend",{legend:M.value},void 0,!0)],512)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:Y,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(De.default,{key:10,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Te.DataTable,{key:`table_${H.value}`,colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,ft)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,qe))}},ht=Ue._export_sfc(pt,[["__scopeId","data-v-f2992cb6"]]);exports.default=ht;
|
|
17
|
+
`})}else a+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf??""} - ${l.name}</div>`,a+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`,t.value.style.chart.tooltip.showValue&&(a+=`<b>${r.applyDataLabel(t.value.style.chart.layout.labels.dataLabels.formatter,l.value,r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:o})}</b>`),t.value.style.chart.tooltip.showPercentage&&(t.value.style.chart.tooltip.showValue?a+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:a+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`);T.value=`<div style="font-size:${t.value.style.chart.tooltip.fontSize}px">${a}</div>`}F.value=!0}function I(l){return l.proportion*100>t.value.style.chart.layout.labels.dataLabels.hideUnderValue}function de(l,s){if(!t.value.useBlurOnHover)return"";if(t.value.style.chart.tooltip.showAllItemsAtIndex&&f.value.length===0)return[null,void 0].includes(_.value)||_.value===s?"":`url(#blur_${h.value})`;if(!t.value.style.chart.tooltip.showAllItemsAtIndex||f.value.length)return[null,void 0].includes(S.value)||S.value===l.id?"":`url(#blur_${h.value})`}const M=e.computed(()=>m.value.map((l,s)=>l.series.map((o,n)=>({name:o.name,color:o.color,value:o.value,shape:"circle",arcOf:o.arcOf,id:o.id,seriesIndex:n,datasetIndex:s,total:l.series.filter(a=>!f.value.includes(a.id)).map(a=>a.value).reduce((a,u)=>a+u,0)})).map(o=>({...o,opacity:f.value.includes(o.id)?.5:1,segregate:()=>z(o),isSegregated:f.value.includes(o.id)})))),Ve=e.computed(()=>({cy:"nested-donuts-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),C=e.computed(()=>{const l=d.value.flatMap(o=>o.series.map(n=>({name:`${o.name} - ${n.name}`,color:n.color,total:o.total}))),s=d.value.flatMap(o=>o.series.map(n=>n.value));return{head:l,body:s}});function ve(){e.nextTick(()=>{const l=C.value.head.map((n,a)=>[[n.name],[C.value.body[a]],[isNaN(C.value.body[a]/n.total)?"-":C.value.body[a]/n.total*100]]),s=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(s);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-nested-donuts"})})}const V=e.computed(()=>{const l=[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],s=C.value.head.map((a,u)=>{const p=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:C.value.body[u],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:a.color,name:a.name},p,isNaN(C.value.body[u]/a.total)?"-":r.dataLabel({v:C.value.body[u]/a.total*100,s:"%",r:t.value.table.td.roundingPercentage})]}),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{colNames:[t.value.table.columnNames.series,t.value.table.columnNames.value,t.value.table.columnNames.percentage],head:l,body:s,config:o}});function Ee(){return m.value}function fe(){v.value.showTable=!v.value.showTable}function pe(){v.value.dataLabels.show=!v.value.dataLabels.show}function he(){v.value.showTooltip=!v.value.showTooltip}const E=e.ref(!1);function R(){E.value=!E.value}return ke({getData:Ee,generatePdf:le,generateCsv:ve,generateImage:ae,toggleTable:fe,toggleLabels:pe,toggleTooltip:he,toggleAnnotator:R}),(l,s)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"nestedDonutsChart",ref:B,class:e.normalizeClass(`vue-ui-nested-donuts ${L.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),id:`nested_donuts_${h.value}`,onMouseenter:s[3]||(s[3]=()=>e.unref(J)(!0)),onMouseleave:s[4]||(s[4]=()=>e.unref(J)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie.PenAndPaper,{key:0,svgRef:e.unref(Q),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:E.value,onClose:R},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),xe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:X,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:q},[(e.openBlock(),e.createBlock(Fe._sfc_main,{key:`title_${G.value}`,config:{title:{cy:"donut-div-title",...t.value.style.chart.title},subtitle:{cy:"donut-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value&&(e.unref(K)||e.unref(P))?(e.openBlock(),e.createBlock(me.UserOptions,{ref:"details",key:`user_option_${U.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(ee),isImaging:e.unref(te),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:L.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:B.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:E.value,onToggleFullscreen:Be,onGeneratePdf:e.unref(le),onGenerateCsv:ve,onGenerateImage:e.unref(ae),onToggleTable:fe,onToggleLabels:pe,onToggleTooltip:he,onToggleAnnotator:R,style:e.normalizeStyle({visibility:e.unref(K)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:o,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:o,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"6"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"7"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"8"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:Q,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":L.value,"vue-data-ui-fulscreen--off":!L.value}),viewBox:`0 0 ${c.value.width<=0?.001:c.value.width} ${c.value.height<0?.001:c.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Ae._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:c.value.width<=0?.001:c.value.width,height:c.value.height<0?.001:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Xe)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(o,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{id:`radial_${h.value}_${n}`},[s[5]||(s[5]=e.createElementVNode("stop",{offset:"0%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1)),e.createElementVNode("stop",{offset:`${(1-D.value/ue.value[n])*100}%`,"stop-color":e.unref(r.setOpacity)("#FFFFFF",0),"stop-opacity":"0"},null,8,He),e.createElementVNode("stop",{offset:`${(1-D.value/ue.value[n]/2)*100}%`,"stop-color":"#FFFFFF","stop-opacity":t.value.style.chart.gradientIntensity/100},null,8,We),s[6]||(s[6]=e.createElementVNode("stop",{offset:"100%","stop-color":"#FFFFFF","stop-opacity":"0"},null,-1))],8,Ge))),256))]),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${h.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:2,id:`blur_std_${h.value}`},null,8,Ke),s[7]||(s[7]=e.createElementVNode("feColorMatrix",{type:"saturate",values:"0"},null,-1))],8,Je),e.createElementVNode("filter",{id:`shadow_${h.value}`,"color-interpolation-filters":"sRGB"},[e.createElementVNode("feDropShadow",{dx:"0",dy:"0",stdDeviation:"10","flood-opacity":"0.5","flood-color":t.value.style.chart.layout.donut.shadowColor},null,8,Ze)],8,Qe)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{class:"vue-ui-donut-arc-path",d:a.arcSlice,fill:e.unref(r.setOpacity)(a.color,80),stroke:t.value.style.chart.backgroundColor,"stroke-width":t.value.style.chart.layout.donut.borderWidth,filter:de(a,u)},null,8,je)]))),256))]))),256)),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",et,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ie.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:o.donut.arcSlice,fill:`url(#radial_${h.value}_${n})`,stroke:"transparent","stroke-width":"0"},null,8,tt)]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.showDonutName?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[u===0&&c.value.width&&c.value.height?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),x:c.value.width/2,y:a.startY-t.value.style.chart.layout.labels.dataLabels.fontSize+t.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,"text-anchor":"middle","font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldDonutName?"bold":"normal",fill:t.value.style.chart.layout.labels.dataLabels.color},e.toDisplayString(t.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation?e.unref(r.abbreviate)({source:o.name,length:t.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):o.name),11,at)):e.createCommentVNode("",!0)]))),256))]))),256))])):e.createCommentVNode("",!0),t.value.style.chart.layout.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",{filter:de(a,u)},[I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage?(e.openBlock(),e.createElementBlock("text",{key:0,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldPercentage?"bold":"normal"},e.toDisplayString(e.unref(r.dataLabel)({v:a.proportion*100,s:"%",r:t.value.style.chart.layout.labels.dataLabels.roundingPercentage})),11,rt)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:1,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY)+t.value.style.chart.layout.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"}," ("+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u}))+") ",11,st)):e.createCommentVNode("",!0),I(a)&&v.value.dataLabels.show&&!t.value.style.chart.layout.labels.dataLabels.showPercentage&&t.value.style.chart.layout.labels.dataLabels.showValue?(e.openBlock(),e.createElementBlock("text",{key:2,class:e.normalizeClass({animated:t.value.useCssAnimation}),"text-anchor":e.unref(r.calcMarkerOffsetX)(a,!0).anchor,x:e.unref(r.calcMarkerOffsetX)(a,!1,t.value.style.chart.layout.labels.dataLabels.offsetX).x||0,y:e.unref(r.calcMarkerOffsetY)(a,t.value.style.chart.layout.labels.dataLabels.offsetY,t.value.style.chart.layout.labels.dataLabels.offsetY),fill:t.value.style.chart.layout.labels.dataLabels.useSerieColor?a.color:t.value.style.chart.layout.labels.dataLabels.color,"font-size":t.value.style.chart.layout.labels.dataLabels.fontSize,"font-weight":t.value.style.chart.layout.labels.dataLabels.boldValue?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.layout.labels.dataLabels.roundingValue}),{datapoint:a,seriesIndex:n,datapointIndex:u})),11,ut)):e.createCommentVNode("",!0)],8,nt))),256))]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.donut,(a,u)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("path",{d:a.arcSlice,fill:Le.value===n?"rgba(0,0,0,0.1)":"transparent",onMouseenter:p=>_e({datapoint:a,seriesIndex:a.seriesIndex}),onClick:p=>Ne({datapoint:a,index:u}),onMouseleave:s[0]||(s[0]=p=>{F.value=!1,ce.value=null,S.value=null,_.value=null})},null,40,it)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,Ye)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ct,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(ee)||e.unref(te)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ze.default,{key:6,config:{type:"donut",style:{backgroundColor:t.value.style.chart.backgroundColor,donut:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Oe._sfc_main,{show:v.value.showTooltip&&F.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:B.value,content:T.value,isFullscreen:L.value,isCustom:e.unref(r.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...A.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),t.value.style.chart.legend.show?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartLegend",ref:O,class:e.normalizeClass({"vue-ui-nested-donuts-legend":M.value.length>1})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,(o,n)=>(e.openBlock(),e.createBlock(Pe.Legend,{key:`legend_${n}_${W.value}`,legendSet:o,config:Ve.value,onClickMarker:s[1]||(s[1]=({legend:a})=>z(a))},{legendTitle:e.withCtx(({titleSet:a})=>[a[0]&&a[0].arcOf?(e.openBlock(),e.createElementBlock("div",dt,e.toDisplayString(a[0].arcOf),1)):e.createCommentVNode("",!0)]),item:e.withCtx(({legend:a,index:u})=>[e.createElementVNode("div",{onClick:p=>z(a),style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(a.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,a.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:a.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:a,seriesIndex:u}))+" ",1),f.value.includes(a.id)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" ( - % ) ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" ("+e.toDisplayString(isNaN(a.value/a.total)?"-":e.unref(r.dataLabel)({v:a.value/a.total*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1)],64))],12,vt)]),_:2},1032,["legendSet","config"]))),128))],2)):e.createCommentVNode("",!0),t.value.style.chart.legend.show?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"chartLegend",ref:O},[e.renderSlot(l.$slots,"legend",{legend:M.value},void 0,!0)],512)),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:9,ref_key:"source",ref:Y,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createBlock(De.default,{key:10,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Te.DataTable,{key:`table_${H.value}`,colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:s[2]||(s[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,ft)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o.name||o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,qe))}},ht=Ue._export_sfc(pt,[["__scopeId","data-v-8783db5e"]]);exports.default=ht;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as h, ref as r, watch as we, onMounted as Xe, onBeforeUnmount as Ge, createElementBlock as u, openBlock as s, unref as i, normalizeStyle as B, normalizeClass as U, createBlock as C, createCommentVNode as g, createElementVNode as O, createVNode as $e, createSlots as Ee, withCtx as f, renderSlot as d, normalizeProps as _, guardReactiveProps as P, Fragment as M, renderList as N, toDisplayString as I, createTextVNode as He, nextTick as We } from "vue";
|
|
2
|
-
import { u as je, c as qe, t as Je, p as Ce, a as Ke, b as Qe, o as Ze, e as K, d as et, X as tt, f as R, i as Q, x as xe, q as at, r as lt, y as ot } from "./index-
|
|
2
|
+
import { u as je, c as qe, t as Je, p as Ce, a as Ke, b as Qe, o as Ze, e as K, d as et, X as tt, f as R, i as Q, x as xe, q as at, r as lt, y as ot } from "./index-CzjsUYng.js";
|
|
3
3
|
import { t as nt, u as st } from "./useResponsive-vZgZwV-S.js";
|
|
4
|
-
import { _ as rt } from "./Title-
|
|
5
|
-
import { u as ut, U as it } from "./usePrinter-
|
|
6
|
-
import { L as ct } from "./Legend-
|
|
7
|
-
import { D as dt } from "./DataTable-
|
|
8
|
-
import { _ as vt } from "./Tooltip-
|
|
9
|
-
import ht from "./vue-ui-skeleton-
|
|
10
|
-
import ft from "./vue-ui-accordion-
|
|
11
|
-
import { u as Te } from "./useNestedProp-
|
|
12
|
-
import { _ as gt } from "./PackageVersion-
|
|
13
|
-
import { P as pt } from "./PenAndPaper-
|
|
4
|
+
import { _ as rt } from "./Title-BS1zFx79.js";
|
|
5
|
+
import { u as ut, U as it } from "./usePrinter-CUsjlfpk.js";
|
|
6
|
+
import { L as ct } from "./Legend-DSzoXS-3.js";
|
|
7
|
+
import { D as dt } from "./DataTable-C5EKEHsp.js";
|
|
8
|
+
import { _ as vt } from "./Tooltip-BNOd4lK1.js";
|
|
9
|
+
import ht from "./vue-ui-skeleton-XUKIcV-3.js";
|
|
10
|
+
import ft from "./vue-ui-accordion-ConQex-C.js";
|
|
11
|
+
import { u as Te } from "./useNestedProp-RC28MVml.js";
|
|
12
|
+
import { _ as gt } from "./PackageVersion-BtrpyUPC.js";
|
|
13
|
+
import { P as pt } from "./PenAndPaper-zjBsZuuq.js";
|
|
14
14
|
import { u as yt } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { u as mt } from "./useChartAccessibility-BWojgys7.js";
|
|
16
16
|
import { _ as bt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -57,7 +57,8 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
57
57
|
}, { deep: !0 });
|
|
58
58
|
const { isPrinting: de, isImaging: ve, generatePdf: he, generateImage: fe } = ut({
|
|
59
59
|
elementId: `vue-ui-onion_${x.value}`,
|
|
60
|
-
fileName: e.value.style.chart.title.text || "vue-ui-onion"
|
|
60
|
+
fileName: e.value.style.chart.title.text || "vue-ui-onion",
|
|
61
|
+
options: e.value.userOptions.print
|
|
61
62
|
}), Se = h(() => e.value.userOptions.show && !e.value.style.chart.title.text), Fe = h(() => Qe(e.value.customPalette)), m = r({
|
|
62
63
|
showTable: e.value.table.show,
|
|
63
64
|
showTooltip: e.value.style.chart.tooltip.show
|
|
@@ -683,7 +684,7 @@ const kt = ["id"], wt = ["xmlns", "viewBox"], $t = ["width", "height"], Ct = ["c
|
|
|
683
684
|
}, 8, ["config"])) : g("", !0)
|
|
684
685
|
], 46, kt));
|
|
685
686
|
}
|
|
686
|
-
}, Zt = /* @__PURE__ */ bt(Dt, [["__scopeId", "data-v-
|
|
687
|
+
}, Zt = /* @__PURE__ */ bt(Dt, [["__scopeId", "data-v-c097b7d4"]]);
|
|
687
688
|
export {
|
|
688
689
|
Zt as default
|
|
689
690
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-Zf2fUMIO.cjs"),ae=require("./useResponsive-N8jl0-aC.cjs"),$e=require("./Title-BuZQSd23.cjs"),oe=require("./usePrinter-BGPa8G48.cjs"),xe=require("./Legend-CHEbsxt2.cjs"),Be=require("./DataTable-DLUrhKkw.cjs"),Te=require("./Tooltip-BiBcMMP3.cjs"),Se=require("./vue-ui-skeleton-CiGqKHDK.cjs"),Pe=require("./vue-ui-accordion-CnGQYWdI.cjs"),re=require("./useNestedProp-BcSwG6N0.cjs"),Oe=require("./PackageVersion-B6sWtTA0.cjs"),Ne=require("./PenAndPaper-DO7-xSYx.cjs"),_e=require("./useUserOptionState-BgepsfED.cjs"),Ve=require("./useChartAccessibility-Cm7nkzTG.cjs"),Ae=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Fe=["id"],Ie=["xmlns","viewBox"],Ee=["width","height"],Re=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Me=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset"],Le=["id"],ze=["stdDeviation"],De=["filter"],qe=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset"],Ue=["cx","cy","r","stroke-width","stroke-dasharray","stroke-dashoffset","onMouseenter"],Ye={key:2},Xe=["onMouseenter"],Ge=["x","y","font-size","fill","font-weight"],He={key:5,class:"vue-data-ui-watermark"},je=["onClick"],We=["innerHTML"],Je={__name:"vue-ui-onion",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend"],setup(ne,{expose:ue,emit:se}){const{vue_ui_onion:ie}=u.useConfig(),f=ne,C=e.computed(()=>!!f.dataset&&f.dataset.length),m=e.ref(u.createUid()),ce=e.ref(null),I=e.ref(0),$=e.ref(!1),S=e.ref(""),d=e.ref([]),b=e.ref(null),E=e.ref(null),R=e.ref(null),M=e.ref(null),L=e.ref(null),z=e.ref(0),D=e.ref(0),q=e.ref(0),t=e.computed({get:()=>G(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:U,keepUserOptionState:Y}=_e.useUserOptionState({config:t.value}),{svgRef:X}=Ve.useChartAccessibility({config:t.value.style.chart.title});function G(){const l=re.useNestedProp({userConfig:f.config,defaultConfig:ie});return l.theme?{...re.useNestedProp({userConfig:u.themes.vue_ui_onion[l.theme]||f.config,defaultConfig:l}),customPalette:u.themePalettes[l.theme]||u.palette}:l}e.watch(()=>f.config,l=>{t.value=G(),P.value=!t.value.userOptions.showOnChartHover,K(),z.value+=1,D.value+=1,q.value+=1,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const{isPrinting:H,isImaging:j,generatePdf:W,generateImage:J}=oe.usePrinter({elementId:`vue-ui-onion_${m.value}`,fileName:t.value.style.chart.title.text||"vue-ui-onion",options:t.value.userOptions.print}),de=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),ve=e.computed(()=>u.convertCustomPalette(t.value.customPalette)),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),n=e.ref({height:512,width:512,padding:{top:64,left:64,right:64,bottom:64},minRadius:64}),x=e.ref(null);e.onMounted(()=>{K()});function K(){if(u.objectIsEmpty(f.dataset)&&u.error({componentName:"VueUiOnion",type:"dataset"}),t.value.responsive){const r=ae.throttle(()=>{const{width:a,height:o}=ae.useResponsive({chart:b.value,title:t.value.style.chart.title.text?E.value:null,legend:t.value.style.chart.legend.show?R.value:null,source:M.value,noTitle:L.value});requestAnimationFrame(()=>{n.value.width=a,n.value.height=o,n.value.padding.top=Math.max(a,o)*.125,n.value.padding.right=Math.max(a,o)*.125,n.value.padding.bottom=Math.max(a,o)*.125,n.value.padding.left=Math.max(a,o)*.125,n.value.minRadius=Math.min(a,o)*.125})});x.value=new ResizeObserver(r),x.value.observe(b.value.parentNode)}}e.onBeforeUnmount(()=>{x.value&&x.value.disconnect()});const s=e.computed(()=>({top:n.value.padding.top,left:n.value.padding.left,right:n.value.width-n.value.padding.right,bottom:n.value.height-n.value.padding.bottom,centerX:n.value.width/2,centerY:n.value.height/2,width:n.value.width-n.value.padding.right-n.value.padding.left,height:n.value.height-n.value.padding.bottom-n.value.padding.top,minRadius:n.value.minRadius,maxRadius:Math.min(n.value.width,n.value.height)-n.value.padding.top*2})),i=e.computed(()=>(f.dataset.forEach((l,r)=>{[null,void 0].includes(l.name)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"name",index:r}),[void 0].includes(l.percentage)&&u.error({componentName:"VueUiOnion",type:"datasetSerieAttribute",property:"percentage",index:r})}),f.dataset.map((l,r)=>{const a=`onion_serie_${r}_${m.value}`;return{...l,percentage:l.percentage||0,targetPercentage:l.percentage||0,color:u.convertColorToHex(l.color)||ve.value[r]||u.palette[r],id:a,shape:"circle",opacity:d.value.includes(a)?.5:1,absoluteIndex:r,segregate:()=>Q(a),isSegregated:d.value.includes(a)}}))),k=e.ref(i.value),he=e.computed(()=>t.value.useStartAnimation),pe=e.ref(null),fe=e.computed(()=>Math.max(...i.value.map(l=>l.percentage))),O=e.ref(!1);e.watch(()=>i.value,ge,{immediate:!0});function ge(){if(he.value&&!O.value){let r=function(){l>=fe.value?(cancelAnimationFrame(pe.value),k.value=i.value,O.value=!0):(k.value=i.value.map(a=>({...a,percentage:l<a.targetPercentage?l:a.targetPercentage})),l+=1,requestAnimationFrame(r),O.value=!0)};k.value=i.value.map(a=>({...a,percentage:0}));let l=0;r()}else k.value=i.value}const me=e.computed(()=>({cy:"onion-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),ye=e.computed(()=>i.value.filter(l=>!d.value.includes(l.id)).length),g=e.computed(()=>{const l=Math.min(s.value.width,s.value.height)/2/i.value.length;return{gutter:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.gutter.width,track:(l>t.value.style.chart.layout.maxThickness?t.value.style.chart.layout.maxThickness:l)*t.value.style.chart.layout.track.width}}),h=e.computed(()=>k.value.filter(l=>!d.value.includes(l.id)).map((l,r)=>{const a=(s.value.maxRadius-g.value.track)/ye.value/2*(1+r),o=s.value.centerY-a;return{percentage:l.percentage||0,...l,labelY:o,radius:a,path:be(a,l.percentage||0)}}));function be(l,r){const a=2*Math.PI*l,o=a*.75,c=`${o} ${a}`,w=o*(1-r/100);return{bgDashArray:`${o} ${a}`,bgDashOffset:0,dashArray:c,dashOffset:w,fullOffset:0,active:`
|
|
2
2
|
M ${s.value.centerX},${s.value.centerY-l}
|
|
3
3
|
A ${l},${l} 0 1 1
|
|
4
4
|
${s.value.centerX+l*Math.cos(Math.PI*3/4)},${s.value.centerY+l*Math.sin(Math.PI*3/4)}
|
|
5
|
-
`.trim()}}const ke=se;function Q(l){d.value.includes(l)?d.value=d.value.filter(r=>r!==l):d.value.push(l),ke("selectLegend",h.value)}function we(){return h.value}const N=e.computed(()=>{const l=[t.value.table.translations.serie,t.value.table.translations.percentage,t.value.table.translations.value],r=h.value.map(a=>[a.name,a.percentage,a.value]);return{head:l,body:r}}),B=e.computed(()=>{const l=N.value.head,r=h.value.map(o=>[`<span style="color:${o.color}">⬤</span> ${o.name}`,`${Number(o.percentage??0).toFixed(t.value.table.td.roundingPercentage).toLocaleString()}%`,`${o.prefix||""}${[null,void 0,NaN,"NaN"].includes(o.value)?"-":o.value.toFixed(t.value.table.td.roundingValue).toLocaleString()}${o.suffix||""}`]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:r,config:a,colNames:l}});function Z(){e.nextTick(()=>{const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=N.value.head,a=N.value.body,o=l.concat([r]).concat(a),c=u.createCsvContent(o);u.downloadCsv({csvContent:c,title:t.value.style.chart.title.text||"vue-ui-onion"})})}const p=e.ref(void 0),y=e.ref(!1);function Ce(l){y.value=l,I.value+=1}const _=e.ref(null);function ee({datapoint:l,seriesIndex:r,show:a=!0}){const o=l.absoluteIndex;p.value=r,_.value={datapoint:l,seriesIndex:o,series:i.value,config:t.value},$.value=a;let c="";const w=t.value.style.chart.tooltip.customFormat;if(u.isFunction(w)&&u.functionReturnsString(()=>w({seriesIndex:o,datapoint:l,series:i.value,config:t.value})))S.value=w({seriesIndex:o,datapoint:l,series:i.value,config:t.value});else{const A=t.value.style.chart.tooltip.showPercentage,F=t.value.style.chart.tooltip.showValue;c+=`<div style="width: 100%; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; padding-bottom: 6px;margin-bottom:3px;display:flex;flex-direction:row;gap:3px;align-items:center"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span></span>${l.name}</span></div>`,c+=`<div style="width:100%;text-align:left;"><b>${A?u.dataLabel({p:"",v:l.percentage,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}):""}</b> ${A&&F?"(":""}${F?u.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,l.value,u.dataLabel({p:l.prefix||"",v:l.value,s:l.suffix||"",r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:r}):""}${A&&F?")":""}</div>`,S.value=`<div>${c}</div>`}}function te(){v.value.showTable=!v.value.showTable}function le(){v.value.showTooltip=!v.value.showTooltip}const T=e.ref(!1);function V(){T.value=!T.value}return ue({getData:we,generatePdf:W,generateCsv:Z,generateImage:J,toggleTable:te,toggleTooltip:le,toggleAnnotator:V}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-onion ${y.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"onionChart",ref:b,id:`vue-ui-onion_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:r[4]||(r[4]=()=>e.unref(U)(!0)),onMouseleave:r[5]||(r[5]=()=>e.unref(U)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne.PenAndPaper,{key:0,svgRef:e.unref(X),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:T.value,onClose:V},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:L,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:E,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock($e._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"onion-div-title",...t.value.style.chart.title},subtitle:{cy:"onion-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value&&(e.unref(Y)||e.unref(P))?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:ce,key:`user_options${I.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(j),isPrinting:e.unref(H),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:y.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:T.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(W),onGenerateCsv:Z,onGenerateImage:e.unref(J),onToggleTable:te,onToggleTooltip:le,onToggleAnnotator:V,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:o})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:o})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:o})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:o})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:X,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Oe._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ee)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<=0?1e-4:a.radius,stroke:t.value.style.chart.layout.gutter.color,"stroke-width":g.value.gutter,fill:"none","stroke-dasharray":a.path.bgDashArray,"stroke-dashoffset":a.path.fullOffset,"stroke-linecap":"round",class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o}),style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,Re))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<0?1e-4:a.radius,stroke:`${a.color}`,"stroke-width":g.value.track,fill:"none","stroke-dasharray":a.path.dashArray,"stroke-dashoffset":a.path.dashOffset,class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o}),"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,Me))),256)),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.gradientIntensity},null,8,ze)],8,Le)]),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",{key:1,filter:`url(#blur_${m.value})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<=0?1e-4:a.radius,stroke:"white","stroke-width":g.value.track/3,fill:"none","stroke-linecap":"round","stroke-dasharray":a.path.dashArray,"stroke-dashoffset":a.path.dashOffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,qe))),256))],8,De)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<=0?1e-4:a.radius,stroke:"transparent","stroke-width":Math.max(g.value.track,g.value.gutter),fill:"none","stroke-dasharray":a.path.bgDashArray,"stroke-dashoffset":a.path.fullOffset,"stroke-linecap":"round",class:"vue-ui-onion-path",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"},onMouseenter:c=>ee({datapoint:a,show:!0,seriesIndex:o}),onMouseleave:r[0]||(r[0]=c=>{p.value=void 0,$.value=!1})},null,40,Ue))),256)),t.value.style.chart.layout.labels.show?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",{onMouseenter:c=>ee({datapoint:a,show:!0,seriesIndex:o}),onMouseleave:r[1]||(r[1]=c=>{p.value=void 0,$.value=!1})},[d.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,x:n.value.width/2-g.value.gutter*.8+t.value.style.chart.layout.labels.offsetX,y:a.labelY+t.value.style.chart.layout.labels.offsetY,"text-anchor":"end","font-size":t.value.style.chart.layout.labels.fontSize,fill:t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value===o?a.color:t.value.style.chart.layout.labels.color,"font-weight":t.value.style.chart.layout.labels.bold?"bold":"normal"},e.toDisplayString(a.name?a.name+": ":"")+" "+e.toDisplayString(t.value.style.chart.layout.labels.percentage.show?e.unref(u.dataLabel)({v:a.percentage,s:"%",r:t.value.style.chart.layout.labels.roundingPercentage}):"")+" "+e.toDisplayString(!t.value.style.chart.layout.labels.percentage.show&&t.value.style.chart.layout.labels.value.show?`: ${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,a.value,e.unref(u.dataLabel)({p:a.prefix||"",v:a.value||0,s:a.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:a,seriesIndex:o})}`:`${t.value.style.chart.layout.labels.value.show&&a.value?`(${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,a.value,e.unref(u.dataLabel)({p:a.prefix||"",v:a.value||0,s:a.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:a,seriesIndex:o})})`:""}`),9,Ge))],40,Xe))),256))])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,Ie)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Se.default,{key:6,config:{type:"onion",style:{backgroundColor:t.value.style.chart.backgroundColor,onion:{color:t.value.style.chart.layout.gutter.color}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:R},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(xe.Legend,{key:`legend_${q.value}`,legendSet:i.value,config:me.value,onClickMarker:r[2]||(r[2]=({legend:a})=>Q(a.id))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>a.segregate(),style:e.normalizeStyle(`opacity:${d.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name?a.name+": ":"")+" "+e.toDisplayString((a.percentage||0).toFixed(t.value.style.chart.legend.roundingPercentage))+"% ",13,je)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:i.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:M,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Te._sfc_main,{show:v.value.showTooltip&&$.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:S.value,isFullscreen:y.value,isCustom:e.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),C.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Be.DataTable,{key:`table_${D.value}`,colNames:B.value.colNames,head:B.value.head,body:B.value.body,config:B.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[3]||(r[3]=a=>v.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),td:e.withCtx(({td:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,We)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Fe))}},Ke=Ae._export_sfc(Je,[["__scopeId","data-v-209c752d"]]);exports.default=Ke;
|
|
5
|
+
`.trim()}}const ke=se;function Q(l){d.value.includes(l)?d.value=d.value.filter(r=>r!==l):d.value.push(l),ke("selectLegend",h.value)}function we(){return h.value}const N=e.computed(()=>{const l=[t.value.table.translations.serie,t.value.table.translations.percentage,t.value.table.translations.value],r=h.value.map(a=>[a.name,a.percentage,a.value]);return{head:l,body:r}}),B=e.computed(()=>{const l=N.value.head,r=h.value.map(o=>[`<span style="color:${o.color}">⬤</span> ${o.name}`,`${Number(o.percentage??0).toFixed(t.value.table.td.roundingPercentage).toLocaleString()}%`,`${o.prefix||""}${[null,void 0,NaN,"NaN"].includes(o.value)?"-":o.value.toFixed(t.value.table.td.roundingValue).toLocaleString()}${o.suffix||""}`]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:r,config:a,colNames:l}});function Z(){e.nextTick(()=>{const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],r=N.value.head,a=N.value.body,o=l.concat([r]).concat(a),c=u.createCsvContent(o);u.downloadCsv({csvContent:c,title:t.value.style.chart.title.text||"vue-ui-onion"})})}const p=e.ref(void 0),y=e.ref(!1);function Ce(l){y.value=l,I.value+=1}const _=e.ref(null);function ee({datapoint:l,seriesIndex:r,show:a=!0}){const o=l.absoluteIndex;p.value=r,_.value={datapoint:l,seriesIndex:o,series:i.value,config:t.value},$.value=a;let c="";const w=t.value.style.chart.tooltip.customFormat;if(u.isFunction(w)&&u.functionReturnsString(()=>w({seriesIndex:o,datapoint:l,series:i.value,config:t.value})))S.value=w({seriesIndex:o,datapoint:l,series:i.value,config:t.value});else{const A=t.value.style.chart.tooltip.showPercentage,F=t.value.style.chart.tooltip.showValue;c+=`<div style="width: 100%; border-bottom: 1px solid ${t.value.style.chart.tooltip.borderColor}; padding-bottom: 6px;margin-bottom:3px;display:flex;flex-direction:row;gap:3px;align-items:center"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg><span></span>${l.name}</span></div>`,c+=`<div style="width:100%;text-align:left;"><b>${A?u.dataLabel({p:"",v:l.percentage,s:"%",r:t.value.style.chart.tooltip.roundingPercentage}):""}</b> ${A&&F?"(":""}${F?u.applyDataLabel(t.value.style.chart.layout.labels.value.formatter,l.value,u.dataLabel({p:l.prefix||"",v:l.value,s:l.suffix||"",r:t.value.style.chart.tooltip.roundingValue}),{datapoint:l,seriesIndex:r}):""}${A&&F?")":""}</div>`,S.value=`<div>${c}</div>`}}function te(){v.value.showTable=!v.value.showTable}function le(){v.value.showTooltip=!v.value.showTooltip}const T=e.ref(!1);function V(){T.value=!T.value}return ue({getData:we,generatePdf:W,generateCsv:Z,generateImage:J,toggleTable:te,toggleTooltip:le,toggleAnnotator:V}),(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-onion ${y.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"onionChart",ref:b,id:`vue-ui-onion_${m.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; ${t.value.responsive?"height: 100%;":""} text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:r[4]||(r[4]=()=>e.unref(U)(!0)),onMouseleave:r[5]||(r[5]=()=>e.unref(U)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ne.PenAndPaper,{key:0,svgRef:e.unref(X),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:T.value,onClose:V},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),de.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:L,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:E,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock($e._sfc_main,{key:`title_${z.value}`,config:{title:{cy:"onion-div-title",...t.value.style.chart.title},subtitle:{cy:"onion-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&C.value&&(e.unref(Y)||e.unref(P))?(e.openBlock(),e.createBlock(oe.UserOptions,{ref_key:"details",ref:ce,key:`user_options${I.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(j),isPrinting:e.unref(H),uid:m.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:y.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:b.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:T.value,onToggleFullscreen:Ce,onGeneratePdf:e.unref(W),onGenerateCsv:Z,onGenerateImage:e.unref(J),onToggleTable:te,onToggleTooltip:le,onToggleAnnotator:V,style:e.normalizeStyle({visibility:e.unref(Y)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:o})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:o})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:o})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:o})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:o})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:o})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),C.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:X,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":y.value,"vue-data-ui-fulscreen--off":!y.value}),viewBox:`0 0 ${n.value.width<=0?10:n.value.width} ${n.value.height<=0?10:n.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Oe._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:n.value.width<=0?10:n.value.width,height:n.value.height<=0?10:n.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ee)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<=0?1e-4:a.radius,stroke:t.value.style.chart.layout.gutter.color,"stroke-width":g.value.gutter,fill:"none","stroke-dasharray":a.path.bgDashArray,"stroke-dashoffset":a.path.fullOffset,"stroke-linecap":"round",class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o}),style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,Re))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<0?1e-4:a.radius,stroke:`${a.color}`,"stroke-width":g.value.track,fill:"none","stroke-dasharray":a.path.dashArray,"stroke-dashoffset":a.path.dashOffset,class:e.normalizeClass({"vue-ui-onion-path":!0,"vue-ui-onion-blur":t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value!==o}),"stroke-linecap":"round",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,10,Me))),256)),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${m.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.gradientIntensity},null,8,ze)],8,Le)]),t.value.style.chart.useGradient?(e.openBlock(),e.createElementBlock("g",{key:1,filter:`url(#blur_${m.value})`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<=0?1e-4:a.radius,stroke:"white","stroke-width":g.value.track/3,fill:"none","stroke-linecap":"round","stroke-dasharray":a.path.dashArray,"stroke-dashoffset":a.path.dashOffset,style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"}},null,8,qe))),256))],8,De)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("circle",{cx:s.value.centerX,cy:s.value.centerY,r:a.radius<=0?1e-4:a.radius,stroke:"transparent","stroke-width":Math.max(g.value.track,g.value.gutter),fill:"none","stroke-dasharray":a.path.bgDashArray,"stroke-dashoffset":a.path.fullOffset,"stroke-linecap":"round",class:"vue-ui-onion-path",style:{transform:"rotate(-90deg)","transform-origin":"50% 50%"},onMouseenter:c=>ee({datapoint:a,show:!0,seriesIndex:o}),onMouseleave:r[0]||(r[0]=c=>{p.value=void 0,$.value=!1})},null,40,Ue))),256)),t.value.style.chart.layout.labels.show?(e.openBlock(),e.createElementBlock("g",Ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(a,o)=>(e.openBlock(),e.createElementBlock("g",{onMouseenter:c=>ee({datapoint:a,show:!0,seriesIndex:o}),onMouseleave:r[1]||(r[1]=c=>{p.value=void 0,$.value=!1})},[d.value.includes(a.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("text",{key:0,x:n.value.width/2-g.value.gutter*.8+t.value.style.chart.layout.labels.offsetX,y:a.labelY+t.value.style.chart.layout.labels.offsetY,"text-anchor":"end","font-size":t.value.style.chart.layout.labels.fontSize,fill:t.value.useBlurOnHover&&![null,void 0].includes(p.value)&&p.value===o?a.color:t.value.style.chart.layout.labels.color,"font-weight":t.value.style.chart.layout.labels.bold?"bold":"normal"},e.toDisplayString(a.name?a.name+": ":"")+" "+e.toDisplayString(t.value.style.chart.layout.labels.percentage.show?e.unref(u.dataLabel)({v:a.percentage,s:"%",r:t.value.style.chart.layout.labels.roundingPercentage}):"")+" "+e.toDisplayString(!t.value.style.chart.layout.labels.percentage.show&&t.value.style.chart.layout.labels.value.show?`: ${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,a.value,e.unref(u.dataLabel)({p:a.prefix||"",v:a.value||0,s:a.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:a,seriesIndex:o})}`:`${t.value.style.chart.layout.labels.value.show&&a.value?`(${e.unref(u.applyDataLabel)(t.value.style.chart.layout.labels.value.formatter,a.value,e.unref(u.dataLabel)({p:a.prefix||"",v:a.value||0,s:a.suffix||"",r:t.value.style.chart.layout.labels.roundingValue}),{datapoint:a,seriesIndex:o})})`:""}`),9,Ge))],40,Xe))),256))])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:n.value},void 0,!0)],14,Ie)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",He,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(H)||e.unref(j)})),void 0,!0)])):e.createCommentVNode("",!0),C.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Se.default,{key:6,config:{type:"onion",style:{backgroundColor:t.value.style.chart.backgroundColor,onion:{color:t.value.style.chart.layout.gutter.color}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:R},[t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(xe.Legend,{key:`legend_${q.value}`,legendSet:i.value,config:me.value,onClickMarker:r[2]||(r[2]=({legend:a})=>Q(a.id))},{item:e.withCtx(({legend:a})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:o=>a.segregate(),style:e.normalizeStyle(`opacity:${d.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name?a.name+": ":"")+" "+e.toDisplayString((a.percentage||0).toFixed(t.value.style.chart.legend.roundingPercentage))+"% ",13,je)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:i.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:M,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Te._sfc_main,{show:v.value.showTooltip&&$.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,fontSize:t.value.style.chart.tooltip.fontSize,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:b.value,content:S.value,isFullscreen:y.value,isCustom:e.unref(u.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),C.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Be.DataTable,{key:`table_${D.value}`,colNames:B.value.colNames,head:B.value.head,body:B.value.body,config:B.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:r[3]||(r[3]=a=>v.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),td:e.withCtx(({td:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,We)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Fe))}},Ke=Ae._export_sfc(Je,[["__scopeId","data-v-c097b7d4"]]);exports.default=Ke;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-Zf2fUMIO.cjs"),ce=require("./useResponsive-N8jl0-aC.cjs"),Se=require("./Title-BuZQSd23.cjs"),ze=require("./Legend-CHEbsxt2.cjs"),Ne=require("./Tooltip-BiBcMMP3.cjs"),Ae=require("./Shape-_vXgfvZP.cjs"),de=require("./usePrinter-BGPa8G48.cjs"),Te=require("./DataTable-DLUrhKkw.cjs"),Pe=require("./vue-ui-accordion-CnGQYWdI.cjs"),Fe=require("./vue-ui-skeleton-CiGqKHDK.cjs"),ve=require("./useNestedProp-BcSwG6N0.cjs"),Me=require("./PackageVersion-B6sWtTA0.cjs"),_e=require("./PenAndPaper-DO7-xSYx.cjs"),Ie=require("./useUserOptionState-BgepsfED.cjs"),Ee=require("./useChartAccessibility-Cm7nkzTG.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=["id"],Oe=["xmlns","viewBox"],De=["x","y","width","height"],qe={style:{"pointer-events":"none"}},Re=["x1","x2","y1","y2","stroke","stroke-width"],Ue=["x","y","fill","font-size","font-weight"],We=["x1","x2","y1","y2","stroke","stroke-width"],je=["x","y","fill","font-size","font-weight"],He={key:0},Ge=["x","y","font-size","fill"],Ye=["width","x","y"],Xe={style:{width:"100%"}},Je=["x","y","fill","font-weight","font-size","onMouseenter"],Ke=["d","stroke","stroke-width","onMouseenter"],Qe=["d","onMouseenter"],Ze={key:5,class:"vue-data-ui-watermark"},et=["onClick"],tt=["innerHTML"],lt={__name:"vue-ui-parallel-coordinate-plot",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(pe,{expose:he,emit:me}){const{vue_ui_parallel_coordinate_plot:ye}=i.useConfig(),b=pe,x=e.computed({get(){return!!b.dataset&&b.dataset.length},set(l){return l}}),L=e.ref(0),$=e.ref(null),V=e.ref(null),O=e.ref(null),D=e.ref(null),q=e.ref(null),R=e.ref(0),U=e.ref(0),W=e.ref(0),T=e.ref(i.createUid()),C=e.ref(!1);function fe(l){C.value=l,L.value+=1}const t=e.computed({get:()=>Y(),set:l=>l}),{userOptionsVisible:P,setUserOptionsVisibility:j,keepUserOptionState:H}=Ie.useUserOptionState({config:t.value}),{svgRef:G}=Ee.useChartAccessibility({config:t.value.style.chart.title});function Y(){const l=ve.useNestedProp({userConfig:b.config,defaultConfig:ye});return l.theme?{...ve.useNestedProp({userConfig:i.themes.vue_ui_parallel_coordinate_plot[l.theme]||b.config,defaultConfig:l}),customPalette:i.themePalettes[l.theme]||i.palette}:l}e.watch(()=>b.config,l=>{t.value=Y(),P.value=!t.value.userOptions.showOnChartHover,X(),R.value+=1,W.value+=1,U.value+=1,v.value.dataLabels.show=t.value.style.chart.yAxis.labels.datapoints.show,v.value.showTable=t.value.table.show,v.value.showTooltip=t.value.style.chart.tooltip.show},{deep:!0});const S=e.ref(null);e.onMounted(()=>{X()});function X(){if(i.objectIsEmpty(b.dataset)?i.error({componentName:"VueUiParallelCoordinatePlot",type:"dataset"}):b.dataset.forEach((l,o)=>{i.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","series"]}).forEach(a=>{x.value=!1,i.error({componentName:"VueUiParallelCoordinatePlot",type:"datasetSerieAttribute",property:a,index:o})})}),t.value.responsive){const l=ce.throttle(()=>{const{width:o,height:a}=ce.useResponsive({chart:$.value,title:t.value.style.chart.title.text?V.value:null,legend:t.value.style.chart.legend.show?O.value:null,source:D.value,noTitle:q.value});requestAnimationFrame(()=>{d.value.width=o,d.value.height=a,d.value.plotSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.plots.radius,threshold:2,fallback:2}),d.value.ticksFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.ticks.fontSize,threshold:10,fallback:10}),d.value.datapointFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.datapoints.fontSize,threshold:10,fallback:10}),d.value.axisNameFontSize=i.translateSize({relator:Math.min(o,a),adjuster:600,source:t.value.style.chart.yAxis.labels.axisNamesFontSize,threshold:12,fallback:12})})});S.value=new ResizeObserver(l),S.value.observe($.value.parentNode)}}e.onBeforeUnmount(()=>{S.value&&S.value.disconnect()});const{isPrinting:J,isImaging:K,generatePdf:Q,generateImage:Z}=de.usePrinter({elementId:`pcp_${T.value}`,fileName:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot",options:t.value.userOptions.print}),ge=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),d=e.ref({height:t.value.style.chart.height,width:t.value.style.chart.width,plotSize:t.value.style.chart.plots.radius,ticksFontSize:t.value.style.chart.yAxis.labels.ticks.fontSize,datapointFontSize:t.value.style.chart.yAxis.labels.datapoints.fontSize,axisNameFontSize:t.value.style.chart.yAxis.labels.axisNamesFontSize}),c=e.computed(()=>{const{top:l,right:o,bottom:a,left:n}=t.value.style.chart.padding,r=d.value.height,s=d.value.width;return{chartHeight:r,chartWidth:s,height:r-l-a,width:s-n-o,top:l,left:n,right:s-o,bottom:r-a}}),be=e.computed(()=>i.convertCustomPalette(t.value.customPalette)),v=e.ref({dataLabels:{show:t.value.style.chart.yAxis.labels.datapoints.show},showTable:t.value.table.show,showTooltip:t.value.style.chart.tooltip.show}),f=e.ref([]);function ee(l){f.value.includes(l)?f.value=f.value.filter(o=>o!==l):f.value.push(l)}const k=e.computed(()=>b.dataset.map((l,o)=>{const a=i.convertColorToHex(l.color)||be.value[o]||i.palette[o]||i.palette[o%i.palette.length];return{...l,series:l.series.map(n=>({...n,id:i.createUid(),color:a})),seriesIndex:o,color:a,id:i.createUid(),shape:l.shape||"circle"}})),ke=e.computed(()=>k.value.map(l=>({...l,opacity:f.value.includes(l.id)?.5:1,segregate:()=>ee(l.id),isSegregated:f.value.includes(l.id)}))),xe=e.computed(()=>({cy:"pcp-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),te=e.computed(()=>Math.max(...k.value.filter(l=>!f.value.includes(l.id)).map(l=>Math.max(...l.series.flatMap(o=>o.values.length))))),y=e.computed(()=>c.value.width/te.value),F=e.computed(()=>k.value.filter(l=>!f.value.includes(l.id))),m=e.computed(()=>{let l=[];for(let o=0;o<te.value;o+=1){const a=Math.min(...F.value.flatMap(p=>p.series.map(A=>A.values[o]||0)||0)),n=Math.max(...F.value.flatMap(p=>p.series.map(A=>A.values[o]||0)||0)),r=n===a?a/4:a,s=n===a?n*2:n,u=i.calculateNiceScale(r,s,t.value.style.chart.yAxis.scaleTicks),g=u.ticks.map((p,A)=>{const Be=u.min<0?p+Math.abs(u.min):p-Math.abs(u.min),$e=u.min<0?u.max+Math.abs(u.min):u.max-Math.abs(u.min);return{y:c.value.bottom-c.value.height*(Be/$e),x:c.value.left+y.value*o+y.value/2,value:p}});l.push({scale:u,ticks:g,name:t.value.style.chart.yAxis.labels.axisNames[o]||`Y-${o+1}`})}return l}),M=e.computed(()=>F.value.map((l,o)=>({...l,series:l.series.map((a,n)=>({...a,datapoints:a.values.map((r,s)=>{const u=m.value[s].scale.min<0?(r||0)+Math.abs(m.value[s].scale.min):(r||0)-Math.abs(m.value[s].scale.min),g=m.value[s].scale.min<0?m.value[s].scale.max+Math.abs(m.value[s].scale.min):m.value[s].scale.max-Math.abs(m.value[s].scale.min);return{name:a.name,seriesName:l.name,axisIndex:s,datapointIndex:n,seriesIndex:o,value:r||0,x:c.value.left+y.value*s+y.value/2,y:c.value.bottom-c.value.height*(u/g),comment:a.comments&&a.comments[s]||""}})}))})).map(l=>({...l,series:l.series.map(o=>{const a=i.createStraightPath(o.datapoints),n=i.createSmoothPath(o.datapoints),r=i.getPathLengthFromCoordinates(t.value.style.chart.lines.smooth?`M ${n}`:`M ${a}`);return{...o,smoothPath:n,straightPath:a,pathLength:r}})})));function le({value:l,index:o,datapoint:a}){return i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[o]||null,l,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[o]||"",v:l,s:t.value.style.chart.yAxis.labels.suffixes[o]||"",r:t.value.style.chart.yAxis.labels.roundings[o]||0}),{datapoint:a,seriesIndex:o})}const h=e.ref(null),_=e.ref(null),w=e.ref(!1),I=e.ref("");function z({shape:l,serieName:o,serie:a,relativeIndex:n,seriesIndex:r}){_.value={serie:a,relativeIndex:n,seriesIndex:r,series:k.value,scales:m.value},w.value=!0,h.value=a.id;let s="";const u=t.value.style.chart.tooltip.customFormat;i.isFunction(u)&&i.functionReturnsString(()=>u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:m.value}))?I.value=u({serie:a,seriesIndex:a.seriesIndex,series:k.value,config:t.value,scales:m.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o?o+" - ":""}${a.name}</div>`,m.value.map(g=>g.name).forEach((g,p)=>{s+=`
|
|
2
2
|
<div class="vue-ui-tooltip-item" style="text-align:left">
|
|
3
3
|
<span>${g}: </span>
|
|
4
4
|
<span>
|
|
5
5
|
${i.applyDataLabel(t.value.style.chart.yAxis.labels.formatters[p]||null,a.datapoints[p].value,i.dataLabel({p:t.value.style.chart.yAxis.labels.prefixes[p]||"",v:a.datapoints[p].value,s:t.value.style.chart.yAxis.labels.suffixes[p]||"",r:t.value.style.chart.yAxis.labels.roundings[p]||""}),{datapoint:a.datapoints[p],seriesIndex:p})}
|
|
6
6
|
</span>
|
|
7
7
|
</div>
|
|
8
|
-
`,t.value.style.chart.comments.showInTooltip&&a.datapoints[p].comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${a.color}">${a.datapoints[p].comment}</div>`)}),I.value=`<div>${s}</div>`)}function Ce(){return k.value}const B=e.computed(()=>{const l=[t.value.table.columnNames.series].concat([t.value.table.columnNames.item]).concat(m.value.map(r=>r.name)),o=M.value.flatMap((r,s)=>r.series.map(u=>[r.name].concat([u.name]).concat(u.values))),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},n=[t.value.table.columnNames.series].concat([t.value.table.columnNames.item]).concat(m.value.map(r=>r.name));return{body:o,head:l,config:a,colNames:n}}),ae=e.computed(()=>M.value.length===0?{head:[],body:[],config:{},columnNames:[]}:{head:B.value.head,body:B.value.body});function oe(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=ae.value.head,a=ae.value.body,n=l.concat([o]).concat(a),r=i.createCsvContent(n);i.downloadCsv({csvContent:r,title:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"})}const ne=me;function we(l){ne("selectDatapoint",l)}function se(l){ne("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function re(){v.value.showTable=!v.value.showTable}function ie(){v.value.dataLabels.show=!v.value.dataLabels.show}function ue(){v.value.showTooltip=!v.value.showTooltip}const N=e.ref(!1);function E(){N.value=!N.value}return he({getData:Ce,generateCsv:oe,generatePdf:Q,generateImage:Z,toggleTable:re,toggleLabels:ie,toggleTooltip:ue,toggleAnnotator:E}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"pcpChart",ref:$,class:e.normalizeClass(`vue-ui-pcp ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`pcp_${T.value}`,onMouseenter:o[6]||(o[6]=()=>e.unref(j)(!0)),onMouseleave:o[7]||(o[7]=()=>e.unref(j)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,svgRef:e.unref(G),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:N.value,onClose:E},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:V,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${R.value}`,config:{title:{cy:"pcp-div-title",...t.value.style.chart.title},subtitle:{cy:"pcp-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value&&(e.unref(H)||e.unref(P))?(e.openBlock(),e.createBlock(de.UserOptions,{ref:"details",key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(J),isImaging:e.unref(K),uid:T.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:C.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:N.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(Q),onGenerateCsv:oe,onGenerateImage:e.unref(Z),onToggleTable:re,onToggleLabels:ie,onToggleTooltip:ue,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:G,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${c.value.chartWidth<=0?10:c.value.chartWidth} ${c.value.chartHeight<=0?10:c.value.chartHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Me._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:c.value.left,y:c.value.top,width:c.value.width,height:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,De)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(a,n)=>(e.openBlock(),e.createElementBlock("g",qe,[e.createElementVNode("line",{x1:c.value.left+y.value*n+y.value/2,x2:c.value.left+y.value*n+y.value/2,y1:c.value.top,y2:c.value.bottom,stroke:t.value.style.chart.yAxis.stroke,"stroke-width":t.value.style.chart.yAxis.strokeWidth},null,8,Re),e.createElementVNode("text",{x:c.value.left+y.value*n+y.value/2,y:c.value.top-24,fill:t.value.style.chart.yAxis.labels.axisNamesColor,"font-size":d.value.axisNameFontSize,"font-weight":t.value.style.chart.yAxis.labels.axisNamesBold?"bold":"","text-anchor":"middle"},e.toDisplayString(a.name),9,Ue),t.value.style.chart.yAxis.labels.ticks.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.ticks,r=>(e.openBlock(),e.createElementBlock("line",{x1:r.x,x2:r.x-10,y1:r.y,y2:r.y,stroke:t.value.style.chart.yAxis.stroke,"stroke-width":t.value.style.chart.yAxis.strokeWidth,style:e.normalizeStyle(`opacity:${h.value&&!v.value.showTooltip?.2:1}`)},null,12,We))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.ticks,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x-12+t.value.style.chart.yAxis.labels.ticks.offsetX,y:r.y+t.value.style.chart.yAxis.labels.ticks.offsetY+d.value.ticksFontSize/3,fill:t.value.style.chart.yAxis.labels.ticks.color,"text-anchor":"end","font-size":d.value.ticksFontSize,"font-weight":t.value.style.chart.yAxis.labels.ticks.bold?"bold":"normal",style:e.normalizeStyle(`opacity:${h.value&&!v.value.showTooltip?.2:1}`)},e.toDisplayString(le({value:r.value,index:n,datapoint:r})),13,je))),256))],64)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,a=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.series,(n,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.plots.show?(e.openBlock(),e.createElementBlock("g",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.datapoints,s=>(e.openBlock(),e.createBlock(Ae._sfc_main,{plot:{x:s.x,y:s.y},color:a.color,shape:a.shape,radius:a.shape==="triangle"?d.value.plotSize*1.2:d.value.plotSize,stroke:t.value.style.chart.backgroundColor,strokeWidth:.5,onMouseenter:u=>z({shape:a.shape,serieName:a.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[0]||(o[0]=u=>{h.value=null,w.value=!1}),style:e.normalizeStyle(`opacity:${h.value?h.value===n.id?t.value.style.chart.plots.opacity:.2:t.value.style.chart.plots.opacity}`),onClick:()=>we(s)},null,8,["plot","color","shape","radius","stroke","onMouseenter","style","onClick"]))),256)),v.value.showTooltip?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[h.value&&h.value===n.id&&n.datapoints.length?(e.openBlock(),e.createElementBlock("text",{key:0,x:n.datapoints[0].x-d.value.ticksFontSize,y:n.datapoints[0].y+d.value.ticksFontSize/3,"text-anchor":"end","font-size":d.value.ticksFontSize,fill:a.color,"font-weight":"bold"},e.toDisplayString(n.name),9,Ge)):e.createCommentVNode("",!0)],64)),t.value.style.chart.comments.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.datapoints,s=>(e.openBlock(),e.createElementBlock("g",null,[s.comment?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,style:{overflow:"visible"},height:"12",width:t.value.style.chart.comments.width,x:s.x-t.value.style.chart.comments.width/2+t.value.style.chart.comments.offsetX,y:s.y+t.value.style.chart.comments.offsetY+6},[e.createElementVNode("div",Xe,[e.renderSlot(l.$slots,"plot-comment",{plot:{...s,color:a.color}},void 0,!0)])],8,Ye)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),v.value.dataLabels.show||h.value&&h.value===n.id?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.datapoints,(s,u)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+12+t.value.style.chart.yAxis.labels.datapoints.offsetX,y:s.y+t.value.style.chart.yAxis.labels.datapoints.offsetY+d.value.datapointFontSize/3,fill:t.value.style.chart.yAxis.labels.datapoints.useSerieColor?a.color:t.value.style.chart.yAxis.labels.datapoints.color,"text-anchor":"start","font-weight":t.value.style.chart.yAxis.labels.datapoints.bold?"bold":"normal",class:e.normalizeClass({"vue-ui-pcp-animated":!1,"vue-ui-pcp-transition":!0}),"font-size":d.value.datapointFontSize,onMouseenter:g=>z({shape:a.shape,serieName:a.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[1]||(o[1]=g=>{h.value=null,w.value=!1}),style:e.normalizeStyle(`opacity:${h.value?h.value===n.id?1:.2:1}`)},e.toDisplayString(le({value:s.value,index:u,datapoint:s})),45,Je))),256)):e.createCommentVNode("",!0),e.createElementVNode("path",{d:`M${t.value.style.chart.lines.smooth?n.smoothPath:n.straightPath}`,stroke:a.color,"stroke-width":t.value.style.chart.lines.strokeWidth,fill:"none",class:e.normalizeClass({"vue-ui-pcp-animated vue-data-ui-line-animated":t.value.useCssAnimation,"vue-ui-pcp-transition":!0}),onMouseenter:s=>z({shape:a.shape,serieName:a.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[2]||(o[2]=s=>{h.value=null,w.value=!1}),style:e.normalizeStyle(`opacity:${h.value?h.value===n.id?t.value.style.chart.lines.opacity:.2:t.value.style.chart.lines.opacity}; stroke-dasharray:${n.pathLength}; stroke-dashoffset: ${t.value.useCssAnimation?n.pathLength:0}`)},null,46,Ke),v.value.showTooltip?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M${t.value.style.chart.lines.smooth?n.smoothPath:n.straightPath}`,stroke:"transparent","stroke-width":12,fill:"none",class:e.normalizeClass({"vue-ui-pcp-animated vue-data-ui-line-animated":t.value.useCssAnimation,"vue-ui-pcp-transition":!0}),onMouseenter:s=>z({shape:a.shape,serieName:a.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[3]||(o[3]=s=>{h.value=null,w.value=!1}),style:{opacity:"0"}},null,42,Qe)):e.createCommentVNode("",!0)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ze,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Fe.default,{key:6,config:{type:"parallelCoordinatePlot",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show&&x.value?(e.openBlock(),e.createBlock(ze.Legend,{key:`legend_${U.value}`,legendSet:ke.value,config:xe.value,onClickMarker:o[4]||(o[4]=({legend:a})=>{ee(a.id),se(a)})},{item:e.withCtx(({legend:a,index:n})=>[e.createElementVNode("div",{onClick:r=>{a.segregate(),se(a)},style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,et)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ne._sfc_main,{show:v.value.showTooltip&&w.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:$.value,content:I.value,isFullscreen:C.value,isCustom:e.unref(i.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),x.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Te.DataTable,{key:`table_${W.value}`,colNames:B.value.colNames,head:B.value.head,body:B.value.body,config:B.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[5]||(o[5]=a=>v.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,tt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ve))}},at=Le._export_sfc(lt,[["__scopeId","data-v-e18960e9"]]);exports.default=at;
|
|
8
|
+
`,t.value.style.chart.comments.showInTooltip&&a.datapoints[p].comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${a.color}20; padding: 6px; margin-bottom: 6px; border-left: 1px solid ${a.color}">${a.datapoints[p].comment}</div>`)}),I.value=`<div>${s}</div>`)}function Ce(){return k.value}const B=e.computed(()=>{const l=[t.value.table.columnNames.series].concat([t.value.table.columnNames.item]).concat(m.value.map(r=>r.name)),o=M.value.flatMap((r,s)=>r.series.map(u=>[r.name].concat([u.name]).concat(u.values))),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},n=[t.value.table.columnNames.series].concat([t.value.table.columnNames.item]).concat(m.value.map(r=>r.name));return{body:o,head:l,config:a,colNames:n}}),ae=e.computed(()=>M.value.length===0?{head:[],body:[],config:{},columnNames:[]}:{head:B.value.head,body:B.value.body});function oe(){const l=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[""]],o=ae.value.head,a=ae.value.body,n=l.concat([o]).concat(a),r=i.createCsvContent(n);i.downloadCsv({csvContent:r,title:t.value.style.chart.title.text||"vue-ui-parallel-coordinate-plot"})}const ne=me;function we(l){ne("selectDatapoint",l)}function se(l){ne("selectLegend",{...l,isSegregated:!l.isSegregated,opacity:l.isSegregated?1:.5})}function re(){v.value.showTable=!v.value.showTable}function ie(){v.value.dataLabels.show=!v.value.dataLabels.show}function ue(){v.value.showTooltip=!v.value.showTooltip}const N=e.ref(!1);function E(){N.value=!N.value}return he({getData:Ce,generateCsv:oe,generatePdf:Q,generateImage:Z,toggleTable:re,toggleLabels:ie,toggleTooltip:ue,toggleAnnotator:E}),(l,o)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"pcpChart",ref:$,class:e.normalizeClass(`vue-ui-pcp ${C.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor};${t.value.responsive?"height:100%":""}`),id:`pcp_${T.value}`,onMouseenter:o[6]||(o[6]=()=>e.unref(j)(!0)),onMouseleave:o[7]||(o[7]=()=>e.unref(j)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(_e.PenAndPaper,{key:0,svgRef:e.unref(G),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:N.value,onClose:E},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:q,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:V,style:"width:100%;background:transparent;padding-bottom:24px"},[(e.openBlock(),e.createBlock(Se._sfc_main,{key:`title_${R.value}`,config:{title:{cy:"pcp-div-title",...t.value.style.chart.title},subtitle:{cy:"pcp-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&x.value&&(e.unref(H)||e.unref(P))?(e.openBlock(),e.createBlock(de.UserOptions,{ref:"details",key:`user_options_${L.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(J),isImaging:e.unref(K),uid:T.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasLabel:t.value.userOptions.buttons.labels,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:C.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:$.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:N.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(Q),onGenerateCsv:oe,onGenerateImage:e.unref(Z),onToggleTable:re,onToggleLabels:ie,onToggleTooltip:ue,onToggleAnnotator:E,style:e.normalizeStyle({visibility:e.unref(H)?e.unref(P)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:a,color:n})=>[e.renderSlot(l.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:a,color:n})),void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:a,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:a,isFullscreen:n})),void 0,!0)]),key:"6"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:a,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:a,isAnnotator:n})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasLabel","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),x.value?(e.openBlock(),e.createElementBlock("svg",{key:4,ref_key:"svgRef",ref:G,xmlns:e.unref(i.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":C.value,"vue-data-ui-fulscreen--off":!C.value}),viewBox:`0 0 ${c.value.chartWidth<=0?10:c.value.chartWidth} ${c.value.chartHeight<=0?10:c.value.chartHeight}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(Me._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:c.value.left,y:c.value.top,width:c.value.width,height:c.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,De)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(a,n)=>(e.openBlock(),e.createElementBlock("g",qe,[e.createElementVNode("line",{x1:c.value.left+y.value*n+y.value/2,x2:c.value.left+y.value*n+y.value/2,y1:c.value.top,y2:c.value.bottom,stroke:t.value.style.chart.yAxis.stroke,"stroke-width":t.value.style.chart.yAxis.strokeWidth},null,8,Re),e.createElementVNode("text",{x:c.value.left+y.value*n+y.value/2,y:c.value.top-24,fill:t.value.style.chart.yAxis.labels.axisNamesColor,"font-size":d.value.axisNameFontSize,"font-weight":t.value.style.chart.yAxis.labels.axisNamesBold?"bold":"","text-anchor":"middle"},e.toDisplayString(a.name),9,Ue),t.value.style.chart.yAxis.labels.ticks.show?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.ticks,r=>(e.openBlock(),e.createElementBlock("line",{x1:r.x,x2:r.x-10,y1:r.y,y2:r.y,stroke:t.value.style.chart.yAxis.stroke,"stroke-width":t.value.style.chart.yAxis.strokeWidth,style:e.normalizeStyle(`opacity:${h.value&&!v.value.showTooltip?.2:1}`)},null,12,We))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.ticks,r=>(e.openBlock(),e.createElementBlock("text",{x:r.x-12+t.value.style.chart.yAxis.labels.ticks.offsetX,y:r.y+t.value.style.chart.yAxis.labels.ticks.offsetY+d.value.ticksFontSize/3,fill:t.value.style.chart.yAxis.labels.ticks.color,"text-anchor":"end","font-size":d.value.ticksFontSize,"font-weight":t.value.style.chart.yAxis.labels.ticks.bold?"bold":"normal",style:e.normalizeStyle(`opacity:${h.value&&!v.value.showTooltip?.2:1}`)},e.toDisplayString(le({value:r.value,index:n,datapoint:r})),13,je))),256))],64)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,a=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.series,(n,r)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.chart.plots.show?(e.openBlock(),e.createElementBlock("g",He,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.datapoints,s=>(e.openBlock(),e.createBlock(Ae._sfc_main,{plot:{x:s.x,y:s.y},color:a.color,shape:a.shape,radius:a.shape==="triangle"?d.value.plotSize*1.2:d.value.plotSize,stroke:t.value.style.chart.backgroundColor,strokeWidth:.5,onMouseenter:u=>z({shape:a.shape,serieName:a.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[0]||(o[0]=u=>{h.value=null,w.value=!1}),style:e.normalizeStyle(`opacity:${h.value?h.value===n.id?t.value.style.chart.plots.opacity:.2:t.value.style.chart.plots.opacity}`),onClick:()=>we(s)},null,8,["plot","color","shape","radius","stroke","onMouseenter","style","onClick"]))),256)),v.value.showTooltip?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[h.value&&h.value===n.id&&n.datapoints.length?(e.openBlock(),e.createElementBlock("text",{key:0,x:n.datapoints[0].x-d.value.ticksFontSize,y:n.datapoints[0].y+d.value.ticksFontSize/3,"text-anchor":"end","font-size":d.value.ticksFontSize,fill:a.color,"font-weight":"bold"},e.toDisplayString(n.name),9,Ge)):e.createCommentVNode("",!0)],64)),t.value.style.chart.comments.show?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.datapoints,s=>(e.openBlock(),e.createElementBlock("g",null,[s.comment?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,style:{overflow:"visible"},height:"12",width:t.value.style.chart.comments.width,x:s.x-t.value.style.chart.comments.width/2+t.value.style.chart.comments.offsetX,y:s.y+t.value.style.chart.comments.offsetY+6},[e.createElementVNode("div",Xe,[e.renderSlot(l.$slots,"plot-comment",{plot:{...s,color:a.color}},void 0,!0)])],8,Ye)):e.createCommentVNode("",!0)]))),256)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),v.value.dataLabels.show||h.value&&h.value===n.id?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(n.datapoints,(s,u)=>(e.openBlock(),e.createElementBlock("text",{x:s.x+12+t.value.style.chart.yAxis.labels.datapoints.offsetX,y:s.y+t.value.style.chart.yAxis.labels.datapoints.offsetY+d.value.datapointFontSize/3,fill:t.value.style.chart.yAxis.labels.datapoints.useSerieColor?a.color:t.value.style.chart.yAxis.labels.datapoints.color,"text-anchor":"start","font-weight":t.value.style.chart.yAxis.labels.datapoints.bold?"bold":"normal",class:e.normalizeClass({"vue-ui-pcp-animated":!1,"vue-ui-pcp-transition":!0}),"font-size":d.value.datapointFontSize,onMouseenter:g=>z({shape:a.shape,serieName:a.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[1]||(o[1]=g=>{h.value=null,w.value=!1}),style:e.normalizeStyle(`opacity:${h.value?h.value===n.id?1:.2:1}`)},e.toDisplayString(le({value:s.value,index:u,datapoint:s})),45,Je))),256)):e.createCommentVNode("",!0),e.createElementVNode("path",{d:`M${t.value.style.chart.lines.smooth?n.smoothPath:n.straightPath}`,stroke:a.color,"stroke-width":t.value.style.chart.lines.strokeWidth,fill:"none",class:e.normalizeClass({"vue-ui-pcp-animated vue-data-ui-line-animated":t.value.useCssAnimation,"vue-ui-pcp-transition":!0}),onMouseenter:s=>z({shape:a.shape,serieName:a.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[2]||(o[2]=s=>{h.value=null,w.value=!1}),style:e.normalizeStyle(`opacity:${h.value?h.value===n.id?t.value.style.chart.lines.opacity:.2:t.value.style.chart.lines.opacity}; stroke-dasharray:${n.pathLength}; stroke-dashoffset: ${t.value.useCssAnimation?n.pathLength:0}`)},null,46,Ke),v.value.showTooltip?(e.openBlock(),e.createElementBlock("path",{key:2,d:`M${t.value.style.chart.lines.smooth?n.smoothPath:n.straightPath}`,stroke:"transparent","stroke-width":12,fill:"none",class:e.normalizeClass({"vue-ui-pcp-animated vue-data-ui-line-animated":t.value.useCssAnimation,"vue-ui-pcp-transition":!0}),onMouseenter:s=>z({shape:a.shape,serieName:a.name,serie:n,relativeIndex:r,seriesIndex:n.seriesIndex}),onMouseleave:o[3]||(o[3]=s=>{h.value=null,w.value=!1}),style:{opacity:"0"}},null,42,Qe)):e.createCommentVNode("",!0)]))),256))]))),256)),e.renderSlot(l.$slots,"svg",{svg:c.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ze,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(J)||e.unref(K)})),void 0,!0)])):e.createCommentVNode("",!0),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Fe.default,{key:6,config:{type:"parallelCoordinatePlot",style:{backgroundColor:t.value.style.chart.backgroundColor}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[t.value.style.chart.legend.show&&x.value?(e.openBlock(),e.createBlock(ze.Legend,{key:`legend_${U.value}`,legendSet:ke.value,config:xe.value,onClickMarker:o[4]||(o[4]=({legend:a})=>{ee(a.id),se(a)})},{item:e.withCtx(({legend:a,index:n})=>[e.createElementVNode("div",{onClick:r=>{a.segregate(),se(a)},style:e.normalizeStyle(`opacity:${f.value.includes(a.id)?.5:1}`)},e.toDisplayString(a.name),13,et)]),_:1},8,["legendSet","config"])):e.renderSlot(l.$slots,"legend",{key:1,legend:k.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(Ne._sfc_main,{show:v.value.showTooltip&&w.value,backgroundColor:t.value.style.chart.tooltip.backgroundColor,color:t.value.style.chart.tooltip.color,fontSize:t.value.style.chart.tooltip.fontSize,borderRadius:t.value.style.chart.tooltip.borderRadius,borderColor:t.value.style.chart.tooltip.borderColor,borderWidth:t.value.style.chart.tooltip.borderWidth,backgroundOpacity:t.value.style.chart.tooltip.backgroundOpacity,position:t.value.style.chart.tooltip.position,offsetY:t.value.style.chart.tooltip.offsetY,parent:$.value,content:I.value,isFullscreen:C.value,isCustom:e.unref(i.isFunction)(t.value.style.chart.tooltip.customFormat)},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({..._.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","fontSize","borderRadius","borderColor","borderWidth","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),x.value?(e.openBlock(),e.createBlock(Pe.default,{key:8,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Te.DataTable,{key:`table_${W.value}`,colNames:B.value.colNames,head:B.value.head,body:B.value.body,config:B.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:o[5]||(o[5]=a=>v.value.showTable=!1)},{th:e.withCtx(({th:a})=>[e.createElementVNode("div",{innerHTML:a},null,8,tt)]),td:e.withCtx(({td:a})=>[e.createTextVNode(e.toDisplayString(a),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ve))}},at=Le._export_sfc(lt,[["__scopeId","data-v-948523ee"]]);exports.default=at;
|