vue-data-ui 3.15.12 → 3.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +132 -59
- package/dist/A11yDataTable-KcVAX2cP.js +54 -0
- package/dist/{Arrow-DlPyR6HQ.js → Arrow-Bn-9n3bm.js} +1 -1
- package/dist/{BaseDraggableDialog-DSpKTn3R.js → BaseDraggableDialog-CIb-iD9g.js} +2 -2
- package/dist/{BaseIcon-CNx8Tzl5.js → BaseIcon-Cb3zzG6s.js} +1 -1
- package/dist/{BaseLegendToggle-Y61xahI4.js → BaseLegendToggle-BQVIawmA.js} +1 -1
- package/dist/{BaseZoomControls-CoFievy9.js → BaseZoomControls-DievbOeJ.js} +2 -2
- package/dist/ColorPicker-B0mV4xzu.js +255 -0
- package/dist/{DataTable-Bo1pmAqG.js → DataTable-DT2kIdQ6.js} +2 -2
- package/dist/Legend-CS7Xo5LK.js +101 -0
- package/dist/{NonSvgPenAndPaper-CGk_xThe.js → NonSvgPenAndPaper-VyJFyJ6X.js} +3 -3
- package/dist/{PackageVersion-DN9d0ME5.js → PackageVersion-DPO-OOVI.js} +1 -1
- package/dist/{PenAndPaper-DWV1FMIi.js → PenAndPaper-Ct3qJ4lA.js} +109 -101
- package/dist/{Shape-CSyWYgXc.js → Shape-BKRUOeKk.js} +1 -1
- package/dist/{Slicer-DZJA9IG-.js → Slicer-DUycDH_N.js} +2 -2
- package/dist/{SlicerPreview-I2J0UUF_.js → SlicerPreview-DTjwV0iY.js} +2 -2
- package/dist/{SparkTooltip-BiseJed3.js → SparkTooltip-BorBpltj.js} +1 -1
- package/dist/{Title-BfyrP-jp.js → Title-BeMKE1cj.js} +1 -1
- package/dist/{Tooltip-DL3QgjZf.js → Tooltip-Bf-kM3_A.js} +86 -68
- package/dist/{UserOptions-CrLqEimB.js → UserOptions-rW2fRf3V.js} +228 -222
- 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-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-BAqzNjb1.js → dom-to-png-CtxhhdWb.js} +1 -1
- package/dist/{exposedLib-H4lmBl1t.js → exposedLib-DlqmhBx3.js} +1 -1
- package/dist/{img-BYYzY_QU.js → img-LXxMLmCg.js} +1 -1
- package/dist/{labelUtils-CTXUc3V9.js → labelUtils-CqTHa20R.js} +1 -1
- package/dist/{lib-GwPnJSrY.js → lib-DBptbyyI.js} +106 -84
- package/dist/{pdf-z-YiJeJQ.js → pdf-B4tTdfvl.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +59 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-80fzdfxt.js → useAutoSizeLabelsInsideViewbox-DX7LdvFX.js} +1 -1
- package/dist/{useConfig-CIgyKZ6R.js → useConfig-DO94Aj5s.js} +953 -700
- package/dist/{useNestedProp-BBT0mbHh.js → useNestedProp-Bf5XFbs8.js} +1 -1
- package/dist/{useObjectBindings-BlXBVtRa.js → useObjectBindings-DQ8g8Jwi.js} +1 -1
- package/dist/usePrefersMotion-CUKm8_t8.js +15 -0
- package/dist/{usePrinter-DiK5R6k-.js → usePrinter-CEpYU3r5.js} +2 -2
- package/dist/utils.js +3 -3
- package/dist/{vue-data-ui-C2kPofmi.js → vue-data-ui-DXGkXRnC.js} +68 -68
- package/dist/vue-data-ui.js +72 -72
- package/dist/vue-ui-3d-bar-BaFpQnd5.js +1597 -0
- package/dist/{vue-ui-accordion-BGHTqIBt.js → vue-ui-accordion-nvggWcGN.js} +4 -4
- package/dist/vue-ui-age-pyramid-CRM498Pc.js +1069 -0
- package/dist/{vue-ui-annotator-B1GWVtPp.js → vue-ui-annotator-CkPi9moo.js} +7 -7
- package/dist/{vue-ui-bullet-DPoGGtaG.js → vue-ui-bullet-BBiwof3c.js} +158 -150
- package/dist/vue-ui-bump-Brxpu4xV.js +1147 -0
- package/dist/vue-ui-candlestick-DAnZv77-.js +1587 -0
- package/dist/{vue-ui-carousel-table-CmiHTJ8E.js → vue-ui-carousel-table-BHRZBYY0.js} +168 -160
- package/dist/vue-ui-chestnut-CbrYnRgm.js +1812 -0
- package/dist/vue-ui-chord-CaX_IUVs.js +1326 -0
- package/dist/vue-ui-circle-pack-CR3h53sc.js +988 -0
- package/dist/{vue-ui-cursor-B4mHR7QC.js → vue-ui-cursor-Cjfazw7Z.js} +4 -4
- package/dist/vue-ui-dag-B9vH3c66.js +3047 -0
- package/dist/{vue-ui-dashboard-Bo5FX73U.js → vue-ui-dashboard-DWll05qs.js} +70 -70
- package/dist/{vue-ui-digits-mpo2IcM5.js → vue-ui-digits-DcM67rMx.js} +76 -66
- package/dist/vue-ui-donut-Be5G38P5.js +2229 -0
- package/dist/vue-ui-donut-evolution-BLSesj3c.js +1358 -0
- package/dist/vue-ui-dumbbell-DIMiCY4r.js +1380 -0
- package/dist/vue-ui-flow-zvZylhgr.js +1202 -0
- package/dist/{vue-ui-funnel-BRkaEkBb.js → vue-ui-funnel-CSri-oWm.js} +7 -7
- package/dist/vue-ui-galaxy-CGykxsAI.js +1012 -0
- package/dist/{vue-ui-gauge-J2VYHsQe.js → vue-ui-gauge-D1MNB9Jq.js} +8 -8
- package/dist/vue-ui-geo-DdJDGhG2.js +1437 -0
- package/dist/{vue-ui-gizmo-DEec3-v9.js → vue-ui-gizmo-BZYRHGFm.js} +77 -68
- package/dist/vue-ui-heatmap-CryOx6XK.js +1500 -0
- package/dist/vue-ui-history-plot-C85iw9Kl.js +1449 -0
- package/dist/vue-ui-horizontal-bar-BoBZOybC.js +1637 -0
- package/dist/vue-ui-kpi-DHrolXw6.js +109 -0
- package/dist/{vue-ui-mini-loader-CoOHvZUk.js → vue-ui-mini-loader-Bc3fEQ9j.js} +3 -3
- package/dist/{vue-ui-molecule-Chq1qWDK.js → vue-ui-molecule-DJ_BQ4DK.js} +6 -6
- package/dist/vue-ui-mood-radar-CBE02TpQ.js +1086 -0
- package/dist/vue-ui-nested-donuts-YTFtb4CL.js +1595 -0
- package/dist/vue-ui-onion-B9l81-PS.js +1124 -0
- package/dist/vue-ui-parallel-coordinate-plot-C1e_rs8J.js +1252 -0
- package/dist/vue-ui-quadrant-C1qsLCRn.js +1759 -0
- package/dist/vue-ui-quick-chart-DFoz3WiA.js +2216 -0
- package/dist/vue-ui-radar-Cmo3p-UA.js +1139 -0
- package/dist/{vue-ui-rating-zV58MDQh.js → vue-ui-rating-BAHhYt_A.js} +3 -3
- package/dist/vue-ui-relation-circle-BqwznVwf.js +782 -0
- package/dist/vue-ui-ridgeline-CDk9eXJq.js +1473 -0
- package/dist/vue-ui-rings-BRkGoQdL.js +1156 -0
- package/dist/vue-ui-scatter-BxDtWASQ.js +1831 -0
- package/dist/{vue-ui-skeleton-CbqNz9IE.js → vue-ui-skeleton-D6kTb9aO.js} +4 -4
- package/dist/{vue-ui-smiley-BK5EKp9u.js → vue-ui-smiley-CzVaLlpB.js} +3 -3
- package/dist/vue-ui-spark-trend-D8Mf2A1w.js +378 -0
- package/dist/{vue-ui-sparkbar-DUDWvTo-.js → vue-ui-sparkbar-BbYj56c3.js} +86 -84
- package/dist/vue-ui-sparkgauge-DXzOSLRb.js +256 -0
- package/dist/vue-ui-sparkhistogram-DMfSx1iH.js +474 -0
- package/dist/vue-ui-sparkline-D-rQ9PsC.js +1327 -0
- package/dist/vue-ui-sparkstackbar-DK5n8IKP.js +621 -0
- package/dist/vue-ui-stackbar-BHthy6jf.js +2070 -0
- package/dist/vue-ui-stackline-C6-WNpKD.js +2164 -0
- package/dist/vue-ui-strip-plot-CHu-1ilI.js +1183 -0
- package/dist/{vue-ui-table-BHuXI4Eq.js → vue-ui-table-DW9JGsLq.js} +6 -6
- package/dist/{vue-ui-table-heatmap-y88sBfu3.js → vue-ui-table-heatmap-LYqoBit9.js} +6 -6
- package/dist/{vue-ui-table-sparkline-ClpLLKi2.js → vue-ui-table-sparkline-CXK1dFr-.js} +5 -5
- package/dist/{vue-ui-thermometer-sjruUGQx.js → vue-ui-thermometer-BN8tflOz.js} +272 -256
- package/dist/{vue-ui-timer-CgdgMKIc.js → vue-ui-timer-DGT0UBOF.js} +6 -6
- package/dist/{vue-ui-tiremarks-UBDpAIVr.js → vue-ui-tiremarks-BZ-osQqY.js} +204 -191
- package/dist/vue-ui-treemap-98KaVRyd.js +1723 -0
- package/dist/vue-ui-waffle-Cb7oJnIc.js +1321 -0
- package/dist/vue-ui-wheel-sfew1fjw.js +738 -0
- package/dist/vue-ui-word-cloud-vq1t9JHr.js +1548 -0
- package/dist/{vue-ui-world-D-3wgoTn.js → vue-ui-world-CN0f6elD.js} +8 -8
- package/dist/vue-ui-xy-BdzEiImZ.js +3877 -0
- package/dist/vue-ui-xy-canvas-CWQzUQzY.js +1810 -0
- package/package.json +2 -2
- package/dist/ColorPicker-j0ySewhI.js +0 -244
- package/dist/Legend-1LMMsPxL.js +0 -90
- package/dist/vue-ui-3d-bar-BhNgFaJA.js +0 -1484
- package/dist/vue-ui-age-pyramid-CuYRf5v-.js +0 -997
- package/dist/vue-ui-bump-C_fKharc.js +0 -1059
- package/dist/vue-ui-candlestick-BY-_E7eZ.js +0 -1487
- package/dist/vue-ui-chestnut-C-bQYaNI.js +0 -1557
- package/dist/vue-ui-chord-uQYQgyGM.js +0 -1220
- package/dist/vue-ui-circle-pack-CdbDcuDw.js +0 -907
- package/dist/vue-ui-dag-DsHUvjvm.js +0 -2885
- package/dist/vue-ui-donut-CzCgCVsx.js +0 -2139
- package/dist/vue-ui-donut-evolution-C_ck_TOR.js +0 -1297
- package/dist/vue-ui-dumbbell-CVSA90b2.js +0 -1293
- package/dist/vue-ui-flow-CsbSaFnu.js +0 -1075
- package/dist/vue-ui-galaxy-DWKHDciu.js +0 -914
- package/dist/vue-ui-geo-DykhEWVq.js +0 -1331
- package/dist/vue-ui-heatmap-BEDirv8T.js +0 -1334
- package/dist/vue-ui-history-plot-Bs96PebH.js +0 -1292
- package/dist/vue-ui-horizontal-bar-ClQcB9nL.js +0 -1522
- package/dist/vue-ui-kpi-DlUEHKuw.js +0 -101
- package/dist/vue-ui-mood-radar-A2LBLgUi.js +0 -967
- package/dist/vue-ui-nested-donuts-DFX251aT.js +0 -1513
- package/dist/vue-ui-onion-CW0YO9Ro.js +0 -1045
- package/dist/vue-ui-parallel-coordinate-plot-UFg10bHP.js +0 -1134
- package/dist/vue-ui-quadrant-C1pLW2zA.js +0 -1647
- package/dist/vue-ui-quick-chart-FaxttnJY.js +0 -2030
- package/dist/vue-ui-radar-DE70LPBZ.js +0 -1067
- package/dist/vue-ui-relation-circle-iuRXIyRU.js +0 -704
- package/dist/vue-ui-ridgeline-CwvDh5pG.js +0 -1385
- package/dist/vue-ui-rings-80ZUki42.js +0 -1083
- package/dist/vue-ui-scatter-FdAAYJOK.js +0 -1670
- package/dist/vue-ui-spark-trend-C68p8-Xp.js +0 -349
- package/dist/vue-ui-sparkgauge-DdRtHQDe.js +0 -245
- package/dist/vue-ui-sparkhistogram-C9DvzQae.js +0 -396
- package/dist/vue-ui-sparkline-B2RDrdiR.js +0 -1273
- package/dist/vue-ui-sparkstackbar-BsIOHUE5.js +0 -475
- package/dist/vue-ui-stackbar-BZl0kEkb.js +0 -2001
- package/dist/vue-ui-stackline-2VKxwFei.js +0 -2099
- package/dist/vue-ui-strip-plot-B9nBSRyY.js +0 -1080
- package/dist/vue-ui-treemap-BS5EilZf.js +0 -1645
- package/dist/vue-ui-waffle-CbX5K9Q2.js +0 -1211
- package/dist/vue-ui-wheel-BIJ09H5D.js +0 -723
- package/dist/vue-ui-word-cloud-DJmJ-oYT.js +0 -1466
- package/dist/vue-ui-xy-canvas-4auyhlTr.js +0 -1717
- package/dist/vue-ui-xy-f67V1xjd.js +0 -3713
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
import { defineAsyncComponent as ge, useSlots as Ye, onMounted as pe, ref as d, computed as C, toRefs as Ge, watch as he, openBlock as r, createElementBlock as i, normalizeStyle as b, createElementVNode as f, toDisplayString as K, createBlock as Z, createCommentVNode as m, unref as g, createVNode as ye, Fragment as L, renderList as V, normalizeClass as H, renderSlot as R, normalizeProps as ee, guardReactiveProps as te, withCtx as me } from "vue";
|
|
2
|
+
import { j as be, t as ke, m as We, p as c, s as N, n as qe, o as Xe, q as _e, r as Je, l as Y, k as le, X as Qe, u as we, v as xe, T as Ze } from "./lib-DBptbyyI.js";
|
|
3
|
+
import { u as et } from "./useConfig-DO94Aj5s.js";
|
|
4
|
+
import { u as tt, B as lt } from "./BaseScanner-BhhkKVoj.js";
|
|
5
|
+
import { u as oe } from "./useNestedProp-Bf5XFbs8.js";
|
|
6
|
+
import { u as ot } from "./useThemeCheck-D1ZYXUwG.js";
|
|
7
|
+
import { u as at } from "./useChartAccessibility-9icAAmYg.js";
|
|
8
|
+
import st from "./vue_ui_sparkstackbar-BSexvOuM.js";
|
|
9
|
+
import { B as nt } from "./BaseLegendToggle-BQVIawmA.js";
|
|
10
|
+
import { A as rt } from "./A11yDataTable-KcVAX2cP.js";
|
|
11
|
+
import { _ as ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
|
+
const it = ["id"], ct = { style: { position: "relative" } }, vt = ["xmlns", "viewBox", "aria-describedby"], dt = ["id"], ft = ["stop-color"], gt = ["stop-color"], pt = ["stop-color"], ht = {
|
|
13
|
+
id: "stackPill",
|
|
14
|
+
clipPathUnits: "objectBoundingBox"
|
|
15
|
+
}, yt = ["fill"], mt = {
|
|
16
|
+
key: 0,
|
|
17
|
+
"clip-path": "url(#stackPill)"
|
|
18
|
+
}, bt = ["x", "width", "height", "fill"], kt = ["x", "width", "height", "fill", "stroke"], _t = ["x", "width", "height", "onClick", "onMouseenter", "onMouseleave"], wt = ["width", "height", "rx"], xt = {
|
|
19
|
+
key: 0,
|
|
20
|
+
style: { position: "absolute", top: "100%", left: "0", width: "100%" },
|
|
21
|
+
"data-dom-to-png-ignore": "",
|
|
22
|
+
"aria-hidden": "true"
|
|
23
|
+
}, Ct = ["aria-pressed", "aria-label", "onClick", "onFocus", "onKeydown"], $t = { style: { display: "flex", "flex-direction": "row", "align-items": "center", gap: "4px", "justify-content": "center" } }, St = ["height", "width"], At = ["id"], It = ["stop-color"], Ft = ["stop-color"], Tt = ["fill"], Pt = {
|
|
24
|
+
key: 3,
|
|
25
|
+
ref: "source",
|
|
26
|
+
dir: "auto"
|
|
27
|
+
}, Dt = {
|
|
28
|
+
__name: "vue-ui-sparkstackbar",
|
|
29
|
+
props: {
|
|
30
|
+
config: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default() {
|
|
33
|
+
return {};
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
dataset: {
|
|
37
|
+
type: Array,
|
|
38
|
+
default() {
|
|
39
|
+
return [];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
emits: ["selectDatapoint"],
|
|
44
|
+
setup(Ce, { expose: $e, emit: Se }) {
|
|
45
|
+
const Ae = ge(() => import("./PackageVersion-DPO-OOVI.js")), Ie = ge(() => import("./Tooltip-Bf-kM3_A.js")), { vue_ui_sparkstackbar: Fe } = et(), { isThemeValid: Te, warnInvalidTheme: Pe } = ot(), $ = Ce, De = Ye();
|
|
46
|
+
pe(() => {
|
|
47
|
+
De["chart-background"] && console.warn("VueUiSparkStackbar does not support the #chart-background slot.");
|
|
48
|
+
});
|
|
49
|
+
const ae = d(null), S = d(be()), A = d(!1), G = d(""), W = d(null), z = d(!1), k = d(null), se = d({ x: 0, y: 0 }), I = d("pointer"), q = d(!1), _ = d(null), Le = d([]), t = d(X()), ne = C(() => t.value.useCursorPointer), Be = C(() => ke({
|
|
50
|
+
defaultConfig: {
|
|
51
|
+
style: {
|
|
52
|
+
backgroundColor: "#99999930",
|
|
53
|
+
animation: { show: !1 },
|
|
54
|
+
bar: { gradient: { inderlayerColor: "#6A6A6A" } },
|
|
55
|
+
title: {
|
|
56
|
+
backgroundColor: "transparent"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
userConfig: t.value.skeletonConfig ?? {}
|
|
61
|
+
})), { loading: F, FINAL_DATASET: x } = tt({
|
|
62
|
+
...Ge($),
|
|
63
|
+
FINAL_CONFIG: t,
|
|
64
|
+
prepareConfig: X,
|
|
65
|
+
skeletonDataset: $.config?.skeletonDataset ?? [
|
|
66
|
+
{ name: "_", value: 8, color: "#808080" },
|
|
67
|
+
{ name: "_", value: 5, color: "#ADADAD" },
|
|
68
|
+
{ name: "_", value: 3, color: "#DBDBDB" }
|
|
69
|
+
],
|
|
70
|
+
skeletonConfig: ke({
|
|
71
|
+
defaultConfig: t.value,
|
|
72
|
+
userConfig: Be.value
|
|
73
|
+
})
|
|
74
|
+
}), { svgRef: M } = at({ config: t.value.style.title });
|
|
75
|
+
function X() {
|
|
76
|
+
const e = oe({
|
|
77
|
+
userConfig: $.config,
|
|
78
|
+
defaultConfig: Fe
|
|
79
|
+
}), l = e.theme;
|
|
80
|
+
if (!l) return e;
|
|
81
|
+
if (!Te.value(e))
|
|
82
|
+
return Pe(e), e;
|
|
83
|
+
const o = oe({
|
|
84
|
+
userConfig: st[l] || $.config,
|
|
85
|
+
defaultConfig: e
|
|
86
|
+
}), a = oe({
|
|
87
|
+
userConfig: $.config,
|
|
88
|
+
defaultConfig: o
|
|
89
|
+
});
|
|
90
|
+
return {
|
|
91
|
+
...a,
|
|
92
|
+
customPalette: a.customPalette.length ? a.customPalette : We[l] || c
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
he(() => $.config, (e) => {
|
|
96
|
+
t.value = X(), ie();
|
|
97
|
+
}, { deep: !0 }), he(() => x.value, (e) => {
|
|
98
|
+
T.value = x.value.map((l, o) => ({
|
|
99
|
+
...l,
|
|
100
|
+
color: l.color ? N(l.color) : B.value[o] || c[o] || c[o % c.length]
|
|
101
|
+
})), re();
|
|
102
|
+
}, { deep: !0 });
|
|
103
|
+
const B = C(() => qe(t.value.customPalette)), T = d(x.value.map((e, l) => ({
|
|
104
|
+
...e,
|
|
105
|
+
value: t.value.style.animation.show ? 0 : e.value || 0,
|
|
106
|
+
color: e.color ? N(e.color) : B.value[l] || c[l] || c[l % c.length]
|
|
107
|
+
}))), P = d(!0);
|
|
108
|
+
function re() {
|
|
109
|
+
if (!t.value.style.animation.show) {
|
|
110
|
+
P.value = !1;
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const e = t.value.style.animation.animationFrames, l = x.value.map((u) => u.value || 0), o = l.map((u) => u / e), a = l.reduce((u, s) => u + s, 0);
|
|
114
|
+
let n = 0;
|
|
115
|
+
P.value = !0, T.value = x.value.map((u, s) => ({
|
|
116
|
+
...u,
|
|
117
|
+
value: 0,
|
|
118
|
+
color: u.color ? N(u.color) : B.value[s] || c[s] || c[s % c.length]
|
|
119
|
+
}));
|
|
120
|
+
function w() {
|
|
121
|
+
n += a / e, n < a ? (T.value = T.value.map((u, s) => ({
|
|
122
|
+
...u,
|
|
123
|
+
value: Math.min(u.value + o[s], l[s]),
|
|
124
|
+
color: u.color ? N(u.color) : B.value[s] || c[s] || c[s % c.length]
|
|
125
|
+
})), requestAnimationFrame(w)) : (P.value = !1, T.value = x.value.map((u, s) => ({
|
|
126
|
+
...u,
|
|
127
|
+
value: l[s],
|
|
128
|
+
color: u.color ? N(u.color) : B.value[s] || c[s] || c[s % c.length],
|
|
129
|
+
id: be()
|
|
130
|
+
})));
|
|
131
|
+
}
|
|
132
|
+
w();
|
|
133
|
+
}
|
|
134
|
+
pe(() => {
|
|
135
|
+
ie();
|
|
136
|
+
});
|
|
137
|
+
const ue = C(() => t.value.debug);
|
|
138
|
+
function ie() {
|
|
139
|
+
Xe($.dataset) ? _e({
|
|
140
|
+
componentName: "VueUiSparkStackbar",
|
|
141
|
+
type: "dataset",
|
|
142
|
+
debug: ue.value
|
|
143
|
+
}) : $.dataset.forEach((e, l) => {
|
|
144
|
+
Je({
|
|
145
|
+
datasetObject: e,
|
|
146
|
+
requiredAttributes: ["name", "value"]
|
|
147
|
+
}).forEach((o) => {
|
|
148
|
+
_e({
|
|
149
|
+
componentName: "VueUiSparkStackbar",
|
|
150
|
+
type: "datasetSerieAttribute",
|
|
151
|
+
property: o,
|
|
152
|
+
index: l,
|
|
153
|
+
debug: ue.value
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
}), re();
|
|
157
|
+
}
|
|
158
|
+
const h = d({
|
|
159
|
+
width: 500,
|
|
160
|
+
height: 16
|
|
161
|
+
}), v = d([]), ce = C(() => x.value.map((e) => e.value || 0).filter((e, l) => !v.value.includes(l)).reduce((e, l) => e + l, 0)), y = C(() => T.value.map((e, l) => {
|
|
162
|
+
const o = e.value || 0, a = o / ce.value, n = isNaN(a) ? 0 : a, w = n * h.value.width;
|
|
163
|
+
return {
|
|
164
|
+
...e,
|
|
165
|
+
color: N(x.value[l]?.color ? x.value[l]?.color : B.value[l] || c[l] || c[l % c.length]),
|
|
166
|
+
value: o,
|
|
167
|
+
proportion: n,
|
|
168
|
+
width: w,
|
|
169
|
+
seriesIndex: l,
|
|
170
|
+
proportionLabel: Y({
|
|
171
|
+
v: n * 100,
|
|
172
|
+
s: "%",
|
|
173
|
+
r: t.value.style.legend.percentage.rounding
|
|
174
|
+
})
|
|
175
|
+
};
|
|
176
|
+
})), J = C(() => y.value.filter((e, l) => !v.value.includes(l)));
|
|
177
|
+
function Ee() {
|
|
178
|
+
v.value.length ? v.value = [] : y.value.forEach((e, l) => {
|
|
179
|
+
v.value.push(l);
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
function U(e) {
|
|
183
|
+
v.value.includes(e) ? v.value = v.value.filter((l) => l !== e) : v.value.length < T.value.length - 1 && v.value.push(e);
|
|
184
|
+
}
|
|
185
|
+
function ve(e) {
|
|
186
|
+
if (!y.value.length)
|
|
187
|
+
return t.value.debug && console.warn("VueUiSparkStackbar - There are no series to show."), null;
|
|
188
|
+
const l = y.value.find((o) => o.name === e);
|
|
189
|
+
return l || (t.value.debug && console.warn(`VueUiSparkStackbar - Series name not found "${e}"`), null);
|
|
190
|
+
}
|
|
191
|
+
function Ke(e) {
|
|
192
|
+
const l = ve(e);
|
|
193
|
+
l !== null && v.value.includes(l.id) && U(l.seriesIndex);
|
|
194
|
+
}
|
|
195
|
+
function Ne(e) {
|
|
196
|
+
const l = ve(e);
|
|
197
|
+
l !== null && (v.value.includes(l.id) || U(l.seriesIndex));
|
|
198
|
+
}
|
|
199
|
+
const p = C(() => {
|
|
200
|
+
let e = 0;
|
|
201
|
+
const l = [];
|
|
202
|
+
for (let o = 0; o < J.value.length; o += 1)
|
|
203
|
+
l.push({
|
|
204
|
+
...J.value[o],
|
|
205
|
+
start: e
|
|
206
|
+
}), e += J.value[o].width;
|
|
207
|
+
return l;
|
|
208
|
+
}), ze = Se;
|
|
209
|
+
function O(e, l, o = !1) {
|
|
210
|
+
ze("selectDatapoint", { datapoint: e, index: l }), t.value.events.datapointClick && !o && t.value.events.datapointClick({ datapoint: e, seriesIndex: e.seriesIndex });
|
|
211
|
+
}
|
|
212
|
+
function Me({ datapoint: e, seriesIndex: l }) {
|
|
213
|
+
A.value = !1, _.value = null, k.value = null, I.value = "pointer", t.value.events.datapointLeave && t.value.events.datapointLeave({ datapoint: e, seriesIndex: e.seriesIndex });
|
|
214
|
+
}
|
|
215
|
+
function de({ datapoint: e, seriesIndex: l, triggerMode: o = "pointer" }) {
|
|
216
|
+
if (z.value = !1, t.value.events.datapointEnter && t.value.events.datapointEnter({ datapoint: e, seriesIndex: e.seriesIndex }), !t.value.style.tooltip.show)
|
|
217
|
+
return;
|
|
218
|
+
I.value = o, W.value = { datapoint: e, seriesIndex: l, config: t.value, series: y.value }, A.value = !0, _.value = l;
|
|
219
|
+
const a = t.value.style.tooltip.customFormat;
|
|
220
|
+
if (Ze(a))
|
|
221
|
+
try {
|
|
222
|
+
const n = a({
|
|
223
|
+
seriesIndex: e.seriesIndex,
|
|
224
|
+
datapoint: e,
|
|
225
|
+
series: y.value,
|
|
226
|
+
config: t.value
|
|
227
|
+
});
|
|
228
|
+
typeof n == "string" && (G.value = n, z.value = !0);
|
|
229
|
+
} catch {
|
|
230
|
+
console.warn("Custom format cannot be applied."), z.value = !1;
|
|
231
|
+
}
|
|
232
|
+
if (!z.value) {
|
|
233
|
+
let n = "";
|
|
234
|
+
n += `<div style="width:100%;text-align:center;border-bottom:1px solid ${t.value.style.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`, n += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${e.color}"/></svg>`, n += `<b>${e.proportionLabel}</b>`, n += `<span>(${le(
|
|
235
|
+
t.value.style.legend.value.formatter,
|
|
236
|
+
e.value,
|
|
237
|
+
Y({
|
|
238
|
+
p: t.value.style.legend.value.prefix,
|
|
239
|
+
v: e.value,
|
|
240
|
+
s: t.value.style.legend.value.suffix,
|
|
241
|
+
r: t.value.style.legend.value.rounding
|
|
242
|
+
}),
|
|
243
|
+
{
|
|
244
|
+
datapoint: e,
|
|
245
|
+
seriesIndex: l
|
|
246
|
+
}
|
|
247
|
+
)})</span>`, G.value = `<div>${n}</div>`;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function j(e) {
|
|
251
|
+
const l = Le.value[e];
|
|
252
|
+
l && typeof l.focus == "function" && l.focus();
|
|
253
|
+
}
|
|
254
|
+
function Ve(e) {
|
|
255
|
+
if (!Number.isFinite(e) || !M.value) return;
|
|
256
|
+
const l = p.value[e];
|
|
257
|
+
if (!l) return;
|
|
258
|
+
const o = M.value.getBoundingClientRect(), a = l.start + l.width / 2, n = h.value.height / 2;
|
|
259
|
+
se.value = {
|
|
260
|
+
x: o.left + a / h.value.width * o.width,
|
|
261
|
+
y: o.top + n / h.value.height * o.height
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
function Re() {
|
|
265
|
+
k.value = null, q.value = !0;
|
|
266
|
+
}
|
|
267
|
+
function Ue() {
|
|
268
|
+
k.value = null, I.value = "pointer", A.value = !1, _.value = null, q.value = !1;
|
|
269
|
+
}
|
|
270
|
+
function Oe(e) {
|
|
271
|
+
if (!M.value || document.activeElement !== M.value || !p.value.length) return;
|
|
272
|
+
const l = e.key === "ArrowLeft", o = e.key === "ArrowRight", a = e.key === "Enter" || e.key === " ", n = e.key === "Escape", w = e.key === "Home", u = e.key === "End";
|
|
273
|
+
if (!l && !o && !a && !n && !w && !u)
|
|
274
|
+
return;
|
|
275
|
+
if (e.preventDefault(), e.stopPropagation(), n) {
|
|
276
|
+
k.value = null, I.value = "pointer", A.value = !1, _.value = null;
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
if (a) {
|
|
280
|
+
if (k.value === null) return;
|
|
281
|
+
const D = p.value[k.value];
|
|
282
|
+
if (!D) return;
|
|
283
|
+
O(D, D.seriesIndex);
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
let s = k.value;
|
|
287
|
+
w ? s = 0 : u ? s = p.value.length - 1 : s === null || s < 0 || s >= p.value.length ? s = o ? 0 : p.value.length - 1 : o ? (s += 1, s >= p.value.length && (s = 0)) : l && (s -= 1, s < 0 && (s = p.value.length - 1));
|
|
288
|
+
const E = p.value[s];
|
|
289
|
+
E && (k.value = s, Ve(s), de({
|
|
290
|
+
datapoint: E,
|
|
291
|
+
seriesIndex: E.seriesIndex,
|
|
292
|
+
triggerMode: "keyboard"
|
|
293
|
+
}));
|
|
294
|
+
}
|
|
295
|
+
function je(e) {
|
|
296
|
+
A.value = !1, k.value = null, I.value = "pointer", _.value = e.seriesIndex;
|
|
297
|
+
}
|
|
298
|
+
function fe() {
|
|
299
|
+
k.value = null, I.value = "pointer", A.value = !1, _.value = null;
|
|
300
|
+
}
|
|
301
|
+
function He(e, l, o) {
|
|
302
|
+
const a = e.key === "Enter" || e.key === " ", n = e.key === "ArrowLeft" || e.key === "ArrowUp", w = e.key === "ArrowRight" || e.key === "ArrowDown", u = e.key === "Home", s = e.key === "End", E = e.key === "Escape";
|
|
303
|
+
if (!(!a && !n && !w && !u && !s && !E)) {
|
|
304
|
+
if (e.preventDefault(), e.stopPropagation(), E) {
|
|
305
|
+
fe();
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
if (a) {
|
|
309
|
+
U(o), O(l, o, !0);
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
if (u) {
|
|
313
|
+
j(0);
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
if (s) {
|
|
317
|
+
j(y.value.length - 1);
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
if (n) {
|
|
321
|
+
const D = o <= 0 ? y.value.length - 1 : o - 1;
|
|
322
|
+
j(D);
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
if (w) {
|
|
326
|
+
const D = o >= y.value.length - 1 ? 0 : o + 1;
|
|
327
|
+
j(D);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
const Q = C(() => ({
|
|
332
|
+
headers: [
|
|
333
|
+
t.value.a11y.translations.series,
|
|
334
|
+
t.value.a11y.translations.percentage,
|
|
335
|
+
t.value.a11y.translations.value
|
|
336
|
+
],
|
|
337
|
+
rows: y.value.map((e, l) => [
|
|
338
|
+
e.name,
|
|
339
|
+
v.value.includes(l) ? " - " : e.proportionLabel,
|
|
340
|
+
le(
|
|
341
|
+
t.value.style.legend.value.formatter,
|
|
342
|
+
e.value,
|
|
343
|
+
Y({
|
|
344
|
+
p: t.value.style.legend.value.prefix,
|
|
345
|
+
v: e.value,
|
|
346
|
+
s: t.value.style.legend.value.suffix,
|
|
347
|
+
r: t.value.style.legend.value.rounding
|
|
348
|
+
}),
|
|
349
|
+
{
|
|
350
|
+
datapoint: e,
|
|
351
|
+
seriesIndex: l
|
|
352
|
+
}
|
|
353
|
+
)
|
|
354
|
+
])
|
|
355
|
+
}));
|
|
356
|
+
return $e({
|
|
357
|
+
hideSeries: Ne,
|
|
358
|
+
showSeries: Ke
|
|
359
|
+
}), (e, l) => (r(), i("div", {
|
|
360
|
+
class: "vue-data-ui-component vue-ui-spark-stackbar",
|
|
361
|
+
ref_key: "sparkstackbarChart",
|
|
362
|
+
ref: ae,
|
|
363
|
+
style: b(`width:100%; background:${t.value.style.backgroundColor}`)
|
|
364
|
+
}, [
|
|
365
|
+
f("div", {
|
|
366
|
+
id: `chart-instructions-${S.value}`,
|
|
367
|
+
class: "sr-only"
|
|
368
|
+
}, [
|
|
369
|
+
f("p", null, K(t.value.a11y.translations.keyboardNavigation), 1)
|
|
370
|
+
], 8, it),
|
|
371
|
+
Q.value?.rows?.length ? (r(), Z(rt, {
|
|
372
|
+
key: 0,
|
|
373
|
+
uid: S.value,
|
|
374
|
+
head: Q.value.headers,
|
|
375
|
+
body: Q.value.rows,
|
|
376
|
+
notice: t.value.a11y.translations.tableAvailable,
|
|
377
|
+
caption: t.value.a11y.translations.tableCaption
|
|
378
|
+
}, null, 8, ["uid", "head", "body", "notice", "caption"])) : m("", !0),
|
|
379
|
+
t.value.style.title.text ? (r(), i("div", {
|
|
380
|
+
key: 1,
|
|
381
|
+
style: b(`width:calc(100% - 12px);background:transparent;margin:0 auto;margin:${t.value.style.title.margin};padding: 0 6px;text-align:${t.value.style.title.textAlign}`)
|
|
382
|
+
}, [
|
|
383
|
+
f("div", {
|
|
384
|
+
class: "atom-title",
|
|
385
|
+
style: b(`font-size:${t.value.style.title.fontSize}px;color:${t.value.style.title.color};font-weight:${t.value.style.title.bold ? "bold" : "normal"}`)
|
|
386
|
+
}, K(t.value.style.title.text), 5),
|
|
387
|
+
t.value.style.title.subtitle.text ? (r(), i("div", {
|
|
388
|
+
key: 0,
|
|
389
|
+
class: "atom-subtitle",
|
|
390
|
+
style: b(`font-size:${t.value.style.title.subtitle.fontSize}px;color:${t.value.style.title.subtitle.color};font-weight:${t.value.style.title.subtitle.bold ? "bold" : "normal"}`)
|
|
391
|
+
}, K(t.value.style.title.subtitle.text), 5)) : m("", !0)
|
|
392
|
+
], 4)) : m("", !0),
|
|
393
|
+
f("div", ct, [
|
|
394
|
+
(r(), i("svg", {
|
|
395
|
+
ref_key: "svgRef",
|
|
396
|
+
ref: M,
|
|
397
|
+
xmlns: g(Qe),
|
|
398
|
+
width: "100%",
|
|
399
|
+
viewBox: `0 0 ${h.value.width} ${h.value.height}`,
|
|
400
|
+
"aria-describedby": `chart-instructions-${S.value}`,
|
|
401
|
+
tabindex: "0",
|
|
402
|
+
onFocus: Re,
|
|
403
|
+
onBlur: Ue,
|
|
404
|
+
onKeydown: Oe
|
|
405
|
+
}, [
|
|
406
|
+
ye(g(Ae)),
|
|
407
|
+
f("defs", null, [
|
|
408
|
+
(r(!0), i(L, null, V(p.value, (o, a) => (r(), i("linearGradient", {
|
|
409
|
+
key: `stack_gradient_${a}`,
|
|
410
|
+
gradientTransform: "rotate(90)",
|
|
411
|
+
id: `stack_gradient_${a}_${S.value}`
|
|
412
|
+
}, [
|
|
413
|
+
f("stop", {
|
|
414
|
+
offset: "0%",
|
|
415
|
+
"stop-color": o.color
|
|
416
|
+
}, null, 8, ft),
|
|
417
|
+
f("stop", {
|
|
418
|
+
offset: "50%",
|
|
419
|
+
"stop-color": g(we)(g(xe)(o.color, 0.05), 100 - t.value.style.bar.gradient.intensity)
|
|
420
|
+
}, null, 8, gt),
|
|
421
|
+
f("stop", {
|
|
422
|
+
offset: "100%",
|
|
423
|
+
"stop-color": o.color
|
|
424
|
+
}, null, 8, pt)
|
|
425
|
+
], 8, dt))), 128)),
|
|
426
|
+
f("clipPath", ht, [
|
|
427
|
+
f("rect", {
|
|
428
|
+
x: "0.005",
|
|
429
|
+
y: "-2",
|
|
430
|
+
width: "0.99",
|
|
431
|
+
height: "5",
|
|
432
|
+
rx: "3",
|
|
433
|
+
ry: "3",
|
|
434
|
+
fill: t.value.style.backgroundColor
|
|
435
|
+
}, null, 8, yt)
|
|
436
|
+
])
|
|
437
|
+
]),
|
|
438
|
+
ce.value > 0 ? (r(), i("g", mt, [
|
|
439
|
+
(r(!0), i(L, null, V(p.value, (o, a) => (r(), i("rect", {
|
|
440
|
+
key: `stack_underlayer_${a}`,
|
|
441
|
+
x: o.start,
|
|
442
|
+
y: 0,
|
|
443
|
+
width: o.width,
|
|
444
|
+
height: h.value.height,
|
|
445
|
+
fill: t.value.style.bar.gradient.underlayerColor,
|
|
446
|
+
class: H({ animated: !P.value && !g(F) }),
|
|
447
|
+
style: b({
|
|
448
|
+
opacity: _.value !== null && t.value.style.tooltip.show ? _.value === a ? 1 : 0.5 : 1
|
|
449
|
+
})
|
|
450
|
+
}, null, 14, bt))), 128)),
|
|
451
|
+
(r(!0), i(L, null, V(p.value, (o, a) => (r(), i("rect", {
|
|
452
|
+
key: `stack_${a}`,
|
|
453
|
+
x: o.start,
|
|
454
|
+
y: 0,
|
|
455
|
+
width: o.width,
|
|
456
|
+
height: h.value.height,
|
|
457
|
+
fill: t.value.style.bar.gradient.show ? `url(#stack_gradient_${a}_${S.value})` : o.color,
|
|
458
|
+
stroke: t.value.style.backgroundColor,
|
|
459
|
+
"stroke-linecap": "round",
|
|
460
|
+
class: H({ animated: !P.value && !g(F) }),
|
|
461
|
+
style: b({
|
|
462
|
+
opacity: _.value !== null && t.value.style.tooltip.show ? _.value === a ? 1 : 0.5 : 1
|
|
463
|
+
})
|
|
464
|
+
}, null, 14, kt))), 128)),
|
|
465
|
+
(r(!0), i(L, null, V(p.value, (o, a) => (r(), i("rect", {
|
|
466
|
+
key: `stack_trap_${a}`,
|
|
467
|
+
x: o.start,
|
|
468
|
+
y: 0,
|
|
469
|
+
width: o.width,
|
|
470
|
+
height: h.value.height,
|
|
471
|
+
fill: "transparent",
|
|
472
|
+
stroke: "none",
|
|
473
|
+
class: H({ animated: !P.value && !g(F) }),
|
|
474
|
+
onClick: () => O(o, a),
|
|
475
|
+
onMouseenter: () => de({ datapoint: o, seriesIndex: a }),
|
|
476
|
+
onMouseleave: (n) => Me({ datapoint: o, seriesIndex: a })
|
|
477
|
+
}, null, 42, _t))), 128))
|
|
478
|
+
])) : (r(), i("rect", {
|
|
479
|
+
key: 1,
|
|
480
|
+
x: 2,
|
|
481
|
+
y: 1,
|
|
482
|
+
width: h.value.width - 4,
|
|
483
|
+
height: h.value.height - 2,
|
|
484
|
+
stroke: "#CCCCCC",
|
|
485
|
+
"stroke-width": "2",
|
|
486
|
+
fill: "transparent",
|
|
487
|
+
rx: (h.value.height - 4) / 2
|
|
488
|
+
}, null, 8, wt))
|
|
489
|
+
], 40, vt)),
|
|
490
|
+
e.$slots.hint ? (r(), i("div", xt, [
|
|
491
|
+
R(e.$slots, "hint", ee(te({ hint: t.value.a11y.translations.keyboardNavigation, isVisible: q.value })), void 0, !0)
|
|
492
|
+
])) : m("", !0)
|
|
493
|
+
]),
|
|
494
|
+
t.value.style.legend.show ? (r(), i("div", {
|
|
495
|
+
key: 2,
|
|
496
|
+
style: b(`background:transparent;margin:0 auto;margin:${t.value.style.legend.margin};justify-content:${t.value.style.legend.textAlign === "left" ? "flex-start" : t.value.style.legend.textAlign === "right" ? "flex-end" : "center"}`),
|
|
497
|
+
class: "vue-ui-sparkstackbar-legend",
|
|
498
|
+
"aria-label": "legend",
|
|
499
|
+
role: "toolbar"
|
|
500
|
+
}, [
|
|
501
|
+
t.value.style.legend.selectAllToggle.show && y.value.length > 2 && !g(F) ? (r(), Z(nt, {
|
|
502
|
+
key: 0,
|
|
503
|
+
backgroundColor: t.value.style.legend.selectAllToggle.backgroundColor,
|
|
504
|
+
color: t.value.style.legend.selectAllToggle.color,
|
|
505
|
+
fontSize: t.value.style.legend.fontSize,
|
|
506
|
+
checked: v.value.length > 0,
|
|
507
|
+
isCursorPointer: ne.value,
|
|
508
|
+
onToggle: Ee
|
|
509
|
+
}, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : m("", !0),
|
|
510
|
+
(r(!0), i(L, null, V(y.value, (o, a) => (r(), i("div", {
|
|
511
|
+
role: "button",
|
|
512
|
+
tabindex: "0",
|
|
513
|
+
"aria-pressed": v.value.includes(a),
|
|
514
|
+
"aria-label": `${o.name}, ${v.value.includes(a) ? "hidden" : "visible"}, ${o.proportionLabel}`,
|
|
515
|
+
style: b(`font-size:${t.value.style.legend.fontSize}px;cursor:${ne.value ? "pointer" : "default"}`),
|
|
516
|
+
class: H({ "vue-ui-sparkstackbar-legend-item": !0, "vue-ui-sparkstackbar-legend-item-unselected": v.value.includes(a) }),
|
|
517
|
+
onClick: (n) => {
|
|
518
|
+
U(a), O(o, a, !0);
|
|
519
|
+
},
|
|
520
|
+
onFocus: (n) => je(o),
|
|
521
|
+
onBlur: fe,
|
|
522
|
+
onKeydown: (n) => He(n, o, a)
|
|
523
|
+
}, [
|
|
524
|
+
f("div", $t, [
|
|
525
|
+
(r(), i("svg", {
|
|
526
|
+
height: `${t.value.style.legend.fontSize}px`,
|
|
527
|
+
width: `${t.value.style.legend.fontSize}px`,
|
|
528
|
+
viewBox: "0 0 10 10"
|
|
529
|
+
}, [
|
|
530
|
+
f("defs", null, [
|
|
531
|
+
f("radialGradient", {
|
|
532
|
+
id: `legend_grad_${a}-${S.value}`
|
|
533
|
+
}, [
|
|
534
|
+
f("stop", {
|
|
535
|
+
offset: "0%",
|
|
536
|
+
"stop-color": g(F) ? "#FFFFFF" : g(we)(g(xe)(o.color, 0.05), 100 - t.value.style.bar.gradient.intensity)
|
|
537
|
+
}, null, 8, It),
|
|
538
|
+
f("stop", {
|
|
539
|
+
offset: "100%",
|
|
540
|
+
"stop-color": o.color
|
|
541
|
+
}, null, 8, Ft)
|
|
542
|
+
], 8, At)
|
|
543
|
+
]),
|
|
544
|
+
f("circle", {
|
|
545
|
+
cx: 5,
|
|
546
|
+
cy: 5,
|
|
547
|
+
r: 5,
|
|
548
|
+
fill: t.value.style.bar.gradient.show ? `url(#legend_grad_${a}-${S.value})` : o.color
|
|
549
|
+
}, null, 8, Tt)
|
|
550
|
+
], 8, St)),
|
|
551
|
+
g(F) ? m("", !0) : (r(), i(L, { key: 0 }, [
|
|
552
|
+
f("span", {
|
|
553
|
+
style: b(`color:${t.value.style.legend.name.color}; font-weight:${t.value.style.legend.name.bold ? "bold" : "normal"}`)
|
|
554
|
+
}, K(o.name), 5),
|
|
555
|
+
P.value ? m("", !0) : (r(), i(L, { key: 0 }, [
|
|
556
|
+
t.value.style.legend.percentage.show ? (r(), i("span", {
|
|
557
|
+
key: 0,
|
|
558
|
+
style: b(`font-weight:${t.value.style.legend.percentage.bold ? "bold" : "normal"};color:${t.value.style.legend.percentage.color}`)
|
|
559
|
+
}, K(v.value.includes(a) ? " - " : o.proportionLabel), 5)) : m("", !0),
|
|
560
|
+
t.value.style.legend.value.show ? (r(), i("span", {
|
|
561
|
+
key: 1,
|
|
562
|
+
style: b(`font-weight:${t.value.style.legend.value.bold ? "bold" : "normal"};color:${t.value.style.legend.value.color}`)
|
|
563
|
+
}, " (" + K(g(le)(
|
|
564
|
+
t.value.style.legend.value.formatter,
|
|
565
|
+
o.value,
|
|
566
|
+
g(Y)({
|
|
567
|
+
p: t.value.style.legend.value.prefix,
|
|
568
|
+
v: o.value,
|
|
569
|
+
s: t.value.style.legend.value.suffix,
|
|
570
|
+
r: t.value.style.legend.value.rounding
|
|
571
|
+
}),
|
|
572
|
+
{ datapoint: o, seriesIndex: a }
|
|
573
|
+
)) + ") ", 5)) : m("", !0)
|
|
574
|
+
], 64))
|
|
575
|
+
], 64))
|
|
576
|
+
])
|
|
577
|
+
], 46, Ct))), 256))
|
|
578
|
+
], 4)) : m("", !0),
|
|
579
|
+
ye(g(Ie), {
|
|
580
|
+
teleportTo: t.value.style.tooltip.teleportTo,
|
|
581
|
+
show: A.value && t.value.style.tooltip.show,
|
|
582
|
+
parent: ae.value,
|
|
583
|
+
backgroundColor: t.value.style.tooltip.backgroundColor,
|
|
584
|
+
color: t.value.style.tooltip.color,
|
|
585
|
+
fontSize: t.value.style.tooltip.fontSize,
|
|
586
|
+
borderRadius: t.value.style.tooltip.borderRadius,
|
|
587
|
+
borderColor: t.value.style.tooltip.borderColor,
|
|
588
|
+
borderWidth: t.value.style.tooltip.borderWidth,
|
|
589
|
+
backgroundOpacity: t.value.style.tooltip.backgroundOpacity,
|
|
590
|
+
position: t.value.style.tooltip.position,
|
|
591
|
+
content: G.value,
|
|
592
|
+
isCustom: z.value,
|
|
593
|
+
offsetY: -124 + t.value.style.tooltip.offsetY,
|
|
594
|
+
blockShiftY: !0,
|
|
595
|
+
smooth: t.value.style.tooltip.smooth,
|
|
596
|
+
backdropFilter: t.value.style.tooltip.backdropFilter,
|
|
597
|
+
smoothForce: t.value.style.tooltip.smoothForce,
|
|
598
|
+
smoothSnapThreshold: t.value.style.tooltip.smoothSnapThreshold,
|
|
599
|
+
isA11yMode: I.value === "keyboard",
|
|
600
|
+
a11yPosition: se.value
|
|
601
|
+
}, {
|
|
602
|
+
"tooltip-before": me(() => [
|
|
603
|
+
R(e.$slots, "tooltip-before", ee(te({ ...W.value })), void 0, !0)
|
|
604
|
+
]),
|
|
605
|
+
"tooltip-after": me(() => [
|
|
606
|
+
R(e.$slots, "tooltip-after", ee(te({ ...W.value })), void 0, !0)
|
|
607
|
+
]),
|
|
608
|
+
_: 3
|
|
609
|
+
}, 8, ["teleportTo", "show", "parent", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "content", "isCustom", "offsetY", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold", "isA11yMode", "a11yPosition"]),
|
|
610
|
+
e.$slots.source ? (r(), i("div", Pt, [
|
|
611
|
+
R(e.$slots, "source", {}, void 0, !0)
|
|
612
|
+
], 512)) : m("", !0),
|
|
613
|
+
R(e.$slots, "skeleton", {}, () => [
|
|
614
|
+
g(F) ? (r(), Z(lt, { key: 0 })) : m("", !0)
|
|
615
|
+
], !0)
|
|
616
|
+
], 4));
|
|
617
|
+
}
|
|
618
|
+
}, jt = /* @__PURE__ */ ut(Dt, [["__scopeId", "data-v-29f119a6"]]);
|
|
619
|
+
export {
|
|
620
|
+
jt as default
|
|
621
|
+
};
|