vue-data-ui 3.22.3 → 3.22.5
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-Ct8T_Lyp.js → Arrow-CgzmXCW_.js} +1 -1
- package/dist/{BaseDraggableDialog-DLuXvUbs.js → BaseDraggableDialog-DjzNWkiE.js} +2 -2
- package/dist/{BaseIcon-CX_ChMz-.js → BaseIcon-xBuW2jjI.js} +1 -1
- package/dist/{BaseLegendToggle-qL0O9ooF.js → BaseLegendToggle-C4Usj0LI.js} +1 -1
- package/dist/{BaseZoomControls-BI5sLb6d.js → BaseZoomControls-Cg9o2J-q.js} +2 -2
- package/dist/{ColorPicker-CwyWzPx_.js → ColorPicker-Usv7badH.js} +2 -2
- package/dist/{DataTable-KEMekOVu.js → DataTable-PidUPOit.js} +2 -2
- package/dist/Legend-DXOzbXb-.js +156 -0
- package/dist/{NonSvgPenAndPaper-CeNJtWON.js → NonSvgPenAndPaper-OIs8I25K.js} +19 -19
- package/dist/{PackageVersion-D-_GVhxY.js → PackageVersion-CqE8ssFu.js} +1 -1
- package/dist/{PenAndPaper-DkZYRnrW.js → PenAndPaper-ISUbDKXq.js} +11 -11
- package/dist/{Shape-S-7v8SAE.js → Shape-BnF9aMPX.js} +3 -3
- package/dist/Slicer-hEvKOLw3.js +1145 -0
- package/dist/{SlicerPreview-Co-V9YBf.js → SlicerPreview-BDI-aCXE.js} +36 -35
- package/dist/{SparkTooltip-D2BBjZKc.js → SparkTooltip-DaWSTzfA.js} +1 -1
- package/dist/{Title-Cxgd_JyY.js → Title-DDEEO-Nr.js} +1 -1
- package/dist/{Tooltip-BqdN_ZBE.js → Tooltip-BhKov422.js} +1 -1
- package/dist/{UserOptions-WIxTs7Xf.js → UserOptions-BxT1XHzN.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-DsEPQbU1.js → dom-to-png-ZOysoMwu.js} +1 -1
- package/dist/exposedLib-C2U48XK7.js +19 -0
- package/dist/img-B29J8tV5.js +129 -0
- package/dist/{labelUtils-WDjGa7EP.js → labelUtils-BFcL_t-A.js} +1 -1
- package/dist/{lib-NmjQazSn.js → lib-CuwHGt1j.js} +142 -123
- package/dist/{package-KQdsc0if.js → package-YOcaZtwF.js} +1 -1
- package/dist/{pdf-BVocBz-Y.js → pdf-ymYt9Lee.js} +1 -1
- package/dist/{render-common-BUbY65H0.js → render-common-B80rr2N_.js} +22 -22
- 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 +60 -2
- package/dist/types/vue-ui-strip-plot.d.ts +2 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-DBv7sw1h.js → useAutoSizeLabelsInsideViewbox-DzAZ-MeY.js} +1 -1
- package/dist/{useConfig-Bf_EBbe3.js → useConfig-pVLia3dt.js} +30 -2
- package/dist/{useNestedProp-C9viY7oU.js → useNestedProp-BjkuFaz1.js} +1 -1
- package/dist/{useObjectBindings-Byts-nf-.js → useObjectBindings-C1XuDxFr.js} +2 -2
- package/dist/{usePrinter-DRYgV-XS.js → usePrinter-C0wAS8yc.js} +3 -3
- package/dist/utils.js +14 -14
- package/dist/{vue-data-ui-CDgunUso.js → vue-data-ui-mqURXOql.js} +68 -68
- package/dist/vue-data-ui.js +73 -73
- package/dist/vue-ui-3d-bar-BZ1Slxfu.js +1757 -0
- package/dist/{vue-ui-accordion-vYLqcJJd.js → vue-ui-accordion-B64IJyPU.js} +4 -4
- package/dist/{vue-ui-age-pyramid-CCAcpoA2.js → vue-ui-age-pyramid-uUVFZo8M.js} +289 -289
- package/dist/{vue-ui-annotator-CmjcPCRy.js → vue-ui-annotator-CU4CdKMm.js} +69 -69
- package/dist/vue-ui-bullet-RGCGF_cO.js +710 -0
- package/dist/{vue-ui-bump-UWs3Fols.js → vue-ui-bump-CiUmHi6k.js} +259 -259
- package/dist/vue-ui-candlestick-BJUk5fMm.js +1826 -0
- package/dist/{vue-ui-carousel-table-DiPXX1eV.js → vue-ui-carousel-table-BksIDurC.js} +122 -122
- package/dist/vue-ui-chestnut-B3OHA5rg.js +2010 -0
- package/dist/{vue-ui-chord-MB6BktFk.js → vue-ui-chord-DETV2viY.js} +53 -53
- package/dist/{vue-ui-circle-pack-D4n5rKtA.js → vue-ui-circle-pack-DddaioRm.js} +46 -46
- package/dist/{vue-ui-cursor-Cu_HGeoy.js → vue-ui-cursor-D2-hWt_G.js} +4 -4
- package/dist/{vue-ui-dag-DQlbTBPB.js → vue-ui-dag-Dp7pV6Ps.js} +49 -49
- package/dist/{vue-ui-dashboard-BD-M8q8G.js → vue-ui-dashboard-D91C5cXo.js} +70 -70
- package/dist/{vue-ui-digits-C21SWRDQ.js → vue-ui-digits-CMA3U4ZS.js} +4 -4
- package/dist/vue-ui-donut-DObpw5zP.js +2410 -0
- package/dist/{vue-ui-donut-Djiw7Rz1.js → vue-ui-donut-DpiS28CQ.js} +193 -193
- package/dist/{vue-ui-donut-evolution-BkI06V1N.js → vue-ui-donut-evolution-2B61hvv2.js} +419 -419
- package/dist/{vue-ui-dumbbell-Yn79Apx7.js → vue-ui-dumbbell-Cmr65TNE.js} +341 -341
- package/dist/{vue-ui-flow-DfWx60DS.js → vue-ui-flow-7Yfsu6AY.js} +72 -72
- package/dist/vue-ui-funnel-BLRBDW1a.js +777 -0
- package/dist/vue-ui-galaxy-B9cxOcoE.js +1077 -0
- package/dist/vue-ui-gauge-yo4G5HMt.js +920 -0
- package/dist/{vue-ui-geo-DdB-gJBh.js → vue-ui-geo-BOHI6oMZ.js} +18 -18
- package/dist/{vue-ui-gizmo-AMWvrL1N.js → vue-ui-gizmo-DI-35oK-.js} +62 -62
- package/dist/{vue-ui-heatmap-8cmpKIN5.js → vue-ui-heatmap-DBVM90VE.js} +293 -293
- package/dist/vue-ui-history-plot-BiWpOHKE.js +1715 -0
- package/dist/{vue-ui-horizontal-bar-D32lWjQJ.js → vue-ui-horizontal-bar-XBrvSxtJ.js} +75 -75
- package/dist/{vue-ui-kpi-B3FdCV-T.js → vue-ui-kpi-55wwhSBh.js} +12 -12
- package/dist/{vue-ui-mini-loader-Bk-5TDbT.js → vue-ui-mini-loader-nOsOsA2V.js} +3 -3
- package/dist/{vue-ui-molecule-B4fNC1Bk.js → vue-ui-molecule-DB3rmTw1.js} +213 -213
- package/dist/{vue-ui-mood-radar-_mw9D1wg.js → vue-ui-mood-radar-izcbwGOc.js} +40 -40
- package/dist/{vue-ui-nested-donuts-DPhDz07R.js → vue-ui-nested-donuts-DRJ1QT2n.js} +255 -255
- package/dist/{vue-ui-onion-Cob0y2FO.js → vue-ui-onion-xTZOmmtb.js} +293 -293
- package/dist/vue-ui-parallel-coordinate-plot-BxQ7D2_o.js +1416 -0
- package/dist/{vue-ui-quadrant-D6wv44Hs.js → vue-ui-quadrant-BvAmtyAE.js} +57 -57
- package/dist/{vue-ui-quick-chart-EeT-lzAq.js → vue-ui-quick-chart-CJ1xQgYc.js} +654 -654
- package/dist/vue-ui-radar-C26C6p7e.js +1281 -0
- package/dist/{vue-ui-rating-DlMTyra_.js → vue-ui-rating-CRziryE2.js} +22 -22
- package/dist/vue-ui-relation-circle-Dl1aWFAI.js +924 -0
- package/dist/{vue-ui-ridgeline-VO2-zPGd.js → vue-ui-ridgeline-BbJa5C-d.js} +468 -468
- package/dist/vue-ui-rings-CyrvskTi.js +1246 -0
- package/dist/vue-ui-scatter-D9Iw5xlb.js +2413 -0
- package/dist/{vue-ui-skeleton-ImkpUdwJ.js → vue-ui-skeleton-C4D0i9ho.js} +22 -22
- package/dist/{vue-ui-smiley-Ct3ijoOw.js → vue-ui-smiley-BTvDy8Fm.js} +5 -5
- package/dist/{vue-ui-spark-trend-_b2gVafQ.js → vue-ui-spark-trend-CMb7UI2t.js} +24 -24
- package/dist/{vue-ui-sparkbar-CRH8b1fM.js → vue-ui-sparkbar-DEawjWhg.js} +35 -35
- package/dist/{vue-ui-sparkgauge-Z_lgEp7i.js → vue-ui-sparkgauge-mubHGQF_.js} +56 -56
- package/dist/vue-ui-sparkhistogram-D8N-jNBt.js +560 -0
- package/dist/{vue-ui-sparkline-B-QS62r4.js → vue-ui-sparkline-D4p0PS3-.js} +200 -200
- package/dist/{vue-ui-sparkstackbar-DICmDZrB.js → vue-ui-sparkstackbar-DnrZkIIc.js} +126 -126
- package/dist/{vue-ui-stackbar-BRqqDp3a.js → vue-ui-stackbar-BzHSHKqe.js} +147 -147
- package/dist/{vue-ui-stackline-DVY_4Fmh.js → vue-ui-stackline-CWSvsW1n.js} +417 -417
- package/dist/vue-ui-strip-plot-pPiVqFYo.js +1729 -0
- package/dist/{vue-ui-table-ByFPF5fJ.js → vue-ui-table-BzqQKuL-.js} +64 -64
- package/dist/{vue-ui-table-heatmap-DfLfYJiR.js → vue-ui-table-heatmap-D38YSxhJ.js} +16 -16
- package/dist/{vue-ui-table-sparkline-Gi1MQO-E.js → vue-ui-table-sparkline-BnavmY2R.js} +19 -19
- package/dist/vue-ui-thermometer-ePIxpTuE.js +763 -0
- package/dist/{vue-ui-timer-CrIq3NmZ.js → vue-ui-timer-BQZxD91f.js} +6 -6
- package/dist/{vue-ui-tiremarks-BB3VV4tK.js → vue-ui-tiremarks-CDOlCWS8.js} +10 -10
- package/dist/vue-ui-treemap-DrZlX_7n.js +1587 -0
- package/dist/vue-ui-waffle-BpZrFfUb.js +1362 -0
- package/dist/{vue-ui-wheel-DZq3C6wh.js → vue-ui-wheel-DRfyK9q9.js} +29 -29
- package/dist/{vue-ui-word-cloud-BNK1nfDn.js → vue-ui-word-cloud-D0JUA9I9.js} +28 -28
- package/dist/{vue-ui-world-D3F772fb.js → vue-ui-world-Dx-41fUM.js} +127 -127
- package/dist/{vue-ui-xy-DOnq4Na2.js → vue-ui-xy-BLSGO4Lm.js} +760 -760
- package/dist/{vue-ui-xy-f56XjeNS.js → vue-ui-xy-DpRqQ09J.js} +410 -410
- package/dist/{vue-ui-xy-canvas-OajdJbzS.js → vue-ui-xy-canvas-CjbjJ70r.js} +60 -60
- package/dist/{vue_ui_strip_plot-CtJe8_gq.js → vue_ui_strip_plot-BaHbnnwN.js} +7 -0
- package/package.json +1 -1
- package/dist/Legend--t7Mbp9Z.js +0 -115
- package/dist/Slicer-CpBaahpI.js +0 -1144
- package/dist/exposedLib-BkRxoSB9.js +0 -19
- package/dist/img-CyjhDDaM.js +0 -74
- package/dist/vue-ui-3d-bar-BrSoUZQ_.js +0 -1757
- package/dist/vue-ui-bullet-BYrQAbvp.js +0 -710
- package/dist/vue-ui-candlestick-CJw3R21J.js +0 -1826
- package/dist/vue-ui-chestnut-DJkyr3uK.js +0 -2010
- package/dist/vue-ui-donut-BPOS4Aoe.js +0 -2410
- package/dist/vue-ui-funnel-hsmCJgE5.js +0 -777
- package/dist/vue-ui-galaxy-BC-D8ZZ6.js +0 -1077
- package/dist/vue-ui-gauge-CnDTR46T.js +0 -920
- package/dist/vue-ui-history-plot-ZcraxoDy.js +0 -1554
- package/dist/vue-ui-parallel-coordinate-plot-BPyfEQEf.js +0 -1416
- package/dist/vue-ui-radar-DNid-gVu.js +0 -1281
- package/dist/vue-ui-relation-circle-DALWYwuI.js +0 -924
- package/dist/vue-ui-rings-CGU8bnut.js +0 -1246
- package/dist/vue-ui-scatter-CDy2LLD_.js +0 -2413
- package/dist/vue-ui-sparkhistogram-DzukoeRA.js +0 -560
- package/dist/vue-ui-strip-plot-DUv9SsML.js +0 -1340
- package/dist/vue-ui-thermometer-MfzmVt9N.js +0 -763
- package/dist/vue-ui-treemap-CeE1TT6j.js +0 -1587
- package/dist/vue-ui-waffle-KDOR3fMN.js +0 -1362
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as y } from "./useConfig-
|
|
1
|
+
import { Et as e, Gt as t, Lt as n, O as r, Rt as i, U as a, Ut as o, W as s, b as c, d as l, et as u, i as d, jt as f, kt as p, p as m, q as h, t as g, u as _, v } from "./lib-CuwHGt1j.js";
|
|
2
|
+
import { t as y } from "./useConfig-pVLia3dt.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-B80rr2N_.js";
|
|
5
5
|
//#region src/svg/vue-ui-donut/create.js
|
|
6
6
|
var { vue_ui_donut: ne } = y();
|
|
7
7
|
function re({ config: e = {} } = {}) {
|
|
8
|
-
let
|
|
9
|
-
userConfig:
|
|
8
|
+
let n = e ?? {}, r = t({
|
|
9
|
+
userConfig: n,
|
|
10
10
|
defaultConfig: ne
|
|
11
|
-
}),
|
|
12
|
-
if (!
|
|
13
|
-
...
|
|
14
|
-
customPalette:
|
|
11
|
+
}), i = r.theme;
|
|
12
|
+
if (!i) return {
|
|
13
|
+
...r,
|
|
14
|
+
customPalette: r.customPalette?.length ? r.customPalette : f
|
|
15
15
|
};
|
|
16
|
-
let
|
|
17
|
-
userConfig:
|
|
18
|
-
defaultConfig:
|
|
19
|
-
userConfig: b[
|
|
20
|
-
defaultConfig:
|
|
16
|
+
let a = t({
|
|
17
|
+
userConfig: n,
|
|
18
|
+
defaultConfig: t({
|
|
19
|
+
userConfig: b[i] || {},
|
|
20
|
+
defaultConfig: r
|
|
21
21
|
})
|
|
22
22
|
});
|
|
23
23
|
return {
|
|
24
|
-
...
|
|
25
|
-
customPalette:
|
|
24
|
+
...a,
|
|
25
|
+
customPalette: a.customPalette?.length ? a.customPalette : o[i] || f
|
|
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 ? c(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 = s();
|
|
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(
|
|
213
|
-
let
|
|
214
|
-
return
|
|
212
|
+
function he(t, n) {
|
|
213
|
+
let r = x(S(t.config, "layout.donut.rotation", 105.25), 105.25);
|
|
214
|
+
return e({ series: n }, t.center.x, t.center.y, t.radius, t.radius, 1.99999, 2, 1, 360, r, V(t.config) ? t.radius : t.thickness).map((e, t) => ({
|
|
215
215
|
...e,
|
|
216
|
-
index:
|
|
217
|
-
color: k(e.color, t
|
|
216
|
+
index: t,
|
|
217
|
+
color: k(e.color, n[t]?.color),
|
|
218
218
|
value: x(e.value, 0),
|
|
219
|
-
name: String(e.name ?? t
|
|
220
|
-
patternIndex: e.patternIndex ?? t
|
|
221
|
-
seriesIndex: e.seriesIndex ?? t
|
|
219
|
+
name: String(e.name ?? n[t]?.name ?? `Serie ${t + 1}`),
|
|
220
|
+
patternIndex: e.patternIndex ?? n[t]?.patternIndex ?? t,
|
|
221
|
+
seriesIndex: e.seriesIndex ?? n[t]?.seriesIndex ?? t
|
|
222
222
|
}));
|
|
223
223
|
}
|
|
224
|
-
function ge(e,
|
|
225
|
-
let
|
|
226
|
-
return
|
|
227
|
-
series:
|
|
224
|
+
function ge(e, t) {
|
|
225
|
+
let n = Math.max(1, ...t.map((e) => Math.abs(x(e.value, 0))));
|
|
226
|
+
return r({
|
|
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,
|
|
230
230
|
hasGhost: !1
|
|
@@ -271,12 +271,12 @@ function ve(e) {
|
|
|
271
271
|
})), M("g", { "data-layer": "title" }, d.join(""));
|
|
272
272
|
}
|
|
273
273
|
function ye(e, t) {
|
|
274
|
-
let { config: r } = e,
|
|
274
|
+
let { config: r } = e, a = [], o = !!S(r, "useGradient", !1), s = !!S(r, "layout.donut.useShadow", !1);
|
|
275
275
|
if (o) {
|
|
276
276
|
let o = E(r, "type", "classic"), s = x(S(r, "gradientIntensity", 30), 30);
|
|
277
277
|
if (o === "classic" && Number.isFinite(e.thickness / e.radius)) {
|
|
278
278
|
let t = V(r) ? 1 : e.thickness / e.radius;
|
|
279
|
-
|
|
279
|
+
a.push(M("radialGradient", { id: H(e) }, [
|
|
280
280
|
w("stop", {
|
|
281
281
|
offset: "0%",
|
|
282
282
|
"stop-color": n(L(r), 0),
|
|
@@ -300,14 +300,14 @@ function ye(e, t) {
|
|
|
300
300
|
}
|
|
301
301
|
o === "polar" && t.forEach((t, n) => {
|
|
302
302
|
let r = e.polarAreas?.[n];
|
|
303
|
-
r?.middlePoint &&
|
|
303
|
+
r?.middlePoint && a.push(M("radialGradient", {
|
|
304
304
|
id: U(e, n),
|
|
305
|
-
cx: `${
|
|
306
|
-
cy: `${
|
|
305
|
+
cx: `${v(r.middlePoint.x / e.width * 100)}%`,
|
|
306
|
+
cy: `${v(r.middlePoint.y / e.height * 100)}%`,
|
|
307
307
|
r: "62%"
|
|
308
308
|
}, [w("stop", {
|
|
309
309
|
offset: "0%",
|
|
310
|
-
"stop-color":
|
|
310
|
+
"stop-color": i(t.color, .05),
|
|
311
311
|
"stop-opacity": s / 100
|
|
312
312
|
}), w("stop", {
|
|
313
313
|
offset: "100%",
|
|
@@ -316,8 +316,8 @@ function ye(e, t) {
|
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
318
|
if (s) {
|
|
319
|
-
let t = k(S(r, "layout.donut.shadowColor", "#000000"), "#000000"), n = x(S(r, "layout.donut.shadowOpacity", .2), .2),
|
|
320
|
-
|
|
319
|
+
let t = k(S(r, "layout.donut.shadowColor", "#000000"), "#000000"), n = x(S(r, "layout.donut.shadowOpacity", .2), .2), i = x(S(r, "layout.donut.shadowBlur", 6), 6), o = x(S(r, "layout.donut.shadowOffsetY", 3), 3);
|
|
320
|
+
a.push(M("filter", {
|
|
321
321
|
id: W(e),
|
|
322
322
|
x: "-50%",
|
|
323
323
|
y: "-50%",
|
|
@@ -326,12 +326,12 @@ function ye(e, t) {
|
|
|
326
326
|
}, [w("feDropShadow", {
|
|
327
327
|
dx: 0,
|
|
328
328
|
dy: o,
|
|
329
|
-
stdDeviation:
|
|
329
|
+
stdDeviation: i,
|
|
330
330
|
"flood-color": t,
|
|
331
331
|
"flood-opacity": n
|
|
332
332
|
})].join("")));
|
|
333
333
|
}
|
|
334
|
-
return
|
|
334
|
+
return a.length ? M("defs", { "data-layer": "definitions" }, a.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 ?? {}, s = h({
|
|
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 d(
|
|
397
|
+
return d(o.formatter, t.value, s, { 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 = h({
|
|
401
|
+
v: i,
|
|
402
402
|
s: "%",
|
|
403
|
-
r: x(
|
|
403
|
+
r: x(r.rounding, 0)
|
|
404
404
|
});
|
|
405
|
-
return d(
|
|
405
|
+
return d(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,14 +434,14 @@ 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,
|
|
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, u = e.drawingArea.top + 16, d = e.drawingArea.bottom - 16, f = i - (e.radius + 6), p = i + (e.radius + 6), m = Q(e);
|
|
438
|
+
function h(e) {
|
|
439
439
|
return {
|
|
440
|
-
x:
|
|
441
|
-
y:
|
|
440
|
+
x: v(e.center?.endX ?? e.endX),
|
|
441
|
+
y: v(e.center?.endY ?? e.endY)
|
|
442
442
|
};
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function g({ 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 }) {
|
|
@@ -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 = h(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: _(e).x,
|
|
493
|
+
inlineMarkerY: l(e) - 3.5,
|
|
494
494
|
labelHeight: y(e.name)
|
|
495
495
|
};
|
|
496
496
|
}
|
|
@@ -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 = g({
|
|
522
522
|
midX: s,
|
|
523
523
|
midY: c,
|
|
524
524
|
bandX: n,
|
|
@@ -550,13 +550,13 @@ function Ee(e, t) {
|
|
|
550
550
|
candidateList: D.TL,
|
|
551
551
|
side: "left",
|
|
552
552
|
bandMarkerX: f,
|
|
553
|
-
startY:
|
|
553
|
+
startY: u,
|
|
554
554
|
direction: "down"
|
|
555
555
|
}), E({
|
|
556
556
|
candidateList: D.TR,
|
|
557
557
|
side: "right",
|
|
558
558
|
bandMarkerX: p,
|
|
559
|
-
startY:
|
|
559
|
+
startY: u,
|
|
560
560
|
direction: "down"
|
|
561
561
|
}), D.BL.length > 1 && E({
|
|
562
562
|
candidateList: D.BL,
|
|
@@ -573,26 +573,26 @@ function Ee(e, t) {
|
|
|
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", {}), o = a.percentage ?? {}, s = a.name ?? {}, c = r?.labelX ?? _(t, !0, 12).x, d = r?.labelY ?? l(t), f = r?.textAnchor ?? _(t, !0, 12).anchor, { name: p } = Y(e, t), m = we(e, t), h = String(p).split(/\n/g), g = p ? h.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 : c,
|
|
579
579
|
dy: n === 0 ? void 0 : i * 1.2,
|
|
580
|
-
fill: k(c.color, j(e.config)),
|
|
581
|
-
"font-size": i,
|
|
582
|
-
"font-weight": c.bold ? "700" : "400"
|
|
583
|
-
}, o(t + (n === g.length - 1 ? " " : "")))).join("") : "", v = m ? M("tspan", {
|
|
584
|
-
class: "vue-data-ui-datalabel-value",
|
|
585
580
|
fill: k(s.color, j(e.config)),
|
|
586
581
|
"font-size": i,
|
|
587
582
|
"font-weight": s.bold ? "700" : "400"
|
|
588
|
-
},
|
|
583
|
+
}, u(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
|
+
}, u(m)) : "";
|
|
589
589
|
return M("text", {
|
|
590
590
|
"data-cy": `donut-label-inline-${n}`,
|
|
591
591
|
class: "vue-data-ui-datalabel-inline",
|
|
592
|
-
x:
|
|
592
|
+
x: c,
|
|
593
593
|
y: d,
|
|
594
594
|
"text-anchor": f
|
|
595
|
-
}, `${
|
|
595
|
+
}, `${g}${v}`);
|
|
596
596
|
}
|
|
597
597
|
function Oe(e, t) {
|
|
598
598
|
let n = S(e.config, "layout.labels", {}), r = n.dataLabels ?? {};
|
|
@@ -618,96 +618,96 @@ function Oe(e, t) {
|
|
|
618
618
|
arc: t,
|
|
619
619
|
arcIndex: n,
|
|
620
620
|
smallArcLayout: {
|
|
621
|
-
labelX:
|
|
622
|
-
labelY:
|
|
623
|
-
textAnchor:
|
|
621
|
+
labelX: _(t, !1, a + i / 2).x,
|
|
622
|
+
labelY: l(t, a, a),
|
|
623
|
+
textAnchor: _(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 p({
|
|
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) {
|
|
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 ?? {}, 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
644
|
fill: k(a.color, j(e.config)),
|
|
645
|
-
"font-size":
|
|
645
|
+
"font-size": s,
|
|
646
646
|
"font-weight": a.bold ? "700" : "400"
|
|
647
|
-
},
|
|
647
|
+
}, u(String(X(e, t).replace(/\n/g, " / ")))), d = 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
|
-
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 : c * 1.2,
|
|
651
|
+
fill: k(o.color, j(e.config)),
|
|
652
|
+
"font-size": c,
|
|
653
|
+
"font-weight": o.bold ? "700" : "400"
|
|
654
|
+
}, u(t))).join("") : "";
|
|
655
|
+
return r === "end" ? `${d}${l}` : `${l}${d}`;
|
|
656
656
|
}
|
|
657
657
|
function Me(e, t, n) {
|
|
658
|
-
let r = S(e.config, "layout.labels", {}), i = r.dataLabels ?? {},
|
|
658
|
+
let r = S(e.config, "layout.labels", {}), i = r.dataLabels ?? {}, o = r.value ?? {}, s = r.percentage ?? {}, c = r.name ?? {};
|
|
659
659
|
if (!E(e.config, "dataLabels.show", i.show ?? !0) || !i.show) return "";
|
|
660
|
-
let
|
|
660
|
+
let l = !!i.oneLine, d = x(o.fontSize, i.fontSize ?? 12), f = x(c.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
|
-
let
|
|
665
|
-
if (
|
|
664
|
+
let o = ke(e, i, 42), m = Ae(e, o);
|
|
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: o.x,
|
|
670
|
+
y: o.y,
|
|
671
671
|
"text-anchor": m
|
|
672
|
-
}, je(e, t,
|
|
672
|
+
}, je(e, t, o.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:
|
|
678
|
+
x: o.x,
|
|
679
|
+
y: o.y,
|
|
680
680
|
"font-size": d,
|
|
681
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
|
-
x:
|
|
686
|
+
x: o.x,
|
|
687
687
|
fontSize: d,
|
|
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: o.x,
|
|
694
|
+
y: o.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
|
+
}, a({
|
|
700
|
+
content: u(String(t.name ?? "")),
|
|
701
701
|
fontSize: f,
|
|
702
|
-
fill: k(
|
|
703
|
-
x:
|
|
702
|
+
fill: k(c.color, j(e.config)),
|
|
703
|
+
x: o.x
|
|
704
704
|
})));
|
|
705
705
|
}), p.length ? M("g", { "data-layer": "polar-data-labels" }, p.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 m(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 ?? _(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 = p({
|
|
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,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 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, s = e.center.y - (r ? n : 0) + x(i.offsetY, 0), c = i.value ?? {}, l = x(c.fontSize, n), u = d(c.formatter, t, h({
|
|
782
|
+
p: c.prefix ?? "",
|
|
783
783
|
v: t,
|
|
784
|
-
s:
|
|
785
|
-
r: x(
|
|
784
|
+
s: c.suffix ?? "",
|
|
785
|
+
r: x(c.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
|
-
y:
|
|
791
|
-
fill: k(
|
|
790
|
+
y: s,
|
|
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($(u, {
|
|
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 - (r ? n : 0) + x(c.offsetY, 0),
|
|
798
|
+
fill: k(c.color, k(i.color, j(e.config))),
|
|
799
|
+
"font-size": l,
|
|
800
|
+
"font-weight": c.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 (a.show) {
|
|
804
|
+
let r = x(a.fontSize, 14), s = !!i.show, c = t / Math.max(1, n.length), l = a.value ?? {}, u = x(l.fontSize, r), f = d(l.formatter, c, h({
|
|
805
|
+
p: l.prefix ?? "",
|
|
806
|
+
v: c,
|
|
807
|
+
s: l.suffix ?? "",
|
|
808
|
+
r: x(l.rounding, 0)
|
|
809
|
+
}), { average: c });
|
|
810
|
+
o.push($(a.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 + (s ? 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($(f, {
|
|
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 + (s ? r : 0) + r + x(l.offsetY, 0),
|
|
821
|
+
fill: k(l.color, k(a.color, j(e.config))),
|
|
822
|
+
"font-size": u,
|
|
823
|
+
"font-weight": l.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(d(
|
|
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), s = k(i.color, j(n));
|
|
835
|
+
return N(d(i.formatter, t, h({
|
|
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
|
-
fill:
|
|
847
|
+
fill: s
|
|
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", {}), r = S(e.config, "layout.labels", {}), i = r.dataLabels ?? {}, a = r.value ?? {}, o = h({
|
|
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 d(
|
|
861
|
+
return d(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 = h({
|
|
868
|
+
v: i,
|
|
869
869
|
s: "%",
|
|
870
|
-
r: x(n.roundingPercentage,
|
|
870
|
+
r: x(n.roundingPercentage, r.rounding ?? 0)
|
|
871
871
|
});
|
|
872
|
-
return d(
|
|
872
|
+
return d(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", {}, u(`${E(e.config, "title.text", "Donut chart") || e.svgTitle || "Donut chart"}. ${t.length} series. Total ${v(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="${g}"
|
|
944
944
|
width="100%"
|
|
945
945
|
viewBox="0 0 ${n} ${r}"
|
|
946
946
|
role="img"
|