vue-data-ui 3.25.11 → 3.25.13
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/dist/{Arrow-DLn-pcrh.js → Arrow-BhZDUeMp.js} +1 -1
- package/dist/{BaseDraggableDialog-Gm4Q30j0.js → BaseDraggableDialog-Ck6R5Q0K.js} +2 -2
- package/dist/{BaseIcon-D8R6_sKH.js → BaseIcon-Dlz7gfx0.js} +1 -1
- package/dist/{BaseLegendToggle-CXQrLjd-.js → BaseLegendToggle-DGG65LAR.js} +1 -1
- package/dist/{BaseZoomControls-BTzjVDPM.js → BaseZoomControls-BK0PxEa8.js} +2 -2
- package/dist/{ColorPicker-CUy15T72.js → ColorPicker-DMTwxvi_.js} +2 -2
- package/dist/{DataTable-oiM9uWrQ.js → DataTable-BD1eZ0zB.js} +2 -2
- package/dist/{HillActions-Dn8aKOVJ.js → HillActions-CiP2m7Nz.js} +1 -1
- package/dist/{Legend-X4kF4PvW.js → Legend-C0Ln0VNe.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DFXjpRyl.js → NonSvgPenAndPaper-BjrMLISf.js} +3 -3
- package/dist/{PackageVersion-CEvZNFTz.js → PackageVersion-D5QkTJQU.js} +1 -1
- package/dist/{PenAndPaper-Cd3nItcO.js → PenAndPaper-XdUD8uB3.js} +3 -3
- package/dist/{Shape-CIqU-p2F.js → Shape-VCdxvFV9.js} +3 -3
- package/dist/{SlicerPreview-Ccss7Vsq.js → SlicerPreview-BJ4usfYd.js} +21 -21
- package/dist/{SparkTooltip-L3SliZbR.js → SparkTooltip-B1gRxPfb.js} +6 -6
- package/dist/{Title-CPHi-evi.js → Title-DeqmC-vN.js} +1 -1
- package/dist/{Tooltip-hhrkQ3Lk.js → Tooltip-DZ4a3XJQ.js} +1 -1
- package/dist/{UserOptions-qo_Tsqci.js → UserOptions-wFD9vo9g.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +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-label.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-BR4imuKV.js → dom-to-png-DdqmzDdY.js} +1 -1
- package/dist/exposedLib-BBtjpydc.js +28 -0
- package/dist/{img-BkMKbWsI.js → img-W50sC9SC.js} +1 -1
- package/dist/{labelUtils-BXX2NzRe.js → labelUtils-Dvm-7rse.js} +1 -1
- package/dist/{lib-Dql7cqyA.js → lib-DOpaUOQx.js} +191 -88
- package/dist/{package-B10eQN5L.js → package-Cmcke8zR.js} +1 -1
- package/dist/{pdf-BSOs_GZz.js → pdf-zGbDDpCi.js} +1 -1
- package/dist/{render-common-CZ6-MONw.js → render-common-CG1wuHZY.js} +16 -16
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +6 -0
- package/dist/{useConfig-D32D002m.js → useConfig-C2uy4ltq.js} +2 -0
- package/dist/{useNestedProp-Chvyfpl-.js → useNestedProp-Bux0f4iY.js} +1 -1
- package/dist/{useObjectBindings-Cd_WuYIn.js → useObjectBindings-CEuNiBIT.js} +1 -1
- package/dist/{usePrinter-hohanNCX.js → usePrinter-BBBooAGP.js} +2 -2
- package/dist/utils.js +13 -13
- package/dist/{vue-data-ui-zJ1rNxIN.js → vue-data-ui-BVzA0tEV.js} +70 -70
- package/dist/vue-data-ui.js +75 -75
- package/dist/{vue-ui-3d-bar-CKTAkCAN.js → vue-ui-3d-bar-Ckauu3d4.js} +536 -536
- package/dist/{vue-ui-accordion-DmkL8A59.js → vue-ui-accordion-yHZMJLaY.js} +4 -4
- package/dist/vue-ui-age-pyramid-BczIt1-U.js +1305 -0
- package/dist/{vue-ui-annotator-BLYRy--7.js → vue-ui-annotator-BGB6K6u0.js} +60 -60
- package/dist/{vue-ui-bullet-Ck398xn8.js → vue-ui-bullet-BoTsLccZ.js} +84 -84
- package/dist/{vue-ui-bump-DyA47yse.js → vue-ui-bump-B5ztSSQO.js} +105 -105
- package/dist/{vue-ui-candlestick-DCavjk1j.js → vue-ui-candlestick-BJtdA4Yu.js} +98 -98
- package/dist/vue-ui-carousel-table-D-3KSWok.js +467 -0
- package/dist/vue-ui-chestnut-W2l-W0_e.js +2016 -0
- package/dist/{vue-ui-chord-GgA7QFUH.js → vue-ui-chord-BFPQsMj8.js} +63 -63
- package/dist/{vue-ui-circle-pack-BUXTVdy3.js → vue-ui-circle-pack-BtPc1BR3.js} +50 -50
- package/dist/{vue-ui-cursor-CEejESe_.js → vue-ui-cursor-CpNOiwkt.js} +61 -61
- package/dist/{vue-ui-dag-C1c6scxC.js → vue-ui-dag-i-zPwLcN.js} +44 -44
- package/dist/{vue-ui-dashboard-BZBJM7dN.js → vue-ui-dashboard-DtaW9a2P.js} +70 -70
- package/dist/{vue-ui-digits-CsougDlU.js → vue-ui-digits-BIlec9af.js} +4 -4
- package/dist/{vue-ui-donut-lBgSYKgO.js → vue-ui-donut-Bgf-n95J.js} +551 -551
- package/dist/{vue-ui-donut-Be9jKelz.js → vue-ui-donut-CJlBEyxu.js} +203 -203
- package/dist/vue-ui-donut-evolution-C0BKntfL.js +1552 -0
- package/dist/{vue-ui-dumbbell-CwmA5x9G.js → vue-ui-dumbbell-C112YLkC.js} +87 -87
- package/dist/{vue-ui-flow-CRhh8SSN.js → vue-ui-flow-j4bDg9Zd.js} +99 -99
- package/dist/{vue-ui-funnel-DH1hW8Gw.js → vue-ui-funnel-CVHpfBCW.js} +40 -40
- package/dist/vue-ui-galaxy-ChGpUWh8.js +1097 -0
- package/dist/{vue-ui-gauge-CV4-Rn7K.js → vue-ui-gauge-Cp00vXfG.js} +190 -190
- package/dist/{vue-ui-geo-BocLrguL.js → vue-ui-geo-B4hDk5NO.js} +12 -12
- package/dist/{vue-ui-gizmo-6wKlI5PC.js → vue-ui-gizmo-D6nCCsS4.js} +54 -54
- package/dist/vue-ui-heatmap-scVJc1cw.js +1606 -0
- package/dist/{vue-ui-hill-CeIZZFf5.js → vue-ui-hill-DnYUHGAK.js} +21 -21
- package/dist/vue-ui-history-plot-C5qAMaaW.js +1710 -0
- package/dist/{vue-ui-horizontal-bar-D2aw-8tx.js → vue-ui-horizontal-bar-nEG4uvpv.js} +85 -85
- package/dist/{vue-ui-kpi-BQ967gzv.js → vue-ui-kpi-DOxId6xg.js} +12 -12
- package/dist/{vue-ui-label-Cs4ZlAqr.js → vue-ui-label-BDKY7BI7.js} +4 -4
- package/dist/{vue-ui-mini-loader-wGeACd-Y.js → vue-ui-mini-loader-BknVs9VJ.js} +3 -3
- package/dist/vue-ui-molecule-_x232mMu.js +941 -0
- package/dist/vue-ui-mood-radar-D-F4855V.js +1111 -0
- package/dist/{vue-ui-nested-donuts-DT2zkLx2.js → vue-ui-nested-donuts-0E5IllFW.js} +481 -481
- package/dist/vue-ui-onion-Eip0S1H7.js +1247 -0
- package/dist/vue-ui-parallel-coordinate-plot-DO0sQdJw.js +1444 -0
- package/dist/vue-ui-quadrant-CA0ClWfL.js +1979 -0
- package/dist/{vue-ui-quick-chart-CkPu6GMh.js → vue-ui-quick-chart-D-VuAoll.js} +169 -169
- package/dist/vue-ui-radar-BTD7Y0Ps.js +1386 -0
- package/dist/vue-ui-rating-C_Qj6gnP.js +359 -0
- package/dist/vue-ui-relation-circle-CcxLBVFV.js +905 -0
- package/dist/vue-ui-ridgeline-BZrzbbhb.js +1630 -0
- package/dist/{vue-ui-rings-CBtHZ5Pp.js → vue-ui-rings-CO48GOP2.js} +78 -78
- package/dist/{vue-ui-scatter-DzePsQEe.js → vue-ui-scatter-DrxUgZbQ.js} +136 -136
- package/dist/{vue-ui-skeleton-C347nFnE.js → vue-ui-skeleton-CeKjW4MX.js} +510 -510
- package/dist/{vue-ui-smiley-BIjAIpJ9.js → vue-ui-smiley-BvRwx69s.js} +6 -6
- package/dist/{vue-ui-spark-trend-Di_7Da43.js → vue-ui-spark-trend-DnujGRyt.js} +96 -96
- package/dist/{vue-ui-sparkbar-CbJ-fKc6.js → vue-ui-sparkbar-Cd_uhYGD.js} +113 -113
- package/dist/vue-ui-sparkgauge-hT31YEtt.js +268 -0
- package/dist/vue-ui-sparkhistogram-PKlTYhKA.js +589 -0
- package/dist/vue-ui-sparkline-BSu1uRvP.js +1610 -0
- package/dist/{vue-ui-sparkstackbar-IM_l98X-.js → vue-ui-sparkstackbar-R0ij2vi1.js} +183 -183
- package/dist/vue-ui-stackbar-BrzzkGFk.js +2369 -0
- package/dist/vue-ui-stackline-zEX3gR3y.js +2483 -0
- package/dist/{vue-ui-strip-plot-CVV0t6mb.js → vue-ui-strip-plot-DR3N56rS.js} +253 -253
- package/dist/{vue-ui-table-nAGCIZKg.js → vue-ui-table-Bg6BeLrf.js} +117 -117
- package/dist/{vue-ui-table-heatmap-D5F5bLx5.js → vue-ui-table-heatmap-C1b1Pcp8.js} +95 -95
- package/dist/vue-ui-table-sparkline-CkVXyequ.js +738 -0
- package/dist/{vue-ui-thermometer-Ccr2ZnzI.js → vue-ui-thermometer-CqkaMF7Z.js} +23 -23
- package/dist/{vue-ui-timer-DkW-P6EG.js → vue-ui-timer-CgJvNwBv.js} +13 -13
- package/dist/{vue-ui-tiremarks-Bf2anKLr.js → vue-ui-tiremarks-B078YJ9M.js} +30 -30
- package/dist/{vue-ui-treemap-Wy61KlkN.js → vue-ui-treemap-Cfjf8mDl.js} +77 -77
- package/dist/vue-ui-waffle-BZIcPa0l.js +1633 -0
- package/dist/{vue-ui-wheel-DGhu_B8n.js → vue-ui-wheel-CPTm8AHn.js} +185 -185
- package/dist/{vue-ui-word-cloud-CdRMst8U.js → vue-ui-word-cloud-DnGblUwj.js} +46 -46
- package/dist/{vue-ui-world-Bc4hMzzB.js → vue-ui-world-KkcpeKqp.js} +133 -133
- package/dist/vue-ui-xy-C6lVqZnx.js +5367 -0
- package/dist/{vue-ui-xy-CbgQs7yW.js → vue-ui-xy-ClCV7xA5.js} +169 -169
- package/dist/{vue-ui-xy-canvas-R2xbgDOy.js → vue-ui-xy-canvas-BlpCbXKR.js} +435 -435
- package/package.json +1 -1
- package/dist/exposedLib-CG3aXJ-v.js +0 -28
- package/dist/vue-ui-age-pyramid-SpPactMh.js +0 -1305
- package/dist/vue-ui-carousel-table-DCnVD0BJ.js +0 -467
- package/dist/vue-ui-chestnut-BDBdizBp.js +0 -2016
- package/dist/vue-ui-donut-evolution-vLMhwz4K.js +0 -1552
- package/dist/vue-ui-galaxy-CiqILfxR.js +0 -1097
- package/dist/vue-ui-heatmap-DGXXRsr4.js +0 -1606
- package/dist/vue-ui-history-plot-CporPpg9.js +0 -1710
- package/dist/vue-ui-molecule-CvDC9Ht5.js +0 -941
- package/dist/vue-ui-mood-radar-BK1va5-H.js +0 -1111
- package/dist/vue-ui-onion-DPMikBzZ.js +0 -1247
- package/dist/vue-ui-parallel-coordinate-plot-DMPxUL3p.js +0 -1444
- package/dist/vue-ui-quadrant-DFkIeJXo.js +0 -1979
- package/dist/vue-ui-radar-B3OOLJal.js +0 -1386
- package/dist/vue-ui-rating-Criq0ofQ.js +0 -359
- package/dist/vue-ui-relation-circle-I6e5UxgY.js +0 -905
- package/dist/vue-ui-ridgeline-FmmdCdy9.js +0 -1630
- package/dist/vue-ui-sparkgauge-Bb9-yFTb.js +0 -268
- package/dist/vue-ui-sparkhistogram-kbbbDVul.js +0 -589
- package/dist/vue-ui-sparkline-BF0Fdo6v.js +0 -1587
- package/dist/vue-ui-stackbar-CaEXVeo5.js +0 -2369
- package/dist/vue-ui-stackline-MgvhcBfm.js +0 -2483
- package/dist/vue-ui-table-sparkline-Bf2hjBwq.js +0 -738
- package/dist/vue-ui-waffle-CkIFp-AN.js +0 -1633
- package/dist/vue-ui-xy-DybWfQrI.js +0 -5298
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as y } from "./useConfig-
|
|
1
|
+
import { $ as e, $t as t, Ft as n, Jt as r, S as i, Vt as a, X as o, Y as s, b as c, f as l, h as u, i as d, j as f, ot as p, p as m, qt as h, t as g, tn as _, zt as v } from "./lib-DOpaUOQx.js";
|
|
2
|
+
import { t as y } from "./useConfig-C2uy4ltq.js";
|
|
3
3
|
import { t as b } from "./vue_ui_donut-BDGqG07h.js";
|
|
4
|
-
import { _ as x, a as S, c as C, d as w, g as T, i as E, l as D, n as O, o as k, p as A, r as j, s as ee, t as te, u as M, v as N } from "./render-common-
|
|
4
|
+
import { _ as x, a as S, c as C, d as w, g as T, i as E, l as D, n as O, o as k, p as A, r as j, s as ee, t as te, u as M, v as N } from "./render-common-CG1wuHZY.js";
|
|
5
5
|
//#region src/svg/vue-ui-donut/create.js
|
|
6
6
|
var { vue_ui_donut: ne } = y();
|
|
7
7
|
function re({ config: e = {} } = {}) {
|
|
8
|
-
let
|
|
9
|
-
userConfig:
|
|
8
|
+
let n = e ?? {}, r = _({
|
|
9
|
+
userConfig: n,
|
|
10
10
|
defaultConfig: ne
|
|
11
11
|
}), i = r.theme;
|
|
12
12
|
if (!i) return {
|
|
13
13
|
...r,
|
|
14
|
-
customPalette: r.customPalette?.length ? r.customPalette :
|
|
14
|
+
customPalette: r.customPalette?.length ? r.customPalette : a
|
|
15
15
|
};
|
|
16
|
-
let
|
|
16
|
+
let o = _({
|
|
17
17
|
userConfig: b[i] || {},
|
|
18
18
|
defaultConfig: r
|
|
19
|
-
}),
|
|
20
|
-
userConfig:
|
|
21
|
-
defaultConfig:
|
|
19
|
+
}), s = _({
|
|
20
|
+
userConfig: n,
|
|
21
|
+
defaultConfig: o
|
|
22
22
|
});
|
|
23
23
|
return {
|
|
24
|
-
...
|
|
25
|
-
customPalette:
|
|
24
|
+
...s,
|
|
25
|
+
customPalette: s.customPalette?.length ? s.customPalette : t[i] || a
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
function P(e, t = 0) {
|
|
@@ -39,26 +39,26 @@ function ae(e, t) {
|
|
|
39
39
|
return String(e?.name ?? e?.label ?? `Serie ${t + 1}`);
|
|
40
40
|
}
|
|
41
41
|
function oe(e = [], t) {
|
|
42
|
-
let
|
|
42
|
+
let n = Array.isArray(t.customPalette) ? t.customPalette : a;
|
|
43
43
|
return (Array.isArray(e) ? e : []).map((e, t) => ({
|
|
44
44
|
source: e,
|
|
45
45
|
sourceIndex: t,
|
|
46
46
|
value: ie(e)
|
|
47
47
|
})).filter((e) => Number.isFinite(e.value)).sort((e, t) => e.source?.ghost && !t.source?.ghost ? 1 : t.source?.ghost && !e.source?.ghost ? -1 : t.value - e.value).map((e, t) => {
|
|
48
|
-
let
|
|
48
|
+
let r = e.source, a = e.value, o = (r?.color ? i(r.color) : "") || n[t % n.length];
|
|
49
49
|
return {
|
|
50
|
-
...
|
|
51
|
-
id:
|
|
52
|
-
name: ae(
|
|
50
|
+
...r,
|
|
51
|
+
id: r?.id ?? `donut_serie_${t}`,
|
|
52
|
+
name: ae(r, t),
|
|
53
53
|
value: a,
|
|
54
54
|
absoluteValue: Math.abs(a),
|
|
55
|
-
absoluteValues: Array.isArray(
|
|
55
|
+
absoluteValues: Array.isArray(r?.values) ? r.values : [a],
|
|
56
56
|
color: o,
|
|
57
57
|
index: t,
|
|
58
58
|
sourceIndex: e.sourceIndex,
|
|
59
|
-
patternIndex:
|
|
60
|
-
seriesIndex:
|
|
61
|
-
ghost: !!
|
|
59
|
+
patternIndex: r?.patternIndex ?? t,
|
|
60
|
+
seriesIndex: r?.seriesIndex ?? t,
|
|
61
|
+
ghost: !!r?.ghost
|
|
62
62
|
};
|
|
63
63
|
}).filter((e) => Number.isFinite(e.absoluteValue));
|
|
64
64
|
}
|
|
@@ -117,7 +117,7 @@ function le({ dataset: e = [], config: t = {}, width: n = 512, height: r = 512,
|
|
|
117
117
|
}
|
|
118
118
|
//#endregion
|
|
119
119
|
//#region src/svg/vue-ui-donut/render.js
|
|
120
|
-
var ue =
|
|
120
|
+
var ue = o();
|
|
121
121
|
function I() {
|
|
122
122
|
return ue;
|
|
123
123
|
}
|
|
@@ -210,8 +210,8 @@ function me(e, t) {
|
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
212
|
function he(e, t) {
|
|
213
|
-
let
|
|
214
|
-
return
|
|
213
|
+
let r = x(S(e.config, "layout.donut.rotation", 105.25), 105.25);
|
|
214
|
+
return n({ series: t }, e.center.x, e.center.y, e.radius, e.radius, 1.99999, 2, 1, 360, r, V(e.config) ? e.radius : e.thickness).map((e, n) => ({
|
|
215
215
|
...e,
|
|
216
216
|
index: n,
|
|
217
217
|
color: k(e.color, t[n]?.color),
|
|
@@ -223,7 +223,7 @@ function he(e, t) {
|
|
|
223
223
|
}
|
|
224
224
|
function ge(e, t) {
|
|
225
225
|
let n = Math.max(1, ...t.map((e) => Math.abs(x(e.value, 0)))), r = t.map((e) => Math.abs(x(e.value, 0)) / n);
|
|
226
|
-
return
|
|
226
|
+
return f({
|
|
227
227
|
series: r,
|
|
228
228
|
center: e.center,
|
|
229
229
|
maxRadius: Math.min(e.drawingArea.width, e.drawingArea.height) / 3,
|
|
@@ -271,53 +271,53 @@ function ve(e) {
|
|
|
271
271
|
})), M("g", { "data-layer": "title" }, d.join(""));
|
|
272
272
|
}
|
|
273
273
|
function ye(e, t) {
|
|
274
|
-
let { config: n } = e,
|
|
275
|
-
if (
|
|
276
|
-
let
|
|
277
|
-
if (
|
|
274
|
+
let { config: n } = e, i = [], a = !!S(n, "useGradient", !1), o = !!S(n, "layout.donut.useShadow", !1);
|
|
275
|
+
if (a) {
|
|
276
|
+
let a = E(n, "type", "classic"), o = x(S(n, "gradientIntensity", 30), 30);
|
|
277
|
+
if (a === "classic" && Number.isFinite(e.thickness / e.radius)) {
|
|
278
278
|
let t = V(n) ? 1 : e.thickness / e.radius;
|
|
279
|
-
|
|
279
|
+
i.push(M("radialGradient", { id: H(e) }, [
|
|
280
280
|
w("stop", {
|
|
281
281
|
offset: "0%",
|
|
282
|
-
"stop-color":
|
|
282
|
+
"stop-color": h(L(n), 0),
|
|
283
283
|
"stop-opacity": 0
|
|
284
284
|
}),
|
|
285
285
|
w("stop", {
|
|
286
286
|
offset: `${(1 - t) * 100}%`,
|
|
287
|
-
"stop-color":
|
|
287
|
+
"stop-color": h("#FFFFFF", 0),
|
|
288
288
|
"stop-opacity": 0
|
|
289
289
|
}),
|
|
290
290
|
w("stop", {
|
|
291
291
|
offset: `${(1 - t / 2) * 100}%`,
|
|
292
|
-
"stop-color":
|
|
292
|
+
"stop-color": h("#FFFFFF", o)
|
|
293
293
|
}),
|
|
294
294
|
w("stop", {
|
|
295
295
|
offset: "100%",
|
|
296
|
-
"stop-color":
|
|
296
|
+
"stop-color": h(L(n), 0),
|
|
297
297
|
"stop-opacity": 0
|
|
298
298
|
})
|
|
299
299
|
].join("")));
|
|
300
300
|
}
|
|
301
|
-
|
|
302
|
-
let
|
|
303
|
-
|
|
301
|
+
a === "polar" && t.forEach((t, n) => {
|
|
302
|
+
let a = e.polarAreas?.[n];
|
|
303
|
+
a?.middlePoint && i.push(M("radialGradient", {
|
|
304
304
|
id: U(e, n),
|
|
305
|
-
cx: `${
|
|
306
|
-
cy: `${
|
|
305
|
+
cx: `${c(a.middlePoint.x / e.width * 100)}%`,
|
|
306
|
+
cy: `${c(a.middlePoint.y / e.height * 100)}%`,
|
|
307
307
|
r: "62%"
|
|
308
308
|
}, [w("stop", {
|
|
309
309
|
offset: "0%",
|
|
310
|
-
"stop-color":
|
|
311
|
-
"stop-opacity":
|
|
310
|
+
"stop-color": r(t.color, .05),
|
|
311
|
+
"stop-opacity": o / 100
|
|
312
312
|
}), w("stop", {
|
|
313
313
|
offset: "100%",
|
|
314
314
|
"stop-color": t.color
|
|
315
315
|
})].join("")));
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
|
-
if (
|
|
319
|
-
let t = k(S(n, "layout.donut.shadowColor", "#000000"), "#000000"),
|
|
320
|
-
|
|
318
|
+
if (o) {
|
|
319
|
+
let t = k(S(n, "layout.donut.shadowColor", "#000000"), "#000000"), r = x(S(n, "layout.donut.shadowOpacity", .2), .2), a = x(S(n, "layout.donut.shadowBlur", 6), 6), o = x(S(n, "layout.donut.shadowOffsetY", 3), 3);
|
|
320
|
+
i.push(M("filter", {
|
|
321
321
|
id: W(e),
|
|
322
322
|
x: "-50%",
|
|
323
323
|
y: "-50%",
|
|
@@ -328,10 +328,10 @@ function ye(e, t) {
|
|
|
328
328
|
dy: o,
|
|
329
329
|
stdDeviation: a,
|
|
330
330
|
"flood-color": t,
|
|
331
|
-
"flood-opacity":
|
|
331
|
+
"flood-opacity": r
|
|
332
332
|
})].join("")));
|
|
333
333
|
}
|
|
334
|
-
return
|
|
334
|
+
return i.length ? M("defs", { "data-layer": "definitions" }, i.join("")) : "";
|
|
335
335
|
}
|
|
336
336
|
function be(e, t) {
|
|
337
337
|
return t.color;
|
|
@@ -387,22 +387,22 @@ function Ce(e, t, n) {
|
|
|
387
387
|
})));
|
|
388
388
|
}), M("g", { "data-layer": "polar-slices" }, a.join(""));
|
|
389
389
|
}
|
|
390
|
-
function q(
|
|
391
|
-
let { config:
|
|
392
|
-
p:
|
|
393
|
-
v:
|
|
394
|
-
s:
|
|
395
|
-
r: x(S(
|
|
390
|
+
function q(t, n, r = "layout.labels.value.rounding") {
|
|
391
|
+
let { config: i } = t, a = S(i, "layout.labels", {}), o = a.dataLabels ?? {}, s = a.value ?? {}, c = e({
|
|
392
|
+
p: o.prefix ?? "",
|
|
393
|
+
v: n.value,
|
|
394
|
+
s: o.suffix ?? "",
|
|
395
|
+
r: x(S(i, r, s.rounding ?? 0), s.rounding ?? 0)
|
|
396
396
|
});
|
|
397
|
-
return
|
|
397
|
+
return d(s.formatter, n.value, c, { datapoint: n });
|
|
398
398
|
}
|
|
399
|
-
function J(
|
|
400
|
-
let { config:
|
|
401
|
-
v:
|
|
399
|
+
function J(t, n) {
|
|
400
|
+
let { config: r } = t, i = S(r, "layout.labels.percentage", {}), a = x(n.proportion, 0) * 100, o = e({
|
|
401
|
+
v: a,
|
|
402
402
|
s: "%",
|
|
403
|
-
r: x(
|
|
403
|
+
r: x(i.rounding, 0)
|
|
404
404
|
});
|
|
405
|
-
return
|
|
405
|
+
return d(i.formatter, a, o, { datapoint: n });
|
|
406
406
|
}
|
|
407
407
|
function Y(e, t) {
|
|
408
408
|
let n = S(e.config, "layout.labels", {}), r = !!n.name?.show, i = !!(n.value?.show ?? !0), a = !!(n.percentage?.show ?? !0);
|
|
@@ -434,11 +434,11 @@ function Q(e) {
|
|
|
434
434
|
return !!S(e.config, "layout.curvedMarkers", S(e.config, "layout.donut.curvedMarkers", !1));
|
|
435
435
|
}
|
|
436
436
|
function Ee(e, t) {
|
|
437
|
-
let n = S(e.config, "layout.labels.dataLabels", {}), r = {}, i = e.center.x, a = e.center.y, o = x(n.smallArcClusterFontSize ?? n.fontSize, 10), s = o / 3,
|
|
437
|
+
let n = S(e.config, "layout.labels.dataLabels", {}), r = {}, i = e.center.x, a = e.center.y, o = x(n.smallArcClusterFontSize ?? n.fontSize, 10), s = o / 3, u = o * 1.5, d = e.drawingArea.top + 16, f = e.drawingArea.bottom - 16, p = i - (e.radius + 6), h = i + (e.radius + 6), g = Q(e);
|
|
438
438
|
function _(e) {
|
|
439
439
|
return {
|
|
440
|
-
x:
|
|
441
|
-
y:
|
|
440
|
+
x: c(e.center?.endX ?? e.endX),
|
|
441
|
+
y: c(e.center?.endY ?? e.endY)
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
444
|
function v({ midX: e, midY: t, bandX: n, bandY: r }) {
|
|
@@ -480,7 +480,7 @@ function Ee(e, t) {
|
|
|
480
480
|
}
|
|
481
481
|
function y(e) {
|
|
482
482
|
let t = String(e ?? "").split(/\n/g);
|
|
483
|
-
return
|
|
483
|
+
return u + Math.max(0, t.length - 1) * o * 1.2;
|
|
484
484
|
}
|
|
485
485
|
function b({ arc: e, index: t }) {
|
|
486
486
|
let n = _(e);
|
|
@@ -489,8 +489,8 @@ function Ee(e, t) {
|
|
|
489
489
|
index: t,
|
|
490
490
|
midX: n.x,
|
|
491
491
|
midY: n.y,
|
|
492
|
-
inlineMarkerX:
|
|
493
|
-
inlineMarkerY:
|
|
492
|
+
inlineMarkerX: l(e).x,
|
|
493
|
+
inlineMarkerY: m(e) - 3.5,
|
|
494
494
|
labelHeight: y(e.name)
|
|
495
495
|
};
|
|
496
496
|
}
|
|
@@ -550,13 +550,13 @@ function Ee(e, t) {
|
|
|
550
550
|
candidateList: D.TL,
|
|
551
551
|
side: "left",
|
|
552
552
|
bandMarkerX: p,
|
|
553
|
-
startY:
|
|
553
|
+
startY: d,
|
|
554
554
|
direction: "down"
|
|
555
555
|
}), E({
|
|
556
556
|
candidateList: D.TR,
|
|
557
557
|
side: "right",
|
|
558
|
-
bandMarkerX:
|
|
559
|
-
startY:
|
|
558
|
+
bandMarkerX: h,
|
|
559
|
+
startY: d,
|
|
560
560
|
direction: "down"
|
|
561
561
|
}), D.BL.length > 1 && E({
|
|
562
562
|
candidateList: D.BL,
|
|
@@ -567,32 +567,32 @@ function Ee(e, t) {
|
|
|
567
567
|
}), D.BR.length > 1 && E({
|
|
568
568
|
candidateList: D.BR,
|
|
569
569
|
side: "right",
|
|
570
|
-
bandMarkerX:
|
|
570
|
+
bandMarkerX: h,
|
|
571
571
|
startY: f,
|
|
572
572
|
direction: "up"
|
|
573
573
|
}), r;
|
|
574
574
|
}
|
|
575
575
|
function De({ state: e, arc: t, arcIndex: n, smallArcLayout: r, fontSize: i }) {
|
|
576
|
-
let a = S(e.config, "layout.labels", {}), o = a.percentage ?? {}, s = a.name ?? {}, c = r?.labelX ??
|
|
576
|
+
let a = S(e.config, "layout.labels", {}), o = a.percentage ?? {}, s = a.name ?? {}, c = r?.labelX ?? l(t, !0, 12).x, u = r?.labelY ?? m(t), d = r?.textAnchor ?? l(t, !0, 12).anchor, { name: f } = Y(e, t), h = we(e, t), g = String(f).split(/\n/g), _ = f ? g.map((t, n) => M("tspan", {
|
|
577
577
|
class: "vue-data-ui-datalabel-name",
|
|
578
578
|
x: n === 0 ? void 0 : c,
|
|
579
579
|
dy: n === 0 ? void 0 : i * 1.2,
|
|
580
580
|
fill: k(s.color, j(e.config)),
|
|
581
581
|
"font-size": i,
|
|
582
582
|
"font-weight": s.bold ? "700" : "400"
|
|
583
|
-
},
|
|
583
|
+
}, p(t + (n === g.length - 1 ? " " : "")))).join("") : "", v = h ? M("tspan", {
|
|
584
584
|
class: "vue-data-ui-datalabel-value",
|
|
585
585
|
fill: k(o.color, j(e.config)),
|
|
586
586
|
"font-size": i,
|
|
587
587
|
"font-weight": o.bold ? "700" : "400"
|
|
588
|
-
},
|
|
588
|
+
}, p(h)) : "";
|
|
589
589
|
return M("text", {
|
|
590
590
|
"data-cy": `donut-label-inline-${n}`,
|
|
591
591
|
class: "vue-data-ui-datalabel-inline",
|
|
592
592
|
x: c,
|
|
593
|
-
y:
|
|
594
|
-
"text-anchor":
|
|
595
|
-
}, `${
|
|
593
|
+
y: u,
|
|
594
|
+
"text-anchor": d
|
|
595
|
+
}, `${_}${v}`);
|
|
596
596
|
}
|
|
597
597
|
function Oe(e, t) {
|
|
598
598
|
let n = S(e.config, "layout.labels", {}), r = n.dataLabels ?? {};
|
|
@@ -618,21 +618,21 @@ function Oe(e, t) {
|
|
|
618
618
|
arc: t,
|
|
619
619
|
arcIndex: n,
|
|
620
620
|
smallArcLayout: {
|
|
621
|
-
labelX:
|
|
622
|
-
labelY:
|
|
623
|
-
textAnchor:
|
|
621
|
+
labelX: l(t, !1, a + i / 2).x,
|
|
622
|
+
labelY: m(t, a, a),
|
|
623
|
+
textAnchor: l(t).anchor
|
|
624
624
|
},
|
|
625
625
|
fontSize: i
|
|
626
626
|
}));
|
|
627
627
|
}), s.length ? M("g", { "data-layer": "data-labels" }, s.join("")) : "";
|
|
628
628
|
}
|
|
629
|
-
function ke(t, n
|
|
630
|
-
return
|
|
631
|
-
initX:
|
|
632
|
-
initY:
|
|
633
|
-
offset:
|
|
634
|
-
centerX:
|
|
635
|
-
centerY:
|
|
629
|
+
function ke(e, t, n = 42) {
|
|
630
|
+
return v({
|
|
631
|
+
initX: t.middlePoint.x,
|
|
632
|
+
initY: t.middlePoint.y,
|
|
633
|
+
offset: n,
|
|
634
|
+
centerX: e.center.x,
|
|
635
|
+
centerY: e.center.y
|
|
636
636
|
});
|
|
637
637
|
}
|
|
638
638
|
function Ae(e, t) {
|
|
@@ -644,70 +644,70 @@ function je(e, t, n, r) {
|
|
|
644
644
|
fill: k(a.color, j(e.config)),
|
|
645
645
|
"font-size": s,
|
|
646
646
|
"font-weight": a.bold ? "700" : "400"
|
|
647
|
-
},
|
|
647
|
+
}, p(String(X(e, t).replace(/\n/g, " / ")))), u = o.show ? String(t.name ?? "").split(/\n/g).map((t, r) => M("tspan", {
|
|
648
648
|
class: "vue-data-ui-datalabel-name",
|
|
649
649
|
x: r === 0 ? void 0 : n,
|
|
650
650
|
dy: r === 0 ? void 0 : c * 1.2,
|
|
651
651
|
fill: k(o.color, j(e.config)),
|
|
652
652
|
"font-size": c,
|
|
653
653
|
"font-weight": o.bold ? "700" : "400"
|
|
654
|
-
},
|
|
654
|
+
}, p(t))).join("") : "";
|
|
655
655
|
return r === "end" ? `${u}${l}` : `${l}${u}`;
|
|
656
656
|
}
|
|
657
|
-
function Me(e,
|
|
658
|
-
let
|
|
659
|
-
if (!E(e.config, "dataLabels.show",
|
|
660
|
-
let l = !!
|
|
661
|
-
return
|
|
662
|
-
let
|
|
663
|
-
if (!
|
|
664
|
-
let
|
|
657
|
+
function Me(e, t, n) {
|
|
658
|
+
let r = S(e.config, "layout.labels", {}), i = r.dataLabels ?? {}, a = r.value ?? {}, o = r.percentage ?? {}, c = r.name ?? {};
|
|
659
|
+
if (!E(e.config, "dataLabels.show", i.show ?? !0) || !i.show) return "";
|
|
660
|
+
let l = !!i.oneLine, u = x(a.fontSize, i.fontSize ?? 12), d = x(c.fontSize, i.fontSize ?? 12), f = [];
|
|
661
|
+
return t.forEach((t, r) => {
|
|
662
|
+
let i = n[r];
|
|
663
|
+
if (!i || !Z(e, t)) return;
|
|
664
|
+
let a = ke(e, i, 42), m = Ae(e, a);
|
|
665
665
|
if (l) {
|
|
666
666
|
f.push(M("text", {
|
|
667
667
|
"data-cy": "polar-label-inline",
|
|
668
668
|
class: "vue-data-ui-datalabel-inline",
|
|
669
|
-
x:
|
|
670
|
-
y:
|
|
671
|
-
"text-anchor":
|
|
672
|
-
}, je(e,
|
|
669
|
+
x: a.x,
|
|
670
|
+
y: a.y,
|
|
671
|
+
"text-anchor": m
|
|
672
|
+
}, je(e, t, a.x, m)));
|
|
673
673
|
return;
|
|
674
674
|
}
|
|
675
675
|
f.push(M("text", {
|
|
676
676
|
"data-cy": "polar-label-value",
|
|
677
677
|
class: "vue-data-ui-datalabel-value",
|
|
678
|
-
x:
|
|
679
|
-
y:
|
|
678
|
+
x: a.x,
|
|
679
|
+
y: a.y,
|
|
680
680
|
"font-size": u,
|
|
681
|
-
"font-weight":
|
|
682
|
-
"text-anchor":
|
|
681
|
+
"font-weight": o.bold ? "700" : "400",
|
|
682
|
+
"text-anchor": m,
|
|
683
683
|
fill: valueFill
|
|
684
684
|
}, te({
|
|
685
|
-
content: X(e,
|
|
686
|
-
x:
|
|
685
|
+
content: X(e, t),
|
|
686
|
+
x: a.x,
|
|
687
687
|
fontSize: u,
|
|
688
688
|
fill: valueFill,
|
|
689
|
-
textAnchor:
|
|
689
|
+
textAnchor: m
|
|
690
690
|
}))), c.show && f.push(M("text", {
|
|
691
691
|
"data-cy": "polar-label-name",
|
|
692
692
|
class: "vue-data-ui-datalabel-name",
|
|
693
|
-
x:
|
|
694
|
-
y:
|
|
693
|
+
x: a.x,
|
|
694
|
+
y: a.y + d * 1.2,
|
|
695
695
|
"font-size": d,
|
|
696
696
|
"font-weight": c.bold ? "700" : "400",
|
|
697
|
-
"text-anchor":
|
|
697
|
+
"text-anchor": m,
|
|
698
698
|
fill: k(c.color, j(e.config))
|
|
699
|
-
},
|
|
700
|
-
content:
|
|
699
|
+
}, s({
|
|
700
|
+
content: p(String(t.name ?? "")),
|
|
701
701
|
fontSize: d,
|
|
702
702
|
fill: k(c.color, j(e.config)),
|
|
703
|
-
x:
|
|
703
|
+
x: a.x
|
|
704
704
|
})));
|
|
705
705
|
}), f.length ? M("g", { "data-layer": "polar-data-labels" }, f.join("")) : "";
|
|
706
706
|
}
|
|
707
707
|
function Ne(e, t, n = null) {
|
|
708
708
|
if (n?.connectorPath) return n.connectorPath;
|
|
709
709
|
let r = S(e.config, "layout.labels.dataLabels", {}), i = x(r.offset, 16), a = x(r.markerFlatLength, 12), o = Q(e);
|
|
710
|
-
return
|
|
710
|
+
return u(t, !1, i, i, !1, !1, 0, a, o);
|
|
711
711
|
}
|
|
712
712
|
function Pe(e, t) {
|
|
713
713
|
let n = S(e.config, "layout.labels.dataLabels", {});
|
|
@@ -726,8 +726,8 @@ function Pe(e, t) {
|
|
|
726
726
|
fill: "none"
|
|
727
727
|
})), i.push(w("circle", {
|
|
728
728
|
"data-cy": `donut-label-marker-${a}`,
|
|
729
|
-
cx: o?.markerX ??
|
|
730
|
-
cy: o?.markerY ??
|
|
729
|
+
cx: o?.markerX ?? l(t).x,
|
|
730
|
+
cy: o?.markerY ?? m(t) - 3.5,
|
|
731
731
|
r: x(n.markerRadius, 3),
|
|
732
732
|
fill: t.color,
|
|
733
733
|
stroke: L(e.config),
|
|
@@ -735,38 +735,38 @@ function Pe(e, t) {
|
|
|
735
735
|
})));
|
|
736
736
|
}), i.length ? M("g", { "data-layer": "label-markers" }, i.join("")) : "";
|
|
737
737
|
}
|
|
738
|
-
function Fe(t, n
|
|
739
|
-
let
|
|
740
|
-
if (!E(
|
|
741
|
-
let
|
|
742
|
-
return
|
|
743
|
-
let
|
|
744
|
-
if (!
|
|
745
|
-
let
|
|
746
|
-
initX:
|
|
747
|
-
initY:
|
|
738
|
+
function Fe(e, t, n) {
|
|
739
|
+
let r = S(e.config, "layout.labels.dataLabels", {});
|
|
740
|
+
if (!E(e.config, "dataLabels.show", r.show ?? !0) || !r.show) return "";
|
|
741
|
+
let i = [];
|
|
742
|
+
return t.forEach((t, a) => {
|
|
743
|
+
let o = n[a];
|
|
744
|
+
if (!o?.middlePoint || !Z(e, t)) return;
|
|
745
|
+
let s = v({
|
|
746
|
+
initX: o.middlePoint.x,
|
|
747
|
+
initY: o.middlePoint.y,
|
|
748
748
|
offset: 24,
|
|
749
|
-
centerX:
|
|
750
|
-
centerY:
|
|
749
|
+
centerX: e.center.x,
|
|
750
|
+
centerY: e.center.y
|
|
751
751
|
});
|
|
752
|
-
|
|
753
|
-
"data-cy": `polar-marker-${
|
|
754
|
-
d: `M ${
|
|
755
|
-
stroke:
|
|
756
|
-
"stroke-width": x(
|
|
752
|
+
i.push(w("path", {
|
|
753
|
+
"data-cy": `polar-marker-${a}`,
|
|
754
|
+
d: `M ${s.x},${s.y} ${o.middlePoint.x},${o.middlePoint.y}`,
|
|
755
|
+
stroke: t.color,
|
|
756
|
+
"stroke-width": x(r.markerStrokeWidth, 1),
|
|
757
757
|
"stroke-linecap": "round",
|
|
758
758
|
"stroke-linejoin": "round",
|
|
759
759
|
fill: "none"
|
|
760
|
-
})),
|
|
761
|
-
"data-cy": `polar-label-marker-${
|
|
762
|
-
cx:
|
|
763
|
-
cy:
|
|
764
|
-
r: x(
|
|
765
|
-
fill:
|
|
766
|
-
stroke: L(
|
|
760
|
+
})), i.push(w("circle", {
|
|
761
|
+
"data-cy": `polar-label-marker-${a}`,
|
|
762
|
+
cx: s.x,
|
|
763
|
+
cy: s.y,
|
|
764
|
+
r: x(r.markerRadius, 3),
|
|
765
|
+
fill: t.color,
|
|
766
|
+
stroke: L(e.config),
|
|
767
767
|
"stroke-width": 1
|
|
768
768
|
}));
|
|
769
|
-
}),
|
|
769
|
+
}), i.length ? M("g", { "data-layer": "polar-label-markers" }, i.join("")) : "";
|
|
770
770
|
}
|
|
771
771
|
function $(e, t) {
|
|
772
772
|
return e == null || e === "" ? "" : N(e, {
|
|
@@ -774,75 +774,75 @@ function $(e, t) {
|
|
|
774
774
|
...t
|
|
775
775
|
});
|
|
776
776
|
}
|
|
777
|
-
function Ie(
|
|
778
|
-
if (E(
|
|
779
|
-
let
|
|
780
|
-
if (
|
|
781
|
-
let
|
|
777
|
+
function Ie(t, n, r) {
|
|
778
|
+
if (E(t.config, "type", "classic") !== "classic" || V(t.config) || !n) return "";
|
|
779
|
+
let i = S(t.config, "layout.labels.hollow", {}), a = i.total ?? {}, o = i.average ?? {}, s = [];
|
|
780
|
+
if (a.show) {
|
|
781
|
+
let r = x(a.fontSize, 14), i = !!o.show, c = t.center.y - (i ? r : 0) + x(a.offsetY, 0), l = a.value ?? {}, u = x(l.fontSize, r), f = d(l.formatter, n, e({
|
|
782
782
|
p: l.prefix ?? "",
|
|
783
|
-
v:
|
|
783
|
+
v: n,
|
|
784
784
|
s: l.suffix ?? "",
|
|
785
785
|
r: x(l.rounding, 0)
|
|
786
|
-
}), { total:
|
|
787
|
-
|
|
786
|
+
}), { total: n });
|
|
787
|
+
s.push($(a.text ?? "", {
|
|
788
788
|
"data-cy": "hollow-total-name",
|
|
789
|
-
x:
|
|
789
|
+
x: t.center.x,
|
|
790
790
|
y: c,
|
|
791
|
-
fill: k(
|
|
792
|
-
"font-size":
|
|
793
|
-
"font-weight":
|
|
794
|
-
})),
|
|
791
|
+
fill: k(a.color, j(t.config)),
|
|
792
|
+
"font-size": r,
|
|
793
|
+
"font-weight": a.bold ? "700" : "400"
|
|
794
|
+
})), s.push($(f, {
|
|
795
795
|
"data-cy": "hollow-total-value",
|
|
796
|
-
x:
|
|
797
|
-
y:
|
|
798
|
-
fill: k(l.color, k(
|
|
796
|
+
x: t.center.x,
|
|
797
|
+
y: t.center.y + r - (i ? r : 0) + x(l.offsetY, 0),
|
|
798
|
+
fill: k(l.color, k(a.color, j(t.config))),
|
|
799
799
|
"font-size": u,
|
|
800
800
|
"font-weight": l.bold ? "700" : "400"
|
|
801
801
|
}));
|
|
802
802
|
}
|
|
803
|
-
if (
|
|
804
|
-
let
|
|
803
|
+
if (o.show) {
|
|
804
|
+
let i = x(o.fontSize, 14), c = !!a.show, l = n / Math.max(1, r.length), u = o.value ?? {}, f = x(u.fontSize, i), p = d(u.formatter, l, e({
|
|
805
805
|
p: u.prefix ?? "",
|
|
806
806
|
v: l,
|
|
807
807
|
s: u.suffix ?? "",
|
|
808
808
|
r: x(u.rounding, 0)
|
|
809
809
|
}), { average: l });
|
|
810
|
-
|
|
810
|
+
s.push($(o.text ?? "", {
|
|
811
811
|
"data-cy": "hollow-average-name",
|
|
812
|
-
x:
|
|
813
|
-
y:
|
|
814
|
-
fill: k(
|
|
815
|
-
"font-size":
|
|
816
|
-
"font-weight":
|
|
817
|
-
})),
|
|
812
|
+
x: t.center.x,
|
|
813
|
+
y: t.center.y + (c ? i : 0) + x(o.offsetY, 0),
|
|
814
|
+
fill: k(o.color, j(t.config)),
|
|
815
|
+
"font-size": i,
|
|
816
|
+
"font-weight": o.bold ? "700" : "400"
|
|
817
|
+
})), s.push($(p, {
|
|
818
818
|
"data-cy": "hollow-average-value",
|
|
819
|
-
x:
|
|
820
|
-
y:
|
|
821
|
-
fill: k(u.color, k(
|
|
822
|
-
"font-size":
|
|
819
|
+
x: t.center.x,
|
|
820
|
+
y: t.center.y + (c ? i : 0) + i + x(u.offsetY, 0),
|
|
821
|
+
fill: k(u.color, k(o.color, j(t.config))),
|
|
822
|
+
"font-size": f,
|
|
823
823
|
"font-weight": u.bold ? "700" : "400"
|
|
824
824
|
}));
|
|
825
825
|
}
|
|
826
|
-
return
|
|
826
|
+
return s.filter(Boolean).length ? M("g", {
|
|
827
827
|
class: "vue-data-ui-donut-hollow-labels",
|
|
828
828
|
"data-layer": "hollow-labels"
|
|
829
|
-
},
|
|
830
|
-
}
|
|
831
|
-
function Le(
|
|
832
|
-
let { config:
|
|
833
|
-
if (!
|
|
834
|
-
let
|
|
835
|
-
p:
|
|
836
|
-
v:
|
|
837
|
-
s:
|
|
838
|
-
r: x(
|
|
839
|
-
}), { total:
|
|
829
|
+
}, s.join("")) : "";
|
|
830
|
+
}
|
|
831
|
+
function Le(t, n) {
|
|
832
|
+
let { config: r, center: i } = t, a = S(r, "layout.donut.labels.total", S(r, "layout.labels.total", {}));
|
|
833
|
+
if (!a.show || !Number.isFinite(n) || n <= 0) return "";
|
|
834
|
+
let o = S(r, "layout.labels.dataLabels", {}), s = x(a.fontSize, 20), c = k(a.color, j(r)), l = d(a.formatter, n, e({
|
|
835
|
+
p: o.prefix ?? "",
|
|
836
|
+
v: n,
|
|
837
|
+
s: o.suffix ?? "",
|
|
838
|
+
r: x(a.rounding, 0)
|
|
839
|
+
}), { total: n });
|
|
840
840
|
return N(l, {
|
|
841
841
|
"data-cy": "donut-total",
|
|
842
|
-
x:
|
|
843
|
-
y:
|
|
844
|
-
"font-size":
|
|
845
|
-
"font-weight":
|
|
842
|
+
x: i.x,
|
|
843
|
+
y: i.y + s / 3,
|
|
844
|
+
"font-size": s,
|
|
845
|
+
"font-weight": a.bold ? "700" : "400",
|
|
846
846
|
"text-anchor": "middle",
|
|
847
847
|
fill: c
|
|
848
848
|
});
|
|
@@ -851,27 +851,27 @@ function Re(e, t) {
|
|
|
851
851
|
let n = z(R(e));
|
|
852
852
|
return n ? x(t.value, 0) / n * 100 : 0;
|
|
853
853
|
}
|
|
854
|
-
function ze(
|
|
855
|
-
let
|
|
856
|
-
p:
|
|
857
|
-
v:
|
|
858
|
-
s:
|
|
859
|
-
r: x(
|
|
854
|
+
function ze(t, n) {
|
|
855
|
+
let r = S(t.config, "legend", {}), i = S(t.config, "layout.labels", {}), a = i.dataLabels ?? {}, o = i.value ?? {}, s = e({
|
|
856
|
+
p: a.prefix ?? "",
|
|
857
|
+
v: n.value,
|
|
858
|
+
s: a.suffix ?? "",
|
|
859
|
+
r: x(r.roundingValue, o.rounding ?? 0)
|
|
860
860
|
});
|
|
861
|
-
return
|
|
862
|
-
datapoint:
|
|
863
|
-
serie:
|
|
861
|
+
return d(o.formatter, n.value, s, {
|
|
862
|
+
datapoint: n,
|
|
863
|
+
serie: n
|
|
864
864
|
});
|
|
865
865
|
}
|
|
866
|
-
function Be(
|
|
867
|
-
let
|
|
868
|
-
v:
|
|
866
|
+
function Be(t, n) {
|
|
867
|
+
let r = S(t.config, "legend", {}), i = S(t.config, "layout.labels", {}).percentage ?? {}, a = Re(t, n), o = e({
|
|
868
|
+
v: a,
|
|
869
869
|
s: "%",
|
|
870
|
-
r: x(
|
|
870
|
+
r: x(r.roundingPercentage, i.rounding ?? 0)
|
|
871
871
|
});
|
|
872
|
-
return
|
|
873
|
-
datapoint:
|
|
874
|
-
serie:
|
|
872
|
+
return d(i.formatter, a, o, {
|
|
873
|
+
datapoint: n,
|
|
874
|
+
serie: n
|
|
875
875
|
});
|
|
876
876
|
}
|
|
877
877
|
function Ve(e, t) {
|
|
@@ -930,8 +930,8 @@ function We(e, t) {
|
|
|
930
930
|
}) ?? "" : n ?? "";
|
|
931
931
|
}
|
|
932
932
|
function Ge(e, t, n) {
|
|
933
|
-
let r = `${E(e.config, "title.text", "Donut chart") || e.svgTitle || "Donut chart"}. ${t.length} series. Total ${
|
|
934
|
-
return M("title", {},
|
|
933
|
+
let r = `${E(e.config, "title.text", "Donut chart") || e.svgTitle || "Donut chart"}. ${t.length} series. Total ${c(n)}.`;
|
|
934
|
+
return M("title", {}, p(r));
|
|
935
935
|
}
|
|
936
936
|
async function Ke(e) {
|
|
937
937
|
let t = e.config, n = x(e.width, S(t, "width", 512)), r = x(e.height, S(t, "height", 512)), i = R(e), a = z(i), o = me({
|
|
@@ -941,7 +941,7 @@ async function Ke(e) {
|
|
|
941
941
|
}, i), s = he(o, i), c = ge(o, i), l = E(t, "type", "classic"), u = a > 0 && s.some((e) => x(e.proportion, 0) > 0);
|
|
942
942
|
return `
|
|
943
943
|
<svg
|
|
944
|
-
xmlns="${
|
|
944
|
+
xmlns="${g}"
|
|
945
945
|
width="100%"
|
|
946
946
|
viewBox="0 0 ${n} ${r}"
|
|
947
947
|
role="img"
|