vue-data-ui 3.22.9 → 3.22.10
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-DdymhUfY.js → Arrow-Ku6rQ87g.js} +1 -1
- package/dist/{BaseDraggableDialog-Av7Uxq5V.js → BaseDraggableDialog-CdkCqtag.js} +2 -2
- package/dist/{BaseIcon-UdRAvP2h.js → BaseIcon-CDTIUIKV.js} +1 -1
- package/dist/{BaseLegendToggle-DWtet-Hh.js → BaseLegendToggle-BrQ2OlzI.js} +1 -1
- package/dist/{BaseZoomControls-BY2KLqs6.js → BaseZoomControls-CkEX0292.js} +2 -2
- package/dist/{ColorPicker-DR_ummtM.js → ColorPicker-C959ZIW9.js} +2 -2
- package/dist/{DataTable-BxpTMgfK.js → DataTable-ByZy5gt1.js} +2 -2
- package/dist/{Legend-ROt6ugzW.js → Legend-5VQGLnmx.js} +2 -2
- package/dist/{NonSvgPenAndPaper-B6EG_Sga.js → NonSvgPenAndPaper-Bd8OzTqw.js} +3 -3
- package/dist/{PackageVersion-D__dRVRA.js → PackageVersion-BoTvk0i5.js} +1 -1
- package/dist/{PenAndPaper-DsXi7GJ-.js → PenAndPaper-CLaZJl6K.js} +3 -3
- package/dist/{Shape-UpH0a4Ur.js → Shape-B5ksaGa1.js} +3 -3
- package/dist/{Slicer-CW_XPIKL.js → Slicer-WsWTQPKt.js} +21 -21
- package/dist/{SlicerPreview-CTz41lOu.js → SlicerPreview-3n516NyE.js} +214 -214
- package/dist/{SparkTooltip-BTLN-Kex.js → SparkTooltip-CbYYc-xb.js} +1 -1
- package/dist/{Title-CcNiYzEo.js → Title-Cr3jP7Qd.js} +1 -1
- package/dist/{Tooltip-CxOrWlFy.js → Tooltip-CDbLl3TD.js} +1 -1
- package/dist/{UserOptions-trvJ26nz.js → UserOptions-BUQOnoPR.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-BbwhsRIr.js → dom-to-png-COPbGrdd.js} +1 -1
- package/dist/exposedLib-CZbtc2a6.js +25 -0
- package/dist/{img-DnP3eXuv.js → img-CNdXiUfZ.js} +1 -1
- package/dist/{labelUtils-DBEh078l.js → labelUtils-JaoYKi2N.js} +1 -1
- package/dist/{lib-JqW18y5I.js → lib-CnHx5WfV.js} +118 -107
- package/dist/{package-ByOT60IK.js → package-BRBLwZUc.js} +1 -1
- package/dist/{pdf-hj3gzrE7.js → pdf-CEMzBeuV.js} +1 -1
- package/dist/{render-common-D18VrP0h.js → render-common-DJXFRGhU.js} +10 -10
- 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/types/utils.d.ts +40 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-BGnDfZdg.js → useAutoSizeLabelsInsideViewbox-BUPt2iaP.js} +1 -1
- package/dist/{useNestedProp-DIuuzG1r.js → useNestedProp-D8NuRneO.js} +2 -2
- package/dist/{usePrinter-CqqHmnBI.js → usePrinter-B-X_Pub0.js} +2 -2
- package/dist/utils.js +26 -24
- package/dist/{vue-data-ui-ub3fCh6P.js → vue-data-ui-Bx_8d3b_.js} +68 -68
- package/dist/vue-data-ui.js +77 -77
- package/dist/vue-ui-3d-bar-CfUfbpSE.js +1825 -0
- package/dist/{vue-ui-accordion-CjAGqEJg.js → vue-ui-accordion-Oo3IsX3-.js} +3 -3
- package/dist/vue-ui-age-pyramid-DD-4y5Jd.js +1247 -0
- package/dist/{vue-ui-annotator-BIucnT0L.js → vue-ui-annotator-BvGE3lzE.js} +8 -8
- package/dist/vue-ui-bullet-DYOdbaO2.js +710 -0
- package/dist/vue-ui-bump-B8fJoxHF.js +1249 -0
- package/dist/{vue-ui-candlestick-DULUMU-Q.js → vue-ui-candlestick-BUP1JoNs.js} +287 -287
- package/dist/vue-ui-carousel-table-D-Bwhydt.js +455 -0
- package/dist/vue-ui-chestnut-C2VK2NEx.js +2042 -0
- package/dist/{vue-ui-chord-DL1M7cgL.js → vue-ui-chord-AA-QjUQI.js} +42 -42
- package/dist/{vue-ui-circle-pack-C1Pgq6si.js → vue-ui-circle-pack-CdBFGYOK.js} +37 -37
- package/dist/{vue-ui-cursor-d2uLAKTQ.js → vue-ui-cursor-Cm_J_5Gk.js} +5 -5
- package/dist/{vue-ui-dag-CVh9FpZr.js → vue-ui-dag-CgRph4-n.js} +32 -32
- package/dist/{vue-ui-dashboard-BH0N3ebj.js → vue-ui-dashboard-BuPw5QjB.js} +69 -69
- package/dist/{vue-ui-digits-R6wi3J-Y.js → vue-ui-digits-ClrukmcB.js} +3 -3
- package/dist/vue-ui-donut-Bc-EPZvu.js +2419 -0
- package/dist/{vue-ui-donut-BWDeVzLc.js → vue-ui-donut-DtQCrMKL.js} +207 -207
- package/dist/vue-ui-donut-evolution-DHkiY-BD.js +1522 -0
- package/dist/vue-ui-dumbbell-BlHEH4Mw.js +1564 -0
- package/dist/{vue-ui-flow-CNczKwTh.js → vue-ui-flow-PjwAW2tY.js} +71 -71
- package/dist/vue-ui-funnel-DojI09FV.js +782 -0
- package/dist/{vue-ui-galaxy-v3cTbUiM.js → vue-ui-galaxy-txYIK_LG.js} +276 -276
- package/dist/{vue-ui-gauge-DxvMjfoc.js → vue-ui-gauge-CoL0OzSd.js} +178 -178
- package/dist/{vue-ui-geo-BgmLkZZ2.js → vue-ui-geo-yuL-_sqF.js} +20 -20
- package/dist/{vue-ui-gizmo-n1kmcGeE.js → vue-ui-gizmo-CbC5zV3K.js} +9 -9
- package/dist/{vue-ui-heatmap-dSTh8ah_.js → vue-ui-heatmap-CwqsZIsR.js} +331 -331
- package/dist/{vue-ui-history-plot-N8BqMFVU.js → vue-ui-history-plot-CuWssH-D.js} +414 -414
- package/dist/vue-ui-horizontal-bar-Dyje3GND.js +1689 -0
- package/dist/{vue-ui-kpi-BKrUk9o8.js → vue-ui-kpi-BdYenScF.js} +3 -3
- package/dist/{vue-ui-mini-loader-D5we7V_W.js → vue-ui-mini-loader-BbwE3vBT.js} +2 -2
- package/dist/vue-ui-molecule-BBh31vmd.js +931 -0
- package/dist/{vue-ui-mood-radar-CpBRHQo_.js → vue-ui-mood-radar-B_6GFlaR.js} +261 -261
- package/dist/vue-ui-nested-donuts-BWq-At5Y.js +1493 -0
- package/dist/vue-ui-onion-BwGbSE-6.js +1200 -0
- package/dist/vue-ui-parallel-coordinate-plot-Bh9hNoqf.js +1416 -0
- package/dist/vue-ui-quadrant-B72Y4Zuw.js +1984 -0
- package/dist/{vue-ui-quick-chart-BO98uEPl.js → vue-ui-quick-chart-B3LF2ViM.js} +108 -108
- package/dist/vue-ui-radar-4v_E8oGX.js +1287 -0
- package/dist/{vue-ui-rating-CN-ZiAES.js → vue-ui-rating-CzLGCFWK.js} +101 -101
- package/dist/vue-ui-relation-circle-B_8dyIv2.js +924 -0
- package/dist/vue-ui-ridgeline-BArLhskj.js +1628 -0
- package/dist/vue-ui-rings-Csn5BgLk.js +1252 -0
- package/dist/vue-ui-scatter-BBaOx94M.js +2422 -0
- package/dist/{vue-ui-skeleton-DC2bZ0nk.js → vue-ui-skeleton-KeIPGp9U.js} +99 -99
- package/dist/{vue-ui-smiley-Dyyu1je3.js → vue-ui-smiley-C1mYDh4R.js} +17 -17
- package/dist/vue-ui-spark-trend-EqCqmHmU.js +443 -0
- package/dist/{vue-ui-sparkbar-DhIo1qsW.js → vue-ui-sparkbar-BPh45vBP.js} +66 -66
- package/dist/{vue-ui-sparkgauge-D0Fo3Hts.js → vue-ui-sparkgauge-CtouPcyW.js} +65 -65
- package/dist/vue-ui-sparkhistogram-D4sI0DHN.js +576 -0
- package/dist/{vue-ui-sparkline-ApivEMBP.js → vue-ui-sparkline-BDFZ78Fz.js} +51 -51
- package/dist/vue-ui-sparkstackbar-CbTXIfxm.js +674 -0
- package/dist/{vue-ui-stackbar-Ds4hXATH.js → vue-ui-stackbar-nMXIY9x8.js} +108 -108
- package/dist/vue-ui-stackline-CzfXl5ah.js +2425 -0
- package/dist/{vue-ui-strip-plot-C3ZHf4bD.js → vue-ui-strip-plot-BCf5nthl.js} +65 -65
- package/dist/vue-ui-table-BAKkFXki.js +1338 -0
- package/dist/{vue-ui-table-heatmap-CNXNXXBU.js → vue-ui-table-heatmap-CUMxqHKK.js} +15 -15
- package/dist/{vue-ui-table-sparkline-B9JJ4pFF.js → vue-ui-table-sparkline-BVTm16fd.js} +20 -20
- package/dist/vue-ui-thermometer-CGeEW1KV.js +770 -0
- package/dist/{vue-ui-timer-5NAWw5BN.js → vue-ui-timer-Bz7EnsM1.js} +5 -5
- package/dist/{vue-ui-tiremarks-Caz_g1c5.js → vue-ui-tiremarks-IOqtk_Rr.js} +17 -17
- package/dist/{vue-ui-treemap-F9upPyOI.js → vue-ui-treemap-JxNNtb7v.js} +232 -232
- package/dist/vue-ui-waffle-D34mcJWi.js +1368 -0
- package/dist/{vue-ui-wheel-DD6Q39BA.js → vue-ui-wheel-B_qEhyvk.js} +44 -44
- package/dist/{vue-ui-word-cloud-BZLT5svo.js → vue-ui-word-cloud-TtObhd91.js} +32 -32
- package/dist/{vue-ui-world-DbEJN5NA.js → vue-ui-world-R9o00A6c.js} +210 -210
- package/dist/{vue-ui-xy-BYMAITk_.js → vue-ui-xy-CUt6sU1s.js} +766 -766
- package/dist/{vue-ui-xy-Cn9Q8YPr.js → vue-ui-xy-Do34-UbE.js} +134 -134
- package/dist/vue-ui-xy-canvas-C6eRRH--.js +1790 -0
- package/package.json +1 -1
- package/dist/exposedLib-VXFp3Z2c.js +0 -19
- package/dist/vue-ui-3d-bar-taPI41_I.js +0 -1825
- package/dist/vue-ui-age-pyramid-jvQZbF8E.js +0 -1247
- package/dist/vue-ui-bullet-CIATzlsk.js +0 -710
- package/dist/vue-ui-bump-D8MxltQE.js +0 -1249
- package/dist/vue-ui-carousel-table-BSmdexG7.js +0 -455
- package/dist/vue-ui-chestnut-BIh1nQ7q.js +0 -2042
- package/dist/vue-ui-donut-BoZdciGh.js +0 -2419
- package/dist/vue-ui-donut-evolution-CpC9EMro.js +0 -1522
- package/dist/vue-ui-dumbbell-DGA5Bfnl.js +0 -1564
- package/dist/vue-ui-funnel-CaD2tZCT.js +0 -782
- package/dist/vue-ui-horizontal-bar-CwiQxYzv.js +0 -1689
- package/dist/vue-ui-molecule--kK1JfnP.js +0 -931
- package/dist/vue-ui-nested-donuts-8Ehwcuns.js +0 -1493
- package/dist/vue-ui-onion-Cf6JiYTH.js +0 -1200
- package/dist/vue-ui-parallel-coordinate-plot-Blnqp1DB.js +0 -1416
- package/dist/vue-ui-quadrant-CxU0jiOm.js +0 -1984
- package/dist/vue-ui-radar-eH2Qih4_.js +0 -1287
- package/dist/vue-ui-relation-circle-BIcP-aAt.js +0 -924
- package/dist/vue-ui-ridgeline-ChXHzEJw.js +0 -1628
- package/dist/vue-ui-rings-J990vNbX.js +0 -1252
- package/dist/vue-ui-scatter-BeJB0EKg.js +0 -2422
- package/dist/vue-ui-spark-trend-CpDX85H3.js +0 -443
- package/dist/vue-ui-sparkhistogram-CUjFiuAh.js +0 -576
- package/dist/vue-ui-sparkstackbar-DsKQJx_n.js +0 -674
- package/dist/vue-ui-stackline-DJbcVvmN.js +0 -2425
- package/dist/vue-ui-table-uudidrYt.js +0 -1338
- package/dist/vue-ui-thermometer-Bvw3oQb3.js +0 -770
- package/dist/vue-ui-waffle-Bk9AsrPp.js +0 -1368
- package/dist/vue-ui-xy-canvas-Dcm2ftwm.js +0 -1790
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as e, Bt as t, G as n, Gt as r, K as i, Nt as a, Ot as o, Y as s, d as c, f as l, i as u, jt as d, m as f, qt as p, t as m, tt as h, x as g, y as _, zt as v } from "./lib-CnHx5WfV.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-DJXFRGhU.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 ?? {}, n =
|
|
8
|
+
let t = e ?? {}, n = p({
|
|
9
9
|
userConfig: t,
|
|
10
10
|
defaultConfig: ne
|
|
11
|
-
}),
|
|
12
|
-
if (!
|
|
11
|
+
}), i = n.theme;
|
|
12
|
+
if (!i) return {
|
|
13
13
|
...n,
|
|
14
14
|
customPalette: n.customPalette?.length ? n.customPalette : a
|
|
15
15
|
};
|
|
16
|
-
let o =
|
|
16
|
+
let o = p({
|
|
17
17
|
userConfig: t,
|
|
18
|
-
defaultConfig:
|
|
19
|
-
userConfig: b[
|
|
18
|
+
defaultConfig: p({
|
|
19
|
+
userConfig: b[i] || {},
|
|
20
20
|
defaultConfig: n
|
|
21
21
|
})
|
|
22
22
|
});
|
|
23
23
|
return {
|
|
24
24
|
...o,
|
|
25
|
-
customPalette: o.customPalette?.length ? o.customPalette :
|
|
25
|
+
customPalette: o.customPalette?.length ? o.customPalette : r[i] || a
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
function P(e, t = 0) {
|
|
@@ -45,7 +45,7 @@ function oe(e = [], t) {
|
|
|
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 r = e.source, i = e.value, a = (r?.color ?
|
|
48
|
+
let r = e.source, i = e.value, a = (r?.color ? g(r.color) : "") || n[t % n.length];
|
|
49
49
|
return {
|
|
50
50
|
...r,
|
|
51
51
|
id: r?.id ?? `donut_serie_${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,24 +209,24 @@ 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 o({ 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(
|
|
225
|
-
let
|
|
226
|
-
return
|
|
227
|
-
series:
|
|
228
|
-
center:
|
|
229
|
-
maxRadius: Math.min(
|
|
224
|
+
function ge(t, n) {
|
|
225
|
+
let r = Math.max(1, ...n.map((e) => Math.abs(x(e.value, 0))));
|
|
226
|
+
return e({
|
|
227
|
+
series: n.map((e) => Math.abs(x(e.value, 0)) / r),
|
|
228
|
+
center: t.center,
|
|
229
|
+
maxRadius: Math.min(t.drawingArea.width, t.drawingArea.height) / 3,
|
|
230
230
|
hasGhost: !1
|
|
231
231
|
});
|
|
232
232
|
}
|
|
@@ -270,54 +270,54 @@ function ve(e) {
|
|
|
270
270
|
fill: k(i.color || r.color, j(t))
|
|
271
271
|
})), M("g", { "data-layer": "title" }, d.join(""));
|
|
272
272
|
}
|
|
273
|
-
function ye(e,
|
|
274
|
-
let { config:
|
|
275
|
-
if (
|
|
276
|
-
let
|
|
277
|
-
if (
|
|
278
|
-
let t = V(
|
|
279
|
-
|
|
273
|
+
function ye(e, n) {
|
|
274
|
+
let { config: r } = e, i = [], a = !!S(r, "useGradient", !1), o = !!S(r, "layout.donut.useShadow", !1);
|
|
275
|
+
if (a) {
|
|
276
|
+
let a = E(r, "type", "classic"), o = x(S(r, "gradientIntensity", 30), 30);
|
|
277
|
+
if (a === "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": v(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": v("#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": v("#FFFFFF", o)
|
|
293
293
|
}),
|
|
294
294
|
w("stop", {
|
|
295
295
|
offset: "100%",
|
|
296
|
-
"stop-color":
|
|
296
|
+
"stop-color": v(L(r), 0),
|
|
297
297
|
"stop-opacity": 0
|
|
298
298
|
})
|
|
299
299
|
].join("")));
|
|
300
300
|
}
|
|
301
|
-
|
|
302
|
-
let
|
|
303
|
-
|
|
304
|
-
id: U(e,
|
|
305
|
-
cx: `${_(
|
|
306
|
-
cy: `${_(
|
|
301
|
+
a === "polar" && n.forEach((n, r) => {
|
|
302
|
+
let a = e.polarAreas?.[r];
|
|
303
|
+
a?.middlePoint && i.push(M("radialGradient", {
|
|
304
|
+
id: U(e, r),
|
|
305
|
+
cx: `${_(a.middlePoint.x / e.width * 100)}%`,
|
|
306
|
+
cy: `${_(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": t(n.color, .05),
|
|
311
|
+
"stop-opacity": o / 100
|
|
312
312
|
}), w("stop", {
|
|
313
313
|
offset: "100%",
|
|
314
|
-
"stop-color":
|
|
314
|
+
"stop-color": n.color
|
|
315
315
|
})].join("")));
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
|
-
if (
|
|
319
|
-
let t = k(S(
|
|
320
|
-
|
|
318
|
+
if (o) {
|
|
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:
|
|
392
|
-
p:
|
|
391
|
+
let { config: r } = e, i = S(r, "layout.labels", {}), a = i.dataLabels ?? {}, o = i.value ?? {}, c = s({
|
|
392
|
+
p: a.prefix ?? "",
|
|
393
393
|
v: t.value,
|
|
394
|
-
s:
|
|
395
|
-
r: x(S(
|
|
394
|
+
s: a.suffix ?? "",
|
|
395
|
+
r: x(S(r, n, o.rounding ?? 0), o.rounding ?? 0)
|
|
396
396
|
});
|
|
397
|
-
return
|
|
397
|
+
return u(o.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, r = S(n, "layout.labels.percentage", {}), i = x(t.proportion, 0) * 100, a = s({
|
|
401
|
+
v: i,
|
|
402
402
|
s: "%",
|
|
403
|
-
r: x(
|
|
403
|
+
r: x(r.rounding, 0)
|
|
404
404
|
});
|
|
405
|
-
return
|
|
405
|
+
return u(r.formatter, i, a, { 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,16 +434,16 @@ 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,
|
|
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, u = o * 1.5, d = e.drawingArea.top + 16, f = e.drawingArea.bottom - 16, p = i - (e.radius + 6), m = i + (e.radius + 6), h = Q(e);
|
|
438
|
+
function g(e) {
|
|
439
439
|
return {
|
|
440
440
|
x: _(e.center?.endX ?? e.endX),
|
|
441
441
|
y: _(e.center?.endY ?? e.endY)
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
444
|
function v({ midX: e, midY: t, bandX: n, bandY: r }) {
|
|
445
|
-
if (!
|
|
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,
|
|
445
|
+
if (!h) return `M ${e} ${t} L ${e} ${r} L ${n} ${r}`;
|
|
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, m = d / f, g = f + 9;
|
|
447
447
|
function _({ x: e, y: t }) {
|
|
448
448
|
let n = e - i, r = t - a, o = Math.sqrt(n * n + r * r) || 1;
|
|
449
449
|
if (o >= g) return {
|
|
@@ -457,11 +457,11 @@ function Ee(e, t) {
|
|
|
457
457
|
};
|
|
458
458
|
}
|
|
459
459
|
if (l < 56) {
|
|
460
|
-
let o = s / l, u = -(c / l), d = o, f = (e + n) * .5,
|
|
461
|
-
(f - u - i) ** 2 + (
|
|
460
|
+
let o = s / l, u = -(c / l), d = o, f = (e + n) * .5, h = (t + r) * .5, g = (f + u - i) ** 2 + (h + d - a) ** 2;
|
|
461
|
+
(f - u - i) ** 2 + (h - d - a) ** 2 > g && (u = -u, d = -d);
|
|
462
462
|
let v = Math.max(0, Math.min(1, (l - 18) / 44)), y = v * v * (3 - 2 * v), b = e + s * .78, x = t + c * .78, S = _({
|
|
463
463
|
x: b + u * (2.5 + y * 4) * .9 + p * (1 + y * 2.5),
|
|
464
|
-
y: x + d * (2.5 + y * 4) * .9 +
|
|
464
|
+
y: x + d * (2.5 + y * 4) * .9 + m * (1 + y * 2.5)
|
|
465
465
|
});
|
|
466
466
|
return `M ${e} ${t} Q ${S.x} ${S.y} ${n} ${r}`;
|
|
467
467
|
}
|
|
@@ -471,7 +471,7 @@ function Ee(e, t) {
|
|
|
471
471
|
y < 22 && (y = 22), y > 70 && (y = 70);
|
|
472
472
|
let b = _({
|
|
473
473
|
x: e + p * v,
|
|
474
|
-
y: t +
|
|
474
|
+
y: t + m * v
|
|
475
475
|
}), x = i + o * Math.max(Math.abs(n - i), g), S = _({
|
|
476
476
|
x: n - o * Math.min(y, Math.abs(x - n) * .75),
|
|
477
477
|
y: r
|
|
@@ -480,17 +480,17 @@ 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
|
-
let n =
|
|
486
|
+
let n = g(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: c(e).x,
|
|
493
|
+
inlineMarkerY: l(e) - 3.5,
|
|
494
494
|
labelHeight: y(e.name)
|
|
495
495
|
};
|
|
496
496
|
}
|
|
@@ -549,48 +549,48 @@ function Ee(e, t) {
|
|
|
549
549
|
}), E({
|
|
550
550
|
candidateList: D.TL,
|
|
551
551
|
side: "left",
|
|
552
|
-
bandMarkerX:
|
|
553
|
-
startY:
|
|
552
|
+
bandMarkerX: p,
|
|
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: m,
|
|
559
|
+
startY: d,
|
|
560
560
|
direction: "down"
|
|
561
561
|
}), D.BL.length > 1 && E({
|
|
562
562
|
candidateList: D.BL,
|
|
563
563
|
side: "left",
|
|
564
|
-
bandMarkerX:
|
|
565
|
-
startY:
|
|
564
|
+
bandMarkerX: p,
|
|
565
|
+
startY: f,
|
|
566
566
|
direction: "up"
|
|
567
567
|
}), D.BR.length > 1 && E({
|
|
568
568
|
candidateList: D.BR,
|
|
569
569
|
side: "right",
|
|
570
|
-
bandMarkerX:
|
|
571
|
-
startY:
|
|
570
|
+
bandMarkerX: m,
|
|
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 ?? {},
|
|
576
|
+
let a = S(e.config, "layout.labels", {}), o = a.percentage ?? {}, s = a.name ?? {}, u = r?.labelX ?? c(t, !0, 12).x, d = r?.labelY ?? l(t), f = r?.textAnchor ?? c(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 : u,
|
|
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
|
+
}, h(t + (n === g.length - 1 ? " " : "")))).join("") : "", v = m ? 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
|
+
}, h(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:
|
|
592
|
+
x: u,
|
|
593
|
+
y: d,
|
|
594
594
|
"text-anchor": f
|
|
595
595
|
}, `${_}${v}`);
|
|
596
596
|
}
|
|
@@ -602,13 +602,13 @@ function Oe(e, t) {
|
|
|
602
602
|
let a = x(r.offset, 16), o = Ee(e, t), s = [];
|
|
603
603
|
return t.forEach((t, n) => {
|
|
604
604
|
if (!Z(e, t)) return;
|
|
605
|
-
let
|
|
606
|
-
if (X(e, t),
|
|
605
|
+
let u = o[n];
|
|
606
|
+
if (X(e, t), u) {
|
|
607
607
|
s.push(De({
|
|
608
608
|
state: e,
|
|
609
609
|
arc: t,
|
|
610
610
|
arcIndex: n,
|
|
611
|
-
smallArcLayout:
|
|
611
|
+
smallArcLayout: u,
|
|
612
612
|
fontSize: x(r.smallArcClusterFontSize, i)
|
|
613
613
|
}));
|
|
614
614
|
return;
|
|
@@ -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: c(t, !1, a + i / 2).x,
|
|
622
|
+
labelY: l(t, a, a),
|
|
623
|
+
textAnchor: c(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 d({
|
|
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
|
+
}, h(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
|
+
}, h(t))).join("") : "";
|
|
655
655
|
return r === "end" ? `${u}${l}` : `${l}${u}`;
|
|
656
656
|
}
|
|
657
|
-
function Me(e, t,
|
|
658
|
-
let
|
|
659
|
-
if (!E(e.config, "dataLabels.show",
|
|
660
|
-
let l = !!
|
|
661
|
-
return t.forEach((t,
|
|
662
|
-
let
|
|
663
|
-
if (!
|
|
664
|
-
let
|
|
657
|
+
function Me(e, t, r) {
|
|
658
|
+
let i = S(e.config, "layout.labels", {}), a = i.dataLabels ?? {}, o = i.value ?? {}, s = i.percentage ?? {}, c = i.name ?? {};
|
|
659
|
+
if (!E(e.config, "dataLabels.show", a.show ?? !0) || !a.show) return "";
|
|
660
|
+
let l = !!a.oneLine, u = x(o.fontSize, a.fontSize ?? 12), d = x(c.fontSize, a.fontSize ?? 12), f = [];
|
|
661
|
+
return t.forEach((t, i) => {
|
|
662
|
+
let a = r[i];
|
|
663
|
+
if (!a || !Z(e, t)) return;
|
|
664
|
+
let o = ke(e, a, 42), p = Ae(e, o);
|
|
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, t,
|
|
669
|
+
x: o.x,
|
|
670
|
+
y: o.y,
|
|
671
|
+
"text-anchor": p
|
|
672
|
+
}, je(e, t, o.x, p)));
|
|
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: o.x,
|
|
679
|
+
y: o.y,
|
|
680
680
|
"font-size": u,
|
|
681
|
-
"font-weight":
|
|
682
|
-
"text-anchor":
|
|
681
|
+
"font-weight": s.bold ? "700" : "400",
|
|
682
|
+
"text-anchor": p,
|
|
683
683
|
fill: valueFill
|
|
684
684
|
}, te({
|
|
685
685
|
content: X(e, t),
|
|
686
|
-
x:
|
|
686
|
+
x: o.x,
|
|
687
687
|
fontSize: u,
|
|
688
688
|
fill: valueFill,
|
|
689
|
-
textAnchor:
|
|
690
|
-
}))), c.show &&
|
|
689
|
+
textAnchor: p
|
|
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:
|
|
695
|
-
"font-size":
|
|
693
|
+
x: o.x,
|
|
694
|
+
y: o.y + d * 1.2,
|
|
695
|
+
"font-size": d,
|
|
696
696
|
"font-weight": c.bold ? "700" : "400",
|
|
697
|
-
"text-anchor":
|
|
697
|
+
"text-anchor": p,
|
|
698
698
|
fill: k(c.color, j(e.config))
|
|
699
|
-
},
|
|
700
|
-
content:
|
|
701
|
-
fontSize:
|
|
699
|
+
}, n({
|
|
700
|
+
content: h(String(t.name ?? "")),
|
|
701
|
+
fontSize: d,
|
|
702
702
|
fill: k(c.color, j(e.config)),
|
|
703
|
-
x:
|
|
703
|
+
x: o.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);
|
|
710
|
-
return
|
|
710
|
+
return f(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 ?? c(t).x,
|
|
730
|
+
cy: o?.markerY ?? l(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 = d({
|
|
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, {
|
|
@@ -776,73 +776,73 @@ 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 r = S(e.config, "layout.labels.hollow", {}), i = r.total ?? {}, a = r.average ?? {}, o = [];
|
|
780
|
+
if (i.show) {
|
|
781
|
+
let n = x(i.fontSize, 14), r = !!a.show, c = e.center.y - (r ? n : 0) + x(i.offsetY, 0), l = i.value ?? {}, d = x(l.fontSize, n), f = u(l.formatter, t, s({
|
|
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
|
-
|
|
787
|
+
o.push($(i.text ?? "", {
|
|
788
788
|
"data-cy": "hollow-total-name",
|
|
789
789
|
x: e.center.x,
|
|
790
790
|
y: c,
|
|
791
|
-
fill: k(
|
|
791
|
+
fill: k(i.color, j(e.config)),
|
|
792
792
|
"font-size": n,
|
|
793
|
-
"font-weight":
|
|
794
|
-
})),
|
|
793
|
+
"font-weight": i.bold ? "700" : "400"
|
|
794
|
+
})), o.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(
|
|
799
|
-
"font-size":
|
|
797
|
+
y: e.center.y + n - (r ? n : 0) + x(l.offsetY, 0),
|
|
798
|
+
fill: k(l.color, k(i.color, j(e.config))),
|
|
799
|
+
"font-size": d,
|
|
800
800
|
"font-weight": l.bold ? "700" : "400"
|
|
801
801
|
}));
|
|
802
802
|
}
|
|
803
|
-
if (
|
|
804
|
-
let
|
|
805
|
-
p:
|
|
803
|
+
if (a.show) {
|
|
804
|
+
let r = x(a.fontSize, 14), c = !!i.show, l = t / Math.max(1, n.length), d = a.value ?? {}, f = x(d.fontSize, r), p = u(d.formatter, l, s({
|
|
805
|
+
p: d.prefix ?? "",
|
|
806
806
|
v: l,
|
|
807
|
-
s:
|
|
808
|
-
r: x(
|
|
807
|
+
s: d.suffix ?? "",
|
|
808
|
+
r: x(d.rounding, 0)
|
|
809
809
|
}), { average: l });
|
|
810
|
-
|
|
810
|
+
o.push($(a.text ?? "", {
|
|
811
811
|
"data-cy": "hollow-average-name",
|
|
812
812
|
x: e.center.x,
|
|
813
|
-
y: e.center.y + (c ?
|
|
814
|
-
fill: k(
|
|
815
|
-
"font-size":
|
|
816
|
-
"font-weight":
|
|
817
|
-
})),
|
|
813
|
+
y: e.center.y + (c ? r : 0) + x(a.offsetY, 0),
|
|
814
|
+
fill: k(a.color, j(e.config)),
|
|
815
|
+
"font-size": r,
|
|
816
|
+
"font-weight": a.bold ? "700" : "400"
|
|
817
|
+
})), o.push($(p, {
|
|
818
818
|
"data-cy": "hollow-average-value",
|
|
819
819
|
x: e.center.x,
|
|
820
|
-
y: e.center.y + (c ?
|
|
821
|
-
fill: k(
|
|
822
|
-
"font-size":
|
|
823
|
-
"font-weight":
|
|
820
|
+
y: e.center.y + (c ? r : 0) + r + x(d.offsetY, 0),
|
|
821
|
+
fill: k(d.color, k(a.color, j(e.config))),
|
|
822
|
+
"font-size": f,
|
|
823
|
+
"font-weight": d.bold ? "700" : "400"
|
|
824
824
|
}));
|
|
825
825
|
}
|
|
826
|
-
return
|
|
826
|
+
return o.filter(Boolean).length ? M("g", {
|
|
827
827
|
class: "vue-data-ui-donut-hollow-labels",
|
|
828
828
|
"data-layer": "hollow-labels"
|
|
829
|
-
},
|
|
829
|
+
}, o.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: r } = e, i = S(n, "layout.donut.labels.total", S(n, "layout.labels.total", {}));
|
|
833
|
+
if (!i.show || !Number.isFinite(t) || t <= 0) return "";
|
|
834
|
+
let a = S(n, "layout.labels.dataLabels", {}), o = x(i.fontSize, 20), c = k(i.color, j(n));
|
|
835
|
+
return N(u(i.formatter, t, s({
|
|
836
|
+
p: a.prefix ?? "",
|
|
837
837
|
v: t,
|
|
838
|
-
s:
|
|
839
|
-
r: x(
|
|
838
|
+
s: a.suffix ?? "",
|
|
839
|
+
r: x(i.rounding, 0)
|
|
840
840
|
}), { total: t }), {
|
|
841
841
|
"data-cy": "donut-total",
|
|
842
|
-
x:
|
|
843
|
-
y:
|
|
844
|
-
"font-size":
|
|
845
|
-
"font-weight":
|
|
842
|
+
x: r.x,
|
|
843
|
+
y: r.y + o / 3,
|
|
844
|
+
"font-size": o,
|
|
845
|
+
"font-weight": i.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", {}), r = S(e.config, "layout.labels", {}), i = r.dataLabels ?? {}, a = r.value ?? {}, o = s({
|
|
856
|
+
p: i.prefix ?? "",
|
|
857
857
|
v: t.value,
|
|
858
|
-
s:
|
|
859
|
-
r: x(n.roundingValue,
|
|
858
|
+
s: i.suffix ?? "",
|
|
859
|
+
r: x(n.roundingValue, a.rounding ?? 0)
|
|
860
860
|
});
|
|
861
|
-
return
|
|
861
|
+
return u(a.formatter, t.value, o, {
|
|
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", {}), r = S(e.config, "layout.labels", {}).percentage ?? {}, i = Re(e, t), a = s({
|
|
868
|
+
v: i,
|
|
869
869
|
s: "%",
|
|
870
|
-
r: x(n.roundingPercentage,
|
|
870
|
+
r: x(n.roundingPercentage, r.rounding ?? 0)
|
|
871
871
|
});
|
|
872
|
-
return
|
|
872
|
+
return u(r.formatter, i, a, {
|
|
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", {}, h(`${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="${m}"
|
|
944
944
|
width="100%"
|
|
945
945
|
viewBox="0 0 ${n} ${r}"
|
|
946
946
|
role="img"
|