vue-data-ui 3.22.0 → 3.22.2
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-_pDGXl76.js → Arrow-BGhJI-qh.js} +1 -1
- package/dist/{BaseDraggableDialog-O8jn9Lvi.js → BaseDraggableDialog-a9xCKjW-.js} +2 -2
- package/dist/{BaseIcon-CWXbczu_.js → BaseIcon-DEtwcvEH.js} +1 -1
- package/dist/{BaseLegendToggle-CUYal8mC.js → BaseLegendToggle-B-lM0iV1.js} +1 -1
- package/dist/{BaseZoomControls-JwSGzoKi.js → BaseZoomControls-BjjT6vtB.js} +2 -2
- package/dist/{ColorPicker-CCqmzGGo.js → ColorPicker-DMLahA2S.js} +2 -2
- package/dist/{DataTable-G9aclxhk.js → DataTable-DJZgdnIn.js} +2 -2
- package/dist/{Legend-CAStwHdx.js → Legend-BVDhEEsC.js} +2 -2
- package/dist/{NonSvgPenAndPaper-BLy8zMox.js → NonSvgPenAndPaper-Dwq_M6Bz.js} +13 -13
- package/dist/{PackageVersion-DxBQctV8.js → PackageVersion-Dx81ZIAL.js} +1 -1
- package/dist/{PenAndPaper-z1woaB1V.js → PenAndPaper-DJIIG6dv.js} +13 -13
- package/dist/{Shape-BubavoqO.js → Shape-C5OvuwII.js} +1 -1
- package/dist/{Slicer-JCOpjPU7.js → Slicer-ClR833cP.js} +2 -2
- package/dist/{SlicerPreview-BA_RDgVn.js → SlicerPreview-CAhqG_ZQ.js} +12 -12
- package/dist/{SparkTooltip-DMFXQmFi.js → SparkTooltip-DTzo8Sah.js} +6 -6
- package/dist/{Title-DH6G8_cZ.js → Title-CVYf1f8m.js} +1 -1
- package/dist/{Tooltip-979Ytd8R.js → Tooltip-BmGCBJuU.js} +1 -1
- package/dist/{UserOptions-rx9hUnOy.js → UserOptions-xqbNpHi2.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-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{dom-to-png-CtV3uxDJ.js → dom-to-png-rjAIVHxa.js} +1 -1
- package/dist/exposedLib-CffbQxjN.js +19 -0
- package/dist/{img-C_RNNswI.js → img-BCAOkqfM.js} +1 -1
- package/dist/{labelUtils-Bycs-017.js → labelUtils-C0D1tjig.js} +1 -1
- package/dist/{lib-AJRHFE5U.js → lib-CXicicWN.js} +155 -126
- package/dist/{package-0oRlvBuX.js → package-CILLITOI.js} +1 -1
- package/dist/{pdf-CdX23zf1.js → pdf-ChYv2jb6.js} +1 -1
- package/dist/{render-common-DSiH7qj-.js → render-common-bMAFQ_qf.js} +2 -2
- 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 +7 -10
- package/dist/{useAutoSizeLabelsInsideViewbox-kjVKQz36.js → useAutoSizeLabelsInsideViewbox-B4-0yo3K.js} +1 -1
- package/dist/{useConfig-Br1uzq_L.js → useConfig-Bf_EBbe3.js} +4 -1
- package/dist/{useNestedProp-DtcXIg7n.js → useNestedProp-APyFoLCQ.js} +1 -1
- package/dist/{useObjectBindings-CxQ6A5pi.js → useObjectBindings-Byts-nf-.js} +1 -1
- package/dist/{usePrinter-6n2MzVyV.js → usePrinter-Dng0UK-G.js} +2 -2
- package/dist/utils.js +3 -3
- package/dist/{vue-data-ui-DoViN_4r.js → vue-data-ui-DD-txoS1.js} +68 -68
- package/dist/vue-data-ui.js +72 -72
- package/dist/vue-ui-3d-bar-DxfNdF2e.js +1757 -0
- package/dist/{vue-ui-accordion-HvsT8_RM.js → vue-ui-accordion-Di_givzQ.js} +4 -4
- package/dist/vue-ui-age-pyramid-CTwMfsqS.js +1238 -0
- package/dist/{vue-ui-annotator-7s5ly6XJ.js → vue-ui-annotator-tRkLFMQ9.js} +60 -60
- package/dist/{vue-ui-bullet-B-bWGz6d.js → vue-ui-bullet-9gtGJaGb.js} +23 -23
- package/dist/{vue-ui-bump-DM-hF-AK.js → vue-ui-bump-BJ5O8Mps.js} +400 -400
- package/dist/{vue-ui-candlestick-BfOvntqR.js → vue-ui-candlestick-CJ_VVYbJ.js} +50 -50
- package/dist/vue-ui-carousel-table-8s8BSy-K.js +455 -0
- package/dist/vue-ui-chestnut-D3-ck2h2.js +2010 -0
- package/dist/vue-ui-chord-1BitQtEw.js +1391 -0
- package/dist/{vue-ui-circle-pack-BBaRLELd.js → vue-ui-circle-pack-DVMhDFKU.js} +44 -44
- package/dist/{vue-ui-cursor-DWlKtcab.js → vue-ui-cursor-D7yh10hX.js} +61 -61
- package/dist/{vue-ui-dag-BAKU4jBj.js → vue-ui-dag--LFEAAf_.js} +18 -18
- package/dist/{vue-ui-dashboard-DE4R55nU.js → vue-ui-dashboard-COeO878g.js} +70 -70
- package/dist/{vue-ui-digits-B416Mj46.js → vue-ui-digits-C50FVr7C.js} +4 -4
- package/dist/{vue-ui-donut-BuGSF4pM.js → vue-ui-donut-BzKXqQA2.js} +160 -160
- package/dist/{vue-ui-donut-BugVAUHv.js → vue-ui-donut-NHjQzFO5.js} +474 -474
- package/dist/vue-ui-donut-evolution-lPkwit2C.js +1510 -0
- package/dist/vue-ui-dumbbell-hlEfvbbf.js +1530 -0
- package/dist/{vue-ui-flow-BoEP6hmg.js → vue-ui-flow-Bg_OSszc.js} +43 -43
- package/dist/vue-ui-funnel-B_bK0jJB.js +777 -0
- package/dist/{vue-ui-galaxy-CB5F8Q-u.js → vue-ui-galaxy-WVCUzcYc.js} +301 -301
- package/dist/vue-ui-gauge-Cqeko0wA.js +920 -0
- package/dist/{vue-ui-geo-BAy4kNv-.js → vue-ui-geo-DtzXRvmx.js} +22 -22
- package/dist/{vue-ui-gizmo-DjA8cqcl.js → vue-ui-gizmo-hIFd7qck.js} +4 -4
- package/dist/{vue-ui-heatmap-CMlxUI7Q.js → vue-ui-heatmap-yPlwc3l_.js} +95 -95
- package/dist/vue-ui-history-plot-BGmcDg2w.js +1554 -0
- package/dist/{vue-ui-horizontal-bar-XgzEVwOK.js → vue-ui-horizontal-bar-CJciNHpT.js} +264 -264
- package/dist/{vue-ui-kpi-B5Lu5U1S.js → vue-ui-kpi-DmSe1QGb.js} +4 -4
- package/dist/{vue-ui-mini-loader-CyYpLcrt.js → vue-ui-mini-loader-CqxI6DwN.js} +3 -3
- package/dist/{vue-ui-molecule-DzpgAmZn.js → vue-ui-molecule-w-94Uktn.js} +181 -181
- package/dist/{vue-ui-mood-radar-DMgYQtOw.js → vue-ui-mood-radar-B3OGWGHR.js} +29 -29
- package/dist/{vue-ui-nested-donuts-BHX0QqvR.js → vue-ui-nested-donuts-Dv_yE5EV.js} +211 -211
- package/dist/{vue-ui-onion-CYh7tdS0.js → vue-ui-onion-BQbI0Vxd.js} +34 -34
- package/dist/{vue-ui-parallel-coordinate-plot-BTaG92hV.js → vue-ui-parallel-coordinate-plot-ColST3Jj.js} +40 -40
- package/dist/vue-ui-quadrant-BB7qdXK0.js +1978 -0
- package/dist/{vue-ui-quick-chart-CHSUGLTx.js → vue-ui-quick-chart-CGDeo3Fx.js} +358 -358
- package/dist/vue-ui-radar-DqDn14DL.js +1281 -0
- package/dist/{vue-ui-rating-BoBLJm55.js → vue-ui-rating-ChDwpol2.js} +34 -34
- package/dist/vue-ui-relation-circle-BvfZqcK0.js +924 -0
- package/dist/{vue-ui-ridgeline-q_UhtM4M.js → vue-ui-ridgeline-Cq8z57xB.js} +219 -219
- package/dist/{vue-ui-rings-VOjUZu2b.js → vue-ui-rings-Ds-sgNPK.js} +36 -36
- package/dist/{vue-ui-scatter-DETMofE2.js → vue-ui-scatter-BgOVUzQ3.js} +75 -75
- package/dist/{vue-ui-skeleton-D36VILNm.js → vue-ui-skeleton-DJ5KAbfV.js} +42 -42
- package/dist/{vue-ui-smiley-CPbUSUTQ.js → vue-ui-smiley-fFrNX-Gl.js} +17 -17
- package/dist/{vue-ui-spark-trend-XpEbgNeK.js → vue-ui-spark-trend-D6OBWxmg.js} +92 -92
- package/dist/{vue-ui-sparkbar-Dq1hnBhL.js → vue-ui-sparkbar-CtCP8O44.js} +78 -78
- package/dist/{vue-ui-sparkgauge-CbAakuhB.js → vue-ui-sparkgauge-CZDkyViI.js} +38 -38
- package/dist/vue-ui-sparkhistogram-DgruLf33.js +560 -0
- package/dist/vue-ui-sparkline-CJKE7Xcl.js +1547 -0
- package/dist/{vue-ui-sparkstackbar-OprYrGQQ.js → vue-ui-sparkstackbar-BSV0M-2u.js} +162 -162
- package/dist/{vue-ui-stackbar-Bt0FKlf7.js → vue-ui-stackbar-pnlYCnTj.js} +67 -67
- package/dist/vue-ui-stackline-DS_MPmc1.js +2398 -0
- package/dist/{vue-ui-strip-plot-DdzflSOm.js → vue-ui-strip-plot-DSKOrJZX.js} +49 -49
- package/dist/{vue-ui-table-BZbLau0d.js → vue-ui-table-c1FPEwLM.js} +87 -87
- package/dist/{vue-ui-table-heatmap-DX80uRHe.js → vue-ui-table-heatmap-CMQJXnP8.js} +17 -17
- package/dist/vue-ui-table-sparkline-CAS9Pk60.js +712 -0
- package/dist/vue-ui-thermometer-w3eeJv9s.js +763 -0
- package/dist/{vue-ui-timer-smc39MBP.js → vue-ui-timer-CSP48eS-.js} +6 -6
- package/dist/{vue-ui-tiremarks-MwPUc9H4.js → vue-ui-tiremarks-DJvXj1P3.js} +19 -19
- package/dist/vue-ui-treemap-BaOMXTR1.js +1587 -0
- package/dist/vue-ui-waffle-Bo22Ph8n.js +1362 -0
- package/dist/{vue-ui-wheel-VQ5Sc_Kt.js → vue-ui-wheel-CbL52G-w.js} +51 -51
- package/dist/vue-ui-word-cloud-BqOCyp7c.js +1723 -0
- package/dist/{vue-ui-world-Dq9I3omC.js → vue-ui-world-BkjzCcVh.js} +445 -445
- package/dist/{vue-ui-xy-BRITAMZZ.js → vue-ui-xy-CVDNhnDY.js} +162 -162
- package/dist/{vue-ui-xy-D4D9tjiY.js → vue-ui-xy-DuwLRfr4.js} +537 -534
- package/dist/{vue-ui-xy-canvas-CYQF5hVa.js → vue-ui-xy-canvas-CXqGVMeQ.js} +65 -65
- package/package.json +2 -2
- package/dist/exposedLib-BJbE_A8E.js +0 -19
- package/dist/vue-ui-3d-bar-BUEcrSrc.js +0 -1757
- package/dist/vue-ui-age-pyramid-Zw5otO78.js +0 -1238
- package/dist/vue-ui-carousel-table-CrmVyfym.js +0 -455
- package/dist/vue-ui-chestnut-BQq65pNh.js +0 -2010
- package/dist/vue-ui-chord-BA2jFRMP.js +0 -1391
- package/dist/vue-ui-donut-evolution-C6fXP7QH.js +0 -1510
- package/dist/vue-ui-dumbbell-1K5kOirf.js +0 -1530
- package/dist/vue-ui-funnel-CheSqvyj.js +0 -777
- package/dist/vue-ui-gauge-Cjtovl1s.js +0 -920
- package/dist/vue-ui-history-plot-PkrNUPpp.js +0 -1554
- package/dist/vue-ui-quadrant-C00cEk5o.js +0 -1978
- package/dist/vue-ui-radar-jNxRTIur.js +0 -1281
- package/dist/vue-ui-relation-circle-Ne_rI2jS.js +0 -924
- package/dist/vue-ui-sparkhistogram-DpPjIA7n.js +0 -560
- package/dist/vue-ui-sparkline-DLay6Hog.js +0 -1513
- package/dist/vue-ui-stackline-CrUTz-k1.js +0 -2398
- package/dist/vue-ui-table-sparkline-C3_J575b.js +0 -707
- package/dist/vue-ui-thermometer-Bo32hwAO.js +0 -763
- package/dist/vue-ui-treemap-BNG7Zc04.js +0 -1587
- package/dist/vue-ui-waffle-D-9Ny9vN.js +0 -1362
- package/dist/vue-ui-word-cloud-BqsUdsCY.js +0 -1656
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as y } from "./useConfig-
|
|
1
|
+
import { Dt as e, E as t, Ft as n, G as r, H as i, It as a, Q as o, Ut as s, V as c, Vt as l, d as u, i as d, kt as f, p, t as m, u as h, v as g, wt as _, y as v } from "./lib-CXicicWN.js";
|
|
2
|
+
import { t as y } from "./useConfig-Bf_EBbe3.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-bMAFQ_qf.js";
|
|
5
5
|
//#region src/svg/vue-ui-donut/create.js
|
|
6
6
|
var { vue_ui_donut: ne } = y();
|
|
7
|
-
function re({ config:
|
|
8
|
-
let
|
|
9
|
-
userConfig:
|
|
7
|
+
function re({ config: e = {} } = {}) {
|
|
8
|
+
let t = e ?? {}, n = s({
|
|
9
|
+
userConfig: t,
|
|
10
10
|
defaultConfig: ne
|
|
11
|
-
}),
|
|
12
|
-
if (!
|
|
13
|
-
...
|
|
14
|
-
customPalette:
|
|
11
|
+
}), r = n.theme;
|
|
12
|
+
if (!r) return {
|
|
13
|
+
...n,
|
|
14
|
+
customPalette: n.customPalette?.length ? n.customPalette : f
|
|
15
15
|
};
|
|
16
|
-
let
|
|
17
|
-
userConfig:
|
|
16
|
+
let i = s({
|
|
17
|
+
userConfig: t,
|
|
18
18
|
defaultConfig: s({
|
|
19
|
-
userConfig: b[
|
|
20
|
-
defaultConfig:
|
|
19
|
+
userConfig: b[r] || {},
|
|
20
|
+
defaultConfig: n
|
|
21
21
|
})
|
|
22
22
|
});
|
|
23
23
|
return {
|
|
24
|
-
...
|
|
25
|
-
customPalette:
|
|
24
|
+
...i,
|
|
25
|
+
customPalette: i.customPalette?.length ? i.customPalette : l[r] || f
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
function P(e, t = 0) {
|
|
@@ -39,7 +39,7 @@ 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 n = Array.isArray(t.customPalette) ? t.customPalette :
|
|
42
|
+
let n = Array.isArray(t.customPalette) ? t.customPalette : f;
|
|
43
43
|
return (Array.isArray(e) ? e : []).map((e, t) => ({
|
|
44
44
|
source: e,
|
|
45
45
|
sourceIndex: t,
|
|
@@ -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 = i();
|
|
121
121
|
function I() {
|
|
122
122
|
return ue;
|
|
123
123
|
}
|
|
@@ -209,22 +209,22 @@ function me(e, t) {
|
|
|
209
209
|
innerRadius: V(n) ? 0 : Math.max(0, T - A)
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
|
-
function he(e,
|
|
213
|
-
let
|
|
214
|
-
return
|
|
212
|
+
function he(e, t) {
|
|
213
|
+
let n = x(S(e.config, "layout.donut.rotation", 105.25), 105.25);
|
|
214
|
+
return _({ series: t }, e.center.x, e.center.y, e.radius, e.radius, 1.99999, 2, 1, 360, n, V(e.config) ? e.radius : e.thickness).map((e, n) => ({
|
|
215
215
|
...e,
|
|
216
|
-
index:
|
|
217
|
-
color: k(e.color, n
|
|
216
|
+
index: n,
|
|
217
|
+
color: k(e.color, t[n]?.color),
|
|
218
218
|
value: x(e.value, 0),
|
|
219
|
-
name: String(e.name ?? n
|
|
220
|
-
patternIndex: e.patternIndex ?? n
|
|
221
|
-
seriesIndex: e.seriesIndex ?? n
|
|
219
|
+
name: String(e.name ?? t[n]?.name ?? `Serie ${n + 1}`),
|
|
220
|
+
patternIndex: e.patternIndex ?? t[n]?.patternIndex ?? n,
|
|
221
|
+
seriesIndex: e.seriesIndex ?? t[n]?.seriesIndex ?? n
|
|
222
222
|
}));
|
|
223
223
|
}
|
|
224
|
-
function ge(e,
|
|
225
|
-
let r = Math.max(1, ...
|
|
226
|
-
return
|
|
227
|
-
series:
|
|
224
|
+
function ge(e, n) {
|
|
225
|
+
let r = Math.max(1, ...n.map((e) => Math.abs(x(e.value, 0))));
|
|
226
|
+
return t({
|
|
227
|
+
series: n.map((e) => Math.abs(x(e.value, 0)) / r),
|
|
228
228
|
center: e.center,
|
|
229
229
|
maxRadius: Math.min(e.drawingArea.width, e.drawingArea.height) / 3,
|
|
230
230
|
hasGhost: !1
|
|
@@ -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:
|
|
275
|
-
if (
|
|
276
|
-
let
|
|
277
|
-
if (
|
|
278
|
-
let t = V(
|
|
279
|
-
|
|
274
|
+
let { config: r } = e, i = [], o = !!S(r, "useGradient", !1), s = !!S(r, "layout.donut.useShadow", !1);
|
|
275
|
+
if (o) {
|
|
276
|
+
let o = E(r, "type", "classic"), s = x(S(r, "gradientIntensity", 30), 30);
|
|
277
|
+
if (o === "classic" && Number.isFinite(e.thickness / e.radius)) {
|
|
278
|
+
let t = V(r) ? 1 : e.thickness / e.radius;
|
|
279
|
+
i.push(M("radialGradient", { id: H(e) }, [
|
|
280
280
|
w("stop", {
|
|
281
281
|
offset: "0%",
|
|
282
|
-
"stop-color":
|
|
282
|
+
"stop-color": n(L(r), 0),
|
|
283
283
|
"stop-opacity": 0
|
|
284
284
|
}),
|
|
285
285
|
w("stop", {
|
|
286
286
|
offset: `${(1 - t) * 100}%`,
|
|
287
|
-
"stop-color":
|
|
287
|
+
"stop-color": n("#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": n("#FFFFFF", s)
|
|
293
293
|
}),
|
|
294
294
|
w("stop", {
|
|
295
295
|
offset: "100%",
|
|
296
|
-
"stop-color":
|
|
296
|
+
"stop-color": n(L(r), 0),
|
|
297
297
|
"stop-opacity": 0
|
|
298
298
|
})
|
|
299
299
|
].join("")));
|
|
300
300
|
}
|
|
301
|
-
|
|
302
|
-
let
|
|
303
|
-
|
|
301
|
+
o === "polar" && t.forEach((t, n) => {
|
|
302
|
+
let r = e.polarAreas?.[n];
|
|
303
|
+
r?.middlePoint && i.push(M("radialGradient", {
|
|
304
304
|
id: U(e, n),
|
|
305
|
-
cx: `${
|
|
306
|
-
cy: `${
|
|
305
|
+
cx: `${g(r.middlePoint.x / e.width * 100)}%`,
|
|
306
|
+
cy: `${g(r.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": a(t.color, .05),
|
|
311
|
+
"stop-opacity": s / 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(
|
|
320
|
-
|
|
318
|
+
if (s) {
|
|
319
|
+
let t = k(S(r, "layout.donut.shadowColor", "#000000"), "#000000"), n = x(S(r, "layout.donut.shadowOpacity", .2), .2), a = x(S(r, "layout.donut.shadowBlur", 6), 6), o = x(S(r, "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": n
|
|
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;
|
|
@@ -388,21 +388,21 @@ function Ce(e, t, n) {
|
|
|
388
388
|
}), M("g", { "data-layer": "polar-slices" }, a.join(""));
|
|
389
389
|
}
|
|
390
390
|
function q(e, t, n = "layout.labels.value.rounding") {
|
|
391
|
-
let { config:
|
|
391
|
+
let { config: i } = e, a = S(i, "layout.labels", {}), o = a.dataLabels ?? {}, s = a.value ?? {}, c = r({
|
|
392
392
|
p: o.prefix ?? "",
|
|
393
393
|
v: t.value,
|
|
394
394
|
s: o.suffix ?? "",
|
|
395
|
-
r: x(S(
|
|
395
|
+
r: x(S(i, n, s.rounding ?? 0), s.rounding ?? 0)
|
|
396
396
|
});
|
|
397
|
-
return
|
|
397
|
+
return d(s.formatter, t.value, c, { datapoint: t });
|
|
398
398
|
}
|
|
399
399
|
function J(e, t) {
|
|
400
|
-
let { config: n } = e,
|
|
401
|
-
v:
|
|
400
|
+
let { config: n } = e, i = S(n, "layout.labels.percentage", {}), a = x(t.proportion, 0) * 100, o = r({
|
|
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: t });
|
|
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, c = o * 1.5, l = e.drawingArea.top + 16,
|
|
438
|
-
function
|
|
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, c = o * 1.5, l = e.drawingArea.top + 16, d = e.drawingArea.bottom - 16, f = i - (e.radius + 6), p = i + (e.radius + 6), m = Q(e);
|
|
438
|
+
function _(e) {
|
|
439
439
|
return {
|
|
440
|
-
x:
|
|
441
|
-
y:
|
|
440
|
+
x: g(e.center?.endX ?? e.endX),
|
|
441
|
+
y: g(e.center?.endY ?? e.endY)
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
444
|
function v({ midX: e, midY: t, bandX: n, bandY: r }) {
|
|
@@ -483,14 +483,14 @@ function Ee(e, t) {
|
|
|
483
483
|
return c + Math.max(0, t.length - 1) * o * 1.2;
|
|
484
484
|
}
|
|
485
485
|
function b({ arc: e, index: t }) {
|
|
486
|
-
let n =
|
|
486
|
+
let n = _(e);
|
|
487
487
|
return {
|
|
488
488
|
arc: e,
|
|
489
489
|
index: t,
|
|
490
490
|
midX: n.x,
|
|
491
491
|
midY: n.y,
|
|
492
|
-
inlineMarkerX:
|
|
493
|
-
inlineMarkerY:
|
|
492
|
+
inlineMarkerX: h(e).x,
|
|
493
|
+
inlineMarkerY: u(e) - 3.5,
|
|
494
494
|
labelHeight: y(e.name)
|
|
495
495
|
};
|
|
496
496
|
}
|
|
@@ -549,7 +549,7 @@ function Ee(e, t) {
|
|
|
549
549
|
}), E({
|
|
550
550
|
candidateList: D.TL,
|
|
551
551
|
side: "left",
|
|
552
|
-
bandMarkerX:
|
|
552
|
+
bandMarkerX: f,
|
|
553
553
|
startY: l,
|
|
554
554
|
direction: "down"
|
|
555
555
|
}), E({
|
|
@@ -561,37 +561,37 @@ function Ee(e, t) {
|
|
|
561
561
|
}), D.BL.length > 1 && E({
|
|
562
562
|
candidateList: D.BL,
|
|
563
563
|
side: "left",
|
|
564
|
-
bandMarkerX:
|
|
565
|
-
startY:
|
|
564
|
+
bandMarkerX: f,
|
|
565
|
+
startY: d,
|
|
566
566
|
direction: "up"
|
|
567
567
|
}), D.BR.length > 1 && E({
|
|
568
568
|
candidateList: D.BR,
|
|
569
569
|
side: "right",
|
|
570
570
|
bandMarkerX: p,
|
|
571
|
-
startY:
|
|
571
|
+
startY: d,
|
|
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", {}),
|
|
576
|
+
let a = S(e.config, "layout.labels", {}), s = a.percentage ?? {}, c = a.name ?? {}, l = r?.labelX ?? h(t, !0, 12).x, d = r?.labelY ?? u(t), f = r?.textAnchor ?? h(t, !0, 12).anchor, { name: p } = Y(e, t), m = we(e, t), g = String(p).split(/\n/g), _ = p ? g.map((t, n) => M("tspan", {
|
|
577
577
|
class: "vue-data-ui-datalabel-name",
|
|
578
|
-
x: n === 0 ? void 0 :
|
|
578
|
+
x: n === 0 ? void 0 : l,
|
|
579
579
|
dy: n === 0 ? void 0 : i * 1.2,
|
|
580
|
-
fill: k(
|
|
580
|
+
fill: k(c.color, j(e.config)),
|
|
581
581
|
"font-size": i,
|
|
582
|
-
"font-weight":
|
|
583
|
-
},
|
|
582
|
+
"font-weight": c.bold ? "700" : "400"
|
|
583
|
+
}, o(t + (n === g.length - 1 ? " " : "")))).join("") : "", v = m ? M("tspan", {
|
|
584
584
|
class: "vue-data-ui-datalabel-value",
|
|
585
|
-
fill: k(
|
|
585
|
+
fill: k(s.color, j(e.config)),
|
|
586
586
|
"font-size": i,
|
|
587
|
-
"font-weight":
|
|
588
|
-
},
|
|
587
|
+
"font-weight": s.bold ? "700" : "400"
|
|
588
|
+
}, o(m)) : "";
|
|
589
589
|
return M("text", {
|
|
590
590
|
"data-cy": `donut-label-inline-${n}`,
|
|
591
591
|
class: "vue-data-ui-datalabel-inline",
|
|
592
|
-
x:
|
|
593
|
-
y:
|
|
594
|
-
"text-anchor":
|
|
592
|
+
x: l,
|
|
593
|
+
y: d,
|
|
594
|
+
"text-anchor": f
|
|
595
595
|
}, `${_}${v}`);
|
|
596
596
|
}
|
|
597
597
|
function Oe(e, t) {
|
|
@@ -618,51 +618,51 @@ function Oe(e, t) {
|
|
|
618
618
|
arc: t,
|
|
619
619
|
arcIndex: n,
|
|
620
620
|
smallArcLayout: {
|
|
621
|
-
labelX:
|
|
622
|
-
labelY:
|
|
623
|
-
textAnchor:
|
|
621
|
+
labelX: h(t, !1, a + i / 2).x,
|
|
622
|
+
labelY: u(t, a, a),
|
|
623
|
+
textAnchor: h(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(
|
|
630
|
-
return
|
|
631
|
-
initX:
|
|
632
|
-
initY:
|
|
633
|
-
offset:
|
|
634
|
-
centerX:
|
|
635
|
-
centerY:
|
|
629
|
+
function ke(t, n, r = 42) {
|
|
630
|
+
return e({
|
|
631
|
+
initX: n.middlePoint.x,
|
|
632
|
+
initY: n.middlePoint.y,
|
|
633
|
+
offset: r,
|
|
634
|
+
centerX: t.center.x,
|
|
635
|
+
centerY: t.center.y
|
|
636
636
|
});
|
|
637
637
|
}
|
|
638
638
|
function Ae(e, t) {
|
|
639
639
|
return t.x < e.center.x ? "end" : t.x > e.center.x ? "start" : "middle";
|
|
640
640
|
}
|
|
641
641
|
function je(e, t, n, r) {
|
|
642
|
-
let i = S(e.config, "layout.labels", {}), a = i.percentage ?? {},
|
|
642
|
+
let i = S(e.config, "layout.labels", {}), a = i.percentage ?? {}, s = i.name ?? {}, c = x(a.fontSize, i.dataLabels?.fontSize ?? 12), l = x(s.fontSize, i.dataLabels?.fontSize ?? 12), u = M("tspan", {
|
|
643
643
|
class: "vue-data-ui-datalabel-value",
|
|
644
644
|
fill: k(a.color, j(e.config)),
|
|
645
|
-
"font-size":
|
|
645
|
+
"font-size": c,
|
|
646
646
|
"font-weight": a.bold ? "700" : "400"
|
|
647
|
-
},
|
|
647
|
+
}, o(String(X(e, t).replace(/\n/g, " / ")))), d = s.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
|
-
dy: r === 0 ? void 0 :
|
|
651
|
-
fill: k(
|
|
652
|
-
"font-size":
|
|
653
|
-
"font-weight":
|
|
654
|
-
},
|
|
655
|
-
return r === "end" ? `${d}${
|
|
650
|
+
dy: r === 0 ? void 0 : l * 1.2,
|
|
651
|
+
fill: k(s.color, j(e.config)),
|
|
652
|
+
"font-size": l,
|
|
653
|
+
"font-weight": s.bold ? "700" : "400"
|
|
654
|
+
}, o(t))).join("") : "";
|
|
655
|
+
return r === "end" ? `${d}${u}` : `${u}${d}`;
|
|
656
656
|
}
|
|
657
657
|
function Me(e, t, n) {
|
|
658
|
-
let r = S(e.config, "layout.labels", {}), i = r.dataLabels ?? {}, a = r.value ?? {},
|
|
658
|
+
let r = S(e.config, "layout.labels", {}), i = r.dataLabels ?? {}, a = r.value ?? {}, s = r.percentage ?? {}, l = r.name ?? {};
|
|
659
659
|
if (!E(e.config, "dataLabels.show", i.show ?? !0) || !i.show) return "";
|
|
660
|
-
let
|
|
660
|
+
let u = !!i.oneLine, d = x(a.fontSize, i.fontSize ?? 12), f = x(l.fontSize, i.fontSize ?? 12), p = [];
|
|
661
661
|
return t.forEach((t, r) => {
|
|
662
662
|
let i = n[r];
|
|
663
663
|
if (!i || !Z(e, t)) return;
|
|
664
664
|
let a = ke(e, i, 42), m = Ae(e, a);
|
|
665
|
-
if (
|
|
665
|
+
if (u) {
|
|
666
666
|
p.push(M("text", {
|
|
667
667
|
"data-cy": "polar-label-inline",
|
|
668
668
|
class: "vue-data-ui-datalabel-inline",
|
|
@@ -677,29 +677,29 @@ function Me(e, t, n) {
|
|
|
677
677
|
class: "vue-data-ui-datalabel-value",
|
|
678
678
|
x: a.x,
|
|
679
679
|
y: a.y,
|
|
680
|
-
"font-size":
|
|
681
|
-
"font-weight":
|
|
680
|
+
"font-size": d,
|
|
681
|
+
"font-weight": s.bold ? "700" : "400",
|
|
682
682
|
"text-anchor": m,
|
|
683
683
|
fill: valueFill
|
|
684
684
|
}, te({
|
|
685
685
|
content: X(e, t),
|
|
686
686
|
x: a.x,
|
|
687
|
-
fontSize:
|
|
687
|
+
fontSize: d,
|
|
688
688
|
fill: valueFill,
|
|
689
689
|
textAnchor: m
|
|
690
|
-
}))),
|
|
690
|
+
}))), l.show && p.push(M("text", {
|
|
691
691
|
"data-cy": "polar-label-name",
|
|
692
692
|
class: "vue-data-ui-datalabel-name",
|
|
693
693
|
x: a.x,
|
|
694
694
|
y: a.y + f * 1.2,
|
|
695
695
|
"font-size": f,
|
|
696
|
-
"font-weight":
|
|
696
|
+
"font-weight": l.bold ? "700" : "400",
|
|
697
697
|
"text-anchor": m,
|
|
698
|
-
fill: k(
|
|
699
|
-
},
|
|
700
|
-
content:
|
|
698
|
+
fill: k(l.color, j(e.config))
|
|
699
|
+
}, c({
|
|
700
|
+
content: o(String(t.name ?? "")),
|
|
701
701
|
fontSize: f,
|
|
702
|
-
fill: k(
|
|
702
|
+
fill: k(l.color, j(e.config)),
|
|
703
703
|
x: a.x
|
|
704
704
|
})));
|
|
705
705
|
}), p.length ? M("g", { "data-layer": "polar-data-labels" }, p.join("")) : "";
|
|
@@ -707,7 +707,7 @@ function Me(e, t, n) {
|
|
|
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);
|
|
710
|
-
return
|
|
710
|
+
return p(t, !1, i, i, !1, !1, 0, x(r.markerFlatLength, 12), Q(e));
|
|
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 ?? h(t).x,
|
|
730
|
+
cy: o?.markerY ?? u(t) - 3.5,
|
|
731
731
|
r: x(n.markerRadius, 3),
|
|
732
732
|
fill: t.color,
|
|
733
733
|
stroke: L(e.config),
|
|
@@ -735,24 +735,24 @@ function Pe(e, t) {
|
|
|
735
735
|
})));
|
|
736
736
|
}), i.length ? M("g", { "data-layer": "label-markers" }, i.join("")) : "";
|
|
737
737
|
}
|
|
738
|
-
function Fe(
|
|
739
|
-
let i = S(
|
|
740
|
-
if (!E(
|
|
738
|
+
function Fe(t, n, r) {
|
|
739
|
+
let i = S(t.config, "layout.labels.dataLabels", {});
|
|
740
|
+
if (!E(t.config, "dataLabels.show", i.show ?? !0) || !i.show) return "";
|
|
741
741
|
let a = [];
|
|
742
|
-
return
|
|
743
|
-
let s =
|
|
744
|
-
if (!s?.middlePoint || !Z(
|
|
745
|
-
let c =
|
|
742
|
+
return n.forEach((n, o) => {
|
|
743
|
+
let s = r[o];
|
|
744
|
+
if (!s?.middlePoint || !Z(t, n)) return;
|
|
745
|
+
let c = e({
|
|
746
746
|
initX: s.middlePoint.x,
|
|
747
747
|
initY: s.middlePoint.y,
|
|
748
748
|
offset: 24,
|
|
749
|
-
centerX:
|
|
750
|
-
centerY:
|
|
749
|
+
centerX: t.center.x,
|
|
750
|
+
centerY: t.center.y
|
|
751
751
|
});
|
|
752
752
|
a.push(w("path", {
|
|
753
753
|
"data-cy": `polar-marker-${o}`,
|
|
754
754
|
d: `M ${c.x},${c.y} ${s.middlePoint.x},${s.middlePoint.y}`,
|
|
755
|
-
stroke:
|
|
755
|
+
stroke: n.color,
|
|
756
756
|
"stroke-width": x(i.markerStrokeWidth, 1),
|
|
757
757
|
"stroke-linecap": "round",
|
|
758
758
|
"stroke-linejoin": "round",
|
|
@@ -762,8 +762,8 @@ function Fe(e, t, n) {
|
|
|
762
762
|
cx: c.x,
|
|
763
763
|
cy: c.y,
|
|
764
764
|
r: x(i.markerRadius, 3),
|
|
765
|
-
fill:
|
|
766
|
-
stroke: L(
|
|
765
|
+
fill: n.color,
|
|
766
|
+
stroke: L(t.config),
|
|
767
767
|
"stroke-width": 1
|
|
768
768
|
}));
|
|
769
769
|
}), a.length ? M("g", { "data-layer": "polar-label-markers" }, a.join("")) : "";
|
|
@@ -776,32 +776,32 @@ function $(e, t) {
|
|
|
776
776
|
}
|
|
777
777
|
function Ie(e, t, n) {
|
|
778
778
|
if (E(e.config, "type", "classic") !== "classic" || V(e.config) || !t) return "";
|
|
779
|
-
let
|
|
780
|
-
if (
|
|
781
|
-
let n = x(
|
|
779
|
+
let i = S(e.config, "layout.labels.hollow", {}), a = i.total ?? {}, o = i.average ?? {}, s = [];
|
|
780
|
+
if (a.show) {
|
|
781
|
+
let n = x(a.fontSize, 14), i = !!o.show, c = e.center.y - (i ? n : 0) + x(a.offsetY, 0), l = a.value ?? {}, u = x(l.fontSize, n), f = d(l.formatter, t, r({
|
|
782
782
|
p: l.prefix ?? "",
|
|
783
783
|
v: t,
|
|
784
784
|
s: l.suffix ?? "",
|
|
785
785
|
r: x(l.rounding, 0)
|
|
786
786
|
}), { total: t });
|
|
787
|
-
s.push($(
|
|
787
|
+
s.push($(a.text ?? "", {
|
|
788
788
|
"data-cy": "hollow-total-name",
|
|
789
789
|
x: e.center.x,
|
|
790
790
|
y: c,
|
|
791
|
-
fill: k(
|
|
791
|
+
fill: k(a.color, j(e.config)),
|
|
792
792
|
"font-size": n,
|
|
793
|
-
"font-weight":
|
|
794
|
-
})), s.push($(
|
|
793
|
+
"font-weight": a.bold ? "700" : "400"
|
|
794
|
+
})), s.push($(f, {
|
|
795
795
|
"data-cy": "hollow-total-value",
|
|
796
796
|
x: e.center.x,
|
|
797
|
-
y: e.center.y + n - (
|
|
798
|
-
fill: k(l.color, k(
|
|
797
|
+
y: e.center.y + n - (i ? n : 0) + x(l.offsetY, 0),
|
|
798
|
+
fill: k(l.color, k(a.color, j(e.config))),
|
|
799
799
|
"font-size": u,
|
|
800
800
|
"font-weight": l.bold ? "700" : "400"
|
|
801
801
|
}));
|
|
802
802
|
}
|
|
803
803
|
if (o.show) {
|
|
804
|
-
let
|
|
804
|
+
let i = x(o.fontSize, 14), c = !!a.show, l = t / Math.max(1, n.length), u = o.value ?? {}, f = x(u.fontSize, i), p = d(u.formatter, l, r({
|
|
805
805
|
p: u.prefix ?? "",
|
|
806
806
|
v: l,
|
|
807
807
|
s: u.suffix ?? "",
|
|
@@ -810,16 +810,16 @@ function Ie(e, t, n) {
|
|
|
810
810
|
s.push($(o.text ?? "", {
|
|
811
811
|
"data-cy": "hollow-average-name",
|
|
812
812
|
x: e.center.x,
|
|
813
|
-
y: e.center.y + (c ?
|
|
813
|
+
y: e.center.y + (c ? i : 0) + x(o.offsetY, 0),
|
|
814
814
|
fill: k(o.color, j(e.config)),
|
|
815
|
-
"font-size":
|
|
815
|
+
"font-size": i,
|
|
816
816
|
"font-weight": o.bold ? "700" : "400"
|
|
817
|
-
})), s.push($(
|
|
817
|
+
})), s.push($(p, {
|
|
818
818
|
"data-cy": "hollow-average-value",
|
|
819
819
|
x: e.center.x,
|
|
820
|
-
y: e.center.y + (c ?
|
|
820
|
+
y: e.center.y + (c ? i : 0) + i + x(u.offsetY, 0),
|
|
821
821
|
fill: k(u.color, k(o.color, j(e.config))),
|
|
822
|
-
"font-size":
|
|
822
|
+
"font-size": f,
|
|
823
823
|
"font-weight": u.bold ? "700" : "400"
|
|
824
824
|
}));
|
|
825
825
|
}
|
|
@@ -829,20 +829,20 @@ function Ie(e, t, n) {
|
|
|
829
829
|
}, s.join("")) : "";
|
|
830
830
|
}
|
|
831
831
|
function Le(e, t) {
|
|
832
|
-
let { config: n, center:
|
|
833
|
-
if (!
|
|
834
|
-
let o = S(n, "layout.labels.dataLabels", {}), s = x(
|
|
835
|
-
return N(
|
|
832
|
+
let { config: n, center: i } = e, a = S(n, "layout.donut.labels.total", S(n, "layout.labels.total", {}));
|
|
833
|
+
if (!a.show || !Number.isFinite(t) || t <= 0) return "";
|
|
834
|
+
let o = S(n, "layout.labels.dataLabels", {}), s = x(a.fontSize, 20), c = k(a.color, j(n));
|
|
835
|
+
return N(d(a.formatter, t, r({
|
|
836
836
|
p: o.prefix ?? "",
|
|
837
837
|
v: t,
|
|
838
838
|
s: o.suffix ?? "",
|
|
839
|
-
r: x(
|
|
839
|
+
r: x(a.rounding, 0)
|
|
840
840
|
}), { total: t }), {
|
|
841
841
|
"data-cy": "donut-total",
|
|
842
|
-
x:
|
|
843
|
-
y:
|
|
842
|
+
x: i.x,
|
|
843
|
+
y: i.y + s / 3,
|
|
844
844
|
"font-size": s,
|
|
845
|
-
"font-weight":
|
|
845
|
+
"font-weight": a.bold ? "700" : "400",
|
|
846
846
|
"text-anchor": "middle",
|
|
847
847
|
fill: c
|
|
848
848
|
});
|
|
@@ -852,24 +852,24 @@ function Re(e, t) {
|
|
|
852
852
|
return n ? x(t.value, 0) / n * 100 : 0;
|
|
853
853
|
}
|
|
854
854
|
function ze(e, t) {
|
|
855
|
-
let n = S(e.config, "legend", {}),
|
|
856
|
-
p:
|
|
855
|
+
let n = S(e.config, "legend", {}), i = S(e.config, "layout.labels", {}), a = i.dataLabels ?? {}, o = i.value ?? {}, s = r({
|
|
856
|
+
p: a.prefix ?? "",
|
|
857
857
|
v: t.value,
|
|
858
|
-
s:
|
|
858
|
+
s: a.suffix ?? "",
|
|
859
859
|
r: x(n.roundingValue, o.rounding ?? 0)
|
|
860
860
|
});
|
|
861
|
-
return
|
|
861
|
+
return d(o.formatter, t.value, s, {
|
|
862
862
|
datapoint: t,
|
|
863
863
|
serie: t
|
|
864
864
|
});
|
|
865
865
|
}
|
|
866
866
|
function Be(e, t) {
|
|
867
|
-
let n = S(e.config, "legend", {}),
|
|
868
|
-
v:
|
|
867
|
+
let n = S(e.config, "legend", {}), i = S(e.config, "layout.labels", {}).percentage ?? {}, a = Re(e, t), o = r({
|
|
868
|
+
v: a,
|
|
869
869
|
s: "%",
|
|
870
|
-
r: x(n.roundingPercentage,
|
|
870
|
+
r: x(n.roundingPercentage, i.rounding ?? 0)
|
|
871
871
|
});
|
|
872
|
-
return
|
|
872
|
+
return d(i.formatter, a, o, {
|
|
873
873
|
datapoint: t,
|
|
874
874
|
serie: t
|
|
875
875
|
});
|
|
@@ -930,7 +930,7 @@ function We(e, t) {
|
|
|
930
930
|
}) ?? "" : n ?? "";
|
|
931
931
|
}
|
|
932
932
|
function Ge(e, t, n) {
|
|
933
|
-
return M("title", {},
|
|
933
|
+
return M("title", {}, o(`${E(e.config, "title.text", "Donut chart") || e.svgTitle || "Donut chart"}. ${t.length} series. Total ${g(n)}.`));
|
|
934
934
|
}
|
|
935
935
|
async function Ke(e) {
|
|
936
936
|
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({
|
|
@@ -940,7 +940,7 @@ async function Ke(e) {
|
|
|
940
940
|
}, 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);
|
|
941
941
|
return `
|
|
942
942
|
<svg
|
|
943
|
-
xmlns="${
|
|
943
|
+
xmlns="${m}"
|
|
944
944
|
width="100%"
|
|
945
945
|
viewBox="0 0 ${n} ${r}"
|
|
946
946
|
role="img"
|