vue-data-ui 2.4.25 → 2.4.26
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/README.md +9 -4
- package/dist/{Arrow-ByXO10pD.cjs → Arrow-Cvajb7Pp.cjs} +1 -1
- package/dist/{Arrow-DaXXS-Wb.js → Arrow-D_FJ0BNg.js} +1 -1
- package/dist/{BaseIcon-D3twU60H.js → BaseIcon-CeiDtKER.js} +4 -3
- package/dist/{BaseIcon-BRuFT7-k.cjs → BaseIcon-DeKj5tiF.cjs} +1 -1
- package/dist/{DataTable-D8fcY_sJ.js → DataTable-BmAybhqW.js} +2 -2
- package/dist/{DataTable-DFdNUfRe.cjs → DataTable-D-c7laSt.cjs} +1 -1
- package/dist/{Legend-BorSDXCj.js → Legend-7EZhiUrH.js} +1 -1
- package/dist/{Legend-DZAy6K3t.cjs → Legend-D_dNnmCH.cjs} +1 -1
- package/dist/{PackageVersion-mSsg8dpu.js → PackageVersion-BRMtBck7.js} +1 -1
- package/dist/{PackageVersion-C2anu38L.cjs → PackageVersion-C2JzxDlg.cjs} +1 -1
- package/dist/{PenAndPaper-DKSbeuss.cjs → PenAndPaper-Bur5hR1K.cjs} +1 -1
- package/dist/{PenAndPaper-Dk41ZrJ0.js → PenAndPaper-u9Nkiu0T.js} +3 -3
- package/dist/{Shape-bmo_-9LU.cjs → Shape-DJY2D6fU.cjs} +1 -1
- package/dist/{Shape-DYFnvMNd.js → Shape-DoR3mblZ.js} +1 -1
- package/dist/{Slicer-BLQZ4Fne.js → Slicer-AM-8gKgh.js} +2 -2
- package/dist/{Slicer-BME5LXma.cjs → Slicer-DO6JA4zU.cjs} +1 -1
- package/dist/{Title-Dm2GAV04.cjs → Title-BJut0KCO.cjs} +1 -1
- package/dist/{Title-DyD-mBPN.js → Title-D_ljAKoY.js} +1 -1
- package/dist/{Tooltip-qod9o4Vz.js → Tooltip-Cy8PyEK7.js} +1 -1
- package/dist/{Tooltip-CcZzx8f8.cjs → Tooltip-OW2BdLyv.cjs} +1 -1
- package/dist/documentation/installation.md +2 -1
- package/dist/index-BtqOSPWK.cjs +9 -0
- package/dist/{index-BICsqKzz.js → index-CpjF4-PU.js} +604 -374
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.cts +99 -7
- package/dist/types/vue-data-ui.d.ts +99 -7
- package/dist/{useNestedProp-bUwthiZ4.cjs → useNestedProp-C7FKZW2F.cjs} +1 -1
- package/dist/{useNestedProp-BxrcwmTZ.js → useNestedProp-DiDiQc6z.js} +1 -1
- package/dist/{usePrinter-CLcxWv-4.js → usePrinter-CZ0Ro0M3.js} +1 -1
- package/dist/{usePrinter-D_-LKcci.cjs → usePrinter-SEUTEAmF.cjs} +1 -1
- package/dist/vue-data-ui-37JLfniv.cjs +9 -0
- package/dist/{vue-data-ui-DF7u-eZV.js → vue-data-ui-CL2AoklI.js} +72 -70
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +44 -43
- package/dist/{vue-ui-3d-bar-BDVAkP4Z.js → vue-ui-3d-bar-BlEG4n0o.js} +9 -9
- package/dist/{vue-ui-3d-bar-BtfayTxG.cjs → vue-ui-3d-bar-C8Qb1ifR.cjs} +1 -1
- package/dist/{vue-ui-accordion-m8rut1bP.js → vue-ui-accordion-D6Uwxwl0.js} +3 -3
- package/dist/{vue-ui-accordion-BCBC5X2n.cjs → vue-ui-accordion-iiUNHeV-.cjs} +1 -1
- package/dist/{vue-ui-age-pyramid-DTYLss6w.js → vue-ui-age-pyramid-CNWM-Vso.js} +10 -10
- package/dist/{vue-ui-age-pyramid-71PgCBF6.cjs → vue-ui-age-pyramid-DjagE43x.cjs} +1 -1
- package/dist/{vue-ui-annotator-WjNfGCba.js → vue-ui-annotator-BZe3neqk.js} +1 -1
- package/dist/{vue-ui-annotator-DKveFO8S.cjs → vue-ui-annotator-CMVPAd95.cjs} +1 -1
- package/dist/{vue-ui-bullet-BaN07Yto.js → vue-ui-bullet-O15K1or8.js} +8 -8
- package/dist/{vue-ui-bullet-D-QKgdGT.cjs → vue-ui-bullet-UVtGYVKm.cjs} +1 -1
- package/dist/{vue-ui-candlestick-9MfQ-DXp.cjs → vue-ui-candlestick-CNmA8fQF.cjs} +1 -1
- package/dist/{vue-ui-candlestick-CEXWukDl.js → vue-ui-candlestick-w_RkjrEB.js} +11 -11
- package/dist/{vue-ui-carousel-table-DwPPz25F.js → vue-ui-carousel-table-8bz5Gw6i.js} +4 -4
- package/dist/{vue-ui-carousel-table-bHyWXhUR.cjs → vue-ui-carousel-table-B5MDm7_a.cjs} +1 -1
- package/dist/{vue-ui-chestnut-UVDUlA26.js → vue-ui-chestnut-C9kaPI5L.js} +8 -8
- package/dist/{vue-ui-chestnut-BgQsSFpo.cjs → vue-ui-chestnut-DHjsPGHg.cjs} +1 -1
- package/dist/{vue-ui-cursor-B5N8-2TC.cjs → vue-ui-cursor-Dzc6b6gE.cjs} +1 -1
- package/dist/{vue-ui-cursor-DwJ_3OeD.js → vue-ui-cursor-a11eeJlM.js} +2 -2
- package/dist/{vue-ui-dashboard-Dlnt37bU.js → vue-ui-dashboard-B3cTzTF7.js} +2 -2
- package/dist/{vue-ui-dashboard-DHMq8KDe.cjs → vue-ui-dashboard-CfA-FY0a.cjs} +1 -1
- package/dist/{vue-ui-digits-d5q7aYEB.js → vue-ui-digits-CHI-rZzx.js} +2 -2
- package/dist/{vue-ui-digits-CLw0UlLM.cjs → vue-ui-digits-xq4pLzXW.cjs} +1 -1
- package/dist/{vue-ui-donut-nuCiumWN.js → vue-ui-donut-D4w732yO.js} +11 -11
- package/dist/{vue-ui-donut-evolution-H2_TlrF2.js → vue-ui-donut-evolution-BcEI-XQ5.js} +11 -11
- package/dist/{vue-ui-donut-evolution-CfPcjjnn.cjs → vue-ui-donut-evolution-DE-b4ShC.cjs} +1 -1
- package/dist/{vue-ui-donut-CeNCKLSe.cjs → vue-ui-donut-zCAjAqo7.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-hSPyK3qm.cjs → vue-ui-dumbbell-BHHVRpof.cjs} +1 -1
- package/dist/{vue-ui-dumbbell--qD2MDbF.js → vue-ui-dumbbell-CRB1jDkp.js} +10 -10
- package/dist/{vue-ui-flow-Cp154Fpn.cjs → vue-ui-flow---9a6iGC.cjs} +1 -1
- package/dist/{vue-ui-flow-CgcUEWmx.js → vue-ui-flow-CO_kwR_-.js} +9 -9
- package/dist/vue-ui-funnel-BtFW0Wex.cjs +1 -0
- package/dist/vue-ui-funnel-BvLLEW0u.js +574 -0
- package/dist/{vue-ui-galaxy-CVRruPO1.cjs → vue-ui-galaxy-BpR7EuVp.cjs} +1 -1
- package/dist/{vue-ui-galaxy-CNuslpHY.js → vue-ui-galaxy-CzBNCWvB.js} +11 -11
- package/dist/{vue-ui-gauge-BlfbiQ2E.js → vue-ui-gauge-BLCrA4Z3.js} +7 -7
- package/dist/{vue-ui-gauge-BdEZP0P9.cjs → vue-ui-gauge-CjOu6oqn.cjs} +1 -1
- package/dist/{vue-ui-gizmo-CKbSLvuP.js → vue-ui-gizmo-CbALdGSE.js} +3 -3
- package/dist/{vue-ui-gizmo-D7ANYpNx.cjs → vue-ui-gizmo-D550LJP_.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DCTdqUIX.cjs → vue-ui-heatmap--SVDRyYF.cjs} +1 -1
- package/dist/{vue-ui-heatmap-DeV-Tkf2.js → vue-ui-heatmap-GxECNV1K.js} +10 -10
- package/dist/{vue-ui-kpi-BS6Q-H3p.js → vue-ui-kpi-BeI-Uc3G.js} +3 -3
- package/dist/{vue-ui-kpi-BQMwef0E.cjs → vue-ui-kpi-DmTDeYTk.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-BkB2IKcd.cjs → vue-ui-mini-loader-BPCifmPi.cjs} +1 -1
- package/dist/{vue-ui-mini-loader-1hfptP8p.js → vue-ui-mini-loader-Cq5NzQke.js} +2 -2
- package/dist/{vue-ui-molecule-9nYN6FWk.js → vue-ui-molecule-BYnnHVSs.js} +11 -11
- package/dist/{vue-ui-molecule-BSfmIrIV.cjs → vue-ui-molecule-DDOtYnvu.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-DmxG3SpA.cjs → vue-ui-mood-radar-CXxUmCON.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-CdhoXPjB.js → vue-ui-mood-radar-DSph-BzR.js} +11 -11
- package/dist/{vue-ui-nested-donuts-DHn5JPVa.js → vue-ui-nested-donuts-D-FKanpn.js} +11 -11
- package/dist/{vue-ui-nested-donuts-BVDpwaOw.cjs → vue-ui-nested-donuts-DxcqrnAz.cjs} +1 -1
- package/dist/{vue-ui-onion-DpRHbEWN.cjs → vue-ui-onion-BTXdZW1F.cjs} +1 -1
- package/dist/{vue-ui-onion-Dn2beWtO.js → vue-ui-onion-DNdKU_tZ.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-yq09af0J.js → vue-ui-parallel-coordinate-plot-C08Mm2-q.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-CU0tOs-u.cjs → vue-ui-parallel-coordinate-plot-CGvkjk3D.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DzwXd881.js → vue-ui-quadrant-CK8lzvET.js} +12 -12
- package/dist/{vue-ui-quadrant-71OHEVEh.cjs → vue-ui-quadrant-DGtHGV8w.cjs} +1 -1
- package/dist/{vue-ui-quick-chart-BF7xqf0f.js → vue-ui-quick-chart-C7chIyP1.js} +9 -9
- package/dist/{vue-ui-quick-chart-Pt-8uXit.cjs → vue-ui-quick-chart-DNh8sXOc.cjs} +1 -1
- package/dist/{vue-ui-radar-DOmOWd_A.js → vue-ui-radar-CvklQTxx.js} +12 -12
- package/dist/{vue-ui-radar-Buv9DMRa.cjs → vue-ui-radar-DIX_qX_c.cjs} +1 -1
- package/dist/{vue-ui-rating-CQrrI3Mx.js → vue-ui-rating-DkWhtX7L.js} +2 -2
- package/dist/{vue-ui-rating-DiAqIvDv.cjs → vue-ui-rating-WfJhW6Yh.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-Sb7Nyb8W.js → vue-ui-relation-circle-Bt2kayAM.js} +7 -7
- package/dist/{vue-ui-relation-circle-CxOgNn5_.cjs → vue-ui-relation-circle-UkI3rSGh.cjs} +1 -1
- package/dist/{vue-ui-rings-Cm5q10II.cjs → vue-ui-rings-6RqShpuH.cjs} +1 -1
- package/dist/{vue-ui-rings-BrdbD7PJ.js → vue-ui-rings-CHIqJDps.js} +11 -11
- package/dist/{vue-ui-scatter-D5q2EE4b.js → vue-ui-scatter-B-L_xBjF.js} +12 -12
- package/dist/{vue-ui-scatter-ngmt8UB9.cjs → vue-ui-scatter-Dl0lSlc1.cjs} +1 -1
- package/dist/{vue-ui-screenshot-Jf_CuPtB.js → vue-ui-screenshot-BNGt_Ndj.js} +1 -1
- package/dist/{vue-ui-screenshot-B6zLJRHR.cjs → vue-ui-screenshot-BldyAQhp.cjs} +1 -1
- package/dist/{vue-ui-skeleton-Dgzcn3FL.js → vue-ui-skeleton-5qiu2vOB.js} +3 -3
- package/dist/{vue-ui-skeleton-CEeXInMi.cjs → vue-ui-skeleton-CCo2ROV1.cjs} +1 -1
- package/dist/{vue-ui-smiley-JwYaXNnm.cjs → vue-ui-smiley-C7_S4eNS.cjs} +1 -1
- package/dist/{vue-ui-smiley-BAclx6KJ.js → vue-ui-smiley-iWOs5GqV.js} +2 -2
- package/dist/{vue-ui-spark-trend-BIGVUzmd.js → vue-ui-spark-trend-MzGiDFGX.js} +5 -5
- package/dist/{vue-ui-spark-trend-_QrAMYgz.cjs → vue-ui-spark-trend-sNzwu560.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-DhfJlpfY.cjs → vue-ui-sparkbar-BVfXmqcD.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-OZC6iwJ4.js → vue-ui-sparkbar-DpxQR2gu.js} +4 -4
- package/dist/{vue-ui-sparkgauge-DEPvmH2r.cjs → vue-ui-sparkgauge-CS8UDWeQ.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-8Tv-j1T9.js → vue-ui-sparkgauge-D4--jFQc.js} +4 -4
- package/dist/{vue-ui-sparkhistogram-BNILlxcX.js → vue-ui-sparkhistogram-Cxjoa6ky.js} +5 -5
- package/dist/{vue-ui-sparkhistogram-DAbQdCGz.cjs → vue-ui-sparkhistogram-D8IhrzY-.cjs} +1 -1
- package/dist/{vue-ui-sparkline-B0BJFHMi.js → vue-ui-sparkline-3Q4hEM7p.js} +4 -4
- package/dist/{vue-ui-sparkline-XUWsqlUN.cjs → vue-ui-sparkline-D910H286.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-BB-MOwPO.js → vue-ui-sparkstackbar-B59Bw7Az.js} +5 -5
- package/dist/{vue-ui-sparkstackbar-DiyZJ8wv.cjs → vue-ui-sparkstackbar-CTSihv-L.cjs} +1 -1
- package/dist/{vue-ui-stackbar-BqX7ZucO.cjs → vue-ui-stackbar-BGrrmjco.cjs} +1 -1
- package/dist/{vue-ui-stackbar-DT_TRXc4.js → vue-ui-stackbar-BTegNdY4.js} +12 -12
- package/dist/{vue-ui-strip-plot-DiiGkNc9.cjs → vue-ui-strip-plot-BVjyrdND.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-Bn4z9RH8.js → vue-ui-strip-plot-BgT1J5OY.js} +11 -11
- package/dist/{vue-ui-table-BERyvvqz.js → vue-ui-table-CgS1GU4Z.js} +1 -1
- package/dist/{vue-ui-table-9xjGzylw.cjs → vue-ui-table-fCHQvdbJ.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-CNWh58QC.cjs → vue-ui-table-heatmap-BqFJMAJ_.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-tduub4CZ.js → vue-ui-table-heatmap-DgvQBYXr.js} +4 -4
- package/dist/{vue-ui-table-sparkline-COsvxl8Z.cjs → vue-ui-table-sparkline-CXLMpv0k.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DirFLTCn.js → vue-ui-table-sparkline-fBE66WCN.js} +5 -5
- package/dist/{vue-ui-thermometer-Bp8DH03h.cjs → vue-ui-thermometer-DulgA3i4.cjs} +1 -1
- package/dist/{vue-ui-thermometer-aj7L5dYo.js → vue-ui-thermometer-tGfJAwyO.js} +7 -7
- package/dist/{vue-ui-timer-BxdADUyO.js → vue-ui-timer-C2kPkRBe.js} +5 -5
- package/dist/{vue-ui-timer-CFLSCgHD.cjs → vue-ui-timer-CASCNNyP.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-swIZAkBk.cjs → vue-ui-tiremarks-4dlAjo6S.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-CEfNdN2Z.js → vue-ui-tiremarks-CGlojo_b.js} +7 -7
- package/dist/{vue-ui-treemap-XADmrlur.js → vue-ui-treemap-DufeK33k.js} +11 -11
- package/dist/{vue-ui-treemap-TA_t2X-T.cjs → vue-ui-treemap-jhaYQkiI.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-DpX4MZOk.cjs → vue-ui-vertical-bar-B30icWwi.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BxZxWXPp.js → vue-ui-vertical-bar-Dmo8wnx8.js} +11 -11
- package/dist/{vue-ui-waffle-D5fVZhj1.js → vue-ui-waffle-BZxjBRnB.js} +11 -11
- package/dist/{vue-ui-waffle-u71f2gDj.cjs → vue-ui-waffle-D59RaWZT.cjs} +1 -1
- package/dist/{vue-ui-wheel-DeJIQNQo.js → vue-ui-wheel-BeRyRbt8.js} +7 -7
- package/dist/{vue-ui-wheel-OcDfmU6G.cjs → vue-ui-wheel-De4-mY35.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-C8RX9zpp.js → vue-ui-word-cloud-Bk0QzFwd.js} +10 -10
- package/dist/{vue-ui-word-cloud-CqMxlLQ5.cjs → vue-ui-word-cloud-aPrfbkgM.cjs} +1 -1
- package/dist/{vue-ui-xy-C-IsoZnw.js → vue-ui-xy-DFzFITJ1.js} +14 -14
- package/dist/{vue-ui-xy-canvas-DHCbEqpJ.cjs → vue-ui-xy-canvas-BDD6q_Yb.cjs} +1 -1
- package/dist/{vue-ui-xy-canvas-RMsnzPnE.js → vue-ui-xy-canvas-DWf89_69.js} +11 -11
- package/dist/{vue-ui-xy-YFzX3F_Z.cjs → vue-ui-xy-pCnGy_1K.cjs} +1 -1
- package/package.json +2 -1
- package/dist/index-CLWrZGbv.cjs +0 -9
- package/dist/vue-data-ui-DFh0GmXI.cjs +0 -9
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
import { useCssVars as we, computed as i, onMounted as xe, ref as u, watch as $e, openBlock as s, createElementBlock as r, normalizeClass as L, normalizeStyle as T, createBlock as A, createCommentVNode as m, unref as d, createSlots as _e, withCtx as p, renderSlot as k, normalizeProps as X, guardReactiveProps as j, createElementVNode as C, mergeProps as H, Fragment as M, renderList as B, toDisplayString as E, createTextVNode as Le, nextTick as Te } from "vue";
|
|
2
|
+
import { u as Ae, o as Ne, e as ve, g as ze, c as Pe, d as Se, l as Fe, i as R, f as G, X as Oe, F as De, t as Ie, q as Me, r as Be, E as Y } from "./index-CpjF4-PU.js";
|
|
3
|
+
import { u as de } from "./useNestedProp-DiDiQc6z.js";
|
|
4
|
+
import { u as Ee, U as Re } from "./usePrinter-CZ0Ro0M3.js";
|
|
5
|
+
import { _ as Ge } from "./Title-D_ljAKoY.js";
|
|
6
|
+
import { P as Ve } from "./PenAndPaper-u9Nkiu0T.js";
|
|
7
|
+
import { D as Ue } from "./DataTable-BmAybhqW.js";
|
|
8
|
+
import Xe from "./vue-ui-accordion-D6Uwxwl0.js";
|
|
9
|
+
import { t as je, u as He } from "./useResponsive-CoxXLe23.js";
|
|
10
|
+
import Ye from "./vue-ui-skeleton-5qiu2vOB.js";
|
|
11
|
+
import { _ as qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
+
const We = ["id"], Je = ["xmlns", "viewBox"], Ke = ["id"], Qe = ["stop-color"], Ze = ["stop-color"], et = ["stop-color"], tt = ["stroke", "stroke-width"], at = ["stroke", "stroke-width"], lt = ["x", "y", "font-size", "fill", "font-weight"], st = ["points", "fill"], ot = ["stroke", "stroke-width", "rx"], nt = ["x", "y", "font-size", "fill", "font-weight"], rt = ["x", "y", "font-size", "fill", "font-weight"], ut = {
|
|
13
|
+
key: 5,
|
|
14
|
+
class: "vue-data-ui-watermark"
|
|
15
|
+
}, it = ["innerHTML"], ct = {
|
|
16
|
+
__name: "vue-ui-funnel",
|
|
17
|
+
props: {
|
|
18
|
+
config: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default() {
|
|
21
|
+
return {};
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
dataset: {
|
|
25
|
+
type: Array,
|
|
26
|
+
default() {
|
|
27
|
+
return [];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
setup(he, { expose: fe }) {
|
|
32
|
+
const b = he;
|
|
33
|
+
we((a) => ({
|
|
34
|
+
"0dcc78a9": ke.value
|
|
35
|
+
}));
|
|
36
|
+
const { vue_ui_funnel: me } = Ae(), $ = i(() => !!b.dataset && b.dataset.length);
|
|
37
|
+
xe(q);
|
|
38
|
+
function q() {
|
|
39
|
+
if (Ne(b.dataset) ? ve({
|
|
40
|
+
componentName: "VueUiFunnel",
|
|
41
|
+
type: "dataset"
|
|
42
|
+
}) : b.dataset.forEach((a, l) => {
|
|
43
|
+
ze({
|
|
44
|
+
datasetObject: a,
|
|
45
|
+
requiredAttributes: ["name", "value"]
|
|
46
|
+
}).forEach((t) => {
|
|
47
|
+
$.value = !1, ve({
|
|
48
|
+
componentName: "VueUiFunnel",
|
|
49
|
+
type: "datasetSerieAttribute",
|
|
50
|
+
property: t,
|
|
51
|
+
index: l
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
}), e.value.responsive) {
|
|
55
|
+
const a = je(() => {
|
|
56
|
+
const { width: l, height: t } = He({
|
|
57
|
+
chart: N.value,
|
|
58
|
+
title: e.value.style.chart.title.text ? ee.value : null,
|
|
59
|
+
source: Z.value,
|
|
60
|
+
noTitle: Q.value
|
|
61
|
+
});
|
|
62
|
+
h.value.height = t, h.value.width = l, g.value = re(), c.value.circles = Y({
|
|
63
|
+
relator: Math.min(l, t),
|
|
64
|
+
adjuster: 600,
|
|
65
|
+
source: e.value.style.chart.circles.dataLabels.fontSize,
|
|
66
|
+
threshold: 10,
|
|
67
|
+
fallback: 10
|
|
68
|
+
}), c.value.names = Y({
|
|
69
|
+
relator: Math.min(l, t),
|
|
70
|
+
adjuster: 600,
|
|
71
|
+
source: e.value.style.chart.bars.dataLabels.name.fontSize,
|
|
72
|
+
threshold: 10,
|
|
73
|
+
fallback: 10
|
|
74
|
+
}), c.value.values = Y({
|
|
75
|
+
relator: Math.min(l, t),
|
|
76
|
+
adjuster: 600,
|
|
77
|
+
source: e.value.style.chart.bars.dataLabels.value.fontSize,
|
|
78
|
+
threshold: 10,
|
|
79
|
+
fallback: 10
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
te.value = new ResizeObserver(a), te.value.observe(N.value.parentNode);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
const N = u(null), z = u(Pe()), W = u(0), J = u(0), K = u(0), Q = u(null), Z = u(null), ee = u(null), te = u(null), w = u(!1);
|
|
86
|
+
function ae() {
|
|
87
|
+
const a = de({
|
|
88
|
+
userConfig: b.config,
|
|
89
|
+
defaultConfig: me
|
|
90
|
+
});
|
|
91
|
+
return a.theme ? {
|
|
92
|
+
...de({
|
|
93
|
+
userConfig: Ie.vue_ui_funnel[a.theme] || b.config,
|
|
94
|
+
defaultConfig: a
|
|
95
|
+
})
|
|
96
|
+
} : a;
|
|
97
|
+
}
|
|
98
|
+
const e = i({
|
|
99
|
+
get: () => ae(),
|
|
100
|
+
set: (a) => a
|
|
101
|
+
});
|
|
102
|
+
$e(() => b.config, (a) => {
|
|
103
|
+
e.value = ae(), q(), J.value += 1, K.value += 1, c.value.circles = e.value.style.chart.circles.dataLabels.fontSize, c.value.names = e.value.style.chart.bars.dataLabels.name.fontSize, c.value.values = e.value.style.chart.bars.dataLabels.value.fontSize;
|
|
104
|
+
}, { deep: !0 });
|
|
105
|
+
const { isPrinting: le, isImaging: se, generatePdf: oe, generateImage: ne } = Ee({
|
|
106
|
+
elementId: `funnel_${z.value}`,
|
|
107
|
+
fileName: e.value.style.chart.title.text || "vue-ui-funnel"
|
|
108
|
+
}), be = i(() => e.value.userOptions.show && !e.value.style.chart.title.text), O = u({
|
|
109
|
+
showTable: e.value.table.show
|
|
110
|
+
}), c = u({
|
|
111
|
+
circles: e.value.style.chart.circles.dataLabels.fontSize,
|
|
112
|
+
names: e.value.style.chart.bars.dataLabels.name.fontSize,
|
|
113
|
+
values: e.value.style.chart.bars.dataLabels.value.fontSize
|
|
114
|
+
}), h = i({
|
|
115
|
+
get: () => ({
|
|
116
|
+
height: e.value.style.chart.height,
|
|
117
|
+
width: e.value.style.chart.width
|
|
118
|
+
}),
|
|
119
|
+
set: (a) => a
|
|
120
|
+
}), y = i(() => $.value ? b.dataset.map((a, l) => ({
|
|
121
|
+
...a,
|
|
122
|
+
color: a.color ? Se(a.color) : Fe(e.value.style.chart.bars.defaultColor, l / b.dataset.length)
|
|
123
|
+
})) : []);
|
|
124
|
+
setTimeout(() => {
|
|
125
|
+
w.value = !0;
|
|
126
|
+
}, y.value.length * 150);
|
|
127
|
+
function re() {
|
|
128
|
+
const a = e.value.style.chart.padding.left, l = e.value.style.chart.padding.top;
|
|
129
|
+
return {
|
|
130
|
+
left: a,
|
|
131
|
+
top: l,
|
|
132
|
+
right: h.value.width - e.value.style.chart.padding.right,
|
|
133
|
+
bottom: h.value.height - e.value.style.chart.padding.bottom,
|
|
134
|
+
width: h.value.width - a - e.value.style.chart.padding.right,
|
|
135
|
+
height: h.value.height - l - e.value.style.chart.padding.bottom
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
const g = u(re()), _ = i(() => g.value.height / b.dataset.length), x = i(() => _.value * e.value.style.chart.bars.gapRatio), ue = i(() => g.value.width * e.value.style.chart.barCircleSpacingRatio), o = i(() => y.value.map((a, l) => {
|
|
139
|
+
const t = _.value - x.value, n = g.value.top + x.value / 2 * l + (_.value - x.value / 2) * l + x.value / 2, f = a.value / y.value[0].value, v = (g.value.width - t - ue.value) * (a.value / y.value[0].value);
|
|
140
|
+
return {
|
|
141
|
+
...a,
|
|
142
|
+
cx: g.value.left + t / 2,
|
|
143
|
+
cy: n + t / 2,
|
|
144
|
+
datapointIndex: l,
|
|
145
|
+
fill: a.color,
|
|
146
|
+
height: Math.max(t, 0),
|
|
147
|
+
proportion: f,
|
|
148
|
+
r: Math.max(t / 2, 0),
|
|
149
|
+
width: Math.max(v, 0),
|
|
150
|
+
x: g.value.left + t + ue.value,
|
|
151
|
+
y: n
|
|
152
|
+
};
|
|
153
|
+
})), ye = i(() => {
|
|
154
|
+
const a = o.value.map((l) => `${l.x + l.width},${l.y + (_.value - x.value) / 2}`);
|
|
155
|
+
return `${o.value[0].x},${o.value[0].y + (_.value - x.value) / 2} ${a.toString()} ${o.value.at(-1).x},${o.value.at(-1).y + (_.value - x.value) / 2}`;
|
|
156
|
+
}), ge = i(() => ({
|
|
157
|
+
x1: o.value[0].cx,
|
|
158
|
+
y1: o.value[0].cy,
|
|
159
|
+
x2: o.value.at(-1).cx,
|
|
160
|
+
y2: o.value.at(-1).cy
|
|
161
|
+
})), P = u(!1);
|
|
162
|
+
function pe(a) {
|
|
163
|
+
P.value = a, W.value += 1;
|
|
164
|
+
}
|
|
165
|
+
const ke = i(() => `${y.value.length * 150}ms`), D = u(!1);
|
|
166
|
+
function V() {
|
|
167
|
+
D.value = !D.value;
|
|
168
|
+
}
|
|
169
|
+
function ie() {
|
|
170
|
+
O.value.showTable = !O.value.showTable;
|
|
171
|
+
}
|
|
172
|
+
const S = i(() => {
|
|
173
|
+
const a = y.value.map((t) => ({
|
|
174
|
+
name: t.name,
|
|
175
|
+
color: t.color
|
|
176
|
+
})), l = y.value.map((t) => t.value);
|
|
177
|
+
return { head: a, body: l };
|
|
178
|
+
}), I = i(() => {
|
|
179
|
+
const a = [
|
|
180
|
+
e.value.table.columnNames.series,
|
|
181
|
+
e.value.table.columnNames.value,
|
|
182
|
+
e.value.table.columnNames.percentage
|
|
183
|
+
], l = S.value.head.map((f, v) => {
|
|
184
|
+
const F = R(
|
|
185
|
+
e.value.style.chart.bars.dataLabels.value.formatter,
|
|
186
|
+
S.value.body[v],
|
|
187
|
+
G({
|
|
188
|
+
p: e.value.style.chart.bars.dataLabels.value.prefix,
|
|
189
|
+
v: S.value.body[v],
|
|
190
|
+
s: e.value.style.chart.bars.dataLabels.value.suffix,
|
|
191
|
+
r: e.value.table.td.roundingValue
|
|
192
|
+
}),
|
|
193
|
+
{ datapoint: o.value[v] }
|
|
194
|
+
), U = R(
|
|
195
|
+
e.value.style.chart.circles.dataLabels.formatter,
|
|
196
|
+
o.value[v].proportion * 100,
|
|
197
|
+
G({
|
|
198
|
+
v: o.value[v].proportion * 100,
|
|
199
|
+
s: "%",
|
|
200
|
+
r: e.value.table.td.roundingPercentage
|
|
201
|
+
}),
|
|
202
|
+
{ datapoint: o.value[v] }
|
|
203
|
+
);
|
|
204
|
+
return [
|
|
205
|
+
{ color: f.color, name: f.name },
|
|
206
|
+
F,
|
|
207
|
+
U
|
|
208
|
+
];
|
|
209
|
+
}), t = {
|
|
210
|
+
th: {
|
|
211
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
212
|
+
color: e.value.table.th.color,
|
|
213
|
+
outline: e.value.table.th.outline
|
|
214
|
+
},
|
|
215
|
+
td: {
|
|
216
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
217
|
+
color: e.value.table.td.color,
|
|
218
|
+
outline: e.value.table.td.outline
|
|
219
|
+
},
|
|
220
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
221
|
+
};
|
|
222
|
+
return {
|
|
223
|
+
colNames: [
|
|
224
|
+
e.value.table.columnNames.series,
|
|
225
|
+
e.value.table.columnNames.value,
|
|
226
|
+
e.value.table.columnNames.percentage
|
|
227
|
+
],
|
|
228
|
+
head: a,
|
|
229
|
+
body: l,
|
|
230
|
+
config: t
|
|
231
|
+
};
|
|
232
|
+
});
|
|
233
|
+
function ce() {
|
|
234
|
+
Te(() => {
|
|
235
|
+
const a = S.value.head.map((n, f) => [[
|
|
236
|
+
n.name
|
|
237
|
+
], [S.value.body[f]], [o.value[f].proportion * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[e.value.table.columnNames.series], [e.value.table.columnNames.value], ["%"]]].concat(a), t = Me(l);
|
|
238
|
+
Be({ csvContent: t, title: e.value.style.chart.title.text || "vue-ui-funnel" });
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
function Ce() {
|
|
242
|
+
return y.value;
|
|
243
|
+
}
|
|
244
|
+
return fe({
|
|
245
|
+
getData: Ce,
|
|
246
|
+
generatePdf: oe,
|
|
247
|
+
generateCsv: ce,
|
|
248
|
+
generateImage: ne,
|
|
249
|
+
toggleTable: ie,
|
|
250
|
+
toggleAnnotator: V
|
|
251
|
+
}), (a, l) => (s(), r("div", {
|
|
252
|
+
ref_key: "funnelChart",
|
|
253
|
+
ref: N,
|
|
254
|
+
class: L(`vue-ui-funnel ${P.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
255
|
+
style: T(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height:100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
256
|
+
id: `funnel_${z.value}`
|
|
257
|
+
}, [
|
|
258
|
+
e.value.userOptions.buttons.annotator ? (s(), A(Ve, {
|
|
259
|
+
key: 0,
|
|
260
|
+
parent: N.value,
|
|
261
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
262
|
+
color: e.value.style.chart.color,
|
|
263
|
+
active: D.value,
|
|
264
|
+
onClose: V
|
|
265
|
+
}, null, 8, ["parent", "backgroundColor", "color", "active"])) : m("", !0),
|
|
266
|
+
be.value ? (s(), r("div", {
|
|
267
|
+
key: 1,
|
|
268
|
+
ref_key: "noTitle",
|
|
269
|
+
ref: Q,
|
|
270
|
+
class: "vue-data-ui-no-title-space",
|
|
271
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
272
|
+
}, null, 512)) : m("", !0),
|
|
273
|
+
e.value.style.chart.title.text ? (s(), r("div", {
|
|
274
|
+
key: 2,
|
|
275
|
+
ref_key: "chartTitle",
|
|
276
|
+
ref: ee,
|
|
277
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
278
|
+
}, [
|
|
279
|
+
(s(), A(Ge, {
|
|
280
|
+
key: `title_${J.value}`,
|
|
281
|
+
config: {
|
|
282
|
+
title: {
|
|
283
|
+
cy: "funnel-div-title",
|
|
284
|
+
...e.value.style.chart.title
|
|
285
|
+
},
|
|
286
|
+
subtitle: {
|
|
287
|
+
cy: "funnel-div-subtitle",
|
|
288
|
+
...e.value.style.chart.title.subtitle
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}, null, 8, ["config"]))
|
|
292
|
+
], 512)) : m("", !0),
|
|
293
|
+
e.value.userOptions.show && $.value ? (s(), A(Re, {
|
|
294
|
+
ref: "details",
|
|
295
|
+
key: `user_option_${W.value}`,
|
|
296
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
297
|
+
color: e.value.style.chart.color,
|
|
298
|
+
isPrinting: d(le),
|
|
299
|
+
isImaging: d(se),
|
|
300
|
+
uid: z.value,
|
|
301
|
+
hasTooltip: !1,
|
|
302
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
303
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
304
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
305
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
306
|
+
hasLabel: !1,
|
|
307
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
308
|
+
isFullscreen: P.value,
|
|
309
|
+
chartElement: N.value,
|
|
310
|
+
position: e.value.userOptions.position,
|
|
311
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
312
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
313
|
+
isAnnotation: D.value,
|
|
314
|
+
onToggleAnnotator: V,
|
|
315
|
+
onToggleFullscreen: pe,
|
|
316
|
+
onGeneratePdf: d(oe),
|
|
317
|
+
onGenerateImage: d(ne),
|
|
318
|
+
onToggleTable: ie,
|
|
319
|
+
onGenerateCsv: ce
|
|
320
|
+
}, _e({ _: 2 }, [
|
|
321
|
+
a.$slots.optionPdf ? {
|
|
322
|
+
name: "optionPdf",
|
|
323
|
+
fn: p(() => [
|
|
324
|
+
k(a.$slots, "optionPdf", {}, void 0, !0)
|
|
325
|
+
]),
|
|
326
|
+
key: "0"
|
|
327
|
+
} : void 0,
|
|
328
|
+
a.$slots.optionCsv ? {
|
|
329
|
+
name: "optionCsv",
|
|
330
|
+
fn: p(() => [
|
|
331
|
+
k(a.$slots, "optionCsv", {}, void 0, !0)
|
|
332
|
+
]),
|
|
333
|
+
key: "1"
|
|
334
|
+
} : void 0,
|
|
335
|
+
a.$slots.optionImg ? {
|
|
336
|
+
name: "optionImg",
|
|
337
|
+
fn: p(() => [
|
|
338
|
+
k(a.$slots, "optionImg", {}, void 0, !0)
|
|
339
|
+
]),
|
|
340
|
+
key: "2"
|
|
341
|
+
} : void 0,
|
|
342
|
+
a.$slots.optionTable ? {
|
|
343
|
+
name: "optionTable",
|
|
344
|
+
fn: p(() => [
|
|
345
|
+
k(a.$slots, "optionTable", {}, void 0, !0)
|
|
346
|
+
]),
|
|
347
|
+
key: "3"
|
|
348
|
+
} : void 0,
|
|
349
|
+
a.$slots.optionFullscreen ? {
|
|
350
|
+
name: "optionFullscreen",
|
|
351
|
+
fn: p(({ toggleFullscreen: t, isFullscreen: n }) => [
|
|
352
|
+
k(a.$slots, "optionFullscreen", X(j({ toggleFullscreen: t, isFullscreen: n })), void 0, !0)
|
|
353
|
+
]),
|
|
354
|
+
key: "4"
|
|
355
|
+
} : void 0,
|
|
356
|
+
a.$slots.optionAnnotator ? {
|
|
357
|
+
name: "optionAnnotator",
|
|
358
|
+
fn: p(({ toggleAnnotator: t, isAnnotator: n }) => [
|
|
359
|
+
k(a.$slots, "optionAnnotator", X(j({ toggleAnnotator: t, isAnnotator: n })), void 0, !0)
|
|
360
|
+
]),
|
|
361
|
+
key: "5"
|
|
362
|
+
} : void 0
|
|
363
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : m("", !0),
|
|
364
|
+
$.value ? (s(), r("svg", {
|
|
365
|
+
key: 4,
|
|
366
|
+
xmlns: d(Oe),
|
|
367
|
+
class: L({ "vue-data-ui-fullscreen--on": P.value, "vue-data-ui-fulscreen--off": !P.value }),
|
|
368
|
+
viewBox: `0 0 ${h.value.width <= 0 ? 10 : h.value.width} ${h.value.height <= 0 ? 10 : h.value.height}`,
|
|
369
|
+
style: T(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color}`)
|
|
370
|
+
}, [
|
|
371
|
+
C("defs", null, [
|
|
372
|
+
C("linearGradient", {
|
|
373
|
+
id: `funnel_area_${z.value}`,
|
|
374
|
+
x1: "0%",
|
|
375
|
+
x2: "100%",
|
|
376
|
+
y1: "0%",
|
|
377
|
+
y2: "0%"
|
|
378
|
+
}, [
|
|
379
|
+
C("stop", {
|
|
380
|
+
offset: "0%",
|
|
381
|
+
"stop-color": e.value.style.chart.backgroundColor,
|
|
382
|
+
"stop-opacity": 0
|
|
383
|
+
}, null, 8, Qe),
|
|
384
|
+
C("stop", {
|
|
385
|
+
offset: "20%",
|
|
386
|
+
"stop-color": e.value.style.chart.area.color
|
|
387
|
+
}, null, 8, Ze),
|
|
388
|
+
C("stop", {
|
|
389
|
+
offset: "100%",
|
|
390
|
+
"stop-color": e.value.style.chart.area.color
|
|
391
|
+
}, null, 8, et)
|
|
392
|
+
], 8, Ke)
|
|
393
|
+
]),
|
|
394
|
+
e.value.style.chart.circleLinks.show ? (s(), r("line", H({ key: 0 }, ge.value, {
|
|
395
|
+
stroke: e.value.style.chart.circleLinks.color,
|
|
396
|
+
"stroke-width": 12 * e.value.style.chart.circleLinks.widthRatio,
|
|
397
|
+
"stroke-linecap": "round",
|
|
398
|
+
class: {
|
|
399
|
+
animated: e.value.useCssAnimation
|
|
400
|
+
},
|
|
401
|
+
style: {
|
|
402
|
+
strokeDasharray: e.value.useCssAnimation ? g.value.height : 0,
|
|
403
|
+
strokeDashoffset: e.value.useCssAnimation ? g.value.height : 0
|
|
404
|
+
}
|
|
405
|
+
}), null, 16, tt)) : m("", !0),
|
|
406
|
+
(s(!0), r(M, null, B(o.value, ({ cx: t, cy: n, r: f, fill: v }, F) => (s(), r("circle", H({ cx: t, cy: n, r: f, fill: v }, {
|
|
407
|
+
stroke: e.value.style.chart.circles.stroke,
|
|
408
|
+
"stroke-width": e.value.style.chart.circles.strokeWidth,
|
|
409
|
+
class: {
|
|
410
|
+
animated: e.value.useCssAnimation && !w.value
|
|
411
|
+
},
|
|
412
|
+
style: {
|
|
413
|
+
animationDelay: `${150 * F}ms`
|
|
414
|
+
}
|
|
415
|
+
}), null, 16, at))), 256)),
|
|
416
|
+
(s(!0), r(M, null, B(o.value, (t, n) => (s(), r("text", {
|
|
417
|
+
x: t.cx,
|
|
418
|
+
y: t.cy + c.value.circles / 3 + e.value.style.chart.circles.dataLabels.offsetY,
|
|
419
|
+
"text-anchor": "middle",
|
|
420
|
+
"font-size": c.value.circles,
|
|
421
|
+
fill: e.value.style.chart.circles.dataLabels.adaptColorToBackground ? d(De)(t.color) : e.value.style.chart.circles.dataLabels.color,
|
|
422
|
+
"font-weight": e.value.style.chart.circles.dataLabels.bold ? "bold" : "normal",
|
|
423
|
+
class: L({
|
|
424
|
+
animated: e.value.useCssAnimation && !w.value
|
|
425
|
+
}),
|
|
426
|
+
style: T({
|
|
427
|
+
animationDelay: `${150 * n}ms`
|
|
428
|
+
})
|
|
429
|
+
}, E(d(R)(
|
|
430
|
+
e.value.style.chart.circles.dataLabels.formatter,
|
|
431
|
+
t.proportion * 100,
|
|
432
|
+
d(G)({
|
|
433
|
+
v: t.proportion * 100,
|
|
434
|
+
s: "%",
|
|
435
|
+
r: e.value.style.chart.circles.dataLabels.rounding
|
|
436
|
+
}),
|
|
437
|
+
{ datapoint: t }
|
|
438
|
+
)), 15, lt))), 256)),
|
|
439
|
+
e.value.style.chart.area.show ? (s(), r("polygon", {
|
|
440
|
+
key: 1,
|
|
441
|
+
points: ye.value,
|
|
442
|
+
fill: `url(#funnel_area_${z.value})`,
|
|
443
|
+
class: L({
|
|
444
|
+
animated: e.value.useCssAnimation && !w.value
|
|
445
|
+
}),
|
|
446
|
+
style: T({
|
|
447
|
+
transition: e.value.useCssAnimation ? `all ${150 * y.value.length}ms ease-in` : "none"
|
|
448
|
+
})
|
|
449
|
+
}, null, 14, st)) : m("", !0),
|
|
450
|
+
(s(!0), r(M, null, B(o.value, ({ x: t, y: n, height: f, width: v, fill: F }, U) => (s(), r("rect", H({ x: t, y: n, height: f, width: v, fill: F }, {
|
|
451
|
+
stroke: e.value.style.chart.bars.stroke,
|
|
452
|
+
"stroke-width": e.value.style.chart.bars.strokeWidth,
|
|
453
|
+
rx: e.value.style.chart.bars.borderRadius,
|
|
454
|
+
class: {
|
|
455
|
+
animated: e.value.useCssAnimation && !w.value
|
|
456
|
+
},
|
|
457
|
+
style: {
|
|
458
|
+
animationDelay: `${150 * U}ms`
|
|
459
|
+
}
|
|
460
|
+
}), null, 16, ot))), 256)),
|
|
461
|
+
(s(!0), r(M, null, B(o.value, (t, n) => (s(), r("g", null, [
|
|
462
|
+
C("text", {
|
|
463
|
+
x: t.x + t.width + e.value.style.chart.bars.dataLabels.name.offsetX + 12,
|
|
464
|
+
y: t.cy - c.value.names / 2 + e.value.style.chart.bars.dataLabels.name.offsetY,
|
|
465
|
+
"text-anchor": "start",
|
|
466
|
+
"font-size": c.value.names,
|
|
467
|
+
fill: e.value.style.chart.bars.dataLabels.name.color,
|
|
468
|
+
"font-weight": e.value.style.chart.bars.dataLabels.name.bold ? "bold" : "normal",
|
|
469
|
+
class: L({
|
|
470
|
+
animated: e.value.useCssAnimation && !w.value
|
|
471
|
+
}),
|
|
472
|
+
style: T({
|
|
473
|
+
animationDelay: `${150 * n}ms`
|
|
474
|
+
})
|
|
475
|
+
}, E(t.name), 15, nt),
|
|
476
|
+
C("text", {
|
|
477
|
+
x: t.x + t.width + e.value.style.chart.bars.dataLabels.value.offsetX + 12,
|
|
478
|
+
y: t.cy + c.value.values + e.value.style.chart.bars.dataLabels.value.offsetY,
|
|
479
|
+
"text-anchor": "start",
|
|
480
|
+
"font-size": c.value.values,
|
|
481
|
+
fill: e.value.style.chart.bars.dataLabels.value.color,
|
|
482
|
+
"font-weight": e.value.style.chart.bars.dataLabels.value.bold ? "bold" : "normal",
|
|
483
|
+
class: L({
|
|
484
|
+
animated: e.value.useCssAnimation && !w.value
|
|
485
|
+
}),
|
|
486
|
+
style: T({
|
|
487
|
+
animationDelay: `${150 * n}ms`
|
|
488
|
+
})
|
|
489
|
+
}, E(d(R)(
|
|
490
|
+
e.value.style.chart.bars.dataLabels.value.formatter,
|
|
491
|
+
t.value,
|
|
492
|
+
d(G)({
|
|
493
|
+
p: e.value.style.chart.bars.dataLabels.value.prefix,
|
|
494
|
+
v: t.value,
|
|
495
|
+
s: e.value.style.chart.bars.dataLabels.value.suffix,
|
|
496
|
+
r: e.value.style.chart.bars.dataLabels.value.rounding
|
|
497
|
+
}),
|
|
498
|
+
{ datapoint: t }
|
|
499
|
+
)), 15, rt)
|
|
500
|
+
]))), 256)),
|
|
501
|
+
k(a.$slots, "svg", { svg: h.value }, void 0, !0)
|
|
502
|
+
], 14, Je)) : m("", !0),
|
|
503
|
+
a.$slots.watermark ? (s(), r("div", ut, [
|
|
504
|
+
k(a.$slots, "watermark", X(j({ isPrinting: d(le) || d(se) })), void 0, !0)
|
|
505
|
+
])) : m("", !0),
|
|
506
|
+
$.value ? m("", !0) : (s(), A(Ye, {
|
|
507
|
+
key: 6,
|
|
508
|
+
config: {
|
|
509
|
+
type: "verticalBar",
|
|
510
|
+
style: {
|
|
511
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
512
|
+
verticalBar: {
|
|
513
|
+
axis: {
|
|
514
|
+
color: "#CCCCCC"
|
|
515
|
+
},
|
|
516
|
+
color: "#CCCCCC"
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}, null, 8, ["config"])),
|
|
521
|
+
a.$slots.source ? (s(), r("div", {
|
|
522
|
+
key: 7,
|
|
523
|
+
ref_key: "source",
|
|
524
|
+
ref: Z,
|
|
525
|
+
dir: "auto"
|
|
526
|
+
}, [
|
|
527
|
+
k(a.$slots, "source", {}, void 0, !0)
|
|
528
|
+
], 512)) : m("", !0),
|
|
529
|
+
$.value ? (s(), A(Xe, {
|
|
530
|
+
key: 8,
|
|
531
|
+
hideDetails: "",
|
|
532
|
+
config: {
|
|
533
|
+
open: O.value.showTable,
|
|
534
|
+
maxHeight: 1e4,
|
|
535
|
+
body: {
|
|
536
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
537
|
+
color: e.value.style.chart.color
|
|
538
|
+
},
|
|
539
|
+
head: {
|
|
540
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
541
|
+
color: e.value.style.chart.color
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}, {
|
|
545
|
+
content: p(() => [
|
|
546
|
+
(s(), A(Ue, {
|
|
547
|
+
key: `table_${K.value}`,
|
|
548
|
+
colNames: I.value.colNames,
|
|
549
|
+
head: I.value.head,
|
|
550
|
+
body: I.value.body,
|
|
551
|
+
config: I.value.config,
|
|
552
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
553
|
+
onClose: l[0] || (l[0] = (t) => O.value.showTable = !1)
|
|
554
|
+
}, {
|
|
555
|
+
th: p(({ th: t }) => [
|
|
556
|
+
C("div", {
|
|
557
|
+
innerHTML: t,
|
|
558
|
+
style: { display: "flex", "align-items": "center" }
|
|
559
|
+
}, null, 8, it)
|
|
560
|
+
]),
|
|
561
|
+
td: p(({ td: t }) => [
|
|
562
|
+
Le(E(t.name ? t.name : t), 1)
|
|
563
|
+
]),
|
|
564
|
+
_: 1
|
|
565
|
+
}, 8, ["colNames", "head", "body", "config", "title"]))
|
|
566
|
+
]),
|
|
567
|
+
_: 1
|
|
568
|
+
}, 8, ["config"])) : m("", !0)
|
|
569
|
+
], 14, We));
|
|
570
|
+
}
|
|
571
|
+
}, wt = /* @__PURE__ */ qe(ct, [["__scopeId", "data-v-51a14bf0"]]);
|
|
572
|
+
export {
|
|
573
|
+
wt as default
|
|
574
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-CLWrZGbv.cjs"),re=require("./Legend-DZAy6K3t.cjs"),ne=require("./Title-Dm2GAV04.cjs"),se=require("./Tooltip-CcZzx8f8.cjs"),ue=require("./DataTable-DFdNUfRe.cjs"),U=require("./usePrinter-D_-LKcci.cjs"),ie=require("./vue-ui-skeleton-CEeXInMi.cjs"),ce=require("./vue-ui-accordion-BCBC5X2n.cjs"),H=require("./useNestedProp-bUwthiZ4.cjs"),de=require("./PackageVersion-C2anu38L.cjs"),ve=require("./PenAndPaper-DKSbeuss.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),he=["id"],fe={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ye={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},ge=["xmlns","viewBox"],me=["id"],be=["stdDeviation"],ke=["d","stroke","stroke-width"],Ce=["d","stroke","stroke-width"],we=["filter"],xe=["d","stroke","stroke-width"],$e=["d","stroke-width","onMouseenter","onClick"],Be={key:5,class:"vue-data-ui-watermark"},Ne=["onClick"],Te={key:0},_e={key:1},Se={key:8,ref:"source",dir:"auto"},Pe=["innerHTML"],Ve={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(X,{expose:j,emit:S}){const i=X,{vue_ui_galaxy:Y}=r.useConfig(),b=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{P()});function P(){r.objectIsEmpty(i.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):i.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const y=e.ref(r.createUid()),k=e.ref(null),J=e.ref(null),x=e.ref(!1),$=e.ref(""),c=e.ref(null),V=e.ref(0),E=e.ref(0),L=e.ref(0),O=e.ref(0),t=e.computed({get:()=>A(),set:l=>l});function A(){const l=H.useNestedProp({userConfig:i.config,defaultConfig:Y});return l.theme?{...H.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||i.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>i.config,l=>{t.value=A(),P(),E.value+=1,L.value+=1,O.value+=1},{deep:!0});const{isPrinting:F,isImaging:I,generatePdf:z,generateImage:D}=U.usePrinter({elementId:`galaxy_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),K=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Q=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}),B=e.ref({height:180,width:250}),u=e.ref([]);function N(l){u.value.includes(l.id)?u.value=u.value.filter(a=>a!==l.id):u.value.push(l.id),S("selectLegend",g.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const h=e.computed(()=>i.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||Q.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function Z(){return h.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const d=e.computed(()=>h.value.filter(l=>!u.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),ee=e.ref(190),q=e.computed(()=>h.value.filter(l=>!u.value.includes(l.id))),g=e.computed(()=>{const l=[];for(let a=0;a<q.value.length;a+=1){const o=q.value[a];let n=o.value/d.value*ee.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/d.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!u.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function te(l){m.value=l,V.value+=1}const T=e.ref(null);function le({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){T.value={datapoint:l,seriesIndex:o,series:h.value,config:t.value},x.value=n,c.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:h.value,config:t.value}))?$.value=f({seriesIndex:o,datapoint:l,series:h.value,config:t.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;">${l.name}</div>`,s+=`<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&&(s+=`<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?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),$.value=`<div>${s}</div>`)}const G=e.computed(()=>h.value.map((l,a)=>({...l,proportion:(l.value||0)/i.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:u.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>N(l),isSegregated:u.value.includes(l.id)}))),oe=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>{const l=g.value.map(o=>({name:o.name,color:o.color})),a=g.value.map(o=>o.value);return{head:l,body:a}});function M(){e.nextTick(()=>{const l=p.value.head.map((n,s)=>[[n.name],[p.value.body[s]],[isNaN(p.value.body[s]/d.value)?"-":p.value.body[s]/d.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const C=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=p.value.head.map((s,f)=>{const ae=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},ae,isNaN(p.value.body[f]/d.value)?"-":r.dataLabel({v:p.value.body[f]/d.value*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:a,config:o}});function W(){v.value.showTable=!v.value.showTable}function R(){v.value.showTooltip=!v.value.showTooltip}const w=e.ref(!1);function _(){w.value=!w.value}return j({getData:Z,generatePdf:z,generateCsv:M,generateImage:D,toggleTable:W,toggleTooltip:R,toggleAnnotator:_}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:k,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${y.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ve.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:_},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),K.value?(e.openBlock(),e.createElementBlock("div",fe,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(),e.createBlock(ne._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(U.UserOptions,{ref_key:"details",ref:J,key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(I),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:te,onGeneratePdf:e.unref(z),onGenerateCsv:M,onGenerateImage:e.unref(D),onToggleTable:W,onToggleTooltip:R,onToggleAnnotator:_},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,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:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${B.value.width} ${B.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(de._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,be)],8,me)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,ke)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Ce)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${y.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,xe)],8,we)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>le({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{x.value=!1,c.value=null}),onClick:s=>S("selectDatapoint",o)},null,40,$e)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:B.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:6,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(re.Legend,{key:`legend_${O.value}`,legendSet:G.value,config:oe.value,onClickMarker:a[1]||(a[1]=({legend:o})=>N(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>N(o),style:e.normalizeStyle(`opacity:${u.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),u.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",_e," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Te," ("+e.toDisplayString(isNaN(o.value/d.value)?"-":e.unref(r.dataLabel)({v:o.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ne)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:G.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(se._sfc_main,{show:v.value.showTooltip&&x.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:k.value,content:$.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({...T.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(ce.default,{key:9,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(ue.DataTable,{key:`table_${L.value}`,colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Pe)]),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)],14,he))}},Ee=pe._export_sfc(Ve,[["__scopeId","data-v-9e3163ed"]]);exports.default=Ee;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-BtqOSPWK.cjs"),re=require("./Legend-D_dNnmCH.cjs"),ne=require("./Title-BJut0KCO.cjs"),se=require("./Tooltip-OW2BdLyv.cjs"),ue=require("./DataTable-D-c7laSt.cjs"),U=require("./usePrinter-SEUTEAmF.cjs"),ie=require("./vue-ui-skeleton-CCo2ROV1.cjs"),ce=require("./vue-ui-accordion-iiUNHeV-.cjs"),H=require("./useNestedProp-C7FKZW2F.cjs"),de=require("./PackageVersion-C2JzxDlg.cjs"),ve=require("./PenAndPaper-Bur5hR1K.cjs"),pe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),he=["id"],fe={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ye={key:2,style:"width:100%;background:transparent;padding-bottom:24px"},ge=["xmlns","viewBox"],me=["id"],be=["stdDeviation"],ke=["d","stroke","stroke-width"],Ce=["d","stroke","stroke-width"],we=["filter"],xe=["d","stroke","stroke-width"],$e=["d","stroke-width","onMouseenter","onClick"],Be={key:5,class:"vue-data-ui-watermark"},Ne=["onClick"],Te={key:0},_e={key:1},Se={key:8,ref:"source",dir:"auto"},Pe=["innerHTML"],Ve={__name:"vue-ui-galaxy",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectLegend","selectDatapoint"],setup(X,{expose:j,emit:S}){const i=X,{vue_ui_galaxy:Y}=r.useConfig(),b=e.computed(()=>!!i.dataset&&i.dataset.length);e.onMounted(()=>{P()});function P(){r.objectIsEmpty(i.dataset)?r.error({componentName:"VueUiGalaxy",type:"dataset"}):i.dataset.forEach((l,a)=>{r.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","values"]}).forEach(o=>{r.error({componentName:"VueUiGalaxy",type:"datasetSerieAttribute",property:o,index:a})})})}const y=e.ref(r.createUid()),k=e.ref(null),J=e.ref(null),x=e.ref(!1),$=e.ref(""),c=e.ref(null),V=e.ref(0),E=e.ref(0),L=e.ref(0),O=e.ref(0),t=e.computed({get:()=>A(),set:l=>l});function A(){const l=H.useNestedProp({userConfig:i.config,defaultConfig:Y});return l.theme?{...H.useNestedProp({userConfig:r.themes.vue_ui_galaxy[l.theme]||i.config,defaultConfig:l}),customPalette:r.themePalettes[l.theme]||r.palette}:l}e.watch(()=>i.config,l=>{t.value=A(),P(),E.value+=1,L.value+=1,O.value+=1},{deep:!0});const{isPrinting:F,isImaging:I,generatePdf:z,generateImage:D}=U.usePrinter({elementId:`galaxy_${y.value}`,fileName:t.value.style.chart.title.text||"vue-ui-galaxy"}),K=e.computed(()=>t.value.userOptions.show&&!t.value.style.chart.title.text),Q=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}),B=e.ref({height:180,width:250}),u=e.ref([]);function N(l){u.value.includes(l.id)?u.value=u.value.filter(a=>a!==l.id):u.value.push(l.id),S("selectLegend",g.value.map(a=>({name:a.name,color:a.color,value:a.value})))}const h=e.computed(()=>i.dataset.map((l,a)=>({name:l.name,color:r.convertColorToHex(l.color)||Q.value[a]||r.palette[a]||r.palette[a%r.palette.length],value:l.values?r.sanitizeArray(l.values).reduce((o,n)=>o+n,0):0,absoluteValues:r.sanitizeArray(l.values),id:r.createUid(),seriesIndex:a})).sort((l,a)=>a.value-l.value));function Z(){return h.value.map(l=>({name:l.name,color:l.color,value:l.value}))}const d=e.computed(()=>h.value.filter(l=>!u.value.includes(l.id)).map(l=>l.value).reduce((l,a)=>l+a,0)),ee=e.ref(190),q=e.computed(()=>h.value.filter(l=>!u.value.includes(l.id))),g=e.computed(()=>{const l=[];for(let a=0;a<q.value.length;a+=1){const o=q.value[a];let n=o.value/d.value*ee.value;a>0&&l.length&&(n+=l[a-1].points),l.push({points:n,...o,seriesIndex:a,proportion:o.value/d.value,path:r.createSpiralPath({points:n,startX:115+t.value.style.chart.layout.arcs.offsetX,startY:90+t.value.style.chart.layout.arcs.offsetY})})}return l.filter((a,o)=>!u.value.includes(a.id)).toSorted((a,o)=>o.points-a.points)}),m=e.ref(!1);function te(l){m.value=l,V.value+=1}const T=e.ref(null);function le({datapoint:l,_relativeIndex:a,seriesIndex:o,show:n=!1}){T.value={datapoint:l,seriesIndex:o,series:h.value,config:t.value},x.value=n,c.value=l.id;let s="";const f=t.value.style.chart.tooltip.customFormat;r.isFunction(f)&&r.functionReturnsString(()=>f({seriesIndex:o,datapoint:l,series:h.value,config:t.value}))?$.value=f({seriesIndex:o,datapoint:l,series:h.value,config:t.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;">${l.name}</div>`,s+=`<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&&(s+=`<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?s+=`<span>(${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})})</span></div>`:s+=`<b>${r.dataLabel({v:l.proportion*100,s:"%",r:t.value.style.chart.tooltip.roundingPercentage})}</b></div>`),$.value=`<div>${s}</div>`)}const G=e.computed(()=>h.value.map((l,a)=>({...l,proportion:(l.value||0)/i.dataset.map(o=>(o.values||[]).reduce((n,s)=>n+s,0)).reduce((o,n)=>o+n,0),opacity:u.value.includes(l.id)?.5:1,shape:l.shape||"circle",segregate:()=>N(l),isSegregated:u.value.includes(l.id)}))),oe=e.computed(()=>({cy:"galaxy-div-legend",backgroundColor:t.value.style.chart.legend.backgroundColor,color:t.value.style.chart.legend.color,fontSize:t.value.style.chart.legend.fontSize,paddingBottom:12,fontWeight:t.value.style.chart.legend.bold?"bold":""})),p=e.computed(()=>{const l=g.value.map(o=>({name:o.name,color:o.color})),a=g.value.map(o=>o.value);return{head:l,body:a}});function M(){e.nextTick(()=>{const l=p.value.head.map((n,s)=>[[n.name],[p.value.body[s]],[isNaN(p.value.body[s]/d.value)?"-":p.value.body[s]/d.value*100]]),a=[[t.value.style.chart.title.text],[t.value.style.chart.title.subtitle.text],[[""],["val"],["%"]]].concat(l),o=r.createCsvContent(a);r.downloadCsv({csvContent:o,title:t.value.style.chart.title.text||"vue-ui-galaxy"})})}const C=e.computed(()=>{const l=[' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:d.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue}),"100%"],a=p.value.head.map((s,f)=>{const ae=r.dataLabel({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:p.value.body[f],s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.table.td.roundingValue});return[{color:s.color,name:s.name},ae,isNaN(p.value.body[f]/d.value)?"-":r.dataLabel({v:p.value.body[f]/d.value*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:a,config:o}});function W(){v.value.showTable=!v.value.showTable}function R(){v.value.showTooltip=!v.value.showTooltip}const w=e.ref(!1);function _(){w.value=!w.value}return j({getData:Z,generatePdf:z,generateCsv:M,generateImage:D,toggleTable:W,toggleTooltip:R,toggleAnnotator:_}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"galaxyChart",ref:k,class:e.normalizeClass(`vue-ui-galaxy ${m.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;${t.value.style.chart.title.text?"":"padding-top:36px"};background:${t.value.style.chart.backgroundColor}`),id:`galaxy_${y.value}`},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ve.PenAndPaper,{key:0,parent:k.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:w.value,onClose:_},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),K.value?(e.openBlock(),e.createElementBlock("div",fe,null,512)):e.createCommentVNode("",!0),t.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(),e.createBlock(ne._sfc_main,{key:`title_${E.value}`,config:{title:{cy:"galaxy-div-title",...t.value.style.chart.title},subtitle:{cy:"galaxy-div-subtitle",...t.value.style.chart.title.subtitle}}},null,8,["config"]))])):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value?(e.openBlock(),e.createBlock(U.UserOptions,{ref_key:"details",ref:J,key:`user_option_${V.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isPrinting:e.unref(F),isImaging:e.unref(I),uid:y.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.chart.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isTooltip:v.value.showTooltip,isFullscreen:m.value,titles:{...t.value.userOptions.buttonTitles},chartElement:k.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:te,onGeneratePdf:e.unref(z),onGenerateCsv:M,onGenerateImage:e.unref(D),onToggleTable:W,onToggleTooltip:R,onToggleAnnotator:_},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,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:"6"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":m.value,"vue-data-ui-fulscreen--off":!m.value}),viewBox:`0 0 ${B.value.width} ${B.value.height}`,style:e.normalizeStyle(`max-width:100%; overflow: visible; background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(de._sfc_main),e.createElementVNode("defs",null,[e.createElementVNode("filter",{id:`blur_${y.value}`,x:"-50%",y:"-50%",width:"200%",height:"200%"},[e.createElementVNode("feGaussianBlur",{in:"SourceGraphic",stdDeviation:100/t.value.style.chart.layout.arcs.gradient.intensity},null,8,be)],8,me)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,o=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:t.value.style.chart.backgroundColor,"stroke-width":(t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth)*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round"},null,8,ke)):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("path",{key:1,d:o.path,fill:"none",stroke:o.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,Ce)):e.createCommentVNode("",!0),o.value&&t.value.style.chart.layout.arcs.gradient.show?(e.openBlock(),e.createElementBlock("g",{key:2,filter:`url(#blur_${y.value})`},[e.createElementVNode("path",{d:o.path,fill:"none",stroke:t.value.style.chart.layout.arcs.gradient.color,"stroke-width":t.value.style.chart.layout.arcs.strokeWidth/2*(c.value===o.id&&t.value.style.chart.layout.arcs.hoverEffect.show?t.value.style.chart.layout.arcs.hoverEffect.multiplicator:1),"stroke-linecap":"round",class:e.normalizeClass(`vue-ui-galaxy-gradient ${c.value&&c.value!==o.id&&t.value.useBlurOnHover?"vue-ui-galaxy-blur":""}`)},null,10,xe)],8,we)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:o.path,fill:"none",stroke:"transparent","stroke-width":t.value.style.chart.layout.arcs.strokeWidth+t.value.style.chart.layout.arcs.borderWidth,"stroke-linecap":"round",onMouseenter:s=>le({datapoint:o,relativeIndex:n,seriesIndex:o.seriesIndex,show:!0}),onMouseleave:a[0]||(a[0]=s=>{x.value=!1,c.value=null}),onClick:s=>S("selectDatapoint",o)},null,40,$e)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(l.$slots,"svg",{svg:B.value},void 0,!0)],14,ge)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Be,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(F)||e.unref(I)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ie.default,{key:6,config:{type:"galaxy",style:{backgroundColor:t.value.style.chart.backgroundColor,galaxy:{color:"#CCCCCC"}}}},null,8,["config"])),t.value.style.chart.legend.show?(e.openBlock(),e.createBlock(re.Legend,{key:`legend_${O.value}`,legendSet:G.value,config:oe.value,onClickMarker:a[1]||(a[1]=({legend:o})=>N(o))},{item:e.withCtx(({legend:o,index:n})=>[e.createElementVNode("div",{onClick:s=>N(o),style:e.normalizeStyle(`opacity:${u.value.includes(o.id)?.5:1}`)},[e.createTextVNode(e.toDisplayString(o.name)+": "+e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.chart.layout.labels.dataLabels.formatter,o.value,e.unref(r.dataLabel)({p:t.value.style.chart.layout.labels.dataLabels.prefix,v:o.value,s:t.value.style.chart.layout.labels.dataLabels.suffix,r:t.value.style.chart.legend.roundingValue}),{datapoint:o,seriesIndex:n}))+" ",1),u.value.includes(o.id)?(e.openBlock(),e.createElementBlock("span",_e," ( - % ) ")):(e.openBlock(),e.createElementBlock("span",Te," ("+e.toDisplayString(isNaN(o.value/d.value)?"-":e.unref(r.dataLabel)({v:o.value/d.value*100,s:"%",r:t.value.style.chart.legend.roundingPercentage}))+") ",1))],12,Ne)]),_:1},8,["legendSet","config"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"legend",{legend:G.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",Se,[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(se._sfc_main,{show:v.value.showTooltip&&x.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:k.value,content:$.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({...T.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...T.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isCustom"]),b.value?(e.openBlock(),e.createBlock(ce.default,{key:9,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(ue.DataTable,{key:`table_${L.value}`,colNames:C.value.colNames,head:C.value.head,body:C.value.body,config:C.value.config,title:`${t.value.style.chart.title.text}${t.value.style.chart.title.subtitle.text?` : ${t.value.style.chart.title.subtitle.text}`:""}`,onClose:a[2]||(a[2]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createElementVNode("div",{innerHTML:o,style:{display:"flex","align-items":"center"}},null,8,Pe)]),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)],14,he))}},Ee=pe._export_sfc(Ve,[["__scopeId","data-v-9e3163ed"]]);exports.default=Ee;
|