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,1156 @@
|
|
|
1
|
+
import { defineAsyncComponent as R, useSlots as Qt, ref as r, computed as d, toRefs as el, watch as ue, shallowRef as rt, onMounted as tl, onBeforeUnmount as ll, openBlock as i, createElementBlock as y, unref as u, normalizeStyle as z, normalizeClass as B, createElementVNode as m, toDisplayString as re, createBlock as P, createCommentVNode as k, withCtx as v, renderSlot as c, normalizeProps as L, guardReactiveProps as x, createSlots as Ae, createVNode as ie, Fragment as ve, renderList as Se, mergeProps as it, Teleport as al, resolveDynamicComponent as ol, createTextVNode as vt, nextTick as ct } from "vue";
|
|
2
|
+
import { j as dt, t as ht, m as sl, p as X, o as gt, q as Pe, r as nl, n as ul, a8 as rl, s as pt, k as _e, l as M, X as il, u as vl, v as cl, Z as dl, a0 as hl, a1 as gl, K as pl, T as fl, U as yl } from "./lib-DBptbyyI.js";
|
|
3
|
+
import { b as bl } from "./labelUtils-CqTHa20R.js";
|
|
4
|
+
import { t as ml, u as kl } from "./useResponsive-DfdjqQps.js";
|
|
5
|
+
import { u as Cl } from "./useConfig-DO94Aj5s.js";
|
|
6
|
+
import { u as wl } from "./usePrinter-CEpYU3r5.js";
|
|
7
|
+
import { u as $l, B as Tl } from "./BaseScanner-BhhkKVoj.js";
|
|
8
|
+
import { u as Ll } from "./useSvgExport-ByUukOZt.js";
|
|
9
|
+
import { u as Oe } from "./useNestedProp-Bf5XFbs8.js";
|
|
10
|
+
import { u as xl } from "./useThemeCheck-D1ZYXUwG.js";
|
|
11
|
+
import { u as Al } from "./useUserOptionState-BIvW1Kz7.js";
|
|
12
|
+
import { u as Sl } from "./useChartAccessibility-9icAAmYg.js";
|
|
13
|
+
import Pl from "./img-LXxMLmCg.js";
|
|
14
|
+
import { _ as _l } from "./Shape-BKRUOeKk.js";
|
|
15
|
+
import Ol from "./Title-BeMKE1cj.js";
|
|
16
|
+
import Fl from "./vue_ui_rings-CxOrekqA.js";
|
|
17
|
+
import Il from "./Legend-CS7Xo5LK.js";
|
|
18
|
+
import { A as Dl } from "./A11yDataTable-KcVAX2cP.js";
|
|
19
|
+
import { B as Nl } from "./BaseLegendToggle-BQVIawmA.js";
|
|
20
|
+
import { _ as Rl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
21
|
+
const zl = ["id"], Bl = ["id"], Ml = ["id"], Vl = { style: { position: "relative" } }, El = ["xmlns", "viewBox", "aria-describedby"], Ul = ["width", "height"], Wl = ["id"], Hl = ["stop-color"], Xl = ["stop-color"], Gl = { key: 1 }, Kl = ["stroke", "cx", "cy", "r", "fill"], jl = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], Yl = ["stroke", "stroke-width", "cx", "cy", "r", "fill"], ql = ["cx", "cy", "r", "onMouseenter", "onMouseleave", "onClick"], Zl = ["x", "y", "width", "height", "fill", "rx"], Jl = ["cx", "cy", "r", "fill", "stroke"], Ql = ["x", "y", "text-anchor", "font-size", "fill", "font-weight", "onMouseenter", "onMouseleave", "onClick", "innerHTML"], ea = {
|
|
22
|
+
key: 0,
|
|
23
|
+
style: { position: "absolute", top: "100%", left: "0", width: "100%" },
|
|
24
|
+
"data-dom-to-png-ignore": "",
|
|
25
|
+
"aria-hidden": "true"
|
|
26
|
+
}, ta = {
|
|
27
|
+
key: 5,
|
|
28
|
+
class: "vue-data-ui-watermark"
|
|
29
|
+
}, la = ["id"], aa = ["onClick"], oa = ["innerHTML"], sa = {
|
|
30
|
+
__name: "vue-ui-rings",
|
|
31
|
+
props: {
|
|
32
|
+
config: {
|
|
33
|
+
type: Object,
|
|
34
|
+
default() {
|
|
35
|
+
return {};
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
dataset: {
|
|
39
|
+
type: Array,
|
|
40
|
+
default() {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
emits: ["selectLegend", "copyAlt"],
|
|
46
|
+
setup(ft, { expose: yt, emit: bt }) {
|
|
47
|
+
const mt = R(() => import("./Tooltip-Bf-kM3_A.js")), kt = R(() => import("./BaseIcon-Cb3zzG6s.js")), Ct = R(() => import("./vue-ui-accordion-nvggWcGN.js")), wt = R(() => import("./DataTable-DT2kIdQ6.js")), $t = R(() => import("./PenAndPaper-Ct3qJ4lA.js")), Tt = R(() => import("./UserOptions-rW2fRf3V.js")), Lt = R(() => import("./PackageVersion-DPO-OOVI.js")), xt = R(() => import("./BaseDraggableDialog-CIb-iD9g.js")), { vue_ui_rings: At } = Cl(), { isThemeValid: St, warnInvalidTheme: Pt } = xl(), _t = Qt(), w = ft, T = r(!1), Fe = d(() => !!w.dataset && w.dataset.length), C = r(dt()), G = r(!1), ce = r(""), b = r(null), Ie = r(0), _ = r(null), De = r(null), Ne = r(null), Re = r(null), ze = r(null), Be = r(0), Me = r(0), Ve = r(0), de = r(!1), Ee = r(!1), q = r(null), he = r(null), oe = r(!1), se = r(!1), O = r(null), Ue = r({ x: 0, y: 0 }), Z = r("pointer"), ge = r(!1), e = r(fe()), V = d(() => e.value.userOptions.useCursorPointer), Ot = d(() => ht({
|
|
48
|
+
defaultConfig: {
|
|
49
|
+
userOptions: { show: !1 },
|
|
50
|
+
table: { show: !1 },
|
|
51
|
+
style: {
|
|
52
|
+
chart: {
|
|
53
|
+
backgroundColor: "#99999930",
|
|
54
|
+
layout: {
|
|
55
|
+
rings: {
|
|
56
|
+
stroke: "#6A6A6A",
|
|
57
|
+
gradient: {
|
|
58
|
+
underlayerColor: "#FFFFFF"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
labels: {
|
|
62
|
+
dataLabels: {
|
|
63
|
+
show: !1
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
legend: {
|
|
68
|
+
backgroundColor: "transparent"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
userConfig: e.value.skeletonConfig ?? {}
|
|
74
|
+
})), { loading: A, FINAL_DATASET: We, manualLoading: ne } = $l({
|
|
75
|
+
...el(w),
|
|
76
|
+
FINAL_CONFIG: e,
|
|
77
|
+
prepareConfig: fe,
|
|
78
|
+
skeletonDataset: w.config?.skeletonDataset ?? [
|
|
79
|
+
{ name: "_", values: [13], color: "#808080" },
|
|
80
|
+
{ name: "_", values: [8], color: "#969696" },
|
|
81
|
+
{ name: "_", values: [5], color: "#ADADAD" },
|
|
82
|
+
{ name: "_", values: [3], color: "#C4C4C4" },
|
|
83
|
+
{ name: "_", values: [2], color: "#DBDBDB" }
|
|
84
|
+
],
|
|
85
|
+
skeletonConfig: ht({
|
|
86
|
+
defaultConfig: e.value,
|
|
87
|
+
userConfig: Ot.value
|
|
88
|
+
})
|
|
89
|
+
}), { userOptionsVisible: pe, setUserOptionsVisibility: He, keepUserOptionState: Xe } = Al({ config: e.value }), { svgRef: E } = Sl({ config: e.value.style.chart.title });
|
|
90
|
+
function fe() {
|
|
91
|
+
const t = Oe({
|
|
92
|
+
userConfig: w.config,
|
|
93
|
+
defaultConfig: At
|
|
94
|
+
}), a = t.theme;
|
|
95
|
+
if (!a) return t;
|
|
96
|
+
if (!St.value(t))
|
|
97
|
+
return Pt(t), t;
|
|
98
|
+
const l = Oe({
|
|
99
|
+
userConfig: Fl[a] || w.config,
|
|
100
|
+
defaultConfig: t
|
|
101
|
+
});
|
|
102
|
+
return {
|
|
103
|
+
...Oe({
|
|
104
|
+
userConfig: w.config,
|
|
105
|
+
defaultConfig: l
|
|
106
|
+
}),
|
|
107
|
+
customPalette: t.customPalette.length ? t.customPalette : sl[t.theme] || X
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
ue(() => w.config, (t) => {
|
|
111
|
+
A.value || (e.value = fe()), pe.value = !e.value.userOptions.showOnChartHover, Ke(), Be.value += 1, Me.value += 1, Ve.value += 1, f.value.showTable = e.value.table.show, f.value.showTooltip = e.value.style.chart.tooltip.show, f.value.showLabels = e.value.style.chart.layout.labels.dataLabels.show, h.value.width = e.value.style.chart.size, h.value.height = e.value.style.chart.size;
|
|
112
|
+
}, { deep: !0 });
|
|
113
|
+
const Ge = d(() => {
|
|
114
|
+
const { markers: t } = e.value.style.chart.layout.labels.dataLabels, a = W.value / 2, l = f.value.showLabels ? t.position === "left" ? a : -a : 0, o = f.value.showLabels ? h.value.width / 2 - a : 0, n = t.position === "left" ? o : -o;
|
|
115
|
+
return {
|
|
116
|
+
x: e.value.responsive ? n : l / e.value.style.chart.size * h.value.width,
|
|
117
|
+
y: 0 / e.value.style.chart.size * h.value.height
|
|
118
|
+
};
|
|
119
|
+
}), F = d(() => ({
|
|
120
|
+
x: h.value.width / 2 + Ge.value.x,
|
|
121
|
+
y: h.value.height / 2 + Ge.value.y
|
|
122
|
+
}));
|
|
123
|
+
ue(() => w.dataset, (t) => {
|
|
124
|
+
Array.isArray(t) && t.length > 0 && (ne.value = !1);
|
|
125
|
+
}, { deep: !0 });
|
|
126
|
+
const D = rt(null), K = rt(null);
|
|
127
|
+
tl(() => {
|
|
128
|
+
Ee.value = !0, Ke();
|
|
129
|
+
});
|
|
130
|
+
const ye = d(() => !!e.value.debug);
|
|
131
|
+
function Ke() {
|
|
132
|
+
if (gt(w.dataset) ? (Pe({
|
|
133
|
+
componentName: "VueUiRings",
|
|
134
|
+
type: "dataset",
|
|
135
|
+
debug: ye.value
|
|
136
|
+
}), ne.value = !0) : w.dataset.forEach((t, a) => {
|
|
137
|
+
t.values.length || (Pe({
|
|
138
|
+
componentName: "VueUiRings",
|
|
139
|
+
type: "dataset",
|
|
140
|
+
debug: ye.value
|
|
141
|
+
}), ne.value = !0), nl({
|
|
142
|
+
datasetObject: t,
|
|
143
|
+
requiredAttributes: ["name", "values"]
|
|
144
|
+
}).forEach((l) => {
|
|
145
|
+
Pe({
|
|
146
|
+
componentName: "VueUiRings",
|
|
147
|
+
type: "datasetSerieAttribute",
|
|
148
|
+
property: l,
|
|
149
|
+
index: a,
|
|
150
|
+
debug: ye.value
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
}), gt(w.dataset) || (ne.value = e.value.loading), e.value.responsive) {
|
|
154
|
+
const t = ml(() => {
|
|
155
|
+
de.value = !0;
|
|
156
|
+
const { width: a, height: l } = kl({
|
|
157
|
+
chart: _.value,
|
|
158
|
+
title: e.value.style.chart.title.text ? De.value : null,
|
|
159
|
+
legend: e.value.style.chart.legend.show ? Ne.value : null,
|
|
160
|
+
source: Re.value,
|
|
161
|
+
noTitle: ze.value
|
|
162
|
+
});
|
|
163
|
+
requestAnimationFrame(() => {
|
|
164
|
+
h.value.width = a, h.value.height = l - 12, de.value = !1;
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
D.value && (K.value && D.value.unobserve(K.value), D.value.disconnect()), D.value = new ResizeObserver(t), K.value = _.value.parentNode, D.value.observe(K.value);
|
|
168
|
+
}
|
|
169
|
+
setTimeout(() => {
|
|
170
|
+
T.value = !0;
|
|
171
|
+
}, 600);
|
|
172
|
+
}
|
|
173
|
+
ll(() => {
|
|
174
|
+
D.value && (K.value && D.value.unobserve(K.value), D.value.disconnect());
|
|
175
|
+
});
|
|
176
|
+
const { isPrinting: be, isImaging: me, generatePdf: je, generateImage: Ye } = wl({
|
|
177
|
+
elementId: `rings_${C.value}`,
|
|
178
|
+
fileName: e.value.style.chart.title.text || "vue-ui-rings",
|
|
179
|
+
options: e.value.userOptions.print
|
|
180
|
+
}), Ft = d(() => e.value.userOptions.show && !e.value.style.chart.title.text), qe = d(() => ul(e.value.customPalette)), f = r({
|
|
181
|
+
showTable: e.value.table.show,
|
|
182
|
+
showTooltip: e.value.style.chart.tooltip.show,
|
|
183
|
+
showLabels: e.value.style.chart.layout.labels.dataLabels.show
|
|
184
|
+
});
|
|
185
|
+
ue(e, () => {
|
|
186
|
+
f.value = {
|
|
187
|
+
showTable: e.value.table.show,
|
|
188
|
+
showTooltip: e.value.style.chart.tooltip.show,
|
|
189
|
+
showLabels: e.value.style.chart.layout.labels.dataLabels.show
|
|
190
|
+
};
|
|
191
|
+
}, { immediate: !0 });
|
|
192
|
+
const h = r({
|
|
193
|
+
height: e.value.style.chart.size,
|
|
194
|
+
width: e.value.style.chart.size
|
|
195
|
+
}), It = d(() => Math.min(h.value.height, h.value.width)), Ze = bt, p = r([]);
|
|
196
|
+
function Dt() {
|
|
197
|
+
p.value.length ? p.value = [] : Q.value.forEach((t) => {
|
|
198
|
+
p.value.push(t.uid);
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
function J(t) {
|
|
202
|
+
if (p.value.includes(t))
|
|
203
|
+
p.value = p.value.filter((a) => a !== t);
|
|
204
|
+
else {
|
|
205
|
+
if (p.value.length === U.value.length - 1) return;
|
|
206
|
+
p.value.push(t);
|
|
207
|
+
}
|
|
208
|
+
Ze("selectLegend", g.value.map((a) => ({
|
|
209
|
+
name: a.name,
|
|
210
|
+
color: a.color,
|
|
211
|
+
value: a.value
|
|
212
|
+
})));
|
|
213
|
+
}
|
|
214
|
+
function Je(t) {
|
|
215
|
+
if (!U.value.length)
|
|
216
|
+
return e.value.debug && console.warn("VueUiRings - There are no series to show."), null;
|
|
217
|
+
const a = U.value.find((l) => l.name === t);
|
|
218
|
+
return a || (e.value.debug && console.warn(`VueUiRings - Series name not found "${t}"`), null);
|
|
219
|
+
}
|
|
220
|
+
function Nt(t) {
|
|
221
|
+
const a = Je(t);
|
|
222
|
+
a !== null && p.value.includes(a.uid) && J(a.uid);
|
|
223
|
+
}
|
|
224
|
+
function Rt(t) {
|
|
225
|
+
const a = Je(t);
|
|
226
|
+
a !== null && (p.value.includes(a.uid) || J(a.uid));
|
|
227
|
+
}
|
|
228
|
+
const zt = d(() => Math.max(
|
|
229
|
+
...U.value.filter((t) => !p.value.includes(t.uid)).map(({ value: t }) => t)
|
|
230
|
+
));
|
|
231
|
+
function Qe(t) {
|
|
232
|
+
return t / zt.value;
|
|
233
|
+
}
|
|
234
|
+
const U = d(() => We.value.map(({ values: t, name: a, color: l = null }, o) => {
|
|
235
|
+
const n = rl(t).reduce((s, $) => s + $, 0);
|
|
236
|
+
return {
|
|
237
|
+
name: a,
|
|
238
|
+
color: l || pt(l) || qe.value[o] || X[o] || X[o % X.length],
|
|
239
|
+
value: n,
|
|
240
|
+
proportion: n / We.value.map((s) => (s.values || []).reduce(($, Y) => $ + Y, 0)).reduce((s, $) => s + $, 0),
|
|
241
|
+
uid: dt(),
|
|
242
|
+
absoluteIndex: o
|
|
243
|
+
};
|
|
244
|
+
})), Q = d(() => U.value.map((t, a) => {
|
|
245
|
+
const l = _e(e.value.style.chart.layout.labels.dataLabels.formatter, t.value, M({
|
|
246
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
247
|
+
v: t.value,
|
|
248
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
249
|
+
r: e.value.style.chart.legend.roundingValue
|
|
250
|
+
}), { datapoint: t, index: a }), o = isNaN(t.value / I.value) ? "-" : M({ v: t.value / I.value * 100, s: "%", r: e.value.style.chart.legend.roundingPercentage }), n = Ce({
|
|
251
|
+
showVal: e.value.style.chart.legend.showValue,
|
|
252
|
+
showPercentage: e.value.style.chart.legend.showPercentage,
|
|
253
|
+
val: l,
|
|
254
|
+
percentage: p.value.includes(t.uid) ? "-%" : o
|
|
255
|
+
});
|
|
256
|
+
return {
|
|
257
|
+
...t,
|
|
258
|
+
shape: "circle",
|
|
259
|
+
opacity: p.value.includes(t.uid) ? 0.5 : 1,
|
|
260
|
+
segregate: () => J(t.uid),
|
|
261
|
+
isSegregated: p.value.includes(t.uid),
|
|
262
|
+
display: `${t.name}${e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ": " : ""}${n}`
|
|
263
|
+
};
|
|
264
|
+
}).toSorted((t, a) => a.value - t.value)), Bt = d(() => ({
|
|
265
|
+
cy: "rings-div-legend",
|
|
266
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
267
|
+
color: e.value.style.chart.legend.color,
|
|
268
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
269
|
+
paddingBottom: 12,
|
|
270
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
271
|
+
})), I = d(() => U.value.filter((t) => !p.value.includes(t.uid)).map(({ value: t }) => t).reduce((t, a) => t + a, 0)), g = d(() => U.value.filter((t) => !p.value.includes(t.uid)).map(({ name: t, value: a, color: l = null, uid: o, absoluteIndex: n }, s) => ({
|
|
272
|
+
absoluteIndex: n,
|
|
273
|
+
uid: o,
|
|
274
|
+
name: t,
|
|
275
|
+
color: l || pt(l) || qe.value[s] || X[s] || X[s % X.length],
|
|
276
|
+
value: a,
|
|
277
|
+
proportion: Qe(a),
|
|
278
|
+
percentage: a / I.value * 100,
|
|
279
|
+
strokeWidth: e.value.style.chart.layout.rings.strokeWidth * Qe(a)
|
|
280
|
+
})).toSorted((t, a) => a.value - t.value));
|
|
281
|
+
function Mt() {
|
|
282
|
+
return g.value.map(
|
|
283
|
+
({ name: t, color: a, value: l, absoluteValues: o, percentage: n }) => ({
|
|
284
|
+
name: t,
|
|
285
|
+
color: a,
|
|
286
|
+
value: l,
|
|
287
|
+
absoluteValues: o,
|
|
288
|
+
percentage: n
|
|
289
|
+
})
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
const W = d(() => It.value - e.value.style.chart.layout.rings.strokeWidth * 2);
|
|
293
|
+
function ke(t, a) {
|
|
294
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: a });
|
|
295
|
+
}
|
|
296
|
+
function et(t, a) {
|
|
297
|
+
b.value = null, G.value = !1, O.value = null, Z.value = "pointer", e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: a });
|
|
298
|
+
}
|
|
299
|
+
function Ce({
|
|
300
|
+
val: t,
|
|
301
|
+
percentage: a,
|
|
302
|
+
showVal: l,
|
|
303
|
+
showPercentage: o
|
|
304
|
+
}) {
|
|
305
|
+
const n = e.value.style.chart.layout.labels.dataLabels;
|
|
306
|
+
return bl({
|
|
307
|
+
config: n,
|
|
308
|
+
val: t,
|
|
309
|
+
percentage: a,
|
|
310
|
+
showVal: l,
|
|
311
|
+
showPercentage: o
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
function Vt(t) {
|
|
315
|
+
const a = e.value.style.chart.layout.labels.dataLabels, l = _e(
|
|
316
|
+
a.formatter,
|
|
317
|
+
t.value,
|
|
318
|
+
M({
|
|
319
|
+
p: a.prefix,
|
|
320
|
+
v: t.value,
|
|
321
|
+
s: a.suffix,
|
|
322
|
+
r: a.roundingValue
|
|
323
|
+
})
|
|
324
|
+
), o = M({
|
|
325
|
+
v: t.percentage,
|
|
326
|
+
s: "%",
|
|
327
|
+
r: a.roundingPercentage
|
|
328
|
+
});
|
|
329
|
+
return `${t.name}
|
|
330
|
+
${Ce({
|
|
331
|
+
val: l,
|
|
332
|
+
percentage: o,
|
|
333
|
+
showVal: a.showValue,
|
|
334
|
+
showPercentage: a.showPercentage
|
|
335
|
+
})}`;
|
|
336
|
+
}
|
|
337
|
+
function ee(t) {
|
|
338
|
+
return pl(W.value * t.proportion / 2 * 0.9 <= 0 ? 1e-4 : W.value * t.proportion / 2 * 0.9);
|
|
339
|
+
}
|
|
340
|
+
function te(t, a) {
|
|
341
|
+
return a === 0 ? F.value.y : F.value.y + W.value * g.value[0].proportion / 2 - W.value * t.proportion / 2 - 2 * (a + 1);
|
|
342
|
+
}
|
|
343
|
+
function S(t, a) {
|
|
344
|
+
const o = e.value.style.chart.layout.labels.dataLabels.markers.position === "left" ? -(W.value / 2) : W.value / 2;
|
|
345
|
+
return {
|
|
346
|
+
x: F.value.x + o,
|
|
347
|
+
y: te(t, a) - ee(t)
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
const we = r(null);
|
|
351
|
+
function $e(t, a, l = "pointer") {
|
|
352
|
+
if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: a }), p.value.length === w.dataset.length) return;
|
|
353
|
+
we.value = {
|
|
354
|
+
datapoint: t,
|
|
355
|
+
seriesIndex: a,
|
|
356
|
+
series: g.value,
|
|
357
|
+
config: e.value
|
|
358
|
+
}, b.value = a, O.value = a, Z.value = l;
|
|
359
|
+
const o = g.value[a], n = e.value.style.chart.tooltip.customFormat;
|
|
360
|
+
if (fl(n) && yl(() => n({
|
|
361
|
+
seriesIndex: a,
|
|
362
|
+
datapoint: t,
|
|
363
|
+
series: g.value,
|
|
364
|
+
config: e.value
|
|
365
|
+
})))
|
|
366
|
+
ce.value = n({
|
|
367
|
+
seriesIndex: a,
|
|
368
|
+
datapoint: t,
|
|
369
|
+
series: g.value,
|
|
370
|
+
config: e.value
|
|
371
|
+
});
|
|
372
|
+
else {
|
|
373
|
+
let s = "";
|
|
374
|
+
s += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${o.name}</div>`, s += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${o.color}" />${_t.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${C.value}_${t.absoluteIndex})" />` : ""}</svg>`, s += `<b>${Ce({
|
|
375
|
+
showVal: e.value.style.chart.tooltip.showValue,
|
|
376
|
+
showPercentage: e.value.style.chart.tooltip.showPercentage,
|
|
377
|
+
val: `<span>${_e(
|
|
378
|
+
e.value.style.chart.layout.labels.dataLabels.formatter,
|
|
379
|
+
o.value,
|
|
380
|
+
M({
|
|
381
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
382
|
+
v: o.value,
|
|
383
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
384
|
+
r: e.value.style.chart.tooltip.roundingValue
|
|
385
|
+
}),
|
|
386
|
+
{ datapoint: t, seriesIndex: a }
|
|
387
|
+
)}</span>`,
|
|
388
|
+
percentage: M({
|
|
389
|
+
v: o.value / I.value * 100,
|
|
390
|
+
s: "%",
|
|
391
|
+
r: e.value.style.chart.tooltip.roundingPercentage
|
|
392
|
+
})
|
|
393
|
+
})}</b></div>`, ce.value = s;
|
|
394
|
+
}
|
|
395
|
+
G.value = !0;
|
|
396
|
+
}
|
|
397
|
+
const N = d(() => {
|
|
398
|
+
const t = g.value.map((l) => ({
|
|
399
|
+
name: l.name,
|
|
400
|
+
color: l.color
|
|
401
|
+
})), a = g.value.map((l) => l.value);
|
|
402
|
+
return { head: t, body: a };
|
|
403
|
+
}), j = d(() => {
|
|
404
|
+
const t = [
|
|
405
|
+
' <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2" /></svg>',
|
|
406
|
+
M({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: I.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
407
|
+
"100%"
|
|
408
|
+
], a = N.value.head.map((s, $) => [
|
|
409
|
+
{
|
|
410
|
+
color: s.color,
|
|
411
|
+
name: s.name
|
|
412
|
+
},
|
|
413
|
+
M({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: N.value.body[$], s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
414
|
+
isNaN(N.value.body[$] / I.value) ? "-" : (N.value.body[$] / I.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
|
|
415
|
+
]), l = a.map((s) => s.map(($, Y) => Y === 0 ? $.name : $)), o = {
|
|
416
|
+
th: {
|
|
417
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
418
|
+
color: e.value.table.th.color,
|
|
419
|
+
outline: e.value.table.th.outline
|
|
420
|
+
},
|
|
421
|
+
td: {
|
|
422
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
423
|
+
color: e.value.table.td.color,
|
|
424
|
+
outline: e.value.table.td.outline
|
|
425
|
+
},
|
|
426
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
427
|
+
}, n = [
|
|
428
|
+
e.value.table.columnNames.series,
|
|
429
|
+
e.value.table.columnNames.value,
|
|
430
|
+
e.value.table.columnNames.percentage
|
|
431
|
+
];
|
|
432
|
+
return {
|
|
433
|
+
head: t,
|
|
434
|
+
body: a,
|
|
435
|
+
a11yBody: l,
|
|
436
|
+
config: o,
|
|
437
|
+
colNames: n
|
|
438
|
+
};
|
|
439
|
+
});
|
|
440
|
+
function Te(t = null) {
|
|
441
|
+
ct(() => {
|
|
442
|
+
const a = N.value.head.map((n, s) => [[
|
|
443
|
+
n.name
|
|
444
|
+
], [N.value.body[s]], [isNaN(N.value.body[s] / I.value) ? "-" : N.value.body[s] / I.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(a), o = hl(l);
|
|
445
|
+
t ? t(o) : gl({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-rings" });
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
const H = r(!1);
|
|
449
|
+
function tt(t) {
|
|
450
|
+
H.value = t, Ie.value += 1;
|
|
451
|
+
}
|
|
452
|
+
function lt() {
|
|
453
|
+
f.value.showTable = !f.value.showTable;
|
|
454
|
+
}
|
|
455
|
+
function at() {
|
|
456
|
+
f.value.showTooltip = !f.value.showTooltip;
|
|
457
|
+
}
|
|
458
|
+
function ot() {
|
|
459
|
+
f.value.showLabels = !f.value.showLabels;
|
|
460
|
+
}
|
|
461
|
+
const le = r(!1);
|
|
462
|
+
function Le() {
|
|
463
|
+
le.value = !le.value;
|
|
464
|
+
}
|
|
465
|
+
async function Et({ scale: t = 2 } = {}) {
|
|
466
|
+
if (!_.value) return;
|
|
467
|
+
const { width: a, height: l } = _.value.getBoundingClientRect(), o = a / l, { imageUri: n, base64: s } = await Pl({ domElement: _.value, base64: !0, img: !0, scale: t });
|
|
468
|
+
return {
|
|
469
|
+
imageUri: n,
|
|
470
|
+
base64: s,
|
|
471
|
+
title: e.value.style.chart.title.text,
|
|
472
|
+
width: a,
|
|
473
|
+
height: l,
|
|
474
|
+
aspectRatio: o
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
const ae = d(() => {
|
|
478
|
+
const t = e.value.table.useDialog && !e.value.table.show, a = f.value.showTable;
|
|
479
|
+
return {
|
|
480
|
+
component: t ? xt : Ct,
|
|
481
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
482
|
+
props: t ? {
|
|
483
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
484
|
+
color: e.value.table.th.color,
|
|
485
|
+
headerColor: e.value.table.th.color,
|
|
486
|
+
headerBg: e.value.table.th.backgroundColor,
|
|
487
|
+
isFullscreen: H.value,
|
|
488
|
+
fullscreenParent: _.value,
|
|
489
|
+
forcedWidth: Math.min(800, window.innerWidth * 0.8),
|
|
490
|
+
isCursorPointer: V.value
|
|
491
|
+
} : {
|
|
492
|
+
hideDetails: !0,
|
|
493
|
+
config: {
|
|
494
|
+
open: a,
|
|
495
|
+
maxHeight: 1e4,
|
|
496
|
+
body: {
|
|
497
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
498
|
+
color: e.value.style.chart.color
|
|
499
|
+
},
|
|
500
|
+
head: {
|
|
501
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
502
|
+
color: e.value.style.chart.color
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
});
|
|
508
|
+
ue(() => f.value.showTable, (t) => {
|
|
509
|
+
e.value.table.show || (t && e.value.table.useDialog && q.value ? q.value.open() : "close" in q.value && q.value.close());
|
|
510
|
+
});
|
|
511
|
+
function st() {
|
|
512
|
+
f.value.showTable = !1, he.value && he.value.setTableIconState(!1);
|
|
513
|
+
}
|
|
514
|
+
const Ut = d(() => Q.value.map((t) => ({
|
|
515
|
+
...t,
|
|
516
|
+
name: t.display
|
|
517
|
+
}))), Wt = d(() => e.value.style.chart.backgroundColor), Ht = d(() => e.value.style.chart.legend), Xt = d(() => e.value.style.chart.title), { exportSvg: Gt, getSvg: Kt } = Ll({
|
|
518
|
+
svg: E,
|
|
519
|
+
title: Xt,
|
|
520
|
+
legend: Ht,
|
|
521
|
+
legendItems: Ut,
|
|
522
|
+
backgroundColor: Wt
|
|
523
|
+
});
|
|
524
|
+
async function nt({ isCb: t }) {
|
|
525
|
+
se.value = !0, await ct();
|
|
526
|
+
try {
|
|
527
|
+
if (t) {
|
|
528
|
+
const { blob: a, url: l, text: o, dataUrl: n } = await Kt();
|
|
529
|
+
await Promise.resolve(e.value.userOptions.callbacks.svg({ blob: a, url: l, text: o, dataUrl: n }));
|
|
530
|
+
} else
|
|
531
|
+
await Promise.resolve(Gt());
|
|
532
|
+
} finally {
|
|
533
|
+
se.value = !1;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
function jt(t) {
|
|
537
|
+
if (t?.stage === "start") {
|
|
538
|
+
oe.value = !0;
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
if (t?.stage === "end") {
|
|
542
|
+
oe.value = !1;
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
Ye();
|
|
546
|
+
}
|
|
547
|
+
async function ut() {
|
|
548
|
+
if (Ze("copyAlt", {
|
|
549
|
+
config: e.value,
|
|
550
|
+
dataset: g.value
|
|
551
|
+
}), !e.value.userOptions.callbacks.altCopy) {
|
|
552
|
+
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
await Promise.resolve(e.value.userOptions.callbacks.altCopy({
|
|
556
|
+
config: e.value,
|
|
557
|
+
dataset: g.value
|
|
558
|
+
}));
|
|
559
|
+
}
|
|
560
|
+
function Yt() {
|
|
561
|
+
O.value = null, ge.value = !0;
|
|
562
|
+
}
|
|
563
|
+
function qt() {
|
|
564
|
+
O.value = null, Z.value = "pointer", G.value = !1, b.value = null, ge.value = !1;
|
|
565
|
+
}
|
|
566
|
+
function Zt(t) {
|
|
567
|
+
if (!E.value || le.value || document.activeElement !== E.value || !g.value.length || p.value.length === w.dataset.length) return;
|
|
568
|
+
const a = ["ArrowLeft", "ArrowUp"].includes(t.key), l = ["ArrowRight", "ArrowDown"].includes(t.key), o = t.key === "Enter" || t.key === " ", n = t.key === "Escape";
|
|
569
|
+
if (!a && !l && !o && !n) return;
|
|
570
|
+
if (t.preventDefault(), t.stopPropagation(), n) {
|
|
571
|
+
O.value = null, Z.value = "pointer", G.value = !1, b.value = null;
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
if (o) {
|
|
575
|
+
if (O.value === null) return;
|
|
576
|
+
const Y = g.value[O.value];
|
|
577
|
+
if (!Y) return;
|
|
578
|
+
ke(Y, O.value);
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
let s = O.value;
|
|
582
|
+
s === null || s < 0 || s >= g.value.length ? s = l ? 0 : g.value.length - 1 : l ? (s += 1, s >= g.value.length && (s = 0)) : a && (s -= 1, s < 0 && (s = g.value.length - 1));
|
|
583
|
+
const $ = g.value[s];
|
|
584
|
+
$ && (Jt(s), $e($, s, "keyboard"));
|
|
585
|
+
}
|
|
586
|
+
function Jt(t) {
|
|
587
|
+
if (!Number.isFinite(t) || !E.value) return;
|
|
588
|
+
const a = g.value[t];
|
|
589
|
+
if (!a) return;
|
|
590
|
+
const l = S(a, t), o = E.value.getBoundingClientRect();
|
|
591
|
+
Ue.value = {
|
|
592
|
+
x: o.left + l.x / h.value.width * o.width,
|
|
593
|
+
y: o.top + l.y / h.value.height * o.height
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
const xe = d(() => {
|
|
597
|
+
const t = j.value?.colNames ?? [], a = j.value?.a11yBody ?? [];
|
|
598
|
+
return { headers: t, rows: a };
|
|
599
|
+
});
|
|
600
|
+
return yt({
|
|
601
|
+
getData: Mt,
|
|
602
|
+
getImage: Et,
|
|
603
|
+
generatePdf: je,
|
|
604
|
+
generateCsv: Te,
|
|
605
|
+
generateImage: Ye,
|
|
606
|
+
generateSvg: nt,
|
|
607
|
+
hideSeries: Rt,
|
|
608
|
+
showSeries: Nt,
|
|
609
|
+
toggleTable: lt,
|
|
610
|
+
toggleTooltip: at,
|
|
611
|
+
toggleAnnotator: Le,
|
|
612
|
+
toggleFullscreen: tt,
|
|
613
|
+
toggleLabels: ot,
|
|
614
|
+
copyAlt: ut
|
|
615
|
+
}), (t, a) => (i(), y("div", {
|
|
616
|
+
ref_key: "ringsChart",
|
|
617
|
+
ref: _,
|
|
618
|
+
class: B(`vue-data-ui-component vue-ui-rings ${H.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
619
|
+
style: z(`font-family:${e.value.style.fontFamily};text-align:center;width:100%;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`),
|
|
620
|
+
id: `rings_${C.value}`,
|
|
621
|
+
onMouseleave: a[2] || (a[2] = (l) => {
|
|
622
|
+
b.value = null, G.value = !1, u(He)(!1);
|
|
623
|
+
}),
|
|
624
|
+
onMouseenter: a[3] || (a[3] = () => u(He)(!0))
|
|
625
|
+
}, [
|
|
626
|
+
m("div", {
|
|
627
|
+
id: `chart-instructions-${C.value}`,
|
|
628
|
+
class: "sr-only"
|
|
629
|
+
}, [
|
|
630
|
+
m("p", null, re(e.value.a11y.translations.keyboardNavigation), 1)
|
|
631
|
+
], 8, Bl),
|
|
632
|
+
xe.value?.rows?.length ? (i(), P(Dl, {
|
|
633
|
+
key: 0,
|
|
634
|
+
uid: C.value,
|
|
635
|
+
head: xe.value.headers,
|
|
636
|
+
body: xe.value.rows,
|
|
637
|
+
notice: e.value.a11y.translations.tableAvailable,
|
|
638
|
+
caption: e.value.a11y.translations.tableCaption
|
|
639
|
+
}, null, 8, ["uid", "head", "body", "notice", "caption"])) : k("", !0),
|
|
640
|
+
e.value.userOptions.buttons.annotator ? (i(), P(u($t), {
|
|
641
|
+
key: 1,
|
|
642
|
+
svgRef: u(E),
|
|
643
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
644
|
+
color: e.value.style.chart.color,
|
|
645
|
+
active: le.value,
|
|
646
|
+
isCursorPointer: V.value,
|
|
647
|
+
onClose: Le
|
|
648
|
+
}, {
|
|
649
|
+
"annotator-action-close": v(() => [
|
|
650
|
+
c(t.$slots, "annotator-action-close", {}, void 0, !0)
|
|
651
|
+
]),
|
|
652
|
+
"annotator-action-color": v(({ color: l }) => [
|
|
653
|
+
c(t.$slots, "annotator-action-color", L(x({ color: l })), void 0, !0)
|
|
654
|
+
]),
|
|
655
|
+
"annotator-action-draw": v(({ mode: l }) => [
|
|
656
|
+
c(t.$slots, "annotator-action-draw", L(x({ mode: l })), void 0, !0)
|
|
657
|
+
]),
|
|
658
|
+
"annotator-action-undo": v(({ disabled: l }) => [
|
|
659
|
+
c(t.$slots, "annotator-action-undo", L(x({ disabled: l })), void 0, !0)
|
|
660
|
+
]),
|
|
661
|
+
"annotator-action-redo": v(({ disabled: l }) => [
|
|
662
|
+
c(t.$slots, "annotator-action-redo", L(x({ disabled: l })), void 0, !0)
|
|
663
|
+
]),
|
|
664
|
+
"annotator-action-delete": v(({ disabled: l }) => [
|
|
665
|
+
c(t.$slots, "annotator-action-delete", L(x({ disabled: l })), void 0, !0)
|
|
666
|
+
]),
|
|
667
|
+
_: 3
|
|
668
|
+
}, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : k("", !0),
|
|
669
|
+
Ft.value ? (i(), y("div", {
|
|
670
|
+
key: 2,
|
|
671
|
+
ref_key: "noTitle",
|
|
672
|
+
ref: ze,
|
|
673
|
+
class: "vue-data-ui-no-title-space",
|
|
674
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
675
|
+
}, null, 512)) : k("", !0),
|
|
676
|
+
e.value.style.chart.title.text ? (i(), y("div", {
|
|
677
|
+
key: 3,
|
|
678
|
+
ref_key: "chartTitle",
|
|
679
|
+
ref: De,
|
|
680
|
+
style: "width:100%;background:transparent"
|
|
681
|
+
}, [
|
|
682
|
+
(i(), P(Ol, {
|
|
683
|
+
key: `title_${Be.value}`,
|
|
684
|
+
config: {
|
|
685
|
+
title: {
|
|
686
|
+
cy: "rings-div-title",
|
|
687
|
+
...e.value.style.chart.title
|
|
688
|
+
},
|
|
689
|
+
subtitle: {
|
|
690
|
+
cy: "rings-div-subtitle",
|
|
691
|
+
...e.value.style.chart.title.subtitle
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
}, null, 8, ["config"]))
|
|
695
|
+
], 512)) : k("", !0),
|
|
696
|
+
m("div", {
|
|
697
|
+
id: `legend-top-${C.value}`
|
|
698
|
+
}, null, 8, Ml),
|
|
699
|
+
e.value.userOptions.show && Fe.value && (u(Xe) || u(pe)) ? (i(), P(u(Tt), {
|
|
700
|
+
ref_key: "userOptionsRef",
|
|
701
|
+
ref: he,
|
|
702
|
+
key: `user_options_${Ie.value}`,
|
|
703
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
704
|
+
color: e.value.style.chart.color,
|
|
705
|
+
isPrinting: u(be),
|
|
706
|
+
isImaging: u(me),
|
|
707
|
+
uid: C.value,
|
|
708
|
+
hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
|
|
709
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
710
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
711
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
712
|
+
hasSvg: e.value.userOptions.buttons.svg,
|
|
713
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
714
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
715
|
+
hasAltCopy: e.value.userOptions.buttons.altCopy,
|
|
716
|
+
hasLabel: e.value.userOptions.buttons.labels,
|
|
717
|
+
isTooltip: f.value.showTooltip,
|
|
718
|
+
isFullscreen: H.value,
|
|
719
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
720
|
+
chartElement: _.value,
|
|
721
|
+
position: e.value.userOptions.position,
|
|
722
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
723
|
+
isAnnotation: le.value,
|
|
724
|
+
callbacks: e.value.userOptions.callbacks,
|
|
725
|
+
printScale: e.value.userOptions.print.scale,
|
|
726
|
+
tableDialog: e.value.table.useDialog,
|
|
727
|
+
isCursorPointer: V.value,
|
|
728
|
+
onToggleFullscreen: tt,
|
|
729
|
+
onGeneratePdf: u(je),
|
|
730
|
+
onGenerateCsv: Te,
|
|
731
|
+
onGenerateImage: jt,
|
|
732
|
+
onGenerateSvg: nt,
|
|
733
|
+
onToggleTable: lt,
|
|
734
|
+
onToggleTooltip: at,
|
|
735
|
+
onToggleAnnotator: Le,
|
|
736
|
+
onToggleLabels: ot,
|
|
737
|
+
onCopyAlt: ut,
|
|
738
|
+
style: z({
|
|
739
|
+
visibility: u(Xe) ? u(pe) ? "visible" : "hidden" : "visible"
|
|
740
|
+
})
|
|
741
|
+
}, Ae({ _: 2 }, [
|
|
742
|
+
t.$slots.menuIcon ? {
|
|
743
|
+
name: "menuIcon",
|
|
744
|
+
fn: v(({ isOpen: l, color: o }) => [
|
|
745
|
+
c(t.$slots, "menuIcon", L(x({ isOpen: l, color: o })), void 0, !0)
|
|
746
|
+
]),
|
|
747
|
+
key: "0"
|
|
748
|
+
} : void 0,
|
|
749
|
+
t.$slots.optionTooltip ? {
|
|
750
|
+
name: "optionTooltip",
|
|
751
|
+
fn: v(() => [
|
|
752
|
+
c(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
753
|
+
]),
|
|
754
|
+
key: "1"
|
|
755
|
+
} : void 0,
|
|
756
|
+
t.$slots.optionPdf ? {
|
|
757
|
+
name: "optionPdf",
|
|
758
|
+
fn: v(() => [
|
|
759
|
+
c(t.$slots, "optionPdf", {}, void 0, !0)
|
|
760
|
+
]),
|
|
761
|
+
key: "2"
|
|
762
|
+
} : void 0,
|
|
763
|
+
t.$slots.optionCsv ? {
|
|
764
|
+
name: "optionCsv",
|
|
765
|
+
fn: v(() => [
|
|
766
|
+
c(t.$slots, "optionCsv", {}, void 0, !0)
|
|
767
|
+
]),
|
|
768
|
+
key: "3"
|
|
769
|
+
} : void 0,
|
|
770
|
+
t.$slots.optionImg ? {
|
|
771
|
+
name: "optionImg",
|
|
772
|
+
fn: v(() => [
|
|
773
|
+
c(t.$slots, "optionImg", {}, void 0, !0)
|
|
774
|
+
]),
|
|
775
|
+
key: "4"
|
|
776
|
+
} : void 0,
|
|
777
|
+
t.$slots.optionSvg ? {
|
|
778
|
+
name: "optionSvg",
|
|
779
|
+
fn: v(() => [
|
|
780
|
+
c(t.$slots, "optionSvg", {}, void 0, !0)
|
|
781
|
+
]),
|
|
782
|
+
key: "5"
|
|
783
|
+
} : void 0,
|
|
784
|
+
t.$slots.optionTable ? {
|
|
785
|
+
name: "optionTable",
|
|
786
|
+
fn: v(() => [
|
|
787
|
+
c(t.$slots, "optionTable", {}, void 0, !0)
|
|
788
|
+
]),
|
|
789
|
+
key: "6"
|
|
790
|
+
} : void 0,
|
|
791
|
+
t.$slots.optionLabels ? {
|
|
792
|
+
name: "optionLabels",
|
|
793
|
+
fn: v(() => [
|
|
794
|
+
c(t.$slots, "optionLabels", {}, void 0, !0)
|
|
795
|
+
]),
|
|
796
|
+
key: "7"
|
|
797
|
+
} : void 0,
|
|
798
|
+
t.$slots.optionFullscreen ? {
|
|
799
|
+
name: "optionFullscreen",
|
|
800
|
+
fn: v(({ toggleFullscreen: l, isFullscreen: o }) => [
|
|
801
|
+
c(t.$slots, "optionFullscreen", L(x({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
|
|
802
|
+
]),
|
|
803
|
+
key: "8"
|
|
804
|
+
} : void 0,
|
|
805
|
+
t.$slots.optionAnnotator ? {
|
|
806
|
+
name: "optionAnnotator",
|
|
807
|
+
fn: v(({ toggleAnnotator: l, isAnnotator: o }) => [
|
|
808
|
+
c(t.$slots, "optionAnnotator", L(x({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
|
|
809
|
+
]),
|
|
810
|
+
key: "9"
|
|
811
|
+
} : void 0,
|
|
812
|
+
t.$slots.optionAltCopy ? {
|
|
813
|
+
name: "optionAltCopy",
|
|
814
|
+
fn: v(({ altCopy: l }) => [
|
|
815
|
+
c(t.$slots, "optionAltCopy", L(x({ altCopy: l })), void 0, !0)
|
|
816
|
+
]),
|
|
817
|
+
key: "10"
|
|
818
|
+
} : void 0
|
|
819
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasTable", "hasFullscreen", "hasAltCopy", "hasLabel", "isTooltip", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style"])) : k("", !0),
|
|
820
|
+
m("div", Vl, [
|
|
821
|
+
(i(), y("svg", {
|
|
822
|
+
ref_key: "svgRef",
|
|
823
|
+
ref: E,
|
|
824
|
+
xmlns: u(il),
|
|
825
|
+
class: B({ "vue-data-ui-fullscreen--on": H.value, "vue-data-ui-fulscreen--off": !H.value, resizing: de.value || u(A) }),
|
|
826
|
+
viewBox: `0 0 ${h.value.width <= 0 ? 10 : h.value.width} ${h.value.height <= 0 ? 10 : h.value.height}`,
|
|
827
|
+
style: z(`max-width:100%;overflow:hidden;background:transparent;color:${e.value.style.chart.color}`),
|
|
828
|
+
"aria-describedby": `chart-instructions-${C.value}`,
|
|
829
|
+
tabindex: "0",
|
|
830
|
+
onFocus: Yt,
|
|
831
|
+
onBlur: qt,
|
|
832
|
+
onKeydown: Zt
|
|
833
|
+
}, [
|
|
834
|
+
ie(u(Lt)),
|
|
835
|
+
t.$slots["chart-background"] ? (i(), y("foreignObject", {
|
|
836
|
+
key: 0,
|
|
837
|
+
x: 0,
|
|
838
|
+
y: 0,
|
|
839
|
+
width: h.value.width <= 0 ? 10 : h.value.width,
|
|
840
|
+
height: h.value.height <= 0 ? 10 : h.value.height,
|
|
841
|
+
style: {
|
|
842
|
+
pointerEvents: "none"
|
|
843
|
+
}
|
|
844
|
+
}, [
|
|
845
|
+
c(t.$slots, "chart-background", {}, void 0, !0)
|
|
846
|
+
], 8, Ul)) : k("", !0),
|
|
847
|
+
m("defs", null, [
|
|
848
|
+
(i(!0), y(ve, null, Se(g.value, (l, o) => (i(), y("radialGradient", {
|
|
849
|
+
cx: "50%",
|
|
850
|
+
cy: "30%",
|
|
851
|
+
r: "50%",
|
|
852
|
+
fx: "50%",
|
|
853
|
+
fy: "50%",
|
|
854
|
+
id: `gradient_${C.value}_${o}`
|
|
855
|
+
}, [
|
|
856
|
+
m("stop", {
|
|
857
|
+
offset: "0%",
|
|
858
|
+
"stop-color": u(vl)(u(cl)(l.color, 0.05), 100 - e.value.style.chart.layout.rings.gradient.intensity)
|
|
859
|
+
}, null, 8, Hl),
|
|
860
|
+
m("stop", {
|
|
861
|
+
offset: "100%",
|
|
862
|
+
"stop-color": l.color
|
|
863
|
+
}, null, 8, Xl)
|
|
864
|
+
], 8, Wl))), 256))
|
|
865
|
+
]),
|
|
866
|
+
t.$slots.pattern ? (i(), y("g", Gl, [
|
|
867
|
+
(i(!0), y(ve, null, Se(g.value, (l) => (i(), y("defs", null, [
|
|
868
|
+
c(t.$slots, "pattern", it({ ref_for: !0 }, { seriesIndex: l.absoluteIndex, patternId: `pattern_${C.value}_${l.absoluteIndex}` }), void 0, !0)
|
|
869
|
+
]))), 256))
|
|
870
|
+
])) : k("", !0),
|
|
871
|
+
(i(!0), y(ve, null, Se(g.value, (l, o) => (i(), y("g", null, [
|
|
872
|
+
m("circle", {
|
|
873
|
+
class: B({
|
|
874
|
+
"vue-ui-rings-item": T.value && e.value.useCssAnimation,
|
|
875
|
+
"vue-rings-item-onload": !T.value && e.value.useCssAnimation && !u(A),
|
|
876
|
+
"vue-ui-rings-opacity": b.value !== null && b.value !== o
|
|
877
|
+
}),
|
|
878
|
+
style: z(`animation-delay:${o * 100}ms`),
|
|
879
|
+
stroke: e.value.style.chart.layout.rings.stroke,
|
|
880
|
+
cx: F.value.x,
|
|
881
|
+
cy: te(l, o),
|
|
882
|
+
r: ee(l),
|
|
883
|
+
fill: e.value.style.chart.layout.rings.gradient.underlayerColor
|
|
884
|
+
}, null, 14, Kl),
|
|
885
|
+
m("circle", {
|
|
886
|
+
class: B({
|
|
887
|
+
"vue-ui-rings-item": T.value && e.value.useCssAnimation,
|
|
888
|
+
"vue-rings-item-onload": !T.value && e.value.useCssAnimation && !u(A),
|
|
889
|
+
"vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
|
|
890
|
+
"vue-ui-rings-blur": b.value !== null && b.value !== o
|
|
891
|
+
}),
|
|
892
|
+
style: z(`animation-delay:${o * 100}ms`),
|
|
893
|
+
stroke: e.value.style.chart.layout.rings.stroke,
|
|
894
|
+
"stroke-width": l.strokeWidth < 0.5 ? 0.5 : l.strokeWidth,
|
|
895
|
+
cx: F.value.x,
|
|
896
|
+
cy: te(l, o),
|
|
897
|
+
r: ee(l),
|
|
898
|
+
fill: e.value.style.chart.layout.rings.gradient.show ? `url(#gradient_${C.value}_${o})` : l.color
|
|
899
|
+
}, null, 14, jl),
|
|
900
|
+
t.$slots.pattern ? (i(), y("circle", {
|
|
901
|
+
key: 0,
|
|
902
|
+
class: B({
|
|
903
|
+
"vue-ui-rings-item": T.value && e.value.useCssAnimation,
|
|
904
|
+
"vue-rings-item-onload": !T.value && e.value.useCssAnimation && !u(A),
|
|
905
|
+
"vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
|
|
906
|
+
"vue-ui-rings-blur": b.value !== null && b.value !== o
|
|
907
|
+
}),
|
|
908
|
+
style: z(`animation-delay:${o * 100}ms`),
|
|
909
|
+
stroke: e.value.style.chart.layout.rings.stroke,
|
|
910
|
+
"stroke-width": l.strokeWidth < 0.5 ? 0.5 : l.strokeWidth,
|
|
911
|
+
cx: F.value.x,
|
|
912
|
+
cy: te(l, o),
|
|
913
|
+
r: ee(l),
|
|
914
|
+
fill: `url(#pattern_${C.value}_${l.absoluteIndex})`
|
|
915
|
+
}, null, 14, Yl)) : k("", !0),
|
|
916
|
+
m("circle", {
|
|
917
|
+
stroke: "none",
|
|
918
|
+
cx: F.value.x,
|
|
919
|
+
cy: te(l, o),
|
|
920
|
+
r: ee(l),
|
|
921
|
+
fill: "transparent",
|
|
922
|
+
onMouseenter: (n) => $e(l, o, "pointer"),
|
|
923
|
+
onMouseleave: (n) => et(l, o),
|
|
924
|
+
onClick: (n) => ke(l, o)
|
|
925
|
+
}, null, 40, ql),
|
|
926
|
+
f.value.showLabels ? (i(), y(ve, { key: 1 }, [
|
|
927
|
+
m("rect", {
|
|
928
|
+
x: e.value.style.chart.layout.labels.dataLabels.markers.position === "left" ? S(l, o).x : F.value.x,
|
|
929
|
+
y: S(l, o).y - e.value.style.chart.layout.labels.dataLabels.markers.strokeWidth / 2,
|
|
930
|
+
width: Math.abs(F.value.x - S(l, o).x),
|
|
931
|
+
height: e.value.style.chart.layout.labels.dataLabels.markers.strokeWidth,
|
|
932
|
+
fill: e.value.style.chart.layout.labels.dataLabels.markers.stroke,
|
|
933
|
+
rx: e.value.style.chart.layout.labels.dataLabels.markers.strokeWidth,
|
|
934
|
+
class: B({
|
|
935
|
+
"vue-ui-rings-item": T.value && e.value.useCssAnimation,
|
|
936
|
+
"vue-rings-item-onload": !T.value && e.value.useCssAnimation && !u(A),
|
|
937
|
+
"vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
|
|
938
|
+
"vue-ui-rings-blur": b.value !== null && b.value !== o
|
|
939
|
+
})
|
|
940
|
+
}, null, 10, Zl),
|
|
941
|
+
m("circle", {
|
|
942
|
+
cx: S(l, o).x,
|
|
943
|
+
cy: S(l, o).y,
|
|
944
|
+
r: e.value.style.chart.layout.labels.dataLabels.markers.radius,
|
|
945
|
+
fill: l.color,
|
|
946
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
947
|
+
class: B({
|
|
948
|
+
"vue-ui-rings-item": T.value && e.value.useCssAnimation,
|
|
949
|
+
"vue-rings-item-onload": !T.value && e.value.useCssAnimation && !u(A),
|
|
950
|
+
"vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
|
|
951
|
+
"vue-ui-rings-blur": b.value !== null && b.value !== o
|
|
952
|
+
})
|
|
953
|
+
}, null, 10, Jl),
|
|
954
|
+
m("text", {
|
|
955
|
+
x: S(l, o).x + (e.value.style.chart.layout.labels.dataLabels.markers.position === "left" ? -e.value.style.chart.layout.labels.dataLabels.offsetX : e.value.style.chart.layout.labels.dataLabels.offsetX),
|
|
956
|
+
y: S(l, o).y + e.value.style.chart.layout.labels.dataLabels.fontSize / 3,
|
|
957
|
+
"text-anchor": e.value.style.chart.layout.labels.dataLabels.markers.position === "left" ? "end" : "start",
|
|
958
|
+
"font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
959
|
+
fill: e.value.style.chart.layout.labels.dataLabels.color,
|
|
960
|
+
"font-weight": e.value.style.chart.layout.labels.dataLabels.bold ? "bold" : "normal",
|
|
961
|
+
class: B({
|
|
962
|
+
"vue-ui-rings-item": T.value && e.value.useCssAnimation,
|
|
963
|
+
"vue-rings-item-onload": !T.value && e.value.useCssAnimation && !u(A),
|
|
964
|
+
"vue-ui-rings-shadow": e.value.style.chart.layout.rings.useShadow,
|
|
965
|
+
"vue-ui-rings-blur": b.value !== null && b.value !== o
|
|
966
|
+
}),
|
|
967
|
+
onMouseenter: (n) => $e(l, o, "pointer"),
|
|
968
|
+
onMouseleave: (n) => et(l, o),
|
|
969
|
+
onClick: (n) => ke(l, o),
|
|
970
|
+
innerHTML: u(dl)({
|
|
971
|
+
content: Vt(l),
|
|
972
|
+
fontSize: e.value.style.chart.layout.labels.dataLabels.fontSize,
|
|
973
|
+
fill: e.value.style.chart.layout.labels.dataLabels.color,
|
|
974
|
+
x: S(l, o).x + (e.value.style.chart.layout.labels.dataLabels.markers.position === "left" ? -e.value.style.chart.layout.labels.dataLabels.offsetX - 6 - e.value.style.chart.layout.labels.dataLabels.markers.radius : e.value.style.chart.layout.labels.dataLabels.offsetX + 6 + e.value.style.chart.layout.labels.dataLabels.markers.radius),
|
|
975
|
+
y: S(l, o).y + e.value.style.chart.layout.labels.dataLabels.fontSize / 3,
|
|
976
|
+
translateY: !0
|
|
977
|
+
})
|
|
978
|
+
}, null, 42, Ql)
|
|
979
|
+
], 64)) : k("", !0)
|
|
980
|
+
]))), 256)),
|
|
981
|
+
c(t.$slots, "svg", {
|
|
982
|
+
svg: {
|
|
983
|
+
...h.value,
|
|
984
|
+
isPrintingImg: u(be) | u(me) | oe.value,
|
|
985
|
+
isPrintingSvg: se.value
|
|
986
|
+
}
|
|
987
|
+
}, void 0, !0)
|
|
988
|
+
], 46, El)),
|
|
989
|
+
t.$slots.hint ? (i(), y("div", ea, [
|
|
990
|
+
c(t.$slots, "hint", L(x({ hint: e.value.a11y.translations.keyboardNavigation, isVisible: ge.value })), void 0, !0)
|
|
991
|
+
])) : k("", !0)
|
|
992
|
+
]),
|
|
993
|
+
t.$slots.watermark ? (i(), y("div", ta, [
|
|
994
|
+
c(t.$slots, "watermark", L(x({ isPrinting: u(be) || u(me) || oe.value || se.value })), void 0, !0)
|
|
995
|
+
])) : k("", !0),
|
|
996
|
+
m("div", {
|
|
997
|
+
id: `legend-bottom-${C.value}`
|
|
998
|
+
}, null, 8, la),
|
|
999
|
+
Ee.value ? (i(), P(al, {
|
|
1000
|
+
key: 6,
|
|
1001
|
+
to: e.value.style.chart.legend.position === "top" ? `#legend-top-${C.value}` : `#legend-bottom-${C.value}`
|
|
1002
|
+
}, [
|
|
1003
|
+
m("div", {
|
|
1004
|
+
ref_key: "chartLegend",
|
|
1005
|
+
ref: Ne
|
|
1006
|
+
}, [
|
|
1007
|
+
e.value.style.chart.legend.show ? (i(), P(Il, {
|
|
1008
|
+
key: `legend_${Ve.value}`,
|
|
1009
|
+
legendSet: Q.value,
|
|
1010
|
+
config: Bt.value,
|
|
1011
|
+
isCursorPointer: V.value,
|
|
1012
|
+
onClickMarker: a[0] || (a[0] = ({ legend: l }) => J(l.uid))
|
|
1013
|
+
}, Ae({
|
|
1014
|
+
item: v(({ legend: l, index: o }) => [
|
|
1015
|
+
u(A) ? k("", !0) : (i(), y("div", {
|
|
1016
|
+
key: 0,
|
|
1017
|
+
onClick: (n) => J(l.uid),
|
|
1018
|
+
style: z(`opacity:${p.value.includes(l.uid) ? 0.5 : 1}`)
|
|
1019
|
+
}, re(l.display), 13, aa))
|
|
1020
|
+
]),
|
|
1021
|
+
legendToggle: v(() => [
|
|
1022
|
+
Q.value.length > 2 && e.value.style.chart.legend.selectAllToggle.show && !u(A) ? (i(), P(Nl, {
|
|
1023
|
+
key: 0,
|
|
1024
|
+
backgroundColor: e.value.style.chart.legend.selectAllToggle.backgroundColor,
|
|
1025
|
+
color: e.value.style.chart.legend.selectAllToggle.color,
|
|
1026
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
1027
|
+
checked: p.value.length > 0,
|
|
1028
|
+
isCursorPointer: V.value,
|
|
1029
|
+
onToggle: Dt
|
|
1030
|
+
}, null, 8, ["backgroundColor", "color", "fontSize", "checked", "isCursorPointer"])) : k("", !0)
|
|
1031
|
+
]),
|
|
1032
|
+
_: 2
|
|
1033
|
+
}, [
|
|
1034
|
+
t.$slots.pattern ? {
|
|
1035
|
+
name: "legend-pattern",
|
|
1036
|
+
fn: v(({ legend: l, index: o }) => [
|
|
1037
|
+
ie(_l, {
|
|
1038
|
+
shape: l.shape,
|
|
1039
|
+
radius: 30,
|
|
1040
|
+
stroke: "none",
|
|
1041
|
+
plot: { x: 30, y: 30 },
|
|
1042
|
+
fill: `url(#pattern_${C.value}_${o})`
|
|
1043
|
+
}, null, 8, ["shape", "fill"])
|
|
1044
|
+
]),
|
|
1045
|
+
key: "0"
|
|
1046
|
+
} : void 0
|
|
1047
|
+
]), 1032, ["legendSet", "config", "isCursorPointer"])) : c(t.$slots, "legend", {
|
|
1048
|
+
key: 1,
|
|
1049
|
+
legend: Q.value
|
|
1050
|
+
}, void 0, !0)
|
|
1051
|
+
], 512)
|
|
1052
|
+
], 8, ["to"])) : k("", !0),
|
|
1053
|
+
t.$slots.source ? (i(), y("div", {
|
|
1054
|
+
key: 7,
|
|
1055
|
+
ref_key: "source",
|
|
1056
|
+
ref: Re,
|
|
1057
|
+
dir: "auto"
|
|
1058
|
+
}, [
|
|
1059
|
+
c(t.$slots, "source", {}, void 0, !0)
|
|
1060
|
+
], 512)) : k("", !0),
|
|
1061
|
+
ie(u(mt), {
|
|
1062
|
+
teleportTo: e.value.style.chart.tooltip.teleportTo,
|
|
1063
|
+
show: f.value.showTooltip && G.value && p.value.length < w.dataset.length,
|
|
1064
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
1065
|
+
color: e.value.style.chart.tooltip.color,
|
|
1066
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
1067
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
1068
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
1069
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
1070
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
1071
|
+
position: e.value.style.chart.tooltip.position,
|
|
1072
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
1073
|
+
parent: _.value,
|
|
1074
|
+
content: ce.value,
|
|
1075
|
+
isFullscreen: H.value,
|
|
1076
|
+
isCustom: e.value.style.chart.tooltip.customFormat && typeof e.value.style.chart.tooltip.customFormat == "function",
|
|
1077
|
+
smooth: e.value.style.chart.tooltip.smooth,
|
|
1078
|
+
backdropFilter: e.value.style.chart.tooltip.backdropFilter,
|
|
1079
|
+
smoothForce: e.value.style.chart.tooltip.smoothForce,
|
|
1080
|
+
smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold,
|
|
1081
|
+
isA11yMode: Z.value === "keyboard",
|
|
1082
|
+
a11yPosition: Ue.value
|
|
1083
|
+
}, {
|
|
1084
|
+
"tooltip-before": v(() => [
|
|
1085
|
+
c(t.$slots, "tooltip-before", L(x({ ...we.value })), void 0, !0)
|
|
1086
|
+
]),
|
|
1087
|
+
"tooltip-after": v(() => [
|
|
1088
|
+
c(t.$slots, "tooltip-after", L(x({ ...we.value })), void 0, !0)
|
|
1089
|
+
]),
|
|
1090
|
+
_: 3
|
|
1091
|
+
}, 8, ["teleportTo", "show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold", "isA11yMode", "a11yPosition"]),
|
|
1092
|
+
Fe.value && e.value.userOptions.buttons.table ? (i(), P(ol(ae.value.component), it({ key: 8 }, ae.value.props, {
|
|
1093
|
+
ref_key: "tableUnit",
|
|
1094
|
+
ref: q,
|
|
1095
|
+
onClose: st
|
|
1096
|
+
}), Ae({
|
|
1097
|
+
content: v(() => [
|
|
1098
|
+
(i(), P(u(wt), {
|
|
1099
|
+
key: `table_${Me.value}`,
|
|
1100
|
+
colNames: j.value.colNames,
|
|
1101
|
+
head: j.value.head,
|
|
1102
|
+
body: j.value.body,
|
|
1103
|
+
config: j.value.config,
|
|
1104
|
+
title: e.value.table.useDialog ? "" : ae.value.title,
|
|
1105
|
+
withCloseButton: !e.value.table.useDialog,
|
|
1106
|
+
isCursorPointer: V.value,
|
|
1107
|
+
onClose: st
|
|
1108
|
+
}, {
|
|
1109
|
+
th: v(({ th: l }) => [
|
|
1110
|
+
m("div", {
|
|
1111
|
+
innerHTML: l,
|
|
1112
|
+
style: { display: "flex", "align-items": "center" }
|
|
1113
|
+
}, null, 8, oa)
|
|
1114
|
+
]),
|
|
1115
|
+
td: v(({ td: l }) => [
|
|
1116
|
+
vt(re(l.name || l), 1)
|
|
1117
|
+
]),
|
|
1118
|
+
_: 1
|
|
1119
|
+
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer"]))
|
|
1120
|
+
]),
|
|
1121
|
+
_: 2
|
|
1122
|
+
}, [
|
|
1123
|
+
e.value.table.useDialog ? {
|
|
1124
|
+
name: "title",
|
|
1125
|
+
fn: v(() => [
|
|
1126
|
+
vt(re(ae.value.title), 1)
|
|
1127
|
+
]),
|
|
1128
|
+
key: "0"
|
|
1129
|
+
} : void 0,
|
|
1130
|
+
e.value.table.useDialog ? {
|
|
1131
|
+
name: "actions",
|
|
1132
|
+
fn: v(() => [
|
|
1133
|
+
m("button", {
|
|
1134
|
+
tabindex: "0",
|
|
1135
|
+
class: "vue-ui-user-options-button",
|
|
1136
|
+
onClick: a[1] || (a[1] = (l) => Te(e.value.userOptions.callbacks.csv)),
|
|
1137
|
+
style: z({ cursor: V.value ? "pointer" : "default" })
|
|
1138
|
+
}, [
|
|
1139
|
+
ie(u(kt), {
|
|
1140
|
+
name: "fileCsv",
|
|
1141
|
+
stroke: ae.value.props.color
|
|
1142
|
+
}, null, 8, ["stroke"])
|
|
1143
|
+
], 4)
|
|
1144
|
+
]),
|
|
1145
|
+
key: "1"
|
|
1146
|
+
} : void 0
|
|
1147
|
+
]), 1040)) : k("", !0),
|
|
1148
|
+
c(t.$slots, "skeleton", {}, () => [
|
|
1149
|
+
u(A) ? (i(), P(Tl, { key: 0 })) : k("", !0)
|
|
1150
|
+
], !0)
|
|
1151
|
+
], 46, zl));
|
|
1152
|
+
}
|
|
1153
|
+
}, xa = /* @__PURE__ */ Rl(sa, [["__scopeId", "data-v-570d90eb"]]);
|
|
1154
|
+
export {
|
|
1155
|
+
xa as default
|
|
1156
|
+
};
|