vue-data-ui 3.4.9 → 3.5.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 +114 -37
- package/dist/{ColorPicker-J5wOPCeB.js → ColorPicker-ChuwChMo.js} +58 -56
- package/dist/{NonSvgPenAndPaper-C7TRn0_3.js → NonSvgPenAndPaper-DVgKKLIf.js} +1 -1
- package/dist/{PackageVersion-CTUqGqWV.js → PackageVersion-DQvyATVa.js} +1 -1
- package/dist/PenAndPaper-SZQIAgkg.js +388 -0
- package/dist/{Title-l36lOBMx.js → Title-isbiM8i8.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-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-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-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-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-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/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +17 -8
- package/dist/{useNestedProp-BjZe1Y85.js → useNestedProp-DjGXw6S9.js} +22 -8
- package/dist/{vue-data-ui-DjxWWa78.js → vue-data-ui-B_RxfmEm.js} +113 -107
- package/dist/vue-data-ui.js +64 -64
- package/dist/{vue-ui-3d-bar-CLE7f9pl.js → vue-ui-3d-bar-CMNYyVa2.js} +454 -434
- package/dist/{vue-ui-accordion-CZ0thhxa.js → vue-ui-accordion-CqhVCfc2.js} +1 -1
- package/dist/{vue-ui-age-pyramid-D73uIOPm.js → vue-ui-age-pyramid-Vqa9iYXE.js} +180 -160
- package/dist/{vue-ui-annotator-BylDgUVb.js → vue-ui-annotator-nNv10fBm.js} +3 -3
- package/dist/{vue-ui-bullet-Bybo0xK2.js → vue-ui-bullet-BWEBeYV5.js} +190 -170
- package/dist/{vue-ui-candlestick-D_FyMdqH.js → vue-ui-candlestick-BoLzL0g1.js} +201 -181
- package/dist/{vue-ui-carousel-table-BvMlNdVo.js → vue-ui-carousel-table-Bi6wvUUU.js} +2 -2
- package/dist/{vue-ui-chestnut-DA0g0bDV.js → vue-ui-chestnut-BGz1TLXG.js} +375 -355
- package/dist/vue-ui-chord-CebhS7ln.js +1153 -0
- package/dist/{vue-ui-circle-pack-BPDm-ro5.js → vue-ui-circle-pack-7PJVyKjp.js} +289 -269
- package/dist/{vue-ui-cursor-ik59bfC4.js → vue-ui-cursor-qYLAwvzn.js} +1 -1
- package/dist/vue-ui-dashboard-DcmMvhgM.js +432 -0
- package/dist/{vue-ui-digits-ByNNcWXi.js → vue-ui-digits-DyE8eU1m.js} +1 -1
- package/dist/vue-ui-donut-CxZcJFTo.js +1681 -0
- package/dist/{vue-ui-donut-evolution-Ca3Svr0B.js → vue-ui-donut-evolution-BVYL-BUJ.js} +480 -444
- package/dist/{vue-ui-dumbbell-CxCE2luV.js → vue-ui-dumbbell-QxZn86A3.js} +210 -190
- package/dist/{vue-ui-flow-DEvwXd4W.js → vue-ui-flow-DEI5LRch.js} +339 -319
- package/dist/{vue-ui-funnel-Bgcx7xia.js → vue-ui-funnel-B_A5orFg.js} +218 -198
- package/dist/{vue-ui-galaxy-BWr1EMob.js → vue-ui-galaxy-CUoDRr-O.js} +313 -277
- package/dist/{vue-ui-gauge-DQricvo2.js → vue-ui-gauge-46tSRZN5.js} +311 -291
- package/dist/{vue-ui-gizmo-C-fKe3io.js → vue-ui-gizmo-BOgbsXao.js} +2 -2
- package/dist/{vue-ui-heatmap-B-o_i7Hu.js → vue-ui-heatmap-DKKjl1A2.js} +303 -283
- package/dist/{vue-ui-history-plot-DzQ9DPUJ.js → vue-ui-history-plot-C6p_aThr.js} +478 -442
- package/dist/{vue-ui-kpi-BGGff8LM.js → vue-ui-kpi-B1yJ83aF.js} +2 -2
- package/dist/{vue-ui-mini-loader-CSF-7TJL.js → vue-ui-mini-loader-BudcNBg-.js} +1 -1
- package/dist/{vue-ui-molecule-I2OhrCR2.js → vue-ui-molecule-L90GnHee.js} +156 -136
- package/dist/{vue-ui-mood-radar-BAT7kZUy.js → vue-ui-mood-radar-Dhigm5rw.js} +266 -246
- package/dist/{vue-ui-nested-donuts-CjhJDAQi.js → vue-ui-nested-donuts-D0MCLs5n.js} +597 -557
- package/dist/vue-ui-onion-B7yPJ3gL.js +915 -0
- package/dist/vue-ui-parallel-coordinate-plot-DY21ivNe.js +1051 -0
- package/dist/{vue-ui-quadrant-DGnasrCR.js → vue-ui-quadrant-b0vMRaq-.js} +532 -495
- package/dist/{vue-ui-quick-chart-Cam_sWet.js → vue-ui-quick-chart-VK2EN7sh.js} +288 -268
- package/dist/{vue-ui-radar-DNI9WI2R.js → vue-ui-radar-B5Vkoz9M.js} +412 -373
- package/dist/{vue-ui-rating-CiMoFM_c.js → vue-ui-rating-BH4DW1ZY.js} +1 -1
- package/dist/{vue-ui-relation-circle-Dj1jhcsl.js → vue-ui-relation-circle-XHbE-ZUX.js} +228 -208
- package/dist/{vue-ui-ridgeline-adIls6bj.js → vue-ui-ridgeline-CAMNq-p_.js} +517 -481
- package/dist/vue-ui-rings-ImGOqm_J.js +855 -0
- package/dist/vue-ui-scatter-CterNJYe.js +1590 -0
- package/dist/{vue-ui-skeleton-DUdI2uOO.js → vue-ui-skeleton-CykXHWj-.js} +2 -2
- package/dist/{vue-ui-smiley-sGFRbn31.js → vue-ui-smiley-DnGm6qrK.js} +1 -1
- package/dist/{vue-ui-spark-trend-DxpRfUJz.js → vue-ui-spark-trend-N1AsNQJA.js} +2 -2
- package/dist/{vue-ui-sparkbar-B44oER5n.js → vue-ui-sparkbar-Bvsi5DTT.js} +2 -2
- package/dist/{vue-ui-sparkgauge-ix12NZ7M.js → vue-ui-sparkgauge-DyJmWCWT.js} +2 -2
- package/dist/{vue-ui-sparkhistogram-Cs-QDYBR.js → vue-ui-sparkhistogram-5eKrkmSb.js} +143 -140
- package/dist/{vue-ui-sparkline-Cb8ZmyUq.js → vue-ui-sparkline-ChKAzlVq.js} +2 -2
- package/dist/vue-ui-sparkstackbar-BXNy6nuw.js +441 -0
- package/dist/vue-ui-stackbar-1IwvUYBO.js +1827 -0
- package/dist/{vue-ui-strip-plot-BjG-Jxnb.js → vue-ui-strip-plot-B1wGxP8-.js} +245 -225
- package/dist/{vue-ui-table-DdBdLrAL.js → vue-ui-table-DSsIrT4L.js} +3 -3
- package/dist/{vue-ui-table-heatmap-BqCEBoUf.js → vue-ui-table-heatmap-DXFHy7-E.js} +1 -1
- package/dist/{vue-ui-table-sparkline-EpCo2Be5.js → vue-ui-table-sparkline-DpqY_4ay.js} +2 -2
- package/dist/vue-ui-thermometer-CMKvSA8p.js +584 -0
- package/dist/{vue-ui-timer-Br3wp8hG.js → vue-ui-timer-BpdCY_wg.js} +3 -3
- package/dist/vue-ui-tiremarks-CNipzVli.js +450 -0
- package/dist/vue-ui-treemap-DPE8SY0_.js +1330 -0
- package/dist/{vue-ui-vertical-bar-yfbEfLqy.js → vue-ui-vertical-bar-ZU1GCbX0.js} +484 -448
- package/dist/{vue-ui-waffle-m-9sqQik.js → vue-ui-waffle-z7nuSuSV.js} +398 -362
- package/dist/vue-ui-wheel-DLRoRjeM.js +663 -0
- package/dist/{vue-ui-word-cloud-vNwswYZD.js → vue-ui-word-cloud-D2r5E3pP.js} +248 -228
- package/dist/{vue-ui-world-BsCNyZy_.js → vue-ui-world-goXYnTyM.js} +287 -267
- package/dist/{vue-ui-xy-CIrw1lWQ.js → vue-ui-xy-NDDbNbds.js} +1263 -1227
- package/dist/{vue-ui-xy-canvas-DXnLFwW3.js → vue-ui-xy-canvas-2a6NlQe3.js} +338 -322
- package/package.json +4 -4
- package/dist/PenAndPaper-DSvu9dwa.js +0 -373
- package/dist/vue-ui-chord-CDgzolI-.js +0 -1133
- package/dist/vue-ui-dashboard-CeJwbiON.js +0 -412
- package/dist/vue-ui-donut-DjQXHBJE.js +0 -1645
- package/dist/vue-ui-onion-DTY2p87s.js +0 -873
- package/dist/vue-ui-parallel-coordinate-plot-C8aWTcNn.js +0 -1014
- package/dist/vue-ui-rings-CnTMFK6R.js +0 -813
- package/dist/vue-ui-scatter-fzR2c0St.js +0 -1554
- package/dist/vue-ui-sparkstackbar-BiRZ51OU.js +0 -424
- package/dist/vue-ui-stackbar-DubS6Pg8.js +0 -1708
- package/dist/vue-ui-thermometer-DTnfnf9z.js +0 -564
- package/dist/vue-ui-tiremarks-CrC_tlIx.js +0 -430
- package/dist/vue-ui-treemap-kyuyi2ES.js +0 -1294
- package/dist/vue-ui-wheel-BasM7FWt.js +0 -643
|
@@ -0,0 +1,1681 @@
|
|
|
1
|
+
import { defineAsyncComponent as le, useSlots as _l, computed as f, shallowRef as Q, ref as p, onMounted as Tt, onBeforeUnmount as Pt, toRefs as Cl, watch as ye, createElementBlock as r, openBlock as s, normalizeStyle as C, normalizeClass as We, createBlock as ae, createCommentVNode as v, renderSlot as y, createElementVNode as h, createVNode as Te, unref as u, withCtx as b, normalizeProps as N, guardReactiveProps as Y, createSlots as qe, Fragment as k, renderList as I, mergeProps as He, toDisplayString as U, withDirectives as Ft, createTextVNode as Pe, vShow as It, Teleport as Al, resolveDynamicComponent as Sl, nextTick as Tl } from "vue";
|
|
2
|
+
import { o as Lt, f as je, g as Pl, c as Fl, t as Il, e as Ll, x as Ml, h as Mt, p as ie, a as W, d as X, T as zt, Z as zl, X as Ol, s as Fe, i as Dl, V as Nl, _ as P, W as ge, Y as $, $ as Ot, l as Yl, b as Xl, O as Qe, P as Bl, Q as Vl, G as El, a0 as Dt } from "./lib-C_mNZmhD.js";
|
|
3
|
+
import { t as Rl, u as Gl } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as Ul, a as Nt } from "./useNestedProp-DjGXw6S9.js";
|
|
5
|
+
import { u as Wl } from "./usePrinter-DTzqpYKF.js";
|
|
6
|
+
import { u as ql, B as Hl } from "./BaseScanner-BgWxam9d.js";
|
|
7
|
+
import { u as jl } from "./useSvgExport-DrjCWun4.js";
|
|
8
|
+
import { u as Ql } from "./useUserOptionState-BIvW1Kz7.js";
|
|
9
|
+
import { u as Zl } from "./useChartAccessibility-9icAAmYg.js";
|
|
10
|
+
import Jl from "./img-BecE5qXd.js";
|
|
11
|
+
import { _ as Kl } from "./Shape-CNXKB8O0.js";
|
|
12
|
+
import ea from "./Title-isbiM8i8.js";
|
|
13
|
+
import { t as ta } from "./themes-AUNCOb2G.js";
|
|
14
|
+
import la from "./Legend-G6GMcdAc.js";
|
|
15
|
+
import { _ as aa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
|
+
const oa = ["id"], na = ["id"], sa = ["xmlns", "viewBox"], ua = ["width", "height"], ra = { key: 1 }, ia = ["id"], va = ["stop-color"], da = ["offset", "stop-color"], ca = ["offset", "stop-color"], ha = ["stop-color"], fa = { key: 2 }, ya = ["id", "cx", "cy"], ga = ["stop-color", "stop-opacity"], pa = ["stop-color"], ma = ["id"], ba = ["id"], wa = ["id"], ka = ["flood-color"], xa = ["id"], $a = ["flood-color"], _a = ["d", "stroke", "filter"], Ca = ["d", "stroke", "filter"], Aa = ["cx", "cy", "r", "fill", "filter"], Sa = { key: 6 }, Ta = ["stroke", "d"], Pa = ["d", "fill", "stroke", "stroke-width", "filter"], Fa = { key: 0 }, Ia = ["d", "fill", "stroke", "stroke-width", "filter"], La = { key: 0 }, Ma = ["stroke", "d"], za = { key: 0 }, Oa = ["d", "stroke", "stroke-width", "filter"], Da = { key: 1 }, Na = ["d", "fill", "stroke", "stroke-width", "filter"], Ya = ["d", "fill", "stroke", "stroke-width", "filter"], Xa = { key: 1 }, Ba = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Va = ["cx", "cy", "r", "fill", "stroke", "stroke-width"], Ea = { key: 0 }, Ra = ["d", "fill", "stroke", "stroke-width"], Ga = ["cx", "cy", "r", "stroke"], Ua = ["cx", "cy", "r", "fill"], Wa = ["cx", "cy", "r"], qa = { key: 0 }, Ha = ["d", "stroke", "fill", "onMouseenter", "onMouseleave", "onClick"], ja = { key: 1 }, Qa = ["cx", "cy", "r"], Za = ["x", "y", "fill", "font-size"], Ja = ["x", "y", "fill", "font-size"], Ka = ["x", "y", "fill", "font-size"], eo = ["x", "y", "fill", "font-size"], to = ["filter"], lo = { key: 0 }, ao = ["x", "y"], oo = { key: 1 }, no = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], so = ["cx", "cy", "fill", "stroke", "filter", "onClick", "onMouseenter", "onMouseleave"], uo = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], ro = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "innerHTML"], io = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "onMouseenter", "onMouseleave"], vo = ["text-anchor", "x", "y", "fill", "font-size", "onClick", "innerHTML"], co = { key: 2 }, ho = ["x", "y", "width"], fo = ["x", "y", "width"], yo = {
|
|
17
|
+
key: 4,
|
|
18
|
+
class: "vue-data-ui-watermark"
|
|
19
|
+
}, go = ["id"], po = ["onClick"], mo = {
|
|
20
|
+
key: 7,
|
|
21
|
+
class: "vue-ui-donut-hollow"
|
|
22
|
+
}, bo = ["innerHTML"], wo = {
|
|
23
|
+
__name: "vue-ui-donut",
|
|
24
|
+
props: {
|
|
25
|
+
config: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default() {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
dataset: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default() {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
emits: ["selectLegend", "selectDatapoint"],
|
|
39
|
+
setup(Ze, { expose: Yt, emit: Xt }) {
|
|
40
|
+
const Bt = le(() => import("./Tooltip-oWCO1HKy.js")), Vt = le(() => import("./BaseIcon-BmMbm4d0.js")), Et = le(() => import("./vue-ui-accordion-CqhVCfc2.js")), Rt = le(() => import("./DataTable-BT7VF2ua.js")), Gt = le(() => import("./PenAndPaper-SZQIAgkg.js")), Ut = le(() => import("./UserOptions-CGnQt6Fd.js")), Wt = le(() => import("./PackageVersion-DQvyATVa.js")), qt = le(() => import("./BaseDraggableDialog-ymf2sfB8.js")), { vue_ui_donut: Ht } = Ul(), jt = _l(), x = Ze, we = f({
|
|
41
|
+
get() {
|
|
42
|
+
return !!x.dataset && x.dataset.length;
|
|
43
|
+
},
|
|
44
|
+
set(t) {
|
|
45
|
+
return t;
|
|
46
|
+
}
|
|
47
|
+
}), B = Q(null), ke = p(null), Qt = p(null), Zt = p(null), Je = Q(null), Ke = Q(null), Z = Q(null), ve = Q(null), et = Q(null), tt = Q(null), lt = p(0), at = p(0), ot = p(0), nt = p(!1), pe = p(null), Ie = p(null), xe = f({
|
|
48
|
+
get: () => e.value.style.chart.layout.labels.percentage.fontSize,
|
|
49
|
+
set: (t) => t
|
|
50
|
+
}), J = f({
|
|
51
|
+
get: () => e.value.style.chart.layout.labels.name.fontSize,
|
|
52
|
+
set: (t) => t
|
|
53
|
+
});
|
|
54
|
+
let Le = !1;
|
|
55
|
+
const q = () => {
|
|
56
|
+
!e.value.autoSize || Le || (Le = !0, requestAnimationFrame(() => {
|
|
57
|
+
Le = !1;
|
|
58
|
+
const t = e.value, a = ke.value, l = oe.value;
|
|
59
|
+
if (!t.autoSize || !a || !l) return;
|
|
60
|
+
const [o, i, c, w] = l.getAttribute("viewBox").split(" ").map(Number), A = { x: o, y: i, width: c, height: w }, O = [
|
|
61
|
+
{
|
|
62
|
+
selector: ".vue-data-ui-datalabel-value",
|
|
63
|
+
baseSize: t.style.chart.layout.labels.percentage.fontSize,
|
|
64
|
+
minSize: t.style.chart.layout.labels.percentage.minFontSize,
|
|
65
|
+
sizeRef: xe
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
selector: ".vue-data-ui-datalabel-name",
|
|
69
|
+
baseSize: t.style.chart.layout.labels.name.fontSize,
|
|
70
|
+
minSize: t.style.chart.layout.labels.name.minFontSize,
|
|
71
|
+
sizeRef: J
|
|
72
|
+
}
|
|
73
|
+
];
|
|
74
|
+
O.map((G) => a.querySelectorAll(G.selector).length).reduce((G, te) => G + te, 0) !== 0 && O.forEach(({ selector: G, baseSize: te, minSize: Ue, sizeRef: kl }) => {
|
|
75
|
+
a.querySelectorAll(G).forEach((xl) => {
|
|
76
|
+
const $l = Yl({
|
|
77
|
+
el: xl,
|
|
78
|
+
bounds: A,
|
|
79
|
+
currentFontSize: te,
|
|
80
|
+
minFontSize: Ue,
|
|
81
|
+
attempts: 200,
|
|
82
|
+
padding: 1
|
|
83
|
+
});
|
|
84
|
+
kl.value = $l;
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
}));
|
|
88
|
+
};
|
|
89
|
+
Tt(async () => {
|
|
90
|
+
nt.value = !0, st(), requestAnimationFrame(q);
|
|
91
|
+
});
|
|
92
|
+
let Me;
|
|
93
|
+
Tt(() => {
|
|
94
|
+
B.value && (Me = new ResizeObserver((t) => {
|
|
95
|
+
for (const a of t) {
|
|
96
|
+
const { width: l, height: o } = a.contentRect;
|
|
97
|
+
if (l > 0 && o > 0) {
|
|
98
|
+
q();
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}), Me.observe(B.value.parentElement));
|
|
103
|
+
}), Pt(() => {
|
|
104
|
+
Me?.disconnect();
|
|
105
|
+
}), Pt(() => {
|
|
106
|
+
Z.value && (ve.value && Z.value.unobserve(ve.value), Z.value.disconnect());
|
|
107
|
+
});
|
|
108
|
+
const ze = f(() => !!e.value.debug);
|
|
109
|
+
function st() {
|
|
110
|
+
if (Lt(x.dataset) ? (je({
|
|
111
|
+
componentName: "VueUiDonut",
|
|
112
|
+
type: "dataset",
|
|
113
|
+
debug: ze.value
|
|
114
|
+
}), we.value = !1, _e.value = !0) : (x.dataset.forEach((t, a) => {
|
|
115
|
+
Pl({
|
|
116
|
+
datasetObject: t,
|
|
117
|
+
requiredAttributes: ["name", "values"]
|
|
118
|
+
}).forEach((l) => {
|
|
119
|
+
je({
|
|
120
|
+
componentName: "VueUiDonut",
|
|
121
|
+
type: "datasetSerieAttribute",
|
|
122
|
+
property: l,
|
|
123
|
+
index: a,
|
|
124
|
+
debug: ze.value
|
|
125
|
+
}), we.value = !1, _e.value = !0;
|
|
126
|
+
});
|
|
127
|
+
}), x.dataset.forEach((t, a) => {
|
|
128
|
+
(!t.name || t.name === "") && je({
|
|
129
|
+
componentName: "VueUiDonut",
|
|
130
|
+
type: "datasetAttributeEmpty",
|
|
131
|
+
property: "name",
|
|
132
|
+
index: a,
|
|
133
|
+
debug: ze.value
|
|
134
|
+
});
|
|
135
|
+
})), Lt(x.dataset) || (_e.value = e.value.loading), e.value.responsive) {
|
|
136
|
+
const t = Rl(() => {
|
|
137
|
+
const { width: a, height: l } = Gl({
|
|
138
|
+
chart: B.value,
|
|
139
|
+
title: e.value.style.chart.title.text ? Je.value : null,
|
|
140
|
+
legend: e.value.style.chart.legend.show ? Ke.value : null,
|
|
141
|
+
source: et.value,
|
|
142
|
+
noTitle: tt.value,
|
|
143
|
+
padding: e.value.autoSize ? void 0 : dt.value
|
|
144
|
+
});
|
|
145
|
+
requestAnimationFrame(() => {
|
|
146
|
+
n.value.width = a, n.value.height = l, q();
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
Z.value && (ve.value && Z.value.unobserve(ve.value), Z.value.disconnect()), Z.value = new ResizeObserver(t), ve.value = B.value.parentNode, Z.value.observe(ve.value);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
const g = p(Fl());
|
|
153
|
+
p(null);
|
|
154
|
+
const Oe = p(!1), De = p(""), V = p(null), ut = p(0);
|
|
155
|
+
function Ne() {
|
|
156
|
+
const t = Nt({
|
|
157
|
+
userConfig: x.config,
|
|
158
|
+
defaultConfig: Ht
|
|
159
|
+
});
|
|
160
|
+
let a = {};
|
|
161
|
+
return t.theme ? a = {
|
|
162
|
+
...Nt({
|
|
163
|
+
userConfig: ta.vue_ui_donut[t.theme] || x.config,
|
|
164
|
+
defaultConfig: t
|
|
165
|
+
}),
|
|
166
|
+
customPalette: Xl[t.theme] || ie
|
|
167
|
+
} : a = t, x.config && Qe(x.config, "events.datapointEnter") ? a.events.datapointEnter = x.config.events.datapointEnter : a.events.datapointEnter = null, x.config && Qe(x.config, "events.datapointLeave") ? a.events.datapointLeave = x.config.events.datapointLeave : a.events.datapointLeave = null, x.config && Qe(x.config, "events.datapointClick") ? a.events.datapointClick = x.config.events.datapointClick : a.events.datapointClick = null, a;
|
|
168
|
+
}
|
|
169
|
+
const e = p(Ne()), { loading: $e, FINAL_DATASET: de, manualLoading: _e, skeletonDataset: Jt } = ql({
|
|
170
|
+
...Cl(x),
|
|
171
|
+
FINAL_CONFIG: e,
|
|
172
|
+
prepareConfig: Ne,
|
|
173
|
+
skeletonDataset: [
|
|
174
|
+
{
|
|
175
|
+
name: "",
|
|
176
|
+
values: [3],
|
|
177
|
+
color: "#BABABA"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: "",
|
|
181
|
+
values: [2],
|
|
182
|
+
color: "#AAAAAA"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: "",
|
|
186
|
+
values: [1],
|
|
187
|
+
color: "#CACACA"
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
skeletonConfig: Il({
|
|
191
|
+
defaultConfig: e.value,
|
|
192
|
+
userConfig: {
|
|
193
|
+
useCssAnimation: !1,
|
|
194
|
+
table: { show: !1 },
|
|
195
|
+
startAnimation: {
|
|
196
|
+
show: !1
|
|
197
|
+
},
|
|
198
|
+
userOptions: { show: !1 },
|
|
199
|
+
style: {
|
|
200
|
+
chart: {
|
|
201
|
+
backgroundColor: "#99999930",
|
|
202
|
+
layout: {
|
|
203
|
+
labels: {
|
|
204
|
+
dataLabels: { show: !1 },
|
|
205
|
+
hollow: {
|
|
206
|
+
average: { show: !1 },
|
|
207
|
+
total: { show: !1 }
|
|
208
|
+
},
|
|
209
|
+
value: { show: !1 }
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
legend: {
|
|
213
|
+
backgroundColor: "transparent",
|
|
214
|
+
showValue: !1,
|
|
215
|
+
showPercentage: !1
|
|
216
|
+
},
|
|
217
|
+
title: {
|
|
218
|
+
color: "#1A1A1A",
|
|
219
|
+
subtitle: {
|
|
220
|
+
color: "#5A5A5A"
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
})
|
|
227
|
+
}), S = p(!0), H = Q([]);
|
|
228
|
+
function Kt(t, a = 1e3, l = 50) {
|
|
229
|
+
return new Promise((o) => {
|
|
230
|
+
const i = t.length;
|
|
231
|
+
H.value = Array(i).fill(0);
|
|
232
|
+
let c = 0;
|
|
233
|
+
t.forEach((w, A) => {
|
|
234
|
+
setTimeout(() => {
|
|
235
|
+
const O = performance.now();
|
|
236
|
+
function D(G) {
|
|
237
|
+
const te = Math.min((G - O) / a, 1), Ue = Dt(te);
|
|
238
|
+
H.value[A] = w * Ue, H.value = [...H.value], te < 1 ? (requestAnimationFrame(D), requestAnimationFrame(q)) : (H.value[A] = w, H.value = [...H.value], c += 1, c === i && o(), requestAnimationFrame(q));
|
|
239
|
+
}
|
|
240
|
+
requestAnimationFrame(D);
|
|
241
|
+
}, A * l);
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
const rt = p(!1);
|
|
246
|
+
ye(
|
|
247
|
+
() => $e.value,
|
|
248
|
+
async (t) => {
|
|
249
|
+
if (t || rt.value) return;
|
|
250
|
+
const a = de.value === Jt, l = e.value.startAnimation?.show;
|
|
251
|
+
if (!a && l) {
|
|
252
|
+
rt.value = !0;
|
|
253
|
+
const o = de.value.map(
|
|
254
|
+
(i) => i.values.reduce((c, w) => c + w, 0)
|
|
255
|
+
);
|
|
256
|
+
await Kt(
|
|
257
|
+
o,
|
|
258
|
+
e.value.startAnimation.durationMs,
|
|
259
|
+
e.value.startAnimation.staggerMs
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
S.value = !1;
|
|
263
|
+
},
|
|
264
|
+
{ immediate: !0 }
|
|
265
|
+
);
|
|
266
|
+
const { userOptionsVisible: Ye, setUserOptionsVisibility: it, keepUserOptionState: vt } = Ql({ config: e.value }), { svgRef: oe } = Zl({ config: e.value.style.chart.title });
|
|
267
|
+
function el() {
|
|
268
|
+
it(!0);
|
|
269
|
+
}
|
|
270
|
+
function tl() {
|
|
271
|
+
it(!1);
|
|
272
|
+
}
|
|
273
|
+
ye(() => x.config, (t) => {
|
|
274
|
+
$e.value || (e.value = Ne()), Ye.value = !e.value.userOptions.showOnChartHover, st(), lt.value += 1, at.value += 1, ot.value += 1, m.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, m.value.showTable = e.value.table.show, m.value.showTooltip = e.value.style.chart.tooltip.show, n.value.height = e.value.style.chart.height, n.value.width = e.value.style.chart.width;
|
|
275
|
+
}, { deep: !0 });
|
|
276
|
+
const dt = f(() => {
|
|
277
|
+
const { top: t, right: a, bottom: l, left: o } = e.value.style.chart.padding;
|
|
278
|
+
return {
|
|
279
|
+
css: `padding:${t}px ${a}px ${l}px ${o}px`,
|
|
280
|
+
top: t,
|
|
281
|
+
right: a,
|
|
282
|
+
bottom: l,
|
|
283
|
+
left: o
|
|
284
|
+
};
|
|
285
|
+
}), { isPrinting: ct, isImaging: ht, generatePdf: ft, generateImage: yt } = Wl({
|
|
286
|
+
elementId: `donut__${g.value}`,
|
|
287
|
+
fileName: e.value.style.chart.title.text || "vue-ui-donut",
|
|
288
|
+
options: e.value.userOptions.print
|
|
289
|
+
}), ll = f(() => e.value.userOptions.show && !e.value.style.chart.title.text), gt = f(() => Ll(e.value.customPalette)), m = p({
|
|
290
|
+
dataLabels: {
|
|
291
|
+
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
292
|
+
},
|
|
293
|
+
showTable: e.value.table.show,
|
|
294
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
295
|
+
});
|
|
296
|
+
ye(e, () => {
|
|
297
|
+
m.value = {
|
|
298
|
+
dataLabels: {
|
|
299
|
+
show: e.value.style.chart.layout.labels.dataLabels.show
|
|
300
|
+
},
|
|
301
|
+
showTable: e.value.table.show,
|
|
302
|
+
showTooltip: e.value.style.chart.tooltip.show
|
|
303
|
+
};
|
|
304
|
+
}, { immediate: !0 });
|
|
305
|
+
const n = p({
|
|
306
|
+
height: e.value.style.chart.height,
|
|
307
|
+
width: e.value.style.chart.width
|
|
308
|
+
}), ne = f(() => {
|
|
309
|
+
if (e.value.pie)
|
|
310
|
+
return _.value;
|
|
311
|
+
const t = e.value.style.chart.layout.donut.strokeWidth / 512, a = Math.min(n.value.width, n.value.height) * t, l = a > _.value ? _.value : a;
|
|
312
|
+
return Math.max(l, 12 * (1 + t));
|
|
313
|
+
}), pt = Xt, L = f(() => de.value.map((t, a) => ({
|
|
314
|
+
name: t.name,
|
|
315
|
+
color: Mt(t.color) || gt.value[a] || ie[a] || ie[a % ie.length],
|
|
316
|
+
value: Ml(t.values.reduce((l, o) => l + o, 0)),
|
|
317
|
+
absoluteValues: t.values,
|
|
318
|
+
comment: t.comment || "",
|
|
319
|
+
patternIndex: a,
|
|
320
|
+
seriesIndex: a,
|
|
321
|
+
ghost: !1,
|
|
322
|
+
pattern: `pattern_${g.value}_${a}`
|
|
323
|
+
})));
|
|
324
|
+
ye(() => x.dataset, (t) => {
|
|
325
|
+
Array.isArray(t) && t.length > 0 && (_e.value = !1);
|
|
326
|
+
}, { immediate: !0 });
|
|
327
|
+
const M = Q(L.value);
|
|
328
|
+
ye(() => L.value, (t) => {
|
|
329
|
+
M.value = t, requestAnimationFrame(q);
|
|
330
|
+
});
|
|
331
|
+
function al() {
|
|
332
|
+
return L.value.map((t) => ({
|
|
333
|
+
name: t.name,
|
|
334
|
+
color: t.color,
|
|
335
|
+
value: t.value
|
|
336
|
+
}));
|
|
337
|
+
}
|
|
338
|
+
const z = p([]), se = p(!1);
|
|
339
|
+
function mt({ from: t, to: a, duration: l, onUpdate: o, onDone: i, easing: c = Dt }) {
|
|
340
|
+
const w = performance.now();
|
|
341
|
+
function A(O) {
|
|
342
|
+
const D = Math.min((O - w) / l, 1), G = c(D), te = t + (a - t) * G;
|
|
343
|
+
o(te, D), D < 1 ? requestAnimationFrame(A) : (o(a, 1), i && i());
|
|
344
|
+
}
|
|
345
|
+
requestAnimationFrame(A);
|
|
346
|
+
}
|
|
347
|
+
function Ce(t) {
|
|
348
|
+
const a = L.value.find((i, c) => c === t);
|
|
349
|
+
let o = M.value.find((i, c) => c === t).value;
|
|
350
|
+
if (z.value.includes(t)) {
|
|
351
|
+
let c = function() {
|
|
352
|
+
M.value = M.value.map(
|
|
353
|
+
(A, O) => t === O ? { ...A, value: i } : A
|
|
354
|
+
);
|
|
355
|
+
}, w = function() {
|
|
356
|
+
se.value = !0, mt({
|
|
357
|
+
from: o,
|
|
358
|
+
to: i,
|
|
359
|
+
duration: e.value.serieToggleAnimation.durationMs,
|
|
360
|
+
onUpdate: (A, O) => {
|
|
361
|
+
M.value = M.value.map(
|
|
362
|
+
(D, G) => t === G ? { ...D, value: A } : D
|
|
363
|
+
), requestAnimationFrame(q);
|
|
364
|
+
},
|
|
365
|
+
onDone: () => {
|
|
366
|
+
c(), se.value = !1;
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
};
|
|
370
|
+
z.value = z.value.filter((A) => A !== t);
|
|
371
|
+
const i = a.value;
|
|
372
|
+
e.value.serieToggleAnimation.show && e.value.type === "classic" ? w() : (c(), requestAnimationFrame(q));
|
|
373
|
+
} else if (z.value.length < L.value.length - 1) {
|
|
374
|
+
let i = function() {
|
|
375
|
+
z.value.push(t), M.value = M.value.map(
|
|
376
|
+
(w, A) => t === A ? { ...w, value: 0 } : w
|
|
377
|
+
);
|
|
378
|
+
}, c = function() {
|
|
379
|
+
se.value = !0, mt({
|
|
380
|
+
from: o,
|
|
381
|
+
to: 0,
|
|
382
|
+
duration: e.value.serieToggleAnimation.durationMs,
|
|
383
|
+
onUpdate: (w, A) => {
|
|
384
|
+
M.value = M.value.map(
|
|
385
|
+
(O, D) => t === D ? { ...O, value: w } : O
|
|
386
|
+
), requestAnimationFrame(q);
|
|
387
|
+
},
|
|
388
|
+
onDone: () => {
|
|
389
|
+
i(), requestAnimationFrame(q), se.value = !1;
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
};
|
|
393
|
+
e.value.serieToggleAnimation.show && e.value.type === "classic" ? c() : i();
|
|
394
|
+
}
|
|
395
|
+
pt("selectLegend", j.value.map((i) => ({
|
|
396
|
+
name: i.name,
|
|
397
|
+
color: i.color,
|
|
398
|
+
value: i.value
|
|
399
|
+
})));
|
|
400
|
+
}
|
|
401
|
+
function bt(t) {
|
|
402
|
+
if (!L.value.length)
|
|
403
|
+
return e.value.debug && console.warn("VueUiDonut - There are no series to show."), null;
|
|
404
|
+
const a = L.value.find((l) => l.name === t);
|
|
405
|
+
return a || (e.value.debug && console.warn(`VueUiDonut - Series name not found "${t}"`), null);
|
|
406
|
+
}
|
|
407
|
+
function ol(t) {
|
|
408
|
+
const a = bt(t);
|
|
409
|
+
a !== null && z.value.includes(a.seriesIndex) && Ce(a.seriesIndex);
|
|
410
|
+
}
|
|
411
|
+
function nl(t) {
|
|
412
|
+
const a = bt(t);
|
|
413
|
+
a !== null && (z.value.includes(a.seriesIndex) || Ce(a.seriesIndex));
|
|
414
|
+
}
|
|
415
|
+
const sl = f(() => de.value.reduce((t, a) => t + a.values.reduce((l, o) => l + o, 0), 0)), j = f(() => {
|
|
416
|
+
if (S.value && !$e.value) {
|
|
417
|
+
const t = H.value.map((l, o) => ({
|
|
418
|
+
...L.value[o],
|
|
419
|
+
value: l,
|
|
420
|
+
color: L.value[o].color,
|
|
421
|
+
ghost: !1
|
|
422
|
+
})), a = sl.value - H.value.reduce((l, o) => l + o, 0);
|
|
423
|
+
return a > 0 && t.push({
|
|
424
|
+
name: "__ghost__",
|
|
425
|
+
value: a,
|
|
426
|
+
color: "transparent",
|
|
427
|
+
ghost: !0
|
|
428
|
+
}), t;
|
|
429
|
+
} else
|
|
430
|
+
return M.value.forEach((t, a) => {
|
|
431
|
+
if ([null, void 0].includes(t.values))
|
|
432
|
+
return {
|
|
433
|
+
...t,
|
|
434
|
+
values: []
|
|
435
|
+
};
|
|
436
|
+
}), M.value.map((t, a) => ({
|
|
437
|
+
...t,
|
|
438
|
+
seriesIndex: a
|
|
439
|
+
})).filter((t, a) => !z.value.includes(a));
|
|
440
|
+
}), Xe = f(() => de.value.map((t, a) => {
|
|
441
|
+
const l = (t.values || []).reduce((i, c) => i + c, 0), o = l / de.value.map((i) => (i.values || []).reduce((c, w) => c + w, 0)).reduce((i, c) => i + c, 0);
|
|
442
|
+
return {
|
|
443
|
+
name: t.name,
|
|
444
|
+
color: Mt(t.color) || gt.value[a] || ie[a] || ie[a % ie.length],
|
|
445
|
+
value: l,
|
|
446
|
+
shape: "circle",
|
|
447
|
+
patternIndex: a,
|
|
448
|
+
proportion: o
|
|
449
|
+
};
|
|
450
|
+
}).map((t, a) => ({
|
|
451
|
+
...t,
|
|
452
|
+
opacity: z.value.includes(a) ? 0.5 : 1,
|
|
453
|
+
segregate: () => !se.value && Ce(a),
|
|
454
|
+
isSegregated: z.value.includes(a),
|
|
455
|
+
display: `${t.name}${e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ": " : ""}${e.value.style.chart.legend.showValue ? W(e.value.style.chart.layout.labels.value.formatter, t.value, X({
|
|
456
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
457
|
+
v: t.value,
|
|
458
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
459
|
+
r: e.value.style.chart.legend.roundingValue
|
|
460
|
+
}), { datapoint: t, index: a }) : ""}${e.value.style.chart.legend.showPercentage ? z.value.includes(a) ? `${e.value.style.chart.legend.showValue ? "(" : ""}${cl(t.proportion * 100)}%${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? " (" : ""}${isNaN(t.value / F.value) ? "-" : W(e.value.style.chart.layout.labels.percentage.formatter, wt(t), X({
|
|
461
|
+
v: wt(t),
|
|
462
|
+
s: "%",
|
|
463
|
+
r: e.value.style.chart.legend.roundingPercentage
|
|
464
|
+
}))}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""}`
|
|
465
|
+
}))), ul = f(() => ({
|
|
466
|
+
cy: "donut-div-legend",
|
|
467
|
+
backgroundColor: e.value.style.chart.legend.backgroundColor,
|
|
468
|
+
color: e.value.style.chart.legend.color,
|
|
469
|
+
fontSize: e.value.style.chart.legend.fontSize,
|
|
470
|
+
paddingBottom: 12,
|
|
471
|
+
fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
|
|
472
|
+
})), _ = f(() => {
|
|
473
|
+
const t = e.value.style.chart.layout.donut.radiusRatio, a = Math.max(0.1, Math.min(0.50001, t)), l = Math.min(n.value.width * a, n.value.height * a);
|
|
474
|
+
return Math.max(12, l);
|
|
475
|
+
}), T = f(() => zt({ series: j.value }, n.value.width / 2, n.value.height / 2, _.value, _.value, 1.99999, 2, 1, 360, 105.25, ne.value)), rl = f(() => Math.abs(j.value.map((t) => t.value).reduce((t, a) => t + a, 0)) > 0), il = f(() => zt({
|
|
476
|
+
series: [
|
|
477
|
+
{
|
|
478
|
+
value: 1,
|
|
479
|
+
color: e.value.style.chart.layout.donut.emptyFill,
|
|
480
|
+
name: "_",
|
|
481
|
+
seriesIndex: 0,
|
|
482
|
+
patternIndex: -1,
|
|
483
|
+
ghost: !1,
|
|
484
|
+
absoluteValues: [1]
|
|
485
|
+
}
|
|
486
|
+
]
|
|
487
|
+
}, n.value.width / 2, n.value.height / 2, _.value, _.value, 1.99999, 2, 1, 360, 105.25, ne.value)), E = f(() => T.value.filter((t) => !t.ghost)), d = f(() => {
|
|
488
|
+
const t = Math.max(...j.value.map((l) => l.value)), a = j.value.map((l) => l.value / t);
|
|
489
|
+
return zl({
|
|
490
|
+
series: a,
|
|
491
|
+
center: {
|
|
492
|
+
x: n.value.width / 2,
|
|
493
|
+
y: n.value.height / 2
|
|
494
|
+
},
|
|
495
|
+
maxRadius: Math.min(n.value.width, n.value.height) / 3,
|
|
496
|
+
hasGhost: S.value
|
|
497
|
+
});
|
|
498
|
+
});
|
|
499
|
+
function ce(t) {
|
|
500
|
+
return t.x > n.value.width / 2 + 6 ? "start" : t.x < n.value.width / 2 - 6 ? "end" : "middle";
|
|
501
|
+
}
|
|
502
|
+
function vl(t) {
|
|
503
|
+
return t.middlePoint.y > n.value.height / 2 ? P({ initX: t.middlePoint.x, initY: t.middlePoint.y, offset: 100, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y : P({ initX: t.middlePoint.x, initY: t.middlePoint.y, offset: 0, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y - 100;
|
|
504
|
+
}
|
|
505
|
+
function R(t) {
|
|
506
|
+
return t.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
|
|
507
|
+
}
|
|
508
|
+
function Be(t, a) {
|
|
509
|
+
const l = t.value / dl(a);
|
|
510
|
+
return isNaN(l) ? 0 : W(
|
|
511
|
+
e.value.style.chart.layout.labels.percentage.formatter,
|
|
512
|
+
l * 100,
|
|
513
|
+
X({
|
|
514
|
+
v: l * 100,
|
|
515
|
+
s: "%",
|
|
516
|
+
r: e.value.style.chart.layout.labels.percentage.rounding
|
|
517
|
+
}),
|
|
518
|
+
{ datapoint: t }
|
|
519
|
+
);
|
|
520
|
+
}
|
|
521
|
+
function dl(t) {
|
|
522
|
+
return [...t].map((a) => a.value).reduce((a, l) => a + l, 0);
|
|
523
|
+
}
|
|
524
|
+
const F = f(() => j.value.map((t) => t.value).reduce((t, a) => t + a, 0)), Ve = f(() => F.value / j.value.length);
|
|
525
|
+
function wt(t) {
|
|
526
|
+
return se.value ? t.proportion * 100 : t.value / F.value * 100;
|
|
527
|
+
}
|
|
528
|
+
const Ee = p(null), me = p(!1);
|
|
529
|
+
function he({ datapoint: t, seriesIndex: a }) {
|
|
530
|
+
e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: a }), Oe.value = !1, V.value = null;
|
|
531
|
+
}
|
|
532
|
+
function fe({ datapoint: t, relativeIndex: a, seriesIndex: l, show: o = !1 }) {
|
|
533
|
+
e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: l }), Ee.value = { datapoint: t, seriesIndex: l, config: e.value, series: L.value }, Oe.value = o, V.value = a;
|
|
534
|
+
let i = "";
|
|
535
|
+
const c = e.value.style.chart.tooltip.customFormat;
|
|
536
|
+
if (me.value = !1, El(c))
|
|
537
|
+
try {
|
|
538
|
+
const w = c({
|
|
539
|
+
seriesIndex: l,
|
|
540
|
+
datapoint: t,
|
|
541
|
+
series: L.value,
|
|
542
|
+
config: e.value
|
|
543
|
+
});
|
|
544
|
+
typeof w == "string" && (De.value = w, me.value = !0);
|
|
545
|
+
} catch {
|
|
546
|
+
console.warn("Custom format cannot be applied."), me.value = !1;
|
|
547
|
+
}
|
|
548
|
+
if (!me.value) {
|
|
549
|
+
if (i += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${t.name}</div>`, i += `<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="${t.color}"/>${jt.pattern ? `<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${g.value}_${l})"/>` : ""}</svg>`, e.value.style.chart.tooltip.showValue && (i += `<b>${W(
|
|
550
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
551
|
+
t.value,
|
|
552
|
+
X({
|
|
553
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
554
|
+
v: t.value,
|
|
555
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
556
|
+
r: e.value.style.chart.tooltip.roundingValue
|
|
557
|
+
}),
|
|
558
|
+
{
|
|
559
|
+
datapoint: t,
|
|
560
|
+
relativeIndex: a,
|
|
561
|
+
seriesIndex: l
|
|
562
|
+
}
|
|
563
|
+
)}</b>`), e.value.style.chart.tooltip.showPercentage) {
|
|
564
|
+
const w = W(
|
|
565
|
+
e.value.style.chart.layout.labels.percentage.formatter,
|
|
566
|
+
t.proportion * 100,
|
|
567
|
+
X({
|
|
568
|
+
v: t.proportion * 100,
|
|
569
|
+
s: "%",
|
|
570
|
+
r: e.value.style.chart.tooltip.roundingPercentage
|
|
571
|
+
}),
|
|
572
|
+
{
|
|
573
|
+
datapoint: t,
|
|
574
|
+
relativeIndex: a,
|
|
575
|
+
seriesIndex: l
|
|
576
|
+
}
|
|
577
|
+
);
|
|
578
|
+
e.value.style.chart.tooltip.showValue ? i += `<span>(${w})</span></div>` : i += `<b>${w}</b></div>`;
|
|
579
|
+
}
|
|
580
|
+
e.value.style.chart.comments.showInTooltip && t.comment && (i += `<div class="vue-data-ui-tooltip-comment" style="background:${t.color}20; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${t.color}">${t.comment}</div>`), De.value = `<div>${i}</div>`;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
function ue(t) {
|
|
584
|
+
return e.value.useBlurOnHover && ![null, void 0].includes(V.value) && V.value !== t ? `url(#blur_${g.value})` : "";
|
|
585
|
+
}
|
|
586
|
+
const K = f(() => {
|
|
587
|
+
const t = j.value.map((l) => ({
|
|
588
|
+
name: l.name,
|
|
589
|
+
color: l.color
|
|
590
|
+
})), a = j.value.map((l) => l.value);
|
|
591
|
+
return { head: t, body: a };
|
|
592
|
+
});
|
|
593
|
+
function Re(t = null) {
|
|
594
|
+
Tl(() => {
|
|
595
|
+
const a = K.value.head.map((i, c) => [[
|
|
596
|
+
i.name
|
|
597
|
+
], [K.value.body[c]], [isNaN(K.value.body[c] / F.value) ? "-" : K.value.body[c] / F.value * 100]]), l = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], ["val"], ["%"]]].concat(a), o = Bl(l);
|
|
598
|
+
t ? t(o) : Vl({ csvContent: o, title: e.value.style.chart.title.text || "vue-ui-donut" });
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
const Ae = f(() => {
|
|
602
|
+
const t = [
|
|
603
|
+
' <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>',
|
|
604
|
+
X({ p: e.value.style.chart.layout.labels.dataLabels.prefix, v: F.value, s: e.value.style.chart.layout.labels.dataLabels.suffix, r: e.value.table.td.roundingValue }),
|
|
605
|
+
"100%"
|
|
606
|
+
], a = K.value.head.map((i, c) => [
|
|
607
|
+
{
|
|
608
|
+
color: i.color,
|
|
609
|
+
name: i.name || "-"
|
|
610
|
+
},
|
|
611
|
+
K.value.body[c],
|
|
612
|
+
isNaN(K.value.body[c] / F.value) ? "-" : (K.value.body[c] / F.value * 100).toFixed(e.value.table.td.roundingPercentage) + "%"
|
|
613
|
+
]), l = {
|
|
614
|
+
th: {
|
|
615
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
616
|
+
color: e.value.table.th.color,
|
|
617
|
+
outline: e.value.table.th.outline
|
|
618
|
+
},
|
|
619
|
+
td: {
|
|
620
|
+
backgroundColor: e.value.table.td.backgroundColor,
|
|
621
|
+
color: e.value.table.td.color,
|
|
622
|
+
outline: e.value.table.td.outline
|
|
623
|
+
},
|
|
624
|
+
breakpoint: e.value.table.responsiveBreakpoint
|
|
625
|
+
};
|
|
626
|
+
return {
|
|
627
|
+
colNames: [
|
|
628
|
+
e.value.table.columnNames.series,
|
|
629
|
+
e.value.table.columnNames.value,
|
|
630
|
+
e.value.table.columnNames.percentage
|
|
631
|
+
],
|
|
632
|
+
head: t,
|
|
633
|
+
body: a,
|
|
634
|
+
config: l
|
|
635
|
+
};
|
|
636
|
+
}), re = p(!1);
|
|
637
|
+
function kt(t) {
|
|
638
|
+
re.value = t, ut.value += 1;
|
|
639
|
+
}
|
|
640
|
+
const xt = f(() => /^((?!chrome|android).)*safari/i.test(navigator.userAgent));
|
|
641
|
+
function cl(t) {
|
|
642
|
+
return t.toFixed(e.value.style.chart.legend.roundingPercentage).split("").map((a) => "-").join("");
|
|
643
|
+
}
|
|
644
|
+
function ee(t, a) {
|
|
645
|
+
e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: t.seriesIndex }), pt("selectDatapoint", { datapoint: t, index: a });
|
|
646
|
+
}
|
|
647
|
+
function $t() {
|
|
648
|
+
m.value.showTable = !m.value.showTable;
|
|
649
|
+
}
|
|
650
|
+
function _t() {
|
|
651
|
+
m.value.dataLabels.show = !m.value.dataLabels.show;
|
|
652
|
+
}
|
|
653
|
+
function Ct() {
|
|
654
|
+
m.value.showTooltip = !m.value.showTooltip;
|
|
655
|
+
}
|
|
656
|
+
const Se = p(!1);
|
|
657
|
+
function Ge() {
|
|
658
|
+
Se.value = !Se.value;
|
|
659
|
+
}
|
|
660
|
+
async function hl({ scale: t = 2 } = {}) {
|
|
661
|
+
if (!B.value) return;
|
|
662
|
+
const { width: a, height: l } = B.value.getBoundingClientRect(), o = a / l, { imageUri: i, base64: c } = await Jl({ domElement: B.value, base64: !0, img: !0, scale: t });
|
|
663
|
+
return {
|
|
664
|
+
imageUri: i,
|
|
665
|
+
base64: c,
|
|
666
|
+
title: e.value.style.chart.title.text,
|
|
667
|
+
width: a,
|
|
668
|
+
height: l,
|
|
669
|
+
aspectRatio: o
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
function fl() {
|
|
673
|
+
if (!ke.value) return;
|
|
674
|
+
const { x: t, y: a, width: l, height: o } = ke.value.getBBox();
|
|
675
|
+
oe.value && oe.value.setAttribute("viewBox", `${t} ${a} ${l + Math.min(0, t)} ${o + Math.min(0, a)}`);
|
|
676
|
+
}
|
|
677
|
+
const be = f(() => {
|
|
678
|
+
const t = e.value.table.useDialog && !e.value.table.show, a = m.value.showTable;
|
|
679
|
+
return {
|
|
680
|
+
component: t ? qt : Et,
|
|
681
|
+
title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
|
|
682
|
+
props: t ? {
|
|
683
|
+
backgroundColor: e.value.table.th.backgroundColor,
|
|
684
|
+
color: e.value.table.th.color,
|
|
685
|
+
headerColor: e.value.table.th.color,
|
|
686
|
+
headerBg: e.value.table.th.backgroundColor,
|
|
687
|
+
isFullscreen: re.value,
|
|
688
|
+
fullscreenParent: B.value,
|
|
689
|
+
forcedWidth: Math.min(500, window.innerWidth * 0.8)
|
|
690
|
+
} : {
|
|
691
|
+
hideDetails: !0,
|
|
692
|
+
config: {
|
|
693
|
+
open: a,
|
|
694
|
+
maxHeight: 1e4,
|
|
695
|
+
body: {
|
|
696
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
697
|
+
color: e.value.style.chart.color
|
|
698
|
+
},
|
|
699
|
+
head: {
|
|
700
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
701
|
+
color: e.value.style.chart.color
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
});
|
|
707
|
+
ye(() => m.value.showTable, (t) => {
|
|
708
|
+
e.value.table.show || (t && e.value.table.useDialog && pe.value ? pe.value.open() : "close" in pe.value && pe.value.close());
|
|
709
|
+
});
|
|
710
|
+
function At() {
|
|
711
|
+
m.value.showTable = !1, Ie.value && Ie.value.setTableIconState(!1);
|
|
712
|
+
}
|
|
713
|
+
const yl = f(() => Xe.value.map((t) => ({
|
|
714
|
+
...t,
|
|
715
|
+
name: t.display
|
|
716
|
+
}))), gl = f(() => e.value.style.chart.backgroundColor), pl = f(() => e.value.style.chart.legend), ml = f(() => e.value.style.chart.title), { exportSvg: bl, getSvg: wl } = jl({
|
|
717
|
+
svg: oe,
|
|
718
|
+
title: ml,
|
|
719
|
+
legend: pl,
|
|
720
|
+
legendItems: yl,
|
|
721
|
+
backgroundColor: gl
|
|
722
|
+
});
|
|
723
|
+
async function St({ isCb: t }) {
|
|
724
|
+
if (t) {
|
|
725
|
+
const { blob: a, url: l, text: o, dataUrl: i } = await wl();
|
|
726
|
+
e.value.userOptions.callbacks.svg({ blob: a, url: l, text: o, dataUrl: i });
|
|
727
|
+
} else
|
|
728
|
+
bl();
|
|
729
|
+
}
|
|
730
|
+
return Yt({
|
|
731
|
+
autoSize: fl,
|
|
732
|
+
getData: al,
|
|
733
|
+
getImage: hl,
|
|
734
|
+
generatePdf: ft,
|
|
735
|
+
generateCsv: Re,
|
|
736
|
+
generateImage: yt,
|
|
737
|
+
generateSvg: St,
|
|
738
|
+
hideSeries: nl,
|
|
739
|
+
showSeries: ol,
|
|
740
|
+
toggleTable: $t,
|
|
741
|
+
toggleLabels: _t,
|
|
742
|
+
toggleTooltip: Ct,
|
|
743
|
+
toggleAnnotator: Ge,
|
|
744
|
+
toggleFullscreen: kt
|
|
745
|
+
}), (t, a) => (s(), r("div", {
|
|
746
|
+
ref_key: "donutChart",
|
|
747
|
+
ref: B,
|
|
748
|
+
class: We(`vue-data-ui-component vue-ui-donut ${re.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
|
|
749
|
+
style: C(`font-family:${e.value.style.fontFamily};width:100%; ${e.value.responsive ? "height:100%;" : ""} text-align:center;background:${e.value.style.chart.backgroundColor}`),
|
|
750
|
+
id: `donut__${g.value}`,
|
|
751
|
+
onMouseenter: el,
|
|
752
|
+
onMouseleave: tl
|
|
753
|
+
}, [
|
|
754
|
+
e.value.userOptions.buttons.annotator && u(oe) ? (s(), ae(u(Gt), {
|
|
755
|
+
key: 0,
|
|
756
|
+
color: e.value.style.chart.color,
|
|
757
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
758
|
+
active: Se.value,
|
|
759
|
+
svgRef: u(oe),
|
|
760
|
+
onClose: Ge
|
|
761
|
+
}, {
|
|
762
|
+
"annotator-action-close": b(() => [
|
|
763
|
+
y(t.$slots, "annotator-action-close", {}, void 0, !0)
|
|
764
|
+
]),
|
|
765
|
+
"annotator-action-color": b(({ color: l }) => [
|
|
766
|
+
y(t.$slots, "annotator-action-color", N(Y({ color: l })), void 0, !0)
|
|
767
|
+
]),
|
|
768
|
+
"annotator-action-draw": b(({ mode: l }) => [
|
|
769
|
+
y(t.$slots, "annotator-action-draw", N(Y({ mode: l })), void 0, !0)
|
|
770
|
+
]),
|
|
771
|
+
"annotator-action-undo": b(({ disabled: l }) => [
|
|
772
|
+
y(t.$slots, "annotator-action-undo", N(Y({ disabled: l })), void 0, !0)
|
|
773
|
+
]),
|
|
774
|
+
"annotator-action-redo": b(({ disabled: l }) => [
|
|
775
|
+
y(t.$slots, "annotator-action-redo", N(Y({ disabled: l })), void 0, !0)
|
|
776
|
+
]),
|
|
777
|
+
"annotator-action-delete": b(({ disabled: l }) => [
|
|
778
|
+
y(t.$slots, "annotator-action-delete", N(Y({ disabled: l })), void 0, !0)
|
|
779
|
+
]),
|
|
780
|
+
_: 3
|
|
781
|
+
}, 8, ["color", "backgroundColor", "active", "svgRef"])) : v("", !0),
|
|
782
|
+
y(t.$slots, "userConfig", {}, void 0, !0),
|
|
783
|
+
ll.value ? (s(), r("div", {
|
|
784
|
+
key: 1,
|
|
785
|
+
ref_key: "noTitle",
|
|
786
|
+
ref: tt,
|
|
787
|
+
class: "vue-data-ui-no-title-space",
|
|
788
|
+
style: "height:36px; width: 100%;background:transparent"
|
|
789
|
+
}, null, 512)) : v("", !0),
|
|
790
|
+
e.value.style.chart.title.text ? (s(), r("div", {
|
|
791
|
+
key: 2,
|
|
792
|
+
ref_key: "chartTitle",
|
|
793
|
+
ref: Je,
|
|
794
|
+
style: "width:100%;background:transparent;padding-bottom:24px"
|
|
795
|
+
}, [
|
|
796
|
+
(s(), ae(ea, {
|
|
797
|
+
key: `title_${lt.value}`,
|
|
798
|
+
config: {
|
|
799
|
+
title: {
|
|
800
|
+
cy: "donut-div-title",
|
|
801
|
+
...e.value.style.chart.title
|
|
802
|
+
},
|
|
803
|
+
subtitle: {
|
|
804
|
+
cy: "donut-div-subtitle",
|
|
805
|
+
...e.value.style.chart.title.subtitle
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
}, null, 8, ["config"]))
|
|
809
|
+
], 512)) : v("", !0),
|
|
810
|
+
h("div", {
|
|
811
|
+
id: `legend-top-${g.value}`
|
|
812
|
+
}, null, 8, na),
|
|
813
|
+
e.value.userOptions.show && we.value && (u(vt) || u(Ye)) ? (s(), ae(u(Ut), {
|
|
814
|
+
ref_key: "userOptionsRef",
|
|
815
|
+
ref: Ie,
|
|
816
|
+
key: `user_option_${ut.value}`,
|
|
817
|
+
backgroundColor: e.value.style.chart.backgroundColor,
|
|
818
|
+
color: e.value.style.chart.color,
|
|
819
|
+
isPrinting: u(ct),
|
|
820
|
+
isImaging: u(ht),
|
|
821
|
+
uid: g.value,
|
|
822
|
+
hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
|
|
823
|
+
hasPdf: e.value.userOptions.buttons.pdf,
|
|
824
|
+
hasImg: e.value.userOptions.buttons.img,
|
|
825
|
+
hasSvg: e.value.userOptions.buttons.svg,
|
|
826
|
+
hasXls: e.value.userOptions.buttons.csv,
|
|
827
|
+
hasTable: e.value.userOptions.buttons.table,
|
|
828
|
+
hasLabel: e.value.userOptions.buttons.labels,
|
|
829
|
+
hasFullscreen: e.value.userOptions.buttons.fullscreen,
|
|
830
|
+
isFullscreen: re.value,
|
|
831
|
+
chartElement: B.value,
|
|
832
|
+
position: e.value.userOptions.position,
|
|
833
|
+
callbacks: e.value.userOptions.callbacks,
|
|
834
|
+
isTooltip: m.value.showTooltip,
|
|
835
|
+
titles: { ...e.value.userOptions.buttonTitles },
|
|
836
|
+
hasAnnotator: e.value.userOptions.buttons.annotator,
|
|
837
|
+
isAnnotation: Se.value,
|
|
838
|
+
printScale: e.value.userOptions.print.scale,
|
|
839
|
+
tableDialog: e.value.table.useDialog,
|
|
840
|
+
onToggleFullscreen: kt,
|
|
841
|
+
onGeneratePdf: u(ft),
|
|
842
|
+
onGenerateCsv: Re,
|
|
843
|
+
onGenerateImage: u(yt),
|
|
844
|
+
onGenerateSvg: St,
|
|
845
|
+
onToggleTable: $t,
|
|
846
|
+
onToggleLabels: _t,
|
|
847
|
+
onToggleTooltip: Ct,
|
|
848
|
+
onToggleAnnotator: Ge,
|
|
849
|
+
style: C({ visibility: u(vt) ? u(Ye) ? "visible" : "hidden" : "visible" })
|
|
850
|
+
}, qe({ _: 2 }, [
|
|
851
|
+
t.$slots.menuIcon ? {
|
|
852
|
+
name: "menuIcon",
|
|
853
|
+
fn: b(({ isOpen: l, color: o }) => [
|
|
854
|
+
y(t.$slots, "menuIcon", N(Y({ isOpen: l, color: o })), void 0, !0)
|
|
855
|
+
]),
|
|
856
|
+
key: "0"
|
|
857
|
+
} : void 0,
|
|
858
|
+
t.$slots.optionTooltip ? {
|
|
859
|
+
name: "optionTooltip",
|
|
860
|
+
fn: b(() => [
|
|
861
|
+
y(t.$slots, "optionTooltip", {}, void 0, !0)
|
|
862
|
+
]),
|
|
863
|
+
key: "1"
|
|
864
|
+
} : void 0,
|
|
865
|
+
t.$slots.optionPdf ? {
|
|
866
|
+
name: "optionPdf",
|
|
867
|
+
fn: b(() => [
|
|
868
|
+
y(t.$slots, "optionPdf", {}, void 0, !0)
|
|
869
|
+
]),
|
|
870
|
+
key: "2"
|
|
871
|
+
} : void 0,
|
|
872
|
+
t.$slots.optionCsv ? {
|
|
873
|
+
name: "optionCsv",
|
|
874
|
+
fn: b(() => [
|
|
875
|
+
y(t.$slots, "optionCsv", {}, void 0, !0)
|
|
876
|
+
]),
|
|
877
|
+
key: "3"
|
|
878
|
+
} : void 0,
|
|
879
|
+
t.$slots.optionImg ? {
|
|
880
|
+
name: "optionImg",
|
|
881
|
+
fn: b(() => [
|
|
882
|
+
y(t.$slots, "optionImg", {}, void 0, !0)
|
|
883
|
+
]),
|
|
884
|
+
key: "4"
|
|
885
|
+
} : void 0,
|
|
886
|
+
t.$slots.optionSvg ? {
|
|
887
|
+
name: "optionSvg",
|
|
888
|
+
fn: b(() => [
|
|
889
|
+
y(t.$slots, "optionSvg", {}, void 0, !0)
|
|
890
|
+
]),
|
|
891
|
+
key: "5"
|
|
892
|
+
} : void 0,
|
|
893
|
+
t.$slots.optionTable ? {
|
|
894
|
+
name: "optionTable",
|
|
895
|
+
fn: b(() => [
|
|
896
|
+
y(t.$slots, "optionTable", {}, void 0, !0)
|
|
897
|
+
]),
|
|
898
|
+
key: "6"
|
|
899
|
+
} : void 0,
|
|
900
|
+
t.$slots.optionLabels ? {
|
|
901
|
+
name: "optionLabels",
|
|
902
|
+
fn: b(() => [
|
|
903
|
+
y(t.$slots, "optionLabels", {}, void 0, !0)
|
|
904
|
+
]),
|
|
905
|
+
key: "7"
|
|
906
|
+
} : void 0,
|
|
907
|
+
t.$slots.optionFullscreen ? {
|
|
908
|
+
name: "optionFullscreen",
|
|
909
|
+
fn: b(({ toggleFullscreen: l, isFullscreen: o }) => [
|
|
910
|
+
y(t.$slots, "optionFullscreen", N(Y({ toggleFullscreen: l, isFullscreen: o })), void 0, !0)
|
|
911
|
+
]),
|
|
912
|
+
key: "8"
|
|
913
|
+
} : void 0,
|
|
914
|
+
t.$slots.optionAnnotator ? {
|
|
915
|
+
name: "optionAnnotator",
|
|
916
|
+
fn: b(({ toggleAnnotator: l, isAnnotator: o }) => [
|
|
917
|
+
y(t.$slots, "optionAnnotator", N(Y({ toggleAnnotator: l, isAnnotator: o })), void 0, !0)
|
|
918
|
+
]),
|
|
919
|
+
key: "9"
|
|
920
|
+
} : void 0
|
|
921
|
+
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasImg", "hasSvg", "hasXls", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "chartElement", "position", "callbacks", "isTooltip", "titles", "hasAnnotator", "isAnnotation", "printScale", "tableDialog", "onGeneratePdf", "onGenerateImage", "style"])) : v("", !0),
|
|
922
|
+
(s(), r("svg", {
|
|
923
|
+
ref_key: "svgRef",
|
|
924
|
+
ref: oe,
|
|
925
|
+
xmlns: u(Ol),
|
|
926
|
+
class: We({ "vue-data-ui-fullscreen--on": re.value, "vue-data-ui-fulscreen--off": !re.value, "vue-data-ui-svg": !0 }),
|
|
927
|
+
viewBox: `0 0 ${n.value.width <= 0 ? 10 : n.value.width} ${n.value.height <= 0 ? 10 : n.value.height}`,
|
|
928
|
+
style: C(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${dt.value.css}`)
|
|
929
|
+
}, [
|
|
930
|
+
h("g", {
|
|
931
|
+
ref_key: "G",
|
|
932
|
+
ref: ke,
|
|
933
|
+
class: "vue-data-ui-g"
|
|
934
|
+
}, [
|
|
935
|
+
Te(u(Wt)),
|
|
936
|
+
t.$slots["chart-background"] ? (s(), r("foreignObject", {
|
|
937
|
+
key: 0,
|
|
938
|
+
x: 0,
|
|
939
|
+
y: 0,
|
|
940
|
+
width: n.value.width <= 0 ? 10 : n.value.width,
|
|
941
|
+
height: n.value.height <= 0 ? 10 : n.value.height,
|
|
942
|
+
style: {
|
|
943
|
+
pointerEvents: "none"
|
|
944
|
+
}
|
|
945
|
+
}, [
|
|
946
|
+
y(t.$slots, "chart-background", {}, void 0, !0)
|
|
947
|
+
], 8, ua)) : v("", !0),
|
|
948
|
+
e.value.type === "classic" && !isNaN(ne.value / _.value) ? (s(), r("defs", ra, [
|
|
949
|
+
e.value.style.chart.useGradient ? (s(), r("radialGradient", {
|
|
950
|
+
key: 0,
|
|
951
|
+
id: `gradient_${g.value}`
|
|
952
|
+
}, [
|
|
953
|
+
h("stop", {
|
|
954
|
+
offset: "0%",
|
|
955
|
+
"stop-color": u(Fe)(e.value.style.chart.backgroundColor, 0),
|
|
956
|
+
"stop-opacity": "0"
|
|
957
|
+
}, null, 8, va),
|
|
958
|
+
h("stop", {
|
|
959
|
+
offset: `${(1 - ne.value / _.value) * 100}%`,
|
|
960
|
+
"stop-color": u(Fe)("#FFFFFF", 0),
|
|
961
|
+
"stop-opacity": "0"
|
|
962
|
+
}, null, 8, da),
|
|
963
|
+
h("stop", {
|
|
964
|
+
offset: `${(1 - ne.value / _.value / 2) * 100}%`,
|
|
965
|
+
"stop-color": u(Fe)("#FFFFFF", e.value.style.chart.gradientIntensity)
|
|
966
|
+
}, null, 8, ca),
|
|
967
|
+
h("stop", {
|
|
968
|
+
offset: "100%",
|
|
969
|
+
"stop-color": u(Fe)(e.value.style.chart.backgroundColor, 0),
|
|
970
|
+
"stop-opacity": "0"
|
|
971
|
+
}, null, 8, ha)
|
|
972
|
+
], 8, ia)) : v("", !0)
|
|
973
|
+
])) : v("", !0),
|
|
974
|
+
e.value.type === "polar" ? (s(), r("defs", fa, [
|
|
975
|
+
(s(!0), r(k, null, I(d.value, (l, o) => (s(), r("radialGradient", {
|
|
976
|
+
id: `polar_gradient_${o}_${g.value}`,
|
|
977
|
+
cx: (isNaN(l.middlePoint.x / n.value.width * 100) ? 0 : l.middlePoint.x / n.value.width * 100) + "%",
|
|
978
|
+
cy: (isNaN(l.middlePoint.y / n.value.height * 100) ? 0 : l.middlePoint.y / n.value.height * 100) + "%",
|
|
979
|
+
r: "62%"
|
|
980
|
+
}, [
|
|
981
|
+
h("stop", {
|
|
982
|
+
offset: "0%",
|
|
983
|
+
"stop-color": u(Dl)(T.value[o].color, 0.05),
|
|
984
|
+
"stop-opacity": e.value.style.chart.gradientIntensity / 100
|
|
985
|
+
}, null, 8, ga),
|
|
986
|
+
h("stop", {
|
|
987
|
+
offset: "100%",
|
|
988
|
+
"stop-color": T.value[o].color
|
|
989
|
+
}, null, 8, pa)
|
|
990
|
+
], 8, ya))), 256))
|
|
991
|
+
])) : v("", !0),
|
|
992
|
+
h("defs", null, [
|
|
993
|
+
h("filter", {
|
|
994
|
+
id: `blur_${g.value}`,
|
|
995
|
+
x: "-50%",
|
|
996
|
+
y: "-50%",
|
|
997
|
+
width: "200%",
|
|
998
|
+
height: "200%"
|
|
999
|
+
}, [
|
|
1000
|
+
h("feGaussianBlur", {
|
|
1001
|
+
in: "SourceGraphic",
|
|
1002
|
+
stdDeviation: 2,
|
|
1003
|
+
id: `blur_std_${g.value}`
|
|
1004
|
+
}, null, 8, ba),
|
|
1005
|
+
a[5] || (a[5] = h("feColorMatrix", {
|
|
1006
|
+
type: "saturate",
|
|
1007
|
+
values: "0"
|
|
1008
|
+
}, null, -1))
|
|
1009
|
+
], 8, ma),
|
|
1010
|
+
h("filter", {
|
|
1011
|
+
id: `shadow_${g.value}`,
|
|
1012
|
+
"color-interpolation-filters": "sRGB"
|
|
1013
|
+
}, [
|
|
1014
|
+
h("feDropShadow", {
|
|
1015
|
+
dx: "0",
|
|
1016
|
+
dy: "0",
|
|
1017
|
+
stdDeviation: "10",
|
|
1018
|
+
"flood-opacity": "0.5",
|
|
1019
|
+
"flood-color": e.value.style.chart.layout.donut.shadowColor
|
|
1020
|
+
}, null, 8, ka)
|
|
1021
|
+
], 8, wa),
|
|
1022
|
+
h("filter", {
|
|
1023
|
+
id: `drop_shadow_${g.value}`,
|
|
1024
|
+
"color-interpolation-filters": "sRGB",
|
|
1025
|
+
x: "-50%",
|
|
1026
|
+
y: "-50%",
|
|
1027
|
+
width: "200%",
|
|
1028
|
+
height: "200%"
|
|
1029
|
+
}, [
|
|
1030
|
+
h("feDropShadow", {
|
|
1031
|
+
dx: "0",
|
|
1032
|
+
dy: "0",
|
|
1033
|
+
stdDeviation: "3",
|
|
1034
|
+
"flood-opacity": "1",
|
|
1035
|
+
"flood-color": e.value.style.chart.layout.donut.shadowColor
|
|
1036
|
+
}, null, 8, $a)
|
|
1037
|
+
], 8, xa)
|
|
1038
|
+
]),
|
|
1039
|
+
e.value.type === "classic" ? (s(!0), r(k, { key: 3 }, I(T.value.filter((l) => !l.ghost), (l, o) => (s(), r("g", null, [
|
|
1040
|
+
R(l) && m.value.dataLabels.show ? (s(), r("path", {
|
|
1041
|
+
key: 0,
|
|
1042
|
+
d: u(Nl)(l, { x: n.value.width / 2, y: n.value.height / 2 }, 16, 16, !1, !1, ne.value, 12, e.value.style.chart.layout.curvedMarkers),
|
|
1043
|
+
stroke: l.color,
|
|
1044
|
+
"stroke-width": "1",
|
|
1045
|
+
"stroke-linecap": "round",
|
|
1046
|
+
"stroke-linejoin": "round",
|
|
1047
|
+
fill: "none",
|
|
1048
|
+
filter: ue(o)
|
|
1049
|
+
}, null, 8, _a)) : v("", !0)
|
|
1050
|
+
]))), 256)) : v("", !0),
|
|
1051
|
+
e.value.type === "polar" ? (s(!0), r(k, { key: 4 }, I(T.value.filter((l) => !l.ghost), (l, o) => (s(), r("g", null, [
|
|
1052
|
+
R(l) && m.value.dataLabels.show ? (s(), r("path", {
|
|
1053
|
+
key: 0,
|
|
1054
|
+
d: `M ${u(P)({ initX: d.value[o].middlePoint.x, initY: d.value[o].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x},${u(P)({ initX: d.value[o].middlePoint.x, initY: d.value[o].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y} ${d.value[o].middlePoint.x},${d.value[o].middlePoint.y}`,
|
|
1055
|
+
stroke: l.color,
|
|
1056
|
+
"stroke-width": "1",
|
|
1057
|
+
"stroke-linecap": "round",
|
|
1058
|
+
"stroke-linejoin": "round",
|
|
1059
|
+
fill: "none",
|
|
1060
|
+
filter: ue(o),
|
|
1061
|
+
style: C({
|
|
1062
|
+
transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
1063
|
+
})
|
|
1064
|
+
}, null, 12, Ca)) : v("", !0)
|
|
1065
|
+
]))), 256)) : v("", !0),
|
|
1066
|
+
e.value.type === "classic" && e.value.style.chart.layout.donut.useShadow ? (s(), r("circle", {
|
|
1067
|
+
key: 5,
|
|
1068
|
+
cx: n.value.width / 2,
|
|
1069
|
+
cy: n.value.height / 2,
|
|
1070
|
+
r: _.value <= 0 ? 10 : _.value,
|
|
1071
|
+
fill: e.value.style.chart.backgroundColor,
|
|
1072
|
+
filter: `url(#shadow_${g.value})`
|
|
1073
|
+
}, null, 8, Aa)) : v("", !0),
|
|
1074
|
+
t.$slots.pattern ? (s(), r("g", Sa, [
|
|
1075
|
+
(s(!0), r(k, null, I(Ze.dataset, (l, o) => (s(), r("defs", {
|
|
1076
|
+
key: `pattern-${l.patternIndex}`
|
|
1077
|
+
}, [
|
|
1078
|
+
y(t.$slots, "pattern", He({ ref_for: !0 }, { seriesIndex: o, patternId: `pattern_${g.value}_${o}` }), void 0, !0)
|
|
1079
|
+
]))), 128))
|
|
1080
|
+
])) : v("", !0),
|
|
1081
|
+
F.value && e.value.type === "classic" ? (s(), r(k, { key: 7 }, [
|
|
1082
|
+
(s(!0), r(k, null, I(E.value, (l, o) => (s(), r("path", {
|
|
1083
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1084
|
+
d: l.arcSlice,
|
|
1085
|
+
fill: "#FFFFFF"
|
|
1086
|
+
}, null, 8, Ta))), 256)),
|
|
1087
|
+
(s(!0), r(k, null, I(E.value, (l, o) => (s(), r("path", {
|
|
1088
|
+
class: "vue-ui-donut-arc-path",
|
|
1089
|
+
d: l.arcSlice,
|
|
1090
|
+
fill: l.color,
|
|
1091
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1092
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
1093
|
+
filter: ue(o)
|
|
1094
|
+
}, null, 8, Pa))), 256)),
|
|
1095
|
+
t.$slots.pattern ? (s(), r("g", Fa, [
|
|
1096
|
+
(s(!0), r(k, null, I(E.value, (l, o) => (s(), r("path", {
|
|
1097
|
+
class: "vue-ui-donut-arc-path",
|
|
1098
|
+
d: l.arcSlice,
|
|
1099
|
+
fill: `url(#${l.pattern})`,
|
|
1100
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1101
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
1102
|
+
filter: ue(o)
|
|
1103
|
+
}, null, 8, Ia))), 256))
|
|
1104
|
+
])) : v("", !0)
|
|
1105
|
+
], 64)) : v("", !0),
|
|
1106
|
+
F.value && e.value.type === "polar" ? (s(), r(k, { key: 8 }, [
|
|
1107
|
+
T.value.length > 1 ? (s(), r("g", La, [
|
|
1108
|
+
(s(!0), r(k, null, I(E.value, (l, o) => (s(), r("path", {
|
|
1109
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1110
|
+
d: d.value[o].path,
|
|
1111
|
+
fill: "#FFFFFF",
|
|
1112
|
+
style: C({
|
|
1113
|
+
transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
1114
|
+
})
|
|
1115
|
+
}, null, 12, Ma))), 256)),
|
|
1116
|
+
e.value.style.chart.layout.donut.useShadow ? (s(), r("g", za, [
|
|
1117
|
+
(s(!0), r(k, null, I(E.value, (l, o) => (s(), r("path", {
|
|
1118
|
+
class: "vue-ui-donut-arc-path",
|
|
1119
|
+
d: d.value[o].path,
|
|
1120
|
+
fill: "transparent",
|
|
1121
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1122
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
1123
|
+
filter: `url(#drop_shadow_${g.value})`,
|
|
1124
|
+
style: C({
|
|
1125
|
+
transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
1126
|
+
})
|
|
1127
|
+
}, null, 12, Oa))), 256))
|
|
1128
|
+
])) : v("", !0),
|
|
1129
|
+
t.$slots.pattern ? (s(), r("g", Da, [
|
|
1130
|
+
(s(!0), r(k, null, I(E.value, (l, o) => (s(), r("path", {
|
|
1131
|
+
class: "vue-ui-donut-arc-path",
|
|
1132
|
+
d: d.value[o].path,
|
|
1133
|
+
fill: `url(#${l.pattern})`,
|
|
1134
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1135
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
1136
|
+
filter: ue(o),
|
|
1137
|
+
style: C({
|
|
1138
|
+
transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
1139
|
+
transformOrigin: "center"
|
|
1140
|
+
})
|
|
1141
|
+
}, null, 12, Na))), 256))
|
|
1142
|
+
])) : v("", !0),
|
|
1143
|
+
(s(!0), r(k, null, I(E.value, (l, o) => (s(), r("path", {
|
|
1144
|
+
class: "vue-ui-donut-arc-path",
|
|
1145
|
+
d: d.value[o].path,
|
|
1146
|
+
fill: e.value.style.chart.useGradient ? `url(#polar_gradient_${o}_${g.value})` : l.color,
|
|
1147
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1148
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth,
|
|
1149
|
+
filter: ue(o),
|
|
1150
|
+
style: C({
|
|
1151
|
+
transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
1152
|
+
})
|
|
1153
|
+
}, null, 12, Ya))), 256))
|
|
1154
|
+
])) : (s(), r("g", Xa, [
|
|
1155
|
+
t.$slots.pattern ? (s(), r("circle", {
|
|
1156
|
+
key: 0,
|
|
1157
|
+
cx: n.value.width / 2,
|
|
1158
|
+
cy: n.value.height / 2,
|
|
1159
|
+
r: _.value,
|
|
1160
|
+
fill: `url(#pattern_${g.value}_${T.value[0].patternIndex})`,
|
|
1161
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1162
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth
|
|
1163
|
+
}, null, 8, Ba)) : v("", !0),
|
|
1164
|
+
h("circle", {
|
|
1165
|
+
cx: n.value.width / 2,
|
|
1166
|
+
cy: n.value.height / 2,
|
|
1167
|
+
r: _.value,
|
|
1168
|
+
fill: e.value.style.chart.useGradient ? `url(#polar_gradient_0_${g.value})` : T.value[0].color,
|
|
1169
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1170
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth
|
|
1171
|
+
}, null, 8, Va)
|
|
1172
|
+
]))
|
|
1173
|
+
], 64)) : (s(), r(k, { key: 9 }, [
|
|
1174
|
+
e.value.type === "classic" && !rl.value ? (s(), r("g", Ea, [
|
|
1175
|
+
(s(!0), r(k, null, I(il.value, (l, o) => (s(), r("path", {
|
|
1176
|
+
class: "vue-ui-donut-arc-path",
|
|
1177
|
+
d: l.arcSlice,
|
|
1178
|
+
fill: l.color,
|
|
1179
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1180
|
+
"stroke-width": e.value.style.chart.layout.donut.borderWidth
|
|
1181
|
+
}, null, 8, Ra))), 256))
|
|
1182
|
+
])) : v("", !0),
|
|
1183
|
+
h("circle", {
|
|
1184
|
+
cx: n.value.width / 2,
|
|
1185
|
+
cy: n.value.height / 2,
|
|
1186
|
+
r: _.value <= 0 ? 10 : _.value,
|
|
1187
|
+
fill: "transparent",
|
|
1188
|
+
stroke: e.value.style.chart.backgroundColor
|
|
1189
|
+
}, null, 8, Ga)
|
|
1190
|
+
], 64)),
|
|
1191
|
+
e.value.style.chart.useGradient && e.value.type === "classic" ? (s(), r("circle", {
|
|
1192
|
+
key: 10,
|
|
1193
|
+
cx: n.value.width / 2,
|
|
1194
|
+
cy: n.value.height / 2,
|
|
1195
|
+
r: (
|
|
1196
|
+
/* This might require adjustments */
|
|
1197
|
+
_.value <= 0 ? 10 : _.value
|
|
1198
|
+
),
|
|
1199
|
+
fill: `url(#gradient_${g.value})`
|
|
1200
|
+
}, null, 8, Ua)) : v("", !0),
|
|
1201
|
+
h("circle", {
|
|
1202
|
+
ref_key: "circle_hollow",
|
|
1203
|
+
ref: Zt,
|
|
1204
|
+
style: { pointerEvents: "none" },
|
|
1205
|
+
fill: "none",
|
|
1206
|
+
cx: n.value.width / 2,
|
|
1207
|
+
cy: n.value.height / 2,
|
|
1208
|
+
r: Math.max(0.1, ne.value * 1.7)
|
|
1209
|
+
}, null, 8, Wa),
|
|
1210
|
+
F.value ? (s(), r(k, { key: 11 }, [
|
|
1211
|
+
T.value.length > 1 || e.value.type === "classic" ? (s(), r("g", qa, [
|
|
1212
|
+
(s(!0), r(k, null, I(T.value.filter((l) => !l.ghost), (l, o) => (s(), r("path", {
|
|
1213
|
+
d: e.value.type === "classic" ? l.arcSlice : d.value[o].path,
|
|
1214
|
+
stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
|
|
1215
|
+
fill: V.value === o ? e.value.style.chart.layout.donut.selectedColor : "transparent",
|
|
1216
|
+
onMouseenter: (i) => fe({
|
|
1217
|
+
datapoint: l,
|
|
1218
|
+
relativeIndex: o,
|
|
1219
|
+
seriesIndex: l.seriesIndex,
|
|
1220
|
+
show: !0
|
|
1221
|
+
}),
|
|
1222
|
+
onMouseleave: (i) => he({ datapoint: l, seriesIndex: l.seriesIndex }),
|
|
1223
|
+
onClick: (i) => ee(l, o)
|
|
1224
|
+
}, null, 40, Ha))), 256))
|
|
1225
|
+
])) : (s(), r("g", ja, [
|
|
1226
|
+
h("circle", {
|
|
1227
|
+
cx: n.value.width / 2,
|
|
1228
|
+
cy: n.value.height / 2,
|
|
1229
|
+
r: _.value,
|
|
1230
|
+
fill: "transparent",
|
|
1231
|
+
onMouseenter: a[0] || (a[0] = (l) => fe({
|
|
1232
|
+
datapoint: T.value[0],
|
|
1233
|
+
relativeIndex: 0,
|
|
1234
|
+
seriesIndex: T.value[0].seriesIndex,
|
|
1235
|
+
show: !0
|
|
1236
|
+
})),
|
|
1237
|
+
onMouseleave: a[1] || (a[1] = (l) => he({ datapoint: T.value[0], seriesIndex: T.value[0].seriesIndex })),
|
|
1238
|
+
onClick: a[2] || (a[2] = (l) => ee(T.value[0], t.i))
|
|
1239
|
+
}, null, 40, Qa)
|
|
1240
|
+
]))
|
|
1241
|
+
], 64)) : v("", !0),
|
|
1242
|
+
e.value.type === "classic" ? (s(), r("g", {
|
|
1243
|
+
key: 12,
|
|
1244
|
+
ref_key: "G_hollow",
|
|
1245
|
+
ref: Qt,
|
|
1246
|
+
class: "vue-data-ui-donut-hollow-labels"
|
|
1247
|
+
}, [
|
|
1248
|
+
e.value.style.chart.layout.labels.hollow.total.show ? (s(), r("text", {
|
|
1249
|
+
key: 0,
|
|
1250
|
+
"text-anchor": "middle",
|
|
1251
|
+
x: n.value.width / 2,
|
|
1252
|
+
y: n.value.height / 2 - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.offsetY,
|
|
1253
|
+
fill: e.value.style.chart.layout.labels.hollow.total.color,
|
|
1254
|
+
"font-size": e.value.style.chart.layout.labels.hollow.total.fontSize,
|
|
1255
|
+
style: C(`font-weight:${e.value.style.chart.layout.labels.hollow.total.bold ? "bold" : ""}`)
|
|
1256
|
+
}, U(e.value.style.chart.layout.labels.hollow.total.text), 13, Za)) : v("", !0),
|
|
1257
|
+
e.value.style.chart.layout.labels.hollow.total.show ? (s(), r("text", {
|
|
1258
|
+
key: 1,
|
|
1259
|
+
"text-anchor": "middle",
|
|
1260
|
+
x: n.value.width / 2,
|
|
1261
|
+
y: n.value.height / 2 + e.value.style.chart.layout.labels.hollow.total.fontSize - (e.value.style.chart.layout.labels.hollow.average.show ? e.value.style.chart.layout.labels.hollow.total.fontSize : 0) + e.value.style.chart.layout.labels.hollow.total.value.offsetY,
|
|
1262
|
+
fill: e.value.style.chart.layout.labels.hollow.total.value.color,
|
|
1263
|
+
"font-size": e.value.style.chart.layout.labels.hollow.total.value.fontSize,
|
|
1264
|
+
style: C(`font-weight:${e.value.style.chart.layout.labels.hollow.total.value.bold ? "bold" : ""}`)
|
|
1265
|
+
}, U(u(W)(
|
|
1266
|
+
e.value.style.chart.layout.labels.hollow.total.value.formatter,
|
|
1267
|
+
F.value,
|
|
1268
|
+
u(X)({
|
|
1269
|
+
p: e.value.style.chart.layout.labels.hollow.total.value.prefix,
|
|
1270
|
+
v: F.value,
|
|
1271
|
+
s: e.value.style.chart.layout.labels.hollow.total.value.suffix
|
|
1272
|
+
})
|
|
1273
|
+
)), 13, Ja)) : v("", !0),
|
|
1274
|
+
e.value.style.chart.layout.labels.hollow.average.show ? (s(), r("text", {
|
|
1275
|
+
key: 2,
|
|
1276
|
+
"text-anchor": "middle",
|
|
1277
|
+
x: n.value.width / 2,
|
|
1278
|
+
y: n.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.offsetY,
|
|
1279
|
+
fill: e.value.style.chart.layout.labels.hollow.average.color,
|
|
1280
|
+
"font-size": e.value.style.chart.layout.labels.hollow.average.fontSize,
|
|
1281
|
+
style: C(`font-weight:${e.value.style.chart.layout.labels.hollow.average.bold ? "bold" : ""}`)
|
|
1282
|
+
}, U(e.value.style.chart.layout.labels.hollow.average.text), 13, Ka)) : v("", !0),
|
|
1283
|
+
e.value.style.chart.layout.labels.hollow.average.show ? (s(), r("text", {
|
|
1284
|
+
key: 3,
|
|
1285
|
+
"text-anchor": "middle",
|
|
1286
|
+
x: n.value.width / 2,
|
|
1287
|
+
y: n.value.height / 2 + (e.value.style.chart.layout.labels.hollow.total.show ? e.value.style.chart.layout.labels.hollow.average.fontSize : 0) + e.value.style.chart.layout.labels.hollow.average.fontSize + e.value.style.chart.layout.labels.hollow.average.value.offsetY,
|
|
1288
|
+
fill: e.value.style.chart.layout.labels.hollow.average.value.color,
|
|
1289
|
+
"font-size": e.value.style.chart.layout.labels.hollow.average.value.fontSize,
|
|
1290
|
+
style: C(`font-weight:${e.value.style.chart.layout.labels.hollow.average.value.bold ? "bold" : ""}`)
|
|
1291
|
+
}, U(se.value || S.value ? "--" : u(W)(
|
|
1292
|
+
e.value.style.chart.layout.labels.hollow.average.value.formatter,
|
|
1293
|
+
Ve.value,
|
|
1294
|
+
u(X)({
|
|
1295
|
+
p: e.value.style.chart.layout.labels.hollow.average.value.prefix,
|
|
1296
|
+
v: Ve.value,
|
|
1297
|
+
s: e.value.style.chart.layout.labels.hollow.average.value.suffix,
|
|
1298
|
+
r: e.value.style.chart.layout.labels.hollow.average.value.rounding
|
|
1299
|
+
})
|
|
1300
|
+
)), 13, eo)) : v("", !0)
|
|
1301
|
+
], 512)) : v("", !0),
|
|
1302
|
+
(s(!0), r(k, null, I(E.value.filter((l) => !l.ghost), (l, o) => (s(), r("g", {
|
|
1303
|
+
filter: ue(o),
|
|
1304
|
+
class: We({ animated: e.value.useCssAnimation }),
|
|
1305
|
+
key: l.seriesIndex
|
|
1306
|
+
}, [
|
|
1307
|
+
e.value.style.chart.layout.labels.dataLabels.useLabelSlots ? (s(), r("g", lo, [
|
|
1308
|
+
(s(), r("foreignObject", {
|
|
1309
|
+
x: u($)(l, !0).anchor === "end" ? u($)(l).x - 120 : u($)(l, !0).anchor === "middle" ? u($)(l).x - 60 : u($)(l).x,
|
|
1310
|
+
y: u(ge)(l) - (xt.value ? 20 : 0),
|
|
1311
|
+
width: "120",
|
|
1312
|
+
height: "60",
|
|
1313
|
+
style: { overflow: "visible" }
|
|
1314
|
+
}, [
|
|
1315
|
+
h("div", null, [
|
|
1316
|
+
y(t.$slots, "dataLabel", He({ ref_for: !0 }, {
|
|
1317
|
+
datapoint: l,
|
|
1318
|
+
isBlur: !e.value.useBlurOnHover || [null, void 0].includes(V.value) || V.value === o,
|
|
1319
|
+
isSafari: xt.value,
|
|
1320
|
+
isVisible: R(l) && m.value.dataLabels.show,
|
|
1321
|
+
textAlign: u($)(l, !0, 16, !0).anchor,
|
|
1322
|
+
flexAlign: u($)(l, !0, 16).anchor,
|
|
1323
|
+
percentage: Be(l, E.value)
|
|
1324
|
+
}), void 0, !0)
|
|
1325
|
+
])
|
|
1326
|
+
], 8, ao))
|
|
1327
|
+
])) : (s(), r("g", oo, [
|
|
1328
|
+
e.value.type === "classic" ? (s(), r(k, { key: 0 }, [
|
|
1329
|
+
R(l) && m.value.dataLabels.show ? (s(), r("circle", {
|
|
1330
|
+
key: 0,
|
|
1331
|
+
cx: u($)(l).x,
|
|
1332
|
+
cy: u(ge)(l) - 3.5,
|
|
1333
|
+
fill: l.color,
|
|
1334
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1335
|
+
"stroke-width": 1,
|
|
1336
|
+
r: 3,
|
|
1337
|
+
filter: !e.value.useBlurOnHover || [null, void 0].includes(V.value) || V.value === o ? "" : `url(#blur_${g.value})`,
|
|
1338
|
+
onClick: (i) => ee(l, o),
|
|
1339
|
+
onMouseenter: (i) => fe({
|
|
1340
|
+
datapoint: l,
|
|
1341
|
+
relativeIndex: o,
|
|
1342
|
+
seriesIndex: l.seriesIndex,
|
|
1343
|
+
show: !0
|
|
1344
|
+
}),
|
|
1345
|
+
onMouseleave: (i) => he({ datapoint: l, seriesIndex: l.seriesIndex })
|
|
1346
|
+
}, null, 40, no)) : v("", !0)
|
|
1347
|
+
], 64)) : v("", !0),
|
|
1348
|
+
e.value.type === "polar" ? (s(), r(k, { key: 1 }, [
|
|
1349
|
+
R(l) && m.value.dataLabels.show ? (s(), r("circle", {
|
|
1350
|
+
key: 0,
|
|
1351
|
+
cx: u(P)({ initX: d.value[o].middlePoint.x, initY: d.value[o].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
|
|
1352
|
+
cy: u(P)({ initX: d.value[o].middlePoint.x, initY: d.value[o].middlePoint.y, offset: 24, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
|
|
1353
|
+
fill: l.color,
|
|
1354
|
+
stroke: e.value.style.chart.backgroundColor,
|
|
1355
|
+
"stroke-width": 1,
|
|
1356
|
+
r: 3,
|
|
1357
|
+
filter: !e.value.useBlurOnHover || [null, void 0].includes(V.value) || V.value === o ? "" : `url(#blur_${g.value})`,
|
|
1358
|
+
onClick: (i) => ee(l, o),
|
|
1359
|
+
onMouseenter: (i) => fe({
|
|
1360
|
+
datapoint: l,
|
|
1361
|
+
relativeIndex: o,
|
|
1362
|
+
seriesIndex: l.seriesIndex,
|
|
1363
|
+
show: !0
|
|
1364
|
+
}),
|
|
1365
|
+
onMouseleave: (i) => he({ datapoint: l, seriesIndex: l.seriesIndex }),
|
|
1366
|
+
style: C({
|
|
1367
|
+
transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`
|
|
1368
|
+
})
|
|
1369
|
+
}, null, 44, so)) : v("", !0)
|
|
1370
|
+
], 64)) : v("", !0),
|
|
1371
|
+
e.value.type === "classic" ? (s(), r(k, { key: 2 }, [
|
|
1372
|
+
Ft(h("text", {
|
|
1373
|
+
class: "vue-data-ui-datalabel-value",
|
|
1374
|
+
"text-anchor": u($)(l, !0, 12).anchor,
|
|
1375
|
+
x: u($)(l, !0, 12).x,
|
|
1376
|
+
y: u(ge)(l),
|
|
1377
|
+
fill: e.value.style.chart.layout.labels.percentage.color,
|
|
1378
|
+
"font-size": xe.value + "px",
|
|
1379
|
+
style: C(`font-weight:${e.value.style.chart.layout.labels.percentage.bold ? "bold" : ""}`),
|
|
1380
|
+
onClick: (i) => ee(l, o),
|
|
1381
|
+
onMouseenter: (i) => fe({
|
|
1382
|
+
datapoint: l,
|
|
1383
|
+
relativeIndex: o,
|
|
1384
|
+
seriesIndex: l.seriesIndex,
|
|
1385
|
+
show: !0
|
|
1386
|
+
}),
|
|
1387
|
+
onMouseleave: (i) => he({ datapoint: l, seriesIndex: l.seriesIndex })
|
|
1388
|
+
}, U(Be(l, E.value)) + " " + U(e.value.style.chart.layout.labels.value.show ? `(${u(W)(
|
|
1389
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
1390
|
+
l.value,
|
|
1391
|
+
u(X)({
|
|
1392
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1393
|
+
v: l.value,
|
|
1394
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1395
|
+
r: e.value.style.chart.layout.labels.value.rounding
|
|
1396
|
+
}),
|
|
1397
|
+
{ datapoint: l }
|
|
1398
|
+
)})` : ""), 45, uo), [
|
|
1399
|
+
[It, R(l) && m.value.dataLabels.show]
|
|
1400
|
+
]),
|
|
1401
|
+
Ft(h("text", {
|
|
1402
|
+
class: "vue-data-ui-datalabel-name",
|
|
1403
|
+
"text-anchor": u($)(l).anchor,
|
|
1404
|
+
x: u($)(l, !0, 12).x,
|
|
1405
|
+
y: u(ge)(l) + J.value * 1.2,
|
|
1406
|
+
fill: e.value.style.chart.layout.labels.name.color,
|
|
1407
|
+
"font-size": J.value + "px",
|
|
1408
|
+
style: C(`font-weight:${e.value.style.chart.layout.labels.name.bold ? "bold" : ""}`),
|
|
1409
|
+
onClick: (i) => ee(l, o),
|
|
1410
|
+
innerHTML: u(Ot)({
|
|
1411
|
+
content: l.name,
|
|
1412
|
+
fontSize: J.value,
|
|
1413
|
+
fill: e.value.style.chart.layout.labels.name.color,
|
|
1414
|
+
x: u($)(l, !0, 12).x,
|
|
1415
|
+
y: u(ge)(l) + J.value
|
|
1416
|
+
})
|
|
1417
|
+
}, null, 12, ro), [
|
|
1418
|
+
[It, R(l) && m.value.dataLabels.show]
|
|
1419
|
+
]),
|
|
1420
|
+
a[6] || (a[6] = Pe(' @mouseenter="useTooltip({ datapoint: arc, relativeIndex: i, seriesIndex: arc.seriesIndex, show: true })" @mouseleave="handleDatapointLeave({ datapoint: arc, seriesIndex: arc.seriesIndex })" /> ', -1))
|
|
1421
|
+
], 64)) : v("", !0),
|
|
1422
|
+
e.value.type === "polar" ? (s(), r(k, { key: 3 }, [
|
|
1423
|
+
R(l) && m.value.dataLabels.show ? (s(), r("text", {
|
|
1424
|
+
key: 0,
|
|
1425
|
+
class: "vue-data-ui-datalabel-value",
|
|
1426
|
+
"text-anchor": ce(d.value[o].middlePoint),
|
|
1427
|
+
x: u(P)({ initX: d.value[o].middlePoint.x, initY: d.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
|
|
1428
|
+
y: u(P)({ initX: d.value[o].middlePoint.x, initY: d.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y,
|
|
1429
|
+
fill: e.value.style.chart.layout.labels.percentage.color,
|
|
1430
|
+
"font-size": xe.value,
|
|
1431
|
+
style: C({
|
|
1432
|
+
transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
1433
|
+
fontWeight: e.value.style.chart.layout.labels.percentage.bold ? "bold" : "normal"
|
|
1434
|
+
}),
|
|
1435
|
+
onClick: (i) => ee(l, o),
|
|
1436
|
+
onMouseenter: (i) => fe({
|
|
1437
|
+
datapoint: l,
|
|
1438
|
+
relativeIndex: o,
|
|
1439
|
+
seriesIndex: l.seriesIndex,
|
|
1440
|
+
show: !0
|
|
1441
|
+
}),
|
|
1442
|
+
onMouseleave: (i) => he({ datapoint: l, seriesIndex: l.seriesIndex })
|
|
1443
|
+
}, U(Be(l, E.value)) + " " + U(e.value.style.chart.layout.labels.value.show ? `(${u(W)(
|
|
1444
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
1445
|
+
l.value,
|
|
1446
|
+
u(X)({
|
|
1447
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1448
|
+
v: l.value,
|
|
1449
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1450
|
+
r: e.value.style.chart.layout.labels.value.rounding
|
|
1451
|
+
}),
|
|
1452
|
+
{ datapoint: l }
|
|
1453
|
+
)})` : ""), 45, io)) : v("", !0),
|
|
1454
|
+
R(l) && m.value.dataLabels.show ? (s(), r("text", {
|
|
1455
|
+
key: 1,
|
|
1456
|
+
class: "vue-data-ui-datalabel-name",
|
|
1457
|
+
"text-anchor": ce(d.value[o].middlePoint),
|
|
1458
|
+
x: u(P)({ initX: d.value[o].middlePoint.x, initY: d.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
|
|
1459
|
+
y: u(P)({ initX: d.value[o].middlePoint.x, initY: d.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y + J.value * 1.2,
|
|
1460
|
+
fill: e.value.style.chart.layout.labels.name.color,
|
|
1461
|
+
"font-size": J.value,
|
|
1462
|
+
style: C({
|
|
1463
|
+
transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
1464
|
+
fontWeight: e.value.style.chart.layout.labels.name.bold ? "bold" : "normal"
|
|
1465
|
+
}),
|
|
1466
|
+
onClick: (i) => ee(l, o),
|
|
1467
|
+
innerHTML: u(Ot)({
|
|
1468
|
+
content: l.name,
|
|
1469
|
+
fontSize: xe.value,
|
|
1470
|
+
fill: e.value.style.chart.layout.labels.name.color,
|
|
1471
|
+
x: u(P)({ initX: d.value[o].middlePoint.x, initY: d.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x,
|
|
1472
|
+
y: u(P)({ initX: d.value[o].middlePoint.x, initY: d.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).y + J.value * 1.2
|
|
1473
|
+
})
|
|
1474
|
+
}, null, 12, vo)) : v("", !0),
|
|
1475
|
+
a[7] || (a[7] = Pe(' @mouseenter="useTooltip({ datapoint: arc, relativeIndex: i, seriesIndex: arc.seriesIndex, show: true })" @mouseleave="handleDatapointLeave({ datapoint: arc, seriesIndex: arc.seriesIndex })" /> ', -1))
|
|
1476
|
+
], 64)) : v("", !0)
|
|
1477
|
+
])),
|
|
1478
|
+
m.value.dataLabels.show && e.value.style.chart.comments.show && l.comment ? (s(), r("g", co, [
|
|
1479
|
+
R(l) && e.value.type === "classic" ? (s(), r("foreignObject", {
|
|
1480
|
+
key: 0,
|
|
1481
|
+
x: e.value.style.chart.comments.offsetX + (u($)(l, !0).anchor === "end" ? u($)(l).x - e.value.style.chart.comments.width : u($)(l, !0).anchor === "middle" ? u($)(l).x - e.value.style.chart.comments.width / 2 : u($)(l).x),
|
|
1482
|
+
y: u(ge)(l) + 24 + e.value.style.chart.comments.offsetY,
|
|
1483
|
+
width: e.value.style.chart.comments.width,
|
|
1484
|
+
height: "200",
|
|
1485
|
+
style: { overflow: "visible", "pointer-events": "none" }
|
|
1486
|
+
}, [
|
|
1487
|
+
h("div", null, [
|
|
1488
|
+
y(t.$slots, "plot-comment", {
|
|
1489
|
+
plot: { ...l, textAlign: u($)(l, !0, 16, !0).anchor, flexAlign: u($)(l, !0, 16).anchor, isFirstLoad: S.value }
|
|
1490
|
+
}, void 0, !0)
|
|
1491
|
+
])
|
|
1492
|
+
], 8, ho)) : v("", !0),
|
|
1493
|
+
R(l) && e.value.type === "polar" ? (s(), r("foreignObject", {
|
|
1494
|
+
key: 1,
|
|
1495
|
+
x: e.value.style.chart.comments.offsetX + (ce(d.value[o].middlePoint) === "end" ? u(P)({ initX: d.value[o].middlePoint.x, initY: d.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x - e.value.style.chart.comments.width : ce(d.value[o].middlePoint) === "middle" ? u(P)({ initX: d.value[o].middlePoint.x, initY: d.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x - e.value.style.chart.comments.width / 2 : u(P)({ initX: d.value[o].middlePoint.x, initY: d.value[o].middlePoint.y, offset: 42, centerX: n.value.width / 2, centerY: n.value.height / 2 }).x),
|
|
1496
|
+
y: vl(d.value[o]) + e.value.style.chart.comments.offsetY,
|
|
1497
|
+
width: e.value.style.chart.comments.width,
|
|
1498
|
+
height: "200",
|
|
1499
|
+
style: C({
|
|
1500
|
+
transition: S.value || !e.value.serieToggleAnimation.show ? "none" : `all ${e.value.serieToggleAnimation.durationMs}ms ease-in-out`,
|
|
1501
|
+
overflow: "visible",
|
|
1502
|
+
pointerEvents: "none"
|
|
1503
|
+
})
|
|
1504
|
+
}, [
|
|
1505
|
+
h("div", null, [
|
|
1506
|
+
y(t.$slots, "plot-comment", {
|
|
1507
|
+
plot: { ...l, textAlign: ce(d.value[o].middlePoint), flexAlign: ce(d.value[o].middlePoint), isFirstLoad: S.value }
|
|
1508
|
+
}, void 0, !0)
|
|
1509
|
+
])
|
|
1510
|
+
], 12, fo)) : v("", !0)
|
|
1511
|
+
])) : v("", !0)
|
|
1512
|
+
], 10, to))), 128)),
|
|
1513
|
+
y(t.$slots, "svg", { svg: n.value }, void 0, !0)
|
|
1514
|
+
], 512)
|
|
1515
|
+
], 14, sa)),
|
|
1516
|
+
t.$slots.watermark ? (s(), r("div", yo, [
|
|
1517
|
+
y(t.$slots, "watermark", N(Y({ isPrinting: u(ct) || u(ht) })), void 0, !0)
|
|
1518
|
+
])) : v("", !0),
|
|
1519
|
+
h("div", {
|
|
1520
|
+
id: `legend-bottom-${g.value}`
|
|
1521
|
+
}, null, 8, go),
|
|
1522
|
+
nt.value ? (s(), ae(Al, {
|
|
1523
|
+
key: 5,
|
|
1524
|
+
to: e.value.style.chart.legend.position === "top" ? `#legend-top-${g.value}` : `#legend-bottom-${g.value}`
|
|
1525
|
+
}, [
|
|
1526
|
+
h("div", {
|
|
1527
|
+
ref_key: "chartLegend",
|
|
1528
|
+
ref: Ke
|
|
1529
|
+
}, [
|
|
1530
|
+
e.value.style.chart.legend.show ? (s(), ae(la, {
|
|
1531
|
+
key: `legend_${ot.value}`,
|
|
1532
|
+
legendSet: Xe.value,
|
|
1533
|
+
config: ul.value,
|
|
1534
|
+
onClickMarker: a[3] || (a[3] = ({ i: l }) => Ce(l))
|
|
1535
|
+
}, qe({
|
|
1536
|
+
item: b(({ legend: l, index: o }) => [
|
|
1537
|
+
h("div", {
|
|
1538
|
+
style: C(`opacity:${z.value.includes(o) ? 0.5 : 1}`),
|
|
1539
|
+
onClick: (i) => l.segregate()
|
|
1540
|
+
}, U(l.display), 13, po)
|
|
1541
|
+
]),
|
|
1542
|
+
_: 2
|
|
1543
|
+
}, [
|
|
1544
|
+
t.$slots.pattern ? {
|
|
1545
|
+
name: "legend-pattern",
|
|
1546
|
+
fn: b(({ legend: l, index: o }) => [
|
|
1547
|
+
Te(Kl, {
|
|
1548
|
+
shape: l.shape,
|
|
1549
|
+
radius: 30,
|
|
1550
|
+
stroke: "none",
|
|
1551
|
+
plot: { x: 30, y: 30 },
|
|
1552
|
+
fill: `url(#pattern_${g.value}_${o})`
|
|
1553
|
+
}, null, 8, ["shape", "fill"])
|
|
1554
|
+
]),
|
|
1555
|
+
key: "0"
|
|
1556
|
+
} : void 0
|
|
1557
|
+
]), 1032, ["legendSet", "config"])) : v("", !0),
|
|
1558
|
+
y(t.$slots, "legend", { legend: Xe.value }, void 0, !0)
|
|
1559
|
+
], 512)
|
|
1560
|
+
], 8, ["to"])) : v("", !0),
|
|
1561
|
+
t.$slots.source ? (s(), r("div", {
|
|
1562
|
+
key: 6,
|
|
1563
|
+
ref_key: "source",
|
|
1564
|
+
ref: et,
|
|
1565
|
+
dir: "auto"
|
|
1566
|
+
}, [
|
|
1567
|
+
y(t.$slots, "source", {}, void 0, !0)
|
|
1568
|
+
], 512)) : v("", !0),
|
|
1569
|
+
t.$slots.hollow ? (s(), r("div", mo, [
|
|
1570
|
+
y(t.$slots, "hollow", N(Y({
|
|
1571
|
+
total: F.value,
|
|
1572
|
+
average: Ve.value,
|
|
1573
|
+
dataset: L.value
|
|
1574
|
+
})), void 0, !0)
|
|
1575
|
+
])) : v("", !0),
|
|
1576
|
+
Te(u(Bt), {
|
|
1577
|
+
show: m.value.showTooltip && Oe.value,
|
|
1578
|
+
backgroundColor: e.value.style.chart.tooltip.backgroundColor,
|
|
1579
|
+
color: e.value.style.chart.tooltip.color,
|
|
1580
|
+
fontSize: e.value.style.chart.tooltip.fontSize,
|
|
1581
|
+
borderRadius: e.value.style.chart.tooltip.borderRadius,
|
|
1582
|
+
borderColor: e.value.style.chart.tooltip.borderColor,
|
|
1583
|
+
borderWidth: e.value.style.chart.tooltip.borderWidth,
|
|
1584
|
+
backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
|
|
1585
|
+
position: e.value.style.chart.tooltip.position,
|
|
1586
|
+
offsetY: e.value.style.chart.tooltip.offsetY,
|
|
1587
|
+
parent: B.value,
|
|
1588
|
+
content: De.value,
|
|
1589
|
+
isCustom: me.value,
|
|
1590
|
+
isFullscreen: re.value,
|
|
1591
|
+
smooth: e.value.style.chart.tooltip.smooth,
|
|
1592
|
+
backdropFilter: e.value.style.chart.tooltip.backdropFilter,
|
|
1593
|
+
smoothForce: e.value.style.chart.tooltip.smoothForce,
|
|
1594
|
+
smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThrehsold
|
|
1595
|
+
}, {
|
|
1596
|
+
"tooltip-before": b(() => [
|
|
1597
|
+
y(t.$slots, "tooltip-before", N(Y({ ...Ee.value })), void 0, !0)
|
|
1598
|
+
]),
|
|
1599
|
+
"tooltip-after": b(() => [
|
|
1600
|
+
y(t.$slots, "tooltip-after", N(Y({ ...Ee.value })), void 0, !0)
|
|
1601
|
+
]),
|
|
1602
|
+
_: 3
|
|
1603
|
+
}, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
|
|
1604
|
+
we.value && e.value.userOptions.buttons.table ? (s(), ae(Sl(be.value.component), He({ key: 8 }, be.value.props, {
|
|
1605
|
+
ref_key: "tableUnit",
|
|
1606
|
+
ref: pe,
|
|
1607
|
+
onClose: At
|
|
1608
|
+
}), qe({
|
|
1609
|
+
content: b(() => [
|
|
1610
|
+
(s(), ae(u(Rt), {
|
|
1611
|
+
key: `table_${at.value}`,
|
|
1612
|
+
colNames: Ae.value.colNames,
|
|
1613
|
+
head: Ae.value.head,
|
|
1614
|
+
body: Ae.value.body,
|
|
1615
|
+
config: Ae.value.config,
|
|
1616
|
+
title: e.value.table.useDialog ? "" : be.value.title,
|
|
1617
|
+
withCloseButton: !e.value.table.useDialog,
|
|
1618
|
+
onClose: At
|
|
1619
|
+
}, {
|
|
1620
|
+
th: b(({ th: l }) => [
|
|
1621
|
+
h("div", {
|
|
1622
|
+
innerHTML: l,
|
|
1623
|
+
style: { display: "flex", "align-items": "center" }
|
|
1624
|
+
}, null, 8, bo)
|
|
1625
|
+
]),
|
|
1626
|
+
td: b(({ td: l }) => [
|
|
1627
|
+
Pe(U(l.name ? l.name : isNaN(Number(l)) ? l.includes("%") ? l : u(W)(
|
|
1628
|
+
e.value.style.chart.layout.labels.percentage.formatter,
|
|
1629
|
+
l,
|
|
1630
|
+
u(X)({
|
|
1631
|
+
v: l,
|
|
1632
|
+
s: "%",
|
|
1633
|
+
r: e.value.style.chart.layout.labels.percentage.rounding
|
|
1634
|
+
})
|
|
1635
|
+
) : u(W)(
|
|
1636
|
+
e.value.style.chart.layout.labels.value.formatter,
|
|
1637
|
+
l,
|
|
1638
|
+
u(X)({
|
|
1639
|
+
p: e.value.style.chart.layout.labels.dataLabels.prefix,
|
|
1640
|
+
v: l,
|
|
1641
|
+
s: e.value.style.chart.layout.labels.dataLabels.suffix,
|
|
1642
|
+
r: e.value.style.chart.layout.labels.value.rounding
|
|
1643
|
+
})
|
|
1644
|
+
)), 1)
|
|
1645
|
+
]),
|
|
1646
|
+
_: 1
|
|
1647
|
+
}, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
|
|
1648
|
+
]),
|
|
1649
|
+
_: 2
|
|
1650
|
+
}, [
|
|
1651
|
+
e.value.table.useDialog ? {
|
|
1652
|
+
name: "title",
|
|
1653
|
+
fn: b(() => [
|
|
1654
|
+
Pe(U(be.value.title), 1)
|
|
1655
|
+
]),
|
|
1656
|
+
key: "0"
|
|
1657
|
+
} : void 0,
|
|
1658
|
+
e.value.table.useDialog ? {
|
|
1659
|
+
name: "actions",
|
|
1660
|
+
fn: b(() => [
|
|
1661
|
+
h("button", {
|
|
1662
|
+
tabindex: "0",
|
|
1663
|
+
class: "vue-ui-user-options-button",
|
|
1664
|
+
onClick: a[4] || (a[4] = (l) => Re(e.value.userOptions.callbacks.csv))
|
|
1665
|
+
}, [
|
|
1666
|
+
Te(u(Vt), {
|
|
1667
|
+
name: "excel",
|
|
1668
|
+
stroke: be.value.props.color
|
|
1669
|
+
}, null, 8, ["stroke"])
|
|
1670
|
+
])
|
|
1671
|
+
]),
|
|
1672
|
+
key: "1"
|
|
1673
|
+
} : void 0
|
|
1674
|
+
]), 1040)) : v("", !0),
|
|
1675
|
+
u($e) ? (s(), ae(Hl, { key: 9 })) : v("", !0)
|
|
1676
|
+
], 46, oa));
|
|
1677
|
+
}
|
|
1678
|
+
}, Do = /* @__PURE__ */ aa(wo, [["__scopeId", "data-v-a23e4322"]]);
|
|
1679
|
+
export {
|
|
1680
|
+
Do as default
|
|
1681
|
+
};
|