vue-data-ui 3.22.13 → 3.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +13 -1
- package/dist/{Arrow-DKx74WtM.js → Arrow-o2qHNvrC.js} +1 -1
- package/dist/{BaseDraggableDialog-3n8udWmh.js → BaseDraggableDialog-qTnfhLBz.js} +2 -2
- package/dist/{BaseIcon-CP5RWnqt.js → BaseIcon-91MZoczJ.js} +4 -3
- package/dist/{BaseLegendToggle-DsWphmIb.js → BaseLegendToggle-CtAPwzr2.js} +1 -1
- package/dist/{BaseZoomControls-C9_ygNN4.js → BaseZoomControls-rdzlicuz.js} +2 -2
- package/dist/{ColorPicker-3N_HVgXs.js → ColorPicker-CIAkdPrj.js} +2 -2
- package/dist/{DataTable-DzPEVvSo.js → DataTable-D4tM9s5Y.js} +2 -2
- package/dist/HillActions-BWhxHlrj.js +187 -0
- package/dist/{Legend-C0xAnJdO.js → Legend-CQTRlzK-.js} +2 -2
- package/dist/{NonSvgPenAndPaper-B_mE5UbR.js → NonSvgPenAndPaper-Cawacw1W.js} +19 -19
- package/dist/{PackageVersion-B6Hokxw9.js → PackageVersion--QCMh5k_.js} +1 -1
- package/dist/{PenAndPaper-CSMVXpg2.js → PenAndPaper-cE4J8-rA.js} +11 -11
- package/dist/{Shape-BfnXr1nJ.js → Shape-BPMV94Ij.js} +3 -3
- package/dist/{Slicer-C6qNUmZ4.js → Slicer-5yIrdoJv.js} +15 -15
- package/dist/SlicerPreview-DvjLV2TW.js +1689 -0
- package/dist/{SparkTooltip-uoUiL_P8.js → SparkTooltip-BaYtEKS6.js} +6 -6
- package/dist/Title-BODtwViI.js +87 -0
- package/dist/{Tooltip-CA1rtSyl.js → Tooltip-CMTGxeYO.js} +1 -1
- package/dist/{UserOptions-DzAFK9cY.js → UserOptions-3ujTo3LD.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +2 -0
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{dom-to-png-BdAFKZQg.js → dom-to-png-4tdMNGPX.js} +1 -1
- package/dist/exposedLib-DWLRqRhv.js +25 -0
- package/dist/{img-Bikk1dGb.js → img-DIQG5q8T.js} +1 -1
- package/dist/{labelUtils-BUhssos9.js → labelUtils-C5lnc_xc.js} +1 -1
- package/dist/{lib-CFm_J26b.js → lib-BuMGJ_a0.js} +216 -173
- package/dist/{package-DmDydylu.js → package-BMc_ZieJ.js} +1 -1
- package/dist/{pdf-zmz3l2uy.js → pdf-Cnz4NKM9.js} +1 -1
- package/dist/{render-common-BIG8JYGK.js → render-common-Ktg2LZFG.js} +21 -21
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +493 -0
- package/dist/types/vue-ui-hill.d.ts +90 -0
- package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +122 -0
- package/dist/{useConfig-C0V0eG7L.js → useConfig-BilxnBNr.js} +767 -476
- package/dist/useHints-Dq_w2E8B.js +66 -0
- package/dist/{useNestedProp-BY6DNN3i.js → useNestedProp--NSEmhOH.js} +1 -1
- package/dist/{useObjectBindings-Djwpii4d.js → useObjectBindings-Cwq7NcQz.js} +3 -2
- package/dist/{usePrinter-BH-xle1O.js → usePrinter-BFvi4jVy.js} +2 -2
- package/dist/useTransitions-g_zBREk2.js +39 -0
- package/dist/utils.js +14 -14
- package/dist/{vue-data-ui-rkzh6EkO.js → vue-data-ui-EsawKe_W.js} +85 -81
- package/dist/vue-data-ui.js +77 -76
- package/dist/vue-ui-3d-bar-RSUS2xpL.js +1849 -0
- package/dist/{vue-ui-accordion-UA88lv4d.js → vue-ui-accordion-61MlW-Ge.js} +4 -4
- package/dist/vue-ui-age-pyramid-CgnPWA93.js +1263 -0
- package/dist/vue-ui-annotator-DBRT85HG.js +2913 -0
- package/dist/vue-ui-bullet-Bc3-WaN1.js +724 -0
- package/dist/{vue-ui-bump-BS7RCf0Z.js → vue-ui-bump-Dvv3iSKr.js} +332 -295
- package/dist/{vue-ui-candlestick-BZSGDKrM.js → vue-ui-candlestick-DvvsrIdp.js} +464 -440
- package/dist/vue-ui-carousel-table-DtsNVim8.js +463 -0
- package/dist/vue-ui-chestnut-ArloORzP.js +2068 -0
- package/dist/{vue-ui-chord-D6G7ceE-.js → vue-ui-chord-xX5gWZy8.js} +430 -424
- package/dist/vue-ui-circle-pack-D8wykmqg.js +1638 -0
- package/dist/{vue-ui-cursor-BpN5MsXM.js → vue-ui-cursor-CxgE6Phh.js} +61 -61
- package/dist/{vue-ui-dag-BzgOgXzU.js → vue-ui-dag-C9Sf9vH7.js} +924 -916
- package/dist/vue-ui-dashboard-bGmaglAj.js +520 -0
- package/dist/{vue-ui-digits-OMPrn8fb.js → vue-ui-digits-DgDE-_Fn.js} +58 -50
- package/dist/vue-ui-donut-B_n6wF6B.js +2440 -0
- package/dist/{vue-ui-donut-Cp5NbZ1r.js → vue-ui-donut-Bmo149AR.js} +113 -113
- package/dist/{vue-ui-donut-evolution-DHVi5rOn.js → vue-ui-donut-evolution-D6vH_hfx.js} +528 -447
- package/dist/vue-ui-dumbbell-BX4Ao_wR.js +1582 -0
- package/dist/{vue-ui-flow-BusUK3H0.js → vue-ui-flow-Bshw8pT_.js} +415 -407
- package/dist/vue-ui-funnel-CjYosIik.js +797 -0
- package/dist/vue-ui-galaxy-CvXgy-dy.js +1111 -0
- package/dist/vue-ui-gauge-CByT0_vF.js +953 -0
- package/dist/{vue-ui-geo-CyFgFKlh.js → vue-ui-geo-C-gSZL2q.js} +378 -363
- package/dist/{vue-ui-gizmo-DdeXwCQp.js → vue-ui-gizmo-CJdxyPID.js} +57 -49
- package/dist/{vue-ui-heatmap-D8-qJ7fg.js → vue-ui-heatmap-DEEKv8ip.js} +498 -490
- package/dist/vue-ui-hill-D7LYAgAL.js +1768 -0
- package/dist/{vue-ui-history-plot-C2Aqk2ON.js → vue-ui-history-plot-BhcU94Pt.js} +553 -556
- package/dist/vue-ui-horizontal-bar-CfFye5tL.js +1733 -0
- package/dist/vue-ui-kpi-DCBnNfTb.js +104 -0
- package/dist/vue-ui-mini-loader-CtWpqnLW.js +133 -0
- package/dist/vue-ui-molecule-D3igGyOy.js +958 -0
- package/dist/{vue-ui-mood-radar-BiOjxFEN.js → vue-ui-mood-radar-sl6DMxqR.js} +349 -341
- package/dist/{vue-ui-nested-donuts-Cl1HVvDp.js → vue-ui-nested-donuts-aS4YzaB3.js} +449 -413
- package/dist/vue-ui-onion-EhPTZpW_.js +1258 -0
- package/dist/vue-ui-parallel-coordinate-plot-DE9wTmQQ.js +1455 -0
- package/dist/{vue-ui-quadrant-B21LkUc8.js → vue-ui-quadrant-SaY_RPSE.js} +625 -617
- package/dist/vue-ui-quick-chart-CJ9rejnj.js +2389 -0
- package/dist/{vue-ui-radar-CyzAyVos.js → vue-ui-radar-CaNen5Fj.js} +356 -310
- package/dist/vue-ui-rating--K7rX2an.js +360 -0
- package/dist/vue-ui-relation-circle-FLs8vOxQ.js +925 -0
- package/dist/vue-ui-ridgeline-Beg5hshN.js +1663 -0
- package/dist/{vue-ui-rings-FtcdX8xl.js → vue-ui-rings-BevKD8P-.js} +449 -423
- package/dist/{vue-ui-scatter-Cp_-2ahf.js → vue-ui-scatter-CNA7jF-o.js} +721 -702
- package/dist/{vue-ui-skeleton-COytVrfN.js → vue-ui-skeleton-B9ZP1w-i.js} +395 -387
- package/dist/{vue-ui-smiley-Da2jgkb7.js → vue-ui-smiley-DYnqqk6u.js} +128 -120
- package/dist/{vue-ui-spark-trend-DC2KUlEY.js → vue-ui-spark-trend-R0ebpg-G.js} +132 -117
- package/dist/{vue-ui-sparkbar-DdxQOFIF.js → vue-ui-sparkbar-DYC3By0v.js} +119 -111
- package/dist/{vue-ui-sparkgauge-DTA-fORH.js → vue-ui-sparkgauge-Bw6no-In.js} +76 -68
- package/dist/vue-ui-sparkhistogram-DvRKy8rq.js +590 -0
- package/dist/{vue-ui-sparkline-DcR_N-zT.js → vue-ui-sparkline-Dz1uzBos.js} +389 -364
- package/dist/vue-ui-sparkstackbar-DlnPdZih.js +692 -0
- package/dist/vue-ui-stackbar-B-THcavY.js +2350 -0
- package/dist/vue-ui-stackline-3dBPoI0h.js +2464 -0
- package/dist/{vue-ui-strip-plot-NLCwYvyw.js → vue-ui-strip-plot-ACeYOoHj.js} +505 -484
- package/dist/vue-ui-table-heatmap-DVwMqzje.js +364 -0
- package/dist/{vue-ui-table-AM9brdwU.js → vue-ui-table-rFy16bp0.js} +512 -504
- package/dist/{vue-ui-table-sparkline-BE6DAvur.js → vue-ui-table-sparkline-CABJzK8p.js} +207 -181
- package/dist/vue-ui-thermometer-CVQ-H69Q.js +777 -0
- package/dist/{vue-ui-timer-BZM5ITG9.js → vue-ui-timer-Bm8LpsnI.js} +66 -58
- package/dist/{vue-ui-tiremarks-BCncDpHX.js → vue-ui-tiremarks-DB3f5qiz.js} +127 -119
- package/dist/vue-ui-treemap-DP0Sx8Y8.js +1760 -0
- package/dist/vue-ui-waffle-iPpdk1Bm.js +1412 -0
- package/dist/vue-ui-wheel-BJkEYfLj.js +892 -0
- package/dist/{vue-ui-word-cloud-D7R7nhk1.js → vue-ui-word-cloud-B2sxtel9.js} +440 -432
- package/dist/{vue-ui-world-DZBt-07p.js → vue-ui-world-BBQZLnzm.js} +343 -335
- package/dist/vue-ui-xy-ChZg7AtI.js +1364 -0
- package/dist/{vue-ui-xy-CluEZ7lS.js → vue-ui-xy-DZj5DT-q.js} +1633 -1587
- package/dist/{vue-ui-xy-canvas-7YSYRdwr.js → vue-ui-xy-canvas-BN2u0bOJ.js} +456 -430
- package/dist/vue_ui_hill-dnltu0L-.js +368 -0
- package/package.json +2 -2
- package/dist/SlicerPreview-Cw6WMVhG.js +0 -1689
- package/dist/Title-BuPs74IB.js +0 -87
- package/dist/exposedLib-Ciw6TGtP.js +0 -25
- package/dist/useAutoSizeLabelsInsideViewbox-C9RNjsGv.js +0 -50
- package/dist/useMountedDelay-BAjrhRJb.js +0 -14
- package/dist/vue-ui-3d-bar-D5xHEWr1.js +0 -1824
- package/dist/vue-ui-age-pyramid-CAJg01c7.js +0 -1246
- package/dist/vue-ui-annotator-q3ZKx6ua.js +0 -2905
- package/dist/vue-ui-bullet-ByeaWGfI.js +0 -709
- package/dist/vue-ui-carousel-table-DO5NRXvX.js +0 -455
- package/dist/vue-ui-chestnut-BfeSPeEh.js +0 -2042
- package/dist/vue-ui-circle-pack-Cqmlw7AV.js +0 -1610
- package/dist/vue-ui-dashboard-DLvGJXJY.js +0 -512
- package/dist/vue-ui-donut-ZIRebAWc.js +0 -2418
- package/dist/vue-ui-dumbbell-gDYjU2oF.js +0 -1564
- package/dist/vue-ui-funnel-BtaYaU0r.js +0 -781
- package/dist/vue-ui-galaxy-BMp-HzDh.js +0 -1076
- package/dist/vue-ui-gauge-CBou0cFE.js +0 -925
- package/dist/vue-ui-horizontal-bar-BuwxI7d1.js +0 -1689
- package/dist/vue-ui-kpi-ByxoO01r.js +0 -96
- package/dist/vue-ui-mini-loader-D9pprk2c.js +0 -125
- package/dist/vue-ui-molecule-BqJJq49_.js +0 -932
- package/dist/vue-ui-onion-CRQOxurS.js +0 -1199
- package/dist/vue-ui-parallel-coordinate-plot-Dhn18RtR.js +0 -1412
- package/dist/vue-ui-quick-chart-DAhSXYnp.js +0 -2443
- package/dist/vue-ui-rating-DbxK-ftN.js +0 -352
- package/dist/vue-ui-relation-circle-Cb33DMZo.js +0 -917
- package/dist/vue-ui-ridgeline-D7aArzQk.js +0 -1627
- package/dist/vue-ui-sparkhistogram-D1oFTrvt.js +0 -575
- package/dist/vue-ui-sparkstackbar-BlFio0lP.js +0 -674
- package/dist/vue-ui-stackbar-Cu13EdVa.js +0 -2322
- package/dist/vue-ui-stackline-DKL0o_-3.js +0 -2427
- package/dist/vue-ui-table-heatmap-CSI482KG.js +0 -338
- package/dist/vue-ui-thermometer-D6Czx7Fb.js +0 -769
- package/dist/vue-ui-treemap-BOEYCOdk.js +0 -1727
- package/dist/vue-ui-waffle-BrM8IHdG.js +0 -1367
- package/dist/vue-ui-wheel-BNsajigQ.js +0 -884
- package/dist/vue-ui-xy-Dt_1bSBT.js +0 -1364
|
@@ -0,0 +1,1733 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { $ as t, Bt as n, D as r, G as i, Gt as a, Jt as o, Kt as s, Pt as c, S as l, Vt as ee, X as u, b as d, ct as te, ft as ne, i as re, jt as ie, q as ae, t as oe, tt as se, vt as ce, w as le, xt as ue } from "./lib-BuMGJ_a0.js";
|
|
3
|
+
import { n as de, t as fe } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as pe } from "./useConfig-BilxnBNr.js";
|
|
5
|
+
import { t as me } from "./usePrinter-BFvi4jVy.js";
|
|
6
|
+
import { n as he, t as ge } from "./BaseScanner-DZvpgOjM.js";
|
|
7
|
+
import { t as _e } from "./useSvgExport-Ba9qBr9M.js";
|
|
8
|
+
import { t as ve } from "./useNestedProp--NSEmhOH.js";
|
|
9
|
+
import { t as ye } from "./useThemeCheck-C43Tcqmk.js";
|
|
10
|
+
import { t as be } from "./useTransitions-g_zBREk2.js";
|
|
11
|
+
import { t as xe } from "./img-DIQG5q8T.js";
|
|
12
|
+
import { n as Se } from "./Title-BODtwViI.js";
|
|
13
|
+
import { t as Ce } from "./Shape-BPMV94Ij.js";
|
|
14
|
+
import { t as we } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
15
|
+
import { l as Te, t as Ee } from "./useResponsive-ZtArZtUf.js";
|
|
16
|
+
import { t as De } from "./DefGrad-DVBqDjhO.js";
|
|
17
|
+
import { t as Oe } from "./vue-ui-accordion-61MlW-Ge.js";
|
|
18
|
+
import { t as ke } from "./BaseLegendToggle-CtAPwzr2.js";
|
|
19
|
+
import { t as Ae } from "./A11yDataTable-DdRsVULz.js";
|
|
20
|
+
import { t as je } from "./useUserOptionState-DK-_1ddE.js";
|
|
21
|
+
import { t as Me } from "./useChartAccessibility-DYqac8yF.js";
|
|
22
|
+
import { t as Ne } from "./useTableResponsive-BAqJPR68.js";
|
|
23
|
+
import { t as Pe } from "./Legend-CQTRlzK-.js";
|
|
24
|
+
import { t as Fe } from "./vue_ui_horizontal_bar-C4J4QzXf.js";
|
|
25
|
+
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as Ie, createTextVNode as Le, createVNode as Re, defineAsyncComponent as ze, guardReactiveProps as v, mergeProps as Be, nextTick as Ve, normalizeClass as y, normalizeProps as b, normalizeStyle as x, onBeforeUnmount as He, onMounted as Ue, openBlock as S, ref as C, renderList as w, renderSlot as T, resolveDynamicComponent as We, toDisplayString as E, toRefs as Ge, unref as D, useCssVars as Ke, useSlots as qe, watch as Je, withCtx as O, withKeys as Ye } from "vue";
|
|
26
|
+
//#region src/components/vue-ui-horizontal-bar.vue
|
|
27
|
+
var Xe = /* @__PURE__ */ e({ default: () => Rt }), Ze = ["id"], Qe = ["id"], $e = ["onClick"], et = { style: { position: "relative" } }, tt = [
|
|
28
|
+
"xmlns",
|
|
29
|
+
"viewBox",
|
|
30
|
+
"aria-describedby"
|
|
31
|
+
], nt = ["width", "height"], rt = { key: 1 }, it = [
|
|
32
|
+
"y",
|
|
33
|
+
"width",
|
|
34
|
+
"height",
|
|
35
|
+
"fill",
|
|
36
|
+
"rx"
|
|
37
|
+
], at = [
|
|
38
|
+
"x",
|
|
39
|
+
"y",
|
|
40
|
+
"width",
|
|
41
|
+
"height",
|
|
42
|
+
"fill",
|
|
43
|
+
"rx"
|
|
44
|
+
], ot = [
|
|
45
|
+
"x",
|
|
46
|
+
"y",
|
|
47
|
+
"width",
|
|
48
|
+
"height",
|
|
49
|
+
"fill",
|
|
50
|
+
"rx",
|
|
51
|
+
"stroke",
|
|
52
|
+
"stroke-width"
|
|
53
|
+
], st = [
|
|
54
|
+
"x",
|
|
55
|
+
"y",
|
|
56
|
+
"width",
|
|
57
|
+
"height",
|
|
58
|
+
"fill",
|
|
59
|
+
"rx",
|
|
60
|
+
"stroke",
|
|
61
|
+
"stroke-width"
|
|
62
|
+
], ct = [
|
|
63
|
+
"stroke",
|
|
64
|
+
"stroke-width",
|
|
65
|
+
"d"
|
|
66
|
+
], lt = [
|
|
67
|
+
"stroke",
|
|
68
|
+
"stroke-width",
|
|
69
|
+
"d"
|
|
70
|
+
], ut = [
|
|
71
|
+
"y",
|
|
72
|
+
"height",
|
|
73
|
+
"width",
|
|
74
|
+
"fill"
|
|
75
|
+
], dt = [
|
|
76
|
+
"transform",
|
|
77
|
+
"font-size",
|
|
78
|
+
"fill",
|
|
79
|
+
"font-weight",
|
|
80
|
+
"innerHTML"
|
|
81
|
+
], ft = [
|
|
82
|
+
"transform",
|
|
83
|
+
"font-size",
|
|
84
|
+
"fill",
|
|
85
|
+
"font-weight"
|
|
86
|
+
], pt = [
|
|
87
|
+
"transform",
|
|
88
|
+
"font-size",
|
|
89
|
+
"font-weight",
|
|
90
|
+
"innerHTML"
|
|
91
|
+
], mt = [
|
|
92
|
+
"transform",
|
|
93
|
+
"font-size",
|
|
94
|
+
"fill",
|
|
95
|
+
"font-weight",
|
|
96
|
+
"innerHTML"
|
|
97
|
+
], ht = [
|
|
98
|
+
"transform",
|
|
99
|
+
"text-anchor",
|
|
100
|
+
"font-size",
|
|
101
|
+
"fill",
|
|
102
|
+
"font-weight"
|
|
103
|
+
], gt = [
|
|
104
|
+
"y",
|
|
105
|
+
"width",
|
|
106
|
+
"height",
|
|
107
|
+
"fill",
|
|
108
|
+
"onMouseenter",
|
|
109
|
+
"onMouseleave",
|
|
110
|
+
"onClick"
|
|
111
|
+
], _t = {
|
|
112
|
+
key: 0,
|
|
113
|
+
style: {
|
|
114
|
+
position: "absolute",
|
|
115
|
+
top: "100%",
|
|
116
|
+
left: "0",
|
|
117
|
+
width: "100%"
|
|
118
|
+
},
|
|
119
|
+
"data-dom-to-png-ignore": "",
|
|
120
|
+
"aria-hidden": "true"
|
|
121
|
+
}, vt = {
|
|
122
|
+
key: 6,
|
|
123
|
+
class: "vue-data-ui-watermark"
|
|
124
|
+
}, yt = ["onClick"], bt = { style: "width:100%;padding-top: 36px;position:relative" }, xt = { class: "vue-ui-data-table" }, St = { key: 0 }, Ct = { style: { width: "100%" } }, wt = ["data-cell"], Tt = { style: {
|
|
125
|
+
display: "flex",
|
|
126
|
+
"align-items": "center",
|
|
127
|
+
gap: "5px",
|
|
128
|
+
"justify-content": "flex-end",
|
|
129
|
+
width: "100%",
|
|
130
|
+
"padding-right": "3px"
|
|
131
|
+
} }, Et = ["data-cell"], Dt = { style: {
|
|
132
|
+
display: "flex",
|
|
133
|
+
"align-items": "center",
|
|
134
|
+
gap: "5px",
|
|
135
|
+
"justify-content": "flex-end",
|
|
136
|
+
width: "100%",
|
|
137
|
+
"padding-right": "3px"
|
|
138
|
+
} }, Ot = ["data-cell"], kt = { style: {
|
|
139
|
+
display: "flex",
|
|
140
|
+
"align-items": "center",
|
|
141
|
+
gap: "5px",
|
|
142
|
+
"justify-content": "flex-end",
|
|
143
|
+
width: "100%",
|
|
144
|
+
"padding-right": "3px"
|
|
145
|
+
} }, At = ["data-cell"], jt = { style: {
|
|
146
|
+
display: "flex",
|
|
147
|
+
"align-items": "center",
|
|
148
|
+
gap: "5px",
|
|
149
|
+
"justify-content": "flex-end",
|
|
150
|
+
width: "100%",
|
|
151
|
+
"padding-right": "3px"
|
|
152
|
+
} }, Mt = ["data-cell"], Nt = { style: {
|
|
153
|
+
display: "flex",
|
|
154
|
+
"align-items": "center",
|
|
155
|
+
gap: "5px",
|
|
156
|
+
"justify-content": "flex-end",
|
|
157
|
+
width: "100%",
|
|
158
|
+
"padding-right": "3px"
|
|
159
|
+
} }, Pt = ["data-cell"], Ft = { style: {
|
|
160
|
+
display: "flex",
|
|
161
|
+
"align-items": "center",
|
|
162
|
+
gap: "5px",
|
|
163
|
+
"justify-content": "flex-end",
|
|
164
|
+
width: "100%",
|
|
165
|
+
"padding-right": "3px"
|
|
166
|
+
} }, It = ["data-cell"], Lt = { style: {
|
|
167
|
+
display: "flex",
|
|
168
|
+
"align-items": "center",
|
|
169
|
+
gap: "5px",
|
|
170
|
+
"justify-content": "flex-end",
|
|
171
|
+
width: "100%",
|
|
172
|
+
"padding-right": "3px"
|
|
173
|
+
} }, Rt = /*#__PURE__*/ we({
|
|
174
|
+
__name: "vue-ui-horizontal-bar",
|
|
175
|
+
props: {
|
|
176
|
+
config: {
|
|
177
|
+
type: Object,
|
|
178
|
+
default() {
|
|
179
|
+
return {};
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
dataset: {
|
|
183
|
+
type: Array,
|
|
184
|
+
default() {
|
|
185
|
+
return [];
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
emits: [
|
|
190
|
+
"selectLegend",
|
|
191
|
+
"copyAlt",
|
|
192
|
+
"selectDatapoint"
|
|
193
|
+
],
|
|
194
|
+
setup(e, { expose: we, emit: Xe }) {
|
|
195
|
+
Ke((e) => ({ v0d6b4e74: e.tdo }));
|
|
196
|
+
let Rt = ze(() => import("./Tooltip-CMTGxeYO.js")), zt = ze(() => import("./BaseIcon-91MZoczJ.js").then((e) => e.n)), Bt = ze(() => import("./PenAndPaper-cE4J8-rA.js").then((e) => e.t)), Vt = ze(() => import("./UserOptions-3ujTo3LD.js").then((e) => e.n)), Ht = ze(() => import("./PackageVersion--QCMh5k_.js").then((e) => e.t)), Ut = ze(() => import("./BaseDraggableDialog-qTnfhLBz.js").then((e) => e.n)), { vue_ui_vertical_bar: Wt } = pe(), { isThemeValid: Gt, warnInvalidTheme: Kt } = ye(), qt = qe(), k = e, Jt = p({
|
|
197
|
+
get() {
|
|
198
|
+
return !!k.dataset && k.dataset.length;
|
|
199
|
+
},
|
|
200
|
+
set(e) {
|
|
201
|
+
return e;
|
|
202
|
+
}
|
|
203
|
+
}), A = C(ae()), Yt = C(!1), Xt = C(""), Zt = C(null), Qt = C(0), j = C(null), $t = C(null), en = C(null), tn = C(null), nn = C(null), rn = C(0), an = C(0), on = C(null), sn = C(null), cn = C(null), ln = C(null), un = C(null), M = C([]), dn = C({
|
|
204
|
+
none: 0,
|
|
205
|
+
asc: 1,
|
|
206
|
+
desc: 2
|
|
207
|
+
}), N = C(0), fn = C(!1), pn = C(0), mn = null, hn = null, gn = C(!1), _n = C(!1), P = C(null), vn = C({
|
|
208
|
+
x: 0,
|
|
209
|
+
y: 0
|
|
210
|
+
}), yn = C("pointer"), bn = Xe, F = C(jn());
|
|
211
|
+
de({
|
|
212
|
+
config: () => F.value,
|
|
213
|
+
dataset: () => k.dataset,
|
|
214
|
+
component: "VueUiHorizontalBar",
|
|
215
|
+
rules: [fe.emptyArray, {
|
|
216
|
+
test: (e) => e.length > 50 || e.some((e) => e.children && e.children.length > 50),
|
|
217
|
+
message: [
|
|
218
|
+
"👀 There are > 50 series / bars, which will probably force users to scroll. Consider:",
|
|
219
|
+
"",
|
|
220
|
+
"▶️ Grouping small values into an \"Other\" category.",
|
|
221
|
+
"",
|
|
222
|
+
"▶️ Using filters, or several instances of the component with subsets of related series."
|
|
223
|
+
]
|
|
224
|
+
}]
|
|
225
|
+
});
|
|
226
|
+
let { transitionEnabled: I } = be({
|
|
227
|
+
config: () => F.value.transitions,
|
|
228
|
+
dataset: () => k.dataset
|
|
229
|
+
}), xn = p(() => F.value.userOptions.useCursorPointer), Sn = p(() => k.config?.skeletonDataset ?? [
|
|
230
|
+
{
|
|
231
|
+
name: "",
|
|
232
|
+
value: 6,
|
|
233
|
+
color: "#d9d9d9"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: "",
|
|
237
|
+
value: 5,
|
|
238
|
+
color: "#d9d9d9"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: "",
|
|
242
|
+
value: 4,
|
|
243
|
+
color: "#d9d9d9"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: "",
|
|
247
|
+
value: 3,
|
|
248
|
+
color: "#d9d9d9"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
name: "",
|
|
252
|
+
value: 2,
|
|
253
|
+
color: "#d9d9d9"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
name: "",
|
|
257
|
+
value: 1,
|
|
258
|
+
color: "#d9d9d9"
|
|
259
|
+
}
|
|
260
|
+
]), Cn = p(() => o({
|
|
261
|
+
defaultConfig: {
|
|
262
|
+
useCssAnimation: !1,
|
|
263
|
+
userOptions: { show: !1 },
|
|
264
|
+
table: { show: !1 },
|
|
265
|
+
style: { chart: {
|
|
266
|
+
backgroundColor: "#99999930",
|
|
267
|
+
layout: {
|
|
268
|
+
bars: {
|
|
269
|
+
offsetX: 110,
|
|
270
|
+
dataLabels: {
|
|
271
|
+
color: "transparent",
|
|
272
|
+
value: {
|
|
273
|
+
prefix: "",
|
|
274
|
+
suffix: "",
|
|
275
|
+
formatter: null
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
nameLabels: { color: "transparent" }
|
|
279
|
+
},
|
|
280
|
+
separators: { color: "#7A7A7A" }
|
|
281
|
+
},
|
|
282
|
+
legend: {
|
|
283
|
+
show: !0,
|
|
284
|
+
backgroundColor: "transparent",
|
|
285
|
+
color: "transparent",
|
|
286
|
+
prefix: "",
|
|
287
|
+
suffix: "",
|
|
288
|
+
formatter: null
|
|
289
|
+
},
|
|
290
|
+
title: {
|
|
291
|
+
color: "#1A1A1A",
|
|
292
|
+
subtitle: { color: "#5A5A5A" }
|
|
293
|
+
}
|
|
294
|
+
} }
|
|
295
|
+
},
|
|
296
|
+
userConfig: F.value.skeletonConfig ?? {}
|
|
297
|
+
})), { loading: wn, FINAL_DATASET: Tn, manualLoading: En } = he({
|
|
298
|
+
...Ge(k),
|
|
299
|
+
FINAL_CONFIG: F,
|
|
300
|
+
prepareConfig: jn,
|
|
301
|
+
callback: () => {
|
|
302
|
+
Promise.resolve().then(async () => {
|
|
303
|
+
V.value.showTable = F.value.table.show, Un();
|
|
304
|
+
});
|
|
305
|
+
},
|
|
306
|
+
skeletonDataset: Sn.value,
|
|
307
|
+
skeletonConfig: o({
|
|
308
|
+
defaultConfig: F.value,
|
|
309
|
+
userConfig: Cn.value
|
|
310
|
+
})
|
|
311
|
+
}), { userOptionsVisible: Dn, setUserOptionsVisibility: On, keepUserOptionState: kn } = je({ config: F.value }), { svgRef: An } = Me({ config: F.value.style.chart.title });
|
|
312
|
+
function jn() {
|
|
313
|
+
let e = ve({
|
|
314
|
+
userConfig: k.config,
|
|
315
|
+
defaultConfig: Wt
|
|
316
|
+
}), t = {}, n = e.theme;
|
|
317
|
+
if (n) if (!Gt.value(e)) Kt(e), t = e;
|
|
318
|
+
else {
|
|
319
|
+
let r = ve({
|
|
320
|
+
userConfig: Fe[n] || k.config,
|
|
321
|
+
defaultConfig: e
|
|
322
|
+
});
|
|
323
|
+
t = {
|
|
324
|
+
...ve({
|
|
325
|
+
userConfig: k.config,
|
|
326
|
+
defaultConfig: r
|
|
327
|
+
}),
|
|
328
|
+
customPalette: e.customPalette.length ? e.customPalette : s[n] || c
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
else t = e;
|
|
332
|
+
return k.config && ce(k.config, "events.datapointEnter") ? t.events.datapointEnter = k.config.events.datapointEnter : t.events.datapointEnter = null, k.config && ce(k.config, "events.datapointLeave") ? t.events.datapointLeave = k.config.events.datapointLeave : t.events.datapointLeave = null, k.config && ce(k.config, "events.datapointClick") ? t.events.datapointClick = k.config.events.datapointClick : t.events.datapointClick = null, t;
|
|
333
|
+
}
|
|
334
|
+
let L = C(F.value.style.chart.width), R = C(F.value.style.chart.height), z = C(F.value.style.chart.layout.bars.gap);
|
|
335
|
+
Je(() => k.config, (e) => {
|
|
336
|
+
wn.value || (F.value = jn()), Dn.value = !F.value.userOptions.showOnChartHover, rn.value += 1, an.value += 1, V.value.showTable = F.value.table.show, V.value.sortDesc = F.value.style.chart.layout.bars.sort === "desc", V.value.showTooltip = F.value.style.chart.tooltip.show, L.value = F.value.style.chart.width, R.value = F.value.style.chart.height, z.value = F.value.style.chart.layout.bars.gap;
|
|
337
|
+
}, { deep: !0 }), Je(() => k.dataset, (e) => {
|
|
338
|
+
Array.isArray(e) && e.length > 0 && (En.value = !1);
|
|
339
|
+
}, { deep: !0 });
|
|
340
|
+
let { isPrinting: Mn, isImaging: Nn, generatePdf: Pn, generateImage: Fn } = me({
|
|
341
|
+
elementId: `vue-ui-vertical-bar_${A.value}`,
|
|
342
|
+
fileName: F.value.style.chart.title.text || "vue-ui-vertical-bar",
|
|
343
|
+
options: F.value.userOptions.print
|
|
344
|
+
}), In = p(() => F.value.userOptions.show && !F.value.style.chart.title.text), Ln = p(() => le(F.value.customPalette)), Rn = C(null), zn = p(() => F.value.table.responsiveBreakpoint), Bn = p(() => !!F.value.debug), Vn = C(0), B = C(null), Hn = C(null);
|
|
345
|
+
function Un() {
|
|
346
|
+
if (j.value && (ie(k.dataset) && (se({
|
|
347
|
+
componentName: "VueUiVerticalBar",
|
|
348
|
+
type: "dataset",
|
|
349
|
+
debug: Bn.value
|
|
350
|
+
}), Jt.value = !1, En.value = !0), ie(k.dataset) || (En.value = F.value.loading), F.value.responsive)) {
|
|
351
|
+
let e = Te(() => {
|
|
352
|
+
let { width: e, height: t } = Ee({
|
|
353
|
+
chart: j.value,
|
|
354
|
+
title: F.value.style.chart.title.text ? $t.value : null,
|
|
355
|
+
legend: F.value.style.chart.legend.show ? en.value : null,
|
|
356
|
+
source: tn.value,
|
|
357
|
+
noTitle: nn.value
|
|
358
|
+
});
|
|
359
|
+
Vn.value = t / 3, requestAnimationFrame(async () => {
|
|
360
|
+
R.value = t, L.value = e;
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
B.value && (Hn.value && B.value.unobserve(Hn.value), B.value.disconnect()), B.value = new ResizeObserver(e), Ve(() => {
|
|
364
|
+
Hn.value = j.value?.parentNode, Hn.value && B.value.observe(Hn.value);
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
He(() => {
|
|
369
|
+
B.value && (Hn.value && B.value.unobserve(Hn.value), B.value.disconnect());
|
|
370
|
+
});
|
|
371
|
+
let V = C({
|
|
372
|
+
showTable: F.value.table.show,
|
|
373
|
+
sortDesc: F.value.style.chart.layout.bars.sort === "desc",
|
|
374
|
+
showTooltip: F.value.style.chart.tooltip.show
|
|
375
|
+
}), Wn = p(() => V.value.sortDesc), H = p(() => (Tn.value.forEach((e, t) => {
|
|
376
|
+
!e.value && !e.children && se({
|
|
377
|
+
componentName: "VueUiVerticalBar",
|
|
378
|
+
type: "datasetAttributeEmpty",
|
|
379
|
+
property: `value (index ${t})`,
|
|
380
|
+
debug: Bn.value
|
|
381
|
+
}), e.children && (ie(e.children) ? se({
|
|
382
|
+
componentName: "VueUiVerticalBar",
|
|
383
|
+
type: "datasetAttributeEmpty",
|
|
384
|
+
property: `children (index ${t})`,
|
|
385
|
+
debug: Bn.value
|
|
386
|
+
}) : e.children.forEach((e, t) => {
|
|
387
|
+
[null, void 0].includes(e.name) && se({
|
|
388
|
+
componentName: "VueUiVerticalBar",
|
|
389
|
+
type: "datasetSerieAttribute",
|
|
390
|
+
property: "name",
|
|
391
|
+
key: "children",
|
|
392
|
+
index: t,
|
|
393
|
+
debug: Bn.value
|
|
394
|
+
});
|
|
395
|
+
}));
|
|
396
|
+
}), Tn.value.map((e, t) => {
|
|
397
|
+
let n = `vertical_parent_${t}_${A.value}`, r = e.children && e.children.length > 0, i = d(e.value ? e.value : r ? e.children.map((e) => e.value || 0).reduce((e, t) => e + t, 0) : 0), a = i >= 0 ? 1 : -1;
|
|
398
|
+
return {
|
|
399
|
+
...e,
|
|
400
|
+
id: n,
|
|
401
|
+
absoluteIndex: t,
|
|
402
|
+
shape: "square",
|
|
403
|
+
opacity: M.value.includes(n) ? .5 : 1,
|
|
404
|
+
value: Math.abs(i),
|
|
405
|
+
sign: a,
|
|
406
|
+
hasChildren: r,
|
|
407
|
+
isChild: !1,
|
|
408
|
+
segregate: () => X(n),
|
|
409
|
+
isSegregated: M.value.includes(n),
|
|
410
|
+
color: l(e.color) || Ln.value[t] || c[t] || c[t % c.length],
|
|
411
|
+
children: !e.children || !e.children.length ? [] : e.children.toSorted(fn.value ? () => 0 : (e, t) => Wn.value ? t.value - e.value : e.value - t.value).map((r, o) => ({
|
|
412
|
+
...r,
|
|
413
|
+
value: d(Math.abs(r.value)),
|
|
414
|
+
absoluteIndex: t,
|
|
415
|
+
sign: r.value >= 0 ? 1 : -1,
|
|
416
|
+
isChild: !0,
|
|
417
|
+
parentId: n,
|
|
418
|
+
parentName: e.name,
|
|
419
|
+
parentValue: i,
|
|
420
|
+
parentSign: a,
|
|
421
|
+
id: `vertical_child_${t}_${o}_${A.value}`,
|
|
422
|
+
childIndex: o,
|
|
423
|
+
color: l(r.color) || l(e.color) || Ln.value[t] || c[t] || c[t % c.length]
|
|
424
|
+
})).map((t, n) => ({
|
|
425
|
+
...t,
|
|
426
|
+
isFirstChild: n === 0,
|
|
427
|
+
isLastChild: n === e.children.length - 1
|
|
428
|
+
}))
|
|
429
|
+
};
|
|
430
|
+
}).toSorted(fn.value ? () => 0 : (e, t) => Wn.value ? t.value - e.value : e.value - t.value))), U = p(() => H.value.filter((e) => !M.value.includes(e.id))), W = p(() => U.value.flatMap((e) => e.hasChildren ? e.children : e)), Gn = p(() => H.value.flatMap((e) => e.hasChildren ? e.children : e)), Kn = p(() => U.value.flatMap((e) => e.children && e.children.length > 0 ? e.children.length : 1).reduce((e, t) => e + t, 0)), qn = p(() => ({
|
|
431
|
+
cy: "vertical-bar-div-legend",
|
|
432
|
+
backgroundColor: F.value.style.chart.legend.backgroundColor,
|
|
433
|
+
color: F.value.style.chart.legend.color,
|
|
434
|
+
fontSize: F.value.style.chart.legend.fontSize,
|
|
435
|
+
paddingBottom: 12,
|
|
436
|
+
fontWeight: F.value.style.chart.legend.bold ? "bold" : ""
|
|
437
|
+
})), G = p(() => F.value.style.chart.layout.bars.parentLabels.show ? F.value.style.chart.layout.bars.parentLabels.fontSize * 3 + F.value.style.chart.layout.bars.parentLabels.paddingBottom : 0), K = p(() => {
|
|
438
|
+
let e = [], t = 0;
|
|
439
|
+
return W.value.forEach((n, r) => {
|
|
440
|
+
n.isChild && n.childIndex === 0 && F.value.style.chart.layout.bars.parentLabels.show && (t += 1), e[r] = t;
|
|
441
|
+
}), e;
|
|
442
|
+
}), q = p(() => {
|
|
443
|
+
let e = Math.max(0, ...K.value) * G.value;
|
|
444
|
+
return (R.value - 24 - (Kn.value - 1) * z.value - e) / Kn.value;
|
|
445
|
+
}), J = p(() => ({
|
|
446
|
+
width: L.value,
|
|
447
|
+
height: R.value,
|
|
448
|
+
padding: {
|
|
449
|
+
top: 12,
|
|
450
|
+
left: 128 + F.value.style.chart.layout.bars.offsetX,
|
|
451
|
+
right: 64 + F.value.style.chart.layout.bars.paddingRight,
|
|
452
|
+
bottom: 12
|
|
453
|
+
}
|
|
454
|
+
})), Jn = C(0);
|
|
455
|
+
function Yn() {
|
|
456
|
+
Ve(() => {
|
|
457
|
+
if (!un.value) {
|
|
458
|
+
Jn.value = 0;
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
let e = Array.from(un.value.querySelectorAll("text")).reduce((e, t) => {
|
|
462
|
+
let n = t.getBBox?.().width ?? t.getComputedTextLength();
|
|
463
|
+
return n > e ? n : e;
|
|
464
|
+
}, 0);
|
|
465
|
+
Jn.value = e + 12;
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
Je(() => [
|
|
469
|
+
W.value,
|
|
470
|
+
L.value,
|
|
471
|
+
R.value,
|
|
472
|
+
F.value.style.chart.layout.bars.nameLabels,
|
|
473
|
+
F.value.style.chart.layout.bars.offsetX
|
|
474
|
+
], () => Yn(), { deep: !0 }), Ue(() => {
|
|
475
|
+
Yn();
|
|
476
|
+
});
|
|
477
|
+
function Xn() {
|
|
478
|
+
return typeof document > "u" ? null : (mn || (mn = document.createElement("canvas"), hn = mn.getContext("2d")), hn);
|
|
479
|
+
}
|
|
480
|
+
function Zn(e) {
|
|
481
|
+
let t = String(e ?? ""), n = F.value.style.chart.layout.bars, r = n.dataLabels.fontSize, i = n.dataLabels.bold ? 700 : 400, a = F.value.style.fontFamily, o = Xn();
|
|
482
|
+
return o ? (o.font = `${i} ${r}px ${a}`, o.measureText(t).width) : t.length * r * .6;
|
|
483
|
+
}
|
|
484
|
+
function Qn() {
|
|
485
|
+
let e = U.value.flatMap((e) => e.children && e.children.length ? e.children.map((e) => Math.abs(e.value)) : Math.abs(e.value));
|
|
486
|
+
return e.length ? Math.max(...e) : 0;
|
|
487
|
+
}
|
|
488
|
+
let $n = p(() => {
|
|
489
|
+
pn.value;
|
|
490
|
+
let e = F.value.style.chart.layout.bars, t = Jn.value + Math.abs(e.nameLabels.offsetX) + e.offsetX, n = J.value.width - J.value.padding.right, r = Math.max(0, n - t - e.offsetX), i = J.value.width - 40, a = Qn(), o = W.value.map((e, t) => ({
|
|
491
|
+
serie: e,
|
|
492
|
+
textWidth: Zn(xr(e.value, e, t, e.sign))
|
|
493
|
+
}));
|
|
494
|
+
if (!o.length || r <= 0) return {
|
|
495
|
+
left: 0,
|
|
496
|
+
right: 0
|
|
497
|
+
};
|
|
498
|
+
if (!o.some(({ serie: e }) => e.sign === -1)) {
|
|
499
|
+
let n = o.reduce((n, { serie: o, textWidth: s }) => {
|
|
500
|
+
let c = a ? Math.abs(o.value) / a : 0;
|
|
501
|
+
if (c <= 0 || s <= 0) return n;
|
|
502
|
+
let l = (t + r * c + 3 + e.dataLabels.offsetX + s - i) / c;
|
|
503
|
+
return Math.max(n, l);
|
|
504
|
+
}, 0);
|
|
505
|
+
return {
|
|
506
|
+
left: 0,
|
|
507
|
+
right: Math.ceil(Math.min(r, Math.max(0, n)))
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
let s = t + r / 2, c = -Infinity, l = Infinity;
|
|
511
|
+
o.forEach(({ serie: t, textWidth: n }) => {
|
|
512
|
+
if (t.sign === -1) {
|
|
513
|
+
let t = s + 12 + e.dataLabels.offsetX + n;
|
|
514
|
+
l = Math.min(l, i - t);
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
517
|
+
let r = s - 12 - e.dataLabels.offsetX - n;
|
|
518
|
+
c = Math.max(c, 40 - r);
|
|
519
|
+
});
|
|
520
|
+
let ee = 0;
|
|
521
|
+
ee = c > l ? (c + l) / 2 : Math.min(l, Math.max(c, 0));
|
|
522
|
+
let u = ee * 2;
|
|
523
|
+
return u >= 0 ? {
|
|
524
|
+
left: Math.ceil(Math.min(r, u)),
|
|
525
|
+
right: 0
|
|
526
|
+
} : {
|
|
527
|
+
left: 0,
|
|
528
|
+
right: Math.ceil(Math.min(r, -u))
|
|
529
|
+
};
|
|
530
|
+
}), er = p(() => $n.value.right), tr = p(() => $n.value.left);
|
|
531
|
+
function nr() {
|
|
532
|
+
pn.value += 1;
|
|
533
|
+
}
|
|
534
|
+
Ue(() => {
|
|
535
|
+
typeof document > "u" || !document.fonts || (document.fonts.ready.then(nr), document.fonts.addEventListener?.("loadingdone", nr));
|
|
536
|
+
}), He(() => {
|
|
537
|
+
typeof document < "u" && document.fonts && document.fonts.removeEventListener?.("loadingdone", nr), mn = null, hn = null;
|
|
538
|
+
});
|
|
539
|
+
let Y = p(() => {
|
|
540
|
+
let e = Jn.value + Math.abs(F.value.style.chart.layout.bars.nameLabels.offsetX) + tr.value + F.value.style.chart.layout.bars.offsetX, t = J.value.width - J.value.padding.right, n = Math.max(0, t - e - er.value - F.value.style.chart.layout.bars.offsetX);
|
|
541
|
+
return {
|
|
542
|
+
top: J.value.padding.top,
|
|
543
|
+
bottom: J.value.padding.top + J.value.height,
|
|
544
|
+
left: e,
|
|
545
|
+
right: t,
|
|
546
|
+
width: n,
|
|
547
|
+
fullHeight: J.value.padding.top + J.value.padding.bottom + J.value.height
|
|
548
|
+
};
|
|
549
|
+
});
|
|
550
|
+
function rr() {
|
|
551
|
+
M.value.length ? M.value = [] : H.value.forEach((e) => {
|
|
552
|
+
M.value.push(e.id);
|
|
553
|
+
}), bn("selectLegend", U.value);
|
|
554
|
+
}
|
|
555
|
+
async function X(e) {
|
|
556
|
+
if (M.value.includes(e)) M.value = M.value.filter((t) => t !== e);
|
|
557
|
+
else {
|
|
558
|
+
if (M.value.length === H.value.length - 1) return;
|
|
559
|
+
M.value.push(e);
|
|
560
|
+
}
|
|
561
|
+
bn("selectLegend", U.value);
|
|
562
|
+
}
|
|
563
|
+
function ir(e) {
|
|
564
|
+
return H.value.length ? H.value.find((t) => t.name === e) || (F.value.debug && console.warn(`VueUiHorizontalBar - Series name not found "${e}"`), null) : (F.value.debug && console.warn("VueUiHorizontalBar - There are no series to show."), null);
|
|
565
|
+
}
|
|
566
|
+
function ar(e) {
|
|
567
|
+
let t = ir(e);
|
|
568
|
+
t !== null && M.value.includes(t.id) && X(t.id);
|
|
569
|
+
}
|
|
570
|
+
function or(e) {
|
|
571
|
+
let t = ir(e);
|
|
572
|
+
t !== null && (M.value.includes(t.id) || X(t.id));
|
|
573
|
+
}
|
|
574
|
+
let Z = p(() => U.value.map((e) => Math.abs(e.value)).reduce((e, t) => e + t, 0));
|
|
575
|
+
function sr(e, t = !1, n = 0) {
|
|
576
|
+
return t ? u({
|
|
577
|
+
v: d(Math.abs(e) / Z.value * 100),
|
|
578
|
+
s: "%",
|
|
579
|
+
r: n
|
|
580
|
+
}) : Math.abs(e) / Z.value;
|
|
581
|
+
}
|
|
582
|
+
let cr = p(() => W.value.map((e) => e.sign).includes(-1)), lr = p(() => Math.max(...U.value.flatMap((e) => e.children && e.children.length ? Math.max(...e.children.map((e) => e.value)) : e.value)));
|
|
583
|
+
function Q(e) {
|
|
584
|
+
let t = e / lr.value;
|
|
585
|
+
return d(Y.value.width / (cr.value ? 2 : 1) * t);
|
|
586
|
+
}
|
|
587
|
+
function ur(e) {
|
|
588
|
+
return Q(e) + Y.value.left;
|
|
589
|
+
}
|
|
590
|
+
function dr(e, t) {
|
|
591
|
+
let n = U.value.find((t) => t.id === e.parentId);
|
|
592
|
+
return {
|
|
593
|
+
y: Y.value.top + (z.value + q.value) * t + K.value[t] * G.value - G.value + F.value.style.chart.layout.bars.parentLabels.fontSize,
|
|
594
|
+
name: n.name,
|
|
595
|
+
value: [
|
|
596
|
+
void 0,
|
|
597
|
+
NaN,
|
|
598
|
+
null
|
|
599
|
+
].includes(n.value) ? "" : n.sign === 1 ? n.value : -n.value,
|
|
600
|
+
percentageToTotal: isNaN(n.value / Z.value) ? "" : sr(n.value, !0, F.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage),
|
|
601
|
+
sign: n.sign
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
function fr() {
|
|
605
|
+
return U.value;
|
|
606
|
+
}
|
|
607
|
+
function pr(e, t) {
|
|
608
|
+
return dr(e, t).name;
|
|
609
|
+
}
|
|
610
|
+
function mr(e, t) {
|
|
611
|
+
let n = dr(e, t);
|
|
612
|
+
return xr(n.value, n, t, e.parentSign || e.sign);
|
|
613
|
+
}
|
|
614
|
+
let hr = C(null), gr = C(null);
|
|
615
|
+
function _r({ datapoint: e, seriesIndex: t }) {
|
|
616
|
+
bn("selectDatapoint", e), F.value.events.datapointClick && F.value.events.datapointClick({
|
|
617
|
+
datapoint: e,
|
|
618
|
+
seriesIndex: t
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
function vr({ datapoint: e, seriesIndex: t }) {
|
|
622
|
+
F.value.events.datapointLeave && F.value.events.datapointLeave({
|
|
623
|
+
datapoint: e,
|
|
624
|
+
seriesIndex: t
|
|
625
|
+
}), Zt.value = null, Yt.value = !1, hr.value = null, P.value === t && (P.value = null);
|
|
626
|
+
}
|
|
627
|
+
function yr(e, t, n = "pointer") {
|
|
628
|
+
yn.value = n, F.value.events.datapointEnter && F.value.events.datapointEnter({
|
|
629
|
+
datpoint: e,
|
|
630
|
+
seriesIndex: t
|
|
631
|
+
}), P.value = t, Zt.value = e, gr.value = {
|
|
632
|
+
datapoint: e,
|
|
633
|
+
seriesIndex: t,
|
|
634
|
+
series: H.value,
|
|
635
|
+
config: F.value
|
|
636
|
+
}, Yt.value = !0, hr.value = e.id;
|
|
637
|
+
let r = "", i = e.isChild ? e.parentName : e.name, a = e.isChild ? e.name : "", o = F.value.style.chart.tooltip.customFormat;
|
|
638
|
+
ue(o) && te(() => o({
|
|
639
|
+
datapoint: e,
|
|
640
|
+
series: H.value,
|
|
641
|
+
config: F.value,
|
|
642
|
+
seriesIndex: t
|
|
643
|
+
})) ? Xt.value = o({
|
|
644
|
+
datapoint: e,
|
|
645
|
+
series: H.value,
|
|
646
|
+
config: F.value,
|
|
647
|
+
seriesIndex: t
|
|
648
|
+
}) : (r += `<div style="width:100%;text-align:center;border-bottom:1px solid ${F.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
|
|
649
|
+
<div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${e.color}"/>${qt.pattern ? `<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${A.value}_${e.absoluteIndex})"/>` : ""}</svg> ${i}</div>
|
|
650
|
+
${a ? `<div>${a}</div>` : ""}
|
|
651
|
+
</div>`, F.value.style.chart.tooltip.showValue && (r += `<div>${F.value.translations.value}: <b>${re(F.value.style.chart.layout.bars.dataLabels.value.formatter, e.sign === 1 ? e.value : -e.value, u({
|
|
652
|
+
p: F.value.style.chart.tooltip.prefix,
|
|
653
|
+
v: e.sign === 1 ? e.value : -e.value,
|
|
654
|
+
s: F.value.style.chart.tooltip.suffix,
|
|
655
|
+
r: F.value.style.chart.tooltip.roundingValue
|
|
656
|
+
}), {
|
|
657
|
+
datapoint: e,
|
|
658
|
+
seriesIndex: t
|
|
659
|
+
})}</b></div>`), F.value.style.chart.tooltip.showPercentage && (r += `<div>${F.value.translations.percentageToTotal} : <b>${u({
|
|
660
|
+
v: Math.abs(e.value) / Z.value * 100,
|
|
661
|
+
s: "%",
|
|
662
|
+
r: F.value.style.chart.tooltip.roundingPercentage
|
|
663
|
+
})}</b></div>`, e.isChild && (r += `<div>${F.value.translations.percentageToSerie}: <b>${u({
|
|
664
|
+
v: Math.abs(e.value) / Math.abs(e.parentValue) * 100,
|
|
665
|
+
s: "%",
|
|
666
|
+
r: F.value.style.chart.tooltip.roundingPercentage
|
|
667
|
+
})}</b></div>`)), Xt.value = `<div style="text-align:left">${r}</div>`);
|
|
668
|
+
}
|
|
669
|
+
function br({ legend: e, index: t }) {
|
|
670
|
+
let n = F.value.style.chart.legend;
|
|
671
|
+
return n.showValue ? `${e.name}: ${re(F.value.style.chart.layout.bars.dataLabels.value.formatter, e.value, u({
|
|
672
|
+
p: n.prefix,
|
|
673
|
+
v: e.value,
|
|
674
|
+
s: n.suffix,
|
|
675
|
+
r: n.roundingValue
|
|
676
|
+
}), {
|
|
677
|
+
datapoint: e,
|
|
678
|
+
seriesIndex: t
|
|
679
|
+
})}` : e.name;
|
|
680
|
+
}
|
|
681
|
+
function xr(e, t, n, r) {
|
|
682
|
+
if (!F.value.style.chart.layout.bars.dataLabels.value.show) return "";
|
|
683
|
+
let i = re(F.value.style.chart.layout.bars.dataLabels.value.formatter, d(r === -1 && e >= 0 ? -e : e), u({
|
|
684
|
+
p: F.value.style.chart.layout.bars.dataLabels.value.prefix,
|
|
685
|
+
v: d(r === -1 && e >= 0 ? -e : e),
|
|
686
|
+
s: F.value.style.chart.layout.bars.dataLabels.value.suffix,
|
|
687
|
+
r: F.value.style.chart.layout.bars.dataLabels.value.roundingValue
|
|
688
|
+
}), {
|
|
689
|
+
datapoint: t,
|
|
690
|
+
seriesIndex: n
|
|
691
|
+
}), a = `(${sr(e, !0, F.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;
|
|
692
|
+
return `${i}${F.value.style.chart.layout.bars.dataLabels.percentage.show ? ` ${a}` : ""}`;
|
|
693
|
+
}
|
|
694
|
+
let $ = p(() => ({
|
|
695
|
+
head: [
|
|
696
|
+
F.value.translations.parentName,
|
|
697
|
+
F.value.translations.value,
|
|
698
|
+
F.value.translations.percentageToTotal,
|
|
699
|
+
F.value.translations.childName,
|
|
700
|
+
F.value.translations.value,
|
|
701
|
+
F.value.translations.percentageToSerie,
|
|
702
|
+
F.value.translations.percentageToTotal
|
|
703
|
+
],
|
|
704
|
+
body: W.value.map((e) => e.isChild ? e.isFirstChild ? {
|
|
705
|
+
color: e.color,
|
|
706
|
+
parentName: e.parentName,
|
|
707
|
+
parentValue: e.parentValue,
|
|
708
|
+
percentageToTotal: e.parentValue / Z.value,
|
|
709
|
+
childName: e.name,
|
|
710
|
+
childValue: e.sign === 1 ? e.value : -e.value,
|
|
711
|
+
childPercentageToParent: Math.abs(e.value) / Math.abs(e.parentValue),
|
|
712
|
+
childPercentageToTotal: Math.abs(e.value) / Z.value
|
|
713
|
+
} : {
|
|
714
|
+
color: "",
|
|
715
|
+
parentName: "",
|
|
716
|
+
parentValue: "",
|
|
717
|
+
percentageToTotal: "",
|
|
718
|
+
childName: e.name,
|
|
719
|
+
childValue: e.sign === 1 ? e.value : -e.value,
|
|
720
|
+
childPercentageToParent: Math.abs(e.value) / Math.abs(e.parentValue),
|
|
721
|
+
childPercentageToTotal: Math.abs(e.value) / Z.value
|
|
722
|
+
} : {
|
|
723
|
+
color: e.color,
|
|
724
|
+
parentName: e.name,
|
|
725
|
+
parentValue: e.sign === 1 ? e.value : -e.value,
|
|
726
|
+
percentageToTotal: Math.abs(e.value) / Z.value,
|
|
727
|
+
childName: "",
|
|
728
|
+
childValue: "",
|
|
729
|
+
childPercentageToParent: "",
|
|
730
|
+
childPercentageToTotal: ""
|
|
731
|
+
})
|
|
732
|
+
}));
|
|
733
|
+
function Sr(e = null) {
|
|
734
|
+
let n = [
|
|
735
|
+
[F.value.style.chart.title.text],
|
|
736
|
+
[F.value.style.chart.title.subtitle.text],
|
|
737
|
+
[""]
|
|
738
|
+
], i = $.value.head, a = $.value.body.map((e) => [
|
|
739
|
+
e.parentName,
|
|
740
|
+
e.parentValue,
|
|
741
|
+
e.percentageToTotal,
|
|
742
|
+
e.childName,
|
|
743
|
+
e.childValue,
|
|
744
|
+
e.childPercentageToParent,
|
|
745
|
+
e.childPercentageToTotal
|
|
746
|
+
]), o = r(n.concat([i]).concat(a));
|
|
747
|
+
e ? e(o) : t({
|
|
748
|
+
csvContent: o,
|
|
749
|
+
title: F.value.style.chart.title.text || "vue-ui-vertical-bar"
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
let Cr = C(!1);
|
|
753
|
+
function wr(e) {
|
|
754
|
+
Cr.value = e, Qt.value += 1;
|
|
755
|
+
}
|
|
756
|
+
function Tr() {
|
|
757
|
+
V.value.showTable = !V.value.showTable;
|
|
758
|
+
}
|
|
759
|
+
Ue(() => {
|
|
760
|
+
[
|
|
761
|
+
"none",
|
|
762
|
+
"asc",
|
|
763
|
+
"desc"
|
|
764
|
+
].includes(F.value.style.chart.layout.bars.sort) || se({
|
|
765
|
+
componentName: "VueUiVerticalBar",
|
|
766
|
+
type: "attributeWrongValue",
|
|
767
|
+
property: "style.chart.layout.bars.sort",
|
|
768
|
+
key: F.value.style.chart.layout.bars.sort
|
|
769
|
+
}), N.value = dn.value[F.value.style.chart.layout.bars.sort], V.value.sortDesc = N.value === 2, fn.value = N.value === 0;
|
|
770
|
+
});
|
|
771
|
+
function Er() {
|
|
772
|
+
N.value += 1, N.value > 2 && (N.value = 0);
|
|
773
|
+
}
|
|
774
|
+
function Dr() {
|
|
775
|
+
Er(), V.value.sortDesc = N.value === 2, fn.value = N.value === 0;
|
|
776
|
+
}
|
|
777
|
+
function Or() {
|
|
778
|
+
V.value.showTooltip = !V.value.showTooltip;
|
|
779
|
+
}
|
|
780
|
+
let kr = C(!1);
|
|
781
|
+
function Ar() {
|
|
782
|
+
kr.value = !kr.value;
|
|
783
|
+
}
|
|
784
|
+
async function jr({ scale: e = 2 } = {}) {
|
|
785
|
+
if (!j.value) return;
|
|
786
|
+
let { width: t, height: n } = j.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await xe({
|
|
787
|
+
domElement: j.value,
|
|
788
|
+
base64: !0,
|
|
789
|
+
img: !0,
|
|
790
|
+
scale: e
|
|
791
|
+
});
|
|
792
|
+
return {
|
|
793
|
+
imageUri: i,
|
|
794
|
+
base64: a,
|
|
795
|
+
title: F.value.style.chart.title.text,
|
|
796
|
+
width: t,
|
|
797
|
+
height: n,
|
|
798
|
+
aspectRatio: r
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
let Mr = p(() => {
|
|
802
|
+
let e = F.value.table.useDialog && !F.value.table.show, t = V.value.showTable;
|
|
803
|
+
return {
|
|
804
|
+
component: e ? Ut : Oe,
|
|
805
|
+
title: `${F.value.style.chart.title.text}${F.value.style.chart.title.subtitle.text ? `: ${F.value.style.chart.title.subtitle.text}` : ""}`,
|
|
806
|
+
props: e ? {
|
|
807
|
+
backgroundColor: F.value.table.th.backgroundColor,
|
|
808
|
+
color: F.value.table.th.color,
|
|
809
|
+
headerColor: F.value.table.th.color,
|
|
810
|
+
headerBg: F.value.table.th.backgroundColor,
|
|
811
|
+
isFullscreen: Cr.value,
|
|
812
|
+
fullscreenParent: j.value,
|
|
813
|
+
forcedWidth: Math.min(800, window.innerWidth * .8),
|
|
814
|
+
isCursorPointer: xn.value
|
|
815
|
+
} : {
|
|
816
|
+
hideDetails: !0,
|
|
817
|
+
config: {
|
|
818
|
+
open: t,
|
|
819
|
+
maxHeight: 1e4,
|
|
820
|
+
body: {
|
|
821
|
+
backgroundColor: F.value.style.chart.backgroundColor,
|
|
822
|
+
color: F.value.style.chart.color
|
|
823
|
+
},
|
|
824
|
+
head: {
|
|
825
|
+
backgroundColor: F.value.style.chart.backgroundColor,
|
|
826
|
+
color: F.value.style.chart.color
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
};
|
|
831
|
+
});
|
|
832
|
+
Je(() => V.value.showTable, (e) => {
|
|
833
|
+
F.value.table.show || (e && F.value.table.useDialog && sn.value ? sn.value.open() : "close" in sn.value && sn.value.close());
|
|
834
|
+
});
|
|
835
|
+
let { isResponsive: Nr } = Ne(Rn, zn);
|
|
836
|
+
function Pr() {
|
|
837
|
+
V.value.showTable = !1, cn.value && cn.value.setTableIconState(!1);
|
|
838
|
+
}
|
|
839
|
+
let Fr = p(() => H.value.map((e, t) => ({
|
|
840
|
+
...e,
|
|
841
|
+
shape: "square",
|
|
842
|
+
display: `${e.name}: ${re(F.value.style.chart.layout.bars.dataLabels.value.formatter, e.value, u({
|
|
843
|
+
p: F.value.style.chart.legend.prefix,
|
|
844
|
+
v: e.value,
|
|
845
|
+
s: F.value.style.chart.legend.suffix,
|
|
846
|
+
r: F.value.style.chart.legend.roundingValue
|
|
847
|
+
}), {
|
|
848
|
+
datapoint: e,
|
|
849
|
+
seriesIndex: t
|
|
850
|
+
})}`
|
|
851
|
+
}))), Ir = p(() => F.value.style.chart.backgroundColor), Lr = p(() => F.value.style.chart.legend), { exportSvg: Rr, getSvg: zr } = _e({
|
|
852
|
+
svg: An,
|
|
853
|
+
title: p(() => F.value.style.chart.title),
|
|
854
|
+
legend: Lr,
|
|
855
|
+
legendItems: p(() => Fr.value.map((e) => ({
|
|
856
|
+
...e,
|
|
857
|
+
name: e.display
|
|
858
|
+
}))),
|
|
859
|
+
backgroundColor: Ir
|
|
860
|
+
});
|
|
861
|
+
async function Br({ isCb: e }) {
|
|
862
|
+
_n.value = !0, await Ve();
|
|
863
|
+
try {
|
|
864
|
+
if (e) {
|
|
865
|
+
let { blob: e, url: t, text: n, dataUrl: r } = await zr();
|
|
866
|
+
await Promise.resolve(F.value.userOptions.callbacks.svg({
|
|
867
|
+
blob: e,
|
|
868
|
+
url: t,
|
|
869
|
+
text: n,
|
|
870
|
+
dataUrl: r
|
|
871
|
+
}));
|
|
872
|
+
} else await Promise.resolve(Rr());
|
|
873
|
+
} finally {
|
|
874
|
+
_n.value = !1;
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
function Vr(e) {
|
|
878
|
+
if (e?.stage === "start") {
|
|
879
|
+
gn.value = !0;
|
|
880
|
+
return;
|
|
881
|
+
}
|
|
882
|
+
if (e?.stage === "end") {
|
|
883
|
+
gn.value = !1;
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
Fn();
|
|
887
|
+
}
|
|
888
|
+
function Hr() {
|
|
889
|
+
console.warn("[autoSize]: this legacy method can be safely removed as it has no impact.");
|
|
890
|
+
}
|
|
891
|
+
async function Ur() {
|
|
892
|
+
if (bn("copyAlt", {
|
|
893
|
+
config: F.value,
|
|
894
|
+
dataset: U.value
|
|
895
|
+
}), !F.value.userOptions.callbacks.altCopy) {
|
|
896
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
897
|
+
return;
|
|
898
|
+
}
|
|
899
|
+
await Promise.resolve(F.value.userOptions.callbacks.altCopy({
|
|
900
|
+
config: F.value,
|
|
901
|
+
dataset: U.value
|
|
902
|
+
}));
|
|
903
|
+
}
|
|
904
|
+
let Wr = C(!1);
|
|
905
|
+
function Gr() {
|
|
906
|
+
P.value = null, Wr.value = !0;
|
|
907
|
+
}
|
|
908
|
+
function Kr() {
|
|
909
|
+
P.value = null, Yt.value = !1, Wr.value = !1;
|
|
910
|
+
}
|
|
911
|
+
function qr() {
|
|
912
|
+
if (P.value === null) return;
|
|
913
|
+
let e = W.value[P.value];
|
|
914
|
+
e && vr({
|
|
915
|
+
datapoint: e,
|
|
916
|
+
seriesIndex: P.value
|
|
917
|
+
}), P.value = null, yn.value = "pointer";
|
|
918
|
+
}
|
|
919
|
+
function Jr(e) {
|
|
920
|
+
if (!An.value || kr.value || document.activeElement !== An.value) return;
|
|
921
|
+
let t = e.key === "ArrowRight" || e.key === "ArrowDown", n = e.key === "ArrowLeft" || e.key === "ArrowUp", r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
|
|
922
|
+
if (!t && !n && !r && !i) return;
|
|
923
|
+
let a = W.value.length;
|
|
924
|
+
if (!a) return;
|
|
925
|
+
if (e.preventDefault(), e.stopPropagation(), i) {
|
|
926
|
+
qr();
|
|
927
|
+
return;
|
|
928
|
+
}
|
|
929
|
+
if (r) {
|
|
930
|
+
if (P.value === null) return;
|
|
931
|
+
let e = W.value[P.value];
|
|
932
|
+
if (!e) return;
|
|
933
|
+
_r({
|
|
934
|
+
datapoint: e,
|
|
935
|
+
seriesIndex: P.value
|
|
936
|
+
});
|
|
937
|
+
return;
|
|
938
|
+
}
|
|
939
|
+
let o = P.value, s = Zt.value ? W.value.findIndex((e) => e.id === Zt.value.id) : null;
|
|
940
|
+
o !== null && o >= 0 && o < a ? t ? (o += 1, o >= a && (o = 0)) : n && (--o, o < 0 && (o = a - 1)) : s !== null && s >= 0 && s < a ? (o = t ? s + 1 : s - 1, o >= a && (o = 0), o < 0 && (o = a - 1)) : o = t ? 0 : a - 1;
|
|
941
|
+
let c = W.value[o];
|
|
942
|
+
c && (P.value = o, Yr(c), yr(c, o, "keyboard"));
|
|
943
|
+
}
|
|
944
|
+
function Yr(e) {
|
|
945
|
+
if (!e) return;
|
|
946
|
+
let t = Y.value.right, n = Y.value.top + (z.value + q.value) * e.absoluteIndex + K.value[e.absoluteIndex] * G.value;
|
|
947
|
+
if (!Number.isFinite(t) || !Number.isFinite(n)) return;
|
|
948
|
+
let r = a(t, n, An.value);
|
|
949
|
+
r && (vn.value = r);
|
|
950
|
+
}
|
|
951
|
+
let Xr = p(() => ({
|
|
952
|
+
head: $.value.head,
|
|
953
|
+
body: $.value.body.map((e) => [
|
|
954
|
+
e.parentName,
|
|
955
|
+
e.parentValue === "" ? "" : u({
|
|
956
|
+
v: e.parentValue,
|
|
957
|
+
r: F.value.style.chart.layout.bars.dataLabels.value.roundingValue,
|
|
958
|
+
p: F.value.style.chart.layout.bars.dataLabels.prefix,
|
|
959
|
+
s: F.value.style.chart.layout.bars.dataLabels.suffix
|
|
960
|
+
}),
|
|
961
|
+
e.percentageToTotal === "" ? "" : u({
|
|
962
|
+
v: e.percentageToTotal * 100,
|
|
963
|
+
r: F.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage,
|
|
964
|
+
s: "%"
|
|
965
|
+
}),
|
|
966
|
+
e.childName,
|
|
967
|
+
e.childValue === "" ? "" : u({
|
|
968
|
+
v: e.childValue,
|
|
969
|
+
r: F.value.style.chart.layout.bars.dataLabels.value.roundingValue,
|
|
970
|
+
p: F.value.style.chart.layout.bars.dataLabels.prefix,
|
|
971
|
+
s: F.value.style.chart.layout.bars.dataLabels.suffix
|
|
972
|
+
}),
|
|
973
|
+
e.childPercentageToParent === "" ? "" : u({
|
|
974
|
+
v: e.childPercentageToParent * 100,
|
|
975
|
+
r: F.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage,
|
|
976
|
+
s: "%"
|
|
977
|
+
}),
|
|
978
|
+
e.childPercentageToTotal === "" ? "" : u({
|
|
979
|
+
v: e.childPercentageToTotal * 100,
|
|
980
|
+
r: F.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage,
|
|
981
|
+
s: "%"
|
|
982
|
+
})
|
|
983
|
+
]),
|
|
984
|
+
caption: F.value.a11y.translations.tableCaption,
|
|
985
|
+
notice: F.value.a11y.translations.tableAvailable
|
|
986
|
+
}));
|
|
987
|
+
return we({
|
|
988
|
+
autoSize: Hr,
|
|
989
|
+
getData: fr,
|
|
990
|
+
getImage: jr,
|
|
991
|
+
generatePdf: Pn,
|
|
992
|
+
generateCsv: Sr,
|
|
993
|
+
generateImage: Fn,
|
|
994
|
+
generateSvg: Br,
|
|
995
|
+
hideSeries: or,
|
|
996
|
+
showSeries: ar,
|
|
997
|
+
toggleTable: Tr,
|
|
998
|
+
toggleSort: Dr,
|
|
999
|
+
toggleTooltip: Or,
|
|
1000
|
+
toggleAnnotator: Ar,
|
|
1001
|
+
toggleFullscreen: wr,
|
|
1002
|
+
copyAlt: Ur
|
|
1003
|
+
}), (e, t) => (S(), g("div", {
|
|
1004
|
+
class: y(`vue-data-ui-component vue-ui-vertical-bar ${Cr.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${F.value.useCssAnimation ? "" : "vue-ui-dna"} ${F.value.responsive ? "vue-ui-vertical-bar-autosize" : ""}`),
|
|
1005
|
+
ref_key: "verticalBarChart",
|
|
1006
|
+
ref: j,
|
|
1007
|
+
id: `vue-ui-vertical-bar_${A.value}`,
|
|
1008
|
+
style: x(`font-family:${F.value.style.fontFamily};width:100%; text-align:center;background:${F.value.style.chart.backgroundColor};height:100%`),
|
|
1009
|
+
onMouseenter: t[3] ||= () => D(On)(!0),
|
|
1010
|
+
onMouseleave: t[4] ||= () => D(On)(!1)
|
|
1011
|
+
}, [
|
|
1012
|
+
_("p", {
|
|
1013
|
+
id: `chart-instructions-${A.value}`,
|
|
1014
|
+
class: "sr-only"
|
|
1015
|
+
}, E(F.value.a11y.translations.keyboardNavigation), 9, Qe),
|
|
1016
|
+
Xr.value.body.length ? (S(), m(Ae, {
|
|
1017
|
+
key: 0,
|
|
1018
|
+
uid: A.value,
|
|
1019
|
+
head: Xr.value.head,
|
|
1020
|
+
body: Xr.value.body,
|
|
1021
|
+
caption: Xr.value.caption,
|
|
1022
|
+
notice: Xr.value.notice
|
|
1023
|
+
}, null, 8, [
|
|
1024
|
+
"uid",
|
|
1025
|
+
"head",
|
|
1026
|
+
"body",
|
|
1027
|
+
"caption",
|
|
1028
|
+
"notice"
|
|
1029
|
+
])) : h("", !0),
|
|
1030
|
+
F.value.userOptions.buttons.annotator ? (S(), m(D(Bt), {
|
|
1031
|
+
key: 1,
|
|
1032
|
+
svgRef: D(An),
|
|
1033
|
+
backgroundColor: F.value.style.chart.backgroundColor,
|
|
1034
|
+
color: F.value.style.chart.color,
|
|
1035
|
+
active: kr.value,
|
|
1036
|
+
isCursorPointer: xn.value,
|
|
1037
|
+
onClose: Ar
|
|
1038
|
+
}, {
|
|
1039
|
+
"annotator-action-close": O(() => [T(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
1040
|
+
"annotator-action-color": O(({ color: t }) => [T(e.$slots, "annotator-action-color", b(v({ color: t })), void 0, !0)]),
|
|
1041
|
+
"annotator-action-draw": O(({ mode: t }) => [T(e.$slots, "annotator-action-draw", b(v({ mode: t })), void 0, !0)]),
|
|
1042
|
+
"annotator-action-undo": O(({ disabled: t }) => [T(e.$slots, "annotator-action-undo", b(v({ disabled: t })), void 0, !0)]),
|
|
1043
|
+
"annotator-action-redo": O(({ disabled: t }) => [T(e.$slots, "annotator-action-redo", b(v({ disabled: t })), void 0, !0)]),
|
|
1044
|
+
"annotator-action-delete": O(({ disabled: t }) => [T(e.$slots, "annotator-action-delete", b(v({ disabled: t })), void 0, !0)]),
|
|
1045
|
+
_: 3
|
|
1046
|
+
}, 8, [
|
|
1047
|
+
"svgRef",
|
|
1048
|
+
"backgroundColor",
|
|
1049
|
+
"color",
|
|
1050
|
+
"active",
|
|
1051
|
+
"isCursorPointer"
|
|
1052
|
+
])) : h("", !0),
|
|
1053
|
+
In.value ? (S(), g("div", {
|
|
1054
|
+
key: 2,
|
|
1055
|
+
ref_key: "noTitle",
|
|
1056
|
+
ref: nn,
|
|
1057
|
+
class: "vue-data-ui-no-title-space",
|
|
1058
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
1059
|
+
}, null, 512)) : h("", !0),
|
|
1060
|
+
F.value.style.chart.title.text ? (S(), g("div", {
|
|
1061
|
+
key: 3,
|
|
1062
|
+
ref_key: "chartTitle",
|
|
1063
|
+
ref: $t,
|
|
1064
|
+
style: "width:100%;background:transparent;padding-bottom:12px"
|
|
1065
|
+
}, [(S(), m(Se, {
|
|
1066
|
+
key: `title_${rn.value}`,
|
|
1067
|
+
config: {
|
|
1068
|
+
title: {
|
|
1069
|
+
cy: "vertical-bar-div-title",
|
|
1070
|
+
...F.value.style.chart.title
|
|
1071
|
+
},
|
|
1072
|
+
subtitle: {
|
|
1073
|
+
cy: "vertical-bar-div-subtitle",
|
|
1074
|
+
...F.value.style.chart.title.subtitle
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
}, null, 8, ["config"]))], 512)) : h("", !0),
|
|
1078
|
+
F.value.userOptions.show && Jt.value && (D(kn) || D(Dn)) ? (S(), m(D(Vt), {
|
|
1079
|
+
ref_key: "userOptionsRef",
|
|
1080
|
+
ref: cn,
|
|
1081
|
+
backgroundColor: F.value.style.chart.backgroundColor,
|
|
1082
|
+
color: F.value.style.chart.color,
|
|
1083
|
+
key: `user_options_${Qt.value}`,
|
|
1084
|
+
isImaging: D(Nn),
|
|
1085
|
+
isPrinting: D(Mn),
|
|
1086
|
+
uid: A.value,
|
|
1087
|
+
hasTooltip: F.value.userOptions.buttons.tooltip && F.value.style.chart.tooltip.show,
|
|
1088
|
+
hasPdf: F.value.userOptions.buttons.pdf,
|
|
1089
|
+
hasImg: F.value.userOptions.buttons.img,
|
|
1090
|
+
hasSvg: F.value.userOptions.buttons.svg,
|
|
1091
|
+
hasXls: F.value.userOptions.buttons.csv,
|
|
1092
|
+
hasTable: F.value.userOptions.buttons.table,
|
|
1093
|
+
hasSort: F.value.userOptions.buttons.sort,
|
|
1094
|
+
hasFullscreen: F.value.userOptions.buttons.fullscreen,
|
|
1095
|
+
hasAltCopy: F.value.userOptions.buttons.altCopy,
|
|
1096
|
+
isFullscreen: Cr.value,
|
|
1097
|
+
isTooltip: V.value.showTooltip,
|
|
1098
|
+
titles: { ...F.value.userOptions.buttonTitles },
|
|
1099
|
+
chartElement: j.value,
|
|
1100
|
+
position: F.value.userOptions.position,
|
|
1101
|
+
hasAnnotator: F.value.userOptions.buttons.annotator,
|
|
1102
|
+
isAnnotation: kr.value,
|
|
1103
|
+
callbacks: F.value.userOptions.callbacks,
|
|
1104
|
+
printScale: F.value.userOptions.print.scale,
|
|
1105
|
+
tableDialog: F.value.table.useDialog,
|
|
1106
|
+
isCursorPointer: xn.value,
|
|
1107
|
+
onToggleFullscreen: wr,
|
|
1108
|
+
onGeneratePdf: D(Pn),
|
|
1109
|
+
onGenerateCsv: Sr,
|
|
1110
|
+
onGenerateImage: Vr,
|
|
1111
|
+
onGenerateSvg: Br,
|
|
1112
|
+
onToggleTable: Tr,
|
|
1113
|
+
onToggleSort: Dr,
|
|
1114
|
+
onToggleTooltip: Or,
|
|
1115
|
+
onToggleAnnotator: Ar,
|
|
1116
|
+
onCopyAlt: Ur,
|
|
1117
|
+
style: x({ visibility: D(kn) ? D(Dn) ? "visible" : "hidden" : "visible" })
|
|
1118
|
+
}, Ie({ _: 2 }, [
|
|
1119
|
+
e.$slots.menuIcon ? {
|
|
1120
|
+
name: "menuIcon",
|
|
1121
|
+
fn: O(({ isOpen: t, color: n }) => [T(e.$slots, "menuIcon", b(v({
|
|
1122
|
+
isOpen: t,
|
|
1123
|
+
color: n
|
|
1124
|
+
})), void 0, !0)]),
|
|
1125
|
+
key: "0"
|
|
1126
|
+
} : void 0,
|
|
1127
|
+
e.$slots.optionTooltip ? {
|
|
1128
|
+
name: "optionTooltip",
|
|
1129
|
+
fn: O(() => [T(e.$slots, "optionTooltip", {}, void 0, !0)]),
|
|
1130
|
+
key: "1"
|
|
1131
|
+
} : void 0,
|
|
1132
|
+
e.$slots.optionPdf ? {
|
|
1133
|
+
name: "optionPdf",
|
|
1134
|
+
fn: O(() => [T(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
1135
|
+
key: "2"
|
|
1136
|
+
} : void 0,
|
|
1137
|
+
e.$slots.optionCsv ? {
|
|
1138
|
+
name: "optionCsv",
|
|
1139
|
+
fn: O(() => [T(e.$slots, "optionCsv", {}, void 0, !0)]),
|
|
1140
|
+
key: "3"
|
|
1141
|
+
} : void 0,
|
|
1142
|
+
e.$slots.optionImg ? {
|
|
1143
|
+
name: "optionImg",
|
|
1144
|
+
fn: O(() => [T(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
1145
|
+
key: "4"
|
|
1146
|
+
} : void 0,
|
|
1147
|
+
e.$slots.optionSvg ? {
|
|
1148
|
+
name: "optionSvg",
|
|
1149
|
+
fn: O(() => [T(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
1150
|
+
key: "5"
|
|
1151
|
+
} : void 0,
|
|
1152
|
+
e.$slots.optionTable ? {
|
|
1153
|
+
name: "optionTable",
|
|
1154
|
+
fn: O(() => [T(e.$slots, "optionTable", {}, void 0, !0)]),
|
|
1155
|
+
key: "6"
|
|
1156
|
+
} : void 0,
|
|
1157
|
+
e.$slots.optionLabels ? {
|
|
1158
|
+
name: "optionLabels",
|
|
1159
|
+
fn: O(() => [T(e.$slots, "optionLabels", {}, void 0, !0)]),
|
|
1160
|
+
key: "7"
|
|
1161
|
+
} : void 0,
|
|
1162
|
+
e.$slots.optionSort ? {
|
|
1163
|
+
name: "optionSort",
|
|
1164
|
+
fn: O(() => [T(e.$slots, "optionSort", {}, void 0, !0)]),
|
|
1165
|
+
key: "8"
|
|
1166
|
+
} : void 0,
|
|
1167
|
+
e.$slots.optionFullscreen ? {
|
|
1168
|
+
name: "optionFullscreen",
|
|
1169
|
+
fn: O(({ toggleFullscreen: t, isFullscreen: n }) => [T(e.$slots, "optionFullscreen", b(v({
|
|
1170
|
+
toggleFullscreen: t,
|
|
1171
|
+
isFullscreen: n
|
|
1172
|
+
})), void 0, !0)]),
|
|
1173
|
+
key: "9"
|
|
1174
|
+
} : void 0,
|
|
1175
|
+
e.$slots.optionAnnotator ? {
|
|
1176
|
+
name: "optionAnnotator",
|
|
1177
|
+
fn: O(({ toggleAnnotator: t, isAnnotator: n }) => [T(e.$slots, "optionAnnotator", b(v({
|
|
1178
|
+
toggleAnnotator: t,
|
|
1179
|
+
isAnnotator: n
|
|
1180
|
+
})), void 0, !0)]),
|
|
1181
|
+
key: "10"
|
|
1182
|
+
} : void 0,
|
|
1183
|
+
e.$slots.optionAltCopy ? {
|
|
1184
|
+
name: "optionAltCopy",
|
|
1185
|
+
fn: O(({ altCopy: t }) => [T(e.$slots, "optionAltCopy", b(v({ altCopy: t })), void 0, !0)]),
|
|
1186
|
+
key: "11"
|
|
1187
|
+
} : void 0,
|
|
1188
|
+
e.$slots["custom-menu-before"] ? {
|
|
1189
|
+
name: "custom-menu-before",
|
|
1190
|
+
fn: O(() => [T(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
1191
|
+
key: "12"
|
|
1192
|
+
} : void 0,
|
|
1193
|
+
e.$slots["custom-menu-after"] ? {
|
|
1194
|
+
name: "custom-menu-after",
|
|
1195
|
+
fn: O(() => [T(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
1196
|
+
key: "13"
|
|
1197
|
+
} : void 0
|
|
1198
|
+
]), 1032, /* @__PURE__ */ "backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasSort.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : h("", !0),
|
|
1199
|
+
F.value.style.chart.legend.show && F.value.style.chart.legend.position === "top" ? (S(), g("div", {
|
|
1200
|
+
key: 5,
|
|
1201
|
+
ref_key: "chartLegend",
|
|
1202
|
+
ref: en
|
|
1203
|
+
}, [(S(), m(Pe, {
|
|
1204
|
+
key: `legend_top_${an.value}`,
|
|
1205
|
+
legendSet: H.value,
|
|
1206
|
+
config: qn.value,
|
|
1207
|
+
onClickMarker: t[0] ||= ({ legend: e }) => X(e.id)
|
|
1208
|
+
}, Ie({
|
|
1209
|
+
item: O(({ legend: e, index: t }) => [_("div", {
|
|
1210
|
+
onClick: (t) => X(e.id),
|
|
1211
|
+
style: x(`opacity:${M.value.includes(e.id) ? .5 : 1}`)
|
|
1212
|
+
}, E(br({
|
|
1213
|
+
legend: e,
|
|
1214
|
+
index: t
|
|
1215
|
+
})), 13, $e)]),
|
|
1216
|
+
legendToggle: O(() => [H.value.length > 2 && F.value.style.chart.legend.selectAllToggle.show && !D(wn) ? (S(), m(ke, {
|
|
1217
|
+
key: 0,
|
|
1218
|
+
backgroundColor: F.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
1219
|
+
color: F.value.style.chart.legend.selectAllToggle.color,
|
|
1220
|
+
fontSize: F.value.style.chart.legend.fontSize,
|
|
1221
|
+
checked: M.value.length > 0,
|
|
1222
|
+
onToggle: rr
|
|
1223
|
+
}, null, 8, [
|
|
1224
|
+
"backgroundColor",
|
|
1225
|
+
"color",
|
|
1226
|
+
"fontSize",
|
|
1227
|
+
"checked"
|
|
1228
|
+
])) : h("", !0)]),
|
|
1229
|
+
_: 2
|
|
1230
|
+
}, [e.$slots.pattern ? {
|
|
1231
|
+
name: "legend-pattern",
|
|
1232
|
+
fn: O(({ legend: e, index: t }) => [Re(Ce, {
|
|
1233
|
+
shape: e.shape,
|
|
1234
|
+
radius: 30,
|
|
1235
|
+
stroke: "none",
|
|
1236
|
+
plot: {
|
|
1237
|
+
x: 30,
|
|
1238
|
+
y: 30
|
|
1239
|
+
},
|
|
1240
|
+
fill: `url(#pattern_${A.value}_${t})`
|
|
1241
|
+
}, null, 8, ["shape", "fill"])]),
|
|
1242
|
+
key: "0"
|
|
1243
|
+
} : void 0]), 1032, ["legendSet", "config"]))], 512)) : h("", !0),
|
|
1244
|
+
_("div", et, [(S(), g("svg", {
|
|
1245
|
+
ref_key: "svgRef",
|
|
1246
|
+
ref: An,
|
|
1247
|
+
xmlns: D(oe),
|
|
1248
|
+
class: y({
|
|
1249
|
+
"vue-data-ui-fullscreen--on": Cr.value,
|
|
1250
|
+
"vue-data-ui-fulscreen--off": !Cr.value,
|
|
1251
|
+
"vue-data-ui-no-transition": !D(I)
|
|
1252
|
+
}),
|
|
1253
|
+
viewBox: `0 0 ${L.value} ${R.value}`,
|
|
1254
|
+
style: x(`max-width:100%;overflow:visible;background:transparent;color:${F.value.style.chart.color}`),
|
|
1255
|
+
tabindex: "0",
|
|
1256
|
+
"aria-describedby": `chart-instructions-${A.value}`,
|
|
1257
|
+
onFocus: Gr,
|
|
1258
|
+
onBlur: Kr,
|
|
1259
|
+
onKeydown: Jr
|
|
1260
|
+
}, [_("g", {
|
|
1261
|
+
ref_key: "G",
|
|
1262
|
+
ref: on,
|
|
1263
|
+
class: "vue-data-ui-g"
|
|
1264
|
+
}, [
|
|
1265
|
+
Re(D(Ht)),
|
|
1266
|
+
e.$slots["chart-background"] ? (S(), g("foreignObject", {
|
|
1267
|
+
key: 0,
|
|
1268
|
+
x: 0,
|
|
1269
|
+
y: 0,
|
|
1270
|
+
width: L.value,
|
|
1271
|
+
height: R.value,
|
|
1272
|
+
style: { pointerEvents: "none" }
|
|
1273
|
+
}, [T(e.$slots, "chart-background", {}, void 0, !0)], 8, nt)) : h("", !0),
|
|
1274
|
+
_("defs", null, [(S(!0), g(f, null, w(W.value, (e, t) => (S(), m(De, {
|
|
1275
|
+
t: "linear",
|
|
1276
|
+
x1: "0%",
|
|
1277
|
+
y1: "0%",
|
|
1278
|
+
x2: "100%",
|
|
1279
|
+
y2: "0%",
|
|
1280
|
+
id: `vertical_bar_gradient_${A.value}_${t}`,
|
|
1281
|
+
key: `vertical_bar_gradient_${A.value}_${t}`,
|
|
1282
|
+
stops: [[
|
|
1283
|
+
"0%",
|
|
1284
|
+
e.color,
|
|
1285
|
+
1
|
|
1286
|
+
], [
|
|
1287
|
+
"100%",
|
|
1288
|
+
D(n)(D(ee)(e.color, .03), 100 - F.value.style.chart.layout.bars.gradientIntensity),
|
|
1289
|
+
1
|
|
1290
|
+
]]
|
|
1291
|
+
}, null, 8, ["id", "stops"]))), 128))]),
|
|
1292
|
+
e.$slots.pattern ? (S(), g("g", rt, [(S(!0), g(f, null, w(W.value, (t) => (S(), g("defs", null, [T(e.$slots, "pattern", Be({ ref_for: !0 }, {
|
|
1293
|
+
seriesIndex: t.absoluteIndex,
|
|
1294
|
+
patternId: `pattern_${A.value}_${t.absoluteIndex}`
|
|
1295
|
+
}), void 0, !0)]))), 256))])) : h("", !0),
|
|
1296
|
+
F.value.style.chart.layout.bars.rowColor ? (S(!0), g(f, { key: 2 }, w(W.value, (e, t) => (S(), g("g", { key: `row_${e.id}` }, [_("rect", {
|
|
1297
|
+
x: 0,
|
|
1298
|
+
y: Y.value.top + (z.value + q.value) * t + K.value[t] * G.value,
|
|
1299
|
+
width: L.value,
|
|
1300
|
+
height: q.value <= 0 ? 1e-4 : q.value,
|
|
1301
|
+
fill: F.value.style.chart.layout.bars.rowColor,
|
|
1302
|
+
rx: F.value.style.chart.layout.bars.rowRadius,
|
|
1303
|
+
style: { pointerEvents: "none" },
|
|
1304
|
+
class: y({ "vue-data-ui-transition": D(I) })
|
|
1305
|
+
}, null, 10, it)]))), 128)) : h("", !0),
|
|
1306
|
+
(S(!0), g(f, null, w(W.value, (e, t) => (S(), g("g", { key: `underlayer_${e.id}` }, [_("rect", {
|
|
1307
|
+
x: D(d)(cr.value ? Y.value.left + Y.value.width / 2 - (e.sign === 1 ? 0 : Q(e.value) <= 0 ? 1e-4 : Q(e.value)) : Y.value.left),
|
|
1308
|
+
y: Y.value.top + (z.value + q.value) * t + K.value[t] * G.value,
|
|
1309
|
+
width: D(d)(Q(e.value) <= 0 ? 1e-4 : Q(e.value)),
|
|
1310
|
+
height: q.value <= 0 ? 1e-4 : q.value,
|
|
1311
|
+
fill: F.value.style.chart.layout.bars.underlayerColor,
|
|
1312
|
+
rx: F.value.style.chart.layout.bars.borderRadius,
|
|
1313
|
+
class: y({ "vue-data-ui-transition": D(I) })
|
|
1314
|
+
}, null, 10, at)]))), 128)),
|
|
1315
|
+
(S(!0), g(f, null, w(W.value, (t, r) => (S(), g("g", { key: `barloop_${t.id}` }, [
|
|
1316
|
+
_("rect", {
|
|
1317
|
+
x: D(d)(cr.value ? Y.value.left + Y.value.width / 2 - (t.sign === 1 ? 0 : Q(t.value) <= 0 ? 1e-4 : Q(t.value)) : Y.value.left),
|
|
1318
|
+
y: Y.value.top + (z.value + q.value) * r + K.value[r] * G.value,
|
|
1319
|
+
width: D(d)(Q(t.value) <= 0 ? 1e-4 : Q(t.value)),
|
|
1320
|
+
height: q.value <= 0 ? 1e-4 : q.value,
|
|
1321
|
+
fill: F.value.style.chart.layout.bars.useGradient ? `url(#vertical_bar_gradient_${A.value}_${r})` : D(n)(t.color, F.value.style.chart.layout.bars.fillOpacity),
|
|
1322
|
+
rx: F.value.style.chart.layout.bars.borderRadius,
|
|
1323
|
+
stroke: F.value.style.chart.layout.bars.useStroke ? t.color : "none",
|
|
1324
|
+
"stroke-width": F.value.style.chart.layout.bars.useStroke ? F.value.style.chart.layout.bars.strokeWidth : 0,
|
|
1325
|
+
class: y({ "vue-data-ui-transition": D(I) })
|
|
1326
|
+
}, null, 10, ot),
|
|
1327
|
+
e.$slots.pattern ? (S(), g("rect", {
|
|
1328
|
+
key: 0,
|
|
1329
|
+
x: D(d)(cr.value ? Y.value.left + Y.value.width / 2 - (t.sign === 1 ? 0 : Q(t.value) <= 0 ? 1e-4 : Q(t.value)) : Y.value.left),
|
|
1330
|
+
y: Y.value.top + (z.value + q.value) * r + K.value[r] * G.value,
|
|
1331
|
+
width: D(d)(Q(t.value) <= 0 ? 1e-4 : Q(t.value)),
|
|
1332
|
+
height: q.value <= 0 ? 1e-4 : q.value,
|
|
1333
|
+
fill: `url(#pattern_${A.value}_${t.absoluteIndex})`,
|
|
1334
|
+
rx: F.value.style.chart.layout.bars.borderRadius,
|
|
1335
|
+
stroke: F.value.style.chart.layout.bars.useStroke ? t.color : "none",
|
|
1336
|
+
"stroke-width": F.value.style.chart.layout.bars.useStroke ? F.value.style.chart.layout.bars.strokeWidth : 0,
|
|
1337
|
+
class: y({ "vue-data-ui-transition": D(I) })
|
|
1338
|
+
}, null, 10, st)) : h("", !0),
|
|
1339
|
+
(!t.isChild || t.isLastChild) && F.value.style.chart.layout.separators.show && r !== W.value.length - 1 ? (S(), g("path", {
|
|
1340
|
+
key: 1,
|
|
1341
|
+
stroke: F.value.style.chart.layout.separators.color,
|
|
1342
|
+
"stroke-width": F.value.style.chart.layout.separators.strokeWidth,
|
|
1343
|
+
"stroke-linecap": "round",
|
|
1344
|
+
class: y({ "vue-data-ui-transition": D(I) }),
|
|
1345
|
+
d: `M${L.value}, ${q.value + z.value / 2 + Y.value.top + (z.value + q.value) * r + K.value[r] * G.value} ${F.value.style.chart.layout.separators.fullWidth ? 0 : Y.value.left}, ${q.value + z.value / 2 + Y.value.top + (z.value + q.value) * r + K.value[r] * G.value}`
|
|
1346
|
+
}, null, 10, ct)) : h("", !0),
|
|
1347
|
+
cr.value && F.value.style.chart.layout.separators.show ? (S(), g("path", {
|
|
1348
|
+
key: 2,
|
|
1349
|
+
stroke: F.value.style.chart.layout.separators.color,
|
|
1350
|
+
"stroke-width": F.value.style.chart.layout.separators.strokeWidth,
|
|
1351
|
+
"stroke-linecap": "round",
|
|
1352
|
+
class: y({ "vue-data-ui-transition": D(I) }),
|
|
1353
|
+
d: `M${Y.value.left + Y.value.width / 2}, ${Y.value.top} ${Y.value.left + Y.value.width / 2}, ${Y.value.bottom}`
|
|
1354
|
+
}, null, 10, lt)) : h("", !0)
|
|
1355
|
+
]))), 128)),
|
|
1356
|
+
_("g", {
|
|
1357
|
+
ref_key: "parentLabels",
|
|
1358
|
+
ref: ln
|
|
1359
|
+
}, [(S(!0), g(f, null, w(W.value, (e, t) => (S(), g("g", {
|
|
1360
|
+
key: `pn_${e.id}`,
|
|
1361
|
+
class: "vue-ui-horizontal-bar-parent-label"
|
|
1362
|
+
}, [
|
|
1363
|
+
e.isChild && e.childIndex === 0 && F.value.style.chart.layout.bars.parentLabels.show ? (S(), g("rect", {
|
|
1364
|
+
key: 0,
|
|
1365
|
+
class: y(["vue-ui-horizontal-bar-parent-marker", { "vue-data-ui-transition": D(I) }]),
|
|
1366
|
+
x: 2,
|
|
1367
|
+
y: dr(e, t).y - F.value.style.chart.layout.bars.parentLabels.fontSize / 1.5,
|
|
1368
|
+
height: F.value.style.chart.layout.bars.parentLabels.fontSize / 1.5,
|
|
1369
|
+
width: F.value.style.chart.layout.bars.parentLabels.fontSize / 1.5,
|
|
1370
|
+
rx: 1,
|
|
1371
|
+
fill: e.color
|
|
1372
|
+
}, null, 10, ut)) : h("", !0),
|
|
1373
|
+
e.isChild && e.childIndex === 0 && F.value.style.chart.layout.bars.parentLabels.show ? (S(), g("text", {
|
|
1374
|
+
key: 1,
|
|
1375
|
+
class: y({ "vue-data-ui-transition": D(I) }),
|
|
1376
|
+
transform: `translate(${F.value.style.chart.layout.bars.parentLabels.offsetX + F.value.style.chart.layout.bars.parentLabels.fontSize}, ${dr(e, t).y})`,
|
|
1377
|
+
"font-size": F.value.style.chart.layout.bars.parentLabels.fontSize,
|
|
1378
|
+
fill: F.value.style.chart.layout.bars.parentLabels.color,
|
|
1379
|
+
"font-weight": F.value.style.chart.layout.bars.parentLabels.bold ? "bold" : "normal",
|
|
1380
|
+
"text-anchor": "start",
|
|
1381
|
+
innerHTML: D(i)({
|
|
1382
|
+
content: `${pr(e, t)}`,
|
|
1383
|
+
fontSize: F.value.style.chart.layout.bars.parentLabels.fontSize,
|
|
1384
|
+
fill: F.value.style.chart.layout.bars.parentLabels.color,
|
|
1385
|
+
x: 0,
|
|
1386
|
+
y: 0,
|
|
1387
|
+
translateY: !1
|
|
1388
|
+
})
|
|
1389
|
+
}, null, 10, dt)) : h("", !0),
|
|
1390
|
+
e.isChild && e.childIndex === 0 && F.value.style.chart.layout.bars.parentLabels.show ? (S(), g("text", {
|
|
1391
|
+
key: 2,
|
|
1392
|
+
class: y({ "vue-data-ui-transition": D(I) }),
|
|
1393
|
+
transform: `translate(${F.value.style.chart.layout.bars.parentLabels.offsetX + F.value.style.chart.layout.bars.parentLabels.fontSize}, ${dr(e, t).y + D(ne)(pr(e, t)) * F.value.style.chart.layout.bars.parentLabels.fontSize * 1.1})`,
|
|
1394
|
+
"font-size": F.value.style.chart.layout.bars.parentLabels.fontSize,
|
|
1395
|
+
fill: F.value.style.chart.layout.bars.parentLabels.color,
|
|
1396
|
+
"font-weight": F.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal",
|
|
1397
|
+
"text-anchor": "start"
|
|
1398
|
+
}, E(mr(e, t)), 11, ft)) : h("", !0)
|
|
1399
|
+
]))), 128))], 512),
|
|
1400
|
+
_("g", {
|
|
1401
|
+
ref_key: "childLabels",
|
|
1402
|
+
ref: un
|
|
1403
|
+
}, [(S(!0), g(f, null, w(Gn.value, (e, t) => (S(), g("g", {
|
|
1404
|
+
key: `cl_${e.id}`,
|
|
1405
|
+
class: "vue-ui-horizontal-bar-child-label"
|
|
1406
|
+
}, [(e.isChild || !e.hasChildren) && F.value.style.chart.layout.bars.nameLabels.show ? (S(), g("text", {
|
|
1407
|
+
key: 0,
|
|
1408
|
+
"text-anchor": "start",
|
|
1409
|
+
class: y({ "vue-data-ui-transition": D(I) }),
|
|
1410
|
+
transform: `translate(${Math.abs(F.value.style.chart.layout.bars.nameLabels.offsetX)}, ${D(d)(Y.value.top + (z.value + q.value) * t + q.value / 2 + F.value.style.chart.layout.bars.nameLabels.fontSize / 2 + K.value[t] * G.value)})`,
|
|
1411
|
+
"font-size": F.value.style.chart.layout.bars.nameLabels.fontSize,
|
|
1412
|
+
fill: "transparent",
|
|
1413
|
+
"font-weight": F.value.style.chart.layout.bars.nameLabels.bold ? "bold" : "normal",
|
|
1414
|
+
style: { "user-select": "none" },
|
|
1415
|
+
innerHTML: D(i)({
|
|
1416
|
+
content: e.name,
|
|
1417
|
+
fontSize: F.value.style.chart.layout.bars.nameLabels.fontSize,
|
|
1418
|
+
fill: "transparent",
|
|
1419
|
+
x: 0,
|
|
1420
|
+
y: 0,
|
|
1421
|
+
translateY: !0
|
|
1422
|
+
})
|
|
1423
|
+
}, null, 10, pt)) : h("", !0)]))), 128))], 512),
|
|
1424
|
+
_("g", null, [(S(!0), g(f, null, w(W.value, (e, t) => (S(), g("g", {
|
|
1425
|
+
key: `vislab_${e.id}`,
|
|
1426
|
+
class: "vue-ui-horizontal-bar-child-label"
|
|
1427
|
+
}, [(e.isChild || !e.hasChildren) && F.value.style.chart.layout.bars.nameLabels.show ? (S(), g("text", {
|
|
1428
|
+
key: 0,
|
|
1429
|
+
class: y({ "vue-data-ui-transition": D(I) }),
|
|
1430
|
+
"text-anchor": "end",
|
|
1431
|
+
transform: `translate(${Y.value.left + F.value.style.chart.layout.bars.nameLabels.offsetX - 6}, ${Y.value.top + (z.value + q.value) * t + q.value / 2 + F.value.style.chart.layout.bars.nameLabels.fontSize / 3 + K.value[t] * G.value})`,
|
|
1432
|
+
"font-size": F.value.style.chart.layout.bars.nameLabels.fontSize,
|
|
1433
|
+
fill: F.value.style.chart.layout.bars.nameLabels.color,
|
|
1434
|
+
"font-weight": F.value.style.chart.layout.bars.nameLabels.bold ? "bold" : "normal",
|
|
1435
|
+
innerHTML: D(i)({
|
|
1436
|
+
content: e.name,
|
|
1437
|
+
fontSize: F.value.style.chart.layout.bars.nameLabels.fontSize,
|
|
1438
|
+
fill: F.value.style.chart.layout.bars.nameLabels.color,
|
|
1439
|
+
x: 0,
|
|
1440
|
+
y: 0,
|
|
1441
|
+
translateY: !0
|
|
1442
|
+
})
|
|
1443
|
+
}, null, 10, mt)) : h("", !0)]))), 128))]),
|
|
1444
|
+
_("g", null, [(S(!0), g(f, null, w(W.value, (e, t) => (S(), g("g", {
|
|
1445
|
+
key: `sdl_${e.id}`,
|
|
1446
|
+
class: "vue-ui-horizontal-bar-child-label"
|
|
1447
|
+
}, [_("text", {
|
|
1448
|
+
class: y({ "vue-data-ui-transition": D(I) }),
|
|
1449
|
+
transform: `translate(${cr.value ? Y.value.left + Y.value.width / 2 + (e.sign === 1 ? -12 : 12) + (e.sign === 1 ? -F.value.style.chart.layout.bars.dataLabels.offsetX : F.value.style.chart.layout.bars.dataLabels.offsetX) : Math.min(ur(e.value) + 3 + F.value.style.chart.layout.bars.dataLabels.offsetX, Y.value.right - 2)},${Y.value.top + (z.value + q.value) * t + q.value / 2 + K.value[t] * G.value + F.value.style.chart.layout.bars.dataLabels.fontSize / 3})`,
|
|
1450
|
+
"text-anchor": !cr.value || e.sign === -1 ? "start" : "end",
|
|
1451
|
+
"font-size": F.value.style.chart.layout.bars.dataLabels.fontSize,
|
|
1452
|
+
fill: F.value.style.chart.layout.bars.dataLabels.color,
|
|
1453
|
+
"font-weight": F.value.style.chart.layout.bars.dataLabels.bold ? "bold" : "normal"
|
|
1454
|
+
}, E(xr(e.value, e, t, e.sign)), 11, ht)]))), 128))]),
|
|
1455
|
+
(S(!0), g(f, null, w(W.value, (e, t) => (S(), g("g", null, [_("rect", {
|
|
1456
|
+
x: 0,
|
|
1457
|
+
y: Y.value.top + (z.value + q.value) * t - z.value / 2 + K.value[t] * G.value,
|
|
1458
|
+
width: L.value,
|
|
1459
|
+
height: q.value + z.value <= 0 ? 1e-4 : q.value + z.value,
|
|
1460
|
+
fill: hr.value === e.id ? D(n)(F.value.style.chart.layout.highlighter.color, F.value.style.chart.layout.highlighter.opacity) : "transparent",
|
|
1461
|
+
onMouseenter: (n) => yr(e, t, "pointer"),
|
|
1462
|
+
onMouseleave: (n) => vr({
|
|
1463
|
+
datapoint: e,
|
|
1464
|
+
seriesIndex: t
|
|
1465
|
+
}),
|
|
1466
|
+
onClick: (n) => _r({
|
|
1467
|
+
datapoint: e,
|
|
1468
|
+
seriesIndex: t
|
|
1469
|
+
})
|
|
1470
|
+
}, null, 40, gt)]))), 256)),
|
|
1471
|
+
T(e.$slots, "svg", { svg: {
|
|
1472
|
+
...J.value,
|
|
1473
|
+
drawingArea: Y.value,
|
|
1474
|
+
isPrintingImg: D(Mn) || D(Nn) || gn.value,
|
|
1475
|
+
isPrintingSvg: _n.value
|
|
1476
|
+
} }, void 0, !0)
|
|
1477
|
+
], 512)], 46, tt)), e.$slots.hint ? (S(), g("div", _t, [T(e.$slots, "hint", b(v({
|
|
1478
|
+
hint: F.value.a11y.translations.keyboardNavigation,
|
|
1479
|
+
isVisible: Wr.value
|
|
1480
|
+
})), void 0, !0)])) : h("", !0)]),
|
|
1481
|
+
e.$slots.watermark ? (S(), g("div", vt, [T(e.$slots, "watermark", b(v({ isPrinting: D(Mn) || D(Nn) || gn.value || _n.value })), void 0, !0)])) : h("", !0),
|
|
1482
|
+
F.value.style.chart.legend.show && F.value.style.chart.legend.position === "bottom" ? (S(), g("div", {
|
|
1483
|
+
key: 7,
|
|
1484
|
+
ref_key: "chartLegend",
|
|
1485
|
+
ref: en
|
|
1486
|
+
}, [(S(), m(Pe, {
|
|
1487
|
+
key: `legend_bottom_${an.value}`,
|
|
1488
|
+
legendSet: H.value,
|
|
1489
|
+
config: qn.value,
|
|
1490
|
+
isCursorPointer: xn.value,
|
|
1491
|
+
onClickMarker: t[1] ||= ({ legend: e }) => X(e.id)
|
|
1492
|
+
}, Ie({
|
|
1493
|
+
item: O(({ legend: e, index: t }) => [_("div", {
|
|
1494
|
+
onClick: (t) => X(e.id),
|
|
1495
|
+
style: x(`opacity:${M.value.includes(e.id) ? .5 : 1}`)
|
|
1496
|
+
}, E(br({
|
|
1497
|
+
legend: e,
|
|
1498
|
+
index: t
|
|
1499
|
+
})), 13, yt)]),
|
|
1500
|
+
legendToggle: O(() => [H.value.length > 2 && F.value.style.chart.legend.selectAllToggle.show && !D(wn) ? (S(), m(ke, {
|
|
1501
|
+
key: 0,
|
|
1502
|
+
backgroundColor: F.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
1503
|
+
color: F.value.style.chart.legend.selectAllToggle.color,
|
|
1504
|
+
fontSize: F.value.style.chart.legend.fontSize,
|
|
1505
|
+
checked: M.value.length > 0,
|
|
1506
|
+
isCursorPointer: xn.value,
|
|
1507
|
+
onToggle: rr
|
|
1508
|
+
}, null, 8, [
|
|
1509
|
+
"backgroundColor",
|
|
1510
|
+
"color",
|
|
1511
|
+
"fontSize",
|
|
1512
|
+
"checked",
|
|
1513
|
+
"isCursorPointer"
|
|
1514
|
+
])) : h("", !0)]),
|
|
1515
|
+
_: 2
|
|
1516
|
+
}, [e.$slots.pattern ? {
|
|
1517
|
+
name: "legend-pattern",
|
|
1518
|
+
fn: O(({ legend: e, index: t }) => [Re(Ce, {
|
|
1519
|
+
shape: e.shape,
|
|
1520
|
+
radius: 30,
|
|
1521
|
+
stroke: "none",
|
|
1522
|
+
plot: {
|
|
1523
|
+
x: 30,
|
|
1524
|
+
y: 30
|
|
1525
|
+
},
|
|
1526
|
+
fill: `url(#pattern_${A.value}_${t})`
|
|
1527
|
+
}, null, 8, ["shape", "fill"])]),
|
|
1528
|
+
key: "0"
|
|
1529
|
+
} : void 0]), 1032, [
|
|
1530
|
+
"legendSet",
|
|
1531
|
+
"config",
|
|
1532
|
+
"isCursorPointer"
|
|
1533
|
+
]))], 512)) : h("", !0),
|
|
1534
|
+
T(e.$slots, "legend", { legend: H.value }, void 0, !0),
|
|
1535
|
+
e.$slots.source ? (S(), g("div", {
|
|
1536
|
+
key: 8,
|
|
1537
|
+
ref_key: "source",
|
|
1538
|
+
ref: tn,
|
|
1539
|
+
dir: "auto"
|
|
1540
|
+
}, [T(e.$slots, "source", {}, void 0, !0)], 512)) : h("", !0),
|
|
1541
|
+
Re(D(Rt), {
|
|
1542
|
+
teleportTo: F.value.style.chart.tooltip.teleportTo,
|
|
1543
|
+
show: V.value.showTooltip && Yt.value && M.value.length < k.dataset.length,
|
|
1544
|
+
backgroundColor: F.value.style.chart.tooltip.backgroundColor,
|
|
1545
|
+
color: F.value.style.chart.tooltip.color,
|
|
1546
|
+
borderRadius: F.value.style.chart.tooltip.borderRadius,
|
|
1547
|
+
borderColor: F.value.style.chart.tooltip.borderColor,
|
|
1548
|
+
borderWidth: F.value.style.chart.tooltip.borderWidth,
|
|
1549
|
+
fontSize: F.value.style.chart.tooltip.fontSize,
|
|
1550
|
+
backgroundOpacity: F.value.style.chart.tooltip.backgroundOpacity,
|
|
1551
|
+
position: F.value.style.chart.tooltip.position,
|
|
1552
|
+
offsetX: F.value.style.chart.tooltip.offsetX,
|
|
1553
|
+
offsetY: F.value.style.chart.tooltip.offsetY,
|
|
1554
|
+
parent: j.value,
|
|
1555
|
+
content: Xt.value,
|
|
1556
|
+
isFullscreen: Cr.value,
|
|
1557
|
+
isCustom: F.value.style.chart.tooltip.customFormat && typeof F.value.style.chart.tooltip.customFormat == "function",
|
|
1558
|
+
smooth: F.value.style.chart.tooltip.smooth,
|
|
1559
|
+
backdropFilter: F.value.style.chart.tooltip.backdropFilter,
|
|
1560
|
+
smoothForce: F.value.style.chart.tooltip.smoothForce,
|
|
1561
|
+
smoothSnapThreshold: F.value.style.chart.tooltip.smoothSnapThreshold,
|
|
1562
|
+
isA11yMode: yn.value === "keyboard",
|
|
1563
|
+
a11yPosition: vn.value
|
|
1564
|
+
}, {
|
|
1565
|
+
"tooltip-before": O(() => [T(e.$slots, "tooltip-before", b(v({ ...gr.value })), void 0, !0)]),
|
|
1566
|
+
tooltip: O(() => [T(e.$slots, "tooltip", b(v({ ...gr.value })), void 0, !0)]),
|
|
1567
|
+
"tooltip-after": O(() => [T(e.$slots, "tooltip-after", b(v({ ...gr.value })), void 0, !0)]),
|
|
1568
|
+
_: 3
|
|
1569
|
+
}, 8, [
|
|
1570
|
+
"teleportTo",
|
|
1571
|
+
"show",
|
|
1572
|
+
"backgroundColor",
|
|
1573
|
+
"color",
|
|
1574
|
+
"borderRadius",
|
|
1575
|
+
"borderColor",
|
|
1576
|
+
"borderWidth",
|
|
1577
|
+
"fontSize",
|
|
1578
|
+
"backgroundOpacity",
|
|
1579
|
+
"position",
|
|
1580
|
+
"offsetX",
|
|
1581
|
+
"offsetY",
|
|
1582
|
+
"parent",
|
|
1583
|
+
"content",
|
|
1584
|
+
"isFullscreen",
|
|
1585
|
+
"isCustom",
|
|
1586
|
+
"smooth",
|
|
1587
|
+
"backdropFilter",
|
|
1588
|
+
"smoothForce",
|
|
1589
|
+
"smoothSnapThreshold",
|
|
1590
|
+
"isA11yMode",
|
|
1591
|
+
"a11yPosition"
|
|
1592
|
+
]),
|
|
1593
|
+
Jt.value && F.value.userOptions.buttons.table ? (S(), m(We(Mr.value.component), Be({ key: 9 }, Mr.value.props, {
|
|
1594
|
+
ref_key: "tableUnit",
|
|
1595
|
+
ref: sn,
|
|
1596
|
+
onClose: Pr
|
|
1597
|
+
}), Ie({
|
|
1598
|
+
content: O(() => [_("div", {
|
|
1599
|
+
ref_key: "tableContainer",
|
|
1600
|
+
ref: Rn,
|
|
1601
|
+
class: "vue-ui-vertical-bar-table atom-data-table",
|
|
1602
|
+
style: x(`${F.value.table.useDialog ? "" : "max-height: 300px; margin-top: 24px"}`)
|
|
1603
|
+
}, [_("div", bt, [F.value.table.useDialog ? h("", !0) : (S(), g("div", {
|
|
1604
|
+
key: 0,
|
|
1605
|
+
role: "button",
|
|
1606
|
+
tabindex: "0",
|
|
1607
|
+
style: x(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:${xn.value ? "pointer" : "default"}; background:${F.value.table.th.backgroundColor};`),
|
|
1608
|
+
onClick: Pr,
|
|
1609
|
+
onKeypress: Ye(Pr, ["enter"])
|
|
1610
|
+
}, [Re(D(zt), {
|
|
1611
|
+
name: "close",
|
|
1612
|
+
stroke: F.value.table.th.color,
|
|
1613
|
+
"stroke-width": 2
|
|
1614
|
+
}, null, 8, ["stroke"])], 36)), _("div", {
|
|
1615
|
+
style: {
|
|
1616
|
+
width: "100%",
|
|
1617
|
+
"container-type": "inline-size"
|
|
1618
|
+
},
|
|
1619
|
+
class: y({ "vue-ui-responsive": D(Nr) })
|
|
1620
|
+
}, [_("table", xt, [
|
|
1621
|
+
F.value.table.useDialog ? h("", !0) : (S(), g("caption", {
|
|
1622
|
+
key: 0,
|
|
1623
|
+
style: x({
|
|
1624
|
+
backgroundColor: F.value.table.th.backgroundColor,
|
|
1625
|
+
color: F.value.table.th.color,
|
|
1626
|
+
outline: F.value.table.th.outline
|
|
1627
|
+
}),
|
|
1628
|
+
class: "vue-ui-data-table__caption"
|
|
1629
|
+
}, [Le(E(F.value.style.chart.title.text) + " ", 1), F.value.style.chart.title.subtitle.text ? (S(), g("span", St, E(F.value.style.chart.title.subtitle.text), 1)) : h("", !0)], 4)),
|
|
1630
|
+
_("thead", null, [_("tr", {
|
|
1631
|
+
role: "row",
|
|
1632
|
+
style: x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color}`)
|
|
1633
|
+
}, [(S(!0), g(f, null, w($.value.head, (e) => (S(), g("th", { style: x(`outline:${F.value.table.th.outline}`) }, [_("div", Ct, E(e), 1)], 4))), 256))], 4), _("tr", null, [
|
|
1634
|
+
_("th", { style: x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color};outline:${F.value.table.th.outline}`) }, null, 4),
|
|
1635
|
+
_("th", { style: x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color};outline:${F.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`) }, " ∑ " + E(F.value.table.td.prefix) + E(isNaN(Z.value) ? "" : Z.value.toFixed(F.value.table.td.roundingValue)) + E(F.value.table.td.suffix), 5),
|
|
1636
|
+
_("th", { style: x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color};outline:${F.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`) }, " 100% ", 4),
|
|
1637
|
+
_("th", { style: x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color};outline:${F.value.table.th.outline}`) }, null, 4),
|
|
1638
|
+
_("th", { style: x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color};outline:${F.value.table.th.outline}`) }, null, 4),
|
|
1639
|
+
_("th", { style: x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color};outline:${F.value.table.th.outline}`) }, null, 4),
|
|
1640
|
+
_("th", { style: x(`background:${F.value.table.th.backgroundColor};color:${F.value.table.th.color};outline:${F.value.table.th.outline}`) }, null, 4)
|
|
1641
|
+
])]),
|
|
1642
|
+
_("tbody", null, [(S(!0), g(f, null, w($.value.body, (e, t) => (S(), g("tr", {
|
|
1643
|
+
class: y({
|
|
1644
|
+
"vue-ui-data-table__tbody__row": !0,
|
|
1645
|
+
"vue-ui-data-table__tbody__row-even": t % 2 == 0,
|
|
1646
|
+
"vue-ui-data-table__tbody__row-odd": t % 2 != 0
|
|
1647
|
+
}),
|
|
1648
|
+
style: x(`background:${F.value.table.td.backgroundColor};color:${F.value.table.td.color}`)
|
|
1649
|
+
}, [
|
|
1650
|
+
_("td", {
|
|
1651
|
+
class: "vue-ui-data-table__tbody__td",
|
|
1652
|
+
style: x(`outline:${F.value.table.td.outline};font-variant-numeric: tabular-nums;`),
|
|
1653
|
+
"data-cell": $.value.head[0] ?? ""
|
|
1654
|
+
}, [_("div", Tt, [e.color ? (S(), g("span", {
|
|
1655
|
+
key: 0,
|
|
1656
|
+
style: x(`color:${e.color};margin-right:3px`)
|
|
1657
|
+
}, "⬤", 4)) : h("", !0), _("span", null, E(e.parentName), 1)])], 12, wt),
|
|
1658
|
+
_("td", {
|
|
1659
|
+
class: "vue-ui-data-table__tbody__td",
|
|
1660
|
+
style: x(`outline:${F.value.table.td.outline}`),
|
|
1661
|
+
"data-cell": $.value.head[1] ?? ""
|
|
1662
|
+
}, [_("div", Dt, E(F.value.table.td.prefix) + E([
|
|
1663
|
+
"",
|
|
1664
|
+
NaN,
|
|
1665
|
+
void 0
|
|
1666
|
+
].includes(e.parentValue) ? "" : e.parentValue.toFixed(F.value.table.td.roundingValue)) + E(F.value.table.td.suffix), 1)], 12, Et),
|
|
1667
|
+
_("td", {
|
|
1668
|
+
class: "vue-ui-data-table__tbody__td",
|
|
1669
|
+
style: x(`outline:${F.value.table.td.outline}`),
|
|
1670
|
+
"data-cell": $.value.head[2] ?? ""
|
|
1671
|
+
}, [_("div", kt, E([
|
|
1672
|
+
"",
|
|
1673
|
+
NaN,
|
|
1674
|
+
void 0
|
|
1675
|
+
].includes(e.percentageToTotal) ? "" : `${(e.percentageToTotal * 100).toFixed(F.value.table.td.roundingPercentage)}%`), 1)], 12, Ot),
|
|
1676
|
+
_("td", {
|
|
1677
|
+
class: "vue-ui-data-table__tbody__td",
|
|
1678
|
+
style: x(`outline:${F.value.table.td.outline}`),
|
|
1679
|
+
"data-cell": $.value.head[3] ?? ""
|
|
1680
|
+
}, [_("div", jt, E(e.childName), 1)], 12, At),
|
|
1681
|
+
_("td", {
|
|
1682
|
+
class: "vue-ui-data-table__tbody__td",
|
|
1683
|
+
style: x(`outline:${F.value.table.td.outline}`),
|
|
1684
|
+
"data-cell": $.value.head[4] ?? ""
|
|
1685
|
+
}, [_("div", Nt, E(F.value.table.td.prefix) + E([
|
|
1686
|
+
"",
|
|
1687
|
+
NaN,
|
|
1688
|
+
void 0
|
|
1689
|
+
].includes(e.childValue) ? "" : e.childValue.toFixed(F.value.table.td.roundingValue)) + E(F.value.table.td.suffix), 1)], 12, Mt),
|
|
1690
|
+
_("td", {
|
|
1691
|
+
class: "vue-ui-data-table__tbody__td",
|
|
1692
|
+
style: x(`outline:${F.value.table.td.outline}`),
|
|
1693
|
+
"data-cell": $.value.head[5] ?? ""
|
|
1694
|
+
}, [_("div", Ft, E([
|
|
1695
|
+
"",
|
|
1696
|
+
NaN,
|
|
1697
|
+
void 0
|
|
1698
|
+
].includes(e.childPercentageToParent) ? "" : `${(e.childPercentageToParent * 100).toFixed(F.value.table.td.roundingPercentage)}%`), 1)], 12, Pt),
|
|
1699
|
+
_("td", {
|
|
1700
|
+
class: "vue-ui-data-table__tbody__td",
|
|
1701
|
+
style: x(`outline:${F.value.table.td.outline}`),
|
|
1702
|
+
"data-cell": $.value.head[6] ?? ""
|
|
1703
|
+
}, [_("div", Lt, E([
|
|
1704
|
+
"",
|
|
1705
|
+
NaN,
|
|
1706
|
+
void 0
|
|
1707
|
+
].includes(e.childPercentageToTotal) ? "" : `${(e.childPercentageToTotal * 100).toFixed(F.value.table.td.roundingPercentage)}%`), 1)], 12, It)
|
|
1708
|
+
], 6))), 256))])
|
|
1709
|
+
])], 2)])], 4)]),
|
|
1710
|
+
_: 2
|
|
1711
|
+
}, [F.value.table.useDialog ? {
|
|
1712
|
+
name: "title",
|
|
1713
|
+
fn: O(() => [Le(E(Mr.value.title), 1)]),
|
|
1714
|
+
key: "0"
|
|
1715
|
+
} : void 0, F.value.table.useDialog ? {
|
|
1716
|
+
name: "actions",
|
|
1717
|
+
fn: O(() => [_("button", {
|
|
1718
|
+
tabindex: "0",
|
|
1719
|
+
class: "vue-ui-user-options-button",
|
|
1720
|
+
onClick: t[2] ||= (e) => Sr(F.value.userOptions.callbacks.csv),
|
|
1721
|
+
style: x({ cursor: xn.value ? "pointer" : "default" })
|
|
1722
|
+
}, [Re(D(zt), {
|
|
1723
|
+
name: "fileCsv",
|
|
1724
|
+
stroke: Mr.value.props.color
|
|
1725
|
+
}, null, 8, ["stroke"])], 4)]),
|
|
1726
|
+
key: "1"
|
|
1727
|
+
} : void 0]), 1040)) : h("", !0),
|
|
1728
|
+
T(e.$slots, "skeleton", {}, () => [D(wn) ? (S(), m(ge, { key: 0 })) : h("", !0)], !0)
|
|
1729
|
+
], 46, Ze));
|
|
1730
|
+
}
|
|
1731
|
+
}, [["__scopeId", "data-v-eeca2238"]]);
|
|
1732
|
+
//#endregion
|
|
1733
|
+
export { Xe as n, Rt as t };
|