vue-data-ui 3.22.7 → 3.22.9
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-DaGI9u-b.js → Arrow-DdymhUfY.js} +1 -1
- package/dist/{BaseDraggableDialog-1wwwdwV2.js → BaseDraggableDialog-Av7Uxq5V.js} +2 -2
- package/dist/BaseIcon-UdRAvP2h.js +483 -0
- package/dist/{BaseLegendToggle-CHnlKalt.js → BaseLegendToggle-DWtet-Hh.js} +1 -1
- package/dist/{BaseZoomControls-C9bdZSCj.js → BaseZoomControls-BY2KLqs6.js} +2 -2
- package/dist/{ColorPicker-TB3KhY3j.js → ColorPicker-DR_ummtM.js} +2 -2
- package/dist/{DataTable-CVF7DoZn.js → DataTable-BxpTMgfK.js} +2 -2
- package/dist/DefGrad-DVBqDjhO.js +48 -0
- package/dist/{Legend-kAr7Vqqu.js → Legend-ROt6ugzW.js} +2 -2
- package/dist/{NonSvgPenAndPaper-CEiv7_gM.js → NonSvgPenAndPaper-B6EG_Sga.js} +3 -3
- package/dist/{PackageVersion-Dse0n05o.js → PackageVersion-D__dRVRA.js} +1 -1
- package/dist/{PenAndPaper-gaV1QPpP.js → PenAndPaper-DsXi7GJ-.js} +3 -3
- package/dist/{Shape-CiQIxyyT.js → Shape-UpH0a4Ur.js} +3 -3
- package/dist/{Slicer-6FOtg9py.js → Slicer-CW_XPIKL.js} +369 -364
- package/dist/{SlicerPreview-DUywypFu.js → SlicerPreview-CTz41lOu.js} +542 -537
- package/dist/{SparkTooltip-B-qsPj68.js → SparkTooltip-BTLN-Kex.js} +6 -6
- package/dist/{Title-PiTKr6sp.js → Title-CcNiYzEo.js} +1 -1
- package/dist/{Tooltip-B8yYfISA.js → Tooltip-CxOrWlFy.js} +1 -1
- package/dist/{UserOptions-BL9VlHop.js → UserOptions-trvJ26nz.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-BZjYWNEg.js → dom-to-png-BbwhsRIr.js} +1 -1
- package/dist/exposedLib-VXFp3Z2c.js +19 -0
- package/dist/{geoProjections-Czak6Jn1.js → geoProjections-BbN7z57k.js} +172 -15
- package/dist/{img-B_abIg0o.js → img-DnP3eXuv.js} +1 -1
- package/dist/{labelUtils-CTDRZdP1.js → labelUtils-DBEh078l.js} +1 -1
- package/dist/{lib-EAmk-PgA.js → lib-JqW18y5I.js} +36 -30
- package/dist/{package-DeMimPej.js → package-ByOT60IK.js} +1 -1
- package/dist/{pdf-B6qrdEqB.js → pdf-hj3gzrE7.js} +1 -1
- package/dist/{render-common-DMai0gHB.js → render-common-D18VrP0h.js} +20 -20
- 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/utils.d.ts +18 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-CyOGrdD_.js → useAutoSizeLabelsInsideViewbox-BGnDfZdg.js} +1 -1
- package/dist/{useNestedProp-D8XqxgOU.js → useNestedProp-DIuuzG1r.js} +1 -1
- package/dist/{usePrinter-DnGzpp6Q.js → usePrinter-CqqHmnBI.js} +2 -2
- package/dist/utils.js +24 -24
- package/dist/{vue-data-ui-D6qVWloL.js → vue-data-ui-ub3fCh6P.js} +68 -68
- package/dist/vue-data-ui.js +77 -77
- package/dist/vue-ui-3d-bar-taPI41_I.js +1825 -0
- package/dist/{vue-ui-accordion-Dzz8XhX3.js → vue-ui-accordion-CjAGqEJg.js} +3 -3
- package/dist/vue-ui-age-pyramid-jvQZbF8E.js +1247 -0
- package/dist/{vue-ui-annotator-DXZumSP8.js → vue-ui-annotator-BIucnT0L.js} +67 -67
- package/dist/vue-ui-bullet-CIATzlsk.js +710 -0
- package/dist/vue-ui-bump-D8MxltQE.js +1249 -0
- package/dist/vue-ui-candlestick-DULUMU-Q.js +1840 -0
- package/dist/vue-ui-carousel-table-BSmdexG7.js +455 -0
- package/dist/{vue-ui-chestnut-C3IbAdkQ.js → vue-ui-chestnut-BIh1nQ7q.js} +585 -553
- package/dist/vue-ui-chord-DL1M7cgL.js +1391 -0
- package/dist/{vue-ui-circle-pack-Cq4lkmee.js → vue-ui-circle-pack-C1Pgq6si.js} +424 -418
- package/dist/{vue-ui-cursor-DLJcFwRZ.js → vue-ui-cursor-d2uLAKTQ.js} +61 -61
- package/dist/{vue-ui-dag-DemsIecS.js → vue-ui-dag-CVh9FpZr.js} +43 -43
- package/dist/{vue-ui-dashboard-DWHD_wNN.js → vue-ui-dashboard-BH0N3ebj.js} +69 -69
- package/dist/{vue-ui-digits-sIKc85vS.js → vue-ui-digits-R6wi3J-Y.js} +3 -3
- package/dist/{vue-ui-donut-Dp6GW0dw.js → vue-ui-donut-BWDeVzLc.js} +201 -201
- package/dist/{vue-ui-donut-CLheJPcO.js → vue-ui-donut-BoZdciGh.js} +825 -816
- package/dist/{vue-ui-donut-evolution-zmRPpJLj.js → vue-ui-donut-evolution-CpC9EMro.js} +486 -474
- package/dist/{vue-ui-dumbbell-bSbgHd0U.js → vue-ui-dumbbell-DGA5Bfnl.js} +520 -486
- package/dist/{vue-ui-flow-q_M7O1BK.js → vue-ui-flow-CNczKwTh.js} +119 -119
- package/dist/vue-ui-funnel-CaD2tZCT.js +782 -0
- package/dist/{vue-ui-galaxy-DCCWmIyH.js → vue-ui-galaxy-v3cTbUiM.js} +342 -342
- package/dist/vue-ui-gauge-DxvMjfoc.js +926 -0
- package/dist/{vue-ui-geo-CM59rpnj.js → vue-ui-geo-BgmLkZZ2.js} +14 -14
- package/dist/{vue-ui-gizmo-D2RL6IVp.js → vue-ui-gizmo-n1kmcGeE.js} +66 -61
- package/dist/{vue-ui-heatmap-BX6PQxML.js → vue-ui-heatmap-dSTh8ah_.js} +163 -163
- package/dist/{vue-ui-history-plot-DaHAeQph.js → vue-ui-history-plot-N8BqMFVU.js} +572 -561
- package/dist/vue-ui-horizontal-bar-CwiQxYzv.js +1689 -0
- package/dist/{vue-ui-kpi-DLbP7lJR.js → vue-ui-kpi-BKrUk9o8.js} +4 -4
- package/dist/{vue-ui-mini-loader-DPHzHsM7.js → vue-ui-mini-loader-D5we7V_W.js} +2 -2
- package/dist/vue-ui-molecule--kK1JfnP.js +931 -0
- package/dist/{vue-ui-mood-radar-CCWaPr0P.js → vue-ui-mood-radar-CpBRHQo_.js} +246 -241
- package/dist/vue-ui-nested-donuts-8Ehwcuns.js +1493 -0
- package/dist/vue-ui-onion-Cf6JiYTH.js +1200 -0
- package/dist/vue-ui-parallel-coordinate-plot-Blnqp1DB.js +1416 -0
- package/dist/{vue-ui-quadrant-T_UmRAAy.js → vue-ui-quadrant-CxU0jiOm.js} +410 -404
- package/dist/vue-ui-quick-chart-BO98uEPl.js +2469 -0
- package/dist/{vue-ui-radar-CHjeGOMC.js → vue-ui-radar-eH2Qih4_.js} +323 -317
- package/dist/{vue-ui-rating-Bek8Tgr-.js → vue-ui-rating-CN-ZiAES.js} +137 -128
- package/dist/{vue-ui-relation-circle-DRZGQ_UX.js → vue-ui-relation-circle-BIcP-aAt.js} +167 -167
- package/dist/{vue-ui-ridgeline-DIODGiu8.js → vue-ui-ridgeline-ChXHzEJw.js} +538 -532
- package/dist/vue-ui-rings-J990vNbX.js +1252 -0
- package/dist/vue-ui-scatter-BeJB0EKg.js +2422 -0
- package/dist/{vue-ui-skeleton-Fmue6DAG.js → vue-ui-skeleton-DC2bZ0nk.js} +385 -382
- package/dist/{vue-ui-smiley-BVMI5vUy.js → vue-ui-smiley-Dyyu1je3.js} +119 -106
- package/dist/vue-ui-spark-trend-CpDX85H3.js +443 -0
- package/dist/vue-ui-sparkbar-DhIo1qsW.js +398 -0
- package/dist/{vue-ui-sparkgauge-DDNNBIdf.js → vue-ui-sparkgauge-D0Fo3Hts.js} +79 -74
- package/dist/vue-ui-sparkhistogram-CUjFiuAh.js +576 -0
- package/dist/{vue-ui-sparkline-BNxdO-Bx.js → vue-ui-sparkline-ApivEMBP.js} +397 -384
- package/dist/{vue-ui-sparkstackbar-BfF5-Wg2.js → vue-ui-sparkstackbar-DsKQJx_n.js} +207 -195
- package/dist/{vue-ui-stackbar-B-2Me3d-.js → vue-ui-stackbar-Ds4hXATH.js} +595 -588
- package/dist/vue-ui-stackline-DJbcVvmN.js +2425 -0
- package/dist/vue-ui-strip-plot-C3ZHf4bD.js +1736 -0
- package/dist/{vue-ui-table-heatmap-D-Qrm3oX.js → vue-ui-table-heatmap-CNXNXXBU.js} +14 -14
- package/dist/vue-ui-table-sparkline-B9JJ4pFF.js +712 -0
- package/dist/{vue-ui-table-Dr1dK3d_.js → vue-ui-table-uudidrYt.js} +62 -62
- package/dist/vue-ui-thermometer-Bvw3oQb3.js +770 -0
- package/dist/{vue-ui-timer-B5bkNNHS.js → vue-ui-timer-5NAWw5BN.js} +94 -89
- package/dist/{vue-ui-tiremarks-Bn8b-ZSz.js → vue-ui-tiremarks-Caz_g1c5.js} +13 -13
- package/dist/vue-ui-treemap-F9upPyOI.js +1718 -0
- package/dist/vue-ui-waffle-Bk9AsrPp.js +1368 -0
- package/dist/{vue-ui-wheel-CeVwXtEX.js → vue-ui-wheel-DD6Q39BA.js} +130 -130
- package/dist/{vue-ui-word-cloud-D81-qJLw.js → vue-ui-word-cloud-BZLT5svo.js} +27 -27
- package/dist/vue-ui-world-DbEJN5NA.js +3027 -0
- package/dist/{vue-ui-xy-C2p9H2IX.js → vue-ui-xy-BYMAITk_.js} +1655 -1629
- package/dist/{vue-ui-xy-OhwS0kcZ.js → vue-ui-xy-Cn9Q8YPr.js} +116 -116
- package/dist/{vue-ui-xy-canvas-DLKDdH35.js → vue-ui-xy-canvas-Dcm2ftwm.js} +58 -58
- package/package.json +1 -1
- package/dist/BaseIcon-_-BX7be3.js +0 -502
- package/dist/exposedLib-Be0ifkti.js +0 -19
- package/dist/vue-ui-3d-bar-CjNuWXoA.js +0 -1757
- package/dist/vue-ui-age-pyramid-CC7Dxli-.js +0 -1238
- package/dist/vue-ui-bullet-Dde6FhbR.js +0 -710
- package/dist/vue-ui-bump-C5pni1JV.js +0 -1249
- package/dist/vue-ui-candlestick-Ctw65O4_.js +0 -1829
- package/dist/vue-ui-carousel-table-BEUvhUH0.js +0 -455
- package/dist/vue-ui-chord-5eCWG4br.js +0 -1391
- package/dist/vue-ui-funnel-BEZUEuuh.js +0 -777
- package/dist/vue-ui-gauge-B1ljgfE1.js +0 -920
- package/dist/vue-ui-horizontal-bar-CTW6l4n3.js +0 -1683
- package/dist/vue-ui-molecule-aD0SMTiX.js +0 -925
- package/dist/vue-ui-nested-donuts--BCPWkl7.js +0 -1487
- package/dist/vue-ui-onion-s4iMCGAP.js +0 -1200
- package/dist/vue-ui-parallel-coordinate-plot-CfgvpyoC.js +0 -1416
- package/dist/vue-ui-quick-chart-D1OWBgQJ.js +0 -2469
- package/dist/vue-ui-rings-CcdUSXGG.js +0 -1246
- package/dist/vue-ui-scatter-CixnqLoi.js +0 -2413
- package/dist/vue-ui-spark-trend-DfZeLiWA.js +0 -438
- package/dist/vue-ui-sparkbar-Cl1e49sw.js +0 -393
- package/dist/vue-ui-sparkhistogram-ny_liYa6.js +0 -560
- package/dist/vue-ui-stackline-CdvVPQUM.js +0 -2419
- package/dist/vue-ui-strip-plot-CRXPXA5V.js +0 -1729
- package/dist/vue-ui-table-sparkline-C31Q32My.js +0 -712
- package/dist/vue-ui-thermometer-BUrtIfuo.js +0 -763
- package/dist/vue-ui-treemap-LMWiicop.js +0 -1713
- package/dist/vue-ui-waffle-B_L3gkky.js +0 -1362
- package/dist/vue-ui-world-B7npRmTa.js +0 -14264
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as e, Dt as t, G as n, J as r, Kt as i, Mt as a, Rt as o, W as s, Wt as c, b as l, d as u, et as d, i as f, k as p, p as m, t as h, u as g, v as _, zt as v } from "./lib-JqW18y5I.js";
|
|
2
2
|
import { t as y } from "./useConfig-DYM3f6EI.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-D18VrP0h.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 t = e ?? {},
|
|
8
|
+
let t = e ?? {}, n = i({
|
|
9
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 : a
|
|
15
15
|
};
|
|
16
|
-
let
|
|
16
|
+
let o = i({
|
|
17
17
|
userConfig: t,
|
|
18
|
-
defaultConfig:
|
|
19
|
-
userConfig: b[
|
|
20
|
-
defaultConfig:
|
|
18
|
+
defaultConfig: i({
|
|
19
|
+
userConfig: b[r] || {},
|
|
20
|
+
defaultConfig: n
|
|
21
21
|
})
|
|
22
22
|
});
|
|
23
23
|
return {
|
|
24
|
-
...
|
|
25
|
-
customPalette:
|
|
24
|
+
...o,
|
|
25
|
+
customPalette: o.customPalette?.length ? o.customPalette : c[r] || a
|
|
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 : a;
|
|
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 = n();
|
|
121
121
|
function I() {
|
|
122
122
|
return ue;
|
|
123
123
|
}
|
|
@@ -223,7 +223,7 @@ function he(e, n) {
|
|
|
223
223
|
}
|
|
224
224
|
function ge(e, t) {
|
|
225
225
|
let n = Math.max(1, ...t.map((e) => Math.abs(x(e.value, 0))));
|
|
226
|
-
return
|
|
226
|
+
return p({
|
|
227
227
|
series: t.map((e) => Math.abs(x(e.value, 0)) / n),
|
|
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, r = [], i = !!S(n, "useGradient", !1), a = !!S(n, "layout.donut.useShadow", !1);
|
|
275
|
+
if (i) {
|
|
276
|
+
let i = E(n, "type", "classic"), a = x(S(n, "gradientIntensity", 30), 30);
|
|
277
|
+
if (i === "classic" && Number.isFinite(e.thickness / e.radius)) {
|
|
278
278
|
let t = V(n) ? 1 : e.thickness / e.radius;
|
|
279
|
-
|
|
279
|
+
r.push(M("radialGradient", { id: H(e) }, [
|
|
280
280
|
w("stop", {
|
|
281
281
|
offset: "0%",
|
|
282
|
-
"stop-color":
|
|
282
|
+
"stop-color": o(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": o("#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": o("#FFFFFF", a)
|
|
293
293
|
}),
|
|
294
294
|
w("stop", {
|
|
295
295
|
offset: "100%",
|
|
296
|
-
"stop-color":
|
|
296
|
+
"stop-color": o(L(n), 0),
|
|
297
297
|
"stop-opacity": 0
|
|
298
298
|
})
|
|
299
299
|
].join("")));
|
|
300
300
|
}
|
|
301
|
-
|
|
302
|
-
let
|
|
303
|
-
|
|
301
|
+
i === "polar" && t.forEach((t, n) => {
|
|
302
|
+
let i = e.polarAreas?.[n];
|
|
303
|
+
i?.middlePoint && r.push(M("radialGradient", {
|
|
304
304
|
id: U(e, n),
|
|
305
|
-
cx: `${
|
|
306
|
-
cy: `${
|
|
305
|
+
cx: `${_(i.middlePoint.x / e.width * 100)}%`,
|
|
306
|
+
cy: `${_(i.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": v(t.color, .05),
|
|
311
|
+
"stop-opacity": a / 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 (a) {
|
|
319
|
+
let t = k(S(n, "layout.donut.shadowColor", "#000000"), "#000000"), i = 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
|
+
r.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": i
|
|
332
332
|
})].join("")));
|
|
333
333
|
}
|
|
334
|
-
return
|
|
334
|
+
return r.length ? M("defs", { "data-layer": "definitions" }, r.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:
|
|
392
|
-
p:
|
|
391
|
+
let { config: i } = e, a = S(i, "layout.labels", {}), o = a.dataLabels ?? {}, s = a.value ?? {}, c = r({
|
|
392
|
+
p: o.prefix ?? "",
|
|
393
393
|
v: t.value,
|
|
394
|
-
s:
|
|
395
|
-
r: x(S(
|
|
394
|
+
s: o.suffix ?? "",
|
|
395
|
+
r: x(S(i, n, s.rounding ?? 0), s.rounding ?? 0)
|
|
396
396
|
});
|
|
397
|
-
return
|
|
397
|
+
return f(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 f(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);
|
|
@@ -437,11 +437,11 @@ function Ee(e, t) {
|
|
|
437
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
438
|
function h(e) {
|
|
439
439
|
return {
|
|
440
|
-
x:
|
|
441
|
-
y:
|
|
440
|
+
x: _(e.center?.endX ?? e.endX),
|
|
441
|
+
y: _(e.center?.endY ?? e.endY)
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function v({ midX: e, midY: t, bandX: n, bandY: r }) {
|
|
445
445
|
if (!m) return `M ${e} ${t} L ${e} ${r} L ${n} ${r}`;
|
|
446
446
|
let o = n < i ? -1 : 1, s = n - e, c = r - t, l = Math.sqrt(s * s + c * c) || 1, u = e - i, d = t - a, f = Math.sqrt(u * u + d * d) || 1, p = u / f, h = d / f, g = f + 9;
|
|
447
447
|
function _({ x: e, y: t }) {
|
|
@@ -489,7 +489,7 @@ function Ee(e, t) {
|
|
|
489
489
|
index: t,
|
|
490
490
|
midX: n.x,
|
|
491
491
|
midY: n.y,
|
|
492
|
-
inlineMarkerX:
|
|
492
|
+
inlineMarkerX: g(e).x,
|
|
493
493
|
inlineMarkerY: u(e) - 3.5,
|
|
494
494
|
labelHeight: y(e.name)
|
|
495
495
|
};
|
|
@@ -518,7 +518,7 @@ function Ee(e, t) {
|
|
|
518
518
|
e.forEach((e) => {
|
|
519
519
|
let { index: i, midX: s, midY: c, labelHeight: l } = e, u;
|
|
520
520
|
a === "down" ? (u = o, o += l) : (o -= l, u = o);
|
|
521
|
-
let d = u, f =
|
|
521
|
+
let d = u, f = v({
|
|
522
522
|
midX: s,
|
|
523
523
|
midY: c,
|
|
524
524
|
bandX: n,
|
|
@@ -572,27 +572,27 @@ function Ee(e, t) {
|
|
|
572
572
|
direction: "up"
|
|
573
573
|
}), r;
|
|
574
574
|
}
|
|
575
|
-
function De({ state:
|
|
576
|
-
let
|
|
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 ?? g(t, !0, 12).x, l = r?.labelY ?? u(t), f = r?.textAnchor ?? g(t, !0, 12).anchor, { name: p } = Y(e, t), m = we(e, t), h = String(p).split(/\n/g), _ = p ? h.map((t, n) => M("tspan", {
|
|
577
577
|
class: "vue-data-ui-datalabel-name",
|
|
578
|
-
x:
|
|
579
|
-
dy:
|
|
580
|
-
fill: k(
|
|
581
|
-
"font-size":
|
|
582
|
-
"font-weight": c.bold ? "700" : "400"
|
|
583
|
-
}, e(n + (r === h.length - 1 ? " " : "")))).join("") : "", v = m ? M("tspan", {
|
|
584
|
-
class: "vue-data-ui-datalabel-value",
|
|
585
|
-
fill: k(s.color, j(t.config)),
|
|
586
|
-
"font-size": a,
|
|
578
|
+
x: n === 0 ? void 0 : c,
|
|
579
|
+
dy: n === 0 ? void 0 : i * 1.2,
|
|
580
|
+
fill: k(s.color, j(e.config)),
|
|
581
|
+
"font-size": i,
|
|
587
582
|
"font-weight": s.bold ? "700" : "400"
|
|
588
|
-
},
|
|
583
|
+
}, d(t + (n === h.length - 1 ? " " : "")))).join("") : "", v = m ? M("tspan", {
|
|
584
|
+
class: "vue-data-ui-datalabel-value",
|
|
585
|
+
fill: k(o.color, j(e.config)),
|
|
586
|
+
"font-size": i,
|
|
587
|
+
"font-weight": o.bold ? "700" : "400"
|
|
588
|
+
}, d(m)) : "";
|
|
589
589
|
return M("text", {
|
|
590
|
-
"data-cy": `donut-label-inline-${
|
|
590
|
+
"data-cy": `donut-label-inline-${n}`,
|
|
591
591
|
class: "vue-data-ui-datalabel-inline",
|
|
592
|
-
x:
|
|
593
|
-
y:
|
|
592
|
+
x: c,
|
|
593
|
+
y: l,
|
|
594
594
|
"text-anchor": f
|
|
595
|
-
}, `${
|
|
595
|
+
}, `${_}${v}`);
|
|
596
596
|
}
|
|
597
597
|
function Oe(e, t) {
|
|
598
598
|
let n = S(e.config, "layout.labels", {}), r = n.dataLabels ?? {};
|
|
@@ -618,89 +618,89 @@ function Oe(e, t) {
|
|
|
618
618
|
arc: t,
|
|
619
619
|
arcIndex: n,
|
|
620
620
|
smallArcLayout: {
|
|
621
|
-
labelX:
|
|
621
|
+
labelX: g(t, !1, a + i / 2).x,
|
|
622
622
|
labelY: u(t, a, a),
|
|
623
|
-
textAnchor:
|
|
623
|
+
textAnchor: g(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
|
-
function je(t, n, r
|
|
642
|
-
let
|
|
641
|
+
function je(e, t, n, r) {
|
|
642
|
+
let i = S(e.config, "layout.labels", {}), a = i.percentage ?? {}, o = i.name ?? {}, s = x(a.fontSize, i.dataLabels?.fontSize ?? 12), c = x(o.fontSize, i.dataLabels?.fontSize ?? 12), l = M("tspan", {
|
|
643
643
|
class: "vue-data-ui-datalabel-value",
|
|
644
|
-
fill: k(
|
|
644
|
+
fill: k(a.color, j(e.config)),
|
|
645
|
+
"font-size": s,
|
|
646
|
+
"font-weight": a.bold ? "700" : "400"
|
|
647
|
+
}, d(String(X(e, t).replace(/\n/g, " / ")))), u = o.show ? String(t.name ?? "").split(/\n/g).map((t, r) => M("tspan", {
|
|
648
|
+
class: "vue-data-ui-datalabel-name",
|
|
649
|
+
x: r === 0 ? void 0 : n,
|
|
650
|
+
dy: r === 0 ? void 0 : c * 1.2,
|
|
651
|
+
fill: k(o.color, j(e.config)),
|
|
645
652
|
"font-size": c,
|
|
646
653
|
"font-weight": o.bold ? "700" : "400"
|
|
647
|
-
},
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
if (!E(t.config, "dataLabels.show", a.show ?? !0) || !a.show) return "";
|
|
660
|
-
let u = !!a.oneLine, d = x(s.fontSize, a.fontSize ?? 12), f = x(l.fontSize, a.fontSize ?? 12), p = [];
|
|
661
|
-
return n.forEach((n, i) => {
|
|
662
|
-
let a = r[i];
|
|
663
|
-
if (!a || !Z(t, n)) return;
|
|
664
|
-
let s = ke(t, a, 42), m = Ae(t, s);
|
|
665
|
-
if (u) {
|
|
654
|
+
}, d(t))).join("") : "";
|
|
655
|
+
return r === "end" ? `${u}${l}` : `${l}${u}`;
|
|
656
|
+
}
|
|
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), f = x(c.fontSize, i.fontSize ?? 12), p = [];
|
|
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
|
+
if (l) {
|
|
666
666
|
p.push(M("text", {
|
|
667
667
|
"data-cy": "polar-label-inline",
|
|
668
668
|
class: "vue-data-ui-datalabel-inline",
|
|
669
|
-
x:
|
|
670
|
-
y:
|
|
669
|
+
x: a.x,
|
|
670
|
+
y: a.y,
|
|
671
671
|
"text-anchor": m
|
|
672
|
-
}, je(
|
|
672
|
+
}, je(e, t, a.x, m)));
|
|
673
673
|
return;
|
|
674
674
|
}
|
|
675
675
|
p.push(M("text", {
|
|
676
676
|
"data-cy": "polar-label-value",
|
|
677
677
|
class: "vue-data-ui-datalabel-value",
|
|
678
|
-
x:
|
|
679
|
-
y:
|
|
680
|
-
"font-size":
|
|
681
|
-
"font-weight":
|
|
678
|
+
x: a.x,
|
|
679
|
+
y: a.y,
|
|
680
|
+
"font-size": u,
|
|
681
|
+
"font-weight": o.bold ? "700" : "400",
|
|
682
682
|
"text-anchor": m,
|
|
683
683
|
fill: valueFill
|
|
684
684
|
}, te({
|
|
685
|
-
content: X(
|
|
686
|
-
x:
|
|
687
|
-
fontSize:
|
|
685
|
+
content: X(e, t),
|
|
686
|
+
x: a.x,
|
|
687
|
+
fontSize: u,
|
|
688
688
|
fill: valueFill,
|
|
689
689
|
textAnchor: m
|
|
690
|
-
}))),
|
|
690
|
+
}))), c.show && p.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 + f * 1.2,
|
|
695
695
|
"font-size": f,
|
|
696
|
-
"font-weight":
|
|
696
|
+
"font-weight": c.bold ? "700" : "400",
|
|
697
697
|
"text-anchor": m,
|
|
698
|
-
fill: k(
|
|
699
|
-
},
|
|
700
|
-
content:
|
|
698
|
+
fill: k(c.color, j(e.config))
|
|
699
|
+
}, s({
|
|
700
|
+
content: d(String(t.name ?? "")),
|
|
701
701
|
fontSize: f,
|
|
702
|
-
fill: k(
|
|
703
|
-
x:
|
|
702
|
+
fill: k(c.color, j(e.config)),
|
|
703
|
+
x: a.x
|
|
704
704
|
})));
|
|
705
705
|
}), p.length ? M("g", { "data-layer": "polar-data-labels" }, p.join("")) : "";
|
|
706
706
|
}
|
|
@@ -726,7 +726,7 @@ 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 ??
|
|
729
|
+
cx: o?.markerX ?? g(t).x,
|
|
730
730
|
cy: o?.markerY ?? u(t) - 3.5,
|
|
731
731
|
r: x(n.markerRadius, 3),
|
|
732
732
|
fill: t.color,
|
|
@@ -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(
|
|
739
|
-
let
|
|
740
|
-
if (!E(
|
|
741
|
-
let
|
|
742
|
-
return
|
|
743
|
-
let
|
|
744
|
-
if (!
|
|
745
|
-
let
|
|
746
|
-
initX:
|
|
747
|
-
initY:
|
|
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
|
+
let a = [];
|
|
742
|
+
return n.forEach((n, o) => {
|
|
743
|
+
let s = r[o];
|
|
744
|
+
if (!s?.middlePoint || !Z(t, n)) return;
|
|
745
|
+
let c = e({
|
|
746
|
+
initX: s.middlePoint.x,
|
|
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
|
-
|
|
753
|
-
"data-cy": `polar-marker-${
|
|
754
|
-
d: `M ${
|
|
755
|
-
stroke:
|
|
756
|
-
"stroke-width": x(
|
|
752
|
+
a.push(w("path", {
|
|
753
|
+
"data-cy": `polar-marker-${o}`,
|
|
754
|
+
d: `M ${c.x},${c.y} ${s.middlePoint.x},${s.middlePoint.y}`,
|
|
755
|
+
stroke: n.color,
|
|
756
|
+
"stroke-width": x(i.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
|
+
})), a.push(w("circle", {
|
|
761
|
+
"data-cy": `polar-label-marker-${o}`,
|
|
762
|
+
cx: c.x,
|
|
763
|
+
cy: c.y,
|
|
764
|
+
r: x(i.markerRadius, 3),
|
|
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("")) : "";
|
|
770
770
|
}
|
|
771
771
|
function $(e, t) {
|
|
772
772
|
return e == null || e === "" ? "" : N(e, {
|
|
@@ -776,75 +776,75 @@ 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(
|
|
782
|
-
p:
|
|
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), d = f(l.formatter, t, r({
|
|
782
|
+
p: l.prefix ?? "",
|
|
783
783
|
v: t,
|
|
784
|
-
s:
|
|
785
|
-
r: x(
|
|
784
|
+
s: l.suffix ?? "",
|
|
785
|
+
r: x(l.rounding, 0)
|
|
786
786
|
}), { total: t });
|
|
787
|
-
|
|
787
|
+
s.push($(a.text ?? "", {
|
|
788
788
|
"data-cy": "hollow-total-name",
|
|
789
789
|
x: e.center.x,
|
|
790
|
-
y:
|
|
791
|
-
fill: k(
|
|
790
|
+
y: c,
|
|
791
|
+
fill: k(a.color, j(e.config)),
|
|
792
792
|
"font-size": n,
|
|
793
|
-
"font-weight":
|
|
794
|
-
})),
|
|
793
|
+
"font-weight": a.bold ? "700" : "400"
|
|
794
|
+
})), s.push($(d, {
|
|
795
795
|
"data-cy": "hollow-total-value",
|
|
796
796
|
x: e.center.x,
|
|
797
|
-
y: e.center.y + n - (
|
|
798
|
-
fill: k(
|
|
799
|
-
"font-size":
|
|
800
|
-
"font-weight":
|
|
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
|
+
"font-size": u,
|
|
800
|
+
"font-weight": l.bold ? "700" : "400"
|
|
801
801
|
}));
|
|
802
802
|
}
|
|
803
|
-
if (
|
|
804
|
-
let
|
|
805
|
-
p:
|
|
806
|
-
v:
|
|
807
|
-
s:
|
|
808
|
-
r: x(
|
|
809
|
-
}), { average:
|
|
810
|
-
|
|
803
|
+
if (o.show) {
|
|
804
|
+
let i = x(o.fontSize, 14), c = !!a.show, l = t / Math.max(1, n.length), u = o.value ?? {}, d = x(u.fontSize, i), p = f(u.formatter, l, r({
|
|
805
|
+
p: u.prefix ?? "",
|
|
806
|
+
v: l,
|
|
807
|
+
s: u.suffix ?? "",
|
|
808
|
+
r: x(u.rounding, 0)
|
|
809
|
+
}), { average: l });
|
|
810
|
+
s.push($(o.text ?? "", {
|
|
811
811
|
"data-cy": "hollow-average-name",
|
|
812
812
|
x: e.center.x,
|
|
813
|
-
y: e.center.y + (
|
|
814
|
-
fill: k(
|
|
815
|
-
"font-size":
|
|
816
|
-
"font-weight":
|
|
817
|
-
})),
|
|
813
|
+
y: e.center.y + (c ? i : 0) + x(o.offsetY, 0),
|
|
814
|
+
fill: k(o.color, j(e.config)),
|
|
815
|
+
"font-size": i,
|
|
816
|
+
"font-weight": o.bold ? "700" : "400"
|
|
817
|
+
})), s.push($(p, {
|
|
818
818
|
"data-cy": "hollow-average-value",
|
|
819
819
|
x: e.center.x,
|
|
820
|
-
y: e.center.y + (
|
|
821
|
-
fill: k(
|
|
822
|
-
"font-size":
|
|
823
|
-
"font-weight":
|
|
820
|
+
y: e.center.y + (c ? i : 0) + i + x(u.offsetY, 0),
|
|
821
|
+
fill: k(u.color, k(o.color, j(e.config))),
|
|
822
|
+
"font-size": d,
|
|
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
|
-
},
|
|
829
|
+
}, s.join("")) : "";
|
|
830
830
|
}
|
|
831
831
|
function Le(e, t) {
|
|
832
|
-
let { config: n, center:
|
|
833
|
-
if (!
|
|
834
|
-
let
|
|
835
|
-
return N(
|
|
836
|
-
p:
|
|
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(f(a.formatter, t, r({
|
|
836
|
+
p: o.prefix ?? "",
|
|
837
837
|
v: t,
|
|
838
|
-
s:
|
|
839
|
-
r: x(
|
|
838
|
+
s: o.suffix ?? "",
|
|
839
|
+
r: x(a.rounding, 0)
|
|
840
840
|
}), { total: t }), {
|
|
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
|
-
fill:
|
|
847
|
+
fill: c
|
|
848
848
|
});
|
|
849
849
|
}
|
|
850
850
|
function Re(e, t) {
|
|
@@ -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:
|
|
859
|
-
r: x(n.roundingValue,
|
|
858
|
+
s: a.suffix ?? "",
|
|
859
|
+
r: x(n.roundingValue, o.rounding ?? 0)
|
|
860
860
|
});
|
|
861
|
-
return
|
|
861
|
+
return f(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 f(i.formatter, a, o, {
|
|
873
873
|
datapoint: t,
|
|
874
874
|
serie: t
|
|
875
875
|
});
|
|
@@ -929,8 +929,8 @@ function We(e, t) {
|
|
|
929
929
|
series: t.map((e) => ({ ...e }))
|
|
930
930
|
}) ?? "" : n ?? "";
|
|
931
931
|
}
|
|
932
|
-
function Ge(t, n
|
|
933
|
-
return M("title", {},
|
|
932
|
+
function Ge(e, t, n) {
|
|
933
|
+
return M("title", {}, d(`${E(e.config, "title.text", "Donut chart") || e.svgTitle || "Donut chart"}. ${t.length} series. Total ${_(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="${h}"
|
|
944
944
|
width="100%"
|
|
945
945
|
viewBox="0 0 ${n} ${r}"
|
|
946
946
|
role="img"
|